@wacht/jsx 0.0.1-alpha.41 → 0.0.1-alpha.42

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.es.js CHANGED
@@ -15,16 +15,16 @@ function Jy({
15
15
  adapter: o,
16
16
  uiOverwrites: i
17
17
  }) {
18
- const [a, s] = P(!0), [u, g] = P(null), c = ce(!1);
18
+ const [a, s] = P(!0), [u, f] = P(null), c = ce(!1);
19
19
  le(() => {
20
20
  async function l() {
21
21
  if (c.current)
22
22
  return;
23
23
  c.current = !0, s(!0);
24
- const [p, f, y] = r.split("_");
24
+ const [p, g, y] = r.split("_");
25
25
  if (!y)
26
26
  throw new Error("Invalid public key");
27
- let v = atob(y), w = f === "test", I = null;
27
+ let v = atob(y), w = g === "test", I = null;
28
28
  if (new URLSearchParams(window.location.search).has("__dev_session__")) {
29
29
  I = new URLSearchParams(window.location.search).get(
30
30
  "__dev_session__"
@@ -50,7 +50,7 @@ function Jy({
50
50
  E.data.backend_host = v, i && (E.data.ui_settings = {
51
51
  ...E.data.ui_settings,
52
52
  ...i
53
- }), g(E.data), w && T.headers.get("x-development-session") && localStorage.setItem(
53
+ }), f(E.data), w && T.headers.get("x-development-session") && localStorage.setItem(
54
54
  "__dev_session__",
55
55
  T.headers.get("x-development-session") ?? ""
56
56
  ), s(!1);
@@ -86,12 +86,12 @@ function Ye() {
86
86
  a != null && a.headers && new Headers(a.headers).forEach((l, p) => {
87
87
  u.set(p, l);
88
88
  });
89
- const g = new URL(`${t.backend_host ?? ""}${i}`);
90
- t.mode === "staging" && g.searchParams.append(
89
+ const f = new URL(`${t.backend_host ?? ""}${i}`);
90
+ t.mode === "staging" && f.searchParams.append(
91
91
  "__dev_session__",
92
92
  localStorage.getItem("__dev_session__") ?? ""
93
93
  );
94
- const c = await fetch(g, {
94
+ const c = await fetch(f, {
95
95
  ...s,
96
96
  ...a,
97
97
  headers: u
@@ -124,17 +124,17 @@ function Ql() {
124
124
  if (Yi) return fn;
125
125
  Yi = 1;
126
126
  var t = xe;
127
- function r(p, f) {
128
- return p === f && (p !== 0 || 1 / p === 1 / f) || p !== p && f !== f;
127
+ function r(p, g) {
128
+ return p === g && (p !== 0 || 1 / p === 1 / g) || p !== p && g !== g;
129
129
  }
130
130
  var o = typeof Object.is == "function" ? Object.is : r, i = t.useState, a = t.useEffect, s = t.useLayoutEffect, u = t.useDebugValue;
131
- function g(p, f) {
132
- var y = f(), v = i({ inst: { value: y, getSnapshot: f } }), w = v[0].inst, I = v[1];
131
+ function f(p, g) {
132
+ var y = g(), v = i({ inst: { value: y, getSnapshot: g } }), w = v[0].inst, I = v[1];
133
133
  return s(
134
134
  function() {
135
- w.value = y, w.getSnapshot = f, c(w) && I({ inst: w });
135
+ w.value = y, w.getSnapshot = g, c(w) && I({ inst: w });
136
136
  },
137
- [p, y, f]
137
+ [p, y, g]
138
138
  ), a(
139
139
  function() {
140
140
  return c(w) && I({ inst: w }), p(function() {
@@ -145,19 +145,19 @@ function Ql() {
145
145
  ), u(y), y;
146
146
  }
147
147
  function c(p) {
148
- var f = p.getSnapshot;
148
+ var g = p.getSnapshot;
149
149
  p = p.value;
150
150
  try {
151
- var y = f();
151
+ var y = g();
152
152
  return !o(p, y);
153
153
  } catch {
154
154
  return !0;
155
155
  }
156
156
  }
157
- function h(p, f) {
158
- return f();
157
+ function h(p, g) {
158
+ return g();
159
159
  }
160
- var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : g;
160
+ var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : f;
161
161
  return fn.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : l, fn;
162
162
  }
163
163
  var gn = {};
@@ -196,7 +196,7 @@ function Xl() {
196
196
  z.value = w, z.getSnapshot = v, o(z) && C({ inst: z });
197
197
  },
198
198
  [y, w, v]
199
- ), g(
199
+ ), f(
200
200
  function() {
201
201
  return o(z) && C({ inst: z }), y(function() {
202
202
  o(z) && C({ inst: z });
@@ -219,8 +219,8 @@ function Xl() {
219
219
  return v();
220
220
  }
221
221
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
222
- var a = xe, s = typeof Object.is == "function" ? Object.is : t, u = a.useState, g = a.useEffect, c = a.useLayoutEffect, h = a.useDebugValue, l = !1, p = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? i : r;
223
- gn.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
222
+ var a = xe, s = typeof Object.is == "function" ? Object.is : t, u = a.useState, f = a.useEffect, c = a.useLayoutEffect, h = a.useDebugValue, l = !1, p = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? i : r;
223
+ gn.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
224
224
  }()), gn;
225
225
  }
226
226
  var Ki;
@@ -309,19 +309,19 @@ const od = () => ii, [ai, si] = Xr && window.addEventListener ? [
309
309
  let pd = 0;
310
310
  const ci = (t) => {
311
311
  const r = typeof t, o = dd(t), i = bn(o, "Date"), a = bn(o, "RegExp"), s = bn(o, "Object");
312
- let u, g;
312
+ let u, f;
313
313
  if (oi(t) === t && !i && !a) {
314
314
  if (u = no.get(t), u) return u;
315
315
  if (u = ++pd + "~", no.set(t, u), Array.isArray(t)) {
316
- for (u = "@", g = 0; g < t.length; g++)
317
- u += ci(t[g]) + ",";
316
+ for (u = "@", f = 0; f < t.length; f++)
317
+ u += ci(t[f]) + ",";
318
318
  no.set(t, u);
319
319
  }
320
320
  if (s) {
321
321
  u = "#";
322
322
  const c = oi.keys(t).sort();
323
- for (; !Te(g = c.pop()); )
324
- Te(t[g]) || (u += g + ":" + ci(t[g]) + ",");
323
+ for (; !Te(f = c.pop()); )
324
+ Te(t[f]) || (u += f + ":" + ci(t[f]) + ",");
325
325
  no.set(t, u);
326
326
  }
327
327
  } else
@@ -350,23 +350,23 @@ async function vc(...t) {
350
350
  revalidate: a
351
351
  } : a || {});
352
352
  let u = s.populateCache;
353
- const g = s.rollbackOnError;
353
+ const f = s.rollbackOnError;
354
354
  let c = s.optimisticData;
355
- const h = (f) => typeof g == "function" ? g(f) : g !== !1, l = s.throwOnError;
355
+ const h = (g) => typeof f == "function" ? f(g) : f !== !1, l = s.throwOnError;
356
356
  if (ut(o)) {
357
- const f = o, y = [], v = r.keys();
357
+ const g = o, y = [], v = r.keys();
358
358
  for (const w of v)
359
359
  // Skip the special useSWRInfinite and useSWRSubscription keys.
360
- !/^\$(inf|sub)\$/.test(w) && f(r.get(w)._k) && y.push(w);
360
+ !/^\$(inf|sub)\$/.test(w) && g(r.get(w)._k) && y.push(w);
361
361
  return Promise.all(y.map(p));
362
362
  }
363
363
  return p(o);
364
- async function p(f) {
365
- const [y] = $i(f);
364
+ async function p(g) {
365
+ const [y] = $i(g);
366
366
  if (!y) return;
367
367
  const [v, w] = mc(r, y), [I, z, C, T] = It.get(r), E = () => {
368
368
  const R = I[y];
369
- return (ut(s.revalidate) ? s.revalidate(v().data, f) : s.revalidate !== !1) && (delete C[y], delete T[y], R && R[0]) ? R[0](fc).then(() => v().data) : v().data;
369
+ return (ut(s.revalidate) ? s.revalidate(v().data, g) : s.revalidate !== !1) && (delete C[y], delete T[y], R && R[0]) ? R[0](fc).then(() => v().data) : v().data;
370
370
  };
371
371
  if (t.length < 3)
372
372
  return E();
@@ -428,15 +428,15 @@ const ta = (t, r) => {
428
428
  if (!It.has(t)) {
429
429
  const o = Dt(cd, r), i = /* @__PURE__ */ Object.create(null), a = vc.bind(Xe, t);
430
430
  let s = Ot;
431
- const u = /* @__PURE__ */ Object.create(null), g = (l, p) => {
432
- const f = u[l] || [];
433
- return u[l] = f, f.push(p), () => f.splice(f.indexOf(p), 1);
434
- }, c = (l, p, f) => {
431
+ const u = /* @__PURE__ */ Object.create(null), f = (l, p) => {
432
+ const g = u[l] || [];
433
+ return u[l] = g, g.push(p), () => g.splice(g.indexOf(p), 1);
434
+ }, c = (l, p, g) => {
435
435
  t.set(l, p);
436
436
  const y = u[l];
437
437
  if (y)
438
438
  for (const v of y)
439
- v(p, f);
439
+ v(p, g);
440
440
  }, h = () => {
441
441
  if (!It.has(t) && (It.set(t, [
442
442
  i,
@@ -445,7 +445,7 @@ const ta = (t, r) => {
445
445
  /* @__PURE__ */ Object.create(null),
446
446
  a,
447
447
  c,
448
- g
448
+ f
449
449
  ]), !Yr)) {
450
450
  const l = o.initFocus(setTimeout.bind(Xe, ta.bind(Xe, i, uc))), p = o.initReconnect(setTimeout.bind(Xe, ta.bind(Xe, i, hc)));
451
451
  s = () => {
@@ -465,8 +465,8 @@ const ta = (t, r) => {
465
465
  It.get(t)[4]
466
466
  ];
467
467
  }, fd = (t, r, o, i, a) => {
468
- const s = o.errorRetryCount, u = a.retryCount, g = ~~((Math.random() + 0.5) * (1 << (u < 8 ? u : 8))) * o.errorRetryInterval;
469
- !Te(s) && u > s || setTimeout(i, g, a);
468
+ const s = o.errorRetryCount, u = a.retryCount, f = ~~((Math.random() + 0.5) * (1 << (u < 8 ? u : 8))) * o.errorRetryInterval;
469
+ !Te(s) && u > s || setTimeout(i, f, a);
470
470
  }, gd = ri, [yc, Wr] = hd(/* @__PURE__ */ new Map()), md = Dt(
471
471
  {
472
472
  // events
@@ -512,18 +512,18 @@ const ta = (t, r) => {
512
512
  null,
513
513
  (t[1] === null ? t[2] : t[1]) || {}
514
514
  ], xc = () => Dt(md, Tt(yd)), kd = (t) => (r, o, i) => t(r, o && ((...s) => {
515
- const [u] = $i(r), [, , , g] = It.get(yc);
515
+ const [u] = $i(r), [, , , f] = It.get(yc);
516
516
  if (u.startsWith(bd))
517
517
  return o(...s);
518
- const c = g[u];
519
- return Te(c) ? o(...s) : (delete g[u], c);
518
+ const c = f[u];
519
+ return Te(c) ? o(...s) : (delete f[u], c);
520
520
  }), i), Cd = xd.concat(kd), Sd = (t) => function(...o) {
521
- const i = xc(), [a, s, u] = _d(o), g = vd(i, u);
521
+ const i = xc(), [a, s, u] = _d(o), f = vd(i, u);
522
522
  let c = t;
523
- const { use: h } = g, l = (h || []).concat(Cd);
523
+ const { use: h } = f, l = (h || []).concat(Cd);
524
524
  for (let p = l.length; p--; )
525
525
  c = l[p](c);
526
- return c(a, s || g.fetcher || null, g);
526
+ return c(a, s || f.fetcher || null, f);
527
527
  }, zd = (t, r, o) => {
528
528
  const i = r[t] || (r[t] = []);
529
529
  return i.push(o), () => {
@@ -554,7 +554,7 @@ const xn = xe.use || // This extra generic is to avoid TypeScript mixing up the
554
554
  }), wn = {
555
555
  dedupe: !0
556
556
  }, $d = (t, r, o) => {
557
- const { cache: i, compare: a, suspense: s, fallbackData: u, revalidateOnMount: g, revalidateIfStale: c, refreshInterval: h, refreshWhenHidden: l, refreshWhenOffline: p, keepPreviousData: f } = o, [y, v, w, I] = It.get(i), [z, C] = $i(t), T = ce(!1), E = ce(!1), $ = ce(z), x = ce(r), m = ce(o), b = () => m.current, k = () => b().isVisible() && b().isOnline(), [_, O, M, S] = mc(i, z), R = ce({}).current, L = Te(u) ? Te(o.fallback) ? Xe : o.fallback[z] : u, U = (me, V) => {
557
+ const { cache: i, compare: a, suspense: s, fallbackData: u, revalidateOnMount: f, revalidateIfStale: c, refreshInterval: h, refreshWhenHidden: l, refreshWhenOffline: p, keepPreviousData: g } = o, [y, v, w, I] = It.get(i), [z, C] = $i(t), T = ce(!1), E = ce(!1), $ = ce(z), x = ce(r), m = ce(o), b = () => m.current, k = () => b().isVisible() && b().isOnline(), [_, O, M, S] = mc(i, z), R = ce({}).current, L = Te(u) ? Te(o.fallback) ? Xe : o.fallback[z] : u, U = (me, V) => {
558
558
  for (const ve in R) {
559
559
  const X = ve;
560
560
  if (X === "data") {
@@ -565,7 +565,7 @@ const xn = xe.use || // This extra generic is to avoid TypeScript mixing up the
565
565
  }
566
566
  return !0;
567
567
  }, N = rt(() => {
568
- const me = !z || !r ? !1 : Te(g) ? b().isPaused() || s ? !1 : c !== !1 : g, V = (ye) => {
568
+ const me = !z || !r ? !1 : Te(f) ? b().isPaused() || s ? !1 : c !== !1 : f, V = (ye) => {
569
569
  const G = Dt(ye);
570
570
  return delete G._k, me ? {
571
571
  isValidating: !0,
@@ -593,7 +593,7 @@ const xn = xe.use || // This extra generic is to avoid TypeScript mixing up the
593
593
  i,
594
594
  z
595
595
  ]
596
- ), N[0], N[1]), A = !T.current, D = y[z] && y[z].length > 0, ee = j.data, ne = Te(ee) ? L && gc(L) ? xn(L) : L : ee, H = j.error, Z = ce(ne), ie = f ? Te(ee) ? Te(Z.current) ? ne : Z.current : ee : ne, se = D && !Te(H) ? !1 : A && !Te(g) ? g : b().isPaused() ? !1 : s ? Te(ne) ? !1 : c : Te(ne) || c, te = !!(z && r && A && se), ae = Te(j.isValidating) ? te : j.isValidating, ge = Te(j.isLoading) ? te : j.isLoading, Q = W(
596
+ ), N[0], N[1]), A = !T.current, D = y[z] && y[z].length > 0, ee = j.data, ne = Te(ee) ? L && gc(L) ? xn(L) : L : ee, H = j.error, Z = ce(ne), ie = g ? Te(ee) ? Te(Z.current) ? ne : Z.current : ee : ne, se = D && !Te(H) ? !1 : A && !Te(f) ? f : b().isPaused() ? !1 : s ? Te(ne) ? !1 : c : Te(ne) || c, te = !!(z && r && A && se), ae = Te(j.isValidating) ? te : j.isValidating, ge = Te(j.isLoading) ? te : j.isLoading, Q = W(
597
597
  async (me) => {
598
598
  const V = x.current;
599
599
  if (!z || !V || E.current || b().isPaused())
@@ -770,11 +770,11 @@ function Id(t) {
770
770
  method: "POST",
771
771
  body: h
772
772
  }), p = await q(l);
773
- return await s((f) => f && {
774
- ...f,
775
- data: [p.data, ...f.data]
773
+ return await s((g) => g && {
774
+ ...g,
775
+ data: [p.data, ...g.data]
776
776
  }), p.data;
777
- }, [r, t, s]), g = W(async (c) => {
777
+ }, [r, t, s]), f = W(async (c) => {
778
778
  await r(`/api/agent/contexts/${c}/delete?token=${encodeURIComponent(t)}`, {
779
779
  method: "POST"
780
780
  }), await s((h) => h && {
@@ -787,7 +787,7 @@ function Id(t) {
787
787
  loading: !i && !a,
788
788
  error: a,
789
789
  createSession: u,
790
- deleteSession: g,
790
+ deleteSession: f,
791
791
  refetch: async () => {
792
792
  await s();
793
793
  }
@@ -808,7 +808,7 @@ function eb({
808
808
  defaultSessionId: a,
809
809
  onSessionCreated: s,
810
810
  onSessionDeleted: u,
811
- onError: g
811
+ onError: f
812
812
  }) {
813
813
  const [c, h] = P(
814
814
  a ? {
@@ -819,7 +819,7 @@ function eb({
819
819
  created_at: (/* @__PURE__ */ new Date()).toISOString()
820
820
  } : null
821
821
  ), [l, p] = P(!1), {
822
- sessions: f,
822
+ sessions: g,
823
823
  loading: y,
824
824
  error: v,
825
825
  createSession: w,
@@ -827,11 +827,11 @@ function eb({
827
827
  refetch: z
828
828
  } = Id(o);
829
829
  le(() => {
830
- if (a && f.length > 0) {
831
- const x = f.find((m) => m.id === a);
830
+ if (a && g.length > 0) {
831
+ const x = g.find((m) => m.id === a);
832
832
  x && h(x);
833
833
  }
834
- }, [a, f]);
834
+ }, [a, g]);
835
835
  const C = W((x) => {
836
836
  h(x), p(!1);
837
837
  }, []), T = W(async (x) => {
@@ -840,22 +840,22 @@ function eb({
840
840
  return h(b), s == null || s(b), b;
841
841
  } catch (m) {
842
842
  const b = m instanceof Error ? m.message : "Failed to create session";
843
- throw g == null || g(b), m;
843
+ throw f == null || f(b), m;
844
844
  }
845
- }, [w, s, g]), E = W(async (x) => {
845
+ }, [w, s, f]), E = W(async (x) => {
846
846
  try {
847
847
  await I(x), (c == null ? void 0 : c.id) === x && h(null), u == null || u(x);
848
848
  } catch (m) {
849
849
  const b = m instanceof Error ? m.message : "Failed to delete session";
850
- throw g == null || g(b), m;
850
+ throw f == null || f(b), m;
851
851
  }
852
- }, [I, c, u, g]), $ = {
852
+ }, [I, c, u, f]), $ = {
853
853
  // Configuration
854
854
  agentName: r,
855
855
  token: o,
856
856
  platformAdapter: i,
857
857
  // Session Management
858
- sessions: f,
858
+ sessions: g,
859
859
  selectedSession: c,
860
860
  loadingSessions: y,
861
861
  sessionError: v,
@@ -870,7 +870,7 @@ function eb({
870
870
  // Callbacks
871
871
  onSessionCreated: s,
872
872
  onSessionDeleted: u,
873
- onError: g
873
+ onError: f
874
874
  };
875
875
  return /* @__PURE__ */ e(wc.Provider, { value: $, children: t });
876
876
  }
@@ -891,62 +891,62 @@ function Pd(t, r) {
891
891
  }
892
892
  function Td(t, r) {
893
893
  return async ({ username: o, password: i }) => {
894
- var g, c;
894
+ var f, c;
895
895
  const a = new FormData();
896
896
  a.append("strategy", "plain_username"), a.append("username", o), a.append("password", i);
897
897
  const s = await t("/auth/signin", {
898
898
  method: "POST",
899
899
  body: a
900
900
  }), u = await q(s);
901
- return "data" in u && ((c = (g = u.data) == null ? void 0 : g.signin_attempts) != null && c.length) && r(u.data.signin_attempts.at(-1) || null), u;
901
+ return "data" in u && ((c = (f = u.data) == null ? void 0 : f.signin_attempts) != null && c.length) && r(u.data.signin_attempts.at(-1) || null), u;
902
902
  };
903
903
  }
904
904
  function Rd(t, r) {
905
905
  return async ({ email: o, password: i }) => {
906
- var g, c;
906
+ var f, c;
907
907
  const a = new FormData();
908
908
  a.append("strategy", "plain_email"), a.append("email", o), a.append("password", i);
909
909
  const s = await t("/auth/signin", {
910
910
  method: "POST",
911
911
  body: a
912
912
  }), u = await q(s);
913
- return "data" in u && ((c = (g = u.data) == null ? void 0 : g.signin_attempts) != null && c.length) && r(u.data.signin_attempts.at(-1) || null), u;
913
+ return "data" in u && ((c = (f = u.data) == null ? void 0 : f.signin_attempts) != null && c.length) && r(u.data.signin_attempts.at(-1) || null), u;
914
914
  };
915
915
  }
916
916
  function Md(t, r) {
917
917
  return async ({ phone: o }) => {
918
- var u, g;
918
+ var u, f;
919
919
  const i = new FormData();
920
920
  i.append("strategy", "phone_otp"), i.append("phone", o);
921
921
  const a = await t("/auth/signin", {
922
922
  method: "POST",
923
923
  body: i
924
924
  }), s = await q(a);
925
- return "data" in s && ((g = (u = s.data) == null ? void 0 : u.signin_attempts) != null && g.length) && r(s.data.signin_attempts.at(-1) || null), s;
925
+ return "data" in s && ((f = (u = s.data) == null ? void 0 : u.signin_attempts) != null && f.length) && r(s.data.signin_attempts.at(-1) || null), s;
926
926
  };
927
927
  }
928
928
  function Od(t, r) {
929
929
  return async ({ email: o }) => {
930
- var u, g;
930
+ var u, f;
931
931
  const i = new FormData();
932
932
  i.append("strategy", "email_otp"), i.append("email", o);
933
933
  const a = await t("/auth/signin", {
934
934
  method: "POST",
935
935
  body: i
936
936
  }), s = await q(a);
937
- return "data" in s && ((g = (u = s.data) == null ? void 0 : u.signin_attempts) != null && g.length) && r(s.data.signin_attempts.at(-1) || null), s;
937
+ return "data" in s && ((f = (u = s.data) == null ? void 0 : u.signin_attempts) != null && f.length) && r(s.data.signin_attempts.at(-1) || null), s;
938
938
  };
939
939
  }
940
940
  function Ld(t, r) {
941
941
  return async ({ email: o }) => {
942
- var u, g;
942
+ var u, f;
943
943
  const i = new FormData();
944
944
  i.append("strategy", "magic_link"), i.append("email", o);
945
945
  const a = await t("/auth/signin", {
946
946
  method: "POST",
947
947
  body: i
948
948
  }), s = await q(a);
949
- return "data" in s && ((g = (u = s.data) == null ? void 0 : u.signin_attempts) != null && g.length) && r(s.data.signin_attempts.at(-1) || null), s;
949
+ return "data" in s && ((f = (u = s.data) == null ? void 0 : u.signin_attempts) != null && f.length) && r(s.data.signin_attempts.at(-1) || null), s;
950
950
  };
951
951
  }
952
952
  function Ad(t) {
@@ -969,16 +969,16 @@ function Dd(t, r) {
969
969
  password: a,
970
970
  phone: s,
971
971
  strategy: u,
972
- token: g
972
+ token: f
973
973
  }) => {
974
- var p, f;
974
+ var p, g;
975
975
  const c = new FormData();
976
- u && c.append("strategy", u), o && c.append("email", o), i && c.append("username", i), a && c.append("password", a), s && c.append("phone", s), g && c.append("token", g);
976
+ u && c.append("strategy", u), o && c.append("email", o), i && c.append("username", i), a && c.append("password", a), s && c.append("phone", s), f && c.append("token", f);
977
977
  const h = await t("/auth/signin", {
978
978
  method: "POST",
979
979
  body: c
980
980
  }), l = await q(h);
981
- return "data" in l && ((f = (p = l.data) == null ? void 0 : p.signin_attempts) != null && f.length) && r(l.data.signin_attempts.at(-1) || null), l;
981
+ return "data" in l && ((g = (p = l.data) == null ? void 0 : p.signin_attempts) != null && g.length) && r(l.data.signin_attempts.at(-1) || null), l;
982
982
  };
983
983
  }
984
984
  function Nd() {
@@ -1008,22 +1008,22 @@ function Nd() {
1008
1008
  method: "POST",
1009
1009
  body: s
1010
1010
  }
1011
- ), g = await q(u);
1012
- if ("data" in g && ((h = (c = g.data) == null ? void 0 : c.signin_attempts) != null && h.length)) {
1013
- const l = g.data.signin_attempts.at(-1);
1014
- return i(l || null), g.data;
1011
+ ), f = await q(u);
1012
+ if ("data" in f && ((h = (c = f.data) == null ? void 0 : c.signin_attempts) != null && h.length)) {
1013
+ const l = f.data.signin_attempts.at(-1);
1014
+ return i(l || null), f.data;
1015
1015
  } else
1016
1016
  throw new Error("Verification failed");
1017
1017
  },
1018
1018
  prepareVerification: async (a) => {
1019
- var g;
1019
+ var f;
1020
1020
  const s = new URL(
1021
1021
  "/auth/prepare-verification",
1022
1022
  window.location.origin
1023
1023
  );
1024
1024
  s.searchParams.set(
1025
1025
  "attempt_identifier",
1026
- ((g = o == null ? void 0 : o.id) == null ? void 0 : g.toString()) || ""
1026
+ ((f = o == null ? void 0 : o.id) == null ? void 0 : f.toString()) || ""
1027
1027
  ), s.searchParams.set("strategy", a.strategy), s.searchParams.set("identifier_type", "signin"), a.strategy === "phone_otp" && a.lastDigits ? s.searchParams.set("last_digits", a.lastDigits) : (a.strategy === "email_otp" && a.redirectUri || a.strategy === "magic_link" && a.redirectUri) && s.searchParams.set("redirect_uri", a.redirectUri);
1028
1028
  const u = await t(s.pathname + s.search, {
1029
1029
  method: "POST"
@@ -1043,12 +1043,12 @@ function Nd() {
1043
1043
  method: "POST",
1044
1044
  body: s
1045
1045
  }
1046
- ), g = await q(u);
1047
- if ("data" in g && g.data) {
1048
- const h = (c = g.data.signin_attempts) == null ? void 0 : c.find(
1046
+ ), f = await q(u);
1047
+ if ("data" in f && f.data) {
1048
+ const h = (c = f.data.signin_attempts) == null ? void 0 : c.find(
1049
1049
  (l) => l.id === o.id
1050
1050
  );
1051
- return h && i(h), g.data;
1051
+ return h && i(h), f.data;
1052
1052
  } else
1053
1053
  throw new Error("Profile completion failed");
1054
1054
  },
@@ -1065,10 +1065,10 @@ function Nd() {
1065
1065
  initEnterpriseSso: async (a, s) => {
1066
1066
  const u = new URLSearchParams({ connection_id: a });
1067
1067
  s && u.append("redirect_uri", s);
1068
- const g = await t(`/auth/sso/login?${u.toString()}`, {
1068
+ const f = await t(`/auth/sso/login?${u.toString()}`, {
1069
1069
  method: "POST"
1070
1070
  });
1071
- return (await q(g)).data;
1071
+ return (await q(f)).data;
1072
1072
  }
1073
1073
  },
1074
1074
  discardSignInAttempt: () => {
@@ -1131,7 +1131,7 @@ function Go(t) {
1131
1131
  function Fd(t, r, o) {
1132
1132
  return {
1133
1133
  create: async (i) => {
1134
- var g, c, h;
1134
+ var f, c, h;
1135
1135
  const a = new FormData();
1136
1136
  for (const [l, p] of Object.entries(i))
1137
1137
  a.append(l, p);
@@ -1139,7 +1139,7 @@ function Fd(t, r, o) {
1139
1139
  method: "POST",
1140
1140
  body: a
1141
1141
  }), u = await q(s);
1142
- return "data" in u && ((c = (g = u.data) == null ? void 0 : g.signup_attempts) != null && c.length) && o(((h = u.data.signup_attempts) == null ? void 0 : h.at(-1)) || null), u;
1142
+ return "data" in u && ((c = (f = u.data) == null ? void 0 : f.signup_attempts) != null && c.length) && o(((h = u.data.signup_attempts) == null ? void 0 : h.at(-1)) || null), u;
1143
1143
  },
1144
1144
  prepareVerification: async (i) => {
1145
1145
  var u;
@@ -1154,7 +1154,7 @@ function Fd(t, r, o) {
1154
1154
  return q(s);
1155
1155
  },
1156
1156
  completeVerification: async (i) => {
1157
- var g, c;
1157
+ var f, c;
1158
1158
  const a = new FormData();
1159
1159
  a.append("verification_code", i);
1160
1160
  const s = await t(
@@ -1164,7 +1164,7 @@ function Fd(t, r, o) {
1164
1164
  body: a
1165
1165
  }
1166
1166
  ), u = await q(s);
1167
- return "data" in u && ((c = (g = u.data) == null ? void 0 : g.signup_attempts) != null && c.length) && o(u.data.signup_attempts.at(-1) || null), u;
1167
+ return "data" in u && ((c = (f = u.data) == null ? void 0 : f.signup_attempts) != null && c.length) && o(u.data.signup_attempts.at(-1) || null), u;
1168
1168
  },
1169
1169
  validateDeploymentInvitation: async (i) => {
1170
1170
  try {
@@ -1296,7 +1296,7 @@ function Ze() {
1296
1296
  const { client: t, loading: r } = Ye(), { deployment: o } = ze(), { navigate: i } = Je(), { cache: a } = xc(), {
1297
1297
  data: s,
1298
1298
  error: u,
1299
- mutate: g,
1299
+ mutate: f,
1300
1300
  isLoading: c
1301
1301
  } = He(r ? null : "/session", () => Ud(t), {
1302
1302
  refreshInterval: 3e4,
@@ -1305,13 +1305,13 @@ function Ze() {
1305
1305
  revalidateIfStale: !1,
1306
1306
  dedupingInterval: 5e3
1307
1307
  }), h = W(async () => {
1308
- await g(void 0, { revalidate: !0 });
1309
- }, [g]), l = W(
1308
+ await f(void 0, { revalidate: !0 });
1309
+ }, [f]), l = W(
1310
1310
  async (p = "default") => {
1311
1311
  if (!s) throw new Error("no session");
1312
- const f = di.get(p);
1313
- if (f && f.expires > Date.now())
1314
- return (f == null ? void 0 : f.token) || "";
1312
+ const g = di.get(p);
1313
+ if (g && g.expires > Date.now())
1314
+ return (g == null ? void 0 : g.token) || "";
1315
1315
  Vr.get(p) || Vr.set(p, Hd(t, p));
1316
1316
  const y = await Vr.get(p);
1317
1317
  return Vr.delete(p), di.set(p, y.data), y.data.token;
@@ -1333,11 +1333,11 @@ function Ze() {
1333
1333
  error: u,
1334
1334
  session: s,
1335
1335
  switchSignIn: async (p) => {
1336
- await jd(t, p), Lt(), await Wr("/me/organization-memberships", void 0, { revalidate: !1 }), await Wr("/me/workspace-memberships", void 0, { revalidate: !1 }), await g(void 0, { revalidate: !0 }), await Wr("/me/organization-memberships"), await Wr("/me/workspace-memberships");
1336
+ await jd(t, p), Lt(), await Wr("/me/organization-memberships", void 0, { revalidate: !1 }), await Wr("/me/workspace-memberships", void 0, { revalidate: !1 }), await f(void 0, { revalidate: !0 }), await Wr("/me/organization-memberships"), await Wr("/me/workspace-memberships");
1337
1337
  },
1338
1338
  signOut: async (p) => {
1339
1339
  await Wd(t, p);
1340
- const f = [
1340
+ const g = [
1341
1341
  "/session",
1342
1342
  "/user",
1343
1343
  "/me/signins",
@@ -1356,16 +1356,16 @@ function Ze() {
1356
1356
  const v = Array.from(a.keys());
1357
1357
  for (const w of v) {
1358
1358
  let I = !1;
1359
- (f.includes(w) || typeof w == "string" && y.some((z) => w.startsWith(z))) && (I = !0), I && a.delete(w);
1359
+ (g.includes(w) || typeof w == "string" && y.some((z) => w.startsWith(z))) && (I = !0), I && a.delete(w);
1360
1360
  }
1361
1361
  }
1362
- Lt(), await g(void 0, { revalidate: !0 }), o != null && o.ui_settings && (p && o.ui_settings.after_sign_out_one_page_url ? i(o.ui_settings.after_sign_out_one_page_url) : !p && o.ui_settings.after_sign_out_all_page_url && i(o.ui_settings.after_sign_out_all_page_url));
1362
+ Lt(), await f(void 0, { revalidate: !0 }), o != null && o.ui_settings && (p && o.ui_settings.after_sign_out_one_page_url ? i(o.ui_settings.after_sign_out_one_page_url) : !p && o.ui_settings.after_sign_out_all_page_url && i(o.ui_settings.after_sign_out_all_page_url));
1363
1363
  },
1364
1364
  switchOrganization: async (p) => {
1365
- await Vd(t, p), Lt(), await g(void 0, { revalidate: !0 });
1365
+ await Vd(t, p), Lt(), await f(void 0, { revalidate: !0 });
1366
1366
  },
1367
1367
  switchWorkspace: async (p) => {
1368
- await Gd(t, p), Lt(), await g(void 0, { revalidate: !0 });
1368
+ await Gd(t, p), Lt(), await f(void 0, { revalidate: !0 });
1369
1369
  },
1370
1370
  getToken: l,
1371
1371
  refetch: h
@@ -1386,7 +1386,7 @@ const Ei = () => {
1386
1386
  })
1387
1387
  )).data,
1388
1388
  [i]
1389
- ), g = W(
1389
+ ), f = W(
1390
1390
  async (j) => (await q(
1391
1391
  await i(`/organizations/${j.id}/invitations`, {
1392
1392
  method: "GET"
@@ -1431,7 +1431,7 @@ const Ei = () => {
1431
1431
  return await r(), ee;
1432
1432
  },
1433
1433
  [r, i]
1434
- ), f = W(
1434
+ ), g = W(
1435
1435
  async (j, A) => {
1436
1436
  await i(`/organizations/${j.id}/roles/${A.id}/remove`, {
1437
1437
  method: "POST"
@@ -1651,7 +1651,7 @@ const Ei = () => {
1651
1651
  getOrganizationMembers: u,
1652
1652
  removeOrganizationMember: h,
1653
1653
  createOrganization: l,
1654
- getOrganizationInvitations: g,
1654
+ getOrganizationInvitations: f,
1655
1655
  getOrganizationDomains: c,
1656
1656
  addOrganizationDomain: y,
1657
1657
  verifyOrganizationDomain: v,
@@ -1663,7 +1663,7 @@ const Ei = () => {
1663
1663
  resendOrganizationInvitation: U,
1664
1664
  updateOrganization: p,
1665
1665
  addRole: k,
1666
- removeOrganizationRoles: f,
1666
+ removeOrganizationRoles: g,
1667
1667
  deleteOrganization: O,
1668
1668
  getEnterpriseConnections: I,
1669
1669
  createEnterpriseConnection: z,
@@ -1684,12 +1684,12 @@ const Ei = () => {
1684
1684
  getOrganizationRoles: a,
1685
1685
  leaveOrganization: s,
1686
1686
  removeOrganizationMember: u,
1687
- getOrganizationInvitations: g,
1687
+ getOrganizationInvitations: f,
1688
1688
  getOrganizationDomains: c,
1689
1689
  removeOrganizationDomain: h,
1690
1690
  addOrganizationDomain: l,
1691
1691
  verifyOrganizationDomain: p,
1692
- addRoleToOrganizationMember: f,
1692
+ addRoleToOrganizationMember: g,
1693
1693
  removeRoleFromOrganizationMember: y,
1694
1694
  inviteOrganizationMember: v,
1695
1695
  discardOrganizationInvitation: w,
@@ -1733,12 +1733,12 @@ const Ei = () => {
1733
1733
  async (F) => N ? await h(N, F) : void 0,
1734
1734
  [N, h]
1735
1735
  ), te = W(
1736
- async (F, K) => N ? await f(
1736
+ async (F, K) => N ? await g(
1737
1737
  N,
1738
1738
  F,
1739
1739
  K
1740
1740
  ) : void 0,
1741
- [N, f]
1741
+ [N, g]
1742
1742
  ), ae = W(
1743
1743
  async (F, K) => N ? await y(
1744
1744
  N,
@@ -1766,7 +1766,7 @@ const Ei = () => {
1766
1766
  [N, I]
1767
1767
  ), ke = W(async () => {
1768
1768
  N && await s(N);
1769
- }, [N, s]), me = W(async () => N ? await g(N) : [], [N, g]), V = W(async () => N ? await T(N) : [], [N, T]), ve = W(
1769
+ }, [N, s]), me = W(async () => N ? await f(N) : [], [N, f]), V = W(async () => N ? await T(N) : [], [N, T]), ve = W(
1770
1770
  async (F) => {
1771
1771
  if (N)
1772
1772
  return await E(N, F);
@@ -1920,14 +1920,14 @@ const Pi = () => {
1920
1920
  revalidateIfStale: !1,
1921
1921
  dedupingInterval: 5e3
1922
1922
  }
1923
- ), g = W(async () => {
1923
+ ), f = W(async () => {
1924
1924
  await u(void 0, { revalidate: !0 });
1925
1925
  }, [u]);
1926
1926
  return {
1927
1927
  workspaceMemberships: i,
1928
1928
  loading: r || a,
1929
1929
  error: s,
1930
- refetch: g
1930
+ refetch: f
1931
1931
  };
1932
1932
  }, pr = () => {
1933
1933
  const { workspaceMemberships: t, refetch: r, loading: o, error: i } = Pi(), { client: a } = Ye(), s = rt(() => t == null ? void 0 : t.map((x) => ({
@@ -1947,7 +1947,7 @@ const Pi = () => {
1947
1947
  return Lt(), await r(), O.data;
1948
1948
  },
1949
1949
  [a, r]
1950
- ), g = W(
1950
+ ), f = W(
1951
1951
  async (x, m) => {
1952
1952
  const b = await Zd(a, x, m);
1953
1953
  return await r(), b;
@@ -1990,14 +1990,16 @@ const Pi = () => {
1990
1990
  })
1991
1991
  )).data,
1992
1992
  [a]
1993
- ), f = W(
1994
- async (x, m, b) => (await q(
1995
- await a(`/workspaces/${x.id}/roles`, {
1996
- method: "POST",
1997
- headers: { "Content-Type": "application/json" },
1998
- body: JSON.stringify({ name: m, permissions: b })
1999
- })
2000
- )).data,
1993
+ ), g = W(
1994
+ async (x, m, b) => {
1995
+ const k = new FormData();
1996
+ return k.append("name", m), b.forEach((O) => k.append("permissions", O)), (await q(
1997
+ await a(`/workspaces/${x.id}/roles`, {
1998
+ method: "POST",
1999
+ body: k
2000
+ })
2001
+ )).data;
2002
+ },
2001
2003
  [a]
2002
2004
  ), y = W(
2003
2005
  async (x, m) => (await q(
@@ -2007,13 +2009,15 @@ const Pi = () => {
2007
2009
  )).data,
2008
2010
  [a]
2009
2011
  ), v = W(
2010
- async (x, m, b) => (await q(
2011
- await a(`/workspaces/${x.id}/members`, {
2012
- method: "POST",
2013
- headers: { "Content-Type": "application/json" },
2014
- body: JSON.stringify({ email: m, role_id: b })
2015
- })
2016
- )).data,
2012
+ async (x, m, b) => {
2013
+ const k = new FormData();
2014
+ return k.append("email", m), b && k.append("role_id", b), (await q(
2015
+ await a(`/workspaces/${x.id}/members`, {
2016
+ method: "POST",
2017
+ body: k
2018
+ })
2019
+ )).data;
2020
+ },
2017
2021
  [a]
2018
2022
  ), w = W(
2019
2023
  async (x, m) => {
@@ -2091,13 +2095,13 @@ const Pi = () => {
2091
2095
  loading: o,
2092
2096
  error: i,
2093
2097
  refetch: r,
2094
- leaveWorkspace: g,
2098
+ leaveWorkspace: f,
2095
2099
  createWorkspace: u,
2096
2100
  updateWorkspace: c,
2097
2101
  deleteWorkspace: h,
2098
2102
  getWorkspaceMembers: l,
2099
2103
  getWorkspaceRoles: p,
2100
- createWorkspaceRole: f,
2104
+ createWorkspaceRole: g,
2101
2105
  deleteWorkspaceRole: y,
2102
2106
  inviteWorkspaceMember: v,
2103
2107
  removeWorkspaceMember: w,
@@ -2117,12 +2121,12 @@ const Pi = () => {
2117
2121
  leaveWorkspace: a,
2118
2122
  updateWorkspace: s,
2119
2123
  deleteWorkspace: u,
2120
- getWorkspaceMembers: g,
2124
+ getWorkspaceMembers: f,
2121
2125
  getWorkspaceRoles: c,
2122
2126
  createWorkspaceRole: h,
2123
2127
  deleteWorkspaceRole: l,
2124
2128
  inviteWorkspaceMember: p,
2125
- removeWorkspaceMember: f,
2129
+ removeWorkspaceMember: g,
2126
2130
  addWorkspaceMemberRole: y,
2127
2131
  removeWorkspaceMemberRole: v,
2128
2132
  getWorkspaceInvitations: w,
@@ -2154,7 +2158,7 @@ const Pi = () => {
2154
2158
  ), O = W(async () => {
2155
2159
  if (b)
2156
2160
  return await u(b);
2157
- }, [b, u]), M = W(async () => b ? await g(b) : [], [b, g]), S = W(async () => b ? await c(b) : [], [b, c]), R = W(
2161
+ }, [b, u]), M = W(async () => b ? await f(b) : [], [b, f]), S = W(async () => b ? await c(b) : [], [b, c]), R = W(
2158
2162
  async (te, ae) => {
2159
2163
  if (b)
2160
2164
  return await h(b, te, ae);
@@ -2175,9 +2179,9 @@ const Pi = () => {
2175
2179
  ), N = W(
2176
2180
  async (te) => {
2177
2181
  if (b)
2178
- return await f(b, te);
2182
+ return await g(b, te);
2179
2183
  },
2180
- [b, f]
2184
+ [b, g]
2181
2185
  ), j = W(
2182
2186
  async (te, ae) => {
2183
2187
  if (b)
@@ -2282,7 +2286,7 @@ function Tr() {
2282
2286
  })
2283
2287
  );
2284
2288
  return s(), U;
2285
- }, g = async () => await q(
2289
+ }, f = async () => await q(
2286
2290
  await t("/me/email-addresses", {
2287
2291
  method: "GET"
2288
2292
  })
@@ -2306,7 +2310,7 @@ function Tr() {
2306
2310
  await t(`/me/email-addresses/${R}/prepare-verification`, {
2307
2311
  method: "POST"
2308
2312
  })
2309
- ), f = async (R, L) => await q(
2313
+ ), g = async (R, L) => await q(
2310
2314
  await t(
2311
2315
  `/me/email-addresses/${R}/attempt-verification?code=${L}`,
2312
2316
  {
@@ -2434,12 +2438,12 @@ function Tr() {
2434
2438
  loading: r || a,
2435
2439
  error: i || null,
2436
2440
  updateProfile: u,
2437
- getEmailAddresses: g,
2441
+ getEmailAddresses: f,
2438
2442
  getEmailAddress: c,
2439
2443
  createEmailAddress: h,
2440
2444
  deleteEmailAddress: l,
2441
2445
  prepareEmailVerification: p,
2442
- attemptEmailVerification: f,
2446
+ attemptEmailVerification: g,
2443
2447
  makeEmailPrimary: C,
2444
2448
  createPhoneNumber: y,
2445
2449
  deletePhoneNumber: v,
@@ -2469,8 +2473,8 @@ function Xd() {
2469
2473
  return {
2470
2474
  signins: o,
2471
2475
  error: i || null,
2472
- removeSignin: async (g) => await q(
2473
- await t(`/me/signins/${g}/signout`, {
2476
+ removeSignin: async (f) => await q(
2477
+ await t(`/me/signins/${f}/signout`, {
2474
2478
  method: "POST"
2475
2479
  })
2476
2480
  ),
@@ -2491,7 +2495,7 @@ function tb() {
2491
2495
  var h;
2492
2496
  return c.id === ((h = t.active_signin) == null ? void 0 : h.active_organization_membership_id);
2493
2497
  }
2494
- ), [t]), g = rt(() => !t || !t.signins || t.signins.length === 0 ? null : s == null ? void 0 : s.find(
2498
+ ), [t]), f = rt(() => !t || !t.signins || t.signins.length === 0 ? null : s == null ? void 0 : s.find(
2495
2499
  (c) => {
2496
2500
  var h;
2497
2501
  return c.id === ((h = t.active_signin) == null ? void 0 : h.active_workspace_membership_id);
@@ -2500,7 +2504,7 @@ function tb() {
2500
2504
  return {
2501
2505
  loading: !1,
2502
2506
  orgMembership: u,
2503
- workspaceMembership: g
2507
+ workspaceMembership: f
2504
2508
  };
2505
2509
  }
2506
2510
  function Jd() {
@@ -2510,11 +2514,11 @@ function Jd() {
2510
2514
  const u = new FormData();
2511
2515
  for (const [h, l] of Object.entries(s))
2512
2516
  l && u.append(h, l);
2513
- const g = await t("/waitlist/join", {
2517
+ const f = await t("/waitlist/join", {
2514
2518
  method: "POST",
2515
2519
  body: u
2516
2520
  });
2517
- return await q(g);
2521
+ return await q(f);
2518
2522
  } finally {
2519
2523
  i(!1);
2520
2524
  }
@@ -2528,7 +2532,7 @@ function Jd() {
2528
2532
  };
2529
2533
  }
2530
2534
  function ep() {
2531
- const { client: t, loading: r } = Ye(), [o, i] = P(!1), [a, s] = P(null), [u, g] = P(null), [c, h] = P(null), [l, p] = P(!1), [f, y] = P(
2535
+ const { client: t, loading: r } = Ye(), [o, i] = P(!1), [a, s] = P(null), [u, f] = P(null), [c, h] = P(null), [l, p] = P(!1), [g, y] = P(
2532
2536
  null
2533
2537
  );
2534
2538
  le(() => {
@@ -2585,7 +2589,7 @@ function ep() {
2585
2589
  ), E = await q(T);
2586
2590
  if ("data" in E) {
2587
2591
  const $ = E.data.session, x = E.data.redirect_uri || null;
2588
- if (g($), h(x), $.signin_attempts && $.signin_attempts.length > 0) {
2592
+ if (f($), h(x), $.signin_attempts && $.signin_attempts.length > 0) {
2589
2593
  const m = $.signin_attempts.at(-1);
2590
2594
  m && y(m);
2591
2595
  }
@@ -2606,20 +2610,20 @@ function ep() {
2606
2610
  session: u,
2607
2611
  redirectUri: c,
2608
2612
  processed: l,
2609
- signinAttempt: f
2613
+ signinAttempt: g
2610
2614
  };
2611
2615
  }
2612
2616
  function tp() {
2613
2617
  const { client: t, loading: r } = Ye(), [o, i] = P(!1), [a, s] = P(null);
2614
2618
  return {
2615
2619
  loading: r || o,
2616
- verifyMagicLink: async (g) => {
2617
- if (!g.token || !g.attempt)
2620
+ verifyMagicLink: async (f) => {
2621
+ if (!f.token || !f.attempt)
2618
2622
  throw new Error("Invalid magic link parameters");
2619
2623
  i(!0), s(null);
2620
2624
  try {
2621
2625
  const c = new URL("/auth/verify-magic-link", window.location.origin);
2622
- c.searchParams.set("token", g.token), c.searchParams.set("attempt", g.attempt), g.redirectUri && c.searchParams.set("redirect_uri", g.redirectUri);
2626
+ c.searchParams.set("token", f.token), c.searchParams.set("attempt", f.attempt), f.redirectUri && c.searchParams.set("redirect_uri", f.redirectUri);
2623
2627
  const h = await t(c.pathname + c.search, {
2624
2628
  method: "GET"
2625
2629
  }), l = await q(h);
@@ -2649,27 +2653,27 @@ function op() {
2649
2653
  forgotPassword: async (s) => {
2650
2654
  const u = new FormData();
2651
2655
  u.append("email", s);
2652
- const g = await t("/auth/forgot-password", {
2656
+ const f = await t("/auth/forgot-password", {
2653
2657
  method: "POST",
2654
2658
  body: u
2655
2659
  });
2656
- return await q(g);
2660
+ return await q(f);
2657
2661
  },
2658
2662
  verifyOtp: async (s, u) => {
2659
- const g = new FormData();
2660
- g.append("email", s), g.append("otp", u);
2663
+ const f = new FormData();
2664
+ f.append("email", s), f.append("otp", u);
2661
2665
  const c = await t("/auth/forgot-password", {
2662
2666
  method: "POST",
2663
- body: g
2667
+ body: f
2664
2668
  });
2665
2669
  return await q(c);
2666
2670
  },
2667
2671
  resetPassword: async (s, u) => {
2668
- const g = new FormData();
2669
- g.append("token", s), g.append("password", u);
2672
+ const f = new FormData();
2673
+ f.append("token", s), f.append("password", u);
2670
2674
  const c = await t("/auth/reset-password", {
2671
2675
  method: "POST",
2672
- body: g
2676
+ body: f
2673
2677
  });
2674
2678
  return await q(c);
2675
2679
  }
@@ -2683,10 +2687,10 @@ function np({
2683
2687
  onNotification: a,
2684
2688
  onError: s,
2685
2689
  reconnectDelay: u = 1e3,
2686
- maxReconnectAttempts: g = 5
2690
+ maxReconnectAttempts: f = 5
2687
2691
  } = {}) {
2688
- const { session: c, loading: h } = Ze(), { deployment: l, loading: p } = ze(), [f, y] = P(!1), [v, w] = P(null), I = ce(null), z = ce(null), C = ce(0), T = ce(null), E = ce(a), $ = ce(s), x = ce(r), m = ce(o), b = ce(i), k = ce(u), _ = ce(g);
2689
- E.current = a, $.current = s, x.current = r, m.current = o, b.current = i, k.current = u, _.current = g;
2692
+ const { session: c, loading: h } = Ze(), { deployment: l, loading: p } = ze(), [g, y] = P(!1), [v, w] = P(null), I = ce(null), z = ce(null), C = ce(0), T = ce(null), E = ce(a), $ = ce(s), x = ce(r), m = ce(o), b = ce(i), k = ce(u), _ = ce(f);
2693
+ E.current = a, $.current = s, x.current = r, m.current = o, b.current = i, k.current = u, _.current = f;
2690
2694
  const O = W(() => {
2691
2695
  z.current && (clearTimeout(z.current), z.current = null), T.current && (clearInterval(T.current), T.current = null), I.current && (I.current.close(), I.current = null);
2692
2696
  }, []), M = W(async () => {
@@ -2746,7 +2750,7 @@ function np({
2746
2750
  C.current = 0, M();
2747
2751
  }, [M]);
2748
2752
  return {
2749
- isConnected: f,
2753
+ isConnected: g,
2750
2754
  connectionError: v,
2751
2755
  disconnect: S,
2752
2756
  reconnect: R
@@ -2808,10 +2812,10 @@ function lp(t) {
2808
2812
  enabled: !o && !!i,
2809
2813
  onNotification: W(
2810
2814
  (p) => {
2811
- s(async (f) => !f || f.notifications.some(
2815
+ s(async (g) => !g || g.notifications.some(
2812
2816
  (v) => v.id === p.id.toString()
2813
- ) ? f : {
2814
- ...f,
2817
+ ) ? g : {
2818
+ ...g,
2815
2819
  notifications: [
2816
2820
  {
2817
2821
  id: p.id.toString(),
@@ -2827,10 +2831,10 @@ function lp(t) {
2827
2831
  created_at: p.created_at,
2828
2832
  updated_at: p.created_at
2829
2833
  },
2830
- ...f.notifications
2834
+ ...g.notifications
2831
2835
  ],
2832
- unread_count: f.unread_count + 1,
2833
- total: f.total + 1
2836
+ unread_count: g.unread_count + 1,
2837
+ total: g.total + 1
2834
2838
  }, !1);
2835
2839
  },
2836
2840
  [s]
@@ -2838,40 +2842,40 @@ function lp(t) {
2838
2842
  onError: W(() => {
2839
2843
  }, [])
2840
2844
  });
2841
- const g = W(
2845
+ const f = W(
2842
2846
  async (p) => {
2843
- o || (await s(async (f) => f && {
2844
- ...f,
2845
- notifications: f.notifications.map(
2847
+ o || (await s(async (g) => g && {
2848
+ ...g,
2849
+ notifications: g.notifications.map(
2846
2850
  (y) => y.id === p ? { ...y, is_read: !0 } : y
2847
2851
  ),
2848
- unread_count: Math.max(0, f.unread_count - 1)
2852
+ unread_count: Math.max(0, g.unread_count - 1)
2849
2853
  }, !1), await ap(r, p), await s());
2850
2854
  },
2851
2855
  [r, o, s]
2852
2856
  ), c = W(async () => {
2853
2857
  o || (await s(async (p) => p && {
2854
2858
  ...p,
2855
- notifications: p.notifications.map((f) => ({
2856
- ...f,
2859
+ notifications: p.notifications.map((g) => ({
2860
+ ...g,
2857
2861
  is_read: !0
2858
2862
  })),
2859
2863
  unread_count: 0
2860
2864
  }, !1), await sp(r), await s());
2861
2865
  }, [r, s]), h = W(
2862
2866
  async (p) => {
2863
- o || (await s(async (f) => {
2864
- if (!f) return f;
2865
- const y = f.notifications.find(
2867
+ o || (await s(async (g) => {
2868
+ if (!g) return g;
2869
+ const y = g.notifications.find(
2866
2870
  (v) => v.id === p
2867
2871
  );
2868
2872
  return {
2869
- ...f,
2870
- notifications: f.notifications.filter(
2873
+ ...g,
2874
+ notifications: g.notifications.filter(
2871
2875
  (v) => v.id !== p
2872
2876
  ),
2873
- unread_count: y && !y.is_read ? Math.max(0, f.unread_count - 1) : f.unread_count,
2874
- total: Math.max(0, f.total - 1)
2877
+ unread_count: y && !y.is_read ? Math.max(0, g.unread_count - 1) : g.unread_count,
2878
+ total: Math.max(0, g.total - 1)
2875
2879
  };
2876
2880
  }, !1), await cp(r, p), await s());
2877
2881
  },
@@ -2899,7 +2903,7 @@ function lp(t) {
2899
2903
  unreadCounts: i.unread_counts,
2900
2904
  channels: i.channels,
2901
2905
  hasMore: i.has_more,
2902
- markAsRead: g,
2906
+ markAsRead: f,
2903
2907
  markAllAsRead: c,
2904
2908
  deleteNotification: h,
2905
2909
  refetch: l
@@ -3098,7 +3102,7 @@ function pp({
3098
3102
  platformAdapter: i,
3099
3103
  autoConnect: a = !0
3100
3104
  }) {
3101
- const { deployment: s } = ze(), { client: u } = Ye(), [g, c] = P([]), [h, l] = P(null), [p, f] = P(null), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P(
3105
+ const { deployment: s } = ze(), { client: u } = Ye(), [f, c] = P([]), [h, l] = P(null), [p, g] = P(null), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P(
3102
3106
  We.IDLE
3103
3107
  ), [T, E] = P({ status: $t.DISCONNECTED }), [$, x] = P(!0), [m, b] = P(!1), k = ce(null), _ = ce(
3104
3108
  null
@@ -3145,9 +3149,9 @@ function pp({
3145
3149
  [h]
3146
3150
  ), M = W((H) => {
3147
3151
  var ae, ge, Q, pe, ke, me, V, ve;
3148
- const { id: Z, message_type: ie, content: se } = H, te = (X) => g.some((Y) => Y.id === X);
3152
+ const { id: Z, message_type: ie, content: se } = H, te = (X) => f.some((Y) => Y.id === X);
3149
3153
  if (ie === "system_decision" || ie === "action_execution_result" || ie === "assistant_task_breakdown" || ie === "assistant_validation" || ie === "assistant_action_planning" || ie === "context_results") {
3150
- l(null), f(null);
3154
+ l(null), g(null);
3151
3155
  let X = "";
3152
3156
  if (ie === "system_decision") {
3153
3157
  const Y = se == null ? void 0 : se.step, de = se == null ? void 0 : se.reasoning;
@@ -3207,7 +3211,7 @@ function pp({
3207
3211
  return;
3208
3212
  }
3209
3213
  if (ie === "user_message")
3210
- te(Z) || (l(null), f(null), c((X) => [
3214
+ te(Z) || (l(null), g(null), c((X) => [
3211
3215
  ...X,
3212
3216
  {
3213
3217
  id: Z,
@@ -3218,7 +3222,7 @@ function pp({
3218
3222
  }
3219
3223
  ]));
3220
3224
  else if (ie === "agent_response")
3221
- te(Z) || (l(null), f(null), I(!1), C(We.IDLE), _.current = null, c((X) => [
3225
+ te(Z) || (l(null), g(null), I(!1), C(We.IDLE), _.current = null, c((X) => [
3222
3226
  ...X,
3223
3227
  {
3224
3228
  id: Z,
@@ -3229,7 +3233,7 @@ function pp({
3229
3233
  }
3230
3234
  ]));
3231
3235
  else if (ie === "assistant_acknowledgment")
3232
- te(Z) || (l(null), f(null), c((X) => [
3236
+ te(Z) || (l(null), g(null), c((X) => [
3233
3237
  ...X,
3234
3238
  {
3235
3239
  id: Z,
@@ -3372,7 +3376,7 @@ function pp({
3372
3376
  }), () => {
3373
3377
  }), [y, t, r]), N = W(
3374
3378
  (H, Z) => {
3375
- y && (l(H), f(Z || null), I(!0), C(We.STARTING), it.send({
3379
+ y && (l(H), g(Z || null), I(!0), C(We.STARTING), it.send({
3376
3380
  message_type: { message_input: H },
3377
3381
  data: Z ? { images: Z } : {}
3378
3382
  }));
@@ -3526,7 +3530,7 @@ function pp({
3526
3530
  }), I(!1), C("idle"));
3527
3531
  }, [y, w]);
3528
3532
  return {
3529
- messages: g,
3533
+ messages: f,
3530
3534
  pendingMessage: h,
3531
3535
  pendingImages: p,
3532
3536
  connectionState: T,
@@ -3546,22 +3550,21 @@ function pp({
3546
3550
  };
3547
3551
  }
3548
3552
  const up = () => {
3549
- const { client: t } = Ye(), [r, o] = P(!1), [i, a] = P(null), [s, u] = P(null), g = W(async (h) => {
3553
+ const { client: t } = Ye(), [r, o] = P(!1), [i, a] = P(null), [s, u] = P(null), f = W(async (h) => {
3550
3554
  o(!0), a(null), u(null);
3551
3555
  try {
3552
- const l = await t("/organizations/invitations/accept", {
3556
+ const l = new FormData();
3557
+ l.append("token", h);
3558
+ const p = await t("/organizations/invitations/accept", {
3553
3559
  method: "POST",
3554
- headers: {
3555
- "Content-Type": "application/json"
3556
- },
3557
- body: JSON.stringify({ token: h })
3558
- }), f = (await q(l)).data;
3559
- return u(f), f.error_code && a(f.message || "Failed to accept invitation"), f;
3560
+ body: l
3561
+ }), y = (await q(p)).data;
3562
+ return u(y), y.error_code && a(y.message || "Failed to accept invitation"), y;
3560
3563
  } catch (l) {
3561
3564
  const p = l.message || "Failed to accept invitation";
3562
3565
  a(p);
3563
- const f = { error_code: "NETWORK_ERROR", message: p };
3564
- return u(f), f;
3566
+ const g = { error_code: "NETWORK_ERROR", message: p };
3567
+ return u(g), g;
3565
3568
  } finally {
3566
3569
  o(!1);
3567
3570
  }
@@ -3569,7 +3572,7 @@ const up = () => {
3569
3572
  a(null), u(null);
3570
3573
  }, []);
3571
3574
  return {
3572
- acceptInvitation: g,
3575
+ acceptInvitation: f,
3573
3576
  invitationData: s,
3574
3577
  loading: r,
3575
3578
  error: i,
@@ -3651,8 +3654,8 @@ function na(t, r) {
3651
3654
  });
3652
3655
  }
3653
3656
  var rn = 1, $r = 1, $c = 0, at = 0, Ve = 0, Rr = "";
3654
- function on(t, r, o, i, a, s, u, g) {
3655
- return { value: t, root: r, parent: o, type: i, props: a, children: s, line: rn, column: $r, length: u, return: "", siblings: g };
3657
+ function on(t, r, o, i, a, s, u, f) {
3658
+ return { value: t, root: r, parent: o, type: i, props: a, children: s, line: rn, column: $r, length: u, return: "", siblings: f };
3656
3659
  }
3657
3660
  function Mt(t, r) {
3658
3661
  return ui(on("", null, null, "", null, null, 0, t.siblings), t, { length: -t.length }, r);
@@ -3773,13 +3776,13 @@ function $p(t) {
3773
3776
  function Ip(t) {
3774
3777
  return kp(No("", null, null, null, [""], t = _p(t), 0, [0], t));
3775
3778
  }
3776
- function No(t, r, o, i, a, s, u, g, c) {
3777
- for (var h = 0, l = 0, p = u, f = 0, y = 0, v = 0, w = 1, I = 1, z = 1, C = 0, T = "", E = a, $ = s, x = i, m = T; I; )
3779
+ function No(t, r, o, i, a, s, u, f, c) {
3780
+ for (var h = 0, l = 0, p = u, g = 0, y = 0, v = 0, w = 1, I = 1, z = 1, C = 0, T = "", E = a, $ = s, x = i, m = T; I; )
3778
3781
  switch (v = C, C = lt()) {
3779
3782
  // (
3780
3783
  case 40:
3781
3784
  if (v != 108 && qe(m, p - 1) == 58) {
3782
- Ao(m += Se(_n(C), "&", "&\f"), "&\f", Cc(h ? g[h - 1] : 0)) != -1 && (z = -1);
3785
+ Ao(m += Se(_n(C), "&", "&\f"), "&\f", Cc(h ? f[h - 1] : 0)) != -1 && (z = -1);
3783
3786
  break;
3784
3787
  }
3785
3788
  // " ' [
@@ -3812,7 +3815,7 @@ function No(t, r, o, i, a, s, u, g, c) {
3812
3815
  break;
3813
3816
  // {
3814
3817
  case 123 * w:
3815
- g[h++] = pt(m) * z;
3818
+ f[h++] = pt(m) * z;
3816
3819
  // } ; \0
3817
3820
  case 125 * w:
3818
3821
  case 59:
@@ -3831,20 +3834,20 @@ function No(t, r, o, i, a, s, u, g, c) {
3831
3834
  m += ";";
3832
3835
  // { rule/at-rule
3833
3836
  default:
3834
- if (Gr(x = ia(m, r, o, h, l, a, g, T, E = [], $ = [], p, s), s), C === 123)
3837
+ if (Gr(x = ia(m, r, o, h, l, a, f, T, E = [], $ = [], p, s), s), C === 123)
3835
3838
  if (l === 0)
3836
- No(m, r, x, x, E, s, p, g, $);
3839
+ No(m, r, x, x, E, s, p, f, $);
3837
3840
  else
3838
- switch (f === 99 && qe(m, 3) === 110 ? 100 : f) {
3841
+ switch (g === 99 && qe(m, 3) === 110 ? 100 : g) {
3839
3842
  // d l m s
3840
3843
  case 100:
3841
3844
  case 108:
3842
3845
  case 109:
3843
3846
  case 115:
3844
- No(t, x, x, i && Gr(ia(t, x, x, 0, 0, a, g, T, a, E = [], p, $), $), a, $, p, g, i ? E : $);
3847
+ No(t, x, x, i && Gr(ia(t, x, x, 0, 0, a, f, T, a, E = [], p, $), $), a, $, p, f, i ? E : $);
3845
3848
  break;
3846
3849
  default:
3847
- No(m, x, x, x, [""], $, 0, g, $);
3850
+ No(m, x, x, x, [""], $, 0, f, $);
3848
3851
  }
3849
3852
  }
3850
3853
  h = l = y = 0, w = z = 1, T = m = "", p = u;
@@ -3866,11 +3869,11 @@ function No(t, r, o, i, a, s, u, g, c) {
3866
3869
  break;
3867
3870
  // ,
3868
3871
  case 44:
3869
- g[h++] = (pt(m) - 1) * z, z = 1;
3872
+ f[h++] = (pt(m) - 1) * z, z = 1;
3870
3873
  break;
3871
3874
  // @
3872
3875
  case 64:
3873
- rr() === 45 && (m += _n(lt())), f = rr(), l = p = pt(T = m += $p(Do())), C++;
3876
+ rr() === 45 && (m += _n(lt())), g = rr(), l = p = pt(T = m += $p(Do())), C++;
3874
3877
  break;
3875
3878
  // -
3876
3879
  case 45:
@@ -3879,11 +3882,11 @@ function No(t, r, o, i, a, s, u, g, c) {
3879
3882
  }
3880
3883
  return s;
3881
3884
  }
3882
- function ia(t, r, o, i, a, s, u, g, c, h, l, p) {
3883
- for (var f = a - 1, y = a === 0 ? s : [""], v = zc(y), w = 0, I = 0, z = 0; w < i; ++w)
3884
- for (var C = 0, T = zr(t, f + 1, f = Cc(I = u[w])), E = t; C < v; ++C)
3885
+ function ia(t, r, o, i, a, s, u, f, c, h, l, p) {
3886
+ for (var g = a - 1, y = a === 0 ? s : [""], v = zc(y), w = 0, I = 0, z = 0; w < i; ++w)
3887
+ for (var C = 0, T = zr(t, g + 1, g = Cc(I = u[w])), E = t; C < v; ++C)
3885
3888
  (E = Sc(I > 0 ? y[C] + " " + T : Se(T, /&\f/g, y[C]))) && (c[z++] = E);
3886
- return on(t, r, o, a === 0 ? tn : g, c, h, l, p);
3889
+ return on(t, r, o, a === 0 ? tn : f, c, h, l, p);
3887
3890
  }
3888
3891
  function Ep(t, r, o, i) {
3889
3892
  return on(t, r, o, _c, Ri(xp()), zr(t, 2, -2), 0, i);
@@ -4044,8 +4047,8 @@ function Ic(t, r, o) {
4044
4047
  // grid-(column|row)
4045
4048
  case 5152:
4046
4049
  case 5920:
4047
- return Se(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(i, a, s, u, g, c, h) {
4048
- return Ae + a + ":" + s + h + (u ? Ae + a + "-span:" + (g ? c : +c - +s) + h : "") + t;
4050
+ return Se(t, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(i, a, s, u, f, c, h) {
4051
+ return Ae + a + ":" + s + h + (u ? Ae + a + "-span:" + (f ? c : +c - +s) + h : "") + t;
4049
4052
  });
4050
4053
  // position: sticky
4051
4054
  case 4949:
@@ -4097,8 +4100,8 @@ function Pp(t, r, o, i) {
4097
4100
  function Tp(t) {
4098
4101
  var r = zc(t);
4099
4102
  return function(o, i, a, s) {
4100
- for (var u = "", g = 0; g < r; g++)
4101
- u += t[g](o, i, a, s) || "";
4103
+ for (var u = "", f = 0; f < r; f++)
4104
+ u += t[f](o, i, a, s) || "";
4102
4105
  return u;
4103
4106
  };
4104
4107
  }
@@ -4192,8 +4195,8 @@ See https://styled-components.com/docs/basics#define-styled-components-outside-o
4192
4195
  try {
4193
4196
  var s = !0;
4194
4197
  console.error = function(u) {
4195
- for (var g = [], c = 1; c < arguments.length; c++) g[c - 1] = arguments[c];
4196
- sa.test(u) ? (s = !1, io.delete(i)) : a.apply(void 0, sr([u], g, !1));
4198
+ for (var f = [], c = 1; c < arguments.length; c++) f[c - 1] = arguments[c];
4199
+ sa.test(u) ? (s = !1, io.delete(i)) : a.apply(void 0, sr([u], f, !1));
4197
4200
  }, ce(), s && !io.has(i) && (console.warn(i), io.add(i));
4198
4201
  } catch (u) {
4199
4202
  sa.test(u.message) && io.delete(i);
@@ -4246,8 +4249,8 @@ function Nc(t, r, o) {
4246
4249
  }
4247
4250
  var a = Hp(r);
4248
4251
  pa && (a = a.concat(pa(r)));
4249
- for (var s = da(t), u = da(r), g = 0; g < a.length; ++g) {
4250
- var c = a[g];
4252
+ for (var s = da(t), u = da(r), f = 0; f < a.length; ++f) {
4253
+ var c = a[f];
4251
4254
  if (!(c in Wp || o && o[c] || u && c in u || s && c in s)) {
4252
4255
  var h = qp(r, c);
4253
4256
  try {
@@ -4351,7 +4354,7 @@ var Qp = function() {
4351
4354
  this.groupSizes = new Uint32Array(s), this.groupSizes.set(i), this.length = s;
4352
4355
  for (var u = a; u < s; u++) this.groupSizes[u] = 0;
4353
4356
  }
4354
- for (var g = this.indexOfGroup(r + 1), c = (u = 0, o.length); u < c; u++) this.tag.insertRule(g, o[u]) && (this.groupSizes[r]++, g++);
4357
+ for (var f = this.indexOfGroup(r + 1), c = (u = 0, o.length); u < c; u++) this.tag.insertRule(f, o[u]) && (this.groupSizes[r]++, f++);
4355
4358
  }, t.prototype.clearGroup = function(r) {
4356
4359
  if (r < this.length) {
4357
4360
  var o = this.groupSizes[r], i = this.indexOfGroup(r), a = i + o;
@@ -4376,13 +4379,13 @@ var Qp = function() {
4376
4379
  for (var i, a = o.split(","), s = 0, u = a.length; s < u; s++) (i = a[s]) && t.registerName(r, i);
4377
4380
  }, ou = function(t, r) {
4378
4381
  for (var o, i = ((o = r.textContent) !== null && o !== void 0 ? o : "").split(Mi), a = [], s = 0, u = i.length; s < u; s++) {
4379
- var g = i[s].trim();
4380
- if (g) {
4381
- var c = g.match(tu);
4382
+ var f = i[s].trim();
4383
+ if (f) {
4384
+ var c = f.match(tu);
4382
4385
  if (c) {
4383
4386
  var h = 0 | parseInt(c[1], 10), l = c[2];
4384
4387
  h !== 0 && (Jp(l, h), ru(t, l, c[3]), t.getTag().insertRules(h, a)), a.length = 0;
4385
- } else a.push(g);
4388
+ } else a.push(f);
4386
4389
  }
4387
4390
  }
4388
4391
  }, ha = function(t) {
@@ -4395,8 +4398,8 @@ function nu() {
4395
4398
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
4396
4399
  }
4397
4400
  var Fc = function(t) {
4398
- var r = document.head, o = t || r, i = document.createElement("style"), a = function(g) {
4399
- var c = Array.from(g.querySelectorAll("style[".concat(cr, "]")));
4401
+ var r = document.head, o = t || r, i = document.createElement("style"), a = function(f) {
4402
+ var c = Array.from(f.querySelectorAll("style[".concat(cr, "]")));
4400
4403
  return c[c.length - 1];
4401
4404
  }(o), s = a !== void 0 ? a.nextSibling : null;
4402
4405
  i.setAttribute(cr, Ec), i.setAttribute(Pc, an);
@@ -4457,18 +4460,18 @@ var Fc = function(t) {
4457
4460
  var a = this;
4458
4461
  this.options = et(et({}, cu), r), this.gs = o, this.names = new Map(i), this.server = !!r.isServer, !this.server && qo && fa && (fa = !1, ha(this)), Li(this, function() {
4459
4462
  return function(s) {
4460
- for (var u = s.getTag(), g = u.length, c = "", h = function(p) {
4461
- var f = function(z) {
4463
+ for (var u = s.getTag(), f = u.length, c = "", h = function(p) {
4464
+ var g = function(z) {
4462
4465
  return Yo.get(z);
4463
4466
  }(p);
4464
- if (f === void 0) return "continue";
4465
- var y = s.names.get(f), v = u.getGroup(p);
4467
+ if (g === void 0) return "continue";
4468
+ var y = s.names.get(g), v = u.getGroup(p);
4466
4469
  if (y === void 0 || !y.size || v.length === 0) return "continue";
4467
- var w = "".concat(cr, ".g").concat(p, '[id="').concat(f, '"]'), I = "";
4470
+ var w = "".concat(cr, ".g").concat(p, '[id="').concat(g, '"]'), I = "";
4468
4471
  y !== void 0 && y.forEach(function(z) {
4469
4472
  z.length > 0 && (I += "".concat(z, ","));
4470
4473
  }), c += "".concat(v).concat(w, '{content:"').concat(I, '"}').concat(Mi);
4471
- }, l = 0; l < g; l++) h(l);
4474
+ }, l = 0; l < f; l++) h(l);
4472
4475
  return c;
4473
4476
  }(a);
4474
4477
  });
@@ -4513,23 +4516,23 @@ function Uc(t, r) {
4513
4516
  });
4514
4517
  }
4515
4518
  function pu(t) {
4516
- var r, o, i, a = Ir, s = a.options, u = s === void 0 ? Ir : s, g = a.plugins, c = g === void 0 ? sn : g, h = function(f, y, v) {
4517
- return v.startsWith(o) && v.endsWith(o) && v.replaceAll(o, "").length > 0 ? ".".concat(r) : f;
4519
+ var r, o, i, a = Ir, s = a.options, u = s === void 0 ? Ir : s, f = a.plugins, c = f === void 0 ? sn : f, h = function(g, y, v) {
4520
+ return v.startsWith(o) && v.endsWith(o) && v.replaceAll(o, "").length > 0 ? ".".concat(r) : g;
4518
4521
  }, l = c.slice();
4519
- l.push(function(f) {
4520
- f.type === tn && f.value.includes("&") && (f.props[0] = f.props[0].replace(lu, o).replace(i, h));
4522
+ l.push(function(g) {
4523
+ g.type === tn && g.value.includes("&") && (g.props[0] = g.props[0].replace(lu, o).replace(i, h));
4521
4524
  }), u.prefix && l.push(Mp), l.push(Pp);
4522
- var p = function(f, y, v, w) {
4525
+ var p = function(g, y, v, w) {
4523
4526
  y === void 0 && (y = ""), v === void 0 && (v = ""), w === void 0 && (w = "&"), r = w, o = y, i = new RegExp("\\".concat(o, "\\b"), "g");
4524
- var I = f.replace(du, ""), z = Ip(v || y ? "".concat(v, " ").concat(y, " { ").concat(I, " }") : I);
4527
+ var I = g.replace(du, ""), z = Ip(v || y ? "".concat(v, " ").concat(y, " { ").concat(I, " }") : I);
4525
4528
  u.namespace && (z = Uc(z, u.namespace));
4526
4529
  var C = [];
4527
4530
  return Ho(z, Tp(l.concat(Rp(function(T) {
4528
4531
  return C.push(T);
4529
4532
  })))), C;
4530
4533
  };
4531
- return p.hash = c.length ? c.reduce(function(f, y) {
4532
- return y.name || Mr(15), Jt(f, y.name);
4534
+ return p.hash = c.length ? c.reduce(function(g, y) {
4535
+ return y.name || Mr(15), Jt(g, y.name);
4533
4536
  }, Tc).toString() : "", p;
4534
4537
  }
4535
4538
  var uu = new Bc(), bi = pu(), jc = xe.createContext({ shouldForwardProp: void 0, styleSheet: uu, stylis: bi });
@@ -4603,8 +4606,8 @@ var gu = Rc(an), mu = function() {
4603
4606
  else {
4604
4607
  var s = vi(or(this.rules, r, o, i)), u = mi(Jt(this.baseHash, s) >>> 0);
4605
4608
  if (!o.hasNameForId(this.componentId, u)) {
4606
- var g = i(s, ".".concat(u), void 0, this.componentId);
4607
- o.insertRules(this.componentId, u, g);
4609
+ var f = i(s, ".".concat(u), void 0, this.componentId);
4610
+ o.insertRules(this.componentId, u, f);
4608
4611
  }
4609
4612
  a = tr(a, u), this.staticRulesId = u;
4610
4613
  }
@@ -4613,8 +4616,8 @@ var gu = Rc(an), mu = function() {
4613
4616
  var p = this.rules[l];
4614
4617
  if (typeof p == "string") h += p, process.env.NODE_ENV !== "production" && (c = Jt(c, p));
4615
4618
  else if (p) {
4616
- var f = vi(or(p, r, o, i));
4617
- c = Jt(c, f + l), h += f;
4619
+ var g = vi(or(p, r, o, i));
4620
+ c = Jt(c, g + l), h += g;
4618
4621
  }
4619
4622
  }
4620
4623
  if (h) {
@@ -4628,14 +4631,14 @@ var gu = Rc(an), mu = function() {
4628
4631
  Gc.Consumer;
4629
4632
  var Sn = {}, va = /* @__PURE__ */ new Set();
4630
4633
  function vu(t, r, o) {
4631
- var i = Oi(t), a = t, s = !Cn(t), u = r.attrs, g = u === void 0 ? sn : u, c = r.componentId, h = c === void 0 ? function(E, $) {
4634
+ var i = Oi(t), a = t, s = !Cn(t), u = r.attrs, f = u === void 0 ? sn : u, c = r.componentId, h = c === void 0 ? function(E, $) {
4632
4635
  var x = typeof E != "string" ? "sc" : ca(E);
4633
4636
  Sn[x] = (Sn[x] || 0) + 1;
4634
4637
  var m = "".concat(x, "-").concat(Mc(an + x + Sn[x]));
4635
4638
  return $ ? "".concat($, "-").concat(m) : m;
4636
4639
  }(r.displayName, r.parentComponentId) : c, l = r.displayName, p = l === void 0 ? function(E) {
4637
4640
  return Cn(E) ? "styled.".concat(E) : "Styled(".concat(Oc(E), ")");
4638
- }(t) : l, f = r.displayName && r.componentId ? "".concat(ca(r.displayName), "-").concat(r.componentId) : r.componentId || h, y = i && a.attrs ? a.attrs.concat(g).filter(Boolean) : g, v = r.shouldForwardProp;
4641
+ }(t) : l, g = r.displayName && r.componentId ? "".concat(ca(r.displayName), "-").concat(r.componentId) : r.componentId || h, y = i && a.attrs ? a.attrs.concat(f).filter(Boolean) : f, v = r.shouldForwardProp;
4639
4642
  if (i && a.shouldForwardProp) {
4640
4643
  var w = a.shouldForwardProp;
4641
4644
  if (r.shouldForwardProp) {
@@ -4645,7 +4648,7 @@ function vu(t, r, o) {
4645
4648
  };
4646
4649
  } else v = w;
4647
4650
  }
4648
- var z = new mu(o, f, i ? a.componentStyle : void 0);
4651
+ var z = new mu(o, g, i ? a.componentStyle : void 0);
4649
4652
  function C(E, $) {
4650
4653
  return function(x, m, b) {
4651
4654
  var k = x.attrs, _ = x.componentStyle, O = x.defaultProps, M = x.foldedComponentIds, S = x.styledComponentId, R = x.target, L = xe.useContext(Gc), U = ga(), N = x.shouldForwardProp || U.shouldForwardProp;
@@ -4669,7 +4672,7 @@ function vu(t, r, o) {
4669
4672
  }
4670
4673
  C.displayName = p;
4671
4674
  var T = xe.forwardRef(C);
4672
- return T.attrs = y, T.componentStyle = z, T.displayName = p, T.shouldForwardProp = v, T.foldedComponentIds = i ? tr(a.foldedComponentIds, a.styledComponentId) : "", T.styledComponentId = f, T.target = i ? a.target : t, Object.defineProperty(T, "defaultProps", { get: function() {
4675
+ return T.attrs = y, T.componentStyle = z, T.displayName = p, T.shouldForwardProp = v, T.foldedComponentIds = i ? tr(a.foldedComponentIds, a.styledComponentId) : "", T.styledComponentId = g, T.target = i ? a.target : t, Object.defineProperty(T, "defaultProps", { get: function() {
4673
4676
  return this._foldedDefaultProps;
4674
4677
  }, set: function(E) {
4675
4678
  this._foldedDefaultProps = i ? function($) {
@@ -4677,7 +4680,7 @@ function vu(t, r, o) {
4677
4680
  for (var b = 0, k = x; b < k.length; b++) yi($, k[b], !0);
4678
4681
  return $;
4679
4682
  }({}, a.defaultProps, E) : E;
4680
- } }), process.env.NODE_ENV !== "production" && (Ap(p, f), T.warnTooManyClasses = /* @__PURE__ */ function(E, $) {
4683
+ } }), process.env.NODE_ENV !== "production" && (Ap(p, g), T.warnTooManyClasses = /* @__PURE__ */ function(E, $) {
4681
4684
  var x = {}, m = !1;
4682
4685
  return function(b) {
4683
4686
  if (!m && (x[b] = !0, Object.keys(x).length >= 200)) {
@@ -4694,7 +4697,7 @@ Example:
4694
4697
  <Component />`), m = !0, x = {};
4695
4698
  }
4696
4699
  };
4697
- }(p, f)), Li(T, function() {
4700
+ }(p, g)), Li(T, function() {
4698
4701
  return ".".concat(T.styledComponentId);
4699
4702
  }), s && Nc(T, t, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), T;
4700
4703
  }
@@ -4781,7 +4784,7 @@ const xu = Si(
4781
4784
  className: a = "",
4782
4785
  children: s,
4783
4786
  iconNode: u,
4784
- ...g
4787
+ ...f
4785
4788
  }, c) => Vo(
4786
4789
  "svg",
4787
4790
  {
@@ -4792,7 +4795,7 @@ const xu = Si(
4792
4795
  stroke: t,
4793
4796
  strokeWidth: i ? Number(o) * 24 / Number(r) : o,
4794
4797
  className: qc("lucide", a),
4795
- ...g
4798
+ ...f
4796
4799
  },
4797
4800
  [
4798
4801
  ...u.map(([h, l]) => Vo(h, l)),
@@ -5534,19 +5537,19 @@ function fr({
5534
5537
  error: i,
5535
5538
  isSubmitting: a = !1
5536
5539
  }) {
5537
- const [s, u] = P(new Array(t).fill("")), [g, c] = P(60), [h, l] = P(!1), p = ce([]), f = W(() => {
5540
+ const [s, u] = P(new Array(t).fill("")), [f, c] = P(60), [h, l] = P(!1), p = ce([]), g = W(() => {
5538
5541
  const z = setInterval(() => {
5539
5542
  c((C) => C <= 1 ? (l(!0), clearInterval(z), 0) : C - 1);
5540
5543
  }, 1e3);
5541
5544
  return z;
5542
5545
  }, []);
5543
5546
  le(() => {
5544
- const z = f();
5547
+ const z = g();
5545
5548
  return () => clearInterval(z);
5546
- }, [f]);
5549
+ }, [g]);
5547
5550
  const y = async () => {
5548
5551
  var z;
5549
- !h || a || !o || (await o(), l(!1), c(60), u(new Array(t).fill("")), (z = p.current[0]) == null || z.focus(), f());
5552
+ !h || a || !o || (await o(), l(!1), c(60), u(new Array(t).fill("")), (z = p.current[0]) == null || z.focus(), g());
5550
5553
  }, v = (z, C) => {
5551
5554
  var x;
5552
5555
  if (a) return;
@@ -5612,7 +5615,7 @@ function fr({
5612
5615
  }
5613
5616
  ) : /* @__PURE__ */ n(zh, { children: [
5614
5617
  "Resend code in ",
5615
- g,
5618
+ f,
5616
5619
  "s"
5617
5620
  ] }) })
5618
5621
  ] });
@@ -5871,12 +5874,12 @@ const Zc = (t) => /* @__PURE__ */ n(
5871
5874
  t.slice(4, 8),
5872
5875
  t.slice(8)
5873
5876
  ], i = t.length, a = o();
5874
- return /* @__PURE__ */ e(Eh, { children: a.map((s, u) => /* @__PURE__ */ e(Ph, { children: s.map((g, c) => {
5875
- const h = g.provider;
5877
+ return /* @__PURE__ */ e(Eh, { children: a.map((s, u) => /* @__PURE__ */ e(Ph, { children: s.map((f, c) => {
5878
+ const h = f.provider;
5876
5879
  return /* @__PURE__ */ n(
5877
5880
  Th,
5878
5881
  {
5879
- onClick: () => r(g),
5882
+ onClick: () => r(f),
5880
5883
  type: "button",
5881
5884
  $isWide: a.length > 1 && u < a.length - 1,
5882
5885
  $totalProviders: i,
@@ -5885,7 +5888,7 @@ const Zc = (t) => /* @__PURE__ */ n(
5885
5888
  i < 3 && /* @__PURE__ */ e("span", { children: i === 1 ? En[h].fullLabel : En[h].shortLabel })
5886
5889
  ]
5887
5890
  },
5888
- `${g.provider}-${c}`
5891
+ `${f.provider}-${c}`
5889
5892
  );
5890
5893
  }) }, `row-${u}`)) });
5891
5894
  }, ht = ({
@@ -6350,9 +6353,9 @@ const Zc = (t) => /* @__PURE__ */ n(
6350
6353
  countryCode: i,
6351
6354
  setCountryCode: a
6352
6355
  }) => {
6353
- const [s, u] = P(!1), [g, c] = P(
6356
+ const [s, u] = P(!1), [f, c] = P(
6354
6357
  Uo.find((v) => v.code === i) || Uo[0]
6355
- ), h = ce(null), [l, p] = P(""), f = ce(null);
6358
+ ), h = ce(null), [l, p] = P(""), g = ce(null);
6356
6359
  le(() => {
6357
6360
  function v(w) {
6358
6361
  h.current && !h.current.contains(w.target) && u(!1);
@@ -6365,8 +6368,8 @@ const Zc = (t) => /* @__PURE__ */ n(
6365
6368
  (v) => v.name.toLowerCase().includes(l.toLowerCase()) || v.dialCode.includes(l)
6366
6369
  );
6367
6370
  return le(() => {
6368
- a(g.dialCode);
6369
- }, [g, a]), /* @__PURE__ */ n(Mh, { children: [
6371
+ a(f.dialCode);
6372
+ }, [f, a]), /* @__PURE__ */ n(Mh, { children: [
6370
6373
  /* @__PURE__ */ n(Oh, { ref: h, children: [
6371
6374
  /* @__PURE__ */ n(
6372
6375
  Lh,
@@ -6374,8 +6377,8 @@ const Zc = (t) => /* @__PURE__ */ n(
6374
6377
  type: "button",
6375
6378
  onClick: () => u((v) => !v),
6376
6379
  children: [
6377
- /* @__PURE__ */ e("span", { children: g.flag }),
6378
- /* @__PURE__ */ e("span", { children: g.dialCode })
6380
+ /* @__PURE__ */ e("span", { children: f.flag }),
6381
+ /* @__PURE__ */ e("span", { children: f.dialCode })
6379
6382
  ]
6380
6383
  }
6381
6384
  ),
@@ -6395,7 +6398,7 @@ const Zc = (t) => /* @__PURE__ */ n(
6395
6398
  {
6396
6399
  onClick: (w) => {
6397
6400
  var I;
6398
- w.stopPropagation(), w.preventDefault(), c(v), u(!1), (I = f.current) == null || I.focus();
6401
+ w.stopPropagation(), w.preventDefault(), c(v), u(!1), (I = g.current) == null || I.focus();
6399
6402
  },
6400
6403
  children: [
6401
6404
  /* @__PURE__ */ e("span", { children: v.flag }),
@@ -6417,7 +6420,7 @@ const Zc = (t) => /* @__PURE__ */ n(
6417
6420
  required: !0,
6418
6421
  minLength: 7,
6419
6422
  maxLength: 15,
6420
- ref: f,
6423
+ ref: g,
6421
6424
  value: t,
6422
6425
  onChange: r,
6423
6426
  placeholder: "Phone number",
@@ -6653,7 +6656,7 @@ const Vh = hr`
6653
6656
  function ab() {
6654
6657
  var H, Z, ie, se, te, ae, ge, Q, pe, ke, me, V, ve, X, Y, de, _e;
6655
6658
  const { loading: t, signUp: r, signupAttempt: o, discardSignupAttempt: i } = Bd(), { signIn: a } = Go("oauth"), { deployment: s } = ze(), { navigate: u } = Je(), {
6656
- session: g,
6659
+ session: f,
6657
6660
  refetch: c,
6658
6661
  loading: h
6659
6662
  } = Ze(), [l, p] = P({
@@ -6663,10 +6666,10 @@ function ab() {
6663
6666
  password: "",
6664
6667
  username: "",
6665
6668
  phone_number: ""
6666
- }), [f, y] = P({}), [v, w] = P(!1), [I, z] = P(void 0), [C, T] = P(null), [E, $] = P(null), [x, m] = P(!1), b = ((H = s == null ? void 0 : s.restrictions) == null ? void 0 : H.sign_up_mode) === "restricted", k = ((Z = s == null ? void 0 : s.restrictions) == null ? void 0 : Z.sign_up_mode) === "waitlist", _ = ((se = (ie = s == null ? void 0 : s.auth_settings) == null ? void 0 : ie.multi_session_support) == null ? void 0 : se.enabled) ?? !1;
6669
+ }), [g, y] = P({}), [v, w] = P(!1), [I, z] = P(void 0), [C, T] = P(null), [E, $] = P(null), [x, m] = P(!1), b = ((H = s == null ? void 0 : s.restrictions) == null ? void 0 : H.sign_up_mode) === "restricted", k = ((Z = s == null ? void 0 : s.restrictions) == null ? void 0 : Z.sign_up_mode) === "waitlist", _ = ((se = (ie = s == null ? void 0 : s.auth_settings) == null ? void 0 : ie.multi_session_support) == null ? void 0 : se.enabled) ?? !1;
6667
6670
  le(() => {
6668
6671
  var ye;
6669
- if (!h && (g != null && g.active_signin) && !_ && !x) {
6672
+ if (!h && (f != null && f.active_signin) && !_ && !x) {
6670
6673
  m(!0);
6671
6674
  let G = new URLSearchParams(window.location.search).get(
6672
6675
  "redirect_uri"
@@ -6674,7 +6677,7 @@ function ab() {
6674
6677
  G || (G = ((ye = s == null ? void 0 : s.ui_settings) == null ? void 0 : ye.after_signin_redirect_url) || null), !G && (s != null && s.frontend_host) && (G = `https://${s.frontend_host}`), !G && (s != null && s.frontend_host) && (G = `https://${s.frontend_host}`), G && u(G);
6675
6678
  }
6676
6679
  }, [
6677
- g,
6680
+ f,
6678
6681
  h,
6679
6682
  _,
6680
6683
  s,
@@ -6796,7 +6799,7 @@ function ab() {
6796
6799
  M(!0);
6797
6800
  }
6798
6801
  }
6799
- }, [o, r, O, s, g, u]), h ? /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(lo, { children: [
6802
+ }, [o, r, O, s, f, u]), h ? /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(lo, { children: [
6800
6803
  /* @__PURE__ */ e(Ne, {}),
6801
6804
  /* @__PURE__ */ e(wa, { children: /* @__PURE__ */ e(Et, { size: 32 }) })
6802
6805
  ] }) }) : x ? /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(lo, { children: [
@@ -6843,7 +6846,7 @@ function ab() {
6843
6846
  const ye = (o == null ? void 0 : o.current_step) === "verify_email" ? "email_otp" : "phone_otp";
6844
6847
  await r.prepareVerification({ strategy: ye });
6845
6848
  },
6846
- error: f.otp,
6849
+ error: g.otp,
6847
6850
  isSubmitting: v
6848
6851
  }
6849
6852
  ),
@@ -6908,11 +6911,11 @@ function ab() {
6908
6911
  value: l.first_name,
6909
6912
  onChange: L,
6910
6913
  placeholder: "First name",
6911
- "aria-invalid": !!f.first_name,
6914
+ "aria-invalid": !!g.first_name,
6912
6915
  pattern: "^[a-zA-Z]{3,30}$"
6913
6916
  }
6914
6917
  ),
6915
- f.first_name && /* @__PURE__ */ e(jt, { children: f.first_name })
6918
+ g.first_name && /* @__PURE__ */ e(jt, { children: g.first_name })
6916
6919
  ] }),
6917
6920
  ((Y = D == null ? void 0 : D.last_name) == null ? void 0 : Y.enabled) && /* @__PURE__ */ n(mr, { children: [
6918
6921
  /* @__PURE__ */ n(vr, { htmlFor: "last_name", children: [
@@ -6931,11 +6934,11 @@ function ab() {
6931
6934
  value: l.last_name,
6932
6935
  onChange: L,
6933
6936
  placeholder: "Last name",
6934
- "aria-invalid": !!f.last_name,
6937
+ "aria-invalid": !!g.last_name,
6935
6938
  pattern: "^[a-zA-Z]{3,30}$"
6936
6939
  }
6937
6940
  ),
6938
- f.last_name && /* @__PURE__ */ e(jt, { children: f.last_name })
6941
+ g.last_name && /* @__PURE__ */ e(jt, { children: g.last_name })
6939
6942
  ] })
6940
6943
  ] }),
6941
6944
  (D == null ? void 0 : D.username.enabled) && /* @__PURE__ */ n(mr, { children: [
@@ -6954,12 +6957,12 @@ function ab() {
6954
6957
  value: l.username,
6955
6958
  onChange: L,
6956
6959
  placeholder: "Choose a username",
6957
- "aria-invalid": !!f.username,
6960
+ "aria-invalid": !!g.username,
6958
6961
  required: !0,
6959
6962
  pattern: "^[a-zA-Z][a-zA-Z0-9_.]{2,29}$"
6960
6963
  }
6961
6964
  ),
6962
- f.username && /* @__PURE__ */ e(jt, { children: f.username })
6965
+ g.username && /* @__PURE__ */ e(jt, { children: g.username })
6963
6966
  ] }),
6964
6967
  (D == null ? void 0 : D.email_address.enabled) && /* @__PURE__ */ n(mr, { children: [
6965
6968
  /* @__PURE__ */ n(vr, { htmlFor: "email", children: [
@@ -6976,13 +6979,13 @@ function ab() {
6976
6979
  value: l.email,
6977
6980
  onChange: L,
6978
6981
  placeholder: "Enter your email address",
6979
- "aria-invalid": !!f.email,
6982
+ "aria-invalid": !!g.email,
6980
6983
  required: !0,
6981
6984
  readOnly: (C == null ? void 0 : C.valid) && !!(C != null && C.email),
6982
6985
  pattern: "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
6983
6986
  }
6984
6987
  ),
6985
- f.email && /* @__PURE__ */ e(jt, { children: f.email })
6988
+ g.email && /* @__PURE__ */ e(jt, { children: g.email })
6986
6989
  ] }),
6987
6990
  (D == null ? void 0 : D.phone_number.enabled) && /* @__PURE__ */ n(mr, { children: [
6988
6991
  /* @__PURE__ */ n(vr, { htmlFor: "phone_number", children: [
@@ -6994,12 +6997,12 @@ function ab() {
6994
6997
  {
6995
6998
  value: l.phone_number,
6996
6999
  onChange: L,
6997
- error: f.phone_number,
7000
+ error: g.phone_number,
6998
7001
  countryCode: I,
6999
7002
  setCountryCode: z
7000
7003
  }
7001
7004
  ),
7002
- f.phone_number && /* @__PURE__ */ e(jt, { children: f.phone_number })
7005
+ g.phone_number && /* @__PURE__ */ e(jt, { children: g.phone_number })
7003
7006
  ] }),
7004
7007
  (D == null ? void 0 : D.password.enabled) && /* @__PURE__ */ n(mr, { children: [
7005
7008
  /* @__PURE__ */ n(vr, { htmlFor: "password", children: [
@@ -7015,16 +7018,16 @@ function ab() {
7015
7018
  value: l.password,
7016
7019
  onChange: L,
7017
7020
  placeholder: "Enter your password",
7018
- "aria-invalid": !!f.password,
7021
+ "aria-invalid": !!g.password,
7019
7022
  required: !0,
7020
7023
  minLength: 8,
7021
7024
  maxLength: 128,
7022
7025
  pattern: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,125}$"
7023
7026
  }
7024
7027
  ) }),
7025
- f.password && /* @__PURE__ */ e(jt, { children: f.password })
7028
+ g.password && /* @__PURE__ */ e(jt, { children: g.password })
7026
7029
  ] }),
7027
- f.submit && /* @__PURE__ */ e(jt, { children: f.submit }),
7030
+ g.submit && /* @__PURE__ */ e(jt, { children: g.submit }),
7028
7031
  /* @__PURE__ */ e(Ca, { type: "submit", disabled: v || t, children: v ? "Creating account..." : "Continue" })
7029
7032
  ] }),
7030
7033
  /* @__PURE__ */ n(Sa, { children: [
@@ -7176,11 +7179,11 @@ const rl = Nt(void 0), ol = () => {
7176
7179
  }) => {
7177
7180
  const a = ce(null), [s, u] = P(!1);
7178
7181
  return le(() => {
7179
- const g = (c) => {
7182
+ const f = (c) => {
7180
7183
  a.current && !a.current.contains(c.target) && u(!1);
7181
7184
  };
7182
- return s && document.addEventListener("mousedown", g), () => {
7183
- document.removeEventListener("mousedown", g);
7185
+ return s && document.addEventListener("mousedown", f), () => {
7186
+ document.removeEventListener("mousedown", f);
7184
7187
  };
7185
7188
  }, [s, o]), le(() => {
7186
7189
  o == null || o(s);
@@ -7191,7 +7194,7 @@ const rl = Nt(void 0), ol = () => {
7191
7194
  {
7192
7195
  value: {
7193
7196
  open: s,
7194
- openChange: (g) => u(g)
7197
+ openChange: (f) => u(f)
7195
7198
  },
7196
7199
  children: /* @__PURE__ */ e(gf, { style: i, ref: a, children: t })
7197
7200
  }
@@ -7200,23 +7203,23 @@ const rl = Nt(void 0), ol = () => {
7200
7203
  children: t,
7201
7204
  style: r
7202
7205
  }) => {
7203
- const { open: o } = il(), [i, a] = P({ top: 0, left: 0 }), [s, u] = P(!1), g = ce(null);
7206
+ const { open: o } = il(), [i, a] = P({ top: 0, left: 0 }), [s, u] = P(!1), f = ce(null);
7204
7207
  return le(() => {
7205
- o && g.current ? (u(!1), requestAnimationFrame(() => {
7208
+ o && f.current ? (u(!1), requestAnimationFrame(() => {
7206
7209
  var l, p;
7207
- const c = (l = g.current) == null ? void 0 : l.parentElement;
7210
+ const c = (l = f.current) == null ? void 0 : l.parentElement;
7208
7211
  if (!c) return;
7209
7212
  const h = c.querySelector("[data-dropdown-trigger]") || c.firstElementChild;
7210
- if (h && h !== g.current) {
7211
- const f = h.getBoundingClientRect(), y = (p = g.current) == null ? void 0 : p.getBoundingClientRect(), v = window.innerWidth, w = window.innerHeight;
7212
- let I = f.bottom + 4, z = f.right - 200;
7213
- z < 8 && (z = f.left), z + 200 > v - 8 && (z = v - 208), y && I + y.height > w - 8 && (I = f.top - (y.height + 4)), a({ top: I, left: z }), u(!0);
7213
+ if (h && h !== f.current) {
7214
+ const g = h.getBoundingClientRect(), y = (p = f.current) == null ? void 0 : p.getBoundingClientRect(), v = window.innerWidth, w = window.innerHeight;
7215
+ let I = g.bottom + 4, z = g.right - 200;
7216
+ z < 8 && (z = g.left), z + 200 > v - 8 && (z = v - 208), y && I + y.height > w - 8 && (I = g.top - (y.height + 4)), a({ top: I, left: z }), u(!0);
7214
7217
  }
7215
7218
  })) : u(!1);
7216
7219
  }, [o]), o ? /* @__PURE__ */ e(
7217
7220
  ff,
7218
7221
  {
7219
- ref: g,
7222
+ ref: f,
7220
7223
  style: {
7221
7224
  ...r,
7222
7225
  top: `${i.top}px`,
@@ -7530,12 +7533,12 @@ const rl = Nt(void 0), ol = () => {
7530
7533
  disabled: a = !1,
7531
7534
  searchable: s = !1,
7532
7535
  width: u,
7533
- name: g,
7536
+ name: f,
7534
7537
  id: c,
7535
7538
  groupsEnabled: h = !1,
7536
7539
  className: l
7537
7540
  }) => {
7538
- const [p, f] = P(!1), [y, v] = P(""), w = ce(null), I = ce(null), z = h && "options" in t[0], T = (z ? t.flatMap((m) => m.options) : t).find((m) => m.value === r), E = y ? z ? t.map((m) => ({
7541
+ const [p, g] = P(!1), [y, v] = P(""), w = ce(null), I = ce(null), z = h && "options" in t[0], T = (z ? t.flatMap((m) => m.options) : t).find((m) => m.value === r), E = y ? z ? t.map((m) => ({
7539
7542
  ...m,
7540
7543
  options: m.options.filter(
7541
7544
  (b) => b.label.toLowerCase().includes(y.toLowerCase())
@@ -7543,9 +7546,9 @@ const rl = Nt(void 0), ol = () => {
7543
7546
  })).filter((m) => m.options.length > 0) : t.filter(
7544
7547
  (m) => m.label.toLowerCase().includes(y.toLowerCase())
7545
7548
  ) : t, $ = (m, b = !1) => {
7546
- b || (o(m), f(!1), v(""));
7549
+ b || (o(m), g(!1), v(""));
7547
7550
  }, x = () => {
7548
- a || f(!p);
7551
+ a || g(!p);
7549
7552
  };
7550
7553
  return le(() => {
7551
7554
  p && s && I.current && setTimeout(() => {
@@ -7554,7 +7557,7 @@ const rl = Nt(void 0), ol = () => {
7554
7557
  }, 10);
7555
7558
  }, [p, s]), le(() => {
7556
7559
  const m = (b) => {
7557
- w.current && !w.current.contains(b.target) && (f(!1), v(""));
7560
+ w.current && !w.current.contains(b.target) && (g(!1), v(""));
7558
7561
  };
7559
7562
  return document.addEventListener("mousedown", m), () => {
7560
7563
  document.removeEventListener("mousedown", m);
@@ -7626,7 +7629,7 @@ const rl = Nt(void 0), ol = () => {
7626
7629
  m.value
7627
7630
  )) })
7628
7631
  ] }),
7629
- g && /* @__PURE__ */ e("input", { type: "hidden", name: g, value: r || "" })
7632
+ f && /* @__PURE__ */ e("input", { type: "hidden", name: f, value: r || "" })
7630
7633
  ]
7631
7634
  }
7632
7635
  );
@@ -7638,12 +7641,12 @@ const rl = Nt(void 0), ol = () => {
7638
7641
  disabled: a = !1,
7639
7642
  searchable: s = !1,
7640
7643
  width: u,
7641
- name: g,
7644
+ name: f,
7642
7645
  id: c,
7643
7646
  groupsEnabled: h = !1,
7644
7647
  className: l
7645
7648
  }) => {
7646
- const [p, f] = P(!1), [y, v] = P(""), w = ce(null), I = ce(null), z = h && "options" in t[0], T = (z ? t.flatMap((m) => m.options) : t).filter(
7649
+ const [p, g] = P(!1), [y, v] = P(""), w = ce(null), I = ce(null), z = h && "options" in t[0], T = (z ? t.flatMap((m) => m.options) : t).filter(
7647
7650
  (m) => r.includes(m.value)
7648
7651
  ), E = y ? z ? t.map((m) => ({
7649
7652
  ...m,
@@ -7655,7 +7658,7 @@ const rl = Nt(void 0), ol = () => {
7655
7658
  ) : t, $ = (m, b = !1) => {
7656
7659
  b || (r.includes(m) ? o(r.filter((k) => k !== m)) : o([...r, m]));
7657
7660
  }, x = () => {
7658
- a || f(!p);
7661
+ a || g(!p);
7659
7662
  };
7660
7663
  return le(() => {
7661
7664
  p && s && I.current && setTimeout(() => {
@@ -7664,7 +7667,7 @@ const rl = Nt(void 0), ol = () => {
7664
7667
  }, 10);
7665
7668
  }, [p, s]), le(() => {
7666
7669
  const m = (b) => {
7667
- w.current && !w.current.contains(b.target) && (f(!1), v(""));
7670
+ w.current && !w.current.contains(b.target) && (g(!1), v(""));
7668
7671
  };
7669
7672
  return document.addEventListener("mousedown", m), () => {
7670
7673
  document.removeEventListener("mousedown", m);
@@ -7736,7 +7739,7 @@ const rl = Nt(void 0), ol = () => {
7736
7739
  m.value
7737
7740
  )) })
7738
7741
  ] }),
7739
- g && /* @__PURE__ */ e("input", { type: "hidden", name: g, value: r.join(",") })
7742
+ f && /* @__PURE__ */ e("input", { type: "hidden", name: f, value: r.join(",") })
7740
7743
  ]
7741
7744
  }
7742
7745
  );
@@ -7750,7 +7753,7 @@ function fl() {
7750
7753
  function _f({ children: t }) {
7751
7754
  const { deployment: r } = ze(), [o, i] = P(
7752
7755
  (r == null ? void 0 : r.auth_settings.first_factor) || "email_password"
7753
- ), [a, s] = P(""), [u, g] = P(!1), [c, h] = P(!1), [l, p] = P(!1), [f, y] = P("identifier"), v = (r == null ? void 0 : r.social_connections.filter((I) => I.enabled)) || [], w = r == null ? void 0 : r.auth_settings;
7756
+ ), [a, s] = P(""), [u, f] = P(!1), [c, h] = P(!1), [l, p] = P(!1), [g, y] = P("identifier"), v = (r == null ? void 0 : r.social_connections.filter((I) => I.enabled)) || [], w = r == null ? void 0 : r.auth_settings;
7754
7757
  return /* @__PURE__ */ e(
7755
7758
  hl.Provider,
7756
7759
  {
@@ -7761,13 +7764,13 @@ function _f({ children: t }) {
7761
7764
  otpSent: l,
7762
7765
  setFirstFactor: i,
7763
7766
  setEmail: s,
7764
- setShowOtherOptions: g,
7767
+ setShowOtherOptions: f,
7765
7768
  setShowForgotPassword: h,
7766
7769
  setOtpSent: p,
7767
7770
  enabledSocialsProviders: v,
7768
7771
  authSettings: w,
7769
7772
  firstFactor: o,
7770
- signInStep: f,
7773
+ signInStep: g,
7771
7774
  setSignInStep: y
7772
7775
  },
7773
7776
  children: t
@@ -7804,17 +7807,17 @@ function gl() {
7804
7807
  firstFactor: i,
7805
7808
  setShowOtherOptions: a,
7806
7809
  setShowForgotPassword: s
7807
- } = fl(), [u, g] = P(!1), c = t == null ? void 0 : t.auth_settings, h = (t == null ? void 0 : t.social_connections.filter((f) => f.enabled)) || [], l = async (f) => {
7810
+ } = fl(), [u, f] = P(!1), c = t == null ? void 0 : t.auth_settings, h = (t == null ? void 0 : t.social_connections.filter((g) => g.enabled)) || [], l = async (g) => {
7808
7811
  if (!u) {
7809
- g(!0);
7812
+ f(!0);
7810
7813
  try {
7811
7814
  const { data: y } = await r.create({
7812
- provider: f.provider
7815
+ provider: g.provider
7813
7816
  });
7814
7817
  y && typeof y == "object" && "oauth_url" in y && (window.location.href = y.oauth_url);
7815
7818
  } catch {
7816
7819
  } finally {
7817
- g(!1);
7820
+ f(!1);
7818
7821
  }
7819
7822
  }
7820
7823
  }, p = () => {
@@ -7945,7 +7948,7 @@ const kf = d.div`
7945
7948
  function $f({ onBack: t }) {
7946
7949
  const { deployment: r } = ze(), { navigate: o } = Je(), [i, a] = P(
7947
7950
  "start"
7948
- ), [s, u] = P(""), [g, c] = P(""), [h, l] = P(""), [p, f] = P(""), [y, v] = P(""), {
7951
+ ), [s, u] = P(""), [f, c] = P(""), [h, l] = P(""), [p, g] = P(""), [y, v] = P(""), {
7949
7952
  forgotPassword: w,
7950
7953
  verifyOtp: I,
7951
7954
  resetPassword: z
@@ -7961,10 +7964,10 @@ function $f({ onBack: t }) {
7961
7964
  }
7962
7965
  }
7963
7966
  }, m = async (_) => {
7964
- if (_.preventDefault(), g.length === 6) {
7967
+ if (_.preventDefault(), f.length === 6) {
7965
7968
  T(!0), $(null);
7966
7969
  try {
7967
- const O = await I(s, g);
7970
+ const O = await I(s, f);
7968
7971
  O.data && (l(O.data.token), a("reset"));
7969
7972
  } catch (O) {
7970
7973
  $(O);
@@ -8082,7 +8085,7 @@ function $f({ onBack: t }) {
8082
8085
  J,
8083
8086
  {
8084
8087
  type: "submit",
8085
- disabled: C || g.length !== 6,
8088
+ disabled: C || f.length !== 6,
8086
8089
  style: { width: "100%", marginTop: "var(--space-md)" },
8087
8090
  children: C ? "Verifying..." : "Verify"
8088
8091
  }
@@ -8105,7 +8108,7 @@ function $f({ onBack: t }) {
8105
8108
  type: "password",
8106
8109
  id: "password",
8107
8110
  value: p,
8108
- onChange: (_) => f(_.target.value),
8111
+ onChange: (_) => g(_.target.value),
8109
8112
  placeholder: "Enter new password",
8110
8113
  required: !0
8111
8114
  }
@@ -8515,7 +8518,7 @@ function lg({
8515
8518
  completeVerification: o,
8516
8519
  prepareVerification: i
8517
8520
  }) {
8518
- const { deployment: a } = ze(), [s, u] = P(""), [g, c] = P({}), [h, l] = P(!1), [p, f] = P(null), [y, v] = P(!0), [w, I] = P(!1), [z, C] = P(""), [T, E] = P(!1), { navigate: $ } = Je(), x = (r == null ? void 0 : r.available_2fa_methods) || [], m = [
8521
+ const { deployment: a } = ze(), [s, u] = P(""), [f, c] = P({}), [h, l] = P(!1), [p, g] = P(null), [y, v] = P(!0), [w, I] = P(!1), [z, C] = P(""), [T, E] = P(!1), { navigate: $ } = Je(), x = (r == null ? void 0 : r.available_2fa_methods) || [], m = [
8519
8522
  {
8520
8523
  id: "authenticator",
8521
8524
  name: "Authenticator app",
@@ -8539,7 +8542,7 @@ function lg({
8539
8542
  available: x.includes("backup_code")
8540
8543
  }
8541
8544
  ].filter((M) => M.available), b = async (M) => {
8542
- f(M), v(!1), M === "phone_otp" && I(!0);
8545
+ g(M), v(!1), M === "phone_otp" && I(!0);
8543
8546
  }, k = async (M) => {
8544
8547
  var S, R;
8545
8548
  if (r) {
@@ -8629,7 +8632,7 @@ function lg({
8629
8632
  {
8630
8633
  onVerify: k,
8631
8634
  onBack: () => {
8632
- I(!1), v(!0), f(null);
8635
+ I(!1), v(!0), g(null);
8633
8636
  },
8634
8637
  loading: h
8635
8638
  }
@@ -8657,11 +8660,11 @@ function lg({
8657
8660
  placeholder: "Enter backup code",
8658
8661
  maxLength: 20,
8659
8662
  autoComplete: "one-time-code",
8660
- "aria-invalid": !!g.code,
8663
+ "aria-invalid": !!f.code,
8661
8664
  autoFocus: !0
8662
8665
  }
8663
8666
  ),
8664
- g.code && /* @__PURE__ */ e(Ta, { children: g.code })
8667
+ f.code && /* @__PURE__ */ e(Ta, { children: f.code })
8665
8668
  ] }) : /* @__PURE__ */ e(
8666
8669
  fr,
8667
8670
  {
@@ -8684,12 +8687,12 @@ function lg({
8684
8687
  c({ submit: M.message });
8685
8688
  }
8686
8689
  } : void 0,
8687
- error: g.code,
8690
+ error: f.code,
8688
8691
  isSubmitting: h
8689
8692
  }
8690
8693
  ),
8691
8694
  /* @__PURE__ */ n("div", { children: [
8692
- g.submit && /* @__PURE__ */ e(Ta, { children: g.submit }),
8695
+ f.submit && /* @__PURE__ */ e(Ta, { children: f.submit }),
8693
8696
  /* @__PURE__ */ e(
8694
8697
  sg,
8695
8698
  {
@@ -8705,7 +8708,7 @@ function lg({
8705
8708
  Ur,
8706
8709
  {
8707
8710
  onClick: () => {
8708
- v(!0), f(null), u(""), c({});
8711
+ v(!0), g(null), u(""), c({});
8709
8712
  },
8710
8713
  style: { cursor: "pointer" },
8711
8714
  children: "Try another method"
@@ -8800,7 +8803,7 @@ function hg({
8800
8803
  prepareVerification: a
8801
8804
  }) {
8802
8805
  var j, A, D, ee, ne, H, Z, ie, se;
8803
- const { deployment: s } = ze(), { navigate: u } = Je(), [g, c] = P({}), [h, l] = P({}), [p, f] = P("US"), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P(null), [T, E] = P(!1), $ = z, x = w, m = async (te) => {
8806
+ const { deployment: s } = ze(), { navigate: u } = Je(), [f, c] = P({}), [h, l] = P({}), [p, g] = P("US"), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P(null), [T, E] = P(!1), $ = z, x = w, m = async (te) => {
8804
8807
  var ae;
8805
8808
  I(!0), C(null);
8806
8809
  try {
@@ -8869,7 +8872,7 @@ function hg({
8869
8872
  const te = {};
8870
8873
  return k.forEach((ae) => {
8871
8874
  var pe, ke, me, V, ve;
8872
- const ge = g[ae];
8875
+ const ge = f[ae];
8873
8876
  let Q = !1;
8874
8877
  switch (ae) {
8875
8878
  case "first_name":
@@ -8894,12 +8897,12 @@ function hg({
8894
8897
  const X = ae.replace("_", " ").replace(/\b\w/g, (Y) => Y.toUpperCase());
8895
8898
  te[ae] = `${X} is required`;
8896
8899
  }
8897
- }), g.username && k.includes("username") && (/^[a-zA-Z0-9_-]{3,30}$/.test(g.username) || (te.username = "Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")), g.phone_number && k.includes("phone_number") && (/^\d{7,15}$/.test(g.phone_number) || (te.phone_number = "Phone number must contain 7-15 digits")), g.email && k.includes("email_address") && (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(g.email) || (te.email_address = "Please enter a valid email address")), l(te), Object.keys(te).length === 0;
8900
+ }), f.username && k.includes("username") && (/^[a-zA-Z0-9_-]{3,30}$/.test(f.username) || (te.username = "Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")), f.phone_number && k.includes("phone_number") && (/^\d{7,15}$/.test(f.phone_number) || (te.phone_number = "Phone number must contain 7-15 digits")), f.email && k.includes("email_address") && (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(f.email) || (te.email_address = "Please enter a valid email address")), l(te), Object.keys(te).length === 0;
8898
8901
  }, U = async (te) => {
8899
8902
  if (te.preventDefault(), !L())
8900
8903
  return;
8901
- const ae = { ...g };
8902
- g.phone_number && p && (ae.phone_country_code = p), await m(ae);
8904
+ const ae = { ...f };
8905
+ f.phone_number && p && (ae.phone_country_code = p), await m(ae);
8903
8906
  }, N = (te) => {
8904
8907
  const ae = te.target.value;
8905
8908
  c((ge) => ({ ...ge, phone_number: ae })), h.phone_number && l((ge) => ({ ...ge, phone_number: "" }));
@@ -8972,7 +8975,7 @@ function hg({
8972
8975
  type: "text",
8973
8976
  id: "first_name",
8974
8977
  name: "first_name",
8975
- value: g.first_name || "",
8978
+ value: f.first_name || "",
8976
8979
  onChange: R,
8977
8980
  placeholder: "Enter your first name",
8978
8981
  "aria-invalid": !!h.first_name,
@@ -8993,7 +8996,7 @@ function hg({
8993
8996
  type: "text",
8994
8997
  id: "last_name",
8995
8998
  name: "last_name",
8996
- value: g.last_name || "",
8999
+ value: f.last_name || "",
8997
9000
  onChange: R,
8998
9001
  placeholder: "Enter your last name",
8999
9002
  "aria-invalid": !!h.last_name,
@@ -9017,7 +9020,7 @@ function hg({
9017
9020
  type: "text",
9018
9021
  id: "username",
9019
9022
  name: "username",
9020
- value: g.username || "",
9023
+ value: f.username || "",
9021
9024
  onChange: R,
9022
9025
  placeholder: "Choose a username",
9023
9026
  "aria-invalid": !!h.username,
@@ -9035,11 +9038,11 @@ function hg({
9035
9038
  /* @__PURE__ */ e(
9036
9039
  pn,
9037
9040
  {
9038
- value: g.phone_number || "",
9041
+ value: f.phone_number || "",
9039
9042
  onChange: N,
9040
9043
  error: h.phone_number,
9041
9044
  countryCode: p,
9042
- setCountryCode: f
9045
+ setCountryCode: g
9043
9046
  }
9044
9047
  ),
9045
9048
  h.phone_number && /* @__PURE__ */ e(Wt, { children: h.phone_number })
@@ -9055,7 +9058,7 @@ function hg({
9055
9058
  type: "email",
9056
9059
  id: "email",
9057
9060
  name: "email",
9058
- value: g.email || "",
9061
+ value: f.email || "",
9059
9062
  onChange: R,
9060
9063
  placeholder: "Enter your email address",
9061
9064
  "aria-invalid": !!h.email_address,
@@ -9202,12 +9205,12 @@ function _g() {
9202
9205
  const { deployment: t } = ze(), { navigate: r } = Je(), { session: o, loading: i } = Ze(), a = ((Q = (ge = t == null ? void 0 : t.auth_settings) == null ? void 0 : ge.multi_session_support) == null ? void 0 : Q.enabled) ?? !1, {
9203
9206
  setEmail: s,
9204
9207
  otpSent: u,
9205
- setOtpSent: g,
9208
+ setOtpSent: f,
9206
9209
  showForgotPassword: c,
9207
9210
  setShowForgotPassword: h,
9208
9211
  showOtherOptions: l,
9209
9212
  setShowOtherOptions: p,
9210
- enabledSocialsProviders: f,
9213
+ enabledSocialsProviders: g,
9211
9214
  firstFactor: y,
9212
9215
  signInStep: v,
9213
9216
  setSignInStep: w
@@ -9272,7 +9275,7 @@ function _g() {
9272
9275
  return;
9273
9276
  }
9274
9277
  } else if (B.strategy === "social" && B.provider) {
9275
- const F = f.find(
9278
+ const F = g.find(
9276
9279
  (K) => K.provider === B.provider
9277
9280
  );
9278
9281
  if (F) {
@@ -9344,7 +9347,7 @@ function _g() {
9344
9347
  }
9345
9348
  O(!0), k({});
9346
9349
  try {
9347
- await z.completeVerification(M), g(!1), S("");
9350
+ await z.completeVerification(M), f(!1), S("");
9348
9351
  } catch (F) {
9349
9352
  k({ otp: F.message || "Verification failed" });
9350
9353
  } finally {
@@ -9426,14 +9429,14 @@ function _g() {
9426
9429
  if (!B) return;
9427
9430
  (async () => {
9428
9431
  try {
9429
- await z.prepareVerification({ strategy: B }), g(!0);
9432
+ await z.prepareVerification({ strategy: B }), f(!0);
9430
9433
  } catch (ue) {
9431
9434
  console.error("Failed to prepare verification:", ue), k({ submit: "Failed to send verification. Please try again." });
9432
9435
  } finally {
9433
9436
  O(!1);
9434
9437
  }
9435
9438
  })();
9436
- }, [C, z, u, g, r, t]), le(() => {
9439
+ }, [C, z, u, f, r, t]), le(() => {
9437
9440
  }, []), l)
9438
9441
  return /* @__PURE__ */ e(Mf, { onBack: () => p(!1) });
9439
9442
  if (c)
@@ -9446,7 +9449,7 @@ function _g() {
9446
9449
  completeVerification: z.completeVerification,
9447
9450
  prepareVerification: z.prepareVerification,
9448
9451
  onBack: () => {
9449
- T(), ee(), g(!1);
9452
+ T(), ee(), f(!1);
9450
9453
  }
9451
9454
  }
9452
9455
  );
@@ -9459,7 +9462,7 @@ function _g() {
9459
9462
  completeVerification: z.completeVerification,
9460
9463
  prepareVerification: z.prepareVerification,
9461
9464
  onBack: () => {
9462
- T(), ee(), g(!1);
9465
+ T(), ee(), f(!1);
9463
9466
  }
9464
9467
  }
9465
9468
  );
@@ -9507,7 +9510,7 @@ function _g() {
9507
9510
  Vt,
9508
9511
  {
9509
9512
  onClick: () => {
9510
- g(!1), T(), ee();
9513
+ f(!1), T(), ee();
9511
9514
  },
9512
9515
  style: { cursor: "pointer" },
9513
9516
  children: "Back to login"
@@ -9528,7 +9531,7 @@ function _g() {
9528
9531
  if (S(G), G && G.length === 6) {
9529
9532
  O(!0), k({});
9530
9533
  try {
9531
- await z.completeVerification(G), g(!1);
9534
+ await z.completeVerification(G), f(!1);
9532
9535
  } catch (B) {
9533
9536
  k({
9534
9537
  otp: B.message || "Verification failed"
@@ -9566,7 +9569,7 @@ function _g() {
9566
9569
  Vt,
9567
9570
  {
9568
9571
  onClick: () => {
9569
- g(!1), T(), ee();
9572
+ f(!1), T(), ee();
9570
9573
  },
9571
9574
  style: { cursor: "pointer" },
9572
9575
  children: "Back to login"
@@ -9574,11 +9577,11 @@ function _g() {
9574
9577
  ) })
9575
9578
  ] })
9576
9579
  ] }) : /* @__PURE__ */ n(re, { children: [
9577
- f.length > 0 && /* @__PURE__ */ n(re, { children: [
9580
+ g.length > 0 && /* @__PURE__ */ n(re, { children: [
9578
9581
  /* @__PURE__ */ e(
9579
9582
  Ni,
9580
9583
  {
9581
- connections: f,
9584
+ connections: g,
9582
9585
  callback: ie
9583
9586
  }
9584
9587
  ),
@@ -9804,17 +9807,17 @@ function db() {
9804
9807
  first_name: "",
9805
9808
  last_name: "",
9806
9809
  email: ""
9807
- }), [s, u] = P(!1), [g, c] = P(!1), [h, l] = P(null), p = (M) => {
9810
+ }), [s, u] = P(!1), [f, c] = P(!1), [h, l] = P(null), p = (M) => {
9808
9811
  if (h)
9809
9812
  return h.message;
9810
- }, f = t == null ? void 0 : t.auth_settings, y = !!((I = f == null ? void 0 : f.first_name) != null && I.enabled && ((z = f == null ? void 0 : f.last_name) != null && z.enabled)), v = (M) => {
9813
+ }, g = t == null ? void 0 : t.auth_settings, y = !!((I = g == null ? void 0 : g.first_name) != null && I.enabled && ((z = g == null ? void 0 : g.last_name) != null && z.enabled)), v = (M) => {
9811
9814
  const { name: S, value: R } = M.target;
9812
9815
  a((L) => ({
9813
9816
  ...L,
9814
9817
  [S]: R
9815
9818
  }));
9816
9819
  }, w = async (M) => {
9817
- if (M.preventDefault(), !!f) {
9820
+ if (M.preventDefault(), !!g) {
9818
9821
  c(!0), l(null);
9819
9822
  try {
9820
9823
  (await o(i)).data && u(!0);
@@ -9841,11 +9844,11 @@ function db() {
9841
9844
  /* @__PURE__ */ e(Sg, { children: "Be the first to know when we launch!" })
9842
9845
  ] }),
9843
9846
  /* @__PURE__ */ n(zg, { onSubmit: w, noValidate: !0, children: [
9844
- (((C = f == null ? void 0 : f.first_name) == null ? void 0 : C.enabled) || ((T = f == null ? void 0 : f.last_name) == null ? void 0 : T.enabled)) && /* @__PURE__ */ n($g, { $isBothEnabled: y, children: [
9845
- ((E = f == null ? void 0 : f.first_name) == null ? void 0 : E.enabled) && /* @__PURE__ */ n(Fn, { children: [
9847
+ (((C = g == null ? void 0 : g.first_name) == null ? void 0 : C.enabled) || ((T = g == null ? void 0 : g.last_name) == null ? void 0 : T.enabled)) && /* @__PURE__ */ n($g, { $isBothEnabled: y, children: [
9848
+ ((E = g == null ? void 0 : g.first_name) == null ? void 0 : E.enabled) && /* @__PURE__ */ n(Fn, { children: [
9846
9849
  /* @__PURE__ */ n(Bn, { htmlFor: "first_name", children: [
9847
9850
  "First name",
9848
- (($ = f == null ? void 0 : f.first_name) == null ? void 0 : $.required) && /* @__PURE__ */ e(Un, { children: "*" })
9851
+ (($ = g == null ? void 0 : g.first_name) == null ? void 0 : $.required) && /* @__PURE__ */ e(Un, { children: "*" })
9849
9852
  ] }),
9850
9853
  /* @__PURE__ */ e(
9851
9854
  fe,
@@ -9853,7 +9856,7 @@ function db() {
9853
9856
  type: "text",
9854
9857
  id: "first_name",
9855
9858
  name: "first_name",
9856
- required: (x = f == null ? void 0 : f.first_name) == null ? void 0 : x.required,
9859
+ required: (x = g == null ? void 0 : g.first_name) == null ? void 0 : x.required,
9857
9860
  minLength: 2,
9858
9861
  maxLength: 50,
9859
9862
  value: i.first_name,
@@ -9864,10 +9867,10 @@ function db() {
9864
9867
  ),
9865
9868
  p() && /* @__PURE__ */ e(go, { children: p() })
9866
9869
  ] }),
9867
- ((m = f == null ? void 0 : f.last_name) == null ? void 0 : m.enabled) && /* @__PURE__ */ n(Fn, { children: [
9870
+ ((m = g == null ? void 0 : g.last_name) == null ? void 0 : m.enabled) && /* @__PURE__ */ n(Fn, { children: [
9868
9871
  /* @__PURE__ */ n(Bn, { htmlFor: "last_name", children: [
9869
9872
  "Last name",
9870
- ((b = f == null ? void 0 : f.last_name) == null ? void 0 : b.required) && /* @__PURE__ */ e(Un, { children: "*" })
9873
+ ((b = g == null ? void 0 : g.last_name) == null ? void 0 : b.required) && /* @__PURE__ */ e(Un, { children: "*" })
9871
9874
  ] }),
9872
9875
  /* @__PURE__ */ e(
9873
9876
  fe,
@@ -9875,7 +9878,7 @@ function db() {
9875
9878
  type: "text",
9876
9879
  id: "last_name",
9877
9880
  name: "last_name",
9878
- required: (k = f == null ? void 0 : f.last_name) == null ? void 0 : k.required,
9881
+ required: (k = g == null ? void 0 : g.last_name) == null ? void 0 : k.required,
9879
9882
  minLength: 2,
9880
9883
  maxLength: 50,
9881
9884
  value: i.last_name,
@@ -9890,7 +9893,7 @@ function db() {
9890
9893
  /* @__PURE__ */ n(Fn, { children: [
9891
9894
  /* @__PURE__ */ n(Bn, { htmlFor: "email", children: [
9892
9895
  "Email address",
9893
- ((_ = f == null ? void 0 : f.email_address) == null ? void 0 : _.required) && /* @__PURE__ */ e(Un, { children: "*" })
9896
+ ((_ = g == null ? void 0 : g.email_address) == null ? void 0 : _.required) && /* @__PURE__ */ e(Un, { children: "*" })
9894
9897
  ] }),
9895
9898
  /* @__PURE__ */ e(
9896
9899
  fe,
@@ -9898,7 +9901,7 @@ function db() {
9898
9901
  type: "email",
9899
9902
  id: "email",
9900
9903
  name: "email",
9901
- required: (O = f == null ? void 0 : f.email_address) == null ? void 0 : O.required,
9904
+ required: (O = g == null ? void 0 : g.email_address) == null ? void 0 : O.required,
9902
9905
  value: i.email,
9903
9906
  onChange: v,
9904
9907
  placeholder: "Enter your email address",
@@ -9908,7 +9911,7 @@ function db() {
9908
9911
  p() && /* @__PURE__ */ e(go, { children: p() })
9909
9912
  ] }),
9910
9913
  p() && /* @__PURE__ */ e(go, { children: p() }),
9911
- /* @__PURE__ */ e(Ig, { type: "submit", $primary: !0, disabled: g || r, children: g || r ? "Joining waitlist..." : "Join waitlist" })
9914
+ /* @__PURE__ */ e(Ig, { type: "submit", $primary: !0, disabled: f || r, children: f || r ? "Joining waitlist..." : "Join waitlist" })
9912
9915
  ] }),
9913
9916
  /* @__PURE__ */ e(Mg, { children: /* @__PURE__ */ n(Og, { children: [
9914
9917
  "Need assistance? ",
@@ -10005,7 +10008,7 @@ const mo = d.div`
10005
10008
  }
10006
10009
  `;
10007
10010
  function pb() {
10008
- const { deployment: t } = ze(), { navigate: r } = Je(), { error: o, session: i, processed: a, signinAttempt: s, redirectUri: u, loading: g } = ep(), c = () => {
10011
+ const { deployment: t } = ze(), { navigate: r } = Je(), { error: o, session: i, processed: a, signinAttempt: s, redirectUri: u, loading: f } = ep(), c = () => {
10009
10012
  window.location.reload();
10010
10013
  }, h = () => {
10011
10014
  var p;
@@ -10014,22 +10017,22 @@ function pb() {
10014
10017
  };
10015
10018
  if (le(() => {
10016
10019
  var l, p;
10017
- if (!(!a || g)) {
10020
+ if (!(!a || f)) {
10018
10021
  if (s && !s.completed) {
10019
- const f = (l = t == null ? void 0 : t.ui_settings) == null ? void 0 : l.sign_in_page_url;
10020
- if (f) {
10021
- const y = new URL(f, window.location.origin);
10022
+ const g = (l = t == null ? void 0 : t.ui_settings) == null ? void 0 : l.sign_in_page_url;
10023
+ if (g) {
10024
+ const y = new URL(g, window.location.origin);
10022
10025
  y.searchParams.set("signin_attempt_id", s.id), u && y.searchParams.set("redirect_uri", u), r(y.toString());
10023
10026
  }
10024
10027
  return;
10025
10028
  }
10026
10029
  if (s != null && s.completed) {
10027
- const f = u || ((p = t == null ? void 0 : t.ui_settings) == null ? void 0 : p.after_signin_redirect_url) || (t == null ? void 0 : t.frontend_host) || "/";
10030
+ const g = u || ((p = t == null ? void 0 : t.ui_settings) == null ? void 0 : p.after_signin_redirect_url) || (t == null ? void 0 : t.frontend_host) || "/";
10028
10031
  let y;
10029
10032
  try {
10030
- y = new URL(f);
10033
+ y = new URL(g);
10031
10034
  } catch {
10032
- y = new URL(f, window.location.origin);
10035
+ y = new URL(g, window.location.origin);
10033
10036
  }
10034
10037
  y && ((t == null ? void 0 : t.mode) === "staging" && y.searchParams.set(
10035
10038
  "__dev_session__",
@@ -10040,7 +10043,7 @@ function pb() {
10040
10043
  }, [
10041
10044
  i,
10042
10045
  a,
10043
- g,
10046
+ f,
10044
10047
  u,
10045
10048
  t,
10046
10049
  s,
@@ -10051,7 +10054,7 @@ function pb() {
10051
10054
  const l = ((p = t == null ? void 0 : t.ui_settings) == null ? void 0 : p.sign_in_page_url) || (t == null ? void 0 : t.frontend_host);
10052
10055
  l && r(l);
10053
10056
  }, 2e3);
10054
- }, [o, t, r]), g && !a)
10057
+ }, [o, t, r]), f && !a)
10055
10058
  return /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(mo, { children: [
10056
10059
  /* @__PURE__ */ n(vo, { children: [
10057
10060
  /* @__PURE__ */ e(yo, { children: "Completing sign in" }),
@@ -10188,19 +10191,19 @@ function ub({
10188
10191
  } = {}) {
10189
10192
  const [o, i] = P(
10190
10193
  "loading"
10191
- ), [a, s] = P(""), { token: u, attempt: g, redirectUri: c } = rp(), { verifyMagicLink: h } = tp(), { navigate: l } = Je(), { deployment: p } = ze(), f = ce(!1);
10194
+ ), [a, s] = P(""), { token: u, attempt: f, redirectUri: c } = rp(), { verifyMagicLink: h } = tp(), { navigate: l } = Je(), { deployment: p } = ze(), g = ce(!1);
10192
10195
  return le(() => {
10193
10196
  (async () => {
10194
- if (!f.current) {
10195
- if (!u || !g) {
10197
+ if (!g.current) {
10198
+ if (!u || !f) {
10196
10199
  i("error"), s(
10197
10200
  "The magic link appears to be malformed. Please try signing in again."
10198
10201
  ), r == null || r("Invalid magic link parameters");
10199
10202
  return;
10200
10203
  }
10201
- f.current = !0, i("loading"), s("Please wait while we verify your magic link.");
10204
+ g.current = !0, i("loading"), s("Please wait while we verify your magic link.");
10202
10205
  try {
10203
- await h({ token: u, attempt: g, redirectUri: c }), i("success"), s("You will be redirected to your account shortly."), t == null || t(), setTimeout(() => {
10206
+ await h({ token: u, attempt: f, redirectUri: c }), i("success"), s("You will be redirected to your account shortly."), t == null || t(), setTimeout(() => {
10204
10207
  var I;
10205
10208
  let w = c;
10206
10209
  if (w || (w = (I = p == null ? void 0 : p.ui_settings) == null ? void 0 : I.after_signin_redirect_url), !w && (p != null && p.frontend_host) && (w = `https://${p.frontend_host}`), w) {
@@ -10218,7 +10221,7 @@ function ub({
10218
10221
  }
10219
10222
  }
10220
10223
  })();
10221
- }, [u, g]), /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(Bg, { children: [
10224
+ }, [u, f]), /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(Bg, { children: [
10222
10225
  /* @__PURE__ */ n(Ug, { children: [
10223
10226
  /* @__PURE__ */ e(jg, { children: "Magic Link Verification" }),
10224
10227
  /* @__PURE__ */ e(Wg, { children: "Verifying your magic link" })
@@ -10256,8 +10259,8 @@ function hb(t) {
10256
10259
  (s) => s.requires_completion && !s.completed
10257
10260
  )) ? !0 : !!((a = t.signup_attempts) == null ? void 0 : a.find(
10258
10261
  (s) => {
10259
- var u, g;
10260
- return ((u = s.missing_fields) == null ? void 0 : u.length) > 0 || ((g = s.remaining_steps) == null ? void 0 : g.length) > 0 && !s.completed;
10262
+ var u, f;
10263
+ return ((u = s.missing_fields) == null ? void 0 : u.length) > 0 || ((f = s.remaining_steps) == null ? void 0 : f.length) > 0 && !s.completed;
10261
10264
  }
10262
10265
  )) : !1;
10263
10266
  }
@@ -10372,7 +10375,7 @@ function gb({
10372
10375
  onError: o
10373
10376
  }) {
10374
10377
  var w;
10375
- const { acceptInvitation: i, invitationData: a, loading: s, error: u } = up(), { navigate: g } = Je(), { deployment: c } = ze(), h = ce(!1), l = () => {
10378
+ const { acceptInvitation: i, invitationData: a, loading: s, error: u } = up(), { navigate: f } = Je(), { deployment: c } = ze(), h = ce(!1), l = () => {
10376
10379
  var z;
10377
10380
  const I = new URLSearchParams(window.location.search);
10378
10381
  return {
@@ -10390,15 +10393,15 @@ function gb({
10390
10393
  }, [a, r, o]);
10391
10394
  const p = () => {
10392
10395
  const { redirectUri: I } = l();
10393
- g(I);
10394
- }, f = () => {
10396
+ f(I);
10397
+ }, g = () => {
10395
10398
  var m, b;
10396
10399
  const { token: I } = l(), z = ((m = c == null ? void 0 : c.ui_settings) == null ? void 0 : m.sign_in_page_url) || "/sign-in", C = ((b = c == null ? void 0 : c.ui_settings) == null ? void 0 : b.sign_up_page_url) || "/sign-up", T = new URLSearchParams();
10397
10400
  I && T.set("invite_token", I), a != null && a.invited_email && T.set("invited_email", a.invited_email);
10398
10401
  const $ = `${window.location.pathname}?token=${I}`;
10399
10402
  T.set("redirect_uri", $), a != null && a.message && T.set("message", a.message);
10400
10403
  const x = (a == null ? void 0 : a.error_code) === "INVITATION_REQUIRES_SIGNUP";
10401
- g(`${x ? C : z}?${T.toString()}`);
10404
+ f(`${x ? C : z}?${T.toString()}`);
10402
10405
  }, y = () => {
10403
10406
  const { token: I } = l();
10404
10407
  I && (h.current = !1, i(I));
@@ -10413,7 +10416,7 @@ function gb({
10413
10416
  /* @__PURE__ */ e(Wn, { children: "✗" }),
10414
10417
  /* @__PURE__ */ e(Kt, { children: "Missing Invitation Token" }),
10415
10418
  /* @__PURE__ */ e(Qt, { children: "The invitation link appears to be invalid or incomplete." }),
10416
- /* @__PURE__ */ e(J, { onClick: () => g("/"), style: { marginTop: "var(--space-lg)" }, children: "Go to Home" })
10419
+ /* @__PURE__ */ e(J, { onClick: () => f("/"), style: { marginTop: "var(--space-lg)" }, children: "Go to Home" })
10417
10420
  ] })
10418
10421
  ] }) });
10419
10422
  if (s)
@@ -10479,7 +10482,7 @@ function gb({
10479
10482
  /* @__PURE__ */ e(Ga, { children: a.invited_email })
10480
10483
  ] }),
10481
10484
  /* @__PURE__ */ e(Qt, { children: I ? "You need to create an account with this email address to accept the invitation." : a.error_code === "INVITATION_EMAIL_MISMATCH" ? "You're currently signed in with a different account. Please sign in with the invited email." : "Please sign in to accept this invitation." }),
10482
- /* @__PURE__ */ e(J, { onClick: f, style: { marginTop: "var(--space-lg)" }, children: I ? "Sign Up to Accept" : "Sign In to Accept" })
10485
+ /* @__PURE__ */ e(J, { onClick: g, style: { marginTop: "var(--space-lg)" }, children: I ? "Sign Up to Accept" : "Sign In to Accept" })
10483
10486
  ] })
10484
10487
  ] }) });
10485
10488
  }
@@ -10510,7 +10513,7 @@ function gb({
10510
10513
  /* @__PURE__ */ e(Kg, { children: /* @__PURE__ */ n("div", { style: { marginTop: "var(--space-md)" }, children: [
10511
10514
  "Having trouble?",
10512
10515
  " ",
10513
- /* @__PURE__ */ e(Qg, { onClick: f, children: "Sign in manually" })
10516
+ /* @__PURE__ */ e(Qg, { onClick: g, children: "Sign in manually" })
10514
10517
  ] }) })
10515
10518
  ] })
10516
10519
  ] }) }) : null;
@@ -10721,7 +10724,7 @@ const Ui = Nt({
10721
10724
  onSuccess: t,
10722
10725
  onCancel: r
10723
10726
  }) => {
10724
- const [o, i] = P(""), [a, s] = P(""), [u, g] = P(), [c, h] = P(null), [l, p] = P(!1), f = ce(null), { createOrganization: y } = Ei(), { toast: v } = Qe(), w = (x) => {
10727
+ const [o, i] = P(""), [a, s] = P(""), [u, f] = P(), [c, h] = P(null), [l, p] = P(!1), g = ce(null), { createOrganization: y } = Ei(), { toast: v } = Qe(), w = (x) => {
10725
10728
  i(x);
10726
10729
  }, I = (x) => {
10727
10730
  if (x.target.files && x.target.files[0]) {
@@ -10734,11 +10737,11 @@ const Ui = Nt({
10734
10737
  v("Please select a valid image file", "error");
10735
10738
  return;
10736
10739
  }
10737
- c && URL.revokeObjectURL(c), g(m), h(URL.createObjectURL(m));
10740
+ c && URL.revokeObjectURL(c), f(m), h(URL.createObjectURL(m));
10738
10741
  }
10739
10742
  }, z = () => {
10740
10743
  var x;
10741
- (x = f.current) == null || x.click();
10744
+ (x = g.current) == null || x.click();
10742
10745
  }, C = (x) => x.split(" ").map((m) => m[0]).join("").toUpperCase().slice(0, 2) || "O";
10743
10746
  le(() => () => {
10744
10747
  c && URL.revokeObjectURL(c);
@@ -10785,7 +10788,7 @@ const Ui = Nt({
10785
10788
  fm,
10786
10789
  {
10787
10790
  type: "file",
10788
- ref: f,
10791
+ ref: g,
10789
10792
  onChange: I,
10790
10793
  accept: "image/png, image/jpeg, image/gif",
10791
10794
  disabled: l
@@ -10907,7 +10910,7 @@ const Ui = Nt({
10907
10910
  domain: r,
10908
10911
  triggerRef: o
10909
10912
  }) => {
10910
- const i = ce(null), [a, s] = P(), [u, g] = P(""), [c, h] = P(!1), [l, p] = P(!1), [f, y] = P({ top: 0, left: 0 }), { addDomain: v, verifyDomain: w } = nt(), { toast: I } = Qe(), z = ($) => /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test($), C = ($) => $.trim().toLowerCase().replace(/^https?:\/\//, ""), T = async () => {
10913
+ const i = ce(null), [a, s] = P(), [u, f] = P(""), [c, h] = P(!1), [l, p] = P(!1), [g, y] = P({ top: 0, left: 0 }), { addDomain: v, verifyDomain: w } = nt(), { toast: I } = Qe(), z = ($) => /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test($), C = ($) => $.trim().toLowerCase().replace(/^https?:\/\//, ""), T = async () => {
10911
10914
  const $ = C(u);
10912
10915
  if (!$) {
10913
10916
  I("Please enter a domain name", "error");
@@ -10969,9 +10972,9 @@ const Ui = Nt({
10969
10972
  {
10970
10973
  ref: i,
10971
10974
  style: {
10972
- top: `${f.top}px`,
10973
- left: `${f.left}px`,
10974
- visibility: f.top > 0 ? "visible" : "hidden"
10975
+ top: `${g.top}px`,
10976
+ left: `${g.left}px`,
10977
+ visibility: g.top > 0 ? "visible" : "hidden"
10975
10978
  },
10976
10979
  onClick: ($) => $.stopPropagation(),
10977
10980
  role: "dialog",
@@ -11063,7 +11066,7 @@ const Ui = Nt({
11063
11066
  type: "text",
11064
11067
  placeholder: "Enter your domain",
11065
11068
  value: u,
11066
- onChange: ($) => g($.target.value),
11069
+ onChange: ($) => f($.target.value),
11067
11070
  autoFocus: !0,
11068
11071
  "aria-label": "Domain name (FQDN)",
11069
11072
  "aria-describedby": "domain-help"
@@ -11155,14 +11158,14 @@ const Ui = Nt({
11155
11158
  roles: o,
11156
11159
  triggerRef: i
11157
11160
  }) => {
11158
- const a = ce(null), [s, u] = P(""), [g, c] = P(
11161
+ const a = ce(null), [s, u] = P(""), [f, c] = P(
11159
11162
  null
11160
- ), [h, l] = P(!1), [p, f] = P(!1), [y, v] = P({ top: 0, left: 0 }), { inviteMember: w } = nt(), { toast: I } = Qe(), z = o.map((E) => ({
11163
+ ), [h, l] = P(!1), [p, g] = P(!1), [y, v] = P({ top: 0, left: 0 }), { inviteMember: w } = nt(), { toast: I } = Qe(), z = o.map((E) => ({
11161
11164
  value: E.id,
11162
11165
  label: E.name
11163
11166
  })), C = (E) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(E), T = async () => {
11164
11167
  const E = s.trim().toLowerCase();
11165
- if (!(!E || !g)) {
11168
+ if (!(!E || !f)) {
11166
11169
  if (!C(E)) {
11167
11170
  I("Please enter a valid email address", "error");
11168
11171
  return;
@@ -11173,7 +11176,7 @@ const Ui = Nt({
11173
11176
  }
11174
11177
  l(!0);
11175
11178
  try {
11176
- await w({ email: E, organizationRole: g }), r == null || r();
11179
+ await w({ email: E, organizationRole: f }), r == null || r();
11177
11180
  } catch ($) {
11178
11181
  const x = $.message || "Failed to send invitation. Please try again.";
11179
11182
  I(x, "error");
@@ -11183,7 +11186,7 @@ const Ui = Nt({
11183
11186
  }
11184
11187
  };
11185
11188
  return le(() => {
11186
- f(!0);
11189
+ g(!0);
11187
11190
  const E = setTimeout(() => {
11188
11191
  if (!a.current || !(i != null && i.current)) return;
11189
11192
  const m = i.current;
@@ -11241,7 +11244,7 @@ const Ui = Nt({
11241
11244
  Bi,
11242
11245
  {
11243
11246
  options: z,
11244
- value: g == null ? void 0 : g.id,
11247
+ value: f == null ? void 0 : f.id,
11245
11248
  onChange: (E) => c(o.find(($) => $.id === E)),
11246
11249
  placeholder: "Select a role",
11247
11250
  "aria-label": "Select role for invited member"
@@ -11265,7 +11268,7 @@ const Ui = Nt({
11265
11268
  J,
11266
11269
  {
11267
11270
  onClick: T,
11268
- disabled: !s || !g || h,
11271
+ disabled: !s || !f || h,
11269
11272
  style: {
11270
11273
  width: "auto"
11271
11274
  },
@@ -11337,18 +11340,18 @@ const Ui = Nt({
11337
11340
  triggerRef: i
11338
11341
  }) => {
11339
11342
  var x;
11340
- const a = ce(null), [s, u] = P((o == null ? void 0 : o.name) || ""), [g, c] = P(
11343
+ const a = ce(null), [s, u] = P((o == null ? void 0 : o.name) || ""), [f, c] = P(
11341
11344
  (o == null ? void 0 : o.permissions) || []
11342
11345
  );
11343
11346
  nt();
11344
- const [h, l] = P(!1), [p, f] = P(!1), [y, v] = P({ top: 0, left: 0 }), { deployment: w } = ze(), { toast: I } = Qe(), z = !!o, C = Array.isArray(
11347
+ const [h, l] = P(!1), [p, g] = P(!1), [y, v] = P({ top: 0, left: 0 }), { deployment: w } = ze(), { toast: I } = Qe(), z = !!o, C = Array.isArray(
11345
11348
  (x = w == null ? void 0 : w.b2b_settings) == null ? void 0 : x.organization_permissions
11346
11349
  ) ? w.b2b_settings.organization_permissions.map((m) => ({
11347
11350
  value: m,
11348
11351
  label: m
11349
11352
  })) : [];
11350
11353
  le(() => {
11351
- f(!0);
11354
+ g(!0);
11352
11355
  const m = setTimeout(() => {
11353
11356
  if (!a.current) return;
11354
11357
  let O = null;
@@ -11399,7 +11402,7 @@ const Ui = Nt({
11399
11402
  I("Role name must be 2-50 characters and contain only letters, numbers, spaces, underscores, and hyphens", "error");
11400
11403
  return;
11401
11404
  }
11402
- if (g.length === 0) {
11405
+ if (f.length === 0) {
11403
11406
  I("Please select at least one permission", "error");
11404
11407
  return;
11405
11408
  }
@@ -11408,7 +11411,7 @@ const Ui = Nt({
11408
11411
  const b = {
11409
11412
  id: o == null ? void 0 : o.id,
11410
11413
  name: m,
11411
- permissions: g || []
11414
+ permissions: f || []
11412
11415
  };
11413
11416
  r == null || r(b);
11414
11417
  } catch (b) {
@@ -11459,7 +11462,7 @@ const Ui = Nt({
11459
11462
  ul,
11460
11463
  {
11461
11464
  options: C,
11462
- value: g,
11465
+ value: f,
11463
11466
  onChange: c,
11464
11467
  placeholder: "Select permissions",
11465
11468
  "aria-label": "Select permissions for role"
@@ -11612,16 +11615,16 @@ const Ui = Nt({
11612
11615
  return le(() => {
11613
11616
  var u;
11614
11617
  if (i.current) {
11615
- const g = (u = i.current.parentElement) == null ? void 0 : u.getBoundingClientRect();
11616
- g && s({
11617
- top: g.bottom + 8,
11618
- left: g.right - 320
11618
+ const f = (u = i.current.parentElement) == null ? void 0 : u.getBoundingClientRect();
11619
+ f && s({
11620
+ top: f.bottom + 8,
11621
+ left: f.right - 320
11619
11622
  // 320px is the width of popover
11620
11623
  });
11621
11624
  }
11622
11625
  }, []), le(() => {
11623
- const u = (g) => {
11624
- i.current && !i.current.contains(g.target) && o();
11626
+ const u = (f) => {
11627
+ i.current && !i.current.contains(f.target) && o();
11625
11628
  };
11626
11629
  return document.addEventListener("mousedown", u), () => {
11627
11630
  document.removeEventListener("mousedown", u);
@@ -12016,10 +12019,10 @@ const Ui = Nt({
12016
12019
  createEnterpriseConnection: a,
12017
12020
  deleteEnterpriseConnection: s,
12018
12021
  testEnterpriseConnection: u,
12019
- generateSCIMToken: g,
12022
+ generateSCIMToken: f,
12020
12023
  getSCIMToken: c,
12021
12024
  revokeSCIMToken: h
12022
- } = nt(), { toast: l } = Qe(), [p, f] = P(!1), [y, v] = P(null), {
12025
+ } = nt(), { toast: l } = Qe(), [p, g] = P(!1), [y, v] = P(null), {
12023
12026
  data: w = [],
12024
12027
  isLoading: I,
12025
12028
  mutate: z
@@ -12041,10 +12044,10 @@ const Ui = Nt({
12041
12044
  return o || I ? /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "center", padding: "40px 0" }, children: /* @__PURE__ */ e(Le, {}) }) : (T = t == null ? void 0 : t.b2b_settings) != null && T.enterprise_sso_enabled ? p ? /* @__PURE__ */ e(
12042
12045
  qm,
12043
12046
  {
12044
- onClose: () => f(!1),
12047
+ onClose: () => g(!1),
12045
12048
  onCreate: async (E) => {
12046
12049
  try {
12047
- await (a == null ? void 0 : a(E)), z(), f(!1), l("SSO connection created", "info");
12050
+ await (a == null ? void 0 : a(E)), z(), g(!1), l("SSO connection created", "info");
12048
12051
  } catch ($) {
12049
12052
  l($.message || "Failed to create connection", "error");
12050
12053
  }
@@ -12072,7 +12075,7 @@ const Ui = Nt({
12072
12075
  maxWidth: "360px",
12073
12076
  lineHeight: "1.6"
12074
12077
  }, children: "Set up SAML or OIDC single sign-on to allow members to sign in with your identity provider." }),
12075
- /* @__PURE__ */ n(J, { onClick: () => f(!0), style: { width: "auto" }, children: [
12078
+ /* @__PURE__ */ n(J, { onClick: () => g(!0), style: { width: "auto" }, children: [
12076
12079
  /* @__PURE__ */ e(tt, { size: 16 }),
12077
12080
  " Configure SSO"
12078
12081
  ] })
@@ -12090,7 +12093,7 @@ const Ui = Nt({
12090
12093
  onConfirmDelete: C,
12091
12094
  onCancelDelete: () => v(null),
12092
12095
  testConnection: u || null,
12093
- generateSCIMToken: g,
12096
+ generateSCIMToken: f,
12094
12097
  getSCIMToken: c,
12095
12098
  revokeSCIMToken: h,
12096
12099
  toast: l
@@ -12137,16 +12140,16 @@ const Ui = Nt({
12137
12140
  onCancelDelete: a,
12138
12141
  testConnection: s,
12139
12142
  generateSCIMToken: u,
12140
- getSCIMToken: g,
12143
+ getSCIMToken: f,
12141
12144
  revokeSCIMToken: c,
12142
12145
  toast: h
12143
12146
  }) => {
12144
12147
  var _, O;
12145
- const [l, p] = P(null), [f, y] = P(!1), [v, w] = P(null), [I, z] = P(null), [C, T] = P(!1), [E, $] = P(null);
12148
+ const [l, p] = P(null), [g, y] = P(!1), [v, w] = P(null), [I, z] = P(null), [C, T] = P(!1), [E, $] = P(null);
12146
12149
  le(() => {
12147
- g && t.id && g(t.id).then(p).catch(() => {
12150
+ f && t.id && f(t.id).then(p).catch(() => {
12148
12151
  });
12149
- }, [t.id, g]);
12152
+ }, [t.id, f]);
12150
12153
  const x = async () => {
12151
12154
  if (s) {
12152
12155
  T(!0), $(null);
@@ -12314,10 +12317,10 @@ const Ui = Nt({
12314
12317
  J,
12315
12318
  {
12316
12319
  onClick: m,
12317
- disabled: f,
12320
+ disabled: g,
12318
12321
  style: { width: "auto", fontSize: "12px", padding: "6px 12px" },
12319
12322
  children: [
12320
- f ? /* @__PURE__ */ e(Le, { size: 12 }) : /* @__PURE__ */ e(tt, { size: 14 }),
12323
+ g ? /* @__PURE__ */ e(Le, { size: 12 }) : /* @__PURE__ */ e(tt, { size: 14 }),
12321
12324
  "Generate SCIM Token"
12322
12325
  ]
12323
12326
  }
@@ -12327,7 +12330,7 @@ const Ui = Nt({
12327
12330
  {
12328
12331
  $outline: !0,
12329
12332
  onClick: m,
12330
- disabled: f,
12333
+ disabled: g,
12331
12334
  style: { width: "auto", fontSize: "12px", padding: "6px 12px" },
12332
12335
  children: "Rotate Token"
12333
12336
  }
@@ -12337,7 +12340,7 @@ const Ui = Nt({
12337
12340
  {
12338
12341
  $outline: !0,
12339
12342
  onClick: b,
12340
- disabled: f,
12343
+ disabled: g,
12341
12344
  style: { width: "auto", fontSize: "12px", padding: "6px 12px", color: "var(--color-error)" },
12342
12345
  children: "Revoke Token"
12343
12346
  }
@@ -12353,7 +12356,7 @@ const Ui = Nt({
12353
12356
  text-transform: uppercase;
12354
12357
  letter-spacing: 0.5px;
12355
12358
  `, qm = ({ onCreate: t }) => {
12356
- const { getDomains: r, testEnterpriseConnectionConfig: o } = nt(), { deployment: i } = ze(), [a, s] = P(!1), [u, g] = P(null), [c, h] = P("saml"), [l, p] = P(null), [f, y] = P(!1), [v, w] = P({
12359
+ const { getDomains: r, testEnterpriseConnectionConfig: o } = nt(), { deployment: i } = ze(), [a, s] = P(!1), [u, f] = P(null), [c, h] = P("saml"), [l, p] = P(null), [g, y] = P(!1), [v, w] = P({
12357
12360
  domain_id: "",
12358
12361
  idp_entity_id: "",
12359
12362
  idp_sso_url: "",
@@ -12374,7 +12377,7 @@ const Ui = Nt({
12374
12377
  async () => (await (r == null ? void 0 : r()) || []).filter((R) => R.verified),
12375
12378
  { revalidateOnFocus: !1 }
12376
12379
  ), x = (S) => {
12377
- g(S), h(S.protocol), S.protocol === "saml" ? w((R) => {
12380
+ f(S), h(S.protocol), S.protocol === "saml" ? w((R) => {
12378
12381
  var L, U, N;
12379
12382
  return {
12380
12383
  ...R,
@@ -12472,7 +12475,7 @@ const Ui = Nt({
12472
12475
  "button",
12473
12476
  {
12474
12477
  type: "button",
12475
- onClick: () => g(null),
12478
+ onClick: () => f(null),
12476
12479
  style: {
12477
12480
  background: "none",
12478
12481
  border: "none",
@@ -12737,7 +12740,7 @@ const Ui = Nt({
12737
12740
  /* @__PURE__ */ n(
12738
12741
  "div",
12739
12742
  {
12740
- onClick: () => y(!f),
12743
+ onClick: () => y(!g),
12741
12744
  style: {
12742
12745
  display: "flex",
12743
12746
  alignItems: "center",
@@ -12746,15 +12749,15 @@ const Ui = Nt({
12746
12749
  color: "var(--color-primary)",
12747
12750
  fontSize: "13px",
12748
12751
  fontWeight: 500,
12749
- marginBottom: f ? "16px" : "0"
12752
+ marginBottom: g ? "16px" : "0"
12750
12753
  },
12751
12754
  children: [
12752
- /* @__PURE__ */ e("span", { style: { fontSize: "10px" }, children: f ? "▼" : "▶" }),
12755
+ /* @__PURE__ */ e("span", { style: { fontSize: "10px" }, children: g ? "▼" : "▶" }),
12753
12756
  "Advanced Options (Attribute Mapping)"
12754
12757
  ]
12755
12758
  }
12756
12759
  ),
12757
- f && /* @__PURE__ */ n("div", { style: {
12760
+ g && /* @__PURE__ */ n("div", { style: {
12758
12761
  padding: "16px",
12759
12762
  background: "var(--color-background-alt)",
12760
12763
  borderRadius: "8px",
@@ -12909,7 +12912,7 @@ const Ui = Nt({
12909
12912
  margin-bottom: 24px;
12910
12913
  `, Qm = () => {
12911
12914
  var L, U, N, j;
12912
- const { activeOrganization: t, loading: r } = nt(), { switchOrganization: o, refetch: i } = Ze(), { workspaces: a } = pr(), { deployment: s } = ze(), { deleteOrganization: u, updateOrganization: g } = Ei(), { toast: c } = Qe(), [h, l] = P((t == null ? void 0 : t.name) || ""), [p, f] = P(
12915
+ const { activeOrganization: t, loading: r } = nt(), { switchOrganization: o, refetch: i } = Ze(), { workspaces: a } = pr(), { deployment: s } = ze(), { deleteOrganization: u, updateOrganization: f } = Ei(), { toast: c } = Qe(), [h, l] = P((t == null ? void 0 : t.name) || ""), [p, g] = P(
12913
12916
  (t == null ? void 0 : t.description) || ""
12914
12917
  ), [y, v] = P(
12915
12918
  (t == null ? void 0 : t.image_url) || null
@@ -12921,7 +12924,7 @@ const Ui = Nt({
12921
12924
  }), [E, $] = P(""), [x, m] = P(!1), [b, k] = P(!1), _ = xe.useCallback(async () => {
12922
12925
  if (!(!t || I))
12923
12926
  try {
12924
- z(!0), await g(t, {
12927
+ z(!0), await f(t, {
12925
12928
  name: h,
12926
12929
  description: p
12927
12930
  }), c("Changes saved", "info");
@@ -12937,12 +12940,12 @@ const Ui = Nt({
12937
12940
  p,
12938
12941
  y,
12939
12942
  C,
12940
- g,
12943
+ f,
12941
12944
  c
12942
12945
  ]);
12943
12946
  xe.useEffect(() => {
12944
12947
  var A;
12945
- t && (l(t.name || ""), f(t.description || ""), v(t.image_url || null), T({
12948
+ t && (l(t.name || ""), g(t.description || ""), v(t.image_url || null), T({
12946
12949
  allowed_ips: ((A = t.whitelisted_ips) == null ? void 0 : A.join(`
12947
12950
  `)) || "",
12948
12951
  ip_restrictions: t.enable_ip_restriction || !1,
@@ -13214,7 +13217,7 @@ const Ui = Nt({
13214
13217
  id: "description",
13215
13218
  as: "textarea",
13216
13219
  value: p,
13217
- onChange: (A) => f(A.target.value),
13220
+ onChange: (A) => g(A.target.value),
13218
13221
  onBlur: _,
13219
13222
  placeholder: "Enter organization description",
13220
13223
  style: {
@@ -13596,7 +13599,7 @@ const Ui = Nt({
13596
13599
  } = nt(), a = ce(null), [s, u] = P(
13597
13600
  null
13598
13601
  ), {
13599
- data: g = [],
13602
+ data: f = [],
13600
13603
  isLoading: c,
13601
13604
  mutate: h
13602
13605
  } = He(
@@ -13611,7 +13614,7 @@ const Ui = Nt({
13611
13614
  revalidateOnReconnect: !1,
13612
13615
  dedupingInterval: 5e3
13613
13616
  }
13614
- ), l = g, [p, f] = P(!1), [y, v] = P(null), [w, I] = P(""), [z, C] = P(null), T = ce(null), E = ce({}), $ = xe.useMemo(() => {
13617
+ ), l = f, [p, g] = P(!1), [y, v] = P(null), [w, I] = P(""), [z, C] = P(null), T = ce(null), E = ce({}), $ = xe.useMemo(() => {
13615
13618
  let b = l;
13616
13619
  if (w.trim() !== "") {
13617
13620
  const k = w.toLowerCase();
@@ -13646,7 +13649,7 @@ const Ui = Nt({
13646
13649
  J,
13647
13650
  {
13648
13651
  ref: T,
13649
- onClick: () => f(!p),
13652
+ onClick: () => g(!p),
13650
13653
  style: {
13651
13654
  padding: "8px 16px",
13652
13655
  borderRadius: "6px",
@@ -13661,7 +13664,7 @@ const Ui = Nt({
13661
13664
  Ja,
13662
13665
  {
13663
13666
  onClose: () => {
13664
- f(!1), h();
13667
+ g(!1), h();
13665
13668
  },
13666
13669
  triggerRef: T
13667
13670
  }
@@ -13878,7 +13881,7 @@ const Ui = Nt({
13878
13881
  addMemberRole: a,
13879
13882
  removeMemberRole: s,
13880
13883
  removeMember: u
13881
- } = nt(), { session: g } = Ze(), { toast: c } = Qe(), [h, l] = P(""), [p, f] = P(!1), y = ce(null), {
13884
+ } = nt(), { session: f } = Ze(), { toast: c } = Qe(), [h, l] = P(""), [p, g] = P(!1), y = ce(null), {
13882
13885
  data: v = [],
13883
13886
  isLoading: w,
13884
13887
  mutate: I
@@ -13912,7 +13915,7 @@ const Ui = Nt({
13912
13915
  c(M, "error");
13913
13916
  }
13914
13917
  }, k = () => {
13915
- f(!1), I(), c("Invitation sent successfully", "info");
13918
+ g(!1), I(), c("Invitation sent successfully", "info");
13916
13919
  };
13917
13920
  return r || w || C ? /* @__PURE__ */ e(
13918
13921
  "div",
@@ -13944,7 +13947,7 @@ const Ui = Nt({
13944
13947
  J,
13945
13948
  {
13946
13949
  ref: y,
13947
- onClick: () => f(!p),
13950
+ onClick: () => g(!p),
13948
13951
  style: {
13949
13952
  background: "var(--color-primary)",
13950
13953
  color: "white",
@@ -13966,7 +13969,7 @@ const Ui = Nt({
13966
13969
  p && /* @__PURE__ */ e(
13967
13970
  vl,
13968
13971
  {
13969
- onClose: () => f(!1),
13972
+ onClose: () => g(!1),
13970
13973
  onSuccess: k,
13971
13974
  roles: T,
13972
13975
  triggerRef: y
@@ -13986,7 +13989,7 @@ const Ui = Nt({
13986
13989
  ] }) }),
13987
13990
  /* @__PURE__ */ e(wt, { children: E.map((_) => {
13988
13991
  var R, L;
13989
- const O = _.roles || [], M = _.user, S = (M == null ? void 0 : M.id) === ((R = g == null ? void 0 : g.active_signin) == null ? void 0 : R.user_id);
13992
+ const O = _.roles || [], M = _.user, S = (M == null ? void 0 : M.id) === ((R = f == null ? void 0 : f.active_signin) == null ? void 0 : R.user_id);
13990
13993
  return /* @__PURE__ */ n(Ge, { children: [
13991
13994
  /* @__PURE__ */ e(yl, { children: /* @__PURE__ */ n("div", { children: [
13992
13995
  /* @__PURE__ */ e(Jm, { children: M != null && M.profile_picture_url ? /* @__PURE__ */ e(
@@ -14153,8 +14156,8 @@ const Ui = Nt({
14153
14156
  getRoles: i,
14154
14157
  discardInvitation: a,
14155
14158
  resendInvitation: s
14156
- } = nt(), { toast: u } = Qe(), [g, c] = P(!1), [h, l] = P(""), p = ce(null), {
14157
- data: f = [],
14159
+ } = nt(), { toast: u } = Qe(), [f, c] = P(!1), [h, l] = P(""), p = ce(null), {
14160
+ data: g = [],
14158
14161
  isLoading: y,
14159
14162
  mutate: v
14160
14163
  } = He(
@@ -14163,9 +14166,9 @@ const Ui = Nt({
14163
14166
  ), { data: w = [], isLoading: I } = He(
14164
14167
  t ? `wacht-api-organizations:${t.id}:roles` : null,
14165
14168
  () => (i == null ? void 0 : i()) || []
14166
- ), z = w, C = xe.useMemo(() => h ? f.filter(
14169
+ ), z = w, C = xe.useMemo(() => h ? g.filter(
14167
14170
  (x) => x.email.toLowerCase().includes(h.toLowerCase())
14168
- ) : f, [f, h]), T = () => {
14171
+ ) : g, [g, h]), T = () => {
14169
14172
  u("Invitation sent successfully", "info"), v(), c(!1);
14170
14173
  }, E = async (x) => {
14171
14174
  try {
@@ -14212,7 +14215,7 @@ const Ui = Nt({
14212
14215
  J,
14213
14216
  {
14214
14217
  ref: p,
14215
- onClick: () => c(!g),
14218
+ onClick: () => c(!f),
14216
14219
  style: {
14217
14220
  background: "var(--color-primary)",
14218
14221
  color: "white",
@@ -14231,7 +14234,7 @@ const Ui = Nt({
14231
14234
  ]
14232
14235
  }
14233
14236
  ),
14234
- g && /* @__PURE__ */ e(
14237
+ f && /* @__PURE__ */ e(
14235
14238
  vl,
14236
14239
  {
14237
14240
  onClose: () => c(!1),
@@ -14315,7 +14318,7 @@ const Ui = Nt({
14315
14318
  ] });
14316
14319
  }, r0 = () => {
14317
14320
  var x;
14318
- const { activeOrganization: t, loading: r, getRoles: o, removeRole: i } = nt(), { deployment: a } = ze(), [s, u] = P({ isOpen: !1 }), [g, c] = P(null), [h, l] = P(null), [p, f] = P(""), [y, v] = P(null), w = ce(null), {
14321
+ const { activeOrganization: t, loading: r, getRoles: o, removeRole: i } = nt(), { deployment: a } = ze(), [s, u] = P({ isOpen: !1 }), [f, c] = P(null), [h, l] = P(null), [p, g] = P(""), [y, v] = P(null), w = ce(null), {
14319
14322
  data: I = [],
14320
14323
  isLoading: z,
14321
14324
  mutate: C
@@ -14364,22 +14367,22 @@ const Ui = Nt({
14364
14367
  children: /* @__PURE__ */ e(Le, {})
14365
14368
  }
14366
14369
  ) : /* @__PURE__ */ n(re, { children: [
14367
- g && /* @__PURE__ */ n(
14370
+ f && /* @__PURE__ */ n(
14368
14371
  "div",
14369
14372
  {
14370
14373
  style: {
14371
14374
  marginBottom: "20px",
14372
14375
  padding: "8px",
14373
- background: g.type === "success" ? "var(--color-success-background)" : "var(--color-error-background)",
14374
- color: g.type === "success" ? "var(--color-success)" : "var(--color-error)",
14376
+ background: f.type === "success" ? "var(--color-success-background)" : "var(--color-error-background)",
14377
+ color: f.type === "success" ? "var(--color-success)" : "var(--color-error)",
14375
14378
  borderRadius: "8px",
14376
14379
  display: "flex",
14377
14380
  alignItems: "center",
14378
14381
  gap: "8px"
14379
14382
  },
14380
14383
  children: [
14381
- g.type === "success" ? "✓" : /* @__PURE__ */ e(ft, { size: 16 }),
14382
- g.text
14384
+ f.type === "success" ? "✓" : /* @__PURE__ */ e(ft, { size: 16 }),
14385
+ f.text
14383
14386
  ]
14384
14387
  }
14385
14388
  ),
@@ -14388,7 +14391,7 @@ const Ui = Nt({
14388
14391
  Rt,
14389
14392
  {
14390
14393
  placeholder: "Search roles",
14391
- onChange: f,
14394
+ onChange: g,
14392
14395
  value: p
14393
14396
  }
14394
14397
  ),
@@ -14520,9 +14523,9 @@ const Ui = Nt({
14520
14523
  ] })
14521
14524
  ] });
14522
14525
  }, o0 = () => {
14523
- const { loading: t, activeOrganization: r } = nt(), [o, i] = P("general"), [a, s] = P(null), [u, g] = P("info"), c = W(
14526
+ const { loading: t, activeOrganization: r } = nt(), [o, i] = P("general"), [a, s] = P(null), [u, f] = P("info"), c = W(
14524
14527
  (h, l = "info") => {
14525
- s(h), g(l), setTimeout(() => s(null), 3e3);
14528
+ s(h), f(l), setTimeout(() => s(null), 3e3);
14526
14529
  },
14527
14530
  [s]
14528
14531
  );
@@ -14708,11 +14711,11 @@ const Ui = Nt({
14708
14711
  headerContent: a,
14709
14712
  footerContent: s,
14710
14713
  customContent: u,
14711
- children: g,
14714
+ children: f,
14712
14715
  showCloseButton: c
14713
14716
  }) => /* @__PURE__ */ e(Re, { isOpen: t, onClose: r, children: /* @__PURE__ */ e(Re.Overlay, { children: /* @__PURE__ */ n(Re.Content, { style: { width: "900px", maxWidth: "100%" }, children: [
14714
14717
  i && /* @__PURE__ */ e(Re.Header, { showCloseButton: c, children: a || o }),
14715
- u || g || /* @__PURE__ */ e(o0, {}),
14718
+ u || f || /* @__PURE__ */ e(o0, {}),
14716
14719
  s && /* @__PURE__ */ e(Re.Footer, { children: s })
14717
14720
  ] }) }) }), i0 = d.div`
14718
14721
  display: flex;
@@ -15012,7 +15015,7 @@ const Ui = Nt({
15012
15015
  onCreateOrganization: i
15013
15016
  }) => {
15014
15017
  var R;
15015
- const [a, s] = P(""), [u, g] = P(""), [c, h] = P(), [l, p] = P(null), [f, y] = P(!1), [v, w] = P(!1), [I, z] = P(t), C = ce(null), T = ce(null), { toast: E } = Qe(), { createWorkspace: $ } = pr(), { organizationMemberships: x } = Ft(), m = (R = x == null ? void 0 : x.find(
15018
+ const [a, s] = P(""), [u, f] = P(""), [c, h] = P(), [l, p] = P(null), [g, y] = P(!1), [v, w] = P(!1), [I, z] = P(t), C = ce(null), T = ce(null), { toast: E } = Qe(), { createWorkspace: $ } = pr(), { organizationMemberships: x } = Ft(), m = (R = x == null ? void 0 : x.find(
15016
15019
  (L) => L.organization.id === I
15017
15020
  )) == null ? void 0 : R.organization, b = (L) => {
15018
15021
  if (L.target.files && L.target.files[0]) {
@@ -15083,7 +15086,7 @@ const Ui = Nt({
15083
15086
  ref: C,
15084
15087
  onChange: b,
15085
15088
  accept: "image/png, image/jpeg, image/gif",
15086
- disabled: f
15089
+ disabled: g
15087
15090
  }
15088
15091
  ),
15089
15092
  /* @__PURE__ */ e(d0, { children: "Create new workspace" }),
@@ -15103,7 +15106,7 @@ const Ui = Nt({
15103
15106
  {
15104
15107
  type: "button",
15105
15108
  onClick: () => w(!v),
15106
- disabled: f,
15109
+ disabled: g,
15107
15110
  children: [
15108
15111
  /* @__PURE__ */ n(
15109
15112
  "div",
@@ -15179,7 +15182,7 @@ const Ui = Nt({
15179
15182
  value: a,
15180
15183
  onChange: (L) => s(L.target.value),
15181
15184
  placeholder: "Workspace Name",
15182
- disabled: f
15185
+ disabled: g
15183
15186
  }
15184
15187
  )
15185
15188
  ] }),
@@ -15189,15 +15192,15 @@ const Ui = Nt({
15189
15192
  v0,
15190
15193
  {
15191
15194
  value: u,
15192
- onChange: (L) => g(L.target.value),
15195
+ onChange: (L) => f(L.target.value),
15193
15196
  placeholder: "What is this workspace for?",
15194
- disabled: f
15197
+ disabled: g
15195
15198
  }
15196
15199
  )
15197
15200
  ] })
15198
15201
  ] }),
15199
15202
  /* @__PURE__ */ n(y0, { children: [
15200
- o ? /* @__PURE__ */ n(b0, { onClick: o, disabled: f, children: [
15203
+ o ? /* @__PURE__ */ n(b0, { onClick: o, disabled: g, children: [
15201
15204
  /* @__PURE__ */ e(Jr, { size: 16 }),
15202
15205
  "Back"
15203
15206
  ] }) : /* @__PURE__ */ e("div", {}),
@@ -15205,8 +15208,8 @@ const Ui = Nt({
15205
15208
  x0,
15206
15209
  {
15207
15210
  onClick: S,
15208
- disabled: f || !a.trim(),
15209
- children: f ? "Creating..." : "Create"
15211
+ disabled: g || !a.trim(),
15212
+ children: g ? "Creating..." : "Create"
15210
15213
  }
15211
15214
  )
15212
15215
  ] })
@@ -15218,15 +15221,15 @@ const Ui = Nt({
15218
15221
  onCreated: o,
15219
15222
  organizationId: i
15220
15223
  }) => {
15221
- const [a, s] = P(!1), [u, g] = P(i), { refetch: c, organizationMemberships: h } = Ft(), l = () => {
15224
+ const [a, s] = P(!1), [u, f] = P(i), { refetch: c, organizationMemberships: h } = Ft(), l = () => {
15222
15225
  o == null || o(), r == null || r();
15223
15226
  }, p = () => {
15224
15227
  s(!0);
15225
- }, f = async () => {
15228
+ }, g = async () => {
15226
15229
  await c(), setTimeout(() => {
15227
15230
  if (h && h.length > 0) {
15228
15231
  const y = h[h.length - 1];
15229
- g(y.organization.id);
15232
+ f(y.organization.id);
15230
15233
  }
15231
15234
  s(!1);
15232
15235
  }, 500);
@@ -15234,7 +15237,7 @@ const Ui = Nt({
15234
15237
  return /* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(Re, { isOpen: t, onClose: r, children: /* @__PURE__ */ e(Re.Overlay, { children: /* @__PURE__ */ e(Re.Content, { style: { width: "900px", maxWidth: "90vw" }, children: /* @__PURE__ */ e(Re.Body, { style: { padding: 0 }, children: a ? /* @__PURE__ */ e(
15235
15238
  ji,
15236
15239
  {
15237
- onSuccess: f,
15240
+ onSuccess: g,
15238
15241
  onCancel: () => s(!1)
15239
15242
  }
15240
15243
  ) : /* @__PURE__ */ e(
@@ -15302,7 +15305,7 @@ const Ui = Nt({
15302
15305
  createInvitation: i,
15303
15306
  triggerRef: a
15304
15307
  }) => {
15305
- const s = ce(null), [u, g] = P(""), [c, h] = P(null), [l, p] = P(!1), [f, y] = P(!1), [v, w] = P({ top: 0, left: 0 }), { toast: I } = Qe(), z = o.map((E) => ({
15308
+ const s = ce(null), [u, f] = P(""), [c, h] = P(null), [l, p] = P(!1), [g, y] = P(!1), [v, w] = P({ top: 0, left: 0 }), { toast: I } = Qe(), z = o.map((E) => ({
15306
15309
  value: E.id,
15307
15310
  label: E.name
15308
15311
  }));
@@ -15350,7 +15353,7 @@ const Ui = Nt({
15350
15353
  }
15351
15354
  }
15352
15355
  };
15353
- return f ? /* @__PURE__ */ n(
15356
+ return g ? /* @__PURE__ */ n(
15354
15357
  P0,
15355
15358
  {
15356
15359
  ref: s,
@@ -15377,7 +15380,7 @@ const Ui = Nt({
15377
15380
  type: "email",
15378
15381
  placeholder: "colleague@company.com",
15379
15382
  value: u,
15380
- onChange: (E) => g(E.target.value),
15383
+ onChange: (E) => f(E.target.value),
15381
15384
  autoFocus: !0,
15382
15385
  "aria-label": "Email address for workspace invitation",
15383
15386
  "aria-describedby": "workspace-email-help"
@@ -15484,9 +15487,9 @@ const Ui = Nt({
15484
15487
  triggerRef: i
15485
15488
  }) => {
15486
15489
  var E;
15487
- const a = ce(null), [s, u] = P((o == null ? void 0 : o.name) || ""), [g, c] = P(
15490
+ const a = ce(null), [s, u] = P((o == null ? void 0 : o.name) || ""), [f, c] = P(
15488
15491
  (o == null ? void 0 : o.permissions) || []
15489
- ), [h, l] = P(!1), { deployment: p } = ze(), [f, y] = P(!1), [v, w] = P({ top: 0, left: 0 }), { toast: I } = Qe(), z = !!o, C = (((E = p == null ? void 0 : p.b2b_settings) == null ? void 0 : E.workspace_permissions) || []).map(($) => ({
15492
+ ), [h, l] = P(!1), { deployment: p } = ze(), [g, y] = P(!1), [v, w] = P({ top: 0, left: 0 }), { toast: I } = Qe(), z = !!o, C = (((E = p == null ? void 0 : p.b2b_settings) == null ? void 0 : E.workspace_permissions) || []).map(($) => ({
15490
15493
  value: $,
15491
15494
  label: $
15492
15495
  }));
@@ -15519,7 +15522,7 @@ const Ui = Nt({
15519
15522
  const $ = {
15520
15523
  id: o == null ? void 0 : o.id,
15521
15524
  name: s.trim(),
15522
- permissions: g
15525
+ permissions: f
15523
15526
  };
15524
15527
  r == null || r($);
15525
15528
  } catch ($) {
@@ -15530,7 +15533,7 @@ const Ui = Nt({
15530
15533
  }
15531
15534
  }
15532
15535
  };
15533
- return f ? /* @__PURE__ */ n(
15536
+ return g ? /* @__PURE__ */ n(
15534
15537
  D0,
15535
15538
  {
15536
15539
  ref: a,
@@ -15565,7 +15568,7 @@ const Ui = Nt({
15565
15568
  ul,
15566
15569
  {
15567
15570
  options: C,
15568
- value: g,
15571
+ value: f,
15569
15572
  onChange: c,
15570
15573
  placeholder: "Select permissions"
15571
15574
  }
@@ -15744,7 +15747,7 @@ const Ui = Nt({
15744
15747
  createInvitation: a,
15745
15748
  discardInvitation: s,
15746
15749
  resendInvitation: u
15747
- } = ur(), { toast: g } = Qe(), [c, h] = P(!0), [l, p] = P(!0), [f, y] = P(""), [v, w] = P([]), [I, z] = P([]), [C, T] = P(!1), E = ce(null);
15750
+ } = ur(), { toast: f } = Qe(), [c, h] = P(!0), [l, p] = P(!0), [g, y] = P(""), [v, w] = P([]), [I, z] = P([]), [C, T] = P(!1), E = ce(null);
15748
15751
  le(() => {
15749
15752
  if (!t) return;
15750
15753
  (async () => {
@@ -15772,14 +15775,14 @@ const Ui = Nt({
15772
15775
  try {
15773
15776
  await u(k.id);
15774
15777
  const _ = await i();
15775
- w(_), g("Invitation resent successfully", "info");
15778
+ w(_), f("Invitation resent successfully", "info");
15776
15779
  } catch {
15777
15780
  }
15778
15781
  }, m = async () => {
15779
15782
  T(!1);
15780
15783
  const k = await i();
15781
- w(k), g("Invitation sent successfully", "info");
15782
- }, b = xe.useMemo(() => f ? v.filter((k) => (k.email || "").toLowerCase().includes(f.toLowerCase())) : v, [v, f]);
15784
+ w(k), f("Invitation sent successfully", "info");
15785
+ }, b = xe.useMemo(() => g ? v.filter((k) => (k.email || "").toLowerCase().includes(g.toLowerCase())) : v, [v, g]);
15783
15786
  return r || c || l ? /* @__PURE__ */ e(
15784
15787
  "div",
15785
15788
  {
@@ -15791,7 +15794,7 @@ const Ui = Nt({
15791
15794
  /* @__PURE__ */ e(
15792
15795
  Rt,
15793
15796
  {
15794
- value: f,
15797
+ value: g,
15795
15798
  onChange: y,
15796
15799
  placeholder: "Search Invitation"
15797
15800
  }
@@ -15827,7 +15830,7 @@ const Ui = Nt({
15827
15830
  /* @__PURE__ */ e("div", { children: b.length === 0 ? /* @__PURE__ */ e(
15828
15831
  dt,
15829
15832
  {
15830
- title: f ? "No invitations match your search" : "No pending invitations",
15833
+ title: g ? "No invitations match your search" : "No pending invitations",
15831
15834
  description: "Invite new members to your workspace."
15832
15835
  }
15833
15836
  ) : /* @__PURE__ */ n(bt, { children: [
@@ -15906,9 +15909,9 @@ const Ui = Nt({
15906
15909
  removeMember: a,
15907
15910
  addMemberRole: s,
15908
15911
  removeMemberRole: u
15909
- } = ur(), { session: g } = Ze(), { toast: c } = Qe(), [h, l] = P(""), {
15912
+ } = ur(), { session: f } = Ze(), { toast: c } = Qe(), [h, l] = P(""), {
15910
15913
  data: p = [],
15911
- isLoading: f,
15914
+ isLoading: g,
15912
15915
  mutate: y
15913
15916
  } = He(
15914
15917
  t ? `wacht-api-workspaces:${t.id}:members` : null,
@@ -15940,7 +15943,7 @@ const Ui = Nt({
15940
15943
  var b;
15941
15944
  return ((b = x.roles) == null ? void 0 : b.some((k) => k.id === m)) || !1;
15942
15945
  };
15943
- return r || f || w ? /* @__PURE__ */ e(
15946
+ return r || g || w ? /* @__PURE__ */ e(
15944
15947
  "div",
15945
15948
  {
15946
15949
  style: { display: "flex", justifyContent: "center", padding: "40px 0" },
@@ -15969,7 +15972,7 @@ const Ui = Nt({
15969
15972
  ] }) }),
15970
15973
  /* @__PURE__ */ e(wt, { children: z.map((x) => {
15971
15974
  var _, O;
15972
- const m = x.public_user_data, b = x.roles || [], k = (m == null ? void 0 : m.id) === ((_ = g == null ? void 0 : g.active_signin) == null ? void 0 : _.user_id);
15975
+ const m = x.public_user_data, b = x.roles || [], k = (m == null ? void 0 : m.id) === ((_ = f == null ? void 0 : f.active_signin) == null ? void 0 : _.user_id);
15973
15976
  return /* @__PURE__ */ n(Ge, { children: [
15974
15977
  /* @__PURE__ */ e(yl, { children: /* @__PURE__ */ n("div", { children: [
15975
15978
  /* @__PURE__ */ e(q0, { children: m && m.profile_picture_url ? /* @__PURE__ */ e(
@@ -16130,18 +16133,18 @@ const Ui = Nt({
16130
16133
  ] });
16131
16134
  }, K0 = () => {
16132
16135
  var ee, ne;
16133
- const { activeWorkspace: t, loading: r, updateWorkspace: o } = ur(), { deleteWorkspace: i } = pr(), { deployment: a } = ze(), { toast: s } = Qe(), [u, g] = P((t == null ? void 0 : t.name) || ""), [c, h] = P(
16136
+ const { activeWorkspace: t, loading: r, updateWorkspace: o } = ur(), { deleteWorkspace: i } = pr(), { deployment: a } = ze(), { toast: s } = Qe(), [u, f] = P((t == null ? void 0 : t.name) || ""), [c, h] = P(
16134
16137
  (t == null ? void 0 : t.description) || ""
16135
16138
  ), [l, p] = P({
16136
16139
  mfa_required: !1,
16137
16140
  ip_restrictions: !1,
16138
16141
  allowed_ips: ""
16139
- }), [f, y] = P(null), [v, w] = P(
16142
+ }), [g, y] = P(null), [v, w] = P(
16140
16143
  (t == null ? void 0 : t.image_url) || null
16141
16144
  ), [I, z] = P(!1), [C, T] = P(!1), [E, $] = P(""), [x, m] = P(!1), [b, k] = P(!1), _ = xe.useRef(null), O = xe.useRef(null);
16142
16145
  if (xe.useEffect(() => {
16143
16146
  var H;
16144
- t && (g(t.name || ""), h(t.description || ""), w(t.image_url || null), p({
16147
+ t && (f(t.name || ""), h(t.description || ""), w(t.image_url || null), p({
16145
16148
  mfa_required: t.enforce_2fa || !1,
16146
16149
  ip_restrictions: t.enable_ip_restriction || !1,
16147
16150
  allowed_ips: ((H = t.whitelisted_ips) == null ? void 0 : H.join(`
@@ -16172,7 +16175,7 @@ const Ui = Nt({
16172
16175
  try {
16173
16176
  T(!0);
16174
16177
  const H = {};
16175
- f && (H.image = f, y(null)), u !== t.name && (H.name = u), c !== t.description && (H.description = c), l.mfa_required !== t.enforce_2fa && (H.enforce_2fa = l.mfa_required), l.ip_restrictions !== t.enable_ip_restriction && (H.enable_ip_restriction = l.ip_restrictions);
16178
+ g && (H.image = g, y(null)), u !== t.name && (H.name = u), c !== t.description && (H.description = c), l.mfa_required !== t.enforce_2fa && (H.enforce_2fa = l.mfa_required), l.ip_restrictions !== t.enable_ip_restriction && (H.enable_ip_restriction = l.ip_restrictions);
16176
16179
  const Z = (t.whitelisted_ips || []).join(`
16177
16180
  `);
16178
16181
  l.allowed_ips !== Z && (H.whitelisted_ips = l.allowed_ips.split(`
@@ -16187,7 +16190,7 @@ const Ui = Nt({
16187
16190
  o,
16188
16191
  u,
16189
16192
  c,
16190
- f,
16193
+ g,
16191
16194
  l,
16192
16195
  C
16193
16196
  ]), L = xe.useCallback(() => {
@@ -16195,7 +16198,7 @@ const Ui = Nt({
16195
16198
  R();
16196
16199
  }, 1e3);
16197
16200
  }, [R]), U = (H) => {
16198
- g(H.target.value), L();
16201
+ f(H.target.value), L();
16199
16202
  }, N = (H) => {
16200
16203
  h(H.target.value), L();
16201
16204
  }, j = () => {
@@ -16778,16 +16781,16 @@ const Ui = Nt({
16778
16781
  ] });
16779
16782
  }, Q0 = () => {
16780
16783
  var m;
16781
- const { activeWorkspace: t, loading: r, getRoles: o, createRole: i, deleteRole: a } = ur(), { toast: s } = Qe(), { deployment: u } = ze(), [g, c] = P(""), [h, l] = P({ isOpen: !1 }), [p, f] = P(null), [y, v] = P(null), w = ce(null), I = ce(/* @__PURE__ */ new Map()), {
16784
+ const { activeWorkspace: t, loading: r, getRoles: o, createRole: i, deleteRole: a } = ur(), { toast: s } = Qe(), { deployment: u } = ze(), [f, c] = P(""), [h, l] = P({ isOpen: !1 }), [p, g] = P(null), [y, v] = P(null), w = ce(null), I = ce(/* @__PURE__ */ new Map()), {
16782
16785
  data: z = [],
16783
16786
  isLoading: C,
16784
16787
  mutate: T
16785
16788
  } = He(
16786
16789
  t ? `wacht-api-workspaces:${t.id}:roles` : null,
16787
16790
  () => o() || []
16788
- ), E = xe.useMemo(() => g ? z.filter(
16789
- (b) => b.name.toLowerCase().includes(g.toLowerCase())
16790
- ) : z, [z, g]), $ = async (b) => {
16791
+ ), E = xe.useMemo(() => f ? z.filter(
16792
+ (b) => b.name.toLowerCase().includes(f.toLowerCase())
16793
+ ) : z, [z, f]), $ = async (b) => {
16791
16794
  try {
16792
16795
  await i(b.name, b.permissions || []), s("Role created successfully", "info"), l({ isOpen: !1 }), T();
16793
16796
  } catch {
@@ -16813,7 +16816,7 @@ const Ui = Nt({
16813
16816
  {
16814
16817
  placeholder: "Search roles",
16815
16818
  onChange: c,
16816
- value: g
16819
+ value: f
16817
16820
  }
16818
16821
  ),
16819
16822
  /* @__PURE__ */ n("div", { style: { position: "relative" }, children: [
@@ -16849,8 +16852,8 @@ const Ui = Nt({
16849
16852
  E.length === 0 ? /* @__PURE__ */ e(
16850
16853
  dt,
16851
16854
  {
16852
- title: g ? "No roles match your search" : "No roles available",
16853
- description: g ? "Try adjusting your search query" : "Contact your administrator to set up workspace roles."
16855
+ title: f ? "No roles match your search" : "No roles available",
16856
+ description: f ? "Try adjusting your search query" : "Contact your administrator to set up workspace roles."
16854
16857
  }
16855
16858
  ) : /* @__PURE__ */ e(
16856
16859
  "div",
@@ -16895,7 +16898,7 @@ const Ui = Nt({
16895
16898
  mt,
16896
16899
  {
16897
16900
  open: p === b.id,
16898
- openChange: (_) => f(_ ? b.id : null),
16901
+ openChange: (_) => g(_ ? b.id : null),
16899
16902
  children: [
16900
16903
  /* @__PURE__ */ e(yt, { children: /* @__PURE__ */ e(
16901
16904
  Sl,
@@ -16913,7 +16916,7 @@ const Ui = Nt({
16913
16916
  Be,
16914
16917
  {
16915
16918
  onClick: () => {
16916
- f(null);
16919
+ g(null);
16917
16920
  const _ = I.current.get(
16918
16921
  b.id
16919
16922
  );
@@ -16931,7 +16934,7 @@ const Ui = Nt({
16931
16934
  {
16932
16935
  $destructive: !0,
16933
16936
  onClick: () => {
16934
- f(null), v(b.id);
16937
+ g(null), v(b.id);
16935
16938
  },
16936
16939
  children: "Remove Role"
16937
16940
  }
@@ -16956,7 +16959,7 @@ const Ui = Nt({
16956
16959
  current: h.triggerElement || null
16957
16960
  },
16958
16961
  onClose: () => {
16959
- l({ isOpen: !1 }), f(null);
16962
+ l({ isOpen: !1 }), g(null);
16960
16963
  },
16961
16964
  onSuccess: $
16962
16965
  }
@@ -16971,9 +16974,9 @@ const Ui = Nt({
16971
16974
  )
16972
16975
  ] });
16973
16976
  }, X0 = () => {
16974
- const { activeWorkspace: t, loading: r } = ur(), [o, i] = P("general"), [a, s] = P(null), [u, g] = P("info"), c = W(
16977
+ const { activeWorkspace: t, loading: r } = ur(), [o, i] = P("general"), [a, s] = P(null), [u, f] = P("info"), c = W(
16975
16978
  (h, l = "info") => {
16976
- s(h), g(l), setTimeout(() => s(null), 3e3);
16979
+ s(h), f(l), setTimeout(() => s(null), 3e3);
16977
16980
  },
16978
16981
  []
16979
16982
  );
@@ -17089,11 +17092,11 @@ const Ui = Nt({
17089
17092
  headerContent: a,
17090
17093
  footerContent: s,
17091
17094
  customContent: u,
17092
- children: g,
17095
+ children: f,
17093
17096
  showCloseButton: c
17094
17097
  }) => /* @__PURE__ */ e(Re, { isOpen: t, onClose: r, children: /* @__PURE__ */ e(Re.Overlay, { children: /* @__PURE__ */ n(Re.Content, { style: { width: "900px", maxWidth: "100%" }, children: [
17095
17098
  i && /* @__PURE__ */ e(Re.Header, { showCloseButton: c, children: a || o }),
17096
- u || g || /* @__PURE__ */ e(X0, {}),
17099
+ u || f || /* @__PURE__ */ e(X0, {}),
17097
17100
  s && /* @__PURE__ */ e(Re.Footer, { children: s })
17098
17101
  ] }) }) }), zl = ({
17099
17102
  triggerRef: t,
@@ -17108,14 +17111,14 @@ const Ui = Nt({
17108
17111
  u(void 0);
17109
17112
  return;
17110
17113
  }
17111
- const g = () => {
17114
+ const f = () => {
17112
17115
  if (!t.current) return;
17113
- const c = t.current.getBoundingClientRect(), h = window.innerWidth, l = window.innerHeight, p = h - c.left, f = c.right, y = l - c.bottom, v = c.top;
17116
+ const c = t.current.getBoundingClientRect(), h = window.innerWidth, l = window.innerHeight, p = h - c.left, g = c.right, y = l - c.bottom, v = c.top;
17114
17117
  let w = {};
17115
- p >= o ? w.left = c.left : f >= o ? w.left = c.right - o : w.left = Math.max(a, Math.min(h - o - a, c.left)), y >= 150 ? (w.top = c.bottom + a, w.maxHeight = Math.min(i, y - a * 2)) : v >= 150 ? (w.bottom = l - c.top + a, w.maxHeight = Math.min(i, v - a * 2)) : (w.top = c.bottom + a, w.maxHeight = Math.max(100, y - a * 2)), u(w);
17118
+ p >= o ? w.left = c.left : g >= o ? w.left = c.right - o : w.left = Math.max(a, Math.min(h - o - a, c.left)), y >= 150 ? (w.top = c.bottom + a, w.maxHeight = Math.min(i, y - a * 2)) : v >= 150 ? (w.bottom = l - c.top + a, w.maxHeight = Math.min(i, v - a * 2)) : (w.top = c.bottom + a, w.maxHeight = Math.max(100, y - a * 2)), u(w);
17116
17119
  };
17117
- return g(), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0), () => {
17118
- window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
17120
+ return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
17121
+ window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
17119
17122
  };
17120
17123
  }, [r, o, i, a]), s;
17121
17124
  }, ev = ["organization:admin"], tv = [
@@ -17527,11 +17530,11 @@ const fs = d.div`
17527
17530
  showPersonal: t = !0
17528
17531
  }) => {
17529
17532
  var me, V, ve, X;
17530
- const [r, o] = P(!1), [i, a] = P(!1), [s, u] = P(/* @__PURE__ */ new Set()), g = ce(null), c = ce(null), h = zl({
17531
- triggerRef: g,
17533
+ const [r, o] = P(!1), [i, a] = P(!1), [s, u] = P(/* @__PURE__ */ new Set()), f = ce(null), c = ce(null), h = zl({
17534
+ triggerRef: f,
17532
17535
  isOpen: r,
17533
17536
  minWidth: 300
17534
- }), l = Hr(!1), p = Hr(!1), f = Hr(!1), y = Hr(!1), [v, w] = P(null), [I, z] = P(!1), [C, T] = P(null), {
17537
+ }), l = Hr(!1), p = Hr(!1), g = Hr(!1), y = Hr(!1), [v, w] = P(null), [I, z] = P(!1), [C, T] = P(null), {
17535
17538
  organizationMemberships: E,
17536
17539
  loading: $,
17537
17540
  refetch: x
@@ -17568,7 +17571,7 @@ const fs = d.div`
17568
17571
  const _e = (ye) => {
17569
17572
  var B, F;
17570
17573
  const G = ye.target;
17571
- (B = g.current) != null && B.contains(G) || (F = c.current) != null && F.contains(G) || (o(!1), T(null));
17574
+ (B = f.current) != null && B.contains(G) || (F = c.current) != null && F.contains(G) || (o(!1), T(null));
17572
17575
  };
17573
17576
  document.addEventListener("mousedown", _e), Y = () => {
17574
17577
  document.removeEventListener("mousedown", _e);
@@ -17612,7 +17615,7 @@ const fs = d.div`
17612
17615
  /* @__PURE__ */ n(
17613
17616
  iv,
17614
17617
  {
17615
- ref: g,
17618
+ ref: f,
17616
17619
  onClick: () => {
17617
17620
  o(!r), r || T(null);
17618
17621
  },
@@ -17861,7 +17864,7 @@ const fs = d.div`
17861
17864
  {
17862
17865
  as: "button",
17863
17866
  onClick: () => {
17864
- w(m.id), f.open();
17867
+ w(m.id), g.open();
17865
17868
  },
17866
17869
  disabled: i,
17867
17870
  children: /* @__PURE__ */ n(kt, { children: [
@@ -18032,7 +18035,7 @@ const fs = d.div`
18032
18035
  {
18033
18036
  as: "button",
18034
18037
  onClick: () => {
18035
- w(de.id), f.open();
18038
+ w(de.id), g.open();
18036
18039
  },
18037
18040
  disabled: i,
18038
18041
  children: /* @__PURE__ */ n(kt, { children: [
@@ -18058,7 +18061,7 @@ const fs = d.div`
18058
18061
  ys,
18059
18062
  {
18060
18063
  onClick: () => {
18061
- w(m.id), f.open();
18064
+ w(m.id), g.open();
18062
18065
  },
18063
18066
  disabled: i,
18064
18067
  children: /* @__PURE__ */ n(kt, { children: [
@@ -18109,9 +18112,9 @@ const fs = d.div`
18109
18112
  v && /* @__PURE__ */ e(
18110
18113
  E0,
18111
18114
  {
18112
- isOpen: f.isOpen,
18115
+ isOpen: g.isOpen,
18113
18116
  onClose: () => {
18114
- f.close(), w(null);
18117
+ g.close(), w(null);
18115
18118
  },
18116
18119
  organizationId: v
18117
18120
  }
@@ -18153,11 +18156,11 @@ var dr;
18153
18156
  if (p < -1 || p > 7)
18154
18157
  throw new RangeError("Mask value out of range");
18155
18158
  this.size = c * 4 + 17;
18156
- let f = [];
18159
+ let g = [];
18157
18160
  for (let v = 0; v < this.size; v++)
18158
- f.push(!1);
18161
+ g.push(!1);
18159
18162
  for (let v = 0; v < this.size; v++)
18160
- this.modules.push(f.slice()), this.isFunction.push(f.slice());
18163
+ this.modules.push(g.slice()), this.isFunction.push(g.slice());
18161
18164
  this.drawFunctionPatterns();
18162
18165
  const y = this.addEccAndInterleave(l);
18163
18166
  if (this.drawCodewords(y), p == -1) {
@@ -18198,8 +18201,8 @@ var dr;
18198
18201
  // This function allows the user to create a custom sequence of segments that switches
18199
18202
  // between modes (such as alphanumeric and byte) to encode text in less space.
18200
18203
  // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
18201
- static encodeSegments(c, h, l = 1, p = 40, f = -1, y = !0) {
18202
- if (!(Ie.MIN_VERSION <= l && l <= p && p <= Ie.MAX_VERSION) || f < -1 || f > 7)
18204
+ static encodeSegments(c, h, l = 1, p = 40, g = -1, y = !0) {
18205
+ if (!(Ie.MIN_VERSION <= l && l <= p && p <= Ie.MAX_VERSION) || g < -1 || g > 7)
18203
18206
  throw new RangeError("Invalid value");
18204
18207
  let v, w;
18205
18208
  for (v = l; ; v++) {
@@ -18227,7 +18230,7 @@ var dr;
18227
18230
  let C = [];
18228
18231
  for (; C.length * 8 < I.length; )
18229
18232
  C.push(0);
18230
- return I.forEach((T, E) => C[E >>> 3] |= T << 7 - (E & 7)), new Ie(v, h, C, f);
18233
+ return I.forEach((T, E) => C[E >>> 3] |= T << 7 - (E & 7)), new Ie(v, h, C, g);
18231
18234
  }
18232
18235
  /*-- Accessor methods --*/
18233
18236
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -18257,19 +18260,19 @@ var dr;
18257
18260
  drawFormatBits(c) {
18258
18261
  const h = this.errorCorrectionLevel.formatBits << 3 | c;
18259
18262
  let l = h;
18260
- for (let f = 0; f < 10; f++)
18263
+ for (let g = 0; g < 10; g++)
18261
18264
  l = l << 1 ^ (l >>> 9) * 1335;
18262
18265
  const p = (h << 10 | l) ^ 21522;
18263
18266
  a(p >>> 15 == 0);
18264
- for (let f = 0; f <= 5; f++)
18265
- this.setFunctionModule(8, f, i(p, f));
18267
+ for (let g = 0; g <= 5; g++)
18268
+ this.setFunctionModule(8, g, i(p, g));
18266
18269
  this.setFunctionModule(8, 7, i(p, 6)), this.setFunctionModule(8, 8, i(p, 7)), this.setFunctionModule(7, 8, i(p, 8));
18267
- for (let f = 9; f < 15; f++)
18268
- this.setFunctionModule(14 - f, 8, i(p, f));
18269
- for (let f = 0; f < 8; f++)
18270
- this.setFunctionModule(this.size - 1 - f, 8, i(p, f));
18271
- for (let f = 8; f < 15; f++)
18272
- this.setFunctionModule(8, this.size - 15 + f, i(p, f));
18270
+ for (let g = 9; g < 15; g++)
18271
+ this.setFunctionModule(14 - g, 8, i(p, g));
18272
+ for (let g = 0; g < 8; g++)
18273
+ this.setFunctionModule(this.size - 1 - g, 8, i(p, g));
18274
+ for (let g = 8; g < 15; g++)
18275
+ this.setFunctionModule(8, this.size - 15 + g, i(p, g));
18273
18276
  this.setFunctionModule(8, this.size - 8, !0);
18274
18277
  }
18275
18278
  // Draws two copies of the version bits (with its own error correction code),
@@ -18283,8 +18286,8 @@ var dr;
18283
18286
  const h = this.version << 12 | c;
18284
18287
  a(h >>> 18 == 0);
18285
18288
  for (let l = 0; l < 18; l++) {
18286
- const p = i(h, l), f = this.size - 11 + l % 3, y = Math.floor(l / 3);
18287
- this.setFunctionModule(f, y, p), this.setFunctionModule(y, f, p);
18289
+ const p = i(h, l), g = this.size - 11 + l % 3, y = Math.floor(l / 3);
18290
+ this.setFunctionModule(g, y, p), this.setFunctionModule(y, g, p);
18288
18291
  }
18289
18292
  }
18290
18293
  // Draws a 9*9 finder pattern including the border separator,
@@ -18292,8 +18295,8 @@ var dr;
18292
18295
  drawFinderPattern(c, h) {
18293
18296
  for (let l = -4; l <= 4; l++)
18294
18297
  for (let p = -4; p <= 4; p++) {
18295
- const f = Math.max(Math.abs(p), Math.abs(l)), y = c + p, v = h + l;
18296
- 0 <= y && y < this.size && 0 <= v && v < this.size && this.setFunctionModule(y, v, f != 2 && f != 4);
18298
+ const g = Math.max(Math.abs(p), Math.abs(l)), y = c + p, v = h + l;
18299
+ 0 <= y && y < this.size && 0 <= v && v < this.size && this.setFunctionModule(y, v, g != 2 && g != 4);
18297
18300
  }
18298
18301
  }
18299
18302
  // Draws a 5*5 alignment pattern, with the center module
@@ -18315,11 +18318,11 @@ var dr;
18315
18318
  const h = this.version, l = this.errorCorrectionLevel;
18316
18319
  if (c.length != Ie.getNumDataCodewords(h, l))
18317
18320
  throw new RangeError("Invalid argument");
18318
- const p = Ie.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][h], f = Ie.ECC_CODEWORDS_PER_BLOCK[l.ordinal][h], y = Math.floor(Ie.getNumRawDataModules(h) / 8), v = p - y % p, w = Math.floor(y / p);
18321
+ const p = Ie.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][h], g = Ie.ECC_CODEWORDS_PER_BLOCK[l.ordinal][h], y = Math.floor(Ie.getNumRawDataModules(h) / 8), v = p - y % p, w = Math.floor(y / p);
18319
18322
  let I = [];
18320
- const z = Ie.reedSolomonComputeDivisor(f);
18323
+ const z = Ie.reedSolomonComputeDivisor(g);
18321
18324
  for (let T = 0, E = 0; T < p; T++) {
18322
- let $ = c.slice(E, E + w - f + (T < v ? 0 : 1));
18325
+ let $ = c.slice(E, E + w - g + (T < v ? 0 : 1));
18323
18326
  E += $.length;
18324
18327
  const x = Ie.reedSolomonComputeRemainder($, z);
18325
18328
  T < v && $.push(0), I.push($.concat(x));
@@ -18327,7 +18330,7 @@ var dr;
18327
18330
  let C = [];
18328
18331
  for (let T = 0; T < I[0].length; T++)
18329
18332
  I.forEach((E, $) => {
18330
- (T != w - f || $ >= v) && C.push(E[T]);
18333
+ (T != w - g || $ >= v) && C.push(E[T]);
18331
18334
  });
18332
18335
  return a(C.length == y), C;
18333
18336
  }
@@ -18340,8 +18343,8 @@ var dr;
18340
18343
  for (let l = this.size - 1; l >= 1; l -= 2) {
18341
18344
  l == 6 && (l = 5);
18342
18345
  for (let p = 0; p < this.size; p++)
18343
- for (let f = 0; f < 2; f++) {
18344
- const y = l - f, w = (l + 1 & 2) == 0 ? this.size - 1 - p : p;
18346
+ for (let g = 0; g < 2; g++) {
18347
+ const y = l - g, w = (l + 1 & 2) == 0 ? this.size - 1 - p : p;
18345
18348
  !this.isFunction[w][y] && h < c.length * 8 && (this.modules[w][y] = i(c[h >>> 3], 7 - (h & 7)), h++);
18346
18349
  }
18347
18350
  }
@@ -18393,26 +18396,26 @@ var dr;
18393
18396
  // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
18394
18397
  getPenaltyScore() {
18395
18398
  let c = 0;
18396
- for (let f = 0; f < this.size; f++) {
18399
+ for (let g = 0; g < this.size; g++) {
18397
18400
  let y = !1, v = 0, w = [0, 0, 0, 0, 0, 0, 0];
18398
18401
  for (let I = 0; I < this.size; I++)
18399
- this.modules[f][I] == y ? (v++, v == 5 ? c += Ie.PENALTY_N1 : v > 5 && c++) : (this.finderPenaltyAddHistory(v, w), y || (c += this.finderPenaltyCountPatterns(w) * Ie.PENALTY_N3), y = this.modules[f][I], v = 1);
18402
+ this.modules[g][I] == y ? (v++, v == 5 ? c += Ie.PENALTY_N1 : v > 5 && c++) : (this.finderPenaltyAddHistory(v, w), y || (c += this.finderPenaltyCountPatterns(w) * Ie.PENALTY_N3), y = this.modules[g][I], v = 1);
18400
18403
  c += this.finderPenaltyTerminateAndCount(y, v, w) * Ie.PENALTY_N3;
18401
18404
  }
18402
- for (let f = 0; f < this.size; f++) {
18405
+ for (let g = 0; g < this.size; g++) {
18403
18406
  let y = !1, v = 0, w = [0, 0, 0, 0, 0, 0, 0];
18404
18407
  for (let I = 0; I < this.size; I++)
18405
- this.modules[I][f] == y ? (v++, v == 5 ? c += Ie.PENALTY_N1 : v > 5 && c++) : (this.finderPenaltyAddHistory(v, w), y || (c += this.finderPenaltyCountPatterns(w) * Ie.PENALTY_N3), y = this.modules[I][f], v = 1);
18408
+ this.modules[I][g] == y ? (v++, v == 5 ? c += Ie.PENALTY_N1 : v > 5 && c++) : (this.finderPenaltyAddHistory(v, w), y || (c += this.finderPenaltyCountPatterns(w) * Ie.PENALTY_N3), y = this.modules[I][g], v = 1);
18406
18409
  c += this.finderPenaltyTerminateAndCount(y, v, w) * Ie.PENALTY_N3;
18407
18410
  }
18408
- for (let f = 0; f < this.size - 1; f++)
18411
+ for (let g = 0; g < this.size - 1; g++)
18409
18412
  for (let y = 0; y < this.size - 1; y++) {
18410
- const v = this.modules[f][y];
18411
- v == this.modules[f][y + 1] && v == this.modules[f + 1][y] && v == this.modules[f + 1][y + 1] && (c += Ie.PENALTY_N2);
18413
+ const v = this.modules[g][y];
18414
+ v == this.modules[g][y + 1] && v == this.modules[g + 1][y] && v == this.modules[g + 1][y + 1] && (c += Ie.PENALTY_N2);
18412
18415
  }
18413
18416
  let h = 0;
18414
- for (const f of this.modules)
18415
- h = f.reduce((y, v) => y + (v ? 1 : 0), h);
18417
+ for (const g of this.modules)
18418
+ h = g.reduce((y, v) => y + (v ? 1 : 0), h);
18416
18419
  const l = this.size * this.size, p = Math.ceil(Math.abs(h * 20 - l * 10) / l) - 1;
18417
18420
  return a(0 <= p && p <= 9), c += p * Ie.PENALTY_N4, a(0 <= c && c <= 2568888), c;
18418
18421
  }
@@ -18461,8 +18464,8 @@ var dr;
18461
18464
  h.push(1);
18462
18465
  let l = 1;
18463
18466
  for (let p = 0; p < c; p++) {
18464
- for (let f = 0; f < h.length; f++)
18465
- h[f] = Ie.reedSolomonMultiply(h[f], l), f + 1 < h.length && (h[f] ^= h[f + 1]);
18467
+ for (let g = 0; g < h.length; g++)
18468
+ h[g] = Ie.reedSolomonMultiply(h[g], l), g + 1 < h.length && (h[g] ^= h[g + 1]);
18466
18469
  l = Ie.reedSolomonMultiply(l, 2);
18467
18470
  }
18468
18471
  return h;
@@ -18471,8 +18474,8 @@ var dr;
18471
18474
  static reedSolomonComputeRemainder(c, h) {
18472
18475
  let l = h.map((p) => 0);
18473
18476
  for (const p of c) {
18474
- const f = p ^ l.shift();
18475
- l.push(0), h.forEach((y, v) => l[v] ^= Ie.reedSolomonMultiply(y, f));
18477
+ const g = p ^ l.shift();
18478
+ l.push(0), h.forEach((y, v) => l[v] ^= Ie.reedSolomonMultiply(y, g));
18476
18479
  }
18477
18480
  return l;
18478
18481
  }
@@ -18526,17 +18529,17 @@ var dr;
18526
18529
  [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81]
18527
18530
  // High
18528
18531
  ], t.QrCode = r;
18529
- function o(g, c, h) {
18530
- if (c < 0 || c > 31 || g >>> c)
18532
+ function o(f, c, h) {
18533
+ if (c < 0 || c > 31 || f >>> c)
18531
18534
  throw new RangeError("Value out of range");
18532
18535
  for (let l = c - 1; l >= 0; l--)
18533
- h.push(g >>> l & 1);
18536
+ h.push(f >>> l & 1);
18534
18537
  }
18535
- function i(g, c) {
18536
- return (g >>> c & 1) != 0;
18538
+ function i(f, c) {
18539
+ return (f >>> c & 1) != 0;
18537
18540
  }
18538
- function a(g) {
18539
- if (!g)
18541
+ function a(f) {
18542
+ if (!f)
18540
18543
  throw new Error("Assertion error");
18541
18544
  }
18542
18545
  const s = class Ue {
@@ -18625,10 +18628,10 @@ var dr;
18625
18628
  static getTotalBits(c, h) {
18626
18629
  let l = 0;
18627
18630
  for (const p of c) {
18628
- const f = p.mode.numCharCountBits(h);
18629
- if (p.numChars >= 1 << f)
18631
+ const g = p.mode.numCharCountBits(h);
18632
+ if (p.numChars >= 1 << g)
18630
18633
  return 1 / 0;
18631
- l += 4 + f + p.bitData.length;
18634
+ l += 4 + g + p.bitData.length;
18632
18635
  }
18633
18636
  return l;
18634
18637
  }
@@ -18690,22 +18693,22 @@ function Dl(t, r = 0) {
18690
18693
  const o = [];
18691
18694
  return t.forEach(function(i, a) {
18692
18695
  let s = null;
18693
- i.forEach(function(u, g) {
18696
+ i.forEach(function(u, f) {
18694
18697
  if (!u && s !== null) {
18695
18698
  o.push(
18696
- `M${s + r} ${a + r}h${g - s}v1H${s + r}z`
18699
+ `M${s + r} ${a + r}h${f - s}v1H${s + r}z`
18697
18700
  ), s = null;
18698
18701
  return;
18699
18702
  }
18700
- if (g === i.length - 1) {
18703
+ if (f === i.length - 1) {
18701
18704
  if (!u)
18702
18705
  return;
18703
- s === null ? o.push(`M${g + r},${a + r} h1v1H${g + r}z`) : o.push(
18704
- `M${s + r},${a + r} h${g + 1 - s}v1H${s + r}z`
18706
+ s === null ? o.push(`M${f + r},${a + r} h1v1H${f + r}z`) : o.push(
18707
+ `M${s + r},${a + r} h${f + 1 - s}v1H${s + r}z`
18705
18708
  );
18706
18709
  return;
18707
18710
  }
18708
- u && s === null && (s = g);
18711
+ u && s === null && (s = f);
18709
18712
  });
18710
18713
  }), o.join("");
18711
18714
  }
@@ -18715,14 +18718,14 @@ function Nl(t, r) {
18715
18718
  function Cv(t, r, o, i) {
18716
18719
  if (i == null)
18717
18720
  return null;
18718
- const a = t.length + o * 2, s = Math.floor(r * kv), u = a / r, g = (i.width || s) * u, c = (i.height || s) * u, h = i.x == null ? t.length / 2 - g / 2 : i.x * u, l = i.y == null ? t.length / 2 - c / 2 : i.y * u, p = i.opacity == null ? 1 : i.opacity;
18719
- let f = null;
18721
+ const a = t.length + o * 2, s = Math.floor(r * kv), u = a / r, f = (i.width || s) * u, c = (i.height || s) * u, h = i.x == null ? t.length / 2 - f / 2 : i.x * u, l = i.y == null ? t.length / 2 - c / 2 : i.y * u, p = i.opacity == null ? 1 : i.opacity;
18722
+ let g = null;
18720
18723
  if (i.excavate) {
18721
- let v = Math.floor(h), w = Math.floor(l), I = Math.ceil(g + h - v), z = Math.ceil(c + l - w);
18722
- f = { x: v, y: w, w: I, h: z };
18724
+ let v = Math.floor(h), w = Math.floor(l), I = Math.ceil(f + h - v), z = Math.ceil(c + l - w);
18725
+ g = { x: v, y: w, w: I, h: z };
18723
18726
  }
18724
18727
  const y = i.crossOrigin;
18725
- return { x: h, y: l, h: c, w: g, excavation: f, opacity: p, crossOrigin: y };
18728
+ return { x: h, y: l, h: c, w: f, excavation: g, opacity: p, crossOrigin: y };
18726
18729
  }
18727
18730
  function Sv(t, r) {
18728
18731
  return r != null ? Math.max(Math.floor(r), 0) : t ? wv : _v;
@@ -18735,7 +18738,7 @@ function Fl({
18735
18738
  marginSize: a,
18736
18739
  imageSettings: s,
18737
18740
  size: u,
18738
- boostLevel: g
18741
+ boostLevel: f
18739
18742
  }) {
18740
18743
  let c = xe.useMemo(() => {
18741
18744
  const v = (Array.isArray(t) ? t : [t]).reduce((w, I) => (w.push(...Cr.QrSegment.makeSegments(I)), w), []);
@@ -18745,10 +18748,10 @@ function Fl({
18745
18748
  o,
18746
18749
  void 0,
18747
18750
  void 0,
18748
- g
18751
+ f
18749
18752
  );
18750
- }, [t, r, o, g]);
18751
- const { cells: h, margin: l, numCells: p, calculatedImageSettings: f } = xe.useMemo(() => {
18753
+ }, [t, r, o, f]);
18754
+ const { cells: h, margin: l, numCells: p, calculatedImageSettings: g } = xe.useMemo(() => {
18752
18755
  let y = c.getModules();
18753
18756
  const v = Sv(i, a), w = y.length + v * 2, I = Cv(
18754
18757
  y,
@@ -18768,7 +18771,7 @@ function Fl({
18768
18771
  margin: l,
18769
18772
  cells: h,
18770
18773
  numCells: p,
18771
- calculatedImageSettings: f
18774
+ calculatedImageSettings: g
18772
18775
  };
18773
18776
  }
18774
18777
  var zv = function() {
@@ -18784,12 +18787,12 @@ var zv = function() {
18784
18787
  value: a,
18785
18788
  size: s = Tl,
18786
18789
  level: u = Rl,
18787
- bgColor: g = Ml,
18790
+ bgColor: f = Ml,
18788
18791
  fgColor: c = Ol,
18789
18792
  includeMargin: h = Ll,
18790
18793
  minVersion: l = Al,
18791
18794
  boostLevel: p,
18792
- marginSize: f,
18795
+ marginSize: g,
18793
18796
  imageSettings: y
18794
18797
  } = i, w = Ci(i, [
18795
18798
  "value",
@@ -18813,7 +18816,7 @@ var zv = function() {
18813
18816
  minVersion: l,
18814
18817
  boostLevel: p,
18815
18818
  includeMargin: h,
18816
- marginSize: f,
18819
+ marginSize: g,
18817
18820
  imageSettings: y,
18818
18821
  size: s
18819
18822
  });
@@ -18831,7 +18834,7 @@ var zv = function() {
18831
18834
  const A = window.devicePixelRatio || 1;
18832
18835
  R.height = R.width = s * A;
18833
18836
  const D = s / _ * A;
18834
- L.scale(D, D), L.fillStyle = g, L.fillRect(0, 0, _, _), L.fillStyle = c, zv ? L.fill(new Path2D(Dl(U, b))) : k.forEach(function(ee, ne) {
18837
+ L.scale(D, D), L.fillStyle = f, L.fillRect(0, 0, _, _), L.fillStyle = c, zv ? L.fill(new Path2D(Dl(U, b))) : k.forEach(function(ee, ne) {
18835
18838
  ee.forEach(function(H, Z) {
18836
18839
  H && L.fillRect(Z + b, ne + b, 1, 1);
18837
18840
  });
@@ -18879,12 +18882,12 @@ var Gi = xe.forwardRef(
18879
18882
  value: a,
18880
18883
  size: s = Tl,
18881
18884
  level: u = Rl,
18882
- bgColor: g = Ml,
18885
+ bgColor: f = Ml,
18883
18886
  fgColor: c = Ol,
18884
18887
  includeMargin: h = Ll,
18885
18888
  minVersion: l = Al,
18886
18889
  boostLevel: p,
18887
- title: f,
18890
+ title: g,
18888
18891
  marginSize: y,
18889
18892
  imageSettings: v
18890
18893
  } = i, w = Ci(i, [
@@ -18936,11 +18939,11 @@ var Gi = xe.forwardRef(
18936
18939
  ref: o,
18937
18940
  role: "img"
18938
18941
  }, w),
18939
- !!f && /* @__PURE__ */ xe.createElement("title", null, f),
18942
+ !!g && /* @__PURE__ */ xe.createElement("title", null, g),
18940
18943
  /* @__PURE__ */ xe.createElement(
18941
18944
  "path",
18942
18945
  {
18943
- fill: g,
18946
+ fill: f,
18944
18947
  d: `M0,0 h${C}v${C}H0z`,
18945
18948
  shapeRendering: "crispEdges"
18946
18949
  }
@@ -19005,7 +19008,7 @@ const Bl = Nt(
19005
19008
  existingEmail: a,
19006
19009
  triggerRef: s
19007
19010
  }) => {
19008
- const u = ce(null), [g, c] = P(!1), [h, l] = P({ top: 0, left: 0 }), { toast: p } = Bt();
19011
+ const u = ce(null), [f, c] = P(!1), [h, l] = P({ top: 0, left: 0 }), { toast: p } = Bt();
19009
19012
  le(() => {
19010
19013
  c(!0);
19011
19014
  const x = setTimeout(() => {
@@ -19026,7 +19029,7 @@ const Bl = Nt(
19026
19029
  clearTimeout(x), document.removeEventListener("mousedown", m), document.removeEventListener("keydown", b);
19027
19030
  };
19028
19031
  }, [t, s]);
19029
- const [f, y] = P(
19032
+ const [g, y] = P(
19030
19033
  a ? "otp" : "email"
19031
19034
  ), [v, w] = P(a || ""), [I, z] = P(""), [C, T] = P(!1), E = async () => {
19032
19035
  if (!(!v || C)) {
@@ -19051,7 +19054,7 @@ const Bl = Nt(
19051
19054
  T(!1);
19052
19055
  }
19053
19056
  };
19054
- return g ? /* @__PURE__ */ e(
19057
+ return f ? /* @__PURE__ */ e(
19055
19058
  Iv,
19056
19059
  {
19057
19060
  ref: u,
@@ -19061,7 +19064,7 @@ const Bl = Nt(
19061
19064
  visibility: h.top > 0 ? "visible" : "hidden"
19062
19065
  },
19063
19066
  onClick: (x) => x.stopPropagation(),
19064
- children: f === "email" ? /* @__PURE__ */ n(re, { children: [
19067
+ children: g === "email" ? /* @__PURE__ */ n(re, { children: [
19065
19068
  /* @__PURE__ */ e(Cs, { children: "Add email address" }),
19066
19069
  /* @__PURE__ */ e(be, { children: /* @__PURE__ */ n(Ev, { children: [
19067
19070
  /* @__PURE__ */ e(Pv, { children: /* @__PURE__ */ e(ln, { size: 16 }) }),
@@ -19177,7 +19180,7 @@ const Bl = Nt(
19177
19180
  triggerRef: s
19178
19181
  }) => {
19179
19182
  var b;
19180
- const u = ce(null), [g, c] = P(!1), [h, l] = P({ top: 0, left: 0 }), { toast: p } = Bt();
19183
+ const u = ce(null), [f, c] = P(!1), [h, l] = P({ top: 0, left: 0 }), { toast: p } = Bt();
19181
19184
  le(() => {
19182
19185
  c(!0);
19183
19186
  const k = setTimeout(() => {
@@ -19198,7 +19201,7 @@ const Bl = Nt(
19198
19201
  clearTimeout(k), document.removeEventListener("mousedown", _), document.removeEventListener("keydown", O);
19199
19202
  };
19200
19203
  }, [t, s]);
19201
- const [f, y] = P(
19204
+ const [g, y] = P(
19202
19205
  i ? "otp" : "phone"
19203
19206
  ), [v, w] = P(
19204
19207
  (i == null ? void 0 : i.replace(/^\+\d+/, "")) || ""
@@ -19227,7 +19230,7 @@ const Bl = Nt(
19227
19230
  $(!1);
19228
19231
  }
19229
19232
  };
19230
- return g ? /* @__PURE__ */ e(
19233
+ return f ? /* @__PURE__ */ e(
19231
19234
  Tv,
19232
19235
  {
19233
19236
  ref: u,
@@ -19237,7 +19240,7 @@ const Bl = Nt(
19237
19240
  visibility: h.top > 0 ? "visible" : "hidden"
19238
19241
  },
19239
19242
  onClick: (k) => k.stopPropagation(),
19240
- children: f === "phone" ? /* @__PURE__ */ n(re, { children: [
19243
+ children: g === "phone" ? /* @__PURE__ */ n(re, { children: [
19241
19244
  /* @__PURE__ */ e($s, { children: "Add phone number" }),
19242
19245
  /* @__PURE__ */ e(be, { children: /* @__PURE__ */ e(
19243
19246
  pn,
@@ -19350,7 +19353,7 @@ const Bl = Nt(
19350
19353
  onVerifyTOTP: o,
19351
19354
  triggerRef: i
19352
19355
  }) => {
19353
- const a = ce(null), [s, u] = P("qr"), [g, c] = P(""), [h, l] = P(""), [p, f] = P(["", ""]), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P({ top: 0, left: 0 }), { toast: T } = Bt();
19356
+ const a = ce(null), [s, u] = P("qr"), [f, c] = P(""), [h, l] = P(""), [p, g] = P(["", ""]), [y, v] = P(!1), [w, I] = P(!1), [z, C] = P({ top: 0, left: 0 }), { toast: T } = Bt();
19354
19357
  le(() => {
19355
19358
  I(!0);
19356
19359
  const $ = setTimeout(() => {
@@ -19443,7 +19446,7 @@ const Bl = Nt(
19443
19446
  },
19444
19447
  children: "Loading..."
19445
19448
  }
19446
- ) : g ? /* @__PURE__ */ e(
19449
+ ) : f ? /* @__PURE__ */ e(
19447
19450
  "div",
19448
19451
  {
19449
19452
  style: {
@@ -19455,7 +19458,7 @@ const Bl = Nt(
19455
19458
  children: /* @__PURE__ */ e(
19456
19459
  Gi,
19457
19460
  {
19458
- value: g,
19461
+ value: f,
19459
19462
  size: 150,
19460
19463
  title: "QR Code for Two-Factor Authentication Setup",
19461
19464
  "aria-label": "Scan this QR code with your authenticator app to set up two-factor authentication"
@@ -19522,7 +19525,7 @@ const Bl = Nt(
19522
19525
  {
19523
19526
  $primary: !0,
19524
19527
  onClick: () => u("verify"),
19525
- disabled: y || !g,
19528
+ disabled: y || !f,
19526
19529
  children: "I've Scanned the Code"
19527
19530
  }
19528
19531
  ) })
@@ -19549,7 +19552,7 @@ const Bl = Nt(
19549
19552
  value: p[0],
19550
19553
  onChange: ($) => {
19551
19554
  const x = $.target.value.replace(/[^0-9]/g, "").substring(0, 6);
19552
- f([x, p[1]]);
19555
+ g([x, p[1]]);
19553
19556
  },
19554
19557
  maxLength: 6,
19555
19558
  style: { textAlign: "center", fontFamily: "monospace" },
@@ -19565,7 +19568,7 @@ const Bl = Nt(
19565
19568
  value: p[1],
19566
19569
  onChange: ($) => {
19567
19570
  const x = $.target.value.replace(/[^0-9]/g, "").substring(0, 6);
19568
- f([p[0], x]);
19571
+ g([p[0], x]);
19569
19572
  },
19570
19573
  maxLength: 6,
19571
19574
  style: { textAlign: "center", fontFamily: "monospace" },
@@ -19664,7 +19667,7 @@ const Bl = Nt(
19664
19667
  triggerRef: o,
19665
19668
  isSetup: i = !1
19666
19669
  }) => {
19667
- const a = ce(null), [s, u] = P(!1), [g, c] = P({ top: 0, left: 0 }), [h, l] = P(""), [p, f] = P(""), [y, v] = P(""), [w, I] = P(!1), [z, C] = P(!1), [T, E] = P(!1), [$, x] = P(!1), [m, b] = P({});
19670
+ const a = ce(null), [s, u] = P(!1), [f, c] = P({ top: 0, left: 0 }), [h, l] = P(""), [p, g] = P(""), [y, v] = P(""), [w, I] = P(!1), [z, C] = P(!1), [T, E] = P(!1), [$, x] = P(!1), [m, b] = P({});
19668
19671
  le(() => {
19669
19672
  u(!0);
19670
19673
  const _ = setTimeout(() => {
@@ -19706,9 +19709,9 @@ const Bl = Nt(
19706
19709
  {
19707
19710
  ref: a,
19708
19711
  style: {
19709
- top: `${g.top}px`,
19710
- left: `${g.left}px`,
19711
- visibility: g.top > 0 ? "visible" : "hidden"
19712
+ top: `${f.top}px`,
19713
+ left: `${f.left}px`,
19714
+ visibility: f.top > 0 ? "visible" : "hidden"
19712
19715
  },
19713
19716
  onClick: (_) => _.stopPropagation(),
19714
19717
  children: [
@@ -19758,7 +19761,7 @@ const Bl = Nt(
19758
19761
  type: z ? "text" : "password",
19759
19762
  placeholder: i ? "Enter your password" : "Enter your new password",
19760
19763
  value: p,
19761
- onChange: (_) => f(_.target.value),
19764
+ onChange: (_) => g(_.target.value),
19762
19765
  style: { paddingRight: "40px" }
19763
19766
  }
19764
19767
  ),
@@ -19858,7 +19861,7 @@ const Bl = Nt(
19858
19861
  onRemovePassword: r,
19859
19862
  triggerRef: o
19860
19863
  }) => {
19861
- const i = ce(null), [a, s] = P(!1), [u, g] = P({ top: 0, left: 0 }), [c, h] = P(""), [l, p] = P(!1), { toast: f } = Bt();
19864
+ const i = ce(null), [a, s] = P(!1), [u, f] = P({ top: 0, left: 0 }), [c, h] = P(""), [l, p] = P(!1), { toast: g } = Bt();
19862
19865
  le(() => {
19863
19866
  s(!0);
19864
19867
  const v = setTimeout(() => {
@@ -19868,7 +19871,7 @@ const Bl = Nt(
19868
19871
  const C = z.getBoundingClientRect(), T = 400, E = 300, $ = 8;
19869
19872
  let x = 0, m = 0;
19870
19873
  const b = window.innerHeight - C.bottom, k = C.top;
19871
- b >= E + $ ? (x = C.bottom + $, m = C.right - T, m < $ && (m = C.left, m + T > window.innerWidth - $ && (m = (window.innerWidth - T) / 2))) : k >= E + $ ? (x = C.top - E - $, m = C.right - T, m < $ && (m = C.left, m + T > window.innerWidth - $ && (m = (window.innerWidth - T) / 2))) : (x = C.bottom + $, m = C.right - T, m < $ && (m = C.left)), g({ top: x, left: m });
19874
+ b >= E + $ ? (x = C.bottom + $, m = C.right - T, m < $ && (m = C.left, m + T > window.innerWidth - $ && (m = (window.innerWidth - T) / 2))) : k >= E + $ ? (x = C.top - E - $, m = C.right - T, m < $ && (m = C.left, m + T > window.innerWidth - $ && (m = (window.innerWidth - T) / 2))) : (x = C.bottom + $, m = C.right - T, m < $ && (m = C.left)), f({ top: x, left: m });
19872
19875
  }
19873
19876
  }, 10), w = (z) => {
19874
19877
  i.current && !i.current.contains(z.target) && t();
@@ -19886,7 +19889,7 @@ const Bl = Nt(
19886
19889
  await r(c), t();
19887
19890
  } catch (v) {
19888
19891
  const w = v.message || "Failed to remove password. Please try again.";
19889
- f(w, "error");
19892
+ g(w, "error");
19890
19893
  } finally {
19891
19894
  p(!1);
19892
19895
  }
@@ -20023,9 +20026,9 @@ const Bl = Nt(
20023
20026
  onDownload: i,
20024
20027
  triggerRef: a
20025
20028
  }) => {
20026
- const s = ce(null), [u, g] = P(!1), [c, h] = P({ top: 0, left: 0 });
20029
+ const s = ce(null), [u, f] = P(!1), [c, h] = P({ top: 0, left: 0 });
20027
20030
  return le(() => {
20028
- g(!0);
20031
+ f(!0);
20029
20032
  const l = setTimeout(() => {
20030
20033
  if (!s.current || !(a != null && a.current)) return;
20031
20034
  const y = a.current;
@@ -20037,11 +20040,11 @@ const Bl = Nt(
20037
20040
  }
20038
20041
  }, 10), p = (y) => {
20039
20042
  s.current && !s.current.contains(y.target) && r();
20040
- }, f = (y) => {
20043
+ }, g = (y) => {
20041
20044
  y.key === "Escape" && r();
20042
20045
  };
20043
- return document.addEventListener("mousedown", p), document.addEventListener("keydown", f), () => {
20044
- clearTimeout(l), document.removeEventListener("mousedown", p), document.removeEventListener("keydown", f);
20046
+ return document.addEventListener("mousedown", p), document.addEventListener("keydown", g), () => {
20047
+ clearTimeout(l), document.removeEventListener("mousedown", p), document.removeEventListener("keydown", g);
20045
20048
  };
20046
20049
  }, [r, a]), u ? /* @__PURE__ */ n(
20047
20050
  Wv,
@@ -20950,23 +20953,23 @@ const Bl = Nt(
20950
20953
  const r = (t == null ? void 0 : t.toLowerCase()) || "", o = { width: 20, height: 20 };
20951
20954
  return r.includes("chrome") ? /* @__PURE__ */ e(Kv, { ...o }) : r.includes("firefox") ? /* @__PURE__ */ e(Qv, { ...o }) : r.includes("safari") ? /* @__PURE__ */ e(Xv, { ...o }) : r.includes("edge") ? /* @__PURE__ */ e(Jv, { ...o }) : r.includes("opera") ? /* @__PURE__ */ e(e1, { ...o }) : r.includes("brave") ? /* @__PURE__ */ e(t1, { ...o }) : /* @__PURE__ */ e(s1, {});
20952
20955
  }, l1 = () => {
20953
- const [t, r] = P(null), { signins: o, removeSignin: i, refetch: a, loading: s } = Xd(), { refetch: u } = Ze(), { toast: g } = Bt(), c = o, h = async (p) => {
20956
+ const [t, r] = P(null), { signins: o, removeSignin: i, refetch: a, loading: s } = Xd(), { refetch: u } = Ze(), { toast: f } = Bt(), c = o, h = async (p) => {
20954
20957
  try {
20955
- await i(p), await Promise.all([a(), u()]), r(null), g("Session ended successfully", "info");
20956
- } catch (f) {
20957
- g(
20958
- f.message || "Failed to end session. Please try again.",
20958
+ await i(p), await Promise.all([a(), u()]), r(null), f("Session ended successfully", "info");
20959
+ } catch (g) {
20960
+ f(
20961
+ g.message || "Failed to end session. Please try again.",
20959
20962
  "error"
20960
20963
  );
20961
20964
  }
20962
20965
  }, l = (p) => {
20963
20966
  if (!p || p.trim() === "") return "Unknown";
20964
- const f = new Date(p);
20965
- if (isNaN(f.getTime())) return "Unknown";
20967
+ const g = new Date(p);
20968
+ if (isNaN(g.getTime())) return "Unknown";
20966
20969
  const v = Math.floor(
20967
- ((/* @__PURE__ */ new Date()).getTime() - f.getTime()) / (1e3 * 60)
20970
+ ((/* @__PURE__ */ new Date()).getTime() - g.getTime()) / (1e3 * 60)
20968
20971
  );
20969
- return v < 1 ? "Just now" : v < 60 ? `${v}m ago` : v < 1440 ? `${Math.floor(v / 60)}h ago` : f.toLocaleDateString();
20972
+ return v < 1 ? "Just now" : v < 60 ? `${v}m ago` : v < 1440 ? `${Math.floor(v / 60)}h ago` : g.toLocaleDateString();
20970
20973
  };
20971
20974
  return s ? /* @__PURE__ */ e(
20972
20975
  "div",
@@ -21051,7 +21054,7 @@ const Bl = Nt(
21051
21054
  mt,
21052
21055
  {
21053
21056
  open: t === p.id,
21054
- openChange: (f) => r(f ? p.id : null),
21057
+ openChange: (g) => r(g ? p.id : null),
21055
21058
  children: [
21056
21059
  /* @__PURE__ */ e(yt, { children: /* @__PURE__ */ e(un, { children: "•••" }) }),
21057
21060
  /* @__PURE__ */ e(vt, { children: /* @__PURE__ */ e(Be, { onClick: () => h(p.id), children: /* @__PURE__ */ n(
@@ -21082,7 +21085,7 @@ const Bl = Nt(
21082
21085
  ] });
21083
21086
  }, d1 = () => {
21084
21087
  var x, m, b, k;
21085
- const { deployment: t } = ze(), { toast: r } = Bt(), [o, i] = P(null), [a, s] = P(""), [u, g] = P(!1), [c, h] = P(null), [l, p] = P(""), f = ce(null), y = ce(
21088
+ const { deployment: t } = ze(), { toast: r } = Bt(), [o, i] = P(null), [a, s] = P(""), [u, f] = P(!1), [c, h] = P(null), [l, p] = P(""), g = ce(null), y = ce(
21086
21089
  {}
21087
21090
  ), {
21088
21091
  user: v,
@@ -21127,8 +21130,8 @@ const Bl = Nt(
21127
21130
  /* @__PURE__ */ e(
21128
21131
  J,
21129
21132
  {
21130
- ref: f,
21131
- onClick: () => g(!0),
21133
+ ref: g,
21134
+ onClick: () => f(!0),
21132
21135
  style: {
21133
21136
  padding: "8px 16px",
21134
21137
  borderRadius: "6px",
@@ -21142,8 +21145,8 @@ const Bl = Nt(
21142
21145
  u && /* @__PURE__ */ e(
21143
21146
  Ss,
21144
21147
  {
21145
- triggerRef: f,
21146
- onClose: () => g(!1),
21148
+ triggerRef: g,
21149
+ onClose: () => f(!1),
21147
21150
  onAddEmail: async (_) => {
21148
21151
  const O = await w(_);
21149
21152
  s(O.data.id), await z(O.data.id), v.refetch();
@@ -21152,7 +21155,7 @@ const Bl = Nt(
21152
21155
  await z(a), v.refetch();
21153
21156
  },
21154
21157
  onAttemptVerification: async (_) => {
21155
- await C(a, _), v.refetch(), g(!1), s(""), r("Email added and verified successfully!", "info");
21158
+ await C(a, _), v.refetch(), f(!1), s(""), r("Email added and verified successfully!", "info");
21156
21159
  }
21157
21160
  }
21158
21161
  )
@@ -21252,7 +21255,7 @@ const Bl = Nt(
21252
21255
  ] });
21253
21256
  }, p1 = () => {
21254
21257
  var $, x, m, b;
21255
- const { deployment: t } = ze(), [r, o] = P(null), [i, a] = P(""), [s, u] = P(!1), [g, c] = P(null), [h, l] = P(""), p = ce(null), f = ce({}), {
21258
+ const { deployment: t } = ze(), [r, o] = P(null), [i, a] = P(""), [s, u] = P(!1), [f, c] = P(null), [h, l] = P(""), p = ce(null), g = ce({}), {
21256
21259
  user: y,
21257
21260
  createPhoneNumber: v,
21258
21261
  deletePhoneNumber: w,
@@ -21314,21 +21317,21 @@ const Bl = Nt(
21314
21317
  }
21315
21318
  }
21316
21319
  ),
21317
- g && /* @__PURE__ */ e(
21320
+ f && /* @__PURE__ */ e(
21318
21321
  Is,
21319
21322
  {
21320
- existingPhone: (b = (m = y == null ? void 0 : y.user_phone_numbers) == null ? void 0 : m.find((k) => k.id === g)) == null ? void 0 : b.phone_number,
21323
+ existingPhone: (b = (m = y == null ? void 0 : y.user_phone_numbers) == null ? void 0 : m.find((k) => k.id === f)) == null ? void 0 : b.phone_number,
21321
21324
  triggerRef: {
21322
- current: f.current[g]
21325
+ current: g.current[f]
21323
21326
  },
21324
21327
  onClose: () => c(null),
21325
21328
  onAddPhone: async () => {
21326
21329
  },
21327
21330
  onPrepareVerification: async () => {
21328
- await I(g), y.refetch();
21331
+ await I(f), y.refetch();
21329
21332
  },
21330
21333
  onAttemptVerification: async (k) => {
21331
- await z(g, k), y.refetch(), c(null);
21334
+ await z(f, k), y.refetch(), c(null);
21332
21335
  }
21333
21336
  }
21334
21337
  )
@@ -21367,7 +21370,7 @@ const Bl = Nt(
21367
21370
  un,
21368
21371
  {
21369
21372
  ref: (_) => {
21370
- _ && (f.current[k.id] = _);
21373
+ _ && (g.current[k.id] = _);
21371
21374
  },
21372
21375
  children: "•••"
21373
21376
  }
@@ -21494,7 +21497,7 @@ const Bl = Nt(
21494
21497
  display: "flex",
21495
21498
  flexDirection: "column"
21496
21499
  },
21497
- children: s.map((u, g) => {
21500
+ children: s.map((u, f) => {
21498
21501
  var l;
21499
21502
  const c = ((l = t == null ? void 0 : t.social_connections) == null ? void 0 : l.filter(
21500
21503
  (p) => p.provider === u.provider
@@ -21615,7 +21618,7 @@ const Bl = Nt(
21615
21618
  ]
21616
21619
  }
21617
21620
  ),
21618
- g < s.length - 1 && /* @__PURE__ */ e(
21621
+ f < s.length - 1 && /* @__PURE__ */ e(
21619
21622
  "div",
21620
21623
  {
21621
21624
  style: {
@@ -21631,9 +21634,9 @@ const Bl = Nt(
21631
21634
  ] });
21632
21635
  }, h1 = () => {
21633
21636
  var v, w, I, z, C, T, E;
21634
- const { loading: t } = Tr(), { deployment: r } = ze(), [o, i] = P("profile"), [a, s] = P(null), [u, g] = P("info"), c = W(
21637
+ const { loading: t } = Tr(), { deployment: r } = ze(), [o, i] = P("profile"), [a, s] = P(null), [u, f] = P("info"), c = W(
21635
21638
  ($, x = "info") => {
21636
- s($), g(x), setTimeout(() => s(null), 3e3);
21639
+ s($), f(x), setTimeout(() => s(null), 3e3);
21637
21640
  },
21638
21641
  [s]
21639
21642
  );
@@ -21649,7 +21652,7 @@ const Bl = Nt(
21649
21652
  children: /* @__PURE__ */ e(Le, {})
21650
21653
  }
21651
21654
  ) });
21652
- const h = r == null ? void 0 : r.auth_settings, l = (v = h == null ? void 0 : h.email_address) == null ? void 0 : v.enabled, p = (w = h == null ? void 0 : h.phone_number) == null ? void 0 : w.enabled, f = ((I = r == null ? void 0 : r.social_connections) == null ? void 0 : I.some(($) => $.enabled)) || !1, y = ((z = h == null ? void 0 : h.password) == null ? void 0 : z.enabled) || ((C = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : C.authenticator) || ((T = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : T.phone_otp) || ((E = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : E.backup_code);
21655
+ const h = r == null ? void 0 : r.auth_settings, l = (v = h == null ? void 0 : h.email_address) == null ? void 0 : v.enabled, p = (w = h == null ? void 0 : h.phone_number) == null ? void 0 : w.enabled, g = ((I = r == null ? void 0 : r.social_connections) == null ? void 0 : I.some(($) => $.enabled)) || !1, y = ((z = h == null ? void 0 : h.password) == null ? void 0 : z.enabled) || ((C = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : C.authenticator) || ((T = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : T.phone_otp) || ((E = h == null ? void 0 : h.auth_factors_enabled) == null ? void 0 : E.backup_code);
21653
21656
  return /* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(o1, { children: /* @__PURE__ */ e(
21654
21657
  Bl.Provider,
21655
21658
  {
@@ -21690,7 +21693,7 @@ const Bl = Nt(
21690
21693
  ] })
21691
21694
  }
21692
21695
  ),
21693
- f && /* @__PURE__ */ e(
21696
+ g && /* @__PURE__ */ e(
21694
21697
  _r,
21695
21698
  {
21696
21699
  $isActive: o === "social",
@@ -21728,7 +21731,7 @@ const Bl = Nt(
21728
21731
  o === "profile" && /* @__PURE__ */ e(g1, {}),
21729
21732
  o === "email" && l && /* @__PURE__ */ e(d1, {}),
21730
21733
  o === "phone" && p && /* @__PURE__ */ e(p1, {}),
21731
- o === "social" && f && /* @__PURE__ */ e(u1, {}),
21734
+ o === "social" && g && /* @__PURE__ */ e(u1, {}),
21732
21735
  o === "security" && y && /* @__PURE__ */ e(f1, {}),
21733
21736
  o === "sessions" && /* @__PURE__ */ e(l1, {})
21734
21737
  ] }),
@@ -21779,14 +21782,14 @@ const Bl = Nt(
21779
21782
  setupAuthenticator: a,
21780
21783
  verifyAuthenticator: s,
21781
21784
  deleteAuthenticator: u,
21782
- generateBackupCodes: g,
21785
+ generateBackupCodes: f,
21783
21786
  regenerateBackupCodes: c,
21784
21787
  updateProfile: h
21785
- } = Tr(), { toast: l } = Bt(), [p, f] = P(
21788
+ } = Tr(), { toast: l } = Bt(), [p, g] = P(
21786
21789
  (r == null ? void 0 : r.second_factor_policy) || "none"
21787
21790
  ), [y, v] = P(!1), w = async (oe) => {
21788
21791
  try {
21789
- await h({ second_factor_policy: oe }), f(oe), l("2FA requirement updated successfully", "info");
21792
+ await h({ second_factor_policy: oe }), g(oe), l("2FA requirement updated successfully", "info");
21790
21793
  } catch (Ee) {
21791
21794
  l(Ee.message || "Failed to update 2FA requirement", "error");
21792
21795
  }
@@ -21816,7 +21819,7 @@ const Bl = Nt(
21816
21819
  }
21817
21820
  try {
21818
21821
  if (te(!0), await s(j, D), await r.refetch(), pe != null && pe.backup_code) {
21819
- const oe = await g();
21822
+ const oe = await f();
21820
21823
  H(oe), await r.refetch(), S("backup");
21821
21824
  } else
21822
21825
  S("success");
@@ -22646,12 +22649,12 @@ const Bl = Nt(
22646
22649
  ] });
22647
22650
  }, g1 = () => {
22648
22651
  var N, j;
22649
- const { deployment: t } = ze(), { user: r, updateProfile: o, updateProfilePicture: i, deleteAccount: a } = Tr(), { toast: s } = Bt(), [u, g] = P(""), [c, h] = P(""), [l, p] = P(""), [f, y] = P(!1), [v, w] = P(!1), [I, z] = P(!1), [C, T] = P(""), [E, $] = P(
22652
+ const { deployment: t } = ze(), { user: r, updateProfile: o, updateProfilePicture: i, deleteAccount: a } = Tr(), { toast: s } = Bt(), [u, f] = P(""), [c, h] = P(""), [l, p] = P(""), [g, y] = P(!1), [v, w] = P(!1), [I, z] = P(!1), [C, T] = P(""), [E, $] = P(
22650
22653
  (r == null ? void 0 : r.profile_picture_url) || null
22651
22654
  ), x = xe.useRef(null);
22652
22655
  xe.useEffect(() => {
22653
- r && !f && (g(r.first_name || ""), h(r.last_name || ""), p(r.username || ""), $(r.profile_picture_url || null), y(!0));
22654
- }, [r, f]);
22656
+ r && !g && (f(r.first_name || ""), h(r.last_name || ""), p(r.username || ""), $(r.profile_picture_url || null), y(!0));
22657
+ }, [r, g]);
22655
22658
  const m = xe.useCallback(async () => {
22656
22659
  if (r)
22657
22660
  try {
@@ -22661,7 +22664,7 @@ const Bl = Nt(
22661
22664
  s(A.message || "Failed to save profile changes", "error");
22662
22665
  }
22663
22666
  }, [r, o, u, c, l, s]), b = (A) => {
22664
- g(A.target.value);
22667
+ f(A.target.value);
22665
22668
  }, k = (A) => {
22666
22669
  h(A.target.value);
22667
22670
  }, _ = (A) => {
@@ -23121,11 +23124,11 @@ const Bl = Nt(
23121
23124
  headerContent: a,
23122
23125
  footerContent: s,
23123
23126
  customContent: u,
23124
- children: g,
23127
+ children: f,
23125
23128
  showCloseButton: c
23126
23129
  }) => /* @__PURE__ */ e(Re, { isOpen: t, onClose: r, children: /* @__PURE__ */ e(Re.Overlay, { children: /* @__PURE__ */ n(Re.Content, { style: { width: "900px", maxWidth: "100%" }, children: [
23127
23130
  i && /* @__PURE__ */ e(Re.Header, { showCloseButton: c, children: a || o }),
23128
- u || g || /* @__PURE__ */ e(h1, {}),
23131
+ u || f || /* @__PURE__ */ e(h1, {}),
23129
23132
  s && /* @__PURE__ */ e(Re.Footer, { children: s })
23130
23133
  ] }) }) }), v1 = d.div`
23131
23134
  position: relative;
@@ -23286,7 +23289,7 @@ const Bl = Nt(
23286
23289
  triggerRef: i,
23287
23290
  isOpen: r,
23288
23291
  minWidth: 380
23289
- }), u = Hr(!1), { session: g, signOut: c, switchSignIn: h, refetch: l } = Ze(), { navigateToSignIn: p } = Je(), { deployment: f } = ze(), y = (x = g == null ? void 0 : g.active_signin) == null ? void 0 : x.user, v = ((b = (m = f == null ? void 0 : f.auth_settings) == null ? void 0 : m.multi_session_support) == null ? void 0 : b.enabled) ?? !1, w = (((k = g == null ? void 0 : g.signins) == null ? void 0 : k.length) ?? 0) > 1;
23292
+ }), u = Hr(!1), { session: f, signOut: c, switchSignIn: h, refetch: l } = Ze(), { navigateToSignIn: p } = Je(), { deployment: g } = ze(), y = (x = f == null ? void 0 : f.active_signin) == null ? void 0 : x.user, v = ((b = (m = g == null ? void 0 : g.auth_settings) == null ? void 0 : m.multi_session_support) == null ? void 0 : b.enabled) ?? !1, w = (((k = f == null ? void 0 : f.signins) == null ? void 0 : k.length) ?? 0) > 1;
23290
23293
  le(() => {
23291
23294
  if (!r) return;
23292
23295
  const _ = setTimeout(() => {
@@ -23347,7 +23350,7 @@ const Bl = Nt(
23347
23350
  children: /* @__PURE__ */ n("div", { children: [
23348
23351
  v ? (() => {
23349
23352
  const _ = [
23350
- ...(g == null ? void 0 : g.signins) || []
23353
+ ...(f == null ? void 0 : f.signins) || []
23351
23354
  ].sort((O, M) => {
23352
23355
  const S = O.user.id === (y == null ? void 0 : y.id), R = M.user.id === (y == null ? void 0 : y.id);
23353
23356
  return S && !R ? -1 : !S && R ? 1 : 0;
@@ -23442,7 +23445,7 @@ const Bl = Nt(
23442
23445
  $destructive: !0,
23443
23446
  onClick: () => {
23444
23447
  var _;
23445
- return C(((_ = g == null ? void 0 : g.active_signin) == null ? void 0 : _.id) || "");
23448
+ return C(((_ = f == null ? void 0 : f.active_signin) == null ? void 0 : _.id) || "");
23446
23449
  },
23447
23450
  children: [
23448
23451
  /* @__PURE__ */ e(At, {}),
@@ -23612,8 +23615,8 @@ function R1({
23612
23615
  const i = () => {
23613
23616
  t.is_read || r(t.id);
23614
23617
  }, a = (s) => {
23615
- const u = new Date(s), c = (/* @__PURE__ */ new Date()).getTime() - u.getTime(), h = Math.floor(c / 1e3), l = Math.floor(h / 60), p = Math.floor(l / 60), f = Math.floor(p / 24);
23616
- return f > 7 ? u.toLocaleDateString() : f > 0 ? `${f}d ago` : p > 0 ? `${p}h ago` : l > 0 ? `${l}m ago` : "Just now";
23618
+ const u = new Date(s), c = (/* @__PURE__ */ new Date()).getTime() - u.getTime(), h = Math.floor(c / 1e3), l = Math.floor(h / 60), p = Math.floor(l / 60), g = Math.floor(p / 24);
23619
+ return g > 7 ? u.toLocaleDateString() : g > 0 ? `${g}d ago` : p > 0 ? `${p}h ago` : l > 0 ? `${l}m ago` : "Just now";
23617
23620
  };
23618
23621
  return /* @__PURE__ */ n(w1, { $unread: !t.is_read, onClick: i, children: [
23619
23622
  /* @__PURE__ */ n(_1, { children: [
@@ -23783,11 +23786,11 @@ const M1 = d.div`
23783
23786
  onMarkAllAsRead: a,
23784
23787
  onDelete: s
23785
23788
  }, u) => {
23786
- const g = !o && r.some((c) => !c.is_read);
23789
+ const f = !o && r.some((c) => !c.is_read);
23787
23790
  return console.log("loadings", o), /* @__PURE__ */ n(M1, { ref: u, $position: t, children: [
23788
23791
  /* @__PURE__ */ n(O1, { children: [
23789
23792
  /* @__PURE__ */ e(L1, { children: "Notifications" }),
23790
- g && /* @__PURE__ */ e(A1, { onClick: a, children: "Mark all as read" })
23793
+ f && /* @__PURE__ */ e(A1, { onClick: a, children: "Mark all as read" })
23791
23794
  ] }),
23792
23795
  /* @__PURE__ */ e(D1, { children: o ? /* @__PURE__ */ e(N1, { children: /* @__PURE__ */ e(Le, {}) }) : r.length === 0 ? /* @__PURE__ */ n(F1, { children: [
23793
23796
  /* @__PURE__ */ e(B1, { children: /* @__PURE__ */ e(Cu, {}) }),
@@ -23876,13 +23879,13 @@ function K1({
23876
23879
  organizationIds: i,
23877
23880
  workspaceIds: a
23878
23881
  }) {
23879
- const [s, u] = P(!1), [g, c] = P(), h = ce(null), l = ce(null), p = {
23882
+ const [s, u] = P(!1), [f, c] = P(), h = ce(null), l = ce(null), p = {
23880
23883
  channels: o,
23881
23884
  organization_ids: i,
23882
23885
  workspace_ids: a,
23883
23886
  limit: 20
23884
23887
  }, {
23885
- unreadCount: f,
23888
+ unreadCount: g,
23886
23889
  notifications: y,
23887
23890
  loading: v,
23888
23891
  markAsRead: w,
@@ -23916,14 +23919,14 @@ function K1({
23916
23919
  }, [s]), /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(H1, { ref: h, className: t, children: [
23917
23920
  /* @__PURE__ */ e(q1, { children: /* @__PURE__ */ n(Y1, { onClick: () => u(!s), children: [
23918
23921
  /* @__PURE__ */ e(zu, { size: 16 }),
23919
- r && f > 0 && /* @__PURE__ */ e(Z1, { children: f > 9 ? "9+" : f })
23922
+ r && g > 0 && /* @__PURE__ */ e(Z1, { children: g > 9 ? "9+" : g })
23920
23923
  ] }) }),
23921
23924
  typeof window < "u" && s && Qr.createPortal(
23922
23925
  /* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(
23923
23926
  G1,
23924
23927
  {
23925
23928
  ref: l,
23926
- position: g,
23929
+ position: f,
23927
23930
  notifications: y,
23928
23931
  loading: v,
23929
23932
  onMarkAsRead: w,
@@ -24190,19 +24193,19 @@ const Q1 = d.div`
24190
24193
  showAddAccount: r = !0
24191
24194
  }) => {
24192
24195
  var E, $, x, m, b;
24193
- const { session: o, loading: i, switchSignIn: a, signOut: s } = Ze(), { deployment: u } = ze(), { navigateToSignIn: g, navigate: c } = Je(), [h, l] = P(null), [p, f] = P(
24196
+ const { session: o, loading: i, switchSignIn: a, signOut: s } = Ze(), { deployment: u } = ze(), { navigateToSignIn: f, navigate: c } = Je(), [h, l] = P(null), [p, g] = P(
24194
24197
  null
24195
24198
  ), y = o == null ? void 0 : o.active_signin, v = (o == null ? void 0 : o.signins) || [], w = (($ = (E = u == null ? void 0 : u.auth_settings) == null ? void 0 : E.multi_session_support) == null ? void 0 : $.enabled) ?? !1;
24196
24199
  le(() => {
24197
- i || v.length || g();
24198
- }, [i, v, g]);
24200
+ i || v.length || f();
24201
+ }, [i, v, f]);
24199
24202
  const I = (k) => k.split(" ").map((_) => _[0]).join("").toUpperCase().slice(0, 2), z = async (k) => {
24200
24203
  var _;
24201
24204
  if (!(k === (y == null ? void 0 : y.id) || p)) {
24202
- f(k);
24205
+ g(k);
24203
24206
  try {
24204
24207
  if (await a(k), t)
24205
- t(k), f(null);
24208
+ t(k), g(null);
24206
24209
  else {
24207
24210
  let O = new URLSearchParams(window.location.search).get(
24208
24211
  "redirect_uri"
@@ -24219,10 +24222,10 @@ const Q1 = d.div`
24219
24222
  localStorage.getItem("__dev_session__") ?? ""
24220
24223
  ), c(M.toString());
24221
24224
  } else
24222
- f(null);
24225
+ g(null);
24223
24226
  }
24224
24227
  } catch (O) {
24225
- console.error("Failed to switch account:", O), f(null);
24228
+ console.error("Failed to switch account:", O), g(null);
24226
24229
  }
24227
24230
  }
24228
24231
  }, C = async (k, _) => {
@@ -24239,7 +24242,7 @@ const Q1 = d.div`
24239
24242
  let k = new URLSearchParams(window.location.search).get(
24240
24243
  "redirect_uri"
24241
24244
  );
24242
- k || (k = (_ = u.ui_settings) == null ? void 0 : _.after_signin_redirect_url), g(k);
24245
+ k || (k = (_ = u.ui_settings) == null ? void 0 : _.after_signin_redirect_url), f(k);
24243
24246
  };
24244
24247
  return i ? /* @__PURE__ */ e(we, { children: /* @__PURE__ */ n(Gs, { children: [
24245
24248
  /* @__PURE__ */ e(Ne, {}),
@@ -24543,7 +24546,7 @@ const Q1 = d.div`
24543
24546
  organizationMemberships: t,
24544
24547
  refetch: r,
24545
24548
  loading: o
24546
- } = Ft(), { workspaces: i } = pr(), { switchOrganization: a, switchWorkspace: s } = Ze(), { deployment: u } = ze(), [g, c] = P(null), [h, l] = P("orgList"), [p, f] = P(null), y = (u == null ? void 0 : u.b2b_settings.workspaces_enabled) ?? !1, v = (u == null ? void 0 : u.b2b_settings.allow_users_to_create_orgs) ?? !1, w = ce(!1);
24549
+ } = Ft(), { workspaces: i } = pr(), { switchOrganization: a, switchWorkspace: s } = Ze(), { deployment: u } = ze(), [f, c] = P(null), [h, l] = P("orgList"), [p, g] = P(null), y = (u == null ? void 0 : u.b2b_settings.workspaces_enabled) ?? !1, v = (u == null ? void 0 : u.b2b_settings.allow_users_to_create_orgs) ?? !1, w = ce(!1);
24547
24550
  le(() => {
24548
24551
  if (!(w.current || !t)) {
24549
24552
  if (w.current = !0, t.length === 0) {
@@ -24555,7 +24558,7 @@ const Q1 = d.div`
24555
24558
  return;
24556
24559
  }
24557
24560
  if (!i || i.length === 0) {
24558
- t[0] && f(t[0].organization.id), l("createWorkspace");
24561
+ t[0] && g(t[0].organization.id), l("createWorkspace");
24559
24562
  return;
24560
24563
  }
24561
24564
  l("orgList");
@@ -24563,7 +24566,7 @@ const Q1 = d.div`
24563
24566
  }, [t, i, y]), console.log("view mode", h, y);
24564
24567
  const I = (S) => S.split(" ").map((R) => R[0]).join("").toUpperCase().slice(0, 2), z = async (S) => {
24565
24568
  if (y) {
24566
- f(S.id), l("workspaceList");
24569
+ g(S.id), l("workspaceList");
24567
24570
  return;
24568
24571
  }
24569
24572
  c(S.id);
@@ -24580,10 +24583,10 @@ const Q1 = d.div`
24580
24583
  c(null);
24581
24584
  }
24582
24585
  }, T = async (S) => {
24583
- await r(), y && S && (f(S.id), l("createWorkspace"));
24586
+ await r(), y && S && (g(S.id), l("createWorkspace"));
24584
24587
  }, E = () => {
24585
24588
  }, $ = async () => {
24586
- f(null), l("orgList");
24589
+ g(null), l("orgList");
24587
24590
  }, x = (O = t == null ? void 0 : t.find(
24588
24591
  (S) => S.organization.id === p
24589
24592
  )) == null ? void 0 : O.organization, m = p ? i == null ? void 0 : i.filter((S) => S.organization.id === p) : [];
@@ -24635,7 +24638,7 @@ const Q1 = d.div`
24635
24638
  Qs,
24636
24639
  {
24637
24640
  onClick: () => !R && C(S),
24638
- disabled: g === S.id || R,
24641
+ disabled: f === S.id || R,
24639
24642
  style: { opacity: R ? 0.7 : 1 },
24640
24643
  children: [
24641
24644
  /* @__PURE__ */ e(Xs, { children: S.image_url ? /* @__PURE__ */ e(
@@ -24687,7 +24690,7 @@ const Q1 = d.div`
24687
24690
  Qs,
24688
24691
  {
24689
24692
  onClick: () => !ee && z(R),
24690
- disabled: g === R.id || ee,
24693
+ disabled: f === R.id || ee,
24691
24694
  style: { opacity: ee ? 0.7 : 1 },
24692
24695
  children: [
24693
24696
  /* @__PURE__ */ e(Xs, { children: R.image_url ? /* @__PURE__ */ e(Js, { src: R.image_url, alt: R.name }) : I(R.name) }),
@@ -24730,7 +24733,7 @@ const Q1 = d.div`
24730
24733
  {
24731
24734
  style: { marginTop: "var(--space-md)" },
24732
24735
  onClick: () => l("createWorkspace"),
24733
- disabled: g !== null,
24736
+ disabled: f !== null,
24734
24737
  children: [
24735
24738
  /* @__PURE__ */ e(tt, { size: 12 }),
24736
24739
  "Create new workspace"
@@ -24742,7 +24745,7 @@ const Q1 = d.div`
24742
24745
  {
24743
24746
  style: { marginTop: "var(--space-md)" },
24744
24747
  onClick: () => l("createOrg"),
24745
- disabled: g !== null,
24748
+ disabled: f !== null,
24746
24749
  children: [
24747
24750
  /* @__PURE__ */ e(tt, { size: 12 }),
24748
24751
  "Create new organization"
@@ -24758,15 +24761,15 @@ const Q1 = d.div`
24758
24761
  children: t
24759
24762
  }) => {
24760
24763
  var w, I, z, C;
24761
- const { loading: r, session: o } = Ze(), { activeOrganization: i } = nt(), { activeWorkspace: a, loading: s } = ur(), { workspaces: u } = pr(), { deployment: g } = ze(), { organizationMemberships: c } = Ft(), h = (g == null ? void 0 : g.b2b_settings.workspaces_enabled) ?? !1, l = c == null ? void 0 : c.find(
24764
+ const { loading: r, session: o } = Ze(), { activeOrganization: i } = nt(), { activeWorkspace: a, loading: s } = ur(), { workspaces: u } = pr(), { deployment: f } = ze(), { organizationMemberships: c } = Ft(), h = (f == null ? void 0 : f.b2b_settings.workspaces_enabled) ?? !1, l = c == null ? void 0 : c.find(
24762
24765
  (T) => T.organization.id === (i == null ? void 0 : i.id)
24763
24766
  ), p = u == null ? void 0 : u.find(
24764
24767
  (T) => {
24765
24768
  var E;
24766
24769
  return T.id === ((E = o == null ? void 0 : o.active_signin) == null ? void 0 : E.active_workspace_membership_id);
24767
24770
  }
24768
- ), f = ((w = l == null ? void 0 : l.eligibility_restriction) == null ? void 0 : w.type) !== "none" && ((I = l == null ? void 0 : l.eligibility_restriction) == null ? void 0 : I.type) !== void 0, y = ((z = p == null ? void 0 : p.eligibility_restriction) == null ? void 0 : z.type) !== "none" && ((C = p == null ? void 0 : p.eligibility_restriction) == null ? void 0 : C.type) !== void 0;
24769
- return r || h && s ? null : (f || y || !i ? !1 : h ? a ? u == null ? void 0 : u.some(
24771
+ ), g = ((w = l == null ? void 0 : l.eligibility_restriction) == null ? void 0 : w.type) !== "none" && ((I = l == null ? void 0 : l.eligibility_restriction) == null ? void 0 : I.type) !== void 0, y = ((z = p == null ? void 0 : p.eligibility_restriction) == null ? void 0 : z.type) !== "none" && ((C = p == null ? void 0 : p.eligibility_restriction) == null ? void 0 : C.type) !== void 0;
24772
+ return r || h && s ? null : (g || y || !i ? !1 : h ? a ? u == null ? void 0 : u.some(
24770
24773
  (E) => E.id === a.id && E.organization.id === i.id
24771
24774
  ) : !1 : !0) ? (console.log("valid"), /* @__PURE__ */ e(re, { children: t })) : /* @__PURE__ */ e(we, { children: /* @__PURE__ */ e(Re, { isOpen: !0, children: /* @__PURE__ */ e(Re.Overlay, { children: /* @__PURE__ */ e(k2, { style: { width: "850px" }, children: /* @__PURE__ */ e(_2, {}) }) }) }) });
24772
24775
  }, C2 = d.div`
@@ -24806,17 +24809,17 @@ const Q1 = d.div`
24806
24809
  function $b({ selectedChannels: t, channelCounts: r, onChannelsChange: o }) {
24807
24810
  const i = (a) => {
24808
24811
  if (t.includes(a)) {
24809
- const u = t.filter((g) => g !== a);
24812
+ const u = t.filter((f) => f !== a);
24810
24813
  u.length === 0 ? o(["user"]) : o(u);
24811
24814
  } else
24812
24815
  o([...t, a]);
24813
24816
  };
24814
24817
  return /* @__PURE__ */ e(C2, { children: Object.entries($2).map(([a, s]) => {
24815
- const u = (r == null ? void 0 : r[a]) || 0, g = t.includes(a);
24818
+ const u = (r == null ? void 0 : r[a]) || 0, f = t.includes(a);
24816
24819
  return /* @__PURE__ */ n(
24817
24820
  S2,
24818
24821
  {
24819
- $active: g,
24822
+ $active: f,
24820
24823
  onClick: () => i(a),
24821
24824
  children: [
24822
24825
  s,
@@ -25502,12 +25505,12 @@ const lc = d.div`
25502
25505
  isDragging: a,
25503
25506
  onClose: s,
25504
25507
  onDownload: u,
25505
- onZoom: g,
25508
+ onZoom: f,
25506
25509
  onReset: c,
25507
25510
  onWheel: h,
25508
25511
  onMouseDown: l,
25509
25512
  onMouseMove: p,
25510
- onMouseUp: f
25513
+ onMouseUp: g
25511
25514
  }) => {
25512
25515
  const [y, v] = P(!1), w = ce(null);
25513
25516
  return le(() => (v(!0), () => v(!1)), []), le(() => {
@@ -25542,8 +25545,8 @@ const lc = d.div`
25542
25545
  I.preventDefault(), I.stopPropagation(), h(I);
25543
25546
  },
25544
25547
  onMouseMove: p,
25545
- onMouseUp: f,
25546
- onMouseLeave: f,
25548
+ onMouseUp: g,
25549
+ onMouseLeave: g,
25547
25550
  children: [
25548
25551
  /* @__PURE__ */ e(
25549
25552
  ry,
@@ -25580,7 +25583,7 @@ const lc = d.div`
25580
25583
  Lo,
25581
25584
  {
25582
25585
  $variant: "ghost",
25583
- onClick: () => g(-0.25),
25586
+ onClick: () => f(-0.25),
25584
25587
  title: "Zoom out",
25585
25588
  disabled: o <= 0.5,
25586
25589
  children: /* @__PURE__ */ e(xh, { size: 14 })
@@ -25594,7 +25597,7 @@ const lc = d.div`
25594
25597
  Lo,
25595
25598
  {
25596
25599
  $variant: "ghost",
25597
- onClick: () => g(0.25),
25600
+ onClick: () => f(0.25),
25598
25601
  title: "Zoom in",
25599
25602
  disabled: o >= 3,
25600
25603
  children: /* @__PURE__ */ e(yh, { size: 14 })
@@ -25641,13 +25644,13 @@ function cy({
25641
25644
  platformAdapter: a,
25642
25645
  selectedSession: s,
25643
25646
  selectSession: u
25644
- } = Ii(), g = s == null ? void 0 : s.id;
25645
- if (!g)
25647
+ } = Ii(), f = s == null ? void 0 : s.id;
25648
+ if (!f)
25646
25649
  return /* @__PURE__ */ e(we, { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ e(lc, { children: /* @__PURE__ */ n(dc, { children: [
25647
25650
  /* @__PURE__ */ e(zn, { size: 48, strokeWidth: 1.5 }),
25648
25651
  /* @__PURE__ */ e("p", { children: "No conversation selected" })
25649
25652
  ] }) }) });
25650
- const c = !0, h = !0, l = "Start a conversation by typing a message below", [p, f] = P(""), [y, v] = P(!1), [w, I] = P(null), [z, C] = P([]), [T, E] = P([]), [$, x] = P(null), [m, b] = P(1), [k, _] = P(!1), [O, M] = P({ x: 0, y: 0 }), [S, R] = P({ x: 0, y: 0 }), L = ce(null), U = ce(null), {
25653
+ const c = !0, h = !0, l = "Start a conversation by typing a message below", [p, g] = P(""), [y, v] = P(!1), [w, I] = P(null), [z, C] = P([]), [T, E] = P([]), [$, x] = P(null), [m, b] = P(1), [k, _] = P(!1), [O, M] = P({ x: 0, y: 0 }), [S, R] = P({ x: 0, y: 0 }), L = ce(null), U = ce(null), {
25651
25654
  messages: N,
25652
25655
  pendingMessage: j,
25653
25656
  pendingImages: A,
@@ -25660,7 +25663,7 @@ function cy({
25660
25663
  submitUserInput: se,
25661
25664
  cancelExecution: te
25662
25665
  } = pp({
25663
- contextId: g,
25666
+ contextId: f,
25664
25667
  agentName: o,
25665
25668
  token: i,
25666
25669
  platformAdapter: a,
@@ -25684,11 +25687,11 @@ function cy({
25684
25687
  if (B.preventDefault(), !!ee)
25685
25688
  if (Z && w) {
25686
25689
  let F = p.trim();
25687
- w.input_type === "multiselect" && (F = z.join(",")), F && (se(F), f(""), C([]));
25690
+ w.input_type === "multiselect" && (F = z.join(",")), F && (se(F), g(""), C([]));
25688
25691
  } else !ne && p.trim() && (ie(
25689
25692
  p,
25690
25693
  T.length > 0 ? T : void 0
25691
- ), f(""), E([]));
25694
+ ), g(""), E([]));
25692
25695
  }, ge = (B) => {
25693
25696
  const F = B.target.files;
25694
25697
  F && (Array.from(F).forEach((K) => {
@@ -25792,7 +25795,7 @@ function cy({
25792
25795
  "select",
25793
25796
  {
25794
25797
  value: je ? p : "",
25795
- onChange: (De) => f(De.target.value),
25798
+ onChange: (De) => g(De.target.value),
25796
25799
  disabled: !je,
25797
25800
  children: [
25798
25801
  /* @__PURE__ */ e("option", { value: "", children: "Choose an option..." }),
@@ -25830,7 +25833,7 @@ function cy({
25830
25833
  name: "boolean",
25831
25834
  value: "true",
25832
25835
  checked: je && p === "true",
25833
- onChange: (De) => f(De.target.value),
25836
+ onChange: (De) => g(De.target.value),
25834
25837
  disabled: !je
25835
25838
  }
25836
25839
  ),
@@ -25844,7 +25847,7 @@ function cy({
25844
25847
  name: "boolean",
25845
25848
  value: "false",
25846
25849
  checked: je && p === "false",
25847
- onChange: (De) => f(De.target.value),
25850
+ onChange: (De) => g(De.target.value),
25848
25851
  disabled: !je
25849
25852
  }
25850
25853
  ),
@@ -25856,7 +25859,7 @@ function cy({
25856
25859
  {
25857
25860
  type: "date",
25858
25861
  value: je ? p : "",
25859
- onChange: (De) => f(De.target.value),
25862
+ onChange: (De) => g(De.target.value),
25860
25863
  disabled: !je
25861
25864
  }
25862
25865
  )
@@ -25994,7 +25997,7 @@ function cy({
25994
25997
  H2,
25995
25998
  {
25996
25999
  value: p,
25997
- onChange: (B) => f(B.target.value),
26000
+ onChange: (B) => g(B.target.value),
25998
26001
  onKeyDown: (B) => {
25999
26002
  B.key === "Enter" && !B.shiftKey && (B.preventDefault(), ae(B));
26000
26003
  },
@@ -26295,7 +26298,7 @@ function Ry({
26295
26298
  loadingSessions: a,
26296
26299
  selectSession: s,
26297
26300
  deleteSession: u,
26298
- setShowHistory: g
26301
+ setShowHistory: f
26299
26302
  } = Ii(), c = i.filter(
26300
26303
  (y) => y.title.toLowerCase().includes(r.toLowerCase())
26301
26304
  ), h = (y) => {
@@ -26314,10 +26317,10 @@ function Ry({
26314
26317
  } catch (w) {
26315
26318
  console.error("Failed to delete session:", w);
26316
26319
  }
26317
- }, p = (y) => new Date(y).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), f = h(c);
26320
+ }, p = (y) => new Date(y).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), g = h(c);
26318
26321
  return /* @__PURE__ */ e(we, { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ n(ly, { children: [
26319
26322
  /* @__PURE__ */ n(dy, { children: [
26320
- t && /* @__PURE__ */ e(py, { onClick: () => g(!1), children: /* @__PURE__ */ e(Jr, { size: 20 }) }),
26323
+ t && /* @__PURE__ */ e(py, { onClick: () => f(!1), children: /* @__PURE__ */ e(Jr, { size: 20 }) }),
26321
26324
  /* @__PURE__ */ e(uy, { children: "Conversation History" })
26322
26325
  ] }),
26323
26326
  /* @__PURE__ */ e(hy, { children: /* @__PURE__ */ e(
@@ -26339,7 +26342,7 @@ function Ry({
26339
26342
  /* @__PURE__ */ e(xa, {}),
26340
26343
  /* @__PURE__ */ e("div", { children: "No conversations found" }),
26341
26344
  r && /* @__PURE__ */ e("div", { style: { fontSize: "var(--font-xs)", marginTop: "var(--space-sm)" }, children: "Try a different search term" })
26342
- ] }) : Object.entries(f).map(([y, v]) => /* @__PURE__ */ n(my, { children: [
26345
+ ] }) : Object.entries(g).map(([y, v]) => /* @__PURE__ */ n(my, { children: [
26343
26346
  /* @__PURE__ */ e(vy, { children: y }),
26344
26347
  v.map((w) => /* @__PURE__ */ n(
26345
26348
  yy,
@@ -26534,7 +26537,7 @@ function Ib() {
26534
26537
  showHistory: a,
26535
26538
  selectSession: s,
26536
26539
  createSession: u,
26537
- setShowHistory: g
26540
+ setShowHistory: f
26538
26541
  } = Ii(), c = async () => {
26539
26542
  try {
26540
26543
  r(!0), await u();
@@ -26575,7 +26578,7 @@ function Ib() {
26575
26578
  o.length > 0 && /* @__PURE__ */ n(Vy, { children: [
26576
26579
  /* @__PURE__ */ n(Gy, { children: [
26577
26580
  /* @__PURE__ */ e(Hy, { children: "Recent Chats" }),
26578
- /* @__PURE__ */ e(qy, { onClick: () => g(!0), children: "View All →" })
26581
+ /* @__PURE__ */ e(qy, { onClick: () => f(!0), children: "View All →" })
26579
26582
  ] }),
26580
26583
  /* @__PURE__ */ e(Yy, { children: o.slice(0, 2).map((l) => /* @__PURE__ */ e(
26581
26584
  By,