@bpinternal/billing-ui 0.14.3 → 0.16.0
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.d.ts +17 -9
- package/dist/index.js +498 -494
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -905,10 +905,10 @@ class Ha extends sn {
|
|
|
905
905
|
W && W.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
906
906
|
}
|
|
907
907
|
let B = [];
|
|
908
|
-
const
|
|
909
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
910
|
-
for (let W = 0; W <
|
|
911
|
-
B.push(
|
|
908
|
+
const P = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
909
|
+
if (this.options.saveMissingTo === "fallback" && P && P[0])
|
|
910
|
+
for (let W = 0; W < P.length; W++)
|
|
911
|
+
B.push(P[W]);
|
|
912
912
|
else this.options.saveMissingTo === "all" ? B = this.languageUtils.toResolveHierarchy(a.lng || this.language) : B.push(a.lng || this.language);
|
|
913
913
|
const H = (W, X, D) => {
|
|
914
914
|
const ue = A && D !== h ? D : V;
|
|
@@ -3392,9 +3392,13 @@ Ln.use(Ho).init({
|
|
|
3392
3392
|
suffix: "}"
|
|
3393
3393
|
}
|
|
3394
3394
|
});
|
|
3395
|
-
const
|
|
3396
|
-
} };
|
|
3395
|
+
const Ai = /* @__PURE__ */ new Set(["v1", "v2", "v3"]);
|
|
3397
3396
|
function xi(t) {
|
|
3397
|
+
return Ai.has(t);
|
|
3398
|
+
}
|
|
3399
|
+
const on = qr(null), Pi = { capture: () => {
|
|
3400
|
+
} };
|
|
3401
|
+
function Di(t) {
|
|
3398
3402
|
const [e, a] = J(
|
|
3399
3403
|
() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
3400
3404
|
);
|
|
@@ -3405,7 +3409,7 @@ function xi(t) {
|
|
|
3405
3409
|
return n.addEventListener("change", r), () => n.removeEventListener("change", r);
|
|
3406
3410
|
}, [t]), t === "system" ? e : t === "dark";
|
|
3407
3411
|
}
|
|
3408
|
-
const
|
|
3412
|
+
const Yc = ({
|
|
3409
3413
|
client: t,
|
|
3410
3414
|
stripePublishableKey: e,
|
|
3411
3415
|
email: a,
|
|
@@ -3425,7 +3429,7 @@ const $c = ({
|
|
|
3425
3429
|
}) => {
|
|
3426
3430
|
const _ = u || "default", [v] = J(
|
|
3427
3431
|
() => new yo({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
|
|
3428
|
-
), N =
|
|
3432
|
+
), N = Di(r), S = Re(() => Ao(e), [e]);
|
|
3429
3433
|
Oe(() => {
|
|
3430
3434
|
if (!m || typeof window > "u")
|
|
3431
3435
|
return;
|
|
@@ -3463,9 +3467,9 @@ const $c = ({
|
|
|
3463
3467
|
colorScheme: s,
|
|
3464
3468
|
toast: o ?? (() => {
|
|
3465
3469
|
}),
|
|
3466
|
-
analytics: i ??
|
|
3470
|
+
analytics: i ?? Pi,
|
|
3467
3471
|
featureLabels: d,
|
|
3468
|
-
isOutdatedBilling: c !== void 0 && c
|
|
3472
|
+
isOutdatedBilling: c !== void 0 && xi(c),
|
|
3469
3473
|
manageBillingUrl: h,
|
|
3470
3474
|
refetchInterval: k,
|
|
3471
3475
|
refresh: T,
|
|
@@ -3507,11 +3511,11 @@ function ne() {
|
|
|
3507
3511
|
throw new Error("@bpinternal/billing-ui components must be rendered inside <BillingProvider>");
|
|
3508
3512
|
return t;
|
|
3509
3513
|
}
|
|
3510
|
-
function
|
|
3514
|
+
function Ri() {
|
|
3511
3515
|
var t;
|
|
3512
3516
|
return ((t = Ta(on)) == null ? void 0 : t.isDark) ?? !1;
|
|
3513
3517
|
}
|
|
3514
|
-
function
|
|
3518
|
+
function Ei() {
|
|
3515
3519
|
var t;
|
|
3516
3520
|
return ((t = Ta(on)) == null ? void 0 : t.colorScheme) ?? "default";
|
|
3517
3521
|
}
|
|
@@ -3539,7 +3543,7 @@ const we = {
|
|
|
3539
3543
|
// Auto-recharge settings (AutoRechargeCard)
|
|
3540
3544
|
AUTO_RECHARGE_UPDATED: "billing_auto_recharge_updated"
|
|
3541
3545
|
};
|
|
3542
|
-
function
|
|
3546
|
+
function Li(t) {
|
|
3543
3547
|
return typeof t == "object" && t !== null && t.code === 403;
|
|
3544
3548
|
}
|
|
3545
3549
|
const Ie = {
|
|
@@ -3578,7 +3582,7 @@ function $e(t) {
|
|
|
3578
3582
|
a
|
|
3579
3583
|
);
|
|
3580
3584
|
}
|
|
3581
|
-
function
|
|
3585
|
+
function Jc() {
|
|
3582
3586
|
const { client: t, queryClient: e, scope: a } = ne(), { data: n, error: r } = Ve(
|
|
3583
3587
|
{
|
|
3584
3588
|
queryKey: Ie.subscription(a),
|
|
@@ -3587,7 +3591,7 @@ function Hc() {
|
|
|
3587
3591
|
},
|
|
3588
3592
|
e
|
|
3589
3593
|
);
|
|
3590
|
-
return r ?
|
|
3594
|
+
return r ? Li(r) ? !1 : r : n ? !0 : void 0;
|
|
3591
3595
|
}
|
|
3592
3596
|
function ns(t, e) {
|
|
3593
3597
|
const { client: a, queryClient: n, scope: r } = ne();
|
|
@@ -3622,7 +3626,7 @@ function ss(t) {
|
|
|
3622
3626
|
a
|
|
3623
3627
|
);
|
|
3624
3628
|
}
|
|
3625
|
-
function
|
|
3629
|
+
function Oi(t) {
|
|
3626
3630
|
const { client: e, queryClient: a, scope: n, refetchInterval: r } = ne();
|
|
3627
3631
|
return Ve(
|
|
3628
3632
|
{
|
|
@@ -3656,7 +3660,7 @@ function is(t) {
|
|
|
3656
3660
|
a
|
|
3657
3661
|
);
|
|
3658
3662
|
}
|
|
3659
|
-
function
|
|
3663
|
+
function Fi() {
|
|
3660
3664
|
const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = ne();
|
|
3661
3665
|
return Jt(
|
|
3662
3666
|
{
|
|
@@ -3681,7 +3685,7 @@ function Xt(t) {
|
|
|
3681
3685
|
a
|
|
3682
3686
|
);
|
|
3683
3687
|
}
|
|
3684
|
-
function
|
|
3688
|
+
function Mi(t, e) {
|
|
3685
3689
|
const { client: a, queryClient: n, scope: r, refetchInterval: s } = ne(), o = a.breakDownWorkspaceUsageByBot, i = a.listBots, d = typeof o == "function" && typeof i == "function", c = e != null && e.period ? new Date(e.period) : /* @__PURE__ */ new Date(), u = `${c.getUTCFullYear()}-${String(c.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
3686
3690
|
return Ve(
|
|
3687
3691
|
{
|
|
@@ -3699,7 +3703,7 @@ function Oi(t, e) {
|
|
|
3699
3703
|
n
|
|
3700
3704
|
);
|
|
3701
3705
|
}
|
|
3702
|
-
function
|
|
3706
|
+
function Bi() {
|
|
3703
3707
|
const { client: t } = ne();
|
|
3704
3708
|
return typeof t.breakDownWorkspaceUsageByBot == "function" && typeof t.listBots == "function";
|
|
3705
3709
|
}
|
|
@@ -3731,7 +3735,7 @@ function cs() {
|
|
|
3731
3735
|
e
|
|
3732
3736
|
);
|
|
3733
3737
|
}
|
|
3734
|
-
function
|
|
3738
|
+
function Ui() {
|
|
3735
3739
|
const { client: t, queryClient: e, scope: a, notifyBillingChange: n } = ne();
|
|
3736
3740
|
return Jt(
|
|
3737
3741
|
{
|
|
@@ -3777,40 +3781,40 @@ function ps(t) {
|
|
|
3777
3781
|
} else for (a in t) t[a] && (n && (n += " "), n += a);
|
|
3778
3782
|
return n;
|
|
3779
3783
|
}
|
|
3780
|
-
function
|
|
3784
|
+
function zi() {
|
|
3781
3785
|
for (var t, e, a = 0, n = "", r = arguments.length; a < r; a++) (t = arguments[a]) && (e = ps(t)) && (n && (n += " "), n += e);
|
|
3782
3786
|
return n;
|
|
3783
3787
|
}
|
|
3784
|
-
const
|
|
3788
|
+
const ji = (t, e) => {
|
|
3785
3789
|
const a = new Array(t.length + e.length);
|
|
3786
3790
|
for (let n = 0; n < t.length; n++)
|
|
3787
3791
|
a[n] = t[n];
|
|
3788
3792
|
for (let n = 0; n < e.length; n++)
|
|
3789
3793
|
a[t.length + n] = e[n];
|
|
3790
3794
|
return a;
|
|
3791
|
-
},
|
|
3795
|
+
}, Vi = (t, e) => ({
|
|
3792
3796
|
classGroupId: t,
|
|
3793
3797
|
validator: e
|
|
3794
3798
|
}), ms = (t = /* @__PURE__ */ new Map(), e = null, a) => ({
|
|
3795
3799
|
nextPart: t,
|
|
3796
3800
|
validators: e,
|
|
3797
3801
|
classGroupId: a
|
|
3798
|
-
}), Ya = "-", Sr = [],
|
|
3799
|
-
const e =
|
|
3802
|
+
}), Ya = "-", Sr = [], Zi = "arbitrary..", qi = (t) => {
|
|
3803
|
+
const e = Gi(t), {
|
|
3800
3804
|
conflictingClassGroups: a,
|
|
3801
3805
|
conflictingClassGroupModifiers: n
|
|
3802
3806
|
} = t;
|
|
3803
3807
|
return {
|
|
3804
3808
|
getClassGroupId: (o) => {
|
|
3805
3809
|
if (o.startsWith("[") && o.endsWith("]"))
|
|
3806
|
-
return
|
|
3810
|
+
return Wi(o);
|
|
3807
3811
|
const i = o.split(Ya), d = i[0] === "" && i.length > 1 ? 1 : 0;
|
|
3808
3812
|
return hs(i, d, e);
|
|
3809
3813
|
},
|
|
3810
3814
|
getConflictingClassGroupIds: (o, i) => {
|
|
3811
3815
|
if (i) {
|
|
3812
3816
|
const d = n[o], c = a[o];
|
|
3813
|
-
return d ? c ?
|
|
3817
|
+
return d ? c ? ji(c, d) : d : c || Sr;
|
|
3814
3818
|
}
|
|
3815
3819
|
return a[o] || Sr;
|
|
3816
3820
|
}
|
|
@@ -3832,16 +3836,16 @@ const Ui = (t, e) => {
|
|
|
3832
3836
|
if (u.validator(i))
|
|
3833
3837
|
return u.classGroupId;
|
|
3834
3838
|
}
|
|
3835
|
-
},
|
|
3839
|
+
}, Wi = (t) => t.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
3836
3840
|
const e = t.slice(1, -1), a = e.indexOf(":"), n = e.slice(0, a);
|
|
3837
|
-
return n ?
|
|
3838
|
-
})(),
|
|
3841
|
+
return n ? Zi + n : void 0;
|
|
3842
|
+
})(), Gi = (t) => {
|
|
3839
3843
|
const {
|
|
3840
3844
|
theme: e,
|
|
3841
3845
|
classGroups: a
|
|
3842
3846
|
} = t;
|
|
3843
|
-
return
|
|
3844
|
-
},
|
|
3847
|
+
return Ki(a, e);
|
|
3848
|
+
}, Ki = (t, e) => {
|
|
3845
3849
|
const a = ms();
|
|
3846
3850
|
for (const n in t) {
|
|
3847
3851
|
const r = t[n];
|
|
@@ -3852,28 +3856,28 @@ const Ui = (t, e) => {
|
|
|
3852
3856
|
const r = t.length;
|
|
3853
3857
|
for (let s = 0; s < r; s++) {
|
|
3854
3858
|
const o = t[s];
|
|
3855
|
-
|
|
3859
|
+
$i(o, e, a, n);
|
|
3856
3860
|
}
|
|
3857
|
-
},
|
|
3861
|
+
}, $i = (t, e, a, n) => {
|
|
3858
3862
|
if (typeof t == "string") {
|
|
3859
|
-
|
|
3863
|
+
Hi(t, e, a);
|
|
3860
3864
|
return;
|
|
3861
3865
|
}
|
|
3862
3866
|
if (typeof t == "function") {
|
|
3863
|
-
|
|
3867
|
+
Yi(t, e, a, n);
|
|
3864
3868
|
return;
|
|
3865
3869
|
}
|
|
3866
|
-
|
|
3867
|
-
},
|
|
3870
|
+
Ji(t, e, a, n);
|
|
3871
|
+
}, Hi = (t, e, a) => {
|
|
3868
3872
|
const n = t === "" ? e : gs(e, t);
|
|
3869
3873
|
n.classGroupId = a;
|
|
3870
|
-
},
|
|
3871
|
-
if (
|
|
3874
|
+
}, Yi = (t, e, a, n) => {
|
|
3875
|
+
if (Qi(t)) {
|
|
3872
3876
|
Zn(t(n), e, a, n);
|
|
3873
3877
|
return;
|
|
3874
3878
|
}
|
|
3875
|
-
e.validators === null && (e.validators = []), e.validators.push(
|
|
3876
|
-
},
|
|
3879
|
+
e.validators === null && (e.validators = []), e.validators.push(Vi(a, t));
|
|
3880
|
+
}, Ji = (t, e, a, n) => {
|
|
3877
3881
|
const r = Object.entries(t), s = r.length;
|
|
3878
3882
|
for (let o = 0; o < s; o++) {
|
|
3879
3883
|
const [i, d] = r[o];
|
|
@@ -3888,7 +3892,7 @@ const Ui = (t, e) => {
|
|
|
3888
3892
|
i || (i = ms(), a.nextPart.set(o, i)), a = i;
|
|
3889
3893
|
}
|
|
3890
3894
|
return a;
|
|
3891
|
-
},
|
|
3895
|
+
}, Qi = (t) => "isThemeGetter" in t && t.isThemeGetter === !0, Xi = (t) => {
|
|
3892
3896
|
if (t < 1)
|
|
3893
3897
|
return {
|
|
3894
3898
|
get: () => {
|
|
@@ -3912,13 +3916,13 @@ const Ui = (t, e) => {
|
|
|
3912
3916
|
s in a ? a[s] = o : r(s, o);
|
|
3913
3917
|
}
|
|
3914
3918
|
};
|
|
3915
|
-
}, On = "!", kr = ":",
|
|
3919
|
+
}, On = "!", kr = ":", el = [], wr = (t, e, a, n, r) => ({
|
|
3916
3920
|
modifiers: t,
|
|
3917
3921
|
hasImportantModifier: e,
|
|
3918
3922
|
baseClassName: a,
|
|
3919
3923
|
maybePostfixModifierPosition: n,
|
|
3920
3924
|
isExternal: r
|
|
3921
|
-
}),
|
|
3925
|
+
}), tl = (t) => {
|
|
3922
3926
|
const {
|
|
3923
3927
|
prefix: e,
|
|
3924
3928
|
experimentalParseClassName: a
|
|
@@ -3955,7 +3959,7 @@ const Ui = (t, e) => {
|
|
|
3955
3959
|
};
|
|
3956
3960
|
if (e) {
|
|
3957
3961
|
const r = e + kr, s = n;
|
|
3958
|
-
n = (o) => o.startsWith(r) ? s(o.slice(r.length)) : wr(
|
|
3962
|
+
n = (o) => o.startsWith(r) ? s(o.slice(r.length)) : wr(el, !1, o, void 0, !0);
|
|
3959
3963
|
}
|
|
3960
3964
|
if (a) {
|
|
3961
3965
|
const r = n;
|
|
@@ -3965,7 +3969,7 @@ const Ui = (t, e) => {
|
|
|
3965
3969
|
});
|
|
3966
3970
|
}
|
|
3967
3971
|
return n;
|
|
3968
|
-
},
|
|
3972
|
+
}, al = (t) => {
|
|
3969
3973
|
const e = /* @__PURE__ */ new Map();
|
|
3970
3974
|
return t.orderSensitiveModifiers.forEach((a, n) => {
|
|
3971
3975
|
e.set(a, 1e6 + n);
|
|
@@ -3978,26 +3982,26 @@ const Ui = (t, e) => {
|
|
|
3978
3982
|
}
|
|
3979
3983
|
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
3980
3984
|
};
|
|
3981
|
-
},
|
|
3982
|
-
cache:
|
|
3983
|
-
parseClassName:
|
|
3984
|
-
sortModifiers:
|
|
3985
|
-
postfixLookupClassGroupIds:
|
|
3986
|
-
...
|
|
3987
|
-
}),
|
|
3985
|
+
}, nl = (t) => ({
|
|
3986
|
+
cache: Xi(t.cacheSize),
|
|
3987
|
+
parseClassName: tl(t),
|
|
3988
|
+
sortModifiers: al(t),
|
|
3989
|
+
postfixLookupClassGroupIds: rl(t),
|
|
3990
|
+
...qi(t)
|
|
3991
|
+
}), rl = (t) => {
|
|
3988
3992
|
const e = /* @__PURE__ */ Object.create(null), a = t.postfixLookupClassGroups;
|
|
3989
3993
|
if (a)
|
|
3990
3994
|
for (let n = 0; n < a.length; n++)
|
|
3991
3995
|
e[a[n]] = !0;
|
|
3992
3996
|
return e;
|
|
3993
|
-
},
|
|
3997
|
+
}, sl = /\s+/, ol = (t, e) => {
|
|
3994
3998
|
const {
|
|
3995
3999
|
parseClassName: a,
|
|
3996
4000
|
getClassGroupId: n,
|
|
3997
4001
|
getConflictingClassGroupIds: r,
|
|
3998
4002
|
sortModifiers: s,
|
|
3999
4003
|
postfixLookupClassGroupIds: o
|
|
4000
|
-
} = e, i = [], d = t.trim().split(
|
|
4004
|
+
} = e, i = [], d = t.trim().split(sl);
|
|
4001
4005
|
let c = "";
|
|
4002
4006
|
for (let u = d.length - 1; u >= 0; u -= 1) {
|
|
4003
4007
|
const m = d[u], {
|
|
@@ -4042,7 +4046,7 @@ const Ui = (t, e) => {
|
|
|
4042
4046
|
c = m + (c.length > 0 ? " " + c : c);
|
|
4043
4047
|
}
|
|
4044
4048
|
return c;
|
|
4045
|
-
},
|
|
4049
|
+
}, il = (...t) => {
|
|
4046
4050
|
let e = 0, a, n, r = "";
|
|
4047
4051
|
for (; e < t.length; )
|
|
4048
4052
|
(a = t[e++]) && (n = bs(a)) && (r && (r += " "), r += n);
|
|
@@ -4054,34 +4058,34 @@ const Ui = (t, e) => {
|
|
|
4054
4058
|
for (let n = 0; n < t.length; n++)
|
|
4055
4059
|
t[n] && (e = bs(t[n])) && (a && (a += " "), a += e);
|
|
4056
4060
|
return a;
|
|
4057
|
-
},
|
|
4061
|
+
}, ll = (t, ...e) => {
|
|
4058
4062
|
let a, n, r, s;
|
|
4059
4063
|
const o = (d) => {
|
|
4060
4064
|
const c = e.reduce((u, m) => m(u), t());
|
|
4061
|
-
return a =
|
|
4065
|
+
return a = nl(c), n = a.cache.get, r = a.cache.set, s = i, i(d);
|
|
4062
4066
|
}, i = (d) => {
|
|
4063
4067
|
const c = n(d);
|
|
4064
4068
|
if (c)
|
|
4065
4069
|
return c;
|
|
4066
|
-
const u =
|
|
4070
|
+
const u = ol(d, a);
|
|
4067
4071
|
return r(d, u), u;
|
|
4068
4072
|
};
|
|
4069
|
-
return s = o, (...d) => s(
|
|
4070
|
-
},
|
|
4071
|
-
const e = (a) => a[t] ||
|
|
4073
|
+
return s = o, (...d) => s(il(...d));
|
|
4074
|
+
}, dl = [], Ae = (t) => {
|
|
4075
|
+
const e = (a) => a[t] || dl;
|
|
4072
4076
|
return e.isThemeGetter = !0, e;
|
|
4073
|
-
}, fs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ys = /^\((?:(\w[\w-]*):)?(.+)\)$/i,
|
|
4077
|
+
}, fs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ys = /^\((?:(\w[\w-]*):)?(.+)\)$/i, cl = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, ul = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, pl = /\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$/, ml = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, hl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, gl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ht = (t) => cl.test(t), ie = (t) => !!t && !Number.isNaN(Number(t)), Ye = (t) => !!t && Number.isInteger(Number(t)), Tn = (t) => t.endsWith("%") && ie(t.slice(0, -1)), it = (t) => ul.test(t), vs = () => !0, bl = (t) => (
|
|
4074
4078
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
4075
4079
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
4076
4080
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4077
|
-
|
|
4078
|
-
), qn = () => !1,
|
|
4081
|
+
pl.test(t) && !ml.test(t)
|
|
4082
|
+
), qn = () => !1, fl = (t) => hl.test(t), yl = (t) => gl.test(t), vl = (t) => !U(t) && !z(t), _l = (t) => t.startsWith("@container") && (t[10] === "/" && t[11] !== void 0 || t[11] === "s" && t[16] !== void 0 && t.startsWith("-size/", 10) || t[11] === "n" && t[18] !== void 0 && t.startsWith("-normal/", 10)), Nl = (t) => St(t, Cs, qn), U = (t) => fs.test(t), wt = (t) => St(t, Ss, bl), Tr = (t) => St(t, xl, ie), Cl = (t) => St(t, ws, vs), Sl = (t) => St(t, ks, qn), Ir = (t) => St(t, _s, qn), kl = (t) => St(t, Ns, yl), Fa = (t) => St(t, Ts, fl), z = (t) => ys.test(t), la = (t) => Dt(t, Ss), wl = (t) => Dt(t, ks), Ar = (t) => Dt(t, _s), Tl = (t) => Dt(t, Cs), Il = (t) => Dt(t, Ns), Ma = (t) => Dt(t, Ts, !0), Al = (t) => Dt(t, ws, !0), St = (t, e, a) => {
|
|
4079
4083
|
const n = fs.exec(t);
|
|
4080
4084
|
return n ? n[1] ? e(n[1]) : a(n[2]) : !1;
|
|
4081
4085
|
}, Dt = (t, e, a = !1) => {
|
|
4082
4086
|
const n = ys.exec(t);
|
|
4083
4087
|
return n ? n[1] ? e(n[1]) : a : !1;
|
|
4084
|
-
}, _s = (t) => t === "position" || t === "percentage", Ns = (t) => t === "image" || t === "url", Cs = (t) => t === "length" || t === "size" || t === "bg-size", Ss = (t) => t === "length",
|
|
4088
|
+
}, _s = (t) => t === "position" || t === "percentage", Ns = (t) => t === "image" || t === "url", Cs = (t) => t === "length" || t === "size" || t === "bg-size", Ss = (t) => t === "length", xl = (t) => t === "number", ks = (t) => t === "family-name", ws = (t) => t === "number" || t === "weight", Ts = (t) => t === "shadow", Pl = () => {
|
|
4085
4089
|
const t = Ae("color"), e = Ae("font"), a = Ae("text"), n = Ae("font-weight"), r = Ae("tracking"), s = Ae("leading"), o = Ae("breakpoint"), i = Ae("container"), d = Ae("spacing"), c = Ae("radius"), u = Ae("shadow"), m = Ae("inset-shadow"), h = Ae("text-shadow"), g = Ae("drop-shadow"), b = Ae("blur"), C = Ae("perspective"), _ = Ae("aspect"), v = Ae("ease"), N = Ae("animate"), S = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], T = () => [
|
|
4086
4090
|
"center",
|
|
4087
4091
|
"top",
|
|
@@ -4102,11 +4106,11 @@ const Ui = (t, e) => {
|
|
|
4102
4106
|
"left-bottom"
|
|
4103
4107
|
], I = () => [...T(), z, U], k = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", "contain", "none"], w = () => [z, U, d], E = () => [ht, "full", "auto", ...w()], L = () => [Ye, "none", "subgrid", z, U], O = () => ["auto", {
|
|
4104
4108
|
span: ["full", Ye, z, U]
|
|
4105
|
-
}, Ye, z, U], Z = () => [Ye, "auto", z, U], V = () => ["auto", "min", "max", "fr", z, U], $ = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], B = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"],
|
|
4109
|
+
}, Ye, z, U], Z = () => [Ye, "auto", z, U], V = () => ["auto", "min", "max", "fr", z, U], $ = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], B = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...w()], H = () => [ht, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...w()], W = () => [ht, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...w()], X = () => [ht, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...w()], D = () => [t, z, U], ue = () => [...T(), Ar, Ir, {
|
|
4106
4110
|
position: [z, U]
|
|
4107
4111
|
}], ee = () => ["no-repeat", {
|
|
4108
4112
|
repeat: ["", "x", "y", "space", "round"]
|
|
4109
|
-
}], ce = () => ["auto", "cover", "contain",
|
|
4113
|
+
}], ce = () => ["auto", "cover", "contain", Tl, Nl, {
|
|
4110
4114
|
size: [z, U]
|
|
4111
4115
|
}], M = () => [Tn, la, wt], K = () => [
|
|
4112
4116
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -4116,14 +4120,14 @@ const Ui = (t, e) => {
|
|
|
4116
4120
|
c,
|
|
4117
4121
|
z,
|
|
4118
4122
|
U
|
|
4119
|
-
], G = () => ["", ie, la, wt],
|
|
4123
|
+
], G = () => ["", ie, la, wt], x = () => ["solid", "dashed", "dotted", "double"], be = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], te = () => [ie, Tn, Ar, Ir], de = () => [
|
|
4120
4124
|
// Deprecated since Tailwind CSS v4.0.0
|
|
4121
4125
|
"",
|
|
4122
4126
|
"none",
|
|
4123
4127
|
b,
|
|
4124
4128
|
z,
|
|
4125
4129
|
U
|
|
4126
|
-
],
|
|
4130
|
+
], me = () => ["none", ie, z, U], ae = () => ["none", ie, z, U], fe = () => [ie, z, U], se = () => [ht, "full", ...w()];
|
|
4127
4131
|
return {
|
|
4128
4132
|
cacheSize: 500,
|
|
4129
4133
|
theme: {
|
|
@@ -4135,7 +4139,7 @@ const Ui = (t, e) => {
|
|
|
4135
4139
|
container: [it],
|
|
4136
4140
|
"drop-shadow": [it],
|
|
4137
4141
|
ease: ["in", "out", "in-out"],
|
|
4138
|
-
font: [
|
|
4142
|
+
font: [vl],
|
|
4139
4143
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
4140
4144
|
"inset-shadow": [it],
|
|
4141
4145
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -4175,7 +4179,7 @@ const Ui = (t, e) => {
|
|
|
4175
4179
|
* Container Name
|
|
4176
4180
|
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
4177
4181
|
*/
|
|
4178
|
-
"container-named": [
|
|
4182
|
+
"container-named": [_l],
|
|
4179
4183
|
/**
|
|
4180
4184
|
* Columns
|
|
4181
4185
|
* @see https://tailwindcss.com/docs/columns
|
|
@@ -4709,77 +4713,77 @@ const Ui = (t, e) => {
|
|
|
4709
4713
|
* @see https://tailwindcss.com/docs/margin
|
|
4710
4714
|
*/
|
|
4711
4715
|
m: [{
|
|
4712
|
-
m:
|
|
4716
|
+
m: P()
|
|
4713
4717
|
}],
|
|
4714
4718
|
/**
|
|
4715
4719
|
* Margin Inline
|
|
4716
4720
|
* @see https://tailwindcss.com/docs/margin
|
|
4717
4721
|
*/
|
|
4718
4722
|
mx: [{
|
|
4719
|
-
mx:
|
|
4723
|
+
mx: P()
|
|
4720
4724
|
}],
|
|
4721
4725
|
/**
|
|
4722
4726
|
* Margin Block
|
|
4723
4727
|
* @see https://tailwindcss.com/docs/margin
|
|
4724
4728
|
*/
|
|
4725
4729
|
my: [{
|
|
4726
|
-
my:
|
|
4730
|
+
my: P()
|
|
4727
4731
|
}],
|
|
4728
4732
|
/**
|
|
4729
4733
|
* Margin Inline Start
|
|
4730
4734
|
* @see https://tailwindcss.com/docs/margin
|
|
4731
4735
|
*/
|
|
4732
4736
|
ms: [{
|
|
4733
|
-
ms:
|
|
4737
|
+
ms: P()
|
|
4734
4738
|
}],
|
|
4735
4739
|
/**
|
|
4736
4740
|
* Margin Inline End
|
|
4737
4741
|
* @see https://tailwindcss.com/docs/margin
|
|
4738
4742
|
*/
|
|
4739
4743
|
me: [{
|
|
4740
|
-
me:
|
|
4744
|
+
me: P()
|
|
4741
4745
|
}],
|
|
4742
4746
|
/**
|
|
4743
4747
|
* Margin Block Start
|
|
4744
4748
|
* @see https://tailwindcss.com/docs/margin
|
|
4745
4749
|
*/
|
|
4746
4750
|
mbs: [{
|
|
4747
|
-
mbs:
|
|
4751
|
+
mbs: P()
|
|
4748
4752
|
}],
|
|
4749
4753
|
/**
|
|
4750
4754
|
* Margin Block End
|
|
4751
4755
|
* @see https://tailwindcss.com/docs/margin
|
|
4752
4756
|
*/
|
|
4753
4757
|
mbe: [{
|
|
4754
|
-
mbe:
|
|
4758
|
+
mbe: P()
|
|
4755
4759
|
}],
|
|
4756
4760
|
/**
|
|
4757
4761
|
* Margin Top
|
|
4758
4762
|
* @see https://tailwindcss.com/docs/margin
|
|
4759
4763
|
*/
|
|
4760
4764
|
mt: [{
|
|
4761
|
-
mt:
|
|
4765
|
+
mt: P()
|
|
4762
4766
|
}],
|
|
4763
4767
|
/**
|
|
4764
4768
|
* Margin Right
|
|
4765
4769
|
* @see https://tailwindcss.com/docs/margin
|
|
4766
4770
|
*/
|
|
4767
4771
|
mr: [{
|
|
4768
|
-
mr:
|
|
4772
|
+
mr: P()
|
|
4769
4773
|
}],
|
|
4770
4774
|
/**
|
|
4771
4775
|
* Margin Bottom
|
|
4772
4776
|
* @see https://tailwindcss.com/docs/margin
|
|
4773
4777
|
*/
|
|
4774
4778
|
mb: [{
|
|
4775
|
-
mb:
|
|
4779
|
+
mb: P()
|
|
4776
4780
|
}],
|
|
4777
4781
|
/**
|
|
4778
4782
|
* Margin Left
|
|
4779
4783
|
* @see https://tailwindcss.com/docs/margin
|
|
4780
4784
|
*/
|
|
4781
4785
|
ml: [{
|
|
4782
|
-
ml:
|
|
4786
|
+
ml: P()
|
|
4783
4787
|
}],
|
|
4784
4788
|
/**
|
|
4785
4789
|
* Space Between X
|
|
@@ -4941,7 +4945,7 @@ const Ui = (t, e) => {
|
|
|
4941
4945
|
* @see https://tailwindcss.com/docs/font-weight
|
|
4942
4946
|
*/
|
|
4943
4947
|
"font-weight": [{
|
|
4944
|
-
font: [n,
|
|
4948
|
+
font: [n, Al, Cl]
|
|
4945
4949
|
}],
|
|
4946
4950
|
/**
|
|
4947
4951
|
* Font Stretch
|
|
@@ -4955,7 +4959,7 @@ const Ui = (t, e) => {
|
|
|
4955
4959
|
* @see https://tailwindcss.com/docs/font-family
|
|
4956
4960
|
*/
|
|
4957
4961
|
"font-family": [{
|
|
4958
|
-
font: [
|
|
4962
|
+
font: [wl, Sl, e]
|
|
4959
4963
|
}],
|
|
4960
4964
|
/**
|
|
4961
4965
|
* Font Feature Settings
|
|
@@ -5072,7 +5076,7 @@ const Ui = (t, e) => {
|
|
|
5072
5076
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
5073
5077
|
*/
|
|
5074
5078
|
"text-decoration-style": [{
|
|
5075
|
-
decoration: [...
|
|
5079
|
+
decoration: [...x(), "wavy"]
|
|
5076
5080
|
}],
|
|
5077
5081
|
/**
|
|
5078
5082
|
* Text Decoration Thickness
|
|
@@ -5224,7 +5228,7 @@ const Ui = (t, e) => {
|
|
|
5224
5228
|
}, Ye, z, U],
|
|
5225
5229
|
radial: ["", z, U],
|
|
5226
5230
|
conic: [Ye, z, U]
|
|
5227
|
-
},
|
|
5231
|
+
}, Il, kl]
|
|
5228
5232
|
}],
|
|
5229
5233
|
/**
|
|
5230
5234
|
* Background Color
|
|
@@ -5489,14 +5493,14 @@ const Ui = (t, e) => {
|
|
|
5489
5493
|
* @see https://tailwindcss.com/docs/border-style
|
|
5490
5494
|
*/
|
|
5491
5495
|
"border-style": [{
|
|
5492
|
-
border: [...
|
|
5496
|
+
border: [...x(), "hidden", "none"]
|
|
5493
5497
|
}],
|
|
5494
5498
|
/**
|
|
5495
5499
|
* Divide Style
|
|
5496
5500
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
5497
5501
|
*/
|
|
5498
5502
|
"divide-style": [{
|
|
5499
|
-
divide: [...
|
|
5503
|
+
divide: [...x(), "hidden", "none"]
|
|
5500
5504
|
}],
|
|
5501
5505
|
/**
|
|
5502
5506
|
* Border Color
|
|
@@ -5587,7 +5591,7 @@ const Ui = (t, e) => {
|
|
|
5587
5591
|
* @see https://tailwindcss.com/docs/outline-style
|
|
5588
5592
|
*/
|
|
5589
5593
|
"outline-style": [{
|
|
5590
|
-
outline: [...
|
|
5594
|
+
outline: [...x(), "none", "hidden"]
|
|
5591
5595
|
}],
|
|
5592
5596
|
/**
|
|
5593
5597
|
* Outline Offset
|
|
@@ -6220,28 +6224,28 @@ const Ui = (t, e) => {
|
|
|
6220
6224
|
* @see https://tailwindcss.com/docs/rotate
|
|
6221
6225
|
*/
|
|
6222
6226
|
rotate: [{
|
|
6223
|
-
rotate:
|
|
6227
|
+
rotate: me()
|
|
6224
6228
|
}],
|
|
6225
6229
|
/**
|
|
6226
6230
|
* Rotate X
|
|
6227
6231
|
* @see https://tailwindcss.com/docs/rotate
|
|
6228
6232
|
*/
|
|
6229
6233
|
"rotate-x": [{
|
|
6230
|
-
"rotate-x":
|
|
6234
|
+
"rotate-x": me()
|
|
6231
6235
|
}],
|
|
6232
6236
|
/**
|
|
6233
6237
|
* Rotate Y
|
|
6234
6238
|
* @see https://tailwindcss.com/docs/rotate
|
|
6235
6239
|
*/
|
|
6236
6240
|
"rotate-y": [{
|
|
6237
|
-
"rotate-y":
|
|
6241
|
+
"rotate-y": me()
|
|
6238
6242
|
}],
|
|
6239
6243
|
/**
|
|
6240
6244
|
* Rotate Z
|
|
6241
6245
|
* @see https://tailwindcss.com/docs/rotate
|
|
6242
6246
|
*/
|
|
6243
6247
|
"rotate-z": [{
|
|
6244
|
-
"rotate-z":
|
|
6248
|
+
"rotate-z": me()
|
|
6245
6249
|
}],
|
|
6246
6250
|
/**
|
|
6247
6251
|
* Scale
|
|
@@ -6766,9 +6770,9 @@ const Ui = (t, e) => {
|
|
|
6766
6770
|
postfixLookupClassGroups: ["container-type"],
|
|
6767
6771
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
6768
6772
|
};
|
|
6769
|
-
},
|
|
6773
|
+
}, Dl = /* @__PURE__ */ ll(Pl);
|
|
6770
6774
|
function j(...t) {
|
|
6771
|
-
return
|
|
6775
|
+
return Dl(zi(t));
|
|
6772
6776
|
}
|
|
6773
6777
|
function le(t, e = "usd", a = 2, n = "en-US") {
|
|
6774
6778
|
return new Intl.NumberFormat(n, {
|
|
@@ -6781,7 +6785,7 @@ function le(t, e = "usd", a = 2, n = "en-US") {
|
|
|
6781
6785
|
function ct(t, e = "en-US") {
|
|
6782
6786
|
return new Date(t).toLocaleDateString(e, { month: "short", day: "numeric", year: "numeric" });
|
|
6783
6787
|
}
|
|
6784
|
-
function
|
|
6788
|
+
function Rl(t, e) {
|
|
6785
6789
|
const a = new Date(t);
|
|
6786
6790
|
return a.setDate(a.getDate() + e), a.toISOString();
|
|
6787
6791
|
}
|
|
@@ -6803,7 +6807,7 @@ function Ne(t) {
|
|
|
6803
6807
|
function za(t) {
|
|
6804
6808
|
return { usd: "$", eur: "€", gbp: "£", cad: "$", aud: "$", jpy: "¥" }[t.toLowerCase()] ?? `${t.toUpperCase()} `;
|
|
6805
6809
|
}
|
|
6806
|
-
const tt = 1e9,
|
|
6810
|
+
const tt = 1e9, El = {
|
|
6807
6811
|
incoming_messages_events: (t) => `${ve(t)} incoming messages & events`,
|
|
6808
6812
|
conversation_sessions: (t) => `${ve(t)} conversation sessions`,
|
|
6809
6813
|
table_rows: (t) => `${ve(t)} table rows`,
|
|
@@ -6815,11 +6819,11 @@ const tt = 1e9, Dl = {
|
|
|
6815
6819
|
ai_spend: (t) => `${le(t / tt, "usd", 0)} AI credit included`,
|
|
6816
6820
|
always_alive: (t) => t === 1 ? "1 always-alive bot" : `${ve(t)} always-alive bots`
|
|
6817
6821
|
};
|
|
6818
|
-
function
|
|
6819
|
-
const n = (a == null ? void 0 : a[t]) ??
|
|
6822
|
+
function Qc(t, e, a) {
|
|
6823
|
+
const n = (a == null ? void 0 : a[t]) ?? El[t];
|
|
6820
6824
|
return n ? n(e) : `${ve(e)} ${t.replaceAll("_", " ")}`;
|
|
6821
6825
|
}
|
|
6822
|
-
const Wt = ["community", "plus", "team", "enterprise", "managed"],
|
|
6826
|
+
const Wt = ["community", "plus", "team", "enterprise", "managed"], Ll = ["community", "plus", "team", "enterprise", "managed"];
|
|
6823
6827
|
function _e(t) {
|
|
6824
6828
|
var n;
|
|
6825
6829
|
const e = t.name.toLowerCase();
|
|
@@ -6834,7 +6838,7 @@ function _e(t) {
|
|
|
6834
6838
|
if (e.includes("enterprise"))
|
|
6835
6839
|
return "enterprise";
|
|
6836
6840
|
const a = (n = t.metadata) == null ? void 0 : n.legacyName;
|
|
6837
|
-
return
|
|
6841
|
+
return Ll.find((r) => r === a) ?? "community";
|
|
6838
6842
|
}
|
|
6839
6843
|
const Is = "https://botpress.com/contact-us/managed-plan", gt = {
|
|
6840
6844
|
conversation_sessions_addon: "addonNameConversationSessions",
|
|
@@ -6849,7 +6853,7 @@ function Wn(t, e, a) {
|
|
|
6849
6853
|
function ja(t) {
|
|
6850
6854
|
return t.replace("Add-on - ", "");
|
|
6851
6855
|
}
|
|
6852
|
-
function
|
|
6856
|
+
function Ol(t) {
|
|
6853
6857
|
return (t == null ? void 0 : t.find((e) => {
|
|
6854
6858
|
var a;
|
|
6855
6859
|
return (((a = e.increments) == null ? void 0 : a.conversation_sessions) ?? 0) > 0;
|
|
@@ -6861,7 +6865,7 @@ const As = [
|
|
|
6861
6865
|
{ key: "vector_db_storage", label: "Vector DB storage", unit: "bytes" },
|
|
6862
6866
|
{ key: "file_storage", label: "File storage", unit: "bytes" }
|
|
6863
6867
|
];
|
|
6864
|
-
function
|
|
6868
|
+
function Fl(t, e, a) {
|
|
6865
6869
|
var r;
|
|
6866
6870
|
if (!e)
|
|
6867
6871
|
return [];
|
|
@@ -6877,7 +6881,7 @@ function Ll(t, e, a) {
|
|
|
6877
6881
|
}
|
|
6878
6882
|
return n;
|
|
6879
6883
|
}
|
|
6880
|
-
function
|
|
6884
|
+
function Ml(t, e, a) {
|
|
6881
6885
|
var r;
|
|
6882
6886
|
if (!t)
|
|
6883
6887
|
return [];
|
|
@@ -6893,7 +6897,7 @@ function Ol(t, e, a) {
|
|
|
6893
6897
|
}
|
|
6894
6898
|
function Gn(t, e, a) {
|
|
6895
6899
|
var o;
|
|
6896
|
-
const n =
|
|
6900
|
+
const n = Ol(t);
|
|
6897
6901
|
if (!n)
|
|
6898
6902
|
return null;
|
|
6899
6903
|
const r = ((o = n.increments) == null ? void 0 : o.conversation_sessions) ?? 0, s = Wn(n, e, a);
|
|
@@ -7004,7 +7008,7 @@ const Kn = {
|
|
|
7004
7008
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7005
7009
|
"aria-hidden": !0,
|
|
7006
7010
|
...e
|
|
7007
|
-
}),
|
|
7011
|
+
}), Bl = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
7008
7012
|
"path",
|
|
7009
7013
|
{
|
|
7010
7014
|
d: "M3 8.5l3.5 3.5L13 4.5",
|
|
@@ -7024,7 +7028,7 @@ const Kn = {
|
|
|
7024
7028
|
}
|
|
7025
7029
|
),
|
|
7026
7030
|
/* @__PURE__ */ l("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" })
|
|
7027
|
-
] }),
|
|
7031
|
+
] }), Ul = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
7028
7032
|
"path",
|
|
7029
7033
|
{
|
|
7030
7034
|
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",
|
|
@@ -7052,7 +7056,7 @@ const Kn = {
|
|
|
7052
7056
|
strokeLinejoin: "round"
|
|
7053
7057
|
}
|
|
7054
7058
|
)
|
|
7055
|
-
] }),
|
|
7059
|
+
] }), zl = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
7056
7060
|
"path",
|
|
7057
7061
|
{
|
|
7058
7062
|
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",
|
|
@@ -7063,14 +7067,14 @@ const Kn = {
|
|
|
7063
7067
|
) }), Yn = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7064
7068
|
/* @__PURE__ */ l("path", { d: "M8 2l6 3-6 3-6-3 6-3z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
|
|
7065
7069
|
/* @__PURE__ */ l("path", { d: "M2 8l6 3 6-3M2 11l6 3 6-3", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
|
|
7066
|
-
] }),
|
|
7070
|
+
] }), jl = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
7067
7071
|
"path",
|
|
7068
7072
|
{
|
|
7069
7073
|
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",
|
|
7070
7074
|
stroke: "currentColor",
|
|
7071
7075
|
strokeWidth: "1.3"
|
|
7072
7076
|
}
|
|
7073
|
-
) }), Jn = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }),
|
|
7077
|
+
) }), Jn = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }), Vl = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7074
7078
|
/* @__PURE__ */ l("circle", { cx: "6", cy: "5.5", r: "2.2", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7075
7079
|
/* @__PURE__ */ l("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" }),
|
|
7076
7080
|
/* @__PURE__ */ l(
|
|
@@ -7082,7 +7086,7 @@ const Kn = {
|
|
|
7082
7086
|
strokeLinecap: "round"
|
|
7083
7087
|
}
|
|
7084
7088
|
)
|
|
7085
|
-
] }),
|
|
7089
|
+
] }), Zl = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7086
7090
|
/* @__PURE__ */ l("path", { d: "M2.5 2.5v11h11", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
7087
7091
|
/* @__PURE__ */ l(
|
|
7088
7092
|
"path",
|
|
@@ -7094,7 +7098,7 @@ const Kn = {
|
|
|
7094
7098
|
strokeLinejoin: "round"
|
|
7095
7099
|
}
|
|
7096
7100
|
)
|
|
7097
|
-
] }),
|
|
7101
|
+
] }), ql = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7098
7102
|
/* @__PURE__ */ l("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7099
7103
|
/* @__PURE__ */ l(
|
|
7100
7104
|
"path",
|
|
@@ -7104,13 +7108,13 @@ const Kn = {
|
|
|
7104
7108
|
strokeWidth: "1.3"
|
|
7105
7109
|
}
|
|
7106
7110
|
)
|
|
7107
|
-
] }),
|
|
7111
|
+
] }), Wl = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7108
7112
|
/* @__PURE__ */ l("path", { d: "M2.5 11.5L9 5l2 2-6.5 6.5H2.5v-2z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
|
|
7109
7113
|
/* @__PURE__ */ l("path", { d: "M9 5l1.8-1.8a1.4 1.4 0 012 2L11 7", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
|
|
7110
7114
|
] }), Rr = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7111
7115
|
/* @__PURE__ */ l("rect", { x: "1.8", y: "3.5", width: "12.4", height: "9", rx: "1.6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7112
7116
|
/* @__PURE__ */ l("path", { d: "M1.8 6.4h12.4", stroke: "currentColor", strokeWidth: "1.3" })
|
|
7113
|
-
] }),
|
|
7117
|
+
] }), Xc = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
7114
7118
|
"path",
|
|
7115
7119
|
{
|
|
7116
7120
|
d: "M2 6l6-3.5L14 6v1H2V6zM3 7v5M6.3 7v5M9.7 7v5M13 7v5M2 12.5h12",
|
|
@@ -7118,7 +7122,7 @@ const Kn = {
|
|
|
7118
7122
|
strokeWidth: "1.2",
|
|
7119
7123
|
strokeLinejoin: "round"
|
|
7120
7124
|
}
|
|
7121
|
-
) }),
|
|
7125
|
+
) }), eu = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7122
7126
|
/* @__PURE__ */ l("rect", { x: "3.5", y: "7", width: "9", height: "6.5", rx: "1.4", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7123
7127
|
/* @__PURE__ */ l("path", { d: "M5.5 7V5.5a2.5 2.5 0 015 0V7", stroke: "currentColor", strokeWidth: "1.3" })
|
|
7124
7128
|
] }), Qn = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), ea = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M4 6.5L8 10.5l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), xs = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l(
|
|
@@ -7139,7 +7143,7 @@ const Kn = {
|
|
|
7139
7143
|
strokeLinecap: "round",
|
|
7140
7144
|
strokeLinejoin: "round"
|
|
7141
7145
|
}
|
|
7142
|
-
) }),
|
|
7146
|
+
) }), Gl = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), Ps = ({ size: t, ...e }) => /* @__PURE__ */ l("svg", { ...ye(t, e), children: /* @__PURE__ */ l("path", { d: "M8 3.5v9M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), ln = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7143
7147
|
/* @__PURE__ */ l(
|
|
7144
7148
|
"path",
|
|
7145
7149
|
{
|
|
@@ -7160,7 +7164,7 @@ const Kn = {
|
|
|
7160
7164
|
strokeLinecap: "round",
|
|
7161
7165
|
strokeLinejoin: "round"
|
|
7162
7166
|
}
|
|
7163
|
-
) }),
|
|
7167
|
+
) }), Kl = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7164
7168
|
/* @__PURE__ */ l("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7165
7169
|
/* @__PURE__ */ l(
|
|
7166
7170
|
"path",
|
|
@@ -7190,7 +7194,7 @@ const Kn = {
|
|
|
7190
7194
|
strokeLinecap: "round",
|
|
7191
7195
|
strokeLinejoin: "round"
|
|
7192
7196
|
}
|
|
7193
|
-
) }),
|
|
7197
|
+
) }), tu = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7194
7198
|
/* @__PURE__ */ l(
|
|
7195
7199
|
"path",
|
|
7196
7200
|
{
|
|
@@ -7201,7 +7205,7 @@ const Kn = {
|
|
|
7201
7205
|
}
|
|
7202
7206
|
),
|
|
7203
7207
|
/* @__PURE__ */ l("path", { d: "M6.2 5.5h3.6M6.2 8h3.6", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
7204
|
-
] }),
|
|
7208
|
+
] }), $l = ({ size: t, ...e }) => /* @__PURE__ */ p("svg", { ...ye(t, e), children: [
|
|
7205
7209
|
/* @__PURE__ */ l("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7206
7210
|
/* @__PURE__ */ l("path", { d: "M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
7207
7211
|
] }), Ds = ({ brand: t }) => {
|
|
@@ -7230,7 +7234,7 @@ const Kn = {
|
|
|
7230
7234
|
};
|
|
7231
7235
|
function er(t) {
|
|
7232
7236
|
const e = t.toLowerCase();
|
|
7233
|
-
return /seat|member|user|team|rbac|rout/.test(e) ?
|
|
7237
|
+
return /seat|member|user|team|rbac|rout/.test(e) ? Vl : /analytic|report|insight|dashboard/.test(e) ? Zl : /whatsapp|channel|chat|message|conversation|webchat|voice/.test(e) ? Ul : /storage|table|vector|file|gb|rows|db/.test(e) ? Yn : /domain|help center|whitelabel|website|url|web/.test(e) ? ql : /brand|theme|custom|white-?label/.test(e) ? Wl : /unlimited|infinit/.test(e) ? jl : /security|sla|compliance|soc|audit/.test(e) || /support|sla|dedicated|priority/.test(e) ? Dr : /integration|api|plugin|sdk|adk|studio/.test(e) ? zl : /ai|agent|model|gpt|llm/.test(e) ? Jn : Hn;
|
|
7234
7238
|
}
|
|
7235
7239
|
const Fe = ({
|
|
7236
7240
|
open: t,
|
|
@@ -7241,7 +7245,7 @@ const Fe = ({
|
|
|
7241
7245
|
showClose: s = !0,
|
|
7242
7246
|
...o
|
|
7243
7247
|
}) => {
|
|
7244
|
-
const i = rn(null), d =
|
|
7248
|
+
const i = rn(null), d = Ri(), c = Ei(), u = It(() => e(!1), [e]);
|
|
7245
7249
|
return Oe(() => {
|
|
7246
7250
|
var g;
|
|
7247
7251
|
if (!t)
|
|
@@ -7292,7 +7296,7 @@ const Fe = ({
|
|
|
7292
7296
|
/* @__PURE__ */ l(dn, { size: 15 })
|
|
7293
7297
|
] })
|
|
7294
7298
|
] });
|
|
7295
|
-
},
|
|
7299
|
+
}, Hl = ({
|
|
7296
7300
|
options: t,
|
|
7297
7301
|
value: e,
|
|
7298
7302
|
onChange: a,
|
|
@@ -7315,20 +7319,20 @@ const Fe = ({
|
|
|
7315
7319
|
},
|
|
7316
7320
|
s.value
|
|
7317
7321
|
);
|
|
7318
|
-
}) }),
|
|
7322
|
+
}) }), pe = ({ width: t, height: e = 14, rounded: a = !1, className: n }) => /* @__PURE__ */ l(
|
|
7319
7323
|
"span",
|
|
7320
7324
|
{
|
|
7321
7325
|
"aria-hidden": !0,
|
|
7322
7326
|
className: j("bpb-skeleton", a && "bpb-skeleton--rounded", n),
|
|
7323
7327
|
style: { width: t ?? "100%", height: e }
|
|
7324
7328
|
}
|
|
7325
|
-
),
|
|
7329
|
+
), Yl = 560, Jl = `(max-width: ${Yl}px)`, Ql = () => {
|
|
7326
7330
|
};
|
|
7327
|
-
function
|
|
7331
|
+
function Xl(t) {
|
|
7328
7332
|
const e = It(
|
|
7329
7333
|
(r) => {
|
|
7330
7334
|
if (typeof window > "u")
|
|
7331
|
-
return
|
|
7335
|
+
return Ql;
|
|
7332
7336
|
const s = window.matchMedia(t);
|
|
7333
7337
|
return s.addEventListener("change", r), () => s.removeEventListener("change", r);
|
|
7334
7338
|
},
|
|
@@ -7336,13 +7340,13 @@ function Jl(t) {
|
|
|
7336
7340
|
), a = It(() => typeof window < "u" && window.matchMedia(t).matches, [t]), n = It(() => !1, []);
|
|
7337
7341
|
return ko(e, a, n);
|
|
7338
7342
|
}
|
|
7339
|
-
function
|
|
7340
|
-
return Jl
|
|
7343
|
+
function ed() {
|
|
7344
|
+
return Xl(Jl);
|
|
7341
7345
|
}
|
|
7342
7346
|
const Qa = ({ label: t, children: e }) => /* @__PURE__ */ p("span", { className: "bpb-tooltip", tabIndex: 0, role: "note", children: [
|
|
7343
7347
|
/* @__PURE__ */ l("span", { className: "bpb-tooltip__term", children: t }),
|
|
7344
7348
|
/* @__PURE__ */ l("span", { className: "bpb-tooltip__bubble", role: "tooltip", children: e })
|
|
7345
|
-
] }), In = 3,
|
|
7349
|
+
] }), In = 3, td = ({
|
|
7346
7350
|
label: t,
|
|
7347
7351
|
description: e,
|
|
7348
7352
|
Icon: a
|
|
@@ -7366,17 +7370,17 @@ const Qa = ({ label: t, children: e }) => /* @__PURE__ */ p("span", { className:
|
|
|
7366
7370
|
),
|
|
7367
7371
|
n && /* @__PURE__ */ l("p", { id: s, className: "bpb-plan-card__feature-desc", children: e })
|
|
7368
7372
|
] });
|
|
7369
|
-
},
|
|
7373
|
+
}, ad = ({ features: t, previousPlanName: e, overrides: a, isMobile: n }) => {
|
|
7370
7374
|
const { t: r } = ge(), [s, o] = J(!1), d = n && !s && t.length > In ? t.slice(0, In) : t;
|
|
7371
7375
|
return /* @__PURE__ */ p(Te, { children: [
|
|
7372
7376
|
/* @__PURE__ */ p("ul", { className: j("bpb-plan-card__features", n && "bpb-plan-card__features--mobile"), children: [
|
|
7373
7377
|
e && /* @__PURE__ */ p("li", { className: "bpb-plan-card__features-lead", children: [
|
|
7374
|
-
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ l(
|
|
7378
|
+
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ l(Bl, { size: 13 }) }),
|
|
7375
7379
|
/* @__PURE__ */ l("span", { children: r("upgradeEverythingIn", { planName: e }) })
|
|
7376
7380
|
] }),
|
|
7377
7381
|
d.map((c) => {
|
|
7378
7382
|
const u = er(c), m = Kn[c], h = a == null ? void 0 : a[c], g = (h == null ? void 0 : h.label) ?? (m !== void 0 ? r(m.label) : c), b = (h == null ? void 0 : h.description) ?? (m !== void 0 ? r(m.desc) : void 0);
|
|
7379
|
-
return n ? b ? /* @__PURE__ */ l(
|
|
7383
|
+
return n ? b ? /* @__PURE__ */ l(td, { label: g, description: b, Icon: u }, c) : /* @__PURE__ */ p("li", { children: [
|
|
7380
7384
|
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ l(u, { size: 13 }) }),
|
|
7381
7385
|
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-label", children: g })
|
|
7382
7386
|
] }, c) : /* @__PURE__ */ p("li", { children: [
|
|
@@ -7391,11 +7395,11 @@ const Qa = ({ label: t, children: e }) => /* @__PURE__ */ p("span", { className:
|
|
|
7391
7395
|
] })
|
|
7392
7396
|
] });
|
|
7393
7397
|
};
|
|
7394
|
-
function
|
|
7398
|
+
function nd(t, e) {
|
|
7395
7399
|
const a = t.prices[e];
|
|
7396
7400
|
return a || ((e === "month" ? t.prices.year : t.prices.month) ?? null);
|
|
7397
7401
|
}
|
|
7398
|
-
function
|
|
7402
|
+
function rd(t, e) {
|
|
7399
7403
|
var r, s;
|
|
7400
7404
|
const a = (r = t.prices.month) == null ? void 0 : r.amount;
|
|
7401
7405
|
if (e === "month")
|
|
@@ -7403,7 +7407,7 @@ function ad(t, e) {
|
|
|
7403
7407
|
const n = ((s = t.prices.year) == null ? void 0 : s.amount) ?? (a === void 0 ? void 0 : a * 12);
|
|
7404
7408
|
return n === void 0 ? null : n / 12;
|
|
7405
7409
|
}
|
|
7406
|
-
function
|
|
7410
|
+
function sd(t) {
|
|
7407
7411
|
var a, n;
|
|
7408
7412
|
let e = 0;
|
|
7409
7413
|
for (const r of t) {
|
|
@@ -7412,12 +7416,12 @@ function nd(t) {
|
|
|
7412
7416
|
}
|
|
7413
7417
|
return Math.round(e * 100);
|
|
7414
7418
|
}
|
|
7415
|
-
const
|
|
7419
|
+
const od = ({
|
|
7416
7420
|
open: t,
|
|
7417
7421
|
onOpenChange: e,
|
|
7418
7422
|
onSelectPlan: a,
|
|
7419
7423
|
recommendedPlanId: n = "team",
|
|
7420
|
-
defaultInterval: r = "
|
|
7424
|
+
defaultInterval: r = "month",
|
|
7421
7425
|
excludePlanIds: s = [],
|
|
7422
7426
|
planFeatures: o = {},
|
|
7423
7427
|
featureDescriptions: i
|
|
@@ -7427,27 +7431,27 @@ const rd = ({
|
|
|
7427
7431
|
Oe(() => {
|
|
7428
7432
|
t && u.capture(we.PLAN_PICKER_VIEWED, { interval: h });
|
|
7429
7433
|
}, [t, u]);
|
|
7430
|
-
const I = (
|
|
7431
|
-
|
|
7432
|
-
}, k = v == null ? void 0 : v.plan.current.interval, A = b == null ? void 0 : b.find((
|
|
7433
|
-
(
|
|
7434
|
-
).sort((
|
|
7434
|
+
const I = (x) => {
|
|
7435
|
+
x !== h && u.capture(we.PLAN_INTERVAL_TOGGLED, { interval: x }), g(x);
|
|
7436
|
+
}, k = v == null ? void 0 : v.plan.current.interval, A = b == null ? void 0 : b.find((x) => x.id === (v == null ? void 0 : v.plan.current.planId)), w = v ? A ? _e(A) : "community" : void 0, E = ((M = v == null ? void 0 : v.plan.next) == null ? void 0 : M.planId) ?? null, L = !!E && E !== (v == null ? void 0 : v.plan.current.planId), O = T || w === "enterprise" || w === "managed", Z = Re(() => b ? b.filter(
|
|
7437
|
+
(x) => _e(x) !== "managed" && _e(x) !== "enterprise" && !s.includes(x.id)
|
|
7438
|
+
).sort((x, be) => Wt.indexOf(_e(x)) - Wt.indexOf(_e(be))) : [], [b, s]), V = Re(() => sd(Z), [Z]), $ = ed(), B = Re(() => {
|
|
7435
7439
|
var te;
|
|
7436
7440
|
if (Z.length === 0)
|
|
7437
7441
|
return null;
|
|
7438
|
-
const
|
|
7442
|
+
const x = Z.find(
|
|
7439
7443
|
(de) => _e(de) === n || de.id === n
|
|
7440
7444
|
), be = Z.find((de) => _e(de) === w);
|
|
7441
|
-
return ((te =
|
|
7442
|
-
}, [Z, n, w]), [
|
|
7445
|
+
return ((te = x ?? be ?? Z[0]) == null ? void 0 : te.id) ?? null;
|
|
7446
|
+
}, [Z, n, w]), [P, H] = J(void 0), [W, X] = J(t);
|
|
7443
7447
|
W !== t && (X(t), H(void 0));
|
|
7444
|
-
const D =
|
|
7448
|
+
const D = P === void 0 ? B : P, ue = ((G = (K = b == null ? void 0 : b.find((x) => _e(x) === "enterprise")) == null ? void 0 : K.metadata) == null ? void 0 : G.contact_url) ?? Is, ee = (x) => {
|
|
7445
7449
|
S.mutate(
|
|
7446
|
-
{ planId:
|
|
7450
|
+
{ planId: x.id, interval: h },
|
|
7447
7451
|
{
|
|
7448
7452
|
onSuccess: () => {
|
|
7449
7453
|
u.capture(we.PLAN_DOWNGRADED, {
|
|
7450
|
-
plan_name: Ne(
|
|
7454
|
+
plan_name: Ne(x.name),
|
|
7451
7455
|
interval: h,
|
|
7452
7456
|
previous_plan_name: A ? Ne(A.name) : void 0
|
|
7453
7457
|
}), c({ type: "success", message: m("upgradeDowngradeSuccess") });
|
|
@@ -7489,7 +7493,7 @@ const rd = ({
|
|
|
7489
7493
|
children: /* @__PURE__ */ p("div", { className: "bpb-upgrade", children: [
|
|
7490
7494
|
/* @__PURE__ */ l("h2", { className: "bpb-upgrade__title", children: m("upgradeDialogTitle") }),
|
|
7491
7495
|
/* @__PURE__ */ l("div", { className: "bpb-upgrade__toggle", children: /* @__PURE__ */ l(
|
|
7492
|
-
|
|
7496
|
+
Hl,
|
|
7493
7497
|
{
|
|
7494
7498
|
"aria-label": m("dashboardBillingPeriod"),
|
|
7495
7499
|
value: h,
|
|
@@ -7505,15 +7509,15 @@ const rd = ({
|
|
|
7505
7509
|
}
|
|
7506
7510
|
) }),
|
|
7507
7511
|
/* @__PURE__ */ p("div", { className: "bpb-upgrade__grid", children: [
|
|
7508
|
-
C && [0, 1, 2].map((
|
|
7509
|
-
/* @__PURE__ */ l(
|
|
7510
|
-
/* @__PURE__ */ l(
|
|
7511
|
-
/* @__PURE__ */ l(
|
|
7512
|
-
/* @__PURE__ */ l(
|
|
7513
|
-
] },
|
|
7514
|
-
Z.map((
|
|
7512
|
+
C && [0, 1, 2].map((x) => /* @__PURE__ */ p("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
|
|
7513
|
+
/* @__PURE__ */ l(pe, { width: 120, height: 22 }),
|
|
7514
|
+
/* @__PURE__ */ l(pe, { width: 90, height: 40 }),
|
|
7515
|
+
/* @__PURE__ */ l(pe, { width: "100%", height: 36, rounded: !0 }),
|
|
7516
|
+
/* @__PURE__ */ l(pe, { width: "100%", height: 140 })
|
|
7517
|
+
] }, x)),
|
|
7518
|
+
Z.map((x, be) => {
|
|
7515
7519
|
var sa, oa;
|
|
7516
|
-
const te = _e(
|
|
7520
|
+
const te = _e(x), de = nd(x, h), me = rd(x, h), ae = (((sa = x.prices.month) == null ? void 0 : sa.amount) ?? 0) <= 0, fe = te === w, se = fe && (w === "community" || h === k), Ee = te === w && w !== "community" && h !== k, st = !!E && x.id === E && !se, pt = w !== void 0 && Wt.indexOf(te) < Wt.indexOf(w), Pe = (te === n || x.id === n) && !se, Ze = fe && L ? "cancel_downgrade" : se ? "current" : Ee ? "switch_interval" : st ? "next" : pt ? "downgrade" : "upgrade", ta = be > 0 ? Z[be - 1] : void 0, aa = o[te] ?? $n[te], Et = x.features.conversation_sessions, Lt = Gn(_, x, h), Ot = x.features.ai_spend, Ea = Ot !== void 0 ? m("planFeatureAiUsageIncluded", {
|
|
7517
7521
|
amount: le(Ot / tt, (de == null ? void 0 : de.currency) ?? "usd", 0)
|
|
7518
7522
|
}) : void 0, vn = Ot !== void 0 && Et ? m("planFeatureDescAiUsageIncluded", {
|
|
7519
7523
|
rate: le(
|
|
@@ -7531,9 +7535,9 @@ const rd = ({
|
|
|
7531
7535
|
description: (i == null ? void 0 : i["AI usage included"]) ?? vn
|
|
7532
7536
|
}
|
|
7533
7537
|
} : {}
|
|
7534
|
-
}, na = S.isPending && (Ze === "downgrade" && ((oa = S.variables) == null ? void 0 : oa.planId) ===
|
|
7538
|
+
}, na = S.isPending && (Ze === "downgrade" && ((oa = S.variables) == null ? void 0 : oa.planId) === x.id || Ze === "cancel_downgrade"), xe = Ne(x.name), mt = !$ || D === x.id, ra = me !== null && de ? /* @__PURE__ */ p(Te, { children: [
|
|
7535
7539
|
/* @__PURE__ */ l("span", { className: "bpb-plan-card__currency", children: za(de.currency) }),
|
|
7536
|
-
/* @__PURE__ */ l("span", { className: "bpb-plan-card__amount", children:
|
|
7540
|
+
/* @__PURE__ */ l("span", { className: "bpb-plan-card__amount", children: Math.round(me) }),
|
|
7537
7541
|
/* @__PURE__ */ l("span", { className: "bpb-plan-card__per", children: m("upgradePerMonthSuffix", { currency: de.currency.toUpperCase() }) })
|
|
7538
7542
|
] }) : /* @__PURE__ */ l("span", { className: "bpb-plan-card__amount", children: le(0, "usd", 0) });
|
|
7539
7543
|
return /* @__PURE__ */ p(
|
|
@@ -7545,7 +7549,7 @@ const rd = ({
|
|
|
7545
7549
|
$ && "bpb-plan-card--accordion",
|
|
7546
7550
|
$ && mt && "is-expanded"
|
|
7547
7551
|
),
|
|
7548
|
-
"data-plan-id":
|
|
7552
|
+
"data-plan-id": x.id,
|
|
7549
7553
|
children: [
|
|
7550
7554
|
$ ? (
|
|
7551
7555
|
/* Name + price stay visible collapsed, so tiers compare. */
|
|
@@ -7555,7 +7559,7 @@ const rd = ({
|
|
|
7555
7559
|
type: "button",
|
|
7556
7560
|
className: "bpb-plan-card__summary",
|
|
7557
7561
|
"aria-expanded": mt,
|
|
7558
|
-
onClick: () => H(mt ? null :
|
|
7562
|
+
onClick: () => H(mt ? null : x.id),
|
|
7559
7563
|
children: [
|
|
7560
7564
|
/* @__PURE__ */ p("span", { className: "bpb-plan-card__summary-text", children: [
|
|
7561
7565
|
/* @__PURE__ */ p("span", { className: "bpb-plan-card__name", children: [
|
|
@@ -7575,12 +7579,12 @@ const rd = ({
|
|
|
7575
7579
|
xe,
|
|
7576
7580
|
Pe && /* @__PURE__ */ l(Ja, { className: "bpb-plan-card__badge", children: m("upgradeRecommended") })
|
|
7577
7581
|
] }),
|
|
7578
|
-
/* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: m(Pr[_e(
|
|
7582
|
+
/* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: m(Pr[_e(x)]) }),
|
|
7579
7583
|
/* @__PURE__ */ l("div", { className: "bpb-plan-card__price", children: ra })
|
|
7580
7584
|
] })
|
|
7581
7585
|
),
|
|
7582
7586
|
mt && /* @__PURE__ */ p(Te, { children: [
|
|
7583
|
-
$ && /* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: m(Pr[_e(
|
|
7587
|
+
$ && /* @__PURE__ */ l("p", { className: "bpb-plan-card__tagline", children: m(Pr[_e(x)]) }),
|
|
7584
7588
|
Et !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-plan-card__allowance", children: [
|
|
7585
7589
|
/* @__PURE__ */ p("div", { className: "bpb-plan-card__metric", children: [
|
|
7586
7590
|
/* @__PURE__ */ l("span", { className: "bpb-plan-card__metric-value", children: ve(Et) }),
|
|
@@ -7601,7 +7605,7 @@ const rd = ({
|
|
|
7601
7605
|
block: !0,
|
|
7602
7606
|
disabled: O || S.isPending,
|
|
7603
7607
|
loading: na,
|
|
7604
|
-
onClick: () => ee(
|
|
7608
|
+
onClick: () => ee(x),
|
|
7605
7609
|
children: m("upgradeDowngrade")
|
|
7606
7610
|
}
|
|
7607
7611
|
),
|
|
@@ -7614,10 +7618,10 @@ const rd = ({
|
|
|
7614
7618
|
title: O ? m("upgradePlanManaged") : void 0,
|
|
7615
7619
|
onClick: () => {
|
|
7616
7620
|
u.capture(we.PLAN_UPGRADE_INITIATED, {
|
|
7617
|
-
plan_name: Ne(
|
|
7621
|
+
plan_name: Ne(x.name),
|
|
7618
7622
|
interval: h,
|
|
7619
7623
|
current_plan_name: A ? Ne(A.name) : void 0
|
|
7620
|
-
}), a(
|
|
7624
|
+
}), a(x.id, h);
|
|
7621
7625
|
},
|
|
7622
7626
|
children: m(h === "year" ? "upgradeSwitchToAnnual" : "upgradeSwitchToMonthly")
|
|
7623
7627
|
}
|
|
@@ -7631,16 +7635,16 @@ const rd = ({
|
|
|
7631
7635
|
title: O ? m("upgradePlanManaged") : void 0,
|
|
7632
7636
|
onClick: () => {
|
|
7633
7637
|
u.capture(we.PLAN_UPGRADE_INITIATED, {
|
|
7634
|
-
plan_name: Ne(
|
|
7638
|
+
plan_name: Ne(x.name),
|
|
7635
7639
|
interval: h,
|
|
7636
7640
|
current_plan_name: A ? Ne(A.name) : void 0
|
|
7637
|
-
}), a(
|
|
7641
|
+
}), a(x.id, h);
|
|
7638
7642
|
},
|
|
7639
7643
|
children: m("upgradeUpgrade")
|
|
7640
7644
|
}
|
|
7641
7645
|
),
|
|
7642
7646
|
/* @__PURE__ */ l(
|
|
7643
|
-
|
|
7647
|
+
ad,
|
|
7644
7648
|
{
|
|
7645
7649
|
features: aa,
|
|
7646
7650
|
previousPlanName: ta ? Ne(ta.name) : void 0,
|
|
@@ -7651,7 +7655,7 @@ const rd = ({
|
|
|
7651
7655
|
] })
|
|
7652
7656
|
]
|
|
7653
7657
|
},
|
|
7654
|
-
|
|
7658
|
+
x.id
|
|
7655
7659
|
);
|
|
7656
7660
|
})
|
|
7657
7661
|
] }),
|
|
@@ -7739,12 +7743,12 @@ function Es(t) {
|
|
|
7739
7743
|
invalid: { color: t ? "#ff8583" : "#e02e2a" }
|
|
7740
7744
|
};
|
|
7741
7745
|
}
|
|
7742
|
-
const
|
|
7746
|
+
const id = { pt: "pt-BR", es: "es-419" };
|
|
7743
7747
|
function Ls(t) {
|
|
7744
7748
|
const e = t.split("-")[0] ?? t;
|
|
7745
|
-
return
|
|
7749
|
+
return id[e] ?? t;
|
|
7746
7750
|
}
|
|
7747
|
-
const
|
|
7751
|
+
const ld = {
|
|
7748
7752
|
address: "address",
|
|
7749
7753
|
name: "address",
|
|
7750
7754
|
taxId: "taxId",
|
|
@@ -7757,7 +7761,7 @@ function Os(t, e) {
|
|
|
7757
7761
|
return { general: (t == null ? void 0 : t.message) || e };
|
|
7758
7762
|
const n = {};
|
|
7759
7763
|
for (const s of a)
|
|
7760
|
-
s.message && (n[
|
|
7764
|
+
s.message && (n[ld[s.scope ?? ""] ?? "general"] = s.message);
|
|
7761
7765
|
return Object.keys(n).length > 0 ? n : { general: (t == null ? void 0 : t.message) || e };
|
|
7762
7766
|
}
|
|
7763
7767
|
function Xa(t) {
|
|
@@ -7771,7 +7775,7 @@ function Fs(t) {
|
|
|
7771
7775
|
const e = new Date(t);
|
|
7772
7776
|
return new Date(e.getUTCFullYear(), e.getUTCMonth() + 1, 0).toISOString();
|
|
7773
7777
|
}
|
|
7774
|
-
const
|
|
7778
|
+
const dd = 4, cd = ({
|
|
7775
7779
|
plan: t,
|
|
7776
7780
|
interval: e,
|
|
7777
7781
|
preview: a,
|
|
@@ -7783,10 +7787,10 @@ const id = 4, ld = ({
|
|
|
7783
7787
|
onSubscribe: d
|
|
7784
7788
|
}) => {
|
|
7785
7789
|
var H, W, X, D, ue;
|
|
7786
|
-
const { locale: c } = ne(), { t: u } = ge(), { data: m } = Qt(), h = ((H = t == null ? void 0 : t.prices.month) == null ? void 0 : H.currency) ?? ((W = t == null ? void 0 : t.prices.year) == null ? void 0 : W.currency) ?? "usd", g = t == null ? void 0 : t.features.conversation_sessions, b = t && _e(t) === "community" ? u("conversationsUnit") : u("conversationsPerMonth"), C = t ? Gn(m, t, e) : null, _ = (a == null ? void 0 : a.costs.immediate.amountDue) ?? 0, v = (a == null ? void 0 : a.costs.immediate.accountBalance) ?? 0, N = (a == null ? void 0 : a.costs.nextCycle.total) ?? 0, S = a != null && a.nextBillingDate ?
|
|
7790
|
+
const { locale: c } = ne(), { t: u } = ge(), { data: m } = Qt(), h = ((H = t == null ? void 0 : t.prices.month) == null ? void 0 : H.currency) ?? ((W = t == null ? void 0 : t.prices.year) == null ? void 0 : W.currency) ?? "usd", g = t == null ? void 0 : t.features.conversation_sessions, b = t && _e(t) === "community" ? u("conversationsUnit") : u("conversationsPerMonth"), C = t ? Gn(m, t, e) : null, _ = (a == null ? void 0 : a.costs.immediate.amountDue) ?? 0, v = (a == null ? void 0 : a.costs.immediate.accountBalance) ?? 0, N = (a == null ? void 0 : a.costs.nextCycle.total) ?? 0, S = a != null && a.nextBillingDate ? Rl(a.nextBillingDate, 1) : null, T = S && !Xa(S) ? ct(S, c) : null, I = t ? $n[_e(t)].slice(0, dd) : [], k = t == null ? void 0 : t.features.ai_spend, A = k !== void 0 ? u("planFeatureAiUsageIncluded", { amount: le(k / tt, h, 0) }) : void 0, w = t ? ((X = t.prices[e]) == null ? void 0 : X.amount) ?? 0 : 0, E = (a == null ? void 0 : a.costs.immediate.lineItems) ?? [], L = E.filter((ee) => ee.type === "discount"), O = E.filter((ee) => ee.type === "proration_credit" || ee.type === "proration_charge").reduce((ee, ce) => ee + ce.amount, 0), Z = !!(a != null && a.subscription.plan.effectiveDate), V = ((D = t == null ? void 0 : t.prices.month) == null ? void 0 : D.amount) ?? 0, $ = ((ue = t == null ? void 0 : t.prices.year) == null ? void 0 : ue.amount) ?? 0, B = e === "year" && V > 0 && $ > 0 ? Math.round(V * 12 - $) : 0, P = Math.round(B / 12);
|
|
7787
7791
|
return /* @__PURE__ */ p("div", { className: "bpb-summary-wrap", children: [
|
|
7788
7792
|
/* @__PURE__ */ p("div", { className: "bpb-summary bpb-glow", children: [
|
|
7789
|
-
/* @__PURE__ */ l("h3", { className: "bpb-summary__title", children: t ? `${Ne(t.name)} plan` : /* @__PURE__ */ l(
|
|
7793
|
+
/* @__PURE__ */ l("h3", { className: "bpb-summary__title", children: t ? `${Ne(t.name)} plan` : /* @__PURE__ */ l(pe, { width: 140, height: 24 }) }),
|
|
7790
7794
|
g !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__metric", children: [
|
|
7791
7795
|
/* @__PURE__ */ l("span", { className: "bpb-summary__metric-value", children: ve(g) }),
|
|
7792
7796
|
/* @__PURE__ */ l("span", { className: "bpb-summary__metric-unit", children: b }),
|
|
@@ -7807,9 +7811,9 @@ const id = 4, ld = ({
|
|
|
7807
7811
|
] }),
|
|
7808
7812
|
/* @__PURE__ */ l("hr", { className: "bpb-summary__divider" }),
|
|
7809
7813
|
n && /* @__PURE__ */ p("div", { className: "bpb-summary__lines", "aria-busy": "true", children: [
|
|
7810
|
-
/* @__PURE__ */ l(
|
|
7811
|
-
/* @__PURE__ */ l(
|
|
7812
|
-
/* @__PURE__ */ l(
|
|
7814
|
+
/* @__PURE__ */ l(pe, { height: 16 }),
|
|
7815
|
+
/* @__PURE__ */ l(pe, { height: 16 }),
|
|
7816
|
+
/* @__PURE__ */ l(pe, { height: 20 })
|
|
7813
7817
|
] }),
|
|
7814
7818
|
r && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-summary__error", children: u("orderPreviewError") }),
|
|
7815
7819
|
a && !n && Z && /*
|
|
@@ -7869,7 +7873,7 @@ const id = 4, ld = ({
|
|
|
7869
7873
|
B > 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__savings", children: [
|
|
7870
7874
|
/* @__PURE__ */ l(Hn, { size: 18, className: "bpb-summary__savings-icon" }),
|
|
7871
7875
|
/* @__PURE__ */ l("span", { children: u("orderSavingsNote", {
|
|
7872
|
-
monthlySavings: le(
|
|
7876
|
+
monthlySavings: le(P, h, 0),
|
|
7873
7877
|
yearlySavings: le(B, h, 0)
|
|
7874
7878
|
}) })
|
|
7875
7879
|
] }),
|
|
@@ -7905,7 +7909,7 @@ const id = 4, ld = ({
|
|
|
7905
7909
|
u("orderCancelNote")
|
|
7906
7910
|
] })
|
|
7907
7911
|
] });
|
|
7908
|
-
},
|
|
7912
|
+
}, ud = [
|
|
7909
7913
|
"AT",
|
|
7910
7914
|
"BE",
|
|
7911
7915
|
"BG",
|
|
@@ -7933,7 +7937,7 @@ const id = 4, ld = ({
|
|
|
7933
7937
|
"SI",
|
|
7934
7938
|
"ES",
|
|
7935
7939
|
"SE"
|
|
7936
|
-
],
|
|
7940
|
+
], pd = {
|
|
7937
7941
|
CA: [
|
|
7938
7942
|
{ type: "ca_bn", label: "CA BN", description: "Canadian BN" },
|
|
7939
7943
|
{ type: "ca_gst_hst", label: "CA GST/HST", description: "Canadian GST/HST number" },
|
|
@@ -7980,12 +7984,12 @@ const id = 4, ld = ({
|
|
|
7980
7984
|
HU: [{ type: "hu_tin", label: "HU TIN", description: "Hungary tax number (adószám)" }],
|
|
7981
7985
|
RO: [{ type: "ro_tin", label: "RO TIN", description: "Romanian tax ID number" }],
|
|
7982
7986
|
SI: [{ type: "si_tin", label: "SI TIN", description: "Slovenia tax number (davčna številka)" }]
|
|
7983
|
-
},
|
|
7987
|
+
}, md = [{ type: "eu_vat", label: "EU VAT", description: "European VAT number" }];
|
|
7984
7988
|
function Ms(t) {
|
|
7985
7989
|
if (!t)
|
|
7986
7990
|
return [];
|
|
7987
|
-
const e = t.toUpperCase(), a =
|
|
7988
|
-
return
|
|
7991
|
+
const e = t.toUpperCase(), a = pd[e] ?? [];
|
|
7992
|
+
return ud.includes(e) ? [...md, ...a] : a;
|
|
7989
7993
|
}
|
|
7990
7994
|
const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PURE__ */ p("label", { className: j("bpb-input", a), children: [
|
|
7991
7995
|
/* @__PURE__ */ l("span", { className: "bpb-input__label", children: t }),
|
|
@@ -8019,7 +8023,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8019
8023
|
),
|
|
8020
8024
|
/* @__PURE__ */ l(ea, { size: 16, className: "bpb-input__chevron" })
|
|
8021
8025
|
] })
|
|
8022
|
-
] }),
|
|
8026
|
+
] }), hd = ({
|
|
8023
8027
|
plan: t,
|
|
8024
8028
|
interval: e,
|
|
8025
8029
|
onChange: a
|
|
@@ -8087,7 +8091,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8087
8091
|
] }),
|
|
8088
8092
|
a && /* @__PURE__ */ l("button", { type: "button", className: "bpb-step__edit", onClick: a, children: n("edit") })
|
|
8089
8093
|
] });
|
|
8090
|
-
},
|
|
8094
|
+
}, gd = ({
|
|
8091
8095
|
stepNumber: t,
|
|
8092
8096
|
savedCard: e,
|
|
8093
8097
|
isDark: a,
|
|
@@ -8143,7 +8147,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8143
8147
|
] })
|
|
8144
8148
|
] }),
|
|
8145
8149
|
u && /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
8146
|
-
!d && /* @__PURE__ */ l("div", { className: "bpb-payment-element__skeleton", children: /* @__PURE__ */ l(
|
|
8150
|
+
!d && /* @__PURE__ */ l("div", { className: "bpb-payment-element__skeleton", children: /* @__PURE__ */ l(pe, { height: 48 }) }),
|
|
8147
8151
|
/* @__PURE__ */ l("div", { className: j("bpb-card-element", !d && "bpb-payment-element--hidden"), children: /* @__PURE__ */ l(
|
|
8148
8152
|
Za,
|
|
8149
8153
|
{
|
|
@@ -8155,7 +8159,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8155
8159
|
] }),
|
|
8156
8160
|
o && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-step__field-error", children: o })
|
|
8157
8161
|
] });
|
|
8158
|
-
},
|
|
8162
|
+
}, bd = ({
|
|
8159
8163
|
stepNumber: t,
|
|
8160
8164
|
existingAddress: e,
|
|
8161
8165
|
customerName: a,
|
|
@@ -8180,10 +8184,10 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8180
8184
|
const { t: T } = ge(), [I, k] = J(!1), A = r || !e, w = Ms(c), E = w.find((L) => L.type === b);
|
|
8181
8185
|
return /* @__PURE__ */ p("section", { className: "bpb-step", children: [
|
|
8182
8186
|
/* @__PURE__ */ l(Us, { number: t, title: T("checkoutBillingAddressTitle") }),
|
|
8183
|
-
n ? /* @__PURE__ */ l(
|
|
8187
|
+
n ? /* @__PURE__ */ l(pe, { height: 72 }) : A ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
8184
8188
|
!I && /* @__PURE__ */ p("div", { className: "bpb-payment-element__skeleton", children: [
|
|
8185
|
-
/* @__PURE__ */ l(
|
|
8186
|
-
/* @__PURE__ */ l(
|
|
8189
|
+
/* @__PURE__ */ l(pe, { height: 48 }),
|
|
8190
|
+
/* @__PURE__ */ l(pe, { height: 48 })
|
|
8187
8191
|
] }),
|
|
8188
8192
|
/* @__PURE__ */ l("div", { className: j(!I && "bpb-payment-element--hidden"), children: /* @__PURE__ */ l(
|
|
8189
8193
|
Wr,
|
|
@@ -8290,15 +8294,15 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8290
8294
|
] }) : /* @__PURE__ */ l("p", { className: "bpb-business-fields__note", children: T(c ? "checkoutNoTaxRequired" : "checkoutSelectCountryForTax") })
|
|
8291
8295
|
] })
|
|
8292
8296
|
] });
|
|
8293
|
-
},
|
|
8297
|
+
}, fd = ({ planId: t, initialInterval: e, onSuccess: a }) => {
|
|
8294
8298
|
var na;
|
|
8295
|
-
const n = Gr(), r = Kr(), { email: s, toast: o, analytics: i, isDark: d } = ne(), { t: c } = ge(), [u, m] = J(e), [h, g] = J("payment"), [b, C] = J(null), [_, v] = J(!1), [N, S] = J(!1), [T, I] = J(!1), [k, A] = J(void 0), [w, E] = J(!1), [L, O] = J(""), [Z, V] = J(""), [$, B] = J(""), [
|
|
8299
|
+
const n = Gr(), r = Kr(), { email: s, toast: o, analytics: i, isDark: d } = ne(), { t: c } = ge(), [u, m] = J(e), [h, g] = J("payment"), [b, C] = J(null), [_, v] = J(!1), [N, S] = J(!1), [T, I] = J(!1), [k, A] = J(void 0), [w, E] = J(!1), [L, O] = J(""), [Z, V] = J(""), [$, B] = J(""), [P, H] = J(!1), [W, X] = J({}), [D, ue] = J(!1), ee = ls(), { data: ce } = rt(), { data: M } = $e(), { data: K, isLoading: G } = rs(), { data: x, isLoading: be, isError: te } = ss(), de = ce == null ? void 0 : ce.find((xe) => xe.id === t), me = ((na = K == null ? void 0 : K.paymentMethod) == null ? void 0 : na.card) ?? null, ae = (x == null ? void 0 : x.address) ?? null;
|
|
8296
8300
|
Oe(() => {
|
|
8297
|
-
b === null && !G && K !== void 0 && C(
|
|
8298
|
-
}, [b, G, K,
|
|
8301
|
+
b === null && !G && K !== void 0 && C(me ? "saved" : "new");
|
|
8302
|
+
}, [b, G, K, me]), Oe(() => {
|
|
8299
8303
|
k === void 0 && ae && A(ae.country);
|
|
8300
8304
|
}, [k, ae]);
|
|
8301
|
-
const fe = Re(() => ({ plan: { planId: t, interval: u } }), [t, u]), se = ns(fe), Ee = ds(), st = cs(), pt = us(), Pe = de ? Ne(de.name) : "", Ze = b === "new" || !
|
|
8305
|
+
const fe = Re(() => ({ plan: { planId: t, interval: u } }), [t, u]), se = ns(fe), Ee = ds(), st = cs(), pt = us(), Pe = de ? Ne(de.name) : "", Ze = b === "new" || !me, ta = N || !ae, aa = Ze ? _ : !!me, Et = ta ? T : !0;
|
|
8302
8306
|
Oe(() => {
|
|
8303
8307
|
g(aa ? "address" : "payment");
|
|
8304
8308
|
}, [aa]), Oe(() => {
|
|
@@ -8310,7 +8314,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8310
8314
|
i.capture(we.PAYMENT_METHOD_SELECTED, { method: xe === "saved" ? "saved_card" : "new_card" }), C(xe);
|
|
8311
8315
|
}, Ea = (xe) => {
|
|
8312
8316
|
v(xe), ue(!1);
|
|
8313
|
-
}, vn = !!n && !!r && !!de && !be && !te && !se.isError && !!se.data && aa && Et && !
|
|
8317
|
+
}, vn = !!n && !!r && !!de && !be && !te && !se.isError && !!se.data && aa && Et && !P, _n = async () => {
|
|
8314
8318
|
var mt, ra, sa, oa;
|
|
8315
8319
|
if (!n || !r || !de || be || te)
|
|
8316
8320
|
return;
|
|
@@ -8363,13 +8367,13 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8363
8367
|
};
|
|
8364
8368
|
}
|
|
8365
8369
|
}
|
|
8366
|
-
const sr = w && L.trim() || qe || (
|
|
8367
|
-
...((
|
|
8370
|
+
const sr = w && L.trim() || qe || (x == null ? void 0 : x.name) || void 0, La = w && Z && $.trim() ? { type: Z, value: $.trim() } : void 0, mo = La ? [
|
|
8371
|
+
...((x == null ? void 0 : x.taxIds) ?? []).filter(
|
|
8368
8372
|
(He) => He.type !== La.type || He.value !== La.value
|
|
8369
8373
|
),
|
|
8370
8374
|
La
|
|
8371
|
-
] :
|
|
8372
|
-
(Me || w || sr !== ((
|
|
8375
|
+
] : x == null ? void 0 : x.taxIds;
|
|
8376
|
+
(Me || w || sr !== ((x == null ? void 0 : x.name) ?? void 0)) && await st.mutateAsync({
|
|
8373
8377
|
address: Me ?? ae ?? void 0,
|
|
8374
8378
|
name: sr,
|
|
8375
8379
|
taxIds: mo
|
|
@@ -8392,7 +8396,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8392
8396
|
};
|
|
8393
8397
|
return /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", children: [
|
|
8394
8398
|
/* @__PURE__ */ p("div", { className: "bpb-checkout__main", children: [
|
|
8395
|
-
de && /* @__PURE__ */ l(
|
|
8399
|
+
de && /* @__PURE__ */ l(hd, { plan: de, interval: u, onChange: Lt }),
|
|
8396
8400
|
s && /* @__PURE__ */ p("section", { className: "bpb-checkout__section", children: [
|
|
8397
8401
|
/* @__PURE__ */ l("h3", { className: "bpb-checkout__section-title", children: c("checkoutContactInfo") }),
|
|
8398
8402
|
/* @__PURE__ */ p("div", { className: "bpb-checkout__static-field", children: [
|
|
@@ -8401,10 +8405,10 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8401
8405
|
] })
|
|
8402
8406
|
] }),
|
|
8403
8407
|
/* @__PURE__ */ l(
|
|
8404
|
-
|
|
8408
|
+
gd,
|
|
8405
8409
|
{
|
|
8406
8410
|
stepNumber: 1,
|
|
8407
|
-
savedCard:
|
|
8411
|
+
savedCard: me,
|
|
8408
8412
|
isDark: d,
|
|
8409
8413
|
tab: b ?? "new",
|
|
8410
8414
|
onTabChange: Ot,
|
|
@@ -8413,11 +8417,11 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8413
8417
|
}
|
|
8414
8418
|
),
|
|
8415
8419
|
h === "address" && /* @__PURE__ */ l(
|
|
8416
|
-
|
|
8420
|
+
bd,
|
|
8417
8421
|
{
|
|
8418
8422
|
stepNumber: 2,
|
|
8419
8423
|
existingAddress: ae,
|
|
8420
|
-
customerName: (
|
|
8424
|
+
customerName: (x == null ? void 0 : x.name) ?? null,
|
|
8421
8425
|
isLoading: be,
|
|
8422
8426
|
editing: N,
|
|
8423
8427
|
onEdit: () => S(!0),
|
|
@@ -8439,7 +8443,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8439
8443
|
)
|
|
8440
8444
|
] }),
|
|
8441
8445
|
/* @__PURE__ */ l("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ l(
|
|
8442
|
-
|
|
8446
|
+
cd,
|
|
8443
8447
|
{
|
|
8444
8448
|
plan: de,
|
|
8445
8449
|
interval: u,
|
|
@@ -8447,13 +8451,13 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8447
8451
|
isLoadingPreview: se.isLoading,
|
|
8448
8452
|
isPreviewError: se.isError,
|
|
8449
8453
|
canSubscribe: vn,
|
|
8450
|
-
isSubmitting:
|
|
8454
|
+
isSubmitting: P,
|
|
8451
8455
|
submitError: W.general ?? null,
|
|
8452
8456
|
onSubscribe: () => void _n()
|
|
8453
8457
|
}
|
|
8454
8458
|
) })
|
|
8455
8459
|
] });
|
|
8456
|
-
},
|
|
8460
|
+
}, yd = ({ open: t, onOpenChange: e, planId: a, interval: n, onBack: r, onSuccess: s }) => {
|
|
8457
8461
|
const { stripePromise: o, isDark: i, locale: d, isOutdatedBilling: c } = ne(), { t: u } = ge(), m = Re(
|
|
8458
8462
|
() => ({
|
|
8459
8463
|
appearance: Rs(i),
|
|
@@ -8467,7 +8471,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8467
8471
|
/* @__PURE__ */ l("h2", { className: "bpb-checkout__title", children: u("checkoutTitle") })
|
|
8468
8472
|
] }),
|
|
8469
8473
|
/* @__PURE__ */ l($r, { stripe: o, options: m, children: /* @__PURE__ */ l(
|
|
8470
|
-
|
|
8474
|
+
fd,
|
|
8471
8475
|
{
|
|
8472
8476
|
planId: a,
|
|
8473
8477
|
initialInterval: n,
|
|
@@ -8477,7 +8481,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8477
8481
|
}
|
|
8478
8482
|
) })
|
|
8479
8483
|
] }) });
|
|
8480
|
-
},
|
|
8484
|
+
}, vd = ({ value: t, onChange: e, min: a = 0, max: n, step: r = 1, className: s, ...o }) => {
|
|
8481
8485
|
const i = () => e(Math.max(a, t - r)), d = () => e(n === void 0 ? t + r : Math.min(n, t + r));
|
|
8482
8486
|
return /* @__PURE__ */ p("div", { className: j("bpb-stepper", s), children: [
|
|
8483
8487
|
/* @__PURE__ */ l(
|
|
@@ -8488,7 +8492,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8488
8492
|
"aria-label": `Decrease ${o["aria-label"]}`,
|
|
8489
8493
|
onClick: i,
|
|
8490
8494
|
disabled: t <= a,
|
|
8491
|
-
children: /* @__PURE__ */ l(
|
|
8495
|
+
children: /* @__PURE__ */ l(Gl, { size: 14 })
|
|
8492
8496
|
}
|
|
8493
8497
|
),
|
|
8494
8498
|
/* @__PURE__ */ l("span", { className: "bpb-stepper__value", "aria-label": o["aria-label"], children: t }),
|
|
@@ -8508,7 +8512,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8508
8512
|
const { t: s } = ge();
|
|
8509
8513
|
return /* @__PURE__ */ p(Te, { children: [
|
|
8510
8514
|
/* @__PURE__ */ p("div", { className: "bpb-upgrade-gate", children: [
|
|
8511
|
-
/* @__PURE__ */ l(
|
|
8515
|
+
/* @__PURE__ */ l(Kl, { size: 28, className: "bpb-upgrade-gate__icon" }),
|
|
8512
8516
|
/* @__PURE__ */ p("div", { className: "bpb-upgrade-gate__text", children: [
|
|
8513
8517
|
/* @__PURE__ */ l("p", { className: "bpb-upgrade-gate__title", children: t }),
|
|
8514
8518
|
/* @__PURE__ */ l("p", { className: "bpb-upgrade-gate__body", children: e })
|
|
@@ -8516,7 +8520,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8516
8520
|
] }),
|
|
8517
8521
|
/* @__PURE__ */ l("div", { className: "bpb-upgrade-gate__actions", children: n ? /* @__PURE__ */ l(ke, { variant: "primary", className: "bpb-upgrade-gate__cta", onClick: n, children: a }) : /* @__PURE__ */ l(ke, { variant: "outline", onClick: r, children: s("close") }) })
|
|
8518
8522
|
] });
|
|
8519
|
-
},
|
|
8523
|
+
}, au = ({ open: t, onOpenChange: e, onSuccess: a, onUpgrade: n }) => {
|
|
8520
8524
|
const { isOutdatedBilling: r } = ne(), { t: s } = ge();
|
|
8521
8525
|
return r ? /* @__PURE__ */ l(
|
|
8522
8526
|
Fe,
|
|
@@ -8528,21 +8532,21 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8528
8532
|
className: "bpb-scope",
|
|
8529
8533
|
children: /* @__PURE__ */ l(Rt, {})
|
|
8530
8534
|
}
|
|
8531
|
-
) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(
|
|
8532
|
-
},
|
|
8535
|
+
) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(_d, { onOpenChange: e, onSuccess: a, onUpgrade: n }) });
|
|
8536
|
+
}, _d = ({
|
|
8533
8537
|
onOpenChange: t,
|
|
8534
8538
|
onSuccess: e,
|
|
8535
8539
|
onUpgrade: a
|
|
8536
8540
|
}) => {
|
|
8537
8541
|
var D, ue, ee, ce;
|
|
8538
|
-
const { toast: n, locale: r } = ne(), { t: s } = ge(), { data: o } = $e(), { data: i } = Qt(), { data: d } = rt(), { data: c } = os(), u =
|
|
8542
|
+
const { toast: n, locale: r } = ne(), { t: s } = ge(), { data: o } = $e(), { data: i } = Qt(), { data: d } = rt(), { data: c } = os(), u = Ui(), [m, h] = J(null), g = d == null ? void 0 : d.find((M) => M.id === (o == null ? void 0 : o.plan.current.planId)), b = (o == null ? void 0 : o.plan.current.interval) ?? "month", C = (c == null ? void 0 : c.addonsReadonly) ?? !1, _ = o == null ? void 0 : o.plan.current.periodEnd, v = _ && !Xa(_) ? ct(_, r) : null, N = Re(() => {
|
|
8539
8543
|
var K;
|
|
8540
8544
|
if (!o || !i)
|
|
8541
8545
|
return null;
|
|
8542
8546
|
const M = {};
|
|
8543
8547
|
for (const G of i) {
|
|
8544
|
-
const
|
|
8545
|
-
M[G.id] = ((K =
|
|
8548
|
+
const x = o.addons[G.id];
|
|
8549
|
+
M[G.id] = ((K = x == null ? void 0 : x.next) == null ? void 0 : K.quantity) ?? (x == null ? void 0 : x.current.quantity) ?? 0;
|
|
8546
8550
|
}
|
|
8547
8551
|
return M;
|
|
8548
8552
|
}, [o, i]), S = m ?? N, T = Re(() => !i || !g ? [] : i.flatMap((M) => {
|
|
@@ -8556,14 +8560,14 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8556
8560
|
[g, b, S]
|
|
8557
8561
|
), w = ns(A ?? { plan: { planId: "", interval: b } }, {
|
|
8558
8562
|
enabled: !!A && I
|
|
8559
|
-
}), E = ((D = g == null ? void 0 : g.prices[b]) == null ? void 0 : D.currency) ?? "usd", L = ((ue = w.data) == null ? void 0 : ue.costs.immediate.amountDue) ?? 0, O = (ee = w.data) == null ? void 0 : ee.nextBillingDate, Z = O && !Xa(O) ? ct(O, r) : null, V = ((ce = g == null ? void 0 : g.prices[b]) == null ? void 0 : ce.amount) ?? 0, $ = V + k, B = g && S ?
|
|
8560
|
-
const G = i == null ? void 0 : i.find((de) => de.id === M),
|
|
8561
|
-
if (!
|
|
8563
|
+
}), E = ((D = g == null ? void 0 : g.prices[b]) == null ? void 0 : D.currency) ?? "usd", L = ((ue = w.data) == null ? void 0 : ue.costs.immediate.amountDue) ?? 0, O = (ee = w.data) == null ? void 0 : ee.nextBillingDate, Z = O && !Xa(O) ? ct(O, r) : null, V = ((ce = g == null ? void 0 : g.prices[b]) == null ? void 0 : ce.amount) ?? 0, $ = V + k, B = g && S ? Fl(g, i, S) : [], P = (M, K) => K === "bytes" ? Kt(M) : ve(M), H = (M, K) => {
|
|
8564
|
+
const G = i == null ? void 0 : i.find((de) => de.id === M), x = G == null ? void 0 : G.increments;
|
|
8565
|
+
if (!x || K <= 0)
|
|
8562
8566
|
return null;
|
|
8563
|
-
const be =
|
|
8567
|
+
const be = x.conversation_sessions ?? 0;
|
|
8564
8568
|
if (be > 0)
|
|
8565
8569
|
return s("addonsConvos", { n: ve(be * K) });
|
|
8566
|
-
const te =
|
|
8570
|
+
const te = x.file_storage ?? 0;
|
|
8567
8571
|
return te > 0 ? Kt(te * K) : null;
|
|
8568
8572
|
}, W = () => {
|
|
8569
8573
|
S && u.mutate(
|
|
@@ -8580,8 +8584,8 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8580
8584
|
/* @__PURE__ */ l("h2", { className: "bpb-manage-addons__title", children: s("addonsDialogTitle") }),
|
|
8581
8585
|
(X || T.length > 0) && /* @__PURE__ */ l("p", { className: "bpb-manage-addons__subtitle", children: g ? s("addonsSubtitleWithPlan", { planName: Ne(g.name) }) : s("addonsSubtitleGeneric") }),
|
|
8582
8586
|
X ? /* @__PURE__ */ p("div", { className: "bpb-manage-addons__loading", "aria-busy": "true", children: [
|
|
8583
|
-
/* @__PURE__ */ l(
|
|
8584
|
-
/* @__PURE__ */ l(
|
|
8587
|
+
/* @__PURE__ */ l(pe, { height: 56 }),
|
|
8588
|
+
/* @__PURE__ */ l(pe, { height: 56 })
|
|
8585
8589
|
] }) : T.length === 0 ? /* @__PURE__ */ l(
|
|
8586
8590
|
zs,
|
|
8587
8591
|
{
|
|
@@ -8596,7 +8600,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8596
8600
|
) : /* @__PURE__ */ p(Te, { children: [
|
|
8597
8601
|
/* @__PURE__ */ l("div", { className: "bpb-addons", children: T.map(({ addon: M, price: K }) => {
|
|
8598
8602
|
var de;
|
|
8599
|
-
const G = ((de = o == null ? void 0 : o.addons[M.id]) == null ? void 0 : de.current.quantity) ?? 0,
|
|
8603
|
+
const G = ((de = o == null ? void 0 : o.addons[M.id]) == null ? void 0 : de.current.quantity) ?? 0, x = (S == null ? void 0 : S[M.id]) ?? 0, be = x !== G ? x === 0 ? v ? s("addonRemovedOnDate", { activeNow: G, date: v }) : s("addonRemovedNextCycle", { activeNow: G }) : v ? s("addonChangedOnDate", { activeNow: G, pending: x, date: v }) : s("addonChangedNextCycle", { activeNow: G, pending: x }) : G > 0 ? s("addonActiveOnly", { count: G }) : null, te = H(M.id, x);
|
|
8600
8604
|
return /* @__PURE__ */ p("div", { className: "bpb-addon-row", children: [
|
|
8601
8605
|
/* @__PURE__ */ p("div", { className: "bpb-addon-row__info", children: [
|
|
8602
8606
|
/* @__PURE__ */ l("span", { className: "bpb-addon-row__name", children: gt[M.id] ? s(gt[M.id]) : ja(M.name) }),
|
|
@@ -8611,7 +8615,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8611
8615
|
{
|
|
8612
8616
|
className: j(
|
|
8613
8617
|
"bpb-addon-row__status",
|
|
8614
|
-
|
|
8618
|
+
x !== G && "bpb-addon-row__status--changed"
|
|
8615
8619
|
),
|
|
8616
8620
|
children: be
|
|
8617
8621
|
}
|
|
@@ -8620,11 +8624,11 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8620
8624
|
/* @__PURE__ */ p("div", { className: "bpb-addon-row__control", children: [
|
|
8621
8625
|
te && /* @__PURE__ */ l("span", { className: "bpb-addon-row__grant", children: te }),
|
|
8622
8626
|
/* @__PURE__ */ l(
|
|
8623
|
-
|
|
8627
|
+
vd,
|
|
8624
8628
|
{
|
|
8625
8629
|
"aria-label": `${gt[M.id] ? s(gt[M.id]) : ja(M.name)} quantity`,
|
|
8626
|
-
value:
|
|
8627
|
-
onChange: (
|
|
8630
|
+
value: x,
|
|
8631
|
+
onChange: (me) => h({ ...S ?? {}, [M.id]: me })
|
|
8628
8632
|
}
|
|
8629
8633
|
)
|
|
8630
8634
|
] })
|
|
@@ -8642,9 +8646,9 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8642
8646
|
return /* @__PURE__ */ p("div", { className: "bpb-manage-addons__limit-row", children: [
|
|
8643
8647
|
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-label", children: K ? s(K) : M.label }),
|
|
8644
8648
|
/* @__PURE__ */ p("span", { className: "bpb-manage-addons__limit-values", children: [
|
|
8645
|
-
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-now", children:
|
|
8649
|
+
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-now", children: P(M.now, M.unit) }),
|
|
8646
8650
|
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-arrow", "aria-hidden": !0, children: "→" }),
|
|
8647
|
-
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-next", children:
|
|
8651
|
+
/* @__PURE__ */ l("span", { className: "bpb-manage-addons__limit-next", children: P(M.next, M.unit) })
|
|
8648
8652
|
] })
|
|
8649
8653
|
] }, M.key);
|
|
8650
8654
|
})
|
|
@@ -8705,11 +8709,11 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8705
8709
|
] })
|
|
8706
8710
|
] })
|
|
8707
8711
|
] });
|
|
8708
|
-
},
|
|
8712
|
+
}, nu = ({ open: t, onOpenChange: e }) => {
|
|
8709
8713
|
const { isOutdatedBilling: a } = ne(), { t: n } = ge();
|
|
8710
|
-
return a ? /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(Rt, {}) }) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(
|
|
8711
|
-
},
|
|
8712
|
-
const { locale: e, analytics: a } = ne(), { t: n } = ge(), { data: r, isLoading: s, isError: o } =
|
|
8714
|
+
return a ? /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(Rt, {}) }) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(Nd, { open: t }) });
|
|
8715
|
+
}, Nd = ({ open: t }) => {
|
|
8716
|
+
const { locale: e, analytics: a } = ne(), { t: n } = ge(), { data: r, isLoading: s, isError: o } = Oi({ enabled: t }), i = (r == null ? void 0 : r.invoices) ?? [], d = {
|
|
8713
8717
|
paid: n("invoiceStatusPaid"),
|
|
8714
8718
|
open: n("invoiceStatusDue"),
|
|
8715
8719
|
draft: n("invoiceStatusDraft"),
|
|
@@ -8719,9 +8723,9 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8719
8723
|
return /* @__PURE__ */ p("div", { className: "bpb-invoices", children: [
|
|
8720
8724
|
/* @__PURE__ */ l("h2", { className: "bpb-invoices__title", children: n("invoicesTitle") }),
|
|
8721
8725
|
s ? /* @__PURE__ */ p("div", { className: "bpb-invoices__loading", "aria-busy": "true", children: [
|
|
8722
|
-
/* @__PURE__ */ l(
|
|
8723
|
-
/* @__PURE__ */ l(
|
|
8724
|
-
/* @__PURE__ */ l(
|
|
8726
|
+
/* @__PURE__ */ l(pe, { height: 52 }),
|
|
8727
|
+
/* @__PURE__ */ l(pe, { height: 52 }),
|
|
8728
|
+
/* @__PURE__ */ l(pe, { height: 52 })
|
|
8725
8729
|
] }) : o ? /* @__PURE__ */ l("p", { className: "bpb-invoices__empty", role: "alert", children: n("invoicesLoadError") }) : i.length === 0 ? /* @__PURE__ */ l("p", { className: "bpb-invoices__empty", children: n("invoicesEmpty") }) : /* @__PURE__ */ l("ul", { className: "bpb-invoices__list", children: i.map((c) => /* @__PURE__ */ p("li", { className: "bpb-invoices__row", children: [
|
|
8726
8730
|
/* @__PURE__ */ p("div", { className: "bpb-invoices__row-main", children: [
|
|
8727
8731
|
/* @__PURE__ */ l("span", { className: "bpb-invoices__date", children: ct(c.createdAt, e) }),
|
|
@@ -8744,7 +8748,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8744
8748
|
] })
|
|
8745
8749
|
] }, c.id)) })
|
|
8746
8750
|
] });
|
|
8747
|
-
},
|
|
8751
|
+
}, ru = ({ open: t, onOpenChange: e, onSuccess: a }) => {
|
|
8748
8752
|
var g;
|
|
8749
8753
|
const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: o } = ne(), { t: i } = ge(), d = ls(), c = (g = d.data) == null ? void 0 : g.clientSecret, { mutate: u, reset: m } = d;
|
|
8750
8754
|
Oe(() => {
|
|
@@ -8782,19 +8786,19 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8782
8786
|
/* @__PURE__ */ l("p", { children: i("paymentSessionError") }),
|
|
8783
8787
|
/* @__PURE__ */ l(ke, { variant: "outline", onClick: () => u(), children: i("tryAgain") })
|
|
8784
8788
|
] }) : !h || !c ? /* @__PURE__ */ p("div", { className: "bpb-payment-dialog__loading", "aria-busy": "true", children: [
|
|
8785
|
-
/* @__PURE__ */ l(
|
|
8786
|
-
/* @__PURE__ */ l(
|
|
8787
|
-
] }) : /* @__PURE__ */ l($r, { stripe: n, options: h, children: /* @__PURE__ */ l(
|
|
8789
|
+
/* @__PURE__ */ l(pe, { height: 48 }),
|
|
8790
|
+
/* @__PURE__ */ l(pe, { height: 120 })
|
|
8791
|
+
] }) : /* @__PURE__ */ l($r, { stripe: n, options: h, children: /* @__PURE__ */ l(Cd, { clientSecret: c, isDark: r, onSuccess: a }) })
|
|
8788
8792
|
] })
|
|
8789
8793
|
}
|
|
8790
8794
|
);
|
|
8791
|
-
},
|
|
8795
|
+
}, Cd = ({
|
|
8792
8796
|
clientSecret: t,
|
|
8793
8797
|
isDark: e,
|
|
8794
8798
|
onSuccess: a
|
|
8795
8799
|
}) => {
|
|
8796
|
-
var
|
|
8797
|
-
const n = Gr(), r = Kr(), { toast: s, analytics: o } = ne(), { t: i } = ge(), { data: d, isLoading: c } = rs(), { data: u, isLoading: m } = ss(), h = ds(), g = cs(), b = ((
|
|
8800
|
+
var me;
|
|
8801
|
+
const n = Gr(), r = Kr(), { toast: s, analytics: o } = ne(), { t: i } = ge(), { data: d, isLoading: c } = rs(), { data: u, isLoading: m } = ss(), h = ds(), g = cs(), b = ((me = d == null ? void 0 : d.paymentMethod) == null ? void 0 : me.card) ?? null, C = (u == null ? void 0 : u.address) ?? null, _ = (u == null ? void 0 : u.taxIds) ?? [], [v, N] = J(!1), [S, T] = J(!1), [I, k] = J(!1), [A, w] = J(!1), [E, L] = J(null), [O, Z] = J(!1), [V, $] = J(!1), [B, P] = J({}), [H, W] = J(C == null ? void 0 : C.country), [X, D] = J(_.length > 0), [ue, ee] = J(null), ce = ue ?? _.map((ae) => ({ type: ae.type, value: ae.value })), M = Ms(H), K = v || !b, G = (ae, fe) => ee(ce.map((se, Ee) => Ee === ae ? { ...se, ...fe } : se)), x = () => {
|
|
8798
8802
|
var ae;
|
|
8799
8803
|
return ee([...ce, { type: ((ae = M[0]) == null ? void 0 : ae.type) ?? "", value: "" }]);
|
|
8800
8804
|
}, be = (ae) => ee(ce.filter((fe, se) => se !== ae)), te = async () => {
|
|
@@ -8830,10 +8834,10 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8830
8834
|
return;
|
|
8831
8835
|
const { complete: fe, value: se } = await ae.getValue();
|
|
8832
8836
|
if (!fe || !se.address) {
|
|
8833
|
-
|
|
8837
|
+
P({ address: i("paymentAddressIncomplete") });
|
|
8834
8838
|
return;
|
|
8835
8839
|
}
|
|
8836
|
-
$(!0),
|
|
8840
|
+
$(!0), P({});
|
|
8837
8841
|
try {
|
|
8838
8842
|
const { address: Ee, name: st } = se, pt = ce.filter((Pe) => !!Pe.type && Pe.value.trim() !== "").map((Pe) => ({ type: Pe.type, value: Pe.value.trim() }));
|
|
8839
8843
|
await g.mutateAsync({
|
|
@@ -8850,7 +8854,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8850
8854
|
}), o.capture(we.BILLING_ADDRESS_UPDATED), s({ type: "success", message: i("paymentDetailsUpdated") }), a == null || a();
|
|
8851
8855
|
} catch (Ee) {
|
|
8852
8856
|
const st = Ee instanceof Error ? Ee : void 0, pt = Os(st, i("paymentAddressError"));
|
|
8853
|
-
|
|
8857
|
+
P(pt), pt.taxId && D(!0), s({ type: "error", message: i("paymentDetailsUpdateError") });
|
|
8854
8858
|
} finally {
|
|
8855
8859
|
$(!1);
|
|
8856
8860
|
}
|
|
@@ -8858,8 +8862,8 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8858
8862
|
return /* @__PURE__ */ p("div", { className: "bpb-payment-dialog__sections", children: [
|
|
8859
8863
|
/* @__PURE__ */ p("section", { className: "bpb-payment-dialog__section", children: [
|
|
8860
8864
|
/* @__PURE__ */ l("h3", { className: "bpb-payment-dialog__section-title", children: i("paymentMethodSection") }),
|
|
8861
|
-
c ? /* @__PURE__ */ l(
|
|
8862
|
-
!S && /* @__PURE__ */ l(
|
|
8865
|
+
c ? /* @__PURE__ */ l(pe, { height: 56 }) : K ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
8866
|
+
!S && /* @__PURE__ */ l(pe, { height: 48 }),
|
|
8863
8867
|
/* @__PURE__ */ l("div", { className: S ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ l(
|
|
8864
8868
|
Za,
|
|
8865
8869
|
{
|
|
@@ -8890,8 +8894,8 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8890
8894
|
] }),
|
|
8891
8895
|
/* @__PURE__ */ p("section", { className: "bpb-payment-dialog__section", children: [
|
|
8892
8896
|
/* @__PURE__ */ l("h3", { className: "bpb-payment-dialog__section-title", children: i("paymentBillingAddressSection") }),
|
|
8893
|
-
m ? /* @__PURE__ */ l(
|
|
8894
|
-
!O && /* @__PURE__ */ l(
|
|
8897
|
+
m ? /* @__PURE__ */ l(pe, { height: 72 }) : /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
|
|
8898
|
+
!O && /* @__PURE__ */ l(pe, { height: 120 }),
|
|
8895
8899
|
/* @__PURE__ */ l("div", { className: O ? void 0 : "bpb-payment-element--hidden", children: /* @__PURE__ */ l(
|
|
8896
8900
|
Wr,
|
|
8897
8901
|
{
|
|
@@ -8971,7 +8975,7 @@ const Bn = ({ label: t, invalid: e, className: a, id: n, ...r }) => t ? /* @__PU
|
|
|
8971
8975
|
}
|
|
8972
8976
|
)
|
|
8973
8977
|
] }, fe)),
|
|
8974
|
-
/* @__PURE__ */ l("button", { type: "button", className: "bpb-link-button bpb-tax__add", onClick:
|
|
8978
|
+
/* @__PURE__ */ l("button", { type: "button", className: "bpb-link-button bpb-tax__add", onClick: x, children: i("paymentTaxAdd") }),
|
|
8975
8979
|
B.taxId && /* @__PURE__ */ l("p", { role: "alert", className: "bpb-payment-dialog__field-error", children: B.taxId })
|
|
8976
8980
|
] })
|
|
8977
8981
|
] }),
|
|
@@ -9884,8 +9888,8 @@ Xe.ZodIssueCode = Ys.util.arrayToEnum([
|
|
|
9884
9888
|
"not_multiple_of",
|
|
9885
9889
|
"not_finite"
|
|
9886
9890
|
]);
|
|
9887
|
-
const
|
|
9888
|
-
Xe.quotelessJson =
|
|
9891
|
+
const Sd = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
9892
|
+
Xe.quotelessJson = Sd;
|
|
9889
9893
|
class pa extends Error {
|
|
9890
9894
|
get errors() {
|
|
9891
9895
|
return this.issues;
|
|
@@ -9952,7 +9956,7 @@ class pa extends Error {
|
|
|
9952
9956
|
Xe.ZodError = pa;
|
|
9953
9957
|
pa.create = (t) => new pa(t);
|
|
9954
9958
|
Object.defineProperty(gn, "__esModule", { value: !0 });
|
|
9955
|
-
const De = Xe, Tt = xa,
|
|
9959
|
+
const De = Xe, Tt = xa, kd = (t, e) => {
|
|
9956
9960
|
let a;
|
|
9957
9961
|
switch (t.code) {
|
|
9958
9962
|
case De.ZodIssueCode.invalid_type:
|
|
@@ -10008,21 +10012,21 @@ const De = Xe, Tt = xa, Cd = (t, e) => {
|
|
|
10008
10012
|
}
|
|
10009
10013
|
return { message: a };
|
|
10010
10014
|
};
|
|
10011
|
-
gn.default =
|
|
10012
|
-
var
|
|
10015
|
+
gn.default = kd;
|
|
10016
|
+
var wd = he && he.__importDefault || function(t) {
|
|
10013
10017
|
return t && t.__esModule ? t : { default: t };
|
|
10014
10018
|
};
|
|
10015
10019
|
Object.defineProperty(kt, "__esModule", { value: !0 });
|
|
10016
10020
|
kt.defaultErrorMap = void 0;
|
|
10017
|
-
kt.setErrorMap =
|
|
10018
|
-
kt.getErrorMap =
|
|
10019
|
-
const Js =
|
|
10021
|
+
kt.setErrorMap = Td;
|
|
10022
|
+
kt.getErrorMap = Id;
|
|
10023
|
+
const Js = wd(gn);
|
|
10020
10024
|
kt.defaultErrorMap = Js.default;
|
|
10021
10025
|
let Qs = Js.default;
|
|
10022
|
-
function
|
|
10026
|
+
function Td(t) {
|
|
10023
10027
|
Qs = t;
|
|
10024
10028
|
}
|
|
10025
|
-
function
|
|
10029
|
+
function Id() {
|
|
10026
10030
|
return Qs;
|
|
10027
10031
|
}
|
|
10028
10032
|
var ar = {};
|
|
@@ -10399,16 +10403,16 @@ class oe {
|
|
|
10399
10403
|
f.ZodType = oe;
|
|
10400
10404
|
f.Schema = oe;
|
|
10401
10405
|
f.ZodSchema = oe;
|
|
10402
|
-
const
|
|
10406
|
+
const Ad = /^c[^\s-]{8,}$/i, xd = /^[0-9a-z]+$/, Pd = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Dd = /^[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, Rd = /^[a-z0-9_-]{21}$/i, Ed = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ld = /^[-+]?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)?)??$/, Od = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Fd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10403
10407
|
let An;
|
|
10404
|
-
const
|
|
10408
|
+
const Md = /^(?:(?: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])$/, Bd = /^(?:(?: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])$/, Ud = /^(([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]))$/, zd = /^(([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])$/, jd = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Vd = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, eo = "((\\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])))", Zd = new RegExp(`^${eo}$`);
|
|
10405
10409
|
function to(t) {
|
|
10406
10410
|
let e = "[0-5]\\d";
|
|
10407
10411
|
t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`);
|
|
10408
10412
|
const a = t.precision ? "+" : "?";
|
|
10409
10413
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${a}`;
|
|
10410
10414
|
}
|
|
10411
|
-
function
|
|
10415
|
+
function qd(t) {
|
|
10412
10416
|
return new RegExp(`^${to(t)}$`);
|
|
10413
10417
|
}
|
|
10414
10418
|
function ao(t) {
|
|
@@ -10416,11 +10420,11 @@ function ao(t) {
|
|
|
10416
10420
|
const a = [];
|
|
10417
10421
|
return a.push(t.local ? "Z?" : "Z"), t.offset && a.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${a.join("|")})`, new RegExp(`^${e}$`);
|
|
10418
10422
|
}
|
|
10419
|
-
function
|
|
10420
|
-
return !!((e === "v4" || !e) &&
|
|
10423
|
+
function Wd(t, e) {
|
|
10424
|
+
return !!((e === "v4" || !e) && Md.test(t) || (e === "v6" || !e) && Ud.test(t));
|
|
10421
10425
|
}
|
|
10422
|
-
function
|
|
10423
|
-
if (!
|
|
10426
|
+
function Gd(t, e) {
|
|
10427
|
+
if (!Ed.test(t))
|
|
10424
10428
|
return !1;
|
|
10425
10429
|
try {
|
|
10426
10430
|
const [a] = t.split(".");
|
|
@@ -10432,8 +10436,8 @@ function qd(t, e) {
|
|
|
10432
10436
|
return !1;
|
|
10433
10437
|
}
|
|
10434
10438
|
}
|
|
10435
|
-
function
|
|
10436
|
-
return !!((e === "v4" || !e) &&
|
|
10439
|
+
function Kd(t, e) {
|
|
10440
|
+
return !!((e === "v4" || !e) && Bd.test(t) || (e === "v6" || !e) && zd.test(t));
|
|
10437
10441
|
}
|
|
10438
10442
|
class We extends oe {
|
|
10439
10443
|
_parse(e) {
|
|
@@ -10484,43 +10488,43 @@ class We extends oe {
|
|
|
10484
10488
|
message: s.message
|
|
10485
10489
|
}), n.dirty());
|
|
10486
10490
|
} else if (s.kind === "email")
|
|
10487
|
-
|
|
10491
|
+
Od.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10488
10492
|
validation: "email",
|
|
10489
10493
|
code: R.ZodIssueCode.invalid_string,
|
|
10490
10494
|
message: s.message
|
|
10491
10495
|
}), n.dirty());
|
|
10492
10496
|
else if (s.kind === "emoji")
|
|
10493
|
-
An || (An = new RegExp(
|
|
10497
|
+
An || (An = new RegExp(Fd, "u")), An.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10494
10498
|
validation: "emoji",
|
|
10495
10499
|
code: R.ZodIssueCode.invalid_string,
|
|
10496
10500
|
message: s.message
|
|
10497
10501
|
}), n.dirty());
|
|
10498
10502
|
else if (s.kind === "uuid")
|
|
10499
|
-
|
|
10503
|
+
Dd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10500
10504
|
validation: "uuid",
|
|
10501
10505
|
code: R.ZodIssueCode.invalid_string,
|
|
10502
10506
|
message: s.message
|
|
10503
10507
|
}), n.dirty());
|
|
10504
10508
|
else if (s.kind === "nanoid")
|
|
10505
|
-
|
|
10509
|
+
Rd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10506
10510
|
validation: "nanoid",
|
|
10507
10511
|
code: R.ZodIssueCode.invalid_string,
|
|
10508
10512
|
message: s.message
|
|
10509
10513
|
}), n.dirty());
|
|
10510
10514
|
else if (s.kind === "cuid")
|
|
10511
|
-
|
|
10515
|
+
Ad.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10512
10516
|
validation: "cuid",
|
|
10513
10517
|
code: R.ZodIssueCode.invalid_string,
|
|
10514
10518
|
message: s.message
|
|
10515
10519
|
}), n.dirty());
|
|
10516
10520
|
else if (s.kind === "cuid2")
|
|
10517
|
-
|
|
10521
|
+
xd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10518
10522
|
validation: "cuid2",
|
|
10519
10523
|
code: R.ZodIssueCode.invalid_string,
|
|
10520
10524
|
message: s.message
|
|
10521
10525
|
}), n.dirty());
|
|
10522
10526
|
else if (s.kind === "ulid")
|
|
10523
|
-
|
|
10527
|
+
Pd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10524
10528
|
validation: "ulid",
|
|
10525
10529
|
code: R.ZodIssueCode.invalid_string,
|
|
10526
10530
|
message: s.message
|
|
@@ -10555,35 +10559,35 @@ class We extends oe {
|
|
|
10555
10559
|
code: R.ZodIssueCode.invalid_string,
|
|
10556
10560
|
validation: "datetime",
|
|
10557
10561
|
message: s.message
|
|
10558
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
10562
|
+
}), n.dirty()) : s.kind === "date" ? Zd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10559
10563
|
code: R.ZodIssueCode.invalid_string,
|
|
10560
10564
|
validation: "date",
|
|
10561
10565
|
message: s.message
|
|
10562
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
10566
|
+
}), n.dirty()) : s.kind === "time" ? qd(s).test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10563
10567
|
code: R.ZodIssueCode.invalid_string,
|
|
10564
10568
|
validation: "time",
|
|
10565
10569
|
message: s.message
|
|
10566
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
10570
|
+
}), n.dirty()) : s.kind === "duration" ? Ld.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10567
10571
|
validation: "duration",
|
|
10568
10572
|
code: R.ZodIssueCode.invalid_string,
|
|
10569
10573
|
message: s.message
|
|
10570
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
10574
|
+
}), n.dirty()) : s.kind === "ip" ? Wd(e.data, s.version) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10571
10575
|
validation: "ip",
|
|
10572
10576
|
code: R.ZodIssueCode.invalid_string,
|
|
10573
10577
|
message: s.message
|
|
10574
|
-
}), n.dirty()) : s.kind === "jwt" ?
|
|
10578
|
+
}), n.dirty()) : s.kind === "jwt" ? Gd(e.data, s.alg) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10575
10579
|
validation: "jwt",
|
|
10576
10580
|
code: R.ZodIssueCode.invalid_string,
|
|
10577
10581
|
message: s.message
|
|
10578
|
-
}), n.dirty()) : s.kind === "cidr" ?
|
|
10582
|
+
}), n.dirty()) : s.kind === "cidr" ? Kd(e.data, s.version) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10579
10583
|
validation: "cidr",
|
|
10580
10584
|
code: R.ZodIssueCode.invalid_string,
|
|
10581
10585
|
message: s.message
|
|
10582
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
10586
|
+
}), n.dirty()) : s.kind === "base64" ? jd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10583
10587
|
validation: "base64",
|
|
10584
10588
|
code: R.ZodIssueCode.invalid_string,
|
|
10585
10589
|
message: s.message
|
|
10586
|
-
}), n.dirty()) : s.kind === "base64url" ?
|
|
10590
|
+
}), n.dirty()) : s.kind === "base64url" ? Vd.test(e.data) || (r = this._getOrReturnCtx(e, r), (0, y.addIssueToContext)(r, {
|
|
10587
10591
|
validation: "base64url",
|
|
10588
10592
|
code: R.ZodIssueCode.invalid_string,
|
|
10589
10593
|
message: s.message
|
|
@@ -10819,7 +10823,7 @@ We.create = (t) => new We({
|
|
|
10819
10823
|
coerce: (t == null ? void 0 : t.coerce) ?? !1,
|
|
10820
10824
|
...re(t)
|
|
10821
10825
|
});
|
|
10822
|
-
function
|
|
10826
|
+
function $d(t, e) {
|
|
10823
10827
|
const a = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, r = a > n ? a : n, s = Number.parseInt(t.toFixed(r).replace(".", "")), o = Number.parseInt(e.toFixed(r).replace(".", ""));
|
|
10824
10828
|
return s % o / 10 ** r;
|
|
10825
10829
|
}
|
|
@@ -10858,7 +10862,7 @@ class vt extends oe {
|
|
|
10858
10862
|
inclusive: s.inclusive,
|
|
10859
10863
|
exact: !1,
|
|
10860
10864
|
message: s.message
|
|
10861
|
-
}), r.dirty()) : s.kind === "multipleOf" ?
|
|
10865
|
+
}), r.dirty()) : s.kind === "multipleOf" ? $d(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), (0, y.addIssueToContext)(n, {
|
|
10862
10866
|
code: R.ZodIssueCode.not_multiple_of,
|
|
10863
10867
|
multipleOf: s.value,
|
|
10864
10868
|
message: s.message
|
|
@@ -12681,85 +12685,85 @@ var Y;
|
|
|
12681
12685
|
(function(t) {
|
|
12682
12686
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
12683
12687
|
})(Y || (f.ZodFirstPartyTypeKind = Y = {}));
|
|
12684
|
-
const
|
|
12688
|
+
const Hd = (t, e = {
|
|
12685
12689
|
message: `Input not instance of ${t.name}`
|
|
12686
12690
|
}) => ro((a) => a instanceof t, e);
|
|
12687
|
-
f.instanceof =
|
|
12691
|
+
f.instanceof = Hd;
|
|
12688
12692
|
const so = We.create;
|
|
12689
12693
|
f.string = so;
|
|
12690
12694
|
const oo = vt.create;
|
|
12691
12695
|
f.number = oo;
|
|
12692
|
-
const
|
|
12693
|
-
f.nan =
|
|
12694
|
-
const
|
|
12695
|
-
f.bigint =
|
|
12696
|
+
const Yd = nn.create;
|
|
12697
|
+
f.nan = Yd;
|
|
12698
|
+
const Jd = _t.create;
|
|
12699
|
+
f.bigint = Jd;
|
|
12696
12700
|
const io = ma.create;
|
|
12697
12701
|
f.boolean = io;
|
|
12698
|
-
const
|
|
12699
|
-
f.date =
|
|
12700
|
-
const
|
|
12701
|
-
f.symbol =
|
|
12702
|
-
const
|
|
12703
|
-
f.undefined =
|
|
12704
|
-
const
|
|
12705
|
-
f.null =
|
|
12706
|
-
const
|
|
12707
|
-
f.any =
|
|
12708
|
-
const
|
|
12709
|
-
f.unknown =
|
|
12710
|
-
const
|
|
12711
|
-
f.never =
|
|
12712
|
-
const
|
|
12713
|
-
f.void =
|
|
12714
|
-
const
|
|
12715
|
-
f.array =
|
|
12716
|
-
const
|
|
12717
|
-
f.object =
|
|
12718
|
-
const
|
|
12719
|
-
f.strictObject =
|
|
12720
|
-
const
|
|
12721
|
-
f.union =
|
|
12722
|
-
const
|
|
12723
|
-
f.discriminatedUnion =
|
|
12724
|
-
const
|
|
12725
|
-
f.intersection =
|
|
12726
|
-
const
|
|
12727
|
-
f.tuple =
|
|
12728
|
-
const
|
|
12729
|
-
f.record =
|
|
12730
|
-
const
|
|
12731
|
-
f.map =
|
|
12732
|
-
const
|
|
12733
|
-
f.set =
|
|
12734
|
-
const
|
|
12735
|
-
f.function =
|
|
12736
|
-
const
|
|
12737
|
-
f.lazy =
|
|
12738
|
-
const
|
|
12739
|
-
f.literal =
|
|
12740
|
-
const
|
|
12741
|
-
f.enum =
|
|
12742
|
-
const
|
|
12743
|
-
f.nativeEnum =
|
|
12744
|
-
const
|
|
12745
|
-
f.promise =
|
|
12702
|
+
const Qd = xt.create;
|
|
12703
|
+
f.date = Qd;
|
|
12704
|
+
const Xd = en.create;
|
|
12705
|
+
f.symbol = Xd;
|
|
12706
|
+
const ec = ha.create;
|
|
12707
|
+
f.undefined = ec;
|
|
12708
|
+
const tc = ga.create;
|
|
12709
|
+
f.null = tc;
|
|
12710
|
+
const ac = Ht.create;
|
|
12711
|
+
f.any = ac;
|
|
12712
|
+
const nc = At.create;
|
|
12713
|
+
f.unknown = nc;
|
|
12714
|
+
const rc = ut.create;
|
|
12715
|
+
f.never = rc;
|
|
12716
|
+
const sc = tn.create;
|
|
12717
|
+
f.void = sc;
|
|
12718
|
+
const oc = Ge.create;
|
|
12719
|
+
f.array = oc;
|
|
12720
|
+
const ic = Se.create;
|
|
12721
|
+
f.object = ic;
|
|
12722
|
+
const lc = Se.strictCreate;
|
|
12723
|
+
f.strictObject = lc;
|
|
12724
|
+
const dc = ba.create;
|
|
12725
|
+
f.union = dc;
|
|
12726
|
+
const cc = fn.create;
|
|
12727
|
+
f.discriminatedUnion = cc;
|
|
12728
|
+
const uc = fa.create;
|
|
12729
|
+
f.intersection = uc;
|
|
12730
|
+
const pc = nt.create;
|
|
12731
|
+
f.tuple = pc;
|
|
12732
|
+
const mc = ya.create;
|
|
12733
|
+
f.record = mc;
|
|
12734
|
+
const hc = an.create;
|
|
12735
|
+
f.map = hc;
|
|
12736
|
+
const gc = Pt.create;
|
|
12737
|
+
f.set = gc;
|
|
12738
|
+
const bc = Gt.create;
|
|
12739
|
+
f.function = bc;
|
|
12740
|
+
const fc = va.create;
|
|
12741
|
+
f.lazy = fc;
|
|
12742
|
+
const yc = _a.create;
|
|
12743
|
+
f.literal = yc;
|
|
12744
|
+
const vc = Nt.create;
|
|
12745
|
+
f.enum = vc;
|
|
12746
|
+
const _c = Na.create;
|
|
12747
|
+
f.nativeEnum = _c;
|
|
12748
|
+
const Nc = Yt.create;
|
|
12749
|
+
f.promise = Nc;
|
|
12746
12750
|
const lo = Ke.create;
|
|
12747
12751
|
f.effect = lo;
|
|
12748
12752
|
f.transformer = lo;
|
|
12749
|
-
const
|
|
12750
|
-
f.optional =
|
|
12751
|
-
const
|
|
12752
|
-
f.nullable =
|
|
12753
|
-
const
|
|
12754
|
-
f.preprocess =
|
|
12755
|
-
const
|
|
12756
|
-
f.pipeline =
|
|
12757
|
-
const
|
|
12758
|
-
f.ostring =
|
|
12759
|
-
const
|
|
12760
|
-
f.onumber =
|
|
12761
|
-
const
|
|
12762
|
-
f.oboolean =
|
|
12753
|
+
const Cc = et.create;
|
|
12754
|
+
f.optional = Cc;
|
|
12755
|
+
const Sc = Ct.create;
|
|
12756
|
+
f.nullable = Sc;
|
|
12757
|
+
const kc = Ke.createWithPreprocess;
|
|
12758
|
+
f.preprocess = kc;
|
|
12759
|
+
const wc = Pa.create;
|
|
12760
|
+
f.pipeline = wc;
|
|
12761
|
+
const Tc = () => so().optional();
|
|
12762
|
+
f.ostring = Tc;
|
|
12763
|
+
const Ic = () => oo().optional();
|
|
12764
|
+
f.onumber = Ic;
|
|
12765
|
+
const Ac = () => io().optional();
|
|
12766
|
+
f.oboolean = Ac;
|
|
12763
12767
|
f.coerce = {
|
|
12764
12768
|
string: (t) => We.create({ ...t, coerce: !0 }),
|
|
12765
12769
|
number: (t) => vt.create({ ...t, coerce: !0 }),
|
|
@@ -13182,7 +13186,7 @@ var co = {};
|
|
|
13182
13186
|
};
|
|
13183
13187
|
Object.defineProperty(t, "__esModule", { value: !0 }), a(cn, t), a(un, t), a($t, t), a(Gs, t), a(pn, t), a(ze, t), a(mn, t), a(Ks, t);
|
|
13184
13188
|
})(Ws);
|
|
13185
|
-
const
|
|
13189
|
+
const xc = [
|
|
13186
13190
|
{ key: "conversation_sessions", label: "Conversations", unit: "count" },
|
|
13187
13191
|
{ key: "ai_spend", label: "AI spend", unit: "nano-usd" },
|
|
13188
13192
|
{ key: "table_rows", label: "Table rows", unit: "count" },
|
|
@@ -13211,12 +13215,12 @@ function uo(t, e) {
|
|
|
13211
13215
|
function rr(t) {
|
|
13212
13216
|
return t >= 90 ? "critical" : t >= 75 ? "warning" : "normal";
|
|
13213
13217
|
}
|
|
13214
|
-
const
|
|
13215
|
-
function
|
|
13216
|
-
return !
|
|
13218
|
+
const Pc = Ws.NON_RESETTING_BILLING_FEATURE_IDS;
|
|
13219
|
+
function Dc(t) {
|
|
13220
|
+
return !Pc.includes(t);
|
|
13217
13221
|
}
|
|
13218
13222
|
function yn(t) {
|
|
13219
|
-
return t ?
|
|
13223
|
+
return t ? xc.flatMap(({ key: e, label: a, unit: n }) => {
|
|
13220
13224
|
const r = t[e];
|
|
13221
13225
|
if (!r || r.quota <= 0)
|
|
13222
13226
|
return [];
|
|
@@ -13230,16 +13234,16 @@ function yn(t) {
|
|
|
13230
13234
|
quota: r.quota,
|
|
13231
13235
|
remaining: Math.max(0, r.quota - s),
|
|
13232
13236
|
pct: o,
|
|
13233
|
-
resets:
|
|
13237
|
+
resets: Dc(e)
|
|
13234
13238
|
}
|
|
13235
13239
|
];
|
|
13236
13240
|
}).sort((e, a) => a.pct - e.pct) : [];
|
|
13237
13241
|
}
|
|
13238
|
-
const zr = "outgrow-free",
|
|
13239
|
-
function
|
|
13242
|
+
const zr = "outgrow-free", Rc = 0.75, Ec = 5;
|
|
13243
|
+
function Lc(t, e) {
|
|
13240
13244
|
return t.prices[e] ?? (e === "month" ? t.prices.year : t.prices.month) ?? null;
|
|
13241
13245
|
}
|
|
13242
|
-
function
|
|
13246
|
+
function Oc(t, e) {
|
|
13243
13247
|
var r, s;
|
|
13244
13248
|
const a = (r = t.prices.month) == null ? void 0 : r.amount;
|
|
13245
13249
|
if (e === "month")
|
|
@@ -13247,7 +13251,7 @@ function Ec(t, e) {
|
|
|
13247
13251
|
const n = ((s = t.prices.year) == null ? void 0 : s.amount) ?? (a === void 0 ? void 0 : a * 12);
|
|
13248
13252
|
return n === void 0 ? null : n / 12;
|
|
13249
13253
|
}
|
|
13250
|
-
const
|
|
13254
|
+
const su = ({
|
|
13251
13255
|
open: t,
|
|
13252
13256
|
onOpenChange: e,
|
|
13253
13257
|
onSelectPlan: a,
|
|
@@ -13258,7 +13262,7 @@ const nu = ({
|
|
|
13258
13262
|
period: i
|
|
13259
13263
|
}) => {
|
|
13260
13264
|
var $, B;
|
|
13261
|
-
const { isOutdatedBilling: d, analytics: c, scope: u } = ne(), { t: m } = ge(), { data: h } = rt(), { data: g } = Qt(), { data: b } = $e({ enabled: !d }), { data: C } = Xt({ period: i, enabled: !d }), _ = t !== void 0, [v, N] = J(!1), S = h == null ? void 0 : h.find((
|
|
13265
|
+
const { isOutdatedBilling: d, analytics: c, scope: u } = ne(), { t: m } = ge(), { data: h } = rt(), { data: g } = Qt(), { data: b } = $e({ enabled: !d }), { data: C } = Xt({ period: i, enabled: !d }), _ = t !== void 0, [v, N] = J(!1), S = h == null ? void 0 : h.find((P) => P.id === (b == null ? void 0 : b.plan.current.planId)), T = b ? S ? _e(S) === "community" : !0 : !1, I = Re(() => yn(C).find((P) => P.key === "conversation_sessions"), [C]), k = !_ && !d && T && !!I && I.pct / 100 >= Rc && !v && !Zs(zr, u, "modal"), A = _ ? !!t : k;
|
|
13262
13266
|
Oe(() => {
|
|
13263
13267
|
A && c.capture(we.PLAN_PICKER_VIEWED, {
|
|
13264
13268
|
source: _ ? "outgrow_free" : "outgrow_free_auto",
|
|
@@ -13267,10 +13271,10 @@ const nu = ({
|
|
|
13267
13271
|
}, [A, _, c]);
|
|
13268
13272
|
const w = () => {
|
|
13269
13273
|
_ || (qs(zr, u, "modal"), N(!0)), e == null || e(!1);
|
|
13270
|
-
}, E = Re(() => h ? h.filter((
|
|
13271
|
-
const H = _e(
|
|
13274
|
+
}, E = Re(() => h ? h.filter((P) => {
|
|
13275
|
+
const H = _e(P);
|
|
13272
13276
|
return H !== "community" && H !== "enterprise" && H !== "managed";
|
|
13273
|
-
}).sort((
|
|
13277
|
+
}).sort((P, H) => Wt.indexOf(_e(P)) - Wt.indexOf(_e(H))) : [], [h]), L = ((B = ($ = h == null ? void 0 : h.find((P) => _e(P) === "enterprise")) == null ? void 0 : $.metadata) == null ? void 0 : B.contact_url) ?? Is;
|
|
13274
13278
|
if (d || !A)
|
|
13275
13279
|
return null;
|
|
13276
13280
|
const O = (I == null ? void 0 : I.quota) ?? (S == null ? void 0 : S.features.conversation_sessions) ?? 100, Z = (I == null ? void 0 : I.used) ?? 0, V = I && I.pct > 0 ? Math.min(100, Math.max(5, Math.round(I.pct))) : 0;
|
|
@@ -13308,17 +13312,17 @@ const nu = ({
|
|
|
13308
13312
|
}
|
|
13309
13313
|
) })
|
|
13310
13314
|
] }),
|
|
13311
|
-
/* @__PURE__ */ l("div", { className: "bpb-outgrow__grid", children: E.map((
|
|
13312
|
-
const W = _e(
|
|
13315
|
+
/* @__PURE__ */ l("div", { className: "bpb-outgrow__grid", children: E.map((P, H) => {
|
|
13316
|
+
const W = _e(P), X = Lc(P, r), D = Oc(P, r), ue = W === n || P.id === n, ee = P.features.conversation_sessions, ce = Gn(g, P, r), M = H > 0 ? E[H - 1] : void 0, K = (s[W] ?? $n[W]).slice(0, Ec);
|
|
13313
13317
|
return /* @__PURE__ */ p(
|
|
13314
13318
|
"div",
|
|
13315
13319
|
{
|
|
13316
13320
|
className: j("bpb-plan-card", ue && "bpb-plan-card--highlighted bpb-glow"),
|
|
13317
|
-
"data-plan-id":
|
|
13321
|
+
"data-plan-id": P.id,
|
|
13318
13322
|
children: [
|
|
13319
13323
|
/* @__PURE__ */ p("div", { className: "bpb-plan-card__header", children: [
|
|
13320
13324
|
/* @__PURE__ */ p("h3", { className: "bpb-plan-card__name", children: [
|
|
13321
|
-
Ne(
|
|
13325
|
+
Ne(P.name),
|
|
13322
13326
|
ue && /* @__PURE__ */ l(Ja, { className: "bpb-plan-card__badge", children: m("upgradeRecommended") })
|
|
13323
13327
|
] }),
|
|
13324
13328
|
/* @__PURE__ */ l("div", { className: "bpb-plan-card__price", children: D !== null && X ? /* @__PURE__ */ p(Te, { children: [
|
|
@@ -13353,13 +13357,13 @@ const nu = ({
|
|
|
13353
13357
|
block: !0,
|
|
13354
13358
|
onClick: () => {
|
|
13355
13359
|
c.capture(we.PLAN_UPGRADE_INITIATED, {
|
|
13356
|
-
plan_name: Ne(
|
|
13360
|
+
plan_name: Ne(P.name),
|
|
13357
13361
|
interval: r,
|
|
13358
13362
|
source: "outgrow_free"
|
|
13359
|
-
}), a(
|
|
13363
|
+
}), a(P.id, r), w();
|
|
13360
13364
|
},
|
|
13361
13365
|
children: [
|
|
13362
|
-
m("outgrowUpgradeTo", { planName: Ne(
|
|
13366
|
+
m("outgrowUpgradeTo", { planName: Ne(P.name) }),
|
|
13363
13367
|
ue && /* @__PURE__ */ l(Xn, { size: 15 })
|
|
13364
13368
|
]
|
|
13365
13369
|
}
|
|
@@ -13367,16 +13371,16 @@ const nu = ({
|
|
|
13367
13371
|
/* @__PURE__ */ p("ul", { className: "bpb-plan-card__features", children: [
|
|
13368
13372
|
M && /* @__PURE__ */ l("li", { className: "bpb-outgrow__features-lead", children: m("outgrowEverythingIn", { planName: Ne(M.name) }) }),
|
|
13369
13373
|
K.map((G) => {
|
|
13370
|
-
const
|
|
13374
|
+
const x = er(G), be = Kn[G], te = be !== void 0 ? m(be.label) : G, de = (o == null ? void 0 : o[G]) ?? (be !== void 0 ? m(be.desc) : void 0);
|
|
13371
13375
|
return /* @__PURE__ */ p("li", { children: [
|
|
13372
|
-
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ l(
|
|
13376
|
+
/* @__PURE__ */ l("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ l(x, { size: 13 }) }),
|
|
13373
13377
|
de ? /* @__PURE__ */ l(Qa, { label: te, children: de }) : /* @__PURE__ */ l("span", { children: te })
|
|
13374
13378
|
] }, G);
|
|
13375
13379
|
})
|
|
13376
13380
|
] })
|
|
13377
13381
|
]
|
|
13378
13382
|
},
|
|
13379
|
-
|
|
13383
|
+
P.id
|
|
13380
13384
|
);
|
|
13381
13385
|
}) }),
|
|
13382
13386
|
/* @__PURE__ */ p("footer", { className: "bpb-outgrow__footer", children: [
|
|
@@ -13400,7 +13404,7 @@ const nu = ({
|
|
|
13400
13404
|
)
|
|
13401
13405
|
] })
|
|
13402
13406
|
] }) });
|
|
13403
|
-
}, dt = (t, e) => e === "bytes" ? Kt(t) : e === "nano-usd" ? `$${(t / tt).toFixed(2)}` : ve(t),
|
|
13407
|
+
}, dt = (t, e) => e === "bytes" ? Kt(t) : e === "nano-usd" ? `$${(t / tt).toFixed(2)}` : ve(t), Fc = (t, e) => {
|
|
13404
13408
|
const a = /* @__PURE__ */ new Date();
|
|
13405
13409
|
return Array.from({ length: t }, (n, r) => {
|
|
13406
13410
|
const s = new Date(Date.UTC(a.getUTCFullYear(), a.getUTCMonth() - r, 1));
|
|
@@ -13409,12 +13413,12 @@ const nu = ({
|
|
|
13409
13413
|
label: s.toLocaleDateString(e, { month: "long", year: "numeric", timeZone: "UTC" })
|
|
13410
13414
|
};
|
|
13411
13415
|
});
|
|
13412
|
-
},
|
|
13413
|
-
const { data: e, isLoading: a, isError: n } =
|
|
13416
|
+
}, Mc = ({ period: t }) => {
|
|
13417
|
+
const { data: e, isLoading: a, isError: n } = Mi("ai_spend", { period: t }), { t: r } = ge();
|
|
13414
13418
|
if (n)
|
|
13415
13419
|
return null;
|
|
13416
13420
|
if (a)
|
|
13417
|
-
return /* @__PURE__ */ l(
|
|
13421
|
+
return /* @__PURE__ */ l(pe, { height: 96 });
|
|
13418
13422
|
if (!e || e.length === 0)
|
|
13419
13423
|
return /* @__PURE__ */ l("p", { className: "bpb-usage__group-hint", children: r("dashboardNoBotSpend") });
|
|
13420
13424
|
const s = Math.max(...e.map((o) => o.value), 1);
|
|
@@ -13481,7 +13485,7 @@ const nu = ({
|
|
|
13481
13485
|
}
|
|
13482
13486
|
)
|
|
13483
13487
|
] });
|
|
13484
|
-
},
|
|
13488
|
+
}, ou = ({
|
|
13485
13489
|
period: t,
|
|
13486
13490
|
showPeriodSelector: e = !0,
|
|
13487
13491
|
periodMonths: a = 12,
|
|
@@ -13489,7 +13493,7 @@ const nu = ({
|
|
|
13489
13493
|
onIncreaseLimits: r
|
|
13490
13494
|
}) => {
|
|
13491
13495
|
var Z;
|
|
13492
|
-
const { isOutdatedBilling: s, locale: o } = ne(), { t: i } = ge(), d = Re(() =>
|
|
13496
|
+
const { isOutdatedBilling: s, locale: o } = ne(), { t: i } = ge(), d = Re(() => Fc(a, o), [a, o]), [c, u] = J(t ?? ((Z = d[0]) == null ? void 0 : Z.value) ?? ""), m = Bi(), h = Math.max(
|
|
13493
13497
|
0,
|
|
13494
13498
|
d.findIndex((V) => V.value === c)
|
|
13495
13499
|
), g = (V) => {
|
|
@@ -13500,8 +13504,8 @@ const nu = ({
|
|
|
13500
13504
|
return /* @__PURE__ */ l("div", { className: j("bpb-usage bpb-scope", n), children: /* @__PURE__ */ l(Rt, {}) });
|
|
13501
13505
|
if (C)
|
|
13502
13506
|
return /* @__PURE__ */ p("div", { className: j("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
|
|
13503
|
-
/* @__PURE__ */ l(
|
|
13504
|
-
/* @__PURE__ */ l(
|
|
13507
|
+
/* @__PURE__ */ l(pe, { height: 80 }),
|
|
13508
|
+
/* @__PURE__ */ l(pe, { height: 140 })
|
|
13505
13509
|
] });
|
|
13506
13510
|
if (_ || !b)
|
|
13507
13511
|
return /* @__PURE__ */ l("div", { className: j("bpb-usage bpb-scope", n), children: /* @__PURE__ */ l("p", { className: "bpb-usage__error", role: "alert", children: i("dashboardLoadError") }) });
|
|
@@ -13528,7 +13532,7 @@ const nu = ({
|
|
|
13528
13532
|
}
|
|
13529
13533
|
),
|
|
13530
13534
|
/* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
|
|
13531
|
-
/* @__PURE__ */ l(
|
|
13535
|
+
/* @__PURE__ */ l($l, { size: 15, className: "bpb-usage__period-icon" }),
|
|
13532
13536
|
/* @__PURE__ */ l(
|
|
13533
13537
|
"select",
|
|
13534
13538
|
{
|
|
@@ -13600,11 +13604,11 @@ const nu = ({
|
|
|
13600
13604
|
) }),
|
|
13601
13605
|
m && /* @__PURE__ */ p("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
|
|
13602
13606
|
/* @__PURE__ */ l("span", { className: "bpb-usage__subhead", children: i("dashboardAiByBot") }),
|
|
13603
|
-
/* @__PURE__ */ l(
|
|
13607
|
+
/* @__PURE__ */ l(Mc, { period: c })
|
|
13604
13608
|
] })
|
|
13605
13609
|
] })
|
|
13606
13610
|
] });
|
|
13607
|
-
}, jr = "usage-banner",
|
|
13611
|
+
}, jr = "usage-banner", iu = ({
|
|
13608
13612
|
position: t = "inline",
|
|
13609
13613
|
threshold: e = 0.9,
|
|
13610
13614
|
onUpgrade: a,
|
|
@@ -13666,7 +13670,7 @@ const nu = ({
|
|
|
13666
13670
|
),
|
|
13667
13671
|
!a && /* @__PURE__ */ p(Te, { children: [
|
|
13668
13672
|
/* @__PURE__ */ l(
|
|
13669
|
-
|
|
13673
|
+
od,
|
|
13670
13674
|
{
|
|
13671
13675
|
open: C,
|
|
13672
13676
|
onOpenChange: _,
|
|
@@ -13676,7 +13680,7 @@ const nu = ({
|
|
|
13676
13680
|
}
|
|
13677
13681
|
),
|
|
13678
13682
|
v && /* @__PURE__ */ l(
|
|
13679
|
-
|
|
13683
|
+
yd,
|
|
13680
13684
|
{
|
|
13681
13685
|
open: !!v,
|
|
13682
13686
|
onOpenChange: (O) => !O && N(null),
|
|
@@ -13690,7 +13694,7 @@ const nu = ({
|
|
|
13690
13694
|
)
|
|
13691
13695
|
] })
|
|
13692
13696
|
] });
|
|
13693
|
-
},
|
|
13697
|
+
}, lu = ({ Icon: t, title: e, description: a, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: j("bpb-action-card bpb-scope", r), onClick: n, children: [
|
|
13694
13698
|
/* @__PURE__ */ p("div", { className: "bpb-action-card__header", children: [
|
|
13695
13699
|
/* @__PURE__ */ l(t, { size: 20 }),
|
|
13696
13700
|
e
|
|
@@ -13725,13 +13729,13 @@ const nu = ({
|
|
|
13725
13729
|
]
|
|
13726
13730
|
}
|
|
13727
13731
|
);
|
|
13728
|
-
},
|
|
13732
|
+
}, du = ({ onManage: t, className: e }) => {
|
|
13729
13733
|
var C, _;
|
|
13730
13734
|
const { isOutdatedBilling: a } = ne(), { t: n } = ge(), { data: r, isLoading: s } = $e({ enabled: !a }), { data: o, isLoading: i } = rt();
|
|
13731
13735
|
if (a)
|
|
13732
13736
|
return /* @__PURE__ */ l(po, { isAddons: !1, className: e });
|
|
13733
13737
|
if (s || i)
|
|
13734
|
-
return /* @__PURE__ */ l(
|
|
13738
|
+
return /* @__PURE__ */ l(pe, { height: 84, rounded: !0, className: j("bpb-scope", e) });
|
|
13735
13739
|
const d = r == null ? void 0 : r.plan.current, c = o == null ? void 0 : o.find((v) => v.id === (d == null ? void 0 : d.planId)), u = (d == null ? void 0 : d.interval) ?? "month", m = ((C = c == null ? void 0 : c.prices[u]) == null ? void 0 : C.amount) ?? 0, h = ((_ = c == null ? void 0 : c.prices[u]) == null ? void 0 : _.currency) ?? "usd", g = c == null ? void 0 : c.features.conversation_sessions, b = c ? _e(c) : "community";
|
|
13736
13740
|
return /* @__PURE__ */ p(
|
|
13737
13741
|
"button",
|
|
@@ -13762,12 +13766,12 @@ const nu = ({
|
|
|
13762
13766
|
]
|
|
13763
13767
|
}
|
|
13764
13768
|
);
|
|
13765
|
-
},
|
|
13769
|
+
}, cu = ({ onManage: t, className: e }) => {
|
|
13766
13770
|
const { isOutdatedBilling: a } = ne(), { t: n } = ge(), { data: r, isLoading: s } = $e({ enabled: !a }), { data: o, isLoading: i } = Qt();
|
|
13767
13771
|
if (a)
|
|
13768
13772
|
return /* @__PURE__ */ l(po, { isAddons: !0, className: e });
|
|
13769
13773
|
if (s || i)
|
|
13770
|
-
return /* @__PURE__ */ l(
|
|
13774
|
+
return /* @__PURE__ */ l(pe, { height: 84, rounded: !0, className: j("bpb-scope", e) });
|
|
13771
13775
|
const d = (o ?? []).flatMap((c) => {
|
|
13772
13776
|
var m;
|
|
13773
13777
|
const u = ((m = r == null ? void 0 : r.addons[c.id]) == null ? void 0 : m.current.quantity) ?? 0;
|
|
@@ -13804,12 +13808,12 @@ const nu = ({
|
|
|
13804
13808
|
]
|
|
13805
13809
|
}
|
|
13806
13810
|
);
|
|
13807
|
-
},
|
|
13811
|
+
}, uu = ({ onManage: t, className: e }) => {
|
|
13808
13812
|
const { isOutdatedBilling: a } = ne(), { t: n } = ge(), { data: r, isLoading: s, isError: o } = is({ enabled: !a });
|
|
13809
13813
|
if (a)
|
|
13810
13814
|
return null;
|
|
13811
13815
|
if (s)
|
|
13812
|
-
return /* @__PURE__ */ l(
|
|
13816
|
+
return /* @__PURE__ */ l(pe, { height: 84, rounded: !0, className: j("bpb-scope", e) });
|
|
13813
13817
|
if (o)
|
|
13814
13818
|
return /* @__PURE__ */ p(
|
|
13815
13819
|
"button",
|
|
@@ -13862,7 +13866,7 @@ const nu = ({
|
|
|
13862
13866
|
]
|
|
13863
13867
|
}
|
|
13864
13868
|
);
|
|
13865
|
-
},
|
|
13869
|
+
}, pu = ({ onManage: t, className: e }) => {
|
|
13866
13870
|
var W, X;
|
|
13867
13871
|
const { isOutdatedBilling: a, locale: n, manageBillingUrl: r, analytics: s } = ne(), { t: o } = ge(), { data: i, isLoading: d } = $e({ enabled: !a }), { data: c, isLoading: u } = rt(), { data: m, isLoading: h } = Qt();
|
|
13868
13872
|
if (a) {
|
|
@@ -13890,7 +13894,7 @@ const nu = ({
|
|
|
13890
13894
|
);
|
|
13891
13895
|
}
|
|
13892
13896
|
if (d || u || h)
|
|
13893
|
-
return /* @__PURE__ */ l(
|
|
13897
|
+
return /* @__PURE__ */ l(pe, { height: 132, rounded: !0, className: j("bpb-scope", e) });
|
|
13894
13898
|
const g = i == null ? void 0 : i.plan.current, b = c == null ? void 0 : c.find((D) => D.id === (g == null ? void 0 : g.planId)), C = (g == null ? void 0 : g.interval) ?? "month", _ = ((W = b == null ? void 0 : b.prices[C]) == null ? void 0 : W.currency) ?? "usd", v = b ? _e(b) : "community", N = Object.fromEntries(
|
|
13895
13899
|
Object.entries((i == null ? void 0 : i.addons) ?? {}).map(([D, ue]) => {
|
|
13896
13900
|
var ee;
|
|
@@ -13899,9 +13903,9 @@ const nu = ({
|
|
|
13899
13903
|
), S = ((X = b == null ? void 0 : b.prices[C]) == null ? void 0 : X.amount) ?? 0, T = (m ?? []).reduce((D, ue) => {
|
|
13900
13904
|
const ee = b ? Wn(ue, b, C) : null;
|
|
13901
13905
|
return D + (N[ue.id] ?? 0) * ((ee == null ? void 0 : ee.amount) ?? 0);
|
|
13902
|
-
}, 0), I = S + T, k = C === "year" ? "/yr" : "/mo", A =
|
|
13906
|
+
}, 0), I = S + T, k = C === "year" ? "/yr" : "/mo", A = Ml(b, m, N).find((D) => D.key === "conversation_sessions"), w = o(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), E = v === "enterprise" || v === "managed", L = v !== "community" && !E, O = i == null ? void 0 : i.plan.next, Z = O && O.planId !== (g == null ? void 0 : g.planId), V = g == null ? void 0 : g.periodEnd, $ = L && !Z && V && !Xa(V) ? ct(V, n) : null, B = c == null ? void 0 : c.find((D) => D.id === (O == null ? void 0 : O.planId)), P = O == null ? void 0 : O.effectiveDate, H = Z && B && P ? o("planBannerDowngradesTo", {
|
|
13903
13907
|
plan: Ne(B.name),
|
|
13904
|
-
date: ct(
|
|
13908
|
+
date: ct(P, n)
|
|
13905
13909
|
}) : null;
|
|
13906
13910
|
return /* @__PURE__ */ p(
|
|
13907
13911
|
"button",
|
|
@@ -13949,7 +13953,7 @@ const nu = ({
|
|
|
13949
13953
|
]
|
|
13950
13954
|
}
|
|
13951
13955
|
);
|
|
13952
|
-
},
|
|
13956
|
+
}, mu = ({
|
|
13953
13957
|
onManage: t,
|
|
13954
13958
|
period: e,
|
|
13955
13959
|
variant: a = "card",
|
|
@@ -13961,7 +13965,7 @@ const nu = ({
|
|
|
13961
13965
|
if (o)
|
|
13962
13966
|
return null;
|
|
13963
13967
|
if (u || h || b)
|
|
13964
|
-
return /* @__PURE__ */ l(
|
|
13968
|
+
return /* @__PURE__ */ l(pe, { height: 72, rounded: !0, className: j("bpb-scope", r) });
|
|
13965
13969
|
const C = m == null ? void 0 : m.find((H) => H.id === (c == null ? void 0 : c.plan.current.planId)), _ = C ? _e(C) : "community", v = _ === "enterprise" || _ === "managed", N = yn(g), S = N.find((H) => H.used > H.quota);
|
|
13966
13970
|
if (v && !S && !n)
|
|
13967
13971
|
return null;
|
|
@@ -14014,15 +14018,15 @@ const nu = ({
|
|
|
14014
14018
|
] }) : /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
|
|
14015
14019
|
/* @__PURE__ */ l("span", { className: "bpb-plan-usage__plan", children: C ? Ne(C.name) : d("free") }),
|
|
14016
14020
|
t && /* @__PURE__ */ l(yt, { size: 15, className: "bpb-plan-usage__chevron" })
|
|
14017
|
-
] }) }),
|
|
14021
|
+
] }) }), P = j(
|
|
14018
14022
|
"bpb-plan-usage bpb-scope",
|
|
14019
14023
|
`bpb-plan-usage--${a}`,
|
|
14020
14024
|
L && `bpb-plan-usage--${E}`,
|
|
14021
14025
|
t && "bpb-plan-usage--clickable",
|
|
14022
14026
|
r
|
|
14023
14027
|
);
|
|
14024
|
-
return t ? /* @__PURE__ */ l("button", { type: "button", className:
|
|
14025
|
-
},
|
|
14028
|
+
return t ? /* @__PURE__ */ l("button", { type: "button", className: P, style: s, onClick: t, children: B }) : /* @__PURE__ */ l("div", { className: P, style: s, children: B });
|
|
14029
|
+
}, Bc = ({
|
|
14026
14030
|
children: t,
|
|
14027
14031
|
delay: e = 200,
|
|
14028
14032
|
placement: a = "top",
|
|
@@ -14078,7 +14082,7 @@ const nu = ({
|
|
|
14078
14082
|
/* @__PURE__ */ l("span", { className: "bpb-usage-pop__period", children: m("usagePopoverTitle", { date: V }) })
|
|
14079
14083
|
] }) }),
|
|
14080
14084
|
I.map((B) => {
|
|
14081
|
-
const
|
|
14085
|
+
const P = B.pct > 0 ? Math.max(5, B.pct) : 0;
|
|
14082
14086
|
return /* @__PURE__ */ p("span", { className: "bpb-usage-pop__item", children: [
|
|
14083
14087
|
/* @__PURE__ */ p("span", { className: "bpb-usage-pop__head", children: [
|
|
14084
14088
|
/* @__PURE__ */ l("span", { className: "bpb-usage-pop__name", children: uo(B.key, m) }),
|
|
@@ -14092,7 +14096,7 @@ const nu = ({
|
|
|
14092
14096
|
"span",
|
|
14093
14097
|
{
|
|
14094
14098
|
className: j("bpb-usage-pop__fill", `bpb-usage-pop__fill--${rr(B.pct)}`),
|
|
14095
|
-
style: { width: `${
|
|
14099
|
+
style: { width: `${P}%` }
|
|
14096
14100
|
}
|
|
14097
14101
|
) })
|
|
14098
14102
|
] }, B.key);
|
|
@@ -14110,7 +14114,7 @@ const nu = ({
|
|
|
14110
14114
|
]
|
|
14111
14115
|
}
|
|
14112
14116
|
);
|
|
14113
|
-
},
|
|
14117
|
+
}, hu = ({
|
|
14114
14118
|
size: t = 20,
|
|
14115
14119
|
thickness: e = 3.5,
|
|
14116
14120
|
showLabel: a = !1,
|
|
@@ -14159,8 +14163,8 @@ const nu = ({
|
|
|
14159
14163
|
"%"
|
|
14160
14164
|
] })
|
|
14161
14165
|
] }), I = j("bpb-usage-ring", n && "bpb-usage-ring--clickable");
|
|
14162
|
-
return /* @__PURE__ */ l(
|
|
14163
|
-
},
|
|
14166
|
+
return /* @__PURE__ */ l(Bc, { delay: r, align: s, period: i, className: d, children: n ? /* @__PURE__ */ l("button", { type: "button", className: I, onClick: n, "aria-label": S, children: T }) : /* @__PURE__ */ l("span", { className: I, tabIndex: 0, role: "img", "aria-label": S, children: T }) });
|
|
14167
|
+
}, Uc = ({ checked: t, onChange: e, disabled: a, className: n, ...r }) => /* @__PURE__ */ l(
|
|
14164
14168
|
"button",
|
|
14165
14169
|
{
|
|
14166
14170
|
type: "button",
|
|
@@ -14172,7 +14176,7 @@ const nu = ({
|
|
|
14172
14176
|
onClick: () => e(!t),
|
|
14173
14177
|
children: /* @__PURE__ */ l("span", { className: "bpb-switch__thumb" })
|
|
14174
14178
|
}
|
|
14175
|
-
), Vr = "ai_spend",
|
|
14179
|
+
), Vr = "ai_spend", zc = 5, Pn = (t) => (t ?? 0) / tt, Dn = (t) => Math.round(t * tt), Zr = (t) => Number.isInteger(t) && t >= zc, jc = (t, e) => Number.isInteger(t) && t >= 0 && e > 0 && t % e === 0, gu = ({ open: t, onOpenChange: e, onSuccess: a, onUpgrade: n }) => {
|
|
14176
14180
|
const { isOutdatedBilling: r } = ne(), { t: s } = ge();
|
|
14177
14181
|
return r ? /* @__PURE__ */ l(
|
|
14178
14182
|
Fe,
|
|
@@ -14184,8 +14188,8 @@ const nu = ({
|
|
|
14184
14188
|
className: "bpb-scope",
|
|
14185
14189
|
children: /* @__PURE__ */ l(Rt, {})
|
|
14186
14190
|
}
|
|
14187
|
-
) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": s("autoRechargeTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(
|
|
14188
|
-
},
|
|
14191
|
+
) : /* @__PURE__ */ l(Fe, { open: t, onOpenChange: e, size: "md", "aria-label": s("autoRechargeTitle"), className: "bpb-scope", children: /* @__PURE__ */ l(Vc, { onOpenChange: e, onSuccess: a, onUpgrade: n }) });
|
|
14192
|
+
}, Vc = ({
|
|
14189
14193
|
onOpenChange: t,
|
|
14190
14194
|
onSuccess: e,
|
|
14191
14195
|
onUpgrade: a
|
|
@@ -14200,22 +14204,21 @@ const nu = ({
|
|
|
14200
14204
|
isLoading: C,
|
|
14201
14205
|
isError: _,
|
|
14202
14206
|
refetch: v
|
|
14203
|
-
} = is(), N =
|
|
14207
|
+
} = is(), N = Fi(), [S, T] = J(null), [I, k] = J(!1), [A, w] = J(!1), [E, L] = J(!1), O = i || m || C, Z = d || h || _, V = () => {
|
|
14204
14208
|
c(), g(), v();
|
|
14205
|
-
}, $ = u == null ? void 0 : u.find((
|
|
14206
|
-
const
|
|
14209
|
+
}, $ = u == null ? void 0 : u.find((me) => me.id === (o == null ? void 0 : o.plan.current.planId)), B = o ? $ ? _e($) === "community" : !0 : !1, P = b == null ? void 0 : b[Vr], H = Re(() => {
|
|
14210
|
+
const me = (P == null ? void 0 : P.maxAmount) != null, fe = (P == null ? void 0 : P.targetType) === "credit_grant" && (P == null ? void 0 : P.thresholdType) === "remaining_amount" ? P == null ? void 0 : P.threshold : null;
|
|
14207
14211
|
return {
|
|
14208
14212
|
thresholdInput: fe != null ? String(Math.round(Pn(fe))) : "",
|
|
14209
|
-
chunkInput: (
|
|
14210
|
-
limitInput: (
|
|
14211
|
-
hasLimit:
|
|
14213
|
+
chunkInput: (P == null ? void 0 : P.chunkSize) != null ? String(Math.round(Pn(P.chunkSize))) : "",
|
|
14214
|
+
limitInput: (P == null ? void 0 : P.maxAmount) != null ? String(Math.round(Pn(P.maxAmount))) : "",
|
|
14215
|
+
hasLimit: me
|
|
14212
14216
|
};
|
|
14213
|
-
}, [
|
|
14217
|
+
}, [P]), W = S ?? H, X = (me) => T({ ...W, ...me }), D = Number(W.thresholdInput), ue = Number(W.chunkInput), ee = Number(W.limitInput), ce = W.thresholdInput.trim() !== "" && Zr(D), M = Zr(ue), K = !W.hasLimit || W.limitInput.trim() !== "" && jc(ee, ue), G = I && !ce, x = A && !M, be = E && !K, te = W.thresholdInput !== H.thresholdInput || W.chunkInput !== H.chunkInput || W.limitInput !== H.limitInput || W.hasLimit !== H.hasLimit, de = () => {
|
|
14214
14218
|
N.mutate(
|
|
14215
14219
|
{
|
|
14216
14220
|
settings: {
|
|
14217
14221
|
[Vr]: {
|
|
14218
|
-
enabled: (x == null ? void 0 : x.enabled) ?? !1,
|
|
14219
14222
|
targetType: "credit_grant",
|
|
14220
14223
|
thresholdType: "remaining_amount",
|
|
14221
14224
|
threshold: Dn(D),
|
|
@@ -14236,8 +14239,8 @@ const nu = ({
|
|
|
14236
14239
|
/* @__PURE__ */ l("h2", { className: "bpb-auto-recharge-dialog__title", children: s("autoRechargeTitle") }),
|
|
14237
14240
|
/* @__PURE__ */ l("p", { className: "bpb-auto-recharge-dialog__subtitle", children: s("autoRechargeDescription") }),
|
|
14238
14241
|
O ? /* @__PURE__ */ p("div", { className: "bpb-auto-recharge-dialog__loading", "aria-busy": "true", children: [
|
|
14239
|
-
/* @__PURE__ */ l(
|
|
14240
|
-
/* @__PURE__ */ l(
|
|
14242
|
+
/* @__PURE__ */ l(pe, { height: 40 }),
|
|
14243
|
+
/* @__PURE__ */ l(pe, { height: 72 })
|
|
14241
14244
|
] }) : Z ? /* @__PURE__ */ p(Te, { children: [
|
|
14242
14245
|
/* @__PURE__ */ p("div", { className: "bpb-auto-recharge-dialog__error", role: "alert", children: [
|
|
14243
14246
|
/* @__PURE__ */ l("span", { className: "bpb-auto-recharge-dialog__error-icon", "aria-hidden": "true", children: /* @__PURE__ */ l(ln, { size: 18 }) }),
|
|
@@ -14283,8 +14286,8 @@ const nu = ({
|
|
|
14283
14286
|
inputMode: "numeric",
|
|
14284
14287
|
disabled: N.isPending,
|
|
14285
14288
|
value: W.thresholdInput,
|
|
14286
|
-
onChange: (
|
|
14287
|
-
X({ thresholdInput:
|
|
14289
|
+
onChange: (me) => {
|
|
14290
|
+
X({ thresholdInput: me.target.value }), k(!0);
|
|
14288
14291
|
}
|
|
14289
14292
|
}
|
|
14290
14293
|
)
|
|
@@ -14309,7 +14312,7 @@ const nu = ({
|
|
|
14309
14312
|
{
|
|
14310
14313
|
className: j(
|
|
14311
14314
|
"bpb-auto-recharge-dialog__panel",
|
|
14312
|
-
|
|
14315
|
+
x && "bpb-auto-recharge-dialog__panel--invalid"
|
|
14313
14316
|
),
|
|
14314
14317
|
children: [
|
|
14315
14318
|
/* @__PURE__ */ l("label", { className: "bpb-auto-recharge-dialog__amount-label", htmlFor: "auto-recharge-chunk", children: s("autoRechargeChunkLabel") }),
|
|
@@ -14324,8 +14327,8 @@ const nu = ({
|
|
|
14324
14327
|
inputMode: "numeric",
|
|
14325
14328
|
disabled: N.isPending,
|
|
14326
14329
|
value: W.chunkInput,
|
|
14327
|
-
onChange: (
|
|
14328
|
-
X({ chunkInput:
|
|
14330
|
+
onChange: (me) => {
|
|
14331
|
+
X({ chunkInput: me.target.value }), w(!0);
|
|
14329
14332
|
}
|
|
14330
14333
|
}
|
|
14331
14334
|
)
|
|
@@ -14338,9 +14341,9 @@ const nu = ({
|
|
|
14338
14341
|
{
|
|
14339
14342
|
className: j(
|
|
14340
14343
|
"bpb-auto-recharge-dialog__hint",
|
|
14341
|
-
|
|
14344
|
+
x && "bpb-auto-recharge-dialog__hint--error"
|
|
14342
14345
|
),
|
|
14343
|
-
children: s(
|
|
14346
|
+
children: s(x ? "autoRechargeChunkError" : "autoRechargeChunkHint")
|
|
14344
14347
|
}
|
|
14345
14348
|
)
|
|
14346
14349
|
] }),
|
|
@@ -14351,11 +14354,11 @@ const nu = ({
|
|
|
14351
14354
|
/* @__PURE__ */ l("span", { className: "bpb-auto-recharge-dialog__row-description", children: s("autoRechargeSetLimitHint") })
|
|
14352
14355
|
] }),
|
|
14353
14356
|
/* @__PURE__ */ l(
|
|
14354
|
-
|
|
14357
|
+
Uc,
|
|
14355
14358
|
{
|
|
14356
14359
|
"aria-label": s("autoRechargeSetLimitLabel"),
|
|
14357
14360
|
checked: W.hasLimit,
|
|
14358
|
-
onChange: (
|
|
14361
|
+
onChange: (me) => X({ hasLimit: me }),
|
|
14359
14362
|
disabled: N.isPending
|
|
14360
14363
|
}
|
|
14361
14364
|
)
|
|
@@ -14390,8 +14393,8 @@ const nu = ({
|
|
|
14390
14393
|
inputMode: "numeric",
|
|
14391
14394
|
disabled: N.isPending,
|
|
14392
14395
|
value: W.limitInput,
|
|
14393
|
-
onChange: (
|
|
14394
|
-
X({ limitInput:
|
|
14396
|
+
onChange: (me) => {
|
|
14397
|
+
X({ limitInput: me.target.value }), L(!0);
|
|
14395
14398
|
}
|
|
14396
14399
|
}
|
|
14397
14400
|
)
|
|
@@ -14412,7 +14415,7 @@ const nu = ({
|
|
|
14412
14415
|
] }) })
|
|
14413
14416
|
}
|
|
14414
14417
|
),
|
|
14415
|
-
!(
|
|
14418
|
+
!(P != null && P.enabled) && (P == null ? void 0 : P.disabledReason) && /* @__PURE__ */ l("p", { className: "bpb-auto-recharge-dialog__disabled-note", role: "alert", children: s("autoRechargeDisabledReason", { reason: P.disabledReason }) }),
|
|
14416
14419
|
/* @__PURE__ */ p("div", { className: "bpb-auto-recharge-dialog__actions", children: [
|
|
14417
14420
|
/* @__PURE__ */ l(ke, { variant: "outline", onClick: () => t(!1), disabled: N.isPending, children: s("cancel") }),
|
|
14418
14421
|
/* @__PURE__ */ l(
|
|
@@ -14430,80 +14433,80 @@ const nu = ({
|
|
|
14430
14433
|
] });
|
|
14431
14434
|
};
|
|
14432
14435
|
export {
|
|
14433
|
-
|
|
14436
|
+
cu as AddonsSummaryCard,
|
|
14434
14437
|
Xn as ArrowRightIcon,
|
|
14435
|
-
|
|
14436
|
-
|
|
14438
|
+
gu as AutoRechargeDialog,
|
|
14439
|
+
uu as AutoRechargeSummaryCard,
|
|
14437
14440
|
we as BILLING_EVENTS,
|
|
14438
14441
|
Ja as Badge,
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
+
Xc as BankIcon,
|
|
14443
|
+
lu as BillingActionCard,
|
|
14444
|
+
Yc as BillingProvider,
|
|
14442
14445
|
Jn as BoltIcon,
|
|
14443
14446
|
ke as Button,
|
|
14444
|
-
|
|
14447
|
+
$l as CalendarIcon,
|
|
14445
14448
|
Ds as CardBrandBadge,
|
|
14446
14449
|
Rr as CardIcon,
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14450
|
+
Zl as ChartIcon,
|
|
14451
|
+
Bl as CheckIcon,
|
|
14452
|
+
yd as CheckoutDialog,
|
|
14450
14453
|
ea as ChevronDownIcon,
|
|
14451
14454
|
xs as ChevronLeftIcon,
|
|
14452
14455
|
yt as ChevronRightIcon,
|
|
14453
14456
|
Qn as CloseIcon,
|
|
14454
|
-
|
|
14457
|
+
El as DEFAULT_FEATURE_LABELS,
|
|
14455
14458
|
$n as DEFAULT_PLAN_FEATURES,
|
|
14456
14459
|
Fe as Dialog,
|
|
14457
14460
|
Er as DownloadIcon,
|
|
14458
14461
|
Is as ENTERPRISE_CONTACT_URL,
|
|
14459
14462
|
dn as ExternalLinkIcon,
|
|
14460
|
-
|
|
14461
|
-
|
|
14463
|
+
ql as GlobeIcon,
|
|
14464
|
+
jl as InfinityIcon,
|
|
14462
14465
|
Qa as InfoTooltip,
|
|
14463
14466
|
Bn as Input,
|
|
14464
|
-
|
|
14467
|
+
nu as InvoicesDialog,
|
|
14465
14468
|
Yn as LayersIcon,
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14469
|
+
eu as LockIcon,
|
|
14470
|
+
au as ManageAddonsDialog,
|
|
14471
|
+
Ul as MessageIcon,
|
|
14472
|
+
Gl as MinusIcon,
|
|
14470
14473
|
tt as NANO_DOLLARS_PER_DOLLAR,
|
|
14471
14474
|
Rt as OutdatedBillingGate,
|
|
14472
|
-
|
|
14475
|
+
su as OutgrowFreeDialog,
|
|
14473
14476
|
Kn as PLAN_FEATURE_KEYS,
|
|
14474
14477
|
Wt as PLAN_ORDER,
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14478
|
+
Wl as PaintIcon,
|
|
14479
|
+
ru as PaymentMethodDialog,
|
|
14480
|
+
pu as PlanBanner,
|
|
14481
|
+
du as PlanSummaryCard,
|
|
14482
|
+
mu as PlanUsageWidget,
|
|
14480
14483
|
Ps as PlusIcon,
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
+
zl as PuzzleIcon,
|
|
14485
|
+
tu as ReceiptIcon,
|
|
14486
|
+
Hl as SegmentedControl,
|
|
14484
14487
|
Bs as Select,
|
|
14485
14488
|
Dr as ShieldIcon,
|
|
14486
|
-
|
|
14489
|
+
pe as Skeleton,
|
|
14487
14490
|
Hn as SparkleIcon,
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14491
|
+
vd as Stepper,
|
|
14492
|
+
Uc as Switch,
|
|
14493
|
+
xc as USAGE_METRICS,
|
|
14494
|
+
od as UpgradePlanDialog,
|
|
14495
|
+
iu as UsageBanner,
|
|
14496
|
+
ou as UsageDashboard,
|
|
14497
|
+
Bc as UsagePopover,
|
|
14498
|
+
hu as UsageRing,
|
|
14499
|
+
Vl as UsersIcon,
|
|
14500
|
+
Rl as addDays,
|
|
14498
14501
|
ja as addonDisplayName,
|
|
14499
|
-
|
|
14502
|
+
Fl as addonLimitsPreview,
|
|
14500
14503
|
Wn as addonPrice,
|
|
14501
14504
|
Ie as billingKeys,
|
|
14502
14505
|
j as cn,
|
|
14503
14506
|
Gn as conversationPackPrice,
|
|
14504
|
-
|
|
14507
|
+
Ol as conversationsAddon,
|
|
14505
14508
|
za as currencySymbol,
|
|
14506
|
-
|
|
14509
|
+
Qc as featureLabel,
|
|
14507
14510
|
Kt as formatBytes,
|
|
14508
14511
|
le as formatCurrency,
|
|
14509
14512
|
ct as formatDate,
|
|
@@ -14513,8 +14516,9 @@ export {
|
|
|
14513
14516
|
Rs as getStripeAppearance,
|
|
14514
14517
|
Ao as getStripePromise,
|
|
14515
14518
|
er as iconForFeature,
|
|
14519
|
+
xi as isLegacyBillingVersion,
|
|
14516
14520
|
Ne as planDisplayName,
|
|
14517
|
-
|
|
14521
|
+
Ml as planEntitlements,
|
|
14518
14522
|
_e as planKind,
|
|
14519
14523
|
Ls as toStripeLocale,
|
|
14520
14524
|
yn as usageItems,
|
|
@@ -14525,18 +14529,18 @@ export {
|
|
|
14525
14529
|
os as useBillingReadonly,
|
|
14526
14530
|
ls as useCreatePaymentMethodIntent,
|
|
14527
14531
|
ss as useCustomer,
|
|
14528
|
-
|
|
14529
|
-
|
|
14532
|
+
Oi as useInvoices,
|
|
14533
|
+
Jc as useIsAuthorized,
|
|
14530
14534
|
rs as usePaymentMethod,
|
|
14531
14535
|
rt as usePlans,
|
|
14532
|
-
|
|
14533
|
-
|
|
14536
|
+
Ui as useSetAddons,
|
|
14537
|
+
Fi as useSetAutoRechargeSettings,
|
|
14534
14538
|
cs as useSetCustomer,
|
|
14535
14539
|
ds as useSetPaymentMethod,
|
|
14536
14540
|
us as useSetSubscription,
|
|
14537
14541
|
$e as useSubscription,
|
|
14538
14542
|
ns as useSubscriptionPreview,
|
|
14539
|
-
|
|
14543
|
+
Bi as useSupportsUsageByBot,
|
|
14540
14544
|
Xt as useUsage,
|
|
14541
|
-
|
|
14545
|
+
Mi as useUsageByBot
|
|
14542
14546
|
};
|