wineater-bot 1.8.1 → 2.0.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.
@@ -1,4 +1,4 @@
1
- const Cn = `
1
+ const _n = `
2
2
  @font-face {
3
3
  font-family: 'Poppins';
4
4
  src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');
@@ -32,8 +32,6 @@ const Cn = `
32
32
  position: fixed;
33
33
  bottom: 20px;
34
34
  right: 20px;
35
- /* Other styles for the bottom-right button */
36
- /* ... */
37
35
  }
38
36
 
39
37
  .chat-icon-right-center {
@@ -41,35 +39,31 @@ const Cn = `
41
39
  top: 50%;
42
40
  right: -85px;
43
41
  transform: translateY(-50%) rotate(90deg);
44
- /* Additional styling for the button */
45
- /* ... */
46
42
  }
47
43
 
48
44
  #chat-icon img {
49
- width: 40px; /* Adjust icon size as needed */
45
+ width: 40px;
50
46
  height: auto;
51
47
  margin-right: 8px;
52
48
  }
53
49
 
54
50
  #chat-icon span {
55
51
  color: black; /* Text color */
56
- font-family: 'Poppins', sans-serif; /* Font family from your style guide */
57
- /* Add more text styles if needed */
52
+ font-family: 'Poppins', sans-serif;
58
53
  }
59
54
 
60
55
  /* Chat window styles */
61
56
  #chat-window {
62
57
  position: fixed;
63
- bottom: 20px; /* Set to the desired distance from the bottom */
64
- right: 20px; /* Set to the desired distance from the right */
65
- width: 350px; /* Width of the chat window */
58
+ bottom: 20px;
59
+ right: 20px;
60
+ width: 350px;
66
61
  background-color: white;
67
62
  border-radius: 8px;
68
63
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
69
- display: none; /* Initially hidden */
64
+ display: none;
70
65
  }
71
66
 
72
- /* Header of the chat window */
73
67
  #chat-header {
74
68
  background-color: #fff;
75
69
  color: white;
@@ -79,34 +73,30 @@ const Cn = `
79
73
  display: flex;
80
74
  justify-content: space-between;
81
75
  align-items: center;
82
- position: relative; /* Needed for absolute positioning of the close button */
83
76
  }
84
77
 
85
- /* Powered by and logo styles */
86
78
  #powered-by {
87
79
  display: flex;
88
80
  align-items: center;
89
- background-color: #fff; /* White background */
81
+ background-color: #fff;
90
82
  width: 100%;
91
- border-radius: 16px; /* Rounded corners for the container */
83
+ border-radius: 16px;
92
84
  }
93
85
 
94
86
  #powered-by a span {
95
87
  font-family: 'Poppins', sans-serif;
96
- color: #7E27ED; /* Text color - using the primary color from your style guide */
97
- margin-right: 8px; /* Space between the text and the logo */
88
+ color: #7E27ED;
89
+ margin-right: 8px;
98
90
  }
99
91
 
100
92
  #chatbot-logo {
101
- height: 20px; /* Adjust the logo size as needed */
102
- width: auto; /* Keep the logo's aspect ratio */
93
+ height: 20px;
94
+ width: auto;
103
95
  }
104
96
 
105
-
106
- /* Style for the close button */
107
97
  #close-btn {
108
- font-size: 24px; /* Size of the close button */
109
- color: #7E27ED; /* Text color - using the primary color from your style guide */
98
+ font-size: 24px;
99
+ color: #7E27ED;
110
100
  cursor: pointer;
111
101
  padding: 0 10px;
112
102
  line-height: 24px;
@@ -118,67 +108,80 @@ const Cn = `
118
108
  height: 400px;
119
109
  overflow-y: auto;
120
110
  padding: 15px;
121
- background: #f7f7f7; /* Light grey background for the message area */
111
+ background: #f7f7f7;
122
112
  }
123
113
 
124
114
  /* Input area */
125
115
  #input-container {
126
- border-top: 2px solid #ececec; /* Light border for input area */
127
- background-color: white; /* White background for input area */
116
+ border-top: 2px solid #ececec;
117
+ background-color: white;
128
118
  padding: 12px;
129
119
  display: flex;
130
- align-items: center; /* Align button and input vertically */
131
- gap: 10px; /* Adds space between input and button */
120
+ align-items: center;
121
+ gap: 10px;
132
122
  }
133
123
 
134
124
  #input-container input {
135
125
  flex-grow: 1;
136
- border: 2px solid #B928EB; /* Input border color based on style guide */
126
+ border: 2px solid #B928EB;
137
127
  padding: 10px;
138
128
  border-radius: 4px;
139
- font-family: 'Poppins', sans-serif; /* Use Poppins font */
129
+ font-family: 'Poppins', sans-serif;
140
130
  }
141
131
 
142
132
  #input-container button {
143
- padding: 10px 20px; /* Larger padding for a larger button */
144
- background-color: #7E27ED; /* Button background color from style guide */
133
+ padding: 10px 20px;
134
+ background-color: #7E27ED;
145
135
  border: none;
146
136
  color: white;
147
137
  border-radius: 4px;
148
- font-family: 'Poppins', sans-serif; /* Use Poppins font */
149
- font-size: 1rem; /* Adjust font size as needed */
138
+ font-family: 'Poppins', sans-serif;
139
+ font-size: 1rem;
150
140
  cursor: pointer;
151
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add subtle shadow for depth */
152
- transition: background-color 0.3s ease; /* Smooth transition for background color */
141
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
142
+ transition: background-color 0.3s ease;
153
143
  }
154
144
 
155
145
  #input-container button:hover {
156
- background-color: #2FC0BF; /* Hover color based on style guide */
157
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Darker shadow for hover state */
146
+ background-color: #2FC0BF;
147
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
158
148
  }
159
149
 
160
150
  /* Message bubble styling */
161
151
  .message {
162
152
  margin: 8px 0;
163
153
  padding: 12px;
164
- background-color: #e0e0e0; /* Light grey for message bubbles */
154
+ background-color: #e0e0e0;
165
155
  border-radius: 16px;
166
156
  font-size: 14px;
167
157
  line-height: 1.4;
168
158
  }
169
159
 
170
160
  .message.user {
171
- background-color: #B928EB; /* User message bubble color */
161
+ background-color: #B928EB;
172
162
  color: white;
173
163
  align-self: flex-end;
174
164
  }
175
165
 
176
166
  .message.api {
177
- background-color: #e0e0e0; /* API message bubble color */
167
+ background-color: #e0e0e0;
178
168
  color: black;
179
169
  align-self: flex-start;
180
170
  }
181
171
 
172
+ /* Dish item styling */
173
+ .dish-message {
174
+ border: 2px solid #7E27ED; /* Bold yellow border */
175
+ cursor: pointer;
176
+ padding: 14px;
177
+ font-weight: bold;
178
+ font-size: 16px;
179
+ border-radius: 12px;
180
+ color: #333;
181
+ margin-top: 10px;
182
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for depth */
183
+ }
184
+
182
185
  /* Wine item styling */
183
186
  .wine-item {
184
187
  display: flex;
@@ -187,7 +190,7 @@ const Cn = `
187
190
  border-radius: 8px;
188
191
  padding: 10px;
189
192
  margin-top: 10px;
190
- background: white; /* White background for wine items */
193
+ background: white;
191
194
  }
192
195
 
193
196
  .wine-item a {
@@ -195,14 +198,14 @@ const Cn = `
195
198
  }
196
199
 
197
200
  .wine-item img {
198
- width: 80px; /* Smaller wine image size */
201
+ width: 80px;
199
202
  height: auto;
200
- border-radius: 4px; /* Rounded corners for images */
203
+ border-radius: 4px;
201
204
  margin-right: 12px;
202
205
  }
203
206
 
204
207
  .wine-item div {
205
- font-size: 0.9rem; /* Smaller font size for wine info */
208
+ font-size: 0.9rem;
206
209
  }
207
210
 
208
211
  /* Ensure the chat window is visible when the 'visible' class is added */
@@ -212,14 +215,14 @@ const Cn = `
212
215
 
213
216
  /* Loader Styles */
214
217
  .loader {
215
- display: none; /* Loader is hidden by default */
216
- border: 4px solid #f3f3f3; /* Light grey */
217
- border-top: 4px solid #3498db; /* Blue, could be your primary color */
218
+ display: none;
219
+ border: 4px solid #f3f3f3;
220
+ border-top: 4px solid #3498db;
218
221
  border-radius: 50%;
219
222
  width: 40px;
220
223
  height: 40px;
221
224
  animation: spin 2s linear infinite;
222
- margin: 20px auto; /* Centered horizontally */
225
+ margin: 20px auto;
223
226
  }
224
227
 
225
228
  .loader.visible {
@@ -236,8 +239,8 @@ const Cn = `
236
239
  display: flex;
237
240
  justify-content: center;
238
241
  align-items: center;
239
- height: 0; /* Adjust as needed */
240
- visibility: hidden; /* Start off invisible */
242
+ height: 0;
243
+ visibility: hidden;
241
244
  background-color: #f7f7f7;
242
245
  }
243
246
 
@@ -246,13 +249,12 @@ const Cn = `
246
249
  width: 8px;
247
250
  height: 8px;
248
251
  margin: 0 4px;
249
- background-color: #3498db; /* Or use a color from your style guide */
252
+ background-color: #3498db;
250
253
  border-radius: 50%;
251
254
  opacity: 0.4;
252
255
  animation: typing 1.5s infinite;
253
256
  }
254
257
 
255
- /* Animation keyframes */
256
258
  @keyframes typing {
257
259
  0% { transform: translateY(0); }
258
260
  20% { transform: translateY(-10px); }
@@ -262,7 +264,7 @@ const Cn = `
262
264
  100% { transform: translateY(0); }
263
265
  }
264
266
 
265
- /* To stagger the animation for each dot */
267
+ /* Staggered animation for typing dots */
266
268
  .typing-indicator span:nth-child(1) {
267
269
  animation-delay: 0s;
268
270
  }
@@ -277,16 +279,16 @@ const Cn = `
277
279
  .typing-indicator.visible {
278
280
  visibility: visible;
279
281
  height: 50px;
280
- }`, Fs = document.createElement("style");
281
- Fs.textContent = Cn;
282
- document.head.appendChild(Fs);
283
- function Nn() {
282
+ }`, js = document.createElement("style");
283
+ js.textContent = _n;
284
+ document.head.appendChild(js);
285
+ function On() {
284
286
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
285
287
  const e = Math.random() * 16 | 0;
286
288
  return (t === "x" ? e : e & 3 | 8).toString(16);
287
289
  });
288
290
  }
289
- function Pe(t, e, s) {
291
+ function Fe(t, e, s) {
290
292
  console.log(t, s);
291
293
  let n = "";
292
294
  if (s) {
@@ -306,13 +308,13 @@ function j(t) {
306
308
  }
307
309
  return null;
308
310
  }
309
- function _n(t) {
311
+ function Rn(t) {
310
312
  document.cookie = t + "=; Max-Age=-99999999;";
311
313
  }
312
- function On() {
314
+ function Dn() {
313
315
  const t = "uniqueUserID";
314
316
  let e = j(t);
315
- return e || (e = Nn(), Pe(t, e, 365)), e;
317
+ return e || (e = On(), Fe(t, e, 365)), e;
316
318
  }
317
319
  function Se(t, e) {
318
320
  fetch("https://api.wineater.com/proxy/track", {
@@ -330,26 +332,26 @@ function Se(t, e) {
330
332
  console.error("Mixpanel tracking error", i);
331
333
  });
332
334
  }
333
- function Bs() {
335
+ function zs() {
334
336
  Se("Chatbot Opened", { distinct_id: j("uniqueUserID"), client: j("chatbotToken") });
335
337
  }
336
- function Rn(t) {
338
+ function Mn(t) {
337
339
  Se("Chatbot Opened Auto", { distinct_id: j("uniqueUserID"), url: t, client: j("chatbotToken") });
338
340
  }
339
- function Us() {
341
+ function Ws() {
340
342
  Se("Chatbot Closed", { distinct_id: j("uniqueUserID"), client: j("chatbotToken") });
341
343
  }
342
- function Dn(t) {
344
+ function An(t) {
343
345
  Se("Message Sent", { distinct_id: j("uniqueUserID"), message_content: t, client: j("chatbotToken") });
344
346
  }
345
- function Mn(t) {
347
+ function Pn(t) {
346
348
  Se("Products Got", { distinct_id: j("uniqueUserID"), products: t, client: j("chatbotToken") });
347
349
  }
348
- function An(t) {
350
+ function Ln(t) {
349
351
  Se("Product Clicked", { distinct_id: j("uniqueUserID"), product_id: t, client: j("chatbotToken") });
350
352
  }
351
- var Gt = {}, Ln = function(t, e, s, n, i) {
352
- var r = new Worker(Gt[e] || (Gt[e] = URL.createObjectURL(new Blob([
353
+ var Kt = {}, Fn = function(t, e, s, n, i) {
354
+ var r = new Worker(Kt[e] || (Kt[e] = URL.createObjectURL(new Blob([
353
355
  t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
354
356
  ], { type: "text/javascript" }))));
355
357
  return r.onmessage = function(o) {
@@ -360,7 +362,7 @@ var Gt = {}, Ln = function(t, e, s, n, i) {
360
362
  } else
361
363
  i(null, l);
362
364
  }, r.postMessage(s, n), r;
363
- }, $ = Uint8Array, z = Uint16Array, Xe = Int32Array, Ge = new $([
365
+ }, V = Uint8Array, z = Uint16Array, Ge = Int32Array, Ke = new V([
364
366
  0,
365
367
  0,
366
368
  0,
@@ -395,7 +397,7 @@ var Gt = {}, Ln = function(t, e, s, n, i) {
395
397
  0,
396
398
  /* impossible */
397
399
  0
398
- ]), Ke = new $([
400
+ ]), Je = new V([
399
401
  0,
400
402
  0,
401
403
  0,
@@ -429,19 +431,19 @@ var Gt = {}, Ln = function(t, e, s, n, i) {
429
431
  /* unused */
430
432
  0,
431
433
  0
432
- ]), gt = new $([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Hs = function(t, e) {
434
+ ]), gt = new V([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), qs = function(t, e) {
433
435
  for (var s = new z(31), n = 0; n < 31; ++n)
434
436
  s[n] = e += 1 << t[n - 1];
435
- for (var i = new Xe(s[30]), n = 1; n < 30; ++n)
437
+ for (var i = new Ge(s[30]), n = 1; n < 30; ++n)
436
438
  for (var r = s[n]; r < s[n + 1]; ++r)
437
439
  i[r] = r - s[n] << 5 | n;
438
440
  return { b: s, r: i };
439
- }, js = Hs(Ge, 2), Pn = js.b, Fe = js.r;
440
- Pn[28] = 258, Fe[258] = 28;
441
- var Fn = Hs(Ke, 0), mt = Fn.r, Be = new z(32768);
442
- for (var L = 0; L < 32768; ++L) {
443
- var te = (L & 43690) >> 1 | (L & 21845) << 1;
444
- te = (te & 52428) >> 2 | (te & 13107) << 2, te = (te & 61680) >> 4 | (te & 3855) << 4, Be[L] = ((te & 65280) >> 8 | (te & 255) << 8) >> 1;
441
+ }, $s = qs(Ke, 2), Bn = $s.b, Be = $s.r;
442
+ Bn[28] = 258, Be[258] = 28;
443
+ var Un = qs(Je, 0), mt = Un.r, Ue = new z(32768);
444
+ for (var P = 0; P < 32768; ++P) {
445
+ var te = (P & 43690) >> 1 | (P & 21845) << 1;
446
+ te = (te & 52428) >> 2 | (te & 13107) << 2, te = (te & 61680) >> 4 | (te & 3855) << 4, Ue[P] = ((te & 65280) >> 8 | (te & 255) << 8) >> 1;
445
447
  }
446
448
  var me = function(t, e, s) {
447
449
  for (var n = t.length, i = 0, r = new z(e); i < n; ++i)
@@ -456,28 +458,28 @@ var me = function(t, e, s) {
456
458
  for (i = 0; i < n; ++i)
457
459
  if (t[i])
458
460
  for (var h = i << 4 | t[i], c = e - t[i], u = o[t[i] - 1]++ << c, d = u | (1 << c) - 1; u <= d; ++u)
459
- l[Be[u] >> a] = h;
461
+ l[Ue[u] >> a] = h;
460
462
  } else
461
463
  for (l = new z(n), i = 0; i < n; ++i)
462
- t[i] && (l[i] = Be[o[t[i] - 1]++] >> 15 - t[i]);
464
+ t[i] && (l[i] = Ue[o[t[i] - 1]++] >> 15 - t[i]);
463
465
  return l;
464
- }, ie = new $(288);
465
- for (var L = 0; L < 144; ++L)
466
- ie[L] = 8;
467
- for (var L = 144; L < 256; ++L)
468
- ie[L] = 9;
469
- for (var L = 256; L < 280; ++L)
470
- ie[L] = 7;
471
- for (var L = 280; L < 288; ++L)
472
- ie[L] = 8;
473
- var Ie = new $(32);
474
- for (var L = 0; L < 32; ++L)
475
- Ie[L] = 5;
476
- var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = function(t) {
466
+ }, ie = new V(288);
467
+ for (var P = 0; P < 144; ++P)
468
+ ie[P] = 8;
469
+ for (var P = 144; P < 256; ++P)
470
+ ie[P] = 9;
471
+ for (var P = 256; P < 280; ++P)
472
+ ie[P] = 7;
473
+ for (var P = 280; P < 288; ++P)
474
+ ie[P] = 8;
475
+ var Ie = new V(32);
476
+ for (var P = 0; P < 32; ++P)
477
+ Ie[P] = 5;
478
+ var Vs = /* @__PURE__ */ me(ie, 9, 0), Xs = /* @__PURE__ */ me(Ie, 5, 0), Dt = function(t) {
477
479
  return (t + 7) / 8 | 0;
478
- }, qs = function(t, e, s) {
479
- return (e == null || e < 0) && (e = 0), (s == null || s > t.length) && (s = t.length), new $(t.subarray(e, s));
480
- }, Bn = [
480
+ }, Gs = function(t, e, s) {
481
+ return (e == null || e < 0) && (e = 0), (s == null || s > t.length) && (s = t.length), new V(t.subarray(e, s));
482
+ }, Hn = [
481
483
  "unexpected EOF",
482
484
  "invalid block type",
483
485
  "invalid length/literal",
@@ -493,12 +495,12 @@ var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = f
493
495
  "stream finishing",
494
496
  "invalid zip data"
495
497
  // determined by unknown compression method
496
- ], $s = function(t, e, s) {
497
- var n = new Error(e || Bn[t]);
498
- if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, $s), !s)
498
+ ], Ks = function(t, e, s) {
499
+ var n = new Error(e || Hn[t]);
500
+ if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, Ks), !s)
499
501
  throw n;
500
502
  return n;
501
- }, K = function(t, e, s) {
503
+ }, J = function(t, e, s) {
502
504
  s <<= e & 7;
503
505
  var n = e / 8 | 0;
504
506
  t[n] |= s, t[n + 1] |= s >> 8;
@@ -513,18 +515,18 @@ var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = f
513
515
  if (!i)
514
516
  return { t: At, l: 0 };
515
517
  if (i == 1) {
516
- var o = new $(s[0].s + 1);
518
+ var o = new V(s[0].s + 1);
517
519
  return o[s[0].s] = 1, { t: o, l: 1 };
518
520
  }
519
- s.sort(function(v, k) {
520
- return v.f - k.f;
521
+ s.sort(function(w, k) {
522
+ return w.f - k.f;
521
523
  }), s.push({ s: -1, f: 25001 });
522
524
  var l = s[0], a = s[1], h = 0, c = 1, u = 2;
523
525
  for (s[0] = { s: -1, f: l.f + a.f, l, r: a }; c != i - 1; )
524
526
  l = s[s[h].f < s[u].f ? h++ : u++], a = s[h != c && s[h].f < s[u].f ? h++ : u++], s[c++] = { s: -1, f: l.f + a.f, l, r: a };
525
527
  for (var d = r[0].s, n = 1; n < i; ++n)
526
528
  r[n].s > d && (d = r[n].s);
527
- var f = new z(d + 1), g = Ue(s[c - 1], f, 0);
529
+ var f = new z(d + 1), g = He(s[c - 1], f, 0);
528
530
  if (g > e) {
529
531
  var n = 0, p = 0, y = g - e, E = 1 << y;
530
532
  for (r.sort(function(k, x) {
@@ -546,9 +548,9 @@ var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = f
546
548
  }
547
549
  g = e;
548
550
  }
549
- return { t: new $(f), l: g };
550
- }, Ue = function(t, e, s) {
551
- return t.s == -1 ? Math.max(Ue(t.l, e, s + 1), Ue(t.r, e, s + 1)) : e[t.s] = s;
551
+ return { t: new V(f), l: g };
552
+ }, He = function(t, e, s) {
553
+ return t.s == -1 ? Math.max(He(t.l, e, s + 1), He(t.r, e, s + 1)) : e[t.s] = s;
552
554
  }, bt = function(t) {
553
555
  for (var e = t.length; e && !t[--e]; )
554
556
  ;
@@ -583,128 +585,128 @@ var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = f
583
585
  t[i + r + 4] = s[r];
584
586
  return (i + 4 + n) * 8;
585
587
  }, yt = function(t, e, s, n, i, r, o, l, a, h, c) {
586
- K(e, c++, s), ++i[256];
587
- for (var u = De(i, 15), d = u.t, f = u.l, g = De(r, 15), p = g.t, y = g.l, E = bt(d), N = E.c, T = E.n, m = bt(p), v = m.c, k = m.n, x = new z(19), S = 0; S < N.length; ++S)
588
+ J(e, c++, s), ++i[256];
589
+ for (var u = De(i, 15), d = u.t, f = u.l, g = De(r, 15), p = g.t, y = g.l, E = bt(d), N = E.c, T = E.n, m = bt(p), w = m.c, k = m.n, x = new z(19), S = 0; S < N.length; ++S)
588
590
  ++x[N[S] & 31];
589
- for (var S = 0; S < v.length; ++S)
590
- ++x[v[S] & 31];
591
+ for (var S = 0; S < w.length; ++S)
592
+ ++x[w[S] & 31];
591
593
  for (var b = De(x, 7), _ = b.t, M = b.l, O = 19; O > 4 && !_[gt[O - 1]]; --O)
592
594
  ;
593
- var D = h + 5 << 3, w = pe(i, ie) + pe(r, Ie) + o, I = pe(i, d) + pe(r, p) + o + 14 + 3 * O + pe(x, _) + 2 * x[16] + 3 * x[17] + 7 * x[18];
594
- if (a >= 0 && D <= w && D <= I)
595
+ var D = h + 5 << 3, v = pe(i, ie) + pe(r, Ie) + o, I = pe(i, d) + pe(r, p) + o + 14 + 3 * O + pe(x, _) + 2 * x[16] + 3 * x[17] + 7 * x[18];
596
+ if (a >= 0 && D <= v && D <= I)
595
597
  return Mt(e, c, t.subarray(a, a + h));
596
- var A, P, R, U;
597
- if (K(e, c, 1 + (I < w)), c += 2, I < w) {
598
- A = me(d, f, 0), P = d, R = me(p, y, 0), U = p;
599
- var Qe = me(_, M, 0);
600
- K(e, c, T - 257), K(e, c + 5, k - 1), K(e, c + 10, O - 4), c += 14;
598
+ var A, L, R, U;
599
+ if (J(e, c, 1 + (I < v)), c += 2, I < v) {
600
+ A = me(d, f, 0), L = d, R = me(p, y, 0), U = p;
601
+ var Ze = me(_, M, 0);
602
+ J(e, c, T - 257), J(e, c + 5, k - 1), J(e, c + 10, O - 4), c += 14;
601
603
  for (var S = 0; S < O; ++S)
602
- K(e, c + 3 * S, _[gt[S]]);
604
+ J(e, c + 3 * S, _[gt[S]]);
603
605
  c += 3 * O;
604
- for (var X = [N, v], ve = 0; ve < 2; ++ve)
605
- for (var ce = X[ve], S = 0; S < ce.length; ++S) {
606
- var G = ce[S] & 31;
607
- K(e, c, Qe[G]), c += _[G], G > 15 && (K(e, c, ce[S] >> 5 & 127), c += ce[S] >> 12);
606
+ for (var G = [N, w], we = 0; we < 2; ++we)
607
+ for (var ce = G[we], S = 0; S < ce.length; ++S) {
608
+ var K = ce[S] & 31;
609
+ J(e, c, Ze[K]), c += _[K], K > 15 && (J(e, c, ce[S] >> 5 & 127), c += ce[S] >> 12);
608
610
  }
609
611
  } else
610
- A = zs, P = ie, R = Ws, U = Ie;
612
+ A = Vs, L = ie, R = Xs, U = Ie;
611
613
  for (var S = 0; S < l; ++S) {
612
614
  var H = n[S];
613
615
  if (H > 255) {
614
- var G = H >> 18 & 31;
615
- fe(e, c, A[G + 257]), c += P[G + 257], G > 7 && (K(e, c, H >> 23 & 31), c += Ge[G]);
616
+ var K = H >> 18 & 31;
617
+ fe(e, c, A[K + 257]), c += L[K + 257], K > 7 && (J(e, c, H >> 23 & 31), c += Ke[K]);
616
618
  var le = H & 31;
617
- fe(e, c, R[le]), c += U[le], le > 3 && (fe(e, c, H >> 5 & 8191), c += Ke[le]);
619
+ fe(e, c, R[le]), c += U[le], le > 3 && (fe(e, c, H >> 5 & 8191), c += Je[le]);
618
620
  } else
619
- fe(e, c, A[H]), c += P[H];
621
+ fe(e, c, A[H]), c += L[H];
620
622
  }
621
- return fe(e, c, A[256]), c + P[256];
622
- }, Vs = /* @__PURE__ */ new Xe([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), At = /* @__PURE__ */ new $(0), Xs = function(t, e, s, n, i, r) {
623
- var o = r.z || t.length, l = new $(n + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(n, l.length - i), h = r.l, c = (r.r || 0) & 7;
623
+ return fe(e, c, A[256]), c + L[256];
624
+ }, Js = /* @__PURE__ */ new Ge([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), At = /* @__PURE__ */ new V(0), Ys = function(t, e, s, n, i, r) {
625
+ var o = r.z || t.length, l = new V(n + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(n, l.length - i), h = r.l, c = (r.r || 0) & 7;
624
626
  if (e) {
625
627
  c && (a[0] = r.r >> 3);
626
- for (var u = Vs[e - 1], d = u >> 13, f = u & 8191, g = (1 << s) - 1, p = r.p || new z(32768), y = r.h || new z(g + 1), E = Math.ceil(s / 3), N = 2 * E, T = function(tt) {
627
- return (t[tt] ^ t[tt + 1] << E ^ t[tt + 2] << N) & g;
628
- }, m = new Xe(25e3), v = new z(288), k = new z(32), x = 0, S = 0, b = r.i || 0, _ = 0, M = r.w || 0, O = 0; b + 2 < o; ++b) {
629
- var D = T(b), w = b & 32767, I = y[D];
630
- if (p[w] = I, y[D] = w, M <= b) {
628
+ for (var u = Js[e - 1], d = u >> 13, f = u & 8191, g = (1 << s) - 1, p = r.p || new z(32768), y = r.h || new z(g + 1), E = Math.ceil(s / 3), N = 2 * E, T = function(st) {
629
+ return (t[st] ^ t[st + 1] << E ^ t[st + 2] << N) & g;
630
+ }, m = new Ge(25e3), w = new z(288), k = new z(32), x = 0, S = 0, b = r.i || 0, _ = 0, M = r.w || 0, O = 0; b + 2 < o; ++b) {
631
+ var D = T(b), v = b & 32767, I = y[D];
632
+ if (p[v] = I, y[D] = v, M <= b) {
631
633
  var A = o - b;
632
634
  if ((x > 7e3 || _ > 24576) && (A > 423 || !h)) {
633
- c = yt(t, a, 0, m, v, k, S, _, O, b - O, c), _ = x = S = 0, O = b;
634
- for (var P = 0; P < 286; ++P)
635
- v[P] = 0;
636
- for (var P = 0; P < 30; ++P)
637
- k[P] = 0;
635
+ c = yt(t, a, 0, m, w, k, S, _, O, b - O, c), _ = x = S = 0, O = b;
636
+ for (var L = 0; L < 286; ++L)
637
+ w[L] = 0;
638
+ for (var L = 0; L < 30; ++L)
639
+ k[L] = 0;
638
640
  }
639
- var R = 2, U = 0, Qe = f, X = w - I & 32767;
640
- if (A > 2 && D == T(b - X))
641
- for (var ve = Math.min(d, A) - 1, ce = Math.min(32767, b), G = Math.min(258, A); X <= ce && --Qe && w != I; ) {
642
- if (t[b + R] == t[b + R - X]) {
643
- for (var H = 0; H < G && t[b + H] == t[b + H - X]; ++H)
641
+ var R = 2, U = 0, Ze = f, G = v - I & 32767;
642
+ if (A > 2 && D == T(b - G))
643
+ for (var we = Math.min(d, A) - 1, ce = Math.min(32767, b), K = Math.min(258, A); G <= ce && --Ze && v != I; ) {
644
+ if (t[b + R] == t[b + R - G]) {
645
+ for (var H = 0; H < K && t[b + H] == t[b + H - G]; ++H)
644
646
  ;
645
647
  if (H > R) {
646
- if (R = H, U = X, H > ve)
648
+ if (R = H, U = G, H > we)
647
649
  break;
648
- for (var le = Math.min(X, H - 2), qt = 0, P = 0; P < le; ++P) {
649
- var Ze = b - X + P & 32767, En = p[Ze], $t = Ze - En & 32767;
650
- $t > qt && (qt = $t, I = Ze);
650
+ for (var le = Math.min(G, H - 2), $t = 0, L = 0; L < le; ++L) {
651
+ var et = b - G + L & 32767, Nn = p[et], Vt = et - Nn & 32767;
652
+ Vt > $t && ($t = Vt, I = et);
651
653
  }
652
654
  }
653
655
  }
654
- w = I, I = p[w], X += w - I & 32767;
656
+ v = I, I = p[v], G += v - I & 32767;
655
657
  }
656
658
  if (U) {
657
- m[_++] = 268435456 | Fe[R] << 18 | mt[U];
658
- var Vt = Fe[R] & 31, Xt = mt[U] & 31;
659
- S += Ge[Vt] + Ke[Xt], ++v[257 + Vt], ++k[Xt], M = b + R, ++x;
659
+ m[_++] = 268435456 | Be[R] << 18 | mt[U];
660
+ var Xt = Be[R] & 31, Gt = mt[U] & 31;
661
+ S += Ke[Xt] + Je[Gt], ++w[257 + Xt], ++k[Gt], M = b + R, ++x;
660
662
  } else
661
- m[_++] = t[b], ++v[t[b]];
663
+ m[_++] = t[b], ++w[t[b]];
662
664
  }
663
665
  }
664
666
  for (b = Math.max(b, M); b < o; ++b)
665
- m[_++] = t[b], ++v[t[b]];
666
- c = yt(t, a, h, m, v, k, S, _, O, b - O, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = y, r.p = p, r.i = b, r.w = M);
667
+ m[_++] = t[b], ++w[t[b]];
668
+ c = yt(t, a, h, m, w, k, S, _, O, b - O, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = y, r.p = p, r.i = b, r.w = M);
667
669
  } else {
668
670
  for (var b = r.w || 0; b < o + h; b += 65535) {
669
- var et = b + 65535;
670
- et >= o && (a[c / 8 | 0] = h, et = o), c = Mt(a, c + 1, t.subarray(b, et));
671
+ var tt = b + 65535;
672
+ tt >= o && (a[c / 8 | 0] = h, tt = o), c = Mt(a, c + 1, t.subarray(b, tt));
671
673
  }
672
674
  r.i = o;
673
675
  }
674
- return qs(l, 0, n + Dt(c) + i);
675
- }, Gs = /* @__PURE__ */ function() {
676
+ return Gs(l, 0, n + Dt(c) + i);
677
+ }, Qs = /* @__PURE__ */ function() {
676
678
  for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
677
679
  for (var s = e, n = 9; --n; )
678
680
  s = (s & 1 && -306674912) ^ s >>> 1;
679
681
  t[e] = s;
680
682
  }
681
683
  return t;
682
- }(), Ks = function() {
684
+ }(), Zs = function() {
683
685
  var t = -1;
684
686
  return {
685
687
  p: function(e) {
686
688
  for (var s = t, n = 0; n < e.length; ++n)
687
- s = Gs[s & 255 ^ e[n]] ^ s >>> 8;
689
+ s = Qs[s & 255 ^ e[n]] ^ s >>> 8;
688
690
  t = s;
689
691
  },
690
692
  d: function() {
691
693
  return ~t;
692
694
  }
693
695
  };
694
- }, Lt = function(t, e, s, n, i) {
696
+ }, Pt = function(t, e, s, n, i) {
695
697
  if (!i && (i = { l: 1 }, e.dictionary)) {
696
- var r = e.dictionary.subarray(-32768), o = new $(r.length + t.length);
698
+ var r = e.dictionary.subarray(-32768), o = new V(r.length + t.length);
697
699
  o.set(r), o.set(t, r.length), t = o, i.w = r.length;
698
700
  }
699
- return Xs(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
700
- }, Un = function(t, e) {
701
+ return Ys(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
702
+ }, jn = function(t, e) {
701
703
  var s = {};
702
704
  for (var n in t)
703
705
  s[n] = t[n];
704
706
  for (var n in e)
705
707
  s[n] = e[n];
706
708
  return s;
707
- }, Kt = function(t, e, s) {
709
+ }, Jt = function(t, e, s) {
708
710
  for (var n = t(), i = t.toString(), r = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < n.length; ++o) {
709
711
  var l = n[o], a = r[o];
710
712
  if (typeof l == "function") {
@@ -725,72 +727,72 @@ var zs = /* @__PURE__ */ me(ie, 9, 0), Ws = /* @__PURE__ */ me(Ie, 5, 0), Dt = f
725
727
  s[a] = l;
726
728
  }
727
729
  return e;
728
- }, xe = [], Hn = function(t) {
730
+ }, xe = [], zn = function(t) {
729
731
  var e = [];
730
732
  for (var s in t)
731
733
  t[s].buffer && e.push((t[s] = new t[s].constructor(t[s])).buffer);
732
734
  return e;
733
- }, jn = function(t, e, s, n) {
735
+ }, Wn = function(t, e, s, n) {
734
736
  if (!xe[s]) {
735
737
  for (var i = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
736
- i = Kt(t[l], i, r);
737
- xe[s] = { c: Kt(t[o], i, r), e: r };
738
- }
739
- var a = Un({}, xe[s].e);
740
- return Ln(xe[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, Hn(a), n);
741
- }, zn = function() {
742
- return [$, z, Xe, Ge, Ke, gt, Fe, mt, zs, ie, Ws, Ie, Be, Vs, At, me, K, fe, De, Ue, bt, pe, Mt, yt, Dt, qs, Xs, Lt, $n, Js];
743
- }, Wn = function() {
744
- return [Ys, Qs, He, Ks, Gs];
745
- }, Js = function(t) {
738
+ i = Jt(t[l], i, r);
739
+ xe[s] = { c: Jt(t[o], i, r), e: r };
740
+ }
741
+ var a = jn({}, xe[s].e);
742
+ return Fn(xe[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, zn(a), n);
743
+ }, qn = function() {
744
+ return [V, z, Ge, Ke, Je, gt, Be, mt, Vs, ie, Xs, Ie, Ue, Js, At, me, J, fe, De, He, bt, pe, Mt, yt, Dt, Gs, Ys, Pt, Xn, en];
745
+ }, $n = function() {
746
+ return [tn, sn, je, Zs, Qs];
747
+ }, en = function(t) {
746
748
  return postMessage(t, [t.buffer]);
747
- }, qn = function(t, e, s, n, i, r) {
748
- var o = jn(s, n, i, function(l, a) {
749
+ }, Vn = function(t, e, s, n, i, r) {
750
+ var o = Wn(s, n, i, function(l, a) {
749
751
  o.terminate(), r(l, a);
750
752
  });
751
753
  return o.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
752
754
  o.terminate();
753
755
  };
754
- }, He = function(t, e, s) {
756
+ }, je = function(t, e, s) {
755
757
  for (; s; ++e)
756
758
  t[e] = s, s >>>= 8;
757
- }, Ys = function(t, e) {
759
+ }, tn = function(t, e) {
758
760
  var s = e.filename;
759
- if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && He(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), s) {
761
+ if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && je(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), s) {
760
762
  t[3] = 8;
761
763
  for (var n = 0; n <= s.length; ++n)
762
764
  t[n + 10] = s.charCodeAt(n);
763
765
  }
764
- }, Qs = function(t) {
766
+ }, sn = function(t) {
765
767
  return 10 + (t.filename ? t.filename.length + 1 : 0);
766
768
  };
767
- function $n(t, e) {
768
- return Lt(t, e || {}, 0, 0);
769
+ function Xn(t, e) {
770
+ return Pt(t, e || {}, 0, 0);
769
771
  }
770
- function Vn(t, e, s) {
771
- return s || (s = e, e = {}), typeof s != "function" && $s(7), qn(t, e, [
772
- zn,
773
- Wn,
772
+ function Gn(t, e, s) {
773
+ return s || (s = e, e = {}), typeof s != "function" && Ks(7), Vn(t, e, [
774
+ qn,
775
+ $n,
774
776
  function() {
775
- return [Jt];
777
+ return [Yt];
776
778
  }
777
779
  ], function(n) {
778
- return Js(Jt(n.data[0], n.data[1]));
780
+ return en(Yt(n.data[0], n.data[1]));
779
781
  }, 2, s);
780
782
  }
781
- function Jt(t, e) {
783
+ function Yt(t, e) {
782
784
  e || (e = {});
783
- var s = Ks(), n = t.length;
785
+ var s = Zs(), n = t.length;
784
786
  s.p(t);
785
- var i = Lt(t, e, Qs(e), 8), r = i.length;
786
- return Ys(i, e), He(i, r - 8, s.d()), He(i, r - 4, n), i;
787
+ var i = Pt(t, e, sn(e), 8), r = i.length;
788
+ return tn(i, e), je(i, r - 8, s.d()), je(i, r - 4, n), i;
787
789
  }
788
- var Xn = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Gn = 0;
790
+ var Kn = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Jn = 0;
789
791
  try {
790
- Xn.decode(At, { stream: !0 }), Gn = 1;
792
+ Kn.decode(At, { stream: !0 }), Jn = 1;
791
793
  } catch {
792
794
  }
793
- class Yt {
795
+ class Qt {
794
796
  constructor() {
795
797
  this.idx = 1, this.backDict = {};
796
798
  }
@@ -799,9 +801,9 @@ class Yt {
799
801
  return this.backDict[e] || (s = !0, this.backDict[e] = this.idx++), [this.backDict[e], s];
800
802
  }
801
803
  }
802
- class Kn {
804
+ class Yn {
803
805
  constructor(e, s) {
804
- this.app = e, this.isDictDisabled = s, this.dict = new Yt();
806
+ this.app = e, this.isDictDisabled = s, this.dict = new Qt();
805
807
  }
806
808
  sendSetAttribute(e, s, n) {
807
809
  if (this.isDictDisabled) {
@@ -822,14 +824,14 @@ class Kn {
822
824
  return n && this.app.send([50, s, e]), s;
823
825
  }
824
826
  clear() {
825
- this.dict = new Yt();
827
+ this.dict = new Qt();
826
828
  }
827
829
  }
828
- class Jn {
830
+ class Qn {
829
831
  constructor(e, s) {
830
832
  this.app = e, this.startParams = s, this.conditions = [], this.hasStarted = !1, this.createConditionFromFilter = (n) => {
831
833
  if (n.value.length) {
832
- const i = Yn(n);
834
+ const i = Zn(n);
833
835
  if (i.type)
834
836
  return i;
835
837
  }
@@ -972,7 +974,7 @@ const he = {
972
974
  greaterOrEqual: (t, e) => t >= e,
973
975
  lessOrEqual: (t, e) => t <= e,
974
976
  lessThan: (t, e) => t < e
975
- }, Yn = (t) => {
977
+ }, Zn = (t) => {
976
978
  const e = {
977
979
  on: "is",
978
980
  notOn: "isNot",
@@ -1080,7 +1082,7 @@ const he = {
1080
1082
  }
1081
1083
  return n;
1082
1084
  };
1083
- class Qn {
1085
+ class ei {
1084
1086
  constructor(e) {
1085
1087
  this.app = e, this.flags = [], this.storageKey = "__openreplay_flags";
1086
1088
  const s = this.app.sessionStorage.getItem(this.storageKey);
@@ -1151,24 +1153,24 @@ class Qn {
1151
1153
  return e.filter((r) => i.findIndex((o) => o.key === r.key) === -1);
1152
1154
  }
1153
1155
  }
1154
- const Qt = { htmlmasked: "hidden", masked: "obscured" }, Z = !(typeof window > "u"), Zn = Z && navigator.userAgent.match(/firefox|fxios/i), ei = 1e5;
1155
- let Pt = Z ? Date.now() - performance.now() : 0;
1156
- function st() {
1157
- Pt = Date.now() - performance.now();
1156
+ const Zt = { htmlmasked: "hidden", masked: "obscured" }, Z = !(typeof window > "u"), ti = Z && navigator.userAgent.match(/firefox|fxios/i), si = 1e5;
1157
+ let Lt = Z ? Date.now() - performance.now() : 0;
1158
+ function nt() {
1159
+ Lt = Date.now() - performance.now();
1158
1160
  }
1159
1161
  function ye() {
1160
- return Pt;
1162
+ return Lt;
1161
1163
  }
1162
- const V = Z && performance.now ? () => Math.round(performance.now() + Pt) : () => Date.now(), nt = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
1163
- function Zs(t) {
1164
+ const X = Z && performance.now ? () => Math.round(performance.now() + Lt) : () => Date.now(), it = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
1165
+ function nn(t) {
1164
1166
  return t.trim().replace(/\s+/g, " ");
1165
1167
  }
1166
- function en(t) {
1168
+ function rn(t) {
1167
1169
  return t.startsWith("https://") || t.startsWith("http://");
1168
1170
  }
1169
- const je = "https://docs.openreplay.com", Zt = {};
1171
+ const ze = "https://docs.openreplay.com", es = {};
1170
1172
  function ne(t, e, s = "/") {
1171
- Zt[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${je}${s} for more information.`), Zt[t] = !0);
1173
+ es[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${ze}${s} for more information.`), es[t] = !0);
1172
1174
  }
1173
1175
  function Ft(t) {
1174
1176
  let e = t.getAttribute("data-openreplay-label");
@@ -1176,28 +1178,28 @@ function Ft(t) {
1176
1178
  }
1177
1179
  function ae(t, e) {
1178
1180
  const s = `data-openreplay-${e}`;
1179
- return t.hasAttribute(s) ? (Qt[e] && ne(
1181
+ return t.hasAttribute(s) ? (Zt[e] && ne(
1180
1182
  `"${s}" attribute`,
1181
1183
  // @ts-ignore
1182
- `"${Qt[e]}" attribute`,
1184
+ `"${Zt[e]}" attribute`,
1183
1185
  "/installation/sanitize-data"
1184
1186
  ), !0) : !1;
1185
1187
  }
1186
- function ti(t) {
1188
+ function ni(t) {
1187
1189
  try {
1188
1190
  return !!t.contentDocument;
1189
1191
  } catch {
1190
1192
  return !1;
1191
1193
  }
1192
1194
  }
1193
- function es(t) {
1195
+ function ts(t) {
1194
1196
  return t.toString(16).padStart(2, "0");
1195
1197
  }
1196
- function si(t) {
1198
+ function ii(t) {
1197
1199
  const e = new Uint8Array((t || 40) / 2), s = window.crypto || window.msCrypto;
1198
- return s ? (s.getRandomValues(e), Array.from(e, es).join("")) : Array.from({ length: t || 40 }, () => es(Math.floor(Math.random() * 16))).join("");
1200
+ return s ? (s.getRandomValues(e), Array.from(e, ts).join("")) : Array.from({ length: t || 40 }, () => ts(Math.floor(Math.random() * 16))).join("");
1199
1201
  }
1200
- function ni() {
1202
+ function ri() {
1201
1203
  try {
1202
1204
  return window.self && window.top && window.self !== window.top;
1203
1205
  } catch {
@@ -1210,11 +1212,11 @@ function Bt(t) {
1210
1212
  window.Zone.__symbol__(t)
1211
1213
  ) : t;
1212
1214
  }
1213
- function tn(t) {
1215
+ function on(t) {
1214
1216
  const e = Bt("MutationObserver");
1215
1217
  return new window[e](t);
1216
1218
  }
1217
- function sn(t, e, s, n) {
1219
+ function an(t, e, s, n) {
1218
1220
  const i = Bt("addEventListener");
1219
1221
  try {
1220
1222
  t[i](e, s, n);
@@ -1226,7 +1228,7 @@ function sn(t, e, s, n) {
1226
1228
  );
1227
1229
  }
1228
1230
  }
1229
- function nn(t, e, s, n) {
1231
+ function cn(t, e, s, n) {
1230
1232
  const i = Bt("removeEventListener");
1231
1233
  try {
1232
1234
  t[i](e, s, n);
@@ -1238,7 +1240,7 @@ function nn(t, e, s, n) {
1238
1240
  );
1239
1241
  }
1240
1242
  }
1241
- class ii {
1243
+ class oi {
1242
1244
  constructor() {
1243
1245
  this.taskQueue = [], this.isRunning = !1;
1244
1246
  }
@@ -1264,16 +1266,16 @@ class ii {
1264
1266
  e();
1265
1267
  }
1266
1268
  }
1267
- const ri = new ii();
1268
- function oi(t) {
1269
- ri.addTask(t);
1269
+ const ai = new oi();
1270
+ function ci(t) {
1271
+ ai.addTask(t);
1270
1272
  }
1271
- function rn(t, e) {
1273
+ function ln(t, e) {
1272
1274
  const s = { ...t };
1273
1275
  for (const n in e)
1274
1276
  if (e.hasOwnProperty(n)) {
1275
1277
  const i = e[n], r = t[n];
1276
- typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = rn(r || {}, i) : s[n] = i;
1278
+ typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = ln(r || {}, i) : s[n] = i;
1277
1279
  }
1278
1280
  return s;
1279
1281
  }
@@ -1283,26 +1285,26 @@ function re(t) {
1283
1285
  t
1284
1286
  ];
1285
1287
  }
1286
- function ai(t, e) {
1288
+ function li(t, e) {
1287
1289
  return [
1288
1290
  5,
1289
1291
  t,
1290
1292
  e
1291
1293
  ];
1292
1294
  }
1293
- function ci(t, e) {
1295
+ function hi(t, e) {
1294
1296
  return [
1295
1297
  6,
1296
1298
  t,
1297
1299
  e
1298
1300
  ];
1299
1301
  }
1300
- function li() {
1302
+ function ui() {
1301
1303
  return [
1302
1304
  7
1303
1305
  ];
1304
1306
  }
1305
- function hi(t, e, s, n, i) {
1307
+ function di(t, e, s, n, i) {
1306
1308
  return [
1307
1309
  8,
1308
1310
  t,
@@ -1312,7 +1314,7 @@ function hi(t, e, s, n, i) {
1312
1314
  i
1313
1315
  ];
1314
1316
  }
1315
- function ui(t, e, s) {
1317
+ function fi(t, e, s) {
1316
1318
  return [
1317
1319
  9,
1318
1320
  t,
@@ -1320,7 +1322,7 @@ function ui(t, e, s) {
1320
1322
  s
1321
1323
  ];
1322
1324
  }
1323
- function di(t, e, s) {
1325
+ function pi(t, e, s) {
1324
1326
  return [
1325
1327
  10,
1326
1328
  t,
@@ -1328,27 +1330,27 @@ function di(t, e, s) {
1328
1330
  s
1329
1331
  ];
1330
1332
  }
1331
- function fi(t) {
1333
+ function gi(t) {
1332
1334
  return [
1333
1335
  11,
1334
1336
  t
1335
1337
  ];
1336
1338
  }
1337
- function ts(t, e) {
1339
+ function ss(t, e) {
1338
1340
  return [
1339
1341
  13,
1340
1342
  t,
1341
1343
  e
1342
1344
  ];
1343
1345
  }
1344
- function pi(t, e) {
1346
+ function mi(t, e) {
1345
1347
  return [
1346
1348
  14,
1347
1349
  t,
1348
1350
  e
1349
1351
  ];
1350
1352
  }
1351
- function gi(t, e, s) {
1353
+ function bi(t, e, s) {
1352
1354
  return [
1353
1355
  16,
1354
1356
  t,
@@ -1356,7 +1358,7 @@ function gi(t, e, s) {
1356
1358
  s
1357
1359
  ];
1358
1360
  }
1359
- function mi(t, e, s) {
1361
+ function yi(t, e, s) {
1360
1362
  return [
1361
1363
  18,
1362
1364
  t,
@@ -1364,28 +1366,28 @@ function mi(t, e, s) {
1364
1366
  s
1365
1367
  ];
1366
1368
  }
1367
- function bi(t, e) {
1369
+ function Si(t, e) {
1368
1370
  return [
1369
1371
  19,
1370
1372
  t,
1371
1373
  e
1372
1374
  ];
1373
1375
  }
1374
- function yi(t, e) {
1376
+ function wi(t, e) {
1375
1377
  return [
1376
1378
  20,
1377
1379
  t,
1378
1380
  e
1379
1381
  ];
1380
1382
  }
1381
- function Si(t, e) {
1383
+ function vi(t, e) {
1382
1384
  return [
1383
1385
  22,
1384
1386
  t,
1385
1387
  e
1386
1388
  ];
1387
1389
  }
1388
- function vi(t, e, s, n, i, r, o, l, a) {
1390
+ function ki(t, e, s, n, i, r, o, l, a) {
1389
1391
  return [
1390
1392
  23,
1391
1393
  t,
@@ -1399,7 +1401,7 @@ function vi(t, e, s, n, i, r, o, l, a) {
1399
1401
  a
1400
1402
  ];
1401
1403
  }
1402
- function wi(t, e, s) {
1404
+ function Ti(t, e, s) {
1403
1405
  return [
1404
1406
  24,
1405
1407
  t,
@@ -1407,33 +1409,33 @@ function wi(t, e, s) {
1407
1409
  s
1408
1410
  ];
1409
1411
  }
1410
- function ki(t, e) {
1412
+ function Ii(t, e) {
1411
1413
  return [
1412
1414
  27,
1413
1415
  t,
1414
1416
  e
1415
1417
  ];
1416
1418
  }
1417
- function Ti(t) {
1419
+ function xi(t) {
1418
1420
  return [
1419
1421
  28,
1420
1422
  t
1421
1423
  ];
1422
1424
  }
1423
- function Ii(t) {
1425
+ function Ei(t) {
1424
1426
  return [
1425
1427
  29,
1426
1428
  t
1427
1429
  ];
1428
1430
  }
1429
- function ss(t, e) {
1431
+ function ns(t, e) {
1430
1432
  return [
1431
1433
  30,
1432
1434
  t,
1433
1435
  e
1434
1436
  ];
1435
1437
  }
1436
- function xi(t, e, s, n) {
1438
+ function Ci(t, e, s, n) {
1437
1439
  return [
1438
1440
  49,
1439
1441
  t,
@@ -1442,20 +1444,20 @@ function xi(t, e, s, n) {
1442
1444
  n
1443
1445
  ];
1444
1446
  }
1445
- function Ei(t, e) {
1447
+ function Ni(t, e) {
1446
1448
  return [
1447
1449
  54,
1448
1450
  t,
1449
1451
  e
1450
1452
  ];
1451
1453
  }
1452
- function Ci(t) {
1454
+ function _i(t) {
1453
1455
  return [
1454
1456
  55,
1455
1457
  t
1456
1458
  ];
1457
1459
  }
1458
- function ns(t, e, s, n) {
1460
+ function is(t, e, s, n) {
1459
1461
  return [
1460
1462
  57,
1461
1463
  t,
@@ -1464,7 +1466,7 @@ function ns(t, e, s, n) {
1464
1466
  n
1465
1467
  ];
1466
1468
  }
1467
- function is(t) {
1469
+ function rs(t) {
1468
1470
  return [
1469
1471
  58,
1470
1472
  t
@@ -1479,7 +1481,7 @@ function St(t, e, s, n) {
1479
1481
  n
1480
1482
  ];
1481
1483
  }
1482
- function Ni(t, e, s) {
1484
+ function Oi(t, e, s) {
1483
1485
  return [
1484
1486
  61,
1485
1487
  t,
@@ -1487,21 +1489,21 @@ function Ni(t, e, s) {
1487
1489
  s
1488
1490
  ];
1489
1491
  }
1490
- function _i(t, e) {
1492
+ function Ri(t, e) {
1491
1493
  return [
1492
1494
  63,
1493
1495
  t,
1494
1496
  e
1495
1497
  ];
1496
1498
  }
1497
- function Oi(t, e) {
1499
+ function Di(t, e) {
1498
1500
  return [
1499
1501
  64,
1500
1502
  t,
1501
1503
  e
1502
1504
  ];
1503
1505
  }
1504
- function Ri(t, e, s, n, i, r) {
1506
+ function Mi(t, e, s, n, i, r) {
1505
1507
  return [
1506
1508
  68,
1507
1509
  t,
@@ -1512,14 +1514,14 @@ function Ri(t, e, s, n, i, r) {
1512
1514
  r
1513
1515
  ];
1514
1516
  }
1515
- function vt(t, e) {
1517
+ function wt(t, e) {
1516
1518
  return [
1517
1519
  70,
1518
1520
  t,
1519
1521
  e
1520
1522
  ];
1521
1523
  }
1522
- function rs(t, e, s) {
1524
+ function os(t, e, s) {
1523
1525
  return [
1524
1526
  71,
1525
1527
  t,
@@ -1527,7 +1529,7 @@ function rs(t, e, s) {
1527
1529
  s
1528
1530
  ];
1529
1531
  }
1530
- function wt(t, e, s, n) {
1532
+ function vt(t, e, s, n) {
1531
1533
  return [
1532
1534
  73,
1533
1535
  t,
@@ -1536,21 +1538,21 @@ function wt(t, e, s, n) {
1536
1538
  n
1537
1539
  ];
1538
1540
  }
1539
- function os(t, e) {
1541
+ function as(t, e) {
1540
1542
  return [
1541
1543
  75,
1542
1544
  t,
1543
1545
  e
1544
1546
  ];
1545
1547
  }
1546
- function on(t, e) {
1548
+ function hn(t, e) {
1547
1549
  return [
1548
1550
  76,
1549
1551
  t,
1550
1552
  e
1551
1553
  ];
1552
1554
  }
1553
- function Di(t, e) {
1555
+ function Ai(t, e) {
1554
1556
  return [
1555
1557
  77,
1556
1558
  t,
@@ -1566,7 +1568,7 @@ function kt(t, e, s, n) {
1566
1568
  n
1567
1569
  ];
1568
1570
  }
1569
- function ze(t, e, s, n, i, r, o, l, a) {
1571
+ function We(t, e, s, n, i, r, o, l, a) {
1570
1572
  return [
1571
1573
  83,
1572
1574
  t,
@@ -1580,7 +1582,7 @@ function ze(t, e, s, n, i, r, o, l, a) {
1580
1582
  a
1581
1583
  ];
1582
1584
  }
1583
- function Mi(t, e, s, n, i, r) {
1585
+ function Pi(t, e, s, n, i, r) {
1584
1586
  return [
1585
1587
  84,
1586
1588
  t,
@@ -1591,7 +1593,7 @@ function Mi(t, e, s, n, i, r) {
1591
1593
  r
1592
1594
  ];
1593
1595
  }
1594
- function Ai(t, e, s, n, i, r) {
1596
+ function Li(t, e, s, n, i, r) {
1595
1597
  return [
1596
1598
  112,
1597
1599
  t,
@@ -1602,7 +1604,7 @@ function Ai(t, e, s, n, i, r) {
1602
1604
  r
1603
1605
  ];
1604
1606
  }
1605
- function as(t, e, s) {
1607
+ function cs(t, e, s) {
1606
1608
  return [
1607
1609
  113,
1608
1610
  t,
@@ -1610,19 +1612,19 @@ function as(t, e, s) {
1610
1612
  s
1611
1613
  ];
1612
1614
  }
1613
- function Li(t) {
1615
+ function Fi(t) {
1614
1616
  return [
1615
1617
  114,
1616
1618
  t
1617
1619
  ];
1618
1620
  }
1619
- function Pi(t) {
1621
+ function Bi(t) {
1620
1622
  return [
1621
1623
  115,
1622
1624
  t
1623
1625
  ];
1624
1626
  }
1625
- function an(t, e, s, n, i, r, o, l, a, h) {
1627
+ function un(t, e, s, n, i, r, o, l, a, h) {
1626
1628
  return [
1627
1629
  116,
1628
1630
  t,
@@ -1649,20 +1651,20 @@ function oe(t) {
1649
1651
  t
1650
1652
  ];
1651
1653
  }
1652
- function Fi(t, e) {
1654
+ function Ui(t, e) {
1653
1655
  return [
1654
1656
  119,
1655
1657
  t,
1656
1658
  e
1657
1659
  ];
1658
1660
  }
1659
- function Bi(t) {
1661
+ function Hi(t) {
1660
1662
  return [
1661
1663
  120,
1662
1664
  t
1663
1665
  ];
1664
1666
  }
1665
- function Ui(t, e, s, n) {
1667
+ function ji(t, e, s, n) {
1666
1668
  return [
1667
1669
  122,
1668
1670
  t,
@@ -1671,8 +1673,8 @@ function Ui(t, e, s, n) {
1671
1673
  n
1672
1674
  ];
1673
1675
  }
1674
- const Tt = Z && "performance" in window && "memory" in performance ? performance : { memory: {} }, it = Z ? (navigator.deviceMemory || 0) * 1024 : 0, rt = Tt.memory.jsHeapSizeLimit || 0;
1675
- function Hi(t, e) {
1676
+ const Tt = Z && "performance" in window && "memory" in performance ? performance : { memory: {} }, rt = Z ? (navigator.deviceMemory || 0) * 1024 : 0, ot = Tt.memory.jsHeapSizeLimit || 0;
1677
+ function zi(t, e) {
1676
1678
  if (!Object.assign({
1677
1679
  capturePerformance: !0
1678
1680
  }, e).capturePerformance)
@@ -1685,7 +1687,7 @@ function Hi(t, e) {
1685
1687
  i === void 0 || i === -1 || i++;
1686
1688
  }, 0, !1);
1687
1689
  const o = () => {
1688
- n === void 0 || i === void 0 || (t.send(xi(n, i, Tt.memory.totalJSHeapSize || 0, Tt.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
1690
+ n === void 0 || i === void 0 || (t.send(Ci(n, i, Tt.memory.totalJSHeapSize || 0, Tt.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
1689
1691
  };
1690
1692
  t.attachStartCallback(() => {
1691
1693
  i = n = -1, o(), r();
@@ -1693,11 +1695,11 @@ function Hi(t, e) {
1693
1695
  i = n = void 0;
1694
1696
  }), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
1695
1697
  }
1696
- const cs = "__or__watched_tags__";
1697
- class ji {
1698
+ const ls = "__or__watched_tags__";
1699
+ class Wi {
1698
1700
  constructor(e, s, n) {
1699
1701
  this.sessionStorage = e, this.errLog = s, this.onTag = n, this.intervals = {}, this.tags = [];
1700
- const i = JSON.parse(e.getItem(cs) ?? "[]");
1702
+ const i = JSON.parse(e.getItem(ls) ?? "[]");
1701
1703
  this.setTags(i), this.observer = new IntersectionObserver((r) => {
1702
1704
  r.forEach((o) => {
1703
1705
  if (o.isIntersecting && o.target) {
@@ -1717,7 +1719,7 @@ class ji {
1717
1719
  if (n && n.length) {
1718
1720
  this.setTags(n);
1719
1721
  const i = JSON.stringify(n);
1720
- this.sessionStorage.setItem(cs, i || "");
1722
+ this.sessionStorage.setItem(ls, i || "");
1721
1723
  }
1722
1724
  }).catch((n) => this.errLog(n));
1723
1725
  }
@@ -1741,7 +1743,7 @@ class ji {
1741
1743
  }), this.tags = [], this.intervals = {}, this.observer.disconnect();
1742
1744
  }
1743
1745
  }
1744
- const zi = {
1746
+ const qi = {
1745
1747
  position: "fixed",
1746
1748
  top: 0,
1747
1749
  left: 0,
@@ -1753,7 +1755,7 @@ const zi = {
1753
1755
  justifyContent: "center",
1754
1756
  zIndex: 999999,
1755
1757
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
1756
- }, Wi = {
1758
+ }, $i = {
1757
1759
  display: "flex",
1758
1760
  flexDirection: "column",
1759
1761
  gap: "2rem",
@@ -1774,14 +1776,14 @@ const zi = {
1774
1776
  border: "1px solid #D9D9D9",
1775
1777
  background: "rgba(255, 255, 255, 0.75)",
1776
1778
  width: "22rem"
1777
- }, qi = {
1779
+ }, Vi = {
1778
1780
  fontFamily: "Verdana, sans-serif",
1779
1781
  fontSize: "1.25rem",
1780
1782
  fontStyle: "normal",
1781
1783
  fontWeight: "500",
1782
1784
  lineHeight: "1.75rem",
1783
1785
  color: "rgba(0, 0, 0, 0.85)"
1784
- }, $i = {
1786
+ }, Xi = {
1785
1787
  borderTop: "1px solid rgba(0, 0, 0, 0.06)",
1786
1788
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)",
1787
1789
  padding: "1.25rem 0rem",
@@ -1792,7 +1794,7 @@ const zi = {
1792
1794
  fontWeight: "400",
1793
1795
  lineHeight: "auto",
1794
1796
  whiteSpace: "pre-wrap"
1795
- }, Vi = {
1797
+ }, Gi = {
1796
1798
  display: "flex",
1797
1799
  padding: "0.4rem 0.9375rem",
1798
1800
  justifyContent: "center",
@@ -1810,7 +1812,7 @@ const zi = {
1810
1812
  fontWeight: "500",
1811
1813
  lineHeight: "1.5rem",
1812
1814
  cursor: "pointer"
1813
- }, ls = {
1815
+ }, hs = {
1814
1816
  fontFamily: "Verdana, sans-serif",
1815
1817
  fontSize: "13px",
1816
1818
  fontWeight: "500",
@@ -1826,7 +1828,7 @@ const zi = {
1826
1828
  gap: "0.625rem",
1827
1829
  fontSize: "13px",
1828
1830
  lineHeight: "auto"
1829
- }, Xi = {
1831
+ }, Ki = {
1830
1832
  padding: "0.5rem",
1831
1833
  gap: "0.5rem",
1832
1834
  fontFamily: "Verdana, sans-serif",
@@ -1855,18 +1857,18 @@ const zi = {
1855
1857
  fontStyle: "normal",
1856
1858
  fontWeight: "400"
1857
1859
  // lineHeight: '1.375rem',
1858
- }, Gi = {
1860
+ }, Ji = {
1859
1861
  ...ge,
1860
1862
  display: "flex",
1861
1863
  flexDirection: "column",
1862
1864
  alignItems: "center",
1863
1865
  gap: "0.625rem"
1864
- }, hs = {
1866
+ }, us = {
1865
1867
  fontSize: "1.25rem",
1866
1868
  fontWeight: "500",
1867
1869
  cursor: "pointer",
1868
1870
  color: "#394EFF"
1869
- }, us = {
1871
+ }, ds = {
1870
1872
  display: "flex",
1871
1873
  padding: "0.4rem 0.9375rem",
1872
1874
  justifyContent: "center",
@@ -1886,7 +1888,7 @@ const zi = {
1886
1888
  width: "100%",
1887
1889
  boxSizing: "border-box",
1888
1890
  cursor: "pointer"
1889
- }, ds = {
1891
+ }, fs = {
1890
1892
  marginTop: "1rem",
1891
1893
  marginBottom: "1rem",
1892
1894
  cursor: "pointer",
@@ -1894,7 +1896,7 @@ const zi = {
1894
1896
  fontWeight: "500",
1895
1897
  fontSize: "13px!important",
1896
1898
  lineHeight: "auto"
1897
- }, Ki = {
1899
+ }, Yi = {
1898
1900
  display: "flex",
1899
1901
  justifyContent: "space-between",
1900
1902
  alignItems: "center",
@@ -1902,7 +1904,7 @@ const zi = {
1902
1904
  padding: "0.5rem",
1903
1905
  width: "100%",
1904
1906
  boxSizing: "border-box"
1905
- }, fs = {
1907
+ }, ps = {
1906
1908
  display: "flex",
1907
1909
  flexDirection: "column",
1908
1910
  alignItems: "center",
@@ -1912,7 +1914,7 @@ const zi = {
1912
1914
  fontSize: "13px",
1913
1915
  height: "24px",
1914
1916
  width: "24px"
1915
- }, Ji = {
1917
+ }, Qi = {
1916
1918
  display: "flex",
1917
1919
  flexDirection: "column",
1918
1920
  alignItems: "center",
@@ -1924,7 +1926,7 @@ const zi = {
1924
1926
  fontSize: "13px",
1925
1927
  height: "24px",
1926
1928
  width: "24px"
1927
- }, ps = {
1929
+ }, gs = {
1928
1930
  borderRadius: "0.375rem",
1929
1931
  border: "1px solid rgba(0, 0, 0, 0.06)",
1930
1932
  background: "#F5F7FF",
@@ -1934,12 +1936,12 @@ const zi = {
1934
1936
  padding: "0.625rem 0.9375rem",
1935
1937
  gap: "0.5rem",
1936
1938
  alignSelf: "stretch"
1937
- }, gs = {
1939
+ }, ms = {
1938
1940
  fontWeight: "bold"
1939
- }, Yi = {
1941
+ }, Zi = {
1940
1942
  fontSize: "13px",
1941
1943
  lineHeight: "auto"
1942
- }, cn = {
1944
+ }, dn = {
1943
1945
  marginRight: "0.5rem",
1944
1946
  cursor: "pointer",
1945
1947
  color: "#394EFF",
@@ -1949,8 +1951,8 @@ const zi = {
1949
1951
  fontStyle: "normal",
1950
1952
  fontWeight: "500",
1951
1953
  lineHeight: "auto"
1952
- }, Qi = {
1953
- ...cn,
1954
+ }, er = {
1955
+ ...dn,
1954
1956
  display: "flex",
1955
1957
  padding: "0.25rem 0.9375rem",
1956
1958
  justifyContent: "center",
@@ -1958,24 +1960,24 @@ const zi = {
1958
1960
  gap: "0.5rem",
1959
1961
  borderRadius: "0.25rem",
1960
1962
  border: "1px solid #394EFF"
1961
- }, Zi = {
1963
+ }, tr = {
1962
1964
  display: "flex",
1963
1965
  justifyContent: "space-between",
1964
1966
  alignItems: "center",
1965
1967
  width: "100%",
1966
1968
  boxSizing: "border-box"
1967
- }, er = {
1969
+ }, sr = {
1968
1970
  border: "4px solid rgba(255, 255, 255, 0.4)",
1969
1971
  width: "16px",
1970
1972
  height: "16px",
1971
1973
  borderRadius: "50%",
1972
1974
  borderLeftColor: "#fff",
1973
1975
  animation: "spin 0.5s linear infinite"
1974
- }, ms = {
1976
+ }, bs = {
1975
1977
  Standard: { width: 1280, height: 720 },
1976
1978
  High: { width: 1920, height: 1080 }
1977
1979
  };
1978
- class tr {
1980
+ class nr {
1979
1981
  constructor(e) {
1980
1982
  this.app = e, this.mediaRecorder = null, this.recordedChunks = [], this.stream = null, this.recStartTs = null;
1981
1983
  }
@@ -2034,7 +2036,7 @@ class tr {
2034
2036
  (e = this.mediaRecorder) == null || e.stop(), (s = this.stream) == null || s.getTracks().forEach((n) => n.stop());
2035
2037
  }
2036
2038
  }
2037
- function sr(t, e) {
2039
+ function ir(t, e) {
2038
2040
  e.onmousedown = function(s) {
2039
2041
  const n = t.getBoundingClientRect(), i = s.clientX - n.left, r = s.clientY - n.top;
2040
2042
  t.style.position = "fixed", t.style.zIndex = 99999999999999, o(s.pageX, s.pageY);
@@ -2054,7 +2056,7 @@ function sr(t, e) {
2054
2056
  return !1;
2055
2057
  };
2056
2058
  }
2057
- function nr() {
2059
+ function rr() {
2058
2060
  const t = document.createElement("div");
2059
2061
  t.className = "grid";
2060
2062
  for (let e = 0; e < 16; e++) {
@@ -2074,7 +2076,7 @@ function nr() {
2074
2076
  cursor: "grab"
2075
2077
  }), t;
2076
2078
  }
2077
- function ir() {
2079
+ function or() {
2078
2080
  const t = document.createElement("div");
2079
2081
  Object.assign(t.style, {
2080
2082
  width: "0",
@@ -2095,24 +2097,24 @@ function ir() {
2095
2097
  transform: "rotate(180deg)"
2096
2098
  }), e;
2097
2099
  }
2098
- function rr() {
2100
+ function ar() {
2099
2101
  const t = document.createElement("style");
2100
2102
  t.type = "text/css", t.innerText = `@keyframes spin {
2101
2103
  0% { transform: rotate(0deg); }
2102
2104
  100% { transform: rotate(360deg); }
2103
2105
  }`, document.head.appendChild(t);
2104
2106
  }
2105
- function or() {
2106
- rr();
2107
+ function cr() {
2108
+ ar();
2107
2109
  const t = document.createElement("div");
2108
- return t.classList.add("spinner"), Object.assign(t.style, er), t;
2110
+ return t.classList.add("spinner"), Object.assign(t.style, sr), t;
2109
2111
  }
2110
2112
  function C(t, e, s, n, i) {
2111
2113
  const r = document.createElement(t);
2112
2114
  return r.className = e, Object.assign(r.style, s), n && (r.textContent = n), i && (r.id = i), r;
2113
2115
  }
2114
- const Ae = "or_uxt_test_start", It = "or_uxt_task_index", xt = "or_uxt_session_id", ar = "or_uxt_test_id";
2115
- class cr {
2116
+ const Ae = "or_uxt_test_start", It = "or_uxt_task_index", xt = "or_uxt_session_id", lr = "or_uxt_test_id";
2117
+ class hr {
2116
2118
  constructor(e, s, n, i, r, o, l, a, h) {
2117
2119
  this.ingestPoint = e, this.getTimestamp = s, this.token = n, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = a, this.getSessionId = h, this.durations = {
2118
2120
  testStart: 0,
@@ -2164,9 +2166,9 @@ class cr {
2164
2166
  c && (this.durations.testStart = parseInt(c, 10));
2165
2167
  }
2166
2168
  }
2167
- class lr {
2169
+ class ur {
2168
2170
  constructor(e, s) {
2169
- this.app = e, this.storageKey = s, this.bg = C("div", "bg", zi, void 0, "__or_ut_bg"), this.container = C("div", "container", Wi, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, a) => {
2171
+ this.app = e, this.storageKey = s, this.bg = C("div", "bg", qi, void 0, "__or_ut_bg"), this.container = C("div", "container", $i, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, a) => {
2170
2172
  this.testId = o;
2171
2173
  const h = this.app.options.ingestPoint;
2172
2174
  return fetch(`${h}/v1/web/uxt/test/${o}`, {
@@ -2174,14 +2176,14 @@ class lr {
2174
2176
  Authorization: `Bearer ${l}`
2175
2177
  }
2176
2178
  }).then((c) => c.json()).then(({ test: c }) => {
2177
- this.isActive = !0, this.test = c, this.signalManager = new cr(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, d) => this.app.localStorage.setItem(u, d), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, ms.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
2179
+ this.isActive = !0, this.test = c, this.signalManager = new hr(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, d) => this.app.localStorage.setItem(u, d), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, bs.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
2178
2180
  }).then(() => o).catch((c) => {
2179
2181
  console.log("OR: Error fetching test", c);
2180
2182
  });
2181
2183
  }, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
2182
- }, this.currentTaskIndex = 0, this.userRecorder = new tr(e);
2184
+ }, this.currentTaskIndex = 0, this.userRecorder = new nr(e);
2183
2185
  const n = this.app.getSessionID(), i = this.app.localStorage.getItem(xt);
2184
- n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(xt), this.app.localStorage.removeItem(ar), this.app.localStorage.removeItem(It), this.app.localStorage.removeItem(Ae));
2186
+ n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(xt), this.app.localStorage.removeItem(lr), this.app.localStorage.removeItem(It), this.app.localStorage.removeItem(Ae));
2185
2187
  const r = this.app.localStorage.getItem(It);
2186
2188
  r && (this.currentTaskIndex = parseInt(r, 10));
2187
2189
  }
@@ -2189,11 +2191,11 @@ class lr {
2189
2191
  return this.testId;
2190
2192
  }
2191
2193
  createGreeting(e, s, n) {
2192
- const i = C("div", "title", qi, e), r = C("div", "description", $i, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
2194
+ const i = C("div", "title", Vi, e), r = C("div", "description", Xi, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
2193
2195
 
2194
2196
  📹 We're recording this browser tab to learn from your experience.
2195
- 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = C("div", "button", Vi, "Read guidelines to begin");
2196
- this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, ms.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
2197
+ 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = C("div", "button", Gi, "Read guidelines to begin");
2198
+ this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, bs.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
2197
2199
  var a, h, c, u;
2198
2200
  this.removeGreeting();
2199
2201
  const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
@@ -2216,7 +2218,7 @@ class lr {
2216
2218
  });
2217
2219
  const i = this.createTitleSection();
2218
2220
  this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, Ee);
2219
- const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = C("div", "stop_bn_or", ds, "Abort Session"), a = C("div", "stop_ct_or", { fontSize: "13px!important" });
2221
+ const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = C("div", "stop_bn_or", fs, "Abort Session"), a = C("div", "stop_ct_or", { fontSize: "13px!important" });
2220
2222
  a.style.fontSize = "13px", a.append(l), this.container.append(i, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
2221
2223
  var h;
2222
2224
  this.userRecorder.discard(), (h = this.signalManager) == null || h.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
@@ -2224,7 +2226,7 @@ class lr {
2224
2226
  }
2225
2227
  createTitleSection() {
2226
2228
  var l;
2227
- const e = C("div", "title", Xi), s = nr(), n = C("div", "title_text", {
2229
+ const e = C("div", "title", Ki), s = rr(), n = C("div", "title_text", {
2228
2230
  maxWidth: "19rem",
2229
2231
  overflow: "hidden",
2230
2232
  textOverflow: "ellipsis",
@@ -2232,21 +2234,21 @@ class lr {
2232
2234
  fontSize: 16,
2233
2235
  lineHeight: "auto",
2234
2236
  cursor: "pointer"
2235
- }, (l = this.test) == null ? void 0 : l.title), i = ir();
2237
+ }, (l = this.test) == null ? void 0 : l.title), i = or();
2236
2238
  e.append(s, n, i);
2237
- const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? Ee : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? ge : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? ge : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? ge : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? ds : { display: "none" }), a), o = () => {
2239
+ const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? Ee : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? ge : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? ge : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? ge : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? fs : { display: "none" }), a), o = () => {
2238
2240
  Object.assign(i.style, {
2239
2241
  transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
2240
2242
  }), r(!this.widgetVisible);
2241
2243
  };
2242
- return n.onclick = o, i.onclick = o, sr(this.bg, s), this.collapseWidget = () => r(!1), e;
2244
+ return n.onclick = o, i.onclick = o, ir(this.bg, s), this.collapseWidget = () => r(!1), e;
2243
2245
  }
2244
2246
  createDescriptionSection(e) {
2245
- const s = C("div", "description_section_or", ge), n = C("div", "description_s_title_or", ls), i = C("div", "title", {
2247
+ const s = C("div", "description_section_or", ge), n = C("div", "description_s_title_or", hs), i = C("div", "title", {
2246
2248
  fontSize: 13,
2247
2249
  fontWeight: 500,
2248
2250
  lineHeight: "auto"
2249
- }, "Introduction & Guidelines"), r = C("div", "icon", hs, "-"), o = C("div", "content", ue), l = C("div", "text_description", {
2251
+ }, "Introduction & Guidelines"), r = C("div", "icon", us, "-"), o = C("div", "content", ue), l = C("div", "text_description", {
2250
2252
  maxHeight: "250px",
2251
2253
  overflowY: "auto",
2252
2254
  whiteSpace: "pre-wrap",
@@ -2255,7 +2257,7 @@ class lr {
2255
2257
  lineHeight: "auto"
2256
2258
  });
2257
2259
  l.innerHTML = e;
2258
- const a = C("div", "button_begin_or", us, "Begin Test");
2260
+ const a = C("div", "button_begin_or", ds, "Begin Test");
2259
2261
  n.append(i, r), o.append(l, a), s.append(n, o);
2260
2262
  const h = () => {
2261
2263
  this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? ue : { display: "none" });
@@ -2276,24 +2278,24 @@ class lr {
2276
2278
  }
2277
2279
  createTasksSection(e) {
2278
2280
  this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, Ee);
2279
- const s = C("div", "task_section_or", ge), n = C("div", "description_t_title_or", ls), i = C("div", "title", {
2281
+ const s = C("div", "task_section_or", ge), n = C("div", "description_t_title_or", hs), i = C("div", "title", {
2280
2282
  fontSize: "13px",
2281
2283
  fontWeight: "500",
2282
2284
  lineHeight: "auto"
2283
- }, "Tasks"), r = C("div", "icon", hs, "-"), o = C("div", "content", ue), l = C("div", "pagination", Ki), a = C("div", "taskCard", ps), h = C("div", "taskText", gs), c = C("div", "taskDescription", Yi), u = C("div", "taskButtons", Zi), d = C("div", "taskText", gs);
2285
+ }, "Tasks"), r = C("div", "icon", us, "-"), o = C("div", "content", ue), l = C("div", "pagination", Yi), a = C("div", "taskCard", gs), h = C("div", "taskText", ms), c = C("div", "taskDescription", Zi), u = C("div", "taskButtons", tr), d = C("div", "taskText", ms);
2284
2286
  d.textContent = "Your answer";
2285
2287
  const f = C("textarea", "taskDescription", {
2286
2288
  resize: "vertical"
2287
- }), g = C("div", "inputArea", ps);
2289
+ }), g = C("div", "inputArea", gs);
2288
2290
  g.append(d, f);
2289
- const p = C("div", "closePanelButton", cn, "Collapse Panel"), y = C("div", "nextButton", Qi, "Done, Next");
2291
+ const p = C("div", "closePanelButton", dn, "Collapse Panel"), y = C("div", "nextButton", er, "Done, Next");
2290
2292
  n.append(i, r), a.append(h, c), u.append(p, y), o.append(l, a, g, u), s.append(n, o);
2291
2293
  const E = () => {
2292
2294
  const m = e[this.currentTaskIndex];
2293
2295
  h.textContent = m.title, c.textContent = m.description, m.allow_typing ? g.style.display = "flex" : g.style.display = "none";
2294
2296
  };
2295
- e.forEach((m, v) => {
2296
- const k = C("span", `or_task_${v}`, {
2297
+ e.forEach((m, w) => {
2298
+ const k = C("span", `or_task_${w}`, {
2297
2299
  outline: "1px solid #efefef",
2298
2300
  fontSize: "13px",
2299
2301
  height: "24px",
@@ -2303,8 +2305,8 @@ class lr {
2303
2305
  alignItems: "center",
2304
2306
  justifyContent: "center",
2305
2307
  borderRadius: "6.25em"
2306
- }, (v + 1).toString());
2307
- k.id = `or_task_${v}`, l.append(k);
2308
+ }, (w + 1).toString());
2309
+ k.id = `or_task_${w}`, l.append(k);
2308
2310
  });
2309
2311
  const N = () => {
2310
2312
  this.widgetTasksVisible = !this.widgetTasksVisible, r.textContent = this.widgetTasksVisible ? "-" : "+", Object.assign(o.style, this.widgetTasksVisible ? ue : { display: "none" });
@@ -2314,16 +2316,16 @@ class lr {
2314
2316
  }), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, ue), this.widgetTasksVisible = !0, !0);
2315
2317
  const T = () => {
2316
2318
  const m = document.getElementById(`or_task_${this.currentTaskIndex}`);
2317
- m && Object.assign(m.style, fs);
2318
- for (let v = 0; v < this.currentTaskIndex; v++) {
2319
- const k = document.getElementById(`or_task_${v}`);
2320
- k && Object.assign(k.style, Ji);
2319
+ m && Object.assign(m.style, ps);
2320
+ for (let w = 0; w < this.currentTaskIndex; w++) {
2321
+ const k = document.getElementById(`or_task_${w}`);
2322
+ k && Object.assign(k.style, Qi);
2321
2323
  }
2322
2324
  };
2323
2325
  return n.onclick = N, p.onclick = this.collapseWidget, y.onclick = () => {
2324
- var v, k, x, S;
2326
+ var w, k, x, S;
2325
2327
  const m = e[this.currentTaskIndex].allow_typing ? f.value : void 0;
2326
- if (f.value = "", (v = this.signalManager) == null || v.signalTask(e[this.currentTaskIndex].task_id, "done", m), this.currentTaskIndex < e.length - 1) {
2328
+ if (f.value = "", (w = this.signalManager) == null || w.signalTask(e[this.currentTaskIndex].task_id, "done", m), this.currentTaskIndex < e.length - 1) {
2327
2329
  this.currentTaskIndex++, E();
2328
2330
  const b = (k = this.signalManager) == null ? void 0 : k.getDurations();
2329
2331
  b && b.tasks.findIndex((_) => _.taskId === e[this.currentTaskIndex].task_id) === -1 && (b.tasks.push({
@@ -2335,19 +2337,19 @@ class lr {
2335
2337
  this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
2336
2338
  }, setTimeout(() => {
2337
2339
  const m = document.getElementById("or_task_0");
2338
- m && Object.assign(m.style, fs), E(), T();
2340
+ m && Object.assign(m.style, ps), E(), T();
2339
2341
  }, 1), s;
2340
2342
  }
2341
2343
  showEndSection() {
2342
2344
  var l, a, h, c;
2343
2345
  let e = !0;
2344
2346
  (l = this.signalManager) == null || l.signalTest("done");
2345
- const s = C("div", "end_section_or", Gi), n = C("div", "end_title_or", {
2347
+ const s = C("div", "end_section_or", Ji), n = C("div", "end_title_or", {
2346
2348
  fontSize: "1.25rem",
2347
2349
  fontWeight: "500"
2348
2350
  }, "Thank you! 👍"), i = C("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
2349
2351
 
2350
- We appreciate your time and valuable input.`), r = C("div", "end_button_or", us, "Submitting Feedback"), o = or();
2352
+ We appreciate your time and valuable input.`), r = C("div", "end_button_or", ds, "Submitting Feedback"), o = cr();
2351
2353
  r.appendChild(o), (h = this.test) != null && h.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
2352
2354
  r.removeChild(o), r.textContent = "End Session", e = !1;
2353
2355
  }).catch((u) => {
@@ -2357,7 +2359,7 @@ We appreciate your time and valuable input.`), r = C("div", "end_button_or", us,
2357
2359
  }, s.append(n, i, r), this.endSection = s, this.container.append(s);
2358
2360
  }
2359
2361
  }
2360
- function ln(t) {
2362
+ function fn(t) {
2361
2363
  return !!t && t.nodeType != null;
2362
2364
  }
2363
2365
  function Et(t) {
@@ -2366,22 +2368,22 @@ function Et(t) {
2366
2368
  function ee(t) {
2367
2369
  return t.nodeType === Node.ELEMENT_NODE;
2368
2370
  }
2369
- function hr(t) {
2371
+ function dr(t) {
2370
2372
  return t.nodeType === Node.COMMENT_NODE;
2371
2373
  }
2372
2374
  function Ct(t) {
2373
2375
  return t.nodeType === Node.TEXT_NODE;
2374
2376
  }
2375
- function We(t) {
2377
+ function qe(t) {
2376
2378
  return t.nodeType === Node.DOCUMENT_NODE;
2377
2379
  }
2378
- function Je(t) {
2380
+ function Ye(t) {
2379
2381
  return t.nodeType === Node.DOCUMENT_NODE || t.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
2380
2382
  }
2381
2383
  function B(t, e) {
2382
2384
  return t.localName === e;
2383
2385
  }
2384
- class ur {
2386
+ class fr {
2385
2387
  constructor(e, s) {
2386
2388
  this.app = e, this.options = s, this.snapshots = {}, this.intervals = [], this.restartTracking = () => {
2387
2389
  this.clear(), this.app.nodes.scanTree(this.captureCanvas);
@@ -2402,10 +2404,10 @@ class ur {
2402
2404
  paused: !1,
2403
2405
  dummy: document.createElement("canvas")
2404
2406
  };
2405
- const o = Fi(i.toString(), r);
2407
+ const o = Ui(i.toString(), r);
2406
2408
  this.app.send(o);
2407
2409
  const l = (h) => {
2408
- dr(h, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
2410
+ pr(h, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
2409
2411
  c && (this.snapshots[i].images.push({ id: this.app.timestamp(), data: c }), this.snapshots[i].images.length > 9 && (this.sendSnaps(this.snapshots[i].images, i, this.snapshots[i].createdAt), this.snapshots[i].images = []));
2410
2412
  });
2411
2413
  }, a = setInterval(() => {
@@ -2430,7 +2432,7 @@ class ur {
2430
2432
  const i = new FormData();
2431
2433
  e.forEach((r) => {
2432
2434
  const o = r.data;
2433
- o && (i.append("snapshot", o, `${n}_${s}_${r.id}.${this.fileExt}`), this.options.isDebug && fr(o, `${n}_${s}_${r.id}.${this.fileExt}`));
2435
+ o && (i.append("snapshot", o, `${n}_${s}_${r.id}.${this.fileExt}`), this.options.isDebug && gr(o, `${n}_${s}_${r.id}.${this.fileExt}`));
2434
2436
  }), fetch(this.app.options.ingestPoint + "/v1/web/images", {
2435
2437
  method: "POST",
2436
2438
  headers: {
@@ -2445,12 +2447,12 @@ class ur {
2445
2447
  this.intervals.forEach((e) => clearInterval(e)), this.snapshots = {};
2446
2448
  }
2447
2449
  }
2448
- const bs = {
2450
+ const ys = {
2449
2451
  low: 0.35,
2450
2452
  medium: 0.55,
2451
2453
  high: 0.8
2452
2454
  };
2453
- function dr(t, e = "medium", s, n = !1, i, r) {
2455
+ function pr(t, e = "medium", s, n = !1, i, r) {
2454
2456
  const o = `image/${i}`;
2455
2457
  if (n) {
2456
2458
  const l = window.devicePixelRatio || 1;
@@ -2458,11 +2460,11 @@ function dr(t, e = "medium", s, n = !1, i, r) {
2458
2460
  const a = s.getContext("2d");
2459
2461
  if (!a)
2460
2462
  return "";
2461
- a.clearRect(0, 0, s.width, s.height), a.drawImage(t, 0, 0, s.width, s.height), s.toBlob(r, o, bs[e]);
2463
+ a.clearRect(0, 0, s.width, s.height), a.drawImage(t, 0, 0, s.width, s.height), s.toBlob(r, o, ys[e]);
2462
2464
  } else
2463
- t.toBlob(r, o, bs[e]);
2465
+ t.toBlob(r, o, ys[e]);
2464
2466
  }
2465
- function fr(t, e) {
2467
+ function gr(t, e) {
2466
2468
  const s = URL.createObjectURL(t), n = document.createElement("a");
2467
2469
  n.href = s, n.download = e, n.style.display = "none", document.body.appendChild(n), n.click(), document.body.removeChild(n);
2468
2470
  }
@@ -2473,7 +2475,7 @@ const ke = {
2473
2475
  Errors: 2,
2474
2476
  Silent: 0
2475
2477
  };
2476
- class pr {
2478
+ class mr {
2477
2479
  constructor(e = ke.Silent) {
2478
2480
  this.shouldLog = (s) => this.level >= s, this.log = (...s) => {
2479
2481
  this.shouldLog(ke.Log) && console.log(...s);
@@ -2484,7 +2486,7 @@ class pr {
2484
2486
  }, this.level = e;
2485
2487
  }
2486
2488
  }
2487
- class gr {
2489
+ class br {
2488
2490
  constructor(e) {
2489
2491
  this.node_id = e, this.nodes = [], this.totalNodeAmount = 0, this.nodeCallbacks = [], this.elementListeners = /* @__PURE__ */ new Map(), this.nextNodeId = 0, this.scanTree = (s) => {
2490
2492
  this.nodes.forEach((n) => s(n));
@@ -2504,7 +2506,7 @@ class gr {
2504
2506
  const r = this.getID(e);
2505
2507
  if (r === void 0)
2506
2508
  return;
2507
- sn(e, s, n, i);
2509
+ an(e, s, n, i);
2508
2510
  let o = this.elementListeners.get(r);
2509
2511
  o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([s, n, i]);
2510
2512
  }
@@ -2518,7 +2520,7 @@ class gr {
2518
2520
  if (s !== void 0) {
2519
2521
  e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[s];
2520
2522
  const n = this.elementListeners.get(s);
2521
- n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => nn(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
2523
+ n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => cn(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
2522
2524
  }
2523
2525
  return s;
2524
2526
  }
@@ -2550,7 +2552,7 @@ class gr {
2550
2552
  }
2551
2553
  }
2552
2554
  function Nt(t) {
2553
- if (hr(t))
2555
+ if (dr(t))
2554
2556
  return !0;
2555
2557
  if (Ct(t))
2556
2558
  return !1;
@@ -2563,30 +2565,30 @@ function Nt(t) {
2563
2565
  }
2564
2566
  return e === "SCRIPT" || e === "NOSCRIPT" || e === "META" || e === "TITLE" || e === "BASE";
2565
2567
  }
2566
- function ot(t) {
2567
- return Je(t) ? !0 : !Nt(t);
2568
+ function at(t) {
2569
+ return Ye(t) ? !0 : !Nt(t);
2568
2570
  }
2569
- var J;
2571
+ var Y;
2570
2572
  (function(t) {
2571
2573
  t[t.New = 0] = "New", t[t.Removed = 1] = "Removed", t[t.Changed = 2] = "Changed";
2572
- })(J || (J = {}));
2574
+ })(Y || (Y = {}));
2573
2575
  class Ut {
2574
2576
  constructor(e, s = !1) {
2575
- this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = tn(this.app.safe((n) => {
2577
+ this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = on(this.app.safe((n) => {
2576
2578
  for (const i of n) {
2577
2579
  const r = i.target, o = i.type;
2578
- if (!ot(r))
2580
+ if (!at(r))
2579
2581
  continue;
2580
2582
  if (o === "childList") {
2581
2583
  for (let a = 0; a < i.removedNodes.length; a++)
2582
- ot(i.removedNodes[a]) && this.bindNode(i.removedNodes[a]);
2584
+ at(i.removedNodes[a]) && this.bindNode(i.removedNodes[a]);
2583
2585
  for (let a = 0; a < i.addedNodes.length; a++)
2584
2586
  this.bindTree(i.addedNodes[a]);
2585
2587
  continue;
2586
2588
  }
2587
2589
  const l = this.app.nodes.getID(r);
2588
2590
  if (l !== void 0) {
2589
- if (this.recents.has(l) || this.recents.set(l, J.Changed), o === "attributes") {
2591
+ if (this.recents.has(l) || this.recents.set(l, Y.Changed), o === "attributes") {
2590
2592
  const a = i.attributeName;
2591
2593
  if (a === null)
2592
2594
  continue;
@@ -2608,12 +2610,12 @@ class Ut {
2608
2610
  }
2609
2611
  sendNodeAttribute(e, s, n, i) {
2610
2612
  if (Et(s)) {
2611
- n.substr(0, 6) === "xlink:" && (n = n.substr(6)), i === null ? this.app.send(ts(e, n)) : n === "href" ? (i.length > 1e5 && (i = ""), this.app.send(St(e, n, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, n, i);
2613
+ n.substr(0, 6) === "xlink:" && (n = n.substr(6)), i === null ? this.app.send(ss(e, n)) : n === "href" ? (i.length > 1e5 && (i = ""), this.app.send(St(e, n, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, n, i);
2612
2614
  return;
2613
2615
  }
2614
2616
  if (!(n === "src" || n === "srcset" || n === "integrity" || n === "crossorigin" || n === "autocomplete" || n.substr(0, 2) === "on") && !(n === "value" && B(s, "input") && s.type !== "button" && s.type !== "reset" && s.type !== "submit")) {
2615
2617
  if (i === null) {
2616
- this.app.send(ts(e, n));
2618
+ this.app.send(ss(e, n));
2617
2619
  return;
2618
2620
  }
2619
2621
  if (n === "style" || n === "href" && B(s, "link")) {
@@ -2625,17 +2627,17 @@ class Ut {
2625
2627
  }
2626
2628
  sendNodeData(e, s, n) {
2627
2629
  if (B(s, "style")) {
2628
- this.app.send(Ni(e, n, this.app.getBaseHref()));
2630
+ this.app.send(Oi(e, n, this.app.getBaseHref()));
2629
2631
  return;
2630
2632
  }
2631
- n = this.app.sanitizer.sanitize(e, n), this.app.send(pi(e, n));
2633
+ n = this.app.sanitizer.sanitize(e, n), this.app.send(mi(e, n));
2632
2634
  }
2633
2635
  bindNode(e) {
2634
2636
  const [s, n] = this.app.nodes.registerNode(e);
2635
- n ? this.recents.set(s, J.New) : this.recents.get(s) !== J.New && this.recents.set(s, J.Removed);
2637
+ n ? this.recents.set(s, Y.New) : this.recents.get(s) !== Y.New && this.recents.set(s, Y.Removed);
2636
2638
  }
2637
2639
  bindTree(e) {
2638
- if (!ot(e))
2640
+ if (!at(e))
2639
2641
  return;
2640
2642
  this.bindNode(e);
2641
2643
  const s = document.createTreeWalker(
@@ -2652,8 +2654,8 @@ class Ut {
2652
2654
  }
2653
2655
  unbindTree(e) {
2654
2656
  const s = this.app.nodes.unregisterNode(e);
2655
- if (s !== void 0 && this.recents.get(s) === J.Removed) {
2656
- this.app.send(fi(s));
2657
+ if (s !== void 0 && this.recents.get(s) === Y.Removed) {
2658
+ this.app.send(gi(s));
2657
2659
  const n = document.createTreeWalker(
2658
2660
  e,
2659
2661
  NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_TEXT,
@@ -2668,12 +2670,12 @@ class Ut {
2668
2670
  for (; n.nextNode(); )
2669
2671
  i += 1, this.app.nodes.unregisterNode(n.currentNode);
2670
2672
  const o = Math.floor(i / r * 100);
2671
- o > 30 && this.app.send(Pi(o));
2673
+ o > 30 && this.app.send(Bi(o));
2672
2674
  }
2673
2675
  }
2674
2676
  // A top-consumption function on the infinite lists test. (~1% of performance resources)
2675
2677
  _commitNode(e, s) {
2676
- if (Je(s))
2678
+ if (Ye(s))
2677
2679
  return !0;
2678
2680
  const n = s.parentNode;
2679
2681
  let i;
@@ -2697,7 +2699,7 @@ class Ut {
2697
2699
  r = r.previousSibling;
2698
2700
  }
2699
2701
  r === null && (this.indexes[e] = 0);
2700
- const o = this.recents.get(e), l = o === J.New, a = this.indexes[e];
2702
+ const o = this.recents.get(e), l = o === Y.New, a = this.indexes[e];
2701
2703
  if (a === void 0)
2702
2704
  throw "commitNode: missing node index";
2703
2705
  if (l) {
@@ -2708,17 +2710,17 @@ class Ut {
2708
2710
  const u = c.clientWidth, d = c.clientHeight;
2709
2711
  c = s.cloneNode(), c.style.width = `${u}px`, c.style.height = `${d}px`;
2710
2712
  }
2711
- this.app.send(hi(e, i, a, c.tagName, Et(s)));
2713
+ this.app.send(di(e, i, a, c.tagName, Et(s)));
2712
2714
  }
2713
2715
  for (let u = 0; u < c.attributes.length; u++) {
2714
2716
  const d = c.attributes[u];
2715
2717
  this.sendNodeAttribute(e, c, d.nodeName, d.value);
2716
2718
  }
2717
2719
  } else
2718
- Ct(s) && (this.app.send(ui(e, i, a)), this.sendNodeData(e, n, s.data));
2720
+ Ct(s) && (this.app.send(fi(e, i, a)), this.sendNodeData(e, n, s.data));
2719
2721
  return !0;
2720
2722
  }
2721
- o === J.Removed && i !== void 0 && this.app.send(di(e, i, a));
2723
+ o === Y.Removed && i !== void 0 && this.app.send(pi(e, i, a));
2722
2724
  const h = this.attributesMap.get(e);
2723
2725
  if (h !== void 0) {
2724
2726
  if (!ee(s))
@@ -2743,7 +2745,7 @@ class Ut {
2743
2745
  commitNodes(e = !1) {
2744
2746
  let s;
2745
2747
  this.recents.forEach((n, i) => {
2746
- this.commitNode(i), n === J.New && (s = this.app.nodes.getNode(i)) && this.app.nodes.callNodeCallbacks(s, e);
2748
+ this.commitNode(i), n === Y.New && (s = this.app.nodes.getNode(i)) && this.app.nodes.callNodeCallbacks(s, e);
2747
2749
  }), this.clear();
2748
2750
  }
2749
2751
  // ISSSUE (nodeToBinde should be the same as node in all cases. Look at the comment about 0-node at the beginning of the file.)
@@ -2762,7 +2764,7 @@ class Ut {
2762
2764
  this.observer.disconnect(), this.clear();
2763
2765
  }
2764
2766
  }
2765
- class ys extends Ut {
2767
+ class Ss extends Ut {
2766
2768
  observe(e) {
2767
2769
  const s = e.contentDocument, n = this.app.nodes.getID(e);
2768
2770
  !s || n === void 0 || this.observeRoot(s, (i) => {
@@ -2770,7 +2772,7 @@ class ys extends Ut {
2770
2772
  this.app.debug.log("OpenReplay: Iframe document not bound");
2771
2773
  return;
2772
2774
  }
2773
- this.app.send(vt(n, i));
2775
+ this.app.send(wt(n, i));
2774
2776
  });
2775
2777
  }
2776
2778
  syntheticObserve(e, s) {
@@ -2779,11 +2781,11 @@ class ys extends Ut {
2779
2781
  this.app.debug.log("OpenReplay: Iframe document not bound");
2780
2782
  return;
2781
2783
  }
2782
- this.app.send(vt(e, n));
2784
+ this.app.send(wt(e, n));
2783
2785
  });
2784
2786
  }
2785
2787
  }
2786
- class mr extends Ut {
2788
+ class yr extends Ut {
2787
2789
  observe(e) {
2788
2790
  const s = e.shadowRoot, n = this.app.nodes.getID(e);
2789
2791
  !s || n === void 0 || this.observeRoot(s, (i) => {
@@ -2791,11 +2793,11 @@ class mr extends Ut {
2791
2793
  this.app.debug.error("OpenReplay: Shadow Root was not bound");
2792
2794
  return;
2793
2795
  }
2794
- this.app.send(vt(n, i));
2796
+ this.app.send(wt(n, i));
2795
2797
  });
2796
2798
  }
2797
2799
  }
2798
- class br {
2800
+ class Sr {
2799
2801
  constructor() {
2800
2802
  this.states = /* @__PURE__ */ new Map();
2801
2803
  }
@@ -2834,10 +2836,10 @@ class br {
2834
2836
  this.states.forEach((e) => e.clear()), this.states.clear();
2835
2837
  }
2836
2838
  }
2837
- const at = Z ? Element.prototype.attachShadow : () => new ShadowRoot();
2838
- class yr extends Ut {
2839
+ const ct = Z ? Element.prototype.attachShadow : () => new ShadowRoot();
2840
+ class wr extends Ut {
2839
2841
  constructor(e, s) {
2840
- super(e, !0), this.iframeOffsets = new br(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
2842
+ super(e, !0), this.iframeOffsets = new Sr(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
2841
2843
  captureIFrames: !0
2842
2844
  }, s), this.app.nodes.attachNodeCallback((n) => {
2843
2845
  B(n, "iframe") && (this.options.captureIFrames && !ae(n, "obscured") || ae(n, "capture")) && this.handleIframe(n);
@@ -2854,11 +2856,11 @@ class yr extends Ut {
2854
2856
  handleIframe(e) {
2855
2857
  let s = null;
2856
2858
  const n = this.app.safe(() => setTimeout(() => {
2857
- if (this.app.nodes.getID(e) === void 0 || !ti(e))
2859
+ if (this.app.nodes.getID(e) === void 0 || !ni(e))
2858
2860
  return;
2859
2861
  const r = e.contentWindow, o = e.contentDocument;
2860
2862
  if (o && o !== s) {
2861
- const l = new ys(this.app);
2863
+ const l = new Ss(this.app);
2862
2864
  this.iframeObservers.push(l), l.observe(e), s = o, this.iframeOffsets.observe(e);
2863
2865
  }
2864
2866
  r && // Sometimes currentWin.window is null (not in specification). Such window object is not functional
@@ -2867,37 +2869,37 @@ class yr extends Ut {
2867
2869
  e.addEventListener("load", n), n();
2868
2870
  }
2869
2871
  handleShadowRoot(e) {
2870
- const s = new mr(this.app);
2872
+ const s = new yr(this.app);
2871
2873
  this.shadowRootObservers.push(s), s.observe(e.host);
2872
2874
  }
2873
2875
  observe() {
2874
2876
  const e = this;
2875
2877
  Element.prototype.attachShadow = function() {
2876
- const s = at.apply(this, arguments);
2878
+ const s = ct.apply(this, arguments);
2877
2879
  return e.handleShadowRoot(s), s;
2878
2880
  }, this.app.nodes.clear(), this.observeRoot(window.document, () => {
2879
- this.app.send(li()), this.app.nodes.callNodeCallbacks(document, !0);
2881
+ this.app.send(ui()), this.app.nodes.callNodeCallbacks(document, !0);
2880
2882
  }, window.document.documentElement);
2881
2883
  }
2882
2884
  crossdomainObserve(e, s) {
2883
2885
  const n = this;
2884
2886
  Element.prototype.attachShadow = function() {
2885
- const r = at.apply(this, arguments);
2887
+ const r = ct.apply(this, arguments);
2886
2888
  return n.handleShadowRoot(r), r;
2887
2889
  }, this.app.nodes.clear(), this.app.nodes.syntheticMode(s);
2888
- const i = new ys(this.app);
2890
+ const i = new Ss(this.app);
2889
2891
  this.iframeObservers.push(i), i.syntheticObserve(e, window.document);
2890
2892
  }
2891
2893
  disconnect() {
2892
- this.iframeOffsets.clear(), Element.prototype.attachShadow = at, this.iframeObservers.forEach((e) => e.disconnect()), this.iframeObservers = [], this.shadowRootObservers.forEach((e) => e.disconnect()), this.shadowRootObservers = [], super.disconnect();
2894
+ this.iframeOffsets.clear(), Element.prototype.attachShadow = ct, this.iframeObservers.forEach((e) => e.disconnect()), this.iframeObservers = [], this.shadowRootObservers.forEach((e) => e.disconnect()), this.shadowRootObservers = [], super.disconnect();
2893
2895
  }
2894
2896
  }
2895
- var qe;
2897
+ var $e;
2896
2898
  (function(t) {
2897
2899
  t[t.Plain = 0] = "Plain", t[t.Obscured = 1] = "Obscured", t[t.Hidden = 2] = "Hidden";
2898
- })(qe || (qe = {}));
2899
- const Sr = (t) => t.trim().replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, "█");
2900
- class vr {
2900
+ })($e || ($e = {}));
2901
+ const vr = (t) => t.trim().replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, "█");
2902
+ class kr {
2901
2903
  constructor(e, s) {
2902
2904
  this.app = e, this.obscured = /* @__PURE__ */ new Set(), this.hidden = /* @__PURE__ */ new Set(), this.options = Object.assign({
2903
2905
  obscureTextEmails: !0,
@@ -2907,13 +2909,13 @@ class vr {
2907
2909
  handleNode(e, s, n) {
2908
2910
  if ((this.obscured.has(s) || ee(n) && (ae(n, "masked") || ae(n, "obscured"))) && this.obscured.add(e), (this.hidden.has(s) || ee(n) && (ae(n, "htmlmasked") || ae(n, "hidden"))) && this.hidden.add(e), this.options.domSanitizer !== void 0 && ee(n)) {
2909
2911
  const i = this.options.domSanitizer(n);
2910
- i === qe.Obscured && this.obscured.add(e), i === qe.Hidden && this.hidden.add(e);
2912
+ i === $e.Obscured && this.obscured.add(e), i === $e.Hidden && this.hidden.add(e);
2911
2913
  }
2912
2914
  }
2913
2915
  sanitize(e, s) {
2914
- return this.obscured.has(e) ? Sr(s) : (this.options.obscureTextNumbers && (s = s.replace(/\d/g, "0")), this.options.obscureTextEmails && (s = s.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (n) => {
2916
+ return this.obscured.has(e) ? vr(s) : (this.options.obscureTextNumbers && (s = s.replace(/\d/g, "0")), this.options.obscureTextEmails && (s = s.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (n) => {
2915
2917
  const [i, r] = n.split("@"), [o, l] = r.split(".");
2916
- return `${nt(i)}@${nt(o)}.${nt(l)}`;
2918
+ return `${it(i)}@${it(o)}.${it(l)}`;
2917
2919
  })), s);
2918
2920
  }
2919
2921
  isObscured(e) {
@@ -2930,7 +2932,7 @@ class vr {
2930
2932
  this.obscured.clear(), this.hidden.clear();
2931
2933
  }
2932
2934
  }
2933
- class wr {
2935
+ class Tr {
2934
2936
  constructor(e, s) {
2935
2937
  this.app = e, this.options = s, this.metadata = {}, this.userID = null, this.callbacks = [], this.timestamp = 0, this.createTabId();
2936
2938
  }
@@ -2981,7 +2983,7 @@ class wr {
2981
2983
  return this.tabId || this.createTabId(), this.tabId;
2982
2984
  }
2983
2985
  regenerateTabId() {
2984
- const e = si(12);
2986
+ const e = ii(12);
2985
2987
  this.app.sessionStorage.setItem(this.options.session_tabid_key, e), this.tabId = e;
2986
2988
  }
2987
2989
  createTabId() {
@@ -3001,13 +3003,13 @@ class wr {
3001
3003
  this.app.sessionStorage.removeItem(this.options.session_token_key), this.metadata = {}, this.userID = null, this.sessionID = void 0, this.timestamp = 0;
3002
3004
  }
3003
3005
  }
3004
- function kr(t, e) {
3006
+ function Ir(t, e) {
3005
3007
  let s = 0;
3006
3008
  return () => {
3007
3009
  s++ >= e && (s = 0, t());
3008
3010
  };
3009
3011
  }
3010
- class Tr {
3012
+ class xr {
3011
3013
  constructor(e) {
3012
3014
  this.app = e, this.timer = null, this.callbacks = [];
3013
3015
  }
@@ -3018,7 +3020,7 @@ class Tr {
3018
3020
  * @param {object} thisArg - link to <this>
3019
3021
  * */
3020
3022
  attach(e, s = 0, n = !0, i) {
3021
- i && (e = e.bind(i)), n && (e = this.app.safe(e)), this.callbacks.unshift(s ? kr(e, s) : e) - 1;
3023
+ i && (e = e.bind(i)), n && (e = this.app.safe(e)), this.callbacks.unshift(s ? Ir(e, s) : e) - 1;
3022
3024
  }
3023
3025
  start() {
3024
3026
  this.timer === null && (this.timer = setInterval(() => this.callbacks.forEach((e) => {
@@ -3029,17 +3031,17 @@ class Tr {
3029
3031
  this.timer !== null && (clearInterval(this.timer), this.timer = null);
3030
3032
  }
3031
3033
  }
3032
- const we = "canceled", Ss = "or_uxt_active", ct = "or_buffer_1", se = (t) => ({ reason: t, success: !1 }), Ir = (t) => ({ ...t, success: !0 });
3034
+ const ve = "canceled", ws = "or_uxt_active", lt = "or_buffer_1", se = (t) => ({ reason: t, success: !1 }), Er = (t) => ({ ...t, success: !0 });
3033
3035
  var F;
3034
3036
  (function(t) {
3035
3037
  t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
3036
3038
  })(F || (F = {}));
3037
- const hn = "https://api.openreplay.com/ingest";
3038
- function lt() {
3039
+ const pn = "https://api.openreplay.com/ingest";
3040
+ function ht() {
3039
3041
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", s = Math.floor(Math.abs(t) / 60), n = Math.abs(t) % 60;
3040
3042
  return `UTC${e}${String(s).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
3041
3043
  }
3042
- const xr = (t) => new Promise((e) => setTimeout(e, t)), W = {
3044
+ const Cr = (t) => new Promise((e) => setTimeout(e, t)), W = {
3043
3045
  // ask if there are any tabs alive
3044
3046
  ask: "never-gonna-give-you-up",
3045
3047
  // response from another tab
@@ -3053,7 +3055,7 @@ const xr = (t) => new Promise((e) => setTimeout(e, t)), W = {
3053
3055
  // batch of messages from an iframe window
3054
3056
  iframeBatch: "never-gonna-tell-a-lie-and-hurt-you"
3055
3057
  };
3056
- class Er {
3058
+ class Nr {
3057
3059
  constructor(e, s, n, i, r) {
3058
3060
  this.signalError = i, this.insideIframe = r, this.messages = [], this.bufferedMessages1 = [], this.bufferedMessages2 = [], this.startCallbacks = [], this.stopCallbacks = [], this.commitCallbacks = [], this.activityState = F.NotActive, this.version = "14.0.4", this.socketMode = !1, this.compressionThreshold = 24 * 1e3, this.bc = null, this.canvasRecorder = null, this.conditionsManager = null, this.canStart = !1, this.rootId = null, this.pageFrames = [], this.frameOderNumber = 0, this.initialHostName = location.hostname, this.startTimeout = null, this.coldStartCommitN = 0, this.delay = 0, this.coldInterval = null, this.orderNumber = 0, this.coldStartTs = 0, this.singleBuffer = !1, this.onSessionSent = () => {
3059
3061
  }, this.restartCanvasTracking = () => {
@@ -3083,7 +3085,7 @@ class Er {
3083
3085
  session_reset_key: "__openreplay_reset",
3084
3086
  session_tabid_key: "__openreplay_tabid",
3085
3087
  local_uuid_key: "__openreplay_uuid",
3086
- ingestPoint: hn,
3088
+ ingestPoint: pn,
3087
3089
  resourceBaseHref: null,
3088
3090
  __is_snippet: !1,
3089
3091
  __debug_report_edp: null,
@@ -3109,14 +3111,14 @@ class Er {
3109
3111
  useAnimationFrame: !1
3110
3112
  }
3111
3113
  };
3112
- if (this.options = rn(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
3114
+ if (this.options = ln(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
3113
3115
  const a = location.hostname.split(".").slice(-2).join("_");
3114
3116
  this.bc = new BroadcastChannel(`rick_${a}`);
3115
3117
  }
3116
- this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new vr(this, n), this.nodes = new gr(this.options.node_id), this.observer = new yr(this, n), this.ticker = new Tr(this), this.ticker.attach(() => this.commit()), this.debug = new pr(this.options.__debug__), this.session = new wr(this, this.options), this.attributeSender = new Kn(this, !!this.options.disableStringDict), this.featureFlags = new Qn(this), this.tagWatcher = new ji(this.sessionStorage, this.debug.error, (a) => {
3117
- this.send(Bi(a));
3118
+ this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new kr(this, n), this.nodes = new br(this.options.node_id), this.observer = new wr(this, n), this.ticker = new xr(this), this.ticker.attach(() => this.commit()), this.debug = new mr(this.options.__debug__), this.session = new Tr(this, this.options), this.attributeSender = new Yn(this, !!this.options.disableStringDict), this.featureFlags = new ei(this), this.tagWatcher = new Wi(this.sessionStorage, this.debug.error, (a) => {
3119
+ this.send(Hi(a));
3118
3120
  }), this.session.attachUpdateCallback(({ userID: a, metadata: h }) => {
3119
- a != null && this.send(Ti(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(ss(c, u)));
3121
+ a != null && this.send(xi(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(ns(c, u)));
3120
3122
  }), s != null && this.session.applySessionHash(s), this.initWorker();
3121
3123
  const l = this.session.getTabId();
3122
3124
  if (this.insideIframe) {
@@ -3160,7 +3162,7 @@ class Er {
3160
3162
  }).catch(console.error), p = 10;
3161
3163
  break;
3162
3164
  }
3163
- p++, await xr(100);
3165
+ p++, await Cr(100);
3164
3166
  }
3165
3167
  })();
3166
3168
  }
@@ -3170,8 +3172,8 @@ class Er {
3170
3172
  let p = g;
3171
3173
  return this.pageFrames.forEach((y) => {
3172
3174
  if (y.dataset.domain === c.data.domain) {
3173
- const [E, N, T] = g, { left: m, top: v } = y.getBoundingClientRect();
3174
- p = [E, N + m, T + v];
3175
+ const [E, N, T] = g, { left: m, top: w } = y.getBoundingClientRect();
3176
+ p = [E, N + m, T + w];
3175
3177
  }
3176
3178
  }), p;
3177
3179
  }
@@ -3179,15 +3181,15 @@ class Er {
3179
3181
  let p = g;
3180
3182
  return this.pageFrames.forEach((y) => {
3181
3183
  if (y.dataset.domain === c.data.domain) {
3182
- const [E, N, T, m, v, k, x] = g, { left: S, top: b, width: _, height: M } = y.getBoundingClientRect(), O = document.documentElement.scrollWidth, D = document.documentElement.scrollHeight, w = k / 100 * _ + S, I = x / 100 * M + b, A = w / O, P = I / D;
3184
+ const [E, N, T, m, w, k, x] = g, { left: S, top: b, width: _, height: M } = y.getBoundingClientRect(), O = document.documentElement.scrollWidth, D = document.documentElement.scrollHeight, v = k / 100 * _ + S, I = x / 100 * M + b, A = v / O, L = I / D;
3183
3185
  p = [
3184
3186
  E,
3185
3187
  N,
3186
3188
  T,
3187
3189
  m,
3188
- v,
3190
+ w,
3189
3191
  Math.round(A * 1e3) / 10,
3190
- Math.round(P * 1e3) / 10
3192
+ Math.round(L * 1e3) / 10
3191
3193
  ];
3192
3194
  }
3193
3195
  }), p;
@@ -3265,7 +3267,7 @@ class Er {
3265
3267
  this.stop(!1), this.debug.error("worker_failed", e.reason), this._debug("worker_failed", e.reason);
3266
3268
  else if (e.type === "compress") {
3267
3269
  const n = e.batch;
3268
- n.byteLength > this.compressionThreshold ? Vn(e.batch, { mtime: 0 }, (r, o) => {
3270
+ n.byteLength > this.compressionThreshold ? Gn(e.batch, { mtime: 0 }, (r, o) => {
3269
3271
  var l, a;
3270
3272
  r ? (this.debug.error("Openreplay compression error:", r), (l = this.worker) == null || l.postMessage({ type: "uncompressed", batch: n })) : (a = this.worker) == null || a.postMessage({ type: "compressed", batch: o });
3271
3273
  }) : (s = this.worker) == null || s.postMessage({ type: "uncompressed", batch: n });
@@ -3306,7 +3308,7 @@ class Er {
3306
3308
  return;
3307
3309
  }
3308
3310
  try {
3309
- oi(() => {
3311
+ ci(() => {
3310
3312
  var e;
3311
3313
  this.messages.unshift(oe(this.session.getTabId())), this.messages.unshift(re(this.timestamp())), (e = this.worker) == null || e.postMessage(this.messages), this.commitCallbacks.forEach((s) => s(this.messages)), this.messages.length = 0;
3312
3314
  });
@@ -3334,7 +3336,7 @@ class Er {
3334
3336
  (s = this.worker) == null || s.postMessage(e), this.commitCallbacks.forEach((n) => n(e)), e.length = 0;
3335
3337
  }
3336
3338
  timestamp() {
3337
- return V() + this.delay;
3339
+ return X() + this.delay;
3338
3340
  }
3339
3341
  safe(e) {
3340
3342
  const s = this;
@@ -3358,7 +3360,7 @@ class Er {
3358
3360
  // Use app.nodes.attachNodeListener for registered nodes instead
3359
3361
  attachEventListener(e, s, n, i = !0, r = !0) {
3360
3362
  i && (n = this.safe(n));
3361
- const o = () => e ? sn(e, s, n, r) : null, l = () => e ? nn(e, s, n, r) : null;
3363
+ const o = () => e ? an(e, s, n, r) : null, l = () => e ? cn(e, s, n, r) : null;
3362
3364
  this.attachStartCallback(o, i), this.attachStopCallback(l, i);
3363
3365
  }
3364
3366
  // TODO: full correct semantic
@@ -3403,7 +3405,7 @@ class Er {
3403
3405
  }
3404
3406
  const r = this.options.ingestPoint, a = (/api\.openreplay\.com/.test(r) ? "https://app.openreplay.com/ingest" : r).replace(/ingest$/, `${s}/session/${n}`);
3405
3407
  if (e != null && e.withCurrentTime) {
3406
- const h = V() - i;
3408
+ const h = X() - i;
3407
3409
  return `${a}?jumpto=${h}`;
3408
3410
  }
3409
3411
  return a;
@@ -3445,7 +3447,7 @@ class Er {
3445
3447
  const n = 1e3, i = this.checkSessionToken(e.forceNew);
3446
3448
  s && await this.setupConditionalStart(e);
3447
3449
  const r = () => {
3448
- this.orderNumber += 1, st(), this.coldStartTs = V(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(re(this.timestamp())), this.bufferedMessages2.push(oe(this.session.getTabId()))), this.stop(!1), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3450
+ this.orderNumber += 1, nt(), this.coldStartTs = X(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(re(this.timestamp())), this.bufferedMessages2.push(oe(this.session.getTabId()))), this.stop(!1), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3449
3451
  userID: e.userID,
3450
3452
  metadata: e.metadata
3451
3453
  }), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
@@ -3456,7 +3458,7 @@ class Er {
3456
3458
  }
3457
3459
  async setupConditionalStart(e) {
3458
3460
  var d, f;
3459
- this.conditionsManager = new Jn(this, e);
3461
+ this.conditionsManager = new Qn(this, e);
3460
3462
  const s = await fetch(this.options.ingestPoint + "/v1/web/start", {
3461
3463
  method: "POST",
3462
3464
  headers: {
@@ -3464,14 +3466,14 @@ class Er {
3464
3466
  },
3465
3467
  body: JSON.stringify({
3466
3468
  ...this.getTrackerInfo(),
3467
- timestamp: V(),
3469
+ timestamp: X(),
3468
3470
  doNotRecord: !0,
3469
3471
  bufferDiff: 0,
3470
3472
  userID: this.session.getInfo().userID,
3471
3473
  token: void 0,
3472
- deviceMemory: it,
3473
- jsHeapSizeLimit: rt,
3474
- timezone: lt(),
3474
+ deviceMemory: rt,
3475
+ jsHeapSizeLimit: ot,
3476
+ timezone: ht(),
3475
3477
  width: window.screen.width,
3476
3478
  height: window.screen.height
3477
3479
  })
@@ -3506,11 +3508,11 @@ class Er {
3506
3508
  offlineRecording(e = {}, s) {
3507
3509
  this.onSessionSent = s, this.singleBuffer = !0;
3508
3510
  const n = this.checkSessionToken(e.forceNew);
3509
- st(), this.coldStartTs = V();
3510
- const i = this.localStorage.getItem(ct);
3511
+ nt(), this.coldStartTs = X();
3512
+ const i = this.localStorage.getItem(lt);
3511
3513
  if (i) {
3512
3514
  const o = JSON.parse(i);
3513
- this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(ct);
3515
+ this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(lt);
3514
3516
  }
3515
3517
  this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId())), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3516
3518
  userID: e.userID,
@@ -3531,7 +3533,7 @@ class Er {
3531
3533
  * Keeping the size of local storage reasonable is up to the end users of this library
3532
3534
  * */
3533
3535
  saveBuffer() {
3534
- this.localStorage.setItem(ct, JSON.stringify(this.bufferedMessages1));
3536
+ this.localStorage.setItem(lt, JSON.stringify(this.bufferedMessages1));
3535
3537
  }
3536
3538
  /**
3537
3539
  * @returns buffer with stored messages for offline recording
@@ -3555,7 +3557,7 @@ class Er {
3555
3557
  async uploadOfflineRecording() {
3556
3558
  var d, f;
3557
3559
  this.stop(!1);
3558
- const e = V();
3560
+ const e = X();
3559
3561
  (d = this.worker) == null || d.postMessage({
3560
3562
  type: "start",
3561
3563
  pageNo: this.session.incPageNo(),
@@ -3578,9 +3580,9 @@ class Er {
3578
3580
  bufferDiff: e - this.coldStartTs,
3579
3581
  userID: this.session.getInfo().userID,
3580
3582
  token: void 0,
3581
- deviceMemory: it,
3582
- jsHeapSizeLimit: rt,
3583
- timezone: lt()
3583
+ deviceMemory: rt,
3584
+ jsHeapSizeLimit: ot,
3585
+ timezone: ht()
3584
3586
  })
3585
3587
  }), { token: n, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: h, beaconSizeLimit: c, projectID: u } = await s.json();
3586
3588
  for ((f = this.worker) == null || f.postMessage({
@@ -3606,12 +3608,12 @@ class Er {
3606
3608
  }
3607
3609
  if (this.activityState === F.Active || this.activityState === F.Starting)
3608
3610
  return Promise.resolve(se("OpenReplay: trying to call `start()` on the instance that has been started already."));
3609
- this.activityState = F.Starting, i || st(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3611
+ this.activityState = F.Starting, i || nt(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3610
3612
  // MBTODO: maybe it would make sense to `forceNew` if the `userID` was changed
3611
3613
  userID: e.userID,
3612
3614
  metadata: e.metadata
3613
3615
  });
3614
- const r = V();
3616
+ const r = X();
3615
3617
  this.worker.postMessage({
3616
3618
  type: "start",
3617
3619
  pageNo: this.session.incPageNo(),
@@ -3637,9 +3639,9 @@ class Er {
3637
3639
  bufferDiff: r - this.coldStartTs,
3638
3640
  userID: this.session.getInfo().userID,
3639
3641
  token: l ? void 0 : o,
3640
- deviceMemory: it,
3641
- jsHeapSizeLimit: rt,
3642
- timezone: lt(),
3642
+ deviceMemory: rt,
3643
+ jsHeapSizeLimit: ot,
3644
+ timezone: ht(),
3643
3645
  condition: n,
3644
3646
  assistOnly: e.assistOnly ?? this.socketMode,
3645
3647
  width: window.screen.width,
@@ -3647,12 +3649,12 @@ class Er {
3647
3649
  })
3648
3650
  });
3649
3651
  if (a.status !== 200) {
3650
- const w = await a.text(), I = w === we ? we : `Server error: ${a.status}. ${w}`;
3652
+ const v = await a.text(), I = v === ve ? ve : `Server error: ${a.status}. ${v}`;
3651
3653
  return se(I);
3652
3654
  }
3653
3655
  if (!this.worker) {
3654
- const w = "no worker found after start request (this should not happen in real world)";
3655
- return this.signalError(w, []), se(w);
3656
+ const v = "no worker found after start request (this should not happen in real world)";
3657
+ return this.signalError(v, []), se(v);
3656
3658
  }
3657
3659
  const {
3658
3660
  token: h,
@@ -3671,7 +3673,7 @@ class Er {
3671
3673
  userCity: N,
3672
3674
  userCountry: T,
3673
3675
  userDevice: m,
3674
- userOS: v,
3676
+ userOS: w,
3675
3677
  userState: k,
3676
3678
  canvasEnabled: x,
3677
3679
  canvasQuality: S,
@@ -3679,15 +3681,15 @@ class Er {
3679
3681
  assistOnly: _
3680
3682
  } = await a.json();
3681
3683
  if (typeof h != "string" || typeof c != "string" || typeof y != "number" && typeof y < "u" || typeof p != "string" || typeof g != "number" || typeof d != "number" && typeof d < "u") {
3682
- const w = `Incorrect server response: ${JSON.stringify(a)}`;
3683
- return this.signalError(w, []), se(w);
3684
+ const v = `Incorrect server response: ${JSON.stringify(a)}`;
3685
+ return this.signalError(v, []), se(v);
3684
3686
  }
3685
3687
  this.delay = g, this.session.setSessionToken(h), this.session.setUserInfo({
3686
3688
  userBrowser: E,
3687
3689
  userCity: N,
3688
3690
  userCountry: T,
3689
3691
  userDevice: m,
3690
- userOS: v,
3692
+ userOS: w,
3691
3693
  userState: k
3692
3694
  }), this.session.assign({
3693
3695
  sessionID: p,
@@ -3697,37 +3699,37 @@ class Er {
3697
3699
  type: "auth",
3698
3700
  token: h,
3699
3701
  beaconSizeLimit: d
3700
- }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([w, I]) => this.send(ss(w, I))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = f;
3702
+ }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([v, I]) => this.send(ns(v, I))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = f;
3701
3703
  const M = { sessionToken: h, userUUID: c, sessionID: p };
3702
- if (this.startCallbacks.forEach((w) => w(M)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, h), this.activityState = F.Active, x && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new ur(this, {
3704
+ if (this.startCallbacks.forEach((v) => v(M)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, h), this.activityState = F.Active, x && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new fr(this, {
3703
3705
  fps: b,
3704
3706
  quality: S,
3705
3707
  isDebug: this.options.canvas.__save_canvas_locally,
3706
3708
  fixedScaling: this.options.canvas.fixedCanvasScaling,
3707
3709
  useAnimationFrame: this.options.canvas.useAnimationFrame
3708
3710
  }), this.canvasRecorder.startTracking()), i) {
3709
- const w = this.bufferedMessages1.length > this.bufferedMessages2.length ? this.bufferedMessages1 : this.bufferedMessages2;
3710
- for (; w.length > 0; )
3711
- await this.flushBuffer(w);
3711
+ const v = this.bufferedMessages1.length > this.bufferedMessages2.length ? this.bufferedMessages1 : this.bufferedMessages2;
3712
+ for (; v.length > 0; )
3713
+ await this.flushBuffer(v);
3712
3714
  this.clearBuffers(), this.commit();
3713
3715
  } else
3714
3716
  this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
3715
- this.uxtManager = this.uxtManager ? this.uxtManager : new lr(this, Ss);
3717
+ this.uxtManager = this.uxtManager ? this.uxtManager : new ur(this, ws);
3716
3718
  let O;
3717
- const D = this.localStorage.getItem(Ss);
3719
+ const D = this.localStorage.getItem(ws);
3718
3720
  if (D && (O = parseInt(D, 10)), location != null && location.search) {
3719
- const w = new URLSearchParams(location.search);
3720
- if (w.has("oruxt")) {
3721
- const I = w.get("oruxt");
3721
+ const v = new URLSearchParams(location.search);
3722
+ if (v.has("oruxt")) {
3723
+ const I = v.get("oruxt");
3722
3724
  O = I ? parseInt(I, 10) : void 0;
3723
3725
  }
3724
3726
  }
3725
- return O && (this.uxtManager.isActive ? this.onUxtCb.forEach((w) => w(O)) : this.uxtManager.getTest(O, h, !!D).then((w) => {
3726
- w && this.onUxtCb.forEach((I) => I(w));
3727
- })), Ir(M);
3727
+ return O && (this.uxtManager.isActive ? this.onUxtCb.forEach((v) => v(O)) : this.uxtManager.getTest(O, h, !!D).then((v) => {
3728
+ v && this.onUxtCb.forEach((I) => I(v));
3729
+ })), Er(M);
3728
3730
  } catch (a) {
3729
- if (this.stop(), this.session.reset(), a === we)
3730
- return this.signalError(we, []), se(we);
3731
+ if (this.stop(), this.session.reset(), a === ve)
3732
+ return this.signalError(ve, []), se(ve);
3731
3733
  this._debug("session_start", a);
3732
3734
  const h = a instanceof Error ? a.message : a.toString();
3733
3735
  return this.signalError(h, []), se(h);
@@ -3786,7 +3788,7 @@ class Er {
3786
3788
  trackWs(e) {
3787
3789
  const s = e;
3788
3790
  return (n, i, r = "down") => {
3789
- typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Mi("websocket", s, i, this.timestamp(), r, n));
3791
+ typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Pi("websocket", s, i, this.timestamp(), r, n));
3790
3792
  };
3791
3793
  }
3792
3794
  stop(e = !0) {
@@ -3799,22 +3801,22 @@ class Er {
3799
3801
  }
3800
3802
  }
3801
3803
  }
3802
- function Cr(t) {
3804
+ function _r(t) {
3803
3805
  const e = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
3804
3806
  if (e === void 0)
3805
3807
  return;
3806
- const s = () => t.send(Ei(Math.round(e.downlink * 1e3), e.type || "unknown"));
3808
+ const s = () => t.send(Ni(Math.round(e.downlink * 1e3), e.type || "unknown"));
3807
3809
  s(), e.addEventListener("change", s);
3808
3810
  }
3809
- const un = Z && "InstallTrigger" in window ? (t) => t.message + `
3811
+ const gn = Z && "InstallTrigger" in window ? (t) => t.message + `
3810
3812
  ` + t.stack : (t) => t.stack || t.message;
3811
3813
  function _t(t) {
3812
- return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? un(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
3814
+ return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? gn(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
3813
3815
  }
3814
- function Nr(t) {
3816
+ function Or(t) {
3815
3817
  return typeof t != "number" ? "NaN" : t.toString();
3816
3818
  }
3817
- function _r(t) {
3819
+ function Rr(t) {
3818
3820
  return typeof t != "number" ? "NaN" : Math.floor(t).toString();
3819
3821
  }
3820
3822
  function vs(t) {
@@ -3823,7 +3825,7 @@ function vs(t) {
3823
3825
  if (t === null)
3824
3826
  return "null";
3825
3827
  if (t instanceof Error)
3826
- return un(t);
3828
+ return gn(t);
3827
3829
  if (Array.isArray(t)) {
3828
3830
  const e = t.length, s = t.slice(0, 10).map(_t).join(", ");
3829
3831
  return `Array(${e})[${s}]`;
@@ -3841,7 +3843,7 @@ function vs(t) {
3841
3843
  }
3842
3844
  return t.toString();
3843
3845
  }
3844
- function Or(t) {
3846
+ function Dr(t) {
3845
3847
  return typeof t[0] == "string" && t.unshift(t.shift().replace(/%(o|s|f|d|i)/g, (e, s) => {
3846
3848
  const n = t.shift();
3847
3849
  if (n === void 0)
@@ -3852,24 +3854,24 @@ function Or(t) {
3852
3854
  case "s":
3853
3855
  return _t(n);
3854
3856
  case "f":
3855
- return Nr(n);
3857
+ return Or(n);
3856
3858
  case "d":
3857
3859
  case "i":
3858
- return _r(n);
3860
+ return Rr(n);
3859
3861
  default:
3860
3862
  return e;
3861
3863
  }
3862
3864
  })), t.map(vs).join(" ");
3863
3865
  }
3864
- const ws = ["log", "info", "warn", "error", "debug", "assert"];
3865
- function Rr(t, e) {
3866
+ const ks = ["log", "info", "warn", "error", "debug", "assert"];
3867
+ function Mr(t, e) {
3866
3868
  const s = Object.assign({
3867
- consoleMethods: ws,
3869
+ consoleMethods: ks,
3868
3870
  consoleThrottling: 30
3869
3871
  }, e);
3870
3872
  if (!Array.isArray(s.consoleMethods) || s.consoleMethods.length === 0)
3871
3873
  return;
3872
- const n = t.safe((a, h) => t.send(Si(a, Or(h))));
3874
+ const n = t.safe((a, h) => t.send(vi(a, Dr(h))));
3873
3875
  let i = 0;
3874
3876
  const r = () => {
3875
3877
  i = 0;
@@ -3882,7 +3884,7 @@ function Rr(t, e) {
3882
3884
  }
3883
3885
  };
3884
3886
  s.consoleMethods.forEach((u) => {
3885
- if (ws.indexOf(u) === -1) {
3887
+ if (ks.indexOf(u) === -1) {
3886
3888
  t.debug.error(`OpenReplay: unsupported console method "${u}"`);
3887
3889
  return;
3888
3890
  }
@@ -3892,16 +3894,16 @@ function Rr(t, e) {
3892
3894
  }, l = t.safe((a) => o(a.console, a));
3893
3895
  l(window), t.observer.attachContextCallback(l);
3894
3896
  }
3895
- var dn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3896
- function Dr(t) {
3897
+ var mn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3898
+ function Ar(t) {
3897
3899
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3898
3900
  }
3899
- var fn = { exports: {} }, ht = { exports: {} }, ks;
3900
- function Mr() {
3901
- return ks || (ks = 1, function(t, e) {
3901
+ var bn = { exports: {} }, ut = { exports: {} }, Ts;
3902
+ function Pr() {
3903
+ return Ts || (Ts = 1, function(t, e) {
3902
3904
  (function(s, n) {
3903
3905
  t.exports = n();
3904
- })(dn, function() {
3906
+ })(mn, function() {
3905
3907
  function s(p) {
3906
3908
  return !isNaN(parseFloat(p)) && isFinite(p);
3907
3909
  }
@@ -3944,9 +3946,9 @@ function Mr() {
3944
3946
  return this.getIsEval() ? p ? "[eval] (" + p + ":" + y + ":" + E + ")" : "[eval]:" + y + ":" + E : N ? N + " (" + p + ":" + y + ":" + E + ")" : p + ":" + y + ":" + E;
3945
3947
  }
3946
3948
  }, u.fromString = function(y) {
3947
- var E = y.indexOf("("), N = y.lastIndexOf(")"), T = y.substring(0, E), m = y.substring(E + 1, N).split(","), v = y.substring(N + 1);
3948
- if (v.indexOf("@") === 0)
3949
- var k = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(v, ""), x = k[1], S = k[2], b = k[3];
3949
+ var E = y.indexOf("("), N = y.lastIndexOf(")"), T = y.substring(0, E), m = y.substring(E + 1, N).split(","), w = y.substring(N + 1);
3950
+ if (w.indexOf("@") === 0)
3951
+ var k = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w, ""), x = k[1], S = k[2], b = k[3];
3950
3952
  return new u({
3951
3953
  functionName: T,
3952
3954
  args: m || void 0,
@@ -3977,12 +3979,12 @@ function Mr() {
3977
3979
  }(l[g]);
3978
3980
  return u;
3979
3981
  });
3980
- }(ht)), ht.exports;
3982
+ }(ut)), ut.exports;
3981
3983
  }
3982
3984
  (function(t, e) {
3983
3985
  (function(s, n) {
3984
- t.exports = n(Mr());
3985
- })(dn, function(n) {
3986
+ t.exports = n(Pr());
3987
+ })(mn, function(n) {
3986
3988
  var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
3987
3989
  return {
3988
3990
  /**
@@ -4101,10 +4103,10 @@ function Mr() {
4101
4103
  }
4102
4104
  };
4103
4105
  });
4104
- })(fn);
4105
- var Ar = fn.exports;
4106
- const Lr = /* @__PURE__ */ Dr(Ar);
4107
- function Ts(t) {
4106
+ })(bn);
4107
+ var Lr = bn.exports;
4108
+ const Fr = /* @__PURE__ */ Ar(Lr);
4109
+ function Is(t) {
4108
4110
  return [
4109
4111
  {
4110
4112
  columnNumber: t.colno,
@@ -4115,25 +4117,25 @@ function Ts(t) {
4115
4117
  }
4116
4118
  ];
4117
4119
  }
4118
- function $e(t, e, s = {}) {
4120
+ function Ve(t, e, s = {}) {
4119
4121
  let n = e;
4120
4122
  try {
4121
- n = Lr.parse(t);
4123
+ n = Fr.parse(t);
4122
4124
  } catch {
4123
4125
  }
4124
4126
  return kt(t.name, t.message, JSON.stringify(n), JSON.stringify(s));
4125
4127
  }
4126
- function pn(t, e = window, s = {}) {
4128
+ function yn(t, e = window, s = {}) {
4127
4129
  if (t instanceof ErrorEvent) {
4128
4130
  if (t.error instanceof Error)
4129
- return $e(t.error, Ts(t), s);
4131
+ return Ve(t.error, Is(t), s);
4130
4132
  {
4131
4133
  let [n, i] = t.message.split(":");
4132
- return i || (n = "Error", i = t.message), kt(n, i, JSON.stringify(Ts(t)), JSON.stringify(s));
4134
+ return i || (n = "Error", i = t.message), kt(n, i, JSON.stringify(Is(t)), JSON.stringify(s));
4133
4135
  }
4134
4136
  } else if ("PromiseRejectionEvent" in e && t instanceof e.PromiseRejectionEvent) {
4135
4137
  if (t.reason instanceof Error)
4136
- return $e(t.reason, [], s);
4138
+ return Ve(t.reason, [], s);
4137
4139
  {
4138
4140
  let n;
4139
4141
  try {
@@ -4146,29 +4148,29 @@ function pn(t, e = window, s = {}) {
4146
4148
  }
4147
4149
  return null;
4148
4150
  }
4149
- function Pr(t, e) {
4151
+ function Br(t, e) {
4150
4152
  const s = Object.assign({
4151
4153
  captureExceptions: !0
4152
4154
  }, e);
4153
4155
  function n(i) {
4154
4156
  function r(o) {
4155
- const l = pn(o, i);
4157
+ const l = yn(o, i);
4156
4158
  l != null && t.send(l);
4157
4159
  }
4158
4160
  t.attachEventListener(i, "unhandledrejection", r), t.attachEventListener(i, "error", r);
4159
4161
  }
4160
4162
  s.captureExceptions && (t.observer.attachContextCallback(n), n(window));
4161
4163
  }
4162
- function Is(t, e = document.location) {
4164
+ function xs(t, e = document.location) {
4163
4165
  return t = t.trim(), t.startsWith("//") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:") ? t : t.startsWith("/") ? e.origin + t : e.origin + e.pathname + t;
4164
4166
  }
4165
- function Fr(t) {
4166
- return Zn && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
4167
- }
4168
- const Br = "https://static.openreplay.com/tracker/placeholder.jpeg";
4169
4167
  function Ur(t) {
4168
+ return ti && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
4169
+ }
4170
+ const Hr = "https://static.openreplay.com/tracker/placeholder.jpeg";
4171
+ function jr(t) {
4170
4172
  function e(l, a) {
4171
- t.attributeSender.sendSetAttribute(l, "src", Br);
4173
+ t.attributeSender.sendSetAttribute(l, "src", Hr);
4172
4174
  const { width: h, height: c } = a.getBoundingClientRect();
4173
4175
  a.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(h)), a.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(c));
4174
4176
  }
@@ -4176,17 +4178,17 @@ function Ur(t) {
4176
4178
  const { srcset: h } = a;
4177
4179
  if (!h)
4178
4180
  return;
4179
- const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => Is(u)).join(", ");
4181
+ const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => xs(u)).join(", ");
4180
4182
  t.attributeSender.sendSetAttribute(l, "srcset", c);
4181
4183
  }, n = function(l, a) {
4182
- a.src.length > ei && e(l, a), t.send(St(l, "src", a.src, t.getBaseHref()));
4184
+ a.src.length > si && e(l, a), t.send(St(l, "src", a.src, t.getBaseHref()));
4183
4185
  }, i = t.safe(function(l) {
4184
- const a = Is(l.src || "");
4185
- en(a) && t.send(an(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
4186
+ const a = xs(l.src || "");
4187
+ rn(a) && t.send(un(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
4186
4188
  }), r = t.safe(function(l) {
4187
4189
  const a = t.nodes.getID(l);
4188
- a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !Fr(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
4189
- }), o = tn(t.safe((l) => {
4190
+ a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !Ur(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
4191
+ }), o = on(t.safe((l) => {
4190
4192
  for (const a of l)
4191
4193
  if (a.type === "attributes") {
4192
4194
  const h = a.target, c = t.nodes.getID(h);
@@ -4201,7 +4203,7 @@ function Ur(t) {
4201
4203
  B(l, "img") && (t.nodes.attachNodeListener(l, "error", () => i(l)), t.nodes.attachNodeListener(l, "load", () => r(l)), r(l), o.observe(l, { attributes: !0, attributeFilter: ["src", "srcset"] }));
4202
4204
  });
4203
4205
  }
4204
- const Hr = [
4206
+ const zr = [
4205
4207
  "text",
4206
4208
  "password",
4207
4209
  "email",
@@ -4212,16 +4214,16 @@ const Hr = [
4212
4214
  "tel",
4213
4215
  "time"
4214
4216
  ];
4215
- function jr(t) {
4216
- return B(t, "textarea") ? !0 : B(t, "input") ? Hr.includes(t.type) : !1;
4217
+ function Wr(t) {
4218
+ return B(t, "textarea") ? !0 : B(t, "input") ? zr.includes(t.type) : !1;
4217
4219
  }
4218
- function zr(t) {
4220
+ function qr(t) {
4219
4221
  if (!B(t, "input"))
4220
4222
  return !1;
4221
4223
  const e = t.type;
4222
4224
  return e === "checkbox" || e === "radio";
4223
4225
  }
4224
- const Wr = Z && "labels" in HTMLInputElement.prototype ? (t) => {
4226
+ const $r = Z && "labels" in HTMLInputElement.prototype ? (t) => {
4225
4227
  let e = t;
4226
4228
  for (; (e = e.parentNode) !== null; )
4227
4229
  if (B(e, "label"))
@@ -4241,20 +4243,20 @@ const Wr = Z && "labels" in HTMLInputElement.prototype ? (t) => {
4241
4243
  return n[0];
4242
4244
  }
4243
4245
  };
4244
- function gn(t) {
4246
+ function Sn(t) {
4245
4247
  let e = Ft(t);
4246
4248
  if (e === null) {
4247
- const s = Wr(t);
4249
+ const s = $r(t);
4248
4250
  e = s && s.innerText || t.placeholder || t.name || t.id || t.className || t.type;
4249
4251
  }
4250
- return Zs(e).slice(0, 100);
4252
+ return nn(e).slice(0, 100);
4251
4253
  }
4252
4254
  const de = {
4253
4255
  Plain: 0,
4254
4256
  Obscured: 1,
4255
4257
  Hidden: 2
4256
4258
  };
4257
- function qr(t, e) {
4259
+ function Vr(t, e) {
4258
4260
  const s = Object.assign({
4259
4261
  obscureInputNumbers: !0,
4260
4262
  obscureInputEmails: !0,
@@ -4277,7 +4279,7 @@ function qr(t, e) {
4277
4279
  }
4278
4280
  function i(c, u) {
4279
4281
  const { value: d, mask: f } = n(c, u);
4280
- t.send(mi(c, d, f));
4282
+ t.send(yi(c, d, f));
4281
4283
  }
4282
4284
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
4283
4285
  t.attachStopCallback(() => {
@@ -4287,7 +4289,7 @@ function qr(t, e) {
4287
4289
  r.get(c) !== u.value && (r.set(c, u.value), i(c, u));
4288
4290
  }
4289
4291
  function a(c, u) {
4290
- o.get(c) !== u && (o.set(c, u), t.send(bi(c, u)));
4292
+ o.get(c) !== u && (o.set(c, u), t.send(Si(c, u)));
4291
4293
  }
4292
4294
  t.ticker.attach(() => {
4293
4295
  r.forEach((c, u) => {
@@ -4303,35 +4305,35 @@ function qr(t, e) {
4303
4305
  });
4304
4306
  }, 3);
4305
4307
  function h(c, u, d, f) {
4306
- const { value: g, mask: p } = n(c, u), y = gn(u);
4307
- t.send(Ai(c, g, p !== 0, y, d, f));
4308
+ const { value: g, mask: p } = n(c, u), y = Sn(u);
4309
+ t.send(Li(c, g, p !== 0, y, d, f));
4308
4310
  }
4309
4311
  t.nodes.attachNodeCallback(t.safe((c) => {
4310
4312
  const u = t.nodes.getID(c);
4311
4313
  if (u !== void 0) {
4312
- if (B(c, "select") && (i(u, c), t.nodes.attachNodeListener(c, "change", () => i(u, c))), jr(c)) {
4314
+ if (B(c, "select") && (i(u, c), t.nodes.attachNodeListener(c, "change", () => i(u, c))), Wr(c)) {
4313
4315
  l(u, c);
4314
4316
  let d = 0, f = 0, g = 0;
4315
4317
  const p = () => {
4316
- d = V();
4318
+ d = X();
4317
4319
  }, y = () => {
4318
- f === 0 && d !== 0 && (f = V() - d);
4320
+ f === 0 && d !== 0 && (f = X() - d);
4319
4321
  }, E = () => {
4320
- d !== 0 && (g = V() - d), h(u, c, f, g), f = 0, g = 0, d = 0;
4322
+ d !== 0 && (g = X() - d), h(u, c, f, g), f = 0, g = 0, d = 0;
4321
4323
  };
4322
4324
  t.nodes.attachNodeListener(c, "focus", p), t.nodes.attachNodeListener(c, "input", y), t.nodes.attachNodeListener(c, "change", E);
4323
4325
  return;
4324
4326
  }
4325
- if (zr(c)) {
4327
+ if (qr(c)) {
4326
4328
  a(u, c.checked), t.nodes.attachNodeListener(c, "change", () => a(u, c.checked));
4327
4329
  return;
4328
4330
  }
4329
4331
  }
4330
4332
  }));
4331
4333
  }
4332
- let q, Ht, mn;
4333
- function $r(t, e) {
4334
- if (mn = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
4334
+ let $, Ht, wn;
4335
+ function Xr(t, e) {
4336
+ if (wn = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
4335
4337
  throw new Error("Can't generate CSS selector for non-element node type.");
4336
4338
  if (t.tagName.toLowerCase() === "html")
4337
4339
  return "html";
@@ -4347,52 +4349,52 @@ function $r(t, e) {
4347
4349
  maxNumberOfTries: 1e4,
4348
4350
  timeoutMs: void 0
4349
4351
  };
4350
- q = { ...s, ...e }, Ht = Vr(q.root, s);
4352
+ $ = { ...s, ...e }, Ht = Gr($.root, s);
4351
4353
  let n = Ce(t, "all", () => Ce(t, "two", () => Ce(t, "one", () => Ce(t, "none"))));
4352
4354
  if (n) {
4353
- const i = Sn(vn(n, t));
4354
- return i.length > 0 && (n = i[0]), Ye(n);
4355
+ const i = Tn(In(n, t));
4356
+ return i.length > 0 && (n = i[0]), Qe(n);
4355
4357
  } else
4356
4358
  throw new Error("Selector was not found.");
4357
4359
  }
4358
- function Vr(t, e) {
4360
+ function Gr(t, e) {
4359
4361
  return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
4360
4362
  }
4361
4363
  function Ce(t, e, s) {
4362
4364
  let n = null, i = [], r = t, o = 0;
4363
4365
  for (; r; ) {
4364
- const l = (/* @__PURE__ */ new Date()).getTime() - mn.getTime();
4365
- if (q.timeoutMs !== void 0 && l > q.timeoutMs)
4366
+ const l = (/* @__PURE__ */ new Date()).getTime() - wn.getTime();
4367
+ if ($.timeoutMs !== void 0 && l > $.timeoutMs)
4366
4368
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
4367
- let a = _e(Xr(r)) || _e(...Gr(r)) || _e(...Kr(r)) || _e(Jr(r)) || [Cs()];
4368
- const h = Yr(r);
4369
+ let a = _e(Kr(r)) || _e(...Jr(r)) || _e(...Yr(r)) || _e(Qr(r)) || [Ns()];
4370
+ const h = Zr(r);
4369
4371
  if (e == "all")
4370
- h && (a = a.concat(a.filter(ut).map((c) => Ne(c, h))));
4372
+ h && (a = a.concat(a.filter(dt).map((c) => Ne(c, h))));
4371
4373
  else if (e == "two")
4372
- a = a.slice(0, 1), h && (a = a.concat(a.filter(ut).map((c) => Ne(c, h))));
4374
+ a = a.slice(0, 1), h && (a = a.concat(a.filter(dt).map((c) => Ne(c, h))));
4373
4375
  else if (e == "one") {
4374
4376
  const [c] = a = a.slice(0, 1);
4375
- h && ut(c) && (a = [Ne(c, h)]);
4377
+ h && dt(c) && (a = [Ne(c, h)]);
4376
4378
  } else
4377
- e == "none" && (a = [Cs()], h && (a = [Ne(a[0], h)]));
4379
+ e == "none" && (a = [Ns()], h && (a = [Ne(a[0], h)]));
4378
4380
  for (let c of a)
4379
4381
  c.level = o;
4380
- if (i.push(a), i.length >= q.seedMinLength && (n = xs(i, s), n))
4382
+ if (i.push(a), i.length >= $.seedMinLength && (n = Es(i, s), n))
4381
4383
  break;
4382
4384
  r = r.parentElement, o++;
4383
4385
  }
4384
- return n || (n = xs(i, s)), !n && s ? s() : n;
4386
+ return n || (n = Es(i, s)), !n && s ? s() : n;
4385
4387
  }
4386
- function xs(t, e) {
4387
- const s = Sn(yn(t));
4388
- if (s.length > q.threshold)
4388
+ function Es(t, e) {
4389
+ const s = Tn(kn(t));
4390
+ if (s.length > $.threshold)
4389
4391
  return e ? e() : null;
4390
4392
  for (let n of s)
4391
- if (bn(n))
4393
+ if (vn(n))
4392
4394
  return n;
4393
4395
  return null;
4394
4396
  }
4395
- function Ye(t) {
4397
+ function Qe(t) {
4396
4398
  let e = t[0], s = e.name;
4397
4399
  for (let n = 1; n < t.length; n++) {
4398
4400
  const i = t[n].level || 0;
@@ -4400,11 +4402,11 @@ function Ye(t) {
4400
4402
  }
4401
4403
  return s;
4402
4404
  }
4403
- function Es(t) {
4405
+ function Cs(t) {
4404
4406
  return t.map((e) => e.penalty).reduce((e, s) => e + s, 0);
4405
4407
  }
4406
- function bn(t) {
4407
- const e = Ye(t);
4408
+ function vn(t) {
4409
+ const e = Qe(t);
4408
4410
  switch (Ht.querySelectorAll(e).length) {
4409
4411
  case 0:
4410
4412
  throw new Error(`Can't select any node with this selector: ${e}`);
@@ -4414,39 +4416,39 @@ function bn(t) {
4414
4416
  return !1;
4415
4417
  }
4416
4418
  }
4417
- function Xr(t) {
4419
+ function Kr(t) {
4418
4420
  const e = t.getAttribute("id");
4419
- return e && q.idName(e) ? {
4421
+ return e && $.idName(e) ? {
4420
4422
  name: "#" + CSS.escape(e),
4421
4423
  penalty: 0
4422
4424
  } : null;
4423
4425
  }
4424
- function Gr(t) {
4425
- return Array.from(t.attributes).filter((s) => q.attr(s.name, s.value)).map((s) => ({
4426
+ function Jr(t) {
4427
+ return Array.from(t.attributes).filter((s) => $.attr(s.name, s.value)).map((s) => ({
4426
4428
  name: `[${CSS.escape(s.name)}="${CSS.escape(s.value)}"]`,
4427
4429
  penalty: 0.5
4428
4430
  }));
4429
4431
  }
4430
- function Kr(t) {
4431
- return Array.from(t.classList).filter(q.className).map((s) => ({
4432
+ function Yr(t) {
4433
+ return Array.from(t.classList).filter($.className).map((s) => ({
4432
4434
  name: "." + CSS.escape(s),
4433
4435
  penalty: 1
4434
4436
  }));
4435
4437
  }
4436
- function Jr(t) {
4438
+ function Qr(t) {
4437
4439
  const e = t.tagName.toLowerCase();
4438
- return q.tagName(e) ? {
4440
+ return $.tagName(e) ? {
4439
4441
  name: e,
4440
4442
  penalty: 2
4441
4443
  } : null;
4442
4444
  }
4443
- function Cs() {
4445
+ function Ns() {
4444
4446
  return {
4445
4447
  name: "*",
4446
4448
  penalty: 3
4447
4449
  };
4448
4450
  }
4449
- function Yr(t) {
4451
+ function Zr(t) {
4450
4452
  const e = t.parentNode;
4451
4453
  if (!e)
4452
4454
  return null;
@@ -4464,48 +4466,48 @@ function Ne(t, e) {
4464
4466
  penalty: t.penalty + 1
4465
4467
  };
4466
4468
  }
4467
- function ut(t) {
4469
+ function dt(t) {
4468
4470
  return t.name !== "html" && !t.name.startsWith("#");
4469
4471
  }
4470
4472
  function _e(...t) {
4471
- const e = t.filter(Qr);
4473
+ const e = t.filter(eo);
4472
4474
  return e.length > 0 ? e : null;
4473
4475
  }
4474
- function Qr(t) {
4476
+ function eo(t) {
4475
4477
  return t != null;
4476
4478
  }
4477
- function* yn(t, e = []) {
4479
+ function* kn(t, e = []) {
4478
4480
  if (t.length > 0)
4479
4481
  for (let s of t[0])
4480
- yield* yn(t.slice(1, t.length), e.concat(s));
4482
+ yield* kn(t.slice(1, t.length), e.concat(s));
4481
4483
  else
4482
4484
  yield e;
4483
4485
  }
4484
- function Sn(t) {
4485
- return [...t].sort((e, s) => Es(e) - Es(s));
4486
+ function Tn(t) {
4487
+ return [...t].sort((e, s) => Cs(e) - Cs(s));
4486
4488
  }
4487
- function* vn(t, e, s = {
4489
+ function* In(t, e, s = {
4488
4490
  counter: 0,
4489
4491
  visited: /* @__PURE__ */ new Map()
4490
4492
  }) {
4491
- if (t.length > 2 && t.length > q.optimizedMinLength)
4493
+ if (t.length > 2 && t.length > $.optimizedMinLength)
4492
4494
  for (let n = 1; n < t.length - 1; n++) {
4493
- if (s.counter > q.maxNumberOfTries)
4495
+ if (s.counter > $.maxNumberOfTries)
4494
4496
  return;
4495
4497
  s.counter += 1;
4496
4498
  const i = [...t];
4497
4499
  i.splice(n, 1);
4498
- const r = Ye(i);
4500
+ const r = Qe(i);
4499
4501
  if (s.visited.has(r))
4500
4502
  return;
4501
- bn(i) && Zr(i, e) && (yield i, s.visited.set(r, !0), yield* vn(i, e, s));
4503
+ vn(i) && to(i, e) && (yield i, s.visited.set(r, !0), yield* In(i, e, s));
4502
4504
  }
4503
4505
  }
4504
- function Zr(t, e) {
4505
- return Ht.querySelector(Ye(t)) === e;
4506
+ function to(t, e) {
4507
+ return Ht.querySelector(Qe(t)) === e;
4506
4508
  }
4507
- function eo(t, e, s) {
4508
- return $r(t, {
4509
+ function so(t, e, s) {
4510
+ return Xr(t, {
4509
4511
  root: e.body,
4510
4512
  seedMinLength: 3,
4511
4513
  optimizedMinLength: (s == null ? void 0 : s.minSelectorDepth) || 2,
@@ -4517,10 +4519,10 @@ function Ot(t) {
4517
4519
  const e = t.tagName.toUpperCase();
4518
4520
  return e === "BUTTON" || e === "A" || e === "LI" || e === "SELECT" || e === "TR" || e === "TH" || t.onclick != null || t.getAttribute("role") === "button";
4519
4521
  }
4520
- function Ns(t, e) {
4521
- return t instanceof Element ? to(t, e) : null;
4522
+ function _s(t, e) {
4523
+ return t instanceof Element ? no(t, e) : null;
4522
4524
  }
4523
- function to(t, e) {
4525
+ function no(t, e) {
4524
4526
  let s = t;
4525
4527
  for (; s !== null && s !== e.documentElement; ) {
4526
4528
  if (ae(s, "masked"))
@@ -4542,17 +4544,17 @@ function to(t, e) {
4542
4544
  }
4543
4545
  return t === e.documentElement ? null : t;
4544
4546
  }
4545
- function so(t, e) {
4547
+ function io(t, e) {
4546
4548
  const { disableClickmaps: s = !1 } = e || {};
4547
4549
  function n(m) {
4548
- const v = Ft(m);
4549
- if (v !== null)
4550
- return v;
4550
+ const w = Ft(m);
4551
+ if (w !== null)
4552
+ return w;
4551
4553
  if (B(m, "input"))
4552
- return gn(m);
4554
+ return Sn(m);
4553
4555
  if (Ot(m)) {
4554
4556
  let k = "";
4555
- return m instanceof HTMLElement && (k = t.sanitizer.getInnerTextSecure(m)), k = k || m.id || m.className, Zs(k).slice(0, 100);
4557
+ return m instanceof HTMLElement && (k = t.sanitizer.getInnerTextSecure(m)), k = k || m.id || m.className, nn(k).slice(0, 100);
4556
4558
  }
4557
4559
  return "";
4558
4560
  }
@@ -4564,8 +4566,8 @@ function so(t, e) {
4564
4566
  c = m;
4565
4567
  return;
4566
4568
  }
4567
- const v = (m - c) / y;
4568
- d > 4 && v > p && t.send(Li(V())), f = 0, d = 0, c = m;
4569
+ const w = (m - c) / y;
4570
+ d > 4 && w > p && t.send(Fi(X())), f = 0, d = 0, c = m;
4569
4571
  }
4570
4572
  t.attachStartCallback(() => {
4571
4573
  g = setInterval(() => E(), y);
@@ -4573,14 +4575,14 @@ function so(t, e) {
4573
4575
  i = -1, r = -1, o = !1, l = null, h = {}, g && clearInterval(g);
4574
4576
  });
4575
4577
  const N = () => {
4576
- o && (t.send(yi(i, r)), o = !1);
4577
- }, T = (m, v = !1) => {
4578
+ o && (t.send(wi(i, r)), o = !1);
4579
+ }, T = (m, w = !1) => {
4578
4580
  function k(S, b, _) {
4579
- return h[S] = h[S] || eo(b, m, _);
4581
+ return h[S] = h[S] || so(b, m, _);
4580
4582
  }
4581
- const x = v ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
4583
+ const x = w ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
4582
4584
  x(m.documentElement, "mouseover", (S) => {
4583
- const b = Ns(S.target, m);
4585
+ const b = _s(S.target, m);
4584
4586
  b !== l && (l = b, a = performance.now());
4585
4587
  }), x(m, "mousemove", (S) => {
4586
4588
  const [b, _] = t.observer.getDocumentOffset(m);
@@ -4588,25 +4590,25 @@ function so(t, e) {
4588
4590
  const M = Math.sign(S.movementX);
4589
4591
  f += Math.abs(S.movementX) + Math.abs(S.movementY), M !== u && (u = M, d++);
4590
4592
  }, !1), x(m, "click", (S) => {
4591
- const b = Ns(S.target, m);
4593
+ const b = _s(S.target, m);
4592
4594
  if (!S.clientX && !S.clientY || b === null)
4593
4595
  return;
4594
4596
  const _ = t.nodes.getID(b);
4595
4597
  if (_ !== void 0) {
4596
- const M = S.pageX, O = S.pageY, D = m.documentElement.scrollWidth, w = m.documentElement.scrollHeight, I = _s(M / D), A = _s(O / w);
4597
- N(), t.send(Ri(_, l === b ? Math.round(performance.now() - a) : 0, n(b), Ot(b) && !s ? k(_, b, e) : "", I, A), !0);
4598
+ const M = S.pageX, O = S.pageY, D = m.documentElement.scrollWidth, v = m.documentElement.scrollHeight, I = Os(M / D), A = Os(O / v);
4599
+ N(), t.send(Mi(_, l === b ? Math.round(performance.now() - a) : 0, n(b), Ot(b) && !s ? k(_, b, e) : "", I, A), !0);
4598
4600
  }
4599
4601
  l = null;
4600
4602
  });
4601
4603
  };
4602
4604
  t.nodes.attachNodeCallback((m) => {
4603
- We(m) && T(m);
4605
+ qe(m) && T(m);
4604
4606
  }), T(document, !0), t.ticker.attach(N, (e == null ? void 0 : e.trackingOffset) || 7);
4605
4607
  }
4606
- function _s(t) {
4608
+ function Os(t) {
4607
4609
  return Math.round(t * 1e4);
4608
4610
  }
4609
- function no(t) {
4611
+ function ro(t) {
4610
4612
  const e = [], s = document.getElementsByTagName("*"), n = /url\(("[^"]*"|'[^']*'|[^)]*)\)/i;
4611
4613
  for (let i = 0; i < s.length; i++) {
4612
4614
  const r = s[i];
@@ -4631,7 +4633,7 @@ function no(t) {
4631
4633
  }
4632
4634
  return e;
4633
4635
  }
4634
- function io(t, e) {
4636
+ function oo(t, e) {
4635
4637
  let s = Math.max(document.documentElement && document.documentElement.clientWidth || 0, window.innerWidth || 0) * Math.max(document.documentElement && document.documentElement.clientHeight || 0, window.innerHeight || 0) / 10, n = s * t;
4636
4638
  for (let i = 0; i < e.length; i++) {
4637
4639
  const { time: r, area: o } = e[i];
@@ -4639,7 +4641,7 @@ function io(t, e) {
4639
4641
  }
4640
4642
  return s === 0 ? 0 : n / s;
4641
4643
  }
4642
- function ro(t, e) {
4644
+ function ao(t, e) {
4643
4645
  const s = Object.assign({
4644
4646
  captureResourceTimings: !0,
4645
4647
  capturePageLoadTimings: !0,
@@ -4651,7 +4653,7 @@ function ro(t, e) {
4651
4653
  let n = {};
4652
4654
  function i(h) {
4653
4655
  var u;
4654
- if (h.duration < 0 || !en(h.name) || t.isServiceURL(h.name))
4656
+ if (h.duration < 0 || !rn(h.name) || t.isServiceURL(h.name))
4655
4657
  return;
4656
4658
  n !== null && (n[h.name] = h.startTime + h.duration);
4657
4659
  let c = !1;
@@ -4660,7 +4662,7 @@ function ro(t, e) {
4660
4662
  c = !0;
4661
4663
  return;
4662
4664
  }
4663
- }), !c && t.send(an(
4665
+ }), !c && t.send(un(
4664
4666
  h.startTime + ye(),
4665
4667
  h.duration,
4666
4668
  h.responseStart && h.startTime ? h.responseStart - h.startTime : 0,
@@ -4710,7 +4712,7 @@ function ro(t, e) {
4710
4712
  loadEventStart: y,
4711
4713
  loadEventEnd: E
4712
4714
  } = performance.timing;
4713
- t.send(vi(u - c || 0, d - c || 0, f - c || 0, g - c || 0, p - c || 0, y - c || 0, E - c || 0, l, a));
4715
+ t.send(ki(u - c || 0, d - c || 0, f - c || 0, g - c || 0, p - c || 0, y - c || 0, E - c || 0, l, a));
4714
4716
  }
4715
4717
  }, 30);
4716
4718
  }
@@ -4720,37 +4722,37 @@ function ro(t, e) {
4720
4722
  if (f)
4721
4723
  return;
4722
4724
  const g = performance.now();
4723
- if (n !== null && (h = Math.max.apply(null, Object.keys(n).map((p) => n[p])), g - h > 1e3 && (d = no(n), n = null)), u !== null && (g - u > 50 && (c = g), u = g - c > 5e3 ? null : g), d !== null && u === null || g > 3e4) {
4725
+ if (n !== null && (h = Math.max.apply(null, Object.keys(n).map((p) => n[p])), g - h > 1e3 && (d = ro(n), n = null)), u !== null && (g - u > 50 && (c = g), u = g - c > 5e3 ? null : g), d !== null && u === null || g > 3e4) {
4724
4726
  f = !0, n = null;
4725
- const p = d === null ? 0 : io(a || l, d), { domContentLoadedEventEnd: y, navigationStart: E } = performance.timing, N = u === null ? Math.max(c, a, y - E || 0) : 0;
4726
- t.send(wi(p, a > h ? a : h, N));
4727
+ const p = d === null ? 0 : oo(a || l, d), { domContentLoadedEventEnd: y, navigationStart: E } = performance.timing, N = u === null ? Math.max(c, a, y - E || 0) : 0;
4728
+ t.send(Ti(p, a > h ? a : h, N));
4727
4729
  }
4728
4730
  });
4729
4731
  }
4730
4732
  }
4731
- function dt(t) {
4733
+ function ft(t) {
4732
4734
  const e = t.defaultView;
4733
4735
  return [
4734
4736
  e && e.scrollX || t.documentElement && t.documentElement.scrollLeft || t.body && t.body.scrollLeft || 0,
4735
4737
  e && e.scrollY || t.documentElement && t.documentElement.scrollTop || t.body && t.body.scrollTop || 0
4736
4738
  ];
4737
4739
  }
4738
- function oo(t, e) {
4740
+ function co(t, e) {
4739
4741
  let s = !1;
4740
4742
  const n = /* @__PURE__ */ new Map();
4741
4743
  function i(l) {
4742
- ln(l) && (ee(l) && n.set(l, [l.scrollLeft, l.scrollTop]), We(l) && n.set(l, dt(l)));
4744
+ fn(l) && (ee(l) && n.set(l, [l.scrollLeft, l.scrollTop]), qe(l) && n.set(l, ft(l)));
4743
4745
  }
4744
4746
  const r = t.safe(() => {
4745
- e || t.send(ci(...dt(document)));
4747
+ e || t.send(hi(...ft(document)));
4746
4748
  }), o = t.safe((l, a) => {
4747
4749
  const h = t.nodes.getID(a);
4748
- h !== void 0 && t.send(gi(h, l[0], l[1]));
4750
+ h !== void 0 && t.send(bi(h, l[0], l[1]));
4749
4751
  });
4750
4752
  t.attachStartCallback(r), t.attachStopCallback(() => {
4751
4753
  s = !1, n.clear();
4752
4754
  }), t.nodes.attachNodeCallback((l, a) => {
4753
- a && (ee(l) && l.scrollLeft + l.scrollTop > 0 ? n.set(l, [l.scrollLeft, l.scrollTop]) : We(l) && n.set(l, dt(l))), Je(l) && t.nodes.attachNodeListener(l, "scroll", (h) => {
4755
+ a && (ee(l) && l.scrollLeft + l.scrollTop > 0 ? n.set(l, [l.scrollLeft, l.scrollTop]) : qe(l) && n.set(l, ft(l))), Ye(l) && t.nodes.attachNodeListener(l, "scroll", (h) => {
4754
4756
  i(h.target);
4755
4757
  });
4756
4758
  }), t.attachEventListener(document, "scroll", (l) => {
@@ -4764,30 +4766,30 @@ function oo(t, e) {
4764
4766
  s && (r(), s = !1), n.forEach(o), n.clear();
4765
4767
  }, 5, !1);
4766
4768
  }
4767
- function ao(t) {
4769
+ function lo(t) {
4768
4770
  let e, s, n, i, r = document.referrer;
4769
4771
  const o = t.safe(() => {
4770
4772
  const { URL: h } = document;
4771
- h !== e && (e = h, t.send(Ui(e, r, i, document.title)), i = 0, r = e);
4773
+ h !== e && (e = h, t.send(ji(e, r, i, document.title)), i = 0, r = e);
4772
4774
  }), l = t.safe(() => {
4773
4775
  const { innerWidth: h, innerHeight: c } = window;
4774
- (h !== s || c !== n) && (s = h, n = c, t.send(ai(s, n)));
4775
- }), a = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(Ci(document.hidden)));
4776
+ (h !== s || c !== n) && (s = h, n = c, t.send(li(s, n)));
4777
+ }), a = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(_i(document.hidden)));
4776
4778
  t.attachStartCallback(() => {
4777
4779
  e = null, i = ye(), s = n = -1, o(), l(), a();
4778
4780
  }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
4779
4781
  }
4780
- function Os(t) {
4781
- return Je(t) && // @ts-ignore
4782
+ function Rs(t) {
4783
+ return Ye(t) && // @ts-ignore
4782
4784
  !!t.adoptedStyleSheets;
4783
4785
  }
4784
- let co = 15;
4785
- function wn() {
4786
- return co++;
4786
+ let ho = 15;
4787
+ function xn() {
4788
+ return ho++;
4787
4789
  }
4788
4790
  const Oe = /* @__PURE__ */ new Map();
4789
- function lo(t) {
4790
- if (t === null || !Os(document))
4791
+ function uo(t) {
4792
+ if (t === null || !Rs(document))
4791
4793
  return;
4792
4794
  const e = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = (o) => setTimeout(() => {
4793
4795
  let l = t.nodes.getID(o);
@@ -4800,16 +4802,16 @@ function lo(t) {
4800
4802
  for (const u of c) {
4801
4803
  let d = e.get(u);
4802
4804
  const f = !d;
4803
- if (d || (d = wn(), e.set(u, d)), a.includes(d) || t.send(on(d, l)), f) {
4805
+ if (d || (d = xn(), e.set(u, d)), a.includes(d) || t.send(hn(d, l)), f) {
4804
4806
  const g = u.cssRules;
4805
4807
  for (let p = 0; p < g.length; p++)
4806
- t.send(wt(d, g[p].cssText, p, t.getBaseHref()));
4808
+ t.send(vt(d, g[p].cssText, p, t.getBaseHref()));
4807
4809
  }
4808
4810
  h.push(d);
4809
4811
  }
4810
4812
  if (Symbol.iterator in a)
4811
4813
  for (const u of a)
4812
- h.includes(u) || t.send(Di(u, l));
4814
+ h.includes(u) || t.send(Ai(u, l));
4813
4815
  s.set(l, h);
4814
4816
  }, 20);
4815
4817
  function i(o) {
@@ -4830,11 +4832,11 @@ function lo(t) {
4830
4832
  o.CSSStyleSheet.prototype.replace = function(h) {
4831
4833
  return l.call(this, h).then((c) => {
4832
4834
  const u = e.get(this);
4833
- return u && t.send(rs(u, h, t.getBaseHref())), c;
4835
+ return u && t.send(os(u, h, t.getBaseHref())), c;
4834
4836
  });
4835
4837
  }, o.CSSStyleSheet.prototype.replaceSync = function(h) {
4836
4838
  const c = e.get(this);
4837
- return c && t.send(rs(c, h, t.getBaseHref())), a.call(this, h);
4839
+ return c && t.send(os(c, h, t.getBaseHref())), a.call(this, h);
4838
4840
  };
4839
4841
  };
4840
4842
  r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
@@ -4842,19 +4844,19 @@ function lo(t) {
4842
4844
  }), t.attachStartCallback(() => {
4843
4845
  n(document);
4844
4846
  }), t.nodes.attachNodeCallback((o) => {
4845
- Os(o) && n(o);
4847
+ Rs(o) && n(o);
4846
4848
  });
4847
4849
  }
4848
- function ho(t) {
4850
+ function fo(t) {
4849
4851
  if (t === null)
4850
4852
  return;
4851
4853
  if (!window.CSSStyleSheet) {
4852
- t.send(_i("no_stylesheet_prototype_in_window", ""));
4854
+ t.send(Ri("no_stylesheet_prototype_in_window", ""));
4853
4855
  return;
4854
4856
  }
4855
4857
  const e = t.safe((i, r, o) => {
4856
4858
  const l = Oe.get(i);
4857
- l && (typeof o == "string" ? t.send(wt(l, o, r, t.getBaseHref())) : t.send(os(l, r)));
4859
+ l && (typeof o == "string" ? t.send(vt(l, o, r, t.getBaseHref())) : t.send(as(l, r)));
4858
4860
  }), s = t.safe((i) => {
4859
4861
  let r = i;
4860
4862
  for (; r.parentRule; )
@@ -4870,7 +4872,7 @@ function ho(t) {
4870
4872
  return;
4871
4873
  }
4872
4874
  const a = r.cssText, h = o.cssRules, c = Array.from(h).indexOf(r);
4873
- c >= 0 ? (t.send(wt(l, a, c, t.getBaseHref())), t.send(os(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
4875
+ c >= 0 ? (t.send(vt(l, a, c, t.getBaseHref())), t.send(as(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
4874
4876
  }), n = t.safe((i) => {
4875
4877
  const { insertRule: r, deleteRule: o } = i.CSSStyleSheet.prototype, { insertRule: l, deleteRule: a } = i.CSSGroupingRule.prototype;
4876
4878
  i.CSSStyleSheet.prototype.insertRule = function(h, c = 0) {
@@ -4891,25 +4893,25 @@ function ho(t) {
4891
4893
  const r = t.nodes.getID(i);
4892
4894
  if (!r)
4893
4895
  return;
4894
- const o = i.sheet, l = wn();
4895
- Oe.set(o, l), t.send(on(l, r));
4896
+ const o = i.sheet, l = xn();
4897
+ Oe.set(o, l), t.send(hn(l, r));
4896
4898
  const a = o.cssRules;
4897
4899
  for (let h = 0; h < a.length; h++)
4898
4900
  e(o, h, a[h].cssText);
4899
4901
  });
4900
4902
  }
4901
- function uo(t) {
4903
+ function po(t) {
4902
4904
  function e(n) {
4903
4905
  const i = t.nodes.getID(n);
4904
- i !== void 0 && t.send(is(i));
4906
+ i !== void 0 && t.send(rs(i));
4905
4907
  }
4906
4908
  let s = !1;
4907
4909
  t.nodes.attachNodeCallback((n) => {
4908
4910
  B(n, "body") && (t.nodes.attachNodeListener(n, "focus", (i) => {
4909
- ln(i.target) && (e(i.target), s = !1);
4911
+ fn(i.target) && (e(i.target), s = !1);
4910
4912
  }), t.nodes.attachNodeListener(n, "blur", (i) => {
4911
4913
  i.relatedTarget === null && (s = !0, setTimeout(() => {
4912
- s && t.send(is(-1));
4914
+ s && t.send(rs(-1));
4913
4915
  }, 0));
4914
4916
  }));
4915
4917
  }), t.attachStartCallback(() => {
@@ -4919,7 +4921,7 @@ function uo(t) {
4919
4921
  n && n !== n.ownerDocument.body && e(n);
4920
4922
  }, !0);
4921
4923
  }
4922
- function fo(t) {
4924
+ function go(t) {
4923
4925
  if (!window.FontFace)
4924
4926
  return;
4925
4927
  const e = /* @__PURE__ */ new Map(), s = (n) => {
@@ -4935,7 +4937,7 @@ function fo(t) {
4935
4937
  const c = n === window ? 0 : t.nodes.getID(n.document);
4936
4938
  if (c === void 0)
4937
4939
  return;
4938
- t.active() && t.send(ns(c, ...a));
4940
+ t.active() && t.send(is(c, ...a));
4939
4941
  }
4940
4942
  super(...o);
4941
4943
  }
@@ -4943,29 +4945,29 @@ function fo(t) {
4943
4945
  n.FontFace = i;
4944
4946
  };
4945
4947
  t.observer.attachContextCallback(s), s(window), t.nodes.attachNodeCallback(t.safe((n) => {
4946
- if (!We(n))
4948
+ if (!qe(n))
4947
4949
  return;
4948
4950
  const i = e.get(n);
4949
4951
  if (!i)
4950
4952
  return;
4951
4953
  const r = n.defaultView === window ? 0 : t.nodes.getID(n);
4952
4954
  r !== void 0 && i.forEach((o) => {
4953
- t.send(ns(r, ...o));
4955
+ t.send(is(r, ...o));
4954
4956
  });
4955
4957
  }));
4956
4958
  }
4957
- function po(t, e, s, n, i) {
4959
+ function mo(t, e, s, n, i) {
4958
4960
  t.debug.log("Openreplay: attaching axios spy to instance", e);
4959
4961
  function r(d) {
4960
4962
  t.debug.log("Openreplay: capturing axios response data", d);
4961
- const { headers: f, data: g, method: p, url: y, baseURL: E } = d.config, { data: N, headers: T, status: m, response: v } = d, { data: k, headers: x, status: S } = v || {}, b = s.ignoreHeaders, _ = Array.isArray(b) ? (R) => b.includes(R) : () => b;
4963
+ const { headers: f, data: g, method: p, url: y, baseURL: E } = d.config, { data: N, headers: T, status: m, response: w } = d, { data: k, headers: x, status: S } = w || {}, b = s.ignoreHeaders, _ = Array.isArray(b) ? (R) => b.includes(R) : () => b;
4962
4964
  function M(R, U) {
4963
4965
  _(U[0]) || (R[U[0]] = U[1]);
4964
4966
  }
4965
4967
  let O = {}, D = {};
4966
4968
  f.toJSON ? O = f.toJSON() : f instanceof Headers ? f.forEach((R, U) => M(O, [U, R])) : Array.isArray(f) ? f.forEach((R) => M(O, R)) : typeof f == "object" && Object.entries(f).forEach((R) => M(O, R));
4967
- const w = x || T;
4968
- w.toJSON ? D = w.toJSON() : w instanceof Headers ? w.forEach((R, U) => M(D, [U, R])) : Array.isArray(w) ? w.forEach((R) => M(D, R)) : typeof w == "object" && Object.entries(w).forEach(([R, U]) => {
4969
+ const v = x || T;
4970
+ v.toJSON ? D = v.toJSON() : v instanceof Headers ? v.forEach((R, U) => M(D, [U, R])) : Array.isArray(v) ? v.forEach((R) => M(D, R)) : typeof v == "object" && Object.entries(v).forEach(([R, U]) => {
4969
4971
  _(R) || (D[R] = U);
4970
4972
  });
4971
4973
  const I = n({
@@ -4985,8 +4987,8 @@ function po(t, e, s, n, i) {
4985
4987
  t.debug.log("Openreplay: empty request/response info, skipping");
4986
4988
  return;
4987
4989
  }
4988
- const A = d.config.__openreplay_timing, P = performance.now() - A;
4989
- t.debug.log("Openreplay: final req object", I), t.send(ze("xhr", String(p), String(I.url), i(I.request), i(I.response), I.status, A + ye(), P, 0));
4990
+ const A = d.config.__openreplay_timing, L = performance.now() - A;
4991
+ t.debug.log("Openreplay: final req object", I), t.send(We("xhr", String(p), String(I.url), i(I.request), i(I.response), I.status, A + ye(), L, 0));
4990
4992
  }
4991
4993
  function o(d) {
4992
4994
  if (t.debug.log("Openreplay: capturing API request", d), d.__openreplay_timing = performance.now(), s.sessionTokenHeader) {
@@ -4999,7 +5001,7 @@ function po(t, e, s, n, i) {
4999
5001
  return s.failuresOnly || r(d), d;
5000
5002
  }
5001
5003
  function a(d) {
5002
- return t.debug.log("Openreplay: capturing API request error", d), go(d) && d.response ? r(d.response) : d instanceof Error && t.send($e(d, [])), Promise.reject(d);
5004
+ return t.debug.log("Openreplay: capturing API request error", d), bo(d) && d.response ? r(d.response) : d instanceof Error && t.send(Ve(d, [])), Promise.reject(d);
5003
5005
  }
5004
5006
  function h(d) {
5005
5007
  t.debug.log("Openreplay: failed API request, skipping", d);
@@ -5014,16 +5016,16 @@ function po(t, e, s, n, i) {
5014
5016
  (f = (d = e.interceptors.request).eject) == null || f.call(d, c), (p = (g = e.interceptors.response).eject) == null || p.call(g, u);
5015
5017
  });
5016
5018
  }
5017
- function go(t) {
5018
- return mo(t) && t.isAxiosError === !0;
5019
+ function bo(t) {
5020
+ return yo(t) && t.isAxiosError === !0;
5019
5021
  }
5020
- function mo(t) {
5022
+ function yo(t) {
5021
5023
  return t !== null && typeof t == "object";
5022
5024
  }
5023
- var Y;
5025
+ var Q;
5024
5026
  (function(t) {
5025
5027
  t[t.UNSENT = 0] = "UNSENT", t[t.OPENED = 1] = "OPENED", t[t.HEADERS_RECEIVED = 2] = "HEADERS_RECEIVED", t[t.LOADING = 3] = "LOADING", t[t.DONE = 4] = "DONE";
5026
- })(Y || (Y = {}));
5028
+ })(Q || (Q = {}));
5027
5029
  class jt {
5028
5030
  constructor(e = [], s, n) {
5029
5031
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.id = "", this.name = "", this.method = "", this.url = "", this.status = 0, this.statusText = "", this.cancelState = 0, this.readyState = 0, this.header = {}, this.responseType = "", this.requestHeader = {}, this.responseSize = 0, this.responseSizeText = "", this.startTime = 0, this.endTime = 0, this.duration = 0, this.getData = {}, this.requestData = null;
@@ -5040,7 +5042,7 @@ class jt {
5040
5042
  response: i
5041
5043
  });
5042
5044
  if (r)
5043
- return ze(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + ye(), this.duration, this.responseSize);
5045
+ return We(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + ye(), this.duration, this.responseSize);
5044
5046
  }
5045
5047
  writeHeaders() {
5046
5048
  const e = {};
@@ -5082,7 +5084,7 @@ const Te = (t, e) => {
5082
5084
  (t[0] === "{" || t[0] === "[") && (e = t);
5083
5085
  const s = t.split("&");
5084
5086
  s.length === 1 ? e = t : e = s.join(",");
5085
- } else if (yo(t)) {
5087
+ } else if (wo(t)) {
5086
5088
  const s = [];
5087
5089
  for (const [n, i] of t)
5088
5090
  s.push(`${n}=${typeof i == "string" ? i : "[object Object]"}`);
@@ -5090,7 +5092,7 @@ const Te = (t, e) => {
5090
5092
  } else
5091
5093
  t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : Wt(t) ? e = t : e = `can't parse body ${typeof t}`;
5092
5094
  return e;
5093
- }, bo = (t, e = {}) => {
5095
+ }, So = (t, e = {}) => {
5094
5096
  Wt(e) || (e = {});
5095
5097
  let s = t ? t.split("?") : [];
5096
5098
  if (s.shift(), s.length > 0) {
@@ -5109,14 +5111,14 @@ const Te = (t, e) => {
5109
5111
  function Wt(t) {
5110
5112
  return t !== null && typeof t == "object";
5111
5113
  }
5112
- function yo(t) {
5114
+ function wo(t) {
5113
5115
  return t == null || ArrayBuffer.isView(t) ? !1 : typeof Symbol < "u" && typeof t[Symbol.iterator] == "function";
5114
5116
  }
5115
- function Ve(t) {
5117
+ function Xe(t) {
5116
5118
  return t <= 0 ? "" : t >= 1e3 * 1e3 ? (t / 1e3 / 1e3).toFixed(1) + " MB" : t >= 1e3 ? (t / 1e3).toFixed(1) + " KB" : `${t}B`;
5117
5119
  }
5118
5120
  const Rt = (t) => (t.startsWith("//") && (t = `${new URL(window.location.href).protocol}${t}`), t.startsWith("http") ? new URL(t) : new URL(t, window.location.href));
5119
- class So {
5121
+ class vo {
5120
5122
  constructor(e, s) {
5121
5123
  this.resp = e, this.item = s, this.mockReader();
5122
5124
  }
@@ -5142,7 +5144,7 @@ class So {
5142
5144
  const s = this.resp.body.getReader;
5143
5145
  this.resp.body.getReader = () => {
5144
5146
  const n = s.apply(this.resp.body);
5145
- if (this.item.readyState === Y.DONE)
5147
+ if (this.item.readyState === Q.DONE)
5146
5148
  return n;
5147
5149
  const i = n.read, r = n.cancel;
5148
5150
  return this.item.responseType = "arraybuffer", n.read = () => i.apply(n).then((o) => {
@@ -5152,12 +5154,12 @@ class So {
5152
5154
  const l = new Uint8Array(e.length + o.value.length);
5153
5155
  l.set(e), l.set(o.value, e.length), e = l;
5154
5156
  }
5155
- return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState = o.done ? 4 : 3, this.item.statusText = o.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = Ve(this.item.responseSize), o.done && (this.item.response = Te(this.item.responseType, e)), o;
5157
+ return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState = o.done ? 4 : 3, this.item.statusText = o.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = Xe(this.item.responseSize), o.done && (this.item.response = Te(this.item.responseType, e)), o;
5156
5158
  }), n.cancel = (...o) => (this.item.cancelState = 2, this.item.statusText = "Cancel", this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = Te(this.item.responseType, e), r.apply(n, o)), n;
5157
5159
  };
5158
5160
  }
5159
5161
  }
5160
- class vo {
5162
+ class ko {
5161
5163
  constructor(e, s, n, i, r, o) {
5162
5164
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r, this.tokenUrlMatcher = o;
5163
5165
  }
@@ -5200,13 +5202,13 @@ class vo {
5200
5202
  for (const [i, r] of s.headers)
5201
5203
  e.header[i] = r, n = r.toLowerCase().indexOf("chunked") > -1 ? !0 : n;
5202
5204
  return n ? e.readyState = 3 : (e.readyState = 4, this.handleResponseBody(s.clone(), e).then((i) => {
5203
- e.responseSize = typeof i == "string" ? i.length : i.byteLength, e.responseSizeText = Ve(e.responseSize), e.response = Te(e.responseType, i);
5205
+ e.responseSize = typeof i == "string" ? i.length : i.byteLength, e.responseSizeText = Xe(e.responseSize), e.response = Te(e.responseType, i);
5204
5206
  const r = e.getMessage();
5205
5207
  r && this.sendMessage(r);
5206
5208
  }).catch((i) => {
5207
5209
  if (i.name !== "AbortError")
5208
5210
  throw i;
5209
- })), new Proxy(s, new So(s, e));
5211
+ })), new Proxy(s, new vo(s, e));
5210
5212
  };
5211
5213
  }
5212
5214
  handleResponseBody(e, s) {
@@ -5214,12 +5216,12 @@ class vo {
5214
5216
  return n && n.includes("application/json") ? (s.responseType = "json", e.text()) : n && (n.includes("text/html") || n.includes("text/plain")) ? (s.responseType = "text", e.text()) : (s.responseType = "arraybuffer", e.arrayBuffer());
5215
5217
  }
5216
5218
  }
5217
- class wo {
5219
+ class To {
5218
5220
  static create(e, s, n, i, r, o) {
5219
- return new Proxy(fetch, new vo(e, s, n, i, r, o));
5221
+ return new Proxy(fetch, new ko(e, s, n, i, r, o));
5220
5222
  }
5221
5223
  }
5222
- class ko {
5224
+ class Io {
5223
5225
  constructor(e, s, n, i, r, o, l) {
5224
5226
  this.ignoredHeaders = s, this.setSessionTokenHeader = n, this.sanitize = i, this.sendMessage = r, this.isServiceUrl = o, this.tokenUrlMatcher = l, this.XMLReq = e, this.XMLReq.onreadystatechange = () => {
5225
5227
  this.onReadyStateChange();
@@ -5258,7 +5260,7 @@ class ko {
5258
5260
  onReadyStateChange() {
5259
5261
  if (!(this.item.url && this.isServiceUrl(this.item.url)) && (this.item.readyState = this.XMLReq.readyState, this.item.responseType = this.XMLReq.responseType, this.item.endTime = performance.now(), this.item.duration = this.item.endTime - this.item.startTime, this.updateItemByReadyState(), setTimeout(() => {
5260
5262
  this.item.response = Te(this.item.responseType, this.item.response);
5261
- }, 0), this.XMLReq.readyState === Y.DONE)) {
5263
+ }, 0), this.XMLReq.readyState === Q.DONE)) {
5262
5264
  const e = this.item.getMessage();
5263
5265
  e && this.sendMessage(e);
5264
5266
  }
@@ -5278,7 +5280,7 @@ class ko {
5278
5280
  return (...n) => {
5279
5281
  var o, l;
5280
5282
  const i = n[0], r = n[1];
5281
- return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = bo(this.item.url, {}), s.apply(e, n);
5283
+ return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = So(this.item.url, {}), s.apply(e, n);
5282
5284
  };
5283
5285
  }
5284
5286
  getSend(e) {
@@ -5312,11 +5314,11 @@ class ko {
5312
5314
  */
5313
5315
  updateItemByReadyState() {
5314
5316
  switch (this.XMLReq.readyState) {
5315
- case Y.UNSENT:
5316
- case Y.OPENED:
5317
- this.item.status = Y.UNSENT, this.item.statusText = "Pending", this.item.startTime || (this.item.startTime = performance.now());
5317
+ case Q.UNSENT:
5318
+ case Q.OPENED:
5319
+ this.item.status = Q.UNSENT, this.item.statusText = "Pending", this.item.startTime || (this.item.startTime = performance.now());
5318
5320
  break;
5319
- case Y.HEADERS_RECEIVED:
5321
+ case Q.HEADERS_RECEIVED:
5320
5322
  this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.item.header = {};
5321
5323
  const e = this.XMLReq.getAllResponseHeaders() || "", s = e.split(`
5322
5324
  `);
@@ -5328,11 +5330,11 @@ class ko {
5328
5330
  this.item.header[o] = r.slice(1).join(": ");
5329
5331
  }
5330
5332
  break;
5331
- case Y.LOADING:
5332
- this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Ve(this.item.responseSize));
5333
+ case Q.LOADING:
5334
+ this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Xe(this.item.responseSize));
5333
5335
  break;
5334
- case Y.DONE:
5335
- this.item.status = this.XMLReq.status || this.item.status || 0, this.item.statusText = String(this.item.status), this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = this.XMLReq.response, this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Ve(this.item.responseSize));
5336
+ case Q.DONE:
5337
+ this.item.status = this.XMLReq.status || this.item.status || 0, this.item.statusText = String(this.item.status), this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = this.XMLReq.response, this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Xe(this.item.responseSize));
5336
5338
  break;
5337
5339
  default:
5338
5340
  this.item.status = this.XMLReq.status, this.item.statusText = "Unknown";
@@ -5340,18 +5342,18 @@ class ko {
5340
5342
  }
5341
5343
  }
5342
5344
  }
5343
- class To {
5345
+ class xo {
5344
5346
  static create(e, s, n, i, r, o) {
5345
5347
  return new Proxy(XMLHttpRequest, {
5346
5348
  construct(l) {
5347
5349
  const a = new l();
5348
- return new Proxy(a, new ko(a, e, s, n, i, r, o));
5350
+ return new Proxy(a, new Io(a, e, s, n, i, r, o));
5349
5351
  }
5350
5352
  });
5351
5353
  }
5352
5354
  }
5353
- const Io = (t) => t instanceof Blob ? t.type : t instanceof FormData ? "multipart/form-data" : t instanceof URLSearchParams ? "application/x-www-form-urlencoded;charset=UTF-8" : "text/plain;charset=UTF-8";
5354
- class xo {
5355
+ const Eo = (t) => t instanceof Blob ? t.type : t instanceof FormData ? "multipart/form-data" : t instanceof URLSearchParams ? "application/x-www-form-urlencoded;charset=UTF-8" : "text/plain;charset=UTF-8";
5356
+ class Co {
5355
5357
  constructor(e, s, n, i, r) {
5356
5358
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r;
5357
5359
  }
@@ -5360,7 +5362,7 @@ class xo {
5360
5362
  if (this.isServiceUrl(i))
5361
5363
  return e.apply(s, n);
5362
5364
  const l = Rt(i);
5363
- if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": Io(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
5365
+ if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": Eo(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
5364
5366
  o.getData = {};
5365
5367
  for (const [c, u] of l.searchParams)
5366
5368
  o.getData[c] = u;
@@ -5378,24 +5380,24 @@ class be {
5378
5380
  }
5379
5381
  static create(e, s, n, i, r) {
5380
5382
  if (be.hasSendBeacon())
5381
- return new Proxy(be.origSendBeacon, new xo(e, s, n, i, r));
5383
+ return new Proxy(be.origSendBeacon, new Co(e, s, n, i, r));
5382
5384
  }
5383
5385
  }
5384
- var Ms;
5385
- be.origSendBeacon = (Ms = window == null ? void 0 : window.navigator) == null ? void 0 : Ms.sendBeacon;
5386
- const Rs = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
5386
+ var Ps;
5387
+ be.origSendBeacon = (Ps = window == null ? void 0 : window.navigator) == null ? void 0 : Ps.sendBeacon;
5388
+ const Ds = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
5387
5389
  If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
5388
- function Eo(t, e, s, n, i, r, o) {
5390
+ function No(t, e, s, n, i, r, o) {
5389
5391
  var l;
5390
- t.XMLHttpRequest ? t.XMLHttpRequest = To.create(e, s, n, i, r, o) : Rs("XMLHttpRequest"), t.fetch ? t.fetch = wo.create(e, s, n, i, r, o) : Rs("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = be.create(e, s, n, i, r));
5392
+ t.XMLHttpRequest ? t.XMLHttpRequest = xo.create(e, s, n, i, r, o) : Ds("XMLHttpRequest"), t.fetch ? t.fetch = To.create(e, s, n, i, r, o) : Ds("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = be.create(e, s, n, i, r));
5391
5393
  }
5392
- function ft(t) {
5394
+ function pt(t) {
5393
5395
  return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
5394
5396
  }
5395
- function Ds(t) {
5397
+ function Ms(t) {
5396
5398
  return typeof t == "string" ? t.toUpperCase() : "GET";
5397
5399
  }
5398
- function Co(t, e = {}) {
5400
+ function _o(t, e = {}) {
5399
5401
  const s = Object.assign({
5400
5402
  failuresOnly: !1,
5401
5403
  ignoreHeaders: ["cookie", "set-cookie", "authorization"],
@@ -5436,30 +5438,30 @@ function Co(t, e = {}) {
5436
5438
  }
5437
5439
  const h = (c) => {
5438
5440
  if (s.useProxy)
5439
- return Eo(c, s.ignoreHeaders, o, l, (T) => t.send(T), (T) => t.isServiceURL(T), s.tokenUrlMatcher);
5441
+ return No(c, s.ignoreHeaders, o, l, (T) => t.send(T), (T) => t.isServiceURL(T), s.tokenUrlMatcher);
5440
5442
  const u = c.fetch.bind(c), d = (T, m = {}) => {
5441
5443
  if (!(typeof T == "string" || T instanceof URL) || t.isServiceURL(String(T)))
5442
5444
  return u(T, m);
5443
5445
  o(function(k, x) {
5444
5446
  m.headers === void 0 && (m.headers = {}), m.headers instanceof Headers ? m.headers.append(k, x) : Array.isArray(m.headers) ? m.headers.push([k, x]) : m.headers[k] = x;
5445
5447
  });
5446
- const v = performance.now();
5448
+ const w = performance.now();
5447
5449
  return u(T, m).then((k) => {
5448
- const x = performance.now() - v;
5450
+ const x = performance.now() - w;
5449
5451
  if (s.failuresOnly && k.status < 400)
5450
5452
  return k;
5451
5453
  const S = k.clone();
5452
5454
  return S.text().then((b) => {
5453
5455
  const _ = {}, M = {};
5454
5456
  if (n !== !0) {
5455
- const w = ([I, A]) => {
5457
+ const v = ([I, A]) => {
5456
5458
  i(I) || (_[I] = A);
5457
5459
  };
5458
- m.headers instanceof Headers ? m.headers.forEach((I, A) => w([A, I])) : Array.isArray(m.headers) ? m.headers.forEach(w) : typeof m.headers == "object" && Object.entries(m.headers).forEach(w), S.headers.forEach((I, A) => {
5460
+ m.headers instanceof Headers ? m.headers.forEach((I, A) => v([A, I])) : Array.isArray(m.headers) ? m.headers.forEach(v) : typeof m.headers == "object" && Object.entries(m.headers).forEach(v), S.headers.forEach((I, A) => {
5459
5461
  i(A) || (M[A] = I);
5460
5462
  });
5461
5463
  }
5462
- const O = Ds(m.method), D = l({
5464
+ const O = Ms(m.method), D = l({
5463
5465
  url: String(T),
5464
5466
  method: O,
5465
5467
  status: S.status,
@@ -5473,28 +5475,28 @@ function Co(t, e = {}) {
5473
5475
  body: b
5474
5476
  }
5475
5477
  });
5476
- D && t.send(ze("fetch", O, String(D.url), a(D.request), a(D.response), S.status, v + ye(), x, 0));
5478
+ D && t.send(We("fetch", O, String(D.url), a(D.request), a(D.response), S.status, w + ye(), x, 0));
5477
5479
  }).catch((b) => t.debug.error("Could not process Fetch response:", b)), k;
5478
5480
  });
5479
5481
  };
5480
5482
  c.fetch = d;
5481
5483
  const f = c.XMLHttpRequest.prototype.open, g = c.XMLHttpRequest.prototype.setRequestHeader, p = c.XMLHttpRequest.prototype.send;
5482
5484
  function y(T, m) {
5483
- const v = this;
5484
- o((x, S) => v.setRequestHeader(x, S));
5485
+ const w = this;
5486
+ o((x, S) => w.setRequestHeader(x, S));
5485
5487
  let k = 0;
5486
- return v.addEventListener("loadstart", (x) => {
5488
+ return w.addEventListener("loadstart", (x) => {
5487
5489
  k = x.timeStamp;
5488
- }), v.addEventListener("load", t.safe((x) => {
5489
- const { headers: S, body: b } = ft(v), _ = k > 0 ? x.timeStamp - k : 0, O = (v.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), D = {};
5490
+ }), w.addEventListener("load", t.safe((x) => {
5491
+ const { headers: S, body: b } = pt(w), _ = k > 0 ? x.timeStamp - k : 0, O = (w.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), D = {};
5490
5492
  O.forEach(function(A) {
5491
- const P = A.split(": "), R = P.shift();
5492
- i(R) || (D[R] = P.join(": "));
5493
+ const L = A.split(": "), R = L.shift();
5494
+ i(R) || (D[R] = L.join(": "));
5493
5495
  });
5494
- const w = Ds(T), I = l({
5496
+ const v = Ms(T), I = l({
5495
5497
  url: String(m),
5496
- method: w,
5497
- status: v.status,
5498
+ method: v,
5499
+ status: w.status,
5498
5500
  request: {
5499
5501
  headers: S,
5500
5502
  // @ts-ignore
@@ -5502,64 +5504,64 @@ function Co(t, e = {}) {
5502
5504
  },
5503
5505
  response: {
5504
5506
  headers: D,
5505
- body: v.response
5507
+ body: w.response
5506
5508
  }
5507
5509
  });
5508
- I && t.send(ze("xhr", w, String(I.url), a(I.request), a(I.response), v.status, k + ye(), _, 0));
5510
+ I && t.send(We("xhr", v, String(I.url), a(I.request), a(I.response), w.status, k + ye(), _, 0));
5509
5511
  })), f.apply(this, arguments);
5510
5512
  }
5511
5513
  function E(T) {
5512
- const m = ft(this);
5514
+ const m = pt(this);
5513
5515
  return m.body = T, p.apply(this, arguments);
5514
5516
  }
5515
5517
  function N(T, m) {
5516
5518
  if (!i(T)) {
5517
- const v = ft(this);
5518
- v.headers[T] = m;
5519
+ const w = pt(this);
5520
+ w.headers[T] = m;
5519
5521
  }
5520
5522
  return g.apply(this, arguments);
5521
5523
  }
5522
5524
  s.axiosInstances || (c.XMLHttpRequest.prototype.open = y, c.XMLHttpRequest.prototype.send = E, c.XMLHttpRequest.prototype.setRequestHeader = N);
5523
5525
  };
5524
5526
  h(window), s.axiosInstances && s.axiosInstances.forEach((c) => {
5525
- po(t, c, s, l, a);
5527
+ mo(t, c, s, l, a);
5526
5528
  }), s.captureInIframes && t.observer.attachContextCallback(t.safe(h));
5527
5529
  }
5528
- function No(t) {
5530
+ function Oo(t) {
5529
5531
  t.attachEventListener(document, "selectionchange", () => {
5530
5532
  const e = document.getSelection();
5531
5533
  if (e !== null && !e.isCollapsed) {
5532
5534
  const s = t.nodes.getID(e.anchorNode), n = t.nodes.getID(e.focusNode), i = e.toString().replace(/\s+/g, " ");
5533
- s && n && t.send(as(s, n, i));
5535
+ s && n && t.send(cs(s, n, i));
5534
5536
  } else
5535
- t.send(as(-1, -1, ""));
5537
+ t.send(cs(-1, -1, ""));
5536
5538
  });
5537
5539
  }
5538
- function _o(t) {
5540
+ function Ro(t) {
5539
5541
  function e() {
5540
5542
  document.hidden || (t.debug.log("Openreplay: tab change to" + t.session.getTabId()), t.send(Me(t.session.getTabId())));
5541
5543
  }
5542
5544
  t.attachEventListener(window, "focus", e, !1, !1);
5543
5545
  }
5544
- const Le = "/installation/javascript-sdk";
5545
- function Oo(t) {
5546
+ const Pe = "/installation/javascript-sdk";
5547
+ function Do(t) {
5546
5548
  if (t == null)
5547
- return console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${je}${Le}`), !1;
5549
+ return console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${ze}${Pe}`), !1;
5548
5550
  if (typeof t.projectKey != "string")
5549
5551
  if (typeof t.projectKey != "number") {
5550
5552
  if (typeof t.projectID != "number")
5551
- return console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${je}${Le} for more information.`), !1;
5552
- t.projectKey = t.projectID.toString(), ne("`projectID` option", "`projectKey` option", Le);
5553
+ return console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${ze}${Pe} for more information.`), !1;
5554
+ t.projectKey = t.projectID.toString(), ne("`projectID` option", "`projectKey` option", Pe);
5553
5555
  } else
5554
5556
  console.warn("OpenReplay: projectKey is expected to have a string type."), t.projectKey = t.projectKey.toString();
5555
5557
  return t.sessionToken != null && ne("`sessionToken` option", "`sessionHash` start() option", "/"), !0;
5556
5558
  }
5557
- class Ro {
5559
+ class Mo {
5558
5560
  constructor(e) {
5559
5561
  var l;
5560
5562
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
5561
5563
  window.doNotTrack == "1"), this.signalStartIssue = (a, h) => {
5562
- const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), d = this.options.ingestPoint || hn;
5564
+ const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), d = this.options.ingestPoint || pn;
5563
5565
  u.open("POST", d + "/v1/web/not-started"), u.send(JSON.stringify({
5564
5566
  trackerVersion: "14.0.4",
5565
5567
  projectKey: this.options.projectKey,
@@ -5571,14 +5573,14 @@ class Ro {
5571
5573
  }, this.handleError = (a, h = {}) => {
5572
5574
  if (this.app !== null) {
5573
5575
  if (a instanceof Error) {
5574
- const c = $e(a, [], h);
5576
+ const c = Ve(a, [], h);
5575
5577
  this.app.send(c);
5576
5578
  } else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
5577
- const c = pn(a, void 0, h);
5579
+ const c = yn(a, void 0, h);
5578
5580
  c != null && this.app.send(c);
5579
5581
  }
5580
5582
  }
5581
- }, this.crossdomainMode = !!(ni() && ((l = e.crossdomain) != null && l.enabled)), !Z || !Oo(e))
5583
+ }, this.crossdomainMode = !!(ri() && ((l = e.crossdomain) != null && l.enabled)), !Z || !Do(e))
5582
5584
  return;
5583
5585
  if (window.__OPENREPLAY__) {
5584
5586
  console.error("OpenReplay: one tracker instance has been initialised already");
@@ -5621,8 +5623,8 @@ class Ro {
5621
5623
  console.error(`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${a}`), this.signalStartIssue("missing_api", n);
5622
5624
  return;
5623
5625
  }
5624
- const r = new Er(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
5625
- this.app = r, this.crossdomainMode || (ao(r), Cr(r), Hi(r, e), _o(r)), so(r, e.mouse), oo(r, this.crossdomainMode), ho(r), lo(r), Rr(r, e), Pr(r, e), Ur(r), qr(r, e), ro(r, e), uo(r), fo(r), Co(r, e.network), No(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
5626
+ const r = new Nr(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
5627
+ this.app = r, this.crossdomainMode || (lo(r), _r(r), zi(r, e), Ro(r)), io(r, e.mouse), co(r, this.crossdomainMode), fo(r), uo(r), Mr(r, e), Br(r, e), jr(r), Vr(r, e), ao(r, e), po(r), go(r), _o(r, e.network), Oo(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
5626
5628
  const o = window.open;
5627
5629
  (e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
5628
5630
  const a = r.getTabId(), h = r.sessionStorage ?? window.sessionStorage;
@@ -5677,7 +5679,7 @@ class Ro {
5677
5679
  return this.browserEnvCheck() ? this.app === null ? Promise.reject("Browser doesn't support required api, or doNotTrack is active.") : this.app.start(e) : Promise.reject("Trying to start not in browser.");
5678
5680
  }
5679
5681
  browserEnvCheck() {
5680
- return Z ? !0 : (console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${je}${Le}`), !1);
5682
+ return Z ? !0 : (console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${ze}${Pe}`), !1);
5681
5683
  }
5682
5684
  /**
5683
5685
  * start buffering messages without starting the actual session, which gives user 30 seconds to "activate" and record
@@ -5755,7 +5757,7 @@ class Ro {
5755
5757
  ne("'userID' method", "'setUserID' method", "/"), this.setUserID(e);
5756
5758
  }
5757
5759
  setUserAnonymousID(e) {
5758
- typeof e == "string" && this.app !== null && this.app.send(Ii(e));
5760
+ typeof e == "string" && this.app !== null && this.app.send(Ei(e));
5759
5761
  }
5760
5762
  userAnonymousID(e) {
5761
5763
  ne("'userAnonymousID' method", "'setUserAnonymousID' method", "/"), this.setUserAnonymousID(e);
@@ -5775,7 +5777,7 @@ class Ro {
5775
5777
  } catch {
5776
5778
  return;
5777
5779
  }
5778
- this.app.send(ki(e, s));
5780
+ this.app.send(Ii(e, s));
5779
5781
  }
5780
5782
  }
5781
5783
  issue(e, s = null) {
@@ -5785,31 +5787,15 @@ class Ro {
5785
5787
  } catch {
5786
5788
  return;
5787
5789
  }
5788
- this.app.send(Oi(e, s));
5790
+ this.app.send(Di(e, s));
5789
5791
  }
5790
5792
  }
5791
5793
  }
5792
- const Do = 3;
5793
- function kn() {
5794
- const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
5795
- t.classList.contains("visible") ? (Us(), Tn(), e.style.display = "flex") : (Bs(), t.classList.add("visible"), e.style.display = "none");
5796
- }
5797
- function Tn() {
5798
- console.log("ghbdtn"), Us(), document.getElementById("chat-window").classList.remove("visible");
5799
- let e = parseInt(j("chatCloseCount")) || 0;
5800
- e += 1, e >= Do ? (console.log(e), Pe("disableAutoOpen", "true", 1), _n("chatCloseCount")) : (console.log(e), Pe("chatCloseCount", e, 1));
5801
- }
5802
- function In(t = null) {
5803
- t ? Rn(t) : Bs(), document.getElementById("chat-window").classList.add("visible");
5804
- }
5805
- document.addEventListener("DOMContentLoaded", () => {
5806
- setupCloseButton(), setupOutsideClick();
5807
- });
5808
- const Mo = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], Ao = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
5809
- class xn {
5794
+ const Ao = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], Po = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
5795
+ class qt {
5810
5796
  constructor(e) {
5811
5797
  var s;
5812
- this.baseURL = "https://api.wineater.com/", this.store = Mo.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || Ao;
5798
+ this.baseURL = "https://api.wineater.com/", this.store = Ao.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || Po;
5813
5799
  }
5814
5800
  async getStoreConfig(e) {
5815
5801
  console.log(e);
@@ -5847,10 +5833,30 @@ class xn {
5847
5833
  throw console.error("Fetching wine recommendations failed:", s.message), new Error(`Error in getWineRecommendations: ${s.message}`);
5848
5834
  }
5849
5835
  }
5836
+ async getPossibleDishesWithMeta(e, s) {
5837
+ try {
5838
+ const n = await fetch(`${this.baseURL}dish/possible_dishes`, {
5839
+ method: "POST",
5840
+ headers: {
5841
+ Authorization: `Bearer ${this.token}`,
5842
+ "Content-Type": "application/json"
5843
+ },
5844
+ body: JSON.stringify({
5845
+ title: e,
5846
+ description: s
5847
+ })
5848
+ }), i = await n.json();
5849
+ if (console.log(i), !n.ok)
5850
+ throw new Error(`API call failed with status ${n.status}: ${i.message || "No additional error information"}`);
5851
+ return i;
5852
+ } catch (n) {
5853
+ throw console.error("Error fetching possible dishes:", n), n;
5854
+ }
5855
+ }
5850
5856
  }
5851
5857
  class Lo {
5852
5858
  constructor() {
5853
- this.api = new xn(), this.language = "en", this.translations = {
5859
+ this.api = new qt(), this.language = "en", this.translations = {
5854
5860
  fr: {
5855
5861
  welcomeMessage: "Sublimez votre expérience gastronomique. Il vous suffit de donner les détails de votre plat, et obtenez la recommandation de compagnon de vin idéale. Que voulez-vous manger?",
5856
5862
  noResultsFound: "Aucun résultat trouvé.",
@@ -5862,7 +5868,10 @@ class Lo {
5862
5868
  region: "Région",
5863
5869
  type: "Type",
5864
5870
  reason: "Suggestion",
5865
- moreInfo: "Plus d'infos"
5871
+ moreInfo: "Plus d'infos",
5872
+ winePairingIntro: "Pour ce vin, voici quelques suggestions de plats :",
5873
+ askForDinner: "Que voulez-vous manger ce soir?",
5874
+ clearChatButton: "Effacer le chat"
5866
5875
  },
5867
5876
  es: {
5868
5877
  welcomeMessage: "Mejore su experiencia gastronómica. Solo proporcione los detalles de su plato y obtenga la recomendación de vino ideal. ¿Qué le gustaría comer?",
@@ -5875,7 +5884,10 @@ class Lo {
5875
5884
  region: "Región",
5876
5885
  type: "Tipo",
5877
5886
  reason: "Sugerencia",
5878
- moreInfo: "Más info"
5887
+ moreInfo: "Más info",
5888
+ winePairingIntro: "Para este vino, aquí tienes algunas sugerencias de platos:",
5889
+ askForDinner: "¿Qué te gustaría cenar?",
5890
+ clearChatButton: "Limpiar el chat"
5879
5891
  },
5880
5892
  en: {
5881
5893
  welcomeMessage: "Enhance your dining experience. Just provide your dish details and get the ideal wine pairing. What would you like to eat?",
@@ -5888,7 +5900,10 @@ class Lo {
5888
5900
  region: "Region",
5889
5901
  type: "Type",
5890
5902
  reason: "Suggestion",
5891
- moreInfo: "More info"
5903
+ moreInfo: "More info",
5904
+ winePairingIntro: "For this wine, here are some suggested dishes:",
5905
+ askForDinner: "What would you like to have for dinner?",
5906
+ clearChatButton: "Clear Chat"
5892
5907
  },
5893
5908
  de: {
5894
5909
  welcomeMessage: "Verbessern Sie Ihr kulinarisches Erlebnis. Geben Sie einfach die Details Ihres Gerichts an und erhalten Sie die ideale Weinempfehlung. Was möchten Sie essen?",
@@ -5901,7 +5916,10 @@ class Lo {
5901
5916
  region: "Region",
5902
5917
  type: "Typ",
5903
5918
  reason: "Anregung",
5904
- moreInfo: "Mehr Info"
5919
+ moreInfo: "Mehr Info",
5920
+ winePairingIntro: "Für diesen Wein gibt es folgende Essensvorschläge:",
5921
+ askForDinner: "Was möchten Sie zum Abendessen essen?",
5922
+ clearChatButton: "Chat löschen"
5905
5923
  }
5906
5924
  };
5907
5925
  }
@@ -5917,12 +5935,44 @@ class Lo {
5917
5935
  return this.translations[this.language][e] || e;
5918
5936
  }
5919
5937
  }
5920
- const Q = new Lo();
5921
- class Po {
5938
+ const q = new Lo(), Fo = 3;
5939
+ let Le = null;
5940
+ function En() {
5941
+ const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
5942
+ t.classList.contains("visible") ? (Ws(), Cn(), e.style.display = "flex") : (Le && (clearTimeout(Le), Le = null), zs(), t.classList.add("visible"), e.style.display = "none");
5943
+ }
5944
+ function Cn() {
5945
+ console.log("ghbdtn"), Ws(), document.getElementById("chat-window").classList.remove("visible");
5946
+ let e = parseInt(j("chatCloseCount")) || 0;
5947
+ e += 1, e >= Fo ? (console.log(e), Fe("disableAutoOpen", "true", 1), Rn("chatCloseCount")) : (console.log(e), Fe("chatCloseCount", e, 1));
5948
+ }
5949
+ function Bo(t) {
5950
+ const e = document.getElementById("chat-window"), s = document.getElementById("message-container"), n = document.querySelector("#input-container input");
5951
+ s.innerHTML = "", e.classList.add("visible");
5952
+ const i = document.createElement("div");
5953
+ i.className = "message api", i.textContent = q.translate("winePairingIntro"), s.appendChild(i), t.slice(0, 3).forEach((o) => {
5954
+ const l = document.createElement("div");
5955
+ l.className = "message dish-message", l.textContent = o, l.addEventListener("click", () => {
5956
+ n.value = o;
5957
+ }), s.appendChild(l);
5958
+ });
5959
+ const r = document.createElement("div");
5960
+ r.className = "message api", r.textContent = q.translate("askForDinner"), s.appendChild(r), s.scrollTop = s.scrollHeight;
5961
+ }
5962
+ function Uo(t = null) {
5963
+ t ? Mn(t) : zs(), document.getElementById("chat-window").classList.add("visible");
5964
+ }
5965
+ document.addEventListener("DOMContentLoaded", () => {
5966
+ setupCloseButton(), setupOutsideClick();
5967
+ });
5968
+ function Ho(t) {
5969
+ Le = t;
5970
+ }
5971
+ class jo {
5922
5972
  constructor() {
5923
5973
  var s;
5924
- this.api = new xn();
5925
- const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || Q.translate("welcomeMessage");
5974
+ this.api = new qt();
5975
+ const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || q.translate("welcomeMessage");
5926
5976
  this.displayFirstMessage(e);
5927
5977
  }
5928
5978
  initialize() {
@@ -5939,11 +5989,11 @@ class Po {
5939
5989
  if (s) {
5940
5990
  this.displayMessage(s, "user"), e.value = "", this.showTypingIndicator();
5941
5991
  try {
5942
- Dn(s);
5992
+ An(s);
5943
5993
  const n = await this.api.getWineRecommendations(s);
5944
5994
  this.hideTypingIndicator(), n && n.length ? this.displayResults(n) : this.displayMessage("No results found.", "api");
5945
5995
  } catch {
5946
- this.hideTypingIndicator(), this.displayMessage(Q.translate("somethingWentWrong"), "api");
5996
+ this.hideTypingIndicator(), this.displayMessage(q.translate("somethingWentWrong"), "api");
5947
5997
  }
5948
5998
  }
5949
5999
  }
@@ -5958,11 +6008,11 @@ class Po {
5958
6008
  i.textContent = e, i.className = "message " + s, n.appendChild(i), n.scrollTop = n.scrollHeight;
5959
6009
  }
5960
6010
  sendAnalytics(e) {
5961
- console.log(e), An(e);
6011
+ console.log(e), Ln(e);
5962
6012
  }
5963
6013
  displayResults(e) {
5964
6014
  const s = document.getElementById("message-container");
5965
- Mn(e.map((n) => n.Title)), e.forEach((n) => {
6015
+ Pn(e.map((n) => n.Title)), e.forEach((n) => {
5966
6016
  const i = document.createElement("div");
5967
6017
  i.className = "wine-item";
5968
6018
  const r = document.createElement("img");
@@ -5970,44 +6020,70 @@ class Po {
5970
6020
  const o = document.createElement("div");
5971
6021
  o.innerHTML = `
5972
6022
  <strong>${n.Title}</strong><br>
5973
- ${Q.translate("price")}: ${n.Price}<br>
5974
- ${Q.translate("region")}: ${n.Region}<br>
5975
- ${Q.translate("type")}: ${n.Type}<br>
5976
- <a href="${n.Url}" target="_blank">${Q.translate("moreInfo")}</a>
6023
+ ${q.translate("price")}: ${n.Price}<br>
6024
+ ${q.translate("region")}: ${n.Region}<br>
6025
+ ${q.translate("type")}: ${n.Type}<br>
6026
+ <a href="${n.Url}" target="_blank">${q.translate("moreInfo")}</a>
5977
6027
  `, o.querySelector("a").addEventListener("click", (a) => {
5978
6028
  a.preventDefault(), this.sendAnalytics(n.Title), window.open(n.Url, "_blank");
5979
6029
  }), i.appendChild(o), s.appendChild(i), this.displayFirstMessage(n.Reason);
5980
6030
  }), s.scrollTop = s.scrollHeight;
5981
6031
  }
5982
6032
  }
5983
- const Re = {
6033
+ const zo = new qt(), Re = {
5984
6034
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
5985
6035
  // Matches any product page like 'producto/any-product-name/'
5986
6036
  // CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
6037
+ }, As = {
6038
+ FESTIVAL_PAGES: /festival/,
6039
+ // Matches any URL containing 'festival'
6040
+ TASTING_PAGES: /tasting/
6041
+ // Matches any URL containing 'tasting'
6042
+ };
6043
+ var Ls, Fs;
6044
+ const Wo = {
6045
+ FESTIVAL_PAGES: ((Ls = window.wineaterData) == null ? void 0 : Ls.FESTIVAL_PAGES) || As.FESTIVAL_PAGES,
6046
+ TASTING_PAGES: ((Fs = window.wineaterData) == null ? void 0 : Fs.TASTING_PAGES) || As.TASTING_PAGES
5987
6047
  };
5988
- var As, Ls;
5989
- const pt = {
5990
- PRODUCT_PAGES: ((As = window.wineaterData) == null ? void 0 : As.PRODUCT_PAGES) || Re.PRODUCT_PAGES,
5991
- CART_PAGE: ((Ls = window.wineaterData) == null ? void 0 : Ls.CART_PAGE) || (Re == null ? void 0 : Re.CART_PAGE)
6048
+ var Bs, Us;
6049
+ const qo = {
6050
+ PRODUCT_PAGES: ((Bs = window.wineaterData) == null ? void 0 : Bs.PRODUCT_PAGES) || Re.PRODUCT_PAGES,
6051
+ CART_PAGE: ((Us = window.wineaterData) == null ? void 0 : Us.CART_PAGE) || (Re == null ? void 0 : Re.CART_PAGE)
5992
6052
  };
5993
- function Fo() {
6053
+ async function $o() {
6054
+ var e, s;
5994
6055
  const t = window.location.href;
5995
- return console.log(pt), !!(pt.PRODUCT_PAGES.test(t) || pt.CART_PAGE.test(t));
6056
+ for (const [n, i] of Object.entries(Wo))
6057
+ if (i.test(t))
6058
+ return !1;
6059
+ for (const [n, i] of Object.entries(qo))
6060
+ if (i.test(t))
6061
+ try {
6062
+ const r = ((e = document.querySelector('meta[name="title"]')) == null ? void 0 : e.getAttribute("content")) || document.title, o = ((s = document.querySelector('meta[name="description"]')) == null ? void 0 : s.getAttribute("content")) || "", l = await zo.getPossibleDishesWithMeta(r, o);
6063
+ console.log(l);
6064
+ const a = setTimeout(() => {
6065
+ Bo(l);
6066
+ }, 15e3);
6067
+ return Ho(a), !0;
6068
+ } catch (r) {
6069
+ return console.error("Error fetching dishes:", r), !1;
6070
+ }
6071
+ return !1;
5996
6072
  }
5997
- const Bo = new Ro({
6073
+ const Vo = new Mo({
5998
6074
  projectKey: "PA8j9fAi49i6g2QnvpNs"
5999
- }), Uo = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
6075
+ }), Xo = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
6000
6076
  document.addEventListener("DOMContentLoaded", () => {
6001
- window.toggleChatWindow = kn, window.closeChatWindow = Tn, window.openChatWindow = In;
6077
+ window.toggleChatWindow = En, window.closeChatWindow = Cn, window.openChatWindow = Uo;
6002
6078
  });
6003
- function Ho() {
6079
+ function Go() {
6004
6080
  var s;
6005
- Bo.start();
6081
+ Vo.start();
6006
6082
  const e = `
6007
6083
  <div id="chatbot-container">
6008
6084
  <div id="chat-icon" onclick="toggleChatWindow()">
6009
6085
  <img src="https://landing-static.s3.eu-central-1.amazonaws.com/images/chat-icon.svg" alt="Chat Icon"> <!-- Update the path to your logo image -->
6010
- <span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || Q.translate("chatButton")}</span>
6086
+ <span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || q.translate("chatButton")}</span>
6011
6087
  </div>
6012
6088
 
6013
6089
  <div id="chat-window" class="hidden">
@@ -6026,48 +6102,43 @@ function Ho() {
6026
6102
  <span></span><span></span><span></span>
6027
6103
  </div>
6028
6104
  <div id="input-container">
6029
- <input type="text" id="user-input" placeholder="${Q.translate("inputPlaceholder")}">
6030
- <button id="send-button">${Q.translate("sendButton")}</button>
6105
+ <input type="text" id="user-input" placeholder="${q.translate("inputPlaceholder")}">
6106
+ <button id="send-button">${q.translate("sendButton")}</button>
6031
6107
  </div>
6032
6108
  </div>
6033
6109
  </div>
6034
6110
  `;
6035
6111
  document.body.insertAdjacentHTML("beforeend", e);
6036
6112
  }
6037
- function jo() {
6038
- document.getElementById("close-btn").addEventListener("click", kn);
6113
+ function Ko() {
6114
+ document.getElementById("close-btn").addEventListener("click", En);
6039
6115
  }
6040
- function zo() {
6116
+ function Jo() {
6041
6117
  window.addEventListener("click", function(t) {
6042
6118
  const e = document.getElementById("chat-window"), s = document.getElementById("chat-icon");
6043
6119
  !e.contains(t.target) && !s.contains(t.target) && (e.classList.remove("visible"), s.style.display = "flex");
6044
6120
  });
6045
6121
  }
6046
- function Wo(t) {
6122
+ function Yo(t) {
6047
6123
  console.log(t);
6048
6124
  const e = document.getElementById("chat-icon"), s = document.getElementById("chat-window");
6049
6125
  e.className = "", s.className = "", t === "right-center" ? (e.classList.add("chat-icon-right-center"), s.classList.add("right-center-aligned")) : e.classList.add("chat-icon-bottom-right");
6050
6126
  }
6051
- function qo(t = 1e4) {
6052
- setTimeout(() => {
6053
- In(window.location.href);
6054
- }, t);
6055
- }
6056
6127
  document.addEventListener("DOMContentLoaded", () => {
6057
- !j("disableAutoOpen") && Fo() && qo(1e4);
6128
+ j("disableAutoOpen") || $o();
6058
6129
  });
6059
- var Ps;
6130
+ var Hs;
6060
6131
  if (typeof window < "u") {
6061
- let t = ((Ps = window == null ? void 0 : window.wineaterData) == null ? void 0 : Ps.POSITION) || "bottom-right";
6132
+ let t = ((Hs = window == null ? void 0 : window.wineaterData) == null ? void 0 : Hs.POSITION) || "bottom-right";
6062
6133
  window.addEventListener("DOMContentLoaded", async () => {
6063
6134
  var r;
6064
6135
  const s = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"].find((o) => window.location.href.includes(o)) || null;
6065
6136
  let n;
6066
- s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Biobio" && (t = "right-center")), await Q.fetchConfig(n || "Demo"), Ho(), jo(), zo(), Wo(t), Pe("chatbotToken", ((r = window.wineaterData) == null ? void 0 : r.CLIENT_TOKEN) || Uo, 365), On(), new Po().initialize();
6137
+ s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Biobio" && (t = "right-center")), await q.fetchConfig(n || "Demo"), Go(), Ko(), Jo(), Yo(t), Fe("chatbotToken", ((r = window.wineaterData) == null ? void 0 : r.CLIENT_TOKEN) || Xo, 365), Dn(), new jo().initialize();
6067
6138
  });
6068
6139
  }
6069
6140
  export {
6070
- Tn as closeChatWindow,
6071
- In as openChatWindow,
6072
- kn as toggleChatWindow
6141
+ Cn as closeChatWindow,
6142
+ Uo as openChatWindow,
6143
+ En as toggleChatWindow
6073
6144
  };