@nuskin/nextgen-header 1.27.0 → 1.28.1
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 +687 -148
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +687 -147
- package/package-dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/package-dist/index.mjs
CHANGED
|
@@ -1833,26 +1833,6 @@ var _default = exports["default"] = (0, _createSvgIcon.default)( /*#__PURE__*/(0
|
|
|
1833
1833
|
|
|
1834
1834
|
/***/ },
|
|
1835
1835
|
|
|
1836
|
-
/***/ 4745
|
|
1837
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1838
|
-
|
|
1839
|
-
var __webpack_unused_export__;
|
|
1840
|
-
|
|
1841
|
-
"use client";
|
|
1842
|
-
|
|
1843
|
-
var _interopRequireDefault = __webpack_require__(4994);
|
|
1844
|
-
__webpack_unused_export__ = ({
|
|
1845
|
-
value: true
|
|
1846
|
-
});
|
|
1847
|
-
exports.A = void 0;
|
|
1848
|
-
var _createSvgIcon = _interopRequireDefault(__webpack_require__(2032));
|
|
1849
|
-
var _jsxRuntime = __webpack_require__(1178);
|
|
1850
|
-
var _default = exports.A = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
1851
|
-
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
|
|
1852
|
-
}), 'Search');
|
|
1853
|
-
|
|
1854
|
-
/***/ },
|
|
1855
|
-
|
|
1856
1836
|
/***/ 2032
|
|
1857
1837
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1858
1838
|
|
|
@@ -100425,7 +100405,7 @@ var HEIGHT_MAP = {
|
|
|
100425
100405
|
;// ./src/utils/constants.js
|
|
100426
100406
|
var HEADER_CONTENT_ENTRY_UID = "global_header";
|
|
100427
100407
|
var HEADER_ENTRY_URL = "/vb-header/root-header";
|
|
100428
|
-
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", "
|
|
100408
|
+
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", "utility_links.sign_up_sign_in_component", "product_search"]));
|
|
100429
100409
|
var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
|
|
100430
100410
|
var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
|
|
100431
100411
|
var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
|
|
@@ -100816,7 +100796,7 @@ function IconChevronDown(props) {
|
|
|
100816
100796
|
}));
|
|
100817
100797
|
}
|
|
100818
100798
|
function IconUser(props) {
|
|
100819
|
-
return /*#__PURE__*/(
|
|
100799
|
+
return /*#__PURE__*/_jsx("svg", HeaderIcons_objectSpread(HeaderIcons_objectSpread({
|
|
100820
100800
|
width: "18",
|
|
100821
100801
|
height: "18",
|
|
100822
100802
|
viewBox: "0 0 24 24",
|
|
@@ -100824,7 +100804,7 @@ function IconUser(props) {
|
|
|
100824
100804
|
xmlns: "http://www.w3.org/2000/svg",
|
|
100825
100805
|
"aria-hidden": true
|
|
100826
100806
|
}, props), {}, {
|
|
100827
|
-
children: /*#__PURE__*/(
|
|
100807
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
100828
100808
|
d: "M12 12a4 4 0 100-8 4 4 0 000 8zM4 20a8 8 0 0116 0",
|
|
100829
100809
|
stroke: "currentColor",
|
|
100830
100810
|
strokeWidth: "2",
|
|
@@ -100952,30 +100932,6 @@ MobileHeaderDrawer.propTypes = {
|
|
|
100952
100932
|
current: external_prop_types_["default"].any
|
|
100953
100933
|
})
|
|
100954
100934
|
};
|
|
100955
|
-
;// ./src/components/header/regions/HeaderLogoRegion.jsx
|
|
100956
|
-
|
|
100957
|
-
|
|
100958
|
-
|
|
100959
|
-
|
|
100960
|
-
function HeaderLogoRegion(_ref) {
|
|
100961
|
-
var _data$aria_label;
|
|
100962
|
-
var data = _ref.data;
|
|
100963
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)("div", {
|
|
100964
|
-
"data-region": "logo",
|
|
100965
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(WordmarkButton, {
|
|
100966
|
-
type: "button",
|
|
100967
|
-
"aria-label": (_data$aria_label = data.aria_label) !== null && _data$aria_label !== void 0 ? _data$aria_label : "Nu Skin home",
|
|
100968
|
-
children: data.wordmark
|
|
100969
|
-
})
|
|
100970
|
-
});
|
|
100971
|
-
}
|
|
100972
|
-
HeaderLogoRegion.propTypes = {
|
|
100973
|
-
data: external_prop_types_["default"].shape({
|
|
100974
|
-
wordmark: external_prop_types_["default"].string,
|
|
100975
|
-
home_href: external_prop_types_["default"].string,
|
|
100976
|
-
aria_label: external_prop_types_["default"].string
|
|
100977
|
-
})
|
|
100978
|
-
};
|
|
100979
100935
|
;// ./src/components/header/regions/HeaderLoyaltyRegion.jsx
|
|
100980
100936
|
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); }
|
|
100981
100937
|
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; }
|
|
@@ -101004,38 +100960,507 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
101004
100960
|
$: external_prop_types_["default"].object
|
|
101005
100961
|
}).isRequired
|
|
101006
100962
|
};
|
|
101007
|
-
;// ./src/components/
|
|
100963
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.helpers.js
|
|
100964
|
+
var DEFAULT_SIGN_UP = {
|
|
100965
|
+
title: "Sign Up",
|
|
100966
|
+
url: ""
|
|
100967
|
+
};
|
|
100968
|
+
var DEFAULT_SIGN_IN = {
|
|
100969
|
+
title: "Sign In",
|
|
100970
|
+
url: ""
|
|
100971
|
+
};
|
|
100972
|
+
var DEFAULT_ICON = "userOutline";
|
|
100973
|
+
var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
|
|
100974
|
+
var ICON_COLOR_MAP = {
|
|
100975
|
+
black: "#000000",
|
|
100976
|
+
white: "#ffffff",
|
|
100977
|
+
grey: "#808080"
|
|
100978
|
+
};
|
|
100979
|
+
function navigateToUrl(url) {
|
|
100980
|
+
var _globalThis$window;
|
|
100981
|
+
var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
|
|
100982
|
+
if (!resolvedUrl) return;
|
|
100983
|
+
(_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || (_globalThis$window = _globalThis$window.location) === null || _globalThis$window === void 0 || _globalThis$window.assign(resolvedUrl);
|
|
100984
|
+
}
|
|
100985
|
+
function handleKeyboardActivate(event) {
|
|
100986
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
100987
|
+
if (!event.currentTarget.matches(":focus-visible")) return;
|
|
100988
|
+
event.preventDefault();
|
|
100989
|
+
event.currentTarget.click();
|
|
100990
|
+
}
|
|
100991
|
+
function parentEditableProps(parent$, key) {
|
|
100992
|
+
var _parent$$key;
|
|
100993
|
+
return (_parent$$key = parent$ === null || parent$ === void 0 ? void 0 : parent$[key]) !== null && _parent$$key !== void 0 ? _parent$$key : {};
|
|
100994
|
+
}
|
|
100995
|
+
function getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in) {
|
|
100996
|
+
var _sign_up$title, _sign_in$title, _effectiveSignUp$titl, _effectiveSignIn$titl;
|
|
100997
|
+
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";
|
|
100998
|
+
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";
|
|
100999
|
+
var effectiveSignUp = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_up) || sign_up;
|
|
101000
|
+
var effectiveSignIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_in) || sign_in;
|
|
101001
|
+
return {
|
|
101002
|
+
effectiveSignUp: effectiveSignUp,
|
|
101003
|
+
effectiveSignIn: effectiveSignIn,
|
|
101004
|
+
effectiveSignUpTitle: (_effectiveSignUp$titl = effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.title) !== null && _effectiveSignUp$titl !== void 0 ? _effectiveSignUp$titl : signUpTitle,
|
|
101005
|
+
effectiveSignInTitle: (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle
|
|
101006
|
+
};
|
|
101007
|
+
}
|
|
101008
|
+
function getIconPresentation(icon, icon_color) {
|
|
101009
|
+
var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
|
|
101010
|
+
var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
|
|
101011
|
+
var normalizedColorName = String(icon_color !== null && icon_color !== void 0 ? icon_color : "").trim().toLowerCase();
|
|
101012
|
+
return {
|
|
101013
|
+
resolvedIconName: resolvedIconName,
|
|
101014
|
+
resolvedIconColor: ICON_COLOR_MAP[normalizedColorName]
|
|
101015
|
+
};
|
|
101016
|
+
}
|
|
101017
|
+
function handleSignUpNavigate(editing, url) {
|
|
101018
|
+
if (editing) return;
|
|
101019
|
+
navigateToUrl(url);
|
|
101020
|
+
}
|
|
101021
|
+
function handleSignInActivate(editing, isMobile, setIsModalOpen, url) {
|
|
101022
|
+
if (editing) return;
|
|
101023
|
+
if (isMobile) {
|
|
101024
|
+
setIsModalOpen(true);
|
|
101025
|
+
return;
|
|
101026
|
+
}
|
|
101027
|
+
navigateToUrl(url);
|
|
101028
|
+
}
|
|
101029
|
+
function handleModalAuthNavigate(editing, closeModal, url) {
|
|
101030
|
+
if (editing) return;
|
|
101031
|
+
closeModal();
|
|
101032
|
+
navigateToUrl(url);
|
|
101033
|
+
}
|
|
101034
|
+
function mergeAuthLinksFromService(links, sign_up, sign_in) {
|
|
101035
|
+
if (!links) return {
|
|
101036
|
+
sign_up: sign_up,
|
|
101037
|
+
sign_in: sign_in
|
|
101038
|
+
};
|
|
101039
|
+
return {
|
|
101040
|
+
sign_up: links.sign_up || links.signUp || sign_up,
|
|
101041
|
+
sign_in: links.sign_in || links.signIn || sign_in
|
|
101042
|
+
};
|
|
101043
|
+
}
|
|
101044
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.hooks.js
|
|
101045
|
+
function SignUpOrSignIn_hooks_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_hooks_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_hooks_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_hooks_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpOrSignIn_hooks_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpOrSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpOrSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpOrSignIn_hooks_regeneratorDefine2(u), SignUpOrSignIn_hooks_regeneratorDefine2(u, o, "Generator"), SignUpOrSignIn_hooks_regeneratorDefine2(u, n, function () { return this; }), SignUpOrSignIn_hooks_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpOrSignIn_hooks_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
101046
|
+
function SignUpOrSignIn_hooks_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpOrSignIn_hooks_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpOrSignIn_hooks_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_hooks_regeneratorDefine2(e, r, n, t); }
|
|
101047
|
+
function SignUpOrSignIn_hooks_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); }
|
|
101048
|
+
function SignUpOrSignIn_hooks_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_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpOrSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
101049
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || SignUpOrSignIn_hooks_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
101050
|
+
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."); }
|
|
101051
|
+
function SignUpOrSignIn_hooks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpOrSignIn_hooks_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_hooks_arrayLikeToArray(r, a) : void 0; } }
|
|
101052
|
+
function SignUpOrSignIn_hooks_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; }
|
|
101053
|
+
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; } }
|
|
101054
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101008
101055
|
|
|
101009
101056
|
|
|
101057
|
+
function useIsMobileViewport() {
|
|
101058
|
+
var _useState = (0,external_react_.useState)(false),
|
|
101059
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101060
|
+
isMobile = _useState2[0],
|
|
101061
|
+
setIsMobile = _useState2[1];
|
|
101062
|
+
(0,external_react_.useEffect)(function () {
|
|
101063
|
+
var browserWindow = globalThis.window;
|
|
101064
|
+
if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.matchMedia)) return undefined;
|
|
101065
|
+
var mediaQuery = browserWindow.matchMedia("(max-width: 1024px)");
|
|
101066
|
+
var sync = function sync() {
|
|
101067
|
+
return setIsMobile(mediaQuery.matches);
|
|
101068
|
+
};
|
|
101069
|
+
sync();
|
|
101070
|
+
mediaQuery.addEventListener("change", sync);
|
|
101071
|
+
return function () {
|
|
101072
|
+
return mediaQuery.removeEventListener("change", sync);
|
|
101073
|
+
};
|
|
101074
|
+
}, []);
|
|
101075
|
+
return isMobile;
|
|
101076
|
+
}
|
|
101077
|
+
function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
101078
|
+
var _useState3 = (0,external_react_.useState)({
|
|
101079
|
+
sign_up: sign_up,
|
|
101080
|
+
sign_in: sign_in
|
|
101081
|
+
}),
|
|
101082
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
101083
|
+
resolvedLinks = _useState4[0],
|
|
101084
|
+
setResolvedLinks = _useState4[1];
|
|
101085
|
+
(0,external_react_.useEffect)(function () {
|
|
101086
|
+
setResolvedLinks({
|
|
101087
|
+
sign_up: sign_up,
|
|
101088
|
+
sign_in: sign_in
|
|
101089
|
+
});
|
|
101090
|
+
}, [sign_up, sign_in]);
|
|
101091
|
+
(0,external_react_.useEffect)(function () {
|
|
101092
|
+
var canceled = false;
|
|
101093
|
+
var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
|
|
101094
|
+
if (!canResolve) return undefined;
|
|
101095
|
+
SignUpOrSignIn_hooks_asyncToGenerator(/*#__PURE__*/SignUpOrSignIn_hooks_regenerator().m(function _callee() {
|
|
101096
|
+
var links, _t;
|
|
101097
|
+
return SignUpOrSignIn_hooks_regenerator().w(function (_context) {
|
|
101098
|
+
while (1) switch (_context.p = _context.n) {
|
|
101099
|
+
case 0:
|
|
101100
|
+
_context.p = 0;
|
|
101101
|
+
_context.n = 1;
|
|
101102
|
+
return authService.getAuthLinks();
|
|
101103
|
+
case 1:
|
|
101104
|
+
links = _context.v;
|
|
101105
|
+
if (!canceled && links) {
|
|
101106
|
+
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in));
|
|
101107
|
+
}
|
|
101108
|
+
_context.n = 3;
|
|
101109
|
+
break;
|
|
101110
|
+
case 2:
|
|
101111
|
+
_context.p = 2;
|
|
101112
|
+
_t = _context.v;
|
|
101113
|
+
case 3:
|
|
101114
|
+
return _context.a(2);
|
|
101115
|
+
}
|
|
101116
|
+
}, _callee, null, [[0, 2]]);
|
|
101117
|
+
}))();
|
|
101118
|
+
return function () {
|
|
101119
|
+
canceled = true;
|
|
101120
|
+
};
|
|
101121
|
+
}, [authService, sign_in, sign_up]);
|
|
101122
|
+
return resolvedLinks;
|
|
101123
|
+
}
|
|
101124
|
+
function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
101125
|
+
(0,external_react_.useEffect)(function () {
|
|
101126
|
+
var _globalThis$window;
|
|
101127
|
+
if (!isModalOpen) return undefined;
|
|
101128
|
+
var onKeyDown = function onKeyDown(e) {
|
|
101129
|
+
if (e.key !== "Escape") return;
|
|
101130
|
+
setIsModalOpen(false);
|
|
101131
|
+
};
|
|
101132
|
+
(_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || _globalThis$window.addEventListener("keydown", onKeyDown);
|
|
101133
|
+
return function () {
|
|
101134
|
+
var _globalThis$window2;
|
|
101135
|
+
return (_globalThis$window2 = globalThis.window) === null || _globalThis$window2 === void 0 ? void 0 : _globalThis$window2.removeEventListener("keydown", onKeyDown);
|
|
101136
|
+
};
|
|
101137
|
+
}, [isModalOpen, setIsModalOpen]);
|
|
101138
|
+
}
|
|
101139
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.styled.jsx
|
|
101140
|
+
|
|
101141
|
+
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)."; }
|
|
101142
|
+
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
101143
|
+
var SignUpOrSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
101144
|
+
target: "ehh9sxh17"
|
|
101145
|
+
} : 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);padding:4px 8px 4px 5px;@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));
|
|
101146
|
+
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
101147
|
+
target: "ehh9sxh16"
|
|
101148
|
+
} : 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));
|
|
101149
|
+
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101150
|
+
target: "ehh9sxh15"
|
|
101151
|
+
} : 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;&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
|
|
101152
|
+
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101153
|
+
target: "ehh9sxh14"
|
|
101154
|
+
} : 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));
|
|
101155
|
+
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
101156
|
+
target: "ehh9sxh13"
|
|
101157
|
+
} : 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 6px;font-size:20px;line-height:1;}" + ( true ? "" : 0));
|
|
101158
|
+
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101159
|
+
target: "ehh9sxh12"
|
|
101160
|
+
} : 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));
|
|
101161
|
+
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
101162
|
+
target: "ehh9sxh11"
|
|
101163
|
+
} : 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));
|
|
101164
|
+
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
101165
|
+
target: "ehh9sxh10"
|
|
101166
|
+
} : 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));
|
|
101167
|
+
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
101168
|
+
target: "ehh9sxh9"
|
|
101169
|
+
} : 0)( true ? {
|
|
101170
|
+
name: "wbibpl",
|
|
101171
|
+
styles: "display:flex;align-items:flex-start;justify-content:flex-end;width:100%;min-height:44px;padding:12px 18px 0;box-sizing:border-box"
|
|
101172
|
+
} : 0);
|
|
101173
|
+
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
101174
|
+
target: "ehh9sxh8"
|
|
101175
|
+
} : 0)( true ? {
|
|
101176
|
+
name: "1m9bk8n",
|
|
101177
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
101178
|
+
} : 0);
|
|
101179
|
+
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101180
|
+
target: "ehh9sxh7"
|
|
101181
|
+
} : 0)( true ? {
|
|
101182
|
+
name: "u33vv4",
|
|
101183
|
+
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;}"
|
|
101184
|
+
} : 0);
|
|
101185
|
+
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
101186
|
+
target: "ehh9sxh6"
|
|
101187
|
+
} : 0)( true ? {
|
|
101188
|
+
name: "150yav4",
|
|
101189
|
+
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;}"
|
|
101190
|
+
} : 0);
|
|
101191
|
+
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
101192
|
+
target: "ehh9sxh5"
|
|
101193
|
+
} : 0)( true ? {
|
|
101194
|
+
name: "dbqp8z",
|
|
101195
|
+
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
101196
|
+
} : 0);
|
|
101197
|
+
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
101198
|
+
target: "ehh9sxh4"
|
|
101199
|
+
} : 0)( true ? {
|
|
101200
|
+
name: "phcu5u",
|
|
101201
|
+
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;}}"
|
|
101202
|
+
} : 0);
|
|
101203
|
+
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
101204
|
+
target: "ehh9sxh3"
|
|
101205
|
+
} : 0)( true ? {
|
|
101206
|
+
name: "1kyoijh",
|
|
101207
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
101208
|
+
} : 0);
|
|
101209
|
+
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
101210
|
+
target: "ehh9sxh2"
|
|
101211
|
+
} : 0)( true ? {
|
|
101212
|
+
name: "18ee69d",
|
|
101213
|
+
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
101214
|
+
} : 0);
|
|
101215
|
+
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101216
|
+
target: "ehh9sxh1"
|
|
101217
|
+
} : 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));
|
|
101218
|
+
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101219
|
+
target: "ehh9sxh0"
|
|
101220
|
+
} : 0)( true ? {
|
|
101221
|
+
name: "16bjh6l",
|
|
101222
|
+
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;}"
|
|
101223
|
+
} : 0);
|
|
101224
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.jsx
|
|
101225
|
+
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); }
|
|
101226
|
+
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; }
|
|
101227
|
+
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; }
|
|
101228
|
+
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; }
|
|
101229
|
+
function SignUpOrSignIn_toPropertyKey(t) { var i = SignUpOrSignIn_toPrimitive(t, "string"); return "symbol" == SignUpOrSignIn_typeof(i) ? i : i + ""; }
|
|
101230
|
+
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); }
|
|
101231
|
+
function SignUpOrSignIn_slicedToArray(r, e) { return SignUpOrSignIn_arrayWithHoles(r) || SignUpOrSignIn_iterableToArrayLimit(r, e) || SignUpOrSignIn_unsupportedIterableToArray(r, e) || SignUpOrSignIn_nonIterableRest(); }
|
|
101232
|
+
function SignUpOrSignIn_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."); }
|
|
101233
|
+
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; } }
|
|
101234
|
+
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; }
|
|
101235
|
+
function SignUpOrSignIn_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; } }
|
|
101236
|
+
function SignUpOrSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101237
|
+
|
|
101238
|
+
|
|
101239
|
+
|
|
101240
|
+
|
|
101241
|
+
|
|
101242
|
+
|
|
101243
|
+
|
|
101244
|
+
|
|
101245
|
+
var DEFAULT_MODAL_COPY = {
|
|
101246
|
+
close_dialog_aria_label: "Close dialog",
|
|
101247
|
+
sign_in_heading: "Sign In",
|
|
101248
|
+
sign_in_message: "Have an account already? Please sign in.",
|
|
101249
|
+
sign_in_cta_label: "Sign In",
|
|
101250
|
+
sign_up_heading: "Sign Up",
|
|
101251
|
+
sign_up_message: "New user? Please Sign up to continue",
|
|
101252
|
+
sign_up_cta_label: "Create Account",
|
|
101253
|
+
sign_up_cta_aria_label: "Create Account"
|
|
101254
|
+
};
|
|
101255
|
+
function SignUpOrSignIn(_ref) {
|
|
101256
|
+
var _ref$show = _ref.show,
|
|
101257
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
101258
|
+
_ref$icon = _ref.icon,
|
|
101259
|
+
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
101260
|
+
icon_color = _ref.icon_color,
|
|
101261
|
+
_ref$sign_up = _ref.sign_up,
|
|
101262
|
+
sign_up = _ref$sign_up === void 0 ? DEFAULT_SIGN_UP : _ref$sign_up,
|
|
101263
|
+
_ref$sign_in = _ref.sign_in,
|
|
101264
|
+
sign_in = _ref$sign_in === void 0 ? DEFAULT_SIGN_IN : _ref$sign_in,
|
|
101265
|
+
_ref$modal_copy = _ref.modal_copy,
|
|
101266
|
+
modal_copy = _ref$modal_copy === void 0 ? DEFAULT_MODAL_COPY : _ref$modal_copy,
|
|
101267
|
+
_ref$authService = _ref.authService,
|
|
101268
|
+
authService = _ref$authService === void 0 ? undefined : _ref$authService,
|
|
101269
|
+
_ref$parent$ = _ref.parent$,
|
|
101270
|
+
parent$ = _ref$parent$ === void 0 ? undefined : _ref$parent$;
|
|
101271
|
+
var isMobile = useIsMobileViewport();
|
|
101272
|
+
var _useState = (0,external_react_.useState)(false),
|
|
101273
|
+
_useState2 = SignUpOrSignIn_slicedToArray(_useState, 2),
|
|
101274
|
+
isModalOpen = _useState2[0],
|
|
101275
|
+
setIsModalOpen = _useState2[1];
|
|
101276
|
+
var resolvedLinks = useResolvedAuthLinks(sign_up, sign_in, authService);
|
|
101277
|
+
var editing = isEditingMode();
|
|
101278
|
+
var _getEffectiveAuthDisp = getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in),
|
|
101279
|
+
effectiveSignUp = _getEffectiveAuthDisp.effectiveSignUp,
|
|
101280
|
+
effectiveSignIn = _getEffectiveAuthDisp.effectiveSignIn,
|
|
101281
|
+
effectiveSignUpTitle = _getEffectiveAuthDisp.effectiveSignUpTitle,
|
|
101282
|
+
effectiveSignInTitle = _getEffectiveAuthDisp.effectiveSignInTitle;
|
|
101283
|
+
var _getIconPresentation = getIconPresentation(icon, icon_color),
|
|
101284
|
+
resolvedIconName = _getIconPresentation.resolvedIconName,
|
|
101285
|
+
resolvedIconColor = _getIconPresentation.resolvedIconColor;
|
|
101286
|
+
var closeModal = function closeModal() {
|
|
101287
|
+
return setIsModalOpen(false);
|
|
101288
|
+
};
|
|
101289
|
+
var showMobileModal = isMobile && isModalOpen;
|
|
101290
|
+
useEscapeToCloseModal(isModalOpen, setIsModalOpen);
|
|
101291
|
+
if (!show) return null;
|
|
101292
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpOrSignInRoot, {
|
|
101293
|
+
"data-testid": "signup-signin",
|
|
101294
|
+
children: [!isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
101295
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101296
|
+
"data-testid": "signup-link",
|
|
101297
|
+
"aria-label": effectiveSignUpTitle,
|
|
101298
|
+
type: "button"
|
|
101299
|
+
}, parentEditableProps(parent$, "sign_up_url")), {}, {
|
|
101300
|
+
onClick: function onClick() {
|
|
101301
|
+
return handleSignUpNavigate(editing, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101302
|
+
},
|
|
101303
|
+
onKeyDown: handleKeyboardActivate,
|
|
101304
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
|
|
101305
|
+
className: "icon-container",
|
|
101306
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
|
|
101307
|
+
"aria-hidden": true,
|
|
101308
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
101309
|
+
name: resolvedIconName,
|
|
101310
|
+
size: "large",
|
|
101311
|
+
colorOverride: resolvedIconColor
|
|
101312
|
+
})
|
|
101313
|
+
}))
|
|
101314
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101315
|
+
as: "span"
|
|
101316
|
+
}, parentEditableProps(parent$, "sign_up")), {}, {
|
|
101317
|
+
children: effectiveSignUpTitle
|
|
101318
|
+
}))]
|
|
101319
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
101320
|
+
"aria-hidden": true,
|
|
101321
|
+
children: "/"
|
|
101322
|
+
})]
|
|
101323
|
+
}) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101324
|
+
"data-testid": "signin-button",
|
|
101325
|
+
"aria-label": effectiveSignInTitle
|
|
101326
|
+
}, parentEditableProps(parent$, "sign_in_url")), {}, {
|
|
101327
|
+
onClick: function onClick() {
|
|
101328
|
+
return handleSignInActivate(editing, isMobile, setIsModalOpen, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101329
|
+
},
|
|
101330
|
+
onKeyDown: handleKeyboardActivate,
|
|
101331
|
+
type: "button",
|
|
101332
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
101333
|
+
children: effectiveSignInTitle
|
|
101334
|
+
}))
|
|
101335
|
+
})), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
101336
|
+
"data-testid": "signin-modal-backdrop",
|
|
101337
|
+
onClick: closeModal,
|
|
101338
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
101339
|
+
open: true,
|
|
101340
|
+
"aria-modal": "true",
|
|
101341
|
+
"aria-label": effectiveSignInTitle,
|
|
101342
|
+
onClick: function onClick(e) {
|
|
101343
|
+
return e.stopPropagation();
|
|
101344
|
+
},
|
|
101345
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
101346
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
101347
|
+
"data-testid": "signin-modal-cancel",
|
|
101348
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
|
|
101349
|
+
type: "button",
|
|
101350
|
+
onClick: closeModal,
|
|
101351
|
+
children: "\xD7"
|
|
101352
|
+
})
|
|
101353
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
101354
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
101355
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101356
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101357
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
101358
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101359
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
101360
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
101361
|
+
type: "button",
|
|
101362
|
+
"data-testid": "signin-modal-signin-cta",
|
|
101363
|
+
onClick: function onClick() {
|
|
101364
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101365
|
+
},
|
|
101366
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
101367
|
+
})]
|
|
101368
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101369
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101370
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
101371
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101372
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
101373
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
101374
|
+
"data-testid": "signin-modal-create-account-cta",
|
|
101375
|
+
type: "button",
|
|
101376
|
+
onClick: function onClick() {
|
|
101377
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101378
|
+
},
|
|
101379
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
101380
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
101381
|
+
})]
|
|
101382
|
+
})]
|
|
101383
|
+
})
|
|
101384
|
+
})]
|
|
101385
|
+
})
|
|
101386
|
+
}) : null]
|
|
101387
|
+
});
|
|
101388
|
+
}
|
|
101389
|
+
SignUpOrSignIn.propTypes = {
|
|
101390
|
+
show: external_prop_types_["default"].bool,
|
|
101391
|
+
icon: external_prop_types_["default"].string,
|
|
101392
|
+
icon_color: external_prop_types_["default"].string,
|
|
101393
|
+
sign_up: external_prop_types_["default"].shape({
|
|
101394
|
+
title: external_prop_types_["default"].string,
|
|
101395
|
+
url: external_prop_types_["default"].string
|
|
101396
|
+
}),
|
|
101397
|
+
sign_in: external_prop_types_["default"].shape({
|
|
101398
|
+
title: external_prop_types_["default"].string,
|
|
101399
|
+
url: external_prop_types_["default"].string
|
|
101400
|
+
}),
|
|
101401
|
+
modal_copy: external_prop_types_["default"].shape({
|
|
101402
|
+
close_dialog_aria_label: external_prop_types_["default"].string,
|
|
101403
|
+
sign_in_heading: external_prop_types_["default"].string,
|
|
101404
|
+
sign_in_message: external_prop_types_["default"].string,
|
|
101405
|
+
sign_in_cta_label: external_prop_types_["default"].string,
|
|
101406
|
+
sign_up_heading: external_prop_types_["default"].string,
|
|
101407
|
+
sign_up_message: external_prop_types_["default"].string,
|
|
101408
|
+
sign_up_cta_label: external_prop_types_["default"].string,
|
|
101409
|
+
sign_up_cta_aria_label: external_prop_types_["default"].string
|
|
101410
|
+
}),
|
|
101411
|
+
authService: external_prop_types_["default"].shape({
|
|
101412
|
+
getAuthLinks: external_prop_types_["default"].func
|
|
101413
|
+
}),
|
|
101414
|
+
parent$: external_prop_types_["default"].shape({
|
|
101415
|
+
icon: external_prop_types_["default"].object,
|
|
101416
|
+
icon_color: external_prop_types_["default"].object,
|
|
101417
|
+
sign_up: external_prop_types_["default"].object,
|
|
101418
|
+
sign_up_url: external_prop_types_["default"].object,
|
|
101419
|
+
sign_in: external_prop_types_["default"].object,
|
|
101420
|
+
sign_in_url: external_prop_types_["default"].object
|
|
101421
|
+
})
|
|
101422
|
+
};
|
|
101423
|
+
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
101424
|
+
|
|
101010
101425
|
|
|
101011
101426
|
|
|
101012
101427
|
|
|
101013
101428
|
function HeaderAccountRegion(_ref) {
|
|
101014
|
-
var data = _ref.data
|
|
101015
|
-
|
|
101016
|
-
|
|
101017
|
-
|
|
101018
|
-
|
|
101019
|
-
|
|
101020
|
-
|
|
101021
|
-
|
|
101022
|
-
|
|
101023
|
-
|
|
101024
|
-
|
|
101025
|
-
className: "account-divider",
|
|
101026
|
-
children: "/"
|
|
101027
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, {
|
|
101028
|
-
type: "button",
|
|
101029
|
-
className: "account-sign-in",
|
|
101030
|
-
children: data.sign_in_label
|
|
101031
|
-
})]
|
|
101429
|
+
var data = _ref.data,
|
|
101430
|
+
parent$ = _ref.parent$;
|
|
101431
|
+
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
101432
|
+
if (!show) return null;
|
|
101433
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpOrSignIn, {
|
|
101434
|
+
show: show,
|
|
101435
|
+
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
101436
|
+
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
101437
|
+
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
101438
|
+
sign_in: data === null || data === void 0 ? void 0 : data.sign_in,
|
|
101439
|
+
parent$: parent$
|
|
101032
101440
|
});
|
|
101033
101441
|
}
|
|
101034
101442
|
HeaderAccountRegion.propTypes = {
|
|
101035
101443
|
data: external_prop_types_["default"].shape({
|
|
101036
|
-
|
|
101037
|
-
|
|
101038
|
-
|
|
101444
|
+
show: external_prop_types_["default"].bool,
|
|
101445
|
+
icon: external_prop_types_["default"].string,
|
|
101446
|
+
icon_color: external_prop_types_["default"].string,
|
|
101447
|
+
sign_up: external_prop_types_["default"].shape({
|
|
101448
|
+
title: external_prop_types_["default"].string,
|
|
101449
|
+
url: external_prop_types_["default"].string
|
|
101450
|
+
}),
|
|
101451
|
+
sign_in: external_prop_types_["default"].shape({
|
|
101452
|
+
title: external_prop_types_["default"].string,
|
|
101453
|
+
url: external_prop_types_["default"].string
|
|
101454
|
+
})
|
|
101455
|
+
}),
|
|
101456
|
+
parent$: external_prop_types_["default"].shape({
|
|
101457
|
+
icon: external_prop_types_["default"].object,
|
|
101458
|
+
icon_color: external_prop_types_["default"].object,
|
|
101459
|
+
sign_up: external_prop_types_["default"].object,
|
|
101460
|
+
sign_up_url: external_prop_types_["default"].object,
|
|
101461
|
+
sign_in: external_prop_types_["default"].object,
|
|
101462
|
+
sign_in_url: external_prop_types_["default"].object
|
|
101463
|
+
})
|
|
101039
101464
|
};
|
|
101040
101465
|
;// ./src/components/cart/Cart.styled.jsx
|
|
101041
101466
|
|
|
@@ -101138,8 +101563,6 @@ HeaderCartRegion.defaultProps = {
|
|
|
101138
101563
|
};
|
|
101139
101564
|
// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Close.js
|
|
101140
101565
|
var Close = __webpack_require__(9781);
|
|
101141
|
-
// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Search.js
|
|
101142
|
-
var Search = __webpack_require__(4745);
|
|
101143
101566
|
;// ./src/components/input/Input.constants.js
|
|
101144
101567
|
var INPUT_ICON_POSITIONS = {
|
|
101145
101568
|
START: "start",
|
|
@@ -101306,7 +101729,7 @@ var Root = /*#__PURE__*/createStyled("div", true ? {
|
|
|
101306
101729
|
var $disabled = _ref9.$disabled;
|
|
101307
101730
|
return $disabled ? "\n opacity: 0.6;\n cursor: not-allowed;\n " : "\n cursor: text;\n ";
|
|
101308
101731
|
}, "@media (max-width: 340px){width:100%;}" + ( true ? "" : 0));
|
|
101309
|
-
var
|
|
101732
|
+
var Input_styled_IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101310
101733
|
target: "ec07usz3"
|
|
101311
101734
|
} : 0)("display:inline-flex;align-items:center;justify-content:center;width:", function (_ref0) {
|
|
101312
101735
|
var $size = _ref0.$size;
|
|
@@ -101367,12 +101790,12 @@ var InputPropTypes = {
|
|
|
101367
101790
|
className: external_prop_types_["default"].string
|
|
101368
101791
|
};
|
|
101369
101792
|
;// ./src/components/input/Input.jsx
|
|
101370
|
-
function
|
|
101371
|
-
function
|
|
101793
|
+
function Input_slicedToArray(r, e) { return Input_arrayWithHoles(r) || Input_iterableToArrayLimit(r, e) || Input_unsupportedIterableToArray(r, e) || Input_nonIterableRest(); }
|
|
101794
|
+
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."); }
|
|
101372
101795
|
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; } }
|
|
101373
101796
|
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; }
|
|
101374
|
-
function
|
|
101375
|
-
function
|
|
101797
|
+
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; } }
|
|
101798
|
+
function Input_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101376
101799
|
|
|
101377
101800
|
|
|
101378
101801
|
|
|
@@ -101401,7 +101824,7 @@ function Input(props) {
|
|
|
101401
101824
|
className = props.className;
|
|
101402
101825
|
var inputRef = (0,external_react_.useRef)(null);
|
|
101403
101826
|
var _useState = (0,external_react_.useState)(false),
|
|
101404
|
-
_useState2 =
|
|
101827
|
+
_useState2 = Input_slicedToArray(_useState, 2),
|
|
101405
101828
|
internalFocused = _useState2[0],
|
|
101406
101829
|
setInternalFocused = _useState2[1];
|
|
101407
101830
|
var canRender = typeof _onChange === "function";
|
|
@@ -101445,12 +101868,15 @@ function Input(props) {
|
|
|
101445
101868
|
var inputTestId = "".concat(rootTestId, "-input");
|
|
101446
101869
|
var iconTestId = "".concat(rootTestId, "-icon");
|
|
101447
101870
|
var clearTestId = "".concat(rootTestId, "-clear");
|
|
101448
|
-
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
101871
|
+
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(Input_styled_IconWrap, {
|
|
101449
101872
|
"aria-hidden": "true",
|
|
101450
101873
|
"data-testid": iconTestId,
|
|
101451
101874
|
$size: normalizedSize,
|
|
101452
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
101453
|
-
|
|
101875
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
101876
|
+
name: "search",
|
|
101877
|
+
size: "medium",
|
|
101878
|
+
colorOverride: "currentColor",
|
|
101879
|
+
"aria-hidden": true
|
|
101454
101880
|
})
|
|
101455
101881
|
});
|
|
101456
101882
|
var inputEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(TextInput, {
|
|
@@ -102166,10 +102592,12 @@ function AutoCompleteSearchField(_ref) {
|
|
|
102166
102592
|
"aria-label": "Search",
|
|
102167
102593
|
"data-testid": "autocomplete-search-button"
|
|
102168
102594
|
}, autoCompleteSearchIconTag !== null && autoCompleteSearchIconTag !== void 0 ? autoCompleteSearchIconTag : {}), {}, {
|
|
102169
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
102170
|
-
|
|
102171
|
-
"
|
|
102172
|
-
|
|
102595
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
102596
|
+
name: "search",
|
|
102597
|
+
size: "medium",
|
|
102598
|
+
testId: "autocomplete-search-icon",
|
|
102599
|
+
colorOverride: "currentColor",
|
|
102600
|
+
"aria-hidden": true
|
|
102173
102601
|
})
|
|
102174
102602
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)("input", AutoCompleteSearchField_objectSpread(AutoCompleteSearchField_objectSpread({
|
|
102175
102603
|
ref: inputRef,
|
|
@@ -103149,7 +103577,7 @@ var MobileSearchButton = /*#__PURE__*/createStyled("button", true ? {
|
|
|
103149
103577
|
} : 0);
|
|
103150
103578
|
var DesktopSearchWrapper = /*#__PURE__*/createStyled("button", true ? {
|
|
103151
103579
|
target: "etuykaq11"
|
|
103152
|
-
} : 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:
|
|
103580
|
+
} : 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) {
|
|
103153
103581
|
var $sizeVariant = _ref.$sizeVariant;
|
|
103154
103582
|
return $sizeVariant === "full" ? "100%" : "min(100%, 320px)";
|
|
103155
103583
|
}, ";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));
|
|
@@ -103170,7 +103598,7 @@ var ModalOverlay = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103170
103598
|
} : 0);
|
|
103171
103599
|
var ModalPanel = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103172
103600
|
target: "etuykaq7"
|
|
103173
|
-
} : 0)("box-sizing:border-box;background:", SearchModal_styled_colors.surface, ";width:100%;flex:1;min-height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:
|
|
103601
|
+
} : 0)("box-sizing:border-box;background:", SearchModal_styled_colors.surface, ";width:100%;flex:1;min-height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:30px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.08);border:none;margin:0;max-width:none;max-height:none;@media (max-width: 767px){padding:30px 0;}@media (min-width: 768px) and (max-width: 1023px){padding:30px 0 35px;}@media (min-width: 1024px){flex:0 0 auto;min-height:unset;padding:20px clamp(12px, 4vw, 32px) 45px;}" + ( true ? "" : 0));
|
|
103174
103602
|
var ModalTopBar = /*#__PURE__*/createStyled("div", true ? {
|
|
103175
103603
|
target: "etuykaq6"
|
|
103176
103604
|
} : 0)( true ? {
|
|
@@ -103245,7 +103673,6 @@ function SearchModal_toPrimitive(t, r) { if ("object" != SearchModal_typeof(t) |
|
|
|
103245
103673
|
|
|
103246
103674
|
|
|
103247
103675
|
|
|
103248
|
-
|
|
103249
103676
|
function getFocusableElementsInPanel(panel) {
|
|
103250
103677
|
if (!panel) return [];
|
|
103251
103678
|
return Array.from(panel.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(function (el) {
|
|
@@ -103303,10 +103730,12 @@ function renderMobileTrigger(_ref2) {
|
|
|
103303
103730
|
"aria-expanded": isOpen,
|
|
103304
103731
|
onClick: openModal,
|
|
103305
103732
|
"data-testid": "search-modal-trigger-mobile",
|
|
103306
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
103307
|
-
|
|
103308
|
-
"
|
|
103309
|
-
|
|
103733
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
103734
|
+
name: "search",
|
|
103735
|
+
size: "large",
|
|
103736
|
+
testId: "search",
|
|
103737
|
+
colorOverride: "currentColor",
|
|
103738
|
+
"aria-hidden": true
|
|
103310
103739
|
})
|
|
103311
103740
|
});
|
|
103312
103741
|
}
|
|
@@ -103335,10 +103764,12 @@ function renderDesktopTrigger(_ref3) {
|
|
|
103335
103764
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerIconButton, SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103336
103765
|
"data-testid": "search-trigger-button"
|
|
103337
103766
|
}, (_activeEditableTags$t = activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.triggerIcon) !== null && _activeEditableTags$t !== void 0 ? _activeEditableTags$t : {}), {}, {
|
|
103338
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
103339
|
-
|
|
103340
|
-
"
|
|
103341
|
-
|
|
103767
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
103768
|
+
name: "search",
|
|
103769
|
+
size: "large",
|
|
103770
|
+
testId: "search",
|
|
103771
|
+
colorOverride: "currentColor",
|
|
103772
|
+
"aria-hidden": true
|
|
103342
103773
|
})
|
|
103343
103774
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerInput, SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103344
103775
|
"data-testid": "search-trigger-input"
|
|
@@ -103357,13 +103788,6 @@ function SearchModal(_ref4) {
|
|
|
103357
103788
|
onSearch = _ref4$onSearch === void 0 ? function () {} : _ref4$onSearch,
|
|
103358
103789
|
_ref4$modalTitle = _ref4.modalTitle,
|
|
103359
103790
|
modalTitle = _ref4$modalTitle === void 0 ? MODAL_TITLE : _ref4$modalTitle,
|
|
103360
|
-
brandLogo = _ref4.brandLogo,
|
|
103361
|
-
brandLogoAlt = _ref4.brandLogoAlt,
|
|
103362
|
-
brandHref = _ref4.brandHref,
|
|
103363
|
-
_ref4$brandSize = _ref4.brandSize,
|
|
103364
|
-
brandSize = _ref4$brandSize === void 0 ? "Medium" : _ref4$brandSize,
|
|
103365
|
-
_ref4$showBrandLogo = _ref4.showBrandLogo,
|
|
103366
|
-
showBrandLogo = _ref4$showBrandLogo === void 0 ? true : _ref4$showBrandLogo,
|
|
103367
103791
|
_ref4$cancelLabel = _ref4.cancelLabel,
|
|
103368
103792
|
cancelLabel = _ref4$cancelLabel === void 0 ? "Cancel" : _ref4$cancelLabel,
|
|
103369
103793
|
_ref4$cancelShowIcon = _ref4.cancelShowIcon,
|
|
@@ -103382,6 +103806,8 @@ function SearchModal(_ref4) {
|
|
|
103382
103806
|
clearAllLabel = _ref4$clearAllLabel === void 0 ? "Clear all" : _ref4$clearAllLabel,
|
|
103383
103807
|
_ref4$parent$ = _ref4.parent$,
|
|
103384
103808
|
parent$ = _ref4$parent$ === void 0 ? undefined : _ref4$parent$,
|
|
103809
|
+
_ref4$logo = _ref4.logo,
|
|
103810
|
+
logo = _ref4$logo === void 0 ? undefined : _ref4$logo,
|
|
103385
103811
|
_ref4$inputSize = _ref4.inputSize,
|
|
103386
103812
|
inputSize = _ref4$inputSize === void 0 ? DEFAULT_INPUT_SIZE : _ref4$inputSize,
|
|
103387
103813
|
_ref4$inputSizeVarian = _ref4.inputSizeVariant,
|
|
@@ -103390,7 +103816,6 @@ function SearchModal(_ref4) {
|
|
|
103390
103816
|
showMobileTrigger = _ref4$showMobileTrigg === void 0 ? true : _ref4$showMobileTrigg,
|
|
103391
103817
|
_ref4$showDesktopTrig = _ref4.showDesktopTrigger,
|
|
103392
103818
|
showDesktopTrigger = _ref4$showDesktopTrig === void 0 ? true : _ref4$showDesktopTrig;
|
|
103393
|
-
var editing = isEditingMode();
|
|
103394
103819
|
var activeEditableTags = parent$;
|
|
103395
103820
|
var _useState = (0,external_react_.useState)(false),
|
|
103396
103821
|
_useState2 = SearchModal_slicedToArray(_useState, 2),
|
|
@@ -103556,18 +103981,13 @@ function SearchModal(_ref4) {
|
|
|
103556
103981
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SearchModal_styled_LogoSlot, {
|
|
103557
103982
|
"data-testid": "search-modal-logo-slot",
|
|
103558
103983
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
103559
|
-
|
|
103560
|
-
|
|
103561
|
-
|
|
103562
|
-
|
|
103563
|
-
showLogo:
|
|
103564
|
-
|
|
103565
|
-
|
|
103566
|
-
logo_url: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.logoUrl,
|
|
103567
|
-
show_logo: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.showBrandLogo,
|
|
103568
|
-
logo_size: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.brandSize
|
|
103569
|
-
},
|
|
103570
|
-
isEditing: editing
|
|
103984
|
+
"data-testid": "search-modal-logo",
|
|
103985
|
+
logo: logo === null || logo === void 0 ? void 0 : logo.logo,
|
|
103986
|
+
logoAlt: logo === null || logo === void 0 ? void 0 : logo.logoAlt,
|
|
103987
|
+
href: logo === null || logo === void 0 ? void 0 : logo.href,
|
|
103988
|
+
showLogo: logo === null || logo === void 0 ? void 0 : logo.showLogo,
|
|
103989
|
+
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
103990
|
+
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
103571
103991
|
})
|
|
103572
103992
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103573
103993
|
onPointerDown: function onPointerDown() {
|
|
@@ -103594,11 +104014,6 @@ SearchModal.propTypes = {
|
|
|
103594
104014
|
searchPlaceholder: external_prop_types_["default"].string,
|
|
103595
104015
|
onSearch: external_prop_types_["default"].func,
|
|
103596
104016
|
modalTitle: external_prop_types_["default"].string,
|
|
103597
|
-
brandLogo: external_prop_types_["default"].string,
|
|
103598
|
-
brandLogoAlt: external_prop_types_["default"].string,
|
|
103599
|
-
brandHref: external_prop_types_["default"].string,
|
|
103600
|
-
brandSize: external_prop_types_["default"].oneOf(["Small", "Medium", "Large"]),
|
|
103601
|
-
showBrandLogo: external_prop_types_["default"].bool,
|
|
103602
104017
|
cancelLabel: external_prop_types_["default"].string,
|
|
103603
104018
|
cancelShowIcon: external_prop_types_["default"].bool,
|
|
103604
104019
|
headerSearchService: autoCompleteHeaderSearchServiceShape,
|
|
@@ -103608,6 +104023,14 @@ SearchModal.propTypes = {
|
|
|
103608
104023
|
recentSearchesHeading: external_prop_types_["default"].string,
|
|
103609
104024
|
clearAllLabel: external_prop_types_["default"].string,
|
|
103610
104025
|
parent$: external_prop_types_["default"].object,
|
|
104026
|
+
logo: external_prop_types_["default"].shape({
|
|
104027
|
+
logo: external_prop_types_["default"].string,
|
|
104028
|
+
logoAlt: external_prop_types_["default"].string,
|
|
104029
|
+
href: external_prop_types_["default"].string,
|
|
104030
|
+
showLogo: external_prop_types_["default"].bool,
|
|
104031
|
+
size: external_prop_types_["default"].oneOf(["Small", "Medium", "Large"]),
|
|
104032
|
+
$: external_prop_types_["default"].object
|
|
104033
|
+
}),
|
|
103611
104034
|
inputSize: external_prop_types_["default"].oneOf([INPUT_SIZES.SM, INPUT_SIZES.MD, INPUT_SIZES.LG]),
|
|
103612
104035
|
inputSizeVariant: external_prop_types_["default"].oneOf([INPUT_SIZE_VARIANTS.DEFAULT, INPUT_SIZE_VARIANTS.WIDE, INPUT_SIZE_VARIANTS.FULL]),
|
|
103613
104036
|
showMobileTrigger: external_prop_types_["default"].bool,
|
|
@@ -104169,6 +104592,7 @@ function HeaderSearchRegion(_ref) {
|
|
|
104169
104592
|
language = _ref.language,
|
|
104170
104593
|
locale = _ref.locale,
|
|
104171
104594
|
searchConfig = _ref.searchConfig,
|
|
104595
|
+
logo = _ref.logo,
|
|
104172
104596
|
showMobileTrigger = _ref.showMobileTrigger,
|
|
104173
104597
|
showDesktopTrigger = _ref.showDesktopTrigger;
|
|
104174
104598
|
var headerSearchService = (0,external_react_.useMemo)(function () {
|
|
@@ -104231,11 +104655,7 @@ function HeaderSearchRegion(_ref) {
|
|
|
104231
104655
|
return headerSearchService.submitProductSearch(query);
|
|
104232
104656
|
},
|
|
104233
104657
|
modalTitle: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.modalTitle,
|
|
104234
|
-
|
|
104235
|
-
brandLogoAlt: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandLogoAlt,
|
|
104236
|
-
brandHref: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandHref,
|
|
104237
|
-
brandSize: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandSize,
|
|
104238
|
-
showBrandLogo: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.showBrandLogo,
|
|
104658
|
+
logo: logo,
|
|
104239
104659
|
cancelLabel: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelLabel,
|
|
104240
104660
|
cancelShowIcon: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelShowIcon,
|
|
104241
104661
|
showRecentSearches: (_searchConfig$recentS = searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.recentSearchesEnabled) !== null && _searchConfig$recentS !== void 0 ? _searchConfig$recentS : true,
|
|
@@ -104255,6 +104675,14 @@ HeaderSearchRegion.propTypes = {
|
|
|
104255
104675
|
language: external_prop_types_["default"].string.isRequired,
|
|
104256
104676
|
locale: external_prop_types_["default"].string.isRequired,
|
|
104257
104677
|
searchConfig: external_prop_types_["default"].object,
|
|
104678
|
+
logo: external_prop_types_["default"].shape({
|
|
104679
|
+
logo: external_prop_types_["default"].string,
|
|
104680
|
+
logoAlt: external_prop_types_["default"].string,
|
|
104681
|
+
href: external_prop_types_["default"].string,
|
|
104682
|
+
showLogo: external_prop_types_["default"].bool,
|
|
104683
|
+
size: external_prop_types_["default"].oneOf(["Small", "Medium", "Large"]),
|
|
104684
|
+
$: external_prop_types_["default"].object
|
|
104685
|
+
}),
|
|
104258
104686
|
showMobileTrigger: external_prop_types_["default"].bool,
|
|
104259
104687
|
showDesktopTrigger: external_prop_types_["default"].bool
|
|
104260
104688
|
};
|
|
@@ -104544,6 +104972,7 @@ var TopRibbon = function TopRibbon(_ref) {
|
|
|
104544
104972
|
TopRibbon.propTypes = TopRibbonPropTypes;
|
|
104545
104973
|
/* harmony default export */ const top_ribbon_TopRibbon = (TopRibbon);
|
|
104546
104974
|
;// ./src/components/brand/brand.helpers.js
|
|
104975
|
+
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); }
|
|
104547
104976
|
function parseLogoData(logoData) {
|
|
104548
104977
|
if (!logoData) {
|
|
104549
104978
|
return {
|
|
@@ -104565,8 +104994,14 @@ function parseLogoData(logoData) {
|
|
|
104565
104994
|
var logoUrl;
|
|
104566
104995
|
if (header_logo) {
|
|
104567
104996
|
try {
|
|
104568
|
-
var
|
|
104569
|
-
var
|
|
104997
|
+
var _parsed;
|
|
104998
|
+
var parsed;
|
|
104999
|
+
if (typeof header_logo === "string") {
|
|
105000
|
+
parsed = JSON.parse(header_logo);
|
|
105001
|
+
} else if (brand_helpers_typeof(header_logo) === "object") {
|
|
105002
|
+
parsed = header_logo;
|
|
105003
|
+
}
|
|
105004
|
+
var imageArray = (_parsed = parsed) === null || _parsed === void 0 ? void 0 : _parsed.image;
|
|
104570
105005
|
if (Array.isArray(imageArray) && imageArray.length > 0) {
|
|
104571
105006
|
var _firstImage$selected, _firstImage$files, _firstImage$files2;
|
|
104572
105007
|
var firstImage = imageArray[0];
|
|
@@ -106336,7 +106771,7 @@ var HeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
|
106336
106771
|
var LogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
106337
106772
|
target: "e1g1uu3p6"
|
|
106338
106773
|
} : 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));
|
|
106339
|
-
var
|
|
106774
|
+
var MarketSelector_styled_ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
106340
106775
|
target: "e1g1uu3p5"
|
|
106341
106776
|
} : 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));
|
|
106342
106777
|
var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
@@ -106946,7 +107381,7 @@ function renderMarketSelectorModalDesktop(_ref7) {
|
|
|
106946
107381
|
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
106947
107382
|
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
106948
107383
|
})
|
|
106949
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
107384
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector_styled_ModalTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
106950
107385
|
id: "market-selector-modal-title"
|
|
106951
107386
|
}, (_marketSelectorDollar = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar !== void 0 ? _marketSelectorDollar : {}), {}, {
|
|
106952
107387
|
children: text.modalTitle
|
|
@@ -107615,8 +108050,17 @@ var DEFAULT_LOYALTY = {
|
|
|
107615
108050
|
href: "/rewards"
|
|
107616
108051
|
};
|
|
107617
108052
|
var DEFAULT_ACCOUNT = {
|
|
107618
|
-
|
|
107619
|
-
|
|
108053
|
+
show: true,
|
|
108054
|
+
icon: "userOutline",
|
|
108055
|
+
icon_color: undefined,
|
|
108056
|
+
sign_up: {
|
|
108057
|
+
title: "Sign Up",
|
|
108058
|
+
url: ""
|
|
108059
|
+
},
|
|
108060
|
+
sign_in: {
|
|
108061
|
+
title: "Sign In",
|
|
108062
|
+
url: ""
|
|
108063
|
+
}
|
|
107620
108064
|
};
|
|
107621
108065
|
var DEFAULT_CART = {
|
|
107622
108066
|
show_cart_icon: false,
|
|
@@ -107674,24 +108118,111 @@ var DEFAULT_TOP_RIBBON_LINKS = [{
|
|
|
107674
108118
|
url: "/gifts",
|
|
107675
108119
|
ariaLabel: "Shop Gifts"
|
|
107676
108120
|
}];
|
|
107677
|
-
function
|
|
107678
|
-
var
|
|
107679
|
-
|
|
107680
|
-
|
|
107681
|
-
|
|
107682
|
-
|
|
107683
|
-
|
|
108121
|
+
function firstDefined() {
|
|
108122
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
108123
|
+
values[_key] = arguments[_key];
|
|
108124
|
+
}
|
|
108125
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
108126
|
+
var value = _values[_i];
|
|
108127
|
+
if (value !== undefined && value !== null) return value;
|
|
108128
|
+
}
|
|
108129
|
+
return undefined;
|
|
108130
|
+
}
|
|
108131
|
+
function normalizeShowFlag(value) {
|
|
108132
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
108133
|
+
if (value === undefined || value === null) return fallback;
|
|
108134
|
+
if (typeof value === "boolean") return value;
|
|
108135
|
+
var normalized = String(value).trim().toLowerCase();
|
|
108136
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
108137
|
+
return false;
|
|
108138
|
+
}
|
|
108139
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
108140
|
+
return true;
|
|
108141
|
+
}
|
|
108142
|
+
return Boolean(value);
|
|
108143
|
+
}
|
|
108144
|
+
function normalizeUtilityLinksEntries(utilityLinksRaw) {
|
|
108145
|
+
if (Array.isArray(utilityLinksRaw)) return utilityLinksRaw;
|
|
108146
|
+
if (utilityLinksRaw) return [utilityLinksRaw];
|
|
108147
|
+
return [];
|
|
108148
|
+
}
|
|
108149
|
+
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
108150
|
+
return utilityLinksEntries.find(function (entry) {
|
|
108151
|
+
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
108152
|
+
}) || utilityLinksEntries[0] || null;
|
|
108153
|
+
}
|
|
108154
|
+
function pickAuthTextField(authData, fieldKey) {
|
|
108155
|
+
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
108156
|
+
if (typeof value !== "string") return undefined;
|
|
108157
|
+
var trimmed = value.trim();
|
|
108158
|
+
return trimmed || undefined;
|
|
108159
|
+
}
|
|
108160
|
+
function buildAccountData(_ref) {
|
|
108161
|
+
var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
|
|
108162
|
+
var utilityAuthData = _ref.utilityAuthData,
|
|
108163
|
+
legacyAccountData = _ref.legacyAccountData;
|
|
108164
|
+
return {
|
|
108165
|
+
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
108166
|
+
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,
|
|
108167
|
+
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,
|
|
108168
|
+
sign_up: {
|
|
108169
|
+
title: (_firstDefined3 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_ACCOUNT.sign_up.title,
|
|
108170
|
+
url: (_firstDefined4 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up_url"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_url)) !== null && _firstDefined4 !== void 0 ? _firstDefined4 : DEFAULT_ACCOUNT.sign_up.url
|
|
108171
|
+
},
|
|
108172
|
+
sign_in: {
|
|
108173
|
+
title: (_firstDefined5 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label)) !== null && _firstDefined5 !== void 0 ? _firstDefined5 : DEFAULT_ACCOUNT.sign_in.title,
|
|
108174
|
+
url: (_firstDefined6 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in_url"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_url)) !== null && _firstDefined6 !== void 0 ? _firstDefined6 : DEFAULT_ACCOUNT.sign_in.url
|
|
108175
|
+
}
|
|
108176
|
+
};
|
|
108177
|
+
}
|
|
108178
|
+
function buildAccountParentTags(_ref2) {
|
|
108179
|
+
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
108180
|
+
var utilityAuthData = _ref2.utilityAuthData,
|
|
108181
|
+
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
108182
|
+
legacyAccountData = _ref2.legacyAccountData;
|
|
108183
|
+
var refTags = (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$ = utilityLinksEntry.$) === null || _utilityLinksEntry$$ === void 0 ? void 0 : _utilityLinksEntry$$.sign_up_sign_in_component) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$2 = utilityLinksEntry.$) === null || _utilityLinksEntry$$2 === void 0 ? void 0 : _utilityLinksEntry$$2.sign_up_sign_in_component__0);
|
|
108184
|
+
var pickTag = function pickTag(key) {
|
|
108185
|
+
var _utilityAuthData$$;
|
|
108186
|
+
return (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$ = utilityAuthData.$) === null || _utilityAuthData$$ === void 0 ? void 0 : _utilityAuthData$$[key]) || (refTags === null || refTags === void 0 ? void 0 : refTags[key]);
|
|
108187
|
+
};
|
|
108188
|
+
return {
|
|
108189
|
+
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
108190
|
+
icon_color: pickTag("icon_color") || pickTag("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),
|
|
108191
|
+
sign_up: pickTag("sign_up"),
|
|
108192
|
+
sign_up_url: pickTag("sign_up_url"),
|
|
108193
|
+
sign_in: pickTag("sign_in"),
|
|
108194
|
+
sign_in_url: pickTag("sign_in_url")
|
|
108195
|
+
};
|
|
108196
|
+
}
|
|
108197
|
+
function HeaderView(_ref3) {
|
|
108198
|
+
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _headerEntry$$, _ref4, _headerEntry$locale, _headerEntry$$2, _headerEntry$$3;
|
|
108199
|
+
var country = _ref3.country,
|
|
108200
|
+
language = _ref3.language,
|
|
108201
|
+
locale = _ref3.locale,
|
|
108202
|
+
headerEntry = _ref3.headerEntry,
|
|
108203
|
+
searchConfig = _ref3.searchConfig;
|
|
107684
108204
|
var _useState = (0,external_react_.useState)(false),
|
|
107685
108205
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
107686
108206
|
isMobileMenuOpen = _useState2[0],
|
|
107687
108207
|
setIsMobileMenuOpen = _useState2[1];
|
|
107688
108208
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
108209
|
+
var utilityLinksRaw = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links;
|
|
108210
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
108211
|
+
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
107689
108212
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
107690
108213
|
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;
|
|
107691
|
-
var loyaltyData = (
|
|
107692
|
-
|
|
107693
|
-
|
|
107694
|
-
var accountData = (
|
|
108214
|
+
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;
|
|
108215
|
+
var utilityAuthData = utilityLinksEntry === null || utilityLinksEntry === void 0 ? void 0 : utilityLinksEntry.sign_up_sign_in_component;
|
|
108216
|
+
var legacyAccountData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account;
|
|
108217
|
+
var accountData = buildAccountData({
|
|
108218
|
+
utilityAuthData: utilityAuthData,
|
|
108219
|
+
legacyAccountData: legacyAccountData
|
|
108220
|
+
});
|
|
108221
|
+
var accountParentTags = buildAccountParentTags({
|
|
108222
|
+
utilityAuthData: utilityAuthData,
|
|
108223
|
+
utilityLinksEntry: utilityLinksEntry,
|
|
108224
|
+
legacyAccountData: legacyAccountData
|
|
108225
|
+
});
|
|
107695
108226
|
var cartData = (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART;
|
|
107696
108227
|
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;
|
|
107697
108228
|
var navigationData = (_headerEntry$navigati = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.navigation) !== null && _headerEntry$navigati !== void 0 ? _headerEntry$navigati : DEFAULT_NAVIGATION;
|
|
@@ -107713,17 +108244,24 @@ function HeaderView(_ref) {
|
|
|
107713
108244
|
"aria-label": "Open menu",
|
|
107714
108245
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconMenu, {})
|
|
107715
108246
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(LogoSlot, {
|
|
107716
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
107717
|
-
|
|
108247
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
108248
|
+
logo: logoData.logo,
|
|
108249
|
+
logoAlt: logoData.logoAlt,
|
|
108250
|
+
href: logoData.href,
|
|
108251
|
+
showLogo: logoData.showLogo,
|
|
108252
|
+
size: logoData.size,
|
|
108253
|
+
$: logoData.$
|
|
107718
108254
|
})
|
|
107719
108255
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
107720
108256
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
107721
|
-
data: accountData
|
|
108257
|
+
data: accountData,
|
|
108258
|
+
parent$: accountParentTags
|
|
107722
108259
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
107723
108260
|
country: country,
|
|
107724
108261
|
language: language,
|
|
107725
108262
|
locale: locale,
|
|
107726
108263
|
searchConfig: searchConfig,
|
|
108264
|
+
logo: logoData,
|
|
107727
108265
|
showDesktopTrigger: false
|
|
107728
108266
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
107729
108267
|
data: cartData,
|
|
@@ -107735,7 +108273,7 @@ function HeaderView(_ref) {
|
|
|
107735
108273
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
107736
108274
|
data: marketSelector,
|
|
107737
108275
|
logo: logoData,
|
|
107738
|
-
locale: String((
|
|
108276
|
+
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(),
|
|
107739
108277
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$2 = headerEntry.$) === null || _headerEntry$$2 === void 0 ? void 0 : _headerEntry$$2.market_selector__0,
|
|
107740
108278
|
mobileTriggerMode: "drawerPortal",
|
|
107741
108279
|
drawerOpen: isMobileMenuOpen,
|
|
@@ -107743,7 +108281,8 @@ function HeaderView(_ref) {
|
|
|
107743
108281
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
107744
108282
|
data: loyaltyData
|
|
107745
108283
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
107746
|
-
data: accountData
|
|
108284
|
+
data: accountData,
|
|
108285
|
+
parent$: accountParentTags
|
|
107747
108286
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
107748
108287
|
data: cartData,
|
|
107749
108288
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.cart
|
|
@@ -107754,6 +108293,7 @@ function HeaderView(_ref) {
|
|
|
107754
108293
|
language: language,
|
|
107755
108294
|
locale: locale,
|
|
107756
108295
|
searchConfig: searchConfig,
|
|
108296
|
+
logo: logoData,
|
|
107757
108297
|
showMobileTrigger: false
|
|
107758
108298
|
})
|
|
107759
108299
|
})]
|