@searchstax-inc/searchstudio-ux-react 0.2.13 → 0.2.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import nt, { useState as H, useEffect as ee, useRef as Ft, createRef as et } from "react";
|
|
2
|
-
var Pe = { exports: {} },
|
|
2
|
+
var Pe = { exports: {} }, le = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -12,7 +12,7 @@ var Pe = { exports: {} }, oe = {};
|
|
|
12
12
|
var tt;
|
|
13
13
|
function Ot() {
|
|
14
14
|
if (tt)
|
|
15
|
-
return
|
|
15
|
+
return le;
|
|
16
16
|
tt = 1;
|
|
17
17
|
var i = nt, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
18
|
function c(l, u, d) {
|
|
@@ -25,9 +25,9 @@ function Ot() {
|
|
|
25
25
|
m[g] === void 0 && (m[g] = u[g]);
|
|
26
26
|
return { $$typeof: e, type: l, key: y, ref: k, props: m, _owner: a.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return le.Fragment = t, le.jsx = c, le.jsxs = c, le;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var oe = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -40,11 +40,11 @@ var he = {};
|
|
|
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"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"),
|
|
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"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), O = Symbol.iterator, R = "@@iterator";
|
|
44
44
|
function T(n) {
|
|
45
45
|
if (n === null || typeof n != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var p =
|
|
47
|
+
var p = O && n[O] || n[R];
|
|
48
48
|
return typeof p == "function" ? p : null;
|
|
49
49
|
}
|
|
50
50
|
var I = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -65,14 +65,14 @@ function Mt() {
|
|
|
65
65
|
M.unshift("Warning: " + p), Function.prototype.apply.call(console[n], console, M);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var W = !1, A = !1, Q = !1, f = !1, b = !1,
|
|
69
|
-
|
|
70
|
-
function
|
|
68
|
+
var W = !1, A = !1, Q = !1, f = !1, b = !1, F;
|
|
69
|
+
F = Symbol.for("react.module.reference");
|
|
70
|
+
function q(n) {
|
|
71
71
|
return !!(typeof n == "string" || typeof n == "function" || n === s || n === r || b || n === a || n === d || n === g || f || n === k || W || A || Q || typeof n == "object" && n !== null && (n.$$typeof === y || n.$$typeof === m || n.$$typeof === c || n.$$typeof === l || n.$$typeof === u || // 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.
|
|
75
|
-
n.$$typeof ===
|
|
75
|
+
n.$$typeof === F || n.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function G(n, p, v) {
|
|
78
78
|
var S = n.displayName;
|
|
@@ -81,7 +81,7 @@ function Mt() {
|
|
|
81
81
|
var j = p.displayName || p.name || "";
|
|
82
82
|
return j !== "" ? v + "(" + j + ")" : v;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function pe(n) {
|
|
85
85
|
return n.displayName || "Context";
|
|
86
86
|
}
|
|
87
87
|
function K(n) {
|
|
@@ -109,10 +109,10 @@ function Mt() {
|
|
|
109
109
|
switch (n.$$typeof) {
|
|
110
110
|
case l:
|
|
111
111
|
var p = n;
|
|
112
|
-
return
|
|
112
|
+
return pe(p) + ".Consumer";
|
|
113
113
|
case c:
|
|
114
114
|
var v = n;
|
|
115
|
-
return
|
|
115
|
+
return pe(v._context) + ".Provider";
|
|
116
116
|
case u:
|
|
117
117
|
return G(n, n.render, "ForwardRef");
|
|
118
118
|
case m:
|
|
@@ -129,13 +129,13 @@ function Mt() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var Y = Object.assign,
|
|
132
|
+
var Y = Object.assign, ne = 0, Fe, Oe, Me, Ae, De, Ne, $e;
|
|
133
133
|
function qe() {
|
|
134
134
|
}
|
|
135
135
|
qe.__reactDisabledLog = !0;
|
|
136
136
|
function ct() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
138
|
+
if (ne === 0) {
|
|
139
139
|
Fe = console.log, Oe = console.info, Me = console.warn, Ae = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
|
|
140
140
|
var n = {
|
|
141
141
|
configurable: !0,
|
|
@@ -153,12 +153,12 @@ function Mt() {
|
|
|
153
153
|
groupEnd: n
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
ne++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function lt() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (ne--, ne === 0) {
|
|
162
162
|
var n = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -188,7 +188,7 @@ function Mt() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
ne < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var be = I.ReactCurrentDispatcher, Ce;
|
|
@@ -260,18 +260,18 @@ function Mt() {
|
|
|
260
260
|
if (X && S && typeof X.stack == "string") {
|
|
261
261
|
for (var w = X.stack.split(`
|
|
262
262
|
`), V = S.stack.split(`
|
|
263
|
-
`),
|
|
263
|
+
`), $ = w.length - 1, _ = V.length - 1; $ >= 1 && _ >= 0 && w[$] !== V[_]; )
|
|
264
264
|
_--;
|
|
265
|
-
for (;
|
|
266
|
-
if (w[
|
|
267
|
-
if (
|
|
265
|
+
for (; $ >= 1 && _ >= 0; $--, _--)
|
|
266
|
+
if (w[$] !== V[_]) {
|
|
267
|
+
if ($ !== 1 || _ !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if ($--, _--, _ < 0 || w[$] !== V[_]) {
|
|
270
270
|
var z = `
|
|
271
|
-
` + w[
|
|
271
|
+
` + w[$].replace(" at new ", " at ");
|
|
272
272
|
return n.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", n.displayName)), typeof n == "function" && fe.set(n, z), z;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while ($ >= 1 && _ >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -337,8 +337,8 @@ function Mt() {
|
|
|
337
337
|
throw V.name = "Invariant Violation", V;
|
|
338
338
|
}
|
|
339
339
|
w = n[E](p, E, S, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (
|
|
341
|
-
w =
|
|
340
|
+
} catch ($) {
|
|
341
|
+
w = $;
|
|
342
342
|
}
|
|
343
343
|
w && !(w instanceof Error) && (xe(j), L("%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).", S || "React class", v, E, typeof w), xe(null)), w instanceof Error && !(w.message in He) && (He[w.message] = !0, xe(j), L("Failed %s type: %s", v, w.message), xe(null));
|
|
344
344
|
}
|
|
@@ -368,7 +368,7 @@ function Mt() {
|
|
|
368
368
|
if (mt(n))
|
|
369
369
|
return L("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
|
-
var
|
|
371
|
+
var ce = I.ReactCurrentOwner, ft = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
@@ -392,9 +392,9 @@ function Mt() {
|
|
|
392
392
|
return n.key !== void 0;
|
|
393
393
|
}
|
|
394
394
|
function xt(n, p) {
|
|
395
|
-
if (typeof n.ref == "string" &&
|
|
396
|
-
var v = K(
|
|
397
|
-
Te[v] || (L('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', K(
|
|
395
|
+
if (typeof n.ref == "string" && ce.current && p && ce.current.stateNode !== p) {
|
|
396
|
+
var v = K(ce.current.type);
|
|
397
|
+
Te[v] || (L('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', K(ce.current.type), n.ref), Te[v] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function bt(n, p) {
|
|
@@ -455,15 +455,15 @@ function Mt() {
|
|
|
455
455
|
for (M in p)
|
|
456
456
|
ye.call(p, M) && !ft.hasOwnProperty(M) && (E[M] = p[M]);
|
|
457
457
|
if (n && n.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (M in
|
|
460
|
-
E[M] === void 0 && (E[M] =
|
|
458
|
+
var $ = n.defaultProps;
|
|
459
|
+
for (M in $)
|
|
460
|
+
E[M] === void 0 && (E[M] = $[M]);
|
|
461
461
|
}
|
|
462
462
|
if (w || V) {
|
|
463
463
|
var _ = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
464
464
|
w && bt(E, _), V && Ct(E, _);
|
|
465
465
|
}
|
|
466
|
-
return St(n, w, V, j, S,
|
|
466
|
+
return St(n, w, V, j, S, ce.current, E);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var ke = I.ReactCurrentOwner, Ke = I.ReactDebugCurrentFrame;
|
|
@@ -586,14 +586,14 @@ Check the top-level render call using <` + v + ">.");
|
|
|
586
586
|
}
|
|
587
587
|
function Xe(n, p, v, S, j, M) {
|
|
588
588
|
{
|
|
589
|
-
var E =
|
|
589
|
+
var E = q(n);
|
|
590
590
|
if (!E) {
|
|
591
591
|
var w = "";
|
|
592
592
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
593
|
var V = Tt(j);
|
|
594
594
|
V ? w += V : w += ze();
|
|
595
|
-
var
|
|
596
|
-
n === null ?
|
|
595
|
+
var $;
|
|
596
|
+
n === null ? $ = "null" : Le(n) ? $ = "array" : n !== void 0 && n.$$typeof === e ? ($ = "<" + (K(n.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof n, L("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 _ = Lt(n, p, v, j, M);
|
|
599
599
|
if (_ == null)
|
|
@@ -621,8 +621,8 @@ Check the top-level render call using <` + v + ">.");
|
|
|
621
621
|
return Xe(n, p, v, !1);
|
|
622
622
|
}
|
|
623
623
|
var Pt = It, jt = Et;
|
|
624
|
-
|
|
625
|
-
}()),
|
|
624
|
+
oe.Fragment = s, oe.jsx = Pt, oe.jsxs = jt;
|
|
625
|
+
}()), oe;
|
|
626
626
|
}
|
|
627
627
|
process.env.NODE_ENV === "production" ? Pe.exports = Ot() : Pe.exports = Mt();
|
|
628
628
|
var o = 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 || {});
|
|
@@ -685,6 +685,9 @@ class Nt {
|
|
|
685
685
|
get searchingEverything() {
|
|
686
686
|
return this.searchTerm === "*";
|
|
687
687
|
}
|
|
688
|
+
get firstSearchHappened() {
|
|
689
|
+
return this.dataLayer.firstSearchHappened;
|
|
690
|
+
}
|
|
688
691
|
get isInfiniteScroll() {
|
|
689
692
|
return this.dataLayer.isInfiniteScroll ?? !1;
|
|
690
693
|
}
|
|
@@ -737,7 +740,8 @@ class Nt {
|
|
|
737
740
|
answer: this.getAnswerData,
|
|
738
741
|
shouldShowAnswer: this.shouldShowAnswer,
|
|
739
742
|
isInfiniteScroll: this.isInfiniteScroll,
|
|
740
|
-
percentageOfResultsLoaded: this.percentageOfResultsLoaded
|
|
743
|
+
percentageOfResultsLoaded: this.percentageOfResultsLoaded,
|
|
744
|
+
firstSearchHappened: this.firstSearchHappened
|
|
741
745
|
};
|
|
742
746
|
}
|
|
743
747
|
get trackingData() {
|
|
@@ -847,7 +851,7 @@ class $t {
|
|
|
847
851
|
order: "",
|
|
848
852
|
facets: [],
|
|
849
853
|
additionalProps: []
|
|
850
|
-
})), 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, "autoCorrect", !0), h(this, "forceNotCorrect", !1), h(this, "lastSearchValue", ""), h(this, "turnAIAnswerGenerationOn", !1), h(this, "isInfiniteScroll", !1), this.sessionId = e, this.cookieHandlingCallback(), this.$cookiesDisabled.subscribe(() => {
|
|
854
|
+
})), 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, "autoCorrect", !0), h(this, "forceNotCorrect", !1), h(this, "lastSearchValue", ""), h(this, "turnAIAnswerGenerationOn", !1), h(this, "isInfiniteScroll", !1), h(this, "firstSearchHappened", !1), this.sessionId = e, this.cookieHandlingCallback(), this.$cookiesDisabled.subscribe(() => {
|
|
851
855
|
this.cookieHandlingCallback();
|
|
852
856
|
});
|
|
853
857
|
}
|
|
@@ -873,7 +877,7 @@ class $t {
|
|
|
873
877
|
this.$loadingChange.setValue(e);
|
|
874
878
|
}
|
|
875
879
|
setSearchResults(e) {
|
|
876
|
-
J.deepEqual(e, this.searchResults ?? [""]) || this.$searchResults.setValue(e);
|
|
880
|
+
this.firstSearchHappened = !0, J.deepEqual(e, this.searchResults ?? [""]) || this.$searchResults.setValue(e);
|
|
877
881
|
}
|
|
878
882
|
setSearchResultsMetadata(e) {
|
|
879
883
|
J.deepEqual(e, this.searchResultsMetadata ?? {}) || this.$searchResultsMetadata.setValue(e);
|
|
@@ -1019,17 +1023,13 @@ class $t {
|
|
|
1019
1023
|
return (this.$cookiesDisabled.getValue() ?? !1) || !navigator.cookieEnabled;
|
|
1020
1024
|
}
|
|
1021
1025
|
}
|
|
1022
|
-
class
|
|
1026
|
+
class he {
|
|
1023
1027
|
static combineResultsWithMetadata(e) {
|
|
1024
1028
|
const t = [], s = parseInt(e.response.start + "") - 1, a = parseInt(e.responseHeader.params.rows);
|
|
1025
1029
|
return e.response.docs.forEach((r, c) => {
|
|
1026
1030
|
const l = {
|
|
1027
1031
|
custom: null,
|
|
1028
|
-
uniqueId:
|
|
1029
|
-
e.responseHeader.params.uniqueId,
|
|
1030
|
-
r,
|
|
1031
|
-
e
|
|
1032
|
-
) ?? "",
|
|
1032
|
+
uniqueId: r[e.responseHeader.params.uniqueId] ?? "",
|
|
1033
1033
|
position: s * a + 1 + c,
|
|
1034
1034
|
ribbon: this.doesMapExist("ribbon", e) ? this.getValueByKey("ribbon", r, e) : null,
|
|
1035
1035
|
paths: this.doesMapExist("paths", e) ? this.getValueByKey("paths", r, e) : null,
|
|
@@ -1171,14 +1171,14 @@ class st {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
return r;
|
|
1173
1173
|
}
|
|
1174
|
-
urlToSearchObject(e) {
|
|
1175
|
-
const
|
|
1174
|
+
urlToSearchObject(e, t) {
|
|
1175
|
+
const s = this.queryStringHelper.urlToParams(e), a = Z.removeXSSRiskyTags(decodeURIComponent(s[this.routeName + "[page]"])), r = parseInt(a), c = isNaN(r) ? 1 : r;
|
|
1176
1176
|
return {
|
|
1177
|
-
query: Z.removeXSSRiskyTags(decodeURIComponent(
|
|
1178
|
-
page:
|
|
1179
|
-
itemsPerPage:
|
|
1180
|
-
order: Z.removeXSSRiskyTags(
|
|
1181
|
-
facets: this.extractArrayOfFacetsFromQueryParameters(
|
|
1177
|
+
query: Z.removeXSSRiskyTags(decodeURIComponent(s[this.routeName + "[query]"])) || "",
|
|
1178
|
+
page: c,
|
|
1179
|
+
itemsPerPage: t,
|
|
1180
|
+
order: Z.removeXSSRiskyTags(s[this.routeName + "[order]"]) || "",
|
|
1181
|
+
facets: this.extractArrayOfFacetsFromQueryParameters(s) || []
|
|
1182
1182
|
};
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
@@ -1276,7 +1276,7 @@ class _t {
|
|
|
1276
1276
|
));
|
|
1277
1277
|
}
|
|
1278
1278
|
cacheFacetsCallback(e) {
|
|
1279
|
-
let t =
|
|
1279
|
+
let t = he.extractFacets(e);
|
|
1280
1280
|
this.dataLayer.setSearchFacetsCached(t);
|
|
1281
1281
|
}
|
|
1282
1282
|
search(e, t, s = !1, a = !1) {
|
|
@@ -1322,8 +1322,8 @@ class _t {
|
|
|
1322
1322
|
return;
|
|
1323
1323
|
}
|
|
1324
1324
|
t(r.data);
|
|
1325
|
-
}, s.onerror = function(
|
|
1326
|
-
|
|
1325
|
+
}, s.onerror = function() {
|
|
1326
|
+
s.close();
|
|
1327
1327
|
};
|
|
1328
1328
|
}
|
|
1329
1329
|
suggest(e, t, s) {
|
|
@@ -1351,7 +1351,7 @@ class _t {
|
|
|
1351
1351
|
return "&" + t.join("&");
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
class
|
|
1354
|
+
class ue {
|
|
1355
1355
|
static trackClick(e) {
|
|
1356
1356
|
const t = {
|
|
1357
1357
|
key: e.trackApiKey,
|
|
@@ -1383,7 +1383,7 @@ class de {
|
|
|
1383
1383
|
impressions: e.impressions
|
|
1384
1384
|
};
|
|
1385
1385
|
setTimeout(() => {
|
|
1386
|
-
t.key && this.msq.push(["
|
|
1386
|
+
t.key && this.msq.push(["track", t]);
|
|
1387
1387
|
}, 0);
|
|
1388
1388
|
}
|
|
1389
1389
|
static trackRelatedSearchClick(e) {
|
|
@@ -1417,7 +1417,7 @@ class de {
|
|
|
1417
1417
|
}, 0);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
h(
|
|
1420
|
+
h(ue, "msq", window._msq || []);
|
|
1421
1421
|
/*!
|
|
1422
1422
|
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
|
1423
1423
|
* http://github.com/janl/mustache.js
|
|
@@ -1477,13 +1477,13 @@ function ea(i, e) {
|
|
|
1477
1477
|
c = !1, l = !1;
|
|
1478
1478
|
}
|
|
1479
1479
|
var m, y, k;
|
|
1480
|
-
function
|
|
1480
|
+
function O(b) {
|
|
1481
1481
|
if (typeof b == "string" && (b = b.split(Gt, 2)), !ie(b) || b.length !== 2)
|
|
1482
1482
|
throw new Error("Invalid tags: " + b);
|
|
1483
1483
|
m = new RegExp(Ie(b[0]) + "\\s*"), y = new RegExp("\\s*" + Ie(b[1])), k = new RegExp("\\s*" + Ie("}" + b[1]));
|
|
1484
1484
|
}
|
|
1485
|
-
|
|
1486
|
-
for (var R = new
|
|
1485
|
+
O(e || P.tags);
|
|
1486
|
+
for (var R = new ge(i), T, I, L, N, W, A; !R.eos(); ) {
|
|
1487
1487
|
if (T = R.pos, L = R.scanUntil(m), L)
|
|
1488
1488
|
for (var Q = 0, f = L.length; Q < f; ++Q)
|
|
1489
1489
|
N = L.charAt(Q), Kt(N) ? (r.push(a.length), u += N) : (l = !0, t = !0, u += " "), a.push(["text", N, T, T + 1]), T += 1, N === `
|
|
@@ -1500,7 +1500,7 @@ function ea(i, e) {
|
|
|
1500
1500
|
if (A[1] !== L)
|
|
1501
1501
|
throw new Error('Unclosed section "' + A[1] + '" at ' + T);
|
|
1502
1502
|
} else
|
|
1503
|
-
I === "name" || I === "{" || I === "&" ? l = !0 : I === "=" &&
|
|
1503
|
+
I === "name" || I === "{" || I === "&" ? l = !0 : I === "=" && O(L);
|
|
1504
1504
|
}
|
|
1505
1505
|
if (g(), A = s.pop(), A)
|
|
1506
1506
|
throw new Error('Unclosed section "' + A[1] + '" at ' + R.pos);
|
|
@@ -1526,20 +1526,20 @@ function aa(i) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
return e;
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function ge(i) {
|
|
1530
1530
|
this.string = i, this.tail = i, this.pos = 0;
|
|
1531
1531
|
}
|
|
1532
|
-
|
|
1532
|
+
ge.prototype.eos = function() {
|
|
1533
1533
|
return this.tail === "";
|
|
1534
1534
|
};
|
|
1535
|
-
|
|
1535
|
+
ge.prototype.scan = function(i) {
|
|
1536
1536
|
var e = this.tail.match(i);
|
|
1537
1537
|
if (!e || e.index !== 0)
|
|
1538
1538
|
return "";
|
|
1539
1539
|
var t = e[0];
|
|
1540
1540
|
return this.tail = this.tail.substring(t.length), this.pos += t.length, t;
|
|
1541
1541
|
};
|
|
1542
|
-
|
|
1542
|
+
ge.prototype.scanUntil = function(i) {
|
|
1543
1543
|
var e = this.tail.search(i), t;
|
|
1544
1544
|
switch (e) {
|
|
1545
1545
|
case -1:
|
|
@@ -1690,28 +1690,28 @@ var P = {
|
|
|
1690
1690
|
* the cache by setting it to the literal `undefined`.
|
|
1691
1691
|
*/
|
|
1692
1692
|
set templateCache(i) {
|
|
1693
|
-
|
|
1693
|
+
de.templateCache = i;
|
|
1694
1694
|
},
|
|
1695
1695
|
/**
|
|
1696
1696
|
* Gets the default or overridden caching object from the default writer.
|
|
1697
1697
|
*/
|
|
1698
1698
|
get templateCache() {
|
|
1699
|
-
return
|
|
1699
|
+
return de.templateCache;
|
|
1700
1700
|
}
|
|
1701
|
-
},
|
|
1701
|
+
}, de = new U();
|
|
1702
1702
|
P.clearCache = function() {
|
|
1703
|
-
return
|
|
1703
|
+
return de.clearCache();
|
|
1704
1704
|
};
|
|
1705
1705
|
P.parse = function(i, e) {
|
|
1706
|
-
return
|
|
1706
|
+
return de.parse(i, e);
|
|
1707
1707
|
};
|
|
1708
1708
|
P.render = function(i, e, t, s) {
|
|
1709
1709
|
if (typeof i != "string")
|
|
1710
1710
|
throw new TypeError('Invalid template! Template should be a "string" but "' + Wt(i) + '" was given as the first argument for mustache#render(template, view, partials)');
|
|
1711
|
-
return
|
|
1711
|
+
return de.render(i, e, t, s);
|
|
1712
1712
|
};
|
|
1713
1713
|
P.escape = Jt;
|
|
1714
|
-
P.Scanner =
|
|
1714
|
+
P.Scanner = ge;
|
|
1715
1715
|
P.Context = re;
|
|
1716
1716
|
P.Writer = U;
|
|
1717
1717
|
const sa = {
|
|
@@ -1921,14 +1921,14 @@ const sa = {
|
|
|
1921
1921
|
template: `
|
|
1922
1922
|
{{#searchExecuted}}
|
|
1923
1923
|
<div class="searchstax-feedback-container">
|
|
1924
|
-
{{#
|
|
1924
|
+
{{#hasResults}}
|
|
1925
1925
|
Showing <b>{{startResultIndex}} - {{endResultIndex}}</b> of <b>{{totalResults}}</b> results {{#searchTerm}} for "<b>{{searchTerm}}</b>" {{/searchTerm}}
|
|
1926
1926
|
<div class="searchstax-feedback-container-suggested">
|
|
1927
1927
|
{{#autoCorrectedQuery}}
|
|
1928
1928
|
Search instead for <a href="#" class="searchstax-feedback-original-query">{{originalQuery}}</a>
|
|
1929
1929
|
{{/autoCorrectedQuery}}
|
|
1930
1930
|
</div>
|
|
1931
|
-
{{/
|
|
1931
|
+
{{/hasResults}}
|
|
1932
1932
|
</div>
|
|
1933
1933
|
{{/searchExecuted}}
|
|
1934
1934
|
`,
|
|
@@ -2193,7 +2193,7 @@ class ga {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
}
|
|
2195
2195
|
createFacetItem(e, t, s) {
|
|
2196
|
-
var a, r, c, l, u, d, g, m, y, k,
|
|
2196
|
+
var a, r, c, l, u, d, g, m, y, k, O, R;
|
|
2197
2197
|
const T = document.createElement("div");
|
|
2198
2198
|
T.classList.add("searchstax-facet-container"), this.deactivatedFacets[e.name] || T.classList.add("active");
|
|
2199
2199
|
const I = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.facetItemContainerTemplate) == null ? void 0 : c.template) || ((l = x.facets.facetItemContainerTemplate) == null ? void 0 : l.template);
|
|
@@ -2205,7 +2205,7 @@ class ga {
|
|
|
2205
2205
|
T.classList.toggle("active");
|
|
2206
2206
|
});
|
|
2207
2207
|
const N = T.querySelector(
|
|
2208
|
-
"." + (((
|
|
2208
|
+
"." + (((O = (k = (y = this.config) == null ? void 0 : y.templates) == null ? void 0 : k.facetItemContainerTemplate) == null ? void 0 : O.facetListContainerClass) || ((R = x.facets.facetItemContainerTemplate) == null ? void 0 : R.facetListContainerClass))
|
|
2209
2209
|
);
|
|
2210
2210
|
N && (e.values.forEach((W) => {
|
|
2211
2211
|
this.createFacetListItem(W, N);
|
|
@@ -2216,7 +2216,7 @@ class ga {
|
|
|
2216
2216
|
return !!((t = this.dataLayer.searchObject.facets) != null && t.find((s) => J.deepEqual(s, this.extractFacetValue(e))));
|
|
2217
2217
|
}
|
|
2218
2218
|
createFacetListItem(e, t) {
|
|
2219
|
-
var s, a, r, c, l, u, d, g, m, y, k,
|
|
2219
|
+
var s, a, r, c, l, u, d, g, m, y, k, O, R;
|
|
2220
2220
|
const T = document.createElement("div");
|
|
2221
2221
|
T.classList.add("searchstax-facet-value-container"), e.disabled && T.classList.add("searchstax-facet-value-disabled");
|
|
2222
2222
|
const I = this.isChecked(e), L = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.facetItemTemplate) == null ? void 0 : r.template) || ((c = x.facets.facetItemTemplate) == null ? void 0 : c.template);
|
|
@@ -2228,7 +2228,7 @@ class ga {
|
|
|
2228
2228
|
this.onFacetSelect(Q, e, T);
|
|
2229
2229
|
});
|
|
2230
2230
|
}), (R = T.querySelector(
|
|
2231
|
-
"." + (((k = (y = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : y.facetItemTemplate) == null ? void 0 : k.inputCheckboxClass) || ((
|
|
2231
|
+
"." + (((k = (y = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : y.facetItemTemplate) == null ? void 0 : k.inputCheckboxClass) || ((O = x.facets.facetItemTemplate) == null ? void 0 : O.inputCheckboxClass))
|
|
2232
2232
|
)) == null || R.addEventListener("click", (W) => {
|
|
2233
2233
|
this.onFacetSelect(W, e, T, !0);
|
|
2234
2234
|
}), t.appendChild(T);
|
|
@@ -2239,10 +2239,10 @@ class ga {
|
|
|
2239
2239
|
y.classList.add("searchstax-facet-show-more-container");
|
|
2240
2240
|
const k = ((c = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.showMoreButtonContainerTemplate) == null ? void 0 : c.template) || ((l = x.facets.showMoreButtonContainerTemplate) == null ? void 0 : l.template);
|
|
2241
2241
|
y.innerHTML = P.render(k, e);
|
|
2242
|
-
const
|
|
2242
|
+
const O = y.querySelector(
|
|
2243
2243
|
"." + (((g = (d = (u = this.config) == null ? void 0 : u.templates) == null ? void 0 : d.showMoreButtonContainerTemplate) == null ? void 0 : g.showMoreButtonClass) || ((m = x.facets.showMoreButtonContainerTemplate) == null ? void 0 : m.showMoreButtonClass))
|
|
2244
2244
|
);
|
|
2245
|
-
|
|
2245
|
+
O && (this.attachOnclickToShowMore(e, O, s), t && t.appendChild(O));
|
|
2246
2246
|
}
|
|
2247
2247
|
attachOnclickToShowMore(e, t, s) {
|
|
2248
2248
|
t.addEventListener("click", (a) => {
|
|
@@ -2258,9 +2258,9 @@ class ga {
|
|
|
2258
2258
|
var s, a, r, c, l, u, d, g, m, y, k;
|
|
2259
2259
|
if (e && (!J.deepEqual(this.cachedData ?? {}, e) || t)) {
|
|
2260
2260
|
this.cachedData = e;
|
|
2261
|
-
const
|
|
2261
|
+
const O = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.mainTemplateDesktop) == null ? void 0 : r.template) || ((c = x.facets.mainTemplateDesktop) == null ? void 0 : c.template);
|
|
2262
2262
|
if (this.dataLayer.renderingEngine === B.mustache && this.searchFacetsMainContainer) {
|
|
2263
|
-
this.searchFacetsMainContainer.innerHTML = P.render(
|
|
2263
|
+
this.searchFacetsMainContainer.innerHTML = P.render(O, {
|
|
2264
2264
|
...e
|
|
2265
2265
|
});
|
|
2266
2266
|
const R = (g = this.searchFacetsMainContainer) == null ? void 0 : g.querySelector(
|
|
@@ -2355,7 +2355,7 @@ class ga {
|
|
|
2355
2355
|
this.overlayOpened = !1, this.searchFacetsMainContainer && (document.body.classList.toggle("searchstax-no-scroll"), (e = this.searchFacetsMainContainer.querySelector(".searchstax-facets-mobile-overlay")) == null || e.classList.remove("searchstax-show"));
|
|
2356
2356
|
}
|
|
2357
2357
|
renderMobileTemplate(e) {
|
|
2358
|
-
var t, s, a, r, c, l, u, d, g, m, y, k,
|
|
2358
|
+
var t, s, a, r, c, l, u, d, g, m, y, k, O, R, T, I, L, N, W;
|
|
2359
2359
|
if (e) {
|
|
2360
2360
|
const A = document.createElement("div");
|
|
2361
2361
|
A.classList.add("searchstax-facets-container-mobile");
|
|
@@ -2365,30 +2365,30 @@ class ga {
|
|
|
2365
2365
|
...e,
|
|
2366
2366
|
overlayOpened: this.overlayOpened
|
|
2367
2367
|
}), (c = this.searchFacetsMainContainer) == null || c.appendChild(A), (u = (l = this.config) == null ? void 0 : l.templates) != null && u.mainTemplateMobile)
|
|
2368
|
-
for (const
|
|
2369
|
-
const G = A.querySelector("." +
|
|
2368
|
+
for (const q of ((m = (g = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : g.mainTemplateMobile) == null ? void 0 : m.closeOverlayTriggerClasses) || []) {
|
|
2369
|
+
const G = A.querySelector("." + q);
|
|
2370
2370
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2371
2371
|
}
|
|
2372
2372
|
else
|
|
2373
|
-
for (const
|
|
2374
|
-
const G = A.querySelector("." +
|
|
2373
|
+
for (const q of x.facets.mainTemplateMobile.closeOverlayTriggerClasses) {
|
|
2374
|
+
const G = A.querySelector("." + q);
|
|
2375
2375
|
G && G.addEventListener("click", this.closeOverlay.bind(this));
|
|
2376
2376
|
}
|
|
2377
2377
|
const f = A.querySelector(
|
|
2378
|
-
"." + (((
|
|
2378
|
+
"." + (((O = (k = (y = this.config) == null ? void 0 : y.templates) == null ? void 0 : k.mainTemplateMobile) == null ? void 0 : O.filterByContainerClass) || x.facets.mainTemplateMobile.filterByContainerClass)
|
|
2379
2379
|
);
|
|
2380
2380
|
f && this.createFilterByComponent(f);
|
|
2381
2381
|
const b = A.querySelector(
|
|
2382
2382
|
"." + (((I = (T = (R = this.config) == null ? void 0 : R.templates) == null ? void 0 : T.mainTemplateMobile) == null ? void 0 : I.selectedFacetsContainerClass) || x.facets.mainTemplateMobile.selectedFacetsContainerClass)
|
|
2383
2383
|
);
|
|
2384
2384
|
b && (this.createSelectedFacetsComponents(b), this.createClearFacetsComponents(b));
|
|
2385
|
-
const
|
|
2385
|
+
const F = A.querySelector(
|
|
2386
2386
|
"." + (((W = (N = (L = this.config) == null ? void 0 : L.templates) == null ? void 0 : N.mainTemplateMobile) == null ? void 0 : W.facetsContainerClass) || x.facets.mainTemplateMobile.facetsContainerClass)
|
|
2387
2387
|
);
|
|
2388
|
-
if (
|
|
2389
|
-
|
|
2390
|
-
for (const
|
|
2391
|
-
this.createFacetItem(
|
|
2388
|
+
if (F) {
|
|
2389
|
+
F.innerHTML = "";
|
|
2390
|
+
for (const q of e.facets)
|
|
2391
|
+
this.createFacetItem(q, F, !0);
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
@@ -2660,7 +2660,7 @@ class va {
|
|
|
2660
2660
|
hideAutosuggest() {
|
|
2661
2661
|
setTimeout(() => {
|
|
2662
2662
|
this.dataLayer.setAutosuggestResults({ numFound: 0, suggestions: [] }), this.autosuggestContainer && (this.autosuggestContainer.innerHTML = "", this.autosuggestContainer.classList.add("hidden")), this.resetAutosuggestSelection();
|
|
2663
|
-
},
|
|
2663
|
+
}, 200);
|
|
2664
2664
|
}
|
|
2665
2665
|
cleanSuggestionTerm(e) {
|
|
2666
2666
|
return Z.removeXSSRiskyTags(e.replace(/(<([^>]+)>)/gi, "")).trim();
|
|
@@ -2727,7 +2727,7 @@ class ya {
|
|
|
2727
2727
|
c,
|
|
2728
2728
|
{
|
|
2729
2729
|
spellingSuggestion: l,
|
|
2730
|
-
|
|
2730
|
+
...this.dataLayer.parsedData.data
|
|
2731
2731
|
}
|
|
2732
2732
|
)), l && this.searchResultsContainer) {
|
|
2733
2733
|
const u = this.searchResultsContainer.querySelector("a");
|
|
@@ -2777,9 +2777,9 @@ class ya {
|
|
|
2777
2777
|
{}
|
|
2778
2778
|
), setTimeout(() => {
|
|
2779
2779
|
var c, l, u, d, g, m, y;
|
|
2780
|
-
const k = (u = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.mainTemplate) != null && u.searchResultsContainerId ? (m = (g = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : g.mainTemplate) == null ? void 0 : m.searchResultsContainerId : (y = x.searchResults.mainTemplate) == null ? void 0 : y.searchResultsContainerId,
|
|
2781
|
-
if (
|
|
2782
|
-
this.searchResultsContainer =
|
|
2780
|
+
const k = (u = (l = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : l.mainTemplate) != null && u.searchResultsContainerId ? (m = (g = (d = this.config) == null ? void 0 : d.templates) == null ? void 0 : g.mainTemplate) == null ? void 0 : m.searchResultsContainerId : (y = x.searchResults.mainTemplate) == null ? void 0 : y.searchResultsContainerId, O = document.getElementById(k);
|
|
2781
|
+
if (O)
|
|
2782
|
+
this.searchResultsContainer = O;
|
|
2783
2783
|
else
|
|
2784
2784
|
throw new Error(`Search Results Container with id ${k} not found`);
|
|
2785
2785
|
}, 0));
|
|
@@ -2874,7 +2874,7 @@ class Ca {
|
|
|
2874
2874
|
this.parseAnswerResultsResponse.bind(this)
|
|
2875
2875
|
)));
|
|
2876
2876
|
}), this.dataLayer.$searchResults.subscribe((s) => {
|
|
2877
|
-
s && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled &&
|
|
2877
|
+
s && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && ue.trackSearch({
|
|
2878
2878
|
...this.dataLayer.parsedData.trackingData,
|
|
2879
2879
|
impressions: this.dataLayer.searchResultsMetadata.impressions
|
|
2880
2880
|
});
|
|
@@ -2888,10 +2888,10 @@ class Ca {
|
|
|
2888
2888
|
)), ((t = e.router) == null ? void 0 : t.enabled) === void 0 || ((s = e.router) == null ? void 0 : s.enabled) === !0 ? (this.routerEnabled = !0, this.routerHelper = new st(
|
|
2889
2889
|
e.router ? e.router : { enabled: !0 }
|
|
2890
2890
|
), this.dataLayer.setSearchObject(
|
|
2891
|
-
this.routerHelper.urlToSearchObject(window.location.href)
|
|
2891
|
+
this.routerHelper.urlToSearchObject(window.location.href, this.dataLayer.searchObject.itemsPerPage)
|
|
2892
2892
|
), addEventListener("popstate", () => {
|
|
2893
2893
|
this.routerHelper && this.dataLayer.setSearchObject(
|
|
2894
|
-
this.routerHelper.urlToSearchObject(window.location.href)
|
|
2894
|
+
this.routerHelper.urlToSearchObject(window.location.href, this.dataLayer.searchObject.itemsPerPage)
|
|
2895
2895
|
);
|
|
2896
2896
|
})) : this.routerHelper = new st({});
|
|
2897
2897
|
}
|
|
@@ -2922,7 +2922,7 @@ class Ca {
|
|
|
2922
2922
|
relatedSearch: r.related_search,
|
|
2923
2923
|
position: r.position
|
|
2924
2924
|
});
|
|
2925
|
-
this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled &&
|
|
2925
|
+
this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && ue.trackRelatedSearches({
|
|
2926
2926
|
...this.dataLayer.parsedData.trackingData,
|
|
2927
2927
|
impressions: a
|
|
2928
2928
|
}), this.dataLayer.setSearchRelatedSearches(s);
|
|
@@ -2936,9 +2936,9 @@ class Ca {
|
|
|
2936
2936
|
parseSearchResultsResponse(e) {
|
|
2937
2937
|
var t, s;
|
|
2938
2938
|
this.handleRouter();
|
|
2939
|
-
let a =
|
|
2939
|
+
let a = he.combineResultsWithMetadata(e), r = he.extractFacets(e);
|
|
2940
2940
|
this.dataLayer.setSearchFacets(r), (s = (t = this.dataLayer.searchstaxConfig) == null ? void 0 : t.hooks) != null && s.afterSearch && (a = this.dataLayer.searchstaxConfig.hooks.afterSearch(a)), this.dataLayer.setSearchExternalPromotions(e.externalLinks ?? []);
|
|
2941
|
-
const c =
|
|
2941
|
+
const c = he.extractSearchResultsMetadata(e);
|
|
2942
2942
|
this.dataLayer.setSearchResultsMetadata(c), this.dataLayer.setSearchResults(a);
|
|
2943
2943
|
}
|
|
2944
2944
|
parseAnswerResultsResponse(e) {
|
|
@@ -3052,18 +3052,18 @@ class Ca {
|
|
|
3052
3052
|
(s = (t = this.dataLayer.searchInputConfig) == null ? void 0 : t.hooks) != null && s.beforeAutosuggest && (a = this.dataLayer.searchInputConfig.hooks.beforeAutosuggest(a)), a && a.term !== void 0 && a.queryParams !== void 0 && this.suggest(a.term, a.queryParams);
|
|
3053
3053
|
}
|
|
3054
3054
|
trackRelatedSearchClick(e) {
|
|
3055
|
-
this.dataLayer.searchResultsMetadata && this.dataLayer.searchRelatedSearches && !this.dataLayer.cookiesDisabled &&
|
|
3055
|
+
this.dataLayer.searchResultsMetadata && this.dataLayer.searchRelatedSearches && !this.dataLayer.cookiesDisabled && ue.trackRelatedSearchClick({
|
|
3056
3056
|
...this.dataLayer.parsedData.trackingData,
|
|
3057
3057
|
relatedSearch: e
|
|
3058
3058
|
});
|
|
3059
3059
|
}
|
|
3060
3060
|
executeLinkClick(e) {
|
|
3061
3061
|
var t, s;
|
|
3062
|
-
let a =
|
|
3062
|
+
let a = he.findResultByUniqueId(
|
|
3063
3063
|
e,
|
|
3064
3064
|
this.dataLayer.searchResults ?? []
|
|
3065
3065
|
);
|
|
3066
|
-
a && ((s = (t = this.searchResultsConfig) == null ? void 0 : t.hooks) != null && s.afterLinkClick && (a = this.searchResultsConfig.hooks.afterLinkClick(a)), a && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && (
|
|
3066
|
+
a && ((s = (t = this.searchResultsConfig) == null ? void 0 : t.hooks) != null && s.afterLinkClick && (a = this.searchResultsConfig.hooks.afterLinkClick(a)), a && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && (ue.trackClick({
|
|
3067
3067
|
result: a,
|
|
3068
3068
|
...this.dataLayer.parsedData.trackingData
|
|
3069
3069
|
}), setTimeout(() => {
|
|
@@ -3199,9 +3199,9 @@ function ka(i) {
|
|
|
3199
3199
|
function d() {
|
|
3200
3200
|
C.searchstax.dataLayer.$searchResults.subscribe(
|
|
3201
3201
|
(g) => {
|
|
3202
|
-
var
|
|
3202
|
+
var O;
|
|
3203
3203
|
const m = s.current ?? [], y = g ?? [], k = i.renderMethod === "infiniteScroll" ? [...m, ...y] : g;
|
|
3204
|
-
((
|
|
3204
|
+
((O = C.searchstax.dataLayer.$searchObject.value) == null ? void 0 : O.page) === 1 ? t(y) : t(k);
|
|
3205
3205
|
}
|
|
3206
3206
|
), C.searchstax.dataLayer.$searchTermChange.subscribe((g) => {
|
|
3207
3207
|
r(g);
|
|
@@ -3212,7 +3212,7 @@ function ka(i) {
|
|
|
3212
3212
|
);
|
|
3213
3213
|
}
|
|
3214
3214
|
return /* @__PURE__ */ o.jsx(o.Fragment, { children: /* @__PURE__ */ o.jsx("div", { id: "searchstax-results-container", children: /* @__PURE__ */ o.jsx("div", { className: "searchstax-search-results-container", children: /* @__PURE__ */ o.jsxs("div", { id: "searchstax-result-container", children: [
|
|
3215
|
-
e && e.length === 0 && a !== "" && a !== "*" && !i.noResultTemplate && /* @__PURE__ */ o.jsxs("div", { children: [
|
|
3215
|
+
e && e.length === 0 && a !== "" && a !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !i.noResultTemplate && /* @__PURE__ */ o.jsxs("div", { children: [
|
|
3216
3216
|
/* @__PURE__ */ o.jsxs("div", { className: "searchstax-no-results", children: [
|
|
3217
3217
|
" ",
|
|
3218
3218
|
"Showing ",
|
|
@@ -3522,7 +3522,7 @@ function Ia(i) {
|
|
|
3522
3522
|
), C.searchstax.dataLayer.$selectedFacetsTemplateData.subscribe(
|
|
3523
3523
|
(f) => {
|
|
3524
3524
|
c(
|
|
3525
|
-
(f ?? []).filter((
|
|
3525
|
+
(f ?? []).filter((F) => F.type === "checkbox")
|
|
3526
3526
|
);
|
|
3527
3527
|
}
|
|
3528
3528
|
), m = !0);
|
|
@@ -3531,7 +3531,7 @@ function Ia(i) {
|
|
|
3531
3531
|
var b;
|
|
3532
3532
|
(b = C.searchstax.searchFacetsWidget) == null || b.unselectFacet(f);
|
|
3533
3533
|
}
|
|
3534
|
-
function
|
|
3534
|
+
function O() {
|
|
3535
3535
|
var f;
|
|
3536
3536
|
(f = C.searchstax.searchFacetsWidget) == null || f.removeSelectedFacets();
|
|
3537
3537
|
}
|
|
@@ -3545,27 +3545,29 @@ function Ia(i) {
|
|
|
3545
3545
|
var b;
|
|
3546
3546
|
return (b = C.searchstax.searchFacetsWidget) == null ? void 0 : b.isChecked(f);
|
|
3547
3547
|
}
|
|
3548
|
-
function L(f, b,
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3548
|
+
function L(f, b, F, q, G) {
|
|
3549
|
+
const pe = G ? "mobile-" : "desktop-", K = document.getElementsByClassName(pe + f);
|
|
3550
|
+
K[0] && setTimeout(() => {
|
|
3551
|
+
var Y;
|
|
3552
|
+
(Y = C.searchstax.searchFacetsWidget) == null || Y.onFacetSelect(
|
|
3553
|
+
b,
|
|
3554
|
+
F,
|
|
3555
|
+
K[0],
|
|
3556
|
+
!1
|
|
3557
|
+
);
|
|
3558
|
+
}, 100);
|
|
3557
3559
|
}
|
|
3558
3560
|
function N(f, b) {
|
|
3559
|
-
var
|
|
3560
|
-
(
|
|
3561
|
+
var F;
|
|
3562
|
+
(F = C.searchstax.searchFacetsWidget) == null || F.onShowMoreLessClick(
|
|
3561
3563
|
f,
|
|
3562
3564
|
b,
|
|
3563
3565
|
!1
|
|
3564
3566
|
);
|
|
3565
3567
|
}
|
|
3566
3568
|
function W(f, b) {
|
|
3567
|
-
var
|
|
3568
|
-
(
|
|
3569
|
+
var F;
|
|
3570
|
+
(F = C.searchstax.searchFacetsWidget) == null || F.onShowMoreLessClick(
|
|
3569
3571
|
f,
|
|
3570
3572
|
b,
|
|
3571
3573
|
!0
|
|
@@ -3605,40 +3607,44 @@ function Ia(i) {
|
|
|
3605
3607
|
/* @__PURE__ */ o.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3606
3608
|
f.values.map(
|
|
3607
3609
|
//@ts-ignore
|
|
3608
|
-
(b,
|
|
3610
|
+
(b, F) => (d[F + f.name] = et(), /* @__PURE__ */ o.jsxs(
|
|
3609
3611
|
"div",
|
|
3610
3612
|
{
|
|
3611
3613
|
className: `searchstax-facet-value-container ${b.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3612
|
-
ref: d[
|
|
3614
|
+
ref: d[F + f.name],
|
|
3613
3615
|
children: [
|
|
3614
|
-
/* @__PURE__ */ o.jsx(
|
|
3615
|
-
"
|
|
3616
|
+
/* @__PURE__ */ o.jsx(
|
|
3617
|
+
"div",
|
|
3616
3618
|
{
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3619
|
+
className: "searchstax-facet-input desktop-" + F + f.name,
|
|
3620
|
+
children: /* @__PURE__ */ o.jsx(
|
|
3621
|
+
"input",
|
|
3622
|
+
{
|
|
3623
|
+
type: "checkbox",
|
|
3624
|
+
className: "searchstax-facet-input-checkbox",
|
|
3625
|
+
checked: I(b),
|
|
3626
|
+
readOnly: !0,
|
|
3627
|
+
disabled: b.disabled,
|
|
3628
|
+
onClick: (q) => {
|
|
3629
|
+
L(
|
|
3630
|
+
F + f.name,
|
|
3631
|
+
q,
|
|
3632
|
+
b
|
|
3633
|
+
);
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
)
|
|
3630
3637
|
}
|
|
3631
|
-
)
|
|
3638
|
+
),
|
|
3632
3639
|
/* @__PURE__ */ o.jsx(
|
|
3633
3640
|
"div",
|
|
3634
3641
|
{
|
|
3635
3642
|
className: "searchstax-facet-value-label",
|
|
3636
|
-
onClick: (
|
|
3643
|
+
onClick: (q) => {
|
|
3637
3644
|
L(
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
b
|
|
3641
|
-
!1
|
|
3645
|
+
F + f.name,
|
|
3646
|
+
q,
|
|
3647
|
+
b
|
|
3642
3648
|
);
|
|
3643
3649
|
},
|
|
3644
3650
|
children: b.value
|
|
@@ -3648,12 +3654,11 @@ function Ia(i) {
|
|
|
3648
3654
|
"div",
|
|
3649
3655
|
{
|
|
3650
3656
|
className: "searchstax-facet-value-count",
|
|
3651
|
-
onClick: (
|
|
3657
|
+
onClick: (q) => {
|
|
3652
3658
|
L(
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
b
|
|
3656
|
-
!1
|
|
3659
|
+
F + f.name,
|
|
3660
|
+
q,
|
|
3661
|
+
b
|
|
3657
3662
|
);
|
|
3658
3663
|
},
|
|
3659
3664
|
children: [
|
|
@@ -3731,7 +3736,7 @@ function Ia(i) {
|
|
|
3731
3736
|
{
|
|
3732
3737
|
className: "searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all",
|
|
3733
3738
|
onClick: () => {
|
|
3734
|
-
|
|
3739
|
+
O();
|
|
3735
3740
|
},
|
|
3736
3741
|
children: /* @__PURE__ */ o.jsx("div", { className: "searchstax-facets-pill-label", children: "Clear Filters" })
|
|
3737
3742
|
}
|
|
@@ -3780,40 +3785,46 @@ function Ia(i) {
|
|
|
3780
3785
|
/* @__PURE__ */ o.jsxs("div", { className: "searchstax-facet-values-container", children: [
|
|
3781
3786
|
f.values.map(
|
|
3782
3787
|
//@ts-ignore
|
|
3783
|
-
(b,
|
|
3788
|
+
(b, F) => (d[F + f.name] = et(), /* @__PURE__ */ o.jsxs(
|
|
3784
3789
|
"div",
|
|
3785
3790
|
{
|
|
3786
3791
|
className: `searchstax-facet-value-container ${b.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
3787
|
-
ref: d[
|
|
3792
|
+
ref: d[F + f.name],
|
|
3788
3793
|
children: [
|
|
3789
|
-
/* @__PURE__ */ o.jsx(
|
|
3790
|
-
"
|
|
3794
|
+
/* @__PURE__ */ o.jsx(
|
|
3795
|
+
"div",
|
|
3791
3796
|
{
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3797
|
+
className: "searchstax-facet-input mobile-" + F + f.name,
|
|
3798
|
+
children: /* @__PURE__ */ o.jsx(
|
|
3799
|
+
"input",
|
|
3800
|
+
{
|
|
3801
|
+
type: "checkbox",
|
|
3802
|
+
className: "searchstax-facet-input-checkbox",
|
|
3803
|
+
checked: I(b),
|
|
3804
|
+
readOnly: !0,
|
|
3805
|
+
disabled: b.disabled,
|
|
3806
|
+
onClick: (q) => {
|
|
3807
|
+
L(
|
|
3808
|
+
F + f.name,
|
|
3809
|
+
q,
|
|
3810
|
+
b,
|
|
3811
|
+
!0,
|
|
3812
|
+
!0
|
|
3813
|
+
);
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
)
|
|
3805
3817
|
}
|
|
3806
|
-
)
|
|
3818
|
+
),
|
|
3807
3819
|
/* @__PURE__ */ o.jsx(
|
|
3808
3820
|
"div",
|
|
3809
3821
|
{
|
|
3810
3822
|
className: "searchstax-facet-value-label",
|
|
3811
|
-
onClick: (
|
|
3823
|
+
onClick: (q) => {
|
|
3812
3824
|
L(
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
b
|
|
3816
|
-
!1
|
|
3825
|
+
F + f.name,
|
|
3826
|
+
q,
|
|
3827
|
+
b
|
|
3817
3828
|
);
|
|
3818
3829
|
},
|
|
3819
3830
|
children: b.value
|
|
@@ -3823,12 +3834,11 @@ function Ia(i) {
|
|
|
3823
3834
|
"div",
|
|
3824
3835
|
{
|
|
3825
3836
|
className: "searchstax-facet-value-count",
|
|
3826
|
-
onClick: (
|
|
3837
|
+
onClick: (q) => {
|
|
3827
3838
|
L(
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
b
|
|
3831
|
-
!1
|
|
3839
|
+
F + f.name,
|
|
3840
|
+
q,
|
|
3841
|
+
b
|
|
3832
3842
|
);
|
|
3833
3843
|
},
|
|
3834
3844
|
children: [
|
|
@@ -3894,7 +3904,7 @@ function Ia(i) {
|
|
|
3894
3904
|
W,
|
|
3895
3905
|
A,
|
|
3896
3906
|
Q,
|
|
3897
|
-
|
|
3907
|
+
O
|
|
3898
3908
|
) })
|
|
3899
3909
|
] }) });
|
|
3900
3910
|
}
|