@searchcraft/javascript-sdk 0.9.6 → 0.10.0

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.
Files changed (120) hide show
  1. package/README.md +2 -2
  2. package/dist/components/defineCustomElements.js +6 -6
  3. package/dist/components/index.d.ts +2514 -68
  4. package/dist/components/index.js +47 -16
  5. package/dist/components/index.js.map +1 -1
  6. package/dist/components/{p-e55a7970.js → p-1adf78b9.js} +2 -2
  7. package/dist/components/p-1adf78b9.js.map +1 -0
  8. package/dist/components/{p-94837dcb.js → p-34a32648.js} +11 -11
  9. package/dist/components/p-34a32648.js.map +1 -0
  10. package/dist/components/p-39e70a00.js +67 -0
  11. package/dist/components/p-39e70a00.js.map +1 -0
  12. package/dist/components/{p-c1c14447.js → p-3f63fa14.js} +14 -21
  13. package/dist/components/p-3f63fa14.js.map +1 -0
  14. package/dist/components/{p-bf6a086a.js → p-73db9122.js} +3 -10
  15. package/dist/components/p-73db9122.js.map +1 -0
  16. package/dist/components/p-810a7850.js +17 -0
  17. package/dist/components/p-810a7850.js.map +1 -0
  18. package/dist/components/{p-44e6ed36.js → p-8aa0fff5.js} +4 -3
  19. package/dist/components/p-8aa0fff5.js.map +1 -0
  20. package/dist/components/{p-10b0d0dc.js → p-a64b4cba.js} +2 -136
  21. package/dist/components/p-a64b4cba.js.map +1 -0
  22. package/dist/components/{p-71cc28c1.js → p-acf23bab.js} +2 -2
  23. package/dist/components/p-acf23bab.js.map +1 -0
  24. package/dist/components/{p-bb12ab5a.js → p-bc9e0e40.js} +4 -3
  25. package/dist/components/p-bc9e0e40.js.map +1 -0
  26. package/dist/components/{p-0bbc3aff.js → p-c317a36a.js} +7 -7
  27. package/dist/components/p-c317a36a.js.map +1 -0
  28. package/dist/components/{p-bb9e9d7d.js → p-d361b781.js} +5 -7
  29. package/dist/components/p-d361b781.js.map +1 -0
  30. package/dist/components/p-e72d0167.js +147 -0
  31. package/dist/components/p-e72d0167.js.map +1 -0
  32. package/dist/components/{p-0e393fe1.js → p-f2585cdf.js} +3 -9
  33. package/dist/components/p-f2585cdf.js.map +1 -0
  34. package/dist/components/{p-2e293015.js → p-f8df3d49.js} +157 -160
  35. package/dist/components/p-f8df3d49.js.map +1 -0
  36. package/dist/components/searchcraft-ad.js +1 -1
  37. package/dist/components/searchcraft-button.js +1 -1
  38. package/dist/components/searchcraft-error-message.js +1 -1
  39. package/dist/components/searchcraft-facet-list.js +1 -1
  40. package/dist/components/searchcraft-filter-panel.js +6 -5
  41. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  42. package/dist/components/searchcraft-input-form.js +2 -2
  43. package/dist/components/searchcraft-input-label.js +1 -1
  44. package/dist/components/searchcraft-pagination.js +4 -10
  45. package/dist/components/searchcraft-pagination.js.map +1 -1
  46. package/dist/components/searchcraft-popover-button.js +2 -2
  47. package/dist/components/searchcraft-popover-button.js.map +1 -1
  48. package/dist/components/searchcraft-popover-form.js +14 -15
  49. package/dist/components/searchcraft-popover-form.js.map +1 -1
  50. package/dist/components/searchcraft-popover-list-item.js +1 -1
  51. package/dist/components/searchcraft-popover-list-view.js +1 -1
  52. package/dist/components/searchcraft-results-info.js +15 -19
  53. package/dist/components/searchcraft-results-info.js.map +1 -1
  54. package/dist/components/searchcraft-search-result.d.ts +11 -0
  55. package/dist/components/searchcraft-search-result.js +8 -0
  56. package/dist/components/searchcraft-search-result.js.map +1 -0
  57. package/dist/components/searchcraft-search-results-per-page.js +3 -10
  58. package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
  59. package/dist/components/searchcraft-search-results.d.ts +11 -0
  60. package/dist/components/searchcraft-search-results.js +179 -0
  61. package/dist/components/searchcraft-search-results.js.map +1 -0
  62. package/dist/components/searchcraft-select.js +1 -1
  63. package/dist/components/searchcraft-slider.js +1 -1
  64. package/dist/components/searchcraft-theme.js +4 -42
  65. package/dist/components/searchcraft-theme.js.map +1 -1
  66. package/dist/components/searchcraft-toggle-button.js +1 -1
  67. package/dist/hydrate/index.d.ts +242 -0
  68. package/dist/hydrate/index.js +23290 -0
  69. package/dist/hydrate/index.mjs +23282 -0
  70. package/dist/hydrate/package.json +12 -0
  71. package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +5 -1
  72. package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +3 -2
  73. package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +6 -7
  74. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +3 -1
  75. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +29 -1
  76. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +22 -14
  77. package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +3 -2
  78. package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +21 -8
  79. package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +30 -0
  80. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +26 -15
  81. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +2 -0
  82. package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +3 -2
  83. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +41 -15
  84. package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +25 -0
  85. package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +80 -0
  86. package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +20 -5
  87. package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +3 -5
  88. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +3 -3
  89. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +23 -16
  90. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
  91. package/dist/types/components.d.ts +838 -612
  92. package/dist/types/index.d.ts +5 -4
  93. package/dist/types/utils/html.d.ts +6 -0
  94. package/dist/types/utils/index.d.ts +1 -0
  95. package/package.json +10 -8
  96. package/dist/components/bundled.types.d.ts +0 -2269
  97. package/dist/components/p-0bbc3aff.js.map +0 -1
  98. package/dist/components/p-0e393fe1.js.map +0 -1
  99. package/dist/components/p-10b0d0dc.js.map +0 -1
  100. package/dist/components/p-2e293015.js.map +0 -1
  101. package/dist/components/p-44e6ed36.js.map +0 -1
  102. package/dist/components/p-71cc28c1.js.map +0 -1
  103. package/dist/components/p-94837dcb.js.map +0 -1
  104. package/dist/components/p-9bdcb929.js +0 -136
  105. package/dist/components/p-9bdcb929.js.map +0 -1
  106. package/dist/components/p-bb12ab5a.js.map +0 -1
  107. package/dist/components/p-bb9e9d7d.js.map +0 -1
  108. package/dist/components/p-bf6a086a.js.map +0 -1
  109. package/dist/components/p-c1c14447.js.map +0 -1
  110. package/dist/components/p-d9551738.js +0 -25
  111. package/dist/components/p-d9551738.js.map +0 -1
  112. package/dist/components/p-e55a7970.js.map +0 -1
  113. package/dist/components/searchcraft-base-search-result.d.ts +0 -11
  114. package/dist/components/searchcraft-base-search-result.js +0 -8
  115. package/dist/components/searchcraft-base-search-result.js.map +0 -1
  116. package/dist/components/searchcraft-base-search-results.d.ts +0 -11
  117. package/dist/components/searchcraft-base-search-results.js +0 -225
  118. package/dist/components/searchcraft-base-search-results.js.map +0 -1
  119. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +0 -55
  120. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +0 -89
@@ -2,7 +2,7 @@ var B = Object.defineProperty;
2
2
  var q = (r, e, n) => e in r ? B(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
3
  var h = (r, e, n) => q(r, typeof e != "symbol" ? e + "" : e, n);
4
4
  var P = /* @__PURE__ */ ((r) => (r[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.WARN = 2] = "WARN", r[r.ERROR = 3] = "ERROR", r))(P || {});
5
- class ve {
5
+ class ge {
6
6
  constructor(e) {
7
7
  h(this, "logLevel");
8
8
  h(this, "logFormatter");
@@ -41,24 +41,24 @@ class ve {
41
41
  }
42
42
  }
43
43
  function w(r, e, n, o) {
44
- return new (n || (n = Promise))(function(i, a) {
44
+ return new (n || (n = Promise))(function(a, i) {
45
45
  function t(c) {
46
46
  try {
47
47
  l(o.next(c));
48
48
  } catch (s) {
49
- a(s);
49
+ i(s);
50
50
  }
51
51
  }
52
52
  function u(c) {
53
53
  try {
54
54
  l(o.throw(c));
55
55
  } catch (s) {
56
- a(s);
56
+ i(s);
57
57
  }
58
58
  }
59
59
  function l(c) {
60
60
  var s;
61
- c.done ? i(c.value) : (s = c.value, s instanceof n ? s : new n(function(f) {
61
+ c.done ? a(c.value) : (s = c.value, s instanceof n ? s : new n(function(f) {
62
62
  f(s);
63
63
  })).then(t, u);
64
64
  }
@@ -66,23 +66,23 @@ function w(r, e, n, o) {
66
66
  });
67
67
  }
68
68
  function y(r, e) {
69
- var n, o, i, a, t = { label: 0, sent: function() {
70
- if (1 & i[0]) throw i[1];
71
- return i[1];
69
+ var n, o, a, i, t = { label: 0, sent: function() {
70
+ if (1 & a[0]) throw a[1];
71
+ return a[1];
72
72
  }, trys: [], ops: [] };
73
- return a = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
73
+ return i = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (i[Symbol.iterator] = function() {
74
74
  return this;
75
- }), a;
75
+ }), i;
76
76
  function u(l) {
77
77
  return function(c) {
78
78
  return function(s) {
79
79
  if (n) throw new TypeError("Generator is already executing.");
80
- for (; a && (a = 0, s[0] && (t = 0)), t; ) try {
81
- if (n = 1, o && (i = 2 & s[0] ? o.return : s[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, s[1])).done) return i;
82
- switch (o = 0, i && (s = [2 & s[0], i.value]), s[0]) {
80
+ for (; i && (i = 0, s[0] && (t = 0)), t; ) try {
81
+ if (n = 1, o && (a = 2 & s[0] ? o.return : s[0] ? o.throw || ((a = o.return) && a.call(o), 0) : o.next) && !(a = a.call(o, s[1])).done) return a;
82
+ switch (o = 0, a && (s = [2 & s[0], a.value]), s[0]) {
83
83
  case 0:
84
84
  case 1:
85
- i = s;
85
+ a = s;
86
86
  break;
87
87
  case 4:
88
88
  return t.label++, { value: s[1], done: !1 };
@@ -93,30 +93,30 @@ function y(r, e) {
93
93
  s = t.ops.pop(), t.trys.pop();
94
94
  continue;
95
95
  default:
96
- if (i = t.trys, !((i = i.length > 0 && i[i.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
96
+ if (a = t.trys, !((a = a.length > 0 && a[a.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
97
97
  t = 0;
98
98
  continue;
99
99
  }
100
- if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
100
+ if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
101
101
  t.label = s[1];
102
102
  break;
103
103
  }
104
- if (s[0] === 6 && t.label < i[1]) {
105
- t.label = i[1], i = s;
104
+ if (s[0] === 6 && t.label < a[1]) {
105
+ t.label = a[1], a = s;
106
106
  break;
107
107
  }
108
- if (i && t.label < i[2]) {
109
- t.label = i[2], t.ops.push(s);
108
+ if (a && t.label < a[2]) {
109
+ t.label = a[2], t.ops.push(s);
110
110
  break;
111
111
  }
112
- i[2] && t.ops.pop(), t.trys.pop();
112
+ a[2] && t.ops.pop(), t.trys.pop();
113
113
  continue;
114
114
  }
115
115
  s = e.call(r, t);
116
116
  } catch (f) {
117
117
  s = [6, f], o = 0;
118
118
  } finally {
119
- n = i = 0;
119
+ n = a = 0;
120
120
  }
121
121
  if (5 & s[0]) throw s[1];
122
122
  return { value: s[0] ? s[1] : void 0, done: !0 };
@@ -145,13 +145,13 @@ function M(r, e) {
145
145
  var n;
146
146
  if (e === void 0 && (e = 0), e = e ? 0 | e : 0, typeof r == "string" && (n = r, r = new TextEncoder().encode(n).buffer), !(r instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
147
147
  var o = new Uint32Array([e, e, e, e]);
148
- ((function(a, t) {
149
- for (var u = a.byteLength / 16 | 0, l = new Uint32Array(a, 0, 4 * u), c = 0; c < u; c++) {
148
+ ((function(i, t) {
149
+ for (var u = i.byteLength / 16 | 0, l = new Uint32Array(i, 0, 4 * u), c = 0; c < u; c++) {
150
150
  var s = l.subarray(4 * c, 4 * (c + 1));
151
151
  s[0] = Math.imul(s[0], m[0]), s[0] = g(s[0], 15), s[0] = Math.imul(s[0], m[1]), t[0] = t[0] ^ s[0], t[0] = g(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, s[1] = Math.imul(s[1], m[1]), s[1] = g(s[1], 16), s[1] = Math.imul(s[1], m[2]), t[1] = t[1] ^ s[1], t[1] = g(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, s[2] = Math.imul(s[2], m[2]), s[2] = g(s[2], 17), s[2] = Math.imul(s[2], m[3]), t[2] = t[2] ^ s[2], t[2] = g(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, s[3] = Math.imul(s[3], m[3]), s[3] = g(s[3], 18), s[3] = Math.imul(s[3], m[0]), t[3] = t[3] ^ s[3], t[3] = g(t[3], 13), t[3] = t[3] + t[0], t[3] = Math.imul(t[3], 5) + 850148119;
152
152
  }
153
- }))(r, o), function(a, t) {
154
- var u = a.byteLength / 16 | 0, l = a.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(a, 16 * u, l);
153
+ }))(r, o), function(i, t) {
154
+ var u = i.byteLength / 16 | 0, l = i.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(i, 16 * u, l);
155
155
  switch (l) {
156
156
  case 15:
157
157
  c[3] = c[3] ^ s[14] << 16;
@@ -184,41 +184,41 @@ function M(r, e) {
184
184
  case 1:
185
185
  c[0] = c[0] ^ s[0] << 0, c[0] = Math.imul(c[0], m[0]), c[0] = g(c[0], 15), c[0] = Math.imul(c[0], m[1]), t[0] = t[0] ^ c[0];
186
186
  }
187
- }(r, o), function(a, t) {
188
- t[0] = t[0] ^ a.byteLength, t[1] = t[1] ^ a.byteLength, t[2] = t[2] ^ a.byteLength, t[3] = t[3] ^ a.byteLength, t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0, t[0] = C(t[0]), t[1] = C(t[1]), t[2] = C(t[2]), t[3] = C(t[3]), t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0;
187
+ }(r, o), function(i, t) {
188
+ t[0] = t[0] ^ i.byteLength, t[1] = t[1] ^ i.byteLength, t[2] = t[2] ^ i.byteLength, t[3] = t[3] ^ i.byteLength, t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0, t[0] = C(t[0]), t[1] = C(t[1]), t[2] = C(t[2]), t[3] = C(t[3]), t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0;
189
189
  }(r, o);
190
- var i = new Uint8Array(o.buffer);
191
- return Array.from(i).map(function(a) {
192
- return a.toString(16).padStart(2, "0");
190
+ var a = new Uint8Array(o.buffer);
191
+ return Array.from(a).map(function(i) {
192
+ return i.toString(16).padStart(2, "0");
193
193
  }).join("");
194
194
  }
195
- function V(r, e) {
195
+ function G(r, e) {
196
196
  return new Promise(function(n) {
197
197
  setTimeout(function() {
198
198
  return n(e);
199
199
  }, r);
200
200
  });
201
201
  }
202
- function G(r, e, n) {
202
+ function V(r, e, n) {
203
203
  return Promise.all(r.map(function(o) {
204
- return Promise.race([o, V(e, n)]);
204
+ return Promise.race([o, G(e, n)]);
205
205
  }));
206
206
  }
207
207
  function W() {
208
208
  return w(this, void 0, void 0, function() {
209
- var r, e, n, o, i;
210
- return y(this, function(a) {
211
- switch (a.label) {
209
+ var r, e, n, o, a;
210
+ return y(this, function(i) {
211
+ switch (i.label) {
212
212
  case 0:
213
- return a.trys.push([0, 2, , 3]), r = j(), e = Object.keys(r), [4, G(Object.values(r), (b == null ? void 0 : b.timeout) || 1e3, N)];
213
+ return i.trys.push([0, 2, , 3]), r = j(), e = Object.keys(r), [4, V(Object.values(r), (b == null ? void 0 : b.timeout) || 1e3, N)];
214
214
  case 1:
215
- return n = a.sent(), o = n.filter(function(t) {
215
+ return n = i.sent(), o = n.filter(function(t) {
216
216
  return t !== void 0;
217
- }), i = {}, o.forEach(function(t, u) {
218
- i[e[u]] = t;
219
- }), [2, O(i, b.exclude || [])];
217
+ }), a = {}, o.forEach(function(t, u) {
218
+ a[e[u]] = t;
219
+ }), [2, O(a, b.exclude || [])];
220
220
  case 2:
221
- throw a.sent();
221
+ throw i.sent();
222
222
  case 3:
223
223
  return [2];
224
224
  }
@@ -226,19 +226,19 @@ function W() {
226
226
  });
227
227
  }
228
228
  function O(r, e) {
229
- var n = {}, o = function(a) {
230
- if (r.hasOwnProperty(a)) {
231
- var t = r[a];
232
- if (typeof t != "object" || Array.isArray(t)) e.includes(a) || (n[a] = t);
229
+ var n = {}, o = function(i) {
230
+ if (r.hasOwnProperty(i)) {
231
+ var t = r[i];
232
+ if (typeof t != "object" || Array.isArray(t)) e.includes(i) || (n[i] = t);
233
233
  else {
234
234
  var u = O(t, e.map(function(l) {
235
- return l.startsWith(a + ".") ? l.slice(a.length + 1) : l;
235
+ return l.startsWith(i + ".") ? l.slice(i.length + 1) : l;
236
236
  }));
237
- Object.keys(u).length > 0 && (n[a] = u);
237
+ Object.keys(u).length > 0 && (n[i] = u);
238
238
  }
239
239
  }
240
240
  };
241
- for (var i in r) o(i);
241
+ for (var a in r) o(a);
242
242
  return n;
243
243
  }
244
244
  function $(r) {
@@ -263,9 +263,9 @@ function H(r) {
263
263
  return e;
264
264
  }
265
265
  function U(r, e, n) {
266
- for (var o = [], i = 0; i < r[0].data.length; i++) {
267
- for (var a = [], t = 0; t < r.length; t++) a.push(r[t].data[i]);
268
- o.push(Q(a));
266
+ for (var o = [], a = 0; a < r[0].data.length; a++) {
267
+ for (var i = [], t = 0; t < r.length; t++) i.push(r[t].data[a]);
268
+ o.push(Q(i));
269
269
  }
270
270
  var u = new Uint8ClampedArray(o);
271
271
  return new ImageData(u, e, n);
@@ -273,16 +273,16 @@ function U(r, e, n) {
273
273
  function Q(r) {
274
274
  if (r.length === 0) return 0;
275
275
  for (var e = {}, n = 0, o = r; n < o.length; n++)
276
- e[a = o[n]] = (e[a] || 0) + 1;
277
- var i = r[0];
278
- for (var a in e) e[a] > e[i] && (i = parseInt(a, 10));
279
- return i;
276
+ e[i = o[n]] = (e[i] || 0) + 1;
277
+ var a = r[0];
278
+ for (var i in e) e[i] > e[a] && (a = parseInt(i, 10));
279
+ return a;
280
280
  }
281
281
  function E() {
282
282
  if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
283
283
  for (var r = navigator.userAgent, e = { Edg: "Edge", OPR: "Opera" }, n = 0, o = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; n < o.length; n++) {
284
- var i = o[n], a = r.match(i);
285
- if (a && a.groups) return { name: e[a.groups.name] || a.groups.name, version: a.groups.version };
284
+ var a = o[n], i = r.match(a);
285
+ if (i && i.groups) return { name: e[i.groups.name] || i.groups.name, version: i.groups.version };
286
286
  }
287
287
  return { name: "unknown", version: "unknown" };
288
288
  }
@@ -291,11 +291,11 @@ v("audio", function() {
291
291
  return y(this, function(r) {
292
292
  return [2, new Promise(function(e, n) {
293
293
  try {
294
- var o = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), i = o.createBufferSource(), a = o.createOscillator();
295
- a.frequency.value = 1e3;
294
+ var o = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), a = o.createBufferSource(), i = o.createOscillator();
295
+ i.frequency.value = 1e3;
296
296
  var t, u = o.createDynamicsCompressor();
297
- u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, a.connect(u), u.connect(o.destination), a.start(), o.oncomplete = function(l) {
298
- t = l.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: a.type, maxChannels: o.destination.maxChannelCount, channelCountMode: i.channelCountMode });
297
+ u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, i.connect(u), u.connect(o.destination), i.start(), o.oncomplete = function(l) {
298
+ t = l.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: i.type, maxChannels: o.destination.maxChannelCount, channelCountMode: a.channelCountMode });
299
299
  }, o.startRendering();
300
300
  } catch (l) {
301
301
  console.error("Error creating audio fingerprint:", l), n(l);
@@ -312,10 +312,10 @@ E().name != "Firefox" && v("canvas", function() {
312
312
  var n = document.createElement("canvas"), o = n.getContext("2d");
313
313
  if (!o) return new ImageData(1, 1);
314
314
  n.width = x, n.height = F;
315
- var i = o.createLinearGradient(0, 0, n.width, n.height);
316
- i.addColorStop(0, "red"), i.addColorStop(0.16666666666666666, "orange"), i.addColorStop(0.3333333333333333, "yellow"), i.addColorStop(0.5, "green"), i.addColorStop(0.6666666666666666, "blue"), i.addColorStop(0.8333333333333334, "indigo"), i.addColorStop(1, "violet"), o.fillStyle = i, o.fillRect(0, 0, n.width, n.height);
317
- var a = "Random Text WMwmil10Oo";
318
- o.font = "23.123px Arial", o.fillStyle = "black", o.fillText(a, -5, 15), o.fillStyle = "rgba(0, 0, 255, 0.5)", o.fillText(a, -3.3, 17.7), o.beginPath(), o.moveTo(0, 0), o.lineTo(2 * n.width / 7, n.height), o.strokeStyle = "white", o.lineWidth = 2, o.stroke();
315
+ var a = o.createLinearGradient(0, 0, n.width, n.height);
316
+ a.addColorStop(0, "red"), a.addColorStop(0.16666666666666666, "orange"), a.addColorStop(0.3333333333333333, "yellow"), a.addColorStop(0.5, "green"), a.addColorStop(0.6666666666666666, "blue"), a.addColorStop(0.8333333333333334, "indigo"), a.addColorStop(1, "violet"), o.fillStyle = a, o.fillRect(0, 0, n.width, n.height);
317
+ var i = "Random Text WMwmil10Oo";
318
+ o.font = "23.123px Arial", o.fillStyle = "black", o.fillText(i, -5, 15), o.fillStyle = "rgba(0, 0, 255, 0.5)", o.fillText(i, -3.3, 17.7), o.beginPath(), o.moveTo(0, 0), o.lineTo(2 * n.width / 7, n.height), o.strokeStyle = "white", o.lineWidth = 2, o.stroke();
319
319
  var t = o.getImageData(0, 0, n.width, n.height);
320
320
  return t;
321
321
  }();
@@ -331,15 +331,15 @@ function k(r, e) {
331
331
  function J() {
332
332
  var r, e = document.createElement("canvas"), n = (r = e.getContext("webgl")) !== null && r !== void 0 ? r : e.getContext("experimental-webgl");
333
333
  if (n && "getParameter" in n) try {
334
- var o = (n.getParameter(n.VENDOR) || "").toString(), i = (n.getParameter(n.RENDERER) || "").toString(), a = { vendor: o, renderer: i, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
- if (!i.length || !o.length) {
334
+ var o = (n.getParameter(n.VENDOR) || "").toString(), a = (n.getParameter(n.RENDERER) || "").toString(), i = { vendor: o, renderer: a, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
+ if (!a.length || !o.length) {
336
336
  var t = n.getExtension("WEBGL_debug_renderer_info");
337
337
  if (t) {
338
338
  var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), l = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
339
- u && (a.vendorUnmasked = u), l && (a.rendererUnmasked = l);
339
+ u && (i.vendorUnmasked = u), l && (i.rendererUnmasked = l);
340
340
  }
341
341
  }
342
- return a;
342
+ return i;
343
343
  } catch {
344
344
  }
345
345
  return "undefined";
@@ -351,23 +351,23 @@ function X() {
351
351
  function Z(r, e) {
352
352
  var n = {};
353
353
  return e.forEach(function(o) {
354
- var i = function(a) {
355
- if (a.length === 0) return null;
354
+ var a = function(i) {
355
+ if (i.length === 0) return null;
356
356
  var t = {};
357
- a.forEach(function(c) {
357
+ i.forEach(function(c) {
358
358
  var s = String(c);
359
359
  t[s] = (t[s] || 0) + 1;
360
360
  });
361
- var u = a[0], l = 1;
361
+ var u = i[0], l = 1;
362
362
  return Object.keys(t).forEach(function(c) {
363
363
  t[c] > l && (u = c, l = t[c]);
364
364
  }), u;
365
- }(r.map(function(a) {
366
- return o in a ? a[o] : void 0;
367
- }).filter(function(a) {
368
- return a !== void 0;
365
+ }(r.map(function(i) {
366
+ return o in i ? i[o] : void 0;
367
+ }).filter(function(i) {
368
+ return i !== void 0;
369
369
  }));
370
- i && (n[o] = i);
370
+ a && (n[o] = a);
371
371
  }), n;
372
372
  }
373
373
  function ee() {
@@ -391,9 +391,9 @@ E().name != "Firefox" && v("fonts", function() {
391
391
  return new Promise(function(e, n) {
392
392
  try {
393
393
  (function(o) {
394
- var i;
394
+ var a;
395
395
  w(this, void 0, void 0, function() {
396
- var a, t, u;
396
+ var i, t, u;
397
397
  return y(this, function(l) {
398
398
  switch (l.label) {
399
399
  case 0:
@@ -403,20 +403,20 @@ E().name != "Firefox" && v("fonts", function() {
403
403
  case 1:
404
404
  return l.sent(), [3, 0];
405
405
  case 2:
406
- if ((a = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = a.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), a.src = "about:blank", document.body.appendChild(a), !(u = a.contentDocument || ((i = a.contentWindow) === null || i === void 0 ? void 0 : i.document))) throw new Error("Iframe document is not accessible");
406
+ if ((i = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = i.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), i.src = "about:blank", document.body.appendChild(i), !(u = i.contentDocument || ((a = i.contentWindow) === null || a === void 0 ? void 0 : a.document))) throw new Error("Iframe document is not accessible");
407
407
  return o({ iframe: u }), setTimeout(function() {
408
- document.body.removeChild(a);
408
+ document.body.removeChild(i);
409
409
  }, 0), [2];
410
410
  }
411
411
  var c, s;
412
412
  });
413
413
  });
414
414
  })(function(o) {
415
- var i = o.iframe;
415
+ var a = o.iframe;
416
416
  return w(r, void 0, void 0, function() {
417
- var a, t, u, l;
417
+ var i, t, u, l;
418
418
  return y(this, function(c) {
419
- return a = i.createElement("canvas"), t = a.getContext("2d"), u = Y.map(function(s) {
419
+ return i = a.createElement("canvas"), t = i.getContext("2d"), u = Y.map(function(s) {
420
420
  return k(t, s);
421
421
  }), l = {}, K.forEach(function(s) {
422
422
  var f = k(t, s);
@@ -445,18 +445,18 @@ E().name != "Firefox" && v("fonts", function() {
445
445
  return T = (b == null ? void 0 : b.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], r = Array.from({ length: (b == null ? void 0 : b.retries) || 3 }, function() {
446
446
  return function() {
447
447
  return w(this, void 0, void 0, function() {
448
- var n, o, i, a, t;
448
+ var n, o, a, i, t;
449
449
  return y(this, function(u) {
450
450
  switch (u.label) {
451
451
  case 0:
452
- n = {}, o = 0, i = T, u.label = 1;
452
+ n = {}, o = 0, a = T, u.label = 1;
453
453
  case 1:
454
- if (!(o < i.length)) return [3, 6];
455
- a = i[o], u.label = 2;
454
+ if (!(o < a.length)) return [3, 6];
455
+ i = a[o], u.label = 2;
456
456
  case 2:
457
- return u.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: a })];
457
+ return u.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: i })];
458
458
  case 3:
459
- return t = u.sent(), n[a] = t.state.toString(), [3, 5];
459
+ return t = u.sent(), n[i] = t.state.toString(), [3, 5];
460
460
  case 4:
461
461
  return u.sent(), [3, 5];
462
462
  case 5:
@@ -513,13 +513,13 @@ v("webgl", function() {
513
513
  void main() {
514
514
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
515
515
  }
516
- `, i = d.createShader(d.VERTEX_SHADER), a = d.createShader(d.FRAGMENT_SHADER);
517
- if (!i || !a) throw new Error("Failed to create shaders");
518
- if (d.shaderSource(i, n), d.shaderSource(a, o), d.compileShader(i), !d.getShaderParameter(i, d.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + d.getShaderInfoLog(i));
519
- if (d.compileShader(a), !d.getShaderParameter(a, d.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + d.getShaderInfoLog(a));
516
+ `, a = d.createShader(d.VERTEX_SHADER), i = d.createShader(d.FRAGMENT_SHADER);
517
+ if (!a || !i) throw new Error("Failed to create shaders");
518
+ if (d.shaderSource(a, n), d.shaderSource(i, o), d.compileShader(a), !d.getShaderParameter(a, d.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + d.getShaderInfoLog(a));
519
+ if (d.compileShader(i), !d.getShaderParameter(i, d.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + d.getShaderInfoLog(i));
520
520
  var t = d.createProgram();
521
521
  if (!t) throw new Error("Failed to create shader program");
522
- if (d.attachShader(t, i), d.attachShader(t, a), d.linkProgram(t), !d.getProgramParameter(t, d.LINK_STATUS)) throw new Error("Shader program linking failed: " + d.getProgramInfoLog(t));
522
+ if (d.attachShader(t, a), d.attachShader(t, i), d.linkProgram(t), !d.getProgramParameter(t, d.LINK_STATUS)) throw new Error("Shader program linking failed: " + d.getProgramInfoLog(t));
523
523
  d.useProgram(t);
524
524
  for (var u = 137, l = new Float32Array(4 * u), c = 2 * Math.PI / u, s = 0; s < u; s++) {
525
525
  var f = s * c;
@@ -546,9 +546,9 @@ v("webgl", function() {
546
546
  });
547
547
  });
548
548
  var S = function(r, e, n, o) {
549
- for (var i = (n - e) / o, a = 0, t = 0; t < o; t++)
550
- a += r(e + (t + 0.5) * i);
551
- return a * i;
549
+ for (var a = (n - e) / o, i = 0, t = 0; t < o; t++)
550
+ i += r(e + (t + 0.5) * a);
551
+ return i * a;
552
552
  };
553
553
  v("math", function() {
554
554
  return w(void 0, void 0, void 0, function() {
@@ -598,14 +598,14 @@ class oe extends _ {
598
598
  rfr: "searchcraft.io",
599
599
  "results-ta": `${this.config.admTextAdQuantity || 0}`,
600
600
  "results-pa": `${this.config.admProductAdQuantity || 0}`
601
- }).toString()}`, a = await (await fetch(o, { method: "GET" })).json(), t = a.product_ads.map(
601
+ }).toString()}`, i = await (await fetch(o, { method: "GET" })).json(), t = i.product_ads.map(
602
602
  (c) => ({
603
603
  id: A(),
604
604
  adSource: "adMarketplace",
605
605
  admAdType: "adm-product-ad",
606
606
  admAd: c
607
607
  })
608
- ), u = a.text_ads.map((c) => ({
608
+ ), u = i.text_ads.map((c) => ({
609
609
  id: A(),
610
610
  adSource: "adMarketplace",
611
611
  admAdType: "adm-text-ad",
@@ -619,13 +619,13 @@ class oe extends _ {
619
619
  (o = n.admAd) != null && o.impression_url && fetch(n.admAd.impression_url);
620
620
  }
621
621
  }
622
- class ae extends _ {
622
+ class ie extends _ {
623
623
  async getAdsForSearchParams(e) {
624
624
  return [];
625
625
  }
626
626
  }
627
- const ie = 200, se = 100;
628
- class ce extends _ {
627
+ const ae = 1e3;
628
+ class se extends _ {
629
629
  constructor(n) {
630
630
  super(n);
631
631
  h(this, "adCallTimeout");
@@ -635,15 +635,12 @@ class ce extends _ {
635
635
  this.addScriptTagToDocument();
636
636
  }
637
637
  async onQueryFetched(n, o) {
638
- var i;
639
- if ((((i = o.data.hits) == null ? void 0 : i.length) || 0) === 0) {
638
+ var a;
639
+ if ((((a = o.data.hits) == null ? void 0 : a.length) || 0) === 0) {
640
640
  this.removeScriptTagFromDocument();
641
641
  return;
642
642
  }
643
- this.performAdCall(ie);
644
- }
645
- async onAdContainerViewed(n) {
646
- this.performAdCall(se);
643
+ this.performAdCall(ae);
647
644
  }
648
645
  async onInputCleared() {
649
646
  this.removeScriptTagFromDocument();
@@ -672,8 +669,8 @@ class ce extends _ {
672
669
  n && document.head.removeChild(n);
673
670
  }
674
671
  }
675
- const ue = 500;
676
- class de {
672
+ const ce = 500;
673
+ class ue {
677
674
  constructor(e, n, o) {
678
675
  h(this, "measureRequestTimeout");
679
676
  h(this, "measureRequestsBatched", []);
@@ -689,7 +686,7 @@ class de {
689
686
  * @param {Partial<MeasureRequestUser>} user - Additional user properites to send with the event.
690
687
  */
691
688
  h(this, "sendMeasureEvent", (e, n = {}, o = {}) => {
692
- const i = {
689
+ const a = {
693
690
  event_name: e,
694
691
  properties: {
695
692
  searchcraft_index_names: this.config.index,
@@ -701,8 +698,8 @@ class de {
701
698
  ...o
702
699
  }
703
700
  };
704
- this.measureRequestsBatched.push(i), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
705
- const a = JSON.stringify({ items: this.measureRequestsBatched }), t = `${this.baseMeasureUrl}/batch`;
701
+ this.measureRequestsBatched.push(a), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
702
+ const i = JSON.stringify({ items: this.measureRequestsBatched }), t = `${this.baseMeasureUrl}/batch`;
706
703
  try {
707
704
  const u = await fetch(t, {
708
705
  method: "POST",
@@ -711,7 +708,7 @@ class de {
711
708
  Authorization: this.config.readKey,
712
709
  "X-Sc-User-Id": this.userId
713
710
  },
714
- body: a,
711
+ body: i,
715
712
  keepalive: !0
716
713
  });
717
714
  if (!u.ok)
@@ -723,7 +720,7 @@ class de {
723
720
  } catch (u) {
724
721
  throw console.error("Error sending MeasureRequest:", u), u;
725
722
  }
726
- }, ue);
723
+ }, ce);
727
724
  });
728
725
  this.config = e, this.sdkInfo = n, this.userId = o, this.sessionId = A(), this.sendMeasureEvent("sdk_initialized");
729
726
  }
@@ -748,25 +745,25 @@ class de {
748
745
  };
749
746
  }
750
747
  }
751
- function le(r) {
748
+ function de(r) {
752
749
  const e = [];
753
750
  let n = "should";
754
751
  return r.facetPathsForIndexFields && Object.keys(r.facetPathsForIndexFields).forEach((o) => {
755
- var a;
756
- const i = (a = r.facetPathsForIndexFields) == null ? void 0 : a[o];
757
- i && (n = "must", e.push({
752
+ var i;
753
+ const a = (i = r.facetPathsForIndexFields) == null ? void 0 : i[o];
754
+ a && (n = "must", e.push({
758
755
  occur: n,
759
756
  exact: {
760
- ctx: i.value
757
+ ctx: a.value
761
758
  }
762
759
  }));
763
760
  }), r.rangeValueForIndexFields && Object.keys(r.rangeValueForIndexFields).forEach((o) => {
764
- var a;
765
- const i = (a = r.rangeValueForIndexFields) == null ? void 0 : a[o];
766
- i && (n = "must", e.push({
761
+ var i;
762
+ const a = (i = r.rangeValueForIndexFields) == null ? void 0 : i[o];
763
+ a && (n = "must", e.push({
767
764
  occur: n,
768
765
  exact: {
769
- ctx: i.value
766
+ ctx: a.value
770
767
  }
771
768
  }));
772
769
  }), r.sort === "desc" ? r.order_by = "date_published" : r.order_by = "", e.push({
@@ -776,7 +773,7 @@ function le(r) {
776
773
  // Ensure dynamic mode is inside queryType
777
774
  }), e;
778
775
  }
779
- const he = (r) => r.endsWith("/") ? r.slice(0, -1) : r, fe = (r) => {
776
+ const le = (r) => r.endsWith("/") ? r.slice(0, -1) : r, he = (r) => {
780
777
  let e = "";
781
778
  if (e = r.trim(), e = e.replace(/[‘’“”]/g, (o) => ({
782
779
  "‘": "'",
@@ -789,7 +786,7 @@ const he = (r) => r.endsWith("/") ? r.slice(0, -1) : r, fe = (r) => {
789
786
  );
790
787
  return e;
791
788
  };
792
- class me {
789
+ class fe {
793
790
  constructor(e, n, o) {
794
791
  h(this, "config");
795
792
  h(this, "userId");
@@ -799,8 +796,8 @@ class me {
799
796
  * @param {SearchParams} searchParams - The parameters for the search.
800
797
  */
801
798
  h(this, "getSearchResponse", async (e) => {
802
- var o, i, a, t, u;
803
- const n = fe(e.searchTerm);
799
+ var o, a, i, t, u;
800
+ const n = he(e.searchTerm);
804
801
  (o = this.parent.measureClient) == null || o.sendMeasureEvent("search_requested", {
805
802
  search_term: n
806
803
  }), this.parent.emitEvent("query_submitted", {
@@ -808,10 +805,10 @@ class me {
808
805
  data: {
809
806
  searchTerm: n
810
807
  }
811
- }), (i = this.parent.adClient) == null || i.onQuerySubmitted(e);
808
+ }), (a = this.parent.adClient) == null || a.onQuerySubmitted(e);
812
809
  try {
813
810
  const l = {
814
- query: le(e),
811
+ query: de(e),
815
812
  offset: e.offset || 0,
816
813
  // Default to 0 (first page) if not provided
817
814
  limit: e.limit || this.config.searchResultsPerPage || 20
@@ -832,7 +829,7 @@ class me {
832
829
  `Error: ${s.statusText} (Status: ${s.status})`
833
830
  );
834
831
  const f = await s.json();
835
- return (a = this.parent.measureClient) == null || a.sendMeasureEvent("search_response_received", {
832
+ return (i = this.parent.measureClient) == null || i.sendMeasureEvent("search_response_received", {
836
833
  search_term: n,
837
834
  number_of_documents: f.data.count
838
835
  }), this.parent.emitEvent("query_fetched", {
@@ -856,7 +853,7 @@ class me {
856
853
  return `${this.config.endpointURL}/index/${this.config.index.join(",")}/search`;
857
854
  }
858
855
  }
859
- class we {
856
+ class ve {
860
857
  constructor(e, n) {
861
858
  h(this, "config");
862
859
  h(this, "measureClient");
@@ -869,29 +866,29 @@ class we {
869
866
  * Gets items from the SearchClient and the AdClient.
870
867
  */
871
868
  h(this, "getItems", (e, n, o) => {
872
- const i = async () => {
869
+ const a = async () => {
873
870
  (async () => {
874
871
  var u, l;
875
- const a = await ((u = this == null ? void 0 : this.searchClient) == null ? void 0 : u.getSearchResponse(e));
876
- if (!a)
872
+ const i = await ((u = this == null ? void 0 : this.searchClient) == null ? void 0 : u.getSearchResponse(e));
873
+ if (!i)
877
874
  throw new Error("Search client was not initialized.");
878
- const t = (l = a.data.hits || []) == null ? void 0 : l.map((c) => c.doc).filter((c) => !!c).map((c) => ({
875
+ const t = (l = i.data.hits || []) == null ? void 0 : l.map((c) => c.doc).filter((c) => !!c).map((c) => ({
879
876
  type: "SearchDocument",
880
877
  id: A(),
881
878
  document: c
882
879
  }));
883
- n(a, t);
880
+ n(i, t);
884
881
  })(), (async () => {
885
882
  if (this.adClient) {
886
- const a = await this.adClient.getAdsForSearchParams(e);
887
- o(a);
883
+ const i = await this.adClient.getAdsForSearchParams(e);
884
+ o(i);
888
885
  }
889
886
  })();
890
887
  };
891
888
  clearTimeout(this.requestTimeout), this.config.searchDebounceDelay ? this.requestTimeout = setTimeout(
892
- i,
889
+ a,
893
890
  this.config.searchDebounceDelay
894
- ) : i();
891
+ ) : a();
895
892
  });
896
893
  if (!e.endpointURL || !e.index || !e.readKey)
897
894
  throw new Error(
@@ -900,8 +897,8 @@ class we {
900
897
  this.config = {
901
898
  ...e,
902
899
  // Strips off the trailing '/' from an endpointURL if one is accidentally added
903
- endpointURL: he(e.endpointURL)
904
- }, this.userId = "", this.initClients(this.config, n), this.initInputForms(), this.startObservingMutations();
900
+ endpointURL: le(e.endpointURL)
901
+ }, this.userId = "", typeof window < "u" && typeof customElements < "u" && n.sdkName === "@searchcraft/javascript-sdk" && globalThis.__scDefineCustomElements__ && globalThis.__scDefineCustomElements__(), typeof window < "u" && (this.initClients(this.config, n), this.initInputForms(), this.startObservingMutations());
905
902
  }
906
903
  initInputForms() {
907
904
  const e = document.querySelectorAll(
@@ -918,34 +915,34 @@ class we {
918
915
  */
919
916
  startObservingMutations() {
920
917
  new MutationObserver((n, o) => {
921
- let i = !1;
922
- for (const a of n)
923
- a.type === "childList" && a.addedNodes.forEach((t) => {
924
- t.nodeType === 1 && t.className.toLowerCase() === "searchcraft-input-form" && (i = !0);
918
+ let a = !1;
919
+ for (const i of n)
920
+ i.type === "childList" && i.addedNodes.forEach((t) => {
921
+ t.nodeType === 1 && t.className.toLowerCase() === "searchcraft-input-form" && (a = !0);
925
922
  });
926
- i && this.initInputForms();
923
+ a && this.initInputForms();
927
924
  }).observe(document.body, { childList: !0, subtree: !0 });
928
925
  }
929
926
  initClients(e, n) {
930
927
  setTimeout(async () => {
931
928
  let o = this.config.userId;
932
- switch (o || (o = await $()), this.measureClient = new de(e, n, o), this.searchClient = new me(this, e, o), e.adSource) {
929
+ switch (o || (o = await $()), this.measureClient = new ue(e, n, o), this.searchClient = new fe(this, e, o), e.adSource) {
933
930
  case "adMarketplace":
934
931
  this.adClient = new oe(e);
935
932
  break;
936
933
  case "Nativo":
937
- this.adClient = new ce(e);
934
+ this.adClient = new se(e);
938
935
  break;
939
936
  case "Custom":
940
- this.adClient = new ae(e);
937
+ this.adClient = new ie(e);
941
938
  break;
942
939
  }
943
940
  }, 300);
944
941
  }
945
942
  emitEvent(e, n) {
946
943
  var o;
947
- (o = this.subscriptionEvents[e]) == null || o.forEach((i) => {
948
- i(n);
944
+ (o = this.subscriptionEvents[e]) == null || o.forEach((a) => {
945
+ a(n);
949
946
  });
950
947
  }
951
948
  subscribe(e, n) {
@@ -1654,7 +1651,7 @@ const searchcraftStore = zustand.createStore((set, get) => {
1654
1651
  initialize: (searchcraftInstance, debug = false) => {
1655
1652
  const core = searchcraftInstance;
1656
1653
  const logger = debug
1657
- ? new ve({ logLevel: P.DEBUG })
1654
+ ? new ge({ logLevel: P.DEBUG })
1658
1655
  : undefined;
1659
1656
  set({
1660
1657
  core,
@@ -1779,6 +1776,6 @@ const searchcraftStore = zustand.createStore((set, get) => {
1779
1776
  return stateObject;
1780
1777
  });
1781
1778
 
1782
- export { searchcraftStore as s, we as w };
1779
+ export { searchcraftStore as s, ve as v };
1783
1780
 
1784
- //# sourceMappingURL=p-2e293015.js.map
1781
+ //# sourceMappingURL=p-f8df3d49.js.map