@faststore/core 2.0.133-alpha.0 → 2.0.135-alpha.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.
Files changed (168) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/build-manifest.json +132 -0
  3. package/.next/cache/.tsbuildinfo +1 -0
  4. package/.next/cache/config.json +7 -0
  5. package/.next/cache/eslint/.cache_1gneedd +1 -0
  6. package/.next/cache/next-server.js.nft.json +1 -0
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/export-marker.json +1 -0
  12. package/.next/images-manifest.json +1 -0
  13. package/.next/next-server.js.nft.json +1 -0
  14. package/.next/package.json +1 -0
  15. package/.next/prerender-manifest.json +1 -0
  16. package/.next/react-loadable-manifest.json +48 -0
  17. package/.next/required-server-files.json +1 -0
  18. package/.next/routes-manifest.json +1 -0
  19. package/.next/server/chunks/104.js +703 -0
  20. package/.next/server/chunks/120.js +437 -0
  21. package/.next/server/chunks/123.js +58 -0
  22. package/.next/server/chunks/143.js +106 -0
  23. package/.next/server/chunks/183.js +80 -0
  24. package/.next/server/chunks/247.js +61 -0
  25. package/.next/server/chunks/256.js +1786 -0
  26. package/.next/server/chunks/280.js +324 -0
  27. package/.next/server/chunks/287.js +58 -0
  28. package/.next/server/chunks/312.js +670 -0
  29. package/.next/server/chunks/336.js +821 -0
  30. package/.next/server/chunks/350.js +142 -0
  31. package/.next/server/chunks/368.js +253 -0
  32. package/.next/server/chunks/401.js +7241 -0
  33. package/.next/server/chunks/431.js +7241 -0
  34. package/.next/server/chunks/502.js +600 -0
  35. package/.next/server/chunks/557.js +132 -0
  36. package/.next/server/chunks/576.js +80 -0
  37. package/.next/server/chunks/597.js +169 -0
  38. package/.next/server/chunks/608.js +644 -0
  39. package/.next/server/chunks/644.js +235 -0
  40. package/.next/server/chunks/664.js +3401 -0
  41. package/.next/server/chunks/676.js +32 -0
  42. package/.next/server/chunks/701.js +87 -0
  43. package/.next/server/chunks/74.js +2520 -0
  44. package/.next/server/chunks/746.js +225 -0
  45. package/.next/server/chunks/82.js +371 -0
  46. package/.next/server/chunks/854.js +72 -0
  47. package/.next/server/chunks/859.js +959 -0
  48. package/.next/server/chunks/886.js +120 -0
  49. package/.next/server/chunks/98.js +124 -0
  50. package/.next/server/chunks/font-manifest.json +1 -0
  51. package/.next/server/font-manifest.json +1 -0
  52. package/.next/server/middleware-build-manifest.js +1 -0
  53. package/.next/server/middleware-manifest.json +6 -0
  54. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  55. package/.next/server/pages/404.js +393 -0
  56. package/.next/server/pages/404.js.nft.json +1 -0
  57. package/.next/server/pages/500.js +395 -0
  58. package/.next/server/pages/500.js.nft.json +1 -0
  59. package/.next/server/pages/[...slug].js +708 -0
  60. package/.next/server/pages/[...slug].js.nft.json +1 -0
  61. package/.next/server/pages/[slug]/p.js +2388 -0
  62. package/.next/server/pages/[slug]/p.js.nft.json +1 -0
  63. package/.next/server/pages/_app.js +368 -0
  64. package/.next/server/pages/_app.js.nft.json +1 -0
  65. package/.next/server/pages/_document.js +304 -0
  66. package/.next/server/pages/_document.js.nft.json +1 -0
  67. package/.next/server/pages/_error.js +164 -0
  68. package/.next/server/pages/_error.js.nft.json +1 -0
  69. package/.next/server/pages/account.js +370 -0
  70. package/.next/server/pages/account.js.nft.json +1 -0
  71. package/.next/server/pages/api/graphql.js +315 -0
  72. package/.next/server/pages/api/graphql.js.nft.json +1 -0
  73. package/.next/server/pages/api/preview.js +118 -0
  74. package/.next/server/pages/api/preview.js.nft.json +1 -0
  75. package/.next/server/pages/checkout.js +370 -0
  76. package/.next/server/pages/checkout.js.nft.json +1 -0
  77. package/.next/server/pages/en-US/404.html +81 -0
  78. package/.next/server/pages/en-US/404.json +1 -0
  79. package/.next/server/pages/en-US/500.html +81 -0
  80. package/.next/server/pages/en-US/500.json +1 -0
  81. package/.next/server/pages/en-US/account.html +81 -0
  82. package/.next/server/pages/en-US/account.json +1 -0
  83. package/.next/server/pages/en-US/checkout.html +81 -0
  84. package/.next/server/pages/en-US/checkout.json +1 -0
  85. package/.next/server/pages/en-US/login.html +81 -0
  86. package/.next/server/pages/en-US/login.json +1 -0
  87. package/.next/server/pages/en-US/s.html +81 -0
  88. package/.next/server/pages/en-US/s.json +1 -0
  89. package/.next/server/pages/en-US.html +81 -0
  90. package/.next/server/pages/en-US.json +1 -0
  91. package/.next/server/pages/index.js +967 -0
  92. package/.next/server/pages/index.js.nft.json +1 -0
  93. package/.next/server/pages/login.js +375 -0
  94. package/.next/server/pages/login.js.nft.json +1 -0
  95. package/.next/server/pages/s.js +438 -0
  96. package/.next/server/pages/s.js.nft.json +1 -0
  97. package/.next/server/pages-manifest.json +16 -0
  98. package/.next/server/webpack-api-runtime.js +229 -0
  99. package/.next/server/webpack-runtime.js +229 -0
  100. package/.next/static/RfATetV4YfvX5h6l_dzKd/_buildManifest.js +1 -0
  101. package/.next/static/RfATetV4YfvX5h6l_dzKd/_ssgManifest.js +1 -0
  102. package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
  103. package/.next/static/chunks/170.c17ce564bb568265.js +1 -0
  104. package/.next/static/chunks/202-80a2f2380b08e20d.js +1 -0
  105. package/.next/static/chunks/226.b57e10ad9932f88c.js +1 -0
  106. package/.next/static/chunks/336.0846f48eccce57e4.js +1 -0
  107. package/.next/static/chunks/366-4a0572a47e2225d9.js +1 -0
  108. package/.next/static/chunks/391-47b923ef44945418.js +1 -0
  109. package/.next/static/chunks/495.8ffebac98e9475dc.js +1 -0
  110. package/.next/static/chunks/502.7fd4f230c33d8eca.js +1 -0
  111. package/.next/static/chunks/545-1d3d08edfd2ee4c6.js +1 -0
  112. package/.next/static/chunks/597.c5cf3fbeae5ceb63.js +1 -0
  113. package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
  114. package/.next/static/chunks/706-cbadf253bebb094f.js +1 -0
  115. package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
  116. package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
  117. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
  118. package/.next/static/chunks/main-fd466221927468fd.js +1 -0
  119. package/.next/static/chunks/pages/404-eb7e8c41c852c36d.js +1 -0
  120. package/.next/static/chunks/pages/500-7dc597fd3f74e419.js +1 -0
  121. package/.next/static/chunks/pages/[...slug]-a0cf0c079a55bf65.js +1 -0
  122. package/.next/static/chunks/pages/[slug]/p-d740b4fba658ca99.js +1 -0
  123. package/.next/static/chunks/pages/_app-3e4e7e579cb0681a.js +1 -0
  124. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
  125. package/.next/static/chunks/pages/account-7f4c51b747b4edd0.js +1 -0
  126. package/.next/static/chunks/pages/checkout-cb8871ab88a1471f.js +1 -0
  127. package/.next/static/chunks/pages/index-efc87faefbfc1c42.js +1 -0
  128. package/.next/static/chunks/pages/login-9490b01a047906c0.js +1 -0
  129. package/.next/static/chunks/pages/s-9fdb82cf9875f2ed.js +1 -0
  130. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
  131. package/.next/static/chunks/webpack-ce3960dc6e16b370.js +1 -0
  132. package/.next/static/css/161ccac1909562f3.css +1 -0
  133. package/.next/static/css/48af598df5fe042d.css +1 -0
  134. package/.next/static/css/587c27bbda64e700.css +1 -0
  135. package/.next/static/css/5bd04b22f4d69d95.css +1 -0
  136. package/.next/static/css/73426e282e7b3685.css +1 -0
  137. package/.next/static/css/9c478df3dd8312bc.css +1 -0
  138. package/.next/static/css/9cd06a344b528d1d.css +1 -0
  139. package/.next/static/css/bc39c02d387d74b8.css +1 -0
  140. package/.next/static/css/c4e7bbc97da4a4ee.css +1 -0
  141. package/.next/static/css/e02cdad8fc000339.css +1 -0
  142. package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
  143. package/.next/trace +68 -0
  144. package/.turbo/turbo-build.log +5 -5
  145. package/CHANGELOG.md +12 -0
  146. package/cms/faststore/sections.json +2 -2
  147. package/package.json +4 -4
  148. package/public/~partytown/debug/partytown-atomics.js +556 -0
  149. package/public/~partytown/debug/partytown-media.js +374 -0
  150. package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
  151. package/public/~partytown/debug/partytown-sw.js +59 -0
  152. package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
  153. package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
  154. package/public/~partytown/debug/partytown.js +72 -0
  155. package/public/~partytown/partytown-atomics.js +2 -0
  156. package/public/~partytown/partytown-media.js +2 -0
  157. package/public/~partytown/partytown-sw.js +2 -0
  158. package/public/~partytown/partytown.js +2 -0
  159. package/src/components/navigation/Navbar/Navbar.tsx +1 -0
  160. package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +6 -1
  161. package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +1 -1
  162. package/src/components/product/ProductCard/ProductCard.tsx +1 -0
  163. package/src/components/sections/Hero/Hero.tsx +1 -1
  164. package/src/components/sections/ProductGallery/ProductGallery.tsx +0 -1
  165. package/src/components/sections/ProductGallery/ProductGalleryPage.tsx +2 -42
  166. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +3 -3
  167. package/src/components/ui/Gift/Gift.tsx +2 -5
  168. package/src/components/navigation/NavbarSlider/section.module.scss +0 -26
@@ -0,0 +1,2388 @@
1
+ (() => {
2
+ var exports = {};
3
+ exports.id = 103;
4
+ exports.ids = [103];
5
+ exports.modules = {
6
+
7
+ /***/ 7738:
8
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+ "use strict";
11
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
13
+ /* harmony export */ });
14
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
15
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
16
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7578);
17
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5045);
18
+
19
+
20
+ function BuyButton({ testId = 'fs-buy-button', icon, children, ...otherProps }) {
21
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { "data-fs-buy-button": true, icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { name: "ShoppingCart" }), iconPosition: "left", "data-testid": testId, ...otherProps }, children));
22
+ }
23
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BuyButton);
24
+ //# sourceMappingURL=BuyButton.js.map
25
+
26
+ /***/ }),
27
+
28
+ /***/ 1672:
29
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30
+
31
+ "use strict";
32
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
34
+ /* harmony export */ });
35
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
36
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
37
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(783);
38
+
39
+
40
+ const ProductTitle = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ProductTitle({ title, label, refTag = 'Ref.: ', refNumber, testId = 'fs-product-title', ratingValue, ...otherProps }, ref) {
41
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", { ref: ref, "data-fs-product-title": true, "data-testid": testId, ...otherProps },
42
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-product-title-header": true },
43
+ title,
44
+ !!label && label),
45
+ (refNumber || ratingValue) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { "data-fs-product-title-addendum": true },
46
+ ratingValue && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: ratingValue }),
47
+ refNumber && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
48
+ refTag,
49
+ " ",
50
+ refNumber))))));
51
+ });
52
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductTitle);
53
+ //# sourceMappingURL=ProductTitle.js.map
54
+
55
+ /***/ }),
56
+
57
+ /***/ 4707:
58
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59
+
60
+ "use strict";
61
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
62
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
63
+ /* harmony export */ });
64
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
65
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
66
+
67
+ const Table = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Table({ children, variant = 'colored', testId = 'fs-table', ...otherProps }, ref) {
68
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-table": true },
69
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", { ref: ref, "data-fs-table-content": true, "data-fs-table-variant": variant, "data-testid": testId, ...otherProps }, children)));
70
+ });
71
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Table);
72
+ //# sourceMappingURL=Table.js.map
73
+
74
+ /***/ }),
75
+
76
+ /***/ 1566:
77
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
78
+
79
+ "use strict";
80
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
81
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
82
+ /* harmony export */ });
83
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
84
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
85
+
86
+ const TableBody = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableBody({ children, testId = 'fs-table-body', ...otherProps }, ref) {
87
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", { ref: ref, "data-testid": testId, "data-fs-table-body": true, ...otherProps }, children));
88
+ });
89
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableBody);
90
+ //# sourceMappingURL=TableBody.js.map
91
+
92
+ /***/ }),
93
+
94
+ /***/ 3111:
95
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
+
97
+ "use strict";
98
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
99
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
100
+ /* harmony export */ });
101
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
102
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
103
+
104
+ const TableCell = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableCell({ scope, align, children, variant = 'data', testId = 'fs-table-cell', ...otherProps }, ref) {
105
+ const Cell = variant === 'header' ? 'th' : 'td';
106
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Cell, { ref: ref, "data-fs-table-cell": variant, "data-fs-table-cell-align": align, "data-testid": testId, scope: scope, ...otherProps }, children));
107
+ });
108
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableCell);
109
+ //# sourceMappingURL=TableCell.js.map
110
+
111
+ /***/ }),
112
+
113
+ /***/ 6037:
114
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
115
+
116
+ "use strict";
117
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
118
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
119
+ /* harmony export */ });
120
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
121
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
122
+
123
+ const TableRow = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableRow({ children, testId = 'fs-table-row', ...otherProps }, ref) {
124
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", { ref: ref, "data-fs-table-row": true, "data-testid": testId, ...otherProps }, children));
125
+ });
126
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableRow);
127
+ //# sourceMappingURL=TableRow.js.map
128
+
129
+ /***/ }),
130
+
131
+ /***/ 492:
132
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
133
+
134
+ "use strict";
135
+
136
+ // EXPORTS
137
+ __webpack_require__.d(__webpack_exports__, {
138
+ "Z": () => (/* reexport */ product_OutOfStock_OutOfStock)
139
+ });
140
+
141
+ // EXTERNAL MODULE: ../components/dist/hooks/UIProvider.js
142
+ var UIProvider = __webpack_require__(395);
143
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
144
+ var Icon = __webpack_require__(5045);
145
+ // EXTERNAL MODULE: external "react"
146
+ var external_react_ = __webpack_require__(6689);
147
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
148
+ // EXTERNAL MODULE: ../components/dist/molecules/InputField/InputField.js
149
+ var InputField = __webpack_require__(8287);
150
+ // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js
151
+ var Button = __webpack_require__(7578);
152
+ ;// CONCATENATED MODULE: ../components/dist/organisms/OutOfStock/OutOfStock.js
153
+
154
+
155
+ const OutOfStock = (0,external_react_.forwardRef)(function OutOfStock({ testId = 'fs-out-of-stock', title, buttonLabel = 'Notify Me', loadingLabel = 'Loading', inputLabel, subtitle, disabled, errorMessage, onSubmit, ...otherProps }, ref) {
156
+ return (external_react_default().createElement("form", { "data-fs-out-of-stock": true, ref: ref, "data-testid": testId, onSubmit: onSubmit, ...otherProps },
157
+ external_react_default().createElement("h2", { "data-fs-out-of-stock-title": true }, title),
158
+ subtitle && (external_react_default().createElement("p", { "data-fs-out-of-stock-message": true },
159
+ external_react_default().createElement(Icon/* default */.Z, { name: "BellRinging", width: 16, height: 16 }),
160
+ subtitle)),
161
+ external_react_default().createElement(InputField/* default */.Z, { id: "out-of-stock-email", name: "out-of-stock-email", label: inputLabel, "aria-label": inputLabel, error: errorMessage, required: true }),
162
+ external_react_default().createElement(Button/* default */.Z, { "data-fs-out-of-stock-button": true, type: "submit", loading: disabled, loadingLabel: loadingLabel, disabled: disabled, variant: "primary", icon: external_react_default().createElement(Icon/* default */.Z, { name: "BellRinging" }), iconPosition: "left" }, buttonLabel)));
163
+ });
164
+ /* harmony default export */ const OutOfStock_OutOfStock = (OutOfStock);
165
+ //# sourceMappingURL=OutOfStock.js.map
166
+ // EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
167
+ var session = __webpack_require__(7295);
168
+ // EXTERNAL MODULE: external "react/jsx-runtime"
169
+ var jsx_runtime_ = __webpack_require__(997);
170
+ ;// CONCATENATED MODULE: ./src/components/product/OutOfStock/OutOfStock.tsx
171
+
172
+
173
+
174
+
175
+
176
+ function OutOfStock_OutOfStock_OutOfStock() {
177
+ const {
178
+ postalCode
179
+ } = (0,session/* useSession */.kP)();
180
+ const {
181
+ 0: isLoading,
182
+ 1: setIsLoading
183
+ } = (0,external_react_.useState)(false);
184
+ const {
185
+ 0: error,
186
+ 1: setError
187
+ } = (0,external_react_.useState)('');
188
+ const {
189
+ pushToast
190
+ } = (0,UIProvider/* useUI */.l)();
191
+
192
+ const handleSubmit = event => {
193
+ event.preventDefault();
194
+ setIsLoading(true); // TODO: Missing integration
195
+
196
+ try {
197
+ // Return to original state after 2s mockup
198
+ setTimeout(() => setIsLoading(false), 2000);
199
+ const formElement = event.currentTarget;
200
+ formElement.reset();
201
+ pushToast({
202
+ title: 'Subscribed successfully!',
203
+ message: "You'll be notified when this product is back to stock.",
204
+ status: 'INFO',
205
+ icon: /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
206
+ name: "CircleWavyCheck",
207
+ width: 30,
208
+ height: 30
209
+ })
210
+ });
211
+ } catch (err) {
212
+ setError(err.message);
213
+ } finally {}
214
+ };
215
+
216
+ return /*#__PURE__*/jsx_runtime_.jsx(OutOfStock_OutOfStock, {
217
+ title: postalCode ? 'Unavailable in Your Location' : 'Out of Stock',
218
+ inputLabel: "Email",
219
+ subtitle: "Notify me when available",
220
+ onSubmit: handleSubmit,
221
+ disabled: isLoading,
222
+ errorMessage: error
223
+ });
224
+ }
225
+
226
+ /* harmony default export */ const product_OutOfStock_OutOfStock = (OutOfStock_OutOfStock_OutOfStock);
227
+ ;// CONCATENATED MODULE: ./src/components/product/OutOfStock/index.ts
228
+
229
+
230
+ /***/ }),
231
+
232
+ /***/ 2951:
233
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
234
+
235
+ "use strict";
236
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
237
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
238
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
239
+ /* harmony export */ });
240
+ /* harmony import */ var src_components_ui_BannerText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6166);
241
+ /* harmony import */ var _Newsletter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7191);
242
+ /* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7067);
243
+ /* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5411);
244
+ /* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_section_module_scss__WEBPACK_IMPORTED_MODULE_4__);
245
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(997);
246
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
247
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_Newsletter__WEBPACK_IMPORTED_MODULE_1__]);
248
+ _Newsletter__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ function BannerNewsletter() {
257
+ return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(_Section__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
258
+ className: `${(_section_module_scss__WEBPACK_IMPORTED_MODULE_4___default().section)} section-banner-newsletter layout__content`,
259
+ children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
260
+ "data-fs-banner-newsletter": true,
261
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(src_components_ui_BannerText__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z, {
262
+ title: "Get to Know Our Next Release",
263
+ caption: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam elit nisi, vehicula in turpis sit amet, posuere aliquam nisl. ",
264
+ actionLabel: "Shop Now",
265
+ actionPath: "/",
266
+ variant: "secondary",
267
+ colorVariant: "light"
268
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(_Newsletter__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
269
+ title: "Get News and Special Offers!",
270
+ description: "Receive our news and promotions in advance. Enjoy and get 10% off your first purchase. For more information click here.",
271
+ card: true,
272
+ lite: true
273
+ })]
274
+ })
275
+ });
276
+ }
277
+
278
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BannerNewsletter);
279
+ __webpack_async_result__();
280
+ } catch(e) { __webpack_async_result__(e); } });
281
+
282
+ /***/ }),
283
+
284
+ /***/ 994:
285
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
286
+
287
+ "use strict";
288
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
289
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
290
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
291
+ /* harmony export */ });
292
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
293
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
294
+ /* harmony import */ var _ProductShelf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7104);
295
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(997);
296
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
297
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_ProductShelf__WEBPACK_IMPORTED_MODULE_1__]);
298
+ _ProductShelf__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
299
+
300
+
301
+
302
+
303
+ const CrossSellingShelf = ({
304
+ items,
305
+ title,
306
+ context,
307
+ kind
308
+ }) => {
309
+ const selectedFacets = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => [{
310
+ key: kind,
311
+ value: context.isVariantOf.productGroupID
312
+ }], [kind, context.isVariantOf.productGroupID]);
313
+ return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx(_ProductShelf__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
314
+ first: items,
315
+ title: title,
316
+ selectedFacets: selectedFacets
317
+ });
318
+ };
319
+
320
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CrossSellingShelf);
321
+ __webpack_async_result__();
322
+ } catch(e) { __webpack_async_result__(e); } });
323
+
324
+ /***/ }),
325
+
326
+ /***/ 7990:
327
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
328
+
329
+ "use strict";
330
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
331
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
332
+ /* harmony export */ "Z": () => (/* reexport safe */ _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__.Z)
333
+ /* harmony export */ });
334
+ /* harmony import */ var _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(994);
335
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__]);
336
+ _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
337
+
338
+ __webpack_async_result__();
339
+ } catch(e) { __webpack_async_result__(e); } });
340
+
341
+ /***/ }),
342
+
343
+ /***/ 4870:
344
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
345
+
346
+ "use strict";
347
+
348
+ // EXPORTS
349
+ __webpack_require__.d(__webpack_exports__, {
350
+ "Z": () => (/* reexport */ ProducDetailsContent_ProductDetailsContent)
351
+ });
352
+
353
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/Accordion.js
354
+ var Accordion = __webpack_require__(9739);
355
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionItem.js
356
+ var AccordionItem = __webpack_require__(5705);
357
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionButton.js
358
+ var AccordionButton = __webpack_require__(7743);
359
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionPanel.js
360
+ var AccordionPanel = __webpack_require__(331);
361
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/Table.js
362
+ var Table = __webpack_require__(4707);
363
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableBody.js
364
+ var TableBody = __webpack_require__(1566);
365
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableRow.js
366
+ var TableRow = __webpack_require__(6037);
367
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableCell.js
368
+ var TableCell = __webpack_require__(3111);
369
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
370
+ var Icon = __webpack_require__(5045);
371
+ // EXTERNAL MODULE: ../components/dist/atoms/List/List.js
372
+ var List = __webpack_require__(1329);
373
+ // EXTERNAL MODULE: external "react"
374
+ var external_react_ = __webpack_require__(6689);
375
+ // EXTERNAL MODULE: external "react/jsx-runtime"
376
+ var jsx_runtime_ = __webpack_require__(997);
377
+ ;// CONCATENATED MODULE: ./src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx
378
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
379
+
380
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
381
+
382
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
383
+
384
+
385
+
386
+
387
+
388
+
389
+ /**
390
+ * Maps 'initiallyExpanded' prop values to indices
391
+ */
392
+ const INITIALLY_EXPANDED_MAP = {
393
+ first: [0],
394
+ all: [0, 1, 2, 3],
395
+ none: []
396
+ };
397
+ /**
398
+ * Default article labels
399
+ */
400
+
401
+ const DEFAULT_LABELS = {
402
+ description: 'Description',
403
+ about: 'About this product',
404
+ highlights: 'Product highlights',
405
+ learnMore: 'Learn More'
406
+ };
407
+
408
+ function ProductDetailsContent({
409
+ initiallyExpanded = 'first',
410
+ labels: propLabels = {}
411
+ }) {
412
+ const {
413
+ 0: indices,
414
+ 1: setIndices
415
+ } = (0,external_react_.useState)(new Set(INITIALLY_EXPANDED_MAP[initiallyExpanded]));
416
+
417
+ const onChange = index => {
418
+ setIndices(currentIndices => {
419
+ const newIndices = new Set(currentIndices);
420
+
421
+ if (currentIndices.has(index)) {
422
+ newIndices.delete(index);
423
+ } else {
424
+ newIndices.add(index);
425
+ }
426
+
427
+ return newIndices;
428
+ });
429
+ };
430
+
431
+ const labels = _objectSpread(_objectSpread({}, DEFAULT_LABELS), propLabels);
432
+
433
+ return /*#__PURE__*/jsx_runtime_.jsx("section", {
434
+ "data-fs-product-details-content": true,
435
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(Accordion/* default */.Z, {
436
+ indices: indices,
437
+ onChange: onChange,
438
+ "aria-label": "Product Details Content",
439
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
440
+ as: "article",
441
+ index: 0,
442
+ "data-fs-product-details-description": true,
443
+ prefixId: "product-details-content",
444
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
445
+ children: labels.description
446
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
447
+ children: /*#__PURE__*/jsx_runtime_.jsx("p", {
448
+ className: "text__body",
449
+ children: "Sony WH-1000XM4 Wireless Industry Leading Noise Canceling Overhead Headphones with Mic for Phone-Call and Alexa Voice Control, Black."
450
+ })
451
+ })]
452
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
453
+ as: "article",
454
+ index: 1,
455
+ "data-fs-product-details-about": true,
456
+ prefixId: "product-details-content",
457
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
458
+ children: labels.about
459
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
460
+ children: /*#__PURE__*/jsx_runtime_.jsx(Table/* default */.Z, {
461
+ cellPadding: 0,
462
+ cellSpacing: 0,
463
+ className: "text__title-mini-alt",
464
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableBody/* default */.Z, {
465
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
466
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
467
+ variant: "header",
468
+ align: "left",
469
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
470
+ "data-fs-accordion-item-button-icon": true,
471
+ name: "Ruler",
472
+ width: 18,
473
+ height: 18
474
+ }), /*#__PURE__*/jsx_runtime_.jsx("span", {
475
+ children: "Width"
476
+ })]
477
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
478
+ align: "right",
479
+ children: "1.50m"
480
+ })]
481
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
482
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
483
+ variant: "header",
484
+ align: "left",
485
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
486
+ "data-fs-accordion-item-button-icon": true,
487
+ name: "Ruler",
488
+ width: 18,
489
+ height: 18
490
+ }), "Height"]
491
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
492
+ align: "right",
493
+ children: "1.50m"
494
+ })]
495
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
496
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
497
+ variant: "header",
498
+ align: "left",
499
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
500
+ "data-fs-accordion-item-button-icon": true,
501
+ name: "Ruler",
502
+ width: 18,
503
+ height: 18
504
+ }), "Dimensions"]
505
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
506
+ align: "right",
507
+ children: "7.27 x 3.03 x 9.94 inches"
508
+ })]
509
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
510
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
511
+ variant: "header",
512
+ align: "left",
513
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
514
+ "data-fs-accordion-item-button-icon": true,
515
+ name: "Bag",
516
+ width: 18,
517
+ height: 18
518
+ }), "Weight"]
519
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
520
+ align: "right",
521
+ children: "12oz"
522
+ })]
523
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
524
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
525
+ variant: "header",
526
+ align: "left",
527
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
528
+ "data-fs-accordion-item-button-icon": true,
529
+ name: "RocketLaunch",
530
+ width: 18,
531
+ height: 18
532
+ }), "Days to ship"]
533
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
534
+ align: "right",
535
+ children: "11 Days"
536
+ })]
537
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
538
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
539
+ variant: "header",
540
+ align: "left",
541
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
542
+ "data-fs-accordion-item-button-icon": true,
543
+ name: "CircleWavyCheck",
544
+ width: 18,
545
+ height: 18
546
+ }), "Estimated"]
547
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
548
+ align: "right",
549
+ children: "Nov 10th"
550
+ })]
551
+ })]
552
+ })
553
+ })
554
+ })]
555
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
556
+ as: "article",
557
+ className: "text__body",
558
+ index: 2,
559
+ "data-fs-product-details-highlights": true,
560
+ prefixId: "product-details-content",
561
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
562
+ children: labels.highlights
563
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
564
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(List/* default */.Z, {
565
+ marker: true,
566
+ children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
567
+ children: "Industry-leading noise canceling with Dual Noise Sensor technology"
568
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
569
+ children: "Next-level music with Edge-AI, co-developed with Sony Music Studios Tokyo"
570
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
571
+ children: "Up to 30-hour battery life with quick charging (10 min charge for 5 hours of playback)"
572
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
573
+ children: "Touch Sensor controls to pause play skip tracks, control volume, activate your voice assistant, and answer phone calls"
574
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
575
+ children: "Speak-to-chat technology automatically reduces volume during conversations"
576
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
577
+ children: "Superior call quality with precise voice pickup"
578
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
579
+ children: "Wearing detection pauses playback when headphones are removed"
580
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
581
+ children: "Seamless multiple-device pairing"
582
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
583
+ children: "Adaptive Sound Control provides a personalized listening experience"
584
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
585
+ children: "Updated design relieves pressure for long-lasting comfort"
586
+ })]
587
+ })
588
+ })]
589
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
590
+ as: "article",
591
+ index: 3,
592
+ "data-fs-product-details-learn-more": true,
593
+ prefixId: "product-details-content",
594
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
595
+ children: labels.learnMore
596
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
597
+ children: /*#__PURE__*/jsx_runtime_.jsx("p", {
598
+ className: "text__body",
599
+ children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru."
600
+ })
601
+ })]
602
+ })]
603
+ })
604
+ });
605
+ }
606
+
607
+ /* harmony default export */ const ProducDetailsContent_ProductDetailsContent = (ProductDetailsContent);
608
+ ;// CONCATENATED MODULE: ./src/components/sections/ProducDetailsContent/index.ts
609
+
610
+
611
+ /***/ }),
612
+
613
+ /***/ 1750:
614
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
615
+
616
+ "use strict";
617
+
618
+ // EXPORTS
619
+ __webpack_require__.d(__webpack_exports__, {
620
+ "z": () => (/* binding */ Components)
621
+ });
622
+
623
+ // EXTERNAL MODULE: ../components/dist/atoms/Price/Price.js
624
+ var Price = __webpack_require__(7549);
625
+ // EXTERNAL MODULE: ../components/dist/molecules/DiscountBadge/DiscountBadge.js + 1 modules
626
+ var DiscountBadge = __webpack_require__(9875);
627
+ ;// CONCATENATED MODULE: ./src/customizations/components/overrides/ProductDetails.tsx
628
+ const SECTION = "ProductDetails";
629
+ const overrides = {
630
+ name: SECTION,
631
+ components: {}
632
+ };
633
+ /* harmony default export */ const ProductDetails = (overrides);
634
+ ;// CONCATENATED MODULE: ./src/components/sections/ProductDetails/Overrides.tsx
635
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
636
+
637
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
638
+
639
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
640
+
641
+
642
+
643
+
644
+ const Components = _objectSpread({
645
+ Price: Price/* default */.Z,
646
+ DiscountBadge: DiscountBadge/* default */.Z
647
+ }, ProductDetails.components);
648
+
649
+
650
+
651
+ /***/ }),
652
+
653
+ /***/ 1644:
654
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
655
+
656
+ "use strict";
657
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
658
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
659
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
660
+ /* harmony export */ });
661
+ /* unused harmony export fragment */
662
+ /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(1072);
663
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(123);
664
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7738);
665
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(1672);
666
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
667
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
668
+ /* harmony import */ var _Overrides__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1750);
669
+ /* harmony import */ var src_components_product_OutOfStock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(492);
670
+ /* harmony import */ var src_components_ui_Breadcrumb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(120);
671
+ /* harmony import */ var src_components_ui_ImageGallery__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5693);
672
+ /* harmony import */ var src_components_ui_ShippingSimulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(104);
673
+ /* harmony import */ var src_components_ui_SkuSelector__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4475);
674
+ /* harmony import */ var src_sdk_cart_useBuyButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8892);
675
+ /* harmony import */ var src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5346);
676
+ /* harmony import */ var src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3874);
677
+ /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7295);
678
+ /* harmony import */ var _ProducDetailsContent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4870);
679
+ /* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7067);
680
+ /* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(9034);
681
+ /* harmony import */ var _section_module_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_section_module_scss__WEBPACK_IMPORTED_MODULE_17__);
682
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(997);
683
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);
684
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_9__]);
685
+ src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_9__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
686
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
687
+
688
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
689
+
690
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
691
+
692
+
693
+
694
+
695
+
696
+ const {
697
+ Price,
698
+ DiscountBadge
699
+ } = _Overrides__WEBPACK_IMPORTED_MODULE_1__/* .Components */ .z;
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+ function ProductDetails({
717
+ context: staleProduct
718
+ }) {
719
+ const {
720
+ currency
721
+ } = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_10__/* .useSession */ .kP)();
722
+ const {
723
+ 0: addQuantity,
724
+ 1: setAddQuantity
725
+ } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1); // Stale while revalidate the product for fetching the new price etc
726
+
727
+ const {
728
+ data,
729
+ isValidating
730
+ } = (0,src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_9__/* .useProduct */ .i)(staleProduct.id, {
731
+ product: staleProduct
732
+ });
733
+
734
+ if (!data) {
735
+ throw new Error('NotFound');
736
+ }
737
+
738
+ const {
739
+ product: {
740
+ id,
741
+ sku,
742
+ gtin,
743
+ name: variantName,
744
+ brand,
745
+ isVariantOf,
746
+ isVariantOf: {
747
+ name,
748
+ productGroupID: productId,
749
+ skuVariants
750
+ },
751
+ image: productImages,
752
+ offers: {
753
+ offers: [{
754
+ availability,
755
+ price,
756
+ listPrice,
757
+ seller
758
+ }],
759
+ lowPrice
760
+ },
761
+ breadcrumbList: breadcrumbs,
762
+ additionalProperty
763
+ }
764
+ } = data;
765
+ const buyDisabled = availability !== 'https://schema.org/InStock';
766
+ const buyProps = (0,src_sdk_cart_useBuyButton__WEBPACK_IMPORTED_MODULE_7__/* .useBuyButton */ .Q)({
767
+ id,
768
+ price,
769
+ listPrice,
770
+ seller,
771
+ quantity: addQuantity,
772
+ itemOffered: {
773
+ sku,
774
+ name: variantName,
775
+ gtin,
776
+ image: productImages,
777
+ brand,
778
+ isVariantOf,
779
+ additionalProperty
780
+ }
781
+ });
782
+
783
+ const ProductDetailsSection = () => {
784
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment, {
785
+ children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("section", {
786
+ "data-fs-product-details-values": true,
787
+ children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div", {
788
+ "data-fs-product-details-prices": true,
789
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(Price, {
790
+ value: listPrice,
791
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_8__/* .useFormattedPrice */ .P,
792
+ testId: "list-price",
793
+ "data-value": listPrice,
794
+ variant: "listing",
795
+ SRText: "Original price:"
796
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(Price, {
797
+ value: lowPrice,
798
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_8__/* .useFormattedPrice */ .P,
799
+ testId: "price",
800
+ "data-value": lowPrice,
801
+ variant: "spot",
802
+ className: "text__lead",
803
+ SRText: "Sale Price:"
804
+ })]
805
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
806
+ min: 1,
807
+ max: 10,
808
+ onChange: setAddQuantity
809
+ })]
810
+ }), skuVariants && /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_ui_SkuSelector__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
811
+ slugsMap: skuVariants.slugsMap,
812
+ availableVariations: skuVariants.availableVariations,
813
+ activeVariations: skuVariants.activeVariations,
814
+ "data-fs-product-details-selectors": true
815
+ }),
816
+ /* NOTE: A loading skeleton had to be used to avoid a Lighthouse's
817
+ non-composited animation violation due to the button transitioning its
818
+ background color when changing from its initial disabled to active state.
819
+ See full explanation on commit https://git.io/JyXV5. */
820
+ isValidating ? /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(AddToCartLoadingSkeleton, {}) : /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, _objectSpread(_objectSpread({
821
+ disabled: buyDisabled
822
+ }, buyProps), {}, {
823
+ children: "Add to Cart"
824
+ }))]
825
+ });
826
+ };
827
+
828
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
829
+ (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_16__/* .sendAnalyticsEvent */ ._)({
830
+ name: 'view_item',
831
+ params: {
832
+ currency: currency.code,
833
+ value: price,
834
+ items: [{
835
+ item_id: isVariantOf.productGroupID,
836
+ item_name: isVariantOf.name,
837
+ item_brand: brand.name,
838
+ item_variant: sku,
839
+ price,
840
+ discount: listPrice - price,
841
+ currency: currency.code,
842
+ item_variant_name: variantName,
843
+ product_reference_id: gtin
844
+ }]
845
+ }
846
+ });
847
+ }, [isVariantOf.productGroupID, isVariantOf.name, brand.name, sku, price, listPrice, currency.code, variantName, gtin]);
848
+ return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(_Section__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
849
+ className: `${(_section_module_scss__WEBPACK_IMPORTED_MODULE_17___default().section)} section-product-details layout__content layout__section`,
850
+ children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("section", {
851
+ "data-fs-product-details": true,
852
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_ui_Breadcrumb__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
853
+ breadcrumbList: breadcrumbs.itemListElement
854
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("section", {
855
+ "data-fs-product-details-body": true,
856
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("header", {
857
+ "data-fs-product-details-title": true,
858
+ "data-fs-product-details-section": true,
859
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
860
+ title: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("h1", {
861
+ children: name
862
+ }),
863
+ label: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(DiscountBadge, {
864
+ listPrice: listPrice,
865
+ spotPrice: lowPrice,
866
+ size: "big"
867
+ }),
868
+ refNumber: productId
869
+ })
870
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_ui_ImageGallery__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
871
+ "data-fs-product-details-gallery": true,
872
+ images: productImages
873
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("section", {
874
+ "data-fs-product-details-info": true,
875
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("section", {
876
+ "data-fs-product-details-settings": true,
877
+ "data-fs-product-details-section": true,
878
+ children: availability ? /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(ProductDetailsSection, {}) : /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_product_OutOfStock__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {})
879
+ }), availability && /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_ui_ShippingSimulation__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
880
+ "data-fs-product-details-section": true,
881
+ "data-fs-product-details-shipping": true,
882
+ productShippingInfo: {
883
+ id,
884
+ quantity: addQuantity,
885
+ seller: seller.identifier
886
+ },
887
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_8__/* .useFormattedPrice */ .P
888
+ })]
889
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(_ProducDetailsContent__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {})]
890
+ })]
891
+ })
892
+ });
893
+ }
894
+
895
+ function AddToCartLoadingSkeleton() {
896
+ // Generated via https://skeletonreact.com/.
897
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("svg", {
898
+ role: "img",
899
+ width: "100%",
900
+ height: "48",
901
+ "aria-labelledby": "loading-aria",
902
+ viewBox: "0 0 112 48",
903
+ preserveAspectRatio: "none",
904
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("title", {
905
+ id: "loading-aria",
906
+ children: "Loading..."
907
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("rect", {
908
+ x: "0",
909
+ y: "0",
910
+ width: "100%",
911
+ height: "100%",
912
+ clipPath: "url(#clip-path)",
913
+ style: {
914
+ fill: 'url("#fill")'
915
+ }
916
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("defs", {
917
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("clipPath", {
918
+ id: "clip-path",
919
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("rect", {
920
+ x: "0",
921
+ y: "0",
922
+ rx: "2",
923
+ ry: "2",
924
+ width: "112",
925
+ height: "48"
926
+ })
927
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("linearGradient", {
928
+ id: "fill",
929
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("stop", {
930
+ offset: "0.599964",
931
+ stopColor: "#f3f3f3",
932
+ stopOpacity: "1",
933
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("animate", {
934
+ attributeName: "offset",
935
+ values: "-2; -2; 1",
936
+ keyTimes: "0; 0.25; 1",
937
+ dur: "2s",
938
+ repeatCount: "indefinite"
939
+ })
940
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("stop", {
941
+ offset: "1.59996",
942
+ stopColor: "#ecebeb",
943
+ stopOpacity: "1",
944
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("animate", {
945
+ attributeName: "offset",
946
+ values: "-1; -1; 2",
947
+ keyTimes: "0; 0.25; 1",
948
+ dur: "2s",
949
+ repeatCount: "indefinite"
950
+ })
951
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("stop", {
952
+ offset: "2.59996",
953
+ stopColor: "#f3f3f3",
954
+ stopOpacity: "1",
955
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx("animate", {
956
+ attributeName: "offset",
957
+ values: "0; 0; 3",
958
+ keyTimes: "0; 0.25; 1",
959
+ dur: "2s",
960
+ repeatCount: "indefinite"
961
+ })
962
+ })]
963
+ })]
964
+ })]
965
+ });
966
+ }
967
+
968
+ const fragment = "unknown";
969
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductDetails);
970
+ __webpack_async_result__();
971
+ } catch(e) { __webpack_async_result__(e); } });
972
+
973
+ /***/ }),
974
+
975
+ /***/ 3220:
976
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
977
+
978
+ "use strict";
979
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
980
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
981
+ /* harmony export */ "Z": () => (/* reexport safe */ _ProductDetails__WEBPACK_IMPORTED_MODULE_0__.Z)
982
+ /* harmony export */ });
983
+ /* harmony import */ var _ProductDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1644);
984
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_ProductDetails__WEBPACK_IMPORTED_MODULE_0__]);
985
+ _ProductDetails__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
986
+
987
+ __webpack_async_result__();
988
+ } catch(e) { __webpack_async_result__(e); } });
989
+
990
+ /***/ }),
991
+
992
+ /***/ 5693:
993
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
994
+
995
+ "use strict";
996
+
997
+ // EXPORTS
998
+ __webpack_require__.d(__webpack_exports__, {
999
+ "Z": () => (/* reexport */ ui_ImageGallery_ImageGallery)
1000
+ });
1001
+
1002
+ // EXTERNAL MODULE: external "react"
1003
+ var external_react_ = __webpack_require__(6689);
1004
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1005
+ // EXTERNAL MODULE: external "react-intersection-observer"
1006
+ var external_react_intersection_observer_ = __webpack_require__(9785);
1007
+ // EXTERNAL MODULE: ../components/dist/molecules/IconButton/IconButton.js
1008
+ var IconButton = __webpack_require__(2765);
1009
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
1010
+ var Icon = __webpack_require__(5045);
1011
+ // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js
1012
+ var Button = __webpack_require__(7578);
1013
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ImageGallery/ImageGallerySelector.js
1014
+
1015
+
1016
+
1017
+ const SCROLL_MARGIN_VALUE = 400;
1018
+ const moveScroll = (container, value) => {
1019
+ if (container) {
1020
+ if (container.scrollHeight > container.clientHeight) {
1021
+ // TODO: Temporary workaround for scroll-behavior with scrollTop – Safari 15.4) https://developer.apple.com/forums/thread/703294
1022
+ container.style.overflow = 'auto';
1023
+ window.requestAnimationFrame(() => container.scrollTo({ top: value, behavior: 'smooth' }));
1024
+ setTimeout(() => (container.style.overflow = 'hidden'), 2000);
1025
+ }
1026
+ else {
1027
+ container.scrollLeft += value;
1028
+ }
1029
+ }
1030
+ };
1031
+ const hasScroll = (container) => {
1032
+ if (container) {
1033
+ return (container.scrollHeight > container.clientHeight ||
1034
+ container.scrollWidth > container.clientWidth);
1035
+ }
1036
+ return false;
1037
+ };
1038
+ function ImageGallerySelector({ images, onSelect, ImageComponent, currentImageIdx, testId = 'fs-image-gallery-selector', 'aria-label': ariaLabel = 'Product Images', navigationButtonLeftAriaLabel = 'Backward slide image selector', navigationButtonRightAriaLabel = 'Forward slide image selector', }) {
1039
+ const elementsRef = (0,external_react_.useRef)(null);
1040
+ const elementHasScroll = hasScroll(elementsRef.current);
1041
+ const [firstImageInView, setFirstImageInView] = (0,external_react_.useState)(true);
1042
+ const [lastImageInView, setLastImageInView] = (0,external_react_.useState)(true);
1043
+ const inViewChange = (0,external_react_.useCallback)((idx, inView) => {
1044
+ idx === 0 && setFirstImageInView(inView);
1045
+ idx === images.length - 1 && setLastImageInView(inView);
1046
+ }, [images.length]);
1047
+ return (external_react_default().createElement("section", { "data-fs-image-gallery-selector": true, "data-testid": testId, "aria-label": ariaLabel, "aria-roledescription": "carousel" },
1048
+ elementHasScroll && !firstImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
1049
+ external_react_default().createElement(IconButton/* default */.Z, { "data-fs-image-gallery-selector-control-button": true, "aria-label": navigationButtonLeftAriaLabel, icon: external_react_default().createElement(Icon/* default */.Z, { name: "ArrowLeft" }), onClick: () => moveScroll(elementsRef.current, -SCROLL_MARGIN_VALUE) }))),
1050
+ external_react_default().createElement("div", { "data-fs-image-gallery-selector-elements": true, ref: elementsRef }, images.map((image, idx) => {
1051
+ return (external_react_default().createElement(external_react_intersection_observer_.InView, { key: idx, onChange: (inView) => inViewChange(idx, inView) },
1052
+ external_react_default().createElement(Button/* default */.Z, { key: idx, "aria-label": `${image.alternateName} - Image ${idx + 1} of ${images.length}`, onClick: () => onSelect(idx), "data-fs-image-gallery-selector-thumbnail": idx === currentImageIdx ? 'selected' : 'true' },
1053
+ external_react_default().createElement(ImageComponent, { url: image.url ?? '', loading: idx === 0 ? 'eager' : 'lazy', alternateName: image.alternateName ?? '' }))));
1054
+ })),
1055
+ elementHasScroll && !lastImageInView && (external_react_default().createElement("div", { "data-fs-image-gallery-selector-control": true },
1056
+ external_react_default().createElement(IconButton/* default */.Z, { "data-fs-image-gallery-selector-control-button": true, "aria-label": navigationButtonRightAriaLabel, icon: external_react_default().createElement(Icon/* default */.Z, { name: "ArrowLeft" }), onClick: () => moveScroll(elementsRef.current, +SCROLL_MARGIN_VALUE) })))));
1057
+ }
1058
+ /* harmony default export */ const ImageGallery_ImageGallerySelector = (ImageGallerySelector);
1059
+ //# sourceMappingURL=ImageGallerySelector.js.map
1060
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ImageGallery/ImageGallery.js
1061
+
1062
+
1063
+ const ImageGallery = (0,external_react_.forwardRef)(function ImageGallery({ images, children, ImageComponent, selectedImageIdx, setSelectedImageIdx, testId = 'fs-image-gallery', ...otherProps }, ref) {
1064
+ const hasSelector = images.length > 1;
1065
+ return (external_react_default().createElement("section", { ref: ref, "data-fs-image-gallery": hasSelector ? 'with-selector' : 'without-selector', "data-testid": testId, ...otherProps },
1066
+ children,
1067
+ hasSelector && (external_react_default().createElement(ImageGallery_ImageGallerySelector, { images: images, onSelect: setSelectedImageIdx, currentImageIdx: selectedImageIdx, ImageComponent: ImageComponent }))));
1068
+ });
1069
+ /* harmony default export */ const ImageGallery_ImageGallery = (ImageGallery);
1070
+ //# sourceMappingURL=ImageGallery.js.map
1071
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ImageGallery/ImageZoom.js
1072
+
1073
+ const ImageZoom = ({ children }) => {
1074
+ return external_react_default().createElement((external_react_default()).Fragment, null, children);
1075
+ };
1076
+ /* harmony default export */ const ImageGallery_ImageZoom = (ImageZoom);
1077
+ //# sourceMappingURL=ImageZoom.js.map
1078
+ // EXTERNAL MODULE: external "next/router"
1079
+ var router_ = __webpack_require__(1853);
1080
+ // EXTERNAL MODULE: ./src/components/ui/Image/index.ts + 2 modules
1081
+ var Image = __webpack_require__(9266);
1082
+ // EXTERNAL MODULE: external "react/jsx-runtime"
1083
+ var jsx_runtime_ = __webpack_require__(997);
1084
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageGallery.tsx
1085
+ const _excluded = ["images"];
1086
+
1087
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1088
+
1089
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1090
+
1091
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1092
+
1093
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1094
+
1095
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+ const ImageComponent = ({
1104
+ url,
1105
+ alternateName
1106
+ }) => /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, {
1107
+ src: url,
1108
+ alt: alternateName,
1109
+ width: 68,
1110
+ height: 68
1111
+ });
1112
+
1113
+ const ImageGallery_ImageGallery_ImageGallery = _ref => {
1114
+ let {
1115
+ images
1116
+ } = _ref,
1117
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1118
+
1119
+ const {
1120
+ 0: selectedImageIdx,
1121
+ 1: setSelectedImageIdx
1122
+ } = (0,external_react_.useState)(0);
1123
+ const currentImage = images[selectedImageIdx] ?? images[0];
1124
+ const dynamicRoute = (0,router_.useRouter)().asPath;
1125
+ (0,external_react_.useEffect)(() => setSelectedImageIdx(0), [dynamicRoute]);
1126
+ return /*#__PURE__*/jsx_runtime_.jsx(ImageGallery_ImageGallery, _objectSpread(_objectSpread({
1127
+ images: images,
1128
+ ImageComponent: ImageComponent,
1129
+ selectedImageIdx: selectedImageIdx,
1130
+ setSelectedImageIdx: setSelectedImageIdx
1131
+ }, otherProps), {}, {
1132
+ children: /*#__PURE__*/jsx_runtime_.jsx(ImageGallery_ImageZoom, {
1133
+ children: /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, {
1134
+ src: currentImage.url,
1135
+ alt: currentImage.alternateName,
1136
+ sizes: "(max-width: 768px) 25vw, 30vw",
1137
+ width: 691,
1138
+ height: 691 * (3 / 4),
1139
+ loading: "eager"
1140
+ })
1141
+ })
1142
+ }));
1143
+ };
1144
+
1145
+ /* harmony default export */ const ui_ImageGallery_ImageGallery = (ImageGallery_ImageGallery_ImageGallery);
1146
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/index.ts
1147
+
1148
+
1149
+ /***/ }),
1150
+
1151
+ /***/ 104:
1152
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1153
+
1154
+ "use strict";
1155
+
1156
+ // EXPORTS
1157
+ __webpack_require__.d(__webpack_exports__, {
1158
+ "Z": () => (/* reexport */ ShippingSimulation_ShippingSimulation_ShippingSimulation)
1159
+ });
1160
+
1161
+ // EXTERNAL MODULE: external "react"
1162
+ var external_react_ = __webpack_require__(6689);
1163
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1164
+ // EXTERNAL MODULE: ../components/dist/molecules/InputField/InputField.js
1165
+ var InputField = __webpack_require__(8287);
1166
+ // EXTERNAL MODULE: ../components/dist/atoms/Link/Link.js
1167
+ var Link = __webpack_require__(7865);
1168
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
1169
+ var Icon = __webpack_require__(5045);
1170
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/Table.js
1171
+ var Table = __webpack_require__(4707);
1172
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableBody.js
1173
+ var TableBody = __webpack_require__(1566);
1174
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableRow.js
1175
+ var TableRow = __webpack_require__(6037);
1176
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableCell.js
1177
+ var TableCell = __webpack_require__(3111);
1178
+ // EXTERNAL MODULE: ../components/dist/atoms/Price/Price.js
1179
+ var Price = __webpack_require__(7549);
1180
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ShippingSimulation/ShippingSimulation.js
1181
+
1182
+
1183
+ function ShippingSimulation({ testId = 'fs-shipping-simulation', formatter, title = 'Shipping', inputLabel = 'Postal Code', optionsLabel = 'Shipping options', idkPostalCodeLinkProps, onInput, onSubmit, onClear, location, options = [], displayClearButton = false, errorMessage, postalCode, ...otherProps }) {
1184
+ const hasShippingOptions = !!options && options.length > 0;
1185
+ return (external_react_default().createElement("section", { "data-fs-shipping-simulation": true, "data-fs-shipping-simulation-empty": !hasShippingOptions ? 'true' : 'false', "data-testid": testId, ...otherProps },
1186
+ external_react_default().createElement("h2", { "data-fs-shipping-simulation-title": true }, title),
1187
+ external_react_default().createElement(InputField/* default */.Z, { actionable: true, error: errorMessage, id: `${testId}-input-field`, label: inputLabel, value: postalCode, onInput: (event) => onInput?.(event), onSubmit: () => onSubmit?.(), onClear: () => onClear?.(), displayClearButton: displayClearButton }),
1188
+ external_react_default().createElement(Link/* default */.Z, { href: "/", "data-fs-shipping-simulation-link": true, size: "small", ...idkPostalCodeLinkProps }, idkPostalCodeLinkProps?.children ?? (external_react_default().createElement((external_react_default()).Fragment, null,
1189
+ "I don't know my Postal Code",
1190
+ external_react_default().createElement(Icon/* default */.Z, { name: "ArrowSquareOut", width: 20, height: 20 })))),
1191
+ hasShippingOptions && (external_react_default().createElement((external_react_default()).Fragment, null,
1192
+ external_react_default().createElement("header", { "data-fs-shipping-simulation-header": true },
1193
+ external_react_default().createElement("h3", { "data-fs-shipping-simulation-subtitle": true }, optionsLabel),
1194
+ external_react_default().createElement("p", { "data-fs-shipping-simulation-location": true }, location)),
1195
+ external_react_default().createElement(Table/* default */.Z, null,
1196
+ external_react_default().createElement(TableBody/* default */.Z, null, options.map((option) => (external_react_default().createElement(TableRow/* default */.Z, { key: option.carrier },
1197
+ external_react_default().createElement(TableCell/* default */.Z, { align: "left" }, option.carrier),
1198
+ external_react_default().createElement(TableCell/* default */.Z, null, option.localizedEstimates),
1199
+ external_react_default().createElement(TableCell/* default */.Z, { align: "right" }, option.price && (external_react_default().createElement(Price/* default */.Z, { formatter: formatter, value: option.price, SRText: "price" }))))))))))));
1200
+ }
1201
+ /* harmony default export */ const ShippingSimulation_ShippingSimulation = (ShippingSimulation);
1202
+ //# sourceMappingURL=ShippingSimulation.js.map
1203
+ // EXTERNAL MODULE: ./src/sdk/graphql/request.ts
1204
+ var request = __webpack_require__(180);
1205
+ ;// CONCATENATED MODULE: ./src/sdk/shipping/index.ts
1206
+
1207
+ const query = "ShippingSimulationQuery";
1208
+ const getShippingSimulation = async ({
1209
+ items,
1210
+ postalCode,
1211
+ country
1212
+ }) => {
1213
+ const data = await (0,request/* request */.W)(query, {
1214
+ items,
1215
+ postalCode,
1216
+ country
1217
+ });
1218
+ return data.shipping;
1219
+ };
1220
+ /* harmony default export */ const shipping = ((/* unused pure expression or super */ null && (getShippingSimulation)));
1221
+ // EXTERNAL MODULE: ./src/sdk/session/index.ts + 1 modules
1222
+ var session = __webpack_require__(7295);
1223
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/useShippingSimulation.ts
1224
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1225
+
1226
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1227
+
1228
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1229
+
1230
+
1231
+
1232
+ const createEmptySimulation = () => ({
1233
+ input: {
1234
+ postalCode: '',
1235
+ displayClearButton: false,
1236
+ errorMessage: ''
1237
+ },
1238
+ shippingSimulation: {
1239
+ location: '',
1240
+ options: []
1241
+ }
1242
+ });
1243
+
1244
+ const reducer = (state, action) => {
1245
+ const {
1246
+ type
1247
+ } = action;
1248
+
1249
+ switch (type) {
1250
+ case 'clear':
1251
+ {
1252
+ return createEmptySimulation();
1253
+ }
1254
+
1255
+ case 'update':
1256
+ {
1257
+ const {
1258
+ payload
1259
+ } = action;
1260
+ return {
1261
+ input: _objectSpread(_objectSpread({}, state.input), payload.input),
1262
+ shippingSimulation: _objectSpread(_objectSpread({}, state.shippingSimulation), payload.shippingSimulation)
1263
+ };
1264
+ }
1265
+
1266
+ case 'onInput':
1267
+ {
1268
+ const {
1269
+ payload
1270
+ } = action;
1271
+ return _objectSpread(_objectSpread({}, state), {}, {
1272
+ input: _objectSpread({}, payload)
1273
+ });
1274
+ }
1275
+
1276
+ case 'onError':
1277
+ {
1278
+ const {
1279
+ payload
1280
+ } = action;
1281
+ return _objectSpread(_objectSpread({}, state), {}, {
1282
+ input: _objectSpread(_objectSpread({}, state.input), payload)
1283
+ });
1284
+ }
1285
+
1286
+ default:
1287
+ throw new Error(`Action ${type} not implemented`);
1288
+ }
1289
+ };
1290
+
1291
+ const useShippingSimulation = (shippingItem, fetchShippingSimulationFn, sessionPostalCode, country) => {
1292
+ const {
1293
+ 0: {
1294
+ input,
1295
+ shippingSimulation
1296
+ },
1297
+ 1: dispatch
1298
+ } = (0,external_react_.useReducer)(reducer, null, createEmptySimulation);
1299
+ const {
1300
+ postalCode: shippingPostalCode
1301
+ } = input;
1302
+ (0,external_react_.useEffect)(() => {
1303
+ if (!sessionPostalCode || shippingPostalCode) {
1304
+ return;
1305
+ } // Use sessionPostalCode if there is no shippingPostalCode
1306
+
1307
+
1308
+ async function fetchShipping() {
1309
+ const [location, options] = await fetchShippingSimulationFn(shippingItem, country, sessionPostalCode ?? '');
1310
+ dispatch({
1311
+ type: 'update',
1312
+ payload: {
1313
+ input: {
1314
+ postalCode: sessionPostalCode ?? '',
1315
+ displayClearButton: true,
1316
+ errorMessage: ''
1317
+ },
1318
+ shippingSimulation: {
1319
+ location,
1320
+ options
1321
+ }
1322
+ }
1323
+ });
1324
+ }
1325
+
1326
+ fetchShipping();
1327
+ }, [country, fetchShippingSimulationFn, sessionPostalCode, shippingItem, shippingPostalCode]);
1328
+ const handleSubmit = (0,external_react_.useCallback)(async () => {
1329
+ try {
1330
+ const [location, options] = await fetchShippingSimulationFn(shippingItem, country, shippingPostalCode ?? '');
1331
+ dispatch({
1332
+ type: 'update',
1333
+ payload: {
1334
+ input: {
1335
+ displayClearButton: true,
1336
+ errorMessage: ''
1337
+ },
1338
+ shippingSimulation: {
1339
+ location,
1340
+ options
1341
+ }
1342
+ }
1343
+ });
1344
+ } catch (error) {
1345
+ dispatch({
1346
+ type: 'onError',
1347
+ payload: {
1348
+ displayClearButton: true,
1349
+ errorMessage: 'You entered an invalid Postal Code'
1350
+ }
1351
+ });
1352
+ }
1353
+ }, [country, fetchShippingSimulationFn, shippingItem, shippingPostalCode]);
1354
+ const handleOnInput = (0,external_react_.useCallback)(e => {
1355
+ const currentValue = e.currentTarget.value;
1356
+
1357
+ if (currentValue) {
1358
+ dispatch({
1359
+ type: 'onInput',
1360
+ payload: {
1361
+ postalCode: currentValue,
1362
+ displayClearButton: false,
1363
+ errorMessage: ''
1364
+ }
1365
+ });
1366
+ } else {
1367
+ dispatch({
1368
+ type: 'clear'
1369
+ });
1370
+ }
1371
+ }, []);
1372
+ return {
1373
+ input,
1374
+ shippingSimulation,
1375
+ handleOnClear: () => {
1376
+ dispatch({
1377
+ type: 'clear'
1378
+ });
1379
+ },
1380
+ handleSubmit,
1381
+ handleOnInput
1382
+ };
1383
+ };
1384
+ // EXTERNAL MODULE: external "react/jsx-runtime"
1385
+ var jsx_runtime_ = __webpack_require__(997);
1386
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/ShippingSimulation.tsx
1387
+ const _excluded = ["productShippingInfo", "formatter"];
1388
+
1389
+ function ShippingSimulation_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1390
+
1391
+ function ShippingSimulation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ShippingSimulation_ownKeys(Object(source), !0).forEach(function (key) { ShippingSimulation_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ShippingSimulation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1392
+
1393
+ function ShippingSimulation_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1394
+
1395
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1396
+
1397
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+ const fetchShippingSimulation = async (shippingItem, country, postalCode) => {
1406
+ const shipping = await getShippingSimulation({
1407
+ country,
1408
+ postalCode: postalCode,
1409
+ items: [shippingItem]
1410
+ });
1411
+ const location = [shipping?.address?.neighborhood, shipping?.address?.city].filter(Boolean).join(' / ') ?? '';
1412
+ const options = shipping?.logisticsInfo?.[0]?.slas ?? [];
1413
+ return [location, options];
1414
+ };
1415
+
1416
+ function ShippingSimulation_ShippingSimulation_ShippingSimulation(_ref) {
1417
+ let {
1418
+ productShippingInfo,
1419
+ formatter
1420
+ } = _ref,
1421
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1422
+
1423
+ const {
1424
+ country,
1425
+ postalCode: sessionPostalCode
1426
+ } = (0,session/* useSession */.kP)();
1427
+ const {
1428
+ input,
1429
+ shippingSimulation,
1430
+ handleSubmit,
1431
+ handleOnInput,
1432
+ handleOnClear
1433
+ } = useShippingSimulation(productShippingInfo, fetchShippingSimulation, sessionPostalCode, country);
1434
+ const {
1435
+ postalCode,
1436
+ displayClearButton,
1437
+ errorMessage
1438
+ } = input;
1439
+ const {
1440
+ location,
1441
+ options
1442
+ } = shippingSimulation;
1443
+ return /*#__PURE__*/jsx_runtime_.jsx(ShippingSimulation_ShippingSimulation, ShippingSimulation_objectSpread({
1444
+ formatter: formatter,
1445
+ onInput: handleOnInput,
1446
+ onSubmit: handleSubmit,
1447
+ onClear: handleOnClear,
1448
+ location: location,
1449
+ options: options,
1450
+ displayClearButton: displayClearButton,
1451
+ errorMessage: errorMessage,
1452
+ postalCode: postalCode
1453
+ }, otherProps));
1454
+ }
1455
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/index.ts
1456
+
1457
+
1458
+ /***/ }),
1459
+
1460
+ /***/ 4475:
1461
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1462
+
1463
+ "use strict";
1464
+
1465
+ // EXPORTS
1466
+ __webpack_require__.d(__webpack_exports__, {
1467
+ "Z": () => (/* reexport */ SkuSelector_Selectors)
1468
+ });
1469
+
1470
+ // EXTERNAL MODULE: external "react"
1471
+ var external_react_ = __webpack_require__(6689);
1472
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1473
+ // EXTERNAL MODULE: ../components/dist/atoms/Label/Label.js
1474
+ var Label = __webpack_require__(7216);
1475
+ // EXTERNAL MODULE: ../components/dist/atoms/Link/Link.js
1476
+ var Link = __webpack_require__(7865);
1477
+ // EXTERNAL MODULE: ../components/dist/atoms/SROnly/SROnly.js
1478
+ var SROnly = __webpack_require__(2691);
1479
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/useDefineVariant.js
1480
+
1481
+ const getImageName = (src) => {
1482
+ const sourcePath = new URL(src).pathname;
1483
+ const imageName = sourcePath.split('/').slice(-1)[0];
1484
+ return imageName;
1485
+ };
1486
+ const useDefineVariant = (options, variant) => (0,external_react_.useMemo)(() => {
1487
+ if (variant)
1488
+ return variant;
1489
+ const allOptionsHaveHexColor = options.every((option) => option.hexColor);
1490
+ if (allOptionsHaveHexColor) {
1491
+ return 'color';
1492
+ }
1493
+ const firstImageName = options[0]?.src && getImageName(options[0].src);
1494
+ const areSourcesEqualsOrNull = options.every((option) => {
1495
+ if (!option.src) {
1496
+ return true;
1497
+ }
1498
+ const optionImageName = getImageName(option.src);
1499
+ return optionImageName === firstImageName;
1500
+ });
1501
+ if (!areSourcesEqualsOrNull) {
1502
+ return 'image';
1503
+ }
1504
+ return 'label';
1505
+ }, [options, variant]);
1506
+ //# sourceMappingURL=useDefineVariant.js.map
1507
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/useSkuSlug.js
1508
+
1509
+ function getSkuSlug(slugsMap, selectedVariations, dominantVariation) {
1510
+ const slugsMapKey = Object.entries(selectedVariations).flat().join('-');
1511
+ if (slugsMapKey in slugsMap) {
1512
+ return slugsMap[slugsMapKey];
1513
+ }
1514
+ const possibleVariants = Object.keys(slugsMap);
1515
+ const firstVariationForDominantValue = possibleVariants.find((slug) => slug.includes(`${dominantVariation}-${selectedVariations[dominantVariation]}`));
1516
+ return slugsMap[firstVariationForDominantValue ?? possibleVariants[0]];
1517
+ }
1518
+ const useSkuSlug = (activeVariations, slugsMap, skuPropertyName, getItemHrefProp) => {
1519
+ const getItemHref = (0,external_react_.useCallback)((option) => {
1520
+ if (getItemHrefProp)
1521
+ return { getItemHrefProp };
1522
+ const currentItemHref = `/${getSkuSlug(slugsMap, {
1523
+ ...activeVariations,
1524
+ [skuPropertyName]: option.value,
1525
+ }, skuPropertyName)}/p`;
1526
+ return currentItemHref;
1527
+ }, [activeVariations, getItemHrefProp, slugsMap, skuPropertyName]);
1528
+ return { getItemHref };
1529
+ };
1530
+ //# sourceMappingURL=useSkuSlug.js.map
1531
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/SkuSelector.js
1532
+
1533
+
1534
+
1535
+
1536
+ // TODO: Change by ImageComponent when it be right
1537
+ const ImageComponentFallback = ({ src, alt, ...otherProps }) => external_react_default().createElement("img", { src: src, alt: alt, ...otherProps });
1538
+ const SkuSelector = (0,external_react_.forwardRef)(function SkuSelector({ availableVariations, skuPropertyName, testId, activeVariations, linkProps, slugsMap, getItemHref: getItemHrefProp, ImageComponent = ImageComponentFallback, variant: variantProp, ...otherProps }, ref) {
1539
+ const activeSelectorValue = activeVariations[skuPropertyName];
1540
+ const options = availableVariations[skuPropertyName];
1541
+ const variant = useDefineVariant(options, variantProp);
1542
+ const { getItemHref } = useSkuSlug(activeVariations, slugsMap, skuPropertyName, getItemHrefProp);
1543
+ return (external_react_default().createElement("div", { ref: ref, "data-fs-sku-selector": true, "data-testid": testId, "data-fs-sku-selector-variant": variant, ...otherProps },
1544
+ skuPropertyName && (external_react_default().createElement(Label/* default */.Z, { "data-fs-sku-selector-title": true },
1545
+ skuPropertyName,
1546
+ ": ",
1547
+ external_react_default().createElement("strong", null, activeSelectorValue))),
1548
+ external_react_default().createElement("ul", { "data-fs-sku-selector-list": true }, options.map((option, index) => {
1549
+ return (external_react_default().createElement("li", { key: String(index), title: option.label, "data-fs-sku-selector-option": true, "data-fs-sku-selector-disabled": option.disabled, "data-fs-sku-selector-checked": option.value === activeVariations[skuPropertyName] },
1550
+ external_react_default().createElement(Link/* default */.Z, { "data-fs-sku-selector-option-link": true, href: getItemHref(option), ...linkProps },
1551
+ external_react_default().createElement(SROnly/* default */.Z, { text: option.label })),
1552
+ variant === 'label' && external_react_default().createElement("span", null, option.value),
1553
+ variant === 'image' && ImageComponent && (external_react_default().createElement("span", null,
1554
+ external_react_default().createElement(ImageComponent, { src: option.src ?? '', alt: option.alt ?? '', "data-fs-sku-selector-option-image": true }))),
1555
+ variant === 'color' && (external_react_default().createElement("span", null,
1556
+ external_react_default().createElement("div", { "data-fs-sku-selector-option-color": true, title: option.value, style: {
1557
+ '--data-fs-sku-selector-option-color-bkg-color': option.hexColor,
1558
+ } })))));
1559
+ }))));
1560
+ });
1561
+ /* harmony default export */ const SkuSelector_SkuSelector = (SkuSelector);
1562
+ //# sourceMappingURL=SkuSelector.js.map
1563
+ // EXTERNAL MODULE: ./node_modules/next/link.js
1564
+ var next_link = __webpack_require__(1664);
1565
+ var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
1566
+ // EXTERNAL MODULE: ./src/components/ui/Image/index.ts + 2 modules
1567
+ var Image = __webpack_require__(9266);
1568
+ // EXTERNAL MODULE: external "react/jsx-runtime"
1569
+ var jsx_runtime_ = __webpack_require__(997);
1570
+ ;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/Selectors.tsx
1571
+ const _excluded = ["src", "alt"],
1572
+ _excluded2 = ["slugsMap", "activeVariations", "availableVariations"];
1573
+
1574
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1575
+
1576
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1577
+
1578
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1579
+
1580
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1581
+
1582
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+ const ImageComponent = _ref => {
1590
+ let {
1591
+ src,
1592
+ alt
1593
+ } = _ref,
1594
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1595
+
1596
+ return /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, _objectSpread({
1597
+ src: src,
1598
+ alt: alt,
1599
+ width: 34,
1600
+ height: 34
1601
+ }, otherProps));
1602
+ };
1603
+
1604
+ function Selectors(_ref2) {
1605
+ let {
1606
+ slugsMap,
1607
+ activeVariations,
1608
+ availableVariations
1609
+ } = _ref2,
1610
+ otherProps = _objectWithoutProperties(_ref2, _excluded2);
1611
+
1612
+ return /*#__PURE__*/jsx_runtime_.jsx("section", _objectSpread(_objectSpread({}, otherProps), {}, {
1613
+ children: availableVariations && Object.keys(availableVariations).map(skuVariant => /*#__PURE__*/jsx_runtime_.jsx(SkuSelector_SkuSelector, {
1614
+ skuPropertyName: skuVariant,
1615
+ availableVariations: availableVariations,
1616
+ ImageComponent: ImageComponent,
1617
+ activeVariations: activeVariations,
1618
+ slugsMap: slugsMap,
1619
+ linkProps: {
1620
+ as: (link_default()),
1621
+ legacyBehavior: false
1622
+ }
1623
+ }, skuVariant))
1624
+ }));
1625
+ }
1626
+
1627
+ /* harmony default export */ const SkuSelector_Selectors = (Selectors);
1628
+ ;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/index.ts
1629
+
1630
+
1631
+ /***/ }),
1632
+
1633
+ /***/ 4601:
1634
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
1635
+
1636
+ "use strict";
1637
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1638
+ __webpack_require__.r(__webpack_exports__);
1639
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1640
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
1641
+ /* harmony export */ "getStaticPaths": () => (/* binding */ getStaticPaths),
1642
+ /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
1643
+ /* harmony export */ });
1644
+ /* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4826);
1645
+ /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6641);
1646
+ /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_seo__WEBPACK_IMPORTED_MODULE_1__);
1647
+ /* harmony import */ var src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2224);
1648
+ /* harmony import */ var src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2951);
1649
+ /* harmony import */ var src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7990);
1650
+ /* harmony import */ var src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3220);
1651
+ /* harmony import */ var src_customizations_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(859);
1652
+ /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7295);
1653
+ /* harmony import */ var src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2541);
1654
+ /* harmony import */ var src_server__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9685);
1655
+ /* harmony import */ var src_server_cms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5764);
1656
+ /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7183);
1657
+ /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_11__);
1658
+ /* harmony import */ var src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4074);
1659
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(997);
1660
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);
1661
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_2__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__, src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__, src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_server__WEBPACK_IMPORTED_MODULE_9__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__]);
1662
+ ([src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_2__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__, src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__, src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_server__WEBPACK_IMPORTED_MODULE_9__, src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
1663
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1664
+
1665
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1666
+
1667
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+ /**
1683
+ * Sections: Components imported from each store's custom components and '../components/sections' only.
1684
+ * Do not import or render components from any other folder in here.
1685
+ */
1686
+
1687
+
1688
+
1689
+
1690
+ const COMPONENTS = _objectSpread({
1691
+ ProductDetails: src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z,
1692
+ CrossSellingShelf: src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z,
1693
+ BannerNewsletter: src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
1694
+ }, src_customizations_components__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z);
1695
+
1696
+ function Page({
1697
+ product,
1698
+ sections,
1699
+ globalSections
1700
+ }) {
1701
+ const {
1702
+ currency
1703
+ } = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_7__/* .useSession */ .kP)();
1704
+ const {
1705
+ seo
1706
+ } = product;
1707
+ const title = seo.title || (_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().seo.title);
1708
+ const description = seo.description || (_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().seo.description);
1709
+ const canonical = `${(_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().storeUrl)}${seo.canonical}`;
1710
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, _objectSpread(_objectSpread({}, globalSections), {}, {
1711
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.NextSeo, {
1712
+ title: title,
1713
+ description: description,
1714
+ canonical: canonical,
1715
+ openGraph: {
1716
+ type: 'og:product',
1717
+ url: canonical,
1718
+ title,
1719
+ description,
1720
+ images: product.image.map(img => ({
1721
+ url: img.url,
1722
+ alt: img.alternateName
1723
+ }))
1724
+ },
1725
+ additionalMetaTags: [{
1726
+ property: 'product:price:amount',
1727
+ content: product.offers.lowPrice?.toString() ?? undefined
1728
+ }, {
1729
+ property: 'product:price:currency',
1730
+ content: currency.code
1731
+ }]
1732
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.BreadcrumbJsonLd, {
1733
+ itemListElements: product.breadcrumbList.itemListElement
1734
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.ProductJsonLd, {
1735
+ productName: product.name,
1736
+ description: product.description,
1737
+ brand: product.brand.name,
1738
+ sku: product.sku,
1739
+ gtin: product.gtin,
1740
+ releaseDate: product.releaseDate,
1741
+ images: product.image.map(img => img.url) // Somehow, Google does not understand this valid Schema.org schema, so we need to do conversions
1742
+ ,
1743
+ offersType: "AggregateOffer",
1744
+ offers: _objectSpread(_objectSpread(_objectSpread({}, product.offers), product.offers.offers[0]), {}, {
1745
+ url: canonical
1746
+ })
1747
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx(src_components_cms_RenderSections__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
1748
+ context: product,
1749
+ sections: sections,
1750
+ components: COMPONENTS
1751
+ })]
1752
+ }));
1753
+ }
1754
+
1755
+ const query = "ServerProductPageQuery";
1756
+ const getStaticProps = async ({
1757
+ params,
1758
+ previewData
1759
+ }) => {
1760
+ const slug = params?.slug ?? '';
1761
+ const [cmsPage, searchResult] = await Promise.all([(0,src_server_cms__WEBPACK_IMPORTED_MODULE_10__/* .getPage */ .f)(_objectSpread(_objectSpread({}, previewData?.contentType === 'pdp' ? previewData : null), {}, {
1762
+ contentType: 'pdp'
1763
+ })), (0,src_server__WEBPACK_IMPORTED_MODULE_9__/* .execute */ .h)({
1764
+ variables: {
1765
+ slug
1766
+ },
1767
+ operationName: query
1768
+ })]);
1769
+ const {
1770
+ data,
1771
+ errors = []
1772
+ } = searchResult;
1773
+ const notFound = errors.find(_faststore_api__WEBPACK_IMPORTED_MODULE_0__.isNotFoundError);
1774
+
1775
+ if (notFound) {
1776
+ return {
1777
+ notFound: true
1778
+ };
1779
+ }
1780
+
1781
+ if (errors.length > 0) {
1782
+ throw errors[0];
1783
+ }
1784
+
1785
+ const globalSections = await (0,src_components_cms_GlobalSections__WEBPACK_IMPORTED_MODULE_12__/* .getGlobalSectionsData */ .Tc)(previewData);
1786
+ return {
1787
+ props: _objectSpread(_objectSpread(_objectSpread({}, data), cmsPage), {}, {
1788
+ globalSections
1789
+ })
1790
+ };
1791
+ };
1792
+ const getStaticPaths = async () => {
1793
+ return {
1794
+ paths: [],
1795
+ fallback: 'blocking'
1796
+ };
1797
+ };
1798
+ Page.displayName = 'Page';
1799
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_8__/* .mark */ .B)(Page));
1800
+ __webpack_async_result__();
1801
+ } catch(e) { __webpack_async_result__(e); } });
1802
+
1803
+ /***/ }),
1804
+
1805
+ /***/ 8892:
1806
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1807
+
1808
+ "use strict";
1809
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1810
+ /* harmony export */ "Q": () => (/* binding */ useBuyButton)
1811
+ /* harmony export */ });
1812
+ /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1072);
1813
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
1814
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1815
+ /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7295);
1816
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(395);
1817
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6073);
1818
+
1819
+
1820
+
1821
+
1822
+
1823
+ const useBuyButton = item => {
1824
+ const {
1825
+ openCart
1826
+ } = (0,_faststore_ui__WEBPACK_IMPORTED_MODULE_3__/* .useUI */ .l)();
1827
+ const {
1828
+ currency: {
1829
+ code
1830
+ }
1831
+ } = (0,_session__WEBPACK_IMPORTED_MODULE_1__/* .useSession */ .kP)();
1832
+ const onClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(e => {
1833
+ e.preventDefault();
1834
+
1835
+ if (!item) {
1836
+ return;
1837
+ }
1838
+
1839
+ (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_4__/* .sendAnalyticsEvent */ ._)({
1840
+ name: 'add_to_cart',
1841
+ params: {
1842
+ currency: code,
1843
+ // TODO: In the future, we can explore more robust ways of
1844
+ // calculating the value (gift items, discounts, etc.).
1845
+ value: item.price * item.quantity,
1846
+ items: [{
1847
+ item_id: item.itemOffered.isVariantOf.productGroupID,
1848
+ item_name: item.itemOffered.isVariantOf.name,
1849
+ item_brand: item.itemOffered.brand.name,
1850
+ item_variant: item.itemOffered.sku,
1851
+ quantity: item.quantity,
1852
+ price: item.price,
1853
+ discount: item.listPrice - item.price,
1854
+ currency: code,
1855
+ item_variant_name: item.itemOffered.name,
1856
+ product_reference_id: item.itemOffered.gtin
1857
+ }]
1858
+ }
1859
+ });
1860
+ _index__WEBPACK_IMPORTED_MODULE_2__/* .cartStore.addItem */ .i8.addItem(item);
1861
+ openCart();
1862
+ }, [code, item, openCart]);
1863
+ return {
1864
+ onClick,
1865
+ 'data-testid': 'buy-button',
1866
+ 'data-sku': item?.itemOffered.sku,
1867
+ 'data-seller': item?.seller.identifier
1868
+ };
1869
+ };
1870
+
1871
+ /***/ }),
1872
+
1873
+ /***/ 3874:
1874
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
1875
+
1876
+ "use strict";
1877
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1878
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1879
+ /* harmony export */ "i": () => (/* binding */ useProduct)
1880
+ /* harmony export */ });
1881
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
1882
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1883
+ /* harmony import */ var _graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7732);
1884
+ /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7295);
1885
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__]);
1886
+ _graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
1887
+
1888
+
1889
+
1890
+ const query = "BrowserProductQuery";
1891
+ const useProduct = (productID, fallbackData) => {
1892
+ const {
1893
+ channel,
1894
+ locale
1895
+ } = (0,_session__WEBPACK_IMPORTED_MODULE_2__/* .useSession */ .kP)();
1896
+ const variables = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
1897
+ if (!channel) {
1898
+ throw new Error(`useProduct: 'channel' from session is an empty string.`);
1899
+ }
1900
+
1901
+ return {
1902
+ locator: [{
1903
+ key: 'id',
1904
+ value: productID
1905
+ }, {
1906
+ key: 'channel',
1907
+ value: channel
1908
+ }, {
1909
+ key: 'locale',
1910
+ value: locale
1911
+ }]
1912
+ };
1913
+ }, [channel, locale, productID]);
1914
+ return (0,_graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__/* .useQuery */ .aM)(query, variables, {
1915
+ fallbackData,
1916
+ revalidateOnMount: true
1917
+ });
1918
+ };
1919
+ __webpack_async_result__();
1920
+ } catch(e) { __webpack_async_result__(e); } });
1921
+
1922
+ /***/ }),
1923
+
1924
+ /***/ 5411:
1925
+ /***/ ((module) => {
1926
+
1927
+ // Exports
1928
+ module.exports = {
1929
+ "section": "section_section__pVnFl"
1930
+ };
1931
+
1932
+
1933
+ /***/ }),
1934
+
1935
+ /***/ 9034:
1936
+ /***/ ((module) => {
1937
+
1938
+ // Exports
1939
+ module.exports = {
1940
+ "section": "section_section__XsOoR"
1941
+ };
1942
+
1943
+
1944
+ /***/ }),
1945
+
1946
+ /***/ 5490:
1947
+ /***/ ((module) => {
1948
+
1949
+ "use strict";
1950
+ module.exports = require("@faststore/graphql-utils");
1951
+
1952
+ /***/ }),
1953
+
1954
+ /***/ 6676:
1955
+ /***/ ((module) => {
1956
+
1957
+ "use strict";
1958
+ module.exports = require("@vtex/client-cms");
1959
+
1960
+ /***/ }),
1961
+
1962
+ /***/ 2404:
1963
+ /***/ ((module) => {
1964
+
1965
+ "use strict";
1966
+ module.exports = require("fast-deep-equal");
1967
+
1968
+ /***/ }),
1969
+
1970
+ /***/ 7343:
1971
+ /***/ ((module) => {
1972
+
1973
+ "use strict";
1974
+ module.exports = require("graphql");
1975
+
1976
+ /***/ }),
1977
+
1978
+ /***/ 6548:
1979
+ /***/ ((module) => {
1980
+
1981
+ "use strict";
1982
+ module.exports = require("graphql/language");
1983
+
1984
+ /***/ }),
1985
+
1986
+ /***/ 3430:
1987
+ /***/ ((module) => {
1988
+
1989
+ "use strict";
1990
+ module.exports = require("idb-keyval");
1991
+
1992
+ /***/ }),
1993
+
1994
+ /***/ 7881:
1995
+ /***/ ((module) => {
1996
+
1997
+ "use strict";
1998
+ module.exports = require("isomorphic-unfetch");
1999
+
2000
+ /***/ }),
2001
+
2002
+ /***/ 6641:
2003
+ /***/ ((module) => {
2004
+
2005
+ "use strict";
2006
+ module.exports = require("next-seo");
2007
+
2008
+ /***/ }),
2009
+
2010
+ /***/ 3280:
2011
+ /***/ ((module) => {
2012
+
2013
+ "use strict";
2014
+ module.exports = require("next/dist/shared/lib/app-router-context.js");
2015
+
2016
+ /***/ }),
2017
+
2018
+ /***/ 2796:
2019
+ /***/ ((module) => {
2020
+
2021
+ "use strict";
2022
+ module.exports = require("next/dist/shared/lib/head-manager-context.js");
2023
+
2024
+ /***/ }),
2025
+
2026
+ /***/ 4957:
2027
+ /***/ ((module) => {
2028
+
2029
+ "use strict";
2030
+ module.exports = require("next/dist/shared/lib/head.js");
2031
+
2032
+ /***/ }),
2033
+
2034
+ /***/ 3539:
2035
+ /***/ ((module) => {
2036
+
2037
+ "use strict";
2038
+ module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
2039
+
2040
+ /***/ }),
2041
+
2042
+ /***/ 4014:
2043
+ /***/ ((module) => {
2044
+
2045
+ "use strict";
2046
+ module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
2047
+
2048
+ /***/ }),
2049
+
2050
+ /***/ 4486:
2051
+ /***/ ((module) => {
2052
+
2053
+ "use strict";
2054
+ module.exports = require("next/dist/shared/lib/image-blur-svg.js");
2055
+
2056
+ /***/ }),
2057
+
2058
+ /***/ 744:
2059
+ /***/ ((module) => {
2060
+
2061
+ "use strict";
2062
+ module.exports = require("next/dist/shared/lib/image-config-context.js");
2063
+
2064
+ /***/ }),
2065
+
2066
+ /***/ 5843:
2067
+ /***/ ((module) => {
2068
+
2069
+ "use strict";
2070
+ module.exports = require("next/dist/shared/lib/image-config.js");
2071
+
2072
+ /***/ }),
2073
+
2074
+ /***/ 8524:
2075
+ /***/ ((module) => {
2076
+
2077
+ "use strict";
2078
+ module.exports = require("next/dist/shared/lib/is-plain-object.js");
2079
+
2080
+ /***/ }),
2081
+
2082
+ /***/ 8020:
2083
+ /***/ ((module) => {
2084
+
2085
+ "use strict";
2086
+ module.exports = require("next/dist/shared/lib/mitt.js");
2087
+
2088
+ /***/ }),
2089
+
2090
+ /***/ 4406:
2091
+ /***/ ((module) => {
2092
+
2093
+ "use strict";
2094
+ module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
2095
+
2096
+ /***/ }),
2097
+
2098
+ /***/ 4964:
2099
+ /***/ ((module) => {
2100
+
2101
+ "use strict";
2102
+ module.exports = require("next/dist/shared/lib/router-context.js");
2103
+
2104
+ /***/ }),
2105
+
2106
+ /***/ 3431:
2107
+ /***/ ((module) => {
2108
+
2109
+ "use strict";
2110
+ module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
2111
+
2112
+ /***/ }),
2113
+
2114
+ /***/ 1751:
2115
+ /***/ ((module) => {
2116
+
2117
+ "use strict";
2118
+ module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
2119
+
2120
+ /***/ }),
2121
+
2122
+ /***/ 6220:
2123
+ /***/ ((module) => {
2124
+
2125
+ "use strict";
2126
+ module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
2127
+
2128
+ /***/ }),
2129
+
2130
+ /***/ 299:
2131
+ /***/ ((module) => {
2132
+
2133
+ "use strict";
2134
+ module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
2135
+
2136
+ /***/ }),
2137
+
2138
+ /***/ 3938:
2139
+ /***/ ((module) => {
2140
+
2141
+ "use strict";
2142
+ module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
2143
+
2144
+ /***/ }),
2145
+
2146
+ /***/ 9565:
2147
+ /***/ ((module) => {
2148
+
2149
+ "use strict";
2150
+ module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
2151
+
2152
+ /***/ }),
2153
+
2154
+ /***/ 5789:
2155
+ /***/ ((module) => {
2156
+
2157
+ "use strict";
2158
+ module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
2159
+
2160
+ /***/ }),
2161
+
2162
+ /***/ 1897:
2163
+ /***/ ((module) => {
2164
+
2165
+ "use strict";
2166
+ module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
2167
+
2168
+ /***/ }),
2169
+
2170
+ /***/ 1428:
2171
+ /***/ ((module) => {
2172
+
2173
+ "use strict";
2174
+ module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
2175
+
2176
+ /***/ }),
2177
+
2178
+ /***/ 8854:
2179
+ /***/ ((module) => {
2180
+
2181
+ "use strict";
2182
+ module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
2183
+
2184
+ /***/ }),
2185
+
2186
+ /***/ 1292:
2187
+ /***/ ((module) => {
2188
+
2189
+ "use strict";
2190
+ module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
2191
+
2192
+ /***/ }),
2193
+
2194
+ /***/ 4567:
2195
+ /***/ ((module) => {
2196
+
2197
+ "use strict";
2198
+ module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
2199
+
2200
+ /***/ }),
2201
+
2202
+ /***/ 979:
2203
+ /***/ ((module) => {
2204
+
2205
+ "use strict";
2206
+ module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
2207
+
2208
+ /***/ }),
2209
+
2210
+ /***/ 3297:
2211
+ /***/ ((module) => {
2212
+
2213
+ "use strict";
2214
+ module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
2215
+
2216
+ /***/ }),
2217
+
2218
+ /***/ 6052:
2219
+ /***/ ((module) => {
2220
+
2221
+ "use strict";
2222
+ module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
2223
+
2224
+ /***/ }),
2225
+
2226
+ /***/ 4226:
2227
+ /***/ ((module) => {
2228
+
2229
+ "use strict";
2230
+ module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
2231
+
2232
+ /***/ }),
2233
+
2234
+ /***/ 5052:
2235
+ /***/ ((module) => {
2236
+
2237
+ "use strict";
2238
+ module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
2239
+
2240
+ /***/ }),
2241
+
2242
+ /***/ 9232:
2243
+ /***/ ((module) => {
2244
+
2245
+ "use strict";
2246
+ module.exports = require("next/dist/shared/lib/utils.js");
2247
+
2248
+ /***/ }),
2249
+
2250
+ /***/ 1853:
2251
+ /***/ ((module) => {
2252
+
2253
+ "use strict";
2254
+ module.exports = require("next/router");
2255
+
2256
+ /***/ }),
2257
+
2258
+ /***/ 5471:
2259
+ /***/ ((module) => {
2260
+
2261
+ "use strict";
2262
+ module.exports = require("p-limit");
2263
+
2264
+ /***/ }),
2265
+
2266
+ /***/ 6689:
2267
+ /***/ ((module) => {
2268
+
2269
+ "use strict";
2270
+ module.exports = require("react");
2271
+
2272
+ /***/ }),
2273
+
2274
+ /***/ 6405:
2275
+ /***/ ((module) => {
2276
+
2277
+ "use strict";
2278
+ module.exports = require("react-dom");
2279
+
2280
+ /***/ }),
2281
+
2282
+ /***/ 9785:
2283
+ /***/ ((module) => {
2284
+
2285
+ "use strict";
2286
+ module.exports = require("react-intersection-observer");
2287
+
2288
+ /***/ }),
2289
+
2290
+ /***/ 3789:
2291
+ /***/ ((module) => {
2292
+
2293
+ "use strict";
2294
+ module.exports = require("react-swipeable");
2295
+
2296
+ /***/ }),
2297
+
2298
+ /***/ 997:
2299
+ /***/ ((module) => {
2300
+
2301
+ "use strict";
2302
+ module.exports = require("react/jsx-runtime");
2303
+
2304
+ /***/ }),
2305
+
2306
+ /***/ 3823:
2307
+ /***/ ((module) => {
2308
+
2309
+ "use strict";
2310
+ module.exports = require("tabbable");
2311
+
2312
+ /***/ }),
2313
+
2314
+ /***/ 752:
2315
+ /***/ ((module) => {
2316
+
2317
+ "use strict";
2318
+ module.exports = require("tslib");
2319
+
2320
+ /***/ }),
2321
+
2322
+ /***/ 9664:
2323
+ /***/ ((module) => {
2324
+
2325
+ "use strict";
2326
+ module.exports = import("@envelop/core");;
2327
+
2328
+ /***/ }),
2329
+
2330
+ /***/ 7886:
2331
+ /***/ ((module) => {
2332
+
2333
+ "use strict";
2334
+ module.exports = import("@envelop/graphql-jit");;
2335
+
2336
+ /***/ }),
2337
+
2338
+ /***/ 4656:
2339
+ /***/ ((module) => {
2340
+
2341
+ "use strict";
2342
+ module.exports = import("@envelop/parser-cache");;
2343
+
2344
+ /***/ }),
2345
+
2346
+ /***/ 6093:
2347
+ /***/ ((module) => {
2348
+
2349
+ "use strict";
2350
+ module.exports = import("@envelop/validation-cache");;
2351
+
2352
+ /***/ }),
2353
+
2354
+ /***/ 7564:
2355
+ /***/ ((module) => {
2356
+
2357
+ "use strict";
2358
+ module.exports = import("chalk");;
2359
+
2360
+ /***/ }),
2361
+
2362
+ /***/ 5941:
2363
+ /***/ ((module) => {
2364
+
2365
+ "use strict";
2366
+ module.exports = import("swr");;
2367
+
2368
+ /***/ }),
2369
+
2370
+ /***/ 6113:
2371
+ /***/ ((module) => {
2372
+
2373
+ "use strict";
2374
+ module.exports = require("crypto");
2375
+
2376
+ /***/ })
2377
+
2378
+ };
2379
+ ;
2380
+
2381
+ // load runtime
2382
+ var __webpack_require__ = require("../../webpack-runtime.js");
2383
+ __webpack_require__.C(exports);
2384
+ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2385
+ var __webpack_exports__ = __webpack_require__.X(0, [608,676,664,401,336,183,644,886,74,247,287,854,280,368,104,120,350,82,123], () => (__webpack_exec__(4601)));
2386
+ module.exports = __webpack_exports__;
2387
+
2388
+ })();