@aparte/n8n-chat 0.1.0 → 0.2.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 (84) hide show
  1. package/README.md +138 -12
  2. package/dist/cards.d.ts +3 -0
  3. package/dist/cdn/chunks/chunk-7JR7KL6J.js +2 -0
  4. package/dist/cdn/chunks/chunk-7JR7KL6J.js.map +7 -0
  5. package/dist/cdn/chunks/chunk-CZ5742JA.js +2 -0
  6. package/dist/cdn/chunks/chunk-CZ5742JA.js.map +7 -0
  7. package/dist/cdn/chunks/chunk-IPWLCOPM.js +2 -0
  8. package/dist/cdn/chunks/chunk-IPWLCOPM.js.map +7 -0
  9. package/dist/cdn/chunks/chunk-IWAJFJNA.js +353 -0
  10. package/dist/cdn/chunks/chunk-IWAJFJNA.js.map +7 -0
  11. package/dist/cdn/chunks/chunk-OJFRNS5M.js +2 -0
  12. package/dist/cdn/chunks/chunk-OJFRNS5M.js.map +7 -0
  13. package/dist/cdn/chunks/chunk-VTTH7HGO.js +206 -0
  14. package/dist/cdn/chunks/chunk-VTTH7HGO.js.map +7 -0
  15. package/dist/cdn/chunks/de-JS3CQEVR.js +2 -0
  16. package/dist/cdn/chunks/de-JS3CQEVR.js.map +7 -0
  17. package/dist/cdn/chunks/es-OHKGLFEF.js +2 -0
  18. package/dist/cdn/chunks/es-OHKGLFEF.js.map +7 -0
  19. package/dist/cdn/chunks/fr-6S44XMU5.js +2 -0
  20. package/dist/cdn/chunks/fr-6S44XMU5.js.map +7 -0
  21. package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js → highlight-FGIKUPIF.js} +2 -2
  22. package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js.map → highlight-FGIKUPIF.js.map} +1 -1
  23. package/dist/cdn/chunks/it-K4WYXXDJ.js +2 -0
  24. package/dist/cdn/chunks/it-K4WYXXDJ.js.map +7 -0
  25. package/dist/cdn/chunks/items-S4LF2DJA.js +467 -0
  26. package/dist/cdn/chunks/items-S4LF2DJA.js.map +7 -0
  27. package/dist/cdn/chunks/ja-BN7TZW62.js +2 -0
  28. package/dist/cdn/chunks/ja-BN7TZW62.js.map +7 -0
  29. package/dist/cdn/chunks/ko-ARHO7UI3.js +2 -0
  30. package/dist/cdn/chunks/ko-ARHO7UI3.js.map +7 -0
  31. package/dist/cdn/chunks/link-C46K5O7X.js +493 -0
  32. package/dist/cdn/chunks/link-C46K5O7X.js.map +7 -0
  33. package/dist/cdn/chunks/media-QI5BPERX.js +797 -0
  34. package/dist/cdn/chunks/media-QI5BPERX.js.map +7 -0
  35. package/dist/cdn/chunks/order-YISYH73K.js +839 -0
  36. package/dist/cdn/chunks/order-YISYH73K.js.map +7 -0
  37. package/dist/cdn/chunks/place-UFCH3NQE.js +689 -0
  38. package/dist/cdn/chunks/place-UFCH3NQE.js.map +7 -0
  39. package/dist/cdn/chunks/plan-KQWF73QI.js +542 -0
  40. package/dist/cdn/chunks/plan-KQWF73QI.js.map +7 -0
  41. package/dist/cdn/chunks/product-7UBLOMZ7.js +660 -0
  42. package/dist/cdn/chunks/product-7UBLOMZ7.js.map +7 -0
  43. package/dist/cdn/chunks/pt-BR-R7ZRM3GG.js +2 -0
  44. package/dist/cdn/chunks/pt-BR-R7ZRM3GG.js.map +7 -0
  45. package/dist/cdn/chunks/ru-FJNIMGMU.js +2 -0
  46. package/dist/cdn/chunks/ru-FJNIMGMU.js.map +7 -0
  47. package/dist/cdn/chunks/score-O2KEAYDS.js +882 -0
  48. package/dist/cdn/chunks/score-O2KEAYDS.js.map +7 -0
  49. package/dist/cdn/chunks/stats-GSXFRGYZ.js +491 -0
  50. package/dist/cdn/chunks/stats-GSXFRGYZ.js.map +7 -0
  51. package/dist/cdn/chunks/stock-53NVFLC3.js +707 -0
  52. package/dist/cdn/chunks/stock-53NVFLC3.js.map +7 -0
  53. package/dist/cdn/chunks/weather-VI2RCU4X.js +615 -0
  54. package/dist/cdn/chunks/weather-VI2RCU4X.js.map +7 -0
  55. package/dist/cdn/chunks/zh-CN-DUCWBXJP.js +2 -0
  56. package/dist/cdn/chunks/zh-CN-DUCWBXJP.js.map +7 -0
  57. package/dist/cdn/n8n-chat.js +59 -53
  58. package/dist/cdn/n8n-chat.js.map +4 -4
  59. package/dist/create-chat.d.ts +16 -5
  60. package/dist/index.js +27 -2
  61. package/dist/index.js.map +1 -1
  62. package/dist/style.css +9 -1
  63. package/dist/theme.css +8 -0
  64. package/package.json +7 -6
  65. package/dist/cdn/chunks/chunk-MU6PIUJC.js +0 -206
  66. package/dist/cdn/chunks/chunk-MU6PIUJC.js.map +0 -7
  67. package/dist/cdn/chunks/de-WJNL5YNK.js +0 -2
  68. package/dist/cdn/chunks/de-WJNL5YNK.js.map +0 -7
  69. package/dist/cdn/chunks/es-DV5N3CXP.js +0 -2
  70. package/dist/cdn/chunks/es-DV5N3CXP.js.map +0 -7
  71. package/dist/cdn/chunks/fr-YU75PBOR.js +0 -2
  72. package/dist/cdn/chunks/fr-YU75PBOR.js.map +0 -7
  73. package/dist/cdn/chunks/it-DZTHWNO3.js +0 -2
  74. package/dist/cdn/chunks/it-DZTHWNO3.js.map +0 -7
  75. package/dist/cdn/chunks/ja-QO442LBN.js +0 -2
  76. package/dist/cdn/chunks/ja-QO442LBN.js.map +0 -7
  77. package/dist/cdn/chunks/ko-EGFZJCXQ.js +0 -2
  78. package/dist/cdn/chunks/ko-EGFZJCXQ.js.map +0 -7
  79. package/dist/cdn/chunks/pt-BR-526LHI67.js +0 -2
  80. package/dist/cdn/chunks/pt-BR-526LHI67.js.map +0 -7
  81. package/dist/cdn/chunks/ru-5WNEMKNP.js +0 -2
  82. package/dist/cdn/chunks/ru-5WNEMKNP.js.map +0 -7
  83. package/dist/cdn/chunks/zh-CN-ABSHNLG6.js +0 -2
  84. package/dist/cdn/chunks/zh-CN-ABSHNLG6.js.map +0 -7
@@ -0,0 +1,660 @@
1
+ import{a as z}from"./chunk-7JR7KL6J.js";import{a as C}from"./chunk-OJFRNS5M.js";import{a as o,b as y,d as _,e as g,f as l,i as f,n as G,p as b,q as Q,r as O,s as X,t as Y}from"./chunk-IWAJFJNA.js";import"./chunk-VTTH7HGO.js";import"./chunk-XAWE4EAK.js";var P=t=>`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">${t}</svg>`,ca=P('<path d="M5.5 8h13l-1 11.2a1.8 1.8 0 0 1-1.8 1.6H8.3a1.8 1.8 0 0 1-1.8-1.6z"/><path d="M9 10.5V6.8a3 3 0 0 1 6 0v3.7"/>'),da=P('<path d="M2.8 6.5h10.4v9.3H2.8z"/><path d="M13.2 9.5h4.1l3 3.2v3.1h-7.1"/><circle cx="7" cy="17.3" r="1.7"/><circle cx="17" cy="17.3" r="1.7"/>'),la=P('<circle cx="10.8" cy="10.8" r="6.3"/><path d="M15.5 15.5l4.7 4.7"/>'),ua=P('<path d="M3.5 12.6V4.8a1.3 1.3 0 0 1 1.3-1.3h7.8l8 8a1.3 1.3 0 0 1 0 1.8l-7 7a1.3 1.3 0 0 1-1.8 0z"/><circle cx="8.3" cy="8.3" r="1.5"/>'),fa=`/* =========================================
2
+ The product card \u2014 @aparte/plugin-cards/product
3
+ =========================================
4
+ Three variants of one card, chosen by \`data-variant\` on its root:
5
+ card a tile: the photo, the shop, the name, the stars, the price. Several
6
+ products are a row of tiles that scrolls, and the card drops its own
7
+ frame so the tiles are not boxes inside a box.
8
+ compact a row per product \u2014 thumbnail, name, stars, price \u2014 a list to scan.
9
+ detail one product at length: the photo beside the facts on a wide card, above
10
+ them on a narrow one; the others in a small row under it.
11
+ Every colour is a theme token or derived from one, so light and dark follow the chat.
12
+ */
13
+
14
+ .aparte-product-card {
15
+ --aparte-product-tile-size: 12.5rem;
16
+ --aparte-product-thumb-size: 3.5rem;
17
+ --aparte-product-media-radius: var(--aparte-radius-lg);
18
+ /* A product photo is shot on white. The plate it sits on is near-white in BOTH schemes
19
+ (derived from the ink, so it is a hair off white in light and a hair off cream in
20
+ dark) and the photo is multiplied into it: its white background melts into the plate
21
+ instead of sitting as a white square on a grey one. A photo on a dark plate in dark
22
+ mode keeps its white box whatever we do \u2014 the shops' own apps show it light too. */
23
+ --aparte-product-media-bg: color-mix(in oklab, var(--aparte-text) 5%, #fff);
24
+ --aparte-product-image-fit: contain;
25
+ --aparte-product-image-inset: 7%;
26
+ /* Where there is no photo: the theme's own surfaces, warmed by its accent. */
27
+ --aparte-product-placeholder: linear-gradient(
28
+ 145deg,
29
+ color-mix(in oklab, var(--aparte-primary) 16%, var(--aparte-surface-2)) 0%,
30
+ var(--aparte-surface-2) 55%,
31
+ color-mix(in oklab, var(--aparte-text) 5%, var(--aparte-surface-2)) 100%
32
+ );
33
+ --aparte-product-placeholder-ink: color-mix(in oklab, var(--aparte-text) 30%, transparent);
34
+ --aparte-product-price-color: var(--aparte-text);
35
+ --aparte-product-hover-border: color-mix(in oklab, var(--aparte-text) 22%, var(--aparte-border));
36
+ --aparte-product-hover-shadow: 0 8px 18px -12px rgb(0 0 0 / 0.38);
37
+ }
38
+
39
+ /* \u2500\u2500 Widths: each variant asks for its own; the bubble's limit caps them all \u2500\u2500 */
40
+
41
+ .aparte-product-card[data-variant="card"] { --aparte-rich-card-max-inline-size: 16.5rem; }
42
+ .aparte-product-card[data-variant="compact"] { --aparte-rich-card-max-inline-size: 28rem; }
43
+ .aparte-product-card[data-variant="detail"] { --aparte-rich-card-max-inline-size: 36rem; }
44
+ .aparte-product-card:has(> .aparte-product__collection) { --aparte-rich-card-max-inline-size: 42rem; }
45
+
46
+ /* Several tiles: each is framed, so the card is not. The kit's buttons under it lose
47
+ their band, which would otherwise float as a strip under nothing. */
48
+ .aparte-product-card:has(> .aparte-product__collection) {
49
+ overflow: visible;
50
+ border-color: transparent;
51
+ border-radius: 0;
52
+ background: transparent;
53
+ }
54
+
55
+ .aparte-product-card:has(> .aparte-product__collection) > .aparte-rich-card__actions {
56
+ padding-inline: 0;
57
+ border-block-start: 0;
58
+ background: none;
59
+ }
60
+
61
+ /* \u2500\u2500 Headings: the collection's title, the query of a running search \u2500\u2500\u2500 */
62
+
63
+ .aparte-product__heading {
64
+ margin-block-end: var(--aparte-space-4);
65
+ font-size: var(--aparte-font-size-md);
66
+ font-weight: var(--aparte-font-weight-semibold);
67
+ overflow-wrap: anywhere;
68
+ }
69
+
70
+ .aparte-product-card[data-variant="compact"] > .aparte-product__heading {
71
+ margin: 0;
72
+ padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-2);
73
+ }
74
+
75
+ .aparte-product__query {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: var(--aparte-space-3);
79
+ min-inline-size: 0;
80
+ margin-block-end: var(--aparte-space-4);
81
+ color: var(--aparte-text-muted);
82
+ font-size: var(--aparte-font-size-md);
83
+ --aparte-rich-card-glyph-size: 1rem;
84
+ }
85
+
86
+ .aparte-product__query-text {
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ }
91
+
92
+ .aparte-product-card[data-variant="compact"] > .aparte-product__query,
93
+ .aparte-product-card[data-variant="detail"] > .aparte-product__query {
94
+ margin: 0;
95
+ padding: var(--aparte-space-5) var(--aparte-space-6) 0;
96
+ }
97
+
98
+ /* \u2500\u2500 The carousel, in product sizes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
99
+
100
+ .aparte-product-card .aparte-rich-card__carousel {
101
+ --aparte-rich-card-slide-size: var(--aparte-product-tile-size);
102
+ }
103
+
104
+ /* \u2500\u2500 A product, whatever its shape \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
105
+
106
+ .aparte-product {
107
+ position: relative;
108
+ min-inline-size: 0;
109
+ color: var(--aparte-text);
110
+ }
111
+
112
+ /* The title's link covers the tile or the row: one link per product, read once. */
113
+ .aparte-product__link {
114
+ color: inherit;
115
+ text-decoration: none;
116
+ }
117
+
118
+ .aparte-product--tile .aparte-product__link,
119
+ .aparte-product--row .aparte-product__link {
120
+ outline: none;
121
+ }
122
+
123
+ .aparte-product--tile .aparte-product__link::after,
124
+ .aparte-product--row .aparte-product__link::after {
125
+ content: "";
126
+ position: absolute;
127
+ inset: 0;
128
+ border-radius: inherit;
129
+ }
130
+
131
+ .aparte-product[data-linked]:hover .aparte-product__title {
132
+ text-decoration: underline;
133
+ text-decoration-thickness: 1px;
134
+ text-underline-offset: 0.18em;
135
+ }
136
+
137
+ /* The ring is the product's, since the link is all of it. */
138
+ .aparte-product--tile:has(.aparte-product__link:focus-visible) {
139
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
140
+ outline-offset: var(--aparte-focus-outline-offset);
141
+ }
142
+
143
+ .aparte-product--row:has(.aparte-product__link:focus-visible) {
144
+ /* A row reaches the card's clipped edges: its ring is drawn inside. */
145
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
146
+ outline-offset: calc(var(--aparte-focus-outline-width) * -1);
147
+ }
148
+
149
+ /* \u2500\u2500 The photo \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
150
+
151
+ .aparte-product__media {
152
+ position: relative;
153
+ display: grid;
154
+ place-items: center;
155
+ aspect-ratio: 1;
156
+ overflow: hidden;
157
+ border-radius: var(--aparte-product-media-radius);
158
+ background: var(--aparte-product-media-bg);
159
+ isolation: isolate;
160
+ }
161
+
162
+ .aparte-product__media[data-empty] {
163
+ background: var(--aparte-product-placeholder);
164
+ }
165
+
166
+ .aparte-product__placeholder {
167
+ grid-area: 1 / 1;
168
+ color: var(--aparte-product-placeholder-ink);
169
+ --aparte-rich-card-glyph-size: clamp(1.25rem, 30%, 3.5rem);
170
+ }
171
+
172
+ .aparte-product__media:not([data-empty]) .aparte-product__placeholder { visibility: hidden; }
173
+
174
+ .aparte-product__image {
175
+ grid-area: 1 / 1;
176
+ box-sizing: border-box;
177
+ inline-size: 100%;
178
+ block-size: 100%;
179
+ padding: var(--aparte-product-image-inset);
180
+ object-fit: var(--aparte-product-image-fit);
181
+ mix-blend-mode: multiply;
182
+ transition: scale var(--aparte-duration-slower) ease, opacity var(--aparte-duration-base) ease;
183
+ }
184
+
185
+ .aparte-product__image[hidden] { display: none; }
186
+
187
+ .aparte-product[data-linked]:hover .aparte-product__image,
188
+ .aparte-product__media-link:hover .aparte-product__image {
189
+ scale: 1.04;
190
+ }
191
+
192
+ /* Out of stock: the photo steps back, the line under it says why. */
193
+ .aparte-product[data-availability="out-of-stock"] .aparte-product__image {
194
+ opacity: 0.55;
195
+ filter: grayscale(0.5);
196
+ }
197
+
198
+ .aparte-product__flags {
199
+ position: absolute;
200
+ z-index: 1;
201
+ inset-block-start: var(--aparte-space-3);
202
+ inset-inline-start: var(--aparte-space-3);
203
+ display: flex;
204
+ flex-wrap: wrap;
205
+ gap: var(--aparte-space-2);
206
+ max-inline-size: calc(100% - var(--aparte-space-3) * 2);
207
+ }
208
+
209
+ /* The shop's word: a pill of the card's own surface over the plate, in either scheme. */
210
+ .aparte-product__flags .aparte-product__badge {
211
+ max-inline-size: 100%;
212
+ overflow: hidden;
213
+ text-overflow: ellipsis;
214
+ background: color-mix(in oklab, var(--aparte-surface-1) 90%, transparent);
215
+ color: var(--aparte-text);
216
+ box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
217
+ backdrop-filter: blur(6px);
218
+ }
219
+
220
+ .aparte-product__discount {
221
+ font-variant-numeric: tabular-nums;
222
+ }
223
+
224
+ /* \u2500\u2500 The words beside the photo \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
225
+
226
+ .aparte-product__body {
227
+ display: flex;
228
+ flex: 1;
229
+ flex-direction: column;
230
+ gap: var(--aparte-space-2);
231
+ min-inline-size: 0;
232
+ }
233
+
234
+ .aparte-product__merchant {
235
+ display: flex;
236
+ align-items: center;
237
+ gap: var(--aparte-space-2);
238
+ min-inline-size: 0;
239
+ color: var(--aparte-text-muted);
240
+ font-size: var(--aparte-font-size-xs);
241
+ }
242
+
243
+ .aparte-product__merchant-name {
244
+ overflow: hidden;
245
+ text-overflow: ellipsis;
246
+ white-space: nowrap;
247
+ }
248
+
249
+ .aparte-product__logo {
250
+ flex: none;
251
+ inline-size: 1rem;
252
+ block-size: 1rem;
253
+ border-radius: var(--aparte-radius-xs);
254
+ object-fit: cover;
255
+ }
256
+
257
+ .aparte-product__logo[hidden] { display: none; }
258
+
259
+ .aparte-product__title {
260
+ display: -webkit-box;
261
+ overflow: hidden;
262
+ -webkit-box-orient: vertical;
263
+ -webkit-line-clamp: 2;
264
+ line-clamp: 2;
265
+ font-size: var(--aparte-font-size-md);
266
+ font-weight: var(--aparte-font-weight-medium);
267
+ line-height: 1.3;
268
+ overflow-wrap: anywhere;
269
+ }
270
+
271
+ .aparte-product__price {
272
+ display: flex;
273
+ flex-wrap: wrap;
274
+ align-items: baseline;
275
+ gap: var(--aparte-space-1) var(--aparte-space-3);
276
+ font-variant-numeric: tabular-nums;
277
+ }
278
+
279
+ .aparte-product__now {
280
+ color: var(--aparte-product-price-color);
281
+ font-size: var(--aparte-font-size-lg);
282
+ font-weight: var(--aparte-font-weight-bold);
283
+ letter-spacing: -0.01em;
284
+ white-space: nowrap;
285
+ }
286
+
287
+ .aparte-product__was {
288
+ color: var(--aparte-text-muted);
289
+ font-size: var(--aparte-font-size-sm);
290
+ text-decoration-thickness: 1px;
291
+ white-space: nowrap;
292
+ }
293
+
294
+ .aparte-product__price .aparte-product__discount { align-self: center; }
295
+
296
+ /* Stock: a dot in the state's colour, the word in its readable ink. */
297
+ .aparte-product__stock {
298
+ --aparte-product-stock-tone: var(--aparte-neutral);
299
+ --aparte-product-stock-ink: var(--aparte-text-muted);
300
+ display: inline-flex;
301
+ align-items: center;
302
+ gap: var(--aparte-space-2);
303
+ min-inline-size: 0;
304
+ color: var(--aparte-product-stock-ink);
305
+ font-size: var(--aparte-font-size-xs);
306
+ font-weight: var(--aparte-font-weight-medium);
307
+ }
308
+
309
+ .aparte-product__stock[data-availability="in-stock"] { --aparte-product-stock-tone: var(--aparte-success); --aparte-product-stock-ink: var(--aparte-success-ink); }
310
+ .aparte-product__stock[data-availability="low-stock"] { --aparte-product-stock-tone: var(--aparte-warning); --aparte-product-stock-ink: var(--aparte-warning-ink); }
311
+ .aparte-product__stock[data-availability="out-of-stock"] { --aparte-product-stock-tone: var(--aparte-error); --aparte-product-stock-ink: var(--aparte-error-ink); }
312
+ .aparte-product__stock[data-availability="preorder"] { --aparte-product-stock-tone: var(--aparte-info); --aparte-product-stock-ink: var(--aparte-info-ink); }
313
+
314
+ .aparte-product__dot {
315
+ flex: none;
316
+ inline-size: 0.4375rem;
317
+ block-size: 0.4375rem;
318
+ border-radius: var(--aparte-radius-full);
319
+ background: var(--aparte-product-stock-tone);
320
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--aparte-product-stock-tone) 20%, transparent);
321
+ }
322
+
323
+ .aparte-product__stock-text {
324
+ overflow: hidden;
325
+ text-overflow: ellipsis;
326
+ white-space: nowrap;
327
+ }
328
+
329
+ .aparte-product__shipping {
330
+ display: inline-flex;
331
+ align-items: center;
332
+ gap: var(--aparte-space-2);
333
+ min-inline-size: 0;
334
+ color: var(--aparte-text-muted);
335
+ font-size: var(--aparte-font-size-xs);
336
+ --aparte-rich-card-glyph-size: 1rem;
337
+ }
338
+
339
+ .aparte-product__shipping[data-free] {
340
+ color: var(--aparte-success-ink);
341
+ font-weight: var(--aparte-font-weight-medium);
342
+ }
343
+
344
+ .aparte-product__shipping-icon:dir(rtl) { transform: scaleX(-1); }
345
+
346
+ /* Buttons sit above the link that covers the product. */
347
+ .aparte-product__actions {
348
+ position: relative;
349
+ z-index: 1;
350
+ display: flex;
351
+ flex-wrap: wrap;
352
+ gap: var(--aparte-space-2);
353
+ }
354
+
355
+ /* \u2500\u2500 card: the tile \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
356
+
357
+ .aparte-product--tile {
358
+ display: flex;
359
+ flex-direction: column;
360
+ gap: var(--aparte-space-4);
361
+ padding: var(--aparte-space-3) var(--aparte-space-3) var(--aparte-space-4);
362
+ border-radius: var(--aparte-card-radius);
363
+ }
364
+
365
+ .aparte-product--tile .aparte-product__body { padding-inline: var(--aparte-space-2); }
366
+
367
+ /* Two lines held even when the name takes one, so the prices in a row line up. */
368
+ .aparte-product--tile .aparte-product__title { min-block-size: 2lh; }
369
+
370
+ /* The price sits at the foot of the tile, level with its neighbours'. */
371
+ .aparte-product--tile .aparte-product__price {
372
+ margin-block-start: auto;
373
+ padding-block-start: var(--aparte-space-1);
374
+ }
375
+
376
+ .aparte-product--tile .aparte-product__actions { padding-inline: var(--aparte-space-2); }
377
+ .aparte-product--tile .aparte-product__action { flex: 1 1 auto; justify-content: center; }
378
+
379
+ .aparte-product__collection .aparte-product--tile,
380
+ .aparte-product__more .aparte-product--tile {
381
+ border: var(--aparte-border-width) solid var(--aparte-border);
382
+ background: var(--aparte-surface-1);
383
+ transition:
384
+ border-color var(--aparte-duration-base) ease,
385
+ box-shadow var(--aparte-duration-base) ease,
386
+ translate var(--aparte-duration-base) ease;
387
+ }
388
+
389
+ .aparte-product__collection .aparte-product--tile[data-linked]:hover,
390
+ .aparte-product__more .aparte-product--tile[data-linked]:hover {
391
+ border-color: var(--aparte-product-hover-border);
392
+ box-shadow: var(--aparte-product-hover-shadow);
393
+ translate: 0 -2px;
394
+ }
395
+
396
+ /* A mini tile: the others under a detail. */
397
+ .aparte-product--mini {
398
+ gap: var(--aparte-space-3);
399
+ padding: var(--aparte-space-2) var(--aparte-space-2) var(--aparte-space-3);
400
+ }
401
+
402
+ .aparte-product--mini .aparte-product__body { gap: var(--aparte-space-1); }
403
+ .aparte-product--mini .aparte-product__title { font-size: var(--aparte-font-size-sm); }
404
+ .aparte-product--mini .aparte-product__now { font-size: var(--aparte-font-size-md); }
405
+ .aparte-product--mini .aparte-product__was { font-size: var(--aparte-font-size-xs); }
406
+
407
+ /* \u2500\u2500 compact: the rows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
408
+
409
+ /* On the drawn card only: a one-line state shrinks to its words, and a size container
410
+ cannot. */
411
+ .aparte-product-card[data-variant="compact"][data-state="ready"] {
412
+ container: aparte-product-rows / inline-size;
413
+ }
414
+
415
+ .aparte-product__rows {
416
+ margin: 0;
417
+ padding: var(--aparte-space-2) 0;
418
+ list-style: none;
419
+ }
420
+
421
+ /* A divider starting after the thumbnail, the way a settings list draws it. */
422
+ .aparte-product__item { position: relative; }
423
+
424
+ .aparte-product__item + .aparte-product__item::before {
425
+ content: "";
426
+ position: absolute;
427
+ inset-block-start: 0;
428
+ inset-inline: calc(var(--aparte-space-6) + var(--aparte-product-thumb-size) + var(--aparte-space-5)) var(--aparte-space-6);
429
+ border-block-start: var(--aparte-border-width) solid var(--aparte-border);
430
+ }
431
+
432
+ .aparte-product--row {
433
+ display: grid;
434
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;
435
+ align-items: center;
436
+ column-gap: var(--aparte-space-5);
437
+ padding: var(--aparte-space-4) var(--aparte-space-6);
438
+ transition: background-color var(--aparte-duration-fast) ease;
439
+ }
440
+
441
+ .aparte-product--row:has(> .aparte-product__actions) {
442
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto auto;
443
+ }
444
+
445
+ .aparte-product--row[data-linked]:hover { background: var(--aparte-surface-2); }
446
+
447
+ .aparte-product__thumb {
448
+ inline-size: var(--aparte-product-thumb-size);
449
+ --aparte-product-media-radius: var(--aparte-radius-md);
450
+ --aparte-product-image-inset: 4%;
451
+ }
452
+
453
+ .aparte-product__thumb .aparte-product__placeholder { --aparte-rich-card-glyph-size: 45%; }
454
+
455
+ .aparte-product__main {
456
+ display: flex;
457
+ flex-direction: column;
458
+ gap: var(--aparte-space-1);
459
+ min-inline-size: 0;
460
+ }
461
+
462
+ .aparte-product__meta {
463
+ display: flex;
464
+ flex-wrap: wrap;
465
+ align-items: center;
466
+ gap: var(--aparte-space-1) var(--aparte-space-3);
467
+ min-inline-size: 0;
468
+ color: var(--aparte-text-muted);
469
+ font-size: var(--aparte-font-size-xs);
470
+ }
471
+
472
+ .aparte-product__meta .aparte-rich-card__rating { font-size: var(--aparte-font-size-xs); }
473
+
474
+ .aparte-product--row .aparte-product__price {
475
+ flex-direction: column;
476
+ align-items: flex-end;
477
+ gap: 0;
478
+ text-align: end;
479
+ }
480
+
481
+ .aparte-product--row .aparte-product__now { font-size: var(--aparte-font-size-base); }
482
+ .aparte-product--row .aparte-product__was { font-size: var(--aparte-font-size-xs); }
483
+
484
+ /* On a narrow card a row's button goes under its name rather than squeeze it. */
485
+ @container aparte-product-rows (max-width: 24rem) {
486
+ .aparte-product--row:has(> .aparte-product__actions) {
487
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;
488
+ }
489
+
490
+ .aparte-product--row > .aparte-product__actions {
491
+ grid-column: 2 / -1;
492
+ margin-block-start: var(--aparte-space-3);
493
+ }
494
+ }
495
+
496
+ /* \u2500\u2500 detail: one product at length \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
497
+
498
+ .aparte-product__detail {
499
+ container: aparte-product-detail / inline-size;
500
+ }
501
+
502
+ .aparte-product--detail {
503
+ display: grid;
504
+ gap: var(--aparte-space-6);
505
+ padding: var(--aparte-space-6);
506
+ }
507
+
508
+ .aparte-product--detail .aparte-product__media,
509
+ .aparte-product--detail .aparte-product__sk-media {
510
+ aspect-ratio: 4 / 3;
511
+ }
512
+
513
+ .aparte-product__media-link {
514
+ display: block;
515
+ border-radius: var(--aparte-product-media-radius);
516
+ }
517
+
518
+ .aparte-product--detail .aparte-product__body { gap: var(--aparte-space-3); }
519
+
520
+ /* The clamp clips what overflows it, the focus ring included: the padding gives the ring
521
+ room inside, and the margin takes that room back from the layout. */
522
+ .aparte-product--detail .aparte-product__title {
523
+ -webkit-line-clamp: 4;
524
+ line-clamp: 4;
525
+ margin: calc(var(--aparte-space-2) * -1);
526
+ padding: var(--aparte-space-2);
527
+ font-size: var(--aparte-font-size-lg);
528
+ font-weight: var(--aparte-font-weight-semibold);
529
+ }
530
+
531
+ .aparte-product--detail .aparte-product__link:hover { text-decoration: underline; text-underline-offset: 0.18em; }
532
+
533
+ .aparte-product--detail .aparte-product__link:focus-visible {
534
+ border-radius: var(--aparte-radius-xs);
535
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
536
+ outline-offset: var(--aparte-focus-outline-offset);
537
+ }
538
+
539
+ .aparte-product--detail .aparte-product__now { font-size: var(--aparte-font-size-2xl); }
540
+ .aparte-product--detail .aparte-product__was { font-size: var(--aparte-font-size-md); }
541
+
542
+ .aparte-product__facts {
543
+ display: flex;
544
+ flex-wrap: wrap;
545
+ align-items: center;
546
+ gap: var(--aparte-space-2) var(--aparte-space-6);
547
+ }
548
+
549
+ .aparte-product__description {
550
+ display: -webkit-box;
551
+ margin: 0;
552
+ overflow: hidden;
553
+ -webkit-box-orient: vertical;
554
+ -webkit-line-clamp: 3;
555
+ line-clamp: 3;
556
+ color: var(--aparte-text-muted);
557
+ font-size: var(--aparte-font-size-sm);
558
+ line-height: 1.5;
559
+ overflow-wrap: anywhere;
560
+ }
561
+
562
+ .aparte-product__options {
563
+ display: flex;
564
+ flex-wrap: wrap;
565
+ gap: var(--aparte-space-2);
566
+ margin: 0;
567
+ padding: 0;
568
+ list-style: none;
569
+ }
570
+
571
+ .aparte-product__option--more { color: var(--aparte-text-muted); }
572
+
573
+ .aparte-product--detail .aparte-product__actions { margin-block-start: var(--aparte-space-2); }
574
+ .aparte-product--detail .aparte-product__action { flex: 1 1 8rem; justify-content: center; }
575
+
576
+ @container aparte-product-detail (min-width: 30rem) {
577
+ .aparte-product--detail {
578
+ grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
579
+ align-items: start;
580
+ gap: var(--aparte-space-7);
581
+ }
582
+
583
+ .aparte-product--detail .aparte-product__media,
584
+ .aparte-product--detail .aparte-product__sk-media {
585
+ aspect-ratio: 1;
586
+ }
587
+ }
588
+
589
+ /* The others, under the detail. */
590
+ .aparte-product__more {
591
+ --aparte-product-tile-size: 9.5rem;
592
+ padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);
593
+ border-block-start: var(--aparte-border-width) solid var(--aparte-border);
594
+ background: color-mix(in oklab, var(--aparte-surface-2) 45%, var(--aparte-surface-1));
595
+ }
596
+
597
+ .aparte-product__more-title {
598
+ margin-block-end: var(--aparte-space-4);
599
+ color: var(--aparte-text-muted);
600
+ font-size: var(--aparte-font-size-sm);
601
+ font-weight: var(--aparte-font-weight-semibold);
602
+ }
603
+
604
+ /* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
605
+
606
+ .aparte-product__sk-track {
607
+ display: grid;
608
+ grid-auto-flow: column;
609
+ grid-auto-columns: var(--aparte-product-tile-size);
610
+ column-gap: var(--aparte-space-4);
611
+ overflow: hidden;
612
+ }
613
+
614
+ .aparte-product-card .aparte-product__sk-media {
615
+ block-size: auto;
616
+ aspect-ratio: 1;
617
+ border-radius: var(--aparte-product-media-radius);
618
+ }
619
+
620
+ .aparte-product-card .aparte-product__sk-thumb {
621
+ inline-size: var(--aparte-product-thumb-size);
622
+ block-size: auto;
623
+ aspect-ratio: 1;
624
+ border-radius: var(--aparte-radius-md);
625
+ }
626
+
627
+ .aparte-product-card .aparte-product__sk-line--short { inline-size: 60%; }
628
+
629
+ .aparte-product-card .aparte-product__sk-price {
630
+ inline-size: 4.5rem;
631
+ block-size: 1.125rem;
632
+ margin-block-start: auto;
633
+ }
634
+
635
+ .aparte-product--row .aparte-product__sk-price { margin-block-start: 0; }
636
+
637
+ /* \u2500\u2500 Small screens, motion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
638
+
639
+ @media (max-width: 380px) {
640
+ .aparte-product-card { --aparte-product-tile-size: 10.75rem; --aparte-product-thumb-size: 3rem; }
641
+ .aparte-product--row { column-gap: var(--aparte-space-4); padding-inline: var(--aparte-space-5); }
642
+ .aparte-product__item + .aparte-product__item::before {
643
+ inset-inline: calc(var(--aparte-space-5) + var(--aparte-product-thumb-size) + var(--aparte-space-4)) var(--aparte-space-5);
644
+ }
645
+ .aparte-product--detail { padding: var(--aparte-space-5); }
646
+ .aparte-product__more { padding-inline: var(--aparte-space-5); }
647
+ }
648
+
649
+ /* The kit stops every transition under reduced motion; the hover's lift and zoom are
650
+ end states, not transitions, so they are taken out here. */
651
+ @media (prefers-reduced-motion: reduce) {
652
+ .aparte-product__collection .aparte-product--tile[data-linked]:hover,
653
+ .aparte-product__more .aparte-product--tile[data-linked]:hover { translate: none; }
654
+
655
+ .aparte-product[data-linked]:hover .aparte-product__image,
656
+ .aparte-product__media-link:hover .aparte-product__image { scale: none; }
657
+ }
658
+ `,u={cardsProductTitle:{en:"Products",fr:"Produits",de:"Produkte",es:"Productos",it:"Prodotti",ja:"\u5546\u54C1",ko:"\uC0C1\uD488",pt:"Produtos",ru:"\u0422\u043E\u0432\u0430\u0440\u044B",zh:"\u5546\u54C1"},cardsProductCount:{en:"{n} products",fr:"{n} produits",de:"{n} Produkte",es:"{n} productos",it:"{n} prodotti",ja:"{n}\u4EF6\u306E\u5546\u54C1",ko:"\uC0C1\uD488 {n}\uAC1C",pt:"{n} produtos",ru:"\u0422\u043E\u0432\u0430\u0440\u043E\u0432: {n}",zh:"{n} \u4EF6\u5546\u54C1"},cardsProductInStock:{en:"In stock",fr:"En stock",de:"Auf Lager",es:"En stock",it:"Disponibile",ja:"\u5728\u5EAB\u3042\u308A",ko:"\uC7AC\uACE0 \uC788\uC74C",pt:"Em estoque",ru:"\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438",zh:"\u6709\u8D27"},cardsProductLowStock:{en:"Only a few left",fr:"Plus que quelques-uns",de:"Nur noch wenige",es:"Quedan pocas unidades",it:"Ultimi pezzi",ja:"\u6B8B\u308A\u308F\u305A\u304B",ko:"\uD488\uC808 \uC784\uBC15",pt:"\xDAltimas unidades",ru:"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u043C\u0430\u043B\u043E",zh:"\u4EC5\u5269\u5C11\u91CF"},cardsProductOutOfStock:{en:"Out of stock",fr:"Rupture de stock",de:"Ausverkauft",es:"Agotado",it:"Esaurito",ja:"\u5728\u5EAB\u5207\u308C",ko:"\uD488\uC808",pt:"Esgotado",ru:"\u041D\u0435\u0442 \u0432 \u043D\u0430\u043B\u0438\u0447\u0438\u0438",zh:"\u7F3A\u8D27"},cardsProductPreorder:{en:"Pre-order",fr:"Pr\xE9commande",de:"Vorbestellbar",es:"Preventa",it:"Preordine",ja:"\u4E88\u7D04\u53D7\u4ED8\u4E2D",ko:"\uC608\uC57D \uD310\uB9E4",pt:"Pr\xE9-venda",ru:"\u041F\u0440\u0435\u0434\u0437\u0430\u043A\u0430\u0437",zh:"\u9884\u552E"},cardsProductWas:{en:"Was",fr:"Au lieu de",de:"Statt",es:"Antes",it:"Prima",ja:"\u901A\u5E38\u4FA1\u683C",ko:"\uC815\uAC00",pt:"De",ru:"\u0411\u044B\u043B\u043E",zh:"\u539F\u4EF7"},cardsProductFreeShipping:{en:"Free delivery",fr:"Livraison gratuite",de:"Kostenloser Versand",es:"Env\xEDo gratis",it:"Spedizione gratuita",ja:"\u9001\u6599\u7121\u6599",ko:"\uBB34\uB8CC \uBC30\uC1A1",pt:"Frete gr\xE1tis",ru:"\u0411\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u0430\u044F \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430",zh:"\u514D\u8FD0\u8D39"},cardsProductShippingCost:{en:"{price} delivery",fr:"Livraison {price}",de:"Versand {price}",es:"Env\xEDo {price}",it:"Spedizione {price}",ja:"\u9001\u6599 {price}",ko:"\uBC30\uC1A1\uBE44 {price}",pt:"Frete {price}",ru:"\u0414\u043E\u0441\u0442\u0430\u0432\u043A\u0430 {price}",zh:"\u8FD0\u8D39 {price}"},cardsProductOptions:{en:"Options",fr:"Options",de:"Optionen",es:"Opciones",it:"Opzioni",ja:"\u30AA\u30D7\u30B7\u30E7\u30F3",ko:"\uC635\uC158",pt:"Op\xE7\xF5es",ru:"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",zh:"\u53EF\u9009\u9879"},cardsProductMoreOptions:{en:"{n} more",fr:"{n} de plus",de:"{n} weitere",es:"{n} m\xE1s",it:"altri {n}",ja:"\u307B\u304B{n}\u4EF6",ko:"{n}\uAC1C \uB354",pt:"mais {n}",ru:"\u0435\u0449\u0451 {n}",zh:"\u8FD8\u6709 {n} \u4E2A"},cardsProductMore:{en:"More options",fr:"Autres choix",de:"Weitere Angebote",es:"M\xE1s opciones",it:"Altre proposte",ja:"\u305D\u306E\u4ED6\u306E\u5019\u88DC",ko:"\uB2E4\uB978 \uC0C1\uD488",pt:"Mais op\xE7\xF5es",ru:"\u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B",zh:"\u66F4\u591A\u9009\u62E9"}},J={"in-stock":"cardsProductInStock","low-stock":"cardsProductLowStock","out-of-stock":"cardsProductOutOfStock",preorder:"cardsProductPreorder"},ma=10,Z=6,T=2,d=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function p(t,a){if(t){for(let r of a)if(t[r]!==void 0&&t[r]!==null)return t[r]}}function ea(t){return Array.isArray(t)?t:d(t)?Array.isArray(t.nodes)?t.nodes:Array.isArray(t.edges)?t.edges.map(a=>d(a)?a.node:void 0):[]:[]}function k(t){if(typeof t=="number")return{amount:Number.isFinite(t)&&t>=0?t:void 0};if(typeof t=="string"){let{amount:a,currency:r}=X(t);return{amount:a===void 0?void 0:Math.abs(a),currency:r}}return d(t)?{amount:k(p(t,["amount","value","price"])).amount,currency:O(p(t,["currencyCode","currency_code","currency"]))}:{}}function oa(t){if(Array.isArray(t)){for(let r of t){let e=oa(r);if(e)return e}return}if(d(t)){let r=_(p(t,["src","url","contentUrl","href","large","medium","thumbnail"])),e=l(p(t,["alt","altText","alt_text"]));return r?{src:r,...e?{alt:e}:{}}:void 0}let a=_(t);return a?{src:a}:void 0}var _a={instock:"in-stock",available:"in-stock",instoreonly:"in-stock",onlineonly:"in-stock",lowstock:"low-stock",limitedavailability:"low-stock",fewleft:"low-stock",outofstock:"out-of-stock",soldout:"out-of-stock",unavailable:"out-of-stock",discontinued:"out-of-stock",preorder:"preorder",presale:"preorder",backorder:"preorder"};function va(t,a){let r=p(t,["availability","stockStatus","stock_status"])??p(a,["availability"]);if(typeof r=="string"&&r.trim()){let i=r.trim().toLowerCase().replace(/^(?:https?:\/\/schema\.org\/|schema:)/,"").replace(/[^a-z]/g,""),n=_a[i];return n?{status:n}:{text:r.trim()}}let e=typeof r=="boolean"?r:p(t,["inStock","in_stock","available"]);if(typeof e=="boolean")return{status:e?"in-stock":"out-of-stock"}}function ha(t){let a=d(t.aggregateRating)?t.aggregateRating:void 0,r=p(t,["rating","stars","ratingValue","rating_value","averageRating","average_rating"])??p(a,["ratingValue"]),e=p(t,["reviewCount","review_count","reviews","reviewsCount","reviews_count","ratingCount","rating_count","numReviews"])??p(a,["reviewCount","ratingCount"]);d(r)&&(e??=p(r,["count","reviews"]),r=p(r,["rate","value","average"])),Array.isArray(e)&&(e=e.length);let i=g(p(t,["bestRating","best_rating"])??p(a,["bestRating"])),n=g(r),s=n!==void 0&&i!==void 0&&i>0&&n<=i?n*5/i:n,c=g(e);return{rating:s!==void 0&&s>=0&&s<=5?s:void 0,reviewCount:c!==void 0&&c>=0?Math.floor(c):void 0}}var ga="Default Title";function ba(t){let a=[],r=i=>{let n=l(i);n&&n!==ga&&!a.includes(n)&&a.push(n)},e=Array.isArray(t.options)?["options","sizes","colors","colours"]:["sizes","colors","colours","variants"];for(let i of e)for(let n of ea(t[i]))d(n)?Array.isArray(n.values)?n.values.forEach(r):r(p(n,["title","name","value","label"])):r(n);return a.slice(0,50)}function ka(t){if(t.freeShipping===!0||t.free_shipping===!0)return{cost:0};let a=p(t,["shipping","delivery","shippingInfo","shipping_info"]);if(d(a)&&(a=p(a,["text","label","description"])??p(a,["cost","price","amount"])),typeof a=="number")return Number.isFinite(a)&&a>=0?{cost:a}:void 0;let r=l(a);if(!r)return;let e=g(r);return e!==void 0&&e>=0?{cost:e}:{text:r}}function wa(t){return Array.isArray(t)?t.map(a=>{let r=d(a)?l(a.label):void 0;if(!r)return null;let e=a.url!==void 0?_(a.url):void 0;if(e===null)return null;let i=l(a.id);return!e&&!i?null:{label:r,...e?{url:e}:{},...i?{id:i}:{},...a.primary===!0?{primary:!0}:{}}}).filter(a=>a!==null).slice(0,T):[]}var ya={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function za(t){return t.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(a,r)=>{if(r.startsWith("#")){let e=/^#x/i.test(r)?parseInt(r.slice(2),16):Number(r.slice(1));return e>0&&e<=1114111?String.fromCodePoint(e):a}return ya[r.toLowerCase()]??a})}function xa(t){return za(t.replace(/<\/?(?:br|p|li|div|h\d)(?=[\s/>])[^>]*>/gi," ").replace(/<[^>]*>/g,"")).replace(/\s+/g," ").trim()}function Pa(t){let a;for(let r of ea(t.variants)){if(!d(r))continue;let e=k(p(r,["price","amount"]));e.amount!==void 0&&(!a||e.amount<a.price.amount)&&(a={price:e,compare:k(p(r,["compare_at_price","compareAtPrice"]))})}return a}var aa=t=>d(t)?t.minVariantPrice:void 0;function Aa(t){if(!d(t))return null;let a=t,r=l(p(a,["title","name","productName","product_title"]));if(!r)return null;let e=a.offers,i=Array.isArray(e)?d(e[0])?e[0]:void 0:d(e)?e:void 0,n=p(a,["price","extracted_price","salePrice","sale_price","currentPrice","current_price"])??p(i,["price","lowPrice"])??aa(a.priceRange),s=n===void 0?Pa(a):void 0,c=s?s.price:k(n),m=p(a,["compareAtPrice","compare_at_price","originalPrice","original_price","listPrice","list_price","regularPrice","regular_price","wasPrice","was_price","extracted_old_price","oldPrice","old_price","msrp"])??aa(a.compareAtPriceRange),w=m===void 0&&s?s.compare:k(m),I=O(p(a,["currency","currency_code","currencyCode","priceCurrency"])??p(i,["priceCurrency"]))??c.currency??w.currency,h=p(a,["merchant","seller","store","shop","source","retailer","vendor"])??p(a,["brand"]),A=d(h)?l(p(h,["name","title"])):l(h),$=_(p(a,["merchantLogo","merchant_logo","source_icon","storeLogo","logo"])??(d(h)?p(h,["logo","icon","image"]):void 0)),N=l(p(a,["description","summary","snippet","subtitle","body_html","descriptionHtml"])),{rating:V,reviewCount:W}=ha(a),F=va(a,i),U=ka(a),H=oa(p(a,["image","images","thumbnail","image_url","imageUrl","featuredImage","photo"])),D=_(p(a,["url","link","permalink","product_link","productUrl","product_url","onlineStoreUrl","href"])??p(i,["url"])),B=l(p(a,["id","sku","product_id","productId"])),K=l(p(a,["badge","tag","ribbon"]));return{title:r,...B?{id:B}:{},...H?{image:H}:{},...c.amount!==void 0?{price:c.amount}:{},...I?{currency:I}:{},...c.amount!==void 0&&w.amount!==void 0&&w.amount>c.amount?{compareAtPrice:w.amount}:{},...V!==void 0?{rating:V}:{},...W!==void 0?{reviewCount:W}:{},...F?{availability:F}:{},...A?{merchant:A}:{},...A&&$?{merchantLogo:$}:{},...K?{badge:K}:{},options:ba(a),...U?{shipping:U}:{},...N?{description:xa(N)}:{},...D?{url:D}:{},actions:wa(a.actions)}}function Oa(t){if(!t||typeof t!="object")return null;let a,r;if(Array.isArray(t))a=t;else{let i=t,n=["products","results","shopping_results","items"].map(s=>i[s]).find(Array.isArray);n?(a=n,r=l(p(i,["title","heading"]))):a=[i]}let e=a.map(Aa).filter(i=>i!==null).slice(0,ma);return e.length?{...r?{title:r}:{},products:e}:null}function Ca(t){let{price:a,compareAtPrice:r}=t;if(a===void 0||r===void 0||r<=a||r<=0)return;let e=(r-a)/r;return Math.round(e*100)>=1?e:void 0}var x=(t,a,r)=>Q(t,r,a.currency),v=t=>t!=null;function j(t,a=""){let r=o("div",{class:`aparte-product__media${a?` ${a}`:""}`},y(ca,"aparte-rich-card__glyph aparte-product__placeholder"));if(!t.image)return r.setAttribute("data-empty",""),r;let e=o("img",{class:"aparte-product__image",attrs:{src:t.image.src,alt:t.image.alt??t.title,loading:"lazy",decoding:"async",referrerpolicy:"no-referrer"}});return e.addEventListener("error",()=>{e.hidden=!0,r.setAttribute("data-empty","")},{once:!0}),r.append(e),r}function M(t){let a=o("div",{class:"aparte-product__title"});return t.url?a.append(o("a",{class:"aparte-product__link",attrs:{href:t.url,target:"_blank",rel:"noopener noreferrer"},text:t.title})):a.textContent=t.title,a}function ia(t){if(!t.merchant)return null;let a=o("div",{class:"aparte-product__merchant"});if(t.merchantLogo){let r=o("img",{class:"aparte-product__logo",attrs:{src:t.merchantLogo,alt:"",loading:"lazy",decoding:"async",referrerpolicy:"no-referrer"}});r.addEventListener("error",()=>{r.hidden=!0},{once:!0}),a.append(r)}return a.append(o("span",{class:"aparte-product__merchant-name",text:t.merchant})),a}function na(t,a){let r=Ca(a);if(r===void 0)return null;let e=o("span",{class:"aparte-badge aparte-badge--danger aparte-badge--solid aparte-badge--sm aparte-product__discount"});return t.bind(e,()=>`\u2212${Y(t.config,r)}`),e}function q(t,a,r=!1){if(a.price===void 0)return null;let e=o("div",{class:"aparte-product__price"}),i=o("span",{class:"aparte-product__now"});if(t.bind(i,()=>x(t.config,a,a.price)),e.append(i),a.compareAtPrice!==void 0){let n=o("span",{class:"aparte-sr-only"});t.bind(n,()=>`${f(t.config,"cardsProductWas",u.cardsProductWas)} `);let s=o("span",{class:"aparte-product__was-value"});t.bind(s,()=>x(t.config,a,a.compareAtPrice)),e.append(o("del",{class:"aparte-product__was"},n,s));let c=r?na(t,a):null;c&&e.append(c)}return e}function R(t,a){let r=a.availability;if(!r)return null;let e="status"in r?r.status:void 0,i=o("span",{class:"aparte-product__stock-text"});return e?t.word(i,J[e],u[J[e]]):i.textContent=r.text,o("div",{class:"aparte-product__stock",attrs:{"data-availability":e??"other"}},o("span",{class:"aparte-product__dot",attrs:{"aria-hidden":"true"}}),i)}function Sa(t,a){let r=a.shipping;if(!r)return null;let e=o("span",{class:"aparte-product__shipping-text"});return"text"in r?e.textContent=r.text:r.cost===0?t.word(e,"cardsProductFreeShipping",u.cardsProductFreeShipping):t.bind(e,()=>f(t.config,"cardsProductShippingCost",u.cardsProductShippingCost,{price:x(t.config,a,r.cost)})),o("div",{class:"aparte-product__shipping",attrs:{"data-free":"cost"in r&&r.cost===0}},y(da,"aparte-rich-card__glyph aparte-product__shipping-icon"),e)}function pa(t,a,r){let e=[a.badge?o("span",{class:"aparte-badge aparte-badge--sm aparte-product__badge",text:a.badge}):null,r?na(t,a):null].filter(v);return e.length?o("div",{class:"aparte-product__flags"},...e):null}function Ta(t,a){if(!a.options.length)return null;let r=o("ul",{class:"aparte-product__options",attrs:{role:"list"}});t.bind(r,()=>f(t.config,"cardsProductOptions",u.cardsProductOptions),"aria-label");for(let i of a.options.slice(0,Z))r.append(o("li",{class:"aparte-tag aparte-tag--sm aparte-product__option"},o("span",{class:"aparte-tag__label",text:i})));let e=a.options.length-Z;if(e>0){let i=o("span",{class:"aparte-tag__label",attrs:{"aria-hidden":"true"}});t.bind(i,()=>`+${b(t.config,e)}`);let n=o("span",{class:"aparte-sr-only"});t.bind(n,()=>f(t.config,"cardsProductMoreOptions",u.cardsProductMoreOptions,{n:b(t.config,e)})),r.append(o("li",{class:"aparte-tag aparte-tag--sm aparte-product__option aparte-product__option--more"},i,n))}return r}function E(t,a,r){let e=a.actions.slice(0,r).map(i=>t.action(i,a,"aparte-product__action")).filter(v);return e.length?o("div",{class:"aparte-product__actions"},...e):null}function L(t,a,r=""){return o("div",{class:`aparte-product aparte-product--${t}${r?` ${r}`:""}`,attrs:{"data-availability":a.availability&&"status"in a.availability?a.availability.status:void 0,"data-linked":a.url!==void 0}})}function S(t,a,{actions:r,mini:e=!1}){let i=L("tile",a,e?"aparte-product--mini":""),n=j(a),s=e?null:pa(t,a,!0);s&&n.append(s);let c=o("div",{class:"aparte-product__body"},e?null:ia(a),M(a),e?null:z(t,a.rating,{count:a.reviewCount}),q(t,a),e?null:R(t,a));i.append(n,c);let m=E(t,a,r);return m&&i.append(m),i}function ta(t,a){let r=L("row",a),e=o("div",{class:"aparte-product__meta"},a.merchant?o("span",{class:"aparte-product__merchant-name",text:a.merchant}):null,z(t,a.rating,{starsOnly:!0}),a.availability&&!("status"in a.availability&&a.availability.status==="in-stock")?R(t,a):null),i=o("div",{class:"aparte-product__main"},M(a),e.childNodes.length?e:null);r.append(j(a,"aparte-product__thumb"),i);let n=q(t,a);n&&r.append(n);let s=E(t,a,1);return s&&r.append(s),r}function ja(t,a){let r=L("detail",a),e=j(a),i=pa(t,a,!1);i&&e.append(i);let n=a.url?o("a",{class:"aparte-product__media-link",attrs:{href:a.url,target:"_blank",rel:"noopener noreferrer",tabindex:-1,"aria-hidden":"true"}},e):e,s=o("div",{class:"aparte-product__facts"},R(t,a),Sa(t,a)),c=o("div",{class:"aparte-product__body"},ia(a),M(a),z(t,a.rating,{count:a.reviewCount}),q(t,a,!0),s.childNodes.length?s:null,a.description?o("p",{class:"aparte-product__description",text:a.description}):null,Ta(t,a),E(t,a,T));return r.append(n,c),o("div",{class:"aparte-product__detail"},r)}function ra(t){return t.title?o("div",{class:"aparte-product__heading",text:t.title}):null}function sa(t,a){let r=t?.products??[];return r.length===1?r[0].title:t?.title?t.title:r.length>1?f(a.config,"cardsProductCount",u.cardsProductCount,{n:b(a.config,r.length)}):f(a.config,"cardsProductTitle",u.cardsProductTitle)}function Ma(t,a){let{products:r}=t,e=r[0];if(a.variant==="detail"){let n=[ja(a,e)];if(r.length>1){let s=o("div",{class:"aparte-product__more-title"});a.word(s,"cardsProductMore",u.cardsProductMore);let c=r.slice(1).map(m=>S(a,m,{actions:0,mini:!0}));n.push(o("div",{class:"aparte-product__more"},s,C(a,c,{label:()=>f(a.config,"cardsProductMore",u.cardsProductMore)})))}return n}if(a.variant==="compact"){if(r.length===1)return[ta(a,e)];let n=o("ul",{class:"aparte-product__rows",attrs:{role:"list"}},...r.map(s=>o("li",{class:"aparte-product__item"},ta(a,s))));return[ra(t),n].filter(v)}if(r.length===1)return[S(a,e,{actions:T})];let i=r.map(n=>S(a,n,{actions:1}));return[o("div",{class:"aparte-product__collection"},ra(t),C(a,i,{label:()=>sa(t,a)}))]}function qa(t,a){let r=(s,c="rect")=>o("span",{class:`aparte-skeleton aparte-skeleton--${c} ${s}`,attrs:{"aria-hidden":"true"}}),e=()=>[r("aparte-product__sk-line","text"),r("aparte-product__sk-line aparte-product__sk-line--short","text")],i=t?.title?o("div",{class:"aparte-product__query"},y(la,"aparte-rich-card__glyph aparte-product__query-icon"),o("span",{class:"aparte-product__query-text",text:t.title})):null;if(a.variant==="compact"){let s=[0,1,2].map(()=>o("div",{class:"aparte-product__item"},o("div",{class:"aparte-product aparte-product--row aparte-product--skeleton"},r("aparte-product__sk-thumb"),o("div",{class:"aparte-product__main"},...e()),r("aparte-product__sk-price","text"))));return[i,o("div",{class:"aparte-product__rows"},...s)].filter(v)}if(a.variant==="detail")return[i,o("div",{class:"aparte-product__detail"},o("div",{class:"aparte-product aparte-product--detail aparte-product--skeleton"},r("aparte-product__sk-media"),o("div",{class:"aparte-product__body"},...e(),r("aparte-product__sk-price","text"),r("aparte-product__sk-line","text"))))].filter(v);let n=[0,1,2].map(()=>o("div",{class:"aparte-product aparte-product--tile aparte-product--skeleton"},r("aparte-product__sk-media"),o("div",{class:"aparte-product__body"},...e(),r("aparte-product__sk-price","text"))));return[o("div",{class:"aparte-product__collection"},i,o("div",{class:"aparte-product__sk-track"},...n))]}var Ra=G({name:"product",variants:["card","compact","detail"],styles:fa,icon:ua,normalize:Oa,render:Ma,skeleton:qa,label:sa,fallback:(t,a)=>{let r=t.products.map(e=>{let i=e.price!==void 0?` \u2014 ${x(a.config,e,e.price)}`:"",n=e.rating!==void 0?` (${b(a.config,e.rating,{maximumFractionDigits:1})}/5)`:"";return`${e.title}${i}${n}`});return[t.title,...r].filter(v).join(`
659
+ `)},partial:t=>{let a=l(t.query??t.q??t.search??t.keywords??t.term??t.product);return a?{title:a}:null}});function $a(t={}){return Ra.setup(t)}export{Ca as discountOf,Ra as productCard,Oa as readProducts,$a as setupProductCard};
660
+ //# sourceMappingURL=product-7UBLOMZ7.js.map