@levo-so/react 0.1.58 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/audience/components/block.d.ts.map +1 -0
  2. package/dist/audience/components/component.d.ts.map +1 -0
  3. package/dist/audience/components/page.d.ts.map +1 -0
  4. package/dist/audience/hooks/useBounce.d.ts.map +1 -0
  5. package/dist/audience/hooks/useCurrentTab.d.ts.map +1 -0
  6. package/dist/audience/hooks/useIdentifyAudience.d.ts.map +1 -0
  7. package/dist/audience/hooks/useOpenTabs.d.ts.map +1 -0
  8. package/dist/audience/hooks/useScrollBehavior.d.ts.map +1 -0
  9. package/dist/audience/hooks/useTextSelection.d.ts.map +1 -0
  10. package/dist/audience/hooks/useTrackClicks.d.ts.map +1 -0
  11. package/dist/audience/index.d.ts.map +1 -0
  12. package/dist/audience/utils/autocapture.d.ts.map +1 -0
  13. package/dist/audience/utils/rageclick.d.ts.map +1 -0
  14. package/dist/components/Dialog.d.ts.map +1 -0
  15. package/dist/components/DialogWrapper.d.ts.map +1 -0
  16. package/dist/components/Sonner.d.ts.map +1 -0
  17. package/dist/components/Spinner.d.ts.map +1 -0
  18. package/dist/components/Table.d.ts.map +1 -0
  19. package/dist/components/Tabs.d.ts.map +1 -0
  20. package/dist/components/Tooltip.d.ts.map +1 -0
  21. package/dist/components/button/Button.d.ts.map +1 -0
  22. package/dist/components/button/buttonVariants.d.ts.map +1 -0
  23. package/dist/components/button/index.d.ts.map +1 -0
  24. package/dist/components/index.d.ts.map +1 -0
  25. package/dist/constants/fileUploadPresets.d.ts.map +1 -0
  26. package/dist/constants/index.d.ts.map +1 -0
  27. package/dist/index.css +1 -1
  28. package/dist/index.js +779 -915
  29. package/dist/membership/components/Button.d.ts.map +1 -0
  30. package/dist/membership/components/Container.d.ts.map +1 -0
  31. package/dist/membership/components/Core.d.ts.map +1 -0
  32. package/dist/membership/components/Popup.d.ts.map +1 -0
  33. package/dist/membership/index.d.ts.map +1 -0
  34. package/dist/membership/useLevoOAuth.d.ts.map +1 -0
  35. package/dist/providers/LevoProvider.d.ts.map +1 -0
  36. package/dist/utils/byteToSize.d.ts.map +1 -0
  37. package/dist/utils/cn.d.ts.map +1 -0
  38. package/dist/utils/errorHandler.d.ts.map +1 -0
  39. package/dist/utils/index.d.ts.map +1 -0
  40. package/dist/utils/isDateObject.d.ts.map +1 -0
  41. package/dist/utils/isEmptyObject.d.ts.map +1 -0
  42. package/dist/utils/isNullOrUndefined.d.ts.map +1 -0
  43. package/dist/utils/isObject.d.ts.map +1 -0
  44. package/package.json +22 -22
  45. package/dist/audience/hooks/useDownloadSpeed.d.ts +0 -3
  46. package/dist/audience/hooks/usePerformanceMetrics.d.ts +0 -12
package/dist/index.js CHANGED
@@ -1,19 +1,16 @@
1
1
  "use client";
2
- var at = Object.defineProperty;
3
- var ct = (e, t, n) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var J = (e, t, n) => ct(e, typeof t != "symbol" ? t + "" : t, n);
5
- import * as D from "react";
6
- import A, { createContext as ut, useContext as Pe, useState as x, useEffect as b, useMemo as Ie, useRef as Ae, useCallback as fe } from "react";
7
- import { clsx as lt } from "clsx";
8
- import { twMerge as De } from "tailwind-merge";
9
- import { getLevoError as Me, LocalStorageLock as dt } from "@levo-so/core";
10
- import { usePageLifecycle as ft, LifecycleState as ue } from "use-page-lifecycle";
11
- import { Slot as mt, Dialog as j, Tabs as F, Tooltip as Y } from "radix-ui";
12
- import { cva as gt } from "class-variance-authority";
13
- import { X as pt } from "lucide-react";
14
- import { Toaster as bt, toast as me } from "sonner";
15
- import { toast as Br } from "sonner";
16
- const vt = [
2
+ import * as A from "react";
3
+ import L, { createContext as tt, useContext as je, useState as O, useEffect as x, useMemo as Ne, useRef as ke, useCallback as ae } from "react";
4
+ import { clsx as nt } from "clsx";
5
+ import { twMerge as Se } from "tailwind-merge";
6
+ import { usePageLifecycle as rt, LifecycleState as se } from "use-page-lifecycle";
7
+ import { Slot as ot, Dialog as N, Tabs as $, Tooltip as F } from "radix-ui";
8
+ import { cva as st } from "class-variance-authority";
9
+ import { X as it } from "lucide-react";
10
+ import { Toaster as at, toast as ce } from "sonner";
11
+ import { toast as Sr } from "sonner";
12
+ import { getLevoError as Ce } from "@levo-so/core";
13
+ const ct = [
17
14
  "pdf",
18
15
  "txt",
19
16
  "xml",
@@ -27,7 +24,7 @@ const vt = [
27
24
  "odp",
28
25
  "ppt",
29
26
  "pptx"
30
- ], ht = [
27
+ ], lt = [
31
28
  "svg",
32
29
  "png",
33
30
  "jpg",
@@ -35,7 +32,7 @@ const vt = [
35
32
  "gif",
36
33
  "webp",
37
34
  "avif"
38
- ], wt = ["mp4", "ogv", "webm"], yt = ["mp3", "ogg", "opus"], xt = {
35
+ ], ut = ["mp4", "ogv", "webm"], dt = ["mp3", "ogg", "opus"], ft = {
39
36
  "application/xml": [".xml"],
40
37
  "text/plain": [".txt"],
41
38
  "application/pdf": [".pdf"],
@@ -48,7 +45,7 @@ const vt = [
48
45
  ".docx"
49
46
  ],
50
47
  "text/csv": [".csv"]
51
- }, Tt = {
48
+ }, mt = {
52
49
  "image/jpeg": [".jpeg", ".jpg"],
53
50
  "image/jpg": [".jpg"],
54
51
  "image/png": [".png"],
@@ -57,332 +54,312 @@ const vt = [
57
54
  "image/svg+xml": [".svg"],
58
55
  "image/webp": [".webp"],
59
56
  "image/avif": [".avif"]
60
- }, Et = {
57
+ }, gt = {
61
58
  "video/mp4": [".mp4"],
62
59
  "video/mpeg": [".mpeg"],
63
60
  "video/webm": [".webm"]
64
- }, kt = {
61
+ }, pt = {
65
62
  "audio/mpeg": [".mp3"],
66
63
  "audio/ogg": [".oga"],
67
64
  "audio/opus": [".opus"]
68
- }, X = {
69
- audio: kt,
70
- document: xt,
71
- image: Tt,
72
- video: Et
73
- }, q = {
74
- audio: yt,
75
- document: vt,
76
- image: ht,
77
- video: wt
78
- }, yr = [
79
- ...q.audio,
80
- ...q.document,
81
- ...q.image,
82
- ...q.video
83
- ], xr = {
84
- ...X.audio,
85
- ...X.document,
86
- ...X.image,
87
- ...X.video
65
+ }, G = {
66
+ audio: pt,
67
+ document: ft,
68
+ image: mt,
69
+ video: gt
70
+ }, J = {
71
+ audio: dt,
72
+ document: ct,
73
+ image: lt,
74
+ video: ut
75
+ }, cr = [
76
+ ...J.audio,
77
+ ...J.document,
78
+ ...J.image,
79
+ ...J.video
80
+ ], lr = {
81
+ ...G.audio,
82
+ ...G.document,
83
+ ...G.image,
84
+ ...G.video
88
85
  };
89
- var K = { exports: {} }, z = {};
90
- /**
91
- * @license React
92
- * react-jsx-runtime.production.js
93
- *
94
- * Copyright (c) Meta Platforms, Inc. and affiliates.
95
- *
96
- * This source code is licensed under the MIT license found in the
97
- * LICENSE file in the root directory of this source tree.
98
- */
99
- var Ee;
100
- function _t() {
101
- if (Ee) return z;
102
- Ee = 1;
86
+ var X = { exports: {} }, Y = {};
87
+ var ve;
88
+ function bt() {
89
+ if (ve) return Y;
90
+ ve = 1;
103
91
  var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
104
- function n(r, o, s) {
105
- var c = null;
106
- if (s !== void 0 && (c = "" + s), o.key !== void 0 && (c = "" + o.key), "key" in o) {
107
- s = {};
108
- for (var a in o)
109
- a !== "key" && (s[a] = o[a]);
110
- } else s = o;
111
- return o = s.ref, {
92
+ function n(r, o, i) {
93
+ var a = null;
94
+ if (i !== void 0 && (a = "" + i), o.key !== void 0 && (a = "" + o.key), "key" in o) {
95
+ i = {};
96
+ for (var c in o)
97
+ c !== "key" && (i[c] = o[c]);
98
+ } else i = o;
99
+ return o = i.ref, {
112
100
  $$typeof: e,
113
101
  type: r,
114
- key: c,
102
+ key: a,
115
103
  ref: o !== void 0 ? o : null,
116
- props: s
104
+ props: i
117
105
  };
118
106
  }
119
- return z.Fragment = t, z.jsx = n, z.jsxs = n, z;
107
+ return Y.Fragment = t, Y.jsx = n, Y.jsxs = n, Y;
120
108
  }
121
- var H = {};
122
- /**
123
- * @license React
124
- * react-jsx-runtime.development.js
125
- *
126
- * Copyright (c) Meta Platforms, Inc. and affiliates.
127
- *
128
- * This source code is licensed under the MIT license found in the
129
- * LICENSE file in the root directory of this source tree.
130
- */
131
- var ke;
132
- function St() {
133
- return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
134
- function e(i) {
135
- if (i == null) return null;
136
- if (typeof i == "function")
137
- return i.$$typeof === ot ? null : i.displayName || i.name || null;
138
- if (typeof i == "string") return i;
139
- switch (i) {
140
- case S:
109
+ var z = {};
110
+ var ye;
111
+ function ht() {
112
+ return ye || (ye = 1, process.env.NODE_ENV !== "production" && function() {
113
+ function e(s) {
114
+ if (s == null) return null;
115
+ if (typeof s == "function")
116
+ return s.$$typeof === Ze ? null : s.displayName || s.name || null;
117
+ if (typeof s == "string") return s;
118
+ switch (s) {
119
+ case j:
141
120
  return "Fragment";
142
- case C:
121
+ case h:
143
122
  return "Profiler";
144
- case N:
123
+ case S:
145
124
  return "StrictMode";
146
- case M:
125
+ case b:
147
126
  return "Suspense";
148
- case w:
127
+ case P:
149
128
  return "SuspenseList";
150
- case G:
129
+ case Ke:
151
130
  return "Activity";
152
131
  }
153
- if (typeof i == "object")
154
- switch (typeof i.tag == "number" && console.error(
132
+ if (typeof s == "object")
133
+ switch (typeof s.tag == "number" && console.error(
155
134
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
156
- ), i.$$typeof) {
157
- case _:
135
+ ), s.$$typeof) {
136
+ case k:
158
137
  return "Portal";
159
- case y:
160
- return (i.displayName || "Context") + ".Provider";
138
+ case M:
139
+ return s.displayName || "Context";
161
140
  case T:
162
- return (i._context.displayName || "Context") + ".Consumer";
163
- case O:
164
- var g = i.render;
165
- return i = i.displayName, i || (i = g.displayName || g.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
166
- case P:
167
- return g = i.displayName || null, g !== null ? g : e(i.type) || "Memo";
168
- case $:
169
- g = i._payload, i = i._init;
141
+ return (s._context.displayName || "Context") + ".Consumer";
142
+ case U:
143
+ var u = s.render;
144
+ return s = s.displayName, s || (s = u.displayName || u.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
145
+ case I:
146
+ return u = s.displayName || null, u !== null ? u : e(s.type) || "Memo";
147
+ case B:
148
+ u = s._payload, s = s._init;
170
149
  try {
171
- return e(i(g));
150
+ return e(s(u));
172
151
  } catch {
173
152
  }
174
153
  }
175
154
  return null;
176
155
  }
177
- function t(i) {
178
- return "" + i;
156
+ function t(s) {
157
+ return "" + s;
179
158
  }
180
- function n(i) {
159
+ function n(s) {
181
160
  try {
182
- t(i);
183
- var g = !1;
161
+ t(s);
162
+ var u = !1;
184
163
  } catch {
185
- g = !0;
164
+ u = !0;
186
165
  }
187
- if (g) {
188
- g = console;
189
- var h = g.error, E = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
190
- return h.call(
191
- g,
166
+ if (u) {
167
+ u = console;
168
+ var p = u.error, y = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
169
+ return p.call(
170
+ u,
192
171
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
193
- E
194
- ), t(i);
172
+ y
173
+ ), t(s);
195
174
  }
196
175
  }
197
- function r(i) {
198
- if (i === S) return "<>";
199
- if (typeof i == "object" && i !== null && i.$$typeof === $)
176
+ function r(s) {
177
+ if (s === j) return "<>";
178
+ if (typeof s == "object" && s !== null && s.$$typeof === B)
200
179
  return "<...>";
201
180
  try {
202
- var g = e(i);
203
- return g ? "<" + g + ">" : "<...>";
181
+ var u = e(s);
182
+ return u ? "<" + u + ">" : "<...>";
204
183
  } catch {
205
184
  return "<...>";
206
185
  }
207
186
  }
208
187
  function o() {
209
- var i = oe.A;
210
- return i === null ? null : i.getOwner();
188
+ var s = te.A;
189
+ return s === null ? null : s.getOwner();
211
190
  }
212
- function s() {
191
+ function i() {
213
192
  return Error("react-stack-top-frame");
214
193
  }
215
- function c(i) {
216
- if (ve.call(i, "key")) {
217
- var g = Object.getOwnPropertyDescriptor(i, "key").get;
218
- if (g && g.isReactWarning) return !1;
194
+ function a(s) {
195
+ if (fe.call(s, "key")) {
196
+ var u = Object.getOwnPropertyDescriptor(s, "key").get;
197
+ if (u && u.isReactWarning) return !1;
219
198
  }
220
- return i.key !== void 0;
199
+ return s.key !== void 0;
221
200
  }
222
- function a(i, g) {
223
- function h() {
224
- he || (he = !0, console.error(
201
+ function c(s, u) {
202
+ function p() {
203
+ me || (me = !0, console.error(
225
204
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
226
- g
205
+ u
227
206
  ));
228
207
  }
229
- h.isReactWarning = !0, Object.defineProperty(i, "key", {
230
- get: h,
208
+ p.isReactWarning = !0, Object.defineProperty(s, "key", {
209
+ get: p,
231
210
  configurable: !0
232
211
  });
233
212
  }
234
- function u() {
235
- var i = e(this.type);
236
- return we[i] || (we[i] = !0, console.error(
213
+ function l() {
214
+ var s = e(this.type);
215
+ return ge[s] || (ge[s] = !0, console.error(
237
216
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
238
- )), i = this.props.ref, i !== void 0 ? i : null;
217
+ )), s = this.props.ref, s !== void 0 ? s : null;
239
218
  }
240
- function l(i, g, h, E, W, I, ie, ae) {
241
- return h = I.ref, i = {
242
- $$typeof: v,
243
- type: i,
244
- key: g,
245
- props: I,
246
- _owner: W
247
- }, (h !== void 0 ? h : null) !== null ? Object.defineProperty(i, "ref", {
219
+ function g(s, u, p, y, V, re) {
220
+ var w = p.ref;
221
+ return s = {
222
+ $$typeof: _,
223
+ type: s,
224
+ key: u,
225
+ props: p,
226
+ _owner: y
227
+ }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(s, "ref", {
248
228
  enumerable: !1,
249
- get: u
250
- }) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
229
+ get: l
230
+ }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
251
231
  configurable: !1,
252
232
  enumerable: !1,
253
233
  writable: !0,
254
234
  value: 0
255
- }), Object.defineProperty(i, "_debugInfo", {
235
+ }), Object.defineProperty(s, "_debugInfo", {
256
236
  configurable: !1,
257
237
  enumerable: !1,
258
238
  writable: !0,
259
239
  value: null
260
- }), Object.defineProperty(i, "_debugStack", {
240
+ }), Object.defineProperty(s, "_debugStack", {
261
241
  configurable: !1,
262
242
  enumerable: !1,
263
243
  writable: !0,
264
- value: ie
265
- }), Object.defineProperty(i, "_debugTask", {
244
+ value: V
245
+ }), Object.defineProperty(s, "_debugTask", {
266
246
  configurable: !1,
267
247
  enumerable: !1,
268
248
  writable: !0,
269
- value: ae
270
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
249
+ value: re
250
+ }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
271
251
  }
272
- function f(i, g, h, E, W, I, ie, ae) {
273
- var k = g.children;
274
- if (k !== void 0)
275
- if (E)
276
- if (st(k)) {
277
- for (E = 0; E < k.length; E++)
278
- d(k[E]);
279
- Object.freeze && Object.freeze(k);
252
+ function m(s, u, p, y, V, re) {
253
+ var w = u.children;
254
+ if (w !== void 0)
255
+ if (y)
256
+ if (Qe(w)) {
257
+ for (y = 0; y < w.length; y++)
258
+ f(w[y]);
259
+ Object.freeze && Object.freeze(w);
280
260
  } else
281
261
  console.error(
282
262
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
283
263
  );
284
- else d(k);
285
- if (ve.call(g, "key")) {
286
- k = e(i);
287
- var U = Object.keys(g).filter(function(it) {
288
- return it !== "key";
264
+ else f(w);
265
+ if (fe.call(u, "key")) {
266
+ w = e(s);
267
+ var W = Object.keys(u).filter(function(et) {
268
+ return et !== "key";
289
269
  });
290
- E = 0 < U.length ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}", Te[k + E] || (U = 0 < U.length ? "{" + U.join(": ..., ") + ": ...}" : "{}", console.error(
270
+ y = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", he[w + y] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error(
291
271
  `A props object containing a "key" prop is being spread into JSX:
292
272
  let props = %s;
293
273
  <%s {...props} />
294
274
  React keys must be passed directly to JSX without using spread:
295
275
  let props = %s;
296
276
  <%s key={someKey} {...props} />`,
297
- E,
298
- k,
299
- U,
300
- k
301
- ), Te[k + E] = !0);
277
+ y,
278
+ w,
279
+ W,
280
+ w
281
+ ), he[w + y] = !0);
302
282
  }
303
- if (k = null, h !== void 0 && (n(h), k = "" + h), c(g) && (n(g.key), k = "" + g.key), "key" in g) {
304
- h = {};
305
- for (var ce in g)
306
- ce !== "key" && (h[ce] = g[ce]);
307
- } else h = g;
308
- return k && a(
309
- h,
310
- typeof i == "function" ? i.displayName || i.name || "Unknown" : i
311
- ), l(
312
- i,
313
- k,
314
- I,
315
- W,
283
+ if (w = null, p !== void 0 && (n(p), w = "" + p), a(u) && (n(u.key), w = "" + u.key), "key" in u) {
284
+ p = {};
285
+ for (var oe in u)
286
+ oe !== "key" && (p[oe] = u[oe]);
287
+ } else p = u;
288
+ return w && c(
289
+ p,
290
+ typeof s == "function" ? s.displayName || s.name || "Unknown" : s
291
+ ), g(
292
+ s,
293
+ w,
294
+ p,
316
295
  o(),
317
- h,
318
- ie,
319
- ae
296
+ V,
297
+ re
320
298
  );
321
299
  }
322
- function d(i) {
323
- typeof i == "object" && i !== null && i.$$typeof === v && i._store && (i._store.validated = 1);
300
+ function f(s) {
301
+ E(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === B && (s._payload.status === "fulfilled" ? E(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
302
+ }
303
+ function E(s) {
304
+ return typeof s == "object" && s !== null && s.$$typeof === _;
324
305
  }
325
- var m = A, v = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), y = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), G = Symbol.for("react.activity"), ot = Symbol.for("react.client.reference"), oe = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ve = Object.prototype.hasOwnProperty, st = Array.isArray, se = console.createTask ? console.createTask : function() {
306
+ var v = L, _ = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), M = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), Ke = Symbol.for("react.activity"), Ze = Symbol.for("react.client.reference"), te = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, fe = Object.prototype.hasOwnProperty, Qe = Array.isArray, ne = console.createTask ? console.createTask : function() {
326
307
  return null;
327
308
  };
328
- m = {
329
- react_stack_bottom_frame: function(i) {
330
- return i();
309
+ v = {
310
+ react_stack_bottom_frame: function(s) {
311
+ return s();
331
312
  }
332
313
  };
333
- var he, we = {}, ye = m.react_stack_bottom_frame.bind(
334
- m,
335
- s
336
- )(), xe = se(r(s)), Te = {};
337
- H.Fragment = S, H.jsx = function(i, g, h, E, W) {
338
- var I = 1e4 > oe.recentlyCreatedOwnerStacks++;
339
- return f(
340
- i,
341
- g,
342
- h,
314
+ var me, ge = {}, pe = v.react_stack_bottom_frame.bind(
315
+ v,
316
+ i
317
+ )(), be = ne(r(i)), he = {};
318
+ z.Fragment = j, z.jsx = function(s, u, p) {
319
+ var y = 1e4 > te.recentlyCreatedOwnerStacks++;
320
+ return m(
321
+ s,
322
+ u,
323
+ p,
343
324
  !1,
344
- E,
345
- W,
346
- I ? Error("react-stack-top-frame") : ye,
347
- I ? se(r(i)) : xe
325
+ y ? Error("react-stack-top-frame") : pe,
326
+ y ? ne(r(s)) : be
348
327
  );
349
- }, H.jsxs = function(i, g, h, E, W) {
350
- var I = 1e4 > oe.recentlyCreatedOwnerStacks++;
351
- return f(
352
- i,
353
- g,
354
- h,
328
+ }, z.jsxs = function(s, u, p) {
329
+ var y = 1e4 > te.recentlyCreatedOwnerStacks++;
330
+ return m(
331
+ s,
332
+ u,
333
+ p,
355
334
  !0,
356
- E,
357
- W,
358
- I ? Error("react-stack-top-frame") : ye,
359
- I ? se(r(i)) : xe
335
+ y ? Error("react-stack-top-frame") : pe,
336
+ y ? ne(r(s)) : be
360
337
  );
361
338
  };
362
- }()), H;
339
+ }()), z;
363
340
  }
364
- var _e;
365
- function Ot() {
366
- return _e || (_e = 1, process.env.NODE_ENV === "production" ? K.exports = _t() : K.exports = St()), K.exports;
341
+ var we;
342
+ function vt() {
343
+ return we || (we = 1, process.env.NODE_ENV === "production" ? X.exports = bt() : X.exports = ht()), X.exports;
367
344
  }
368
- var p = Ot(), $e = {
345
+ var d = vt(), Re = {
369
346
  color: void 0,
370
347
  size: void 0,
371
348
  className: void 0,
372
349
  style: void 0,
373
350
  attr: void 0
374
- }, Se = A.createContext && /* @__PURE__ */ A.createContext($e), jt = ["attr", "size", "title"];
375
- function Nt(e, t) {
351
+ }, xe = L.createContext && /* @__PURE__ */ L.createContext(Re), yt = ["attr", "size", "title"];
352
+ function wt(e, t) {
376
353
  if (e == null) return {};
377
- var n = Ct(e, t), r, o;
354
+ var n = xt(e, t), r, o;
378
355
  if (Object.getOwnPropertySymbols) {
379
- var s = Object.getOwnPropertySymbols(e);
380
- for (o = 0; o < s.length; o++)
381
- r = s[o], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
356
+ var i = Object.getOwnPropertySymbols(e);
357
+ for (o = 0; o < i.length; o++)
358
+ r = i[o], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
382
359
  }
383
360
  return n;
384
361
  }
385
- function Ct(e, t) {
362
+ function xt(e, t) {
386
363
  if (e == null) return {};
387
364
  var n = {};
388
365
  for (var r in e)
@@ -392,17 +369,17 @@ function Ct(e, t) {
392
369
  }
393
370
  return n;
394
371
  }
395
- function Q() {
396
- return Q = Object.assign ? Object.assign.bind() : function(e) {
372
+ function q() {
373
+ return q = Object.assign ? Object.assign.bind() : function(e) {
397
374
  for (var t = 1; t < arguments.length; t++) {
398
375
  var n = arguments[t];
399
376
  for (var r in n)
400
377
  Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
401
378
  }
402
379
  return e;
403
- }, Q.apply(this, arguments);
380
+ }, q.apply(this, arguments);
404
381
  }
405
- function Oe(e, t) {
382
+ function Ee(e, t) {
406
383
  var n = Object.keys(e);
407
384
  if (Object.getOwnPropertySymbols) {
408
385
  var r = Object.getOwnPropertySymbols(e);
@@ -412,25 +389,25 @@ function Oe(e, t) {
412
389
  }
413
390
  return n;
414
391
  }
415
- function ee(e) {
392
+ function K(e) {
416
393
  for (var t = 1; t < arguments.length; t++) {
417
394
  var n = arguments[t] != null ? arguments[t] : {};
418
- t % 2 ? Oe(Object(n), !0).forEach(function(r) {
419
- Rt(e, r, n[r]);
420
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Oe(Object(n)).forEach(function(r) {
395
+ t % 2 ? Ee(Object(n), !0).forEach(function(r) {
396
+ Et(e, r, n[r]);
397
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ee(Object(n)).forEach(function(r) {
421
398
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
422
399
  });
423
400
  }
424
401
  return e;
425
402
  }
426
- function Rt(e, t, n) {
427
- return t = Lt(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
403
+ function Et(e, t, n) {
404
+ return t = Tt(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
428
405
  }
429
- function Lt(e) {
430
- var t = Pt(e, "string");
406
+ function Tt(e) {
407
+ var t = _t(e, "string");
431
408
  return typeof t == "symbol" ? t : t + "";
432
409
  }
433
- function Pt(e, t) {
410
+ function _t(e, t) {
434
411
  if (typeof e != "object" || !e) return e;
435
412
  var n = e[Symbol.toPrimitive];
436
413
  if (n !== void 0) {
@@ -440,43 +417,43 @@ function Pt(e, t) {
440
417
  }
441
418
  return (t === "string" ? String : Number)(e);
442
419
  }
443
- function We(e) {
444
- return e && e.map((t, n) => /* @__PURE__ */ A.createElement(t.tag, ee({
420
+ function Pe(e) {
421
+ return e && e.map((t, n) => /* @__PURE__ */ L.createElement(t.tag, K({
445
422
  key: n
446
- }, t.attr), We(t.child)));
423
+ }, t.attr), Pe(t.child)));
447
424
  }
448
- function It(e) {
449
- return (t) => /* @__PURE__ */ A.createElement(At, Q({
450
- attr: ee({}, e.attr)
451
- }, t), We(e.child));
425
+ function Ot(e) {
426
+ return (t) => /* @__PURE__ */ L.createElement(jt, q({
427
+ attr: K({}, e.attr)
428
+ }, t), Pe(e.child));
452
429
  }
453
- function At(e) {
430
+ function jt(e) {
454
431
  var t = (n) => {
455
432
  var {
456
433
  attr: r,
457
434
  size: o,
458
- title: s
459
- } = e, c = Nt(e, jt), a = o || n.size || "1em", u;
460
- return n.className && (u = n.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ A.createElement("svg", Q({
435
+ title: i
436
+ } = e, a = wt(e, yt), c = o || n.size || "1em", l;
437
+ return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ L.createElement("svg", q({
461
438
  stroke: "currentColor",
462
439
  fill: "currentColor",
463
440
  strokeWidth: "0"
464
- }, n.attr, r, c, {
465
- className: u,
466
- style: ee(ee({
441
+ }, n.attr, r, a, {
442
+ className: l,
443
+ style: K(K({
467
444
  color: e.color || n.color
468
445
  }, n.style), e.style),
469
- height: a,
470
- width: a,
446
+ height: c,
447
+ width: c,
471
448
  xmlns: "http://www.w3.org/2000/svg"
472
- }), s && /* @__PURE__ */ A.createElement("title", null, s), e.children);
449
+ }), i && /* @__PURE__ */ L.createElement("title", null, i), e.children);
473
450
  };
474
- return Se !== void 0 ? /* @__PURE__ */ A.createElement(Se.Consumer, null, (n) => t(n)) : t($e);
451
+ return xe !== void 0 ? /* @__PURE__ */ L.createElement(xe.Consumer, null, (n) => t(n)) : t(Re);
475
452
  }
476
- function Be(e) {
477
- return It({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z" }, child: [] }] })(e);
453
+ function Le(e) {
454
+ return Ot({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z" }, child: [] }] })(e);
478
455
  }
479
- const R = (...e) => De(lt(e)), Dt = gt(
456
+ const C = (...e) => Se(nt(e)), Nt = st(
480
457
  "inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
481
458
  {
482
459
  variants: {
@@ -511,83 +488,83 @@ const R = (...e) => De(lt(e)), Dt = gt(
511
488
  rounded: "default"
512
489
  }
513
490
  }
514
- ), Mt = D.forwardRef(
491
+ ), kt = A.forwardRef(
515
492
  ({
516
493
  className: e,
517
494
  variant: t,
518
495
  size: n,
519
496
  rounded: r,
520
497
  asChild: o = !1,
521
- isLoading: s = !1,
522
- loadingText: c,
523
- disabled: a,
524
- ...u
525
- }, l) => {
526
- const f = o ? mt.Root : "button";
527
- return /* @__PURE__ */ p.jsx(
528
- f,
498
+ isLoading: i = !1,
499
+ loadingText: a,
500
+ disabled: c,
501
+ ...l
502
+ }, g) => {
503
+ const m = o ? ot.Root : "button";
504
+ return /* @__PURE__ */ d.jsx(
505
+ m,
529
506
  {
530
- className: R(Dt({ variant: t, size: n, rounded: r, className: e })),
531
- ref: l,
532
- disabled: a || s,
507
+ className: C(Nt({ variant: t, size: n, rounded: r, className: e })),
508
+ ref: g,
509
+ disabled: c || i,
533
510
  type: "button",
534
- ...u,
535
- children: s ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
536
- /* @__PURE__ */ p.jsx(
537
- Be,
511
+ ...l,
512
+ children: i ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
513
+ /* @__PURE__ */ d.jsx(
514
+ Le,
538
515
  {
539
- className: De(
516
+ className: Se(
540
517
  "h-4 w-4 animate-spin",
541
- c ? "mr-2" : ""
518
+ a ? "mr-2" : ""
542
519
  )
543
520
  }
544
521
  ),
545
- c
546
- ] }) : u.children
522
+ a
523
+ ] }) : l.children
547
524
  }
548
525
  );
549
526
  }
550
527
  );
551
- Mt.displayName = "Button";
552
- const $t = j.Root, Tr = j.Trigger, Wt = j.Portal, Er = j.Close, Fe = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
553
- j.Overlay,
528
+ kt.displayName = "Button";
529
+ const St = N.Root, ur = N.Trigger, Ct = N.Portal, dr = N.Close, Ae = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
530
+ N.Overlay,
554
531
  {
555
532
  ref: n,
556
- className: R(
533
+ className: C(
557
534
  "bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid max-h-screen place-items-center overflow-y-auto py-10 backdrop-blur-sm",
558
535
  e
559
536
  ),
560
537
  ...t
561
538
  }
562
539
  ));
563
- Fe.displayName = j.Overlay.displayName;
564
- const Ue = D.forwardRef(
540
+ Ae.displayName = N.Overlay.displayName;
541
+ const Ie = A.forwardRef(
565
542
  ({
566
543
  className: e,
567
544
  children: t,
568
545
  container: n,
569
546
  hideCloseButton: r,
570
547
  overlayStyles: o,
571
- ...s
572
- }, c) => /* @__PURE__ */ p.jsx(Wt, { container: n, children: /* @__PURE__ */ p.jsx(Fe, { className: o, children: /* @__PURE__ */ p.jsxs(
573
- j.Content,
548
+ ...i
549
+ }, a) => /* @__PURE__ */ d.jsx(Ct, { container: n, children: /* @__PURE__ */ d.jsx(Ae, { className: o, children: /* @__PURE__ */ d.jsxs(
550
+ N.Content,
574
551
  {
575
- ref: c,
576
- className: R(
552
+ ref: a,
553
+ className: C(
577
554
  "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 grid w-full max-w-lg gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
578
555
  e
579
556
  ),
580
- ...s,
557
+ ...i,
581
558
  children: [
582
559
  t,
583
- !r && /* @__PURE__ */ p.jsxs(
584
- j.Close,
560
+ !r && /* @__PURE__ */ d.jsxs(
561
+ N.Close,
585
562
  {
586
563
  type: "button",
587
564
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm p-1 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",
588
565
  children: [
589
- /* @__PURE__ */ p.jsx(pt, { className: "h-4 w-4" }),
590
- /* @__PURE__ */ p.jsx("span", { className: "sr-only", children: "Close" })
566
+ /* @__PURE__ */ d.jsx(it, { className: "h-4 w-4" }),
567
+ /* @__PURE__ */ d.jsx("span", { className: "sr-only", children: "Close" })
591
568
  ]
592
569
  }
593
570
  )
@@ -595,72 +572,72 @@ const Ue = D.forwardRef(
595
572
  }
596
573
  ) }) })
597
574
  );
598
- Ue.displayName = j.Content.displayName;
599
- const Ye = ({
575
+ Ie.displayName = N.Content.displayName;
576
+ const De = ({
600
577
  className: e,
601
578
  ...t
602
- }) => /* @__PURE__ */ p.jsx(
579
+ }) => /* @__PURE__ */ d.jsx(
603
580
  "div",
604
581
  {
605
- className: R(
582
+ className: C(
606
583
  "flex flex-col space-y-1.5 text-center sm:text-left",
607
584
  e
608
585
  ),
609
586
  ...t
610
587
  }
611
588
  );
612
- Ye.displayName = "DialogHeader";
613
- const Bt = ({
589
+ De.displayName = "DialogHeader";
590
+ const Rt = ({
614
591
  className: e,
615
592
  ...t
616
- }) => /* @__PURE__ */ p.jsx(
593
+ }) => /* @__PURE__ */ d.jsx(
617
594
  "div",
618
595
  {
619
- className: R(
596
+ className: C(
620
597
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
621
598
  e
622
599
  ),
623
600
  ...t
624
601
  }
625
602
  );
626
- Bt.displayName = "DialogFooter";
627
- const ze = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
628
- j.Title,
603
+ Rt.displayName = "DialogFooter";
604
+ const $e = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
605
+ N.Title,
629
606
  {
630
607
  ref: n,
631
- className: R(
608
+ className: C(
632
609
  "text-lg leading-none font-semibold tracking-tight",
633
610
  e
634
611
  ),
635
612
  ...t
636
613
  }
637
614
  ));
638
- ze.displayName = j.Title.displayName;
639
- const He = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
640
- j.Description,
615
+ $e.displayName = N.Title.displayName;
616
+ const Me = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
617
+ N.Description,
641
618
  {
642
619
  ref: n,
643
- className: R("text-muted-foreground text-sm", e),
620
+ className: C("text-muted-foreground text-sm", e),
644
621
  ...t
645
622
  }
646
623
  ));
647
- He.displayName = j.Description.displayName;
648
- const kr = ({
624
+ Me.displayName = N.Description.displayName;
625
+ const fr = ({
649
626
  isOpen: e,
650
627
  onClose: t,
651
628
  children: n,
652
629
  title: r,
653
630
  description: o = "",
654
- contentClassName: s,
655
- modal: c = !0
656
- }) => /* @__PURE__ */ p.jsx($t, { open: e, onOpenChange: t, modal: c, children: /* @__PURE__ */ p.jsxs(Ue, { className: s, children: [
657
- r && /* @__PURE__ */ p.jsxs(Ye, { className: "flex-1 font-medium", children: [
658
- /* @__PURE__ */ p.jsx(ze, { children: r }),
659
- /* @__PURE__ */ p.jsx(He, { children: o })
631
+ contentClassName: i,
632
+ modal: a = !0
633
+ }) => /* @__PURE__ */ d.jsx(St, { open: e, onOpenChange: t, modal: a, children: /* @__PURE__ */ d.jsxs(Ie, { className: i, children: [
634
+ r && /* @__PURE__ */ d.jsxs(De, { className: "flex-1 font-medium", children: [
635
+ /* @__PURE__ */ d.jsx($e, { children: r }),
636
+ /* @__PURE__ */ d.jsx(Me, { children: o })
660
637
  ] }),
661
- /* @__PURE__ */ p.jsx("div", { className: "w-full", children: n })
662
- ] }) }), _r = ({ ...e }) => /* @__PURE__ */ p.jsx(
663
- bt,
638
+ /* @__PURE__ */ d.jsx("div", { className: "w-full", children: n })
639
+ ] }) }), mr = ({ ...e }) => /* @__PURE__ */ d.jsx(
640
+ at,
664
641
  {
665
642
  closeButton: !0,
666
643
  richColors: !0,
@@ -675,37 +652,37 @@ const kr = ({
675
652
  },
676
653
  ...e
677
654
  }
678
- ), Ft = (e, t = "Error", n = {}) => {
679
- me.error(t, {
655
+ ), Pt = (e, t = "Error", n = {}) => {
656
+ ce.error(t, {
680
657
  description: e,
681
658
  duration: 4e3,
682
659
  position: "bottom-right",
683
660
  ...n
684
661
  });
685
- }, Sr = (e, t = "Success", n = {}) => {
686
- n != null && n.id && me.dismiss(n == null ? void 0 : n.id), me.success(t, {
662
+ }, gr = (e, t = "Success", n = {}) => {
663
+ n?.id && ce.dismiss(n?.id), ce.success(t, {
687
664
  description: e,
688
665
  duration: 4e3,
689
666
  position: "bottom-right",
690
667
  ...n
691
668
  });
692
- }, Ut = ({ className: e }) => /* @__PURE__ */ p.jsx(Be, { className: R("h-8 w-8 animate-spin font-light", e) }), Or = F.Root, Yt = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
693
- F.List,
669
+ }, Lt = ({ className: e }) => /* @__PURE__ */ d.jsx(Le, { className: C("h-8 w-8 animate-spin font-light", e) }), pr = $.Root, At = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
670
+ $.List,
694
671
  {
695
672
  ref: n,
696
- className: R(
673
+ className: C(
697
674
  "bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",
698
675
  e
699
676
  ),
700
677
  ...t
701
678
  }
702
679
  ));
703
- Yt.displayName = F.List.displayName;
704
- const zt = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
705
- F.Trigger,
680
+ At.displayName = $.List.displayName;
681
+ const It = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
682
+ $.Trigger,
706
683
  {
707
684
  ref: n,
708
- className: R(
685
+ className: C(
709
686
  "ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",
710
687
  e
711
688
  ),
@@ -713,247 +690,247 @@ const zt = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
713
690
  ...t
714
691
  }
715
692
  ));
716
- zt.displayName = F.Trigger.displayName;
717
- const Ht = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p.jsx(
718
- F.Content,
693
+ It.displayName = $.Trigger.displayName;
694
+ const Dt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
695
+ $.Content,
719
696
  {
720
697
  ref: n,
721
- className: R(
698
+ className: C(
722
699
  "ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
723
700
  e
724
701
  ),
725
702
  ...t
726
703
  }
727
704
  ));
728
- Ht.displayName = F.Content.displayName;
729
- const jr = Y.Provider, Vt = Y.Root, Gt = Y.Trigger, Jt = Y.Portal, Ve = D.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ p.jsx(
730
- Y.Content,
705
+ Dt.displayName = $.Content.displayName;
706
+ const br = F.Provider, $t = F.Root, Mt = F.Trigger, Bt = F.Portal, Be = A.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ d.jsx(
707
+ F.Content,
731
708
  {
732
709
  ref: r,
733
710
  sideOffset: t,
734
- className: R(
711
+ className: C(
735
712
  "bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-xs shadow-md",
736
713
  e
737
714
  ),
738
715
  ...n
739
716
  }
740
717
  ));
741
- Ve.displayName = Y.Content.displayName;
742
- const Nr = ({
718
+ Be.displayName = F.Content.displayName;
719
+ const hr = ({
743
720
  children: e,
744
721
  label: t,
745
722
  labelClassName: n,
746
723
  asChild: r = !0,
747
724
  contentProps: o = {},
748
- side: s
749
- }) => /* @__PURE__ */ p.jsxs(Vt, { children: [
750
- t && /* @__PURE__ */ p.jsx(Jt, { children: /* @__PURE__ */ p.jsx(
751
- Ve,
725
+ side: i
726
+ }) => /* @__PURE__ */ d.jsxs($t, { children: [
727
+ t && /* @__PURE__ */ d.jsx(Bt, { children: /* @__PURE__ */ d.jsx(
728
+ Be,
752
729
  {
753
- side: s,
730
+ side: i,
754
731
  className: n,
755
732
  ...o,
756
733
  children: t
757
734
  }
758
735
  ) }),
759
- /* @__PURE__ */ p.jsx(Gt, { asChild: r, children: e })
760
- ] }), Cr = (e, t = 2) => {
736
+ /* @__PURE__ */ d.jsx(Mt, { asChild: r, children: e })
737
+ ] }), vr = (e, t = 2) => {
761
738
  if (e === 0) return "0 B";
762
- const n = 1024, r = t < 0 ? 0 : t, o = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], s = Math.floor(Math.log(e) / Math.log(n));
763
- return `${Number.parseFloat((e / n ** s).toFixed(r))} ${o[s]}`;
764
- }, Rr = (e) => {
765
- const t = Me(e);
766
- return Ft((t == null ? void 0 : t.message) || "", (t == null ? void 0 : t.title) || "Error", {
767
- id: `${(t == null ? void 0 : t.title) || ""}-${(t == null ? void 0 : t.message) || ""}`
739
+ const n = 1024, r = t < 0 ? 0 : t, o = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], i = Math.floor(Math.log(e) / Math.log(n));
740
+ return `${Number.parseFloat((e / n ** i).toFixed(r))} ${o[i]}`;
741
+ }, yr = (e) => {
742
+ const t = Ce(e);
743
+ return Pt(t?.message || "", t?.title || "Error", {
744
+ id: `${t?.title || ""}-${t?.message || ""}`
768
745
  }), t;
769
- }, Xt = (e) => e instanceof Date, qt = (e) => e == null, Kt = (e) => typeof e == "object", Zt = (e) => !qt(e) && !Array.isArray(e) && Kt(e) && !Xt(e), Lr = (e) => Zt(e) && !Object.keys(e).length, Ge = ut(null), Pr = ({ children: e, client: t }) => /* @__PURE__ */ p.jsx(Ge.Provider, { value: t, children: e }), L = () => {
770
- const e = Pe(Ge);
746
+ }, Wt = (e) => e instanceof Date, Ft = (e) => e == null, Ut = (e) => typeof e == "object", Yt = (e) => !Ft(e) && !Array.isArray(e) && Ut(e) && !Wt(e), wr = (e) => Yt(e) && !Object.keys(e).length, We = tt(null), xr = ({ children: e, client: t }) => /* @__PURE__ */ d.jsx(We.Provider, { value: t, children: e }), R = () => {
747
+ const e = je(We);
771
748
  if (!e)
772
749
  throw new Error(
773
750
  "useLevo must be used within a LevoProvider. Please ensure you have wrapped your component tree with LevoProvider."
774
751
  );
775
752
  return e;
776
- }, Ir = ({ id: e, properties: t = {} }) => {
777
- const { audience: n } = L(), [r, o] = x(!1);
778
- return b(() => {
779
- if (r || typeof (n == null ? void 0 : n.track) != "function") return;
780
- const s = document.getElementById(e);
781
- if (!s) return;
782
- const c = () => {
783
- r || (n == null || n.track("block.view", {
753
+ }, Er = ({ id: e, properties: t = {} }) => {
754
+ const { audience: n } = R(), [r, o] = O(!1);
755
+ return x(() => {
756
+ if (r || typeof n?.track != "function") return;
757
+ const i = document.getElementById(e);
758
+ if (!i) return;
759
+ const a = () => {
760
+ r || (n?.track("block.view", {
784
761
  ...t,
785
762
  resource: "block",
786
763
  identifier: e
787
764
  }), o(!0));
788
765
  };
789
- if (((l) => {
790
- const f = l.getBoundingClientRect();
791
- return f.top >= 0 && f.left >= 0 && f.bottom <= (window.innerHeight || document.documentElement.clientHeight) && f.right <= (window.innerWidth || document.documentElement.clientWidth);
792
- })(s)) {
793
- c();
766
+ if (((g) => {
767
+ const m = g.getBoundingClientRect();
768
+ return m.top >= 0 && m.left >= 0 && m.bottom <= (window.innerHeight || document.documentElement.clientHeight) && m.right <= (window.innerWidth || document.documentElement.clientWidth);
769
+ })(i)) {
770
+ a();
794
771
  return;
795
772
  }
796
- const u = new IntersectionObserver(
797
- (l) => {
798
- l.forEach((f) => {
799
- f.isIntersecting && (c(), u.disconnect());
773
+ const l = new IntersectionObserver(
774
+ (g) => {
775
+ g.forEach((m) => {
776
+ m.isIntersecting && (a(), l.disconnect());
800
777
  });
801
778
  },
802
779
  { threshold: 0 }
803
780
  );
804
- return u.observe(s), () => {
805
- u.disconnect();
781
+ return l.observe(i), () => {
782
+ l.disconnect();
806
783
  };
807
784
  }, [n, e, t, r]), null;
808
- }, Ar = ({ event: e, properties: t }) => {
809
- const { audience: n } = L();
810
- return b(() => {
811
- n != null && n.instance && (n == null || n.track(e, t));
812
- }, [n == null ? void 0 : n.instance, e, t]), null;
785
+ }, Tr = ({ event: e, properties: t }) => {
786
+ const { audience: n } = R();
787
+ return x(() => {
788
+ n?.instance && n?.track(e, t);
789
+ }, [n?.instance, e, t]), null;
813
790
  };
814
- function ge(e) {
791
+ function le(e) {
815
792
  var t = typeof e;
816
793
  return e != null && (t == "object" || t == "function");
817
794
  }
818
- var Qt = typeof global == "object" && global && global.Object === Object && global, en = typeof self == "object" && self && self.Object === Object && self, Je = Qt || en || Function("return this")(), le = function() {
819
- return Je.Date.now();
820
- }, tn = /\s/;
821
- function nn(e) {
822
- for (var t = e.length; t-- && tn.test(e.charAt(t)); )
795
+ var zt = typeof global == "object" && global && global.Object === Object && global, Ht = typeof self == "object" && self && self.Object === Object && self, Fe = zt || Ht || Function("return this")(), ie = function() {
796
+ return Fe.Date.now();
797
+ }, Vt = /\s/;
798
+ function Gt(e) {
799
+ for (var t = e.length; t-- && Vt.test(e.charAt(t)); )
823
800
  ;
824
801
  return t;
825
802
  }
826
- var rn = /^\s+/;
827
- function on(e) {
828
- return e && e.slice(0, nn(e) + 1).replace(rn, "");
803
+ var Jt = /^\s+/;
804
+ function Xt(e) {
805
+ return e && e.slice(0, Gt(e) + 1).replace(Jt, "");
829
806
  }
830
- var te = Je.Symbol, Xe = Object.prototype, sn = Xe.hasOwnProperty, an = Xe.toString, V = te ? te.toStringTag : void 0;
831
- function cn(e) {
832
- var t = sn.call(e, V), n = e[V];
807
+ var Z = Fe.Symbol, Ue = Object.prototype, qt = Ue.hasOwnProperty, Kt = Ue.toString, H = Z ? Z.toStringTag : void 0;
808
+ function Zt(e) {
809
+ var t = qt.call(e, H), n = e[H];
833
810
  try {
834
- e[V] = void 0;
811
+ e[H] = void 0;
835
812
  var r = !0;
836
813
  } catch {
837
814
  }
838
- var o = an.call(e);
839
- return r && (t ? e[V] = n : delete e[V]), o;
815
+ var o = Kt.call(e);
816
+ return r && (t ? e[H] = n : delete e[H]), o;
840
817
  }
841
- var un = Object.prototype, ln = un.toString;
842
- function dn(e) {
843
- return ln.call(e);
818
+ var Qt = Object.prototype, en = Qt.toString;
819
+ function tn(e) {
820
+ return en.call(e);
844
821
  }
845
- var fn = "[object Null]", mn = "[object Undefined]", je = te ? te.toStringTag : void 0;
846
- function gn(e) {
847
- return e == null ? e === void 0 ? mn : fn : je && je in Object(e) ? cn(e) : dn(e);
822
+ var nn = "[object Null]", rn = "[object Undefined]", Te = Z ? Z.toStringTag : void 0;
823
+ function on(e) {
824
+ return e == null ? e === void 0 ? rn : nn : Te && Te in Object(e) ? Zt(e) : tn(e);
848
825
  }
849
- function pn(e) {
826
+ function sn(e) {
850
827
  return e != null && typeof e == "object";
851
828
  }
852
- var bn = "[object Symbol]";
853
- function vn(e) {
854
- return typeof e == "symbol" || pn(e) && gn(e) == bn;
829
+ var an = "[object Symbol]";
830
+ function cn(e) {
831
+ return typeof e == "symbol" || sn(e) && on(e) == an;
855
832
  }
856
- var Ne = NaN, hn = /^[-+]0x[0-9a-f]+$/i, wn = /^0b[01]+$/i, yn = /^0o[0-7]+$/i, xn = parseInt;
857
- function Ce(e) {
833
+ var _e = NaN, ln = /^[-+]0x[0-9a-f]+$/i, un = /^0b[01]+$/i, dn = /^0o[0-7]+$/i, fn = parseInt;
834
+ function Oe(e) {
858
835
  if (typeof e == "number")
859
836
  return e;
860
- if (vn(e))
861
- return Ne;
862
- if (ge(e)) {
837
+ if (cn(e))
838
+ return _e;
839
+ if (le(e)) {
863
840
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
864
- e = ge(t) ? t + "" : t;
841
+ e = le(t) ? t + "" : t;
865
842
  }
866
843
  if (typeof e != "string")
867
844
  return e === 0 ? e : +e;
868
- e = on(e);
869
- var n = wn.test(e);
870
- return n || yn.test(e) ? xn(e.slice(2), n ? 2 : 8) : hn.test(e) ? Ne : +e;
845
+ e = Xt(e);
846
+ var n = un.test(e);
847
+ return n || dn.test(e) ? fn(e.slice(2), n ? 2 : 8) : ln.test(e) ? _e : +e;
871
848
  }
872
- var Tn = "Expected a function", En = Math.max, kn = Math.min;
873
- function _n(e, t, n) {
874
- var r, o, s, c, a, u, l = 0, f = !1, d = !1, m = !0;
849
+ var mn = "Expected a function", gn = Math.max, pn = Math.min;
850
+ function bn(e, t, n) {
851
+ var r, o, i, a, c, l, g = 0, m = !1, f = !1, E = !0;
875
852
  if (typeof e != "function")
876
- throw new TypeError(Tn);
877
- t = Ce(t) || 0, ge(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? En(Ce(n.maxWait) || 0, t) : s, m = "trailing" in n ? !!n.trailing : m);
878
- function v(w) {
879
- var P = r, $ = o;
880
- return r = o = void 0, l = w, c = e.apply($, P), c;
881
- }
882
- function _(w) {
883
- return l = w, a = setTimeout(C, t), f ? v(w) : c;
853
+ throw new TypeError(mn);
854
+ t = Oe(t) || 0, le(n) && (m = !!n.leading, f = "maxWait" in n, i = f ? gn(Oe(n.maxWait) || 0, t) : i, E = "trailing" in n ? !!n.trailing : E);
855
+ function v(b) {
856
+ var P = r, I = o;
857
+ return r = o = void 0, g = b, a = e.apply(I, P), a;
884
858
  }
885
- function S(w) {
886
- var P = w - u, $ = w - l, G = t - P;
887
- return d ? kn(G, s - $) : G;
859
+ function _(b) {
860
+ return g = b, c = setTimeout(S, t), m ? v(b) : a;
888
861
  }
889
- function N(w) {
890
- var P = w - u, $ = w - l;
891
- return u === void 0 || P >= t || P < 0 || d && $ >= s;
862
+ function k(b) {
863
+ var P = b - l, I = b - g, B = t - P;
864
+ return f ? pn(B, i - I) : B;
892
865
  }
893
- function C() {
894
- var w = le();
895
- if (N(w))
896
- return T(w);
897
- a = setTimeout(C, S(w));
866
+ function j(b) {
867
+ var P = b - l, I = b - g;
868
+ return l === void 0 || P >= t || P < 0 || f && I >= i;
898
869
  }
899
- function T(w) {
900
- return a = void 0, m && r ? v(w) : (r = o = void 0, c);
870
+ function S() {
871
+ var b = ie();
872
+ if (j(b))
873
+ return h(b);
874
+ c = setTimeout(S, k(b));
901
875
  }
902
- function y() {
903
- a !== void 0 && clearTimeout(a), l = 0, r = u = o = a = void 0;
876
+ function h(b) {
877
+ return c = void 0, E && r ? v(b) : (r = o = void 0, a);
904
878
  }
905
- function O() {
906
- return a === void 0 ? c : T(le());
879
+ function T() {
880
+ c !== void 0 && clearTimeout(c), g = 0, r = l = o = c = void 0;
907
881
  }
908
882
  function M() {
909
- var w = le(), P = N(w);
910
- if (r = arguments, o = this, u = w, P) {
911
- if (a === void 0)
912
- return _(u);
913
- if (d)
914
- return clearTimeout(a), a = setTimeout(C, t), v(u);
883
+ return c === void 0 ? a : h(ie());
884
+ }
885
+ function U() {
886
+ var b = ie(), P = j(b);
887
+ if (r = arguments, o = this, l = b, P) {
888
+ if (c === void 0)
889
+ return _(l);
890
+ if (f)
891
+ return clearTimeout(c), c = setTimeout(S, t), v(l);
915
892
  }
916
- return a === void 0 && (a = setTimeout(C, t)), c;
893
+ return c === void 0 && (c = setTimeout(S, t)), a;
917
894
  }
918
- return M.cancel = y, M.flush = O, M;
895
+ return U.cancel = T, U.flush = M, U;
919
896
  }
920
- const Sn = () => {
921
- const [e, t] = x(0), [n, r] = x(0), [o, s] = x(0), [c, a] = x(Date.now()), [u, l] = x("read"), f = _n(() => {
922
- const d = window.scrollY, m = document.documentElement.scrollHeight, v = window.innerHeight, _ = Math.round(
923
- d / (m - v) * 100
924
- ), S = Math.floor(_ / 5) * 5;
925
- if (S <= n)
897
+ const hn = () => {
898
+ const [e, t] = O(0), [n, r] = O(0), [o, i] = O(0), [a, c] = O(Date.now()), [l, g] = O("read"), m = bn(() => {
899
+ const f = window.scrollY, E = document.documentElement.scrollHeight, v = window.innerHeight, _ = Math.round(
900
+ f / (E - v) * 100
901
+ ), k = Math.floor(_ / 5) * 5;
902
+ if (k <= n)
926
903
  return;
927
- const N = Date.now(), C = (N - c) / 1e3, y = Math.abs(d - o) / C;
928
- l(y > 300 ? "scan" : "read"), s(d), a(N), r(S), t(S);
904
+ const j = Date.now(), S = (j - a) / 1e3, T = Math.abs(f - o) / S;
905
+ g(T > 300 ? "scan" : "read"), i(f), c(j), r(k), t(k);
929
906
  }, 250);
930
- return b(() => (window.addEventListener("scroll", f), () => window.removeEventListener("scroll", f)), []), { depth: e, speedCategory: u };
931
- }, On = () => {
932
- const e = L(), [t, n] = x(0);
933
- return b(() => {
907
+ return x(() => (window.addEventListener("scroll", m), () => window.removeEventListener("scroll", m)), []), { depth: e, speedCategory: l };
908
+ }, vn = () => {
909
+ const e = R(), [t, n] = O(0);
910
+ return x(() => {
934
911
  const r = Number(localStorage.getItem(e.audience.storage_keys.open_tabs)) || 0;
935
912
  n(r), localStorage.setItem(
936
913
  e.audience.storage_keys.open_tabs,
937
914
  (r + 1).toString()
938
915
  );
939
- const o = (c) => {
940
- c.key === e.audience.storage_keys.open_tabs && n(Number(c.newValue) || 0);
916
+ const o = (a) => {
917
+ a.key === e.audience.storage_keys.open_tabs && n(Number(a.newValue) || 0);
941
918
  };
942
919
  window.addEventListener("storage", o);
943
- const s = () => {
944
- const c = Number(localStorage.getItem(e.audience.storage_keys.open_tabs)) || 0;
945
- c > 0 && localStorage.setItem(
920
+ const i = () => {
921
+ const a = Number(localStorage.getItem(e.audience.storage_keys.open_tabs)) || 0;
922
+ a > 0 && localStorage.setItem(
946
923
  e.audience.storage_keys.open_tabs,
947
- (c - 1).toString()
924
+ (a - 1).toString()
948
925
  );
949
926
  };
950
- return window.addEventListener("beforeunload", s), () => {
951
- window.removeEventListener("storage", o), window.removeEventListener("beforeunload", s);
927
+ return window.addEventListener("beforeunload", i), () => {
928
+ window.removeEventListener("storage", o), window.removeEventListener("beforeunload", i);
952
929
  };
953
930
  }, []), t;
954
- }, jn = () => {
955
- const e = L(), [t, n] = x(null);
956
- return b(() => {
931
+ }, yn = () => {
932
+ const e = R(), [t, n] = O(null);
933
+ return x(() => {
957
934
  let r = sessionStorage.getItem(
958
935
  e.audience.storage_keys.current_tab
959
936
  );
@@ -967,61 +944,58 @@ const Sn = () => {
967
944
  e.audience.storage_keys.all_tabs,
968
945
  JSON.stringify(o)
969
946
  )), n(r);
970
- const s = () => {
971
- const c = o.filter(
972
- (a) => a !== r
947
+ const i = () => {
948
+ const a = o.filter(
949
+ (c) => c !== r
973
950
  );
974
951
  localStorage.setItem(
975
952
  e.audience.storage_keys.all_tabs,
976
- JSON.stringify(c)
953
+ JSON.stringify(a)
977
954
  );
978
955
  };
979
- return window.addEventListener("beforeunload", s), () => {
980
- window.removeEventListener("beforeunload", s);
956
+ return window.addEventListener("beforeunload", i), () => {
957
+ window.removeEventListener("beforeunload", i);
981
958
  };
982
959
  }, []), t;
983
- }, ne = (e) => Object.prototype.toString.call(e) == "[object String]", Nn = (e, t) => e.indexOf(t) !== -1, re = (e) => e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), qe = (e) => e === void 0, Cn = (e) => e === null, Ke = (e) => qe(e) || Cn(e), Ze = (e) => !!e && (e == null ? void 0 : e.nodeType) === 3;
984
- function Rn(e) {
985
- return !!e && (e == null ? void 0 : e.nodeType) === 1;
960
+ }, Q = (e) => Object.prototype.toString.call(e) == "[object String]", wn = (e, t) => e.indexOf(t) !== -1, ee = (e) => e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), Ye = (e) => e === void 0, xn = (e) => e === null, ze = (e) => Ye(e) || xn(e), He = (e) => !!e && e?.nodeType === 3;
961
+ function En(e) {
962
+ return !!e && e?.nodeType === 1;
986
963
  }
987
- function Ln(e, t) {
988
- return !!e && !!(e != null && e.tagName) && (e == null ? void 0 : e.tagName.toLowerCase()) === t.toLowerCase();
964
+ function Tn(e, t) {
965
+ return !!e && !!e?.tagName && e?.tagName.toLowerCase() === t.toLowerCase();
989
966
  }
990
- function Pn(e) {
991
- return e ? re(e).split(/\s+/) : [];
967
+ function _n(e) {
968
+ return e ? ee(e).split(/\s+/) : [];
992
969
  }
993
- function In(e) {
970
+ function On(e) {
994
971
  let t = "";
995
- switch (typeof (e == null ? void 0 : e.className)) {
972
+ switch (typeof e?.className) {
996
973
  case "string":
997
- t = e == null ? void 0 : e.className;
974
+ t = e?.className;
998
975
  break;
999
976
  // TODO: when is this ever used?
1000
977
  case "object":
1001
- t = (e != null && e.className && "baseVal" in (e == null ? void 0 : e.className) ? (e == null ? void 0 : e.className).baseVal : null) || (e == null ? void 0 : e.getAttribute("class")) || "";
978
+ t = (e?.className && "baseVal" in e?.className ? (e?.className).baseVal : null) || e?.getAttribute("class") || "";
1002
979
  break;
1003
980
  default:
1004
981
  t = "";
1005
982
  }
1006
- return Pn(t);
983
+ return _n(t);
1007
984
  }
1008
- const B = (e, t = 255) => Ke(e) ? "" : re(e).split(/(\s+)/).filter((n) => be(n)).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, t), pe = (e) => {
985
+ const D = (e, t = 255) => ze(e) ? "" : ee(e).split(/(\s+)/).filter((n) => de(n)).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, t), ue = (e) => {
1009
986
  let t = "";
1010
- if (Mn(e) && // !isSensitiveElement(el) &&
1011
- (e != null && e.childNodes) && (e != null && e.childNodes.length))
1012
- for (const n of e == null ? void 0 : e.childNodes)
1013
- Ze(n) && n.textContent && (t += B(n.textContent) ?? "");
1014
- return re(t);
1015
- }, An = (e) => {
1016
- var t, n;
1017
- return qe(e.target) ? (e == null ? void 0 : e.srcElement) || null : (t = e == null ? void 0 : e.target) != null && t.shadowRoot ? ((n = e == null ? void 0 : e.composedPath()) == null ? void 0 : n[0]) || null : (e == null ? void 0 : e.target) || null;
1018
- }, Dn = (e, t) => {
1019
- if (!window || !e || Ln(e, "html") || !Rn(e))
987
+ if (kn(e) && // !isSensitiveElement(el) &&
988
+ e?.childNodes && e?.childNodes.length)
989
+ for (const n of e?.childNodes)
990
+ He(n) && n.textContent && (t += D(n.textContent) ?? "");
991
+ return ee(t);
992
+ }, jn = (e) => Ye(e.target) ? e?.srcElement || null : e?.target?.shadowRoot ? e?.composedPath()?.[0] || null : e?.target || null, Nn = (e, t) => {
993
+ if (!window || !e || Tn(e, "html") || !En(e))
1020
994
  return !1;
1021
995
  const n = window.getComputedStyle(e);
1022
996
  if (n && n.getPropertyValue("cursor") === "pointer" && t.type === "click")
1023
997
  return !0;
1024
- switch (e == null ? void 0 : e.tagName.toLowerCase()) {
998
+ switch (e?.tagName.toLowerCase()) {
1025
999
  case "html":
1026
1000
  return !1;
1027
1001
  case "form":
@@ -1034,147 +1008,143 @@ const B = (e, t = 255) => Ke(e) ? "" : re(e).split(/(\s+)/).filter((n) => be(n))
1034
1008
  return t.type === "click";
1035
1009
  }
1036
1010
  };
1037
- function Mn(e) {
1038
- if (Nn(In(e), "ph-include"))
1011
+ function kn(e) {
1012
+ if (wn(On(e), "ph-include"))
1039
1013
  return !0;
1040
1014
  const t = e.type || "";
1041
- if (ne(t))
1015
+ if (Q(t))
1042
1016
  switch (t.toLowerCase()) {
1043
1017
  case "hidden":
1044
1018
  return !1;
1045
1019
  case "password":
1046
1020
  return !1;
1047
1021
  }
1048
- const n = e.name || (e == null ? void 0 : e.id) || "";
1049
- return !(ne(n) && /^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g, "")));
1022
+ const n = e.name || e?.id || "";
1023
+ return !(Q(n) && /^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g, "")));
1050
1024
  }
1051
- const Qe = "(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})", $n = new RegExp(`^(?:${Qe})$`), Wn = new RegExp(Qe), et = "\\d{3}-?\\d{2}-?\\d{4}", Bn = new RegExp(`^(${et})$`), Fn = new RegExp(`(${et})`), be = (e, t = !0) => !(Ke(e) || ne(e) && (e = re(e), (t ? $n : Wn).test((e || "").replace(/[- ]/g, "")) || (t ? Bn : Fn).test(e))), Un = (e) => ne(e) ? e.substring(0, 10) === "_ngcontent" || e.substring(0, 7) === "_nghost" : !1, Yn = (e) => {
1052
- let t = pe(e);
1053
- return t = `${t} ${tt(e)}`.trim(), be(t) ? t : "";
1025
+ const Ve = "(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})", Sn = new RegExp(`^(?:${Ve})$`), Cn = new RegExp(Ve), Ge = "\\d{3}-?\\d{2}-?\\d{4}", Rn = new RegExp(`^(${Ge})$`), Pn = new RegExp(`(${Ge})`), de = (e, t = !0) => !(ze(e) || Q(e) && (e = ee(e), (t ? Sn : Cn).test((e || "").replace(/[- ]/g, "")) || (t ? Rn : Pn).test(e))), Ln = (e) => Q(e) ? e.substring(0, 10) === "_ngcontent" || e.substring(0, 7) === "_nghost" : !1, An = (e) => {
1026
+ let t = ue(e);
1027
+ return t = `${t} ${Je(e)}`.trim(), de(t) ? t : "";
1054
1028
  };
1055
- function tt(e) {
1056
- var n;
1029
+ function Je(e) {
1057
1030
  let t = "";
1058
- if (e != null && e.childNodes.length) {
1059
- for (const r of e.childNodes)
1060
- if (r && ((n = r.tagName) == null ? void 0 : n.toLowerCase()) === "span")
1031
+ if (e?.childNodes.length) {
1032
+ for (const n of e.childNodes)
1033
+ if (n && n.tagName?.toLowerCase() === "span")
1061
1034
  try {
1062
- const o = pe(r);
1063
- t = `${t} ${o}`.trim(), r != null && r.childNodes.length && (t = `${t} ${tt(r)}`.trim());
1035
+ const r = ue(n);
1036
+ t = `${t} ${r}`.trim(), n?.childNodes.length && (t = `${t} ${Je(n)}`.trim());
1064
1037
  } catch {
1065
1038
  }
1066
1039
  }
1067
1040
  return t;
1068
1041
  }
1069
- const zn = ["input", "textarea", "select"], nt = (e) => {
1070
- var o, s, c, a;
1071
- const t = (o = e == null ? void 0 : e.tagName) == null ? void 0 : o.toLowerCase(), n = {
1042
+ const In = ["input", "textarea", "select"], Xe = (e) => {
1043
+ const t = e?.tagName?.toLowerCase(), n = {
1072
1044
  element: t
1073
1045
  };
1074
- (t == null ? void 0 : t.toLowerCase()) === "a" || (t == null ? void 0 : t.toLowerCase()) === "button" ? n.text = Yn(e) : n.text = pe(e);
1046
+ t?.toLowerCase() === "a" || t?.toLowerCase() === "button" ? n.text = An(e) : n.text = ue(e);
1075
1047
  const r = Array.from(e.attributes).reduce(
1076
- (u, l) => {
1077
- if (be(l.value) && !Un(l.name)) {
1078
- if (l.name === "class")
1079
- return u;
1080
- u[l.name] = typeof (l == null ? void 0 : l.value) == "string" ? B(l.value) : l.value;
1048
+ (o, i) => {
1049
+ if (de(i.value) && !Ln(i.name)) {
1050
+ if (i.name === "class")
1051
+ return o;
1052
+ o[i.name] = typeof i?.value == "string" ? D(i.value) : i.value;
1081
1053
  }
1082
- return u;
1054
+ return o;
1083
1055
  },
1084
1056
  {}
1085
1057
  );
1086
- if (n.attributes = r, zn.includes(t) || (e == null ? void 0 : e.getAttribute("contenteditable")) === "true") {
1087
- let u;
1088
- e.matches('input[type="checkbox"], input[type="radio"]') ? u = e.checked : e.matches("input, select, textarea") && !e.matches('input[type="password"]') && (u = e.value), u !== void 0 && (n.value = typeof u == "string" || u === null ? B(u, 1024) : u);
1089
- let l = "";
1090
- n != null && n.attributes.id && (l = B(
1091
- ((c = (s = document.querySelector(`label[for="${n == null ? void 0 : n.attributes.id}"]`)) == null ? void 0 : s.textContent) == null ? void 0 : c.trim()) || ""
1058
+ if (n.attributes = r, In.includes(t) || e?.getAttribute("contenteditable") === "true") {
1059
+ let o;
1060
+ e.matches('input[type="checkbox"], input[type="radio"]') ? o = e.checked : e.matches("input, select, textarea") && !e.matches('input[type="password"]') && (o = e.value), o !== void 0 && (n.value = typeof o == "string" || o === null ? D(o, 1024) : o);
1061
+ let i = "";
1062
+ n?.attributes.id && (i = D(
1063
+ document.querySelector(`label[for="${n?.attributes.id}"]`)?.textContent?.trim() || ""
1092
1064
  ));
1093
- const f = e.closest("label");
1094
- l || (l = B(((a = f == null ? void 0 : f.textContent) == null ? void 0 : a.trim()) || "")), l && (n.label = l);
1065
+ const a = e.closest("label");
1066
+ i || (i = D(a?.textContent?.trim() || "")), i && (n.label = i);
1095
1067
  }
1096
1068
  return n;
1097
- }, Hn = (e, t) => {
1098
- var o;
1099
- let n = An(e);
1100
- Ze(n) && (n = n.parentNode || null);
1069
+ }, Dn = (e, t) => {
1070
+ let n = jn(e);
1071
+ He(n) && (n = n.parentNode || null);
1101
1072
  const r = ["copy", "cut"].includes(t);
1102
- if (n && (r || Dn(n, e))) {
1103
- const s = nt(n);
1073
+ if (n && (r || Nn(n, e))) {
1074
+ const o = Xe(n);
1104
1075
  if (r) {
1105
- const c = B((o = window == null ? void 0 : window.getSelection()) == null ? void 0 : o.toString()), a = (e == null ? void 0 : e.type) || "clipboard";
1106
- s.copy_text = c ?? "", s.copy_type = a;
1076
+ const i = D(window?.getSelection()?.toString()), a = e?.type || "clipboard";
1077
+ o.copy_text = i ?? "", o.copy_type = a;
1107
1078
  }
1108
- return s;
1079
+ return o;
1109
1080
  }
1110
1081
  return null;
1111
- }, Vn = 30, Gn = 1e3, Jn = 3;
1112
- class Xn {
1082
+ }, $n = 30, Mn = 1e3, Bn = 3;
1083
+ class Wn {
1084
+ clicks;
1113
1085
  constructor() {
1114
- J(this, "clicks");
1115
1086
  this.clicks = [];
1116
1087
  }
1117
1088
  isRageClick(t, n, r) {
1118
1089
  const o = this.clicks[this.clicks.length - 1];
1119
- if (o && Math.abs(t - o.x) + Math.abs(n - o.y) < Vn && r - o.timestamp < Gn) {
1120
- if (this.clicks.push({ x: t, y: n, timestamp: r }), this.clicks.length === Jn)
1090
+ if (o && Math.abs(t - o.x) + Math.abs(n - o.y) < $n && r - o.timestamp < Mn) {
1091
+ if (this.clicks.push({ x: t, y: n, timestamp: r }), this.clicks.length === Bn)
1121
1092
  return !0;
1122
1093
  } else
1123
1094
  this.clicks = [{ x: t, y: n, timestamp: r }];
1124
1095
  return !1;
1125
1096
  }
1126
1097
  }
1127
- const de = new Xn(), qn = () => {
1128
- const { audience: e } = L();
1129
- b(() => {
1098
+ const Fn = new Wn(), Un = () => {
1099
+ const { audience: e } = R();
1100
+ x(() => {
1130
1101
  let t = null;
1131
- const n = (s) => {
1102
+ const n = (i) => {
1132
1103
  if (t) {
1133
1104
  clearTimeout(t), t = null;
1134
1105
  return;
1135
1106
  }
1136
1107
  t = setTimeout(() => {
1137
- o(s, !1), t = null;
1108
+ o(i, !1), t = null;
1138
1109
  }, 250);
1139
- }, r = (s) => {
1140
- t && (clearTimeout(t), t = null), o(s, !0);
1141
- }, o = (s, c = !1) => {
1142
- var a;
1110
+ }, r = (i) => {
1111
+ t && (clearTimeout(t), t = null), o(i, !0);
1112
+ }, o = (i, a = !1) => {
1143
1113
  try {
1144
- let u = {
1114
+ let c = {
1145
1115
  hostname: window.location.hostname,
1146
1116
  pathname: window.location.pathname,
1147
1117
  page_title: document.title,
1148
1118
  url: window.location.href,
1149
1119
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
1150
- event_type: c ? "dblclick" : "click",
1151
- button_type: s.button
1120
+ event_type: a ? "dblclick" : "click",
1121
+ button_type: i.button
1152
1122
  };
1153
- if (s.target instanceof HTMLElement) {
1154
- const l = s.target;
1155
- u.rage_click = de == null ? void 0 : de.isRageClick(
1156
- s.clientX,
1157
- s.clientY,
1123
+ if (i.target instanceof HTMLElement) {
1124
+ const l = i.target;
1125
+ c.rage_click = Fn?.isRageClick(
1126
+ i.clientX,
1127
+ i.clientY,
1158
1128
  (/* @__PURE__ */ new Date()).getTime()
1159
- ), u = {
1160
- ...u,
1161
- ...nt(l)
1129
+ ), c = {
1130
+ ...c,
1131
+ ...Xe(l)
1162
1132
  };
1163
- let f = l == null ? void 0 : l.getAttribute("href");
1164
- if (!f) {
1165
- let d = l.parentNode, m = 0;
1166
- for (; d && m < 8; ) {
1167
- const v = (a = d == null ? void 0 : d.parentElement) == null ? void 0 : a.getAttribute("href");
1168
- if (v) {
1169
- f = v;
1133
+ let g = l?.getAttribute("href");
1134
+ if (!g) {
1135
+ let m = l.parentNode, f = 0;
1136
+ for (; m && f < 8; ) {
1137
+ const E = m?.parentElement?.getAttribute("href");
1138
+ if (E) {
1139
+ g = E;
1170
1140
  break;
1171
1141
  }
1172
- d = d.parentNode, m++;
1142
+ m = m.parentNode, f++;
1173
1143
  }
1174
1144
  }
1175
- e == null || e.track("page.click", {
1176
- ...u,
1177
- href: f || void 0
1145
+ e?.track("page.click", {
1146
+ ...c,
1147
+ href: g || void 0
1178
1148
  });
1179
1149
  }
1180
1150
  } catch {
@@ -1184,61 +1154,18 @@ const de = new Xn(), qn = () => {
1184
1154
  document.removeEventListener("click", n), document.removeEventListener("dblclick", r);
1185
1155
  };
1186
1156
  }, [e]);
1187
- }, Z = (e) => Number(e.toFixed(0)), Kn = (e) => {
1188
- const { audience: t } = L(), [n] = x({
1189
- value: Z(performance.now()),
1190
- timestamp: Z(Date.now())
1191
- }), [r, o] = x({
1192
- value: null,
1193
- timestamp: null
1194
- }), [s, c] = x({
1195
- value: null,
1196
- timestamp: null
1197
- });
1198
- return b(() => {
1199
- let a = !0;
1200
- const u = (d, m) => {
1201
- a && d({ value: Z(m), timestamp: Z(Date.now()) });
1202
- }, l = new PerformanceObserver((d) => {
1203
- for (const m of d.getEntries())
1204
- m.name === "first-contentful-paint" && u(o, m.startTime);
1205
- });
1206
- l.observe({ type: "paint", buffered: !0 });
1207
- const f = () => u(c, performance.now());
1208
- return document.readyState === "complete" ? u(c, performance.now()) : window.addEventListener("load", f), () => {
1209
- a = !1, l.disconnect(), window.removeEventListener("load", f);
1210
- };
1211
- }, []), b(() => {
1212
- n && t && (t == null || t.track("page.metrics", {
1213
- script_load: n.value,
1214
- script_load_at: n.timestamp,
1215
- version: 2
1216
- }));
1217
- }, [n, t]), b(() => {
1218
- r.value !== null && t && (t == null || t.track("page.metrics", {
1219
- first_contentful_paint: r.value,
1220
- first_contentful_paint_at: r.timestamp,
1221
- version: 2
1222
- }));
1223
- }, [r, t]), b(() => {
1224
- s.value !== null && t && (t == null || t.track("page.metrics", {
1225
- window_onload: s.value,
1226
- window_onload_at: s.timestamp,
1227
- version: 2
1228
- }));
1229
- }, [s, t]), { script: n, fcp: r, window_onload: s };
1230
- }, Zn = () => {
1231
- const { audience: e } = L();
1232
- b(() => {
1157
+ }, Yn = () => {
1158
+ const { audience: e } = R();
1159
+ x(() => {
1233
1160
  let t;
1234
1161
  const n = () => {
1235
1162
  clearTimeout(t), t = setTimeout(() => {
1236
1163
  const r = window.getSelection();
1237
- if (r && (r == null ? void 0 : r.rangeCount) > 0) {
1238
- const o = r == null ? void 0 : r.toString();
1239
- o && (e == null || e.track("page.selection", {
1240
- text: B(o)
1241
- }));
1164
+ if (r && r?.rangeCount > 0) {
1165
+ const o = r?.toString();
1166
+ o && e?.track("page.selection", {
1167
+ text: D(o)
1168
+ });
1242
1169
  }
1243
1170
  }, 1e3);
1244
1171
  };
@@ -1246,166 +1173,105 @@ const de = new Xn(), qn = () => {
1246
1173
  clearTimeout(t), document.removeEventListener("selectionchange", n);
1247
1174
  };
1248
1175
  }, []);
1249
- }, Re = "lv_insights_st", Qn = 15 * 60 * 1e3, er = (e = "https://cachefly.cachefly.net/1mb.test") => {
1250
- const [t, n] = x(null);
1251
- return b(() => {
1252
- const r = localStorage.getItem(Re);
1253
- if (r) {
1254
- const { speed: a, timestamp: u } = JSON.parse(r);
1255
- if (Date.now() - u < Qn) {
1256
- n(a);
1257
- return;
1258
- }
1259
- }
1260
- let o = null;
1261
- const s = async () => {
1262
- const a = new dt("download_speed");
1263
- if (a.acquireLock())
1264
- try {
1265
- const l = performance.now();
1266
- await fetch(e, { cache: "no-store" });
1267
- const d = (performance.now() - l) / 1e3, m = Math.round(8 / d);
1268
- n(m), localStorage.setItem(
1269
- Re,
1270
- JSON.stringify({ speed: m, timestamp: Date.now() })
1271
- );
1272
- } catch {
1273
- } finally {
1274
- a.releaseLock();
1275
- }
1276
- }, c = () => {
1277
- document.removeEventListener("mousemove", c), document.removeEventListener("keydown", c), document.removeEventListener("scroll", c), o = setTimeout(s, 5e3);
1278
- };
1279
- return document.addEventListener("mousemove", c, { once: !0 }), document.addEventListener("keydown", c, { once: !0 }), document.addEventListener("scroll", c, { once: !0 }), () => {
1280
- o && clearTimeout(o), document.removeEventListener("mousemove", c), document.removeEventListener("keydown", c), document.removeEventListener("scroll", c);
1281
- };
1282
- }, [e]), t;
1283
- }, tr = ({
1176
+ }, zn = ({
1284
1177
  id: e,
1285
1178
  properties: t = {},
1286
1179
  href: n
1287
1180
  }) => {
1288
- const r = L();
1289
- b(() => {
1181
+ const r = R();
1182
+ x(() => {
1290
1183
  (() => {
1291
- var s, c;
1292
- r != null && r.insightsUrl && r.workspace && n && ((s = r == null ? void 0 : r.audience) != null && s.instance ? r == null || r.audience.instance.page({
1184
+ r?.insightsUrl && r.workspace && n && (r?.audience?.instance ? r?.audience.instance.page({
1293
1185
  resource: "page",
1294
1186
  identifier: e
1295
- }) : (c = r == null ? void 0 : r.audience) == null || c.initiate({
1187
+ }) : r?.audience?.initiate({
1296
1188
  ...t,
1297
1189
  id: e,
1298
1190
  created_at: (/* @__PURE__ */ new Date()).toISOString()
1299
1191
  }));
1300
1192
  })();
1301
- }, [r == null ? void 0 : r.insightsUrl, r == null ? void 0 : r.workspace, n]), b(() => {
1302
- const o = (s) => {
1303
- var a;
1304
- const c = localStorage.getItem(
1305
- r.audience.storage_keys.identify
1306
- );
1307
- s.key === r.audience.storage_keys.identify && !(r != null && r.audience.is_identified) && !c && ((a = r == null ? void 0 : r.audience) == null || a.identify({
1308
- withLock: !1
1309
- }));
1310
- };
1311
- return window.addEventListener("storage", o), () => {
1312
- window.removeEventListener("storage", o);
1313
- };
1314
- }, []);
1315
- }, nr = ({ id: e }) => {
1316
- const t = L();
1317
- b(() => {
1193
+ }, [r?.insightsUrl, r?.workspace, n]);
1194
+ }, Hn = ({ id: e }) => {
1195
+ const t = R();
1196
+ x(() => {
1318
1197
  const r = () => {
1319
- var c, a;
1320
- const o = (c = performance.getEntriesByType(
1198
+ const o = performance.getEntriesByType(
1321
1199
  "navigation"
1322
- )) == null ? void 0 : c[0];
1323
- let s = !1;
1200
+ )?.[0];
1201
+ let i = !1;
1324
1202
  if (o)
1325
- o.type === "navigate" && (s = !0);
1203
+ o.type === "navigate" && (i = !0);
1326
1204
  else
1327
1205
  try {
1328
- const u = document.activeElement;
1329
- (u == null ? void 0 : u.tagName) === "A" && u.href && (new URL(u.href).origin !== window.location.origin ? s = !0 : s = !1);
1206
+ const a = document.activeElement;
1207
+ a?.tagName === "A" && a.href && (new URL(a.href).origin !== window.location.origin ? i = !0 : i = !1);
1330
1208
  } catch {
1331
1209
  }
1332
- (a = t == null ? void 0 : t.audience) == null || a.bounce({
1210
+ t?.audience?.bounce({
1333
1211
  resource: "page",
1334
1212
  identifier: e,
1335
- is_navigating_away: s,
1336
- navigation_type: o == null ? void 0 : o.type
1213
+ is_navigating_away: i,
1214
+ navigation_type: o?.type
1337
1215
  });
1338
1216
  };
1339
1217
  return window.addEventListener("beforeunload", r), () => {
1340
1218
  window.removeEventListener("beforeunload", r);
1341
1219
  };
1342
- }, [t == null ? void 0 : t.audience, e]);
1343
- const [n] = ft();
1344
- b(() => {
1345
- var r;
1346
- (n === ue.HIDDEN || n === ue.UNKNOWN || n === ue.FROZEN) && ((r = t == null ? void 0 : t.audience) == null || r.bounce({
1220
+ }, [t?.audience, e]);
1221
+ const [n] = rt();
1222
+ x(() => {
1223
+ (n === se.HIDDEN || n === se.UNKNOWN || n === se.FROZEN) && t?.audience?.bounce({
1347
1224
  resource: "page",
1348
1225
  identifier: e,
1349
1226
  state: n
1350
- }));
1351
- }, [n, t == null ? void 0 : t.audience, e]);
1352
- }, Dr = ({ id: e, properties: t = {} }) => {
1353
- var c;
1354
- const n = typeof window < "u" ? window.location.href : "", r = L();
1355
- b(() => {
1227
+ });
1228
+ }, [n, t?.audience, e]);
1229
+ }, _r = ({ id: e, properties: t = {} }) => {
1230
+ const n = typeof window < "u" ? window.location.href : "", r = R();
1231
+ x(() => {
1356
1232
  r && typeof window < "u" && (window.levo_client = r);
1357
- }, [r]), b(() => {
1358
- r != null && r.audience && typeof window < "u" && (window.levo_audience = r == null ? void 0 : r.audience);
1359
- }, []), On(), jn(), qn();
1360
- const o = er();
1361
- b(() => {
1362
- var a;
1363
- (a = r == null ? void 0 : r.audience) != null && a.instance && o && (r == null || r.audience.track("user.speedtest", {
1364
- speed: o,
1365
- unit: "Mbps"
1366
- }));
1367
- }, [o]);
1368
- const s = Sn();
1369
- return b(() => {
1370
- var a;
1371
- (a = r == null ? void 0 : r.audience) != null && a.instance && (r == null || r.audience.track("page.scroll", {
1233
+ }, [r]), x(() => {
1234
+ r?.audience && typeof window < "u" && (window.levo_audience = r?.audience);
1235
+ }, []), vn(), yn(), Un();
1236
+ const o = hn();
1237
+ return x(() => {
1238
+ r?.audience?.instance && r?.audience.track("page.scroll", {
1372
1239
  resource: "page",
1373
1240
  identifier: e,
1374
- percent: s.depth,
1375
- speed_category: s.speedCategory
1376
- }));
1241
+ percent: o.depth,
1242
+ speed_category: o.speedCategory
1243
+ });
1377
1244
  }, [
1378
- (c = r == null ? void 0 : r.audience) == null ? void 0 : c.instance,
1379
- s.depth,
1380
- s.speedCategory,
1245
+ r?.audience?.instance,
1246
+ o.depth,
1247
+ o.speedCategory,
1381
1248
  e
1382
- ]), Kn(), Zn(), tr({
1249
+ ]), Yn(), zn({
1383
1250
  href: n,
1384
1251
  id: e,
1385
1252
  properties: t
1386
- }), nr({ id: e }), b(() => {
1387
- const a = {
1253
+ }), Hn({ id: e }), x(() => {
1254
+ const i = {
1388
1255
  change: "form.change",
1389
1256
  submit: "form.submit",
1390
1257
  copy: "page.copy",
1391
1258
  cut: "page.copy"
1392
- }, u = (f) => (d) => {
1393
- var v;
1394
- const m = Hn(d, f);
1395
- m && a[f] && ((v = r == null ? void 0 : r.audience) == null || v.track(a[f], m));
1396
- }, l = {
1397
- change: u("change"),
1398
- copy: u("copy"),
1399
- cut: u("cut"),
1400
- submit: u("submit")
1259
+ }, a = (l) => (g) => {
1260
+ const m = Dn(g, l);
1261
+ m && i[l] && r?.audience?.track(i[l], m);
1262
+ }, c = {
1263
+ change: a("change"),
1264
+ copy: a("copy"),
1265
+ cut: a("cut"),
1266
+ submit: a("submit")
1401
1267
  };
1402
- return document.addEventListener("change", l.change), document.addEventListener("copy", l.copy), document.addEventListener("cut", l.cut), document.addEventListener("submit", l.submit), () => {
1403
- document.removeEventListener("change", l.change), document.removeEventListener("copy", l.copy), document.removeEventListener("cut", l.cut), document.removeEventListener("submit", l.submit);
1268
+ return document.addEventListener("change", c.change), document.addEventListener("copy", c.copy), document.addEventListener("cut", c.cut), document.addEventListener("submit", c.submit), () => {
1269
+ document.removeEventListener("change", c.change), document.removeEventListener("copy", c.copy), document.removeEventListener("cut", c.cut), document.removeEventListener("submit", c.submit);
1404
1270
  };
1405
- }, []), (!(r != null && r.insightsUrl) || !r.workspace || !r.workspace.startsWith("W")) && console.error(
1271
+ }, []), (!r?.insightsUrl || !r.workspace || !r.workspace.startsWith("W")) && console.error(
1406
1272
  "[@levo-so/react] The utility could not be initialized, due to missing workspace, or endpoint for insights."
1407
1273
  ), null;
1408
- }, rt = A.createContext({
1274
+ }, qe = L.createContext({
1409
1275
  urls: null,
1410
1276
  title: "",
1411
1277
  isLoading: !1,
@@ -1413,68 +1279,67 @@ const de = new Xn(), qn = () => {
1413
1279
  },
1414
1280
  onError: () => {
1415
1281
  }
1416
- }), rr = ({
1282
+ }), Vn = ({
1417
1283
  title: e,
1418
1284
  onSuccess: t,
1419
1285
  onError: n,
1420
1286
  children: r
1421
1287
  }) => {
1422
- const o = L(), s = typeof window < "u" ? window.location.href : "", [c, a] = x(null), [u, l] = x(!1);
1423
- b(() => {
1424
- var d;
1425
- o.membership && (l(!0), (d = o.membership) == null || d.getOAuthURL().then((m) => {
1426
- a(m);
1427
- }).catch((m) => {
1288
+ const o = R(), i = typeof window < "u" ? window.location.href : "", [a, c] = O(null), [l, g] = O(!1);
1289
+ x(() => {
1290
+ o.membership && (g(!0), o.membership?.getOAuthURL().then((f) => {
1291
+ c(f);
1292
+ }).catch((f) => {
1428
1293
  n({
1429
- code: (m == null ? void 0 : m.code) || "SOMETHING_WENT_WRONG",
1430
- message: (m == null ? void 0 : m.message) || "We could not connect with our service for your sign-in."
1294
+ code: f?.code || "SOMETHING_WENT_WRONG",
1295
+ message: f?.message || "We could not connect with our service for your sign-in."
1431
1296
  });
1432
1297
  }).finally(() => {
1433
- l(!1);
1298
+ g(!1);
1434
1299
  }));
1435
1300
  }, []);
1436
- const f = Ie(
1437
- () => ({ title: e, urls: c, isLoading: u, onSuccess: t, onError: n }),
1438
- [e, c, t, n, u]
1301
+ const m = Ne(
1302
+ () => ({ title: e, urls: a, isLoading: l, onSuccess: t, onError: n }),
1303
+ [e, a, t, n, l]
1439
1304
  );
1440
- return b(() => {
1441
- if (c && s) {
1442
- const d = {}, m = Object.keys(c);
1443
- for (const v of m)
1305
+ return x(() => {
1306
+ if (a && i) {
1307
+ const f = {}, E = Object.keys(a);
1308
+ for (const v of E)
1444
1309
  try {
1445
- const _ = c[v];
1310
+ const _ = a[v];
1446
1311
  if (_) {
1447
- const S = new URL(_), N = S.searchParams;
1448
- N.set("redirect_uri", s);
1449
- const C = o.pageContext;
1450
- C && N.set("page_context", JSON.stringify(C)), d[v] = S.toString();
1312
+ const k = new URL(_), j = k.searchParams;
1313
+ j.set("redirect_uri", i);
1314
+ const S = o.pageContext;
1315
+ S && j.set("page_context", JSON.stringify(S)), f[v] = k.toString();
1451
1316
  }
1452
1317
  } catch {
1453
1318
  }
1454
- a(d);
1319
+ c(f);
1455
1320
  }
1456
- }, [s]), /* @__PURE__ */ p.jsx(rt.Provider, { value: f, children: r });
1457
- }, or = () => Pe(rt), sr = ({ url: e, title: t, height: n, width: r }) => {
1458
- const o = window.screenX + (window.outerWidth - r) / 2, s = window.screenY + (window.outerHeight - n) / 2.5;
1321
+ }, [i]), /* @__PURE__ */ d.jsx(qe.Provider, { value: m, children: r });
1322
+ }, Gn = () => je(qe), Jn = ({ url: e, title: t, height: n, width: r }) => {
1323
+ const o = window.screenX + (window.outerWidth - r) / 2, i = window.screenY + (window.outerHeight - n) / 2.5;
1459
1324
  return window.open(
1460
1325
  e,
1461
1326
  t,
1462
- `width=${r},height=${n},left=${o},top=${s}`
1327
+ `width=${r},height=${n},left=${o},top=${i}`
1463
1328
  );
1464
- }, ir = ({
1329
+ }, Xn = ({
1465
1330
  title: e = "",
1466
1331
  width: t = 500,
1467
1332
  height: n = 500,
1468
1333
  url: r,
1469
1334
  children: o,
1470
- onCode: s,
1471
- onClose: c
1335
+ onCode: i,
1336
+ onClose: a
1472
1337
  }) => {
1473
- const [a, u] = x(), l = Ae(void 0), f = () => {
1474
- window.clearInterval(l.current);
1475
- }, d = () => {
1476
- u(
1477
- sr({
1338
+ const [c, l] = O(), g = ke(void 0), m = () => {
1339
+ window.clearInterval(g.current);
1340
+ }, f = () => {
1341
+ l(
1342
+ Jn({
1478
1343
  url: r,
1479
1344
  title: e,
1480
1345
  width: t,
@@ -1482,119 +1347,117 @@ const de = new Xn(), qn = () => {
1482
1347
  })
1483
1348
  );
1484
1349
  };
1485
- return b(() => (a && (l.current = window.setInterval(() => {
1350
+ return x(() => (c && (g.current = window.setInterval(() => {
1486
1351
  try {
1487
- const m = a.location.href, v = new URL(m).searchParams, _ = v.get("code");
1352
+ const E = c.location.href, v = new URL(E).searchParams, _ = v.get("code");
1488
1353
  if (!_)
1489
1354
  return;
1490
- s(_, v), f(), a.close();
1355
+ i(_, v), m(), c.close();
1491
1356
  } catch {
1492
1357
  } finally {
1493
- (!a || a.closed) && (c(), f());
1358
+ (!c || c.closed) && (a(), m());
1494
1359
  }
1495
1360
  }, 700)), () => {
1496
- a && a.close(), c && c();
1497
- }), [a]), /* @__PURE__ */ p.jsx(
1361
+ c && c.close(), a && a();
1362
+ }), [c]), /* @__PURE__ */ d.jsx(
1498
1363
  "div",
1499
1364
  {
1500
1365
  onClick: () => {
1501
- d();
1366
+ f();
1502
1367
  },
1503
1368
  children: o
1504
1369
  }
1505
1370
  );
1506
- }, ar = ({
1371
+ }, qn = ({
1507
1372
  title: e = "Levo",
1508
1373
  url: t,
1509
1374
  children: n,
1510
1375
  onSuccess: r,
1511
1376
  onError: o,
1512
- width: s = 500,
1513
- height: c = 700
1377
+ width: i = 500,
1378
+ height: a = 700
1514
1379
  }) => {
1515
- const a = fe((u, l) => {
1516
- u.toLowerCase() === "success" ? r(l) : o(l);
1380
+ const c = ae((l, g) => {
1381
+ l.toLowerCase() === "success" ? r(g) : o(g);
1517
1382
  }, []);
1518
- return /* @__PURE__ */ p.jsx(
1519
- ir,
1383
+ return /* @__PURE__ */ d.jsx(
1384
+ Xn,
1520
1385
  {
1521
1386
  title: e,
1522
- width: s,
1523
- height: c,
1387
+ width: i,
1388
+ height: a,
1524
1389
  onClose: () => {
1525
1390
  },
1526
1391
  url: t,
1527
- onCode: a,
1392
+ onCode: c,
1528
1393
  children: n
1529
1394
  }
1530
1395
  );
1531
- }, cr = ({ children: e, provider: t }) => {
1532
- const { title: n, urls: r, isLoading: o, onSuccess: s, onError: c } = or(), a = r == null ? void 0 : r[t];
1533
- return a ? /* @__PURE__ */ p.jsx(
1534
- ar,
1396
+ }, Kn = ({ children: e, provider: t }) => {
1397
+ const { title: n, urls: r, isLoading: o, onSuccess: i, onError: a } = Gn(), c = r?.[t];
1398
+ return c ? /* @__PURE__ */ d.jsx(
1399
+ qn,
1535
1400
  {
1536
1401
  title: n,
1537
1402
  provider: t,
1538
- url: a,
1539
- onSuccess: s,
1540
- onError: c,
1541
- children: o ? /* @__PURE__ */ p.jsx("div", { className: "w-full items-center justify-center", children: /* @__PURE__ */ p.jsx(Ut, { className: "bg-brand h-5 w-5" }) }) : e
1403
+ url: c,
1404
+ onSuccess: i,
1405
+ onError: a,
1406
+ children: o ? /* @__PURE__ */ d.jsx("div", { className: "w-full items-center justify-center", children: /* @__PURE__ */ d.jsx(Lt, { className: "bg-brand h-5 w-5" }) }) : e
1542
1407
  }
1543
1408
  ) : null;
1544
- }, ur = ({ url: e, title: t, height: n, width: r }) => {
1545
- const o = window.screenX + (window.outerWidth - r) / 2, s = window.screenY + (window.outerHeight - n) / 2.5;
1409
+ }, Zn = ({ url: e, title: t, height: n, width: r }) => {
1410
+ const o = window.screenX + (window.outerWidth - r) / 2, i = window.screenY + (window.outerHeight - n) / 2.5;
1546
1411
  return window.open(
1547
1412
  e,
1548
1413
  t,
1549
- `width=${r},height=${n},left=${o},top=${s}`
1414
+ `width=${r},height=${n},left=${o},top=${i}`
1550
1415
  );
1551
- }, Mr = ({
1416
+ }, Or = ({
1552
1417
  title: e = "Levo",
1553
1418
  width: t = 500,
1554
1419
  height: n = 700,
1555
1420
  onSuccess: r
1556
1421
  }) => {
1557
- const o = L(), [s, c] = x(!1), [a, u] = x(null), [l, f] = x(null), [d, m] = x(), v = Ae(void 0), _ = () => {
1422
+ const o = R(), [i, a] = O(!1), [c, l] = O(null), [g, m] = O(null), [f, E] = O(), v = ke(void 0), _ = () => {
1558
1423
  window.clearInterval(v.current);
1559
- }, S = fe((T, y) => {
1560
- T.toLowerCase() === "success" ? (f(null), r(y)) : f(y);
1424
+ }, k = ae((h, T) => {
1425
+ h.toLowerCase() === "success" ? (m(null), r(T)) : m(T);
1561
1426
  }, []);
1562
- b(() => {
1563
- var T;
1564
- o.membership && (c(!0), (T = o.membership) == null || T.getOAuthURL().then((y) => {
1565
- if (y)
1566
- return u(y), y;
1427
+ x(() => {
1428
+ o.membership && (a(!0), o.membership?.getOAuthURL().then((h) => {
1429
+ if (h)
1430
+ return l(h), h;
1567
1431
  throw new Error();
1568
- }).catch((y) => {
1569
- var M;
1570
- const O = Me(y);
1571
- (M = o.logger) == null || M.error("Failed to get OAuth URL", O.message), f({
1572
- code: (O == null ? void 0 : O.code) || "SOMETHING_WENT_WRONG",
1573
- message: (O == null ? void 0 : O.message) || "We could not connect with our service for your sign-in."
1432
+ }).catch((h) => {
1433
+ const T = Ce(h);
1434
+ o.logger?.error("Failed to get OAuth URL", T.message), m({
1435
+ code: T?.code || "SOMETHING_WENT_WRONG",
1436
+ message: T?.message || "We could not connect with our service for your sign-in."
1574
1437
  });
1575
1438
  }).finally(() => {
1576
- c(!1);
1439
+ a(!1);
1577
1440
  }));
1578
- }, []), b(() => (d && (v.current = window.setInterval(() => {
1441
+ }, []), x(() => (f && (v.current = window.setInterval(() => {
1579
1442
  try {
1580
- const T = d.location.href, y = new URL(T).searchParams, O = y.get("code");
1581
- if (!O)
1443
+ const h = f.location.href, T = new URL(h).searchParams, M = T.get("code");
1444
+ if (!M)
1582
1445
  return;
1583
- S(O, y), _(), d.close();
1446
+ k(M, T), _(), f.close();
1584
1447
  } catch {
1585
1448
  } finally {
1586
- (!d || d.closed) && (_(), f(null));
1449
+ (!f || f.closed) && (_(), m(null));
1587
1450
  }
1588
1451
  }, 700)), () => {
1589
- d && d.close();
1590
- }), [d]);
1591
- const N = fe(
1592
- (T) => {
1593
- if (T && a !== null) {
1594
- const y = a == null ? void 0 : a[T];
1595
- y && (d && d.close(), m(
1596
- ur({
1597
- url: y,
1452
+ f && f.close();
1453
+ }), [f]);
1454
+ const j = ae(
1455
+ (h) => {
1456
+ if (h && c !== null) {
1457
+ const T = c?.[h];
1458
+ T && (f && f.close(), E(
1459
+ Zn({
1460
+ url: T,
1598
1461
  title: e,
1599
1462
  width: t,
1600
1463
  height: n
@@ -1602,74 +1465,75 @@ const de = new Xn(), qn = () => {
1602
1465
  ));
1603
1466
  }
1604
1467
  },
1605
- [a, d]
1468
+ [c, f]
1606
1469
  );
1607
1470
  return {
1608
- providers: Ie(() => a !== null ? Object.keys(a).filter(
1609
- (T) => !!a[T]
1610
- ) : [], [a]),
1611
- isLoading: s,
1612
- error: l,
1613
- launchPopup: N
1471
+ providers: Ne(() => c !== null ? Object.keys(c).filter(
1472
+ (h) => !!c[h]
1473
+ ) : [], [c]),
1474
+ isLoading: i,
1475
+ error: g,
1476
+ launchPopup: j
1614
1477
  };
1615
1478
  };
1616
- class Le {
1479
+ class jr {
1480
+ static Container = Vn;
1481
+ static Button = Kn;
1617
1482
  }
1618
- J(Le, "Container", rr), J(Le, "Button", cr);
1619
1483
  export {
1620
- Mt as Button,
1621
- $t as Dialog,
1622
- Er as DialogClose,
1623
- Ue as DialogContent,
1624
- He as DialogDescription,
1625
- Bt as DialogFooter,
1626
- Ye as DialogHeader,
1627
- Fe as DialogOverlay,
1628
- Wt as DialogPortal,
1629
- ze as DialogTitle,
1630
- Tr as DialogTrigger,
1631
- kr as DialogWrapper,
1632
- Ir as LevoInsightsBlock,
1633
- Ar as LevoInsightsComponent,
1634
- Dr as LevoInsightsPage,
1635
- Le as LevoOAuth,
1636
- Pr as LevoProvider,
1637
- Nr as SimpleTooltipWrapper,
1638
- Ut as Spinner,
1639
- Or as Tabs,
1640
- Ht as TabsContent,
1641
- Yt as TabsList,
1642
- zt as TabsTrigger,
1643
- _r as Toaster,
1644
- Vt as Tooltip,
1645
- Ve as TooltipContent,
1646
- Jt as TooltipPortal,
1647
- jr as TooltipProvider,
1648
- Gt as TooltipTrigger,
1649
- yr as allMediaFileExtensions,
1650
- xr as allMediaMimetypes,
1651
- yt as audioFileExtensions,
1652
- kt as audioMimetype,
1653
- Dt as buttonVariants,
1654
- Cr as byteToSize,
1655
- R as cn,
1656
- vt as documentFileExtensions,
1657
- xt as documentMimetype,
1658
- Rr as errorHandler,
1659
- Ft as errorToast,
1660
- ht as imageFileExtensions,
1661
- Tt as imageMimetype,
1662
- Xt as isDateObject,
1663
- Lr as isEmptyObject,
1664
- qt as isNullOrUndefined,
1665
- Zt as isObject,
1666
- Kt as isObjectType,
1667
- q as mediaExtensionsByKind,
1668
- X as mediaMimetypeByKind,
1669
- Sr as successToast,
1670
- Br as toast,
1671
- L as useLevo,
1672
- Mr as useLevoOAuth,
1673
- wt as videoFileExtensions,
1674
- Et as videoMimetype
1484
+ kt as Button,
1485
+ St as Dialog,
1486
+ dr as DialogClose,
1487
+ Ie as DialogContent,
1488
+ Me as DialogDescription,
1489
+ Rt as DialogFooter,
1490
+ De as DialogHeader,
1491
+ Ae as DialogOverlay,
1492
+ Ct as DialogPortal,
1493
+ $e as DialogTitle,
1494
+ ur as DialogTrigger,
1495
+ fr as DialogWrapper,
1496
+ Er as LevoInsightsBlock,
1497
+ Tr as LevoInsightsComponent,
1498
+ _r as LevoInsightsPage,
1499
+ jr as LevoOAuth,
1500
+ xr as LevoProvider,
1501
+ hr as SimpleTooltipWrapper,
1502
+ Lt as Spinner,
1503
+ pr as Tabs,
1504
+ Dt as TabsContent,
1505
+ At as TabsList,
1506
+ It as TabsTrigger,
1507
+ mr as Toaster,
1508
+ $t as Tooltip,
1509
+ Be as TooltipContent,
1510
+ Bt as TooltipPortal,
1511
+ br as TooltipProvider,
1512
+ Mt as TooltipTrigger,
1513
+ cr as allMediaFileExtensions,
1514
+ lr as allMediaMimetypes,
1515
+ dt as audioFileExtensions,
1516
+ pt as audioMimetype,
1517
+ Nt as buttonVariants,
1518
+ vr as byteToSize,
1519
+ C as cn,
1520
+ ct as documentFileExtensions,
1521
+ ft as documentMimetype,
1522
+ yr as errorHandler,
1523
+ Pt as errorToast,
1524
+ lt as imageFileExtensions,
1525
+ mt as imageMimetype,
1526
+ Wt as isDateObject,
1527
+ wr as isEmptyObject,
1528
+ Ft as isNullOrUndefined,
1529
+ Yt as isObject,
1530
+ Ut as isObjectType,
1531
+ J as mediaExtensionsByKind,
1532
+ G as mediaMimetypeByKind,
1533
+ gr as successToast,
1534
+ Sr as toast,
1535
+ R as useLevo,
1536
+ Or as useLevoOAuth,
1537
+ ut as videoFileExtensions,
1538
+ gt as videoMimetype
1675
1539
  };