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