@searchstax-inc/searchstudio-ux-react 0.3.3 → 0.3.15
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 +123 -70
- package/dist/@searchstax-inc/components/SearchstaxResultWidget.d.ts +1 -1
- package/dist/@searchstax-inc/searchstudio-ux-react.cjs +26 -28
- package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +26 -28
- package/dist/@searchstax-inc/searchstudio-ux-react.mjs +688 -628
- package/package.json +2 -2
|
@@ -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
|
|
20
|
-
d !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
s.call(
|
|
18
|
+
function c(l, o, d) {
|
|
19
|
+
var f, g = {}, m = null, S = null;
|
|
20
|
+
d !== void 0 && (m = "" + d), o.key !== void 0 && (m = "" + o.key), o.ref !== void 0 && (S = o.ref);
|
|
21
|
+
for (f in o)
|
|
22
|
+
s.call(o, f) && !r.hasOwnProperty(f) && (g[f] = o[f]);
|
|
23
23
|
if (l && l.defaultProps)
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof: e, type: l, key:
|
|
24
|
+
for (f in o = l.defaultProps, o)
|
|
25
|
+
g[f] === void 0 && (g[f] = o[f]);
|
|
26
|
+
return { $$typeof: e, type: l, key: m, ref: S, props: g, _owner: a.current };
|
|
27
27
|
}
|
|
28
28
|
return le.Fragment = t, le.jsx = c, le.jsxs = c, le;
|
|
29
29
|
}
|
|
@@ -40,15 +40,15 @@ 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"),
|
|
44
|
-
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"), o = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), O = Symbol.iterator, T = "@@iterator";
|
|
44
|
+
function R(n) {
|
|
45
45
|
if (n === null || typeof n != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var p = O && n[O] || n[
|
|
47
|
+
var p = O && n[O] || n[T];
|
|
48
48
|
return typeof p == "function" ? p : null;
|
|
49
49
|
}
|
|
50
50
|
var E = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function
|
|
51
|
+
function k(n) {
|
|
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];
|
|
@@ -65,10 +65,10 @@ function Mt() {
|
|
|
65
65
|
M.unshift("Warning: " + p), Function.prototype.apply.call(console[n], console, M);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var W = !1, A = !1, K = !1, v = !1, x = !1, j;
|
|
69
69
|
j = Symbol.for("react.module.reference");
|
|
70
70
|
function _(n) {
|
|
71
|
-
return !!(typeof n == "string" || typeof n == "function" || n === s || n === r ||
|
|
71
|
+
return !!(typeof n == "string" || typeof n == "function" || n === s || n === r || x || n === a || n === d || n === f || v || n === S || W || A || K || typeof n == "object" && n !== null && (n.$$typeof === m || n.$$typeof === g || 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.
|
|
@@ -84,10 +84,10 @@ function Mt() {
|
|
|
84
84
|
function pe(n) {
|
|
85
85
|
return n.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Q(n) {
|
|
88
88
|
if (n == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof n.tag == "number" &&
|
|
90
|
+
if (typeof n.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
91
91
|
return n.displayName || n.name || null;
|
|
92
92
|
if (typeof n == "string")
|
|
93
93
|
return n;
|
|
@@ -102,7 +102,7 @@ function Mt() {
|
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case d:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case f:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof n == "object")
|
|
@@ -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
|
-
case
|
|
118
|
+
case g:
|
|
119
119
|
var L = n.displayName || null;
|
|
120
|
-
return L !== null ? L :
|
|
121
|
-
case
|
|
120
|
+
return L !== null ? L : Q(n.type) || "Memo";
|
|
121
|
+
case m: {
|
|
122
122
|
var F = n, M = F._payload, I = F._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return Q(I(M));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -188,7 +188,7 @@ function Mt() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
ne < 0 &&
|
|
191
|
+
ne < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var be = E.ReactCurrentDispatcher, Ce;
|
|
@@ -298,16 +298,16 @@ function Mt() {
|
|
|
298
298
|
switch (n) {
|
|
299
299
|
case d:
|
|
300
300
|
return me("Suspense");
|
|
301
|
-
case
|
|
301
|
+
case f:
|
|
302
302
|
return me("SuspenseList");
|
|
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
|
-
case
|
|
308
|
+
case g:
|
|
309
309
|
return ve(n.type, p, y);
|
|
310
|
-
case
|
|
310
|
+
case m: {
|
|
311
311
|
var L = n, F = L._payload, M = L._init;
|
|
312
312
|
try {
|
|
313
313
|
return ve(M(F), p, y);
|
|
@@ -340,7 +340,7 @@ function Mt() {
|
|
|
340
340
|
} catch ($) {
|
|
341
341
|
w = $;
|
|
342
342
|
}
|
|
343
|
-
w && !(w instanceof Error) && (xe(F),
|
|
343
|
+
w && !(w instanceof Error) && (xe(F), k("%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), k("Failed %s type: %s", y, w.message), xe(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -366,15 +366,15 @@ function Mt() {
|
|
|
366
366
|
}
|
|
367
367
|
function Ve(n) {
|
|
368
368
|
if (mt(n))
|
|
369
|
-
return
|
|
369
|
+
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", pt(n)), Be(n);
|
|
370
370
|
}
|
|
371
371
|
var ce = E.ReactCurrentOwner, ft = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
}, Ue,
|
|
377
|
-
|
|
376
|
+
}, Ue, Ke, ke;
|
|
377
|
+
ke = {};
|
|
378
378
|
function vt(n) {
|
|
379
379
|
if (ye.call(n, "ref")) {
|
|
380
380
|
var p = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
@@ -393,14 +393,14 @@ function Mt() {
|
|
|
393
393
|
}
|
|
394
394
|
function xt(n, p) {
|
|
395
395
|
if (typeof n.ref == "string" && ce.current && p && ce.current.stateNode !== p) {
|
|
396
|
-
var y =
|
|
397
|
-
|
|
396
|
+
var y = Q(ce.current.type);
|
|
397
|
+
ke[y] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Q(ce.current.type), n.ref), ke[y] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function bt(n, p) {
|
|
401
401
|
{
|
|
402
402
|
var y = function() {
|
|
403
|
-
Ue || (Ue = !0,
|
|
403
|
+
Ue || (Ue = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
404
404
|
};
|
|
405
405
|
y.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
406
406
|
get: y,
|
|
@@ -411,7 +411,7 @@ function Mt() {
|
|
|
411
411
|
function Ct(n, p) {
|
|
412
412
|
{
|
|
413
413
|
var y = function() {
|
|
414
|
-
|
|
414
|
+
Ke || (Ke = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
415
415
|
};
|
|
416
416
|
y.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
417
417
|
get: y,
|
|
@@ -466,13 +466,13 @@ function Mt() {
|
|
|
466
466
|
return St(n, w, V, F, L, ce.current, I);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
469
|
+
var Te = E.ReactCurrentOwner, Qe = E.ReactDebugCurrentFrame;
|
|
470
470
|
function te(n) {
|
|
471
471
|
if (n) {
|
|
472
472
|
var p = n._owner, y = ve(n.type, n._source, p ? p.type : null);
|
|
473
|
-
|
|
473
|
+
Qe.setExtraStackFrame(y);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
Qe.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
477
|
var Re;
|
|
478
478
|
Re = !1;
|
|
@@ -481,8 +481,8 @@ function Mt() {
|
|
|
481
481
|
}
|
|
482
482
|
function ze() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var n =
|
|
484
|
+
if (Te.current) {
|
|
485
|
+
var n = Q(Te.current.type);
|
|
486
486
|
if (n)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -491,7 +491,7 @@ Check the render method of \`` + n + "`.";
|
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function kt(n) {
|
|
495
495
|
{
|
|
496
496
|
if (n !== void 0) {
|
|
497
497
|
var p = n.fileName.replace(/^.*[\\\/]/, ""), y = n.lineNumber;
|
|
@@ -503,7 +503,7 @@ Check your code at ` + p + ":" + y + ".";
|
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
var Je = {};
|
|
506
|
-
function
|
|
506
|
+
function Tt(n) {
|
|
507
507
|
{
|
|
508
508
|
var p = ze();
|
|
509
509
|
if (!p) {
|
|
@@ -520,12 +520,12 @@ Check the top-level render call using <` + y + ">.");
|
|
|
520
520
|
if (!n._store || n._store.validated || n.key != null)
|
|
521
521
|
return;
|
|
522
522
|
n._store.validated = !0;
|
|
523
|
-
var y =
|
|
523
|
+
var y = Tt(p);
|
|
524
524
|
if (Je[y])
|
|
525
525
|
return;
|
|
526
526
|
Je[y] = !0;
|
|
527
527
|
var L = "";
|
|
528
|
-
n && n._owner && n._owner !==
|
|
528
|
+
n && n._owner && n._owner !== Te.current && (L = " It was passed a child from " + Q(n._owner.type) + "."), te(n), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, L), te(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function Ge(n, p) {
|
|
@@ -540,7 +540,7 @@ Check the top-level render call using <` + y + ">.");
|
|
|
540
540
|
else if (we(n))
|
|
541
541
|
n._store && (n._store.validated = !0);
|
|
542
542
|
else if (n) {
|
|
543
|
-
var F =
|
|
543
|
+
var F = R(n);
|
|
544
544
|
if (typeof F == "function" && F !== n.entries)
|
|
545
545
|
for (var M = F.call(n), I; !(I = M.next()).done; )
|
|
546
546
|
we(I.value) && Ye(I.value, p);
|
|
@@ -555,21 +555,21 @@ 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
|
-
p.$$typeof ===
|
|
560
|
+
p.$$typeof === g))
|
|
561
561
|
y = p.propTypes;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (y) {
|
|
565
|
-
var L =
|
|
565
|
+
var L = Q(p);
|
|
566
566
|
dt(y, n.props, "prop", L, n);
|
|
567
567
|
} else if (p.PropTypes !== void 0 && !Re) {
|
|
568
568
|
Re = !0;
|
|
569
|
-
var F =
|
|
570
|
-
|
|
569
|
+
var F = Q(p);
|
|
570
|
+
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
function wt(n) {
|
|
@@ -577,11 +577,11 @@ Check the top-level render call using <` + y + ">.");
|
|
|
577
577
|
for (var p = Object.keys(n.props), y = 0; y < p.length; y++) {
|
|
578
578
|
var L = p[y];
|
|
579
579
|
if (L !== "children" && L !== "key") {
|
|
580
|
-
te(n),
|
|
580
|
+
te(n), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", L), te(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
n.ref !== null && (te(n),
|
|
584
|
+
n.ref !== null && (te(n), k("Invalid attribute `ref` supplied to `React.Fragment`."), te(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
function Xe(n, p, y, L, F, M) {
|
|
@@ -590,10 +590,10 @@ Check the top-level render call using <` + y + ">.");
|
|
|
590
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
|
-
var V =
|
|
593
|
+
var V = kt(F);
|
|
594
594
|
V ? w += V : w += ze();
|
|
595
595
|
var $;
|
|
596
|
-
n === null ? $ = "null" : Le(n) ? $ = "array" : n !== void 0 && n.$$typeof === e ? ($ = "<" + (
|
|
596
|
+
n === null ? $ = "null" : Le(n) ? $ = "array" : n !== void 0 && n.$$typeof === e ? ($ = "<" + (Q(n.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof n, k("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
598
|
var H = Lt(n, p, y, F, M);
|
|
599
599
|
if (H == null)
|
|
@@ -607,7 +607,7 @@ Check the top-level render call using <` + y + ">.");
|
|
|
607
607
|
Ge(z[ae], n);
|
|
608
608
|
Object.freeze && Object.freeze(z);
|
|
609
609
|
} else
|
|
610
|
-
|
|
610
|
+
k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
611
611
|
else
|
|
612
612
|
Ge(z, n);
|
|
613
613
|
}
|
|
@@ -625,10 +625,10 @@ Check the top-level render call using <` + y + ">.");
|
|
|
625
625
|
}()), oe;
|
|
626
626
|
}
|
|
627
627
|
process.env.NODE_ENV === "production" ? Pe.exports = Ot() : Pe.exports = Mt();
|
|
628
|
-
var
|
|
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), B = /* @__PURE__ */ ((i) => (i[i.mustache = 0] = "mustache", i[i.vue = 1] = "vue", i[i.react = 2] = "react", i[i.angular = 3] = "angular", i))(B || {});
|
|
629
629
|
class Nt {
|
|
630
630
|
constructor(e) {
|
|
631
|
-
|
|
631
|
+
h(this, "dataLayer"), this.dataLayer = e;
|
|
632
632
|
}
|
|
633
633
|
get currentPage() {
|
|
634
634
|
var e;
|
|
@@ -709,7 +709,7 @@ class Nt {
|
|
|
709
709
|
return t ? (((e = this.dataLayer.searchObject) == null ? void 0 : e.facets) ?? []).map((s) => {
|
|
710
710
|
const a = s.name, r = s.value, c = t.find((l) => l.name === a);
|
|
711
711
|
if (c) {
|
|
712
|
-
const l = c.values.find((
|
|
712
|
+
const l = c.values.find((o) => o.type === "range" ? !1 : o.type === "checkbox" ? '"' + o.value + '"' === r : !1);
|
|
713
713
|
if (l)
|
|
714
714
|
return l;
|
|
715
715
|
}
|
|
@@ -774,8 +774,8 @@ class J {
|
|
|
774
774
|
if (s.length !== a.length)
|
|
775
775
|
return !1;
|
|
776
776
|
for (const r of s) {
|
|
777
|
-
const c = e[r], l = t[r],
|
|
778
|
-
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)
|
|
779
779
|
return !1;
|
|
780
780
|
}
|
|
781
781
|
return !0;
|
|
@@ -786,7 +786,7 @@ class J {
|
|
|
786
786
|
}
|
|
787
787
|
class D {
|
|
788
788
|
constructor(e) {
|
|
789
|
-
|
|
789
|
+
h(this, "value"), h(this, "observers", []), this.value = e, this.observers = [];
|
|
790
790
|
}
|
|
791
791
|
subscribe(e) {
|
|
792
792
|
this.observers.push(e), e(this.value);
|
|
@@ -854,14 +854,14 @@ class Z {
|
|
|
854
854
|
}
|
|
855
855
|
class $t {
|
|
856
856
|
constructor(e, t) {
|
|
857
|
-
|
|
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({
|
|
858
858
|
query: "",
|
|
859
859
|
itemsPerPage: null,
|
|
860
860
|
page: 99999999,
|
|
861
861
|
order: "",
|
|
862
862
|
facets: [],
|
|
863
863
|
additionalProps: []
|
|
864
|
-
})),
|
|
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", B.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
865
|
this.cookieHandlingCallback(t);
|
|
866
866
|
});
|
|
867
867
|
}
|
|
@@ -1035,25 +1035,25 @@ class $t {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
class he {
|
|
1037
1037
|
static combineResultsWithMetadata(e) {
|
|
1038
|
-
const t = [], s = parseInt(e.response.start + "") - 1
|
|
1039
|
-
return e.response.docs.forEach((
|
|
1040
|
-
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 = {
|
|
1041
1041
|
custom: null,
|
|
1042
|
-
uniqueId:
|
|
1043
|
-
position: s
|
|
1044
|
-
ribbon: this.doesMapExist("ribbon", e) ? this.getValueByKey("ribbon",
|
|
1045
|
-
paths: this.doesMapExist("paths", e) ? this.getValueByKey("paths",
|
|
1046
|
-
url: this.doesMapExist("url", e) ? this.getValueByKey("url",
|
|
1047
|
-
title: this.doesMapExist("title", e) ? this.getValueByKey("title",
|
|
1048
|
-
promoted:
|
|
1049
|
-
thumbnail: this.doesMapExist("thumbnail", e) ? this.getValueByKey("thumbnail",
|
|
1050
|
-
date: this.doesMapExist("date", e) ? this.getValueByKey("date",
|
|
1051
|
-
snippet: this.doesMapExist("snippet", e) ? this.getValueByKey("snippet",
|
|
1052
|
-
description: this.doesMapExist("description", e) ? this.getValueByKey("description",
|
|
1053
|
-
unmappedFields: this.getUnmappedFields(
|
|
1054
|
-
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)
|
|
1055
1055
|
};
|
|
1056
|
-
t.push(
|
|
1056
|
+
t.push(c);
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
1059
|
static extractFacets(e) {
|
|
@@ -1073,30 +1073,30 @@ class he {
|
|
|
1073
1073
|
return t;
|
|
1074
1074
|
}
|
|
1075
1075
|
static extractSearchResultsMetadata(e) {
|
|
1076
|
-
var t, s, a, r, c;
|
|
1077
|
-
let
|
|
1076
|
+
var t, s, a, r, c, l;
|
|
1077
|
+
let o = "", d = {
|
|
1078
1078
|
selectedSortOption: "",
|
|
1079
1079
|
options: []
|
|
1080
|
-
},
|
|
1080
|
+
}, f = (t = e.metadata.results.find(
|
|
1081
1081
|
(g) => g.result_card === "date"
|
|
1082
1082
|
)) == null ? void 0 : t.name;
|
|
1083
|
-
if (
|
|
1083
|
+
if (d.options = [
|
|
1084
1084
|
{ key: "", value: "Relevance" },
|
|
1085
|
-
{ key:
|
|
1086
|
-
], e.metadata.sorts.length) {
|
|
1085
|
+
{ key: f + " desc", value: "Most Recent" }
|
|
1086
|
+
], (s = e.metadata.sorts) != null && s.length) {
|
|
1087
1087
|
const g = e.metadata.sorts.map((m) => ({ value: m.label, key: m.name + " " + m.order }));
|
|
1088
|
-
|
|
1088
|
+
d.options = [{ key: "", value: "Relevance" }, ...g];
|
|
1089
1089
|
}
|
|
1090
|
-
return
|
|
1090
|
+
return o = ((l = (c = (r = (a = e == null ? void 0 : e.spellcheck) == null ? void 0 : a.suggestions) == null ? void 0 : r[1]) == null ? void 0 : c.suggestion) == null ? void 0 : l[0]) ?? "", typeof o != "string" && (o = (o == null ? void 0 : o.word) ?? ""), {
|
|
1091
1091
|
recordsPerPageValue: parseInt(e.responseHeader.params.rows),
|
|
1092
1092
|
startDocVal: parseInt(e.response.start + ""),
|
|
1093
1093
|
totalResultsValue: parseInt(e.response.numFound + ""),
|
|
1094
1094
|
latency: parseInt(e.responseHeader.QTime + ""),
|
|
1095
1095
|
endDocValue: parseInt(e.responseHeader.params.rows) + parseInt(e.response.start + ""),
|
|
1096
|
-
spellingSuggestion:
|
|
1096
|
+
spellingSuggestion: o,
|
|
1097
1097
|
autoCorrectedQuery: e.responseHeader.params.autoCorrectedQ ?? "",
|
|
1098
1098
|
impressions: this.getImpressions(e),
|
|
1099
|
-
sorting:
|
|
1099
|
+
sorting: d
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
1102
|
static getImpressions(e) {
|
|
@@ -1154,7 +1154,7 @@ class he {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
class st {
|
|
1156
1156
|
constructor(e) {
|
|
1157
|
-
|
|
1157
|
+
h(this, "routeName", "searchstax"), h(this, "ignoredKeys", []), h(this, "queryStringHelper"), h(this, "titleParser"), e.routeName && (this.routeName = e.routeName), e.ignoredKeys && (this.ignoredKeys = e.ignoredKeys), e.title && (this.titleParser = e.title), this.queryStringHelper = new qt(this.routeName);
|
|
1158
1158
|
}
|
|
1159
1159
|
updateUrl(e) {
|
|
1160
1160
|
const t = this.searchObjectToUrl(e);
|
|
@@ -1202,12 +1202,12 @@ class st {
|
|
|
1202
1202
|
if (c.startsWith(this.routeName + "[facets]")) {
|
|
1203
1203
|
const l = Z.removeXSSRiskyTags(
|
|
1204
1204
|
(t = e[c].split(":")) == null ? void 0 : t[0]
|
|
1205
|
-
),
|
|
1205
|
+
), o = Z.removeXSSRiskyTags(
|
|
1206
1206
|
decodeURIComponent((s = e[c].split(":")) == null ? void 0 : s[1])
|
|
1207
1207
|
), d = Z.removeXSSRiskyTags(
|
|
1208
1208
|
decodeURIComponent((a = e[c].split(":")) == null ? void 0 : a[2])
|
|
1209
1209
|
);
|
|
1210
|
-
r.push({ type: l, name:
|
|
1210
|
+
r.push({ type: l, name: o, value: d });
|
|
1211
1211
|
}
|
|
1212
1212
|
return r;
|
|
1213
1213
|
}
|
|
@@ -1228,7 +1228,7 @@ class st {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
class qt {
|
|
1230
1230
|
constructor(e) {
|
|
1231
|
-
|
|
1231
|
+
h(this, "routeName", ""), h(this, "stringify", (t, s) => {
|
|
1232
1232
|
const a = this.filterOutIgnoredKeys(t, s.ignoredKeys);
|
|
1233
1233
|
return Object.keys(a).map((r) => {
|
|
1234
1234
|
const c = a[r];
|
|
@@ -1264,7 +1264,7 @@ const se = {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
class _t {
|
|
1266
1266
|
constructor(e, t) {
|
|
1267
|
-
|
|
1267
|
+
h(this, "cachedQuery", ""), h(this, "url", ""), h(this, "relatedSearches", ""), h(this, "suggester", ""), h(this, "authHeader"), h(this, "authHeaderRelated"), h(this, "trackApiKey", ""), h(this, "session", ""), h(this, "searchAuthType"), h(this, "searchAuth", ""), h(this, "controllerSearch"), h(this, "signalSearch"), h(this, "controllerSuggest"), h(this, "signalSuggest"), h(this, "dataLayer"), this.dataLayer = t, this.url = e.searchURL, this.dataLayer.setLanguage(e.language), this.suggester = e.suggesterURL, this.trackApiKey = e.trackApiKey, this.session = e.sessionId, this.searchAuthType = e.authType, this.searchAuth = e.searchAuth, this.authHeader = new Headers(), this.authHeader.append("Accept", "application/json");
|
|
1268
1268
|
const s = this.searchAuthType === "token" ? `Token ${e.searchAuth}` : `Basic ${e.searchAuth}`;
|
|
1269
1269
|
this.authHeader.append("Authorization", s), this.authHeaderRelated = new Headers(), this.authHeaderRelated.append("Accept", "application/json"), this.authHeaderRelated.append("Authorization", e.searchAuth);
|
|
1270
1270
|
}
|
|
@@ -1284,10 +1284,10 @@ class _t {
|
|
|
1284
1284
|
for (const r in a)
|
|
1285
1285
|
if (Object.prototype.hasOwnProperty.call(a, r)) {
|
|
1286
1286
|
const c = a[r], l = r;
|
|
1287
|
-
let
|
|
1287
|
+
let o = "";
|
|
1288
1288
|
for (const d of c)
|
|
1289
|
-
|
|
1290
|
-
s = s.concat("fq=" +
|
|
1289
|
+
o += ` ${l}:"${d}"`;
|
|
1290
|
+
s = s.concat("fq=" + o.trim());
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
1293
|
return s.length ? "&" + s.join("&") : "";
|
|
@@ -1327,26 +1327,26 @@ class _t {
|
|
|
1327
1327
|
if (e.query && e.query !== "undefined" && e.itemsPerPage !== void 0) {
|
|
1328
1328
|
this.dataLayer.setSearchTerm(e.query), this.dataLayer.setLoading(!0), this.controllerSearch && this.controllerSearch.abort(), this.controllerSearch = new AbortController(), this.signalSearch = this.controllerSearch.signal;
|
|
1329
1329
|
const r = new Proxy(new URLSearchParams((window == null ? void 0 : window.location.search) ?? ""), {
|
|
1330
|
-
get: (
|
|
1330
|
+
get: (m, S) => m.get(S) ?? ""
|
|
1331
1331
|
}), c = r.languageVariant ? (
|
|
1332
1332
|
//@ts-expect-error - this is a hack to get around the fact that the urlQueryParams is a proxy
|
|
1333
1333
|
"&fq=_language:" + r.languageVariant
|
|
1334
1334
|
) : "";
|
|
1335
|
-
let l = e.itemsPerPage,
|
|
1336
|
-
const
|
|
1337
|
-
e.facets.filter((
|
|
1335
|
+
let l = e.itemsPerPage, o = e.itemsPerPage * (e.page - 1), d = e.order ? `&sort=${e.order}` : "";
|
|
1336
|
+
const f = this.url + "?q=" + encodeURIComponent(e.query.trim()) + "&start=" + o + this.toQueryString(e.additionalProps ?? []) + this.generateFacetQuery(
|
|
1337
|
+
e.facets.filter((m) => m.type === "or" || m.type === "showUnavailable"),
|
|
1338
1338
|
!0
|
|
1339
1339
|
) + this.generateFacetQuery(
|
|
1340
|
-
e.facets.filter((
|
|
1340
|
+
e.facets.filter((m) => m.type === "and" || m.type === "tabs"),
|
|
1341
1341
|
!1
|
|
1342
|
-
) + d + `&spellcheck.correct=${this.dataLayer.autoCorrect && !a}&rows=${l}&language=` + this.dataLayer.language + c,
|
|
1342
|
+
) + d + `&spellcheck.correct=${this.dataLayer.autoCorrect && !a}&rows=${l}&language=` + this.dataLayer.language + c, g = {
|
|
1343
1343
|
method: "GET",
|
|
1344
1344
|
headers: this.authHeader,
|
|
1345
1345
|
credentials: "same-origin",
|
|
1346
1346
|
signal: this.signalSearch
|
|
1347
1347
|
};
|
|
1348
|
-
s && delete
|
|
1349
|
-
this.dataLayer.setLoading(!1), t(
|
|
1348
|
+
s && delete g.signal, fetch(f, g).then((m) => m.json()).then((m) => {
|
|
1349
|
+
this.dataLayer.setLoading(!1), t(m);
|
|
1350
1350
|
}).catch(() => {
|
|
1351
1351
|
this.dataLayer.setLoading(!1);
|
|
1352
1352
|
});
|
|
@@ -1461,7 +1461,7 @@ class ue {
|
|
|
1461
1461
|
}, 0);
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
|
|
1464
|
+
h(ue, "msq", () => typeof window < "u" && window != null && window._msq ? window == null ? void 0 : window._msq : []);
|
|
1465
1465
|
/*!
|
|
1466
1466
|
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
|
1467
1467
|
* http://github.com/janl/mustache.js
|
|
@@ -1488,9 +1488,9 @@ var Vt = RegExp.prototype.test;
|
|
|
1488
1488
|
function Ut(i, e) {
|
|
1489
1489
|
return Vt.call(i, e);
|
|
1490
1490
|
}
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1493
|
-
return !Ut(
|
|
1491
|
+
var Kt = /\S/;
|
|
1492
|
+
function Qt(i) {
|
|
1493
|
+
return !Ut(Kt, i);
|
|
1494
1494
|
}
|
|
1495
1495
|
var zt = {
|
|
1496
1496
|
"&": "&",
|
|
@@ -1511,8 +1511,8 @@ var Yt = /\s*/, Gt = /\s+/, it = /\s*=/, Xt = /\s*\}/, Zt = /#|\^|\/|>|\{|&|=|!/
|
|
|
1511
1511
|
function ea(i, e) {
|
|
1512
1512
|
if (!i)
|
|
1513
1513
|
return [];
|
|
1514
|
-
var t = !1, s = [], a = [], r = [], c = !1, l = !1,
|
|
1515
|
-
function
|
|
1514
|
+
var t = !1, s = [], a = [], r = [], c = !1, l = !1, o = "", d = 0;
|
|
1515
|
+
function f() {
|
|
1516
1516
|
if (c && !l)
|
|
1517
1517
|
for (; r.length; )
|
|
1518
1518
|
delete a[r.pop()];
|
|
@@ -1520,34 +1520,34 @@ function ea(i, e) {
|
|
|
1520
1520
|
r = [];
|
|
1521
1521
|
c = !1, l = !1;
|
|
1522
1522
|
}
|
|
1523
|
-
var
|
|
1524
|
-
function O(
|
|
1525
|
-
if (typeof
|
|
1526
|
-
throw new Error("Invalid tags: " +
|
|
1527
|
-
|
|
1523
|
+
var g, m, S;
|
|
1524
|
+
function O(x) {
|
|
1525
|
+
if (typeof x == "string" && (x = x.split(Gt, 2)), !ie(x) || x.length !== 2)
|
|
1526
|
+
throw new Error("Invalid tags: " + x);
|
|
1527
|
+
g = new RegExp(Ie(x[0]) + "\\s*"), m = new RegExp("\\s*" + Ie(x[1])), S = new RegExp("\\s*" + Ie("}" + x[1]));
|
|
1528
1528
|
}
|
|
1529
1529
|
O(e || P.tags);
|
|
1530
|
-
for (var
|
|
1531
|
-
if (
|
|
1532
|
-
for (var
|
|
1533
|
-
N =
|
|
1534
|
-
` && (
|
|
1535
|
-
if (!
|
|
1530
|
+
for (var T = new ge(i), R, E, k, N, W, A; !T.eos(); ) {
|
|
1531
|
+
if (R = T.pos, k = T.scanUntil(g), k)
|
|
1532
|
+
for (var K = 0, v = k.length; K < v; ++K)
|
|
1533
|
+
N = k.charAt(K), Qt(N) ? (r.push(a.length), o += N) : (l = !0, t = !0, o += " "), a.push(["text", N, R, R + 1]), R += 1, N === `
|
|
1534
|
+
` && (f(), o = "", d = 0, t = !1);
|
|
1535
|
+
if (!T.scan(g))
|
|
1536
1536
|
break;
|
|
1537
|
-
if (c = !0, E =
|
|
1538
|
-
throw new Error("Unclosed tag at " +
|
|
1539
|
-
if (E == ">" ?
|
|
1540
|
-
s.push(
|
|
1537
|
+
if (c = !0, E = T.scan(Zt) || "name", T.scan(Yt), E === "=" ? (k = T.scanUntil(it), T.scan(it), T.scanUntil(m)) : E === "{" ? (k = T.scanUntil(S), T.scan(Xt), T.scanUntil(m), E = "&") : k = T.scanUntil(m), !T.scan(m))
|
|
1538
|
+
throw new Error("Unclosed tag at " + T.pos);
|
|
1539
|
+
if (E == ">" ? W = [E, k, R, T.pos, o, d, t] : W = [E, k, R, T.pos], d++, a.push(W), E === "#" || E === "^")
|
|
1540
|
+
s.push(W);
|
|
1541
1541
|
else if (E === "/") {
|
|
1542
1542
|
if (A = s.pop(), !A)
|
|
1543
|
-
throw new Error('Unopened section "' +
|
|
1544
|
-
if (A[1] !==
|
|
1545
|
-
throw new Error('Unclosed section "' + A[1] + '" at ' +
|
|
1543
|
+
throw new Error('Unopened section "' + k + '" at ' + R);
|
|
1544
|
+
if (A[1] !== k)
|
|
1545
|
+
throw new Error('Unclosed section "' + A[1] + '" at ' + R);
|
|
1546
1546
|
} else
|
|
1547
|
-
E === "name" || E === "{" || E === "&" ? l = !0 : E === "=" && O(
|
|
1547
|
+
E === "name" || E === "{" || E === "&" ? l = !0 : E === "=" && O(k);
|
|
1548
1548
|
}
|
|
1549
|
-
if (
|
|
1550
|
-
throw new Error('Unclosed section "' + A[1] + '" at ' +
|
|
1549
|
+
if (f(), A = s.pop(), A)
|
|
1550
|
+
throw new Error('Unclosed section "' + A[1] + '" at ' + T.pos);
|
|
1551
1551
|
return aa(ta(a));
|
|
1552
1552
|
}
|
|
1553
1553
|
function ta(i) {
|
|
@@ -1650,25 +1650,25 @@ U.prototype.render = function(i, e, t, s) {
|
|
|
1650
1650
|
return this.renderTokens(r, c, t, i, s);
|
|
1651
1651
|
};
|
|
1652
1652
|
U.prototype.renderTokens = function(i, e, t, s, a) {
|
|
1653
|
-
for (var r = "", c, l,
|
|
1654
|
-
|
|
1653
|
+
for (var r = "", c, l, o, d = 0, f = i.length; d < f; ++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);
|
|
1655
1655
|
return r;
|
|
1656
1656
|
};
|
|
1657
1657
|
U.prototype.renderSection = function(i, e, t, s, a) {
|
|
1658
1658
|
var r = this, c = "", l = e.lookup(i[1]);
|
|
1659
|
-
function
|
|
1660
|
-
return r.render(
|
|
1659
|
+
function o(g) {
|
|
1660
|
+
return r.render(g, e, t, a);
|
|
1661
1661
|
}
|
|
1662
1662
|
if (l) {
|
|
1663
1663
|
if (ie(l))
|
|
1664
|
-
for (var d = 0,
|
|
1664
|
+
for (var d = 0, f = l.length; d < f; ++d)
|
|
1665
1665
|
c += this.renderTokens(i[4], e.push(l[d]), t, s, a);
|
|
1666
1666
|
else if (typeof l == "object" || typeof l == "string" || typeof l == "number")
|
|
1667
1667
|
c += this.renderTokens(i[4], e.push(l), t, s, a);
|
|
1668
1668
|
else if (je(l)) {
|
|
1669
1669
|
if (typeof s != "string")
|
|
1670
1670
|
throw new Error("Cannot use higher-order sections without the original template");
|
|
1671
|
-
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);
|
|
1672
1672
|
} else
|
|
1673
1673
|
c += this.renderTokens(i[4], e, t, s, a);
|
|
1674
1674
|
return c;
|
|
@@ -1690,10 +1690,10 @@ U.prototype.renderPartial = function(i, e, t, s) {
|
|
|
1690
1690
|
if (t) {
|
|
1691
1691
|
var a = this.getConfigTags(s), r = je(t) ? t(i[1]) : t[i[1]];
|
|
1692
1692
|
if (r != null) {
|
|
1693
|
-
var c = i[6], l = i[5],
|
|
1694
|
-
l == 0 &&
|
|
1695
|
-
var
|
|
1696
|
-
return this.renderTokens(
|
|
1693
|
+
var c = i[6], l = i[5], o = i[4], d = r;
|
|
1694
|
+
l == 0 && o && (d = this.indentPartial(r, o, c));
|
|
1695
|
+
var f = this.parse(d, a);
|
|
1696
|
+
return this.renderTokens(f, e, t, d, s);
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
1699
|
};
|
|
@@ -1843,10 +1843,10 @@ const sa = {
|
|
|
1843
1843
|
template: `
|
|
1844
1844
|
<div class="searchstax-facet-show-more-container">
|
|
1845
1845
|
{{#showingAllFacets}}
|
|
1846
|
-
<div class="searchstax-facet-show-less-button searchstax-facet-show-button">less</div>
|
|
1846
|
+
<div class="searchstax-facet-show-less-button searchstax-facet-show-button" tabindex="0">less</div>
|
|
1847
1847
|
{{/showingAllFacets}}
|
|
1848
1848
|
{{^showingAllFacets}}
|
|
1849
|
-
<div class="searchstax-facet-show-more-button searchstax-facet-show-button">more {{onShowMoreLessClick}}</div>
|
|
1849
|
+
<div class="searchstax-facet-show-more-button searchstax-facet-show-button" tabindex="0">more {{onShowMoreLessClick}}</div>
|
|
1850
1850
|
{{/showingAllFacets}}
|
|
1851
1851
|
</div>
|
|
1852
1852
|
`,
|
|
@@ -1880,7 +1880,7 @@ const sa = {
|
|
|
1880
1880
|
facetItemTemplate: {
|
|
1881
1881
|
template: `
|
|
1882
1882
|
<div class="searchstax-facet-input">
|
|
1883
|
-
<input type="checkbox" class="searchstax-facet-input-checkbox" {{#disabled}}disabled{{/disabled}} {{#isChecked}}checked{{/isChecked}}/>
|
|
1883
|
+
<input type="checkbox" class="searchstax-facet-input-checkbox" {{#disabled}}disabled{{/disabled}} {{#isChecked}}checked{{/isChecked}} aria-label="{{value}} {{count}}" tabindex="0"/>
|
|
1884
1884
|
</div>
|
|
1885
1885
|
<div class="searchstax-facet-value-label">{{value}}</div>
|
|
1886
1886
|
<div class="searchstax-facet-value-count">({{count}})</div>
|
|
@@ -1914,11 +1914,11 @@ const sa = {
|
|
|
1914
1914
|
{{#results.length}}
|
|
1915
1915
|
<div class="searchstax-pagination-container">
|
|
1916
1916
|
<div class="searchstax-pagination-content">
|
|
1917
|
-
<a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous">< Previous</a>
|
|
1917
|
+
<a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous" tabindex="0">< Previous</a>
|
|
1918
1918
|
<div class="searchstax-pagination-details">
|
|
1919
1919
|
{{startResultIndex}} - {{endResultIndex}} of {{totalResults}}
|
|
1920
1920
|
</div>
|
|
1921
|
-
<a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next">Next ></a>
|
|
1921
|
+
<a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" id="searchstax-pagination-next" tabindex="0">Next ></a>
|
|
1922
1922
|
</div>
|
|
1923
1923
|
</div>
|
|
1924
1924
|
{{/results.length}}
|
|
@@ -1930,7 +1930,7 @@ const sa = {
|
|
|
1930
1930
|
template: `
|
|
1931
1931
|
{{#results.length}}
|
|
1932
1932
|
{{^isLastPage}}
|
|
1933
|
-
<a class="searchstax-pagination-load-more">Show More</a>
|
|
1933
|
+
<a class="searchstax-pagination-load-more" tabindex="0">Show More</a>
|
|
1934
1934
|
{{/isLastPage}}
|
|
1935
1935
|
{{/results.length}}
|
|
1936
1936
|
`,
|
|
@@ -1954,7 +1954,7 @@ const sa = {
|
|
|
1954
1954
|
},
|
|
1955
1955
|
relatedSearch: {
|
|
1956
1956
|
template: `
|
|
1957
|
-
<span class="searchstax-related-search searchstax-related-search-item">
|
|
1957
|
+
<span class="searchstax-related-search searchstax-related-search-item" tabindex="0">
|
|
1958
1958
|
{{ related_search }}{{^last}}<span>,</span>{{/last}}
|
|
1959
1959
|
</span>
|
|
1960
1960
|
`,
|
|
@@ -1983,8 +1983,8 @@ const sa = {
|
|
|
1983
1983
|
template: `
|
|
1984
1984
|
<div class="searchstax-search-input-container">
|
|
1985
1985
|
<div class="searchstax-search-input-wrapper">
|
|
1986
|
-
<input type="text" id="searchstax-search-input" class="searchstax-search-input" placeholder="SEARCH FOR..." />
|
|
1987
|
-
<button class="searchstax-spinner-icon" id="searchstax-search-input-action-button"></button>
|
|
1986
|
+
<input type="text" id="searchstax-search-input" class="searchstax-search-input" placeholder="SEARCH FOR..." aria-label="Search" />
|
|
1987
|
+
<button class="searchstax-spinner-icon" id="searchstax-search-input-action-button" aria-label="search"></button>
|
|
1988
1988
|
</div>
|
|
1989
1989
|
</div>
|
|
1990
1990
|
`,
|
|
@@ -2007,14 +2007,11 @@ const sa = {
|
|
|
2007
2007
|
searchResultTemplate: {
|
|
2008
2008
|
template: `
|
|
2009
2009
|
<div class="searchstax-search-result {{#thumbnail}} has-thumbnail {{/thumbnail}}">
|
|
2010
|
+
<a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link searchstax-result-item-link-wrapping" tabindex="0">
|
|
2010
2011
|
{{#promoted}}
|
|
2011
2012
|
<div class="searchstax-search-result-promoted"></div>
|
|
2012
2013
|
{{/promoted}}
|
|
2013
2014
|
|
|
2014
|
-
{{#url}}
|
|
2015
|
-
<a href="{{url}}" data-searchstax-unique-result-id="{{uniqueId}}" class="searchstax-result-item-link"></a>
|
|
2016
|
-
{{/url}}
|
|
2017
|
-
|
|
2018
2015
|
{{#ribbon}}
|
|
2019
2016
|
<div class="searchstax-search-result-ribbon">
|
|
2020
2017
|
{{ribbon}}
|
|
@@ -2052,6 +2049,7 @@ const sa = {
|
|
|
2052
2049
|
</p>
|
|
2053
2050
|
{{/isImage}}
|
|
2054
2051
|
{{/unmappedFields}}
|
|
2052
|
+
</a>
|
|
2055
2053
|
</div>
|
|
2056
2054
|
`,
|
|
2057
2055
|
searchResultUniqueIdAttribute: "data-searchstax-unique-result-id"
|
|
@@ -2063,13 +2061,13 @@ const sa = {
|
|
|
2063
2061
|
Showing <strong>no results</strong> for <strong>"{{ searchTerm }}"</strong>
|
|
2064
2062
|
<br>
|
|
2065
2063
|
{{#spellingSuggestion}}
|
|
2066
|
-
<span> Did you mean <a href="#" class="searchstax-suggestion-term">{{ spellingSuggestion }}</a>?</span>
|
|
2064
|
+
<span> Did you mean <a href="#" class="searchstax-suggestion-term" onclick="searchCallback('{{ spellingSuggestion }}')">{{ spellingSuggestion }}</a>?</span>
|
|
2067
2065
|
{{/spellingSuggestion}}
|
|
2068
2066
|
</div>
|
|
2069
|
-
<
|
|
2070
|
-
<
|
|
2071
|
-
<
|
|
2072
|
-
</
|
|
2067
|
+
<ul class="searchstax-no-results-list">
|
|
2068
|
+
<li>Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.</li>
|
|
2069
|
+
<li>Lost? Click on the ‘X” in the Search Box to reset your search.</li>
|
|
2070
|
+
</ul>
|
|
2073
2071
|
{{/searchExecuted}}
|
|
2074
2072
|
`
|
|
2075
2073
|
}
|
|
@@ -2079,7 +2077,7 @@ const sa = {
|
|
|
2079
2077
|
{{#searchExecuted}}
|
|
2080
2078
|
{{#hasResultsOrExternalPromotions}}
|
|
2081
2079
|
<div class="searchstax-sorting-container">
|
|
2082
|
-
<label class="searchstax-sorting-label" for="
|
|
2080
|
+
<label class="searchstax-sorting-label" for="searchstax-search-order-select">Sort By</label>
|
|
2083
2081
|
<select id="searchstax-search-order-select" class="searchstax-search-order-select" >
|
|
2084
2082
|
{{#sortOptions}}
|
|
2085
2083
|
<option value="{{key}}">
|
|
@@ -2094,14 +2092,14 @@ const sa = {
|
|
|
2094
2092
|
selectId: "searchstax-search-order-select"
|
|
2095
2093
|
}
|
|
2096
2094
|
};
|
|
2097
|
-
class
|
|
2095
|
+
class b {
|
|
2098
2096
|
}
|
|
2099
|
-
|
|
2097
|
+
h(b, "answer", sa), h(b, "externalPromotions", ra), h(b, "facets", ia), h(b, "pagination", na), h(b, "relatedSearches", ca), h(b, "searchFeedback", la), h(b, "searchInput", oa), h(b, "searchResults", ha), h(b, "sorting", ua);
|
|
2100
2098
|
class da {
|
|
2101
2099
|
constructor(e) {
|
|
2102
|
-
|
|
2100
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "externalPromotionsContainerId"), h(this, "searchExternalPromotionsMainContainer", null);
|
|
2103
2101
|
var t, s;
|
|
2104
|
-
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.externalPromotionsContainerId = ((s = (t = this.config.templates) == null ? void 0 : t.mainTemplate) == null ? void 0 : s.externalPromotionsContainerId) ||
|
|
2102
|
+
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.externalPromotionsContainerId = ((s = (t = this.config.templates) == null ? void 0 : t.mainTemplate) == null ? void 0 : s.externalPromotionsContainerId) || b.externalPromotions.mainTemplate.externalPromotionsContainerId, typeof document < "u" && (this.searchExternalPromotionsMainContainer = document == null ? void 0 : document.getElementById(
|
|
2105
2103
|
this.containerId
|
|
2106
2104
|
)), this.initializeSubscriptions(), this.renderMainTemplate(this.generateTemplateData());
|
|
2107
2105
|
}
|
|
@@ -2121,12 +2119,12 @@ class da {
|
|
|
2121
2119
|
var t, s, a, r;
|
|
2122
2120
|
const c = typeof document < "u" ? document == null ? void 0 : document.getElementById(this.externalPromotionsContainerId) : null;
|
|
2123
2121
|
if (c) {
|
|
2124
|
-
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.externalPromotion) == null ? void 0 : a.template) || ((r =
|
|
2122
|
+
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.externalPromotion) == null ? void 0 : a.template) || ((r = b.externalPromotions.externalPromotion) == null ? void 0 : r.template);
|
|
2125
2123
|
if (typeof document < "u") {
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2124
|
+
const o = document == null ? void 0 : document.createElement("div");
|
|
2125
|
+
o.classList.add("searchstax-external-promotion"), o.addEventListener("click", (d) => {
|
|
2128
2126
|
this.trackClick(e, d);
|
|
2129
|
-
}),
|
|
2127
|
+
}), o.innerHTML = P.render(l, e), c.appendChild(o);
|
|
2130
2128
|
}
|
|
2131
2129
|
}
|
|
2132
2130
|
}
|
|
@@ -2135,33 +2133,33 @@ class da {
|
|
|
2135
2133
|
}
|
|
2136
2134
|
renderMainTemplate(e) {
|
|
2137
2135
|
var t, s, a, r;
|
|
2138
|
-
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.template) || ((r =
|
|
2139
|
-
if (this.dataLayer.renderingEngine ===
|
|
2136
|
+
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.template) || ((r = b.externalPromotions.mainTemplate) == null ? void 0 : r.template);
|
|
2137
|
+
if (this.dataLayer.renderingEngine === B.mustache) {
|
|
2140
2138
|
this.searchExternalPromotionsMainContainer.innerHTML = //@ts-expect-error - mustache is not a module
|
|
2141
2139
|
P.render(c, e);
|
|
2142
2140
|
const l = typeof document < "u" ? document == null ? void 0 : document.getElementById(
|
|
2143
2141
|
this.externalPromotionsContainerId
|
|
2144
2142
|
) : null;
|
|
2145
2143
|
l && (l.innerHTML = "");
|
|
2146
|
-
for (const
|
|
2147
|
-
this.addExternalSearch(
|
|
2144
|
+
for (const o of e.externalPromotions)
|
|
2145
|
+
this.addExternalSearch(o);
|
|
2148
2146
|
}
|
|
2149
2147
|
}
|
|
2150
2148
|
}
|
|
2151
2149
|
class ga {
|
|
2152
2150
|
constructor(e, t) {
|
|
2153
|
-
|
|
2151
|
+
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) => {
|
|
2154
2152
|
if (s.stopPropagation(), !a.disabled) {
|
|
2155
|
-
const
|
|
2156
|
-
let d = c ?
|
|
2157
|
-
l !== void 0 && (d = !l),
|
|
2158
|
-
const
|
|
2159
|
-
let
|
|
2160
|
-
const
|
|
2161
|
-
d ?
|
|
2162
|
-
(S) => !J.deepEqual(S,
|
|
2153
|
+
const o = r.querySelector("input");
|
|
2154
|
+
let d = c ? o.checked : !o.checked;
|
|
2155
|
+
l !== void 0 && (d = !l), o.checked = d;
|
|
2156
|
+
const f = this.dataLayer.searchObject;
|
|
2157
|
+
let g = [...f.facets];
|
|
2158
|
+
const m = this.extractFacetValue(a);
|
|
2159
|
+
d ? g.find((S) => J.deepEqual(S, m) ? S : !1) || (this.config.facetingType === "tabs" && (g = g.filter((S) => S.name !== m.name)), g.push(m)) : g = g.filter(
|
|
2160
|
+
(S) => !J.deepEqual(S, m)
|
|
2163
2161
|
), setTimeout(() => {
|
|
2164
|
-
this.dataLayer.setSearchObject({ ...
|
|
2162
|
+
this.dataLayer.setSearchObject({ ...f, facets: g, page: 1 }), this.config.facetingType === "tabs" && this.renderMainTemplate(this.generateTemplateData(), !0);
|
|
2165
2163
|
}, 0);
|
|
2166
2164
|
}
|
|
2167
2165
|
}), this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.routerHelper = e.routerHelper, this.cacheFacets = t, this.facetPaginationStep = this.config.itemsPerPageDesktop, this.facetPaginationStepMobile = this.config.itemsPerPageMobile, typeof document < "u" && (this.searchFacetsMainContainer = document == null ? void 0 : document.getElementById(
|
|
@@ -2212,10 +2210,10 @@ class ga {
|
|
|
2212
2210
|
return c ? {
|
|
2213
2211
|
...a,
|
|
2214
2212
|
values: a.values.map((l) => {
|
|
2215
|
-
const
|
|
2213
|
+
const o = c.values.find((d) => l.type === "range" ? !1 : l.type === "checkbox" ? d.value === l.value : !1);
|
|
2216
2214
|
return {
|
|
2217
2215
|
...l,
|
|
2218
|
-
disabled: !
|
|
2216
|
+
disabled: !o,
|
|
2219
2217
|
isMobile: e
|
|
2220
2218
|
};
|
|
2221
2219
|
})
|
|
@@ -2245,27 +2243,27 @@ class ga {
|
|
|
2245
2243
|
}
|
|
2246
2244
|
}
|
|
2247
2245
|
createFacetItem(e, t, s) {
|
|
2248
|
-
var a, r, c, l,
|
|
2246
|
+
var a, r, c, l, o, d, f, g, m, S, O, T;
|
|
2249
2247
|
if (typeof document < "u") {
|
|
2250
|
-
const
|
|
2251
|
-
|
|
2252
|
-
const E = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.facetItemContainerTemplate) == null ? void 0 : c.template) || ((l =
|
|
2253
|
-
|
|
2248
|
+
const R = document == null ? void 0 : document.createElement("div");
|
|
2249
|
+
R.classList.add("searchstax-facet-container"), this.deactivatedFacets[e.name] || R.classList.add("active");
|
|
2250
|
+
const E = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.facetItemContainerTemplate) == null ? void 0 : c.template) || ((l = b.facets.facetItemContainerTemplate) == null ? void 0 : l.template);
|
|
2251
|
+
R.innerHTML = P.render(
|
|
2254
2252
|
E,
|
|
2255
2253
|
e
|
|
2256
|
-
), t.appendChild(
|
|
2257
|
-
const
|
|
2258
|
-
"." + (((
|
|
2254
|
+
), t.appendChild(R);
|
|
2255
|
+
const k = R.querySelector(
|
|
2256
|
+
"." + (((f = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.facetItemContainerTemplate) == null ? void 0 : f.facetListTitleContainerClass) || ((g = b.facets.facetItemContainerTemplate) == null ? void 0 : g.facetListTitleContainerClass))
|
|
2259
2257
|
);
|
|
2260
|
-
|
|
2261
|
-
|
|
2258
|
+
k == null || k.addEventListener("click", () => {
|
|
2259
|
+
R.classList.toggle("active");
|
|
2262
2260
|
});
|
|
2263
|
-
const N =
|
|
2264
|
-
"." + (((O = (S = (
|
|
2261
|
+
const N = R.querySelector(
|
|
2262
|
+
"." + (((O = (S = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : S.facetItemContainerTemplate) == null ? void 0 : O.facetListContainerClass) || ((T = b.facets.facetItemContainerTemplate) == null ? void 0 : T.facetListContainerClass))
|
|
2265
2263
|
);
|
|
2266
|
-
N && (e.values.forEach((
|
|
2264
|
+
N && (e.values.forEach((W) => {
|
|
2267
2265
|
this.createFacetListItem(
|
|
2268
|
-
|
|
2266
|
+
W,
|
|
2269
2267
|
N
|
|
2270
2268
|
);
|
|
2271
2269
|
}), e.hasMoreFacets && this.createHasMoreComponent(e, N, s));
|
|
@@ -2276,40 +2274,40 @@ class ga {
|
|
|
2276
2274
|
return !!((t = this.dataLayer.searchObject.facets) != null && t.find((s) => J.deepEqual(s, this.extractFacetValue(e))));
|
|
2277
2275
|
}
|
|
2278
2276
|
createFacetListItem(e, t) {
|
|
2279
|
-
var s, a, r, c, l,
|
|
2277
|
+
var s, a, r, c, l, o, d, f, g, m, S, O, T;
|
|
2280
2278
|
if (typeof document < "u") {
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2283
|
-
const E = this.isChecked(e),
|
|
2284
|
-
|
|
2285
|
-
|
|
2279
|
+
const R = document == null ? void 0 : document.createElement("div");
|
|
2280
|
+
R.classList.add("searchstax-facet-value-container"), e.disabled && R.classList.add("searchstax-facet-value-disabled");
|
|
2281
|
+
const E = this.isChecked(e), k = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.facetItemTemplate) == null ? void 0 : r.template) || ((c = b.facets.facetItemTemplate) == null ? void 0 : c.template);
|
|
2282
|
+
R.innerHTML = P.render(
|
|
2283
|
+
k,
|
|
2286
2284
|
{ ...e, isChecked: E }
|
|
2287
2285
|
);
|
|
2288
|
-
let N = (l =
|
|
2289
|
-
N = ((
|
|
2286
|
+
let N = (l = b.facets.facetItemTemplate) == null ? void 0 : l.checkTriggerClasses;
|
|
2287
|
+
N = ((f = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.facetItemTemplate) == null ? void 0 : f.checkTriggerClasses) || N, N.forEach((W) => {
|
|
2290
2288
|
var A;
|
|
2291
|
-
(A =
|
|
2292
|
-
this.onFacetSelect(
|
|
2289
|
+
(A = R.querySelector("." + W)) == null || A.addEventListener("click", (K) => {
|
|
2290
|
+
this.onFacetSelect(K, e, R);
|
|
2293
2291
|
});
|
|
2294
|
-
}), (
|
|
2295
|
-
"." + (((S = (
|
|
2296
|
-
)) == null ||
|
|
2297
|
-
this.onFacetSelect(
|
|
2298
|
-
}), t.appendChild(
|
|
2292
|
+
}), (T = R.querySelector(
|
|
2293
|
+
"." + (((S = (m = (g = this.config) == null ? void 0 : g.templates) == null ? void 0 : m.facetItemTemplate) == null ? void 0 : S.inputCheckboxClass) || ((O = b.facets.facetItemTemplate) == null ? void 0 : O.inputCheckboxClass))
|
|
2294
|
+
)) == null || T.addEventListener("click", (W) => {
|
|
2295
|
+
this.onFacetSelect(W, e, R, !0);
|
|
2296
|
+
}), t.appendChild(R);
|
|
2299
2297
|
}
|
|
2300
2298
|
}
|
|
2301
2299
|
createHasMoreComponent(e, t, s) {
|
|
2302
|
-
var a, r, c, l,
|
|
2300
|
+
var a, r, c, l, o, d, f, g;
|
|
2303
2301
|
if (typeof document < "u") {
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
const S = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.showMoreButtonContainerTemplate) == null ? void 0 : c.template) || ((l =
|
|
2307
|
-
|
|
2302
|
+
const m = document == null ? void 0 : document.createElement("div");
|
|
2303
|
+
m.classList.add("searchstax-facet-show-more-container");
|
|
2304
|
+
const S = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.showMoreButtonContainerTemplate) == null ? void 0 : c.template) || ((l = b.facets.showMoreButtonContainerTemplate) == null ? void 0 : l.template);
|
|
2305
|
+
m.innerHTML = P.render(
|
|
2308
2306
|
S,
|
|
2309
2307
|
e
|
|
2310
2308
|
);
|
|
2311
|
-
const O =
|
|
2312
|
-
"." + (((
|
|
2309
|
+
const O = m.querySelector(
|
|
2310
|
+
"." + (((f = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.showMoreButtonContainerTemplate) == null ? void 0 : f.showMoreButtonClass) || ((g = b.facets.showMoreButtonContainerTemplate) == null ? void 0 : g.showMoreButtonClass))
|
|
2313
2311
|
);
|
|
2314
2312
|
O && (this.attachOnclickToShowMore(e, O, s), t && t.appendChild(O));
|
|
2315
2313
|
}
|
|
@@ -2317,6 +2315,8 @@ class ga {
|
|
|
2317
2315
|
attachOnclickToShowMore(e, t, s) {
|
|
2318
2316
|
t.addEventListener("click", (a) => {
|
|
2319
2317
|
this.onShowMoreLessClick(a, e, s);
|
|
2318
|
+
}), t.addEventListener("keydown", (a) => {
|
|
2319
|
+
(a.code === "Space" || a.code === "Enter") && this.onShowMoreLessClick(a, e, s);
|
|
2320
2320
|
});
|
|
2321
2321
|
}
|
|
2322
2322
|
onShowMoreLessClick(e, t, s) {
|
|
@@ -2325,29 +2325,29 @@ class ga {
|
|
|
2325
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());
|
|
2326
2326
|
}
|
|
2327
2327
|
renderMainTemplate(e, t) {
|
|
2328
|
-
var s, a, r, c, l,
|
|
2328
|
+
var s, a, r, c, l, o, d, f, g, m, S;
|
|
2329
2329
|
if (e && (!J.deepEqual(this.cachedData ?? {}, e) || t)) {
|
|
2330
2330
|
this.cachedData = e;
|
|
2331
|
-
const O = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.mainTemplateDesktop) == null ? void 0 : r.template) || ((c =
|
|
2332
|
-
if (this.dataLayer.renderingEngine ===
|
|
2331
|
+
const O = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.mainTemplateDesktop) == null ? void 0 : r.template) || ((c = b.facets.mainTemplateDesktop) == null ? void 0 : c.template);
|
|
2332
|
+
if (this.dataLayer.renderingEngine === B.mustache && this.searchFacetsMainContainer) {
|
|
2333
2333
|
this.searchFacetsMainContainer.innerHTML = P.render(
|
|
2334
2334
|
O,
|
|
2335
2335
|
{
|
|
2336
2336
|
...e
|
|
2337
2337
|
}
|
|
2338
2338
|
);
|
|
2339
|
-
const
|
|
2340
|
-
"." + (((d = (
|
|
2339
|
+
const T = (f = this.searchFacetsMainContainer) == null ? void 0 : f.querySelector(
|
|
2340
|
+
"." + (((d = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.mainTemplateDesktop) == null ? void 0 : d.facetsContainerClass) || b.facets.mainTemplateDesktop.facetsContainerClass)
|
|
2341
2341
|
);
|
|
2342
|
-
if (
|
|
2343
|
-
|
|
2344
|
-
for (const
|
|
2345
|
-
this.createFacetItem(
|
|
2342
|
+
if (T) {
|
|
2343
|
+
T.innerHTML = "";
|
|
2344
|
+
for (const R of e.facets)
|
|
2345
|
+
this.createFacetItem(R, T);
|
|
2346
2346
|
if (this.searchFacetsMainContainer) {
|
|
2347
|
-
const
|
|
2348
|
-
"." + (((S = (
|
|
2347
|
+
const R = this.searchFacetsMainContainer.querySelector(
|
|
2348
|
+
"." + (((S = (m = (g = this.config) == null ? void 0 : g.templates) == null ? void 0 : m.mainTemplateDesktop) == null ? void 0 : S.selectedFacetsContainerClass) || b.facets.mainTemplateDesktop.selectedFacetsContainerClass)
|
|
2349
2349
|
);
|
|
2350
|
-
|
|
2350
|
+
R && (this.createSelectedFacetsComponents(R), this.createClearFacetsComponents(R));
|
|
2351
2351
|
}
|
|
2352
2352
|
}
|
|
2353
2353
|
}
|
|
@@ -2361,11 +2361,11 @@ class ga {
|
|
|
2361
2361
|
const a = decodeURIComponent(s.name), r = decodeURIComponent(s.value);
|
|
2362
2362
|
if (this.dataLayer.searchFacets) {
|
|
2363
2363
|
const c = this.needCache ? this.dataLayer.searchFacetsCached : this.dataLayer.searchFacets, l = c == null ? void 0 : c.find(
|
|
2364
|
-
(
|
|
2364
|
+
(o) => o.name === a
|
|
2365
2365
|
);
|
|
2366
2366
|
if (l) {
|
|
2367
|
-
const
|
|
2368
|
-
|
|
2367
|
+
const o = l.values.find((d) => d.type === "range" ? !1 : d.type === "checkbox" ? `"${d.value}"` == `"${r}"` : !1);
|
|
2368
|
+
o && e.push(o);
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
2371
|
}
|
|
@@ -2378,17 +2378,17 @@ class ga {
|
|
|
2378
2378
|
});
|
|
2379
2379
|
}
|
|
2380
2380
|
createClearFacetsComponents(e) {
|
|
2381
|
-
var t, s, a, r, c, l,
|
|
2381
|
+
var t, s, a, r, c, l, o, d;
|
|
2382
2382
|
if (typeof document < "u") {
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
|
|
2383
|
+
const f = this.dataLayer.searchObject, g = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.clearFacetsTemplate) == null ? void 0 : a.template) || ((r = b.facets.clearFacetsTemplate) == null ? void 0 : r.template), m = document == null ? void 0 : document.createElement("div");
|
|
2384
|
+
m.innerHTML = P.render(
|
|
2385
|
+
g,
|
|
2386
2386
|
{
|
|
2387
|
-
shouldShow:
|
|
2387
|
+
shouldShow: f.facets.length > 0
|
|
2388
2388
|
}
|
|
2389
2389
|
);
|
|
2390
|
-
const S =
|
|
2391
|
-
"." + (((
|
|
2390
|
+
const S = m.querySelector(
|
|
2391
|
+
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.clearFacetsTemplate) == null ? void 0 : o.containerClass) || ((d = b.facets.clearFacetsTemplate) == null ? void 0 : d.containerClass))
|
|
2392
2392
|
);
|
|
2393
2393
|
S && (S.addEventListener("click", () => {
|
|
2394
2394
|
this.removeSelectedFacets();
|
|
@@ -2396,15 +2396,15 @@ class ga {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
}
|
|
2398
2398
|
createSelectedFacetsComponent(e, t) {
|
|
2399
|
-
var s, a, r, c, l,
|
|
2399
|
+
var s, a, r, c, l, o, d, f;
|
|
2400
2400
|
if (typeof document < "u") {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
|
|
2401
|
+
const g = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.selectedFacetsTemplate) == null ? void 0 : r.template) || ((c = b.facets.selectedFacetsTemplate) == null ? void 0 : c.template), m = document == null ? void 0 : document.createElement("div");
|
|
2402
|
+
m.innerHTML = P.render(
|
|
2403
|
+
g,
|
|
2404
2404
|
t
|
|
2405
2405
|
);
|
|
2406
|
-
const S =
|
|
2407
|
-
"." + (((d = (
|
|
2406
|
+
const S = m.querySelector(
|
|
2407
|
+
"." + (((d = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.selectedFacetsTemplate) == null ? void 0 : d.containerClass) || ((f = b.facets.selectedFacetsTemplate) == null ? void 0 : f.containerClass))
|
|
2408
2408
|
);
|
|
2409
2409
|
S && (S.addEventListener("click", () => {
|
|
2410
2410
|
this.unselectFacet(t);
|
|
@@ -2425,17 +2425,17 @@ class ga {
|
|
|
2425
2425
|
this.dataLayer.setSearchObject({ ...e, facets: [] });
|
|
2426
2426
|
}
|
|
2427
2427
|
createFilterByComponent(e) {
|
|
2428
|
-
var t, s, a, r, c, l,
|
|
2428
|
+
var t, s, a, r, c, l, o, d;
|
|
2429
2429
|
if (typeof document < "u") {
|
|
2430
|
-
const
|
|
2431
|
-
|
|
2432
|
-
|
|
2430
|
+
const f = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.filterByTemplate) == null ? void 0 : a.template) || ((r = b.facets.filterByTemplate) == null ? void 0 : r.template), g = document == null ? void 0 : document.createElement("div");
|
|
2431
|
+
g.innerHTML = P.render(
|
|
2432
|
+
f,
|
|
2433
2433
|
{}
|
|
2434
2434
|
);
|
|
2435
|
-
const
|
|
2436
|
-
"." + (((
|
|
2435
|
+
const m = g.querySelector(
|
|
2436
|
+
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.filterByTemplate) == null ? void 0 : o.containerClass) || ((d = b.facets.filterByTemplate) == null ? void 0 : d.containerClass))
|
|
2437
2437
|
);
|
|
2438
|
-
|
|
2438
|
+
m && (e.prepend(m), m.addEventListener("click", this.openOverlay.bind(this)));
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
2441
|
openOverlay() {
|
|
@@ -2447,35 +2447,35 @@ class ga {
|
|
|
2447
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"));
|
|
2448
2448
|
}
|
|
2449
2449
|
renderMobileTemplate(e) {
|
|
2450
|
-
var t, s, a, r, c, l,
|
|
2450
|
+
var t, s, a, r, c, l, o, d, f, g, m, S, O, T, R, E, k, N, W;
|
|
2451
2451
|
if (e && typeof document < "u") {
|
|
2452
2452
|
const A = document == null ? void 0 : document.createElement("div");
|
|
2453
2453
|
A.classList.add("searchstax-facets-container-mobile");
|
|
2454
|
-
const
|
|
2455
|
-
if (this.dataLayer.renderingEngine ===
|
|
2456
|
-
if (A.innerHTML = P.render(
|
|
2454
|
+
const K = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.mainTemplateMobile) == null ? void 0 : a.template) || ((r = b.facets.mainTemplateMobile) == null ? void 0 : r.template);
|
|
2455
|
+
if (this.dataLayer.renderingEngine === B.mustache) {
|
|
2456
|
+
if (A.innerHTML = P.render(K, {
|
|
2457
2457
|
...e,
|
|
2458
2458
|
overlayOpened: this.overlayOpened
|
|
2459
|
-
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (
|
|
2460
|
-
for (const _ of ((
|
|
2459
|
+
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (o = (l = this.config) == null ? void 0 : l.templates) != null && o.mainTemplateMobile)
|
|
2460
|
+
for (const _ of ((g = (f = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : f.mainTemplateMobile) == null ? void 0 : g.closeOverlayTriggerClasses) || []) {
|
|
2461
2461
|
const G = A.querySelector("." + _);
|
|
2462
2462
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2463
2463
|
}
|
|
2464
2464
|
else
|
|
2465
|
-
for (const _ of
|
|
2465
|
+
for (const _ of b.facets.mainTemplateMobile.closeOverlayTriggerClasses) {
|
|
2466
2466
|
const G = A.querySelector("." + _);
|
|
2467
2467
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2468
2468
|
}
|
|
2469
|
-
const
|
|
2470
|
-
"." + (((O = (S = (
|
|
2469
|
+
const v = A.querySelector(
|
|
2470
|
+
"." + (((O = (S = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : S.mainTemplateMobile) == null ? void 0 : O.filterByContainerClass) || b.facets.mainTemplateMobile.filterByContainerClass)
|
|
2471
2471
|
);
|
|
2472
|
-
|
|
2473
|
-
const
|
|
2474
|
-
"." + (((E = (
|
|
2472
|
+
v && this.createFilterByComponent(v);
|
|
2473
|
+
const x = A.querySelector(
|
|
2474
|
+
"." + (((E = (R = (T = this.config) == null ? void 0 : T.templates) == null ? void 0 : R.mainTemplateMobile) == null ? void 0 : E.selectedFacetsContainerClass) || b.facets.mainTemplateMobile.selectedFacetsContainerClass)
|
|
2475
2475
|
);
|
|
2476
|
-
|
|
2476
|
+
x && (this.createSelectedFacetsComponents(x), this.createClearFacetsComponents(x));
|
|
2477
2477
|
const j = A.querySelector(
|
|
2478
|
-
"." + (((
|
|
2478
|
+
"." + (((W = (N = (k = this.config) == null ? void 0 : k.templates) == null ? void 0 : N.mainTemplateMobile) == null ? void 0 : W.facetsContainerClass) || b.facets.mainTemplateMobile.facetsContainerClass)
|
|
2479
2479
|
);
|
|
2480
2480
|
if (j) {
|
|
2481
2481
|
j.innerHTML = "";
|
|
@@ -2488,9 +2488,9 @@ class ga {
|
|
|
2488
2488
|
}
|
|
2489
2489
|
class pa {
|
|
2490
2490
|
constructor(e) {
|
|
2491
|
-
|
|
2492
|
-
var t, s, a, r, c, l,
|
|
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) ??
|
|
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);
|
|
2492
|
+
var t, s, a, r, c, l, o, d, f;
|
|
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) ?? b.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) ?? b.pagination.mainTemplate.nextButtonClass, this.loadMoreButtonClass = ((f = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.infiniteScrollTemplate) == null ? void 0 : f.loadMoreButtonClass) ?? b.pagination.infiniteScrollTemplate.loadMoreButtonClass, typeof document < "u" && (this.searchPaginationMainContainer = document == null ? void 0 : document.getElementById(
|
|
2494
2494
|
this.containerId
|
|
2495
2495
|
)), this.initializeSubscriptions(), this.renderMainTemplate(this.generateTemplateData());
|
|
2496
2496
|
}
|
|
@@ -2527,14 +2527,14 @@ class pa {
|
|
|
2527
2527
|
}
|
|
2528
2528
|
nextPage(e) {
|
|
2529
2529
|
var t;
|
|
2530
|
-
e.preventDefault(), e.stopPropagation(), this.isLastPage || this.goToPage(
|
|
2530
|
+
e == null || e.preventDefault(), e == null || e.stopPropagation(), this.isLastPage || this.goToPage(
|
|
2531
2531
|
((t = this.dataLayer.searchObject) == null ? void 0 : t.page) + 1,
|
|
2532
2532
|
this.dataLayer.isInfiniteScroll
|
|
2533
2533
|
);
|
|
2534
2534
|
}
|
|
2535
2535
|
previousPage(e) {
|
|
2536
2536
|
var t;
|
|
2537
|
-
e.preventDefault(), e.stopPropagation(), this.isFirstPage || this.goToPage(((t = this.dataLayer.searchObject) == null ? void 0 : t.page) - 1);
|
|
2537
|
+
e == null || e.preventDefault(), e == null || e.stopPropagation(), this.isFirstPage || this.goToPage(((t = this.dataLayer.searchObject) == null ? void 0 : t.page) - 1);
|
|
2538
2538
|
}
|
|
2539
2539
|
overridePaginationEvents() {
|
|
2540
2540
|
if (this.searchPaginationMainContainer) {
|
|
@@ -2545,18 +2545,24 @@ class pa {
|
|
|
2545
2545
|
), s = this.searchPaginationMainContainer.querySelector(
|
|
2546
2546
|
"." + this.loadMoreButtonClass
|
|
2547
2547
|
);
|
|
2548
|
-
e && e.addEventListener(
|
|
2548
|
+
e && (e.addEventListener(
|
|
2549
2549
|
"click",
|
|
2550
2550
|
this.previousPage.bind(this)
|
|
2551
|
-
),
|
|
2551
|
+
), e.addEventListener("keydown", (a) => {
|
|
2552
|
+
(a.code === "Space" || a.code === "Enter") && this.previousPage(a);
|
|
2553
|
+
})), t && (t.addEventListener("click", this.nextPage.bind(this)), t.addEventListener("keydown", (a) => {
|
|
2554
|
+
(a.code === "Space" || a.code === "Enter") && this.nextPage(a);
|
|
2555
|
+
})), s && (s.addEventListener("click", this.nextPage.bind(this)), s.addEventListener("keydown", (a) => {
|
|
2556
|
+
(a.code === "Space" || a.code === "Enter") && this.nextPage(a);
|
|
2557
|
+
}));
|
|
2552
2558
|
}
|
|
2553
2559
|
}
|
|
2554
2560
|
renderMainTemplate(e) {
|
|
2555
|
-
var t, s, a, r, c, l,
|
|
2561
|
+
var t, s, a, r, c, l, o, d, f, g;
|
|
2556
2562
|
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));
|
|
2557
|
-
let
|
|
2558
|
-
this.dataLayer.isInfiniteScroll && (
|
|
2559
|
-
|
|
2563
|
+
let m = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.mainTemplate) == null ? void 0 : c.template) || ((l = b.pagination.mainTemplate) == null ? void 0 : l.template);
|
|
2564
|
+
this.dataLayer.isInfiniteScroll && (m = ((f = (d = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : d.infiniteScrollTemplate) == null ? void 0 : f.template) || ((g = b.pagination.infiniteScrollTemplate) == null ? void 0 : g.template)), this.dataLayer.renderingEngine === B.mustache && (this.searchPaginationMainContainer.innerHTML = P.render(
|
|
2565
|
+
m,
|
|
2560
2566
|
e
|
|
2561
2567
|
), setTimeout(() => {
|
|
2562
2568
|
this.overridePaginationEvents();
|
|
@@ -2565,9 +2571,9 @@ class pa {
|
|
|
2565
2571
|
}
|
|
2566
2572
|
class ma {
|
|
2567
2573
|
constructor(e) {
|
|
2568
|
-
|
|
2574
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "relatedSearchesContainerClass"), h(this, "searchRelatedSearchesMainContainer", null), h(this, "track");
|
|
2569
2575
|
var t, s;
|
|
2570
|
-
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.relatedSearchesContainerClass = ((s = (t = this.config.templates) == null ? void 0 : t.main) == null ? void 0 : s.relatedSearchesContainerClass) ||
|
|
2576
|
+
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.relatedSearchesContainerClass = ((s = (t = this.config.templates) == null ? void 0 : t.main) == null ? void 0 : s.relatedSearchesContainerClass) || b.relatedSearches.main.relatedSearchesContainerClass, typeof document < "u" && (this.searchRelatedSearchesMainContainer = document == null ? void 0 : document.getElementById(
|
|
2571
2577
|
this.containerId
|
|
2572
2578
|
)), this.track = e.trackRelatedSearchClick, this.initializeSubscriptions();
|
|
2573
2579
|
}
|
|
@@ -2585,17 +2591,19 @@ class ma {
|
|
|
2585
2591
|
addRelatedSearchComponent(e, t) {
|
|
2586
2592
|
var s, a, r, c, l;
|
|
2587
2593
|
if (typeof document < "u") {
|
|
2588
|
-
const
|
|
2589
|
-
if (this.dataLayer.renderingEngine ===
|
|
2590
|
-
|
|
2594
|
+
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) || b.relatedSearches.relatedSearch.template;
|
|
2595
|
+
if (this.dataLayer.renderingEngine === B.mustache) {
|
|
2596
|
+
o.innerHTML = P.render(
|
|
2591
2597
|
d,
|
|
2592
2598
|
e
|
|
2593
2599
|
);
|
|
2594
|
-
const
|
|
2595
|
-
"." + (((l = (c = this.config.templates) == null ? void 0 : c.relatedSearch) == null ? void 0 : l.relatedSearchContainerClass) ||
|
|
2600
|
+
const f = o.querySelector(
|
|
2601
|
+
"." + (((l = (c = this.config.templates) == null ? void 0 : c.relatedSearch) == null ? void 0 : l.relatedSearchContainerClass) || b.relatedSearches.relatedSearch.relatedSearchContainerClass)
|
|
2596
2602
|
);
|
|
2597
|
-
|
|
2603
|
+
f && (t.appendChild(f), f.addEventListener("click", () => {
|
|
2598
2604
|
this.executeSearch(e);
|
|
2605
|
+
}), f.addEventListener("keyup", (g) => {
|
|
2606
|
+
(g.code === "Space" || g.code === "Enter") && this.executeSearch(e);
|
|
2599
2607
|
}));
|
|
2600
2608
|
}
|
|
2601
2609
|
}
|
|
@@ -2606,22 +2614,22 @@ class ma {
|
|
|
2606
2614
|
}
|
|
2607
2615
|
renderMainTemplate(e) {
|
|
2608
2616
|
var t, s, a, r;
|
|
2609
|
-
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) ||
|
|
2610
|
-
if (this.dataLayer.renderingEngine ===
|
|
2617
|
+
const c = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || b.relatedSearches.main.template;
|
|
2618
|
+
if (this.dataLayer.renderingEngine === B.mustache && this.searchRelatedSearchesMainContainer) {
|
|
2611
2619
|
this.searchRelatedSearchesMainContainer.innerHTML = "", this.searchRelatedSearchesMainContainer.innerHTML = //@ts-expect-error - mustache is not a module
|
|
2612
2620
|
P.render(c, e);
|
|
2613
2621
|
const l = (r = this.searchRelatedSearchesMainContainer) == null ? void 0 : r.querySelector(
|
|
2614
2622
|
`.${this.relatedSearchesContainerClass}`
|
|
2615
2623
|
);
|
|
2616
2624
|
if (l)
|
|
2617
|
-
for (const
|
|
2618
|
-
this.addRelatedSearchComponent(
|
|
2625
|
+
for (const o of e.relatedSearches)
|
|
2626
|
+
this.addRelatedSearchComponent(o, l);
|
|
2619
2627
|
}
|
|
2620
2628
|
}
|
|
2621
2629
|
}
|
|
2622
2630
|
class fa {
|
|
2623
2631
|
constructor(e) {
|
|
2624
|
-
|
|
2632
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "searchFeedbackMainContainer", null), h(this, "searchTrigger"), this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.searchTrigger = e.searchTrigger, typeof document < "u" && (this.searchFeedbackMainContainer = document == null ? void 0 : document.getElementById(
|
|
2625
2633
|
this.containerId
|
|
2626
2634
|
)), this.initializeSubscriptions();
|
|
2627
2635
|
}
|
|
@@ -2645,7 +2653,7 @@ class fa {
|
|
|
2645
2653
|
attachClick() {
|
|
2646
2654
|
var e, t, s, a, r;
|
|
2647
2655
|
const c = (r = this.searchFeedbackMainContainer) == null ? void 0 : r.querySelector(
|
|
2648
|
-
"." + (((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.main) == null ? void 0 : s.originalQueryClass) || ((a =
|
|
2656
|
+
"." + (((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.main) == null ? void 0 : s.originalQueryClass) || ((a = b.searchFeedback.main) == null ? void 0 : a.originalQueryClass))
|
|
2649
2657
|
);
|
|
2650
2658
|
c && c.addEventListener(
|
|
2651
2659
|
"click",
|
|
@@ -2654,8 +2662,8 @@ class fa {
|
|
|
2654
2662
|
}
|
|
2655
2663
|
renderMainTemplate(e) {
|
|
2656
2664
|
var t, s, a;
|
|
2657
|
-
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) ||
|
|
2658
|
-
this.dataLayer.renderingEngine ===
|
|
2665
|
+
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || b.searchFeedback.main.template;
|
|
2666
|
+
this.dataLayer.renderingEngine === B.mustache && (this.searchFeedbackMainContainer.innerHTML = P.render(
|
|
2659
2667
|
r,
|
|
2660
2668
|
e
|
|
2661
2669
|
), setTimeout(() => {
|
|
@@ -2665,7 +2673,7 @@ class fa {
|
|
|
2665
2673
|
}
|
|
2666
2674
|
class va {
|
|
2667
2675
|
constructor(e) {
|
|
2668
|
-
|
|
2676
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "suggestAfterMinChars"), h(this, "containerId"), h(this, "currentInputValue", ""), h(this, "autosuggestResults"), h(this, "searchInput"), h(this, "actionButton"), h(this, "autosuggestContainer"), h(this, "buttonState", "search"), h(this, "selectedAutosuggestItem", -1), h(this, "suggestTrigger"), h(this, "searchTrigger"), this.dataLayer = e.dataLayer, this.config = e.config, this.searchTrigger = e.searchTrigger, this.suggestTrigger = e.suggestTrigger, this.containerId = e.containerId, this.suggestAfterMinChars = e.config.suggestAfterMinChars, this.renderMainTemplate(), this.actionButtonInit(), this.updateActionButtonState("search"), this.searchInput && (this.createAutosuggestContainer(), this.attachSubscriptions());
|
|
2669
2677
|
}
|
|
2670
2678
|
renderMainTemplate() {
|
|
2671
2679
|
var e, t, s, a;
|
|
@@ -2673,21 +2681,21 @@ class va {
|
|
|
2673
2681
|
const r = document == null ? void 0 : document.getElementById(this.containerId);
|
|
2674
2682
|
if (!r)
|
|
2675
2683
|
throw new Error("Search input container not found");
|
|
2676
|
-
const c = ((t = (e = this.config.templates) == null ? void 0 : e.mainTemplate) == null ? void 0 : t.template) ||
|
|
2677
|
-
if (this.dataLayer.renderingEngine ===
|
|
2684
|
+
const c = ((t = (e = this.config.templates) == null ? void 0 : e.mainTemplate) == null ? void 0 : t.template) || b.searchInput.mainTemplate.template;
|
|
2685
|
+
if (this.dataLayer.renderingEngine === B.mustache) {
|
|
2678
2686
|
const d = P.render(c, {});
|
|
2679
2687
|
r.innerHTML = d;
|
|
2680
2688
|
}
|
|
2681
|
-
const l = ((a = (s = this.config.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.searchInputId) ||
|
|
2682
|
-
if (
|
|
2683
|
-
this.searchInput =
|
|
2689
|
+
const l = ((a = (s = this.config.templates) == null ? void 0 : s.mainTemplate) == null ? void 0 : a.searchInputId) || b.searchInput.mainTemplate.searchInputId, o = document == null ? void 0 : document.querySelector(`#${l}`);
|
|
2690
|
+
if (o)
|
|
2691
|
+
this.searchInput = o, o.addEventListener("keyup", this.inputKeyupEvent.bind(this)), o.addEventListener("blur", this.hideAutosuggest.bind(this)), o.addEventListener("paste", this.inputPasteEvent.bind(this));
|
|
2684
2692
|
else
|
|
2685
2693
|
throw new Error("Input not found");
|
|
2686
2694
|
}
|
|
2687
2695
|
}
|
|
2688
2696
|
createAutosuggestContainer() {
|
|
2689
2697
|
var e;
|
|
2690
|
-
this.dataLayer.renderingEngine ===
|
|
2698
|
+
this.dataLayer.renderingEngine === B.mustache && typeof document < "u" && (this.autosuggestContainer = document == null ? void 0 : document.createElement("div"), this.autosuggestContainer.classList.add(
|
|
2691
2699
|
"searchstax-autosuggest-container"
|
|
2692
2700
|
), this.autosuggestContainer.addEventListener("mouseleave", () => {
|
|
2693
2701
|
this.resetAutosuggestSelection(), this.markActiveAutosuggestItem();
|
|
@@ -2799,7 +2807,7 @@ class va {
|
|
|
2799
2807
|
}), r.addEventListener("mouseenter", () => {
|
|
2800
2808
|
this.onSuggestionEnter(e);
|
|
2801
2809
|
});
|
|
2802
|
-
const c = ((s = (t = this.config.templates) == null ? void 0 : t.autosuggestItemTemplate) == null ? void 0 : s.template) || ((a =
|
|
2810
|
+
const c = ((s = (t = this.config.templates) == null ? void 0 : t.autosuggestItemTemplate) == null ? void 0 : s.template) || ((a = b.searchInput.autosuggestItemTemplate) == null ? void 0 : a.template);
|
|
2803
2811
|
return r.innerHTML = P.render(c, e), r;
|
|
2804
2812
|
}
|
|
2805
2813
|
onSuggestionEnter(e) {
|
|
@@ -2825,7 +2833,7 @@ class va {
|
|
|
2825
2833
|
}
|
|
2826
2834
|
class ya {
|
|
2827
2835
|
constructor(e) {
|
|
2828
|
-
|
|
2836
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "linkClickCallback"), h(this, "searchCallback"), h(this, "containerId"), h(this, "searchResultsMainContainer"), h(this, "searchResultsContainer"), h(this, "searchResultLinks", []), this.linkClickCallback = e.linkClickCallback, this.searchCallback = e.searchTrigger, this.dataLayer = e.dataLayer, this.config = e.config, setTimeout(() => {
|
|
2829
2837
|
this.dataLayer.setSearchObject({ ...this.dataLayer.searchObject, itemsPerPage: this.config.resultsPerPage || 10 });
|
|
2830
2838
|
}, 0), this.containerId = e.containerId;
|
|
2831
2839
|
const t = document == null ? void 0 : document.getElementById(this.containerId);
|
|
@@ -2847,28 +2855,29 @@ class ya {
|
|
|
2847
2855
|
}
|
|
2848
2856
|
renderNoResultsTemplate() {
|
|
2849
2857
|
var e, t, s, a, r;
|
|
2850
|
-
const c = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.noSearchResultTemplate) == null ? void 0 : s.template) || ((a =
|
|
2851
|
-
if (this.dataLayer.renderingEngine ===
|
|
2858
|
+
const c = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.noSearchResultTemplate) == null ? void 0 : s.template) || ((a = b.searchResults.noSearchResultTemplate) == null ? void 0 : a.template), l = ((r = this.dataLayer.searchResultsMetadata) == null ? void 0 : r.spellingSuggestion) ?? "";
|
|
2859
|
+
if (this.dataLayer.renderingEngine === B.mustache && this.searchResultsContainer && (this.searchResultsContainer.innerHTML = P.render(
|
|
2852
2860
|
c,
|
|
2853
2861
|
{
|
|
2854
2862
|
spellingSuggestion: l,
|
|
2855
|
-
...this.dataLayer.parsedData.data
|
|
2863
|
+
...this.dataLayer.parsedData.data,
|
|
2864
|
+
searchCallback: this.searchCallback.bind(this)
|
|
2856
2865
|
}
|
|
2857
2866
|
)), l && this.searchResultsContainer) {
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2867
|
+
const o = this.searchResultsContainer.querySelector("a");
|
|
2868
|
+
o && o.addEventListener("click", (d) => {
|
|
2860
2869
|
d.preventDefault(), d.stopPropagation(), this.searchCallback(l);
|
|
2861
2870
|
});
|
|
2862
2871
|
}
|
|
2863
2872
|
}
|
|
2864
2873
|
renderResults(e) {
|
|
2865
2874
|
var t, s, a, r, c;
|
|
2866
|
-
if (this.dataLayer.renderingEngine ===
|
|
2875
|
+
if (this.dataLayer.renderingEngine === B.mustache && this.searchResultsContainer)
|
|
2867
2876
|
if (this.removeLinkClickEvents(), e.length === 0)
|
|
2868
2877
|
this.renderNoResultsTemplate();
|
|
2869
2878
|
else {
|
|
2870
|
-
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.searchResultTemplate) == null ? void 0 : a.template) || ((r =
|
|
2871
|
-
((c = this.config) == null ? void 0 : c.renderMethod) === "infiniteScroll" && this.dataLayer.searchObject.page > 1 ? this.searchResultsContainer.innerHTML +=
|
|
2879
|
+
const l = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.searchResultTemplate) == null ? void 0 : a.template) || ((r = b.searchResults.searchResultTemplate) == null ? void 0 : r.template), o = e.map((d) => P.render(l, d));
|
|
2880
|
+
((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(
|
|
2872
2881
|
this.searchResultsContainer.querySelectorAll(
|
|
2873
2882
|
`[${this.uniqueIdAttribute}]`
|
|
2874
2883
|
)
|
|
@@ -2878,12 +2887,13 @@ class ya {
|
|
|
2878
2887
|
removeLinkClickEvents() {
|
|
2879
2888
|
this.searchResultLinks.forEach((e) => {
|
|
2880
2889
|
e.removeEventListener("click", () => {
|
|
2890
|
+
}), e.removeEventListener("keydown", () => {
|
|
2881
2891
|
});
|
|
2882
2892
|
});
|
|
2883
2893
|
}
|
|
2884
2894
|
get uniqueIdAttribute() {
|
|
2885
2895
|
var e, t, s, a;
|
|
2886
|
-
return ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.searchResultTemplate) == null ? void 0 : s.searchResultUniqueIdAttribute) || ((a =
|
|
2896
|
+
return ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.searchResultTemplate) == null ? void 0 : s.searchResultUniqueIdAttribute) || ((a = b.searchResults.searchResultTemplate) == null ? void 0 : a.searchResultUniqueIdAttribute);
|
|
2887
2897
|
}
|
|
2888
2898
|
attachLinkClickEvents() {
|
|
2889
2899
|
this.searchResultLinks.forEach((e) => {
|
|
@@ -2891,18 +2901,23 @@ class ya {
|
|
|
2891
2901
|
t.preventDefault(), t.stopPropagation();
|
|
2892
2902
|
const s = e.getAttribute(this.uniqueIdAttribute) ?? "";
|
|
2893
2903
|
s && this.linkClickCallback(s);
|
|
2904
|
+
}), e.addEventListener("keydown", (t) => {
|
|
2905
|
+
if (t.code === "Space" || t.code === "Enter") {
|
|
2906
|
+
const s = e.getAttribute(this.uniqueIdAttribute) ?? "";
|
|
2907
|
+
s && this.linkClickCallback(s);
|
|
2908
|
+
}
|
|
2894
2909
|
});
|
|
2895
2910
|
});
|
|
2896
2911
|
}
|
|
2897
2912
|
renderMainTemplate() {
|
|
2898
2913
|
var e, t, s, a;
|
|
2899
|
-
const r = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.mainTemplate) == null ? void 0 : s.template) || ((a =
|
|
2900
|
-
this.dataLayer.renderingEngine ===
|
|
2914
|
+
const r = ((s = (t = (e = this.config) == null ? void 0 : e.templates) == null ? void 0 : t.mainTemplate) == null ? void 0 : s.template) || ((a = b.searchResults.mainTemplate) == null ? void 0 : a.template);
|
|
2915
|
+
this.dataLayer.renderingEngine === B.mustache && (this.searchResultsMainContainer.innerHTML = P.render(
|
|
2901
2916
|
r,
|
|
2902
2917
|
{}
|
|
2903
2918
|
), setTimeout(() => {
|
|
2904
|
-
var c, l,
|
|
2905
|
-
const S = (
|
|
2919
|
+
var c, l, o, d, f, g, m;
|
|
2920
|
+
const S = (o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.mainTemplate) != null && o.searchResultsContainerId ? (g = (f = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : f.mainTemplate) == null ? void 0 : g.searchResultsContainerId : (m = b.searchResults.mainTemplate) == null ? void 0 : m.searchResultsContainerId, O = document == null ? void 0 : document.getElementById(S);
|
|
2906
2921
|
if (O)
|
|
2907
2922
|
this.searchResultsContainer = O;
|
|
2908
2923
|
else
|
|
@@ -2912,9 +2927,9 @@ class ya {
|
|
|
2912
2927
|
}
|
|
2913
2928
|
class xa {
|
|
2914
2929
|
constructor(e) {
|
|
2915
|
-
|
|
2930
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "selectId"), h(this, "searchSortingMainContainer", null);
|
|
2916
2931
|
var t, s;
|
|
2917
|
-
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.selectId = ((s = (t = this.config.templates) == null ? void 0 : t.main) == null ? void 0 : s.selectId) ||
|
|
2932
|
+
this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, this.selectId = ((s = (t = this.config.templates) == null ? void 0 : t.main) == null ? void 0 : s.selectId) || b.sorting.main.selectId, this.searchSortingMainContainer = document == null ? void 0 : document.getElementById(this.containerId), this.initializeSubscriptions(), this.renderMainTemplate(this.generateTemplateData());
|
|
2918
2933
|
}
|
|
2919
2934
|
initializeSubscriptions() {
|
|
2920
2935
|
this.dataLayer.$searchResults.subscribe((e) => {
|
|
@@ -2946,8 +2961,8 @@ class xa {
|
|
|
2946
2961
|
}
|
|
2947
2962
|
renderMainTemplate(e) {
|
|
2948
2963
|
var t, s, a;
|
|
2949
|
-
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) ||
|
|
2950
|
-
if (this.dataLayer.renderingEngine ===
|
|
2964
|
+
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || b.sorting.main.template;
|
|
2965
|
+
if (this.dataLayer.renderingEngine === B.mustache) {
|
|
2951
2966
|
this.searchSortingMainContainer.innerHTML = P.render(
|
|
2952
2967
|
r,
|
|
2953
2968
|
e
|
|
@@ -2963,7 +2978,7 @@ class xa {
|
|
|
2963
2978
|
}
|
|
2964
2979
|
class ba {
|
|
2965
2980
|
constructor(e) {
|
|
2966
|
-
|
|
2981
|
+
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "answerContainer", null), this.dataLayer = e.dataLayer, this.config = e.config, this.containerId = e.containerId, typeof document < "u" && (this.answerContainer = document == null ? void 0 : document.getElementById(this.containerId)), this.initializeSubscriptions(), this.dataLayer.setIsAnswerWidgetCreated(!0);
|
|
2967
2982
|
}
|
|
2968
2983
|
initializeSubscriptions() {
|
|
2969
2984
|
this.dataLayer.$answer.subscribe(() => {
|
|
@@ -2974,18 +2989,18 @@ class ba {
|
|
|
2974
2989
|
}
|
|
2975
2990
|
renderMainTemplate(e) {
|
|
2976
2991
|
var t, s, a;
|
|
2977
|
-
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) ||
|
|
2978
|
-
this.dataLayer.renderingEngine ===
|
|
2992
|
+
const r = ((a = (s = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : s.main) == null ? void 0 : a.template) || b.answer.main.template;
|
|
2993
|
+
this.dataLayer.renderingEngine === B.mustache && (this.answerContainer.innerHTML = P.render(
|
|
2979
2994
|
r,
|
|
2980
2995
|
e
|
|
2981
2996
|
));
|
|
2982
2997
|
}
|
|
2983
2998
|
}
|
|
2984
2999
|
class Ca {
|
|
2985
|
-
constructor(e =
|
|
2986
|
-
|
|
3000
|
+
constructor(e = B.mustache) {
|
|
3001
|
+
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", B.mustache), e && (this.renderEngine = e);
|
|
2987
3002
|
}
|
|
2988
|
-
setRenderingEngine(e =
|
|
3003
|
+
setRenderingEngine(e = B.mustache) {
|
|
2989
3004
|
this.dataLayer.setRenderingEngine(e);
|
|
2990
3005
|
}
|
|
2991
3006
|
handleHooks() {
|
|
@@ -3231,10 +3246,10 @@ function La(i) {
|
|
|
3231
3246
|
const [t, s] = q([]);
|
|
3232
3247
|
ee(() => {
|
|
3233
3248
|
if (a(), C.searchstax) {
|
|
3234
|
-
const
|
|
3235
|
-
i.afterAutosuggest && (
|
|
3249
|
+
const o = {};
|
|
3250
|
+
i.afterAutosuggest && (o.afterAutosuggest = i.afterAutosuggest), i.beforeAutosuggest && (o.beforeAutosuggest = i.beforeAutosuggest), C.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
3236
3251
|
suggestAfterMinChars: i.suggestAfterMinChars ?? 3,
|
|
3237
|
-
hooks:
|
|
3252
|
+
hooks: o,
|
|
3238
3253
|
templates: {
|
|
3239
3254
|
mainTemplate: {
|
|
3240
3255
|
template: "",
|
|
@@ -3246,61 +3261,63 @@ function La(i) {
|
|
|
3246
3261
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3247
3262
|
}, []);
|
|
3248
3263
|
function a() {
|
|
3249
|
-
e || (C.searchstax.dataLayer.$autosuggestResults.subscribe((
|
|
3250
|
-
s((
|
|
3264
|
+
e || (C.searchstax.dataLayer.$autosuggestResults.subscribe((o) => {
|
|
3265
|
+
s((o == null ? void 0 : o.suggestions) ?? []);
|
|
3251
3266
|
}), e = !0);
|
|
3252
3267
|
}
|
|
3253
3268
|
function r() {
|
|
3254
|
-
var
|
|
3255
|
-
(
|
|
3269
|
+
var o, d;
|
|
3270
|
+
(o = C.searchstax.searchInputWidget) == null || o.resetAutosuggestSelection(), (d = C.searchstax.searchInputWidget) == null || d.markActiveAutosuggestItem();
|
|
3256
3271
|
}
|
|
3257
|
-
function c(
|
|
3272
|
+
function c(o) {
|
|
3258
3273
|
var d;
|
|
3259
|
-
(d = C.searchstax.searchInputWidget) == null || d.onSuggestionEnter(
|
|
3274
|
+
(d = C.searchstax.searchInputWidget) == null || d.onSuggestionEnter(o);
|
|
3260
3275
|
}
|
|
3261
3276
|
function l() {
|
|
3262
|
-
var
|
|
3263
|
-
(
|
|
3277
|
+
var o;
|
|
3278
|
+
(o = C.searchstax.searchInputWidget) == null || o.suggestionChosen();
|
|
3264
3279
|
}
|
|
3265
|
-
return /* @__PURE__ */
|
|
3266
|
-
!i.inputTemplate && /* @__PURE__ */
|
|
3267
|
-
/* @__PURE__ */
|
|
3280
|
+
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: [
|
|
3281
|
+
!i.inputTemplate && /* @__PURE__ */ u.jsxs("div", { className: "searchstax-search-input-wrapper", children: [
|
|
3282
|
+
/* @__PURE__ */ u.jsx(
|
|
3268
3283
|
"input",
|
|
3269
3284
|
{
|
|
3270
3285
|
type: "text",
|
|
3271
3286
|
id: "searchstax-search-input",
|
|
3272
3287
|
className: "searchstax-search-input",
|
|
3273
|
-
placeholder: "SEARCH FOR..."
|
|
3288
|
+
placeholder: "SEARCH FOR...",
|
|
3289
|
+
"aria-label": "search"
|
|
3274
3290
|
}
|
|
3275
3291
|
),
|
|
3276
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ u.jsx(
|
|
3277
3293
|
"div",
|
|
3278
3294
|
{
|
|
3279
3295
|
className: `searchstax-autosuggest-container ${t.length === 0 ? "hidden" : ""}`,
|
|
3280
3296
|
onMouseLeave: r,
|
|
3281
|
-
children: t.map(function(
|
|
3282
|
-
return /* @__PURE__ */
|
|
3297
|
+
children: t.map(function(o) {
|
|
3298
|
+
return /* @__PURE__ */ u.jsx("div", { className: "searchstax-autosuggest-item", children: /* @__PURE__ */ u.jsx(
|
|
3283
3299
|
"div",
|
|
3284
3300
|
{
|
|
3285
3301
|
className: "searchstax-autosuggest-item-term-container",
|
|
3286
|
-
|
|
3302
|
+
tabIndex: 0,
|
|
3303
|
+
dangerouslySetInnerHTML: { __html: o.term },
|
|
3287
3304
|
onMouseOver: () => {
|
|
3288
|
-
c(
|
|
3305
|
+
c(o);
|
|
3289
3306
|
},
|
|
3290
3307
|
onClick: () => {
|
|
3291
3308
|
l();
|
|
3292
3309
|
}
|
|
3293
3310
|
}
|
|
3294
|
-
) },
|
|
3311
|
+
) }, o.term);
|
|
3295
3312
|
})
|
|
3296
3313
|
}
|
|
3297
3314
|
),
|
|
3298
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ u.jsx("button", { className: "searchstax-spinner-icon", id: "searchstax-search-input-action-button", "aria-label": "search" })
|
|
3299
3316
|
] }),
|
|
3300
|
-
i.inputTemplate && /* @__PURE__ */
|
|
3317
|
+
i.inputTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.inputTemplate(t, r, c, l) })
|
|
3301
3318
|
] }) }) });
|
|
3302
3319
|
}
|
|
3303
|
-
function
|
|
3320
|
+
function ka(i) {
|
|
3304
3321
|
const [e, t] = q(!1);
|
|
3305
3322
|
return ee(() => {
|
|
3306
3323
|
const s = {};
|
|
@@ -3320,24 +3337,24 @@ function Ta(i) {
|
|
|
3320
3337
|
}), setTimeout(() => {
|
|
3321
3338
|
t(!0);
|
|
3322
3339
|
}, 100), i.initialized(C.searchstax);
|
|
3323
|
-
}, [i.initialized]), /* @__PURE__ */
|
|
3340
|
+
}, [i.initialized]), /* @__PURE__ */ u.jsx(u.Fragment, { children: e && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
3324
3341
|
" ",
|
|
3325
3342
|
i.children,
|
|
3326
3343
|
" "
|
|
3327
3344
|
] }) });
|
|
3328
3345
|
}
|
|
3329
|
-
function
|
|
3346
|
+
function Ta(i) {
|
|
3330
3347
|
const [e, t] = q(
|
|
3331
3348
|
null
|
|
3332
3349
|
), s = Ft();
|
|
3333
3350
|
s.current = e;
|
|
3334
3351
|
const [a, r] = q(""), [c, l] = q(
|
|
3335
3352
|
null
|
|
3336
|
-
),
|
|
3353
|
+
), o = (g, m) => {
|
|
3337
3354
|
m.preventDefault(), m.stopPropagation(), C.searchstax.executeLinkClick(g.uniqueId);
|
|
3338
3355
|
};
|
|
3339
3356
|
ee(() => {
|
|
3340
|
-
|
|
3357
|
+
f();
|
|
3341
3358
|
const g = {};
|
|
3342
3359
|
i.afterLinkClick && (g.afterLinkClick = i.afterLinkClick), C.searchstax.addSearchResultsWidget("searchstax-results-container", {
|
|
3343
3360
|
templates: {},
|
|
@@ -3346,12 +3363,15 @@ function ka(i) {
|
|
|
3346
3363
|
hooks: g
|
|
3347
3364
|
});
|
|
3348
3365
|
}, []);
|
|
3349
|
-
function d() {
|
|
3366
|
+
function d(g) {
|
|
3367
|
+
C.searchstax.executeSearch(g);
|
|
3368
|
+
}
|
|
3369
|
+
function f() {
|
|
3350
3370
|
C.searchstax.dataLayer.$searchResults.subscribe(
|
|
3351
3371
|
(g) => {
|
|
3352
|
-
var
|
|
3353
|
-
const m = s.current ?? [],
|
|
3354
|
-
((
|
|
3372
|
+
var T;
|
|
3373
|
+
const m = s.current ?? [], S = g ?? [], O = i.renderMethod === "infiniteScroll" ? [...m, ...S] : g;
|
|
3374
|
+
((T = C.searchstax.dataLayer.$searchObject.value) == null ? void 0 : T.page) === 1 ? t(S) : t(O);
|
|
3355
3375
|
}
|
|
3356
3376
|
), C.searchstax.dataLayer.$searchTermChange.subscribe((g) => {
|
|
3357
3377
|
r(g);
|
|
@@ -3361,84 +3381,99 @@ function ka(i) {
|
|
|
3361
3381
|
}
|
|
3362
3382
|
);
|
|
3363
3383
|
}
|
|
3364
|
-
return /* @__PURE__ */
|
|
3365
|
-
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !i.noResultTemplate && /* @__PURE__ */
|
|
3366
|
-
/* @__PURE__ */
|
|
3384
|
+
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: [
|
|
3385
|
+
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !i.noResultTemplate && /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3386
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-no-results", children: [
|
|
3367
3387
|
" ",
|
|
3368
3388
|
"Showing ",
|
|
3369
|
-
/* @__PURE__ */
|
|
3389
|
+
/* @__PURE__ */ u.jsx("strong", { children: "no results" }),
|
|
3370
3390
|
" for",
|
|
3371
3391
|
" ",
|
|
3372
|
-
/* @__PURE__ */
|
|
3392
|
+
/* @__PURE__ */ u.jsxs("strong", { children: [
|
|
3373
3393
|
'"',
|
|
3374
3394
|
a,
|
|
3375
3395
|
'"'
|
|
3376
3396
|
] }),
|
|
3377
|
-
/* @__PURE__ */
|
|
3378
|
-
(c == null ? void 0 : c.spellingSuggestion) && /* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ u.jsx("br", {}),
|
|
3398
|
+
(c == null ? void 0 : c.spellingSuggestion) && /* @__PURE__ */ u.jsxs("span", { children: [
|
|
3379
3399
|
" Did you mean",
|
|
3380
3400
|
" ",
|
|
3381
|
-
/* @__PURE__ */
|
|
3401
|
+
/* @__PURE__ */ u.jsx(
|
|
3402
|
+
"a",
|
|
3403
|
+
{
|
|
3404
|
+
href: "#",
|
|
3405
|
+
className: "searchstax-suggestion-term",
|
|
3406
|
+
onClick: () => {
|
|
3407
|
+
d(c == null ? void 0 : c.spellingSuggestion);
|
|
3408
|
+
},
|
|
3409
|
+
children: c == null ? void 0 : c.spellingSuggestion
|
|
3410
|
+
}
|
|
3411
|
+
),
|
|
3382
3412
|
"?"
|
|
3383
3413
|
] })
|
|
3384
3414
|
] }),
|
|
3385
|
-
/* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3415
|
+
/* @__PURE__ */ u.jsxs("ul", { children: [
|
|
3416
|
+
/* @__PURE__ */ u.jsxs("li", { children: [
|
|
3387
3417
|
" ",
|
|
3388
3418
|
"Try searching for search related terms or topics. We offer a wide variety of content to help you get the information you need.",
|
|
3389
3419
|
" "
|
|
3390
3420
|
] }),
|
|
3391
|
-
/* @__PURE__ */
|
|
3421
|
+
/* @__PURE__ */ u.jsx("li", { children: "Lost? Click on the ‘X” in the Search Box to reset your search." })
|
|
3392
3422
|
] })
|
|
3393
3423
|
] }),
|
|
3394
|
-
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && i.noResultTemplate && /* @__PURE__ */
|
|
3395
|
-
e && e.length > 0 && !i.resultsTemplate && /* @__PURE__ */
|
|
3396
|
-
return /* @__PURE__ */
|
|
3397
|
-
"
|
|
3424
|
+
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && i.noResultTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.noResultTemplate(a, c, d) }),
|
|
3425
|
+
e && e.length > 0 && !i.resultsTemplate && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-results", children: e !== null && e.map(function(g) {
|
|
3426
|
+
return /* @__PURE__ */ u.jsx(
|
|
3427
|
+
"a",
|
|
3398
3428
|
{
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
g
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
src: g.thumbnail,
|
|
3418
|
-
className: "searchstax-thumbnail"
|
|
3419
|
-
}
|
|
3420
|
-
),
|
|
3421
|
-
/* @__PURE__ */ h.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ h.jsx("span", { className: "searchstax-search-result-title", children: g.title }) }),
|
|
3422
|
-
g.paths && /* @__PURE__ */ h.jsx("p", { className: "searchstax-search-result-common", children: g.paths }),
|
|
3423
|
-
g.description && /* @__PURE__ */ h.jsx("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: g.description }),
|
|
3424
|
-
g.unmappedFields.map(function(m) {
|
|
3425
|
-
return /* @__PURE__ */ h.jsxs("div", { children: [
|
|
3426
|
-
m.isImage && typeof m.value == "string" && /* @__PURE__ */ h.jsx("div", { className: "searchstax-search-result-image-container", children: /* @__PURE__ */ h.jsx(
|
|
3429
|
+
href: g.url ?? "",
|
|
3430
|
+
onClick: (m) => {
|
|
3431
|
+
o(g, m);
|
|
3432
|
+
},
|
|
3433
|
+
onKeyDown: (m) => {
|
|
3434
|
+
(m.key === "Enter" || m.key === " ") && o(g, m);
|
|
3435
|
+
},
|
|
3436
|
+
tabIndex: 0,
|
|
3437
|
+
"data-searchstax-unique-result-id": g.uniqueId,
|
|
3438
|
+
className: "searchstax-result-item-link searchstax-result-item-link-wrapping",
|
|
3439
|
+
children: /* @__PURE__ */ u.jsxs(
|
|
3440
|
+
"div",
|
|
3441
|
+
{
|
|
3442
|
+
className: `searchstax-search-result ${g.thumbnail ? "has-thumbnail" : ""}`,
|
|
3443
|
+
children: [
|
|
3444
|
+
g.promoted && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-promoted" }),
|
|
3445
|
+
g.ribbon && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-ribbon", children: g.ribbon }),
|
|
3446
|
+
g.thumbnail && /* @__PURE__ */ u.jsx(
|
|
3427
3447
|
"img",
|
|
3428
3448
|
{
|
|
3429
|
-
src:
|
|
3430
|
-
className: "searchstax-
|
|
3449
|
+
src: g.thumbnail,
|
|
3450
|
+
className: "searchstax-thumbnail"
|
|
3431
3451
|
}
|
|
3432
|
-
)
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3452
|
+
),
|
|
3453
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ u.jsx("span", { className: "searchstax-search-result-title", children: g.title }) }),
|
|
3454
|
+
g.paths && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-common", children: g.paths }),
|
|
3455
|
+
g.description && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: g.description }),
|
|
3456
|
+
g.unmappedFields.map(function(m) {
|
|
3457
|
+
return /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3458
|
+
m.isImage && typeof m.value == "string" && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-image-container", children: /* @__PURE__ */ u.jsx(
|
|
3459
|
+
"img",
|
|
3460
|
+
{
|
|
3461
|
+
src: m.value,
|
|
3462
|
+
className: "searchstax-result-image"
|
|
3463
|
+
}
|
|
3464
|
+
) }),
|
|
3465
|
+
!m.isImage && /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-common", children: m.value }) })
|
|
3466
|
+
] }, m.key);
|
|
3467
|
+
})
|
|
3468
|
+
]
|
|
3469
|
+
},
|
|
3470
|
+
g.uniqueId
|
|
3471
|
+
)
|
|
3437
3472
|
},
|
|
3438
3473
|
g.uniqueId
|
|
3439
3474
|
);
|
|
3440
3475
|
}) }),
|
|
3441
|
-
e && e.length > 0 && i.resultsTemplate && /* @__PURE__ */
|
|
3476
|
+
e && e.length > 0 && i.resultsTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.resultsTemplate(e, o) })
|
|
3442
3477
|
] }) }) }) });
|
|
3443
3478
|
}
|
|
3444
3479
|
function Ra(i) {
|
|
@@ -3457,41 +3492,45 @@ function Ra(i) {
|
|
|
3457
3492
|
}, []);
|
|
3458
3493
|
function l() {
|
|
3459
3494
|
e || (C.searchstax.dataLayer.$searchObject.subscribe(() => {
|
|
3460
|
-
|
|
3495
|
+
o();
|
|
3461
3496
|
}), C.searchstax.dataLayer.$paginationData.subscribe(
|
|
3462
|
-
(
|
|
3463
|
-
r(
|
|
3497
|
+
(g) => {
|
|
3498
|
+
r(g);
|
|
3464
3499
|
}
|
|
3465
3500
|
), e = !0);
|
|
3466
3501
|
}
|
|
3467
|
-
function
|
|
3502
|
+
function o() {
|
|
3468
3503
|
!t && C.searchstax.routerHelper && (s(!0), C.searchstax.addPaginationWidget(
|
|
3469
3504
|
"searchstax-pagination-container" + c,
|
|
3470
3505
|
{}
|
|
3471
3506
|
));
|
|
3472
3507
|
}
|
|
3473
|
-
function d(
|
|
3474
|
-
var
|
|
3475
|
-
(
|
|
3476
|
-
|
|
3508
|
+
function d(g) {
|
|
3509
|
+
var m;
|
|
3510
|
+
(m = C.searchstax.searchPaginationWidget) == null || m.nextPage(
|
|
3511
|
+
g
|
|
3477
3512
|
);
|
|
3478
3513
|
}
|
|
3479
|
-
function g
|
|
3480
|
-
var
|
|
3481
|
-
(
|
|
3482
|
-
|
|
3514
|
+
function f(g) {
|
|
3515
|
+
var m;
|
|
3516
|
+
(m = C.searchstax.searchPaginationWidget) == null || m.previousPage(
|
|
3517
|
+
g
|
|
3483
3518
|
);
|
|
3484
3519
|
}
|
|
3485
|
-
return /* @__PURE__ */
|
|
3486
|
-
!i.paginationTemplate && a && !a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && /* @__PURE__ */
|
|
3487
|
-
/* @__PURE__ */
|
|
3520
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-pagination-container" + c, children: [
|
|
3521
|
+
!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: [
|
|
3522
|
+
/* @__PURE__ */ u.jsxs(
|
|
3488
3523
|
"a",
|
|
3489
3524
|
{
|
|
3490
3525
|
className: "searchstax-pagination-previous",
|
|
3491
3526
|
style: a != null && a.isFirstPage ? { pointerEvents: "none" } : {},
|
|
3492
|
-
onClick: (
|
|
3493
|
-
g
|
|
3527
|
+
onClick: (g) => {
|
|
3528
|
+
f(g);
|
|
3529
|
+
},
|
|
3530
|
+
onKeyDown: (g) => {
|
|
3531
|
+
(g.key === "Enter" || g.key === " ") && f(g);
|
|
3494
3532
|
},
|
|
3533
|
+
tabIndex: 0,
|
|
3495
3534
|
id: "searchstax-pagination-previous",
|
|
3496
3535
|
children: [
|
|
3497
3536
|
" ",
|
|
@@ -3500,7 +3539,7 @@ function Ra(i) {
|
|
|
3500
3539
|
]
|
|
3501
3540
|
}
|
|
3502
3541
|
),
|
|
3503
|
-
/* @__PURE__ */
|
|
3542
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-pagination-details", children: [
|
|
3504
3543
|
" ",
|
|
3505
3544
|
a == null ? void 0 : a.startResultIndex,
|
|
3506
3545
|
" -",
|
|
@@ -3510,31 +3549,39 @@ function Ra(i) {
|
|
|
3510
3549
|
" ",
|
|
3511
3550
|
a == null ? void 0 : a.totalResults
|
|
3512
3551
|
] }),
|
|
3513
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ u.jsx(
|
|
3514
3553
|
"a",
|
|
3515
3554
|
{
|
|
3516
3555
|
className: "searchstax-pagination-next",
|
|
3556
|
+
tabIndex: 0,
|
|
3517
3557
|
style: a != null && a.isLastPage ? { pointerEvents: "none" } : {},
|
|
3518
|
-
onClick: (
|
|
3519
|
-
d(
|
|
3558
|
+
onClick: (g) => {
|
|
3559
|
+
d(g);
|
|
3560
|
+
},
|
|
3561
|
+
onKeyDown: (g) => {
|
|
3562
|
+
(g.key === "Enter" || g.key === " ") && d(g);
|
|
3520
3563
|
},
|
|
3521
3564
|
id: "searchstax-pagination-next",
|
|
3522
3565
|
children: "Next >"
|
|
3523
3566
|
}
|
|
3524
3567
|
)
|
|
3525
3568
|
] }) }),
|
|
3526
|
-
i.paginationTemplate && a && !a.isInfiniteScroll && /* @__PURE__ */
|
|
3527
|
-
!i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */
|
|
3569
|
+
i.paginationTemplate && a && !a.isInfiniteScroll && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.paginationTemplate(a, d, f) }),
|
|
3570
|
+
!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(
|
|
3528
3571
|
"a",
|
|
3529
3572
|
{
|
|
3530
3573
|
className: "searchstax-pagination-load-more",
|
|
3531
|
-
|
|
3532
|
-
|
|
3574
|
+
tabIndex: 0,
|
|
3575
|
+
onClick: (g) => {
|
|
3576
|
+
d(g);
|
|
3577
|
+
},
|
|
3578
|
+
onKeyDown: (g) => {
|
|
3579
|
+
(g.key === "Enter" || g.key === " ") && d(g);
|
|
3533
3580
|
},
|
|
3534
3581
|
children: "Show More"
|
|
3535
3582
|
}
|
|
3536
3583
|
) }),
|
|
3537
|
-
i.infiniteScrollTemplate && a && a.isInfiniteScroll && (a == null ? void 0 : a.totalResults) !== 0 && !(a != null && a.isLastPage) && /* @__PURE__ */
|
|
3584
|
+
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) })
|
|
3538
3585
|
] }) });
|
|
3539
3586
|
}
|
|
3540
3587
|
function wa(i) {
|
|
@@ -3562,31 +3609,31 @@ function wa(i) {
|
|
|
3562
3609
|
}
|
|
3563
3610
|
), e = !0);
|
|
3564
3611
|
}
|
|
3565
|
-
function
|
|
3566
|
-
var
|
|
3567
|
-
(
|
|
3612
|
+
function o(d) {
|
|
3613
|
+
var f;
|
|
3614
|
+
(f = C.searchstax.searchSortingWidget) == null || f.setOrderQuery(d);
|
|
3568
3615
|
}
|
|
3569
|
-
return /* @__PURE__ */
|
|
3570
|
-
!i.searchSortingTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasResultsOrExternalPromotions) && /* @__PURE__ */
|
|
3571
|
-
/* @__PURE__ */
|
|
3572
|
-
/* @__PURE__ */
|
|
3616
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-sorting-container" + c, children: [
|
|
3617
|
+
!i.searchSortingTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasResultsOrExternalPromotions) && /* @__PURE__ */ u.jsxs("div", { className: "searchstax-sorting-container", children: [
|
|
3618
|
+
/* @__PURE__ */ u.jsx("label", { className: "searchstax-sorting-label", htmlFor: "searchstax-search-order-select", children: "Sort By" }),
|
|
3619
|
+
/* @__PURE__ */ u.jsx(
|
|
3573
3620
|
"select",
|
|
3574
3621
|
{
|
|
3575
3622
|
id: "searchstax-search-order-select",
|
|
3576
3623
|
className: "searchstax-search-order-select",
|
|
3577
3624
|
value: a,
|
|
3578
3625
|
onChange: (d) => {
|
|
3579
|
-
|
|
3626
|
+
o(d.target.value);
|
|
3580
3627
|
},
|
|
3581
3628
|
children: t.sortOptions.map(function(d) {
|
|
3582
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ u.jsx("option", { value: d.key, children: d.value }, d.key);
|
|
3583
3630
|
})
|
|
3584
3631
|
}
|
|
3585
3632
|
)
|
|
3586
3633
|
] }),
|
|
3587
|
-
i.searchSortingTemplate && /* @__PURE__ */
|
|
3634
|
+
i.searchSortingTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchSortingTemplate(
|
|
3588
3635
|
t,
|
|
3589
|
-
|
|
3636
|
+
o,
|
|
3590
3637
|
a
|
|
3591
3638
|
) })
|
|
3592
3639
|
] }) });
|
|
@@ -3608,36 +3655,36 @@ function Ea(i) {
|
|
|
3608
3655
|
), e = !0);
|
|
3609
3656
|
}
|
|
3610
3657
|
function c(l) {
|
|
3611
|
-
var
|
|
3612
|
-
(
|
|
3658
|
+
var o;
|
|
3659
|
+
(o = C.searchstax.searchFeedbackWidget) == null || o.onOriginalQueryClick(l);
|
|
3613
3660
|
}
|
|
3614
|
-
return /* @__PURE__ */
|
|
3615
|
-
!i.searchOverviewTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.totalResults) > 0 && /* @__PURE__ */
|
|
3661
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { className: "search-feedback-container", id: "search-feedback-container" + a, children: [
|
|
3662
|
+
!i.searchOverviewTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.totalResults) > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
3616
3663
|
"Showing",
|
|
3617
3664
|
" ",
|
|
3618
|
-
/* @__PURE__ */
|
|
3665
|
+
/* @__PURE__ */ u.jsxs("b", { children: [
|
|
3619
3666
|
t.startResultIndex,
|
|
3620
3667
|
" - ",
|
|
3621
3668
|
t.endResultIndex
|
|
3622
3669
|
] }),
|
|
3623
3670
|
" ",
|
|
3624
3671
|
"of",
|
|
3625
|
-
/* @__PURE__ */
|
|
3672
|
+
/* @__PURE__ */ u.jsxs("b", { children: [
|
|
3626
3673
|
" ",
|
|
3627
3674
|
t.totalResults
|
|
3628
3675
|
] }),
|
|
3629
3676
|
" results",
|
|
3630
|
-
t.searchTerm && /* @__PURE__ */
|
|
3677
|
+
t.searchTerm && /* @__PURE__ */ u.jsxs("span", { children: [
|
|
3631
3678
|
' for "',
|
|
3632
|
-
/* @__PURE__ */
|
|
3679
|
+
/* @__PURE__ */ u.jsx("b", { children: t.searchTerm }),
|
|
3633
3680
|
'"',
|
|
3634
3681
|
" "
|
|
3635
3682
|
] }),
|
|
3636
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-feedback-container-suggested", children: t.autoCorrectedQuery && /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3637
3684
|
" ",
|
|
3638
3685
|
"Search instead for",
|
|
3639
3686
|
" ",
|
|
3640
|
-
/* @__PURE__ */
|
|
3687
|
+
/* @__PURE__ */ u.jsx(
|
|
3641
3688
|
"a",
|
|
3642
3689
|
{
|
|
3643
3690
|
href: "#",
|
|
@@ -3650,7 +3697,7 @@ function Ea(i) {
|
|
|
3650
3697
|
)
|
|
3651
3698
|
] }) })
|
|
3652
3699
|
] }),
|
|
3653
|
-
i.searchOverviewTemplate && /* @__PURE__ */
|
|
3700
|
+
i.searchOverviewTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchOverviewTemplate(t, c) })
|
|
3654
3701
|
] }) });
|
|
3655
3702
|
}
|
|
3656
3703
|
function Ia(i) {
|
|
@@ -3660,13 +3707,13 @@ function Ia(i) {
|
|
|
3660
3707
|
null
|
|
3661
3708
|
), [r, c] = q(
|
|
3662
3709
|
[]
|
|
3663
|
-
), [l,
|
|
3710
|
+
), [l, o] = q(
|
|
3664
3711
|
{}
|
|
3665
|
-
), d = {},
|
|
3666
|
-
let
|
|
3712
|
+
), d = {}, f = Math.random();
|
|
3713
|
+
let g = !1;
|
|
3667
3714
|
ee(() => {
|
|
3668
|
-
if (
|
|
3669
|
-
C.searchstax.addFacetsWidget("searchstax-facets-container" +
|
|
3715
|
+
if (m(), C.searchstax)
|
|
3716
|
+
C.searchstax.addFacetsWidget("searchstax-facets-container" + f, {
|
|
3670
3717
|
facetingType: i.facetingType,
|
|
3671
3718
|
specificFacets: i.specificFacets,
|
|
3672
3719
|
itemsPerPageDesktop: i.itemsPerPageDesktop,
|
|
@@ -3675,299 +3722,304 @@ function Ia(i) {
|
|
|
3675
3722
|
else
|
|
3676
3723
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3677
3724
|
}, []);
|
|
3678
|
-
function
|
|
3679
|
-
|
|
3680
|
-
(
|
|
3681
|
-
|
|
3725
|
+
function m() {
|
|
3726
|
+
g || (C.searchstax.dataLayer.$facetsTemplateData.subscribe(
|
|
3727
|
+
(v) => {
|
|
3728
|
+
v != null && v.isMobile ? a(v) : t(v);
|
|
3682
3729
|
}
|
|
3683
3730
|
), C.searchstax.dataLayer.$selectedFacetsTemplateData.subscribe(
|
|
3684
|
-
(
|
|
3731
|
+
(v) => {
|
|
3685
3732
|
c(
|
|
3686
|
-
(
|
|
3733
|
+
(v ?? []).filter((j) => j.type === "checkbox")
|
|
3687
3734
|
);
|
|
3688
3735
|
}
|
|
3689
|
-
),
|
|
3736
|
+
), g = !0);
|
|
3690
3737
|
}
|
|
3691
|
-
function S(
|
|
3692
|
-
var
|
|
3693
|
-
(
|
|
3738
|
+
function S(v) {
|
|
3739
|
+
var x;
|
|
3740
|
+
(x = C.searchstax.searchFacetsWidget) == null || x.unselectFacet(v);
|
|
3694
3741
|
}
|
|
3695
3742
|
function O() {
|
|
3696
|
-
var
|
|
3697
|
-
(
|
|
3743
|
+
var v;
|
|
3744
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.removeSelectedFacets();
|
|
3698
3745
|
}
|
|
3699
|
-
function
|
|
3700
|
-
return !l[
|
|
3746
|
+
function T(v) {
|
|
3747
|
+
return !l[v];
|
|
3701
3748
|
}
|
|
3702
|
-
function
|
|
3703
|
-
|
|
3749
|
+
function R(v) {
|
|
3750
|
+
T(v) ? o({ ...l, [v]: !0 }) : o({ ...l, [v]: !1 });
|
|
3704
3751
|
}
|
|
3705
|
-
function E(
|
|
3706
|
-
var
|
|
3707
|
-
return (
|
|
3752
|
+
function E(v) {
|
|
3753
|
+
var x;
|
|
3754
|
+
return (x = C.searchstax.searchFacetsWidget) == null ? void 0 : x.isChecked(v);
|
|
3708
3755
|
}
|
|
3709
|
-
function
|
|
3756
|
+
function k(v, x, j, _, G) {
|
|
3710
3757
|
var Y;
|
|
3711
|
-
const pe = G ? "mobile-" : "desktop-",
|
|
3712
|
-
|
|
3713
|
-
|
|
3758
|
+
const pe = G ? "mobile-" : "desktop-", Q = document.getElementsByClassName(pe + v);
|
|
3759
|
+
Q[0] && ((Y = C.searchstax.searchFacetsWidget) == null || Y.onFacetSelect(
|
|
3760
|
+
x,
|
|
3714
3761
|
j,
|
|
3715
|
-
|
|
3762
|
+
Q[0],
|
|
3716
3763
|
!1,
|
|
3717
3764
|
E(j)
|
|
3718
3765
|
));
|
|
3719
3766
|
}
|
|
3720
|
-
function N(
|
|
3767
|
+
function N(v, x) {
|
|
3721
3768
|
var j;
|
|
3722
3769
|
(j = C.searchstax.searchFacetsWidget) == null || j.onShowMoreLessClick(
|
|
3723
|
-
|
|
3724
|
-
|
|
3770
|
+
v,
|
|
3771
|
+
x,
|
|
3725
3772
|
!1
|
|
3726
3773
|
);
|
|
3727
3774
|
}
|
|
3728
|
-
function
|
|
3775
|
+
function W(v, x) {
|
|
3729
3776
|
var j;
|
|
3730
3777
|
(j = C.searchstax.searchFacetsWidget) == null || j.onShowMoreLessClick(
|
|
3731
|
-
|
|
3732
|
-
|
|
3778
|
+
v,
|
|
3779
|
+
x,
|
|
3733
3780
|
!0
|
|
3734
3781
|
);
|
|
3735
3782
|
}
|
|
3736
3783
|
function A() {
|
|
3737
|
-
var
|
|
3738
|
-
(
|
|
3784
|
+
var v;
|
|
3785
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.openOverlay();
|
|
3739
3786
|
}
|
|
3740
|
-
function
|
|
3741
|
-
var
|
|
3742
|
-
(
|
|
3787
|
+
function K() {
|
|
3788
|
+
var v;
|
|
3789
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.closeOverlay();
|
|
3743
3790
|
}
|
|
3744
|
-
return /* @__PURE__ */
|
|
3745
|
-
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !i.facetsTemplateDesktop && /* @__PURE__ */
|
|
3791
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" + f, children: [
|
|
3792
|
+
(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(
|
|
3746
3793
|
"div",
|
|
3747
3794
|
{
|
|
3748
|
-
className: `searchstax-facet-container ${
|
|
3749
|
-
children: /* @__PURE__ */
|
|
3750
|
-
/* @__PURE__ */
|
|
3795
|
+
className: `searchstax-facet-container ${T(v.name) ? "active" : ""}`,
|
|
3796
|
+
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3797
|
+
/* @__PURE__ */ u.jsxs(
|
|
3751
3798
|
"div",
|
|
3752
3799
|
{
|
|
3753
3800
|
className: "searchstax-facet-title-container",
|
|
3754
3801
|
onClick: () => {
|
|
3755
|
-
|
|
3802
|
+
R(v.name);
|
|
3756
3803
|
},
|
|
3757
3804
|
children: [
|
|
3758
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
3759
3806
|
" ",
|
|
3760
|
-
|
|
3807
|
+
v.label,
|
|
3761
3808
|
" "
|
|
3762
3809
|
] }),
|
|
3763
|
-
/* @__PURE__ */
|
|
3810
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-title-arrow active" })
|
|
3764
3811
|
]
|
|
3765
3812
|
}
|
|
3766
3813
|
),
|
|
3767
|
-
/* @__PURE__ */
|
|
3768
|
-
|
|
3814
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3815
|
+
v.values.map(
|
|
3769
3816
|
//@ts-ignore
|
|
3770
|
-
(
|
|
3817
|
+
(x, j) => (d[j + v.name] = et(), /* @__PURE__ */ u.jsxs(
|
|
3771
3818
|
"div",
|
|
3772
3819
|
{
|
|
3773
|
-
className: `searchstax-facet-value-container ${
|
|
3774
|
-
ref: d[j +
|
|
3820
|
+
className: `searchstax-facet-value-container ${x.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3821
|
+
ref: d[j + v.name],
|
|
3775
3822
|
children: [
|
|
3776
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ u.jsx(
|
|
3777
3824
|
"div",
|
|
3778
3825
|
{
|
|
3779
|
-
className: "searchstax-facet-input desktop-" + j +
|
|
3780
|
-
children: /* @__PURE__ */
|
|
3826
|
+
className: "searchstax-facet-input desktop-" + j + v.name,
|
|
3827
|
+
children: /* @__PURE__ */ u.jsx(
|
|
3781
3828
|
"input",
|
|
3782
3829
|
{
|
|
3783
3830
|
type: "checkbox",
|
|
3784
3831
|
className: "searchstax-facet-input-checkbox",
|
|
3785
|
-
checked: E(
|
|
3832
|
+
checked: E(x),
|
|
3833
|
+
"aria-label": x.value + " " + x.count,
|
|
3786
3834
|
readOnly: !0,
|
|
3787
|
-
disabled:
|
|
3835
|
+
disabled: x.disabled,
|
|
3788
3836
|
onClick: (_) => {
|
|
3789
|
-
|
|
3790
|
-
j +
|
|
3837
|
+
k(
|
|
3838
|
+
j + v.name,
|
|
3791
3839
|
_,
|
|
3792
|
-
|
|
3840
|
+
x
|
|
3793
3841
|
);
|
|
3794
3842
|
}
|
|
3795
3843
|
}
|
|
3796
3844
|
)
|
|
3797
3845
|
}
|
|
3798
3846
|
),
|
|
3799
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ u.jsx(
|
|
3800
3848
|
"div",
|
|
3801
3849
|
{
|
|
3802
3850
|
className: "searchstax-facet-value-label",
|
|
3803
3851
|
onClick: (_) => {
|
|
3804
|
-
|
|
3805
|
-
j +
|
|
3852
|
+
k(
|
|
3853
|
+
j + v.name,
|
|
3806
3854
|
_,
|
|
3807
|
-
|
|
3855
|
+
x
|
|
3808
3856
|
);
|
|
3809
3857
|
},
|
|
3810
|
-
children:
|
|
3858
|
+
children: x.value
|
|
3811
3859
|
}
|
|
3812
3860
|
),
|
|
3813
|
-
/* @__PURE__ */
|
|
3861
|
+
/* @__PURE__ */ u.jsxs(
|
|
3814
3862
|
"div",
|
|
3815
3863
|
{
|
|
3816
3864
|
className: "searchstax-facet-value-count",
|
|
3817
3865
|
onClick: (_) => {
|
|
3818
|
-
|
|
3819
|
-
j +
|
|
3866
|
+
k(
|
|
3867
|
+
j + v.name,
|
|
3820
3868
|
_,
|
|
3821
|
-
|
|
3869
|
+
x
|
|
3822
3870
|
);
|
|
3823
3871
|
},
|
|
3824
3872
|
children: [
|
|
3825
3873
|
"(",
|
|
3826
|
-
|
|
3874
|
+
x.count,
|
|
3827
3875
|
")"
|
|
3828
3876
|
]
|
|
3829
3877
|
}
|
|
3830
3878
|
)
|
|
3831
3879
|
]
|
|
3832
3880
|
},
|
|
3833
|
-
|
|
3881
|
+
x.value + x.parentName
|
|
3834
3882
|
))
|
|
3835
3883
|
),
|
|
3836
|
-
|
|
3884
|
+
v.hasMoreFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-container", children: /* @__PURE__ */ u.jsxs(
|
|
3837
3885
|
"div",
|
|
3838
3886
|
{
|
|
3839
3887
|
className: "searchstax-facet-show-more-container",
|
|
3840
|
-
onClick: (
|
|
3841
|
-
N(
|
|
3888
|
+
onClick: (x) => {
|
|
3889
|
+
N(x, v);
|
|
3890
|
+
},
|
|
3891
|
+
onKeyDown: (x) => {
|
|
3892
|
+
(x.key === "Enter" || x.key === " ") && N(x, v);
|
|
3842
3893
|
},
|
|
3843
3894
|
children: [
|
|
3844
|
-
|
|
3845
|
-
!
|
|
3895
|
+
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
3896
|
+
!v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
3846
3897
|
]
|
|
3847
3898
|
}
|
|
3848
3899
|
) })
|
|
3849
3900
|
] })
|
|
3850
3901
|
] })
|
|
3851
3902
|
},
|
|
3852
|
-
|
|
3903
|
+
v.name + "desktop"
|
|
3853
3904
|
)) }),
|
|
3854
|
-
i.facetsTemplateDesktop && /* @__PURE__ */
|
|
3905
|
+
i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateDesktop(
|
|
3855
3906
|
e,
|
|
3856
3907
|
d,
|
|
3908
|
+
T,
|
|
3857
3909
|
R,
|
|
3858
3910
|
k,
|
|
3859
|
-
T,
|
|
3860
3911
|
E,
|
|
3861
3912
|
N
|
|
3862
3913
|
) }),
|
|
3863
|
-
(s == null ? void 0 : s.hasResultsOrExternalPromotions) && !i.facetsTemplateMobile && /* @__PURE__ */
|
|
3864
|
-
/* @__PURE__ */
|
|
3914
|
+
(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: [
|
|
3915
|
+
/* @__PURE__ */ u.jsx(
|
|
3865
3916
|
"div",
|
|
3866
3917
|
{
|
|
3867
3918
|
className: "searchstax-facets-pill searchstax-facets-pill-filter-by",
|
|
3868
3919
|
onClick: () => {
|
|
3869
3920
|
A();
|
|
3870
3921
|
},
|
|
3871
|
-
children: /* @__PURE__ */
|
|
3922
|
+
children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-label", children: "Filter By" })
|
|
3872
3923
|
}
|
|
3873
3924
|
),
|
|
3874
|
-
/* @__PURE__ */
|
|
3875
|
-
r.map((
|
|
3925
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-pills-selected", children: [
|
|
3926
|
+
r.map((v) => /* @__PURE__ */ u.jsxs(
|
|
3876
3927
|
"div",
|
|
3877
3928
|
{
|
|
3878
3929
|
className: "searchstax-facets-pill searchstax-facets-pill-facets",
|
|
3879
3930
|
onClick: () => {
|
|
3880
|
-
S(
|
|
3931
|
+
S(v);
|
|
3881
3932
|
},
|
|
3882
3933
|
children: [
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
|
|
3934
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-pill-label", children: [
|
|
3935
|
+
v.value,
|
|
3885
3936
|
" (",
|
|
3886
|
-
|
|
3937
|
+
v.count,
|
|
3887
3938
|
")"
|
|
3888
3939
|
] }),
|
|
3889
|
-
/* @__PURE__ */
|
|
3940
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-icon-close" })
|
|
3890
3941
|
]
|
|
3891
3942
|
},
|
|
3892
|
-
|
|
3943
|
+
v.value
|
|
3893
3944
|
)),
|
|
3894
|
-
r.length !== 0 && /* @__PURE__ */
|
|
3945
|
+
r.length !== 0 && /* @__PURE__ */ u.jsx(
|
|
3895
3946
|
"div",
|
|
3896
3947
|
{
|
|
3897
3948
|
className: "searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all",
|
|
3898
3949
|
onClick: () => {
|
|
3899
3950
|
O();
|
|
3900
3951
|
},
|
|
3901
|
-
children: /* @__PURE__ */
|
|
3952
|
+
children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-pill-label", children: "Clear Filters" })
|
|
3902
3953
|
}
|
|
3903
3954
|
)
|
|
3904
3955
|
] }),
|
|
3905
|
-
/* @__PURE__ */
|
|
3956
|
+
/* @__PURE__ */ u.jsxs(
|
|
3906
3957
|
"div",
|
|
3907
3958
|
{
|
|
3908
3959
|
className: `searchstax-facets-mobile-overlay ${//@ts-ignore
|
|
3909
3960
|
s.overlayOpened ? "searchstax-show" : ""}`,
|
|
3910
3961
|
children: [
|
|
3911
|
-
/* @__PURE__ */
|
|
3912
|
-
/* @__PURE__ */
|
|
3913
|
-
/* @__PURE__ */
|
|
3962
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facets-mobile-overlay-header", children: [
|
|
3963
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-mobile-overlay-header-title", children: "Filter By" }),
|
|
3964
|
+
/* @__PURE__ */ u.jsx(
|
|
3914
3965
|
"div",
|
|
3915
3966
|
{
|
|
3916
3967
|
className: "searchstax-search-close",
|
|
3917
3968
|
onClick: () => {
|
|
3918
|
-
|
|
3969
|
+
K();
|
|
3919
3970
|
}
|
|
3920
3971
|
}
|
|
3921
3972
|
)
|
|
3922
3973
|
] }),
|
|
3923
|
-
/* @__PURE__ */
|
|
3974
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facets-container-mobile", children: s == null ? void 0 : s.facets.map((v) => /* @__PURE__ */ u.jsx(
|
|
3924
3975
|
"div",
|
|
3925
3976
|
{
|
|
3926
|
-
className: `searchstax-facet-container ${
|
|
3927
|
-
children: /* @__PURE__ */
|
|
3928
|
-
/* @__PURE__ */
|
|
3977
|
+
className: `searchstax-facet-container ${T(v.name) ? "active" : ""}`,
|
|
3978
|
+
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3979
|
+
/* @__PURE__ */ u.jsxs(
|
|
3929
3980
|
"div",
|
|
3930
3981
|
{
|
|
3931
3982
|
className: "searchstax-facet-title-container",
|
|
3932
3983
|
onClick: () => {
|
|
3933
|
-
|
|
3984
|
+
R(v.name);
|
|
3934
3985
|
},
|
|
3935
3986
|
children: [
|
|
3936
|
-
/* @__PURE__ */
|
|
3987
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
3937
3988
|
" ",
|
|
3938
|
-
|
|
3989
|
+
v.label,
|
|
3939
3990
|
" "
|
|
3940
3991
|
] }),
|
|
3941
|
-
/* @__PURE__ */
|
|
3992
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-title-arrow active" })
|
|
3942
3993
|
]
|
|
3943
3994
|
}
|
|
3944
3995
|
),
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
|
|
3996
|
+
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3997
|
+
v.values.map(
|
|
3947
3998
|
//@ts-ignore
|
|
3948
|
-
(
|
|
3999
|
+
(x, j) => (d[j + v.name] = et(), /* @__PURE__ */ u.jsxs(
|
|
3949
4000
|
"div",
|
|
3950
4001
|
{
|
|
3951
|
-
className: `searchstax-facet-value-container ${
|
|
3952
|
-
ref: d[j +
|
|
4002
|
+
className: `searchstax-facet-value-container ${x.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
4003
|
+
ref: d[j + v.name],
|
|
3953
4004
|
children: [
|
|
3954
|
-
/* @__PURE__ */
|
|
4005
|
+
/* @__PURE__ */ u.jsx(
|
|
3955
4006
|
"div",
|
|
3956
4007
|
{
|
|
3957
|
-
className: "searchstax-facet-input mobile-" + j +
|
|
3958
|
-
children: /* @__PURE__ */
|
|
4008
|
+
className: "searchstax-facet-input mobile-" + j + v.name,
|
|
4009
|
+
children: /* @__PURE__ */ u.jsx(
|
|
3959
4010
|
"input",
|
|
3960
4011
|
{
|
|
3961
4012
|
type: "checkbox",
|
|
3962
4013
|
className: "searchstax-facet-input-checkbox",
|
|
3963
|
-
checked: E(
|
|
4014
|
+
checked: E(x),
|
|
4015
|
+
"aria-label": x.value + " " + x.count,
|
|
3964
4016
|
readOnly: !0,
|
|
3965
|
-
disabled:
|
|
4017
|
+
disabled: x.disabled,
|
|
3966
4018
|
onClick: (_) => {
|
|
3967
|
-
|
|
3968
|
-
j +
|
|
4019
|
+
k(
|
|
4020
|
+
j + v.name,
|
|
3969
4021
|
_,
|
|
3970
|
-
|
|
4022
|
+
x,
|
|
3971
4023
|
!0,
|
|
3972
4024
|
!0
|
|
3973
4025
|
);
|
|
@@ -3976,58 +4028,62 @@ function Ia(i) {
|
|
|
3976
4028
|
)
|
|
3977
4029
|
}
|
|
3978
4030
|
),
|
|
3979
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ u.jsx(
|
|
3980
4032
|
"div",
|
|
3981
4033
|
{
|
|
3982
4034
|
className: "searchstax-facet-value-label",
|
|
3983
4035
|
onClick: (_) => {
|
|
3984
|
-
|
|
3985
|
-
j +
|
|
4036
|
+
k(
|
|
4037
|
+
j + v.name,
|
|
3986
4038
|
_,
|
|
3987
|
-
|
|
4039
|
+
x
|
|
3988
4040
|
);
|
|
3989
4041
|
},
|
|
3990
|
-
children:
|
|
4042
|
+
children: x.value
|
|
3991
4043
|
}
|
|
3992
4044
|
),
|
|
3993
|
-
/* @__PURE__ */
|
|
4045
|
+
/* @__PURE__ */ u.jsxs(
|
|
3994
4046
|
"div",
|
|
3995
4047
|
{
|
|
3996
4048
|
className: "searchstax-facet-value-count",
|
|
3997
4049
|
onClick: (_) => {
|
|
3998
|
-
|
|
3999
|
-
j +
|
|
4050
|
+
k(
|
|
4051
|
+
j + v.name,
|
|
4000
4052
|
_,
|
|
4001
|
-
|
|
4053
|
+
x
|
|
4002
4054
|
);
|
|
4003
4055
|
},
|
|
4004
4056
|
children: [
|
|
4005
4057
|
"(",
|
|
4006
|
-
|
|
4058
|
+
x.count,
|
|
4007
4059
|
")"
|
|
4008
4060
|
]
|
|
4009
4061
|
}
|
|
4010
4062
|
)
|
|
4011
4063
|
]
|
|
4012
4064
|
},
|
|
4013
|
-
|
|
4065
|
+
x.value + x.parentName
|
|
4014
4066
|
))
|
|
4015
4067
|
),
|
|
4016
|
-
/* @__PURE__ */
|
|
4068
|
+
/* @__PURE__ */ u.jsx(
|
|
4017
4069
|
"div",
|
|
4018
4070
|
{
|
|
4019
4071
|
className: "searchstax-facet-show-more-container",
|
|
4020
4072
|
"v-if": "facet.hasMoreFacets",
|
|
4021
|
-
children: /* @__PURE__ */
|
|
4073
|
+
children: /* @__PURE__ */ u.jsxs(
|
|
4022
4074
|
"div",
|
|
4023
4075
|
{
|
|
4024
4076
|
className: "searchstax-facet-show-more-container",
|
|
4025
|
-
onClick: (
|
|
4026
|
-
|
|
4077
|
+
onClick: (x) => {
|
|
4078
|
+
W(x, v);
|
|
4027
4079
|
},
|
|
4080
|
+
onKeyDown: (x) => {
|
|
4081
|
+
(x.key === "Enter" || x.key === " ") && W(x, v);
|
|
4082
|
+
},
|
|
4083
|
+
tabIndex: 0,
|
|
4028
4084
|
children: [
|
|
4029
|
-
|
|
4030
|
-
!
|
|
4085
|
+
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
4086
|
+
!v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
4031
4087
|
]
|
|
4032
4088
|
}
|
|
4033
4089
|
)
|
|
@@ -4036,14 +4092,14 @@ function Ia(i) {
|
|
|
4036
4092
|
] })
|
|
4037
4093
|
] })
|
|
4038
4094
|
},
|
|
4039
|
-
|
|
4095
|
+
v.name + "mobile"
|
|
4040
4096
|
)) }),
|
|
4041
|
-
/* @__PURE__ */
|
|
4097
|
+
/* @__PURE__ */ u.jsx(
|
|
4042
4098
|
"button",
|
|
4043
4099
|
{
|
|
4044
4100
|
className: "searchstax-facets-mobile-overlay-done",
|
|
4045
4101
|
onClick: () => {
|
|
4046
|
-
|
|
4102
|
+
K();
|
|
4047
4103
|
},
|
|
4048
4104
|
children: "Done"
|
|
4049
4105
|
}
|
|
@@ -4052,18 +4108,18 @@ function Ia(i) {
|
|
|
4052
4108
|
}
|
|
4053
4109
|
)
|
|
4054
4110
|
] }) }),
|
|
4055
|
-
i.facetsTemplateMobile && /* @__PURE__ */
|
|
4111
|
+
i.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateMobile(
|
|
4056
4112
|
s,
|
|
4057
4113
|
r,
|
|
4058
4114
|
d,
|
|
4115
|
+
T,
|
|
4059
4116
|
R,
|
|
4060
4117
|
k,
|
|
4061
|
-
T,
|
|
4062
4118
|
E,
|
|
4063
4119
|
S,
|
|
4064
|
-
|
|
4120
|
+
W,
|
|
4065
4121
|
A,
|
|
4066
|
-
|
|
4122
|
+
K,
|
|
4067
4123
|
O
|
|
4068
4124
|
) })
|
|
4069
4125
|
] }) });
|
|
@@ -4088,31 +4144,35 @@ function Pa(i) {
|
|
|
4088
4144
|
), e = !0);
|
|
4089
4145
|
}
|
|
4090
4146
|
function c(l) {
|
|
4091
|
-
var
|
|
4092
|
-
(
|
|
4147
|
+
var o;
|
|
4148
|
+
(o = C.searchstax.relatedSearchesWidget) == null || o.executeSearch(l);
|
|
4093
4149
|
}
|
|
4094
|
-
return /* @__PURE__ */
|
|
4095
|
-
!i.searchRelatedSearchesTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasRelatedSearches) && /* @__PURE__ */
|
|
4150
|
+
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4151
|
+
!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: [
|
|
4096
4152
|
" ",
|
|
4097
4153
|
"Related searches: ",
|
|
4098
|
-
/* @__PURE__ */
|
|
4099
|
-
t.relatedSearches && /* @__PURE__ */
|
|
4154
|
+
/* @__PURE__ */ u.jsx("span", { id: "searchstax-related-searches" }),
|
|
4155
|
+
t.relatedSearches && /* @__PURE__ */ u.jsx("span", { className: "searchstax-related-search", children: t.relatedSearches.map((l) => /* @__PURE__ */ u.jsxs(
|
|
4100
4156
|
"span",
|
|
4101
4157
|
{
|
|
4102
4158
|
onClick: () => {
|
|
4103
4159
|
c(l);
|
|
4104
4160
|
},
|
|
4161
|
+
onKeyDown: (o) => {
|
|
4162
|
+
(o.key === "Enter" || o.key === " ") && c(l);
|
|
4163
|
+
},
|
|
4164
|
+
tabIndex: 0,
|
|
4105
4165
|
className: "searchstax-related-search searchstax-related-search-item",
|
|
4106
4166
|
children: [
|
|
4107
4167
|
" ",
|
|
4108
4168
|
l.related_search,
|
|
4109
|
-
!l.last && /* @__PURE__ */
|
|
4169
|
+
!l.last && /* @__PURE__ */ u.jsx("span", { children: "," })
|
|
4110
4170
|
]
|
|
4111
4171
|
},
|
|
4112
4172
|
l.related_search
|
|
4113
4173
|
)) })
|
|
4114
4174
|
] }),
|
|
4115
|
-
i.searchRelatedSearchesTemplate && /* @__PURE__ */
|
|
4175
|
+
i.searchRelatedSearchesTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchRelatedSearchesTemplate(t, c) })
|
|
4116
4176
|
] });
|
|
4117
4177
|
}
|
|
4118
4178
|
function ja(i) {
|
|
@@ -4133,36 +4193,36 @@ function ja(i) {
|
|
|
4133
4193
|
}
|
|
4134
4194
|
), e = !0);
|
|
4135
4195
|
}
|
|
4136
|
-
function c(l,
|
|
4196
|
+
function c(l, o) {
|
|
4137
4197
|
var d;
|
|
4138
|
-
(d = C.searchstax.externalPromotionsWidget) == null || d.trackClick(l,
|
|
4198
|
+
(d = C.searchstax.externalPromotionsWidget) == null || d.trackClick(l, o);
|
|
4139
4199
|
}
|
|
4140
|
-
return /* @__PURE__ */
|
|
4141
|
-
!i.searchExternalPromotionsTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasExternalPromotions) && /* @__PURE__ */
|
|
4142
|
-
/* @__PURE__ */
|
|
4143
|
-
l.url && /* @__PURE__ */
|
|
4200
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-external-promotions-layout-container" + a, children: [
|
|
4201
|
+
!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: [
|
|
4202
|
+
/* @__PURE__ */ u.jsx("div", { className: "icon-elevated" }),
|
|
4203
|
+
l.url && /* @__PURE__ */ u.jsx(
|
|
4144
4204
|
"a",
|
|
4145
4205
|
{
|
|
4146
4206
|
href: l.url,
|
|
4147
|
-
onClick: (
|
|
4148
|
-
c(l,
|
|
4207
|
+
onClick: (o) => {
|
|
4208
|
+
c(l, o);
|
|
4149
4209
|
},
|
|
4150
4210
|
className: "searchstax-result-item-link"
|
|
4151
4211
|
}
|
|
4152
4212
|
),
|
|
4153
|
-
/* @__PURE__ */
|
|
4154
|
-
l.description && /* @__PURE__ */
|
|
4213
|
+
/* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ u.jsx("span", { className: "searchstax-search-result-title", children: l.name }) }),
|
|
4214
|
+
l.description && /* @__PURE__ */ u.jsxs("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: [
|
|
4155
4215
|
" ",
|
|
4156
4216
|
l.description,
|
|
4157
4217
|
" "
|
|
4158
4218
|
] }),
|
|
4159
|
-
l.url && /* @__PURE__ */
|
|
4219
|
+
l.url && /* @__PURE__ */ u.jsxs("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: [
|
|
4160
4220
|
" ",
|
|
4161
4221
|
l.url,
|
|
4162
4222
|
" "
|
|
4163
4223
|
] })
|
|
4164
4224
|
] }, l.id)) }),
|
|
4165
|
-
i.searchExternalPromotionsTemplate && /* @__PURE__ */
|
|
4225
|
+
i.searchExternalPromotionsTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchExternalPromotionsTemplate(t, c) })
|
|
4166
4226
|
] }) });
|
|
4167
4227
|
}
|
|
4168
4228
|
export {
|
|
@@ -4172,7 +4232,7 @@ export {
|
|
|
4172
4232
|
Ea as SearchstaxOverviewWidget,
|
|
4173
4233
|
Ra as SearchstaxPaginationWidget,
|
|
4174
4234
|
Pa as SearchstaxRelatedSearchesWidget,
|
|
4175
|
-
|
|
4235
|
+
Ta as SearchstaxResultWidget,
|
|
4176
4236
|
wa as SearchstaxSortingWidget,
|
|
4177
|
-
|
|
4237
|
+
ka as SearchstaxWrapper
|
|
4178
4238
|
};
|