@searchstax-inc/searchstudio-ux-react 0.3.5 → 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 +448 -388
- package/package.json +2 -2
|
@@ -16,14 +16,14 @@ function Ot() {
|
|
|
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
18
|
function c(l, o, d) {
|
|
19
|
-
var
|
|
20
|
-
d !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
s.call(o,
|
|
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"), o = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"),
|
|
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")
|
|
@@ -115,13 +115,13 @@ function Mt() {
|
|
|
115
115
|
return pe(y._context) + ".Provider";
|
|
116
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
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);
|
|
@@ -557,19 +557,19 @@ Check the top-level render call using <` + y + ">.");
|
|
|
557
557
|
y = p.propTypes;
|
|
558
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,7 +625,7 @@ 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 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),
|
|
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;
|
|
@@ -861,7 +861,7 @@ class $t {
|
|
|
861
861
|
order: "",
|
|
862
862
|
facets: [],
|
|
863
863
|
additionalProps: []
|
|
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",
|
|
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
|
}
|
|
@@ -1077,17 +1077,17 @@ class he {
|
|
|
1077
1077
|
let o = "", d = {
|
|
1078
1078
|
selectedSortOption: "",
|
|
1079
1079
|
options: []
|
|
1080
|
-
},
|
|
1081
|
-
(
|
|
1080
|
+
}, f = (t = e.metadata.results.find(
|
|
1081
|
+
(g) => g.result_card === "date"
|
|
1082
1082
|
)) == null ? void 0 : t.name;
|
|
1083
1083
|
if (d.options = [
|
|
1084
1084
|
{ key: "", value: "Relevance" },
|
|
1085
|
-
{ key:
|
|
1085
|
+
{ key: f + " desc", value: "Most Recent" }
|
|
1086
1086
|
], (s = e.metadata.sorts) != null && s.length) {
|
|
1087
|
-
const
|
|
1088
|
-
d.options = [{ key: "", value: "Relevance" }, ...
|
|
1087
|
+
const g = e.metadata.sorts.map((m) => ({ value: m.label, key: m.name + " " + m.order }));
|
|
1088
|
+
d.options = [{ key: "", value: "Relevance" }, ...g];
|
|
1089
1089
|
}
|
|
1090
|
-
return o = ((l = (c = (r = (a = e == null ? void 0 : e.spellcheck) == null ? void 0 : a.suggestions) == null ? void 0 : r[
|
|
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 + ""),
|
|
@@ -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
1335
|
let l = e.itemsPerPage, o = e.itemsPerPage * (e.page - 1), d = e.order ? `&sort=${e.order}` : "";
|
|
1336
|
-
const
|
|
1337
|
-
e.facets.filter((
|
|
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
|
});
|
|
@@ -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
|
"&": "&",
|
|
@@ -1512,7 +1512,7 @@ function ea(i, e) {
|
|
|
1512
1512
|
if (!i)
|
|
1513
1513
|
return [];
|
|
1514
1514
|
var t = !1, s = [], a = [], r = [], c = !1, l = !1, o = "", d = 0;
|
|
1515
|
-
function
|
|
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,18 +1650,18 @@ 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, o, d = 0,
|
|
1653
|
+
for (var r = "", c, l, o, d = 0, f = i.length; d < f; ++d)
|
|
1654
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 o(
|
|
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);
|
|
@@ -1692,8 +1692,8 @@ U.prototype.renderPartial = function(i, e, t, s) {
|
|
|
1692
1692
|
if (r != null) {
|
|
1693
1693
|
var c = i[6], l = i[5], o = i[4], d = r;
|
|
1694
1694
|
l == 0 && o && (d = this.indentPartial(r, o, c));
|
|
1695
|
-
var
|
|
1696
|
-
return this.renderTokens(
|
|
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
|
-
h(
|
|
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,7 +2119,7 @@ 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
2124
|
const o = document == null ? void 0 : document.createElement("div");
|
|
2127
2125
|
o.classList.add("searchstax-external-promotion"), o.addEventListener("click", (d) => {
|
|
@@ -2135,8 +2133,8 @@ 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(
|
|
@@ -2155,13 +2153,13 @@ class ga {
|
|
|
2155
2153
|
const o = r.querySelector("input");
|
|
2156
2154
|
let d = c ? o.checked : !o.checked;
|
|
2157
2155
|
l !== void 0 && (d = !l), o.checked = d;
|
|
2158
|
-
const
|
|
2159
|
-
let
|
|
2160
|
-
const
|
|
2161
|
-
d ?
|
|
2162
|
-
(S) => !J.deepEqual(S,
|
|
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(
|
|
@@ -2245,27 +2243,27 @@ class ga {
|
|
|
2245
2243
|
}
|
|
2246
2244
|
}
|
|
2247
2245
|
createFacetItem(e, t, s) {
|
|
2248
|
-
var a, r, c, l, o, d, g, m,
|
|
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, o, d, g, m,
|
|
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, o, d,
|
|
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, o, d, g, m,
|
|
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 = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.mainTemplateDesktop) == null ? void 0 : d.facetsContainerClass) ||
|
|
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
|
}
|
|
@@ -2380,15 +2380,15 @@ class ga {
|
|
|
2380
2380
|
createClearFacetsComponents(e) {
|
|
2381
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
|
-
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.clearFacetsTemplate) == null ? void 0 : o.containerClass) || ((d =
|
|
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, o, d,
|
|
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 = (o = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : o.selectedFacetsTemplate) == null ? void 0 : d.containerClass) || ((
|
|
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);
|
|
@@ -2427,15 +2427,15 @@ class ga {
|
|
|
2427
2427
|
createFilterByComponent(e) {
|
|
2428
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
|
-
"." + (((o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.filterByTemplate) == null ? void 0 : o.containerClass) || ((d =
|
|
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, o, d, g, m,
|
|
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
2459
|
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (o = (l = this.config) == null ? void 0 : l.templates) != null && o.mainTemplateMobile)
|
|
2460
|
-
for (const _ of ((
|
|
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
2469
|
const v = A.querySelector(
|
|
2470
|
-
"." + (((O = (S = (
|
|
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
2472
|
v && this.createFilterByComponent(v);
|
|
2473
|
-
const
|
|
2474
|
-
"." + (((E = (
|
|
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 = "";
|
|
@@ -2489,8 +2489,8 @@ class ga {
|
|
|
2489
2489
|
class pa {
|
|
2490
2490
|
constructor(e) {
|
|
2491
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,
|
|
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) ??
|
|
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, o, d,
|
|
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();
|
|
@@ -2567,7 +2573,7 @@ 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 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) ||
|
|
2589
|
-
if (this.dataLayer.renderingEngine ===
|
|
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) {
|
|
2590
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,8 +2614,8 @@ 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(
|
|
@@ -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(() => {
|
|
@@ -2673,12 +2681,12 @@ 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) ||
|
|
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}`);
|
|
2682
2690
|
if (o)
|
|
2683
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
|
|
@@ -2687,7 +2695,7 @@ class va {
|
|
|
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) {
|
|
@@ -2847,12 +2855,13 @@ 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
2867
|
const o = this.searchResultsContainer.querySelector("a");
|
|
@@ -2863,11 +2872,11 @@ class ya {
|
|
|
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 =
|
|
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));
|
|
2871
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}]`
|
|
@@ -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, o, d, g, m
|
|
2905
|
-
const S = (o = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.mainTemplate) != null && o.searchResultsContainerId ? (
|
|
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
|
|
@@ -2914,7 +2929,7 @@ 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
|
|
@@ -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
|
-
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",
|
|
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() {
|
|
@@ -3270,7 +3285,8 @@ function La(i) {
|
|
|
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
3292
|
/* @__PURE__ */ u.jsx(
|
|
@@ -3283,6 +3299,7 @@ function La(i) {
|
|
|
3283
3299
|
"div",
|
|
3284
3300
|
{
|
|
3285
3301
|
className: "searchstax-autosuggest-item-term-container",
|
|
3302
|
+
tabIndex: 0,
|
|
3286
3303
|
dangerouslySetInnerHTML: { __html: o.term },
|
|
3287
3304
|
onMouseOver: () => {
|
|
3288
3305
|
c(o);
|
|
@@ -3295,12 +3312,12 @@ function La(i) {
|
|
|
3295
3312
|
})
|
|
3296
3313
|
}
|
|
3297
3314
|
),
|
|
3298
|
-
/* @__PURE__ */ u.jsx("button", { className: "searchstax-spinner-icon", id: "searchstax-search-input-action-button" })
|
|
3315
|
+
/* @__PURE__ */ u.jsx("button", { className: "searchstax-spinner-icon", id: "searchstax-search-input-action-button", "aria-label": "search" })
|
|
3299
3316
|
] }),
|
|
3300
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 = {};
|
|
@@ -3326,7 +3343,7 @@ function Ta(i) {
|
|
|
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();
|
|
@@ -3337,7 +3354,7 @@ function ka(i) {
|
|
|
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);
|
|
@@ -3378,62 +3398,77 @@ function ka(i) {
|
|
|
3378
3398
|
(c == null ? void 0 : c.spellingSuggestion) && /* @__PURE__ */ u.jsxs("span", { children: [
|
|
3379
3399
|
" Did you mean",
|
|
3380
3400
|
" ",
|
|
3381
|
-
/* @__PURE__ */ u.jsx(
|
|
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__ */ u.jsxs("
|
|
3386
|
-
/* @__PURE__ */ u.jsxs("
|
|
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__ */ u.jsx("
|
|
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__ */ u.jsx(u.Fragment, { children: i.noResultTemplate(a, c) }),
|
|
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) }),
|
|
3395
3425
|
e && e.length > 0 && !i.resultsTemplate && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-results", children: e !== null && e.map(function(g) {
|
|
3396
|
-
return /* @__PURE__ */ u.
|
|
3397
|
-
"
|
|
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__ */ u.jsx("div", { className: "searchstax-search-result-title-container", children: /* @__PURE__ */ u.jsx("span", { className: "searchstax-search-result-title", children: g.title }) }),
|
|
3422
|
-
g.paths && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-common", children: g.paths }),
|
|
3423
|
-
g.description && /* @__PURE__ */ u.jsx("p", { className: "searchstax-search-result-description searchstax-search-result-common", children: g.description }),
|
|
3424
|
-
g.unmappedFields.map(function(m) {
|
|
3425
|
-
return /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3426
|
-
m.isImage && typeof m.value == "string" && /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-result-image-container", children: /* @__PURE__ */ u.jsx(
|
|
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
|
);
|
|
@@ -3459,8 +3494,8 @@ function Ra(i) {
|
|
|
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
|
}
|
|
@@ -3470,16 +3505,16 @@ function Ra(i) {
|
|
|
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
3520
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-pagination-container" + c, children: [
|
|
@@ -3489,9 +3524,13 @@ function Ra(i) {
|
|
|
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
|
" ",
|
|
@@ -3514,22 +3553,30 @@ function Ra(i) {
|
|
|
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__ */ u.jsx(u.Fragment, { children: i.paginationTemplate(a, d,
|
|
3569
|
+
i.paginationTemplate && a && !a.isInfiniteScroll && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.paginationTemplate(a, d, f) }),
|
|
3527
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
|
}
|
|
@@ -3563,12 +3610,12 @@ function wa(i) {
|
|
|
3563
3610
|
), e = !0);
|
|
3564
3611
|
}
|
|
3565
3612
|
function o(d) {
|
|
3566
|
-
var
|
|
3567
|
-
(
|
|
3613
|
+
var f;
|
|
3614
|
+
(f = C.searchstax.searchSortingWidget) == null || f.setOrderQuery(d);
|
|
3568
3615
|
}
|
|
3569
3616
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-sorting-container" + c, children: [
|
|
3570
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: [
|
|
3571
|
-
/* @__PURE__ */ u.jsx("label", { className: "searchstax-sorting-label", htmlFor: "
|
|
3618
|
+
/* @__PURE__ */ u.jsx("label", { className: "searchstax-sorting-label", htmlFor: "searchstax-search-order-select", children: "Sort By" }),
|
|
3572
3619
|
/* @__PURE__ */ u.jsx(
|
|
3573
3620
|
"select",
|
|
3574
3621
|
{
|
|
@@ -3662,11 +3709,11 @@ function Ia(i) {
|
|
|
3662
3709
|
[]
|
|
3663
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,8 +3722,8 @@ function Ia(i) {
|
|
|
3675
3722
|
else
|
|
3676
3723
|
throw Error("Searchstax instance needs to be passed via props");
|
|
3677
3724
|
}, []);
|
|
3678
|
-
function
|
|
3679
|
-
|
|
3725
|
+
function m() {
|
|
3726
|
+
g || (C.searchstax.dataLayer.$facetsTemplateData.subscribe(
|
|
3680
3727
|
(v) => {
|
|
3681
3728
|
v != null && v.isMobile ? a(v) : t(v);
|
|
3682
3729
|
}
|
|
@@ -3686,50 +3733,50 @@ function Ia(i) {
|
|
|
3686
3733
|
(v ?? []).filter((j) => j.type === "checkbox")
|
|
3687
3734
|
);
|
|
3688
3735
|
}
|
|
3689
|
-
),
|
|
3736
|
+
), g = !0);
|
|
3690
3737
|
}
|
|
3691
3738
|
function S(v) {
|
|
3692
|
-
var
|
|
3693
|
-
(
|
|
3739
|
+
var x;
|
|
3740
|
+
(x = C.searchstax.searchFacetsWidget) == null || x.unselectFacet(v);
|
|
3694
3741
|
}
|
|
3695
3742
|
function O() {
|
|
3696
3743
|
var v;
|
|
3697
3744
|
(v = C.searchstax.searchFacetsWidget) == null || v.removeSelectedFacets();
|
|
3698
3745
|
}
|
|
3699
|
-
function
|
|
3746
|
+
function T(v) {
|
|
3700
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
3752
|
function E(v) {
|
|
3706
|
-
var
|
|
3707
|
-
return (
|
|
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(v,
|
|
3767
|
+
function N(v, x) {
|
|
3721
3768
|
var j;
|
|
3722
3769
|
(j = C.searchstax.searchFacetsWidget) == null || j.onShowMoreLessClick(
|
|
3723
3770
|
v,
|
|
3724
|
-
|
|
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
3778
|
v,
|
|
3732
|
-
|
|
3779
|
+
x,
|
|
3733
3780
|
!0
|
|
3734
3781
|
);
|
|
3735
3782
|
}
|
|
@@ -3737,22 +3784,22 @@ function Ia(i) {
|
|
|
3737
3784
|
var v;
|
|
3738
3785
|
(v = C.searchstax.searchFacetsWidget) == null || v.openOverlay();
|
|
3739
3786
|
}
|
|
3740
|
-
function
|
|
3787
|
+
function K() {
|
|
3741
3788
|
var v;
|
|
3742
3789
|
(v = C.searchstax.searchFacetsWidget) == null || v.closeOverlay();
|
|
3743
3790
|
}
|
|
3744
|
-
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" +
|
|
3791
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" + f, children: [
|
|
3745
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 ${
|
|
3795
|
+
className: `searchstax-facet-container ${T(v.name) ? "active" : ""}`,
|
|
3749
3796
|
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3750
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
3805
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
@@ -3767,10 +3814,10 @@ function Ia(i) {
|
|
|
3767
3814
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3768
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 ${
|
|
3820
|
+
className: `searchstax-facet-value-container ${x.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3774
3821
|
ref: d[j + v.name],
|
|
3775
3822
|
children: [
|
|
3776
3823
|
/* @__PURE__ */ u.jsx(
|
|
@@ -3782,14 +3829,15 @@ function Ia(i) {
|
|
|
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
|
-
|
|
3837
|
+
k(
|
|
3790
3838
|
j + v.name,
|
|
3791
3839
|
_,
|
|
3792
|
-
|
|
3840
|
+
x
|
|
3793
3841
|
);
|
|
3794
3842
|
}
|
|
3795
3843
|
}
|
|
@@ -3801,13 +3849,13 @@ function Ia(i) {
|
|
|
3801
3849
|
{
|
|
3802
3850
|
className: "searchstax-facet-value-label",
|
|
3803
3851
|
onClick: (_) => {
|
|
3804
|
-
|
|
3852
|
+
k(
|
|
3805
3853
|
j + v.name,
|
|
3806
3854
|
_,
|
|
3807
|
-
|
|
3855
|
+
x
|
|
3808
3856
|
);
|
|
3809
3857
|
},
|
|
3810
|
-
children:
|
|
3858
|
+
children: x.value
|
|
3811
3859
|
}
|
|
3812
3860
|
),
|
|
3813
3861
|
/* @__PURE__ */ u.jsxs(
|
|
@@ -3815,30 +3863,33 @@ function Ia(i) {
|
|
|
3815
3863
|
{
|
|
3816
3864
|
className: "searchstax-facet-value-count",
|
|
3817
3865
|
onClick: (_) => {
|
|
3818
|
-
|
|
3866
|
+
k(
|
|
3819
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
3895
|
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
@@ -3854,9 +3905,9 @@ function Ia(i) {
|
|
|
3854
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
|
) }),
|
|
@@ -3915,7 +3966,7 @@ function Ia(i) {
|
|
|
3915
3966
|
{
|
|
3916
3967
|
className: "searchstax-search-close",
|
|
3917
3968
|
onClick: () => {
|
|
3918
|
-
|
|
3969
|
+
K();
|
|
3919
3970
|
}
|
|
3920
3971
|
}
|
|
3921
3972
|
)
|
|
@@ -3923,14 +3974,14 @@ function Ia(i) {
|
|
|
3923
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 ${
|
|
3977
|
+
className: `searchstax-facet-container ${T(v.name) ? "active" : ""}`,
|
|
3927
3978
|
children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
3928
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
3987
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-title", children: [
|
|
@@ -3945,10 +3996,10 @@ function Ia(i) {
|
|
|
3945
3996
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3946
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 ${
|
|
4002
|
+
className: `searchstax-facet-value-container ${x.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3952
4003
|
ref: d[j + v.name],
|
|
3953
4004
|
children: [
|
|
3954
4005
|
/* @__PURE__ */ u.jsx(
|
|
@@ -3960,14 +4011,15 @@ function Ia(i) {
|
|
|
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
|
-
|
|
4019
|
+
k(
|
|
3968
4020
|
j + v.name,
|
|
3969
4021
|
_,
|
|
3970
|
-
|
|
4022
|
+
x,
|
|
3971
4023
|
!0,
|
|
3972
4024
|
!0
|
|
3973
4025
|
);
|
|
@@ -3981,13 +4033,13 @@ function Ia(i) {
|
|
|
3981
4033
|
{
|
|
3982
4034
|
className: "searchstax-facet-value-label",
|
|
3983
4035
|
onClick: (_) => {
|
|
3984
|
-
|
|
4036
|
+
k(
|
|
3985
4037
|
j + v.name,
|
|
3986
4038
|
_,
|
|
3987
|
-
|
|
4039
|
+
x
|
|
3988
4040
|
);
|
|
3989
4041
|
},
|
|
3990
|
-
children:
|
|
4042
|
+
children: x.value
|
|
3991
4043
|
}
|
|
3992
4044
|
),
|
|
3993
4045
|
/* @__PURE__ */ u.jsxs(
|
|
@@ -3995,22 +4047,22 @@ function Ia(i) {
|
|
|
3995
4047
|
{
|
|
3996
4048
|
className: "searchstax-facet-value-count",
|
|
3997
4049
|
onClick: (_) => {
|
|
3998
|
-
|
|
4050
|
+
k(
|
|
3999
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
4068
|
/* @__PURE__ */ u.jsx(
|
|
@@ -4022,9 +4074,13 @@ function Ia(i) {
|
|
|
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
4085
|
v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
4030
4086
|
!v.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
@@ -4043,7 +4099,7 @@ function Ia(i) {
|
|
|
4043
4099
|
{
|
|
4044
4100
|
className: "searchstax-facets-mobile-overlay-done",
|
|
4045
4101
|
onClick: () => {
|
|
4046
|
-
|
|
4102
|
+
K();
|
|
4047
4103
|
},
|
|
4048
4104
|
children: "Done"
|
|
4049
4105
|
}
|
|
@@ -4056,14 +4112,14 @@ function Ia(i) {
|
|
|
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
|
] }) });
|
|
@@ -4102,6 +4158,10 @@ function Pa(i) {
|
|
|
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
|
" ",
|
|
@@ -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
|
};
|