@nuskin/nextgen-header 1.37.0 → 1.38.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 +1831 -357
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +1833 -359
- package/package-dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/package-dist/index.mjs
CHANGED
|
@@ -86391,7 +86391,7 @@ __webpack_require__(4275);
|
|
|
86391
86391
|
|
|
86392
86392
|
var tail =
|
|
86393
86393
|
/*#__PURE__*/
|
|
86394
|
-
__webpack_require__(
|
|
86394
|
+
__webpack_require__(4407);
|
|
86395
86395
|
/**
|
|
86396
86396
|
* Performs left-to-right function composition. The first argument may have
|
|
86397
86397
|
* any arity; the remaining arguments must be unary.
|
|
@@ -86809,7 +86809,7 @@ module.exports = slice;
|
|
|
86809
86809
|
|
|
86810
86810
|
/***/ },
|
|
86811
86811
|
|
|
86812
|
-
/***/
|
|
86812
|
+
/***/ 4407
|
|
86813
86813
|
(module, __unused_webpack_exports, __webpack_require__) {
|
|
86814
86814
|
|
|
86815
86815
|
var _checkForMethod =
|
|
@@ -102751,7 +102751,85 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
102751
102751
|
$: external_prop_types_["default"].object
|
|
102752
102752
|
})
|
|
102753
102753
|
};
|
|
102754
|
-
;// ./src/components/signup-signin/
|
|
102754
|
+
;// ./src/components/signup-signin/SignUpSignIn.propTypes.js
|
|
102755
|
+
|
|
102756
|
+
var authLinkPropType = external_prop_types_["default"].shape({
|
|
102757
|
+
title: external_prop_types_["default"].string,
|
|
102758
|
+
url: external_prop_types_["default"].string
|
|
102759
|
+
});
|
|
102760
|
+
var modalCopyPropType = external_prop_types_["default"].shape({
|
|
102761
|
+
close_dialog_aria_label: external_prop_types_["default"].string,
|
|
102762
|
+
sign_in_heading: external_prop_types_["default"].string,
|
|
102763
|
+
sign_in_message: external_prop_types_["default"].string,
|
|
102764
|
+
sign_in_cta_label: external_prop_types_["default"].string,
|
|
102765
|
+
sign_up_heading: external_prop_types_["default"].string,
|
|
102766
|
+
sign_up_message: external_prop_types_["default"].string,
|
|
102767
|
+
sign_up_cta_label: external_prop_types_["default"].string,
|
|
102768
|
+
sign_up_cta_aria_label: external_prop_types_["default"].string,
|
|
102769
|
+
profile_heading: external_prop_types_["default"].string,
|
|
102770
|
+
profile_view_all_label: external_prop_types_["default"].string,
|
|
102771
|
+
quick_links_heading: external_prop_types_["default"].string,
|
|
102772
|
+
wallet_heading: external_prop_types_["default"].string,
|
|
102773
|
+
credit_label: external_prop_types_["default"].string,
|
|
102774
|
+
promos_label: external_prop_types_["default"].string,
|
|
102775
|
+
sign_out_label: external_prop_types_["default"].string,
|
|
102776
|
+
view_account_label: external_prop_types_["default"].string,
|
|
102777
|
+
copy_id_label: external_prop_types_["default"].string,
|
|
102778
|
+
copied_id_label: external_prop_types_["default"].string
|
|
102779
|
+
});
|
|
102780
|
+
var authServicePropType = external_prop_types_["default"].shape({
|
|
102781
|
+
getAuthLinks: external_prop_types_["default"].func,
|
|
102782
|
+
navigateToAccount: external_prop_types_["default"].func,
|
|
102783
|
+
navigateToSignIn: external_prop_types_["default"].func,
|
|
102784
|
+
navigateToSignUp: external_prop_types_["default"].func,
|
|
102785
|
+
signIn: external_prop_types_["default"].func,
|
|
102786
|
+
signUp: external_prop_types_["default"].func,
|
|
102787
|
+
account: external_prop_types_["default"].func,
|
|
102788
|
+
signOut: external_prop_types_["default"].func
|
|
102789
|
+
});
|
|
102790
|
+
var parentTagsPropType = external_prop_types_["default"].shape({
|
|
102791
|
+
icon: external_prop_types_["default"].object,
|
|
102792
|
+
icon_color: external_prop_types_["default"].object,
|
|
102793
|
+
sign_up: external_prop_types_["default"].object,
|
|
102794
|
+
sign_up_url: external_prop_types_["default"].object,
|
|
102795
|
+
sign_in: external_prop_types_["default"].object,
|
|
102796
|
+
signed_in: external_prop_types_["default"].object
|
|
102797
|
+
});
|
|
102798
|
+
var profileUtilityLinksPropType = external_prop_types_["default"].shape({
|
|
102799
|
+
wallet_url: external_prop_types_["default"].string,
|
|
102800
|
+
quick_links: external_prop_types_["default"].arrayOf(external_prop_types_["default"].shape({
|
|
102801
|
+
title: external_prop_types_["default"].string,
|
|
102802
|
+
affiliate_only: external_prop_types_["default"].bool,
|
|
102803
|
+
links: external_prop_types_["default"].arrayOf(external_prop_types_["default"].shape({
|
|
102804
|
+
label: external_prop_types_["default"].string,
|
|
102805
|
+
url: external_prop_types_["default"].string,
|
|
102806
|
+
external: external_prop_types_["default"].bool
|
|
102807
|
+
}))
|
|
102808
|
+
}))
|
|
102809
|
+
});
|
|
102810
|
+
var signUpSignInPropTypes = {
|
|
102811
|
+
show: external_prop_types_["default"].bool,
|
|
102812
|
+
icon: external_prop_types_["default"].string,
|
|
102813
|
+
icon_color: external_prop_types_["default"].string,
|
|
102814
|
+
sign_up: authLinkPropType,
|
|
102815
|
+
sign_in: authLinkPropType,
|
|
102816
|
+
signed_in: authLinkPropType,
|
|
102817
|
+
profile_utility_links: profileUtilityLinksPropType,
|
|
102818
|
+
modal_copy: modalCopyPropType,
|
|
102819
|
+
authService: authServicePropType,
|
|
102820
|
+
customerData: external_prop_types_["default"].object,
|
|
102821
|
+
parent$: parentTagsPropType
|
|
102822
|
+
};
|
|
102823
|
+
;// ./src/components/signup-signin/SignUpSignIn.helpers.js
|
|
102824
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = SignUpSignIn_helpers_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
102825
|
+
function SignUpSignIn_helpers_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_helpers_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) ? SignUpSignIn_helpers_arrayLikeToArray(r, a) : void 0; } }
|
|
102826
|
+
function SignUpSignIn_helpers_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; }
|
|
102827
|
+
function SignUpSignIn_helpers_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; }
|
|
102828
|
+
function SignUpSignIn_helpers_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpSignIn_helpers_ownKeys(Object(t), !0).forEach(function (r) { SignUpSignIn_helpers_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpSignIn_helpers_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
102829
|
+
function SignUpSignIn_helpers_defineProperty(e, r, t) { return (r = SignUpSignIn_helpers_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
102830
|
+
function SignUpSignIn_helpers_toPropertyKey(t) { var i = SignUpSignIn_helpers_toPrimitive(t, "string"); return "symbol" == SignUpSignIn_helpers_typeof(i) ? i : i + ""; }
|
|
102831
|
+
function SignUpSignIn_helpers_toPrimitive(t, r) { if ("object" != SignUpSignIn_helpers_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpSignIn_helpers_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
102832
|
+
function SignUpSignIn_helpers_typeof(o) { "@babel/helpers - typeof"; return SignUpSignIn_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; }, SignUpSignIn_helpers_typeof(o); }
|
|
102755
102833
|
var DEFAULT_SIGN_UP = {
|
|
102756
102834
|
title: "Sign Up",
|
|
102757
102835
|
url: ""
|
|
@@ -102760,7 +102838,54 @@ var DEFAULT_SIGN_IN = {
|
|
|
102760
102838
|
title: "Sign In",
|
|
102761
102839
|
url: ""
|
|
102762
102840
|
};
|
|
102841
|
+
var DEFAULT_SIGNED_IN = {
|
|
102842
|
+
title: "My Account",
|
|
102843
|
+
url: ""
|
|
102844
|
+
};
|
|
102763
102845
|
var DEFAULT_ICON = "userOutline";
|
|
102846
|
+
var DEFAULT_PROFILE_PHOTO = "https://www.shutterstock.com/image-vector/person-gray-photo-placeholder-woman-600nw-1241538838.jpg";
|
|
102847
|
+
var DEFAULT_PROFILE_UTILITY_LINKS = {
|
|
102848
|
+
wallet_url: "/myaccount/wallet",
|
|
102849
|
+
quick_links: [{
|
|
102850
|
+
title: "My Account",
|
|
102851
|
+
links: [{
|
|
102852
|
+
label: "Account Settings",
|
|
102853
|
+
url: "/myaccount/accountprofile"
|
|
102854
|
+
}]
|
|
102855
|
+
}, {
|
|
102856
|
+
title: "Orders",
|
|
102857
|
+
links: [{
|
|
102858
|
+
label: "Subscriptions",
|
|
102859
|
+
url: "/myaccount/subscriptions"
|
|
102860
|
+
}, {
|
|
102861
|
+
label: "History",
|
|
102862
|
+
url: "/myaccount/orderhistory"
|
|
102863
|
+
}]
|
|
102864
|
+
}, {
|
|
102865
|
+
title: "My Business",
|
|
102866
|
+
affiliate_only: true,
|
|
102867
|
+
links: [{
|
|
102868
|
+
label: "Volumes & Genealogy",
|
|
102869
|
+
url: "/account/volumes",
|
|
102870
|
+
external: true
|
|
102871
|
+
}, {
|
|
102872
|
+
label: "My Site",
|
|
102873
|
+
url: "/myaccount/mysite"
|
|
102874
|
+
}, {
|
|
102875
|
+
label: "Product Offer",
|
|
102876
|
+
url: "/account/product-offers"
|
|
102877
|
+
}, {
|
|
102878
|
+
label: "Sign-Up Invite",
|
|
102879
|
+
url: "/account/sign-up-invite",
|
|
102880
|
+
external: true
|
|
102881
|
+
}, {
|
|
102882
|
+
label: "Info Center",
|
|
102883
|
+
url: "/account/info-center",
|
|
102884
|
+
external: true
|
|
102885
|
+
}]
|
|
102886
|
+
}]
|
|
102887
|
+
};
|
|
102888
|
+
var ACCOUNT_TOGGLE_NAME_MAX_LENGTH = 12;
|
|
102764
102889
|
var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
|
|
102765
102890
|
var ICON_COLOR_MAP = {
|
|
102766
102891
|
black: "#000000",
|
|
@@ -102796,6 +102921,188 @@ function getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in) {
|
|
|
102796
102921
|
effectiveSignInTitle: (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle
|
|
102797
102922
|
};
|
|
102798
102923
|
}
|
|
102924
|
+
function pickFirstTruthyString() {
|
|
102925
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
102926
|
+
values[_key] = arguments[_key];
|
|
102927
|
+
}
|
|
102928
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
102929
|
+
var value = _values[_i];
|
|
102930
|
+
if (typeof value !== "string") continue;
|
|
102931
|
+
var trimmed = value.trim();
|
|
102932
|
+
if (trimmed) return trimmed;
|
|
102933
|
+
}
|
|
102934
|
+
return "";
|
|
102935
|
+
}
|
|
102936
|
+
function isAuthenticatedCustomer(customerData) {
|
|
102937
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return false;
|
|
102938
|
+
return Boolean(customerData.isAuthenticated || customerData.isRegisterUser || customerData.isRegisteredUser || customerData.authenticated);
|
|
102939
|
+
}
|
|
102940
|
+
function getCustomerProfileSummary(customerData) {
|
|
102941
|
+
var _customerData$account, _customerData$custome;
|
|
102942
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
102943
|
+
return {
|
|
102944
|
+
displayName: "",
|
|
102945
|
+
email: "",
|
|
102946
|
+
accountId: ""
|
|
102947
|
+
};
|
|
102948
|
+
}
|
|
102949
|
+
var displayName = getCustomerDisplayName(customerData);
|
|
102950
|
+
var email = pickFirstTruthyString(customerData.email, customerData.userName, customerData.phoneNumber);
|
|
102951
|
+
var accountId = pickFirstTruthyString(customerData.referenceAttribute, (_customerData$account = customerData.accounts) === null || _customerData$account === void 0 ? void 0 : _customerData$account.referenceAttribute, customerData.nuskinAccountId, (_customerData$custome = customerData.customer) === null || _customerData$custome === void 0 ? void 0 : _customerData$custome.referenceAttribute);
|
|
102952
|
+
return {
|
|
102953
|
+
displayName: displayName,
|
|
102954
|
+
email: email,
|
|
102955
|
+
accountId: accountId
|
|
102956
|
+
};
|
|
102957
|
+
}
|
|
102958
|
+
function getCustomerDisplayName(customerData) {
|
|
102959
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
102960
|
+
var firstAndLast = pickFirstTruthyString([customerData.firstName, customerData.lastName].filter(Boolean).join(" "));
|
|
102961
|
+
return pickFirstTruthyString(customerData.displayName, customerData.fullName, customerData.name, firstAndLast, customerData.firstName);
|
|
102962
|
+
}
|
|
102963
|
+
function getCustomerFirstName(customerData) {
|
|
102964
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
102965
|
+
return pickFirstTruthyString(customerData.firstName);
|
|
102966
|
+
}
|
|
102967
|
+
function formatAccountToggleLabel(name) {
|
|
102968
|
+
var text = String(name !== null && name !== void 0 ? name : "").trim();
|
|
102969
|
+
if (!text) return "";
|
|
102970
|
+
var upper = text.toUpperCase();
|
|
102971
|
+
if (upper.length > ACCOUNT_TOGGLE_NAME_MAX_LENGTH) {
|
|
102972
|
+
return "".concat(upper.slice(0, ACCOUNT_TOGGLE_NAME_MAX_LENGTH - 1), "...");
|
|
102973
|
+
}
|
|
102974
|
+
return upper;
|
|
102975
|
+
}
|
|
102976
|
+
function formatProfileGreetingName(name) {
|
|
102977
|
+
return String(name !== null && name !== void 0 ? name : "").trim().toUpperCase();
|
|
102978
|
+
}
|
|
102979
|
+
function getCustomerAccountType(customerData) {
|
|
102980
|
+
var _customerData$account2, _customerData$custome2;
|
|
102981
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
102982
|
+
return pickFirstTruthyString(customerData.type, customerData.accountType, (_customerData$account2 = customerData.accounts) === null || _customerData$account2 === void 0 ? void 0 : _customerData$account2.accountType, (_customerData$custome2 = customerData.customer) === null || _customerData$custome2 === void 0 ? void 0 : _customerData$custome2.type);
|
|
102983
|
+
}
|
|
102984
|
+
function isBrandAffiliateCustomer(customerData) {
|
|
102985
|
+
return getCustomerAccountType(customerData) === "Brand Affiliate";
|
|
102986
|
+
}
|
|
102987
|
+
function getCustomerPhotoUrl(customerData) {
|
|
102988
|
+
var _customerData$custome3;
|
|
102989
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
102990
|
+
return pickFirstTruthyString(customerData.photo, customerData.profilePhoto, (_customerData$custome3 = customerData.customer) === null || _customerData$custome3 === void 0 ? void 0 : _customerData$custome3.photo);
|
|
102991
|
+
}
|
|
102992
|
+
function normalizeProfileLinkEntry(entry) {
|
|
102993
|
+
if (!entry || SignUpSignIn_helpers_typeof(entry) !== "object") return null;
|
|
102994
|
+
var label = pickFirstTruthyString(entry.label, entry.title, entry.text);
|
|
102995
|
+
var url = pickFirstTruthyString(entry.url, entry.href, entry.link);
|
|
102996
|
+
if (!label || !url) return null;
|
|
102997
|
+
return {
|
|
102998
|
+
label: label,
|
|
102999
|
+
url: url,
|
|
103000
|
+
external: Boolean(entry.external || entry.is_external || entry.open_in_new_tab)
|
|
103001
|
+
};
|
|
103002
|
+
}
|
|
103003
|
+
function normalizeProfileLinkGroup(entries) {
|
|
103004
|
+
if (!Array.isArray(entries)) return [];
|
|
103005
|
+
return entries.map(normalizeProfileLinkEntry).filter(Boolean);
|
|
103006
|
+
}
|
|
103007
|
+
function normalizeQuickLinkGroup(group) {
|
|
103008
|
+
if (!group || SignUpSignIn_helpers_typeof(group) !== "object") return null;
|
|
103009
|
+
var title = pickFirstTruthyString(group.title, group.heading);
|
|
103010
|
+
var links = normalizeProfileLinkGroup(group.links || group.items);
|
|
103011
|
+
if (!title || !links.length) return null;
|
|
103012
|
+
return {
|
|
103013
|
+
title: title,
|
|
103014
|
+
links: links,
|
|
103015
|
+
affiliateOnly: Boolean(group.affiliate_only || group.affiliateOnly)
|
|
103016
|
+
};
|
|
103017
|
+
}
|
|
103018
|
+
function getProfileWalletSummary(customerData) {
|
|
103019
|
+
var _ref, _ref2, _customerData$storeCr, _customerData$wallet, _ref3, _ref4, _customerData$availab, _customerData$wallet2;
|
|
103020
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
103021
|
+
return {
|
|
103022
|
+
storeCredit: 0,
|
|
103023
|
+
promoCount: 0
|
|
103024
|
+
};
|
|
103025
|
+
}
|
|
103026
|
+
var storeCredit = Number((_ref = (_ref2 = (_customerData$storeCr = customerData.storeCreditPoints) !== null && _customerData$storeCr !== void 0 ? _customerData$storeCr : customerData.storeCredit) !== null && _ref2 !== void 0 ? _ref2 : (_customerData$wallet = customerData.wallet) === null || _customerData$wallet === void 0 ? void 0 : _customerData$wallet.credit) !== null && _ref !== void 0 ? _ref : 0);
|
|
103027
|
+
var promoCount = Number((_ref3 = (_ref4 = (_customerData$availab = customerData.availablePromoCodes) !== null && _customerData$availab !== void 0 ? _customerData$availab : customerData.promoCount) !== null && _ref4 !== void 0 ? _ref4 : (_customerData$wallet2 = customerData.wallet) === null || _customerData$wallet2 === void 0 ? void 0 : _customerData$wallet2.promos) !== null && _ref3 !== void 0 ? _ref3 : 0);
|
|
103028
|
+
return {
|
|
103029
|
+
storeCredit: Number.isFinite(storeCredit) ? storeCredit : 0,
|
|
103030
|
+
promoCount: Number.isFinite(promoCount) ? promoCount : 0
|
|
103031
|
+
};
|
|
103032
|
+
}
|
|
103033
|
+
function getProfileVolumeStats(customerData) {
|
|
103034
|
+
var _customerData$customP, _customerData$customP2, _customerData$customP3;
|
|
103035
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
103036
|
+
return {
|
|
103037
|
+
dcSv: "",
|
|
103038
|
+
gsv: ""
|
|
103039
|
+
};
|
|
103040
|
+
}
|
|
103041
|
+
var dcSv = pickFirstTruthyString(customerData.dcSv, customerData.dc_sv, (_customerData$customP = customerData.customProperties) === null || _customerData$customP === void 0 ? void 0 : _customerData$customP.dcSv, (_customerData$customP2 = customerData.customProperties) === null || _customerData$customP2 === void 0 ? void 0 : _customerData$customP2.dc_sv);
|
|
103042
|
+
var gsv = pickFirstTruthyString(customerData.gsv, (_customerData$customP3 = customerData.customProperties) === null || _customerData$customP3 === void 0 ? void 0 : _customerData$customP3.gsv);
|
|
103043
|
+
return {
|
|
103044
|
+
dcSv: dcSv,
|
|
103045
|
+
gsv: gsv
|
|
103046
|
+
};
|
|
103047
|
+
}
|
|
103048
|
+
function resolveProfileUtilityLinks(profileUtilityLinks) {
|
|
103049
|
+
var source = profileUtilityLinks && SignUpSignIn_helpers_typeof(profileUtilityLinks) === "object" ? profileUtilityLinks : DEFAULT_PROFILE_UTILITY_LINKS;
|
|
103050
|
+
var quickLinksSource = source.quick_links || source.quickLinks || (source.my_account || source.myAccount || source.my_business || source.myBusiness ? [{
|
|
103051
|
+
title: "My Account",
|
|
103052
|
+
links: source.my_account || source.myAccount || []
|
|
103053
|
+
}, {
|
|
103054
|
+
title: "Orders",
|
|
103055
|
+
links: []
|
|
103056
|
+
}, {
|
|
103057
|
+
title: "My Business",
|
|
103058
|
+
affiliate_only: true,
|
|
103059
|
+
links: source.my_business || source.myBusiness || []
|
|
103060
|
+
}] : DEFAULT_PROFILE_UTILITY_LINKS.quick_links);
|
|
103061
|
+
return {
|
|
103062
|
+
walletUrl: pickFirstTruthyString(source.wallet_url, source.walletUrl, DEFAULT_PROFILE_UTILITY_LINKS.wallet_url),
|
|
103063
|
+
quickLinkGroups: (Array.isArray(quickLinksSource) ? quickLinksSource : []).map(normalizeQuickLinkGroup).filter(Boolean)
|
|
103064
|
+
};
|
|
103065
|
+
}
|
|
103066
|
+
var DEFAULT_SIGN_UP_PATH = "/site/signup";
|
|
103067
|
+
function resolveDefaultSignUpPath() {
|
|
103068
|
+
return resolveLocalizedStorefrontPath(DEFAULT_SIGN_UP_PATH);
|
|
103069
|
+
}
|
|
103070
|
+
var LOCALE_PATH_PREFIX_REGEX = /^\/([a-z]{2})\/([a-z]{2})(?=\/|$)/i;
|
|
103071
|
+
function resolveLocalizedStorefrontPath(path) {
|
|
103072
|
+
var raw = String(path !== null && path !== void 0 ? path : "").trim();
|
|
103073
|
+
if (!raw || /^https?:\/\//i.test(raw)) return raw;
|
|
103074
|
+
var normalized = raw.startsWith("/") ? raw : "/".concat(raw);
|
|
103075
|
+
if (typeof globalThis.window === "undefined") return normalized;
|
|
103076
|
+
var localeMatch = LOCALE_PATH_PREFIX_REGEX.exec(globalThis.window.location.pathname);
|
|
103077
|
+
if (!localeMatch) return normalized;
|
|
103078
|
+
var prefix = "/".concat(localeMatch[1], "/").concat(localeMatch[2]);
|
|
103079
|
+
if (normalized === prefix || normalized.startsWith("".concat(prefix, "/"))) {
|
|
103080
|
+
return normalized;
|
|
103081
|
+
}
|
|
103082
|
+
return "".concat(prefix).concat(normalized);
|
|
103083
|
+
}
|
|
103084
|
+
function getAuthDisplayState(_ref5) {
|
|
103085
|
+
var _effectiveSignedIn$ur;
|
|
103086
|
+
var resolvedLinks = _ref5.resolvedLinks,
|
|
103087
|
+
sign_up = _ref5.sign_up,
|
|
103088
|
+
sign_in = _ref5.sign_in,
|
|
103089
|
+
signed_in = _ref5.signed_in,
|
|
103090
|
+
customerData = _ref5.customerData;
|
|
103091
|
+
var guestDisplay = getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in);
|
|
103092
|
+
var effectiveSignedIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.signed_in) || (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.signedIn) || signed_in;
|
|
103093
|
+
var isAuthenticated = isAuthenticatedCustomer(customerData);
|
|
103094
|
+
var accountTitle = pickFirstTruthyString(effectiveSignedIn === null || effectiveSignedIn === void 0 ? void 0 : effectiveSignedIn.title, getCustomerDisplayName(customerData), DEFAULT_SIGNED_IN.title);
|
|
103095
|
+
var firstName = getCustomerFirstName(customerData);
|
|
103096
|
+
var accountToggleLabel = isAuthenticated && firstName ? formatAccountToggleLabel(firstName) : accountTitle;
|
|
103097
|
+
return SignUpSignIn_helpers_objectSpread(SignUpSignIn_helpers_objectSpread({}, guestDisplay), {}, {
|
|
103098
|
+
isAuthenticated: isAuthenticated,
|
|
103099
|
+
showGuestAuth: !isAuthenticated,
|
|
103100
|
+
accountTitle: accountTitle,
|
|
103101
|
+
accountToggleLabel: accountToggleLabel,
|
|
103102
|
+
accountUrl: (_effectiveSignedIn$ur = effectiveSignedIn === null || effectiveSignedIn === void 0 ? void 0 : effectiveSignedIn.url) !== null && _effectiveSignedIn$ur !== void 0 ? _effectiveSignedIn$ur : DEFAULT_SIGNED_IN.url,
|
|
103103
|
+
effectiveSignedIn: effectiveSignedIn
|
|
103104
|
+
});
|
|
103105
|
+
}
|
|
102799
103106
|
function getIconPresentation(icon, icon_color) {
|
|
102800
103107
|
var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
|
|
102801
103108
|
var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
|
|
@@ -102805,49 +103112,146 @@ function getIconPresentation(icon, icon_color) {
|
|
|
102805
103112
|
resolvedIconColor: ICON_COLOR_MAP[normalizedColorName]
|
|
102806
103113
|
};
|
|
102807
103114
|
}
|
|
102808
|
-
|
|
103115
|
+
var AUTH_ACTION_ALIASES = {
|
|
103116
|
+
navigateToSignIn: ["navigateToSignIn", "signIn"],
|
|
103117
|
+
navigateToSignUp: ["navigateToSignUp", "signUp"],
|
|
103118
|
+
navigateToAccount: ["navigateToAccount", "account"],
|
|
103119
|
+
signOut: ["signOut", "navigateToSignOut"]
|
|
103120
|
+
};
|
|
103121
|
+
function getWindowHeaderAuthBridge() {
|
|
103122
|
+
if (typeof globalThis.window === "undefined") return null;
|
|
103123
|
+
var bridge = globalThis.window.__NUSKIN_HEADER_AUTH__;
|
|
103124
|
+
return bridge && SignUpSignIn_helpers_typeof(bridge) === "object" ? bridge : null;
|
|
103125
|
+
}
|
|
103126
|
+
function invokeAuthHandler(handler, url) {
|
|
103127
|
+
var _ref6 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
103128
|
+
_ref6$passUrl = _ref6.passUrl,
|
|
103129
|
+
passUrl = _ref6$passUrl === void 0 ? false : _ref6$passUrl;
|
|
103130
|
+
if (passUrl) {
|
|
103131
|
+
var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
|
|
103132
|
+
if (resolvedUrl) {
|
|
103133
|
+
handler(resolvedUrl);
|
|
103134
|
+
return;
|
|
103135
|
+
}
|
|
103136
|
+
}
|
|
103137
|
+
handler();
|
|
103138
|
+
}
|
|
103139
|
+
function delegateAuthNavigation(authService, methodName, url) {
|
|
103140
|
+
var keys = AUTH_ACTION_ALIASES[methodName] || [methodName];
|
|
103141
|
+
var sources = [authService, getWindowHeaderAuthBridge()].filter(Boolean);
|
|
103142
|
+
var passUrl = methodName === "navigateToAccount";
|
|
103143
|
+
var _iterator = _createForOfIteratorHelper(sources),
|
|
103144
|
+
_step;
|
|
103145
|
+
try {
|
|
103146
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103147
|
+
var source = _step.value;
|
|
103148
|
+
var _iterator2 = _createForOfIteratorHelper(keys),
|
|
103149
|
+
_step2;
|
|
103150
|
+
try {
|
|
103151
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
103152
|
+
var key = _step2.value;
|
|
103153
|
+
var handler = source === null || source === void 0 ? void 0 : source[key];
|
|
103154
|
+
if (typeof handler === "function") {
|
|
103155
|
+
invokeAuthHandler(handler, url, {
|
|
103156
|
+
passUrl: passUrl
|
|
103157
|
+
});
|
|
103158
|
+
return true;
|
|
103159
|
+
}
|
|
103160
|
+
}
|
|
103161
|
+
} catch (err) {
|
|
103162
|
+
_iterator2.e(err);
|
|
103163
|
+
} finally {
|
|
103164
|
+
_iterator2.f();
|
|
103165
|
+
}
|
|
103166
|
+
}
|
|
103167
|
+
} catch (err) {
|
|
103168
|
+
_iterator.e(err);
|
|
103169
|
+
} finally {
|
|
103170
|
+
_iterator.f();
|
|
103171
|
+
}
|
|
103172
|
+
return false;
|
|
103173
|
+
}
|
|
103174
|
+
function handleSignUpNavigate(editing, url, authService) {
|
|
102809
103175
|
if (editing) return;
|
|
102810
|
-
|
|
103176
|
+
if (delegateAuthNavigation(authService, "navigateToSignUp", url)) return;
|
|
103177
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
102811
103178
|
}
|
|
102812
|
-
function handleSignInActivate(editing, isMobile, setIsModalOpen, url) {
|
|
103179
|
+
function handleSignInActivate(editing, isMobile, setIsModalOpen, url, authService) {
|
|
102813
103180
|
if (editing) return;
|
|
102814
103181
|
if (isMobile) {
|
|
102815
103182
|
setIsModalOpen(true);
|
|
102816
103183
|
return;
|
|
102817
103184
|
}
|
|
103185
|
+
if (delegateAuthNavigation(authService, "navigateToSignIn", url)) return;
|
|
102818
103186
|
navigateToUrl(url);
|
|
102819
103187
|
}
|
|
102820
|
-
function
|
|
103188
|
+
function handleAccountNavigate(editing, url, authService) {
|
|
103189
|
+
if (editing) return;
|
|
103190
|
+
var resolvedUrl = resolveLocalizedStorefrontPath(url);
|
|
103191
|
+
if (delegateAuthNavigation(authService, "navigateToAccount", resolvedUrl)) {
|
|
103192
|
+
return;
|
|
103193
|
+
}
|
|
103194
|
+
navigateToUrl(resolvedUrl);
|
|
103195
|
+
}
|
|
103196
|
+
function handleProfileLinkNavigate(editing, url, authService) {
|
|
103197
|
+
var _ref7 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
103198
|
+
_ref7$external = _ref7.external,
|
|
103199
|
+
external = _ref7$external === void 0 ? false : _ref7$external;
|
|
103200
|
+
if (editing) return;
|
|
103201
|
+
var resolvedUrl = resolveLocalizedStorefrontPath(url);
|
|
103202
|
+
if (external || /^https?:\/\//i.test(resolvedUrl)) {
|
|
103203
|
+
if (typeof globalThis.window !== "undefined") {
|
|
103204
|
+
globalThis.window.open(resolvedUrl, "_blank", "noopener,noreferrer");
|
|
103205
|
+
}
|
|
103206
|
+
return;
|
|
103207
|
+
}
|
|
103208
|
+
if (delegateAuthNavigation(authService, "navigateToAccount", resolvedUrl)) {
|
|
103209
|
+
return;
|
|
103210
|
+
}
|
|
103211
|
+
navigateToUrl(resolvedUrl);
|
|
103212
|
+
}
|
|
103213
|
+
function handleSignOutNavigate(editing, authService) {
|
|
103214
|
+
if (editing) return;
|
|
103215
|
+
delegateAuthNavigation(authService, "signOut");
|
|
103216
|
+
}
|
|
103217
|
+
function handleModalAuthNavigate(editing, closeModal, url, authService, methodName) {
|
|
102821
103218
|
if (editing) return;
|
|
102822
103219
|
closeModal();
|
|
103220
|
+
if (delegateAuthNavigation(authService, methodName, url)) return;
|
|
103221
|
+
if (methodName === "navigateToSignUp") {
|
|
103222
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
103223
|
+
return;
|
|
103224
|
+
}
|
|
102823
103225
|
navigateToUrl(url);
|
|
102824
103226
|
}
|
|
102825
|
-
function mergeAuthLinksFromService(links, sign_up, sign_in) {
|
|
103227
|
+
function mergeAuthLinksFromService(links, sign_up, sign_in, signed_in) {
|
|
102826
103228
|
if (!links) return {
|
|
102827
103229
|
sign_up: sign_up,
|
|
102828
|
-
sign_in: sign_in
|
|
103230
|
+
sign_in: sign_in,
|
|
103231
|
+
signed_in: signed_in
|
|
102829
103232
|
};
|
|
102830
103233
|
return {
|
|
102831
103234
|
sign_up: links.sign_up || links.signUp || sign_up,
|
|
102832
|
-
sign_in: links.sign_in || links.signIn || sign_in
|
|
103235
|
+
sign_in: links.sign_in || links.signIn || sign_in,
|
|
103236
|
+
signed_in: links.signed_in || links.signedIn || signed_in
|
|
102833
103237
|
};
|
|
102834
103238
|
}
|
|
102835
|
-
;// ./src/components/signup-signin/
|
|
102836
|
-
function
|
|
102837
|
-
function
|
|
102838
|
-
function
|
|
102839
|
-
function
|
|
102840
|
-
function
|
|
102841
|
-
function
|
|
102842
|
-
function
|
|
102843
|
-
function
|
|
102844
|
-
function
|
|
102845
|
-
function
|
|
103239
|
+
;// ./src/components/signup-signin/SignUpSignIn.hooks.js
|
|
103240
|
+
function SignUpSignIn_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 SignUpSignIn_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]())) : (SignUpSignIn_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, SignUpSignIn_hooks_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpSignIn_hooks_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpSignIn_hooks_regeneratorDefine2(u), SignUpSignIn_hooks_regeneratorDefine2(u, o, "Generator"), SignUpSignIn_hooks_regeneratorDefine2(u, n, function () { return this; }), SignUpSignIn_hooks_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpSignIn_hooks_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
103241
|
+
function SignUpSignIn_hooks_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpSignIn_hooks_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpSignIn_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)); }, SignUpSignIn_hooks_regeneratorDefine2(e, r, n, t); }
|
|
103242
|
+
function SignUpSignIn_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); }
|
|
103243
|
+
function SignUpSignIn_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) { SignUpSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
103244
|
+
function SignUpSignIn_hooks_slicedToArray(r, e) { return SignUpSignIn_hooks_arrayWithHoles(r) || SignUpSignIn_hooks_iterableToArrayLimit(r, e) || SignUpSignIn_hooks_unsupportedIterableToArray(r, e) || SignUpSignIn_hooks_nonIterableRest(); }
|
|
103245
|
+
function SignUpSignIn_hooks_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."); }
|
|
103246
|
+
function SignUpSignIn_hooks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_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) ? SignUpSignIn_hooks_arrayLikeToArray(r, a) : void 0; } }
|
|
103247
|
+
function SignUpSignIn_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; }
|
|
103248
|
+
function SignUpSignIn_hooks_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; } }
|
|
103249
|
+
function SignUpSignIn_hooks_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
102846
103250
|
|
|
102847
103251
|
|
|
102848
103252
|
function useIsMobileViewport() {
|
|
102849
103253
|
var _useState = (0,external_react_.useState)(false),
|
|
102850
|
-
_useState2 =
|
|
103254
|
+
_useState2 = SignUpSignIn_hooks_slicedToArray(_useState, 2),
|
|
102851
103255
|
isMobile = _useState2[0],
|
|
102852
103256
|
setIsMobile = _useState2[1];
|
|
102853
103257
|
(0,external_react_.useEffect)(function () {
|
|
@@ -102865,27 +103269,29 @@ function useIsMobileViewport() {
|
|
|
102865
103269
|
}, []);
|
|
102866
103270
|
return isMobile;
|
|
102867
103271
|
}
|
|
102868
|
-
function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
103272
|
+
function useResolvedAuthLinks(sign_up, sign_in, signed_in, authService) {
|
|
102869
103273
|
var _useState3 = (0,external_react_.useState)({
|
|
102870
103274
|
sign_up: sign_up,
|
|
102871
|
-
sign_in: sign_in
|
|
103275
|
+
sign_in: sign_in,
|
|
103276
|
+
signed_in: signed_in
|
|
102872
103277
|
}),
|
|
102873
|
-
_useState4 =
|
|
103278
|
+
_useState4 = SignUpSignIn_hooks_slicedToArray(_useState3, 2),
|
|
102874
103279
|
resolvedLinks = _useState4[0],
|
|
102875
103280
|
setResolvedLinks = _useState4[1];
|
|
102876
103281
|
(0,external_react_.useEffect)(function () {
|
|
102877
103282
|
setResolvedLinks({
|
|
102878
103283
|
sign_up: sign_up,
|
|
102879
|
-
sign_in: sign_in
|
|
103284
|
+
sign_in: sign_in,
|
|
103285
|
+
signed_in: signed_in
|
|
102880
103286
|
});
|
|
102881
|
-
}, [sign_up, sign_in]);
|
|
103287
|
+
}, [sign_up, sign_in, signed_in]);
|
|
102882
103288
|
(0,external_react_.useEffect)(function () {
|
|
102883
103289
|
var canceled = false;
|
|
102884
103290
|
var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
|
|
102885
103291
|
if (!canResolve) return undefined;
|
|
102886
|
-
|
|
103292
|
+
SignUpSignIn_hooks_asyncToGenerator(/*#__PURE__*/SignUpSignIn_hooks_regenerator().m(function _callee() {
|
|
102887
103293
|
var links, _t;
|
|
102888
|
-
return
|
|
103294
|
+
return SignUpSignIn_hooks_regenerator().w(function (_context) {
|
|
102889
103295
|
while (1) switch (_context.p = _context.n) {
|
|
102890
103296
|
case 0:
|
|
102891
103297
|
_context.p = 0;
|
|
@@ -102894,7 +103300,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
102894
103300
|
case 1:
|
|
102895
103301
|
links = _context.v;
|
|
102896
103302
|
if (!canceled && links) {
|
|
102897
|
-
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in));
|
|
103303
|
+
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in, signed_in));
|
|
102898
103304
|
}
|
|
102899
103305
|
_context.n = 3;
|
|
102900
103306
|
break;
|
|
@@ -102909,7 +103315,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
102909
103315
|
return function () {
|
|
102910
103316
|
canceled = true;
|
|
102911
103317
|
};
|
|
102912
|
-
}, [authService, sign_in, sign_up]);
|
|
103318
|
+
}, [authService, sign_in, sign_up, signed_in]);
|
|
102913
103319
|
return resolvedLinks;
|
|
102914
103320
|
}
|
|
102915
103321
|
function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
@@ -102927,105 +103333,1198 @@ function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
|
102927
103333
|
};
|
|
102928
103334
|
}, [isModalOpen, setIsModalOpen]);
|
|
102929
103335
|
}
|
|
102930
|
-
|
|
103336
|
+
function useAccountMenuState() {
|
|
103337
|
+
var _useState5 = (0,external_react_.useState)(false),
|
|
103338
|
+
_useState6 = SignUpSignIn_hooks_slicedToArray(_useState5, 2),
|
|
103339
|
+
isAccountMenuOpen = _useState6[0],
|
|
103340
|
+
setIsAccountMenuOpen = _useState6[1];
|
|
103341
|
+
var menuRef = (0,external_react_.useRef)(null);
|
|
103342
|
+
(0,external_react_.useEffect)(function () {
|
|
103343
|
+
var _globalThis$document;
|
|
103344
|
+
if (!isAccountMenuOpen) return undefined;
|
|
103345
|
+
var onPointerDown = function onPointerDown(event) {
|
|
103346
|
+
var _menuRef$current;
|
|
103347
|
+
if (!((_menuRef$current = menuRef.current) !== null && _menuRef$current !== void 0 && _menuRef$current.contains(event.target))) {
|
|
103348
|
+
setIsAccountMenuOpen(false);
|
|
103349
|
+
}
|
|
103350
|
+
};
|
|
103351
|
+
(_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 || _globalThis$document.addEventListener("mousedown", onPointerDown);
|
|
103352
|
+
return function () {
|
|
103353
|
+
var _globalThis$document2;
|
|
103354
|
+
return (_globalThis$document2 = globalThis.document) === null || _globalThis$document2 === void 0 ? void 0 : _globalThis$document2.removeEventListener("mousedown", onPointerDown);
|
|
103355
|
+
};
|
|
103356
|
+
}, [isAccountMenuOpen]);
|
|
103357
|
+
useEscapeToCloseModal(isAccountMenuOpen, setIsAccountMenuOpen);
|
|
103358
|
+
return {
|
|
103359
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
103360
|
+
setIsAccountMenuOpen: setIsAccountMenuOpen,
|
|
103361
|
+
menuRef: menuRef
|
|
103362
|
+
};
|
|
103363
|
+
}
|
|
103364
|
+
;// ./src/components/signup-signin/useSignUpSignIn.js
|
|
103365
|
+
function useSignUpSignIn_typeof(o) { "@babel/helpers - typeof"; return useSignUpSignIn_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; }, useSignUpSignIn_typeof(o); }
|
|
103366
|
+
function useSignUpSignIn_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 useSignUpSignIn_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]())) : (useSignUpSignIn_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, useSignUpSignIn_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, useSignUpSignIn_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), useSignUpSignIn_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", useSignUpSignIn_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), useSignUpSignIn_regeneratorDefine2(u), useSignUpSignIn_regeneratorDefine2(u, o, "Generator"), useSignUpSignIn_regeneratorDefine2(u, n, function () { return this; }), useSignUpSignIn_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (useSignUpSignIn_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
103367
|
+
function useSignUpSignIn_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } useSignUpSignIn_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { useSignUpSignIn_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)); }, useSignUpSignIn_regeneratorDefine2(e, r, n, t); }
|
|
103368
|
+
function useSignUpSignIn_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); }
|
|
103369
|
+
function useSignUpSignIn_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { useSignUpSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { useSignUpSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
103370
|
+
function useSignUpSignIn_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; }
|
|
103371
|
+
function useSignUpSignIn_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? useSignUpSignIn_ownKeys(Object(t), !0).forEach(function (r) { useSignUpSignIn_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : useSignUpSignIn_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
103372
|
+
function useSignUpSignIn_defineProperty(e, r, t) { return (r = useSignUpSignIn_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
103373
|
+
function useSignUpSignIn_toPropertyKey(t) { var i = useSignUpSignIn_toPrimitive(t, "string"); return "symbol" == useSignUpSignIn_typeof(i) ? i : i + ""; }
|
|
103374
|
+
function useSignUpSignIn_toPrimitive(t, r) { if ("object" != useSignUpSignIn_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != useSignUpSignIn_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
103375
|
+
function useSignUpSignIn_slicedToArray(r, e) { return useSignUpSignIn_arrayWithHoles(r) || useSignUpSignIn_iterableToArrayLimit(r, e) || useSignUpSignIn_unsupportedIterableToArray(r, e) || useSignUpSignIn_nonIterableRest(); }
|
|
103376
|
+
function useSignUpSignIn_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."); }
|
|
103377
|
+
function useSignUpSignIn_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return useSignUpSignIn_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) ? useSignUpSignIn_arrayLikeToArray(r, a) : void 0; } }
|
|
103378
|
+
function useSignUpSignIn_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; }
|
|
103379
|
+
function useSignUpSignIn_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; } }
|
|
103380
|
+
function useSignUpSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
103381
|
+
|
|
103382
|
+
|
|
103383
|
+
|
|
103384
|
+
|
|
103385
|
+
var DEFAULT_MODAL_COPY = {
|
|
103386
|
+
close_dialog_aria_label: "Close dialog",
|
|
103387
|
+
sign_in_heading: "Sign In",
|
|
103388
|
+
sign_in_message: "Have an account already? Please sign in.",
|
|
103389
|
+
sign_in_cta_label: "Sign In",
|
|
103390
|
+
sign_up_heading: "Sign Up",
|
|
103391
|
+
sign_up_message: "New user? Please Sign up to continue",
|
|
103392
|
+
sign_up_cta_label: "Create Account",
|
|
103393
|
+
sign_up_cta_aria_label: "Create Account",
|
|
103394
|
+
profile_heading: "Profile",
|
|
103395
|
+
profile_view_all_label: "View All",
|
|
103396
|
+
quick_links_heading: "Quick Links",
|
|
103397
|
+
wallet_heading: "Wallet",
|
|
103398
|
+
credit_label: "Credit",
|
|
103399
|
+
promos_label: "Promos",
|
|
103400
|
+
sign_out_label: "Sign Out",
|
|
103401
|
+
view_account_label: "View Account",
|
|
103402
|
+
copy_id_label: "Copy ID",
|
|
103403
|
+
copied_id_label: "Copied!"
|
|
103404
|
+
};
|
|
103405
|
+
function useSignUpSignIn(_ref) {
|
|
103406
|
+
var _ref$show = _ref.show,
|
|
103407
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
103408
|
+
_ref$icon = _ref.icon,
|
|
103409
|
+
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
103410
|
+
icon_color = _ref.icon_color,
|
|
103411
|
+
_ref$sign_up = _ref.sign_up,
|
|
103412
|
+
sign_up = _ref$sign_up === void 0 ? DEFAULT_SIGN_UP : _ref$sign_up,
|
|
103413
|
+
_ref$sign_in = _ref.sign_in,
|
|
103414
|
+
sign_in = _ref$sign_in === void 0 ? DEFAULT_SIGN_IN : _ref$sign_in,
|
|
103415
|
+
_ref$signed_in = _ref.signed_in,
|
|
103416
|
+
signed_in = _ref$signed_in === void 0 ? undefined : _ref$signed_in,
|
|
103417
|
+
_ref$profile_utility_ = _ref.profile_utility_links,
|
|
103418
|
+
profile_utility_links = _ref$profile_utility_ === void 0 ? undefined : _ref$profile_utility_,
|
|
103419
|
+
_ref$modal_copy = _ref.modal_copy,
|
|
103420
|
+
modal_copy = _ref$modal_copy === void 0 ? DEFAULT_MODAL_COPY : _ref$modal_copy,
|
|
103421
|
+
_ref$authService = _ref.authService,
|
|
103422
|
+
authService = _ref$authService === void 0 ? undefined : _ref$authService,
|
|
103423
|
+
_ref$customerData = _ref.customerData,
|
|
103424
|
+
customerData = _ref$customerData === void 0 ? undefined : _ref$customerData;
|
|
103425
|
+
var isMobile = useIsMobileViewport();
|
|
103426
|
+
var _useState = (0,external_react_.useState)(false),
|
|
103427
|
+
_useState2 = useSignUpSignIn_slicedToArray(_useState, 2),
|
|
103428
|
+
isModalOpen = _useState2[0],
|
|
103429
|
+
setIsModalOpen = _useState2[1];
|
|
103430
|
+
var _useState3 = (0,external_react_.useState)(false),
|
|
103431
|
+
_useState4 = useSignUpSignIn_slicedToArray(_useState3, 2),
|
|
103432
|
+
copiedAccountId = _useState4[0],
|
|
103433
|
+
setCopiedAccountId = _useState4[1];
|
|
103434
|
+
var _useAccountMenuState = useAccountMenuState(),
|
|
103435
|
+
isAccountMenuOpen = _useAccountMenuState.isAccountMenuOpen,
|
|
103436
|
+
setIsAccountMenuOpen = _useAccountMenuState.setIsAccountMenuOpen,
|
|
103437
|
+
menuRef = _useAccountMenuState.menuRef;
|
|
103438
|
+
var resolvedLinks = useResolvedAuthLinks(sign_up, sign_in, signed_in, authService);
|
|
103439
|
+
var editing = isEditingMode();
|
|
103440
|
+
var copy = useSignUpSignIn_objectSpread(useSignUpSignIn_objectSpread({}, DEFAULT_MODAL_COPY), modal_copy);
|
|
103441
|
+
var authDisplay = getAuthDisplayState({
|
|
103442
|
+
resolvedLinks: resolvedLinks,
|
|
103443
|
+
sign_up: sign_up,
|
|
103444
|
+
sign_in: sign_in,
|
|
103445
|
+
signed_in: signed_in,
|
|
103446
|
+
customerData: customerData
|
|
103447
|
+
});
|
|
103448
|
+
var profileSummary = getCustomerProfileSummary(customerData);
|
|
103449
|
+
var profileUtilityLinks = resolveProfileUtilityLinks(profile_utility_links);
|
|
103450
|
+
var firstName = getCustomerFirstName(customerData);
|
|
103451
|
+
var accountType = getCustomerAccountType(customerData);
|
|
103452
|
+
var isBrandAffiliate = isBrandAffiliateCustomer(customerData);
|
|
103453
|
+
var customerPhotoUrl = getCustomerPhotoUrl(customerData);
|
|
103454
|
+
var photoUrl = customerPhotoUrl || DEFAULT_PROFILE_PHOTO;
|
|
103455
|
+
var greetingName = formatProfileGreetingName(firstName || profileSummary.displayName || authDisplay.accountTitle);
|
|
103456
|
+
var walletSummary = getProfileWalletSummary(customerData);
|
|
103457
|
+
var volumeStats = getProfileVolumeStats(customerData);
|
|
103458
|
+
var visibleQuickLinkGroups = profileUtilityLinks.quickLinkGroups.filter(function (group) {
|
|
103459
|
+
return !group.affiliateOnly || isBrandAffiliate;
|
|
103460
|
+
});
|
|
103461
|
+
var _getIconPresentation = getIconPresentation(icon, icon_color),
|
|
103462
|
+
resolvedIconName = _getIconPresentation.resolvedIconName,
|
|
103463
|
+
resolvedIconColor = _getIconPresentation.resolvedIconColor;
|
|
103464
|
+
var closeModal = function closeModal() {
|
|
103465
|
+
return setIsModalOpen(false);
|
|
103466
|
+
};
|
|
103467
|
+
var closeAccountMenu = function closeAccountMenu() {
|
|
103468
|
+
return setIsAccountMenuOpen(false);
|
|
103469
|
+
};
|
|
103470
|
+
var dismissMenus = function dismissMenus() {
|
|
103471
|
+
closeAccountMenu();
|
|
103472
|
+
closeModal();
|
|
103473
|
+
};
|
|
103474
|
+
var showMobileModal = isMobile && (authDisplay.showGuestAuth ? isModalOpen : isAccountMenuOpen);
|
|
103475
|
+
useEscapeToCloseModal(isModalOpen, setIsModalOpen);
|
|
103476
|
+
var handleAuthenticatedAccountClick = function handleAuthenticatedAccountClick() {
|
|
103477
|
+
if (editing) return;
|
|
103478
|
+
setIsAccountMenuOpen(function (open) {
|
|
103479
|
+
return !open;
|
|
103480
|
+
});
|
|
103481
|
+
};
|
|
103482
|
+
var handleCopyAccountId = /*#__PURE__*/function () {
|
|
103483
|
+
var _ref2 = useSignUpSignIn_asyncToGenerator(/*#__PURE__*/useSignUpSignIn_regenerator().m(function _callee() {
|
|
103484
|
+
var _globalThis$navigator, _globalThis$navigator2, _globalThis$setTimeou, _t;
|
|
103485
|
+
return useSignUpSignIn_regenerator().w(function (_context) {
|
|
103486
|
+
while (1) switch (_context.p = _context.n) {
|
|
103487
|
+
case 0:
|
|
103488
|
+
if (profileSummary.accountId) {
|
|
103489
|
+
_context.n = 1;
|
|
103490
|
+
break;
|
|
103491
|
+
}
|
|
103492
|
+
return _context.a(2);
|
|
103493
|
+
case 1:
|
|
103494
|
+
_context.p = 1;
|
|
103495
|
+
_context.n = 2;
|
|
103496
|
+
return (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 || (_globalThis$navigator = _globalThis$navigator.clipboard) === null || _globalThis$navigator === void 0 || (_globalThis$navigator2 = _globalThis$navigator.writeText) === null || _globalThis$navigator2 === void 0 ? void 0 : _globalThis$navigator2.call(_globalThis$navigator, profileSummary.accountId);
|
|
103497
|
+
case 2:
|
|
103498
|
+
setCopiedAccountId(true);
|
|
103499
|
+
(_globalThis$setTimeou = globalThis.setTimeout) === null || _globalThis$setTimeou === void 0 || _globalThis$setTimeou.call(globalThis, function () {
|
|
103500
|
+
return setCopiedAccountId(false);
|
|
103501
|
+
}, 2000);
|
|
103502
|
+
_context.n = 4;
|
|
103503
|
+
break;
|
|
103504
|
+
case 3:
|
|
103505
|
+
_context.p = 3;
|
|
103506
|
+
_t = _context.v;
|
|
103507
|
+
setCopiedAccountId(false);
|
|
103508
|
+
case 4:
|
|
103509
|
+
return _context.a(2);
|
|
103510
|
+
}
|
|
103511
|
+
}, _callee, null, [[1, 3]]);
|
|
103512
|
+
}));
|
|
103513
|
+
return function handleCopyAccountId() {
|
|
103514
|
+
return _ref2.apply(this, arguments);
|
|
103515
|
+
};
|
|
103516
|
+
}();
|
|
103517
|
+
var profilePanelProps = {
|
|
103518
|
+
copy: copy,
|
|
103519
|
+
editing: editing,
|
|
103520
|
+
authService: authService,
|
|
103521
|
+
accountUrl: authDisplay.accountUrl,
|
|
103522
|
+
profileSummary: profileSummary,
|
|
103523
|
+
greetingName: greetingName,
|
|
103524
|
+
customerPhotoUrl: customerPhotoUrl,
|
|
103525
|
+
photoUrl: photoUrl,
|
|
103526
|
+
resolvedIconName: resolvedIconName,
|
|
103527
|
+
resolvedIconColor: resolvedIconColor,
|
|
103528
|
+
accountType: accountType,
|
|
103529
|
+
isBrandAffiliate: isBrandAffiliate,
|
|
103530
|
+
volumeStats: volumeStats,
|
|
103531
|
+
walletSummary: walletSummary,
|
|
103532
|
+
walletUrl: profileUtilityLinks.walletUrl,
|
|
103533
|
+
visibleQuickLinkGroups: visibleQuickLinkGroups,
|
|
103534
|
+
copiedAccountId: copiedAccountId,
|
|
103535
|
+
onCopyAccountId: handleCopyAccountId,
|
|
103536
|
+
onDismiss: dismissMenus
|
|
103537
|
+
};
|
|
103538
|
+
return {
|
|
103539
|
+
show: show,
|
|
103540
|
+
isMobile: isMobile,
|
|
103541
|
+
editing: editing,
|
|
103542
|
+
copy: copy,
|
|
103543
|
+
authService: authService,
|
|
103544
|
+
authDisplay: authDisplay,
|
|
103545
|
+
menuRef: menuRef,
|
|
103546
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
103547
|
+
setIsModalOpen: setIsModalOpen,
|
|
103548
|
+
closeModal: closeModal,
|
|
103549
|
+
dismissMenus: dismissMenus,
|
|
103550
|
+
showMobileModal: showMobileModal,
|
|
103551
|
+
greetingName: greetingName,
|
|
103552
|
+
resolvedIconName: resolvedIconName,
|
|
103553
|
+
resolvedIconColor: resolvedIconColor,
|
|
103554
|
+
profilePanelProps: profilePanelProps,
|
|
103555
|
+
handleAuthenticatedAccountClick: handleAuthenticatedAccountClick
|
|
103556
|
+
};
|
|
103557
|
+
}
|
|
103558
|
+
;// ./src/components/signup-signin/SignUpSignIn.styled.jsx
|
|
102931
103559
|
|
|
102932
|
-
function
|
|
103560
|
+
function SignUpSignIn_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)."; }
|
|
102933
103561
|
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
102934
|
-
var
|
|
102935
|
-
target: "
|
|
103562
|
+
var SignUpSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103563
|
+
target: "ea5wen561"
|
|
102936
103564
|
} : 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));
|
|
102937
103565
|
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
102938
|
-
target: "
|
|
103566
|
+
target: "ea5wen560"
|
|
102939
103567
|
} : 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));
|
|
102940
103568
|
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
102941
|
-
target: "
|
|
103569
|
+
target: "ea5wen559"
|
|
102942
103570
|
} : 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));
|
|
102943
103571
|
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
102944
|
-
target: "
|
|
103572
|
+
target: "ea5wen558"
|
|
102945
103573
|
} : 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));
|
|
102946
103574
|
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
102947
|
-
target: "
|
|
103575
|
+
target: "ea5wen557"
|
|
102948
103576
|
} : 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));
|
|
102949
103577
|
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
102950
|
-
target: "
|
|
103578
|
+
target: "ea5wen556"
|
|
102951
103579
|
} : 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));
|
|
102952
103580
|
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
102953
|
-
target: "
|
|
103581
|
+
target: "ea5wen555"
|
|
102954
103582
|
} : 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));
|
|
102955
103583
|
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
102956
|
-
target: "
|
|
103584
|
+
target: "ea5wen554"
|
|
102957
103585
|
} : 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));
|
|
102958
103586
|
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
102959
|
-
target: "
|
|
103587
|
+
target: "ea5wen553"
|
|
102960
103588
|
} : 0)( true ? {
|
|
102961
103589
|
name: "wbibpl",
|
|
102962
103590
|
styles: "display:flex;align-items:flex-start;justify-content:flex-end;width:100%;min-height:44px;padding:12px 18px 0;box-sizing:border-box"
|
|
102963
103591
|
} : 0);
|
|
102964
103592
|
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
102965
|
-
target: "
|
|
103593
|
+
target: "ea5wen552"
|
|
102966
103594
|
} : 0)( true ? {
|
|
102967
103595
|
name: "1m9bk8n",
|
|
102968
103596
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
102969
103597
|
} : 0);
|
|
102970
103598
|
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
102971
|
-
target: "
|
|
103599
|
+
target: "ea5wen551"
|
|
102972
103600
|
} : 0)( true ? {
|
|
102973
103601
|
name: "u33vv4",
|
|
102974
103602
|
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;}"
|
|
102975
103603
|
} : 0);
|
|
102976
103604
|
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
102977
|
-
target: "
|
|
103605
|
+
target: "ea5wen550"
|
|
102978
103606
|
} : 0)( true ? {
|
|
102979
103607
|
name: "150yav4",
|
|
102980
103608
|
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;}"
|
|
102981
103609
|
} : 0);
|
|
102982
103610
|
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
102983
|
-
target: "
|
|
103611
|
+
target: "ea5wen549"
|
|
102984
103612
|
} : 0)( true ? {
|
|
102985
103613
|
name: "dbqp8z",
|
|
102986
103614
|
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
102987
103615
|
} : 0);
|
|
102988
103616
|
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
102989
|
-
target: "
|
|
103617
|
+
target: "ea5wen548"
|
|
102990
103618
|
} : 0)( true ? {
|
|
102991
103619
|
name: "phcu5u",
|
|
102992
103620
|
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;}}"
|
|
102993
103621
|
} : 0);
|
|
102994
103622
|
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
102995
|
-
target: "
|
|
103623
|
+
target: "ea5wen547"
|
|
102996
103624
|
} : 0)( true ? {
|
|
102997
103625
|
name: "1kyoijh",
|
|
102998
103626
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
102999
103627
|
} : 0);
|
|
103000
103628
|
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
103001
|
-
target: "
|
|
103629
|
+
target: "ea5wen546"
|
|
103002
103630
|
} : 0)( true ? {
|
|
103003
103631
|
name: "18ee69d",
|
|
103004
103632
|
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
103005
103633
|
} : 0);
|
|
103006
103634
|
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103007
|
-
target: "
|
|
103635
|
+
target: "ea5wen545"
|
|
103008
103636
|
} : 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));
|
|
103637
|
+
var AccountMenuRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103638
|
+
target: "ea5wen544"
|
|
103639
|
+
} : 0)( true ? {
|
|
103640
|
+
name: "b9hrb",
|
|
103641
|
+
styles: "position:relative;display:inline-flex;align-items:center"
|
|
103642
|
+
} : 0);
|
|
103643
|
+
var AccountToggle = /*#__PURE__*/createStyled("button", true ? {
|
|
103644
|
+
target: "ea5wen543"
|
|
103645
|
+
} : 0)( true ? {
|
|
103646
|
+
name: "1bylzkq",
|
|
103647
|
+
styles: "&&{display:inline-flex;align-items:center;gap:4px;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;color:var(--signin-text);padding:1px 4px;cursor:pointer;white-space:nowrap;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103648
|
+
} : 0);
|
|
103649
|
+
var AccountIconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
103650
|
+
target: "ea5wen542"
|
|
103651
|
+
} : 0)( true ? {
|
|
103652
|
+
name: "1n64mix",
|
|
103653
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;line-height:0;font-size:0"
|
|
103654
|
+
} : 0);
|
|
103655
|
+
var AccountDropdownPanel = /*#__PURE__*/createStyled("div", true ? {
|
|
103656
|
+
target: "ea5wen541"
|
|
103657
|
+
} : 0)( true ? {
|
|
103658
|
+
name: "hkpo46",
|
|
103659
|
+
styles: "position:absolute;top:calc(100% + 8px);right:0;z-index:1300;min-width:290px;max-width:320px;background:#ffffff;border:1px solid #e5e5e5;border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12);padding:0 0 12px;display:flex;flex-direction:column;gap:4px"
|
|
103660
|
+
} : 0);
|
|
103661
|
+
var ProfilePanelHeader = /*#__PURE__*/createStyled("div", true ? {
|
|
103662
|
+
target: "ea5wen540"
|
|
103663
|
+
} : 0)( true ? {
|
|
103664
|
+
name: "13fbptl",
|
|
103665
|
+
styles: "display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0"
|
|
103666
|
+
} : 0);
|
|
103667
|
+
var ProfilePanelHeading = /*#__PURE__*/createStyled("p", true ? {
|
|
103668
|
+
target: "ea5wen539"
|
|
103669
|
+
} : 0)( true ? {
|
|
103670
|
+
name: "1jpp97e",
|
|
103671
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
103672
|
+
} : 0);
|
|
103673
|
+
var ProfileViewAllButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103674
|
+
target: "ea5wen538"
|
|
103675
|
+
} : 0)( true ? {
|
|
103676
|
+
name: "136adtz",
|
|
103677
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;font-family:var(--signin-font);font-size:14px;font-weight:400;color:#3783b9;cursor:pointer;display:inline-flex;align-items:center;gap:4px;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103678
|
+
} : 0);
|
|
103679
|
+
var ProfileIdentityBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
103680
|
+
target: "ea5wen537"
|
|
103681
|
+
} : 0)( true ? {
|
|
103682
|
+
name: "hqp3yf",
|
|
103683
|
+
styles: "display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 12px 8px"
|
|
103684
|
+
} : 0);
|
|
103685
|
+
var ProfileAvatar = /*#__PURE__*/createStyled("img", true ? {
|
|
103686
|
+
target: "ea5wen536"
|
|
103687
|
+
} : 0)( true ? {
|
|
103688
|
+
name: "1kycpr4",
|
|
103689
|
+
styles: "width:64px;height:64px;border-radius:50%;object-fit:cover"
|
|
103690
|
+
} : 0);
|
|
103691
|
+
var ProfileAvatarFallback = /*#__PURE__*/createStyled("span", true ? {
|
|
103692
|
+
target: "ea5wen535"
|
|
103693
|
+
} : 0)( true ? {
|
|
103694
|
+
name: "eblg80",
|
|
103695
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;background:#f3f3f3;color:#5f5f5f"
|
|
103696
|
+
} : 0);
|
|
103697
|
+
var ProfileGreeting = /*#__PURE__*/createStyled("p", true ? {
|
|
103698
|
+
target: "ea5wen534"
|
|
103699
|
+
} : 0)( true ? {
|
|
103700
|
+
name: "1jpp97e",
|
|
103701
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
103702
|
+
} : 0);
|
|
103703
|
+
var ProfileAccountType = /*#__PURE__*/createStyled("p", true ? {
|
|
103704
|
+
target: "ea5wen533"
|
|
103705
|
+
} : 0)( true ? {
|
|
103706
|
+
name: "tl5djb",
|
|
103707
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:400;color:#252525"
|
|
103708
|
+
} : 0);
|
|
103709
|
+
var ProfileAffiliateBadgeRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103710
|
+
target: "ea5wen532"
|
|
103711
|
+
} : 0)( true ? {
|
|
103712
|
+
name: "76x507",
|
|
103713
|
+
styles: "display:inline-flex;align-items:center;gap:6px"
|
|
103714
|
+
} : 0);
|
|
103715
|
+
var ProfileAffiliateBadgeIcon = /*#__PURE__*/createStyled("span", true ? {
|
|
103716
|
+
target: "ea5wen531"
|
|
103717
|
+
} : 0)( true ? {
|
|
103718
|
+
name: "pa6lz1",
|
|
103719
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#e87722;color:#ffffff;font-size:10px;font-weight:700;line-height:1"
|
|
103720
|
+
} : 0);
|
|
103721
|
+
var ProfileAffiliateBadgeText = /*#__PURE__*/createStyled("span", true ? {
|
|
103722
|
+
target: "ea5wen530"
|
|
103723
|
+
} : 0)( true ? {
|
|
103724
|
+
name: "15fgwg2",
|
|
103725
|
+
styles: "font-family:var(--signin-font);font-size:12px;font-weight:400;color:#252525"
|
|
103726
|
+
} : 0);
|
|
103727
|
+
var ProfileVolumeStatsRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103728
|
+
target: "ea5wen529"
|
|
103729
|
+
} : 0)( true ? {
|
|
103730
|
+
name: "1asjdsl",
|
|
103731
|
+
styles: "display:flex;align-items:center;justify-content:center;gap:16px;width:100%"
|
|
103732
|
+
} : 0);
|
|
103733
|
+
var ProfileVolumeStat = /*#__PURE__*/createStyled("div", true ? {
|
|
103734
|
+
target: "ea5wen528"
|
|
103735
|
+
} : 0)( true ? {
|
|
103736
|
+
name: "1tkope6",
|
|
103737
|
+
styles: "display:inline-flex;align-items:center;gap:4px"
|
|
103738
|
+
} : 0);
|
|
103739
|
+
var ProfileVolumeBadge = /*#__PURE__*/createStyled("span", true ? {
|
|
103740
|
+
target: "ea5wen527"
|
|
103741
|
+
} : 0)( true ? {
|
|
103742
|
+
name: "67bryj",
|
|
103743
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:2px 6px;border-radius:2px;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:12px;font-weight:600;line-height:16px"
|
|
103744
|
+
} : 0);
|
|
103745
|
+
var ProfileVolumeLabel = /*#__PURE__*/createStyled("span", true ? {
|
|
103746
|
+
target: "ea5wen526"
|
|
103747
|
+
} : 0)( true ? {
|
|
103748
|
+
name: "1h9lxx7",
|
|
103749
|
+
styles: "font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
103750
|
+
} : 0);
|
|
103751
|
+
var ProfileWalletSection = /*#__PURE__*/createStyled("div", true ? {
|
|
103752
|
+
target: "ea5wen525"
|
|
103753
|
+
} : 0)( true ? {
|
|
103754
|
+
name: "dba0hq",
|
|
103755
|
+
styles: "padding:8px 12px"
|
|
103756
|
+
} : 0);
|
|
103757
|
+
var ProfileWalletHeader = /*#__PURE__*/createStyled("button", true ? {
|
|
103758
|
+
target: "ea5wen524"
|
|
103759
|
+
} : 0)( true ? {
|
|
103760
|
+
name: "uls0u3",
|
|
103761
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;margin:0 0 8px;width:100%;display:inline-flex;align-items:center;gap:4px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525;cursor:pointer;text-align:left;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103762
|
+
} : 0);
|
|
103763
|
+
var ProfileWalletCards = /*#__PURE__*/createStyled("div", true ? {
|
|
103764
|
+
target: "ea5wen523"
|
|
103765
|
+
} : 0)( true ? {
|
|
103766
|
+
name: "11jf4ye",
|
|
103767
|
+
styles: "display:flex;gap:8px"
|
|
103768
|
+
} : 0);
|
|
103769
|
+
var ProfileWalletCard = /*#__PURE__*/createStyled("div", true ? {
|
|
103770
|
+
target: "ea5wen522"
|
|
103771
|
+
} : 0)( true ? {
|
|
103772
|
+
name: "1n1fgd8",
|
|
103773
|
+
styles: "flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:10px 8px;border-radius:8px;background:#f3f3f3"
|
|
103774
|
+
} : 0);
|
|
103775
|
+
var ProfileWalletValue = /*#__PURE__*/createStyled("span", true ? {
|
|
103776
|
+
target: "ea5wen521"
|
|
103777
|
+
} : 0)( true ? {
|
|
103778
|
+
name: "cvi7is",
|
|
103779
|
+
styles: "font-family:var(--signin-font);font-size:16px;font-weight:600;color:#252525;line-height:1.2"
|
|
103780
|
+
} : 0);
|
|
103781
|
+
var ProfileWalletLabel = /*#__PURE__*/createStyled("span", true ? {
|
|
103782
|
+
target: "ea5wen520"
|
|
103783
|
+
} : 0)( true ? {
|
|
103784
|
+
name: "1h9lxx7",
|
|
103785
|
+
styles: "font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
103786
|
+
} : 0);
|
|
103787
|
+
var ProfileQuickLinksSection = /*#__PURE__*/createStyled("div", true ? {
|
|
103788
|
+
target: "ea5wen519"
|
|
103789
|
+
} : 0)( true ? {
|
|
103790
|
+
name: "nzethj",
|
|
103791
|
+
styles: "padding:4px 12px 0"
|
|
103792
|
+
} : 0);
|
|
103793
|
+
var ProfileQuickLinksTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
103794
|
+
target: "ea5wen518"
|
|
103795
|
+
} : 0)( true ? {
|
|
103796
|
+
name: "1ef5jph",
|
|
103797
|
+
styles: "margin:0 0 8px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
103798
|
+
} : 0);
|
|
103799
|
+
var ProfileQuickLinkGroup = /*#__PURE__*/createStyled("div", true ? {
|
|
103800
|
+
target: "ea5wen517"
|
|
103801
|
+
} : 0)( true ? {
|
|
103802
|
+
name: "5bhc30",
|
|
103803
|
+
styles: "margin-bottom:8px"
|
|
103804
|
+
} : 0);
|
|
103805
|
+
var ProfileQuickLinkGroupTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
103806
|
+
target: "ea5wen516"
|
|
103807
|
+
} : 0)( true ? {
|
|
103808
|
+
name: "1ijkzem",
|
|
103809
|
+
styles: "margin:0 0 8px;padding-left:8px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
103810
|
+
} : 0);
|
|
103811
|
+
var ProfileIdRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103812
|
+
target: "ea5wen515"
|
|
103813
|
+
} : 0)( true ? {
|
|
103814
|
+
name: "1tkope6",
|
|
103815
|
+
styles: "display:inline-flex;align-items:center;gap:4px"
|
|
103816
|
+
} : 0);
|
|
103817
|
+
var ProfileIdText = /*#__PURE__*/createStyled("p", true ? {
|
|
103818
|
+
target: "ea5wen514"
|
|
103819
|
+
} : 0)( true ? {
|
|
103820
|
+
name: "uoxnul",
|
|
103821
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
103822
|
+
} : 0);
|
|
103823
|
+
var ProfileCopyButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103824
|
+
target: "ea5wen513"
|
|
103825
|
+
} : 0)( true ? {
|
|
103826
|
+
name: "1gpr2pr",
|
|
103827
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#b2b2b2;cursor:pointer;line-height:0;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103828
|
+
} : 0);
|
|
103829
|
+
var ProfileLinkSection = /*#__PURE__*/createStyled("div", true ? {
|
|
103830
|
+
target: "ea5wen512"
|
|
103831
|
+
} : 0)( true ? {
|
|
103832
|
+
name: "qn06vg",
|
|
103833
|
+
styles: "padding:4px 12px"
|
|
103834
|
+
} : 0);
|
|
103835
|
+
var ProfileLinkSectionTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
103836
|
+
target: "ea5wen511"
|
|
103837
|
+
} : 0)( true ? {
|
|
103838
|
+
name: "1cublp4",
|
|
103839
|
+
styles: "margin:0 0 12px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
103840
|
+
} : 0);
|
|
103841
|
+
var ProfileLinkList = /*#__PURE__*/createStyled("div", true ? {
|
|
103842
|
+
target: "ea5wen510"
|
|
103843
|
+
} : 0)( true ? {
|
|
103844
|
+
name: "1nhzvu0",
|
|
103845
|
+
styles: "display:flex;flex-direction:column;gap:8px;padding-left:8px"
|
|
103846
|
+
} : 0);
|
|
103847
|
+
var ProfileUtilityLink = /*#__PURE__*/createStyled("button", true ? {
|
|
103848
|
+
target: "ea5wen59"
|
|
103849
|
+
} : 0)( true ? {
|
|
103850
|
+
name: "19r2xhx",
|
|
103851
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;text-align:left;font-family:var(--signin-font);font-size:14px;font-weight:400;line-height:20px;color:#5f5f5f;cursor:pointer;display:inline-flex;align-items:center;gap:4px;&:hover,&:focus-visible{color:#252525;text-decoration:underline;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103852
|
+
} : 0);
|
|
103853
|
+
var ProfileLinkExternalIcon = /*#__PURE__*/createStyled("span", true ? {
|
|
103854
|
+
target: "ea5wen58"
|
|
103855
|
+
} : 0)( true ? {
|
|
103856
|
+
name: "tumm0h",
|
|
103857
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;color:#5f5f5f;line-height:0"
|
|
103858
|
+
} : 0);
|
|
103859
|
+
var ProfileSignOutButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103860
|
+
target: "ea5wen57"
|
|
103861
|
+
} : 0)( true ? {
|
|
103862
|
+
name: "vqcag5",
|
|
103863
|
+
styles: "appearance:none;margin:0 12px;padding:8px;border:1px solid #b2b2b2;border-radius:4px;background:#ffffff;color:#252525;font-family:var(--signin-font);font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103864
|
+
} : 0);
|
|
103865
|
+
var AccountUserName = /*#__PURE__*/createStyled("span", true ? {
|
|
103866
|
+
target: "ea5wen56"
|
|
103867
|
+
} : 0)("cursor:pointer;text-underline-offset:2px;", AccountToggle, ":hover &,", AccountToggle, ":focus-visible &{text-decoration:underline;}" + ( true ? "" : 0));
|
|
103868
|
+
var AccountProfileBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
103869
|
+
target: "ea5wen55"
|
|
103870
|
+
} : 0)( true ? {
|
|
103871
|
+
name: "urqszi",
|
|
103872
|
+
styles: "display:flex;flex-direction:column;gap:4px"
|
|
103873
|
+
} : 0);
|
|
103874
|
+
var AccountProfileTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
103875
|
+
target: "ea5wen54"
|
|
103876
|
+
} : 0)( true ? {
|
|
103877
|
+
name: "1i1k95m",
|
|
103878
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:16px;font-weight:600;color:#252525"
|
|
103879
|
+
} : 0);
|
|
103880
|
+
var AccountProfileMeta = /*#__PURE__*/createStyled("p", true ? {
|
|
103881
|
+
target: "ea5wen53"
|
|
103882
|
+
} : 0)( true ? {
|
|
103883
|
+
name: "290cob",
|
|
103884
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:13px;line-height:18px;color:#5f5f5f;overflow-wrap:anywhere"
|
|
103885
|
+
} : 0);
|
|
103886
|
+
var AccountMenuAction = /*#__PURE__*/createStyled("button", true ? {
|
|
103887
|
+
target: "ea5wen52"
|
|
103888
|
+
} : 0)( true ? {
|
|
103889
|
+
name: "ia7rwo",
|
|
103890
|
+
styles: "width:100%;min-height:40px;border-radius:4px;border:0;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:14px;font-weight:600;cursor:pointer;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
103891
|
+
} : 0);
|
|
103892
|
+
var AccountSignOutButton = /*#__PURE__*/createStyled(AccountMenuAction, true ? {
|
|
103893
|
+
target: "ea5wen51"
|
|
103894
|
+
} : 0)( true ? {
|
|
103895
|
+
name: "1uk495g",
|
|
103896
|
+
styles: "background:#ffffff;color:#252525;border:1px solid #252525"
|
|
103897
|
+
} : 0);
|
|
103009
103898
|
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103010
|
-
target: "
|
|
103899
|
+
target: "ea5wen50"
|
|
103011
103900
|
} : 0)( true ? {
|
|
103012
103901
|
name: "16bjh6l",
|
|
103013
103902
|
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;}"
|
|
103014
103903
|
} : 0);
|
|
103015
|
-
;// ./src/components/signup-signin/
|
|
103016
|
-
|
|
103017
|
-
|
|
103018
|
-
|
|
103019
|
-
|
|
103020
|
-
|
|
103021
|
-
|
|
103022
|
-
|
|
103023
|
-
|
|
103024
|
-
|
|
103025
|
-
|
|
103026
|
-
|
|
103027
|
-
|
|
103904
|
+
;// ./src/components/signup-signin/SignUpSignInProfilePanel.jsx
|
|
103905
|
+
|
|
103906
|
+
|
|
103907
|
+
|
|
103908
|
+
|
|
103909
|
+
|
|
103910
|
+
|
|
103911
|
+
var CopyIdIcon = function CopyIdIcon() {
|
|
103912
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
103913
|
+
width: "12",
|
|
103914
|
+
height: "12",
|
|
103915
|
+
viewBox: "0 0 24 24",
|
|
103916
|
+
"aria-hidden": "true",
|
|
103917
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
103918
|
+
fill: "currentColor"
|
|
103919
|
+
// eslint-disable-next-line spellcheck/spell-checker
|
|
103920
|
+
,
|
|
103921
|
+
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 18H8V7h11v16z"
|
|
103922
|
+
})
|
|
103923
|
+
});
|
|
103924
|
+
};
|
|
103925
|
+
var SignUpSignInProfilePanel_ArrowRightIcon = function ArrowRightIcon() {
|
|
103926
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
103927
|
+
width: "14",
|
|
103928
|
+
height: "14",
|
|
103929
|
+
viewBox: "0 0 24 24",
|
|
103930
|
+
"aria-hidden": "true",
|
|
103931
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
103932
|
+
fill: "currentColor",
|
|
103933
|
+
d: "M10 17l5-5-5-5v10z"
|
|
103934
|
+
})
|
|
103935
|
+
});
|
|
103936
|
+
};
|
|
103937
|
+
var ExternalLinkIcon = function ExternalLinkIcon() {
|
|
103938
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
103939
|
+
width: "12",
|
|
103940
|
+
height: "12",
|
|
103941
|
+
viewBox: "0 0 24 24",
|
|
103942
|
+
"aria-hidden": "true",
|
|
103943
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
103944
|
+
fill: "currentColor",
|
|
103945
|
+
d: "M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59L10 12.59 11.41 14 19 6.41V10h2V3h-7z"
|
|
103946
|
+
})
|
|
103947
|
+
});
|
|
103948
|
+
};
|
|
103949
|
+
var SignOutIcon = function SignOutIcon() {
|
|
103950
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
103951
|
+
width: "16",
|
|
103952
|
+
height: "16",
|
|
103953
|
+
viewBox: "0 0 24 24",
|
|
103954
|
+
"aria-hidden": "true",
|
|
103955
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
103956
|
+
fill: "currentColor",
|
|
103957
|
+
d: "M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5-5-5zM4 5h8V3H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8v-2H4V5z"
|
|
103958
|
+
})
|
|
103959
|
+
});
|
|
103960
|
+
};
|
|
103961
|
+
function ProfileQuickLinkItem(_ref) {
|
|
103962
|
+
var link = _ref.link,
|
|
103963
|
+
editing = _ref.editing,
|
|
103964
|
+
authService = _ref.authService,
|
|
103965
|
+
onDismiss = _ref.onDismiss;
|
|
103966
|
+
var handleClick = function handleClick() {
|
|
103967
|
+
onDismiss();
|
|
103968
|
+
handleProfileLinkNavigate(editing, link.url, authService, {
|
|
103969
|
+
external: link.external
|
|
103970
|
+
});
|
|
103971
|
+
};
|
|
103972
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileUtilityLink, {
|
|
103973
|
+
type: "button",
|
|
103974
|
+
"data-testid": "profile-link-".concat(link.label),
|
|
103975
|
+
onClick: handleClick,
|
|
103976
|
+
children: [link.label, link.external ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileLinkExternalIcon, {
|
|
103977
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ExternalLinkIcon, {})
|
|
103978
|
+
}) : null]
|
|
103979
|
+
});
|
|
103980
|
+
}
|
|
103981
|
+
ProfileQuickLinkItem.propTypes = {
|
|
103982
|
+
link: external_prop_types_["default"].shape({
|
|
103983
|
+
label: external_prop_types_["default"].string.isRequired,
|
|
103984
|
+
url: external_prop_types_["default"].string.isRequired,
|
|
103985
|
+
external: external_prop_types_["default"].bool
|
|
103986
|
+
}).isRequired,
|
|
103987
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
103988
|
+
authService: external_prop_types_["default"].object,
|
|
103989
|
+
onDismiss: external_prop_types_["default"].func.isRequired
|
|
103990
|
+
};
|
|
103991
|
+
function ProfileQuickLinkGroups(_ref2) {
|
|
103992
|
+
var groups = _ref2.groups,
|
|
103993
|
+
copy = _ref2.copy,
|
|
103994
|
+
editing = _ref2.editing,
|
|
103995
|
+
authService = _ref2.authService,
|
|
103996
|
+
onDismiss = _ref2.onDismiss;
|
|
103997
|
+
if (!groups.length) return null;
|
|
103998
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileQuickLinksSection, {
|
|
103999
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinksTitle, {
|
|
104000
|
+
children: copy.quick_links_heading
|
|
104001
|
+
}), groups.map(function (group) {
|
|
104002
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileQuickLinkGroup, {
|
|
104003
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkGroupTitle, {
|
|
104004
|
+
children: group.title
|
|
104005
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileLinkList, {
|
|
104006
|
+
children: group.links.map(function (link) {
|
|
104007
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkItem, {
|
|
104008
|
+
link: link,
|
|
104009
|
+
editing: editing,
|
|
104010
|
+
authService: authService,
|
|
104011
|
+
onDismiss: onDismiss
|
|
104012
|
+
}, "".concat(group.title, "-").concat(link.label));
|
|
104013
|
+
})
|
|
104014
|
+
})]
|
|
104015
|
+
}, group.title);
|
|
104016
|
+
})]
|
|
104017
|
+
});
|
|
104018
|
+
}
|
|
104019
|
+
ProfileQuickLinkGroups.propTypes = {
|
|
104020
|
+
groups: external_prop_types_["default"].arrayOf(external_prop_types_["default"].shape({
|
|
104021
|
+
title: external_prop_types_["default"].string.isRequired,
|
|
104022
|
+
links: external_prop_types_["default"].array.isRequired
|
|
104023
|
+
})).isRequired,
|
|
104024
|
+
copy: external_prop_types_["default"].object.isRequired,
|
|
104025
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104026
|
+
authService: external_prop_types_["default"].object,
|
|
104027
|
+
onDismiss: external_prop_types_["default"].func.isRequired
|
|
104028
|
+
};
|
|
104029
|
+
function ProfileVolumeStats(_ref3) {
|
|
104030
|
+
var volumeStats = _ref3.volumeStats;
|
|
104031
|
+
if (!volumeStats.dcSv && !volumeStats.gsv) return null;
|
|
104032
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStatsRow, {
|
|
104033
|
+
children: [volumeStats.dcSv ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStat, {
|
|
104034
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeBadge, {
|
|
104035
|
+
children: volumeStats.dcSv
|
|
104036
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeLabel, {
|
|
104037
|
+
children: "DC-SV"
|
|
104038
|
+
})]
|
|
104039
|
+
}) : null, volumeStats.gsv ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStat, {
|
|
104040
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeBadge, {
|
|
104041
|
+
children: volumeStats.gsv
|
|
104042
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeLabel, {
|
|
104043
|
+
children: "GSV"
|
|
104044
|
+
})]
|
|
104045
|
+
}) : null]
|
|
104046
|
+
});
|
|
104047
|
+
}
|
|
104048
|
+
ProfileVolumeStats.propTypes = {
|
|
104049
|
+
volumeStats: external_prop_types_["default"].shape({
|
|
104050
|
+
dcSv: external_prop_types_["default"].string,
|
|
104051
|
+
gsv: external_prop_types_["default"].string
|
|
104052
|
+
}).isRequired
|
|
104053
|
+
};
|
|
104054
|
+
function SignUpSignInProfilePanel(_ref4) {
|
|
104055
|
+
var copy = _ref4.copy,
|
|
104056
|
+
editing = _ref4.editing,
|
|
104057
|
+
authService = _ref4.authService,
|
|
104058
|
+
accountUrl = _ref4.accountUrl,
|
|
104059
|
+
profileSummary = _ref4.profileSummary,
|
|
104060
|
+
greetingName = _ref4.greetingName,
|
|
104061
|
+
customerPhotoUrl = _ref4.customerPhotoUrl,
|
|
104062
|
+
photoUrl = _ref4.photoUrl,
|
|
104063
|
+
resolvedIconName = _ref4.resolvedIconName,
|
|
104064
|
+
resolvedIconColor = _ref4.resolvedIconColor,
|
|
104065
|
+
accountType = _ref4.accountType,
|
|
104066
|
+
isBrandAffiliate = _ref4.isBrandAffiliate,
|
|
104067
|
+
volumeStats = _ref4.volumeStats,
|
|
104068
|
+
walletSummary = _ref4.walletSummary,
|
|
104069
|
+
walletUrl = _ref4.walletUrl,
|
|
104070
|
+
visibleQuickLinkGroups = _ref4.visibleQuickLinkGroups,
|
|
104071
|
+
copiedAccountId = _ref4.copiedAccountId,
|
|
104072
|
+
onCopyAccountId = _ref4.onCopyAccountId,
|
|
104073
|
+
onDismiss = _ref4.onDismiss;
|
|
104074
|
+
var handleViewProfile = function handleViewProfile() {
|
|
104075
|
+
onDismiss();
|
|
104076
|
+
handleAccountNavigate(editing, accountUrl, authService);
|
|
104077
|
+
};
|
|
104078
|
+
var handleWalletClick = function handleWalletClick() {
|
|
104079
|
+
onDismiss();
|
|
104080
|
+
handleProfileLinkNavigate(editing, walletUrl, authService);
|
|
104081
|
+
};
|
|
104082
|
+
var handleSignOut = function handleSignOut() {
|
|
104083
|
+
onDismiss();
|
|
104084
|
+
handleSignOutNavigate(editing, authService);
|
|
104085
|
+
};
|
|
104086
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104087
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfilePanelHeader, {
|
|
104088
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfilePanelHeading, {
|
|
104089
|
+
children: copy.profile_heading
|
|
104090
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileViewAllButton, {
|
|
104091
|
+
type: "button",
|
|
104092
|
+
"data-testid": "account-view-profile",
|
|
104093
|
+
onClick: handleViewProfile,
|
|
104094
|
+
children: [copy.profile_view_all_label, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel_ArrowRightIcon, {})]
|
|
104095
|
+
})]
|
|
104096
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdentityBlock, {
|
|
104097
|
+
"data-testid": "account-profile-details",
|
|
104098
|
+
children: [customerPhotoUrl ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAvatar, {
|
|
104099
|
+
src: photoUrl,
|
|
104100
|
+
alt: ""
|
|
104101
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAvatarFallback, {
|
|
104102
|
+
"aria-hidden": true,
|
|
104103
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104104
|
+
name: resolvedIconName,
|
|
104105
|
+
size: "large",
|
|
104106
|
+
colorOverride: resolvedIconColor
|
|
104107
|
+
})
|
|
104108
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileGreeting, {
|
|
104109
|
+
children: ["Hi, ", greetingName]
|
|
104110
|
+
}), accountType ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAccountType, {
|
|
104111
|
+
children: accountType
|
|
104112
|
+
}) : null, profileSummary.accountId ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdRow, {
|
|
104113
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdText, {
|
|
104114
|
+
children: ["ID: ", profileSummary.accountId]
|
|
104115
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileCopyButton, {
|
|
104116
|
+
type: "button",
|
|
104117
|
+
"aria-label": copiedAccountId ? copy.copied_id_label : copy.copy_id_label,
|
|
104118
|
+
title: copiedAccountId ? copy.copied_id_label : copy.copy_id_label,
|
|
104119
|
+
onClick: onCopyAccountId,
|
|
104120
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CopyIdIcon, {})
|
|
104121
|
+
})]
|
|
104122
|
+
}) : null, isBrandAffiliate ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileAffiliateBadgeRow, {
|
|
104123
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAffiliateBadgeIcon, {
|
|
104124
|
+
"aria-hidden": true,
|
|
104125
|
+
children: "BA"
|
|
104126
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAffiliateBadgeText, {
|
|
104127
|
+
children: accountType
|
|
104128
|
+
})]
|
|
104129
|
+
}) : null, isBrandAffiliate ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeStats, {
|
|
104130
|
+
volumeStats: volumeStats
|
|
104131
|
+
}) : null]
|
|
104132
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletSection, {
|
|
104133
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletHeader, {
|
|
104134
|
+
type: "button",
|
|
104135
|
+
"data-testid": "profile-wallet-link",
|
|
104136
|
+
onClick: handleWalletClick,
|
|
104137
|
+
children: [copy.wallet_heading, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel_ArrowRightIcon, {})]
|
|
104138
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCards, {
|
|
104139
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCard, {
|
|
104140
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletValue, {
|
|
104141
|
+
children: walletSummary.storeCredit
|
|
104142
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletLabel, {
|
|
104143
|
+
children: copy.credit_label
|
|
104144
|
+
})]
|
|
104145
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCard, {
|
|
104146
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletValue, {
|
|
104147
|
+
children: walletSummary.promoCount
|
|
104148
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletLabel, {
|
|
104149
|
+
children: copy.promos_label
|
|
104150
|
+
})]
|
|
104151
|
+
})]
|
|
104152
|
+
})]
|
|
104153
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkGroups, {
|
|
104154
|
+
groups: visibleQuickLinkGroups,
|
|
104155
|
+
copy: copy,
|
|
104156
|
+
editing: editing,
|
|
104157
|
+
authService: authService,
|
|
104158
|
+
onDismiss: onDismiss
|
|
104159
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileSignOutButton, {
|
|
104160
|
+
type: "button",
|
|
104161
|
+
"data-testid": "account-sign-out",
|
|
104162
|
+
onClick: handleSignOut,
|
|
104163
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SignOutIcon, {}), copy.sign_out_label]
|
|
104164
|
+
})]
|
|
104165
|
+
});
|
|
104166
|
+
}
|
|
104167
|
+
SignUpSignInProfilePanel.propTypes = {
|
|
104168
|
+
copy: external_prop_types_["default"].object.isRequired,
|
|
104169
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104170
|
+
authService: external_prop_types_["default"].object,
|
|
104171
|
+
accountUrl: external_prop_types_["default"].string,
|
|
104172
|
+
profileSummary: external_prop_types_["default"].shape({
|
|
104173
|
+
accountId: external_prop_types_["default"].string,
|
|
104174
|
+
displayName: external_prop_types_["default"].string,
|
|
104175
|
+
email: external_prop_types_["default"].string
|
|
104176
|
+
}).isRequired,
|
|
104177
|
+
greetingName: external_prop_types_["default"].string.isRequired,
|
|
104178
|
+
customerPhotoUrl: external_prop_types_["default"].string,
|
|
104179
|
+
photoUrl: external_prop_types_["default"].string.isRequired,
|
|
104180
|
+
resolvedIconName: external_prop_types_["default"].string.isRequired,
|
|
104181
|
+
resolvedIconColor: external_prop_types_["default"].string,
|
|
104182
|
+
accountType: external_prop_types_["default"].string,
|
|
104183
|
+
isBrandAffiliate: external_prop_types_["default"].bool.isRequired,
|
|
104184
|
+
volumeStats: external_prop_types_["default"].shape({
|
|
104185
|
+
dcSv: external_prop_types_["default"].string,
|
|
104186
|
+
gsv: external_prop_types_["default"].string
|
|
104187
|
+
}).isRequired,
|
|
104188
|
+
walletSummary: external_prop_types_["default"].shape({
|
|
104189
|
+
storeCredit: external_prop_types_["default"].number,
|
|
104190
|
+
promoCount: external_prop_types_["default"].number
|
|
104191
|
+
}).isRequired,
|
|
104192
|
+
walletUrl: external_prop_types_["default"].string.isRequired,
|
|
104193
|
+
visibleQuickLinkGroups: external_prop_types_["default"].array.isRequired,
|
|
104194
|
+
copiedAccountId: external_prop_types_["default"].bool.isRequired,
|
|
104195
|
+
onCopyAccountId: external_prop_types_["default"].func.isRequired,
|
|
104196
|
+
onDismiss: external_prop_types_["default"].func.isRequired
|
|
104197
|
+
};
|
|
104198
|
+
;// ./src/components/signup-signin/SignUpSignInViews.jsx
|
|
104199
|
+
function SignUpSignInViews_typeof(o) { "@babel/helpers - typeof"; return SignUpSignInViews_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; }, SignUpSignInViews_typeof(o); }
|
|
104200
|
+
function SignUpSignInViews_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; }
|
|
104201
|
+
function SignUpSignInViews_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpSignInViews_ownKeys(Object(t), !0).forEach(function (r) { SignUpSignInViews_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpSignInViews_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
104202
|
+
function SignUpSignInViews_defineProperty(e, r, t) { return (r = SignUpSignInViews_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
104203
|
+
function SignUpSignInViews_toPropertyKey(t) { var i = SignUpSignInViews_toPrimitive(t, "string"); return "symbol" == SignUpSignInViews_typeof(i) ? i : i + ""; }
|
|
104204
|
+
function SignUpSignInViews_toPrimitive(t, r) { if ("object" != SignUpSignInViews_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpSignInViews_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
104205
|
+
|
|
104206
|
+
|
|
104207
|
+
|
|
104208
|
+
|
|
104209
|
+
|
|
104210
|
+
|
|
104211
|
+
|
|
103028
104212
|
|
|
104213
|
+
function DesktopGuestSignupSection(_ref) {
|
|
104214
|
+
var isMobile = _ref.isMobile,
|
|
104215
|
+
showGuestAuth = _ref.showGuestAuth,
|
|
104216
|
+
effectiveSignUpTitle = _ref.effectiveSignUpTitle,
|
|
104217
|
+
effectiveSignUp = _ref.effectiveSignUp,
|
|
104218
|
+
editing = _ref.editing,
|
|
104219
|
+
authService = _ref.authService,
|
|
104220
|
+
parent$ = _ref.parent$,
|
|
104221
|
+
resolvedIconName = _ref.resolvedIconName,
|
|
104222
|
+
resolvedIconColor = _ref.resolvedIconColor;
|
|
104223
|
+
if (isMobile || !showGuestAuth) {
|
|
104224
|
+
return null;
|
|
104225
|
+
}
|
|
104226
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104227
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104228
|
+
"data-testid": "signup-link",
|
|
104229
|
+
"aria-label": effectiveSignUpTitle,
|
|
104230
|
+
type: "button"
|
|
104231
|
+
}, parentEditableProps(parent$, "sign_up_url")), {}, {
|
|
104232
|
+
onClick: function onClick() {
|
|
104233
|
+
return handleSignUpNavigate(editing, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url, authService);
|
|
104234
|
+
},
|
|
104235
|
+
onKeyDown: handleKeyboardActivate,
|
|
104236
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
|
|
104237
|
+
className: "icon-container",
|
|
104238
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
|
|
104239
|
+
"aria-hidden": true,
|
|
104240
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104241
|
+
name: resolvedIconName,
|
|
104242
|
+
size: "large",
|
|
104243
|
+
colorOverride: resolvedIconColor
|
|
104244
|
+
})
|
|
104245
|
+
}))
|
|
104246
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104247
|
+
as: "span"
|
|
104248
|
+
}, parentEditableProps(parent$, "sign_up")), {}, {
|
|
104249
|
+
children: effectiveSignUpTitle
|
|
104250
|
+
}))]
|
|
104251
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
104252
|
+
"aria-hidden": true,
|
|
104253
|
+
children: "/"
|
|
104254
|
+
})]
|
|
104255
|
+
});
|
|
104256
|
+
}
|
|
104257
|
+
DesktopGuestSignupSection.propTypes = {
|
|
104258
|
+
isMobile: external_prop_types_["default"].bool.isRequired,
|
|
104259
|
+
showGuestAuth: external_prop_types_["default"].bool.isRequired,
|
|
104260
|
+
effectiveSignUpTitle: external_prop_types_["default"].string.isRequired,
|
|
104261
|
+
effectiveSignUp: authLinkPropType,
|
|
104262
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104263
|
+
authService: authServicePropType,
|
|
104264
|
+
parent$: parentTagsPropType,
|
|
104265
|
+
resolvedIconName: external_prop_types_["default"].string.isRequired,
|
|
104266
|
+
resolvedIconColor: external_prop_types_["default"].string
|
|
104267
|
+
};
|
|
104268
|
+
function GuestSignInButton(_ref2) {
|
|
104269
|
+
var effectiveSignInTitle = _ref2.effectiveSignInTitle,
|
|
104270
|
+
parent$ = _ref2.parent$,
|
|
104271
|
+
editing = _ref2.editing,
|
|
104272
|
+
isMobile = _ref2.isMobile,
|
|
104273
|
+
setIsModalOpen = _ref2.setIsModalOpen,
|
|
104274
|
+
effectiveSignIn = _ref2.effectiveSignIn,
|
|
104275
|
+
authService = _ref2.authService;
|
|
104276
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104277
|
+
"data-testid": "signin-button",
|
|
104278
|
+
"aria-label": effectiveSignInTitle
|
|
104279
|
+
}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
104280
|
+
onClick: function onClick() {
|
|
104281
|
+
return handleSignInActivate(editing, isMobile, setIsModalOpen, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url, authService);
|
|
104282
|
+
},
|
|
104283
|
+
onKeyDown: handleKeyboardActivate,
|
|
104284
|
+
type: "button",
|
|
104285
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
104286
|
+
children: effectiveSignInTitle
|
|
104287
|
+
}))
|
|
104288
|
+
}));
|
|
104289
|
+
}
|
|
104290
|
+
GuestSignInButton.propTypes = {
|
|
104291
|
+
effectiveSignInTitle: external_prop_types_["default"].string.isRequired,
|
|
104292
|
+
parent$: parentTagsPropType,
|
|
104293
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104294
|
+
isMobile: external_prop_types_["default"].bool.isRequired,
|
|
104295
|
+
setIsModalOpen: external_prop_types_["default"].func.isRequired,
|
|
104296
|
+
effectiveSignIn: authLinkPropType,
|
|
104297
|
+
authService: authServicePropType
|
|
104298
|
+
};
|
|
104299
|
+
function AuthenticatedAccountMenu(_ref3) {
|
|
104300
|
+
var menuRef = _ref3.menuRef,
|
|
104301
|
+
isAccountMenuOpen = _ref3.isAccountMenuOpen,
|
|
104302
|
+
greetingName = _ref3.greetingName,
|
|
104303
|
+
accountToggleLabel = _ref3.accountToggleLabel,
|
|
104304
|
+
resolvedIconName = _ref3.resolvedIconName,
|
|
104305
|
+
resolvedIconColor = _ref3.resolvedIconColor,
|
|
104306
|
+
parent$ = _ref3.parent$,
|
|
104307
|
+
onAuthenticatedClick = _ref3.onAuthenticatedClick,
|
|
104308
|
+
profilePanelProps = _ref3.profilePanelProps,
|
|
104309
|
+
isMobile = _ref3.isMobile;
|
|
104310
|
+
var accountMenuPanel = /*#__PURE__*/(0,jsx_runtime_.jsx)(AccountDropdownPanel, {
|
|
104311
|
+
"data-testid": "account-menu-panel",
|
|
104312
|
+
role: "menu",
|
|
104313
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel, SignUpSignInViews_objectSpread({}, profilePanelProps))
|
|
104314
|
+
});
|
|
104315
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccountMenuRoot, {
|
|
104316
|
+
ref: menuRef,
|
|
104317
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(AccountToggle, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104318
|
+
"data-testid": "signin-button",
|
|
104319
|
+
type: "button",
|
|
104320
|
+
"aria-label": "Hi ".concat(greetingName),
|
|
104321
|
+
"aria-expanded": isAccountMenuOpen,
|
|
104322
|
+
"aria-haspopup": "menu"
|
|
104323
|
+
}, parentEditableProps(parent$, "signed_in")), {}, {
|
|
104324
|
+
onClick: onAuthenticatedClick,
|
|
104325
|
+
onKeyDown: handleKeyboardActivate,
|
|
104326
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(AccountIconWrap, {
|
|
104327
|
+
"aria-hidden": true,
|
|
104328
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104329
|
+
name: resolvedIconName,
|
|
104330
|
+
size: "large",
|
|
104331
|
+
colorOverride: resolvedIconColor
|
|
104332
|
+
})
|
|
104333
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(AccountUserName, {
|
|
104334
|
+
children: accountToggleLabel
|
|
104335
|
+
})]
|
|
104336
|
+
})), isAccountMenuOpen && !isMobile ? accountMenuPanel : null]
|
|
104337
|
+
});
|
|
104338
|
+
}
|
|
104339
|
+
AuthenticatedAccountMenu.propTypes = {
|
|
104340
|
+
menuRef: external_prop_types_["default"].shape({
|
|
104341
|
+
current: external_prop_types_["default"].any
|
|
104342
|
+
}),
|
|
104343
|
+
isAccountMenuOpen: external_prop_types_["default"].bool.isRequired,
|
|
104344
|
+
greetingName: external_prop_types_["default"].string.isRequired,
|
|
104345
|
+
accountToggleLabel: external_prop_types_["default"].string.isRequired,
|
|
104346
|
+
resolvedIconName: external_prop_types_["default"].string.isRequired,
|
|
104347
|
+
resolvedIconColor: external_prop_types_["default"].string,
|
|
104348
|
+
parent$: parentTagsPropType,
|
|
104349
|
+
onAuthenticatedClick: external_prop_types_["default"].func.isRequired,
|
|
104350
|
+
profilePanelProps: external_prop_types_["default"].object.isRequired,
|
|
104351
|
+
isMobile: external_prop_types_["default"].bool.isRequired
|
|
104352
|
+
};
|
|
104353
|
+
function PrimaryAuthActions(_ref4) {
|
|
104354
|
+
var isAuthenticated = _ref4.isAuthenticated,
|
|
104355
|
+
menuRef = _ref4.menuRef,
|
|
104356
|
+
isAccountMenuOpen = _ref4.isAccountMenuOpen,
|
|
104357
|
+
greetingName = _ref4.greetingName,
|
|
104358
|
+
accountToggleLabel = _ref4.accountToggleLabel,
|
|
104359
|
+
resolvedIconName = _ref4.resolvedIconName,
|
|
104360
|
+
resolvedIconColor = _ref4.resolvedIconColor,
|
|
104361
|
+
parent$ = _ref4.parent$,
|
|
104362
|
+
onAuthenticatedClick = _ref4.onAuthenticatedClick,
|
|
104363
|
+
profilePanelProps = _ref4.profilePanelProps,
|
|
104364
|
+
isMobile = _ref4.isMobile,
|
|
104365
|
+
effectiveSignInTitle = _ref4.effectiveSignInTitle,
|
|
104366
|
+
effectiveSignIn = _ref4.effectiveSignIn,
|
|
104367
|
+
authService = _ref4.authService,
|
|
104368
|
+
setIsModalOpen = _ref4.setIsModalOpen,
|
|
104369
|
+
editing = _ref4.editing;
|
|
104370
|
+
if (!isAuthenticated) {
|
|
104371
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(GuestSignInButton, {
|
|
104372
|
+
effectiveSignInTitle: effectiveSignInTitle,
|
|
104373
|
+
parent$: parent$,
|
|
104374
|
+
editing: editing,
|
|
104375
|
+
isMobile: isMobile,
|
|
104376
|
+
setIsModalOpen: setIsModalOpen,
|
|
104377
|
+
effectiveSignIn: effectiveSignIn,
|
|
104378
|
+
authService: authService
|
|
104379
|
+
});
|
|
104380
|
+
}
|
|
104381
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(AuthenticatedAccountMenu, {
|
|
104382
|
+
menuRef: menuRef,
|
|
104383
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
104384
|
+
greetingName: greetingName,
|
|
104385
|
+
accountToggleLabel: accountToggleLabel,
|
|
104386
|
+
resolvedIconName: resolvedIconName,
|
|
104387
|
+
resolvedIconColor: resolvedIconColor,
|
|
104388
|
+
parent$: parent$,
|
|
104389
|
+
onAuthenticatedClick: onAuthenticatedClick,
|
|
104390
|
+
profilePanelProps: profilePanelProps,
|
|
104391
|
+
isMobile: isMobile
|
|
104392
|
+
});
|
|
104393
|
+
}
|
|
104394
|
+
PrimaryAuthActions.propTypes = {
|
|
104395
|
+
isAuthenticated: external_prop_types_["default"].bool.isRequired,
|
|
104396
|
+
menuRef: external_prop_types_["default"].shape({
|
|
104397
|
+
current: external_prop_types_["default"].any
|
|
104398
|
+
}),
|
|
104399
|
+
isAccountMenuOpen: external_prop_types_["default"].bool.isRequired,
|
|
104400
|
+
greetingName: external_prop_types_["default"].string.isRequired,
|
|
104401
|
+
accountToggleLabel: external_prop_types_["default"].string.isRequired,
|
|
104402
|
+
resolvedIconName: external_prop_types_["default"].string.isRequired,
|
|
104403
|
+
resolvedIconColor: external_prop_types_["default"].string,
|
|
104404
|
+
parent$: parentTagsPropType,
|
|
104405
|
+
onAuthenticatedClick: external_prop_types_["default"].func.isRequired,
|
|
104406
|
+
profilePanelProps: external_prop_types_["default"].object.isRequired,
|
|
104407
|
+
isMobile: external_prop_types_["default"].bool.isRequired,
|
|
104408
|
+
effectiveSignInTitle: external_prop_types_["default"].string.isRequired,
|
|
104409
|
+
effectiveSignIn: authLinkPropType,
|
|
104410
|
+
authService: authServicePropType,
|
|
104411
|
+
setIsModalOpen: external_prop_types_["default"].func.isRequired,
|
|
104412
|
+
editing: external_prop_types_["default"].bool.isRequired
|
|
104413
|
+
};
|
|
104414
|
+
function GuestMobileModalBody(_ref5) {
|
|
104415
|
+
var copy = _ref5.copy,
|
|
104416
|
+
editing = _ref5.editing,
|
|
104417
|
+
closeModal = _ref5.closeModal,
|
|
104418
|
+
effectiveSignIn = _ref5.effectiveSignIn,
|
|
104419
|
+
effectiveSignUp = _ref5.effectiveSignUp,
|
|
104420
|
+
authService = _ref5.authService;
|
|
104421
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
104422
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
104423
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
104424
|
+
children: copy.sign_in_heading
|
|
104425
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
104426
|
+
children: copy.sign_in_message
|
|
104427
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
104428
|
+
type: "button",
|
|
104429
|
+
"data-testid": "signin-modal-signin-cta",
|
|
104430
|
+
onClick: function onClick() {
|
|
104431
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url, authService, "navigateToSignIn");
|
|
104432
|
+
},
|
|
104433
|
+
children: copy.sign_in_cta_label
|
|
104434
|
+
})]
|
|
104435
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
104436
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
104437
|
+
children: copy.sign_up_heading
|
|
104438
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
104439
|
+
children: copy.sign_up_message
|
|
104440
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
104441
|
+
"data-testid": "signin-modal-create-account-cta",
|
|
104442
|
+
type: "button",
|
|
104443
|
+
onClick: function onClick() {
|
|
104444
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url, authService, "navigateToSignUp");
|
|
104445
|
+
},
|
|
104446
|
+
"aria-label": copy.sign_up_cta_aria_label,
|
|
104447
|
+
children: copy.sign_up_cta_label
|
|
104448
|
+
})]
|
|
104449
|
+
})]
|
|
104450
|
+
});
|
|
104451
|
+
}
|
|
104452
|
+
GuestMobileModalBody.propTypes = {
|
|
104453
|
+
copy: modalCopyPropType.isRequired,
|
|
104454
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104455
|
+
closeModal: external_prop_types_["default"].func.isRequired,
|
|
104456
|
+
effectiveSignIn: authLinkPropType,
|
|
104457
|
+
effectiveSignUp: authLinkPropType,
|
|
104458
|
+
authService: authServicePropType
|
|
104459
|
+
};
|
|
104460
|
+
function MobileAuthOverlay(_ref6) {
|
|
104461
|
+
var show = _ref6.show,
|
|
104462
|
+
onDismiss = _ref6.onDismiss,
|
|
104463
|
+
copy = _ref6.copy,
|
|
104464
|
+
isAuthenticated = _ref6.isAuthenticated,
|
|
104465
|
+
accountToggleLabel = _ref6.accountToggleLabel,
|
|
104466
|
+
effectiveSignInTitle = _ref6.effectiveSignInTitle,
|
|
104467
|
+
profilePanelProps = _ref6.profilePanelProps,
|
|
104468
|
+
editing = _ref6.editing,
|
|
104469
|
+
closeModal = _ref6.closeModal,
|
|
104470
|
+
effectiveSignIn = _ref6.effectiveSignIn,
|
|
104471
|
+
effectiveSignUp = _ref6.effectiveSignUp,
|
|
104472
|
+
authService = _ref6.authService;
|
|
104473
|
+
if (!show) {
|
|
104474
|
+
return null;
|
|
104475
|
+
}
|
|
104476
|
+
var modalAriaLabel = isAuthenticated ? accountToggleLabel : effectiveSignInTitle;
|
|
104477
|
+
var modalInner = isAuthenticated ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalSections, {
|
|
104478
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalSection, {
|
|
104479
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel, SignUpSignInViews_objectSpread({}, profilePanelProps))
|
|
104480
|
+
})
|
|
104481
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(GuestMobileModalBody, {
|
|
104482
|
+
copy: copy,
|
|
104483
|
+
editing: editing,
|
|
104484
|
+
closeModal: closeModal,
|
|
104485
|
+
effectiveSignIn: effectiveSignIn,
|
|
104486
|
+
effectiveSignUp: effectiveSignUp,
|
|
104487
|
+
authService: authService
|
|
104488
|
+
});
|
|
104489
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
104490
|
+
"data-testid": "signin-modal-backdrop",
|
|
104491
|
+
onClick: onDismiss,
|
|
104492
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
104493
|
+
open: true,
|
|
104494
|
+
"aria-modal": "true",
|
|
104495
|
+
"aria-label": modalAriaLabel,
|
|
104496
|
+
onClick: function onClick(e) {
|
|
104497
|
+
return e.stopPropagation();
|
|
104498
|
+
},
|
|
104499
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
104500
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
104501
|
+
"data-testid": "signin-modal-cancel",
|
|
104502
|
+
"aria-label": copy.close_dialog_aria_label,
|
|
104503
|
+
type: "button",
|
|
104504
|
+
onClick: onDismiss,
|
|
104505
|
+
children: "\xD7"
|
|
104506
|
+
})
|
|
104507
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
104508
|
+
children: modalInner
|
|
104509
|
+
})]
|
|
104510
|
+
})
|
|
104511
|
+
});
|
|
104512
|
+
}
|
|
104513
|
+
MobileAuthOverlay.propTypes = {
|
|
104514
|
+
show: external_prop_types_["default"].bool.isRequired,
|
|
104515
|
+
onDismiss: external_prop_types_["default"].func.isRequired,
|
|
104516
|
+
copy: modalCopyPropType.isRequired,
|
|
104517
|
+
isAuthenticated: external_prop_types_["default"].bool.isRequired,
|
|
104518
|
+
accountToggleLabel: external_prop_types_["default"].string.isRequired,
|
|
104519
|
+
effectiveSignInTitle: external_prop_types_["default"].string.isRequired,
|
|
104520
|
+
profilePanelProps: external_prop_types_["default"].object.isRequired,
|
|
104521
|
+
editing: external_prop_types_["default"].bool.isRequired,
|
|
104522
|
+
closeModal: external_prop_types_["default"].func.isRequired,
|
|
104523
|
+
effectiveSignIn: authLinkPropType,
|
|
104524
|
+
effectiveSignUp: authLinkPropType,
|
|
104525
|
+
authService: authServicePropType
|
|
104526
|
+
};
|
|
104527
|
+
;// ./src/components/signup-signin/SignUpSignIn.jsx
|
|
103029
104528
|
|
|
103030
104529
|
|
|
103031
104530
|
|
|
@@ -103033,184 +104532,95 @@ function SignUpOrSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
103033
104532
|
|
|
103034
104533
|
|
|
103035
104534
|
|
|
103036
|
-
|
|
103037
|
-
|
|
103038
|
-
|
|
103039
|
-
sign_in_message: "Have an account already? Please sign in.",
|
|
103040
|
-
sign_in_cta_label: "Sign In",
|
|
103041
|
-
sign_up_heading: "Sign Up",
|
|
103042
|
-
sign_up_message: "New user? Please Sign up to continue",
|
|
103043
|
-
sign_up_cta_label: "Create Account",
|
|
103044
|
-
sign_up_cta_aria_label: "Create Account"
|
|
103045
|
-
};
|
|
103046
|
-
function SignUpOrSignIn(_ref) {
|
|
103047
|
-
var _ref$show = _ref.show,
|
|
103048
|
-
show = _ref$show === void 0 ? true : _ref$show,
|
|
103049
|
-
_ref$icon = _ref.icon,
|
|
103050
|
-
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
104535
|
+
function SignUpSignIn(_ref) {
|
|
104536
|
+
var show = _ref.show,
|
|
104537
|
+
icon = _ref.icon,
|
|
103051
104538
|
icon_color = _ref.icon_color,
|
|
103052
|
-
|
|
103053
|
-
|
|
103054
|
-
|
|
103055
|
-
|
|
103056
|
-
|
|
103057
|
-
|
|
103058
|
-
|
|
103059
|
-
|
|
103060
|
-
|
|
103061
|
-
|
|
103062
|
-
|
|
103063
|
-
|
|
103064
|
-
|
|
103065
|
-
|
|
103066
|
-
|
|
103067
|
-
|
|
103068
|
-
|
|
103069
|
-
|
|
103070
|
-
|
|
103071
|
-
|
|
103072
|
-
|
|
103073
|
-
|
|
103074
|
-
|
|
103075
|
-
|
|
103076
|
-
|
|
103077
|
-
|
|
103078
|
-
|
|
103079
|
-
|
|
103080
|
-
|
|
103081
|
-
|
|
103082
|
-
|
|
103083
|
-
|
|
104539
|
+
sign_up = _ref.sign_up,
|
|
104540
|
+
sign_in = _ref.sign_in,
|
|
104541
|
+
signed_in = _ref.signed_in,
|
|
104542
|
+
profile_utility_links = _ref.profile_utility_links,
|
|
104543
|
+
modal_copy = _ref.modal_copy,
|
|
104544
|
+
authService = _ref.authService,
|
|
104545
|
+
customerData = _ref.customerData,
|
|
104546
|
+
parent$ = _ref.parent$;
|
|
104547
|
+
var _useSignUpSignIn = useSignUpSignIn({
|
|
104548
|
+
show: show,
|
|
104549
|
+
icon: icon,
|
|
104550
|
+
icon_color: icon_color,
|
|
104551
|
+
sign_up: sign_up,
|
|
104552
|
+
sign_in: sign_in,
|
|
104553
|
+
signed_in: signed_in,
|
|
104554
|
+
profile_utility_links: profile_utility_links,
|
|
104555
|
+
modal_copy: modal_copy,
|
|
104556
|
+
authService: authService,
|
|
104557
|
+
customerData: customerData
|
|
104558
|
+
}),
|
|
104559
|
+
isVisible = _useSignUpSignIn.show,
|
|
104560
|
+
isMobile = _useSignUpSignIn.isMobile,
|
|
104561
|
+
editing = _useSignUpSignIn.editing,
|
|
104562
|
+
copy = _useSignUpSignIn.copy,
|
|
104563
|
+
resolvedAuthService = _useSignUpSignIn.authService,
|
|
104564
|
+
authDisplay = _useSignUpSignIn.authDisplay,
|
|
104565
|
+
menuRef = _useSignUpSignIn.menuRef,
|
|
104566
|
+
isAccountMenuOpen = _useSignUpSignIn.isAccountMenuOpen,
|
|
104567
|
+
setIsModalOpen = _useSignUpSignIn.setIsModalOpen,
|
|
104568
|
+
closeModal = _useSignUpSignIn.closeModal,
|
|
104569
|
+
dismissMenus = _useSignUpSignIn.dismissMenus,
|
|
104570
|
+
showMobileModal = _useSignUpSignIn.showMobileModal,
|
|
104571
|
+
greetingName = _useSignUpSignIn.greetingName,
|
|
104572
|
+
resolvedIconName = _useSignUpSignIn.resolvedIconName,
|
|
104573
|
+
resolvedIconColor = _useSignUpSignIn.resolvedIconColor,
|
|
104574
|
+
profilePanelProps = _useSignUpSignIn.profilePanelProps,
|
|
104575
|
+
handleAuthenticatedAccountClick = _useSignUpSignIn.handleAuthenticatedAccountClick;
|
|
104576
|
+
if (!isVisible) return null;
|
|
104577
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpSignInRoot, {
|
|
103084
104578
|
"data-testid": "signup-signin",
|
|
103085
|
-
children: [
|
|
103086
|
-
|
|
103087
|
-
|
|
103088
|
-
|
|
103089
|
-
|
|
103090
|
-
|
|
103091
|
-
|
|
103092
|
-
|
|
103093
|
-
|
|
103094
|
-
|
|
103095
|
-
|
|
103096
|
-
|
|
103097
|
-
|
|
103098
|
-
|
|
103099
|
-
|
|
103100
|
-
|
|
103101
|
-
|
|
103102
|
-
|
|
103103
|
-
|
|
103104
|
-
|
|
103105
|
-
|
|
103106
|
-
|
|
103107
|
-
|
|
103108
|
-
|
|
103109
|
-
|
|
103110
|
-
|
|
103111
|
-
|
|
103112
|
-
|
|
103113
|
-
|
|
103114
|
-
|
|
103115
|
-
|
|
103116
|
-
|
|
103117
|
-
|
|
103118
|
-
|
|
103119
|
-
|
|
103120
|
-
|
|
103121
|
-
|
|
103122
|
-
|
|
103123
|
-
|
|
103124
|
-
|
|
103125
|
-
|
|
103126
|
-
})), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
103127
|
-
"data-testid": "signin-modal-backdrop",
|
|
103128
|
-
onClick: closeModal,
|
|
103129
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
103130
|
-
open: true,
|
|
103131
|
-
"aria-modal": "true",
|
|
103132
|
-
"aria-label": effectiveSignInTitle,
|
|
103133
|
-
onClick: function onClick(e) {
|
|
103134
|
-
return e.stopPropagation();
|
|
103135
|
-
},
|
|
103136
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
103137
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
103138
|
-
"data-testid": "signin-modal-cancel",
|
|
103139
|
-
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
|
|
103140
|
-
type: "button",
|
|
103141
|
-
onClick: closeModal,
|
|
103142
|
-
children: "\xD7"
|
|
103143
|
-
})
|
|
103144
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
103145
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
103146
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103147
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103148
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
103149
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103150
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
103151
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
103152
|
-
type: "button",
|
|
103153
|
-
"data-testid": "signin-modal-signin-cta",
|
|
103154
|
-
onClick: function onClick() {
|
|
103155
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
103156
|
-
},
|
|
103157
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
103158
|
-
})]
|
|
103159
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103160
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103161
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
103162
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103163
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
103164
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
103165
|
-
"data-testid": "signin-modal-create-account-cta",
|
|
103166
|
-
type: "button",
|
|
103167
|
-
onClick: function onClick() {
|
|
103168
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
103169
|
-
},
|
|
103170
|
-
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
103171
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
103172
|
-
})]
|
|
103173
|
-
})]
|
|
103174
|
-
})
|
|
103175
|
-
})]
|
|
103176
|
-
})
|
|
103177
|
-
}) : null]
|
|
104579
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopGuestSignupSection, {
|
|
104580
|
+
isMobile: isMobile,
|
|
104581
|
+
showGuestAuth: authDisplay.showGuestAuth,
|
|
104582
|
+
effectiveSignUpTitle: authDisplay.effectiveSignUpTitle,
|
|
104583
|
+
effectiveSignUp: authDisplay.effectiveSignUp,
|
|
104584
|
+
editing: editing,
|
|
104585
|
+
authService: resolvedAuthService,
|
|
104586
|
+
parent$: parent$,
|
|
104587
|
+
resolvedIconName: resolvedIconName,
|
|
104588
|
+
resolvedIconColor: resolvedIconColor
|
|
104589
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryAuthActions, {
|
|
104590
|
+
isAuthenticated: authDisplay.isAuthenticated,
|
|
104591
|
+
menuRef: menuRef,
|
|
104592
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
104593
|
+
greetingName: greetingName,
|
|
104594
|
+
accountToggleLabel: authDisplay.accountToggleLabel,
|
|
104595
|
+
resolvedIconName: resolvedIconName,
|
|
104596
|
+
resolvedIconColor: resolvedIconColor,
|
|
104597
|
+
parent$: parent$,
|
|
104598
|
+
onAuthenticatedClick: handleAuthenticatedAccountClick,
|
|
104599
|
+
profilePanelProps: profilePanelProps,
|
|
104600
|
+
isMobile: isMobile,
|
|
104601
|
+
effectiveSignInTitle: authDisplay.effectiveSignInTitle,
|
|
104602
|
+
effectiveSignIn: authDisplay.effectiveSignIn,
|
|
104603
|
+
authService: resolvedAuthService,
|
|
104604
|
+
setIsModalOpen: setIsModalOpen,
|
|
104605
|
+
editing: editing
|
|
104606
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthOverlay, {
|
|
104607
|
+
show: showMobileModal,
|
|
104608
|
+
onDismiss: dismissMenus,
|
|
104609
|
+
copy: copy,
|
|
104610
|
+
isAuthenticated: authDisplay.isAuthenticated,
|
|
104611
|
+
accountToggleLabel: authDisplay.accountToggleLabel,
|
|
104612
|
+
effectiveSignInTitle: authDisplay.effectiveSignInTitle,
|
|
104613
|
+
profilePanelProps: profilePanelProps,
|
|
104614
|
+
editing: editing,
|
|
104615
|
+
closeModal: closeModal,
|
|
104616
|
+
effectiveSignIn: authDisplay.effectiveSignIn,
|
|
104617
|
+
effectiveSignUp: authDisplay.effectiveSignUp,
|
|
104618
|
+
authService: resolvedAuthService
|
|
104619
|
+
})]
|
|
103178
104620
|
});
|
|
103179
104621
|
}
|
|
103180
|
-
|
|
103181
|
-
|
|
103182
|
-
icon: external_prop_types_["default"].string,
|
|
103183
|
-
icon_color: external_prop_types_["default"].string,
|
|
103184
|
-
sign_up: external_prop_types_["default"].shape({
|
|
103185
|
-
title: external_prop_types_["default"].string,
|
|
103186
|
-
url: external_prop_types_["default"].string
|
|
103187
|
-
}),
|
|
103188
|
-
sign_in: external_prop_types_["default"].shape({
|
|
103189
|
-
title: external_prop_types_["default"].string,
|
|
103190
|
-
url: external_prop_types_["default"].string
|
|
103191
|
-
}),
|
|
103192
|
-
modal_copy: external_prop_types_["default"].shape({
|
|
103193
|
-
close_dialog_aria_label: external_prop_types_["default"].string,
|
|
103194
|
-
sign_in_heading: external_prop_types_["default"].string,
|
|
103195
|
-
sign_in_message: external_prop_types_["default"].string,
|
|
103196
|
-
sign_in_cta_label: external_prop_types_["default"].string,
|
|
103197
|
-
sign_up_heading: external_prop_types_["default"].string,
|
|
103198
|
-
sign_up_message: external_prop_types_["default"].string,
|
|
103199
|
-
sign_up_cta_label: external_prop_types_["default"].string,
|
|
103200
|
-
sign_up_cta_aria_label: external_prop_types_["default"].string
|
|
103201
|
-
}),
|
|
103202
|
-
authService: external_prop_types_["default"].shape({
|
|
103203
|
-
getAuthLinks: external_prop_types_["default"].func
|
|
103204
|
-
}),
|
|
103205
|
-
parent$: external_prop_types_["default"].shape({
|
|
103206
|
-
icon: external_prop_types_["default"].object,
|
|
103207
|
-
icon_color: external_prop_types_["default"].object,
|
|
103208
|
-
sign_up: external_prop_types_["default"].object,
|
|
103209
|
-
sign_up_url: external_prop_types_["default"].object,
|
|
103210
|
-
sign_in: external_prop_types_["default"].object,
|
|
103211
|
-
sign_in_url: external_prop_types_["default"].object
|
|
103212
|
-
})
|
|
103213
|
-
};
|
|
104622
|
+
SignUpSignIn.propTypes = signUpSignInPropTypes;
|
|
104623
|
+
|
|
103214
104624
|
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
103215
104625
|
|
|
103216
104626
|
|
|
@@ -103218,15 +104628,21 @@ SignUpOrSignIn.propTypes = {
|
|
|
103218
104628
|
|
|
103219
104629
|
function HeaderAccountRegion(_ref) {
|
|
103220
104630
|
var data = _ref.data,
|
|
103221
|
-
parent$ = _ref.parent
|
|
104631
|
+
parent$ = _ref.parent$,
|
|
104632
|
+
customerData = _ref.customerData,
|
|
104633
|
+
authService = _ref.authService;
|
|
103222
104634
|
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
103223
104635
|
if (!show) return null;
|
|
103224
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
104636
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignIn, {
|
|
103225
104637
|
show: show,
|
|
103226
104638
|
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
103227
104639
|
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
103228
104640
|
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
103229
104641
|
sign_in: data === null || data === void 0 ? void 0 : data.sign_in,
|
|
104642
|
+
signed_in: data === null || data === void 0 ? void 0 : data.signed_in,
|
|
104643
|
+
profile_utility_links: data === null || data === void 0 ? void 0 : data.profile_utility_links,
|
|
104644
|
+
customerData: customerData,
|
|
104645
|
+
authService: authService,
|
|
103230
104646
|
parent$: parent$
|
|
103231
104647
|
});
|
|
103232
104648
|
}
|
|
@@ -103242,15 +104658,22 @@ HeaderAccountRegion.propTypes = {
|
|
|
103242
104658
|
sign_in: external_prop_types_["default"].shape({
|
|
103243
104659
|
title: external_prop_types_["default"].string,
|
|
103244
104660
|
url: external_prop_types_["default"].string
|
|
103245
|
-
})
|
|
104661
|
+
}),
|
|
104662
|
+
signed_in: external_prop_types_["default"].shape({
|
|
104663
|
+
title: external_prop_types_["default"].string,
|
|
104664
|
+
url: external_prop_types_["default"].string
|
|
104665
|
+
}),
|
|
104666
|
+
profile_utility_links: external_prop_types_["default"].object
|
|
103246
104667
|
}),
|
|
104668
|
+
customerData: external_prop_types_["default"].object,
|
|
104669
|
+
authService: external_prop_types_["default"].object,
|
|
103247
104670
|
parent$: external_prop_types_["default"].shape({
|
|
103248
104671
|
icon: external_prop_types_["default"].object,
|
|
103249
104672
|
icon_color: external_prop_types_["default"].object,
|
|
103250
104673
|
sign_up: external_prop_types_["default"].object,
|
|
103251
104674
|
sign_up_url: external_prop_types_["default"].object,
|
|
103252
104675
|
sign_in: external_prop_types_["default"].object,
|
|
103253
|
-
|
|
104676
|
+
signed_in: external_prop_types_["default"].object
|
|
103254
104677
|
})
|
|
103255
104678
|
};
|
|
103256
104679
|
;// ./src/components/cart/Cart.styled.js
|
|
@@ -103469,7 +104892,7 @@ HeaderCartRegion.defaultProps = {
|
|
|
103469
104892
|
var Close = __webpack_require__(9781);
|
|
103470
104893
|
;// ./src/utils/parseIconAsset.js
|
|
103471
104894
|
function parseIconAsset_typeof(o) { "@babel/helpers - typeof"; return parseIconAsset_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; }, parseIconAsset_typeof(o); }
|
|
103472
|
-
function
|
|
104895
|
+
function parseIconAsset_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = parseIconAsset_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
103473
104896
|
function parseIconAsset_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return parseIconAsset_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) ? parseIconAsset_arrayLikeToArray(r, a) : void 0; } }
|
|
103474
104897
|
function parseIconAsset_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; }
|
|
103475
104898
|
/**
|
|
@@ -103498,7 +104921,7 @@ function getDirectUrl(value) {
|
|
|
103498
104921
|
return normalizeUrlString((value === null || value === void 0 ? void 0 : value.url) || (value === null || value === void 0 ? void 0 : value.src) || (value === null || value === void 0 || (_value$selected = value.selected) === null || _value$selected === void 0 ? void 0 : _value$selected.url) || (value === null || value === void 0 || (_value$files = value.files) === null || _value$files === void 0 || (_value$files = _value$files.transformBaseUrl) === null || _value$files === void 0 ? void 0 : _value$files.url) || (value === null || value === void 0 || (_value$files2 = value.files) === null || _value$files2 === void 0 || (_value$files2 = _value$files2.thumbnail) === null || _value$files2 === void 0 ? void 0 : _value$files2.url));
|
|
103499
104922
|
}
|
|
103500
104923
|
function findUrlInValues(values, depth) {
|
|
103501
|
-
var _iterator =
|
|
104924
|
+
var _iterator = parseIconAsset_createForOfIteratorHelper(values),
|
|
103502
104925
|
_step;
|
|
103503
104926
|
try {
|
|
103504
104927
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -103553,7 +104976,7 @@ function getFieldValueFromGroup(source, keys) {
|
|
|
103553
104976
|
var expandedKeys = keys.flatMap(function (key) {
|
|
103554
104977
|
return [key, "".concat(key, "__0")];
|
|
103555
104978
|
});
|
|
103556
|
-
var _iterator2 =
|
|
104979
|
+
var _iterator2 = parseIconAsset_createForOfIteratorHelper(expandedKeys),
|
|
103557
104980
|
_step2;
|
|
103558
104981
|
try {
|
|
103559
104982
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -110634,6 +112057,135 @@ MarketSelector.propTypes = {
|
|
|
110634
112057
|
$: external_prop_types_["default"].object
|
|
110635
112058
|
})
|
|
110636
112059
|
};
|
|
112060
|
+
;// ./src/components/signup-signin/SignUpSignIn.cms.js
|
|
112061
|
+
function SignUpSignIn_cms_toConsumableArray(r) { return SignUpSignIn_cms_arrayWithoutHoles(r) || SignUpSignIn_cms_iterableToArray(r) || SignUpSignIn_cms_unsupportedIterableToArray(r) || SignUpSignIn_cms_nonIterableSpread(); }
|
|
112062
|
+
function SignUpSignIn_cms_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
112063
|
+
function SignUpSignIn_cms_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_cms_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) ? SignUpSignIn_cms_arrayLikeToArray(r, a) : void 0; } }
|
|
112064
|
+
function SignUpSignIn_cms_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
112065
|
+
function SignUpSignIn_cms_arrayWithoutHoles(r) { if (Array.isArray(r)) return SignUpSignIn_cms_arrayLikeToArray(r); }
|
|
112066
|
+
function SignUpSignIn_cms_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; }
|
|
112067
|
+
|
|
112068
|
+
var SIGNED_IN_LABEL_KEYS = ["signed_in", "signed_in_label", "account_label", "my_account_label"];
|
|
112069
|
+
var SIGNED_IN_URL_KEYS = ["signed_in_url", "account_url", "my_account_url"];
|
|
112070
|
+
function firstDefined() {
|
|
112071
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
112072
|
+
values[_key] = arguments[_key];
|
|
112073
|
+
}
|
|
112074
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
112075
|
+
var value = _values[_i];
|
|
112076
|
+
if (value !== undefined && value !== null) return value;
|
|
112077
|
+
}
|
|
112078
|
+
return undefined;
|
|
112079
|
+
}
|
|
112080
|
+
function normalizeShowFlag(value) {
|
|
112081
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
112082
|
+
if (value === undefined || value === null) return fallback;
|
|
112083
|
+
if (typeof value === "boolean") return value;
|
|
112084
|
+
var normalized = String(value).trim().toLowerCase();
|
|
112085
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
112086
|
+
return false;
|
|
112087
|
+
}
|
|
112088
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
112089
|
+
return true;
|
|
112090
|
+
}
|
|
112091
|
+
return Boolean(value);
|
|
112092
|
+
}
|
|
112093
|
+
function pickAuthTextField(authData, fieldKey) {
|
|
112094
|
+
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
112095
|
+
if (typeof value !== "string") return undefined;
|
|
112096
|
+
var trimmed = value.trim();
|
|
112097
|
+
return trimmed || undefined;
|
|
112098
|
+
}
|
|
112099
|
+
function pickAuthTextFieldFromKeys(authData, fieldKeys, legacyData) {
|
|
112100
|
+
var legacyKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
112101
|
+
var cmsValues = fieldKeys.map(function (key) {
|
|
112102
|
+
return pickAuthTextField(authData, key);
|
|
112103
|
+
});
|
|
112104
|
+
var legacyValues = legacyKeys.map(function (key) {
|
|
112105
|
+
return legacyData === null || legacyData === void 0 ? void 0 : legacyData[key];
|
|
112106
|
+
});
|
|
112107
|
+
return firstDefined.apply(void 0, SignUpSignIn_cms_toConsumableArray(cmsValues).concat(SignUpSignIn_cms_toConsumableArray(legacyValues)));
|
|
112108
|
+
}
|
|
112109
|
+
function normalizeUtilityLinksEntries(utilityLinksRaw) {
|
|
112110
|
+
if (Array.isArray(utilityLinksRaw)) return utilityLinksRaw;
|
|
112111
|
+
if (utilityLinksRaw) return [utilityLinksRaw];
|
|
112112
|
+
return [];
|
|
112113
|
+
}
|
|
112114
|
+
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
112115
|
+
return utilityLinksEntries.find(function (entry) {
|
|
112116
|
+
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
112117
|
+
}) || utilityLinksEntries[0] || null;
|
|
112118
|
+
}
|
|
112119
|
+
function buildAccountData(_ref) {
|
|
112120
|
+
var _firstDefined, _firstDefined2, _firstDefined3, _pickAuthTextFieldFro, _pickAuthTextFieldFro2;
|
|
112121
|
+
var utilityAuthData = _ref.utilityAuthData,
|
|
112122
|
+
legacyAccountData = _ref.legacyAccountData;
|
|
112123
|
+
return {
|
|
112124
|
+
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), true),
|
|
112125
|
+
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_ICON,
|
|
112126
|
+
icon_color: 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),
|
|
112127
|
+
sign_up: {
|
|
112128
|
+
title: (_firstDefined2 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label)) !== null && _firstDefined2 !== void 0 ? _firstDefined2 : DEFAULT_SIGN_UP.title,
|
|
112129
|
+
url: DEFAULT_SIGN_UP.url
|
|
112130
|
+
},
|
|
112131
|
+
sign_in: {
|
|
112132
|
+
title: (_firstDefined3 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_SIGN_IN.title,
|
|
112133
|
+
url: DEFAULT_SIGN_IN.url
|
|
112134
|
+
},
|
|
112135
|
+
signed_in: {
|
|
112136
|
+
title: (_pickAuthTextFieldFro = pickAuthTextFieldFromKeys(utilityAuthData, SIGNED_IN_LABEL_KEYS, legacyAccountData, ["signed_in_label", "account_label"])) !== null && _pickAuthTextFieldFro !== void 0 ? _pickAuthTextFieldFro : DEFAULT_SIGNED_IN.title,
|
|
112137
|
+
url: (_pickAuthTextFieldFro2 = pickAuthTextFieldFromKeys(utilityAuthData, SIGNED_IN_URL_KEYS, legacyAccountData, ["signed_in_url", "account_url"])) !== null && _pickAuthTextFieldFro2 !== void 0 ? _pickAuthTextFieldFro2 : DEFAULT_SIGNED_IN.url
|
|
112138
|
+
},
|
|
112139
|
+
profile_utility_links: (utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.profile_utility_links) || (utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.profileUtilityLinks) || undefined
|
|
112140
|
+
};
|
|
112141
|
+
}
|
|
112142
|
+
function buildAccountParentTags(_ref2) {
|
|
112143
|
+
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
112144
|
+
var utilityAuthData = _ref2.utilityAuthData,
|
|
112145
|
+
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
112146
|
+
legacyAccountData = _ref2.legacyAccountData;
|
|
112147
|
+
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);
|
|
112148
|
+
var pickTag = function pickTag(key) {
|
|
112149
|
+
var _utilityAuthData$$;
|
|
112150
|
+
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]);
|
|
112151
|
+
};
|
|
112152
|
+
var pickTagFromKeys = function pickTagFromKeys() {
|
|
112153
|
+
for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
112154
|
+
keys[_key2] = arguments[_key2];
|
|
112155
|
+
}
|
|
112156
|
+
for (var _i2 = 0, _keys = keys; _i2 < _keys.length; _i2++) {
|
|
112157
|
+
var key = _keys[_i2];
|
|
112158
|
+
var tag = pickTag(key);
|
|
112159
|
+
if (tag) return tag;
|
|
112160
|
+
}
|
|
112161
|
+
return undefined;
|
|
112162
|
+
};
|
|
112163
|
+
return {
|
|
112164
|
+
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
112165
|
+
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),
|
|
112166
|
+
sign_up: pickTag("sign_up"),
|
|
112167
|
+
sign_up_url: pickTag("sign_up_url"),
|
|
112168
|
+
sign_in: pickTag("sign_in"),
|
|
112169
|
+
signed_in: pickTagFromKeys("signed_in", "signed_in_label", "account_label", "my_account_label")
|
|
112170
|
+
};
|
|
112171
|
+
}
|
|
112172
|
+
function resolveHeaderAuthFromEntry(headerEntry) {
|
|
112173
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links);
|
|
112174
|
+
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
112175
|
+
var utilityAuthData = utilityLinksEntry === null || utilityLinksEntry === void 0 ? void 0 : utilityLinksEntry.sign_up_sign_in_component;
|
|
112176
|
+
var legacyAccountData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account;
|
|
112177
|
+
return {
|
|
112178
|
+
accountData: buildAccountData({
|
|
112179
|
+
utilityAuthData: utilityAuthData,
|
|
112180
|
+
legacyAccountData: legacyAccountData
|
|
112181
|
+
}),
|
|
112182
|
+
accountParentTags: buildAccountParentTags({
|
|
112183
|
+
utilityAuthData: utilityAuthData,
|
|
112184
|
+
utilityLinksEntry: utilityLinksEntry,
|
|
112185
|
+
legacyAccountData: legacyAccountData
|
|
112186
|
+
})
|
|
112187
|
+
};
|
|
112188
|
+
}
|
|
110637
112189
|
;// ./src/components/header/HeaderView.jsx
|
|
110638
112190
|
function HeaderView_typeof(o) { "@babel/helpers - typeof"; return HeaderView_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; }, HeaderView_typeof(o); }
|
|
110639
112191
|
function HeaderView_slicedToArray(r, e) { return HeaderView_arrayWithHoles(r) || HeaderView_iterableToArrayLimit(r, e) || HeaderView_unsupportedIterableToArray(r, e) || HeaderView_nonIterableRest(); }
|
|
@@ -110664,6 +112216,7 @@ function HeaderView_toPrimitive(t, r) { if ("object" != HeaderView_typeof(t) ||
|
|
|
110664
112216
|
|
|
110665
112217
|
|
|
110666
112218
|
|
|
112219
|
+
|
|
110667
112220
|
var DEFAULT_LOGO = {
|
|
110668
112221
|
wordmark: "NU SKIN",
|
|
110669
112222
|
home_href: "/",
|
|
@@ -110680,19 +112233,6 @@ var DEFAULT_MARKET_SELECTOR = {
|
|
|
110680
112233
|
cancel_text: "Cancel",
|
|
110681
112234
|
control_label: DEFAULT_LOCALE.control_label
|
|
110682
112235
|
};
|
|
110683
|
-
var DEFAULT_ACCOUNT = {
|
|
110684
|
-
show: true,
|
|
110685
|
-
icon: "userOutline",
|
|
110686
|
-
icon_color: undefined,
|
|
110687
|
-
sign_up: {
|
|
110688
|
-
title: "Sign Up",
|
|
110689
|
-
url: ""
|
|
110690
|
-
},
|
|
110691
|
-
sign_in: {
|
|
110692
|
-
title: "Sign In",
|
|
110693
|
-
url: ""
|
|
110694
|
-
}
|
|
110695
|
-
};
|
|
110696
112236
|
var DEFAULT_LOYALTY = {
|
|
110697
112237
|
label: "Nu Skin Rewards",
|
|
110698
112238
|
url: "/rewards",
|
|
@@ -110703,17 +112243,7 @@ var DEFAULT_CART = {
|
|
|
110703
112243
|
aria_label: "Shopping cart",
|
|
110704
112244
|
count: 0
|
|
110705
112245
|
};
|
|
110706
|
-
function
|
|
110707
|
-
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
110708
|
-
values[_key] = arguments[_key];
|
|
110709
|
-
}
|
|
110710
|
-
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
110711
|
-
var value = _values[_i];
|
|
110712
|
-
if (value !== undefined && value !== null) return value;
|
|
110713
|
-
}
|
|
110714
|
-
return undefined;
|
|
110715
|
-
}
|
|
110716
|
-
function normalizeShowFlag(value) {
|
|
112246
|
+
function HeaderView_normalizeShowFlag(value) {
|
|
110717
112247
|
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
110718
112248
|
if (value === undefined || value === null) return fallback;
|
|
110719
112249
|
if (typeof value === "boolean") return value;
|
|
@@ -110726,62 +112256,9 @@ function normalizeShowFlag(value) {
|
|
|
110726
112256
|
}
|
|
110727
112257
|
return Boolean(value);
|
|
110728
112258
|
}
|
|
110729
|
-
function
|
|
110730
|
-
|
|
110731
|
-
|
|
110732
|
-
return [];
|
|
110733
|
-
}
|
|
110734
|
-
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
110735
|
-
return utilityLinksEntries.find(function (entry) {
|
|
110736
|
-
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
110737
|
-
}) || utilityLinksEntries[0] || null;
|
|
110738
|
-
}
|
|
110739
|
-
function pickAuthTextField(authData, fieldKey) {
|
|
110740
|
-
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
110741
|
-
if (typeof value !== "string") return undefined;
|
|
110742
|
-
var trimmed = value.trim();
|
|
110743
|
-
return trimmed || undefined;
|
|
110744
|
-
}
|
|
110745
|
-
function buildAccountData(_ref) {
|
|
110746
|
-
var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
|
|
110747
|
-
var utilityAuthData = _ref.utilityAuthData,
|
|
110748
|
-
legacyAccountData = _ref.legacyAccountData;
|
|
110749
|
-
return {
|
|
110750
|
-
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
110751
|
-
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,
|
|
110752
|
-
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,
|
|
110753
|
-
sign_up: {
|
|
110754
|
-
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,
|
|
110755
|
-
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
|
|
110756
|
-
},
|
|
110757
|
-
sign_in: {
|
|
110758
|
-
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,
|
|
110759
|
-
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
|
|
110760
|
-
}
|
|
110761
|
-
};
|
|
110762
|
-
}
|
|
110763
|
-
function buildAccountParentTags(_ref2) {
|
|
110764
|
-
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
110765
|
-
var utilityAuthData = _ref2.utilityAuthData,
|
|
110766
|
-
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
110767
|
-
legacyAccountData = _ref2.legacyAccountData;
|
|
110768
|
-
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);
|
|
110769
|
-
var pickTag = function pickTag(key) {
|
|
110770
|
-
var _utilityAuthData$$;
|
|
110771
|
-
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]);
|
|
110772
|
-
};
|
|
110773
|
-
return {
|
|
110774
|
-
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
110775
|
-
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),
|
|
110776
|
-
sign_up: pickTag("sign_up"),
|
|
110777
|
-
sign_up_url: pickTag("sign_up_url"),
|
|
110778
|
-
sign_in: pickTag("sign_in"),
|
|
110779
|
-
sign_in_url: pickTag("sign_in_url")
|
|
110780
|
-
};
|
|
110781
|
-
}
|
|
110782
|
-
function LoyaltyComponent(_ref3) {
|
|
110783
|
-
var data = _ref3.data;
|
|
110784
|
-
var show = normalizeShowFlag(data === null || data === void 0 ? void 0 : data.show, true);
|
|
112259
|
+
function LoyaltyComponent(_ref) {
|
|
112260
|
+
var data = _ref.data;
|
|
112261
|
+
var show = HeaderView_normalizeShowFlag(data === null || data === void 0 ? void 0 : data.show, true);
|
|
110785
112262
|
if (!show) return null;
|
|
110786
112263
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
110787
112264
|
data: data
|
|
@@ -110792,11 +112269,11 @@ function LoyaltyComponent(_ref3) {
|
|
|
110792
112269
|
LoyaltyComponent.propTypes = {
|
|
110793
112270
|
data: external_prop_types_["default"].object
|
|
110794
112271
|
};
|
|
110795
|
-
function TopRibbonComponent(
|
|
112272
|
+
function TopRibbonComponent(_ref2) {
|
|
110796
112273
|
var _data$top_ribbon_aria;
|
|
110797
|
-
var data =
|
|
110798
|
-
|
|
110799
|
-
parentTags =
|
|
112274
|
+
var data = _ref2.data,
|
|
112275
|
+
_ref2$parentTags = _ref2.parentTags,
|
|
112276
|
+
parentTags = _ref2$parentTags === void 0 ? {} : _ref2$parentTags;
|
|
110800
112277
|
if (!(data !== null && data !== void 0 && data.show_top_ribbon)) return null;
|
|
110801
112278
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)("div", HeaderView_objectSpread(HeaderView_objectSpread(HeaderView_objectSpread({}, (parentTags === null || parentTags === void 0 ? void 0 : parentTags.top_ribbon) || {}), (parentTags === null || parentTags === void 0 ? void 0 : parentTags.top_ribbon__parent) || {}), {}, {
|
|
110802
112279
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(top_ribbon_TopRibbon, {
|
|
@@ -110813,9 +112290,9 @@ function LogoComponent(props) {
|
|
|
110813
112290
|
componentType: "logo"
|
|
110814
112291
|
});
|
|
110815
112292
|
}
|
|
110816
|
-
function CartComponent(
|
|
110817
|
-
var data =
|
|
110818
|
-
parent$ =
|
|
112293
|
+
function CartComponent(_ref3) {
|
|
112294
|
+
var data = _ref3.data,
|
|
112295
|
+
parent$ = _ref3.parent$;
|
|
110819
112296
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
110820
112297
|
data: data,
|
|
110821
112298
|
parent$: parent$
|
|
@@ -110827,37 +112304,28 @@ CartComponent.propTypes = {
|
|
|
110827
112304
|
data: external_prop_types_["default"].object,
|
|
110828
112305
|
parent$: external_prop_types_["default"].object
|
|
110829
112306
|
};
|
|
110830
|
-
function HeaderView(
|
|
110831
|
-
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$$, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2, _headerEntry$$2,
|
|
110832
|
-
var country =
|
|
110833
|
-
language =
|
|
110834
|
-
locale =
|
|
110835
|
-
headerEntry =
|
|
110836
|
-
searchConfig =
|
|
110837
|
-
storefrontParams =
|
|
112307
|
+
function HeaderView(_ref4) {
|
|
112308
|
+
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$$, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2, _headerEntry$$2, _ref5, _headerEntry$locale, _headerEntry$$3, _headerEntry$$4;
|
|
112309
|
+
var country = _ref4.country,
|
|
112310
|
+
language = _ref4.language,
|
|
112311
|
+
locale = _ref4.locale,
|
|
112312
|
+
headerEntry = _ref4.headerEntry,
|
|
112313
|
+
searchConfig = _ref4.searchConfig,
|
|
112314
|
+
storefrontParams = _ref4.storefrontParams;
|
|
110838
112315
|
var _useState = (0,external_react_.useState)(false),
|
|
110839
112316
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
110840
112317
|
isMobileMenuOpen = _useState2[0],
|
|
110841
112318
|
setIsMobileMenuOpen = _useState2[1];
|
|
110842
112319
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
110843
112320
|
var editing = isEditingMode();
|
|
110844
|
-
var
|
|
110845
|
-
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
112321
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links);
|
|
110846
112322
|
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
110847
112323
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
110848
112324
|
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;
|
|
110849
112325
|
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;
|
|
110850
|
-
var
|
|
110851
|
-
|
|
110852
|
-
|
|
110853
|
-
utilityAuthData: utilityAuthData,
|
|
110854
|
-
legacyAccountData: legacyAccountData
|
|
110855
|
-
});
|
|
110856
|
-
var accountParentTags = buildAccountParentTags({
|
|
110857
|
-
utilityAuthData: utilityAuthData,
|
|
110858
|
-
utilityLinksEntry: utilityLinksEntry,
|
|
110859
|
-
legacyAccountData: legacyAccountData
|
|
110860
|
-
});
|
|
112326
|
+
var _resolveHeaderAuthFro = resolveHeaderAuthFromEntry(headerEntry),
|
|
112327
|
+
accountData = _resolveHeaderAuthFro.accountData,
|
|
112328
|
+
accountParentTags = _resolveHeaderAuthFro.accountParentTags;
|
|
110861
112329
|
var cartData = HeaderView_objectSpread(HeaderView_objectSpread({}, (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART), {}, {
|
|
110862
112330
|
item_count: (_storefrontParams$car = storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.cartCount) !== null && _storefrontParams$car !== void 0 ? _storefrontParams$car : 0
|
|
110863
112331
|
});
|
|
@@ -110893,7 +112361,9 @@ function HeaderView(_ref6) {
|
|
|
110893
112361
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
110894
112362
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
110895
112363
|
data: accountData,
|
|
110896
|
-
parent$: accountParentTags
|
|
112364
|
+
parent$: accountParentTags,
|
|
112365
|
+
customerData: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.customerData,
|
|
112366
|
+
authService: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.authService
|
|
110897
112367
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
110898
112368
|
country: country,
|
|
110899
112369
|
language: language,
|
|
@@ -110911,7 +112381,7 @@ function HeaderView(_ref6) {
|
|
|
110911
112381
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
110912
112382
|
data: marketSelector,
|
|
110913
112383
|
logo: logoData,
|
|
110914
|
-
locale: String((
|
|
112384
|
+
locale: String((_ref5 = (_headerEntry$locale = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale) !== null && _headerEntry$locale !== void 0 ? _headerEntry$locale : locale) !== null && _ref5 !== void 0 ? _ref5 : "").trim(),
|
|
110915
112385
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.market_selector__0,
|
|
110916
112386
|
mobileTriggerMode: "drawerPortal",
|
|
110917
112387
|
drawerOpen: isMobileMenuOpen,
|
|
@@ -110920,7 +112390,9 @@ function HeaderView(_ref6) {
|
|
|
110920
112390
|
data: loyaltyData
|
|
110921
112391
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
110922
112392
|
data: accountData,
|
|
110923
|
-
parent$: accountParentTags
|
|
112393
|
+
parent$: accountParentTags,
|
|
112394
|
+
customerData: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.customerData,
|
|
112395
|
+
authService: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.authService
|
|
110924
112396
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(CartComponent, {
|
|
110925
112397
|
data: cartData,
|
|
110926
112398
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$4 = headerEntry.$) === null || _headerEntry$$4 === void 0 ? void 0 : _headerEntry$$4.cart
|
|
@@ -110966,7 +112438,8 @@ HeaderView.propTypes = {
|
|
|
110966
112438
|
searchConfig: external_prop_types_["default"].object,
|
|
110967
112439
|
storefrontParams: external_prop_types_["default"].shape({
|
|
110968
112440
|
cartCount: external_prop_types_["default"].number,
|
|
110969
|
-
customerData: external_prop_types_["default"].object
|
|
112441
|
+
customerData: external_prop_types_["default"].object,
|
|
112442
|
+
authService: external_prop_types_["default"].object
|
|
110970
112443
|
})
|
|
110971
112444
|
};
|
|
110972
112445
|
TopRibbonComponent.propTypes = {
|
|
@@ -111244,7 +112717,8 @@ HeaderContainer.propTypes = {
|
|
|
111244
112717
|
headerEntry: external_prop_types_["default"].object,
|
|
111245
112718
|
storefrontParams: external_prop_types_["default"].shape({
|
|
111246
112719
|
cartCount: external_prop_types_["default"].number,
|
|
111247
|
-
customerData: external_prop_types_["default"].object
|
|
112720
|
+
customerData: external_prop_types_["default"].object,
|
|
112721
|
+
authService: external_prop_types_["default"].object
|
|
111248
112722
|
})
|
|
111249
112723
|
};
|
|
111250
112724
|
/* harmony default export */ const header_HeaderContainer = (HeaderContainer);
|