@sprig-technologies/sprig-browser 2.26.4 → 2.26.6

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,7 +1,7 @@
1
- var bs = Object.defineProperty;
2
- var _s = (e, t, n) => t in e ? bs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var K = (e, t, n) => (_s(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- var Re = /* @__PURE__ */ ((e) => (e.Closed = "close.click", e.Complete = "survey.completed", e.PageChange = "page.change", e.API = "api", e.Override = "override", e))(Re || {}), P = /* @__PURE__ */ ((e) => (e.ReplayCapture = "replay.capture", e.SDKReady = "sdk.ready", e.SurveyAppeared = "survey.appeared", e.SurveyClosed = "survey.closed", e.SurveyDimensions = "survey.dimensions", e.SurveyFadingOut = "survey.fadingOut", e.SurveyHeight = "survey.height", e.SurveyPresented = "survey.presented", e.SurveyLifeCycle = "survey.lifeCycle", e.SurveyWidth = "survey.width", e.SurveyWillClose = "survey.willClose", e.SurveyWillPresent = "survey.will.present", e.CloseSurveyOnOverlayClick = "close.survey.overlayClick", e.VisitorIDUpdated = "visitor.id.updated", e.QuestionAnswered = "question.answered", e))(P || {}), Xt = /* @__PURE__ */ ((e) => (e.SurveyId = "survey.id", e))(Xt || {});
1
+ var _s = Object.defineProperty;
2
+ var Ss = (e, t, n) => t in e ? _s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var K = (e, t, n) => (Ss(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ var Re = /* @__PURE__ */ ((e) => (e.Closed = "close.click", e.Complete = "survey.completed", e.PageChange = "page.change", e.API = "api", e.Override = "override", e))(Re || {}), O = /* @__PURE__ */ ((e) => (e.ReplayCapture = "replay.capture", e.SDKReady = "sdk.ready", e.SurveyAppeared = "survey.appeared", e.SurveyClosed = "survey.closed", e.SurveyDimensions = "survey.dimensions", e.SurveyFadingOut = "survey.fadingOut", e.SurveyHeight = "survey.height", e.SurveyPresented = "survey.presented", e.SurveyLifeCycle = "survey.lifeCycle", e.SurveyWidth = "survey.width", e.SurveyWillClose = "survey.willClose", e.SurveyWillPresent = "survey.will.present", e.CloseSurveyOnOverlayClick = "close.survey.overlayClick", e.VisitorIDUpdated = "visitor.id.updated", e.QuestionAnswered = "question.answered", e))(O || {}), Xt = /* @__PURE__ */ ((e) => (e.SurveyId = "survey.id", e))(Xt || {});
5
5
  const mr = {
6
6
  // for controller
7
7
  SDK_READY: "sdk.ready",
@@ -39,48 +39,48 @@ const mr = {
39
39
  /* SurveyId */
40
40
  }
41
41
  };
42
- var xn = /* @__PURE__ */ ((e) => (e.VerifyViewVersion = "verify.view.version", e.CurrentQuestion = "survey.question", e.ViewPrototypeClick = "question.prototype.click", e.ViewAgreementClick = "question.agreement.click", e.RecordedTaskStart = "recorded.task.start", e.RecordedTaskPermissionScreen = "recorded.task.permission.screen", e.SurveyComplete = "survey.complete", e))(xn || {}), li = /* @__PURE__ */ ((e) => (e.ViewVersion = "view.version", e.QuestionId = "qid", e.Props = "props", e))(li || {});
42
+ var xn = /* @__PURE__ */ ((e) => (e.VerifyViewVersion = "verify.view.version", e.CurrentQuestion = "survey.question", e.ViewPrototypeClick = "question.prototype.click", e.ViewAgreementClick = "question.agreement.click", e.RecordedTaskStart = "recorded.task.start", e.RecordedTaskPermissionScreen = "recorded.task.permission.screen", e.SurveyComplete = "survey.complete", e))(xn || {}), ci = /* @__PURE__ */ ((e) => (e.ViewVersion = "view.version", e.QuestionId = "qid", e.Props = "props", e))(ci || {});
43
43
  let Rt;
44
- const Ss = new Uint8Array(16);
45
- function Es() {
44
+ const Es = new Uint8Array(16);
45
+ function ks() {
46
46
  if (!Rt && (Rt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Rt))
47
47
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
48
- return Rt(Ss);
48
+ return Rt(Es);
49
49
  }
50
50
  const q = [];
51
51
  for (let e = 0; e < 256; ++e)
52
52
  q.push((e + 256).toString(16).slice(1));
53
- function ks(e, t = 0) {
53
+ function Ls(e, t = 0) {
54
54
  return q[e[t + 0]] + q[e[t + 1]] + q[e[t + 2]] + q[e[t + 3]] + "-" + q[e[t + 4]] + q[e[t + 5]] + "-" + q[e[t + 6]] + q[e[t + 7]] + "-" + q[e[t + 8]] + q[e[t + 9]] + "-" + q[e[t + 10]] + q[e[t + 11]] + q[e[t + 12]] + q[e[t + 13]] + q[e[t + 14]] + q[e[t + 15]];
55
55
  }
56
- const Ls = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Dr = {
57
- randomUUID: Ls
56
+ const Is = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Tr = {
57
+ randomUUID: Is
58
58
  };
59
59
  function nt(e, t, n) {
60
- if (Dr.randomUUID && !t && !e)
61
- return Dr.randomUUID();
60
+ if (Tr.randomUUID && !t && !e)
61
+ return Tr.randomUUID();
62
62
  e = e || {};
63
- const r = e.random || (e.rng || Es)();
63
+ const r = e.random || (e.rng || ks)();
64
64
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
65
65
  n = n || 0;
66
66
  for (let i = 0; i < 16; ++i)
67
67
  t[n + i] = r[i];
68
68
  return t;
69
69
  }
70
- return ks(r);
70
+ return Ls(r);
71
71
  }
72
- var Is = class extends Error {
72
+ var Us = class extends Error {
73
73
  constructor(e, t, n) {
74
74
  super(
75
75
  `Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`
76
76
  ), this.emitter = e, this.type = t, this.count = n, this.name = "MaxListenersExceededWarning";
77
77
  }
78
- }, ci = class {
78
+ }, ui = class {
79
79
  static listenerCount(e, t) {
80
80
  return e.listenerCount(t);
81
81
  }
82
82
  constructor() {
83
- this.events = /* @__PURE__ */ new Map(), this.maxListeners = ci.defaultMaxListeners, this.hasWarnedAboutPotentialMemoryLeak = !1;
83
+ this.events = /* @__PURE__ */ new Map(), this.maxListeners = ui.defaultMaxListeners, this.hasWarnedAboutPotentialMemoryLeak = !1;
84
84
  }
85
85
  _emitInternalEvent(e, t, n) {
86
86
  this.emit(
@@ -138,7 +138,7 @@ var Is = class extends Error {
138
138
  const n = this._getListeners(e).concat(t);
139
139
  if (this.events.set(e, n), this.maxListeners > 0 && this.listenerCount(e) > this.maxListeners && !this.hasWarnedAboutPotentialMemoryLeak) {
140
140
  this.hasWarnedAboutPotentialMemoryLeak = !0;
141
- const r = new Is(
141
+ const r = new Us(
142
142
  this,
143
143
  e,
144
144
  this.listenerCount(e)
@@ -202,34 +202,34 @@ var Is = class extends Error {
202
202
  rawListeners(e) {
203
203
  return this.listeners(e);
204
204
  }
205
- }, ui = ci;
206
- ui.defaultMaxListeners = 10;
207
- const R = new ui();
205
+ }, di = ui;
206
+ di.defaultMaxListeners = 10;
207
+ const R = new di();
208
208
  var ut = /* @__PURE__ */ ((e) => (e.BottomLeft = "bottomLeft", e.BottomRight = "bottomRight", e.Center = "center", e.TopLeft = "topLeft", e.TopRight = "topRight", e))(ut || {}), oe = /* @__PURE__ */ ((e) => (e.Error = "x-ul-error", e.EnvironmentID = "x-ul-environment-id", e.InstallationMethod = "x-ul-installation-method", e.PartnerAnonymousId = "x-ul-anonymous-id", e.Platform = "userleap-platform", e.PreviewMode = "x-ul-preview-mode", e.UserID = "x-ul-user-id", e.VisitorID = "x-ul-visitor-id", e))(oe || {}), dn = /* @__PURE__ */ ((e) => (e.Email = "email", e.Link = "link", e.Web = "web", e))(dn || {}), He = /* @__PURE__ */ ((e) => (e.Npm = "web-npm", e.NpmBundled = "web-npm-bundled", e.Gtm = "web-gtm", e.Segment = "web-segment", e.SegmentAndroid = "android-segment", e.SegmentReactNative = "react-native-segment", e.SegmentIOS = "ios-segment", e.Snippet = "web-snippet", e))(He || {});
209
209
  window.UserLeap && window.Sprig && (window.Sprig._gtm ? window.Sprig = window.UserLeap : window.UserLeap = window.Sprig);
210
210
  window.UserLeap || (window.UserLeap = window.Sprig);
211
211
  window.Sprig || (window.Sprig = window.UserLeap);
212
- const Us = "rgba(255,255,255, 0.95)", As = "rgba(0,0,0,0.9)", xs = "360px", gn = "0px", di = () => {
212
+ const As = "rgba(255,255,255, 0.95)", xs = "rgba(0,0,0,0.9)", Ps = "360px", gn = "0px", pi = () => {
213
213
  window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container", document.body.appendChild(window.UserLeap.container);
214
- }, pi = (e) => {
215
- Ts();
214
+ }, hi = (e) => {
215
+ Cs();
216
216
  const t = window.UserLeap.container;
217
217
  if (!(!t || !t.parentNode))
218
218
  try {
219
- t.parentNode.removeChild(t), window.UserLeap.container = null, X("trackStartUrl", null), R.emit(P.SurveyLifeCycle, {
219
+ t.parentNode.removeChild(t), window.UserLeap.container = null, X("trackStartUrl", null), R.emit(O.SurveyLifeCycle, {
220
220
  state: "dismissed"
221
- }), R.emit(P.SurveyClosed, {
222
- name: P.SurveyClosed,
221
+ }), R.emit(O.SurveyClosed, {
222
+ name: O.SurveyClosed,
223
223
  initiator: e
224
224
  });
225
225
  } catch (n) {
226
226
  console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} ` + t), n instanceof Error && window.UserLeap.reportError("dismissActiveSurvey", n);
227
227
  }
228
- }, hi = () => {
229
- R.on(P.SurveyWillClose, ({
228
+ }, fi = () => {
229
+ R.on(O.SurveyWillClose, ({
230
230
  initiator: e
231
231
  }) => {
232
- pi(e);
232
+ hi(e);
233
233
  });
234
234
  }, Os = (e, t) => {
235
235
  const r = {
@@ -246,8 +246,8 @@ const Us = "rgba(255,255,255, 0.95)", As = "rgba(0,0,0,0.9)", xs = "360px", gn =
246
246
  zIndex: 2147483646
247
247
  }
248
248
  }, i = t ? e.overlayStyleMobile : e.overlayStyle;
249
- r["background-color"] = i === "light" ? Us : As, t || (r.margin = "auto"), window.UserLeap.container && Object.assign(window.UserLeap.container.style, r);
250
- }, Ps = (e, t, n) => {
249
+ r["background-color"] = i === "light" ? As : xs, t || (r.margin = "auto"), window.UserLeap.container && Object.assign(window.UserLeap.container.style, r);
250
+ }, Rs = (e, t, n) => {
251
251
  var a, l;
252
252
  const r = {
253
253
  position: "fixed",
@@ -260,7 +260,7 @@ const Us = "rgba(255,255,255, 0.95)", As = "rgba(0,0,0,0.9)", xs = "360px", gn =
260
260
  maxWidth: "100%"
261
261
  }, i = Object.assign({}, t, window.UserLeap);
262
262
  let s, o = !1;
263
- return n ? ((a = window.UserLeap.windowDimensions) != null && a.width ? r.width = `${window.UserLeap.windowDimensions.width}px` : r.width = "100%", (l = window.UserLeap.windowDimensions) != null && l.height ? r.maxHeight = `${window.UserLeap.windowDimensions.height - 20}px` : window.UserLeap.maxHeight ? r.maxHeight = window.UserLeap.maxHeight : r.maxHeight = `${document.body.clientHeight - 20}px`, ["light", "dark"].includes(i.overlayStyleMobile) && (o = !0)) : (r.width = xs, r.maxHeight = window.UserLeap.maxHeight || "66vh", i.framePosition === ut.BottomLeft ? s = {
263
+ return n ? ((a = window.UserLeap.windowDimensions) != null && a.width ? r.width = `${window.UserLeap.windowDimensions.width}px` : r.width = "100%", (l = window.UserLeap.windowDimensions) != null && l.height ? r.maxHeight = `${window.UserLeap.windowDimensions.height - 20}px` : window.UserLeap.maxHeight ? r.maxHeight = window.UserLeap.maxHeight : r.maxHeight = `${document.body.clientHeight - 20}px`, ["light", "dark"].includes(i.overlayStyleMobile) && (o = !0)) : (r.width = Ps, r.maxHeight = window.UserLeap.maxHeight || "66vh", i.framePosition === ut.BottomLeft ? s = {
264
264
  left: gn
265
265
  } : i.framePosition === ut.TopLeft ? s = {
266
266
  left: gn,
@@ -271,31 +271,31 @@ const Us = "rgba(255,255,255, 0.95)", As = "rgba(0,0,0,0.9)", xs = "360px", gn =
271
271
  margin: "auto",
272
272
  position: "static"
273
273
  }, r.maxHeight = null)), o && Os(i, n), Object.assign(e.style, r, s), o;
274
- }, Rs = (e, t, n) => {
274
+ }, Ds = (e, t, n) => {
275
275
  var u, c;
276
276
  const r = "ul-frame";
277
- di(), Ds();
277
+ pi(), Ts();
278
278
  const i = document.createElement("iframe");
279
279
  i.id = r, i.setAttribute("title", "Sprig User Feedback Dialog");
280
- const s = Ps(i, e, t);
281
- hi(), i.setHeight = (p) => {
282
- parseInt(i.style.height) != p && (i.style.height = `${p}px`, R.emit(P.SurveyHeight, {
283
- name: P.SurveyHeight,
280
+ const s = Rs(i, e, t);
281
+ fi(), i.setHeight = (p) => {
282
+ parseInt(i.style.height) != p && (i.style.height = `${p}px`, R.emit(O.SurveyHeight, {
283
+ name: O.SurveyHeight,
284
284
  contentFrameHeight: p
285
285
  }));
286
286
  };
287
287
  let o = !1;
288
288
  i.setWidth = (p) => {
289
- (parseInt(i.style.width) != p || !o) && (o = !0, i.style.width = `${p}px`, R.emit(P.SurveyWidth, {
290
- name: P.SurveyWidth,
289
+ (parseInt(i.style.width) != p || !o) && (o = !0, i.style.width = `${p}px`, R.emit(O.SurveyWidth, {
290
+ name: O.SurveyWidth,
291
291
  contentFrameWidth: p
292
292
  }));
293
293
  }, (u = window.UserLeap.container) == null || u.appendChild(i), e && (t ? e.exitOnOverlayClickMobile : e.exitOnOverlayClick) && window.UserLeap.container && (window.UserLeap.container.onclick = () => {
294
- R.emit(P.CloseSurveyOnOverlayClick);
295
- }), R.emit(P.SurveyLifeCycle, {
294
+ R.emit(O.CloseSurveyOnOverlayClick);
295
+ }), R.emit(O.SurveyLifeCycle, {
296
296
  state: "presented"
297
- }), R.emit(P.SurveyPresented, {
298
- name: P.SurveyPresented,
297
+ }), R.emit(O.SurveyPresented, {
298
+ name: O.SurveyPresented,
299
299
  [Xt.SurveyId]: n
300
300
  });
301
301
  const a = (c = i.contentWindow) == null ? void 0 : c.document;
@@ -308,22 +308,22 @@ const Us = "rgba(255,255,255, 0.95)", As = "rgba(0,0,0,0.9)", xs = "360px", gn =
308
308
  hasOverlay: s,
309
309
  iframe: i
310
310
  };
311
- }, fi = {
312
- [P.SurveyFadingOut]: () => {
311
+ }, mi = {
312
+ [O.SurveyFadingOut]: () => {
313
313
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, {
314
314
  "background-color": "rgba(0,0,0,0)"
315
315
  });
316
316
  }
317
- }, Ds = () => {
318
- Object.entries(fi).forEach(([e, t]) => {
317
+ }, Ts = () => {
318
+ Object.entries(mi).forEach(([e, t]) => {
319
319
  R.on(e, t);
320
320
  });
321
- }, Ts = () => {
322
- Object.entries(fi).forEach(([e, t]) => {
321
+ }, Cs = () => {
322
+ Object.entries(mi).forEach(([e, t]) => {
323
323
  R.off(e, t);
324
324
  });
325
- }, Cs = "!launch_darkly_";
326
- class Bs {
325
+ }, Bs = "!launch_darkly_";
326
+ class js {
327
327
  constructor() {
328
328
  K(this, "_ldData", {});
329
329
  }
@@ -346,16 +346,16 @@ class Bs {
346
346
  try {
347
347
  return !t || typeof t != "object" || Array.isArray(t) ? !1 : (Object.keys(this._ldData).forEach((n) => {
348
348
  delete this._ldData[n];
349
- }), Object.keys(t).forEach((n) => this._ldData[`${Cs}${n}`] = (t[n] ?? 0) + 1), !0);
349
+ }), Object.keys(t).forEach((n) => this._ldData[`${Bs}${n}`] = (t[n] ?? 0) + 1), !0);
350
350
  } catch (n) {
351
351
  return n instanceof Error && window.UserLeap.reportError("setAllLDFlagsVariations", n), console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."), !1;
352
352
  }
353
353
  }
354
354
  }
355
- const On = new Bs();
356
- Object.freeze(On);
357
- const js = "!optimizely_experiments_";
358
- class Ns {
355
+ const Pn = new js();
356
+ Object.freeze(Pn);
357
+ const Ns = "!optimizely_experiments_";
358
+ class Ks {
359
359
  constructor() {
360
360
  K(this, "_optimizelyData", {});
361
361
  }
@@ -398,7 +398,7 @@ class Ns {
398
398
  return this._optimizelyData[this.transformExperimentId(t)];
399
399
  }
400
400
  transformExperimentId(t) {
401
- return js + t;
401
+ return Ns + t;
402
402
  }
403
403
  getAndSetWebOptimizelyExperiments() {
404
404
  var t;
@@ -430,9 +430,9 @@ class Ns {
430
430
  }
431
431
  }
432
432
  }
433
- const Mt = new Ns();
433
+ const Mt = new Ks();
434
434
  Object.freeze(Mt);
435
- class Ks {
435
+ class Fs {
436
436
  constructor(t, n) {
437
437
  K(this, "paused");
438
438
  K(this, "queue");
@@ -490,44 +490,44 @@ class Ks {
490
490
  this.queue.length = 0;
491
491
  }
492
492
  }
493
- var re = /* @__PURE__ */ ((e) => (e.Ready = "ready", e.NoSurvey = "no survey", e))(re || {}), mi = /* @__PURE__ */ ((e) => (e.Preview = "sprigPreviewKey", e))(mi || {});
494
- const Nl = "ul-app";
493
+ var re = /* @__PURE__ */ ((e) => (e.Ready = "ready", e.NoSurvey = "no survey", e))(re || {}), yi = /* @__PURE__ */ ((e) => (e.Preview = "sprigPreviewKey", e))(yi || {});
494
+ const Kl = "ul-app";
495
495
  var Ne = /* @__PURE__ */ ((e) => (e.Caption = "ul-caption", e.CardContainer = "ul-card__container", e.CardMainContent = "ul-card-main-content", e.Choice = "choice", e.ChoiceCheckbox = "select-checkbox", e.ChoiceGroup = "ul-card__choices", e.ChoiceLabel = "select-label", e.ChoiceLabelContainer = "choice-label-container", e.ChoiceRadio = "select-radio", e.ChoiceTextEntryContainer = "choice-text-entry-container", e.ChoiceTextInput = "choice-text-input", e.CloseButton = "close-btn", e.CloseContainer = "close-container", e.ConsentLegalNameInput = "ul-consent-legal__name-input", e.CustomStyle = "ul-custom-style", e.DesktopSuffix = "--desktop", e.FadeInTransition = "fade-in-transition", e.LikertNumber = "likert-number", e.LikertSmiley = "likert-smiley", e.LikertStar = "likert-star", e.LoadingSpinner = "ul-loading-spinner", e.LoadingSpinnerContainer = "ul-loading-spinner-container", e.LoadingSpinnerFirst = "first", e.LoadingSpinnerFourth = "fourth", e.LoadingSpinnerSecond = "second", e.LoadingSpinnerThird = "third", e.MobileSuffix = "--mobile", e.NPSNumber = "nps-number", e.OpenTextInput = "ul-card-text__input", e.QuestionHeader = "ul-question", e.VideoCard = "ul-card--video", e.CheckmarkButton = "ul-button-checkmark", e.InactiveButton = "ul-button-inactive", e.LeftAlignButton = "ul-button-left-align", e.ButtonDisabled = "sprig-button-disabled", e.SkipButton = "ul-card-skip__button", e))(Ne || {});
496
- const Kl = "#e6e6e6", Fl = "#bd282a", Fs = 500, Ml = 1030;
497
- var yi = /* @__PURE__ */ ((e) => (e.Video = "video", e.Audio = "audio", e.Screen = "screen", e))(yi || {}), Ms = /* @__PURE__ */ ((e) => (e.PermissionStatus = "permission.status", e.AvPermission = "av.permission", e.ScreenPermission = "screen.permission", e.BeginRecording = "begin.recording", e.StartTask = "start.task", e.FinishTask = "finish.task", e))(Ms || {}), $s = /* @__PURE__ */ ((e) => (e.Abandoned = "abandoned", e.GivenUp = "given.up", e.Completed = "completed", e))($s || {}), Vs = /* @__PURE__ */ ((e) => (e.ScreenPermissionRequested = "screen.permission.requested", e.PermissionDescriptors = "permission.descriptors", e.PermissionStatusCallback = "permission.status.callback", e.StreamReadyCallback = "stream.ready.callback", e.StreamCanceledCallback = "stream.canceled.callback", e.TaskCompleteCallback = "task.complete.callback", e.TaskResponse = "task.response", e.TaskStatus = "task.status", e.RecordingMediaTypes = "recording.media.types", e.StartRecordingCallback = "start.recording.callback", e.PassthroughData = "passthrough.data", e.CurrentIndex = "current.index", e.UploadCallback = "upload.callback", e.ProgressCallback = "progress.callback", e.BeginCallback = "begin.callback", e))(Vs || {}), ee = /* @__PURE__ */ ((e) => (e.Preview = "sprig.previewKey", e.Credentials = "userleap.ids", e.PageViews = "userleap.pageviews", e))(ee || {});
498
- const wi = () => {
496
+ const Fl = "#e6e6e6", Ml = "#bd282a", Ms = 500, $l = 1030;
497
+ var wi = /* @__PURE__ */ ((e) => (e.Video = "video", e.Audio = "audio", e.Screen = "screen", e))(wi || {}), $s = /* @__PURE__ */ ((e) => (e.PermissionStatus = "permission.status", e.AvPermission = "av.permission", e.ScreenPermission = "screen.permission", e.BeginRecording = "begin.recording", e.StartTask = "start.task", e.FinishTask = "finish.task", e))($s || {}), Vs = /* @__PURE__ */ ((e) => (e.Abandoned = "abandoned", e.GivenUp = "given.up", e.Completed = "completed", e))(Vs || {}), qs = /* @__PURE__ */ ((e) => (e.ScreenPermissionRequested = "screen.permission.requested", e.PermissionDescriptors = "permission.descriptors", e.PermissionStatusCallback = "permission.status.callback", e.StreamReadyCallback = "stream.ready.callback", e.StreamCanceledCallback = "stream.canceled.callback", e.TaskCompleteCallback = "task.complete.callback", e.TaskResponse = "task.response", e.TaskStatus = "task.status", e.RecordingMediaTypes = "recording.media.types", e.StartRecordingCallback = "start.recording.callback", e.PassthroughData = "passthrough.data", e.CurrentIndex = "current.index", e.UploadCallback = "upload.callback", e.ProgressCallback = "progress.callback", e.BeginCallback = "begin.callback", e))(qs || {}), ee = /* @__PURE__ */ ((e) => (e.Preview = "sprig.previewKey", e.Credentials = "userleap.ids", e.PageViews = "userleap.pageviews", e))(ee || {});
498
+ const gi = () => {
499
499
  try {
500
500
  return window.parent.Intercom;
501
501
  } catch (e) {
502
502
  return console.error(e), null;
503
503
  }
504
- }, qs = () => {
505
- const e = wi();
504
+ }, Ws = () => {
505
+ const e = gi();
506
506
  e && (e.ul_wasVisible && e("update", {
507
507
  hide_default_launcher: !1
508
508
  }), delete e.ul_wasVisible);
509
- }, Ws = () => {
510
- const e = wi();
509
+ }, zs = () => {
510
+ const e = gi();
511
511
  e && (e.ul_wasVisible = !!document.querySelector("iframe.intercom-launcher-frame"), e.ul_wasVisible && e("update", {
512
512
  hide_default_launcher: !0
513
513
  }));
514
- }, zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
514
+ }, Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
515
515
  __proto__: null,
516
- disable: Ws,
517
- enable: qs
518
- }, Symbol.toStringTag, { value: "Module" })), Tr = [zs];
519
- class Gs {
516
+ disable: zs,
517
+ enable: Ws
518
+ }, Symbol.toStringTag, { value: "Module" })), Cr = [Gs];
519
+ class Hs {
520
520
  static disable() {
521
- Tr.forEach((t) => t.disable());
521
+ Cr.forEach((t) => t.disable());
522
522
  }
523
523
  static enable() {
524
- Tr.forEach((t) => t.enable());
524
+ Cr.forEach((t) => t.enable());
525
525
  }
526
526
  }
527
- const Hs = 1, Cr = (e) => e instanceof HTMLElement || e instanceof SVGElement, Ys = (e, t, n) => {
527
+ const Ys = 1, Br = (e) => e instanceof HTMLElement || e instanceof SVGElement, Js = (e, t, n) => {
528
528
  const r = e.createElement("style");
529
529
  n && (r.nonce = n), r.textContent = t, r.id = Ne.CustomStyle, e.head.appendChild(r);
530
- }, Js = (e) => {
530
+ }, Qs = (e) => {
531
531
  const t = e.querySelector(`.${Ne.CardContainer}`);
532
532
  let n = 600, r = 360;
533
533
  if (t) {
@@ -539,21 +539,21 @@ const Hs = 1, Cr = (e) => e instanceof HTMLElement || e instanceof SVGElement, Y
539
539
  const l = parseFloat(i.paddingLeft) + parseFloat(i.paddingRight), u = parseFloat(i.marginLeft) + parseFloat(i.marginRight), c = parseFloat(i.borderLeftWidth) + parseFloat(i.borderRightWidth);
540
540
  r += u + c + l;
541
541
  }
542
- return [n + Hs, r];
543
- }, $l = (e) => {
542
+ return [n + Ys, r];
543
+ }, Vl = (e) => {
544
544
  const t = e.querySelector(`.${Ne.CardContainer}`);
545
545
  t && (t.scrollTop = 0);
546
546
  }, Zt = (e) => new Promise((t) => {
547
547
  setTimeout(() => {
548
548
  t();
549
549
  }, e);
550
- }), Qs = ({
550
+ }), Xs = ({
551
551
  "userleap-platform": e
552
- }) => e !== dn.Web, Vl = (e, t) => {
552
+ }) => e !== dn.Web, ql = (e, t) => {
553
553
  const n = t ? Ne.MobileSuffix : Ne.DesktopSuffix;
554
554
  return [e + n, e];
555
- }, ql = (e, t) => [e, `${e}__${t}`];
556
- class gi {
555
+ }, Wl = (e, t) => [e, `${e}__${t}`];
556
+ class vi {
557
557
  constructor(t) {
558
558
  K(this, "storage");
559
559
  K(this, "tempStorage", {});
@@ -581,12 +581,12 @@ class gi {
581
581
  this.isStorageAvailable ? this.storage.clear() : this.tempStorage = {};
582
582
  }
583
583
  }
584
- const ke = new gi("sessionStorage"), Z = new gi("localStorage");
585
- var Xs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
586
- function Zs(e) {
584
+ const ke = new vi("sessionStorage"), Z = new vi("localStorage");
585
+ var Zs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
586
+ function eo(e) {
587
587
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
588
588
  }
589
- function Wl(e) {
589
+ function zl(e) {
590
590
  if (e.__esModule)
591
591
  return e;
592
592
  var t = e.default;
@@ -607,11 +607,11 @@ function Wl(e) {
607
607
  });
608
608
  }), n;
609
609
  }
610
- var vi = { exports: {} };
610
+ var bi = { exports: {} };
611
611
  (function(e, t) {
612
612
  (function(n, r) {
613
613
  e.exports = r();
614
- })(Xs, function() {
614
+ })(Zs, function() {
615
615
  var n = function(s, o) {
616
616
  if (o = o || {}, typeof s != "function")
617
617
  throw new i("fetch must be a function");
@@ -645,7 +645,7 @@ var vi = { exports: {} };
645
645
  h = c.retryOn;
646
646
  else
647
647
  throw new i("retryOn property expects an array or function");
648
- return new Promise(function(w, m) {
648
+ return new Promise(function(w, y) {
649
649
  var g = function(f) {
650
650
  var v = typeof Request < "u" && u instanceof Request ? u.clone() : u;
651
651
  s(v, c).then(function(b) {
@@ -654,29 +654,29 @@ var vi = { exports: {} };
654
654
  else if (typeof h == "function")
655
655
  try {
656
656
  return Promise.resolve(h(f, null, b)).then(function(_) {
657
- _ ? y(f, null, b) : w(b);
658
- }).catch(m);
657
+ _ ? m(f, null, b) : w(b);
658
+ }).catch(y);
659
659
  } catch (_) {
660
- m(_);
660
+ y(_);
661
661
  }
662
662
  else
663
- f < p ? y(f, null, b) : w(b);
663
+ f < p ? m(f, null, b) : w(b);
664
664
  }).catch(function(b) {
665
665
  if (typeof h == "function")
666
666
  try {
667
667
  Promise.resolve(h(f, b, null)).then(function(_) {
668
- _ ? y(f, b, null) : m(b);
668
+ _ ? m(f, b, null) : y(b);
669
669
  }).catch(function(_) {
670
- m(_);
670
+ y(_);
671
671
  });
672
672
  } catch (_) {
673
- m(_);
673
+ y(_);
674
674
  }
675
675
  else
676
- f < p ? y(f, b, null) : m(b);
676
+ f < p ? m(f, b, null) : y(b);
677
677
  });
678
678
  };
679
- function y(f, v, b) {
679
+ function m(f, v, b) {
680
680
  var _ = typeof d == "function" ? d(f, v, b) : d;
681
681
  setTimeout(function() {
682
682
  g(++f);
@@ -694,65 +694,65 @@ var vi = { exports: {} };
694
694
  }
695
695
  return n;
696
696
  });
697
- })(vi);
698
- var eo = vi.exports;
699
- const bi = /* @__PURE__ */ Zs(eo), to = bi(fetch), rt = {
697
+ })(bi);
698
+ var to = bi.exports;
699
+ const _i = /* @__PURE__ */ eo(to), no = _i(fetch), rt = {
700
700
  Error: 1,
701
701
  Warn: 2,
702
702
  Info: 3,
703
703
  Debug: 4
704
704
  };
705
- let Pn = 1e3, en = rt.Debug, Ze = [];
706
- const no = (e) => {
705
+ let On = 1e3, en = rt.Debug, Ze = [];
706
+ const ro = (e) => {
707
707
  const t = Object.entries(rt).find((n) => n[1] === e);
708
708
  return (t == null ? void 0 : t[0]) ?? "";
709
- }, ro = (e) => e.toLocaleTimeString([], {
709
+ }, io = (e) => e.toLocaleTimeString([], {
710
710
  hour: "2-digit",
711
711
  minute: "2-digit",
712
712
  second: "2-digit",
713
713
  fractionalSecondDigits: 3
714
- }), io = (e, t) => `${ro(t)}:${e}`, so = () => {
714
+ }), so = (e, t) => `${io(t)}:${e}`, oo = () => {
715
715
  Ze = Ze.filter((e) => e.level <= en);
716
- }, oo = () => {
717
- Ze.length > Pn && Ze.shift();
716
+ }, ao = () => {
717
+ Ze.length > On && Ze.shift();
718
718
  }, pn = (e, t) => {
719
719
  e > en || (Ze.push({
720
720
  level: e,
721
- line: io(t, /* @__PURE__ */ new Date())
722
- }), oo());
721
+ line: so(t, /* @__PURE__ */ new Date())
722
+ }), ao());
723
723
  }, vt = (e) => {
724
724
  pn(rt.Debug, e);
725
725
  }, I = (e) => {
726
726
  pn(rt.Info, e);
727
727
  }, Rn = (e) => {
728
728
  pn(rt.Warn, e);
729
- }, _i = (e) => {
729
+ }, Si = (e) => {
730
730
  pn(rt.Error, e);
731
- }, ao = () => Ze.map((e) => e.line), lo = () => new TextEncoder().encode(ao().join(`
732
- `)), co = async (e) => {
731
+ }, lo = () => Ze.map((e) => e.line), co = () => new TextEncoder().encode(lo().join(`
732
+ `)), uo = async (e) => {
733
733
  if (!e)
734
734
  return;
735
- const t = lo();
736
- return to(e, {
735
+ const t = co();
736
+ return no(e, {
737
737
  body: t,
738
738
  method: "PUT",
739
739
  retries: 3,
740
740
  retryDelay: (n) => Math.pow(2, n) * 1e3
741
741
  });
742
- }, uo = (e, t) => {
743
- e !== void 0 && (Pn = e), t !== void 0 && (en = t), vt(`Initializing logger with limit of ${Pn} lines and ${no(en)} level`), so();
742
+ }, po = (e, t) => {
743
+ e !== void 0 && (On = e), t !== void 0 && (en = t), vt(`Initializing logger with limit of ${On} lines and ${ro(en)} level`), oo();
744
744
  };
745
- let Si = !0, yr = !1;
746
- const po = () => Si = !1, ho = () => yr = !0;
745
+ let Ei = !0, yr = !1;
746
+ const ho = () => Ei = !1, fo = () => yr = !0;
747
747
  var $e = /* @__PURE__ */ ((e) => (e.EventQueueLatency = "sdk_event_queue_latency_seconds", e.ReplayAddEventBatch = "sdk_replay_add_event_batch_seconds", e.ReplayCleanup = "sdk_replay_cleanup_seconds", e.ReplayCompression = "sdk_replay_compression_seconds", e.ReplayGetEventsBetween = "sdk_replay_get_events_between_seconds", e.ReplayFullSnapshot = "sdk_replay_snapshot_seconds", e))($e || {});
748
748
  let dt = {}, Dn;
749
- class fo {
749
+ class mo {
750
750
  constructor(t) {
751
751
  K(this, "_values", []);
752
752
  this.name = t;
753
753
  }
754
754
  report(t) {
755
- if (Si && this._values.push({
755
+ if (Ei && this._values.push({
756
756
  time: Date.now(),
757
757
  value: t
758
758
  }), yr)
@@ -773,18 +773,18 @@ class fo {
773
773
  return n.type === "max" ? t > n.value : n.type === "min" ? t < n.value : !1;
774
774
  }
775
775
  }
776
- const mo = (e, t) => {
776
+ const yo = (e, t) => {
777
777
  dt = {}, yr = !1, e == null || e.forEach((n) => {
778
778
  var r;
779
779
  n.metric in dt || (dt[n.metric] = []), (r = dt[n.metric]) == null || r.push(n);
780
780
  }), Dn = t;
781
781
  }, At = {}, hn = (e) => {
782
- const t = new fo(e);
782
+ const t = new mo(e);
783
783
  return At[e] = t, t;
784
- }, yo = async (e, t) => {
784
+ }, wo = async (e, t) => {
785
785
  let n = At[e];
786
786
  n || (n = hn(e)), n.report(t);
787
- }, wo = async (e) => {
787
+ }, go = async (e) => {
788
788
  const t = Object.values(At).map((n) => ({
789
789
  name: n.name,
790
790
  values: n.collect()
@@ -794,24 +794,24 @@ const mo = (e, t) => {
794
794
  } catch (n) {
795
795
  Rn(`Error posting metrics: ${n}`);
796
796
  }
797
- }, go = ({
797
+ }, vo = ({
798
798
  reportingIntervalSeconds: e,
799
799
  postMetrics: t
800
800
  }) => {
801
801
  e ? setInterval(() => {
802
- wo(t);
803
- }, e * 1e3) : po();
802
+ go(t);
803
+ }, e * 1e3) : ho();
804
804
  }, Tn = (e, t) => {
805
805
  const n = performance.now();
806
806
  document.hidden ? setTimeout(() => Tn(e, t), e) : setTimeout(() => {
807
807
  const r = performance.now() - n;
808
808
  t.report(r / 1e3), setTimeout(() => Tn(e, t), e);
809
809
  }, 0);
810
- }, vo = (e = 1e3) => {
810
+ }, bo = (e = 1e3) => {
811
811
  const t = hn($e.EventQueueLatency);
812
812
  Tn(e, t);
813
813
  };
814
- class bo {
814
+ class _o {
815
815
  constructor(t) {
816
816
  K(this, "payload");
817
817
  K(this, "promise");
@@ -827,23 +827,23 @@ class bo {
827
827
  this.resolve(t);
828
828
  }
829
829
  }
830
- const _o = {
830
+ const So = {
831
831
  RATELIMIT_RESET_DEFAULT: 10
832
832
  // 10s to restart rate limit retry
833
833
  };
834
- let Ei = !1, ki = "", Dt = !1, Li = !1, $t = [];
835
- const So = (e) => e._config && e._config.installationMethod ? e._config.installationMethod : e._gtm ? He.Gtm : e._segment ? He.Segment : He.Snippet, Cn = (e) => {
834
+ let ki = !1, Li = "", Dt = !1, Ii = !1, $t = [];
835
+ const Eo = (e) => e._config && e._config.installationMethod ? e._config.installationMethod : e._gtm ? He.Gtm : e._segment ? He.Segment : He.Snippet, Cn = (e) => {
836
836
  var t;
837
- (t = e == null ? void 0 : e.blockedURI) != null && t.includes(window.UserLeap._API_URL) && (Li = !0, console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`), document.removeEventListener("securitypolicyviolation", Cn));
837
+ (t = e == null ? void 0 : e.blockedURI) != null && t.includes(window.UserLeap._API_URL) && (Ii = !0, console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`), document.removeEventListener("securitypolicyviolation", Cn));
838
838
  }, Bn = (e = "") => {
839
- Ei = !0, ki = e;
839
+ ki = !0, Li = e;
840
840
  };
841
841
  function et(e = {}) {
842
842
  const t = {
843
843
  "Content-Type": "application/json",
844
844
  "userleap-platform": dn.Web,
845
- "x-ul-sdk-version": "2.26.4",
846
- [oe.InstallationMethod]: So(e)
845
+ "x-ul-sdk-version": "2.26.6",
846
+ [oe.InstallationMethod]: Eo(e)
847
847
  };
848
848
  if (e.envId && (t[oe.EnvironmentID] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t[oe.UserID] = e.userId), e.visitorId && (t[oe.VisitorID] = e.visitorId), e.partnerAnonymousId && (t[oe.PartnerAnonymousId] = e.partnerAnonymousId), e.mobileHeadersJSON) {
849
849
  const n = JSON.parse(e.mobileHeadersJSON);
@@ -851,13 +851,13 @@ function et(e = {}) {
851
851
  }
852
852
  return e.locale && (t["accept-language"] = e.locale), window.previewMode && (t[oe.PreviewMode] = "1"), t;
853
853
  }
854
- const Br = async (e, t, n) => {
854
+ const jr = async (e, t, n) => {
855
855
  if (e)
856
856
  return {
857
857
  status: 429
858
858
  };
859
859
  {
860
- const r = new bo(n);
860
+ const r = new _o(n);
861
861
  return $t.push(r), r.promise;
862
862
  }
863
863
  }, Ye = async (e, t, n = 0, r = !1, i = !1) => {
@@ -868,23 +868,23 @@ const Br = async (e, t, n) => {
868
868
  shouldDropOnRateLimit: r
869
869
  };
870
870
  if (Dt && !i)
871
- return Br(r, i, s);
871
+ return jr(r, i, s);
872
872
  const o = {
873
873
  ok: !1,
874
874
  reportError: !1
875
875
  };
876
- if (Ei)
877
- return console.info(`UserLeap - ${ki}`), o;
876
+ if (ki)
877
+ return console.info(`UserLeap - ${Li}`), o;
878
878
  try {
879
879
  t.headers = Object.assign(et(), t.headers);
880
880
  const a = await fetch(e, t);
881
881
  if (a.status === 429)
882
882
  if (!Dt && !r || i) {
883
883
  Dt = !0;
884
- const u = a.headers.has("ratelimit-reset") ? Number(a.headers.get("ratelimit-reset")) : _o.RATELIMIT_RESET_DEFAULT;
884
+ const u = a.headers.has("ratelimit-reset") ? Number(a.headers.get("ratelimit-reset")) : So.RATELIMIT_RESET_DEFAULT;
885
885
  return await Zt(u * 1e3), Ye(e, t, 0, r, !0);
886
886
  } else
887
- return Br(r, !1, s);
887
+ return jr(r, !1, s);
888
888
  if (Dt = !1, $t.length && ($t.map((l) => {
889
889
  const {
890
890
  url: u,
@@ -912,14 +912,14 @@ const Br = async (e, t, n) => {
912
912
  return a;
913
913
  } catch (a) {
914
914
  const l = n + 1;
915
- return l > 5 || Li ? {
915
+ return l > 5 || Ii ? {
916
916
  ok: !1,
917
917
  reportError: !1,
918
918
  error: a
919
919
  } : (await Zt(Math.pow(2, n) * 1e3), Ye(e, t, l));
920
920
  }
921
921
  };
922
- class Eo {
922
+ class ko {
923
923
  constructor(t) {
924
924
  K(this, "awaitingResolvers", []);
925
925
  K(this, "activeCount", 0);
@@ -949,9 +949,9 @@ class Eo {
949
949
  this.capacity = t;
950
950
  }
951
951
  }
952
- const Ii = new Eo(2), ko = (e) => Ii.setLimit(e), Lo = bi(fetch), Io = async (e, t = 3) => Ii.execute(async () => {
952
+ const Ui = new ko(2), Lo = (e) => Ui.setLimit(e), Io = _i(fetch), Uo = async (e, t = 3) => Ui.execute(async () => {
953
953
  I(`Beginning upload of chunk ${e.chunkIndex} for survey: ${e.surveyId}`);
954
- const n = await Lo(e.uploadUrl, {
954
+ const n = await Io(e.uploadUrl, {
955
955
  body: e.data,
956
956
  method: "PUT",
957
957
  retries: t,
@@ -962,7 +962,7 @@ const Ii = new Eo(2), ko = (e) => Ii.setLimit(e), Lo = bi(fetch), Io = async (e,
962
962
  if (!r)
963
963
  throw new Error(`Upload response did not include etag for upload ${e.uploadId}, part ${e.chunkIndex}`);
964
964
  return r;
965
- }), Ui = async ({
965
+ }), Ai = async ({
966
966
  apiUrl: e,
967
967
  surveyId: t,
968
968
  uploadId: n,
@@ -997,34 +997,34 @@ function H(e, t) {
997
997
  }), e;
998
998
  }
999
999
  typeof Promise > "u" || j.Promise || (j.Promise = Promise);
1000
- const bt = Object.getPrototypeOf, Uo = {}.hasOwnProperty;
1000
+ const bt = Object.getPrototypeOf, Ao = {}.hasOwnProperty;
1001
1001
  function te(e, t) {
1002
- return Uo.call(e, t);
1002
+ return Ao.call(e, t);
1003
1003
  }
1004
1004
  function tt(e, t) {
1005
1005
  typeof t == "function" && (t = t(bt(e))), (typeof Reflect > "u" ? F : Reflect.ownKeys)(t).forEach((n) => {
1006
1006
  me(e, n, t[n]);
1007
1007
  });
1008
1008
  }
1009
- const Ai = Object.defineProperty;
1009
+ const xi = Object.defineProperty;
1010
1010
  function me(e, t, n, r) {
1011
- Ai(e, t, H(n && te(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
1011
+ xi(e, t, H(n && te(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
1012
1012
  }
1013
1013
  function Je(e) {
1014
1014
  return { from: function(t) {
1015
1015
  return e.prototype = Object.create(t.prototype), me(e.prototype, "constructor", e), { extend: tt.bind(null, e.prototype) };
1016
1016
  } };
1017
1017
  }
1018
- const Ao = Object.getOwnPropertyDescriptor;
1018
+ const xo = Object.getOwnPropertyDescriptor;
1019
1019
  function wr(e, t) {
1020
1020
  let n;
1021
- return Ao(e, t) || (n = bt(e)) && wr(n, t);
1021
+ return xo(e, t) || (n = bt(e)) && wr(n, t);
1022
1022
  }
1023
- const xo = [].slice;
1023
+ const Po = [].slice;
1024
1024
  function tn(e, t, n) {
1025
- return xo.call(e, t, n);
1025
+ return Po.call(e, t, n);
1026
1026
  }
1027
- function xi(e, t) {
1027
+ function Pi(e, t) {
1028
1028
  return t(e);
1029
1029
  }
1030
1030
  function pt(e) {
@@ -1034,14 +1034,14 @@ function pt(e) {
1034
1034
  function Oi(e) {
1035
1035
  j.setImmediate ? setImmediate(e) : setTimeout(e, 0);
1036
1036
  }
1037
- function Pi(e, t) {
1037
+ function Ri(e, t) {
1038
1038
  return e.reduce((n, r, i) => {
1039
1039
  var s = t(r, i);
1040
1040
  return s && (n[s[0]] = s[1]), n;
1041
1041
  }, {});
1042
1042
  }
1043
1043
  function ye(e, t) {
1044
- if (te(e, t))
1044
+ if (typeof t == "string" && te(e, t))
1045
1045
  return e[t];
1046
1046
  if (!t)
1047
1047
  return e;
@@ -1055,7 +1055,7 @@ function ye(e, t) {
1055
1055
  var o = t.indexOf(".");
1056
1056
  if (o !== -1) {
1057
1057
  var a = e[t.substr(0, o)];
1058
- return a === void 0 ? void 0 : ye(a, t.substr(o + 1));
1058
+ return a == null ? void 0 : ye(a, t.substr(o + 1));
1059
1059
  }
1060
1060
  }
1061
1061
  function ie(e, t, n) {
@@ -1078,18 +1078,18 @@ function ie(e, t, n) {
1078
1078
  n === void 0 ? z(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
1079
1079
  }
1080
1080
  }
1081
- function Ri(e) {
1081
+ function Di(e) {
1082
1082
  var t = {};
1083
1083
  for (var n in e)
1084
1084
  te(e, n) && (t[n] = e[n]);
1085
1085
  return t;
1086
1086
  }
1087
1087
  const Oo = [].concat;
1088
- function Di(e) {
1088
+ function Ti(e) {
1089
1089
  return Oo.apply([], e);
1090
1090
  }
1091
- const Ti = "Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Di([8, 16, 32, 64].map((e) => ["Int", "Uint", "Float"].map((t) => t + e + "Array")))).filter((e) => j[e]), Po = Ti.map((e) => j[e]);
1092
- Pi(Ti, (e) => [e, !0]);
1091
+ const Ci = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ti([8, 16, 32, 64].map((e) => ["Int", "Uint", "Float"].map((t) => t + e + "Array")))).filter((e) => j[e]), Ro = Ci.map((e) => j[e]);
1092
+ Ri(Ci, (e) => [e, !0]);
1093
1093
  let _e = null;
1094
1094
  function xt(e) {
1095
1095
  _e = typeof WeakMap < "u" && /* @__PURE__ */ new WeakMap();
@@ -1106,7 +1106,7 @@ function jn(e) {
1106
1106
  t = [], _e && _e.set(e, t);
1107
1107
  for (var n = 0, r = e.length; n < r; ++n)
1108
1108
  t.push(jn(e[n]));
1109
- } else if (Po.indexOf(e.constructor) >= 0)
1109
+ } else if (Ro.indexOf(e.constructor) >= 0)
1110
1110
  t = e;
1111
1111
  else {
1112
1112
  const s = bt(e);
@@ -1115,11 +1115,11 @@ function jn(e) {
1115
1115
  }
1116
1116
  return t;
1117
1117
  }
1118
- const { toString: Ro } = {};
1118
+ const { toString: Do } = {};
1119
1119
  function Nn(e) {
1120
- return Ro.call(e).slice(8, -1);
1120
+ return Do.call(e).slice(8, -1);
1121
1121
  }
1122
- const Kn = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Do = typeof Kn == "symbol" ? function(e) {
1122
+ const Kn = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", To = typeof Kn == "symbol" ? function(e) {
1123
1123
  var t;
1124
1124
  return e != null && (t = e[Kn]) && t.apply(e);
1125
1125
  } : function() {
@@ -1132,7 +1132,7 @@ function pe(e) {
1132
1132
  return e.slice();
1133
1133
  if (this === Ge && typeof e == "string")
1134
1134
  return [e];
1135
- if (i = Do(e)) {
1135
+ if (i = To(e)) {
1136
1136
  for (n = []; !(r = i.next()).done; )
1137
1137
  n.push(r.value);
1138
1138
  return n;
@@ -1152,13 +1152,13 @@ function pe(e) {
1152
1152
  }
1153
1153
  const gr = typeof Symbol < "u" ? (e) => e[Symbol.toStringTag] === "AsyncFunction" : () => !1;
1154
1154
  var le = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
1155
- function Ci(e, t) {
1156
- le = e, Bi = t;
1155
+ function Bi(e, t) {
1156
+ le = e, ji = t;
1157
1157
  }
1158
- var Bi = () => !0;
1159
- const To = !new Error("").stack;
1158
+ var ji = () => !0;
1159
+ const Co = !new Error("").stack;
1160
1160
  function Ve() {
1161
- if (To)
1161
+ if (Co)
1162
1162
  try {
1163
1163
  throw Ve.arguments, new Error();
1164
1164
  } catch (e) {
@@ -1170,22 +1170,22 @@ function Fn(e, t) {
1170
1170
  var n = e.stack;
1171
1171
  return n ? (t = t || 0, n.indexOf(e.name) === 0 && (t += (e.name + e.message).split(`
1172
1172
  `).length), n.split(`
1173
- `).slice(t).filter(Bi).map((r) => `
1173
+ `).slice(t).filter(ji).map((r) => `
1174
1174
  ` + r).join("")) : "";
1175
1175
  }
1176
- var ji = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], vr = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(ji), Co = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
1176
+ var Ni = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], vr = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(Ni), Bo = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
1177
1177
  function Qe(e, t) {
1178
1178
  this._e = Ve(), this.name = e, this.message = t;
1179
1179
  }
1180
- function Ni(e, t) {
1180
+ function Ki(e, t) {
1181
1181
  return e + ". Errors: " + Object.keys(t).map((n) => t[n].toString()).filter((n, r, i) => i.indexOf(n) === r).join(`
1182
1182
  `);
1183
1183
  }
1184
1184
  function nn(e, t, n, r) {
1185
- this._e = Ve(), this.failures = t, this.failedKeys = r, this.successCount = n, this.message = Ni(e, t);
1185
+ this._e = Ve(), this.failures = t, this.failedKeys = r, this.successCount = n, this.message = Ki(e, t);
1186
1186
  }
1187
1187
  function ft(e, t) {
1188
- this._e = Ve(), this.name = "BulkError", this.failures = Object.keys(t).map((n) => t[n]), this.failuresByPos = t, this.message = Ni(e, t);
1188
+ this._e = Ve(), this.name = "BulkError", this.failures = Object.keys(t).map((n) => t[n]), this.failuresByPos = t, this.message = Ki(e, t);
1189
1189
  }
1190
1190
  Je(Qe).from(Error).extend({ stack: { get: function() {
1191
1191
  return this._stack || (this._stack = this.name + ": " + this.message + Fn(this._e, 2));
@@ -1193,23 +1193,23 @@ Je(Qe).from(Error).extend({ stack: { get: function() {
1193
1193
  return this.name + ": " + this.message;
1194
1194
  } }), Je(nn).from(Qe), Je(ft).from(Qe);
1195
1195
  var br = vr.reduce((e, t) => (e[t] = t + "Error", e), {});
1196
- const Bo = Qe;
1196
+ const jo = Qe;
1197
1197
  var A = vr.reduce((e, t) => {
1198
1198
  var n = t + "Error";
1199
1199
  function r(i, s) {
1200
1200
  this._e = Ve(), this.name = n, i ? typeof i == "string" ? (this.message = `${i}${s ? `
1201
- ` + s : ""}`, this.inner = s || null) : typeof i == "object" && (this.message = `${i.name} ${i.message}`, this.inner = i) : (this.message = Co[t] || n, this.inner = null);
1201
+ ` + s : ""}`, this.inner = s || null) : typeof i == "object" && (this.message = `${i.name} ${i.message}`, this.inner = i) : (this.message = Bo[t] || n, this.inner = null);
1202
1202
  }
1203
- return Je(r).from(Bo), e[t] = r, e;
1203
+ return Je(r).from(jo), e[t] = r, e;
1204
1204
  }, {});
1205
1205
  A.Syntax = SyntaxError, A.Type = TypeError, A.Range = RangeError;
1206
- var jr = ji.reduce((e, t) => (e[t + "Error"] = A[t], e), {}), Vt = vr.reduce((e, t) => (["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = A[t]), e), {});
1206
+ var Nr = Ni.reduce((e, t) => (e[t + "Error"] = A[t], e), {}), Vt = vr.reduce((e, t) => (["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = A[t]), e), {});
1207
1207
  function C() {
1208
1208
  }
1209
1209
  function _t(e) {
1210
1210
  return e;
1211
1211
  }
1212
- function jo(e, t) {
1212
+ function No(e, t) {
1213
1213
  return e == null || e === _t ? t : function(n) {
1214
1214
  return t(e(n));
1215
1215
  };
@@ -1219,7 +1219,7 @@ function Ke(e, t) {
1219
1219
  e.apply(this, arguments), t.apply(this, arguments);
1220
1220
  };
1221
1221
  }
1222
- function No(e, t) {
1222
+ function Ko(e, t) {
1223
1223
  return e === C ? t : function() {
1224
1224
  var n = e.apply(this, arguments);
1225
1225
  n !== void 0 && (arguments[0] = n);
@@ -1229,14 +1229,14 @@ function No(e, t) {
1229
1229
  return r && (this.onsuccess = this.onsuccess ? Ke(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? Ke(i, this.onerror) : i), s !== void 0 ? s : n;
1230
1230
  };
1231
1231
  }
1232
- function Ko(e, t) {
1232
+ function Fo(e, t) {
1233
1233
  return e === C ? t : function() {
1234
1234
  e.apply(this, arguments);
1235
1235
  var n = this.onsuccess, r = this.onerror;
1236
1236
  this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? Ke(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? Ke(r, this.onerror) : r);
1237
1237
  };
1238
1238
  }
1239
- function Fo(e, t) {
1239
+ function Mo(e, t) {
1240
1240
  return e === C ? t : function(n) {
1241
1241
  var r = e.apply(this, arguments);
1242
1242
  H(n, r);
@@ -1246,7 +1246,7 @@ function Fo(e, t) {
1246
1246
  return i && (this.onsuccess = this.onsuccess ? Ke(i, this.onsuccess) : i), s && (this.onerror = this.onerror ? Ke(s, this.onerror) : s), r === void 0 ? o === void 0 ? void 0 : o : H(r, o);
1247
1247
  };
1248
1248
  }
1249
- function Mo(e, t) {
1249
+ function $o(e, t) {
1250
1250
  return e === C ? t : function() {
1251
1251
  return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
1252
1252
  };
@@ -1266,14 +1266,14 @@ function _r(e, t) {
1266
1266
  }
1267
1267
  Vt.ModifyError = nn, Vt.DexieError = Qe, Vt.BulkError = ft;
1268
1268
  var St = {};
1269
- const Ki = 100, [Mn, rn, $n] = typeof Promise > "u" ? [] : (() => {
1269
+ const Fi = 100, [Mn, rn, $n] = typeof Promise > "u" ? [] : (() => {
1270
1270
  let e = Promise.resolve();
1271
1271
  if (typeof crypto > "u" || !crypto.subtle)
1272
1272
  return [e, bt(e), e];
1273
1273
  const t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
1274
1274
  return [t, bt(t), e];
1275
- })(), Fi = rn && rn.then, qt = Mn && Mn.constructor, Sr = !!$n;
1276
- var Vn = !1, $o = $n ? () => {
1275
+ })(), Mi = rn && rn.then, qt = Mn && Mn.constructor, Sr = !!$n;
1276
+ var Vn = !1, Vo = $n ? () => {
1277
1277
  $n.then(Tt);
1278
1278
  } : j.setImmediate ? setImmediate.bind(null, Tt) : j.MutationObserver ? () => {
1279
1279
  var e = document.createElement("div");
@@ -1283,11 +1283,11 @@ var Vn = !1, $o = $n ? () => {
1283
1283
  } : () => {
1284
1284
  setTimeout(Tt, 0);
1285
1285
  }, mt = function(e, t) {
1286
- ht.push([e, t]), sn && ($o(), sn = !1);
1287
- }, qn = !0, sn = !0, Te = [], Wt = [], Wn = null, zn = _t, Xe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Fr, pgp: !1, env: {}, finalize: function() {
1286
+ ht.push([e, t]), sn && (Vo(), sn = !1);
1287
+ }, qn = !0, sn = !0, Te = [], Wt = [], Wn = null, zn = _t, Xe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Mr, pgp: !1, env: {}, finalize: function() {
1288
1288
  this.unhandleds.forEach((e) => {
1289
1289
  try {
1290
- Fr(e[0], e[1]);
1290
+ Mr(e[0], e[1]);
1291
1291
  } catch {
1292
1292
  }
1293
1293
  });
@@ -1302,7 +1302,7 @@ function L(e) {
1302
1302
  throw new TypeError("Not a function");
1303
1303
  return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && Hn(this, this._value));
1304
1304
  }
1305
- this._state = null, this._value = null, ++t.ref, $i(this, e);
1305
+ this._state = null, this._value = null, ++t.ref, Vi(this, e);
1306
1306
  }
1307
1307
  const Gn = { get: function() {
1308
1308
  var e = U, t = on;
@@ -1310,9 +1310,9 @@ const Gn = { get: function() {
1310
1310
  var s = !e.global && (e !== U || t !== on);
1311
1311
  const o = s && !we();
1312
1312
  var a = new L((l, u) => {
1313
- Er(this, new Mi(an(r, e, s, o), an(i, e, s, o), l, u, e));
1313
+ Er(this, new $i(an(r, e, s, o), an(i, e, s, o), l, u, e));
1314
1314
  });
1315
- return le && Wi(a, this), a;
1315
+ return le && zi(a, this), a;
1316
1316
  }
1317
1317
  return n.prototype = St, n;
1318
1318
  }, set: function(e) {
@@ -1320,19 +1320,19 @@ const Gn = { get: function() {
1320
1320
  return e;
1321
1321
  }, set: Gn.set });
1322
1322
  } };
1323
- function Mi(e, t, n, r, i) {
1323
+ function $i(e, t, n, r, i) {
1324
1324
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.resolve = n, this.reject = r, this.psd = i;
1325
1325
  }
1326
- function $i(e, t) {
1326
+ function Vi(e, t) {
1327
1327
  try {
1328
1328
  t((n) => {
1329
1329
  if (e._state === null) {
1330
1330
  if (n === e)
1331
1331
  throw new TypeError("A promise cannot be resolved with itself.");
1332
- var r = e._lib && Ot();
1333
- n && typeof n.then == "function" ? $i(e, (i, s) => {
1332
+ var r = e._lib && Pt();
1333
+ n && typeof n.then == "function" ? Vi(e, (i, s) => {
1334
1334
  n instanceof L ? n._then(i, s) : n.then(i, s);
1335
- }) : (e._state = !0, e._value = n, Vi(e)), r && Pt();
1335
+ }) : (e._state = !0, e._value = n, qi(e)), r && Ot();
1336
1336
  }
1337
1337
  }, Hn.bind(null, e));
1338
1338
  } catch (n) {
@@ -1341,7 +1341,7 @@ function $i(e, t) {
1341
1341
  }
1342
1342
  function Hn(e, t) {
1343
1343
  if (Wt.push(t), e._state === null) {
1344
- var n = e._lib && Ot();
1344
+ var n = e._lib && Pt();
1345
1345
  t = zn(t), e._state = !1, e._value = t, le && t !== null && typeof t == "object" && !t._promise && function(r, i, s) {
1346
1346
  try {
1347
1347
  r.apply(null, s);
@@ -1353,10 +1353,10 @@ function Hn(e, t) {
1353
1353
  t._promise = e, me(t, "stack", { get: () => Vn ? r && (r.get ? r.get.apply(t) : r.value) : e.stack });
1354
1354
  }), function(r) {
1355
1355
  Te.some((i) => i._value === r._value) || Te.push(r);
1356
- }(e), Vi(e), n && Pt();
1356
+ }(e), qi(e), n && Ot();
1357
1357
  }
1358
1358
  }
1359
- function Vi(e) {
1359
+ function qi(e) {
1360
1360
  var t = e._listeners;
1361
1361
  e._listeners = [];
1362
1362
  for (var n = 0, r = t.length; n < r; ++n)
@@ -1371,11 +1371,11 @@ function Er(e, t) {
1371
1371
  var n = e._state ? t.onFulfilled : t.onRejected;
1372
1372
  if (n === null)
1373
1373
  return (e._state ? t.resolve : t.reject)(e._value);
1374
- ++t.psd.ref, ++Ce, mt(Vo, [n, e, t]);
1374
+ ++t.psd.ref, ++Ce, mt(qo, [n, e, t]);
1375
1375
  } else
1376
1376
  e._listeners.push(t);
1377
1377
  }
1378
- function Vo(e, t, n) {
1378
+ function qo(e, t, n) {
1379
1379
  try {
1380
1380
  Wn = t;
1381
1381
  var r, i = t._value;
@@ -1390,7 +1390,7 @@ function Vo(e, t, n) {
1390
1390
  Wn = null, --Ce == 0 && kr(), --n.psd.ref || n.psd.finalize();
1391
1391
  }
1392
1392
  }
1393
- function qi(e, t, n) {
1393
+ function Wi(e, t, n) {
1394
1394
  if (t.length === n)
1395
1395
  return t;
1396
1396
  var r = "";
@@ -1398,20 +1398,20 @@ function qi(e, t, n) {
1398
1398
  var i, s, o = e._value;
1399
1399
  o != null ? (i = o.name || "Error", s = o.message || o, r = Fn(o, 0)) : (i = o, s = ""), t.push(i + (s ? ": " + s : "") + r);
1400
1400
  }
1401
- return le && ((r = Fn(e._stackHolder, 2)) && t.indexOf(r) === -1 && t.push(r), e._prev && qi(e._prev, t, n)), t;
1401
+ return le && ((r = Fn(e._stackHolder, 2)) && t.indexOf(r) === -1 && t.push(r), e._prev && Wi(e._prev, t, n)), t;
1402
1402
  }
1403
- function Wi(e, t) {
1403
+ function zi(e, t) {
1404
1404
  var n = t ? t._numPrev + 1 : 0;
1405
1405
  n < 100 && (e._prev = t, e._numPrev = n);
1406
1406
  }
1407
1407
  function Tt() {
1408
- Ot() && Pt();
1408
+ Pt() && Ot();
1409
1409
  }
1410
- function Ot() {
1410
+ function Pt() {
1411
1411
  var e = qn;
1412
1412
  return qn = !1, sn = !1, e;
1413
1413
  }
1414
- function Pt() {
1414
+ function Ot() {
1415
1415
  var e, t, n;
1416
1416
  do
1417
1417
  for (; ht.length > 0; )
@@ -1436,18 +1436,18 @@ function Ct(e) {
1436
1436
  function N(e, t) {
1437
1437
  var n = U;
1438
1438
  return function() {
1439
- var r = Ot(), i = U;
1439
+ var r = Pt(), i = U;
1440
1440
  try {
1441
1441
  return Ie(n, !0), e.apply(this, arguments);
1442
1442
  } catch (s) {
1443
1443
  t && t(s);
1444
1444
  } finally {
1445
- Ie(i, !1), r && Pt();
1445
+ Ie(i, !1), r && Ot();
1446
1446
  }
1447
1447
  };
1448
1448
  }
1449
1449
  tt(L.prototype, { then: Gn, _then: function(e, t) {
1450
- Er(this, new Mi(null, null, e, t, U));
1450
+ Er(this, new $i(null, null, e, t, U));
1451
1451
  }, catch: function(e) {
1452
1452
  if (arguments.length === 1)
1453
1453
  return this.then(null, e);
@@ -1460,7 +1460,7 @@ tt(L.prototype, { then: Gn, _then: function(e, t) {
1460
1460
  return this._stack;
1461
1461
  try {
1462
1462
  Vn = !0;
1463
- var e = qi(this, [], 20).join(`
1463
+ var e = Wi(this, [], 20).join(`
1464
1464
  From previous: `);
1465
1465
  return this._state !== null && (this._stack = e), e;
1466
1466
  } finally {
@@ -1471,7 +1471,7 @@ From previous: `);
1471
1471
  var i = setTimeout(() => r(new A.Timeout(t)), e);
1472
1472
  this.then(n, r).finally(clearTimeout.bind(null, i));
1473
1473
  }) : this;
1474
- } }), typeof Symbol < "u" && Symbol.toStringTag && me(L.prototype, Symbol.toStringTag, "Dexie.Promise"), Xe.env = zi(), tt(L, { all: function() {
1474
+ } }), typeof Symbol < "u" && Symbol.toStringTag && me(L.prototype, Symbol.toStringTag, "Dexie.Promise"), Xe.env = Gi(), tt(L, { all: function() {
1475
1475
  var e = pe.apply(null, arguments).map(Bt);
1476
1476
  return new L(function(t, n) {
1477
1477
  e.length === 0 && t([]);
@@ -1488,7 +1488,7 @@ From previous: `);
1488
1488
  e.then(n, r);
1489
1489
  });
1490
1490
  var t = new L(St, !0, e);
1491
- return Wi(t, Wn), t;
1491
+ return zi(t, Wn), t;
1492
1492
  }, reject: Ct, race: function() {
1493
1493
  var e = pe.apply(null, arguments).map(Bt);
1494
1494
  return new L((t, n) => {
@@ -1532,41 +1532,41 @@ From previous: `);
1532
1532
  });
1533
1533
  }));
1534
1534
  const W = { awaits: 0, echoes: 0, id: 0 };
1535
- var qo = 0, Gt = [], vn = 0, on = 0, Wo = 0;
1535
+ var Wo = 0, Gt = [], vn = 0, on = 0, zo = 0;
1536
1536
  function Le(e, t, n, r) {
1537
1537
  var i = U, s = Object.create(i);
1538
- s.parent = i, s.ref = 0, s.global = !1, s.id = ++Wo;
1538
+ s.parent = i, s.ref = 0, s.global = !1, s.id = ++zo;
1539
1539
  var o = Xe.env;
1540
- s.env = Sr ? { Promise: L, PromiseProp: { value: L, configurable: !0, writable: !0 }, all: L.all, race: L.race, allSettled: L.allSettled, any: L.any, resolve: L.resolve, reject: L.reject, nthen: Nr(o.nthen, s), gthen: Nr(o.gthen, s) } : {}, t && H(s, t), ++i.ref, s.finalize = function() {
1540
+ s.env = Sr ? { Promise: L, PromiseProp: { value: L, configurable: !0, writable: !0 }, all: L.all, race: L.race, allSettled: L.allSettled, any: L.any, resolve: L.resolve, reject: L.reject, nthen: Kr(o.nthen, s), gthen: Kr(o.gthen, s) } : {}, t && H(s, t), ++i.ref, s.finalize = function() {
1541
1541
  --this.parent.ref || this.parent.finalize();
1542
1542
  };
1543
1543
  var a = st(s, e, n, r);
1544
1544
  return s.ref === 0 && s.finalize(), a;
1545
1545
  }
1546
1546
  function it() {
1547
- return W.id || (W.id = ++qo), ++W.awaits, W.echoes += Ki, W.id;
1547
+ return W.id || (W.id = ++Wo), ++W.awaits, W.echoes += Fi, W.id;
1548
1548
  }
1549
1549
  function we() {
1550
- return !!W.awaits && (--W.awaits == 0 && (W.id = 0), W.echoes = W.awaits * Ki, !0);
1550
+ return !!W.awaits && (--W.awaits == 0 && (W.id = 0), W.echoes = W.awaits * Fi, !0);
1551
1551
  }
1552
1552
  function Bt(e) {
1553
1553
  return W.echoes && e && e.constructor === qt ? (it(), e.then((t) => (we(), t), (t) => (we(), $(t)))) : e;
1554
1554
  }
1555
- function zo(e) {
1555
+ function Go(e) {
1556
1556
  ++on, W.echoes && --W.echoes != 0 || (W.echoes = W.id = 0), Gt.push(U), Ie(e, !0);
1557
1557
  }
1558
- function Go() {
1558
+ function Ho() {
1559
1559
  var e = Gt[Gt.length - 1];
1560
1560
  Gt.pop(), Ie(e, !1);
1561
1561
  }
1562
1562
  function Ie(e, t) {
1563
1563
  var n = U;
1564
- if ((t ? !W.echoes || vn++ && e === U : !vn || --vn && e === U) || Gi(t ? zo.bind(null, e) : Go), e !== U && (U = e, n === Xe && (Xe.env = zi()), Sr)) {
1564
+ if ((t ? !W.echoes || vn++ && e === U : !vn || --vn && e === U) || Hi(t ? Go.bind(null, e) : Ho), e !== U && (U = e, n === Xe && (Xe.env = Gi()), Sr)) {
1565
1565
  var r = Xe.env.Promise, i = e.env;
1566
1566
  rn.then = i.nthen, r.prototype.then = i.gthen, (n.global || e.global) && (Object.defineProperty(j, "Promise", i.PromiseProp), r.all = i.all, r.race = i.race, r.resolve = i.resolve, r.reject = i.reject, i.allSettled && (r.allSettled = i.allSettled), i.any && (r.any = i.any));
1567
1567
  }
1568
1568
  }
1569
- function zi() {
1569
+ function Gi() {
1570
1570
  var e = j.Promise;
1571
1571
  return Sr ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(j, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject, nthen: rn.then, gthen: e.prototype.then } : {};
1572
1572
  }
@@ -1578,8 +1578,8 @@ function st(e, t, n, r, i) {
1578
1578
  Ie(s, !1);
1579
1579
  }
1580
1580
  }
1581
- function Gi(e) {
1582
- Fi.call(Mn, e);
1581
+ function Hi(e) {
1582
+ Mi.call(Mn, e);
1583
1583
  }
1584
1584
  function an(e, t, n, r) {
1585
1585
  return typeof e != "function" ? e : function() {
@@ -1588,18 +1588,18 @@ function an(e, t, n, r) {
1588
1588
  try {
1589
1589
  return e.apply(this, arguments);
1590
1590
  } finally {
1591
- Ie(i, !1), r && Gi(we);
1591
+ Ie(i, !1), r && Hi(we);
1592
1592
  }
1593
1593
  };
1594
1594
  }
1595
- function Nr(e, t) {
1595
+ function Kr(e, t) {
1596
1596
  return function(n, r) {
1597
1597
  return e.call(this, an(n, t), an(r, t));
1598
1598
  };
1599
1599
  }
1600
- ("" + Fi).indexOf("[native code]") === -1 && (it = we = C);
1601
- const Kr = "unhandledrejection";
1602
- function Fr(e, t) {
1600
+ ("" + Mi).indexOf("[native code]") === -1 && (it = we = C);
1601
+ const Fr = "unhandledrejection";
1602
+ function Mr(e, t) {
1603
1603
  var n;
1604
1604
  try {
1605
1605
  n = t.onuncatched(e);
@@ -1608,7 +1608,7 @@ function Fr(e, t) {
1608
1608
  if (n !== !1)
1609
1609
  try {
1610
1610
  var r, i = { promise: t, reason: e };
1611
- if (j.document && document.createEvent ? ((r = document.createEvent("Event")).initEvent(Kr, !0, !0), H(r, i)) : j.CustomEvent && H(r = new CustomEvent(Kr, { detail: i }), i), r && j.dispatchEvent && (dispatchEvent(r), !j.PromiseRejectionEvent && j.onunhandledrejection))
1611
+ if (j.document && document.createEvent ? ((r = document.createEvent("Event")).initEvent(Fr, !0, !0), H(r, i)) : j.CustomEvent && H(r = new CustomEvent(Fr, { detail: i }), i), r && j.dispatchEvent && (dispatchEvent(r), !j.PromiseRejectionEvent && j.onunhandledrejection))
1612
1612
  try {
1613
1613
  j.onunhandledrejection(r);
1614
1614
  } catch {
@@ -1637,17 +1637,17 @@ function Yn(e, t, n, r) {
1637
1637
  }
1638
1638
  return e._state.dbReadyPromise.then(() => Yn(e, t, n, r));
1639
1639
  }
1640
- const Mr = "3.2.4", De = "￿", Jn = -1 / 0, ce = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", Hi = "String expected.", yt = [], fn = typeof navigator < "u" && /(MSIE|Trident|Edge)/.test(navigator.userAgent), Ho = fn, Yo = fn, Yi = (e) => !/(dexie\.js|dexie\.min\.js)/.test(e), mn = "__dbnames", bn = "readonly", _n = "readwrite";
1640
+ const $r = "3.2.7", De = "￿", Jn = -1 / 0, ce = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", Yi = "String expected.", yt = [], fn = typeof navigator < "u" && /(MSIE|Trident|Edge)/.test(navigator.userAgent), Yo = fn, Jo = fn, Ji = (e) => !/(dexie\.js|dexie\.min\.js)/.test(e), mn = "__dbnames", bn = "readonly", _n = "readwrite";
1641
1641
  function Fe(e, t) {
1642
1642
  return e ? t ? function() {
1643
1643
  return e.apply(this, arguments) && t.apply(this, arguments);
1644
1644
  } : e : t;
1645
1645
  }
1646
- const Ji = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1646
+ const Qi = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
1647
1647
  function jt(e) {
1648
1648
  return typeof e != "string" || /\./.test(e) ? (t) => t : (t) => (t[e] === void 0 && e in t && delete (t = xt(t))[e], t);
1649
1649
  }
1650
- class Jo {
1650
+ class Qo {
1651
1651
  _trans(t, n, r) {
1652
1652
  const i = this._tx || U.trans, s = this.name;
1653
1653
  function o(l, u, c) {
@@ -1655,11 +1655,11 @@ class Jo {
1655
1655
  throw new A.NotFound("Table " + s + " not part of transaction");
1656
1656
  return n(c.idbtrans, c);
1657
1657
  }
1658
- const a = Ot();
1658
+ const a = Pt();
1659
1659
  try {
1660
1660
  return i && i.db === this.db ? i === U.trans ? i._promise(t, o, r) : Le(() => i._promise(t, o, r), { trans: i, transless: U.transless || U }) : Yn(this.db, t, [this.name], o);
1661
1661
  } finally {
1662
- a && Pt();
1662
+ a && Ot();
1663
1663
  }
1664
1664
  }
1665
1665
  get(t, n) {
@@ -1673,9 +1673,19 @@ class Jo {
1673
1673
  const n = F(t);
1674
1674
  if (n.length === 1)
1675
1675
  return this.where(n[0]).equals(t[n[0]]);
1676
- const r = this.schema.indexes.concat(this.schema.primKey).filter((u) => u.compound && n.every((c) => u.keyPath.indexOf(c) >= 0) && u.keyPath.every((c) => n.indexOf(c) >= 0))[0];
1677
- if (r && this.db._maxKey !== De)
1678
- return this.where(r.name).equals(r.keyPath.map((u) => t[u]));
1676
+ const r = this.schema.indexes.concat(this.schema.primKey).filter((u) => {
1677
+ if (u.compound && n.every((c) => u.keyPath.indexOf(c) >= 0)) {
1678
+ for (let c = 0; c < n.length; ++c)
1679
+ if (n.indexOf(u.keyPath[c]) === -1)
1680
+ return !1;
1681
+ return !0;
1682
+ }
1683
+ return !1;
1684
+ }).sort((u, c) => u.keyPath.length - c.keyPath.length)[0];
1685
+ if (r && this.db._maxKey !== De) {
1686
+ const u = r.keyPath.slice(0, n.length);
1687
+ return this.where(u).equals(u.map((c) => t[c]));
1688
+ }
1679
1689
  !r && le && console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);
1680
1690
  const { idxByName: i } = this.schema, s = this.db._deps.indexedDB;
1681
1691
  function o(u, c) {
@@ -1688,8 +1698,8 @@ class Jo {
1688
1698
  const [a, l] = n.reduce(([u, c], p) => {
1689
1699
  const d = i[p], h = t[p];
1690
1700
  return [u || d, u || !d ? Fe(c, d && d.multi ? (w) => {
1691
- const m = ye(w, p);
1692
- return z(m) && m.some((g) => o(h, g));
1701
+ const y = ye(w, p);
1702
+ return z(y) && y.some((g) => o(h, g));
1693
1703
  } : (w) => o(h, ye(w, p))) : c];
1694
1704
  }, [null, null]);
1695
1705
  return a ? this.where(a.name).equals(t[a.keyPath]).filter(l) : r ? this.filter(l) : this.where(n).equals("");
@@ -1786,7 +1796,7 @@ class Jo {
1786
1796
  return this._trans("readwrite", (n) => this.core.mutate({ trans: n, type: "delete", keys: [t] })).then((n) => n.numFailures ? L.reject(n.failures[0]) : void 0);
1787
1797
  }
1788
1798
  clear() {
1789
- return this._trans("readwrite", (t) => this.core.mutate({ trans: t, type: "deleteRange", range: Ji })).then((t) => t.numFailures ? L.reject(t.failures[0]) : void 0);
1799
+ return this._trans("readwrite", (t) => this.core.mutate({ trans: t, type: "deleteRange", range: Qi })).then((t) => t.numFailures ? L.reject(t.failures[0]) : void 0);
1790
1800
  }
1791
1801
  bulkGet(t) {
1792
1802
  return this._trans("readonly", (n) => this.core.getMany({ keys: t, trans: n }).then((r) => r.map((i) => this.hook.reading.fire(i))));
@@ -1851,7 +1861,7 @@ function wt(e) {
1851
1861
  function s(o, a, l) {
1852
1862
  if (typeof o != "object") {
1853
1863
  var u;
1854
- a || (a = Mo), l || (l = C);
1864
+ a || (a = $o), l || (l = C);
1855
1865
  var c = { subscribers: [], fire: l, subscribe: function(p) {
1856
1866
  c.subscribers.indexOf(p) === -1 && (c.subscribers.push(p), c.fire = a(c.fire, p));
1857
1867
  }, unsubscribe: function(p) {
@@ -1869,11 +1879,11 @@ function wt(e) {
1869
1879
  if (d !== "asap")
1870
1880
  throw new A.InvalidArgument("Invalid event config");
1871
1881
  var h = s(p, _t, function() {
1872
- for (var w = arguments.length, m = new Array(w); w--; )
1873
- m[w] = arguments[w];
1882
+ for (var w = arguments.length, y = new Array(w); w--; )
1883
+ y[w] = arguments[w];
1874
1884
  h.subscribers.forEach(function(g) {
1875
1885
  Oi(function() {
1876
- g.apply(null, m);
1886
+ g.apply(null, y);
1877
1887
  });
1878
1888
  });
1879
1889
  });
@@ -1902,7 +1912,7 @@ function Ht(e, t) {
1902
1912
  throw new A.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
1903
1913
  return n;
1904
1914
  }
1905
- function $r(e, t, n) {
1915
+ function Vr(e, t, n) {
1906
1916
  const r = Ht(e, t.schema);
1907
1917
  return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
1908
1918
  }
@@ -1915,11 +1925,11 @@ function Nt(e, t, n, r) {
1915
1925
  p === "[object ArrayBuffer]" && (p = "" + new Uint8Array(c)), te(s, p) || (s[p] = !0, t(a, l, u));
1916
1926
  }
1917
1927
  };
1918
- return Promise.all([e.or._iterate(o, n), Vr($r(e, r, n), e.algorithm, o, !e.keysOnly && e.valueMapper)]);
1928
+ return Promise.all([e.or._iterate(o, n), qr(Vr(e, r, n), e.algorithm, o, !e.keysOnly && e.valueMapper)]);
1919
1929
  }
1920
- return Vr($r(e, r, n), Fe(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
1930
+ return qr(Vr(e, r, n), Fe(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
1921
1931
  }
1922
- function Vr(e, t, n, r) {
1932
+ function qr(e, t, n, r) {
1923
1933
  var i = N(r ? (s, o, a) => n(r(s), o, a) : n);
1924
1934
  return e.then((s) => {
1925
1935
  if (s)
@@ -1935,7 +1945,7 @@ function Vr(e, t, n, r) {
1935
1945
  }
1936
1946
  function G(e, t) {
1937
1947
  try {
1938
- const n = qr(e), r = qr(t);
1948
+ const n = Wr(e), r = Wr(t);
1939
1949
  if (n !== r)
1940
1950
  return n === "Array" ? 1 : r === "Array" ? -1 : n === "binary" ? 1 : r === "binary" ? -1 : n === "string" ? 1 : r === "string" ? -1 : n === "Date" ? 1 : r !== "Date" ? NaN : -1;
1941
1951
  switch (n) {
@@ -1950,7 +1960,7 @@ function G(e, t) {
1950
1960
  if (i[u] !== s[u])
1951
1961
  return i[u] < s[u] ? -1 : 1;
1952
1962
  return o === a ? 0 : o < a ? -1 : 1;
1953
- }(Wr(e), Wr(t));
1963
+ }(zr(e), zr(t));
1954
1964
  case "Array":
1955
1965
  return function(i, s) {
1956
1966
  const o = i.length, a = s.length, l = o < a ? o : a;
@@ -1966,7 +1976,7 @@ function G(e, t) {
1966
1976
  }
1967
1977
  return NaN;
1968
1978
  }
1969
- function qr(e) {
1979
+ function Wr(e) {
1970
1980
  const t = typeof e;
1971
1981
  if (t !== "object")
1972
1982
  return t;
@@ -1975,10 +1985,10 @@ function qr(e) {
1975
1985
  const n = Nn(e);
1976
1986
  return n === "ArrayBuffer" ? "binary" : n;
1977
1987
  }
1978
- function Wr(e) {
1988
+ function zr(e) {
1979
1989
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
1980
1990
  }
1981
- class Qo {
1991
+ class Xo {
1982
1992
  _read(t, n) {
1983
1993
  var r = this._ctx;
1984
1994
  return r.error ? r.table._trans(null, $.bind(null, r.error)) : r.table._trans("readonly", t).then(n);
@@ -2161,50 +2171,50 @@ class Qo {
2161
2171
  i = t;
2162
2172
  else {
2163
2173
  var s = F(t), o = s.length;
2164
- i = function(m) {
2165
- for (var g = !1, y = 0; y < o; ++y) {
2166
- var f = s[y], v = t[f];
2167
- ye(m, f) !== v && (ie(m, f, v), g = !0);
2174
+ i = function(y) {
2175
+ for (var g = !1, m = 0; m < o; ++m) {
2176
+ var f = s[m], v = t[f];
2177
+ ye(y, f) !== v && (ie(y, f, v), g = !0);
2168
2178
  }
2169
2179
  return g;
2170
2180
  };
2171
2181
  }
2172
2182
  const a = n.table.core, { outbound: l, extractKey: u } = a.schema.primaryKey, c = this.db._options.modifyChunkSize || 200, p = [];
2173
2183
  let d = 0;
2174
- const h = [], w = (m, g) => {
2175
- const { failures: y, numFailures: f } = g;
2176
- d += m - f;
2177
- for (let v of F(y))
2178
- p.push(y[v]);
2184
+ const h = [], w = (y, g) => {
2185
+ const { failures: m, numFailures: f } = g;
2186
+ d += y - f;
2187
+ for (let v of F(m))
2188
+ p.push(m[v]);
2179
2189
  };
2180
- return this.clone().primaryKeys().then((m) => {
2181
- const g = (y) => {
2182
- const f = Math.min(c, m.length - y);
2183
- return a.getMany({ trans: r, keys: m.slice(y, y + f), cache: "immutable" }).then((v) => {
2190
+ return this.clone().primaryKeys().then((y) => {
2191
+ const g = (m) => {
2192
+ const f = Math.min(c, y.length - m);
2193
+ return a.getMany({ trans: r, keys: y.slice(m, m + f), cache: "immutable" }).then((v) => {
2184
2194
  const b = [], _ = [], E = l ? [] : null, S = [];
2185
2195
  for (let k = 0; k < f; ++k) {
2186
- const B = v[k], D = { value: xt(B), primKey: m[y + k] };
2187
- i.call(D, D.value, D) !== !1 && (D.value == null ? S.push(m[y + k]) : l || G(u(B), u(D.value)) === 0 ? (_.push(D.value), l && E.push(m[y + k])) : (S.push(m[y + k]), b.push(D.value)));
2196
+ const B = v[k], D = { value: xt(B), primKey: y[m + k] };
2197
+ i.call(D, D.value, D) !== !1 && (D.value == null ? S.push(y[m + k]) : l || G(u(B), u(D.value)) === 0 ? (_.push(D.value), l && E.push(y[m + k])) : (S.push(y[m + k]), b.push(D.value)));
2188
2198
  }
2189
- const O = We(n) && n.limit === 1 / 0 && (typeof t != "function" || t === kn) && { index: n.index, range: n.range };
2199
+ const P = We(n) && n.limit === 1 / 0 && (typeof t != "function" || t === kn) && { index: n.index, range: n.range };
2190
2200
  return Promise.resolve(b.length > 0 && a.mutate({ trans: r, type: "add", values: b }).then((k) => {
2191
2201
  for (let B in k.failures)
2192
2202
  S.splice(parseInt(B), 1);
2193
2203
  w(b.length, k);
2194
- })).then(() => (_.length > 0 || O && typeof t == "object") && a.mutate({ trans: r, type: "put", keys: E, values: _, criteria: O, changeSpec: typeof t != "function" && t }).then((k) => w(_.length, k))).then(() => (S.length > 0 || O && t === kn) && a.mutate({ trans: r, type: "delete", keys: S, criteria: O }).then((k) => w(S.length, k))).then(() => m.length > y + f && g(y + c));
2204
+ })).then(() => (_.length > 0 || P && typeof t == "object") && a.mutate({ trans: r, type: "put", keys: E, values: _, criteria: P, changeSpec: typeof t != "function" && t }).then((k) => w(_.length, k))).then(() => (S.length > 0 || P && t === kn) && a.mutate({ trans: r, type: "delete", keys: S, criteria: P }).then((k) => w(S.length, k))).then(() => y.length > m + f && g(m + c));
2195
2205
  });
2196
2206
  };
2197
2207
  return g(0).then(() => {
2198
2208
  if (p.length > 0)
2199
2209
  throw new nn("Error modifying one or more objects", p, d, h);
2200
- return m.length;
2210
+ return y.length;
2201
2211
  });
2202
2212
  });
2203
2213
  });
2204
2214
  }
2205
2215
  delete() {
2206
2216
  var t = this._ctx, n = t.range;
2207
- return We(t) && (t.isPrimKey && !Yo || n.type === 3) ? this._write((r) => {
2217
+ return We(t) && (t.isPrimKey && !Jo || n.type === 3) ? this._write((r) => {
2208
2218
  const { primaryKey: i } = t.table.core.schema, s = n;
2209
2219
  return t.table.core.count({ trans: r, query: { index: i, range: s } }).then((o) => t.table.core.mutate({ trans: r, type: "deleteRange", range: s }).then(({ failures: a, lastResult: l, results: u, numFailures: c }) => {
2210
2220
  if (c)
@@ -2215,20 +2225,20 @@ class Qo {
2215
2225
  }
2216
2226
  }
2217
2227
  const kn = (e, t) => t.value = null;
2218
- function Xo(e, t) {
2228
+ function Zo(e, t) {
2219
2229
  return e < t ? -1 : e === t ? 0 : 1;
2220
2230
  }
2221
- function Zo(e, t) {
2231
+ function ea(e, t) {
2222
2232
  return e > t ? -1 : e === t ? 0 : 1;
2223
2233
  }
2224
2234
  function Q(e, t, n) {
2225
- var r = e instanceof Xi ? new e.Collection(e) : e;
2235
+ var r = e instanceof Zi ? new e.Collection(e) : e;
2226
2236
  return r._ctx.error = n ? new n(t) : new TypeError(t), r;
2227
2237
  }
2228
2238
  function ze(e) {
2229
- return new e.Collection(e, () => Qi("")).limit(0);
2239
+ return new e.Collection(e, () => Xi("")).limit(0);
2230
2240
  }
2231
- function ea(e, t, n, r, i, s) {
2241
+ function ta(e, t, n, r, i, s) {
2232
2242
  for (var o = Math.min(e.length, r.length), a = -1, l = 0; l < o; ++l) {
2233
2243
  var u = t[l];
2234
2244
  if (u !== r[l])
@@ -2239,54 +2249,54 @@ function ea(e, t, n, r, i, s) {
2239
2249
  }
2240
2250
  function Kt(e, t, n, r) {
2241
2251
  var i, s, o, a, l, u, c, p = n.length;
2242
- if (!n.every((m) => typeof m == "string"))
2243
- return Q(e, Hi);
2244
- function d(m) {
2245
- i = /* @__PURE__ */ function(y) {
2246
- return y === "next" ? (f) => f.toUpperCase() : (f) => f.toLowerCase();
2247
- }(m), s = /* @__PURE__ */ function(y) {
2248
- return y === "next" ? (f) => f.toLowerCase() : (f) => f.toUpperCase();
2249
- }(m), o = m === "next" ? Xo : Zo;
2250
- var g = n.map(function(y) {
2251
- return { lower: s(y), upper: i(y) };
2252
- }).sort(function(y, f) {
2253
- return o(y.lower, f.lower);
2252
+ if (!n.every((y) => typeof y == "string"))
2253
+ return Q(e, Yi);
2254
+ function d(y) {
2255
+ i = /* @__PURE__ */ function(m) {
2256
+ return m === "next" ? (f) => f.toUpperCase() : (f) => f.toLowerCase();
2257
+ }(y), s = /* @__PURE__ */ function(m) {
2258
+ return m === "next" ? (f) => f.toLowerCase() : (f) => f.toUpperCase();
2259
+ }(y), o = y === "next" ? Zo : ea;
2260
+ var g = n.map(function(m) {
2261
+ return { lower: s(m), upper: i(m) };
2262
+ }).sort(function(m, f) {
2263
+ return o(m.lower, f.lower);
2254
2264
  });
2255
- a = g.map(function(y) {
2256
- return y.upper;
2257
- }), l = g.map(function(y) {
2258
- return y.lower;
2259
- }), u = m, c = m === "next" ? "" : r;
2265
+ a = g.map(function(m) {
2266
+ return m.upper;
2267
+ }), l = g.map(function(m) {
2268
+ return m.lower;
2269
+ }), u = y, c = y === "next" ? "" : r;
2260
2270
  }
2261
2271
  d("next");
2262
2272
  var h = new e.Collection(e, () => be(a[0], l[p - 1] + r));
2263
- h._ondirectionchange = function(m) {
2264
- d(m);
2273
+ h._ondirectionchange = function(y) {
2274
+ d(y);
2265
2275
  };
2266
2276
  var w = 0;
2267
- return h._addAlgorithm(function(m, g, y) {
2268
- var f = m.key;
2277
+ return h._addAlgorithm(function(y, g, m) {
2278
+ var f = y.key;
2269
2279
  if (typeof f != "string")
2270
2280
  return !1;
2271
2281
  var v = s(f);
2272
2282
  if (t(v, l, w))
2273
2283
  return !0;
2274
2284
  for (var b = null, _ = w; _ < p; ++_) {
2275
- var E = ea(f, v, a[_], l[_], o, u);
2285
+ var E = ta(f, v, a[_], l[_], o, u);
2276
2286
  E === null && b === null ? w = _ + 1 : (b === null || o(b, E) > 0) && (b = E);
2277
2287
  }
2278
2288
  return g(b !== null ? function() {
2279
- m.continue(b + c);
2280
- } : y), !1;
2289
+ y.continue(b + c);
2290
+ } : m), !1;
2281
2291
  }), h;
2282
2292
  }
2283
2293
  function be(e, t, n, r) {
2284
2294
  return { type: 2, lower: e, upper: t, lowerOpen: n, upperOpen: r };
2285
2295
  }
2286
- function Qi(e) {
2296
+ function Xi(e) {
2287
2297
  return { type: 1, lower: e, upper: e };
2288
2298
  }
2289
- class Xi {
2299
+ class Zi {
2290
2300
  get Collection() {
2291
2301
  return this._ctx.table.db.Collection;
2292
2302
  }
@@ -2299,7 +2309,7 @@ class Xi {
2299
2309
  }
2300
2310
  }
2301
2311
  equals(t) {
2302
- return t == null ? Q(this, ce) : new this.Collection(this, () => Qi(t));
2312
+ return t == null ? Q(this, ce) : new this.Collection(this, () => Xi(t));
2303
2313
  }
2304
2314
  above(t) {
2305
2315
  return t == null ? Q(this, ce) : new this.Collection(this, () => be(t, void 0, !0));
@@ -2314,7 +2324,7 @@ class Xi {
2314
2324
  return t == null ? Q(this, ce) : new this.Collection(this, () => be(void 0, t));
2315
2325
  }
2316
2326
  startsWith(t) {
2317
- return typeof t != "string" ? Q(this, Hi) : this.between(t, t + De, !0, !0);
2327
+ return typeof t != "string" ? Q(this, Yi) : this.between(t, t + De, !0, !0);
2318
2328
  }
2319
2329
  startsWithIgnoreCase(t) {
2320
2330
  return t === "" ? this.startsWith(t) : Kt(this, (n, r) => n.indexOf(r[0]) === 0, [t], De);
@@ -2397,21 +2407,21 @@ class Xi {
2397
2407
  return Q(this, ce);
2398
2408
  }
2399
2409
  let h = 0;
2400
- const w = u ? (f) => i(f, c[h][1]) > 0 : (f) => i(f, c[h][1]) >= 0, m = l ? (f) => s(f, c[h][0]) > 0 : (f) => s(f, c[h][0]) >= 0;
2410
+ const w = u ? (f) => i(f, c[h][1]) > 0 : (f) => i(f, c[h][1]) >= 0, y = l ? (f) => s(f, c[h][0]) > 0 : (f) => s(f, c[h][0]) >= 0;
2401
2411
  let g = w;
2402
- const y = new this.Collection(this, () => be(c[0][0], c[c.length - 1][1], !l, !u));
2403
- return y._ondirectionchange = (f) => {
2404
- f === "next" ? (g = w, p = i) : (g = m, p = s), c.sort(d);
2405
- }, y._addAlgorithm((f, v, b) => {
2412
+ const m = new this.Collection(this, () => be(c[0][0], c[c.length - 1][1], !l, !u));
2413
+ return m._ondirectionchange = (f) => {
2414
+ f === "next" ? (g = w, p = i) : (g = y, p = s), c.sort(d);
2415
+ }, m._addAlgorithm((f, v, b) => {
2406
2416
  for (var _ = f.key; g(_); )
2407
2417
  if (++h, h === c.length)
2408
2418
  return v(b), !1;
2409
2419
  return !!function(E) {
2410
- return !w(E) && !m(E);
2420
+ return !w(E) && !y(E);
2411
2421
  }(_) || (this._cmp(_, c[h][1]) === 0 || this._cmp(_, c[h][0]) === 0 || v(() => {
2412
2422
  p === i ? f.continue(c[h][0]) : f.continue(c[h][1]);
2413
2423
  }), !1);
2414
- }), y;
2424
+ }), m;
2415
2425
  }
2416
2426
  startsWithAnyOf() {
2417
2427
  const t = pe.apply(Ge, arguments);
@@ -2427,7 +2437,7 @@ function Et(e) {
2427
2437
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
2428
2438
  }
2429
2439
  const kt = "storagemutated", Se = "x-storagemutated-1", Ue = wt(null, kt);
2430
- class ta {
2440
+ class na {
2431
2441
  _lock() {
2432
2442
  return pt(!U.global), ++this._reculock, this._reculock !== 1 || U.global || (U.lockOwnerFor = this), this;
2433
2443
  }
@@ -2533,13 +2543,13 @@ class ta {
2533
2543
  }
2534
2544
  }
2535
2545
  function Qn(e, t, n, r, i, s, o) {
2536
- return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: s, src: (n && !o ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + Zi(t) };
2546
+ return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: s, src: (n && !o ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + es(t) };
2537
2547
  }
2538
- function Zi(e) {
2548
+ function es(e) {
2539
2549
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
2540
2550
  }
2541
- function es(e, t, n) {
2542
- return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: Pi(n, (r) => [r.name, r]) };
2551
+ function ts(e, t, n) {
2552
+ return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: Ri(n, (r) => [r.name, r]) };
2543
2553
  }
2544
2554
  let Lt = (e) => {
2545
2555
  try {
@@ -2554,14 +2564,14 @@ function Xn(e) {
2554
2564
  return t.split(".").length === 1 ? (r) => r[t] : (r) => ye(r, t);
2555
2565
  }(e) : (t) => ye(t, e);
2556
2566
  }
2557
- function zr(e) {
2567
+ function Gr(e) {
2558
2568
  return [].slice.call(e);
2559
2569
  }
2560
- let na = 0;
2570
+ let ra = 0;
2561
2571
  function gt(e) {
2562
2572
  return e == null ? ":id" : typeof e == "string" ? e : `[${e.join("+")}]`;
2563
2573
  }
2564
- function ra(e, t, n) {
2574
+ function ia(e, t, n) {
2565
2575
  function r(l) {
2566
2576
  if (l.type === 3)
2567
2577
  return null;
@@ -2571,18 +2581,18 @@ function ra(e, t, n) {
2571
2581
  return u === void 0 ? c === void 0 ? null : t.upperBound(c, !!d) : c === void 0 ? t.lowerBound(u, !!p) : t.bound(u, c, !!p, !!d);
2572
2582
  }
2573
2583
  const { schema: i, hasGetAll: s } = function(l, u) {
2574
- const c = zr(l.objectStoreNames);
2584
+ const c = Gr(l.objectStoreNames);
2575
2585
  return { schema: { name: l.name, tables: c.map((p) => u.objectStore(p)).map((p) => {
2576
- const { keyPath: d, autoIncrement: h } = p, w = z(d), m = d == null, g = {}, y = { name: p.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: m, compound: w, keyPath: d, autoIncrement: h, unique: !0, extractKey: Xn(d) }, indexes: zr(p.indexNames).map((f) => p.index(f)).map((f) => {
2586
+ const { keyPath: d, autoIncrement: h } = p, w = z(d), y = d == null, g = {}, m = { name: p.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: y, compound: w, keyPath: d, autoIncrement: h, unique: !0, extractKey: Xn(d) }, indexes: Gr(p.indexNames).map((f) => p.index(f)).map((f) => {
2577
2587
  const { name: v, unique: b, multiEntry: _, keyPath: E } = f, S = { name: v, compound: z(E), keyPath: E, unique: b, multiEntry: _, extractKey: Xn(E) };
2578
2588
  return g[gt(E)] = S, S;
2579
2589
  }), getIndexByKeyPath: (f) => g[gt(f)] };
2580
- return g[":id"] = y.primaryKey, d != null && (g[gt(d)] = y.primaryKey), y;
2590
+ return g[":id"] = m.primaryKey, d != null && (g[gt(d)] = m.primaryKey), m;
2581
2591
  }) }, hasGetAll: c.length > 0 && "getAll" in u.objectStore(c[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) };
2582
2592
  }(e, n), o = i.tables.map((l) => function(u) {
2583
2593
  const c = u.name;
2584
- return { name: c, schema: u, mutate: function({ trans: p, type: d, keys: h, values: w, range: m }) {
2585
- return new Promise((g, y) => {
2594
+ return { name: c, schema: u, mutate: function({ trans: p, type: d, keys: h, values: w, range: y }) {
2595
+ return new Promise((g, m) => {
2586
2596
  g = N(g);
2587
2597
  const f = p.objectStore(c), v = f.keyPath == null, b = d === "put" || d === "add";
2588
2598
  if (!b && d !== "delete" && d !== "deleteRange")
@@ -2593,15 +2603,15 @@ function ra(e, t, n) {
2593
2603
  if (_ === 0)
2594
2604
  return g({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
2595
2605
  let E;
2596
- const S = [], O = [];
2606
+ const S = [], P = [];
2597
2607
  let k = 0;
2598
2608
  const B = (V) => {
2599
2609
  ++k, Et(V);
2600
2610
  };
2601
2611
  if (d === "deleteRange") {
2602
- if (m.type === 4)
2603
- return g({ numFailures: k, failures: O, results: [], lastResult: void 0 });
2604
- m.type === 3 ? S.push(E = f.clear()) : S.push(E = f.delete(r(m)));
2612
+ if (y.type === 4)
2613
+ return g({ numFailures: k, failures: P, results: [], lastResult: void 0 });
2614
+ y.type === 3 ? S.push(E = f.clear()) : S.push(E = f.delete(r(y)));
2605
2615
  } else {
2606
2616
  const [V, M] = b ? v ? [w, h] : [w, null] : [h, null];
2607
2617
  if (b)
@@ -2613,7 +2623,7 @@ function ra(e, t, n) {
2613
2623
  }
2614
2624
  const D = (V) => {
2615
2625
  const M = V.target.result;
2616
- S.forEach((x, ve) => x.error != null && (O[ve] = x.error)), g({ numFailures: k, failures: O, results: d === "delete" ? h : S.map((x) => x.result), lastResult: M });
2626
+ S.forEach((x, ve) => x.error != null && (P[ve] = x.error)), g({ numFailures: k, failures: P, results: d === "delete" ? h : S.map((x) => x.result), lastResult: M });
2617
2627
  };
2618
2628
  E.onerror = (V) => {
2619
2629
  B(V), D(V);
@@ -2621,46 +2631,46 @@ function ra(e, t, n) {
2621
2631
  });
2622
2632
  }, getMany: ({ trans: p, keys: d }) => new Promise((h, w) => {
2623
2633
  h = N(h);
2624
- const m = p.objectStore(c), g = d.length, y = new Array(g);
2634
+ const y = p.objectStore(c), g = d.length, m = new Array(g);
2625
2635
  let f, v = 0, b = 0;
2626
2636
  const _ = (S) => {
2627
- const O = S.target;
2628
- y[O._pos] = O.result, ++b === v && h(y);
2637
+ const P = S.target;
2638
+ m[P._pos] = P.result, ++b === v && h(m);
2629
2639
  }, E = se(w);
2630
2640
  for (let S = 0; S < g; ++S)
2631
- d[S] != null && (f = m.get(d[S]), f._pos = S, f.onsuccess = _, f.onerror = E, ++v);
2632
- v === 0 && h(y);
2641
+ d[S] != null && (f = y.get(d[S]), f._pos = S, f.onsuccess = _, f.onerror = E, ++v);
2642
+ v === 0 && h(m);
2633
2643
  }), get: ({ trans: p, key: d }) => new Promise((h, w) => {
2634
2644
  h = N(h);
2635
- const m = p.objectStore(c).get(d);
2636
- m.onsuccess = (g) => h(g.target.result), m.onerror = se(w);
2645
+ const y = p.objectStore(c).get(d);
2646
+ y.onsuccess = (g) => h(g.target.result), y.onerror = se(w);
2637
2647
  }), query: /* @__PURE__ */ function(p) {
2638
2648
  return (d) => new Promise((h, w) => {
2639
2649
  h = N(h);
2640
- const { trans: m, values: g, limit: y, query: f } = d, v = y === 1 / 0 ? void 0 : y, { index: b, range: _ } = f, E = m.objectStore(c), S = b.isPrimaryKey ? E : E.index(b.name), O = r(_);
2641
- if (y === 0)
2650
+ const { trans: y, values: g, limit: m, query: f } = d, v = m === 1 / 0 ? void 0 : m, { index: b, range: _ } = f, E = y.objectStore(c), S = b.isPrimaryKey ? E : E.index(b.name), P = r(_);
2651
+ if (m === 0)
2642
2652
  return h({ result: [] });
2643
2653
  if (p) {
2644
- const k = g ? S.getAll(O, v) : S.getAllKeys(O, v);
2654
+ const k = g ? S.getAll(P, v) : S.getAllKeys(P, v);
2645
2655
  k.onsuccess = (B) => h({ result: B.target.result }), k.onerror = se(w);
2646
2656
  } else {
2647
2657
  let k = 0;
2648
- const B = g || !("openKeyCursor" in S) ? S.openCursor(O) : S.openKeyCursor(O), D = [];
2658
+ const B = g || !("openKeyCursor" in S) ? S.openCursor(P) : S.openKeyCursor(P), D = [];
2649
2659
  B.onsuccess = (V) => {
2650
2660
  const M = B.result;
2651
- return M ? (D.push(g ? M.value : M.primaryKey), ++k === y ? h({ result: D }) : void M.continue()) : h({ result: D });
2661
+ return M ? (D.push(g ? M.value : M.primaryKey), ++k === m ? h({ result: D }) : void M.continue()) : h({ result: D });
2652
2662
  }, B.onerror = se(w);
2653
2663
  }
2654
2664
  });
2655
- }(s), openCursor: function({ trans: p, values: d, query: h, reverse: w, unique: m }) {
2656
- return new Promise((g, y) => {
2665
+ }(s), openCursor: function({ trans: p, values: d, query: h, reverse: w, unique: y }) {
2666
+ return new Promise((g, m) => {
2657
2667
  g = N(g);
2658
- const { index: f, range: v } = h, b = p.objectStore(c), _ = f.isPrimaryKey ? b : b.index(f.name), E = w ? m ? "prevunique" : "prev" : m ? "nextunique" : "next", S = d || !("openKeyCursor" in _) ? _.openCursor(r(v), E) : _.openKeyCursor(r(v), E);
2659
- S.onerror = se(y), S.onsuccess = N((O) => {
2668
+ const { index: f, range: v } = h, b = p.objectStore(c), _ = f.isPrimaryKey ? b : b.index(f.name), E = w ? y ? "prevunique" : "prev" : y ? "nextunique" : "next", S = d || !("openKeyCursor" in _) ? _.openCursor(r(v), E) : _.openKeyCursor(r(v), E);
2669
+ S.onerror = se(m), S.onsuccess = N((P) => {
2660
2670
  const k = S.result;
2661
2671
  if (!k)
2662
2672
  return void g(null);
2663
- k.___id = ++na, k.done = !1;
2673
+ k.___id = ++ra, k.done = !1;
2664
2674
  const B = k.continue.bind(k);
2665
2675
  let D = k.continuePrimaryKey;
2666
2676
  D && (D = D.bind(k));
@@ -2669,7 +2679,7 @@ function ra(e, t, n) {
2669
2679
  };
2670
2680
  k.trans = p, k.stop = k.continue = k.continuePrimaryKey = k.advance = () => {
2671
2681
  throw new Error("Cursor not started");
2672
- }, k.fail = N(y), k.next = function() {
2682
+ }, k.fail = N(m), k.next = function() {
2673
2683
  let x = 1;
2674
2684
  return this.start(() => x-- ? this.continue() : this.stop()).then(() => this);
2675
2685
  }, k.start = (x) => {
@@ -2693,13 +2703,13 @@ function ra(e, t, n) {
2693
2703
  S.onsuccess = qe, qe();
2694
2704
  }), k.continue = B, k.continuePrimaryKey = D, k.advance = V, qe(), ve;
2695
2705
  }, g(k);
2696
- }, y);
2706
+ }, m);
2697
2707
  });
2698
2708
  }, count({ query: p, trans: d }) {
2699
2709
  const { index: h, range: w } = p;
2700
- return new Promise((m, g) => {
2701
- const y = d.objectStore(c), f = h.isPrimaryKey ? y : y.index(h.name), v = r(w), b = v ? f.count(v) : f.count();
2702
- b.onsuccess = N((_) => m(_.target.result)), b.onerror = se(g);
2710
+ return new Promise((y, g) => {
2711
+ const m = d.objectStore(c), f = h.isPrimaryKey ? m : m.index(h.name), v = r(w), b = v ? f.count(v) : f.count();
2712
+ b.onsuccess = N((_) => y(_.target.result)), b.onerror = se(g);
2703
2713
  });
2704
2714
  } };
2705
2715
  }(l)), a = {};
@@ -2713,7 +2723,7 @@ function Zn({ _novip: e }, t) {
2713
2723
  const n = t.db, r = function(i, s, { IDBKeyRange: o, indexedDB: a }, l) {
2714
2724
  return { dbcore: function(c, p) {
2715
2725
  return p.reduce((d, { create: h }) => ({ ...d, ...h(d) }), c);
2716
- }(ra(s, o, l), i.dbcore) };
2726
+ }(ia(s, o, l), i.dbcore) };
2717
2727
  }(e._middlewares, n, e._deps, t);
2718
2728
  e.core = r.dbcore, e.tables.forEach((i) => {
2719
2729
  const s = i.name;
@@ -2728,7 +2738,7 @@ function ln({ _novip: e }, t, n, r) {
2728
2738
  (!a || "value" in a && a.value === void 0) && (o === e.Transaction.prototype || o instanceof e.Transaction ? me(o, i, { get() {
2729
2739
  return this.table(i);
2730
2740
  }, set(l) {
2731
- Ai(this, i, { value: l, writable: !0, configurable: !0, enumerable: !0 });
2741
+ xi(this, i, { value: l, writable: !0, configurable: !0, enumerable: !0 });
2732
2742
  } }) : o[i] = new e.Table(i, s));
2733
2743
  });
2734
2744
  });
@@ -2739,10 +2749,10 @@ function er({ _novip: e }, t) {
2739
2749
  n[r] instanceof e.Table && delete n[r];
2740
2750
  });
2741
2751
  }
2742
- function ia(e, t) {
2752
+ function sa(e, t) {
2743
2753
  return e._cfg.version - t._cfg.version;
2744
2754
  }
2745
- function sa(e, t, n, r) {
2755
+ function oa(e, t, n, r) {
2746
2756
  const i = e._dbSchema, s = e._createTransaction("readwrite", e._storeNames, i);
2747
2757
  s.create(n), s._completion.catch(r);
2748
2758
  const o = s._reject.bind(s), a = U.transless || U;
@@ -2751,40 +2761,40 @@ function sa(e, t, n, r) {
2751
2761
  Ln(n, l, i[l].primKey, i[l].indexes);
2752
2762
  }), Zn(e, n), L.follow(() => e.on.populate.fire(s)).catch(o)) : function({ _novip: l }, u, c, p) {
2753
2763
  const d = [], h = l._versions;
2754
- let w = l._dbSchema = nr(l, l.idbdb, p), m = !1;
2764
+ let w = l._dbSchema = nr(l, l.idbdb, p), y = !1;
2755
2765
  const g = h.filter((f) => f._cfg.version >= u);
2756
- function y() {
2757
- return d.length ? L.resolve(d.shift()(c.idbtrans)).then(y) : L.resolve();
2766
+ function m() {
2767
+ return d.length ? L.resolve(d.shift()(c.idbtrans)).then(m) : L.resolve();
2758
2768
  }
2759
2769
  return g.forEach((f) => {
2760
2770
  d.push(() => {
2761
2771
  const v = w, b = f._cfg.dbschema;
2762
2772
  rr(l, v, p), rr(l, b, p), w = l._dbSchema = b;
2763
- const _ = ts(v, b);
2773
+ const _ = ns(v, b);
2764
2774
  _.add.forEach((S) => {
2765
2775
  Ln(p, S[0], S[1].primKey, S[1].indexes);
2766
2776
  }), _.change.forEach((S) => {
2767
2777
  if (S.recreate)
2768
2778
  throw new A.Upgrade("Not yet support for changing primary key");
2769
2779
  {
2770
- const O = p.objectStore(S.name);
2771
- S.add.forEach((k) => tr(O, k)), S.change.forEach((k) => {
2772
- O.deleteIndex(k.name), tr(O, k);
2773
- }), S.del.forEach((k) => O.deleteIndex(k));
2780
+ const P = p.objectStore(S.name);
2781
+ S.add.forEach((k) => tr(P, k)), S.change.forEach((k) => {
2782
+ P.deleteIndex(k.name), tr(P, k);
2783
+ }), S.del.forEach((k) => P.deleteIndex(k));
2774
2784
  }
2775
2785
  });
2776
2786
  const E = f._cfg.contentUpgrade;
2777
2787
  if (E && f._cfg.version > u) {
2778
- Zn(l, p), c._memoizedTables = {}, m = !0;
2779
- let S = Ri(b);
2788
+ Zn(l, p), c._memoizedTables = {}, y = !0;
2789
+ let S = Di(b);
2780
2790
  _.del.forEach((D) => {
2781
2791
  S[D] = v[D];
2782
2792
  }), er(l, [l.Transaction.prototype]), ln(l, [l.Transaction.prototype], F(S), S), c.schema = S;
2783
- const O = gr(E);
2793
+ const P = gr(E);
2784
2794
  let k;
2785
- O && it();
2795
+ P && it();
2786
2796
  const B = L.follow(() => {
2787
- if (k = E(c), k && O) {
2797
+ if (k = E(c), k && P) {
2788
2798
  var D = we.bind(null, null);
2789
2799
  k.then(D, D);
2790
2800
  }
@@ -2792,11 +2802,11 @@ function sa(e, t, n, r) {
2792
2802
  return k && typeof k.then == "function" ? L.resolve(k) : B.then(() => k);
2793
2803
  }
2794
2804
  }), d.push((v) => {
2795
- (!m || !Ho) && function(b, _) {
2805
+ (!y || !Yo) && function(b, _) {
2796
2806
  [].slice.call(_.db.objectStoreNames).forEach((E) => b[E] == null && _.db.deleteObjectStore(E));
2797
2807
  }(f._cfg.dbschema, v), er(l, [l.Transaction.prototype]), ln(l, [l.Transaction.prototype], l._storeNames, l._dbSchema), c.schema = l._dbSchema;
2798
2808
  });
2799
- }), y().then(() => {
2809
+ }), m().then(() => {
2800
2810
  var f, v;
2801
2811
  v = p, F(f = w).forEach((b) => {
2802
2812
  v.db.objectStoreNames.contains(b) || Ln(v, b, f[b].primKey, f[b].indexes);
@@ -2805,7 +2815,7 @@ function sa(e, t, n, r) {
2805
2815
  }(e, t, s, n).catch(o);
2806
2816
  });
2807
2817
  }
2808
- function ts(e, t) {
2818
+ function ns(e, t) {
2809
2819
  const n = { del: [], add: [], change: [] };
2810
2820
  let r;
2811
2821
  for (r in e)
@@ -2844,14 +2854,14 @@ function nr(e, t, n) {
2844
2854
  return tn(t.objectStoreNames, 0).forEach((i) => {
2845
2855
  const s = n.objectStore(i);
2846
2856
  let o = s.keyPath;
2847
- const a = Qn(Zi(o), o || "", !1, !1, !!s.autoIncrement, o && typeof o != "string", !0), l = [];
2857
+ const a = Qn(es(o), o || "", !1, !1, !!s.autoIncrement, o && typeof o != "string", !0), l = [];
2848
2858
  for (let c = 0; c < s.indexNames.length; ++c) {
2849
2859
  const p = s.index(s.indexNames[c]);
2850
2860
  o = p.keyPath;
2851
2861
  var u = Qn(p.name, o, !!p.unique, !!p.multiEntry, !1, o && typeof o != "string", !1);
2852
2862
  l.push(u);
2853
2863
  }
2854
- r[i] = es(i, a, l);
2864
+ r[i] = ts(i, a, l);
2855
2865
  }), r;
2856
2866
  }
2857
2867
  function rr({ _novip: e }, t, n) {
@@ -2869,7 +2879,7 @@ function rr({ _novip: e }, t, n) {
2869
2879
  }
2870
2880
  typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && j.WorkerGlobalScope && j instanceof j.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
2871
2881
  }
2872
- class oa {
2882
+ class aa {
2873
2883
  _parseStoresSpec(t, n) {
2874
2884
  F(t).forEach((r) => {
2875
2885
  if (t[r] !== null) {
@@ -2884,7 +2894,7 @@ class oa {
2884
2894
  throw new A.Schema("Only primary key can be marked as autoIncrement (++)");
2885
2895
  if (!o.keyPath)
2886
2896
  throw new A.Schema("Index must have a name and cannot be an empty string");
2887
- }), n[r] = es(r, s, i);
2897
+ }), n[r] = ts(r, s, i);
2888
2898
  }
2889
2899
  });
2890
2900
  }
@@ -2913,7 +2923,7 @@ function ir(e) {
2913
2923
  return U.letThrough = !0, e();
2914
2924
  });
2915
2925
  }
2916
- function aa() {
2926
+ function la() {
2917
2927
  var e;
2918
2928
  return !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(t) {
2919
2929
  var n = function() {
@@ -2924,7 +2934,7 @@ function aa() {
2924
2934
  return clearInterval(e);
2925
2935
  }) : Promise.resolve();
2926
2936
  }
2927
- function la(e) {
2937
+ function ca(e) {
2928
2938
  const t = e._state, { indexedDB: n } = e._deps;
2929
2939
  if (t.isBeingOpened || e.idbdb)
2930
2940
  return t.dbReadyPromise.then(() => t.dbOpenError ? $(t.dbOpenError) : e);
@@ -2935,63 +2945,64 @@ function la(e) {
2935
2945
  throw new A.DatabaseClosed("db.open() was cancelled");
2936
2946
  }
2937
2947
  let s = t.dbReadyResolve, o = null, a = !1;
2938
- return L.race([r, (typeof navigator > "u" ? L.resolve() : aa()).then(() => new L((l, u) => {
2948
+ const l = () => new L((u, c) => {
2939
2949
  if (i(), !n)
2940
2950
  throw new A.MissingAPI();
2941
- const c = e.name, p = t.autoSchema ? n.open(c) : n.open(c, Math.round(10 * e.verno));
2942
- if (!p)
2951
+ const p = e.name, d = t.autoSchema ? n.open(p) : n.open(p, Math.round(10 * e.verno));
2952
+ if (!d)
2943
2953
  throw new A.MissingAPI();
2944
- p.onerror = se(u), p.onblocked = N(e._fireOnBlocked), p.onupgradeneeded = N((d) => {
2945
- if (o = p.transaction, t.autoSchema && !e._options.allowEmptyDB) {
2946
- p.onerror = Et, o.abort(), p.result.close();
2947
- const w = n.deleteDatabase(c);
2948
- w.onsuccess = w.onerror = N(() => {
2949
- u(new A.NoSuchDatabase(`Database ${c} doesnt exist`));
2954
+ d.onerror = se(c), d.onblocked = N(e._fireOnBlocked), d.onupgradeneeded = N((h) => {
2955
+ if (o = d.transaction, t.autoSchema && !e._options.allowEmptyDB) {
2956
+ d.onerror = Et, o.abort(), d.result.close();
2957
+ const y = n.deleteDatabase(p);
2958
+ y.onsuccess = y.onerror = N(() => {
2959
+ c(new A.NoSuchDatabase(`Database ${p} doesnt exist`));
2950
2960
  });
2951
2961
  } else {
2952
- o.onerror = se(u);
2953
- var h = d.oldVersion > Math.pow(2, 62) ? 0 : d.oldVersion;
2954
- a = h < 1, e._novip.idbdb = p.result, sa(e, h / 10, o, u);
2962
+ o.onerror = se(c);
2963
+ var w = h.oldVersion > Math.pow(2, 62) ? 0 : h.oldVersion;
2964
+ a = w < 1, e._novip.idbdb = d.result, oa(e, w / 10, o, c);
2955
2965
  }
2956
- }, u), p.onsuccess = N(() => {
2966
+ }, c), d.onsuccess = N(() => {
2957
2967
  o = null;
2958
- const d = e._novip.idbdb = p.result, h = tn(d.objectStoreNames);
2959
- if (h.length > 0)
2968
+ const h = e._novip.idbdb = d.result, w = tn(h.objectStoreNames);
2969
+ if (w.length > 0)
2960
2970
  try {
2961
- const m = d.transaction((w = h).length === 1 ? w[0] : w, "readonly");
2962
- t.autoSchema ? function({ _novip: g }, y, f) {
2963
- g.verno = y.version / 10;
2964
- const v = g._dbSchema = nr(0, y, f);
2965
- g._storeNames = tn(y.objectStoreNames, 0), ln(g, [g._allTables], F(v), v);
2966
- }(e, d, m) : (rr(e, e._dbSchema, m), function(g, y) {
2967
- const f = ts(nr(0, g.idbdb, y), g._dbSchema);
2968
- return !(f.add.length || f.change.some((v) => v.add.length || v.change.length));
2969
- }(e, m) || console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")), Zn(e, m);
2971
+ const g = h.transaction((y = w).length === 1 ? y[0] : y, "readonly");
2972
+ t.autoSchema ? function({ _novip: m }, f, v) {
2973
+ m.verno = f.version / 10;
2974
+ const b = m._dbSchema = nr(0, f, v);
2975
+ m._storeNames = tn(f.objectStoreNames, 0), ln(m, [m._allTables], F(b), b);
2976
+ }(e, h, g) : (rr(e, e._dbSchema, g), function(m, f) {
2977
+ const v = ns(nr(0, m.idbdb, f), m._dbSchema);
2978
+ return !(v.add.length || v.change.some((b) => b.add.length || b.change.length));
2979
+ }(e, g) || console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")), Zn(e, g);
2970
2980
  } catch {
2971
2981
  }
2972
- var w;
2973
- yt.push(e), d.onversionchange = N((m) => {
2974
- t.vcFired = !0, e.on("versionchange").fire(m);
2975
- }), d.onclose = N((m) => {
2976
- e.on("close").fire(m);
2977
- }), a && function({ indexedDB: m, IDBKeyRange: g }, y) {
2978
- !Ir(m) && y !== mn && Lr(m, g).put({ name: y }).catch(C);
2979
- }(e._deps, c), l();
2980
- }, u);
2981
- }))]).then(() => (i(), t.onReadyBeingFired = [], L.resolve(ir(() => e.on.ready.fire(e.vip))).then(function l() {
2982
+ var y;
2983
+ yt.push(e), h.onversionchange = N((g) => {
2984
+ t.vcFired = !0, e.on("versionchange").fire(g);
2985
+ }), h.onclose = N((g) => {
2986
+ e.on("close").fire(g);
2987
+ }), a && function({ indexedDB: g, IDBKeyRange: m }, f) {
2988
+ !Ir(g) && f !== mn && Lr(g, m).put({ name: f }).catch(C);
2989
+ }(e._deps, p), u();
2990
+ }, c);
2991
+ }).catch((u) => u && u.name === "UnknownError" && t.PR1398_maxLoop > 0 ? (t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), l()) : L.reject(u));
2992
+ return L.race([r, (typeof navigator > "u" ? L.resolve() : la()).then(l)]).then(() => (i(), t.onReadyBeingFired = [], L.resolve(ir(() => e.on.ready.fire(e.vip))).then(function u() {
2982
2993
  if (t.onReadyBeingFired.length > 0) {
2983
- let u = t.onReadyBeingFired.reduce(_r, C);
2984
- return t.onReadyBeingFired = [], L.resolve(ir(() => u(e.vip))).then(l);
2994
+ let c = t.onReadyBeingFired.reduce(_r, C);
2995
+ return t.onReadyBeingFired = [], L.resolve(ir(() => c(e.vip))).then(u);
2985
2996
  }
2986
2997
  }))).finally(() => {
2987
2998
  t.onReadyBeingFired = null, t.isBeingOpened = !1;
2988
- }).then(() => e).catch((l) => {
2989
- t.dbOpenError = l;
2999
+ }).then(() => e).catch((u) => {
3000
+ t.dbOpenError = u;
2990
3001
  try {
2991
3002
  o && o.abort();
2992
3003
  } catch {
2993
3004
  }
2994
- return r === t.openCanceller && e._close(), $(l);
3005
+ return r === t.openCanceller && e._close(), $(u);
2995
3006
  }).finally(() => {
2996
3007
  t.openComplete = !0, s();
2997
3008
  });
@@ -3006,15 +3017,15 @@ function sr(e) {
3006
3017
  }
3007
3018
  return i(t)();
3008
3019
  }
3009
- function ca(e, t, n) {
3020
+ function ua(e, t, n) {
3010
3021
  var r = arguments.length;
3011
3022
  if (r < 2)
3012
3023
  throw new A.InvalidArgument("Too few arguments");
3013
3024
  for (var i = new Array(r - 1); --r; )
3014
3025
  i[r - 1] = arguments[r];
3015
- return n = i.pop(), [e, Di(i), n];
3026
+ return n = i.pop(), [e, Ti(i), n];
3016
3027
  }
3017
- function ns(e, t, n, r, i) {
3028
+ function rs(e, t, n, r, i) {
3018
3029
  return L.resolve().then(() => {
3019
3030
  const s = U.transless || U, o = e._createTransaction(t, n, e._dbSchema, r), a = { trans: o, transless: s };
3020
3031
  if (r)
@@ -3023,7 +3034,7 @@ function ns(e, t, n, r, i) {
3023
3034
  try {
3024
3035
  o.create(), e._state.PR1398_maxLoop = 3;
3025
3036
  } catch (p) {
3026
- return p.name === br.InvalidState && e.isOpen() && --e._state.PR1398_maxLoop > 0 ? (console.warn("Dexie: Need to reopen db"), e._close(), e.open().then(() => ns(e, t, n, null, i))) : $(p);
3037
+ return p.name === br.InvalidState && e.isOpen() && --e._state.PR1398_maxLoop > 0 ? (console.warn("Dexie: Need to reopen db"), e._close(), e.open().then(() => rs(e, t, n, null, i))) : $(p);
3027
3038
  }
3028
3039
  const l = gr(i);
3029
3040
  let u;
@@ -3045,12 +3056,12 @@ function Ft(e, t, n) {
3045
3056
  r.push(t);
3046
3057
  return r;
3047
3058
  }
3048
- const ua = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
3059
+ const da = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
3049
3060
  return { ...e, table(t) {
3050
3061
  const n = e.table(t), { schema: r } = n, i = {}, s = [];
3051
3062
  function o(c, p, d) {
3052
- const h = gt(c), w = i[h] = i[h] || [], m = c == null ? 0 : typeof c == "string" ? 1 : c.length, g = p > 0, y = { ...d, isVirtual: g, keyTail: p, keyLength: m, extractKey: Xn(c), unique: !g && d.unique };
3053
- return w.push(y), y.isPrimaryKey || s.push(y), m > 1 && o(m === 2 ? c[0] : c.slice(0, m - 1), p + 1, d), w.sort((f, v) => f.keyTail - v.keyTail), y;
3063
+ const h = gt(c), w = i[h] = i[h] || [], y = c == null ? 0 : typeof c == "string" ? 1 : c.length, g = p > 0, m = { ...d, isVirtual: g, keyTail: p, keyLength: y, extractKey: Xn(c), unique: !g && d.unique };
3064
+ return w.push(m), m.isPrimaryKey || s.push(m), y > 1 && o(y === 2 ? c[0] : c.slice(0, y - 1), p + 1, d), w.sort((f, v) => f.keyTail - v.keyTail), m;
3054
3065
  }
3055
3066
  const a = o(r.primaryKey.keyPath, 0, r.primaryKey);
3056
3067
  i[":id"] = [a];
@@ -3066,15 +3077,15 @@ const ua = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create:
3066
3077
  return p && p[0];
3067
3078
  } }, count: (c) => n.count(l(c)), query: (c) => n.query(l(c)), openCursor(c) {
3068
3079
  const { keyTail: p, isVirtual: d, keyLength: h } = c.query.index;
3069
- return d ? n.openCursor(l(c)).then((w) => w && function(m) {
3070
- return Object.create(m, { continue: { value: function(y) {
3071
- y != null ? m.continue(Ft(y, c.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : c.unique ? m.continue(m.key.slice(0, h).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : m.continue();
3072
- } }, continuePrimaryKey: { value(y, f) {
3073
- m.continuePrimaryKey(Ft(y, e.MAX_KEY, p), f);
3074
- } }, primaryKey: { get: () => m.primaryKey }, key: { get() {
3075
- const y = m.key;
3076
- return h === 1 ? y[0] : y.slice(0, h);
3077
- } }, value: { get: () => m.value } });
3080
+ return d ? n.openCursor(l(c)).then((w) => w && function(y) {
3081
+ return Object.create(y, { continue: { value: function(m) {
3082
+ m != null ? y.continue(Ft(m, c.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : c.unique ? y.continue(y.key.slice(0, h).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : y.continue();
3083
+ } }, continuePrimaryKey: { value(m, f) {
3084
+ y.continuePrimaryKey(Ft(m, e.MAX_KEY, p), f);
3085
+ } }, primaryKey: { get: () => y.primaryKey }, key: { get() {
3086
+ const m = y.key;
3087
+ return h === 1 ? m[0] : m.slice(0, h);
3088
+ } }, value: { get: () => y.value } });
3078
3089
  }(w)) : n.openCursor(c);
3079
3090
  } };
3080
3091
  } };
@@ -3094,7 +3105,7 @@ function Ur(e, t, n, r) {
3094
3105
  te(e, i) || (n[r + i] = t[i]);
3095
3106
  }), n;
3096
3107
  }
3097
- const da = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: (e) => ({ ...e, table(t) {
3108
+ const pa = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: (e) => ({ ...e, table(t) {
3098
3109
  const n = e.table(t), { primaryKey: r } = n.schema;
3099
3110
  return { ...n, mutate(s) {
3100
3111
  const o = U.trans, { deleting: a, creating: l, updating: u } = o.table(t).hook;
@@ -3120,47 +3131,47 @@ const da = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: (e) =>
3120
3131
  }
3121
3132
  return n.mutate(s);
3122
3133
  function c(d) {
3123
- const h = U.trans, w = d.keys || function(m, g) {
3124
- return g.type === "delete" ? g.keys : g.keys || g.values.map(m.extractKey);
3134
+ const h = U.trans, w = d.keys || function(y, g) {
3135
+ return g.type === "delete" ? g.keys : g.keys || g.values.map(y.extractKey);
3125
3136
  }(r, d);
3126
3137
  if (!w)
3127
3138
  throw new Error("Keys missing");
3128
- return (d = d.type === "add" || d.type === "put" ? { ...d, keys: w } : { ...d }).type !== "delete" && (d.values = [...d.values]), d.keys && (d.keys = [...d.keys]), function(m, g, y) {
3129
- return g.type === "add" ? Promise.resolve([]) : m.getMany({ trans: g.trans, keys: y, cache: "immutable" });
3130
- }(n, d, w).then((m) => {
3131
- const g = w.map((y, f) => {
3132
- const v = m[f], b = { onerror: null, onsuccess: null };
3139
+ return (d = d.type === "add" || d.type === "put" ? { ...d, keys: w } : { ...d }).type !== "delete" && (d.values = [...d.values]), d.keys && (d.keys = [...d.keys]), function(y, g, m) {
3140
+ return g.type === "add" ? Promise.resolve([]) : y.getMany({ trans: g.trans, keys: m, cache: "immutable" });
3141
+ }(n, d, w).then((y) => {
3142
+ const g = w.map((m, f) => {
3143
+ const v = y[f], b = { onerror: null, onsuccess: null };
3133
3144
  if (d.type === "delete")
3134
- a.fire.call(b, y, v, h);
3145
+ a.fire.call(b, m, v, h);
3135
3146
  else if (d.type === "add" || v === void 0) {
3136
- const _ = l.fire.call(b, y, d.values[f], h);
3137
- y == null && _ != null && (y = _, d.keys[f] = y, r.outbound || ie(d.values[f], r.keyPath, y));
3147
+ const _ = l.fire.call(b, m, d.values[f], h);
3148
+ m == null && _ != null && (m = _, d.keys[f] = m, r.outbound || ie(d.values[f], r.keyPath, m));
3138
3149
  } else {
3139
- const _ = Ur(v, d.values[f]), E = u.fire.call(b, _, y, v, h);
3150
+ const _ = Ur(v, d.values[f]), E = u.fire.call(b, _, m, v, h);
3140
3151
  if (E) {
3141
3152
  const S = d.values[f];
3142
- Object.keys(E).forEach((O) => {
3143
- te(S, O) ? S[O] = E[O] : ie(S, O, E[O]);
3153
+ Object.keys(E).forEach((P) => {
3154
+ te(S, P) ? S[P] = E[P] : ie(S, P, E[P]);
3144
3155
  });
3145
3156
  }
3146
3157
  }
3147
3158
  return b;
3148
3159
  });
3149
- return n.mutate(d).then(({ failures: y, results: f, numFailures: v, lastResult: b }) => {
3160
+ return n.mutate(d).then(({ failures: m, results: f, numFailures: v, lastResult: b }) => {
3150
3161
  for (let _ = 0; _ < w.length; ++_) {
3151
3162
  const E = f ? f[_] : w[_], S = g[_];
3152
- E == null ? S.onerror && S.onerror(y[_]) : S.onsuccess && S.onsuccess(d.type === "put" && m[_] ? d.values[_] : E);
3163
+ E == null ? S.onerror && S.onerror(m[_]) : S.onsuccess && S.onsuccess(d.type === "put" && y[_] ? d.values[_] : E);
3153
3164
  }
3154
- return { failures: y, results: f, numFailures: v, lastResult: b };
3155
- }).catch((y) => (g.forEach((f) => f.onerror && f.onerror(y)), Promise.reject(y)));
3165
+ return { failures: m, results: f, numFailures: v, lastResult: b };
3166
+ }).catch((m) => (g.forEach((f) => f.onerror && f.onerror(m)), Promise.reject(m)));
3156
3167
  });
3157
3168
  }
3158
3169
  function p(d, h, w) {
3159
- return n.query({ trans: d, values: !1, query: { index: r, range: h }, limit: w }).then(({ result: m }) => c({ type: "delete", keys: m, trans: d }).then((g) => g.numFailures > 0 ? Promise.reject(g.failures[0]) : m.length < w ? { failures: [], numFailures: 0, lastResult: void 0 } : p(d, { ...h, lower: m[m.length - 1], lowerOpen: !0 }, w)));
3170
+ return n.query({ trans: d, values: !1, query: { index: r, range: h }, limit: w }).then(({ result: y }) => c({ type: "delete", keys: y, trans: d }).then((g) => g.numFailures > 0 ? Promise.reject(g.failures[0]) : y.length < w ? { failures: [], numFailures: 0, lastResult: void 0 } : p(d, { ...h, lower: y[y.length - 1], lowerOpen: !0 }, w)));
3160
3171
  }
3161
3172
  } };
3162
3173
  } }) };
3163
- function rs(e, t, n) {
3174
+ function is(e, t, n) {
3164
3175
  try {
3165
3176
  if (!t || t.keys.length < e.length)
3166
3177
  return null;
@@ -3172,12 +3183,12 @@ function rs(e, t, n) {
3172
3183
  return null;
3173
3184
  }
3174
3185
  }
3175
- const pa = { stack: "dbcore", level: -1, create: (e) => ({ table: (t) => {
3186
+ const ha = { stack: "dbcore", level: -1, create: (e) => ({ table: (t) => {
3176
3187
  const n = e.table(t);
3177
3188
  return { ...n, getMany: (r) => {
3178
3189
  if (!r.cache)
3179
3190
  return n.getMany(r);
3180
- const i = rs(r.keys, r.trans._cache, r.cache === "clone");
3191
+ const i = is(r.keys, r.trans._cache, r.cache === "clone");
3181
3192
  return i ? L.resolve(i) : n.getMany(r).then((s) => (r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? xt(s) : s }, s));
3182
3193
  }, mutate: (r) => (r.type !== "add" && (r.trans._cache = null), n.mutate(r)) };
3183
3194
  } }) };
@@ -3201,9 +3212,9 @@ function It(e, t, n) {
3201
3212
  return H(e, { from: t, to: n, d: 1 });
3202
3213
  const i = e.l, s = e.r;
3203
3214
  if (G(n, e.from) < 0)
3204
- return i ? It(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, Gr(e);
3215
+ return i ? It(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, Hr(e);
3205
3216
  if (G(t, e.to) > 0)
3206
- return s ? It(s, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, Gr(e);
3217
+ return s ? It(s, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, Hr(e);
3207
3218
  G(t, e.from) < 0 && (e.from = t, e.l = null, e.d = s ? s.d + 1 : 1), G(n, e.to) > 0 && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1);
3208
3219
  const o = !e.r;
3209
3220
  i && !e.l && cn(e, i), s && o && cn(e, s);
@@ -3213,7 +3224,7 @@ function cn(e, t) {
3213
3224
  It(r, i, s), o && n(r, o), a && n(r, a);
3214
3225
  }(e, t);
3215
3226
  }
3216
- function ha(e, t) {
3227
+ function fa(e, t) {
3217
3228
  const n = or(t);
3218
3229
  let r = n.next();
3219
3230
  if (r.done)
@@ -3255,16 +3266,16 @@ function or(e) {
3255
3266
  return { done: !0 };
3256
3267
  } };
3257
3268
  }
3258
- function Gr(e) {
3269
+ function Hr(e) {
3259
3270
  var t, n;
3260
3271
  const r = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), i = r > 1 ? "r" : r < -1 ? "l" : "";
3261
3272
  if (i) {
3262
3273
  const s = i === "r" ? "l" : "r", o = { ...e }, a = e[i];
3263
- e.from = a.from, e.to = a.to, e[i] = a[i], o[i] = a[s], e[s] = o, o.d = Hr(o);
3274
+ e.from = a.from, e.to = a.to, e[i] = a[i], o[i] = a[s], e[s] = o, o.d = Yr(o);
3264
3275
  }
3265
- e.d = Hr(e);
3276
+ e.d = Yr(e);
3266
3277
  }
3267
- function Hr({ r: e, l: t }) {
3278
+ function Yr({ r: e, l: t }) {
3268
3279
  return (e ? t ? Math.max(e.d, t.d) : e.d : t ? t.d : 0) + 1;
3269
3280
  }
3270
3281
  tt(ue.prototype, { add(e) {
@@ -3276,23 +3287,23 @@ tt(ue.prototype, { add(e) {
3276
3287
  }, [Kn]() {
3277
3288
  return or(this);
3278
3289
  } });
3279
- const fa = { stack: "dbcore", level: 0, create: (e) => {
3290
+ const ma = { stack: "dbcore", level: 0, create: (e) => {
3280
3291
  const t = e.schema.name, n = new ue(e.MIN_KEY, e.MAX_KEY);
3281
3292
  return { ...e, table: (r) => {
3282
3293
  const i = e.table(r), { schema: s } = i, { primaryKey: o } = s, { extractKey: a, outbound: l } = o, u = { ...i, mutate: (d) => {
3283
- const h = d.trans, w = h.mutatedParts || (h.mutatedParts = {}), m = (E) => {
3294
+ const h = d.trans, w = h.mutatedParts || (h.mutatedParts = {}), y = (E) => {
3284
3295
  const S = `idb://${t}/${r}/${E}`;
3285
3296
  return w[S] || (w[S] = new ue());
3286
- }, g = m(""), y = m(":dels"), { type: f } = d;
3297
+ }, g = y(""), m = y(":dels"), { type: f } = d;
3287
3298
  let [v, b] = d.type === "deleteRange" ? [d.range] : d.type === "delete" ? [d.keys] : d.values.length < 50 ? [[], d.values] : [];
3288
3299
  const _ = d.trans._cache;
3289
3300
  return i.mutate(d).then((E) => {
3290
3301
  if (z(v)) {
3291
3302
  f !== "delete" && (v = E.results), g.addKeys(v);
3292
- const S = rs(v, _);
3293
- S || f === "add" || y.addKeys(v), (S || b) && function(O, k, B, D) {
3303
+ const S = is(v, _);
3304
+ S || f === "add" || m.addKeys(v), (S || b) && function(P, k, B, D) {
3294
3305
  function V(M) {
3295
- const x = O(M.name || "");
3306
+ const x = P(M.name || "");
3296
3307
  function ve(J) {
3297
3308
  return J != null ? M.extractKey(J) : null;
3298
3309
  }
@@ -3303,27 +3314,27 @@ const fa = { stack: "dbcore", level: 0, create: (e) => {
3303
3314
  });
3304
3315
  }
3305
3316
  k.indexes.forEach(V);
3306
- }(m, s, S, b);
3317
+ }(y, s, S, b);
3307
3318
  } else if (v) {
3308
3319
  const S = { from: v.lower, to: v.upper };
3309
- y.add(S), g.add(S);
3320
+ m.add(S), g.add(S);
3310
3321
  } else
3311
- g.add(n), y.add(n), s.indexes.forEach((S) => m(S.name).add(n));
3322
+ g.add(n), m.add(n), s.indexes.forEach((S) => y(S.name).add(n));
3312
3323
  return E;
3313
3324
  });
3314
3325
  } }, c = ({ query: { index: d, range: h } }) => {
3315
- var w, m;
3316
- return [d, new ue((w = h.lower) !== null && w !== void 0 ? w : e.MIN_KEY, (m = h.upper) !== null && m !== void 0 ? m : e.MAX_KEY)];
3326
+ var w, y;
3327
+ return [d, new ue((w = h.lower) !== null && w !== void 0 ? w : e.MIN_KEY, (y = h.upper) !== null && y !== void 0 ? y : e.MAX_KEY)];
3317
3328
  }, p = { get: (d) => [o, new ue(d.key)], getMany: (d) => [o, new ue().addKeys(d.keys)], count: c, query: c, openCursor: c };
3318
3329
  return F(p).forEach((d) => {
3319
3330
  u[d] = function(h) {
3320
3331
  const { subscr: w } = U;
3321
3332
  if (w) {
3322
- const m = (b) => {
3333
+ const y = (b) => {
3323
3334
  const _ = `idb://${t}/${r}/${b}`;
3324
3335
  return w[_] || (w[_] = new ue());
3325
- }, g = m(""), y = m(":dels"), [f, v] = p[d](h);
3326
- if (m(f.name || "").add(v), !f.isPrimaryKey) {
3336
+ }, g = y(""), m = y(":dels"), [f, v] = p[d](h);
3337
+ if (y(f.name || "").add(v), !f.isPrimaryKey) {
3327
3338
  if (d !== "count") {
3328
3339
  const b = d === "query" && l && h.values && i.query({ ...h, values: !1 });
3329
3340
  return i[d].apply(this, arguments).then((_) => {
@@ -3331,18 +3342,18 @@ const fa = { stack: "dbcore", level: 0, create: (e) => {
3331
3342
  if (l && h.values)
3332
3343
  return b.then(({ result: S }) => (g.addKeys(S), _));
3333
3344
  const E = h.values ? _.result.map(a) : _.result;
3334
- h.values ? g.addKeys(E) : y.addKeys(E);
3345
+ h.values ? g.addKeys(E) : m.addKeys(E);
3335
3346
  } else if (d === "openCursor") {
3336
3347
  const E = _, S = h.values;
3337
- return E && Object.create(E, { key: { get: () => (y.addKey(E.primaryKey), E.key) }, primaryKey: { get() {
3338
- const O = E.primaryKey;
3339
- return y.addKey(O), O;
3348
+ return E && Object.create(E, { key: { get: () => (m.addKey(E.primaryKey), E.key) }, primaryKey: { get() {
3349
+ const P = E.primaryKey;
3350
+ return m.addKey(P), P;
3340
3351
  } }, value: { get: () => (S && g.addKey(E.primaryKey), E.value) } });
3341
3352
  }
3342
3353
  return _;
3343
3354
  });
3344
3355
  }
3345
- y.add(n);
3356
+ m.add(n);
3346
3357
  }
3347
3358
  }
3348
3359
  return i[d].apply(this, arguments);
@@ -3363,7 +3374,7 @@ class Be {
3363
3374
  s.dbReadyResolve = a;
3364
3375
  }), s.openCanceller = new L((a, l) => {
3365
3376
  s.cancelOpen = l;
3366
- }), this._state = s, this.name = t, this.on = wt(this, "populate", "blocked", "versionchange", "close", { ready: [_r, C] }), this.on.ready.subscribe = xi(this.on.ready.subscribe, (a) => (l, u) => {
3377
+ }), this._state = s, this.name = t, this.on = wt(this, "populate", "blocked", "versionchange", "close", { ready: [_r, C] }), this.on.ready.subscribe = Pi(this.on.ready.subscribe, (a) => (l, u) => {
3367
3378
  Be.vip(() => {
3368
3379
  const c = this._state;
3369
3380
  if (c.openComplete)
@@ -3378,9 +3389,9 @@ class Be {
3378
3389
  });
3379
3390
  }
3380
3391
  });
3381
- }), this.Collection = (o = this, lt(Qo.prototype, function(a, l) {
3392
+ }), this.Collection = (o = this, lt(Xo.prototype, function(a, l) {
3382
3393
  this.db = o;
3383
- let u = Ji, c = null;
3394
+ let u = Qi, c = null;
3384
3395
  if (l)
3385
3396
  try {
3386
3397
  u = l();
@@ -3390,11 +3401,11 @@ class Be {
3390
3401
  const p = a._ctx, d = p.table, h = d.hook.reading.fire;
3391
3402
  this._ctx = { table: d, index: p.index, isPrimKey: !p.index || d.schema.primKey.keyPath && p.index === d.schema.primKey.name, range: u, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: c, or: p.or, valueMapper: h !== _t ? h : null };
3392
3403
  })), this.Table = function(a) {
3393
- return lt(Jo.prototype, function(l, u, c) {
3394
- this.db = a, this._tx = c, this.name = l, this.schema = u, this.hook = a._allTables[l] ? a._allTables[l].hook : wt(null, { creating: [No, C], reading: [jo, _t], updating: [Fo, C], deleting: [Ko, C] });
3404
+ return lt(Qo.prototype, function(l, u, c) {
3405
+ this.db = a, this._tx = c, this.name = l, this.schema = u, this.hook = a._allTables[l] ? a._allTables[l].hook : wt(null, { creating: [Ko, C], reading: [No, _t], updating: [Mo, C], deleting: [Fo, C] });
3395
3406
  });
3396
3407
  }(this), this.Transaction = function(a) {
3397
- return lt(ta.prototype, function(l, u, c, p, d) {
3408
+ return lt(na.prototype, function(l, u, c, p, d) {
3398
3409
  this.db = a, this.mode = l, this.storeNames = u, this.schema = c, this.chromeTransactionDurability = p, this.idbtrans = null, this.on = wt(this, "complete", "error", "abort"), this.parent = d || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new L((h, w) => {
3399
3410
  this._resolve = h, this._reject = w;
3400
3411
  }), this._completion.then(() => {
@@ -3405,11 +3416,11 @@ class Be {
3405
3416
  });
3406
3417
  });
3407
3418
  }(this), this.Version = function(a) {
3408
- return lt(oa.prototype, function(l) {
3419
+ return lt(aa.prototype, function(l) {
3409
3420
  this.db = a, this._cfg = { version: l, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
3410
3421
  });
3411
3422
  }(this), this.WhereClause = function(a) {
3412
- return lt(Xi.prototype, function(l, u, c) {
3423
+ return lt(Zi.prototype, function(l, u, c) {
3413
3424
  this.db = a, this._ctx = { table: l, index: u === ":id" ? null : u, or: c };
3414
3425
  const p = a._deps.indexedDB;
3415
3426
  if (!p)
@@ -3422,7 +3433,7 @@ class Be {
3422
3433
  !a.newVersion || a.newVersion < a.oldVersion ? console.warn(`Dexie.delete('${this.name}') was blocked`) : console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${a.oldVersion / 10}`);
3423
3434
  }), this._maxKey = Lt(n.IDBKeyRange), this._createTransaction = (a, l, u, c) => new this.Transaction(a, l, u, this._options.chromeTransactionDurability, c), this._fireOnBlocked = (a) => {
3424
3435
  this.on("blocked").fire(a), yt.filter((l) => l.name === this.name && l !== this && !l._state.vcFired).map((l) => l.on("versionchange").fire(a));
3425
- }, this.use(ua), this.use(da), this.use(fa), this.use(pa), this.vip = Object.create(this, { _vip: { value: !0 } }), i.forEach((a) => a(this));
3436
+ }, this.use(da), this.use(pa), this.use(ma), this.use(ha), this.vip = Object.create(this, { _vip: { value: !0 } }), i.forEach((a) => a(this));
3426
3437
  }
3427
3438
  version(t) {
3428
3439
  if (isNaN(t) || t < 0.1)
@@ -3432,7 +3443,7 @@ class Be {
3432
3443
  this.verno = Math.max(this.verno, t);
3433
3444
  const n = this._versions;
3434
3445
  var r = n.filter((i) => i._cfg.version === t)[0];
3435
- return r || (r = new this.Version(t), n.push(r), n.sort(ia), r.stores({}), this._state.autoSchema = !1, r);
3446
+ return r || (r = new this.Version(t), n.push(r), n.sort(sa), r.stores({}), this._state.autoSchema = !1, r);
3436
3447
  }
3437
3448
  _whenReady(t) {
3438
3449
  return this.idbdb && (this._state.openComplete || U.letThrough || this._vip) ? t() : new L((n, r) => {
@@ -3455,7 +3466,7 @@ class Be {
3455
3466
  return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter((i) => r ? i.create !== r : !!n && i.name !== n)), this;
3456
3467
  }
3457
3468
  open() {
3458
- return la(this);
3469
+ return ca(this);
3459
3470
  }
3460
3471
  _close() {
3461
3472
  const t = this._state, n = yt.indexOf(this);
@@ -3514,7 +3525,7 @@ class Be {
3514
3525
  return F(this._allTables).map((t) => this._allTables[t]);
3515
3526
  }
3516
3527
  transaction() {
3517
- const t = ca.apply(this, arguments);
3528
+ const t = ua.apply(this, arguments);
3518
3529
  return this._transaction.apply(this, t);
3519
3530
  }
3520
3531
  _transaction(t, n, r) {
@@ -3555,7 +3566,7 @@ class Be {
3555
3566
  p(u);
3556
3567
  }) : $(u);
3557
3568
  }
3558
- const l = ns.bind(null, this, o, a, i, r);
3569
+ const l = rs.bind(null, this, o, a, i, r);
3559
3570
  return i ? i._promise(o, l, "lock") : U.trans ? st(U.transless, () => this._whenReady(l)) : this._whenReady(l);
3560
3571
  }
3561
3572
  table(t) {
@@ -3564,26 +3575,26 @@ class Be {
3564
3575
  return this._allTables[t];
3565
3576
  }
3566
3577
  }
3567
- const ma = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable";
3568
- class ya {
3578
+ const ya = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable";
3579
+ class wa {
3569
3580
  constructor(t) {
3570
3581
  this._subscribe = t;
3571
3582
  }
3572
3583
  subscribe(t, n, r) {
3573
3584
  return this._subscribe(t && typeof t != "function" ? t : { next: t, error: n, complete: r });
3574
3585
  }
3575
- [ma]() {
3586
+ [ya]() {
3576
3587
  return this;
3577
3588
  }
3578
3589
  }
3579
- function is(e, t) {
3590
+ function ss(e, t) {
3580
3591
  return F(t).forEach((n) => {
3581
3592
  cn(e[n] || (e[n] = new ue()), t[n]);
3582
3593
  }), e;
3583
3594
  }
3584
- function wa(e) {
3595
+ function ga(e) {
3585
3596
  let t, n = !1;
3586
- const r = new ya((i) => {
3597
+ const r = new wa((i) => {
3587
3598
  const s = gr(e);
3588
3599
  let o = !1, a = {}, l = {};
3589
3600
  const u = { get closed() {
@@ -3594,23 +3605,23 @@ function wa(e) {
3594
3605
  i.start && i.start(u);
3595
3606
  let c = !1, p = !1;
3596
3607
  function d() {
3597
- return F(l).some((m) => a[m] && ha(a[m], l[m]));
3608
+ return F(l).some((y) => a[y] && fa(a[y], l[y]));
3598
3609
  }
3599
- const h = (m) => {
3600
- is(a, m), d() && w();
3610
+ const h = (y) => {
3611
+ ss(a, y), d() && w();
3601
3612
  }, w = () => {
3602
3613
  if (c || o)
3603
3614
  return;
3604
3615
  a = {};
3605
- const m = {}, g = function(y) {
3616
+ const y = {}, g = function(m) {
3606
3617
  s && it();
3607
- const f = () => Le(e, { subscr: y, trans: null }), v = U.trans ? st(U.transless, f) : f();
3618
+ const f = () => Le(e, { subscr: m, trans: null }), v = U.trans ? st(U.transless, f) : f();
3608
3619
  return s && v.then(we, we), v;
3609
- }(m);
3610
- p || (Ue(kt, h), p = !0), c = !0, Promise.resolve(g).then((y) => {
3611
- n = !0, t = y, c = !1, o || (d() ? w() : (a = {}, l = m, i.next && i.next(y)));
3612
- }, (y) => {
3613
- c = !1, n = !1, i.error && i.error(y), u.unsubscribe();
3620
+ }(y);
3621
+ p || (Ue(kt, h), p = !0), c = !0, Promise.resolve(g).then((m) => {
3622
+ n = !0, t = m, c = !1, o || (d() ? w() : (a = {}, l = y, i.next && i.next(m)));
3623
+ }, (m) => {
3624
+ c = !1, n = !1, i.error && i.error(m), u.unsubscribe();
3614
3625
  });
3615
3626
  };
3616
3627
  return w(), u;
@@ -3662,12 +3673,12 @@ tt(xe, { ...Vt, delete: (e) => new xe(e, { addons: [] }).delete(), exists: (e) =
3662
3673
  const n = L.resolve(typeof e == "function" ? xe.ignoreTransaction(e) : e).timeout(t || 6e4);
3663
3674
  return U.trans ? U.trans.waitFor(n) : n;
3664
3675
  }, Promise: L, debug: { get: () => le, set: (e) => {
3665
- Ci(e, e === "dexie" ? () => !0 : Yi);
3666
- } }, derive: Je, extend: H, props: tt, override: xi, Events: wt, on: Ue, liveQuery: wa, extendObservabilitySet: is, getByKeyPath: ye, setByKeyPath: ie, delByKeyPath: function(e, t) {
3676
+ Bi(e, e === "dexie" ? () => !0 : Ji);
3677
+ } }, derive: Je, extend: H, props: tt, override: Pi, Events: wt, on: Ue, liveQuery: ga, extendObservabilitySet: ss, getByKeyPath: ye, setByKeyPath: ie, delByKeyPath: function(e, t) {
3667
3678
  typeof t == "string" ? ie(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3668
3679
  ie(e, n, void 0);
3669
3680
  });
3670
- }, shallowClone: Ri, deepClone: xt, getObjectDiff: Ur, cmp: G, asap: Oi, minKey: Jn, addons: [], connections: yt, errnames: br, dependencies: ar, semVer: Mr, version: Mr.split(".").map((e) => parseInt(e)).reduce((e, t, n) => e + t / Math.pow(10, 2 * n)) }), xe.maxKey = Lt(xe.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Ue(kt, (e) => {
3681
+ }, shallowClone: Di, deepClone: xt, getObjectDiff: Ur, cmp: G, asap: Oi, minKey: Jn, addons: [], connections: yt, errnames: br, dependencies: ar, semVer: $r, version: $r.split(".").map((e) => parseInt(e)).reduce((e, t, n) => e + t / Math.pow(10, 2 * n)) }), xe.maxKey = Lt(xe.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Ue(kt, (e) => {
3671
3682
  if (!fe) {
3672
3683
  let t;
3673
3684
  fn ? (t = document.createEvent("CustomEvent"), t.initCustomEvent(Se, !0, !0, e)) : t = new CustomEvent(Se, { detail: e }), fe = !0, dispatchEvent(t), fe = !1;
@@ -3701,15 +3712,15 @@ if (typeof BroadcastChannel < "u") {
3701
3712
  });
3702
3713
  }
3703
3714
  L.rejectionMapper = function(e, t) {
3704
- if (!e || e instanceof Qe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !jr[e.name])
3715
+ if (!e || e instanceof Qe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Nr[e.name])
3705
3716
  return e;
3706
- var n = new jr[e.name](t || e.message, e);
3717
+ var n = new Nr[e.name](t || e.message, e);
3707
3718
  return "stack" in e && me(n, "stack", { get: function() {
3708
3719
  return this.inner.stack;
3709
3720
  } }), n;
3710
- }, Ci(le, Yi);
3721
+ }, Bi(le, Ji);
3711
3722
  var ot = /* @__PURE__ */ ((e) => (e.ReadyForUpload = "ReadyForUpload", e.UploadComplete = "UploadComplete", e))(ot || {}), je = /* @__PURE__ */ ((e) => (e.After = "after", e.Before = "before", e.BeforeAndAfter = "beforeAndAfter", e))(je || {});
3712
- const ss = async (e, t) => {
3723
+ const os = async (e, t) => {
3713
3724
  const n = performance.now();
3714
3725
  try {
3715
3726
  await e();
@@ -3718,7 +3729,7 @@ const ss = async (e, t) => {
3718
3729
  let i = At[t];
3719
3730
  i || (i = hn(t)), i.report(r / 1e3);
3720
3731
  }
3721
- }, os = (e, t) => {
3732
+ }, as = (e, t) => {
3722
3733
  const n = performance.now();
3723
3734
  try {
3724
3735
  e();
@@ -3727,21 +3738,21 @@ const ss = async (e, t) => {
3727
3738
  let i = At[t];
3728
3739
  i || (i = hn(t)), i.report(r / 1e3);
3729
3740
  }
3730
- }, lr = "sprig.sessionId", as = "sprig.disableReplayRecording", ga = 30, ls = () => {
3731
- ke.setItem(as, "disabled");
3732
- }, Me = () => !!ke.getItem(as), va = ["did not allow mutations", "called in an invalid security context"], ba = (e) => {
3741
+ }, lr = "sprig.sessionId", ls = "sprig.disableReplayRecording", va = 30, cs = () => {
3742
+ ke.setItem(ls, "disabled");
3743
+ }, Me = () => !!ke.getItem(ls), ba = ["did not allow mutations", "called in an invalid security context"], _a = (e) => {
3733
3744
  if (!e)
3734
3745
  return !0;
3735
- for (const t of va)
3746
+ for (const t of ba)
3736
3747
  if (e.toLowerCase().includes(t))
3737
3748
  return !1;
3738
3749
  return !0;
3739
- }, _a = (e, t, {
3750
+ }, Sa = (e, t, {
3740
3751
  reportError: n = !0,
3741
3752
  extraInfo: r
3742
3753
  }) => {
3743
- Me() || t instanceof Error && (ls(), ba(t == null ? void 0 : t.message) && (n && window.UserLeap.reportError(e, t, r), ka()));
3744
- }, Sa = async (e, t, {
3754
+ Me() || t instanceof Error && (cs(), _a(t == null ? void 0 : t.message) && (n && window.UserLeap.reportError(e, t, r), La()));
3755
+ }, Ea = async (e, t, {
3745
3756
  reportError: n
3746
3757
  } = {
3747
3758
  reportError: !0
@@ -3763,51 +3774,51 @@ const ss = async (e, t) => {
3763
3774
  } catch (s) {
3764
3775
  window.UserLeap.reportError("Error getting storage estimate", s);
3765
3776
  }
3766
- _a(e, t, {
3777
+ Sa(e, t, {
3767
3778
  reportError: n,
3768
3779
  extraInfo: r
3769
3780
  });
3770
- }, Ea = () => {
3781
+ }, ka = () => {
3771
3782
  const e = ke.getItem(lr);
3772
3783
  if (e)
3773
3784
  return I(`Found saved session id: ${e}`), ke.removeItem(lr), e;
3774
3785
  const t = nt();
3775
3786
  return I(`Generating new uuid: ${t}`), t;
3776
- }, Y = Ea();
3787
+ }, Y = ka();
3777
3788
  window.addEventListener("beforeunload", () => {
3778
3789
  I(`Before page unload saving session id: ${Y}`), ke.setItem(lr, Y);
3779
3790
  });
3780
- const ka = async () => {
3791
+ const La = async () => {
3781
3792
  try {
3782
3793
  await Promise.allSettled([T.events.clear(), T.chunkUploads.clear(), T.pendingCaptures.clear()]);
3783
3794
  } catch {
3784
3795
  }
3785
- }, In = (e, t, n = () => !0) => T.table(t).where("timestamp").below(e).and(n).delete(), La = () => {
3796
+ }, In = (e, t, n = () => !0) => T.table(t).where("timestamp").below(e).and(n).delete(), Ia = () => {
3786
3797
  T.events.where("sessionId").equals(Y).delete(), T.pendingCaptures.where("sessionId").equals(Y).delete();
3787
- }, Ia = (e) => {
3798
+ }, Ua = (e) => {
3788
3799
  const t = e.map((n) => ({
3789
3800
  ...n,
3790
3801
  sessionId: n.sessionId ?? Y
3791
3802
  }));
3792
3803
  return T.events.bulkAdd(t);
3793
- }, Ua = async (e, t) => {
3804
+ }, Aa = async (e, t) => {
3794
3805
  let n = [];
3795
- return await ss(async () => {
3806
+ return await os(async () => {
3796
3807
  n = await T.events.where("[sessionId+timestamp]").between([Y, e], [Y, t]).toArray();
3797
3808
  }, $e.ReplayGetEventsBetween), n;
3798
- }, Aa = (e, t, n) => {
3799
- const r = /* @__PURE__ */ new Date(), i = r.setMinutes(r.getMinutes() + (n ?? ga));
3809
+ }, xa = (e, t, n) => {
3810
+ const r = /* @__PURE__ */ new Date(), i = r.setMinutes(r.getMinutes() + (n ?? va));
3800
3811
  return T.events.where("[sessionId+timestamp]").between([Y, e], [Y, t]).modify({
3801
3812
  expiredAt: i
3802
3813
  });
3803
- }, xa = (e) => T.chunkUploads.add({
3814
+ }, Pa = (e) => T.chunkUploads.add({
3804
3815
  ...e,
3805
3816
  sessionId: e.sessionId ?? Y
3806
3817
  }), Oa = (e, t) => T.chunkUploads.update(e, {
3807
3818
  data: null,
3808
3819
  etag: t,
3809
3820
  status: ot.UploadComplete
3810
- }), Pa = ({
3821
+ }), Ra = ({
3811
3822
  status: e,
3812
3823
  uploadId: t
3813
3824
  }) => t ? T.chunkUploads.where({
@@ -3816,19 +3827,19 @@ const ka = async () => {
3816
3827
  }).toArray() : T.chunkUploads.where({
3817
3828
  sessionId: Y,
3818
3829
  status: e
3819
- }).toArray(), Ra = (e) => T.chunkUploads.where({
3830
+ }).toArray(), Da = (e) => T.chunkUploads.where({
3820
3831
  uploadId: e,
3821
3832
  status: ot.UploadComplete
3822
- }).toArray(), Da = (e) => T.chunkUploads.where({
3833
+ }).toArray(), Ta = (e) => T.chunkUploads.where({
3823
3834
  uploadId: e,
3824
3835
  status: ot.UploadComplete
3825
- }).delete(), Ta = (e) => T.pendingCaptures.add({
3836
+ }).delete(), Ca = (e) => T.pendingCaptures.add({
3826
3837
  ...e,
3827
3838
  sessionId: e.sessionId ?? Y,
3828
3839
  canUpload: !1
3829
- }), Ca = () => T.pendingCaptures.where("sessionId").equals(Y).and((e) => e.targetTimestamp < Date.now()).toArray(), Ba = () => T.pendingCaptures.where("sessionId").equals(Y).toArray(), ja = (e) => T.pendingCaptures.where("sessionId").equals(Y).and((t) => t.captureParams.responseGroupId === e).modify({
3840
+ }), Ba = () => T.pendingCaptures.where("sessionId").equals(Y).and((e) => e.targetTimestamp < Date.now()).toArray(), ja = () => T.pendingCaptures.where("sessionId").equals(Y).toArray(), Na = (e) => T.pendingCaptures.where("sessionId").equals(Y).and((t) => t.captureParams.responseGroupId === e).modify({
3830
3841
  canUpload: !0
3831
- }), Na = async (e) => {
3842
+ }), Ka = async (e) => {
3832
3843
  var t;
3833
3844
  if ((t = window.navigator.storage) != null && t.estimate) {
3834
3845
  const {
@@ -3840,7 +3851,7 @@ const ka = async () => {
3840
3851
  }
3841
3852
  return !0;
3842
3853
  };
3843
- class Ka extends Be {
3854
+ class Fa extends Be {
3844
3855
  constructor() {
3845
3856
  super("replayStorage", {
3846
3857
  autoOpen: !1
@@ -3850,24 +3861,24 @@ class Ka extends Be {
3850
3861
  K(this, "pendingCaptures");
3851
3862
  }
3852
3863
  }
3853
- const T = new Ka();
3864
+ const T = new Fa();
3854
3865
  T.version(1).stores({
3855
3866
  events: "uuid, timestamp, [sessionId+timestamp]",
3856
3867
  chunkUploads: "uuid, timestamp, [sessionId+status], [uploadId+status], [sessionId+status+uploadId]",
3857
3868
  pendingCaptures: "uuid, timestamp, [sessionId+targetTimestamp]"
3858
3869
  });
3859
3870
  T.open().catch((e) => {
3860
- _i(`Error opening replay storage: ${JSON.stringify(e)}`), ls();
3871
+ Si(`Error opening replay storage: ${JSON.stringify(e)}`), cs();
3861
3872
  });
3862
- const Fa = async (e, t, n) => new Promise((r, i) => {
3873
+ const Ma = async (e, t, n) => new Promise((r, i) => {
3863
3874
  const s = e.createElement("script");
3864
3875
  s.src = t, s.onload = r, s.onerror = i, n && (s.nonce = n), e.head.appendChild(s);
3865
3876
  });
3866
- let Yr = 1, cr = 5e3, Jt = 6e4;
3867
- const Ma = 5, Jr = 1e3, cs = 30, un = cs + Ma, xr = "sprig.pendingCount";
3868
- let Qr = 0, Xr = Date.now(), yn = !1, Qt;
3877
+ let Jr = 1, cr = 5e3, Jt = 6e4;
3878
+ const $a = 5, Qr = 1e3, us = 30, un = us + $a, xr = "sprig.pendingCount";
3879
+ let Xr = 0, Zr = Date.now(), yn = !1, Qt;
3869
3880
  var ur = /* @__PURE__ */ ((e) => (e.Left = "left_click", e.Right = "right_click", e))(ur || {});
3870
- const $a = async (e, t, n, r = 2, i) => {
3881
+ const Va = async (e, t, n, r = 2, i) => {
3871
3882
  try {
3872
3883
  if (Me()) {
3873
3884
  I("Not initializing replay because recording is disabled");
@@ -3877,11 +3888,11 @@ const $a = async (e, t, n, r = 2, i) => {
3877
3888
  I("Not initializing replay because config didn't specify maxReplayDurationSeconds");
3878
3889
  return;
3879
3890
  }
3880
- if (i != null && i.minAvailableGb && (Yr = i.minAvailableGb), !await Na(Yr)) {
3891
+ if (i != null && i.minAvailableGb && (Jr = i.minAvailableGb), !await Ka(Jr)) {
3881
3892
  Rn("Minimum storage not available");
3882
3893
  return;
3883
3894
  }
3884
- I("Initializing replay"), i != null && i.minDuration && (cr = i.minDuration), i != null && i.batchDuration && (Jt = i.batchDuration), ko(r), Ya(), Wa(t + un, 30 * 60, t + un), za(), window.rrwebRecord || (I("Loading recording script"), await Fa(e, "https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js", n), I("Recording script finished loading"));
3895
+ I("Initializing replay"), i != null && i.minDuration && (cr = i.minDuration), i != null && i.batchDuration && (Jt = i.batchDuration), Lo(r), Ja(), za(t + un, 30 * 60, t + un), Ga(), window.rrwebRecord || (I("Loading recording script"), await Ma(e, "https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js", n), I("Recording script finished loading"));
3885
3896
  const s = window.rrwebRecord;
3886
3897
  if (!s) {
3887
3898
  Rn("Record script failed to set global function");
@@ -3889,7 +3900,7 @@ const $a = async (e, t, n, r = 2, i) => {
3889
3900
  }
3890
3901
  let o = !0, a = 0;
3891
3902
  Qt = s({
3892
- checkoutEveryNms: cs * 1e3,
3903
+ checkoutEveryNms: us * 1e3,
3893
3904
  sampling: {
3894
3905
  input: "last",
3895
3906
  scroll: 250,
@@ -3898,14 +3909,14 @@ const $a = async (e, t, n, r = 2, i) => {
3898
3909
  emit: (l, u) => {
3899
3910
  if (Me())
3900
3911
  return;
3901
- if (Xr = Date.now(), u && l.type === 4)
3912
+ if (Zr = Date.now(), u && l.type === 4)
3902
3913
  a = performance.now();
3903
3914
  else if (u && a && l.type === 2) {
3904
3915
  const p = performance.now() - a;
3905
- yo($e.ReplayFullSnapshot, p / 1e3);
3916
+ wo($e.ReplayFullSnapshot, p / 1e3);
3906
3917
  }
3907
3918
  const c = o || !!u;
3908
- o = !1, Va({
3919
+ o = !1, qa({
3909
3920
  uuid: nt(),
3910
3921
  event: JSON.stringify(l),
3911
3922
  isValidStart: c,
@@ -3913,45 +3924,45 @@ const $a = async (e, t, n, r = 2, i) => {
3913
3924
  });
3914
3925
  },
3915
3926
  ...i
3916
- }), yn = !0, Qr || (Qr = window.setInterval(() => {
3917
- Date.now() - Xr > Jr && ge("Sprig_Noop", {});
3918
- }, Jr));
3927
+ }), yn = !0, Xr || (Xr = window.setInterval(() => {
3928
+ Date.now() - Zr > Qr && ge("Sprig_Noop", {});
3929
+ }, Qr));
3919
3930
  } catch (s) {
3920
3931
  return ne("Error initializing replay", s);
3921
3932
  }
3922
3933
  };
3923
3934
  let dr = !1, pr = [];
3924
- const Va = (e) => {
3925
- pr.push(e), dr || qa();
3926
- }, qa = () => {
3935
+ const qa = (e) => {
3936
+ pr.push(e), dr || Wa();
3937
+ }, Wa = () => {
3927
3938
  dr = !0, setTimeout(async () => {
3928
3939
  if (Me())
3929
3940
  return;
3930
3941
  const e = pr;
3931
- pr = [], dr = !1, os(async () => {
3942
+ pr = [], dr = !1, as(async () => {
3932
3943
  try {
3933
- await Ia(e);
3944
+ await Ua(e);
3934
3945
  } catch (t) {
3935
3946
  ne("Error storing replay events", t);
3936
3947
  }
3937
3948
  }, $e.ReplayAddEventBatch);
3938
3949
  }, 500);
3939
- }, Wa = (e = 6 * 60, t = 30 * 60, n = 4 * 60) => {
3950
+ }, za = (e = 6 * 60, t = 30 * 60, n = 4 * 60) => {
3940
3951
  const r = setInterval(() => {
3941
3952
  const i = Date.now();
3942
- Me() || (vt(`Performing periodic replay data cleanup / Event Seconds ${e} / Chunk Seconds ${t} / Pending Capture Seconds ${n}`), ss(() => T.transaction("rw!", T.events, T.chunkUploads, T.pendingCaptures, () => {
3953
+ Me() || (vt(`Performing periodic replay data cleanup / Event Seconds ${e} / Chunk Seconds ${t} / Pending Capture Seconds ${n}`), os(() => T.transaction("rw!", T.events, T.chunkUploads, T.pendingCaptures, () => {
3943
3954
  In(i - e * 1e3, "events", (s) => s.expiredAt === void 0 || s.expiredAt < i - e * 1e3), In(i - t * 1e3, "chunkUploads"), In(i - n * 1e3, "pendingCaptures", (s) => s.canUpload === void 0 || s.canUpload === !1);
3944
3955
  }).catch((s) => {
3945
3956
  clearInterval(r), ne("Error deleting table rows", s);
3946
3957
  }), $e.ReplayCleanup), I("Cleanup complete"));
3947
3958
  }, 3e4);
3948
- }, za = (e = 5) => {
3949
- setInterval(el, e * 1e3);
3950
- }, Ga = async (e, t, n, r, i) => {
3959
+ }, Ga = (e = 5) => {
3960
+ setInterval(tl, e * 1e3);
3961
+ }, Ha = async (e, t, n, r, i) => {
3951
3962
  try {
3952
3963
  const s = Math.min(e + i, n), o = `from: ${new Date(e).toLocaleTimeString()} to ${new Date(s).toLocaleTimeString()}`;
3953
3964
  I(`Getting event batch ${o}`);
3954
- const a = await Ua(e, s);
3965
+ const a = await Aa(e, s);
3955
3966
  if (!(a != null && a.length))
3956
3967
  return I(`No events found ${o}`), [r, []];
3957
3968
  if (!r) {
@@ -3971,7 +3982,7 @@ const Va = (e) => {
3971
3982
  } catch (s) {
3972
3983
  ne("Error getting events batch", s);
3973
3984
  }
3974
- }, Ha = (e, t, n) => {
3985
+ }, Ya = (e, t, n) => {
3975
3986
  const r = e.length, i = t * 1024 * 1024, s = Math.ceil(r / n), o = Math.max(i, s);
3976
3987
  I(`Total file bytes: ${r} / target chunk size: ${o}`);
3977
3988
  const a = [];
@@ -3979,12 +3990,12 @@ const Va = (e) => {
3979
3990
  for (; l < r; )
3980
3991
  a.push(e.slice(l, l + o)), l += o;
3981
3992
  return a;
3982
- }, us = (e) => Promise.all(e.map(async (t) => {
3983
- const n = await Io(t);
3993
+ }, ds = (e) => Promise.all(e.map(async (t) => {
3994
+ const n = await Uo(t);
3984
3995
  return await Oa(t.uuid, n), t.uploadId;
3985
- })), ds = async (e) => {
3996
+ })), ps = async (e) => {
3986
3997
  I(`Marking upload complete if finished: ${e}`);
3987
- const t = await Ra(e);
3998
+ const t = await Da(e);
3988
3999
  if (!(t != null && t.length)) {
3989
4000
  I(`No finished chunks found for upload: ${e}`);
3990
4001
  return;
@@ -3995,7 +4006,7 @@ const Va = (e) => {
3995
4006
  ETag: s.etag,
3996
4007
  PartNumber: s.chunkIndex
3997
4008
  })).filter((s) => s.ETag !== null), i = n[0];
3998
- await Ui({
4009
+ await Ai({
3999
4010
  apiUrl: i.apiUrl,
4000
4011
  surveyId: i.surveyId,
4001
4012
  uploadId: e,
@@ -4003,28 +4014,28 @@ const Va = (e) => {
4003
4014
  etags: r,
4004
4015
  headers: i.completeUploadHeaders,
4005
4016
  replayDuration: i.replayDuration
4006
- }), I(`Cleaning up chunks for ${e}`), await Da(e), I(`Done cleaning up chunks for ${e}`);
4007
- }, Ya = async () => {
4017
+ }), I(`Cleaning up chunks for ${e}`), await Ta(e), I(`Done cleaning up chunks for ${e}`);
4018
+ }, Ja = async () => {
4008
4019
  try {
4009
4020
  let e = [];
4010
4021
  if (await T.transaction("rw", T.chunkUploads, async () => {
4011
- e = await Pa({
4022
+ e = await Ra({
4012
4023
  status: ot.ReadyForUpload
4013
4024
  }).catch((n) => {
4014
4025
  ne("chunkUploads transaction error", n);
4015
4026
  });
4016
4027
  }), !(e != null && e.length))
4017
4028
  return;
4018
- const t = await us(e);
4029
+ const t = await ds(e);
4019
4030
  I(`Finished uploading unfinished chunks for ${t}`), t != null && t.length && await Promise.all(t.map(async (n) => {
4020
- n && await ds(n);
4031
+ n && await ps(n);
4021
4032
  }));
4022
4033
  } catch (e) {
4023
4034
  ne("Error getting chunk upload uuids", e);
4024
4035
  }
4025
- }, Ja = async (e, t) => {
4026
- await us(t), I(`Done uploading chunks for uploads: ${e.join(",")}`), await Promise.all(e.map((n) => ds(n)));
4027
- }, Qa = (e) => {
4036
+ }, Qa = async (e, t) => {
4037
+ await ds(t), I(`Done uploading chunks for uploads: ${e.join(",")}`), await Promise.all(e.map((n) => ps(n)));
4038
+ }, Xa = (e) => {
4028
4039
  let t = 0;
4029
4040
  e.forEach((i) => {
4030
4041
  t += i.length;
@@ -4034,43 +4045,43 @@ const Va = (e) => {
4034
4045
  return e.forEach((i) => {
4035
4046
  n.set(i, r), r += i.length;
4036
4047
  }), n;
4037
- }, Zr = async (e, t, n) => {
4048
+ }, ei = async (e, t, n) => {
4038
4049
  const r = new TextEncoder();
4039
4050
  let i = null, s = null, o = null, a = !1, l = !1, [u, c] = [0, 0];
4040
4051
  const p = e - un * 1e3, d = [];
4041
4052
  let h = [];
4042
4053
  I(`Getting events between ${new Date(e).toLocaleTimeString()} and ${new Date(t).toLocaleTimeString()}`), I(`Using batch duration: ${Jt}ms`);
4043
- for (let m = p; m < t; m += Jt) {
4044
- if ([l, h] = await Ga(m, e, t, l, Jt), !(h != null && h.length)) {
4054
+ for (let y = p; y < t; y += Jt) {
4055
+ if ([l, h] = await Ha(y, e, t, l, Jt), !(h != null && h.length)) {
4045
4056
  I("No events found");
4046
4057
  continue;
4047
4058
  }
4048
4059
  u === 0 && (u = h[0].timestamp), c = h[h.length - 1].timestamp, I(`Last event time in batch: ${new Date(c).toLocaleTimeString()}`);
4049
- const g = `${a ? "," : "["}${h.map((f) => f.event).join(",")}`, y = r.encode(g);
4050
- n && s === null && (vt("Attempting compression"), o = new window.CompressionStream("gzip"), s = o.writable.getWriter()), os(() => {
4051
- n && s ? s.write(y) : d.push(y);
4060
+ const g = `${a ? "," : "["}${h.map((f) => f.event).join(",")}`, m = r.encode(g);
4061
+ n && s === null && (vt("Attempting compression"), o = new window.CompressionStream("gzip"), s = o.writable.getWriter()), as(() => {
4062
+ n && s ? s.write(m) : d.push(m);
4052
4063
  }, $e.ReplayCompression), a = !0;
4053
4064
  }
4054
4065
  if (c - u < cr)
4055
4066
  return I(`Replay duration is shorter than minimum of ${cr}ms / Start:${u} / End:${c}`), null;
4056
4067
  const w = r.encode("]");
4057
- return vt("Writing final close brace"), s && o ? (s.write(w), s.close(), i = new Uint8Array(await new Response(o.readable).arrayBuffer())) : (d.push(w), i = Qa(d)), I("Finished generating file data"), i;
4058
- }, Xa = async (e, t) => {
4068
+ return vt("Writing final close brace"), s && o ? (s.write(w), s.close(), i = new Uint8Array(await new Response(o.readable).arrayBuffer())) : (d.push(w), i = Xa(d)), I("Finished generating file data"), i;
4069
+ }, Za = async (e, t) => {
4059
4070
  const n = window.CompressionStream !== void 0;
4060
4071
  let r = null;
4061
4072
  const i = t ?? Date.now(), s = i - e;
4062
4073
  try {
4063
- r = await Zr(s, i, n);
4074
+ r = await ei(s, i, n);
4064
4075
  } catch (o) {
4065
4076
  if (o instanceof Error && window.UserLeap.reportError("Error compressing replay", o), n)
4066
4077
  try {
4067
- r = await Zr(s, i, !1);
4078
+ r = await ei(s, i, !1);
4068
4079
  } catch (a) {
4069
4080
  ne("fileData fallback failed", a);
4070
4081
  }
4071
4082
  }
4072
4083
  return r;
4073
- }, ei = async (e) => {
4084
+ }, ti = async (e) => {
4074
4085
  const {
4075
4086
  surveyId: t,
4076
4087
  responseGroupId: n,
@@ -4079,14 +4090,14 @@ const Va = (e) => {
4079
4090
  completeUploadHeaders: s,
4080
4091
  replayParams: o,
4081
4092
  triggerTimestamp: a
4082
- } = e, l = await Xa(o.replayDurationSeconds * 1e3, a);
4093
+ } = e, l = await Za(o.replayDurationSeconds * 1e3, a);
4083
4094
  if (l != null && l.length)
4084
4095
  I(`Found file data for survey: ${t}`);
4085
4096
  else {
4086
4097
  I(`File data is empty for survey: ${t}`);
4087
4098
  return;
4088
4099
  }
4089
- const u = Ha(l, o.minimumChunkSizeMb, o.signedUrls.length);
4100
+ const u = Ya(l, o.minimumChunkSizeMb, o.signedUrls.length);
4090
4101
  I(`Got ${u.length} chunks for survey: ${t}`);
4091
4102
  const c = await Promise.all(u.map(async (p, d) => {
4092
4103
  const h = nt(), w = {
@@ -4111,10 +4122,10 @@ const Va = (e) => {
4111
4122
  uploadId: w.uploadId,
4112
4123
  size: p.length,
4113
4124
  id: h
4114
- }, null, 2)}`), await xa(w), I(`Done creating chunk upload: ${h}`), w;
4125
+ }, null, 2)}`), await Pa(w), I(`Done creating chunk upload: ${h}`), w;
4115
4126
  }));
4116
- I(`All chunk records created. Beginning upload for survey: ${t}`), await Ja([o.uploadId], c);
4117
- }, ps = async (e, t) => {
4127
+ I(`All chunk records created. Beginning upload for survey: ${t}`), await Qa([o.uploadId], c);
4128
+ }, hs = async (e, t) => {
4118
4129
  try {
4119
4130
  if (I(`Attempting replay capture: ${JSON.stringify({
4120
4131
  isStandalone: e.isStandalone,
@@ -4135,38 +4146,38 @@ const Va = (e) => {
4135
4146
  triggerTimestamp: i,
4136
4147
  responseGroupId: s
4137
4148
  } = e, o = async () => {
4138
- setTimeout(() => R.removeListener(P.QuestionAnswered, o), 0), r.replayDurationType === je.Before ? await ei(e) : await ja(s);
4149
+ setTimeout(() => R.removeListener(O.QuestionAnswered, o), 0), r.replayDurationType === je.Before ? await ti(e) : await Na(s);
4139
4150
  };
4140
4151
  if (r.replayDurationType === je.After || r.replayDurationType === je.BeforeAndAfter) {
4141
- n || (I("Attaching QuestionAnswered listener for non-standalone replay"), R.on(P.QuestionAnswered, o)), I(`Scheduling capture for replay of type: ${r.replayDurationType}`), await Za(e);
4152
+ n || (I("Attaching QuestionAnswered listener for non-standalone replay"), R.on(O.QuestionAnswered, o)), I(`Scheduling capture for replay of type: ${r.replayDurationType}`), await el(e);
4142
4153
  return;
4143
4154
  }
4144
4155
  if (n || t)
4145
- I(`Proceeding to capture replay for survey: ${e.surveyId} / standalone? ${n} / canUpload? ${t}`), await ei(e);
4156
+ I(`Proceeding to capture replay for survey: ${e.surveyId} / standalone? ${n} / canUpload? ${t}`), await ti(e);
4146
4157
  else {
4147
4158
  const a = un + r.replayDurationSeconds, l = i - a * 1e3, u = i;
4148
- I(`Setting expiry minutes to ${r.expirationTimeLimitMinutes} for events from ${new Date(l).toLocaleTimeString()} to ${new Date(u).toLocaleTimeString()}`), await Aa(l, u, r.expirationTimeLimitMinutes), I("Attaching QuestionAnswered listener"), R.on(P.QuestionAnswered, o);
4159
+ I(`Setting expiry minutes to ${r.expirationTimeLimitMinutes} for events from ${new Date(l).toLocaleTimeString()} to ${new Date(u).toLocaleTimeString()}`), await xa(l, u, r.expirationTimeLimitMinutes), I("Attaching QuestionAnswered listener"), R.on(O.QuestionAnswered, o);
4149
4160
  }
4150
4161
  } catch (n) {
4151
4162
  ne("Error scheduling or capturing replay", n);
4152
4163
  }
4153
- }, ti = () => {
4164
+ }, ni = () => {
4154
4165
  if (Me()) {
4155
4166
  vt("Not clearing user data, replay is disabled");
4156
4167
  return;
4157
4168
  }
4158
4169
  try {
4159
- La();
4170
+ Ia();
4160
4171
  } catch (e) {
4161
4172
  ne("Error clearing session event data", e);
4162
4173
  }
4163
4174
  };
4164
4175
  let he = ke.getItem(xr);
4165
- const Za = async (e) => {
4176
+ const el = async (e) => {
4166
4177
  I(`Scheduling replay capture: ${JSON.stringify(e)}`);
4167
4178
  const {
4168
4179
  surveyId: t
4169
- } = e, n = await Ba(), r = n == null ? void 0 : n.filter((o) => o.captureParams.surveyId === t);
4180
+ } = e, n = await ja(), r = n == null ? void 0 : n.filter((o) => o.captureParams.surveyId === t);
4170
4181
  if (r != null && r.length) {
4171
4182
  I(`Pending capture exists for survey: ${t}`);
4172
4183
  return;
@@ -4179,18 +4190,18 @@ const Za = async (e) => {
4179
4190
  };
4180
4191
  e.replayParams.replayDurationType === je.BeforeAndAfter && (i.replayParams.replayDurationSeconds *= 2), i.replayParams.replayDurationType = je.Before;
4181
4192
  const s = e.triggerTimestamp + e.replayParams.replayDurationSeconds * 1e3;
4182
- return i.triggerTimestamp = s, he = he ? (parseInt(he) + 1).toString() : "1", ke.setItem(xr, he), Ta({
4193
+ return i.triggerTimestamp = s, he = he ? (parseInt(he) + 1).toString() : "1", ke.setItem(xr, he), Ca({
4183
4194
  uuid: nt(),
4184
4195
  targetTimestamp: s,
4185
4196
  timestamp: Date.now(),
4186
4197
  captureParams: i
4187
4198
  });
4188
- }, el = async () => {
4199
+ }, tl = async () => {
4189
4200
  try {
4190
4201
  if (he && parseInt(he) > 0) {
4191
- const e = await Ca();
4202
+ const e = await Ba();
4192
4203
  e.length && await Promise.all(e.map(async (t) => {
4193
- await T.pendingCaptures.delete(t.uuid), await ps(t.captureParams, t.canUpload);
4204
+ await T.pendingCaptures.delete(t.uuid), await hs(t.captureParams, t.canUpload);
4194
4205
  })), he = (parseInt(he) - e.length).toString(), ke.setItem(xr, he);
4195
4206
  }
4196
4207
  } catch (e) {
@@ -4204,52 +4215,53 @@ const Za = async (e) => {
4204
4215
  } catch (i) {
4205
4216
  ne("Error recording custom event", i);
4206
4217
  }
4207
- }, ni = (e) => {
4208
- ge("Sprig_PageView", e);
4209
- }, tl = (e) => {
4210
- ge("Sprig_TrackEvent", e);
4218
+ }, ri = (e) => {
4219
+ e.description && (e.description = Pr(e.description)), ge("Sprig_PageView", e);
4211
4220
  }, nl = (e) => {
4221
+ ge("Sprig_TrackEvent", e);
4222
+ }, rl = (e) => {
4212
4223
  ge("Sprig_ShowSurvey", e);
4213
- }, zl = (e) => {
4224
+ }, Gl = (e) => {
4214
4225
  ge("Sprig_SubmitSurvey", e);
4215
- }, rl = (e) => {
4216
- ge("Sprig_Click", e);
4217
- }, il = () => {
4218
- ge("Sprig_Refresh", {});
4219
- }, sl = () => {
4220
- ge("Sprig_BackForward", {});
4226
+ }, il = (e) => {
4227
+ var t;
4228
+ (t = e == null ? void 0 : e.elementAttributes) != null && t.text && (e.elementAttributes.text = Pr(e.elementAttributes.text)), ge("Sprig_Click", e);
4229
+ }, sl = (e) => {
4230
+ ge("Sprig_Refresh", e);
4221
4231
  }, ol = (e) => {
4232
+ e.currentPageTitle && (e.currentPageTitle = Pr(e.currentPageTitle)), ge("Sprig_BackForward", e);
4233
+ }, al = (e) => {
4222
4234
  ge("Sprig_Keystroke", e);
4223
4235
  }, ne = (e, t, {
4224
4236
  reportError: n
4225
4237
  } = {
4226
4238
  reportError: !0
4227
- }) => (Qt && (Qt(), Qt = void 0), yn = !1, _i(`${e} - ${JSON.stringify(t)}`), Sa(e, t, {
4239
+ }) => (Qt && (Qt(), Qt = void 0), yn = !1, Si(`${e} - ${JSON.stringify(t)}`), Ea(e, t, {
4228
4240
  reportError: n
4229
- })), hs = () => yn, al = ({
4241
+ })), fs = () => yn, Pr = (e) => e && e.trim().substring(0, 500).replace(/\s\s+/g, " ").replace(/\r?\n|\r/g, " ").substring(0, 250), ll = ({
4230
4242
  reportingIntervalSeconds: e,
4231
4243
  thresholds: t,
4232
4244
  postMetrics: n
4233
4245
  }) => {
4234
- mo(t, (r, i) => {
4235
- if (hs()) {
4246
+ yo(t, (r, i) => {
4247
+ if (fs()) {
4236
4248
  const s = `Value: ${r} on ${i.metric} violated threshold of ${i.type} ${i.value}`;
4237
4249
  ne("Threshold violated", new Error(s), {
4238
4250
  reportError: !1
4239
- }), ho();
4251
+ }), fo();
4240
4252
  }
4241
- }), go({
4253
+ }), vo({
4242
4254
  reportingIntervalSeconds: e,
4243
4255
  postMetrics: n
4244
- }), vo();
4256
+ }), bo();
4245
4257
  }, Un = {
4246
4258
  capture: !0
4247
- }, ll = ["a", "button", "input", "option", "li", "link"], cl = ["Escape", "Enter", "Backspace", "F5", "Tab"], ul = ["label", "type", "role", "title", "placeholder", "errormessage", "valuetext", "href"], ri = "aria-", dl = (e) => {
4259
+ }, cl = ["a", "button", "input", "option", "li", "link"], ul = ["Escape", "Enter", "Backspace", "F5", "Tab"], dl = ["label", "type", "role", "title", "placeholder", "errormessage", "valuetext", "href"], ii = "aria-", pl = (e) => {
4248
4260
  if (!e.tagName)
4249
4261
  return "No tagName";
4250
4262
  const t = e.getAttribute("type");
4251
4263
  return t ? `${t} ${e.tagName.toLowerCase()}` : e.tagName.toLowerCase();
4252
- }, ii = (e) => {
4264
+ }, si = (e) => {
4253
4265
  var r;
4254
4266
  if (((r = e.tagName) == null ? void 0 : r.toLowerCase()) === "html")
4255
4267
  return {
@@ -4258,47 +4270,54 @@ const Za = async (e) => {
4258
4270
  const t = e.textContent, n = t ? {
4259
4271
  text: t
4260
4272
  } : {};
4261
- n.element = dl(e);
4273
+ n.element = pl(e);
4262
4274
  for (const i of e.attributes) {
4263
4275
  let s = i.name;
4264
4276
  const o = i.value;
4265
- s.startsWith(ri) && (s = s.substring(ri.length)), ul.includes(s) && (n[s] = o);
4277
+ s.startsWith(ii) && (s = s.substring(ii.length)), dl.includes(s) && (n[s] = o);
4266
4278
  }
4267
4279
  return n;
4268
- }, pl = (e) => {
4280
+ }, hl = (e) => {
4269
4281
  var i;
4270
4282
  if (!e)
4271
4283
  return {};
4272
4284
  const n = {
4273
- ...ii(e)
4285
+ ...si(e)
4274
4286
  }, r = e.parentElement;
4275
- if (r && ll.includes((i = r.tagName) == null ? void 0 : i.toLowerCase())) {
4276
- const s = ii(r);
4287
+ if (r && cl.includes((i = r.tagName) == null ? void 0 : i.toLowerCase())) {
4288
+ const s = si(r);
4277
4289
  Object.assign(n, s);
4278
4290
  }
4279
4291
  return n;
4280
- }, fs = (e, t) => {
4281
- rl({
4292
+ }, ms = (e, t) => {
4293
+ il({
4282
4294
  x: t.x,
4283
4295
  y: t.y,
4284
4296
  type: e,
4285
- elementAttributes: pl(t.target)
4297
+ elementAttributes: hl(t.target)
4286
4298
  });
4287
- }, hl = (e) => (t) => fs(e, t), fl = (e) => {
4288
- cl.includes(e.key) && ol({
4299
+ }, fl = (e) => (t) => ms(e, t), ml = (e) => {
4300
+ ul.includes(e.key) && al({
4289
4301
  key: e.key
4290
4302
  });
4291
- }, ml = () => {
4292
- window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && il();
4293
4303
  }, yl = () => {
4294
- window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && sl();
4304
+ window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && sl({
4305
+ url: window.location.href,
4306
+ currentPageTitle: document.title
4307
+ });
4295
4308
  }, wl = () => {
4296
- window.addEventListener("click", hl(ur.Left), Un), window.addEventListener("mousedown", (e) => {
4297
- e.button === 2 && fs(ur.Right, e);
4298
- }, Un), window.addEventListener("keydown", fl, Un), ml(), yl();
4299
- }, gl = ["popState", "pushState", "replaceState"], vl = {
4309
+ window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && ol({
4310
+ curUrl: window.location.href,
4311
+ fromUrl: document.referrer,
4312
+ currentPageTitle: document.title
4313
+ });
4314
+ }, gl = () => {
4315
+ window.addEventListener("click", fl(ur.Left), Un), window.addEventListener("mousedown", (e) => {
4316
+ e.button === 2 && ms(ur.Right, e);
4317
+ }, Un), window.addEventListener("keydown", ml, Un), yl(), wl();
4318
+ }, vl = ["popState", "pushState", "replaceState"], bl = {
4300
4319
  test: "test"
4301
- }, ct = "!email", bl = ["ios", "android"], Ee = "environments", hr = "pageUrl", Oe = "visitors", si = "ul-view-sdk-script", oi = Object.freeze({
4320
+ }, ct = "!email", _l = ["ios", "android"], Ee = "environments", hr = "pageUrl", Pe = "visitors", oi = "ul-view-sdk-script", ai = Object.freeze({
4302
4321
  contains: (e, t) => t.includes(e),
4303
4322
  notContains: (e, t) => !t.includes(e),
4304
4323
  exactly: (e, t) => t === e,
@@ -4312,7 +4331,7 @@ function Or(e, t) {
4312
4331
  const {
4313
4332
  matchType: n,
4314
4333
  pattern: r
4315
- } = e, i = n ? oi[n] : oi.legacy;
4334
+ } = e, i = n ? ai[n] : ai.legacy;
4316
4335
  let s = !1;
4317
4336
  try {
4318
4337
  s = i(r, t);
@@ -4322,7 +4341,7 @@ function Or(e, t) {
4322
4341
  }
4323
4342
  return s;
4324
4343
  }
4325
- function _l(e, t) {
4344
+ function Sl(e, t) {
4326
4345
  const {
4327
4346
  pageUrlEvents: n,
4328
4347
  interactiveEvents: r,
@@ -4344,12 +4363,12 @@ function Ut(e) {
4344
4363
  } = window.UserLeap._config;
4345
4364
  if (i && i !== dn.Web)
4346
4365
  return;
4347
- const s = Pe("trackStartUrl"), o = s ? String(s) : null;
4348
- t && gs(window.location.href), n && (ys(), Sl()), r && o && o !== window.location.href && e && gl.includes(e.type) && window.UserLeap("dismissActiveSurvey", Re.PageChange);
4366
+ const s = Oe("trackStartUrl"), o = s ? String(s) : null;
4367
+ t && vs(window.location.href), n && (ws(), El()), r && o && o !== window.location.href && e && vl.includes(e.type) && window.UserLeap("dismissActiveSurvey", Re.PageChange);
4349
4368
  }
4350
- const ms = {
4369
+ const ys = {
4351
4370
  capture: !0
4352
- }, Sl = () => {
4371
+ }, El = () => {
4353
4372
  const t = window.UserLeap._config.interactiveEvents.filter((r) => Or(r, window.location.href)).map((r) => {
4354
4373
  const {
4355
4374
  name: i,
@@ -4359,35 +4378,35 @@ const ms = {
4359
4378
  innerText: a
4360
4379
  } = s;
4361
4380
  return o ? (l) => {
4362
- if (Cr(l.target))
4381
+ if (Br(l.target))
4363
4382
  try {
4364
4383
  l.target.closest(o) && window.UserLeap("track", i);
4365
4384
  } catch {
4366
4385
  }
4367
4386
  return !1;
4368
- } : (l) => (Cr(l.target) && l.target.innerText === a && window.UserLeap("track", i), !1);
4387
+ } : (l) => (Br(l.target) && l.target.innerText === a && window.UserLeap("track", i), !1);
4369
4388
  }), n = (r) => t.forEach((i) => i(r));
4370
- window.UserLeap._config.interactiveEventsHandler = n, window.addEventListener("click", n, ms);
4371
- }, ys = () => {
4372
- window.UserLeap._config.interactiveEventsHandler && window.removeEventListener("click", window.UserLeap._config.interactiveEventsHandler, ms), delete window.UserLeap._config.interactiveEventsHandler;
4389
+ window.UserLeap._config.interactiveEventsHandler = n, window.addEventListener("click", n, ys);
4390
+ }, ws = () => {
4391
+ window.UserLeap._config.interactiveEventsHandler && window.removeEventListener("click", window.UserLeap._config.interactiveEventsHandler, ys), delete window.UserLeap._config.interactiveEventsHandler;
4373
4392
  };
4374
- function El() {
4393
+ function kl() {
4375
4394
  ["hashchange", "popstate"].forEach((e) => window.addEventListener(e, Ut, !0));
4376
4395
  }
4377
- function kl() {
4378
- ["hashchange", "popstate"].forEach((e) => window.removeEventListener(e, Ut, !0)), window.UserLeap._config.interactiveEvents && ys();
4396
+ function Ll() {
4397
+ ["hashchange", "popstate"].forEach((e) => window.removeEventListener(e, Ut, !0)), window.UserLeap._config.interactiveEvents && ws();
4379
4398
  }
4380
4399
  function ae(e, t, n) {
4381
4400
  const r = [window.UserLeap._API_URL, "sdk", e];
4382
4401
  return t && t.forEach((i) => {
4383
- r.push(i), i === Ee ? r.push(window.UserLeap.envId) : i === Oe && r.push(Pr());
4402
+ r.push(i), i === Ee ? r.push(window.UserLeap.envId) : i === Pe && r.push(Rr());
4384
4403
  }), n && r.push(n), r.join("/");
4385
4404
  }
4386
- function Ll(e, t) {
4405
+ function Il(e, t) {
4387
4406
  let n = ae("1", [Ee], "questions?");
4388
4407
  return e != null && (n += `&vid=${e}`), t && (t.surveyId && (n += `&surveyid=${t.surveyId}`), t.surveyTemplateId && (n += `&surveytemplateid=${t.surveyTemplateId}`), t.previewLanguage && (n += `&previewLanguage=${encodeURIComponent(t.previewLanguage)}`)), n;
4389
4408
  }
4390
- function Pe(e) {
4409
+ function Oe(e) {
4391
4410
  const t = Z.getItem(ee.Credentials);
4392
4411
  if (t)
4393
4412
  try {
@@ -4417,22 +4436,23 @@ function X(e, t) {
4417
4436
  s instanceof Error && console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${s.message}`);
4418
4437
  }
4419
4438
  }
4420
- function ws() {
4421
- window.previewMode || (window.UserLeap.visitorId = nt(), I(`Generating new vid: ${window.UserLeap.visitorId}`), X("vid", window.UserLeap.visitorId), R.emit(P.VisitorIDUpdated, {
4439
+ function gs() {
4440
+ window.previewMode || (window.UserLeap.visitorId = nt(), I(`Generating new vid: ${window.UserLeap.visitorId}`), X("vid", window.UserLeap.visitorId), R.emit(O.VisitorIDUpdated, {
4422
4441
  visitorId: window.UserLeap.visitorId
4423
4442
  }));
4424
4443
  }
4425
- function Pr() {
4444
+ function Rr() {
4426
4445
  return window.previewMode ? "0" : window.UserLeap.visitorId || "";
4427
4446
  }
4428
- function gs(e, t, n) {
4447
+ function vs(e, t, n) {
4448
+ var c;
4429
4449
  if (e.endsWith("mock_snippet.html"))
4430
4450
  return;
4431
4451
  I(`Tracking page view: ${e}`);
4432
4452
  const r = window.UserLeap._config.pageUrlEvents;
4433
4453
  let i = !1;
4434
4454
  if (r && r.length)
4435
- for (let c = 0; c < r.length && (i = Or(r[c], e), !i); c++)
4455
+ for (let p = 0; p < r.length && (i = Or(r[p], e), !i); p++)
4436
4456
  ;
4437
4457
  if (!i)
4438
4458
  return;
@@ -4445,28 +4465,35 @@ function gs(e, t, n) {
4445
4465
  }, u = Z.getItem(ee.PageViews);
4446
4466
  try {
4447
4467
  if (a = u ? JSON.parse(u) : [], Array.isArray(a) || (a = []), a.length > 0) {
4448
- const c = a[a.length - 1], p = (Date.now() - c.viewedAt) / 1e3;
4449
- c.location != e && p > o && ni({
4450
- url: e,
4451
- referrer: document.referrer,
4452
- description: document.title
4453
- }), (c.location != e && p > o || p > s) && (window.UserLeap._queue.push(["track", hr, t, {
4468
+ const p = a[a.length - 1], d = (Date.now() - p.viewedAt) / 1e3;
4469
+ if (p.location != e && d > o) {
4470
+ const h = (c = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : c.getAttribute("content");
4471
+ ri({
4472
+ ...h && {
4473
+ description: h
4474
+ },
4475
+ url: e,
4476
+ referrer: document.referrer,
4477
+ pageTitle: document.title
4478
+ });
4479
+ }
4480
+ (p.location != e && d > o || d > s) && (window.UserLeap._queue.push(["track", hr, t, {
4454
4481
  url: e
4455
4482
  }, n]), a.push(l));
4456
4483
  } else
4457
4484
  window.UserLeap._queue.push(["track", hr, t, {
4458
4485
  url: e
4459
- }, n]), a.push(l), ni({
4486
+ }, n]), a.push(l), ri({
4460
4487
  url: e
4461
4488
  });
4462
4489
  a.length > 5 && a.splice(0, a.length - 5), Z.setItem(ee.PageViews, JSON.stringify(a));
4463
- } catch (c) {
4464
- c instanceof Error && window.UserLeap.reportError("trackPageView", c, {
4490
+ } catch (p) {
4491
+ p instanceof Error && window.UserLeap.reportError("trackPageView", p, {
4465
4492
  pageViewsStorage: u
4466
4493
  }), console.warn("[Sprig] (ERR-425) Failed to update page views in local storage");
4467
4494
  }
4468
4495
  }
4469
- function Il() {
4496
+ function Ul() {
4470
4497
  const e = "Backbone" in window && window.Backbone && window.Backbone.history ? window.Backbone.history : window.history;
4471
4498
  "pushState" in e && (e.pushState = /* @__PURE__ */ ((t) => function(...r) {
4472
4499
  const i = t.apply(this, r), s = new Event("pushState");
@@ -4474,21 +4501,21 @@ function Il() {
4474
4501
  })(e.pushState)), "replaceState" in e && (e.replaceState = /* @__PURE__ */ ((t) => function(...r) {
4475
4502
  const i = t.apply(this, r), s = new Event("replaceState");
4476
4503
  return window.dispatchEvent(s), Ut(s), i;
4477
- })(e.replaceState)), El();
4504
+ })(e.replaceState)), kl();
4478
4505
  }
4479
4506
  async function An(e, t) {
4480
- const n = Pr();
4481
- e && !t && (window.UserLeap._config.mode = vl.test);
4482
- const r = await de(Ll(n, {
4507
+ const n = Rr();
4508
+ e && !t && (window.UserLeap._config.mode = bl.test);
4509
+ const r = await de(Il(n, {
4483
4510
  ...e,
4484
4511
  previewLanguage: window.UserLeap._config.previewLanguage
4485
4512
  }), {}, 0, !0);
4486
- return r.ok ? (r.json.delay && await Zt(r.json.delay), vs(r.json)) : (r.reportError && r.error && (console.warn("[Sprig] (ERR-414) Failed to request questions from the server", r.error), window.UserLeap.reportError("getQuestions", r.error)), {
4513
+ return r.ok ? (r.json.delay && await Zt(r.json.delay), bs(r.json)) : (r.reportError && r.error && (console.warn("[Sprig] (ERR-414) Failed to request questions from the server", r.error), window.UserLeap.reportError("getQuestions", r.error)), {
4487
4514
  success: !1,
4488
4515
  surveyState: re.NoSurvey
4489
4516
  });
4490
4517
  }
4491
- const vs = async (e) => {
4518
+ const bs = async (e) => {
4492
4519
  var V, M;
4493
4520
  const {
4494
4521
  context: t,
@@ -4502,12 +4529,12 @@ const vs = async (e) => {
4502
4529
  uuid: u,
4503
4530
  vid: c,
4504
4531
  sessionReplay: p
4505
- } = e, d = et(window.UserLeap), h = Rr(d), w = Ul(d);
4532
+ } = e, d = et(window.UserLeap), h = Dr(d), w = Al(d);
4506
4533
  if (I(`Attempting to display survey: ${l}`), p)
4507
4534
  if (I("Survey has replay attached"), h) {
4508
4535
  const x = {
4509
4536
  mediaRecordingUid: nt(),
4510
- mediaType: yi.Screen,
4537
+ mediaType: wi.Screen,
4511
4538
  questionId: 1,
4512
4539
  responseGroupUid: a,
4513
4540
  surveyId: l,
@@ -4515,7 +4542,7 @@ const vs = async (e) => {
4515
4542
  visitorId: window.UserLeap.visitorId,
4516
4543
  isReplay: !0
4517
4544
  };
4518
- R.emit(P.ReplayCapture, {
4545
+ R.emit(O.ReplayCapture, {
4519
4546
  responseGroupUid: a,
4520
4547
  hasQuestions: !!(o != null && o.length),
4521
4548
  surveyId: l,
@@ -4525,7 +4552,7 @@ const vs = async (e) => {
4525
4552
  generateVideoUploadUrlPayload: x
4526
4553
  });
4527
4554
  } else
4528
- ps({
4555
+ hs({
4529
4556
  responseGroupId: a,
4530
4557
  surveyId: l,
4531
4558
  visitorId: c,
@@ -4558,33 +4585,34 @@ const vs = async (e) => {
4558
4585
  surveyState: re.NoSurvey
4559
4586
  };
4560
4587
  }
4561
- I(`Showing survey: ${l}`), nl({
4562
- id: l
4563
- }), Gs.disable(), R.emit(P.SurveyWillPresent, {
4564
- name: P.SurveyWillPresent,
4588
+ I(`Showing survey: ${l}`), rl({
4589
+ id: l,
4590
+ userAgent: window.navigator.userAgent
4591
+ }), Hs.disable(), R.emit(O.SurveyWillPresent, {
4592
+ name: O.SurveyWillPresent,
4565
4593
  [Xt.SurveyId]: l
4566
4594
  });
4567
- let m, g = document.createElement("div"), y, f, v;
4595
+ let y, g = document.createElement("div"), m, f, v;
4568
4596
  const b = (x) => {
4569
4597
  const {
4570
- [li.ViewVersion]: ve
4598
+ [ci.ViewVersion]: ve
4571
4599
  } = x;
4572
- ve !== d["x-ul-sdk-version"] && pi(), R.removeListener(xn.VerifyViewVersion, b);
4600
+ ve !== d["x-ul-sdk-version"] && hi(), R.removeListener(xn.VerifyViewVersion, b);
4573
4601
  };
4574
- R.on(xn.VerifyViewVersion, b), Qs(d) ? (m = "ul-direct-embeded-frame", y = document.head, f = window, v = !1, h && (di(), g.id = m, window.UserLeap.container.appendChild(g), hi(), R.emit(P.SurveyLifeCycle, {
4602
+ R.on(xn.VerifyViewVersion, b), Xs(d) ? (y = "ul-direct-embeded-frame", m = document.head, f = window, v = !1, h && (pi(), g.id = y, window.UserLeap.container.appendChild(g), fi(), R.emit(O.SurveyLifeCycle, {
4575
4603
  state: "presented"
4576
- }), R.emit(P.SurveyPresented, {
4577
- name: P.SurveyPresented,
4604
+ }), R.emit(O.SurveyPresented, {
4605
+ name: O.SurveyPresented,
4578
4606
  [Xt.SurveyId]: l
4579
4607
  }))) : {
4580
- frameId: m,
4581
- contentWinDocHead: y,
4608
+ frameId: y,
4609
+ contentWinDocHead: m,
4582
4610
  contentWindow: f,
4583
4611
  hasOverlay: v,
4584
4612
  iframe: g
4585
- } = Rs(s, w, l), window.UserLeap.frameId = m, window.UserLeap.useMobileStyling = w;
4613
+ } = Ds(s, w, l), window.UserLeap.frameId = y, window.UserLeap.useMobileStyling = w;
4586
4614
  const _ = (x) => {
4587
- R.on(P.CloseSurveyOnOverlayClick, x);
4615
+ R.on(O.CloseSurveyOnOverlayClick, x);
4588
4616
  }, E = Object.assign({
4589
4617
  frame: g,
4590
4618
  envId: window.UserLeap.envId,
@@ -4622,9 +4650,9 @@ const vs = async (e) => {
4622
4650
  }), window.UserLeap.customStyles && (E.customStyles = window.UserLeap.customStyles), f && (f.__cfg = E);
4623
4651
  function S() {
4624
4652
  const x = document.createElement("script");
4625
- return window.UserLeap.nonce && x.setAttribute("nonce", window.UserLeap.nonce), x.id = si, x;
4653
+ return window.UserLeap.nonce && x.setAttribute("nonce", window.UserLeap.nonce), x.id = oi, x;
4626
4654
  }
4627
- const O = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : E.path, k = document.getElementById(si);
4655
+ const P = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : E.path, k = document.getElementById(oi);
4628
4656
  k && k.remove();
4629
4657
  const B = S(), D = () => {
4630
4658
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, {
@@ -4634,34 +4662,34 @@ const vs = async (e) => {
4634
4662
  if (E.installationMethod === He.Npm || E.installationMethod === He.NpmBundled) {
4635
4663
  const {
4636
4664
  default: x
4637
- } = await import("./view-KfdScd8f.js");
4665
+ } = await import("./view-BxLGbeCm.js");
4638
4666
  x.configure(E), v && window.UserLeap.container && D();
4639
4667
  } else
4640
- O && (B.src = O, v && B.addEventListener("load", () => {
4668
+ P && (B.src = P, v && B.addEventListener("load", () => {
4641
4669
  window.UserLeap.container && D();
4642
4670
  }), f == null || f.addEventListener("error", (x) => {
4643
- x.target instanceof HTMLScriptElement && x.target.src === O && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
4671
+ x.target instanceof HTMLScriptElement && x.target.src === P && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
4644
4672
  }, {
4645
4673
  capture: !0,
4646
4674
  once: !0
4647
4675
  }));
4648
- return y == null || y.appendChild(B), {
4676
+ return m == null || m.appendChild(B), {
4649
4677
  success: !0,
4650
4678
  surveyState: re.Ready,
4651
4679
  surveyId: l,
4652
4680
  responseGroupUid: a
4653
4681
  };
4654
4682
  };
4655
- function Ul(e) {
4683
+ function Al(e) {
4656
4684
  if (window.UserLeap.useMobileStyling !== void 0)
4657
4685
  return window.UserLeap.useMobileStyling;
4658
4686
  const t = window.UserLeap.windowDimensions && window.UserLeap.windowDimensions.width || document.body.clientWidth;
4659
- return Rr(e) || t > 10 && t < Fs;
4687
+ return Dr(e) || t > 10 && t < Ms;
4660
4688
  }
4661
- function Rr(e) {
4662
- return bl.includes(e[oe.Platform]);
4689
+ function Dr(e) {
4690
+ return _l.includes(e[oe.Platform]);
4663
4691
  }
4664
- function Al(e) {
4692
+ function xl(e) {
4665
4693
  let t = e.length;
4666
4694
  for (; t; ) {
4667
4695
  const n = Math.floor(Math.random() * t);
@@ -4670,7 +4698,7 @@ function Al(e) {
4670
4698
  e[t] = e[n], e[n] = r;
4671
4699
  }
4672
4700
  }
4673
- function xl(e) {
4701
+ function Pl(e) {
4674
4702
  if (!e)
4675
4703
  return;
4676
4704
  window.UserLeap._config = e, e.mute && window.UserLeap._queue.pause();
@@ -4679,7 +4707,7 @@ function xl(e) {
4679
4707
  pageUrlEvents: n,
4680
4708
  dismissOnPageChange: r
4681
4709
  } = e;
4682
- t && Al(t), (t || n || r) && (Il(), Ut());
4710
+ t && xl(t), (t || n || r) && (Ul(), Ut());
4683
4711
  }
4684
4712
  async function de(e, t, n = 0, r = !1) {
4685
4713
  var s, o;
@@ -4687,7 +4715,7 @@ async function de(e, t, n = 0, r = !1) {
4687
4715
  const i = await Ye(e, t, n, r);
4688
4716
  if (i.ok) {
4689
4717
  const a = (s = i.headers) == null ? void 0 : s.get("Authorization"), l = a ? a.split(" ") : void 0, u = l && l.length === 2 ? l[1] : void 0, c = (o = i.headers) == null ? void 0 : o.get(oe.VisitorID);
4690
- u && c && (c !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (X("token", u), X("vid", c), R.emit(P.VisitorIDUpdated, {
4718
+ u && c && (c !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (X("token", u), X("vid", c), R.emit(O.VisitorIDUpdated, {
4691
4719
  visitorId: c
4692
4720
  }), window.UserLeap.token = u, window.UserLeap.visitorId = c);
4693
4721
  }
@@ -4698,11 +4726,11 @@ async function Ol(e, t) {
4698
4726
  let n = !0;
4699
4727
  return t && ((r = e == null ? void 0 : e.json) != null && r.surveyId) && (window.UserLeap.delayingSurvey = !0, n = await t(e.json.surveyId), window.UserLeap.delayingSurvey = !1, !n) ? !1 : ((i = e == null ? void 0 : e.json) != null && i.delay && (window.UserLeap.delayingSurvey = !0, await Zt(e.json.delay), window.UserLeap.delayingSurvey = !1), n);
4700
4728
  }
4701
- const Pl = function(e) {
4729
+ const Rl = function(e) {
4702
4730
  if (!window.UserLeap)
4703
4731
  return;
4704
4732
  const t = async (r = {}) => {
4705
- var m, g, y, f;
4733
+ var y, g, m, f;
4706
4734
  const {
4707
4735
  userId: i,
4708
4736
  anonymousId: s,
@@ -4734,15 +4762,15 @@ const Pl = function(e) {
4734
4762
  };
4735
4763
  }
4736
4764
  const p = window.location.href;
4737
- if (o.url || (o.url = p), X("trackStartUrl", p), (g = (m = window.UserLeap) == null ? void 0 : m._config) != null && g.optimizelyEnabled) {
4765
+ if (o.url || (o.url = p), X("trackStartUrl", p), (g = (y = window.UserLeap) == null ? void 0 : y._config) != null && g.optimizelyEnabled) {
4738
4766
  const v = et(window.UserLeap);
4739
- Rr(v) || Mt.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, Mt.getAllOptimizelyExperiments());
4767
+ Dr(v) || Mt.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, Mt.getAllOptimizelyExperiments());
4740
4768
  }
4741
- (f = (y = window.UserLeap) == null ? void 0 : y._config) != null && f.launchDarklyEnabled && (o.launchDarklyFlags = On.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), s && (window.UserLeap.partnerAnonymousId = s), a && (o.eventProperties = a), tl({
4769
+ (f = (m = window.UserLeap) == null ? void 0 : m._config) != null && f.launchDarklyEnabled && (o.launchDarklyFlags = Pn.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), s && (window.UserLeap.partnerAnonymousId = s), a && (o.eventProperties = a), nl({
4742
4770
  name: u,
4743
4771
  url: o.url
4744
4772
  }), I(`Tracking event: ${u}`);
4745
- const d = window.UserLeap.delayingSurvey ? await de(ae("1", [Oe], "events/batch"), {
4773
+ const d = window.UserLeap.delayingSurvey ? await de(ae("1", [Pe], "events/batch"), {
4746
4774
  body: JSON.stringify({
4747
4775
  events: [{
4748
4776
  event: u,
@@ -4751,7 +4779,7 @@ const Pl = function(e) {
4751
4779
  previewKey: c
4752
4780
  }),
4753
4781
  method: "POST"
4754
- }, 0, !0) : await de(ae("1", [Oe], "events"), {
4782
+ }, 0, !0) : await de(ae("1", [Pe], "events"), {
4755
4783
  body: JSON.stringify({
4756
4784
  event: u,
4757
4785
  metadata: o,
@@ -4770,7 +4798,7 @@ const Pl = function(e) {
4770
4798
  }
4771
4799
  i && X("uid", i), s && X("aid", s);
4772
4800
  const h = d.json;
4773
- return h.invalidPreviewKey && Z.removeItem(ee.Preview), await Ol(d, l) ? _l(h.eventId, p) ? vs(h) : {
4801
+ return h.invalidPreviewKey && Z.removeItem(ee.Preview), await Ol(d, l) ? Sl(h.eventId, p) ? bs(h) : {
4774
4802
  success: !1,
4775
4803
  message: "Study should not be displayed after page navigation",
4776
4804
  surveyState: re.NoSurvey
@@ -4814,14 +4842,14 @@ const Pl = function(e) {
4814
4842
  console.warn("[Sprig] setVisitorToken is deprecated.");
4815
4843
  },
4816
4844
  dismissActiveSurvey(r = Re.API) {
4817
- R.emit(P.SurveyWillClose, {
4818
- name: P.SurveyWillClose,
4845
+ R.emit(O.SurveyWillClose, {
4846
+ name: O.SurveyWillClose,
4819
4847
  initiator: r
4820
4848
  });
4821
4849
  },
4822
4850
  // Set an arbitrary attribute on the visitor
4823
4851
  async setAttribute(r, i) {
4824
- if (!r || !i && i !== 0) {
4852
+ if (!r || !i && i !== 0 && i !== !1) {
4825
4853
  const s = "[Sprig] - Disregarding empty attribute / value provided";
4826
4854
  return console.warn(s), {
4827
4855
  success: !1,
@@ -4877,10 +4905,10 @@ const Pl = function(e) {
4877
4905
  const a = {};
4878
4906
  i && (a.userId = window.UserLeap.userId = i), s && (a.partnerAnonymousId = window.UserLeap.partnerAnonymousId = s);
4879
4907
  let l;
4880
- return o ? (o.email && !Object.prototype.hasOwnProperty.call(o, ct) && (o[ct] = o.email, delete o.email), I(`Setting attributes: ${JSON.stringify(o)}`), l = await de(ae("1", [Ee, Oe], "attributes"), {
4908
+ return o ? (o.email && !Object.prototype.hasOwnProperty.call(o, ct) && (o[ct] = o.email, delete o.email), I(`Setting attributes: ${JSON.stringify(o)}`), l = await de(ae("1", [Ee, Pe], "attributes"), {
4881
4909
  body: JSON.stringify(o),
4882
4910
  method: "PUT"
4883
- }), !l.ok && l.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", l.error), l.error && window.UserLeap.reportError("identifyAndSetAttributes", l.error))) : l = await de(ae("1", [Ee, Oe]), {
4911
+ }), !l.ok && l.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", l.error), l.error && window.UserLeap.reportError("identifyAndSetAttributes", l.error))) : l = await de(ae("1", [Ee, Pe]), {
4884
4912
  body: JSON.stringify(a),
4885
4913
  method: "PUT"
4886
4914
  }), o && o[ct] && (window.UserLeap.email = o[ct]), l.ok && (i && X("uid", i), s && X("aid", s)), {
@@ -4904,7 +4932,7 @@ const Pl = function(e) {
4904
4932
  message: s
4905
4933
  };
4906
4934
  }
4907
- const i = await de(ae("1", [Ee, Oe], "attributes"), {
4935
+ const i = await de(ae("1", [Ee, Pe], "attributes"), {
4908
4936
  body: JSON.stringify({
4909
4937
  delete: r
4910
4938
  }),
@@ -4915,10 +4943,10 @@ const Pl = function(e) {
4915
4943
  };
4916
4944
  },
4917
4945
  async addSurveyListener(r) {
4918
- R.on(P.SurveyLifeCycle, r);
4946
+ R.on(O.SurveyLifeCycle, r);
4919
4947
  },
4920
4948
  async removeSurveyListener(r) {
4921
- R.removeListener(P.SurveyLifeCycle, r);
4949
+ R.removeListener(O.SurveyLifeCycle, r);
4922
4950
  },
4923
4951
  async addListener(r, i) {
4924
4952
  R.on(r, i);
@@ -4946,7 +4974,7 @@ const Pl = function(e) {
4946
4974
  if (e.mode === "test" || r === window.UserLeap.userId)
4947
4975
  return;
4948
4976
  window.UserLeap.userId = r;
4949
- const i = window.UserLeap.visitorId, s = await de(ae("1", [Ee, Oe]), {
4977
+ const i = window.UserLeap.visitorId, s = await de(ae("1", [Ee, Pe]), {
4950
4978
  body: JSON.stringify({
4951
4979
  userId: r
4952
4980
  }),
@@ -4956,7 +4984,7 @@ const Pl = function(e) {
4956
4984
  s.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", s.error), s.error && window.UserLeap.reportError("setUserId", s.error));
4957
4985
  return;
4958
4986
  }
4959
- i !== window.UserLeap.visitorId && ti(), X("uid", r);
4987
+ i !== window.UserLeap.visitorId && ni(), X("uid", r);
4960
4988
  },
4961
4989
  /**
4962
4990
  * Set a partner anonymous id for future requests -- to be deprecated, never documented.
@@ -4989,14 +5017,14 @@ const Pl = function(e) {
4989
5017
  return await t(r);
4990
5018
  },
4991
5019
  trackPageView(r, i = void 0, s = void 0) {
4992
- gs(r, i, s);
5020
+ vs(r, i, s);
4993
5021
  },
4994
5022
  applyStyles(r) {
4995
5023
  if (window.UserLeap.customStyles = r, window.UserLeap.container) {
4996
5024
  const i = window.UserLeap.container.children[0].contentDocument;
4997
5025
  if (i) {
4998
5026
  const s = i.getElementById(Ne.CustomStyle);
4999
- s ? s.textContent = r : Ys(i, r, window.UserLeap.styleNonce);
5027
+ s ? s.textContent = r : Js(i, r, window.UserLeap.styleNonce);
5000
5028
  }
5001
5029
  }
5002
5030
  },
@@ -5012,8 +5040,8 @@ const Pl = function(e) {
5012
5040
  }), !window.UserLeap.frameId)
5013
5041
  return;
5014
5042
  const a = document.getElementById(window.UserLeap.frameId);
5015
- a && (window.UserLeap.useMobileStyling && ((l = window.UserLeap.windowDimensions) != null && l.width && (a.style.width = `${window.UserLeap.windowDimensions.width}px`), (u = window.UserLeap.windowDimensions) != null && u.height && (a.style.maxHeight = `${window.UserLeap.windowDimensions.height - 20}px`), a.contentDocument && (a.style.height = String(Js(a.contentDocument)[0]) + "px")), R.emit(P.SurveyDimensions, {
5016
- name: P.SurveyDimensions,
5043
+ a && (window.UserLeap.useMobileStyling && ((l = window.UserLeap.windowDimensions) != null && l.width && (a.style.width = `${window.UserLeap.windowDimensions.width}px`), (u = window.UserLeap.windowDimensions) != null && u.height && (a.style.maxHeight = `${window.UserLeap.windowDimensions.height - 20}px`), a.contentDocument && (a.style.height = String(Qs(a.contentDocument)[0]) + "px")), R.emit(O.SurveyDimensions, {
5044
+ name: O.SurveyDimensions,
5017
5045
  contentFrameWidth: a.clientWidth,
5018
5046
  contentFrameHeight: a.clientHeight
5019
5047
  }));
@@ -5022,13 +5050,13 @@ const Pl = function(e) {
5022
5050
  * logs out current visitor and associated ids
5023
5051
  */
5024
5052
  logoutUser() {
5025
- window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), I(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, Z.removeItem(ee.Credentials), Z.removeItem(ee.PageViews), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), ws(), ti(), window.UserLeap._queue.unpause();
5053
+ window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), I(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, Z.removeItem(ee.Credentials), Z.removeItem(ee.PageViews), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), gs(), ni(), window.UserLeap._queue.unpause();
5026
5054
  },
5027
5055
  /**
5028
5056
  * dismiss surveys and clean up sprig globals
5029
5057
  */
5030
5058
  teardown() {
5031
- kl(), window.UserLeap("dismissActiveSurvey", Re.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
5059
+ Ll(), window.UserLeap("dismissActiveSurvey", Re.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
5032
5060
  },
5033
5061
  integrateOptimizely(r, i = !0) {
5034
5062
  var s, o;
@@ -5073,7 +5101,7 @@ const Pl = function(e) {
5073
5101
  console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");
5074
5102
  return;
5075
5103
  }
5076
- On.setLDFlagsVariations(r);
5104
+ Pn.setLDFlagsVariations(r);
5077
5105
  },
5078
5106
  /** @deprecated */
5079
5107
  setVisitorAttribute(r, i) {
@@ -5089,7 +5117,7 @@ const Pl = function(e) {
5089
5117
  return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"), n.setEmail(r);
5090
5118
  },
5091
5119
  async _generateVideoUploadUrl(r) {
5092
- return Cl(r);
5120
+ return Bl(r);
5093
5121
  },
5094
5122
  async _completeSessionReplay({
5095
5123
  surveyId: r,
@@ -5100,7 +5128,7 @@ const Pl = function(e) {
5100
5128
  return !1;
5101
5129
  const o = window.UserLeap._API_URL;
5102
5130
  try {
5103
- const a = await Ui({
5131
+ const a = await Ai({
5104
5132
  surveyId: r,
5105
5133
  responseGroupUuid: i,
5106
5134
  eventDigest: s,
@@ -5115,7 +5143,7 @@ const Pl = function(e) {
5115
5143
  };
5116
5144
  Object.assign(window.UserLeap, n);
5117
5145
  };
5118
- async function Rl(e) {
5146
+ async function Dl(e) {
5119
5147
  const t = et(window.UserLeap);
5120
5148
  document.addEventListener("securitypolicyviolation", Cn);
5121
5149
  const n = await Ye(ae("1", [Ee], "config"), {
@@ -5128,10 +5156,10 @@ async function Rl(e) {
5128
5156
  disabled: i.disabled
5129
5157
  }) : Object.assign({}, i, e);
5130
5158
  }
5131
- const Dl = (e) => typeof e == "object" && e && "inner" in e && !!e.inner && typeof e.inner == "object";
5132
- async function Tl(e, t, n = {}) {
5159
+ const Tl = (e) => typeof e == "object" && e && "inner" in e && !!e.inner && typeof e.inner == "object";
5160
+ async function Cl(e, t, n = {}) {
5133
5161
  var p, d;
5134
- const r = window.__cfg && window.__cfg.mode, i = Pr(), s = window.UserLeap.envId, o = window.document.documentElement, a = Dl(t) ? {
5162
+ const r = window.__cfg && window.__cfg.mode, i = Rr(), s = window.UserLeap.envId, o = window.document.documentElement, a = Tl(t) ? {
5135
5163
  inner: {
5136
5164
  message: (p = t.inner) == null ? void 0 : p.message,
5137
5165
  stack: (d = t.inner) == null ? void 0 : d.stack
@@ -5168,10 +5196,10 @@ async function Tl(e, t, n = {}) {
5168
5196
  const {
5169
5197
  presignedUrl: h
5170
5198
  } = c.json;
5171
- co(h);
5199
+ uo(h);
5172
5200
  }
5173
5201
  }
5174
- async function Cl(e) {
5202
+ async function Bl(e) {
5175
5203
  var n;
5176
5204
  if (!e)
5177
5205
  return;
@@ -5194,13 +5222,13 @@ async function Cl(e) {
5194
5222
  console.warn("[Sprig] Error with generating video upload url"), r instanceof Error && window.UserLeap.reportError("generateVideoUploadUrl", r);
5195
5223
  }
5196
5224
  }
5197
- function Bl(e = {}) {
5198
- const t = new URLSearchParams(window.location.search).get(mi.Preview) ?? "";
5225
+ function jl(e = {}) {
5226
+ const t = new URLSearchParams(window.location.search).get(yi.Preview) ?? "";
5199
5227
  window.UserLeap.UPDATES = mr, window.UserLeap("setPreviewKey", t);
5200
5228
  async function n() {
5201
5229
  if (window.UserLeap.loaded)
5202
5230
  return;
5203
- if (I("Loading sprig on page load"), window.UserLeap.reportError = Tl, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, e, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object")
5231
+ if (I("Loading sprig on page load"), window.UserLeap.reportError = Cl, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, e, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object")
5204
5232
  for (const a in window.UserLeap._config)
5205
5233
  window.UserLeap[a] = window.UserLeap._config[a];
5206
5234
  if (!window.UserLeap.envId)
@@ -5211,20 +5239,20 @@ function Bl(e = {}) {
5211
5239
  window.UserLeap.debugMode && console.info("[DEBUG] Sprig debug mode enabled");
5212
5240
  const r = window.UserLeap.sampleRate;
5213
5241
  if (r) {
5214
- let a = Pe("sampled");
5242
+ let a = Oe("sampled");
5215
5243
  if (a === null && (a = Math.random() < r, X("sampled", a)), !a)
5216
5244
  return;
5217
5245
  } else
5218
- Pe("sampled") !== null && X("sampled", null);
5246
+ Oe("sampled") !== null && X("sampled", null);
5219
5247
  window.UserLeap._API_URL || (window.UserLeap._API_URL = "https://api.sprig.com");
5220
5248
  const i = [...window.UserLeap._queue];
5221
- window.UserLeap._queue = new Ks(window.UserLeap, []), window.UserLeap._queue.pause();
5249
+ window.UserLeap._queue = new Fs(window.UserLeap, []), window.UserLeap._queue.pause();
5222
5250
  for (let a = 0; a < i.length; a++)
5223
5251
  window.UserLeap._queue.push(i[a]);
5224
- const s = Pe("token");
5225
- s ? (window.UserLeap.token = s, window.UserLeap.visitorId = Pe("vid"), window.UserLeap.userId = Pe("uid"), window.UserLeap.partnerAnonymousId = Pe("aid")) : (Z.removeItem(ee.Credentials), ws());
5226
- const o = await Rl(e);
5227
- al({
5252
+ const s = Oe("token");
5253
+ s ? (window.UserLeap.token = s, window.UserLeap.visitorId = Oe("vid"), window.UserLeap.userId = Oe("uid"), window.UserLeap.partnerAnonymousId = Oe("aid")) : (Z.removeItem(ee.Credentials), gs());
5254
+ const o = await Dl(e);
5255
+ ll({
5228
5256
  reportingIntervalSeconds: o.metricsReportingEnabled ? o.metricsReportingIntervalSeconds : 0,
5229
5257
  thresholds: o.metricThresholds,
5230
5258
  postMetrics: async (a) => {
@@ -5232,16 +5260,16 @@ function Bl(e = {}) {
5232
5260
  body: a,
5233
5261
  method: "POST",
5234
5262
  headers: {
5235
- "x-ul-replay-enabled": `${hs()}`
5263
+ "x-ul-replay-enabled": `${fs()}`
5236
5264
  }
5237
5265
  }, 0, !0);
5238
5266
  }
5239
- }), $a(window.document, o.maxReplayDurationSeconds, window.UserLeap.replayNonce, window.UserLeap.maxInflightReplayRequests, o.replaySettings).then(() => {
5240
- wl();
5241
- }), uo(o.logBufferLimit, o.logLevel), Pl(o), await xl(o), window.UserLeap._queue.unpause(), R.emit(P.SDKReady, {
5267
+ }), Va(window.document, o.maxReplayDurationSeconds, window.UserLeap.replayNonce, window.UserLeap.maxInflightReplayRequests, o.replaySettings).then(() => {
5268
+ gl();
5269
+ }), po(o.logBufferLimit, o.logLevel), Rl(o), await Pl(o), window.UserLeap._queue.unpause(), R.emit(O.SDKReady, {
5242
5270
  maxMobileReplayDurationSeconds: o.maxMobileReplayDurationSeconds,
5243
5271
  mobileReplaySettings: o.mobileReplaySettings
5244
- }), R.emit(P.VisitorIDUpdated, {
5272
+ }), R.emit(O.VisitorIDUpdated, {
5245
5273
  visitorId: window.UserLeap.visitorId
5246
5274
  });
5247
5275
  }
@@ -5384,7 +5412,7 @@ class fr {
5384
5412
  window.Sprig("teardown");
5385
5413
  }
5386
5414
  }
5387
- const ai = {
5415
+ const li = {
5388
5416
  /**
5389
5417
  * Sets up the sprig api and load the sprig sdk on document load
5390
5418
  * @param config
@@ -5401,47 +5429,47 @@ const ai = {
5401
5429
  n !== "constructor" && (window.Sprig[n] = fr.prototype[n]);
5402
5430
  });
5403
5431
  const t = window.Sprig;
5404
- return t.appId = e.envId, t._queue = [], window.UserLeap = t, Bl(e), window.Sprig;
5432
+ return t.appId = e.envId, t._queue = [], window.UserLeap = t, jl(e), window.Sprig;
5405
5433
  }
5406
- }, Gl = {
5407
- sprig: ai,
5434
+ }, Hl = {
5435
+ sprig: li,
5408
5436
  SprigAPI: fr,
5409
- configure: ai.configure
5437
+ configure: li.configure
5410
5438
  };
5411
5439
  export {
5412
- Nl as A,
5413
- Gs as C,
5440
+ Kl as A,
5441
+ Hs as C,
5414
5442
  Re as D,
5415
- Ml as E,
5443
+ $l as E,
5416
5444
  xn as I,
5417
- yi as M,
5445
+ wi as M,
5418
5446
  dn as P,
5419
- zl as R,
5420
- P as S,
5421
- $s as T,
5422
- Zs as a,
5423
- li as b,
5447
+ Gl as R,
5448
+ O as S,
5449
+ Vs as T,
5450
+ eo as a,
5451
+ ci as b,
5424
5452
  He as c,
5425
- Js as d,
5453
+ Qs as d,
5426
5454
  R as e,
5427
- xs as f,
5428
- Wl as g,
5429
- co as h,
5455
+ Ps as f,
5456
+ zl as g,
5457
+ uo as h,
5430
5458
  I as i,
5431
5459
  Ne as j,
5432
- Vl as k,
5433
- Fl as l,
5434
- Kl as m,
5435
- Ms as n,
5436
- Vs as o,
5437
- ql as p,
5460
+ ql as k,
5461
+ Ml as l,
5462
+ Fl as m,
5463
+ $s as n,
5464
+ qs as o,
5465
+ Wl as p,
5438
5466
  Xt as q,
5439
- $l as r,
5440
- Qs as s,
5441
- Ys as t,
5467
+ Vl as r,
5468
+ Xs as s,
5469
+ Js as t,
5442
5470
  Ye as u,
5443
5471
  nt as v,
5444
5472
  fr as w,
5445
- ai as x,
5446
- Gl as y
5473
+ li as x,
5474
+ Hl as y
5447
5475
  };