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