@bpinternal/billing-ui 0.19.0 → 0.19.1
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 +660 -660
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var dr = (a, e, t) =>
|
|
2
|
+
var _o = Object.defineProperty;
|
|
3
|
+
var No = (a, e, t) => e in a ? _o(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
4
|
+
var dr = (a, e, t) => No(a, typeof e != "symbol" ? e + "" : e, t);
|
|
5
5
|
import { jsx as i, jsxs as p, Fragment as Te } from "react/jsx-runtime";
|
|
6
|
-
import { QueryClient as
|
|
7
|
-
import { createElement as ya, isValidElement as Gt, Fragment as
|
|
8
|
-
import { loadStripe as
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import { CardElement as Kt, AddressElement as
|
|
6
|
+
import { QueryClient as Co, hydrate as So, dehydrate as ko, useQuery as Be, useMutation as ka } from "@tanstack/react-query";
|
|
7
|
+
import { createElement as ya, isValidElement as Gt, Fragment as wo, cloneElement as To, Children as Io, createContext as Gr, useContext as At, useCallback as Ea, useState as X, useRef as dn, useEffect as Fe, useMemo as Ee, useSyncExternalStore as Ao, useId as xo } from "react";
|
|
8
|
+
import { loadStripe as Po } from "@stripe/stripe-js";
|
|
9
|
+
import { createPortal as Do } from "react-dom";
|
|
10
|
+
import { CardElement as Kt, AddressElement as Kr, useStripe as $r, useElements as Hr, Elements as Yr } from "@stripe/react-stripe-js";
|
|
11
11
|
const cr = /* @__PURE__ */ new Map();
|
|
12
|
-
function
|
|
12
|
+
function Ro(a) {
|
|
13
13
|
let e = cr.get(a);
|
|
14
|
-
return e || (e =
|
|
14
|
+
return e || (e = Po(a, {
|
|
15
15
|
developerTools: { assistant: { enabled: !1 } }
|
|
16
16
|
}), cr.set(a, e)), e;
|
|
17
17
|
}
|
|
18
18
|
var be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
19
|
-
function
|
|
19
|
+
function Eo(a) {
|
|
20
20
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Lo = {
|
|
23
23
|
area: !0,
|
|
24
24
|
base: !0,
|
|
25
25
|
br: !0,
|
|
@@ -35,22 +35,22 @@ var Oo = {
|
|
|
35
35
|
track: !0,
|
|
36
36
|
wbr: !0
|
|
37
37
|
};
|
|
38
|
-
const
|
|
39
|
-
var
|
|
38
|
+
const Oo = /* @__PURE__ */ Eo(Lo);
|
|
39
|
+
var Fo = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
|
|
40
40
|
function ur(a) {
|
|
41
41
|
var e = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, t = a.match(/<\/?([^\s]+?)[/\s>]/);
|
|
42
|
-
if (t && (e.name = t[1], (
|
|
42
|
+
if (t && (e.name = t[1], (Oo[t[1]] || a.charAt(a.length - 2) === "/") && (e.voidElement = !0), e.name.startsWith("!--"))) {
|
|
43
43
|
var n = a.indexOf("-->");
|
|
44
44
|
return { type: "comment", comment: n !== -1 ? a.slice(4, n) : "" };
|
|
45
45
|
}
|
|
46
|
-
for (var r = new RegExp(
|
|
46
|
+
for (var r = new RegExp(Fo), s = null; (s = r.exec(a)) !== null; ) if (s[0].trim()) if (s[1]) {
|
|
47
47
|
var o = s[1].trim(), l = [o, ""];
|
|
48
48
|
o.indexOf("=") > -1 && (l = o.split("=")), e.attrs[l[0]] = l[1], r.lastIndex--;
|
|
49
49
|
} else s[2] && (e.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
|
|
50
50
|
return e;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
53
|
-
function
|
|
52
|
+
var Mo = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Uo = /^\s*$/, Bo = /* @__PURE__ */ Object.create(null);
|
|
53
|
+
function Jr(a, e) {
|
|
54
54
|
switch (e.type) {
|
|
55
55
|
case "text":
|
|
56
56
|
return a + e.content;
|
|
@@ -59,19 +59,19 @@ function Qr(a, e) {
|
|
|
59
59
|
var n = [];
|
|
60
60
|
for (var r in t) n.push(r + '="' + t[r] + '"');
|
|
61
61
|
return n.length ? " " + n.join(" ") : "";
|
|
62
|
-
}(e.attrs) : "") + (e.voidElement ? "/>" : ">"), e.voidElement ? a : a + e.children.reduce(
|
|
62
|
+
}(e.attrs) : "") + (e.voidElement ? "/>" : ">"), e.voidElement ? a : a + e.children.reduce(Jr, "") + "</" + e.name + ">";
|
|
63
63
|
case "comment":
|
|
64
64
|
return a + "<!--" + e.comment + "-->";
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
e || (e = {}), e.components || (e.components =
|
|
67
|
+
var zo = { parse: function(a, e) {
|
|
68
|
+
e || (e = {}), e.components || (e.components = Bo);
|
|
69
69
|
var t, n = [], r = [], s = -1, o = !1;
|
|
70
70
|
if (a.indexOf("<") !== 0) {
|
|
71
71
|
var l = a.indexOf("<");
|
|
72
72
|
n.push({ type: "text", content: l === -1 ? a : a.substring(0, l) });
|
|
73
73
|
}
|
|
74
|
-
return a.replace(
|
|
74
|
+
return a.replace(Mo, function(d, c) {
|
|
75
75
|
if (o) {
|
|
76
76
|
if (d !== "</" + t.name + ">") return;
|
|
77
77
|
o = !1;
|
|
@@ -84,12 +84,12 @@ var jo = { parse: function(a, e) {
|
|
|
84
84
|
if (m && (s++, (t = ur(d)).type === "tag" && e.components[t.name] && (t.type = "component", o = !0), t.voidElement || o || !C || C === "<" || t.children.push({ type: "text", content: a.slice(h, a.indexOf("<", h)) }), s === 0 && n.push(t), (u = r[s - 1]) && u.children.push(t), r[s] = t), (!m || t.voidElement) && (s > -1 && (t.voidElement || t.name === d.slice(2, -1)) && (s--, t = s === -1 ? n : r[s]), !o && C !== "<" && C)) {
|
|
85
85
|
u = s === -1 ? n : r[s].children;
|
|
86
86
|
var v = a.indexOf("<", h), k = a.slice(h, v === -1 ? void 0 : v);
|
|
87
|
-
|
|
87
|
+
Uo.test(k) && (k = " "), (v > -1 && s + u.length >= 0 || k !== " ") && u.push({ type: "text", content: k });
|
|
88
88
|
}
|
|
89
89
|
}), n;
|
|
90
90
|
}, stringify: function(a) {
|
|
91
91
|
return a.reduce(function(e, t) {
|
|
92
|
-
return e +
|
|
92
|
+
return e + Jr("", t);
|
|
93
93
|
}, "");
|
|
94
94
|
} };
|
|
95
95
|
function qt() {
|
|
@@ -105,7 +105,7 @@ function $t() {
|
|
|
105
105
|
e[t] = arguments[t];
|
|
106
106
|
qe(e[0]) && pr[e[0]] || (qe(e[0]) && (pr[e[0]] = /* @__PURE__ */ new Date()), qt(...e));
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Qr = (a, e) => () => {
|
|
109
109
|
if (a.isInitialized)
|
|
110
110
|
e();
|
|
111
111
|
else {
|
|
@@ -117,12 +117,12 @@ const Xr = (a, e) => () => {
|
|
|
117
117
|
a.on("initialized", t);
|
|
118
118
|
}
|
|
119
119
|
}, mr = (a, e, t) => {
|
|
120
|
-
a.loadNamespaces(e,
|
|
120
|
+
a.loadNamespaces(e, Qr(a, t));
|
|
121
121
|
}, gr = (a, e, t, n) => {
|
|
122
122
|
qe(t) && (t = [t]), t.forEach((r) => {
|
|
123
123
|
a.options.ns.indexOf(r) < 0 && a.options.ns.push(r);
|
|
124
|
-
}), a.loadLanguages(e,
|
|
125
|
-
},
|
|
124
|
+
}), a.loadLanguages(e, Qr(a, n));
|
|
125
|
+
}, jo = function(a, e) {
|
|
126
126
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
127
127
|
const n = e.languages[0], r = e.options ? e.options.fallbackLng : !1, s = e.languages[e.languages.length - 1];
|
|
128
128
|
if (n.toLowerCase() === "cimode") return !0;
|
|
@@ -131,15 +131,15 @@ const Xr = (a, e) => () => {
|
|
|
131
131
|
return c === -1 || c === 2;
|
|
132
132
|
};
|
|
133
133
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !o(e.isLanguageChangingTo, a) ? !1 : !!(e.hasResourceBundle(n, a) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || o(n, a) && (!r || o(s, a)));
|
|
134
|
-
},
|
|
134
|
+
}, Vo = function(a, e) {
|
|
135
135
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
136
136
|
return !e.languages || !e.languages.length ? ($t("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(a, {
|
|
137
137
|
lng: t.lng,
|
|
138
138
|
precheck: (r, s) => {
|
|
139
139
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !s(r.isLanguageChangingTo, a)) return !1;
|
|
140
140
|
}
|
|
141
|
-
}) :
|
|
142
|
-
}, qe = (a) => typeof a == "string", Ha = (a) => typeof a == "object" && a !== null,
|
|
141
|
+
}) : jo(a, e, t);
|
|
142
|
+
}, qe = (a) => typeof a == "string", Ha = (a) => typeof a == "object" && a !== null, Zo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, qo = {
|
|
143
143
|
"&": "&",
|
|
144
144
|
"&": "&",
|
|
145
145
|
"<": "<",
|
|
@@ -160,7 +160,7 @@ const Xr = (a, e) => () => {
|
|
|
160
160
|
"…": "…",
|
|
161
161
|
"/": "/",
|
|
162
162
|
"/": "/"
|
|
163
|
-
},
|
|
163
|
+
}, Wo = (a) => qo[a], Go = (a) => a.replace(Zo, Wo);
|
|
164
164
|
let On = {
|
|
165
165
|
bindI18n: "languageChanged",
|
|
166
166
|
bindI18nStore: "",
|
|
@@ -169,19 +169,19 @@ let On = {
|
|
|
169
169
|
transWrapTextNodes: "",
|
|
170
170
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
171
171
|
useSuspense: !0,
|
|
172
|
-
unescape:
|
|
172
|
+
unescape: Go
|
|
173
173
|
};
|
|
174
|
-
const
|
|
174
|
+
const Ko = function() {
|
|
175
175
|
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
176
176
|
On = {
|
|
177
177
|
...On,
|
|
178
178
|
...a
|
|
179
179
|
};
|
|
180
|
-
},
|
|
181
|
-
let
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
}, qn = () =>
|
|
180
|
+
}, Xr = () => On;
|
|
181
|
+
let es;
|
|
182
|
+
const $o = (a) => {
|
|
183
|
+
es = a;
|
|
184
|
+
}, qn = () => es, wn = (a, e) => {
|
|
185
185
|
if (!a) return !1;
|
|
186
186
|
const t = a.props ? a.props.children : a.children;
|
|
187
187
|
return e ? t.length > 0 : !!t;
|
|
@@ -189,12 +189,12 @@ const Ho = (a) => {
|
|
|
189
189
|
if (!a) return [];
|
|
190
190
|
const e = a.props ? a.props.children : a.children;
|
|
191
191
|
return a.props && a.props.i18nIsDynamicList ? Ya(e) : e;
|
|
192
|
-
},
|
|
192
|
+
}, Ho = (a) => Array.isArray(a) && a.every(Gt), Ya = (a) => Array.isArray(a) ? a : [a], Yo = (a, e) => {
|
|
193
193
|
const t = {
|
|
194
194
|
...e
|
|
195
195
|
};
|
|
196
196
|
return t.props = Object.assign(a.props, e.props), t;
|
|
197
|
-
},
|
|
197
|
+
}, as = (a, e) => {
|
|
198
198
|
if (!a) return "";
|
|
199
199
|
let t = "";
|
|
200
200
|
const n = Ya(a), r = e.transSupportBasicHtmlNodes && e.transKeepBasicHtmlNodesFor ? e.transKeepBasicHtmlNodesFor : [];
|
|
@@ -213,7 +213,7 @@ const Ho = (a) => {
|
|
|
213
213
|
else if (u && c === 1 && qe(m))
|
|
214
214
|
t += `<${d}>${m}</${d}>`;
|
|
215
215
|
else {
|
|
216
|
-
const g =
|
|
216
|
+
const g = as(m, e);
|
|
217
217
|
t += `<${o}>${g}</${o}>`;
|
|
218
218
|
}
|
|
219
219
|
} else if (s === null)
|
|
@@ -231,7 +231,7 @@ const Ho = (a) => {
|
|
|
231
231
|
} else
|
|
232
232
|
qt("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", s);
|
|
233
233
|
}), t;
|
|
234
|
-
},
|
|
234
|
+
}, Jo = (a, e, t, n, r, s) => {
|
|
235
235
|
if (e === "") return [];
|
|
236
236
|
const o = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(o.map((v) => `<${v}`).join("|")).test(e);
|
|
237
237
|
if (!a && !l && !s) return [e];
|
|
@@ -241,16 +241,16 @@ const Ho = (a) => {
|
|
|
241
241
|
});
|
|
242
242
|
};
|
|
243
243
|
c(a);
|
|
244
|
-
const u =
|
|
244
|
+
const u = zo.parse(`<0>${e}</0>`), m = {
|
|
245
245
|
...d,
|
|
246
246
|
...r
|
|
247
247
|
}, g = (v, k, _) => {
|
|
248
248
|
const T = Tn(v), w = C(T, k.children, _);
|
|
249
|
-
return
|
|
249
|
+
return Ho(T) && w.length === 0 || v.props && v.props.i18nIsDynamicList ? T : w;
|
|
250
250
|
}, h = (v, k, _, T, w) => {
|
|
251
|
-
v.dummy ? (v.children = k, _.push(
|
|
251
|
+
v.dummy ? (v.children = k, _.push(To(v, {
|
|
252
252
|
key: T
|
|
253
|
-
}, w ? void 0 : k))) : _.push(...
|
|
253
|
+
}, w ? void 0 : k))) : _.push(...Io.map([v], (I) => {
|
|
254
254
|
const N = {
|
|
255
255
|
...I.props
|
|
256
256
|
};
|
|
@@ -267,7 +267,7 @@ const Ho = (a) => {
|
|
|
267
267
|
if (N.type === "tag") {
|
|
268
268
|
let A = T[parseInt(N.name, 10)];
|
|
269
269
|
_.length === 1 && !A && (A = _[0][N.name]), A || (A = {});
|
|
270
|
-
const x = Object.keys(N.attrs).length !== 0 ?
|
|
270
|
+
const x = Object.keys(N.attrs).length !== 0 ? Yo({
|
|
271
271
|
props: N.attrs
|
|
272
272
|
}, A) : A, M = Gt(x), z = M && wn(N, !0) && !N.voidElement, F = l && Ha(x) && x.dummy && !M, H = Ha(a) && Object.hasOwnProperty.call(a, N.name);
|
|
273
273
|
if (qe(x)) {
|
|
@@ -319,7 +319,7 @@ const Ho = (a) => {
|
|
|
319
319
|
}], u, Ya(a || []));
|
|
320
320
|
return Tn(y[0]);
|
|
321
321
|
};
|
|
322
|
-
function
|
|
322
|
+
function Qo(a) {
|
|
323
323
|
let {
|
|
324
324
|
children: e,
|
|
325
325
|
count: t,
|
|
@@ -340,12 +340,12 @@ function Xo(a) {
|
|
|
340
340
|
if (!y)
|
|
341
341
|
return $t("You will need to pass in an i18next instance by using i18nextReactModule"), e;
|
|
342
342
|
const v = g || y.t.bind(y) || ((z) => z), k = {
|
|
343
|
-
...
|
|
343
|
+
...Xr(),
|
|
344
344
|
...y.options && y.options.react
|
|
345
345
|
};
|
|
346
346
|
let _ = u || v.ns || y.options && y.options.defaultNS;
|
|
347
347
|
_ = qe(_) ? [_] : _ || ["translation"];
|
|
348
|
-
const T =
|
|
348
|
+
const T = as(e, k), w = d || T || k.transEmptyNodeValue || r, {
|
|
349
349
|
hashTransKey: I
|
|
350
350
|
} = k, N = r || (I ? I(T || w) : T || w);
|
|
351
351
|
y.options && y.options.interpolation && y.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
|
|
@@ -373,20 +373,20 @@ function Xo(a) {
|
|
|
373
373
|
const F = c[z];
|
|
374
374
|
if (typeof F.type == "function" || !F.props || !F.props.children || A.indexOf(`${z}/>`) < 0 && A.indexOf(`${z} />`) < 0) return;
|
|
375
375
|
function H() {
|
|
376
|
-
return ya(
|
|
376
|
+
return ya(wo, null, F);
|
|
377
377
|
}
|
|
378
378
|
c[z] = ya(H);
|
|
379
379
|
});
|
|
380
|
-
const x =
|
|
380
|
+
const x = Jo(c || e, A, y, k, S, h), M = n !== void 0 ? n : k.defaultTransParent;
|
|
381
381
|
return M ? ya(M, C, x) : x;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
383
|
+
const Xo = {
|
|
384
384
|
type: "3rdParty",
|
|
385
385
|
init(a) {
|
|
386
|
-
|
|
386
|
+
Ko(a.options.react), $o(a);
|
|
387
387
|
}
|
|
388
|
-
}, Wn =
|
|
389
|
-
class
|
|
388
|
+
}, Wn = Gr();
|
|
389
|
+
class ei {
|
|
390
390
|
constructor() {
|
|
391
391
|
dr(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
|
|
392
392
|
this.usedNamespaces = {};
|
|
@@ -418,7 +418,7 @@ function Ht(a) {
|
|
|
418
418
|
i18n: y,
|
|
419
419
|
defaultNS: v
|
|
420
420
|
} = At(Wn) || {}, k = m || y || qn(), _ = g || k && k.t.bind(k);
|
|
421
|
-
return
|
|
421
|
+
return Qo({
|
|
422
422
|
children: e,
|
|
423
423
|
count: t,
|
|
424
424
|
parent: n,
|
|
@@ -435,12 +435,12 @@ function Ht(a) {
|
|
|
435
435
|
...C
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
|
-
const
|
|
438
|
+
const ai = (a, e) => {
|
|
439
439
|
const t = dn();
|
|
440
440
|
return Fe(() => {
|
|
441
441
|
t.current = a;
|
|
442
442
|
}, [a, e]), t.current;
|
|
443
|
-
},
|
|
443
|
+
}, ts = (a, e, t, n) => a.getFixedT(e, t, n), ti = (a, e, t, n) => Ea(ts(a, e, t, n), [a, e, t, n]), me = function(a) {
|
|
444
444
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
445
445
|
const {
|
|
446
446
|
i18n: t
|
|
@@ -448,14 +448,14 @@ const ti = (a, e) => {
|
|
|
448
448
|
i18n: n,
|
|
449
449
|
defaultNS: r
|
|
450
450
|
} = At(Wn) || {}, s = t || n || qn();
|
|
451
|
-
if (s && !s.reportNamespaces && (s.reportNamespaces = new
|
|
451
|
+
if (s && !s.reportNamespaces && (s.reportNamespaces = new ei()), !s) {
|
|
452
452
|
$t("You will need to pass in an i18next instance by using initReactI18next");
|
|
453
453
|
const w = (N, D) => qe(D) ? D : Ha(D) && qe(D.defaultValue) ? D.defaultValue : Array.isArray(N) ? N[N.length - 1] : N, I = [w, {}, !1];
|
|
454
454
|
return I.t = w, I.i18n = {}, I.ready = !1, I;
|
|
455
455
|
}
|
|
456
456
|
s.options.react && s.options.react.wait !== void 0 && $t("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
457
457
|
const o = {
|
|
458
|
-
...
|
|
458
|
+
...Xr(),
|
|
459
459
|
...s.options.react,
|
|
460
460
|
...e
|
|
461
461
|
}, {
|
|
@@ -464,10 +464,10 @@ const ti = (a, e) => {
|
|
|
464
464
|
} = o;
|
|
465
465
|
let c = r || s.options && s.options.defaultNS;
|
|
466
466
|
c = qe(c) ? [c] : c || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(c);
|
|
467
|
-
const u = (s.isInitialized || s.initializedStoreOnce) && c.every((w) =>
|
|
467
|
+
const u = (s.isInitialized || s.initializedStoreOnce) && c.every((w) => Vo(w, s, o)), m = ti(s, e.lng || null, o.nsMode === "fallback" ? c : c[0], d), g = () => m, h = () => ts(s, e.lng || null, o.nsMode === "fallback" ? c : c[0], d), [C, y] = X(g);
|
|
468
468
|
let v = c.join();
|
|
469
469
|
e.lng && (v = `${e.lng}${v}`);
|
|
470
|
-
const k =
|
|
470
|
+
const k = ai(v), _ = dn(!0);
|
|
471
471
|
Fe(() => {
|
|
472
472
|
const {
|
|
473
473
|
bindI18n: w,
|
|
@@ -493,7 +493,7 @@ const ti = (a, e) => {
|
|
|
493
493
|
e.lng ? gr(s, e.lng, c, () => w()) : mr(s, c, () => w());
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
-
function
|
|
496
|
+
function ni(a) {
|
|
497
497
|
let {
|
|
498
498
|
i18n: e,
|
|
499
499
|
defaultNS: t,
|
|
@@ -513,11 +513,11 @@ const ne = (a) => typeof a == "string", lt = () => {
|
|
|
513
513
|
a = n, e = r;
|
|
514
514
|
});
|
|
515
515
|
return t.resolve = a, t.reject = e, t;
|
|
516
|
-
}, hr = (a) => a == null ? "" : "" + a,
|
|
516
|
+
}, hr = (a) => a == null ? "" : "" + a, ri = (a, e, t) => {
|
|
517
517
|
a.forEach((n) => {
|
|
518
518
|
e[n] && (t[n] = e[n]);
|
|
519
519
|
});
|
|
520
|
-
},
|
|
520
|
+
}, si = /###/g, br = (a) => a && a.indexOf("###") > -1 ? a.replace(si, ".") : a, fr = (a) => !a || ne(a), ct = (a, e, t) => {
|
|
521
521
|
const n = ne(e) ? e.split(".") : e;
|
|
522
522
|
let r = 0;
|
|
523
523
|
for (; r < n.length - 1; ) {
|
|
@@ -542,7 +542,7 @@ const ne = (a) => typeof a == "string", lt = () => {
|
|
|
542
542
|
for (; l.obj === void 0 && o.length; )
|
|
543
543
|
s = `${o[o.length - 1]}.${s}`, o = o.slice(0, o.length - 1), l = ct(a, o, Object), l && l.obj && typeof l.obj[`${l.k}.${s}`] < "u" && (l.obj = void 0);
|
|
544
544
|
l.obj[`${l.k}.${s}`] = t;
|
|
545
|
-
},
|
|
545
|
+
}, oi = (a, e, t, n) => {
|
|
546
546
|
const {
|
|
547
547
|
obj: r,
|
|
548
548
|
k: s
|
|
@@ -555,15 +555,15 @@ const ne = (a) => typeof a == "string", lt = () => {
|
|
|
555
555
|
} = ct(a, e);
|
|
556
556
|
if (t)
|
|
557
557
|
return t[n];
|
|
558
|
-
},
|
|
558
|
+
}, ii = (a, e, t) => {
|
|
559
559
|
const n = Yt(a, t);
|
|
560
560
|
return n !== void 0 ? n : Yt(e, t);
|
|
561
|
-
},
|
|
561
|
+
}, ns = (a, e, t) => {
|
|
562
562
|
for (const n in e)
|
|
563
|
-
n !== "__proto__" && n !== "constructor" && (n in a ? ne(a[n]) || a[n] instanceof String || ne(e[n]) || e[n] instanceof String ? t && (a[n] = e[n]) :
|
|
563
|
+
n !== "__proto__" && n !== "constructor" && (n in a ? ne(a[n]) || a[n] instanceof String || ne(e[n]) || e[n] instanceof String ? t && (a[n] = e[n]) : ns(a[n], e[n], t) : a[n] = e[n]);
|
|
564
564
|
return a;
|
|
565
565
|
}, Va = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
566
|
-
var
|
|
566
|
+
var li = {
|
|
567
567
|
"&": "&",
|
|
568
568
|
"<": "<",
|
|
569
569
|
">": ">",
|
|
@@ -571,8 +571,8 @@ var di = {
|
|
|
571
571
|
"'": "'",
|
|
572
572
|
"/": "/"
|
|
573
573
|
};
|
|
574
|
-
const
|
|
575
|
-
class
|
|
574
|
+
const di = (a) => ne(a) ? a.replace(/[&<>"'\/]/g, (e) => li[e]) : a;
|
|
575
|
+
class ci {
|
|
576
576
|
constructor(e) {
|
|
577
577
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
578
578
|
}
|
|
@@ -584,11 +584,11 @@ class ui {
|
|
|
584
584
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const ui = [" ", ",", "?", "!", ";"], pi = new ci(20), mi = (a, e, t) => {
|
|
588
588
|
e = e || "", t = t || "";
|
|
589
|
-
const n =
|
|
589
|
+
const n = ui.filter((o) => e.indexOf(o) < 0 && t.indexOf(o) < 0);
|
|
590
590
|
if (n.length === 0) return !0;
|
|
591
|
-
const r =
|
|
591
|
+
const r = pi.getRegExp(`(${n.map((o) => o === "?" ? "\\?" : o).join("|")})`);
|
|
592
592
|
let s = !r.test(a);
|
|
593
593
|
if (!s) {
|
|
594
594
|
const o = a.indexOf(t);
|
|
@@ -615,7 +615,7 @@ const pi = [" ", ",", "?", "!", ";"], mi = new ui(20), gi = (a, e, t) => {
|
|
|
615
615
|
r = o;
|
|
616
616
|
}
|
|
617
617
|
return r;
|
|
618
|
-
}, Jt = (a) => a && a.replace("_", "-"),
|
|
618
|
+
}, Jt = (a) => a && a.replace("_", "-"), gi = {
|
|
619
619
|
type: "logger",
|
|
620
620
|
log(a) {
|
|
621
621
|
this.output("log", a);
|
|
@@ -637,7 +637,7 @@ class Qt {
|
|
|
637
637
|
}
|
|
638
638
|
init(e) {
|
|
639
639
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
640
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
640
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || gi, this.options = t, this.debug = t.debug;
|
|
641
641
|
}
|
|
642
642
|
log() {
|
|
643
643
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
@@ -755,7 +755,7 @@ class vr extends cn {
|
|
|
755
755
|
}, l = [e, t];
|
|
756
756
|
e.indexOf(".") > -1 && (l = e.split("."), r = n, n = t, t = l[1]), this.addNamespaces(t);
|
|
757
757
|
let d = Yt(this.data, l) || {};
|
|
758
|
-
o.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ?
|
|
758
|
+
o.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? ns(d, n, s) : d = {
|
|
759
759
|
...d,
|
|
760
760
|
...n
|
|
761
761
|
}, yr(this.data, l, d), o.silent || this.emit("added", e, t, n);
|
|
@@ -782,7 +782,7 @@ class vr extends cn {
|
|
|
782
782
|
return this.data;
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
var
|
|
785
|
+
var rs = {
|
|
786
786
|
processors: {},
|
|
787
787
|
addPostProcessor(a) {
|
|
788
788
|
this.processors[a.name] = a;
|
|
@@ -797,7 +797,7 @@ const _r = {};
|
|
|
797
797
|
class Xt extends cn {
|
|
798
798
|
constructor(e) {
|
|
799
799
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
800
|
-
super(),
|
|
800
|
+
super(), ri(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = ea.create("translator");
|
|
801
801
|
}
|
|
802
802
|
changeLanguage(e) {
|
|
803
803
|
e && (this.language = e);
|
|
@@ -816,7 +816,7 @@ class Xt extends cn {
|
|
|
816
816
|
n === void 0 && (n = ":");
|
|
817
817
|
const r = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
818
818
|
let s = t.ns || this.options.defaultNS || [];
|
|
819
|
-
const o = n && e.indexOf(n) > -1, l = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
819
|
+
const o = n && e.indexOf(n) > -1, l = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !mi(e, n, r);
|
|
820
820
|
if (o && !l) {
|
|
821
821
|
const d = e.match(this.interpolator.nestingRegexp);
|
|
822
822
|
if (d && d.length > 0)
|
|
@@ -963,7 +963,7 @@ class Xt extends cn {
|
|
|
963
963
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
964
964
|
}
|
|
965
965
|
const l = n.postProcess || this.options.postProcess, d = ne(l) ? [l] : l;
|
|
966
|
-
return e != null && d && d.length && n.applyPostProcessor !== !1 && (e =
|
|
966
|
+
return e != null && d && d.length && n.applyPostProcessor !== !1 && (e = rs.handle(d, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
967
967
|
i18nResolved: {
|
|
968
968
|
...r,
|
|
969
969
|
usedParams: this.getUsedParamsDetails(n)
|
|
@@ -1106,7 +1106,7 @@ class Nr {
|
|
|
1106
1106
|
}), r;
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
-
let
|
|
1109
|
+
let hi = [{
|
|
1110
1110
|
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
1111
1111
|
nr: [1, 2],
|
|
1112
1112
|
fc: 1
|
|
@@ -1198,7 +1198,7 @@ let bi = [{
|
|
|
1198
1198
|
lngs: ["he", "iw"],
|
|
1199
1199
|
nr: [1, 2, 20, 21],
|
|
1200
1200
|
fc: 22
|
|
1201
|
-
}],
|
|
1201
|
+
}], bi = {
|
|
1202
1202
|
1: (a) => +(a > 1),
|
|
1203
1203
|
2: (a) => +(a != 1),
|
|
1204
1204
|
3: (a) => 0,
|
|
@@ -1222,28 +1222,28 @@ let bi = [{
|
|
|
1222
1222
|
21: (a) => a % 100 == 1 ? 1 : a % 100 == 2 ? 2 : a % 100 == 3 || a % 100 == 4 ? 3 : 0,
|
|
1223
1223
|
22: (a) => a == 1 ? 0 : a == 2 ? 1 : (a < 0 || a > 10) && a % 10 == 0 ? 2 : 3
|
|
1224
1224
|
};
|
|
1225
|
-
const
|
|
1225
|
+
const fi = ["v1", "v2", "v3"], yi = ["v4"], Cr = {
|
|
1226
1226
|
zero: 0,
|
|
1227
1227
|
one: 1,
|
|
1228
1228
|
two: 2,
|
|
1229
1229
|
few: 3,
|
|
1230
1230
|
many: 4,
|
|
1231
1231
|
other: 5
|
|
1232
|
-
},
|
|
1232
|
+
}, vi = () => {
|
|
1233
1233
|
const a = {};
|
|
1234
|
-
return
|
|
1234
|
+
return hi.forEach((e) => {
|
|
1235
1235
|
e.lngs.forEach((t) => {
|
|
1236
1236
|
a[t] = {
|
|
1237
1237
|
numbers: e.nr,
|
|
1238
|
-
plurals:
|
|
1238
|
+
plurals: bi[e.fc]
|
|
1239
1239
|
};
|
|
1240
1240
|
});
|
|
1241
1241
|
}), a;
|
|
1242
1242
|
};
|
|
1243
|
-
class
|
|
1243
|
+
class _i {
|
|
1244
1244
|
constructor(e) {
|
|
1245
1245
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1246
|
-
this.languageUtils = e, this.options = t, this.logger = ea.create("pluralResolver"), (!this.options.compatibilityJSON ||
|
|
1246
|
+
this.languageUtils = e, this.options = t, this.logger = ea.create("pluralResolver"), (!this.options.compatibilityJSON || yi.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = vi(), this.pluralRulesCache = {};
|
|
1247
1247
|
}
|
|
1248
1248
|
addRule(e, t) {
|
|
1249
1249
|
this.rules[e] = t;
|
|
@@ -1301,14 +1301,14 @@ class Ni {
|
|
|
1301
1301
|
return this.options.compatibilityJSON === "v1" ? r === 1 ? "" : typeof r == "number" ? `_plural_${r.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? s() : this.options.prepend && n.toString() ? this.options.prepend + n.toString() : n.toString();
|
|
1302
1302
|
}
|
|
1303
1303
|
shouldUseIntlApi() {
|
|
1304
|
-
return !
|
|
1304
|
+
return !fi.includes(this.options.compatibilityJSON);
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
const Sr = function(a, e, t) {
|
|
1308
|
-
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s =
|
|
1308
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = ii(a, e, t);
|
|
1309
1309
|
return !s && r && ne(t) && (s = Fn(a, t, n), s === void 0 && (s = Fn(e, t, n))), s;
|
|
1310
1310
|
}, An = (a) => a.replace(/\$/g, "$$$$");
|
|
1311
|
-
class
|
|
1311
|
+
class Ni {
|
|
1312
1312
|
constructor() {
|
|
1313
1313
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1314
1314
|
this.logger = ea.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
|
|
@@ -1337,7 +1337,7 @@ class Ci {
|
|
|
1337
1337
|
maxReplaces: k,
|
|
1338
1338
|
alwaysFormat: _
|
|
1339
1339
|
} = e.interpolation;
|
|
1340
|
-
this.escape = t !== void 0 ? t :
|
|
1340
|
+
this.escape = t !== void 0 ? t : di, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Va(s) : o || "{{", this.suffix = l ? Va(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = u ? "" : m || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = g ? Va(g) : h || Va("$t("), this.nestingSuffix = C ? Va(C) : y || Va(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = k || 1e3, this.alwaysFormat = _ !== void 0 ? _ : !1, this.resetRegExp();
|
|
1341
1341
|
}
|
|
1342
1342
|
reset() {
|
|
1343
1343
|
this.options && this.init(this.options);
|
|
@@ -1432,7 +1432,7 @@ class Ci {
|
|
|
1432
1432
|
return e;
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const Ci = (a) => {
|
|
1436
1436
|
let e = a.toLowerCase().trim();
|
|
1437
1437
|
const t = {};
|
|
1438
1438
|
if (a.indexOf("(") > -1) {
|
|
@@ -1463,7 +1463,7 @@ const Si = (a) => {
|
|
|
1463
1463
|
return l || (l = a(Jt(n), r), e[o] = l), l(t);
|
|
1464
1464
|
};
|
|
1465
1465
|
};
|
|
1466
|
-
class
|
|
1466
|
+
class Si {
|
|
1467
1467
|
constructor() {
|
|
1468
1468
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1469
1469
|
this.logger = ea.create("formatter"), this.options = e, this.formats = {
|
|
@@ -1523,7 +1523,7 @@ class ki {
|
|
|
1523
1523
|
const {
|
|
1524
1524
|
formatName: c,
|
|
1525
1525
|
formatOptions: u
|
|
1526
|
-
} =
|
|
1526
|
+
} = Ci(d);
|
|
1527
1527
|
if (this.formats[c]) {
|
|
1528
1528
|
let m = l;
|
|
1529
1529
|
try {
|
|
@@ -1543,10 +1543,10 @@ class ki {
|
|
|
1543
1543
|
}, e);
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
const
|
|
1546
|
+
const ki = (a, e) => {
|
|
1547
1547
|
a.pending[e] !== void 0 && (delete a.pending[e], a.pendingCount--);
|
|
1548
1548
|
};
|
|
1549
|
-
class
|
|
1549
|
+
class wi extends cn {
|
|
1550
1550
|
constructor(e, t, n) {
|
|
1551
1551
|
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1552
1552
|
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = ea.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(n, r.backend, r);
|
|
@@ -1579,7 +1579,7 @@ class Ti extends cn {
|
|
|
1579
1579
|
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
1580
1580
|
const l = {};
|
|
1581
1581
|
this.queue.forEach((d) => {
|
|
1582
|
-
|
|
1582
|
+
oi(d.loaded, [s], o), ki(d, e), t && d.errors.push(t), d.pendingCount === 0 && !d.done && (Object.keys(d.loaded).forEach((c) => {
|
|
1583
1583
|
l[c] || (l[c] = {});
|
|
1584
1584
|
const u = d.loaded[c];
|
|
1585
1585
|
u.length && u.forEach((m) => {
|
|
@@ -1738,7 +1738,7 @@ const kr = () => ({
|
|
|
1738
1738
|
skipOnVariables: !0
|
|
1739
1739
|
}
|
|
1740
1740
|
}), wr = (a) => (ne(a.ns) && (a.ns = [a.ns]), ne(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), ne(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), a.supportedLngs && a.supportedLngs.indexOf("cimode") < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), a), zt = () => {
|
|
1741
|
-
},
|
|
1741
|
+
}, Ti = (a) => {
|
|
1742
1742
|
Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
|
|
1743
1743
|
typeof a[t] == "function" && (a[t] = a[t].bind(a));
|
|
1744
1744
|
});
|
|
@@ -1748,7 +1748,7 @@ class mt extends cn {
|
|
|
1748
1748
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
|
|
1749
1749
|
if (super(), this.options = wr(e), this.services = {}, this.logger = ea, this.modules = {
|
|
1750
1750
|
external: []
|
|
1751
|
-
},
|
|
1751
|
+
}, Ti(this), t && !this.isInitialized && !e.isClone) {
|
|
1752
1752
|
if (!this.options.initImmediate)
|
|
1753
1753
|
return this.init(e, t), this;
|
|
1754
1754
|
setTimeout(() => {
|
|
@@ -1773,17 +1773,17 @@ class mt extends cn {
|
|
|
1773
1773
|
if (!this.options.isClone) {
|
|
1774
1774
|
this.modules.logger ? ea.init(s(this.modules.logger), this.options) : ea.init(null, this.options);
|
|
1775
1775
|
let u;
|
|
1776
|
-
this.modules.formatter ? u = this.modules.formatter : typeof Intl < "u" && (u =
|
|
1776
|
+
this.modules.formatter ? u = this.modules.formatter : typeof Intl < "u" && (u = Si);
|
|
1777
1777
|
const m = new Nr(this.options);
|
|
1778
1778
|
this.store = new vr(this.options.resources, this.options);
|
|
1779
1779
|
const g = this.services;
|
|
1780
|
-
g.logger = ea, g.resourceStore = this.store, g.languageUtils = m, g.pluralResolver = new
|
|
1780
|
+
g.logger = ea, g.resourceStore = this.store, g.languageUtils = m, g.pluralResolver = new _i(m, {
|
|
1781
1781
|
prepend: this.options.pluralSeparator,
|
|
1782
1782
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
1783
1783
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1784
|
-
}), u && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (g.formatter = s(u), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new
|
|
1784
|
+
}), u && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (g.formatter = s(u), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new Ni(this.options), g.utils = {
|
|
1785
1785
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1786
|
-
}, g.backendConnector = new
|
|
1786
|
+
}, g.backendConnector = new wi(s(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(h) {
|
|
1787
1787
|
for (var C = arguments.length, y = new Array(C > 1 ? C - 1 : 0), v = 1; v < C; v++)
|
|
1788
1788
|
y[v - 1] = arguments[v];
|
|
1789
1789
|
e.emit(h, ...y);
|
|
@@ -1843,7 +1843,7 @@ class mt extends cn {
|
|
|
1843
1843
|
use(e) {
|
|
1844
1844
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1845
1845
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1846
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1846
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && rs.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1847
1847
|
}
|
|
1848
1848
|
setResolvedLanguage(e) {
|
|
1849
1849
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
|
|
@@ -1983,7 +1983,7 @@ class mt extends cn {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
const Le = mt.createInstance();
|
|
1985
1985
|
Le.createInstance = mt.createInstance;
|
|
1986
|
-
const
|
|
1986
|
+
const Ii = Le.createInstance;
|
|
1987
1987
|
Le.dir;
|
|
1988
1988
|
Le.init;
|
|
1989
1989
|
Le.loadResources;
|
|
@@ -1997,7 +1997,7 @@ Le.setDefaultNamespace;
|
|
|
1997
1997
|
Le.hasLoadedNamespace;
|
|
1998
1998
|
Le.loadNamespaces;
|
|
1999
1999
|
Le.loadLanguages;
|
|
2000
|
-
const
|
|
2000
|
+
const Ai = {
|
|
2001
2001
|
// Shared
|
|
2002
2002
|
free: "Free",
|
|
2003
2003
|
manage: "Manage",
|
|
@@ -2359,8 +2359,8 @@ const xi = {
|
|
|
2359
2359
|
autoRechargeLoadErrorTitle: "We couldn't load your settings",
|
|
2360
2360
|
autoRechargeLoadError: "Something went wrong while fetching your auto-recharge settings. Check your connection and try again.",
|
|
2361
2361
|
autoRechargeThresholdLabel: "Recharge threshold",
|
|
2362
|
-
autoRechargeThresholdHint: "Recharge triggers when your balance falls below this amount
|
|
2363
|
-
autoRechargeThresholdError: "Must be a whole-dollar amount of at least $
|
|
2362
|
+
autoRechargeThresholdHint: "Recharge triggers when your balance falls below this amount, $1 or more.",
|
|
2363
|
+
autoRechargeThresholdError: "Must be a whole-dollar amount of at least $1.",
|
|
2364
2364
|
autoRechargeChunkLabel: "Recharge amount",
|
|
2365
2365
|
autoRechargeChunkHint: "Whole-dollar amount, $5 or more.",
|
|
2366
2366
|
autoRechargeChunkError: "Must be a whole-dollar amount of at least $5.",
|
|
@@ -2381,7 +2381,7 @@ const xi = {
|
|
|
2381
2381
|
autoRechargeRequiresPaidPlanTitle: "Auto-recharge requires a paid plan",
|
|
2382
2382
|
autoRechargeRequiresPaidPlanBody: "Upgrade your plan to automatically top up your AI usage credit.",
|
|
2383
2383
|
autoRechargeUpgradeCta: "Upgrade plan"
|
|
2384
|
-
},
|
|
2384
|
+
}, xi = {
|
|
2385
2385
|
free: "Gratuit",
|
|
2386
2386
|
manage: "Gérer",
|
|
2387
2387
|
cancel: "Annuler",
|
|
@@ -2717,8 +2717,8 @@ const xi = {
|
|
|
2717
2717
|
autoRechargeLoadErrorTitle: "Impossible de charger vos paramètres",
|
|
2718
2718
|
autoRechargeLoadError: "Une erreur s'est produite lors du chargement de vos paramètres de recharge automatique. Vérifiez votre connexion et réessayez.",
|
|
2719
2719
|
autoRechargeThresholdLabel: "Seuil de recharge",
|
|
2720
|
-
autoRechargeThresholdHint: "La recharge se déclenche lorsque votre solde passe sous ce montant
|
|
2721
|
-
autoRechargeThresholdError: "Doit être un montant entier d’au moins
|
|
2720
|
+
autoRechargeThresholdHint: "La recharge se déclenche lorsque votre solde passe sous ce montant, 1 $ ou plus.",
|
|
2721
|
+
autoRechargeThresholdError: "Doit être un montant entier d’au moins 1 $.",
|
|
2722
2722
|
autoRechargeChunkLabel: "Montant de recharge",
|
|
2723
2723
|
autoRechargeChunkHint: "Montant en dollars entiers, 5 $ ou plus.",
|
|
2724
2724
|
autoRechargeChunkError: "Doit être un montant en dollars entiers d’au moins 5 $.",
|
|
@@ -2739,7 +2739,7 @@ const xi = {
|
|
|
2739
2739
|
autoRechargeRequiresPaidPlanTitle: "La recharge automatique nécessite un plan payant",
|
|
2740
2740
|
autoRechargeRequiresPaidPlanBody: "Mettez à niveau votre plan pour recharger automatiquement votre crédit IA.",
|
|
2741
2741
|
autoRechargeUpgradeCta: "Mettre à niveau le plan"
|
|
2742
|
-
},
|
|
2742
|
+
}, Pi = {
|
|
2743
2743
|
free: "Gratis",
|
|
2744
2744
|
manage: "Gestionar",
|
|
2745
2745
|
cancel: "Cancelar",
|
|
@@ -3075,8 +3075,8 @@ const xi = {
|
|
|
3075
3075
|
autoRechargeLoadErrorTitle: "No pudimos cargar tu configuración",
|
|
3076
3076
|
autoRechargeLoadError: "Algo salió mal al obtener tu configuración de auto-recarga. Revisa tu conexión e inténtalo de nuevo.",
|
|
3077
3077
|
autoRechargeThresholdLabel: "Umbral de recarga",
|
|
3078
|
-
autoRechargeThresholdHint: "La recarga se activa cuando tu saldo cae por debajo de este monto
|
|
3079
|
-
autoRechargeThresholdError: "Debe ser un monto entero de al menos $
|
|
3078
|
+
autoRechargeThresholdHint: "La recarga se activa cuando tu saldo cae por debajo de este monto, $1 o más.",
|
|
3079
|
+
autoRechargeThresholdError: "Debe ser un monto entero de al menos $1.",
|
|
3080
3080
|
autoRechargeChunkLabel: "Monto de recarga",
|
|
3081
3081
|
autoRechargeChunkHint: "Monto en dólares enteros, $5 o más.",
|
|
3082
3082
|
autoRechargeChunkError: "Debe ser un monto en dólares enteros de al menos $5.",
|
|
@@ -3097,7 +3097,7 @@ const xi = {
|
|
|
3097
3097
|
autoRechargeRequiresPaidPlanTitle: "La auto-recarga requiere un plan de pago",
|
|
3098
3098
|
autoRechargeRequiresPaidPlanBody: "Actualiza tu plan para recargar automáticamente tu crédito de uso de IA.",
|
|
3099
3099
|
autoRechargeUpgradeCta: "Actualizar plan"
|
|
3100
|
-
},
|
|
3100
|
+
}, Di = {
|
|
3101
3101
|
free: "Gratuito",
|
|
3102
3102
|
manage: "Gerenciar",
|
|
3103
3103
|
cancel: "Cancelar",
|
|
@@ -3433,8 +3433,8 @@ const xi = {
|
|
|
3433
3433
|
autoRechargeLoadErrorTitle: "Não foi possível carregar suas configurações",
|
|
3434
3434
|
autoRechargeLoadError: "Algo deu errado ao buscar suas configurações de auto-recarga. Verifique sua conexão e tente novamente.",
|
|
3435
3435
|
autoRechargeThresholdLabel: "Limite para recarga",
|
|
3436
|
-
autoRechargeThresholdHint: "A recarga é acionada quando seu saldo cair abaixo desse valor
|
|
3437
|
-
autoRechargeThresholdError: "Deve ser um valor inteiro de pelo menos $
|
|
3436
|
+
autoRechargeThresholdHint: "A recarga é acionada quando seu saldo cair abaixo desse valor, $1 ou mais.",
|
|
3437
|
+
autoRechargeThresholdError: "Deve ser um valor inteiro de pelo menos $1.",
|
|
3438
3438
|
autoRechargeChunkLabel: "Valor da recarga",
|
|
3439
3439
|
autoRechargeChunkHint: "Valor em dólares inteiros, $5 ou mais.",
|
|
3440
3440
|
autoRechargeChunkError: "Deve ser um valor em dólares inteiros de pelo menos $5.",
|
|
@@ -3455,13 +3455,13 @@ const xi = {
|
|
|
3455
3455
|
autoRechargeRequiresPaidPlanTitle: "A recarga automática requer um plano pago",
|
|
3456
3456
|
autoRechargeRequiresPaidPlanBody: "Atualize seu plano para recarregar automaticamente seu crédito de uso de IA.",
|
|
3457
3457
|
autoRechargeUpgradeCta: "Atualizar plano"
|
|
3458
|
-
}, qa = "billing", Mn =
|
|
3459
|
-
Mn.use(
|
|
3458
|
+
}, qa = "billing", Mn = Ii();
|
|
3459
|
+
Mn.use(Xo).init({
|
|
3460
3460
|
resources: {
|
|
3461
|
-
en: { [qa]:
|
|
3462
|
-
fr: { [qa]:
|
|
3463
|
-
es: { [qa]:
|
|
3464
|
-
pt: { [qa]:
|
|
3461
|
+
en: { [qa]: Ai },
|
|
3462
|
+
fr: { [qa]: xi },
|
|
3463
|
+
es: { [qa]: Pi },
|
|
3464
|
+
pt: { [qa]: Di }
|
|
3465
3465
|
},
|
|
3466
3466
|
lng: "en",
|
|
3467
3467
|
fallbackLng: "en",
|
|
@@ -3473,13 +3473,13 @@ Mn.use(ei).init({
|
|
|
3473
3473
|
suffix: "}"
|
|
3474
3474
|
}
|
|
3475
3475
|
});
|
|
3476
|
-
const
|
|
3477
|
-
function
|
|
3478
|
-
return
|
|
3476
|
+
const Ri = /* @__PURE__ */ new Set(["v1", "v2", "v3"]);
|
|
3477
|
+
function Ei(a) {
|
|
3478
|
+
return Ri.has(a);
|
|
3479
3479
|
}
|
|
3480
|
-
const un =
|
|
3480
|
+
const un = Gr(null), Li = { capture: () => {
|
|
3481
3481
|
} };
|
|
3482
|
-
function
|
|
3482
|
+
function Oi(a) {
|
|
3483
3483
|
const [e, t] = X(
|
|
3484
3484
|
() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
3485
3485
|
);
|
|
@@ -3490,7 +3490,7 @@ function Fi(a) {
|
|
|
3490
3490
|
return n.addEventListener("change", r), () => n.removeEventListener("change", r);
|
|
3491
3491
|
}, [a]), a === "system" ? e : a === "dark";
|
|
3492
3492
|
}
|
|
3493
|
-
const
|
|
3493
|
+
const uu = ({
|
|
3494
3494
|
client: a,
|
|
3495
3495
|
stripePublishableKey: e,
|
|
3496
3496
|
email: t,
|
|
@@ -3509,15 +3509,15 @@ const du = ({
|
|
|
3509
3509
|
children: y
|
|
3510
3510
|
}) => {
|
|
3511
3511
|
const v = u || "default", [k] = X(
|
|
3512
|
-
() => new
|
|
3513
|
-
), _ =
|
|
3512
|
+
() => new Co({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
|
|
3513
|
+
), _ = Oi(r), T = Ee(() => Ro(e), [e]);
|
|
3514
3514
|
Fe(() => {
|
|
3515
3515
|
if (!m || typeof window > "u")
|
|
3516
3516
|
return;
|
|
3517
3517
|
const S = `bpb-cache:${v}`;
|
|
3518
3518
|
try {
|
|
3519
3519
|
const M = window.localStorage.getItem(S);
|
|
3520
|
-
M &&
|
|
3520
|
+
M && So(k, JSON.parse(M));
|
|
3521
3521
|
} catch {
|
|
3522
3522
|
window.localStorage.removeItem(S);
|
|
3523
3523
|
}
|
|
@@ -3525,7 +3525,7 @@ const du = ({
|
|
|
3525
3525
|
const x = k.getQueryCache().subscribe((M) => {
|
|
3526
3526
|
M.type !== "added" && M.type !== "removed" && M.type !== "updated" || (A && clearTimeout(A), A = setTimeout(() => {
|
|
3527
3527
|
try {
|
|
3528
|
-
window.localStorage.setItem(S, JSON.stringify(
|
|
3528
|
+
window.localStorage.setItem(S, JSON.stringify(ko(k)));
|
|
3529
3529
|
} catch {
|
|
3530
3530
|
}
|
|
3531
3531
|
}, 250));
|
|
@@ -3548,9 +3548,9 @@ const du = ({
|
|
|
3548
3548
|
colorScheme: s,
|
|
3549
3549
|
toast: o ?? (() => {
|
|
3550
3550
|
}),
|
|
3551
|
-
analytics: l ??
|
|
3551
|
+
analytics: l ?? Li,
|
|
3552
3552
|
featureLabels: d,
|
|
3553
|
-
isOutdatedBilling: c !== void 0 &&
|
|
3553
|
+
isOutdatedBilling: c !== void 0 && Ei(c),
|
|
3554
3554
|
manageBillingUrl: g,
|
|
3555
3555
|
refetchInterval: N,
|
|
3556
3556
|
refresh: w,
|
|
@@ -3575,7 +3575,7 @@ const du = ({
|
|
|
3575
3575
|
I
|
|
3576
3576
|
]
|
|
3577
3577
|
);
|
|
3578
|
-
return /* @__PURE__ */ i(un.Provider, { value: D, children: /* @__PURE__ */ i(
|
|
3578
|
+
return /* @__PURE__ */ i(un.Provider, { value: D, children: /* @__PURE__ */ i(ni, { i18n: Mn, children: /* @__PURE__ */ i(
|
|
3579
3579
|
"div",
|
|
3580
3580
|
{
|
|
3581
3581
|
className: "bpb-scope",
|
|
@@ -3592,11 +3592,11 @@ function ee() {
|
|
|
3592
3592
|
throw new Error("@bpinternal/billing-ui components must be rendered inside <BillingProvider>");
|
|
3593
3593
|
return a;
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3595
|
+
function Fi() {
|
|
3596
3596
|
var a;
|
|
3597
3597
|
return ((a = At(un)) == null ? void 0 : a.isDark) ?? !1;
|
|
3598
3598
|
}
|
|
3599
|
-
function
|
|
3599
|
+
function Mi() {
|
|
3600
3600
|
var a;
|
|
3601
3601
|
return ((a = At(un)) == null ? void 0 : a.colorScheme) ?? "default";
|
|
3602
3602
|
}
|
|
@@ -3639,7 +3639,7 @@ const Ie = {
|
|
|
3639
3639
|
usages: (a, e) => ["bpb", a, "usages", e],
|
|
3640
3640
|
bots: (a) => ["bpb", a, "bots"],
|
|
3641
3641
|
usageByBot: (a, e, t) => ["bpb", a, "usage-by-bot", e, t]
|
|
3642
|
-
},
|
|
3642
|
+
}, Ui = ["billing", "manager", "administrator", "owner"];
|
|
3643
3643
|
function Me(a) {
|
|
3644
3644
|
const { client: e, refetchInterval: t, queryClient: n, scope: r } = ee();
|
|
3645
3645
|
return Be(
|
|
@@ -3647,7 +3647,7 @@ function Me(a) {
|
|
|
3647
3647
|
queryKey: Se.isAuthorized(r),
|
|
3648
3648
|
queryFn: async () => {
|
|
3649
3649
|
const s = await e.getWorkspaceMember({});
|
|
3650
|
-
return
|
|
3650
|
+
return Ui.includes(s.role);
|
|
3651
3651
|
},
|
|
3652
3652
|
enabled: (a == null ? void 0 : a.enabled) ?? !0,
|
|
3653
3653
|
refetchInterval: t
|
|
@@ -3683,7 +3683,7 @@ function Gn(a) {
|
|
|
3683
3683
|
const { data: e } = ze(a);
|
|
3684
3684
|
return !!(e != null && e.pendingUpgrade);
|
|
3685
3685
|
}
|
|
3686
|
-
function
|
|
3686
|
+
function ss(a, e) {
|
|
3687
3687
|
const { client: t, queryClient: n, scope: r } = ee(), s = wa(e == null ? void 0 : e.enabled);
|
|
3688
3688
|
return Be(
|
|
3689
3689
|
{
|
|
@@ -3694,7 +3694,7 @@ function os(a, e) {
|
|
|
3694
3694
|
n
|
|
3695
3695
|
);
|
|
3696
3696
|
}
|
|
3697
|
-
function
|
|
3697
|
+
function os(a) {
|
|
3698
3698
|
const { client: e, queryClient: t, scope: n } = ee(), r = wa(a == null ? void 0 : a.enabled);
|
|
3699
3699
|
return Be(
|
|
3700
3700
|
{
|
|
@@ -3705,7 +3705,7 @@ function is(a) {
|
|
|
3705
3705
|
t
|
|
3706
3706
|
);
|
|
3707
3707
|
}
|
|
3708
|
-
function
|
|
3708
|
+
function is(a) {
|
|
3709
3709
|
const { client: e, queryClient: t, scope: n } = ee(), r = wa(a == null ? void 0 : a.enabled);
|
|
3710
3710
|
return Be(
|
|
3711
3711
|
{
|
|
@@ -3716,7 +3716,7 @@ function ls(a) {
|
|
|
3716
3716
|
t
|
|
3717
3717
|
);
|
|
3718
3718
|
}
|
|
3719
|
-
function
|
|
3719
|
+
function Bi(a) {
|
|
3720
3720
|
const { client: e, queryClient: t, scope: n, refetchInterval: r } = ee(), s = wa(a == null ? void 0 : a.enabled);
|
|
3721
3721
|
return Be(
|
|
3722
3722
|
{
|
|
@@ -3728,7 +3728,7 @@ function zi(a) {
|
|
|
3728
3728
|
t
|
|
3729
3729
|
);
|
|
3730
3730
|
}
|
|
3731
|
-
function
|
|
3731
|
+
function zi(a) {
|
|
3732
3732
|
const { client: e, queryClient: t, scope: n } = ee(), r = wa(!!a);
|
|
3733
3733
|
return Be(
|
|
3734
3734
|
{
|
|
@@ -3750,7 +3750,7 @@ function ji(a) {
|
|
|
3750
3750
|
t
|
|
3751
3751
|
);
|
|
3752
3752
|
}
|
|
3753
|
-
function
|
|
3753
|
+
function ls(a) {
|
|
3754
3754
|
const { client: e, queryClient: t, scope: n } = ee(), r = wa(a == null ? void 0 : a.enabled);
|
|
3755
3755
|
return Be(
|
|
3756
3756
|
{
|
|
@@ -3761,7 +3761,7 @@ function ds(a) {
|
|
|
3761
3761
|
t
|
|
3762
3762
|
);
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function ds(a) {
|
|
3765
3765
|
const { client: e, queryClient: t, scope: n } = ee(), r = wa(a == null ? void 0 : a.enabled);
|
|
3766
3766
|
return Be(
|
|
3767
3767
|
{
|
|
@@ -3772,7 +3772,7 @@ function cs(a) {
|
|
|
3772
3772
|
t
|
|
3773
3773
|
);
|
|
3774
3774
|
}
|
|
3775
|
-
function
|
|
3775
|
+
function ji() {
|
|
3776
3776
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3777
3777
|
return ka(
|
|
3778
3778
|
{
|
|
@@ -3797,7 +3797,7 @@ function nt(a) {
|
|
|
3797
3797
|
t
|
|
3798
3798
|
);
|
|
3799
3799
|
}
|
|
3800
|
-
function
|
|
3800
|
+
function Vi(a, e) {
|
|
3801
3801
|
const { client: t, queryClient: n, scope: r, refetchInterval: s } = ee(), o = wa(e == null ? void 0 : e.enabled), l = t.breakDownWorkspaceUsageByBot, d = t.listBots, c = typeof l == "function" && typeof d == "function", u = e != null && e.period ? new Date(e.period) : /* @__PURE__ */ new Date(), m = `${u.getUTCFullYear()}-${String(u.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
3802
3802
|
return Be(
|
|
3803
3803
|
{
|
|
@@ -3815,15 +3815,15 @@ function Zi(a, e) {
|
|
|
3815
3815
|
n
|
|
3816
3816
|
);
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function Zi() {
|
|
3819
3819
|
const { client: a } = ee();
|
|
3820
3820
|
return typeof a.breakDownWorkspaceUsageByBot == "function" && typeof a.listBots == "function";
|
|
3821
3821
|
}
|
|
3822
|
-
function
|
|
3822
|
+
function cs() {
|
|
3823
3823
|
const { client: a, queryClient: e } = ee();
|
|
3824
3824
|
return ka({ mutationFn: () => a.createPaymentMethodIntent({}) }, e);
|
|
3825
3825
|
}
|
|
3826
|
-
function
|
|
3826
|
+
function us() {
|
|
3827
3827
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3828
3828
|
return ka(
|
|
3829
3829
|
{
|
|
@@ -3835,7 +3835,7 @@ function ps() {
|
|
|
3835
3835
|
e
|
|
3836
3836
|
);
|
|
3837
3837
|
}
|
|
3838
|
-
function
|
|
3838
|
+
function ps() {
|
|
3839
3839
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3840
3840
|
return ka(
|
|
3841
3841
|
{
|
|
@@ -3847,7 +3847,7 @@ function ms() {
|
|
|
3847
3847
|
e
|
|
3848
3848
|
);
|
|
3849
3849
|
}
|
|
3850
|
-
function
|
|
3850
|
+
function qi() {
|
|
3851
3851
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3852
3852
|
return ka(
|
|
3853
3853
|
{
|
|
@@ -3862,7 +3862,7 @@ function Wi() {
|
|
|
3862
3862
|
e
|
|
3863
3863
|
);
|
|
3864
3864
|
}
|
|
3865
|
-
function
|
|
3865
|
+
function ms() {
|
|
3866
3866
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3867
3867
|
return ka(
|
|
3868
3868
|
{
|
|
@@ -3885,7 +3885,7 @@ function gs() {
|
|
|
3885
3885
|
e
|
|
3886
3886
|
);
|
|
3887
3887
|
}
|
|
3888
|
-
function
|
|
3888
|
+
function Wi() {
|
|
3889
3889
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3890
3890
|
return ka(
|
|
3891
3891
|
{
|
|
@@ -3900,7 +3900,7 @@ function Gi() {
|
|
|
3900
3900
|
e
|
|
3901
3901
|
);
|
|
3902
3902
|
}
|
|
3903
|
-
function
|
|
3903
|
+
function Gi() {
|
|
3904
3904
|
const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = ee();
|
|
3905
3905
|
return ka(
|
|
3906
3906
|
{
|
|
@@ -3917,59 +3917,59 @@ function Ki() {
|
|
|
3917
3917
|
e
|
|
3918
3918
|
);
|
|
3919
3919
|
}
|
|
3920
|
-
function
|
|
3920
|
+
function gs(a) {
|
|
3921
3921
|
var e, t, n = "";
|
|
3922
3922
|
if (typeof a == "string" || typeof a == "number") n += a;
|
|
3923
3923
|
else if (typeof a == "object") if (Array.isArray(a)) {
|
|
3924
3924
|
var r = a.length;
|
|
3925
|
-
for (e = 0; e < r; e++) a[e] && (t =
|
|
3925
|
+
for (e = 0; e < r; e++) a[e] && (t = gs(a[e])) && (n && (n += " "), n += t);
|
|
3926
3926
|
} else for (t in a) a[t] && (n && (n += " "), n += t);
|
|
3927
3927
|
return n;
|
|
3928
3928
|
}
|
|
3929
|
-
function
|
|
3930
|
-
for (var a, e, t = 0, n = "", r = arguments.length; t < r; t++) (a = arguments[t]) && (e =
|
|
3929
|
+
function Ki() {
|
|
3930
|
+
for (var a, e, t = 0, n = "", r = arguments.length; t < r; t++) (a = arguments[t]) && (e = gs(a)) && (n && (n += " "), n += e);
|
|
3931
3931
|
return n;
|
|
3932
3932
|
}
|
|
3933
|
-
const
|
|
3933
|
+
const $i = (a, e) => {
|
|
3934
3934
|
const t = new Array(a.length + e.length);
|
|
3935
3935
|
for (let n = 0; n < a.length; n++)
|
|
3936
3936
|
t[n] = a[n];
|
|
3937
3937
|
for (let n = 0; n < e.length; n++)
|
|
3938
3938
|
t[a.length + n] = e[n];
|
|
3939
3939
|
return t;
|
|
3940
|
-
},
|
|
3940
|
+
}, Hi = (a, e) => ({
|
|
3941
3941
|
classGroupId: a,
|
|
3942
3942
|
validator: e
|
|
3943
|
-
}),
|
|
3943
|
+
}), hs = (a = /* @__PURE__ */ new Map(), e = null, t) => ({
|
|
3944
3944
|
nextPart: a,
|
|
3945
3945
|
validators: e,
|
|
3946
3946
|
classGroupId: t
|
|
3947
|
-
}), en = "-", Tr = [],
|
|
3948
|
-
const e =
|
|
3947
|
+
}), en = "-", Tr = [], Yi = "arbitrary..", Ji = (a) => {
|
|
3948
|
+
const e = Xi(a), {
|
|
3949
3949
|
conflictingClassGroups: t,
|
|
3950
3950
|
conflictingClassGroupModifiers: n
|
|
3951
3951
|
} = a;
|
|
3952
3952
|
return {
|
|
3953
3953
|
getClassGroupId: (o) => {
|
|
3954
3954
|
if (o.startsWith("[") && o.endsWith("]"))
|
|
3955
|
-
return
|
|
3955
|
+
return Qi(o);
|
|
3956
3956
|
const l = o.split(en), d = l[0] === "" && l.length > 1 ? 1 : 0;
|
|
3957
|
-
return
|
|
3957
|
+
return bs(l, d, e);
|
|
3958
3958
|
},
|
|
3959
3959
|
getConflictingClassGroupIds: (o, l) => {
|
|
3960
3960
|
if (l) {
|
|
3961
3961
|
const d = n[o], c = t[o];
|
|
3962
|
-
return d ? c ?
|
|
3962
|
+
return d ? c ? $i(c, d) : d : c || Tr;
|
|
3963
3963
|
}
|
|
3964
3964
|
return t[o] || Tr;
|
|
3965
3965
|
}
|
|
3966
3966
|
};
|
|
3967
|
-
},
|
|
3967
|
+
}, bs = (a, e, t) => {
|
|
3968
3968
|
if (a.length - e === 0)
|
|
3969
3969
|
return t.classGroupId;
|
|
3970
3970
|
const r = a[e], s = t.nextPart.get(r);
|
|
3971
3971
|
if (s) {
|
|
3972
|
-
const c =
|
|
3972
|
+
const c = bs(a, e + 1, s);
|
|
3973
3973
|
if (c) return c;
|
|
3974
3974
|
}
|
|
3975
3975
|
const o = t.validators;
|
|
@@ -3981,17 +3981,17 @@ const Hi = (a, e) => {
|
|
|
3981
3981
|
if (u.validator(l))
|
|
3982
3982
|
return u.classGroupId;
|
|
3983
3983
|
}
|
|
3984
|
-
},
|
|
3984
|
+
}, Qi = (a) => a.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
3985
3985
|
const e = a.slice(1, -1), t = e.indexOf(":"), n = e.slice(0, t);
|
|
3986
|
-
return n ?
|
|
3987
|
-
})(),
|
|
3986
|
+
return n ? Yi + n : void 0;
|
|
3987
|
+
})(), Xi = (a) => {
|
|
3988
3988
|
const {
|
|
3989
3989
|
theme: e,
|
|
3990
3990
|
classGroups: t
|
|
3991
3991
|
} = a;
|
|
3992
|
-
return
|
|
3993
|
-
},
|
|
3994
|
-
const t =
|
|
3992
|
+
return el(t, e);
|
|
3993
|
+
}, el = (a, e) => {
|
|
3994
|
+
const t = hs();
|
|
3995
3995
|
for (const n in a) {
|
|
3996
3996
|
const r = a[n];
|
|
3997
3997
|
Kn(r, t, n, e);
|
|
@@ -4001,43 +4001,43 @@ const Hi = (a, e) => {
|
|
|
4001
4001
|
const r = a.length;
|
|
4002
4002
|
for (let s = 0; s < r; s++) {
|
|
4003
4003
|
const o = a[s];
|
|
4004
|
-
|
|
4004
|
+
al(o, e, t, n);
|
|
4005
4005
|
}
|
|
4006
|
-
},
|
|
4006
|
+
}, al = (a, e, t, n) => {
|
|
4007
4007
|
if (typeof a == "string") {
|
|
4008
|
-
|
|
4008
|
+
tl(a, e, t);
|
|
4009
4009
|
return;
|
|
4010
4010
|
}
|
|
4011
4011
|
if (typeof a == "function") {
|
|
4012
|
-
|
|
4012
|
+
nl(a, e, t, n);
|
|
4013
4013
|
return;
|
|
4014
4014
|
}
|
|
4015
|
-
|
|
4016
|
-
},
|
|
4017
|
-
const n = a === "" ? e :
|
|
4015
|
+
rl(a, e, t, n);
|
|
4016
|
+
}, tl = (a, e, t) => {
|
|
4017
|
+
const n = a === "" ? e : fs(e, a);
|
|
4018
4018
|
n.classGroupId = t;
|
|
4019
|
-
},
|
|
4020
|
-
if (
|
|
4019
|
+
}, nl = (a, e, t, n) => {
|
|
4020
|
+
if (sl(a)) {
|
|
4021
4021
|
Kn(a(n), e, t, n);
|
|
4022
4022
|
return;
|
|
4023
4023
|
}
|
|
4024
|
-
e.validators === null && (e.validators = []), e.validators.push(
|
|
4025
|
-
},
|
|
4024
|
+
e.validators === null && (e.validators = []), e.validators.push(Hi(t, a));
|
|
4025
|
+
}, rl = (a, e, t, n) => {
|
|
4026
4026
|
const r = Object.entries(a), s = r.length;
|
|
4027
4027
|
for (let o = 0; o < s; o++) {
|
|
4028
4028
|
const [l, d] = r[o];
|
|
4029
|
-
Kn(d,
|
|
4029
|
+
Kn(d, fs(e, l), t, n);
|
|
4030
4030
|
}
|
|
4031
|
-
},
|
|
4031
|
+
}, fs = (a, e) => {
|
|
4032
4032
|
let t = a;
|
|
4033
4033
|
const n = e.split(en), r = n.length;
|
|
4034
4034
|
for (let s = 0; s < r; s++) {
|
|
4035
4035
|
const o = n[s];
|
|
4036
4036
|
let l = t.nextPart.get(o);
|
|
4037
|
-
l || (l =
|
|
4037
|
+
l || (l = hs(), t.nextPart.set(o, l)), t = l;
|
|
4038
4038
|
}
|
|
4039
4039
|
return t;
|
|
4040
|
-
},
|
|
4040
|
+
}, sl = (a) => "isThemeGetter" in a && a.isThemeGetter === !0, ol = (a) => {
|
|
4041
4041
|
if (a < 1)
|
|
4042
4042
|
return {
|
|
4043
4043
|
get: () => {
|
|
@@ -4061,13 +4061,13 @@ const Hi = (a, e) => {
|
|
|
4061
4061
|
s in t ? t[s] = o : r(s, o);
|
|
4062
4062
|
}
|
|
4063
4063
|
};
|
|
4064
|
-
}, Un = "!", Ir = ":",
|
|
4064
|
+
}, Un = "!", Ir = ":", il = [], Ar = (a, e, t, n, r) => ({
|
|
4065
4065
|
modifiers: a,
|
|
4066
4066
|
hasImportantModifier: e,
|
|
4067
4067
|
baseClassName: t,
|
|
4068
4068
|
maybePostfixModifierPosition: n,
|
|
4069
4069
|
isExternal: r
|
|
4070
|
-
}),
|
|
4070
|
+
}), ll = (a) => {
|
|
4071
4071
|
const {
|
|
4072
4072
|
prefix: e,
|
|
4073
4073
|
experimentalParseClassName: t
|
|
@@ -4104,7 +4104,7 @@ const Hi = (a, e) => {
|
|
|
4104
4104
|
};
|
|
4105
4105
|
if (e) {
|
|
4106
4106
|
const r = e + Ir, s = n;
|
|
4107
|
-
n = (o) => o.startsWith(r) ? s(o.slice(r.length)) : Ar(
|
|
4107
|
+
n = (o) => o.startsWith(r) ? s(o.slice(r.length)) : Ar(il, !1, o, void 0, !0);
|
|
4108
4108
|
}
|
|
4109
4109
|
if (t) {
|
|
4110
4110
|
const r = n;
|
|
@@ -4114,7 +4114,7 @@ const Hi = (a, e) => {
|
|
|
4114
4114
|
});
|
|
4115
4115
|
}
|
|
4116
4116
|
return n;
|
|
4117
|
-
},
|
|
4117
|
+
}, dl = (a) => {
|
|
4118
4118
|
const e = /* @__PURE__ */ new Map();
|
|
4119
4119
|
return a.orderSensitiveModifiers.forEach((t, n) => {
|
|
4120
4120
|
e.set(t, 1e6 + n);
|
|
@@ -4127,26 +4127,26 @@ const Hi = (a, e) => {
|
|
|
4127
4127
|
}
|
|
4128
4128
|
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
4129
4129
|
};
|
|
4130
|
-
},
|
|
4131
|
-
cache:
|
|
4132
|
-
parseClassName:
|
|
4133
|
-
sortModifiers:
|
|
4134
|
-
postfixLookupClassGroupIds:
|
|
4135
|
-
...
|
|
4136
|
-
}),
|
|
4130
|
+
}, cl = (a) => ({
|
|
4131
|
+
cache: ol(a.cacheSize),
|
|
4132
|
+
parseClassName: ll(a),
|
|
4133
|
+
sortModifiers: dl(a),
|
|
4134
|
+
postfixLookupClassGroupIds: ul(a),
|
|
4135
|
+
...Ji(a)
|
|
4136
|
+
}), ul = (a) => {
|
|
4137
4137
|
const e = /* @__PURE__ */ Object.create(null), t = a.postfixLookupClassGroups;
|
|
4138
4138
|
if (t)
|
|
4139
4139
|
for (let n = 0; n < t.length; n++)
|
|
4140
4140
|
e[t[n]] = !0;
|
|
4141
4141
|
return e;
|
|
4142
|
-
},
|
|
4142
|
+
}, pl = /\s+/, ml = (a, e) => {
|
|
4143
4143
|
const {
|
|
4144
4144
|
parseClassName: t,
|
|
4145
4145
|
getClassGroupId: n,
|
|
4146
4146
|
getConflictingClassGroupIds: r,
|
|
4147
4147
|
sortModifiers: s,
|
|
4148
4148
|
postfixLookupClassGroupIds: o
|
|
4149
|
-
} = e, l = [], d = a.trim().split(
|
|
4149
|
+
} = e, l = [], d = a.trim().split(pl);
|
|
4150
4150
|
let c = "";
|
|
4151
4151
|
for (let u = d.length - 1; u >= 0; u -= 1) {
|
|
4152
4152
|
const m = d[u], {
|
|
@@ -4191,46 +4191,46 @@ const Hi = (a, e) => {
|
|
|
4191
4191
|
c = m + (c.length > 0 ? " " + c : c);
|
|
4192
4192
|
}
|
|
4193
4193
|
return c;
|
|
4194
|
-
},
|
|
4194
|
+
}, gl = (...a) => {
|
|
4195
4195
|
let e = 0, t, n, r = "";
|
|
4196
4196
|
for (; e < a.length; )
|
|
4197
|
-
(t = a[e++]) && (n =
|
|
4197
|
+
(t = a[e++]) && (n = ys(t)) && (r && (r += " "), r += n);
|
|
4198
4198
|
return r;
|
|
4199
|
-
},
|
|
4199
|
+
}, ys = (a) => {
|
|
4200
4200
|
if (typeof a == "string")
|
|
4201
4201
|
return a;
|
|
4202
4202
|
let e, t = "";
|
|
4203
4203
|
for (let n = 0; n < a.length; n++)
|
|
4204
|
-
a[n] && (e =
|
|
4204
|
+
a[n] && (e = ys(a[n])) && (t && (t += " "), t += e);
|
|
4205
4205
|
return t;
|
|
4206
|
-
},
|
|
4206
|
+
}, hl = (a, ...e) => {
|
|
4207
4207
|
let t, n, r, s;
|
|
4208
4208
|
const o = (d) => {
|
|
4209
4209
|
const c = e.reduce((u, m) => m(u), a());
|
|
4210
|
-
return t =
|
|
4210
|
+
return t = cl(c), n = t.cache.get, r = t.cache.set, s = l, l(d);
|
|
4211
4211
|
}, l = (d) => {
|
|
4212
4212
|
const c = n(d);
|
|
4213
4213
|
if (c)
|
|
4214
4214
|
return c;
|
|
4215
|
-
const u =
|
|
4215
|
+
const u = ml(d, t);
|
|
4216
4216
|
return r(d, u), u;
|
|
4217
4217
|
};
|
|
4218
|
-
return s = o, (...d) => s(
|
|
4219
|
-
},
|
|
4220
|
-
const e = (t) => t[a] ||
|
|
4218
|
+
return s = o, (...d) => s(gl(...d));
|
|
4219
|
+
}, bl = [], Ae = (a) => {
|
|
4220
|
+
const e = (t) => t[a] || bl;
|
|
4221
4221
|
return e.isThemeGetter = !0, e;
|
|
4222
|
-
},
|
|
4222
|
+
}, vs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, _s = /^\((?:(\w[\w-]*):)?(.+)\)$/i, fl = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, yl = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vl = /\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$/, _l = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Nl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Cl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, fa = (a) => fl.test(a), de = (a) => !!a && !Number.isNaN(Number(a)), Qe = (a) => !!a && Number.isInteger(Number(a)), xn = (a) => a.endsWith("%") && de(a.slice(0, -1)), da = (a) => yl.test(a), Ns = () => !0, Sl = (a) => (
|
|
4223
4223
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
4224
4224
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
4225
4225
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4226
|
-
|
|
4227
|
-
), $n = () => !1,
|
|
4228
|
-
const n =
|
|
4226
|
+
vl.test(a) && !_l.test(a)
|
|
4227
|
+
), $n = () => !1, kl = (a) => Nl.test(a), wl = (a) => Cl.test(a), Tl = (a) => !V(a) && !Z(a), Il = (a) => a.startsWith("@container") && (a[10] === "/" && a[11] !== void 0 || a[11] === "s" && a[16] !== void 0 && a.startsWith("-size/", 10) || a[11] === "n" && a[18] !== void 0 && a.startsWith("-normal/", 10)), Al = (a) => Ia(a, ks, $n), V = (a) => vs.test(a), Da = (a) => Ia(a, ws, Sl), xr = (a) => Ia(a, Fl, de), xl = (a) => Ia(a, Is, Ns), Pl = (a) => Ia(a, Ts, $n), Pr = (a) => Ia(a, Cs, $n), Dl = (a) => Ia(a, Ss, wl), jt = (a) => Ia(a, As, kl), Z = (a) => _s.test(a), dt = (a) => Ma(a, ws), Rl = (a) => Ma(a, Ts), Dr = (a) => Ma(a, Cs), El = (a) => Ma(a, ks), Ll = (a) => Ma(a, Ss), Vt = (a) => Ma(a, As, !0), Ol = (a) => Ma(a, Is, !0), Ia = (a, e, t) => {
|
|
4228
|
+
const n = vs.exec(a);
|
|
4229
4229
|
return n ? n[1] ? e(n[1]) : t(n[2]) : !1;
|
|
4230
4230
|
}, Ma = (a, e, t = !1) => {
|
|
4231
|
-
const n =
|
|
4231
|
+
const n = _s.exec(a);
|
|
4232
4232
|
return n ? n[1] ? e(n[1]) : t : !1;
|
|
4233
|
-
},
|
|
4233
|
+
}, Cs = (a) => a === "position" || a === "percentage", Ss = (a) => a === "image" || a === "url", ks = (a) => a === "length" || a === "size" || a === "bg-size", ws = (a) => a === "length", Fl = (a) => a === "number", Ts = (a) => a === "family-name", Is = (a) => a === "number" || a === "weight", As = (a) => a === "shadow", Ml = () => {
|
|
4234
4234
|
const a = Ae("color"), e = Ae("font"), t = Ae("text"), n = Ae("font-weight"), r = Ae("tracking"), s = Ae("leading"), o = Ae("breakpoint"), l = Ae("container"), d = Ae("spacing"), c = Ae("radius"), u = Ae("shadow"), m = Ae("inset-shadow"), g = Ae("text-shadow"), h = Ae("drop-shadow"), C = Ae("blur"), y = Ae("perspective"), v = Ae("aspect"), k = Ae("ease"), _ = Ae("animate"), T = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], w = () => [
|
|
4235
4235
|
"center",
|
|
4236
4236
|
"top",
|
|
@@ -4255,7 +4255,7 @@ const Hi = (a, e) => {
|
|
|
4255
4255
|
position: [Z, V]
|
|
4256
4256
|
}], Y = () => ["no-repeat", {
|
|
4257
4257
|
repeat: ["", "x", "y", "space", "round"]
|
|
4258
|
-
}], ce = () => ["auto", "cover", "contain",
|
|
4258
|
+
}], ce = () => ["auto", "cover", "contain", El, Al, {
|
|
4259
4259
|
size: [Z, V]
|
|
4260
4260
|
}], le = () => [xn, dt, Da], ue = () => [
|
|
4261
4261
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -4280,11 +4280,11 @@ const Hi = (a, e) => {
|
|
|
4280
4280
|
aspect: ["video"],
|
|
4281
4281
|
blur: [da],
|
|
4282
4282
|
breakpoint: [da],
|
|
4283
|
-
color: [
|
|
4283
|
+
color: [Ns],
|
|
4284
4284
|
container: [da],
|
|
4285
4285
|
"drop-shadow": [da],
|
|
4286
4286
|
ease: ["in", "out", "in-out"],
|
|
4287
|
-
font: [
|
|
4287
|
+
font: [Tl],
|
|
4288
4288
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
4289
4289
|
"inset-shadow": [da],
|
|
4290
4290
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -4324,7 +4324,7 @@ const Hi = (a, e) => {
|
|
|
4324
4324
|
* Container Name
|
|
4325
4325
|
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
4326
4326
|
*/
|
|
4327
|
-
"container-named": [
|
|
4327
|
+
"container-named": [Il],
|
|
4328
4328
|
/**
|
|
4329
4329
|
* Columns
|
|
4330
4330
|
* @see https://tailwindcss.com/docs/columns
|
|
@@ -5090,7 +5090,7 @@ const Hi = (a, e) => {
|
|
|
5090
5090
|
* @see https://tailwindcss.com/docs/font-weight
|
|
5091
5091
|
*/
|
|
5092
5092
|
"font-weight": [{
|
|
5093
|
-
font: [n,
|
|
5093
|
+
font: [n, Ol, xl]
|
|
5094
5094
|
}],
|
|
5095
5095
|
/**
|
|
5096
5096
|
* Font Stretch
|
|
@@ -5104,7 +5104,7 @@ const Hi = (a, e) => {
|
|
|
5104
5104
|
* @see https://tailwindcss.com/docs/font-family
|
|
5105
5105
|
*/
|
|
5106
5106
|
"font-family": [{
|
|
5107
|
-
font: [
|
|
5107
|
+
font: [Rl, Pl, e]
|
|
5108
5108
|
}],
|
|
5109
5109
|
/**
|
|
5110
5110
|
* Font Feature Settings
|
|
@@ -5373,7 +5373,7 @@ const Hi = (a, e) => {
|
|
|
5373
5373
|
}, Qe, Z, V],
|
|
5374
5374
|
radial: ["", Z, V],
|
|
5375
5375
|
conic: [Qe, Z, V]
|
|
5376
|
-
},
|
|
5376
|
+
}, Ll, Dl]
|
|
5377
5377
|
}],
|
|
5378
5378
|
/**
|
|
5379
5379
|
* Background Color
|
|
@@ -6915,9 +6915,9 @@ const Hi = (a, e) => {
|
|
|
6915
6915
|
postfixLookupClassGroups: ["container-type"],
|
|
6916
6916
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
6917
6917
|
};
|
|
6918
|
-
},
|
|
6918
|
+
}, Ul = /* @__PURE__ */ hl(Ml);
|
|
6919
6919
|
function q(...a) {
|
|
6920
|
-
return
|
|
6920
|
+
return Ul(Ki(a));
|
|
6921
6921
|
}
|
|
6922
6922
|
function oe(a, e = "usd", t = 2, n = "en-US") {
|
|
6923
6923
|
return new Intl.NumberFormat(n, {
|
|
@@ -6930,7 +6930,7 @@ function oe(a, e = "usd", t = 2, n = "en-US") {
|
|
|
6930
6930
|
function pa(a, e = "en-US") {
|
|
6931
6931
|
return new Date(a).toLocaleDateString(e, { month: "short", day: "numeric", year: "numeric" });
|
|
6932
6932
|
}
|
|
6933
|
-
function
|
|
6933
|
+
function Bl(a, e = "en-US") {
|
|
6934
6934
|
return new Date(a).toLocaleString(e, {
|
|
6935
6935
|
month: "short",
|
|
6936
6936
|
day: "numeric",
|
|
@@ -6939,7 +6939,7 @@ function zl(a, e = "en-US") {
|
|
|
6939
6939
|
minute: "2-digit"
|
|
6940
6940
|
});
|
|
6941
6941
|
}
|
|
6942
|
-
function
|
|
6942
|
+
function zl(a, e) {
|
|
6943
6943
|
const t = new Date(a);
|
|
6944
6944
|
return t.setDate(t.getDate() + e), t.toISOString();
|
|
6945
6945
|
}
|
|
@@ -6961,7 +6961,7 @@ function _e(a) {
|
|
|
6961
6961
|
function Wt(a) {
|
|
6962
6962
|
return { usd: "$", eur: "€", gbp: "£", cad: "$", aud: "$", jpy: "¥" }[a.toLowerCase()] ?? `${a.toUpperCase()} `;
|
|
6963
6963
|
}
|
|
6964
|
-
const ra = 1e9,
|
|
6964
|
+
const ra = 1e9, jl = {
|
|
6965
6965
|
incoming_messages_events: (a) => `${ve(a)} incoming messages & events`,
|
|
6966
6966
|
conversation_sessions: (a) => `${ve(a)} conversation sessions`,
|
|
6967
6967
|
table_rows: (a) => `${ve(a)} table rows`,
|
|
@@ -6973,11 +6973,11 @@ const ra = 1e9, Vl = {
|
|
|
6973
6973
|
ai_spend: (a) => `${oe(a / ra, "usd", 1)} AI credit included`,
|
|
6974
6974
|
always_alive: (a) => a === 1 ? "1 always-alive bot" : `${ve(a)} always-alive bots`
|
|
6975
6975
|
};
|
|
6976
|
-
function
|
|
6977
|
-
const n = (t == null ? void 0 : t[a]) ??
|
|
6976
|
+
function pu(a, e, t) {
|
|
6977
|
+
const n = (t == null ? void 0 : t[a]) ?? jl[a];
|
|
6978
6978
|
return n ? n(e) : `${ve(e)} ${a.replaceAll("_", " ")}`;
|
|
6979
6979
|
}
|
|
6980
|
-
const Ja = ["community", "plus", "team", "enterprise", "managed"],
|
|
6980
|
+
const Ja = ["community", "plus", "team", "enterprise", "managed"], Vl = ["community", "plus", "team", "enterprise", "managed"];
|
|
6981
6981
|
function Ne(a) {
|
|
6982
6982
|
var n;
|
|
6983
6983
|
const e = a.name.toLowerCase();
|
|
@@ -6992,9 +6992,9 @@ function Ne(a) {
|
|
|
6992
6992
|
if (e.includes("enterprise"))
|
|
6993
6993
|
return "enterprise";
|
|
6994
6994
|
const t = (n = a.metadata) == null ? void 0 : n.legacyName;
|
|
6995
|
-
return
|
|
6995
|
+
return Vl.find((r) => r === t) ?? "community";
|
|
6996
6996
|
}
|
|
6997
|
-
const
|
|
6997
|
+
const xs = "https://botpress.com/contact-us/managed-plan", Xe = {
|
|
6998
6998
|
conversation_sessions_addon: "addonNameConversationSessions",
|
|
6999
6999
|
storage_addon: "addonNameStorage"
|
|
7000
7000
|
}, Rr = {
|
|
@@ -7007,24 +7007,24 @@ function Hn(a, e, t) {
|
|
|
7007
7007
|
function ut(a) {
|
|
7008
7008
|
return a.replace("Add-on - ", "");
|
|
7009
7009
|
}
|
|
7010
|
-
function
|
|
7010
|
+
function Ps(a) {
|
|
7011
7011
|
return (a == null ? void 0 : a.find((e) => {
|
|
7012
7012
|
var t;
|
|
7013
7013
|
return (((t = e.increments) == null ? void 0 : t.conversation_sessions) ?? 0) > 0;
|
|
7014
7014
|
})) ?? null;
|
|
7015
7015
|
}
|
|
7016
|
-
const
|
|
7016
|
+
const Ds = [
|
|
7017
7017
|
{ key: "conversation_sessions", label: "Conversations / month", unit: "count" },
|
|
7018
7018
|
{ key: "table_rows", label: "Table rows", unit: "count" },
|
|
7019
7019
|
{ key: "vector_db_storage", label: "Vector DB storage", unit: "bytes" },
|
|
7020
7020
|
{ key: "file_storage", label: "File storage", unit: "bytes" }
|
|
7021
7021
|
];
|
|
7022
|
-
function
|
|
7022
|
+
function Zl(a, e, t) {
|
|
7023
7023
|
var r;
|
|
7024
7024
|
if (!e)
|
|
7025
7025
|
return [];
|
|
7026
7026
|
const n = [];
|
|
7027
|
-
for (const s of
|
|
7027
|
+
for (const s of Ds) {
|
|
7028
7028
|
const o = a.features[s.key] ?? 0;
|
|
7029
7029
|
let l = 0;
|
|
7030
7030
|
for (const d of e) {
|
|
@@ -7035,12 +7035,12 @@ function ql(a, e, t) {
|
|
|
7035
7035
|
}
|
|
7036
7036
|
return n;
|
|
7037
7037
|
}
|
|
7038
|
-
function
|
|
7038
|
+
function ql(a, e, t) {
|
|
7039
7039
|
var r;
|
|
7040
7040
|
if (!a)
|
|
7041
7041
|
return [];
|
|
7042
7042
|
const n = [];
|
|
7043
|
-
for (const s of
|
|
7043
|
+
for (const s of Ds) {
|
|
7044
7044
|
const o = a.features[s.key] ?? 0;
|
|
7045
7045
|
let l = 0;
|
|
7046
7046
|
for (const d of e ?? [])
|
|
@@ -7051,7 +7051,7 @@ function Wl(a, e, t) {
|
|
|
7051
7051
|
}
|
|
7052
7052
|
function Yn(a, e, t) {
|
|
7053
7053
|
var o;
|
|
7054
|
-
const n =
|
|
7054
|
+
const n = Ps(a);
|
|
7055
7055
|
if (!n)
|
|
7056
7056
|
return null;
|
|
7057
7057
|
const r = ((o = n.increments) == null ? void 0 : o.conversation_sessions) ?? 0, s = Hn(n, e, t);
|
|
@@ -7163,7 +7163,7 @@ const Jn = {
|
|
|
7163
7163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7164
7164
|
"aria-hidden": !0,
|
|
7165
7165
|
...e
|
|
7166
|
-
}),
|
|
7166
|
+
}), Wl = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7167
7167
|
"path",
|
|
7168
7168
|
{
|
|
7169
7169
|
d: "M3 8.5l3.5 3.5L13 4.5",
|
|
@@ -7183,7 +7183,7 @@ const Jn = {
|
|
|
7183
7183
|
}
|
|
7184
7184
|
),
|
|
7185
7185
|
/* @__PURE__ */ i("path", { d: "M12.8 11l.5 1.2 1.2.5-1.2.5-.5 1.3-.5-1.3-1.2-.5 1.2-.5.5-1.2z", fill: "currentColor" })
|
|
7186
|
-
] }),
|
|
7186
|
+
] }), Gl = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7187
7187
|
"path",
|
|
7188
7188
|
{
|
|
7189
7189
|
d: "M2.5 8a5.5 5.5 0 115.5 5.5c-.9 0-1.8-.2-2.5-.6L2.5 13.5l.6-3A5.5 5.5 0 012.5 8z",
|
|
@@ -7191,7 +7191,7 @@ const Jn = {
|
|
|
7191
7191
|
strokeWidth: "1.3",
|
|
7192
7192
|
strokeLinejoin: "round"
|
|
7193
7193
|
}
|
|
7194
|
-
) }),
|
|
7194
|
+
) }), Kl = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7195
7195
|
/* @__PURE__ */ i(
|
|
7196
7196
|
"path",
|
|
7197
7197
|
{
|
|
@@ -7232,7 +7232,7 @@ const Jn = {
|
|
|
7232
7232
|
strokeLinejoin: "round"
|
|
7233
7233
|
}
|
|
7234
7234
|
)
|
|
7235
|
-
] }),
|
|
7235
|
+
] }), $l = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7236
7236
|
"path",
|
|
7237
7237
|
{
|
|
7238
7238
|
d: "M6 2.5h3v1.6a1.4 1.4 0 102.8 0V2.5h1.7v3h-1.6a1.4 1.4 0 100 2.8h1.6v3h-3v1.6a1.4 1.4 0 11-2.8 0v-1.6h-3v-3h1.6a1.4 1.4 0 100-2.8H2.5v-3H6z",
|
|
@@ -7243,14 +7243,14 @@ const Jn = {
|
|
|
7243
7243
|
) }), er = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7244
7244
|
/* @__PURE__ */ i("path", { d: "M8 2l6 3-6 3-6-3 6-3z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
|
|
7245
7245
|
/* @__PURE__ */ i("path", { d: "M2 8l6 3 6-3M2 11l6 3 6-3", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
|
|
7246
|
-
] }),
|
|
7246
|
+
] }), Hl = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7247
7247
|
"path",
|
|
7248
7248
|
{
|
|
7249
7249
|
d: "M8 8c-1.2-1.6-2-2.4-3.3-2.4a2.4 2.4 0 100 4.8C6 10.4 6.8 9.6 8 8zm0 0c1.2 1.6 2 2.4 3.3 2.4a2.4 2.4 0 100-4.8C10 5.6 9.2 6.4 8 8z",
|
|
7250
7250
|
stroke: "currentColor",
|
|
7251
7251
|
strokeWidth: "1.3"
|
|
7252
7252
|
}
|
|
7253
|
-
) }), ar = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }),
|
|
7253
|
+
) }), ar = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }), Yl = [
|
|
7254
7254
|
{ rotate: 0, y: -5.9, height: 3.7 },
|
|
7255
7255
|
{ rotate: 90, y: -5.9, height: 3.7 },
|
|
7256
7256
|
{ rotate: 180, y: -5.9, height: 3.7 },
|
|
@@ -7259,7 +7259,7 @@ const Jn = {
|
|
|
7259
7259
|
{ rotate: 135, y: -7, height: 4.3 },
|
|
7260
7260
|
{ rotate: 225, y: -7, height: 4.3 },
|
|
7261
7261
|
{ rotate: 315, y: -7, height: 4.3 }
|
|
7262
|
-
],
|
|
7262
|
+
], Jl = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("g", { transform: "translate(8,8)", fill: "currentColor", children: Yl.map((t) => /* @__PURE__ */ i("g", { transform: `rotate(${t.rotate})`, children: /* @__PURE__ */ i("rect", { x: -0.75, y: t.y, width: 1.5, height: t.height, rx: 0.75 }) }, t.rotate)) }) }), Ql = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7263
7263
|
/* @__PURE__ */ i("circle", { cx: "6", cy: "5.5", r: "2.2", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7264
7264
|
/* @__PURE__ */ i("path", { d: "M2 13c0-2.2 1.8-3.6 4-3.6s4 1.4 4 3.6", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }),
|
|
7265
7265
|
/* @__PURE__ */ i(
|
|
@@ -7271,7 +7271,7 @@ const Jn = {
|
|
|
7271
7271
|
strokeLinecap: "round"
|
|
7272
7272
|
}
|
|
7273
7273
|
)
|
|
7274
|
-
] }),
|
|
7274
|
+
] }), Xl = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7275
7275
|
/* @__PURE__ */ i("path", { d: "M2.5 2.5v11h11", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
7276
7276
|
/* @__PURE__ */ i(
|
|
7277
7277
|
"path",
|
|
@@ -7283,7 +7283,7 @@ const Jn = {
|
|
|
7283
7283
|
strokeLinejoin: "round"
|
|
7284
7284
|
}
|
|
7285
7285
|
)
|
|
7286
|
-
] }),
|
|
7286
|
+
] }), ed = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7287
7287
|
/* @__PURE__ */ i("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7288
7288
|
/* @__PURE__ */ i(
|
|
7289
7289
|
"path",
|
|
@@ -7293,13 +7293,13 @@ const Jn = {
|
|
|
7293
7293
|
strokeWidth: "1.3"
|
|
7294
7294
|
}
|
|
7295
7295
|
)
|
|
7296
|
-
] }),
|
|
7296
|
+
] }), ad = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7297
7297
|
/* @__PURE__ */ i("path", { d: "M2.5 11.5L9 5l2 2-6.5 6.5H2.5v-2z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
|
|
7298
7298
|
/* @__PURE__ */ i("path", { d: "M9 5l1.8-1.8a1.4 1.4 0 012 2L11 7", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
|
|
7299
7299
|
] }), Or = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7300
7300
|
/* @__PURE__ */ i("rect", { x: "1.8", y: "3.5", width: "12.4", height: "9", rx: "1.6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7301
7301
|
/* @__PURE__ */ i("path", { d: "M1.8 6.4h12.4", stroke: "currentColor", strokeWidth: "1.3" })
|
|
7302
|
-
] }),
|
|
7302
|
+
] }), mu = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7303
7303
|
"path",
|
|
7304
7304
|
{
|
|
7305
7305
|
d: "M2 6l6-3.5L14 6v1H2V6zM3 7v5M6.3 7v5M9.7 7v5M13 7v5M2 12.5h12",
|
|
@@ -7307,10 +7307,10 @@ const Jn = {
|
|
|
7307
7307
|
strokeWidth: "1.2",
|
|
7308
7308
|
strokeLinejoin: "round"
|
|
7309
7309
|
}
|
|
7310
|
-
) }),
|
|
7310
|
+
) }), gu = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7311
7311
|
/* @__PURE__ */ i("rect", { x: "3.5", y: "7", width: "9", height: "6.5", rx: "1.4", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7312
7312
|
/* @__PURE__ */ i("path", { d: "M5.5 7V5.5a2.5 2.5 0 015 0V7", stroke: "currentColor", strokeWidth: "1.3" })
|
|
7313
|
-
] }), tr = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), rt = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M4 6.5L8 10.5l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
|
|
7313
|
+
] }), tr = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), rt = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M4 6.5L8 10.5l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), Rs = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7314
7314
|
"path",
|
|
7315
7315
|
{
|
|
7316
7316
|
d: "M10 3.5L5.5 8l4.5 4.5",
|
|
@@ -7328,7 +7328,7 @@ const Jn = {
|
|
|
7328
7328
|
strokeLinecap: "round",
|
|
7329
7329
|
strokeLinejoin: "round"
|
|
7330
7330
|
}
|
|
7331
|
-
) }),
|
|
7331
|
+
) }), td = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), Es = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i("path", { d: "M8 3.5v9M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), xt = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7332
7332
|
/* @__PURE__ */ i(
|
|
7333
7333
|
"path",
|
|
7334
7334
|
{
|
|
@@ -7349,7 +7349,7 @@ const Jn = {
|
|
|
7349
7349
|
strokeLinecap: "round",
|
|
7350
7350
|
strokeLinejoin: "round"
|
|
7351
7351
|
}
|
|
7352
|
-
) }),
|
|
7352
|
+
) }), nd = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7353
7353
|
/* @__PURE__ */ i("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7354
7354
|
/* @__PURE__ */ i(
|
|
7355
7355
|
"path",
|
|
@@ -7361,7 +7361,7 @@ const Jn = {
|
|
|
7361
7361
|
strokeLinejoin: "round"
|
|
7362
7362
|
}
|
|
7363
7363
|
)
|
|
7364
|
-
] }),
|
|
7364
|
+
] }), Ls = ({ size: a, ...e }) => /* @__PURE__ */ i("svg", { ...ye(a, e), children: /* @__PURE__ */ i(
|
|
7365
7365
|
"path",
|
|
7366
7366
|
{
|
|
7367
7367
|
d: "M3 8h10M9 4l4 4-4 4",
|
|
@@ -7379,7 +7379,7 @@ const Jn = {
|
|
|
7379
7379
|
strokeLinecap: "round",
|
|
7380
7380
|
strokeLinejoin: "round"
|
|
7381
7381
|
}
|
|
7382
|
-
) }),
|
|
7382
|
+
) }), hu = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7383
7383
|
/* @__PURE__ */ i(
|
|
7384
7384
|
"path",
|
|
7385
7385
|
{
|
|
@@ -7390,10 +7390,10 @@ const Jn = {
|
|
|
7390
7390
|
}
|
|
7391
7391
|
),
|
|
7392
7392
|
/* @__PURE__ */ i("path", { d: "M6.2 5.5h3.6M6.2 8h3.6", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
7393
|
-
] }),
|
|
7393
|
+
] }), rd = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...ye(a, e), children: [
|
|
7394
7394
|
/* @__PURE__ */ i("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7395
7395
|
/* @__PURE__ */ i("path", { d: "M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
7396
|
-
] }),
|
|
7396
|
+
] }), Os = ({ brand: a }) => {
|
|
7397
7397
|
const e = a === "visa" ? "VISA" : a === "mastercard" ? "MC" : a === "amex" ? "AMEX" : a === "discover" ? "DISC" : a.slice(0, 4).toUpperCase();
|
|
7398
7398
|
return /* @__PURE__ */ i(
|
|
7399
7399
|
"span",
|
|
@@ -7419,7 +7419,7 @@ const Jn = {
|
|
|
7419
7419
|
};
|
|
7420
7420
|
function nr(a) {
|
|
7421
7421
|
const e = a.toLowerCase();
|
|
7422
|
-
return /desk|inbox|handoff/.test(e) ?
|
|
7422
|
+
return /desk|inbox|handoff/.test(e) ? Kl : /seat|member|user|team|rbac|rout/.test(e) ? Ql : /analytic|report|insight|dashboard/.test(e) ? Xl : /whatsapp|channel|chat|message|conversation|webchat|voice/.test(e) ? Gl : /storage|table|vector|file|gb|rows|db/.test(e) ? er : /domain|help center|whitelabel|website|url|web/.test(e) ? ed : /brand|theme|custom|white-?label/.test(e) ? ad : /unlimited|infinit/.test(e) ? Hl : /security|sla|compliance|soc|audit/.test(e) || /support|sla|dedicated|priority/.test(e) ? Lr : /integration|api|plugin|sdk|adk|studio/.test(e) ? $l : /agent/.test(e) ? Jl : /ai|model|gpt|llm/.test(e) ? ar : Xn;
|
|
7423
7423
|
}
|
|
7424
7424
|
const De = ({
|
|
7425
7425
|
open: a,
|
|
@@ -7430,7 +7430,7 @@ const De = ({
|
|
|
7430
7430
|
showClose: s = !0,
|
|
7431
7431
|
...o
|
|
7432
7432
|
}) => {
|
|
7433
|
-
const l = dn(null), d =
|
|
7433
|
+
const l = dn(null), d = Fi(), c = Mi(), u = Ea(() => e(!1), [e]);
|
|
7434
7434
|
return Fe(() => {
|
|
7435
7435
|
var h;
|
|
7436
7436
|
if (!a)
|
|
@@ -7443,7 +7443,7 @@ const De = ({
|
|
|
7443
7443
|
return document.body.style.overflow = "hidden", (h = l.current) == null || h.focus(), () => {
|
|
7444
7444
|
document.removeEventListener("keydown", m), document.body.style.overflow = g;
|
|
7445
7445
|
};
|
|
7446
|
-
}, [a, u]), a ?
|
|
7446
|
+
}, [a, u]), a ? Do(
|
|
7447
7447
|
/* @__PURE__ */ i(
|
|
7448
7448
|
"div",
|
|
7449
7449
|
{
|
|
@@ -7481,7 +7481,7 @@ const De = ({
|
|
|
7481
7481
|
/* @__PURE__ */ i(pn, { size: 15 })
|
|
7482
7482
|
] })
|
|
7483
7483
|
] });
|
|
7484
|
-
},
|
|
7484
|
+
}, sd = ({
|
|
7485
7485
|
options: a,
|
|
7486
7486
|
value: e,
|
|
7487
7487
|
onChange: t,
|
|
@@ -7511,32 +7511,32 @@ const De = ({
|
|
|
7511
7511
|
className: q("bpb-skeleton", t && "bpb-skeleton--rounded", n),
|
|
7512
7512
|
style: { width: a ?? "100%", height: e }
|
|
7513
7513
|
}
|
|
7514
|
-
),
|
|
7514
|
+
), od = 560, id = `(max-width: ${od}px)`, ld = () => {
|
|
7515
7515
|
};
|
|
7516
|
-
function
|
|
7516
|
+
function dd(a) {
|
|
7517
7517
|
const e = Ea(
|
|
7518
7518
|
(r) => {
|
|
7519
7519
|
if (typeof window > "u")
|
|
7520
|
-
return
|
|
7520
|
+
return ld;
|
|
7521
7521
|
const s = window.matchMedia(a);
|
|
7522
7522
|
return s.addEventListener("change", r), () => s.removeEventListener("change", r);
|
|
7523
7523
|
},
|
|
7524
7524
|
[a]
|
|
7525
7525
|
), t = Ea(() => typeof window < "u" && window.matchMedia(a).matches, [a]), n = Ea(() => !1, []);
|
|
7526
|
-
return
|
|
7526
|
+
return Ao(e, t, n);
|
|
7527
7527
|
}
|
|
7528
|
-
function
|
|
7529
|
-
return
|
|
7528
|
+
function cd() {
|
|
7529
|
+
return dd(id);
|
|
7530
7530
|
}
|
|
7531
7531
|
const tn = ({ label: a, children: e }) => /* @__PURE__ */ p("span", { className: "bpb-tooltip", tabIndex: 0, role: "note", children: [
|
|
7532
7532
|
/* @__PURE__ */ i("span", { className: "bpb-tooltip__term", children: a }),
|
|
7533
7533
|
/* @__PURE__ */ i("span", { className: "bpb-tooltip__bubble", role: "tooltip", children: e })
|
|
7534
|
-
] }), Pn = 3,
|
|
7534
|
+
] }), Pn = 3, ud = ({
|
|
7535
7535
|
label: a,
|
|
7536
7536
|
description: e,
|
|
7537
7537
|
Icon: t
|
|
7538
7538
|
}) => {
|
|
7539
|
-
const [n, r] = X(!1), s =
|
|
7539
|
+
const [n, r] = X(!1), s = xo();
|
|
7540
7540
|
return /* @__PURE__ */ p("li", { className: "bpb-plan-card__feature--expandable", children: [
|
|
7541
7541
|
/* @__PURE__ */ p(
|
|
7542
7542
|
"button",
|
|
@@ -7555,17 +7555,17 @@ const tn = ({ label: a, children: e }) => /* @__PURE__ */ p("span", { className:
|
|
|
7555
7555
|
),
|
|
7556
7556
|
n && /* @__PURE__ */ i("p", { id: s, className: "bpb-plan-card__feature-desc", children: e })
|
|
7557
7557
|
] });
|
|
7558
|
-
},
|
|
7558
|
+
}, pd = ({ features: a, previousPlanName: e, overrides: t, isMobile: n }) => {
|
|
7559
7559
|
const { t: r } = me(), [s, o] = X(!1), d = n && !s && a.length > Pn ? a.slice(0, Pn) : a;
|
|
7560
7560
|
return /* @__PURE__ */ p(Te, { children: [
|
|
7561
7561
|
/* @__PURE__ */ p("ul", { className: q("bpb-plan-card__features", n && "bpb-plan-card__features--mobile"), children: [
|
|
7562
7562
|
e && /* @__PURE__ */ p("li", { className: "bpb-plan-card__features-lead", children: [
|
|
7563
|
-
/* @__PURE__ */ i("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ i(
|
|
7563
|
+
/* @__PURE__ */ i("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ i(Wl, { size: 13 }) }),
|
|
7564
7564
|
/* @__PURE__ */ i("span", { children: r("upgradeEverythingIn", { planName: e }) })
|
|
7565
7565
|
] }),
|
|
7566
7566
|
d.map((c) => {
|
|
7567
7567
|
const u = nr(c), m = Jn[c], g = t == null ? void 0 : t[c], h = (g == null ? void 0 : g.label) ?? (m !== void 0 ? r(m.label) : c), C = (g == null ? void 0 : g.description) ?? (m !== void 0 ? r(m.desc) : void 0);
|
|
7568
|
-
return n ? C ? /* @__PURE__ */ i(
|
|
7568
|
+
return n ? C ? /* @__PURE__ */ i(ud, { label: h, description: C, Icon: u }, c) : /* @__PURE__ */ p("li", { children: [
|
|
7569
7569
|
/* @__PURE__ */ i("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ i(u, { size: 13 }) }),
|
|
7570
7570
|
/* @__PURE__ */ i("span", { className: "bpb-plan-card__feature-label", children: h })
|
|
7571
7571
|
] }, c) : /* @__PURE__ */ p("li", { children: [
|
|
@@ -7580,11 +7580,11 @@ const tn = ({ label: a, children: e }) => /* @__PURE__ */ p("span", { className:
|
|
|
7580
7580
|
] })
|
|
7581
7581
|
] });
|
|
7582
7582
|
};
|
|
7583
|
-
function
|
|
7583
|
+
function md(a, e) {
|
|
7584
7584
|
const t = a.prices[e];
|
|
7585
7585
|
return t || ((e === "month" ? a.prices.year : a.prices.month) ?? null);
|
|
7586
7586
|
}
|
|
7587
|
-
function
|
|
7587
|
+
function gd(a, e) {
|
|
7588
7588
|
var r, s;
|
|
7589
7589
|
const t = (r = a.prices.month) == null ? void 0 : r.amount;
|
|
7590
7590
|
if (e === "month")
|
|
@@ -7592,7 +7592,7 @@ function hd(a, e) {
|
|
|
7592
7592
|
const n = ((s = a.prices.year) == null ? void 0 : s.amount) ?? (t === void 0 ? void 0 : t * 12);
|
|
7593
7593
|
return n === void 0 ? null : n / 12;
|
|
7594
7594
|
}
|
|
7595
|
-
function
|
|
7595
|
+
function hd(a) {
|
|
7596
7596
|
var t, n;
|
|
7597
7597
|
let e = 0;
|
|
7598
7598
|
for (const r of a) {
|
|
@@ -7601,7 +7601,7 @@ function bd(a) {
|
|
|
7601
7601
|
}
|
|
7602
7602
|
return Math.round(e * 100);
|
|
7603
7603
|
}
|
|
7604
|
-
const
|
|
7604
|
+
const bd = ({
|
|
7605
7605
|
open: a,
|
|
7606
7606
|
onOpenChange: e,
|
|
7607
7607
|
onSelectPlan: t,
|
|
@@ -7612,7 +7612,7 @@ const fd = ({
|
|
|
7612
7612
|
featureDescriptions: l
|
|
7613
7613
|
}) => {
|
|
7614
7614
|
var ue, ge, P;
|
|
7615
|
-
const { isOutdatedBilling: d, toast: c, analytics: u } = ee(), { t: m } = me(), { data: g } = Me(), [h, C] = X(r), { data: y, isLoading: v } = Ye(), { data: k } = Ta(), { data: _ } = ze({ enabled: a }), { data: T } =
|
|
7615
|
+
const { isOutdatedBilling: d, toast: c, analytics: u } = ee(), { t: m } = me(), { data: g } = Me(), [h, C] = X(r), { data: y, isLoading: v } = Ye(), { data: k } = Ta(), { data: _ } = ze({ enabled: a }), { data: T } = ls({ enabled: a }), w = ms(), I = (T == null ? void 0 : T.planReadonly) ?? !1;
|
|
7616
7616
|
Fe(() => {
|
|
7617
7617
|
a && u.capture(Ie.PLAN_PICKER_VIEWED, { interval: h });
|
|
7618
7618
|
}, [a, u]);
|
|
@@ -7620,7 +7620,7 @@ const fd = ({
|
|
|
7620
7620
|
L !== h && u.capture(Ie.PLAN_INTERVAL_TOGGLED, { interval: L }), C(L);
|
|
7621
7621
|
}, D = _ == null ? void 0 : _.plan.current.interval, S = y == null ? void 0 : y.find((L) => L.id === (_ == null ? void 0 : _.plan.current.planId)), A = _ ? S ? Ne(S) : "community" : void 0, x = ((ue = _ == null ? void 0 : _.plan.next) == null ? void 0 : ue.planId) ?? null, M = !!x && x !== (_ == null ? void 0 : _.plan.current.planId), z = I || A === "enterprise" || A === "managed", F = Ee(() => y ? y.filter(
|
|
7622
7622
|
(L) => Ne(L) !== "managed" && Ne(L) !== "enterprise" && !s.includes(L.id)
|
|
7623
|
-
).sort((L, G) => Ja.indexOf(Ne(L)) - Ja.indexOf(Ne(G))) : [], [y, s]), H = Ee(() =>
|
|
7623
|
+
).sort((L, G) => Ja.indexOf(Ne(L)) - Ja.indexOf(Ne(G))) : [], [y, s]), H = Ee(() => hd(F), [F]), W = cd(), U = Ee(() => {
|
|
7624
7624
|
var te;
|
|
7625
7625
|
if (F.length === 0)
|
|
7626
7626
|
return null;
|
|
@@ -7630,7 +7630,7 @@ const fd = ({
|
|
|
7630
7630
|
return ((te = L ?? G ?? F[0]) == null ? void 0 : te.id) ?? null;
|
|
7631
7631
|
}, [F, n, A]), [B, j] = X(void 0), [K, E] = X(a);
|
|
7632
7632
|
K !== a && (E(a), j(void 0));
|
|
7633
|
-
const fe = B === void 0 ? U : B, Y = ((P = (ge = y == null ? void 0 : y.find((L) => Ne(L) === "enterprise")) == null ? void 0 : ge.metadata) == null ? void 0 : P.contact_url) ??
|
|
7633
|
+
const fe = B === void 0 ? U : B, Y = ((P = (ge = y == null ? void 0 : y.find((L) => Ne(L) === "enterprise")) == null ? void 0 : ge.metadata) == null ? void 0 : P.contact_url) ?? xs, ce = (L) => {
|
|
7634
7634
|
w.mutate(
|
|
7635
7635
|
{ planId: L.id, interval: h },
|
|
7636
7636
|
{
|
|
@@ -7678,7 +7678,7 @@ const fd = ({
|
|
|
7678
7678
|
children: /* @__PURE__ */ p("div", { className: "bpb-upgrade", children: [
|
|
7679
7679
|
/* @__PURE__ */ i("h2", { className: "bpb-upgrade__title", children: m("upgradeDialogTitle") }),
|
|
7680
7680
|
/* @__PURE__ */ i("div", { className: "bpb-upgrade__toggle", children: /* @__PURE__ */ i(
|
|
7681
|
-
|
|
7681
|
+
sd,
|
|
7682
7682
|
{
|
|
7683
7683
|
"aria-label": m("dashboardBillingPeriod"),
|
|
7684
7684
|
value: h,
|
|
@@ -7702,7 +7702,7 @@ const fd = ({
|
|
|
7702
7702
|
] }, L)),
|
|
7703
7703
|
F.map((L, G) => {
|
|
7704
7704
|
var it, Ue;
|
|
7705
|
-
const te = Ne(L), J =
|
|
7705
|
+
const te = Ne(L), J = md(L, h), Q = gd(L, h), he = (((it = L.prices.month) == null ? void 0 : it.amount) ?? 0) <= 0, se = te === A, Pe = se && (A === "community" || h === D), ia = te === A && A !== "community" && h !== D, ha = !!x && L.id === x && !Pe, Oe = A !== void 0 && Ja.indexOf(te) < Ja.indexOf(A), Pa = (te === n || L.id === n) && !Pe, We = se && M ? "cancel_downgrade" : Pe ? "current" : ia ? "switch_interval" : ha ? "next" : Oe ? "downgrade" : "upgrade", Ua = G > 0 ? F[G - 1] : void 0, Cn = o[te] ?? Qn[te], Ba = L.features.conversation_sessions, za = Yn(k, L, h), ja = L.features.ai_spend, Ft = ja !== void 0 ? m("planFeatureAiUsageIncluded", {
|
|
7706
7706
|
amount: oe(ja / ra, (J == null ? void 0 : J.currency) ?? "usd", 1)
|
|
7707
7707
|
}) : void 0, Sn = ja !== void 0 && Ba ? m("planFeatureDescAiUsageIncluded", {
|
|
7708
7708
|
rate: oe(
|
|
@@ -7829,7 +7829,7 @@ const fd = ({
|
|
|
7829
7829
|
}
|
|
7830
7830
|
),
|
|
7831
7831
|
/* @__PURE__ */ i(
|
|
7832
|
-
|
|
7832
|
+
pd,
|
|
7833
7833
|
{
|
|
7834
7834
|
features: Cn,
|
|
7835
7835
|
previousPlanName: Ua ? _e(Ua.name) : void 0,
|
|
@@ -7858,7 +7858,7 @@ const fd = ({
|
|
|
7858
7858
|
}
|
|
7859
7859
|
);
|
|
7860
7860
|
}, Bn = '-apple-system, "ui-sans-serif", "system-ui", "Segoe UI", Helvetica, Arial, sans-serif', zn = "14px", Mr = "10px";
|
|
7861
|
-
function
|
|
7861
|
+
function Fs(a) {
|
|
7862
7862
|
return a ? {
|
|
7863
7863
|
theme: "night",
|
|
7864
7864
|
variables: {
|
|
@@ -7917,7 +7917,7 @@ function Ms(a) {
|
|
|
7917
7917
|
}
|
|
7918
7918
|
};
|
|
7919
7919
|
}
|
|
7920
|
-
function
|
|
7920
|
+
function Ms(a) {
|
|
7921
7921
|
return {
|
|
7922
7922
|
base: {
|
|
7923
7923
|
fontFamily: Bn,
|
|
@@ -7928,14 +7928,14 @@ function Us(a) {
|
|
|
7928
7928
|
invalid: { color: a ? "#ff8583" : "#e02e2a" }
|
|
7929
7929
|
};
|
|
7930
7930
|
}
|
|
7931
|
-
const
|
|
7932
|
-
function
|
|
7931
|
+
const fd = { pt: "pt-BR", es: "es-419" };
|
|
7932
|
+
function Us(a) {
|
|
7933
7933
|
const e = a.split("-")[0] ?? a;
|
|
7934
|
-
return
|
|
7934
|
+
return fd[e] ?? a;
|
|
7935
7935
|
}
|
|
7936
7936
|
const rr = ({ onClose: a, onSuccess: e }) => {
|
|
7937
7937
|
var D;
|
|
7938
|
-
const { toast: t, locale: n } = ee(), { t: r } = me(), { data: s, isLoading: o } = ze(), { data: l, isLoading: d } = Ye(), { data: c, isLoading: u } = Ta(), { data: m, isLoading: g } =
|
|
7938
|
+
const { toast: t, locale: n } = ee(), { t: r } = me(), { data: s, isLoading: o } = ze(), { data: l, isLoading: d } = Ye(), { data: c, isLoading: u } = Ta(), { data: m, isLoading: g } = zi((D = s == null ? void 0 : s.pendingUpgrade) == null ? void 0 : D.invoiceId), h = Wi(), C = Gi(), [y, v] = X(null), k = s == null ? void 0 : s.pendingUpgrade;
|
|
7939
7939
|
if (o || d || u || g)
|
|
7940
7940
|
return /* @__PURE__ */ p("div", { className: "bpb-pending-upgrade", "aria-busy": "true", children: [
|
|
7941
7941
|
/* @__PURE__ */ i(pe, { height: 20, width: 160 }),
|
|
@@ -7994,7 +7994,7 @@ const rr = ({ onClose: a, onSuccess: e }) => {
|
|
|
7994
7994
|
/* @__PURE__ */ i("span", { children: oe(m.amount, m.currency) })
|
|
7995
7995
|
] }) : /* @__PURE__ */ i("p", { className: "bpb-pending-upgrade__error", children: r("pendingUpgradeAmountUnavailable") }),
|
|
7996
7996
|
y && /* @__PURE__ */ i("p", { className: "bpb-pending-upgrade__error", children: y }),
|
|
7997
|
-
k.expiresAt && /* @__PURE__ */ i("p", { className: "bpb-pending-upgrade__expires", children: r("pendingUpgradeExpiresOn", { date:
|
|
7997
|
+
k.expiresAt && /* @__PURE__ */ i("p", { className: "bpb-pending-upgrade__expires", children: r("pendingUpgradeExpiresOn", { date: Bl(k.expiresAt, n) }) }),
|
|
7998
7998
|
/* @__PURE__ */ p("div", { className: "bpb-pending-upgrade__actions", children: [
|
|
7999
7999
|
/* @__PURE__ */ i(
|
|
8000
8000
|
Ce,
|
|
@@ -8018,20 +8018,20 @@ const rr = ({ onClose: a, onSuccess: e }) => {
|
|
|
8018
8018
|
)
|
|
8019
8019
|
] })
|
|
8020
8020
|
] });
|
|
8021
|
-
},
|
|
8021
|
+
}, yd = {
|
|
8022
8022
|
address: "address",
|
|
8023
8023
|
name: "address",
|
|
8024
8024
|
taxId: "taxId",
|
|
8025
8025
|
payment: "payment"
|
|
8026
8026
|
};
|
|
8027
|
-
function
|
|
8027
|
+
function Bs(a, e) {
|
|
8028
8028
|
var r;
|
|
8029
8029
|
const t = (r = a == null ? void 0 : a.metadata) == null ? void 0 : r.errors;
|
|
8030
8030
|
if (!(t != null && t.length))
|
|
8031
8031
|
return { general: (a == null ? void 0 : a.message) || e };
|
|
8032
8032
|
const n = {};
|
|
8033
8033
|
for (const s of t)
|
|
8034
|
-
s.message && (n[
|
|
8034
|
+
s.message && (n[yd[s.scope ?? ""] ?? "general"] = s.message);
|
|
8035
8035
|
return Object.keys(n).length > 0 ? n : { general: (a == null ? void 0 : a.message) || e };
|
|
8036
8036
|
}
|
|
8037
8037
|
function nn(a) {
|
|
@@ -8041,11 +8041,11 @@ function nn(a) {
|
|
|
8041
8041
|
const t = /* @__PURE__ */ new Date();
|
|
8042
8042
|
return t.setFullYear(t.getFullYear() + 2), e > t;
|
|
8043
8043
|
}
|
|
8044
|
-
function
|
|
8044
|
+
function zs(a) {
|
|
8045
8045
|
const e = new Date(a);
|
|
8046
8046
|
return new Date(e.getUTCFullYear(), e.getUTCMonth() + 1, 0).toISOString();
|
|
8047
8047
|
}
|
|
8048
|
-
const
|
|
8048
|
+
const vd = 4, _d = ({
|
|
8049
8049
|
plan: a,
|
|
8050
8050
|
interval: e,
|
|
8051
8051
|
preview: t,
|
|
@@ -8057,7 +8057,7 @@ const _d = 4, Nd = ({
|
|
|
8057
8057
|
onSubscribe: d
|
|
8058
8058
|
}) => {
|
|
8059
8059
|
var B, j, K, E, fe;
|
|
8060
|
-
const { locale: c } = ee(), { t: u } = me(), { data: m } = Ta(), g = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.currency) ?? ((j = a == null ? void 0 : a.prices.year) == null ? void 0 : j.currency) ?? "usd", h = a == null ? void 0 : a.features.conversation_sessions, C = a && Ne(a) === "community" ? u("conversationsUnit") : u("conversationsPerMonth"), y = a ? Yn(m, a, e) : null, v = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, k = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, _ = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, T = t != null && t.nextBillingDate ?
|
|
8060
|
+
const { locale: c } = ee(), { t: u } = me(), { data: m } = Ta(), g = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.currency) ?? ((j = a == null ? void 0 : a.prices.year) == null ? void 0 : j.currency) ?? "usd", h = a == null ? void 0 : a.features.conversation_sessions, C = a && Ne(a) === "community" ? u("conversationsUnit") : u("conversationsPerMonth"), y = a ? Yn(m, a, e) : null, v = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, k = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, _ = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, T = t != null && t.nextBillingDate ? zl(t.nextBillingDate, 1) : null, w = T && !nn(T) ? pa(T, c) : null, I = a ? Qn[Ne(a)].slice(0, vd) : [], N = a == null ? void 0 : a.features.ai_spend, D = N !== void 0 ? u("planFeatureAiUsageIncluded", { amount: oe(N / ra, g, 1) }) : void 0, S = a ? ((K = a.prices[e]) == null ? void 0 : K.amount) ?? 0 : 0, A = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], x = A.filter((Y) => Y.type === "discount"), M = A.filter((Y) => Y.type === "proration_credit" || Y.type === "proration_charge").reduce((Y, ce) => Y + ce.amount, 0), z = !!(t != null && t.subscription.plan.effectiveDate), F = ((E = a == null ? void 0 : a.prices.month) == null ? void 0 : E.amount) ?? 0, H = ((fe = a == null ? void 0 : a.prices.year) == null ? void 0 : fe.amount) ?? 0, W = e === "year" && F > 0 && H > 0 ? Math.round(F * 12 - H) : 0, U = Math.round(W / 12);
|
|
8061
8061
|
return /* @__PURE__ */ p("div", { className: "bpb-summary-wrap", children: [
|
|
8062
8062
|
/* @__PURE__ */ p("div", { className: "bpb-summary bpb-glow", children: [
|
|
8063
8063
|
/* @__PURE__ */ i("h3", { className: "bpb-summary__title", children: a ? `${_e(a.name)} plan` : /* @__PURE__ */ i(pe, { width: 140, height: 24 }) }),
|
|
@@ -8179,7 +8179,7 @@ const _d = 4, Nd = ({
|
|
|
8179
8179
|
u("orderCancelNote")
|
|
8180
8180
|
] })
|
|
8181
8181
|
] });
|
|
8182
|
-
},
|
|
8182
|
+
}, Nd = [
|
|
8183
8183
|
"AT",
|
|
8184
8184
|
"BE",
|
|
8185
8185
|
"BG",
|
|
@@ -8207,7 +8207,7 @@ const _d = 4, Nd = ({
|
|
|
8207
8207
|
"SI",
|
|
8208
8208
|
"ES",
|
|
8209
8209
|
"SE"
|
|
8210
|
-
],
|
|
8210
|
+
], Cd = {
|
|
8211
8211
|
CA: [
|
|
8212
8212
|
{ type: "ca_bn", label: "CA BN", description: "Canadian BN" },
|
|
8213
8213
|
{ type: "ca_gst_hst", label: "CA GST/HST", description: "Canadian GST/HST number" },
|
|
@@ -8254,12 +8254,12 @@ const _d = 4, Nd = ({
|
|
|
8254
8254
|
HU: [{ type: "hu_tin", label: "HU TIN", description: "Hungary tax number (adószám)" }],
|
|
8255
8255
|
RO: [{ type: "ro_tin", label: "RO TIN", description: "Romanian tax ID number" }],
|
|
8256
8256
|
SI: [{ type: "si_tin", label: "SI TIN", description: "Slovenia tax number (davčna številka)" }]
|
|
8257
|
-
},
|
|
8258
|
-
function
|
|
8257
|
+
}, Sd = [{ type: "eu_vat", label: "EU VAT", description: "European VAT number" }];
|
|
8258
|
+
function js(a) {
|
|
8259
8259
|
if (!a)
|
|
8260
8260
|
return [];
|
|
8261
|
-
const e = a.toUpperCase(), t =
|
|
8262
|
-
return
|
|
8261
|
+
const e = a.toUpperCase(), t = Cd[e] ?? [];
|
|
8262
|
+
return Nd.includes(e) ? [...Sd, ...t] : t;
|
|
8263
8263
|
}
|
|
8264
8264
|
const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PURE__ */ p("label", { className: q("bpb-input", t), children: [
|
|
8265
8265
|
/* @__PURE__ */ i("span", { className: "bpb-input__label", children: a }),
|
|
@@ -8280,7 +8280,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8280
8280
|
"aria-invalid": e || void 0,
|
|
8281
8281
|
...r
|
|
8282
8282
|
}
|
|
8283
|
-
),
|
|
8283
|
+
), Vs = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ p("label", { className: q("bpb-input", e), children: [
|
|
8284
8284
|
a && /* @__PURE__ */ i("span", { className: "bpb-input__label", children: a }),
|
|
8285
8285
|
/* @__PURE__ */ p("span", { className: "bpb-input__select-wrap", children: [
|
|
8286
8286
|
/* @__PURE__ */ i(
|
|
@@ -8293,7 +8293,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8293
8293
|
),
|
|
8294
8294
|
/* @__PURE__ */ i(rt, { size: 16, className: "bpb-input__chevron" })
|
|
8295
8295
|
] })
|
|
8296
|
-
] }),
|
|
8296
|
+
] }), kd = ({
|
|
8297
8297
|
plan: a,
|
|
8298
8298
|
interval: e,
|
|
8299
8299
|
onChange: t
|
|
@@ -8343,7 +8343,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8343
8343
|
)
|
|
8344
8344
|
] })
|
|
8345
8345
|
] });
|
|
8346
|
-
},
|
|
8346
|
+
}, Zs = ({
|
|
8347
8347
|
number: a,
|
|
8348
8348
|
title: e,
|
|
8349
8349
|
onEdit: t
|
|
@@ -8361,7 +8361,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8361
8361
|
] }),
|
|
8362
8362
|
t && /* @__PURE__ */ i("button", { type: "button", className: "bpb-step__edit", onClick: t, children: n("edit") })
|
|
8363
8363
|
] });
|
|
8364
|
-
},
|
|
8364
|
+
}, wd = ({
|
|
8365
8365
|
stepNumber: a,
|
|
8366
8366
|
savedCard: e,
|
|
8367
8367
|
isDark: t,
|
|
@@ -8372,7 +8372,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8372
8372
|
}) => {
|
|
8373
8373
|
const { t: l } = me(), [d, c] = X(!1), u = n === "new" || !e;
|
|
8374
8374
|
return /* @__PURE__ */ p("section", { className: "bpb-step", children: [
|
|
8375
|
-
/* @__PURE__ */ i(
|
|
8375
|
+
/* @__PURE__ */ i(Zs, { number: a, title: l("checkoutPaymentMethodTitle") }),
|
|
8376
8376
|
e && /* @__PURE__ */ p("div", { className: "bpb-pay-tabs", role: "tablist", "aria-label": l("checkoutPaymentMethodTitle"), children: [
|
|
8377
8377
|
/* @__PURE__ */ p(
|
|
8378
8378
|
"button",
|
|
@@ -8404,7 +8404,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8404
8404
|
)
|
|
8405
8405
|
] }),
|
|
8406
8406
|
e && n === "saved" && /* @__PURE__ */ p("div", { className: "bpb-saved-card", children: [
|
|
8407
|
-
/* @__PURE__ */ i(
|
|
8407
|
+
/* @__PURE__ */ i(Os, { brand: e.brand }),
|
|
8408
8408
|
/* @__PURE__ */ p("span", { className: "bpb-saved-card__number", children: [
|
|
8409
8409
|
/* @__PURE__ */ i("span", { className: "bpb-saved-card__brand", children: e.brand }),
|
|
8410
8410
|
" •••• ",
|
|
@@ -8421,7 +8421,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8421
8421
|
/* @__PURE__ */ i("div", { className: q("bpb-card-element", !d && "bpb-payment-element--hidden"), children: /* @__PURE__ */ i(
|
|
8422
8422
|
Kt,
|
|
8423
8423
|
{
|
|
8424
|
-
options: { style:
|
|
8424
|
+
options: { style: Ms(t), hidePostalCode: !0 },
|
|
8425
8425
|
onReady: () => c(!0),
|
|
8426
8426
|
onChange: (m) => s(m.complete)
|
|
8427
8427
|
}
|
|
@@ -8429,7 +8429,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8429
8429
|
] }),
|
|
8430
8430
|
o && /* @__PURE__ */ i("p", { role: "alert", className: "bpb-step__field-error", children: o })
|
|
8431
8431
|
] });
|
|
8432
|
-
},
|
|
8432
|
+
}, Td = ({
|
|
8433
8433
|
stepNumber: a,
|
|
8434
8434
|
existingAddress: e,
|
|
8435
8435
|
customerName: t,
|
|
@@ -8451,16 +8451,16 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8451
8451
|
addressError: _,
|
|
8452
8452
|
taxIdError: T
|
|
8453
8453
|
}) => {
|
|
8454
|
-
const { t: w } = me(), [I, N] = X(!1), D = r || !e, S =
|
|
8454
|
+
const { t: w } = me(), [I, N] = X(!1), D = r || !e, S = js(c), A = S.find((x) => x.type === C);
|
|
8455
8455
|
return /* @__PURE__ */ p("section", { className: "bpb-step", children: [
|
|
8456
|
-
/* @__PURE__ */ i(
|
|
8456
|
+
/* @__PURE__ */ i(Zs, { number: a, title: w("checkoutBillingAddressTitle") }),
|
|
8457
8457
|
n ? /* @__PURE__ */ i(pe, { height: 72 }) : D ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
8458
8458
|
!I && /* @__PURE__ */ p("div", { className: "bpb-payment-element__skeleton", children: [
|
|
8459
8459
|
/* @__PURE__ */ i(pe, { height: 48 }),
|
|
8460
8460
|
/* @__PURE__ */ i(pe, { height: 48 })
|
|
8461
8461
|
] }),
|
|
8462
8462
|
/* @__PURE__ */ i("div", { className: q(!I && "bpb-payment-element--hidden"), children: /* @__PURE__ */ i(
|
|
8463
|
-
|
|
8463
|
+
Kr,
|
|
8464
8464
|
{
|
|
8465
8465
|
options: {
|
|
8466
8466
|
mode: "billing",
|
|
@@ -8539,7 +8539,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8539
8539
|
),
|
|
8540
8540
|
S.length > 0 ? /* @__PURE__ */ p(Te, { children: [
|
|
8541
8541
|
/* @__PURE__ */ i(
|
|
8542
|
-
|
|
8542
|
+
Vs,
|
|
8543
8543
|
{
|
|
8544
8544
|
"aria-label": w("checkoutTaxIdTypeLabel"),
|
|
8545
8545
|
value: C,
|
|
@@ -8564,15 +8564,15 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8564
8564
|
] }) : /* @__PURE__ */ i("p", { className: "bpb-business-fields__note", children: w(c ? "checkoutNoTaxRequired" : "checkoutSelectCountryForTax") })
|
|
8565
8565
|
] })
|
|
8566
8566
|
] });
|
|
8567
|
-
},
|
|
8567
|
+
}, Id = ({ planId: a, initialInterval: e, onSuccess: t }) => {
|
|
8568
8568
|
var Mt;
|
|
8569
|
-
const n =
|
|
8569
|
+
const n = $r(), r = Hr(), { email: s, toast: o, analytics: l, isDark: d } = ee(), { t: c } = me(), [u, m] = X(e), [g, h] = X("payment"), [C, y] = X(null), [v, k] = X(!1), [_, T] = X(!1), [w, I] = X(!1), [N, D] = X(void 0), [S, A] = X(!1), [x, M] = X(""), [z, F] = X(""), [H, W] = X(""), [U, B] = X(!1), [j, K] = X({}), [E, fe] = X(!1), Y = cs(), { data: ce } = Ye(), { data: le } = ze(), { data: ue, isLoading: ge } = os(), { data: P, isLoading: L, isError: G } = is(), te = ce == null ? void 0 : ce.find((xe) => xe.id === a), J = ((Mt = ue == null ? void 0 : ue.paymentMethod) == null ? void 0 : Mt.card) ?? null, Q = (P == null ? void 0 : P.address) ?? null;
|
|
8570
8570
|
Fe(() => {
|
|
8571
8571
|
C === null && !ge && ue !== void 0 && y(J ? "saved" : "new");
|
|
8572
8572
|
}, [C, ge, ue, J]), Fe(() => {
|
|
8573
8573
|
N === void 0 && Q && D(Q.country);
|
|
8574
8574
|
}, [N, Q]);
|
|
8575
|
-
const he = Ee(() => ({ plan: { planId: a, interval: u } }), [a, u]), se =
|
|
8575
|
+
const he = Ee(() => ({ plan: { planId: a, interval: u } }), [a, u]), se = ss(he), Pe = us(), ia = ps(), ha = ms(), Oe = te ? _e(te.name) : "", Pa = C === "new" || !J, We = _ || !Q, Ua = Pa ? v : !!J, Cn = We ? w : !0;
|
|
8576
8576
|
Fe(() => {
|
|
8577
8577
|
h(Ua ? "address" : "payment");
|
|
8578
8578
|
}, [Ua]), Fe(() => {
|
|
@@ -8637,7 +8637,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8637
8637
|
};
|
|
8638
8638
|
}
|
|
8639
8639
|
}
|
|
8640
|
-
const Ut = S && x.trim() || Ge || (P == null ? void 0 : P.name) || void 0, Bt = S && z && H.trim() ? { type: z, value: H.trim() } : void 0,
|
|
8640
|
+
const Ut = S && x.trim() || Ge || (P == null ? void 0 : P.name) || void 0, Bt = S && z && H.trim() ? { type: z, value: H.trim() } : void 0, fo = Bt ? [
|
|
8641
8641
|
...((P == null ? void 0 : P.taxIds) ?? []).filter(
|
|
8642
8642
|
(Je) => Je.type !== Bt.type || Je.value !== Bt.value
|
|
8643
8643
|
),
|
|
@@ -8646,29 +8646,29 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8646
8646
|
(Ue || S || Ut !== ((P == null ? void 0 : P.name) ?? void 0)) && await ia.mutateAsync({
|
|
8647
8647
|
address: Ue ?? Q ?? void 0,
|
|
8648
8648
|
name: Ut,
|
|
8649
|
-
taxIds:
|
|
8649
|
+
taxIds: fo
|
|
8650
8650
|
});
|
|
8651
|
-
const
|
|
8651
|
+
const yo = ((ba = se.data) == null ? void 0 : ba.costs.immediate.amountDue) ?? 0, vo = ((ot = se.data) == null ? void 0 : ot.costs.nextCycle.total) ?? 0;
|
|
8652
8652
|
if ((await ha.mutateAsync({ planId: a, interval: u })).pendingUpgrade)
|
|
8653
8653
|
return;
|
|
8654
8654
|
l.capture(Ie.PLAN_UPGRADED, {
|
|
8655
8655
|
plan_name: Oe,
|
|
8656
8656
|
interval: u,
|
|
8657
|
-
amount_paid:
|
|
8658
|
-
next_cycle_amount:
|
|
8657
|
+
amount_paid: yo,
|
|
8658
|
+
next_cycle_amount: vo,
|
|
8659
8659
|
previous_plan_name: (it = ce == null ? void 0 : ce.find((Je) => Je.id === (le == null ? void 0 : le.plan.current.planId))) == null ? void 0 : it.name.replace("Plan - ", ""),
|
|
8660
8660
|
previous_interval: le == null ? void 0 : le.plan.current.interval
|
|
8661
8661
|
}), o({ type: "success", message: c("checkoutSuccessToast") }), t();
|
|
8662
8662
|
} catch (Ue) {
|
|
8663
8663
|
const Ge = Ue instanceof Error ? Ue : void 0;
|
|
8664
|
-
K(
|
|
8664
|
+
K(Bs(Ge, c("checkoutGenericError"))), xe((Ge == null ? void 0 : Ge.type) ?? "exception", Ue instanceof Error ? Ue.message : void 0), o({ type: "error", message: c("checkoutErrorToast") });
|
|
8665
8665
|
} finally {
|
|
8666
8666
|
B(!1);
|
|
8667
8667
|
}
|
|
8668
8668
|
};
|
|
8669
8669
|
return /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", children: [
|
|
8670
8670
|
/* @__PURE__ */ p("div", { className: "bpb-checkout__main", children: [
|
|
8671
|
-
te && /* @__PURE__ */ i(
|
|
8671
|
+
te && /* @__PURE__ */ i(kd, { plan: te, interval: u, onChange: Ba }),
|
|
8672
8672
|
s && /* @__PURE__ */ p("section", { className: "bpb-checkout__section", children: [
|
|
8673
8673
|
/* @__PURE__ */ i("h3", { className: "bpb-checkout__section-title", children: c("checkoutContactInfo") }),
|
|
8674
8674
|
/* @__PURE__ */ p("div", { className: "bpb-checkout__static-field", children: [
|
|
@@ -8677,7 +8677,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8677
8677
|
] })
|
|
8678
8678
|
] }),
|
|
8679
8679
|
/* @__PURE__ */ i(
|
|
8680
|
-
|
|
8680
|
+
wd,
|
|
8681
8681
|
{
|
|
8682
8682
|
stepNumber: 1,
|
|
8683
8683
|
savedCard: J,
|
|
@@ -8689,7 +8689,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8689
8689
|
}
|
|
8690
8690
|
),
|
|
8691
8691
|
g === "address" && /* @__PURE__ */ i(
|
|
8692
|
-
|
|
8692
|
+
Td,
|
|
8693
8693
|
{
|
|
8694
8694
|
stepNumber: 2,
|
|
8695
8695
|
existingAddress: Q,
|
|
@@ -8715,7 +8715,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8715
8715
|
)
|
|
8716
8716
|
] }),
|
|
8717
8717
|
/* @__PURE__ */ i("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ i(
|
|
8718
|
-
|
|
8718
|
+
_d,
|
|
8719
8719
|
{
|
|
8720
8720
|
plan: te,
|
|
8721
8721
|
interval: u,
|
|
@@ -8729,11 +8729,11 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8729
8729
|
}
|
|
8730
8730
|
) })
|
|
8731
8731
|
] });
|
|
8732
|
-
},
|
|
8732
|
+
}, Ad = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
|
|
8733
8733
|
const { stripePromise: o, isDark: l, locale: d, isOutdatedBilling: c } = ee(), { t: u } = me(), { data: m } = Me(), g = Gn({ enabled: a && !c }), h = Ee(
|
|
8734
8734
|
() => ({
|
|
8735
|
-
appearance:
|
|
8736
|
-
locale:
|
|
8735
|
+
appearance: Fs(l),
|
|
8736
|
+
locale: Us(d)
|
|
8737
8737
|
}),
|
|
8738
8738
|
[l, d]
|
|
8739
8739
|
);
|
|
@@ -8749,11 +8749,11 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8749
8749
|
}
|
|
8750
8750
|
) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "xl", "aria-label": u("checkoutTitle"), className: "bpb-scope", children: /* @__PURE__ */ p("div", { className: "bpb-checkout", children: [
|
|
8751
8751
|
/* @__PURE__ */ p("header", { className: "bpb-checkout__header", children: [
|
|
8752
|
-
r && /* @__PURE__ */ i("button", { type: "button", className: "bpb-checkout__back", "aria-label": u("checkoutBackLabel"), onClick: r, children: /* @__PURE__ */ i(
|
|
8752
|
+
r && /* @__PURE__ */ i("button", { type: "button", className: "bpb-checkout__back", "aria-label": u("checkoutBackLabel"), onClick: r, children: /* @__PURE__ */ i(Rs, { size: 18 }) }),
|
|
8753
8753
|
/* @__PURE__ */ i("h2", { className: "bpb-checkout__title", children: u("checkoutTitle") })
|
|
8754
8754
|
] }),
|
|
8755
|
-
/* @__PURE__ */ i(
|
|
8756
|
-
|
|
8755
|
+
/* @__PURE__ */ i(Yr, { stripe: o, options: h, children: /* @__PURE__ */ i(
|
|
8756
|
+
Id,
|
|
8757
8757
|
{
|
|
8758
8758
|
planId: t,
|
|
8759
8759
|
initialInterval: n,
|
|
@@ -8763,7 +8763,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8763
8763
|
}
|
|
8764
8764
|
) })
|
|
8765
8765
|
] }) });
|
|
8766
|
-
},
|
|
8766
|
+
}, xd = ({ value: a, onChange: e, min: t = 0, max: n, step: r = 1, className: s, ...o }) => {
|
|
8767
8767
|
const l = () => e(Math.max(t, a - r)), d = () => e(n === void 0 ? a + r : Math.min(n, a + r));
|
|
8768
8768
|
return /* @__PURE__ */ p("div", { className: q("bpb-stepper", s), children: [
|
|
8769
8769
|
/* @__PURE__ */ i(
|
|
@@ -8774,7 +8774,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8774
8774
|
"aria-label": `Decrease ${o["aria-label"]}`,
|
|
8775
8775
|
onClick: l,
|
|
8776
8776
|
disabled: a <= t,
|
|
8777
|
-
children: /* @__PURE__ */ i(
|
|
8777
|
+
children: /* @__PURE__ */ i(td, { size: 14 })
|
|
8778
8778
|
}
|
|
8779
8779
|
),
|
|
8780
8780
|
/* @__PURE__ */ i("span", { className: "bpb-stepper__value", "aria-label": o["aria-label"], children: a }),
|
|
@@ -8786,15 +8786,15 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8786
8786
|
"aria-label": `Increase ${o["aria-label"]}`,
|
|
8787
8787
|
onClick: d,
|
|
8788
8788
|
disabled: n !== void 0 && a >= n,
|
|
8789
|
-
children: /* @__PURE__ */ i(
|
|
8789
|
+
children: /* @__PURE__ */ i(Es, { size: 14 })
|
|
8790
8790
|
}
|
|
8791
8791
|
)
|
|
8792
8792
|
] });
|
|
8793
|
-
},
|
|
8793
|
+
}, qs = ({ title: a, body: e, ctaLabel: t, onUpgrade: n, onClose: r }) => {
|
|
8794
8794
|
const { t: s } = me();
|
|
8795
8795
|
return /* @__PURE__ */ p(Te, { children: [
|
|
8796
8796
|
/* @__PURE__ */ p("div", { className: "bpb-upgrade-gate", children: [
|
|
8797
|
-
/* @__PURE__ */ i(
|
|
8797
|
+
/* @__PURE__ */ i(nd, { size: 28, className: "bpb-upgrade-gate__icon" }),
|
|
8798
8798
|
/* @__PURE__ */ p("div", { className: "bpb-upgrade-gate__text", children: [
|
|
8799
8799
|
/* @__PURE__ */ i("p", { className: "bpb-upgrade-gate__title", children: a }),
|
|
8800
8800
|
/* @__PURE__ */ i("p", { className: "bpb-upgrade-gate__body", children: e })
|
|
@@ -8802,7 +8802,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8802
8802
|
] }),
|
|
8803
8803
|
/* @__PURE__ */ i("div", { className: "bpb-upgrade-gate__actions", children: n ? /* @__PURE__ */ i(Ce, { variant: "primary", className: "bpb-upgrade-gate__cta", onClick: n, children: t }) : /* @__PURE__ */ i(Ce, { variant: "outline", onClick: r, children: s("close") }) })
|
|
8804
8804
|
] });
|
|
8805
|
-
},
|
|
8805
|
+
}, bu = ({ open: a, onOpenChange: e, onSuccess: t, onUpgrade: n }) => {
|
|
8806
8806
|
const { isOutdatedBilling: r } = ee(), { t: s } = me(), { data: o } = Me(), l = Gn({ enabled: a && !r });
|
|
8807
8807
|
return o === !1 ? null : r ? /* @__PURE__ */ i(
|
|
8808
8808
|
De,
|
|
@@ -8824,14 +8824,14 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8824
8824
|
className: "bpb-scope",
|
|
8825
8825
|
children: /* @__PURE__ */ i(rr, { onClose: () => e(!1), onSuccess: t })
|
|
8826
8826
|
}
|
|
8827
|
-
) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(
|
|
8828
|
-
},
|
|
8827
|
+
) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(Pd, { onOpenChange: e, onSuccess: t, onUpgrade: n }) });
|
|
8828
|
+
}, Pd = ({
|
|
8829
8829
|
onOpenChange: a,
|
|
8830
8830
|
onSuccess: e,
|
|
8831
8831
|
onUpgrade: t
|
|
8832
8832
|
}) => {
|
|
8833
8833
|
var ce, le, ue, ge;
|
|
8834
|
-
const { toast: n, locale: r } = ee(), { t: s } = me(), { data: o, refetch: l } = ze(), { data: d } = Ta(), { data: c } = Ye(), { data: u } =
|
|
8834
|
+
const { toast: n, locale: r } = ee(), { t: s } = me(), { data: o, refetch: l } = ze(), { data: d } = Ta(), { data: c } = Ye(), { data: u } = ls(), m = qi(), [g, h] = X(null), [C, y] = X(!1), v = c == null ? void 0 : c.find((P) => P.id === (o == null ? void 0 : o.plan.current.planId)), k = (o == null ? void 0 : o.plan.current.interval) ?? "month", _ = (u == null ? void 0 : u.addonsReadonly) ?? !1, T = o == null ? void 0 : o.plan.current.periodEnd, w = T && !nn(T) ? pa(T, r) : null, I = Ee(() => {
|
|
8835
8835
|
var L;
|
|
8836
8836
|
if (!o || !d)
|
|
8837
8837
|
return null;
|
|
@@ -8850,9 +8850,9 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8850
8850
|
), x = Ee(
|
|
8851
8851
|
() => v && N ? { plan: { planId: v.id, interval: k }, addons: N } : null,
|
|
8852
8852
|
[v, k, N]
|
|
8853
|
-
), M =
|
|
8853
|
+
), M = ss(x ?? { plan: { planId: "", interval: k } }, {
|
|
8854
8854
|
enabled: !!x && S
|
|
8855
|
-
}), z = ((ce = v == null ? void 0 : v.prices[k]) == null ? void 0 : ce.currency) ?? "usd", F = ((le = M.data) == null ? void 0 : le.costs.immediate.amountDue) ?? 0, H = (ue = M.data) == null ? void 0 : ue.nextBillingDate, W = H && !nn(H) ? pa(H, r) : null, U = ((ge = v == null ? void 0 : v.prices[k]) == null ? void 0 : ge.amount) ?? 0, B = U + A, j = v && N ?
|
|
8855
|
+
}), z = ((ce = v == null ? void 0 : v.prices[k]) == null ? void 0 : ce.currency) ?? "usd", F = ((le = M.data) == null ? void 0 : le.costs.immediate.amountDue) ?? 0, H = (ue = M.data) == null ? void 0 : ue.nextBillingDate, W = H && !nn(H) ? pa(H, r) : null, U = ((ge = v == null ? void 0 : v.prices[k]) == null ? void 0 : ge.amount) ?? 0, B = U + A, j = v && N ? Zl(v, d, N) : [], K = (P, L) => L === "bytes" ? Xa(P) : ve(P), E = (P, L) => {
|
|
8856
8856
|
const G = d == null ? void 0 : d.find((he) => he.id === P), te = G == null ? void 0 : G.increments;
|
|
8857
8857
|
if (!te || L <= 0)
|
|
8858
8858
|
return null;
|
|
@@ -8883,7 +8883,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8883
8883
|
/* @__PURE__ */ i(pe, { height: 56 }),
|
|
8884
8884
|
/* @__PURE__ */ i(pe, { height: 56 })
|
|
8885
8885
|
] }) : D.length === 0 ? /* @__PURE__ */ i(
|
|
8886
|
-
|
|
8886
|
+
qs,
|
|
8887
8887
|
{
|
|
8888
8888
|
title: s("addonsRequirePaidPlanTitle"),
|
|
8889
8889
|
body: s("addonsRequirePaidPlanBody"),
|
|
@@ -8920,7 +8920,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
8920
8920
|
/* @__PURE__ */ p("div", { className: "bpb-addon-row__control", children: [
|
|
8921
8921
|
Q && /* @__PURE__ */ i("span", { className: "bpb-addon-row__grant", children: Q }),
|
|
8922
8922
|
/* @__PURE__ */ i(
|
|
8923
|
-
|
|
8923
|
+
xd,
|
|
8924
8924
|
{
|
|
8925
8925
|
"aria-label": `${Xe[P.id] ? s(Xe[P.id]) : ut(P.name)} quantity`,
|
|
8926
8926
|
value: te,
|
|
@@ -9005,7 +9005,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9005
9005
|
] })
|
|
9006
9006
|
] })
|
|
9007
9007
|
] });
|
|
9008
|
-
},
|
|
9008
|
+
}, Dd = ({ open: a, onOpenChange: e, onSuccess: t }) => {
|
|
9009
9009
|
const { isOutdatedBilling: n } = ee(), { t: r } = me(), { data: s } = Me();
|
|
9010
9010
|
return s === !1 ? null : n ? /* @__PURE__ */ i(
|
|
9011
9011
|
De,
|
|
@@ -9028,7 +9028,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9028
9028
|
children: /* @__PURE__ */ i(rr, { onClose: () => e(!1), onSuccess: t })
|
|
9029
9029
|
}
|
|
9030
9030
|
);
|
|
9031
|
-
},
|
|
9031
|
+
}, fu = ({ onManage: a, className: e }) => {
|
|
9032
9032
|
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me(), s = Gn({ enabled: !t }), [o, l] = X(!1);
|
|
9033
9033
|
return r === !1 || t || !s ? null : /* @__PURE__ */ p(Te, { children: [
|
|
9034
9034
|
/* @__PURE__ */ p(
|
|
@@ -9048,13 +9048,13 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9048
9048
|
]
|
|
9049
9049
|
}
|
|
9050
9050
|
),
|
|
9051
|
-
!a && /* @__PURE__ */ i(
|
|
9051
|
+
!a && /* @__PURE__ */ i(Dd, { open: o, onOpenChange: l })
|
|
9052
9052
|
] });
|
|
9053
|
-
},
|
|
9053
|
+
}, yu = ({ open: a, onOpenChange: e }) => {
|
|
9054
9054
|
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me();
|
|
9055
|
-
return r === !1 ? null : t ? /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(Aa, {}) }) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(
|
|
9056
|
-
},
|
|
9057
|
-
const { locale: e, analytics: t } = ee(), { t: n } = me(), { data: r, isLoading: s, isError: o } =
|
|
9055
|
+
return r === !1 ? null : t ? /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(Aa, {}) }) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(Rd, { open: a }) });
|
|
9056
|
+
}, Rd = ({ open: a }) => {
|
|
9057
|
+
const { locale: e, analytics: t } = ee(), { t: n } = me(), { data: r, isLoading: s, isError: o } = Bi({ enabled: a }), l = (r == null ? void 0 : r.invoices) ?? [], d = {
|
|
9058
9058
|
paid: n("invoiceStatusPaid"),
|
|
9059
9059
|
open: n("invoiceStatusDue"),
|
|
9060
9060
|
draft: n("invoiceStatusDraft"),
|
|
@@ -9089,17 +9089,17 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9089
9089
|
] })
|
|
9090
9090
|
] }, c.id)) })
|
|
9091
9091
|
] });
|
|
9092
|
-
},
|
|
9092
|
+
}, vu = ({ open: a, onOpenChange: e, onSuccess: t }) => {
|
|
9093
9093
|
var C;
|
|
9094
|
-
const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: o } = ee(), { t: l } = me(), { data: d } = Me(), c =
|
|
9094
|
+
const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: o } = ee(), { t: l } = me(), { data: d } = Me(), c = cs(), u = (C = c.data) == null ? void 0 : C.clientSecret, { mutate: m, reset: g } = c;
|
|
9095
9095
|
Fe(() => {
|
|
9096
9096
|
a && !o && d ? m() : g();
|
|
9097
9097
|
}, [a, o, d, m, g]);
|
|
9098
9098
|
const h = Ee(
|
|
9099
9099
|
() => u ? {
|
|
9100
9100
|
clientSecret: u,
|
|
9101
|
-
appearance:
|
|
9102
|
-
locale:
|
|
9101
|
+
appearance: Fs(r),
|
|
9102
|
+
locale: Us(s)
|
|
9103
9103
|
} : null,
|
|
9104
9104
|
[u, r, s]
|
|
9105
9105
|
);
|
|
@@ -9129,17 +9129,17 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9129
9129
|
] }) : !h || !u ? /* @__PURE__ */ p("div", { className: "bpb-payment-dialog__loading", "aria-busy": "true", children: [
|
|
9130
9130
|
/* @__PURE__ */ i(pe, { height: 48 }),
|
|
9131
9131
|
/* @__PURE__ */ i(pe, { height: 120 })
|
|
9132
|
-
] }) : /* @__PURE__ */ i(
|
|
9132
|
+
] }) : /* @__PURE__ */ i(Yr, { stripe: n, options: h, children: /* @__PURE__ */ i(Ed, { clientSecret: u, isDark: r, onSuccess: t }) })
|
|
9133
9133
|
] })
|
|
9134
9134
|
}
|
|
9135
9135
|
);
|
|
9136
|
-
},
|
|
9136
|
+
}, Ed = ({
|
|
9137
9137
|
clientSecret: a,
|
|
9138
9138
|
isDark: e,
|
|
9139
9139
|
onSuccess: t
|
|
9140
9140
|
}) => {
|
|
9141
9141
|
var J;
|
|
9142
|
-
const n =
|
|
9142
|
+
const n = $r(), r = Hr(), { toast: s, analytics: o } = ee(), { t: l } = me(), { data: d, isLoading: c } = os(), { data: u, isLoading: m } = is(), g = us(), h = ps(), C = ((J = d == null ? void 0 : d.paymentMethod) == null ? void 0 : J.card) ?? null, y = (u == null ? void 0 : u.address) ?? null, v = (u == null ? void 0 : u.taxIds) ?? [], [k, _] = X(!1), [T, w] = X(!1), [I, N] = X(!1), [D, S] = X(!1), [A, x] = X(null), [M, z] = X(!1), [F, H] = X(!1), [W, U] = X({}), [B, j] = X(y == null ? void 0 : y.country), [K, E] = X(v.length > 0), [fe, Y] = X(null), ce = fe ?? v.map((Q) => ({ type: Q.type, value: Q.value })), le = js(B), ue = k || !C, ge = (Q, he) => Y(ce.map((se, Pe) => Pe === Q ? { ...se, ...he } : se)), P = () => {
|
|
9143
9143
|
var Q;
|
|
9144
9144
|
return Y([...ce, { type: ((Q = le[0]) == null ? void 0 : Q.type) ?? "", value: "" }]);
|
|
9145
9145
|
}, L = (Q) => Y(ce.filter((he, se) => se !== Q)), G = async () => {
|
|
@@ -9194,7 +9194,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9194
9194
|
taxIds: ha
|
|
9195
9195
|
}), o.capture(Ie.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
|
|
9196
9196
|
} catch (Pe) {
|
|
9197
|
-
const ia = Pe instanceof Error ? Pe : void 0, ha =
|
|
9197
|
+
const ia = Pe instanceof Error ? Pe : void 0, ha = Bs(ia, l("paymentAddressError"));
|
|
9198
9198
|
U(ha), ha.taxId && E(!0), s({ type: "error", message: l("paymentDetailsUpdateError") });
|
|
9199
9199
|
} finally {
|
|
9200
9200
|
H(!1);
|
|
@@ -9208,7 +9208,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9208
9208
|
/* @__PURE__ */ i("div", { className: T ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ i(
|
|
9209
9209
|
Kt,
|
|
9210
9210
|
{
|
|
9211
|
-
options: { style:
|
|
9211
|
+
options: { style: Ms(e), hidePostalCode: !0 },
|
|
9212
9212
|
onReady: () => w(!0),
|
|
9213
9213
|
onChange: (Q) => N(Q.complete)
|
|
9214
9214
|
}
|
|
@@ -9219,7 +9219,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9219
9219
|
/* @__PURE__ */ i(Ce, { variant: "primary", disabled: !I, loading: D, onClick: G, children: l("paymentSaveCard") })
|
|
9220
9220
|
] })
|
|
9221
9221
|
] }) : /* @__PURE__ */ p("div", { className: "bpb-saved-card", children: [
|
|
9222
|
-
/* @__PURE__ */ i(
|
|
9222
|
+
/* @__PURE__ */ i(Os, { brand: C.brand }),
|
|
9223
9223
|
/* @__PURE__ */ p("span", { className: "bpb-saved-card__number", children: [
|
|
9224
9224
|
/* @__PURE__ */ i("span", { className: "bpb-saved-card__brand", children: C.brand }),
|
|
9225
9225
|
" •••• ",
|
|
@@ -9238,7 +9238,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9238
9238
|
m ? /* @__PURE__ */ i(pe, { height: 72 }) : /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
9239
9239
|
!M && /* @__PURE__ */ i(pe, { height: 120 }),
|
|
9240
9240
|
/* @__PURE__ */ i("div", { className: M ? void 0 : "bpb-payment-element--hidden", children: /* @__PURE__ */ i(
|
|
9241
|
-
|
|
9241
|
+
Kr,
|
|
9242
9242
|
{
|
|
9243
9243
|
options: {
|
|
9244
9244
|
mode: "billing",
|
|
@@ -9285,7 +9285,7 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9285
9285
|
ce.length === 0 && /* @__PURE__ */ i("p", { className: "bpb-tax__empty", children: l("paymentTaxEmpty") }),
|
|
9286
9286
|
ce.map((Q, he) => /* @__PURE__ */ p("div", { className: "bpb-tax__row", children: [
|
|
9287
9287
|
/* @__PURE__ */ p(
|
|
9288
|
-
|
|
9288
|
+
Vs,
|
|
9289
9289
|
{
|
|
9290
9290
|
"aria-label": l("paymentTaxIdType"),
|
|
9291
9291
|
value: Q.type,
|
|
@@ -9325,24 +9325,24 @@ const jn = ({ label: a, invalid: e, className: t, id: n, ...r }) => a ? /* @__PU
|
|
|
9325
9325
|
] })
|
|
9326
9326
|
] })
|
|
9327
9327
|
] });
|
|
9328
|
-
},
|
|
9329
|
-
function
|
|
9328
|
+
}, Ws = (a, e, t) => `bpb-dismissed:${a}:${e}:${t}`, Gs = () => (/* @__PURE__ */ new Date()).toLocaleDateString("en-CA");
|
|
9329
|
+
function Ks(a, e, t) {
|
|
9330
9330
|
if (typeof window > "u")
|
|
9331
9331
|
return !1;
|
|
9332
9332
|
try {
|
|
9333
|
-
return window.localStorage.getItem(
|
|
9333
|
+
return window.localStorage.getItem(Ws(a, e, t)) === Gs();
|
|
9334
9334
|
} catch {
|
|
9335
9335
|
return !1;
|
|
9336
9336
|
}
|
|
9337
9337
|
}
|
|
9338
|
-
function
|
|
9338
|
+
function $s(a, e, t) {
|
|
9339
9339
|
if (!(typeof window > "u"))
|
|
9340
9340
|
try {
|
|
9341
|
-
window.localStorage.setItem(
|
|
9341
|
+
window.localStorage.setItem(Ws(a, e, t), Gs());
|
|
9342
9342
|
} catch {
|
|
9343
9343
|
}
|
|
9344
9344
|
}
|
|
9345
|
-
var
|
|
9345
|
+
var Hs = {}, mn = {};
|
|
9346
9346
|
Object.defineProperty(mn, "__esModule", { value: !0 });
|
|
9347
9347
|
mn.BOT_USE_CASES = void 0;
|
|
9348
9348
|
mn.BOT_USE_CASES = {
|
|
@@ -9582,7 +9582,7 @@ et.objectToPrefixMap = {
|
|
|
9582
9582
|
evalEntry: "evlent",
|
|
9583
9583
|
evalResult: "evlres"
|
|
9584
9584
|
};
|
|
9585
|
-
var
|
|
9585
|
+
var Ys = {}, va = {};
|
|
9586
9586
|
Object.defineProperty(va, "__esModule", { value: !0 });
|
|
9587
9587
|
va.quotaConfigsV3 = va.quotaConfigs = va.quotaTypes = void 0;
|
|
9588
9588
|
va.quotaTypes = [
|
|
@@ -9919,7 +9919,7 @@ aa.billingFeatureDefs = {
|
|
|
9919
9919
|
for (var s in n) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, n, s);
|
|
9920
9920
|
};
|
|
9921
9921
|
Object.defineProperty(a, "__esModule", { value: !0 }), t(va, a), t(aa, a);
|
|
9922
|
-
})(
|
|
9922
|
+
})(Ys);
|
|
9923
9923
|
var hn = {};
|
|
9924
9924
|
Object.defineProperty(hn, "__esModule", { value: !0 });
|
|
9925
9925
|
hn.Tags = void 0;
|
|
@@ -10018,7 +10018,7 @@ bn.CANCELLATION_REASONS = [
|
|
|
10018
10018
|
"support_expectations",
|
|
10019
10019
|
"temporary_need"
|
|
10020
10020
|
];
|
|
10021
|
-
var
|
|
10021
|
+
var Js = {}, sr = {};
|
|
10022
10022
|
(function(a) {
|
|
10023
10023
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.CREDIT_GRANT_BILLING_FEATURE_IDS = a.NON_RESETTING_BILLING_FEATURE_IDS = a.NON_ATOMIC_BILLING_FEATURE_IDS = a.ATOMIC_BILLING_FEATURE_IDS = a.BILLING_FEATURE_IDS = a.billingFeatureDefinitions = void 0, a.billingFeatureDefinitions = [
|
|
10024
10024
|
{
|
|
@@ -10111,11 +10111,11 @@ var Qs = {}, sr = {};
|
|
|
10111
10111
|
}
|
|
10112
10112
|
], a.BILLING_FEATURE_IDS = a.billingFeatureDefinitions.map((e) => e.id), a.ATOMIC_BILLING_FEATURE_IDS = a.billingFeatureDefinitions.filter((e) => e.consistency === "atomic").map((e) => e.id), a.NON_ATOMIC_BILLING_FEATURE_IDS = a.billingFeatureDefinitions.filter((e) => e.consistency === "eventual").map((e) => e.id), a.NON_RESETTING_BILLING_FEATURE_IDS = a.billingFeatureDefinitions.filter((e) => e.resetPeriod === "never").map((e) => e.id), a.CREDIT_GRANT_BILLING_FEATURE_IDS = a.billingFeatureDefinitions.filter((e) => e.grantable).map((e) => e.id);
|
|
10113
10113
|
})(sr);
|
|
10114
|
-
var
|
|
10114
|
+
var Qs = {}, Pt = {}, fn = {};
|
|
10115
10115
|
(function(a) {
|
|
10116
10116
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.AI_SPEND_PER_CONVERSATION = a.MESSAGES_PER_CONVERSATION = a.YEAR_MONTHS = a.NANO_DOLLAR_PER_CENT = a.BIG_UNLIMITED = a.SMALL_UNLIMITED = a.MB = a.GB = a.FREE_PRICE = void 0, a.FREE_PRICE = -1, a.GB = 1e9, a.MB = 1e6, a.SMALL_UNLIMITED = 5e3, a.BIG_UNLIMITED = 5e6, a.NANO_DOLLAR_PER_CENT = 1e7, a.YEAR_MONTHS = 12, a.MESSAGES_PER_CONVERSATION = 3e4, a.AI_SPEND_PER_CONVERSATION = 10 * a.NANO_DOLLAR_PER_CENT;
|
|
10117
10117
|
})(fn);
|
|
10118
|
-
var Dt = {},
|
|
10118
|
+
var Dt = {}, Xs = {}, Vn = {}, xa = {}, yn = {}, ta = {}, Rt = {};
|
|
10119
10119
|
(function(a) {
|
|
10120
10120
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.getParsedType = a.ZodParsedType = a.objectUtil = a.util = void 0;
|
|
10121
10121
|
var e;
|
|
@@ -10210,8 +10210,8 @@ var Dt = {}, eo = {}, Vn = {}, xa = {}, yn = {}, ta = {}, Rt = {};
|
|
|
10210
10210
|
})(Rt);
|
|
10211
10211
|
Object.defineProperty(ta, "__esModule", { value: !0 });
|
|
10212
10212
|
ta.ZodError = ta.quotelessJson = ta.ZodIssueCode = void 0;
|
|
10213
|
-
const
|
|
10214
|
-
ta.ZodIssueCode =
|
|
10213
|
+
const eo = Rt;
|
|
10214
|
+
ta.ZodIssueCode = eo.util.arrayToEnum([
|
|
10215
10215
|
"invalid_type",
|
|
10216
10216
|
"invalid_literal",
|
|
10217
10217
|
"custom",
|
|
@@ -10229,8 +10229,8 @@ ta.ZodIssueCode = ao.util.arrayToEnum([
|
|
|
10229
10229
|
"not_multiple_of",
|
|
10230
10230
|
"not_finite"
|
|
10231
10231
|
]);
|
|
10232
|
-
const
|
|
10233
|
-
ta.quotelessJson =
|
|
10232
|
+
const Ld = (a) => JSON.stringify(a, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
10233
|
+
ta.quotelessJson = Ld;
|
|
10234
10234
|
class gt extends Error {
|
|
10235
10235
|
get errors() {
|
|
10236
10236
|
return this.issues;
|
|
@@ -10275,7 +10275,7 @@ class gt extends Error {
|
|
|
10275
10275
|
return this.message;
|
|
10276
10276
|
}
|
|
10277
10277
|
get message() {
|
|
10278
|
-
return JSON.stringify(this.issues,
|
|
10278
|
+
return JSON.stringify(this.issues, eo.util.jsonStringifyReplacer, 2);
|
|
10279
10279
|
}
|
|
10280
10280
|
get isEmpty() {
|
|
10281
10281
|
return this.issues.length === 0;
|
|
@@ -10297,7 +10297,7 @@ class gt extends Error {
|
|
|
10297
10297
|
ta.ZodError = gt;
|
|
10298
10298
|
gt.create = (a) => new gt(a);
|
|
10299
10299
|
Object.defineProperty(yn, "__esModule", { value: !0 });
|
|
10300
|
-
const Re = ta, Ra = Rt,
|
|
10300
|
+
const Re = ta, Ra = Rt, Od = (a, e) => {
|
|
10301
10301
|
let t;
|
|
10302
10302
|
switch (a.code) {
|
|
10303
10303
|
case Re.ZodIssueCode.invalid_type:
|
|
@@ -10353,22 +10353,22 @@ const Re = ta, Ra = Rt, Fd = (a, e) => {
|
|
|
10353
10353
|
}
|
|
10354
10354
|
return { message: t };
|
|
10355
10355
|
};
|
|
10356
|
-
yn.default =
|
|
10357
|
-
var
|
|
10356
|
+
yn.default = Od;
|
|
10357
|
+
var Fd = be && be.__importDefault || function(a) {
|
|
10358
10358
|
return a && a.__esModule ? a : { default: a };
|
|
10359
10359
|
};
|
|
10360
10360
|
Object.defineProperty(xa, "__esModule", { value: !0 });
|
|
10361
10361
|
xa.defaultErrorMap = void 0;
|
|
10362
|
-
xa.setErrorMap =
|
|
10363
|
-
xa.getErrorMap =
|
|
10364
|
-
const
|
|
10365
|
-
xa.defaultErrorMap =
|
|
10366
|
-
let
|
|
10367
|
-
function
|
|
10368
|
-
|
|
10362
|
+
xa.setErrorMap = Md;
|
|
10363
|
+
xa.getErrorMap = Ud;
|
|
10364
|
+
const ao = Fd(yn);
|
|
10365
|
+
xa.defaultErrorMap = ao.default;
|
|
10366
|
+
let to = ao.default;
|
|
10367
|
+
function Md(a) {
|
|
10368
|
+
to = a;
|
|
10369
10369
|
}
|
|
10370
|
-
function
|
|
10371
|
-
return
|
|
10370
|
+
function Ud() {
|
|
10371
|
+
return to;
|
|
10372
10372
|
}
|
|
10373
10373
|
var or = {};
|
|
10374
10374
|
(function(a) {
|
|
@@ -10473,8 +10473,8 @@ var or = {};
|
|
|
10473
10473
|
const g = (h) => typeof Promise < "u" && h instanceof Promise;
|
|
10474
10474
|
a.isAsync = g;
|
|
10475
10475
|
})(or);
|
|
10476
|
-
var
|
|
10477
|
-
Object.defineProperty(
|
|
10476
|
+
var no = {};
|
|
10477
|
+
Object.defineProperty(no, "__esModule", { value: !0 });
|
|
10478
10478
|
var b = {}, vn = {};
|
|
10479
10479
|
Object.defineProperty(vn, "__esModule", { value: !0 });
|
|
10480
10480
|
vn.errorUtil = void 0;
|
|
@@ -10485,8 +10485,8 @@ var Ur;
|
|
|
10485
10485
|
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
10486
10486
|
b.discriminatedUnion = b.date = b.boolean = b.bigint = b.array = b.any = b.coerce = b.ZodFirstPartyTypeKind = b.late = b.ZodSchema = b.Schema = b.ZodReadonly = b.ZodPipeline = b.ZodBranded = b.BRAND = b.ZodNaN = b.ZodCatch = b.ZodDefault = b.ZodNullable = b.ZodOptional = b.ZodTransformer = b.ZodEffects = b.ZodPromise = b.ZodNativeEnum = b.ZodEnum = b.ZodLiteral = b.ZodLazy = b.ZodFunction = b.ZodSet = b.ZodMap = b.ZodRecord = b.ZodTuple = b.ZodIntersection = b.ZodDiscriminatedUnion = b.ZodUnion = b.ZodObject = b.ZodArray = b.ZodVoid = b.ZodNever = b.ZodUnknown = b.ZodAny = b.ZodNull = b.ZodUndefined = b.ZodSymbol = b.ZodDate = b.ZodBoolean = b.ZodBigInt = b.ZodNumber = b.ZodString = b.ZodType = void 0;
|
|
10487
10487
|
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;
|
|
10488
|
-
b.datetimeRegex =
|
|
10489
|
-
b.custom =
|
|
10488
|
+
b.datetimeRegex = oo;
|
|
10489
|
+
b.custom = lo;
|
|
10490
10490
|
const R = ta, Zt = xa, $ = vn, f = or, O = Rt;
|
|
10491
10491
|
class sa {
|
|
10492
10492
|
constructor(e, t, n, r) {
|
|
@@ -10744,28 +10744,28 @@ class ie {
|
|
|
10744
10744
|
b.ZodType = ie;
|
|
10745
10745
|
b.Schema = ie;
|
|
10746
10746
|
b.ZodSchema = ie;
|
|
10747
|
-
const
|
|
10747
|
+
const Bd = /^c[^\s-]{8,}$/i, zd = /^[0-9a-z]+$/, jd = /^[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, Zd = /^[a-z0-9_-]{21}$/i, qd = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Wd = /^[-+]?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)?)??$/, Gd = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Kd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10748
10748
|
let Dn;
|
|
10749
|
-
const
|
|
10750
|
-
function
|
|
10749
|
+
const $d = /^(?:(?: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])$/, Hd = /^(?:(?: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])$/, Yd = /^(([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]))$/, Jd = /^(([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])$/, Qd = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Xd = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ro = "((\\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])))", ec = new RegExp(`^${ro}$`);
|
|
10750
|
+
function so(a) {
|
|
10751
10751
|
let e = "[0-5]\\d";
|
|
10752
10752
|
a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
|
|
10753
10753
|
const t = a.precision ? "+" : "?";
|
|
10754
10754
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
|
|
10755
10755
|
}
|
|
10756
|
-
function
|
|
10757
|
-
return new RegExp(`^${
|
|
10756
|
+
function ac(a) {
|
|
10757
|
+
return new RegExp(`^${so(a)}$`);
|
|
10758
10758
|
}
|
|
10759
|
-
function
|
|
10760
|
-
let e = `${
|
|
10759
|
+
function oo(a) {
|
|
10760
|
+
let e = `${ro}T${so(a)}`;
|
|
10761
10761
|
const t = [];
|
|
10762
10762
|
return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
10763
10763
|
}
|
|
10764
|
-
function
|
|
10765
|
-
return !!((e === "v4" || !e) &&
|
|
10764
|
+
function tc(a, e) {
|
|
10765
|
+
return !!((e === "v4" || !e) && $d.test(a) || (e === "v6" || !e) && Yd.test(a));
|
|
10766
10766
|
}
|
|
10767
|
-
function
|
|
10768
|
-
if (!
|
|
10767
|
+
function nc(a, e) {
|
|
10768
|
+
if (!qd.test(a))
|
|
10769
10769
|
return !1;
|
|
10770
10770
|
try {
|
|
10771
10771
|
const [t] = a.split(".");
|
|
@@ -10777,8 +10777,8 @@ function rc(a, e) {
|
|
|
10777
10777
|
return !1;
|
|
10778
10778
|
}
|
|
10779
10779
|
}
|
|
10780
|
-
function
|
|
10781
|
-
return !!((e === "v4" || !e) &&
|
|
10780
|
+
function rc(a, e) {
|
|
10781
|
+
return !!((e === "v4" || !e) && Hd.test(a) || (e === "v6" || !e) && Jd.test(a));
|
|
10782
10782
|
}
|
|
10783
10783
|
class Ke extends ie {
|
|
10784
10784
|
_parse(e) {
|
|
@@ -10829,43 +10829,43 @@ class Ke extends ie {
|
|
|
10829
10829
|
message: s.message
|
|
10830
10830
|
}), n.dirty());
|
|
10831
10831
|
} else if (s.kind === "email")
|
|
10832
|
-
|
|
10832
|
+
Gd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10833
10833
|
validation: "email",
|
|
10834
10834
|
code: R.ZodIssueCode.invalid_string,
|
|
10835
10835
|
message: s.message
|
|
10836
10836
|
}), n.dirty());
|
|
10837
10837
|
else if (s.kind === "emoji")
|
|
10838
|
-
Dn || (Dn = new RegExp(
|
|
10838
|
+
Dn || (Dn = new RegExp(Kd, "u")), Dn.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10839
10839
|
validation: "emoji",
|
|
10840
10840
|
code: R.ZodIssueCode.invalid_string,
|
|
10841
10841
|
message: s.message
|
|
10842
10842
|
}), n.dirty());
|
|
10843
10843
|
else if (s.kind === "uuid")
|
|
10844
|
-
|
|
10844
|
+
Vd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10845
10845
|
validation: "uuid",
|
|
10846
10846
|
code: R.ZodIssueCode.invalid_string,
|
|
10847
10847
|
message: s.message
|
|
10848
10848
|
}), n.dirty());
|
|
10849
10849
|
else if (s.kind === "nanoid")
|
|
10850
|
-
|
|
10850
|
+
Zd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10851
10851
|
validation: "nanoid",
|
|
10852
10852
|
code: R.ZodIssueCode.invalid_string,
|
|
10853
10853
|
message: s.message
|
|
10854
10854
|
}), n.dirty());
|
|
10855
10855
|
else if (s.kind === "cuid")
|
|
10856
|
-
|
|
10856
|
+
Bd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10857
10857
|
validation: "cuid",
|
|
10858
10858
|
code: R.ZodIssueCode.invalid_string,
|
|
10859
10859
|
message: s.message
|
|
10860
10860
|
}), n.dirty());
|
|
10861
10861
|
else if (s.kind === "cuid2")
|
|
10862
|
-
|
|
10862
|
+
zd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10863
10863
|
validation: "cuid2",
|
|
10864
10864
|
code: R.ZodIssueCode.invalid_string,
|
|
10865
10865
|
message: s.message
|
|
10866
10866
|
}), n.dirty());
|
|
10867
10867
|
else if (s.kind === "ulid")
|
|
10868
|
-
|
|
10868
|
+
jd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10869
10869
|
validation: "ulid",
|
|
10870
10870
|
code: R.ZodIssueCode.invalid_string,
|
|
10871
10871
|
message: s.message
|
|
@@ -10896,39 +10896,39 @@ class Ke extends ie {
|
|
|
10896
10896
|
code: R.ZodIssueCode.invalid_string,
|
|
10897
10897
|
validation: { endsWith: s.value },
|
|
10898
10898
|
message: s.message
|
|
10899
|
-
}), n.dirty()) : s.kind === "datetime" ?
|
|
10899
|
+
}), n.dirty()) : s.kind === "datetime" ? oo(s).test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10900
10900
|
code: R.ZodIssueCode.invalid_string,
|
|
10901
10901
|
validation: "datetime",
|
|
10902
10902
|
message: s.message
|
|
10903
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
10903
|
+
}), n.dirty()) : s.kind === "date" ? ec.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10904
10904
|
code: R.ZodIssueCode.invalid_string,
|
|
10905
10905
|
validation: "date",
|
|
10906
10906
|
message: s.message
|
|
10907
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
10907
|
+
}), n.dirty()) : s.kind === "time" ? ac(s).test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10908
10908
|
code: R.ZodIssueCode.invalid_string,
|
|
10909
10909
|
validation: "time",
|
|
10910
10910
|
message: s.message
|
|
10911
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
10911
|
+
}), n.dirty()) : s.kind === "duration" ? Wd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10912
10912
|
validation: "duration",
|
|
10913
10913
|
code: R.ZodIssueCode.invalid_string,
|
|
10914
10914
|
message: s.message
|
|
10915
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
10915
|
+
}), n.dirty()) : s.kind === "ip" ? tc(e.data, s.version) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10916
10916
|
validation: "ip",
|
|
10917
10917
|
code: R.ZodIssueCode.invalid_string,
|
|
10918
10918
|
message: s.message
|
|
10919
|
-
}), n.dirty()) : s.kind === "jwt" ?
|
|
10919
|
+
}), n.dirty()) : s.kind === "jwt" ? nc(e.data, s.alg) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10920
10920
|
validation: "jwt",
|
|
10921
10921
|
code: R.ZodIssueCode.invalid_string,
|
|
10922
10922
|
message: s.message
|
|
10923
|
-
}), n.dirty()) : s.kind === "cidr" ?
|
|
10923
|
+
}), n.dirty()) : s.kind === "cidr" ? rc(e.data, s.version) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10924
10924
|
validation: "cidr",
|
|
10925
10925
|
code: R.ZodIssueCode.invalid_string,
|
|
10926
10926
|
message: s.message
|
|
10927
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
10927
|
+
}), n.dirty()) : s.kind === "base64" ? Qd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10928
10928
|
validation: "base64",
|
|
10929
10929
|
code: R.ZodIssueCode.invalid_string,
|
|
10930
10930
|
message: s.message
|
|
10931
|
-
}), n.dirty()) : s.kind === "base64url" ?
|
|
10931
|
+
}), n.dirty()) : s.kind === "base64url" ? Xd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, f.addIssueToContext)(r, {
|
|
10932
10932
|
validation: "base64url",
|
|
10933
10933
|
code: R.ZodIssueCode.invalid_string,
|
|
10934
10934
|
message: s.message
|
|
@@ -11164,7 +11164,7 @@ Ke.create = (a) => new Ke({
|
|
|
11164
11164
|
coerce: (a == null ? void 0 : a.coerce) ?? !1,
|
|
11165
11165
|
...re(a)
|
|
11166
11166
|
});
|
|
11167
|
-
function
|
|
11167
|
+
function sc(a, e) {
|
|
11168
11168
|
const t = (a.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, r = t > n ? t : n, s = Number.parseInt(a.toFixed(r).replace(".", "")), o = Number.parseInt(e.toFixed(r).replace(".", ""));
|
|
11169
11169
|
return s % o / 10 ** r;
|
|
11170
11170
|
}
|
|
@@ -11203,7 +11203,7 @@ class _a extends ie {
|
|
|
11203
11203
|
inclusive: s.inclusive,
|
|
11204
11204
|
exact: !1,
|
|
11205
11205
|
message: s.message
|
|
11206
|
-
}), r.dirty()) : s.kind === "multipleOf" ?
|
|
11206
|
+
}), r.dirty()) : s.kind === "multipleOf" ? sc(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), (0, f.addIssueToContext)(n, {
|
|
11207
11207
|
code: R.ZodIssueCode.not_multiple_of,
|
|
11208
11208
|
multipleOf: s.value,
|
|
11209
11209
|
message: s.message
|
|
@@ -12040,7 +12040,7 @@ class we extends ie {
|
|
|
12040
12040
|
});
|
|
12041
12041
|
}
|
|
12042
12042
|
keyof() {
|
|
12043
|
-
return
|
|
12043
|
+
return io(O.util.objectKeys(this.shape));
|
|
12044
12044
|
}
|
|
12045
12045
|
}
|
|
12046
12046
|
b.ZodObject = we;
|
|
@@ -12604,7 +12604,7 @@ Ct.create = (a, e) => new Ct({
|
|
|
12604
12604
|
typeName: ae.ZodLiteral,
|
|
12605
12605
|
...re(e)
|
|
12606
12606
|
});
|
|
12607
|
-
function
|
|
12607
|
+
function io(a, e) {
|
|
12608
12608
|
return new Ca({
|
|
12609
12609
|
values: a,
|
|
12610
12610
|
typeName: ae.ZodEnum,
|
|
@@ -12666,7 +12666,7 @@ class Ca extends ie {
|
|
|
12666
12666
|
}
|
|
12667
12667
|
}
|
|
12668
12668
|
b.ZodEnum = Ca;
|
|
12669
|
-
Ca.create =
|
|
12669
|
+
Ca.create = io;
|
|
12670
12670
|
class St extends ie {
|
|
12671
12671
|
_parse(e) {
|
|
12672
12672
|
const t = O.util.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -13003,7 +13003,7 @@ function zr(a, e) {
|
|
|
13003
13003
|
const t = typeof a == "function" ? a(e) : typeof a == "string" ? { message: a } : a;
|
|
13004
13004
|
return typeof t == "string" ? { message: t } : t;
|
|
13005
13005
|
}
|
|
13006
|
-
function
|
|
13006
|
+
function lo(a, e = {}, t) {
|
|
13007
13007
|
return a ? at.create().superRefine((n, r) => {
|
|
13008
13008
|
const s = a(n);
|
|
13009
13009
|
if (s instanceof Promise)
|
|
@@ -13026,85 +13026,85 @@ var ae;
|
|
|
13026
13026
|
(function(a) {
|
|
13027
13027
|
a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
|
|
13028
13028
|
})(ae || (b.ZodFirstPartyTypeKind = ae = {}));
|
|
13029
|
-
const
|
|
13029
|
+
const oc = (a, e = {
|
|
13030
13030
|
message: `Input not instance of ${a.name}`
|
|
13031
|
-
}) =>
|
|
13032
|
-
b.instanceof =
|
|
13033
|
-
const
|
|
13034
|
-
b.string =
|
|
13035
|
-
const
|
|
13036
|
-
b.number =
|
|
13037
|
-
const
|
|
13038
|
-
b.nan =
|
|
13039
|
-
const
|
|
13040
|
-
b.bigint =
|
|
13041
|
-
const
|
|
13042
|
-
b.boolean =
|
|
13043
|
-
const
|
|
13044
|
-
b.date =
|
|
13045
|
-
const
|
|
13046
|
-
b.symbol =
|
|
13047
|
-
const
|
|
13048
|
-
b.undefined =
|
|
13049
|
-
const
|
|
13050
|
-
b.null =
|
|
13051
|
-
const
|
|
13052
|
-
b.any =
|
|
13053
|
-
const
|
|
13054
|
-
b.unknown =
|
|
13055
|
-
const
|
|
13056
|
-
b.never =
|
|
13057
|
-
const
|
|
13058
|
-
b.void =
|
|
13059
|
-
const
|
|
13060
|
-
b.array =
|
|
13061
|
-
const
|
|
13062
|
-
b.object =
|
|
13063
|
-
const
|
|
13064
|
-
b.strictObject =
|
|
13065
|
-
const
|
|
13066
|
-
b.union =
|
|
13067
|
-
const
|
|
13068
|
-
b.discriminatedUnion =
|
|
13069
|
-
const
|
|
13070
|
-
b.intersection =
|
|
13071
|
-
const
|
|
13072
|
-
b.tuple =
|
|
13073
|
-
const
|
|
13074
|
-
b.record =
|
|
13075
|
-
const
|
|
13076
|
-
b.map =
|
|
13077
|
-
const
|
|
13078
|
-
b.set =
|
|
13079
|
-
const
|
|
13080
|
-
b.function =
|
|
13081
|
-
const
|
|
13082
|
-
b.lazy =
|
|
13083
|
-
const
|
|
13084
|
-
b.literal =
|
|
13085
|
-
const
|
|
13086
|
-
b.enum =
|
|
13087
|
-
const
|
|
13088
|
-
b.nativeEnum =
|
|
13089
|
-
const
|
|
13090
|
-
b.promise =
|
|
13091
|
-
const
|
|
13092
|
-
b.effect =
|
|
13093
|
-
b.transformer =
|
|
13094
|
-
const
|
|
13095
|
-
b.optional =
|
|
13096
|
-
const
|
|
13097
|
-
b.nullable =
|
|
13098
|
-
const
|
|
13099
|
-
b.preprocess =
|
|
13100
|
-
const
|
|
13101
|
-
b.pipeline =
|
|
13031
|
+
}) => lo((t) => t instanceof a, e);
|
|
13032
|
+
b.instanceof = oc;
|
|
13033
|
+
const co = Ke.create;
|
|
13034
|
+
b.string = co;
|
|
13035
|
+
const uo = _a.create;
|
|
13036
|
+
b.number = uo;
|
|
13037
|
+
const ic = ln.create;
|
|
13038
|
+
b.nan = ic;
|
|
13039
|
+
const lc = Na.create;
|
|
13040
|
+
b.bigint = lc;
|
|
13041
|
+
const po = ht.create;
|
|
13042
|
+
b.boolean = po;
|
|
13043
|
+
const dc = Oa.create;
|
|
13044
|
+
b.date = dc;
|
|
13045
|
+
const cc = rn.create;
|
|
13046
|
+
b.symbol = cc;
|
|
13047
|
+
const uc = bt.create;
|
|
13048
|
+
b.undefined = uc;
|
|
13049
|
+
const pc = ft.create;
|
|
13050
|
+
b.null = pc;
|
|
13051
|
+
const mc = at.create;
|
|
13052
|
+
b.any = mc;
|
|
13053
|
+
const gc = La.create;
|
|
13054
|
+
b.unknown = gc;
|
|
13055
|
+
const hc = ga.create;
|
|
13056
|
+
b.never = hc;
|
|
13057
|
+
const bc = sn.create;
|
|
13058
|
+
b.void = bc;
|
|
13059
|
+
const fc = $e.create;
|
|
13060
|
+
b.array = fc;
|
|
13061
|
+
const yc = we.create;
|
|
13062
|
+
b.object = yc;
|
|
13063
|
+
const vc = we.strictCreate;
|
|
13064
|
+
b.strictObject = vc;
|
|
13065
|
+
const _c = yt.create;
|
|
13066
|
+
b.union = _c;
|
|
13067
|
+
const Nc = _n.create;
|
|
13068
|
+
b.discriminatedUnion = Nc;
|
|
13069
|
+
const Cc = vt.create;
|
|
13070
|
+
b.intersection = Cc;
|
|
13071
|
+
const Sc = oa.create;
|
|
13072
|
+
b.tuple = Sc;
|
|
13073
|
+
const kc = _t.create;
|
|
13074
|
+
b.record = kc;
|
|
13075
|
+
const wc = on.create;
|
|
13076
|
+
b.map = wc;
|
|
13077
|
+
const Tc = Fa.create;
|
|
13078
|
+
b.set = Tc;
|
|
13079
|
+
const Ic = Qa.create;
|
|
13080
|
+
b.function = Ic;
|
|
13081
|
+
const Ac = Nt.create;
|
|
13082
|
+
b.lazy = Ac;
|
|
13083
|
+
const xc = Ct.create;
|
|
13084
|
+
b.literal = xc;
|
|
13085
|
+
const Pc = Ca.create;
|
|
13086
|
+
b.enum = Pc;
|
|
13087
|
+
const Dc = St.create;
|
|
13088
|
+
b.nativeEnum = Dc;
|
|
13089
|
+
const Rc = tt.create;
|
|
13090
|
+
b.promise = Rc;
|
|
13091
|
+
const mo = He.create;
|
|
13092
|
+
b.effect = mo;
|
|
13093
|
+
b.transformer = mo;
|
|
13094
|
+
const Ec = na.create;
|
|
13095
|
+
b.optional = Ec;
|
|
13096
|
+
const Lc = Sa.create;
|
|
13097
|
+
b.nullable = Lc;
|
|
13098
|
+
const Oc = He.createWithPreprocess;
|
|
13099
|
+
b.preprocess = Oc;
|
|
13100
|
+
const Fc = Et.create;
|
|
13101
|
+
b.pipeline = Fc;
|
|
13102
|
+
const Mc = () => co().optional();
|
|
13103
|
+
b.ostring = Mc;
|
|
13102
13104
|
const Uc = () => uo().optional();
|
|
13103
|
-
b.
|
|
13105
|
+
b.onumber = Uc;
|
|
13104
13106
|
const Bc = () => po().optional();
|
|
13105
|
-
b.
|
|
13106
|
-
const zc = () => mo().optional();
|
|
13107
|
-
b.oboolean = zc;
|
|
13107
|
+
b.oboolean = Bc;
|
|
13108
13108
|
b.coerce = {
|
|
13109
13109
|
string: (a) => Ke.create({ ...a, coerce: !0 }),
|
|
13110
13110
|
number: (a) => _a.create({ ...a, coerce: !0 }),
|
|
@@ -13128,7 +13128,7 @@ b.NEVER = f.INVALID;
|
|
|
13128
13128
|
}), t = be && be.__exportStar || function(n, r) {
|
|
13129
13129
|
for (var s in n) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, n, s);
|
|
13130
13130
|
};
|
|
13131
|
-
Object.defineProperty(a, "__esModule", { value: !0 }), t(xa, a), t(or, a), t(
|
|
13131
|
+
Object.defineProperty(a, "__esModule", { value: !0 }), t(xa, a), t(or, a), t(no, a), t(Rt, a), t(b, a), t(ta, a);
|
|
13132
13132
|
})(Vn);
|
|
13133
13133
|
(function(a) {
|
|
13134
13134
|
var e = be && be.__createBinding || (Object.create ? function(o, l, d, c) {
|
|
@@ -13154,10 +13154,10 @@ b.NEVER = f.INVALID;
|
|
|
13154
13154
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.z = void 0;
|
|
13155
13155
|
const s = n(Vn);
|
|
13156
13156
|
a.z = s, r(Vn, a), a.default = s;
|
|
13157
|
-
})(
|
|
13157
|
+
})(Xs);
|
|
13158
13158
|
(function(a) {
|
|
13159
13159
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.billingConfigSchema = a.billingVersionConfigSchema = a.meterSchema = a.addOnSchema = a.planSchema = a.meteredPriceSchema = a.priceSchema = a.meterTypeSchema = a.aggregationSchema = a.unitAmountSchema = a.intervalSchema = a.featureSchema = a.UNKNOWN_STRIPE_ID = void 0;
|
|
13160
|
-
const e =
|
|
13160
|
+
const e = Xs, t = sr;
|
|
13161
13161
|
a.UNKNOWN_STRIPE_ID = "__UNKNOWN_STRIPE_ID__", a.featureSchema = e.z.enum(t.BILLING_FEATURE_IDS), a.intervalSchema = e.z.enum(["month", "year"]), a.unitAmountSchema = e.z.number().int().min(1), a.aggregationSchema = e.z.enum(["sum", "count"]), a.meterTypeSchema = e.z.enum(["payAsYouGo", "creditGrant"]), a.priceSchema = e.z.object({
|
|
13162
13162
|
amount: e.z.number(),
|
|
13163
13163
|
currency: e.z.enum(["usd"]),
|
|
@@ -13468,7 +13468,7 @@ Ot.meters = {
|
|
|
13468
13468
|
providerProductId: Ga.UNKNOWN_STRIPE_ID
|
|
13469
13469
|
}
|
|
13470
13470
|
};
|
|
13471
|
-
var
|
|
13471
|
+
var go = {};
|
|
13472
13472
|
(function(a) {
|
|
13473
13473
|
Object.defineProperty(a, "__esModule", { value: !0 }), a.billingDefinitions = a.billingConfig = void 0;
|
|
13474
13474
|
const e = Pt, t = Lt, n = Ot;
|
|
@@ -13484,7 +13484,7 @@ var ho = {};
|
|
|
13484
13484
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
13485
13485
|
}
|
|
13486
13486
|
}, a.billingDefinitions = a.billingConfig;
|
|
13487
|
-
})(
|
|
13487
|
+
})(go);
|
|
13488
13488
|
(function(a) {
|
|
13489
13489
|
var e = be && be.__createBinding || (Object.create ? function(n, r, s, o) {
|
|
13490
13490
|
o === void 0 && (o = s);
|
|
@@ -13497,8 +13497,8 @@ var ho = {};
|
|
|
13497
13497
|
}), t = be && be.__exportStar || function(n, r) {
|
|
13498
13498
|
for (var s in n) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, n, s);
|
|
13499
13499
|
};
|
|
13500
|
-
Object.defineProperty(a, "__esModule", { value: !0 }), t(Pt, a), t(Lt, a), t(Ot, a), t(Dt, a), t(
|
|
13501
|
-
})(
|
|
13500
|
+
Object.defineProperty(a, "__esModule", { value: !0 }), t(Pt, a), t(Lt, a), t(Ot, a), t(Dt, a), t(go, a);
|
|
13501
|
+
})(Qs);
|
|
13502
13502
|
(function(a) {
|
|
13503
13503
|
var e = be && be.__createBinding || (Object.create ? function(n, r, s, o) {
|
|
13504
13504
|
o === void 0 && (o = s);
|
|
@@ -13511,8 +13511,8 @@ var ho = {};
|
|
|
13511
13511
|
}), t = be && be.__exportStar || function(n, r) {
|
|
13512
13512
|
for (var s in n) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, n, s);
|
|
13513
13513
|
};
|
|
13514
|
-
Object.defineProperty(a, "__esModule", { value: !0 }), t(sr, a), t(
|
|
13515
|
-
})(
|
|
13514
|
+
Object.defineProperty(a, "__esModule", { value: !0 }), t(sr, a), t(Qs, a), t(fn, a);
|
|
13515
|
+
})(Js);
|
|
13516
13516
|
(function(a) {
|
|
13517
13517
|
var e = be && be.__createBinding || (Object.create ? function(n, r, s, o) {
|
|
13518
13518
|
o === void 0 && (o = s);
|
|
@@ -13525,9 +13525,9 @@ var ho = {};
|
|
|
13525
13525
|
}), t = be && be.__exportStar || function(n, r) {
|
|
13526
13526
|
for (var s in n) s !== "default" && !Object.prototype.hasOwnProperty.call(r, s) && e(r, n, s);
|
|
13527
13527
|
};
|
|
13528
|
-
Object.defineProperty(a, "__esModule", { value: !0 }), t(mn, a), t(gn, a), t(et, a), t(
|
|
13529
|
-
})(
|
|
13530
|
-
const
|
|
13528
|
+
Object.defineProperty(a, "__esModule", { value: !0 }), t(mn, a), t(gn, a), t(et, a), t(Ys, a), t(hn, a), t(Ze, a), t(bn, a), t(Js, a);
|
|
13529
|
+
})(Hs);
|
|
13530
|
+
const zc = [
|
|
13531
13531
|
{ key: "conversation_sessions", label: "Conversations", unit: "count" },
|
|
13532
13532
|
{ key: "ai_spend", label: "AI spend", unit: "nano-usd" },
|
|
13533
13533
|
{ key: "table_rows", label: "Table rows", unit: "count" },
|
|
@@ -13537,7 +13537,7 @@ const jc = [
|
|
|
13537
13537
|
function pt(a, e) {
|
|
13538
13538
|
return e === "bytes" ? Xa(a) : e === "nano-usd" ? `$${(a / ra).toFixed(2)}` : ve(a);
|
|
13539
13539
|
}
|
|
13540
|
-
function
|
|
13540
|
+
function ho(a, e) {
|
|
13541
13541
|
switch (a) {
|
|
13542
13542
|
case "conversation_sessions":
|
|
13543
13543
|
return e("dashboardConversationsMetric");
|
|
@@ -13556,12 +13556,12 @@ function bo(a, e) {
|
|
|
13556
13556
|
function lr(a) {
|
|
13557
13557
|
return a >= 90 ? "critical" : a >= 75 ? "warning" : "normal";
|
|
13558
13558
|
}
|
|
13559
|
-
const
|
|
13560
|
-
function
|
|
13561
|
-
return !
|
|
13559
|
+
const jc = Hs.NON_RESETTING_BILLING_FEATURE_IDS;
|
|
13560
|
+
function Vc(a) {
|
|
13561
|
+
return !jc.includes(a);
|
|
13562
13562
|
}
|
|
13563
13563
|
function Nn(a) {
|
|
13564
|
-
return a ?
|
|
13564
|
+
return a ? zc.flatMap(({ key: e, label: t, unit: n }) => {
|
|
13565
13565
|
const r = a[e];
|
|
13566
13566
|
if (!r || r.quota <= 0)
|
|
13567
13567
|
return [];
|
|
@@ -13575,16 +13575,16 @@ function Nn(a) {
|
|
|
13575
13575
|
quota: r.quota,
|
|
13576
13576
|
remaining: Math.max(0, r.quota - s),
|
|
13577
13577
|
pct: o,
|
|
13578
|
-
resets:
|
|
13578
|
+
resets: Vc(e)
|
|
13579
13579
|
}
|
|
13580
13580
|
];
|
|
13581
13581
|
}).sort((e, t) => t.pct - e.pct) : [];
|
|
13582
13582
|
}
|
|
13583
|
-
const Zr = "outgrow-free",
|
|
13584
|
-
function
|
|
13583
|
+
const Zr = "outgrow-free", Zc = 0.75, qc = 5;
|
|
13584
|
+
function Wc(a, e) {
|
|
13585
13585
|
return a.prices[e] ?? (e === "month" ? a.prices.year : a.prices.month) ?? null;
|
|
13586
13586
|
}
|
|
13587
|
-
function
|
|
13587
|
+
function Gc(a, e) {
|
|
13588
13588
|
var r, s;
|
|
13589
13589
|
const t = (r = a.prices.month) == null ? void 0 : r.amount;
|
|
13590
13590
|
if (e === "month")
|
|
@@ -13592,7 +13592,7 @@ function Kc(a, e) {
|
|
|
13592
13592
|
const n = ((s = a.prices.year) == null ? void 0 : s.amount) ?? (t === void 0 ? void 0 : t * 12);
|
|
13593
13593
|
return n === void 0 ? null : n / 12;
|
|
13594
13594
|
}
|
|
13595
|
-
const
|
|
13595
|
+
const _u = ({
|
|
13596
13596
|
open: a,
|
|
13597
13597
|
onOpenChange: e,
|
|
13598
13598
|
onSelectPlan: t,
|
|
@@ -13603,7 +13603,7 @@ const yu = ({
|
|
|
13603
13603
|
period: l
|
|
13604
13604
|
}) => {
|
|
13605
13605
|
var W, U;
|
|
13606
|
-
const { isOutdatedBilling: d, analytics: c, scope: u } = ee(), { t: m } = me(), { data: g } = Me(), { data: h } = Ye(), { data: C } = Ta(), { data: y } = ze({ enabled: !d }), { data: v } = nt({ period: l, enabled: !d }), k = a !== void 0, [_, T] = X(!1), w = h == null ? void 0 : h.find((B) => B.id === (y == null ? void 0 : y.plan.current.planId)), I = y ? w ? Ne(w) === "community" : !0 : !1, N = Ee(() => Nn(v).find((B) => B.key === "conversation_sessions"), [v]), D = !k && !d && I && !!N && N.pct / 100 >=
|
|
13606
|
+
const { isOutdatedBilling: d, analytics: c, scope: u } = ee(), { t: m } = me(), { data: g } = Me(), { data: h } = Ye(), { data: C } = Ta(), { data: y } = ze({ enabled: !d }), { data: v } = nt({ period: l, enabled: !d }), k = a !== void 0, [_, T] = X(!1), w = h == null ? void 0 : h.find((B) => B.id === (y == null ? void 0 : y.plan.current.planId)), I = y ? w ? Ne(w) === "community" : !0 : !1, N = Ee(() => Nn(v).find((B) => B.key === "conversation_sessions"), [v]), D = !k && !d && I && !!N && N.pct / 100 >= Zc && !_ && !Ks(Zr, u, "modal"), S = k ? !!a : D;
|
|
13607
13607
|
Fe(() => {
|
|
13608
13608
|
S && c.capture(Ie.PLAN_PICKER_VIEWED, {
|
|
13609
13609
|
source: k ? "outgrow_free" : "outgrow_free_auto",
|
|
@@ -13611,11 +13611,11 @@ const yu = ({
|
|
|
13611
13611
|
});
|
|
13612
13612
|
}, [S, k, c]);
|
|
13613
13613
|
const A = () => {
|
|
13614
|
-
k || (
|
|
13614
|
+
k || ($s(Zr, u, "modal"), T(!0)), e == null || e(!1);
|
|
13615
13615
|
}, x = Ee(() => h ? h.filter((B) => {
|
|
13616
13616
|
const j = Ne(B);
|
|
13617
13617
|
return j !== "community" && j !== "enterprise" && j !== "managed";
|
|
13618
|
-
}).sort((B, j) => Ja.indexOf(Ne(B)) - Ja.indexOf(Ne(j))) : [], [h]), M = ((U = (W = h == null ? void 0 : h.find((B) => Ne(B) === "enterprise")) == null ? void 0 : W.metadata) == null ? void 0 : U.contact_url) ??
|
|
13618
|
+
}).sort((B, j) => Ja.indexOf(Ne(B)) - Ja.indexOf(Ne(j))) : [], [h]), M = ((U = (W = h == null ? void 0 : h.find((B) => Ne(B) === "enterprise")) == null ? void 0 : W.metadata) == null ? void 0 : U.contact_url) ?? xs;
|
|
13619
13619
|
if (g === !1 || d || !S)
|
|
13620
13620
|
return null;
|
|
13621
13621
|
const z = (N == null ? void 0 : N.quota) ?? (w == null ? void 0 : w.features.conversation_sessions) ?? 100, F = (N == null ? void 0 : N.used) ?? 0, H = N && N.pct > 0 ? Math.min(100, Math.max(5, Math.round(N.pct))) : 0;
|
|
@@ -13654,7 +13654,7 @@ const yu = ({
|
|
|
13654
13654
|
) })
|
|
13655
13655
|
] }),
|
|
13656
13656
|
/* @__PURE__ */ i("div", { className: "bpb-outgrow__grid", children: x.map((B, j) => {
|
|
13657
|
-
const K = Ne(B), E =
|
|
13657
|
+
const K = Ne(B), E = Wc(B, r), fe = Gc(B, r), Y = K === n || B.id === n, ce = B.features.conversation_sessions, le = Yn(C, B, r), ue = j > 0 ? x[j - 1] : void 0, ge = (s[K] ?? Qn[K]).slice(0, qc);
|
|
13658
13658
|
return /* @__PURE__ */ p(
|
|
13659
13659
|
"div",
|
|
13660
13660
|
{
|
|
@@ -13705,7 +13705,7 @@ const yu = ({
|
|
|
13705
13705
|
},
|
|
13706
13706
|
children: [
|
|
13707
13707
|
m("outgrowUpgradeTo", { planName: _e(B.name) }),
|
|
13708
|
-
Y && /* @__PURE__ */ i(
|
|
13708
|
+
Y && /* @__PURE__ */ i(Ls, { size: 15 })
|
|
13709
13709
|
]
|
|
13710
13710
|
}
|
|
13711
13711
|
),
|
|
@@ -13745,7 +13745,7 @@ const yu = ({
|
|
|
13745
13745
|
)
|
|
13746
13746
|
] })
|
|
13747
13747
|
] }) });
|
|
13748
|
-
}, ua = (a, e) => e === "bytes" ? Xa(a) : e === "nano-usd" ? `$${(a / ra).toFixed(2)}` : ve(a),
|
|
13748
|
+
}, ua = (a, e) => e === "bytes" ? Xa(a) : e === "nano-usd" ? `$${(a / ra).toFixed(2)}` : ve(a), Kc = (a, e) => {
|
|
13749
13749
|
const t = /* @__PURE__ */ new Date();
|
|
13750
13750
|
return Array.from({ length: a }, (n, r) => {
|
|
13751
13751
|
const s = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth() - r, 1));
|
|
@@ -13754,8 +13754,8 @@ const yu = ({
|
|
|
13754
13754
|
label: s.toLocaleDateString(e, { month: "long", year: "numeric", timeZone: "UTC" })
|
|
13755
13755
|
};
|
|
13756
13756
|
});
|
|
13757
|
-
},
|
|
13758
|
-
const { data: e, isLoading: t, isError: n } =
|
|
13757
|
+
}, $c = ({ period: a }) => {
|
|
13758
|
+
const { data: e, isLoading: t, isError: n } = Vi("ai_spend", { period: a }), { t: r } = me();
|
|
13759
13759
|
if (n)
|
|
13760
13760
|
return null;
|
|
13761
13761
|
if (t)
|
|
@@ -13826,7 +13826,7 @@ const yu = ({
|
|
|
13826
13826
|
}
|
|
13827
13827
|
)
|
|
13828
13828
|
] });
|
|
13829
|
-
},
|
|
13829
|
+
}, Nu = ({
|
|
13830
13830
|
period: a,
|
|
13831
13831
|
showPeriodSelector: e = !0,
|
|
13832
13832
|
periodMonths: t = 12,
|
|
@@ -13834,7 +13834,7 @@ const yu = ({
|
|
|
13834
13834
|
onIncreaseLimits: r
|
|
13835
13835
|
}) => {
|
|
13836
13836
|
var z;
|
|
13837
|
-
const { isOutdatedBilling: s, locale: o } = ee(), { t: l } = me(), d = Ee(() =>
|
|
13837
|
+
const { isOutdatedBilling: s, locale: o } = ee(), { t: l } = me(), d = Ee(() => Kc(t, o), [t, o]), [c, u] = X(a ?? ((z = d[0]) == null ? void 0 : z.value) ?? ""), m = Zi(), g = Math.max(
|
|
13838
13838
|
0,
|
|
13839
13839
|
d.findIndex((F) => F.value === c)
|
|
13840
13840
|
), h = (F) => {
|
|
@@ -13869,11 +13869,11 @@ const yu = ({
|
|
|
13869
13869
|
"aria-label": l("dashboardPrevMonth"),
|
|
13870
13870
|
onClick: () => h(1),
|
|
13871
13871
|
disabled: g >= d.length - 1,
|
|
13872
|
-
children: /* @__PURE__ */ i(
|
|
13872
|
+
children: /* @__PURE__ */ i(Rs, { size: 15 })
|
|
13873
13873
|
}
|
|
13874
13874
|
),
|
|
13875
13875
|
/* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
|
|
13876
|
-
/* @__PURE__ */ i(
|
|
13876
|
+
/* @__PURE__ */ i(rd, { size: 15, className: "bpb-usage__period-icon" }),
|
|
13877
13877
|
/* @__PURE__ */ i(
|
|
13878
13878
|
"select",
|
|
13879
13879
|
{
|
|
@@ -13900,7 +13900,7 @@ const yu = ({
|
|
|
13900
13900
|
] })
|
|
13901
13901
|
] }),
|
|
13902
13902
|
r && /* @__PURE__ */ p(Ce, { onClick: r, children: [
|
|
13903
|
-
/* @__PURE__ */ i(
|
|
13903
|
+
/* @__PURE__ */ i(Es, { size: 15 }),
|
|
13904
13904
|
l("dashboardIncreaseLimits")
|
|
13905
13905
|
] })
|
|
13906
13906
|
] }),
|
|
@@ -13945,11 +13945,11 @@ const yu = ({
|
|
|
13945
13945
|
) }),
|
|
13946
13946
|
m && /* @__PURE__ */ p("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
|
|
13947
13947
|
/* @__PURE__ */ i("span", { className: "bpb-usage__subhead", children: l("dashboardAiByBot") }),
|
|
13948
|
-
/* @__PURE__ */ i(
|
|
13948
|
+
/* @__PURE__ */ i($c, { period: c })
|
|
13949
13949
|
] })
|
|
13950
13950
|
] })
|
|
13951
13951
|
] });
|
|
13952
|
-
}, qr = "usage-banner",
|
|
13952
|
+
}, qr = "usage-banner", Cu = ({
|
|
13953
13953
|
position: a = "inline",
|
|
13954
13954
|
threshold: e = 0.9,
|
|
13955
13955
|
onUpgrade: t,
|
|
@@ -13959,7 +13959,7 @@ const yu = ({
|
|
|
13959
13959
|
period: o,
|
|
13960
13960
|
className: l
|
|
13961
13961
|
}) => {
|
|
13962
|
-
const { isOutdatedBilling: d, analytics: c, scope: u } = ee(), { t: m } = me(), { data: g } = nt({ period: o, enabled: !d }), [h, C] = X({}), [y, v] = X(!1), [k, _] = X(null), T = g ? Object.entries(g).map(([M, z]) => ({ key: M, pct: z.quota > 0 ? (z.usage ?? 0) / z.quota : 0 })).filter((M) => M.pct >= e).sort((M, z) => z.pct - M.pct)[0] : void 0, w = !!T && (h[T.key] ||
|
|
13962
|
+
const { isOutdatedBilling: d, analytics: c, scope: u } = ee(), { t: m } = me(), { data: g } = nt({ period: o, enabled: !d }), [h, C] = X({}), [y, v] = X(!1), [k, _] = X(null), T = g ? Object.entries(g).map(([M, z]) => ({ key: M, pct: z.quota > 0 ? (z.usage ?? 0) / z.quota : 0 })).filter((M) => M.pct >= e).sort((M, z) => z.pct - M.pct)[0] : void 0, w = !!T && (h[T.key] || Ks(qr, u, T.key));
|
|
13963
13963
|
if (d || !T || w)
|
|
13964
13964
|
return null;
|
|
13965
13965
|
const N = {
|
|
@@ -14000,7 +14000,7 @@ const yu = ({
|
|
|
14000
14000
|
className: "bpb-usage-banner__dismiss",
|
|
14001
14001
|
"aria-label": m("usageBannerDismiss"),
|
|
14002
14002
|
onClick: () => {
|
|
14003
|
-
|
|
14003
|
+
$s(qr, u, T.key), C((M) => ({ ...M, [T.key]: !0 }));
|
|
14004
14004
|
},
|
|
14005
14005
|
children: /* @__PURE__ */ i(tr, { size: 16 })
|
|
14006
14006
|
}
|
|
@@ -14011,7 +14011,7 @@ const yu = ({
|
|
|
14011
14011
|
),
|
|
14012
14012
|
!t && /* @__PURE__ */ p(Te, { children: [
|
|
14013
14013
|
/* @__PURE__ */ i(
|
|
14014
|
-
|
|
14014
|
+
bd,
|
|
14015
14015
|
{
|
|
14016
14016
|
open: y,
|
|
14017
14017
|
onOpenChange: v,
|
|
@@ -14021,7 +14021,7 @@ const yu = ({
|
|
|
14021
14021
|
}
|
|
14022
14022
|
),
|
|
14023
14023
|
k && /* @__PURE__ */ i(
|
|
14024
|
-
|
|
14024
|
+
Ad,
|
|
14025
14025
|
{
|
|
14026
14026
|
open: !!k,
|
|
14027
14027
|
onOpenChange: (M) => !M && _(null),
|
|
@@ -14035,13 +14035,13 @@ const yu = ({
|
|
|
14035
14035
|
)
|
|
14036
14036
|
] })
|
|
14037
14037
|
] });
|
|
14038
|
-
},
|
|
14038
|
+
}, Su = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: q("bpb-action-card bpb-scope", r), onClick: n, children: [
|
|
14039
14039
|
/* @__PURE__ */ p("div", { className: "bpb-action-card__header", children: [
|
|
14040
14040
|
/* @__PURE__ */ i(a, { size: 20 }),
|
|
14041
14041
|
e
|
|
14042
14042
|
] }),
|
|
14043
14043
|
/* @__PURE__ */ i("p", { className: "bpb-action-card__description", children: t })
|
|
14044
|
-
] }), It = ({ children: a }) => /* @__PURE__ */ i("span", { className: "bpb-summary-card__icon", "aria-hidden": "true", children: a }),
|
|
14044
|
+
] }), It = ({ children: a }) => /* @__PURE__ */ i("span", { className: "bpb-summary-card__icon", "aria-hidden": "true", children: a }), bo = ({ isAddons: a, className: e }) => {
|
|
14045
14045
|
const { manageBillingUrl: t } = ee(), { t: n } = me(), r = () => t && window.open(t, "_blank", "noopener");
|
|
14046
14046
|
return /* @__PURE__ */ p(
|
|
14047
14047
|
"button",
|
|
@@ -14070,13 +14070,13 @@ const yu = ({
|
|
|
14070
14070
|
]
|
|
14071
14071
|
}
|
|
14072
14072
|
);
|
|
14073
|
-
},
|
|
14073
|
+
}, ku = ({ onManage: a, className: e }) => {
|
|
14074
14074
|
var v, k;
|
|
14075
14075
|
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me(), { data: s, isLoading: o } = ze({ enabled: !t }), { data: l, isLoading: d } = Ye();
|
|
14076
14076
|
if (r === !1)
|
|
14077
14077
|
return null;
|
|
14078
14078
|
if (t)
|
|
14079
|
-
return /* @__PURE__ */ i(
|
|
14079
|
+
return /* @__PURE__ */ i(bo, { isAddons: !1, className: e });
|
|
14080
14080
|
if (o || d)
|
|
14081
14081
|
return /* @__PURE__ */ i(pe, { height: 84, rounded: !0, className: q("bpb-scope", e) });
|
|
14082
14082
|
const c = s == null ? void 0 : s.plan.current, u = l == null ? void 0 : l.find((_) => _.id === (c == null ? void 0 : c.planId)), m = (c == null ? void 0 : c.interval) ?? "month", g = ((v = u == null ? void 0 : u.prices[m]) == null ? void 0 : v.amount) ?? 0, h = ((k = u == null ? void 0 : u.prices[m]) == null ? void 0 : k.currency) ?? "usd", C = u == null ? void 0 : u.features.conversation_sessions, y = u ? Ne(u) : "community";
|
|
@@ -14109,12 +14109,12 @@ const yu = ({
|
|
|
14109
14109
|
]
|
|
14110
14110
|
}
|
|
14111
14111
|
);
|
|
14112
|
-
},
|
|
14112
|
+
}, wu = ({ onManage: a, className: e }) => {
|
|
14113
14113
|
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me(), { data: s, isLoading: o } = ze({ enabled: !t }), { data: l, isLoading: d } = Ta();
|
|
14114
14114
|
if (r === !1)
|
|
14115
14115
|
return null;
|
|
14116
14116
|
if (t)
|
|
14117
|
-
return /* @__PURE__ */ i(
|
|
14117
|
+
return /* @__PURE__ */ i(bo, { isAddons: !0, className: e });
|
|
14118
14118
|
if (o || d)
|
|
14119
14119
|
return /* @__PURE__ */ i(pe, { height: 84, rounded: !0, className: q("bpb-scope", e) });
|
|
14120
14120
|
const c = (l ?? []).flatMap((m) => {
|
|
@@ -14155,8 +14155,8 @@ const yu = ({
|
|
|
14155
14155
|
]
|
|
14156
14156
|
}
|
|
14157
14157
|
);
|
|
14158
|
-
},
|
|
14159
|
-
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me(), { data: s, isLoading: o, isError: l } =
|
|
14158
|
+
}, Tu = ({ onManage: a, className: e }) => {
|
|
14159
|
+
const { isOutdatedBilling: t } = ee(), { t: n } = me(), { data: r } = Me(), { data: s, isLoading: o, isError: l } = ds({ enabled: !t });
|
|
14160
14160
|
if (r === !1 || t)
|
|
14161
14161
|
return null;
|
|
14162
14162
|
if (o)
|
|
@@ -14213,7 +14213,7 @@ const yu = ({
|
|
|
14213
14213
|
]
|
|
14214
14214
|
}
|
|
14215
14215
|
);
|
|
14216
|
-
},
|
|
14216
|
+
}, Iu = ({ onManage: a, className: e }) => {
|
|
14217
14217
|
var E, fe;
|
|
14218
14218
|
const { isOutdatedBilling: t, locale: n, manageBillingUrl: r, analytics: s } = ee(), { t: o } = me(), { data: l } = Me(), { data: d, isLoading: c } = ze({ enabled: !t }), { data: u, isLoading: m } = Ye(), { data: g, isLoading: h } = Ta();
|
|
14219
14219
|
if (l === !1)
|
|
@@ -14252,7 +14252,7 @@ const yu = ({
|
|
|
14252
14252
|
), w = ((fe = y == null ? void 0 : y.prices[v]) == null ? void 0 : fe.amount) ?? 0, I = (g ?? []).reduce((Y, ce) => {
|
|
14253
14253
|
const le = y ? Hn(ce, y, v) : null;
|
|
14254
14254
|
return Y + (T[ce.id] ?? 0) * ((le == null ? void 0 : le.amount) ?? 0);
|
|
14255
|
-
}, 0), N = w + I, D = v === "year" ? "/yr" : "/mo", S =
|
|
14255
|
+
}, 0), N = w + I, D = v === "year" ? "/yr" : "/mo", S = ql(y, g, T).find((Y) => Y.key === "conversation_sessions"), A = o(_ === "community" ? "conversationsUnit" : "conversationsPerMonth"), x = _ === "enterprise" || _ === "managed", M = _ !== "community" && !x, z = !!(d != null && d.pendingUpgrade), F = d == null ? void 0 : d.plan.next, H = F && F.planId !== (C == null ? void 0 : C.planId), W = C == null ? void 0 : C.periodEnd, U = M && !H && W && !nn(W) ? pa(W, n) : null, B = u == null ? void 0 : u.find((Y) => Y.id === (F == null ? void 0 : F.planId)), j = F == null ? void 0 : F.effectiveDate, K = H && B && j ? o("planBannerDowngradesTo", {
|
|
14256
14256
|
plan: _e(B.name),
|
|
14257
14257
|
date: pa(j, n)
|
|
14258
14258
|
}) : null;
|
|
@@ -14305,7 +14305,7 @@ const yu = ({
|
|
|
14305
14305
|
]
|
|
14306
14306
|
}
|
|
14307
14307
|
);
|
|
14308
|
-
},
|
|
14308
|
+
}, Au = ({
|
|
14309
14309
|
onManage: a,
|
|
14310
14310
|
period: e,
|
|
14311
14311
|
variant: t = "card",
|
|
@@ -14321,7 +14321,7 @@ const yu = ({
|
|
|
14321
14321
|
const y = m == null ? void 0 : m.find((B) => B.id === (c == null ? void 0 : c.plan.current.planId)), v = y ? Ne(y) : "community", k = v === "enterprise" || v === "managed", _ = Nn(h), T = _.find((B) => B.used > B.quota);
|
|
14322
14322
|
if (k && !T && !n)
|
|
14323
14323
|
return null;
|
|
14324
|
-
const w = _.find((B) => B.key === "conversation_sessions"), I = _[0], N = T ?? (I && I.key !== "conversation_sessions" && I.pct >= 75 ? I : w ?? I), D = N ? Math.round(N.pct) : 0, S = D > 0 ? Math.max(5, D) : 0, A = N ? lr(N.pct) : "normal", x = A !== "normal", M = v === "community", z = !M && (N != null && N.resets) ? pa(
|
|
14324
|
+
const w = _.find((B) => B.key === "conversation_sessions"), I = _[0], N = T ?? (I && I.key !== "conversation_sessions" && I.pct >= 75 ? I : w ?? I), D = N ? Math.round(N.pct) : 0, S = D > 0 ? Math.max(5, D) : 0, A = N ? lr(N.pct) : "normal", x = A !== "normal", M = v === "community", z = !M && (N != null && N.resets) ? pa(zs(e ?? (/* @__PURE__ */ new Date()).toISOString()), l) : null;
|
|
14325
14325
|
let F = null, H = null;
|
|
14326
14326
|
if (N && x) {
|
|
14327
14327
|
const B = pt(N.remaining, N.unit);
|
|
@@ -14330,7 +14330,7 @@ const yu = ({
|
|
|
14330
14330
|
const W = /* @__PURE__ */ i(Te, { children: N ? /* @__PURE__ */ p(Te, { children: [
|
|
14331
14331
|
/* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
|
|
14332
14332
|
x && /* @__PURE__ */ i(xt, { size: 16, className: q("bpb-plan-usage__alert", `bpb-plan-usage__alert--${A}`) }),
|
|
14333
|
-
/* @__PURE__ */ i("span", { className: "bpb-plan-usage__plan", children:
|
|
14333
|
+
/* @__PURE__ */ i("span", { className: "bpb-plan-usage__plan", children: ho(N.key, d) }),
|
|
14334
14334
|
/* @__PURE__ */ p("span", { className: "bpb-plan-usage__count", children: [
|
|
14335
14335
|
pt(N.used, N.unit),
|
|
14336
14336
|
" / ",
|
|
@@ -14365,7 +14365,7 @@ const yu = ({
|
|
|
14365
14365
|
] }) : z && /* @__PURE__ */ i("span", { className: "bpb-plan-usage__reset", children: d("usageWidgetResets", { date: z }) }),
|
|
14366
14366
|
a && x && !k && /* @__PURE__ */ p("span", { className: "bpb-plan-usage__cta", children: [
|
|
14367
14367
|
d("usageWidgetViewOptions"),
|
|
14368
|
-
/* @__PURE__ */ i(
|
|
14368
|
+
/* @__PURE__ */ i(Ls, { size: 14 })
|
|
14369
14369
|
] })
|
|
14370
14370
|
] }) : /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
|
|
14371
14371
|
/* @__PURE__ */ i("span", { className: "bpb-plan-usage__plan", children: y ? _e(y.name) : d("free") }),
|
|
@@ -14378,7 +14378,7 @@ const yu = ({
|
|
|
14378
14378
|
r
|
|
14379
14379
|
);
|
|
14380
14380
|
return a ? /* @__PURE__ */ i("button", { type: "button", className: U, style: s, onClick: a, children: W }) : /* @__PURE__ */ i("div", { className: U, style: s, children: W });
|
|
14381
|
-
},
|
|
14381
|
+
}, Hc = ({
|
|
14382
14382
|
children: a,
|
|
14383
14383
|
delay: e = 200,
|
|
14384
14384
|
placement: t = "top",
|
|
@@ -14397,7 +14397,7 @@ const yu = ({
|
|
|
14397
14397
|
N && (_(), k.current = setTimeout(() => v(!0), Math.max(0, e)));
|
|
14398
14398
|
}, S = () => {
|
|
14399
14399
|
_(), v(!1);
|
|
14400
|
-
}, A = T ? _e(T.name) : u("free"), x = w === "community", M = x ? I.find((K) => K.key === "conversation_sessions") : void 0, z = x ? h == null ? void 0 : h.find((K) => Ne(K) === "plus") : void 0, F = z == null ? void 0 : z.features.conversation_sessions, H = (j = (B =
|
|
14400
|
+
}, A = T ? _e(T.name) : u("free"), x = w === "community", M = x ? I.find((K) => K.key === "conversation_sessions") : void 0, z = x ? h == null ? void 0 : h.find((K) => Ne(K) === "plus") : void 0, F = z == null ? void 0 : z.features.conversation_sessions, H = (j = (B = Ps(C)) == null ? void 0 : B.increments) == null ? void 0 : j.conversation_sessions, W = x && !!s && !!F && !!H, U = pa(zs(r ?? (/* @__PURE__ */ new Date()).toISOString()), c);
|
|
14401
14401
|
return /* @__PURE__ */ p(
|
|
14402
14402
|
"span",
|
|
14403
14403
|
{
|
|
@@ -14436,7 +14436,7 @@ const yu = ({
|
|
|
14436
14436
|
const E = K.pct > 0 ? Math.max(5, K.pct) : 0;
|
|
14437
14437
|
return /* @__PURE__ */ p("span", { className: "bpb-usage-pop__item", children: [
|
|
14438
14438
|
/* @__PURE__ */ p("span", { className: "bpb-usage-pop__head", children: [
|
|
14439
|
-
/* @__PURE__ */ i("span", { className: "bpb-usage-pop__name", children:
|
|
14439
|
+
/* @__PURE__ */ i("span", { className: "bpb-usage-pop__name", children: ho(K.key, u) }),
|
|
14440
14440
|
/* @__PURE__ */ p("span", { className: "bpb-usage-pop__val", children: [
|
|
14441
14441
|
pt(K.used, K.unit),
|
|
14442
14442
|
" / ",
|
|
@@ -14469,7 +14469,7 @@ const yu = ({
|
|
|
14469
14469
|
]
|
|
14470
14470
|
}
|
|
14471
14471
|
);
|
|
14472
|
-
},
|
|
14472
|
+
}, xu = ({
|
|
14473
14473
|
size: a = 20,
|
|
14474
14474
|
thickness: e = 3.5,
|
|
14475
14475
|
showLabel: t = !1,
|
|
@@ -14518,8 +14518,8 @@ const yu = ({
|
|
|
14518
14518
|
"%"
|
|
14519
14519
|
] })
|
|
14520
14520
|
] }), I = q("bpb-usage-ring", n && "bpb-usage-ring--clickable");
|
|
14521
|
-
return /* @__PURE__ */ i(
|
|
14522
|
-
},
|
|
14521
|
+
return /* @__PURE__ */ i(Hc, { delay: r, align: s, period: l, className: d, children: n ? /* @__PURE__ */ i("button", { type: "button", className: I, onClick: n, "aria-label": T, children: w }) : /* @__PURE__ */ i("span", { className: I, tabIndex: 0, role: "img", "aria-label": T, children: w }) });
|
|
14522
|
+
}, Yc = ({ checked: a, onChange: e, disabled: t, className: n, ...r }) => /* @__PURE__ */ i(
|
|
14523
14523
|
"button",
|
|
14524
14524
|
{
|
|
14525
14525
|
type: "button",
|
|
@@ -14531,7 +14531,7 @@ const yu = ({
|
|
|
14531
14531
|
onClick: () => e(!a),
|
|
14532
14532
|
children: /* @__PURE__ */ i("span", { className: "bpb-switch__thumb" })
|
|
14533
14533
|
}
|
|
14534
|
-
), Wr = "ai_spend", Qc = 5, En = (a) => (a ?? 0) / ra, Ln = (a) => Math.round(a * ra),
|
|
14534
|
+
), Wr = "ai_spend", Jc = 1, Qc = 5, En = (a) => (a ?? 0) / ra, Ln = (a) => Math.round(a * ra), Xc = (a) => Number.isInteger(a) && a >= Jc, eu = (a) => Number.isInteger(a) && a >= Qc, au = (a, e) => Number.isInteger(a) && a >= 0 && e > 0 && a % e === 0, Pu = ({ open: a, onOpenChange: e, onSuccess: t, onUpgrade: n }) => {
|
|
14535
14535
|
const { isOutdatedBilling: r } = ee(), { t: s } = me(), { data: o } = Me();
|
|
14536
14536
|
return o === !1 ? null : r ? /* @__PURE__ */ i(
|
|
14537
14537
|
De,
|
|
@@ -14543,8 +14543,8 @@ const yu = ({
|
|
|
14543
14543
|
className: "bpb-scope",
|
|
14544
14544
|
children: /* @__PURE__ */ i(Aa, {})
|
|
14545
14545
|
}
|
|
14546
|
-
) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": s("autoRechargeTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(
|
|
14547
|
-
},
|
|
14546
|
+
) : /* @__PURE__ */ i(De, { open: a, onOpenChange: e, size: "md", "aria-label": s("autoRechargeTitle"), className: "bpb-scope", children: /* @__PURE__ */ i(tu, { onOpenChange: e, onSuccess: t, onUpgrade: n }) });
|
|
14547
|
+
}, tu = ({
|
|
14548
14548
|
onOpenChange: a,
|
|
14549
14549
|
onSuccess: e,
|
|
14550
14550
|
onUpgrade: t
|
|
@@ -14559,7 +14559,7 @@ const yu = ({
|
|
|
14559
14559
|
isLoading: y,
|
|
14560
14560
|
isError: v,
|
|
14561
14561
|
refetch: k
|
|
14562
|
-
} =
|
|
14562
|
+
} = ds(), _ = ji(), [T, w] = X(null), [I, N] = X(!1), [D, S] = X(!1), [A, x] = X(!1), M = l || m || y, z = d || g || v, F = () => {
|
|
14563
14563
|
c(), h(), k();
|
|
14564
14564
|
}, H = u == null ? void 0 : u.find((J) => J.id === (o == null ? void 0 : o.plan.current.planId)), W = o ? H ? Ne(H) === "community" : !0 : !1, U = C == null ? void 0 : C[Wr], B = Ee(() => {
|
|
14565
14565
|
const J = (U == null ? void 0 : U.maxAmount) != null, he = (U == null ? void 0 : U.targetType) === "credit_grant" && (U == null ? void 0 : U.thresholdType) === "remaining_amount" ? U == null ? void 0 : U.threshold : null;
|
|
@@ -14569,7 +14569,7 @@ const yu = ({
|
|
|
14569
14569
|
limitInput: (U == null ? void 0 : U.maxAmount) != null ? String(Math.round(En(U.maxAmount))) : "",
|
|
14570
14570
|
hasLimit: J
|
|
14571
14571
|
};
|
|
14572
|
-
}, [U]), j = T ?? B, K = (J) => w({ ...j, ...J }), E = Number(j.thresholdInput), fe = Number(j.chunkInput), Y = Number(j.limitInput), ce = j.thresholdInput.trim() !== "" &&
|
|
14572
|
+
}, [U]), j = T ?? B, K = (J) => w({ ...j, ...J }), E = Number(j.thresholdInput), fe = Number(j.chunkInput), Y = Number(j.limitInput), ce = j.thresholdInput.trim() !== "" && Xc(E), le = eu(fe), ue = !j.hasLimit || j.limitInput.trim() !== "" && au(Y, fe), ge = I && !ce, P = D && !le, L = A && !ue, G = j.thresholdInput !== B.thresholdInput || j.chunkInput !== B.chunkInput || j.limitInput !== B.limitInput || j.hasLimit !== B.hasLimit, te = () => {
|
|
14573
14573
|
_.mutate(
|
|
14574
14574
|
{
|
|
14575
14575
|
settings: {
|
|
@@ -14609,7 +14609,7 @@ const yu = ({
|
|
|
14609
14609
|
/* @__PURE__ */ i(Ce, { variant: "primary", onClick: F, children: s("tryAgain") })
|
|
14610
14610
|
] })
|
|
14611
14611
|
] }) : W ? /* @__PURE__ */ i(
|
|
14612
|
-
|
|
14612
|
+
qs,
|
|
14613
14613
|
{
|
|
14614
14614
|
title: s("autoRechargeRequiresPaidPlanTitle"),
|
|
14615
14615
|
body: s("autoRechargeRequiresPaidPlanBody"),
|
|
@@ -14709,7 +14709,7 @@ const yu = ({
|
|
|
14709
14709
|
/* @__PURE__ */ i("span", { className: "bpb-auto-recharge-dialog__row-description", children: s("autoRechargeSetLimitHint") })
|
|
14710
14710
|
] }),
|
|
14711
14711
|
/* @__PURE__ */ i(
|
|
14712
|
-
|
|
14712
|
+
Yc,
|
|
14713
14713
|
{
|
|
14714
14714
|
"aria-label": s("autoRechargeSetLimitLabel"),
|
|
14715
14715
|
checked: j.hasLimit,
|
|
@@ -14788,122 +14788,122 @@ const yu = ({
|
|
|
14788
14788
|
] });
|
|
14789
14789
|
};
|
|
14790
14790
|
export {
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14791
|
+
wu as AddonsSummaryCard,
|
|
14792
|
+
Jl as AgentsIcon,
|
|
14793
|
+
Ls as ArrowRightIcon,
|
|
14794
|
+
Pu as AutoRechargeDialog,
|
|
14795
|
+
Tu as AutoRechargeSummaryCard,
|
|
14796
14796
|
Ie as BILLING_EVENTS,
|
|
14797
14797
|
an as Badge,
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14798
|
+
mu as BankIcon,
|
|
14799
|
+
Su as BillingActionCard,
|
|
14800
|
+
uu as BillingProvider,
|
|
14801
14801
|
ar as BoltIcon,
|
|
14802
14802
|
Ce as Button,
|
|
14803
|
-
|
|
14804
|
-
|
|
14803
|
+
rd as CalendarIcon,
|
|
14804
|
+
Os as CardBrandBadge,
|
|
14805
14805
|
Or as CardIcon,
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14806
|
+
Xl as ChartIcon,
|
|
14807
|
+
Wl as CheckIcon,
|
|
14808
|
+
Ad as CheckoutDialog,
|
|
14809
14809
|
rt as ChevronDownIcon,
|
|
14810
|
-
|
|
14810
|
+
Rs as ChevronLeftIcon,
|
|
14811
14811
|
ma as ChevronRightIcon,
|
|
14812
14812
|
tr as CloseIcon,
|
|
14813
|
-
|
|
14813
|
+
jl as DEFAULT_FEATURE_LABELS,
|
|
14814
14814
|
Qn as DEFAULT_PLAN_FEATURES,
|
|
14815
14815
|
De as Dialog,
|
|
14816
14816
|
Fr as DownloadIcon,
|
|
14817
|
-
|
|
14817
|
+
xs as ENTERPRISE_CONTACT_URL,
|
|
14818
14818
|
pn as ExternalLinkIcon,
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14819
|
+
ed as GlobeIcon,
|
|
14820
|
+
Kl as InboxIcon,
|
|
14821
|
+
Hl as InfinityIcon,
|
|
14822
14822
|
tn as InfoTooltip,
|
|
14823
14823
|
jn as Input,
|
|
14824
|
-
|
|
14824
|
+
yu as InvoicesDialog,
|
|
14825
14825
|
er as LayersIcon,
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14829
|
-
|
|
14826
|
+
gu as LockIcon,
|
|
14827
|
+
bu as ManageAddonsDialog,
|
|
14828
|
+
Gl as MessageIcon,
|
|
14829
|
+
td as MinusIcon,
|
|
14830
14830
|
ra as NANO_DOLLARS_PER_DOLLAR,
|
|
14831
14831
|
Aa as OutdatedBillingGate,
|
|
14832
|
-
|
|
14832
|
+
_u as OutgrowFreeDialog,
|
|
14833
14833
|
Jn as PLAN_FEATURE_KEYS,
|
|
14834
14834
|
Ja as PLAN_ORDER,
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14835
|
+
ad as PaintIcon,
|
|
14836
|
+
vu as PaymentMethodDialog,
|
|
14837
|
+
fu as PendingUpgradeBanner,
|
|
14838
|
+
Dd as PendingUpgradeDialog,
|
|
14839
|
+
Iu as PlanBanner,
|
|
14840
|
+
ku as PlanSummaryCard,
|
|
14841
|
+
Au as PlanUsageWidget,
|
|
14842
|
+
Es as PlusIcon,
|
|
14843
|
+
$l as PuzzleIcon,
|
|
14844
|
+
hu as ReceiptIcon,
|
|
14845
|
+
sd as SegmentedControl,
|
|
14846
|
+
Vs as Select,
|
|
14847
14847
|
Lr as ShieldIcon,
|
|
14848
14848
|
pe as Skeleton,
|
|
14849
14849
|
Xn as SparkleIcon,
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14850
|
+
xd as Stepper,
|
|
14851
|
+
Yc as Switch,
|
|
14852
|
+
zc as USAGE_METRICS,
|
|
14853
|
+
bd as UpgradePlanDialog,
|
|
14854
|
+
Cu as UsageBanner,
|
|
14855
|
+
Nu as UsageDashboard,
|
|
14856
|
+
Hc as UsagePopover,
|
|
14857
|
+
xu as UsageRing,
|
|
14858
|
+
Ql as UsersIcon,
|
|
14859
|
+
zl as addDays,
|
|
14860
14860
|
ut as addonDisplayName,
|
|
14861
|
-
|
|
14861
|
+
Zl as addonLimitsPreview,
|
|
14862
14862
|
Hn as addonPrice,
|
|
14863
14863
|
Se as billingKeys,
|
|
14864
14864
|
q as cn,
|
|
14865
14865
|
Yn as conversationPackPrice,
|
|
14866
|
-
|
|
14866
|
+
Ps as conversationsAddon,
|
|
14867
14867
|
Wt as currencySymbol,
|
|
14868
|
-
|
|
14868
|
+
pu as featureLabel,
|
|
14869
14869
|
Xa as formatBytes,
|
|
14870
14870
|
oe as formatCurrency,
|
|
14871
14871
|
pa as formatDate,
|
|
14872
|
-
|
|
14872
|
+
Bl as formatDateTime,
|
|
14873
14873
|
ve as formatQuantity,
|
|
14874
14874
|
pt as formatUsage,
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14875
|
+
Ms as getCardElementStyle,
|
|
14876
|
+
Fs as getStripeAppearance,
|
|
14877
|
+
Ro as getStripePromise,
|
|
14878
14878
|
nr as iconForFeature,
|
|
14879
|
-
|
|
14879
|
+
Ei as isLegacyBillingVersion,
|
|
14880
14880
|
_e as planDisplayName,
|
|
14881
|
-
|
|
14881
|
+
ql as planEntitlements,
|
|
14882
14882
|
Ne as planKind,
|
|
14883
|
-
|
|
14883
|
+
Us as toStripeLocale,
|
|
14884
14884
|
Nn as usageItems,
|
|
14885
14885
|
lr as usageTier,
|
|
14886
14886
|
Ta as useAddons,
|
|
14887
|
-
|
|
14887
|
+
ds as useAutoRechargeSettings,
|
|
14888
14888
|
ee as useBilling,
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14889
|
+
ls as useBillingReadonly,
|
|
14890
|
+
Gi as useCancelPendingSubscriptionUpgrade,
|
|
14891
|
+
cs as useCreatePaymentMethodIntent,
|
|
14892
|
+
is as useCustomer,
|
|
14893
14893
|
Gn as useHasPendingUpgrade,
|
|
14894
|
-
|
|
14894
|
+
Bi as useInvoices,
|
|
14895
14895
|
Me as useIsAuthorized,
|
|
14896
|
-
|
|
14897
|
-
|
|
14896
|
+
Wi as usePayInvoice,
|
|
14897
|
+
os as usePaymentMethod,
|
|
14898
14898
|
Ye as usePlans,
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14899
|
+
qi as useSetAddons,
|
|
14900
|
+
ji as useSetAutoRechargeSettings,
|
|
14901
|
+
ps as useSetCustomer,
|
|
14902
|
+
us as useSetPaymentMethod,
|
|
14903
|
+
ms as useSetSubscription,
|
|
14904
14904
|
ze as useSubscription,
|
|
14905
|
-
|
|
14906
|
-
|
|
14905
|
+
ss as useSubscriptionPreview,
|
|
14906
|
+
Zi as useSupportsUsageByBot,
|
|
14907
14907
|
nt as useUsage,
|
|
14908
|
-
|
|
14908
|
+
Vi as useUsageByBot
|
|
14909
14909
|
};
|