@levo-so/react 0.1.71 → 0.1.76

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.
package/dist/index.js CHANGED
@@ -1,38 +1,38 @@
1
1
  "use client";
2
2
  import * as _ from "react";
3
3
  import R, { createContext as Le, useContext as K, useState as P, useEffect as O, useMemo as fe, useRef as me, useCallback as X } from "react";
4
- import { clsx as Ie } from "clsx";
4
+ import { clsx as De } from "clsx";
5
5
  import { twMerge as pe } from "tailwind-merge";
6
- import { Slot as De, Dialog as y, Tabs as k, Tooltip as A } from "radix-ui";
6
+ import { Slot as Ie, Dialog as y, Tabs as k, Tooltip as A } from "radix-ui";
7
7
  import { cva as $e } from "class-variance-authority";
8
- import { X as We } from "lucide-react";
9
- import { Toaster as Me, toast as q } from "sonner";
8
+ import { X as Me } from "lucide-react";
9
+ import { Toaster as We, toast as q } from "sonner";
10
10
  import { toast as nr } from "sonner";
11
11
  import { getLevoError as ge } from "@levo-so/core";
12
- var M = { exports: {} }, I = {};
12
+ var W = { exports: {} }, D = {};
13
13
  var ie;
14
14
  function Be() {
15
- if (ie) return I;
15
+ if (ie) return D;
16
16
  ie = 1;
17
17
  var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
18
  function r(n, s, a) {
19
- var l = null;
20
- if (a !== void 0 && (l = "" + a), s.key !== void 0 && (l = "" + s.key), "key" in s) {
19
+ var u = null;
20
+ if (a !== void 0 && (u = "" + a), s.key !== void 0 && (u = "" + s.key), "key" in s) {
21
21
  a = {};
22
- for (var u in s)
23
- u !== "key" && (a[u] = s[u]);
22
+ for (var i in s)
23
+ i !== "key" && (a[i] = s[i]);
24
24
  } else a = s;
25
25
  return s = a.ref, {
26
26
  $$typeof: e,
27
27
  type: n,
28
- key: l,
28
+ key: u,
29
29
  ref: s !== void 0 ? s : null,
30
30
  props: a
31
31
  };
32
32
  }
33
- return I.Fragment = t, I.jsx = r, I.jsxs = r, I;
33
+ return D.Fragment = t, D.jsx = r, D.jsxs = r, D;
34
34
  }
35
- var D = {};
35
+ var I = {};
36
36
  var ce;
37
37
  function Fe() {
38
38
  return ce || (ce = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -44,7 +44,7 @@ function Fe() {
44
44
  switch (o) {
45
45
  case N:
46
46
  return "Fragment";
47
- case h:
47
+ case b:
48
48
  return "Profiler";
49
49
  case L:
50
50
  return "StrictMode";
@@ -66,14 +66,14 @@ function Fe() {
66
66
  case x:
67
67
  return (o._context.displayName || "Context") + ".Consumer";
68
68
  case Re:
69
- var i = o.render;
70
- return o = o.displayName, o || (o = i.displayName || i.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
69
+ var c = o.render;
70
+ return o = o.displayName, o || (o = c.displayName || c.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
71
71
  case Pe:
72
- return i = o.displayName || null, i !== null ? i : e(o.type) || "Memo";
72
+ return c = o.displayName || null, c !== null ? c : e(o.type) || "Memo";
73
73
  case Y:
74
- i = o._payload, o = o._init;
74
+ c = o._payload, o = o._init;
75
75
  try {
76
- return e(o(i));
76
+ return e(o(c));
77
77
  } catch {
78
78
  }
79
79
  }
@@ -85,17 +85,17 @@ function Fe() {
85
85
  function r(o) {
86
86
  try {
87
87
  t(o);
88
- var i = !1;
88
+ var c = !1;
89
89
  } catch {
90
- i = !0;
90
+ c = !0;
91
91
  }
92
- if (i) {
93
- i = console;
94
- var m = i.error, g = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
95
- return m.call(
96
- i,
92
+ if (c) {
93
+ c = console;
94
+ var f = c.error, p = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
95
+ return f.call(
96
+ c,
97
97
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
98
- g
98
+ p
99
99
  ), t(o);
100
100
  }
101
101
  }
@@ -104,55 +104,55 @@ function Fe() {
104
104
  if (typeof o == "object" && o !== null && o.$$typeof === Y)
105
105
  return "<...>";
106
106
  try {
107
- var i = e(o);
108
- return i ? "<" + i + ">" : "<...>";
107
+ var c = e(o);
108
+ return c ? "<" + c + ">" : "<...>";
109
109
  } catch {
110
110
  return "<...>";
111
111
  }
112
112
  }
113
113
  function s() {
114
- var o = V.A;
114
+ var o = G.A;
115
115
  return o === null ? null : o.getOwner();
116
116
  }
117
117
  function a() {
118
118
  return Error("react-stack-top-frame");
119
119
  }
120
- function l(o) {
120
+ function u(o) {
121
121
  if (te.call(o, "key")) {
122
- var i = Object.getOwnPropertyDescriptor(o, "key").get;
123
- if (i && i.isReactWarning) return !1;
122
+ var c = Object.getOwnPropertyDescriptor(o, "key").get;
123
+ if (c && c.isReactWarning) return !1;
124
124
  }
125
125
  return o.key !== void 0;
126
126
  }
127
- function u(o, i) {
128
- function m() {
127
+ function i(o, c) {
128
+ function f() {
129
129
  re || (re = !0, console.error(
130
130
  "%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)",
131
- i
131
+ c
132
132
  ));
133
133
  }
134
- m.isReactWarning = !0, Object.defineProperty(o, "key", {
135
- get: m,
134
+ f.isReactWarning = !0, Object.defineProperty(o, "key", {
135
+ get: f,
136
136
  configurable: !0
137
137
  });
138
138
  }
139
- function f() {
139
+ function m() {
140
140
  var o = e(this.type);
141
141
  return oe[o] || (oe[o] = !0, console.error(
142
142
  "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."
143
143
  )), o = this.props.ref, o !== void 0 ? o : null;
144
144
  }
145
- function b(o, i, m, g, W, H) {
146
- var v = m.ref;
145
+ function v(o, c, f, p, M, H) {
146
+ var g = f.ref;
147
147
  return o = {
148
148
  $$typeof: E,
149
149
  type: o,
150
- key: i,
151
- props: m,
152
- _owner: g
153
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(o, "ref", {
150
+ key: c,
151
+ props: f,
152
+ _owner: p
153
+ }, (g !== void 0 ? g : null) !== null ? Object.defineProperty(o, "ref", {
154
154
  enumerable: !1,
155
- get: f
155
+ get: m
156
156
  }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
157
157
  configurable: !1,
158
158
  enumerable: !1,
@@ -167,7 +167,7 @@ function Fe() {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
- value: W
170
+ value: M
171
171
  }), Object.defineProperty(o, "_debugTask", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
@@ -175,51 +175,51 @@ function Fe() {
175
175
  value: H
176
176
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
177
177
  }
178
- function p(o, i, m, g, W, H) {
179
- var v = i.children;
180
- if (v !== void 0)
181
- if (g)
182
- if (Se(v)) {
183
- for (g = 0; g < v.length; g++)
184
- d(v[g]);
185
- Object.freeze && Object.freeze(v);
178
+ function h(o, c, f, p, M, H) {
179
+ var g = c.children;
180
+ if (g !== void 0)
181
+ if (p)
182
+ if (Se(g)) {
183
+ for (p = 0; p < g.length; p++)
184
+ d(g[p]);
185
+ Object.freeze && Object.freeze(g);
186
186
  } else
187
187
  console.error(
188
188
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
189
189
  );
190
- else d(v);
191
- if (te.call(i, "key")) {
192
- v = e(o);
193
- var S = Object.keys(i).filter(function(Ae) {
190
+ else d(g);
191
+ if (te.call(c, "key")) {
192
+ g = e(o);
193
+ var S = Object.keys(c).filter(function(Ae) {
194
194
  return Ae !== "key";
195
195
  });
196
- g = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", ae[v + g] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
196
+ p = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", ae[g + p] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
197
197
  `A props object containing a "key" prop is being spread into JSX:
198
198
  let props = %s;
199
199
  <%s {...props} />
200
200
  React keys must be passed directly to JSX without using spread:
201
201
  let props = %s;
202
202
  <%s key={someKey} {...props} />`,
203
+ p,
203
204
  g,
204
- v,
205
205
  S,
206
- v
207
- ), ae[v + g] = !0);
206
+ g
207
+ ), ae[g + p] = !0);
208
208
  }
209
- if (v = null, m !== void 0 && (r(m), v = "" + m), l(i) && (r(i.key), v = "" + i.key), "key" in i) {
210
- m = {};
211
- for (var J in i)
212
- J !== "key" && (m[J] = i[J]);
213
- } else m = i;
214
- return v && u(
215
- m,
209
+ if (g = null, f !== void 0 && (r(f), g = "" + f), u(c) && (r(c.key), g = "" + c.key), "key" in c) {
210
+ f = {};
211
+ for (var J in c)
212
+ J !== "key" && (f[J] = c[J]);
213
+ } else f = c;
214
+ return g && i(
215
+ f,
216
216
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
217
- ), b(
217
+ ), v(
218
218
  o,
219
- v,
220
- m,
219
+ g,
220
+ f,
221
221
  s(),
222
- W,
222
+ M,
223
223
  H
224
224
  );
225
225
  }
@@ -229,7 +229,7 @@ React keys must be passed directly to JSX without using spread:
229
229
  function T(o) {
230
230
  return typeof o == "object" && o !== null && o.$$typeof === E;
231
231
  }
232
- var w = R, E = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), L = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), Re = Symbol.for("react.forward_ref"), _e = Symbol.for("react.suspense"), Ne = Symbol.for("react.suspense_list"), Pe = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), ke = Symbol.for("react.activity"), Ce = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, Se = Array.isArray, G = console.createTask ? console.createTask : function() {
232
+ var w = R, E = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), L = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), Re = Symbol.for("react.forward_ref"), _e = Symbol.for("react.suspense"), Ne = Symbol.for("react.suspense_list"), Pe = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), ke = Symbol.for("react.activity"), Ce = Symbol.for("react.client.reference"), G = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, Se = Array.isArray, V = console.createTask ? console.createTask : function() {
233
233
  return null;
234
234
  };
235
235
  w = {
@@ -240,78 +240,70 @@ React keys must be passed directly to JSX without using spread:
240
240
  var re, oe = {}, ne = w.react_stack_bottom_frame.bind(
241
241
  w,
242
242
  a
243
- )(), se = G(n(a)), ae = {};
244
- D.Fragment = N, D.jsx = function(o, i, m) {
245
- var g = 1e4 > V.recentlyCreatedOwnerStacks++;
246
- return p(
243
+ )(), se = V(n(a)), ae = {};
244
+ I.Fragment = N, I.jsx = function(o, c, f) {
245
+ var p = 1e4 > G.recentlyCreatedOwnerStacks++;
246
+ return h(
247
247
  o,
248
- i,
249
- m,
248
+ c,
249
+ f,
250
250
  !1,
251
- g ? Error("react-stack-top-frame") : ne,
252
- g ? G(n(o)) : se
251
+ p ? Error("react-stack-top-frame") : ne,
252
+ p ? V(n(o)) : se
253
253
  );
254
- }, D.jsxs = function(o, i, m) {
255
- var g = 1e4 > V.recentlyCreatedOwnerStacks++;
256
- return p(
254
+ }, I.jsxs = function(o, c, f) {
255
+ var p = 1e4 > G.recentlyCreatedOwnerStacks++;
256
+ return h(
257
257
  o,
258
- i,
259
- m,
258
+ c,
259
+ f,
260
260
  !0,
261
- g ? Error("react-stack-top-frame") : ne,
262
- g ? G(n(o)) : se
261
+ p ? Error("react-stack-top-frame") : ne,
262
+ p ? V(n(o)) : se
263
263
  );
264
264
  };
265
- })()), D;
265
+ })()), I;
266
266
  }
267
267
  var le;
268
268
  function ze() {
269
- return le || (le = 1, process.env.NODE_ENV === "production" ? M.exports = Be() : M.exports = Fe()), M.exports;
269
+ return le || (le = 1, process.env.NODE_ENV === "production" ? W.exports = Be() : W.exports = Fe()), W.exports;
270
270
  }
271
- var c = ze();
271
+ var l = ze();
272
272
  const Z = Le({
273
273
  client: null,
274
274
  insights: null
275
- }), $t = ({ children: e, client: t, insights: r = null }) => /* @__PURE__ */ c.jsx(Z.Provider, { value: { client: t, insights: r }, children: e }), Q = () => {
275
+ }), $t = ({ children: e, client: t, insights: r = null }) => /* @__PURE__ */ l.jsx(Z.Provider, { value: { client: t, insights: r }, children: e }), Q = () => {
276
276
  const e = K(Z);
277
277
  if (!e.client)
278
278
  throw new Error(
279
279
  "useLevo must be used within a LevoProvider. Please ensure you have wrapped your component tree with LevoProvider."
280
280
  );
281
281
  return e.client;
282
- }, ee = () => K(Z).insights, Wt = ({ id: e, properties: t = {} }) => {
282
+ }, ee = () => K(Z).insights, Mt = ({ id: e, properties: t = {} }) => {
283
283
  const r = ee(), [n, s] = P(!1);
284
284
  return O(() => {
285
285
  if (n || typeof r?.track != "function") return;
286
286
  const a = document.getElementById(e);
287
287
  if (!a) return;
288
- const l = () => {
288
+ const u = () => {
289
289
  n || (r?.track("block.view", {
290
290
  ...t,
291
291
  resource: "block",
292
292
  identifier: e
293
293
  }), s(!0));
294
- };
295
- if (((b) => {
296
- const p = b.getBoundingClientRect();
297
- return p.top >= 0 && p.left >= 0 && p.bottom <= (window.innerHeight || document.documentElement.clientHeight) && p.right <= (window.innerWidth || document.documentElement.clientWidth);
298
- })(a)) {
299
- l();
300
- return;
301
- }
302
- const f = new IntersectionObserver(
303
- (b) => {
304
- b.forEach((p) => {
305
- p.isIntersecting && (l(), f.disconnect());
294
+ }, i = new IntersectionObserver(
295
+ (m) => {
296
+ m.forEach((v) => {
297
+ v.isIntersecting && (u(), i.disconnect());
306
298
  });
307
299
  },
308
300
  { threshold: 0 }
309
301
  );
310
- return f.observe(a), () => {
311
- f.disconnect();
302
+ return i.observe(a), () => {
303
+ i.disconnect();
312
304
  };
313
305
  }, [r, e, t, n]), null;
314
- }, Mt = ({ event: e, properties: t }) => {
306
+ }, Wt = ({ event: e, properties: t }) => {
315
307
  const r = ee();
316
308
  return O(() => {
317
309
  r?.track(e, t);
@@ -337,7 +329,7 @@ var ve = {
337
329
  }, ue = R.createContext && /* @__PURE__ */ R.createContext(ve), Ue = ["attr", "size", "title"];
338
330
  function Ye(e, t) {
339
331
  if (e == null) return {};
340
- var r = Ve(e, t), n, s;
332
+ var r = Ge(e, t), n, s;
341
333
  if (Object.getOwnPropertySymbols) {
342
334
  var a = Object.getOwnPropertySymbols(e);
343
335
  for (s = 0; s < a.length; s++)
@@ -345,7 +337,7 @@ function Ye(e, t) {
345
337
  }
346
338
  return r;
347
339
  }
348
- function Ve(e, t) {
340
+ function Ge(e, t) {
349
341
  if (e == null) return {};
350
342
  var r = {};
351
343
  for (var n in e)
@@ -379,14 +371,14 @@ function U(e) {
379
371
  for (var t = 1; t < arguments.length; t++) {
380
372
  var r = arguments[t] != null ? arguments[t] : {};
381
373
  t % 2 ? de(Object(r), !0).forEach(function(n) {
382
- Ge(e, n, r[n]);
374
+ Ve(e, n, r[n]);
383
375
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : de(Object(r)).forEach(function(n) {
384
376
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
385
377
  });
386
378
  }
387
379
  return e;
388
380
  }
389
- function Ge(e, t, r) {
381
+ function Ve(e, t, r) {
390
382
  return t = He(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
391
383
  }
392
384
  function He(e) {
@@ -419,18 +411,18 @@ function qe(e) {
419
411
  attr: n,
420
412
  size: s,
421
413
  title: a
422
- } = e, l = Ye(e, Ue), u = s || r.size || "1em", f;
423
- return r.className && (f = r.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ R.createElement("svg", z({
414
+ } = e, u = Ye(e, Ue), i = s || r.size || "1em", m;
415
+ return r.className && (m = r.className), e.className && (m = (m ? m + " " : "") + e.className), /* @__PURE__ */ R.createElement("svg", z({
424
416
  stroke: "currentColor",
425
417
  fill: "currentColor",
426
418
  strokeWidth: "0"
427
- }, r.attr, n, l, {
428
- className: f,
419
+ }, r.attr, n, u, {
420
+ className: m,
429
421
  style: U(U({
430
422
  color: e.color || r.color
431
423
  }, r.style), e.style),
432
- height: u,
433
- width: u,
424
+ height: i,
425
+ width: i,
434
426
  xmlns: "http://www.w3.org/2000/svg"
435
427
  }), a && /* @__PURE__ */ R.createElement("title", null, a), e.children);
436
428
  };
@@ -439,7 +431,7 @@ function qe(e) {
439
431
  function he(e) {
440
432
  return Xe({ 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);
441
433
  }
442
- const j = (...e) => pe(Ie(e)), Ke = $e(
434
+ const j = (...e) => pe(De(e)), Ke = $e(
443
435
  "inline-flex items-center justify-center font-medium text-sm 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:cursor-not-allowed disabled:opacity-50",
444
436
  {
445
437
  variants: {
@@ -482,29 +474,29 @@ const j = (...e) => pe(Ie(e)), Ke = $e(
482
474
  rounded: n,
483
475
  asChild: s = !1,
484
476
  isLoading: a = !1,
485
- loadingText: l,
486
- disabled: u,
487
- ...f
488
- }, b) => {
489
- const p = s ? De.Root : "button";
490
- return /* @__PURE__ */ c.jsx(
491
- p,
477
+ loadingText: u,
478
+ disabled: i,
479
+ ...m
480
+ }, v) => {
481
+ const h = s ? Ie.Root : "button";
482
+ return /* @__PURE__ */ l.jsx(
483
+ h,
492
484
  {
493
485
  className: j(Ke({ variant: t, size: r, rounded: n, className: e })),
494
- ref: b,
495
- disabled: u || a,
486
+ ref: v,
487
+ disabled: i || a,
496
488
  type: "button",
497
- ...f,
498
- children: a ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
499
- /* @__PURE__ */ c.jsx(he, { className: pe("h-4 w-4 animate-spin", l ? "mr-2" : "") }),
500
- l
501
- ] }) : f.children
489
+ ...m,
490
+ children: a ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
491
+ /* @__PURE__ */ l.jsx(he, { className: pe("h-4 w-4 animate-spin", u ? "mr-2" : "") }),
492
+ u
493
+ ] }) : m.children
502
494
  }
503
495
  );
504
496
  }
505
497
  );
506
498
  Ze.displayName = "Button";
507
- const Qe = y.Root, Ft = y.Trigger, et = y.Portal, zt = y.Close, xe = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
499
+ const Qe = y.Root, Ft = y.Trigger, et = y.Portal, zt = y.Close, xe = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
508
500
  y.Overlay,
509
501
  {
510
502
  ref: r,
@@ -516,10 +508,10 @@ const Qe = y.Root, Ft = y.Trigger, et = y.Portal, zt = y.Close, xe = _.forwardRe
516
508
  }
517
509
  ));
518
510
  xe.displayName = y.Overlay.displayName;
519
- const we = _.forwardRef(({ className: e, children: t, container: r, hideCloseButton: n, overlayStyles: s, ...a }, l) => /* @__PURE__ */ c.jsx(et, { container: r, children: /* @__PURE__ */ c.jsx(xe, { className: s, children: /* @__PURE__ */ c.jsxs(
511
+ const we = _.forwardRef(({ className: e, children: t, container: r, hideCloseButton: n, overlayStyles: s, ...a }, u) => /* @__PURE__ */ l.jsx(et, { container: r, children: /* @__PURE__ */ l.jsx(xe, { className: s, children: /* @__PURE__ */ l.jsxs(
520
512
  y.Content,
521
513
  {
522
- ref: l,
514
+ ref: u,
523
515
  className: j(
524
516
  "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 bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg",
525
517
  e
@@ -527,14 +519,14 @@ const we = _.forwardRef(({ className: e, children: t, container: r, hideCloseBut
527
519
  ...a,
528
520
  children: [
529
521
  t,
530
- !n && /* @__PURE__ */ c.jsxs(
522
+ !n && /* @__PURE__ */ l.jsxs(
531
523
  y.Close,
532
524
  {
533
525
  type: "button",
534
526
  className: "absolute top-4 right-4 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
535
527
  children: [
536
- /* @__PURE__ */ c.jsx(We, { className: "h-4 w-4" }),
537
- /* @__PURE__ */ c.jsx("span", { className: "sr-only", children: "Close" })
528
+ /* @__PURE__ */ l.jsx(Me, { className: "h-4 w-4" }),
529
+ /* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "Close" })
538
530
  ]
539
531
  }
540
532
  )
@@ -542,9 +534,9 @@ const we = _.forwardRef(({ className: e, children: t, container: r, hideCloseBut
542
534
  }
543
535
  ) }) }));
544
536
  we.displayName = y.Content.displayName;
545
- const ye = ({ className: e, ...t }) => /* @__PURE__ */ c.jsx("div", { className: j("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
537
+ const ye = ({ className: e, ...t }) => /* @__PURE__ */ l.jsx("div", { className: j("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
546
538
  ye.displayName = "DialogHeader";
547
- const tt = ({ className: e, ...t }) => /* @__PURE__ */ c.jsx(
539
+ const tt = ({ className: e, ...t }) => /* @__PURE__ */ l.jsx(
548
540
  "div",
549
541
  {
550
542
  className: j("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
@@ -552,7 +544,7 @@ const tt = ({ className: e, ...t }) => /* @__PURE__ */ c.jsx(
552
544
  }
553
545
  );
554
546
  tt.displayName = "DialogFooter";
555
- const Ee = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
547
+ const Ee = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
556
548
  y.Title,
557
549
  {
558
550
  ref: r,
@@ -561,7 +553,7 @@ const Ee = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
561
553
  }
562
554
  ));
563
555
  Ee.displayName = y.Title.displayName;
564
- const je = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
556
+ const je = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
565
557
  y.Description,
566
558
  {
567
559
  ref: r,
@@ -577,15 +569,15 @@ const Ut = ({
577
569
  title: n,
578
570
  description: s = "",
579
571
  contentClassName: a,
580
- modal: l = !0
581
- }) => /* @__PURE__ */ c.jsx(Qe, { open: e, onOpenChange: t, modal: l, children: /* @__PURE__ */ c.jsxs(we, { className: a, children: [
582
- n && /* @__PURE__ */ c.jsxs(ye, { className: "flex-1 font-medium", children: [
583
- /* @__PURE__ */ c.jsx(Ee, { children: n }),
584
- /* @__PURE__ */ c.jsx(je, { children: s })
572
+ modal: u = !0
573
+ }) => /* @__PURE__ */ l.jsx(Qe, { open: e, onOpenChange: t, modal: u, children: /* @__PURE__ */ l.jsxs(we, { className: a, children: [
574
+ n && /* @__PURE__ */ l.jsxs(ye, { className: "flex-1 font-medium", children: [
575
+ /* @__PURE__ */ l.jsx(Ee, { children: n }),
576
+ /* @__PURE__ */ l.jsx(je, { children: s })
585
577
  ] }),
586
- /* @__PURE__ */ c.jsx("div", { className: "w-full", children: r })
587
- ] }) }), Yt = ({ ...e }) => /* @__PURE__ */ c.jsx(
588
- Me,
578
+ /* @__PURE__ */ l.jsx("div", { className: "w-full", children: r })
579
+ ] }) }), Yt = ({ ...e }) => /* @__PURE__ */ l.jsx(
580
+ We,
589
581
  {
590
582
  closeButton: !0,
591
583
  richColors: !0,
@@ -607,14 +599,14 @@ const Ut = ({
607
599
  position: "bottom-right",
608
600
  ...r
609
601
  });
610
- }, Vt = (e, t = "Success", r = {}) => {
602
+ }, Gt = (e, t = "Success", r = {}) => {
611
603
  r?.id && q.dismiss(r?.id), q.success(t, {
612
604
  description: e,
613
605
  duration: 4e3,
614
606
  position: "bottom-right",
615
607
  ...r
616
608
  });
617
- }, ot = ({ className: e }) => /* @__PURE__ */ c.jsx(he, { className: j("h-8 w-8 animate-spin font-light", e) }), Gt = k.Root, nt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
609
+ }, ot = ({ className: e }) => /* @__PURE__ */ l.jsx(he, { className: j("h-8 w-8 animate-spin font-light", e) }), Vt = k.Root, nt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
618
610
  k.List,
619
611
  {
620
612
  ref: r,
@@ -626,7 +618,7 @@ const Ut = ({
626
618
  }
627
619
  ));
628
620
  nt.displayName = k.List.displayName;
629
- const st = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
621
+ const st = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
630
622
  k.Trigger,
631
623
  {
632
624
  ref: r,
@@ -639,7 +631,7 @@ const st = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
639
631
  }
640
632
  ));
641
633
  st.displayName = k.Trigger.displayName;
642
- const at = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
634
+ const at = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
643
635
  k.Content,
644
636
  {
645
637
  ref: r,
@@ -651,7 +643,7 @@ const at = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ c.jsx(
651
643
  }
652
644
  ));
653
645
  at.displayName = k.Content.displayName;
654
- const Ht = A.Provider, it = A.Root, ct = A.Trigger, lt = A.Portal, Oe = _.forwardRef(({ className: e, sideOffset: t = 4, ...r }, n) => /* @__PURE__ */ c.jsx(
646
+ const Ht = A.Provider, it = A.Root, ct = A.Trigger, lt = A.Portal, Oe = _.forwardRef(({ className: e, sideOffset: t = 4, ...r }, n) => /* @__PURE__ */ l.jsx(
655
647
  A.Content,
656
648
  {
657
649
  ref: n,
@@ -664,9 +656,9 @@ const Ht = A.Provider, it = A.Root, ct = A.Trigger, lt = A.Portal, Oe = _.forwar
664
656
  }
665
657
  ));
666
658
  Oe.displayName = A.Content.displayName;
667
- const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, contentProps: s = {}, side: a }) => /* @__PURE__ */ c.jsxs(it, { children: [
668
- t && /* @__PURE__ */ c.jsx(lt, { children: /* @__PURE__ */ c.jsx(Oe, { side: a, className: r, ...s, children: t }) }),
669
- /* @__PURE__ */ c.jsx(ct, { asChild: n, children: e })
659
+ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, contentProps: s = {}, side: a }) => /* @__PURE__ */ l.jsxs(it, { children: [
660
+ t && /* @__PURE__ */ l.jsx(lt, { children: /* @__PURE__ */ l.jsx(Oe, { side: a, className: r, ...s, children: t }) }),
661
+ /* @__PURE__ */ l.jsx(ct, { asChild: n, children: e })
670
662
  ] }), ut = [
671
663
  "pdf",
672
664
  "txt",
@@ -736,29 +728,29 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
736
728
  onError: () => {
737
729
  }
738
730
  }), ht = ({ title: e, onSuccess: t, onError: r, children: n }) => {
739
- const s = Q(), a = typeof window < "u" ? window.location.href : "", [l, u] = P(null), [f, b] = P(!1);
731
+ const s = Q(), a = typeof window < "u" ? window.location.href : "", [u, i] = P(null), [m, v] = P(!1);
740
732
  O(() => {
741
- s.membership && (b(!0), s.membership?.getOAuthURL().then((d) => {
742
- u(d);
733
+ s.membership && (v(!0), s.membership?.getOAuthURL().then((d) => {
734
+ i(d);
743
735
  }).catch((d) => {
744
736
  r({
745
737
  code: d?.code || "SOMETHING_WENT_WRONG",
746
738
  message: d?.message || "We could not connect with our service for your sign-in."
747
739
  });
748
740
  }).finally(() => {
749
- b(!1);
741
+ v(!1);
750
742
  }));
751
743
  }, []);
752
- const p = fe(
753
- () => ({ title: e, urls: l, isLoading: f, onSuccess: t, onError: r }),
754
- [e, l, t, r, f]
744
+ const h = fe(
745
+ () => ({ title: e, urls: u, isLoading: m, onSuccess: t, onError: r }),
746
+ [e, u, t, r, m]
755
747
  );
756
748
  return O(() => {
757
- if (l && a) {
758
- const d = {}, T = Object.keys(l);
749
+ if (u && a) {
750
+ const d = {}, T = Object.keys(u);
759
751
  for (const w of T)
760
752
  try {
761
- const E = l[w];
753
+ const E = u[w];
762
754
  if (E) {
763
755
  const C = new URL(E), N = C.searchParams;
764
756
  N.set("redirect_uri", a);
@@ -767,9 +759,9 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
767
759
  }
768
760
  } catch {
769
761
  }
770
- u(d);
762
+ i(d);
771
763
  }
772
- }, [a]), /* @__PURE__ */ c.jsx(Te.Provider, { value: p, children: n });
764
+ }, [a]), /* @__PURE__ */ l.jsx(Te.Provider, { value: h, children: n });
773
765
  }, xt = () => K(Te), wt = ({ url: e, title: t, height: r, width: n }) => {
774
766
  const s = window.screenX + (window.outerWidth - n) / 2, a = window.screenY + (window.outerHeight - r) / 2.5;
775
767
  return window.open(
@@ -784,12 +776,12 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
784
776
  url: n,
785
777
  children: s,
786
778
  onCode: a,
787
- onClose: l
779
+ onClose: u
788
780
  }) => {
789
- const [u, f] = P(), b = me(void 0), p = () => {
790
- window.clearInterval(b.current);
781
+ const [i, m] = P(), v = me(void 0), h = () => {
782
+ window.clearInterval(v.current);
791
783
  }, d = () => {
792
- f(
784
+ m(
793
785
  wt({
794
786
  url: n,
795
787
  title: e,
@@ -798,19 +790,19 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
798
790
  })
799
791
  );
800
792
  };
801
- return O(() => (u && (b.current = window.setInterval(() => {
793
+ return O(() => (i && (v.current = window.setInterval(() => {
802
794
  try {
803
- const T = u.location.href, w = new URL(T).searchParams, E = w.get("code");
795
+ const T = i.location.href, w = new URL(T).searchParams, E = w.get("code");
804
796
  if (!E)
805
797
  return;
806
- a(E, w), p(), u.close();
798
+ a(E, w), h(), i.close();
807
799
  } catch {
808
800
  } finally {
809
- (!u || u.closed) && (l(), p());
801
+ (!i || i.closed) && (u(), h());
810
802
  }
811
803
  }, 700)), () => {
812
- u && u.close(), l && l();
813
- }), [u]), /* @__PURE__ */ c.jsx(
804
+ i && i.close(), u && u();
805
+ }), [i]), /* @__PURE__ */ l.jsx(
814
806
  "div",
815
807
  {
816
808
  onClick: () => {
@@ -826,27 +818,27 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
826
818
  onSuccess: n,
827
819
  onError: s,
828
820
  width: a = 500,
829
- height: l = 700
821
+ height: u = 700
830
822
  }) => {
831
- const u = X((f, b) => {
832
- f.toLowerCase() === "success" ? n(b) : s(b);
823
+ const i = X((m, v) => {
824
+ m.toLowerCase() === "success" ? n(v) : s(v);
833
825
  }, []);
834
- return /* @__PURE__ */ c.jsx(
826
+ return /* @__PURE__ */ l.jsx(
835
827
  yt,
836
828
  {
837
829
  title: e,
838
830
  width: a,
839
- height: l,
831
+ height: u,
840
832
  onClose: () => {
841
833
  },
842
834
  url: t,
843
- onCode: u,
835
+ onCode: i,
844
836
  children: r
845
837
  }
846
838
  );
847
839
  }, jt = ({ children: e, provider: t }) => {
848
- const { title: r, urls: n, isLoading: s, onSuccess: a, onError: l } = xt(), u = n?.[t];
849
- return u ? /* @__PURE__ */ c.jsx(Et, { title: r, provider: t, url: u, onSuccess: a, onError: l, children: s ? /* @__PURE__ */ c.jsx("div", { className: "w-full items-center justify-center", children: /* @__PURE__ */ c.jsx(ot, { className: "h-5 w-5 bg-brand" }) }) : e }) : null;
840
+ const { title: r, urls: n, isLoading: s, onSuccess: a, onError: u } = xt(), i = n?.[t];
841
+ return i ? /* @__PURE__ */ l.jsx(Et, { title: r, provider: t, url: i, onSuccess: a, onError: u, children: s ? /* @__PURE__ */ l.jsx("div", { className: "w-full items-center justify-center", children: /* @__PURE__ */ l.jsx(ot, { className: "h-5 w-5 bg-brand" }) }) : e }) : null;
850
842
  }, Ot = ({ url: e, title: t, height: r, width: n }) => {
851
843
  const s = window.screenX + (window.outerWidth - n) / 2, a = window.screenY + (window.outerHeight - r) / 2.5;
852
844
  return window.open(
@@ -860,42 +852,42 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
860
852
  height: r = 700,
861
853
  onSuccess: n
862
854
  }) => {
863
- const s = Q(), [a, l] = P(!1), [u, f] = P(null), [b, p] = P(null), [d, T] = P(), w = me(void 0), E = () => {
855
+ const s = Q(), [a, u] = P(!1), [i, m] = P(null), [v, h] = P(null), [d, T] = P(), w = me(void 0), E = () => {
864
856
  window.clearInterval(w.current);
865
- }, C = X((h, x) => {
866
- h.toLowerCase() === "success" ? (p(null), n(x)) : p(x);
857
+ }, C = X((b, x) => {
858
+ b.toLowerCase() === "success" ? (h(null), n(x)) : h(x);
867
859
  }, []);
868
860
  O(() => {
869
- s.membership && (l(!0), s.membership?.getOAuthURL().then((h) => {
870
- if (h)
871
- return f(h), h;
861
+ s.membership && (u(!0), s.membership?.getOAuthURL().then((b) => {
862
+ if (b)
863
+ return m(b), b;
872
864
  throw new Error();
873
- }).catch((h) => {
874
- const x = ge(h);
875
- s.logger?.error("Failed to get OAuth URL", x.message), p({
865
+ }).catch((b) => {
866
+ const x = ge(b);
867
+ s.logger?.error("Failed to get OAuth URL", x.message), h({
876
868
  code: x?.code || "SOMETHING_WENT_WRONG",
877
869
  message: x?.message || "We could not connect with our service for your sign-in."
878
870
  });
879
871
  }).finally(() => {
880
- l(!1);
872
+ u(!1);
881
873
  }));
882
874
  }, []), O(() => (d && (w.current = window.setInterval(() => {
883
875
  try {
884
- const h = d.location.href, x = new URL(h).searchParams, $ = x.get("code");
876
+ const b = d.location.href, x = new URL(b).searchParams, $ = x.get("code");
885
877
  if (!$)
886
878
  return;
887
879
  C($, x), E(), d.close();
888
880
  } catch {
889
881
  } finally {
890
- (!d || d.closed) && (E(), p(null));
882
+ (!d || d.closed) && (E(), h(null));
891
883
  }
892
884
  }, 700)), () => {
893
885
  d && d.close();
894
886
  }), [d]);
895
887
  const N = X(
896
- (h) => {
897
- if (h && u !== null) {
898
- const x = u?.[h];
888
+ (b) => {
889
+ if (b && i !== null) {
890
+ const x = i?.[b];
899
891
  x && (d && d.close(), T(
900
892
  Ot({
901
893
  url: x,
@@ -906,14 +898,14 @@ const Jt = ({ children: e, label: t, labelClassName: r, asChild: n = !0, content
906
898
  ));
907
899
  }
908
900
  },
909
- [u, d]
901
+ [i, d]
910
902
  );
911
903
  return {
912
- providers: fe(() => u !== null ? Object.keys(u).filter(
913
- (h) => !!u[h]
914
- ) : [], [u]),
904
+ providers: fe(() => i !== null ? Object.keys(i).filter(
905
+ (b) => !!i[b]
906
+ ) : [], [i]),
915
907
  isLoading: a,
916
- error: b,
908
+ error: v,
917
909
  launchPopup: N
918
910
  };
919
911
  };
@@ -944,14 +936,14 @@ export {
944
936
  Ee as DialogTitle,
945
937
  Ft as DialogTrigger,
946
938
  Ut as DialogWrapper,
947
- Wt as LevoInsightsBlock,
948
- Mt as LevoInsightsComponent,
939
+ Mt as LevoInsightsBlock,
940
+ Wt as LevoInsightsComponent,
949
941
  Bt as LevoInsightsPage,
950
942
  Zt as LevoOAuth,
951
943
  $t as LevoProvider,
952
944
  Jt as SimpleTooltipWrapper,
953
945
  ot as Spinner,
954
- Gt as Tabs,
946
+ Vt as Tabs,
955
947
  at as TabsContent,
956
948
  nt as TabsList,
957
949
  st as TabsTrigger,
@@ -981,7 +973,7 @@ export {
981
973
  _t as isObjectType,
982
974
  F as mediaExtensionsByKind,
983
975
  B as mediaMimetypeByKind,
984
- Vt as successToast,
976
+ Gt as successToast,
985
977
  nr as toast,
986
978
  Q as useLevo,
987
979
  ee as useLevoInsights,