@searchcraft/react-sdk 0.9.7 → 0.10.1

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.
@@ -0,0 +1,4664 @@
1
+ var fn = Object.defineProperty;
2
+ var dn = (e, t, r) => t in e ? fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var d = (e, t, r) => dn(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { jsx as me } from "react/jsx-runtime";
5
+ import ge from "react";
6
+ const pn = "searchcraft-javascript-sdk", Oe = (
7
+ /* searchcraft-javascript-sdk */
8
+ { experimentalSlotFixes: !1, hydratedSelectorName: "hydrated", lazyLoad: !1, shadowDom: !1, slotRelocation: !0, updatable: !0 }
9
+ );
10
+ var mn = Object.defineProperty, gn = (e, t) => {
11
+ for (var r in t)
12
+ mn(e, r, { get: t[r], enumerable: !0 });
13
+ }, vn = "http://www.w3.org/2000/svg", bn = "http://www.w3.org/1999/xhtml", yn = (e, t) => {
14
+ var r;
15
+ const s = t.$cmpMeta$;
16
+ Object.entries((r = s.$members$) != null ? r : {}).map(([o, [n]]) => {
17
+ if (n & 31 || n & 32) {
18
+ const c = e[o], h = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), o);
19
+ Object.defineProperty(e, o, {
20
+ get() {
21
+ return h.get.call(this);
22
+ },
23
+ set(u) {
24
+ h.set.call(this, u);
25
+ },
26
+ configurable: !0,
27
+ enumerable: !0
28
+ }), e[o] = t.$instanceValues$.has(o) ? t.$instanceValues$.get(o) : c;
29
+ }
30
+ });
31
+ }, Qt = /* @__PURE__ */ new WeakMap(), Cn = (e) => Qt.delete(e), Ce = (e) => Qt.get(e), Sn = (e, t) => {
32
+ const r = {
33
+ $flags$: 0,
34
+ $hostElement$: e,
35
+ $cmpMeta$: t,
36
+ $instanceValues$: /* @__PURE__ */ new Map()
37
+ };
38
+ r.$onReadyPromise$ = new Promise((a) => r.$onReadyResolve$ = a), e["s-p"] = [], e["s-rc"] = [];
39
+ const s = Qt.set(e, r);
40
+ return yn(e, r), s;
41
+ }, Zr = (e, t) => t in e, yt = (e, t) => (0, console.error)(e, t), Ct = typeof window < "u" ? window : {}, Le = Ct.document || { head: {} }, O = Ct.HTMLElement || class {
42
+ }, J = {
43
+ $flags$: 0,
44
+ $resourcesUrl$: "",
45
+ jmp: (e) => e(),
46
+ raf: (e) => requestAnimationFrame(e),
47
+ ael: (e, t, r, s) => e.addEventListener(t, r, s),
48
+ rel: (e, t, r, s) => e.removeEventListener(t, r, s),
49
+ ce: (e, t) => new CustomEvent(e, t)
50
+ }, kn = Oe.shadowDom, wn = (e) => Promise.resolve(e), qt = !1, Kr = [], Ss = [], xn = (e, t) => (r) => {
51
+ e.push(r), qt || (qt = !0, J.$flags$ & 4 ? Xt(Yt) : J.raf(Yt));
52
+ }, Qr = (e) => {
53
+ for (let t = 0; t < e.length; t++)
54
+ try {
55
+ e[t](performance.now());
56
+ } catch (r) {
57
+ yt(r);
58
+ }
59
+ e.length = 0;
60
+ }, Yt = () => {
61
+ Qr(Kr), Qr(Ss), (qt = Kr.length > 0) && J.raf(Yt);
62
+ }, Xt = (e) => wn().then(e), En = /* @__PURE__ */ xn(Ss), Jt = (e) => (e = typeof e, e === "object" || e === "function"), Rn = {};
63
+ gn(Rn, {
64
+ err: () => ks,
65
+ map: () => Tn,
66
+ ok: () => Zt,
67
+ unwrap: () => Pn,
68
+ unwrapErr: () => $n
69
+ });
70
+ var Zt = (e) => ({
71
+ isOk: !0,
72
+ isErr: !1,
73
+ value: e
74
+ }), ks = (e) => ({
75
+ isOk: !1,
76
+ isErr: !0,
77
+ value: e
78
+ });
79
+ function Tn(e, t) {
80
+ if (e.isOk) {
81
+ const r = t(e.value);
82
+ return r instanceof Promise ? r.then((s) => Zt(s)) : Zt(r);
83
+ }
84
+ if (e.isErr) {
85
+ const r = e.value;
86
+ return ks(r);
87
+ }
88
+ throw "should never get here";
89
+ }
90
+ var Pn = (e) => {
91
+ if (e.isOk)
92
+ return e.value;
93
+ throw e.value;
94
+ }, $n = (e) => {
95
+ if (e.isErr)
96
+ return e.value;
97
+ throw e.value;
98
+ }, ws = (e) => {
99
+ const t = e.__childNodes || e.childNodes;
100
+ e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && xs(t, e.tagName).forEach((r) => {
101
+ var s;
102
+ r.nodeType === 1 && r.tagName === "SLOT-FB" && ((s = _n(r, r["s-sn"], !1)) != null && s.length ? r.hidden = !0 : r.hidden = !1);
103
+ });
104
+ for (const r of t)
105
+ r.nodeType === 1 && (r.__childNodes || r.childNodes).length && ws(r);
106
+ };
107
+ function xs(e, t, r) {
108
+ let s = 0, a = [], o;
109
+ for (; s < e.length; s++)
110
+ o = e[s], o["s-sr"] && o["s-hn"] === t && r === void 0 && a.push(o), a = [...a, ...xs(o.childNodes, t, r)];
111
+ return a;
112
+ }
113
+ var _n = (e, t, r = !0) => {
114
+ const s = [];
115
+ for ((r && e["s-sr"] || !e["s-sr"]) && s.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
116
+ s.push(e);
117
+ return s;
118
+ }, Xr = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Ke = (e, t = "") => () => {
119
+ }, i = (e, t, ...r) => {
120
+ let s = null, a = null, o = null, n = !1, c = !1;
121
+ const h = [], u = (p) => {
122
+ for (let m = 0; m < p.length; m++)
123
+ s = p[m], Array.isArray(s) ? u(s) : s != null && typeof s != "boolean" && ((n = typeof e != "function" && !Jt(s)) && (s = String(s)), n && c ? h[h.length - 1].$text$ += s : h.push(n ? pt(null, s) : s), c = n);
124
+ };
125
+ if (u(r), t) {
126
+ t.key && (a = t.key), t.name && (o = t.name);
127
+ {
128
+ const p = t.className || t.class;
129
+ p && (t.class = typeof p != "object" ? p : Object.keys(p).filter((m) => p[m]).join(" "));
130
+ }
131
+ }
132
+ if (typeof e == "function")
133
+ return e(
134
+ t === null ? {} : t,
135
+ h,
136
+ Mn
137
+ );
138
+ const l = pt(e, null);
139
+ return l.$attrs$ = t, h.length > 0 && (l.$children$ = h), l.$key$ = a, l.$name$ = o, l;
140
+ }, pt = (e, t) => {
141
+ const r = {
142
+ $flags$: 0,
143
+ $tag$: e,
144
+ $text$: t,
145
+ $elm$: null,
146
+ $children$: null
147
+ };
148
+ return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
149
+ }, An = {}, In = (e) => e && e.$tag$ === An, Mn = {
150
+ forEach: (e, t) => e.map(Jr).forEach(t),
151
+ map: (e, t) => e.map(Jr).map(t).map(Ln)
152
+ }, Jr = (e) => ({
153
+ vattrs: e.$attrs$,
154
+ vchildren: e.$children$,
155
+ vkey: e.$key$,
156
+ vname: e.$name$,
157
+ vtag: e.$tag$,
158
+ vtext: e.$text$
159
+ }), Ln = (e) => {
160
+ if (typeof e.vtag == "function") {
161
+ const r = { ...e.vattrs };
162
+ return e.vkey && (r.key = e.vkey), e.vname && (r.name = e.vname), i(e.vtag, r, ...e.vchildren || []);
163
+ }
164
+ const t = pt(e.vtag, e.vtext);
165
+ return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
166
+ }, Es = (e, t) => e != null && !Jt(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, On = (e) => e, be = (e, t, r) => {
167
+ const s = On(e);
168
+ return {
169
+ emit: (a) => Rs(s, t, {
170
+ bubbles: !0,
171
+ composed: !0,
172
+ cancelable: !0,
173
+ detail: a
174
+ })
175
+ };
176
+ }, Rs = (e, t, r) => {
177
+ const s = J.ce(t, r);
178
+ return e.dispatchEvent(s), s;
179
+ }, ut = /* @__PURE__ */ new WeakMap(), es = (e, t, r, s, a, o) => {
180
+ if (r !== s) {
181
+ let n = Zr(e, t), c = t.toLowerCase();
182
+ if (t === "class") {
183
+ const h = e.classList, u = ts(r);
184
+ let l = ts(s);
185
+ e["s-si"] ? (l.push(e["s-si"]), u.forEach((p) => {
186
+ p.startsWith(e["s-si"]) && l.push(p);
187
+ }), l = [...new Set(l)], h.add(...l), delete e["s-si"]) : (h.remove(...u.filter((p) => p && !l.includes(p))), h.add(...l.filter((p) => p && !u.includes(p))));
188
+ } else if (t === "style") {
189
+ for (const h in r)
190
+ (!s || s[h] == null) && (h.includes("-") ? e.style.removeProperty(h) : e.style[h] = "");
191
+ for (const h in s)
192
+ (!r || s[h] !== r[h]) && (h.includes("-") ? e.style.setProperty(h, s[h]) : e.style[h] = s[h]);
193
+ } else if (t !== "key") if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
194
+ if (t[2] === "-" ? t = t.slice(3) : Zr(Ct, c) ? t = c.slice(2) : t = c[2] + t.slice(3), r || s) {
195
+ const h = t.endsWith(Ts);
196
+ t = t.replace(Dn, ""), r && J.rel(e, t, r, h), s && J.ael(e, t, s, h);
197
+ }
198
+ } else {
199
+ const h = Jt(s);
200
+ if ((n || h && s !== null) && !a)
201
+ try {
202
+ if (e.tagName.includes("-"))
203
+ e[t] !== s && (e[t] = s);
204
+ else {
205
+ const u = s ?? "";
206
+ t === "list" ? n = !1 : (r == null || e[t] != u) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = u : e.setAttribute(t, u));
207
+ }
208
+ } catch {
209
+ }
210
+ s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && e.removeAttribute(t) : (!n || o & 4 || a) && !h && (s = s === !0 ? "" : s, e.setAttribute(t, s));
211
+ }
212
+ }
213
+ }, Fn = /\s/, ts = (e) => (typeof e == "object" && "baseVal" in e && (e = e.baseVal), e ? e.split(Fn) : []), Ts = "Capture", Dn = new RegExp(Ts + "$"), Ps = (e, t, r) => {
214
+ const s = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, a = e && e.$attrs$ || {}, o = t.$attrs$ || {};
215
+ for (const n of rs(Object.keys(a)))
216
+ n in o || es(s, n, a[n], void 0, r, t.$flags$);
217
+ for (const n of rs(Object.keys(o)))
218
+ es(s, n, a[n], o[n], r, t.$flags$);
219
+ };
220
+ function rs(e) {
221
+ return e.includes("ref") ? (
222
+ // we need to sort these to ensure that `'ref'` is the last attr
223
+ [...e.filter((t) => t !== "ref"), "ref"]
224
+ ) : (
225
+ // no need to sort, return the original array
226
+ e
227
+ );
228
+ }
229
+ var Kt, er, mt = !1, gt = !1, tr = !1, te = !1, vt = (e, t, r) => {
230
+ var s;
231
+ const a = t.$children$[r];
232
+ let o = 0, n, c, h;
233
+ if (mt || (tr = !0, a.$tag$ === "slot" && (a.$flags$ |= a.$children$ ? (
234
+ // slot element has fallback content
235
+ // still create an element that "mocks" the slot element
236
+ 2
237
+ ) : (
238
+ // slot element does not have fallback content
239
+ // create an html comment we'll use to always reference
240
+ // where actual slot content should sit next to
241
+ 1
242
+ ))), a.$text$ !== null)
243
+ n = a.$elm$ = Le.createTextNode(a.$text$);
244
+ else if (a.$flags$ & 1)
245
+ n = a.$elm$ = Le.createTextNode("");
246
+ else {
247
+ if (te || (te = a.$tag$ === "svg"), n = a.$elm$ = Le.createElementNS(
248
+ te ? vn : bn,
249
+ !mt && Oe.slotRelocation && a.$flags$ & 2 ? "slot-fb" : a.$tag$
250
+ ), te && a.$tag$ === "foreignObject" && (te = !1), Ps(null, a, te), a.$children$)
251
+ for (o = 0; o < a.$children$.length; ++o)
252
+ c = vt(e, a, o), c && n.appendChild(c);
253
+ a.$tag$ === "svg" ? te = !1 : n.tagName === "foreignObject" && (te = !0);
254
+ }
255
+ return n["s-hn"] = er, a.$flags$ & 3 && (n["s-sr"] = !0, n["s-cr"] = Kt, n["s-sn"] = a.$name$ || "", n["s-rf"] = (s = a.$attrs$) == null ? void 0 : s.ref, h = e && e.$children$ && e.$children$[r], h && h.$tag$ === a.$tag$ && e.$elm$ && Qe(e.$elm$, !1)), n;
256
+ }, Qe = (e, t) => {
257
+ J.$flags$ |= 1;
258
+ const r = Array.from(e.__childNodes || e.childNodes);
259
+ e["s-sr"] && Oe.experimentalSlotFixes;
260
+ for (let s = r.length - 1; s >= 0; s--) {
261
+ const a = r[s];
262
+ a["s-hn"] !== er && a["s-ol"] && (ye(Xe(a).parentNode, a, Xe(a)), a["s-ol"].remove(), a["s-ol"] = void 0, a["s-sh"] = void 0, tr = !0), t && Qe(a, t);
263
+ }
264
+ J.$flags$ &= -2;
265
+ }, $s = (e, t, r, s, a, o) => {
266
+ let n = e["s-cr"] && e["s-cr"].parentNode || e, c;
267
+ for (; a <= o; ++a)
268
+ s[a] && (c = vt(null, r, a), c && (s[a].$elm$ = c, ye(n, c, Xe(t))));
269
+ }, _s = (e, t, r) => {
270
+ for (let s = t; s <= r; ++s) {
271
+ const a = e[s];
272
+ if (a) {
273
+ const o = a.$elm$;
274
+ o && (gt = !0, o["s-ol"] ? o["s-ol"].remove() : Qe(o, !0), o.remove());
275
+ }
276
+ }
277
+ }, Nn = (e, t, r, s, a = !1) => {
278
+ let o = 0, n = 0, c = 0, h = 0, u = t.length - 1, l = t[0], p = t[u], m = s.length - 1, b = s[0], v = s[m], T, H;
279
+ for (; o <= u && n <= m; )
280
+ if (l == null)
281
+ l = t[++o];
282
+ else if (p == null)
283
+ p = t[--u];
284
+ else if (b == null)
285
+ b = s[++n];
286
+ else if (v == null)
287
+ v = s[--m];
288
+ else if (ht(l, b, a))
289
+ Ie(l, b, a), l = t[++o], b = s[++n];
290
+ else if (ht(p, v, a))
291
+ Ie(p, v, a), p = t[--u], v = s[--m];
292
+ else if (ht(l, v, a))
293
+ (l.$tag$ === "slot" || v.$tag$ === "slot") && Qe(l.$elm$.parentNode, !1), Ie(l, v, a), ye(e, l.$elm$, p.$elm$.nextSibling), l = t[++o], v = s[--m];
294
+ else if (ht(p, b, a))
295
+ (l.$tag$ === "slot" || v.$tag$ === "slot") && Qe(p.$elm$.parentNode, !1), Ie(p, b, a), ye(e, p.$elm$, l.$elm$), p = t[--u], b = s[++n];
296
+ else {
297
+ for (c = -1, h = o; h <= u; ++h)
298
+ if (t[h] && t[h].$key$ !== null && t[h].$key$ === b.$key$) {
299
+ c = h;
300
+ break;
301
+ }
302
+ c >= 0 ? (H = t[c], H.$tag$ !== b.$tag$ ? T = vt(t && t[n], r, c) : (Ie(H, b, a), t[c] = void 0, T = H.$elm$), b = s[++n]) : (T = vt(t && t[n], r, n), b = s[++n]), T && ye(
303
+ Xe(l.$elm$).parentNode,
304
+ T,
305
+ Xe(l.$elm$)
306
+ );
307
+ }
308
+ o > u ? $s(
309
+ e,
310
+ s[m + 1] == null ? null : s[m + 1].$elm$,
311
+ r,
312
+ s,
313
+ n,
314
+ m
315
+ ) : n > m && _s(t, o, u);
316
+ }, ht = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, Xe = (e) => e && e["s-ol"] || e, Ie = (e, t, r = !1) => {
317
+ const s = t.$elm$ = e.$elm$, a = e.$children$, o = t.$children$, n = t.$tag$, c = t.$text$;
318
+ let h;
319
+ c === null ? (te = n === "svg" ? !0 : n === "foreignObject" ? !1 : te, n === "slot" && !mt || Ps(e, t, te), a !== null && o !== null ? Nn(s, a, t, o, r) : o !== null ? (e.$text$ !== null && (s.textContent = ""), $s(s, null, t, o, 0, o.length - 1)) : (
320
+ // don't do this on initial render as it can cause non-hydrated content to be removed
321
+ !r && Oe.updatable && a !== null && _s(a, 0, a.length - 1)
322
+ ), te && n === "svg" && (te = !1)) : (h = s["s-cr"]) ? h.parentNode.textContent = c : e.$text$ !== c && (s.data = c);
323
+ }, he = [], As = (e) => {
324
+ let t, r, s;
325
+ const a = e.__childNodes || e.childNodes;
326
+ for (const o of a) {
327
+ if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
328
+ r = t.parentNode.__childNodes || t.parentNode.childNodes;
329
+ const n = o["s-sn"];
330
+ for (s = r.length - 1; s >= 0; s--)
331
+ if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"])
332
+ if (Xr(t, n)) {
333
+ let c = he.find((h) => h.$nodeToRelocate$ === t);
334
+ gt = !0, t["s-sn"] = t["s-sn"] || n, c ? (c.$nodeToRelocate$["s-sh"] = o["s-hn"], c.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], he.push({
335
+ $slotRefNode$: o,
336
+ $nodeToRelocate$: t
337
+ })), t["s-sr"] && he.map((h) => {
338
+ Xr(h.$nodeToRelocate$, t["s-sn"]) && (c = he.find((u) => u.$nodeToRelocate$ === t), c && !h.$slotRefNode$ && (h.$slotRefNode$ = c.$slotRefNode$));
339
+ });
340
+ } else he.some((c) => c.$nodeToRelocate$ === t) || he.push({
341
+ $nodeToRelocate$: t
342
+ });
343
+ }
344
+ o.nodeType === 1 && As(o);
345
+ }
346
+ }, ye = (e, t, r) => e == null ? void 0 : e.insertBefore(t, r), Hn = (e, t, r = !1) => {
347
+ var s, a, o, n;
348
+ const c = e.$hostElement$, h = e.$vnode$ || pt(null, null), u = In(t) ? t : i(null, null, t);
349
+ if (er = c.tagName, r && u.$attrs$)
350
+ for (const l of Object.keys(u.$attrs$))
351
+ c.hasAttribute(l) && !["key", "ref", "style", "class"].includes(l) && (u.$attrs$[l] = c[l]);
352
+ u.$tag$ = null, u.$flags$ |= 4, e.$vnode$ = u, u.$elm$ = h.$elm$ = c, mt = kn, Kt = c["s-cr"], gt = !1, Ie(h, u, r);
353
+ {
354
+ if (J.$flags$ |= 1, tr) {
355
+ As(u.$elm$);
356
+ for (const l of he) {
357
+ const p = l.$nodeToRelocate$;
358
+ if (!p["s-ol"]) {
359
+ const m = Le.createTextNode("");
360
+ m["s-nr"] = p, ye(p.parentNode, p["s-ol"] = m, p);
361
+ }
362
+ }
363
+ for (const l of he) {
364
+ const p = l.$nodeToRelocate$, m = l.$slotRefNode$;
365
+ if (m) {
366
+ const b = m.parentNode;
367
+ let v = m.nextSibling;
368
+ {
369
+ let ee = (s = p["s-ol"]) == null ? void 0 : s.previousSibling;
370
+ for (; ee; ) {
371
+ let M = (a = ee["s-nr"]) != null ? a : null;
372
+ if (M && M["s-sn"] === p["s-sn"] && b === (M.__parentNode || M.parentNode)) {
373
+ for (M = M.nextSibling; M === p || M != null && M["s-sr"]; )
374
+ M = M == null ? void 0 : M.nextSibling;
375
+ if (!M || !M["s-nr"]) {
376
+ v = M;
377
+ break;
378
+ }
379
+ }
380
+ ee = ee.previousSibling;
381
+ }
382
+ }
383
+ const T = p.__parentNode || p.parentNode, H = p.__nextSibling || p.nextSibling;
384
+ (!v && b !== T || H !== v) && p !== v && (!p["s-hn"] && p["s-ol"] && (p["s-hn"] = p["s-ol"].parentNode.nodeName), ye(b, p, v), p.nodeType === 1 && p.tagName !== "SLOT-FB" && (p.hidden = (o = p["s-ih"]) != null ? o : !1)), p && typeof m["s-rf"] == "function" && m["s-rf"](p);
385
+ } else
386
+ p.nodeType === 1 && (r && (p["s-ih"] = (n = p.hidden) != null ? n : !1), p.hidden = !0);
387
+ }
388
+ }
389
+ gt && ws(u.$elm$), J.$flags$ &= -2, he.length = 0;
390
+ }
391
+ Kt = void 0;
392
+ }, Is = (e, t) => {
393
+ if (t && !e.$onRenderResolve$ && t["s-p"]) {
394
+ const r = t["s-p"].push(
395
+ new Promise(
396
+ (s) => e.$onRenderResolve$ = () => {
397
+ t["s-p"].splice(r - 1, 1), s();
398
+ }
399
+ )
400
+ );
401
+ }
402
+ }, rr = (e, t) => {
403
+ if (e.$flags$ |= 16, e.$flags$ & 4) {
404
+ e.$flags$ |= 512;
405
+ return;
406
+ }
407
+ return Is(e, e.$ancestorComponent$), En(() => Un(e, t));
408
+ }, Un = (e, t) => {
409
+ const r = e.$hostElement$, s = Ke("scheduleUpdate", e.$cmpMeta$.$tagName$), a = r;
410
+ if (!a)
411
+ throw new Error(
412
+ `Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
413
+ );
414
+ let o;
415
+ return s(), zn(o, () => Vn(e, a, t));
416
+ }, zn = (e, t) => jn(e) ? e.then(t).catch((r) => {
417
+ console.error(r), t();
418
+ }) : t(), jn = (e) => e instanceof Promise || e && e.then && typeof e.then == "function", Vn = async (e, t, r) => {
419
+ var s;
420
+ const a = e.$hostElement$, o = Ke("update", e.$cmpMeta$.$tagName$), n = a["s-rc"], c = Ke("render", e.$cmpMeta$.$tagName$);
421
+ Bn(e, t, a, r), n && (n.map((h) => h()), a["s-rc"] = void 0), c(), o();
422
+ {
423
+ const h = (s = a["s-p"]) != null ? s : [], u = () => Wn(e);
424
+ h.length === 0 ? u() : (Promise.all(h).then(u), e.$flags$ |= 4, h.length = 0);
425
+ }
426
+ }, Bn = (e, t, r, s) => {
427
+ try {
428
+ t = t.render(), e.$flags$ &= -17, e.$flags$ |= 2, Hn(e, t, s);
429
+ } catch (a) {
430
+ yt(a, e.$hostElement$);
431
+ }
432
+ return null;
433
+ }, Wn = (e) => {
434
+ const t = e.$cmpMeta$.$tagName$, r = e.$hostElement$, s = Ke("postUpdate", t), a = r, o = e.$ancestorComponent$;
435
+ e.$flags$ & 64 ? s() : (e.$flags$ |= 64, Ms(r), qn(a, "componentDidLoad", void 0, r), s(), e.$onReadyResolve$(r), o || Gn()), e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0), e.$flags$ & 512 && Xt(() => rr(e, !1)), e.$flags$ &= -517;
436
+ }, Gn = (e) => {
437
+ Ms(Le.documentElement), Xt(() => Rs(Ct, "appload", { detail: { namespace: pn } }));
438
+ }, qn = (e, t, r, s) => {
439
+ if (e && e[t])
440
+ try {
441
+ return e[t](r);
442
+ } catch (a) {
443
+ yt(a, s);
444
+ }
445
+ }, Ms = (e) => {
446
+ var t;
447
+ return e.classList.add((t = Oe.hydratedSelectorName) != null ? t : "hydrated");
448
+ }, Yn = (e, t) => Ce(e).$instanceValues$.get(t), ss = (e, t, r, s) => {
449
+ const a = Ce(e), o = e, n = a.$instanceValues$.get(t), c = a.$flags$, h = o;
450
+ r = Es(r, s.$members$[t][0]);
451
+ const u = Number.isNaN(n) && Number.isNaN(r);
452
+ if (r !== n && !u) {
453
+ a.$instanceValues$.set(t, r);
454
+ {
455
+ if (s.$watchers$ && c & 128) {
456
+ const p = s.$watchers$[t];
457
+ p && p.map((m) => {
458
+ try {
459
+ h[m](r, n, t);
460
+ } catch (b) {
461
+ yt(b, o);
462
+ }
463
+ });
464
+ }
465
+ (c & 18) === 2 && rr(a, !1);
466
+ }
467
+ }
468
+ }, Zn = (e, t, r) => {
469
+ var s, a;
470
+ const o = e.prototype;
471
+ if (t.$members$ || t.$watchers$ || e.watchers) {
472
+ e.watchers && !t.$watchers$ && (t.$watchers$ = e.watchers);
473
+ const n = Object.entries((s = t.$members$) != null ? s : {});
474
+ n.map(([c, [h]]) => {
475
+ if (h & 31 || h & 32) {
476
+ const { get: u, set: l } = Object.getOwnPropertyDescriptor(o, c) || {};
477
+ u && (t.$members$[c][0] |= 2048), l && (t.$members$[c][0] |= 4096), Object.defineProperty(o, c, {
478
+ get() {
479
+ return u ? u.apply(this) : Yn(this, c);
480
+ },
481
+ configurable: !0,
482
+ enumerable: !0
483
+ }), Object.defineProperty(o, c, {
484
+ set(p) {
485
+ const m = Ce(this);
486
+ if (l) {
487
+ const b = h & 32 ? this[c] : m.$hostElement$[c];
488
+ typeof b > "u" && m.$instanceValues$.get(c) ? p = m.$instanceValues$.get(c) : !m.$instanceValues$.get(c) && b && m.$instanceValues$.set(c, b), l.apply(this, [Es(p, h)]), p = h & 32 ? this[c] : m.$hostElement$[c], ss(this, c, p, t);
489
+ return;
490
+ }
491
+ {
492
+ ss(this, c, p, t);
493
+ return;
494
+ }
495
+ }
496
+ });
497
+ }
498
+ });
499
+ {
500
+ const c = /* @__PURE__ */ new Map();
501
+ o.attributeChangedCallback = function(h, u, l) {
502
+ J.jmp(() => {
503
+ var p;
504
+ const m = c.get(h);
505
+ if (!(this.hasOwnProperty(m) && Oe.lazyLoad)) {
506
+ if (o.hasOwnProperty(m) && typeof this[m] == "number" && // cast type to number to avoid TS compiler issues
507
+ this[m] == l)
508
+ return;
509
+ if (m == null) {
510
+ const v = Ce(this), T = v == null ? void 0 : v.$flags$;
511
+ if (T && !(T & 8) && T & 128 && l !== u) {
512
+ const ee = this, M = (p = t.$watchers$) == null ? void 0 : p[h];
513
+ M == null || M.forEach((De) => {
514
+ ee[De] != null && ee[De].call(ee, l, u, h);
515
+ });
516
+ }
517
+ return;
518
+ }
519
+ }
520
+ const b = Object.getOwnPropertyDescriptor(o, m);
521
+ l = l === null && typeof this[m] == "boolean" ? !1 : l, l !== this[m] && (!b.get || b.set) && (this[m] = l);
522
+ });
523
+ }, e.observedAttributes = Array.from(
524
+ /* @__PURE__ */ new Set([
525
+ ...Object.keys((a = t.$watchers$) != null ? a : {}),
526
+ ...n.filter(
527
+ ([h, u]) => u[0] & 15
528
+ /* HasAttribute */
529
+ ).map(([h, u]) => {
530
+ const l = u[1] || h;
531
+ return c.set(l, h), l;
532
+ })
533
+ ])
534
+ );
535
+ }
536
+ }
537
+ return e;
538
+ }, Kn = async (e, t, r, s) => {
539
+ if (!(t.$flags$ & 32)) {
540
+ t.$flags$ |= 32;
541
+ {
542
+ const n = e.localName;
543
+ customElements.whenDefined(n).then(
544
+ () => t.$flags$ |= 128
545
+ /* isWatchReady */
546
+ );
547
+ }
548
+ }
549
+ const a = t.$ancestorComponent$, o = () => rr(t, !0);
550
+ a && a["s-rc"] ? a["s-rc"].push(o) : o();
551
+ }, Qn = (e, t) => {
552
+ }, Xn = (e) => {
553
+ if (!(J.$flags$ & 1)) {
554
+ const t = Ce(e), r = t.$cmpMeta$, s = Ke("connectedCallback", r.$tagName$);
555
+ if (t.$flags$ & 1)
556
+ t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => Qn());
557
+ else {
558
+ t.$flags$ |= 1, // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
559
+ r.$flags$ & 12 && Jn(e);
560
+ {
561
+ let a = e;
562
+ for (; a = a.parentNode || a.host; )
563
+ if (a["s-p"]) {
564
+ Is(t, t.$ancestorComponent$ = a);
565
+ break;
566
+ }
567
+ }
568
+ r.$members$ && Object.entries(r.$members$).map(([a, [o]]) => {
569
+ if (o & 31 && e.hasOwnProperty(a)) {
570
+ const n = e[a];
571
+ delete e[a], e[a] = n;
572
+ }
573
+ }), Kn(e, t);
574
+ }
575
+ s();
576
+ }
577
+ }, Jn = (e) => {
578
+ const t = e["s-cr"] = Le.createComment(
579
+ ""
580
+ );
581
+ t["s-cn"] = !0, ye(e, t, e.firstChild);
582
+ }, eo = async (e) => {
583
+ J.$flags$ & 1 || Ce(e), ut.has(e) && ut.delete(e), e.shadowRoot && ut.has(e.shadowRoot) && ut.delete(e.shadowRoot);
584
+ }, F = (e, t) => {
585
+ const r = {
586
+ $flags$: t[0],
587
+ $tagName$: t[1]
588
+ };
589
+ r.$members$ = t[2], r.$watchers$ = e.$watchers$;
590
+ const s = e.prototype.connectedCallback, a = e.prototype.disconnectedCallback;
591
+ return Object.assign(e.prototype, {
592
+ __hasHostListenerAttached: !1,
593
+ __registerHost() {
594
+ Sn(this, r);
595
+ },
596
+ connectedCallback() {
597
+ this.__hasHostListenerAttached || (Ce(this), this.__hasHostListenerAttached = !0), Xn(this), s && s.call(this);
598
+ },
599
+ disconnectedCallback() {
600
+ eo(this), a && a.call(this), J.raf(() => {
601
+ var o;
602
+ const n = Ce(this);
603
+ ((o = n == null ? void 0 : n.$vnode$) == null ? void 0 : o.$elm$) instanceof Node && !n.$vnode$.$elm$.isConnected && delete n.$vnode$, this instanceof Node && !this.isConnected && Cn(this);
604
+ });
605
+ },
606
+ __attachShadow() {
607
+ this.shadowRoot = this;
608
+ }
609
+ }), e.is = r.$tagName$, Zn(e, r);
610
+ }, to = (e, t) => t, ro = Object.defineProperty, so = (e, t, r) => t in e ? ro(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, A = (e, t, r) => so(e, typeof t != "symbol" ? t + "" : t, r), xe = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(xe || {});
611
+ class ao {
612
+ constructor(t) {
613
+ A(this, "logLevel"), A(this, "logFormatter"), this.logLevel = t.logLevel || 1, this.logFormatter = t.logFormatter || this.defaultFormatter;
614
+ }
615
+ defaultFormatter(t, r) {
616
+ return `[${xe[t]}] ${(/* @__PURE__ */ new Date()).toISOString()}: ${r}`;
617
+ }
618
+ debug(t) {
619
+ this.logLevel <= 0 && console.log(this.logFormatter(0, t));
620
+ }
621
+ info(t) {
622
+ this.logLevel <= 1 && console.info(this.logFormatter(1, t));
623
+ }
624
+ warn(t) {
625
+ this.logLevel <= 2 && console.warn(this.logFormatter(2, t));
626
+ }
627
+ error(t) {
628
+ this.logLevel <= 3 && console.error(this.logFormatter(3, t));
629
+ }
630
+ log(t, r) {
631
+ switch (t) {
632
+ case 0:
633
+ this.debug(r);
634
+ break;
635
+ case 1:
636
+ this.info(r);
637
+ break;
638
+ case 2:
639
+ this.warn(r);
640
+ break;
641
+ case 3:
642
+ this.error(r);
643
+ break;
644
+ }
645
+ }
646
+ }
647
+ function fe(e, t, r, s) {
648
+ return new (r || (r = Promise))(function(a, o) {
649
+ function n(u) {
650
+ try {
651
+ h(s.next(u));
652
+ } catch (l) {
653
+ o(l);
654
+ }
655
+ }
656
+ function c(u) {
657
+ try {
658
+ h(s.throw(u));
659
+ } catch (l) {
660
+ o(l);
661
+ }
662
+ }
663
+ function h(u) {
664
+ var l;
665
+ u.done ? a(u.value) : (l = u.value, l instanceof r ? l : new r(function(p) {
666
+ p(l);
667
+ })).then(n, c);
668
+ }
669
+ h((s = s.apply(e, [])).next());
670
+ });
671
+ }
672
+ function de(e, t) {
673
+ var r, s, a, o, n = { label: 0, sent: function() {
674
+ if (1 & a[0]) throw a[1];
675
+ return a[1];
676
+ }, trys: [], ops: [] };
677
+ return o = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
678
+ return this;
679
+ }), o;
680
+ function c(h) {
681
+ return function(u) {
682
+ return function(l) {
683
+ if (r) throw new TypeError("Generator is already executing.");
684
+ for (; o && (o = 0, l[0] && (n = 0)), n; ) try {
685
+ if (r = 1, s && (a = 2 & l[0] ? s.return : l[0] ? s.throw || ((a = s.return) && a.call(s), 0) : s.next) && !(a = a.call(s, l[1])).done) return a;
686
+ switch (s = 0, a && (l = [2 & l[0], a.value]), l[0]) {
687
+ case 0:
688
+ case 1:
689
+ a = l;
690
+ break;
691
+ case 4:
692
+ return n.label++, { value: l[1], done: !1 };
693
+ case 5:
694
+ n.label++, s = l[1], l = [0];
695
+ continue;
696
+ case 7:
697
+ l = n.ops.pop(), n.trys.pop();
698
+ continue;
699
+ default:
700
+ if (a = n.trys, !((a = a.length > 0 && a[a.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
701
+ n = 0;
702
+ continue;
703
+ }
704
+ if (l[0] === 3 && (!a || l[1] > a[0] && l[1] < a[3])) {
705
+ n.label = l[1];
706
+ break;
707
+ }
708
+ if (l[0] === 6 && n.label < a[1]) {
709
+ n.label = a[1], a = l;
710
+ break;
711
+ }
712
+ if (a && n.label < a[2]) {
713
+ n.label = a[2], n.ops.push(l);
714
+ break;
715
+ }
716
+ a[2] && n.ops.pop(), n.trys.pop();
717
+ continue;
718
+ }
719
+ l = t.call(e, n);
720
+ } catch (p) {
721
+ l = [6, p], s = 0;
722
+ } finally {
723
+ r = a = 0;
724
+ }
725
+ if (5 & l[0]) throw l[1];
726
+ return { value: l[0] ? l[1] : void 0, done: !0 };
727
+ }([h, u]);
728
+ };
729
+ }
730
+ }
731
+ var pe = { exclude: [] }, Ls = {}, no = { timeout: "true" }, ne = function(e, t) {
732
+ typeof window < "u" && (Ls[e] = t);
733
+ }, oo = function() {
734
+ return Object.fromEntries(Object.entries(Ls).filter(function(e) {
735
+ var t, r = e[0];
736
+ return !(!((t = pe == null ? void 0 : pe.exclude) === null || t === void 0) && t.includes(r));
737
+ }).map(function(e) {
738
+ return [e[0], (0, e[1])()];
739
+ }));
740
+ };
741
+ function ft(e) {
742
+ return e ^= e >>> 16, e = Math.imul(e, 2246822507), e ^= e >>> 13, e = Math.imul(e, 3266489909), (e ^= e >>> 16) >>> 0;
743
+ }
744
+ var B = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
745
+ function re(e, t) {
746
+ return e << t | e >>> 32 - t;
747
+ }
748
+ function sr(e, t) {
749
+ var r;
750
+ if (t === void 0 && (t = 0), t = t ? 0 | t : 0, typeof e == "string" && (r = e, e = new TextEncoder().encode(r).buffer), !(e instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
751
+ var s = new Uint32Array([t, t, t, t]);
752
+ (function(o, n) {
753
+ for (var c = o.byteLength / 16 | 0, h = new Uint32Array(o, 0, 4 * c), u = 0; u < c; u++) {
754
+ var l = h.subarray(4 * u, 4 * (u + 1));
755
+ l[0] = Math.imul(l[0], B[0]), l[0] = re(l[0], 15), l[0] = Math.imul(l[0], B[1]), n[0] = n[0] ^ l[0], n[0] = re(n[0], 19), n[0] = n[0] + n[1], n[0] = Math.imul(n[0], 5) + 1444728091, l[1] = Math.imul(l[1], B[1]), l[1] = re(l[1], 16), l[1] = Math.imul(l[1], B[2]), n[1] = n[1] ^ l[1], n[1] = re(n[1], 17), n[1] = n[1] + n[2], n[1] = Math.imul(n[1], 5) + 197830471, l[2] = Math.imul(l[2], B[2]), l[2] = re(l[2], 17), l[2] = Math.imul(l[2], B[3]), n[2] = n[2] ^ l[2], n[2] = re(n[2], 15), n[2] = n[2] + n[3], n[2] = Math.imul(n[2], 5) + 2530024501, l[3] = Math.imul(l[3], B[3]), l[3] = re(l[3], 18), l[3] = Math.imul(l[3], B[0]), n[3] = n[3] ^ l[3], n[3] = re(n[3], 13), n[3] = n[3] + n[0], n[3] = Math.imul(n[3], 5) + 850148119;
756
+ }
757
+ })(e, s), function(o, n) {
758
+ var c = o.byteLength / 16 | 0, h = o.byteLength % 16, u = new Uint32Array(4), l = new Uint8Array(o, 16 * c, h);
759
+ switch (h) {
760
+ case 15:
761
+ u[3] = u[3] ^ l[14] << 16;
762
+ case 14:
763
+ u[3] = u[3] ^ l[13] << 8;
764
+ case 13:
765
+ u[3] = u[3] ^ l[12] << 0, u[3] = Math.imul(u[3], B[3]), u[3] = re(u[3], 18), u[3] = Math.imul(u[3], B[0]), n[3] = n[3] ^ u[3];
766
+ case 12:
767
+ u[2] = u[2] ^ l[11] << 24;
768
+ case 11:
769
+ u[2] = u[2] ^ l[10] << 16;
770
+ case 10:
771
+ u[2] = u[2] ^ l[9] << 8;
772
+ case 9:
773
+ u[2] = u[2] ^ l[8] << 0, u[2] = Math.imul(u[2], B[2]), u[2] = re(u[2], 17), u[2] = Math.imul(u[2], B[3]), n[2] = n[2] ^ u[2];
774
+ case 8:
775
+ u[1] = u[1] ^ l[7] << 24;
776
+ case 7:
777
+ u[1] = u[1] ^ l[6] << 16;
778
+ case 6:
779
+ u[1] = u[1] ^ l[5] << 8;
780
+ case 5:
781
+ u[1] = u[1] ^ l[4] << 0, u[1] = Math.imul(u[1], B[1]), u[1] = re(u[1], 16), u[1] = Math.imul(u[1], B[2]), n[1] = n[1] ^ u[1];
782
+ case 4:
783
+ u[0] = u[0] ^ l[3] << 24;
784
+ case 3:
785
+ u[0] = u[0] ^ l[2] << 16;
786
+ case 2:
787
+ u[0] = u[0] ^ l[1] << 8;
788
+ case 1:
789
+ u[0] = u[0] ^ l[0] << 0, u[0] = Math.imul(u[0], B[0]), u[0] = re(u[0], 15), u[0] = Math.imul(u[0], B[1]), n[0] = n[0] ^ u[0];
790
+ }
791
+ }(e, s), function(o, n) {
792
+ n[0] = n[0] ^ o.byteLength, n[1] = n[1] ^ o.byteLength, n[2] = n[2] ^ o.byteLength, n[3] = n[3] ^ o.byteLength, n[0] = n[0] + n[1] | 0, n[0] = n[0] + n[2] | 0, n[0] = n[0] + n[3] | 0, n[1] = n[1] + n[0] | 0, n[2] = n[2] + n[0] | 0, n[3] = n[3] + n[0] | 0, n[0] = ft(n[0]), n[1] = ft(n[1]), n[2] = ft(n[2]), n[3] = ft(n[3]), n[0] = n[0] + n[1] | 0, n[0] = n[0] + n[2] | 0, n[0] = n[0] + n[3] | 0, n[1] = n[1] + n[0] | 0, n[2] = n[2] + n[0] | 0, n[3] = n[3] + n[0] | 0;
793
+ }(e, s);
794
+ var a = new Uint8Array(s.buffer);
795
+ return Array.from(a).map(function(o) {
796
+ return o.toString(16).padStart(2, "0");
797
+ }).join("");
798
+ }
799
+ function co(e, t) {
800
+ return new Promise(function(r) {
801
+ setTimeout(function() {
802
+ return r(t);
803
+ }, e);
804
+ });
805
+ }
806
+ function io(e, t, r) {
807
+ return Promise.all(e.map(function(s) {
808
+ return Promise.race([s, co(t, r)]);
809
+ }));
810
+ }
811
+ function lo() {
812
+ return fe(this, void 0, void 0, function() {
813
+ var e, t, r, s, a;
814
+ return de(this, function(o) {
815
+ switch (o.label) {
816
+ case 0:
817
+ return o.trys.push([0, 2, , 3]), e = oo(), t = Object.keys(e), [4, io(Object.values(e), (pe == null ? void 0 : pe.timeout) || 1e3, no)];
818
+ case 1:
819
+ return r = o.sent(), s = r.filter(function(n) {
820
+ return n !== void 0;
821
+ }), a = {}, s.forEach(function(n, c) {
822
+ a[t[c]] = n;
823
+ }), [2, Os(a, pe.exclude || [])];
824
+ case 2:
825
+ throw o.sent();
826
+ case 3:
827
+ return [2];
828
+ }
829
+ });
830
+ });
831
+ }
832
+ function Os(e, t) {
833
+ var r = {}, s = function(o) {
834
+ if (e.hasOwnProperty(o)) {
835
+ var n = e[o];
836
+ if (typeof n != "object" || Array.isArray(n)) t.includes(o) || (r[o] = n);
837
+ else {
838
+ var c = Os(n, t.map(function(h) {
839
+ return h.startsWith(o + ".") ? h.slice(o.length + 1) : h;
840
+ }));
841
+ Object.keys(c).length > 0 && (r[o] = c);
842
+ }
843
+ }
844
+ };
845
+ for (var a in e) s(a);
846
+ return r;
847
+ }
848
+ function uo(e) {
849
+ return fe(this, void 0, void 0, function() {
850
+ var t, r;
851
+ return de(this, function(s) {
852
+ switch (s.label) {
853
+ case 0:
854
+ return s.trys.push([0, 2, , 3]), [4, lo()];
855
+ case 1:
856
+ return t = s.sent(), r = sr(JSON.stringify(t)), [2, r.toString()];
857
+ case 2:
858
+ throw s.sent();
859
+ case 3:
860
+ return [2];
861
+ }
862
+ });
863
+ });
864
+ }
865
+ function ho(e) {
866
+ for (var t = 0, r = 0; r < e.length; ++r) t += Math.abs(e[r]);
867
+ return t;
868
+ }
869
+ function Fs(e, t, r) {
870
+ for (var s = [], a = 0; a < e[0].data.length; a++) {
871
+ for (var o = [], n = 0; n < e.length; n++) o.push(e[n].data[a]);
872
+ s.push(fo(o));
873
+ }
874
+ var c = new Uint8ClampedArray(s);
875
+ return new ImageData(c, t, r);
876
+ }
877
+ function fo(e) {
878
+ if (e.length === 0) return 0;
879
+ for (var t = {}, r = 0, s = e; r < s.length; r++)
880
+ t[o = s[r]] = (t[o] || 0) + 1;
881
+ var a = e[0];
882
+ for (var o in t) t[o] > t[a] && (a = parseInt(o, 10));
883
+ return a;
884
+ }
885
+ function Je() {
886
+ if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
887
+ for (var e = navigator.userAgent, t = { Edg: "Edge", OPR: "Opera" }, r = 0, s = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; r < s.length; r++) {
888
+ var a = s[r], o = e.match(a);
889
+ if (o && o.groups) return { name: t[o.groups.name] || o.groups.name, version: o.groups.version };
890
+ }
891
+ return { name: "unknown", version: "unknown" };
892
+ }
893
+ ne("audio", function() {
894
+ return fe(this, void 0, void 0, function() {
895
+ return de(this, function(e) {
896
+ return [2, new Promise(function(t, r) {
897
+ try {
898
+ var s = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), a = s.createBufferSource(), o = s.createOscillator();
899
+ o.frequency.value = 1e3;
900
+ var n, c = s.createDynamicsCompressor();
901
+ c.threshold.value = -50, c.knee.value = 40, c.ratio.value = 12, c.attack.value = 0, c.release.value = 0.2, o.connect(c), c.connect(s.destination), o.start(), s.oncomplete = function(h) {
902
+ n = h.renderedBuffer.getChannelData(0), t({ sampleHash: ho(n), oscillator: o.type, maxChannels: s.destination.maxChannelCount, channelCountMode: a.channelCountMode });
903
+ }, s.startRendering();
904
+ } catch (h) {
905
+ console.error("Error creating audio fingerprint:", h), r(h);
906
+ }
907
+ })];
908
+ });
909
+ });
910
+ });
911
+ var po = Je().name !== "SamsungBrowser" ? 1 : 3, as = 280, ns = 20;
912
+ Je().name != "Firefox" && ne("canvas", function() {
913
+ return document.createElement("canvas").getContext("2d"), new Promise(function(e) {
914
+ var t = Array.from({ length: po }, function() {
915
+ return function() {
916
+ var r = document.createElement("canvas"), s = r.getContext("2d");
917
+ if (!s) return new ImageData(1, 1);
918
+ r.width = as, r.height = ns;
919
+ var a = s.createLinearGradient(0, 0, r.width, r.height);
920
+ a.addColorStop(0, "red"), a.addColorStop(0.16666666666666666, "orange"), a.addColorStop(0.3333333333333333, "yellow"), a.addColorStop(0.5, "green"), a.addColorStop(0.6666666666666666, "blue"), a.addColorStop(0.8333333333333334, "indigo"), a.addColorStop(1, "violet"), s.fillStyle = a, s.fillRect(0, 0, r.width, r.height);
921
+ var o = "Random Text WMwmil10Oo";
922
+ s.font = "23.123px Arial", s.fillStyle = "black", s.fillText(o, -5, 15), s.fillStyle = "rgba(0, 0, 255, 0.5)", s.fillText(o, -3.3, 17.7), s.beginPath(), s.moveTo(0, 0), s.lineTo(2 * r.width / 7, r.height), s.strokeStyle = "white", s.lineWidth = 2, s.stroke();
923
+ var n = s.getImageData(0, 0, r.width, r.height);
924
+ return n;
925
+ }();
926
+ });
927
+ e({ commonImageDataHash: sr(Fs(t, as, ns).data.toString()).toString() });
928
+ });
929
+ });
930
+ var Wt, mo = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], go = ["monospace", "sans-serif", "serif"];
931
+ function os(e, t) {
932
+ if (!e) throw new Error("Canvas context not supported");
933
+ return e.font = "72px ".concat(t), e.measureText("WwMmLli0Oo").width;
934
+ }
935
+ function vo() {
936
+ var e, t = document.createElement("canvas"), r = (e = t.getContext("webgl")) !== null && e !== void 0 ? e : t.getContext("experimental-webgl");
937
+ if (r && "getParameter" in r) try {
938
+ var s = (r.getParameter(r.VENDOR) || "").toString(), a = (r.getParameter(r.RENDERER) || "").toString(), o = { vendor: s, renderer: a, version: (r.getParameter(r.VERSION) || "").toString(), shadingLanguageVersion: (r.getParameter(r.SHADING_LANGUAGE_VERSION) || "").toString() };
939
+ if (!a.length || !s.length) {
940
+ var n = r.getExtension("WEBGL_debug_renderer_info");
941
+ if (n) {
942
+ var c = (r.getParameter(n.UNMASKED_VENDOR_WEBGL) || "").toString(), h = (r.getParameter(n.UNMASKED_RENDERER_WEBGL) || "").toString();
943
+ c && (o.vendorUnmasked = c), h && (o.rendererUnmasked = h);
944
+ }
945
+ }
946
+ return o;
947
+ } catch {
948
+ }
949
+ return "undefined";
950
+ }
951
+ function bo() {
952
+ var e = new Float32Array(1), t = new Uint8Array(e.buffer);
953
+ return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3];
954
+ }
955
+ function yo(e, t) {
956
+ var r = {};
957
+ return t.forEach(function(s) {
958
+ var a = function(o) {
959
+ if (o.length === 0) return null;
960
+ var n = {};
961
+ o.forEach(function(u) {
962
+ var l = String(u);
963
+ n[l] = (n[l] || 0) + 1;
964
+ });
965
+ var c = o[0], h = 1;
966
+ return Object.keys(n).forEach(function(u) {
967
+ n[u] > h && (c = u, h = n[u]);
968
+ }), c;
969
+ }(e.map(function(o) {
970
+ return s in o ? o[s] : void 0;
971
+ }).filter(function(o) {
972
+ return o !== void 0;
973
+ }));
974
+ a && (r[s] = a);
975
+ }), r;
976
+ }
977
+ function Co() {
978
+ var e = [], t = { "prefers-contrast": ["high", "more", "low", "less", "forced", "no-preference"], "any-hover": ["hover", "none"], "any-pointer": ["none", "coarse", "fine"], pointer: ["none", "coarse", "fine"], hover: ["hover", "none"], update: ["fast", "slow"], "inverted-colors": ["inverted", "none"], "prefers-reduced-motion": ["reduce", "no-preference"], "prefers-reduced-transparency": ["reduce", "no-preference"], scripting: ["none", "initial-only", "enabled"], "forced-colors": ["active", "none"] };
979
+ return Object.keys(t).forEach(function(r) {
980
+ t[r].forEach(function(s) {
981
+ matchMedia("(".concat(r, ": ").concat(s, ")")).matches && e.push("".concat(r, ": ").concat(s));
982
+ });
983
+ }), e;
984
+ }
985
+ function So() {
986
+ if (window.location.protocol === "https:" && typeof window.ApplePaySession == "function") try {
987
+ for (var e = window.ApplePaySession.supportsVersion, t = 15; t > 0; t--) if (e(t)) return t;
988
+ } catch {
989
+ return 0;
990
+ }
991
+ return 0;
992
+ }
993
+ Je().name != "Firefox" && ne("fonts", function() {
994
+ var e = this;
995
+ return new Promise(function(t, r) {
996
+ try {
997
+ (function(s) {
998
+ var a;
999
+ fe(this, void 0, void 0, function() {
1000
+ var o, n, c;
1001
+ return de(this, function(h) {
1002
+ switch (h.label) {
1003
+ case 0:
1004
+ return document.body ? [3, 2] : [4, (u = 50, new Promise(function(p) {
1005
+ return setTimeout(p, u, l);
1006
+ }))];
1007
+ case 1:
1008
+ return h.sent(), [3, 0];
1009
+ case 2:
1010
+ if ((o = document.createElement("iframe")).setAttribute("frameBorder", "0"), (n = o.style).setProperty("position", "fixed"), n.setProperty("display", "block", "important"), n.setProperty("visibility", "visible"), n.setProperty("border", "0"), n.setProperty("opacity", "0"), o.src = "about:blank", document.body.appendChild(o), !(c = o.contentDocument || ((a = o.contentWindow) === null || a === void 0 ? void 0 : a.document))) throw new Error("Iframe document is not accessible");
1011
+ return s({ iframe: c }), setTimeout(function() {
1012
+ document.body.removeChild(o);
1013
+ }, 0), [2];
1014
+ }
1015
+ var u, l;
1016
+ });
1017
+ });
1018
+ })(function(s) {
1019
+ var a = s.iframe;
1020
+ return fe(e, void 0, void 0, function() {
1021
+ var o, n, c, h;
1022
+ return de(this, function(u) {
1023
+ return o = a.createElement("canvas"), n = o.getContext("2d"), c = go.map(function(l) {
1024
+ return os(n, l);
1025
+ }), h = {}, mo.forEach(function(l) {
1026
+ var p = os(n, l);
1027
+ c.includes(p) || (h[l] = p);
1028
+ }), t(h), [2];
1029
+ });
1030
+ });
1031
+ });
1032
+ } catch {
1033
+ r({ error: "unsupported" });
1034
+ }
1035
+ });
1036
+ }), ne("hardware", function() {
1037
+ return new Promise(function(e, t) {
1038
+ var r = navigator.deviceMemory !== void 0 ? navigator.deviceMemory : 0, s = window.performance && window.performance.memory ? window.performance.memory : 0;
1039
+ e({ videocard: vo(), architecture: bo(), deviceMemory: r.toString() || "undefined", jsHeapSizeLimit: s.jsHeapSizeLimit || 0 });
1040
+ });
1041
+ }), ne("locales", function() {
1042
+ return new Promise(function(e) {
1043
+ e({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
1044
+ });
1045
+ }), ne("permissions", function() {
1046
+ return fe(this, void 0, void 0, function() {
1047
+ var e;
1048
+ return de(this, function(t) {
1049
+ return Wt = (pe == null ? void 0 : pe.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], e = Array.from({ length: (pe == null ? void 0 : pe.retries) || 3 }, function() {
1050
+ return function() {
1051
+ return fe(this, void 0, void 0, function() {
1052
+ var r, s, a, o, n;
1053
+ return de(this, function(c) {
1054
+ switch (c.label) {
1055
+ case 0:
1056
+ r = {}, s = 0, a = Wt, c.label = 1;
1057
+ case 1:
1058
+ if (!(s < a.length)) return [3, 6];
1059
+ o = a[s], c.label = 2;
1060
+ case 2:
1061
+ return c.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: o })];
1062
+ case 3:
1063
+ return n = c.sent(), r[o] = n.state.toString(), [3, 5];
1064
+ case 4:
1065
+ return c.sent(), [3, 5];
1066
+ case 5:
1067
+ return s++, [3, 1];
1068
+ case 6:
1069
+ return [2, r];
1070
+ }
1071
+ });
1072
+ });
1073
+ }();
1074
+ }), [2, Promise.all(e).then(function(r) {
1075
+ return yo(r, Wt);
1076
+ })];
1077
+ });
1078
+ });
1079
+ }), ne("plugins", function() {
1080
+ var e = [];
1081
+ if (navigator.plugins) for (var t = 0; t < navigator.plugins.length; t++) {
1082
+ var r = navigator.plugins[t];
1083
+ e.push([r.name, r.filename, r.description].join("|"));
1084
+ }
1085
+ return new Promise(function(s) {
1086
+ s({ plugins: e });
1087
+ });
1088
+ }), ne("screen", function() {
1089
+ return new Promise(function(e) {
1090
+ e({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches: Co() });
1091
+ });
1092
+ }), ne("system", function() {
1093
+ return new Promise(function(e) {
1094
+ var t = Je();
1095
+ e({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: t.name, version: t.version }, applePayVersion: So() });
1096
+ });
1097
+ });
1098
+ var K, ko = Je().name !== "SamsungBrowser" ? 1 : 3, k = null;
1099
+ ne("webgl", function() {
1100
+ return fe(this, void 0, void 0, function() {
1101
+ var e;
1102
+ return de(this, function(t) {
1103
+ typeof document < "u" && ((K = document.createElement("canvas")).width = 200, K.height = 100, k = K.getContext("webgl"));
1104
+ try {
1105
+ if (!k) throw new Error("WebGL not supported");
1106
+ return e = Array.from({ length: ko }, function() {
1107
+ return function() {
1108
+ try {
1109
+ if (!k) throw new Error("WebGL not supported");
1110
+ var r = `
1111
+ attribute vec2 position;
1112
+ void main() {
1113
+ gl_Position = vec4(position, 0.0, 1.0);
1114
+ }
1115
+ `, s = `
1116
+ precision mediump float;
1117
+ void main() {
1118
+ gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
1119
+ }
1120
+ `, a = k.createShader(k.VERTEX_SHADER), o = k.createShader(k.FRAGMENT_SHADER);
1121
+ if (!a || !o) throw new Error("Failed to create shaders");
1122
+ if (k.shaderSource(a, r), k.shaderSource(o, s), k.compileShader(a), !k.getShaderParameter(a, k.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + k.getShaderInfoLog(a));
1123
+ if (k.compileShader(o), !k.getShaderParameter(o, k.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + k.getShaderInfoLog(o));
1124
+ var n = k.createProgram();
1125
+ if (!n) throw new Error("Failed to create shader program");
1126
+ if (k.attachShader(n, a), k.attachShader(n, o), k.linkProgram(n), !k.getProgramParameter(n, k.LINK_STATUS)) throw new Error("Shader program linking failed: " + k.getProgramInfoLog(n));
1127
+ k.useProgram(n);
1128
+ for (var c = 137, h = new Float32Array(4 * c), u = 2 * Math.PI / c, l = 0; l < c; l++) {
1129
+ var p = l * u;
1130
+ h[4 * l] = 0, h[4 * l + 1] = 0, h[4 * l + 2] = Math.cos(p) * (K.width / 2), h[4 * l + 3] = Math.sin(p) * (K.height / 2);
1131
+ }
1132
+ var m = k.createBuffer();
1133
+ k.bindBuffer(k.ARRAY_BUFFER, m), k.bufferData(k.ARRAY_BUFFER, h, k.STATIC_DRAW);
1134
+ var b = k.getAttribLocation(n, "position");
1135
+ k.enableVertexAttribArray(b), k.vertexAttribPointer(b, 2, k.FLOAT, !1, 0, 0), k.viewport(0, 0, K.width, K.height), k.clearColor(0, 0, 0, 1), k.clear(k.COLOR_BUFFER_BIT), k.drawArrays(k.LINES, 0, 2 * c);
1136
+ var v = new Uint8ClampedArray(K.width * K.height * 4);
1137
+ return k.readPixels(0, 0, K.width, K.height, k.RGBA, k.UNSIGNED_BYTE, v), new ImageData(v, K.width, K.height);
1138
+ } catch {
1139
+ return new ImageData(1, 1);
1140
+ } finally {
1141
+ k && (k.bindBuffer(k.ARRAY_BUFFER, null), k.useProgram(null), k.viewport(0, 0, k.drawingBufferWidth, k.drawingBufferHeight), k.clearColor(0, 0, 0, 0));
1142
+ }
1143
+ }();
1144
+ }), [2, { commonImageHash: sr(Fs(e, K.width, K.height).data.toString()).toString() }];
1145
+ } catch {
1146
+ return [2, { webgl: "unsupported" }];
1147
+ }
1148
+ return [2];
1149
+ });
1150
+ });
1151
+ });
1152
+ var we = function(e, t, r, s) {
1153
+ for (var a = (r - t) / s, o = 0, n = 0; n < s; n++)
1154
+ o += e(t + (n + 0.5) * a);
1155
+ return o * a;
1156
+ };
1157
+ ne("math", function() {
1158
+ return fe(void 0, void 0, void 0, function() {
1159
+ return de(this, function(e) {
1160
+ return [2, { acos: Math.acos(0.5), asin: we(Math.asin, -1, 1, 97), atan: we(Math.atan, -1, 1, 97), cos: we(Math.cos, 0, Math.PI, 97), cosh: Math.cosh(9 / 7), e: Math.E, largeCos: Math.cos(1e20), largeSin: Math.sin(1e20), largeTan: Math.tan(1e20), log: Math.log(1e3), pi: Math.PI, sin: we(Math.sin, -Math.PI, Math.PI, 97), sinh: we(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: we(Math.tan, 0, 2 * Math.PI, 97), tanh: we(Math.tanh, -9 / 7, 7 / 9, 97) }];
1161
+ });
1162
+ });
1163
+ });
1164
+ const wo = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1165
+ let bt = (e = 21) => {
1166
+ let t = "", r = crypto.getRandomValues(new Uint8Array(e |= 0));
1167
+ for (; e--; )
1168
+ t += wo[r[e] & 63];
1169
+ return t;
1170
+ };
1171
+ class ar {
1172
+ constructor(t) {
1173
+ A(this, "config"), this.config = t;
1174
+ }
1175
+ async getAdsForSearchParams(t) {
1176
+ return [];
1177
+ }
1178
+ async onQuerySubmitted(t) {
1179
+ }
1180
+ async onQueryFetched(t, r) {
1181
+ }
1182
+ async onInputCleared() {
1183
+ }
1184
+ async onAdContainerRendered(t) {
1185
+ }
1186
+ async onAdContainerViewed(t) {
1187
+ }
1188
+ }
1189
+ class xo extends ar {
1190
+ /**
1191
+ * Gets ads from the adMarketplace API based on the search term.
1192
+ */
1193
+ async getAdsForSearchParams(t) {
1194
+ if (!this.config.admSub)
1195
+ return console.error("No admSub specified in config."), [];
1196
+ const r = `https://demofeed.is.ampfeed.com/is?${new URLSearchParams({
1197
+ partner: "demofeed",
1198
+ sub1: this.config.admSub,
1199
+ qt: t.searchTerm,
1200
+ v: "2.0",
1201
+ rfr: "searchcraft.io",
1202
+ "results-ta": `${this.config.admTextAdQuantity || 0}`,
1203
+ "results-pa": `${this.config.admProductAdQuantity || 0}`
1204
+ }).toString()}`, s = await (await fetch(r, { method: "GET" })).json(), a = s.product_ads.map(
1205
+ (n) => ({
1206
+ id: bt(),
1207
+ adSource: "adMarketplace",
1208
+ admAdType: "adm-product-ad",
1209
+ admAd: n
1210
+ })
1211
+ ), o = s.text_ads.map((n) => ({
1212
+ id: bt(),
1213
+ adSource: "adMarketplace",
1214
+ admAdType: "adm-text-ad",
1215
+ admAd: n
1216
+ }));
1217
+ return a.concat(o);
1218
+ }
1219
+ async onAdContainerViewed(t) {
1220
+ var r;
1221
+ const s = t.adClientResponseItem;
1222
+ (r = s.admAd) != null && r.impression_url && fetch(s.admAd.impression_url);
1223
+ }
1224
+ }
1225
+ class Eo extends ar {
1226
+ async getAdsForSearchParams(t) {
1227
+ return [];
1228
+ }
1229
+ }
1230
+ const Ro = 1e3;
1231
+ class To extends ar {
1232
+ constructor(t) {
1233
+ super(t), A(this, "adCallTimeout"), this.addScriptTagToDocument();
1234
+ }
1235
+ async onQuerySubmitted(t) {
1236
+ this.addScriptTagToDocument();
1237
+ }
1238
+ async onQueryFetched(t, r) {
1239
+ var s;
1240
+ if ((((s = r.data.hits) == null ? void 0 : s.length) || 0) === 0) {
1241
+ this.removeScriptTagFromDocument();
1242
+ return;
1243
+ }
1244
+ this.performAdCall(Ro);
1245
+ }
1246
+ async onInputCleared() {
1247
+ this.removeScriptTagFromDocument();
1248
+ }
1249
+ performAdCall(t) {
1250
+ this.adCallTimeout && clearTimeout(this.adCallTimeout), this.adCallTimeout = setTimeout(() => {
1251
+ this.addScriptTagToDocument();
1252
+ try {
1253
+ PostRelease == null || PostRelease.Start({ ptd: [this.config.nativoPlacementId] });
1254
+ } catch (r) {
1255
+ console.error(r);
1256
+ }
1257
+ }, t);
1258
+ }
1259
+ async getAdsForSearchParams(t) {
1260
+ return [];
1261
+ }
1262
+ addScriptTagToDocument() {
1263
+ if (!document.head.querySelector("#nativo-tag")) {
1264
+ const t = document.createElement("script");
1265
+ t.type = "text/javascript", t.src = "https://s.ntv.io/serve/load.js", t.id = "nativo-tag", t.setAttribute("data-ntv-set-no-auto-start", "true"), document.head.appendChild(t);
1266
+ }
1267
+ }
1268
+ removeScriptTagFromDocument() {
1269
+ const t = document.head.querySelector("#nativo-tag");
1270
+ t && document.head.removeChild(t);
1271
+ }
1272
+ }
1273
+ const Po = 600;
1274
+ class $o {
1275
+ constructor(t, r, s) {
1276
+ A(this, "measureRequestTimeout"), A(this, "measureRequestsBatched", []), A(this, "config"), A(this, "sdkInfo"), A(this, "userId"), A(this, "sessionId"), A(this, "sendMeasureEvent", async (a, o = {}, n = {}) => {
1277
+ const c = {
1278
+ event_name: a,
1279
+ properties: {
1280
+ searchcraft_index_names: this.config.index,
1281
+ session_id: this.sessionId,
1282
+ ...o
1283
+ },
1284
+ user: {
1285
+ ...this.measureRequestUser,
1286
+ ...n
1287
+ }
1288
+ };
1289
+ if (a === "document_clicked") {
1290
+ const h = JSON.stringify(c), u = `${this.baseMeasureUrl}/event`;
1291
+ try {
1292
+ const l = await fetch(u, {
1293
+ method: "POST",
1294
+ headers: {
1295
+ "Content-Type": "application/json",
1296
+ Authorization: this.config.readKey,
1297
+ "X-Sc-User-Id": this.userId
1298
+ },
1299
+ body: h,
1300
+ keepalive: !0
1301
+ });
1302
+ if (!l.ok)
1303
+ throw new Error(
1304
+ `Failed to send request: ${l.status} ${l.statusText}`
1305
+ );
1306
+ } catch (l) {
1307
+ throw console.error("Error sending MeasureRequest:", l), l;
1308
+ }
1309
+ } else
1310
+ this.measureRequestsBatched.push(c), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
1311
+ const h = JSON.stringify({ items: this.measureRequestsBatched }), u = `${this.baseMeasureUrl}/batch`;
1312
+ try {
1313
+ const l = await fetch(u, {
1314
+ method: "POST",
1315
+ headers: {
1316
+ "Content-Type": "application/json",
1317
+ Authorization: this.config.readKey,
1318
+ "X-Sc-User-Id": this.userId
1319
+ },
1320
+ body: h,
1321
+ keepalive: !0
1322
+ });
1323
+ if (this.measureRequestsBatched = [], !l.ok)
1324
+ throw new Error(
1325
+ `Failed to send request: ${l.status} ${l.statusText}`
1326
+ );
1327
+ return;
1328
+ } catch (l) {
1329
+ throw this.measureRequestsBatched = [], console.error("Error sending MeasureRequest:", l), l;
1330
+ }
1331
+ }, Po);
1332
+ }), this.config = t, this.sdkInfo = r, this.userId = s, this.sessionId = bt(), this.sendMeasureEvent("sdk_initialized");
1333
+ }
1334
+ /**
1335
+ * Getter for the base url used by the /measure endpoints.
1336
+ */
1337
+ get baseMeasureUrl() {
1338
+ return `${this.config.endpointURL}/measure`;
1339
+ }
1340
+ /**
1341
+ * Getter for the measure request user. Uses config values + navigator values.
1342
+ */
1343
+ get measureRequestUser() {
1344
+ return {
1345
+ user_id: this.userId,
1346
+ locale: navigator.language || "en-US",
1347
+ os: navigator.userAgent.includes("Windows") ? "Windows" : navigator.userAgent.includes("Mac") ? "Mac" : navigator.userAgent.includes("Linux") ? "Linux" : "Unknown",
1348
+ platform: navigator.platform || "Unknown",
1349
+ sdk_name: this.sdkInfo.sdkName,
1350
+ sdk_version: this.sdkInfo.sdkVersion,
1351
+ user_agent: navigator.userAgent || "Unknown"
1352
+ };
1353
+ }
1354
+ }
1355
+ function _o(e) {
1356
+ const t = [];
1357
+ let r = "should";
1358
+ return e.facetPathsForIndexFields && Object.keys(e.facetPathsForIndexFields).forEach((s) => {
1359
+ var a;
1360
+ const o = (a = e.facetPathsForIndexFields) == null ? void 0 : a[s];
1361
+ o && (r = "must", t.push({
1362
+ occur: r,
1363
+ exact: {
1364
+ ctx: o.value
1365
+ }
1366
+ }));
1367
+ }), e.rangeValueForIndexFields && Object.keys(e.rangeValueForIndexFields).forEach((s) => {
1368
+ var a;
1369
+ const o = (a = e.rangeValueForIndexFields) == null ? void 0 : a[s];
1370
+ o && (r = "must", t.push({
1371
+ occur: r,
1372
+ exact: {
1373
+ ctx: o.value
1374
+ }
1375
+ }));
1376
+ }), e.sort === "desc" ? e.order_by = "date_published" : e.order_by = "", t.push({
1377
+ occur: r,
1378
+ // Valid, as 'occur' is a required property in QueryItem
1379
+ [e.mode]: { ctx: e.searchTerm }
1380
+ // Ensure dynamic mode is inside queryType
1381
+ }), t;
1382
+ }
1383
+ const Ao = (e) => e.endsWith("/") ? e.slice(0, -1) : e, Io = (e) => {
1384
+ let t = "";
1385
+ if (t = e.trim(), t = t.replace(/[‘’“”]/g, (r) => ({
1386
+ "‘": "'",
1387
+ "’": "'",
1388
+ "“": '"',
1389
+ "”": '"'
1390
+ })[r] || r), (t.match(/"/g) || []).length % 2 !== 0)
1391
+ throw new Error(
1392
+ "The search term contains an uneven number of quote characters."
1393
+ );
1394
+ return t;
1395
+ }, Mo = 500;
1396
+ class Lo {
1397
+ constructor(t, r, s) {
1398
+ A(this, "config"), A(this, "userId"), A(this, "parent"), A(this, "searchCompletedEventTimeout"), A(this, "getSearchResponse", async (a) => {
1399
+ var o, n, c, h, u;
1400
+ const l = Io(a.searchTerm);
1401
+ (o = this.parent.measureClient) == null || o.sendMeasureEvent("search_requested", {
1402
+ search_term: l
1403
+ }), this.parent.emitEvent("query_submitted", {
1404
+ name: "query_submitted",
1405
+ data: {
1406
+ searchTerm: l
1407
+ }
1408
+ }), (n = this.parent.adClient) == null || n.onQuerySubmitted(a);
1409
+ try {
1410
+ const p = {
1411
+ query: _o(a),
1412
+ offset: a.offset || 0,
1413
+ // Default to 0 (first page) if not provided
1414
+ limit: a.limit || this.config.searchResultsPerPage || 20
1415
+ // Default to 20 if not provided
1416
+ };
1417
+ a.order_by && (p.order_by = a.order_by, p.sort = a.sort === "desc" || a.sort === "asc" ? a.sort : "asc");
1418
+ const m = {
1419
+ method: "POST",
1420
+ headers: {
1421
+ Authorization: this.config.readKey,
1422
+ "Content-Type": "application/json",
1423
+ "X-Sc-User-Id": this.userId
1424
+ },
1425
+ body: JSON.stringify(p)
1426
+ }, b = await fetch(this.baseSearchUrl, m);
1427
+ if (!b.ok)
1428
+ throw new Error(
1429
+ `Error: ${b.statusText} (Status: ${b.status})`
1430
+ );
1431
+ const v = await b.json();
1432
+ return (c = this.parent.measureClient) == null || c.sendMeasureEvent("search_response_received", {
1433
+ search_term: l,
1434
+ number_of_documents: v.data.count
1435
+ }), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
1436
+ var T;
1437
+ (T = this.parent.measureClient) == null || T.sendMeasureEvent("search_completed", {
1438
+ search_term: l,
1439
+ number_of_documents: v.data.count
1440
+ });
1441
+ }, Mo), this.parent.emitEvent("query_fetched", {
1442
+ name: "query_fetched",
1443
+ data: {
1444
+ searchTerm: l
1445
+ }
1446
+ }), (((h = v.data.hits) == null ? void 0 : h.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
1447
+ name: "no_results_returned"
1448
+ }), (u = this.parent.adClient) == null || u.onQueryFetched(a, v), v;
1449
+ } catch (p) {
1450
+ throw console.error("Error parsing response:", p), p;
1451
+ }
1452
+ }), this.parent = t, this.config = r, this.userId = s;
1453
+ }
1454
+ /**
1455
+ * Getter for the base url used by the /search endpoint.
1456
+ */
1457
+ get baseSearchUrl() {
1458
+ return `${this.config.endpointURL}/index/${this.config.index.join(",")}/search`;
1459
+ }
1460
+ }
1461
+ class Oo {
1462
+ constructor(t, r) {
1463
+ if (A(this, "config"), A(this, "measureClient"), A(this, "searchClient"), A(this, "adClient"), A(this, "userId"), A(this, "requestTimeout"), A(this, "subscriptionEvents", {}), A(this, "getItems", (s, a, o) => {
1464
+ const n = async () => {
1465
+ (async () => {
1466
+ var c, h;
1467
+ const u = await ((c = this == null ? void 0 : this.searchClient) == null ? void 0 : c.getSearchResponse(s));
1468
+ if (!u)
1469
+ throw new Error("Search client was not initialized.");
1470
+ const l = (h = u.data.hits || []) == null ? void 0 : h.map((p) => p.doc).filter((p) => !!p).map((p) => ({
1471
+ type: "SearchDocument",
1472
+ id: bt(),
1473
+ document: p
1474
+ }));
1475
+ a(u, l);
1476
+ })(), (async () => {
1477
+ if (this.adClient) {
1478
+ const c = await this.adClient.getAdsForSearchParams(s);
1479
+ o(c);
1480
+ }
1481
+ })();
1482
+ };
1483
+ clearTimeout(this.requestTimeout), this.config.searchDebounceDelay ? this.requestTimeout = setTimeout(
1484
+ n,
1485
+ this.config.searchDebounceDelay
1486
+ ) : n();
1487
+ }), !t.endpointURL || !t.index || !t.readKey)
1488
+ throw new Error(
1489
+ "Endpoint URL, Index value(s), and Read Key must be provided"
1490
+ );
1491
+ this.config = {
1492
+ ...t,
1493
+ // Strips off the trailing '/' from an endpointURL if one is accidentally added
1494
+ endpointURL: Ao(t.endpointURL)
1495
+ }, this.userId = "", typeof window < "u" && typeof customElements < "u" && r.sdkName === "@searchcraft/javascript-sdk" && globalThis.__scDefineCustomElements__ && globalThis.__scDefineCustomElements__(), typeof window < "u" && (this.initClients(this.config, r), this.initInputForms(), this.startObservingMutations());
1496
+ }
1497
+ initInputForms() {
1498
+ const t = document.querySelectorAll(
1499
+ "searchcraft-input-form"
1500
+ );
1501
+ setTimeout(() => {
1502
+ t.forEach((r) => {
1503
+ r.core = this;
1504
+ });
1505
+ }, 40);
1506
+ }
1507
+ /**
1508
+ * When changes happen in the DOM, we want to link any input forms found to the instance of the core.
1509
+ */
1510
+ startObservingMutations() {
1511
+ new MutationObserver((t, r) => {
1512
+ let s = !1;
1513
+ for (const a of t)
1514
+ a.type === "childList" && a.addedNodes.forEach((o) => {
1515
+ o.nodeType === 1 && (o.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (s = !0);
1516
+ });
1517
+ s && this.initInputForms();
1518
+ }).observe(document.body, { childList: !0, subtree: !0 });
1519
+ }
1520
+ initClients(t, r) {
1521
+ setTimeout(async () => {
1522
+ let s = this.config.userId;
1523
+ switch (s || (s = await uo()), this.measureClient = new $o(t, r, s), this.searchClient = new Lo(this, t, s), t.adSource) {
1524
+ case "adMarketplace":
1525
+ this.adClient = new xo(t);
1526
+ break;
1527
+ case "Nativo":
1528
+ this.adClient = new To(t);
1529
+ break;
1530
+ case "Custom":
1531
+ this.adClient = new Eo(t);
1532
+ break;
1533
+ }
1534
+ }, 300);
1535
+ }
1536
+ emitEvent(t, r) {
1537
+ var s;
1538
+ (s = this.subscriptionEvents[t]) == null || s.forEach((a) => {
1539
+ a(r);
1540
+ });
1541
+ }
1542
+ subscribe(t, r) {
1543
+ return this.subscriptionEvents[t] || (this.subscriptionEvents[t] = []), this.subscriptionEvents[t].push(
1544
+ r
1545
+ ), () => {
1546
+ this.subscriptionEvents[t] = this.subscriptionEvents[t].filter((s) => s !== r);
1547
+ };
1548
+ }
1549
+ /**
1550
+ * Called when a `<searchcraft-ad>` component is rendered
1551
+ */
1552
+ handleAdContainerRendered(t) {
1553
+ var r;
1554
+ (r = this.adClient) == null || r.onAdContainerRendered(t), this.emitEvent("ad_container_rendered", {
1555
+ name: "ad_container_rendered",
1556
+ data: {
1557
+ adContainerId: t.adContainerId,
1558
+ adSource: t.adSource,
1559
+ searchTerm: t.searchTerm
1560
+ }
1561
+ });
1562
+ }
1563
+ /**
1564
+ * Called when a `<searchcraft-ad>` is viewed
1565
+ */
1566
+ handleAdContainerViewed(t) {
1567
+ var r;
1568
+ (r = this.adClient) == null || r.onAdContainerViewed(t), this.emitEvent("ad_container_viewed", {
1569
+ name: "ad_container_viewed",
1570
+ data: {
1571
+ adContainerId: t.adContainerId,
1572
+ adSource: t.adSource,
1573
+ searchTerm: t.searchTerm
1574
+ }
1575
+ });
1576
+ }
1577
+ /**
1578
+ * Perform various actions when the input is cleared
1579
+ */
1580
+ handleInputCleared() {
1581
+ var t;
1582
+ this.emitEvent("input_cleared", {
1583
+ name: "input_cleared"
1584
+ }), (t = this.adClient) == null || t.onInputCleared();
1585
+ }
1586
+ }
1587
+ var Ds = {}, nr = {};
1588
+ const cs = (e) => {
1589
+ let t;
1590
+ const r = /* @__PURE__ */ new Set(), s = (u, l) => {
1591
+ const p = typeof u == "function" ? u(t) : u;
1592
+ if (!Object.is(p, t)) {
1593
+ const m = t;
1594
+ t = l ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), r.forEach((b) => b(t, m));
1595
+ }
1596
+ }, a = () => t, c = { setState: s, getState: a, getInitialState: () => h, subscribe: (u) => (r.add(u), () => r.delete(u)) }, h = t = e(s, a, c);
1597
+ return c;
1598
+ }, Fo = (e) => e ? cs(e) : cs;
1599
+ nr.createStore = Fo;
1600
+ var or = {}, Ns = { exports: {} }, w = {};
1601
+ /**
1602
+ * @license React
1603
+ * react.production.js
1604
+ *
1605
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1606
+ *
1607
+ * This source code is licensed under the MIT license found in the
1608
+ * LICENSE file in the root directory of this source tree.
1609
+ */
1610
+ var cr = Symbol.for("react.transitional.element"), Do = Symbol.for("react.portal"), No = Symbol.for("react.fragment"), Ho = Symbol.for("react.strict_mode"), Uo = Symbol.for("react.profiler"), zo = Symbol.for("react.consumer"), jo = Symbol.for("react.context"), Vo = Symbol.for("react.forward_ref"), Bo = Symbol.for("react.suspense"), Wo = Symbol.for("react.memo"), Hs = Symbol.for("react.lazy"), is = Symbol.iterator;
1611
+ function Go(e) {
1612
+ return e === null || typeof e != "object" ? null : (e = is && e[is] || e["@@iterator"], typeof e == "function" ? e : null);
1613
+ }
1614
+ var Us = {
1615
+ isMounted: function() {
1616
+ return !1;
1617
+ },
1618
+ enqueueForceUpdate: function() {
1619
+ },
1620
+ enqueueReplaceState: function() {
1621
+ },
1622
+ enqueueSetState: function() {
1623
+ }
1624
+ }, zs = Object.assign, js = {};
1625
+ function Fe(e, t, r) {
1626
+ this.props = e, this.context = t, this.refs = js, this.updater = r || Us;
1627
+ }
1628
+ Fe.prototype.isReactComponent = {};
1629
+ Fe.prototype.setState = function(e, t) {
1630
+ if (typeof e != "object" && typeof e != "function" && e != null)
1631
+ throw Error(
1632
+ "takes an object of state variables to update or a function which returns an object of state variables."
1633
+ );
1634
+ this.updater.enqueueSetState(this, e, t, "setState");
1635
+ };
1636
+ Fe.prototype.forceUpdate = function(e) {
1637
+ this.updater.enqueueForceUpdate(this, e, "forceUpdate");
1638
+ };
1639
+ function Vs() {
1640
+ }
1641
+ Vs.prototype = Fe.prototype;
1642
+ function ir(e, t, r) {
1643
+ this.props = e, this.context = t, this.refs = js, this.updater = r || Us;
1644
+ }
1645
+ var lr = ir.prototype = new Vs();
1646
+ lr.constructor = ir;
1647
+ zs(lr, Fe.prototype);
1648
+ lr.isPureReactComponent = !0;
1649
+ var ls = Array.isArray, I = { H: null, A: null, T: null, S: null }, Bs = Object.prototype.hasOwnProperty;
1650
+ function ur(e, t, r, s, a, o) {
1651
+ return r = o.ref, {
1652
+ $$typeof: cr,
1653
+ type: e,
1654
+ key: t,
1655
+ ref: r !== void 0 ? r : null,
1656
+ props: o
1657
+ };
1658
+ }
1659
+ function qo(e, t) {
1660
+ return ur(
1661
+ e.type,
1662
+ t,
1663
+ void 0,
1664
+ void 0,
1665
+ void 0,
1666
+ e.props
1667
+ );
1668
+ }
1669
+ function hr(e) {
1670
+ return typeof e == "object" && e !== null && e.$$typeof === cr;
1671
+ }
1672
+ function Yo(e) {
1673
+ var t = { "=": "=0", ":": "=2" };
1674
+ return "$" + e.replace(/[=:]/g, function(r) {
1675
+ return t[r];
1676
+ });
1677
+ }
1678
+ var us = /\/+/g;
1679
+ function Gt(e, t) {
1680
+ return typeof e == "object" && e !== null && e.key != null ? Yo("" + e.key) : t.toString(36);
1681
+ }
1682
+ function hs() {
1683
+ }
1684
+ function Zo(e) {
1685
+ switch (e.status) {
1686
+ case "fulfilled":
1687
+ return e.value;
1688
+ case "rejected":
1689
+ throw e.reason;
1690
+ default:
1691
+ switch (typeof e.status == "string" ? e.then(hs, hs) : (e.status = "pending", e.then(
1692
+ function(t) {
1693
+ e.status === "pending" && (e.status = "fulfilled", e.value = t);
1694
+ },
1695
+ function(t) {
1696
+ e.status === "pending" && (e.status = "rejected", e.reason = t);
1697
+ }
1698
+ )), e.status) {
1699
+ case "fulfilled":
1700
+ return e.value;
1701
+ case "rejected":
1702
+ throw e.reason;
1703
+ }
1704
+ }
1705
+ throw e;
1706
+ }
1707
+ function Me(e, t, r, s, a) {
1708
+ var o = typeof e;
1709
+ (o === "undefined" || o === "boolean") && (e = null);
1710
+ var n = !1;
1711
+ if (e === null) n = !0;
1712
+ else
1713
+ switch (o) {
1714
+ case "bigint":
1715
+ case "string":
1716
+ case "number":
1717
+ n = !0;
1718
+ break;
1719
+ case "object":
1720
+ switch (e.$$typeof) {
1721
+ case cr:
1722
+ case Do:
1723
+ n = !0;
1724
+ break;
1725
+ case Hs:
1726
+ return n = e._init, Me(
1727
+ n(e._payload),
1728
+ t,
1729
+ r,
1730
+ s,
1731
+ a
1732
+ );
1733
+ }
1734
+ }
1735
+ if (n)
1736
+ return a = a(e), n = s === "" ? "." + Gt(e, 0) : s, ls(a) ? (r = "", n != null && (r = n.replace(us, "$&/") + "/"), Me(a, t, r, "", function(u) {
1737
+ return u;
1738
+ })) : a != null && (hr(a) && (a = qo(
1739
+ a,
1740
+ r + (a.key == null || e && e.key === a.key ? "" : ("" + a.key).replace(
1741
+ us,
1742
+ "$&/"
1743
+ ) + "/") + n
1744
+ )), t.push(a)), 1;
1745
+ n = 0;
1746
+ var c = s === "" ? "." : s + ":";
1747
+ if (ls(e))
1748
+ for (var h = 0; h < e.length; h++)
1749
+ s = e[h], o = c + Gt(s, h), n += Me(
1750
+ s,
1751
+ t,
1752
+ r,
1753
+ o,
1754
+ a
1755
+ );
1756
+ else if (h = Go(e), typeof h == "function")
1757
+ for (e = h.call(e), h = 0; !(s = e.next()).done; )
1758
+ s = s.value, o = c + Gt(s, h++), n += Me(
1759
+ s,
1760
+ t,
1761
+ r,
1762
+ o,
1763
+ a
1764
+ );
1765
+ else if (o === "object") {
1766
+ if (typeof e.then == "function")
1767
+ return Me(
1768
+ Zo(e),
1769
+ t,
1770
+ r,
1771
+ s,
1772
+ a
1773
+ );
1774
+ throw t = String(e), Error(
1775
+ "Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead."
1776
+ );
1777
+ }
1778
+ return n;
1779
+ }
1780
+ function dt(e, t, r) {
1781
+ if (e == null) return e;
1782
+ var s = [], a = 0;
1783
+ return Me(e, s, "", "", function(o) {
1784
+ return t.call(r, o, a++);
1785
+ }), s;
1786
+ }
1787
+ function Ko(e) {
1788
+ if (e._status === -1) {
1789
+ var t = e._result;
1790
+ t = t(), t.then(
1791
+ function(r) {
1792
+ (e._status === 0 || e._status === -1) && (e._status = 1, e._result = r);
1793
+ },
1794
+ function(r) {
1795
+ (e._status === 0 || e._status === -1) && (e._status = 2, e._result = r);
1796
+ }
1797
+ ), e._status === -1 && (e._status = 0, e._result = t);
1798
+ }
1799
+ if (e._status === 1) return e._result.default;
1800
+ throw e._result;
1801
+ }
1802
+ var fs = typeof reportError == "function" ? reportError : function(e) {
1803
+ if (typeof window == "object" && typeof window.ErrorEvent == "function") {
1804
+ var t = new window.ErrorEvent("error", {
1805
+ bubbles: !0,
1806
+ cancelable: !0,
1807
+ message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
1808
+ error: e
1809
+ });
1810
+ if (!window.dispatchEvent(t)) return;
1811
+ } else if (typeof process == "object" && typeof process.emit == "function") {
1812
+ process.emit("uncaughtException", e);
1813
+ return;
1814
+ }
1815
+ console.error(e);
1816
+ };
1817
+ function Qo() {
1818
+ }
1819
+ w.Children = {
1820
+ map: dt,
1821
+ forEach: function(e, t, r) {
1822
+ dt(
1823
+ e,
1824
+ function() {
1825
+ t.apply(this, arguments);
1826
+ },
1827
+ r
1828
+ );
1829
+ },
1830
+ count: function(e) {
1831
+ var t = 0;
1832
+ return dt(e, function() {
1833
+ t++;
1834
+ }), t;
1835
+ },
1836
+ toArray: function(e) {
1837
+ return dt(e, function(t) {
1838
+ return t;
1839
+ }) || [];
1840
+ },
1841
+ only: function(e) {
1842
+ if (!hr(e))
1843
+ throw Error(
1844
+ "React.Children.only expected to receive a single React element child."
1845
+ );
1846
+ return e;
1847
+ }
1848
+ };
1849
+ w.Component = Fe;
1850
+ w.Fragment = No;
1851
+ w.Profiler = Uo;
1852
+ w.PureComponent = ir;
1853
+ w.StrictMode = Ho;
1854
+ w.Suspense = Bo;
1855
+ w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = I;
1856
+ w.act = function() {
1857
+ throw Error("act(...) is not supported in production builds of React.");
1858
+ };
1859
+ w.cache = function(e) {
1860
+ return function() {
1861
+ return e.apply(null, arguments);
1862
+ };
1863
+ };
1864
+ w.cloneElement = function(e, t, r) {
1865
+ if (e == null)
1866
+ throw Error(
1867
+ "The argument must be a React element, but you passed " + e + "."
1868
+ );
1869
+ var s = zs({}, e.props), a = e.key, o = void 0;
1870
+ if (t != null)
1871
+ for (n in t.ref !== void 0 && (o = void 0), t.key !== void 0 && (a = "" + t.key), t)
1872
+ !Bs.call(t, n) || n === "key" || n === "__self" || n === "__source" || n === "ref" && t.ref === void 0 || (s[n] = t[n]);
1873
+ var n = arguments.length - 2;
1874
+ if (n === 1) s.children = r;
1875
+ else if (1 < n) {
1876
+ for (var c = Array(n), h = 0; h < n; h++)
1877
+ c[h] = arguments[h + 2];
1878
+ s.children = c;
1879
+ }
1880
+ return ur(e.type, a, void 0, void 0, o, s);
1881
+ };
1882
+ w.createContext = function(e) {
1883
+ return e = {
1884
+ $$typeof: jo,
1885
+ _currentValue: e,
1886
+ _currentValue2: e,
1887
+ _threadCount: 0,
1888
+ Provider: null,
1889
+ Consumer: null
1890
+ }, e.Provider = e, e.Consumer = {
1891
+ $$typeof: zo,
1892
+ _context: e
1893
+ }, e;
1894
+ };
1895
+ w.createElement = function(e, t, r) {
1896
+ var s, a = {}, o = null;
1897
+ if (t != null)
1898
+ for (s in t.key !== void 0 && (o = "" + t.key), t)
1899
+ Bs.call(t, s) && s !== "key" && s !== "__self" && s !== "__source" && (a[s] = t[s]);
1900
+ var n = arguments.length - 2;
1901
+ if (n === 1) a.children = r;
1902
+ else if (1 < n) {
1903
+ for (var c = Array(n), h = 0; h < n; h++)
1904
+ c[h] = arguments[h + 2];
1905
+ a.children = c;
1906
+ }
1907
+ if (e && e.defaultProps)
1908
+ for (s in n = e.defaultProps, n)
1909
+ a[s] === void 0 && (a[s] = n[s]);
1910
+ return ur(e, o, void 0, void 0, null, a);
1911
+ };
1912
+ w.createRef = function() {
1913
+ return { current: null };
1914
+ };
1915
+ w.forwardRef = function(e) {
1916
+ return { $$typeof: Vo, render: e };
1917
+ };
1918
+ w.isValidElement = hr;
1919
+ w.lazy = function(e) {
1920
+ return {
1921
+ $$typeof: Hs,
1922
+ _payload: { _status: -1, _result: e },
1923
+ _init: Ko
1924
+ };
1925
+ };
1926
+ w.memo = function(e, t) {
1927
+ return {
1928
+ $$typeof: Wo,
1929
+ type: e,
1930
+ compare: t === void 0 ? null : t
1931
+ };
1932
+ };
1933
+ w.startTransition = function(e) {
1934
+ var t = I.T, r = {};
1935
+ I.T = r;
1936
+ try {
1937
+ var s = e(), a = I.S;
1938
+ a !== null && a(r, s), typeof s == "object" && s !== null && typeof s.then == "function" && s.then(Qo, fs);
1939
+ } catch (o) {
1940
+ fs(o);
1941
+ } finally {
1942
+ I.T = t;
1943
+ }
1944
+ };
1945
+ w.unstable_useCacheRefresh = function() {
1946
+ return I.H.useCacheRefresh();
1947
+ };
1948
+ w.use = function(e) {
1949
+ return I.H.use(e);
1950
+ };
1951
+ w.useActionState = function(e, t, r) {
1952
+ return I.H.useActionState(e, t, r);
1953
+ };
1954
+ w.useCallback = function(e, t) {
1955
+ return I.H.useCallback(e, t);
1956
+ };
1957
+ w.useContext = function(e) {
1958
+ return I.H.useContext(e);
1959
+ };
1960
+ w.useDebugValue = function() {
1961
+ };
1962
+ w.useDeferredValue = function(e, t) {
1963
+ return I.H.useDeferredValue(e, t);
1964
+ };
1965
+ w.useEffect = function(e, t) {
1966
+ return I.H.useEffect(e, t);
1967
+ };
1968
+ w.useId = function() {
1969
+ return I.H.useId();
1970
+ };
1971
+ w.useImperativeHandle = function(e, t, r) {
1972
+ return I.H.useImperativeHandle(e, t, r);
1973
+ };
1974
+ w.useInsertionEffect = function(e, t) {
1975
+ return I.H.useInsertionEffect(e, t);
1976
+ };
1977
+ w.useLayoutEffect = function(e, t) {
1978
+ return I.H.useLayoutEffect(e, t);
1979
+ };
1980
+ w.useMemo = function(e, t) {
1981
+ return I.H.useMemo(e, t);
1982
+ };
1983
+ w.useOptimistic = function(e, t) {
1984
+ return I.H.useOptimistic(e, t);
1985
+ };
1986
+ w.useReducer = function(e, t, r) {
1987
+ return I.H.useReducer(e, t, r);
1988
+ };
1989
+ w.useRef = function(e) {
1990
+ return I.H.useRef(e);
1991
+ };
1992
+ w.useState = function(e) {
1993
+ return I.H.useState(e);
1994
+ };
1995
+ w.useSyncExternalStore = function(e, t, r) {
1996
+ return I.H.useSyncExternalStore(
1997
+ e,
1998
+ t,
1999
+ r
2000
+ );
2001
+ };
2002
+ w.useTransition = function() {
2003
+ return I.H.useTransition();
2004
+ };
2005
+ w.version = "19.0.0";
2006
+ Ns.exports = w;
2007
+ var ds = Ns.exports, Xo = nr;
2008
+ const Jo = (e) => e;
2009
+ function Ws(e, t = Jo) {
2010
+ const r = ds.useSyncExternalStore(
2011
+ e.subscribe,
2012
+ () => t(e.getState()),
2013
+ () => t(e.getInitialState())
2014
+ );
2015
+ return ds.useDebugValue(r), r;
2016
+ }
2017
+ const ps = (e) => {
2018
+ const t = Xo.createStore(e), r = (s) => Ws(t, s);
2019
+ return Object.assign(r, t), r;
2020
+ }, ec = (e) => e ? ps(e) : ps;
2021
+ or.create = ec;
2022
+ or.useStore = Ws;
2023
+ (function(e) {
2024
+ var t = nr, r = or;
2025
+ Object.keys(t).forEach(function(s) {
2026
+ s !== "default" && !Object.prototype.hasOwnProperty.call(e, s) && Object.defineProperty(e, s, {
2027
+ enumerable: !0,
2028
+ get: function() {
2029
+ return t[s];
2030
+ }
2031
+ });
2032
+ }), Object.keys(r).forEach(function(s) {
2033
+ s !== "default" && !Object.prototype.hasOwnProperty.call(e, s) && Object.defineProperty(e, s, {
2034
+ enumerable: !0,
2035
+ get: function() {
2036
+ return r[s];
2037
+ }
2038
+ });
2039
+ });
2040
+ })(Ds);
2041
+ const ms = {
2042
+ adClientResponseItems: [],
2043
+ core: void 0,
2044
+ hotkey: "k",
2045
+ hotkeyModifier: "meta",
2046
+ logger: void 0,
2047
+ facetPathsForIndexFields: {},
2048
+ isPopoverVisible: !1,
2049
+ isSearchInProgress: !1,
2050
+ searchTerm: "",
2051
+ rangeValueForIndexFields: {},
2052
+ searchMode: "fuzzy",
2053
+ searchClientResponseItems: [],
2054
+ searchResponseTimeTaken: void 0,
2055
+ searchResponseFacetPrime: void 0,
2056
+ searchResultsCount: 0,
2057
+ searchResultsPerPage: 20,
2058
+ searchResultsPage: 1,
2059
+ sortType: "asc"
2060
+ }, $ = Ds.createStore((e, t) => {
2061
+ const r = {
2062
+ addFacetPathsForIndexField: (a) => e((o) => ({
2063
+ facetPathsForIndexFields: {
2064
+ ...o.facetPathsForIndexFields,
2065
+ [a.fieldName]: a
2066
+ }
2067
+ })),
2068
+ addRangeValueForIndexField: (a) => e((o) => ({
2069
+ rangeValueForIndexFields: {
2070
+ ...o.rangeValueForIndexFields,
2071
+ [a.fieldName]: a
2072
+ }
2073
+ })),
2074
+ getSearchcraftInstance: () => {
2075
+ const { core: a } = t();
2076
+ return a;
2077
+ },
2078
+ initialize: (a, o = !1) => {
2079
+ const n = a, c = o ? new ao({ logLevel: xe.DEBUG }) : void 0;
2080
+ e({
2081
+ core: n,
2082
+ logger: c,
2083
+ searchResultsPerPage: n.config.searchResultsPerPage || 20
2084
+ });
2085
+ },
2086
+ removeFacetPathsForIndexField: (a) => e((o) => {
2087
+ const n = o.facetPathsForIndexFields;
2088
+ return delete n[a], {
2089
+ facetPathsForIndexFields: {
2090
+ ...n
2091
+ }
2092
+ };
2093
+ }),
2094
+ removeRangeValueForIndexField: (a) => e((o) => {
2095
+ const n = o.rangeValueForIndexFields;
2096
+ return delete n[a], {
2097
+ rangeValueForIndexFields: {
2098
+ ...n
2099
+ }
2100
+ };
2101
+ }),
2102
+ resetFacetPaths: () => {
2103
+ e({
2104
+ facetPathsForIndexFields: {}
2105
+ });
2106
+ },
2107
+ search: async () => {
2108
+ var c, h;
2109
+ const a = t();
2110
+ if ((c = a.logger) == null || c.log(xe.INFO, `Starting search with search term: "${a.searchTerm}"`), !a.core)
2111
+ throw new Error("Searchcraft instance is not initialized.");
2112
+ if (!a.searchTerm.trim()) {
2113
+ (h = a.logger) == null || h.log(xe.INFO, "No search request was made: search term was empty."), e({
2114
+ searchClientResponseItems: [],
2115
+ searchResultsCount: 0,
2116
+ searchResultsPage: 1,
2117
+ searchTerm: ""
2118
+ });
2119
+ return;
2120
+ }
2121
+ e({ isSearchInProgress: !0 });
2122
+ const o = (u, l) => {
2123
+ var m, b;
2124
+ const p = u.data.facets;
2125
+ e((v) => ({
2126
+ isSearchInProgress: !1,
2127
+ searchClientResponseItems: l,
2128
+ searchResponseTimeTaken: u.data.time_taken || 0,
2129
+ searchResultsPage: (
2130
+ // reset to first page when response count changes
2131
+ u.data.count === v.searchResultsCount ? v.searchResultsPage : 1
2132
+ ),
2133
+ searchResultsCount: u.data.count || 0
2134
+ })), p && e({ searchResponseFacetPrime: p }), (m = a.logger) == null || m.log(xe.DEBUG, `Search results: ${JSON.stringify(l)}`), (b = a.logger) == null || b.log(xe.DEBUG, `Facets from response: ${JSON.stringify(p)}`);
2135
+ }, n = (u) => {
2136
+ e({ adClientResponseItems: u });
2137
+ };
2138
+ a.core.getItems({
2139
+ searchTerm: a.searchTerm,
2140
+ mode: a.searchMode,
2141
+ sort: a.sortType,
2142
+ facetPathsForIndexFields: a.facetPathsForIndexFields,
2143
+ rangeValueForIndexFields: a.rangeValueForIndexFields,
2144
+ offset: a.searchResultsPerPage ? a.searchResultsPerPage * (a.searchResultsPage - 1) : 0,
2145
+ limit: a.searchResultsPerPage
2146
+ }, o, n);
2147
+ },
2148
+ setPopoverVisibility: (a) => {
2149
+ e({
2150
+ isPopoverVisible: a
2151
+ });
2152
+ },
2153
+ setSearchMode: (a) => e({ searchMode: a }),
2154
+ setSortType: (a) => e({ sortType: a }),
2155
+ setSearchTerm: (a) => {
2156
+ const { core: o } = t();
2157
+ a.length === 0 && (o == null || o.handleInputCleared()), e({
2158
+ searchTerm: a,
2159
+ facetPathsForIndexFields: {},
2160
+ ...a.trim().length === 0 && {
2161
+ searchMode: "fuzzy",
2162
+ sortType: "asc"
2163
+ }
2164
+ });
2165
+ },
2166
+ setSearchClientResponseItems: (a) => e({ searchClientResponseItems: a }),
2167
+ setSearchResultsPage: async (a) => {
2168
+ e({ searchResultsPage: a }), await r.search();
2169
+ },
2170
+ setSearchResultsPerPage: async (a) => {
2171
+ e({ searchResultsPerPage: a }), await r.search();
2172
+ },
2173
+ setHotKeyAndHotKeyModifier: (a, o) => {
2174
+ const { hotkey: n, hotkeyModifier: c } = ms;
2175
+ e({
2176
+ hotkey: a || n,
2177
+ hotkeyModifier: o || c
2178
+ });
2179
+ }
2180
+ };
2181
+ return {
2182
+ ...ms,
2183
+ ...r
2184
+ };
2185
+ });
2186
+ var tc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Gs = { exports: {} };
2187
+ /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
2188
+ (function(e, t) {
2189
+ (function(r, s) {
2190
+ e.exports = s();
2191
+ })(tc, function() {
2192
+ const {
2193
+ entries: r,
2194
+ setPrototypeOf: s,
2195
+ isFrozen: a,
2196
+ getPrototypeOf: o,
2197
+ getOwnPropertyDescriptor: n
2198
+ } = Object;
2199
+ let {
2200
+ freeze: c,
2201
+ seal: h,
2202
+ create: u
2203
+ } = Object, {
2204
+ apply: l,
2205
+ construct: p
2206
+ } = typeof Reflect < "u" && Reflect;
2207
+ c || (c = function(C) {
2208
+ return C;
2209
+ }), h || (h = function(C) {
2210
+ return C;
2211
+ }), l || (l = function(C, P, R) {
2212
+ return C.apply(P, R);
2213
+ }), p || (p = function(C, P) {
2214
+ return new C(...P);
2215
+ });
2216
+ const m = G(Array.prototype.forEach), b = G(Array.prototype.lastIndexOf), v = G(Array.prototype.pop), T = G(Array.prototype.push), H = G(Array.prototype.splice), ee = G(String.prototype.toLowerCase), M = G(String.prototype.toString), De = G(String.prototype.match), Ne = G(String.prototype.replace), Ea = G(String.prototype.indexOf), Ra = G(String.prototype.trim), ae = G(Object.prototype.hasOwnProperty), W = G(RegExp.prototype.test), He = Ta(TypeError);
2217
+ function G(E) {
2218
+ return function(C) {
2219
+ for (var P = arguments.length, R = new Array(P > 1 ? P - 1 : 0), j = 1; j < P; j++)
2220
+ R[j - 1] = arguments[j];
2221
+ return l(E, C, R);
2222
+ };
2223
+ }
2224
+ function Ta(E) {
2225
+ return function() {
2226
+ for (var C = arguments.length, P = new Array(C), R = 0; R < C; R++)
2227
+ P[R] = arguments[R];
2228
+ return p(E, P);
2229
+ };
2230
+ }
2231
+ function x(E, C) {
2232
+ let P = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ee;
2233
+ s && s(E, null);
2234
+ let R = C.length;
2235
+ for (; R--; ) {
2236
+ let j = C[R];
2237
+ if (typeof j == "string") {
2238
+ const ie = P(j);
2239
+ ie !== j && (a(C) || (C[R] = ie), j = ie);
2240
+ }
2241
+ E[j] = !0;
2242
+ }
2243
+ return E;
2244
+ }
2245
+ function Pa(E) {
2246
+ for (let C = 0; C < E.length; C++)
2247
+ ae(E, C) || (E[C] = null);
2248
+ return E;
2249
+ }
2250
+ function Se(E) {
2251
+ const C = u(null);
2252
+ for (const [P, R] of r(E))
2253
+ ae(E, P) && (Array.isArray(R) ? C[P] = Pa(R) : R && typeof R == "object" && R.constructor === Object ? C[P] = Se(R) : C[P] = R);
2254
+ return C;
2255
+ }
2256
+ function Ue(E, C) {
2257
+ for (; E !== null; ) {
2258
+ const R = n(E, C);
2259
+ if (R) {
2260
+ if (R.get)
2261
+ return G(R.get);
2262
+ if (typeof R.value == "function")
2263
+ return G(R.value);
2264
+ }
2265
+ E = o(E);
2266
+ }
2267
+ function P() {
2268
+ return null;
2269
+ }
2270
+ return P;
2271
+ }
2272
+ const pr = c(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Et = c(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Rt = c(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), $a = c(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Tt = c(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), _a = c(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), mr = c(["#text"]), gr = c(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Pt = c(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), vr = c(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), et = c(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Aa = h(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ia = h(/<%[\w\W]*|[\w\W]*%>/gm), Ma = h(/\$\{[\w\W]*/gm), La = h(/^data-[\-\w.\u00B7-\uFFFF]+$/), Oa = h(/^aria-[\-\w]+$/), br = h(
2273
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2274
+ // eslint-disable-line no-useless-escape
2275
+ ), Fa = h(/^(?:\w+script|data):/i), Da = h(
2276
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2277
+ // eslint-disable-line no-control-regex
2278
+ ), yr = h(/^html$/i), Na = h(/^[a-z][.\w]*(-[.\w]+)+$/i);
2279
+ var Cr = /* @__PURE__ */ Object.freeze({
2280
+ __proto__: null,
2281
+ ARIA_ATTR: Oa,
2282
+ ATTR_WHITESPACE: Da,
2283
+ CUSTOM_ELEMENT: Na,
2284
+ DATA_ATTR: La,
2285
+ DOCTYPE_NAME: yr,
2286
+ ERB_EXPR: Ia,
2287
+ IS_ALLOWED_URI: br,
2288
+ IS_SCRIPT_OR_DATA: Fa,
2289
+ MUSTACHE_EXPR: Aa,
2290
+ TMPLIT_EXPR: Ma
2291
+ });
2292
+ const ze = {
2293
+ element: 1,
2294
+ text: 3,
2295
+ // Deprecated
2296
+ progressingInstruction: 7,
2297
+ comment: 8,
2298
+ document: 9
2299
+ }, Ha = function() {
2300
+ return typeof window > "u" ? null : window;
2301
+ }, Ua = function(C, P) {
2302
+ if (typeof C != "object" || typeof C.createPolicy != "function")
2303
+ return null;
2304
+ let R = null;
2305
+ const j = "data-tt-policy-suffix";
2306
+ P && P.hasAttribute(j) && (R = P.getAttribute(j));
2307
+ const ie = "dompurify" + (R ? "#" + R : "");
2308
+ try {
2309
+ return C.createPolicy(ie, {
2310
+ createHTML(Ee) {
2311
+ return Ee;
2312
+ },
2313
+ createScriptURL(Ee) {
2314
+ return Ee;
2315
+ }
2316
+ });
2317
+ } catch {
2318
+ return console.warn("TrustedTypes policy " + ie + " could not be created."), null;
2319
+ }
2320
+ }, Sr = function() {
2321
+ return {
2322
+ afterSanitizeAttributes: [],
2323
+ afterSanitizeElements: [],
2324
+ afterSanitizeShadowDOM: [],
2325
+ beforeSanitizeAttributes: [],
2326
+ beforeSanitizeElements: [],
2327
+ beforeSanitizeShadowDOM: [],
2328
+ uponSanitizeAttribute: [],
2329
+ uponSanitizeElement: [],
2330
+ uponSanitizeShadowNode: []
2331
+ };
2332
+ };
2333
+ function kr() {
2334
+ let E = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ha();
2335
+ const C = (S) => kr(S);
2336
+ if (C.version = "3.2.4", C.removed = [], !E || !E.document || E.document.nodeType !== ze.document || !E.Element)
2337
+ return C.isSupported = !1, C;
2338
+ let {
2339
+ document: P
2340
+ } = E;
2341
+ const R = P, j = R.currentScript, {
2342
+ DocumentFragment: ie,
2343
+ HTMLTemplateElement: Ee,
2344
+ Node: $t,
2345
+ Element: wr,
2346
+ NodeFilter: je,
2347
+ NamedNodeMap: ja = E.NamedNodeMap || E.MozNamedAttrMap,
2348
+ HTMLFormElement: Va,
2349
+ DOMParser: Ba,
2350
+ trustedTypes: tt
2351
+ } = E, Ve = wr.prototype, Wa = Ue(Ve, "cloneNode"), Ga = Ue(Ve, "remove"), qa = Ue(Ve, "nextSibling"), Ya = Ue(Ve, "childNodes"), rt = Ue(Ve, "parentNode");
2352
+ if (typeof Ee == "function") {
2353
+ const S = P.createElement("template");
2354
+ S.content && S.content.ownerDocument && (P = S.content.ownerDocument);
2355
+ }
2356
+ let q, Be = "";
2357
+ const {
2358
+ implementation: _t,
2359
+ createNodeIterator: Za,
2360
+ createDocumentFragment: Ka,
2361
+ getElementsByTagName: Qa
2362
+ } = P, {
2363
+ importNode: Xa
2364
+ } = R;
2365
+ let Y = Sr();
2366
+ C.isSupported = typeof r == "function" && typeof rt == "function" && _t && _t.createHTMLDocument !== void 0;
2367
+ const {
2368
+ MUSTACHE_EXPR: At,
2369
+ ERB_EXPR: It,
2370
+ TMPLIT_EXPR: Mt,
2371
+ DATA_ATTR: Ja,
2372
+ ARIA_ATTR: en,
2373
+ IS_SCRIPT_OR_DATA: tn,
2374
+ ATTR_WHITESPACE: xr,
2375
+ CUSTOM_ELEMENT: rn
2376
+ } = Cr;
2377
+ let {
2378
+ IS_ALLOWED_URI: Er
2379
+ } = Cr, D = null;
2380
+ const Rr = x({}, [...pr, ...Et, ...Rt, ...Tt, ...mr]);
2381
+ let U = null;
2382
+ const Tr = x({}, [...gr, ...Pt, ...vr, ...et]);
2383
+ let L = Object.seal(u(null, {
2384
+ tagNameCheck: {
2385
+ writable: !0,
2386
+ configurable: !1,
2387
+ enumerable: !0,
2388
+ value: null
2389
+ },
2390
+ attributeNameCheck: {
2391
+ writable: !0,
2392
+ configurable: !1,
2393
+ enumerable: !0,
2394
+ value: null
2395
+ },
2396
+ allowCustomizedBuiltInElements: {
2397
+ writable: !0,
2398
+ configurable: !1,
2399
+ enumerable: !0,
2400
+ value: !1
2401
+ }
2402
+ })), We = null, Lt = null, Pr = !0, Ot = !0, $r = !1, _r = !0, Re = !1, Ft = !0, ke = !1, Dt = !1, Nt = !1, Te = !1, st = !1, at = !1, Ar = !0, Ir = !1;
2403
+ const sn = "user-content-";
2404
+ let Ht = !0, Ge = !1, Pe = {}, $e = null;
2405
+ const Mr = x({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
2406
+ let Lr = null;
2407
+ const Or = x({}, ["audio", "video", "img", "source", "image", "track"]);
2408
+ let Ut = null;
2409
+ const Fr = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), nt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", le = "http://www.w3.org/1999/xhtml";
2410
+ let _e = le, zt = !1, jt = null;
2411
+ const an = x({}, [nt, ot, le], M);
2412
+ let ct = x({}, ["mi", "mo", "mn", "ms", "mtext"]), it = x({}, ["annotation-xml"]);
2413
+ const nn = x({}, ["title", "style", "font", "a", "script"]);
2414
+ let qe = null;
2415
+ const on = ["application/xhtml+xml", "text/html"], cn = "text/html";
2416
+ let N = null, Ae = null;
2417
+ const ln = P.createElement("form"), Dr = function(f) {
2418
+ return f instanceof RegExp || f instanceof Function;
2419
+ }, Vt = function() {
2420
+ let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2421
+ if (!(Ae && Ae === f)) {
2422
+ if ((!f || typeof f != "object") && (f = {}), f = Se(f), qe = // eslint-disable-next-line unicorn/prefer-includes
2423
+ on.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? cn : f.PARSER_MEDIA_TYPE, N = qe === "application/xhtml+xml" ? M : ee, D = ae(f, "ALLOWED_TAGS") ? x({}, f.ALLOWED_TAGS, N) : Rr, U = ae(f, "ALLOWED_ATTR") ? x({}, f.ALLOWED_ATTR, N) : Tr, jt = ae(f, "ALLOWED_NAMESPACES") ? x({}, f.ALLOWED_NAMESPACES, M) : an, Ut = ae(f, "ADD_URI_SAFE_ATTR") ? x(Se(Fr), f.ADD_URI_SAFE_ATTR, N) : Fr, Lr = ae(f, "ADD_DATA_URI_TAGS") ? x(Se(Or), f.ADD_DATA_URI_TAGS, N) : Or, $e = ae(f, "FORBID_CONTENTS") ? x({}, f.FORBID_CONTENTS, N) : Mr, We = ae(f, "FORBID_TAGS") ? x({}, f.FORBID_TAGS, N) : {}, Lt = ae(f, "FORBID_ATTR") ? x({}, f.FORBID_ATTR, N) : {}, Pe = ae(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Pr = f.ALLOW_ARIA_ATTR !== !1, Ot = f.ALLOW_DATA_ATTR !== !1, $r = f.ALLOW_UNKNOWN_PROTOCOLS || !1, _r = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Re = f.SAFE_FOR_TEMPLATES || !1, Ft = f.SAFE_FOR_XML !== !1, ke = f.WHOLE_DOCUMENT || !1, Te = f.RETURN_DOM || !1, st = f.RETURN_DOM_FRAGMENT || !1, at = f.RETURN_TRUSTED_TYPE || !1, Nt = f.FORCE_BODY || !1, Ar = f.SANITIZE_DOM !== !1, Ir = f.SANITIZE_NAMED_PROPS || !1, Ht = f.KEEP_CONTENT !== !1, Ge = f.IN_PLACE || !1, Er = f.ALLOWED_URI_REGEXP || br, _e = f.NAMESPACE || le, ct = f.MATHML_TEXT_INTEGRATION_POINTS || ct, it = f.HTML_INTEGRATION_POINTS || it, L = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Dr(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (L.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Dr(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (L.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (L.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Re && (Ot = !1), st && (Te = !0), Pe && (D = x({}, mr), U = [], Pe.html === !0 && (x(D, pr), x(U, gr)), Pe.svg === !0 && (x(D, Et), x(U, Pt), x(U, et)), Pe.svgFilters === !0 && (x(D, Rt), x(U, Pt), x(U, et)), Pe.mathMl === !0 && (x(D, Tt), x(U, vr), x(U, et))), f.ADD_TAGS && (D === Rr && (D = Se(D)), x(D, f.ADD_TAGS, N)), f.ADD_ATTR && (U === Tr && (U = Se(U)), x(U, f.ADD_ATTR, N)), f.ADD_URI_SAFE_ATTR && x(Ut, f.ADD_URI_SAFE_ATTR, N), f.FORBID_CONTENTS && ($e === Mr && ($e = Se($e)), x($e, f.FORBID_CONTENTS, N)), Ht && (D["#text"] = !0), ke && x(D, ["html", "head", "body"]), D.table && (x(D, ["tbody"]), delete We.tbody), f.TRUSTED_TYPES_POLICY) {
2424
+ if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
2425
+ throw He('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2426
+ if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2427
+ throw He('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2428
+ q = f.TRUSTED_TYPES_POLICY, Be = q.createHTML("");
2429
+ } else
2430
+ q === void 0 && (q = Ua(tt, j)), q !== null && typeof Be == "string" && (Be = q.createHTML(""));
2431
+ c && c(f), Ae = f;
2432
+ }
2433
+ }, Nr = x({}, [...Et, ...Rt, ...$a]), Hr = x({}, [...Tt, ..._a]), un = function(f) {
2434
+ let g = rt(f);
2435
+ (!g || !g.tagName) && (g = {
2436
+ namespaceURI: _e,
2437
+ tagName: "template"
2438
+ });
2439
+ const y = ee(f.tagName), _ = ee(g.tagName);
2440
+ return jt[f.namespaceURI] ? f.namespaceURI === ot ? g.namespaceURI === le ? y === "svg" : g.namespaceURI === nt ? y === "svg" && (_ === "annotation-xml" || ct[_]) : !!Nr[y] : f.namespaceURI === nt ? g.namespaceURI === le ? y === "math" : g.namespaceURI === ot ? y === "math" && it[_] : !!Hr[y] : f.namespaceURI === le ? g.namespaceURI === ot && !it[_] || g.namespaceURI === nt && !ct[_] ? !1 : !Hr[y] && (nn[y] || !Nr[y]) : !!(qe === "application/xhtml+xml" && jt[f.namespaceURI]) : !1;
2441
+ }, oe = function(f) {
2442
+ T(C.removed, {
2443
+ element: f
2444
+ });
2445
+ try {
2446
+ rt(f).removeChild(f);
2447
+ } catch {
2448
+ Ga(f);
2449
+ }
2450
+ }, lt = function(f, g) {
2451
+ try {
2452
+ T(C.removed, {
2453
+ attribute: g.getAttributeNode(f),
2454
+ from: g
2455
+ });
2456
+ } catch {
2457
+ T(C.removed, {
2458
+ attribute: null,
2459
+ from: g
2460
+ });
2461
+ }
2462
+ if (g.removeAttribute(f), f === "is")
2463
+ if (Te || st)
2464
+ try {
2465
+ oe(g);
2466
+ } catch {
2467
+ }
2468
+ else
2469
+ try {
2470
+ g.setAttribute(f, "");
2471
+ } catch {
2472
+ }
2473
+ }, Ur = function(f) {
2474
+ let g = null, y = null;
2475
+ if (Nt)
2476
+ f = "<remove></remove>" + f;
2477
+ else {
2478
+ const z = De(f, /^[\r\n\t ]+/);
2479
+ y = z && z[0];
2480
+ }
2481
+ qe === "application/xhtml+xml" && _e === le && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
2482
+ const _ = q ? q.createHTML(f) : f;
2483
+ if (_e === le)
2484
+ try {
2485
+ g = new Ba().parseFromString(_, qe);
2486
+ } catch {
2487
+ }
2488
+ if (!g || !g.documentElement) {
2489
+ g = _t.createDocument(_e, "template", null);
2490
+ try {
2491
+ g.documentElement.innerHTML = zt ? Be : _;
2492
+ } catch {
2493
+ }
2494
+ }
2495
+ const V = g.body || g.documentElement;
2496
+ return f && y && V.insertBefore(P.createTextNode(y), V.childNodes[0] || null), _e === le ? Qa.call(g, ke ? "html" : "body")[0] : ke ? g.documentElement : V;
2497
+ }, zr = function(f) {
2498
+ return Za.call(
2499
+ f.ownerDocument || f,
2500
+ f,
2501
+ // eslint-disable-next-line no-bitwise
2502
+ je.SHOW_ELEMENT | je.SHOW_COMMENT | je.SHOW_TEXT | je.SHOW_PROCESSING_INSTRUCTION | je.SHOW_CDATA_SECTION,
2503
+ null
2504
+ );
2505
+ }, Bt = function(f) {
2506
+ return f instanceof Va && (typeof f.nodeName != "string" || typeof f.textContent != "string" || typeof f.removeChild != "function" || !(f.attributes instanceof ja) || typeof f.removeAttribute != "function" || typeof f.setAttribute != "function" || typeof f.namespaceURI != "string" || typeof f.insertBefore != "function" || typeof f.hasChildNodes != "function");
2507
+ }, jr = function(f) {
2508
+ return typeof $t == "function" && f instanceof $t;
2509
+ };
2510
+ function ue(S, f, g) {
2511
+ m(S, (y) => {
2512
+ y.call(C, f, g, Ae);
2513
+ });
2514
+ }
2515
+ const Vr = function(f) {
2516
+ let g = null;
2517
+ if (ue(Y.beforeSanitizeElements, f, null), Bt(f))
2518
+ return oe(f), !0;
2519
+ const y = N(f.nodeName);
2520
+ if (ue(Y.uponSanitizeElement, f, {
2521
+ tagName: y,
2522
+ allowedTags: D
2523
+ }), f.hasChildNodes() && !jr(f.firstElementChild) && W(/<[/\w]/g, f.innerHTML) && W(/<[/\w]/g, f.textContent) || f.nodeType === ze.progressingInstruction || Ft && f.nodeType === ze.comment && W(/<[/\w]/g, f.data))
2524
+ return oe(f), !0;
2525
+ if (!D[y] || We[y]) {
2526
+ if (!We[y] && Wr(y) && (L.tagNameCheck instanceof RegExp && W(L.tagNameCheck, y) || L.tagNameCheck instanceof Function && L.tagNameCheck(y)))
2527
+ return !1;
2528
+ if (Ht && !$e[y]) {
2529
+ const _ = rt(f) || f.parentNode, V = Ya(f) || f.childNodes;
2530
+ if (V && _) {
2531
+ const z = V.length;
2532
+ for (let X = z - 1; X >= 0; --X) {
2533
+ const ce = Wa(V[X], !0);
2534
+ ce.__removalCount = (f.__removalCount || 0) + 1, _.insertBefore(ce, qa(f));
2535
+ }
2536
+ }
2537
+ }
2538
+ return oe(f), !0;
2539
+ }
2540
+ return f instanceof wr && !un(f) || (y === "noscript" || y === "noembed" || y === "noframes") && W(/<\/no(script|embed|frames)/i, f.innerHTML) ? (oe(f), !0) : (Re && f.nodeType === ze.text && (g = f.textContent, m([At, It, Mt], (_) => {
2541
+ g = Ne(g, _, " ");
2542
+ }), f.textContent !== g && (T(C.removed, {
2543
+ element: f.cloneNode()
2544
+ }), f.textContent = g)), ue(Y.afterSanitizeElements, f, null), !1);
2545
+ }, Br = function(f, g, y) {
2546
+ if (Ar && (g === "id" || g === "name") && (y in P || y in ln))
2547
+ return !1;
2548
+ if (!(Ot && !Lt[g] && W(Ja, g))) {
2549
+ if (!(Pr && W(en, g))) {
2550
+ if (!U[g] || Lt[g]) {
2551
+ if (
2552
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2553
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2554
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2555
+ !(Wr(f) && (L.tagNameCheck instanceof RegExp && W(L.tagNameCheck, f) || L.tagNameCheck instanceof Function && L.tagNameCheck(f)) && (L.attributeNameCheck instanceof RegExp && W(L.attributeNameCheck, g) || L.attributeNameCheck instanceof Function && L.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2556
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2557
+ g === "is" && L.allowCustomizedBuiltInElements && (L.tagNameCheck instanceof RegExp && W(L.tagNameCheck, y) || L.tagNameCheck instanceof Function && L.tagNameCheck(y)))
2558
+ ) return !1;
2559
+ } else if (!Ut[g]) {
2560
+ if (!W(Er, Ne(y, xr, ""))) {
2561
+ if (!((g === "src" || g === "xlink:href" || g === "href") && f !== "script" && Ea(y, "data:") === 0 && Lr[f])) {
2562
+ if (!($r && !W(tn, Ne(y, xr, "")))) {
2563
+ if (y)
2564
+ return !1;
2565
+ }
2566
+ }
2567
+ }
2568
+ }
2569
+ }
2570
+ }
2571
+ return !0;
2572
+ }, Wr = function(f) {
2573
+ return f !== "annotation-xml" && De(f, rn);
2574
+ }, Gr = function(f) {
2575
+ ue(Y.beforeSanitizeAttributes, f, null);
2576
+ const {
2577
+ attributes: g
2578
+ } = f;
2579
+ if (!g || Bt(f))
2580
+ return;
2581
+ const y = {
2582
+ attrName: "",
2583
+ attrValue: "",
2584
+ keepAttr: !0,
2585
+ allowedAttributes: U,
2586
+ forceKeepAttr: void 0
2587
+ };
2588
+ let _ = g.length;
2589
+ for (; _--; ) {
2590
+ const V = g[_], {
2591
+ name: z,
2592
+ namespaceURI: X,
2593
+ value: ce
2594
+ } = V, Ye = N(z);
2595
+ let Z = z === "value" ? ce : Ra(ce);
2596
+ if (y.attrName = Ye, y.attrValue = Z, y.keepAttr = !0, y.forceKeepAttr = void 0, ue(Y.uponSanitizeAttribute, f, y), Z = y.attrValue, Ir && (Ye === "id" || Ye === "name") && (lt(z, f), Z = sn + Z), Ft && W(/((--!?|])>)|<\/(style|title)/i, Z)) {
2597
+ lt(z, f);
2598
+ continue;
2599
+ }
2600
+ if (y.forceKeepAttr || (lt(z, f), !y.keepAttr))
2601
+ continue;
2602
+ if (!_r && W(/\/>/i, Z)) {
2603
+ lt(z, f);
2604
+ continue;
2605
+ }
2606
+ Re && m([At, It, Mt], (Yr) => {
2607
+ Z = Ne(Z, Yr, " ");
2608
+ });
2609
+ const qr = N(f.nodeName);
2610
+ if (Br(qr, Ye, Z)) {
2611
+ if (q && typeof tt == "object" && typeof tt.getAttributeType == "function" && !X)
2612
+ switch (tt.getAttributeType(qr, Ye)) {
2613
+ case "TrustedHTML": {
2614
+ Z = q.createHTML(Z);
2615
+ break;
2616
+ }
2617
+ case "TrustedScriptURL": {
2618
+ Z = q.createScriptURL(Z);
2619
+ break;
2620
+ }
2621
+ }
2622
+ try {
2623
+ X ? f.setAttributeNS(X, z, Z) : f.setAttribute(z, Z), Bt(f) ? oe(f) : v(C.removed);
2624
+ } catch {
2625
+ }
2626
+ }
2627
+ }
2628
+ ue(Y.afterSanitizeAttributes, f, null);
2629
+ }, hn = function S(f) {
2630
+ let g = null;
2631
+ const y = zr(f);
2632
+ for (ue(Y.beforeSanitizeShadowDOM, f, null); g = y.nextNode(); )
2633
+ ue(Y.uponSanitizeShadowNode, g, null), Vr(g), Gr(g), g.content instanceof ie && S(g.content);
2634
+ ue(Y.afterSanitizeShadowDOM, f, null);
2635
+ };
2636
+ return C.sanitize = function(S) {
2637
+ let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, y = null, _ = null, V = null;
2638
+ if (zt = !S, zt && (S = "<!-->"), typeof S != "string" && !jr(S))
2639
+ if (typeof S.toString == "function") {
2640
+ if (S = S.toString(), typeof S != "string")
2641
+ throw He("dirty is not a string, aborting");
2642
+ } else
2643
+ throw He("toString is not a function");
2644
+ if (!C.isSupported)
2645
+ return S;
2646
+ if (Dt || Vt(f), C.removed = [], typeof S == "string" && (Ge = !1), Ge) {
2647
+ if (S.nodeName) {
2648
+ const ce = N(S.nodeName);
2649
+ if (!D[ce] || We[ce])
2650
+ throw He("root node is forbidden and cannot be sanitized in-place");
2651
+ }
2652
+ } else if (S instanceof $t)
2653
+ g = Ur("<!---->"), y = g.ownerDocument.importNode(S, !0), y.nodeType === ze.element && y.nodeName === "BODY" || y.nodeName === "HTML" ? g = y : g.appendChild(y);
2654
+ else {
2655
+ if (!Te && !Re && !ke && // eslint-disable-next-line unicorn/prefer-includes
2656
+ S.indexOf("<") === -1)
2657
+ return q && at ? q.createHTML(S) : S;
2658
+ if (g = Ur(S), !g)
2659
+ return Te ? null : at ? Be : "";
2660
+ }
2661
+ g && Nt && oe(g.firstChild);
2662
+ const z = zr(Ge ? S : g);
2663
+ for (; _ = z.nextNode(); )
2664
+ Vr(_), Gr(_), _.content instanceof ie && hn(_.content);
2665
+ if (Ge)
2666
+ return S;
2667
+ if (Te) {
2668
+ if (st)
2669
+ for (V = Ka.call(g.ownerDocument); g.firstChild; )
2670
+ V.appendChild(g.firstChild);
2671
+ else
2672
+ V = g;
2673
+ return (U.shadowroot || U.shadowrootmode) && (V = Xa.call(R, V, !0)), V;
2674
+ }
2675
+ let X = ke ? g.outerHTML : g.innerHTML;
2676
+ return ke && D["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && W(yr, g.ownerDocument.doctype.name) && (X = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
2677
+ ` + X), Re && m([At, It, Mt], (ce) => {
2678
+ X = Ne(X, ce, " ");
2679
+ }), q && at ? q.createHTML(X) : X;
2680
+ }, C.setConfig = function() {
2681
+ let S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2682
+ Vt(S), Dt = !0;
2683
+ }, C.clearConfig = function() {
2684
+ Ae = null, Dt = !1;
2685
+ }, C.isValidAttribute = function(S, f, g) {
2686
+ Ae || Vt({});
2687
+ const y = N(S), _ = N(f);
2688
+ return Br(y, _, g);
2689
+ }, C.addHook = function(S, f) {
2690
+ typeof f == "function" && T(Y[S], f);
2691
+ }, C.removeHook = function(S, f) {
2692
+ if (f !== void 0) {
2693
+ const g = b(Y[S], f);
2694
+ return g === -1 ? void 0 : H(Y[S], g, 1)[0];
2695
+ }
2696
+ return v(Y[S]);
2697
+ }, C.removeHooks = function(S) {
2698
+ Y[S] = [];
2699
+ }, C.removeAllHooks = function() {
2700
+ Y = Sr();
2701
+ }, C;
2702
+ }
2703
+ var za = kr();
2704
+ return za;
2705
+ });
2706
+ })(Gs);
2707
+ const rc = Gs.exports, St = (e, ...t) => {
2708
+ let r = e[0];
2709
+ for (let s = 0; s < t.length; s++)
2710
+ r += rc.sanitize(t[s] ? String(t[s]) : "") + e[s + 1];
2711
+ return r || "";
2712
+ }, sc = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2713
+ let Q = (e = 21) => {
2714
+ let t = "", r = crypto.getRandomValues(new Uint8Array(e |= 0));
2715
+ for (; e--; )
2716
+ t += sc[r[e] & 63];
2717
+ return t;
2718
+ };
2719
+ const ac = /* @__PURE__ */ F(class extends O {
2720
+ constructor() {
2721
+ super();
2722
+ d(this, "adSource", "Custom");
2723
+ d(this, "adClientResponseItem");
2724
+ d(this, "adContainerId", Q());
2725
+ d(this, "searchTerm");
2726
+ d(this, "isSearchInProgress", !1);
2727
+ d(this, "core");
2728
+ d(this, "intersectionObserver");
2729
+ d(this, "storeUnsubscribe");
2730
+ d(this, "adContainerRenderedTimeout");
2731
+ d(this, "isComponentConnected", !0);
2732
+ this.__registerHost();
2733
+ }
2734
+ get hostElement() {
2735
+ return this;
2736
+ }
2737
+ connectedCallback() {
2738
+ const r = $.getState();
2739
+ this.core = r.core, this.searchTerm = r.searchTerm, this.isSearchInProgress = r.isSearchInProgress, this.storeUnsubscribe = $.subscribe((s) => {
2740
+ this.searchTerm = s.searchTerm, this.isSearchInProgress = s.isSearchInProgress;
2741
+ });
2742
+ }
2743
+ componentDidLoad() {
2744
+ this.hostElement && (this.intersectionObserver = new IntersectionObserver(([r]) => {
2745
+ var s;
2746
+ r != null && r.isIntersecting && !this.isSearchInProgress && ((s = this.core) == null || s.handleAdContainerViewed({
2747
+ adClientResponseItem: this.adClientResponseItem,
2748
+ adContainerId: this.adContainerId,
2749
+ adSource: this.adSource,
2750
+ searchTerm: this.searchTerm || ""
2751
+ }));
2752
+ }, { threshold: 0 }), this.intersectionObserver.observe(this.hostElement));
2753
+ }
2754
+ disconnectedCallback() {
2755
+ var r, s;
2756
+ (r = this.storeUnsubscribe) == null || r.call(this), (s = this.intersectionObserver) == null || s.disconnect(), this.isComponentConnected = !1, clearTimeout(this.adContainerRenderedTimeout);
2757
+ }
2758
+ renderADMAd() {
2759
+ const r = this.adClientResponseItem;
2760
+ if (r.admAd)
2761
+ return i("div", { class: "searchcraft-adm-ad" }, i("a", { class: "searchcraft-adm-ad-link", href: r.admAd.click_url }, r.admAd.image_url && i("div", { class: "searchcraft-adm-ad-image-wrapper" }, i("img", { alt: r.admAd.term || "image", src: r.admAd.image_url, class: "searchcraft-adm-ad-image" })), i("div", { class: "searchcraft-adm-ad-content" }, i("p", { class: "searchcraft-adm-ad-content-title" }, r.admAd.term), r.admAd.price && i("p", { class: "searchcraft-adm-ad-content-subtitle" }, r.admAd.price))));
2762
+ }
2763
+ renderCustomAd() {
2764
+ var o, n;
2765
+ const r = (n = (o = this.core) == null ? void 0 : o.config) == null ? void 0 : n.customAdTemplate, s = `searchcraft-custom-ad-${this.adContainerId}`;
2766
+ let a = "<p>Custom Ad Placeholder</p>";
2767
+ return r && (a = r({
2768
+ searchTerm: this.searchTerm || "",
2769
+ adContainerId: this.adContainerId
2770
+ }, { html: St })), i("div", { class: "searchcraft-custom-ad", id: s, "data-searchcraft-ad-container-id": this.adContainerId, innerHTML: a });
2771
+ }
2772
+ renderNativoAd() {
2773
+ var s;
2774
+ const r = ((s = this.core) == null ? void 0 : s.config.nativoAdClassName) || "ntv-item";
2775
+ return i("div", { class: r });
2776
+ }
2777
+ render() {
2778
+ var r, s;
2779
+ if (!this.isSearchInProgress)
2780
+ switch (this.isComponentConnected && (clearTimeout(this.adContainerRenderedTimeout), this.adContainerRenderedTimeout = setTimeout(() => {
2781
+ var a;
2782
+ (a = this.core) == null || a.handleAdContainerRendered({
2783
+ adClientResponseItem: this.adClientResponseItem,
2784
+ adContainerId: this.adContainerId,
2785
+ adSource: this.adSource,
2786
+ searchTerm: this.searchTerm || ""
2787
+ });
2788
+ }, ((s = (r = this.core) == null ? void 0 : r.config) == null ? void 0 : s.adContainerRenderedDebounceDelay) || 500)), this.adSource) {
2789
+ case "adMarketplace":
2790
+ return this.renderADMAd();
2791
+ case "Custom":
2792
+ return this.renderCustomAd();
2793
+ case "Nativo":
2794
+ return this.renderNativoAd();
2795
+ default:
2796
+ return;
2797
+ }
2798
+ }
2799
+ }, [0, "searchcraft-ad", {
2800
+ adSource: [1, "ad-source"],
2801
+ adClientResponseItem: [16],
2802
+ adContainerId: [1, "ad-container-id"],
2803
+ searchTerm: [32],
2804
+ isSearchInProgress: [32]
2805
+ }]);
2806
+ function kt() {
2807
+ if (typeof customElements > "u")
2808
+ return;
2809
+ ["searchcraft-ad"].forEach((t) => {
2810
+ switch (t) {
2811
+ case "searchcraft-ad":
2812
+ customElements.get(t) || customElements.define(t, ac);
2813
+ break;
2814
+ }
2815
+ });
2816
+ }
2817
+ const nc = kt;
2818
+ var qs = { exports: {} };
2819
+ /*!
2820
+ Copyright (c) 2018 Jed Watson.
2821
+ Licensed under the MIT License (MIT), see
2822
+ http://jedwatson.github.io/classnames
2823
+ */
2824
+ (function(e) {
2825
+ (function() {
2826
+ var t = {}.hasOwnProperty;
2827
+ function r() {
2828
+ for (var o = "", n = 0; n < arguments.length; n++) {
2829
+ var c = arguments[n];
2830
+ c && (o = a(o, s(c)));
2831
+ }
2832
+ return o;
2833
+ }
2834
+ function s(o) {
2835
+ if (typeof o == "string" || typeof o == "number")
2836
+ return o;
2837
+ if (typeof o != "object")
2838
+ return "";
2839
+ if (Array.isArray(o))
2840
+ return r.apply(null, o);
2841
+ if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
2842
+ return o.toString();
2843
+ var n = "";
2844
+ for (var c in o)
2845
+ t.call(o, c) && o[c] && (n = a(n, c));
2846
+ return n;
2847
+ }
2848
+ function a(o, n) {
2849
+ return n ? o ? o + " " + n : o + n : o;
2850
+ }
2851
+ e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
2852
+ })();
2853
+ })(qs);
2854
+ const se = qs.exports, oc = /* @__PURE__ */ F(class extends O {
2855
+ constructor() {
2856
+ super();
2857
+ /**
2858
+ * Controls the visual representation of the button.
2859
+ */
2860
+ d(this, "hierarchy", "primary");
2861
+ /**
2862
+ * Whether the button is disabled.
2863
+ */
2864
+ d(this, "disabled", !1);
2865
+ /**
2866
+ * The icon element.
2867
+ */
2868
+ d(this, "icon");
2869
+ /**
2870
+ * Should the button only display an icon.
2871
+ */
2872
+ d(this, "iconOnly", !1);
2873
+ /**
2874
+ * The position of the icon.
2875
+ */
2876
+ d(this, "iconPosition", "left");
2877
+ /**
2878
+ * The label for the button.
2879
+ */
2880
+ d(this, "label", "Search");
2881
+ /**
2882
+ * The type of the button.
2883
+ */
2884
+ d(this, "type", "button");
2885
+ /**
2886
+ * The event fired when the button is clicked.
2887
+ */
2888
+ d(this, "buttonClick");
2889
+ d(this, "handleButtonClick", () => {
2890
+ this.buttonClick.emit();
2891
+ });
2892
+ this.__registerHost(), this.buttonClick = be(this, "buttonClick");
2893
+ }
2894
+ render() {
2895
+ return i("button", { key: "e54b4566e0286265bc0c8b6bb4e9ef26108575da", "aria-label": this.label, class: se("searchcraft-button", {
2896
+ "searchcraft-button-primary": this.hierarchy === "primary",
2897
+ "searchcraft-button-tertiary": this.hierarchy === "tertiary",
2898
+ "searchcraft-button-disabled": this.disabled
2899
+ }), disabled: this.disabled, onClick: this.handleButtonClick, type: this.type }, this.iconOnly ? this.icon : i(to, null, this.iconPosition === "left" && this.icon, i("span", null, this.label), this.iconPosition === "right" && this.icon));
2900
+ }
2901
+ }, [0, "searchcraft-button", {
2902
+ hierarchy: [1],
2903
+ disabled: [4],
2904
+ icon: [16],
2905
+ iconOnly: [4, "icon-only"],
2906
+ iconPosition: [1, "icon-position"],
2907
+ label: [1],
2908
+ type: [1]
2909
+ }]);
2910
+ function wt() {
2911
+ if (typeof customElements > "u")
2912
+ return;
2913
+ ["searchcraft-button"].forEach((t) => {
2914
+ switch (t) {
2915
+ case "searchcraft-button":
2916
+ customElements.get(t) || customElements.define(t, oc);
2917
+ break;
2918
+ }
2919
+ });
2920
+ }
2921
+ const cc = wt, ic = /* @__PURE__ */ F(class extends O {
2922
+ constructor() {
2923
+ super(), this.__registerHost();
2924
+ }
2925
+ render() {
2926
+ return i("div", { key: "d42f7abf8dfb2620622b8012d868d32f04b2f354", class: "searchcraft-error-message" }, i("slot", { key: "75a7811576ea8afe80a7ae739f5cf2d411f976df" }, "Search term is required."));
2927
+ }
2928
+ }, [4, "searchcraft-error-message"]);
2929
+ function xt() {
2930
+ if (typeof customElements > "u")
2931
+ return;
2932
+ ["searchcraft-error-message"].forEach((t) => {
2933
+ switch (t) {
2934
+ case "searchcraft-error-message":
2935
+ customElements.get(t) || customElements.define(t, ic);
2936
+ break;
2937
+ }
2938
+ });
2939
+ }
2940
+ const lc = xt;
2941
+ function Ys(e, t) {
2942
+ const r = { ...e };
2943
+ for (const s in t)
2944
+ t.hasOwnProperty(s) && (t[s] instanceof Object && e[s] instanceof Object ? r[s] = Ys(e[s], t[s]) : r[s] = t[s]);
2945
+ return r;
2946
+ }
2947
+ function uc(e) {
2948
+ return e.filter((t, r, s) => !s.some((a, o) => o !== r && a.includes(t)));
2949
+ }
2950
+ function gs(e) {
2951
+ const t = {}, r = (s) => {
2952
+ var a;
2953
+ t[s.path] = {
2954
+ count: s.count,
2955
+ path: s.path
2956
+ }, (a = s.children) == null || a.forEach((o) => {
2957
+ r(o);
2958
+ });
2959
+ };
2960
+ return r(e), t;
2961
+ }
2962
+ function hc(e) {
2963
+ const t = {
2964
+ count: 0,
2965
+ path: "/",
2966
+ children: {}
2967
+ };
2968
+ return Object.keys(e).forEach((r) => {
2969
+ const s = e[r];
2970
+ if (!s || s.path === "/")
2971
+ return;
2972
+ const a = s.path.substring(1).split("/");
2973
+ let o = t, n = "";
2974
+ a.forEach((c, h) => {
2975
+ const u = `${n}/${c}`;
2976
+ o.children[u] || (o.children[u] = {
2977
+ count: 0,
2978
+ path: u,
2979
+ children: {}
2980
+ }), h === a.length - 1 && (o.children[u].count = s.count), n = u, o = o.children[u];
2981
+ });
2982
+ }), t;
2983
+ }
2984
+ function Zs(e) {
2985
+ const t = {
2986
+ count: e.count,
2987
+ path: e.path,
2988
+ children: []
2989
+ };
2990
+ return Object.keys(e.children).length > 0 && (t.children = Object.values(e.children).map((r) => Zs(r))), t;
2991
+ }
2992
+ function fc(e, t) {
2993
+ const r = Object.keys(e), s = Object.keys(t), a = new Set(s.filter((n) => n.split("/").length > 2).map((n) => n.substring(0, n.lastIndexOf("/"))));
2994
+ return Object.fromEntries(r.filter((n) => !a.has(n.substring(0, n.lastIndexOf("/")))).map((n) => [n, e[n]]));
2995
+ }
2996
+ function dc(e, t, r) {
2997
+ const s = t[e], a = r[e], o = {
2998
+ count: 0,
2999
+ path: "/",
3000
+ children: s
3001
+ }, n = {
3002
+ count: 0,
3003
+ path: "/",
3004
+ children: a
3005
+ }, c = gs(o), h = gs(n), u = fc(c, h), l = Ys(u, h), p = hc(l), m = Zs(p);
3006
+ return {
3007
+ [e]: m.children
3008
+ };
3009
+ }
3010
+ const pc = /* @__PURE__ */ F(class extends O {
3011
+ constructor() {
3012
+ super();
3013
+ /**
3014
+ * The name of the field where facets are applied.
3015
+ */
3016
+ d(this, "fieldName", "");
3017
+ /**
3018
+ * When the facets are updated.
3019
+ */
3020
+ d(this, "facetSelectionUpdated");
3021
+ d(this, "baseFacetRoot");
3022
+ d(this, "facetRoot");
3023
+ d(this, "selectedPaths", {});
3024
+ d(this, "lastTimeTaken");
3025
+ d(this, "hasNewSearchTerm", !1);
3026
+ d(this, "lastSearchTerm");
3027
+ d(this, "lastSearchMode");
3028
+ d(this, "lastSortType");
3029
+ d(this, "unsubscribe");
3030
+ d(this, "searchStore", $.getState());
3031
+ d(this, "formatLabel", (r) => {
3032
+ const s = r.path.replace(/^\//, ""), a = r.count;
3033
+ return `${s.replace(/-/g, " ").replace(/\b\w/g, (o) => o.toUpperCase())} (${a})`;
3034
+ });
3035
+ d(this, "formatSubLabel", (r, s) => {
3036
+ const o = r.path.substring(s.path.length).replace(/^\//, ""), n = r.count;
3037
+ return `${o.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())} (${n})`;
3038
+ });
3039
+ this.__registerHost(), this.facetSelectionUpdated = be(this, "facetSelectionUpdated");
3040
+ }
3041
+ handleStateUpdate(r) {
3042
+ const s = r.searchResponseFacetPrime, a = r.searchResponseTimeTaken;
3043
+ if (this.fieldName) {
3044
+ if ((r.searchTerm !== this.lastSearchTerm || r.searchMode !== this.lastSearchMode || r.sortType !== this.lastSortType) && (this.selectedPaths = {}, this.hasNewSearchTerm = !0), a !== this.lastTimeTaken && s) {
3045
+ this.facetRoot = void 0;
3046
+ const o = s.find((n) => this.fieldName === Object.keys(n)[0]);
3047
+ this.hasNewSearchTerm ? (this.baseFacetRoot = o, this.facetRoot = o, this.hasNewSearchTerm = !1) : this.baseFacetRoot && o && (this.facetRoot = dc(this.fieldName, this.baseFacetRoot, o));
3048
+ }
3049
+ this.lastSearchTerm = r.searchTerm, this.lastSearchMode = r.searchMode, this.lastSortType = r.sortType, this.lastTimeTaken = a;
3050
+ }
3051
+ }
3052
+ connectedCallback() {
3053
+ this.handleStateUpdate(this.searchStore), this.unsubscribe = $.subscribe((r) => {
3054
+ this.handleStateUpdate(r);
3055
+ });
3056
+ }
3057
+ disconnectedCallback() {
3058
+ var r;
3059
+ (r = this.unsubscribe) == null || r.call(this);
3060
+ }
3061
+ handleCheckboxChange(r) {
3062
+ var n;
3063
+ if (!this.selectedPaths[r])
3064
+ this.selectedPaths = {
3065
+ ...this.selectedPaths,
3066
+ [r]: !0
3067
+ };
3068
+ else {
3069
+ const c = Object.keys(this.selectedPaths).filter((h) => !h.includes(r));
3070
+ this.selectedPaths = c.reduce((h, u) => (h[u] = !0, h), {});
3071
+ }
3072
+ const a = Object.keys(this.selectedPaths).filter((c) => this.selectedPaths[c]), o = uc(a);
3073
+ (n = this.facetSelectionUpdated) == null || n.emit({ paths: o });
3074
+ }
3075
+ render() {
3076
+ var s;
3077
+ if (!this.fieldName)
3078
+ return;
3079
+ const r = (s = this.facetRoot) == null ? void 0 : s[this.fieldName];
3080
+ return i("div", { class: "searchcraft-facet-list" }, !r && i("p", { class: "searchcraft-facet-list-message" }, "Enter a search to view facets."), r == null ? void 0 : r.map((a) => {
3081
+ var n;
3082
+ const o = a.children ? (n = a.children) == null ? void 0 : n.some((c) => this.selectedPaths[c.path]) : !1;
3083
+ return i("div", { key: a.path, class: "searchcraft-facet-list-item" }, i("label", { class: "searchcraft-facet-list-checkbox-label" }, i("div", { class: "searchcraft-facet-list-checkbox-input-wrapper" }, i("input", { class: "searchcraft-facet-list-checkbox-input", checked: this.selectedPaths[a.path], onChange: (c) => this.handleCheckboxChange(a.path), type: "checkbox" }), o ? i("div", { class: "searchcraft-facet-list-checkbox-input-dash-icon" }, i("svg", { width: "14", height: "3", viewBox: "0 0 14 3", fill: "none" }, i("title", null, "Checkbox dash"), i("line", { x1: "1.5", y1: "1.5", x2: "12.5", y2: "1.5", stroke: "white", "stroke-width": "3", "stroke-linecap": "round" }))) : i("div", { class: "searchcraft-facet-list-checkbox-input-check-icon" }, i("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, i("title", null, "Checkbox check"), i("path", { d: "M13.9999 2L5.74988 10L1.99988 6.36364", stroke: "white", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.formatLabel(a)), a.children && a.children.length > 0 && i("div", { class: "searchcraft-facet-child-list" }, a.children.map((c) => i("label", { key: c.path, class: "searchcraft-facet-list-checkbox-label searchcraft-facet-child-list-checkbox-label", style: {
3084
+ display: this.selectedPaths[a.path] ? "flex" : "none"
3085
+ } }, i("div", { class: "searchcraft-facet-list-checkbox-input-wrapper searchcraft-facet-child-list-checkbox-input-wrapper" }, i("input", { class: "searchcraft-facet-list-checkbox-input searchcraft-facet-child-list-checkbox-input", checked: this.selectedPaths[c.path], onChange: (h) => {
3086
+ this.handleCheckboxChange(c.path);
3087
+ }, type: "checkbox" }), i("div", { class: "searchcraft-facet-list-checkbox-input-check-icon searchcraft-facet-child-list-checkbox-input-check-icon" }, i("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, i("title", null, "Checkbox check"), i("path", { d: "M13.9999 2L5.74988 10L1.99988 6.36364", stroke: "white", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.formatSubLabel(c, a)))));
3088
+ }));
3089
+ }
3090
+ }, [0, "searchcraft-facet-list", {
3091
+ fieldName: [1, "field-name"],
3092
+ baseFacetRoot: [32],
3093
+ facetRoot: [32],
3094
+ selectedPaths: [32],
3095
+ lastTimeTaken: [32],
3096
+ hasNewSearchTerm: [32],
3097
+ lastSearchTerm: [32],
3098
+ lastSearchMode: [32],
3099
+ lastSortType: [32],
3100
+ unsubscribe: [32]
3101
+ }]);
3102
+ function Ks() {
3103
+ if (typeof customElements > "u")
3104
+ return;
3105
+ ["searchcraft-facet-list"].forEach((t) => {
3106
+ switch (t) {
3107
+ case "searchcraft-facet-list":
3108
+ customElements.get(t) || customElements.define(t, pc);
3109
+ break;
3110
+ }
3111
+ });
3112
+ }
3113
+ const mc = Ks;
3114
+ function Ze(e, t) {
3115
+ if (e && t)
3116
+ return t.fieldNames.map((r) => {
3117
+ let s = e[r.fieldName];
3118
+ if (s)
3119
+ switch (r.dataType) {
3120
+ case "date": {
3121
+ s = gc(s);
3122
+ break;
3123
+ }
3124
+ case "number": {
3125
+ s = Intl.NumberFormat(r.numberFormatLocale, r.numberFormatOptions).format(s * (r.numberScale || 1));
3126
+ break;
3127
+ }
3128
+ }
3129
+ return s;
3130
+ }).filter((r) => !!r).join(t.delimiter || " ");
3131
+ }
3132
+ function Qs(e) {
3133
+ switch (e) {
3134
+ case "hour":
3135
+ return 36e5;
3136
+ case "day":
3137
+ return 864e5;
3138
+ case "month":
3139
+ return 2592e6;
3140
+ case "year":
3141
+ return 31536e6;
3142
+ default:
3143
+ return 36e5;
3144
+ }
3145
+ }
3146
+ function Xs(e) {
3147
+ return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
3148
+ }
3149
+ function gc(e) {
3150
+ const t = /* @__PURE__ */ new Date(), r = new Date(e), s = Math.floor((t.getTime() - r.getTime()) / 1e3), a = Math.floor(s / 60), o = Math.floor(a / 60), n = Math.floor(o / 24), c = Math.floor(n / 365);
3151
+ return a < 60 ? `${a}m ago` : o < 24 ? `${o}h ago` : n < 365 ? `${n}d ago` : `${c}y ago`;
3152
+ }
3153
+ const vc = /* @__PURE__ */ F(class extends O {
3154
+ constructor() {
3155
+ super();
3156
+ /**
3157
+ * The maximum value allowed.
3158
+ */
3159
+ d(this, "max", 100);
3160
+ /**
3161
+ * The minimum value allowed.
3162
+ */
3163
+ d(this, "min", 0);
3164
+ /**
3165
+ * The granularity that the value must adhere to.
3166
+ */
3167
+ d(this, "granularity", Qs("month"));
3168
+ /** The type of data allowed. */
3169
+ d(this, "dataType", "number");
3170
+ d(this, "endValue", this.max);
3171
+ d(this, "startValue", this.min);
3172
+ d(this, "lastFocusedHandle", "max");
3173
+ /**
3174
+ * When the range has changed.
3175
+ * */
3176
+ d(this, "rangeChanged");
3177
+ d(this, "emitUpdate", async () => {
3178
+ var r;
3179
+ (r = this.rangeChanged) == null || r.emit({
3180
+ startValue: this.startValue,
3181
+ endValue: this.endValue
3182
+ });
3183
+ });
3184
+ d(this, "handleStartValueChange", (r) => {
3185
+ const s = r.target, a = Number.parseInt(s.value, 10);
3186
+ this.lastFocusedHandle = "min", a <= this.endValue ? (this.startValue = a, this.emitUpdate()) : (this.startValue = this.endValue, s.value = `${this.endValue}`);
3187
+ });
3188
+ d(this, "handleEndValueChange", (r) => {
3189
+ const s = r.target, a = Number.parseInt(s.value, 10);
3190
+ this.lastFocusedHandle = "max", a >= this.startValue ? (this.endValue = a, this.emitUpdate()) : (this.endValue = this.startValue, s.value = `${this.startValue}`);
3191
+ });
3192
+ this.__registerHost(), this.rangeChanged = be(this, "rangeChanged");
3193
+ }
3194
+ componentDidLoad() {
3195
+ this.startValue = this.min, this.endValue = this.max;
3196
+ }
3197
+ render() {
3198
+ const r = this.min, s = this.max, a = (this.startValue - r) / (s - r) * 100, o = (this.endValue - r) / (s - r) * 100, n = this.dataType === "number" ? this.startValue : new Date(this.startValue).getFullYear(), c = this.dataType === "number" ? this.endValue : new Date(this.endValue).getFullYear();
3199
+ return i("div", { key: "9225b18ce2f40246837d183fcefdd0be7cc22383", class: "searchcraft-slider" }, i("div", { key: "8078c1eda2ceb781282f59216915896fdbe2a8d3", class: "searchcraft-slider-range" }, i("div", { key: "6a6bafa9f7abf41ab24f020cd291a4a08c618afb", class: "searchcraft-slider-active-range", style: {
3200
+ left: `${a}%`,
3201
+ width: `${o - a}%`
3202
+ } }), i("input", { key: "f07a91d441d277b8e9eba34e39093393a44bbf53", class: se("searchcraft-slider-input", "searchcraft-slider-input-min-handle"), max: this.max, min: this.min, onInput: this.handleStartValueChange.bind(this), step: this.granularity, style: { zIndex: this.lastFocusedHandle === "min" ? "2" : "1" }, type: "range", value: this.startValue }), i("input", { key: "0637ea5fe123abe1d77c540b347c78fc8ad3d281", class: se("searchcraft-slider-input", "searchcraft-slider-input-max-handle"), max: this.max, min: this.min, onInput: this.handleEndValueChange.bind(this), step: this.granularity, style: { zIndex: this.lastFocusedHandle === "max" ? "2" : "1" }, type: "range", value: this.endValue })), i("div", { key: "b62f8d8485915dddefb7ca29f62b4a96d70470c5", class: "searchcraft-slider-label" }, i("span", { key: "fd5d32172ce53d93b858ca54c17b12b80fcdde1d", class: "searchcraft-slider-start-label" }, n), i("span", { key: "8f4d230b78fb8d896a469f17ade3a3fd3162b427", class: "searchcraft-slider-end-label" }, c)));
3203
+ }
3204
+ }, [0, "searchcraft-slider", {
3205
+ max: [2],
3206
+ min: [2],
3207
+ granularity: [2],
3208
+ dataType: [1, "data-type"],
3209
+ endValue: [32],
3210
+ startValue: [32],
3211
+ lastFocusedHandle: [32]
3212
+ }]);
3213
+ function Js() {
3214
+ if (typeof customElements > "u")
3215
+ return;
3216
+ ["searchcraft-slider"].forEach((t) => {
3217
+ switch (t) {
3218
+ case "searchcraft-slider":
3219
+ customElements.get(t) || customElements.define(t, vc);
3220
+ break;
3221
+ }
3222
+ });
3223
+ }
3224
+ const bc = /* @__PURE__ */ F(class extends O {
3225
+ constructor() {
3226
+ super();
3227
+ /**
3228
+ * The label.
3229
+ */
3230
+ d(this, "label", "Toggle");
3231
+ /**
3232
+ * The secondary label displayed below the main label.
3233
+ */
3234
+ d(this, "subLabel");
3235
+ /**
3236
+ * When the toggle element is changed.
3237
+ */
3238
+ d(this, "toggleUpdated");
3239
+ d(this, "isActive", !1);
3240
+ d(this, "unsubscribe");
3241
+ d(this, "lastSearchTerm");
3242
+ d(this, "handleToggle", async () => {
3243
+ var r;
3244
+ this.isActive = !this.isActive, (r = this.toggleUpdated) == null || r.emit(this.isActive);
3245
+ });
3246
+ this.__registerHost(), this.toggleUpdated = be(this, "toggleUpdated");
3247
+ }
3248
+ connectedCallback() {
3249
+ this.unsubscribe = $.subscribe((r) => {
3250
+ r.searchTerm !== this.lastSearchTerm && r.searchTerm.trim().length === 0 && (this.isActive = !1), this.lastSearchTerm = r.searchTerm;
3251
+ });
3252
+ }
3253
+ disconnectedCallback() {
3254
+ var r;
3255
+ (r = this.unsubscribe) == null || r.call(this);
3256
+ }
3257
+ render() {
3258
+ return i("div", { key: "f8a751315daf6bcdc0d47bc4fc802bc4615e565f", class: se("searchcraft-toggle-button", {
3259
+ "searchcraft-toggle-button-active": this.isActive
3260
+ }) }, i("div", { key: "aaa92d7c1aebe241a163a1fba7cd1f8d3804286d" }, i("p", { key: "068b82b17a99bf55ad17818d0dd4c7e95858317b", class: "searchcraft-toggle-button-label" }, this.label), this.subLabel && i("p", { key: "39e43e3fad6a2ab09d20f37c6d6865cede3701d9", class: "searchcraft-toggle-button-sub-label" }, this.subLabel)), i("button", { key: "5ae352870d4a01c430389e75b967b2eb9d3fa5f7", class: "searchcraft-toggle-button-background", onClick: this.handleToggle, type: "button" }, i("div", { key: "0574ade4e1681ce8e122039c40e761cb68555621", class: "searchcraft-toggle-button-handle" })));
3261
+ }
3262
+ }, [0, "searchcraft-toggle-button", {
3263
+ label: [1],
3264
+ subLabel: [1, "sub-label"],
3265
+ isActive: [32],
3266
+ unsubscribe: [32],
3267
+ lastSearchTerm: [32]
3268
+ }]);
3269
+ function ea() {
3270
+ if (typeof customElements > "u")
3271
+ return;
3272
+ ["searchcraft-toggle-button"].forEach((t) => {
3273
+ switch (t) {
3274
+ case "searchcraft-toggle-button":
3275
+ customElements.get(t) || customElements.define(t, bc);
3276
+ break;
3277
+ }
3278
+ });
3279
+ }
3280
+ const ta = /* @__PURE__ */ F(class extends O {
3281
+ constructor() {
3282
+ super();
3283
+ /**
3284
+ * The items to filter.
3285
+ */
3286
+ d(this, "items", []);
3287
+ d(this, "unsubscribe");
3288
+ d(this, "lastSearchTerm");
3289
+ d(this, "searchStore", $.getState());
3290
+ this.__registerHost();
3291
+ }
3292
+ componentDidLoad() {
3293
+ this.unsubscribe = $.subscribe((r) => {
3294
+ this.lastSearchTerm = r.searchTerm || "";
3295
+ });
3296
+ }
3297
+ disconnectedCallback() {
3298
+ var r;
3299
+ (r = this.unsubscribe) == null || r.call(this);
3300
+ }
3301
+ handleDateRangeChanged(r, s, a) {
3302
+ const o = new Date(new Date(s).getFullYear(), 0, 1), n = new Date(new Date(a).getFullYear() + 1, 0, 0);
3303
+ this.searchStore.addRangeValueForIndexField({
3304
+ fieldName: r,
3305
+ value: `${r}:[${o.toISOString()} TO ${n.toISOString()}]`
3306
+ }), this.searchStore.search();
3307
+ }
3308
+ handleNumericRangeChanged(r, s, a) {
3309
+ this.searchStore.addRangeValueForIndexField({
3310
+ fieldName: r,
3311
+ value: `${r}:[${s} TO ${a}]`
3312
+ }), this.searchStore.search();
3313
+ }
3314
+ handleFacetSelectionUpdated(r, s) {
3315
+ s.length > 0 ? this.searchStore.addFacetPathsForIndexField({
3316
+ fieldName: r,
3317
+ value: `${r}: IN [${s.join(" ")}]`
3318
+ }) : this.searchStore.removeFacetPathsForIndexField(r), this.searchStore.search();
3319
+ }
3320
+ handleExactMatchToggleUpdated(r) {
3321
+ this.searchStore.setSearchMode(r ? "exact" : "fuzzy"), this.searchStore.search();
3322
+ }
3323
+ handleMostRecentToggleUpdated(r) {
3324
+ this.searchStore.setSortType(r ? "desc" : "asc"), this.searchStore.search();
3325
+ }
3326
+ /**
3327
+ * Iterate through `items` and render them based on `type`
3328
+ */
3329
+ render() {
3330
+ return i("div", { key: "22344fe9d0554894bff8c2c6afe12661bf7f20d0", class: "searchcraft-filter-panel" }, this.items.map((r) => {
3331
+ switch (r.type) {
3332
+ case "dateRange": {
3333
+ const s = r, a = new Date(s.options.minDate).getTime(), o = new Date(s.options.maxDate).getTime(), n = Qs(s.options.granularity);
3334
+ return i("div", { class: "searchcraft-filter-panel-section" }, i("p", { class: "searchcraft-filter-panel-label" }, r.label), i("searchcraft-slider", { min: a, max: o, granularity: n, dataType: "date", onRangeChanged: (c) => {
3335
+ this.handleDateRangeChanged(s.fieldName, c.detail.startValue, c.detail.endValue);
3336
+ } }));
3337
+ }
3338
+ case "numericRange": {
3339
+ const s = r;
3340
+ return i("div", { class: "searchcraft-filter-panel-section" }, i("p", { class: "searchcraft-filter-panel-label" }, r.label), i("searchcraft-slider", { min: s.options.min, max: s.options.max, granularity: s.options.granularity, onRangeChanged: (a) => {
3341
+ this.handleNumericRangeChanged(s.fieldName, a.detail.startValue, a.detail.endValue);
3342
+ } }));
3343
+ }
3344
+ case "facets": {
3345
+ const s = r;
3346
+ return i("div", { class: "searchcraft-filter-panel-section" }, i("p", { class: "searchcraft-filter-panel-label" }, r.label), i("searchcraft-facet-list", { fieldName: s.fieldName, onFacetSelectionUpdated: (a) => {
3347
+ this.handleFacetSelectionUpdated(s.fieldName, a.detail.paths);
3348
+ } }));
3349
+ }
3350
+ case "exactMatchToggle": {
3351
+ const s = r;
3352
+ return i("searchcraft-toggle-button", { label: s.label, subLabel: s.options.subLabel, onToggleUpdated: (a) => {
3353
+ this.handleExactMatchToggleUpdated(a.detail);
3354
+ } });
3355
+ }
3356
+ case "mostRecentToggle": {
3357
+ const s = r;
3358
+ return i("searchcraft-toggle-button", { label: s.label, subLabel: s.options.subLabel, onToggleUpdated: (a) => {
3359
+ this.handleMostRecentToggleUpdated(a.detail);
3360
+ } });
3361
+ }
3362
+ }
3363
+ }));
3364
+ }
3365
+ }, [0, "searchcraft-filter-panel", {
3366
+ items: [16],
3367
+ unsubscribe: [32],
3368
+ lastSearchTerm: [32]
3369
+ }]);
3370
+ function yc() {
3371
+ if (typeof customElements > "u")
3372
+ return;
3373
+ ["searchcraft-filter-panel", "searchcraft-facet-list", "searchcraft-slider", "searchcraft-toggle-button"].forEach((t) => {
3374
+ switch (t) {
3375
+ case "searchcraft-filter-panel":
3376
+ customElements.get(t) || customElements.define(t, ta);
3377
+ break;
3378
+ case "searchcraft-facet-list":
3379
+ customElements.get(t) || Ks();
3380
+ break;
3381
+ case "searchcraft-slider":
3382
+ customElements.get(t) || Js();
3383
+ break;
3384
+ case "searchcraft-toggle-button":
3385
+ customElements.get(t) || ea();
3386
+ break;
3387
+ }
3388
+ });
3389
+ }
3390
+ const Cc = ta, ra = yc, Sc = /* @__PURE__ */ F(class extends O {
3391
+ constructor() {
3392
+ super();
3393
+ /**
3394
+ * The classname applied to the label element.
3395
+ */
3396
+ d(this, "inputLabelClassName", "");
3397
+ d(this, "label", "");
3398
+ this.__registerHost();
3399
+ }
3400
+ render() {
3401
+ return i("label", { key: "3622c616d480e57b1dfaa2d61637a30b843cb968", class: se("searchcraft-input-label", this.inputLabelClassName), htmlFor: "searchcraft-input-id" }, this.label);
3402
+ }
3403
+ }, [0, "searchcraft-input-label", {
3404
+ inputLabelClassName: [1, "input-label-class-name"],
3405
+ label: [1]
3406
+ }]);
3407
+ function fr() {
3408
+ if (typeof customElements > "u")
3409
+ return;
3410
+ ["searchcraft-input-label"].forEach((t) => {
3411
+ switch (t) {
3412
+ case "searchcraft-input-label":
3413
+ customElements.get(t) || customElements.define(t, Sc);
3414
+ break;
3415
+ }
3416
+ });
3417
+ }
3418
+ const sa = /* @__PURE__ */ F(class extends O {
3419
+ constructor() {
3420
+ super();
3421
+ /**
3422
+ * Whether or not to automatically submit the search term when the input changes.
3423
+ */
3424
+ d(this, "autoSearch", !0);
3425
+ /**
3426
+ * Where to place the search button.
3427
+ */
3428
+ d(this, "buttonPlacement", "none");
3429
+ /**
3430
+ * The label for the submit button.
3431
+ */
3432
+ d(this, "buttonLabel");
3433
+ /**
3434
+ * The label rendered above the input.
3435
+ */
3436
+ d(this, "inputLabel");
3437
+ /**
3438
+ * The input element's placeholder value.
3439
+ */
3440
+ d(this, "placeholderValue", "Enter Search");
3441
+ /**
3442
+ * When the input becomes focused.
3443
+ */
3444
+ d(this, "inputFocus");
3445
+ /**
3446
+ * When the input becomes unfocused.
3447
+ */
3448
+ d(this, "inputBlur");
3449
+ /**
3450
+ * Event emitted when input initializes.
3451
+ */
3452
+ d(this, "inputInit");
3453
+ d(this, "inputValue", "");
3454
+ d(this, "searchTerm", "");
3455
+ d(this, "error", !1);
3456
+ d(this, "core");
3457
+ d(this, "searchStore", $.getState());
3458
+ d(this, "handleOnInput", (r) => {
3459
+ const s = r.target;
3460
+ this.inputValue = s.value, this.autoSearch && this.performSearch(s.value);
3461
+ });
3462
+ d(this, "performSearch", async (r) => {
3463
+ if (r !== $.getState().searchTerm) {
3464
+ this.searchTerm = r.trim(), this.error = !1, this.searchStore.setSearchTerm(this.searchTerm);
3465
+ try {
3466
+ await this.searchStore.search();
3467
+ } catch (s) {
3468
+ console.log(s), this.error = !0;
3469
+ }
3470
+ }
3471
+ });
3472
+ d(this, "handleClearInput", () => {
3473
+ this.inputValue = "", this.searchTerm = "", this.searchStore.setSearchTerm(""), this.searchStore.setSearchClientResponseItems([]), this.error = !1;
3474
+ });
3475
+ d(this, "handleFormSubmit", async (r) => {
3476
+ r.preventDefault(), await this.performSearch(this.searchTerm);
3477
+ });
3478
+ this.__registerHost(), this.inputFocus = be(this, "inputFocus"), this.inputBlur = be(this, "inputBlur"), this.inputInit = be(this, "inputInit");
3479
+ }
3480
+ init() {
3481
+ var r;
3482
+ this.core && (this.searchStore.initialize(this.core), (r = this.inputInit) == null || r.emit());
3483
+ }
3484
+ connectedCallback() {
3485
+ this.init();
3486
+ }
3487
+ onCoreChange() {
3488
+ this.init();
3489
+ }
3490
+ render() {
3491
+ const r = this.inputValue.length > 0, s = se("searchcraft-input-form-grid", {
3492
+ "searchcraft-input-form-grid-button-left": this.buttonPlacement === "left",
3493
+ "searchcraft-input-form-grid-button-right": this.buttonPlacement === "right",
3494
+ "searchcraft-input-form-grid-button-none": this.buttonPlacement === "none"
3495
+ }), o = {
3496
+ gap: this.inputLabel || this.error ? "4px 8px" : "0px 8px"
3497
+ };
3498
+ return i("form", { key: "488789f41d06780cf1cb3ab55013995fd16985bc", class: "searchcraft-input-form", onSubmit: this.handleFormSubmit }, i("div", { key: "abde33425daaa82f068d7bb31fca8f94d55b79e5", class: s, style: o }, i("div", { key: "d2ee4a97e3384550160e3d77c73167e725b78910", class: "searchcraft-input-form-button" }, i("searchcraft-button", { key: "6ca8bffa156a032dbddce0728f682f7e713b00b3", onButtonClick: this.handleFormSubmit, label: this.buttonLabel })), this.inputLabel && i("div", { key: "760f54d2ca7401fdd3151f0baa65163ba447aad4", class: "searchcraft-input-form-label" }, i("searchcraft-input-label", { key: "9b1e1fcc8559ba7417edc23cd495c27c44e9d394", label: this.inputLabel })), this.error && i("div", { key: "e2ba421228fe3daa1b60b3bda963be7b8fe5e2dd", class: "searchcraft-input-form-error-message" }, i("searchcraft-error-message", { key: "07655cb3197b9bd20fe6feb610a58b5679a82c33" }, "Something went wrong.")), i("div", { key: "93c20245f8f1bcb1656e88d7c26644ab41dd5000", class: "searchcraft-input-form-input-wrapper" }, i("input", { key: "2a3748be8434ac01ebae9907e0a762e868d5d10f", autoComplete: "off", class: "searchcraft-input-form-input", onFocus: () => {
3499
+ var n;
3500
+ return (n = this.inputFocus) == null ? void 0 : n.emit();
3501
+ }, onBlur: () => {
3502
+ var n;
3503
+ return (n = this.inputBlur) == null ? void 0 : n.emit();
3504
+ }, onInput: (n) => {
3505
+ this.handleOnInput(n);
3506
+ }, placeholder: this.placeholderValue, type: "text", value: this.inputValue }), i("div", { key: "c9eb1230b10d3bb91ffe0e43481ac3d1a1362b29", class: "searchcraft-input-form-input-icon" }, i("svg", { key: "68b3d2c336cc99faacb28e0a98cd93f88f9df13b", class: "searchcraft-input-form-input-search-icon", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "searchcraft-title" }, i("title", { key: "da56c06e543f45c59ef0f5922bd7d61fef448630" }, "Search icon"), i("path", { key: "ae0bcf6b95f861155cf0023d72a33f6d437b67dd", d: "M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), r && i("button", { key: "5663606a70f3c4afd44406e6e550dc44573c5421", type: "button", class: "searchcraft-input-form-clear-button", onClick: this.handleClearInput }, i("svg", { key: "15f316ed61153f1054e3c5ac6dffca48b702ac81", class: "searchcraft-input-form-clear-icon", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "icon-title" }, i("title", { key: "3e93ab9c95db6a7c012a9b25875aa78f33984ce6" }, "Clear icon"), i("path", { key: "b31b09b4a928e113720a13e9826e1d462c4e65bd", d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
3507
+ }
3508
+ static get watchers() {
3509
+ return {
3510
+ core: ["onCoreChange"]
3511
+ };
3512
+ }
3513
+ }, [0, "searchcraft-input-form", {
3514
+ autoSearch: [4, "auto-search"],
3515
+ buttonPlacement: [1, "button-placement"],
3516
+ buttonLabel: [1, "button-label"],
3517
+ inputLabel: [1, "input-label"],
3518
+ placeholderValue: [1, "placeholder-value"],
3519
+ core: [16],
3520
+ inputValue: [32],
3521
+ searchTerm: [32],
3522
+ error: [32]
3523
+ }, void 0, {
3524
+ core: ["onCoreChange"]
3525
+ }]);
3526
+ function aa() {
3527
+ if (typeof customElements > "u")
3528
+ return;
3529
+ ["searchcraft-input-form", "searchcraft-button", "searchcraft-error-message", "searchcraft-input-label"].forEach((t) => {
3530
+ switch (t) {
3531
+ case "searchcraft-input-form":
3532
+ customElements.get(t) || customElements.define(t, sa);
3533
+ break;
3534
+ case "searchcraft-button":
3535
+ customElements.get(t) || wt();
3536
+ break;
3537
+ case "searchcraft-error-message":
3538
+ customElements.get(t) || xt();
3539
+ break;
3540
+ case "searchcraft-input-label":
3541
+ customElements.get(t) || fr();
3542
+ break;
3543
+ }
3544
+ });
3545
+ }
3546
+ const kc = sa, na = aa, wc = fr, oa = /* @__PURE__ */ F(class extends O {
3547
+ constructor() {
3548
+ super();
3549
+ // store vars
3550
+ d(this, "searchTerm");
3551
+ d(this, "searchResultsPerPage");
3552
+ d(this, "searchResultsPage");
3553
+ d(this, "searchResultsCount");
3554
+ // local vars
3555
+ d(this, "searchResultsPagesCount", 1);
3556
+ d(this, "searchResultsRangeMin", 1);
3557
+ d(this, "searchResultsRangeMax", 1);
3558
+ // store functions
3559
+ d(this, "setSearchResultsPage", () => {
3560
+ });
3561
+ d(this, "unsubscribe", () => {
3562
+ });
3563
+ this.__registerHost();
3564
+ }
3565
+ componentDidLoad() {
3566
+ this.unsubscribe = $.subscribe((r) => {
3567
+ this.searchTerm = r.searchTerm, this.searchResultsPerPage = r.searchResultsPerPage, this.searchResultsPage = r.searchResultsPage, this.searchResultsCount = r.searchResultsCount, this.searchResultsPagesCount = Math.ceil(this.searchResultsCount / this.searchResultsPerPage), this.searchResultsRangeMin = (this.searchResultsPage - 1) * this.searchResultsPerPage + 1, this.searchResultsRangeMax = (this.searchResultsPerPage - 1) * this.searchResultsPerPage + this.searchResultsPerPage, this.setSearchResultsPage = r.setSearchResultsPage;
3568
+ });
3569
+ }
3570
+ disconnectedCallback() {
3571
+ var r;
3572
+ (r = this.unsubscribe) == null || r.call(this);
3573
+ }
3574
+ handleGoToPage(r) {
3575
+ this.setSearchResultsPage(r);
3576
+ }
3577
+ renderOddPaginationItem(r) {
3578
+ return i("li", null, i("button", { class: se("searchcraft-pagination-item", {
3579
+ "searchcraft-pagination-item-active": this.searchResultsPage === r
3580
+ }), onClick: () => this.handleGoToPage(r), type: "button" }, r));
3581
+ }
3582
+ renderEvenPaginationItem(r) {
3583
+ if (!(this.searchResultsPagesCount <= r))
3584
+ return (this.searchResultsPagesCount <= 5 || r < Math.ceil(this.searchResultsPagesCount / 2) ? this.searchResultsPage <= r + 1 : this.searchResultsPage >= r - 1) ? i("li", null, i("button", { class: se("searchcraft-pagination-item", {
3585
+ "searchcraft-pagination-item-active": this.searchResultsPage === r
3586
+ }), onClick: () => this.handleGoToPage(r), type: "button" }, r)) : i("li", null, i("span", { class: "searchcraft-pagination-item" }, "..."));
3587
+ }
3588
+ renderMiddlePaginationItem() {
3589
+ if (!(this.searchResultsPagesCount <= 3))
3590
+ return this.searchResultsPagesCount <= 5 || this.searchResultsPage <= 3 || this.searchResultsPage >= this.searchResultsPagesCount - 2 ? i("li", null, i("button", { class: se("searchcraft-pagination-item", {
3591
+ "searchcraft-pagination-item-active": this.searchResultsPage === 3 || this.searchResultsPage === this.searchResultsPagesCount - 2
3592
+ }), type: "button", onClick: () => this.handleGoToPage(this.searchResultsPage >= this.searchResultsPagesCount - 2 ? this.searchResultsPagesCount - 2 : 3) }, this.searchResultsPage >= this.searchResultsPagesCount - 2 ? this.searchResultsPagesCount - 2 : 3)) : i("li", null, i("span", { class: "searchcraft-pagination-item searchcraft-pagination-item-active" }, this.searchResultsPage));
3593
+ }
3594
+ render() {
3595
+ if (!(!this.searchTerm || this.searchResultsPagesCount <= 1))
3596
+ return i("div", { class: "searchcraft-pagination" }, i("div", { class: "searchcraft-pagination-control" }, i("searchcraft-button", { disabled: this.searchResultsPage === 1, hierarchy: "tertiary", onButtonClick: () => this.handleGoToPage(Math.max(1, this.searchResultsPage - 1)), label: "Previous", iconPosition: "left", icon: i("svg", { class: "searchcraft-button-icon", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("title", null, "Previous page icon"), i("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), iconOnly: !0 })), i("ul", { class: "searchcraft-pagination-list" }, this.renderOddPaginationItem(1), this.renderEvenPaginationItem(2), this.renderMiddlePaginationItem(), this.renderEvenPaginationItem(this.searchResultsPagesCount > 4 ? this.searchResultsPagesCount - 1 : 4), this.renderOddPaginationItem(this.searchResultsPagesCount)), i("div", { class: "searchcraft-pagination-control" }, i("searchcraft-button", { disabled: this.searchResultsPage === this.searchResultsPagesCount, hierarchy: "tertiary", onButtonClick: () => {
3597
+ this.handleGoToPage(Math.min(this.searchResultsPagesCount, this.searchResultsPage + 1));
3598
+ }, label: "Next", iconPosition: "right", icon: i("svg", { class: "searchcraft-button-icon", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("title", null, "Next page icon"), i("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), iconOnly: !0 })));
3599
+ }
3600
+ }, [0, "searchcraft-pagination", {
3601
+ searchTerm: [32],
3602
+ searchResultsPerPage: [32],
3603
+ searchResultsPage: [32],
3604
+ searchResultsCount: [32],
3605
+ searchResultsPagesCount: [32],
3606
+ searchResultsRangeMin: [32],
3607
+ searchResultsRangeMax: [32],
3608
+ setSearchResultsPage: [32]
3609
+ }]);
3610
+ function xc() {
3611
+ if (typeof customElements > "u")
3612
+ return;
3613
+ ["searchcraft-pagination", "searchcraft-button"].forEach((t) => {
3614
+ switch (t) {
3615
+ case "searchcraft-pagination":
3616
+ customElements.get(t) || customElements.define(t, oa);
3617
+ break;
3618
+ case "searchcraft-button":
3619
+ customElements.get(t) || wt();
3620
+ break;
3621
+ }
3622
+ });
3623
+ }
3624
+ const Ec = oa, ca = xc, ia = /* @__PURE__ */ F(class extends O {
3625
+ constructor() {
3626
+ super();
3627
+ /**
3628
+ * A callback function responsible for rendering the button contents.
3629
+ */
3630
+ d(this, "template");
3631
+ /**
3632
+ * The type of popover button to render.
3633
+ */
3634
+ d(this, "type");
3635
+ d(this, "hotkey");
3636
+ d(this, "hotkeyModifier");
3637
+ d(this, "hotkeyModifierSymbol");
3638
+ d(this, "isPopoverVisible");
3639
+ d(this, "userAgent");
3640
+ d(this, "unsubscribe", () => {
3641
+ });
3642
+ d(this, "renderOptionSymbol", () => i("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 512 512", fill: "none" }, i("title", null, "Option key"), i("path", { d: "M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z", fill: "currentColor" }), i("path", { d: "M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z", fill: "currentColor" })));
3643
+ d(this, "renderCtrlSymbol", () => i("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 512 512", fill: "none" }, i("title", null, "Ctrl key"), i("path", { d: "M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z", fill: "currentColor" })));
3644
+ d(this, "renderWindowsMetaSymbol", () => i("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 512 512", fill: "none" }, i("title", null, "Windows meta key"), i("path", { d: "M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z", fill: "currentColor" })));
3645
+ d(this, "renderMacMetaSymbol", () => i("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 512 512", fill: "none" }, i("title", null, "Mac meta key"), i("path", { d: "M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z", fill: "currentColor" })));
3646
+ this.__registerHost();
3647
+ }
3648
+ handleOnClick() {
3649
+ $.getState().setPopoverVisibility(!0);
3650
+ }
3651
+ componentDidLoad() {
3652
+ const r = $.getState();
3653
+ this.hotkey = r.hotkey.toUpperCase(), this.hotkeyModifier = r.hotkeyModifier, this.isPopoverVisible = r.isPopoverVisible, this.userAgent = this.setUserAgent(), this.hotkeyModifierSymbol = this.setHotkeyModifierSymbol(), this.unsubscribe = $.subscribe((s) => {
3654
+ this.hotkey = s.hotkey.toUpperCase(), this.hotkeyModifier = s.hotkeyModifier, this.hotkeyModifierSymbol = this.setHotkeyModifierSymbol();
3655
+ });
3656
+ }
3657
+ disconnectedCallback() {
3658
+ var r;
3659
+ (r = this.unsubscribe) == null || r.call(this);
3660
+ }
3661
+ setUserAgent() {
3662
+ const r = navigator.userAgent.toLowerCase();
3663
+ switch (!0) {
3664
+ case r.includes("windows"):
3665
+ return "window";
3666
+ case r.includes("mac"):
3667
+ return "mac";
3668
+ default:
3669
+ return "other";
3670
+ }
3671
+ }
3672
+ setHotkeyModifierSymbol() {
3673
+ switch (this.hotkeyModifier) {
3674
+ case "ctrl":
3675
+ return this.userAgent === "windows" ? this.renderCtrlSymbol() : this.renderMacMetaSymbol();
3676
+ case "alt":
3677
+ case "option":
3678
+ return this.renderOptionSymbol();
3679
+ default:
3680
+ return this.userAgent === "windows" ? this.renderWindowsMetaSymbol() : this.renderMacMetaSymbol();
3681
+ }
3682
+ }
3683
+ renderSkeuomorphicSlot() {
3684
+ return i("div", { class: "searchcraft-popover-button-wrapper" }, i("div", { class: "searchcraft-popover-button-input" }, i("svg", { class: "searchcraft-popover-button-input-search-icon", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", version: "1.1" }, i("title", null, "Search icon"), i("path", { d: "M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), i("span", null, "Search")), i("div", { class: "searchcraft-popover-button-keycaps" }, i("div", { class: "searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier" }, i("span", null, this.hotkeyModifierSymbol)), i("div", { class: "searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key" }, i("span", null, this.hotkey))));
3685
+ }
3686
+ renderSlot() {
3687
+ switch (this.type) {
3688
+ case "skeuomorphic":
3689
+ return this.renderSkeuomorphicSlot();
3690
+ default:
3691
+ return i("div", null, i("slot", null));
3692
+ }
3693
+ }
3694
+ render() {
3695
+ return i("button", { key: "d24721368deab8e6e9ade770170712f5b8504364", class: `searchcraft-popover-button ${this.type ? ` searchcraft-popover-button-${this.type}` : ""}`, onClick: this.handleOnClick.bind(this), type: "button" }, typeof this.template < "u" ? this.template(this.isPopoverVisible, { html: St }) : this.type ? this.renderSlot() : "Open Popover");
3696
+ }
3697
+ }, [4, "searchcraft-popover-button", {
3698
+ template: [16],
3699
+ type: [1],
3700
+ hotkey: [32],
3701
+ hotkeyModifier: [32],
3702
+ hotkeyModifierSymbol: [32],
3703
+ isPopoverVisible: [32],
3704
+ userAgent: [32]
3705
+ }]);
3706
+ function Rc() {
3707
+ if (typeof customElements > "u")
3708
+ return;
3709
+ ["searchcraft-popover-button"].forEach((t) => {
3710
+ switch (t) {
3711
+ case "searchcraft-popover-button":
3712
+ customElements.get(t) || customElements.define(t, ia);
3713
+ break;
3714
+ }
3715
+ });
3716
+ }
3717
+ const Tc = ia, la = Rc, Pc = /* @__PURE__ */ F(class extends O {
3718
+ constructor() {
3719
+ super();
3720
+ d(this, "searchResultsCount");
3721
+ d(this, "unsubscribe", () => {
3722
+ });
3723
+ this.__registerHost();
3724
+ }
3725
+ componentDidLoad() {
3726
+ this.searchResultsCount = $.getState().searchResultsCount, this.unsubscribe = $.subscribe((r) => {
3727
+ this.searchResultsCount = r.searchResultsCount;
3728
+ });
3729
+ }
3730
+ disconnectedCallback() {
3731
+ var r;
3732
+ (r = this.unsubscribe) == null || r.call(this);
3733
+ }
3734
+ render() {
3735
+ return i("footer", { key: "e1344ae185ef1b8a83bb69ba88e2952ab1c75e70", class: "searchcraft-popover-footer" }, i("p", { key: "51874f4ce490e4f164b999e8c6f89710702e73bd", class: "searchcraft-popover-footer-results-info" }, this.searchResultsCount ? `${Xs(this.searchResultsCount)} Results Found` : " "), i("a", { key: "5476e24cc3fa7fa265bd2b5cba43c8a70d8609ca", class: "searchcraft-popover-footer-link", href: "https://searchcraft.io/", target: "_blank", rel: "noreferrer" }, i("svg", { key: "0a4edf94e9e40a96a93a4e7ba1ffbd081e51b585", class: "searchcraft-popover-footer-link-image", width: "169", height: "16", viewBox: "0 0 169 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("title", { key: "67813a626922d709a4409028cb0f3f1ce3e2cfe8" }, "Powered by Searchcraft"), i("path", { key: "bf9e46a5f9783edd7167c1c5c1256d0200053969", d: "M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z", fill: "currentColor" }))));
3736
+ }
3737
+ }, [0, "searchcraft-popover-footer", {
3738
+ searchResultsCount: [32]
3739
+ }]);
3740
+ function ua() {
3741
+ if (typeof customElements > "u")
3742
+ return;
3743
+ ["searchcraft-popover-footer"].forEach((t) => {
3744
+ switch (t) {
3745
+ case "searchcraft-popover-footer":
3746
+ customElements.get(t) || customElements.define(t, Pc);
3747
+ break;
3748
+ }
3749
+ });
3750
+ }
3751
+ const $c = ua, _c = /* @__PURE__ */ F(class extends O {
3752
+ constructor() {
3753
+ super();
3754
+ d(this, "item");
3755
+ d(this, "popoverResultMappings");
3756
+ /** The document position relative to the search results (For Measure) */
3757
+ d(this, "documentPosition", 0);
3758
+ d(this, "title");
3759
+ d(this, "subtitle");
3760
+ d(this, "href");
3761
+ d(this, "imageSource");
3762
+ d(this, "imageAlt");
3763
+ d(this, "handleLinkClick", () => {
3764
+ var a;
3765
+ const r = $.getState(), s = r.getSearchcraftInstance();
3766
+ if (s) {
3767
+ const o = this.documentPosition, n = r.searchTerm, c = r.searchClientResponseItems.length || 0;
3768
+ (a = s.measureClient) == null || a.sendMeasureEvent("document_clicked", {
3769
+ document_position: o,
3770
+ number_of_documents: c,
3771
+ search_term: n
3772
+ });
3773
+ }
3774
+ });
3775
+ this.__registerHost();
3776
+ }
3777
+ mapValuesFromDocument(r) {
3778
+ var s, a, o, n, c;
3779
+ this.title = Ze(r, (s = this.popoverResultMappings) == null ? void 0 : s.title), this.subtitle = Ze(r, (a = this.popoverResultMappings) == null ? void 0 : a.subtitle), this.href = Ze(r, (o = this.popoverResultMappings) == null ? void 0 : o.href), this.imageSource = Ze(r, (n = this.popoverResultMappings) == null ? void 0 : n.imageSource), this.imageAlt = Ze(r, (c = this.popoverResultMappings) == null ? void 0 : c.imageAlt);
3780
+ }
3781
+ connectedCallback() {
3782
+ this.item && this.mapValuesFromDocument(this.item.document);
3783
+ }
3784
+ disconnectedCallback() {
3785
+ }
3786
+ render() {
3787
+ return i("div", { key: "2ad974b85e385f99724f9ac85d646cc82208e24a", class: "searchcraft-popover-list-item" }, i("a", { key: "68da0953d5efa18fd003c22df5321be8096bace6", class: "searchcraft-popover-list-item-link", href: this.href, onClick: this.handleLinkClick.bind(this) }, this.imageSource && i("div", { key: "49c99c8b9b5c8ca74b7e656e9ff87169ed42d305", class: "searchcraft-popover-list-item-image-wrapper" }, i("img", { key: "04022544e1d64e2d48b86a9d27e14e83e7ff43df", alt: this.imageAlt, src: this.imageSource, class: "searchcraft-popover-list-item-image" })), i("div", { key: "eca661cccf12e41dea5b0a70637864763a579336", class: "searchcraft-popover-list-item-content" }, this.title && i("p", { key: "c5cc621f946b521fb7c4b1fc7a8eb1d00b5c6d3f", class: "searchcraft-popover-list-item-content-title" }, this.title), this.subtitle && i("p", { key: "595cb3dea62af52dd1df0e7515dd186688d695db", class: "searchcraft-popover-list-item-content-subtitle" }, this.subtitle))));
3788
+ }
3789
+ }, [0, "searchcraft-popover-list-item", {
3790
+ item: [16],
3791
+ popoverResultMappings: [16],
3792
+ documentPosition: [2, "document-position"],
3793
+ title: [32],
3794
+ subtitle: [32],
3795
+ href: [32],
3796
+ imageSource: [32],
3797
+ imageAlt: [32]
3798
+ }]);
3799
+ function dr() {
3800
+ if (typeof customElements > "u")
3801
+ return;
3802
+ ["searchcraft-popover-list-item"].forEach((t) => {
3803
+ switch (t) {
3804
+ case "searchcraft-popover-list-item":
3805
+ customElements.get(t) || customElements.define(t, _c);
3806
+ break;
3807
+ }
3808
+ });
3809
+ }
3810
+ var Cs;
3811
+ const Ac = /* @__PURE__ */ F(class extends O {
3812
+ constructor() {
3813
+ super();
3814
+ /**
3815
+ * The mappings that define how the data in the documents are mapped to the
3816
+ * list-view-item elements.
3817
+ */
3818
+ d(this, "popoverResultMappings");
3819
+ /**
3820
+ * The items to render in the list view.
3821
+ */
3822
+ d(this, "searchClientResponseItems");
3823
+ d(this, "adClientResponseItems");
3824
+ d(this, "searchResultsPage");
3825
+ d(this, "searchResultsPerPage");
3826
+ d(this, "config", (Cs = $.getState().core) == null ? void 0 : Cs.config);
3827
+ this.__registerHost();
3828
+ }
3829
+ renderWithADMAds() {
3830
+ var r, s;
3831
+ return i("div", { class: "searchcraft-popover-list-view" }, (r = this.adClientResponseItems) == null ? void 0 : r.map((a) => i("searchcraft-ad", { adClientResponseItem: a, adContainerId: Q(), adSource: "adMarketplace", key: a.id })), (s = this.searchClientResponseItems) == null ? void 0 : s.map((a, o) => i("searchcraft-popover-list-item", { item: a, key: a.id, popoverResultMappings: this.popoverResultMappings, documentPosition: this.searchResultsPerPage * (this.searchResultsPage - 1) + o })));
3832
+ }
3833
+ renderWithCustomAds() {
3834
+ var h, u, l, p;
3835
+ const r = [], s = ((h = this.config) == null ? void 0 : h.customAdInterstitialInterval) || 0, a = ((u = this.config) == null ? void 0 : u.customAdInterstitialQuantity) || 1, o = ((l = this.config) == null ? void 0 : l.customAdStartQuantity) || 0, n = ((p = this.config) == null ? void 0 : p.customAdEndQuantity) || 0, c = this.searchClientResponseItems || [];
3836
+ for (let m = 0; m < o; m++)
3837
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m}-ad` }));
3838
+ c.forEach((m, b) => {
3839
+ if (s && b % s === 0 && b + s < c.length && b >= s)
3840
+ for (let v = 0; v < a; v++)
3841
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m.id}-ad-${v}` }));
3842
+ r.push(i("searchcraft-popover-list-item", { item: m, key: m.id, popoverResultMappings: this.popoverResultMappings, documentPosition: this.searchResultsPerPage * (this.searchResultsPage - 1) + b }));
3843
+ });
3844
+ for (let m = 0; m < n; m++)
3845
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m}-ad` }));
3846
+ return i("div", { class: "searchcraft-popover-list-view" }, r);
3847
+ }
3848
+ renderWithNativoAds() {
3849
+ var u, l, p, m, b;
3850
+ const r = [], s = ((u = this.config) == null ? void 0 : u.nativoAdInterstialStartIndex) || 0, a = ((l = this.config) == null ? void 0 : l.nativoAdInterstitialInterval) || 0, o = ((p = this.config) == null ? void 0 : p.nativoAdInterstitialQuantity) || 1, n = ((m = this.config) == null ? void 0 : m.nativoAdStartQuantity) || 0, c = ((b = this.config) == null ? void 0 : b.nativoAdEndQuantity) || 0, h = this.searchClientResponseItems || [];
3851
+ for (let v = 0; v < n; v++)
3852
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v}-ad` }));
3853
+ h.forEach((v, T) => {
3854
+ if (a && (T + s) % a === 0 && T + a < h.length && T >= a)
3855
+ for (let H = 0; H < o; H++)
3856
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v.id}-ad-${H}` }));
3857
+ r.push(i("searchcraft-popover-list-item", { item: v, key: v.id, popoverResultMappings: this.popoverResultMappings, documentPosition: this.searchResultsPerPage * (this.searchResultsPage - 1) + T }));
3858
+ });
3859
+ for (let v = 0; v < c; v++)
3860
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v}-ad` }));
3861
+ return i("div", { class: "searchcraft-popover-list-view" }, r);
3862
+ }
3863
+ renderWithNoAds() {
3864
+ var r;
3865
+ return i("div", { class: "searchcraft-popover-list-view" }, (r = this.searchClientResponseItems) == null ? void 0 : r.map((s, a) => i("searchcraft-popover-list-item", { item: s, key: s.id, popoverResultMappings: this.popoverResultMappings, documentPosition: this.searchResultsPerPage * (this.searchResultsPage - 1) + a })));
3866
+ }
3867
+ render() {
3868
+ var r;
3869
+ switch (((r = this.config) == null ? void 0 : r.adSource) || "None") {
3870
+ case "adMarketplace":
3871
+ return this.renderWithADMAds();
3872
+ case "Custom":
3873
+ return this.renderWithCustomAds();
3874
+ case "Nativo":
3875
+ return this.renderWithNativoAds();
3876
+ default:
3877
+ return this.renderWithNoAds();
3878
+ }
3879
+ }
3880
+ }, [0, "searchcraft-popover-list-view", {
3881
+ popoverResultMappings: [16],
3882
+ searchClientResponseItems: [16],
3883
+ adClientResponseItems: [16],
3884
+ searchResultsPage: [2, "search-results-page"],
3885
+ searchResultsPerPage: [2, "search-results-per-page"]
3886
+ }]);
3887
+ function ha() {
3888
+ if (typeof customElements > "u")
3889
+ return;
3890
+ ["searchcraft-popover-list-view", "searchcraft-ad", "searchcraft-popover-list-item"].forEach((t) => {
3891
+ switch (t) {
3892
+ case "searchcraft-popover-list-view":
3893
+ customElements.get(t) || customElements.define(t, Ac);
3894
+ break;
3895
+ case "searchcraft-ad":
3896
+ customElements.get(t) || kt();
3897
+ break;
3898
+ case "searchcraft-popover-list-item":
3899
+ customElements.get(t) || dr();
3900
+ break;
3901
+ }
3902
+ });
3903
+ }
3904
+ const fa = /* @__PURE__ */ F(class extends O {
3905
+ constructor() {
3906
+ super();
3907
+ /**
3908
+ * The type of popover form to render.
3909
+ * - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content.
3910
+ * - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component.
3911
+ * - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
3912
+ */
3913
+ d(this, "type", "inline");
3914
+ /**
3915
+ * Formats the content rendered for each result.
3916
+ */
3917
+ d(this, "popoverResultMappings");
3918
+ /**
3919
+ * The hotkey that activates the popover.
3920
+ */
3921
+ d(this, "hotkey", "k");
3922
+ /**
3923
+ * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
3924
+ */
3925
+ d(this, "hotkeyModifier", "meta");
3926
+ d(this, "isPopoverVisibleInState", !1);
3927
+ d(this, "unsubscribe");
3928
+ d(this, "searchClientResponseItems", []);
3929
+ d(this, "adClientResponseItems", []);
3930
+ d(this, "searchTerm");
3931
+ d(this, "isFocused", !1);
3932
+ d(this, "breakpointSm", 576);
3933
+ d(this, "breakpointMd", 768);
3934
+ d(this, "breakpointLg", 992);
3935
+ d(this, "searchResultsPage");
3936
+ d(this, "searchResultsPerPage");
3937
+ d(this, "modalElement");
3938
+ d(this, "handleDocumentClick", (r) => {
3939
+ this.hostElement.contains(r.target) || (this.isFocused = !1);
3940
+ });
3941
+ /**
3942
+ * Actions to perform when various keys are pressed within the popover form.
3943
+ */
3944
+ d(this, "handleDocumentKeyDown", (r) => {
3945
+ if (r.key === this.hotkey && this.handleHotkeyPressed(r), !!this.hostElement.contains(document.activeElement))
3946
+ switch (r.key) {
3947
+ case "ArrowDown":
3948
+ case "ArrowUp":
3949
+ r.preventDefault(), this.focusOnNextListItem(r.key);
3950
+ break;
3951
+ case "Escape":
3952
+ $.getState().setPopoverVisibility(!1);
3953
+ break;
3954
+ default:
3955
+ return;
3956
+ }
3957
+ });
3958
+ d(this, "handleInputInit", () => {
3959
+ const r = this.hostElement.querySelector(".searchcraft-input-form-input");
3960
+ r == null || r.focus();
3961
+ });
3962
+ this.__registerHost();
3963
+ }
3964
+ get hostElement() {
3965
+ return this;
3966
+ }
3967
+ componentDidLoad() {
3968
+ const r = getComputedStyle(document.documentElement);
3969
+ this.breakpointSm = Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()), this.breakpointMd = Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()), this.breakpointLg = Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()), this.isPopoverVisibleInState = $.getState().isPopoverVisible, document.addEventListener("click", this.handleDocumentClick), document.addEventListener("keydown", this.handleDocumentKeyDown), this.unsubscribe = $.subscribe((s) => {
3970
+ this.isPopoverVisibleInState !== s.isPopoverVisible && this.handlePopoverVisibilityChange(s.isPopoverVisible), this.searchClientResponseItems = [...s.searchClientResponseItems], this.adClientResponseItems = [...s.adClientResponseItems], this.searchTerm = s.searchTerm, this.searchResultsPage = s.searchResultsPage, this.searchResultsPerPage = s.searchResultsPerPage;
3971
+ }), $.getState().setHotKeyAndHotKeyModifier(this.hotkey, this.hotkeyModifier);
3972
+ }
3973
+ disconnectedCallback() {
3974
+ var r;
3975
+ (r = this.unsubscribe) == null || r.call(this), document.removeEventListener("click", this.handleDocumentClick), document.removeEventListener("keydown", this.handleDocumentKeyDown);
3976
+ }
3977
+ /**
3978
+ * Handles when popover visibility is changed in state
3979
+ */
3980
+ handlePopoverVisibilityChange(r) {
3981
+ this.isPopoverVisibleInState = r, document.body.style.overflow = r ? "hidden" : "auto";
3982
+ }
3983
+ /**
3984
+ * When popover is `inline` and the viewport is at the smallest breakpoint,
3985
+ * focusing on the input will open a modal version of the popover form.
3986
+ */
3987
+ handleInputFocus() {
3988
+ this.isFocused = !0, this.type === "inline" && window.visualViewport && window.visualViewport.width < this.breakpointSm && ($.getState().setPopoverVisibility(!0), this.modalElement || (this.modalElement = document.createElement("searchcraft-popover-form"), this.modalElement.popoverResultMappings = this.popoverResultMappings, this.modalElement.setAttribute("type", "fullscreen"), document.body.appendChild(this.modalElement)));
3989
+ }
3990
+ handleModalBackdropClick(r) {
3991
+ $.getState().setPopoverVisibility(!1);
3992
+ }
3993
+ /**
3994
+ * When a hotkey is pressed, tests if the modifiers also match.
3995
+ * If modifiers match, toggles visibility of the popover modal.
3996
+ */
3997
+ handleHotkeyPressed(r) {
3998
+ if (r.ctrlKey && this.hotkeyModifier === "ctrl" || r.altKey && this.hotkeyModifier === "alt" || r.metaKey && this.hotkeyModifier === "meta")
3999
+ if (r.preventDefault(), this.type === "inline" && !this.isPopoverVisibleInState) {
4000
+ const s = this.hostElement.querySelector(".searchcraft-input-form-input");
4001
+ s == null || s.focus();
4002
+ } else
4003
+ $.getState().setPopoverVisibility(!this.isPopoverVisibleInState);
4004
+ }
4005
+ handleCancelButtonClick() {
4006
+ $.getState().setPopoverVisibility(!1);
4007
+ }
4008
+ /**
4009
+ * Moves focus to the next/previous list item in the list view. If you are at the top
4010
+ * of the list view, it moves focus back to the input.
4011
+ *
4012
+ * @param direction
4013
+ */
4014
+ focusOnNextListItem(r) {
4015
+ var o, n;
4016
+ const s = Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter((c) => !c.hasAttribute("disabled") && c.offsetParent !== null), a = s.indexOf(document.activeElement);
4017
+ if (r === "ArrowDown")
4018
+ (o = s[(a + 1) % s.length]) == null || o.focus();
4019
+ else if (r === "ArrowUp")
4020
+ if (a >= 1)
4021
+ (n = s[a - 1]) == null || n.focus();
4022
+ else {
4023
+ const c = document.querySelector(".searchcraft-input-form-input");
4024
+ c && (c.focus(), requestAnimationFrame(() => {
4025
+ c.selectionEnd = c.value.length, c.selectionStart = c.value.length;
4026
+ }));
4027
+ }
4028
+ }
4029
+ get hasResultsToShow() {
4030
+ var r, s;
4031
+ return this.searchTerm && ((s = (r = this.searchTerm) == null ? void 0 : r.trim()) == null ? void 0 : s.length) > 0 && this.searchClientResponseItems.length > 0;
4032
+ }
4033
+ renderInlinePopover() {
4034
+ const r = this.hasResultsToShow && this.isFocused;
4035
+ return i("div", { class: se("searchcraft-popover-form searchcraft-popover-form-inline", {
4036
+ "searchcraft-popover-form-active": r
4037
+ }) }, i("div", { class: "searchcraft-popover-form-input searchcraft-popover-form-inline-input" }, i("searchcraft-input-form", { onInputFocus: this.handleInputFocus.bind(this) })), r && i("div", { class: "searchcraft-popover-form-inline-wrapper" }, i("searchcraft-popover-list-view", { popoverResultMappings: this.popoverResultMappings, searchClientResponseItems: this.searchClientResponseItems, adClientResponseItems: this.adClientResponseItems, searchResultsPage: this.searchResultsPage, searchResultsPerPage: this.searchResultsPerPage }), i("searchcraft-popover-footer", null)));
4038
+ }
4039
+ renderModalPopover() {
4040
+ if (this.isPopoverVisibleInState)
4041
+ return i("div", { class: se("searchcraft-popover-form searchcraft-popover-form-modal", {
4042
+ "searchcraft-popover-form-active": this.hasResultsToShow
4043
+ }) }, i("div", { class: "searchcraft-popover-form-modal-backdrop", onClick: this.handleModalBackdropClick }), i("div", { class: "searchcraft-popover-form-modal-wrapper" }, i("div", { class: "searchcraft-popover-form-input searchcraft-popover-form-modal-input" }, i("searchcraft-input-form", { onInputFocus: this.handleInputFocus.bind(this), onInputInit: this.handleInputInit.bind(this) }), i("button", { type: "button", class: "searchcraft-popover-form-input-cancel-button searchcraft-popover-form-modal-input-cancel-button", onClick: this.handleCancelButtonClick.bind(this) }, "Cancel")), this.hasResultsToShow && i("searchcraft-popover-list-view", { popoverResultMappings: this.popoverResultMappings, searchClientResponseItems: this.searchClientResponseItems, adClientResponseItems: this.adClientResponseItems, searchResultsPage: this.searchResultsPage, searchResultsPerPage: this.searchResultsPerPage }), i("searchcraft-popover-footer", null)));
4044
+ }
4045
+ renderFullscreenPopover() {
4046
+ if (this.isPopoverVisibleInState)
4047
+ return i("div", { class: se("searchcraft-popover-form searchcraft-popover-form-fullscreen", {
4048
+ "searchcraft-popover-form-active": this.hasResultsToShow
4049
+ }) }, i("div", { class: "searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input" }, i("searchcraft-input-form", { onInputFocus: this.handleInputFocus.bind(this), onInputInit: this.handleInputInit.bind(this) }), i("button", { type: "button", class: "searchcraft-popover-form-input-cancel-button searchcraft-popover-form-fullscreen-input-cancel-button", onClick: this.handleCancelButtonClick.bind(this) }, "Cancel")), this.hasResultsToShow && i("searchcraft-popover-list-view", { popoverResultMappings: this.popoverResultMappings, searchClientResponseItems: this.searchClientResponseItems, adClientResponseItems: this.adClientResponseItems, searchResultsPage: this.searchResultsPage, searchResultsPerPage: this.searchResultsPerPage }), i("searchcraft-popover-footer", null));
4050
+ }
4051
+ render() {
4052
+ switch (this.type) {
4053
+ case "inline":
4054
+ return this.renderInlinePopover();
4055
+ case "modal":
4056
+ return this.renderModalPopover();
4057
+ case "fullscreen":
4058
+ return this.renderFullscreenPopover();
4059
+ }
4060
+ }
4061
+ }, [0, "searchcraft-popover-form", {
4062
+ type: [1],
4063
+ popoverResultMappings: [16],
4064
+ hotkey: [1],
4065
+ hotkeyModifier: [1, "hotkey-modifier"],
4066
+ isPopoverVisibleInState: [32],
4067
+ unsubscribe: [32],
4068
+ searchClientResponseItems: [32],
4069
+ adClientResponseItems: [32],
4070
+ searchTerm: [32],
4071
+ isFocused: [32],
4072
+ breakpointSm: [32],
4073
+ breakpointMd: [32],
4074
+ breakpointLg: [32],
4075
+ searchResultsPage: [32],
4076
+ searchResultsPerPage: [32],
4077
+ modalElement: [32]
4078
+ }]);
4079
+ function da() {
4080
+ if (typeof customElements > "u")
4081
+ return;
4082
+ ["searchcraft-popover-form", "searchcraft-ad", "searchcraft-button", "searchcraft-error-message", "searchcraft-input-form", "searchcraft-input-label", "searchcraft-popover-footer", "searchcraft-popover-form", "searchcraft-popover-list-item", "searchcraft-popover-list-view"].forEach((t) => {
4083
+ switch (t) {
4084
+ case "searchcraft-popover-form":
4085
+ customElements.get(t) || customElements.define(t, fa);
4086
+ break;
4087
+ case "searchcraft-ad":
4088
+ customElements.get(t) || kt();
4089
+ break;
4090
+ case "searchcraft-button":
4091
+ customElements.get(t) || wt();
4092
+ break;
4093
+ case "searchcraft-error-message":
4094
+ customElements.get(t) || xt();
4095
+ break;
4096
+ case "searchcraft-input-form":
4097
+ customElements.get(t) || aa();
4098
+ break;
4099
+ case "searchcraft-input-label":
4100
+ customElements.get(t) || fr();
4101
+ break;
4102
+ case "searchcraft-popover-footer":
4103
+ customElements.get(t) || ua();
4104
+ break;
4105
+ case "searchcraft-popover-form":
4106
+ customElements.get(t) || da();
4107
+ break;
4108
+ case "searchcraft-popover-list-item":
4109
+ customElements.get(t) || dr();
4110
+ break;
4111
+ case "searchcraft-popover-list-view":
4112
+ customElements.get(t) || ha();
4113
+ break;
4114
+ }
4115
+ });
4116
+ }
4117
+ const Ic = fa, pa = da, Mc = dr, Lc = ha, ma = /* @__PURE__ */ F(class extends O {
4118
+ constructor() {
4119
+ super();
4120
+ /**
4121
+ * A callback function responsible for rendering the results info.
4122
+ */
4123
+ d(this, "template");
4124
+ // store vars
4125
+ d(this, "searchTerm");
4126
+ d(this, "searchResultsPage");
4127
+ d(this, "searchResultsPerPage");
4128
+ d(this, "searchResultsCount");
4129
+ // local vars
4130
+ d(this, "count", 0);
4131
+ d(this, "range", [0, 0]);
4132
+ d(this, "responseTime", "0");
4133
+ d(this, "unsubscribe", () => {
4134
+ });
4135
+ this.__registerHost();
4136
+ }
4137
+ connectedCallback() {
4138
+ this.unsubscribe = $.subscribe((r) => {
4139
+ this.searchTerm = r.searchTerm, this.searchResultsPage = r.searchResultsPage, this.searchResultsPerPage = r.searchResultsPerPage, this.searchResultsCount = r.searchResultsCount, this.count = this.searchResultsCount, this.range[0] = this.searchResultsPage <= 1 ? 1 : this.searchResultsPerPage * (this.searchResultsPage - 1), this.range[1] = this.searchResultsPerPage * this.searchResultsPage, this.range[1] = this.range[1] > this.searchResultsCount ? this.searchResultsCount : this.range[1], this.responseTime = ((r.searchResponseTimeTaken || 0) * 1e3).toFixed(2);
4140
+ });
4141
+ }
4142
+ disconnectedCallback() {
4143
+ this.unsubscribe && this.unsubscribe();
4144
+ }
4145
+ render() {
4146
+ return !this.searchTerm || this.searchResultsCount === 0 ? null : i("p", { class: "searchcraft-results-info" }, typeof this.template < "u" ? this.template({
4147
+ range: [Number(this.range[0]), Number(this.range[1])],
4148
+ count: this.count,
4149
+ responseTime: this.responseTime
4150
+ }, { html: St }) : `${Xs(this.count)} results found in ${this.responseTime}ms`);
4151
+ }
4152
+ }, [0, "searchcraft-results-info", {
4153
+ template: [16],
4154
+ searchTerm: [32],
4155
+ searchResultsPage: [32],
4156
+ searchResultsPerPage: [32],
4157
+ searchResultsCount: [32],
4158
+ count: [32],
4159
+ range: [32],
4160
+ responseTime: [32]
4161
+ }]);
4162
+ function Oc() {
4163
+ if (typeof customElements > "u")
4164
+ return;
4165
+ ["searchcraft-results-info"].forEach((t) => {
4166
+ switch (t) {
4167
+ case "searchcraft-results-info":
4168
+ customElements.get(t) || customElements.define(t, ma);
4169
+ break;
4170
+ }
4171
+ });
4172
+ }
4173
+ const Fc = ma, ga = Oc, Dc = /* @__PURE__ */ F(class extends O {
4174
+ constructor() {
4175
+ super();
4176
+ d(this, "item");
4177
+ /**
4178
+ * The index.
4179
+ */
4180
+ d(this, "index");
4181
+ /**
4182
+ * The position in the document. Used with the "document_clicked" measure event.
4183
+ */
4184
+ d(this, "documentPosition", 0);
4185
+ /**
4186
+ * A callback function responsible for rendering a result.
4187
+ */
4188
+ d(this, "template");
4189
+ d(this, "templateHtml");
4190
+ d(this, "handleResultContainerClick", (r) => {
4191
+ var l;
4192
+ const s = $.getState(), a = s.getSearchcraftInstance();
4193
+ if (!r.target)
4194
+ return;
4195
+ const n = r.target.closest("a");
4196
+ if (!n || !((l = this.hostElement) != null && l.contains(n)) || !a || !a.measureClient)
4197
+ return;
4198
+ const c = this.documentPosition, h = s.searchTerm, u = s.searchClientResponseItems.length || 0;
4199
+ a.measureClient.sendMeasureEvent("document_clicked", {
4200
+ document_position: c,
4201
+ number_of_documents: u,
4202
+ search_term: h
4203
+ });
4204
+ });
4205
+ d(this, "handleKeyDown", () => {
4206
+ });
4207
+ this.__registerHost();
4208
+ }
4209
+ get hostElement() {
4210
+ return this;
4211
+ }
4212
+ connectedCallback() {
4213
+ var r;
4214
+ if (this.item)
4215
+ try {
4216
+ this.templateHtml = (r = this.template) == null ? void 0 : r.call(this, this.item.document, this.index, {
4217
+ html: St
4218
+ });
4219
+ } catch (s) {
4220
+ console.error(`Invalid search result template: ${s}`);
4221
+ }
4222
+ }
4223
+ render() {
4224
+ if (this.item)
4225
+ return typeof this.template > "u" ? i("div", { class: "searchcraft-search-result searchcraft-search-result-no-template", onClick: this.handleResultContainerClick, onKeyDown: this.handleKeyDown }, Object.entries(this.item.document).map(([r, s]) => i("p", { key: r }, i("strong", null, r), ": ", s))) : i("div", { class: "searchcraft-search-result", innerHTML: this.templateHtml, onClick: this.handleResultContainerClick, onKeyDown: this.handleKeyDown });
4226
+ }
4227
+ }, [0, "searchcraft-search-result", {
4228
+ item: [16],
4229
+ index: [2],
4230
+ documentPosition: [2, "document-position"],
4231
+ template: [16],
4232
+ templateHtml: [32]
4233
+ }]);
4234
+ function va() {
4235
+ if (typeof customElements > "u")
4236
+ return;
4237
+ ["searchcraft-search-result"].forEach((t) => {
4238
+ switch (t) {
4239
+ case "searchcraft-search-result":
4240
+ customElements.get(t) || customElements.define(t, Dc);
4241
+ break;
4242
+ }
4243
+ });
4244
+ }
4245
+ const Nc = va, ba = /* @__PURE__ */ F(class extends O {
4246
+ constructor() {
4247
+ super();
4248
+ /**
4249
+ * A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
4250
+ */
4251
+ d(this, "template");
4252
+ d(this, "searchTerm", "");
4253
+ d(this, "searchClientResponseItems");
4254
+ d(this, "adClientResponseItems", []);
4255
+ d(this, "searchResultsPerPage");
4256
+ d(this, "searchResultsPage");
4257
+ d(this, "isSearchInProgress", !0);
4258
+ d(this, "config");
4259
+ d(this, "unsubscribe", () => {
4260
+ });
4261
+ this.__registerHost();
4262
+ }
4263
+ componentDidLoad() {
4264
+ var s;
4265
+ this.unsubscribe = $.subscribe((a) => this.handleStateChange(a));
4266
+ const r = $.getState();
4267
+ this.handleStateChange(r), this.searchClientResponseItems = r.searchClientResponseItems, this.searchTerm = r.searchTerm, this.config = (s = r.core) == null ? void 0 : s.config;
4268
+ }
4269
+ disconnectedCallback() {
4270
+ var r;
4271
+ (r = this.unsubscribe) == null || r.call(this);
4272
+ }
4273
+ handleStateChange(r) {
4274
+ var s;
4275
+ this.searchClientResponseItems = [...r.searchClientResponseItems], this.adClientResponseItems = [...r.adClientResponseItems], this.searchTerm = r.searchTerm, this.searchResultsPage = r.searchResultsPage, this.searchResultsPerPage = r.searchResultsPerPage, this.config = (s = r.core) == null ? void 0 : s.config, this.isSearchInProgress = r.isSearchInProgress;
4276
+ }
4277
+ renderEmptyState() {
4278
+ return i("div", { class: "searchcraft-search-results-empty-state" }, i("slot", { name: "empty-search" }));
4279
+ }
4280
+ renderNoResultsFoundState() {
4281
+ return i("div", { class: "searchcraft-search-results" }, i("div", { class: "searchcraft-search-results-error-message" }, i("searchcraft-error-message", null, 'No search results found for "', this.searchTerm, '" query.')));
4282
+ }
4283
+ renderWithADMAds() {
4284
+ var r, s;
4285
+ return i("div", { class: "searchcraft-search-results" }, (r = this.adClientResponseItems) == null ? void 0 : r.map((a) => i("searchcraft-ad", { adSource: "adMarketplace", adClientResponseItem: a, adContainerId: Q(), key: a.id })), (s = this.searchClientResponseItems) == null ? void 0 : s.map((a, o) => i("searchcraft-search-result", { key: a.id, "document-position": this.searchResultsPerPage * (this.searchResultsPage - 1) + o, index: o, item: a, template: this.template })));
4286
+ }
4287
+ renderWithCustomAds() {
4288
+ var h, u, l, p;
4289
+ const r = [], s = ((h = this.config) == null ? void 0 : h.customAdInterstitialInterval) || 0, a = ((u = this.config) == null ? void 0 : u.customAdInterstitialQuantity) || 1, o = ((l = this.config) == null ? void 0 : l.customAdStartQuantity) || 0, n = ((p = this.config) == null ? void 0 : p.customAdEndQuantity) || 0, c = this.searchClientResponseItems || [];
4290
+ for (let m = 0; m < o; m++)
4291
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m}-ad` }));
4292
+ c.forEach((m, b) => {
4293
+ if (s && b % s === 0 && b + s < c.length && b >= s)
4294
+ for (let v = 0; v < a; v++)
4295
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m.id}-ad-${v}` }));
4296
+ r.push(i("searchcraft-search-result", { key: m.id, "document-position": this.searchResultsPerPage * (this.searchResultsPage - 1) + b, index: b, item: m, template: this.template }));
4297
+ });
4298
+ for (let m = 0; m < n; m++)
4299
+ r.push(i("searchcraft-ad", { adSource: "Custom", adContainerId: Q(), key: `${m}-ad` }));
4300
+ return i("div", { class: "searchcraft-search-results" }, r);
4301
+ }
4302
+ renderWithNativoAds() {
4303
+ var u, l, p, m, b;
4304
+ const r = [], s = ((u = this.config) == null ? void 0 : u.nativoAdInterstialStartIndex) || 0, a = ((l = this.config) == null ? void 0 : l.nativoAdInterstitialInterval) || 0, o = ((p = this.config) == null ? void 0 : p.nativoAdInterstitialQuantity) || 1, n = ((m = this.config) == null ? void 0 : m.nativoAdStartQuantity) || 0, c = ((b = this.config) == null ? void 0 : b.nativoAdEndQuantity) || 0, h = this.searchClientResponseItems || [];
4305
+ for (let v = 0; v < n; v++)
4306
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v}-ad` }));
4307
+ h.forEach((v, T) => {
4308
+ if (a && (T + s) % a === 0 && T + a < h.length && T >= a)
4309
+ for (let H = 0; H < o; H++)
4310
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v.id}-ad-${H}` }));
4311
+ r.push(i("searchcraft-search-result", { key: v.id, "document-position": this.searchResultsPerPage * (this.searchResultsPage - 1) + T, index: T, item: v, template: this.template }));
4312
+ });
4313
+ for (let v = 0; v < c; v++)
4314
+ r.push(i("searchcraft-ad", { adSource: "Nativo", adContainerId: Q(), key: `${v}-ad` }));
4315
+ return i("div", { class: "searchcraft-search-results" }, r);
4316
+ }
4317
+ renderWithNoAds() {
4318
+ var r;
4319
+ return i("div", { class: "searchcraft-search-results" }, (r = this.searchClientResponseItems) == null ? void 0 : r.map((s, a) => i("searchcraft-search-result", { key: s.id, "document-position": this.searchResultsPerPage * (this.searchResultsPage - 1) + a, index: a, item: s, template: this.template })));
4320
+ }
4321
+ render() {
4322
+ var r;
4323
+ if (this.searchTerm.trim() === "")
4324
+ return this.renderEmptyState();
4325
+ if (this.searchTerm.length > 0 && (this.searchClientResponseItems || []).length === 0 && !this.isSearchInProgress)
4326
+ return this.renderNoResultsFoundState();
4327
+ switch (((r = this.config) == null ? void 0 : r.adSource) || "None") {
4328
+ case "adMarketplace":
4329
+ return this.renderWithADMAds();
4330
+ case "Custom":
4331
+ return this.renderWithCustomAds();
4332
+ case "Nativo":
4333
+ return this.renderWithNativoAds();
4334
+ default:
4335
+ return this.renderWithNoAds();
4336
+ }
4337
+ }
4338
+ }, [4, "searchcraft-search-results", {
4339
+ template: [16],
4340
+ searchTerm: [32],
4341
+ searchClientResponseItems: [32],
4342
+ adClientResponseItems: [32],
4343
+ searchResultsPerPage: [32],
4344
+ searchResultsPage: [32],
4345
+ isSearchInProgress: [32],
4346
+ config: [32]
4347
+ }]);
4348
+ function Hc() {
4349
+ if (typeof customElements > "u")
4350
+ return;
4351
+ ["searchcraft-search-results", "searchcraft-ad", "searchcraft-error-message", "searchcraft-search-result"].forEach((t) => {
4352
+ switch (t) {
4353
+ case "searchcraft-search-results":
4354
+ customElements.get(t) || customElements.define(t, ba);
4355
+ break;
4356
+ case "searchcraft-ad":
4357
+ customElements.get(t) || kt();
4358
+ break;
4359
+ case "searchcraft-error-message":
4360
+ customElements.get(t) || xt();
4361
+ break;
4362
+ case "searchcraft-search-result":
4363
+ customElements.get(t) || va();
4364
+ break;
4365
+ }
4366
+ });
4367
+ }
4368
+ const Uc = ba, ya = Hc, zc = /* @__PURE__ */ F(class extends O {
4369
+ constructor() {
4370
+ super();
4371
+ /**
4372
+ * The caption displayed below the select input.
4373
+ */
4374
+ d(this, "caption");
4375
+ /**
4376
+ * Whether the select input is disabled.
4377
+ */
4378
+ d(this, "disabled", !1);
4379
+ /**
4380
+ * The ID for the select input.
4381
+ */
4382
+ d(this, "inputId");
4383
+ /**
4384
+ * The label of the select input.
4385
+ */
4386
+ d(this, "label");
4387
+ /**
4388
+ * The ID for the label of the select input.
4389
+ */
4390
+ d(this, "labelId");
4391
+ /**
4392
+ * The name of the select input.
4393
+ */
4394
+ d(this, "name");
4395
+ /**
4396
+ * The options for the select input.
4397
+ */
4398
+ d(this, "options", []);
4399
+ /**
4400
+ * The event fired when the select is changed.
4401
+ */
4402
+ d(this, "selectChange");
4403
+ d(this, "searchResultsPerPage");
4404
+ d(this, "setSearchResultsPage", () => {
4405
+ });
4406
+ d(this, "setSearchResultsPerPage", () => {
4407
+ });
4408
+ d(this, "handleSelectChange", (r) => {
4409
+ this.selectChange.emit(r.target.value);
4410
+ });
4411
+ this.__registerHost(), this.selectChange = be(this, "selectChange");
4412
+ }
4413
+ handleGoToPage(r) {
4414
+ this.setSearchResultsPage(r);
4415
+ }
4416
+ render() {
4417
+ return i("div", { key: "15ecbf48c824a161cd83bdab99dace8e44f1ab39", class: "searchcraft-select" }, this.label && i("label", { key: "aba433ae9c27c9405099cffcef923c3ad22d7fda", class: "searchcraft-select-label", id: this.labelId || `${this.inputId}-label`, htmlFor: this.inputId }, this.label), i("div", { key: "8df8a2ff05924c9c55cdd6e3827cd927cddab82a", class: "searchcraft-select-input-wrapper" }, i("select", { key: "1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f", "aria-labelledby": this.label ? this.labelId || `${this.inputId}-label` : void 0, class: "searchcraft-select-input", disabled: this.disabled, id: this.inputId, name: this.name, onChange: this.handleSelectChange }, (typeof this.options == "string" ? JSON.parse(this.options) : this.options).map(({ label: r, value: s, selected: a }) => i("option", { key: s, value: s, selected: a }, r))), i("svg", { key: "0ec6892b529f2e70027aadea47208582a65a97b7", class: "searchcraft-select-input-icon", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("title", { key: "bced6b62378491d1d1c629b602d7d033d912c761" }, "Select dropdown icon"), i("path", { key: "659f8ebf9129e2e7941da949d29688c41c1472bb", d: "M5 7.5L10 12.5L15 7.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.caption && i("p", { key: "51217d926f68f79b6c3514f5fd769b56549fdce9", class: "searchcraft-select-caption" }, this.caption));
4418
+ }
4419
+ }, [0, "searchcraft-select", {
4420
+ caption: [1],
4421
+ disabled: [4],
4422
+ inputId: [1, "input-id"],
4423
+ label: [1],
4424
+ labelId: [1, "label-id"],
4425
+ name: [1],
4426
+ options: [1],
4427
+ searchResultsPerPage: [32],
4428
+ setSearchResultsPage: [32],
4429
+ setSearchResultsPerPage: [32]
4430
+ }]);
4431
+ function Ca() {
4432
+ if (typeof customElements > "u")
4433
+ return;
4434
+ ["searchcraft-select"].forEach((t) => {
4435
+ switch (t) {
4436
+ case "searchcraft-select":
4437
+ customElements.get(t) || customElements.define(t, zc);
4438
+ break;
4439
+ }
4440
+ });
4441
+ }
4442
+ const Sa = /* @__PURE__ */ F(class extends O {
4443
+ constructor() {
4444
+ super();
4445
+ /**
4446
+ * The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]).
4447
+ * The base value is defined by the `searchResultsPerPage` option in the configuration.
4448
+ */
4449
+ d(this, "increment", 20);
4450
+ // store vars
4451
+ d(this, "searchTerm");
4452
+ d(this, "searchResultsPage");
4453
+ d(this, "searchResultsPerPage");
4454
+ d(this, "searchResultsCount");
4455
+ d(this, "searchResultsPagesCount");
4456
+ // local vars
4457
+ d(this, "initialSearchResultsPerPage");
4458
+ // store functions
4459
+ d(this, "setSearchResultsPerPage", () => {
4460
+ });
4461
+ d(this, "setSearchResultsPage", () => {
4462
+ });
4463
+ d(this, "unsubscribe", () => {
4464
+ });
4465
+ this.__registerHost();
4466
+ }
4467
+ componentDidLoad() {
4468
+ this.unsubscribe = $.subscribe((r) => {
4469
+ this.searchTerm = r.searchTerm, this.searchResultsPerPage = r.searchResultsPerPage, this.searchResultsPage = r.searchResultsPage, this.searchResultsCount = r.searchResultsCount, this.searchResultsPagesCount = Math.ceil(this.searchResultsCount / this.searchResultsPerPage), this.setSearchResultsPage = r.setSearchResultsPage, this.setSearchResultsPerPage = r.setSearchResultsPerPage;
4470
+ }), this.initialSearchResultsPerPage = $.getState().searchResultsPerPage;
4471
+ }
4472
+ disconnectedCallback() {
4473
+ var r;
4474
+ (r = this.unsubscribe) == null || r.call(this);
4475
+ }
4476
+ render() {
4477
+ if (!(!this.searchTerm || this.searchResultsPagesCount <= 1))
4478
+ return i("div", { class: "searchcraft-search-results-per-page" }, i("div", { class: "searchcraft-search-results-per-page-select" }, i("label", { class: "searchcraft-search-results-per-page-select-label", htmlFor: "searchcraft-search-results-per-page-select-input" }, "Results Per Page"), i("div", { class: "searchcraft-search-results-per-page-select-input" }, i("searchcraft-select", { inputId: "searchcraft-search-results-per-page-select-input", name: "results-per-page", options: [...Array(5)].map((r, s) => {
4479
+ const a = this.initialSearchResultsPerPage + Number(this.increment) * s;
4480
+ return {
4481
+ label: `${a}`,
4482
+ value: a
4483
+ };
4484
+ }), onSelectChange: (r) => {
4485
+ this.setSearchResultsPerPage(Number(r.detail)), this.setSearchResultsPage(1);
4486
+ } }))));
4487
+ }
4488
+ }, [0, "searchcraft-search-results-per-page", {
4489
+ increment: [8],
4490
+ searchTerm: [32],
4491
+ searchResultsPage: [32],
4492
+ searchResultsPerPage: [32],
4493
+ searchResultsCount: [32],
4494
+ searchResultsPagesCount: [32],
4495
+ initialSearchResultsPerPage: [32],
4496
+ setSearchResultsPerPage: [32],
4497
+ setSearchResultsPage: [32]
4498
+ }]);
4499
+ function jc() {
4500
+ if (typeof customElements > "u")
4501
+ return;
4502
+ ["searchcraft-search-results-per-page", "searchcraft-select"].forEach((t) => {
4503
+ switch (t) {
4504
+ case "searchcraft-search-results-per-page":
4505
+ customElements.get(t) || customElements.define(t, Sa);
4506
+ break;
4507
+ case "searchcraft-select":
4508
+ customElements.get(t) || Ca();
4509
+ break;
4510
+ }
4511
+ });
4512
+ }
4513
+ const Vc = Sa, ka = jc, Bc = Ca, Wc = Js, Gc = `[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-adm-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-ad:last-child .searchcraft-adm-ad{border-bottom:none}.searchcraft-adm-ad-link{align-items:flex-start;background-color:rgb(from blue r g b/5%);color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-adm-ad-link:focus,.searchcraft-adm-ad-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-adm-ad-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-adm-ad-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-adm-ad-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-adm-ad-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-adm-ad-content-title,.searchcraft-adm-ad-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-adm-ad-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-adm-ad-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:6px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-brand);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius-sm);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:block}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:block}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset}.searchcraft-popover-form-input-cancel-button{background:none;border:none;cursor:pointer}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal searchcraft-popover-list-view{flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);border-radius:var(--sc-border-radius-2xl);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-input-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px 12px}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-input-cancel-button{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 32px;box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro",sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
4514
+ `, wa = /* @__PURE__ */ F(class extends O {
4515
+ constructor() {
4516
+ super(), this.__registerHost();
4517
+ }
4518
+ render() {
4519
+ return i("style", { key: "912dbad4e0aa5be21ed638cd20c276b530991454" }, Gc);
4520
+ }
4521
+ }, [0, "searchcraft-theme"]);
4522
+ function qc() {
4523
+ if (typeof customElements > "u")
4524
+ return;
4525
+ ["searchcraft-theme"].forEach((t) => {
4526
+ switch (t) {
4527
+ case "searchcraft-theme":
4528
+ customElements.get(t) || customElements.define(t, wa);
4529
+ break;
4530
+ }
4531
+ });
4532
+ }
4533
+ const Yc = wa, xa = qc, Zc = ea, Kc = () => {
4534
+ nc(), cc(), lc(), mc(), ra(), na(), wc(), ca(), la(), $c(), pa(), Mc(), Lc(), ga(), Nc(), ka(), ya(), Bc(), Wc(), xa(), Zc();
4535
+ };
4536
+ globalThis.__scDefineCustomElements__ = Kc;
4537
+ const Qc = "@searchcraft/react-sdk", Xc = "0.10.1", vs = {
4538
+ name: Qc,
4539
+ version: Xc
4540
+ };
4541
+ /**
4542
+ * @license
4543
+ * Copyright 2018 Google LLC
4544
+ * SPDX-License-Identifier: BSD-3-Clause
4545
+ */
4546
+ const Jc = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), bs = /* @__PURE__ */ new WeakMap(), ys = (e, t, r, s, a) => {
4547
+ const o = a == null ? void 0 : a[t];
4548
+ o === void 0 ? (e[t] = r, r == null && t in HTMLElement.prototype && e.removeAttribute(t)) : r !== s && ((n, c, h) => {
4549
+ let u = bs.get(n);
4550
+ u === void 0 && bs.set(n, u = /* @__PURE__ */ new Map());
4551
+ let l = u.get(c);
4552
+ h !== void 0 ? l === void 0 ? (u.set(c, l = { handleEvent: h }), n.addEventListener(c, l)) : l.handleEvent = h : l !== void 0 && (u.delete(c), n.removeEventListener(c, l));
4553
+ })(e, o, r);
4554
+ }, ei = ({ react: e, tagName: t, elementClass: r, events: s, displayName: a }) => {
4555
+ const o = new Set(Object.keys(s ?? {})), n = e.forwardRef((c, h) => {
4556
+ const u = e.useRef(/* @__PURE__ */ new Map()), l = e.useRef(null), p = {}, m = {};
4557
+ for (const [b, v] of Object.entries(c)) Jc.has(b) ? p[b === "className" ? "class" : b] = v : o.has(b) || b in r.prototype ? m[b] = v : p[b] = v;
4558
+ return e.useLayoutEffect(() => {
4559
+ if (l.current === null) return;
4560
+ const b = /* @__PURE__ */ new Map();
4561
+ for (const v in m) ys(l.current, v, c[v], u.current.get(v), s), u.current.delete(v), b.set(v, c[v]);
4562
+ for (const [v, T] of u.current) ys(l.current, v, void 0, T, s);
4563
+ u.current = b;
4564
+ }), e.useLayoutEffect(() => {
4565
+ var b;
4566
+ (b = l.current) == null || b.removeAttribute("defer-hydration");
4567
+ }, []), p.suppressHydrationWarning = !0, e.createElement(t, { ...p, ref: e.useCallback((b) => {
4568
+ l.current = b, typeof h == "function" ? h(b) : h !== null && (h.current = b);
4569
+ }, [h]) });
4570
+ });
4571
+ return n.displayName = a ?? r.name, n;
4572
+ }, ve = ({
4573
+ defineCustomElement: e,
4574
+ ...t
4575
+ }) => (typeof e < "u" && e(), ei(t)), ti = /* @__PURE__ */ ve({
4576
+ tagName: "searchcraft-filter-panel",
4577
+ elementClass: Cc,
4578
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4579
+ react: ge,
4580
+ events: {},
4581
+ defineCustomElement: ra
4582
+ }), ri = /* @__PURE__ */ ve({
4583
+ tagName: "searchcraft-input-form",
4584
+ elementClass: kc,
4585
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4586
+ react: ge,
4587
+ events: {
4588
+ onInputFocus: "inputFocus",
4589
+ onInputBlur: "inputBlur",
4590
+ onInputInit: "inputInit"
4591
+ },
4592
+ defineCustomElement: na
4593
+ }), si = /* @__PURE__ */ ve({
4594
+ tagName: "searchcraft-pagination",
4595
+ elementClass: Ec,
4596
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4597
+ react: ge,
4598
+ events: {},
4599
+ defineCustomElement: ca
4600
+ }), ai = /* @__PURE__ */ ve({
4601
+ tagName: "searchcraft-popover-button",
4602
+ elementClass: Tc,
4603
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4604
+ react: ge,
4605
+ events: {},
4606
+ defineCustomElement: la
4607
+ }), ni = /* @__PURE__ */ ve({
4608
+ tagName: "searchcraft-popover-form",
4609
+ elementClass: Ic,
4610
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4611
+ react: ge,
4612
+ events: {},
4613
+ defineCustomElement: pa
4614
+ }), oi = /* @__PURE__ */ ve({
4615
+ tagName: "searchcraft-results-info",
4616
+ elementClass: Fc,
4617
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4618
+ react: ge,
4619
+ events: {},
4620
+ defineCustomElement: ga
4621
+ }), ci = /* @__PURE__ */ ve({
4622
+ tagName: "searchcraft-search-results",
4623
+ elementClass: Uc,
4624
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4625
+ react: ge,
4626
+ events: {},
4627
+ defineCustomElement: ya
4628
+ }), ii = /* @__PURE__ */ ve({
4629
+ tagName: "searchcraft-search-results-per-page",
4630
+ elementClass: Vc,
4631
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4632
+ react: ge,
4633
+ events: {},
4634
+ defineCustomElement: ka
4635
+ }), li = /* @__PURE__ */ ve({
4636
+ tagName: "searchcraft-theme",
4637
+ elementClass: Yc,
4638
+ // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
4639
+ react: ge,
4640
+ events: {},
4641
+ defineCustomElement: xa
4642
+ }), Li = (e) => /* @__PURE__ */ me(ti, { ...e }), Oi = (e) => /* @__PURE__ */ me(ri, { ...e }), Fi = (e) => /* @__PURE__ */ me(ai, { ...e }), Di = (e) => /* @__PURE__ */ me(ni, { ...e }), Ni = (e) => /* @__PURE__ */ me(oi, { ...e }), Hi = (e) => /* @__PURE__ */ me(li, { ...e }), Ui = (e) => /* @__PURE__ */ me(si, { ...e }), zi = (e) => /* @__PURE__ */ me(ii, { ...e }), ji = (e) => /* @__PURE__ */ me(ci, { ...e });
4643
+ class Vi extends Oo {
4644
+ constructor(t) {
4645
+ super(t, {
4646
+ sdkName: vs.name,
4647
+ sdkVersion: vs.version
4648
+ });
4649
+ }
4650
+ }
4651
+ export {
4652
+ Vi as Searchcraft,
4653
+ Li as SearchcraftFilterPanel,
4654
+ Oi as SearchcraftInputForm,
4655
+ Ui as SearchcraftPagination,
4656
+ Fi as SearchcraftPopoverButton,
4657
+ Di as SearchcraftPopoverForm,
4658
+ Ni as SearchcraftResultsInfo,
4659
+ ji as SearchcraftSearchResults,
4660
+ zi as SearchcraftSearchResultsPerPage,
4661
+ Hi as SearchcraftTheme,
4662
+ Kc as defineCustomElements
4663
+ };
4664
+ //# sourceMappingURL=index.js.map