@nuskin/nextgen-header 1.26.0 → 1.28.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 +562 -92
- package/package-dist/index.js.map +1 -1
- package/package.json +1 -5
package/package-dist/index.js
CHANGED
|
@@ -100849,12 +100849,9 @@ var live_preview_utils_default = /*#__PURE__*/__webpack_require__.n(live_preview
|
|
|
100849
100849
|
;// external "@contentstack/utils"
|
|
100850
100850
|
const utils_namespaceObject = require("@contentstack/utils");
|
|
100851
100851
|
;// ./src/utils/constants.js
|
|
100852
|
-
|
|
100853
|
-
|
|
100854
|
-
|
|
100855
|
-
*/
|
|
100856
|
-
var HEADER_CONTENT_ENTRY_UID = process.env.HEADER_CONTENT_ENTRY_UID || "global_header";
|
|
100857
|
-
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", "product_search", "product_search", "market_selector.regions.markets.languages", "product_search"]));
|
|
100852
|
+
var HEADER_CONTENT_ENTRY_UID = "global_header";
|
|
100853
|
+
var HEADER_ENTRY_URL = "/vb-header/root-header";
|
|
100854
|
+
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", "market_selector.regions.markets.languages", "utility_links.sign_up_sign_in_component", "product_search"]));
|
|
100858
100855
|
var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
|
|
100859
100856
|
var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
|
|
100860
100857
|
var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
|
|
@@ -101245,7 +101242,7 @@ function IconChevronDown(props) {
|
|
|
101245
101242
|
}));
|
|
101246
101243
|
}
|
|
101247
101244
|
function IconUser(props) {
|
|
101248
|
-
return /*#__PURE__*/(
|
|
101245
|
+
return /*#__PURE__*/_jsx("svg", HeaderIcons_objectSpread(HeaderIcons_objectSpread({
|
|
101249
101246
|
width: "18",
|
|
101250
101247
|
height: "18",
|
|
101251
101248
|
viewBox: "0 0 24 24",
|
|
@@ -101253,7 +101250,7 @@ function IconUser(props) {
|
|
|
101253
101250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
101254
101251
|
"aria-hidden": true
|
|
101255
101252
|
}, props), {}, {
|
|
101256
|
-
children: /*#__PURE__*/(
|
|
101253
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
101257
101254
|
d: "M12 12a4 4 0 100-8 4 4 0 000 8zM4 20a8 8 0 0116 0",
|
|
101258
101255
|
stroke: "currentColor",
|
|
101259
101256
|
strokeWidth: "2",
|
|
@@ -101381,30 +101378,6 @@ MobileHeaderDrawer.propTypes = {
|
|
|
101381
101378
|
current: (external_prop_types_default()).any
|
|
101382
101379
|
})
|
|
101383
101380
|
};
|
|
101384
|
-
;// ./src/components/header/regions/HeaderLogoRegion.jsx
|
|
101385
|
-
|
|
101386
|
-
|
|
101387
|
-
|
|
101388
|
-
|
|
101389
|
-
function HeaderLogoRegion(_ref) {
|
|
101390
|
-
var _data$aria_label;
|
|
101391
|
-
var data = _ref.data;
|
|
101392
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)("div", {
|
|
101393
|
-
"data-region": "logo",
|
|
101394
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(WordmarkButton, {
|
|
101395
|
-
type: "button",
|
|
101396
|
-
"aria-label": (_data$aria_label = data.aria_label) !== null && _data$aria_label !== void 0 ? _data$aria_label : "Nu Skin home",
|
|
101397
|
-
children: data.wordmark
|
|
101398
|
-
})
|
|
101399
|
-
});
|
|
101400
|
-
}
|
|
101401
|
-
HeaderLogoRegion.propTypes = {
|
|
101402
|
-
data: external_prop_types_default().shape({
|
|
101403
|
-
wordmark: (external_prop_types_default()).string,
|
|
101404
|
-
home_href: (external_prop_types_default()).string,
|
|
101405
|
-
aria_label: (external_prop_types_default()).string
|
|
101406
|
-
})
|
|
101407
|
-
};
|
|
101408
101381
|
;// ./src/components/header/regions/HeaderLoyaltyRegion.jsx
|
|
101409
101382
|
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); }
|
|
101410
101383
|
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; }
|
|
@@ -101433,38 +101406,441 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
101433
101406
|
$: (external_prop_types_default()).object
|
|
101434
101407
|
}).isRequired
|
|
101435
101408
|
};
|
|
101436
|
-
;// ./src/components/
|
|
101409
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.styled.jsx
|
|
101410
|
+
|
|
101411
|
+
function SignUpOrSignIn_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)."; }
|
|
101412
|
+
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
101413
|
+
var SignUpOrSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
101414
|
+
target: "ehh9sxh17"
|
|
101415
|
+
} : 0)("--signin-text:#5f5f5f;--signin-hover-bg:#efefef;--signin-focus:#007bff;--signin-font:Lora,sans-serif;--signin-link-size:16px;--signin-link-weight:400;display:inline-flex;align-items:center;gap:0;border-radius:24px;padding:0;font-family:var(--signin-font);color:var(--signin-text);@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){height:31px;&:hover{background:var(--signin-hover-bg);}}.icon-container{line-height:1;font-size:0;}" + ( true ? "" : 0));
|
|
101416
|
+
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
101417
|
+
target: "ehh9sxh16"
|
|
101418
|
+
} : 0)("color:var(--signin-text);text-decoration:none;white-space:nowrap;cursor:pointer;font-size:16px;line-height:22px;@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){text-underline-offset:2px;text-decoration-thickness:1px;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}" + ( true ? "" : 0));
|
|
101419
|
+
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101420
|
+
target: "ehh9sxh15"
|
|
101421
|
+
} : 0)("&&{color:var(--signin-text);text-decoration:none;white-space:nowrap;appearance:none;border:0;background:transparent;font-family:var(--signin-font);font-size:var(--signin-link-size);font-weight:var(--signin-link-weight);line-height:22px;padding:0;text-align:left;cursor:pointer;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;margin:0 4px;&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
|
|
101422
|
+
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101423
|
+
target: "ehh9sxh14"
|
|
101424
|
+
} : 0)("&&{color:var(--signin-text);text-decoration:none;white-space:nowrap;appearance:none;border:0;background:transparent;font-family:var(--signin-font);font-size:var(--signin-link-size);font-weight:var(--signin-link-weight);line-height:22px;padding:0;text-align:left;cursor:pointer;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;color:var(--signin-text);padding:1px 4px;text-underline-offset:2px;text-decoration-thickness:1px;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
|
|
101425
|
+
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
101426
|
+
target: "ehh9sxh13"
|
|
101427
|
+
} : 0)("color:var(--signin-text);@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;padding:0 4px;font-size:16px;line-height:1;}" + ( true ? "" : 0));
|
|
101428
|
+
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101429
|
+
target: "ehh9sxh12"
|
|
101430
|
+
} : 0)("display:inline-flex;align-items:center;justify-content:center;line-height:0;font-size:0;margin-right:4px;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
101431
|
+
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
101432
|
+
target: "ehh9sxh11"
|
|
101433
|
+
} : 0)("display:none;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:grid;place-items:center;position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);z-index:1200;padding:12px;overflow-y:auto;}" + ( true ? "" : 0));
|
|
101434
|
+
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
101435
|
+
target: "ehh9sxh10"
|
|
101436
|
+
} : 0)("display:none;border:0;margin:0;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:flex;flex-direction:column;width:min(90vw, 520px);max-width:100%;background:#ffffff;border-radius:26px;padding:0;gap:0;position:relative;box-shadow:0 10px 28px rgba(0, 0, 0, 0.24);box-sizing:border-box;overflow:hidden;}@media (max-width: 768px){width:min(92vw, 460px);}@media (max-width: 425px){width:calc(100vw - 20px);max-width:none;border-radius:22px;}@media (max-width: 375px){width:calc(100vw - 16px);max-width:none;border-radius:20px;}@media (min-width: 768px) and (max-width: ", MOBILE_MAX_WIDTH_PX, "px){width:min(78vw, 500px);border:1px solid #d8d8d8;}" + ( true ? "" : 0));
|
|
101437
|
+
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
101438
|
+
target: "ehh9sxh9"
|
|
101439
|
+
} : 0)( true ? {
|
|
101440
|
+
name: "wbibpl",
|
|
101441
|
+
styles: "display:flex;align-items:flex-start;justify-content:flex-end;width:100%;min-height:44px;padding:12px 18px 0;box-sizing:border-box"
|
|
101442
|
+
} : 0);
|
|
101443
|
+
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
101444
|
+
target: "ehh9sxh8"
|
|
101445
|
+
} : 0)( true ? {
|
|
101446
|
+
name: "1m9bk8n",
|
|
101447
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
101448
|
+
} : 0);
|
|
101449
|
+
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101450
|
+
target: "ehh9sxh7"
|
|
101451
|
+
} : 0)( true ? {
|
|
101452
|
+
name: "u33vv4",
|
|
101453
|
+
styles: "appearance:none;border:0;padding:0;margin:0;background:transparent;color:#8f8f8f;font-family:var(--signin-font);font-size:28px;line-height:24px;font-weight:400;min-width:24px;min-height:24px;cursor:pointer;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
101454
|
+
} : 0);
|
|
101455
|
+
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
101456
|
+
target: "ehh9sxh6"
|
|
101457
|
+
} : 0)( true ? {
|
|
101458
|
+
name: "150yav4",
|
|
101459
|
+
styles: "display:flex;flex-direction:column;width:100%;gap:0;padding:0 26px 26px;box-sizing:border-box;@media (max-width: 425px){padding:0 18px 20px;}"
|
|
101460
|
+
} : 0);
|
|
101461
|
+
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
101462
|
+
target: "ehh9sxh5"
|
|
101463
|
+
} : 0)( true ? {
|
|
101464
|
+
name: "dbqp8z",
|
|
101465
|
+
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
101466
|
+
} : 0);
|
|
101467
|
+
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
101468
|
+
target: "ehh9sxh4"
|
|
101469
|
+
} : 0)( true ? {
|
|
101470
|
+
name: "phcu5u",
|
|
101471
|
+
styles: "padding:6px 0 0;display:flex;flex-direction:column;gap:12px;width:100%;box-sizing:border-box;&:first-of-type{padding-bottom:18px;border-bottom:0.5px solid #252525;margin-bottom:18px;}@media (min-width: 769px){&:first-of-type{border-bottom:0;}}"
|
|
101472
|
+
} : 0);
|
|
101473
|
+
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
101474
|
+
target: "ehh9sxh3"
|
|
101475
|
+
} : 0)( true ? {
|
|
101476
|
+
name: "1kyoijh",
|
|
101477
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
101478
|
+
} : 0);
|
|
101479
|
+
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
101480
|
+
target: "ehh9sxh2"
|
|
101481
|
+
} : 0)( true ? {
|
|
101482
|
+
name: "18ee69d",
|
|
101483
|
+
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
101484
|
+
} : 0);
|
|
101485
|
+
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101486
|
+
target: "ehh9sxh1"
|
|
101487
|
+
} : 0)("width:100%;min-height:44px;border-radius:4px;border:0;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:600;cursor:pointer;box-sizing:border-box;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){&:hover{background:#de3d49;}&:active{background:#0d0e0d;}&:focus{outline:2px solid #0d0e0d;outline-offset:2px;background:#;}&:active:focus{box-shadow:0 0 0 0.2rem rgba(69, 69, 69, 0.5);}}" + ( true ? "" : 0));
|
|
101488
|
+
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101489
|
+
target: "ehh9sxh0"
|
|
101490
|
+
} : 0)( true ? {
|
|
101491
|
+
name: "16bjh6l",
|
|
101492
|
+
styles: "appearance:none;width:100%;min-height:44px;border-radius:4px;border:1px solid #252525;background:#ffffff;color:#252525;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box;&:hover{background:#ffffff;color:#8c8c8c;border:1px solid #8c8c8c;}&:active:focus{color:#5f5f5f;background:#ffffff;border:1px solid #94d6e9;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
101493
|
+
} : 0);
|
|
101494
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.jsx
|
|
101495
|
+
function SignUpOrSignIn_typeof(o) { "@babel/helpers - typeof"; return SignUpOrSignIn_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; }, SignUpOrSignIn_typeof(o); }
|
|
101496
|
+
function SignUpOrSignIn_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; }
|
|
101497
|
+
function SignUpOrSignIn_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpOrSignIn_ownKeys(Object(t), !0).forEach(function (r) { SignUpOrSignIn_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpOrSignIn_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
101498
|
+
function SignUpOrSignIn_defineProperty(e, r, t) { return (r = SignUpOrSignIn_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
101499
|
+
function SignUpOrSignIn_toPropertyKey(t) { var i = SignUpOrSignIn_toPrimitive(t, "string"); return "symbol" == SignUpOrSignIn_typeof(i) ? i : i + ""; }
|
|
101500
|
+
function SignUpOrSignIn_toPrimitive(t, r) { if ("object" != SignUpOrSignIn_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpOrSignIn_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
101501
|
+
function SignUpOrSignIn_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return SignUpOrSignIn_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (SignUpOrSignIn_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, SignUpOrSignIn_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpOrSignIn_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpOrSignIn_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpOrSignIn_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpOrSignIn_regeneratorDefine2(u), SignUpOrSignIn_regeneratorDefine2(u, o, "Generator"), SignUpOrSignIn_regeneratorDefine2(u, n, function () { return this; }), SignUpOrSignIn_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpOrSignIn_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
101502
|
+
function SignUpOrSignIn_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpOrSignIn_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpOrSignIn_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, SignUpOrSignIn_regeneratorDefine2(e, r, n, t); }
|
|
101503
|
+
function SignUpOrSignIn_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
101504
|
+
function SignUpOrSignIn_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { SignUpOrSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpOrSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
101505
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || SignUpOrSignIn_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
101506
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
101507
|
+
function SignUpOrSignIn_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpOrSignIn_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? SignUpOrSignIn_arrayLikeToArray(r, a) : void 0; } }
|
|
101508
|
+
function SignUpOrSignIn_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
101509
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
101510
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101437
101511
|
|
|
101438
101512
|
|
|
101439
101513
|
|
|
101440
101514
|
|
|
101441
101515
|
|
|
101442
|
-
|
|
101443
|
-
|
|
101444
|
-
|
|
101445
|
-
|
|
101446
|
-
|
|
101447
|
-
|
|
101448
|
-
|
|
101449
|
-
|
|
101450
|
-
|
|
101451
|
-
|
|
101452
|
-
|
|
101453
|
-
|
|
101454
|
-
|
|
101455
|
-
|
|
101456
|
-
|
|
101516
|
+
|
|
101517
|
+
var DEFAULT_SIGN_UP = {
|
|
101518
|
+
title: "Sign Up",
|
|
101519
|
+
url: ""
|
|
101520
|
+
};
|
|
101521
|
+
var DEFAULT_SIGN_IN = {
|
|
101522
|
+
title: "Sign In",
|
|
101523
|
+
url: ""
|
|
101524
|
+
};
|
|
101525
|
+
var DEFAULT_ICON = "userOutline";
|
|
101526
|
+
var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
|
|
101527
|
+
var ICON_COLOR_MAP = {
|
|
101528
|
+
black: "#000000",
|
|
101529
|
+
white: "#ffffff",
|
|
101530
|
+
grey: "#808080"
|
|
101531
|
+
};
|
|
101532
|
+
var DEFAULT_MODAL_COPY = {
|
|
101533
|
+
close_dialog_aria_label: "Close dialog",
|
|
101534
|
+
sign_in_heading: "Sign In",
|
|
101535
|
+
sign_in_message: "Have an account already? Please sign in.",
|
|
101536
|
+
sign_in_cta_label: "Sign In",
|
|
101537
|
+
sign_up_heading: "Sign Up",
|
|
101538
|
+
sign_up_message: "New user? Please Sign up to continue",
|
|
101539
|
+
sign_up_cta_label: "Create Account",
|
|
101540
|
+
sign_up_cta_aria_label: "Create Account"
|
|
101541
|
+
};
|
|
101542
|
+
function navigateToUrl(url) {
|
|
101543
|
+
var _globalThis$window;
|
|
101544
|
+
var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
|
|
101545
|
+
if (!resolvedUrl) return;
|
|
101546
|
+
(_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || (_globalThis$window = _globalThis$window.location) === null || _globalThis$window === void 0 || _globalThis$window.assign(resolvedUrl);
|
|
101547
|
+
}
|
|
101548
|
+
function handleKeyboardActivate(event) {
|
|
101549
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
101550
|
+
if (!event.currentTarget.matches(":focus-visible")) return;
|
|
101551
|
+
event.preventDefault();
|
|
101552
|
+
event.currentTarget.click();
|
|
101553
|
+
}
|
|
101554
|
+
function SignUpOrSignIn(_ref) {
|
|
101555
|
+
var _sign_up$title, _sign_in$title, _effectiveSignUp$titl, _effectiveSignIn$titl, _parent$$icon, _parent$$icon_color, _parent$$sign_up_labe, _parent$$sign_in_labe;
|
|
101556
|
+
var _ref$show = _ref.show,
|
|
101557
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
101558
|
+
_ref$icon = _ref.icon,
|
|
101559
|
+
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
101560
|
+
icon_color = _ref.icon_color,
|
|
101561
|
+
_ref$sign_up = _ref.sign_up,
|
|
101562
|
+
sign_up = _ref$sign_up === void 0 ? DEFAULT_SIGN_UP : _ref$sign_up,
|
|
101563
|
+
_ref$sign_in = _ref.sign_in,
|
|
101564
|
+
sign_in = _ref$sign_in === void 0 ? DEFAULT_SIGN_IN : _ref$sign_in,
|
|
101565
|
+
_ref$modal_copy = _ref.modal_copy,
|
|
101566
|
+
modal_copy = _ref$modal_copy === void 0 ? DEFAULT_MODAL_COPY : _ref$modal_copy,
|
|
101567
|
+
_ref$authService = _ref.authService,
|
|
101568
|
+
authService = _ref$authService === void 0 ? undefined : _ref$authService,
|
|
101569
|
+
_ref$parent$ = _ref.parent$,
|
|
101570
|
+
parent$ = _ref$parent$ === void 0 ? undefined : _ref$parent$;
|
|
101571
|
+
var _useState = (0,external_react_.useState)(false),
|
|
101572
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101573
|
+
isMobile = _useState2[0],
|
|
101574
|
+
setIsMobile = _useState2[1];
|
|
101575
|
+
var _useState3 = (0,external_react_.useState)(false),
|
|
101576
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
101577
|
+
isModalOpen = _useState4[0],
|
|
101578
|
+
setIsModalOpen = _useState4[1];
|
|
101579
|
+
var _useState5 = (0,external_react_.useState)({
|
|
101580
|
+
sign_up: sign_up,
|
|
101581
|
+
sign_in: sign_in
|
|
101582
|
+
}),
|
|
101583
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
101584
|
+
resolvedLinks = _useState6[0],
|
|
101585
|
+
setResolvedLinks = _useState6[1];
|
|
101586
|
+
var editing = isEditingMode();
|
|
101587
|
+
(0,external_react_.useEffect)(function () {
|
|
101588
|
+
var browserWindow = globalThis.window;
|
|
101589
|
+
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.matchMedia)) return undefined;
|
|
101590
|
+
var mediaQuery = browserWindow.matchMedia("(max-width: 1024px)");
|
|
101591
|
+
var sync = function sync() {
|
|
101592
|
+
return setIsMobile(mediaQuery.matches);
|
|
101593
|
+
};
|
|
101594
|
+
sync();
|
|
101595
|
+
mediaQuery.addEventListener("change", sync);
|
|
101596
|
+
return function () {
|
|
101597
|
+
return mediaQuery.removeEventListener("change", sync);
|
|
101598
|
+
};
|
|
101599
|
+
}, []);
|
|
101600
|
+
var signUpTitle = (_sign_up$title = sign_up === null || sign_up === void 0 ? void 0 : sign_up.title) !== null && _sign_up$title !== void 0 ? _sign_up$title : "Sign Up";
|
|
101601
|
+
var signInTitle = (_sign_in$title = sign_in === null || sign_in === void 0 ? void 0 : sign_in.title) !== null && _sign_in$title !== void 0 ? _sign_in$title : "Sign In";
|
|
101602
|
+
var effectiveSignUp = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_up) || sign_up;
|
|
101603
|
+
var effectiveSignIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_in) || sign_in;
|
|
101604
|
+
var effectiveSignUpTitle = (_effectiveSignUp$titl = effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.title) !== null && _effectiveSignUp$titl !== void 0 ? _effectiveSignUp$titl : signUpTitle;
|
|
101605
|
+
var effectiveSignInTitle = (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle;
|
|
101606
|
+
var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
|
|
101607
|
+
var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
|
|
101608
|
+
var normalizedColorName = String(icon_color !== null && icon_color !== void 0 ? icon_color : "").trim().toLowerCase();
|
|
101609
|
+
var resolvedIconColor = ICON_COLOR_MAP[normalizedColorName];
|
|
101610
|
+
(0,external_react_.useEffect)(function () {
|
|
101611
|
+
setResolvedLinks({
|
|
101612
|
+
sign_up: sign_up,
|
|
101613
|
+
sign_in: sign_in
|
|
101614
|
+
});
|
|
101615
|
+
}, [sign_up, sign_in]);
|
|
101616
|
+
(0,external_react_.useEffect)(function () {
|
|
101617
|
+
var canceled = false;
|
|
101618
|
+
var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
|
|
101619
|
+
if (!canResolve) return undefined;
|
|
101620
|
+
SignUpOrSignIn_asyncToGenerator(/*#__PURE__*/SignUpOrSignIn_regenerator().m(function _callee() {
|
|
101621
|
+
var links, _t;
|
|
101622
|
+
return SignUpOrSignIn_regenerator().w(function (_context) {
|
|
101623
|
+
while (1) switch (_context.p = _context.n) {
|
|
101624
|
+
case 0:
|
|
101625
|
+
_context.p = 0;
|
|
101626
|
+
_context.n = 1;
|
|
101627
|
+
return authService.getAuthLinks();
|
|
101628
|
+
case 1:
|
|
101629
|
+
links = _context.v;
|
|
101630
|
+
if (!canceled && links) {
|
|
101631
|
+
setResolvedLinks({
|
|
101632
|
+
sign_up: links.sign_up || links.signUp || sign_up,
|
|
101633
|
+
sign_in: links.sign_in || links.signIn || sign_in
|
|
101634
|
+
});
|
|
101635
|
+
}
|
|
101636
|
+
_context.n = 3;
|
|
101637
|
+
break;
|
|
101638
|
+
case 2:
|
|
101639
|
+
_context.p = 2;
|
|
101640
|
+
_t = _context.v;
|
|
101641
|
+
case 3:
|
|
101642
|
+
return _context.a(2);
|
|
101643
|
+
}
|
|
101644
|
+
}, _callee, null, [[0, 2]]);
|
|
101645
|
+
}))();
|
|
101646
|
+
return function () {
|
|
101647
|
+
canceled = true;
|
|
101648
|
+
};
|
|
101649
|
+
}, [authService, sign_in, sign_up]);
|
|
101650
|
+
(0,external_react_.useEffect)(function () {
|
|
101651
|
+
var _globalThis$window2;
|
|
101652
|
+
if (!isModalOpen) return undefined;
|
|
101653
|
+
var onKeyDown = function onKeyDown(e) {
|
|
101654
|
+
if (e.key !== "Escape") return;
|
|
101655
|
+
setIsModalOpen(false);
|
|
101656
|
+
};
|
|
101657
|
+
(_globalThis$window2 = globalThis.window) === null || _globalThis$window2 === void 0 || _globalThis$window2.addEventListener("keydown", onKeyDown);
|
|
101658
|
+
return function () {
|
|
101659
|
+
var _globalThis$window3;
|
|
101660
|
+
return (_globalThis$window3 = globalThis.window) === null || _globalThis$window3 === void 0 ? void 0 : _globalThis$window3.removeEventListener("keydown", onKeyDown);
|
|
101661
|
+
};
|
|
101662
|
+
}, [isModalOpen]);
|
|
101663
|
+
if (!show) return null;
|
|
101664
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpOrSignInRoot, {
|
|
101665
|
+
"data-testid": "signup-signin",
|
|
101666
|
+
children: [!isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
101667
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, {
|
|
101668
|
+
"data-testid": "signup-link",
|
|
101669
|
+
"aria-label": effectiveSignUpTitle,
|
|
101670
|
+
type: "button",
|
|
101671
|
+
onClick: function onClick() {
|
|
101672
|
+
if (editing) return;
|
|
101673
|
+
navigateToUrl(effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101674
|
+
},
|
|
101675
|
+
onKeyDown: handleKeyboardActivate,
|
|
101676
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$icon = parent$ === null || parent$ === void 0 ? void 0 : parent$.icon) !== null && _parent$$icon !== void 0 ? _parent$$icon : {}), {}, {
|
|
101677
|
+
className: "icon-container",
|
|
101678
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$icon_color = parent$ === null || parent$ === void 0 ? void 0 : parent$.icon_color) !== null && _parent$$icon_color !== void 0 ? _parent$$icon_color : {}), {}, {
|
|
101679
|
+
"aria-hidden": true,
|
|
101680
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
101681
|
+
name: resolvedIconName,
|
|
101682
|
+
size: "large",
|
|
101683
|
+
colorOverride: resolvedIconColor
|
|
101684
|
+
})
|
|
101685
|
+
}))
|
|
101686
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101687
|
+
as: "span"
|
|
101688
|
+
}, (_parent$$sign_up_labe = parent$ === null || parent$ === void 0 ? void 0 : parent$.sign_up_label) !== null && _parent$$sign_up_labe !== void 0 ? _parent$$sign_up_labe : {}), {}, {
|
|
101689
|
+
children: effectiveSignUpTitle
|
|
101690
|
+
}))]
|
|
101691
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
101692
|
+
"aria-hidden": true,
|
|
101693
|
+
children: "/"
|
|
101694
|
+
})]
|
|
101695
|
+
}) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, {
|
|
101696
|
+
"data-testid": "signin-button",
|
|
101697
|
+
"aria-label": effectiveSignInTitle,
|
|
101698
|
+
onClick: function onClick() {
|
|
101699
|
+
if (editing) return;
|
|
101700
|
+
if (isMobile) {
|
|
101701
|
+
setIsModalOpen(true);
|
|
101702
|
+
return;
|
|
101703
|
+
}
|
|
101704
|
+
navigateToUrl(effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101705
|
+
},
|
|
101706
|
+
onKeyDown: handleKeyboardActivate,
|
|
101457
101707
|
type: "button",
|
|
101458
|
-
|
|
101459
|
-
|
|
101460
|
-
|
|
101708
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$sign_in_labe = parent$ === null || parent$ === void 0 ? void 0 : parent$.sign_in_label) !== null && _parent$$sign_in_labe !== void 0 ? _parent$$sign_in_labe : {}), {}, {
|
|
101709
|
+
children: effectiveSignInTitle
|
|
101710
|
+
}))
|
|
101711
|
+
}), isMobile && isModalOpen ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
101712
|
+
"data-testid": "signin-modal-backdrop",
|
|
101713
|
+
onClick: function onClick() {
|
|
101714
|
+
return setIsModalOpen(false);
|
|
101715
|
+
},
|
|
101716
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
101717
|
+
open: true,
|
|
101718
|
+
"aria-modal": "true",
|
|
101719
|
+
"aria-label": effectiveSignInTitle,
|
|
101720
|
+
onClick: function onClick(e) {
|
|
101721
|
+
return e.stopPropagation();
|
|
101722
|
+
},
|
|
101723
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
101724
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
101725
|
+
"data-testid": "signin-modal-cancel",
|
|
101726
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
|
|
101727
|
+
type: "button",
|
|
101728
|
+
onClick: function onClick() {
|
|
101729
|
+
return setIsModalOpen(false);
|
|
101730
|
+
},
|
|
101731
|
+
children: "\xD7"
|
|
101732
|
+
})
|
|
101733
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
101734
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
101735
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101736
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101737
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
101738
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101739
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
101740
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
101741
|
+
type: "button",
|
|
101742
|
+
"data-testid": "signin-modal-signin-cta",
|
|
101743
|
+
onClick: function onClick() {
|
|
101744
|
+
if (editing) return;
|
|
101745
|
+
setIsModalOpen(false);
|
|
101746
|
+
navigateToUrl(effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101747
|
+
},
|
|
101748
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
101749
|
+
})]
|
|
101750
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101751
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101752
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
101753
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101754
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
101755
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
101756
|
+
"data-testid": "signin-modal-create-account-cta",
|
|
101757
|
+
type: "button",
|
|
101758
|
+
onClick: function onClick() {
|
|
101759
|
+
if (editing) return;
|
|
101760
|
+
setIsModalOpen(false);
|
|
101761
|
+
navigateToUrl(effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101762
|
+
},
|
|
101763
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
101764
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
101765
|
+
})]
|
|
101766
|
+
})]
|
|
101767
|
+
})
|
|
101768
|
+
})]
|
|
101769
|
+
})
|
|
101770
|
+
}) : null]
|
|
101771
|
+
});
|
|
101772
|
+
}
|
|
101773
|
+
SignUpOrSignIn.propTypes = {
|
|
101774
|
+
show: (external_prop_types_default()).bool,
|
|
101775
|
+
icon: (external_prop_types_default()).string,
|
|
101776
|
+
icon_color: (external_prop_types_default()).string,
|
|
101777
|
+
sign_up: external_prop_types_default().shape({
|
|
101778
|
+
title: (external_prop_types_default()).string,
|
|
101779
|
+
url: (external_prop_types_default()).string
|
|
101780
|
+
}),
|
|
101781
|
+
sign_in: external_prop_types_default().shape({
|
|
101782
|
+
title: (external_prop_types_default()).string,
|
|
101783
|
+
url: (external_prop_types_default()).string
|
|
101784
|
+
}),
|
|
101785
|
+
modal_copy: external_prop_types_default().shape({
|
|
101786
|
+
close_dialog_aria_label: (external_prop_types_default()).string,
|
|
101787
|
+
sign_in_heading: (external_prop_types_default()).string,
|
|
101788
|
+
sign_in_message: (external_prop_types_default()).string,
|
|
101789
|
+
sign_in_cta_label: (external_prop_types_default()).string,
|
|
101790
|
+
sign_up_heading: (external_prop_types_default()).string,
|
|
101791
|
+
sign_up_message: (external_prop_types_default()).string,
|
|
101792
|
+
sign_up_cta_label: (external_prop_types_default()).string,
|
|
101793
|
+
sign_up_cta_aria_label: (external_prop_types_default()).string
|
|
101794
|
+
}),
|
|
101795
|
+
authService: external_prop_types_default().shape({
|
|
101796
|
+
getAuthLinks: (external_prop_types_default()).func
|
|
101797
|
+
}),
|
|
101798
|
+
parent$: external_prop_types_default().shape({
|
|
101799
|
+
icon: (external_prop_types_default()).object,
|
|
101800
|
+
icon_color: (external_prop_types_default()).object,
|
|
101801
|
+
sign_up_label: (external_prop_types_default()).object,
|
|
101802
|
+
sign_in_label: (external_prop_types_default()).object
|
|
101803
|
+
})
|
|
101804
|
+
};
|
|
101805
|
+
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
101806
|
+
|
|
101807
|
+
|
|
101808
|
+
|
|
101809
|
+
|
|
101810
|
+
function HeaderAccountRegion(_ref) {
|
|
101811
|
+
var data = _ref.data,
|
|
101812
|
+
parent$ = _ref.parent$;
|
|
101813
|
+
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
101814
|
+
if (!show) return null;
|
|
101815
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpOrSignIn, {
|
|
101816
|
+
show: show,
|
|
101817
|
+
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
101818
|
+
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
101819
|
+
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
101820
|
+
sign_in: data === null || data === void 0 ? void 0 : data.sign_in,
|
|
101821
|
+
parent$: parent$
|
|
101461
101822
|
});
|
|
101462
101823
|
}
|
|
101463
101824
|
HeaderAccountRegion.propTypes = {
|
|
101464
101825
|
data: external_prop_types_default().shape({
|
|
101465
|
-
|
|
101466
|
-
|
|
101467
|
-
|
|
101826
|
+
show: (external_prop_types_default()).bool,
|
|
101827
|
+
icon: (external_prop_types_default()).string,
|
|
101828
|
+
icon_color: (external_prop_types_default()).string,
|
|
101829
|
+
sign_up: external_prop_types_default().shape({
|
|
101830
|
+
title: (external_prop_types_default()).string,
|
|
101831
|
+
url: (external_prop_types_default()).string
|
|
101832
|
+
}),
|
|
101833
|
+
sign_in: external_prop_types_default().shape({
|
|
101834
|
+
title: (external_prop_types_default()).string,
|
|
101835
|
+
url: (external_prop_types_default()).string
|
|
101836
|
+
})
|
|
101837
|
+
}),
|
|
101838
|
+
parent$: external_prop_types_default().shape({
|
|
101839
|
+
icon: (external_prop_types_default()).object,
|
|
101840
|
+
icon_color: (external_prop_types_default()).object,
|
|
101841
|
+
sign_up_label: (external_prop_types_default()).object,
|
|
101842
|
+
sign_in_label: (external_prop_types_default()).object
|
|
101843
|
+
})
|
|
101468
101844
|
};
|
|
101469
101845
|
;// ./src/components/cart/Cart.styled.jsx
|
|
101470
101846
|
|
|
@@ -101735,7 +102111,7 @@ var Root = /*#__PURE__*/createStyled("div", true ? {
|
|
|
101735
102111
|
var $disabled = _ref9.$disabled;
|
|
101736
102112
|
return $disabled ? "\n opacity: 0.6;\n cursor: not-allowed;\n " : "\n cursor: text;\n ";
|
|
101737
102113
|
}, "@media (max-width: 340px){width:100%;}" + ( true ? "" : 0));
|
|
101738
|
-
var
|
|
102114
|
+
var Input_styled_IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101739
102115
|
target: "ec07usz3"
|
|
101740
102116
|
} : 0)("display:inline-flex;align-items:center;justify-content:center;width:", function (_ref0) {
|
|
101741
102117
|
var $size = _ref0.$size;
|
|
@@ -101796,12 +102172,12 @@ var InputPropTypes = {
|
|
|
101796
102172
|
className: (external_prop_types_default()).string
|
|
101797
102173
|
};
|
|
101798
102174
|
;// ./src/components/input/Input.jsx
|
|
101799
|
-
function
|
|
101800
|
-
function
|
|
102175
|
+
function Input_slicedToArray(r, e) { return Input_arrayWithHoles(r) || Input_iterableToArrayLimit(r, e) || Input_unsupportedIterableToArray(r, e) || Input_nonIterableRest(); }
|
|
102176
|
+
function Input_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
101801
102177
|
function Input_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return Input_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Input_arrayLikeToArray(r, a) : void 0; } }
|
|
101802
102178
|
function Input_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
101803
|
-
function
|
|
101804
|
-
function
|
|
102179
|
+
function Input_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
102180
|
+
function Input_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101805
102181
|
|
|
101806
102182
|
|
|
101807
102183
|
|
|
@@ -101830,7 +102206,7 @@ function Input(props) {
|
|
|
101830
102206
|
className = props.className;
|
|
101831
102207
|
var inputRef = (0,external_react_.useRef)(null);
|
|
101832
102208
|
var _useState = (0,external_react_.useState)(false),
|
|
101833
|
-
_useState2 =
|
|
102209
|
+
_useState2 = Input_slicedToArray(_useState, 2),
|
|
101834
102210
|
internalFocused = _useState2[0],
|
|
101835
102211
|
setInternalFocused = _useState2[1];
|
|
101836
102212
|
var canRender = typeof _onChange === "function";
|
|
@@ -101874,7 +102250,7 @@ function Input(props) {
|
|
|
101874
102250
|
var inputTestId = "".concat(rootTestId, "-input");
|
|
101875
102251
|
var iconTestId = "".concat(rootTestId, "-icon");
|
|
101876
102252
|
var clearTestId = "".concat(rootTestId, "-clear");
|
|
101877
|
-
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
102253
|
+
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(Input_styled_IconWrap, {
|
|
101878
102254
|
"aria-hidden": "true",
|
|
101879
102255
|
"data-testid": iconTestId,
|
|
101880
102256
|
$size: normalizedSize,
|
|
@@ -103578,7 +103954,7 @@ var MobileSearchButton = /*#__PURE__*/createStyled("button", true ? {
|
|
|
103578
103954
|
} : 0);
|
|
103579
103955
|
var DesktopSearchWrapper = /*#__PURE__*/createStyled("button", true ? {
|
|
103580
103956
|
target: "etuykaq11"
|
|
103581
|
-
} : 0)("display:none;align-items:center;width:100%;border:1px solid ", SearchModal_styled_colors.border, ";border-radius:999px;background:", SearchModal_styled_colors.surface, ";min-height:46px;margin-left:auto;padding:0 5px 0 3px;box-sizing:border-box;overflow:hidden;&:focus{outline:none;}&:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:
|
|
103957
|
+
} : 0)("display:none;align-items:center;width:100%;border:1px solid ", SearchModal_styled_colors.border, ";border-radius:999px;background:", SearchModal_styled_colors.surface, ";min-height:46px;margin-left:auto;padding:0 5px 0 3px;box-sizing:border-box;overflow:hidden;&:focus{outline:none;}&:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:999px;}@media (min-width: 1024px){display:flex;width:", function (_ref) {
|
|
103582
103958
|
var $sizeVariant = _ref.$sizeVariant;
|
|
103583
103959
|
return $sizeVariant === "full" ? "100%" : "min(100%, 320px)";
|
|
103584
103960
|
}, ";cursor:pointer;transition:background-color 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease;min-height:32px;&:hover{background:#f3f4f6;}&:hover>[data-testid=\"search-trigger-input\"]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}&:focus-visible{border-color:", SearchModal_styled_colors.muted, ";box-shadow:0 0 0 1px rgba(17, 24, 39, 0.08);}}" + ( true ? "" : 0));
|
|
@@ -104973,6 +105349,7 @@ var TopRibbon = function TopRibbon(_ref) {
|
|
|
104973
105349
|
TopRibbon.propTypes = TopRibbonPropTypes;
|
|
104974
105350
|
/* harmony default export */ const top_ribbon_TopRibbon = (TopRibbon);
|
|
104975
105351
|
;// ./src/components/brand/brand.helpers.js
|
|
105352
|
+
function brand_helpers_typeof(o) { "@babel/helpers - typeof"; return brand_helpers_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; }, brand_helpers_typeof(o); }
|
|
104976
105353
|
function parseLogoData(logoData) {
|
|
104977
105354
|
if (!logoData) {
|
|
104978
105355
|
return {
|
|
@@ -104994,8 +105371,14 @@ function parseLogoData(logoData) {
|
|
|
104994
105371
|
var logoUrl;
|
|
104995
105372
|
if (header_logo) {
|
|
104996
105373
|
try {
|
|
104997
|
-
var
|
|
104998
|
-
var
|
|
105374
|
+
var _parsed;
|
|
105375
|
+
var parsed;
|
|
105376
|
+
if (typeof header_logo === "string") {
|
|
105377
|
+
parsed = JSON.parse(header_logo);
|
|
105378
|
+
} else if (brand_helpers_typeof(header_logo) === "object") {
|
|
105379
|
+
parsed = header_logo;
|
|
105380
|
+
}
|
|
105381
|
+
var imageArray = (_parsed = parsed) === null || _parsed === void 0 ? void 0 : _parsed.image;
|
|
104999
105382
|
if (Array.isArray(imageArray) && imageArray.length > 0) {
|
|
105000
105383
|
var _firstImage$selected, _firstImage$files, _firstImage$files2;
|
|
105001
105384
|
var firstImage = imageArray[0];
|
|
@@ -106765,7 +107148,7 @@ var HeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
|
106765
107148
|
var LogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
106766
107149
|
target: "e1g1uu3p6"
|
|
106767
107150
|
} : 0)("display:inline-flex;align-items:center;justify-content:flex-start;justify-self: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));
|
|
106768
|
-
var
|
|
107151
|
+
var MarketSelector_styled_ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
106769
107152
|
target: "e1g1uu3p5"
|
|
106770
107153
|
} : 0)("margin:0;justify-self:center;grid-column:2;min-width:0;width:fit-content;max-width:100%;height:auto;min-height:34px;text-align:center;color:#252525;font-family:Lora,sans-serif;font-size:26px;line-height:34px;font-weight:400;white-space:normal;overflow-wrap:break-word;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){text-align:left;font-size:44px;line-height:58px;}" + ( true ? "" : 0));
|
|
106771
107154
|
var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
@@ -107375,7 +107758,7 @@ function renderMarketSelectorModalDesktop(_ref7) {
|
|
|
107375
107758
|
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
107376
107759
|
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
107377
107760
|
})
|
|
107378
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
107761
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector_styled_ModalTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
107379
107762
|
id: "market-selector-modal-title"
|
|
107380
107763
|
}, (_marketSelectorDollar = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar !== void 0 ? _marketSelectorDollar : {}), {}, {
|
|
107381
107764
|
children: text.modalTitle
|
|
@@ -108044,13 +108427,21 @@ var DEFAULT_LOYALTY = {
|
|
|
108044
108427
|
href: "/rewards"
|
|
108045
108428
|
};
|
|
108046
108429
|
var DEFAULT_ACCOUNT = {
|
|
108047
|
-
|
|
108048
|
-
|
|
108430
|
+
show: true,
|
|
108431
|
+
icon: "userOutline",
|
|
108432
|
+
icon_color: undefined,
|
|
108433
|
+
sign_up: {
|
|
108434
|
+
title: "Sign Up",
|
|
108435
|
+
url: ""
|
|
108436
|
+
},
|
|
108437
|
+
sign_in: {
|
|
108438
|
+
title: "Sign In",
|
|
108439
|
+
url: ""
|
|
108440
|
+
}
|
|
108049
108441
|
};
|
|
108050
108442
|
var DEFAULT_CART = {
|
|
108051
|
-
|
|
108052
|
-
|
|
108053
|
-
item_count: 0
|
|
108443
|
+
aria_label: "Shopping cart",
|
|
108444
|
+
count: 0
|
|
108054
108445
|
};
|
|
108055
108446
|
var DEFAULT_NAVIGATION = {
|
|
108056
108447
|
topNavItems: [{
|
|
@@ -108103,24 +108494,98 @@ var DEFAULT_TOP_RIBBON_LINKS = [{
|
|
|
108103
108494
|
url: "/gifts",
|
|
108104
108495
|
ariaLabel: "Shop Gifts"
|
|
108105
108496
|
}];
|
|
108106
|
-
function
|
|
108107
|
-
var
|
|
108108
|
-
|
|
108109
|
-
|
|
108110
|
-
|
|
108111
|
-
|
|
108112
|
-
|
|
108497
|
+
function firstDefined() {
|
|
108498
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
108499
|
+
values[_key] = arguments[_key];
|
|
108500
|
+
}
|
|
108501
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
108502
|
+
var value = _values[_i];
|
|
108503
|
+
if (value !== undefined && value !== null) return value;
|
|
108504
|
+
}
|
|
108505
|
+
return undefined;
|
|
108506
|
+
}
|
|
108507
|
+
function normalizeShowFlag(value) {
|
|
108508
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
108509
|
+
if (value === undefined || value === null) return fallback;
|
|
108510
|
+
if (typeof value === "boolean") return value;
|
|
108511
|
+
var normalized = String(value).trim().toLowerCase();
|
|
108512
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
108513
|
+
return false;
|
|
108514
|
+
}
|
|
108515
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
108516
|
+
return true;
|
|
108517
|
+
}
|
|
108518
|
+
return Boolean(value);
|
|
108519
|
+
}
|
|
108520
|
+
function normalizeUtilityLinksEntries(utilityLinksRaw) {
|
|
108521
|
+
if (Array.isArray(utilityLinksRaw)) return utilityLinksRaw;
|
|
108522
|
+
if (utilityLinksRaw) return [utilityLinksRaw];
|
|
108523
|
+
return [];
|
|
108524
|
+
}
|
|
108525
|
+
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
108526
|
+
return utilityLinksEntries.find(function (entry) {
|
|
108527
|
+
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
108528
|
+
}) || utilityLinksEntries[0] || null;
|
|
108529
|
+
}
|
|
108530
|
+
function buildAccountData(_ref) {
|
|
108531
|
+
var _firstDefined, _firstDefined2, _firstDefined3, _utilityAuthData$sign, _legacyAccountData$si, _legacyAccountData$si2, _firstDefined4, _utilityAuthData$sign2, _legacyAccountData$si3, _legacyAccountData$si4, _firstDefined5, _utilityAuthData$sign3, _legacyAccountData$si5, _legacyAccountData$si6, _firstDefined6, _utilityAuthData$sign4, _legacyAccountData$si7, _legacyAccountData$si8;
|
|
108532
|
+
var utilityAuthData = _ref.utilityAuthData,
|
|
108533
|
+
legacyAccountData = _ref.legacyAccountData;
|
|
108534
|
+
return {
|
|
108535
|
+
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
108536
|
+
icon: (_firstDefined = firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.icon, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.icon)) !== null && _firstDefined !== void 0 ? _firstDefined : DEFAULT_ACCOUNT.icon,
|
|
108537
|
+
icon_color: (_firstDefined2 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.icon_color, utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.iconColor, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.icon_color, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.iconColor)) !== null && _firstDefined2 !== void 0 ? _firstDefined2 : DEFAULT_ACCOUNT.icon_color,
|
|
108538
|
+
sign_up: {
|
|
108539
|
+
title: (_firstDefined3 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign = utilityAuthData.sign_up) === null || _utilityAuthData$sign === void 0 ? void 0 : _utilityAuthData$sign.title, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si = legacyAccountData.signUp) === null || _legacyAccountData$si === void 0 ? void 0 : _legacyAccountData$si.title, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si2 = legacyAccountData.sign_up) === null || _legacyAccountData$si2 === void 0 ? void 0 : _legacyAccountData$si2.title)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_ACCOUNT.sign_up.title,
|
|
108540
|
+
url: (_firstDefined4 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign2 = utilityAuthData.sign_up) === null || _utilityAuthData$sign2 === void 0 ? void 0 : _utilityAuthData$sign2.href, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si3 = legacyAccountData.signUp) === null || _legacyAccountData$si3 === void 0 ? void 0 : _legacyAccountData$si3.url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si4 = legacyAccountData.sign_up) === null || _legacyAccountData$si4 === void 0 ? void 0 : _legacyAccountData$si4.url)) !== null && _firstDefined4 !== void 0 ? _firstDefined4 : DEFAULT_ACCOUNT.sign_up.url
|
|
108541
|
+
},
|
|
108542
|
+
sign_in: {
|
|
108543
|
+
title: (_firstDefined5 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign3 = utilityAuthData.sign_in) === null || _utilityAuthData$sign3 === void 0 ? void 0 : _utilityAuthData$sign3.title, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si5 = legacyAccountData.signIn) === null || _legacyAccountData$si5 === void 0 ? void 0 : _legacyAccountData$si5.title, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si6 = legacyAccountData.sign_in) === null || _legacyAccountData$si6 === void 0 ? void 0 : _legacyAccountData$si6.title)) !== null && _firstDefined5 !== void 0 ? _firstDefined5 : DEFAULT_ACCOUNT.sign_in.title,
|
|
108544
|
+
url: (_firstDefined6 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign4 = utilityAuthData.sign_in) === null || _utilityAuthData$sign4 === void 0 ? void 0 : _utilityAuthData$sign4.href, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si7 = legacyAccountData.signIn) === null || _legacyAccountData$si7 === void 0 ? void 0 : _legacyAccountData$si7.url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si8 = legacyAccountData.sign_in) === null || _legacyAccountData$si8 === void 0 ? void 0 : _legacyAccountData$si8.url)) !== null && _firstDefined6 !== void 0 ? _firstDefined6 : DEFAULT_ACCOUNT.sign_in.url
|
|
108545
|
+
}
|
|
108546
|
+
};
|
|
108547
|
+
}
|
|
108548
|
+
function buildAccountParentTags(_ref2) {
|
|
108549
|
+
var _utilityAuthData$$, _utilityLinksEntry$$, _legacyAccountData$$, _utilityAuthData$$2, _utilityAuthData$$3, _utilityLinksEntry$$2, _utilityLinksEntry$$3, _legacyAccountData$$2, _legacyAccountData$$3, _utilityAuthData$sign5, _utilityLinksEntry$$4, _legacyAccountData$$4, _utilityAuthData$sign6, _utilityLinksEntry$$5, _legacyAccountData$$5;
|
|
108550
|
+
var utilityAuthData = _ref2.utilityAuthData,
|
|
108551
|
+
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
108552
|
+
legacyAccountData = _ref2.legacyAccountData;
|
|
108553
|
+
return {
|
|
108554
|
+
icon: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$ = utilityAuthData.$) === null || _utilityAuthData$$ === void 0 ? void 0 : _utilityAuthData$$.icon) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$ = utilityLinksEntry.$) === null || _utilityLinksEntry$$ === void 0 || (_utilityLinksEntry$$ = _utilityLinksEntry$$.sign_up_sign_in_component) === null || _utilityLinksEntry$$ === void 0 ? void 0 : _utilityLinksEntry$$.icon) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
108555
|
+
icon_color: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$2 = utilityAuthData.$) === null || _utilityAuthData$$2 === void 0 ? void 0 : _utilityAuthData$$2.icon_color) || (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$3 = utilityAuthData.$) === null || _utilityAuthData$$3 === void 0 ? void 0 : _utilityAuthData$$3.iconColor) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$2 = utilityLinksEntry.$) === null || _utilityLinksEntry$$2 === void 0 || (_utilityLinksEntry$$2 = _utilityLinksEntry$$2.sign_up_sign_in_component) === null || _utilityLinksEntry$$2 === void 0 ? void 0 : _utilityLinksEntry$$2.icon_color) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$3 = utilityLinksEntry.$) === null || _utilityLinksEntry$$3 === void 0 || (_utilityLinksEntry$$3 = _utilityLinksEntry$$3.sign_up_sign_in_component) === null || _utilityLinksEntry$$3 === void 0 ? void 0 : _utilityLinksEntry$$3.iconColor) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$2 = legacyAccountData.$) === null || _legacyAccountData$$2 === void 0 ? void 0 : _legacyAccountData$$2.icon_color) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$3 = legacyAccountData.$) === null || _legacyAccountData$$3 === void 0 ? void 0 : _legacyAccountData$$3.iconColor),
|
|
108556
|
+
sign_up_label: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign5 = utilityAuthData.sign_up) === null || _utilityAuthData$sign5 === void 0 || (_utilityAuthData$sign5 = _utilityAuthData$sign5.$) === null || _utilityAuthData$sign5 === void 0 ? void 0 : _utilityAuthData$sign5.title) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$4 = utilityLinksEntry.$) === null || _utilityLinksEntry$$4 === void 0 || (_utilityLinksEntry$$4 = _utilityLinksEntry$$4.sign_up_sign_in_component) === null || _utilityLinksEntry$$4 === void 0 || (_utilityLinksEntry$$4 = _utilityLinksEntry$$4.sign_up) === null || _utilityLinksEntry$$4 === void 0 ? void 0 : _utilityLinksEntry$$4.title) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$4 = legacyAccountData.$) === null || _legacyAccountData$$4 === void 0 ? void 0 : _legacyAccountData$$4.sign_up_label),
|
|
108557
|
+
sign_in_label: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign6 = utilityAuthData.sign_in) === null || _utilityAuthData$sign6 === void 0 || (_utilityAuthData$sign6 = _utilityAuthData$sign6.$) === null || _utilityAuthData$sign6 === void 0 ? void 0 : _utilityAuthData$sign6.title) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$5 = utilityLinksEntry.$) === null || _utilityLinksEntry$$5 === void 0 || (_utilityLinksEntry$$5 = _utilityLinksEntry$$5.sign_up_sign_in_component) === null || _utilityLinksEntry$$5 === void 0 || (_utilityLinksEntry$$5 = _utilityLinksEntry$$5.sign_in) === null || _utilityLinksEntry$$5 === void 0 ? void 0 : _utilityLinksEntry$$5.title) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$5 = legacyAccountData.$) === null || _legacyAccountData$$5 === void 0 ? void 0 : _legacyAccountData$$5.sign_in_label)
|
|
108558
|
+
};
|
|
108559
|
+
}
|
|
108560
|
+
function HeaderView(_ref3) {
|
|
108561
|
+
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _ref4, _headerEntry$locale, _headerEntry$$;
|
|
108562
|
+
var country = _ref3.country,
|
|
108563
|
+
language = _ref3.language,
|
|
108564
|
+
locale = _ref3.locale,
|
|
108565
|
+
headerEntry = _ref3.headerEntry,
|
|
108566
|
+
searchConfig = _ref3.searchConfig;
|
|
108113
108567
|
var _useState = (0,external_react_.useState)(false),
|
|
108114
108568
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
108115
108569
|
isMobileMenuOpen = _useState2[0],
|
|
108116
108570
|
setIsMobileMenuOpen = _useState2[1];
|
|
108117
108571
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
108572
|
+
var utilityLinksRaw = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links;
|
|
108573
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
108574
|
+
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
108118
108575
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
108119
108576
|
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;
|
|
108120
|
-
var loyaltyData = (
|
|
108121
|
-
|
|
108122
|
-
|
|
108123
|
-
var accountData = (
|
|
108577
|
+
var loyaltyData = (_utilityLinksEntry$lo = utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$lo2 = utilityLinksEntry.loyalty_menu) === null || _utilityLinksEntry$lo2 === void 0 ? void 0 : _utilityLinksEntry$lo2[0]) !== null && _utilityLinksEntry$lo !== void 0 ? _utilityLinksEntry$lo : DEFAULT_LOYALTY;
|
|
108578
|
+
var utilityAuthData = utilityLinksEntry === null || utilityLinksEntry === void 0 ? void 0 : utilityLinksEntry.sign_up_sign_in_component;
|
|
108579
|
+
var legacyAccountData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account;
|
|
108580
|
+
var accountData = buildAccountData({
|
|
108581
|
+
utilityAuthData: utilityAuthData,
|
|
108582
|
+
legacyAccountData: legacyAccountData
|
|
108583
|
+
});
|
|
108584
|
+
var accountParentTags = buildAccountParentTags({
|
|
108585
|
+
utilityAuthData: utilityAuthData,
|
|
108586
|
+
utilityLinksEntry: utilityLinksEntry,
|
|
108587
|
+
legacyAccountData: legacyAccountData
|
|
108588
|
+
});
|
|
108124
108589
|
var cartData = (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART;
|
|
108125
108590
|
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;
|
|
108126
108591
|
var navigationData = (_headerEntry$navigati = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.navigation) !== null && _headerEntry$navigati !== void 0 ? _headerEntry$navigati : DEFAULT_NAVIGATION;
|
|
@@ -108142,12 +108607,18 @@ function HeaderView(_ref) {
|
|
|
108142
108607
|
"aria-label": "Open menu",
|
|
108143
108608
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconMenu, {})
|
|
108144
108609
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(LogoSlot, {
|
|
108145
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
108146
|
-
|
|
108610
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
108611
|
+
logo: logoData.logo,
|
|
108612
|
+
logoAlt: logoData.logoAlt,
|
|
108613
|
+
href: logoData.href,
|
|
108614
|
+
showLogo: logoData.showLogo,
|
|
108615
|
+
size: logoData.size,
|
|
108616
|
+
$: logoData.$
|
|
108147
108617
|
})
|
|
108148
108618
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
108149
108619
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
108150
|
-
data: accountData
|
|
108620
|
+
data: accountData,
|
|
108621
|
+
parent$: accountParentTags
|
|
108151
108622
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
108152
108623
|
country: country,
|
|
108153
108624
|
language: language,
|
|
@@ -108155,8 +108626,7 @@ function HeaderView(_ref) {
|
|
|
108155
108626
|
searchConfig: searchConfig,
|
|
108156
108627
|
showDesktopTrigger: false
|
|
108157
108628
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
108158
|
-
data: cartData
|
|
108159
|
-
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.cart
|
|
108629
|
+
data: cartData
|
|
108160
108630
|
})]
|
|
108161
108631
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(RightHeaderCluster, {
|
|
108162
108632
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(UtilityBar, {
|
|
@@ -108164,18 +108634,18 @@ function HeaderView(_ref) {
|
|
|
108164
108634
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
108165
108635
|
data: marketSelector,
|
|
108166
108636
|
logo: logoData,
|
|
108167
|
-
locale: String((
|
|
108168
|
-
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$
|
|
108637
|
+
locale: String((_ref4 = (_headerEntry$locale = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale) !== null && _headerEntry$locale !== void 0 ? _headerEntry$locale : locale) !== null && _ref4 !== void 0 ? _ref4 : "").trim(),
|
|
108638
|
+
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.market_selector__0,
|
|
108169
108639
|
mobileTriggerMode: "drawerPortal",
|
|
108170
108640
|
drawerOpen: isMobileMenuOpen,
|
|
108171
108641
|
drawerTriggerMountRef: mobileMarketTriggerMountRef
|
|
108172
108642
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
108173
108643
|
data: loyaltyData
|
|
108174
108644
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
108175
|
-
data: accountData
|
|
108645
|
+
data: accountData,
|
|
108646
|
+
parent$: accountParentTags
|
|
108176
108647
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
108177
|
-
data: cartData
|
|
108178
|
-
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.cart
|
|
108648
|
+
data: cartData
|
|
108179
108649
|
})]
|
|
108180
108650
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SearchSlot, {
|
|
108181
108651
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|