@searchstax-inc/searchstudio-ux-react 0.3.1 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/@searchstax-inc/components/SearchstaxWrapper.d.ts +1 -0
- package/dist/@searchstax-inc/searchstudio-ux-react.cjs +14 -18
- package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +17 -21
- package/dist/@searchstax-inc/searchstudio-ux-react.mjs +567 -526
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import nt, { useState as
|
|
2
|
-
var
|
|
1
|
+
import nt, { useState as q, useEffect as ee, useRef as Ft, createRef as et } from "react";
|
|
2
|
+
var Pe = { exports: {} }, le = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -15,15 +15,15 @@ function Ot() {
|
|
|
15
15
|
return le;
|
|
16
16
|
tt = 1;
|
|
17
17
|
var i = nt, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function c(l,
|
|
19
|
-
var g, m = {},
|
|
20
|
-
d !== void 0 && (
|
|
21
|
-
for (g in
|
|
22
|
-
s.call(
|
|
18
|
+
function c(l, o, d) {
|
|
19
|
+
var g, m = {}, f = null, S = null;
|
|
20
|
+
d !== void 0 && (f = "" + d), o.key !== void 0 && (f = "" + o.key), o.ref !== void 0 && (S = o.ref);
|
|
21
|
+
for (g in o)
|
|
22
|
+
s.call(o, g) && !r.hasOwnProperty(g) && (m[g] = o[g]);
|
|
23
23
|
if (l && l.defaultProps)
|
|
24
|
-
for (g in
|
|
25
|
-
m[g] === void 0 && (m[g] =
|
|
26
|
-
return { $$typeof: e, type: l, key:
|
|
24
|
+
for (g in o = l.defaultProps, o)
|
|
25
|
+
m[g] === void 0 && (m[g] = o[g]);
|
|
26
|
+
return { $$typeof: e, type: l, key: f, ref: S, props: m, _owner: a.current };
|
|
27
27
|
}
|
|
28
28
|
return le.Fragment = t, le.jsx = c, le.jsxs = c, le;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ var oe = {};
|
|
|
40
40
|
var at;
|
|
41
41
|
function Mt() {
|
|
42
42
|
return at || (at = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var i = nt, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"),
|
|
43
|
+
var i = nt, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), O = Symbol.iterator, R = "@@iterator";
|
|
44
44
|
function k(n) {
|
|
45
45
|
if (n === null || typeof n != "object")
|
|
46
46
|
return null;
|
|
@@ -52,23 +52,23 @@ function Mt() {
|
|
|
52
52
|
{
|
|
53
53
|
for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), L = 1; L < p; L++)
|
|
54
54
|
y[L - 1] = arguments[L];
|
|
55
|
-
|
|
55
|
+
N("error", n, y);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function N(n, p, y) {
|
|
59
59
|
{
|
|
60
60
|
var L = E.ReactDebugCurrentFrame, F = L.getStackAddendum();
|
|
61
61
|
F !== "" && (p += "%s", y = y.concat([F]));
|
|
62
|
-
var M = y.map(function(
|
|
63
|
-
return String(
|
|
62
|
+
var M = y.map(function(I) {
|
|
63
|
+
return String(I);
|
|
64
64
|
});
|
|
65
65
|
M.unshift("Warning: " + p), Function.prototype.apply.call(console[n], console, M);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var B = !1, A = !1, Q = !1, v = !1, b = !1, j;
|
|
69
69
|
j = Symbol.for("react.module.reference");
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof n == "string" || typeof n == "function" || n === s || n === r || b || n === a || n === d || n === g ||
|
|
70
|
+
function _(n) {
|
|
71
|
+
return !!(typeof n == "string" || typeof n == "function" || n === s || n === r || b || n === a || n === d || n === g || v || n === S || B || A || Q || typeof n == "object" && n !== null && (n.$$typeof === f || n.$$typeof === m || n.$$typeof === c || n.$$typeof === l || n.$$typeof === o || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
@@ -113,15 +113,15 @@ function Mt() {
|
|
|
113
113
|
case c:
|
|
114
114
|
var y = n;
|
|
115
115
|
return pe(y._context) + ".Provider";
|
|
116
|
-
case
|
|
116
|
+
case o:
|
|
117
117
|
return G(n, n.render, "ForwardRef");
|
|
118
118
|
case m:
|
|
119
119
|
var L = n.displayName || null;
|
|
120
120
|
return L !== null ? L : K(n.type) || "Memo";
|
|
121
|
-
case
|
|
122
|
-
var F = n, M = F._payload,
|
|
121
|
+
case f: {
|
|
122
|
+
var F = n, M = F._payload, I = F._init;
|
|
123
123
|
try {
|
|
124
|
-
return K(
|
|
124
|
+
return K(I(M));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function Mt() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var Y = Object.assign, ne = 0, Fe, Oe, Me, Ae,
|
|
132
|
+
var Y = Object.assign, ne = 0, Fe, Oe, Me, Ae, De, Ne, $e;
|
|
133
133
|
function qe() {
|
|
134
134
|
}
|
|
135
135
|
qe.__reactDisabledLog = !0;
|
|
136
136
|
function ct() {
|
|
137
137
|
{
|
|
138
138
|
if (ne === 0) {
|
|
139
|
-
Fe = console.log, Oe = console.info, Me = console.warn, Ae = console.error,
|
|
139
|
+
Fe = console.log, Oe = console.info, Me = console.warn, Ae = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
|
|
140
140
|
var n = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -178,10 +178,10 @@ function Mt() {
|
|
|
178
178
|
value: Ae
|
|
179
179
|
}),
|
|
180
180
|
group: Y({}, n, {
|
|
181
|
-
value:
|
|
181
|
+
value: De
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: Y({}, n, {
|
|
184
|
-
value:
|
|
184
|
+
value: Ne
|
|
185
185
|
}),
|
|
186
186
|
groupEnd: Y({}, n, {
|
|
187
187
|
value: $e
|
|
@@ -226,27 +226,27 @@ function Mt() {
|
|
|
226
226
|
M = be.current, be.current = null, ct();
|
|
227
227
|
try {
|
|
228
228
|
if (p) {
|
|
229
|
-
var
|
|
229
|
+
var I = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(I.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
238
|
+
Reflect.construct(I, []);
|
|
239
239
|
} catch (X) {
|
|
240
240
|
L = X;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(n, [],
|
|
242
|
+
Reflect.construct(n, [], I);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
245
|
+
I.call();
|
|
246
246
|
} catch (X) {
|
|
247
247
|
L = X;
|
|
248
248
|
}
|
|
249
|
-
n.call(
|
|
249
|
+
n.call(I.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
@@ -260,18 +260,18 @@ function Mt() {
|
|
|
260
260
|
if (X && L && typeof X.stack == "string") {
|
|
261
261
|
for (var w = X.stack.split(`
|
|
262
262
|
`), V = L.stack.split(`
|
|
263
|
-
`), $ = w.length - 1,
|
|
264
|
-
|
|
265
|
-
for (; $ >= 1 &&
|
|
266
|
-
if (w[$] !== V[
|
|
267
|
-
if ($ !== 1 ||
|
|
263
|
+
`), $ = w.length - 1, H = V.length - 1; $ >= 1 && H >= 0 && w[$] !== V[H]; )
|
|
264
|
+
H--;
|
|
265
|
+
for (; $ >= 1 && H >= 0; $--, H--)
|
|
266
|
+
if (w[$] !== V[H]) {
|
|
267
|
+
if ($ !== 1 || H !== 1)
|
|
268
268
|
do
|
|
269
|
-
if ($--,
|
|
269
|
+
if ($--, H--, H < 0 || w[$] !== V[H]) {
|
|
270
270
|
var z = `
|
|
271
271
|
` + w[$].replace(" at new ", " at ");
|
|
272
272
|
return n.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", n.displayName)), typeof n == "function" && fe.set(n, z), z;
|
|
273
273
|
}
|
|
274
|
-
while ($ >= 1 &&
|
|
274
|
+
while ($ >= 1 && H >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -303,11 +303,11 @@ function Mt() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof n == "object")
|
|
305
305
|
switch (n.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case o:
|
|
307
307
|
return ht(n.render);
|
|
308
308
|
case m:
|
|
309
309
|
return ve(n.type, p, y);
|
|
310
|
-
case
|
|
310
|
+
case f: {
|
|
311
311
|
var L = n, F = L._payload, M = L._init;
|
|
312
312
|
try {
|
|
313
313
|
return ve(M(F), p, y);
|
|
@@ -328,19 +328,19 @@ function Mt() {
|
|
|
328
328
|
function dt(n, p, y, L, F) {
|
|
329
329
|
{
|
|
330
330
|
var M = Function.call.bind(ye);
|
|
331
|
-
for (var
|
|
332
|
-
if (M(n,
|
|
331
|
+
for (var I in n)
|
|
332
|
+
if (M(n, I)) {
|
|
333
333
|
var w = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof n[
|
|
336
|
-
var V = Error((L || "React class") + ": " + y + " type `" +
|
|
335
|
+
if (typeof n[I] != "function") {
|
|
336
|
+
var V = Error((L || "React class") + ": " + y + " type `" + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[I] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw V.name = "Invariant Violation", V;
|
|
338
338
|
}
|
|
339
|
-
w = n[
|
|
339
|
+
w = n[I](p, I, L, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch ($) {
|
|
341
341
|
w = $;
|
|
342
342
|
}
|
|
343
|
-
w && !(w instanceof Error) && (xe(F), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", L || "React class", y,
|
|
343
|
+
w && !(w instanceof Error) && (xe(F), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", L || "React class", y, I, typeof w), xe(null)), w instanceof Error && !(w.message in He) && (He[w.message] = !0, xe(F), T("Failed %s type: %s", y, w.message), xe(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -419,7 +419,7 @@ function Mt() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var St = function(n, p, y, L, F, M,
|
|
422
|
+
var St = function(n, p, y, L, F, M, I) {
|
|
423
423
|
var w = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: e,
|
|
@@ -427,7 +427,7 @@ function Mt() {
|
|
|
427
427
|
type: n,
|
|
428
428
|
key: p,
|
|
429
429
|
ref: y,
|
|
430
|
-
props:
|
|
430
|
+
props: I,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
432
|
_owner: M
|
|
433
433
|
};
|
|
@@ -450,20 +450,20 @@ function Mt() {
|
|
|
450
450
|
};
|
|
451
451
|
function Lt(n, p, y, L, F) {
|
|
452
452
|
{
|
|
453
|
-
var M,
|
|
453
|
+
var M, I = {}, w = null, V = null;
|
|
454
454
|
y !== void 0 && (Ve(y), w = "" + y), yt(p) && (Ve(p.key), w = "" + p.key), vt(p) && (V = p.ref, xt(p, F));
|
|
455
455
|
for (M in p)
|
|
456
|
-
ye.call(p, M) && !ft.hasOwnProperty(M) && (
|
|
456
|
+
ye.call(p, M) && !ft.hasOwnProperty(M) && (I[M] = p[M]);
|
|
457
457
|
if (n && n.defaultProps) {
|
|
458
458
|
var $ = n.defaultProps;
|
|
459
459
|
for (M in $)
|
|
460
|
-
|
|
460
|
+
I[M] === void 0 && (I[M] = $[M]);
|
|
461
461
|
}
|
|
462
462
|
if (w || V) {
|
|
463
|
-
var
|
|
464
|
-
w && bt(
|
|
463
|
+
var H = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
464
|
+
w && bt(I, H), V && Ct(I, H);
|
|
465
465
|
}
|
|
466
|
-
return St(n, w, V, F, L, ce.current,
|
|
466
|
+
return St(n, w, V, F, L, ce.current, I);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var ke = E.ReactCurrentOwner, Ke = E.ReactDebugCurrentFrame;
|
|
@@ -542,8 +542,8 @@ Check the top-level render call using <` + y + ">.");
|
|
|
542
542
|
else if (n) {
|
|
543
543
|
var F = k(n);
|
|
544
544
|
if (typeof F == "function" && F !== n.entries)
|
|
545
|
-
for (var M = F.call(n),
|
|
546
|
-
we(
|
|
545
|
+
for (var M = F.call(n), I; !(I = M.next()).done; )
|
|
546
|
+
we(I.value) && Ye(I.value, p);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -555,7 +555,7 @@ Check the top-level render call using <` + y + ">.");
|
|
|
555
555
|
var y;
|
|
556
556
|
if (typeof p == "function")
|
|
557
557
|
y = p.propTypes;
|
|
558
|
-
else if (typeof p == "object" && (p.$$typeof ===
|
|
558
|
+
else if (typeof p == "object" && (p.$$typeof === o || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
560
|
p.$$typeof === m))
|
|
561
561
|
y = p.propTypes;
|
|
@@ -586,8 +586,8 @@ Check the top-level render call using <` + y + ">.");
|
|
|
586
586
|
}
|
|
587
587
|
function Xe(n, p, y, L, F, M) {
|
|
588
588
|
{
|
|
589
|
-
var
|
|
590
|
-
if (!
|
|
589
|
+
var I = _(n);
|
|
590
|
+
if (!I) {
|
|
591
591
|
var w = "";
|
|
592
592
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
593
|
var V = Tt(F);
|
|
@@ -595,10 +595,10 @@ Check the top-level render call using <` + y + ">.");
|
|
|
595
595
|
var $;
|
|
596
596
|
n === null ? $ = "null" : Le(n) ? $ = "array" : n !== void 0 && n.$$typeof === e ? ($ = "<" + (K(n.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof n, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
|
|
597
597
|
}
|
|
598
|
-
var
|
|
599
|
-
if (
|
|
600
|
-
return
|
|
601
|
-
if (
|
|
598
|
+
var H = Lt(n, p, y, F, M);
|
|
599
|
+
if (H == null)
|
|
600
|
+
return H;
|
|
601
|
+
if (I) {
|
|
602
602
|
var z = p.children;
|
|
603
603
|
if (z !== void 0)
|
|
604
604
|
if (L)
|
|
@@ -611,22 +611,22 @@ Check the top-level render call using <` + y + ">.");
|
|
|
611
611
|
else
|
|
612
612
|
Ge(z, n);
|
|
613
613
|
}
|
|
614
|
-
return n === s ? wt(
|
|
614
|
+
return n === s ? wt(H) : Rt(H), H;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function Et(n, p, y) {
|
|
618
618
|
return Xe(n, p, y, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function It(n, p, y) {
|
|
621
621
|
return Xe(n, p, y, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
oe.Fragment = s, oe.jsx =
|
|
623
|
+
var Pt = It, jt = Et;
|
|
624
|
+
oe.Fragment = s, oe.jsx = Pt, oe.jsxs = jt;
|
|
625
625
|
}()), oe;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
class
|
|
627
|
+
process.env.NODE_ENV === "production" ? Pe.exports = Ot() : Pe.exports = Mt();
|
|
628
|
+
var u = Pe.exports, At = Object.defineProperty, Dt = (i, e, t) => e in i ? At(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, h = (i, e, t) => (Dt(i, typeof e != "symbol" ? e + "" : e, t), t), W = /* @__PURE__ */ ((i) => (i[i.mustache = 0] = "mustache", i[i.vue = 1] = "vue", i[i.react = 2] = "react", i[i.angular = 3] = "angular", i))(W || {});
|
|
629
|
+
class Nt {
|
|
630
630
|
constructor(e) {
|
|
631
631
|
h(this, "dataLayer"), this.dataLayer = e;
|
|
632
632
|
}
|
|
@@ -641,6 +641,14 @@ class Dt {
|
|
|
641
641
|
get resultsPerPage() {
|
|
642
642
|
return this.dataLayer.searchObject.itemsPerPage || 0;
|
|
643
643
|
}
|
|
644
|
+
get sortOptions() {
|
|
645
|
+
var e;
|
|
646
|
+
return ((e = this.dataLayer.searchResultsMetadata) == null ? void 0 : e.sorting.options) || [];
|
|
647
|
+
}
|
|
648
|
+
get selectedSortOption() {
|
|
649
|
+
var e;
|
|
650
|
+
return ((e = this.dataLayer.searchResultsMetadata) == null ? void 0 : e.sorting.selectedSortOption) || "";
|
|
651
|
+
}
|
|
644
652
|
get startResultIndex() {
|
|
645
653
|
var e;
|
|
646
654
|
return (((e = this.dataLayer.searchObject) == null ? void 0 : e.page) - 1) * this.resultsPerPage + 1;
|
|
@@ -701,7 +709,7 @@ class Dt {
|
|
|
701
709
|
return t ? (((e = this.dataLayer.searchObject) == null ? void 0 : e.facets) ?? []).map((s) => {
|
|
702
710
|
const a = s.name, r = s.value, c = t.find((l) => l.name === a);
|
|
703
711
|
if (c) {
|
|
704
|
-
const l = c.values.find((
|
|
712
|
+
const l = c.values.find((o) => o.type === "range" ? !1 : o.type === "checkbox" ? '"' + o.value + '"' === r : !1);
|
|
705
713
|
if (l)
|
|
706
714
|
return l;
|
|
707
715
|
}
|
|
@@ -741,7 +749,9 @@ class Dt {
|
|
|
741
749
|
shouldShowAnswer: this.shouldShowAnswer,
|
|
742
750
|
isInfiniteScroll: this.isInfiniteScroll,
|
|
743
751
|
percentageOfResultsLoaded: this.percentageOfResultsLoaded,
|
|
744
|
-
firstSearchHappened: this.firstSearchHappened
|
|
752
|
+
firstSearchHappened: this.firstSearchHappened,
|
|
753
|
+
sortOptions: this.sortOptions,
|
|
754
|
+
selectedSortOption: this.selectedSortOption
|
|
745
755
|
};
|
|
746
756
|
}
|
|
747
757
|
get trackingData() {
|
|
@@ -749,7 +759,7 @@ class Dt {
|
|
|
749
759
|
return {
|
|
750
760
|
searchTerm: this.dataLayer.searchTerm !== "undefined" ? this.dataLayer.searchTerm : "",
|
|
751
761
|
trackApiKey: ((e = this.dataLayer.searchstaxConfig) == null ? void 0 : e.trackApiKey) ?? "",
|
|
752
|
-
session: this.dataLayer.
|
|
762
|
+
session: this.dataLayer.sessionIdValue,
|
|
753
763
|
language: this.dataLayer.language,
|
|
754
764
|
recordsPerPage: ((t = this.dataLayer.searchResultsMetadata) == null ? void 0 : t.recordsPerPageValue) ?? 0,
|
|
755
765
|
totalResults: ((s = this.dataLayer.searchResultsMetadata) == null ? void 0 : s.totalResultsValue) ?? 0,
|
|
@@ -764,8 +774,8 @@ class J {
|
|
|
764
774
|
if (s.length !== a.length)
|
|
765
775
|
return !1;
|
|
766
776
|
for (const r of s) {
|
|
767
|
-
const c = e[r], l = t[r],
|
|
768
|
-
if (
|
|
777
|
+
const c = e[r], l = t[r], o = this.isObject(c) && this.isObject(l);
|
|
778
|
+
if (o && !this.deepEqual(c, l) || !o && c !== l)
|
|
769
779
|
return !1;
|
|
770
780
|
}
|
|
771
781
|
return !0;
|
|
@@ -774,7 +784,7 @@ class J {
|
|
|
774
784
|
return e != null && typeof e == "object";
|
|
775
785
|
}
|
|
776
786
|
}
|
|
777
|
-
class
|
|
787
|
+
class D {
|
|
778
788
|
constructor(e) {
|
|
779
789
|
h(this, "value"), h(this, "observers", []), this.value = e, this.observers = [];
|
|
780
790
|
}
|
|
@@ -796,12 +806,12 @@ class N {
|
|
|
796
806
|
}
|
|
797
807
|
}
|
|
798
808
|
class Ee {
|
|
799
|
-
static getOrSetCookie(e) {
|
|
800
|
-
let
|
|
801
|
-
return
|
|
809
|
+
static getOrSetCookie(e, t) {
|
|
810
|
+
let s = this.getCookie(e);
|
|
811
|
+
return s == null && (s = t ?? this.makeid(25), this.setCookie(e, s, {
|
|
802
812
|
secure: !0,
|
|
803
813
|
"max-age": 3600
|
|
804
|
-
})),
|
|
814
|
+
})), s;
|
|
805
815
|
}
|
|
806
816
|
static deleteCookie(e) {
|
|
807
817
|
this.getCookie(e) && this.setCookie(e, "", {
|
|
@@ -843,20 +853,20 @@ class Z {
|
|
|
843
853
|
}
|
|
844
854
|
}
|
|
845
855
|
class $t {
|
|
846
|
-
constructor(e) {
|
|
847
|
-
h(this, "$searchTermChange", new
|
|
856
|
+
constructor(e, t) {
|
|
857
|
+
h(this, "$searchTermChange", new D("")), h(this, "$loadingChange", new D(!1)), h(this, "$searchResults", new D(null)), h(this, "$searchResultsMetadata", new D(null)), h(this, "$searchAutosuggest", new D(null)), h(this, "$searchFacets", new D(null)), h(this, "$searchFacetsCached", new D(null)), h(this, "$searchstaxConfig", new D(null)), h(this, "$autosuggestResults", new D(null)), h(this, "$searchObject", new D({
|
|
848
858
|
query: "",
|
|
849
859
|
itemsPerPage: null,
|
|
850
860
|
page: 99999999,
|
|
851
861
|
order: "",
|
|
852
862
|
facets: [],
|
|
853
863
|
additionalProps: []
|
|
854
|
-
})), h(this, "$searchRelatedSearches", new
|
|
855
|
-
this.cookieHandlingCallback();
|
|
864
|
+
})), h(this, "$searchRelatedSearches", new D(null)), h(this, "$searchInputConfig", new D(null)), h(this, "$searchExternalPromotions", new D(null)), h(this, "$facetsTemplateData", new D(null)), h(this, "$selectedFacetsTemplateData", new D(null)), h(this, "$paginationData", new D(null)), h(this, "$searchFeedbackData", new D(null)), h(this, "$searchSortingData", new D(null)), h(this, "$searchRelatedSearchesData", new D(null)), h(this, "$searchExternalPromotionsData", new D(null)), h(this, "$cookiesDisabled", new D(null)), h(this, "$answer", new D("")), h(this, "$language", new D("en")), h(this, "currentPageValue", 1), h(this, "isAnswerWidgetCreatedValue", !1), h(this, "renderingEngineValue", W.mustache), h(this, "parsedData", new Nt(this)), h(this, "sessionId"), h(this, "sessionIdValue", null), h(this, "autoCorrect", !0), h(this, "forceNotCorrect", !1), h(this, "lastSearchValue", ""), h(this, "turnAIAnswerGenerationOn", !1), h(this, "isInfiniteScroll", !1), h(this, "firstSearchHappened", !1), h(this, "facetsWereSet", !1), this.sessionId = e, t && (this.sessionIdValue = t), this.cookieHandlingCallback(t), this.$cookiesDisabled.subscribe(() => {
|
|
865
|
+
this.cookieHandlingCallback(t);
|
|
856
866
|
});
|
|
857
867
|
}
|
|
858
|
-
cookieHandlingCallback() {
|
|
859
|
-
this.cookiesDisabled ? (Ee.deleteCookie(this.sessionId), Ee.deleteCookie("ms_visitorid")) : Ee.getOrSetCookie(this.sessionId);
|
|
868
|
+
cookieHandlingCallback(e) {
|
|
869
|
+
this.cookiesDisabled ? (this.sessionIdValue = null, Ee.deleteCookie(this.sessionId), Ee.deleteCookie("ms_visitorid")) : this.sessionIdValue = Ee.getOrSetCookie(this.sessionId, e);
|
|
860
870
|
}
|
|
861
871
|
setIsInfiniteScroll(e) {
|
|
862
872
|
this.isInfiniteScroll = e;
|
|
@@ -1025,25 +1035,25 @@ class $t {
|
|
|
1025
1035
|
}
|
|
1026
1036
|
class he {
|
|
1027
1037
|
static combineResultsWithMetadata(e) {
|
|
1028
|
-
const t = [], s = parseInt(e.response.start + "") - 1
|
|
1029
|
-
return e.response.docs.forEach((
|
|
1030
|
-
const
|
|
1038
|
+
const t = [], s = parseInt(e.response.start + "") - 1;
|
|
1039
|
+
return parseInt(e.responseHeader.params.rows), e.response.docs.forEach((a, r) => {
|
|
1040
|
+
const c = {
|
|
1031
1041
|
custom: null,
|
|
1032
|
-
uniqueId:
|
|
1033
|
-
position: s
|
|
1034
|
-
ribbon: this.doesMapExist("ribbon", e) ? this.getValueByKey("ribbon",
|
|
1035
|
-
paths: this.doesMapExist("paths", e) ? this.getValueByKey("paths",
|
|
1036
|
-
url: this.doesMapExist("url", e) ? this.getValueByKey("url",
|
|
1037
|
-
title: this.doesMapExist("title", e) ? this.getValueByKey("title",
|
|
1038
|
-
promoted:
|
|
1039
|
-
thumbnail: this.doesMapExist("thumbnail", e) ? this.getValueByKey("thumbnail",
|
|
1040
|
-
date: this.doesMapExist("date", e) ? this.getValueByKey("date",
|
|
1041
|
-
snippet: this.doesMapExist("snippet", e) ? this.getValueByKey("snippet",
|
|
1042
|
-
description: this.doesMapExist("description", e) ? this.getValueByKey("description",
|
|
1043
|
-
unmappedFields: this.getUnmappedFields(
|
|
1044
|
-
allFields: this.getAllFields(
|
|
1042
|
+
uniqueId: a[e.responseHeader.params.uniqueId] ?? "",
|
|
1043
|
+
position: s + 1 + r,
|
|
1044
|
+
ribbon: this.doesMapExist("ribbon", e) ? this.getValueByKey("ribbon", a, e) : null,
|
|
1045
|
+
paths: this.doesMapExist("paths", e) ? this.getValueByKey("paths", a, e) : null,
|
|
1046
|
+
url: this.doesMapExist("url", e) ? this.getValueByKey("url", a, e) : null,
|
|
1047
|
+
title: this.doesMapExist("title", e) ? this.getValueByKey("title", a, e) : null,
|
|
1048
|
+
promoted: a["[elevated]"] ? a["[elevated]"] : !1,
|
|
1049
|
+
thumbnail: this.doesMapExist("thumbnail", e) ? this.getValueByKey("thumbnail", a, e) : null,
|
|
1050
|
+
date: this.doesMapExist("date", e) ? this.getValueByKey("date", a, e) : null,
|
|
1051
|
+
snippet: this.doesMapExist("snippet", e) ? this.getValueByKey("snippet", a, e) : null,
|
|
1052
|
+
description: this.doesMapExist("description", e) ? this.getValueByKey("description", a, e) : null,
|
|
1053
|
+
unmappedFields: this.getUnmappedFields(a, e),
|
|
1054
|
+
allFields: this.getAllFields(a, e)
|
|
1045
1055
|
};
|
|
1046
|
-
t.push(
|
|
1056
|
+
t.push(c);
|
|
1047
1057
|
}), t;
|
|
1048
1058
|
}
|
|
1049
1059
|
static extractFacets(e) {
|
|
@@ -1063,17 +1073,30 @@ class he {
|
|
|
1063
1073
|
return t;
|
|
1064
1074
|
}
|
|
1065
1075
|
static extractSearchResultsMetadata(e) {
|
|
1066
|
-
var t, s, a, r;
|
|
1067
|
-
let
|
|
1068
|
-
|
|
1076
|
+
var t, s, a, r, c, l;
|
|
1077
|
+
let o = "", d = {
|
|
1078
|
+
selectedSortOption: "",
|
|
1079
|
+
options: []
|
|
1080
|
+
}, g = (t = e.metadata.results.find(
|
|
1081
|
+
(m) => m.result_card === "date"
|
|
1082
|
+
)) == null ? void 0 : t.name;
|
|
1083
|
+
if (d.options = [
|
|
1084
|
+
{ key: "", value: "Relevance" },
|
|
1085
|
+
{ key: g + " desc", value: "Most Recent" }
|
|
1086
|
+
], (s = e.metadata.sorts) != null && s.length) {
|
|
1087
|
+
const m = e.metadata.sorts.map((f) => ({ value: f.label, key: f.name + " " + f.order }));
|
|
1088
|
+
d.options = [{ key: "", value: "Relevance" }, ...m];
|
|
1089
|
+
}
|
|
1090
|
+
return o = ((l = (c = (r = (a = e == null ? void 0 : e.spellcheck) == null ? void 0 : a.suggestions) == null ? void 0 : r[0]) == null ? void 0 : c.suggestion) == null ? void 0 : l[0]) ?? "", typeof o != "string" && (o = (o == null ? void 0 : o.word) ?? ""), {
|
|
1069
1091
|
recordsPerPageValue: parseInt(e.responseHeader.params.rows),
|
|
1070
1092
|
startDocVal: parseInt(e.response.start + ""),
|
|
1071
1093
|
totalResultsValue: parseInt(e.response.numFound + ""),
|
|
1072
1094
|
latency: parseInt(e.responseHeader.QTime + ""),
|
|
1073
1095
|
endDocValue: parseInt(e.responseHeader.params.rows) + parseInt(e.response.start + ""),
|
|
1074
|
-
spellingSuggestion:
|
|
1096
|
+
spellingSuggestion: o,
|
|
1075
1097
|
autoCorrectedQuery: e.responseHeader.params.autoCorrectedQ ?? "",
|
|
1076
|
-
impressions: this.getImpressions(e)
|
|
1098
|
+
impressions: this.getImpressions(e),
|
|
1099
|
+
sorting: d
|
|
1077
1100
|
};
|
|
1078
1101
|
}
|
|
1079
1102
|
static getImpressions(e) {
|
|
@@ -1179,12 +1202,12 @@ class st {
|
|
|
1179
1202
|
if (c.startsWith(this.routeName + "[facets]")) {
|
|
1180
1203
|
const l = Z.removeXSSRiskyTags(
|
|
1181
1204
|
(t = e[c].split(":")) == null ? void 0 : t[0]
|
|
1182
|
-
),
|
|
1205
|
+
), o = Z.removeXSSRiskyTags(
|
|
1183
1206
|
decodeURIComponent((s = e[c].split(":")) == null ? void 0 : s[1])
|
|
1184
1207
|
), d = Z.removeXSSRiskyTags(
|
|
1185
1208
|
decodeURIComponent((a = e[c].split(":")) == null ? void 0 : a[2])
|
|
1186
1209
|
);
|
|
1187
|
-
r.push({ type: l, name:
|
|
1210
|
+
r.push({ type: l, name: o, value: d });
|
|
1188
1211
|
}
|
|
1189
1212
|
return r;
|
|
1190
1213
|
}
|
|
@@ -1261,10 +1284,10 @@ class _t {
|
|
|
1261
1284
|
for (const r in a)
|
|
1262
1285
|
if (Object.prototype.hasOwnProperty.call(a, r)) {
|
|
1263
1286
|
const c = a[r], l = r;
|
|
1264
|
-
let
|
|
1287
|
+
let o = "";
|
|
1265
1288
|
for (const d of c)
|
|
1266
|
-
|
|
1267
|
-
s = s.concat("fq=" +
|
|
1289
|
+
o += ` ${l}:"${d}"`;
|
|
1290
|
+
s = s.concat("fq=" + o.trim());
|
|
1268
1291
|
}
|
|
1269
1292
|
}
|
|
1270
1293
|
return s.length ? "&" + s.join("&") : "";
|
|
@@ -1304,17 +1327,17 @@ class _t {
|
|
|
1304
1327
|
if (e.query && e.query !== "undefined" && e.itemsPerPage !== void 0) {
|
|
1305
1328
|
this.dataLayer.setSearchTerm(e.query), this.dataLayer.setLoading(!0), this.controllerSearch && this.controllerSearch.abort(), this.controllerSearch = new AbortController(), this.signalSearch = this.controllerSearch.signal;
|
|
1306
1329
|
const r = new Proxy(new URLSearchParams((window == null ? void 0 : window.location.search) ?? ""), {
|
|
1307
|
-
get: (
|
|
1330
|
+
get: (f, S) => f.get(S) ?? ""
|
|
1308
1331
|
}), c = r.languageVariant ? (
|
|
1309
1332
|
//@ts-expect-error - this is a hack to get around the fact that the urlQueryParams is a proxy
|
|
1310
1333
|
"&fq=_language:" + r.languageVariant
|
|
1311
1334
|
) : "";
|
|
1312
|
-
let l = e.itemsPerPage,
|
|
1313
|
-
const g = this.url + "?q=" + encodeURIComponent(e.query.trim()) + "&start=" +
|
|
1314
|
-
e.facets.filter((
|
|
1335
|
+
let l = e.itemsPerPage, o = e.itemsPerPage * (e.page - 1), d = e.order ? `&sort=${e.order}` : "";
|
|
1336
|
+
const g = this.url + "?q=" + encodeURIComponent(e.query.trim()) + "&start=" + o + this.toQueryString(e.additionalProps ?? []) + this.generateFacetQuery(
|
|
1337
|
+
e.facets.filter((f) => f.type === "or" || f.type === "showUnavailable"),
|
|
1315
1338
|
!0
|
|
1316
1339
|
) + this.generateFacetQuery(
|
|
1317
|
-
e.facets.filter((
|
|
1340
|
+
e.facets.filter((f) => f.type === "and" || f.type === "tabs"),
|
|
1318
1341
|
!1
|
|
1319
1342
|
) + d + `&spellcheck.correct=${this.dataLayer.autoCorrect && !a}&rows=${l}&language=` + this.dataLayer.language + c, m = {
|
|
1320
1343
|
method: "GET",
|
|
@@ -1322,8 +1345,8 @@ class _t {
|
|
|
1322
1345
|
credentials: "same-origin",
|
|
1323
1346
|
signal: this.signalSearch
|
|
1324
1347
|
};
|
|
1325
|
-
s && delete m.signal, fetch(g, m).then((
|
|
1326
|
-
this.dataLayer.setLoading(!1), t(
|
|
1348
|
+
s && delete m.signal, fetch(g, m).then((f) => f.json()).then((f) => {
|
|
1349
|
+
this.dataLayer.setLoading(!1), t(f);
|
|
1327
1350
|
}).catch(() => {
|
|
1328
1351
|
this.dataLayer.setLoading(!1);
|
|
1329
1352
|
});
|
|
@@ -1452,7 +1475,7 @@ function je(i) {
|
|
|
1452
1475
|
function Wt(i) {
|
|
1453
1476
|
return ie(i) ? "array" : typeof i;
|
|
1454
1477
|
}
|
|
1455
|
-
function
|
|
1478
|
+
function Ie(i) {
|
|
1456
1479
|
return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
1457
1480
|
}
|
|
1458
1481
|
function rt(i, e) {
|
|
@@ -1488,7 +1511,7 @@ var Yt = /\s*/, Gt = /\s+/, it = /\s*=/, Xt = /\s*\}/, Zt = /#|\^|\/|>|\{|&|=|!/
|
|
|
1488
1511
|
function ea(i, e) {
|
|
1489
1512
|
if (!i)
|
|
1490
1513
|
return [];
|
|
1491
|
-
var t = !1, s = [], a = [], r = [], c = !1, l = !1,
|
|
1514
|
+
var t = !1, s = [], a = [], r = [], c = !1, l = !1, o = "", d = 0;
|
|
1492
1515
|
function g() {
|
|
1493
1516
|
if (c && !l)
|
|
1494
1517
|
for (; r.length; )
|
|
@@ -1497,24 +1520,24 @@ function ea(i, e) {
|
|
|
1497
1520
|
r = [];
|
|
1498
1521
|
c = !1, l = !1;
|
|
1499
1522
|
}
|
|
1500
|
-
var m,
|
|
1523
|
+
var m, f, S;
|
|
1501
1524
|
function O(b) {
|
|
1502
1525
|
if (typeof b == "string" && (b = b.split(Gt, 2)), !ie(b) || b.length !== 2)
|
|
1503
1526
|
throw new Error("Invalid tags: " + b);
|
|
1504
|
-
m = new RegExp(
|
|
1527
|
+
m = new RegExp(Ie(b[0]) + "\\s*"), f = new RegExp("\\s*" + Ie(b[1])), S = new RegExp("\\s*" + Ie("}" + b[1]));
|
|
1505
1528
|
}
|
|
1506
|
-
O(e ||
|
|
1507
|
-
for (var R = new ge(i), k, E, T,
|
|
1529
|
+
O(e || P.tags);
|
|
1530
|
+
for (var R = new ge(i), k, E, T, N, B, A; !R.eos(); ) {
|
|
1508
1531
|
if (k = R.pos, T = R.scanUntil(m), T)
|
|
1509
|
-
for (var Q = 0,
|
|
1510
|
-
|
|
1511
|
-
` && (g(),
|
|
1532
|
+
for (var Q = 0, v = T.length; Q < v; ++Q)
|
|
1533
|
+
N = T.charAt(Q), Kt(N) ? (r.push(a.length), o += N) : (l = !0, t = !0, o += " "), a.push(["text", N, k, k + 1]), k += 1, N === `
|
|
1534
|
+
` && (g(), o = "", d = 0, t = !1);
|
|
1512
1535
|
if (!R.scan(m))
|
|
1513
1536
|
break;
|
|
1514
|
-
if (c = !0, E = R.scan(Zt) || "name", R.scan(Yt), E === "=" ? (T = R.scanUntil(it), R.scan(it), R.scanUntil(
|
|
1537
|
+
if (c = !0, E = R.scan(Zt) || "name", R.scan(Yt), E === "=" ? (T = R.scanUntil(it), R.scan(it), R.scanUntil(f)) : E === "{" ? (T = R.scanUntil(S), R.scan(Xt), R.scanUntil(f), E = "&") : T = R.scanUntil(f), !R.scan(f))
|
|
1515
1538
|
throw new Error("Unclosed tag at " + R.pos);
|
|
1516
|
-
if (E == ">" ?
|
|
1517
|
-
s.push(
|
|
1539
|
+
if (E == ">" ? B = [E, T, k, R.pos, o, d, t] : B = [E, T, k, R.pos], d++, a.push(B), E === "#" || E === "^")
|
|
1540
|
+
s.push(B);
|
|
1518
1541
|
else if (E === "/") {
|
|
1519
1542
|
if (A = s.pop(), !A)
|
|
1520
1543
|
throw new Error('Unopened section "' + T + '" at ' + k);
|
|
@@ -1619,7 +1642,7 @@ U.prototype.clearCache = function() {
|
|
|
1619
1642
|
typeof this.templateCache < "u" && this.templateCache.clear();
|
|
1620
1643
|
};
|
|
1621
1644
|
U.prototype.parse = function(i, e) {
|
|
1622
|
-
var t = this.templateCache, s = i + ":" + (e ||
|
|
1645
|
+
var t = this.templateCache, s = i + ":" + (e || P.tags).join(":"), a = typeof t < "u", r = a ? t.get(s) : void 0;
|
|
1623
1646
|
return r == null && (r = ea(i, e), a && t.set(s, r)), r;
|
|
1624
1647
|
};
|
|
1625
1648
|
U.prototype.render = function(i, e, t, s) {
|
|
@@ -1627,13 +1650,13 @@ U.prototype.render = function(i, e, t, s) {
|
|
|
1627
1650
|
return this.renderTokens(r, c, t, i, s);
|
|
1628
1651
|
};
|
|
1629
1652
|
U.prototype.renderTokens = function(i, e, t, s, a) {
|
|
1630
|
-
for (var r = "", c, l,
|
|
1631
|
-
|
|
1653
|
+
for (var r = "", c, l, o, d = 0, g = i.length; d < g; ++d)
|
|
1654
|
+
o = void 0, c = i[d], l = c[0], l === "#" ? o = this.renderSection(c, e, t, s, a) : l === "^" ? o = this.renderInverted(c, e, t, s, a) : l === ">" ? o = this.renderPartial(c, e, t, a) : l === "&" ? o = this.unescapedValue(c, e) : l === "name" ? o = this.escapedValue(c, e, a) : l === "text" && (o = this.rawValue(c)), o !== void 0 && (r += o);
|
|
1632
1655
|
return r;
|
|
1633
1656
|
};
|
|
1634
1657
|
U.prototype.renderSection = function(i, e, t, s, a) {
|
|
1635
1658
|
var r = this, c = "", l = e.lookup(i[1]);
|
|
1636
|
-
function
|
|
1659
|
+
function o(m) {
|
|
1637
1660
|
return r.render(m, e, t, a);
|
|
1638
1661
|
}
|
|
1639
1662
|
if (l) {
|
|
@@ -1645,7 +1668,7 @@ U.prototype.renderSection = function(i, e, t, s, a) {
|
|
|
1645
1668
|
else if (je(l)) {
|
|
1646
1669
|
if (typeof s != "string")
|
|
1647
1670
|
throw new Error("Cannot use higher-order sections without the original template");
|
|
1648
|
-
l = l.call(e.view, s.slice(i[3], i[5]),
|
|
1671
|
+
l = l.call(e.view, s.slice(i[3], i[5]), o), l != null && (c += l);
|
|
1649
1672
|
} else
|
|
1650
1673
|
c += this.renderTokens(i[4], e, t, s, a);
|
|
1651
1674
|
return c;
|
|
@@ -1667,8 +1690,8 @@ U.prototype.renderPartial = function(i, e, t, s) {
|
|
|
1667
1690
|
if (t) {
|
|
1668
1691
|
var a = this.getConfigTags(s), r = je(t) ? t(i[1]) : t[i[1]];
|
|
1669
1692
|
if (r != null) {
|
|
1670
|
-
var c = i[6], l = i[5],
|
|
1671
|
-
l == 0 &&
|
|
1693
|
+
var c = i[6], l = i[5], o = i[4], d = r;
|
|
1694
|
+
l == 0 && o && (d = this.indentPartial(r, o, c));
|
|
1672
1695
|
var g = this.parse(d, a);
|
|
1673
1696
|
return this.renderTokens(g, e, t, d, s);
|
|
1674
1697
|
}
|
|
@@ -1680,9 +1703,9 @@ U.prototype.unescapedValue = function(i, e) {
|
|
|
1680
1703
|
return t;
|
|
1681
1704
|
};
|
|
1682
1705
|
U.prototype.escapedValue = function(i, e, t) {
|
|
1683
|
-
var s = this.getConfigEscape(t) ||
|
|
1706
|
+
var s = this.getConfigEscape(t) || P.escape, a = e.lookup(i[1]);
|
|
1684
1707
|
if (a != null)
|
|
1685
|
-
return typeof a == "number" && s ===
|
|
1708
|
+
return typeof a == "number" && s === P.escape ? String(a) : s(a);
|
|
1686
1709
|
};
|
|
1687
1710
|
U.prototype.rawValue = function(i) {
|
|
1688
1711
|
return i[1];
|
|
@@ -1694,7 +1717,7 @@ U.prototype.getConfigEscape = function(i) {
|
|
|
1694
1717
|
if (i && typeof i == "object" && !ie(i))
|
|
1695
1718
|
return i.escape;
|
|
1696
1719
|
};
|
|
1697
|
-
var
|
|
1720
|
+
var P = {
|
|
1698
1721
|
name: "mustache.js",
|
|
1699
1722
|
version: "4.2.0",
|
|
1700
1723
|
tags: ["{{", "}}"],
|
|
@@ -1720,21 +1743,21 @@ var I = {
|
|
|
1720
1743
|
return de.templateCache;
|
|
1721
1744
|
}
|
|
1722
1745
|
}, de = new U();
|
|
1723
|
-
|
|
1746
|
+
P.clearCache = function() {
|
|
1724
1747
|
return de.clearCache();
|
|
1725
1748
|
};
|
|
1726
|
-
|
|
1749
|
+
P.parse = function(i, e) {
|
|
1727
1750
|
return de.parse(i, e);
|
|
1728
1751
|
};
|
|
1729
|
-
|
|
1752
|
+
P.render = function(i, e, t, s) {
|
|
1730
1753
|
if (typeof i != "string")
|
|
1731
1754
|
throw new TypeError('Invalid template! Template should be a "string" but "' + Wt(i) + '" was given as the first argument for mustache#render(template, view, partials)');
|
|
1732
1755
|
return de.render(i, e, t, s);
|
|
1733
1756
|
};
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1757
|
+
P.escape = Jt;
|
|
1758
|
+
P.Scanner = ge;
|
|
1759
|
+
P.Context = re;
|
|
1760
|
+
P.Writer = U;
|
|
1738
1761
|
const sa = {
|
|
1739
1762
|
main: {
|
|
1740
1763
|
template: `
|
|
@@ -2057,16 +2080,12 @@ const sa = {
|
|
|
2057
2080
|
{{#hasResultsOrExternalPromotions}}
|
|
2058
2081
|
<div class="searchstax-sorting-container">
|
|
2059
2082
|
<label class="searchstax-sorting-label" for="sort-by">Sort By</label>
|
|
2060
|
-
<select id="searchstax-search-order-select" class="searchstax-search-order-select">
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
<option value="date desc">
|
|
2065
|
-
Newest Content
|
|
2066
|
-
</option>
|
|
2067
|
-
<option value="date asc">
|
|
2068
|
-
Oldest Content
|
|
2083
|
+
<select id="searchstax-search-order-select" class="searchstax-search-order-select" >
|
|
2084
|
+
{{#sortOptions}}
|
|
2085
|
+
<option value="{{key}}">
|
|
2086
|
+
{{value}}
|
|
2069
2087
|
</option>
|
|
2088
|
+
{{/sortOptions}}
|
|
2070
2089
|
</select>
|
|
2071
2090
|
</div>
|
|
2072
2091
|
{{/hasResultsOrExternalPromotions}}
|
|
@@ -2104,10 +2123,10 @@ class da {
|
|
|
2104
2123
|
if (c) {
|
|
2105
2124
|
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.externalPromotion) == null ? void 0 : a.template) || ((r = x.externalPromotions.externalPromotion) == null ? void 0 : r.template);
|
|
2106
2125
|
if (typeof document < "u") {
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2126
|
+
const o = document == null ? void 0 : document.createElement("div");
|
|
2127
|
+
o.classList.add("searchstax-external-promotion"), o.addEventListener("click", (d) => {
|
|
2109
2128
|
this.trackClick(e, d);
|
|
2110
|
-
}),
|
|
2129
|
+
}), o.innerHTML = P.render(l, e), c.appendChild(o);
|
|
2111
2130
|
}
|
|
2112
2131
|
}
|
|
2113
2132
|
}
|
|
@@ -2117,15 +2136,15 @@ class da {
|
|
|
2117
2136
|
renderMainTemplate(e) {
|
|
2118
2137
|
var t, s, a, r;
|
|
2119
2138
|
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.template) || ((r = x.externalPromotions.mainTemplate) == null ? void 0 : r.template);
|
|
2120
|
-
if (this.dataLayer.renderingEngine ===
|
|
2139
|
+
if (this.dataLayer.renderingEngine === W.mustache) {
|
|
2121
2140
|
this.searchExternalPromotionsMainContainer.innerHTML = //@ts-expect-error - mustache is not a module
|
|
2122
|
-
|
|
2141
|
+
P.render(c, e);
|
|
2123
2142
|
const l = typeof document < "u" ? document == null ? void 0 : document.getElementById(
|
|
2124
2143
|
this.externalPromotionsContainerId
|
|
2125
2144
|
) : null;
|
|
2126
2145
|
l && (l.innerHTML = "");
|
|
2127
|
-
for (const
|
|
2128
|
-
this.addExternalSearch(
|
|
2146
|
+
for (const o of e.externalPromotions)
|
|
2147
|
+
this.addExternalSearch(o);
|
|
2129
2148
|
}
|
|
2130
2149
|
}
|
|
2131
2150
|
}
|
|
@@ -2133,14 +2152,14 @@ class ga {
|
|
|
2133
2152
|
constructor(e, t) {
|
|
2134
2153
|
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "routerHelper"), h(this, "cachedPhrase", ""), h(this, "isCached", !1), h(this, "overlayOpened", !1), h(this, "facetPaginationStep"), h(this, "facetPaginationStepMobile"), h(this, "searchFacetsMainContainer", null), h(this, "searchFacetsMobileContainer", null), h(this, "searchFacetsDesktopContainer", null), h(this, "facetLimits", {}), h(this, "facetLimitsMobile", {}), h(this, "deactivatedFacets", {}), h(this, "cachedData", null), h(this, "cacheFacets"), h(this, "onFacetSelect", (s, a, r, c, l) => {
|
|
2135
2154
|
if (s.stopPropagation(), !a.disabled) {
|
|
2136
|
-
const
|
|
2137
|
-
let d = c ?
|
|
2138
|
-
l !== void 0 && (d = !l),
|
|
2155
|
+
const o = r.querySelector("input");
|
|
2156
|
+
let d = c ? o.checked : !o.checked;
|
|
2157
|
+
l !== void 0 && (d = !l), o.checked = d;
|
|
2139
2158
|
const g = this.dataLayer.searchObject;
|
|
2140
2159
|
let m = [...g.facets];
|
|
2141
|
-
const
|
|
2142
|
-
d ? m.find((S) => J.deepEqual(S,
|
|
2143
|
-
(S) => !J.deepEqual(S,
|
|
2160
|
+
const f = this.extractFacetValue(a);
|
|
2161
|
+
d ? m.find((S) => J.deepEqual(S, f) ? S : !1) || (this.config.facetingType === "tabs" && (m = m.filter((S) => S.name !== f.name)), m.push(f)) : m = m.filter(
|
|
2162
|
+
(S) => !J.deepEqual(S, f)
|
|
2144
2163
|
), setTimeout(() => {
|
|
2145
2164
|
this.dataLayer.setSearchObject({ ...g, facets: m, page: 1 }), this.config.facetingType === "tabs" && this.renderMainTemplate(this.generateTemplateData(), !0);
|
|
2146
2165
|
}, 0);
|
|
@@ -2193,10 +2212,10 @@ class ga {
|
|
|
2193
2212
|
return c ? {
|
|
2194
2213
|
...a,
|
|
2195
2214
|
values: a.values.map((l) => {
|
|
2196
|
-
const
|
|
2215
|
+
const o = c.values.find((d) => l.type === "range" ? !1 : l.type === "checkbox" ? d.value === l.value : !1);
|
|
2197
2216
|
return {
|
|
2198
2217
|
...l,
|
|
2199
|
-
disabled: !
|
|
2218
|
+
disabled: !o,
|
|
2200
2219
|
isMobile: e
|
|
2201
2220
|
};
|
|
2202
2221
|
})
|
|
@@ -2226,30 +2245,30 @@ class ga {
|
|
|
2226
2245
|
}
|
|
2227
2246
|
}
|
|
2228
2247
|
createFacetItem(e, t, s) {
|
|
2229
|
-
var a, r, c, l,
|
|
2248
|
+
var a, r, c, l, o, d, g, m, f, S, O, R;
|
|
2230
2249
|
if (typeof document < "u") {
|
|
2231
2250
|
const k = document == null ? void 0 : document.createElement("div");
|
|
2232
2251
|
k.classList.add("searchstax-facet-container"), this.deactivatedFacets[e.name] || k.classList.add("active");
|
|
2233
2252
|
const E = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.facetItemContainerTemplate) == null ? void 0 : c.template) || ((l = x.facets.facetItemContainerTemplate) == null ? void 0 : l.template);
|
|
2234
|
-
k.innerHTML =
|
|
2253
|
+
k.innerHTML = P.render(
|
|
2235
2254
|
E,
|
|
2236
2255
|
e
|
|
2237
2256
|
), t.appendChild(k);
|
|
2238
2257
|
const T = k.querySelector(
|
|
2239
|
-
"." + (((g = (d = (
|
|
2258
|
+
"." + (((g = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.facetItemContainerTemplate) == null ? void 0 : g.facetListTitleContainerClass) || ((m = x.facets.facetItemContainerTemplate) == null ? void 0 : m.facetListTitleContainerClass))
|
|
2240
2259
|
);
|
|
2241
2260
|
T == null || T.addEventListener("click", () => {
|
|
2242
2261
|
k.classList.toggle("active");
|
|
2243
2262
|
});
|
|
2244
|
-
const
|
|
2245
|
-
"." + (((O = (S = (
|
|
2263
|
+
const N = k.querySelector(
|
|
2264
|
+
"." + (((O = (S = (f = this.config) == null ? void 0 : f.templates) == null ? void 0 : S.facetItemContainerTemplate) == null ? void 0 : O.facetListContainerClass) || ((R = x.facets.facetItemContainerTemplate) == null ? void 0 : R.facetListContainerClass))
|
|
2246
2265
|
);
|
|
2247
|
-
|
|
2266
|
+
N && (e.values.forEach((B) => {
|
|
2248
2267
|
this.createFacetListItem(
|
|
2249
|
-
|
|
2250
|
-
|
|
2268
|
+
B,
|
|
2269
|
+
N
|
|
2251
2270
|
);
|
|
2252
|
-
}), e.hasMoreFacets && this.createHasMoreComponent(e,
|
|
2271
|
+
}), e.hasMoreFacets && this.createHasMoreComponent(e, N, s));
|
|
2253
2272
|
}
|
|
2254
2273
|
}
|
|
2255
2274
|
isChecked(e) {
|
|
@@ -2257,40 +2276,40 @@ class ga {
|
|
|
2257
2276
|
return !!((t = this.dataLayer.searchObject.facets) != null && t.find((s) => J.deepEqual(s, this.extractFacetValue(e))));
|
|
2258
2277
|
}
|
|
2259
2278
|
createFacetListItem(e, t) {
|
|
2260
|
-
var s, a, r, c, l,
|
|
2279
|
+
var s, a, r, c, l, o, d, g, m, f, S, O, R;
|
|
2261
2280
|
if (typeof document < "u") {
|
|
2262
2281
|
const k = document == null ? void 0 : document.createElement("div");
|
|
2263
2282
|
k.classList.add("searchstax-facet-value-container"), e.disabled && k.classList.add("searchstax-facet-value-disabled");
|
|
2264
2283
|
const E = this.isChecked(e), T = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.facetItemTemplate) == null ? void 0 : r.template) || ((c = x.facets.facetItemTemplate) == null ? void 0 : c.template);
|
|
2265
|
-
k.innerHTML =
|
|
2284
|
+
k.innerHTML = P.render(
|
|
2266
2285
|
T,
|
|
2267
2286
|
{ ...e, isChecked: E }
|
|
2268
2287
|
);
|
|
2269
|
-
let
|
|
2270
|
-
|
|
2288
|
+
let N = (l = x.facets.facetItemTemplate) == null ? void 0 : l.checkTriggerClasses;
|
|
2289
|
+
N = ((g = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.facetItemTemplate) == null ? void 0 : g.checkTriggerClasses) || N, N.forEach((B) => {
|
|
2271
2290
|
var A;
|
|
2272
|
-
(A = k.querySelector("." +
|
|
2291
|
+
(A = k.querySelector("." + B)) == null || A.addEventListener("click", (Q) => {
|
|
2273
2292
|
this.onFacetSelect(Q, e, k);
|
|
2274
2293
|
});
|
|
2275
2294
|
}), (R = k.querySelector(
|
|
2276
|
-
"." + (((S = (
|
|
2277
|
-
)) == null || R.addEventListener("click", (
|
|
2278
|
-
this.onFacetSelect(
|
|
2295
|
+
"." + (((S = (f = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : f.facetItemTemplate) == null ? void 0 : S.inputCheckboxClass) || ((O = x.facets.facetItemTemplate) == null ? void 0 : O.inputCheckboxClass))
|
|
2296
|
+
)) == null || R.addEventListener("click", (B) => {
|
|
2297
|
+
this.onFacetSelect(B, e, k, !0);
|
|
2279
2298
|
}), t.appendChild(k);
|
|
2280
2299
|
}
|
|
2281
2300
|
}
|
|
2282
2301
|
createHasMoreComponent(e, t, s) {
|
|
2283
|
-
var a, r, c, l,
|
|
2302
|
+
var a, r, c, l, o, d, g, m;
|
|
2284
2303
|
if (typeof document < "u") {
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2304
|
+
const f = document == null ? void 0 : document.createElement("div");
|
|
2305
|
+
f.classList.add("searchstax-facet-show-more-container");
|
|
2287
2306
|
const S = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.showMoreButtonContainerTemplate) == null ? void 0 : c.template) || ((l = x.facets.showMoreButtonContainerTemplate) == null ? void 0 : l.template);
|
|
2288
|
-
|
|
2307
|
+
f.innerHTML = P.render(
|
|
2289
2308
|
S,
|
|
2290
2309
|
e
|
|
2291
2310
|
);
|
|
2292
|
-
const O =
|
|
2293
|
-
"." + (((g = (d = (
|
|
2311
|
+
const O = f.querySelector(
|
|
2312
|
+
"." + (((g = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.showMoreButtonContainerTemplate) == null ? void 0 : g.showMoreButtonClass) || ((m = x.facets.showMoreButtonContainerTemplate) == null ? void 0 : m.showMoreButtonClass))
|
|
2294
2313
|
);
|
|
2295
2314
|
O && (this.attachOnclickToShowMore(e, O, s), t && t.appendChild(O));
|
|
2296
2315
|
}
|
|
@@ -2306,19 +2325,19 @@ class ga {
|
|
|
2306
2325
|
r[t.name] === void 0 ? r[t.name] = a * 2 : r[t.name] <= t.values.length ? r[t.name] = r[t.name] + a : r[t.name] = a, this.generateTemplateData(s), this.renderMainTemplate(this.generateTemplateData());
|
|
2307
2326
|
}
|
|
2308
2327
|
renderMainTemplate(e, t) {
|
|
2309
|
-
var s, a, r, c, l,
|
|
2328
|
+
var s, a, r, c, l, o, d, g, m, f, S;
|
|
2310
2329
|
if (e && (!J.deepEqual(this.cachedData ?? {}, e) || t)) {
|
|
2311
2330
|
this.cachedData = e;
|
|
2312
2331
|
const O = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.mainTemplateDesktop) == null ? void 0 : r.template) || ((c = x.facets.mainTemplateDesktop) == null ? void 0 : c.template);
|
|
2313
|
-
if (this.dataLayer.renderingEngine ===
|
|
2314
|
-
this.searchFacetsMainContainer.innerHTML =
|
|
2332
|
+
if (this.dataLayer.renderingEngine === W.mustache && this.searchFacetsMainContainer) {
|
|
2333
|
+
this.searchFacetsMainContainer.innerHTML = P.render(
|
|
2315
2334
|
O,
|
|
2316
2335
|
{
|
|
2317
2336
|
...e
|
|
2318
2337
|
}
|
|
2319
2338
|
);
|
|
2320
2339
|
const R = (g = this.searchFacetsMainContainer) == null ? void 0 : g.querySelector(
|
|
2321
|
-
"." + (((d = (
|
|
2340
|
+
"." + (((d = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.mainTemplateDesktop) == null ? void 0 : d.facetsContainerClass) || x.facets.mainTemplateDesktop.facetsContainerClass)
|
|
2322
2341
|
);
|
|
2323
2342
|
if (R) {
|
|
2324
2343
|
R.innerHTML = "";
|
|
@@ -2326,7 +2345,7 @@ class ga {
|
|
|
2326
2345
|
this.createFacetItem(k, R);
|
|
2327
2346
|
if (this.searchFacetsMainContainer) {
|
|
2328
2347
|
const k = this.searchFacetsMainContainer.querySelector(
|
|
2329
|
-
"." + (((S = (
|
|
2348
|
+
"." + (((S = (f = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : f.mainTemplateDesktop) == null ? void 0 : S.selectedFacetsContainerClass) || x.facets.mainTemplateDesktop.selectedFacetsContainerClass)
|
|
2330
2349
|
);
|
|
2331
2350
|
k && (this.createSelectedFacetsComponents(k), this.createClearFacetsComponents(k));
|
|
2332
2351
|
}
|
|
@@ -2342,11 +2361,11 @@ class ga {
|
|
|
2342
2361
|
const a = decodeURIComponent(s.name), r = decodeURIComponent(s.value);
|
|
2343
2362
|
if (this.dataLayer.searchFacets) {
|
|
2344
2363
|
const c = this.needCache ? this.dataLayer.searchFacetsCached : this.dataLayer.searchFacets, l = c == null ? void 0 : c.find(
|
|
2345
|
-
(
|
|
2364
|
+
(o) => o.name === a
|
|
2346
2365
|
);
|
|
2347
2366
|
if (l) {
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2367
|
+
const o = l.values.find((d) => d.type === "range" ? !1 : d.type === "checkbox" ? `"${d.value}"` == `"${r}"` : !1);
|
|
2368
|
+
o && e.push(o);
|
|
2350
2369
|
}
|
|
2351
2370
|
}
|
|
2352
2371
|
}
|
|
@@ -2359,17 +2378,17 @@ class ga {
|
|
|
2359
2378
|
});
|
|
2360
2379
|
}
|
|
2361
2380
|
createClearFacetsComponents(e) {
|
|
2362
|
-
var t, s, a, r, c, l,
|
|
2381
|
+
var t, s, a, r, c, l, o, d;
|
|
2363
2382
|
if (typeof document < "u") {
|
|
2364
|
-
const g = this.dataLayer.searchObject, m = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.clearFacetsTemplate) == null ? void 0 : a.template) || ((r = x.facets.clearFacetsTemplate) == null ? void 0 : r.template),
|
|
2365
|
-
|
|
2383
|
+
const g = this.dataLayer.searchObject, m = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.clearFacetsTemplate) == null ? void 0 : a.template) || ((r = x.facets.clearFacetsTemplate) == null ? void 0 : r.template), f = document == null ? void 0 : document.createElement("div");
|
|
2384
|
+
f.innerHTML = P.render(
|
|
2366
2385
|
m,
|
|
2367
2386
|
{
|
|
2368
2387
|
shouldShow: g.facets.length > 0
|
|
2369
2388
|
}
|
|
2370
2389
|
);
|
|
2371
|
-
const S =
|
|
2372
|
-
"." + (((
|
|
2390
|
+
const S = f.querySelector(
|
|
2391
|
+
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.clearFacetsTemplate) == null ? void 0 : o.containerClass) || ((d = x.facets.clearFacetsTemplate) == null ? void 0 : d.containerClass))
|
|
2373
2392
|
);
|
|
2374
2393
|
S && (S.addEventListener("click", () => {
|
|
2375
2394
|
this.removeSelectedFacets();
|
|
@@ -2377,15 +2396,15 @@ class ga {
|
|
|
2377
2396
|
}
|
|
2378
2397
|
}
|
|
2379
2398
|
createSelectedFacetsComponent(e, t) {
|
|
2380
|
-
var s, a, r, c, l,
|
|
2399
|
+
var s, a, r, c, l, o, d, g;
|
|
2381
2400
|
if (typeof document < "u") {
|
|
2382
|
-
const m = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.selectedFacetsTemplate) == null ? void 0 : r.template) || ((c = x.facets.selectedFacetsTemplate) == null ? void 0 : c.template),
|
|
2383
|
-
|
|
2401
|
+
const m = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.selectedFacetsTemplate) == null ? void 0 : r.template) || ((c = x.facets.selectedFacetsTemplate) == null ? void 0 : c.template), f = document == null ? void 0 : document.createElement("div");
|
|
2402
|
+
f.innerHTML = P.render(
|
|
2384
2403
|
m,
|
|
2385
2404
|
t
|
|
2386
2405
|
);
|
|
2387
|
-
const S =
|
|
2388
|
-
"." + (((d = (
|
|
2406
|
+
const S = f.querySelector(
|
|
2407
|
+
"." + (((d = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.selectedFacetsTemplate) == null ? void 0 : d.containerClass) || ((g = x.facets.selectedFacetsTemplate) == null ? void 0 : g.containerClass))
|
|
2389
2408
|
);
|
|
2390
2409
|
S && (S.addEventListener("click", () => {
|
|
2391
2410
|
this.unselectFacet(t);
|
|
@@ -2406,17 +2425,17 @@ class ga {
|
|
|
2406
2425
|
this.dataLayer.setSearchObject({ ...e, facets: [] });
|
|
2407
2426
|
}
|
|
2408
2427
|
createFilterByComponent(e) {
|
|
2409
|
-
var t, s, a, r, c, l,
|
|
2428
|
+
var t, s, a, r, c, l, o, d;
|
|
2410
2429
|
if (typeof document < "u") {
|
|
2411
2430
|
const g = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.filterByTemplate) == null ? void 0 : a.template) || ((r = x.facets.filterByTemplate) == null ? void 0 : r.template), m = document == null ? void 0 : document.createElement("div");
|
|
2412
|
-
m.innerHTML =
|
|
2431
|
+
m.innerHTML = P.render(
|
|
2413
2432
|
g,
|
|
2414
2433
|
{}
|
|
2415
2434
|
);
|
|
2416
|
-
const
|
|
2417
|
-
"." + (((
|
|
2435
|
+
const f = m.querySelector(
|
|
2436
|
+
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.filterByTemplate) == null ? void 0 : o.containerClass) || ((d = x.facets.filterByTemplate) == null ? void 0 : d.containerClass))
|
|
2418
2437
|
);
|
|
2419
|
-
|
|
2438
|
+
f && (e.prepend(f), f.addEventListener("click", this.openOverlay.bind(this)));
|
|
2420
2439
|
}
|
|
2421
2440
|
}
|
|
2422
2441
|
openOverlay() {
|
|
@@ -2428,40 +2447,40 @@ class ga {
|
|
|
2428
2447
|
this.overlayOpened = !1, this.searchFacetsMainContainer && (typeof document < "u" && document.body.classList.toggle("searchstax-no-scroll"), (e = this.searchFacetsMainContainer.querySelector(".searchstax-facets-mobile-overlay")) == null || e.classList.remove("searchstax-show"));
|
|
2429
2448
|
}
|
|
2430
2449
|
renderMobileTemplate(e) {
|
|
2431
|
-
var t, s, a, r, c, l,
|
|
2450
|
+
var t, s, a, r, c, l, o, d, g, m, f, S, O, R, k, E, T, N, B;
|
|
2432
2451
|
if (e && typeof document < "u") {
|
|
2433
2452
|
const A = document == null ? void 0 : document.createElement("div");
|
|
2434
2453
|
A.classList.add("searchstax-facets-container-mobile");
|
|
2435
2454
|
const Q = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplateMobile) == null ? void 0 : a.template) || ((r = x.facets.mainTemplateMobile) == null ? void 0 : r.template);
|
|
2436
|
-
if (this.dataLayer.renderingEngine ===
|
|
2437
|
-
if (A.innerHTML =
|
|
2455
|
+
if (this.dataLayer.renderingEngine === W.mustache) {
|
|
2456
|
+
if (A.innerHTML = P.render(Q, {
|
|
2438
2457
|
...e,
|
|
2439
2458
|
overlayOpened: this.overlayOpened
|
|
2440
|
-
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (
|
|
2441
|
-
for (const
|
|
2442
|
-
const G = A.querySelector("." +
|
|
2459
|
+
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (o = (l = this.config) == null ? void 0 : l.templates) != null && o.mainTemplateMobile)
|
|
2460
|
+
for (const _ of ((m = (g = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : g.mainTemplateMobile) == null ? void 0 : m.closeOverlayTriggerClasses) || []) {
|
|
2461
|
+
const G = A.querySelector("." + _);
|
|
2443
2462
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2444
2463
|
}
|
|
2445
2464
|
else
|
|
2446
|
-
for (const
|
|
2447
|
-
const G = A.querySelector("." +
|
|
2465
|
+
for (const _ of x.facets.mainTemplateMobile.closeOverlayTriggerClasses) {
|
|
2466
|
+
const G = A.querySelector("." + _);
|
|
2448
2467
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2449
2468
|
}
|
|
2450
|
-
const
|
|
2451
|
-
"." + (((O = (S = (
|
|
2469
|
+
const v = A.querySelector(
|
|
2470
|
+
"." + (((O = (S = (f = this.config) == null ? void 0 : f.templates) == null ? void 0 : S.mainTemplateMobile) == null ? void 0 : O.filterByContainerClass) || x.facets.mainTemplateMobile.filterByContainerClass)
|
|
2452
2471
|
);
|
|
2453
|
-
|
|
2472
|
+
v && this.createFilterByComponent(v);
|
|
2454
2473
|
const b = A.querySelector(
|
|
2455
2474
|
"." + (((E = (k = (R = this.config) == null ? void 0 : R.templates) == null ? void 0 : k.mainTemplateMobile) == null ? void 0 : E.selectedFacetsContainerClass) || x.facets.mainTemplateMobile.selectedFacetsContainerClass)
|
|
2456
2475
|
);
|
|
2457
2476
|
b && (this.createSelectedFacetsComponents(b), this.createClearFacetsComponents(b));
|
|
2458
2477
|
const j = A.querySelector(
|
|
2459
|
-
"." + (((
|
|
2478
|
+
"." + (((B = (N = (T = this.config) == null ? void 0 : T.templates) == null ? void 0 : N.mainTemplateMobile) == null ? void 0 : B.facetsContainerClass) || x.facets.mainTemplateMobile.facetsContainerClass)
|
|
2460
2479
|
);
|
|
2461
2480
|
if (j) {
|
|
2462
2481
|
j.innerHTML = "";
|
|
2463
|
-
for (const
|
|
2464
|
-
this.createFacetItem(
|
|
2482
|
+
for (const _ of e.facets)
|
|
2483
|
+
this.createFacetItem(_, j, !0);
|
|
2465
2484
|
}
|
|
2466
2485
|
}
|
|
2467
2486
|
}
|
|
@@ -2470,8 +2489,8 @@ class ga {
|
|
|
2470
2489
|
class pa {
|
|
2471
2490
|
constructor(e) {
|
|
2472
2491
|
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "previousButtonClass"), h(this, "nextButtonClass"), h(this, "loadMoreButtonClass"), h(this, "routerHelper"), h(this, "searchPaginationMainContainer", null);
|
|
2473
|
-
var t, s, a, r, c, l,
|
|
2474
|
-
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.routerHelper = e.routerHelper, this.previousButtonClass = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.previousButtonClass) ?? x.pagination.mainTemplate.previousButtonClass, this.nextButtonClass = ((l = (c = (r = this.config) == null ? void 0 : r.templates) == null ? void 0 : c.mainTemplate) == null ? void 0 : l.nextButtonClass) ?? x.pagination.mainTemplate.nextButtonClass, this.loadMoreButtonClass = ((g = (d = (
|
|
2492
|
+
var t, s, a, r, c, l, o, d, g;
|
|
2493
|
+
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.routerHelper = e.routerHelper, this.previousButtonClass = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.previousButtonClass) ?? x.pagination.mainTemplate.previousButtonClass, this.nextButtonClass = ((l = (c = (r = this.config) == null ? void 0 : r.templates) == null ? void 0 : c.mainTemplate) == null ? void 0 : l.nextButtonClass) ?? x.pagination.mainTemplate.nextButtonClass, this.loadMoreButtonClass = ((g = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.infiniteScrollTemplate) == null ? void 0 : g.loadMoreButtonClass) ?? x.pagination.infiniteScrollTemplate.loadMoreButtonClass, typeof document < "u" && (this.searchPaginationMainContainer = document == null ? void 0 : document.getElementById(
|
|
2475
2494
|
this.containerId
|
|
2476
2495
|
)), this.initializeSubscriptions(), this.renderMainTemplate(this.generateTemplateData());
|
|
2477
2496
|
}
|
|
@@ -2533,11 +2552,11 @@ class pa {
|
|
|
2533
2552
|
}
|
|
2534
2553
|
}
|
|
2535
2554
|
renderMainTemplate(e) {
|
|
2536
|
-
var t, s, a, r, c, l,
|
|
2555
|
+
var t, s, a, r, c, l, o, d, g, m;
|
|
2537
2556
|
this.searchPaginationMainContainer && ((t = this.searchPaginationMainContainer.querySelector("." + this.previousButtonClass)) == null || t.removeEventListener("click", this.previousPage), (s = this.searchPaginationMainContainer.querySelector("." + this.nextButtonClass)) == null || s.removeEventListener("click", this.nextPage));
|
|
2538
|
-
let
|
|
2539
|
-
this.dataLayer.isInfiniteScroll && (
|
|
2540
|
-
|
|
2557
|
+
let f = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.mainTemplate) == null ? void 0 : c.template) || ((l = x.pagination.mainTemplate) == null ? void 0 : l.template);
|
|
2558
|
+
this.dataLayer.isInfiniteScroll && (f = ((g = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.infiniteScrollTemplate) == null ? void 0 : g.template) || ((m = x.pagination.infiniteScrollTemplate) == null ? void 0 : m.template)), this.dataLayer.renderingEngine === W.mustache && (this.searchPaginationMainContainer.innerHTML = P.render(
|
|
2559
|
+
f,
|
|
2541
2560
|
e
|
|
2542
2561
|
), setTimeout(() => {
|
|
2543
2562
|
this.overridePaginationEvents();
|
|
@@ -2566,13 +2585,13 @@ class ma {
|
|
|
2566
2585
|
addRelatedSearchComponent(e, t) {
|
|
2567
2586
|
var s, a, r, c, l;
|
|
2568
2587
|
if (typeof document < "u") {
|
|
2569
|
-
const
|
|
2570
|
-
if (this.dataLayer.renderingEngine ===
|
|
2571
|
-
|
|
2588
|
+
const o = document == null ? void 0 : document.createElement("div"), d = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.relatedSearch) == null ? void 0 : r.template) || x.relatedSearches.relatedSearch.template;
|
|
2589
|
+
if (this.dataLayer.renderingEngine === W.mustache) {
|
|
2590
|
+
o.innerHTML = P.render(
|
|
2572
2591
|
d,
|
|
2573
2592
|
e
|
|
2574
2593
|
);
|
|
2575
|
-
const g =
|
|
2594
|
+
const g = o.querySelector(
|
|
2576
2595
|
"." + (((l = (c = this.config.templates) == null ? void 0 : c.relatedSearch) == null ? void 0 : l.relatedSearchContainerClass) || x.relatedSearches.relatedSearch.relatedSearchContainerClass)
|
|
2577
2596
|
);
|
|
2578
2597
|
g && (t.appendChild(g), g.addEventListener("click", () => {
|
|
@@ -2588,15 +2607,15 @@ class ma {
|
|
|
2588
2607
|
renderMainTemplate(e) {
|
|
2589
2608
|
var t, s, a, r;
|
|
2590
2609
|
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || x.relatedSearches.main.template;
|
|
2591
|
-
if (this.dataLayer.renderingEngine ===
|
|
2610
|
+
if (this.dataLayer.renderingEngine === W.mustache && this.searchRelatedSearchesMainContainer) {
|
|
2592
2611
|
this.searchRelatedSearchesMainContainer.innerHTML = "", this.searchRelatedSearchesMainContainer.innerHTML = //@ts-expect-error - mustache is not a module
|
|
2593
|
-
|
|
2612
|
+
P.render(c, e);
|
|
2594
2613
|
const l = (r = this.searchRelatedSearchesMainContainer) == null ? void 0 : r.querySelector(
|
|
2595
2614
|
`.${this.relatedSearchesContainerClass}`
|
|
2596
2615
|
);
|
|
2597
2616
|
if (l)
|
|
2598
|
-
for (const
|
|
2599
|
-
this.addRelatedSearchComponent(
|
|
2617
|
+
for (const o of e.relatedSearches)
|
|
2618
|
+
this.addRelatedSearchComponent(o, l);
|
|
2600
2619
|
}
|
|
2601
2620
|
}
|
|
2602
2621
|
}
|
|
@@ -2636,7 +2655,7 @@ class fa {
|
|
|
2636
2655
|
renderMainTemplate(e) {
|
|
2637
2656
|
var t, s, a;
|
|
2638
2657
|
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || x.searchFeedback.main.template;
|
|
2639
|
-
this.dataLayer.renderingEngine ===
|
|
2658
|
+
this.dataLayer.renderingEngine === W.mustache && (this.searchFeedbackMainContainer.innerHTML = P.render(
|
|
2640
2659
|
r,
|
|
2641
2660
|
e
|
|
2642
2661
|
), setTimeout(() => {
|
|
@@ -2655,20 +2674,20 @@ class va {
|
|
|
2655
2674
|
if (!r)
|
|
2656
2675
|
throw new Error("Search input container not found");
|
|
2657
2676
|
const c = ((t = (e = this.config.templates) == null ? void 0 : e.mainTemplate) == null ? void 0 : t.template) || x.searchInput.mainTemplate.template;
|
|
2658
|
-
if (this.dataLayer.renderingEngine ===
|
|
2659
|
-
const d =
|
|
2677
|
+
if (this.dataLayer.renderingEngine === W.mustache) {
|
|
2678
|
+
const d = P.render(c, {});
|
|
2660
2679
|
r.innerHTML = d;
|
|
2661
2680
|
}
|
|
2662
|
-
const l = ((a = (s = this.config.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.searchInputId) || x.searchInput.mainTemplate.searchInputId,
|
|
2663
|
-
if (
|
|
2664
|
-
this.searchInput =
|
|
2681
|
+
const l = ((a = (s = this.config.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.searchInputId) || x.searchInput.mainTemplate.searchInputId, o = document == null ? void 0 : document.querySelector(`#${l}`);
|
|
2682
|
+
if (o)
|
|
2683
|
+
this.searchInput = o, o.addEventListener("keyup", this.inputKeyupEvent.bind(this)), o.addEventListener("blur", this.hideAutosuggest.bind(this)), o.addEventListener("paste", this.inputPasteEvent.bind(this));
|
|
2665
2684
|
else
|
|
2666
2685
|
throw new Error("Input not found");
|
|
2667
2686
|
}
|
|
2668
2687
|
}
|
|
2669
2688
|
createAutosuggestContainer() {
|
|
2670
2689
|
var e;
|
|
2671
|
-
this.dataLayer.renderingEngine ===
|
|
2690
|
+
this.dataLayer.renderingEngine === W.mustache && typeof document < "u" && (this.autosuggestContainer = document == null ? void 0 : document.createElement("div"), this.autosuggestContainer.classList.add(
|
|
2672
2691
|
"searchstax-autosuggest-container"
|
|
2673
2692
|
), this.autosuggestContainer.addEventListener("mouseleave", () => {
|
|
2674
2693
|
this.resetAutosuggestSelection(), this.markActiveAutosuggestItem();
|
|
@@ -2781,7 +2800,7 @@ class va {
|
|
|
2781
2800
|
this.onSuggestionEnter(e);
|
|
2782
2801
|
});
|
|
2783
2802
|
const c = ((s = (t = this.config.templates) == null ? void 0 : t.autosuggestItemTemplate) == null ? void 0 : s.template) || ((a = x.searchInput.autosuggestItemTemplate) == null ? void 0 : a.template);
|
|
2784
|
-
return r.innerHTML =
|
|
2803
|
+
return r.innerHTML = P.render(c, e), r;
|
|
2785
2804
|
}
|
|
2786
2805
|
onSuggestionEnter(e) {
|
|
2787
2806
|
var t;
|
|
@@ -2829,27 +2848,27 @@ class ya {
|
|
|
2829
2848
|
renderNoResultsTemplate() {
|
|
2830
2849
|
var e, t, s, a, r;
|
|
2831
2850
|
const c = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.noSearchResultTemplate) == null ? void 0 : s.template) || ((a = x.searchResults.noSearchResultTemplate) == null ? void 0 : a.template), l = ((r = this.dataLayer.searchResultsMetadata) == null ? void 0 : r.spellingSuggestion) ?? "";
|
|
2832
|
-
if (this.dataLayer.renderingEngine ===
|
|
2851
|
+
if (this.dataLayer.renderingEngine === W.mustache && this.searchResultsContainer && (this.searchResultsContainer.innerHTML = P.render(
|
|
2833
2852
|
c,
|
|
2834
2853
|
{
|
|
2835
2854
|
spellingSuggestion: l,
|
|
2836
2855
|
...this.dataLayer.parsedData.data
|
|
2837
2856
|
}
|
|
2838
2857
|
)), l && this.searchResultsContainer) {
|
|
2839
|
-
const
|
|
2840
|
-
|
|
2858
|
+
const o = this.searchResultsContainer.querySelector("a");
|
|
2859
|
+
o && o.addEventListener("click", (d) => {
|
|
2841
2860
|
d.preventDefault(), d.stopPropagation(), this.searchCallback(l);
|
|
2842
2861
|
});
|
|
2843
2862
|
}
|
|
2844
2863
|
}
|
|
2845
2864
|
renderResults(e) {
|
|
2846
2865
|
var t, s, a, r, c;
|
|
2847
|
-
if (this.dataLayer.renderingEngine ===
|
|
2866
|
+
if (this.dataLayer.renderingEngine === W.mustache && this.searchResultsContainer)
|
|
2848
2867
|
if (this.removeLinkClickEvents(), e.length === 0)
|
|
2849
2868
|
this.renderNoResultsTemplate();
|
|
2850
2869
|
else {
|
|
2851
|
-
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.searchResultTemplate) == null ? void 0 : a.template) || ((r = x.searchResults.searchResultTemplate) == null ? void 0 : r.template),
|
|
2852
|
-
((c = this.config) == null ? void 0 : c.renderMethod) === "infiniteScroll" && this.dataLayer.searchObject.page > 1 ? this.searchResultsContainer.innerHTML +=
|
|
2870
|
+
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.searchResultTemplate) == null ? void 0 : a.template) || ((r = x.searchResults.searchResultTemplate) == null ? void 0 : r.template), o = e.map((d) => P.render(l, d));
|
|
2871
|
+
((c = this.config) == null ? void 0 : c.renderMethod) === "infiniteScroll" && this.dataLayer.searchObject.page > 1 ? this.searchResultsContainer.innerHTML += o.join("") : this.searchResultsContainer.innerHTML = o.join(""), this.searchResultLinks = Array.from(
|
|
2853
2872
|
this.searchResultsContainer.querySelectorAll(
|
|
2854
2873
|
`[${this.uniqueIdAttribute}]`
|
|
2855
2874
|
)
|
|
@@ -2878,12 +2897,12 @@ class ya {
|
|
|
2878
2897
|
renderMainTemplate() {
|
|
2879
2898
|
var e, t, s, a;
|
|
2880
2899
|
const r = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.mainTemplate) == null ? void 0 : s.template) || ((a = x.searchResults.mainTemplate) == null ? void 0 : a.template);
|
|
2881
|
-
this.dataLayer.renderingEngine ===
|
|
2900
|
+
this.dataLayer.renderingEngine === W.mustache && (this.searchResultsMainContainer.innerHTML = P.render(
|
|
2882
2901
|
r,
|
|
2883
2902
|
{}
|
|
2884
2903
|
), setTimeout(() => {
|
|
2885
|
-
var c, l,
|
|
2886
|
-
const S = (
|
|
2904
|
+
var c, l, o, d, g, m, f;
|
|
2905
|
+
const S = (o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.mainTemplate) != null && o.searchResultsContainerId ? (m = (g = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : g.mainTemplate) == null ? void 0 : m.searchResultsContainerId : (f = x.searchResults.mainTemplate) == null ? void 0 : f.searchResultsContainerId, O = document == null ? void 0 : document.getElementById(S);
|
|
2887
2906
|
if (O)
|
|
2888
2907
|
this.searchResultsContainer = O;
|
|
2889
2908
|
else
|
|
@@ -2928,8 +2947,8 @@ class xa {
|
|
|
2928
2947
|
renderMainTemplate(e) {
|
|
2929
2948
|
var t, s, a;
|
|
2930
2949
|
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || x.sorting.main.template;
|
|
2931
|
-
if (this.dataLayer.renderingEngine ===
|
|
2932
|
-
this.searchSortingMainContainer.innerHTML =
|
|
2950
|
+
if (this.dataLayer.renderingEngine === W.mustache) {
|
|
2951
|
+
this.searchSortingMainContainer.innerHTML = P.render(
|
|
2933
2952
|
r,
|
|
2934
2953
|
e
|
|
2935
2954
|
), this.markOptionSelected();
|
|
@@ -2956,17 +2975,17 @@ class ba {
|
|
|
2956
2975
|
renderMainTemplate(e) {
|
|
2957
2976
|
var t, s, a;
|
|
2958
2977
|
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || x.answer.main.template;
|
|
2959
|
-
this.dataLayer.renderingEngine ===
|
|
2978
|
+
this.dataLayer.renderingEngine === W.mustache && (this.answerContainer.innerHTML = P.render(
|
|
2960
2979
|
r,
|
|
2961
2980
|
e
|
|
2962
2981
|
));
|
|
2963
2982
|
}
|
|
2964
2983
|
}
|
|
2965
2984
|
class Ca {
|
|
2966
|
-
constructor(e =
|
|
2967
|
-
h(this, "routerEnabled", !1), h(this, "cachedQuery", ""), h(this, "routerHelper"), h(this, "searchHelper"), h(this, "searchResultsConfig"), h(this, "searchPaginationConfig"), h(this, "searchFeedbackConfig"), h(this, "searchSortingConfig"), h(this, "searchFacetsConfig"), h(this, "relatedSearchesConfig"), h(this, "externalPromotionsConfig"), h(this, "searchInputWidget"), h(this, "searchResultsWidget"), h(this, "searchFacetsWidget"), h(this, "searchPaginationWidget"), h(this, "searchFeedbackWidget"), h(this, "searchSortingWidget"), h(this, "relatedSearchesWidget"), h(this, "externalPromotionsWidget"), h(this, "answerWidget"), h(this, "dataLayer"), h(this, "firstRequest", !0), this
|
|
2985
|
+
constructor(e = W.mustache) {
|
|
2986
|
+
h(this, "routerEnabled", !1), h(this, "cachedQuery", ""), h(this, "routerHelper"), h(this, "searchHelper"), h(this, "searchResultsConfig"), h(this, "searchPaginationConfig"), h(this, "searchFeedbackConfig"), h(this, "searchSortingConfig"), h(this, "searchFacetsConfig"), h(this, "relatedSearchesConfig"), h(this, "externalPromotionsConfig"), h(this, "searchInputWidget"), h(this, "searchResultsWidget"), h(this, "searchFacetsWidget"), h(this, "searchPaginationWidget"), h(this, "searchFeedbackWidget"), h(this, "searchSortingWidget"), h(this, "relatedSearchesWidget"), h(this, "externalPromotionsWidget"), h(this, "answerWidget"), h(this, "dataLayer"), h(this, "firstRequest", !0), h(this, "renderEngine", W.mustache), e && (this.renderEngine = e);
|
|
2968
2987
|
}
|
|
2969
|
-
setRenderingEngine(e =
|
|
2988
|
+
setRenderingEngine(e = W.mustache) {
|
|
2970
2989
|
this.dataLayer.setRenderingEngine(e);
|
|
2971
2990
|
}
|
|
2972
2991
|
handleHooks() {
|
|
@@ -2995,19 +3014,22 @@ class Ca {
|
|
|
2995
3014
|
}
|
|
2996
3015
|
initialize(e) {
|
|
2997
3016
|
var t, s;
|
|
2998
|
-
if (e.analyticsBaseUrl && typeof window < "u" && (window.analyticsBaseUrl = e.analyticsBaseUrl, window._msq = e._msq || [], this.attachAnalyticsScript(e.analyticsSrc)), e.turnAIAnswerGenerationOn === !0 && (this.dataLayer.turnAIAnswerGenerationOn = !0), e.autoCorrect === !1 && (this.dataLayer.autoCorrect = !1), this.dataLayer.searchstaxConfig || (this.dataLayer.setSearchstaxConfig(e), this.searchHelper = new _t(
|
|
3017
|
+
if (this.dataLayer = new $t("searchstax_session_id", e.sessionId), this.renderEngine && this.dataLayer.setRenderingEngine(this.renderEngine), this.handleHooks(), e.analyticsBaseUrl && typeof window < "u" && (window.analyticsBaseUrl = e.analyticsBaseUrl, window._msq = e._msq || [], this.attachAnalyticsScript(e.analyticsSrc)), e.turnAIAnswerGenerationOn === !0 && (this.dataLayer.turnAIAnswerGenerationOn = !0), e.autoCorrect === !1 && (this.dataLayer.autoCorrect = !1), this.dataLayer.searchstaxConfig || (this.dataLayer.setSearchstaxConfig(e), this.searchHelper = new _t(
|
|
2999
3018
|
{ ...e, sessionId: this.dataLayer.sessionId },
|
|
3000
3019
|
this.dataLayer
|
|
3001
3020
|
)), ((t = e.router) == null ? void 0 : t.enabled) === void 0 || ((s = e.router) == null ? void 0 : s.enabled) === !0) {
|
|
3002
3021
|
this.routerEnabled = !0, this.routerHelper = new st(
|
|
3003
3022
|
e.router ? e.router : { enabled: !0 }
|
|
3004
3023
|
);
|
|
3005
|
-
const a = this.routerHelper.urlToSearchObject(
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
), addEventListener("popstate", () => {
|
|
3024
|
+
const a = this.routerHelper.urlToSearchObject(
|
|
3025
|
+
(window == null ? void 0 : window.location.href) ?? ""
|
|
3026
|
+
);
|
|
3027
|
+
this.dataLayer.searchObject.itemsPerPage && (a.itemsPerPage = this.dataLayer.searchObject.itemsPerPage), this.dataLayer.setSearchObject(a), addEventListener("popstate", () => {
|
|
3009
3028
|
this.routerHelper && this.dataLayer.setSearchObject(
|
|
3010
|
-
this.routerHelper.urlToSearchObject(
|
|
3029
|
+
this.routerHelper.urlToSearchObject(
|
|
3030
|
+
(window == null ? void 0 : window.location.href) ?? "",
|
|
3031
|
+
this.dataLayer.searchObject.itemsPerPage
|
|
3032
|
+
)
|
|
3011
3033
|
);
|
|
3012
3034
|
});
|
|
3013
3035
|
} else
|
|
@@ -3206,13 +3228,13 @@ const C = {
|
|
|
3206
3228
|
};
|
|
3207
3229
|
function La(i) {
|
|
3208
3230
|
let e = !1;
|
|
3209
|
-
const [t, s] =
|
|
3231
|
+
const [t, s] = q([]);
|
|
3210
3232
|
ee(() => {
|
|
3211
3233
|
if (a(), C.searchstax) {
|
|
3212
|
-
const
|
|
3213
|
-
i.afterAutosuggest && (
|
|
3234
|
+
const o = {};
|
|
3235
|
+
i.afterAutosuggest && (o.afterAutosuggest = i.afterAutosuggest), i.beforeAutosuggest && (o.beforeAutosuggest = i.beforeAutosuggest), C.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
3214
3236
|
suggestAfterMinChars: i.suggestAfterMinChars ?? 3,
|
|
3215
|
-
hooks:
|
|
3237
|
+
hooks: o,
|
|
3216
3238
|
templates: {
|
|
3217
3239
|
mainTemplate: {
|
|
3218
3240
|
template: "",
|
|
@@ -3224,25 +3246,25 @@ function La(i) {
|
|
|
3224
3246
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3225
3247
|
}, []);
|
|
3226
3248
|
function a() {
|
|
3227
|
-
e || (C.searchstax.dataLayer.$autosuggestResults.subscribe((
|
|
3228
|
-
s((
|
|
3249
|
+
e || (C.searchstax.dataLayer.$autosuggestResults.subscribe((o) => {
|
|
3250
|
+
s((o == null ? void 0 : o.suggestions) ?? []);
|
|
3229
3251
|
}), e = !0);
|
|
3230
3252
|
}
|
|
3231
3253
|
function r() {
|
|
3232
|
-
var
|
|
3233
|
-
(
|
|
3254
|
+
var o, d;
|
|
3255
|
+
(o = C.searchstax.searchInputWidget) == null || o.resetAutosuggestSelection(), (d = C.searchstax.searchInputWidget) == null || d.markActiveAutosuggestItem();
|
|
3234
3256
|
}
|
|
3235
|
-
function c(
|
|
3257
|
+
function c(o) {
|
|
3236
3258
|
var d;
|
|
3237
|
-
(d = C.searchstax.searchInputWidget) == null || d.onSuggestionEnter(
|
|
3259
|
+
(d = C.searchstax.searchInputWidget) == null || d.onSuggestionEnter(o);
|
|
3238
3260
|
}
|
|
3239
3261
|
function l() {
|
|
3240
|
-
var
|
|
3241
|
-
(
|
|
3262
|
+
var o;
|
|
3263
|
+
(o = C.searchstax.searchInputWidget) == null || o.suggestionChosen();
|
|
3242
3264
|
}
|
|
3243
|
-
return /* @__PURE__ */
|
|
3244
|
-
!i.inputTemplate && /* @__PURE__ */
|
|
3245
|
-
/* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("div", { id: "searchstax-input-container", children: /* @__PURE__ */ u.jsxs("div", { className: "searchstax-search-input-container", children: [
|
|
3266
|
+
!i.inputTemplate && /* @__PURE__ */ u.jsxs("div", { className: "searchstax-search-input-wrapper", children: [
|
|
3267
|
+
/* @__PURE__ */ u.jsx(
|
|
3246
3268
|
"input",
|
|
3247
3269
|
{
|
|
3248
3270
|
type: "text",
|
|
@@ -3251,38 +3273,40 @@ function La(i) {
|
|
|
3251
3273
|
placeholder: "SEARCH FOR..."
|
|
3252
3274
|
}
|
|
3253
3275
|
),
|
|
3254
|
-
/* @__PURE__ */
|
|
3276
|
+
/* @__PURE__ */ u.jsx(
|
|
3255
3277
|
"div",
|
|
3256
3278
|
{
|
|
3257
3279
|
className: `searchstax-autosuggest-container ${t.length === 0 ? "hidden" : ""}`,
|
|
3258
3280
|
onMouseLeave: r,
|
|
3259
|
-
children: t.map(function(
|
|
3260
|
-
return /* @__PURE__ */
|
|
3281
|
+
children: t.map(function(o) {
|
|
3282
|
+
return /* @__PURE__ */ u.jsx("div", { className: "searchstax-autosuggest-item", children: /* @__PURE__ */ u.jsx(
|
|
3261
3283
|
"div",
|
|
3262
3284
|
{
|
|
3263
3285
|
className: "searchstax-autosuggest-item-term-container",
|
|
3264
|
-
dangerouslySetInnerHTML: { __html:
|
|
3286
|
+
dangerouslySetInnerHTML: { __html: o.term },
|
|
3265
3287
|
onMouseOver: () => {
|
|
3266
|
-
c(
|
|
3288
|
+
c(o);
|
|
3267
3289
|
},
|
|
3268
3290
|
onClick: () => {
|
|
3269
3291
|
l();
|
|
3270
3292
|
}
|
|
3271
3293
|
}
|
|
3272
|
-
) },
|
|
3294
|
+
) }, o.term);
|
|
3273
3295
|
})
|
|
3274
3296
|
}
|
|
3275
3297
|
),
|
|
3276
|
-
/* @__PURE__ */
|
|
3298
|
+
/* @__PURE__ */ u.jsx("button", { className: "searchstax-spinner-icon", id: "searchstax-search-input-action-button" })
|
|
3277
3299
|
] }),
|
|
3278
|
-
i.inputTemplate && /* @__PURE__ */
|
|
3300
|
+
i.inputTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.inputTemplate(t, r, c, l) })
|
|
3279
3301
|
] }) }) });
|
|
3280
3302
|
}
|
|
3281
3303
|
function Ta(i) {
|
|
3304
|
+
const [e, t] = q(!1);
|
|
3282
3305
|
return ee(() => {
|
|
3283
|
-
const
|
|
3284
|
-
i.beforeSearch && (
|
|
3306
|
+
const s = {};
|
|
3307
|
+
i.beforeSearch && (s.beforeSearch = i.beforeSearch), i != null && i.afterSearch && (s.afterSearch = i.afterSearch), C.searchstax.initialize({
|
|
3285
3308
|
language: i.language ?? "en",
|
|
3309
|
+
sessionId: i.sessionId,
|
|
3286
3310
|
searchURL: i.searchURL,
|
|
3287
3311
|
suggesterURL: i.suggesterURL,
|
|
3288
3312
|
trackApiKey: i.trackApiKey,
|
|
@@ -3290,20 +3314,26 @@ function Ta(i) {
|
|
|
3290
3314
|
authType: i.authType ?? "basic",
|
|
3291
3315
|
autoCorrect: i.autoCorrect,
|
|
3292
3316
|
router: i.router,
|
|
3293
|
-
hooks:
|
|
3317
|
+
hooks: s,
|
|
3294
3318
|
analyticsBaseUrl: i.analyticsBaseUrl,
|
|
3295
3319
|
analyticsSrc: i.analyticsSrc
|
|
3296
|
-
}),
|
|
3297
|
-
|
|
3320
|
+
}), setTimeout(() => {
|
|
3321
|
+
t(!0);
|
|
3322
|
+
}, 100), i.initialized(C.searchstax);
|
|
3323
|
+
}, [i.initialized]), /* @__PURE__ */ u.jsx(u.Fragment, { children: e && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
3324
|
+
" ",
|
|
3325
|
+
i.children,
|
|
3326
|
+
" "
|
|
3327
|
+
] }) });
|
|
3298
3328
|
}
|
|
3299
3329
|
function ka(i) {
|
|
3300
|
-
const [e, t] =
|
|
3330
|
+
const [e, t] = q(
|
|
3301
3331
|
null
|
|
3302
3332
|
), s = Ft();
|
|
3303
3333
|
s.current = e;
|
|
3304
|
-
const [a, r] =
|
|
3334
|
+
const [a, r] = q(""), [c, l] = q(
|
|
3305
3335
|
null
|
|
3306
|
-
),
|
|
3336
|
+
), o = (g, m) => {
|
|
3307
3337
|
m.preventDefault(), m.stopPropagation(), C.searchstax.executeLinkClick(g.uniqueId);
|
|
3308
3338
|
};
|
|
3309
3339
|
ee(() => {
|
|
@@ -3320,8 +3350,8 @@ function ka(i) {
|
|
|
3320
3350
|
C.searchstax.dataLayer.$searchResults.subscribe(
|
|
3321
3351
|
(g) => {
|
|
3322
3352
|
var O;
|
|
3323
|
-
const m = s.current ?? [],
|
|
3324
|
-
((O = C.searchstax.dataLayer.$searchObject.value) == null ? void 0 : O.page) === 1 ? t(
|
|
3353
|
+
const m = s.current ?? [], f = g ?? [], S = i.renderMethod === "infiniteScroll" ? [...m, ...f] : g;
|
|
3354
|
+
((O = C.searchstax.dataLayer.$searchObject.value) == null ? void 0 : O.page) === 1 ? t(f) : t(S);
|
|
3325
3355
|
}
|
|
3326
3356
|
), C.searchstax.dataLayer.$searchTermChange.subscribe((g) => {
|
|
3327
3357
|
r(g);
|
|
@@ -3331,76 +3361,76 @@ function ka(i) {
|
|
|
3331
3361
|
}
|
|
3332
3362
|
);
|
|
3333
3363
|
}
|
|
3334
|
-
return /* @__PURE__ */
|
|
3335
|
-
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !i.noResultTemplate && /* @__PURE__ */
|
|
3336
|
-
/* @__PURE__ */
|
|
3364
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("div", { id: "searchstax-results-container", children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-results-container", children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-result-container", children: [
|
|
3365
|
+
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !i.noResultTemplate && /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3366
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-no-results", children: [
|
|
3337
3367
|
" ",
|
|
3338
3368
|
"Showing ",
|
|
3339
|
-
/* @__PURE__ */
|
|
3369
|
+
/* @__PURE__ */ u.jsx("strong", { children: "no results" }),
|
|
3340
3370
|
" for",
|
|
3341
3371
|
" ",
|
|
3342
|
-
/* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ u.jsxs("strong", { children: [
|
|
3343
3373
|
'"',
|
|
3344
3374
|
a,
|
|
3345
3375
|
'"'
|
|
3346
3376
|
] }),
|
|
3347
|
-
/* @__PURE__ */
|
|
3348
|
-
(c == null ? void 0 : c.spellingSuggestion) && /* @__PURE__ */
|
|
3377
|
+
/* @__PURE__ */ u.jsx("br", {}),
|
|
3378
|
+
(c == null ? void 0 : c.spellingSuggestion) && /* @__PURE__ */ u.jsxs("span", { children: [
|
|
3349
3379
|
" Did you mean",
|
|
3350
3380
|
" ",
|
|
3351
|
-
/* @__PURE__ */
|
|
3381
|
+
/* @__PURE__ */ u.jsx("a", { href: "#", className: "searchstax-suggestion-term", children: c == null ? void 0 : c.spellingSuggestion }),
|
|
3352
3382
|
"?"
|
|
3353
3383
|
] })
|
|
3354
3384
|
] }),
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
/* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ u.jsxs("div", { children: [
|
|
3386
|
+
/* @__PURE__ */ u.jsxs("p", { children: [
|
|
3357
3387
|
" ",
|
|
3358
3388
|
"Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.",
|
|
3359
3389
|
" "
|
|
3360
3390
|
] }),
|
|
3361
|
-
/* @__PURE__ */
|
|
3391
|
+
/* @__PURE__ */ u.jsx("p", { children: "Lost? Click on the ‘X” in the Search Box to reset your search." })
|
|
3362
3392
|
] })
|
|
3363
3393
|
] }),
|
|
3364
|
-
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && i.noResultTemplate && /* @__PURE__ */
|
|
3365
|
-
e && e.length > 0 && !i.resultsTemplate && /* @__PURE__ */
|
|
3366
|
-
return /* @__PURE__ */
|
|
3394
|
+
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && i.noResultTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.noResultTemplate(a, c) }),
|
|
3395
|
+
e && e.length > 0 && !i.resultsTemplate && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-results", children: e !== null && e.map(function(g) {
|
|
3396
|
+
return /* @__PURE__ */ u.jsxs(
|
|
3367
3397
|
"div",
|
|
3368
3398
|
{
|
|
3369
3399
|
className: `searchstax-search-result ${g.thumbnail ? "has-thumbnail" : ""}`,
|
|
3370
3400
|
children: [
|
|
3371
|
-
g.promoted && /* @__PURE__ */
|
|
3372
|
-
g.url && /* @__PURE__ */
|
|
3401
|
+
g.promoted && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-promoted" }),
|
|
3402
|
+
g.url && /* @__PURE__ */ u.jsx(
|
|
3373
3403
|
"a",
|
|
3374
3404
|
{
|
|
3375
3405
|
href: g.url,
|
|
3376
3406
|
"data-searchstax-unique-result-id": g.uniqueId,
|
|
3377
3407
|
onClick: (m) => {
|
|
3378
|
-
|
|
3408
|
+
o(g, m);
|
|
3379
3409
|
},
|
|
3380
3410
|
className: "searchstax-result-item-link"
|
|
3381
3411
|
}
|
|
3382
3412
|
),
|
|
3383
|
-
g.ribbon && /* @__PURE__ */
|
|
3384
|
-
g.thumbnail && /* @__PURE__ */
|
|
3413
|
+
g.ribbon && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-ribbon", children: g.ribbon }),
|
|
3414
|
+
g.thumbnail && /* @__PURE__ */ u.jsx(
|
|
3385
3415
|
"img",
|
|
3386
3416
|
{
|
|
3387
3417
|
src: g.thumbnail,
|
|
3388
3418
|
className: "searchstax-thumbnail"
|
|
3389
3419
|
}
|
|
3390
3420
|
),
|
|
3391
|
-
/* @__PURE__ */
|
|
3392
|
-
g.paths && /* @__PURE__ */
|
|
3393
|
-
g.description && /* @__PURE__ */
|
|
3421
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ u.jsx("span", { className: "searchstax-search-result-title", children: g.title }) }),
|
|
3422
|
+
g.paths && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-common", children: g.paths }),
|
|
3423
|
+
g.description && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: g.description }),
|
|
3394
3424
|
g.unmappedFields.map(function(m) {
|
|
3395
|
-
return /* @__PURE__ */
|
|
3396
|
-
m.isImage && typeof m.value == "string" && /* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3426
|
+
m.isImage && typeof m.value == "string" && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-image-container", children: /* @__PURE__ */ u.jsx(
|
|
3397
3427
|
"img",
|
|
3398
3428
|
{
|
|
3399
3429
|
src: m.value,
|
|
3400
3430
|
className: "searchstax-result-image"
|
|
3401
3431
|
}
|
|
3402
3432
|
) }),
|
|
3403
|
-
!m.isImage && /* @__PURE__ */
|
|
3433
|
+
!m.isImage && /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-common", children: m.value }) })
|
|
3404
3434
|
] }, m.key);
|
|
3405
3435
|
})
|
|
3406
3436
|
]
|
|
@@ -3408,14 +3438,14 @@ function ka(i) {
|
|
|
3408
3438
|
g.uniqueId
|
|
3409
3439
|
);
|
|
3410
3440
|
}) }),
|
|
3411
|
-
e && e.length > 0 && i.resultsTemplate && /* @__PURE__ */
|
|
3441
|
+
e && e.length > 0 && i.resultsTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.resultsTemplate(e, o) })
|
|
3412
3442
|
] }) }) }) });
|
|
3413
3443
|
}
|
|
3414
3444
|
function Ra(i) {
|
|
3415
3445
|
let e = !1;
|
|
3416
|
-
const [t, s] =
|
|
3446
|
+
const [t, s] = q(!1), [a, r] = q(
|
|
3417
3447
|
null
|
|
3418
|
-
), [c] =
|
|
3448
|
+
), [c] = q(Math.random());
|
|
3419
3449
|
ee(() => {
|
|
3420
3450
|
if (l(), C.searchstax)
|
|
3421
3451
|
C.searchstax.addPaginationWidget(
|
|
@@ -3427,34 +3457,34 @@ function Ra(i) {
|
|
|
3427
3457
|
}, []);
|
|
3428
3458
|
function l() {
|
|
3429
3459
|
e || (C.searchstax.dataLayer.$searchObject.subscribe(() => {
|
|
3430
|
-
|
|
3460
|
+
o();
|
|
3431
3461
|
}), C.searchstax.dataLayer.$paginationData.subscribe(
|
|
3432
3462
|
(m) => {
|
|
3433
3463
|
r(m);
|
|
3434
3464
|
}
|
|
3435
3465
|
), e = !0);
|
|
3436
3466
|
}
|
|
3437
|
-
function
|
|
3467
|
+
function o() {
|
|
3438
3468
|
!t && C.searchstax.routerHelper && (s(!0), C.searchstax.addPaginationWidget(
|
|
3439
3469
|
"searchstax-pagination-container" + c,
|
|
3440
3470
|
{}
|
|
3441
3471
|
));
|
|
3442
3472
|
}
|
|
3443
3473
|
function d(m) {
|
|
3444
|
-
var
|
|
3445
|
-
(
|
|
3474
|
+
var f;
|
|
3475
|
+
(f = C.searchstax.searchPaginationWidget) == null || f.nextPage(
|
|
3446
3476
|
m
|
|
3447
3477
|
);
|
|
3448
3478
|
}
|
|
3449
3479
|
function g(m) {
|
|
3450
|
-
var
|
|
3451
|
-
(
|
|
3480
|
+
var f;
|
|
3481
|
+
(f = C.searchstax.searchPaginationWidget) == null || f.previousPage(
|
|
3452
3482
|
m
|
|
3453
3483
|
);
|
|
3454
3484
|
}
|
|
3455
|
-
return /* @__PURE__ */
|
|
3456
|
-
!i.paginationTemplate && a && !a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && /* @__PURE__ */
|
|
3457
|
-
/* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-pagination-container" + c, children: [
|
|
3486
|
+
!i.paginationTemplate && a && !a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && /* @__PURE__ */ u.jsx("div", { className: "searchstax-pagination-container", children: /* @__PURE__ */ u.jsxs("div", { className: "searchstax-pagination-content", children: [
|
|
3487
|
+
/* @__PURE__ */ u.jsxs(
|
|
3458
3488
|
"a",
|
|
3459
3489
|
{
|
|
3460
3490
|
className: "searchstax-pagination-previous",
|
|
@@ -3470,7 +3500,7 @@ function Ra(i) {
|
|
|
3470
3500
|
]
|
|
3471
3501
|
}
|
|
3472
3502
|
),
|
|
3473
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-pagination-details", children: [
|
|
3474
3504
|
" ",
|
|
3475
3505
|
a == null ? void 0 : a.startResultIndex,
|
|
3476
3506
|
" -",
|
|
@@ -3480,7 +3510,7 @@ function Ra(i) {
|
|
|
3480
3510
|
" ",
|
|
3481
3511
|
a == null ? void 0 : a.totalResults
|
|
3482
3512
|
] }),
|
|
3483
|
-
/* @__PURE__ */
|
|
3513
|
+
/* @__PURE__ */ u.jsx(
|
|
3484
3514
|
"a",
|
|
3485
3515
|
{
|
|
3486
3516
|
className: "searchstax-pagination-next",
|
|
@@ -3493,8 +3523,8 @@ function Ra(i) {
|
|
|
3493
3523
|
}
|
|
3494
3524
|
)
|
|
3495
3525
|
] }) }),
|
|
3496
|
-
i.paginationTemplate && a && !a.isInfiniteScroll && /* @__PURE__ */
|
|
3497
|
-
!i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */
|
|
3526
|
+
i.paginationTemplate && a && !a.isInfiniteScroll && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.paginationTemplate(a, d, g) }),
|
|
3527
|
+
!i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */ u.jsx("div", { className: "searchstax-pagination-container", children: /* @__PURE__ */ u.jsx(
|
|
3498
3528
|
"a",
|
|
3499
3529
|
{
|
|
3500
3530
|
className: "searchstax-pagination-load-more",
|
|
@@ -3504,55 +3534,66 @@ function Ra(i) {
|
|
|
3504
3534
|
children: "Show More"
|
|
3505
3535
|
}
|
|
3506
3536
|
) }),
|
|
3507
|
-
i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */
|
|
3537
|
+
i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.infiniteScrollTemplate(a, d) })
|
|
3508
3538
|
] }) });
|
|
3509
3539
|
}
|
|
3510
3540
|
function wa(i) {
|
|
3511
3541
|
let e = !1;
|
|
3512
|
-
const [t, s] =
|
|
3542
|
+
const [t, s] = q(
|
|
3543
|
+
null
|
|
3544
|
+
), [a, r] = q(""), [c] = q(Math.random());
|
|
3513
3545
|
ee(() => {
|
|
3514
3546
|
if (l(), C.searchstax)
|
|
3515
|
-
C.searchstax.addSearchSortingWidget(
|
|
3547
|
+
C.searchstax.addSearchSortingWidget(
|
|
3548
|
+
"search-sorting-container" + c,
|
|
3549
|
+
{}
|
|
3550
|
+
);
|
|
3516
3551
|
else
|
|
3517
3552
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3518
3553
|
}, []);
|
|
3519
3554
|
function l() {
|
|
3520
|
-
e || (C.searchstax.dataLayer.$searchSortingData.subscribe(
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3555
|
+
e || (C.searchstax.dataLayer.$searchSortingData.subscribe(
|
|
3556
|
+
(d) => {
|
|
3557
|
+
s(d);
|
|
3558
|
+
}
|
|
3559
|
+
), C.searchstax.dataLayer.$searchObject.subscribe(
|
|
3560
|
+
(d) => {
|
|
3561
|
+
r(decodeURIComponent((d == null ? void 0 : d.order) ?? ""));
|
|
3562
|
+
}
|
|
3563
|
+
), e = !0);
|
|
3525
3564
|
}
|
|
3526
|
-
function
|
|
3565
|
+
function o(d) {
|
|
3527
3566
|
var g;
|
|
3528
3567
|
(g = C.searchstax.searchSortingWidget) == null || g.setOrderQuery(d);
|
|
3529
3568
|
}
|
|
3530
|
-
return /* @__PURE__ */
|
|
3531
|
-
!i.searchSortingTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasResultsOrExternalPromotions) && /* @__PURE__ */
|
|
3532
|
-
/* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-sorting-container" + c, children: [
|
|
3570
|
+
!i.searchSortingTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasResultsOrExternalPromotions) && /* @__PURE__ */ u.jsxs("div", { className: "searchstax-sorting-container", children: [
|
|
3571
|
+
/* @__PURE__ */ u.jsx("label", { className: "searchstax-sorting-label", htmlFor: "sort-by", children: "Sort By" }),
|
|
3572
|
+
/* @__PURE__ */ u.jsx(
|
|
3534
3573
|
"select",
|
|
3535
3574
|
{
|
|
3536
3575
|
id: "searchstax-search-order-select",
|
|
3537
3576
|
className: "searchstax-search-order-select",
|
|
3538
3577
|
value: a,
|
|
3539
3578
|
onChange: (d) => {
|
|
3540
|
-
|
|
3579
|
+
o(d.target.value);
|
|
3541
3580
|
},
|
|
3542
|
-
children:
|
|
3543
|
-
/* @__PURE__ */
|
|
3544
|
-
|
|
3545
|
-
/* @__PURE__ */ o.jsx("option", { value: "date asc", children: " Oldest Content " })
|
|
3546
|
-
]
|
|
3581
|
+
children: t.sortOptions.map(function(d) {
|
|
3582
|
+
return /* @__PURE__ */ u.jsx("option", { value: d.key, children: d.value }, d.key);
|
|
3583
|
+
})
|
|
3547
3584
|
}
|
|
3548
3585
|
)
|
|
3549
3586
|
] }),
|
|
3550
|
-
i.searchSortingTemplate && /* @__PURE__ */
|
|
3587
|
+
i.searchSortingTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchSortingTemplate(
|
|
3588
|
+
t,
|
|
3589
|
+
o,
|
|
3590
|
+
a
|
|
3591
|
+
) })
|
|
3551
3592
|
] }) });
|
|
3552
3593
|
}
|
|
3553
3594
|
function Ea(i) {
|
|
3554
3595
|
let e = !1;
|
|
3555
|
-
const [t, s] =
|
|
3596
|
+
const [t, s] = q(null), [a] = q(Math.random());
|
|
3556
3597
|
ee(() => {
|
|
3557
3598
|
if (r(), C.searchstax)
|
|
3558
3599
|
C.searchstax.addSearchFeedbackWidget("search-feedback-container" + a, {});
|
|
@@ -3567,36 +3608,36 @@ function Ea(i) {
|
|
|
3567
3608
|
), e = !0);
|
|
3568
3609
|
}
|
|
3569
3610
|
function c(l) {
|
|
3570
|
-
var
|
|
3571
|
-
(
|
|
3611
|
+
var o;
|
|
3612
|
+
(o = C.searchstax.searchFeedbackWidget) == null || o.onOriginalQueryClick(l);
|
|
3572
3613
|
}
|
|
3573
|
-
return /* @__PURE__ */
|
|
3574
|
-
!i.searchOverviewTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.totalResults) > 0 && /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { className: "search-feedback-container", id: "search-feedback-container" + a, children: [
|
|
3615
|
+
!i.searchOverviewTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.totalResults) > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
3575
3616
|
"Showing",
|
|
3576
3617
|
" ",
|
|
3577
|
-
/* @__PURE__ */
|
|
3618
|
+
/* @__PURE__ */ u.jsxs("b", { children: [
|
|
3578
3619
|
t.startResultIndex,
|
|
3579
3620
|
" - ",
|
|
3580
3621
|
t.endResultIndex
|
|
3581
3622
|
] }),
|
|
3582
3623
|
" ",
|
|
3583
3624
|
"of",
|
|
3584
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ u.jsxs("b", { children: [
|
|
3585
3626
|
" ",
|
|
3586
3627
|
t.totalResults
|
|
3587
3628
|
] }),
|
|
3588
3629
|
" results",
|
|
3589
|
-
t.searchTerm && /* @__PURE__ */
|
|
3630
|
+
t.searchTerm && /* @__PURE__ */ u.jsxs("span", { children: [
|
|
3590
3631
|
' for "',
|
|
3591
|
-
/* @__PURE__ */
|
|
3632
|
+
/* @__PURE__ */ u.jsx("b", { children: t.searchTerm }),
|
|
3592
3633
|
'"',
|
|
3593
3634
|
" "
|
|
3594
3635
|
] }),
|
|
3595
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-feedback-container-suggested", children: t.autoCorrectedQuery && /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3596
3637
|
" ",
|
|
3597
3638
|
"Search instead for",
|
|
3598
3639
|
" ",
|
|
3599
|
-
/* @__PURE__ */
|
|
3640
|
+
/* @__PURE__ */ u.jsx(
|
|
3600
3641
|
"a",
|
|
3601
3642
|
{
|
|
3602
3643
|
href: "#",
|
|
@@ -3609,22 +3650,22 @@ function Ea(i) {
|
|
|
3609
3650
|
)
|
|
3610
3651
|
] }) })
|
|
3611
3652
|
] }),
|
|
3612
|
-
i.searchOverviewTemplate && /* @__PURE__ */
|
|
3653
|
+
i.searchOverviewTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchOverviewTemplate(t, c) })
|
|
3613
3654
|
] }) });
|
|
3614
3655
|
}
|
|
3615
|
-
function
|
|
3616
|
-
const [e, t] =
|
|
3656
|
+
function Ia(i) {
|
|
3657
|
+
const [e, t] = q(
|
|
3617
3658
|
null
|
|
3618
|
-
), [s, a] =
|
|
3659
|
+
), [s, a] = q(
|
|
3619
3660
|
null
|
|
3620
|
-
), [r, c] =
|
|
3661
|
+
), [r, c] = q(
|
|
3621
3662
|
[]
|
|
3622
|
-
), [l,
|
|
3663
|
+
), [l, o] = q(
|
|
3623
3664
|
{}
|
|
3624
3665
|
), d = {}, g = Math.random();
|
|
3625
3666
|
let m = !1;
|
|
3626
3667
|
ee(() => {
|
|
3627
|
-
if (
|
|
3668
|
+
if (f(), C.searchstax)
|
|
3628
3669
|
C.searchstax.addFacetsWidget("searchstax-facets-container" + g, {
|
|
3629
3670
|
facetingType: i.facetingType,
|
|
3630
3671
|
specificFacets: i.specificFacets,
|
|
@@ -3634,40 +3675,40 @@ function Pa(i) {
|
|
|
3634
3675
|
else
|
|
3635
3676
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3636
3677
|
}, []);
|
|
3637
|
-
function
|
|
3678
|
+
function f() {
|
|
3638
3679
|
m || (C.searchstax.dataLayer.$facetsTemplateData.subscribe(
|
|
3639
|
-
(
|
|
3640
|
-
|
|
3680
|
+
(v) => {
|
|
3681
|
+
v != null && v.isMobile ? a(v) : t(v);
|
|
3641
3682
|
}
|
|
3642
3683
|
), C.searchstax.dataLayer.$selectedFacetsTemplateData.subscribe(
|
|
3643
|
-
(
|
|
3684
|
+
(v) => {
|
|
3644
3685
|
c(
|
|
3645
|
-
(
|
|
3686
|
+
(v ?? []).filter((j) => j.type === "checkbox")
|
|
3646
3687
|
);
|
|
3647
3688
|
}
|
|
3648
3689
|
), m = !0);
|
|
3649
3690
|
}
|
|
3650
|
-
function S(
|
|
3691
|
+
function S(v) {
|
|
3651
3692
|
var b;
|
|
3652
|
-
(b = C.searchstax.searchFacetsWidget) == null || b.unselectFacet(
|
|
3693
|
+
(b = C.searchstax.searchFacetsWidget) == null || b.unselectFacet(v);
|
|
3653
3694
|
}
|
|
3654
3695
|
function O() {
|
|
3655
|
-
var
|
|
3656
|
-
(
|
|
3696
|
+
var v;
|
|
3697
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.removeSelectedFacets();
|
|
3657
3698
|
}
|
|
3658
|
-
function R(
|
|
3659
|
-
return !l[
|
|
3699
|
+
function R(v) {
|
|
3700
|
+
return !l[v];
|
|
3660
3701
|
}
|
|
3661
|
-
function k(
|
|
3662
|
-
R(
|
|
3702
|
+
function k(v) {
|
|
3703
|
+
R(v) ? o({ ...l, [v]: !0 }) : o({ ...l, [v]: !1 });
|
|
3663
3704
|
}
|
|
3664
|
-
function E(
|
|
3705
|
+
function E(v) {
|
|
3665
3706
|
var b;
|
|
3666
|
-
return (b = C.searchstax.searchFacetsWidget) == null ? void 0 : b.isChecked(
|
|
3707
|
+
return (b = C.searchstax.searchFacetsWidget) == null ? void 0 : b.isChecked(v);
|
|
3667
3708
|
}
|
|
3668
|
-
function T(
|
|
3709
|
+
function T(v, b, j, _, G) {
|
|
3669
3710
|
var Y;
|
|
3670
|
-
const pe = G ? "mobile-" : "desktop-", K = document.getElementsByClassName(pe +
|
|
3711
|
+
const pe = G ? "mobile-" : "desktop-", K = document.getElementsByClassName(pe + v);
|
|
3671
3712
|
K[0] && ((Y = C.searchstax.searchFacetsWidget) == null || Y.onFacetSelect(
|
|
3672
3713
|
b,
|
|
3673
3714
|
j,
|
|
@@ -3676,67 +3717,67 @@ function Pa(i) {
|
|
|
3676
3717
|
E(j)
|
|
3677
3718
|
));
|
|
3678
3719
|
}
|
|
3679
|
-
function
|
|
3720
|
+
function N(v, b) {
|
|
3680
3721
|
var j;
|
|
3681
3722
|
(j = C.searchstax.searchFacetsWidget) == null || j.onShowMoreLessClick(
|
|
3682
|
-
|
|
3723
|
+
v,
|
|
3683
3724
|
b,
|
|
3684
3725
|
!1
|
|
3685
3726
|
);
|
|
3686
3727
|
}
|
|
3687
|
-
function
|
|
3728
|
+
function B(v, b) {
|
|
3688
3729
|
var j;
|
|
3689
3730
|
(j = C.searchstax.searchFacetsWidget) == null || j.onShowMoreLessClick(
|
|
3690
|
-
|
|
3731
|
+
v,
|
|
3691
3732
|
b,
|
|
3692
3733
|
!0
|
|
3693
3734
|
);
|
|
3694
3735
|
}
|
|
3695
3736
|
function A() {
|
|
3696
|
-
var
|
|
3697
|
-
(
|
|
3737
|
+
var v;
|
|
3738
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.openOverlay();
|
|
3698
3739
|
}
|
|
3699
3740
|
function Q() {
|
|
3700
|
-
var
|
|
3701
|
-
(
|
|
3741
|
+
var v;
|
|
3742
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.closeOverlay();
|
|
3702
3743
|
}
|
|
3703
|
-
return /* @__PURE__ */
|
|
3704
|
-
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !i.facetsTemplateDesktop && /* @__PURE__ */
|
|
3744
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" + g, children: [
|
|
3745
|
+
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-container-desktop", children: e == null ? void 0 : e.facets.map((v) => /* @__PURE__ */ u.jsx(
|
|
3705
3746
|
"div",
|
|
3706
3747
|
{
|
|
3707
|
-
className: `searchstax-facet-container ${R(
|
|
3708
|
-
children: /* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */
|
|
3748
|
+
className: `searchstax-facet-container ${R(v.name) ? "active" : ""}`,
|
|
3749
|
+
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3750
|
+
/* @__PURE__ */ u.jsxs(
|
|
3710
3751
|
"div",
|
|
3711
3752
|
{
|
|
3712
3753
|
className: "searchstax-facet-title-container",
|
|
3713
3754
|
onClick: () => {
|
|
3714
|
-
k(
|
|
3755
|
+
k(v.name);
|
|
3715
3756
|
},
|
|
3716
3757
|
children: [
|
|
3717
|
-
/* @__PURE__ */
|
|
3758
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
3718
3759
|
" ",
|
|
3719
|
-
|
|
3760
|
+
v.label,
|
|
3720
3761
|
" "
|
|
3721
3762
|
] }),
|
|
3722
|
-
/* @__PURE__ */
|
|
3763
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-title-arrow active" })
|
|
3723
3764
|
]
|
|
3724
3765
|
}
|
|
3725
3766
|
),
|
|
3726
|
-
/* @__PURE__ */
|
|
3727
|
-
|
|
3767
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3768
|
+
v.values.map(
|
|
3728
3769
|
//@ts-ignore
|
|
3729
|
-
(b, j) => (d[j +
|
|
3770
|
+
(b, j) => (d[j + v.name] = et(), /* @__PURE__ */ u.jsxs(
|
|
3730
3771
|
"div",
|
|
3731
3772
|
{
|
|
3732
3773
|
className: `searchstax-facet-value-container ${b.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3733
|
-
ref: d[j +
|
|
3774
|
+
ref: d[j + v.name],
|
|
3734
3775
|
children: [
|
|
3735
|
-
/* @__PURE__ */
|
|
3776
|
+
/* @__PURE__ */ u.jsx(
|
|
3736
3777
|
"div",
|
|
3737
3778
|
{
|
|
3738
|
-
className: "searchstax-facet-input desktop-" + j +
|
|
3739
|
-
children: /* @__PURE__ */
|
|
3779
|
+
className: "searchstax-facet-input desktop-" + j + v.name,
|
|
3780
|
+
children: /* @__PURE__ */ u.jsx(
|
|
3740
3781
|
"input",
|
|
3741
3782
|
{
|
|
3742
3783
|
type: "checkbox",
|
|
@@ -3744,10 +3785,10 @@ function Pa(i) {
|
|
|
3744
3785
|
checked: E(b),
|
|
3745
3786
|
readOnly: !0,
|
|
3746
3787
|
disabled: b.disabled,
|
|
3747
|
-
onClick: (
|
|
3788
|
+
onClick: (_) => {
|
|
3748
3789
|
T(
|
|
3749
|
-
j +
|
|
3750
|
-
|
|
3790
|
+
j + v.name,
|
|
3791
|
+
_,
|
|
3751
3792
|
b
|
|
3752
3793
|
);
|
|
3753
3794
|
}
|
|
@@ -3755,28 +3796,28 @@ function Pa(i) {
|
|
|
3755
3796
|
)
|
|
3756
3797
|
}
|
|
3757
3798
|
),
|
|
3758
|
-
/* @__PURE__ */
|
|
3799
|
+
/* @__PURE__ */ u.jsx(
|
|
3759
3800
|
"div",
|
|
3760
3801
|
{
|
|
3761
3802
|
className: "searchstax-facet-value-label",
|
|
3762
|
-
onClick: (
|
|
3803
|
+
onClick: (_) => {
|
|
3763
3804
|
T(
|
|
3764
|
-
j +
|
|
3765
|
-
|
|
3805
|
+
j + v.name,
|
|
3806
|
+
_,
|
|
3766
3807
|
b
|
|
3767
3808
|
);
|
|
3768
3809
|
},
|
|
3769
3810
|
children: b.value
|
|
3770
3811
|
}
|
|
3771
3812
|
),
|
|
3772
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ u.jsxs(
|
|
3773
3814
|
"div",
|
|
3774
3815
|
{
|
|
3775
3816
|
className: "searchstax-facet-value-count",
|
|
3776
|
-
onClick: (
|
|
3817
|
+
onClick: (_) => {
|
|
3777
3818
|
T(
|
|
3778
|
-
j +
|
|
3779
|
-
|
|
3819
|
+
j + v.name,
|
|
3820
|
+
_,
|
|
3780
3821
|
b
|
|
3781
3822
|
);
|
|
3782
3823
|
},
|
|
@@ -3792,84 +3833,84 @@ function Pa(i) {
|
|
|
3792
3833
|
b.value + b.parentName
|
|
3793
3834
|
))
|
|
3794
3835
|
),
|
|
3795
|
-
|
|
3836
|
+
v.hasMoreFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-container", children: /* @__PURE__ */ u.jsxs(
|
|
3796
3837
|
"div",
|
|
3797
3838
|
{
|
|
3798
3839
|
className: "searchstax-facet-show-more-container",
|
|
3799
3840
|
onClick: (b) => {
|
|
3800
|
-
|
|
3841
|
+
N(b, v);
|
|
3801
3842
|
},
|
|
3802
3843
|
children: [
|
|
3803
|
-
|
|
3804
|
-
!
|
|
3844
|
+
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
3845
|
+
!v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
3805
3846
|
]
|
|
3806
3847
|
}
|
|
3807
3848
|
) })
|
|
3808
3849
|
] })
|
|
3809
3850
|
] })
|
|
3810
3851
|
},
|
|
3811
|
-
|
|
3852
|
+
v.name + "desktop"
|
|
3812
3853
|
)) }),
|
|
3813
|
-
i.facetsTemplateDesktop && /* @__PURE__ */
|
|
3854
|
+
i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateDesktop(
|
|
3814
3855
|
e,
|
|
3815
3856
|
d,
|
|
3816
3857
|
R,
|
|
3817
3858
|
k,
|
|
3818
3859
|
T,
|
|
3819
3860
|
E,
|
|
3820
|
-
|
|
3861
|
+
N
|
|
3821
3862
|
) }),
|
|
3822
|
-
(s == null ? void 0 : s.hasResultsOrExternalPromotions) && !i.facetsTemplateMobile && /* @__PURE__ */
|
|
3823
|
-
/* @__PURE__ */
|
|
3863
|
+
(s == null ? void 0 : s.hasResultsOrExternalPromotions) && !i.facetsTemplateMobile && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-container-mobile", children: /* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-pills-container", children: [
|
|
3864
|
+
/* @__PURE__ */ u.jsx(
|
|
3824
3865
|
"div",
|
|
3825
3866
|
{
|
|
3826
3867
|
className: "searchstax-facets-pill searchstax-facets-pill-filter-by",
|
|
3827
3868
|
onClick: () => {
|
|
3828
3869
|
A();
|
|
3829
3870
|
},
|
|
3830
|
-
children: /* @__PURE__ */
|
|
3871
|
+
children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-label", children: "Filter By" })
|
|
3831
3872
|
}
|
|
3832
3873
|
),
|
|
3833
|
-
/* @__PURE__ */
|
|
3834
|
-
r.map((
|
|
3874
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-pills-selected", children: [
|
|
3875
|
+
r.map((v) => /* @__PURE__ */ u.jsxs(
|
|
3835
3876
|
"div",
|
|
3836
3877
|
{
|
|
3837
3878
|
className: "searchstax-facets-pill searchstax-facets-pill-facets",
|
|
3838
3879
|
onClick: () => {
|
|
3839
|
-
S(
|
|
3880
|
+
S(v);
|
|
3840
3881
|
},
|
|
3841
3882
|
children: [
|
|
3842
|
-
/* @__PURE__ */
|
|
3843
|
-
|
|
3883
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-pill-label", children: [
|
|
3884
|
+
v.value,
|
|
3844
3885
|
" (",
|
|
3845
|
-
|
|
3886
|
+
v.count,
|
|
3846
3887
|
")"
|
|
3847
3888
|
] }),
|
|
3848
|
-
/* @__PURE__ */
|
|
3889
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-icon-close" })
|
|
3849
3890
|
]
|
|
3850
3891
|
},
|
|
3851
|
-
|
|
3892
|
+
v.value
|
|
3852
3893
|
)),
|
|
3853
|
-
r.length !== 0 && /* @__PURE__ */
|
|
3894
|
+
r.length !== 0 && /* @__PURE__ */ u.jsx(
|
|
3854
3895
|
"div",
|
|
3855
3896
|
{
|
|
3856
3897
|
className: "searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all",
|
|
3857
3898
|
onClick: () => {
|
|
3858
3899
|
O();
|
|
3859
3900
|
},
|
|
3860
|
-
children: /* @__PURE__ */
|
|
3901
|
+
children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-label", children: "Clear Filters" })
|
|
3861
3902
|
}
|
|
3862
3903
|
)
|
|
3863
3904
|
] }),
|
|
3864
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ u.jsxs(
|
|
3865
3906
|
"div",
|
|
3866
3907
|
{
|
|
3867
3908
|
className: `searchstax-facets-mobile-overlay ${//@ts-ignore
|
|
3868
3909
|
s.overlayOpened ? "searchstax-show" : ""}`,
|
|
3869
3910
|
children: [
|
|
3870
|
-
/* @__PURE__ */
|
|
3871
|
-
/* @__PURE__ */
|
|
3872
|
-
/* @__PURE__ */
|
|
3911
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-mobile-overlay-header", children: [
|
|
3912
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-mobile-overlay-header-title", children: "Filter By" }),
|
|
3913
|
+
/* @__PURE__ */ u.jsx(
|
|
3873
3914
|
"div",
|
|
3874
3915
|
{
|
|
3875
3916
|
className: "searchstax-search-close",
|
|
@@ -3879,42 +3920,42 @@ function Pa(i) {
|
|
|
3879
3920
|
}
|
|
3880
3921
|
)
|
|
3881
3922
|
] }),
|
|
3882
|
-
/* @__PURE__ */
|
|
3923
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-container-mobile", children: s == null ? void 0 : s.facets.map((v) => /* @__PURE__ */ u.jsx(
|
|
3883
3924
|
"div",
|
|
3884
3925
|
{
|
|
3885
|
-
className: `searchstax-facet-container ${R(
|
|
3886
|
-
children: /* @__PURE__ */
|
|
3887
|
-
/* @__PURE__ */
|
|
3926
|
+
className: `searchstax-facet-container ${R(v.name) ? "active" : ""}`,
|
|
3927
|
+
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3928
|
+
/* @__PURE__ */ u.jsxs(
|
|
3888
3929
|
"div",
|
|
3889
3930
|
{
|
|
3890
3931
|
className: "searchstax-facet-title-container",
|
|
3891
3932
|
onClick: () => {
|
|
3892
|
-
k(
|
|
3933
|
+
k(v.name);
|
|
3893
3934
|
},
|
|
3894
3935
|
children: [
|
|
3895
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
3896
3937
|
" ",
|
|
3897
|
-
|
|
3938
|
+
v.label,
|
|
3898
3939
|
" "
|
|
3899
3940
|
] }),
|
|
3900
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-title-arrow active" })
|
|
3901
3942
|
]
|
|
3902
3943
|
}
|
|
3903
3944
|
),
|
|
3904
|
-
/* @__PURE__ */
|
|
3905
|
-
|
|
3945
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3946
|
+
v.values.map(
|
|
3906
3947
|
//@ts-ignore
|
|
3907
|
-
(b, j) => (d[j +
|
|
3948
|
+
(b, j) => (d[j + v.name] = et(), /* @__PURE__ */ u.jsxs(
|
|
3908
3949
|
"div",
|
|
3909
3950
|
{
|
|
3910
3951
|
className: `searchstax-facet-value-container ${b.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3911
|
-
ref: d[j +
|
|
3952
|
+
ref: d[j + v.name],
|
|
3912
3953
|
children: [
|
|
3913
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ u.jsx(
|
|
3914
3955
|
"div",
|
|
3915
3956
|
{
|
|
3916
|
-
className: "searchstax-facet-input mobile-" + j +
|
|
3917
|
-
children: /* @__PURE__ */
|
|
3957
|
+
className: "searchstax-facet-input mobile-" + j + v.name,
|
|
3958
|
+
children: /* @__PURE__ */ u.jsx(
|
|
3918
3959
|
"input",
|
|
3919
3960
|
{
|
|
3920
3961
|
type: "checkbox",
|
|
@@ -3922,10 +3963,10 @@ function Pa(i) {
|
|
|
3922
3963
|
checked: E(b),
|
|
3923
3964
|
readOnly: !0,
|
|
3924
3965
|
disabled: b.disabled,
|
|
3925
|
-
onClick: (
|
|
3966
|
+
onClick: (_) => {
|
|
3926
3967
|
T(
|
|
3927
|
-
j +
|
|
3928
|
-
|
|
3968
|
+
j + v.name,
|
|
3969
|
+
_,
|
|
3929
3970
|
b,
|
|
3930
3971
|
!0,
|
|
3931
3972
|
!0
|
|
@@ -3935,28 +3976,28 @@ function Pa(i) {
|
|
|
3935
3976
|
)
|
|
3936
3977
|
}
|
|
3937
3978
|
),
|
|
3938
|
-
/* @__PURE__ */
|
|
3979
|
+
/* @__PURE__ */ u.jsx(
|
|
3939
3980
|
"div",
|
|
3940
3981
|
{
|
|
3941
3982
|
className: "searchstax-facet-value-label",
|
|
3942
|
-
onClick: (
|
|
3983
|
+
onClick: (_) => {
|
|
3943
3984
|
T(
|
|
3944
|
-
j +
|
|
3945
|
-
|
|
3985
|
+
j + v.name,
|
|
3986
|
+
_,
|
|
3946
3987
|
b
|
|
3947
3988
|
);
|
|
3948
3989
|
},
|
|
3949
3990
|
children: b.value
|
|
3950
3991
|
}
|
|
3951
3992
|
),
|
|
3952
|
-
/* @__PURE__ */
|
|
3993
|
+
/* @__PURE__ */ u.jsxs(
|
|
3953
3994
|
"div",
|
|
3954
3995
|
{
|
|
3955
3996
|
className: "searchstax-facet-value-count",
|
|
3956
|
-
onClick: (
|
|
3997
|
+
onClick: (_) => {
|
|
3957
3998
|
T(
|
|
3958
|
-
j +
|
|
3959
|
-
|
|
3999
|
+
j + v.name,
|
|
4000
|
+
_,
|
|
3960
4001
|
b
|
|
3961
4002
|
);
|
|
3962
4003
|
},
|
|
@@ -3972,21 +4013,21 @@ function Pa(i) {
|
|
|
3972
4013
|
b.value + b.parentName
|
|
3973
4014
|
))
|
|
3974
4015
|
),
|
|
3975
|
-
/* @__PURE__ */
|
|
4016
|
+
/* @__PURE__ */ u.jsx(
|
|
3976
4017
|
"div",
|
|
3977
4018
|
{
|
|
3978
4019
|
className: "searchstax-facet-show-more-container",
|
|
3979
4020
|
"v-if": "facet.hasMoreFacets",
|
|
3980
|
-
children: /* @__PURE__ */
|
|
4021
|
+
children: /* @__PURE__ */ u.jsxs(
|
|
3981
4022
|
"div",
|
|
3982
4023
|
{
|
|
3983
4024
|
className: "searchstax-facet-show-more-container",
|
|
3984
4025
|
onClick: (b) => {
|
|
3985
|
-
|
|
4026
|
+
B(b, v);
|
|
3986
4027
|
},
|
|
3987
4028
|
children: [
|
|
3988
|
-
|
|
3989
|
-
!
|
|
4029
|
+
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
4030
|
+
!v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
3990
4031
|
]
|
|
3991
4032
|
}
|
|
3992
4033
|
)
|
|
@@ -3995,9 +4036,9 @@ function Pa(i) {
|
|
|
3995
4036
|
] })
|
|
3996
4037
|
] })
|
|
3997
4038
|
},
|
|
3998
|
-
|
|
4039
|
+
v.name + "mobile"
|
|
3999
4040
|
)) }),
|
|
4000
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ u.jsx(
|
|
4001
4042
|
"button",
|
|
4002
4043
|
{
|
|
4003
4044
|
className: "searchstax-facets-mobile-overlay-done",
|
|
@@ -4011,7 +4052,7 @@ function Pa(i) {
|
|
|
4011
4052
|
}
|
|
4012
4053
|
)
|
|
4013
4054
|
] }) }),
|
|
4014
|
-
i.facetsTemplateMobile && /* @__PURE__ */
|
|
4055
|
+
i.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateMobile(
|
|
4015
4056
|
s,
|
|
4016
4057
|
r,
|
|
4017
4058
|
d,
|
|
@@ -4020,16 +4061,16 @@ function Pa(i) {
|
|
|
4020
4061
|
T,
|
|
4021
4062
|
E,
|
|
4022
4063
|
S,
|
|
4023
|
-
|
|
4064
|
+
B,
|
|
4024
4065
|
A,
|
|
4025
4066
|
Q,
|
|
4026
4067
|
O
|
|
4027
4068
|
) })
|
|
4028
4069
|
] }) });
|
|
4029
4070
|
}
|
|
4030
|
-
function
|
|
4071
|
+
function Pa(i) {
|
|
4031
4072
|
let e = !1;
|
|
4032
|
-
const [t, s] =
|
|
4073
|
+
const [t, s] = q(null), [a] = q(Math.random());
|
|
4033
4074
|
ee(() => {
|
|
4034
4075
|
if (r(), C.searchstax)
|
|
4035
4076
|
C.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + a, {
|
|
@@ -4047,15 +4088,15 @@ function Ia(i) {
|
|
|
4047
4088
|
), e = !0);
|
|
4048
4089
|
}
|
|
4049
4090
|
function c(l) {
|
|
4050
|
-
var
|
|
4051
|
-
(
|
|
4091
|
+
var o;
|
|
4092
|
+
(o = C.searchstax.relatedSearchesWidget) == null || o.executeSearch(l);
|
|
4052
4093
|
}
|
|
4053
|
-
return /* @__PURE__ */
|
|
4054
|
-
!i.searchRelatedSearchesTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasRelatedSearches) && /* @__PURE__ */
|
|
4094
|
+
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4095
|
+
!i.searchRelatedSearchesTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasRelatedSearches) && /* @__PURE__ */ u.jsxs("div", { className: "searchstax-related-searches-container", id: "searchstax-related-searches-container", children: [
|
|
4055
4096
|
" ",
|
|
4056
4097
|
"Related searches: ",
|
|
4057
|
-
/* @__PURE__ */
|
|
4058
|
-
t.relatedSearches && /* @__PURE__ */
|
|
4098
|
+
/* @__PURE__ */ u.jsx("span", { id: "searchstax-related-searches" }),
|
|
4099
|
+
t.relatedSearches && /* @__PURE__ */ u.jsx("span", { className: "searchstax-related-search", children: t.relatedSearches.map((l) => /* @__PURE__ */ u.jsxs(
|
|
4059
4100
|
"span",
|
|
4060
4101
|
{
|
|
4061
4102
|
onClick: () => {
|
|
@@ -4065,20 +4106,20 @@ function Ia(i) {
|
|
|
4065
4106
|
children: [
|
|
4066
4107
|
" ",
|
|
4067
4108
|
l.related_search,
|
|
4068
|
-
!l.last && /* @__PURE__ */
|
|
4109
|
+
!l.last && /* @__PURE__ */ u.jsx("span", { children: "," })
|
|
4069
4110
|
]
|
|
4070
4111
|
},
|
|
4071
4112
|
l.related_search
|
|
4072
4113
|
)) })
|
|
4073
4114
|
] }),
|
|
4074
|
-
i.searchRelatedSearchesTemplate && /* @__PURE__ */
|
|
4115
|
+
i.searchRelatedSearchesTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchRelatedSearchesTemplate(t, c) })
|
|
4075
4116
|
] });
|
|
4076
4117
|
}
|
|
4077
4118
|
function ja(i) {
|
|
4078
4119
|
let e = !1;
|
|
4079
|
-
const [t, s] =
|
|
4120
|
+
const [t, s] = q(
|
|
4080
4121
|
null
|
|
4081
|
-
), [a] =
|
|
4122
|
+
), [a] = q(Math.random());
|
|
4082
4123
|
ee(() => {
|
|
4083
4124
|
if (r(), C.searchstax)
|
|
4084
4125
|
C.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + a, {});
|
|
@@ -4092,45 +4133,45 @@ function ja(i) {
|
|
|
4092
4133
|
}
|
|
4093
4134
|
), e = !0);
|
|
4094
4135
|
}
|
|
4095
|
-
function c(l,
|
|
4136
|
+
function c(l, o) {
|
|
4096
4137
|
var d;
|
|
4097
|
-
(d = C.searchstax.externalPromotionsWidget) == null || d.trackClick(l,
|
|
4138
|
+
(d = C.searchstax.externalPromotionsWidget) == null || d.trackClick(l, o);
|
|
4098
4139
|
}
|
|
4099
|
-
return /* @__PURE__ */
|
|
4100
|
-
!i.searchExternalPromotionsTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasExternalPromotions) && /* @__PURE__ */
|
|
4101
|
-
/* @__PURE__ */
|
|
4102
|
-
l.url && /* @__PURE__ */
|
|
4140
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-external-promotions-layout-container" + a, children: [
|
|
4141
|
+
!i.searchExternalPromotionsTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasExternalPromotions) && /* @__PURE__ */ u.jsx(u.Fragment, { children: t.externalPromotions.map((l) => /* @__PURE__ */ u.jsxs("div", { className: "searchstax-external-promotion searchstax-search-result", children: [
|
|
4142
|
+
/* @__PURE__ */ u.jsx("div", { className: "icon-elevated" }),
|
|
4143
|
+
l.url && /* @__PURE__ */ u.jsx(
|
|
4103
4144
|
"a",
|
|
4104
4145
|
{
|
|
4105
4146
|
href: l.url,
|
|
4106
|
-
onClick: (
|
|
4107
|
-
c(l,
|
|
4147
|
+
onClick: (o) => {
|
|
4148
|
+
c(l, o);
|
|
4108
4149
|
},
|
|
4109
4150
|
className: "searchstax-result-item-link"
|
|
4110
4151
|
}
|
|
4111
4152
|
),
|
|
4112
|
-
/* @__PURE__ */
|
|
4113
|
-
l.description && /* @__PURE__ */
|
|
4153
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ u.jsx("span", { className: "searchstax-search-result-title", children: l.name }) }),
|
|
4154
|
+
l.description && /* @__PURE__ */ u.jsxs("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: [
|
|
4114
4155
|
" ",
|
|
4115
4156
|
l.description,
|
|
4116
4157
|
" "
|
|
4117
4158
|
] }),
|
|
4118
|
-
l.url && /* @__PURE__ */
|
|
4159
|
+
l.url && /* @__PURE__ */ u.jsxs("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: [
|
|
4119
4160
|
" ",
|
|
4120
4161
|
l.url,
|
|
4121
4162
|
" "
|
|
4122
4163
|
] })
|
|
4123
4164
|
] }, l.id)) }),
|
|
4124
|
-
i.searchExternalPromotionsTemplate && /* @__PURE__ */
|
|
4165
|
+
i.searchExternalPromotionsTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchExternalPromotionsTemplate(t, c) })
|
|
4125
4166
|
] }) });
|
|
4126
4167
|
}
|
|
4127
4168
|
export {
|
|
4128
4169
|
ja as SearchstaxExternalPromotionsWidget,
|
|
4129
|
-
|
|
4170
|
+
Ia as SearchstaxFacetsWidget,
|
|
4130
4171
|
La as SearchstaxInputWidget,
|
|
4131
4172
|
Ea as SearchstaxOverviewWidget,
|
|
4132
4173
|
Ra as SearchstaxPaginationWidget,
|
|
4133
|
-
|
|
4174
|
+
Pa as SearchstaxRelatedSearchesWidget,
|
|
4134
4175
|
ka as SearchstaxResultWidget,
|
|
4135
4176
|
wa as SearchstaxSortingWidget,
|
|
4136
4177
|
Ta as SearchstaxWrapper
|