@askdialog/dialog-vue 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -7
- package/dist/components/DialogProductBlock/DialogInput.vue.d.ts +1 -0
- package/dist/components/DialogProductBlock/inputMessages.d.ts +6 -0
- package/dist/components/DialogSearch/DialogSearchCollections.vue.d.ts +9 -0
- package/dist/components/DialogSearch/DialogSearchPagination.vue.d.ts +1 -0
- package/dist/components/DialogSearch/DialogSearchProductCard.vue.d.ts +6 -1
- package/dist/components/DialogSearch/DialogSearchProducts.vue.d.ts +10 -0
- package/dist/components/DialogSearch/DialogSearchResults.vue.d.ts +14 -2
- package/dist/components/DialogSearch/{DialogSearchProductCardContent.vue.d.ts → HighlightedTitle.vue.d.ts} +2 -3
- package/dist/components/DialogSearch/cssColor.d.ts +3 -0
- package/dist/components/DialogSearch/panelPlacement.d.ts +5 -0
- package/dist/components/DialogSearch/searchCollections.d.ts +6 -0
- package/dist/components/DialogSearch/searchDisplay.d.ts +5 -2
- package/dist/components/DialogSearch/searchLayout.d.ts +1 -0
- package/dist/components/DialogSearch/searchMessages.d.ts +14 -0
- package/dist/components/DialogSearch/searchPagination.d.ts +2 -0
- package/dist/components/DialogSearch/searchTheme.d.ts +3 -0
- package/dist/components/DialogSearch/titleHighlight.d.ts +6 -0
- package/dist/components/DialogSearch/useAnchorRect.d.ts +6 -1
- package/dist/components/DialogSearch/useDialogSearch.d.ts +8 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/dialog-vue.css +1 -1
- package/dist/dialog-vue.js +920 -557
- package/dist/dialog-vue.umd.cjs +3 -3
- package/dist/icons/ArrowRightIcon.vue.d.ts +2 -0
- package/dist/icons/CaretRightIcon.vue.d.ts +2 -0
- package/package.json +2 -2
package/dist/dialog-vue.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
2
|
+
var ye = (t, e, s) => e in t ? Ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var z = (t, e, s) => ye(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
+
import { defineComponent as w, createElementBlock as _, openBlock as u, createElementVNode as l, toDisplayString as E, Fragment as N, renderList as Q, createVNode as T, createBlock as O, ref as k, computed as b, withDirectives as ae, withKeys as Ee, vModelText as ie, onMounted as B, watch as M, renderSlot as we, withCtx as le, createCommentVNode as A, withModifiers as Ie, unref as K, resolveDynamicComponent as $e, mergeProps as Re, toHandlers as Te, createTextVNode as ce, onUnmounted as ue, Teleport as ke, normalizeStyle as Ae, normalizeClass as Z, shallowRef as Le } from "vue";
|
|
5
|
+
const xe = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur"]), De = (t) => t !== void 0 && xe.has(t.trim().toLowerCase().slice(0, 2)), Pe = (t) => De(t) ? "rtl" : "ltr";
|
|
6
|
+
var q;
|
|
7
7
|
(function(t) {
|
|
8
|
-
t.OPEN_ASSISTANT = "open_assistant", t.CLOSE_ASSISTANT = "close_assistant", t.SEND_MESSAGE = "PRODUCT_QUESTION", t.SEND_GENERIC_QUESTION = "GENERIC_QUESTION", t.TRACK_ADD_TO_CART = "TRACK_ADD_TO_CART", t.TRACK_SUBMIT_CHECKOUT = "TRACK_SUBMIT_CHECKOUT", t.TRACK_VIEW_SEARCH_RESULTS = "TRACK_VIEW_SEARCH_RESULTS", t.TRACK_SELECT_SEARCH_RESULT = "TRACK_SELECT_SEARCH_RESULT";
|
|
9
|
-
})(
|
|
10
|
-
var
|
|
8
|
+
t.OPEN_ASSISTANT = "open_assistant", t.OPEN_WITH_SUGGESTIONS = "OPEN_WITH_SUGGESTIONS", t.CLOSE_ASSISTANT = "close_assistant", t.SEND_MESSAGE = "PRODUCT_QUESTION", t.SEND_GENERIC_QUESTION = "GENERIC_QUESTION", t.TRACK_ADD_TO_CART = "TRACK_ADD_TO_CART", t.TRACK_SUBMIT_CHECKOUT = "TRACK_SUBMIT_CHECKOUT", t.TRACK_VIEW_SEARCH_RESULTS = "TRACK_VIEW_SEARCH_RESULTS", t.TRACK_SELECT_SEARCH_RESULT = "TRACK_SELECT_SEARCH_RESULT";
|
|
9
|
+
})(q || (q = {}));
|
|
10
|
+
var J;
|
|
11
11
|
(function(t) {
|
|
12
12
|
t.USER_OPENED_ASSISTANT = "userOpenedAssistant", t.USER_CLOSED_ASSISTANT = "userClosedAssistant", t.USER_SENT_MESSAGE = "userSentMessage", t.USER_CLICKED_ON_PRODUCT_CARD = "userClickedOnProductCard", t.USER_OPENED_RECOMMENDATION = "userOpenedRecommendation", t.USER_ADDED_TO_CART = "userAddedToCart", t.USER_SEND_POSITIVE_FEEDBACK = "userSendPositiveFeedback", t.USER_SEND_NEGATIVE_FEEDBACK = "userSendNegativeFeedback";
|
|
13
|
-
})(
|
|
14
|
-
|
|
15
|
-
class
|
|
16
|
-
constructor({ status:
|
|
17
|
-
super(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.name = "DialogSearchError", this.status =
|
|
13
|
+
})(J || (J = {}));
|
|
14
|
+
q.TRACK_ADD_TO_CART, q.TRACK_SUBMIT_CHECKOUT, q.TRACK_VIEW_SEARCH_RESULTS, q.TRACK_SELECT_SEARCH_RESULT;
|
|
15
|
+
class Oe extends Error {
|
|
16
|
+
constructor({ status: s, code: o, message: r }) {
|
|
17
|
+
super(r);
|
|
18
|
+
z(this, "status");
|
|
19
|
+
z(this, "code");
|
|
20
|
+
this.name = "DialogSearchError", this.status = s, this.code = o;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const X = (t, e, s) => {
|
|
24
24
|
if (!/^[a-z]{2}$/.test(e))
|
|
25
25
|
throw new Error("Search language must be a lowercase ISO 639-1 code.");
|
|
26
|
-
if (!/^[A-Za-z]{3}$/.test(
|
|
26
|
+
if (!/^[A-Za-z]{3}$/.test(s))
|
|
27
27
|
throw new Error("Search currency must be an ISO 4217 code.");
|
|
28
|
-
return `${t}_${e}_${
|
|
29
|
-
},
|
|
30
|
-
const t =
|
|
28
|
+
return `${t}_${e}_${s.toLowerCase()}`;
|
|
29
|
+
}, ee = "multiple installation methods detected:", Ne = () => typeof window > "u" ? void 0 : window, de = () => {
|
|
30
|
+
const t = Ne();
|
|
31
31
|
if (t !== void 0)
|
|
32
32
|
return t.dialog = t.dialog ?? {}, t.dialog.audit = t.dialog.audit ?? {
|
|
33
33
|
methods: [],
|
|
@@ -35,264 +35,264 @@ const j = (t, e, o) => {
|
|
|
35
35
|
capabilities: [],
|
|
36
36
|
warnings: []
|
|
37
37
|
}, t.dialog.audit;
|
|
38
|
-
},
|
|
39
|
-
if (t.warnings = t.warnings.filter((e) => !e.startsWith(
|
|
40
|
-
const e = t.methods.map((
|
|
41
|
-
t.warnings.push(`${
|
|
38
|
+
}, qe = (t) => {
|
|
39
|
+
if (t.warnings = t.warnings.filter((e) => !e.startsWith(ee)), t.methods.length >= 2) {
|
|
40
|
+
const e = t.methods.map((s) => s.method).join(", ");
|
|
41
|
+
t.warnings.push(`${ee} ${e}`);
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, Me = (t, e) => e === void 0 ? t : {
|
|
44
44
|
version: (t == null ? void 0 : t.version) ?? e.version,
|
|
45
45
|
commit: (t == null ? void 0 : t.commit) ?? e.commit
|
|
46
|
-
},
|
|
47
|
-
const e =
|
|
46
|
+
}, pe = (t) => {
|
|
47
|
+
const e = de();
|
|
48
48
|
if (e === void 0)
|
|
49
49
|
return;
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
50
|
+
const s = e.methods.find((o) => o.method === t.method);
|
|
51
|
+
if (s === void 0) {
|
|
52
|
+
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }), qe(e);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
const e =
|
|
55
|
+
s.version = s.version ?? t.version, s.build = Me(s.build, t.build), s.source = s.source ?? t.source;
|
|
56
|
+
}, Ue = (t) => {
|
|
57
|
+
const e = de();
|
|
58
58
|
e !== void 0 && (e.capabilities.includes(t) || e.capabilities.push(t));
|
|
59
|
-
},
|
|
59
|
+
}, L = {
|
|
60
60
|
IDLE: "idle",
|
|
61
61
|
LOADING: "loading",
|
|
62
62
|
SUCCESS: "success",
|
|
63
63
|
/** Successful request with zero hits. */
|
|
64
64
|
EMPTY: "empty",
|
|
65
65
|
ERROR: "error"
|
|
66
|
-
},
|
|
67
|
-
function
|
|
68
|
-
let
|
|
69
|
-
const a = /* @__PURE__ */ new Set(),
|
|
70
|
-
let
|
|
71
|
-
const
|
|
72
|
-
clearTimeout(
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
66
|
+
}, He = 0.5, Ve = 500, Be = 1500, Ke = 100;
|
|
67
|
+
function Fe({ emit: t, visibilityThreshold: e = He, dwellMs: s = Ve, idleFlushMs: o = Be, maxItemsPerEvent: r = Ke }) {
|
|
68
|
+
let n, i = [];
|
|
69
|
+
const a = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
70
|
+
let d;
|
|
71
|
+
const g = () => {
|
|
72
|
+
clearTimeout(d), !(n === void 0 || i.length === 0) && (t({ ...n, items: i }), i = []);
|
|
73
|
+
}, y = (m) => {
|
|
74
|
+
if (n === void 0)
|
|
75
75
|
return;
|
|
76
|
-
const
|
|
77
|
-
if (!a.has(
|
|
78
|
-
if (a.add(
|
|
79
|
-
|
|
76
|
+
const v = `${n.query_id}:${m.product_id}`;
|
|
77
|
+
if (!a.has(v)) {
|
|
78
|
+
if (a.add(v), i.push(m), i.length >= r) {
|
|
79
|
+
g();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
clearTimeout(
|
|
82
|
+
clearTimeout(d), d = setTimeout(g, o);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
c.delete(
|
|
92
|
-
},
|
|
84
|
+
}, S = (m) => {
|
|
85
|
+
const v = c.get(m);
|
|
86
|
+
v !== void 0 && (clearTimeout(v), c.delete(m));
|
|
87
|
+
}, f = new IntersectionObserver((m) => {
|
|
88
|
+
for (const v of m) {
|
|
89
|
+
const p = h.get(v.target);
|
|
90
|
+
p !== void 0 && (v.intersectionRatio >= e ? c.has(v.target) || c.set(v.target, setTimeout(() => {
|
|
91
|
+
c.delete(v.target), y(p);
|
|
92
|
+
}, s)) : S(v.target));
|
|
93
93
|
}
|
|
94
|
-
}, { threshold: e }),
|
|
95
|
-
|
|
96
|
-
for (const
|
|
97
|
-
clearTimeout(
|
|
98
|
-
c.clear(),
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
94
|
+
}, { threshold: e }), I = () => {
|
|
95
|
+
f.disconnect();
|
|
96
|
+
for (const m of c.values())
|
|
97
|
+
clearTimeout(m);
|
|
98
|
+
c.clear(), h.clear();
|
|
99
|
+
}, $ = () => {
|
|
100
|
+
g();
|
|
101
|
+
}, R = (m) => {
|
|
102
|
+
if (m.persisted) {
|
|
103
103
|
a.clear();
|
|
104
|
-
for (const
|
|
105
|
-
|
|
104
|
+
for (const v of h.keys())
|
|
105
|
+
S(v), f.unobserve(v), f.observe(v);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
return window.addEventListener("pagehide",
|
|
109
|
-
setContext(
|
|
110
|
-
|
|
108
|
+
return window.addEventListener("pagehide", $), window.addEventListener("pageshow", R), {
|
|
109
|
+
setContext(m) {
|
|
110
|
+
g(), a.clear(), n = m, I();
|
|
111
111
|
},
|
|
112
|
-
observe(
|
|
113
|
-
|
|
112
|
+
observe(m, v) {
|
|
113
|
+
h.set(m, v), f.observe(m);
|
|
114
114
|
},
|
|
115
|
-
forceImpression(
|
|
116
|
-
|
|
115
|
+
forceImpression(m) {
|
|
116
|
+
y(m), g();
|
|
117
117
|
},
|
|
118
|
-
flush:
|
|
118
|
+
flush: g,
|
|
119
119
|
disconnect() {
|
|
120
|
-
|
|
120
|
+
g(), I(), window.removeEventListener("pagehide", $), window.removeEventListener("pageshow", R);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const te = (t, e) => ({
|
|
125
125
|
product_id: t.hits[e].objectID,
|
|
126
126
|
// One-based position across all pages.
|
|
127
127
|
position: t.page * t.hitsPerPage + e + 1
|
|
128
128
|
});
|
|
129
|
-
function
|
|
130
|
-
let e,
|
|
131
|
-
const
|
|
129
|
+
function ze(t) {
|
|
130
|
+
let e, s;
|
|
131
|
+
const o = () => (e ?? (e = Fe({
|
|
132
132
|
emit: t.trackViewSearchResults
|
|
133
133
|
})), e);
|
|
134
134
|
return {
|
|
135
|
-
onResponse(
|
|
136
|
-
|
|
137
|
-
query_id:
|
|
138
|
-
index:
|
|
135
|
+
onResponse(r) {
|
|
136
|
+
s = {
|
|
137
|
+
query_id: r.queryID,
|
|
138
|
+
index: r.index,
|
|
139
139
|
surface: t.surface,
|
|
140
140
|
search_type: "lexical",
|
|
141
141
|
// Convert the API page to one-based analytics numbering.
|
|
142
|
-
page:
|
|
143
|
-
total_hits:
|
|
144
|
-
query_length: [...
|
|
145
|
-
},
|
|
142
|
+
page: r.page + 1,
|
|
143
|
+
total_hits: r.nbHits,
|
|
144
|
+
query_length: [...r.query].length
|
|
145
|
+
}, o().setContext(s), r.nbHits === 0 && t.trackViewSearchResults({ ...s, items: [] });
|
|
146
146
|
},
|
|
147
|
-
observeResult(
|
|
148
|
-
|
|
147
|
+
observeResult(r, n, i) {
|
|
148
|
+
o().observe(r, te(n, i));
|
|
149
149
|
},
|
|
150
|
-
select(
|
|
151
|
-
if (
|
|
150
|
+
select(r, n) {
|
|
151
|
+
if (s === void 0)
|
|
152
152
|
return;
|
|
153
|
-
const
|
|
154
|
-
|
|
153
|
+
const i = te(r, n);
|
|
154
|
+
o().forceImpression(i), t.trackSelectSearchResult({ ...s, items: [i] });
|
|
155
155
|
},
|
|
156
156
|
dispose() {
|
|
157
157
|
e == null || e.disconnect();
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const je = 2, se = (t) => {
|
|
162
162
|
const e = t.trim();
|
|
163
|
-
return [...e].length >=
|
|
164
|
-
},
|
|
163
|
+
return [...e].length >= je ? e : void 0;
|
|
164
|
+
}, Ge = (t, e, s, { indexName: o, language: r, currency: n, hitsPerPage: i }) => ({
|
|
165
165
|
requests: [
|
|
166
|
-
{ indexName:
|
|
167
|
-
...
|
|
168
|
-
indexName:
|
|
166
|
+
{ indexName: o, query: t, page: e, hitsPerPage: i },
|
|
167
|
+
...s.map((a) => ({
|
|
168
|
+
indexName: X(a.index, r, n),
|
|
169
169
|
query: t,
|
|
170
170
|
page: 0,
|
|
171
|
-
hitsPerPage: a.hitsPerPage ??
|
|
171
|
+
hitsPerPage: a.hitsPerPage ?? i
|
|
172
172
|
}))
|
|
173
173
|
]
|
|
174
|
-
}),
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
177
|
-
throw new Error(`Dialog search returned no ${
|
|
178
|
-
const
|
|
174
|
+
}), We = (t, e, { indexName: s, language: o, currency: r }) => {
|
|
175
|
+
const n = t.results.find((a) => a.index === s);
|
|
176
|
+
if (n === void 0)
|
|
177
|
+
throw new Error(`Dialog search returned no ${s} entry`);
|
|
178
|
+
const i = {};
|
|
179
179
|
for (const a of e) {
|
|
180
|
-
const
|
|
181
|
-
c !== void 0 && (
|
|
180
|
+
const h = X(a.index, o, r), c = t.results.find((d) => d.index === h);
|
|
181
|
+
c !== void 0 && (i[a.index] = c);
|
|
182
182
|
}
|
|
183
183
|
return {
|
|
184
|
-
response:
|
|
185
|
-
sections: e.length === 0 ? void 0 :
|
|
184
|
+
response: n,
|
|
185
|
+
sections: e.length === 0 ? void 0 : i
|
|
186
186
|
};
|
|
187
|
-
},
|
|
188
|
-
status:
|
|
187
|
+
}, j = {
|
|
188
|
+
status: L.IDLE,
|
|
189
189
|
query: "",
|
|
190
190
|
page: 0,
|
|
191
191
|
response: void 0,
|
|
192
192
|
sections: void 0,
|
|
193
193
|
error: void 0
|
|
194
194
|
};
|
|
195
|
-
function
|
|
196
|
-
const
|
|
197
|
-
indexName:
|
|
195
|
+
function Qe({ search: t, language: e, currency: s, analytics: o, navigate: r, debounceMs: n = 250, hitsPerPage: i = 12, sections: a = [] }) {
|
|
196
|
+
const h = {
|
|
197
|
+
indexName: X("products", e, s),
|
|
198
198
|
language: e,
|
|
199
|
-
currency:
|
|
200
|
-
hitsPerPage:
|
|
199
|
+
currency: s,
|
|
200
|
+
hitsPerPage: i
|
|
201
201
|
};
|
|
202
|
-
let c =
|
|
203
|
-
const
|
|
204
|
-
let
|
|
205
|
-
const
|
|
206
|
-
c = { ...c, ...
|
|
207
|
-
for (const
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
clearTimeout(
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
202
|
+
let c = j;
|
|
203
|
+
const d = /* @__PURE__ */ new Set(), g = ze(o);
|
|
204
|
+
let y, S, f, I = 0, $ = !1;
|
|
205
|
+
const R = (p) => {
|
|
206
|
+
c = { ...c, ...p };
|
|
207
|
+
for (const C of d)
|
|
208
|
+
C(c);
|
|
209
|
+
}, m = () => {
|
|
210
|
+
clearTimeout(y), S = void 0, I += 1, f == null || f.abort(), f = void 0;
|
|
211
|
+
}, v = async (p, C) => {
|
|
212
|
+
m(), f = new AbortController();
|
|
213
|
+
const P = I;
|
|
214
|
+
R({ status: L.LOADING, query: p, page: C });
|
|
215
215
|
try {
|
|
216
|
-
const
|
|
217
|
-
signal:
|
|
216
|
+
const x = typeof a == "function" ? a() : a, Y = Ge(p, C, x, h), Se = await t(Y, {
|
|
217
|
+
signal: f.signal
|
|
218
218
|
});
|
|
219
|
-
if (
|
|
219
|
+
if (P !== I)
|
|
220
220
|
return;
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
...
|
|
224
|
-
status:
|
|
221
|
+
const F = We(Se, x, h);
|
|
222
|
+
g.onResponse(F.response), R({
|
|
223
|
+
...F,
|
|
224
|
+
status: F.response.nbHits === 0 ? L.EMPTY : L.SUCCESS,
|
|
225
225
|
error: void 0
|
|
226
226
|
});
|
|
227
|
-
} catch (
|
|
228
|
-
if (
|
|
227
|
+
} catch (x) {
|
|
228
|
+
if (x instanceof DOMException && x.name === "AbortError" || P !== I)
|
|
229
229
|
return;
|
|
230
|
-
|
|
231
|
-
status:
|
|
232
|
-
error:
|
|
230
|
+
R({
|
|
231
|
+
status: L.ERROR,
|
|
232
|
+
error: x,
|
|
233
233
|
response: void 0,
|
|
234
234
|
sections: void 0
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
return {
|
|
239
|
-
setQuery(
|
|
240
|
-
if (
|
|
239
|
+
setQuery(p) {
|
|
240
|
+
if ($)
|
|
241
241
|
return;
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
|
|
242
|
+
m();
|
|
243
|
+
const C = se(p);
|
|
244
|
+
if (C === void 0) {
|
|
245
|
+
R(j);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
S = C, y = setTimeout(() => void v(C, 0), n);
|
|
249
249
|
},
|
|
250
|
-
submit(
|
|
251
|
-
if (
|
|
250
|
+
submit(p) {
|
|
251
|
+
if ($)
|
|
252
252
|
return;
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
|
|
253
|
+
m();
|
|
254
|
+
const C = se(p);
|
|
255
|
+
if (C === void 0) {
|
|
256
|
+
R(j);
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
v(C, 0);
|
|
260
260
|
},
|
|
261
|
-
setPage(
|
|
262
|
-
if (
|
|
263
|
-
if (
|
|
264
|
-
|
|
261
|
+
setPage(p) {
|
|
262
|
+
if (!$) {
|
|
263
|
+
if (S !== void 0) {
|
|
264
|
+
v(S, 0);
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
c.query !== "" &&
|
|
267
|
+
c.query !== "" && v(c.query, p);
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
270
|
retry() {
|
|
271
|
-
|
|
271
|
+
$ || c.status !== L.ERROR || v(c.query, c.page);
|
|
272
272
|
},
|
|
273
|
-
observeResult(
|
|
274
|
-
c.response !== void 0 &&
|
|
273
|
+
observeResult(p, C) {
|
|
274
|
+
c.response !== void 0 && g.observeResult(p, c.response, C);
|
|
275
275
|
},
|
|
276
|
-
selectResult(
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
276
|
+
selectResult(p, C) {
|
|
277
|
+
const P = c.response;
|
|
278
|
+
if (P === void 0)
|
|
279
279
|
return !1;
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
return ((
|
|
280
|
+
g.select(P, p);
|
|
281
|
+
const x = P.hits[p].url;
|
|
282
|
+
return ((C == null ? void 0 : C.navigate) ?? !0) && r !== void 0 && x !== void 0 ? (r(x, P.hits[p]), !0) : !1;
|
|
283
283
|
},
|
|
284
|
-
subscribe(
|
|
285
|
-
return
|
|
286
|
-
|
|
284
|
+
subscribe(p) {
|
|
285
|
+
return d.add(p), () => {
|
|
286
|
+
d.delete(p);
|
|
287
287
|
};
|
|
288
288
|
},
|
|
289
289
|
getState: () => c,
|
|
290
290
|
dispose() {
|
|
291
|
-
|
|
291
|
+
$ = !0, m(), d.clear(), g.dispose();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const Xe = { class: "dialog-block-header-container" }, Ye = { class: "dialog-block-title" }, Ze = { class: "dialog-block-description" }, Je = /* @__PURE__ */ w({
|
|
296
296
|
__name: "DialogBlockHeader",
|
|
297
297
|
props: {
|
|
298
298
|
title: {},
|
|
@@ -300,32 +300,32 @@ const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-blo
|
|
|
300
300
|
},
|
|
301
301
|
setup(t) {
|
|
302
302
|
const e = t;
|
|
303
|
-
return (
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
return (s, o) => (u(), _("div", Xe, [
|
|
304
|
+
l("div", Ye, E(e.title ?? "Your expert"), 1),
|
|
305
|
+
l("div", Ze, E(e.description ?? "A question about this product?"), 1)
|
|
306
306
|
]));
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
309
|
-
const
|
|
310
|
-
for (const [
|
|
311
|
-
o
|
|
312
|
-
return
|
|
313
|
-
},
|
|
308
|
+
}), D = (t, e) => {
|
|
309
|
+
const s = t.__vccOpts || t;
|
|
310
|
+
for (const [o, r] of e)
|
|
311
|
+
s[o] = r;
|
|
312
|
+
return s;
|
|
313
|
+
}, et = /* @__PURE__ */ D(Je, [["__scopeId", "data-v-28e6dda7"]]), tt = {
|
|
314
314
|
width: "20",
|
|
315
315
|
height: "20",
|
|
316
316
|
viewBox: "0 0 20 20",
|
|
317
317
|
fill: "none",
|
|
318
318
|
xmlns: "http://www.w3.org/2000/svg"
|
|
319
|
-
},
|
|
319
|
+
}, st = { "clip-path": "url(#clip0_466_934)" }, ot = ["stroke"], nt = ["stroke"], rt = /* @__PURE__ */ w({
|
|
320
320
|
__name: "AiStarsIcon",
|
|
321
321
|
props: {
|
|
322
322
|
color: {}
|
|
323
323
|
},
|
|
324
324
|
setup(t) {
|
|
325
325
|
const e = t;
|
|
326
|
-
return (
|
|
327
|
-
|
|
328
|
-
|
|
326
|
+
return (s, o) => (u(), _("svg", tt, [
|
|
327
|
+
l("g", st, [
|
|
328
|
+
l("path", {
|
|
329
329
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
330
330
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
331
331
|
13.7084 7.85932 13.9296L9.16675 14.5833L7.85932 15.237C7.41684 15.4583 7.19559
|
|
@@ -340,8 +340,8 @@ const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-blo
|
|
|
340
340
|
"stroke-width": "1.5",
|
|
341
341
|
"stroke-linecap": "round",
|
|
342
342
|
"stroke-linejoin": "round"
|
|
343
|
-
}, null, 8,
|
|
344
|
-
|
|
343
|
+
}, null, 8, ot),
|
|
344
|
+
l("path", {
|
|
345
345
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
346
346
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
347
347
|
6.2828 15.7797 6.5178L18.3334 7.49999L15.7797 8.48217C15.1687 8.71718 14.8632
|
|
@@ -356,11 +356,11 @@ const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-blo
|
|
|
356
356
|
"stroke-width": "1.5",
|
|
357
357
|
"stroke-linecap": "round",
|
|
358
358
|
"stroke-linejoin": "round"
|
|
359
|
-
}, null, 8,
|
|
359
|
+
}, null, 8, nt)
|
|
360
360
|
]),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
o[0] || (o[0] = l("defs", null, [
|
|
362
|
+
l("clipPath", { id: "clip0_466_934" }, [
|
|
363
|
+
l("rect", {
|
|
364
364
|
width: "20",
|
|
365
365
|
height: "20",
|
|
366
366
|
fill: "white"
|
|
@@ -369,7 +369,7 @@ const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-blo
|
|
|
369
369
|
], -1))
|
|
370
370
|
]));
|
|
371
371
|
}
|
|
372
|
-
}),
|
|
372
|
+
}), at = ["onClick"], it = { class: "dialog-block-suggestions-item-label" }, lt = /* @__PURE__ */ w({
|
|
373
373
|
__name: "DialogBlockSuggestions",
|
|
374
374
|
props: {
|
|
375
375
|
client: {},
|
|
@@ -379,36 +379,36 @@ const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-blo
|
|
|
379
379
|
selectedVariantId: {}
|
|
380
380
|
},
|
|
381
381
|
setup(t) {
|
|
382
|
-
const e = t,
|
|
382
|
+
const e = t, s = (o) => {
|
|
383
383
|
e.client.sendProductMessage({
|
|
384
384
|
productId: e.productId,
|
|
385
385
|
productTitle: e.productTitle,
|
|
386
386
|
selectedVariantId: e.selectedVariantId,
|
|
387
|
-
question:
|
|
387
|
+
question: o,
|
|
388
388
|
fromQuestionSuggestion: !0
|
|
389
389
|
});
|
|
390
390
|
};
|
|
391
|
-
return (
|
|
392
|
-
key:
|
|
391
|
+
return (o, r) => (u(!0), _(N, null, Q(e.questions, (n) => (u(), _("button", {
|
|
392
|
+
key: n.question,
|
|
393
393
|
class: "dialog-block-suggestions-item",
|
|
394
|
-
onClick: (
|
|
394
|
+
onClick: (i) => s(n.question)
|
|
395
395
|
}, [
|
|
396
|
-
|
|
396
|
+
T(rt, {
|
|
397
397
|
class: "dialog-block-suggestions-item-icon",
|
|
398
398
|
color: e.client.theme.primaryColor
|
|
399
399
|
}, null, 8, ["color"]),
|
|
400
|
-
|
|
401
|
-
], 8,
|
|
400
|
+
l("span", it, E(n.question), 1)
|
|
401
|
+
], 8, at))), 128));
|
|
402
402
|
}
|
|
403
|
-
}),
|
|
404
|
-
function
|
|
405
|
-
return
|
|
406
|
-
e[0] || (e[0] =
|
|
407
|
-
e[1] || (e[1] =
|
|
408
|
-
e[2] || (e[2] =
|
|
403
|
+
}), ct = /* @__PURE__ */ D(lt, [["__scopeId", "data-v-db34d4b4"]]), ut = {};
|
|
404
|
+
function dt(t, e) {
|
|
405
|
+
return u(), _(N, null, [
|
|
406
|
+
e[0] || (e[0] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
407
|
+
e[1] || (e[1] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
408
|
+
e[2] || (e[2] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
409
409
|
], 64);
|
|
410
410
|
}
|
|
411
|
-
const
|
|
411
|
+
const pt = /* @__PURE__ */ D(ut, [["render", dt], ["__scopeId", "data-v-26a64b58"]]), ht = { class: "dialog-block-suggestions-container" }, _t = /* @__PURE__ */ w({
|
|
412
412
|
__name: "DialogBlockSuggestionsContainer",
|
|
413
413
|
props: {
|
|
414
414
|
client: {},
|
|
@@ -420,8 +420,8 @@ const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58
|
|
|
420
420
|
},
|
|
421
421
|
setup(t) {
|
|
422
422
|
const e = t;
|
|
423
|
-
return (
|
|
424
|
-
e.isLoading || !e.questions ? (
|
|
423
|
+
return (s, o) => (u(), _("div", ht, [
|
|
424
|
+
e.isLoading || !e.questions ? (u(), O(pt, { key: 0 })) : (u(), O(ct, {
|
|
425
425
|
key: 1,
|
|
426
426
|
client: e.client,
|
|
427
427
|
questions: e.questions,
|
|
@@ -431,30 +431,50 @@ const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58
|
|
|
431
431
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
432
432
|
]));
|
|
433
433
|
}
|
|
434
|
-
}),
|
|
434
|
+
}), gt = /* @__PURE__ */ D(_t, [["__scopeId", "data-v-18c9e78b"]]), ft = {
|
|
435
435
|
width: "20",
|
|
436
436
|
height: "20",
|
|
437
437
|
viewBox: "0 0 20 20",
|
|
438
438
|
fill: "none",
|
|
439
439
|
xmlns: "http://www.w3.org/2000/svg"
|
|
440
|
-
},
|
|
440
|
+
}, vt = ["stroke"], mt = /* @__PURE__ */ w({
|
|
441
441
|
__name: "ArrowIcon",
|
|
442
442
|
props: {
|
|
443
443
|
color: {}
|
|
444
444
|
},
|
|
445
445
|
setup(t) {
|
|
446
446
|
const e = t;
|
|
447
|
-
return (
|
|
448
|
-
|
|
447
|
+
return (s, o) => (u(), _("svg", ft, [
|
|
448
|
+
l("path", {
|
|
449
449
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
450
450
|
stroke: e.color || "#ffffff",
|
|
451
451
|
"stroke-width": "1.5",
|
|
452
452
|
"stroke-linecap": "round",
|
|
453
453
|
"stroke-linejoin": "round"
|
|
454
|
-
}, null, 8,
|
|
454
|
+
}, null, 8, vt)
|
|
455
455
|
]));
|
|
456
456
|
}
|
|
457
|
-
}),
|
|
457
|
+
}), oe = {
|
|
458
|
+
en: {
|
|
459
|
+
placeholder: "Ask the AI a question",
|
|
460
|
+
aiDisclosure: "You're chatting with an AI assistant. It can make mistakes, so please double-check important information"
|
|
461
|
+
},
|
|
462
|
+
fr: {
|
|
463
|
+
placeholder: "Posez une question à l'IA",
|
|
464
|
+
aiDisclosure: "Vous discutez avec un assistant IA. Il peut se tromper, pensez à vérifier les informations importantes"
|
|
465
|
+
},
|
|
466
|
+
es: {
|
|
467
|
+
placeholder: "Haz una pregunta a la IA",
|
|
468
|
+
aiDisclosure: "Estás chateando con un asistente de IA. Puede cometer errores, así que verifica la información importante"
|
|
469
|
+
}
|
|
470
|
+
}, bt = (t) => {
|
|
471
|
+
var s;
|
|
472
|
+
const e = ((s = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : s.toLowerCase()) ?? "en";
|
|
473
|
+
return oe[e] ?? oe.en;
|
|
474
|
+
}, St = { class: "dialog-input-container" }, Ct = ["placeholder"], yt = ["disabled"], Et = {
|
|
475
|
+
id: "dialog-input-ai-disclosure",
|
|
476
|
+
class: "dialog-input-ai-disclosure"
|
|
477
|
+
}, wt = /* @__PURE__ */ w({
|
|
458
478
|
__name: "DialogInput",
|
|
459
479
|
props: {
|
|
460
480
|
client: {},
|
|
@@ -464,93 +484,97 @@ const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58
|
|
|
464
484
|
selectedVariantId: {}
|
|
465
485
|
},
|
|
466
486
|
setup(t) {
|
|
467
|
-
const e = t,
|
|
468
|
-
var
|
|
469
|
-
(
|
|
470
|
-
},
|
|
471
|
-
const
|
|
472
|
-
|
|
487
|
+
const e = t, s = k(), o = k(""), r = b(() => bt(e.client.locale)), n = () => {
|
|
488
|
+
var a;
|
|
489
|
+
(a = s.value) == null || a.focus();
|
|
490
|
+
}, i = () => {
|
|
491
|
+
const a = o.value;
|
|
492
|
+
a.trim() && (e.client.sendProductMessage({
|
|
473
493
|
productId: e.productId,
|
|
474
494
|
productTitle: e.productTitle,
|
|
475
495
|
selectedVariantId: e.selectedVariantId,
|
|
476
|
-
question:
|
|
496
|
+
question: a,
|
|
477
497
|
fromQuestionSuggestion: !0
|
|
478
|
-
}),
|
|
498
|
+
}), o.value = "");
|
|
479
499
|
};
|
|
480
|
-
return (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
te(u("input", {
|
|
485
|
-
id: "dialog-ask-anything-input-ai-input",
|
|
486
|
-
ref_key: "inputRef",
|
|
487
|
-
ref: o,
|
|
488
|
-
"onUpdate:modelValue": a[0] || (a[0] = (p) => s.value = p),
|
|
489
|
-
class: "dialog-ask-anything-input-ai-input",
|
|
490
|
-
placeholder: e.placeholder ?? "Ask anything...",
|
|
491
|
-
onKeydown: le(r, ["enter"])
|
|
492
|
-
}, null, 40, st), [
|
|
493
|
-
[oe, s.value]
|
|
494
|
-
]),
|
|
495
|
-
u("button", {
|
|
496
|
-
id: "send-message-button-ai-input",
|
|
497
|
-
class: "dialog-input-submit",
|
|
498
|
-
disabled: !s.value.trim(),
|
|
499
|
-
onClick: r
|
|
500
|
+
return (a, h) => (u(), _("div", St, [
|
|
501
|
+
l("div", {
|
|
502
|
+
class: "dialog-input-wrapper",
|
|
503
|
+
onClick: n
|
|
500
504
|
}, [
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
ae(l("input", {
|
|
506
|
+
id: "dialog-ask-anything-input-ai-input",
|
|
507
|
+
ref_key: "inputRef",
|
|
508
|
+
ref: s,
|
|
509
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => o.value = c),
|
|
510
|
+
class: "dialog-ask-anything-input-ai-input",
|
|
511
|
+
placeholder: r.value.placeholder,
|
|
512
|
+
"aria-describedby": "dialog-input-ai-disclosure",
|
|
513
|
+
onKeydown: Ee(i, ["enter"])
|
|
514
|
+
}, null, 40, Ct), [
|
|
515
|
+
[ie, o.value]
|
|
516
|
+
]),
|
|
517
|
+
l("button", {
|
|
518
|
+
id: "send-message-button-ai-input",
|
|
519
|
+
class: "dialog-input-submit",
|
|
520
|
+
disabled: !o.value.trim(),
|
|
521
|
+
onClick: i
|
|
522
|
+
}, [
|
|
523
|
+
T(mt, {
|
|
524
|
+
color: e.client.theme.ctaTextColor
|
|
525
|
+
}, null, 8, ["color"])
|
|
526
|
+
], 8, yt)
|
|
527
|
+
]),
|
|
528
|
+
l("p", Et, E(r.value.aiDisclosure), 1)
|
|
505
529
|
]));
|
|
506
530
|
}
|
|
507
|
-
}),
|
|
531
|
+
}), It = /* @__PURE__ */ D(wt, [["__scopeId", "data-v-87013888"]]), $t = /* @__PURE__ */ w({
|
|
508
532
|
__name: "ThemeProvider",
|
|
509
533
|
props: {
|
|
510
534
|
theme: {}
|
|
511
535
|
},
|
|
512
536
|
setup(t) {
|
|
513
|
-
const e = t,
|
|
514
|
-
|
|
515
|
-
const a =
|
|
516
|
-
if (
|
|
517
|
-
if (typeof
|
|
518
|
-
Object.keys(
|
|
519
|
-
var
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
`--dialog-theme-${
|
|
525
|
-
(
|
|
537
|
+
const e = t, s = document.body, o = (n) => n.replace(/([A-Z])/g, "-$1").toLowerCase(), r = (n) => {
|
|
538
|
+
n && Object.keys(n).forEach((i) => {
|
|
539
|
+
const a = i, h = o(i);
|
|
540
|
+
if (n[a] !== void 0) {
|
|
541
|
+
if (typeof n[a] == "object") {
|
|
542
|
+
Object.keys(n[a]).forEach((c) => {
|
|
543
|
+
var g;
|
|
544
|
+
const d = c;
|
|
545
|
+
if (d !== void 0) {
|
|
546
|
+
const y = o(c), S = n[a];
|
|
547
|
+
s.style.setProperty(
|
|
548
|
+
`--dialog-theme-${h}-${y}`,
|
|
549
|
+
(g = S[d]) == null ? void 0 : g.toString()
|
|
526
550
|
);
|
|
527
551
|
}
|
|
528
552
|
});
|
|
529
553
|
return;
|
|
530
554
|
}
|
|
531
555
|
if (a === "ctaBorderType") {
|
|
532
|
-
const c =
|
|
533
|
-
|
|
556
|
+
const c = n[a] === "rounded" ? "24px" : "0";
|
|
557
|
+
s.style.setProperty(`--dialog-theme-${h}`, c);
|
|
534
558
|
return;
|
|
535
559
|
}
|
|
536
|
-
|
|
537
|
-
`--dialog-theme-${
|
|
538
|
-
|
|
560
|
+
s.style.setProperty(
|
|
561
|
+
`--dialog-theme-${h}`,
|
|
562
|
+
n[a].toString()
|
|
539
563
|
);
|
|
540
564
|
}
|
|
541
565
|
});
|
|
542
566
|
};
|
|
543
|
-
return
|
|
544
|
-
e.theme &&
|
|
545
|
-
}),
|
|
567
|
+
return B(() => {
|
|
568
|
+
e.theme && r(e.theme);
|
|
569
|
+
}), M(
|
|
546
570
|
() => e.theme,
|
|
547
|
-
(
|
|
548
|
-
|
|
571
|
+
(n) => {
|
|
572
|
+
n && r(n);
|
|
549
573
|
},
|
|
550
574
|
{ deep: !0 }
|
|
551
|
-
), (
|
|
575
|
+
), (n, i) => we(n.$slots, "default");
|
|
552
576
|
}
|
|
553
|
-
}),
|
|
577
|
+
}), Rt = ["dir"], Tt = /* @__PURE__ */ w({
|
|
554
578
|
__name: "DialogProductBlock",
|
|
555
579
|
props: {
|
|
556
580
|
client: {},
|
|
@@ -561,84 +585,84 @@ const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58
|
|
|
561
585
|
},
|
|
562
586
|
setup(t) {
|
|
563
587
|
const e = t;
|
|
564
|
-
|
|
565
|
-
|
|
588
|
+
B(() => {
|
|
589
|
+
pe({
|
|
566
590
|
method: "vue",
|
|
567
|
-
version: "3.
|
|
568
|
-
}),
|
|
591
|
+
version: "3.8.0"
|
|
592
|
+
}), Ue("pdp-block");
|
|
569
593
|
});
|
|
570
|
-
const
|
|
571
|
-
var
|
|
572
|
-
return
|
|
573
|
-
}),
|
|
574
|
-
var
|
|
575
|
-
return
|
|
576
|
-
}), a =
|
|
577
|
-
var
|
|
578
|
-
return
|
|
579
|
-
}),
|
|
594
|
+
const s = k(!0), o = k(void 0), r = k(0), n = b(() => {
|
|
595
|
+
var d;
|
|
596
|
+
return s.value ? "" : (d = o.value) == null ? void 0 : d.assistantName;
|
|
597
|
+
}), i = b(() => {
|
|
598
|
+
var d;
|
|
599
|
+
return s.value ? "" : (d = o.value) == null ? void 0 : d.description;
|
|
600
|
+
}), a = b(() => {
|
|
601
|
+
var d;
|
|
602
|
+
return s.value ? "" : (d = o.value) == null ? void 0 : d.inputPlaceholder;
|
|
603
|
+
}), h = b(
|
|
580
604
|
() => {
|
|
581
|
-
var
|
|
582
|
-
return
|
|
583
|
-
(
|
|
605
|
+
var d;
|
|
606
|
+
return Pe(
|
|
607
|
+
(d = e.client.getLocalizationInformations()) == null ? void 0 : d.languageCode
|
|
584
608
|
);
|
|
585
609
|
}
|
|
586
610
|
), c = async () => {
|
|
587
|
-
const
|
|
588
|
-
|
|
611
|
+
const d = ++r.value;
|
|
612
|
+
s.value = !0, o.value = void 0;
|
|
589
613
|
try {
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
} catch (
|
|
593
|
-
console.error("error",
|
|
614
|
+
const g = await e.client.getSuggestions(e.productId);
|
|
615
|
+
d === r.value && (o.value = g);
|
|
616
|
+
} catch (g) {
|
|
617
|
+
console.error("error", g);
|
|
594
618
|
} finally {
|
|
595
|
-
|
|
619
|
+
d === r.value && (s.value = !1);
|
|
596
620
|
}
|
|
597
621
|
};
|
|
598
|
-
return
|
|
622
|
+
return M(
|
|
599
623
|
() => [e.client, e.productId],
|
|
600
624
|
() => {
|
|
601
625
|
c();
|
|
602
626
|
},
|
|
603
627
|
{ immediate: !0 }
|
|
604
|
-
), (
|
|
628
|
+
), (d, g) => (u(), O($t, {
|
|
605
629
|
theme: e.client.theme
|
|
606
630
|
}, {
|
|
607
|
-
default:
|
|
608
|
-
var
|
|
631
|
+
default: le(() => {
|
|
632
|
+
var y;
|
|
609
633
|
return [
|
|
610
|
-
|
|
634
|
+
l("div", {
|
|
611
635
|
id: "dialog-instant",
|
|
612
636
|
class: "dialog-block-container",
|
|
613
|
-
dir:
|
|
637
|
+
dir: h.value
|
|
614
638
|
}, [
|
|
615
|
-
|
|
616
|
-
title:
|
|
617
|
-
description:
|
|
639
|
+
T(et, {
|
|
640
|
+
title: n.value,
|
|
641
|
+
description: i.value
|
|
618
642
|
}, null, 8, ["title", "description"]),
|
|
619
|
-
|
|
643
|
+
T(gt, {
|
|
620
644
|
client: e.client,
|
|
621
|
-
questions: (
|
|
622
|
-
"is-loading":
|
|
645
|
+
questions: (y = o.value) == null ? void 0 : y.questions,
|
|
646
|
+
"is-loading": s.value,
|
|
623
647
|
"product-id": e.productId,
|
|
624
648
|
"product-title": e.productTitle,
|
|
625
649
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
626
650
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
627
|
-
e.enableInput ? (
|
|
651
|
+
e.enableInput ? (u(), O(It, {
|
|
628
652
|
key: 0,
|
|
629
653
|
client: e.client,
|
|
630
654
|
placeholder: a.value,
|
|
631
655
|
"product-id": e.productId,
|
|
632
656
|
"product-title": e.productTitle,
|
|
633
657
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
634
|
-
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) :
|
|
635
|
-
], 8,
|
|
658
|
+
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : A("", !0)
|
|
659
|
+
], 8, Rt)
|
|
636
660
|
];
|
|
637
661
|
}),
|
|
638
662
|
_: 1
|
|
639
663
|
}, 8, ["theme"]));
|
|
640
664
|
}
|
|
641
|
-
}),
|
|
665
|
+
}), so = /* @__PURE__ */ D(Tt, [["__scopeId", "data-v-c57aa677"]]), kt = {}, At = {
|
|
642
666
|
width: "16",
|
|
643
667
|
height: "16",
|
|
644
668
|
viewBox: "0 0 16 16",
|
|
@@ -646,9 +670,9 @@ const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58
|
|
|
646
670
|
xmlns: "http://www.w3.org/2000/svg",
|
|
647
671
|
"aria-hidden": "true"
|
|
648
672
|
};
|
|
649
|
-
function
|
|
650
|
-
return
|
|
651
|
-
|
|
673
|
+
function Lt(t, e) {
|
|
674
|
+
return u(), _("svg", At, e[0] || (e[0] = [
|
|
675
|
+
l("path", {
|
|
652
676
|
d: "M8 13V3M8 3L3 8M8 3L13 8",
|
|
653
677
|
stroke: "currentColor",
|
|
654
678
|
"stroke-width": "1.5",
|
|
@@ -657,28 +681,28 @@ function pt(t, e) {
|
|
|
657
681
|
}, null, -1)
|
|
658
682
|
]));
|
|
659
683
|
}
|
|
660
|
-
const
|
|
684
|
+
const xt = /* @__PURE__ */ D(kt, [["render", Lt]]), Dt = {
|
|
661
685
|
width: "16",
|
|
662
686
|
height: "16",
|
|
663
687
|
viewBox: "0 0 12 12",
|
|
664
688
|
fill: "none",
|
|
665
689
|
xmlns: "http://www.w3.org/2000/svg",
|
|
666
690
|
"aria-hidden": "true"
|
|
667
|
-
},
|
|
691
|
+
}, Pt = ["fill"], Ot = "M5.3217 0.588255C5.63241 -0.196084 6.36759 -0.196085 6.6783 0.588254C6.98901 1.37259 7.68193 2.82807 8.42693 3.57307C9.17193 4.31807 10.6274 5.01099 11.4117 5.3217C12.1961 5.63241 12.1961 6.36759 11.4117 6.6783C10.6274 6.98901 9.17193 7.68193 8.42693 8.42693C7.68193 9.17193 6.98901 10.6274 6.6783 11.4117C6.36759 12.1961 5.63241 12.1961 5.3217 11.4117C5.01099 10.6274 4.31807 9.17193 3.57307 8.42693C2.82808 7.68193 1.37259 6.98901 0.588255 6.6783C-0.196084 6.36759 -0.196085 5.63241 0.588254 5.3217C1.37259 5.01099 2.82807 4.31807 3.57307 3.57307C4.31807 2.82808 5.01099 1.37259 5.3217 0.588255Z", Nt = /* @__PURE__ */ w({
|
|
668
692
|
__name: "ShurikenIcon",
|
|
669
693
|
props: {
|
|
670
694
|
color: {}
|
|
671
695
|
},
|
|
672
696
|
setup(t) {
|
|
673
697
|
const e = t;
|
|
674
|
-
return (
|
|
675
|
-
|
|
676
|
-
d:
|
|
698
|
+
return (s, o) => (u(), _("svg", Dt, [
|
|
699
|
+
l("path", {
|
|
700
|
+
d: Ot,
|
|
677
701
|
fill: e.color || "currentColor"
|
|
678
|
-
}, null, 8,
|
|
702
|
+
}, null, 8, Pt)
|
|
679
703
|
]));
|
|
680
704
|
}
|
|
681
|
-
}),
|
|
705
|
+
}), qt = { class: "dialog-search-bar-field" }, Mt = { class: "dialog-search-bar-icon" }, Ut = ["aria-label", "placeholder", "autofocus"], Ht = ["aria-label"], oo = /* @__PURE__ */ w({
|
|
682
706
|
__name: "DialogSearchBar",
|
|
683
707
|
props: {
|
|
684
708
|
controller: {},
|
|
@@ -687,345 +711,684 @@ const _t = /* @__PURE__ */ P(dt, [["render", pt]]), ht = {
|
|
|
687
711
|
submitAriaLabel: { default: "Search" }
|
|
688
712
|
},
|
|
689
713
|
setup(t) {
|
|
690
|
-
const e = t,
|
|
691
|
-
e.controller.setQuery(
|
|
692
|
-
},
|
|
693
|
-
e.controller.submit(
|
|
714
|
+
const e = t, s = k(""), o = () => {
|
|
715
|
+
e.controller.setQuery(s.value);
|
|
716
|
+
}, r = () => {
|
|
717
|
+
e.controller.submit(s.value);
|
|
694
718
|
};
|
|
695
|
-
return (
|
|
719
|
+
return (n, i) => (u(), _("form", {
|
|
696
720
|
class: "dialog-search-bar",
|
|
697
721
|
role: "search",
|
|
698
|
-
onSubmit:
|
|
722
|
+
onSubmit: Ie(r, ["prevent"])
|
|
699
723
|
}, [
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
724
|
+
l("div", qt, [
|
|
725
|
+
l("span", Mt, [
|
|
726
|
+
T(Nt)
|
|
703
727
|
]),
|
|
704
|
-
|
|
705
|
-
"onUpdate:modelValue":
|
|
728
|
+
ae(l("input", {
|
|
729
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => s.value = a),
|
|
706
730
|
type: "text",
|
|
707
731
|
name: "dialog-search-query",
|
|
708
732
|
class: "dialog-search-bar-input",
|
|
709
733
|
"aria-label": e.placeholder,
|
|
710
734
|
placeholder: e.placeholder,
|
|
711
735
|
autofocus: e.autoFocus,
|
|
712
|
-
onInput:
|
|
713
|
-
}, null, 40,
|
|
714
|
-
[
|
|
736
|
+
onInput: o
|
|
737
|
+
}, null, 40, Ut), [
|
|
738
|
+
[ie, s.value]
|
|
715
739
|
])
|
|
716
740
|
]),
|
|
717
|
-
|
|
741
|
+
l("button", {
|
|
718
742
|
type: "submit",
|
|
719
743
|
class: "dialog-search-bar-submit",
|
|
720
744
|
"aria-label": e.submitAriaLabel
|
|
721
745
|
}, [
|
|
722
|
-
|
|
723
|
-
], 8,
|
|
746
|
+
T(xt)
|
|
747
|
+
], 8, Ht)
|
|
724
748
|
], 32));
|
|
725
749
|
}
|
|
726
|
-
}),
|
|
750
|
+
}), Vt = (t, e) => {
|
|
751
|
+
try {
|
|
752
|
+
return new Intl.NumberFormat(e).format(t);
|
|
753
|
+
} catch {
|
|
754
|
+
return String(t);
|
|
755
|
+
}
|
|
756
|
+
}, ne = {
|
|
757
|
+
en: (t) => ({
|
|
758
|
+
searching: (e) => `Searching “${e}”…`,
|
|
759
|
+
noResults: "No matching products",
|
|
760
|
+
retry: "Retry",
|
|
761
|
+
collectionsLabel: "Collections",
|
|
762
|
+
productsLabel: "Products",
|
|
763
|
+
collectionsCount: (e) => e === 1 ? "1 collection" : `${t(e)} collections`,
|
|
764
|
+
resultsCount: (e) => e === 1 ? "1 result" : `${t(e)} results`,
|
|
765
|
+
seeAllLabel: (e) => e === 1 ? "See the result" : `See all ${t(e)} results`,
|
|
766
|
+
previous: "Previous",
|
|
767
|
+
next: "Next",
|
|
768
|
+
pageOf: (e, s) => `Page ${t(e)} / ${t(s)}`
|
|
769
|
+
}),
|
|
770
|
+
fr: (t) => ({
|
|
771
|
+
searching: (e) => `Recherche de « ${e} »…`,
|
|
772
|
+
noResults: "Aucun produit correspondant",
|
|
773
|
+
retry: "Réessayer",
|
|
774
|
+
collectionsLabel: "Collections",
|
|
775
|
+
productsLabel: "Produits",
|
|
776
|
+
collectionsCount: (e) => e === 1 ? "1 collection" : `${t(e)} collections`,
|
|
777
|
+
resultsCount: (e) => e === 1 ? "1 résultat" : `${t(e)} résultats`,
|
|
778
|
+
seeAllLabel: (e) => e === 1 ? "Voir le résultat" : `Voir les ${t(e)} résultats`,
|
|
779
|
+
previous: "Précédent",
|
|
780
|
+
next: "Suivant",
|
|
781
|
+
pageOf: (e, s) => `Page ${t(e)} / ${t(s)}`
|
|
782
|
+
}),
|
|
783
|
+
de: (t) => ({
|
|
784
|
+
searching: (e) => `Suche nach „${e}“…`,
|
|
785
|
+
noResults: "Keine passenden Produkte",
|
|
786
|
+
retry: "Erneut versuchen",
|
|
787
|
+
collectionsLabel: "Kollektionen",
|
|
788
|
+
productsLabel: "Produkte",
|
|
789
|
+
collectionsCount: (e) => e === 1 ? "1 Kollektion" : `${t(e)} Kollektionen`,
|
|
790
|
+
resultsCount: (e) => e === 1 ? "1 Ergebnis" : `${t(e)} Ergebnisse`,
|
|
791
|
+
seeAllLabel: (e) => e === 1 ? "Das Ergebnis anzeigen" : `Alle ${t(e)} Ergebnisse anzeigen`,
|
|
792
|
+
previous: "Zurück",
|
|
793
|
+
next: "Weiter",
|
|
794
|
+
pageOf: (e, s) => `Seite ${t(e)} / ${t(s)}`
|
|
795
|
+
}),
|
|
796
|
+
es: (t) => ({
|
|
797
|
+
searching: (e) => `Buscando «${e}»…`,
|
|
798
|
+
noResults: "No hay productos que coincidan",
|
|
799
|
+
retry: "Reintentar",
|
|
800
|
+
collectionsLabel: "Colecciones",
|
|
801
|
+
productsLabel: "Productos",
|
|
802
|
+
collectionsCount: (e) => e === 1 ? "1 colección" : `${t(e)} colecciones`,
|
|
803
|
+
resultsCount: (e) => e === 1 ? "1 resultado" : `${t(e)} resultados`,
|
|
804
|
+
seeAllLabel: (e) => e === 1 ? "Ver el resultado" : `Ver los ${t(e)} resultados`,
|
|
805
|
+
previous: "Anterior",
|
|
806
|
+
next: "Siguiente",
|
|
807
|
+
pageOf: (e, s) => `Página ${t(e)} / ${t(s)}`
|
|
808
|
+
}),
|
|
809
|
+
it: (t) => ({
|
|
810
|
+
searching: (e) => `Ricerca di “${e}”…`,
|
|
811
|
+
noResults: "Nessun prodotto corrispondente",
|
|
812
|
+
retry: "Riprova",
|
|
813
|
+
collectionsLabel: "Collezioni",
|
|
814
|
+
productsLabel: "Prodotti",
|
|
815
|
+
collectionsCount: (e) => e === 1 ? "1 collezione" : `${t(e)} collezioni`,
|
|
816
|
+
resultsCount: (e) => e === 1 ? "1 risultato" : `${t(e)} risultati`,
|
|
817
|
+
seeAllLabel: (e) => e === 1 ? "Vedi il risultato" : `Vedi tutti i ${t(e)} risultati`,
|
|
818
|
+
previous: "Precedente",
|
|
819
|
+
next: "Successivo",
|
|
820
|
+
pageOf: (e, s) => `Pagina ${t(e)} / ${t(s)}`
|
|
821
|
+
})
|
|
822
|
+
}, he = (t) => {
|
|
823
|
+
var o;
|
|
824
|
+
const e = ((o = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : o.toLowerCase()) ?? "en";
|
|
825
|
+
return (ne[e] ?? ne.en)((r) => Vt(r, t));
|
|
826
|
+
}, _e = (t) => t.status !== L.LOADING && t.response !== void 0 && t.response.nbPages > 1, Bt = {
|
|
727
827
|
key: 0,
|
|
728
828
|
"aria-label": "Search results pages",
|
|
729
829
|
class: "dialog-search-pagination"
|
|
730
|
-
},
|
|
830
|
+
}, Kt = ["disabled"], Ft = ["disabled"], zt = /* @__PURE__ */ w({
|
|
731
831
|
__name: "DialogSearchPagination",
|
|
732
832
|
props: {
|
|
733
833
|
controller: {},
|
|
734
|
-
state: {}
|
|
834
|
+
state: {},
|
|
835
|
+
locale: {}
|
|
735
836
|
},
|
|
736
837
|
setup(t) {
|
|
737
|
-
const e = t,
|
|
738
|
-
return (
|
|
739
|
-
|
|
838
|
+
const e = t, s = b(() => e.state.response), o = b(() => he(e.locale));
|
|
839
|
+
return (r, n) => s.value !== void 0 && K(_e)(e.state) ? (u(), _("nav", Bt, [
|
|
840
|
+
l("button", {
|
|
740
841
|
type: "button",
|
|
741
|
-
disabled:
|
|
742
|
-
onClick:
|
|
743
|
-
},
|
|
744
|
-
|
|
745
|
-
|
|
842
|
+
disabled: s.value.page === 0,
|
|
843
|
+
onClick: n[0] || (n[0] = (i) => e.controller.setPage(s.value.page - 1))
|
|
844
|
+
}, E(o.value.previous), 9, Kt),
|
|
845
|
+
l("span", null, E(o.value.pageOf(s.value.page + 1, s.value.nbPages)), 1),
|
|
846
|
+
l("button", {
|
|
746
847
|
type: "button",
|
|
747
|
-
disabled:
|
|
748
|
-
onClick:
|
|
749
|
-
},
|
|
750
|
-
])) :
|
|
848
|
+
disabled: s.value.page >= s.value.nbPages - 1,
|
|
849
|
+
onClick: n[1] || (n[1] = (i) => e.controller.setPage(s.value.page + 1))
|
|
850
|
+
}, E(o.value.next), 9, Ft)
|
|
851
|
+
])) : A("", !0);
|
|
852
|
+
}
|
|
853
|
+
}), re = (t) => t.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").replace(/ẞ/gu, "ß").toUpperCase().toLowerCase().replace(/ς/g, "σ"), jt = (t, e) => {
|
|
854
|
+
const s = { before: "", match: t, after: "" }, o = re(e.trim());
|
|
855
|
+
if (o === "")
|
|
856
|
+
return s;
|
|
857
|
+
const r = [...t], n = [];
|
|
858
|
+
let i = "";
|
|
859
|
+
r.forEach((d, g) => {
|
|
860
|
+
const y = re(d);
|
|
861
|
+
for (let S = 0; S < y.length; S += 1)
|
|
862
|
+
n.push(g);
|
|
863
|
+
i += y;
|
|
864
|
+
});
|
|
865
|
+
const a = i.indexOf(o);
|
|
866
|
+
if (a === -1)
|
|
867
|
+
return s;
|
|
868
|
+
const h = n[a], c = n[a + o.length - 1] + 1;
|
|
869
|
+
return {
|
|
870
|
+
before: r.slice(0, h).join(""),
|
|
871
|
+
match: r.slice(h, c).join(""),
|
|
872
|
+
after: r.slice(c).join("")
|
|
873
|
+
};
|
|
874
|
+
}, Gt = {
|
|
875
|
+
key: 0,
|
|
876
|
+
class: "dialog-search-muted"
|
|
877
|
+
}, Wt = { class: "dialog-search-match" }, Qt = {
|
|
878
|
+
key: 1,
|
|
879
|
+
class: "dialog-search-muted"
|
|
880
|
+
}, ge = /* @__PURE__ */ w({
|
|
881
|
+
__name: "HighlightedTitle",
|
|
882
|
+
props: {
|
|
883
|
+
title: {},
|
|
884
|
+
query: {}
|
|
885
|
+
},
|
|
886
|
+
setup(t) {
|
|
887
|
+
const e = t, s = b(() => jt(e.title, e.query));
|
|
888
|
+
return (o, r) => (u(), _(N, null, [
|
|
889
|
+
s.value.before !== "" ? (u(), _("span", Gt, E(s.value.before), 1)) : A("", !0),
|
|
890
|
+
l("span", Wt, E(s.value.match), 1),
|
|
891
|
+
s.value.after !== "" ? (u(), _("span", Qt, E(s.value.after), 1)) : A("", !0)
|
|
892
|
+
], 64));
|
|
751
893
|
}
|
|
752
|
-
}),
|
|
894
|
+
}), Xt = ({ amount: t, currencyCode: e }, s) => e === void 0 ? new Intl.NumberFormat(s).format(Number(t)) : new Intl.NumberFormat(s, {
|
|
753
895
|
style: "currency",
|
|
754
896
|
currency: e
|
|
755
|
-
}).format(Number(t)),
|
|
897
|
+
}).format(Number(t)), Yt = (t, e) => {
|
|
756
898
|
if (t === void 0)
|
|
757
899
|
return "";
|
|
758
900
|
try {
|
|
759
|
-
return
|
|
901
|
+
return Xt(t.min, e);
|
|
760
902
|
} catch {
|
|
761
903
|
return "";
|
|
762
904
|
}
|
|
763
|
-
},
|
|
905
|
+
}, Zt = (t) => {
|
|
764
906
|
try {
|
|
765
907
|
const { protocol: e } = new URL(t, window.location.href);
|
|
766
908
|
return e === "http:" || e === "https:" ? t : void 0;
|
|
767
909
|
} catch {
|
|
768
910
|
return;
|
|
769
911
|
}
|
|
770
|
-
},
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
},
|
|
774
|
-
__name: "DialogSearchProductCardContent",
|
|
775
|
-
props: {
|
|
776
|
-
hit: {},
|
|
777
|
-
locale: {}
|
|
778
|
-
},
|
|
779
|
-
setup(t) {
|
|
780
|
-
const e = t, o = T(() => e.hit.title ?? e.hit.objectID), s = T(
|
|
781
|
-
() => kt(e.hit.priceRange, e.locale)
|
|
782
|
-
);
|
|
783
|
-
return (i, r) => (_(), v(N, null, [
|
|
784
|
-
u("div", $t, [
|
|
785
|
-
e.hit.imageUrl !== void 0 ? (_(), v("img", {
|
|
786
|
-
key: 0,
|
|
787
|
-
src: e.hit.imageUrl,
|
|
788
|
-
alt: o.value,
|
|
789
|
-
loading: "lazy"
|
|
790
|
-
}, null, 8, At)) : M("", !0)
|
|
791
|
-
]),
|
|
792
|
-
u("div", Lt, [
|
|
793
|
-
u("p", Dt, k(o.value), 1),
|
|
794
|
-
s.value !== "" ? (_(), v("p", Pt, k(s.value), 1)) : M("", !0)
|
|
795
|
-
])
|
|
796
|
-
], 64));
|
|
797
|
-
}
|
|
798
|
-
}), xt = {
|
|
912
|
+
}, fe = (t) => t.url === void 0 || t.url === "" ? void 0 : Zt(t.url), ve = (t) => t.title ?? t.handle ?? t.objectID, Jt = {
|
|
913
|
+
class: "dialog-search-product-thumb",
|
|
914
|
+
"aria-hidden": "true"
|
|
915
|
+
}, es = ["src"], ts = { class: "dialog-search-product-title" }, ss = {
|
|
799
916
|
key: 0,
|
|
800
|
-
class: "dialog-search-
|
|
801
|
-
},
|
|
917
|
+
class: "dialog-search-product-price"
|
|
918
|
+
}, os = /* @__PURE__ */ w({
|
|
802
919
|
__name: "DialogSearchProductCard",
|
|
803
920
|
props: {
|
|
804
921
|
controller: {},
|
|
805
922
|
hit: {},
|
|
806
923
|
index: {},
|
|
807
|
-
locale: {}
|
|
924
|
+
locale: { default: void 0 },
|
|
925
|
+
query: { default: "" }
|
|
808
926
|
},
|
|
809
927
|
setup(t) {
|
|
810
|
-
const e = t,
|
|
811
|
-
|
|
928
|
+
const e = t, s = k();
|
|
929
|
+
M(
|
|
812
930
|
() => e.hit,
|
|
813
931
|
() => {
|
|
814
|
-
|
|
932
|
+
s.value !== void 0 && e.controller.observeResult(s.value, e.index);
|
|
815
933
|
},
|
|
816
934
|
{ immediate: !0, flush: "post" }
|
|
817
935
|
);
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
return (
|
|
936
|
+
const o = b(() => fe(e.hit)), r = b(
|
|
937
|
+
() => Yt(e.hit.priceRange, e.locale)
|
|
938
|
+
), n = (a) => {
|
|
939
|
+
const h = a.metaKey || a.ctrlKey || a.shiftKey || a.altKey;
|
|
940
|
+
e.controller.selectResult(e.index, { navigate: !h }) && a.preventDefault();
|
|
941
|
+
}, i = (a) => {
|
|
942
|
+
a.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
943
|
+
};
|
|
944
|
+
return (a, h) => (u(), _("li", {
|
|
827
945
|
ref_key: "cardRef",
|
|
828
|
-
ref:
|
|
946
|
+
ref: s,
|
|
829
947
|
class: "dialog-search-card"
|
|
830
948
|
}, [
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
949
|
+
(u(), O($e(o.value === void 0 ? "div" : "a"), Re({
|
|
950
|
+
class: "dialog-search-product",
|
|
951
|
+
href: o.value
|
|
952
|
+
}, Te(
|
|
953
|
+
o.value === void 0 ? {} : { click: n, auxclick: i }
|
|
954
|
+
)), {
|
|
955
|
+
default: le(() => [
|
|
956
|
+
l("span", Jt, [
|
|
957
|
+
e.hit.imageUrl !== void 0 && e.hit.imageUrl !== "" ? (u(), _("img", {
|
|
958
|
+
key: 0,
|
|
959
|
+
src: e.hit.imageUrl,
|
|
960
|
+
alt: "",
|
|
961
|
+
loading: "lazy"
|
|
962
|
+
}, null, 8, es)) : A("", !0)
|
|
963
|
+
]),
|
|
964
|
+
l("span", ts, [
|
|
965
|
+
T(ge, {
|
|
966
|
+
title: K(ve)(e.hit),
|
|
967
|
+
query: e.query
|
|
968
|
+
}, null, 8, ["title", "query"])
|
|
969
|
+
]),
|
|
970
|
+
r.value !== "" ? (u(), _("span", ss, E(r.value), 1)) : A("", !0)
|
|
971
|
+
]),
|
|
972
|
+
_: 1
|
|
973
|
+
}, 16, ["href"]))
|
|
848
974
|
], 512));
|
|
849
975
|
}
|
|
850
|
-
}),
|
|
851
|
-
|
|
852
|
-
|
|
976
|
+
}), ns = {}, rs = {
|
|
977
|
+
width: "16",
|
|
978
|
+
height: "16",
|
|
979
|
+
viewBox: "0 0 256 256",
|
|
980
|
+
fill: "currentColor",
|
|
981
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
982
|
+
"aria-hidden": "true"
|
|
983
|
+
};
|
|
984
|
+
function as(t, e) {
|
|
985
|
+
return u(), _("svg", rs, e[0] || (e[0] = [
|
|
986
|
+
l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }, null, -1)
|
|
987
|
+
]));
|
|
988
|
+
}
|
|
989
|
+
const is = /* @__PURE__ */ D(ns, [["render", as]]), ls = {}, cs = {
|
|
990
|
+
width: "12",
|
|
991
|
+
height: "12",
|
|
992
|
+
viewBox: "0 0 256 256",
|
|
993
|
+
fill: "currentColor",
|
|
994
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
995
|
+
"aria-hidden": "true"
|
|
996
|
+
};
|
|
997
|
+
function us(t, e) {
|
|
998
|
+
return u(), _("svg", cs, e[0] || (e[0] = [
|
|
999
|
+
l("path", { d: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" }, null, -1)
|
|
1000
|
+
]));
|
|
1001
|
+
}
|
|
1002
|
+
const ds = /* @__PURE__ */ D(ls, [["render", us]]), me = (t) => (t ?? []).flatMap((e) => {
|
|
1003
|
+
const s = fe(e);
|
|
1004
|
+
return s === void 0 ? [] : [{ collection: e, href: s }];
|
|
1005
|
+
}), ps = {
|
|
1006
|
+
key: 0,
|
|
1007
|
+
class: "dialog-search-collections"
|
|
1008
|
+
}, hs = { class: "dialog-search-section-head" }, _s = { class: "dialog-search-label" }, gs = { class: "dialog-search-count" }, fs = { class: "dialog-search-collection-list" }, vs = ["href"], ms = {
|
|
1009
|
+
class: "dialog-search-collection-thumb",
|
|
1010
|
+
"aria-hidden": "true"
|
|
1011
|
+
}, bs = ["src"], Ss = { class: "dialog-search-collection-title" }, Cs = { class: "dialog-search-caret" }, ys = /* @__PURE__ */ w({
|
|
1012
|
+
__name: "DialogSearchCollections",
|
|
1013
|
+
props: {
|
|
1014
|
+
collections: {},
|
|
1015
|
+
query: {},
|
|
1016
|
+
messages: {}
|
|
1017
|
+
},
|
|
1018
|
+
setup(t) {
|
|
1019
|
+
const e = t, s = b(() => me(e.collections));
|
|
1020
|
+
return (o, r) => s.value.length > 0 ? (u(), _("aside", ps, [
|
|
1021
|
+
l("div", hs, [
|
|
1022
|
+
l("p", _s, E(e.messages.collectionsLabel), 1),
|
|
1023
|
+
l("span", gs, E(e.messages.collectionsCount(s.value.length)), 1)
|
|
1024
|
+
]),
|
|
1025
|
+
l("ul", fs, [
|
|
1026
|
+
(u(!0), _(N, null, Q(s.value, ({ collection: n, href: i }) => (u(), _("li", {
|
|
1027
|
+
key: n.objectID
|
|
1028
|
+
}, [
|
|
1029
|
+
l("a", {
|
|
1030
|
+
class: "dialog-search-collection",
|
|
1031
|
+
href: i
|
|
1032
|
+
}, [
|
|
1033
|
+
l("span", ms, [
|
|
1034
|
+
n.imageUrl !== void 0 && n.imageUrl !== "" ? (u(), _("img", {
|
|
1035
|
+
key: 0,
|
|
1036
|
+
src: n.imageUrl,
|
|
1037
|
+
alt: "",
|
|
1038
|
+
loading: "lazy"
|
|
1039
|
+
}, null, 8, bs)) : A("", !0)
|
|
1040
|
+
]),
|
|
1041
|
+
l("span", Ss, [
|
|
1042
|
+
T(ge, {
|
|
1043
|
+
title: K(ve)(n),
|
|
1044
|
+
query: e.query
|
|
1045
|
+
}, null, 8, ["title", "query"])
|
|
1046
|
+
]),
|
|
1047
|
+
l("span", Cs, [
|
|
1048
|
+
T(ds)
|
|
1049
|
+
])
|
|
1050
|
+
], 8, vs)
|
|
1051
|
+
]))), 128))
|
|
1052
|
+
])
|
|
1053
|
+
])) : A("", !0);
|
|
1054
|
+
}
|
|
1055
|
+
}), Es = { class: "dialog-search-products" }, ws = { class: "dialog-search-section-head" }, Is = { class: "dialog-search-label" }, $s = {
|
|
1056
|
+
key: 0,
|
|
1057
|
+
class: "dialog-search-label-count"
|
|
1058
|
+
}, Rs = { class: "dialog-search-results" }, Ts = {
|
|
1059
|
+
key: 0,
|
|
1060
|
+
class: "dialog-search-empty",
|
|
1061
|
+
role: "status"
|
|
1062
|
+
}, ks = /* @__PURE__ */ w({
|
|
1063
|
+
__name: "DialogSearchProducts",
|
|
1064
|
+
props: {
|
|
1065
|
+
controller: {},
|
|
1066
|
+
response: {},
|
|
1067
|
+
locale: {},
|
|
1068
|
+
messages: {}
|
|
1069
|
+
},
|
|
1070
|
+
setup(t) {
|
|
1071
|
+
const e = t;
|
|
1072
|
+
return (s, o) => (u(), _("section", Es, [
|
|
1073
|
+
l("div", ws, [
|
|
1074
|
+
l("p", Is, [
|
|
1075
|
+
ce(E(e.messages.productsLabel), 1),
|
|
1076
|
+
e.response.nbHits > 0 ? (u(), _("span", $s, " · " + E(e.messages.resultsCount(e.response.nbHits)), 1)) : A("", !0)
|
|
1077
|
+
])
|
|
1078
|
+
]),
|
|
1079
|
+
l("ul", Rs, [
|
|
1080
|
+
e.response.hits.length === 0 ? (u(), _("li", Ts, E(e.messages.noResults), 1)) : (u(!0), _(N, { key: 1 }, Q(e.response.hits, (r, n) => (u(), O(os, {
|
|
1081
|
+
key: r.objectID,
|
|
1082
|
+
controller: e.controller,
|
|
1083
|
+
hit: r,
|
|
1084
|
+
index: n,
|
|
1085
|
+
locale: e.locale,
|
|
1086
|
+
query: e.response.query
|
|
1087
|
+
}, null, 8, ["controller", "hit", "index", "locale", "query"]))), 128))
|
|
1088
|
+
])
|
|
1089
|
+
]));
|
|
1090
|
+
}
|
|
1091
|
+
}), H = 8, U = 16, As = 200, Ls = 1440, xs = (t, e) => t.bottom > 0 && t.top < e, Ds = (t, e) => {
|
|
1092
|
+
const s = Math.min(
|
|
1093
|
+
Ls,
|
|
1094
|
+
e - 2 * U
|
|
1095
|
+
), o = t.left + t.width / 2 - s / 2;
|
|
1096
|
+
return { left: `${Math.min(
|
|
1097
|
+
Math.max(o, U),
|
|
1098
|
+
e - U - s
|
|
1099
|
+
)}px`, width: `${s}px` };
|
|
1100
|
+
}, Ps = (t, e, s) => {
|
|
1101
|
+
const o = s - t.bottom - H - U, r = t.top - H - U, n = Ds(t, e);
|
|
1102
|
+
return o < As && r > o ? {
|
|
1103
|
+
...n,
|
|
1104
|
+
bottom: `${s - t.top + H}px`,
|
|
1105
|
+
maxHeight: `${Math.max(r, 0)}px`
|
|
1106
|
+
} : {
|
|
1107
|
+
...n,
|
|
1108
|
+
top: `${t.bottom + H}px`,
|
|
1109
|
+
maxHeight: `${Math.max(o, 0)}px`
|
|
1110
|
+
};
|
|
1111
|
+
}, Os = (t) => {
|
|
1112
|
+
const e = t.trim().replace(/^#/, "");
|
|
1113
|
+
if (!/^(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e))
|
|
1114
|
+
return;
|
|
1115
|
+
const s = e.length <= 4 ? [...e].map((o) => o + o).join("") : e;
|
|
1116
|
+
return [0, 2, 4].map(
|
|
1117
|
+
(o) => Number.parseInt(s.slice(o, o + 2), 16)
|
|
1118
|
+
);
|
|
1119
|
+
}, Ns = (t) => {
|
|
1120
|
+
const e = /^rgba?\((\d+), (\d+), (\d+)(?:, [\d.]+)?\)$/.exec(t);
|
|
1121
|
+
if (e !== null)
|
|
1122
|
+
return [e[1], e[2], e[3]].map(Number);
|
|
1123
|
+
}, qs = (t) => {
|
|
1124
|
+
if (typeof document > "u")
|
|
1125
|
+
return;
|
|
1126
|
+
const e = document.createElement("span");
|
|
1127
|
+
if (e.style.color = t, e.style.color === "")
|
|
1128
|
+
return;
|
|
1129
|
+
document.body.appendChild(e);
|
|
1130
|
+
const s = Ns(getComputedStyle(e).color);
|
|
1131
|
+
return e.remove(), s;
|
|
1132
|
+
}, Ms = (t) => Os(t) ?? qs(t), Us = (t) => {
|
|
1133
|
+
const e = t / 255;
|
|
1134
|
+
return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
|
|
1135
|
+
}, be = (t) => {
|
|
1136
|
+
const e = Ms(t);
|
|
1137
|
+
if (e === void 0)
|
|
1138
|
+
return;
|
|
1139
|
+
const [s, o, r] = e.map(Us);
|
|
1140
|
+
return 0.2126 * s + 0.7152 * o + 0.0722 * r;
|
|
1141
|
+
}, Hs = "#181825", Vs = "#ffffff", Bs = "straight", G = 0.5, W = {
|
|
1142
|
+
light: {
|
|
1143
|
+
panel: "#ffffff",
|
|
1144
|
+
side: "#fafbfc",
|
|
1145
|
+
text: "#111827",
|
|
1146
|
+
"text-sec": "#6b7280",
|
|
1147
|
+
border: "#eceef2",
|
|
1148
|
+
hover: "#eef2f7",
|
|
1149
|
+
thumb: "#eef1f5"
|
|
1150
|
+
},
|
|
1151
|
+
dark: {
|
|
1152
|
+
panel: "#15171c",
|
|
1153
|
+
side: "#1b1e25",
|
|
1154
|
+
text: "#f3f4f6",
|
|
1155
|
+
"text-sec": "#9ca3af",
|
|
1156
|
+
border: "#2b2f38",
|
|
1157
|
+
hover: "#242830",
|
|
1158
|
+
thumb: "#2b2f38"
|
|
1159
|
+
}
|
|
1160
|
+
}, Ks = {
|
|
1161
|
+
rectangle: {
|
|
1162
|
+
"r-panel": "4px",
|
|
1163
|
+
"r-item": "4px",
|
|
1164
|
+
"r-thumb": "2px",
|
|
1165
|
+
"r-btn": "4px"
|
|
1166
|
+
},
|
|
1167
|
+
"rectangle-rounded": {
|
|
1168
|
+
"r-panel": "16px",
|
|
1169
|
+
"r-item": "10px",
|
|
1170
|
+
"r-thumb": "8px",
|
|
1171
|
+
"r-btn": "10px"
|
|
1172
|
+
}
|
|
1173
|
+
}, V = (t) => t === void 0 || t.trim() === "" ? void 0 : t.trim(), Fs = (t) => {
|
|
1174
|
+
const e = t === void 0 ? void 0 : be(t);
|
|
1175
|
+
return e === void 0 ? "light" : e < G ? "dark" : "light";
|
|
1176
|
+
}, zs = (t, e) => {
|
|
1177
|
+
const s = be(t);
|
|
1178
|
+
return s === void 0 ? W[e].text : (e === "light" ? s < G : s >= G) ? t : W[e].text;
|
|
1179
|
+
}, js = (t) => {
|
|
1180
|
+
const e = Fs(V(t == null ? void 0 : t.backgroundColor)), s = (t == null ? void 0 : t.ctaBorderType) === Bs ? "rectangle" : "rectangle-rounded", o = V(t == null ? void 0 : t.primaryColor) ?? Hs, r = V(t == null ? void 0 : t.fontFamily), n = {
|
|
1181
|
+
...W[e],
|
|
1182
|
+
...Ks[s],
|
|
1183
|
+
primary: o,
|
|
1184
|
+
accent: zs(o, e),
|
|
1185
|
+
"cta-text": V(t == null ? void 0 : t.ctaTextColor) ?? Vs,
|
|
1186
|
+
...r === void 0 ? {} : { font: r }
|
|
1187
|
+
};
|
|
1188
|
+
return Object.fromEntries(
|
|
1189
|
+
Object.entries(n).map(([i, a]) => [`--dso-${i}`, a])
|
|
1190
|
+
);
|
|
1191
|
+
}, Gs = (t) => {
|
|
1192
|
+
const e = k(), s = k(void 0), o = k({ width: 0, height: 0 });
|
|
1193
|
+
return M(
|
|
853
1194
|
t,
|
|
854
|
-
(
|
|
855
|
-
if (!
|
|
1195
|
+
(r, n, i) => {
|
|
1196
|
+
if (!r)
|
|
856
1197
|
return;
|
|
857
1198
|
const a = () => {
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
1199
|
+
const h = e.value;
|
|
1200
|
+
if (h === void 0)
|
|
860
1201
|
return;
|
|
861
|
-
const c =
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
1202
|
+
const c = h.previousElementSibling ?? h, { top: d, bottom: g, left: y, width: S } = c.getBoundingClientRect();
|
|
1203
|
+
(o.value.width !== window.innerWidth || o.value.height !== window.innerHeight) && (o.value = {
|
|
1204
|
+
width: window.innerWidth,
|
|
1205
|
+
height: window.innerHeight
|
|
1206
|
+
});
|
|
1207
|
+
const f = s.value;
|
|
1208
|
+
(f === void 0 || f.top !== d || f.bottom !== g || f.left !== y || f.width !== S) && (s.value = { top: d, bottom: g, left: y, width: S });
|
|
865
1209
|
};
|
|
866
|
-
a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a),
|
|
1210
|
+
a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), i(() => {
|
|
867
1211
|
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
|
|
868
1212
|
});
|
|
869
1213
|
},
|
|
870
1214
|
{ immediate: !0, flush: "post" }
|
|
871
|
-
), { anchorRef: e, rect:
|
|
872
|
-
},
|
|
873
|
-
const
|
|
874
|
-
() => t.value.status !==
|
|
1215
|
+
), { anchorRef: e, rect: s, viewport: o };
|
|
1216
|
+
}, Ws = (t, e) => {
|
|
1217
|
+
const s = k(!1), o = k(), r = b(
|
|
1218
|
+
() => t.value.status !== L.IDLE && !s.value
|
|
875
1219
|
);
|
|
876
|
-
|
|
1220
|
+
M(
|
|
877
1221
|
() => t.value.query,
|
|
878
1222
|
() => {
|
|
879
|
-
|
|
1223
|
+
s.value = !1;
|
|
880
1224
|
}
|
|
881
|
-
),
|
|
882
|
-
|
|
883
|
-
(
|
|
884
|
-
if (!
|
|
1225
|
+
), M(
|
|
1226
|
+
r,
|
|
1227
|
+
(i, a, h) => {
|
|
1228
|
+
if (!i)
|
|
885
1229
|
return;
|
|
886
|
-
const c = (
|
|
887
|
-
var
|
|
888
|
-
const
|
|
889
|
-
if (!(
|
|
1230
|
+
const c = (d) => {
|
|
1231
|
+
var I, $;
|
|
1232
|
+
const g = d.target;
|
|
1233
|
+
if (!(g instanceof Node))
|
|
890
1234
|
return;
|
|
891
|
-
const
|
|
892
|
-
!
|
|
1235
|
+
const y = (I = e.value) == null ? void 0 : I.previousElementSibling, S = (($ = o.value) == null ? void 0 : $.contains(g)) ?? !1, f = (y == null ? void 0 : y.contains(g)) ?? !1;
|
|
1236
|
+
!S && !f && (s.value = !0);
|
|
893
1237
|
};
|
|
894
|
-
document.addEventListener("pointerdown", c),
|
|
1238
|
+
document.addEventListener("pointerdown", c), h(
|
|
895
1239
|
() => document.removeEventListener("pointerdown", c)
|
|
896
1240
|
);
|
|
897
1241
|
},
|
|
898
1242
|
{ immediate: !0 }
|
|
899
1243
|
);
|
|
900
|
-
const
|
|
901
|
-
|
|
1244
|
+
const n = () => {
|
|
1245
|
+
s.value = !1;
|
|
902
1246
|
};
|
|
903
|
-
return
|
|
904
|
-
var
|
|
905
|
-
(a = (
|
|
1247
|
+
return B(() => {
|
|
1248
|
+
var i, a;
|
|
1249
|
+
(a = (i = e.value) == null ? void 0 : i.previousElementSibling) == null || a.addEventListener(
|
|
906
1250
|
"focusin",
|
|
907
|
-
|
|
1251
|
+
n
|
|
908
1252
|
);
|
|
909
|
-
}),
|
|
910
|
-
var
|
|
911
|
-
(a = (
|
|
1253
|
+
}), ue(() => {
|
|
1254
|
+
var i, a;
|
|
1255
|
+
(a = (i = e.value) == null ? void 0 : i.previousElementSibling) == null || a.removeEventListener(
|
|
912
1256
|
"focusin",
|
|
913
|
-
|
|
1257
|
+
n
|
|
914
1258
|
);
|
|
915
|
-
}), { isOpen:
|
|
916
|
-
},
|
|
1259
|
+
}), { isOpen: r, panelRef: o };
|
|
1260
|
+
}, Qs = {
|
|
917
1261
|
key: 0,
|
|
918
|
-
role: "status",
|
|
919
|
-
class: "dialog-search-status"
|
|
920
|
-
}, Bt = {
|
|
921
|
-
key: 1,
|
|
922
1262
|
class: "dialog-search-error"
|
|
923
|
-
},
|
|
1263
|
+
}, Xs = {
|
|
924
1264
|
role: "alert",
|
|
925
1265
|
class: "dialog-search-status dialog-search-status-error"
|
|
926
|
-
},
|
|
927
|
-
key:
|
|
928
|
-
role: "status",
|
|
929
|
-
class: "dialog-search-status"
|
|
930
|
-
}, Ht = {
|
|
1266
|
+
}, Ys = {
|
|
1267
|
+
key: 1,
|
|
931
1268
|
role: "status",
|
|
932
1269
|
class: "dialog-search-status"
|
|
933
|
-
},
|
|
1270
|
+
}, Zs = {
|
|
1271
|
+
key: 0,
|
|
1272
|
+
class: "dialog-search-footer"
|
|
1273
|
+
}, Js = ["href"], no = /* @__PURE__ */ w({
|
|
934
1274
|
__name: "DialogSearchResults",
|
|
935
1275
|
props: {
|
|
936
1276
|
controller: {},
|
|
937
1277
|
state: {},
|
|
938
|
-
locale: {}
|
|
1278
|
+
locale: { default: void 0 },
|
|
1279
|
+
theme: { default: void 0 },
|
|
1280
|
+
layout: { default: "list" },
|
|
1281
|
+
seeAllHref: { type: Function, default: void 0 }
|
|
939
1282
|
},
|
|
940
1283
|
setup(t) {
|
|
941
|
-
const e = t,
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1284
|
+
const e = t, s = (p) => p instanceof Oe ? `Search failed (${p.status}${p.code ? ` ${p.code}` : ""}): ${p.message}` : "Search failed: network error. Check your connection and try again.", o = b(() => e.state), r = b(() => e.state.status !== L.IDLE), { anchorRef: n, rect: i, viewport: a } = Gs(r), { isOpen: h, panelRef: c } = Ws(o, n), d = b(
|
|
1285
|
+
() => h.value && i.value !== void 0 && xs(i.value, a.value.height)
|
|
1286
|
+
), g = b(() => js(e.theme)), y = b(() => ({
|
|
1287
|
+
...i.value === void 0 ? {} : Ps(i.value, a.value.width, a.value.height),
|
|
1288
|
+
...g.value
|
|
1289
|
+
})), S = b(() => he(e.locale)), f = b(() => e.state.response), I = b(
|
|
1290
|
+
() => {
|
|
1291
|
+
var p, C;
|
|
1292
|
+
return ((C = (p = e.state.sections) == null ? void 0 : p.collections) == null ? void 0 : C.hits) ?? [];
|
|
1293
|
+
}
|
|
1294
|
+
), $ = b(
|
|
1295
|
+
() => me(I.value).length > 0
|
|
1296
|
+
), R = b(
|
|
1297
|
+
() => e.seeAllHref !== void 0 && f.value !== void 0 && f.value.nbHits > 0
|
|
1298
|
+
), m = b(() => !R.value && _e(e.state)), v = b(
|
|
1299
|
+
() => {
|
|
1300
|
+
var p;
|
|
1301
|
+
return f.value === void 0 || (p = e.seeAllHref) == null ? void 0 : p.call(e, f.value.query);
|
|
1302
|
+
}
|
|
956
1303
|
);
|
|
957
|
-
return (
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1304
|
+
return (p, C) => (u(), _(N, null, [
|
|
1305
|
+
l("div", {
|
|
1306
|
+
ref_key: "anchorRef",
|
|
1307
|
+
ref: n
|
|
1308
|
+
}, null, 512),
|
|
1309
|
+
d.value ? (u(), O(ke, {
|
|
1310
|
+
key: 0,
|
|
1311
|
+
to: "body"
|
|
1312
|
+
}, [
|
|
1313
|
+
l("div", {
|
|
1314
|
+
ref_key: "panelRef",
|
|
1315
|
+
ref: c,
|
|
1316
|
+
class: Z(["dialog-search-panel", `dialog-search-panel--${e.layout}`]),
|
|
1317
|
+
style: Ae(y.value)
|
|
967
1318
|
}, [
|
|
968
|
-
u("div",
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
index: f,
|
|
989
|
-
locale: e.locale
|
|
990
|
-
}, null, 8, ["controller", "hit", "index", "locale"]))), 128))
|
|
991
|
-
]),
|
|
992
|
-
L(Rt, {
|
|
1319
|
+
e.state.status === K(L).ERROR ? (u(), _("div", Qs, [
|
|
1320
|
+
l("p", Xs, E(s(e.state.error)), 1),
|
|
1321
|
+
l("button", {
|
|
1322
|
+
type: "button",
|
|
1323
|
+
class: "dialog-search-retry",
|
|
1324
|
+
onClick: C[0] || (C[0] = (P) => e.controller.retry())
|
|
1325
|
+
}, E(S.value.retry), 1)
|
|
1326
|
+
])) : f.value === void 0 ? (u(), _("p", Ys, E(S.value.searching(e.state.query)), 1)) : (u(), _(N, { key: 2 }, [
|
|
1327
|
+
l("div", {
|
|
1328
|
+
class: Z([
|
|
1329
|
+
"dialog-search-body",
|
|
1330
|
+
{ "dialog-search-body--no-collections": !$.value }
|
|
1331
|
+
])
|
|
1332
|
+
}, [
|
|
1333
|
+
T(ys, {
|
|
1334
|
+
collections: I.value,
|
|
1335
|
+
query: f.value.query,
|
|
1336
|
+
messages: S.value
|
|
1337
|
+
}, null, 8, ["collections", "query", "messages"]),
|
|
1338
|
+
T(ks, {
|
|
993
1339
|
controller: e.controller,
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1340
|
+
response: f.value,
|
|
1341
|
+
locale: e.locale,
|
|
1342
|
+
messages: S.value
|
|
1343
|
+
}, null, 8, ["controller", "response", "locale", "messages"])
|
|
1344
|
+
], 2),
|
|
1345
|
+
R.value || m.value ? (u(), _("div", Zs, [
|
|
1346
|
+
R.value ? (u(), _("a", {
|
|
1347
|
+
key: 0,
|
|
1348
|
+
class: "dialog-search-cta",
|
|
1349
|
+
href: v.value
|
|
1350
|
+
}, [
|
|
1351
|
+
ce(E(S.value.seeAllLabel(f.value.nbHits)) + " ", 1),
|
|
1352
|
+
T(is)
|
|
1353
|
+
], 8, Js)) : (u(), O(zt, {
|
|
1354
|
+
key: 1,
|
|
1355
|
+
controller: e.controller,
|
|
1356
|
+
state: e.state,
|
|
1357
|
+
locale: e.locale
|
|
1358
|
+
}, null, 8, ["controller", "state", "locale"]))
|
|
1359
|
+
])) : A("", !0)
|
|
1360
|
+
], 64))
|
|
1361
|
+
], 6)
|
|
1362
|
+
])) : A("", !0)
|
|
1363
|
+
], 64));
|
|
1001
1364
|
}
|
|
1002
|
-
}),
|
|
1003
|
-
const { client: e, surface:
|
|
1004
|
-
search: (a,
|
|
1365
|
+
}), ro = (t) => {
|
|
1366
|
+
const { client: e, surface: s = "search_page", ...o } = t, r = Qe({
|
|
1367
|
+
search: (a, h) => e.search(a, h),
|
|
1005
1368
|
analytics: {
|
|
1006
|
-
surface:
|
|
1369
|
+
surface: s,
|
|
1007
1370
|
trackViewSearchResults: (a) => e.trackViewSearchResults(a),
|
|
1008
1371
|
trackSelectSearchResult: (a) => e.trackSelectSearchResult(a)
|
|
1009
1372
|
},
|
|
1010
|
-
...
|
|
1011
|
-
}),
|
|
1012
|
-
|
|
1373
|
+
...o
|
|
1374
|
+
}), n = Le(r.getState()), i = r.subscribe(() => {
|
|
1375
|
+
n.value = r.getState();
|
|
1013
1376
|
});
|
|
1014
|
-
return
|
|
1015
|
-
|
|
1377
|
+
return B(() => {
|
|
1378
|
+
pe({
|
|
1016
1379
|
method: "vue",
|
|
1017
|
-
version: "3.
|
|
1380
|
+
version: "3.8.0"
|
|
1018
1381
|
});
|
|
1019
|
-
}),
|
|
1020
|
-
|
|
1021
|
-
}), { controller:
|
|
1382
|
+
}), ue(() => {
|
|
1383
|
+
i(), r.dispose();
|
|
1384
|
+
}), { controller: r, state: n, theme: e.theme };
|
|
1022
1385
|
};
|
|
1023
1386
|
export {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1387
|
+
It as DialogInput,
|
|
1388
|
+
so as DialogProductBlock,
|
|
1389
|
+
oo as DialogSearchBar,
|
|
1390
|
+
zt as DialogSearchPagination,
|
|
1391
|
+
os as DialogSearchProductCard,
|
|
1392
|
+
no as DialogSearchResults,
|
|
1393
|
+
ro as useDialogSearch
|
|
1031
1394
|
};
|