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