@bpinternal/billing-ui 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var co = (t, e, a) => e in t ? lo(t, e, { enumerable: !0, configurable: !0, writ
4
4
  var ar = (t, e, a) => co(t, typeof e != "symbol" ? e + "" : e, a);
5
5
  import { jsx as l, jsxs as m, Fragment as Se } from "react/jsx-runtime";
6
6
  import { QueryClient as uo, hydrate as po, dehydrate as mo, useQuery as et, useMutation as ka } from "@tanstack/react-query";
7
- import { createElement as mt, isValidElement as ja, Fragment as ho, cloneElement as go, Children as fo, createContext as Br, useContext as Sa, useCallback as wt, useState as X, useRef as nn, useEffect as Oe, useMemo as Le, useSyncExternalStore as bo, useId as yo } from "react";
7
+ import { createElement as mt, isValidElement as ja, Fragment as ho, cloneElement as go, Children as fo, createContext as Br, useContext as Sa, useCallback as wt, useState as ee, useRef as nn, useEffect as Oe, useMemo as Le, useSyncExternalStore as bo, useId as yo } from "react";
8
8
  import { loadStripe as vo } from "@stripe/stripe-js";
9
9
  import { createPortal as _o } from "react-dom";
10
10
  import { CardElement as Va, AddressElement as Ur, useStripe as zr, useElements as jr, Elements as Vr } from "@stripe/react-stripe-js";
@@ -245,73 +245,73 @@ const Mo = (t) => {
245
245
  ...c,
246
246
  ...r
247
247
  }, h = (N, v, C) => {
248
- const k = Cn(N), I = f(k, v.children, C);
249
- return Bo(k) && I.length === 0 || N.props && N.props.i18nIsDynamicList ? k : I;
250
- }, g = (N, v, C, k, I) => {
248
+ const S = Cn(N), A = f(S, v.children, C);
249
+ return Bo(S) && A.length === 0 || N.props && N.props.i18nIsDynamicList ? S : A;
250
+ }, g = (N, v, C, S, A) => {
251
251
  N.dummy ? (N.children = v, C.push(go(N, {
252
- key: k
253
- }, I ? void 0 : v))) : C.push(...fo.map([N], (S) => {
254
- const T = {
255
- ...S.props
252
+ key: S
253
+ }, A ? void 0 : v))) : C.push(...fo.map([N], (T) => {
254
+ const k = {
255
+ ...T.props
256
256
  };
257
- return delete T.i18nIsDynamicList, mt(S.type, {
258
- ...T,
259
- key: k,
260
- ref: S.ref
261
- }, I ? null : v);
257
+ return delete k.i18nIsDynamicList, mt(T.type, {
258
+ ...k,
259
+ key: S,
260
+ ref: T.ref
261
+ }, A ? null : v);
262
262
  }));
263
263
  }, f = (N, v, C) => {
264
- const k = zt(N);
265
- return zt(v).reduce((S, T, A) => {
266
- const _ = T.children && T.children[0] && T.children[0].content && a.services.interpolator.interpolate(T.children[0].content, p, a.language);
267
- if (T.type === "tag") {
268
- let L = k[parseInt(T.name, 10)];
269
- C.length === 1 && !L && (L = C[0][T.name]), L || (L = {});
270
- const U = Object.keys(T.attrs).length !== 0 ? Uo({
271
- props: T.attrs
272
- }, L) : L, R = ja(U), V = R && _n(T, !0) && !T.voidElement, j = i && Ut(U) && U.dummy && !R, $ = Ut(t) && Object.hasOwnProperty.call(t, T.name);
273
- if (Ue(U)) {
274
- const z = a.services.interpolator.interpolate(U, p, a.language);
275
- S.push(z);
276
- } else if (_n(U) || V) {
277
- const z = h(U, T, C);
278
- g(U, z, S, A);
264
+ const S = zt(N);
265
+ return zt(v).reduce((T, k, I) => {
266
+ const _ = k.children && k.children[0] && k.children[0].content && a.services.interpolator.interpolate(k.children[0].content, p, a.language);
267
+ if (k.type === "tag") {
268
+ let L = S[parseInt(k.name, 10)];
269
+ C.length === 1 && !L && (L = C[0][k.name]), L || (L = {});
270
+ const F = Object.keys(k.attrs).length !== 0 ? Uo({
271
+ props: k.attrs
272
+ }, L) : L, R = ja(F), Z = R && _n(k, !0) && !k.voidElement, j = i && Ut(F) && F.dummy && !R, G = Ut(t) && Object.hasOwnProperty.call(t, k.name);
273
+ if (Ue(F)) {
274
+ const z = a.services.interpolator.interpolate(F, p, a.language);
275
+ T.push(z);
276
+ } else if (_n(F) || Z) {
277
+ const z = h(F, k, C);
278
+ g(F, z, T, I);
279
279
  } else if (j) {
280
- const z = f(k, T.children, C);
281
- g(U, z, S, A);
282
- } else if (Number.isNaN(parseFloat(T.name)))
283
- if ($) {
284
- const z = h(U, T, C);
285
- g(U, z, S, A, T.voidElement);
286
- } else if (n.transSupportBasicHtmlNodes && o.indexOf(T.name) > -1)
287
- if (T.voidElement)
288
- S.push(mt(T.name, {
289
- key: `${T.name}-${A}`
280
+ const z = f(S, k.children, C);
281
+ g(F, z, T, I);
282
+ } else if (Number.isNaN(parseFloat(k.name)))
283
+ if (G) {
284
+ const z = h(F, k, C);
285
+ g(F, z, T, I, k.voidElement);
286
+ } else if (n.transSupportBasicHtmlNodes && o.indexOf(k.name) > -1)
287
+ if (k.voidElement)
288
+ T.push(mt(k.name, {
289
+ key: `${k.name}-${I}`
290
290
  }));
291
291
  else {
292
- const z = f(k, T.children, C);
293
- S.push(mt(T.name, {
294
- key: `${T.name}-${A}`
292
+ const z = f(S, k.children, C);
293
+ T.push(mt(k.name, {
294
+ key: `${k.name}-${I}`
295
295
  }, z));
296
296
  }
297
- else if (T.voidElement)
298
- S.push(`<${T.name} />`);
297
+ else if (k.voidElement)
298
+ T.push(`<${k.name} />`);
299
299
  else {
300
- const z = f(k, T.children, C);
301
- S.push(`<${T.name}>${z}</${T.name}>`);
300
+ const z = f(S, k.children, C);
301
+ T.push(`<${k.name}>${z}</${k.name}>`);
302
302
  }
303
- else if (Ut(U) && !R) {
304
- const z = T.children[0] ? _ : null;
305
- z && S.push(z);
303
+ else if (Ut(F) && !R) {
304
+ const z = k.children[0] ? _ : null;
305
+ z && T.push(z);
306
306
  } else
307
- g(U, _, S, A, T.children.length !== 1 || !_);
308
- } else if (T.type === "text") {
309
- const L = n.transWrapTextNodes, U = s ? n.unescape(a.services.interpolator.interpolate(T.content, p, a.language)) : a.services.interpolator.interpolate(T.content, p, a.language);
310
- L ? S.push(mt(L, {
311
- key: `${T.name}-${A}`
312
- }, U)) : S.push(U);
307
+ g(F, _, T, I, k.children.length !== 1 || !_);
308
+ } else if (k.type === "text") {
309
+ const L = n.transWrapTextNodes, F = s ? n.unescape(a.services.interpolator.interpolate(k.content, p, a.language)) : a.services.interpolator.interpolate(k.content, p, a.language);
310
+ L ? T.push(mt(L, {
311
+ key: `${k.name}-${I}`
312
+ }, F)) : T.push(F);
313
313
  }
314
- return S;
314
+ return T;
315
315
  }, []);
316
316
  }, w = f([{
317
317
  dummy: !0,
@@ -339,22 +339,22 @@ function jo(t) {
339
339
  const w = p || Mn();
340
340
  if (!w)
341
341
  return Za("You will need to pass in an i18next instance by using i18nextReactModule"), e;
342
- const N = h || w.t.bind(w) || ((V) => V), v = {
342
+ const N = h || w.t.bind(w) || ((Z) => Z), v = {
343
343
  ...Wr(),
344
344
  ...w.options && w.options.react
345
345
  };
346
346
  let C = u || N.ns || w.options && w.options.defaultNS;
347
347
  C = Ue(C) ? [C] : C || ["translation"];
348
- const k = Kr(e, v), I = c || k || v.transEmptyNodeValue || r, {
349
- hashTransKey: S
350
- } = v, T = r || (S ? S(k || I) : k || I);
348
+ const S = Kr(e, v), A = c || S || v.transEmptyNodeValue || r, {
349
+ hashTransKey: T
350
+ } = v, k = r || (T ? T(S || A) : S || A);
351
351
  w.options && w.options.interpolation && w.options.interpolation.defaultVariables && (i = i && Object.keys(i).length > 0 ? {
352
352
  ...i,
353
353
  ...w.options.interpolation.defaultVariables
354
354
  } : {
355
355
  ...w.options.interpolation.defaultVariables
356
356
  });
357
- const A = i || a !== void 0 || !e ? o.interpolation : {
357
+ const I = i || a !== void 0 || !e ? o.interpolation : {
358
358
  interpolation: {
359
359
  ...o.interpolation,
360
360
  prefix: "#$?",
@@ -365,20 +365,20 @@ function jo(t) {
365
365
  context: s || o.context,
366
366
  count: a,
367
367
  ...i,
368
- ...A,
369
- defaultValue: I,
368
+ ...I,
369
+ defaultValue: A,
370
370
  ns: C
371
- }, L = T ? N(T, _) : I;
372
- d && Object.keys(d).forEach((V) => {
373
- const j = d[V];
374
- if (typeof j.type == "function" || !j.props || !j.props.children || L.indexOf(`${V}/>`) < 0 && L.indexOf(`${V} />`) < 0) return;
375
- function $() {
371
+ }, L = k ? N(k, _) : A;
372
+ d && Object.keys(d).forEach((Z) => {
373
+ const j = d[Z];
374
+ if (typeof j.type == "function" || !j.props || !j.props.children || L.indexOf(`${Z}/>`) < 0 && L.indexOf(`${Z} />`) < 0) return;
375
+ function G() {
376
376
  return mt(ho, null, j);
377
377
  }
378
- d[V] = mt($);
378
+ d[Z] = mt(G);
379
379
  });
380
- const U = zo(d || e, L, w, v, _, g), R = n !== void 0 ? n : v.defaultTransParent;
381
- return R ? mt(R, f, U) : U;
380
+ const F = zo(d || e, L, w, v, _, g), R = n !== void 0 ? n : v.defaultTransParent;
381
+ return R ? mt(R, f, F) : F;
382
382
  }
383
383
  const Vo = {
384
384
  type: "3rdParty",
@@ -450,8 +450,8 @@ const qo = (t, e) => {
450
450
  } = Sa(Bn) || {}, s = a || n || Mn();
451
451
  if (s && !s.reportNamespaces && (s.reportNamespaces = new Zo()), !s) {
452
452
  Za("You will need to pass in an i18next instance by using initReactI18next");
453
- const I = (T, A) => Ue(A) ? A : Ut(A) && Ue(A.defaultValue) ? A.defaultValue : Array.isArray(T) ? T[T.length - 1] : T, S = [I, {}, !1];
454
- return S.t = I, S.i18n = {}, S.ready = !1, S;
453
+ const A = (k, I) => Ue(I) ? I : Ut(I) && Ue(I.defaultValue) ? I.defaultValue : Array.isArray(k) ? k[k.length - 1] : k, T = [A, {}, !1];
454
+ return T.t = A, T.i18n = {}, T.ready = !1, T;
455
455
  }
456
456
  s.options.react && s.options.react.wait !== void 0 && Za("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
457
457
  const o = {
@@ -464,33 +464,33 @@ const qo = (t, e) => {
464
464
  } = o;
465
465
  let d = r || s.options && s.options.defaultNS;
466
466
  d = Ue(d) ? [d] : d || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(d);
467
- const u = (s.isInitialized || s.initializedStoreOnce) && d.every((I) => Do(I, s, o)), p = Wo(s, e.lng || null, o.nsMode === "fallback" ? d : d[0], c), h = () => p, g = () => $r(s, e.lng || null, o.nsMode === "fallback" ? d : d[0], c), [f, w] = X(h);
467
+ const u = (s.isInitialized || s.initializedStoreOnce) && d.every((A) => Do(A, s, o)), p = Wo(s, e.lng || null, o.nsMode === "fallback" ? d : d[0], c), h = () => p, g = () => $r(s, e.lng || null, o.nsMode === "fallback" ? d : d[0], c), [f, w] = ee(h);
468
468
  let N = d.join();
469
469
  e.lng && (N = `${e.lng}${N}`);
470
470
  const v = qo(N), C = nn(!0);
471
471
  Oe(() => {
472
472
  const {
473
- bindI18n: I,
474
- bindI18nStore: S
473
+ bindI18n: A,
474
+ bindI18nStore: T
475
475
  } = o;
476
476
  C.current = !0, !u && !i && (e.lng ? ir(s, e.lng, d, () => {
477
477
  C.current && w(g);
478
478
  }) : or(s, d, () => {
479
479
  C.current && w(g);
480
480
  })), u && v && v !== N && C.current && w(g);
481
- const T = () => {
481
+ const k = () => {
482
482
  C.current && w(g);
483
483
  };
484
- return I && s && s.on(I, T), S && s && s.store.on(S, T), () => {
485
- C.current = !1, I && s && I.split(" ").forEach((A) => s.off(A, T)), S && s && S.split(" ").forEach((A) => s.store.off(A, T));
484
+ return A && s && s.on(A, k), T && s && s.store.on(T, k), () => {
485
+ C.current = !1, A && s && A.split(" ").forEach((I) => s.off(I, k)), T && s && T.split(" ").forEach((I) => s.store.off(I, k));
486
486
  };
487
487
  }, [s, N]), Oe(() => {
488
488
  C.current && u && w(h);
489
489
  }, [s, c, u]);
490
- const k = [f, s, u];
491
- if (k.t = f, k.i18n = s, k.ready = u, u || !u && !i) return k;
492
- throw new Promise((I) => {
493
- e.lng ? ir(s, e.lng, d, () => I()) : or(s, d, () => I());
490
+ const S = [f, s, u];
491
+ if (S.t = f, S.i18n = s, S.ready = u, u || !u && !i) return S;
492
+ throw new Promise((A) => {
493
+ e.lng ? ir(s, e.lng, d, () => A()) : or(s, d, () => A());
494
494
  });
495
495
  };
496
496
  function Go(t) {
@@ -507,7 +507,7 @@ function Go(t) {
507
507
  value: r
508
508
  }, n);
509
509
  }
510
- const H = (t) => typeof t == "string", oa = () => {
510
+ const Y = (t) => typeof t == "string", oa = () => {
511
511
  let t, e;
512
512
  const a = new Promise((n, r) => {
513
513
  t = n, e = r;
@@ -517,8 +517,8 @@ const H = (t) => typeof t == "string", oa = () => {
517
517
  t.forEach((n) => {
518
518
  e[n] && (a[n] = e[n]);
519
519
  });
520
- }, $o = /###/g, dr = (t) => t && t.indexOf("###") > -1 ? t.replace($o, ".") : t, cr = (t) => !t || H(t), la = (t, e, a) => {
521
- const n = H(e) ? e.split(".") : e;
520
+ }, $o = /###/g, dr = (t) => t && t.indexOf("###") > -1 ? t.replace($o, ".") : t, cr = (t) => !t || Y(t), la = (t, e, a) => {
521
+ const n = Y(e) ? e.split(".") : e;
522
522
  let r = 0;
523
523
  for (; r < n.length - 1; ) {
524
524
  if (cr(t)) return {};
@@ -560,7 +560,7 @@ const H = (t) => typeof t == "string", oa = () => {
560
560
  return n !== void 0 ? n : Wa(e, a);
561
561
  }, Hr = (t, e, a) => {
562
562
  for (const n in e)
563
- n !== "__proto__" && n !== "constructor" && (n in t ? H(t[n]) || t[n] instanceof String || H(e[n]) || e[n] instanceof String ? a && (t[n] = e[n]) : Hr(t[n], e[n], a) : t[n] = e[n]);
563
+ n !== "__proto__" && n !== "constructor" && (n in t ? Y(t[n]) || t[n] instanceof String || Y(e[n]) || e[n] instanceof String ? a && (t[n] = e[n]) : Hr(t[n], e[n], a) : t[n] = e[n]);
564
564
  return t;
565
565
  }, Et = (t) => t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
566
566
  var Jo = {
@@ -571,7 +571,7 @@ var Jo = {
571
571
  "'": "&#39;",
572
572
  "/": "&#x2F;"
573
573
  };
574
- const Qo = (t) => H(t) ? t.replace(/[&<>"'\/]/g, (e) => Jo[e]) : t;
574
+ const Qo = (t) => Y(t) ? t.replace(/[&<>"'\/]/g, (e) => Jo[e]) : t;
575
575
  class Xo {
576
576
  constructor(e) {
577
577
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
@@ -660,7 +660,7 @@ class Ka {
660
660
  return this.forward(a, "warn", "WARNING DEPRECATED: ", !0);
661
661
  }
662
662
  forward(e, a, n, r) {
663
- return r && !this.debug ? null : (H(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[a](e));
663
+ return r && !this.debug ? null : (Y(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[a](e));
664
664
  }
665
665
  create(e) {
666
666
  return new Ka(this.logger, {
@@ -726,9 +726,9 @@ class pr extends rn {
726
726
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
727
727
  const s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, o = r.ignoreJSONStructure !== void 0 ? r.ignoreJSONStructure : this.options.ignoreJSONStructure;
728
728
  let i;
729
- e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, a], n && (Array.isArray(n) ? i.push(...n) : H(n) && s ? i.push(...n.split(s)) : i.push(n)));
729
+ e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, a], n && (Array.isArray(n) ? i.push(...n) : Y(n) && s ? i.push(...n.split(s)) : i.push(n)));
730
730
  const c = Wa(this.data, i);
731
- return !c && !a && !n && e.indexOf(".") > -1 && (e = i[0], a = i[1], n = i.slice(2).join(".")), c || !o || !H(n) ? c : xn(this.data && this.data[e] && this.data[e][a], n, s);
731
+ return !c && !a && !n && e.indexOf(".") > -1 && (e = i[0], a = i[1], n = i.slice(2).join(".")), c || !o || !Y(n) ? c : xn(this.data && this.data[e] && this.data[e][a], n, s);
732
732
  }
733
733
  addResource(e, a, n, r) {
734
734
  let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -743,7 +743,7 @@ class pr extends rn {
743
743
  silent: !1
744
744
  };
745
745
  for (const s in n)
746
- (H(n[s]) || Array.isArray(n[s])) && this.addResource(e, a, s, n[s], {
746
+ (Y(n[s]) || Array.isArray(n[s])) && this.addResource(e, a, s, n[s], {
747
747
  silent: !0
748
748
  });
749
749
  r.silent || this.emit("added", e, a, n);
@@ -822,14 +822,14 @@ class $a extends rn {
822
822
  if (c && c.length > 0)
823
823
  return {
824
824
  key: e,
825
- namespaces: H(s) ? [s] : s
825
+ namespaces: Y(s) ? [s] : s
826
826
  };
827
827
  const d = e.split(n);
828
828
  (n !== r || n === r && this.options.ns.indexOf(d[0]) > -1) && (s = d.shift()), e = d.join(r);
829
829
  }
830
830
  return {
831
831
  key: e,
832
- namespaces: H(s) ? [s] : s
832
+ namespaces: Y(s) ? [s] : s
833
833
  };
834
834
  }
835
835
  translate(e, a, n) {
@@ -843,15 +843,15 @@ class $a extends rn {
843
843
  } = this.extractFromKey(e[e.length - 1], a), c = i[i.length - 1], d = a.lng || this.language, u = a.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
844
844
  if (d && d.toLowerCase() === "cimode") {
845
845
  if (u) {
846
- const I = a.nsSeparator || this.options.nsSeparator;
846
+ const A = a.nsSeparator || this.options.nsSeparator;
847
847
  return r ? {
848
- res: `${c}${I}${o}`,
848
+ res: `${c}${A}${o}`,
849
849
  usedKey: o,
850
850
  exactUsedKey: o,
851
851
  usedLng: d,
852
852
  usedNS: c,
853
853
  usedParams: this.getUsedParamsDetails(a)
854
- } : `${c}${I}${o}`;
854
+ } : `${c}${A}${o}`;
855
855
  }
856
856
  return r ? {
857
857
  res: o,
@@ -864,64 +864,64 @@ class $a extends rn {
864
864
  }
865
865
  const p = this.resolve(e, a);
866
866
  let h = p && p.res;
867
- const g = p && p.usedKey || o, f = p && p.exactUsedKey || o, w = Object.prototype.toString.apply(h), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, k = !H(h) && typeof h != "boolean" && typeof h != "number";
868
- if (C && h && k && N.indexOf(w) < 0 && !(H(v) && Array.isArray(h))) {
867
+ const g = p && p.usedKey || o, f = p && p.exactUsedKey || o, w = Object.prototype.toString.apply(h), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, S = !Y(h) && typeof h != "boolean" && typeof h != "number";
868
+ if (C && h && S && N.indexOf(w) < 0 && !(Y(v) && Array.isArray(h))) {
869
869
  if (!a.returnObjects && !this.options.returnObjects) {
870
870
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
871
- const I = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, h, {
871
+ const A = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, h, {
872
872
  ...a,
873
873
  ns: i
874
874
  }) : `key '${o} (${this.language})' returned an object instead of string.`;
875
- return r ? (p.res = I, p.usedParams = this.getUsedParamsDetails(a), p) : I;
875
+ return r ? (p.res = A, p.usedParams = this.getUsedParamsDetails(a), p) : A;
876
876
  }
877
877
  if (s) {
878
- const I = Array.isArray(h), S = I ? [] : {}, T = I ? f : g;
879
- for (const A in h)
880
- if (Object.prototype.hasOwnProperty.call(h, A)) {
881
- const _ = `${T}${s}${A}`;
882
- S[A] = this.translate(_, {
878
+ const A = Array.isArray(h), T = A ? [] : {}, k = A ? f : g;
879
+ for (const I in h)
880
+ if (Object.prototype.hasOwnProperty.call(h, I)) {
881
+ const _ = `${k}${s}${I}`;
882
+ T[I] = this.translate(_, {
883
883
  ...a,
884
884
  joinArrays: !1,
885
885
  ns: i
886
- }), S[A] === _ && (S[A] = h[A]);
886
+ }), T[I] === _ && (T[I] = h[I]);
887
887
  }
888
- h = S;
888
+ h = T;
889
889
  }
890
- } else if (C && H(v) && Array.isArray(h))
890
+ } else if (C && Y(v) && Array.isArray(h))
891
891
  h = h.join(v), h && (h = this.extendTranslation(h, e, a, n));
892
892
  else {
893
- let I = !1, S = !1;
894
- const T = a.count !== void 0 && !H(a.count), A = $a.hasDefaultValue(a), _ = T ? this.pluralResolver.getSuffix(d, a.count, a) : "", L = a.ordinal && T ? this.pluralResolver.getSuffix(d, a.count, {
893
+ let A = !1, T = !1;
894
+ const k = a.count !== void 0 && !Y(a.count), I = $a.hasDefaultValue(a), _ = k ? this.pluralResolver.getSuffix(d, a.count, a) : "", L = a.ordinal && k ? this.pluralResolver.getSuffix(d, a.count, {
895
895
  ordinal: !1
896
- }) : "", U = T && !a.ordinal && a.count === 0 && this.pluralResolver.shouldUseIntlApi(), R = U && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${_}`] || a[`defaultValue${L}`] || a.defaultValue;
897
- !this.isValidLookup(h) && A && (I = !0, h = R), this.isValidLookup(h) || (S = !0, h = o);
898
- const j = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && S ? void 0 : h, $ = A && R !== h && this.options.updateMissing;
899
- if (S || I || $) {
900
- if (this.logger.log($ ? "updateKey" : "missingKey", d, c, o, $ ? R : h), s) {
901
- const oe = this.resolve(o, {
896
+ }) : "", F = k && !a.ordinal && a.count === 0 && this.pluralResolver.shouldUseIntlApi(), R = F && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${_}`] || a[`defaultValue${L}`] || a.defaultValue;
897
+ !this.isValidLookup(h) && I && (A = !0, h = R), this.isValidLookup(h) || (T = !0, h = o);
898
+ const j = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && T ? void 0 : h, G = I && R !== h && this.options.updateMissing;
899
+ if (T || A || G) {
900
+ if (this.logger.log(G ? "updateKey" : "missingKey", d, c, o, G ? R : h), s) {
901
+ const ie = this.resolve(o, {
902
902
  ...a,
903
903
  keySeparator: !1
904
904
  });
905
- oe && oe.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
905
+ ie && ie.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
906
906
  }
907
907
  let z = [];
908
- const O = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
909
- if (this.options.saveMissingTo === "fallback" && O && O[0])
910
- for (let oe = 0; oe < O.length; oe++)
911
- z.push(O[oe]);
908
+ const U = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
909
+ if (this.options.saveMissingTo === "fallback" && U && U[0])
910
+ for (let ie = 0; ie < U.length; ie++)
911
+ z.push(U[ie]);
912
912
  else this.options.saveMissingTo === "all" ? z = this.languageUtils.toResolveHierarchy(a.lng || this.language) : z.push(a.lng || this.language);
913
- const ie = (oe, ne, P) => {
914
- const Y = A && P !== h ? P : j;
915
- this.options.missingKeyHandler ? this.options.missingKeyHandler(oe, c, ne, Y, $, a) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(oe, c, ne, Y, $, a), this.emit("missingKey", oe, c, ne, h);
913
+ const H = (ie, re, P) => {
914
+ const J = I && P !== h ? P : j;
915
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(ie, c, re, J, G, a) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(ie, c, re, J, G, a), this.emit("missingKey", ie, c, re, h);
916
916
  };
917
- this.options.saveMissing && (this.options.saveMissingPlurals && T ? z.forEach((oe) => {
918
- const ne = this.pluralResolver.getSuffixes(oe, a);
919
- U && a[`defaultValue${this.options.pluralSeparator}zero`] && ne.indexOf(`${this.options.pluralSeparator}zero`) < 0 && ne.push(`${this.options.pluralSeparator}zero`), ne.forEach((P) => {
920
- ie([oe], o + P, a[`defaultValue${P}`] || R);
917
+ this.options.saveMissing && (this.options.saveMissingPlurals && k ? z.forEach((ie) => {
918
+ const re = this.pluralResolver.getSuffixes(ie, a);
919
+ F && a[`defaultValue${this.options.pluralSeparator}zero`] && re.indexOf(`${this.options.pluralSeparator}zero`) < 0 && re.push(`${this.options.pluralSeparator}zero`), re.forEach((P) => {
920
+ H([ie], o + P, a[`defaultValue${P}`] || R);
921
921
  });
922
- }) : ie(z, o, R));
922
+ }) : H(z, o, R));
923
923
  }
924
- h = this.extendTranslation(h, e, a, p, n), S && h === o && this.options.appendNamespaceToMissingKey && (h = `${c}:${o}`), (S || I) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${o}` : o, I ? h : void 0) : h = this.options.parseMissingKeyHandler(h));
924
+ h = this.extendTranslation(h, e, a, p, n), T && h === o && this.options.appendNamespaceToMissingKey && (h = `${c}:${o}`), (T || A) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${o}` : o, A ? h : void 0) : h = this.options.parseMissingKeyHandler(h));
925
925
  }
926
926
  return r ? (p.res = h, p.usedParams = this.getUsedParamsDetails(a), p) : h;
927
927
  }
@@ -942,13 +942,13 @@ class $a extends rn {
942
942
  ...n.interpolation
943
943
  }
944
944
  });
945
- const d = H(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
945
+ const d = Y(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
946
946
  let u;
947
947
  if (d) {
948
948
  const h = e.match(this.interpolator.nestingRegexp);
949
949
  u = h && h.length;
950
950
  }
951
- let p = n.replace && !H(n.replace) ? n.replace : n;
951
+ let p = n.replace && !Y(n.replace) ? n.replace : n;
952
952
  if (this.options.interpolation.defaultVariables && (p = {
953
953
  ...this.options.interpolation.defaultVariables,
954
954
  ...p
@@ -962,7 +962,7 @@ class $a extends rn {
962
962
  return s && s[0] === g[0] && !n.context ? (o.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${a[0]}`), null) : o.translate(...g, a);
963
963
  }, n)), n.interpolation && this.interpolator.reset();
964
964
  }
965
- const i = n.postProcess || this.options.postProcess, c = H(i) ? [i] : i;
965
+ const i = n.postProcess || this.options.postProcess, c = Y(i) ? [i] : i;
966
966
  return e != null && c && c.length && n.applyPostProcessor !== !1 && (e = Yr.handle(c, e, a, this.options && this.options.postProcessPassResolved ? {
967
967
  i18nResolved: {
968
968
  ...r,
@@ -973,13 +973,13 @@ class $a extends rn {
973
973
  }
974
974
  resolve(e) {
975
975
  let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n, r, s, o, i;
976
- return H(e) && (e = [e]), e.forEach((c) => {
976
+ return Y(e) && (e = [e]), e.forEach((c) => {
977
977
  if (this.isValidLookup(n)) return;
978
978
  const d = this.extractFromKey(c, a), u = d.key;
979
979
  r = u;
980
980
  let p = d.namespaces;
981
981
  this.options.fallbackNS && (p = p.concat(this.options.fallbackNS));
982
- const h = a.count !== void 0 && !H(a.count), g = h && !a.ordinal && a.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = a.context !== void 0 && (H(a.context) || typeof a.context == "number") && a.context !== "", w = a.lngs ? a.lngs : this.languageUtils.toResolveHierarchy(a.lng || this.language, a.fallbackLng);
982
+ const h = a.count !== void 0 && !Y(a.count), g = h && !a.ordinal && a.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = a.context !== void 0 && (Y(a.context) || typeof a.context == "number") && a.context !== "", w = a.lngs ? a.lngs : this.languageUtils.toResolveHierarchy(a.lng || this.language, a.fallbackLng);
983
983
  p.forEach((N) => {
984
984
  this.isValidLookup(n) || (i = N, !mr[`${w[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(i) && (mr[`${w[0]}-${N}`] = !0, this.logger.warn(`key "${r}" for languages "${w.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), w.forEach((v) => {
985
985
  if (this.isValidLookup(n)) return;
@@ -988,17 +988,17 @@ class $a extends rn {
988
988
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
989
989
  this.i18nFormat.addLookupKeys(C, u, v, N, a);
990
990
  else {
991
- let I;
992
- h && (I = this.pluralResolver.getSuffix(v, a.count, a));
993
- const S = `${this.options.pluralSeparator}zero`, T = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
994
- if (h && (C.push(u + I), a.ordinal && I.indexOf(T) === 0 && C.push(u + I.replace(T, this.options.pluralSeparator)), g && C.push(u + S)), f) {
995
- const A = `${u}${this.options.contextSeparator}${a.context}`;
996
- C.push(A), h && (C.push(A + I), a.ordinal && I.indexOf(T) === 0 && C.push(A + I.replace(T, this.options.pluralSeparator)), g && C.push(A + S));
991
+ let A;
992
+ h && (A = this.pluralResolver.getSuffix(v, a.count, a));
993
+ const T = `${this.options.pluralSeparator}zero`, k = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
994
+ if (h && (C.push(u + A), a.ordinal && A.indexOf(k) === 0 && C.push(u + A.replace(k, this.options.pluralSeparator)), g && C.push(u + T)), f) {
995
+ const I = `${u}${this.options.contextSeparator}${a.context}`;
996
+ C.push(I), h && (C.push(I + A), a.ordinal && A.indexOf(k) === 0 && C.push(I + A.replace(k, this.options.pluralSeparator)), g && C.push(I + T));
997
997
  }
998
998
  }
999
- let k;
1000
- for (; k = C.pop(); )
1001
- this.isValidLookup(n) || (s = k, n = this.getResource(v, N, k, a));
999
+ let S;
1000
+ for (; S = C.pop(); )
1001
+ this.isValidLookup(n) || (s = S, n = this.getResource(v, N, S, a));
1002
1002
  }));
1003
1003
  });
1004
1004
  }), {
@@ -1018,7 +1018,7 @@ class $a extends rn {
1018
1018
  }
1019
1019
  getUsedParamsDetails() {
1020
1020
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1021
- const a = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !H(e.replace);
1021
+ const a = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !Y(e.replace);
1022
1022
  let r = n ? e.replace : e;
1023
1023
  if (n && typeof e.count < "u" && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
1024
1024
  ...this.options.interpolation.defaultVariables,
@@ -1056,7 +1056,7 @@ class hr {
1056
1056
  return this.formatLanguageCode(a[0]);
1057
1057
  }
1058
1058
  formatLanguageCode(e) {
1059
- if (H(e) && e.indexOf("-") > -1) {
1059
+ if (Y(e) && e.indexOf("-") > -1) {
1060
1060
  if (typeof Intl < "u" && typeof Intl.getCanonicalLocales < "u")
1061
1061
  try {
1062
1062
  let r = Intl.getCanonicalLocales(e)[0];
@@ -1092,7 +1092,7 @@ class hr {
1092
1092
  }
1093
1093
  getFallbackCodes(e, a) {
1094
1094
  if (!e) return [];
1095
- if (typeof e == "function" && (e = e(a)), H(e) && (e = [e]), Array.isArray(e)) return e;
1095
+ if (typeof e == "function" && (e = e(a)), Y(e) && (e = [e]), Array.isArray(e)) return e;
1096
1096
  if (!a) return e.default || [];
1097
1097
  let n = e[a];
1098
1098
  return n || (n = e[this.getScriptPartFromCode(a)]), n || (n = e[this.formatLanguageCode(a)]), n || (n = e[this.getLanguagePartFromCode(a)]), n || (n = e.default), n || [];
@@ -1101,7 +1101,7 @@ class hr {
1101
1101
  const n = this.getFallbackCodes(a || this.options.fallbackLng || [], e), r = [], s = (o) => {
1102
1102
  o && (this.isSupportedCode(o) ? r.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
1103
1103
  };
1104
- return H(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : H(e) && s(this.formatLanguageCode(e)), n.forEach((o) => {
1104
+ return Y(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : Y(e) && s(this.formatLanguageCode(e)), n.forEach((o) => {
1105
1105
  r.indexOf(o) < 0 && s(this.formatLanguageCode(o));
1106
1106
  }), r;
1107
1107
  }
@@ -1306,7 +1306,7 @@ class di {
1306
1306
  }
1307
1307
  const fr = function(t, e, a) {
1308
1308
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = Yo(t, e, a);
1309
- return !s && r && H(a) && (s = xn(t, a, n), s === void 0 && (s = xn(e, a, n))), s;
1309
+ return !s && r && Y(a) && (s = xn(t, a, n), s === void 0 && (s = xn(e, a, n))), s;
1310
1310
  }, wn = (t) => t.replace(/\$/g, "$$$$");
1311
1311
  class ci {
1312
1312
  constructor() {
@@ -1378,7 +1378,7 @@ class ci {
1378
1378
  if (o = d(f), o === void 0)
1379
1379
  if (typeof u == "function") {
1380
1380
  const N = u(e, s, r);
1381
- o = H(N) ? N : "";
1381
+ o = Y(N) ? N : "";
1382
1382
  } else if (r && Object.prototype.hasOwnProperty.call(r, f))
1383
1383
  o = "";
1384
1384
  else if (p) {
@@ -1386,7 +1386,7 @@ class ci {
1386
1386
  continue;
1387
1387
  } else
1388
1388
  this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`), o = "";
1389
- else !H(o) && !this.useRawValueToEscape && (o = lr(o));
1389
+ else !Y(o) && !this.useRawValueToEscape && (o = lr(o));
1390
1390
  const w = g.safeValue(o);
1391
1391
  if (e = e.replace(s[0], w), p ? (g.regex.lastIndex += o.length, g.regex.lastIndex -= s[0].length) : g.regex.lastIndex = 0, i++, i >= this.maxReplaces)
1392
1392
  break;
@@ -1417,14 +1417,14 @@ class ci {
1417
1417
  let c = [];
1418
1418
  o = {
1419
1419
  ...n
1420
- }, o = o.replace && !H(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
1420
+ }, o = o.replace && !Y(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
1421
1421
  let d = !1;
1422
1422
  if (r[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(r[1])) {
1423
1423
  const u = r[1].split(this.formatSeparator).map((p) => p.trim());
1424
1424
  r[1] = u.shift(), c = u, d = !0;
1425
1425
  }
1426
- if (s = a(i.call(this, r[1].trim(), o), o), s && r[0] === e && !H(s)) return s;
1427
- H(s) || (s = lr(s)), s || (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), s = ""), d && (s = c.reduce((u, p) => this.format(u, p, n.lng, {
1426
+ if (s = a(i.call(this, r[1].trim(), o), o), s && r[0] === e && !Y(s)) return s;
1427
+ Y(s) || (s = lr(s)), s || (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), s = ""), d && (s = c.reduce((u, p) => this.format(u, p, n.lng, {
1428
1428
  ...n,
1429
1429
  interpolationkey: r[1].trim()
1430
1430
  }), s.trim())), e = e.replace(r[0], s), this.regexp.lastIndex = 0;
@@ -1631,7 +1631,7 @@ class hi extends rn {
1631
1631
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 ? arguments[3] : void 0;
1632
1632
  if (!this.backend)
1633
1633
  return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1634
- H(e) && (e = this.languageUtils.toResolveHierarchy(e)), H(a) && (a = [a]);
1634
+ Y(e) && (e = this.languageUtils.toResolveHierarchy(e)), Y(a) && (a = [a]);
1635
1635
  const s = this.queueLoad(e, a, n, r);
1636
1636
  if (!s.toLoad.length)
1637
1637
  return s.pending.length || r(), null;
@@ -1716,7 +1716,7 @@ const br = () => ({
1716
1716
  appendNamespaceToCIMode: !1,
1717
1717
  overloadTranslationOptionHandler: (t) => {
1718
1718
  let e = {};
1719
- if (typeof t[1] == "object" && (e = t[1]), H(t[1]) && (e.defaultValue = t[1]), H(t[2]) && (e.tDescription = t[2]), typeof t[2] == "object" || typeof t[3] == "object") {
1719
+ if (typeof t[1] == "object" && (e = t[1]), Y(t[1]) && (e.defaultValue = t[1]), Y(t[2]) && (e.tDescription = t[2]), typeof t[2] == "object" || typeof t[3] == "object") {
1720
1720
  const a = t[3] || t[2];
1721
1721
  Object.keys(a).forEach((n) => {
1722
1722
  e[n] = a[n];
@@ -1737,7 +1737,7 @@ const br = () => ({
1737
1737
  maxReplaces: 1e3,
1738
1738
  skipOnVariables: !0
1739
1739
  }
1740
- }), yr = (t) => (H(t.ns) && (t.ns = [t.ns]), H(t.fallbackLng) && (t.fallbackLng = [t.fallbackLng]), H(t.fallbackNS) && (t.fallbackNS = [t.fallbackNS]), t.supportedLngs && t.supportedLngs.indexOf("cimode") < 0 && (t.supportedLngs = t.supportedLngs.concat(["cimode"])), t), Ra = () => {
1740
+ }), yr = (t) => (Y(t.ns) && (t.ns = [t.ns]), Y(t.fallbackLng) && (t.fallbackLng = [t.fallbackLng]), Y(t.fallbackNS) && (t.fallbackNS = [t.fallbackNS]), t.supportedLngs && t.supportedLngs.indexOf("cimode") < 0 && (t.supportedLngs = t.supportedLngs.concat(["cimode"])), t), Ra = () => {
1741
1741
  }, gi = (t) => {
1742
1742
  Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((a) => {
1743
1743
  typeof t[a] == "function" && (t[a] = t[a].bind(t));
@@ -1759,7 +1759,7 @@ class ca extends rn {
1759
1759
  init() {
1760
1760
  var e = this;
1761
1761
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
1762
- this.isInitializing = !0, typeof a == "function" && (n = a, a = {}), !a.defaultNS && a.defaultNS !== !1 && a.ns && (H(a.ns) ? a.defaultNS = a.ns : a.ns.indexOf("translation") < 0 && (a.defaultNS = a.ns[0]));
1762
+ this.isInitializing = !0, typeof a == "function" && (n = a, a = {}), !a.defaultNS && a.defaultNS !== !1 && a.ns && (Y(a.ns) ? a.defaultNS = a.ns : a.ns.indexOf("translation") < 0 && (a.defaultNS = a.ns[0]));
1763
1763
  const r = br();
1764
1764
  this.options = {
1765
1765
  ...r,
@@ -1819,7 +1819,7 @@ class ca extends rn {
1819
1819
  }
1820
1820
  loadResources(e) {
1821
1821
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ra;
1822
- const r = H(e) ? e : this.language;
1822
+ const r = Y(e) ? e : this.language;
1823
1823
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1824
1824
  if (r && r.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1825
1825
  const s = [], o = (i) => {
@@ -1870,7 +1870,7 @@ class ca extends rn {
1870
1870
  });
1871
1871
  }, i = (c) => {
1872
1872
  !e && !c && this.services.languageDetector && (c = []);
1873
- const d = H(c) ? c : this.services.languageUtils.getBestMatchFromCodes(c);
1873
+ const d = Y(c) ? c : this.services.languageUtils.getBestMatchFromCodes(c);
1874
1874
  d && (this.language || s(d), this.translator.language || this.translator.changeLanguage(d), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(d)), this.loadResources(d, (u) => {
1875
1875
  o(u, d);
1876
1876
  });
@@ -1894,7 +1894,7 @@ class ca extends rn {
1894
1894
  let g;
1895
1895
  return c.keyPrefix && Array.isArray(o) ? g = o.map((f) => `${c.keyPrefix}${h}${f}`) : g = c.keyPrefix ? `${c.keyPrefix}${h}${o}` : o, r.t(g, c);
1896
1896
  };
1897
- return H(e) ? s.lng = e : s.lngs = e, s.ns = a, s.keyPrefix = n, s;
1897
+ return Y(e) ? s.lng = e : s.lngs = e, s.ns = a, s.keyPrefix = n, s;
1898
1898
  }
1899
1899
  t() {
1900
1900
  return this.translator && this.translator.translate(...arguments);
@@ -1925,7 +1925,7 @@ class ca extends rn {
1925
1925
  }
1926
1926
  loadNamespaces(e, a) {
1927
1927
  const n = oa();
1928
- return this.options.ns ? (H(e) && (e = [e]), e.forEach((r) => {
1928
+ return this.options.ns ? (Y(e) && (e = [e]), e.forEach((r) => {
1929
1929
  this.options.ns.indexOf(r) < 0 && this.options.ns.push(r);
1930
1930
  }), this.loadResources((r) => {
1931
1931
  n.resolve(), a && a(r);
@@ -1933,7 +1933,7 @@ class ca extends rn {
1933
1933
  }
1934
1934
  loadLanguages(e, a) {
1935
1935
  const n = oa();
1936
- H(e) && (e = [e]);
1936
+ Y(e) && (e = [e]);
1937
1937
  const r = this.options.preload || [], s = e.filter((o) => r.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o));
1938
1938
  return s.length ? (this.options.preload = r.concat(s), this.loadResources((o) => {
1939
1939
  n.resolve(), a && a(o);
@@ -3286,7 +3286,7 @@ Pn.use(Vo).init({
3286
3286
  const sn = Br(null), Ci = { capture: () => {
3287
3287
  } };
3288
3288
  function Ni(t) {
3289
- const [e, a] = X(
3289
+ const [e, a] = ee(
3290
3290
  () => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches
3291
3291
  );
3292
3292
  return Oe(() => {
@@ -3314,9 +3314,9 @@ const Rc = ({
3314
3314
  refreshInterval: f = 3e4,
3315
3315
  children: w
3316
3316
  }) => {
3317
- const N = u || "default", [v] = X(
3317
+ const N = u || "default", [v] = ee(
3318
3318
  () => new uo({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
3319
- ), C = Ni(r), k = Le(() => Co(e), [e]);
3319
+ ), C = Ni(r), S = Le(() => Co(e), [e]);
3320
3320
  Oe(() => {
3321
3321
  if (!p || typeof window > "u")
3322
3322
  return;
@@ -3328,7 +3328,7 @@ const Rc = ({
3328
3328
  window.localStorage.removeItem(_);
3329
3329
  }
3330
3330
  let L = null;
3331
- const U = v.getQueryCache().subscribe((R) => {
3331
+ const F = v.getQueryCache().subscribe((R) => {
3332
3332
  R.type !== "added" && R.type !== "removed" && R.type !== "updated" || (L && clearTimeout(L), L = setTimeout(() => {
3333
3333
  try {
3334
3334
  window.localStorage.setItem(_, JSON.stringify(mo(v)));
@@ -3337,17 +3337,17 @@ const Rc = ({
3337
3337
  }, 250));
3338
3338
  });
3339
3339
  return () => {
3340
- L && clearTimeout(L), U();
3340
+ L && clearTimeout(L), F();
3341
3341
  };
3342
3342
  }, [p, N, v]);
3343
- const I = wt(() => v.invalidateQueries({ queryKey: ["bpb", N] }), [v, N]), S = wt((_) => g == null ? void 0 : g(_), [g]), T = f > 0 ? f : !1;
3343
+ const A = wt(() => v.invalidateQueries({ queryKey: ["bpb", N] }), [v, N]), T = wt((_) => g == null ? void 0 : g(_), [g]), k = f > 0 ? f : !1;
3344
3344
  Pn.changeLanguage(n);
3345
- const A = Le(
3345
+ const I = Le(
3346
3346
  () => ({
3347
3347
  client: t,
3348
3348
  queryClient: v,
3349
3349
  scope: N,
3350
- stripePromise: k,
3350
+ stripePromise: S,
3351
3351
  email: a,
3352
3352
  locale: n,
3353
3353
  isDark: C,
@@ -3358,15 +3358,15 @@ const Rc = ({
3358
3358
  featureLabels: c,
3359
3359
  isOutdatedBilling: d !== void 0 && d !== "v4",
3360
3360
  manageBillingUrl: h,
3361
- refetchInterval: T,
3362
- refresh: I,
3363
- notifyBillingChange: S
3361
+ refetchInterval: k,
3362
+ refresh: A,
3363
+ notifyBillingChange: T
3364
3364
  }),
3365
3365
  [
3366
3366
  t,
3367
3367
  v,
3368
3368
  N,
3369
- k,
3369
+ S,
3370
3370
  a,
3371
3371
  n,
3372
3372
  C,
@@ -3376,12 +3376,12 @@ const Rc = ({
3376
3376
  c,
3377
3377
  d,
3378
3378
  h,
3379
- T,
3380
- I,
3381
- S
3379
+ k,
3380
+ A,
3381
+ T
3382
3382
  ]
3383
3383
  );
3384
- return /* @__PURE__ */ l(sn.Provider, { value: A, children: /* @__PURE__ */ l(Go, { i18n: Pn, children: /* @__PURE__ */ l(
3384
+ return /* @__PURE__ */ l(sn.Provider, { value: I, children: /* @__PURE__ */ l(Go, { i18n: Pn, children: /* @__PURE__ */ l(
3385
3385
  "div",
3386
3386
  {
3387
3387
  className: "bpb-scope",
@@ -3392,7 +3392,7 @@ const Rc = ({
3392
3392
  }
3393
3393
  ) }) });
3394
3394
  };
3395
- function se() {
3395
+ function oe() {
3396
3396
  const t = Sa(sn);
3397
3397
  if (!t)
3398
3398
  throw new Error("@bpinternal/billing-ui components must be rendered inside <BillingProvider>");
@@ -3443,15 +3443,15 @@ const we = {
3443
3443
  usageByBot: (t, e, a) => ["bpb", t, "usage-by-bot", e, a]
3444
3444
  };
3445
3445
  function dt() {
3446
- const { client: t, queryClient: e, scope: a } = se();
3446
+ const { client: t, queryClient: e, scope: a } = oe();
3447
3447
  return et({ queryKey: Pe.plans(a), queryFn: () => t.listPlans({}) }, e);
3448
3448
  }
3449
3449
  function Ht() {
3450
- const { client: t, queryClient: e, scope: a } = se();
3450
+ const { client: t, queryClient: e, scope: a } = oe();
3451
3451
  return et({ queryKey: Pe.addons(a), queryFn: () => t.listAddons({}) }, e);
3452
3452
  }
3453
3453
  function tt(t) {
3454
- const { client: e, queryClient: a, scope: n, refetchInterval: r } = se();
3454
+ const { client: e, queryClient: a, scope: n, refetchInterval: r } = oe();
3455
3455
  return et(
3456
3456
  {
3457
3457
  queryKey: Pe.subscription(n),
@@ -3463,7 +3463,7 @@ function tt(t) {
3463
3463
  );
3464
3464
  }
3465
3465
  function Jr(t, e) {
3466
- const { client: a, queryClient: n, scope: r } = se();
3466
+ const { client: a, queryClient: n, scope: r } = oe();
3467
3467
  return et(
3468
3468
  {
3469
3469
  queryKey: Pe.preview(r, t),
@@ -3474,7 +3474,7 @@ function Jr(t, e) {
3474
3474
  );
3475
3475
  }
3476
3476
  function Qr(t) {
3477
- const { client: e, queryClient: a, scope: n } = se();
3477
+ const { client: e, queryClient: a, scope: n } = oe();
3478
3478
  return et(
3479
3479
  {
3480
3480
  queryKey: Pe.paymentMethod(n),
@@ -3485,7 +3485,7 @@ function Qr(t) {
3485
3485
  );
3486
3486
  }
3487
3487
  function Xr(t) {
3488
- const { client: e, queryClient: a, scope: n } = se();
3488
+ const { client: e, queryClient: a, scope: n } = oe();
3489
3489
  return et(
3490
3490
  {
3491
3491
  queryKey: Pe.customer(n),
@@ -3496,7 +3496,7 @@ function Xr(t) {
3496
3496
  );
3497
3497
  }
3498
3498
  function Si(t) {
3499
- const { client: e, queryClient: a, scope: n, refetchInterval: r } = se();
3499
+ const { client: e, queryClient: a, scope: n, refetchInterval: r } = oe();
3500
3500
  return et(
3501
3501
  {
3502
3502
  queryKey: Pe.invoices(n),
@@ -3508,7 +3508,7 @@ function Si(t) {
3508
3508
  );
3509
3509
  }
3510
3510
  function es(t) {
3511
- const { client: e, queryClient: a, scope: n } = se();
3511
+ const { client: e, queryClient: a, scope: n } = oe();
3512
3512
  return et(
3513
3513
  {
3514
3514
  queryKey: Pe.readonly(n),
@@ -3519,7 +3519,7 @@ function es(t) {
3519
3519
  );
3520
3520
  }
3521
3521
  function Yt(t) {
3522
- const { client: e, queryClient: a, scope: n, refetchInterval: r } = se(), s = t != null && t.period ? new Date(t.period) : /* @__PURE__ */ new Date(), o = `${s.getUTCFullYear()}-${String(s.getUTCMonth() + 1).padStart(2, "0")}`;
3522
+ const { client: e, queryClient: a, scope: n, refetchInterval: r } = oe(), s = t != null && t.period ? new Date(t.period) : /* @__PURE__ */ new Date(), o = `${s.getUTCFullYear()}-${String(s.getUTCMonth() + 1).padStart(2, "0")}`;
3523
3523
  return et(
3524
3524
  {
3525
3525
  queryKey: Pe.usages(n, o),
@@ -3532,7 +3532,7 @@ function Yt(t) {
3532
3532
  );
3533
3533
  }
3534
3534
  function Ti(t, e) {
3535
- const { client: a, queryClient: n, scope: r, refetchInterval: s } = se(), o = a.breakDownWorkspaceUsageByBot, i = a.listBots, c = typeof o == "function" && typeof i == "function", d = e != null && e.period ? new Date(e.period) : /* @__PURE__ */ new Date(), u = `${d.getUTCFullYear()}-${String(d.getUTCMonth() + 1).padStart(2, "0")}`;
3535
+ const { client: a, queryClient: n, scope: r, refetchInterval: s } = oe(), o = a.breakDownWorkspaceUsageByBot, i = a.listBots, c = typeof o == "function" && typeof i == "function", d = e != null && e.period ? new Date(e.period) : /* @__PURE__ */ new Date(), u = `${d.getUTCFullYear()}-${String(d.getUTCMonth() + 1).padStart(2, "0")}`;
3536
3536
  return et(
3537
3537
  {
3538
3538
  queryKey: Pe.usageByBot(r, t, u),
@@ -3550,15 +3550,15 @@ function Ti(t, e) {
3550
3550
  );
3551
3551
  }
3552
3552
  function Ii() {
3553
- const { client: t } = se();
3553
+ const { client: t } = oe();
3554
3554
  return typeof t.breakDownWorkspaceUsageByBot == "function" && typeof t.listBots == "function";
3555
3555
  }
3556
3556
  function ts() {
3557
- const { client: t, queryClient: e } = se();
3557
+ const { client: t, queryClient: e } = oe();
3558
3558
  return ka({ mutationFn: () => t.createPaymentMethodIntent({}) }, e);
3559
3559
  }
3560
3560
  function as() {
3561
- const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = se();
3561
+ const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = oe();
3562
3562
  return ka(
3563
3563
  {
3564
3564
  mutationFn: (r) => t.setPaymentMethod(r),
@@ -3570,7 +3570,7 @@ function as() {
3570
3570
  );
3571
3571
  }
3572
3572
  function ns() {
3573
- const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = se();
3573
+ const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = oe();
3574
3574
  return ka(
3575
3575
  {
3576
3576
  mutationFn: (r) => t.setCustomer(r),
@@ -3582,7 +3582,7 @@ function ns() {
3582
3582
  );
3583
3583
  }
3584
3584
  function Ai() {
3585
- const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = se();
3585
+ const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = oe();
3586
3586
  return ka(
3587
3587
  {
3588
3588
  mutationFn: async (r) => {
@@ -3600,7 +3600,7 @@ function Ai() {
3600
3600
  );
3601
3601
  }
3602
3602
  function rs() {
3603
- const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = se();
3603
+ const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = oe();
3604
3604
  return ka(
3605
3605
  {
3606
3606
  mutationFn: async (r) => {
@@ -3863,8 +3863,8 @@ const Pi = (t, e) => {
3863
3863
  }
3864
3864
  let v = !!N, C;
3865
3865
  if (v) {
3866
- const A = w.substring(0, N);
3867
- C = n(A);
3866
+ const I = w.substring(0, N);
3867
+ C = n(I);
3868
3868
  const _ = C && o[C] ? n(w) : void 0;
3869
3869
  _ && _ !== C && (C = _, v = !1);
3870
3870
  } else
@@ -3880,14 +3880,14 @@ const Pi = (t, e) => {
3880
3880
  }
3881
3881
  v = !1;
3882
3882
  }
3883
- const k = g.length === 0 ? "" : g.length === 1 ? g[0] : s(g).join(":"), I = f ? k + Dn : k, S = I + C;
3884
- if (i.indexOf(S) > -1)
3883
+ const S = g.length === 0 ? "" : g.length === 1 ? g[0] : s(g).join(":"), A = f ? S + Dn : S, T = A + C;
3884
+ if (i.indexOf(T) > -1)
3885
3885
  continue;
3886
- i.push(S);
3887
- const T = r(C, v);
3888
- for (let A = 0; A < T.length; ++A) {
3889
- const _ = T[A];
3890
- i.push(I + _);
3886
+ i.push(T);
3887
+ const k = r(C, v);
3888
+ for (let I = 0; I < k.length; ++I) {
3889
+ const _ = k[I];
3890
+ i.push(A + _);
3891
3891
  }
3892
3892
  d = p + (d.length > 0 ? " " + d : d);
3893
3893
  }
@@ -3920,19 +3920,19 @@ const Pi = (t, e) => {
3920
3920
  }, Qi = [], Te = (t) => {
3921
3921
  const e = (a) => a[t] || Qi;
3922
3922
  return e.isThemeGetter = !0, e;
3923
- }, cs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, us = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xi = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, el = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, al = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, nl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, rl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ut = (t) => Xi.test(t), re = (t) => !!t && !Number.isNaN(Number(t)), Ke = (t) => !!t && Number.isInteger(Number(t)), kn = (t) => t.endsWith("%") && re(t.slice(0, -1)), rt = (t) => el.test(t), ps = () => !0, sl = (t) => (
3923
+ }, cs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, us = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xi = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, el = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, al = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, nl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, rl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ut = (t) => Xi.test(t), se = (t) => !!t && !Number.isNaN(Number(t)), Ke = (t) => !!t && Number.isInteger(Number(t)), kn = (t) => t.endsWith("%") && se(t.slice(0, -1)), rt = (t) => el.test(t), ps = () => !0, sl = (t) => (
3924
3924
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
3925
3925
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
3926
3926
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
3927
3927
  tl.test(t) && !al.test(t)
3928
- ), zn = () => !1, ol = (t) => nl.test(t), il = (t) => rl.test(t), ll = (t) => !M(t) && !B(t), dl = (t) => t.startsWith("@container") && (t[10] === "/" && t[11] !== void 0 || t[11] === "s" && t[16] !== void 0 && t.startsWith("-size/", 10) || t[11] === "n" && t[18] !== void 0 && t.startsWith("-normal/", 10)), cl = (t) => vt(t, gs, zn), M = (t) => cs.test(t), Ct = (t) => vt(t, fs, sl), Nr = (t) => vt(t, yl, re), ul = (t) => vt(t, ys, ps), pl = (t) => vt(t, bs, zn), wr = (t) => vt(t, ms, zn), ml = (t) => vt(t, hs, il), Oa = (t) => vt(t, vs, ol), B = (t) => us.test(t), ia = (t) => It(t, fs), hl = (t) => It(t, bs), kr = (t) => It(t, ms), gl = (t) => It(t, gs), fl = (t) => It(t, hs), Fa = (t) => It(t, vs, !0), bl = (t) => It(t, ys, !0), vt = (t, e, a) => {
3928
+ ), zn = () => !1, ol = (t) => nl.test(t), il = (t) => rl.test(t), ll = (t) => !M(t) && !B(t), dl = (t) => t.startsWith("@container") && (t[10] === "/" && t[11] !== void 0 || t[11] === "s" && t[16] !== void 0 && t.startsWith("-size/", 10) || t[11] === "n" && t[18] !== void 0 && t.startsWith("-normal/", 10)), cl = (t) => vt(t, gs, zn), M = (t) => cs.test(t), Ct = (t) => vt(t, fs, sl), Nr = (t) => vt(t, yl, se), ul = (t) => vt(t, ys, ps), pl = (t) => vt(t, bs, zn), wr = (t) => vt(t, ms, zn), ml = (t) => vt(t, hs, il), Oa = (t) => vt(t, vs, ol), B = (t) => us.test(t), ia = (t) => It(t, fs), hl = (t) => It(t, bs), kr = (t) => It(t, ms), gl = (t) => It(t, gs), fl = (t) => It(t, hs), Fa = (t) => It(t, vs, !0), bl = (t) => It(t, ys, !0), vt = (t, e, a) => {
3929
3929
  const n = cs.exec(t);
3930
3930
  return n ? n[1] ? e(n[1]) : a(n[2]) : !1;
3931
3931
  }, It = (t, e, a = !1) => {
3932
3932
  const n = us.exec(t);
3933
3933
  return n ? n[1] ? e(n[1]) : a : !1;
3934
3934
  }, ms = (t) => t === "position" || t === "percentage", hs = (t) => t === "image" || t === "url", gs = (t) => t === "length" || t === "size" || t === "bg-size", fs = (t) => t === "length", yl = (t) => t === "number", bs = (t) => t === "family-name", ys = (t) => t === "number" || t === "weight", vs = (t) => t === "shadow", vl = () => {
3935
- const t = Te("color"), e = Te("font"), a = Te("text"), n = Te("font-weight"), r = Te("tracking"), s = Te("leading"), o = Te("breakpoint"), i = Te("container"), c = Te("spacing"), d = Te("radius"), u = Te("shadow"), p = Te("inset-shadow"), h = Te("text-shadow"), g = Te("drop-shadow"), f = Te("blur"), w = Te("perspective"), N = Te("aspect"), v = Te("ease"), C = Te("animate"), k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], I = () => [
3935
+ const t = Te("color"), e = Te("font"), a = Te("text"), n = Te("font-weight"), r = Te("tracking"), s = Te("leading"), o = Te("breakpoint"), i = Te("container"), c = Te("spacing"), d = Te("radius"), u = Te("shadow"), p = Te("inset-shadow"), h = Te("text-shadow"), g = Te("drop-shadow"), f = Te("blur"), w = Te("perspective"), N = Te("aspect"), v = Te("ease"), C = Te("animate"), S = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], A = () => [
3936
3936
  "center",
3937
3937
  "top",
3938
3938
  "bottom",
@@ -3950,15 +3950,15 @@ const Pi = (t, e) => {
3950
3950
  "bottom-left",
3951
3951
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
3952
3952
  "left-bottom"
3953
- ], S = () => [...I(), B, M], T = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", "contain", "none"], _ = () => [B, M, c], L = () => [ut, "full", "auto", ..._()], U = () => [Ke, "none", "subgrid", B, M], R = () => ["auto", {
3953
+ ], T = () => [...A(), B, M], k = () => ["auto", "hidden", "clip", "visible", "scroll"], I = () => ["auto", "contain", "none"], _ = () => [B, M, c], L = () => [ut, "full", "auto", ..._()], F = () => [Ke, "none", "subgrid", B, M], R = () => ["auto", {
3954
3954
  span: ["full", Ke, B, M]
3955
- }, Ke, B, M], V = () => [Ke, "auto", B, M], j = () => ["auto", "min", "max", "fr", B, M], $ = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ..._()], ie = () => [ut, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ..._()], oe = () => [ut, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ..._()], ne = () => [ut, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ..._()], P = () => [t, B, M], Y = () => [...I(), kr, wr, {
3955
+ }, Ke, B, M], Z = () => [Ke, "auto", B, M], j = () => ["auto", "min", "max", "fr", B, M], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], U = () => ["auto", ..._()], H = () => [ut, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ..._()], ie = () => [ut, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ..._()], re = () => [ut, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ..._()], P = () => [t, B, M], J = () => [...A(), kr, wr, {
3956
3956
  position: [B, M]
3957
3957
  }], me = () => ["no-repeat", {
3958
3958
  repeat: ["", "x", "y", "space", "round"]
3959
3959
  }], ue = () => ["auto", "cover", "contain", gl, cl, {
3960
3960
  size: [B, M]
3961
- }], F = () => [kn, ia, Ct], G = () => [
3961
+ }], O = () => [kn, ia, Ct], K = () => [
3962
3962
  // Deprecated since Tailwind CSS v4.0.0
3963
3963
  "",
3964
3964
  "none",
@@ -3966,14 +3966,14 @@ const Pi = (t, e) => {
3966
3966
  d,
3967
3967
  B,
3968
3968
  M
3969
- ], q = () => ["", re, ia, Ct], x = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Q = () => [re, kn, kr, wr], le = () => [
3969
+ ], q = () => ["", se, ia, Ct], x = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], X = () => [se, kn, kr, wr], le = () => [
3970
3970
  // Deprecated since Tailwind CSS v4.0.0
3971
3971
  "",
3972
3972
  "none",
3973
3973
  f,
3974
3974
  B,
3975
3975
  M
3976
- ], ke = () => ["none", re, B, M], J = () => ["none", re, B, M], Ne = () => [re, B, M], te = () => [ut, "full", ..._()];
3976
+ ], ke = () => ["none", se, B, M], Q = () => ["none", se, B, M], Ne = () => [se, B, M], ae = () => [ut, "full", ..._()];
3977
3977
  return {
3978
3978
  cacheSize: 500,
3979
3979
  theme: {
@@ -3992,7 +3992,7 @@ const Pi = (t, e) => {
3992
3992
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
3993
3993
  radius: [rt],
3994
3994
  shadow: [rt],
3995
- spacing: ["px", re],
3995
+ spacing: ["px", se],
3996
3996
  text: [rt],
3997
3997
  "text-shadow": [rt],
3998
3998
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
@@ -4031,21 +4031,21 @@ const Pi = (t, e) => {
4031
4031
  * @see https://tailwindcss.com/docs/columns
4032
4032
  */
4033
4033
  columns: [{
4034
- columns: [re, M, B, i]
4034
+ columns: [se, M, B, i]
4035
4035
  }],
4036
4036
  /**
4037
4037
  * Break After
4038
4038
  * @see https://tailwindcss.com/docs/break-after
4039
4039
  */
4040
4040
  "break-after": [{
4041
- "break-after": k()
4041
+ "break-after": S()
4042
4042
  }],
4043
4043
  /**
4044
4044
  * Break Before
4045
4045
  * @see https://tailwindcss.com/docs/break-before
4046
4046
  */
4047
4047
  "break-before": [{
4048
- "break-before": k()
4048
+ "break-before": S()
4049
4049
  }],
4050
4050
  /**
4051
4051
  * Break Inside
@@ -4109,49 +4109,49 @@ const Pi = (t, e) => {
4109
4109
  * @see https://tailwindcss.com/docs/object-position
4110
4110
  */
4111
4111
  "object-position": [{
4112
- object: S()
4112
+ object: T()
4113
4113
  }],
4114
4114
  /**
4115
4115
  * Overflow
4116
4116
  * @see https://tailwindcss.com/docs/overflow
4117
4117
  */
4118
4118
  overflow: [{
4119
- overflow: T()
4119
+ overflow: k()
4120
4120
  }],
4121
4121
  /**
4122
4122
  * Overflow X
4123
4123
  * @see https://tailwindcss.com/docs/overflow
4124
4124
  */
4125
4125
  "overflow-x": [{
4126
- "overflow-x": T()
4126
+ "overflow-x": k()
4127
4127
  }],
4128
4128
  /**
4129
4129
  * Overflow Y
4130
4130
  * @see https://tailwindcss.com/docs/overflow
4131
4131
  */
4132
4132
  "overflow-y": [{
4133
- "overflow-y": T()
4133
+ "overflow-y": k()
4134
4134
  }],
4135
4135
  /**
4136
4136
  * Overscroll Behavior
4137
4137
  * @see https://tailwindcss.com/docs/overscroll-behavior
4138
4138
  */
4139
4139
  overscroll: [{
4140
- overscroll: A()
4140
+ overscroll: I()
4141
4141
  }],
4142
4142
  /**
4143
4143
  * Overscroll Behavior X
4144
4144
  * @see https://tailwindcss.com/docs/overscroll-behavior
4145
4145
  */
4146
4146
  "overscroll-x": [{
4147
- "overscroll-x": A()
4147
+ "overscroll-x": I()
4148
4148
  }],
4149
4149
  /**
4150
4150
  * Overscroll Behavior Y
4151
4151
  * @see https://tailwindcss.com/docs/overscroll-behavior
4152
4152
  */
4153
4153
  "overscroll-y": [{
4154
- "overscroll-y": A()
4154
+ "overscroll-y": I()
4155
4155
  }],
4156
4156
  /**
4157
4157
  * Position
@@ -4288,21 +4288,21 @@ const Pi = (t, e) => {
4288
4288
  * @see https://tailwindcss.com/docs/flex
4289
4289
  */
4290
4290
  flex: [{
4291
- flex: [re, ut, "auto", "initial", "none", M]
4291
+ flex: [se, ut, "auto", "initial", "none", M]
4292
4292
  }],
4293
4293
  /**
4294
4294
  * Flex Grow
4295
4295
  * @see https://tailwindcss.com/docs/flex-grow
4296
4296
  */
4297
4297
  grow: [{
4298
- grow: ["", re, B, M]
4298
+ grow: ["", se, B, M]
4299
4299
  }],
4300
4300
  /**
4301
4301
  * Flex Shrink
4302
4302
  * @see https://tailwindcss.com/docs/flex-shrink
4303
4303
  */
4304
4304
  shrink: [{
4305
- shrink: ["", re, B, M]
4305
+ shrink: ["", se, B, M]
4306
4306
  }],
4307
4307
  /**
4308
4308
  * Order
@@ -4316,7 +4316,7 @@ const Pi = (t, e) => {
4316
4316
  * @see https://tailwindcss.com/docs/grid-template-columns
4317
4317
  */
4318
4318
  "grid-cols": [{
4319
- "grid-cols": U()
4319
+ "grid-cols": F()
4320
4320
  }],
4321
4321
  /**
4322
4322
  * Grid Column Start / End
@@ -4330,21 +4330,21 @@ const Pi = (t, e) => {
4330
4330
  * @see https://tailwindcss.com/docs/grid-column
4331
4331
  */
4332
4332
  "col-start": [{
4333
- "col-start": V()
4333
+ "col-start": Z()
4334
4334
  }],
4335
4335
  /**
4336
4336
  * Grid Column End
4337
4337
  * @see https://tailwindcss.com/docs/grid-column
4338
4338
  */
4339
4339
  "col-end": [{
4340
- "col-end": V()
4340
+ "col-end": Z()
4341
4341
  }],
4342
4342
  /**
4343
4343
  * Grid Template Rows
4344
4344
  * @see https://tailwindcss.com/docs/grid-template-rows
4345
4345
  */
4346
4346
  "grid-rows": [{
4347
- "grid-rows": U()
4347
+ "grid-rows": F()
4348
4348
  }],
4349
4349
  /**
4350
4350
  * Grid Row Start / End
@@ -4358,14 +4358,14 @@ const Pi = (t, e) => {
4358
4358
  * @see https://tailwindcss.com/docs/grid-row
4359
4359
  */
4360
4360
  "row-start": [{
4361
- "row-start": V()
4361
+ "row-start": Z()
4362
4362
  }],
4363
4363
  /**
4364
4364
  * Grid Row End
4365
4365
  * @see https://tailwindcss.com/docs/grid-row
4366
4366
  */
4367
4367
  "row-end": [{
4368
- "row-end": V()
4368
+ "row-end": Z()
4369
4369
  }],
4370
4370
  /**
4371
4371
  * Grid Auto Flow
@@ -4414,7 +4414,7 @@ const Pi = (t, e) => {
4414
4414
  * @see https://tailwindcss.com/docs/justify-content
4415
4415
  */
4416
4416
  "justify-content": [{
4417
- justify: [...$(), "normal"]
4417
+ justify: [...G(), "normal"]
4418
4418
  }],
4419
4419
  /**
4420
4420
  * Justify Items
@@ -4435,7 +4435,7 @@ const Pi = (t, e) => {
4435
4435
  * @see https://tailwindcss.com/docs/align-content
4436
4436
  */
4437
4437
  "align-content": [{
4438
- content: ["normal", ...$()]
4438
+ content: ["normal", ...G()]
4439
4439
  }],
4440
4440
  /**
4441
4441
  * Align Items
@@ -4460,7 +4460,7 @@ const Pi = (t, e) => {
4460
4460
  * @see https://tailwindcss.com/docs/place-content
4461
4461
  */
4462
4462
  "place-content": [{
4463
- "place-content": $()
4463
+ "place-content": G()
4464
4464
  }],
4465
4465
  /**
4466
4466
  * Place Items
@@ -4559,77 +4559,77 @@ const Pi = (t, e) => {
4559
4559
  * @see https://tailwindcss.com/docs/margin
4560
4560
  */
4561
4561
  m: [{
4562
- m: O()
4562
+ m: U()
4563
4563
  }],
4564
4564
  /**
4565
4565
  * Margin Inline
4566
4566
  * @see https://tailwindcss.com/docs/margin
4567
4567
  */
4568
4568
  mx: [{
4569
- mx: O()
4569
+ mx: U()
4570
4570
  }],
4571
4571
  /**
4572
4572
  * Margin Block
4573
4573
  * @see https://tailwindcss.com/docs/margin
4574
4574
  */
4575
4575
  my: [{
4576
- my: O()
4576
+ my: U()
4577
4577
  }],
4578
4578
  /**
4579
4579
  * Margin Inline Start
4580
4580
  * @see https://tailwindcss.com/docs/margin
4581
4581
  */
4582
4582
  ms: [{
4583
- ms: O()
4583
+ ms: U()
4584
4584
  }],
4585
4585
  /**
4586
4586
  * Margin Inline End
4587
4587
  * @see https://tailwindcss.com/docs/margin
4588
4588
  */
4589
4589
  me: [{
4590
- me: O()
4590
+ me: U()
4591
4591
  }],
4592
4592
  /**
4593
4593
  * Margin Block Start
4594
4594
  * @see https://tailwindcss.com/docs/margin
4595
4595
  */
4596
4596
  mbs: [{
4597
- mbs: O()
4597
+ mbs: U()
4598
4598
  }],
4599
4599
  /**
4600
4600
  * Margin Block End
4601
4601
  * @see https://tailwindcss.com/docs/margin
4602
4602
  */
4603
4603
  mbe: [{
4604
- mbe: O()
4604
+ mbe: U()
4605
4605
  }],
4606
4606
  /**
4607
4607
  * Margin Top
4608
4608
  * @see https://tailwindcss.com/docs/margin
4609
4609
  */
4610
4610
  mt: [{
4611
- mt: O()
4611
+ mt: U()
4612
4612
  }],
4613
4613
  /**
4614
4614
  * Margin Right
4615
4615
  * @see https://tailwindcss.com/docs/margin
4616
4616
  */
4617
4617
  mr: [{
4618
- mr: O()
4618
+ mr: U()
4619
4619
  }],
4620
4620
  /**
4621
4621
  * Margin Bottom
4622
4622
  * @see https://tailwindcss.com/docs/margin
4623
4623
  */
4624
4624
  mb: [{
4625
- mb: O()
4625
+ mb: U()
4626
4626
  }],
4627
4627
  /**
4628
4628
  * Margin Left
4629
4629
  * @see https://tailwindcss.com/docs/margin
4630
4630
  */
4631
4631
  ml: [{
4632
- ml: O()
4632
+ ml: U()
4633
4633
  }],
4634
4634
  /**
4635
4635
  * Space Between X
@@ -4663,56 +4663,56 @@ const Pi = (t, e) => {
4663
4663
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
4664
4664
  */
4665
4665
  size: [{
4666
- size: ie()
4666
+ size: H()
4667
4667
  }],
4668
4668
  /**
4669
4669
  * Inline Size
4670
4670
  * @see https://tailwindcss.com/docs/width
4671
4671
  */
4672
4672
  "inline-size": [{
4673
- inline: ["auto", ...oe()]
4673
+ inline: ["auto", ...ie()]
4674
4674
  }],
4675
4675
  /**
4676
4676
  * Min-Inline Size
4677
4677
  * @see https://tailwindcss.com/docs/min-width
4678
4678
  */
4679
4679
  "min-inline-size": [{
4680
- "min-inline": ["auto", ...oe()]
4680
+ "min-inline": ["auto", ...ie()]
4681
4681
  }],
4682
4682
  /**
4683
4683
  * Max-Inline Size
4684
4684
  * @see https://tailwindcss.com/docs/max-width
4685
4685
  */
4686
4686
  "max-inline-size": [{
4687
- "max-inline": ["none", ...oe()]
4687
+ "max-inline": ["none", ...ie()]
4688
4688
  }],
4689
4689
  /**
4690
4690
  * Block Size
4691
4691
  * @see https://tailwindcss.com/docs/height
4692
4692
  */
4693
4693
  "block-size": [{
4694
- block: ["auto", ...ne()]
4694
+ block: ["auto", ...re()]
4695
4695
  }],
4696
4696
  /**
4697
4697
  * Min-Block Size
4698
4698
  * @see https://tailwindcss.com/docs/min-height
4699
4699
  */
4700
4700
  "min-block-size": [{
4701
- "min-block": ["auto", ...ne()]
4701
+ "min-block": ["auto", ...re()]
4702
4702
  }],
4703
4703
  /**
4704
4704
  * Max-Block Size
4705
4705
  * @see https://tailwindcss.com/docs/max-height
4706
4706
  */
4707
4707
  "max-block-size": [{
4708
- "max-block": ["none", ...ne()]
4708
+ "max-block": ["none", ...re()]
4709
4709
  }],
4710
4710
  /**
4711
4711
  * Width
4712
4712
  * @see https://tailwindcss.com/docs/width
4713
4713
  */
4714
4714
  w: [{
4715
- w: [i, "screen", ...ie()]
4715
+ w: [i, "screen", ...H()]
4716
4716
  }],
4717
4717
  /**
4718
4718
  * Min-Width
@@ -4724,7 +4724,7 @@ const Pi = (t, e) => {
4724
4724
  "screen",
4725
4725
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
4726
4726
  "none",
4727
- ...ie()
4727
+ ...H()
4728
4728
  ]
4729
4729
  }],
4730
4730
  /**
@@ -4742,7 +4742,7 @@ const Pi = (t, e) => {
4742
4742
  {
4743
4743
  screen: [o]
4744
4744
  },
4745
- ...ie()
4745
+ ...H()
4746
4746
  ]
4747
4747
  }],
4748
4748
  /**
@@ -4750,21 +4750,21 @@ const Pi = (t, e) => {
4750
4750
  * @see https://tailwindcss.com/docs/height
4751
4751
  */
4752
4752
  h: [{
4753
- h: ["screen", "lh", ...ie()]
4753
+ h: ["screen", "lh", ...H()]
4754
4754
  }],
4755
4755
  /**
4756
4756
  * Min-Height
4757
4757
  * @see https://tailwindcss.com/docs/min-height
4758
4758
  */
4759
4759
  "min-h": [{
4760
- "min-h": ["screen", "lh", "none", ...ie()]
4760
+ "min-h": ["screen", "lh", "none", ...H()]
4761
4761
  }],
4762
4762
  /**
4763
4763
  * Max-Height
4764
4764
  * @see https://tailwindcss.com/docs/max-height
4765
4765
  */
4766
4766
  "max-h": [{
4767
- "max-h": ["screen", "lh", ...ie()]
4767
+ "max-h": ["screen", "lh", ...H()]
4768
4768
  }],
4769
4769
  // ------------------
4770
4770
  // --- Typography ---
@@ -4856,7 +4856,7 @@ const Pi = (t, e) => {
4856
4856
  * @see https://tailwindcss.com/docs/line-clamp
4857
4857
  */
4858
4858
  "line-clamp": [{
4859
- "line-clamp": [re, "none", B, Nr]
4859
+ "line-clamp": [se, "none", B, Nr]
4860
4860
  }],
4861
4861
  /**
4862
4862
  * Line Height
@@ -4929,7 +4929,7 @@ const Pi = (t, e) => {
4929
4929
  * @see https://tailwindcss.com/docs/text-decoration-thickness
4930
4930
  */
4931
4931
  "text-decoration-thickness": [{
4932
- decoration: [re, "from-font", "auto", B, Ct]
4932
+ decoration: [se, "from-font", "auto", B, Ct]
4933
4933
  }],
4934
4934
  /**
4935
4935
  * Text Decoration Color
@@ -4943,7 +4943,7 @@ const Pi = (t, e) => {
4943
4943
  * @see https://tailwindcss.com/docs/text-underline-offset
4944
4944
  */
4945
4945
  "underline-offset": [{
4946
- "underline-offset": [re, "auto", B, M]
4946
+ "underline-offset": [se, "auto", B, M]
4947
4947
  }],
4948
4948
  /**
4949
4949
  * Text Transform
@@ -5047,7 +5047,7 @@ const Pi = (t, e) => {
5047
5047
  * @see https://tailwindcss.com/docs/background-position
5048
5048
  */
5049
5049
  "bg-position": [{
5050
- bg: Y()
5050
+ bg: J()
5051
5051
  }],
5052
5052
  /**
5053
5053
  * Background Repeat
@@ -5088,21 +5088,21 @@ const Pi = (t, e) => {
5088
5088
  * @see https://tailwindcss.com/docs/gradient-color-stops
5089
5089
  */
5090
5090
  "gradient-from-pos": [{
5091
- from: F()
5091
+ from: O()
5092
5092
  }],
5093
5093
  /**
5094
5094
  * Gradient Color Stops Via Position
5095
5095
  * @see https://tailwindcss.com/docs/gradient-color-stops
5096
5096
  */
5097
5097
  "gradient-via-pos": [{
5098
- via: F()
5098
+ via: O()
5099
5099
  }],
5100
5100
  /**
5101
5101
  * Gradient Color Stops To Position
5102
5102
  * @see https://tailwindcss.com/docs/gradient-color-stops
5103
5103
  */
5104
5104
  "gradient-to-pos": [{
5105
- to: F()
5105
+ to: O()
5106
5106
  }],
5107
5107
  /**
5108
5108
  * Gradient Color Stops From
@@ -5133,105 +5133,105 @@ const Pi = (t, e) => {
5133
5133
  * @see https://tailwindcss.com/docs/border-radius
5134
5134
  */
5135
5135
  rounded: [{
5136
- rounded: G()
5136
+ rounded: K()
5137
5137
  }],
5138
5138
  /**
5139
5139
  * Border Radius Start
5140
5140
  * @see https://tailwindcss.com/docs/border-radius
5141
5141
  */
5142
5142
  "rounded-s": [{
5143
- "rounded-s": G()
5143
+ "rounded-s": K()
5144
5144
  }],
5145
5145
  /**
5146
5146
  * Border Radius End
5147
5147
  * @see https://tailwindcss.com/docs/border-radius
5148
5148
  */
5149
5149
  "rounded-e": [{
5150
- "rounded-e": G()
5150
+ "rounded-e": K()
5151
5151
  }],
5152
5152
  /**
5153
5153
  * Border Radius Top
5154
5154
  * @see https://tailwindcss.com/docs/border-radius
5155
5155
  */
5156
5156
  "rounded-t": [{
5157
- "rounded-t": G()
5157
+ "rounded-t": K()
5158
5158
  }],
5159
5159
  /**
5160
5160
  * Border Radius Right
5161
5161
  * @see https://tailwindcss.com/docs/border-radius
5162
5162
  */
5163
5163
  "rounded-r": [{
5164
- "rounded-r": G()
5164
+ "rounded-r": K()
5165
5165
  }],
5166
5166
  /**
5167
5167
  * Border Radius Bottom
5168
5168
  * @see https://tailwindcss.com/docs/border-radius
5169
5169
  */
5170
5170
  "rounded-b": [{
5171
- "rounded-b": G()
5171
+ "rounded-b": K()
5172
5172
  }],
5173
5173
  /**
5174
5174
  * Border Radius Left
5175
5175
  * @see https://tailwindcss.com/docs/border-radius
5176
5176
  */
5177
5177
  "rounded-l": [{
5178
- "rounded-l": G()
5178
+ "rounded-l": K()
5179
5179
  }],
5180
5180
  /**
5181
5181
  * Border Radius Start Start
5182
5182
  * @see https://tailwindcss.com/docs/border-radius
5183
5183
  */
5184
5184
  "rounded-ss": [{
5185
- "rounded-ss": G()
5185
+ "rounded-ss": K()
5186
5186
  }],
5187
5187
  /**
5188
5188
  * Border Radius Start End
5189
5189
  * @see https://tailwindcss.com/docs/border-radius
5190
5190
  */
5191
5191
  "rounded-se": [{
5192
- "rounded-se": G()
5192
+ "rounded-se": K()
5193
5193
  }],
5194
5194
  /**
5195
5195
  * Border Radius End End
5196
5196
  * @see https://tailwindcss.com/docs/border-radius
5197
5197
  */
5198
5198
  "rounded-ee": [{
5199
- "rounded-ee": G()
5199
+ "rounded-ee": K()
5200
5200
  }],
5201
5201
  /**
5202
5202
  * Border Radius End Start
5203
5203
  * @see https://tailwindcss.com/docs/border-radius
5204
5204
  */
5205
5205
  "rounded-es": [{
5206
- "rounded-es": G()
5206
+ "rounded-es": K()
5207
5207
  }],
5208
5208
  /**
5209
5209
  * Border Radius Top Left
5210
5210
  * @see https://tailwindcss.com/docs/border-radius
5211
5211
  */
5212
5212
  "rounded-tl": [{
5213
- "rounded-tl": G()
5213
+ "rounded-tl": K()
5214
5214
  }],
5215
5215
  /**
5216
5216
  * Border Radius Top Right
5217
5217
  * @see https://tailwindcss.com/docs/border-radius
5218
5218
  */
5219
5219
  "rounded-tr": [{
5220
- "rounded-tr": G()
5220
+ "rounded-tr": K()
5221
5221
  }],
5222
5222
  /**
5223
5223
  * Border Radius Bottom Right
5224
5224
  * @see https://tailwindcss.com/docs/border-radius
5225
5225
  */
5226
5226
  "rounded-br": [{
5227
- "rounded-br": G()
5227
+ "rounded-br": K()
5228
5228
  }],
5229
5229
  /**
5230
5230
  * Border Radius Bottom Left
5231
5231
  * @see https://tailwindcss.com/docs/border-radius
5232
5232
  */
5233
5233
  "rounded-bl": [{
5234
- "rounded-bl": G()
5234
+ "rounded-bl": K()
5235
5235
  }],
5236
5236
  /**
5237
5237
  * Border Width
@@ -5444,14 +5444,14 @@ const Pi = (t, e) => {
5444
5444
  * @see https://tailwindcss.com/docs/outline-offset
5445
5445
  */
5446
5446
  "outline-offset": [{
5447
- "outline-offset": [re, B, M]
5447
+ "outline-offset": [se, B, M]
5448
5448
  }],
5449
5449
  /**
5450
5450
  * Outline Width
5451
5451
  * @see https://tailwindcss.com/docs/outline-width
5452
5452
  */
5453
5453
  "outline-w": [{
5454
- outline: ["", re, ia, Ct]
5454
+ outline: ["", se, ia, Ct]
5455
5455
  }],
5456
5456
  /**
5457
5457
  * Outline Color
@@ -5526,7 +5526,7 @@ const Pi = (t, e) => {
5526
5526
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
5527
5527
  */
5528
5528
  "ring-offset-w": [{
5529
- "ring-offset": [re, Ct]
5529
+ "ring-offset": [se, Ct]
5530
5530
  }],
5531
5531
  /**
5532
5532
  * Ring Offset Color
@@ -5570,7 +5570,7 @@ const Pi = (t, e) => {
5570
5570
  * @see https://tailwindcss.com/docs/opacity
5571
5571
  */
5572
5572
  opacity: [{
5573
- opacity: [re, B, M]
5573
+ opacity: [se, B, M]
5574
5574
  }],
5575
5575
  /**
5576
5576
  * Mix Blend Mode
@@ -5605,13 +5605,13 @@ const Pi = (t, e) => {
5605
5605
  * @see https://tailwindcss.com/docs/mask-image
5606
5606
  */
5607
5607
  "mask-image-linear-pos": [{
5608
- "mask-linear": [re]
5608
+ "mask-linear": [se]
5609
5609
  }],
5610
5610
  "mask-image-linear-from-pos": [{
5611
- "mask-linear-from": Q()
5611
+ "mask-linear-from": X()
5612
5612
  }],
5613
5613
  "mask-image-linear-to-pos": [{
5614
- "mask-linear-to": Q()
5614
+ "mask-linear-to": X()
5615
5615
  }],
5616
5616
  "mask-image-linear-from-color": [{
5617
5617
  "mask-linear-from": P()
@@ -5620,10 +5620,10 @@ const Pi = (t, e) => {
5620
5620
  "mask-linear-to": P()
5621
5621
  }],
5622
5622
  "mask-image-t-from-pos": [{
5623
- "mask-t-from": Q()
5623
+ "mask-t-from": X()
5624
5624
  }],
5625
5625
  "mask-image-t-to-pos": [{
5626
- "mask-t-to": Q()
5626
+ "mask-t-to": X()
5627
5627
  }],
5628
5628
  "mask-image-t-from-color": [{
5629
5629
  "mask-t-from": P()
@@ -5632,10 +5632,10 @@ const Pi = (t, e) => {
5632
5632
  "mask-t-to": P()
5633
5633
  }],
5634
5634
  "mask-image-r-from-pos": [{
5635
- "mask-r-from": Q()
5635
+ "mask-r-from": X()
5636
5636
  }],
5637
5637
  "mask-image-r-to-pos": [{
5638
- "mask-r-to": Q()
5638
+ "mask-r-to": X()
5639
5639
  }],
5640
5640
  "mask-image-r-from-color": [{
5641
5641
  "mask-r-from": P()
@@ -5644,10 +5644,10 @@ const Pi = (t, e) => {
5644
5644
  "mask-r-to": P()
5645
5645
  }],
5646
5646
  "mask-image-b-from-pos": [{
5647
- "mask-b-from": Q()
5647
+ "mask-b-from": X()
5648
5648
  }],
5649
5649
  "mask-image-b-to-pos": [{
5650
- "mask-b-to": Q()
5650
+ "mask-b-to": X()
5651
5651
  }],
5652
5652
  "mask-image-b-from-color": [{
5653
5653
  "mask-b-from": P()
@@ -5656,10 +5656,10 @@ const Pi = (t, e) => {
5656
5656
  "mask-b-to": P()
5657
5657
  }],
5658
5658
  "mask-image-l-from-pos": [{
5659
- "mask-l-from": Q()
5659
+ "mask-l-from": X()
5660
5660
  }],
5661
5661
  "mask-image-l-to-pos": [{
5662
- "mask-l-to": Q()
5662
+ "mask-l-to": X()
5663
5663
  }],
5664
5664
  "mask-image-l-from-color": [{
5665
5665
  "mask-l-from": P()
@@ -5668,10 +5668,10 @@ const Pi = (t, e) => {
5668
5668
  "mask-l-to": P()
5669
5669
  }],
5670
5670
  "mask-image-x-from-pos": [{
5671
- "mask-x-from": Q()
5671
+ "mask-x-from": X()
5672
5672
  }],
5673
5673
  "mask-image-x-to-pos": [{
5674
- "mask-x-to": Q()
5674
+ "mask-x-to": X()
5675
5675
  }],
5676
5676
  "mask-image-x-from-color": [{
5677
5677
  "mask-x-from": P()
@@ -5680,10 +5680,10 @@ const Pi = (t, e) => {
5680
5680
  "mask-x-to": P()
5681
5681
  }],
5682
5682
  "mask-image-y-from-pos": [{
5683
- "mask-y-from": Q()
5683
+ "mask-y-from": X()
5684
5684
  }],
5685
5685
  "mask-image-y-to-pos": [{
5686
- "mask-y-to": Q()
5686
+ "mask-y-to": X()
5687
5687
  }],
5688
5688
  "mask-image-y-from-color": [{
5689
5689
  "mask-y-from": P()
@@ -5695,10 +5695,10 @@ const Pi = (t, e) => {
5695
5695
  "mask-radial": [B, M]
5696
5696
  }],
5697
5697
  "mask-image-radial-from-pos": [{
5698
- "mask-radial-from": Q()
5698
+ "mask-radial-from": X()
5699
5699
  }],
5700
5700
  "mask-image-radial-to-pos": [{
5701
- "mask-radial-to": Q()
5701
+ "mask-radial-to": X()
5702
5702
  }],
5703
5703
  "mask-image-radial-from-color": [{
5704
5704
  "mask-radial-from": P()
@@ -5716,16 +5716,16 @@ const Pi = (t, e) => {
5716
5716
  }]
5717
5717
  }],
5718
5718
  "mask-image-radial-pos": [{
5719
- "mask-radial-at": I()
5719
+ "mask-radial-at": A()
5720
5720
  }],
5721
5721
  "mask-image-conic-pos": [{
5722
- "mask-conic": [re]
5722
+ "mask-conic": [se]
5723
5723
  }],
5724
5724
  "mask-image-conic-from-pos": [{
5725
- "mask-conic-from": Q()
5725
+ "mask-conic-from": X()
5726
5726
  }],
5727
5727
  "mask-image-conic-to-pos": [{
5728
- "mask-conic-to": Q()
5728
+ "mask-conic-to": X()
5729
5729
  }],
5730
5730
  "mask-image-conic-from-color": [{
5731
5731
  "mask-conic-from": P()
@@ -5752,7 +5752,7 @@ const Pi = (t, e) => {
5752
5752
  * @see https://tailwindcss.com/docs/mask-position
5753
5753
  */
5754
5754
  "mask-position": [{
5755
- mask: Y()
5755
+ mask: J()
5756
5756
  }],
5757
5757
  /**
5758
5758
  * Mask Repeat
@@ -5810,14 +5810,14 @@ const Pi = (t, e) => {
5810
5810
  * @see https://tailwindcss.com/docs/brightness
5811
5811
  */
5812
5812
  brightness: [{
5813
- brightness: [re, B, M]
5813
+ brightness: [se, B, M]
5814
5814
  }],
5815
5815
  /**
5816
5816
  * Contrast
5817
5817
  * @see https://tailwindcss.com/docs/contrast
5818
5818
  */
5819
5819
  contrast: [{
5820
- contrast: [re, B, M]
5820
+ contrast: [se, B, M]
5821
5821
  }],
5822
5822
  /**
5823
5823
  * Drop Shadow
@@ -5845,35 +5845,35 @@ const Pi = (t, e) => {
5845
5845
  * @see https://tailwindcss.com/docs/grayscale
5846
5846
  */
5847
5847
  grayscale: [{
5848
- grayscale: ["", re, B, M]
5848
+ grayscale: ["", se, B, M]
5849
5849
  }],
5850
5850
  /**
5851
5851
  * Hue Rotate
5852
5852
  * @see https://tailwindcss.com/docs/hue-rotate
5853
5853
  */
5854
5854
  "hue-rotate": [{
5855
- "hue-rotate": [re, B, M]
5855
+ "hue-rotate": [se, B, M]
5856
5856
  }],
5857
5857
  /**
5858
5858
  * Invert
5859
5859
  * @see https://tailwindcss.com/docs/invert
5860
5860
  */
5861
5861
  invert: [{
5862
- invert: ["", re, B, M]
5862
+ invert: ["", se, B, M]
5863
5863
  }],
5864
5864
  /**
5865
5865
  * Saturate
5866
5866
  * @see https://tailwindcss.com/docs/saturate
5867
5867
  */
5868
5868
  saturate: [{
5869
- saturate: [re, B, M]
5869
+ saturate: [se, B, M]
5870
5870
  }],
5871
5871
  /**
5872
5872
  * Sepia
5873
5873
  * @see https://tailwindcss.com/docs/sepia
5874
5874
  */
5875
5875
  sepia: [{
5876
- sepia: ["", re, B, M]
5876
+ sepia: ["", se, B, M]
5877
5877
  }],
5878
5878
  /**
5879
5879
  * Backdrop Filter
@@ -5900,56 +5900,56 @@ const Pi = (t, e) => {
5900
5900
  * @see https://tailwindcss.com/docs/backdrop-brightness
5901
5901
  */
5902
5902
  "backdrop-brightness": [{
5903
- "backdrop-brightness": [re, B, M]
5903
+ "backdrop-brightness": [se, B, M]
5904
5904
  }],
5905
5905
  /**
5906
5906
  * Backdrop Contrast
5907
5907
  * @see https://tailwindcss.com/docs/backdrop-contrast
5908
5908
  */
5909
5909
  "backdrop-contrast": [{
5910
- "backdrop-contrast": [re, B, M]
5910
+ "backdrop-contrast": [se, B, M]
5911
5911
  }],
5912
5912
  /**
5913
5913
  * Backdrop Grayscale
5914
5914
  * @see https://tailwindcss.com/docs/backdrop-grayscale
5915
5915
  */
5916
5916
  "backdrop-grayscale": [{
5917
- "backdrop-grayscale": ["", re, B, M]
5917
+ "backdrop-grayscale": ["", se, B, M]
5918
5918
  }],
5919
5919
  /**
5920
5920
  * Backdrop Hue Rotate
5921
5921
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
5922
5922
  */
5923
5923
  "backdrop-hue-rotate": [{
5924
- "backdrop-hue-rotate": [re, B, M]
5924
+ "backdrop-hue-rotate": [se, B, M]
5925
5925
  }],
5926
5926
  /**
5927
5927
  * Backdrop Invert
5928
5928
  * @see https://tailwindcss.com/docs/backdrop-invert
5929
5929
  */
5930
5930
  "backdrop-invert": [{
5931
- "backdrop-invert": ["", re, B, M]
5931
+ "backdrop-invert": ["", se, B, M]
5932
5932
  }],
5933
5933
  /**
5934
5934
  * Backdrop Opacity
5935
5935
  * @see https://tailwindcss.com/docs/backdrop-opacity
5936
5936
  */
5937
5937
  "backdrop-opacity": [{
5938
- "backdrop-opacity": [re, B, M]
5938
+ "backdrop-opacity": [se, B, M]
5939
5939
  }],
5940
5940
  /**
5941
5941
  * Backdrop Saturate
5942
5942
  * @see https://tailwindcss.com/docs/backdrop-saturate
5943
5943
  */
5944
5944
  "backdrop-saturate": [{
5945
- "backdrop-saturate": [re, B, M]
5945
+ "backdrop-saturate": [se, B, M]
5946
5946
  }],
5947
5947
  /**
5948
5948
  * Backdrop Sepia
5949
5949
  * @see https://tailwindcss.com/docs/backdrop-sepia
5950
5950
  */
5951
5951
  "backdrop-sepia": [{
5952
- "backdrop-sepia": ["", re, B, M]
5952
+ "backdrop-sepia": ["", se, B, M]
5953
5953
  }],
5954
5954
  // --------------
5955
5955
  // --- Tables ---
@@ -6018,7 +6018,7 @@ const Pi = (t, e) => {
6018
6018
  * @see https://tailwindcss.com/docs/transition-duration
6019
6019
  */
6020
6020
  duration: [{
6021
- duration: [re, "initial", B, M]
6021
+ duration: [se, "initial", B, M]
6022
6022
  }],
6023
6023
  /**
6024
6024
  * Transition Timing Function
@@ -6032,7 +6032,7 @@ const Pi = (t, e) => {
6032
6032
  * @see https://tailwindcss.com/docs/transition-delay
6033
6033
  */
6034
6034
  delay: [{
6035
- delay: [re, B, M]
6035
+ delay: [se, B, M]
6036
6036
  }],
6037
6037
  /**
6038
6038
  * Animation
@@ -6063,7 +6063,7 @@ const Pi = (t, e) => {
6063
6063
  * @see https://tailwindcss.com/docs/perspective-origin
6064
6064
  */
6065
6065
  "perspective-origin": [{
6066
- "perspective-origin": S()
6066
+ "perspective-origin": T()
6067
6067
  }],
6068
6068
  /**
6069
6069
  * Rotate
@@ -6098,28 +6098,28 @@ const Pi = (t, e) => {
6098
6098
  * @see https://tailwindcss.com/docs/scale
6099
6099
  */
6100
6100
  scale: [{
6101
- scale: J()
6101
+ scale: Q()
6102
6102
  }],
6103
6103
  /**
6104
6104
  * Scale X
6105
6105
  * @see https://tailwindcss.com/docs/scale
6106
6106
  */
6107
6107
  "scale-x": [{
6108
- "scale-x": J()
6108
+ "scale-x": Q()
6109
6109
  }],
6110
6110
  /**
6111
6111
  * Scale Y
6112
6112
  * @see https://tailwindcss.com/docs/scale
6113
6113
  */
6114
6114
  "scale-y": [{
6115
- "scale-y": J()
6115
+ "scale-y": Q()
6116
6116
  }],
6117
6117
  /**
6118
6118
  * Scale Z
6119
6119
  * @see https://tailwindcss.com/docs/scale
6120
6120
  */
6121
6121
  "scale-z": [{
6122
- "scale-z": J()
6122
+ "scale-z": Q()
6123
6123
  }],
6124
6124
  /**
6125
6125
  * Scale 3D
@@ -6159,7 +6159,7 @@ const Pi = (t, e) => {
6159
6159
  * @see https://tailwindcss.com/docs/transform-origin
6160
6160
  */
6161
6161
  "transform-origin": [{
6162
- origin: S()
6162
+ origin: T()
6163
6163
  }],
6164
6164
  /**
6165
6165
  * Transform Style
@@ -6173,28 +6173,28 @@ const Pi = (t, e) => {
6173
6173
  * @see https://tailwindcss.com/docs/translate
6174
6174
  */
6175
6175
  translate: [{
6176
- translate: te()
6176
+ translate: ae()
6177
6177
  }],
6178
6178
  /**
6179
6179
  * Translate X
6180
6180
  * @see https://tailwindcss.com/docs/translate
6181
6181
  */
6182
6182
  "translate-x": [{
6183
- "translate-x": te()
6183
+ "translate-x": ae()
6184
6184
  }],
6185
6185
  /**
6186
6186
  * Translate Y
6187
6187
  * @see https://tailwindcss.com/docs/translate
6188
6188
  */
6189
6189
  "translate-y": [{
6190
- "translate-y": te()
6190
+ "translate-y": ae()
6191
6191
  }],
6192
6192
  /**
6193
6193
  * Translate Z
6194
6194
  * @see https://tailwindcss.com/docs/translate
6195
6195
  */
6196
6196
  "translate-z": [{
6197
- "translate-z": te()
6197
+ "translate-z": ae()
6198
6198
  }],
6199
6199
  /**
6200
6200
  * Translate None
@@ -6539,7 +6539,7 @@ const Pi = (t, e) => {
6539
6539
  * @see https://tailwindcss.com/docs/stroke-width
6540
6540
  */
6541
6541
  "stroke-w": [{
6542
- stroke: [re, ia, Ct, Nr]
6542
+ stroke: [se, ia, Ct, Nr]
6543
6543
  }],
6544
6544
  /**
6545
6545
  * Stroke
@@ -7133,7 +7133,7 @@ const Ze = ({
7133
7133
  document.body
7134
7134
  ) : null;
7135
7135
  }, Qt = () => {
7136
- const { manageBillingUrl: t } = se(), { t: e } = fe();
7136
+ const { manageBillingUrl: t } = oe(), { t: e } = fe();
7137
7137
  return /* @__PURE__ */ m("div", { className: "bpb-outdated", children: [
7138
7138
  /* @__PURE__ */ l("h3", { className: "bpb-outdated__title", children: e("outdatedTitle") }),
7139
7139
  /* @__PURE__ */ l("p", { className: "bpb-outdated__text", children: e("outdatedText") }),
@@ -7197,7 +7197,7 @@ const Ja = ({ label: t, children: e }) => /* @__PURE__ */ m("span", { className:
7197
7197
  description: e,
7198
7198
  Icon: a
7199
7199
  }) => {
7200
- const [n, r] = X(!1), s = yo();
7200
+ const [n, r] = ee(!1), s = yo();
7201
7201
  return /* @__PURE__ */ m("li", { className: "bpb-plan-card__feature--expandable", children: [
7202
7202
  /* @__PURE__ */ m(
7203
7203
  "button",
@@ -7217,7 +7217,7 @@ const Ja = ({ label: t, children: e }) => /* @__PURE__ */ m("span", { className:
7217
7217
  n && /* @__PURE__ */ l("p", { id: s, className: "bpb-plan-card__feature-desc", children: e })
7218
7218
  ] });
7219
7219
  }, Wl = ({ features: t, previousPlanName: e, overrides: a, isMobile: n }) => {
7220
- const { t: r } = fe(), [s, o] = X(!1), c = n && !s && t.length > Sn ? t.slice(0, Sn) : t;
7220
+ const { t: r } = fe(), [s, o] = ee(!1), c = n && !s && t.length > Sn ? t.slice(0, Sn) : t;
7221
7221
  return /* @__PURE__ */ m(Se, { children: [
7222
7222
  /* @__PURE__ */ m("ul", { className: W("bpb-plan-card__features", n && "bpb-plan-card__features--mobile"), children: [
7223
7223
  e && /* @__PURE__ */ m("li", { className: "bpb-plan-card__features-lead", children: [
@@ -7272,46 +7272,46 @@ const Hl = ({
7272
7272
  planFeatures: o = {},
7273
7273
  featureDescriptions: i
7274
7274
  }) => {
7275
- var F, G, q;
7276
- const { isOutdatedBilling: c, toast: d, analytics: u } = se(), { t: p } = fe(), [h, g] = X(r), { data: f, isLoading: w } = dt(), { data: N } = Ht(), { data: v } = tt({ enabled: t }), { data: C } = es({ enabled: t }), k = rs(), I = (C == null ? void 0 : C.planReadonly) ?? !1;
7275
+ var O, K, q;
7276
+ const { isOutdatedBilling: c, toast: d, analytics: u } = oe(), { t: p } = fe(), [h, g] = ee(r), { data: f, isLoading: w } = dt(), { data: N } = Ht(), { data: v } = tt({ enabled: t }), { data: C } = es({ enabled: t }), S = rs(), A = (C == null ? void 0 : C.planReadonly) ?? !1;
7277
7277
  Oe(() => {
7278
7278
  t && u.capture(we.PLAN_PICKER_VIEWED, { interval: h });
7279
7279
  }, [t, u]);
7280
- const S = (x) => {
7280
+ const T = (x) => {
7281
7281
  x !== h && u.capture(we.PLAN_INTERVAL_TOGGLED, { interval: x }), g(x);
7282
- }, T = v == null ? void 0 : v.plan.current.interval, A = f == null ? void 0 : f.find((x) => x.id === (v == null ? void 0 : v.plan.current.planId)), _ = v ? A ? ve(A) : "community" : void 0, L = ((F = v == null ? void 0 : v.plan.next) == null ? void 0 : F.planId) ?? null, U = !!L && L !== (v == null ? void 0 : v.plan.current.planId), R = I || _ === "enterprise" || _ === "managed", V = Le(() => f ? f.filter(
7282
+ }, k = v == null ? void 0 : v.plan.current.interval, I = f == null ? void 0 : f.find((x) => x.id === (v == null ? void 0 : v.plan.current.planId)), _ = v ? I ? ve(I) : "community" : void 0, L = ((O = v == null ? void 0 : v.plan.next) == null ? void 0 : O.planId) ?? null, F = !!L && L !== (v == null ? void 0 : v.plan.current.planId), R = A || _ === "enterprise" || _ === "managed", Z = Le(() => f ? f.filter(
7283
7283
  (x) => ve(x) !== "managed" && ve(x) !== "enterprise" && !s.includes(x.id)
7284
- ).sort((x, be) => jt.indexOf(ve(x)) - jt.indexOf(ve(be))) : [], [f, s]), j = Le(() => $l(V), [V]), $ = Zl(), z = Le(() => {
7285
- var Q;
7286
- if (V.length === 0)
7284
+ ).sort((x, be) => jt.indexOf(ve(x)) - jt.indexOf(ve(be))) : [], [f, s]), j = Le(() => $l(Z), [Z]), G = Zl(), z = Le(() => {
7285
+ var X;
7286
+ if (Z.length === 0)
7287
7287
  return null;
7288
- const x = V.find(
7288
+ const x = Z.find(
7289
7289
  (le) => ve(le) === n || le.id === n
7290
- ), be = V.find((le) => ve(le) === _);
7291
- return ((Q = x ?? be ?? V[0]) == null ? void 0 : Q.id) ?? null;
7292
- }, [V, n, _]), [O, ie] = X(void 0), [oe, ne] = X(t);
7293
- oe !== t && (ne(t), ie(void 0));
7294
- const P = O === void 0 ? z : O, Y = ((q = (G = f == null ? void 0 : f.find((x) => ve(x) === "enterprise")) == null ? void 0 : G.metadata) == null ? void 0 : q.contact_url) ?? _s, me = (x) => {
7295
- k.mutate(
7290
+ ), be = Z.find((le) => ve(le) === _);
7291
+ return ((X = x ?? be ?? Z[0]) == null ? void 0 : X.id) ?? null;
7292
+ }, [Z, n, _]), [U, H] = ee(void 0), [ie, re] = ee(t);
7293
+ ie !== t && (re(t), H(void 0));
7294
+ const P = U === void 0 ? z : U, J = ((q = (K = f == null ? void 0 : f.find((x) => ve(x) === "enterprise")) == null ? void 0 : K.metadata) == null ? void 0 : q.contact_url) ?? _s, me = (x) => {
7295
+ S.mutate(
7296
7296
  { planId: x.id, interval: h },
7297
7297
  {
7298
7298
  onSuccess: () => {
7299
7299
  u.capture(we.PLAN_DOWNGRADED, {
7300
7300
  plan_name: ye(x.name),
7301
7301
  interval: h,
7302
- previous_plan_name: A ? ye(A.name) : void 0
7302
+ previous_plan_name: I ? ye(I.name) : void 0
7303
7303
  }), d({ type: "success", message: p("upgradeDowngradeSuccess") });
7304
7304
  },
7305
7305
  onError: () => d({ type: "error", message: p("upgradeDowngradeError") })
7306
7306
  }
7307
7307
  );
7308
7308
  }, ue = () => {
7309
- v && k.mutate(
7309
+ v && S.mutate(
7310
7310
  { planId: v.plan.current.planId, interval: v.plan.current.interval },
7311
7311
  {
7312
7312
  onSuccess: () => {
7313
7313
  u.capture(we.PLAN_DOWNGRADE_CANCELLED, {
7314
- plan_name: A ? ye(A.name) : v.plan.current.planId
7314
+ plan_name: I ? ye(I.name) : v.plan.current.planId
7315
7315
  }), d({ type: "success", message: p("upgradeCancelDowngradeSuccess") });
7316
7316
  },
7317
7317
  onError: () => d({ type: "error", message: p("upgradeCancelDowngradeError") })
@@ -7343,7 +7343,7 @@ const Hl = ({
7343
7343
  {
7344
7344
  "aria-label": p("dashboardBillingPeriod"),
7345
7345
  value: h,
7346
- onChange: S,
7346
+ onChange: T,
7347
7347
  options: [
7348
7348
  { value: "month", label: p("upgradeMonthly") },
7349
7349
  {
@@ -7361,9 +7361,9 @@ const Hl = ({
7361
7361
  /* @__PURE__ */ l(pe, { width: "100%", height: 36, rounded: !0 }),
7362
7362
  /* @__PURE__ */ l(pe, { width: "100%", height: 140 })
7363
7363
  ] }, x)),
7364
- V.map((x, be) => {
7364
+ Z.map((x, be) => {
7365
7365
  var ra, sa;
7366
- const Q = ve(x), le = Gl(x, h), ke = Kl(x, h), J = (((ra = x.prices.month) == null ? void 0 : ra.amount) ?? 0) <= 0, Ne = Q === _, te = Ne && (_ === "community" || h === T), De = Q === _ && _ !== "community" && h !== T, at = !!L && x.id === L && !te, Xt = _ !== void 0 && jt.indexOf(Q) < jt.indexOf(_), xe = (Q === n || x.id === n) && !te, ze = Ne && U ? "cancel_downgrade" : te ? "current" : De ? "switch_interval" : at ? "next" : Xt ? "downgrade" : "upgrade", ea = be > 0 ? V[be - 1] : void 0, ta = o[Q] ?? qn[Q], At = x.features.conversation_sessions, xt = Vn(N, x, h), Pt = x.features.ai_spend, Ea = Pt !== void 0 ? p("planFeatureAiUsageIncluded", {
7366
+ const X = ve(x), le = Gl(x, h), ke = Kl(x, h), Q = (((ra = x.prices.month) == null ? void 0 : ra.amount) ?? 0) <= 0, Ne = X === _, ae = Ne && (_ === "community" || h === k), De = X === _ && _ !== "community" && h !== k, at = !!L && x.id === L && !ae, Xt = _ !== void 0 && jt.indexOf(X) < jt.indexOf(_), xe = (X === n || x.id === n) && !ae, ze = Ne && F ? "cancel_downgrade" : ae ? "current" : De ? "switch_interval" : at ? "next" : Xt ? "downgrade" : "upgrade", ea = be > 0 ? Z[be - 1] : void 0, ta = o[X] ?? qn[X], At = x.features.conversation_sessions, xt = Vn(N, x, h), Pt = x.features.ai_spend, Ea = Pt !== void 0 ? p("planFeatureAiUsageIncluded", {
7367
7367
  amount: de(Pt / qt, (le == null ? void 0 : le.currency) ?? "usd", 0)
7368
7368
  }) : void 0, bn = Pt !== void 0 && At ? p("planFeatureDescAiUsageIncluded", {
7369
7369
  rate: de(
@@ -7381,7 +7381,7 @@ const Hl = ({
7381
7381
  description: (i == null ? void 0 : i["AI usage included"]) ?? bn
7382
7382
  }
7383
7383
  } : {}
7384
- }, aa = k.isPending && (ze === "downgrade" && ((sa = k.variables) == null ? void 0 : sa.planId) === x.id || ze === "cancel_downgrade"), Ae = ye(x.name), ct = !$ || P === x.id, na = ke !== null && le ? /* @__PURE__ */ m(Se, { children: [
7384
+ }, aa = S.isPending && (ze === "downgrade" && ((sa = S.variables) == null ? void 0 : sa.planId) === x.id || ze === "cancel_downgrade"), Ae = ye(x.name), ct = !G || P === x.id, na = ke !== null && le ? /* @__PURE__ */ m(Se, { children: [
7385
7385
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__currency", children: Ua(le.currency) }),
7386
7386
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__amount", children: Number.isInteger(ke) ? ke : ke.toFixed(2).replace(/\.00$/, "") }),
7387
7387
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__per", children: p("upgradePerMonthSuffix", { currency: le.currency.toUpperCase() }) })
@@ -7392,12 +7392,12 @@ const Hl = ({
7392
7392
  className: W(
7393
7393
  "bpb-plan-card",
7394
7394
  xe && "bpb-plan-card--highlighted bpb-glow",
7395
- $ && "bpb-plan-card--accordion",
7396
- $ && ct && "is-expanded"
7395
+ G && "bpb-plan-card--accordion",
7396
+ G && ct && "is-expanded"
7397
7397
  ),
7398
7398
  "data-plan-id": x.id,
7399
7399
  children: [
7400
- $ ? (
7400
+ G ? (
7401
7401
  /* Name + price stay visible collapsed, so tiers compare. */
7402
7402
  /* @__PURE__ */ m(
7403
7403
  "button",
@@ -7405,7 +7405,7 @@ const Hl = ({
7405
7405
  type: "button",
7406
7406
  className: "bpb-plan-card__summary",
7407
7407
  "aria-expanded": ct,
7408
- onClick: () => ie(ct ? null : x.id),
7408
+ onClick: () => H(ct ? null : x.id),
7409
7409
  children: [
7410
7410
  /* @__PURE__ */ m("span", { className: "bpb-plan-card__summary-text", children: [
7411
7411
  /* @__PURE__ */ m("span", { className: "bpb-plan-card__name", children: [
@@ -7430,11 +7430,11 @@ const Hl = ({
7430
7430
  ] })
7431
7431
  ),
7432
7432
  ct && /* @__PURE__ */ m(Se, { children: [
7433
- $ && /* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: p(Tr[ve(x)]) }),
7433
+ G && /* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: p(Tr[ve(x)]) }),
7434
7434
  At !== void 0 && /* @__PURE__ */ m("div", { className: "bpb-plan-card__allowance", children: [
7435
7435
  /* @__PURE__ */ m("div", { className: "bpb-plan-card__metric", children: [
7436
7436
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__metric-value", children: ge(At) }),
7437
- /* @__PURE__ */ l("span", { className: "bpb-plan-card__metric-unit", children: p(J ? "conversationsUnit" : "conversationsPerMonth") })
7437
+ /* @__PURE__ */ l("span", { className: "bpb-plan-card__metric-unit", children: p(Q ? "conversationsUnit" : "conversationsPerMonth") })
7438
7438
  ] }),
7439
7439
  xt ? /* @__PURE__ */ l("p", { className: "bpb-plan-card__pack", children: p("upgradeThenPer", {
7440
7440
  price: de(xt.amount, xt.currency, 0),
@@ -7449,7 +7449,7 @@ const Hl = ({
7449
7449
  {
7450
7450
  variant: "outline",
7451
7451
  block: !0,
7452
- disabled: R || k.isPending,
7452
+ disabled: R || S.isPending,
7453
7453
  loading: aa,
7454
7454
  onClick: () => me(x),
7455
7455
  children: p("upgradeDowngrade")
@@ -7460,13 +7460,13 @@ const Hl = ({
7460
7460
  {
7461
7461
  variant: "primary",
7462
7462
  block: !0,
7463
- disabled: R || k.isPending,
7463
+ disabled: R || S.isPending,
7464
7464
  title: R ? p("upgradePlanManaged") : void 0,
7465
7465
  onClick: () => {
7466
7466
  u.capture(we.PLAN_UPGRADE_INITIATED, {
7467
7467
  plan_name: ye(x.name),
7468
7468
  interval: h,
7469
- current_plan_name: A ? ye(A.name) : void 0
7469
+ current_plan_name: I ? ye(I.name) : void 0
7470
7470
  }), a(x.id, h);
7471
7471
  },
7472
7472
  children: p(h === "year" ? "upgradeSwitchToAnnual" : "upgradeSwitchToMonthly")
@@ -7477,13 +7477,13 @@ const Hl = ({
7477
7477
  {
7478
7478
  variant: xe ? "accent" : "primary",
7479
7479
  block: !0,
7480
- disabled: R || k.isPending,
7480
+ disabled: R || S.isPending,
7481
7481
  title: R ? p("upgradePlanManaged") : void 0,
7482
7482
  onClick: () => {
7483
7483
  u.capture(we.PLAN_UPGRADE_INITIATED, {
7484
7484
  plan_name: ye(x.name),
7485
7485
  interval: h,
7486
- current_plan_name: A ? ye(A.name) : void 0
7486
+ current_plan_name: I ? ye(I.name) : void 0
7487
7487
  }), a(x.id, h);
7488
7488
  },
7489
7489
  children: p("upgradeUpgrade")
@@ -7495,7 +7495,7 @@ const Hl = ({
7495
7495
  features: ta,
7496
7496
  previousPlanName: ea ? ye(ea.name) : void 0,
7497
7497
  overrides: yn,
7498
- isMobile: $
7498
+ isMobile: G
7499
7499
  }
7500
7500
  )
7501
7501
  ] })
@@ -7508,7 +7508,7 @@ const Hl = ({
7508
7508
  /* @__PURE__ */ m("p", { className: "bpb-upgrade__footer", children: [
7509
7509
  p("upgradeFooterEnterprise"),
7510
7510
  " ",
7511
- /* @__PURE__ */ l("a", { href: Y, target: "_blank", rel: "noopener noreferrer", children: p("upgradeContactUs") }),
7511
+ /* @__PURE__ */ l("a", { href: J, target: "_blank", rel: "noopener noreferrer", children: p("upgradeContactUs") }),
7512
7512
  " ",
7513
7513
  p("upgradeFooterAboutEnterprise"),
7514
7514
  " ",
@@ -7615,8 +7615,8 @@ const Jl = 4, Ql = ({
7615
7615
  isSubmitting: o,
7616
7616
  onSubscribe: i
7617
7617
  }) => {
7618
- var O, ie, oe, ne, P;
7619
- const { locale: c } = se(), { t: d } = fe(), { data: u } = Ht(), p = ((O = t == null ? void 0 : t.prices.month) == null ? void 0 : O.currency) ?? ((ie = t == null ? void 0 : t.prices.year) == null ? void 0 : ie.currency) ?? "usd", h = t == null ? void 0 : t.features.conversation_sessions, g = t && ve(t) === "community" ? d("conversationsUnit") : d("conversationsPerMonth"), f = t ? Vn(u, t, e) : null, w = (a == null ? void 0 : a.costs.immediate.amountDue) ?? 0, N = (a == null ? void 0 : a.costs.immediate.accountBalance) ?? 0, v = (a == null ? void 0 : a.costs.nextCycle.total) ?? 0, C = a != null && a.nextBillingDate ? Cl(a.nextBillingDate, 1) : null, k = C && !Qa(C) ? it(C, c) : null, I = t ? qn[ve(t)].slice(0, Jl) : [], S = t == null ? void 0 : t.features.ai_spend, T = S !== void 0 ? d("planFeatureAiUsageIncluded", { amount: de(S / qt, p, 0) }) : void 0, A = t ? ((oe = t.prices[e]) == null ? void 0 : oe.amount) ?? 0 : 0, _ = (a == null ? void 0 : a.costs.immediate.lineItems) ?? [], L = _.filter((Y) => Y.type === "discount"), U = _.filter((Y) => Y.type === "proration_credit" || Y.type === "proration_charge").reduce((Y, me) => Y + me.amount, 0), R = !!(a != null && a.subscription.plan.effectiveDate), V = ((ne = t == null ? void 0 : t.prices.month) == null ? void 0 : ne.amount) ?? 0, j = ((P = t == null ? void 0 : t.prices.year) == null ? void 0 : P.amount) ?? 0, $ = e === "year" && V > 0 && j > 0 ? Math.round(V * 12 - j) : 0, z = Math.round($ / 12);
7618
+ var U, H, ie, re, P;
7619
+ const { locale: c } = oe(), { t: d } = fe(), { data: u } = Ht(), p = ((U = t == null ? void 0 : t.prices.month) == null ? void 0 : U.currency) ?? ((H = t == null ? void 0 : t.prices.year) == null ? void 0 : H.currency) ?? "usd", h = t == null ? void 0 : t.features.conversation_sessions, g = t && ve(t) === "community" ? d("conversationsUnit") : d("conversationsPerMonth"), f = t ? Vn(u, t, e) : null, w = (a == null ? void 0 : a.costs.immediate.amountDue) ?? 0, N = (a == null ? void 0 : a.costs.immediate.accountBalance) ?? 0, v = (a == null ? void 0 : a.costs.nextCycle.total) ?? 0, C = a != null && a.nextBillingDate ? Cl(a.nextBillingDate, 1) : null, S = C && !Qa(C) ? it(C, c) : null, A = t ? qn[ve(t)].slice(0, Jl) : [], T = t == null ? void 0 : t.features.ai_spend, k = T !== void 0 ? d("planFeatureAiUsageIncluded", { amount: de(T / qt, p, 0) }) : void 0, I = t ? ((ie = t.prices[e]) == null ? void 0 : ie.amount) ?? 0 : 0, _ = (a == null ? void 0 : a.costs.immediate.lineItems) ?? [], L = _.filter((J) => J.type === "discount"), F = _.filter((J) => J.type === "proration_credit" || J.type === "proration_charge").reduce((J, me) => J + me.amount, 0), R = !!(a != null && a.subscription.plan.effectiveDate), Z = ((re = t == null ? void 0 : t.prices.month) == null ? void 0 : re.amount) ?? 0, j = ((P = t == null ? void 0 : t.prices.year) == null ? void 0 : P.amount) ?? 0, G = e === "year" && Z > 0 && j > 0 ? Math.round(Z * 12 - j) : 0, z = Math.round(G / 12);
7620
7620
  return /* @__PURE__ */ m("div", { className: "bpb-summary-wrap", children: [
7621
7621
  /* @__PURE__ */ m("div", { className: "bpb-summary bpb-glow", children: [
7622
7622
  /* @__PURE__ */ l("h3", { className: "bpb-summary__title", children: t ? `${ye(t.name)} plan` : /* @__PURE__ */ l(pe, { width: 140, height: 24 }) }),
@@ -7628,14 +7628,14 @@ const Jl = 4, Ql = ({
7628
7628
  packSize: ge(f.packSize)
7629
7629
  }) })
7630
7630
  ] }),
7631
- I.length > 0 && /* @__PURE__ */ m(Se, { children: [
7631
+ A.length > 0 && /* @__PURE__ */ m(Se, { children: [
7632
7632
  /* @__PURE__ */ l("p", { className: "bpb-summary__features-label", children: d("orderTopFeatures") }),
7633
- /* @__PURE__ */ l("ul", { className: "bpb-summary__features", children: I.map((Y) => {
7634
- const me = Hn(Y), ue = Zn[Y], F = Y === "AI usage included" ? T ?? (ue !== void 0 ? d(ue.label) : Y) : ue !== void 0 ? d(ue.label) : Y;
7633
+ /* @__PURE__ */ l("ul", { className: "bpb-summary__features", children: A.map((J) => {
7634
+ const me = Hn(J), ue = Zn[J], O = J === "AI usage included" ? k ?? (ue !== void 0 ? d(ue.label) : J) : ue !== void 0 ? d(ue.label) : J;
7635
7635
  return /* @__PURE__ */ m("li", { children: [
7636
7636
  /* @__PURE__ */ l(me, { size: 16, className: "bpb-summary__feature-icon" }),
7637
- /* @__PURE__ */ l("span", { children: F })
7638
- ] }, Y);
7637
+ /* @__PURE__ */ l("span", { children: O })
7638
+ ] }, J);
7639
7639
  }) })
7640
7640
  ] }),
7641
7641
  /* @__PURE__ */ l("hr", { className: "bpb-summary__divider" }),
@@ -7652,7 +7652,7 @@ const Jl = 4, Ql = ({
7652
7652
  */
7653
7653
  /* @__PURE__ */ m("div", { className: "bpb-summary__lines", children: [
7654
7654
  /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7655
- /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: k ? d("orderPlanFromDate", { plan: t ? ye(t.name) : "", date: k }) : `${t ? ye(t.name) : ""} plan` }),
7655
+ /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: S ? d("orderPlanFromDate", { plan: t ? ye(t.name) : "", date: S }) : `${t ? ye(t.name) : ""} plan` }),
7656
7656
  /* @__PURE__ */ m("span", { className: "bpb-summary__line-amount", children: [
7657
7657
  de(v, p),
7658
7658
  d(e === "year" ? "perYear" : "perMonth")
@@ -7666,7 +7666,7 @@ const Jl = 4, Ql = ({
7666
7666
  /* @__PURE__ */ l("span", { children: d("orderDueToday") }),
7667
7667
  /* @__PURE__ */ l("span", { children: de(w, p) })
7668
7668
  ] }),
7669
- U < 0 && /* @__PURE__ */ l("p", { className: "bpb-summary__addon-note", children: d("orderCreditTowardNext", { amount: de(Math.abs(U), p) }) })
7669
+ F < 0 && /* @__PURE__ */ l("p", { className: "bpb-summary__addon-note", children: d("orderCreditTowardNext", { amount: de(Math.abs(F), p) }) })
7670
7670
  ] }),
7671
7671
  a && !n && !R && /* @__PURE__ */ m("div", { className: "bpb-summary__lines", children: [
7672
7672
  /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
@@ -7677,17 +7677,17 @@ const Jl = 4, Ql = ({
7677
7677
  ")"
7678
7678
  ] }),
7679
7679
  /* @__PURE__ */ m("span", { className: "bpb-summary__line-amount", children: [
7680
- de(A, p),
7680
+ de(I, p),
7681
7681
  d(e === "year" ? "perYear" : "perMonth")
7682
7682
  ] })
7683
7683
  ] }),
7684
- L.map((Y, me) => /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7685
- /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: Y.description }),
7686
- /* @__PURE__ */ l("span", { className: "bpb-summary__line-amount", children: de(Y.amount, p) })
7687
- ] }, `${Y.id}-${me}`)),
7688
- U !== 0 && /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7689
- /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ l(Ja, { label: U < 0 ? d("orderCreditUnusedTime") : d("orderAdjustUnusedTime"), children: U < 0 ? d("orderCreditUnusedTimeDesc") : d("orderAdjustUnusedTimeDesc") }) }),
7690
- /* @__PURE__ */ l("span", { className: "bpb-summary__line-amount", children: de(U, p) })
7684
+ L.map((J, me) => /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7685
+ /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: J.description }),
7686
+ /* @__PURE__ */ l("span", { className: "bpb-summary__line-amount", children: de(J.amount, p) })
7687
+ ] }, `${J.id}-${me}`)),
7688
+ F !== 0 && /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7689
+ /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ l(Ja, { label: F < 0 ? d("orderCreditUnusedTime") : d("orderAdjustUnusedTime"), children: F < 0 ? d("orderCreditUnusedTimeDesc") : d("orderAdjustUnusedTimeDesc") }) }),
7690
+ /* @__PURE__ */ l("span", { className: "bpb-summary__line-amount", children: de(F, p) })
7691
7691
  ] }),
7692
7692
  N !== 0 && /* @__PURE__ */ m("div", { className: "bpb-summary__line", children: [
7693
7693
  /* @__PURE__ */ l("span", { className: "bpb-summary__line-label", children: d("orderAccountCredit") }),
@@ -7697,13 +7697,13 @@ const Jl = 4, Ql = ({
7697
7697
  /* @__PURE__ */ l("span", { children: d("orderDueToday") }),
7698
7698
  /* @__PURE__ */ l("span", { children: de(w, p) })
7699
7699
  ] }),
7700
- U < 0 && w === 0 && /* @__PURE__ */ l("p", { className: "bpb-summary__addon-note", children: d("orderBalanceAsCredit", { amount: de(Math.abs(U), p) }) })
7700
+ F < 0 && w === 0 && /* @__PURE__ */ l("p", { className: "bpb-summary__addon-note", children: d("orderBalanceAsCredit", { amount: de(Math.abs(F), p) }) })
7701
7701
  ] }),
7702
- $ > 0 && /* @__PURE__ */ m("div", { className: "bpb-summary__savings", children: [
7702
+ G > 0 && /* @__PURE__ */ m("div", { className: "bpb-summary__savings", children: [
7703
7703
  /* @__PURE__ */ l(Ns, { size: 18, className: "bpb-summary__savings-icon" }),
7704
7704
  /* @__PURE__ */ l("span", { children: d("orderSavingsNote", {
7705
7705
  monthlySavings: de(z, p, 0),
7706
- yearlySavings: de($, p, 0)
7706
+ yearlySavings: de(G, p, 0)
7707
7707
  }) })
7708
7708
  ] }),
7709
7709
  /* @__PURE__ */ l(
@@ -7724,10 +7724,10 @@ const Jl = 4, Ql = ({
7724
7724
  d(e === "month" ? "orderRenewsMonthly" : "orderRenewsAnnually"),
7725
7725
  a && /* @__PURE__ */ m(Se, { children: [
7726
7726
  " ",
7727
- k ? d("orderChargedStarting", {
7727
+ S ? d("orderChargedStarting", {
7728
7728
  amount: de(v, p),
7729
7729
  period: d(e === "month" ? "perMonthLong" : "perYearLong"),
7730
- date: k
7730
+ date: S
7731
7731
  }) : d("orderChargedNoDate", {
7732
7732
  amount: de(v, p),
7733
7733
  period: d(e === "month" ? "perMonthLong" : "perYearLong")
@@ -7791,13 +7791,14 @@ const Jl = 4, Ql = ({
7791
7791
  { type: "sg_gst", label: "SG GST", description: "Singaporean GST number" },
7792
7792
  { type: "sg_uen", label: "SG UEN", description: "Singaporean UEN" }
7793
7793
  ],
7794
- ZA: [{ type: "za_vat", label: "ZA VAT", description: "South African VAT number" }]
7794
+ ZA: [{ type: "za_vat", label: "ZA VAT", description: "South African VAT number" }],
7795
+ ES: [{ type: "es_cif", label: "ES CIF", description: "Spanish NIF number" }]
7795
7796
  }, td = [{ type: "eu_vat", label: "EU VAT", description: "European VAT number" }];
7796
7797
  function Ds(t) {
7797
7798
  if (!t)
7798
7799
  return [];
7799
- const e = t.toUpperCase();
7800
- return Xl.includes(e) ? td : ed[e] ?? [];
7800
+ const e = t.toUpperCase(), a = ed[e] ?? [];
7801
+ return Xl.includes(e) ? [...td, ...a] : a;
7801
7802
  }
7802
7803
  const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("label", { className: W("bpb-input", e), children: [
7803
7804
  /* @__PURE__ */ l("span", { className: "bpb-input__label", children: t }),
@@ -7891,7 +7892,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
7891
7892
  onTabChange: r,
7892
7893
  onPaymentChange: s
7893
7894
  }) => {
7894
- const { t: o } = fe(), [i, c] = X(!1), d = n === "new" || !e;
7895
+ const { t: o } = fe(), [i, c] = ee(!1), d = n === "new" || !e;
7895
7896
  return /* @__PURE__ */ m("section", { className: "bpb-step", children: [
7896
7897
  /* @__PURE__ */ l(Ls, { number: t, title: o("checkoutPaymentMethodTitle") }),
7897
7898
  e && /* @__PURE__ */ m("div", { className: "bpb-pay-tabs", role: "tablist", "aria-label": o("checkoutPaymentMethodTitle"), children: [
@@ -7969,15 +7970,15 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
7969
7970
  taxValue: N,
7970
7971
  onTaxValueChange: v
7971
7972
  }) => {
7972
- const { t: C } = fe(), [k, I] = X(!1), S = r || !e, T = Ds(d), A = T.find((_) => _.type === f);
7973
+ const { t: C } = fe(), [S, A] = ee(!1), T = r || !e, k = Ds(d), I = k.find((_) => _.type === f);
7973
7974
  return /* @__PURE__ */ m("section", { className: "bpb-step", children: [
7974
7975
  /* @__PURE__ */ l(Ls, { number: t, title: C("checkoutBillingAddressTitle") }),
7975
- n ? /* @__PURE__ */ l(pe, { height: 72 }) : S ? /* @__PURE__ */ m("div", { className: "bpb-payment-element", children: [
7976
- !k && /* @__PURE__ */ m("div", { className: "bpb-payment-element__skeleton", children: [
7976
+ n ? /* @__PURE__ */ l(pe, { height: 72 }) : T ? /* @__PURE__ */ m("div", { className: "bpb-payment-element", children: [
7977
+ !S && /* @__PURE__ */ m("div", { className: "bpb-payment-element__skeleton", children: [
7977
7978
  /* @__PURE__ */ l(pe, { height: 48 }),
7978
7979
  /* @__PURE__ */ l(pe, { height: 48 })
7979
7980
  ] }),
7980
- /* @__PURE__ */ l("div", { className: W(!k && "bpb-payment-element--hidden"), children: /* @__PURE__ */ l(
7981
+ /* @__PURE__ */ l("div", { className: W(!S && "bpb-payment-element--hidden"), children: /* @__PURE__ */ l(
7981
7982
  Ur,
7982
7983
  {
7983
7984
  options: {
@@ -8003,7 +8004,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8003
8004
  } : void 0
8004
8005
  },
8005
8006
  onReady: () => {
8006
- I(!0), i();
8007
+ A(!0), i();
8007
8008
  },
8008
8009
  onChange: (_) => {
8009
8010
  c(_.value.address.country || void 0);
@@ -8037,7 +8038,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8037
8038
  type: "checkbox",
8038
8039
  checked: u,
8039
8040
  onChange: (_) => {
8040
- p(_.target.checked), _.target.checked && !f && T[0] && w(T[0].type);
8041
+ p(_.target.checked), _.target.checked && !f && k[0] && w(k[0].type);
8041
8042
  }
8042
8043
  }
8043
8044
  ),
@@ -8054,14 +8055,14 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8054
8055
  autoComplete: "organization"
8055
8056
  }
8056
8057
  ),
8057
- T.length > 0 ? /* @__PURE__ */ m(Se, { children: [
8058
+ k.length > 0 ? /* @__PURE__ */ m(Se, { children: [
8058
8059
  /* @__PURE__ */ l(
8059
8060
  Es,
8060
8061
  {
8061
8062
  "aria-label": C("checkoutTaxIdTypeLabel"),
8062
8063
  value: f,
8063
8064
  onChange: (_) => w(_.target.value),
8064
- children: T.map((_) => /* @__PURE__ */ m("option", { value: _.type, children: [
8065
+ children: k.map((_) => /* @__PURE__ */ m("option", { value: _.type, children: [
8065
8066
  _.label,
8066
8067
  " — ",
8067
8068
  _.description
@@ -8071,7 +8072,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8071
8072
  /* @__PURE__ */ l(
8072
8073
  Rn,
8073
8074
  {
8074
- placeholder: A ? A.description : C("checkoutTaxIdNumberPlaceholder"),
8075
+ placeholder: I ? I.description : C("checkoutTaxIdNumberPlaceholder"),
8075
8076
  value: N,
8076
8077
  onChange: (_) => v(_.target.value),
8077
8078
  inputMode: "text"
@@ -8082,13 +8083,13 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8082
8083
  ] });
8083
8084
  }, sd = ({ planId: t, initialInterval: e, onSuccess: a }) => {
8084
8085
  var aa;
8085
- const n = zr(), r = jr(), { email: s, toast: o, analytics: i, isDark: c } = se(), { t: d } = fe(), [u, p] = X(e), [h, g] = X("payment"), [f, w] = X(null), [N, v] = X(!1), [C, k] = X(!1), [I, S] = X(!1), [T, A] = X(void 0), [_, L] = X(!1), [U, R] = X(""), [V, j] = X(""), [$, z] = X(""), [O, ie] = X(!1), [oe, ne] = X(null), [P, Y] = X(!1), me = ts(), { data: ue } = dt(), { data: F } = tt(), { data: G, isLoading: q } = Qr(), { data: x, isLoading: be, isError: Q } = Xr(), le = ue == null ? void 0 : ue.find((Ae) => Ae.id === t), ke = ((aa = G == null ? void 0 : G.paymentMethod) == null ? void 0 : aa.card) ?? null, J = (x == null ? void 0 : x.address) ?? null;
8086
+ const n = zr(), r = jr(), { email: s, toast: o, analytics: i, isDark: c } = oe(), { t: d } = fe(), [u, p] = ee(e), [h, g] = ee("payment"), [f, w] = ee(null), [N, v] = ee(!1), [C, S] = ee(!1), [A, T] = ee(!1), [k, I] = ee(void 0), [_, L] = ee(!1), [F, R] = ee(""), [Z, j] = ee(""), [G, z] = ee(""), [U, H] = ee(!1), [ie, re] = ee(null), [P, J] = ee(!1), me = ts(), { data: ue } = dt(), { data: O } = tt(), { data: K, isLoading: q } = Qr(), { data: x, isLoading: be, isError: X } = Xr(), le = ue == null ? void 0 : ue.find((Ae) => Ae.id === t), ke = ((aa = K == null ? void 0 : K.paymentMethod) == null ? void 0 : aa.card) ?? null, Q = (x == null ? void 0 : x.address) ?? null;
8086
8087
  Oe(() => {
8087
- f === null && !q && G !== void 0 && w(ke ? "saved" : "new");
8088
- }, [f, q, G, ke]), Oe(() => {
8089
- T === void 0 && J && A(J.country);
8090
- }, [T, J]);
8091
- const Ne = Le(() => ({ plan: { planId: t, interval: u } }), [t, u]), te = Jr(Ne), De = as(), at = ns(), Xt = rs(), xe = le ? ye(le.name) : "", ze = f === "new" || !ke, ea = C || !J, ta = ze ? N : !!ke, At = ea ? I : !0;
8088
+ f === null && !q && K !== void 0 && w(ke ? "saved" : "new");
8089
+ }, [f, q, K, ke]), Oe(() => {
8090
+ k === void 0 && Q && I(Q.country);
8091
+ }, [k, Q]);
8092
+ const Ne = Le(() => ({ plan: { planId: t, interval: u } }), [t, u]), ae = Jr(Ne), De = as(), at = ns(), Xt = rs(), xe = le ? ye(le.name) : "", ze = f === "new" || !ke, ea = C || !Q, ta = ze ? N : !!ke, At = ea ? A : !0;
8092
8093
  Oe(() => {
8093
8094
  g(ta ? "address" : "payment");
8094
8095
  }, [ta]), Oe(() => {
@@ -8099,25 +8100,25 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8099
8100
  }, Pt = (Ae) => {
8100
8101
  i.capture(we.PAYMENT_METHOD_SELECTED, { method: Ae === "saved" ? "saved_card" : "new_card" }), w(Ae);
8101
8102
  }, Ea = (Ae) => {
8102
- v(Ae), Y(!1);
8103
- }, bn = !!n && !!r && !!le && !be && !Q && !te.isError && !!te.data && ta && At && !O, yn = async () => {
8103
+ v(Ae), J(!1);
8104
+ }, bn = !!n && !!r && !!le && !be && !X && !ae.isError && !!ae.data && ta && At && !U, yn = async () => {
8104
8105
  var ct, na, ra, sa;
8105
- if (!n || !r || !le || be || Q)
8106
+ if (!n || !r || !le || be || X)
8106
8107
  return;
8107
- ie(!0), ne(null);
8108
+ H(!0), re(null);
8108
8109
  const Ae = (We, Dt) => i.capture(we.CHECKOUT_ERROR, { plan_name: xe, interval: u, step: h, reason: We, message: Dt });
8109
8110
  try {
8110
8111
  if (i.capture(we.PAYMENT_DETAILS_CONFIRMED, { plan_name: xe, interval: u }), ze && !P) {
8111
8112
  const Ge = r.getElement(Va);
8112
8113
  if (!Ge) {
8113
- ne(d("checkoutCardNotReady")), Ae("card_element_not_ready");
8114
+ re(d("checkoutCardNotReady")), Ae("card_element_not_ready");
8114
8115
  return;
8115
8116
  }
8116
8117
  const { clientSecret: vn } = await me.mutateAsync(), { error: nt, setupIntent: Fe } = await n.confirmCardSetup(vn, {
8117
8118
  payment_method: { card: Ge }
8118
8119
  });
8119
8120
  if (nt) {
8120
- ne(nt.message ?? d("checkoutPaymentSetupFailed")), i.capture(we.CHECKOUT_ERROR, {
8121
+ re(nt.message ?? d("checkoutPaymentSetupFailed")), i.capture(we.CHECKOUT_ERROR, {
8121
8122
  plan_name: xe,
8122
8123
  interval: u,
8123
8124
  step: h,
@@ -8128,10 +8129,10 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8128
8129
  return;
8129
8130
  }
8130
8131
  if (!(Fe != null && Fe.payment_method) || typeof Fe.payment_method != "string") {
8131
- ne(d("checkoutPaymentMethodMissing")), Ae("payment_method_missing");
8132
+ re(d("checkoutPaymentMethodMissing")), Ae("payment_method_missing");
8132
8133
  return;
8133
8134
  }
8134
- await De.mutateAsync({ paymentMethodId: Fe.payment_method }), Y(!0);
8135
+ await De.mutateAsync({ paymentMethodId: Fe.payment_method }), J(!0);
8135
8136
  }
8136
8137
  let We, Dt;
8137
8138
  if (ea) {
@@ -8139,7 +8140,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8139
8140
  if (Ge) {
8140
8141
  const { complete: vn, value: nt } = await Ge.getValue();
8141
8142
  if (!vn || !nt.address) {
8142
- ne(d("checkoutAddressIncomplete")), Ae("address_incomplete");
8143
+ re(d("checkoutAddressIncomplete")), Ae("address_incomplete");
8143
8144
  return;
8144
8145
  }
8145
8146
  const { address: Fe } = nt;
@@ -8153,30 +8154,30 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8153
8154
  };
8154
8155
  }
8155
8156
  }
8156
- const tr = _ && U.trim() || Dt || (x == null ? void 0 : x.name) || void 0, La = _ && V && $.trim() ? { type: V, value: $.trim() } : void 0, so = La ? [
8157
+ const tr = _ && F.trim() || Dt || (x == null ? void 0 : x.name) || void 0, La = _ && Z && G.trim() ? { type: Z, value: G.trim() } : void 0, so = La ? [
8157
8158
  ...((x == null ? void 0 : x.taxIds) ?? []).filter(
8158
8159
  (Ge) => Ge.type !== La.type || Ge.value !== La.value
8159
8160
  ),
8160
8161
  La
8161
8162
  ] : x == null ? void 0 : x.taxIds;
8162
8163
  (We || _ || tr !== ((x == null ? void 0 : x.name) ?? void 0)) && await at.mutateAsync({
8163
- address: We ?? J ?? void 0,
8164
+ address: We ?? Q ?? void 0,
8164
8165
  name: tr,
8165
8166
  taxIds: so
8166
8167
  });
8167
- const oo = ((na = te.data) == null ? void 0 : na.costs.immediate.amountDue) ?? 0, io = ((ra = te.data) == null ? void 0 : ra.costs.nextCycle.total) ?? 0;
8168
+ const oo = ((na = ae.data) == null ? void 0 : na.costs.immediate.amountDue) ?? 0, io = ((ra = ae.data) == null ? void 0 : ra.costs.nextCycle.total) ?? 0;
8168
8169
  await Xt.mutateAsync({ planId: t, interval: u }), i.capture(we.PLAN_UPGRADED, {
8169
8170
  plan_name: xe,
8170
8171
  interval: u,
8171
8172
  amount_paid: oo,
8172
8173
  next_cycle_amount: io,
8173
- previous_plan_name: (sa = ue == null ? void 0 : ue.find((Ge) => Ge.id === (F == null ? void 0 : F.plan.current.planId))) == null ? void 0 : sa.name.replace("Plan - ", ""),
8174
- previous_interval: F == null ? void 0 : F.plan.current.interval
8174
+ previous_plan_name: (sa = ue == null ? void 0 : ue.find((Ge) => Ge.id === (O == null ? void 0 : O.plan.current.planId))) == null ? void 0 : sa.name.replace("Plan - ", ""),
8175
+ previous_interval: O == null ? void 0 : O.plan.current.interval
8175
8176
  }), o({ type: "success", message: d("checkoutSuccessToast") }), a();
8176
8177
  } catch (We) {
8177
- ne(d("checkoutGenericError")), Ae("exception", We instanceof Error ? We.message : void 0), o({ type: "error", message: d("checkoutErrorToast") });
8178
+ re(d("checkoutGenericError")), Ae("exception", We instanceof Error ? We.message : void 0), o({ type: "error", message: d("checkoutErrorToast") });
8178
8179
  } finally {
8179
- ie(!1);
8180
+ H(!1);
8180
8181
  }
8181
8182
  };
8182
8183
  return /* @__PURE__ */ m("div", { className: "bpb-checkout__columns", children: [
@@ -8204,43 +8205,43 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8204
8205
  rd,
8205
8206
  {
8206
8207
  stepNumber: 2,
8207
- existingAddress: J,
8208
+ existingAddress: Q,
8208
8209
  customerName: (x == null ? void 0 : x.name) ?? null,
8209
8210
  isLoading: be,
8210
8211
  editing: C,
8211
- onEdit: () => k(!0),
8212
- onCancelEdit: J ? () => k(!1) : void 0,
8213
- onReady: () => S(!0),
8214
- onCountryChange: A,
8215
- country: T,
8212
+ onEdit: () => S(!0),
8213
+ onCancelEdit: Q ? () => S(!1) : void 0,
8214
+ onReady: () => T(!0),
8215
+ onCountryChange: I,
8216
+ country: k,
8216
8217
  isBusiness: _,
8217
8218
  onIsBusinessChange: L,
8218
- businessName: U,
8219
+ businessName: F,
8219
8220
  onBusinessNameChange: R,
8220
- taxType: V,
8221
+ taxType: Z,
8221
8222
  onTaxTypeChange: j,
8222
- taxValue: $,
8223
+ taxValue: G,
8223
8224
  onTaxValueChange: z
8224
8225
  }
8225
8226
  ),
8226
- oe && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-checkout__submit-error", children: oe })
8227
+ ie && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-checkout__submit-error", children: ie })
8227
8228
  ] }),
8228
8229
  /* @__PURE__ */ l("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ l(
8229
8230
  Ql,
8230
8231
  {
8231
8232
  plan: le,
8232
8233
  interval: u,
8233
- preview: te.data,
8234
- isLoadingPreview: te.isLoading,
8235
- isPreviewError: te.isError,
8234
+ preview: ae.data,
8235
+ isLoadingPreview: ae.isLoading,
8236
+ isPreviewError: ae.isError,
8236
8237
  canSubscribe: bn,
8237
- isSubmitting: O,
8238
+ isSubmitting: U,
8238
8239
  onSubscribe: () => void yn()
8239
8240
  }
8240
8241
  ) })
8241
8242
  ] });
8242
8243
  }, od = ({ open: t, onOpenChange: e, planId: a, interval: n, onBack: r, onSuccess: s }) => {
8243
- const { stripePromise: o, isDark: i, locale: c, isOutdatedBilling: d } = se(), { t: u } = fe(), p = Le(
8244
+ const { stripePromise: o, isDark: i, locale: c, isOutdatedBilling: d } = oe(), { t: u } = fe(), p = Le(
8244
8245
  () => ({
8245
8246
  appearance: Is(i),
8246
8247
  locale: xs(c)
@@ -8291,7 +8292,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8291
8292
  )
8292
8293
  ] });
8293
8294
  }, Uc = ({ open: t, onOpenChange: e, onSuccess: a, onUpgrade: n }) => {
8294
- const { isOutdatedBilling: r } = se(), { t: s } = fe();
8295
+ const { isOutdatedBilling: r } = oe(), { t: s } = fe();
8295
8296
  return r ? /* @__PURE__ */ l(
8296
8297
  Ze,
8297
8298
  {
@@ -8308,40 +8309,40 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8308
8309
  onSuccess: e,
8309
8310
  onUpgrade: a
8310
8311
  }) => {
8311
- var P, Y, me, ue;
8312
- const { toast: n, locale: r } = se(), { t: s } = fe(), { data: o } = tt(), { data: i } = Ht(), { data: c } = dt(), { data: d } = es(), u = Ai(), [p, h] = X(null), g = c == null ? void 0 : c.find((F) => F.id === (o == null ? void 0 : o.plan.current.planId)), f = (o == null ? void 0 : o.plan.current.interval) ?? "month", w = (d == null ? void 0 : d.addonsReadonly) ?? !1, N = o == null ? void 0 : o.plan.current.periodEnd, v = N && !Qa(N) ? it(N, r) : null, C = Le(() => {
8313
- var G;
8312
+ var P, J, me, ue;
8313
+ const { toast: n, locale: r } = oe(), { t: s } = fe(), { data: o } = tt(), { data: i } = Ht(), { data: c } = dt(), { data: d } = es(), u = Ai(), [p, h] = ee(null), g = c == null ? void 0 : c.find((O) => O.id === (o == null ? void 0 : o.plan.current.planId)), f = (o == null ? void 0 : o.plan.current.interval) ?? "month", w = (d == null ? void 0 : d.addonsReadonly) ?? !1, N = o == null ? void 0 : o.plan.current.periodEnd, v = N && !Qa(N) ? it(N, r) : null, C = Le(() => {
8314
+ var K;
8314
8315
  if (!o || !i)
8315
8316
  return null;
8316
- const F = {};
8317
+ const O = {};
8317
8318
  for (const q of i) {
8318
8319
  const x = o.addons[q.id];
8319
- F[q.id] = ((G = x == null ? void 0 : x.next) == null ? void 0 : G.quantity) ?? (x == null ? void 0 : x.current.quantity) ?? 0;
8320
+ O[q.id] = ((K = x == null ? void 0 : x.next) == null ? void 0 : K.quantity) ?? (x == null ? void 0 : x.current.quantity) ?? 0;
8320
8321
  }
8321
- return F;
8322
- }, [o, i]), k = p ?? C, I = Le(() => !i || !g ? [] : i.flatMap((F) => {
8323
- const G = jn(F, g, f);
8324
- return G ? [{ addon: F, price: G }] : [];
8325
- }), [i, g, f]), S = !!k && !!C && Object.keys(k).some((F) => k[F] !== C[F]), T = I.reduce(
8326
- (F, { addon: G, price: q }) => F + ((k == null ? void 0 : k[G.id]) ?? 0) * q.amount,
8322
+ return O;
8323
+ }, [o, i]), S = p ?? C, A = Le(() => !i || !g ? [] : i.flatMap((O) => {
8324
+ const K = jn(O, g, f);
8325
+ return K ? [{ addon: O, price: K }] : [];
8326
+ }), [i, g, f]), T = !!S && !!C && Object.keys(S).some((O) => S[O] !== C[O]), k = A.reduce(
8327
+ (O, { addon: K, price: q }) => O + ((S == null ? void 0 : S[K.id]) ?? 0) * q.amount,
8327
8328
  0
8328
- ), A = Le(
8329
- () => g && k ? { plan: { planId: g.id, interval: f }, addons: k } : null,
8330
- [g, f, k]
8331
- ), _ = Jr(A ?? { plan: { planId: "", interval: f } }, {
8332
- enabled: !!A && S
8333
- }), L = ((P = g == null ? void 0 : g.prices[f]) == null ? void 0 : P.currency) ?? "usd", U = ((Y = _.data) == null ? void 0 : Y.costs.immediate.amountDue) ?? 0, R = (me = _.data) == null ? void 0 : me.nextBillingDate, V = R && !Qa(R) ? it(R, r) : null, j = ((ue = g == null ? void 0 : g.prices[f]) == null ? void 0 : ue.amount) ?? 0, $ = j + T, z = g && k ? Sl(g, i, k) : [], O = (F, G) => G === "bytes" ? Zt(F) : ge(F), ie = (F, G) => {
8334
- const q = i == null ? void 0 : i.find((le) => le.id === F), x = q == null ? void 0 : q.increments;
8335
- if (!x || G <= 0)
8329
+ ), I = Le(
8330
+ () => g && S ? { plan: { planId: g.id, interval: f }, addons: S } : null,
8331
+ [g, f, S]
8332
+ ), _ = Jr(I ?? { plan: { planId: "", interval: f } }, {
8333
+ enabled: !!I && T
8334
+ }), L = ((P = g == null ? void 0 : g.prices[f]) == null ? void 0 : P.currency) ?? "usd", F = ((J = _.data) == null ? void 0 : J.costs.immediate.amountDue) ?? 0, R = (me = _.data) == null ? void 0 : me.nextBillingDate, Z = R && !Qa(R) ? it(R, r) : null, j = ((ue = g == null ? void 0 : g.prices[f]) == null ? void 0 : ue.amount) ?? 0, G = j + k, z = g && S ? Sl(g, i, S) : [], U = (O, K) => K === "bytes" ? Zt(O) : ge(O), H = (O, K) => {
8335
+ const q = i == null ? void 0 : i.find((le) => le.id === O), x = q == null ? void 0 : q.increments;
8336
+ if (!x || K <= 0)
8336
8337
  return null;
8337
8338
  const be = x.conversation_sessions ?? 0;
8338
8339
  if (be > 0)
8339
- return s("addonsConvos", { n: ge(be * G) });
8340
- const Q = x.file_storage ?? 0;
8341
- return Q > 0 ? Zt(Q * G) : null;
8342
- }, oe = () => {
8343
- k && u.mutate(
8344
- { addons: k },
8340
+ return s("addonsConvos", { n: ge(be * K) });
8341
+ const X = x.file_storage ?? 0;
8342
+ return X > 0 ? Zt(X * K) : null;
8343
+ }, ie = () => {
8344
+ S && u.mutate(
8345
+ { addons: S },
8345
8346
  {
8346
8347
  onSuccess: () => {
8347
8348
  n({ type: "success", message: s("addonsUpdateSuccess") }), t(!1), e == null || e();
@@ -8349,14 +8350,14 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8349
8350
  onError: () => n({ type: "error", message: s("addonsUpdateError") })
8350
8351
  }
8351
8352
  );
8352
- }, ne = !o || !i || !c;
8353
+ }, re = !o || !i || !c;
8353
8354
  return /* @__PURE__ */ m("div", { className: "bpb-manage-addons", children: [
8354
8355
  /* @__PURE__ */ l("h2", { className: "bpb-manage-addons__title", children: s("addonsDialogTitle") }),
8355
- (ne || I.length > 0) && /* @__PURE__ */ l("p", { className: "bpb-manage-addons__subtitle", children: g ? s("addonsSubtitleWithPlan", { planName: ye(g.name) }) : s("addonsSubtitleGeneric") }),
8356
- ne ? /* @__PURE__ */ m("div", { className: "bpb-manage-addons__loading", "aria-busy": "true", children: [
8356
+ (re || A.length > 0) && /* @__PURE__ */ l("p", { className: "bpb-manage-addons__subtitle", children: g ? s("addonsSubtitleWithPlan", { planName: ye(g.name) }) : s("addonsSubtitleGeneric") }),
8357
+ re ? /* @__PURE__ */ m("div", { className: "bpb-manage-addons__loading", "aria-busy": "true", children: [
8357
8358
  /* @__PURE__ */ l(pe, { height: 56 }),
8358
8359
  /* @__PURE__ */ l(pe, { height: 56 })
8359
- ] }) : I.length === 0 ? /* @__PURE__ */ m(Se, { children: [
8360
+ ] }) : A.length === 0 ? /* @__PURE__ */ m(Se, { children: [
8360
8361
  /* @__PURE__ */ m("div", { className: "bpb-manage-addons__upgrade-gate", children: [
8361
8362
  /* @__PURE__ */ l(Fl, { size: 28, className: "bpb-manage-addons__upgrade-icon" }),
8362
8363
  /* @__PURE__ */ m("div", { className: "bpb-manage-addons__upgrade-text", children: [
@@ -8376,15 +8377,15 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8376
8377
  }
8377
8378
  ) : /* @__PURE__ */ l(Ie, { variant: "outline", onClick: () => t(!1), children: s("close") }) })
8378
8379
  ] }) : /* @__PURE__ */ m(Se, { children: [
8379
- /* @__PURE__ */ l("div", { className: "bpb-addons", children: I.map(({ addon: F, price: G }) => {
8380
+ /* @__PURE__ */ l("div", { className: "bpb-addons", children: A.map(({ addon: O, price: K }) => {
8380
8381
  var le;
8381
- const q = ((le = o == null ? void 0 : o.addons[F.id]) == null ? void 0 : le.current.quantity) ?? 0, x = (k == null ? void 0 : k[F.id]) ?? 0, be = x !== q ? x === 0 ? v ? s("addonRemovedOnDate", { activeNow: q, date: v }) : s("addonRemovedNextCycle", { activeNow: q }) : v ? s("addonChangedOnDate", { activeNow: q, pending: x, date: v }) : s("addonChangedNextCycle", { activeNow: q, pending: x }) : q > 0 ? s("addonActiveOnly", { count: q }) : null, Q = ie(F.id, x);
8382
+ const q = ((le = o == null ? void 0 : o.addons[O.id]) == null ? void 0 : le.current.quantity) ?? 0, x = (S == null ? void 0 : S[O.id]) ?? 0, be = x !== q ? x === 0 ? v ? s("addonRemovedOnDate", { activeNow: q, date: v }) : s("addonRemovedNextCycle", { activeNow: q }) : v ? s("addonChangedOnDate", { activeNow: q, pending: x, date: v }) : s("addonChangedNextCycle", { activeNow: q, pending: x }) : q > 0 ? s("addonActiveOnly", { count: q }) : null, X = H(O.id, x);
8382
8383
  return /* @__PURE__ */ m("div", { className: "bpb-addon-row", children: [
8383
8384
  /* @__PURE__ */ m("div", { className: "bpb-addon-row__info", children: [
8384
- /* @__PURE__ */ l("span", { className: "bpb-addon-row__name", children: pt[F.id] ? s(pt[F.id]) : za(F.name) }),
8385
- /* @__PURE__ */ l("span", { className: "bpb-addon-row__description", children: Sr[F.id] ? s(Sr[F.id]) : F.description }),
8385
+ /* @__PURE__ */ l("span", { className: "bpb-addon-row__name", children: pt[O.id] ? s(pt[O.id]) : za(O.name) }),
8386
+ /* @__PURE__ */ l("span", { className: "bpb-addon-row__description", children: Sr[O.id] ? s(Sr[O.id]) : O.description }),
8386
8387
  /* @__PURE__ */ m("span", { className: "bpb-addon-row__price", children: [
8387
- de(G.amount, G.currency),
8388
+ de(K.amount, K.currency),
8388
8389
  " ",
8389
8390
  s("addonsEach")
8390
8391
  ] }),
@@ -8400,35 +8401,35 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8400
8401
  )
8401
8402
  ] }),
8402
8403
  /* @__PURE__ */ m("div", { className: "bpb-addon-row__control", children: [
8403
- Q && /* @__PURE__ */ l("span", { className: "bpb-addon-row__grant", children: Q }),
8404
+ X && /* @__PURE__ */ l("span", { className: "bpb-addon-row__grant", children: X }),
8404
8405
  /* @__PURE__ */ l(
8405
8406
  id,
8406
8407
  {
8407
- "aria-label": `${pt[F.id] ? s(pt[F.id]) : za(F.name)} quantity`,
8408
+ "aria-label": `${pt[O.id] ? s(pt[O.id]) : za(O.name)} quantity`,
8408
8409
  value: x,
8409
- onChange: (ke) => h({ ...k ?? {}, [F.id]: ke })
8410
+ onChange: (ke) => h({ ...S ?? {}, [O.id]: ke })
8410
8411
  }
8411
8412
  )
8412
8413
  ] })
8413
- ] }, F.id);
8414
+ ] }, O.id);
8414
8415
  }) }),
8415
8416
  z.length > 0 && /* @__PURE__ */ m("div", { className: "bpb-manage-addons__limits", children: [
8416
8417
  /* @__PURE__ */ l("p", { className: "bpb-manage-addons__limits-title", children: s("addonsNewLimits") }),
8417
- z.map((F) => {
8418
- const G = {
8418
+ z.map((O) => {
8419
+ const K = {
8419
8420
  conversation_sessions: "resourceConversations",
8420
8421
  table_rows: "resourceTableRows",
8421
8422
  vector_db_storage: "resourceVectorDb",
8422
8423
  file_storage: "resourceFileStorage"
8423
- }[F.key];
8424
+ }[O.key];
8424
8425
  return /* @__PURE__ */ m("div", { className: "bpb-manage-addons__limit-row", children: [
8425
- /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-label", children: G ? s(G) : F.label }),
8426
+ /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-label", children: K ? s(K) : O.label }),
8426
8427
  /* @__PURE__ */ m("span", { className: "bpb-manage-addons__limit-values", children: [
8427
- /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-now", children: O(F.now, F.unit) }),
8428
+ /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-now", children: U(O.now, O.unit) }),
8428
8429
  /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-arrow", "aria-hidden": !0, children: "→" }),
8429
- /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-next", children: O(F.next, F.unit) })
8430
+ /* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-next", children: U(O.next, O.unit) })
8430
8431
  ] })
8431
- ] }, F.key);
8432
+ ] }, O.key);
8432
8433
  })
8433
8434
  ] }),
8434
8435
  /* @__PURE__ */ m("div", { className: "bpb-manage-addons__totals", children: [
@@ -8436,38 +8437,38 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8436
8437
  /* @__PURE__ */ l("span", { children: g ? s("addonsPlanLine", { planName: ye(g.name) }) : s("addonsGenericPlan") }),
8437
8438
  /* @__PURE__ */ l("span", { children: de(j, L) })
8438
8439
  ] }),
8439
- I.map(({ addon: F, price: G }) => {
8440
- const q = (k == null ? void 0 : k[F.id]) ?? 0;
8440
+ A.map(({ addon: O, price: K }) => {
8441
+ const q = (S == null ? void 0 : S[O.id]) ?? 0;
8441
8442
  return q <= 0 ? null : /* @__PURE__ */ m("div", { className: "bpb-manage-addons__line", children: [
8442
8443
  /* @__PURE__ */ m("span", { children: [
8443
8444
  q,
8444
8445
  "×",
8445
8446
  " ",
8446
- pt[F.id] ? s(pt[F.id]) : za(F.name)
8447
+ pt[O.id] ? s(pt[O.id]) : za(O.name)
8447
8448
  ] }),
8448
- /* @__PURE__ */ l("span", { children: de(G.amount * q, L) })
8449
- ] }, F.id);
8449
+ /* @__PURE__ */ l("span", { children: de(K.amount * q, L) })
8450
+ ] }, O.id);
8450
8451
  }),
8451
8452
  /* @__PURE__ */ m("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--total", children: [
8452
8453
  /* @__PURE__ */ l("span", { children: s(f === "year" ? "addonsTotalYearly" : "addonsTotalMonthly") }),
8453
8454
  /* @__PURE__ */ m("span", { children: [
8454
- de($, L),
8455
+ de(G, L),
8455
8456
  s(f === "year" ? "perYear" : "perMonth")
8456
8457
  ] })
8457
8458
  ] }),
8458
- S && /* @__PURE__ */ m("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--due", children: [
8459
+ T && /* @__PURE__ */ m("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--due", children: [
8459
8460
  /* @__PURE__ */ l("span", { children: s("addonsDueToday") }),
8460
- /* @__PURE__ */ l("span", { children: _.isLoading ? "…" : _.isError ? "—" : de(Math.max(U, 0), L) })
8461
+ /* @__PURE__ */ l("span", { children: _.isLoading ? "…" : _.isError ? "—" : de(Math.max(F, 0), L) })
8461
8462
  ] })
8462
8463
  ] }),
8463
- S && !_.isError && /* @__PURE__ */ m("p", { className: "bpb-manage-addons__note", children: [
8464
- U > 0 ? s("addonsChargedNow", { amount: de(U, L) }) : s("addonsNoChargeToday"),
8465
- V ? s("addonsRenewalWithDate", {
8466
- date: V,
8467
- amount: de(T, L),
8464
+ T && !_.isError && /* @__PURE__ */ m("p", { className: "bpb-manage-addons__note", children: [
8465
+ F > 0 ? s("addonsChargedNow", { amount: de(F, L) }) : s("addonsNoChargeToday"),
8466
+ Z ? s("addonsRenewalWithDate", {
8467
+ date: Z,
8468
+ amount: de(k, L),
8468
8469
  interval: s(f === "year" ? "perYear" : "perMonth")
8469
8470
  }) : s("addonsRenewalNoDate", {
8470
- amount: de(T, L),
8471
+ amount: de(k, L),
8471
8472
  interval: s(f === "year" ? "perYear" : "perMonth")
8472
8473
  })
8473
8474
  ] }),
@@ -8478,9 +8479,9 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8478
8479
  Ie,
8479
8480
  {
8480
8481
  variant: "primary",
8481
- disabled: !S || w,
8482
+ disabled: !T || w,
8482
8483
  loading: u.isPending,
8483
- onClick: oe,
8484
+ onClick: ie,
8484
8485
  children: s("addonsUpdateSubscription")
8485
8486
  }
8486
8487
  )
@@ -8488,10 +8489,10 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8488
8489
  ] })
8489
8490
  ] });
8490
8491
  }, zc = ({ open: t, onOpenChange: e }) => {
8491
- const { isOutdatedBilling: a } = se(), { t: n } = fe();
8492
+ const { isOutdatedBilling: a } = oe(), { t: n } = fe();
8492
8493
  return a ? /* @__PURE__ */ l(Ze, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(Qt, {}) }) : /* @__PURE__ */ l(Ze, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(dd, { open: t }) });
8493
8494
  }, dd = ({ open: t }) => {
8494
- const { locale: e, analytics: a } = se(), { t: n } = fe(), { data: r, isLoading: s, isError: o } = Si({ enabled: t }), i = (r == null ? void 0 : r.invoices) ?? [], c = {
8495
+ const { locale: e, analytics: a } = oe(), { t: n } = fe(), { data: r, isLoading: s, isError: o } = Si({ enabled: t }), i = (r == null ? void 0 : r.invoices) ?? [], c = {
8495
8496
  paid: n("invoiceStatusPaid"),
8496
8497
  open: n("invoiceStatusDue"),
8497
8498
  draft: n("invoiceStatusDraft"),
@@ -8528,7 +8529,7 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8528
8529
  ] });
8529
8530
  }, jc = ({ open: t, onOpenChange: e, onSuccess: a }) => {
8530
8531
  var g;
8531
- const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: o } = se(), { t: i } = fe(), c = ts(), d = (g = c.data) == null ? void 0 : g.clientSecret, { mutate: u, reset: p } = c;
8532
+ const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: o } = oe(), { t: i } = fe(), c = ts(), d = (g = c.data) == null ? void 0 : g.clientSecret, { mutate: u, reset: p } = c;
8532
8533
  Oe(() => {
8533
8534
  t && !o ? u() : p();
8534
8535
  }, [t, o, u, p]);
@@ -8576,30 +8577,30 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8576
8577
  onSuccess: a
8577
8578
  }) => {
8578
8579
  var ke;
8579
- const n = zr(), r = jr(), { toast: s, analytics: o } = se(), { t: i } = fe(), { data: c, isLoading: d } = Qr(), { data: u, isLoading: p } = Xr(), h = as(), g = ns(), f = ((ke = c == null ? void 0 : c.paymentMethod) == null ? void 0 : ke.card) ?? null, w = (u == null ? void 0 : u.address) ?? null, N = (u == null ? void 0 : u.taxIds) ?? [], [v, C] = X(!1), [k, I] = X(!1), [S, T] = X(!1), [A, _] = X(!1), [L, U] = X(null), [R, V] = X(!1), [j, $] = X(!1), [z, O] = X(null), [ie, oe] = X(w == null ? void 0 : w.country), [ne, P] = X(N.length > 0), [Y, me] = X(null), ue = Y ?? N.map((J) => ({ type: J.type, value: J.value })), F = Ds(ie), G = v || !f, q = (J, Ne) => me(ue.map((te, De) => De === J ? { ...te, ...Ne } : te)), x = () => {
8580
- var J;
8581
- return me([...ue, { type: ((J = F[0]) == null ? void 0 : J.type) ?? "", value: "" }]);
8582
- }, be = (J) => me(ue.filter((Ne, te) => te !== J)), Q = async () => {
8580
+ const n = zr(), r = jr(), { toast: s, analytics: o } = oe(), { t: i } = fe(), { data: c, isLoading: d } = Qr(), { data: u, isLoading: p } = Xr(), h = as(), g = ns(), f = ((ke = c == null ? void 0 : c.paymentMethod) == null ? void 0 : ke.card) ?? null, w = (u == null ? void 0 : u.address) ?? null, N = (u == null ? void 0 : u.taxIds) ?? [], [v, C] = ee(!1), [S, A] = ee(!1), [T, k] = ee(!1), [I, _] = ee(!1), [L, F] = ee(null), [R, Z] = ee(!1), [j, G] = ee(!1), [z, U] = ee(null), [H, ie] = ee(w == null ? void 0 : w.country), [re, P] = ee(N.length > 0), [J, me] = ee(null), ue = J ?? N.map((Q) => ({ type: Q.type, value: Q.value })), O = Ds(H), K = v || !f, q = (Q, Ne) => me(ue.map((ae, De) => De === Q ? { ...ae, ...Ne } : ae)), x = () => {
8581
+ var Q;
8582
+ return me([...ue, { type: ((Q = O[0]) == null ? void 0 : Q.type) ?? "", value: "" }]);
8583
+ }, be = (Q) => me(ue.filter((Ne, ae) => ae !== Q)), X = async () => {
8583
8584
  if (!n || !r)
8584
8585
  return;
8585
- const J = r.getElement(Va);
8586
- if (J) {
8587
- _(!0), U(null);
8586
+ const Q = r.getElement(Va);
8587
+ if (Q) {
8588
+ _(!0), F(null);
8588
8589
  try {
8589
- const { error: Ne, setupIntent: te } = await n.confirmCardSetup(t, {
8590
- payment_method: { card: J }
8590
+ const { error: Ne, setupIntent: ae } = await n.confirmCardSetup(t, {
8591
+ payment_method: { card: Q }
8591
8592
  });
8592
8593
  if (Ne) {
8593
- U(Ne.message ?? i("paymentCardSaveError"));
8594
+ F(Ne.message ?? i("paymentCardSaveError"));
8594
8595
  return;
8595
8596
  }
8596
- if (!(te != null && te.payment_method) || typeof te.payment_method != "string") {
8597
- U(i("paymentMethodMissing"));
8597
+ if (!(ae != null && ae.payment_method) || typeof ae.payment_method != "string") {
8598
+ F(i("paymentMethodMissing"));
8598
8599
  return;
8599
8600
  }
8600
- await h.mutateAsync({ paymentMethodId: te.payment_method }), o.capture(we.PAYMENT_METHOD_UPDATED), s({ type: "success", message: i("paymentCardUpdated") }), C(!1), a == null || a();
8601
+ await h.mutateAsync({ paymentMethodId: ae.payment_method }), o.capture(we.PAYMENT_METHOD_UPDATED), s({ type: "success", message: i("paymentCardUpdated") }), C(!1), a == null || a();
8601
8602
  } catch {
8602
- U(i("paymentCardGenericError"));
8603
+ F(i("paymentCardGenericError"));
8603
8604
  } finally {
8604
8605
  _(!1);
8605
8606
  }
@@ -8607,17 +8608,17 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8607
8608
  }, le = async () => {
8608
8609
  if (!r)
8609
8610
  return;
8610
- const J = r.getElement("address");
8611
- if (!J)
8611
+ const Q = r.getElement("address");
8612
+ if (!Q)
8612
8613
  return;
8613
- const { complete: Ne, value: te } = await J.getValue();
8614
- if (!Ne || !te.address) {
8615
- O(i("paymentAddressIncomplete"));
8614
+ const { complete: Ne, value: ae } = await Q.getValue();
8615
+ if (!Ne || !ae.address) {
8616
+ U(i("paymentAddressIncomplete"));
8616
8617
  return;
8617
8618
  }
8618
- $(!0), O(null);
8619
+ G(!0), U(null);
8619
8620
  try {
8620
- const { address: De, name: at } = te, Xt = ue.filter((xe) => !!xe.type && xe.value.trim() !== "").map((xe) => ({ type: xe.type, value: xe.value.trim() }));
8621
+ const { address: De, name: at } = ae, Xt = ue.filter((xe) => !!xe.type && xe.value.trim() !== "").map((xe) => ({ type: xe.type, value: xe.value.trim() }));
8621
8622
  await g.mutateAsync({
8622
8623
  address: {
8623
8624
  lineOne: De.line1 ?? "",
@@ -8632,28 +8633,28 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8632
8633
  }), o.capture(we.BILLING_ADDRESS_UPDATED), s({ type: "success", message: i("paymentDetailsUpdated") }), a == null || a();
8633
8634
  } catch (De) {
8634
8635
  const at = De instanceof Error && De.message ? De.message : i("paymentAddressError");
8635
- O(at), s({ type: "error", message: i("paymentDetailsUpdateError") });
8636
+ U(at), s({ type: "error", message: i("paymentDetailsUpdateError") });
8636
8637
  } finally {
8637
- $(!1);
8638
+ G(!1);
8638
8639
  }
8639
8640
  };
8640
8641
  return /* @__PURE__ */ m("div", { className: "bpb-payment-dialog__sections", children: [
8641
8642
  /* @__PURE__ */ m("section", { className: "bpb-payment-dialog__section", children: [
8642
8643
  /* @__PURE__ */ l("h3", { className: "bpb-payment-dialog__section-title", children: i("paymentMethodSection") }),
8643
- d ? /* @__PURE__ */ l(pe, { height: 56 }) : G ? /* @__PURE__ */ m("div", { className: "bpb-payment-element", children: [
8644
- !k && /* @__PURE__ */ l(pe, { height: 48 }),
8645
- /* @__PURE__ */ l("div", { className: k ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ l(
8644
+ d ? /* @__PURE__ */ l(pe, { height: 56 }) : K ? /* @__PURE__ */ m("div", { className: "bpb-payment-element", children: [
8645
+ !S && /* @__PURE__ */ l(pe, { height: 48 }),
8646
+ /* @__PURE__ */ l("div", { className: S ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ l(
8646
8647
  Va,
8647
8648
  {
8648
8649
  options: { style: As(e), hidePostalCode: !0 },
8649
- onReady: () => I(!0),
8650
- onChange: (J) => T(J.complete)
8650
+ onReady: () => A(!0),
8651
+ onChange: (Q) => k(Q.complete)
8651
8652
  }
8652
8653
  ) }),
8653
8654
  L && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-payment-dialog__field-error", children: L }),
8654
8655
  /* @__PURE__ */ m("div", { className: "bpb-payment-dialog__section-actions", children: [
8655
- f && /* @__PURE__ */ l(Ie, { variant: "ghost", onClick: () => C(!1), disabled: A, children: i("cancel") }),
8656
- /* @__PURE__ */ l(Ie, { variant: "primary", disabled: !S, loading: A, onClick: Q, children: i("paymentSaveCard") })
8656
+ f && /* @__PURE__ */ l(Ie, { variant: "ghost", onClick: () => C(!1), disabled: I, children: i("cancel") }),
8657
+ /* @__PURE__ */ l(Ie, { variant: "primary", disabled: !T, loading: I, onClick: X, children: i("paymentSaveCard") })
8657
8658
  ] })
8658
8659
  ] }) : /* @__PURE__ */ m("div", { className: "bpb-saved-card", children: [
8659
8660
  /* @__PURE__ */ l(Ts, { brand: f.brand }),
@@ -8692,8 +8693,8 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8692
8693
  }
8693
8694
  } : void 0
8694
8695
  },
8695
- onReady: () => V(!0),
8696
- onChange: (J) => oe(J.value.address.country || void 0)
8696
+ onReady: () => Z(!0),
8697
+ onChange: (Q) => ie(Q.value.address.country || void 0)
8697
8698
  }
8698
8699
  ) }),
8699
8700
  /* @__PURE__ */ m("div", { className: "bpb-tax-section", children: [
@@ -8702,14 +8703,14 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8702
8703
  {
8703
8704
  type: "button",
8704
8705
  className: "bpb-tax-toggle",
8705
- "aria-expanded": ne,
8706
- onClick: () => P((J) => !J),
8706
+ "aria-expanded": re,
8707
+ onClick: () => P((Q) => !Q),
8707
8708
  children: [
8708
8709
  /* @__PURE__ */ l(
8709
8710
  Jt,
8710
8711
  {
8711
8712
  size: 16,
8712
- className: W("bpb-tax-toggle__chevron", ne && "bpb-tax-toggle__chevron--open")
8713
+ className: W("bpb-tax-toggle__chevron", re && "bpb-tax-toggle__chevron--open")
8713
8714
  }
8714
8715
  ),
8715
8716
  i("paymentTaxIds"),
@@ -8717,19 +8718,19 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8717
8718
  ]
8718
8719
  }
8719
8720
  ),
8720
- ne && /* @__PURE__ */ m("div", { className: "bpb-tax", children: [
8721
+ re && /* @__PURE__ */ m("div", { className: "bpb-tax", children: [
8721
8722
  ue.length === 0 && /* @__PURE__ */ l("p", { className: "bpb-tax__empty", children: i("paymentTaxEmpty") }),
8722
- ue.map((J, Ne) => /* @__PURE__ */ m("div", { className: "bpb-tax__row", children: [
8723
+ ue.map((Q, Ne) => /* @__PURE__ */ m("div", { className: "bpb-tax__row", children: [
8723
8724
  /* @__PURE__ */ m(
8724
8725
  Es,
8725
8726
  {
8726
8727
  "aria-label": i("paymentTaxIdType"),
8727
- value: J.type,
8728
- onChange: (te) => q(Ne, { type: te.target.value }),
8728
+ value: Q.type,
8729
+ onChange: (ae) => q(Ne, { type: ae.target.value }),
8729
8730
  children: [
8730
8731
  /* @__PURE__ */ l("option", { value: "", children: i("paymentTaxSelectType") }),
8731
- F.map((te) => /* @__PURE__ */ l("option", { value: te.type, children: te.label }, te.type)),
8732
- J.type && !F.some((te) => te.type === J.type) && /* @__PURE__ */ l("option", { value: J.type, children: J.type })
8732
+ O.map((ae) => /* @__PURE__ */ l("option", { value: ae.type, children: ae.label }, ae.type)),
8733
+ Q.type && !O.some((ae) => ae.type === Q.type) && /* @__PURE__ */ l("option", { value: Q.type, children: Q.type })
8733
8734
  ]
8734
8735
  }
8735
8736
  ),
@@ -8737,8 +8738,8 @@ const Rn = ({ label: t, className: e, id: a, ...n }) => t ? /* @__PURE__ */ m("l
8737
8738
  Rn,
8738
8739
  {
8739
8740
  placeholder: i("paymentTaxIdNumber"),
8740
- value: J.value,
8741
- onChange: (te) => q(Ne, { value: te.target.value })
8741
+ value: Q.value,
8742
+ onChange: (ae) => q(Ne, { value: ae.target.value })
8742
8743
  }
8743
8744
  ),
8744
8745
  /* @__PURE__ */ l(
@@ -9812,7 +9813,7 @@ var Jn = {};
9812
9813
  };
9813
9814
  Object.defineProperty(t, "__esModule", { value: !0 }), t.isAsync = t.isValid = t.isDirty = t.isAborted = t.OK = t.DIRTY = t.INVALID = t.ParseStatus = t.EMPTY_PATH = t.makeIssue = void 0, t.addIssueToContext = s;
9814
9815
  const a = _t, n = e(mn), r = (g) => {
9815
- const { data: f, path: w, errorMaps: N, issueData: v } = g, C = [...w, ...v.path || []], k = {
9816
+ const { data: f, path: w, errorMaps: N, issueData: v } = g, C = [...w, ...v.path || []], S = {
9816
9817
  ...v,
9817
9818
  path: C
9818
9819
  };
@@ -9822,14 +9823,14 @@ var Jn = {};
9822
9823
  path: C,
9823
9824
  message: v.message
9824
9825
  };
9825
- let I = "";
9826
- const S = N.filter((T) => !!T).slice().reverse();
9827
- for (const T of S)
9828
- I = T(k, { data: f, defaultError: I }).message;
9826
+ let A = "";
9827
+ const T = N.filter((k) => !!k).slice().reverse();
9828
+ for (const k of T)
9829
+ A = k(S, { data: f, defaultError: A }).message;
9829
9830
  return {
9830
9831
  ...v,
9831
9832
  path: C,
9832
- message: I
9833
+ message: A
9833
9834
  };
9834
9835
  };
9835
9836
  t.makeIssue = r, t.EMPTY_PATH = [];
@@ -9873,10 +9874,10 @@ var Jn = {};
9873
9874
  static async mergeObjectAsync(f, w) {
9874
9875
  const N = [];
9875
9876
  for (const v of w) {
9876
- const C = await v.key, k = await v.value;
9877
+ const C = await v.key, S = await v.value;
9877
9878
  N.push({
9878
9879
  key: C,
9879
- value: k
9880
+ value: S
9880
9881
  });
9881
9882
  }
9882
9883
  return o.mergeObjectSync(f, N);
@@ -9884,10 +9885,10 @@ var Jn = {};
9884
9885
  static mergeObjectSync(f, w) {
9885
9886
  const N = {};
9886
9887
  for (const v of w) {
9887
- const { key: C, value: k } = v;
9888
- if (C.status === "aborted" || k.status === "aborted")
9888
+ const { key: C, value: S } = v;
9889
+ if (C.status === "aborted" || S.status === "aborted")
9889
9890
  return t.INVALID;
9890
- C.status === "dirty" && f.dirty(), k.status === "dirty" && f.dirty(), C.value !== "__proto__" && (typeof k.value < "u" || v.alwaysSet) && (N[C.value] = k.value);
9891
+ C.status === "dirty" && f.dirty(), S.status === "dirty" && f.dirty(), C.value !== "__proto__" && (typeof S.value < "u" || v.alwaysSet) && (N[C.value] = S.value);
9891
9892
  }
9892
9893
  return { status: f.value, value: N };
9893
9894
  }
@@ -9922,7 +9923,7 @@ b.discriminatedUnion = b.date = b.boolean = b.bigint = b.array = b.any = b.coerc
9922
9923
  b.NEVER = b.void = b.unknown = b.union = b.undefined = b.tuple = b.transformer = b.symbol = b.string = b.strictObject = b.set = b.record = b.promise = b.preprocess = b.pipeline = b.ostring = b.optional = b.onumber = b.oboolean = b.object = b.number = b.nullable = b.null = b.never = b.nativeEnum = b.nan = b.map = b.literal = b.lazy = b.intersection = b.instanceof = b.function = b.enum = b.effect = void 0;
9923
9924
  b.datetimeRegex = Hs;
9924
9925
  b.custom = Js;
9925
- const D = Ye, Ma = _t, Z = hn, y = Jn, E = Aa;
9926
+ const D = Ye, Ma = _t, V = hn, y = Jn, E = Aa;
9926
9927
  class Qe {
9927
9928
  constructor(e, a, n, r) {
9928
9929
  this._cachedPath = [], this.parent = e, this.data = a, this._path = n, this._key = r;
@@ -9946,7 +9947,7 @@ const Er = (t, e) => {
9946
9947
  }
9947
9948
  };
9948
9949
  };
9949
- function ee(t) {
9950
+ function te(t) {
9950
9951
  if (!t)
9951
9952
  return {};
9952
9953
  const { errorMap: e, invalid_type_error: a, required_error: n, description: r } = t;
@@ -9957,7 +9958,7 @@ function ee(t) {
9957
9958
  return o.code === "invalid_enum_value" ? { message: c ?? i.defaultError } : typeof i.data > "u" ? { message: c ?? n ?? i.defaultError } : o.code !== "invalid_type" ? { message: i.defaultError } : { message: c ?? a ?? i.defaultError };
9958
9959
  }, description: r };
9959
9960
  }
9960
- class ae {
9961
+ class ne {
9961
9962
  get description() {
9962
9963
  return this._def.description;
9963
9964
  }
@@ -10088,7 +10089,7 @@ class ae {
10088
10089
  _refinement(e) {
10089
10090
  return new qe({
10090
10091
  schema: this,
10091
- typeName: K.ZodEffects,
10092
+ typeName: $.ZodEffects,
10092
10093
  effect: { type: "refinement", refinement: e }
10093
10094
  });
10094
10095
  }
@@ -10125,35 +10126,35 @@ class ae {
10125
10126
  }
10126
10127
  transform(e) {
10127
10128
  return new qe({
10128
- ...ee(this._def),
10129
+ ...te(this._def),
10129
10130
  schema: this,
10130
- typeName: K.ZodEffects,
10131
+ typeName: $.ZodEffects,
10131
10132
  effect: { type: "transform", transform: e }
10132
10133
  });
10133
10134
  }
10134
10135
  default(e) {
10135
10136
  const a = typeof e == "function" ? e : () => e;
10136
10137
  return new Ca({
10137
- ...ee(this._def),
10138
+ ...te(this._def),
10138
10139
  innerType: this,
10139
10140
  defaultValue: a,
10140
- typeName: K.ZodDefault
10141
+ typeName: $.ZodDefault
10141
10142
  });
10142
10143
  }
10143
10144
  brand() {
10144
10145
  return new Qn({
10145
- typeName: K.ZodBranded,
10146
+ typeName: $.ZodBranded,
10146
10147
  type: this,
10147
- ...ee(this._def)
10148
+ ...te(this._def)
10148
10149
  });
10149
10150
  }
10150
10151
  catch(e) {
10151
10152
  const a = typeof e == "function" ? e : () => e;
10152
10153
  return new Na({
10153
- ...ee(this._def),
10154
+ ...te(this._def),
10154
10155
  innerType: this,
10155
10156
  catchValue: a,
10156
- typeName: K.ZodCatch
10157
+ typeName: $.ZodCatch
10157
10158
  });
10158
10159
  }
10159
10160
  describe(e) {
@@ -10176,9 +10177,9 @@ class ae {
10176
10177
  return this.safeParse(null).success;
10177
10178
  }
10178
10179
  }
10179
- b.ZodType = ae;
10180
- b.Schema = ae;
10181
- b.ZodSchema = ae;
10180
+ b.ZodType = ne;
10181
+ b.Schema = ne;
10182
+ b.ZodSchema = ne;
10182
10183
  const fd = /^c[^\s-]{8,}$/i, bd = /^[0-9a-z]+$/, yd = /^[0-9A-HJKMNP-TV-Z]{26}$/i, vd = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, _d = /^[a-z0-9_-]{21}$/i, Cd = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Nd = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, wd = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, kd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
10183
10184
  let Tn;
10184
10185
  const Sd = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Td = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Id = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ad = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, xd = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Pd = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ks = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Dd = new RegExp(`^${Ks}$`);
@@ -10215,7 +10216,7 @@ function Rd(t, e) {
10215
10216
  function Od(t, e) {
10216
10217
  return !!((e === "v4" || !e) && Td.test(t) || (e === "v6" || !e) && Ad.test(t));
10217
10218
  }
10218
- class je extends ae {
10219
+ class je extends ne {
10219
10220
  _parse(e) {
10220
10221
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== E.ZodParsedType.string) {
10221
10222
  const s = this._getOrReturnCtx(e);
@@ -10374,7 +10375,7 @@ class je extends ae {
10374
10375
  return this.refinement((r) => e.test(r), {
10375
10376
  validation: a,
10376
10377
  code: D.ZodIssueCode.invalid_string,
10377
- ...Z.errorUtil.errToObj(n)
10378
+ ...V.errorUtil.errToObj(n)
10378
10379
  });
10379
10380
  }
10380
10381
  _addCheck(e) {
@@ -10384,46 +10385,46 @@ class je extends ae {
10384
10385
  });
10385
10386
  }
10386
10387
  email(e) {
10387
- return this._addCheck({ kind: "email", ...Z.errorUtil.errToObj(e) });
10388
+ return this._addCheck({ kind: "email", ...V.errorUtil.errToObj(e) });
10388
10389
  }
10389
10390
  url(e) {
10390
- return this._addCheck({ kind: "url", ...Z.errorUtil.errToObj(e) });
10391
+ return this._addCheck({ kind: "url", ...V.errorUtil.errToObj(e) });
10391
10392
  }
10392
10393
  emoji(e) {
10393
- return this._addCheck({ kind: "emoji", ...Z.errorUtil.errToObj(e) });
10394
+ return this._addCheck({ kind: "emoji", ...V.errorUtil.errToObj(e) });
10394
10395
  }
10395
10396
  uuid(e) {
10396
- return this._addCheck({ kind: "uuid", ...Z.errorUtil.errToObj(e) });
10397
+ return this._addCheck({ kind: "uuid", ...V.errorUtil.errToObj(e) });
10397
10398
  }
10398
10399
  nanoid(e) {
10399
- return this._addCheck({ kind: "nanoid", ...Z.errorUtil.errToObj(e) });
10400
+ return this._addCheck({ kind: "nanoid", ...V.errorUtil.errToObj(e) });
10400
10401
  }
10401
10402
  cuid(e) {
10402
- return this._addCheck({ kind: "cuid", ...Z.errorUtil.errToObj(e) });
10403
+ return this._addCheck({ kind: "cuid", ...V.errorUtil.errToObj(e) });
10403
10404
  }
10404
10405
  cuid2(e) {
10405
- return this._addCheck({ kind: "cuid2", ...Z.errorUtil.errToObj(e) });
10406
+ return this._addCheck({ kind: "cuid2", ...V.errorUtil.errToObj(e) });
10406
10407
  }
10407
10408
  ulid(e) {
10408
- return this._addCheck({ kind: "ulid", ...Z.errorUtil.errToObj(e) });
10409
+ return this._addCheck({ kind: "ulid", ...V.errorUtil.errToObj(e) });
10409
10410
  }
10410
10411
  base64(e) {
10411
- return this._addCheck({ kind: "base64", ...Z.errorUtil.errToObj(e) });
10412
+ return this._addCheck({ kind: "base64", ...V.errorUtil.errToObj(e) });
10412
10413
  }
10413
10414
  base64url(e) {
10414
10415
  return this._addCheck({
10415
10416
  kind: "base64url",
10416
- ...Z.errorUtil.errToObj(e)
10417
+ ...V.errorUtil.errToObj(e)
10417
10418
  });
10418
10419
  }
10419
10420
  jwt(e) {
10420
- return this._addCheck({ kind: "jwt", ...Z.errorUtil.errToObj(e) });
10421
+ return this._addCheck({ kind: "jwt", ...V.errorUtil.errToObj(e) });
10421
10422
  }
10422
10423
  ip(e) {
10423
- return this._addCheck({ kind: "ip", ...Z.errorUtil.errToObj(e) });
10424
+ return this._addCheck({ kind: "ip", ...V.errorUtil.errToObj(e) });
10424
10425
  }
10425
10426
  cidr(e) {
10426
- return this._addCheck({ kind: "cidr", ...Z.errorUtil.errToObj(e) });
10427
+ return this._addCheck({ kind: "cidr", ...V.errorUtil.errToObj(e) });
10427
10428
  }
10428
10429
  datetime(e) {
10429
10430
  return typeof e == "string" ? this._addCheck({
@@ -10437,7 +10438,7 @@ class je extends ae {
10437
10438
  precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
10438
10439
  offset: (e == null ? void 0 : e.offset) ?? !1,
10439
10440
  local: (e == null ? void 0 : e.local) ?? !1,
10440
- ...Z.errorUtil.errToObj(e == null ? void 0 : e.message)
10441
+ ...V.errorUtil.errToObj(e == null ? void 0 : e.message)
10441
10442
  });
10442
10443
  }
10443
10444
  date(e) {
@@ -10451,17 +10452,17 @@ class je extends ae {
10451
10452
  }) : this._addCheck({
10452
10453
  kind: "time",
10453
10454
  precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
10454
- ...Z.errorUtil.errToObj(e == null ? void 0 : e.message)
10455
+ ...V.errorUtil.errToObj(e == null ? void 0 : e.message)
10455
10456
  });
10456
10457
  }
10457
10458
  duration(e) {
10458
- return this._addCheck({ kind: "duration", ...Z.errorUtil.errToObj(e) });
10459
+ return this._addCheck({ kind: "duration", ...V.errorUtil.errToObj(e) });
10459
10460
  }
10460
10461
  regex(e, a) {
10461
10462
  return this._addCheck({
10462
10463
  kind: "regex",
10463
10464
  regex: e,
10464
- ...Z.errorUtil.errToObj(a)
10465
+ ...V.errorUtil.errToObj(a)
10465
10466
  });
10466
10467
  }
10467
10468
  includes(e, a) {
@@ -10469,49 +10470,49 @@ class je extends ae {
10469
10470
  kind: "includes",
10470
10471
  value: e,
10471
10472
  position: a == null ? void 0 : a.position,
10472
- ...Z.errorUtil.errToObj(a == null ? void 0 : a.message)
10473
+ ...V.errorUtil.errToObj(a == null ? void 0 : a.message)
10473
10474
  });
10474
10475
  }
10475
10476
  startsWith(e, a) {
10476
10477
  return this._addCheck({
10477
10478
  kind: "startsWith",
10478
10479
  value: e,
10479
- ...Z.errorUtil.errToObj(a)
10480
+ ...V.errorUtil.errToObj(a)
10480
10481
  });
10481
10482
  }
10482
10483
  endsWith(e, a) {
10483
10484
  return this._addCheck({
10484
10485
  kind: "endsWith",
10485
10486
  value: e,
10486
- ...Z.errorUtil.errToObj(a)
10487
+ ...V.errorUtil.errToObj(a)
10487
10488
  });
10488
10489
  }
10489
10490
  min(e, a) {
10490
10491
  return this._addCheck({
10491
10492
  kind: "min",
10492
10493
  value: e,
10493
- ...Z.errorUtil.errToObj(a)
10494
+ ...V.errorUtil.errToObj(a)
10494
10495
  });
10495
10496
  }
10496
10497
  max(e, a) {
10497
10498
  return this._addCheck({
10498
10499
  kind: "max",
10499
10500
  value: e,
10500
- ...Z.errorUtil.errToObj(a)
10501
+ ...V.errorUtil.errToObj(a)
10501
10502
  });
10502
10503
  }
10503
10504
  length(e, a) {
10504
10505
  return this._addCheck({
10505
10506
  kind: "length",
10506
10507
  value: e,
10507
- ...Z.errorUtil.errToObj(a)
10508
+ ...V.errorUtil.errToObj(a)
10508
10509
  });
10509
10510
  }
10510
10511
  /**
10511
10512
  * Equivalent to `.min(1)`
10512
10513
  */
10513
10514
  nonempty(e) {
10514
- return this.min(1, Z.errorUtil.errToObj(e));
10515
+ return this.min(1, V.errorUtil.errToObj(e));
10515
10516
  }
10516
10517
  trim() {
10517
10518
  return new je({
@@ -10595,15 +10596,15 @@ class je extends ae {
10595
10596
  b.ZodString = je;
10596
10597
  je.create = (t) => new je({
10597
10598
  checks: [],
10598
- typeName: K.ZodString,
10599
+ typeName: $.ZodString,
10599
10600
  coerce: (t == null ? void 0 : t.coerce) ?? !1,
10600
- ...ee(t)
10601
+ ...te(t)
10601
10602
  });
10602
10603
  function Fd(t, e) {
10603
10604
  const a = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, r = a > n ? a : n, s = Number.parseInt(t.toFixed(r).replace(".", "")), o = Number.parseInt(e.toFixed(r).replace(".", ""));
10604
10605
  return s % o / 10 ** r;
10605
10606
  }
10606
- class gt extends ae {
10607
+ class gt extends ne {
10607
10608
  constructor() {
10608
10609
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
10609
10610
  }
@@ -10649,16 +10650,16 @@ class gt extends ae {
10649
10650
  return { status: r.value, value: e.data };
10650
10651
  }
10651
10652
  gte(e, a) {
10652
- return this.setLimit("min", e, !0, Z.errorUtil.toString(a));
10653
+ return this.setLimit("min", e, !0, V.errorUtil.toString(a));
10653
10654
  }
10654
10655
  gt(e, a) {
10655
- return this.setLimit("min", e, !1, Z.errorUtil.toString(a));
10656
+ return this.setLimit("min", e, !1, V.errorUtil.toString(a));
10656
10657
  }
10657
10658
  lte(e, a) {
10658
- return this.setLimit("max", e, !0, Z.errorUtil.toString(a));
10659
+ return this.setLimit("max", e, !0, V.errorUtil.toString(a));
10659
10660
  }
10660
10661
  lt(e, a) {
10661
- return this.setLimit("max", e, !1, Z.errorUtil.toString(a));
10662
+ return this.setLimit("max", e, !1, V.errorUtil.toString(a));
10662
10663
  }
10663
10664
  setLimit(e, a, n, r) {
10664
10665
  return new gt({
@@ -10669,7 +10670,7 @@ class gt extends ae {
10669
10670
  kind: e,
10670
10671
  value: a,
10671
10672
  inclusive: n,
10672
- message: Z.errorUtil.toString(r)
10673
+ message: V.errorUtil.toString(r)
10673
10674
  }
10674
10675
  ]
10675
10676
  });
@@ -10683,7 +10684,7 @@ class gt extends ae {
10683
10684
  int(e) {
10684
10685
  return this._addCheck({
10685
10686
  kind: "int",
10686
- message: Z.errorUtil.toString(e)
10687
+ message: V.errorUtil.toString(e)
10687
10688
  });
10688
10689
  }
10689
10690
  positive(e) {
@@ -10691,7 +10692,7 @@ class gt extends ae {
10691
10692
  kind: "min",
10692
10693
  value: 0,
10693
10694
  inclusive: !1,
10694
- message: Z.errorUtil.toString(e)
10695
+ message: V.errorUtil.toString(e)
10695
10696
  });
10696
10697
  }
10697
10698
  negative(e) {
@@ -10699,7 +10700,7 @@ class gt extends ae {
10699
10700
  kind: "max",
10700
10701
  value: 0,
10701
10702
  inclusive: !1,
10702
- message: Z.errorUtil.toString(e)
10703
+ message: V.errorUtil.toString(e)
10703
10704
  });
10704
10705
  }
10705
10706
  nonpositive(e) {
@@ -10707,7 +10708,7 @@ class gt extends ae {
10707
10708
  kind: "max",
10708
10709
  value: 0,
10709
10710
  inclusive: !0,
10710
- message: Z.errorUtil.toString(e)
10711
+ message: V.errorUtil.toString(e)
10711
10712
  });
10712
10713
  }
10713
10714
  nonnegative(e) {
@@ -10715,20 +10716,20 @@ class gt extends ae {
10715
10716
  kind: "min",
10716
10717
  value: 0,
10717
10718
  inclusive: !0,
10718
- message: Z.errorUtil.toString(e)
10719
+ message: V.errorUtil.toString(e)
10719
10720
  });
10720
10721
  }
10721
10722
  multipleOf(e, a) {
10722
10723
  return this._addCheck({
10723
10724
  kind: "multipleOf",
10724
10725
  value: e,
10725
- message: Z.errorUtil.toString(a)
10726
+ message: V.errorUtil.toString(a)
10726
10727
  });
10727
10728
  }
10728
10729
  finite(e) {
10729
10730
  return this._addCheck({
10730
10731
  kind: "finite",
10731
- message: Z.errorUtil.toString(e)
10732
+ message: V.errorUtil.toString(e)
10732
10733
  });
10733
10734
  }
10734
10735
  safe(e) {
@@ -10736,12 +10737,12 @@ class gt extends ae {
10736
10737
  kind: "min",
10737
10738
  inclusive: !0,
10738
10739
  value: Number.MIN_SAFE_INTEGER,
10739
- message: Z.errorUtil.toString(e)
10740
+ message: V.errorUtil.toString(e)
10740
10741
  })._addCheck({
10741
10742
  kind: "max",
10742
10743
  inclusive: !0,
10743
10744
  value: Number.MAX_SAFE_INTEGER,
10744
- message: Z.errorUtil.toString(e)
10745
+ message: V.errorUtil.toString(e)
10745
10746
  });
10746
10747
  }
10747
10748
  get minValue() {
@@ -10772,11 +10773,11 @@ class gt extends ae {
10772
10773
  b.ZodNumber = gt;
10773
10774
  gt.create = (t) => new gt({
10774
10775
  checks: [],
10775
- typeName: K.ZodNumber,
10776
+ typeName: $.ZodNumber,
10776
10777
  coerce: (t == null ? void 0 : t.coerce) || !1,
10777
- ...ee(t)
10778
+ ...te(t)
10778
10779
  });
10779
- class ft extends ae {
10780
+ class ft extends ne {
10780
10781
  constructor() {
10781
10782
  super(...arguments), this.min = this.gte, this.max = this.lte;
10782
10783
  }
@@ -10820,16 +10821,16 @@ class ft extends ae {
10820
10821
  }), y.INVALID;
10821
10822
  }
10822
10823
  gte(e, a) {
10823
- return this.setLimit("min", e, !0, Z.errorUtil.toString(a));
10824
+ return this.setLimit("min", e, !0, V.errorUtil.toString(a));
10824
10825
  }
10825
10826
  gt(e, a) {
10826
- return this.setLimit("min", e, !1, Z.errorUtil.toString(a));
10827
+ return this.setLimit("min", e, !1, V.errorUtil.toString(a));
10827
10828
  }
10828
10829
  lte(e, a) {
10829
- return this.setLimit("max", e, !0, Z.errorUtil.toString(a));
10830
+ return this.setLimit("max", e, !0, V.errorUtil.toString(a));
10830
10831
  }
10831
10832
  lt(e, a) {
10832
- return this.setLimit("max", e, !1, Z.errorUtil.toString(a));
10833
+ return this.setLimit("max", e, !1, V.errorUtil.toString(a));
10833
10834
  }
10834
10835
  setLimit(e, a, n, r) {
10835
10836
  return new ft({
@@ -10840,7 +10841,7 @@ class ft extends ae {
10840
10841
  kind: e,
10841
10842
  value: a,
10842
10843
  inclusive: n,
10843
- message: Z.errorUtil.toString(r)
10844
+ message: V.errorUtil.toString(r)
10844
10845
  }
10845
10846
  ]
10846
10847
  });
@@ -10856,7 +10857,7 @@ class ft extends ae {
10856
10857
  kind: "min",
10857
10858
  value: BigInt(0),
10858
10859
  inclusive: !1,
10859
- message: Z.errorUtil.toString(e)
10860
+ message: V.errorUtil.toString(e)
10860
10861
  });
10861
10862
  }
10862
10863
  negative(e) {
@@ -10864,7 +10865,7 @@ class ft extends ae {
10864
10865
  kind: "max",
10865
10866
  value: BigInt(0),
10866
10867
  inclusive: !1,
10867
- message: Z.errorUtil.toString(e)
10868
+ message: V.errorUtil.toString(e)
10868
10869
  });
10869
10870
  }
10870
10871
  nonpositive(e) {
@@ -10872,7 +10873,7 @@ class ft extends ae {
10872
10873
  kind: "max",
10873
10874
  value: BigInt(0),
10874
10875
  inclusive: !0,
10875
- message: Z.errorUtil.toString(e)
10876
+ message: V.errorUtil.toString(e)
10876
10877
  });
10877
10878
  }
10878
10879
  nonnegative(e) {
@@ -10880,14 +10881,14 @@ class ft extends ae {
10880
10881
  kind: "min",
10881
10882
  value: BigInt(0),
10882
10883
  inclusive: !0,
10883
- message: Z.errorUtil.toString(e)
10884
+ message: V.errorUtil.toString(e)
10884
10885
  });
10885
10886
  }
10886
10887
  multipleOf(e, a) {
10887
10888
  return this._addCheck({
10888
10889
  kind: "multipleOf",
10889
10890
  value: e,
10890
- message: Z.errorUtil.toString(a)
10891
+ message: V.errorUtil.toString(a)
10891
10892
  });
10892
10893
  }
10893
10894
  get minValue() {
@@ -10906,11 +10907,11 @@ class ft extends ae {
10906
10907
  b.ZodBigInt = ft;
10907
10908
  ft.create = (t) => new ft({
10908
10909
  checks: [],
10909
- typeName: K.ZodBigInt,
10910
+ typeName: $.ZodBigInt,
10910
10911
  coerce: (t == null ? void 0 : t.coerce) ?? !1,
10911
- ...ee(t)
10912
+ ...te(t)
10912
10913
  });
10913
- class pa extends ae {
10914
+ class pa extends ne {
10914
10915
  _parse(e) {
10915
10916
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== E.ZodParsedType.boolean) {
10916
10917
  const n = this._getOrReturnCtx(e);
@@ -10925,11 +10926,11 @@ class pa extends ae {
10925
10926
  }
10926
10927
  b.ZodBoolean = pa;
10927
10928
  pa.create = (t) => new pa({
10928
- typeName: K.ZodBoolean,
10929
+ typeName: $.ZodBoolean,
10929
10930
  coerce: (t == null ? void 0 : t.coerce) || !1,
10930
- ...ee(t)
10931
+ ...te(t)
10931
10932
  });
10932
- class St extends ae {
10933
+ class St extends ne {
10933
10934
  _parse(e) {
10934
10935
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== E.ZodParsedType.date) {
10935
10936
  const s = this._getOrReturnCtx(e);
@@ -10978,14 +10979,14 @@ class St extends ae {
10978
10979
  return this._addCheck({
10979
10980
  kind: "min",
10980
10981
  value: e.getTime(),
10981
- message: Z.errorUtil.toString(a)
10982
+ message: V.errorUtil.toString(a)
10982
10983
  });
10983
10984
  }
10984
10985
  max(e, a) {
10985
10986
  return this._addCheck({
10986
10987
  kind: "max",
10987
10988
  value: e.getTime(),
10988
- message: Z.errorUtil.toString(a)
10989
+ message: V.errorUtil.toString(a)
10989
10990
  });
10990
10991
  }
10991
10992
  get minDate() {
@@ -11005,10 +11006,10 @@ b.ZodDate = St;
11005
11006
  St.create = (t) => new St({
11006
11007
  checks: [],
11007
11008
  coerce: (t == null ? void 0 : t.coerce) || !1,
11008
- typeName: K.ZodDate,
11009
- ...ee(t)
11009
+ typeName: $.ZodDate,
11010
+ ...te(t)
11010
11011
  });
11011
- class Xa extends ae {
11012
+ class Xa extends ne {
11012
11013
  _parse(e) {
11013
11014
  if (this._getType(e) !== E.ZodParsedType.symbol) {
11014
11015
  const n = this._getOrReturnCtx(e);
@@ -11023,10 +11024,10 @@ class Xa extends ae {
11023
11024
  }
11024
11025
  b.ZodSymbol = Xa;
11025
11026
  Xa.create = (t) => new Xa({
11026
- typeName: K.ZodSymbol,
11027
- ...ee(t)
11027
+ typeName: $.ZodSymbol,
11028
+ ...te(t)
11028
11029
  });
11029
- class ma extends ae {
11030
+ class ma extends ne {
11030
11031
  _parse(e) {
11031
11032
  if (this._getType(e) !== E.ZodParsedType.undefined) {
11032
11033
  const n = this._getOrReturnCtx(e);
@@ -11041,10 +11042,10 @@ class ma extends ae {
11041
11042
  }
11042
11043
  b.ZodUndefined = ma;
11043
11044
  ma.create = (t) => new ma({
11044
- typeName: K.ZodUndefined,
11045
- ...ee(t)
11045
+ typeName: $.ZodUndefined,
11046
+ ...te(t)
11046
11047
  });
11047
- class ha extends ae {
11048
+ class ha extends ne {
11048
11049
  _parse(e) {
11049
11050
  if (this._getType(e) !== E.ZodParsedType.null) {
11050
11051
  const n = this._getOrReturnCtx(e);
@@ -11059,10 +11060,10 @@ class ha extends ae {
11059
11060
  }
11060
11061
  b.ZodNull = ha;
11061
11062
  ha.create = (t) => new ha({
11062
- typeName: K.ZodNull,
11063
- ...ee(t)
11063
+ typeName: $.ZodNull,
11064
+ ...te(t)
11064
11065
  });
11065
- class Kt extends ae {
11066
+ class Kt extends ne {
11066
11067
  constructor() {
11067
11068
  super(...arguments), this._any = !0;
11068
11069
  }
@@ -11072,10 +11073,10 @@ class Kt extends ae {
11072
11073
  }
11073
11074
  b.ZodAny = Kt;
11074
11075
  Kt.create = (t) => new Kt({
11075
- typeName: K.ZodAny,
11076
- ...ee(t)
11076
+ typeName: $.ZodAny,
11077
+ ...te(t)
11077
11078
  });
11078
- class kt extends ae {
11079
+ class kt extends ne {
11079
11080
  constructor() {
11080
11081
  super(...arguments), this._unknown = !0;
11081
11082
  }
@@ -11085,10 +11086,10 @@ class kt extends ae {
11085
11086
  }
11086
11087
  b.ZodUnknown = kt;
11087
11088
  kt.create = (t) => new kt({
11088
- typeName: K.ZodUnknown,
11089
- ...ee(t)
11089
+ typeName: $.ZodUnknown,
11090
+ ...te(t)
11090
11091
  });
11091
- class lt extends ae {
11092
+ class lt extends ne {
11092
11093
  _parse(e) {
11093
11094
  const a = this._getOrReturnCtx(e);
11094
11095
  return (0, y.addIssueToContext)(a, {
@@ -11100,10 +11101,10 @@ class lt extends ae {
11100
11101
  }
11101
11102
  b.ZodNever = lt;
11102
11103
  lt.create = (t) => new lt({
11103
- typeName: K.ZodNever,
11104
- ...ee(t)
11104
+ typeName: $.ZodNever,
11105
+ ...te(t)
11105
11106
  });
11106
- class en extends ae {
11107
+ class en extends ne {
11107
11108
  _parse(e) {
11108
11109
  if (this._getType(e) !== E.ZodParsedType.undefined) {
11109
11110
  const n = this._getOrReturnCtx(e);
@@ -11118,10 +11119,10 @@ class en extends ae {
11118
11119
  }
11119
11120
  b.ZodVoid = en;
11120
11121
  en.create = (t) => new en({
11121
- typeName: K.ZodVoid,
11122
- ...ee(t)
11122
+ typeName: $.ZodVoid,
11123
+ ...te(t)
11123
11124
  });
11124
- class Ve extends ae {
11125
+ class Ve extends ne {
11125
11126
  _parse(e) {
11126
11127
  const { ctx: a, status: n } = this._processInputParams(e), r = this._def;
11127
11128
  if (a.parsedType !== E.ZodParsedType.array)
@@ -11167,19 +11168,19 @@ class Ve extends ae {
11167
11168
  min(e, a) {
11168
11169
  return new Ve({
11169
11170
  ...this._def,
11170
- minLength: { value: e, message: Z.errorUtil.toString(a) }
11171
+ minLength: { value: e, message: V.errorUtil.toString(a) }
11171
11172
  });
11172
11173
  }
11173
11174
  max(e, a) {
11174
11175
  return new Ve({
11175
11176
  ...this._def,
11176
- maxLength: { value: e, message: Z.errorUtil.toString(a) }
11177
+ maxLength: { value: e, message: V.errorUtil.toString(a) }
11177
11178
  });
11178
11179
  }
11179
11180
  length(e, a) {
11180
11181
  return new Ve({
11181
11182
  ...this._def,
11182
- exactLength: { value: e, message: Z.errorUtil.toString(a) }
11183
+ exactLength: { value: e, message: V.errorUtil.toString(a) }
11183
11184
  });
11184
11185
  }
11185
11186
  nonempty(e) {
@@ -11192,8 +11193,8 @@ Ve.create = (t, e) => new Ve({
11192
11193
  minLength: null,
11193
11194
  maxLength: null,
11194
11195
  exactLength: null,
11195
- typeName: K.ZodArray,
11196
- ...ee(e)
11196
+ typeName: $.ZodArray,
11197
+ ...te(e)
11197
11198
  });
11198
11199
  function Mt(t) {
11199
11200
  if (t instanceof Ce) {
@@ -11211,7 +11212,7 @@ function Mt(t) {
11211
11212
  type: Mt(t.element)
11212
11213
  }) : t instanceof Je ? Je.create(Mt(t.unwrap())) : t instanceof yt ? yt.create(Mt(t.unwrap())) : t instanceof Xe ? Xe.create(t.items.map((e) => Mt(e))) : t;
11213
11214
  }
11214
- class Ce extends ae {
11215
+ class Ce extends ne {
11215
11216
  constructor() {
11216
11217
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
11217
11218
  }
@@ -11288,7 +11289,7 @@ class Ce extends ae {
11288
11289
  return this._def.shape();
11289
11290
  }
11290
11291
  strict(e) {
11291
- return Z.errorUtil.errToObj, new Ce({
11292
+ return V.errorUtil.errToObj, new Ce({
11292
11293
  ...this._def,
11293
11294
  unknownKeys: "strict",
11294
11295
  ...e !== void 0 ? {
@@ -11296,7 +11297,7 @@ class Ce extends ae {
11296
11297
  var s, o;
11297
11298
  const r = ((o = (s = this._def).errorMap) == null ? void 0 : o.call(s, a, n).message) ?? n.defaultError;
11298
11299
  return a.code === "unrecognized_keys" ? {
11299
- message: Z.errorUtil.errToObj(e).message ?? r
11300
+ message: V.errorUtil.errToObj(e).message ?? r
11300
11301
  } : {
11301
11302
  message: r
11302
11303
  };
@@ -11355,7 +11356,7 @@ class Ce extends ae {
11355
11356
  ...this._def.shape(),
11356
11357
  ...e._def.shape()
11357
11358
  }),
11358
- typeName: K.ZodObject
11359
+ typeName: $.ZodObject
11359
11360
  });
11360
11361
  }
11361
11362
  // merge<
@@ -11483,24 +11484,24 @@ Ce.create = (t, e) => new Ce({
11483
11484
  shape: () => t,
11484
11485
  unknownKeys: "strip",
11485
11486
  catchall: lt.create(),
11486
- typeName: K.ZodObject,
11487
- ...ee(e)
11487
+ typeName: $.ZodObject,
11488
+ ...te(e)
11488
11489
  });
11489
11490
  Ce.strictCreate = (t, e) => new Ce({
11490
11491
  shape: () => t,
11491
11492
  unknownKeys: "strict",
11492
11493
  catchall: lt.create(),
11493
- typeName: K.ZodObject,
11494
- ...ee(e)
11494
+ typeName: $.ZodObject,
11495
+ ...te(e)
11495
11496
  });
11496
11497
  Ce.lazycreate = (t, e) => new Ce({
11497
11498
  shape: t,
11498
11499
  unknownKeys: "strip",
11499
11500
  catchall: lt.create(),
11500
- typeName: K.ZodObject,
11501
- ...ee(e)
11501
+ typeName: $.ZodObject,
11502
+ ...te(e)
11502
11503
  });
11503
- class ga extends ae {
11504
+ class ga extends ne {
11504
11505
  _parse(e) {
11505
11506
  const { ctx: a } = this._processInputParams(e), n = this._def.options;
11506
11507
  function r(s) {
@@ -11571,11 +11572,11 @@ class ga extends ae {
11571
11572
  b.ZodUnion = ga;
11572
11573
  ga.create = (t, e) => new ga({
11573
11574
  options: t,
11574
- typeName: K.ZodUnion,
11575
- ...ee(e)
11575
+ typeName: $.ZodUnion,
11576
+ ...te(e)
11576
11577
  });
11577
11578
  const st = (t) => t instanceof ya ? st(t.schema) : t instanceof qe ? st(t.innerType()) : t instanceof va ? [t.value] : t instanceof bt ? t.options : t instanceof _a ? E.util.objectValues(t.enum) : t instanceof Ca ? st(t._def.innerType) : t instanceof ma ? [void 0] : t instanceof ha ? [null] : t instanceof Je ? [void 0, ...st(t.unwrap())] : t instanceof yt ? [null, ...st(t.unwrap())] : t instanceof Qn || t instanceof wa ? st(t.unwrap()) : t instanceof Na ? st(t._def.innerType) : [];
11578
- class gn extends ae {
11579
+ class gn extends ne {
11579
11580
  _parse(e) {
11580
11581
  const { ctx: a } = this._processInputParams(e);
11581
11582
  if (a.parsedType !== E.ZodParsedType.object)
@@ -11629,11 +11630,11 @@ class gn extends ae {
11629
11630
  }
11630
11631
  }
11631
11632
  return new gn({
11632
- typeName: K.ZodDiscriminatedUnion,
11633
+ typeName: $.ZodDiscriminatedUnion,
11633
11634
  discriminator: e,
11634
11635
  options: a,
11635
11636
  optionsMap: r,
11636
- ...ee(n)
11637
+ ...te(n)
11637
11638
  });
11638
11639
  }
11639
11640
  }
@@ -11664,7 +11665,7 @@ function Fn(t, e) {
11664
11665
  return { valid: !0, data: r };
11665
11666
  } else return a === E.ZodParsedType.date && n === E.ZodParsedType.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
11666
11667
  }
11667
- class fa extends ae {
11668
+ class fa extends ne {
11668
11669
  _parse(e) {
11669
11670
  const { status: a, ctx: n } = this._processInputParams(e), r = (s, o) => {
11670
11671
  if ((0, y.isAborted)(s) || (0, y.isAborted)(o))
@@ -11700,10 +11701,10 @@ b.ZodIntersection = fa;
11700
11701
  fa.create = (t, e, a) => new fa({
11701
11702
  left: t,
11702
11703
  right: e,
11703
- typeName: K.ZodIntersection,
11704
- ...ee(a)
11704
+ typeName: $.ZodIntersection,
11705
+ ...te(a)
11705
11706
  });
11706
- class Xe extends ae {
11707
+ class Xe extends ne {
11707
11708
  _parse(e) {
11708
11709
  const { status: a, ctx: n } = this._processInputParams(e);
11709
11710
  if (n.parsedType !== E.ZodParsedType.array)
@@ -11749,12 +11750,12 @@ Xe.create = (t, e) => {
11749
11750
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
11750
11751
  return new Xe({
11751
11752
  items: t,
11752
- typeName: K.ZodTuple,
11753
+ typeName: $.ZodTuple,
11753
11754
  rest: null,
11754
- ...ee(e)
11755
+ ...te(e)
11755
11756
  });
11756
11757
  };
11757
- class ba extends ae {
11758
+ class ba extends ne {
11758
11759
  get keySchema() {
11759
11760
  return this._def.keyType;
11760
11761
  }
@@ -11782,21 +11783,21 @@ class ba extends ae {
11782
11783
  return this._def.valueType;
11783
11784
  }
11784
11785
  static create(e, a, n) {
11785
- return a instanceof ae ? new ba({
11786
+ return a instanceof ne ? new ba({
11786
11787
  keyType: e,
11787
11788
  valueType: a,
11788
- typeName: K.ZodRecord,
11789
- ...ee(n)
11789
+ typeName: $.ZodRecord,
11790
+ ...te(n)
11790
11791
  }) : new ba({
11791
11792
  keyType: je.create(),
11792
11793
  valueType: e,
11793
- typeName: K.ZodRecord,
11794
- ...ee(a)
11794
+ typeName: $.ZodRecord,
11795
+ ...te(a)
11795
11796
  });
11796
11797
  }
11797
11798
  }
11798
11799
  b.ZodRecord = ba;
11799
- class tn extends ae {
11800
+ class tn extends ne {
11800
11801
  get keySchema() {
11801
11802
  return this._def.keyType;
11802
11803
  }
@@ -11842,10 +11843,10 @@ b.ZodMap = tn;
11842
11843
  tn.create = (t, e, a) => new tn({
11843
11844
  valueType: e,
11844
11845
  keyType: t,
11845
- typeName: K.ZodMap,
11846
- ...ee(a)
11846
+ typeName: $.ZodMap,
11847
+ ...te(a)
11847
11848
  });
11848
- class Tt extends ae {
11849
+ class Tt extends ne {
11849
11850
  _parse(e) {
11850
11851
  const { status: a, ctx: n } = this._processInputParams(e);
11851
11852
  if (n.parsedType !== E.ZodParsedType.set)
@@ -11886,13 +11887,13 @@ class Tt extends ae {
11886
11887
  min(e, a) {
11887
11888
  return new Tt({
11888
11889
  ...this._def,
11889
- minSize: { value: e, message: Z.errorUtil.toString(a) }
11890
+ minSize: { value: e, message: V.errorUtil.toString(a) }
11890
11891
  });
11891
11892
  }
11892
11893
  max(e, a) {
11893
11894
  return new Tt({
11894
11895
  ...this._def,
11895
- maxSize: { value: e, message: Z.errorUtil.toString(a) }
11896
+ maxSize: { value: e, message: V.errorUtil.toString(a) }
11896
11897
  });
11897
11898
  }
11898
11899
  size(e, a) {
@@ -11907,10 +11908,10 @@ Tt.create = (t, e) => new Tt({
11907
11908
  valueType: t,
11908
11909
  minSize: null,
11909
11910
  maxSize: null,
11910
- typeName: K.ZodSet,
11911
- ...ee(e)
11911
+ typeName: $.ZodSet,
11912
+ ...te(e)
11912
11913
  });
11913
- class Vt extends ae {
11914
+ class Vt extends ne {
11914
11915
  constructor() {
11915
11916
  super(...arguments), this.validate = this.implement;
11916
11917
  }
@@ -11996,13 +11997,13 @@ class Vt extends ae {
11996
11997
  return new Vt({
11997
11998
  args: e || Xe.create([]).rest(kt.create()),
11998
11999
  returns: a || kt.create(),
11999
- typeName: K.ZodFunction,
12000
- ...ee(n)
12000
+ typeName: $.ZodFunction,
12001
+ ...te(n)
12001
12002
  });
12002
12003
  }
12003
12004
  }
12004
12005
  b.ZodFunction = Vt;
12005
- class ya extends ae {
12006
+ class ya extends ne {
12006
12007
  get schema() {
12007
12008
  return this._def.getter();
12008
12009
  }
@@ -12014,10 +12015,10 @@ class ya extends ae {
12014
12015
  b.ZodLazy = ya;
12015
12016
  ya.create = (t, e) => new ya({
12016
12017
  getter: t,
12017
- typeName: K.ZodLazy,
12018
- ...ee(e)
12018
+ typeName: $.ZodLazy,
12019
+ ...te(e)
12019
12020
  });
12020
- class va extends ae {
12021
+ class va extends ne {
12021
12022
  _parse(e) {
12022
12023
  if (e.data !== this._def.value) {
12023
12024
  const a = this._getOrReturnCtx(e);
@@ -12036,17 +12037,17 @@ class va extends ae {
12036
12037
  b.ZodLiteral = va;
12037
12038
  va.create = (t, e) => new va({
12038
12039
  value: t,
12039
- typeName: K.ZodLiteral,
12040
- ...ee(e)
12040
+ typeName: $.ZodLiteral,
12041
+ ...te(e)
12041
12042
  });
12042
12043
  function Ys(t, e) {
12043
12044
  return new bt({
12044
12045
  values: t,
12045
- typeName: K.ZodEnum,
12046
- ...ee(e)
12046
+ typeName: $.ZodEnum,
12047
+ ...te(e)
12047
12048
  });
12048
12049
  }
12049
- class bt extends ae {
12050
+ class bt extends ne {
12050
12051
  _parse(e) {
12051
12052
  if (typeof e.data != "string") {
12052
12053
  const a = this._getOrReturnCtx(e), n = this._def.values;
@@ -12102,7 +12103,7 @@ class bt extends ae {
12102
12103
  }
12103
12104
  b.ZodEnum = bt;
12104
12105
  bt.create = Ys;
12105
- class _a extends ae {
12106
+ class _a extends ne {
12106
12107
  _parse(e) {
12107
12108
  const a = E.util.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
12108
12109
  if (n.parsedType !== E.ZodParsedType.string && n.parsedType !== E.ZodParsedType.number) {
@@ -12130,10 +12131,10 @@ class _a extends ae {
12130
12131
  b.ZodNativeEnum = _a;
12131
12132
  _a.create = (t, e) => new _a({
12132
12133
  values: t,
12133
- typeName: K.ZodNativeEnum,
12134
- ...ee(e)
12134
+ typeName: $.ZodNativeEnum,
12135
+ ...te(e)
12135
12136
  });
12136
- class $t extends ae {
12137
+ class $t extends ne {
12137
12138
  unwrap() {
12138
12139
  return this._def.type;
12139
12140
  }
@@ -12155,15 +12156,15 @@ class $t extends ae {
12155
12156
  b.ZodPromise = $t;
12156
12157
  $t.create = (t, e) => new $t({
12157
12158
  type: t,
12158
- typeName: K.ZodPromise,
12159
- ...ee(e)
12159
+ typeName: $.ZodPromise,
12160
+ ...te(e)
12160
12161
  });
12161
- class qe extends ae {
12162
+ class qe extends ne {
12162
12163
  innerType() {
12163
12164
  return this._def.schema;
12164
12165
  }
12165
12166
  sourceType() {
12166
- return this._def.schema._def.typeName === K.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
12167
+ return this._def.schema._def.typeName === $.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
12167
12168
  }
12168
12169
  _parse(e) {
12169
12170
  const { status: a, ctx: n } = this._processInputParams(e), r = this._def.effect || null, s = {
@@ -12242,17 +12243,17 @@ b.ZodEffects = qe;
12242
12243
  b.ZodTransformer = qe;
12243
12244
  qe.create = (t, e, a) => new qe({
12244
12245
  schema: t,
12245
- typeName: K.ZodEffects,
12246
+ typeName: $.ZodEffects,
12246
12247
  effect: e,
12247
- ...ee(a)
12248
+ ...te(a)
12248
12249
  });
12249
12250
  qe.createWithPreprocess = (t, e, a) => new qe({
12250
12251
  schema: e,
12251
12252
  effect: { type: "preprocess", transform: t },
12252
- typeName: K.ZodEffects,
12253
- ...ee(a)
12253
+ typeName: $.ZodEffects,
12254
+ ...te(a)
12254
12255
  });
12255
- class Je extends ae {
12256
+ class Je extends ne {
12256
12257
  _parse(e) {
12257
12258
  return this._getType(e) === E.ZodParsedType.undefined ? (0, y.OK)(void 0) : this._def.innerType._parse(e);
12258
12259
  }
@@ -12263,10 +12264,10 @@ class Je extends ae {
12263
12264
  b.ZodOptional = Je;
12264
12265
  Je.create = (t, e) => new Je({
12265
12266
  innerType: t,
12266
- typeName: K.ZodOptional,
12267
- ...ee(e)
12267
+ typeName: $.ZodOptional,
12268
+ ...te(e)
12268
12269
  });
12269
- class yt extends ae {
12270
+ class yt extends ne {
12270
12271
  _parse(e) {
12271
12272
  return this._getType(e) === E.ZodParsedType.null ? (0, y.OK)(null) : this._def.innerType._parse(e);
12272
12273
  }
@@ -12277,10 +12278,10 @@ class yt extends ae {
12277
12278
  b.ZodNullable = yt;
12278
12279
  yt.create = (t, e) => new yt({
12279
12280
  innerType: t,
12280
- typeName: K.ZodNullable,
12281
- ...ee(e)
12281
+ typeName: $.ZodNullable,
12282
+ ...te(e)
12282
12283
  });
12283
- class Ca extends ae {
12284
+ class Ca extends ne {
12284
12285
  _parse(e) {
12285
12286
  const { ctx: a } = this._processInputParams(e);
12286
12287
  let n = a.data;
@@ -12297,11 +12298,11 @@ class Ca extends ae {
12297
12298
  b.ZodDefault = Ca;
12298
12299
  Ca.create = (t, e) => new Ca({
12299
12300
  innerType: t,
12300
- typeName: K.ZodDefault,
12301
+ typeName: $.ZodDefault,
12301
12302
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
12302
- ...ee(e)
12303
+ ...te(e)
12303
12304
  });
12304
- class Na extends ae {
12305
+ class Na extends ne {
12305
12306
  _parse(e) {
12306
12307
  const { ctx: a } = this._processInputParams(e), n = {
12307
12308
  ...a,
@@ -12341,11 +12342,11 @@ class Na extends ae {
12341
12342
  b.ZodCatch = Na;
12342
12343
  Na.create = (t, e) => new Na({
12343
12344
  innerType: t,
12344
- typeName: K.ZodCatch,
12345
+ typeName: $.ZodCatch,
12345
12346
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
12346
- ...ee(e)
12347
+ ...te(e)
12347
12348
  });
12348
- class an extends ae {
12349
+ class an extends ne {
12349
12350
  _parse(e) {
12350
12351
  if (this._getType(e) !== E.ZodParsedType.nan) {
12351
12352
  const n = this._getOrReturnCtx(e);
@@ -12360,11 +12361,11 @@ class an extends ae {
12360
12361
  }
12361
12362
  b.ZodNaN = an;
12362
12363
  an.create = (t) => new an({
12363
- typeName: K.ZodNaN,
12364
- ...ee(t)
12364
+ typeName: $.ZodNaN,
12365
+ ...te(t)
12365
12366
  });
12366
12367
  b.BRAND = Symbol("zod_brand");
12367
- class Qn extends ae {
12368
+ class Qn extends ne {
12368
12369
  _parse(e) {
12369
12370
  const { ctx: a } = this._processInputParams(e), n = a.data;
12370
12371
  return this._def.type._parse({
@@ -12378,7 +12379,7 @@ class Qn extends ae {
12378
12379
  }
12379
12380
  }
12380
12381
  b.ZodBranded = Qn;
12381
- class xa extends ae {
12382
+ class xa extends ne {
12382
12383
  _parse(e) {
12383
12384
  const { status: a, ctx: n } = this._processInputParams(e);
12384
12385
  if (n.common.async)
@@ -12414,12 +12415,12 @@ class xa extends ae {
12414
12415
  return new xa({
12415
12416
  in: e,
12416
12417
  out: a,
12417
- typeName: K.ZodPipeline
12418
+ typeName: $.ZodPipeline
12418
12419
  });
12419
12420
  }
12420
12421
  }
12421
12422
  b.ZodPipeline = xa;
12422
- class wa extends ae {
12423
+ class wa extends ne {
12423
12424
  _parse(e) {
12424
12425
  const a = this._def.innerType._parse(e), n = (r) => ((0, y.isValid)(r) && (r.value = Object.freeze(r.value)), r);
12425
12426
  return (0, y.isAsync)(a) ? a.then((r) => n(r)) : n(a);
@@ -12431,8 +12432,8 @@ class wa extends ae {
12431
12432
  b.ZodReadonly = wa;
12432
12433
  wa.create = (t, e) => new wa({
12433
12434
  innerType: t,
12434
- typeName: K.ZodReadonly,
12435
- ...ee(e)
12435
+ typeName: $.ZodReadonly,
12436
+ ...te(e)
12436
12437
  });
12437
12438
  function Lr(t, e) {
12438
12439
  const a = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
@@ -12457,10 +12458,10 @@ function Js(t, e = {}, a) {
12457
12458
  b.late = {
12458
12459
  object: Ce.lazycreate
12459
12460
  };
12460
- var K;
12461
+ var $;
12461
12462
  (function(t) {
12462
12463
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
12463
- })(K || (b.ZodFirstPartyTypeKind = K = {}));
12464
+ })($ || (b.ZodFirstPartyTypeKind = $ = {}));
12464
12465
  const Md = (t, e = {
12465
12466
  message: `Input not instance of ${t.name}`
12466
12467
  }) => Js((a) => a instanceof t, e);
@@ -13037,24 +13038,24 @@ const Vc = ({
13037
13038
  featureDescriptions: o,
13038
13039
  period: i
13039
13040
  }) => {
13040
- var $, z;
13041
- const { isOutdatedBilling: c, analytics: d, scope: u } = se(), { t: p } = fe(), { data: h } = dt(), { data: g } = Ht(), { data: f } = tt({ enabled: !c }), { data: w } = Yt({ period: i, enabled: !c }), N = t !== void 0, [v, C] = X(!1), k = h == null ? void 0 : h.find((O) => O.id === (f == null ? void 0 : f.plan.current.planId)), I = f ? k ? ve(k) === "community" : !0 : !1, S = Le(() => fn(w).find((O) => O.key === "conversation_sessions"), [w]), T = !N && !c && I && !!S && S.pct / 100 >= _c && !v && !Fs(Fr, u, "modal"), A = N ? !!t : T;
13041
+ var G, z;
13042
+ const { isOutdatedBilling: c, analytics: d, scope: u } = oe(), { t: p } = fe(), { data: h } = dt(), { data: g } = Ht(), { data: f } = tt({ enabled: !c }), { data: w } = Yt({ period: i, enabled: !c }), N = t !== void 0, [v, C] = ee(!1), S = h == null ? void 0 : h.find((U) => U.id === (f == null ? void 0 : f.plan.current.planId)), A = f ? S ? ve(S) === "community" : !0 : !1, T = Le(() => fn(w).find((U) => U.key === "conversation_sessions"), [w]), k = !N && !c && A && !!T && T.pct / 100 >= _c && !v && !Fs(Fr, u, "modal"), I = N ? !!t : k;
13042
13043
  Oe(() => {
13043
- A && d.capture(we.PLAN_PICKER_VIEWED, {
13044
+ I && d.capture(we.PLAN_PICKER_VIEWED, {
13044
13045
  source: N ? "outgrow_free" : "outgrow_free_auto",
13045
13046
  interval: r
13046
13047
  });
13047
- }, [A, N, d]);
13048
+ }, [I, N, d]);
13048
13049
  const _ = () => {
13049
13050
  N || (Ms(Fr, u, "modal"), C(!0)), e == null || e(!1);
13050
- }, L = Le(() => h ? h.filter((O) => {
13051
- const ie = ve(O);
13052
- return ie !== "community" && ie !== "enterprise" && ie !== "managed";
13053
- }).sort((O, ie) => jt.indexOf(ve(O)) - jt.indexOf(ve(ie))) : [], [h]), U = ((z = ($ = h == null ? void 0 : h.find((O) => ve(O) === "enterprise")) == null ? void 0 : $.metadata) == null ? void 0 : z.contact_url) ?? _s;
13054
- if (c || !A)
13051
+ }, L = Le(() => h ? h.filter((U) => {
13052
+ const H = ve(U);
13053
+ return H !== "community" && H !== "enterprise" && H !== "managed";
13054
+ }).sort((U, H) => jt.indexOf(ve(U)) - jt.indexOf(ve(H))) : [], [h]), F = ((z = (G = h == null ? void 0 : h.find((U) => ve(U) === "enterprise")) == null ? void 0 : G.metadata) == null ? void 0 : z.contact_url) ?? _s;
13055
+ if (c || !I)
13055
13056
  return null;
13056
- const R = (S == null ? void 0 : S.quota) ?? (k == null ? void 0 : k.features.conversation_sessions) ?? 100, V = (S == null ? void 0 : S.used) ?? 0, j = S && S.pct > 0 ? Math.min(100, Math.max(5, Math.round(S.pct))) : 0;
13057
- return /* @__PURE__ */ l(Ze, { open: A, onOpenChange: _, size: "xl", "aria-label": p("outgrowTitle"), children: /* @__PURE__ */ m("div", { className: "bpb-outgrow", children: [
13057
+ const R = (T == null ? void 0 : T.quota) ?? (S == null ? void 0 : S.features.conversation_sessions) ?? 100, Z = (T == null ? void 0 : T.used) ?? 0, j = T && T.pct > 0 ? Math.min(100, Math.max(5, Math.round(T.pct))) : 0;
13058
+ return /* @__PURE__ */ l(Ze, { open: I, onOpenChange: _, size: "xl", "aria-label": p("outgrowTitle"), children: /* @__PURE__ */ m("div", { className: "bpb-outgrow", children: [
13058
13059
  /* @__PURE__ */ m("header", { className: "bpb-outgrow__head", children: [
13059
13060
  /* @__PURE__ */ l("h2", { className: "bpb-outgrow__title", children: p("outgrowTitle") }),
13060
13061
  /* @__PURE__ */ l("p", { className: "bpb-outgrow__lede", children: /* @__PURE__ */ l(
@@ -13083,30 +13084,30 @@ const Vc = ({
13083
13084
  qa,
13084
13085
  {
13085
13086
  i18nKey: "outgrowUsageText",
13086
- values: { used: ge(V), quota: ge(R) },
13087
+ values: { used: ge(Z), quota: ge(R) },
13087
13088
  components: { bold: /* @__PURE__ */ l("strong", {}) }
13088
13089
  }
13089
13090
  ) })
13090
13091
  ] }),
13091
- /* @__PURE__ */ l("div", { className: "bpb-outgrow__grid", children: L.map((O, ie) => {
13092
- const oe = ve(O), ne = Nc(O, r), P = wc(O, r), Y = oe === n || O.id === n, me = O.features.conversation_sessions, ue = Vn(g, O, r), F = ie > 0 ? L[ie - 1] : void 0, G = (s[oe] ?? qn[oe]).slice(0, Cc);
13092
+ /* @__PURE__ */ l("div", { className: "bpb-outgrow__grid", children: L.map((U, H) => {
13093
+ const ie = ve(U), re = Nc(U, r), P = wc(U, r), J = ie === n || U.id === n, me = U.features.conversation_sessions, ue = Vn(g, U, r), O = H > 0 ? L[H - 1] : void 0, K = (s[ie] ?? qn[ie]).slice(0, Cc);
13093
13094
  return /* @__PURE__ */ m(
13094
13095
  "div",
13095
13096
  {
13096
- className: W("bpb-plan-card", Y && "bpb-plan-card--highlighted bpb-glow"),
13097
- "data-plan-id": O.id,
13097
+ className: W("bpb-plan-card", J && "bpb-plan-card--highlighted bpb-glow"),
13098
+ "data-plan-id": U.id,
13098
13099
  children: [
13099
13100
  /* @__PURE__ */ m("div", { className: "bpb-plan-card__header", children: [
13100
13101
  /* @__PURE__ */ m("h3", { className: "bpb-plan-card__name", children: [
13101
- ye(O.name),
13102
- Y && /* @__PURE__ */ l(Ya, { className: "bpb-plan-card__badge", children: p("upgradeRecommended") })
13102
+ ye(U.name),
13103
+ J && /* @__PURE__ */ l(Ya, { className: "bpb-plan-card__badge", children: p("upgradeRecommended") })
13103
13104
  ] }),
13104
- /* @__PURE__ */ l("div", { className: "bpb-plan-card__price", children: P !== null && ne ? /* @__PURE__ */ m(Se, { children: [
13105
- /* @__PURE__ */ l("span", { className: "bpb-plan-card__currency", children: Ua(ne.currency) }),
13105
+ /* @__PURE__ */ l("div", { className: "bpb-plan-card__price", children: P !== null && re ? /* @__PURE__ */ m(Se, { children: [
13106
+ /* @__PURE__ */ l("span", { className: "bpb-plan-card__currency", children: Ua(re.currency) }),
13106
13107
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__amount", children: Number.isInteger(P) ? P : P.toFixed(2).replace(/\.00$/, "") }),
13107
13108
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__per", children: p("perMonth") })
13108
13109
  ] }) : /* @__PURE__ */ m("span", { className: "bpb-plan-card__amount", children: [
13109
- Ua((ne == null ? void 0 : ne.currency) ?? "usd"),
13110
+ Ua((re == null ? void 0 : re.currency) ?? "usd"),
13110
13111
  "0"
13111
13112
  ] }) })
13112
13113
  ] }),
@@ -13129,41 +13130,41 @@ const Vc = ({
13129
13130
  /* @__PURE__ */ m(
13130
13131
  Ie,
13131
13132
  {
13132
- variant: Y ? "accent" : "outline",
13133
+ variant: J ? "accent" : "outline",
13133
13134
  block: !0,
13134
13135
  onClick: () => {
13135
13136
  d.capture(we.PLAN_UPGRADE_INITIATED, {
13136
- plan_name: ye(O.name),
13137
+ plan_name: ye(U.name),
13137
13138
  interval: r,
13138
13139
  source: "outgrow_free"
13139
- }), a(O.id, r), _();
13140
+ }), a(U.id, r), _();
13140
13141
  },
13141
13142
  children: [
13142
- p("outgrowUpgradeTo", { planName: ye(O.name) }),
13143
- Y && /* @__PURE__ */ l($n, { size: 15 })
13143
+ p("outgrowUpgradeTo", { planName: ye(U.name) }),
13144
+ J && /* @__PURE__ */ l($n, { size: 15 })
13144
13145
  ]
13145
13146
  }
13146
13147
  ),
13147
13148
  /* @__PURE__ */ m("ul", { className: "bpb-plan-card__features", children: [
13148
- F && /* @__PURE__ */ l("li", { className: "bpb-outgrow__features-lead", children: p("outgrowEverythingIn", { planName: ye(F.name) }) }),
13149
- G.map((q) => {
13150
- const x = Hn(q), be = Zn[q], Q = be !== void 0 ? p(be.label) : q, le = (o == null ? void 0 : o[q]) ?? (be !== void 0 ? p(be.desc) : void 0);
13149
+ O && /* @__PURE__ */ l("li", { className: "bpb-outgrow__features-lead", children: p("outgrowEverythingIn", { planName: ye(O.name) }) }),
13150
+ K.map((q) => {
13151
+ const x = Hn(q), be = Zn[q], X = be !== void 0 ? p(be.label) : q, le = (o == null ? void 0 : o[q]) ?? (be !== void 0 ? p(be.desc) : void 0);
13151
13152
  return /* @__PURE__ */ m("li", { children: [
13152
13153
  /* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ l(x, { size: 13 }) }),
13153
- le ? /* @__PURE__ */ l(Ja, { label: Q, children: le }) : /* @__PURE__ */ l("span", { children: Q })
13154
+ le ? /* @__PURE__ */ l(Ja, { label: X, children: le }) : /* @__PURE__ */ l("span", { children: X })
13154
13155
  ] }, q);
13155
13156
  })
13156
13157
  ] })
13157
13158
  ]
13158
13159
  },
13159
- O.id
13160
+ U.id
13160
13161
  );
13161
13162
  }) }),
13162
13163
  /* @__PURE__ */ m("footer", { className: "bpb-outgrow__footer", children: [
13163
13164
  /* @__PURE__ */ m("span", { children: [
13164
13165
  p("outgrowNeedCustom"),
13165
13166
  " ",
13166
- /* @__PURE__ */ l("a", { href: U, target: "_blank", rel: "noopener noreferrer", children: p("outgrowTalkToSales") })
13167
+ /* @__PURE__ */ l("a", { href: F, target: "_blank", rel: "noopener noreferrer", children: p("outgrowTalkToSales") })
13167
13168
  ] }),
13168
13169
  /* @__PURE__ */ m(
13169
13170
  "a",
@@ -13268,14 +13269,14 @@ const Vc = ({
13268
13269
  className: n,
13269
13270
  onIncreaseLimits: r
13270
13271
  }) => {
13271
- var V;
13272
- const { isOutdatedBilling: s, locale: o } = se(), { t: i } = fe(), c = Le(() => kc(a, o), [a, o]), [d, u] = X(t ?? ((V = c[0]) == null ? void 0 : V.value) ?? ""), p = Ii(), h = Math.max(
13272
+ var Z;
13273
+ const { isOutdatedBilling: s, locale: o } = oe(), { t: i } = fe(), c = Le(() => kc(a, o), [a, o]), [d, u] = ee(t ?? ((Z = c[0]) == null ? void 0 : Z.value) ?? ""), p = Ii(), h = Math.max(
13273
13274
  0,
13274
13275
  c.findIndex((j) => j.value === d)
13275
13276
  ), g = (j) => {
13276
- const $ = c[h + j];
13277
- $ && u($.value);
13278
- }, { data: f, isLoading: w, isError: N } = Yt({ period: d, enabled: !s }), { data: v } = tt({ enabled: !s }), { data: C } = dt(), k = C == null ? void 0 : C.find((j) => j.id === (v == null ? void 0 : v.plan.current.planId)), I = k ? ye(k.name) : void 0, S = k ? ve(k) : "community", T = S === "enterprise" || S === "managed", A = (j) => k == null ? void 0 : k.features[j];
13277
+ const G = c[h + j];
13278
+ G && u(G.value);
13279
+ }, { data: f, isLoading: w, isError: N } = Yt({ period: d, enabled: !s }), { data: v } = tt({ enabled: !s }), { data: C } = dt(), S = C == null ? void 0 : C.find((j) => j.id === (v == null ? void 0 : v.plan.current.planId)), A = S ? ye(S.name) : void 0, T = S ? ve(S) : "community", k = T === "enterprise" || T === "managed", I = (j) => S == null ? void 0 : S.features[j];
13279
13280
  if (s)
13280
13281
  return /* @__PURE__ */ l("div", { className: W("bpb-usage bpb-scope", n), children: /* @__PURE__ */ l(Qt, {}) });
13281
13282
  if (w)
@@ -13291,7 +13292,7 @@ const Vc = ({
13291
13292
  { key: "file_storage", label: i("dashboardFileStorage"), unit: "bytes" }
13292
13293
  ].filter((j) => f[j.key]);
13293
13294
  return /* @__PURE__ */ m("div", { className: W("bpb-usage bpb-scope", n), children: [
13294
- T && /* @__PURE__ */ l("p", { className: "bpb-usage__enterprise-note", children: i("dashboardEnterpriseUsageNotice") }),
13295
+ k && /* @__PURE__ */ l("p", { className: "bpb-usage__enterprise-note", children: i("dashboardEnterpriseUsageNotice") }),
13295
13296
  (e && c.length > 1 || r) && /* @__PURE__ */ m("div", { className: "bpb-usage__header", children: [
13296
13297
  e && c.length > 1 && /* @__PURE__ */ m("div", { className: "bpb-usage__period", children: [
13297
13298
  /* @__PURE__ */ l("span", { className: "bpb-usage__period-label", children: i("dashboardBillingPeriod") }),
@@ -13347,8 +13348,8 @@ const Vc = ({
13347
13348
  {
13348
13349
  entry: _,
13349
13350
  metric: { key: "conversation_sessions", label: i("dashboardConversationsMetric"), unit: "count" },
13350
- planAllowance: A("conversation_sessions"),
13351
- planName: I,
13351
+ planAllowance: I("conversation_sessions"),
13352
+ planName: A,
13352
13353
  stacked: !0
13353
13354
  }
13354
13355
  ) })
@@ -13361,8 +13362,8 @@ const Vc = ({
13361
13362
  {
13362
13363
  entry: f[j.key],
13363
13364
  metric: j,
13364
- planAllowance: A(j.key),
13365
- planName: I
13365
+ planAllowance: I(j.key),
13366
+ planName: A
13366
13367
  },
13367
13368
  j.key
13368
13369
  )) })
@@ -13394,23 +13395,23 @@ const Vc = ({
13394
13395
  period: o,
13395
13396
  className: i
13396
13397
  }) => {
13397
- const { isOutdatedBilling: c, analytics: d, scope: u } = se(), { t: p } = fe(), { data: h } = Yt({ period: o, enabled: !c }), [g, f] = X({}), [w, N] = X(!1), [v, C] = X(null), k = h ? Object.entries(h).map(([R, V]) => ({ key: R, pct: V.quota > 0 ? (V.usage ?? 0) / V.quota : 0 })).filter((R) => R.pct >= e).sort((R, V) => V.pct - R.pct)[0] : void 0, I = !!k && (g[k.key] || Fs(Mr, u, k.key));
13398
- if (c || !k || I)
13398
+ const { isOutdatedBilling: c, analytics: d, scope: u } = oe(), { t: p } = fe(), { data: h } = Yt({ period: o, enabled: !c }), [g, f] = ee({}), [w, N] = ee(!1), [v, C] = ee(null), S = h ? Object.entries(h).map(([R, Z]) => ({ key: R, pct: Z.quota > 0 ? (Z.usage ?? 0) / Z.quota : 0 })).filter((R) => R.pct >= e).sort((R, Z) => Z.pct - R.pct)[0] : void 0, A = !!S && (g[S.key] || Fs(Mr, u, S.key));
13399
+ if (c || !S || A)
13399
13400
  return null;
13400
- const T = {
13401
+ const k = {
13401
13402
  conversation_sessions: p("metricConversations"),
13402
13403
  table_rows: p("metricTableRows"),
13403
13404
  vector_db_storage: p("metricVectorDb"),
13404
13405
  file_storage: p("metricFileStorage"),
13405
13406
  ai_spend: p("metricAiSpend"),
13406
13407
  bot_count: p("metricBotCount")
13407
- }[k.key] ?? k.key.replace(/_/g, " "), A = Math.min(100, Math.round(k.pct * 100)), _ = k.pct >= 1, L = () => {
13408
+ }[S.key] ?? S.key.replace(/_/g, " "), I = Math.min(100, Math.round(S.pct * 100)), _ = S.pct >= 1, L = () => {
13408
13409
  d.capture(we.UPGRADE_CTA_CLICKED, {
13409
13410
  source: "usage_banner",
13410
- metric: k.key,
13411
- usage_pct: Math.round(k.pct * 100)
13411
+ metric: S.key,
13412
+ usage_pct: Math.round(S.pct * 100)
13412
13413
  }), a ? a() : N(!0);
13413
- }, U = _ ? "critical" : "warning";
13414
+ }, F = _ ? "critical" : "warning";
13414
13415
  return /* @__PURE__ */ m(Se, { children: [
13415
13416
  /* @__PURE__ */ m(
13416
13417
  "div",
@@ -13418,14 +13419,14 @@ const Vc = ({
13418
13419
  className: W(
13419
13420
  "bpb-usage-banner bpb-scope",
13420
13421
  `bpb-usage-banner--${t}`,
13421
- `bpb-usage-banner--${U}`,
13422
+ `bpb-usage-banner--${F}`,
13422
13423
  i
13423
13424
  ),
13424
13425
  role: "alert",
13425
13426
  "aria-live": "polite",
13426
13427
  children: [
13427
13428
  /* @__PURE__ */ l(Ss, { size: 18, className: "bpb-usage-banner__icon" }),
13428
- /* @__PURE__ */ l("p", { className: "bpb-usage-banner__text", children: _ ? p("usageBannerLimitReached", { label: T }) : p("usageBannerNearLimit", { pct: A, label: T }) }),
13429
+ /* @__PURE__ */ l("p", { className: "bpb-usage-banner__text", children: _ ? p("usageBannerLimitReached", { label: k }) : p("usageBannerNearLimit", { pct: I, label: k }) }),
13429
13430
  /* @__PURE__ */ m("div", { className: "bpb-usage-banner__actions", children: [
13430
13431
  /* @__PURE__ */ l(Ie, { variant: "primary", size: "sm", onClick: L, children: s ?? p(r === "manage" ? "usageBannerManageCta" : "usageBannerDefaultCta") }),
13431
13432
  n && /* @__PURE__ */ l(
@@ -13435,7 +13436,7 @@ const Vc = ({
13435
13436
  className: "bpb-usage-banner__dismiss",
13436
13437
  "aria-label": p("usageBannerDismiss"),
13437
13438
  onClick: () => {
13438
- Ms(Mr, u, k.key), f((R) => ({ ...R, [k.key]: !0 }));
13439
+ Ms(Mr, u, S.key), f((R) => ({ ...R, [S.key]: !0 }));
13439
13440
  },
13440
13441
  children: /* @__PURE__ */ l(Kn, { size: 16 })
13441
13442
  }
@@ -13450,8 +13451,8 @@ const Vc = ({
13450
13451
  {
13451
13452
  open: w,
13452
13453
  onOpenChange: N,
13453
- onSelectPlan: (R, V) => {
13454
- N(!1), C({ planId: R, interval: V });
13454
+ onSelectPlan: (R, Z) => {
13455
+ N(!1), C({ planId: R, interval: Z });
13455
13456
  }
13456
13457
  }
13457
13458
  ),
@@ -13477,7 +13478,7 @@ const Vc = ({
13477
13478
  ] }),
13478
13479
  /* @__PURE__ */ l("p", { className: "bpb-action-card__description", children: a })
13479
13480
  ] }), er = ({ children: t }) => /* @__PURE__ */ l("span", { className: "bpb-summary-card__icon", "aria-hidden": "true", children: t }), ro = ({ isAddons: t, className: e }) => {
13480
- const { manageBillingUrl: a } = se(), { t: n } = fe(), r = () => a && window.open(a, "_blank", "noopener");
13481
+ const { manageBillingUrl: a } = oe(), { t: n } = fe(), r = () => a && window.open(a, "_blank", "noopener");
13481
13482
  return /* @__PURE__ */ m(
13482
13483
  "button",
13483
13484
  {
@@ -13507,7 +13508,7 @@ const Vc = ({
13507
13508
  );
13508
13509
  }, Gc = ({ onManage: t, className: e }) => {
13509
13510
  var w, N;
13510
- const { isOutdatedBilling: a } = se(), { t: n } = fe(), { data: r, isLoading: s } = tt({ enabled: !a }), { data: o, isLoading: i } = dt();
13511
+ const { isOutdatedBilling: a } = oe(), { t: n } = fe(), { data: r, isLoading: s } = tt({ enabled: !a }), { data: o, isLoading: i } = dt();
13511
13512
  if (a)
13512
13513
  return /* @__PURE__ */ l(ro, { isAddons: !1, className: e });
13513
13514
  if (s || i)
@@ -13543,7 +13544,7 @@ const Vc = ({
13543
13544
  }
13544
13545
  );
13545
13546
  }, Kc = ({ onManage: t, className: e }) => {
13546
- const { isOutdatedBilling: a } = se(), { t: n } = fe(), { data: r, isLoading: s } = tt({ enabled: !a }), { data: o, isLoading: i } = Ht();
13547
+ const { isOutdatedBilling: a } = oe(), { t: n } = fe(), { data: r, isLoading: s } = tt({ enabled: !a }), { data: o, isLoading: i } = Ht();
13547
13548
  if (a)
13548
13549
  return /* @__PURE__ */ l(ro, { isAddons: !0, className: e });
13549
13550
  if (s || i)
@@ -13585,8 +13586,8 @@ const Vc = ({
13585
13586
  }
13586
13587
  );
13587
13588
  }, $c = ({ onManage: t, className: e }) => {
13588
- var oe, ne;
13589
- const { isOutdatedBilling: a, locale: n, manageBillingUrl: r, analytics: s } = se(), { t: o } = fe(), { data: i, isLoading: c } = tt({ enabled: !a }), { data: d, isLoading: u } = dt(), { data: p, isLoading: h } = Ht();
13589
+ var ie, re;
13590
+ const { isOutdatedBilling: a, locale: n, manageBillingUrl: r, analytics: s } = oe(), { t: o } = fe(), { data: i, isLoading: c } = tt({ enabled: !a }), { data: d, isLoading: u } = dt(), { data: p, isLoading: h } = Ht();
13590
13591
  if (a) {
13591
13592
  const P = () => r && window.open(r, "_blank", "noopener");
13592
13593
  return /* @__PURE__ */ m(
@@ -13613,17 +13614,17 @@ const Vc = ({
13613
13614
  }
13614
13615
  if (c || u || h)
13615
13616
  return /* @__PURE__ */ l(pe, { height: 132, rounded: !0, className: W("bpb-scope", e) });
13616
- const g = i == null ? void 0 : i.plan.current, f = d == null ? void 0 : d.find((P) => P.id === (g == null ? void 0 : g.planId)), w = (g == null ? void 0 : g.interval) ?? "month", N = ((oe = f == null ? void 0 : f.prices[w]) == null ? void 0 : oe.currency) ?? "usd", v = f ? ve(f) : "community", C = Object.fromEntries(
13617
- Object.entries((i == null ? void 0 : i.addons) ?? {}).map(([P, Y]) => {
13617
+ const g = i == null ? void 0 : i.plan.current, f = d == null ? void 0 : d.find((P) => P.id === (g == null ? void 0 : g.planId)), w = (g == null ? void 0 : g.interval) ?? "month", N = ((ie = f == null ? void 0 : f.prices[w]) == null ? void 0 : ie.currency) ?? "usd", v = f ? ve(f) : "community", C = Object.fromEntries(
13618
+ Object.entries((i == null ? void 0 : i.addons) ?? {}).map(([P, J]) => {
13618
13619
  var me;
13619
- return [P, ((me = Y.current) == null ? void 0 : me.quantity) ?? 0];
13620
+ return [P, ((me = J.current) == null ? void 0 : me.quantity) ?? 0];
13620
13621
  })
13621
- ), k = ((ne = f == null ? void 0 : f.prices[w]) == null ? void 0 : ne.amount) ?? 0, I = (p ?? []).reduce((P, Y) => {
13622
- const me = f ? jn(Y, f, w) : null;
13623
- return P + (C[Y.id] ?? 0) * ((me == null ? void 0 : me.amount) ?? 0);
13624
- }, 0), S = k + I, T = w === "year" ? "/yr" : "/mo", A = Tl(f, p, C).find((P) => P.key === "conversation_sessions"), _ = o(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), L = v === "enterprise" || v === "managed", U = v !== "community" && !L, R = i == null ? void 0 : i.plan.next, V = R && R.planId !== (g == null ? void 0 : g.planId), j = g == null ? void 0 : g.periodEnd, $ = U && !V && j && !Qa(j) ? it(j, n) : null, z = d == null ? void 0 : d.find((P) => P.id === (R == null ? void 0 : R.planId)), O = R == null ? void 0 : R.effectiveDate, ie = V && z && O ? o("planBannerDowngradesTo", {
13622
+ ), S = ((re = f == null ? void 0 : f.prices[w]) == null ? void 0 : re.amount) ?? 0, A = (p ?? []).reduce((P, J) => {
13623
+ const me = f ? jn(J, f, w) : null;
13624
+ return P + (C[J.id] ?? 0) * ((me == null ? void 0 : me.amount) ?? 0);
13625
+ }, 0), T = S + A, k = w === "year" ? "/yr" : "/mo", I = Tl(f, p, C).find((P) => P.key === "conversation_sessions"), _ = o(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), L = v === "enterprise" || v === "managed", F = v !== "community" && !L, R = i == null ? void 0 : i.plan.next, Z = R && R.planId !== (g == null ? void 0 : g.planId), j = g == null ? void 0 : g.periodEnd, G = F && !Z && j && !Qa(j) ? it(j, n) : null, z = d == null ? void 0 : d.find((P) => P.id === (R == null ? void 0 : R.planId)), U = R == null ? void 0 : R.effectiveDate, H = Z && z && U ? o("planBannerDowngradesTo", {
13625
13626
  plan: ye(z.name),
13626
- date: it(O, n)
13627
+ date: it(U, n)
13627
13628
  }) : null;
13628
13629
  return /* @__PURE__ */ m(
13629
13630
  "button",
@@ -13637,31 +13638,31 @@ const Vc = ({
13637
13638
  /* @__PURE__ */ m("div", { className: "bpb-plan-banner__main", children: [
13638
13639
  /* @__PURE__ */ l("span", { className: "bpb-plan-banner__eyebrow", children: o("planBannerEyebrow") }),
13639
13640
  /* @__PURE__ */ l("span", { className: "bpb-plan-banner__name", children: f ? ye(f.name) : o("planBannerNoPlan") }),
13640
- L ? /* @__PURE__ */ l("span", { className: "bpb-plan-banner__sub", children: A && A.added > 0 ? /* @__PURE__ */ m(Se, { children: [
13641
+ L ? /* @__PURE__ */ l("span", { className: "bpb-plan-banner__sub", children: I && I.added > 0 ? /* @__PURE__ */ m(Se, { children: [
13641
13642
  o("planBannerCustom"),
13642
13643
  " + ",
13643
- ge(A.added),
13644
+ ge(I.added),
13644
13645
  " ",
13645
13646
  _
13646
- ] }) : o("planBannerCustomConversations") }) : A && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__sub", children: A.added > 0 ? /* @__PURE__ */ m(Se, { children: [
13647
- ge(A.base),
13647
+ ] }) : o("planBannerCustomConversations") }) : I && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__sub", children: I.added > 0 ? /* @__PURE__ */ m(Se, { children: [
13648
+ ge(I.base),
13648
13649
  " + ",
13649
- ge(A.added),
13650
+ ge(I.added),
13650
13651
  " ",
13651
13652
  _
13652
- ] }) : `${ge(A.total)} ${_}` })
13653
+ ] }) : `${ge(I.total)} ${_}` })
13653
13654
  ] }),
13654
13655
  /* @__PURE__ */ m("div", { className: "bpb-plan-banner__summary", children: [
13655
- L ? /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price", children: o("planBannerCustomPricing") }) : /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price", children: S > 0 && /* @__PURE__ */ m(Se, { children: [
13656
- de(S, N, 0),
13657
- /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price-suffix", children: T })
13656
+ L ? /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price", children: o("planBannerCustomPricing") }) : /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price", children: T > 0 && /* @__PURE__ */ m(Se, { children: [
13657
+ de(T, N, 0),
13658
+ /* @__PURE__ */ l("span", { className: "bpb-plan-banner__price-suffix", children: k })
13658
13659
  ] }) }),
13659
- U && /* @__PURE__ */ m("span", { className: "bpb-plan-banner__meta", children: [
13660
+ F && /* @__PURE__ */ m("span", { className: "bpb-plan-banner__meta", children: [
13660
13661
  o(w === "year" ? "billedAnnually" : "billedMonthly"),
13661
- I > 0 && ` ${o("planBannerInclAddons")}`
13662
+ A > 0 && ` ${o("planBannerInclAddons")}`
13662
13663
  ] }),
13663
- $ && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__meta", children: o("planBannerRenews", { date: $ }) }),
13664
- ie && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__meta", children: ie })
13664
+ G && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__meta", children: o("planBannerRenews", { date: G }) }),
13665
+ H && /* @__PURE__ */ l("span", { className: "bpb-plan-banner__meta", children: H })
13665
13666
  ] }),
13666
13667
  /* @__PURE__ */ m("span", { className: "bpb-plan-banner__cta", children: [
13667
13668
  o("planBannerManageCta"),
@@ -13671,72 +13672,79 @@ const Vc = ({
13671
13672
  ]
13672
13673
  }
13673
13674
  );
13674
- }, Hc = ({ onManage: t, period: e, variant: a = "card", className: n, style: r }) => {
13675
- const { isOutdatedBilling: s, locale: o } = se(), { t: i } = fe(), { data: c, isLoading: d } = tt({ enabled: !s }), { data: u, isLoading: p } = dt(), { data: h, isLoading: g } = Yt({ period: e, enabled: !s });
13676
- if (s)
13675
+ }, Hc = ({
13676
+ onManage: t,
13677
+ period: e,
13678
+ variant: a = "card",
13679
+ showHealthyEnterprise: n = !1,
13680
+ className: r,
13681
+ style: s
13682
+ }) => {
13683
+ const { isOutdatedBilling: o, locale: i } = oe(), { t: c } = fe(), { data: d, isLoading: u } = tt({ enabled: !o }), { data: p, isLoading: h } = dt(), { data: g, isLoading: f } = Yt({ period: e, enabled: !o });
13684
+ if (o)
13677
13685
  return null;
13678
- if (d || p || g)
13679
- return /* @__PURE__ */ l(pe, { height: 72, rounded: !0, className: W("bpb-scope", n) });
13680
- const f = u == null ? void 0 : u.find((O) => O.id === (c == null ? void 0 : c.plan.current.planId)), w = f ? ve(f) : "community", N = w === "enterprise" || w === "managed", v = fn(h), C = v.find((O) => O.used > O.quota);
13681
- if (N && !C)
13686
+ if (u || h || f)
13687
+ return /* @__PURE__ */ l(pe, { height: 72, rounded: !0, className: W("bpb-scope", r) });
13688
+ const w = p == null ? void 0 : p.find((H) => H.id === (d == null ? void 0 : d.plan.current.planId)), N = w ? ve(w) : "community", v = N === "enterprise" || N === "managed", C = fn(g), S = C.find((H) => H.used > H.quota);
13689
+ if (v && !S && !n)
13682
13690
  return null;
13683
- const k = v.find((O) => O.key === "conversation_sessions"), I = v[0], S = C ?? (I && I.key !== "conversation_sessions" && I.pct >= 75 ? I : k ?? I), T = S ? Math.round(S.pct) : 0, A = T > 0 ? Math.max(5, T) : 0, _ = S ? Xn(S.pct) : "normal", L = _ !== "normal", U = w === "community", R = !U && (S != null && S.resets) ? it(Ps(e ?? (/* @__PURE__ */ new Date()).toISOString()), o) : null;
13684
- let V = null, j = null;
13685
- if (S && L) {
13686
- const O = da(S.remaining, S.unit);
13687
- V = i(_ === "critical" ? "usageWidgetLimitReached" : "usageWidgetRunningLow"), N ? j = i("usageWidgetEnterpriseOverQuota") : U && S.key === "conversation_sessions" ? j = _ === "critical" ? i("usageWidgetFreeExhausted") : i("usageWidgetFreeLeft", { left: O }) : j = _ === "critical" ? i("usageWidgetUpgradeToKeepGoing") : i("usageWidgetOnlyLeft", { left: O });
13691
+ const A = C.find((H) => H.key === "conversation_sessions"), T = C[0], k = S ?? (T && T.key !== "conversation_sessions" && T.pct >= 75 ? T : A ?? T), I = k ? Math.round(k.pct) : 0, _ = I > 0 ? Math.max(5, I) : 0, L = k ? Xn(k.pct) : "normal", F = L !== "normal", R = N === "community", Z = !R && (k != null && k.resets) ? it(Ps(e ?? (/* @__PURE__ */ new Date()).toISOString()), i) : null;
13692
+ let j = null, G = null;
13693
+ if (k && F) {
13694
+ const H = da(k.remaining, k.unit);
13695
+ j = c(L === "critical" ? "usageWidgetLimitReached" : "usageWidgetRunningLow"), v ? G = c("usageWidgetEnterpriseOverQuota") : R && k.key === "conversation_sessions" ? G = L === "critical" ? c("usageWidgetFreeExhausted") : c("usageWidgetFreeLeft", { left: H }) : G = L === "critical" ? c("usageWidgetUpgradeToKeepGoing") : c("usageWidgetOnlyLeft", { left: H });
13688
13696
  }
13689
- const $ = /* @__PURE__ */ l(Se, { children: S ? /* @__PURE__ */ m(Se, { children: [
13697
+ const z = /* @__PURE__ */ l(Se, { children: k ? /* @__PURE__ */ m(Se, { children: [
13690
13698
  /* @__PURE__ */ m("div", { className: "bpb-plan-usage__head", children: [
13691
- L && /* @__PURE__ */ l(Ss, { size: 16, className: W("bpb-plan-usage__alert", `bpb-plan-usage__alert--${_}`) }),
13692
- /* @__PURE__ */ l("span", { className: "bpb-plan-usage__plan", children: no(S.key, i) }),
13699
+ F && /* @__PURE__ */ l(Ss, { size: 16, className: W("bpb-plan-usage__alert", `bpb-plan-usage__alert--${L}`) }),
13700
+ /* @__PURE__ */ l("span", { className: "bpb-plan-usage__plan", children: no(k.key, c) }),
13693
13701
  /* @__PURE__ */ m("span", { className: "bpb-plan-usage__count", children: [
13694
- da(S.used, S.unit),
13702
+ da(k.used, k.unit),
13695
13703
  " / ",
13696
- da(S.quota, S.unit)
13704
+ da(k.quota, k.unit)
13697
13705
  ] }),
13698
- t && !L && /* @__PURE__ */ l(Wt, { size: 15, className: "bpb-plan-usage__chevron" })
13706
+ t && !F && /* @__PURE__ */ l(Wt, { size: 15, className: "bpb-plan-usage__chevron" })
13699
13707
  ] }),
13700
13708
  /* @__PURE__ */ l(
13701
13709
  "div",
13702
13710
  {
13703
13711
  className: "bpb-plan-usage__bar",
13704
13712
  role: "progressbar",
13705
- "aria-valuenow": T,
13713
+ "aria-valuenow": I,
13706
13714
  "aria-valuemin": 0,
13707
13715
  "aria-valuemax": 100,
13708
13716
  children: /* @__PURE__ */ l(
13709
13717
  "div",
13710
13718
  {
13711
- className: W("bpb-plan-usage__fill", `bpb-plan-usage__fill--${_}`),
13712
- style: { width: `${A}%` }
13719
+ className: W("bpb-plan-usage__fill", `bpb-plan-usage__fill--${L}`),
13720
+ style: { width: `${_}%` }
13713
13721
  }
13714
13722
  )
13715
13723
  }
13716
13724
  ),
13717
- V ? /* @__PURE__ */ m("p", { className: "bpb-plan-usage__status", children: [
13718
- /* @__PURE__ */ m("strong", { className: W("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${_}`), children: [
13719
- V,
13725
+ j ? /* @__PURE__ */ m("p", { className: "bpb-plan-usage__status", children: [
13726
+ /* @__PURE__ */ m("strong", { className: W("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${L}`), children: [
13727
+ j,
13720
13728
  "."
13721
13729
  ] }),
13722
13730
  " ",
13723
- j && /* @__PURE__ */ l("span", { className: "bpb-plan-usage__status-detail", children: j })
13724
- ] }) : R && /* @__PURE__ */ l("span", { className: "bpb-plan-usage__reset", children: i("usageWidgetResets", { date: R }) }),
13725
- t && L && !N && /* @__PURE__ */ m("span", { className: "bpb-plan-usage__cta", children: [
13726
- i("usageWidgetViewOptions"),
13731
+ G && /* @__PURE__ */ l("span", { className: "bpb-plan-usage__status-detail", children: G })
13732
+ ] }) : Z && /* @__PURE__ */ l("span", { className: "bpb-plan-usage__reset", children: c("usageWidgetResets", { date: Z }) }),
13733
+ t && F && !v && /* @__PURE__ */ m("span", { className: "bpb-plan-usage__cta", children: [
13734
+ c("usageWidgetViewOptions"),
13727
13735
  /* @__PURE__ */ l($n, { size: 14 })
13728
13736
  ] })
13729
13737
  ] }) : /* @__PURE__ */ m("div", { className: "bpb-plan-usage__head", children: [
13730
- /* @__PURE__ */ l("span", { className: "bpb-plan-usage__plan", children: f ? ye(f.name) : i("free") }),
13738
+ /* @__PURE__ */ l("span", { className: "bpb-plan-usage__plan", children: w ? ye(w.name) : c("free") }),
13731
13739
  t && /* @__PURE__ */ l(Wt, { size: 15, className: "bpb-plan-usage__chevron" })
13732
- ] }) }), z = W(
13740
+ ] }) }), U = W(
13733
13741
  "bpb-plan-usage bpb-scope",
13734
13742
  `bpb-plan-usage--${a}`,
13735
- L && `bpb-plan-usage--${_}`,
13743
+ F && `bpb-plan-usage--${L}`,
13736
13744
  t && "bpb-plan-usage--clickable",
13737
- n
13745
+ r
13738
13746
  );
13739
- return t ? /* @__PURE__ */ l("button", { type: "button", className: z, style: r, onClick: t, children: $ }) : /* @__PURE__ */ l("div", { className: z, style: r, children: $ });
13747
+ return t ? /* @__PURE__ */ l("button", { type: "button", className: U, style: s, onClick: t, children: z }) : /* @__PURE__ */ l("div", { className: U, style: s, children: z });
13740
13748
  }, Tc = ({
13741
13749
  children: t,
13742
13750
  delay: e = 200,
@@ -13747,28 +13755,28 @@ const Vc = ({
13747
13755
  block: o = !1,
13748
13756
  className: i
13749
13757
  }) => {
13750
- const { isOutdatedBilling: c, analytics: d, locale: u } = se(), { t: p } = fe(), { data: h } = Yt({ period: r, enabled: !c }), { data: g } = tt({ enabled: !c }), { data: f } = dt(), [w, N] = X(!1), v = nn(null), C = () => {
13758
+ const { isOutdatedBilling: c, analytics: d, locale: u } = oe(), { t: p } = fe(), { data: h } = Yt({ period: r, enabled: !c }), { data: g } = tt({ enabled: !c }), { data: f } = dt(), [w, N] = ee(!1), v = nn(null), C = () => {
13751
13759
  v.current && (clearTimeout(v.current), v.current = null);
13752
13760
  };
13753
13761
  Oe(() => C, []);
13754
- const k = f == null ? void 0 : f.find((z) => z.id === (g == null ? void 0 : g.plan.current.planId)), I = k ? ve(k) : "community", S = fn(h), T = !c && S.length > 0, A = () => {
13755
- T && (C(), v.current = setTimeout(() => N(!0), Math.max(0, e)));
13762
+ const S = f == null ? void 0 : f.find((z) => z.id === (g == null ? void 0 : g.plan.current.planId)), A = S ? ve(S) : "community", T = fn(h), k = !c && T.length > 0, I = () => {
13763
+ k && (C(), v.current = setTimeout(() => N(!0), Math.max(0, e)));
13756
13764
  }, _ = () => {
13757
13765
  C(), N(!1);
13758
- }, L = k ? ye(k.name) : p("free"), U = I === "community", R = U ? S.find((z) => z.key === "conversation_sessions") : void 0, V = U && !!s, j = it(Ps(r ?? (/* @__PURE__ */ new Date()).toISOString()), u), $ = () => {
13766
+ }, L = S ? ye(S.name) : p("free"), F = A === "community", R = F ? T.find((z) => z.key === "conversation_sessions") : void 0, Z = F && !!s, j = it(Ps(r ?? (/* @__PURE__ */ new Date()).toISOString()), u), G = () => {
13759
13767
  d.capture(we.UPGRADE_CTA_CLICKED, { source: "usage_popover" }), s == null || s();
13760
13768
  };
13761
13769
  return /* @__PURE__ */ m(
13762
13770
  "span",
13763
13771
  {
13764
13772
  className: W("bpb-usage-pop bpb-scope", o && "bpb-usage-pop--block", i),
13765
- onMouseEnter: A,
13773
+ onMouseEnter: I,
13766
13774
  onMouseLeave: _,
13767
- onFocus: A,
13775
+ onFocus: I,
13768
13776
  onBlur: _,
13769
13777
  children: [
13770
13778
  t,
13771
- w && T && /* @__PURE__ */ m(
13779
+ w && k && /* @__PURE__ */ m(
13772
13780
  "span",
13773
13781
  {
13774
13782
  className: W(
@@ -13778,7 +13786,7 @@ const Vc = ({
13778
13786
  ),
13779
13787
  role: "tooltip",
13780
13788
  children: [
13781
- U ? /* @__PURE__ */ m("span", { className: "bpb-usage-pop__header", children: [
13789
+ F ? /* @__PURE__ */ m("span", { className: "bpb-usage-pop__header", children: [
13782
13790
  /* @__PURE__ */ l("span", { className: "bpb-usage-pop__plan", children: p("usagePopoverFreeTitle") }),
13783
13791
  R && /* @__PURE__ */ l("span", { className: "bpb-usage-pop__subtitle", children: /* @__PURE__ */ l(
13784
13792
  qa,
@@ -13792,8 +13800,8 @@ const Vc = ({
13792
13800
  /* @__PURE__ */ l("span", { className: "bpb-usage-pop__plan", children: p("usagePopoverPlanName", { planName: L }) }),
13793
13801
  /* @__PURE__ */ l("span", { className: "bpb-usage-pop__period", children: p("usagePopoverTitle", { date: j }) })
13794
13802
  ] }) }),
13795
- S.map((z) => {
13796
- const O = z.pct > 0 ? Math.max(5, z.pct) : 0;
13803
+ T.map((z) => {
13804
+ const U = z.pct > 0 ? Math.max(5, z.pct) : 0;
13797
13805
  return /* @__PURE__ */ m("span", { className: "bpb-usage-pop__item", children: [
13798
13806
  /* @__PURE__ */ m("span", { className: "bpb-usage-pop__head", children: [
13799
13807
  /* @__PURE__ */ l("span", { className: "bpb-usage-pop__name", children: no(z.key, p) }),
@@ -13807,14 +13815,14 @@ const Vc = ({
13807
13815
  "span",
13808
13816
  {
13809
13817
  className: W("bpb-usage-pop__fill", `bpb-usage-pop__fill--${Xn(z.pct)}`),
13810
- style: { width: `${O}%` }
13818
+ style: { width: `${U}%` }
13811
13819
  }
13812
13820
  ) })
13813
13821
  ] }, z.key);
13814
13822
  }),
13815
- V && /* @__PURE__ */ m("span", { className: "bpb-usage-pop__nudge", children: [
13823
+ Z && /* @__PURE__ */ m("span", { className: "bpb-usage-pop__nudge", children: [
13816
13824
  /* @__PURE__ */ l("span", { className: "bpb-usage-pop__nudge-text", children: /* @__PURE__ */ l(qa, { i18nKey: "usagePopoverNudgeText", components: { bold: /* @__PURE__ */ l("strong", {}) } }) }),
13817
- /* @__PURE__ */ m("button", { type: "button", className: "bpb-usage-pop__nudge-cta", onClick: $, children: [
13825
+ /* @__PURE__ */ m("button", { type: "button", className: "bpb-usage-pop__nudge-cta", onClick: G, children: [
13818
13826
  p("usagePopoverNudgeCta"),
13819
13827
  /* @__PURE__ */ l($n, { size: 14 })
13820
13828
  ] })
@@ -13837,10 +13845,10 @@ const Vc = ({
13837
13845
  className: c,
13838
13846
  ...d
13839
13847
  }) => {
13840
- const { isOutdatedBilling: u } = se(), { data: p } = Yt({ period: i, enabled: !u }), h = fn(p);
13848
+ const { isOutdatedBilling: u } = oe(), { data: p } = Yt({ period: i, enabled: !u }), h = fn(p);
13841
13849
  if (u || h.length === 0)
13842
13850
  return null;
13843
- const g = h[0], f = Xn(g.pct), w = g.pct > 0 ? Math.max(5, g.pct) : 0, N = (t - e) / 2, v = 2 * Math.PI * N, C = v * (1 - w / 100), k = d["aria-label"] ?? `${Math.round(g.pct)}% of your ${g.label.toLowerCase()} used`, I = /* @__PURE__ */ m(Se, { children: [
13851
+ const g = h[0], f = Xn(g.pct), w = g.pct > 0 ? Math.max(5, g.pct) : 0, N = (t - e) / 2, v = 2 * Math.PI * N, C = v * (1 - w / 100), S = d["aria-label"] ?? `${Math.round(g.pct)}% of your ${g.label.toLowerCase()} used`, A = /* @__PURE__ */ m(Se, { children: [
13844
13852
  /* @__PURE__ */ m("svg", { className: "bpb-usage-ring__svg", width: t, height: t, viewBox: `0 0 ${t} ${t}`, "aria-hidden": !0, children: [
13845
13853
  /* @__PURE__ */ l(
13846
13854
  "circle",
@@ -13873,8 +13881,8 @@ const Vc = ({
13873
13881
  Math.round(g.pct),
13874
13882
  "%"
13875
13883
  ] })
13876
- ] }), S = W("bpb-usage-ring", n && "bpb-usage-ring--clickable");
13877
- return /* @__PURE__ */ l(Tc, { delay: r, align: s, period: i, className: c, children: n ? /* @__PURE__ */ l("button", { type: "button", className: S, onClick: n, "aria-label": k, children: I }) : /* @__PURE__ */ l("span", { className: S, tabIndex: 0, role: "img", "aria-label": k, children: I }) });
13884
+ ] }), T = W("bpb-usage-ring", n && "bpb-usage-ring--clickable");
13885
+ return /* @__PURE__ */ l(Tc, { delay: r, align: s, period: i, className: c, children: n ? /* @__PURE__ */ l("button", { type: "button", className: T, onClick: n, "aria-label": S, children: A }) : /* @__PURE__ */ l("span", { className: T, tabIndex: 0, role: "img", "aria-label": S, children: A }) });
13878
13886
  };
13879
13887
  export {
13880
13888
  Kc as AddonsSummaryCard,
@@ -13964,7 +13972,7 @@ export {
13964
13972
  fn as usageItems,
13965
13973
  Xn as usageTier,
13966
13974
  Ht as useAddons,
13967
- se as useBilling,
13975
+ oe as useBilling,
13968
13976
  es as useBillingReadonly,
13969
13977
  ts as useCreatePaymentMethodIntent,
13970
13978
  Xr as useCustomer,