@nuskin/nextgen-header 1.21.0 → 1.23.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 +1000 -468
- package/package-dist/index.js.map +1 -1
- 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"
|
|
@@ -100792,7 +100807,7 @@ var live_preview_utils_default = /*#__PURE__*/__webpack_require__.n(live_preview
|
|
|
100792
100807
|
const utils_namespaceObject = require("@contentstack/utils");
|
|
100793
100808
|
;// ./src/utils/constants.js
|
|
100794
100809
|
var HEADER_CONTENT_ENTRY_UID = "global_header";
|
|
100795
|
-
var referenceFields = (/* unused pure expression or super */ null && (["top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages"]));
|
|
100810
|
+
var referenceFields = (/* unused pure expression or super */ null && (["top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages", "utility_links", "utility_links.loyalty_menu"]));
|
|
100796
100811
|
var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
|
|
100797
100812
|
var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
|
|
100798
100813
|
var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
|
|
@@ -101159,21 +101174,31 @@ function parseLogoData(logoData) {
|
|
|
101159
101174
|
};
|
|
101160
101175
|
}
|
|
101161
101176
|
;// ./src/components/header/regions/HeaderLoyaltyRegion.jsx
|
|
101177
|
+
function HeaderLoyaltyRegion_typeof(o) { "@babel/helpers - typeof"; return HeaderLoyaltyRegion_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; }, HeaderLoyaltyRegion_typeof(o); }
|
|
101178
|
+
function HeaderLoyaltyRegion_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; }
|
|
101179
|
+
function HeaderLoyaltyRegion_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? HeaderLoyaltyRegion_ownKeys(Object(t), !0).forEach(function (r) { HeaderLoyaltyRegion_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : HeaderLoyaltyRegion_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
101180
|
+
function HeaderLoyaltyRegion_defineProperty(e, r, t) { return (r = HeaderLoyaltyRegion_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
101181
|
+
function HeaderLoyaltyRegion_toPropertyKey(t) { var i = HeaderLoyaltyRegion_toPrimitive(t, "string"); return "symbol" == HeaderLoyaltyRegion_typeof(i) ? i : i + ""; }
|
|
101182
|
+
function HeaderLoyaltyRegion_toPrimitive(t, r) { if ("object" != HeaderLoyaltyRegion_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != HeaderLoyaltyRegion_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
101162
101183
|
|
|
101163
101184
|
|
|
101164
101185
|
|
|
101165
101186
|
|
|
101166
101187
|
function HeaderLoyaltyRegion(_ref) {
|
|
101188
|
+
var _data$$;
|
|
101167
101189
|
var data = _ref.data;
|
|
101168
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, {
|
|
101190
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, HeaderLoyaltyRegion_objectSpread(HeaderLoyaltyRegion_objectSpread({
|
|
101169
101191
|
type: "button",
|
|
101170
|
-
|
|
101171
|
-
})
|
|
101192
|
+
href: data === null || data === void 0 ? void 0 : data.url
|
|
101193
|
+
}, data === null || data === void 0 || (_data$$ = data.$) === null || _data$$ === void 0 ? void 0 : _data$$.label), {}, {
|
|
101194
|
+
children: data === null || data === void 0 ? void 0 : data.label
|
|
101195
|
+
}));
|
|
101172
101196
|
}
|
|
101173
101197
|
HeaderLoyaltyRegion.propTypes = {
|
|
101174
101198
|
data: external_prop_types_default().shape({
|
|
101175
|
-
|
|
101176
|
-
|
|
101199
|
+
label: (external_prop_types_default()).string.isRequired,
|
|
101200
|
+
url: (external_prop_types_default()).string,
|
|
101201
|
+
$: (external_prop_types_default()).object
|
|
101177
101202
|
}).isRequired
|
|
101178
101203
|
};
|
|
101179
101204
|
;// ./src/components/header/HeaderIcons.jsx
|
|
@@ -101711,7 +101736,8 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101711
101736
|
logoData = _ref.logoData,
|
|
101712
101737
|
localeData = _ref.localeData,
|
|
101713
101738
|
navigationData = _ref.navigationData,
|
|
101714
|
-
loyaltyData = _ref.loyaltyData
|
|
101739
|
+
loyaltyData = _ref.loyaltyData,
|
|
101740
|
+
marketTriggerMountRef = _ref.marketTriggerMountRef;
|
|
101715
101741
|
if (!isOpen) return null;
|
|
101716
101742
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawer, {
|
|
101717
101743
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerBackdrop, {
|
|
@@ -101719,15 +101745,20 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101719
101745
|
"aria-label": "Close menu"
|
|
101720
101746
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerContent, {
|
|
101721
101747
|
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
|
-
|
|
101748
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerHeaderRow, {
|
|
101749
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerLogoSlot, {
|
|
101750
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
101751
|
+
logo: logoData.logo,
|
|
101752
|
+
logoAlt: logoData.logoAlt,
|
|
101753
|
+
href: logoData.href,
|
|
101754
|
+
showLogo: logoData.showLogo,
|
|
101755
|
+
size: logoData.size || "Large",
|
|
101756
|
+
$: logoData.$
|
|
101757
|
+
})
|
|
101758
|
+
}), marketTriggerMountRef ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerMarketTriggerSlot, {
|
|
101759
|
+
ref: marketTriggerMountRef,
|
|
101760
|
+
"data-testid": "mobile-drawer-market-trigger-mount"
|
|
101761
|
+
}) : null]
|
|
101731
101762
|
})
|
|
101732
101763
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerNav, {
|
|
101733
101764
|
children: [(_navigationData$topNa = navigationData.topNavItems) === null || _navigationData$topNa === void 0 ? void 0 : _navigationData$topNa.map(function (item) {
|
|
@@ -101745,7 +101776,7 @@ function MobileHeaderDrawer(_ref) {
|
|
|
101745
101776
|
},
|
|
101746
101777
|
children: loyaltyData.link_label
|
|
101747
101778
|
})
|
|
101748
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerNavItem, {
|
|
101779
|
+
}), marketTriggerMountRef ? null : /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerNavItem, {
|
|
101749
101780
|
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerLocaleButton, {
|
|
101750
101781
|
children: [localeData.control_label, /*#__PURE__*/(0,jsx_runtime_.jsx)(IconChevronDown, {})]
|
|
101751
101782
|
})
|
|
@@ -101760,8 +101791,13 @@ MobileHeaderDrawer.propTypes = {
|
|
|
101760
101791
|
logoData: (external_prop_types_default()).object.isRequired,
|
|
101761
101792
|
localeData: (external_prop_types_default()).object.isRequired,
|
|
101762
101793
|
navigationData: (external_prop_types_default()).object.isRequired,
|
|
101763
|
-
loyaltyData: (external_prop_types_default()).object
|
|
101794
|
+
loyaltyData: (external_prop_types_default()).object,
|
|
101795
|
+
marketTriggerMountRef: external_prop_types_default().shape({
|
|
101796
|
+
current: (external_prop_types_default()).any
|
|
101797
|
+
})
|
|
101764
101798
|
};
|
|
101799
|
+
// EXTERNAL MODULE: external "react-dom"
|
|
101800
|
+
var external_react_dom_ = __webpack_require__(2326);
|
|
101765
101801
|
// EXTERNAL MODULE: ./node_modules/@mui/material/Button/Button.js
|
|
101766
101802
|
var Button = __webpack_require__(1629);
|
|
101767
101803
|
;// ./src/components/button/CancelButton.styled.jsx
|
|
@@ -101839,12 +101875,9 @@ var TABS_TOP_NAV_ROOT_PADDING = "32px 32px 16px";
|
|
|
101839
101875
|
var TABS_MOBILE_MAX_WIDTH_PX = 1024;
|
|
101840
101876
|
var TABS_MOBILE_MEDIA_QUERY = "(max-width: ".concat(TABS_MOBILE_MAX_WIDTH_PX, "px)");
|
|
101841
101877
|
var ARIA_LABEL_TABS_DEFAULT = "Tabs";
|
|
101842
|
-
var ARIA_LABEL_OPEN_MENU = "Open menu";
|
|
101843
|
-
var ARIA_LABEL_CLOSE_MENU = "Close menu";
|
|
101844
101878
|
var ARIA_LABEL_MARKET_SELECTOR_TABS = "Market selector tabs";
|
|
101845
101879
|
var ARIA_LABEL_TOP_NAV_TABS = "Top nav tabs";
|
|
101846
101880
|
var FALLBACK_REGION_LABEL = "Region";
|
|
101847
|
-
var FALLBACK_MENU_LABEL = "Menu";
|
|
101848
101881
|
var TAB_ID_FALLBACK_SEGMENT = "item";
|
|
101849
101882
|
|
|
101850
101883
|
/** Desktop tab hover: delay before activating tab (ms) */
|
|
@@ -101852,80 +101885,21 @@ var TABS_HOVER_ACTIVATE_MS = 80;
|
|
|
101852
101885
|
/** Desktop tab hover: delay after mouseleave before clearing selection (ms) */
|
|
101853
101886
|
var TABS_HOVER_CLEAR_MS = 120;
|
|
101854
101887
|
;// ./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
101888
|
|
|
101858
101889
|
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
101890
|
|
|
101860
|
-
|
|
101861
101891
|
var TabsRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
101862
|
-
target: "
|
|
101892
|
+
target: "e1wqq0259"
|
|
101863
101893
|
} : 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
101894
|
return p.$isTopNav && "\n max-width: ".concat(TABS_TOP_NAV_MAX_WIDTH_PX, "px;\n padding: ").concat(TABS_TOP_NAV_ROOT_PADDING, ";\n ");
|
|
101867
101895
|
}, "@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){max-width:none;width:100%;", function (p) {
|
|
101868
101896
|
return p.$isTopNav && "padding: 0;";
|
|
101869
101897
|
}, ";}" + ( 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
101898
|
var TabList = /*#__PURE__*/createStyled("div", true ? {
|
|
101888
|
-
target: "
|
|
101899
|
+
target: "e1wqq0258"
|
|
101889
101900
|
} : 0)("display:flex;align-items:flex-end;justify-content:", function (props) {
|
|
101890
101901
|
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);
|
|
101902
|
+
}, ";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
101903
|
var MobileDrawerScroll = /*#__PURE__*/createStyled("div", true ? {
|
|
101930
101904
|
target: "e1wqq0257"
|
|
101931
101905
|
} : 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 +101936,6 @@ var Panel = /*#__PURE__*/createStyled("div", true ? {
|
|
|
101962
101936
|
target: "e1wqq0250"
|
|
101963
101937
|
} : 0)("padding-top:0;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
101964
101938
|
;// ./src/components/tabs/utils/tabsHelpers.js
|
|
101965
|
-
/* unused harmony import specifier */ var tabsHelpers_FALLBACK_MENU_LABEL;
|
|
101966
101939
|
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
101940
|
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
101941
|
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 +101953,6 @@ function safeId(prefix, raw) {
|
|
|
101980
101953
|
function getRegionLabel(region) {
|
|
101981
101954
|
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
101955
|
}
|
|
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
101956
|
function normalizeMarketRegions(data) {
|
|
102004
101957
|
var _data$regions, _data$market_selector, _data$market_selector2;
|
|
102005
101958
|
if (Array.isArray(data)) return data;
|
|
@@ -102007,8 +101960,8 @@ function normalizeMarketRegions(data) {
|
|
|
102007
101960
|
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
101961
|
}
|
|
102009
101962
|
function regionHasMarketOrCountry(region) {
|
|
102010
|
-
var
|
|
102011
|
-
var items = (
|
|
101963
|
+
var _ref, _region$markets;
|
|
101964
|
+
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
101965
|
return items.length > 0;
|
|
102013
101966
|
}
|
|
102014
101967
|
function buildMarketSelectorTabs(regions) {
|
|
@@ -102291,8 +102244,6 @@ function Tabs(_ref4) {
|
|
|
102291
102244
|
ariaLabel = _ref4$ariaLabel === void 0 ? ARIA_LABEL_TABS_DEFAULT : _ref4$ariaLabel,
|
|
102292
102245
|
_ref4$isTopNav = _ref4.isTopNav,
|
|
102293
102246
|
isTopNav = _ref4$isTopNav === void 0 ? false : _ref4$isTopNav,
|
|
102294
|
-
_ref4$mobileEmbeddedF = _ref4.mobileEmbeddedFullScreen,
|
|
102295
|
-
mobileEmbeddedFullScreen = _ref4$mobileEmbeddedF === void 0 ? false : _ref4$mobileEmbeddedF,
|
|
102296
102247
|
tabListContainer$ = _ref4.tabListContainer$;
|
|
102297
102248
|
var _useTabsController = useTabsController({
|
|
102298
102249
|
tabs: tabs,
|
|
@@ -102328,7 +102279,6 @@ function Tabs(_ref4) {
|
|
|
102328
102279
|
var showPanel = activationMode === "click" || panelContent;
|
|
102329
102280
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(TabsRoot, {
|
|
102330
102281
|
$isTopNav: isTopNav,
|
|
102331
|
-
$mobileEmbeddedFullScreen: mobileEmbeddedFullScreen,
|
|
102332
102282
|
className: className,
|
|
102333
102283
|
onMouseEnter: handleContainerEnter,
|
|
102334
102284
|
onMouseLeave: handleContainerLeave,
|
|
@@ -102338,8 +102288,7 @@ function Tabs(_ref4) {
|
|
|
102338
102288
|
id: sidebarId,
|
|
102339
102289
|
role: "tablist",
|
|
102340
102290
|
"aria-label": ariaLabel,
|
|
102341
|
-
$justify: tabAlign
|
|
102342
|
-
$mobileEmbedded: mobileEmbeddedFullScreen
|
|
102291
|
+
$justify: tabAlign
|
|
102343
102292
|
}, tabListContainer$ !== null && tabListContainer$ !== void 0 ? tabListContainer$ : {}), {}, {
|
|
102344
102293
|
children: [!isMobile ? desktopTabs : null, isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileDrawerScroll, {
|
|
102345
102294
|
"data-tabs-mobile-accordion": "",
|
|
@@ -102368,7 +102317,6 @@ function Tabs(_ref4) {
|
|
|
102368
102317
|
});
|
|
102369
102318
|
}
|
|
102370
102319
|
Tabs.propTypes = {
|
|
102371
|
-
mobileEmbeddedFullScreen: (external_prop_types_default()).bool,
|
|
102372
102320
|
isTopNav: (external_prop_types_default()).bool,
|
|
102373
102321
|
tabs: external_prop_types_default().arrayOf(external_prop_types_default().shape({
|
|
102374
102322
|
id: (external_prop_types_default()).string.isRequired,
|
|
@@ -102906,10 +102854,8 @@ var CountryListSelectorTheme = {
|
|
|
102906
102854
|
panelPadding: "12px 32px 20px",
|
|
102907
102855
|
sectionGap: "50px 100px",
|
|
102908
102856
|
localeGap: "8px",
|
|
102909
|
-
mobilePanelPadding: "16px 0 0",
|
|
102910
102857
|
mobileSectionGap: "25px",
|
|
102911
102858
|
mobileLocaleGap: "10px",
|
|
102912
|
-
mobileLocaleIndent: "25px",
|
|
102913
102859
|
mobileLocaleListMarginTop: "10px"
|
|
102914
102860
|
},
|
|
102915
102861
|
button: {
|
|
@@ -102950,7 +102896,7 @@ var CountryListSelectorHeading = /*#__PURE__*/createStyled("h2", true ? {
|
|
|
102950
102896
|
} : 0)("margin:0;text-align:center;font-size:", CountryListSelectorTheme.typography.titleSize, ";line-height:", CountryListSelectorTheme.typography.titleLineHeight, ";font-weight:500;" + ( true ? "" : 0));
|
|
102951
102897
|
var CountryListSelectorPanel = /*#__PURE__*/createStyled("div", true ? {
|
|
102952
102898
|
target: "eszgqfj8"
|
|
102953
|
-
} : 0)("padding:", CountryListSelectorTheme.spacing.panelPadding, "
|
|
102899
|
+
} : 0)("padding:", CountryListSelectorTheme.spacing.panelPadding, ";" + ( true ? "" : 0));
|
|
102954
102900
|
|
|
102955
102901
|
/** Stacks multiple `CountryCards` grids when a region has several Contentstack `countries[]` groups. */
|
|
102956
102902
|
var CountryCardGroups = /*#__PURE__*/createStyled("div", true ? {
|
|
@@ -102972,10 +102918,10 @@ var CountryButton = /*#__PURE__*/createStyled("div", true ? {
|
|
|
102972
102918
|
} : 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
102919
|
var LocaleList = /*#__PURE__*/createStyled("ul", true ? {
|
|
102974
102920
|
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:
|
|
102921
|
+
} : 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
102922
|
var LocaleItem = /*#__PURE__*/createStyled("li", true ? {
|
|
102977
102923
|
target: "eszgqfj2"
|
|
102978
|
-
} : 0)("margin:0;display:flex;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){width:
|
|
102924
|
+
} : 0)("margin:0;display:flex;@media (max-width: ", CountryListSelectorTheme.breakpoints.mobileMax, "){width:auto;}" + ( true ? "" : 0));
|
|
102979
102925
|
var LocaleButton = /*#__PURE__*/createStyled("div", true ? {
|
|
102980
102926
|
target: "eszgqfj1"
|
|
102981
102927
|
} : 0)("--locale-icon-space:20px;border-radius:", CountryListSelectorTheme.button.borderRadius, ";background:", function (props) {
|
|
@@ -102984,7 +102930,9 @@ var LocaleButton = /*#__PURE__*/createStyled("div", true ? {
|
|
|
102984
102930
|
return props.$selected ? CountryListSelectorTheme.typography.selectedLocaleWeight : CountryListSelectorTheme.typography.localeWeight;
|
|
102985
102931
|
}, ";cursor:pointer;color:", function (props) {
|
|
102986
102932
|
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:
|
|
102933
|
+
}, ";&: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) {
|
|
102934
|
+
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 ") : "";
|
|
102935
|
+
}, ";}" + ( true ? "" : 0));
|
|
102988
102936
|
var EmptyState = /*#__PURE__*/createStyled("p", true ? {
|
|
102989
102937
|
target: "eszgqfj0"
|
|
102990
102938
|
} : 0)("margin:0;text-align:center;color:", CountryListSelectorTheme.colors.mutedText, ";" + ( true ? "" : 0));
|
|
@@ -103015,6 +102963,7 @@ function CountryListSelector_toPrimitive(t, r) { if ("object" != CountryListSele
|
|
|
103015
102963
|
|
|
103016
102964
|
|
|
103017
102965
|
|
|
102966
|
+
|
|
103018
102967
|
function navigateToPath(path) {
|
|
103019
102968
|
var browserWindow = globalThis.window;
|
|
103020
102969
|
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.location)) {
|
|
@@ -103032,24 +102981,11 @@ function navigateToPath(path) {
|
|
|
103032
102981
|
browserWindow.location.assign(path);
|
|
103033
102982
|
}
|
|
103034
102983
|
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
|
-
})]
|
|
102984
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
102985
|
+
name: "success",
|
|
102986
|
+
size: "small",
|
|
102987
|
+
colorOverride: "#252525",
|
|
102988
|
+
"aria-hidden": true
|
|
103053
102989
|
});
|
|
103054
102990
|
}
|
|
103055
102991
|
function renderLocaleOption(_ref) {
|
|
@@ -103434,8 +103370,9 @@ function normalizeStackMarketSelector_toPrimitive(t, r) { if ("object" != normal
|
|
|
103434
103370
|
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
103371
|
/**
|
|
103436
103372
|
* Normalizes Contentstack `market_selector` entry JSON into tab/panel regions:
|
|
103437
|
-
* each region has `
|
|
103438
|
-
* `
|
|
103373
|
+
* `regions[]` → each region has `markets[]` (ISO `iso_code_2`) and each market has `languages[]`
|
|
103374
|
+
* (`iso_code_2` / display names). Output keeps `countries[]` as the normalized market list for
|
|
103375
|
+
* `CountryListSelector` / `buildMarketSelectorTabs`.
|
|
103439
103376
|
*/
|
|
103440
103377
|
|
|
103441
103378
|
function resolveMarketSelectorEntry(data) {
|
|
@@ -103445,8 +103382,18 @@ function resolveMarketSelectorEntry(data) {
|
|
|
103445
103382
|
}
|
|
103446
103383
|
|
|
103447
103384
|
/**
|
|
103448
|
-
*
|
|
103449
|
-
*
|
|
103385
|
+
* Contentstack Live Preview `.$` map for the market selector entry root.
|
|
103386
|
+
* Works for both array-shaped (`[{ ..., $ }]`) and object-shaped (`{ ..., $ }`) `data` props.
|
|
103387
|
+
*/
|
|
103388
|
+
function resolveMarketSelectorDollarFields(data) {
|
|
103389
|
+
var _entry$$;
|
|
103390
|
+
var entry = resolveMarketSelectorEntry(data);
|
|
103391
|
+
return (_entry$$ = entry === null || entry === void 0 ? void 0 : entry.$) !== null && _entry$$ !== void 0 ? _entry$$ : {};
|
|
103392
|
+
}
|
|
103393
|
+
|
|
103394
|
+
/**
|
|
103395
|
+
* Field props under `.$.<fieldKey>` (e.g. `regions.$.region_title`) for Contentstack Live Preview.
|
|
103396
|
+
* Spread the return value onto the DOM node that shows the field value: `{...getContentstackDollarFieldProps($, "region_title")}`.
|
|
103450
103397
|
*/
|
|
103451
103398
|
function getContentstackDollarFieldProps(dollarBlock, fieldKey) {
|
|
103452
103399
|
if (!dollarBlock || !fieldKey) {
|
|
@@ -103469,9 +103416,9 @@ function firstNonEmptyString() {
|
|
|
103469
103416
|
}
|
|
103470
103417
|
return "";
|
|
103471
103418
|
}
|
|
103472
|
-
function normalizeLanguage(
|
|
103473
|
-
var _ref,
|
|
103474
|
-
var source = (_ref = (
|
|
103419
|
+
function normalizeLanguage(languageEntry, index) {
|
|
103420
|
+
var _ref, _languageEntry$langua, _ref2, _source$_metadata$uid, _source$_metadata;
|
|
103421
|
+
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
103422
|
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
103423
|
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
103424
|
var locales$ = getContentstackDollarFieldProps(source === null || source === void 0 ? void 0 : source.$, "locales");
|
|
@@ -103486,24 +103433,24 @@ function normalizeLanguage(languageWrapper, index) {
|
|
|
103486
103433
|
locales$: locales$
|
|
103487
103434
|
} : {});
|
|
103488
103435
|
}
|
|
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");
|
|
103436
|
+
function normalizeMarketFromStack(market, index) {
|
|
103437
|
+
var _source$languages, _getContentstackDolla, _getContentstackDolla2, _getContentstackDolla3, _ref3, _source$_metadata$uid2, _source$_metadata2, _ref4, _source$default_langu;
|
|
103438
|
+
var source = market !== null && market !== void 0 ? market : {};
|
|
103439
|
+
var languagesRaw = (_source$languages = source.languages) !== null && _source$languages !== void 0 ? _source$languages : [];
|
|
103440
|
+
var country$ = getContentstackDollarFieldProps(market === null || market === void 0 ? void 0 : market.$, "country");
|
|
103441
|
+
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");
|
|
103442
|
+
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");
|
|
103443
|
+
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
103444
|
return normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread({
|
|
103498
|
-
uid: (
|
|
103445
|
+
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
103446
|
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
103447
|
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
103448
|
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
103449
|
currency: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.currency, source === null || source === void 0 ? void 0 : source.currency_code),
|
|
103503
103450
|
eq_home_url: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.eq_home_url),
|
|
103504
103451
|
home_url: firstNonEmptyString(source === null || source === void 0 ? void 0 : source.home_url),
|
|
103505
|
-
default_language_code: String((
|
|
103506
|
-
languages:
|
|
103452
|
+
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(),
|
|
103453
|
+
languages: languagesRaw.map(normalizeLanguage)
|
|
103507
103454
|
}, country$ ? {
|
|
103508
103455
|
country$: country$
|
|
103509
103456
|
} : {}), countryLabel$ ? {
|
|
@@ -103514,55 +103461,33 @@ function normalizeCountry(countryWrapper, index) {
|
|
|
103514
103461
|
supportedLanguages$: supportedLanguages$
|
|
103515
103462
|
} : {});
|
|
103516
103463
|
}
|
|
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
|
-
});
|
|
103464
|
+
function normalizeRegion(region, index) {
|
|
103465
|
+
var _getContentstackDolla4, _ref5, _regionSource$_metada, _regionSource$_metada2;
|
|
103466
|
+
var regionSource = region !== null && region !== void 0 ? region : {};
|
|
103467
|
+
var marketsRaw = Array.isArray(regionSource.markets) ? regionSource.markets : [];
|
|
103468
|
+
var countries = marketsRaw.map(function (m, idx) {
|
|
103469
|
+
return normalizeMarketFromStack(m, idx);
|
|
103532
103470
|
});
|
|
103533
|
-
var
|
|
103534
|
-
var
|
|
103535
|
-
countries:
|
|
103536
|
-
return normalizeCountry(entry, idx);
|
|
103537
|
-
})
|
|
103471
|
+
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");
|
|
103472
|
+
var countryGroups = countries.length > 0 ? [{
|
|
103473
|
+
countries: countries
|
|
103538
103474
|
}] : [];
|
|
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
103475
|
return normalizeStackMarketSelector_objectSpread(normalizeStackMarketSelector_objectSpread({
|
|
103546
|
-
uid: (
|
|
103547
|
-
region_title: firstNonEmptyString(
|
|
103476
|
+
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),
|
|
103477
|
+
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
103478
|
}, label$ ? {
|
|
103549
103479
|
label$: label$
|
|
103550
103480
|
} : {}), {}, {
|
|
103551
|
-
countries:
|
|
103481
|
+
countries: countries,
|
|
103482
|
+
markets: countries,
|
|
103552
103483
|
countryGroups: countryGroups
|
|
103553
103484
|
});
|
|
103554
103485
|
}
|
|
103555
103486
|
function normalizeRegionsForTabs(data, selector) {
|
|
103556
103487
|
var _selector$regions;
|
|
103557
103488
|
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)];
|
|
103489
|
+
return rawRegions.map(function (region, index) {
|
|
103490
|
+
return normalizeRegion(region, index);
|
|
103566
103491
|
});
|
|
103567
103492
|
}
|
|
103568
103493
|
function resolveMarketSelectorText(marketSelector) {
|
|
@@ -103579,11 +103504,158 @@ function getNormalizedMarketSelectorRegions(data) {
|
|
|
103579
103504
|
var selector = resolveMarketSelectorEntry(data);
|
|
103580
103505
|
return normalizeRegionsForTabs(data, selector);
|
|
103581
103506
|
}
|
|
103507
|
+
;// ./src/components/market-selector/marketSelectorWindow.js
|
|
103508
|
+
|
|
103509
|
+
|
|
103510
|
+
/** Avoid a mobile-first paint with `isMobileViewport === false` (pill stuck inside hidden desktop utility bar). */
|
|
103511
|
+
function getInitialMobileViewportMatches() {
|
|
103512
|
+
try {
|
|
103513
|
+
var w = globalThis.window;
|
|
103514
|
+
if (!(w !== null && w !== void 0 && w.matchMedia)) return false;
|
|
103515
|
+
return Boolean(w.matchMedia(TABS_MOBILE_MEDIA_QUERY).matches);
|
|
103516
|
+
} catch (_unused) {
|
|
103517
|
+
return false;
|
|
103518
|
+
}
|
|
103519
|
+
}
|
|
103520
|
+
function marketSelectorWindow_navigateToPath(path) {
|
|
103521
|
+
var browserWindow = globalThis.window;
|
|
103522
|
+
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.location)) {
|
|
103523
|
+
return;
|
|
103524
|
+
}
|
|
103525
|
+
try {
|
|
103526
|
+
var topWindow = browserWindow.top;
|
|
103527
|
+
if (topWindow !== null && topWindow !== void 0 && topWindow.location) {
|
|
103528
|
+
topWindow.location.assign(path);
|
|
103529
|
+
return;
|
|
103530
|
+
}
|
|
103531
|
+
} catch (_unused2) {
|
|
103532
|
+
// Fall back when top-level navigation is not accessible.
|
|
103533
|
+
}
|
|
103534
|
+
browserWindow.location.assign(path);
|
|
103535
|
+
}
|
|
103582
103536
|
;// ./src/components/market-selector/MarketSelector.styled.jsx
|
|
103583
103537
|
|
|
103584
103538
|
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
103539
|
|
|
103540
|
+
|
|
103586
103541
|
var DESKTOP_MIN_WIDTH_PX = 1025;
|
|
103542
|
+
|
|
103543
|
+
/** Full-screen market modal layer (above mobile drawer z-index 9999). */
|
|
103544
|
+
var MobileMarketFullScreenRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103545
|
+
target: "e1g1uu3p36"
|
|
103546
|
+
} : 0)( true ? {
|
|
103547
|
+
name: "1n6oz2n",
|
|
103548
|
+
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;}"
|
|
103549
|
+
} : 0);
|
|
103550
|
+
var MobileMarketDialogInner = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103551
|
+
target: "e1g1uu3p35"
|
|
103552
|
+
} : 0)( true ? {
|
|
103553
|
+
name: "1d69jno",
|
|
103554
|
+
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"
|
|
103555
|
+
} : 0);
|
|
103556
|
+
var MobileStickyHeaderContainer = /*#__PURE__*/createStyled("div", true ? {
|
|
103557
|
+
target: "e1g1uu3p34"
|
|
103558
|
+
} : 0)( true ? {
|
|
103559
|
+
name: "kyd2ed",
|
|
103560
|
+
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"
|
|
103561
|
+
} : 0);
|
|
103562
|
+
var MobileCompactHeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
103563
|
+
target: "e1g1uu3p33"
|
|
103564
|
+
} : 0)( true ? {
|
|
103565
|
+
name: "1tdg822",
|
|
103566
|
+
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"
|
|
103567
|
+
} : 0);
|
|
103568
|
+
var MobileCompactTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103569
|
+
target: "e1g1uu3p32"
|
|
103570
|
+
} : 0)( true ? {
|
|
103571
|
+
name: "eo9mb5",
|
|
103572
|
+
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"
|
|
103573
|
+
} : 0);
|
|
103574
|
+
var MobileModalHeaderCancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103575
|
+
target: "e1g1uu3p31"
|
|
103576
|
+
} : 0)( true ? {
|
|
103577
|
+
name: "fld1nn",
|
|
103578
|
+
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;}"
|
|
103579
|
+
} : 0);
|
|
103580
|
+
var MobileModalScrollContent = /*#__PURE__*/createStyled("div", true ? {
|
|
103581
|
+
target: "e1g1uu3p30"
|
|
103582
|
+
} : 0)( true ? {
|
|
103583
|
+
name: "1q7526u",
|
|
103584
|
+
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;}"
|
|
103585
|
+
} : 0);
|
|
103586
|
+
var MobileRememberControlsWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103587
|
+
target: "e1g1uu3p29"
|
|
103588
|
+
} : 0)( true ? {
|
|
103589
|
+
name: "2wv1be",
|
|
103590
|
+
styles: "width:100%;box-sizing:border-box"
|
|
103591
|
+
} : 0);
|
|
103592
|
+
var MobileRememberControls = /*#__PURE__*/createStyled("div", true ? {
|
|
103593
|
+
target: "e1g1uu3p28"
|
|
103594
|
+
} : 0)( true ? {
|
|
103595
|
+
name: "1dmiggy",
|
|
103596
|
+
styles: "display:flex;align-items:center;justify-content:flex-start"
|
|
103597
|
+
} : 0);
|
|
103598
|
+
var MobileRememberRowCompact = /*#__PURE__*/createStyled("label", true ? {
|
|
103599
|
+
target: "e1g1uu3p27"
|
|
103600
|
+
} : 0)( true ? {
|
|
103601
|
+
name: "1v7mvq",
|
|
103602
|
+
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;}"
|
|
103603
|
+
} : 0);
|
|
103604
|
+
var MobileLocaleSectionBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
103605
|
+
target: "e1g1uu3p26"
|
|
103606
|
+
} : 0)( true ? {
|
|
103607
|
+
name: "1uu8bvb",
|
|
103608
|
+
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"
|
|
103609
|
+
} : 0);
|
|
103610
|
+
var MobileLocaleList = /*#__PURE__*/createStyled("ul", true ? {
|
|
103611
|
+
target: "e1g1uu3p25"
|
|
103612
|
+
} : 0)( true ? {
|
|
103613
|
+
name: "1pxu7om",
|
|
103614
|
+
styles: "width:100%;min-height:0;list-style:none;margin:0;padding:0"
|
|
103615
|
+
} : 0);
|
|
103616
|
+
var MobileLocaleRow = /*#__PURE__*/createStyled("li", true ? {
|
|
103617
|
+
target: "e1g1uu3p24"
|
|
103618
|
+
} : 0)( true ? {
|
|
103619
|
+
name: "duoqfw",
|
|
103620
|
+
styles: "width:100%;min-height:44px;padding:0 20px;box-sizing:border-box"
|
|
103621
|
+
} : 0);
|
|
103622
|
+
|
|
103623
|
+
/** Same navigation affordance as desktop `CountryListSelector` locale links. */
|
|
103624
|
+
var MobileLocaleRowLink = /*#__PURE__*/createStyled("a", true ? {
|
|
103625
|
+
target: "e1g1uu3p23"
|
|
103626
|
+
} : 0)( true ? {
|
|
103627
|
+
name: "12tmgo3",
|
|
103628
|
+
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;}"
|
|
103629
|
+
} : 0);
|
|
103630
|
+
var MobileLocaleRowMain = /*#__PURE__*/createStyled("div", true ? {
|
|
103631
|
+
target: "e1g1uu3p22"
|
|
103632
|
+
} : 0)( true ? {
|
|
103633
|
+
name: "6778cq",
|
|
103634
|
+
styles: "width:280px;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:4px"
|
|
103635
|
+
} : 0);
|
|
103636
|
+
var MobileLocaleText = /*#__PURE__*/createStyled("span", true ? {
|
|
103637
|
+
target: "e1g1uu3p21"
|
|
103638
|
+
} : 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) {
|
|
103639
|
+
return p.$selected ? 600 : 400;
|
|
103640
|
+
}, ";" + ( true ? "" : 0));
|
|
103641
|
+
var MobileLocaleStatusIcon = /*#__PURE__*/createStyled(dist.NsIcon, true ? {
|
|
103642
|
+
target: "e1g1uu3p20"
|
|
103643
|
+
} : 0)( true ? {
|
|
103644
|
+
name: "1oi3xqh",
|
|
103645
|
+
styles: "width:24px;height:24px;flex-shrink:0;color:#252525"
|
|
103646
|
+
} : 0);
|
|
103647
|
+
var MobileModalBody = /*#__PURE__*/createStyled("div", true ? {
|
|
103648
|
+
target: "e1g1uu3p19"
|
|
103649
|
+
} : 0)( true ? {
|
|
103650
|
+
name: "1vektn8",
|
|
103651
|
+
styles: "width:100%;min-height:0;display:flex;flex-direction:column;gap:16px;padding-bottom:48px;box-sizing:border-box"
|
|
103652
|
+
} : 0);
|
|
103653
|
+
var MobileRegionsSection = /*#__PURE__*/createStyled("div", true ? {
|
|
103654
|
+
target: "e1g1uu3p18"
|
|
103655
|
+
} : 0)( true ? {
|
|
103656
|
+
name: "1wqadvr",
|
|
103657
|
+
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;}"
|
|
103658
|
+
} : 0);
|
|
103587
103659
|
var TriggerPillSlash = /*#__PURE__*/createStyled(dist.NsIcon, true ? {
|
|
103588
103660
|
target: "e1g1uu3p17"
|
|
103589
103661
|
} : 0)( true ? {
|
|
@@ -103596,35 +103668,26 @@ var TriggerPillInner = /*#__PURE__*/createStyled("span", true ? {
|
|
|
103596
103668
|
name: "1edu2bp",
|
|
103597
103669
|
styles: "display:inline-flex;align-items:center;gap:0px;color:inherit;border-bottom:1px solid transparent;box-sizing:border-box"
|
|
103598
103670
|
} : 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
103671
|
|
|
103606
|
-
/**
|
|
103607
|
-
|
|
103672
|
+
/**
|
|
103673
|
+
* Mobile nav drawer market control: text + chevron only (no pill); intrinsic width.
|
|
103674
|
+
* Label color matches earlier market trigger tokens (#5f5f5f, Lora).
|
|
103675
|
+
*/
|
|
103676
|
+
var MobileDrawerTriggerPill = /*#__PURE__*/createStyled("button", true ? {
|
|
103677
|
+
target: "e1g1uu3p15"
|
|
103678
|
+
} : 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));
|
|
103679
|
+
var MarketSelectorRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103608
103680
|
target: "e1g1uu3p14"
|
|
103609
|
-
} : 0)( true ?
|
|
103610
|
-
name: "2wv1be",
|
|
103611
|
-
styles: "width:100%;box-sizing:border-box"
|
|
103612
|
-
} : 0);
|
|
103681
|
+
} : 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
103682
|
var TriggerPill = /*#__PURE__*/createStyled("button", true ? {
|
|
103614
103683
|
target: "e1g1uu3p13"
|
|
103615
103684
|
} : 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
103685
|
var Overlay = /*#__PURE__*/createStyled("div", true ? {
|
|
103617
103686
|
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);
|
|
103687
|
+
} : 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
103688
|
var ModalSurface = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103623
103689
|
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);
|
|
103690
|
+
} : 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
103691
|
var ModalScrollArea = /*#__PURE__*/createStyled("div", true ? {
|
|
103629
103692
|
target: "e1g1uu3p10"
|
|
103630
103693
|
} : 0)( true ? {
|
|
@@ -103642,22 +103705,13 @@ var StickyTop = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103642
103705
|
} : 0);
|
|
103643
103706
|
var HeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
103644
103707
|
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);
|
|
103708
|
+
} : 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
103709
|
var LogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103650
103710
|
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);
|
|
103711
|
+
} : 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
103712
|
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103656
103713
|
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);
|
|
103714
|
+
} : 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
103715
|
var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
103662
103716
|
target: "e1g1uu3p4"
|
|
103663
103717
|
} : 0)( true ? {
|
|
@@ -103666,16 +103720,10 @@ var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103666
103720
|
} : 0);
|
|
103667
103721
|
var TopControls = /*#__PURE__*/createStyled("div", true ? {
|
|
103668
103722
|
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);
|
|
103723
|
+
} : 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
103724
|
var TabsRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103674
103725
|
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);
|
|
103726
|
+
} : 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
103727
|
var RememberRow = /*#__PURE__*/createStyled("label", true ? {
|
|
103680
103728
|
target: "e1g1uu3p1"
|
|
103681
103729
|
} : 0)( true ? {
|
|
@@ -103952,8 +104000,21 @@ function MarketSelector_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
103952
104000
|
|
|
103953
104001
|
|
|
103954
104002
|
|
|
104003
|
+
|
|
104004
|
+
|
|
103955
104005
|
var REMEMBER_KEY = "marketSelectorRemember";
|
|
103956
104006
|
var SELECTION_KEY = "marketSelectorSelection";
|
|
104007
|
+
function collectMarketsWithParentRegions(regions) {
|
|
104008
|
+
return (regions !== null && regions !== void 0 ? regions : []).flatMap(function (region) {
|
|
104009
|
+
var _region$countries;
|
|
104010
|
+
return ((_region$countries = region === null || region === void 0 ? void 0 : region.countries) !== null && _region$countries !== void 0 ? _region$countries : []).map(function (country) {
|
|
104011
|
+
return {
|
|
104012
|
+
country: country,
|
|
104013
|
+
region: region
|
|
104014
|
+
};
|
|
104015
|
+
});
|
|
104016
|
+
});
|
|
104017
|
+
}
|
|
103957
104018
|
var VB_EMPTY_STATE_TEXT = "Markets and languages are not authorable in Visual Builder mode.";
|
|
103958
104019
|
var DEFAULT_EMPTY_STATE_TEXT = "No countries found.";
|
|
103959
104020
|
function computeTriggerDisplay(_ref) {
|
|
@@ -103982,6 +104043,135 @@ function computeTriggerDisplay(_ref) {
|
|
|
103982
104043
|
languageLabel: languageCode
|
|
103983
104044
|
};
|
|
103984
104045
|
}
|
|
104046
|
+
function buildMobileLocaleFallbackRows(effectivePageLocale) {
|
|
104047
|
+
var label = String(effectivePageLocale !== null && effectivePageLocale !== void 0 ? effectivePageLocale : "").trim();
|
|
104048
|
+
if (!label) return [];
|
|
104049
|
+
return [{
|
|
104050
|
+
id: "fallback",
|
|
104051
|
+
label: label,
|
|
104052
|
+
currency: "",
|
|
104053
|
+
languageLabel: label,
|
|
104054
|
+
selected: true,
|
|
104055
|
+
navigable: false,
|
|
104056
|
+
country: null,
|
|
104057
|
+
locale: null,
|
|
104058
|
+
region: null
|
|
104059
|
+
}];
|
|
104060
|
+
}
|
|
104061
|
+
function findCountryRegionByPersistedUid(pairs, persistedUid) {
|
|
104062
|
+
if (!persistedUid) return null;
|
|
104063
|
+
var hit = pairs.find(function (p) {
|
|
104064
|
+
var _p$country$uid, _p$country;
|
|
104065
|
+
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;
|
|
104066
|
+
});
|
|
104067
|
+
if (!hit) return null;
|
|
104068
|
+
return {
|
|
104069
|
+
country: hit.country,
|
|
104070
|
+
region: hit.region
|
|
104071
|
+
};
|
|
104072
|
+
}
|
|
104073
|
+
function findCountryRegionByPageCountryCode(pairs, effectivePageLocale) {
|
|
104074
|
+
var _parseStackEntryLocal2 = parseStackEntryLocale(effectivePageLocale),
|
|
104075
|
+
countryCode = _parseStackEntryLocal2.countryCode;
|
|
104076
|
+
if (!countryCode) return null;
|
|
104077
|
+
var cc = String(countryCode).toLowerCase();
|
|
104078
|
+
var hit = pairs.find(function (p) {
|
|
104079
|
+
return getCountryCode(p.country) === cc;
|
|
104080
|
+
});
|
|
104081
|
+
if (!hit) return null;
|
|
104082
|
+
return {
|
|
104083
|
+
country: hit.country,
|
|
104084
|
+
region: hit.region
|
|
104085
|
+
};
|
|
104086
|
+
}
|
|
104087
|
+
function findDefaultCountryRegion(pairs) {
|
|
104088
|
+
var _pairs$find;
|
|
104089
|
+
var hit = (_pairs$find = pairs.find(function (p) {
|
|
104090
|
+
var _p$country$languages, _p$country2;
|
|
104091
|
+
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) {
|
|
104092
|
+
return l.selected;
|
|
104093
|
+
});
|
|
104094
|
+
})) !== null && _pairs$find !== void 0 ? _pairs$find : pairs[0];
|
|
104095
|
+
return {
|
|
104096
|
+
country: hit === null || hit === void 0 ? void 0 : hit.country,
|
|
104097
|
+
region: hit === null || hit === void 0 ? void 0 : hit.region
|
|
104098
|
+
};
|
|
104099
|
+
}
|
|
104100
|
+
function resolveCountryAndRegionForMobileRows(pairs, persistedSelection, effectivePageLocale) {
|
|
104101
|
+
var _persistedSelection$c;
|
|
104102
|
+
var persistedUid = String((_persistedSelection$c = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.countryUid) !== null && _persistedSelection$c !== void 0 ? _persistedSelection$c : "").trim();
|
|
104103
|
+
var fromPersisted = findCountryRegionByPersistedUid(pairs, persistedUid);
|
|
104104
|
+
if (fromPersisted) return fromPersisted;
|
|
104105
|
+
var fromPageCode = findCountryRegionByPageCountryCode(pairs, effectivePageLocale);
|
|
104106
|
+
if (fromPageCode) return fromPageCode;
|
|
104107
|
+
return findDefaultCountryRegion(pairs);
|
|
104108
|
+
}
|
|
104109
|
+
function isMobileLocaleRowSelected(_ref2) {
|
|
104110
|
+
var selLocaleIso = _ref2.selLocaleIso,
|
|
104111
|
+
localeIso = _ref2.localeIso,
|
|
104112
|
+
lang = _ref2.lang,
|
|
104113
|
+
pageLangLower = _ref2.pageLangLower,
|
|
104114
|
+
idx = _ref2.idx;
|
|
104115
|
+
if (selLocaleIso) return localeIso === selLocaleIso;
|
|
104116
|
+
if (lang.selected) return true;
|
|
104117
|
+
if (pageLangLower && localeIso === pageLangLower) return true;
|
|
104118
|
+
return !selLocaleIso && !pageLangLower && idx === 0;
|
|
104119
|
+
}
|
|
104120
|
+
function mapCountryLanguagesToMobileLocaleRows(_ref3) {
|
|
104121
|
+
var _country$languages, _country$currency, _persistedSelection$l;
|
|
104122
|
+
var country = _ref3.country,
|
|
104123
|
+
region = _ref3.region,
|
|
104124
|
+
persistedSelection = _ref3.persistedSelection,
|
|
104125
|
+
effectivePageLocale = _ref3.effectivePageLocale;
|
|
104126
|
+
var languages = (_country$languages = country === null || country === void 0 ? void 0 : country.languages) !== null && _country$languages !== void 0 ? _country$languages : [];
|
|
104127
|
+
var currency = String((_country$currency = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency !== void 0 ? _country$currency : "").trim();
|
|
104128
|
+
var selLocaleIso = String((_persistedSelection$l = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.localeIso) !== null && _persistedSelection$l !== void 0 ? _persistedSelection$l : "").trim().toLowerCase();
|
|
104129
|
+
var _parseStackEntryLocal3 = parseStackEntryLocale(effectivePageLocale),
|
|
104130
|
+
pageLang = _parseStackEntryLocal3.languageCode;
|
|
104131
|
+
var pageLangLower = String(pageLang !== null && pageLang !== void 0 ? pageLang : "").trim().toLowerCase();
|
|
104132
|
+
return languages.map(function (lang, idx) {
|
|
104133
|
+
var _lang$locale_iso, _lang$locale_iso2, _ref4, _lang$uid;
|
|
104134
|
+
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();
|
|
104135
|
+
var label = currency ? "".concat(currency, " ").concat(langLabel) : langLabel;
|
|
104136
|
+
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();
|
|
104137
|
+
var selected = isMobileLocaleRowSelected({
|
|
104138
|
+
selLocaleIso: selLocaleIso,
|
|
104139
|
+
localeIso: localeIso,
|
|
104140
|
+
lang: lang,
|
|
104141
|
+
pageLangLower: pageLangLower,
|
|
104142
|
+
idx: idx
|
|
104143
|
+
});
|
|
104144
|
+
return {
|
|
104145
|
+
id: String((_ref4 = (_lang$uid = lang.uid) !== null && _lang$uid !== void 0 ? _lang$uid : getLocaleCode(lang)) !== null && _ref4 !== void 0 ? _ref4 : idx),
|
|
104146
|
+
label: label,
|
|
104147
|
+
currency: currency,
|
|
104148
|
+
languageLabel: langLabel,
|
|
104149
|
+
selected: selected,
|
|
104150
|
+
navigable: true,
|
|
104151
|
+
country: country,
|
|
104152
|
+
locale: lang,
|
|
104153
|
+
region: region
|
|
104154
|
+
};
|
|
104155
|
+
});
|
|
104156
|
+
}
|
|
104157
|
+
function buildMobileLocaleRows(_ref5) {
|
|
104158
|
+
var regions = _ref5.regions,
|
|
104159
|
+
persistedSelection = _ref5.persistedSelection,
|
|
104160
|
+
effectivePageLocale = _ref5.effectivePageLocale;
|
|
104161
|
+
var pairs = collectMarketsWithParentRegions(regions);
|
|
104162
|
+
if (!pairs.length) {
|
|
104163
|
+
return buildMobileLocaleFallbackRows(effectivePageLocale);
|
|
104164
|
+
}
|
|
104165
|
+
var _resolveCountryAndReg = resolveCountryAndRegionForMobileRows(pairs, persistedSelection, effectivePageLocale),
|
|
104166
|
+
country = _resolveCountryAndReg.country,
|
|
104167
|
+
region = _resolveCountryAndReg.region;
|
|
104168
|
+
return mapCountryLanguagesToMobileLocaleRows({
|
|
104169
|
+
country: country,
|
|
104170
|
+
region: region,
|
|
104171
|
+
persistedSelection: persistedSelection,
|
|
104172
|
+
effectivePageLocale: effectivePageLocale
|
|
104173
|
+
});
|
|
104174
|
+
}
|
|
103985
104175
|
function useRememberedMarketSelection() {
|
|
103986
104176
|
var _useState = (0,external_react_.useState)(false),
|
|
103987
104177
|
_useState2 = MarketSelector_slicedToArray(_useState, 2),
|
|
@@ -104032,7 +104222,7 @@ function useMarketSelectorModalController() {
|
|
|
104032
104222
|
_useState8 = MarketSelector_slicedToArray(_useState7, 2),
|
|
104033
104223
|
isVisible = _useState8[0],
|
|
104034
104224
|
setIsVisible = _useState8[1];
|
|
104035
|
-
var _useState9 = (0,external_react_.useState)(
|
|
104225
|
+
var _useState9 = (0,external_react_.useState)(getInitialMobileViewportMatches),
|
|
104036
104226
|
_useState0 = MarketSelector_slicedToArray(_useState9, 2),
|
|
104037
104227
|
isMobileViewport = _useState0[0],
|
|
104038
104228
|
setIsMobileViewport = _useState0[1];
|
|
@@ -104047,7 +104237,6 @@ function useMarketSelectorModalController() {
|
|
|
104047
104237
|
};
|
|
104048
104238
|
var openModal = function openModal() {
|
|
104049
104239
|
var _globalThis$window3;
|
|
104050
|
-
if (isMobileViewport) return;
|
|
104051
104240
|
if (closeTimerRef.current) {
|
|
104052
104241
|
clearTimeout(closeTimerRef.current);
|
|
104053
104242
|
closeTimerRef.current = null;
|
|
@@ -104114,92 +104303,48 @@ function useMarketSelectorModalController() {
|
|
|
104114
104303
|
closeModal: closeModal
|
|
104115
104304
|
};
|
|
104116
104305
|
}
|
|
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
|
-
})
|
|
104306
|
+
function renderTriggerInner(_ref6) {
|
|
104307
|
+
var _triggerDisplay$curre, _triggerDisplay$local;
|
|
104308
|
+
var triggerDisplay = _ref6.triggerDisplay,
|
|
104309
|
+
triggerPillCurrency = _ref6.triggerPillCurrency,
|
|
104310
|
+
triggerPillLanguage = _ref6.triggerPillLanguage,
|
|
104311
|
+
triggerPillShowSlash = _ref6.triggerPillShowSlash;
|
|
104312
|
+
if (!triggerDisplay) return null;
|
|
104313
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(TriggerPillInner, {
|
|
104314
|
+
children: [triggerPillCurrency ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$curre = triggerDisplay.currency$) !== null && _triggerDisplay$curre !== void 0 ? _triggerDisplay$curre : {}), {}, {
|
|
104315
|
+
children: triggerPillCurrency
|
|
104316
|
+
})) : null, triggerPillShowSlash ? /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPillSlash, {
|
|
104317
|
+
name: "slash",
|
|
104318
|
+
size: "small",
|
|
104319
|
+
"aria-hidden": true,
|
|
104320
|
+
colorOverride: "currentColor"
|
|
104321
|
+
}) : null, triggerPillLanguage ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", MarketSelector_objectSpread(MarketSelector_objectSpread({}, (_triggerDisplay$local = triggerDisplay.locales$) !== null && _triggerDisplay$local !== void 0 ? _triggerDisplay$local : {}), {}, {
|
|
104322
|
+
children: triggerPillLanguage
|
|
104323
|
+
})) : null]
|
|
104179
104324
|
});
|
|
104180
104325
|
}
|
|
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
|
-
|
|
104326
|
+
function renderMarketSelectorModalDesktop(_ref7) {
|
|
104327
|
+
var _marketSelectorDollar, _marketSelectorDollar2, _marketSelectorDollar3, _selector$regions;
|
|
104328
|
+
var isOpen = _ref7.isOpen,
|
|
104329
|
+
isVisible = _ref7.isVisible,
|
|
104330
|
+
closeModal = _ref7.closeModal,
|
|
104331
|
+
parent$ = _ref7.parent$,
|
|
104332
|
+
marketSelectorDollar = _ref7.marketSelectorDollar,
|
|
104333
|
+
text = _ref7.text,
|
|
104334
|
+
rememberSelection = _ref7.rememberSelection,
|
|
104335
|
+
rememberToggleSource = _ref7.rememberToggleSource,
|
|
104336
|
+
isRememberHovered = _ref7.isRememberHovered,
|
|
104337
|
+
setIsRememberHovered = _ref7.setIsRememberHovered,
|
|
104338
|
+
setRememberToggleSource = _ref7.setRememberToggleSource,
|
|
104339
|
+
setRememberSelection = _ref7.setRememberSelection,
|
|
104340
|
+
regions = _ref7.regions,
|
|
104341
|
+
emptyStateText = _ref7.emptyStateText,
|
|
104342
|
+
persistedSelection = _ref7.persistedSelection,
|
|
104343
|
+
persistedActiveTabId = _ref7.persistedActiveTabId,
|
|
104344
|
+
handleSelectionChange = _ref7.handleSelectionChange,
|
|
104345
|
+
selector = _ref7.selector,
|
|
104346
|
+
resolveLocalePath = _ref7.resolveLocalePath,
|
|
104347
|
+
logo = _ref7.logo;
|
|
104203
104348
|
if (!isOpen) return null;
|
|
104204
104349
|
return /*#__PURE__*/(0,jsx_runtime_.jsx)(Overlay, {
|
|
104205
104350
|
"data-state": isVisible ? "open" : "closing",
|
|
@@ -104222,17 +104367,22 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104222
104367
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(LogoWrap, {
|
|
104223
104368
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
104224
104369
|
"data-testid": "market-selector-logo",
|
|
104225
|
-
|
|
104370
|
+
logo: logo === null || logo === void 0 ? void 0 : logo.logo,
|
|
104371
|
+
logoAlt: logo === null || logo === void 0 ? void 0 : logo.logoAlt,
|
|
104372
|
+
href: logo === null || logo === void 0 ? void 0 : logo.href,
|
|
104373
|
+
showLogo: logo === null || logo === void 0 ? void 0 : logo.showLogo,
|
|
104374
|
+
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
104375
|
+
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
104226
104376
|
})
|
|
104227
104377
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104228
104378
|
id: "market-selector-modal-title"
|
|
104229
|
-
}, (
|
|
104379
|
+
}, (_marketSelectorDollar = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar !== void 0 ? _marketSelectorDollar : {}), {}, {
|
|
104230
104380
|
children: text.modalTitle
|
|
104231
104381
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelWrap, {
|
|
104232
104382
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelButton, {
|
|
104233
104383
|
label: text.cancelText,
|
|
104234
104384
|
onClick: closeModal,
|
|
104235
|
-
parent$: (
|
|
104385
|
+
parent$: (_marketSelectorDollar2 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.cancel_text) !== null && _marketSelectorDollar2 !== void 0 ? _marketSelectorDollar2 : {}
|
|
104236
104386
|
})
|
|
104237
104387
|
})]
|
|
104238
104388
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(TopControls, {
|
|
@@ -104261,7 +104411,7 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104261
104411
|
}
|
|
104262
104412
|
setRememberToggleSource("row");
|
|
104263
104413
|
}
|
|
104264
|
-
}, (
|
|
104414
|
+
}, (_marketSelectorDollar3 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.remember_region_text) !== null && _marketSelectorDollar3 !== void 0 ? _marketSelectorDollar3 : {}), {}, {
|
|
104265
104415
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(RememberCheckbox, {
|
|
104266
104416
|
id: "market-selector-remember-selection",
|
|
104267
104417
|
type: "checkbox",
|
|
@@ -104284,7 +104434,7 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104284
104434
|
"data-testid": "market-selector-remember-selection"
|
|
104285
104435
|
}), text.rememberSelectionText]
|
|
104286
104436
|
}))
|
|
104287
|
-
}),
|
|
104437
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(TabsRow, {
|
|
104288
104438
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CountryListSelector, {
|
|
104289
104439
|
className: "market-selector-tabs",
|
|
104290
104440
|
data: regions,
|
|
@@ -104294,24 +104444,345 @@ function renderMarketSelectorModal(_ref3) {
|
|
|
104294
104444
|
defaultActiveTabId: persistedActiveTabId,
|
|
104295
104445
|
onCountryNavigate: handleSelectionChange,
|
|
104296
104446
|
onLocaleNavigate: handleSelectionChange,
|
|
104297
|
-
tabListContainer$: selector === null || selector === void 0 || (_selector$
|
|
104447
|
+
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
104448
|
resolveLocalePath: resolveLocalePath
|
|
104299
104449
|
})
|
|
104300
|
-
})
|
|
104450
|
+
})]
|
|
104301
104451
|
})
|
|
104302
104452
|
})
|
|
104303
104453
|
})
|
|
104304
104454
|
}))
|
|
104305
104455
|
});
|
|
104306
104456
|
}
|
|
104307
|
-
function
|
|
104457
|
+
function renderMarketSelectorModalMobile(_ref8) {
|
|
104458
|
+
var _marketSelectorDollar4, _marketSelectorDollar5, _marketSelectorDollar6, _selector$regions2;
|
|
104459
|
+
var isOpen = _ref8.isOpen,
|
|
104460
|
+
isVisible = _ref8.isVisible,
|
|
104461
|
+
closeModal = _ref8.closeModal,
|
|
104462
|
+
parent$ = _ref8.parent$,
|
|
104463
|
+
marketSelectorDollar = _ref8.marketSelectorDollar,
|
|
104464
|
+
text = _ref8.text,
|
|
104465
|
+
rememberSelection = _ref8.rememberSelection,
|
|
104466
|
+
rememberToggleSource = _ref8.rememberToggleSource,
|
|
104467
|
+
isRememberHovered = _ref8.isRememberHovered,
|
|
104468
|
+
setIsRememberHovered = _ref8.setIsRememberHovered,
|
|
104469
|
+
setRememberToggleSource = _ref8.setRememberToggleSource,
|
|
104470
|
+
setRememberSelection = _ref8.setRememberSelection,
|
|
104471
|
+
regions = _ref8.regions,
|
|
104472
|
+
emptyStateText = _ref8.emptyStateText,
|
|
104473
|
+
persistedSelection = _ref8.persistedSelection,
|
|
104474
|
+
persistedActiveTabId = _ref8.persistedActiveTabId,
|
|
104475
|
+
handleSelectionChange = _ref8.handleSelectionChange,
|
|
104476
|
+
selector = _ref8.selector,
|
|
104477
|
+
resolveLocalePath = _ref8.resolveLocalePath,
|
|
104478
|
+
localeRows = _ref8.localeRows,
|
|
104479
|
+
mobileScrollContentRef = _ref8.mobileScrollContentRef,
|
|
104480
|
+
onMobileLocaleRowActivate = _ref8.onMobileLocaleRowActivate;
|
|
104481
|
+
if (!isOpen) return null;
|
|
104482
|
+
var doc = globalThis.document;
|
|
104483
|
+
var forwardTabsWheelToModalScroll = function forwardTabsWheelToModalScroll(event) {
|
|
104484
|
+
var container = mobileScrollContentRef.current;
|
|
104485
|
+
if (!container) return;
|
|
104486
|
+
var deltaY = event.deltaY;
|
|
104487
|
+
if (!deltaY) return;
|
|
104488
|
+
var atTop = container.scrollTop <= 0;
|
|
104489
|
+
var atBottom = container.scrollTop + container.clientHeight >= container.scrollHeight - 1;
|
|
104490
|
+
if (deltaY < 0 && atTop || deltaY > 0 && atBottom) return;
|
|
104491
|
+
container.scrollTop += deltaY;
|
|
104492
|
+
event.preventDefault();
|
|
104493
|
+
};
|
|
104494
|
+
var modalTree = /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileMarketFullScreenRoot, {
|
|
104495
|
+
"data-state": isVisible ? "open" : "closing",
|
|
104496
|
+
"data-testid": "market-selector-mobile-fullscreen",
|
|
104497
|
+
onClick: function onClick(event) {
|
|
104498
|
+
return event.stopPropagation();
|
|
104499
|
+
},
|
|
104500
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileMarketDialogInner, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104501
|
+
open: true,
|
|
104502
|
+
"aria-modal": "true",
|
|
104503
|
+
"aria-labelledby": "market-selector-modal-title",
|
|
104504
|
+
id: "market-selector-modal",
|
|
104505
|
+
onClick: function onClick(event) {
|
|
104506
|
+
return event.stopPropagation();
|
|
104507
|
+
}
|
|
104508
|
+
}, parent$ !== null && parent$ !== void 0 ? parent$ : {}), {}, {
|
|
104509
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileStickyHeaderContainer, {
|
|
104510
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileCompactHeaderRow, {
|
|
104511
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileCompactTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104512
|
+
id: "market-selector-modal-title"
|
|
104513
|
+
}, (_marketSelectorDollar4 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar4 !== void 0 ? _marketSelectorDollar4 : {}), {}, {
|
|
104514
|
+
children: text.modalTitle
|
|
104515
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileModalHeaderCancelWrap, {
|
|
104516
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CancelButton, {
|
|
104517
|
+
className: "market-selector-mobile-header-cancel",
|
|
104518
|
+
label: text.cancelText,
|
|
104519
|
+
onClick: closeModal,
|
|
104520
|
+
parent$: (_marketSelectorDollar5 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.cancel_text) !== null && _marketSelectorDollar5 !== void 0 ? _marketSelectorDollar5 : {}
|
|
104521
|
+
})
|
|
104522
|
+
})]
|
|
104523
|
+
})
|
|
104524
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileModalScrollContent, {
|
|
104525
|
+
ref: mobileScrollContentRef,
|
|
104526
|
+
"data-testid": "market-selector-mobile-scroll-content",
|
|
104527
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRememberControlsWrap, {
|
|
104528
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRememberControls, {
|
|
104529
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileRememberRowCompact, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104530
|
+
htmlFor: "market-selector-remember-selection",
|
|
104531
|
+
"data-checked": rememberSelection ? "true" : "false",
|
|
104532
|
+
"data-toggle-source": rememberToggleSource,
|
|
104533
|
+
"data-hovered": isRememberHovered ? "true" : "false",
|
|
104534
|
+
onMouseEnter: function onMouseEnter() {
|
|
104535
|
+
return setIsRememberHovered(true);
|
|
104536
|
+
},
|
|
104537
|
+
onMouseLeave: function onMouseLeave() {
|
|
104538
|
+
return setIsRememberHovered(false);
|
|
104539
|
+
},
|
|
104540
|
+
onMouseDown: function onMouseDown(event) {
|
|
104541
|
+
var _event$target3;
|
|
104542
|
+
if (((_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.id) === "market-selector-remember-selection") {
|
|
104543
|
+
return;
|
|
104544
|
+
}
|
|
104545
|
+
setRememberToggleSource("row");
|
|
104546
|
+
},
|
|
104547
|
+
onClick: function onClick(event) {
|
|
104548
|
+
var _event$target4;
|
|
104549
|
+
if (((_event$target4 = event.target) === null || _event$target4 === void 0 ? void 0 : _event$target4.id) === "market-selector-remember-selection") {
|
|
104550
|
+
return;
|
|
104551
|
+
}
|
|
104552
|
+
setRememberToggleSource("row");
|
|
104553
|
+
}
|
|
104554
|
+
}, (_marketSelectorDollar6 = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.remember_region_text) !== null && _marketSelectorDollar6 !== void 0 ? _marketSelectorDollar6 : {}), {}, {
|
|
104555
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(RememberCheckbox, {
|
|
104556
|
+
id: "market-selector-remember-selection",
|
|
104557
|
+
type: "checkbox",
|
|
104558
|
+
checked: rememberSelection,
|
|
104559
|
+
onMouseDown: function onMouseDown(event) {
|
|
104560
|
+
event.stopPropagation();
|
|
104561
|
+
setRememberToggleSource("checkbox");
|
|
104562
|
+
},
|
|
104563
|
+
onChange: function onChange(event) {
|
|
104564
|
+
setRememberSelection(event.currentTarget.checked);
|
|
104565
|
+
},
|
|
104566
|
+
onKeyDown: function onKeyDown(event) {
|
|
104567
|
+
if (event.key !== "Enter") return;
|
|
104568
|
+
event.preventDefault();
|
|
104569
|
+
setRememberToggleSource("checkbox");
|
|
104570
|
+
setRememberSelection(function (prev) {
|
|
104571
|
+
return !prev;
|
|
104572
|
+
});
|
|
104573
|
+
},
|
|
104574
|
+
"data-testid": "market-selector-remember-selection"
|
|
104575
|
+
}), text.rememberSelectionText]
|
|
104576
|
+
}))
|
|
104577
|
+
})
|
|
104578
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileModalBody, {
|
|
104579
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleSectionBlock, {
|
|
104580
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleList, {
|
|
104581
|
+
"data-testid": "market-selector-locale-list",
|
|
104582
|
+
children: localeRows.map(function (row) {
|
|
104583
|
+
var _row$currency, _ref9, _row$languageLabel;
|
|
104584
|
+
var showIcon = row.selected;
|
|
104585
|
+
var rowCurrency = String((_row$currency = row.currency) !== null && _row$currency !== void 0 ? _row$currency : "").trim();
|
|
104586
|
+
var rowLanguage = String((_ref9 = (_row$languageLabel = row.languageLabel) !== null && _row$languageLabel !== void 0 ? _row$languageLabel : row.label) !== null && _ref9 !== void 0 ? _ref9 : "").trim();
|
|
104587
|
+
var showSlash = rowCurrency !== "" && rowLanguage !== "";
|
|
104588
|
+
var labelAndIcon = /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104589
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileLocaleText, {
|
|
104590
|
+
$selected: row.selected,
|
|
104591
|
+
children: [rowCurrency ? /*#__PURE__*/(0,jsx_runtime_.jsx)("span", {
|
|
104592
|
+
children: rowCurrency
|
|
104593
|
+
}) : null, showSlash ? /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPillSlash, {
|
|
104594
|
+
name: "slash",
|
|
104595
|
+
size: "small",
|
|
104596
|
+
"aria-hidden": true,
|
|
104597
|
+
colorOverride: "currentColor"
|
|
104598
|
+
}) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)("span", {
|
|
104599
|
+
children: rowLanguage
|
|
104600
|
+
})]
|
|
104601
|
+
}), showIcon ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleStatusIcon, {
|
|
104602
|
+
"aria-hidden": true,
|
|
104603
|
+
name: "success",
|
|
104604
|
+
size: "medium",
|
|
104605
|
+
colorOverride: "#252525"
|
|
104606
|
+
}) : null]
|
|
104607
|
+
});
|
|
104608
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRow, {
|
|
104609
|
+
"data-selected": row.selected ? "true" : "false",
|
|
104610
|
+
children: row.navigable ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRowLink, {
|
|
104611
|
+
href: buildLocalePath({
|
|
104612
|
+
country: row.country,
|
|
104613
|
+
locale: row.locale
|
|
104614
|
+
}),
|
|
104615
|
+
onClick: function onClick(event) {
|
|
104616
|
+
onMobileLocaleRowActivate(event, row);
|
|
104617
|
+
},
|
|
104618
|
+
"data-testid": "market-selector-mobile-locale-".concat(row.id),
|
|
104619
|
+
children: labelAndIcon
|
|
104620
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileLocaleRowMain, {
|
|
104621
|
+
children: labelAndIcon
|
|
104622
|
+
})
|
|
104623
|
+
}, row.id);
|
|
104624
|
+
})
|
|
104625
|
+
})
|
|
104626
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileRegionsSection, {
|
|
104627
|
+
"data-testid": "market-selector-mobile-regions",
|
|
104628
|
+
onWheel: forwardTabsWheelToModalScroll,
|
|
104629
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CountryListSelector, {
|
|
104630
|
+
className: "market-selector-mobile-regions-tabs",
|
|
104631
|
+
data: regions,
|
|
104632
|
+
emptyStateText: emptyStateText,
|
|
104633
|
+
selectedCountryId: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.countryUid,
|
|
104634
|
+
selectedLocaleCode: persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.localeIso,
|
|
104635
|
+
defaultActiveTabId: persistedActiveTabId,
|
|
104636
|
+
onCountryNavigate: handleSelectionChange,
|
|
104637
|
+
onLocaleNavigate: handleSelectionChange,
|
|
104638
|
+
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.$,
|
|
104639
|
+
resolveLocalePath: resolveLocalePath
|
|
104640
|
+
})
|
|
104641
|
+
})]
|
|
104642
|
+
})]
|
|
104643
|
+
})]
|
|
104644
|
+
}))
|
|
104645
|
+
});
|
|
104646
|
+
if (doc !== null && doc !== void 0 && doc.body) {
|
|
104647
|
+
return /*#__PURE__*/(0,external_react_dom_.createPortal)(modalTree, doc.body);
|
|
104648
|
+
}
|
|
104649
|
+
return modalTree;
|
|
104650
|
+
}
|
|
104651
|
+
function computeEffectivePageLocale(locale, selector) {
|
|
104652
|
+
var _selector$locale;
|
|
104653
|
+
var fromHeader = String(locale !== null && locale !== void 0 ? locale : "").trim();
|
|
104654
|
+
if (fromHeader) return fromHeader;
|
|
104655
|
+
return String((_selector$locale = selector === null || selector === void 0 ? void 0 : selector.locale) !== null && _selector$locale !== void 0 ? _selector$locale : "").trim();
|
|
104656
|
+
}
|
|
104657
|
+
function computePersistedActiveTabId(persistedSelection, tabs) {
|
|
104658
|
+
var _tabs$, _matched$id, _tabs$2;
|
|
104659
|
+
var regionUid = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionUid;
|
|
104660
|
+
if (!regionUid) return tabs === null || tabs === void 0 || (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id;
|
|
104661
|
+
var regionLabel = persistedSelection === null || persistedSelection === void 0 ? void 0 : persistedSelection.regionLabel;
|
|
104662
|
+
var preferredId = safeId("region", regionUid || regionLabel);
|
|
104663
|
+
var matched = tabs.find(function (tab) {
|
|
104664
|
+
return tab.id === preferredId;
|
|
104665
|
+
});
|
|
104666
|
+
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;
|
|
104667
|
+
}
|
|
104668
|
+
function resolveMarketSelectorEmptyStateText() {
|
|
104669
|
+
return isEditingMode() ? VB_EMPTY_STATE_TEXT : DEFAULT_EMPTY_STATE_TEXT;
|
|
104670
|
+
}
|
|
104671
|
+
function buildPersistedSelectionPayload(_ref0) {
|
|
104672
|
+
var _country$uid, _country$country_code, _country$currency2, _locale$uid, _locale$locale_iso, _region$uid, _region$region_title;
|
|
104673
|
+
var country = _ref0.country,
|
|
104674
|
+
locale = _ref0.locale,
|
|
104675
|
+
region = _ref0.region;
|
|
104676
|
+
return {
|
|
104677
|
+
countryUid: (_country$uid = country === null || country === void 0 ? void 0 : country.uid) !== null && _country$uid !== void 0 ? _country$uid : "",
|
|
104678
|
+
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(),
|
|
104679
|
+
currency: (_country$currency2 = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency2 !== void 0 ? _country$currency2 : "",
|
|
104680
|
+
localeUid: (_locale$uid = locale === null || locale === void 0 ? void 0 : locale.uid) !== null && _locale$uid !== void 0 ? _locale$uid : "",
|
|
104681
|
+
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(),
|
|
104682
|
+
localeLabel: getLanguageLabel(locale).trim(),
|
|
104683
|
+
regionUid: (_region$uid = region === null || region === void 0 ? void 0 : region.uid) !== null && _region$uid !== void 0 ? _region$uid : "",
|
|
104684
|
+
regionLabel: (_region$region_title = region === null || region === void 0 ? void 0 : region.region_title) !== null && _region$region_title !== void 0 ? _region$region_title : ""
|
|
104685
|
+
};
|
|
104686
|
+
}
|
|
104687
|
+
function buildSessionPillDisplayUpdate(country, locale) {
|
|
104688
|
+
var _locale$locale_iso2, _country$currency3;
|
|
104689
|
+
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();
|
|
104690
|
+
if (!languageLabel) return null;
|
|
104691
|
+
var currency = String((_country$currency3 = country === null || country === void 0 ? void 0 : country.currency) !== null && _country$currency3 !== void 0 ? _country$currency3 : "").trim();
|
|
104692
|
+
return MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104693
|
+
currency: currency,
|
|
104694
|
+
languageLabel: languageLabel
|
|
104695
|
+
}, country !== null && country !== void 0 && country.currency$ ? {
|
|
104696
|
+
currency$: country.currency$
|
|
104697
|
+
} : {}), locale !== null && locale !== void 0 && locale.locales$ ? {
|
|
104698
|
+
locales$: locale.locales$
|
|
104699
|
+
} : {});
|
|
104700
|
+
}
|
|
104701
|
+
function resolveMarketSelectorTriggerElement(_ref1) {
|
|
104702
|
+
var isMobileViewport = _ref1.isMobileViewport,
|
|
104703
|
+
drawerPortal = _ref1.drawerPortal,
|
|
104704
|
+
drawerOpen = _ref1.drawerOpen,
|
|
104705
|
+
drawerTriggerMountRef = _ref1.drawerTriggerMountRef,
|
|
104706
|
+
desktopTrigger = _ref1.desktopTrigger,
|
|
104707
|
+
mobileTrigger = _ref1.mobileTrigger;
|
|
104708
|
+
if (!isMobileViewport) {
|
|
104709
|
+
return desktopTrigger;
|
|
104710
|
+
}
|
|
104711
|
+
if (!drawerPortal) {
|
|
104712
|
+
return mobileTrigger;
|
|
104713
|
+
}
|
|
104714
|
+
var mount = drawerTriggerMountRef === null || drawerTriggerMountRef === void 0 ? void 0 : drawerTriggerMountRef.current;
|
|
104715
|
+
if (drawerOpen && mount) {
|
|
104716
|
+
return /*#__PURE__*/(0,external_react_dom_.createPortal)(mobileTrigger, mount);
|
|
104717
|
+
}
|
|
104718
|
+
return null;
|
|
104719
|
+
}
|
|
104720
|
+
function shouldForceDrawerTriggerRemount(drawerPortal, isMobileViewport, wasOpen, nowOpen) {
|
|
104721
|
+
return drawerPortal && isMobileViewport && nowOpen && !wasOpen;
|
|
104722
|
+
}
|
|
104723
|
+
function runMobileLocaleRowNavigation(_x) {
|
|
104724
|
+
return _runMobileLocaleRowNavigation.apply(this, arguments);
|
|
104725
|
+
}
|
|
104726
|
+
function _runMobileLocaleRowNavigation() {
|
|
104727
|
+
_runMobileLocaleRowNavigation = MarketSelector_asyncToGenerator(/*#__PURE__*/MarketSelector_regenerator().m(function _callee2(_ref10) {
|
|
104728
|
+
var event, row, applySelection, resolveLocalePath, resolved, _t;
|
|
104729
|
+
return MarketSelector_regenerator().w(function (_context2) {
|
|
104730
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
104731
|
+
case 0:
|
|
104732
|
+
event = _ref10.event, row = _ref10.row, applySelection = _ref10.applySelection, resolveLocalePath = _ref10.resolveLocalePath;
|
|
104733
|
+
if (!(!(row !== null && row !== void 0 && row.navigable) || !row.country || !row.locale)) {
|
|
104734
|
+
_context2.n = 1;
|
|
104735
|
+
break;
|
|
104736
|
+
}
|
|
104737
|
+
return _context2.a(2);
|
|
104738
|
+
case 1:
|
|
104739
|
+
event.preventDefault();
|
|
104740
|
+
applySelection({
|
|
104741
|
+
country: row.country,
|
|
104742
|
+
locale: row.locale,
|
|
104743
|
+
region: row.region
|
|
104744
|
+
});
|
|
104745
|
+
_context2.p = 2;
|
|
104746
|
+
_context2.n = 3;
|
|
104747
|
+
return resolveLocalePath({
|
|
104748
|
+
country: row.country,
|
|
104749
|
+
locale: row.locale
|
|
104750
|
+
});
|
|
104751
|
+
case 3:
|
|
104752
|
+
resolved = _context2.v;
|
|
104753
|
+
marketSelectorWindow_navigateToPath(resolved);
|
|
104754
|
+
_context2.n = 5;
|
|
104755
|
+
break;
|
|
104756
|
+
case 4:
|
|
104757
|
+
_context2.p = 4;
|
|
104758
|
+
_t = _context2.v;
|
|
104759
|
+
marketSelectorWindow_navigateToPath(buildLocalePath({
|
|
104760
|
+
country: row.country,
|
|
104761
|
+
locale: row.locale
|
|
104762
|
+
}));
|
|
104763
|
+
case 5:
|
|
104764
|
+
return _context2.a(2);
|
|
104765
|
+
}
|
|
104766
|
+
}, _callee2, null, [[2, 4]]);
|
|
104767
|
+
}));
|
|
104768
|
+
return _runMobileLocaleRowNavigation.apply(this, arguments);
|
|
104769
|
+
}
|
|
104770
|
+
function MarketSelector(_ref11) {
|
|
104308
104771
|
var _triggerDisplay$curre2, _triggerDisplay$langu;
|
|
104309
|
-
var data =
|
|
104310
|
-
|
|
104311
|
-
parent$ =
|
|
104312
|
-
|
|
104313
|
-
locale =
|
|
104772
|
+
var data = _ref11.data,
|
|
104773
|
+
logo = _ref11.logo,
|
|
104774
|
+
_ref11$parent$ = _ref11.parent$,
|
|
104775
|
+
parent$ = _ref11$parent$ === void 0 ? {} : _ref11$parent$,
|
|
104776
|
+
_ref11$locale = _ref11.locale,
|
|
104777
|
+
locale = _ref11$locale === void 0 ? "" : _ref11$locale,
|
|
104778
|
+
_ref11$drawerOpen = _ref11.drawerOpen,
|
|
104779
|
+
drawerOpen = _ref11$drawerOpen === void 0 ? false : _ref11$drawerOpen,
|
|
104780
|
+
_ref11$drawerTriggerM = _ref11.drawerTriggerMountRef,
|
|
104781
|
+
drawerTriggerMountRef = _ref11$drawerTriggerM === void 0 ? null : _ref11$drawerTriggerM,
|
|
104782
|
+
_ref11$mobileTriggerM = _ref11.mobileTriggerMode,
|
|
104783
|
+
mobileTriggerMode = _ref11$mobileTriggerM === void 0 ? "inline" : _ref11$mobileTriggerM;
|
|
104314
104784
|
var selector = resolveMarketSelectorEntry(data);
|
|
104785
|
+
var marketSelectorDollar = resolveMarketSelectorDollarFields(data);
|
|
104315
104786
|
var showSelector = (selector === null || selector === void 0 ? void 0 : selector.show) !== false;
|
|
104316
104787
|
var _useRememberedMarketS = useRememberedMarketSelection(),
|
|
104317
104788
|
rememberSelection = _useRememberedMarketS.rememberSelection,
|
|
@@ -104324,6 +104795,13 @@ function MarketSelector(_ref4) {
|
|
|
104324
104795
|
isMobileViewport = _useMarketSelectorMod.isMobileViewport,
|
|
104325
104796
|
openModal = _useMarketSelectorMod.openModal,
|
|
104326
104797
|
closeModal = _useMarketSelectorMod.closeModal;
|
|
104798
|
+
var _useReducer = (0,external_react_.useReducer)(function (n) {
|
|
104799
|
+
return n + 1;
|
|
104800
|
+
}, 0),
|
|
104801
|
+
_useReducer2 = MarketSelector_slicedToArray(_useReducer, 2),
|
|
104802
|
+
forceDrawerTriggerRemount = _useReducer2[1];
|
|
104803
|
+
var prevDrawerOpenRef = (0,external_react_.useRef)(false);
|
|
104804
|
+
var mobileScrollContentRef = (0,external_react_.useRef)(null);
|
|
104327
104805
|
/** In-session pill only (modal pick). Never hydrated from localStorage — pill prefers header `locale` until user picks. */
|
|
104328
104806
|
var _useState1 = (0,external_react_.useState)(null),
|
|
104329
104807
|
_useState10 = MarketSelector_slicedToArray(_useState1, 2),
|
|
@@ -104339,26 +104817,39 @@ function MarketSelector(_ref4) {
|
|
|
104339
104817
|
setIsRememberHovered = _useState14[1];
|
|
104340
104818
|
var text = (0,external_react_.useMemo)(function () {
|
|
104341
104819
|
return resolveMarketSelectorText(selector);
|
|
104342
|
-
}, [selector]);
|
|
104820
|
+
}, [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
104821
|
var regions = (0,external_react_.useMemo)(function () {
|
|
104344
104822
|
return normalizeRegionsForTabs(data, selector);
|
|
104345
104823
|
}, [data, selector]);
|
|
104346
104824
|
var tabs = (0,external_react_.useMemo)(function () {
|
|
104347
104825
|
return buildMarketSelectorTabs(regions);
|
|
104348
104826
|
}, [regions]);
|
|
104349
|
-
var emptyStateText =
|
|
104827
|
+
var emptyStateText = resolveMarketSelectorEmptyStateText();
|
|
104350
104828
|
var marketSelectorService = (0,external_react_.useMemo)(function () {
|
|
104351
104829
|
return createHeaderMarketSelectorService();
|
|
104352
104830
|
}, []);
|
|
104353
104831
|
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();
|
|
104832
|
+
return computeEffectivePageLocale(locale, selector);
|
|
104358
104833
|
}, [locale, selector === null || selector === void 0 ? void 0 : selector.locale]);
|
|
104834
|
+
var localeRows = (0,external_react_.useMemo)(function () {
|
|
104835
|
+
return buildMobileLocaleRows({
|
|
104836
|
+
regions: regions,
|
|
104837
|
+
persistedSelection: persistedSelection,
|
|
104838
|
+
effectivePageLocale: effectivePageLocale
|
|
104839
|
+
});
|
|
104840
|
+
}, [regions, persistedSelection, effectivePageLocale]);
|
|
104359
104841
|
(0,external_react_.useEffect)(function () {
|
|
104360
104842
|
setSessionPillDisplay(null);
|
|
104361
104843
|
}, [effectivePageLocale]);
|
|
104844
|
+
var drawerPortal = mobileTriggerMode === "drawerPortal";
|
|
104845
|
+
(0,external_react_.useLayoutEffect)(function () {
|
|
104846
|
+
var wasOpen = prevDrawerOpenRef.current;
|
|
104847
|
+
var nowOpen = drawerOpen;
|
|
104848
|
+
prevDrawerOpenRef.current = nowOpen;
|
|
104849
|
+
if (shouldForceDrawerTriggerRemount(drawerPortal, isMobileViewport, wasOpen, nowOpen)) {
|
|
104850
|
+
forceDrawerTriggerRemount();
|
|
104851
|
+
}
|
|
104852
|
+
}, [drawerPortal, drawerOpen, isMobileViewport, drawerTriggerMountRef]);
|
|
104362
104853
|
var triggerDisplay = (0,external_react_.useMemo)(function () {
|
|
104363
104854
|
return computeTriggerDisplay({
|
|
104364
104855
|
sessionPillDisplay: sessionPillDisplay,
|
|
@@ -104367,51 +104858,27 @@ function MarketSelector(_ref4) {
|
|
|
104367
104858
|
});
|
|
104368
104859
|
}, [sessionPillDisplay, regions, effectivePageLocale]);
|
|
104369
104860
|
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;
|
|
104861
|
+
return computePersistedActiveTabId(persistedSelection, tabs);
|
|
104379
104862
|
}, [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
|
-
});
|
|
104863
|
+
var handleSelectionChange = function handleSelectionChange(_ref12) {
|
|
104864
|
+
var country = _ref12.country,
|
|
104865
|
+
locale = _ref12.locale,
|
|
104866
|
+
region = _ref12.region;
|
|
104867
|
+
var pill = buildSessionPillDisplayUpdate(country, locale);
|
|
104868
|
+
if (pill) setSessionPillDisplay(pill);
|
|
104869
|
+
setPersistedSelection(buildPersistedSelectionPayload({
|
|
104870
|
+
country: country,
|
|
104871
|
+
locale: locale,
|
|
104872
|
+
region: region
|
|
104873
|
+
}));
|
|
104407
104874
|
};
|
|
104408
104875
|
var resolveLocalePath = /*#__PURE__*/function () {
|
|
104409
|
-
var
|
|
104876
|
+
var _ref14 = MarketSelector_asyncToGenerator(/*#__PURE__*/MarketSelector_regenerator().m(function _callee(_ref13) {
|
|
104410
104877
|
var country, selectedLocale;
|
|
104411
104878
|
return MarketSelector_regenerator().w(function (_context) {
|
|
104412
104879
|
while (1) switch (_context.n) {
|
|
104413
104880
|
case 0:
|
|
104414
|
-
country =
|
|
104881
|
+
country = _ref13.country, selectedLocale = _ref13.locale;
|
|
104415
104882
|
_context.n = 1;
|
|
104416
104883
|
return marketSelectorService.resolveRedirectUrl({
|
|
104417
104884
|
country: country,
|
|
@@ -104423,64 +104890,113 @@ function MarketSelector(_ref4) {
|
|
|
104423
104890
|
}
|
|
104424
104891
|
}, _callee);
|
|
104425
104892
|
}));
|
|
104426
|
-
return function resolveLocalePath(
|
|
104427
|
-
return
|
|
104893
|
+
return function resolveLocalePath(_x2) {
|
|
104894
|
+
return _ref14.apply(this, arguments);
|
|
104428
104895
|
};
|
|
104429
104896
|
}();
|
|
104897
|
+
var handleMobileLocaleRowActivate = function handleMobileLocaleRowActivate(event, row) {
|
|
104898
|
+
return runMobileLocaleRowNavigation({
|
|
104899
|
+
event: event,
|
|
104900
|
+
row: row,
|
|
104901
|
+
applySelection: handleSelectionChange,
|
|
104902
|
+
resolveLocalePath: resolveLocalePath
|
|
104903
|
+
});
|
|
104904
|
+
};
|
|
104430
104905
|
if (!showSelector) return null;
|
|
104431
104906
|
var triggerPillCurrency = triggerDisplay ? String((_triggerDisplay$curre2 = triggerDisplay.currency) !== null && _triggerDisplay$curre2 !== void 0 ? _triggerDisplay$curre2 : "").trim() : "";
|
|
104432
104907
|
var triggerPillLanguage = triggerDisplay ? String((_triggerDisplay$langu = triggerDisplay.languageLabel) !== null && _triggerDisplay$langu !== void 0 ? _triggerDisplay$langu : "").trim() : "";
|
|
104433
104908
|
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
|
|
104909
|
+
var triggerInner = renderTriggerInner({
|
|
104910
|
+
triggerDisplay: triggerDisplay,
|
|
104911
|
+
triggerPillCurrency: triggerPillCurrency,
|
|
104912
|
+
triggerPillLanguage: triggerPillLanguage,
|
|
104913
|
+
triggerPillShowSlash: triggerPillShowSlash
|
|
104914
|
+
});
|
|
104915
|
+
var triggerButtonShared = {
|
|
104916
|
+
type: "button",
|
|
104917
|
+
"aria-haspopup": "dialog",
|
|
104918
|
+
"aria-expanded": isVisible,
|
|
104919
|
+
"aria-controls": "market-selector-modal",
|
|
104920
|
+
onClick: openModal,
|
|
104921
|
+
"data-testid": "market-selector-trigger"
|
|
104922
|
+
};
|
|
104923
|
+
var desktopTrigger = /*#__PURE__*/(0,jsx_runtime_.jsx)(TriggerPill, MarketSelector_objectSpread(MarketSelector_objectSpread({}, triggerButtonShared), {}, {
|
|
104924
|
+
children: triggerInner
|
|
104925
|
+
}));
|
|
104926
|
+
var mobileTrigger = /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileDrawerTriggerPill, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
104927
|
+
"data-trigger-mode": drawerPortal ? "drawerPortal" : "inline"
|
|
104928
|
+
}, triggerButtonShared), {}, {
|
|
104929
|
+
children: [triggerInner, /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104930
|
+
name: "chevronRight",
|
|
104931
|
+
size: "medium",
|
|
104932
|
+
colorOverride: "currentColor",
|
|
104933
|
+
"aria-hidden": true
|
|
104471
104934
|
})]
|
|
104935
|
+
}));
|
|
104936
|
+
var triggerElement = resolveMarketSelectorTriggerElement({
|
|
104937
|
+
isMobileViewport: isMobileViewport,
|
|
104938
|
+
drawerPortal: drawerPortal,
|
|
104939
|
+
drawerOpen: drawerOpen,
|
|
104940
|
+
drawerTriggerMountRef: drawerTriggerMountRef,
|
|
104941
|
+
desktopTrigger: desktopTrigger,
|
|
104942
|
+
mobileTrigger: mobileTrigger
|
|
104943
|
+
});
|
|
104944
|
+
var modalShared = {
|
|
104945
|
+
isOpen: isOpen,
|
|
104946
|
+
isVisible: isVisible,
|
|
104947
|
+
closeModal: closeModal,
|
|
104948
|
+
parent$: parent$,
|
|
104949
|
+
marketSelectorDollar: marketSelectorDollar,
|
|
104950
|
+
text: text,
|
|
104951
|
+
rememberSelection: rememberSelection,
|
|
104952
|
+
rememberToggleSource: rememberToggleSource,
|
|
104953
|
+
isRememberHovered: isRememberHovered,
|
|
104954
|
+
setIsRememberHovered: setIsRememberHovered,
|
|
104955
|
+
setRememberToggleSource: setRememberToggleSource,
|
|
104956
|
+
setRememberSelection: setRememberSelection,
|
|
104957
|
+
regions: regions,
|
|
104958
|
+
emptyStateText: emptyStateText,
|
|
104959
|
+
persistedSelection: persistedSelection,
|
|
104960
|
+
persistedActiveTabId: persistedActiveTabId,
|
|
104961
|
+
handleSelectionChange: handleSelectionChange,
|
|
104962
|
+
selector: selector,
|
|
104963
|
+
resolveLocalePath: resolveLocalePath,
|
|
104964
|
+
onMobileLocaleRowActivate: handleMobileLocaleRowActivate
|
|
104965
|
+
};
|
|
104966
|
+
var modalElement = isMobileViewport ? renderMarketSelectorModalMobile(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
|
|
104967
|
+
localeRows: localeRows,
|
|
104968
|
+
mobileScrollContentRef: mobileScrollContentRef
|
|
104969
|
+
})) : renderMarketSelectorModalDesktop(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
|
|
104970
|
+
logo: logo
|
|
104971
|
+
}));
|
|
104972
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(MarketSelectorRoot, {
|
|
104973
|
+
"data-drawer-portal-host": drawerPortal && isMobileViewport ? "true" : undefined,
|
|
104974
|
+
children: [triggerElement, modalElement]
|
|
104472
104975
|
});
|
|
104473
104976
|
}
|
|
104474
104977
|
MarketSelector.propTypes = {
|
|
104475
104978
|
locale: (external_prop_types_default()).string,
|
|
104476
104979
|
parent$: (external_prop_types_default()).object,
|
|
104980
|
+
drawerOpen: (external_prop_types_default()).bool,
|
|
104981
|
+
drawerTriggerMountRef: external_prop_types_default().shape({
|
|
104982
|
+
current: (external_prop_types_default()).any
|
|
104983
|
+
}),
|
|
104984
|
+
mobileTriggerMode: external_prop_types_default().oneOf(["inline", "drawerPortal"]),
|
|
104477
104985
|
data: external_prop_types_default().oneOfType([external_prop_types_default().shape({
|
|
104478
104986
|
show: (external_prop_types_default()).bool,
|
|
104479
104987
|
select_your_market_language_text: (external_prop_types_default()).string,
|
|
104480
104988
|
remember_region_text: (external_prop_types_default()).string,
|
|
104481
104989
|
cancel_text: (external_prop_types_default()).string,
|
|
104482
104990
|
regions: external_prop_types_default().arrayOf((external_prop_types_default()).object)
|
|
104483
|
-
}), external_prop_types_default().arrayOf((external_prop_types_default()).object)])
|
|
104991
|
+
}), external_prop_types_default().arrayOf((external_prop_types_default()).object)]),
|
|
104992
|
+
logo: external_prop_types_default().shape({
|
|
104993
|
+
logo: (external_prop_types_default()).string,
|
|
104994
|
+
logoAlt: (external_prop_types_default()).string,
|
|
104995
|
+
href: (external_prop_types_default()).string,
|
|
104996
|
+
showLogo: (external_prop_types_default()).bool,
|
|
104997
|
+
size: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
|
|
104998
|
+
$: (external_prop_types_default()).object
|
|
104999
|
+
})
|
|
104484
105000
|
};
|
|
104485
105001
|
;// ./src/components/header/HeaderView.jsx
|
|
104486
105002
|
function HeaderView_slicedToArray(r, e) { return HeaderView_arrayWithHoles(r) || HeaderView_iterableToArrayLimit(r, e) || HeaderView_unsupportedIterableToArray(r, e) || HeaderView_nonIterableRest(); }
|
|
@@ -104512,6 +105028,14 @@ var DEFAULT_LOGO = {
|
|
|
104512
105028
|
var DEFAULT_LOCALE = {
|
|
104513
105029
|
control_label: "USD | English"
|
|
104514
105030
|
};
|
|
105031
|
+
var DEFAULT_MARKET_SELECTOR = {
|
|
105032
|
+
show: true,
|
|
105033
|
+
regions: [],
|
|
105034
|
+
select_your_market_language_text: "Select Your Market/Language",
|
|
105035
|
+
remember_region_text: "Remember My Selection",
|
|
105036
|
+
cancel_text: "Cancel",
|
|
105037
|
+
control_label: DEFAULT_LOCALE.control_label
|
|
105038
|
+
};
|
|
104515
105039
|
var DEFAULT_LOYALTY = {
|
|
104516
105040
|
link_label: "Nu Skin Rewards",
|
|
104517
105041
|
href: "/rewards"
|
|
@@ -104580,7 +105104,7 @@ var DEFAULT_TOP_RIBBON_LINKS = [{
|
|
|
104580
105104
|
ariaLabel: "Shop Gifts"
|
|
104581
105105
|
}];
|
|
104582
105106
|
function HeaderView(_ref) {
|
|
104583
|
-
var _headerEntry$logo, _headerEntry$locale_s, _headerEntry$
|
|
105107
|
+
var _headerEntry$logo, _headerEntry$locale_s, _headerEntry$utility_, _headerEntry$utility_2, _headerEntry$account, _headerEntry$cart, _headerEntry$search, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _ref2, _headerEntry$locale, _headerEntry$$;
|
|
104584
105108
|
var country = _ref.country,
|
|
104585
105109
|
language = _ref.language,
|
|
104586
105110
|
locale = _ref.locale,
|
|
@@ -104589,15 +105113,18 @@ function HeaderView(_ref) {
|
|
|
104589
105113
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
104590
105114
|
isMobileMenuOpen = _useState2[0],
|
|
104591
105115
|
setIsMobileMenuOpen = _useState2[1];
|
|
105116
|
+
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
104592
105117
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
104593
105118
|
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
|
-
var loyaltyData = (_headerEntry$
|
|
105119
|
+
var loyaltyData = (_headerEntry$utility_ = headerEntry === null || headerEntry === void 0 || (_headerEntry$utility_2 = headerEntry.utility_links) === null || _headerEntry$utility_2 === void 0 || (_headerEntry$utility_2 = _headerEntry$utility_2.find(function (link) {
|
|
105120
|
+
return link === null || link === void 0 ? void 0 : link.loyalty_menu;
|
|
105121
|
+
})) === null || _headerEntry$utility_2 === void 0 || (_headerEntry$utility_2 = _headerEntry$utility_2.loyalty_menu) === null || _headerEntry$utility_2 === void 0 ? void 0 : _headerEntry$utility_2[0]) !== null && _headerEntry$utility_ !== void 0 ? _headerEntry$utility_ : DEFAULT_LOYALTY;
|
|
104595
105122
|
var accountData = (_headerEntry$account = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account) !== null && _headerEntry$account !== void 0 ? _headerEntry$account : DEFAULT_ACCOUNT;
|
|
104596
105123
|
var cartData = (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART;
|
|
104597
105124
|
var searchData = (_headerEntry$search = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.search) !== null && _headerEntry$search !== void 0 ? _headerEntry$search : DEFAULT_SEARCH;
|
|
104598
105125
|
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
105126
|
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 :
|
|
105127
|
+
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
105128
|
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(HeaderRoot, {
|
|
104602
105129
|
"data-testid": "header-view",
|
|
104603
105130
|
"data-country": country,
|
|
@@ -104638,8 +105165,12 @@ function HeaderView(_ref) {
|
|
|
104638
105165
|
"data-region": "utility-bar",
|
|
104639
105166
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
104640
105167
|
data: marketSelector,
|
|
105168
|
+
logo: logoData,
|
|
104641
105169
|
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
|
|
105170
|
+
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.market_selector__0,
|
|
105171
|
+
mobileTriggerMode: "drawerPortal",
|
|
105172
|
+
drawerOpen: isMobileMenuOpen,
|
|
105173
|
+
drawerTriggerMountRef: mobileMarketTriggerMountRef
|
|
104643
105174
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
104644
105175
|
data: loyaltyData
|
|
104645
105176
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
@@ -104665,7 +105196,8 @@ function HeaderView(_ref) {
|
|
|
104665
105196
|
logoData: logoData,
|
|
104666
105197
|
localeData: localeData,
|
|
104667
105198
|
navigationData: navigationData,
|
|
104668
|
-
loyaltyData: loyaltyData
|
|
105199
|
+
loyaltyData: loyaltyData,
|
|
105200
|
+
marketTriggerMountRef: mobileMarketTriggerMountRef
|
|
104669
105201
|
})]
|
|
104670
105202
|
});
|
|
104671
105203
|
}
|