@arbidocs/blocks 0.5.130 → 0.5.132
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/{DocumentReviewCard-M53XFLI2.cjs → DocumentReviewCard-2VI5OOLE.cjs} +3 -3
- package/dist/{DocumentReviewCard-M53XFLI2.cjs.map → DocumentReviewCard-2VI5OOLE.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-EFRMXIM5.cjs → FilesViewerDialog-77YTFIX3.cjs} +4 -4
- package/dist/{FilesViewerDialog-EFRMXIM5.cjs.map → FilesViewerDialog-77YTFIX3.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-QPROJRCF.cjs → WorkspaceTableView-7BMZ2O3Y.cjs} +6 -6
- package/dist/{WorkspaceTableView-QPROJRCF.cjs.map → WorkspaceTableView-7BMZ2O3Y.cjs.map} +1 -1
- package/dist/{chunk-KWHGYHRC.cjs → chunk-KSDTK66A.cjs} +2 -2
- package/dist/{chunk-KWHGYHRC.cjs.map → chunk-KSDTK66A.cjs.map} +1 -1
- package/dist/{chunk-MI3N3ZOT.cjs → chunk-PDDYAY4Z.cjs} +20 -20
- package/dist/{chunk-MI3N3ZOT.cjs.map → chunk-PDDYAY4Z.cjs.map} +1 -1
- package/dist/{chunk-T73BHNQX.cjs → chunk-TBPCG2PV.cjs} +240 -89
- package/dist/chunk-TBPCG2PV.cjs.map +1 -0
- package/dist/{chunk-GOQV6NOK.cjs → chunk-U7KB42OQ.cjs} +4 -4
- package/dist/{chunk-GOQV6NOK.cjs.map → chunk-U7KB42OQ.cjs.map} +1 -1
- package/dist/{chunk-GEZB3OEC.cjs → chunk-XJE7W42L.cjs} +18 -17
- package/dist/chunk-XJE7W42L.cjs.map +1 -0
- package/dist/connect/index.cjs +1413 -653
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +1 -1
- package/dist/connection/billing/ChangePlanDialog.d.ts +2 -1
- package/dist/connection/billing/ChangePlanDialog.js +8 -3
- package/dist/connection/billing/ChangePlanDialog.js.map +2 -2
- package/dist/connection/billing/ChangeProPlan.js +4 -4
- package/dist/connection/billing/ChangeProPlan.js.map +2 -2
- package/dist/connection/billing/CollaboratorPlan.js +5 -3
- package/dist/connection/billing/CollaboratorPlan.js.map +2 -2
- package/dist/connection/billing/ConnectedWelcomeDialog.d.ts +5 -13
- package/dist/connection/billing/ConnectedWelcomeDialog.js +38 -19
- package/dist/connection/billing/ConnectedWelcomeDialog.js.map +2 -2
- package/dist/connection/billing/MonthlySpendCap.d.ts +10 -3
- package/dist/connection/billing/MonthlySpendCap.js +103 -11
- package/dist/connection/billing/MonthlySpendCap.js.map +2 -2
- package/dist/connection/billing/NewProjectFlow.js +20 -7
- package/dist/connection/billing/NewProjectFlow.js.map +2 -2
- package/dist/connection/billing/ProjectDetail.js +1 -1
- package/dist/connection/billing/ProjectDetail.js.map +2 -2
- package/dist/connection/billing/ProjectPurchaseOptions.d.ts +14 -3
- package/dist/connection/billing/ProjectPurchaseOptions.js +472 -139
- package/dist/connection/billing/ProjectPurchaseOptions.js.map +2 -2
- package/dist/connection/billing/ProjectUsageCard.js +4 -4
- package/dist/connection/billing/ProjectUsageCard.js.map +2 -2
- package/dist/connection/billing/ReduceAddonDialog.js +2 -2
- package/dist/connection/billing/ReduceAddonDialog.js.map +2 -2
- package/dist/connection/billing/StripeCheckoutModal.js +3 -2
- package/dist/connection/billing/StripeCheckoutModal.js.map +2 -2
- package/dist/connection/billing/SubscriptionPlans.d.ts +5 -1
- package/dist/connection/billing/SubscriptionPlans.js +89 -6
- package/dist/connection/billing/SubscriptionPlans.js.map +2 -2
- package/dist/connection/billing/index.d.ts +1 -1
- package/dist/connection/billing/index.js +2 -2
- package/dist/connection/billing/index.js.map +2 -2
- package/dist/connection/billing/referral-reward.d.ts +2 -3
- package/dist/connection/billing/referral-reward.js +8 -3
- package/dist/connection/billing/referral-reward.js.map +2 -2
- package/dist/connection/billing/tax-quote.d.ts +2 -2
- package/dist/connection/billing/tax-quote.js +1 -0
- package/dist/connection/billing/tax-quote.js.map +2 -2
- package/dist/connection/command/ConnectedCommandPalette.js +2 -0
- package/dist/connection/command/ConnectedCommandPalette.js.map +2 -2
- package/dist/connection/command/actions.js +1 -1
- package/dist/connection/command/actions.js.map +2 -2
- package/dist/connection/contacts/ConnectedAddContacts.d.ts +7 -1
- package/dist/connection/contacts/ConnectedAddContacts.js +33 -17
- package/dist/connection/contacts/ConnectedAddContacts.js.map +2 -2
- package/dist/connection/contacts/ConnectedInviteContactsDialog.js +3 -2
- package/dist/connection/contacts/ConnectedInviteContactsDialog.js.map +2 -2
- package/dist/connection/contacts/ConnectedWelcomeInvitations.d.ts +6 -0
- package/dist/connection/contacts/ConnectedWelcomeInvitations.js +198 -0
- package/dist/connection/contacts/ConnectedWelcomeInvitations.js.map +7 -0
- package/dist/connection/projects/ConnectedProjectsPanel.js +17 -5
- package/dist/connection/projects/ConnectedProjectsPanel.js.map +2 -2
- package/dist/connection/shell/ConnectedWorkspaceSwitcher.js +3 -3
- package/dist/connection/shell/ConnectedWorkspaceSwitcher.js.map +2 -2
- package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js +2 -2
- package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js.map +2 -2
- package/dist/connection/workspace-list/ConnectedWorkspaceList.js +1 -1
- package/dist/connection/workspace-list/ConnectedWorkspaceList.js.map +2 -2
- package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +1 -1
- package/dist/connection/workspace-list/useConnectedWorkspaceList.js +4 -4
- package/dist/connection/workspace-list/useConnectedWorkspaceList.js.map +2 -2
- package/dist/embed/index.cjs +8 -8
- package/dist/index.cjs +48 -48
- package/dist/index.cjs.map +1 -1
- package/dist/nav/actions.d.ts +2 -0
- package/dist/nav/actions.js.map +2 -2
- package/dist/settings/Billing.d.ts +2 -2
- package/dist/settings/Billing.js +4 -3
- package/dist/settings/Billing.js.map +2 -2
- package/dist/settings/PanelFrame.d.ts +3 -1
- package/dist/settings/PanelFrame.js +3 -2
- package/dist/settings/PanelFrame.js.map +2 -2
- package/dist/settings/SubscriptionParts.d.ts +4 -2
- package/dist/settings/SubscriptionParts.js +22 -3
- package/dist/settings/SubscriptionParts.js.map +2 -2
- package/dist/settings/WelcomeDialog.d.ts +31 -4
- package/dist/settings/WelcomeDialog.js +221 -82
- package/dist/settings/WelcomeDialog.js.map +2 -2
- package/dist/settings/index.cjs +144 -144
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +7 -7
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/src/connection/billing/project-purchase.css +518 -39
- package/dist/chunk-GEZB3OEC.cjs.map +0 -1
- package/dist/chunk-T73BHNQX.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkFQRJCAT2_cjs = require('../chunk-FQRJCAT2.cjs');
|
|
5
5
|
var chunk6OK7ESTL_cjs = require('../chunk-6OK7ESTL.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkXJE7W42L_cjs = require('../chunk-XJE7W42L.cjs');
|
|
7
7
|
var chunkVWTOIGX4_cjs = require('../chunk-VWTOIGX4.cjs');
|
|
8
8
|
var chunkMLA2BJ2Y_cjs = require('../chunk-MLA2BJ2Y.cjs');
|
|
9
9
|
var chunkPSIKUQYM_cjs = require('../chunk-PSIKUQYM.cjs');
|
|
10
10
|
var chunk5GCCUXMT_cjs = require('../chunk-5GCCUXMT.cjs');
|
|
11
11
|
var chunkQXMPATG6_cjs = require('../chunk-QXMPATG6.cjs');
|
|
12
12
|
var chunkCMGNRMPA_cjs = require('../chunk-CMGNRMPA.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkU7KB42OQ_cjs = require('../chunk-U7KB42OQ.cjs');
|
|
14
14
|
var chunkYZ6YOOTF_cjs = require('../chunk-YZ6YOOTF.cjs');
|
|
15
15
|
var chunkKWJW5TMH_cjs = require('../chunk-KWJW5TMH.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkPDDYAY4Z_cjs = require('../chunk-PDDYAY4Z.cjs');
|
|
17
17
|
var chunk2Z25MUAY_cjs = require('../chunk-2Z25MUAY.cjs');
|
|
18
18
|
var chunkXCW6OY7E_cjs = require('../chunk-XCW6OY7E.cjs');
|
|
19
19
|
var chunkMXGXKUSW_cjs = require('../chunk-MXGXKUSW.cjs');
|
|
@@ -36,7 +36,7 @@ var chunkJVEDKKNO_cjs = require('../chunk-JVEDKKNO.cjs');
|
|
|
36
36
|
var chunkADDQKZ5I_cjs = require('../chunk-ADDQKZ5I.cjs');
|
|
37
37
|
var chunkERRXU2HL_cjs = require('../chunk-ERRXU2HL.cjs');
|
|
38
38
|
var chunk5QERK4PK_cjs = require('../chunk-5QERK4PK.cjs');
|
|
39
|
-
var
|
|
39
|
+
var chunkTBPCG2PV_cjs = require('../chunk-TBPCG2PV.cjs');
|
|
40
40
|
require('../chunk-HYUKPHCT.cjs');
|
|
41
41
|
var chunkALK3PUUB_cjs = require('../chunk-ALK3PUUB.cjs');
|
|
42
42
|
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
@@ -55,7 +55,7 @@ require('../chunk-JH6JTI76.cjs');
|
|
|
55
55
|
var chunkQQMMCXBP_cjs = require('../chunk-QQMMCXBP.cjs');
|
|
56
56
|
require('../chunk-DTMBAFIL.cjs');
|
|
57
57
|
require('../chunk-ZESMRGDV.cjs');
|
|
58
|
-
var
|
|
58
|
+
var chunkKSDTK66A_cjs = require('../chunk-KSDTK66A.cjs');
|
|
59
59
|
var chunkSGYSDABK_cjs = require('../chunk-SGYSDABK.cjs');
|
|
60
60
|
require('../chunk-NEGFHF3V.cjs');
|
|
61
61
|
var chunkI6GEQWIV_cjs = require('../chunk-I6GEQWIV.cjs');
|
|
@@ -265,7 +265,7 @@ function ConnectedWorkspaceActivity({
|
|
|
265
265
|
[feed.data]
|
|
266
266
|
);
|
|
267
267
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
-
|
|
268
|
+
chunkKSDTK66A_cjs.WorkspaceActivityList,
|
|
269
269
|
{
|
|
270
270
|
...listProps,
|
|
271
271
|
items,
|
|
@@ -1145,7 +1145,7 @@ function NotificationCenter({
|
|
|
1145
1145
|
}
|
|
1146
1146
|
];
|
|
1147
1147
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full bg-background", "data-testid": "notifications-page", children: [
|
|
1148
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
1149
|
chunkSJSGSHIT_cjs.TabHeader,
|
|
1150
1150
|
{
|
|
1151
1151
|
tabs,
|
|
@@ -2092,7 +2092,7 @@ function ConnectedSkillsBrowser({
|
|
|
2092
2092
|
}
|
|
2093
2093
|
) }),
|
|
2094
2094
|
runSkillId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2095
|
-
|
|
2095
|
+
chunkU7KB42OQ_cjs.ConnectedTaskComposer,
|
|
2096
2096
|
{
|
|
2097
2097
|
kind: "workflow",
|
|
2098
2098
|
open: true,
|
|
@@ -2677,10 +2677,10 @@ function AgentWorkspaceAccess({
|
|
|
2677
2677
|
}
|
|
2678
2678
|
function useAgentBehaviour(defaultBehaviour, enabled) {
|
|
2679
2679
|
const { data: configs } = react.useConfigs({ enabled });
|
|
2680
|
-
const
|
|
2680
|
+
const titles2 = react$1.useMemo(() => (configs?.versions ?? []).map((v) => v.title), [configs]);
|
|
2681
2681
|
return {
|
|
2682
|
-
count:
|
|
2683
|
-
behaviourOf: (name) =>
|
|
2682
|
+
count: titles2.length,
|
|
2683
|
+
behaviourOf: (name) => titles2.find((t) => t?.toLowerCase().startsWith((name ?? "").toLowerCase())) ?? defaultBehaviour
|
|
2684
2684
|
};
|
|
2685
2685
|
}
|
|
2686
2686
|
function AgentsMemory({
|
|
@@ -2702,7 +2702,7 @@ function useMemoryCount(enabled) {
|
|
|
2702
2702
|
}
|
|
2703
2703
|
function AgentsTasks({ tasks, isLoading, agents, labels: l, onCompose }) {
|
|
2704
2704
|
const { notify: notify19, openConversation, openDocument } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
2705
|
-
const people =
|
|
2705
|
+
const people = chunkU7KB42OQ_cjs.useTaskPeople();
|
|
2706
2706
|
const canEditShared = react.useCanEditShared();
|
|
2707
2707
|
const isWorkspaceOwner = react.useIsWorkspaceOwner();
|
|
2708
2708
|
const { data: workflows = [] } = react.useWorkflows({ live: true });
|
|
@@ -2755,7 +2755,7 @@ function AgentsTasks({ tasks, isLoading, agents, labels: l, onCompose }) {
|
|
|
2755
2755
|
}
|
|
2756
2756
|
),
|
|
2757
2757
|
activityFor && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2758
|
-
|
|
2758
|
+
chunkU7KB42OQ_cjs.ConnectedTaskActivityDialog,
|
|
2759
2759
|
{
|
|
2760
2760
|
conversationId: activityFor.external_id,
|
|
2761
2761
|
taskName: activityFor.title || l.untitledTask,
|
|
@@ -2914,7 +2914,7 @@ function ConnectedAgentsPageScope(props) {
|
|
|
2914
2914
|
children,
|
|
2915
2915
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedAgentCreator, { ...management.editorProps, ...agentOptions.creator }),
|
|
2916
2916
|
taskDialog && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2917
|
-
|
|
2917
|
+
chunkU7KB42OQ_cjs.ConnectedTaskComposer,
|
|
2918
2918
|
{
|
|
2919
2919
|
open: true,
|
|
2920
2920
|
onOpenChange: (open) => !open && setTaskDialog(null),
|
|
@@ -3133,7 +3133,7 @@ function ConnectedAgentsPage({
|
|
|
3133
3133
|
className: "flex h-full flex-col",
|
|
3134
3134
|
"data-testid": scope.testIds?.root ?? DEFAULT_TEST_IDS.root,
|
|
3135
3135
|
children: [
|
|
3136
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3136
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3137
3137
|
chunkSJSGSHIT_cjs.TabHeader,
|
|
3138
3138
|
{
|
|
3139
3139
|
tabs: [
|
|
@@ -3245,10 +3245,10 @@ function cascadeTagCombination(tags, previous, next) {
|
|
|
3245
3245
|
function tagCombinationMatches(combination, items) {
|
|
3246
3246
|
if (!isCombining(combination)) return void 0;
|
|
3247
3247
|
const pass = (list) => new Set(
|
|
3248
|
-
|
|
3248
|
+
chunkTBPCG2PV_cjs.applyInvertedIndexFilter(
|
|
3249
3249
|
[...list],
|
|
3250
3250
|
combination,
|
|
3251
|
-
|
|
3251
|
+
chunkTBPCG2PV_cjs.buildInvertedIndex(
|
|
3252
3252
|
[...list],
|
|
3253
3253
|
(item) => item.id,
|
|
3254
3254
|
(item) => item.tagIds
|
|
@@ -3375,7 +3375,7 @@ function ConnectedTagTable({
|
|
|
3375
3375
|
const fail2 = (fallback) => (e) => notify19(browser.refusalReason(e, fallback), "error");
|
|
3376
3376
|
const snapshot2 = (data) => {
|
|
3377
3377
|
const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
|
|
3378
|
-
const bytes =
|
|
3378
|
+
const bytes = chunkKSDTK66A_cjs.tagTableDocx(data, {
|
|
3379
3379
|
title,
|
|
3380
3380
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
3381
3381
|
});
|
|
@@ -3384,7 +3384,7 @@ function ConnectedTagTable({
|
|
|
3384
3384
|
return { blob: new Blob([bytes], { type: chunkUKOYN2WD_cjs.DOCX_MIME_TYPE }), name };
|
|
3385
3385
|
};
|
|
3386
3386
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3387
|
-
|
|
3387
|
+
chunkKSDTK66A_cjs.TagTable,
|
|
3388
3388
|
{
|
|
3389
3389
|
...props,
|
|
3390
3390
|
table,
|
|
@@ -4509,9 +4509,9 @@ function GlossaryExport({ labelId, nameOf }) {
|
|
|
4509
4509
|
const narrowed = agreements.find((a) => a.id === narrowTo);
|
|
4510
4510
|
const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
|
|
4511
4511
|
const download = (format) => {
|
|
4512
|
-
const entries =
|
|
4513
|
-
const blob = format === "docx" ? new Blob([
|
|
4514
|
-
documentTools.downloadBlob(blob,
|
|
4512
|
+
const entries = chunkKSDTK66A_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
|
|
4513
|
+
const blob = format === "docx" ? new Blob([chunkKSDTK66A_cjs.glossaryDocx(entries, { title })], { type: chunkUKOYN2WD_cjs.DOCX_MIME_TYPE }) : new Blob([chunkKSDTK66A_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
|
|
4514
|
+
documentTools.downloadBlob(blob, chunkKSDTK66A_cjs.glossaryFileName(title, format));
|
|
4515
4515
|
};
|
|
4516
4516
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
|
|
4517
4517
|
agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4975,7 +4975,7 @@ function TagFilterChips({
|
|
|
4975
4975
|
const name = (id) => tags.find((t) => t.external_id === id)?.name ?? id;
|
|
4976
4976
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", "data-testid": "tags-filter-chips", children: [
|
|
4977
4977
|
set.map(([id, state]) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4978
|
-
|
|
4978
|
+
chunkTBPCG2PV_cjs.FilterChip,
|
|
4979
4979
|
{
|
|
4980
4980
|
label: name(id),
|
|
4981
4981
|
labelContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5040,7 +5040,7 @@ function KindSection({
|
|
|
5040
5040
|
{
|
|
5041
5041
|
testId: `tags-kind-${kind}`,
|
|
5042
5042
|
title: ui.tagKindTitle(kind, { plural: true }),
|
|
5043
|
-
description:
|
|
5043
|
+
description: chunkKSDTK66A_cjs.tagKindDescription(kind),
|
|
5044
5044
|
children: [
|
|
5045
5045
|
browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5046
5046
|
"p",
|
|
@@ -5050,9 +5050,9 @@ function KindSection({
|
|
|
5050
5050
|
children: [
|
|
5051
5051
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
5052
5052
|
"Extracting ",
|
|
5053
|
-
|
|
5053
|
+
chunkKSDTK66A_cjs.entitiesPhrase().toLowerCase(),
|
|
5054
5054
|
" from ",
|
|
5055
|
-
|
|
5055
|
+
chunkKSDTK66A_cjs.documentCount(extractingCount),
|
|
5056
5056
|
"\u2026"
|
|
5057
5057
|
]
|
|
5058
5058
|
}
|
|
@@ -5070,7 +5070,7 @@ function KindSection({
|
|
|
5070
5070
|
onOpenTag: ctx.onOpenTag,
|
|
5071
5071
|
onOpenRow: ctx.onOpenTag,
|
|
5072
5072
|
onOpenTaggedItems: ctx.onOpenTaggedItems,
|
|
5073
|
-
labels:
|
|
5073
|
+
labels: chunkKSDTK66A_cjs.tagTableLabels(kind),
|
|
5074
5074
|
testId: `tags-table-${kind}`
|
|
5075
5075
|
}
|
|
5076
5076
|
)
|
|
@@ -5178,15 +5178,15 @@ function TagSection({
|
|
|
5178
5178
|
onOpenTag: ctx.onOpenTag,
|
|
5179
5179
|
onOpenRow: ctx.onOpenTag,
|
|
5180
5180
|
onOpenTaggedItems: ctx.onOpenTaggedItems,
|
|
5181
|
-
labels:
|
|
5181
|
+
labels: chunkKSDTK66A_cjs.tagTableLabels(tag.kind),
|
|
5182
5182
|
testId: "tags-rows"
|
|
5183
5183
|
}
|
|
5184
5184
|
),
|
|
5185
5185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5186
|
-
|
|
5186
|
+
chunkKSDTK66A_cjs.TagDetail,
|
|
5187
5187
|
{
|
|
5188
5188
|
onOpenTaggedItems: ctx.onOpenTaggedItems,
|
|
5189
|
-
fieldLabels:
|
|
5189
|
+
fieldLabels: chunkKSDTK66A_cjs.tagTableLabels(tag.kind),
|
|
5190
5190
|
row: detailRow,
|
|
5191
5191
|
fields: schema.data?.fields ?? [],
|
|
5192
5192
|
isLoading: detail.isLoading,
|
|
@@ -5200,7 +5200,7 @@ function TagSection({
|
|
|
5200
5200
|
throw e;
|
|
5201
5201
|
})
|
|
5202
5202
|
),
|
|
5203
|
-
labels:
|
|
5203
|
+
labels: chunkKSDTK66A_cjs.tagDetailLabels(),
|
|
5204
5204
|
testId: "tags-detail"
|
|
5205
5205
|
}
|
|
5206
5206
|
)
|
|
@@ -5275,7 +5275,7 @@ function ConnectedTagsPage() {
|
|
|
5275
5275
|
const onDelete = async (t) => {
|
|
5276
5276
|
const nested = browser.getChildTags([...tags], t.external_id);
|
|
5277
5277
|
const uses = browser.tagUseCount(t);
|
|
5278
|
-
const n2 =
|
|
5278
|
+
const n2 = chunkKSDTK66A_cjs.tagsPageNouns();
|
|
5279
5279
|
const tagNoun = (count2) => (count2 === 1 ? n2.tag : n2.tags).toLowerCase();
|
|
5280
5280
|
const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
|
|
5281
5281
|
const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
|
|
@@ -5296,11 +5296,11 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5296
5296
|
try {
|
|
5297
5297
|
await extract.mutateAsync(docIds);
|
|
5298
5298
|
notify19(
|
|
5299
|
-
`Extracting ${
|
|
5299
|
+
`Extracting ${chunkKSDTK66A_cjs.entitiesPhrase().toLowerCase()} from ${chunkKSDTK66A_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
|
|
5300
5300
|
"info"
|
|
5301
5301
|
);
|
|
5302
5302
|
} catch (error) {
|
|
5303
|
-
notify19(browser.refusalReason(error, `Could not extract ${
|
|
5303
|
+
notify19(browser.refusalReason(error, `Could not extract ${chunkKSDTK66A_cjs.entitiesPhrase().toLowerCase()}`), "error");
|
|
5304
5304
|
throw error;
|
|
5305
5305
|
}
|
|
5306
5306
|
};
|
|
@@ -5314,10 +5314,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5314
5314
|
onOpenTag: openTag,
|
|
5315
5315
|
onOpenTaggedItems
|
|
5316
5316
|
};
|
|
5317
|
-
const n =
|
|
5317
|
+
const n = chunkKSDTK66A_cjs.tagsPageNouns();
|
|
5318
5318
|
const action = view === "person" || view === "organisation" ? {
|
|
5319
5319
|
label: "Extract",
|
|
5320
|
-
title: `Extract ${
|
|
5320
|
+
title: `Extract ${chunkKSDTK66A_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
|
|
5321
5321
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
|
|
5322
5322
|
run: () => setExtracting(true),
|
|
5323
5323
|
testId: "tags-extract-entities"
|
|
@@ -5486,7 +5486,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5486
5486
|
}
|
|
5487
5487
|
),
|
|
5488
5488
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5489
|
-
|
|
5489
|
+
chunkKSDTK66A_cjs.ExtractEntitiesDialog,
|
|
5490
5490
|
{
|
|
5491
5491
|
open: extracting,
|
|
5492
5492
|
onOpenChange: setExtracting,
|
|
@@ -6729,7 +6729,7 @@ function ConnectedFieldsManager({
|
|
|
6729
6729
|
) })
|
|
6730
6730
|
] });
|
|
6731
6731
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full", children: [
|
|
6732
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6732
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.DraggableHeader, { children: [
|
|
6733
6733
|
/* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.FieldsManagerTitle, { title, className: "px-4 pt-3.5 pb-2" }),
|
|
6734
6734
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3", children: tabHeader })
|
|
6735
6735
|
] }),
|
|
@@ -7629,10 +7629,10 @@ function useFactFilters(notes, view, chat) {
|
|
|
7629
7629
|
);
|
|
7630
7630
|
const setFactFilters = view.setFilters;
|
|
7631
7631
|
const quickFilteredNotes = react$1.useMemo(
|
|
7632
|
-
() =>
|
|
7632
|
+
() => chunkTBPCG2PV_cjs.applyInvertedIndexFilter(
|
|
7633
7633
|
notes,
|
|
7634
7634
|
factFilters,
|
|
7635
|
-
|
|
7635
|
+
chunkTBPCG2PV_cjs.buildInvertedIndex(
|
|
7636
7636
|
notes,
|
|
7637
7637
|
(f) => f.external_id,
|
|
7638
7638
|
(f) => Object.entries(getFactFilterAttributes(f)).filter(([id, on]) => on && factFilterIds.includes(id)).map(([id]) => id)
|
|
@@ -8488,7 +8488,7 @@ function ConnectedFactsPage() {
|
|
|
8488
8488
|
onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
|
|
8489
8489
|
navSlotRef: setNavSlot,
|
|
8490
8490
|
navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8491
|
-
|
|
8491
|
+
chunkKSDTK66A_cjs.GridRowNavigator,
|
|
8492
8492
|
{
|
|
8493
8493
|
gridApi,
|
|
8494
8494
|
selectedId: editingId,
|
|
@@ -8765,7 +8765,7 @@ function useConnectedShellWorkspaces(options = {}) {
|
|
|
8765
8765
|
function ConnectedSsoDisconnect() {
|
|
8766
8766
|
const { client } = react.useAccountClient();
|
|
8767
8767
|
const { data: profile } = react.useProfile();
|
|
8768
|
-
const auth =
|
|
8768
|
+
const auth = chunkPDDYAY4Z_cjs.useAuthPages();
|
|
8769
8769
|
const { notify: notify19 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
8770
8770
|
const [open, setOpen] = react$1.useState(false);
|
|
8771
8771
|
const [step, setStep] = react$1.useState("email");
|
|
@@ -8910,7 +8910,7 @@ function ConnectedBoxPortalSection() {
|
|
|
8910
8910
|
function ServerConnectionRow({ onRefresh, ...status }) {
|
|
8911
8911
|
const { runtimeConfig } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
8912
8912
|
const [isRefreshing, setIsRefreshing] = react$1.useState(false);
|
|
8913
|
-
const view =
|
|
8913
|
+
const view = chunkTBPCG2PV_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
|
|
8914
8914
|
const refresh = async () => {
|
|
8915
8915
|
setIsRefreshing(true);
|
|
8916
8916
|
try {
|
|
@@ -8920,7 +8920,7 @@ function ServerConnectionRow({ onRefresh, ...status }) {
|
|
|
8920
8920
|
}
|
|
8921
8921
|
};
|
|
8922
8922
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8923
|
-
|
|
8923
|
+
chunkTBPCG2PV_cjs.ServerConnectionButton,
|
|
8924
8924
|
{
|
|
8925
8925
|
state: view.state,
|
|
8926
8926
|
label: view.label,
|
|
@@ -8943,14 +8943,14 @@ function ConnectedAccountSettings({
|
|
|
8943
8943
|
}) {
|
|
8944
8944
|
const [logoutOpen, setLogoutOpen] = react$1.useState(false);
|
|
8945
8945
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkQQMMCXBP_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
8946
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8946
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedProfileCard, { avatarClassName, nameBadge: profileBadge }),
|
|
8947
8947
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedBoxPortalSection, {}),
|
|
8948
8948
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkQQMMCXBP_cjs.SettingsDisclosure, { title: "More", testId: "account-more-settings", children: [
|
|
8949
8949
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedSsoDisconnect, {}),
|
|
8950
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8950
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedSecuritySection, { children: securityRows }),
|
|
8951
8951
|
moreSettings,
|
|
8952
8952
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8953
|
-
|
|
8953
|
+
chunkPDDYAY4Z_cjs.ConnectedIdentityVerification,
|
|
8954
8954
|
{
|
|
8955
8955
|
collapsible: true,
|
|
8956
8956
|
onManageBilling,
|
|
@@ -8960,7 +8960,7 @@ function ConnectedAccountSettings({
|
|
|
8960
8960
|
] }),
|
|
8961
8961
|
/* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wifi, {}), title: "Session", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkQQMMCXBP_cjs.SettingsCard, { children: [
|
|
8962
8962
|
connection && /* @__PURE__ */ jsxRuntime.jsx(ServerConnectionRow, { ...connection }),
|
|
8963
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8963
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedSessionsRow, { renderSessionIcon }),
|
|
8964
8964
|
/* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsRow, { label: "Logout", description: "Sign out of your account on this device.", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8965
8965
|
ui.Button,
|
|
8966
8966
|
{
|
|
@@ -8977,9 +8977,9 @@ function ConnectedAccountSettings({
|
|
|
8977
8977
|
}
|
|
8978
8978
|
) })
|
|
8979
8979
|
] }) }),
|
|
8980
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8980
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedDangerZone, { renderSubscriptionLink }),
|
|
8981
8981
|
!onLogout && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8982
|
-
|
|
8982
|
+
chunkPDDYAY4Z_cjs.ConnectedLogoutDialog,
|
|
8983
8983
|
{
|
|
8984
8984
|
open: logoutOpen,
|
|
8985
8985
|
onClose: () => setLogoutOpen(false),
|
|
@@ -9322,7 +9322,7 @@ function ConnectedPrivacySettings({
|
|
|
9322
9322
|
}
|
|
9323
9323
|
)
|
|
9324
9324
|
] }) }),
|
|
9325
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9325
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedNotificationPreferences, {})
|
|
9326
9326
|
] });
|
|
9327
9327
|
}
|
|
9328
9328
|
var PROVIDER_NAMES = {
|
|
@@ -9363,13 +9363,13 @@ var COLUMNS = [
|
|
|
9363
9363
|
flex: 1,
|
|
9364
9364
|
minWidth: 120,
|
|
9365
9365
|
cellRenderer: (params) => isStandard(params.data) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9366
|
-
|
|
9366
|
+
chunkTBPCG2PV_cjs.ModelProviderLabel,
|
|
9367
9367
|
{
|
|
9368
9368
|
logo: /* @__PURE__ */ jsxRuntime.jsx(ui.ArbiIcon, { size: 14, "aria-label": "ARBI", className: "flex-shrink-0 rounded-sm" }),
|
|
9369
9369
|
children: "ARBI CITY"
|
|
9370
9370
|
}
|
|
9371
9371
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9372
|
-
|
|
9372
|
+
chunkTBPCG2PV_cjs.ModelProviderLabel,
|
|
9373
9373
|
{
|
|
9374
9374
|
logo: /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: params.data?.model_name, provider: params.value, size: 14 }),
|
|
9375
9375
|
children: PROVIDER_NAMES[params.value ?? ""] || params.value || "\u2014"
|
|
@@ -9446,7 +9446,7 @@ function ConnectedPremiumModels() {
|
|
|
9446
9446
|
);
|
|
9447
9447
|
if (premiumModels.length === 0) return null;
|
|
9448
9448
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsPanel, { className: "max-w-2xl space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsSection, { title: "Premium models", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9449
|
-
|
|
9449
|
+
chunkTBPCG2PV_cjs.PremiumModelsFrame,
|
|
9450
9450
|
{
|
|
9451
9451
|
enabled: premiumModel !== "",
|
|
9452
9452
|
onEnabledChange: (enabled) => {
|
|
@@ -9782,10 +9782,10 @@ function ConnectedAppsSettings({
|
|
|
9782
9782
|
}
|
|
9783
9783
|
};
|
|
9784
9784
|
if (isLoading) {
|
|
9785
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9785
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ConnectionsLoading, { message: "Loading connected apps\u2026" });
|
|
9786
9786
|
}
|
|
9787
9787
|
if (catalogError) {
|
|
9788
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9788
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ConnectionsError, { message: "Failed to load connector catalog. Please refresh and try again." });
|
|
9789
9789
|
}
|
|
9790
9790
|
const visibleCatalog = catalog.filter((c) => isVendorVisible(c.vendor_key));
|
|
9791
9791
|
const sharePointVisible = isVendorVisible("microsoft_sharepoint");
|
|
@@ -9794,7 +9794,7 @@ function ConnectedAppsSettings({
|
|
|
9794
9794
|
(c) => !react.isMailboxSyncVendor(c.vendor_key) && !react.isSharePointVendor(c.vendor_key)
|
|
9795
9795
|
);
|
|
9796
9796
|
const renderCard = (entry) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9797
|
-
|
|
9797
|
+
chunkTBPCG2PV_cjs.ConnectionCard,
|
|
9798
9798
|
{
|
|
9799
9799
|
connection: toConnectionCardView(entry, connectedByVendor[entry.vendor_key], {
|
|
9800
9800
|
isDisconnecting: disconnect.isPending && disconnect.variables?.vendorKey === entry.vendor_key,
|
|
@@ -9922,7 +9922,7 @@ function ConnectedAppsSettings({
|
|
|
9922
9922
|
}
|
|
9923
9923
|
)
|
|
9924
9924
|
] }),
|
|
9925
|
-
catalog.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsCard, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9925
|
+
catalog.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsCard, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ConnectionsEmpty, { message: "No connectors available yet." }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9926
9926
|
renderGroup("Email & Drive", EMAIL_AND_DRIVE_SUBTITLE, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, {}), emailCatalog),
|
|
9927
9927
|
renderGroup(
|
|
9928
9928
|
"Apps & Integrations (MCP)",
|
|
@@ -10375,7 +10375,7 @@ function ConnectedStorageProjectCard({
|
|
|
10375
10375
|
project.personal && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-muted-foreground", children: "Mail, recordings of calls you host, chat attachments and everything not in a project." })
|
|
10376
10376
|
] }),
|
|
10377
10377
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10378
|
-
|
|
10378
|
+
chunkTBPCG2PV_cjs.UsageToggle,
|
|
10379
10379
|
{
|
|
10380
10380
|
value: view,
|
|
10381
10381
|
onChange: setView,
|
|
@@ -10460,7 +10460,7 @@ function ConnectedStorageProjectCard({
|
|
|
10460
10460
|
] })
|
|
10461
10461
|
] }),
|
|
10462
10462
|
view === "largest" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
10463
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10463
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.UsageToggle, { value: kind, onChange: setKind, options: KIND_FILTERS, ariaLabel: "Kind" }),
|
|
10464
10464
|
largest.isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Loading\u2026" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10465
10465
|
StorageItemsTable,
|
|
10466
10466
|
{
|
|
@@ -10719,7 +10719,7 @@ function ConnectedSettingsPage({
|
|
|
10719
10719
|
}, [requested]);
|
|
10720
10720
|
const controlled = section !== void 0;
|
|
10721
10721
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10722
|
-
|
|
10722
|
+
chunkTBPCG2PV_cjs.SettingsPage,
|
|
10723
10723
|
{
|
|
10724
10724
|
...page,
|
|
10725
10725
|
sections,
|
|
@@ -10751,7 +10751,7 @@ function UsageSettings({ icon: icon2 }) {
|
|
|
10751
10751
|
description: "AI usage today, in \xA3 (ex VAT).",
|
|
10752
10752
|
testId: "settings-usage",
|
|
10753
10753
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10754
|
-
|
|
10754
|
+
chunkTBPCG2PV_cjs.UsageSummary,
|
|
10755
10755
|
{
|
|
10756
10756
|
stats: [
|
|
10757
10757
|
{
|
|
@@ -10869,7 +10869,7 @@ function ReaderAppearance({ bundle }) {
|
|
|
10869
10869
|
const { defaults } = bundle;
|
|
10870
10870
|
const isDefault = state.pairingId === defaults.pairingId && state.colorScheme === defaults.colorScheme && state.textSize === defaults.textSize;
|
|
10871
10871
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10872
|
-
|
|
10872
|
+
chunkTBPCG2PV_cjs.AppearanceSettings,
|
|
10873
10873
|
{
|
|
10874
10874
|
colorScheme: state.colorScheme,
|
|
10875
10875
|
onColorSchemeChange: state.setColorScheme,
|
|
@@ -11096,7 +11096,7 @@ function SwitchRow({ row: row2 }) {
|
|
|
11096
11096
|
const { on, set } = react.useFeatureSwitch(row2.feature);
|
|
11097
11097
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11098
11098
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11099
|
-
|
|
11099
|
+
chunkTBPCG2PV_cjs.SettingsSwitchRow,
|
|
11100
11100
|
{
|
|
11101
11101
|
id: row2.id ?? row2.feature,
|
|
11102
11102
|
testId: row2.testId ?? `toggle-${row2.feature}`,
|
|
@@ -11107,14 +11107,14 @@ function SwitchRow({ row: row2 }) {
|
|
|
11107
11107
|
onCheckedChange: set
|
|
11108
11108
|
}
|
|
11109
11109
|
),
|
|
11110
|
-
on && row2.rows && row2.rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11110
|
+
on && row2.rows && row2.rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SettingsSwitchGroup, { children: row2.rows.map((sub) => /* @__PURE__ */ jsxRuntime.jsx(FeatureRow, { row: sub }, sub.feature)) })
|
|
11111
11111
|
] });
|
|
11112
11112
|
}
|
|
11113
11113
|
function CallsRow({ row: row2 }) {
|
|
11114
11114
|
const { on, set } = react.useFeatureSwitch(row2.feature);
|
|
11115
|
-
const state =
|
|
11115
|
+
const state = chunkTBPCG2PV_cjs.callsSwitchState(react.useCallsConfig(), on);
|
|
11116
11116
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11117
|
-
|
|
11117
|
+
chunkTBPCG2PV_cjs.SettingsSwitchRow,
|
|
11118
11118
|
{
|
|
11119
11119
|
id: row2.id ?? row2.feature,
|
|
11120
11120
|
testId: row2.testId ?? `toggle-${row2.feature}`,
|
|
@@ -11318,7 +11318,7 @@ function ConnectedRecoveryKeyDialog({
|
|
|
11318
11318
|
const arbi = react.useArbi();
|
|
11319
11319
|
const { user, isSso: isSsoMode } = react.useArbiSession();
|
|
11320
11320
|
const userEmail = user?.email;
|
|
11321
|
-
const sso =
|
|
11321
|
+
const sso = chunkPDDYAY4Z_cjs.useSsoSignIn();
|
|
11322
11322
|
const handleVerify = async () => {
|
|
11323
11323
|
setError(null);
|
|
11324
11324
|
if (!password) {
|
|
@@ -11479,7 +11479,7 @@ function ConnectedRemoteControlSwitch() {
|
|
|
11479
11479
|
}
|
|
11480
11480
|
function RemoteControlSwitch() {
|
|
11481
11481
|
const enabled = react.useRemoteControl((state) => state.enabled);
|
|
11482
|
-
const remote =
|
|
11482
|
+
const remote = chunkPDDYAY4Z_cjs.useRemoteControlActions();
|
|
11483
11483
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11484
11484
|
chunkQQMMCXBP_cjs.SettingsRow,
|
|
11485
11485
|
{
|
|
@@ -11501,7 +11501,7 @@ function RemoteControlSwitch() {
|
|
|
11501
11501
|
);
|
|
11502
11502
|
}
|
|
11503
11503
|
var JUST_CONNECTED_VIEW = "settings.justConnected";
|
|
11504
|
-
var identityFeeLabel = (status) => `${
|
|
11504
|
+
var identityFeeLabel = (status) => `${chunkXJE7W42L_cjs.formatMoney(status.price_pence, status.currency.toLowerCase())} incl. VAT`;
|
|
11505
11505
|
var openLogout = () => chunkJDFBEGQO_cjs.openDialog("logout");
|
|
11506
11506
|
function RecoveryKeyRow() {
|
|
11507
11507
|
const [open, setOpen] = react$1.useState(false);
|
|
@@ -11592,7 +11592,7 @@ function useSettingsSections({
|
|
|
11592
11592
|
] })
|
|
11593
11593
|
}),
|
|
11594
11594
|
// "Work offline" flips the one offline switch even while the server is reachable.
|
|
11595
|
-
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11595
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.WorkOfflineToggle, { isOffline: forceOffline, onToggle: setWorkOffline })
|
|
11596
11596
|
},
|
|
11597
11597
|
...showMail ? [
|
|
11598
11598
|
mailSettingsSection({
|
|
@@ -11740,7 +11740,7 @@ function ConnectedDeploymentStorage() {
|
|
|
11740
11740
|
deployment.unattributed_bytes > 0 && ` \xB7 ${chunkUZHWXKS6_cjs.formatBytes(deployment.unattributed_bytes)} not owned by any ${ui.entityNoun("PROJECT")}`
|
|
11741
11741
|
] }),
|
|
11742
11742
|
trend.dates.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11743
|
-
|
|
11743
|
+
chunkTBPCG2PV_cjs.UsageLineChart,
|
|
11744
11744
|
{
|
|
11745
11745
|
dates: trend.dates,
|
|
11746
11746
|
series: trend.series,
|
|
@@ -11749,7 +11749,7 @@ function ConnectedDeploymentStorage() {
|
|
|
11749
11749
|
}
|
|
11750
11750
|
),
|
|
11751
11751
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11752
|
-
|
|
11752
|
+
chunkTBPCG2PV_cjs.UsageToggle,
|
|
11753
11753
|
{
|
|
11754
11754
|
value: view,
|
|
11755
11755
|
onChange: setView,
|
|
@@ -11822,14 +11822,14 @@ function usePaidWorkspaceMembers() {
|
|
|
11822
11822
|
try {
|
|
11823
11823
|
return await mutation.mutateAsync(...args);
|
|
11824
11824
|
} catch (error) {
|
|
11825
|
-
const detail =
|
|
11825
|
+
const detail = chunkXJE7W42L_cjs.apiErrorDetail(error);
|
|
11826
11826
|
if (detail?.code !== "COLLABORATOR_CAPACITY_REQUIRED" || !detail.can_buy || !arbi || !detail.project_ext_id || !detail.blocks_required || !detail.block_size)
|
|
11827
11827
|
throw error;
|
|
11828
11828
|
const project = detail.project_ext_id;
|
|
11829
11829
|
const quote = await arbi.projects.quoteAddon(project, "collaborators");
|
|
11830
11830
|
const count2 = detail.blocks_required;
|
|
11831
|
-
const today =
|
|
11832
|
-
const renewal =
|
|
11831
|
+
const today = chunkXJE7W42L_cjs.formatMoney(quote.now.total_pence * count2, "gbp");
|
|
11832
|
+
const renewal = chunkXJE7W42L_cjs.formatMoney(quote.renewal.total_pence * count2, "gbp");
|
|
11833
11833
|
const confirmed = await confirm({
|
|
11834
11834
|
title: "More collaborator places needed",
|
|
11835
11835
|
message: `This invitation exceeds your ${detail.limit}-collaborator allowance. Add ${count2 * detail.block_size} places for ${today} today, including tax, then ${renewal} per ${detail.interval === "year" ? "year" : "month"} until removed? You are not counted.`,
|
|
@@ -12682,7 +12682,7 @@ function ConnectedProjectEntity({
|
|
|
12682
12682
|
subscription = "none",
|
|
12683
12683
|
...props
|
|
12684
12684
|
}) {
|
|
12685
|
-
const { stripeEnabled } =
|
|
12685
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
12686
12686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12687
12687
|
ui.ProjectEntity,
|
|
12688
12688
|
{
|
|
@@ -12777,7 +12777,7 @@ function StripeCheckoutModal({
|
|
|
12777
12777
|
const [clientSecret, setClientSecret] = react$1.useState(null);
|
|
12778
12778
|
const [isCreating, setIsCreating] = react$1.useState(false);
|
|
12779
12779
|
const [stripe, setStripe] = react$1.useState(null);
|
|
12780
|
-
const { stripeEnabled, checkout } =
|
|
12780
|
+
const { stripeEnabled, checkout } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
12781
12781
|
const createCheckout = react.useCreateProjectCheckout();
|
|
12782
12782
|
const refreshProject = react.useRefreshProject();
|
|
12783
12783
|
const invalidateProjects = react.useInvalidateProjects();
|
|
@@ -12806,7 +12806,7 @@ function StripeCheckoutModal({
|
|
|
12806
12806
|
projectExtId,
|
|
12807
12807
|
body: {
|
|
12808
12808
|
interval,
|
|
12809
|
-
packs:
|
|
12809
|
+
packs: chunkXJE7W42L_cjs.PRO_PACKS,
|
|
12810
12810
|
ai_blocks: aiBlocks,
|
|
12811
12811
|
storage_blocks: storageBlocks,
|
|
12812
12812
|
collaborator_blocks: collaboratorBlocks,
|
|
@@ -12823,7 +12823,8 @@ function StripeCheckoutModal({
|
|
|
12823
12823
|
},
|
|
12824
12824
|
onError: (error) => {
|
|
12825
12825
|
console.error("Failed to create checkout session:", error);
|
|
12826
|
-
const
|
|
12826
|
+
const detail = chunkXJE7W42L_cjs.apiErrorDetail(error);
|
|
12827
|
+
const reason = typeof detail === "string" ? detail : detail?.message;
|
|
12827
12828
|
shell.notify.error(
|
|
12828
12829
|
reason ? `Checkout didn't start: ${reason}` : "Checkout didn't start. Try again."
|
|
12829
12830
|
);
|
|
@@ -12857,9 +12858,9 @@ function StripeCheckoutModal({
|
|
|
12857
12858
|
}
|
|
12858
12859
|
}, [open]);
|
|
12859
12860
|
const isStripeConfigured = stripeEnabled;
|
|
12860
|
-
const vatNote = quote ? `${
|
|
12861
|
+
const vatNote = quote ? `${chunkXJE7W42L_cjs.checkoutItemsLabel(aiBlocks, storageBlocks, collaboratorBlocks, price)} \xB7 ${promoCode && !quote.promo_code ? "Before promo code: " : ""}${chunkXJE7W42L_cjs.quoteTotalLine(quote)}` : null;
|
|
12861
12862
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12862
|
-
|
|
12863
|
+
chunkTBPCG2PV_cjs.CheckoutDialogFrame,
|
|
12863
12864
|
{
|
|
12864
12865
|
open,
|
|
12865
12866
|
onOpenChange,
|
|
@@ -12869,7 +12870,7 @@ function StripeCheckoutModal({
|
|
|
12869
12870
|
children: clientSecret && !!stripe && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12870
12871
|
vatNote && /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-vat-note", className: "mb-4 text-sm text-muted-foreground", children: vatNote }),
|
|
12871
12872
|
checkout?.render(stripe, { clientSecret, onComplete: handleComplete }),
|
|
12872
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12873
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.MoreInfo, { title: "Paying", label: "Payment help", testId: "checkout-payment-help", children: [
|
|
12873
12874
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-decline-note", children: "Card declined? Nothing was charged. Try again or use another card." }),
|
|
12874
12875
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-vat-id-note", children: "No VAT number? Leave \u2018purchasing as a business\u2019 unticked." }),
|
|
12875
12876
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Add-ons chosen here are on the first invoice with the plan and renew with it until you reduce them." })
|
|
@@ -12882,28 +12883,118 @@ function MonthlySpendCap({
|
|
|
12882
12883
|
value,
|
|
12883
12884
|
minimum,
|
|
12884
12885
|
maximum,
|
|
12885
|
-
stepPence
|
|
12886
|
+
stepPence,
|
|
12886
12887
|
onChange,
|
|
12887
12888
|
inputRef,
|
|
12888
12889
|
testId = "spend-cap-input",
|
|
12889
|
-
compact = false
|
|
12890
|
+
compact = false,
|
|
12891
|
+
control = "slider",
|
|
12892
|
+
basePence = 0,
|
|
12893
|
+
annualMaximumPence,
|
|
12894
|
+
onEnabledChange,
|
|
12895
|
+
disabled = false
|
|
12890
12896
|
}) {
|
|
12891
12897
|
const id = react$1.useId();
|
|
12892
12898
|
const step = stepPence / 100;
|
|
12893
|
-
const
|
|
12894
|
-
const
|
|
12895
|
-
const
|
|
12896
|
-
|
|
12899
|
+
const minimumExtra = Math.ceil(minimum / stepPence) * stepPence;
|
|
12900
|
+
const maximumExtra = Math.max(Math.floor(maximum / stepPence) * stepPence, minimumExtra);
|
|
12901
|
+
const extra = Math.max(
|
|
12902
|
+
minimumExtra,
|
|
12903
|
+
Math.min(maximumExtra, Math.floor(value / stepPence) * stepPence)
|
|
12904
|
+
);
|
|
12905
|
+
const min = (basePence + minimumExtra) / 100;
|
|
12906
|
+
const max = (basePence + maximumExtra) / 100;
|
|
12907
|
+
const pounds = (basePence + extra) / 100;
|
|
12908
|
+
const money = (n) => chunkXJE7W42L_cjs.formatMoney(n, "gbp");
|
|
12909
|
+
if (control === "purchase")
|
|
12910
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-auto-summary", children: [
|
|
12911
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-ceiling-intro text-muted-foreground", children: "Project spend cap if I exceed my quota:" }),
|
|
12912
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12913
|
+
"div",
|
|
12914
|
+
{
|
|
12915
|
+
className: "project-purchase-ceiling-columns",
|
|
12916
|
+
role: "group",
|
|
12917
|
+
"aria-label": "Auto-upgrade maximum",
|
|
12918
|
+
"data-testid": "auto-upgrade-maximum",
|
|
12919
|
+
children: [
|
|
12920
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12921
|
+
"output",
|
|
12922
|
+
{
|
|
12923
|
+
className: "project-purchase-ceiling-monthly",
|
|
12924
|
+
id,
|
|
12925
|
+
"data-testid": testId,
|
|
12926
|
+
"aria-live": "polite",
|
|
12927
|
+
"aria-label": `${money(pounds * 100)} maximum per month`,
|
|
12928
|
+
children: [
|
|
12929
|
+
money(pounds * 100),
|
|
12930
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-ceiling-unit", children: "/monthly" })
|
|
12931
|
+
]
|
|
12932
|
+
}
|
|
12933
|
+
),
|
|
12934
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-max-stepper", children: [
|
|
12935
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12936
|
+
ui.Button,
|
|
12937
|
+
{
|
|
12938
|
+
type: "button",
|
|
12939
|
+
variant: "outline",
|
|
12940
|
+
size: "icon",
|
|
12941
|
+
"aria-label": "Decrease auto-upgrade maximum",
|
|
12942
|
+
disabled: disabled || extra <= minimumExtra,
|
|
12943
|
+
onClick: () => onChange(Math.max(minimumExtra, extra - stepPence)),
|
|
12944
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { size: 14, "aria-hidden": "true" })
|
|
12945
|
+
}
|
|
12946
|
+
),
|
|
12947
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12948
|
+
ui.Button,
|
|
12949
|
+
{
|
|
12950
|
+
type: "button",
|
|
12951
|
+
variant: "outline",
|
|
12952
|
+
size: "icon",
|
|
12953
|
+
"aria-label": "Increase auto-upgrade maximum",
|
|
12954
|
+
disabled: disabled || extra >= maximumExtra,
|
|
12955
|
+
onClick: () => onChange(Math.min(maximumExtra, extra + stepPence)),
|
|
12956
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { size: 14, "aria-hidden": "true" })
|
|
12957
|
+
}
|
|
12958
|
+
)
|
|
12959
|
+
] }),
|
|
12960
|
+
annualMaximumPence != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "project-purchase-annual-maximum", "data-testid": "annual-spend-ceiling", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12961
|
+
"output",
|
|
12962
|
+
{
|
|
12963
|
+
"aria-live": "polite",
|
|
12964
|
+
"aria-label": `${money(annualMaximumPence)} maximum with annual billing`,
|
|
12965
|
+
children: [
|
|
12966
|
+
money(annualMaximumPence),
|
|
12967
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-ceiling-unit", children: "/annual" })
|
|
12968
|
+
]
|
|
12969
|
+
}
|
|
12970
|
+
) })
|
|
12971
|
+
]
|
|
12972
|
+
}
|
|
12973
|
+
)
|
|
12974
|
+
] });
|
|
12897
12975
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-2", children: [
|
|
12898
12976
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
12899
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12977
|
+
onEnabledChange ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12978
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12979
|
+
ui.Checkbox,
|
|
12980
|
+
{
|
|
12981
|
+
id: `${id}-enabled`,
|
|
12982
|
+
checked: extra > 0,
|
|
12983
|
+
disabled: disabled || maximumExtra === 0,
|
|
12984
|
+
onCheckedChange: (checked) => onEnabledChange(checked === true),
|
|
12985
|
+
className: "project-purchase-auto-checkbox"
|
|
12986
|
+
}
|
|
12987
|
+
),
|
|
12988
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `${id}-enabled`, children: "Auto-upgrade" }),
|
|
12989
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: id, className: "sr-only", children: "Auto-upgrade limit" })
|
|
12990
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: id, children: "Auto-upgrade limit" }),
|
|
12900
12991
|
/* @__PURE__ */ jsxRuntime.jsxs("output", { htmlFor: id, className: "font-semibold tabular-nums", children: [
|
|
12901
|
-
"+",
|
|
12992
|
+
basePence > 0 ? "" : "+",
|
|
12902
12993
|
money(pounds * 100),
|
|
12903
12994
|
"/month ex VAT"
|
|
12904
12995
|
] })
|
|
12905
12996
|
] }),
|
|
12906
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-description`, className: "text-xs text-muted-foreground", children:
|
|
12997
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-description`, className: "text-xs text-muted-foreground", children: extra === 0 ? "Automatic upgrades are off." : basePence > 0 ? `Monthly plan and add-ons ${money(basePence)} + up to ${money(extra)} in automatic upgrades. We notify you before an upgrade.` : "Just-in-time upgrades avoid work interruption when you hit your limits. We notify you before any upgrade." }),
|
|
12907
12998
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12908
12999
|
"input",
|
|
12909
13000
|
{
|
|
@@ -12914,9 +13005,10 @@ function MonthlySpendCap({
|
|
|
12914
13005
|
max,
|
|
12915
13006
|
step,
|
|
12916
13007
|
value: pounds,
|
|
12917
|
-
onChange: (event) => onChange(Number(event.target.value) * 100),
|
|
13008
|
+
onChange: (event) => onChange(Math.round(Number(event.target.value) * 100) - basePence),
|
|
13009
|
+
disabled,
|
|
12918
13010
|
"aria-describedby": `${id}-description`,
|
|
12919
|
-
"aria-valuetext": `${money(pounds * 100)} extra per month for automatic upgrades, beyond your selected plan and add-ons, plus VAT`,
|
|
13011
|
+
"aria-valuetext": basePence > 0 ? `${money(pounds * 100)} total per month, including ${money(basePence)} for the selected monthly plan and add-ons and up to ${money(extra)} for automatic upgrades, plus VAT` : `${money(pounds * 100)} extra per month for automatic upgrades, beyond your selected plan and add-ons, plus VAT`,
|
|
12920
13012
|
style: {
|
|
12921
13013
|
"--cap-progress": `${max > min ? (pounds - min) / (max - min) * 100 : 100}%`
|
|
12922
13014
|
},
|
|
@@ -12931,7 +13023,12 @@ function MonthlySpendCap({
|
|
|
12931
13023
|
!compact && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "You can also adjust usage add-ons with + and \u2212." })
|
|
12932
13024
|
] });
|
|
12933
13025
|
}
|
|
12934
|
-
|
|
13026
|
+
function useReferralOffer(enabled = true) {
|
|
13027
|
+
const { data } = react.useProducts({ enabled });
|
|
13028
|
+
const product = data?.[0];
|
|
13029
|
+
if (product?.inviter_reward_amount == null || !product.reward_currency) return null;
|
|
13030
|
+
return { amount: product.inviter_reward_amount, currency: product.reward_currency };
|
|
13031
|
+
}
|
|
12935
13032
|
function useReferralReward() {
|
|
12936
13033
|
const { data } = react.useUserSettings();
|
|
12937
13034
|
const ed = data?.extra_discount;
|
|
@@ -12950,7 +13047,7 @@ function applyReferralReward(totalCents, reward, priceCurrency) {
|
|
|
12950
13047
|
};
|
|
12951
13048
|
}
|
|
12952
13049
|
function purchaseNet(price, ai, storage, collaborators) {
|
|
12953
|
-
const base =
|
|
13050
|
+
const base = chunkXJE7W42L_cjs.packPrice(price)?.amount_ex_vat ?? price?.amount_ex_vat;
|
|
12954
13051
|
if (base == null) return null;
|
|
12955
13052
|
let total = base;
|
|
12956
13053
|
for (const [kind, count2] of [
|
|
@@ -12975,48 +13072,112 @@ function ProjectPurchaseOptions({
|
|
|
12975
13072
|
onCollaboratorBlocksChange,
|
|
12976
13073
|
disabled,
|
|
12977
13074
|
busy,
|
|
13075
|
+
busyLabel = "Opening payment\u2026",
|
|
12978
13076
|
enabled = true,
|
|
12979
|
-
onChoose
|
|
13077
|
+
onChoose,
|
|
13078
|
+
onChooseFree,
|
|
13079
|
+
promoCode = "",
|
|
13080
|
+
onPromoCodeChange,
|
|
13081
|
+
dailyCapValue,
|
|
13082
|
+
onDailyCapChange,
|
|
13083
|
+
onSaveDailyCap,
|
|
13084
|
+
canSaveDailyCap,
|
|
13085
|
+
dailyCapError,
|
|
13086
|
+
currentQuotas
|
|
12980
13087
|
}) {
|
|
12981
13088
|
const [spendCap, setSpendCap] = react$1.useState(null);
|
|
12982
|
-
const
|
|
12983
|
-
const
|
|
13089
|
+
const [adjustment, setAdjustment] = react$1.useState("max");
|
|
13090
|
+
const [dailyCapOpen, setDailyCapOpen] = react$1.useState(false);
|
|
13091
|
+
const dailyCapId = react$1.useId();
|
|
13092
|
+
const promoId = react$1.useId();
|
|
13093
|
+
const [promoOpen, setPromoOpen] = react$1.useState(false);
|
|
13094
|
+
const [activePromo, setActivePromo] = react$1.useState("");
|
|
13095
|
+
const reward = chunkXJE7W42L_cjs.useRewardBalance();
|
|
13096
|
+
const prices = chunkXJE7W42L_cjs.findProPrices(products);
|
|
12984
13097
|
const monthlyNet = purchaseNet(prices.monthly, aiBlocks, storageBlocks, collaboratorBlocks);
|
|
12985
13098
|
const annualNet = purchaseNet(prices.annual, aiBlocks, storageBlocks, collaboratorBlocks);
|
|
12986
13099
|
const extras = { ai_usage: aiBlocks, storage: storageBlocks, collaborators: collaboratorBlocks };
|
|
12987
13100
|
const monthlyQuote = react.usePlanQuote(
|
|
12988
13101
|
projectExtId,
|
|
12989
|
-
enabled && monthlyNet != null ? {
|
|
13102
|
+
enabled && monthlyNet != null ? {
|
|
13103
|
+
plan: "pro",
|
|
13104
|
+
interval: "month",
|
|
13105
|
+
addons: extras,
|
|
13106
|
+
...activePromo ? { promo_code: activePromo } : {}
|
|
13107
|
+
} : null
|
|
12990
13108
|
);
|
|
12991
13109
|
const annualQuote = react.usePlanQuote(
|
|
12992
13110
|
projectExtId,
|
|
12993
|
-
enabled && annualNet != null ? {
|
|
13111
|
+
enabled && annualNet != null ? {
|
|
13112
|
+
plan: "pro",
|
|
13113
|
+
interval: "year",
|
|
13114
|
+
addons: extras,
|
|
13115
|
+
...activePromo ? { promo_code: activePromo } : {}
|
|
13116
|
+
} : null
|
|
13117
|
+
);
|
|
13118
|
+
const promoChecking = !!activePromo && (monthlyQuote.isFetching || annualQuote.isFetching);
|
|
13119
|
+
const promoError = activePromo && (monthlyQuote.error || annualQuote.error);
|
|
13120
|
+
const promoApplied = !!activePromo && [monthlyQuote, annualQuote].some(
|
|
13121
|
+
(result) => result.data?.promo_code?.toLowerCase() === activePromo.toLowerCase()
|
|
12994
13122
|
);
|
|
12995
13123
|
const product = products?.[0];
|
|
13124
|
+
if (!product || !(product.spend_cap_step_pence > 0))
|
|
13125
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Prices unavailable. Try again." });
|
|
12996
13126
|
const currency = prices.monthly?.currency ?? prices.annual?.currency ?? "gbp";
|
|
12997
|
-
const money = (pence) =>
|
|
12998
|
-
const ai =
|
|
12999
|
-
const storage =
|
|
13000
|
-
const collaborators =
|
|
13127
|
+
const money = (pence) => chunkXJE7W42L_cjs.formatMoney(pence, currency);
|
|
13128
|
+
const ai = product.included_ai_gbp + aiBlocks * (chunkXJE7W42L_cjs.addonPrice(prices.monthly, "ai_usage")?.ai_gbp ?? 0);
|
|
13129
|
+
const storage = product.included_storage_gb + storageBlocks * (chunkXJE7W42L_cjs.addonPrice(prices.monthly, "storage")?.storage_gb ?? 0);
|
|
13130
|
+
const collaborators = product.included_collaborators + collaboratorBlocks * (prices.monthly?.addon_prices?.find((p) => p.kind === "collaborators")?.collaborators ?? 0);
|
|
13131
|
+
const currentAi = currentQuotas?.ai_usage.limit ?? product.free_ai_gbp;
|
|
13132
|
+
const currentStorage = currentQuotas?.storage_gb.limit ?? product.free_storage_gb;
|
|
13133
|
+
const currentCollaborators = currentQuotas?.collaborators.limit ?? product.free_collaborators;
|
|
13134
|
+
const multiplier = (next, current, extra) => {
|
|
13135
|
+
if (next === current) return "Same as now";
|
|
13136
|
+
if (current <= 0) return extra;
|
|
13137
|
+
const ratio = Number((next / current).toFixed(1));
|
|
13138
|
+
return ratio > 1 ? `${ratio}\xD7 more` : `${ratio}\xD7 current`;
|
|
13139
|
+
};
|
|
13001
13140
|
const saving = monthlyNet && annualNet != null ? Math.max(0, Math.round(100 * (1 - annualNet / (monthlyNet * 12)))) : 0;
|
|
13002
|
-
const stepPence = product
|
|
13003
|
-
const
|
|
13004
|
-
|
|
13141
|
+
const stepPence = product.spend_cap_step_pence;
|
|
13142
|
+
const increment = (price) => {
|
|
13143
|
+
const amounts = price?.addon_prices?.map((addon) => addon.amount_ex_vat) ?? [];
|
|
13144
|
+
if (!amounts.length) return null;
|
|
13145
|
+
const min = Math.min(...amounts);
|
|
13146
|
+
const max = Math.max(...amounts);
|
|
13147
|
+
return min === max ? money(min) : `${money(min)}\u2013${money(max)}`;
|
|
13148
|
+
};
|
|
13149
|
+
const monthlyIncrement = increment(prices.monthly);
|
|
13150
|
+
const annualIncrement = increment(prices.annual);
|
|
13151
|
+
const defaultCap = product.default_spend_cap_pence;
|
|
13152
|
+
const maximumCap = product.maximum_spend_cap_pence;
|
|
13005
13153
|
const cap = Math.max(
|
|
13006
13154
|
0,
|
|
13007
13155
|
Math.min(maximumCap, Math.floor((spendCap ?? defaultCap) / stepPence) * stepPence)
|
|
13008
13156
|
);
|
|
13009
|
-
const
|
|
13010
|
-
(
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
const
|
|
13157
|
+
const annualUpgradeRates = (prices.monthly?.addon_prices ?? []).flatMap((monthly) => {
|
|
13158
|
+
if (!["ai_usage", "storage"].includes(monthly.kind) || monthly.amount_ex_vat <= 0) return [];
|
|
13159
|
+
const annual = prices.annual?.addon_prices?.find((price) => price.kind === monthly.kind);
|
|
13160
|
+
return annual ? [annual.amount_ex_vat / monthly.amount_ex_vat] : [];
|
|
13161
|
+
});
|
|
13162
|
+
const annualCeiling = annualNet != null && (cap === 0 || annualUpgradeRates.length > 0) ? annualNet + Math.ceil(cap * Math.max(0, ...annualUpgradeRates)) : void 0;
|
|
13163
|
+
const changeSpendCap = (next) => setSpendCap(next);
|
|
13164
|
+
const manualOpen = adjustment === "min";
|
|
13165
|
+
const changeMinimum = (kind, count2) => {
|
|
13166
|
+
const nextAi = kind === "ai" ? count2 : aiBlocks;
|
|
13167
|
+
const nextStorage = kind === "storage" ? count2 : storageBlocks;
|
|
13168
|
+
const nextCollaborators = kind === "collaborator" ? count2 : collaboratorBlocks;
|
|
13169
|
+
const nextMinimum = purchaseNet(prices.monthly, nextAi, nextStorage, nextCollaborators);
|
|
13170
|
+
if (monthlyNet != null && nextMinimum != null) {
|
|
13171
|
+
const overallMaximum = monthlyNet + cap;
|
|
13172
|
+
setSpendCap(Math.max(0, Math.floor((overallMaximum - nextMinimum) / stepPence) * stepPence));
|
|
13173
|
+
}
|
|
13174
|
+
if (kind === "ai") onAiBlocksChange(count2);
|
|
13175
|
+
else if (kind === "storage") onStorageBlocksChange(count2);
|
|
13176
|
+
else onCollaboratorBlocksChange(count2);
|
|
13177
|
+
};
|
|
13178
|
+
const dailyCapVisible = dailyCapOpen || !!dailyCapError;
|
|
13018
13179
|
const quoteFor = (interval) => interval === "month" ? monthlyQuote.data : annualQuote.data;
|
|
13019
|
-
const controls = (kind, count2, onChange, label, available) => /* @__PURE__ */ jsxRuntime.jsxs("
|
|
13180
|
+
const controls = (kind, count2, onChange, label, available) => manualOpen ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-allowance-controls", role: "group", "aria-label": label, children: [
|
|
13020
13181
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13021
13182
|
ui.Button,
|
|
13022
13183
|
{
|
|
@@ -13037,145 +13198,412 @@ function ProjectPurchaseOptions({
|
|
|
13037
13198
|
size: "icon",
|
|
13038
13199
|
variant: "outline",
|
|
13039
13200
|
"aria-label": `Add ${label}`,
|
|
13040
|
-
disabled: busy || !available || count2 >=
|
|
13201
|
+
disabled: busy || !available || count2 >= chunkXJE7W42L_cjs.MAX_CHECKOUT_BLOCKS,
|
|
13041
13202
|
onClick: () => onChange(count2 + 1),
|
|
13042
13203
|
"data-testid": `checkout-${kind}-blocks-increment`,
|
|
13043
13204
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { size: 14, "aria-hidden": "true" })
|
|
13044
13205
|
}
|
|
13045
13206
|
)
|
|
13046
|
-
] });
|
|
13207
|
+
] }) : null;
|
|
13047
13208
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase", "data-testid": "project-purchase-options", children: [
|
|
13048
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
13049
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
13050
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13209
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "project-purchase-inclusions-panel", "aria-label": "Plan allowances", children: [
|
|
13210
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "project-purchase-inclusions", "aria-live": "polite", children: [
|
|
13211
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
13212
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-xs text-muted-foreground", children: "AI credits / month" }),
|
|
13213
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13214
|
+
"dd",
|
|
13215
|
+
{
|
|
13216
|
+
className: "project-purchase-allowance-value text-xl font-semibold tabular-nums",
|
|
13217
|
+
"data-testid": "purchase-ai-allowance",
|
|
13218
|
+
children: [
|
|
13219
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { "aria-hidden": "true", className: "project-purchase-icon" }),
|
|
13220
|
+
money(ai * 100)
|
|
13221
|
+
]
|
|
13222
|
+
}
|
|
13223
|
+
),
|
|
13224
|
+
currentAi != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13225
|
+
"dd",
|
|
13226
|
+
{
|
|
13227
|
+
className: "project-purchase-current",
|
|
13228
|
+
"data-increased": ai > currentAi,
|
|
13229
|
+
title: `Compared with ${money(currentAi * 100)}/month on your current plan`,
|
|
13230
|
+
children: multiplier(ai, currentAi, `+${money((ai - currentAi) * 100)}`)
|
|
13231
|
+
}
|
|
13232
|
+
)
|
|
13233
|
+
] }),
|
|
13234
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
13235
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-xs text-muted-foreground", children: "Storage" }),
|
|
13236
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13237
|
+
"dd",
|
|
13238
|
+
{
|
|
13239
|
+
className: "project-purchase-allowance-value text-xl font-semibold tabular-nums",
|
|
13240
|
+
"data-testid": "purchase-storage-allowance",
|
|
13241
|
+
children: [
|
|
13242
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { "aria-hidden": "true", className: "project-purchase-icon" }),
|
|
13243
|
+
storage,
|
|
13244
|
+
" GB"
|
|
13245
|
+
]
|
|
13246
|
+
}
|
|
13247
|
+
),
|
|
13248
|
+
currentStorage != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13249
|
+
"dd",
|
|
13250
|
+
{
|
|
13251
|
+
className: "project-purchase-current",
|
|
13252
|
+
"data-increased": storage > currentStorage,
|
|
13253
|
+
title: `Compared with ${currentStorage} GB on your current plan`,
|
|
13254
|
+
children: multiplier(storage, currentStorage, `+${storage - currentStorage} GB`)
|
|
13255
|
+
}
|
|
13256
|
+
)
|
|
13257
|
+
] }),
|
|
13258
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
13259
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "text-xs text-muted-foreground", children: [
|
|
13260
|
+
collaborators === 1 ? "Collaborator" : "Collaborators",
|
|
13261
|
+
" + you"
|
|
13262
|
+
] }),
|
|
13263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13264
|
+
"dd",
|
|
13265
|
+
{
|
|
13266
|
+
className: "project-purchase-allowance-value text-xl font-semibold tabular-nums",
|
|
13267
|
+
"data-testid": "purchase-collaborator-allowance",
|
|
13268
|
+
children: [
|
|
13269
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { "aria-hidden": "true", className: "project-purchase-icon" }),
|
|
13270
|
+
collaborators
|
|
13271
|
+
]
|
|
13272
|
+
}
|
|
13273
|
+
),
|
|
13274
|
+
currentCollaborators != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13275
|
+
"dd",
|
|
13276
|
+
{
|
|
13277
|
+
className: "project-purchase-current",
|
|
13278
|
+
"data-increased": collaborators > currentCollaborators,
|
|
13279
|
+
title: `Compared with ${currentCollaborators} collaborators on your current plan`,
|
|
13280
|
+
children: collaborators === currentCollaborators ? "Same as now" : `${collaborators > currentCollaborators ? "+" : "\u2212"}${Math.abs(collaborators - currentCollaborators)} collaborator${Math.abs(collaborators - currentCollaborators) === 1 ? "" : "s"}`
|
|
13281
|
+
}
|
|
13282
|
+
)
|
|
13283
|
+
] })
|
|
13060
13284
|
] }),
|
|
13061
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
13062
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13063
|
-
|
|
13064
|
-
|
|
13285
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "project-purchase-settings", "aria-label": "Allowance settings", children: [
|
|
13286
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-settings-row", children: [
|
|
13287
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "project-purchase-settings-heading", children: "Extra usage upgrades:" }),
|
|
13288
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13289
|
+
ui.ToggleGroup,
|
|
13290
|
+
{
|
|
13291
|
+
type: "single",
|
|
13292
|
+
value: adjustment,
|
|
13293
|
+
onValueChange: (value) => {
|
|
13294
|
+
if (value === "min" || value === "max") setAdjustment(value);
|
|
13295
|
+
},
|
|
13296
|
+
disabled: busy,
|
|
13297
|
+
className: "project-purchase-mode",
|
|
13298
|
+
"aria-label": "Allowance adjustment",
|
|
13299
|
+
children: [
|
|
13300
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ToggleGroupItem, { value: "min", children: "Manual" }),
|
|
13301
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ToggleGroupItem, { value: "max", children: "Automatic" })
|
|
13302
|
+
]
|
|
13303
|
+
}
|
|
13304
|
+
)
|
|
13305
|
+
] }),
|
|
13306
|
+
!manualOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "auto-upgrade-section", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13307
|
+
MonthlySpendCap,
|
|
13065
13308
|
{
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13309
|
+
value: cap,
|
|
13310
|
+
minimum: 0,
|
|
13311
|
+
basePence: monthlyNet ?? 0,
|
|
13312
|
+
annualMaximumPence: annualCeiling,
|
|
13313
|
+
control: "purchase",
|
|
13314
|
+
stepPence,
|
|
13315
|
+
maximum: maximumCap,
|
|
13316
|
+
onChange: changeSpendCap,
|
|
13317
|
+
disabled: busy,
|
|
13318
|
+
compact: true
|
|
13072
13319
|
}
|
|
13073
|
-
),
|
|
13074
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13320
|
+
) }),
|
|
13321
|
+
manualOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-adjustments", children: [
|
|
13322
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "project-purchase-manual-intro", children: [
|
|
13323
|
+
"Purchase only what you need",
|
|
13324
|
+
(monthlyIncrement || annualIncrement) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13325
|
+
" ",
|
|
13326
|
+
"(increments of ",
|
|
13327
|
+
monthlyIncrement && `${monthlyIncrement}/monthly`,
|
|
13328
|
+
monthlyIncrement && annualIncrement && " \xB7 ",
|
|
13329
|
+
annualIncrement && `${annualIncrement}/annual`,
|
|
13330
|
+
")"
|
|
13331
|
+
] })
|
|
13332
|
+
] }),
|
|
13333
|
+
controls(
|
|
13334
|
+
"ai",
|
|
13335
|
+
aiBlocks,
|
|
13336
|
+
(count2) => changeMinimum("ai", count2),
|
|
13337
|
+
"AI credits",
|
|
13338
|
+
!!chunkXJE7W42L_cjs.addonPrice(prices.monthly, "ai_usage")
|
|
13339
|
+
),
|
|
13340
|
+
controls(
|
|
13341
|
+
"storage",
|
|
13342
|
+
storageBlocks,
|
|
13343
|
+
(count2) => changeMinimum("storage", count2),
|
|
13344
|
+
"storage",
|
|
13345
|
+
!!chunkXJE7W42L_cjs.addonPrice(prices.monthly, "storage")
|
|
13346
|
+
),
|
|
13347
|
+
controls(
|
|
13348
|
+
"collaborator",
|
|
13349
|
+
collaboratorBlocks,
|
|
13350
|
+
(count2) => changeMinimum("collaborator", count2),
|
|
13351
|
+
"collaborator places",
|
|
13352
|
+
!!prices.monthly?.addon_prices?.find((p) => p.kind === "collaborators")
|
|
13353
|
+
)
|
|
13354
|
+
] })
|
|
13355
|
+
] })
|
|
13356
|
+
] }),
|
|
13357
|
+
onDailyCapChange && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "project-purchase-daily-foldout", children: [
|
|
13358
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13359
|
+
"button",
|
|
13360
|
+
{
|
|
13361
|
+
type: "button",
|
|
13362
|
+
className: "project-purchase-setting-toggle",
|
|
13363
|
+
"aria-expanded": dailyCapVisible,
|
|
13364
|
+
"aria-controls": dailyCapId,
|
|
13365
|
+
onClick: () => setDailyCapOpen(!dailyCapVisible),
|
|
13366
|
+
disabled: busy,
|
|
13367
|
+
children: [
|
|
13368
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { "aria-hidden": "true", className: "h-4 w-4" }),
|
|
13369
|
+
"Set collaborator spend limit",
|
|
13370
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13371
|
+
lucideReact.ChevronDown,
|
|
13372
|
+
{
|
|
13373
|
+
"aria-hidden": "true",
|
|
13374
|
+
className: `h-4 w-4 transition-transform ${dailyCapVisible ? "rotate-180" : ""}`
|
|
13375
|
+
}
|
|
13376
|
+
)
|
|
13377
|
+
]
|
|
13378
|
+
}
|
|
13379
|
+
),
|
|
13380
|
+
dailyCapVisible && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13381
|
+
"div",
|
|
13382
|
+
{
|
|
13383
|
+
id: dailyCapId,
|
|
13384
|
+
className: "project-purchase-daily-cap",
|
|
13385
|
+
role: "region",
|
|
13386
|
+
"aria-label": "Collaborator daily AI limit",
|
|
13387
|
+
children: [
|
|
13388
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Collaborators share your project's quota." }),
|
|
13389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13390
|
+
chunkTBPCG2PV_cjs.DailyCapField,
|
|
13391
|
+
{
|
|
13392
|
+
value: dailyCapValue ?? "",
|
|
13393
|
+
onChange: onDailyCapChange,
|
|
13394
|
+
onSave: onSaveDailyCap,
|
|
13395
|
+
canSave: canSaveDailyCap,
|
|
13396
|
+
isSaving: busy,
|
|
13397
|
+
labels: { unit: "\xA3 / day each" }
|
|
13398
|
+
}
|
|
13399
|
+
),
|
|
13400
|
+
dailyCapError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: dailyCapError })
|
|
13401
|
+
]
|
|
13402
|
+
}
|
|
13403
|
+
)
|
|
13404
|
+
] }),
|
|
13405
|
+
onPromoCodeChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "project-purchase-promo project-purchase-daily-foldout", children: [
|
|
13406
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13407
|
+
"button",
|
|
13408
|
+
{
|
|
13409
|
+
type: "button",
|
|
13410
|
+
className: "project-purchase-setting-toggle",
|
|
13411
|
+
"aria-expanded": promoOpen,
|
|
13412
|
+
"aria-controls": `${promoId}-panel`,
|
|
13413
|
+
onClick: () => setPromoOpen((value) => !value),
|
|
13414
|
+
disabled: busy,
|
|
13415
|
+
children: [
|
|
13416
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Tag, { "aria-hidden": "true", className: "h-4 w-4" }),
|
|
13417
|
+
"Have a promo code?",
|
|
13418
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13419
|
+
lucideReact.ChevronDown,
|
|
13420
|
+
{
|
|
13421
|
+
"aria-hidden": "true",
|
|
13422
|
+
className: `h-4 w-4 transition-transform ${promoOpen ? "rotate-180" : ""}`
|
|
13423
|
+
}
|
|
13424
|
+
)
|
|
13425
|
+
]
|
|
13426
|
+
}
|
|
13427
|
+
),
|
|
13428
|
+
promoOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { id: `${promoId}-panel`, className: "space-y-1.5 pb-3", children: [
|
|
13429
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: promoId, children: "Promo code (optional)" }),
|
|
13430
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13431
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13432
|
+
ui.Input,
|
|
13433
|
+
{
|
|
13434
|
+
id: promoId,
|
|
13435
|
+
value: promoCode,
|
|
13436
|
+
onChange: (event) => {
|
|
13437
|
+
onPromoCodeChange(event.target.value);
|
|
13438
|
+
setActivePromo("");
|
|
13439
|
+
},
|
|
13440
|
+
disabled: busy,
|
|
13441
|
+
autoComplete: "off",
|
|
13442
|
+
placeholder: "Enter promo code",
|
|
13443
|
+
"aria-describedby": `${promoId}-status`
|
|
13444
|
+
}
|
|
13445
|
+
),
|
|
13446
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13447
|
+
ui.Button,
|
|
13448
|
+
{
|
|
13449
|
+
type: "button",
|
|
13450
|
+
disabled: busy || promoChecking || !promoCode.trim(),
|
|
13451
|
+
onClick: () => {
|
|
13452
|
+
if (activePromo === promoCode.trim()) {
|
|
13453
|
+
void monthlyQuote.refetch();
|
|
13454
|
+
void annualQuote.refetch();
|
|
13455
|
+
} else setActivePromo(promoCode.trim());
|
|
13456
|
+
},
|
|
13457
|
+
children: promoChecking ? "Checking\u2026" : "Apply"
|
|
13458
|
+
}
|
|
13459
|
+
)
|
|
13460
|
+
] }),
|
|
13085
13461
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13086
|
-
"
|
|
13462
|
+
"p",
|
|
13087
13463
|
{
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13464
|
+
id: `${promoId}-status`,
|
|
13465
|
+
role: "status",
|
|
13466
|
+
className: `text-sm ${promoError && !promoApplied ? "text-destructive" : "text-muted-foreground"}`,
|
|
13467
|
+
children: promoChecking ? "Checking your code\u2026" : promoError && !promoApplied ? chunkXJE7W42L_cjs.quoteError(promoError).message ?? "This promo code could not be applied." : promoApplied ? `${activePromo} applied \xB7 ${monthlyQuote.data?.discount_label ?? annualQuote.data?.discount_label ?? "discount included below"}` : "Apply your code to see the updated price."
|
|
13091
13468
|
}
|
|
13092
|
-
),
|
|
13093
|
-
/* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "text-xs text-muted-foreground", children: [
|
|
13094
|
-
collaborators === 1 ? "Collaborator" : "Collaborators",
|
|
13095
|
-
" + you"
|
|
13096
|
-
] }),
|
|
13097
|
-
controls(
|
|
13098
|
-
"collaborator",
|
|
13099
|
-
collaboratorBlocks,
|
|
13100
|
-
onCollaboratorBlocksChange,
|
|
13101
|
-
"collaborator places",
|
|
13102
|
-
!!prices.monthly?.addon_prices?.find((p) => p.kind === "collaborators")
|
|
13103
13469
|
)
|
|
13104
13470
|
] })
|
|
13105
13471
|
] }),
|
|
13106
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13107
|
-
|
|
13472
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13473
|
+
"div",
|
|
13108
13474
|
{
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13475
|
+
className: `project-purchase-prices ${onChooseFree ? "project-purchase-prices-with-free" : ""}`,
|
|
13476
|
+
children: [
|
|
13477
|
+
onChooseFree && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13478
|
+
"button",
|
|
13479
|
+
{
|
|
13480
|
+
type: "button",
|
|
13481
|
+
className: "project-purchase-price project-purchase-price-free",
|
|
13482
|
+
"data-testid": "purchase-free",
|
|
13483
|
+
"aria-describedby": "purchase-free-summary",
|
|
13484
|
+
disabled: disabled || busy,
|
|
13485
|
+
onClick: onChooseFree,
|
|
13486
|
+
children: [
|
|
13487
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-price-heading", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-period", children: "No Subscription" }) }),
|
|
13488
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-details", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13489
|
+
"span",
|
|
13490
|
+
{
|
|
13491
|
+
id: "purchase-free-summary",
|
|
13492
|
+
"data-testid": "purchase-free-summary",
|
|
13493
|
+
className: "project-purchase-free-allowances",
|
|
13494
|
+
children: [
|
|
13495
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { title: "AI credits per month", children: [
|
|
13496
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { "aria-hidden": "true" }),
|
|
13497
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "AI credits: " }),
|
|
13498
|
+
product.free_ai_gbp != null ? `${money(product.free_ai_gbp * 100)}/mo` : "\u2014"
|
|
13499
|
+
] }),
|
|
13500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { title: "Storage", children: [
|
|
13501
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, { "aria-hidden": "true" }),
|
|
13502
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Storage: " }),
|
|
13503
|
+
product.free_storage_gb != null ? `${product.free_storage_gb} GB` : "\u2014"
|
|
13504
|
+
] }),
|
|
13505
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { title: "Collaborators", children: [
|
|
13506
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { "aria-hidden": "true" }),
|
|
13507
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Collaborators: " }),
|
|
13508
|
+
product.free_collaborators ?? "\u2014"
|
|
13509
|
+
] })
|
|
13510
|
+
]
|
|
13511
|
+
}
|
|
13512
|
+
) }),
|
|
13513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-total", children: [
|
|
13514
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-due", "aria-hidden": "true" }),
|
|
13515
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-amount", children: "Free" })
|
|
13516
|
+
] })
|
|
13517
|
+
]
|
|
13518
|
+
}
|
|
13519
|
+
),
|
|
13520
|
+
["month", "year"].map((interval) => {
|
|
13521
|
+
const net = interval === "month" ? monthlyNet : annualNet;
|
|
13522
|
+
const quote = quoteFor(interval);
|
|
13523
|
+
const quoteState = interval === "month" ? monthlyQuote : annualQuote;
|
|
13524
|
+
const discounted = !!activePromo && quote?.promo_code?.toLowerCase() === activePromo.toLowerCase();
|
|
13525
|
+
const promoBlocked = !!promoCode.trim() && (!discounted || !!quoteState.isFetching);
|
|
13526
|
+
const recurring = quote?.renewal_total_pence ?? quote?.total_pence ?? net;
|
|
13527
|
+
const today = quote?.total_pence ?? net;
|
|
13528
|
+
const credit = today != null ? applyReferralReward(today, reward, currency) : null;
|
|
13529
|
+
const amount = promoBlocked ? null : credit?.youPay ?? today;
|
|
13530
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13531
|
+
"button",
|
|
13142
13532
|
{
|
|
13143
|
-
|
|
13144
|
-
|
|
13533
|
+
type: "button",
|
|
13534
|
+
disabled: disabled || busy || amount == null,
|
|
13535
|
+
onClick: () => onChoose(interval, cap, quote),
|
|
13536
|
+
"data-testid": `purchase-${interval}`,
|
|
13537
|
+
className: `project-purchase-price ${interval === "year" ? "project-purchase-price-annual" : ""}`,
|
|
13145
13538
|
children: [
|
|
13146
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
] }),
|
|
13151
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: money(recurring) })
|
|
13539
|
+
interval === "year" && saving > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-saving", children: [
|
|
13540
|
+
"Save ",
|
|
13541
|
+
saving,
|
|
13542
|
+
"%"
|
|
13152
13543
|
] }),
|
|
13153
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13154
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
13155
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13156
|
-
|
|
13157
|
-
|
|
13544
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-price-heading project-purchase-select", children: [
|
|
13545
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-period", children: interval === "month" ? "Select monthly" : "Select annual" }),
|
|
13546
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": "true", size: 16 })
|
|
13547
|
+
] }),
|
|
13548
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-details", children: (discounted || credit && credit.bonus > 0) && recurring != null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13549
|
+
"span",
|
|
13550
|
+
{
|
|
13551
|
+
className: "project-purchase-credit",
|
|
13552
|
+
"data-testid": `purchase-${interval}-credit`,
|
|
13553
|
+
children: [
|
|
13554
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13555
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13556
|
+
"Subscription",
|
|
13557
|
+
!discounted && quote && quote.tax_pence > 0 ? " incl. tax" : ""
|
|
13558
|
+
] }),
|
|
13559
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: money(
|
|
13560
|
+
discounted ? quote.subtotal_pence + (quote.discount_pence ?? 0) : recurring
|
|
13561
|
+
) })
|
|
13562
|
+
] }),
|
|
13563
|
+
discounted && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13564
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13565
|
+
"Promo ",
|
|
13566
|
+
quote.promo_code
|
|
13567
|
+
] }),
|
|
13568
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13569
|
+
"\u2212",
|
|
13570
|
+
money(quote.discount_pence ?? 0)
|
|
13571
|
+
] })
|
|
13572
|
+
] }),
|
|
13573
|
+
discounted && quote.tax_pence > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13574
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: quote.tax_label ?? "Tax" }),
|
|
13575
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: money(quote.tax_pence) })
|
|
13576
|
+
] }),
|
|
13577
|
+
credit && credit.bonus > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13578
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Account credit" }),
|
|
13579
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13580
|
+
"\u2212",
|
|
13581
|
+
money(credit.bonus)
|
|
13582
|
+
] })
|
|
13583
|
+
] })
|
|
13584
|
+
]
|
|
13585
|
+
}
|
|
13586
|
+
) }),
|
|
13587
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-total", children: [
|
|
13588
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-due text-xs", children: quote && quote.tax_calculated !== false ? quote.tax_pence > 0 ? "Due now (incl. tax)" : "Due now" : "Due now (ex VAT)" }),
|
|
13589
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "project-purchase-amount", children: amount != null ? money(amount) : "\u2014" }),
|
|
13590
|
+
recurring != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "project-purchase-renewal text-xs", children: [
|
|
13591
|
+
"Then ",
|
|
13592
|
+
money(recurring),
|
|
13593
|
+
"/",
|
|
13594
|
+
interval === "year" ? "year" : "month",
|
|
13595
|
+
quote?.renewal_note ? ` \xB7 ${quote.renewal_note.toLowerCase()}` : ""
|
|
13158
13596
|
] })
|
|
13159
13597
|
] })
|
|
13160
13598
|
]
|
|
13161
|
-
}
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
"Choose ",
|
|
13170
|
-
interval === "month" ? "monthly" : "annual",
|
|
13171
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": "true", size: 14 })
|
|
13172
|
-
] })
|
|
13173
|
-
]
|
|
13174
|
-
},
|
|
13175
|
-
interval
|
|
13176
|
-
);
|
|
13177
|
-
}) }),
|
|
13178
|
-
busy && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", className: "text-sm text-muted-foreground", children: "Opening payment\u2026" })
|
|
13599
|
+
},
|
|
13600
|
+
interval
|
|
13601
|
+
);
|
|
13602
|
+
})
|
|
13603
|
+
]
|
|
13604
|
+
}
|
|
13605
|
+
),
|
|
13606
|
+
busy && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", className: "text-sm text-muted-foreground", children: busyLabel })
|
|
13179
13607
|
] });
|
|
13180
13608
|
}
|
|
13181
13609
|
|
|
@@ -13185,16 +13613,21 @@ function refusal(what, next) {
|
|
|
13185
13613
|
return `${sentence(what)}. Nothing was charged. ${sentence(next)}.`;
|
|
13186
13614
|
}
|
|
13187
13615
|
function createProjectErrorMessage(error, fallback = `Failed to create ${ui.entityNoun("PROJECT")}`) {
|
|
13188
|
-
const detail =
|
|
13616
|
+
const detail = chunkXJE7W42L_cjs.apiErrorDetail(error);
|
|
13189
13617
|
if (typeof detail === "string" && detail) return detail;
|
|
13190
13618
|
const message = detail?.message;
|
|
13191
13619
|
return typeof message === "string" && message ? message : fallback;
|
|
13192
13620
|
}
|
|
13193
13621
|
function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
13194
13622
|
const [projectName, setProjectName] = react$1.useState(defaultName);
|
|
13623
|
+
const [promoCode, setPromoCode] = react$1.useState("");
|
|
13624
|
+
const [checkoutPromoCode, setCheckoutPromoCode] = react$1.useState();
|
|
13195
13625
|
const [aiBlocks, setAiBlocks] = react$1.useState(0);
|
|
13196
13626
|
const [storageBlocks, setStorageBlocks] = react$1.useState(0);
|
|
13197
13627
|
const [collaboratorBlocks, setCollaboratorBlocks] = react$1.useState(0);
|
|
13628
|
+
const [dailyCapValue, setDailyCapValue] = react$1.useState("");
|
|
13629
|
+
const parsedDailyCap = dailyCapValue.trim() === "" ? null : Number(dailyCapValue);
|
|
13630
|
+
const validDailyCap = parsedDailyCap === null || Number.isFinite(parsedDailyCap) && parsedDailyCap >= 0;
|
|
13198
13631
|
const [isCreating, setIsCreating] = react$1.useState(false);
|
|
13199
13632
|
const isSlow = react.useIsSlow(isCreating);
|
|
13200
13633
|
const [checkoutOpen, setCheckoutOpen] = react$1.useState(false);
|
|
@@ -13204,16 +13637,18 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13204
13637
|
const [checkoutQuote, setCheckoutQuote] = react$1.useState();
|
|
13205
13638
|
const paymentCompleted = react$1.useRef(false);
|
|
13206
13639
|
const attempt = react$1.useRef(0);
|
|
13207
|
-
const { stripeEnabled } =
|
|
13640
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
13208
13641
|
const { data: products, isLoading: productsLoading } = react.useProducts({ enabled: stripeEnabled });
|
|
13209
13642
|
const createProject = react.useCreateProject();
|
|
13210
13643
|
const deleteProject = react.useDeleteProject();
|
|
13211
13644
|
react$1.useEffect(() => {
|
|
13212
13645
|
if (!open) return;
|
|
13213
13646
|
setProjectName(defaultName);
|
|
13647
|
+
setPromoCode("");
|
|
13214
13648
|
setAiBlocks(0);
|
|
13215
13649
|
setStorageBlocks(0);
|
|
13216
13650
|
setCollaboratorBlocks(0);
|
|
13651
|
+
setDailyCapValue("");
|
|
13217
13652
|
setIsCreating(false);
|
|
13218
13653
|
}, [open, defaultName]);
|
|
13219
13654
|
const close = () => {
|
|
@@ -13235,16 +13670,16 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13235
13670
|
setCheckoutProject(null);
|
|
13236
13671
|
paymentCompleted.current = false;
|
|
13237
13672
|
};
|
|
13238
|
-
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending;
|
|
13239
|
-
const create3 = (interval, capPence, quote) => {
|
|
13673
|
+
const canSubmit = !!projectName.trim() && validDailyCap && !isCreating && !createProject.isPending;
|
|
13674
|
+
const create3 = (interval, capPence, quote, plan = stripeEnabled ? "pro" : "free") => {
|
|
13240
13675
|
if (!canSubmit) return;
|
|
13241
13676
|
const currentAttempt = ++attempt.current;
|
|
13242
13677
|
setIsCreating(true);
|
|
13243
13678
|
createProject.mutate(
|
|
13244
13679
|
{
|
|
13245
13680
|
name: projectName.trim(),
|
|
13246
|
-
plan
|
|
13247
|
-
daily_cap_per_user:
|
|
13681
|
+
plan,
|
|
13682
|
+
daily_cap_per_user: parsedDailyCap === null ? null : Math.round(parsedDailyCap * 100) / 100
|
|
13248
13683
|
},
|
|
13249
13684
|
{
|
|
13250
13685
|
onSuccess: (project) => {
|
|
@@ -13253,7 +13688,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13253
13688
|
return;
|
|
13254
13689
|
}
|
|
13255
13690
|
setIsCreating(false);
|
|
13256
|
-
if (
|
|
13691
|
+
if (plan === "free") {
|
|
13257
13692
|
shell.notify.success(`${ui.getEntityLabel("PROJECT")} created`);
|
|
13258
13693
|
onOpenChange(false);
|
|
13259
13694
|
return;
|
|
@@ -13263,6 +13698,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13263
13698
|
setCheckoutInterval(interval ?? "month");
|
|
13264
13699
|
setCheckoutBudget(capPence ?? null);
|
|
13265
13700
|
setCheckoutQuote(quote);
|
|
13701
|
+
setCheckoutPromoCode(promoCode.trim() || void 0);
|
|
13266
13702
|
setCheckoutOpen(true);
|
|
13267
13703
|
onOpenChange(false);
|
|
13268
13704
|
},
|
|
@@ -13288,8 +13724,8 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13288
13724
|
title: `New ${ui.entityNoun("PROJECT")}`,
|
|
13289
13725
|
description: stripeEnabled ? "Name your project and choose monthly or annual billing." : "Name your project.",
|
|
13290
13726
|
size: "md",
|
|
13291
|
-
className: stripeEnabled ? "project-purchase-modal sm:max-w-[
|
|
13292
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13727
|
+
className: stripeEnabled ? "project-purchase-modal sm:max-w-[640px]" : void 0,
|
|
13728
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PlanStack, { gap: 4, children: [
|
|
13293
13729
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
13294
13730
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "new-project-name", children: "Name" }),
|
|
13295
13731
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13306,16 +13742,21 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13306
13742
|
}
|
|
13307
13743
|
)
|
|
13308
13744
|
] }),
|
|
13309
|
-
stripeEnabled && (productsLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13745
|
+
stripeEnabled && (productsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { children: "Loading prices\u2026" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
13310
13746
|
ProjectPurchaseOptions,
|
|
13311
13747
|
{
|
|
13312
13748
|
products,
|
|
13749
|
+
promoCode,
|
|
13750
|
+
onPromoCodeChange: setPromoCode,
|
|
13313
13751
|
aiBlocks,
|
|
13314
13752
|
storageBlocks,
|
|
13315
13753
|
collaboratorBlocks,
|
|
13316
13754
|
onAiBlocksChange: setAiBlocks,
|
|
13317
13755
|
onStorageBlocksChange: setStorageBlocks,
|
|
13318
13756
|
onCollaboratorBlocksChange: setCollaboratorBlocks,
|
|
13757
|
+
dailyCapValue,
|
|
13758
|
+
onDailyCapChange: setDailyCapValue,
|
|
13759
|
+
dailyCapError: !validDailyCap ? "Enter a positive amount, zero, or leave blank for no limit." : null,
|
|
13319
13760
|
disabled: !canSubmit,
|
|
13320
13761
|
busy: isCreating,
|
|
13321
13762
|
enabled: open,
|
|
@@ -13324,16 +13765,17 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13324
13765
|
)),
|
|
13325
13766
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
13326
13767
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: close, children: "Cancel" }),
|
|
13327
|
-
!stripeEnabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13768
|
+
!stripeEnabled && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanActionButton, { onClick: () => create3(), disabled: !canSubmit, children: isCreating ? "Creating\u2026" : `Create ${ui.entityNoun("PROJECT")}` })
|
|
13328
13769
|
] }),
|
|
13329
|
-
isSlow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13770
|
+
isSlow && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { className: "text-xs", testId: "new-project-still-working", children: "Still working. We'll update here." })
|
|
13330
13771
|
] })
|
|
13331
13772
|
}
|
|
13332
13773
|
),
|
|
13333
13774
|
checkoutProject && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13334
13775
|
StripeCheckoutModal,
|
|
13335
13776
|
{
|
|
13336
|
-
|
|
13777
|
+
promoCode: checkoutPromoCode,
|
|
13778
|
+
price: chunkXJE7W42L_cjs.findProPrices(products)[checkoutInterval === "year" ? "annual" : "monthly"],
|
|
13337
13779
|
projectExtId: checkoutProject.id,
|
|
13338
13780
|
interval: checkoutInterval,
|
|
13339
13781
|
addonBudgetPence: checkoutBudget,
|
|
@@ -13365,7 +13807,7 @@ function ConnectedProjectSelector({
|
|
|
13365
13807
|
readOnly,
|
|
13366
13808
|
className
|
|
13367
13809
|
}) {
|
|
13368
|
-
const { stripeEnabled } =
|
|
13810
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
13369
13811
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13370
13812
|
chunkYZ6YOOTF_cjs.ProjectPicker,
|
|
13371
13813
|
{
|
|
@@ -13509,13 +13951,13 @@ function ConnectedWorkspaceSettings({
|
|
|
13509
13951
|
const [membersExpanded, setMembersExpanded] = react$1.useState(false);
|
|
13510
13952
|
const [shareOpen, setShareOpen] = react$1.useState(false);
|
|
13511
13953
|
if (!workspace) {
|
|
13512
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkCMGNRMPA_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13954
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkCMGNRMPA_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
13513
13955
|
}
|
|
13514
13956
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13515
13957
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkCMGNRMPA_cjs.WorkspacePageFrame, { testId, children: [
|
|
13516
13958
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkCMGNRMPA_cjs.WorkspaceIdentityPanel, { children: [
|
|
13517
13959
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13518
|
-
|
|
13960
|
+
chunkKSDTK66A_cjs.EntityIdentityBar,
|
|
13519
13961
|
{
|
|
13520
13962
|
testId: "workspace-identity-bar",
|
|
13521
13963
|
canEdit: isOwner,
|
|
@@ -13532,7 +13974,7 @@ function ConnectedWorkspaceSettings({
|
|
|
13532
13974
|
label: "Name",
|
|
13533
13975
|
value: workspace.name,
|
|
13534
13976
|
placeholder: "Untitled",
|
|
13535
|
-
maxLength:
|
|
13977
|
+
maxLength: chunkKSDTK66A_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
13536
13978
|
valueClassName: "truncate text-base font-semibold",
|
|
13537
13979
|
testId: "workspace-home-title",
|
|
13538
13980
|
hideLabel: true,
|
|
@@ -14163,20 +14605,20 @@ function ConnectedEmailWorkspaceDialog({
|
|
|
14163
14605
|
else if (activeSession)
|
|
14164
14606
|
access = {
|
|
14165
14607
|
kind: "session",
|
|
14166
|
-
expiresIn:
|
|
14608
|
+
expiresIn: chunkTBPCG2PV_cjs.formatSessionTtl(activeSession.ttl),
|
|
14167
14609
|
isEnding: terminateSession.isPending,
|
|
14168
14610
|
onEnd: handleEndSession
|
|
14169
14611
|
};
|
|
14170
14612
|
else
|
|
14171
14613
|
access = {
|
|
14172
14614
|
kind: "idle",
|
|
14173
|
-
defaultTtl: limits ?
|
|
14615
|
+
defaultTtl: limits ? chunkTBPCG2PV_cjs.formatSessionTtl(limits.default_ttl_seconds) : void 0,
|
|
14174
14616
|
isAuthorizing: grantAgentAccess.isPending && grantAgentAccess.variables?.mode?.kind === "temporary",
|
|
14175
14617
|
onAuthorize: handleAuthorize
|
|
14176
14618
|
};
|
|
14177
14619
|
}
|
|
14178
14620
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14179
|
-
|
|
14621
|
+
chunkTBPCG2PV_cjs.EmailWorkspaceDialogView,
|
|
14180
14622
|
{
|
|
14181
14623
|
open,
|
|
14182
14624
|
onOpenChange,
|
|
@@ -14509,7 +14951,7 @@ function ConnectedWorkspaceFormModal({
|
|
|
14509
14951
|
...frame
|
|
14510
14952
|
}) {
|
|
14511
14953
|
const [submitting, setSubmitting] = react$1.useState(false);
|
|
14512
|
-
const allowed = react.
|
|
14954
|
+
const allowed = react.useCanCreateWorkspaces();
|
|
14513
14955
|
const { openWorkspace, live } = chunkJR2YSBD5_cjs.useConnectedWorkspace();
|
|
14514
14956
|
const demoSeed = !live ? seed : void 0;
|
|
14515
14957
|
const canCreate = demoSeed ? true : allowed;
|
|
@@ -14742,9 +15184,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
14742
15184
|
showDescription: true,
|
|
14743
15185
|
className: "w-[92vw] sm:max-w-lg",
|
|
14744
15186
|
children: [
|
|
14745
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14746
|
-
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14747
|
-
|
|
15187
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncDialogBody, { children: [
|
|
15188
|
+
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncField, { label: "Target workspace", htmlFor: "sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15189
|
+
chunkTBPCG2PV_cjs.SyncSelect,
|
|
14748
15190
|
{
|
|
14749
15191
|
id: "sync-workspace",
|
|
14750
15192
|
value: workspaceExtId,
|
|
@@ -14753,9 +15195,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
14753
15195
|
options: memberWorkspaces.map((w) => ({ value: w.external_id, label: w.name }))
|
|
14754
15196
|
}
|
|
14755
15197
|
) }),
|
|
14756
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15198
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncField, { label: "Backfill window", htmlFor: "sync-backfill", children: [
|
|
14757
15199
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14758
|
-
|
|
15200
|
+
chunkTBPCG2PV_cjs.SyncSelect,
|
|
14759
15201
|
{
|
|
14760
15202
|
id: "sync-backfill",
|
|
14761
15203
|
value: backfill,
|
|
@@ -14775,17 +15217,17 @@ function ConnectedMailboxSyncDialog({
|
|
|
14775
15217
|
"aria-label": "Import emails since date"
|
|
14776
15218
|
}
|
|
14777
15219
|
),
|
|
14778
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15220
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncSmallNote, { children: "Emails are always imported from this date onward \u2014 the start point never moves." })
|
|
14779
15221
|
] })
|
|
14780
15222
|
] }),
|
|
14781
15223
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14782
|
-
|
|
15224
|
+
chunkTBPCG2PV_cjs.SyncField,
|
|
14783
15225
|
{
|
|
14784
15226
|
label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
|
|
14785
15227
|
hint: "Select at least one folder to import.",
|
|
14786
|
-
actions: folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15228
|
+
actions: folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncLinkRow, { children: [
|
|
14787
15229
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14788
|
-
|
|
15230
|
+
chunkTBPCG2PV_cjs.SyncLinkButton,
|
|
14789
15231
|
{
|
|
14790
15232
|
onClick: () => setExpandAllNonce((n) => n + 1),
|
|
14791
15233
|
testId: "mail-folders-expand-all",
|
|
@@ -14793,20 +15235,20 @@ function ConnectedMailboxSyncDialog({
|
|
|
14793
15235
|
}
|
|
14794
15236
|
),
|
|
14795
15237
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14796
|
-
|
|
15238
|
+
chunkTBPCG2PV_cjs.SyncLinkButton,
|
|
14797
15239
|
{
|
|
14798
15240
|
onClick: () => setCollapseAllNonce((n) => n + 1),
|
|
14799
15241
|
testId: "mail-folders-collapse-all",
|
|
14800
15242
|
children: "Collapse all"
|
|
14801
15243
|
}
|
|
14802
15244
|
),
|
|
14803
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15245
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncLinkButton, { onClick: toggleAllFolders, children: allSelected ? "Clear all" : "Select all" })
|
|
14804
15246
|
] }),
|
|
14805
|
-
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15247
|
+
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncLoading, { children: "Loading folders\u2026" }) : foldersError ? (
|
|
14806
15248
|
// A failed fetch is not an empty mailbox: it hides auth/scope errors (e.g. a Gmail
|
|
14807
15249
|
// account needing reconnect).
|
|
14808
15250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14809
|
-
|
|
15251
|
+
chunkTBPCG2PV_cjs.SyncReconnectNotice,
|
|
14810
15252
|
{
|
|
14811
15253
|
message: `Couldn\u2019t load folders from ${catalog.display_name}. Reconnect the account and try again.`,
|
|
14812
15254
|
onReconnect: () => void reconnect(),
|
|
@@ -14814,7 +15256,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
14814
15256
|
testId: "folders-reconnect"
|
|
14815
15257
|
}
|
|
14816
15258
|
)
|
|
14817
|
-
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15259
|
+
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14818
15260
|
chunkTXP2N3DC_cjs.MailFolderTree,
|
|
14819
15261
|
{
|
|
14820
15262
|
nodes: folderTree,
|
|
@@ -14826,9 +15268,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
14826
15268
|
) })
|
|
14827
15269
|
}
|
|
14828
15270
|
),
|
|
14829
|
-
isNative ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15271
|
+
isNative ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncNote, { children: turningOff ? "Saving with no folders stops adding new mail from them. What was added stays." : "Only you can see mail added from your mailbox. New mail is added when you open this workspace." }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncOptions, { children: [
|
|
14830
15272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14831
|
-
|
|
15273
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
14832
15274
|
{
|
|
14833
15275
|
checked: skipDuplicates,
|
|
14834
15276
|
onCheckedChange: setSkipDuplicates,
|
|
@@ -14838,7 +15280,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
14838
15280
|
}
|
|
14839
15281
|
),
|
|
14840
15282
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14841
|
-
|
|
15283
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
14842
15284
|
{
|
|
14843
15285
|
checked: autoRename,
|
|
14844
15286
|
onCheckedChange: setAutoRename,
|
|
@@ -14848,7 +15290,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
14848
15290
|
}
|
|
14849
15291
|
),
|
|
14850
15292
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14851
|
-
|
|
15293
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
14852
15294
|
{
|
|
14853
15295
|
checked: shared,
|
|
14854
15296
|
onCheckedChange: setShared,
|
|
@@ -14858,7 +15300,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
14858
15300
|
}
|
|
14859
15301
|
),
|
|
14860
15302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14861
|
-
|
|
15303
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
14862
15304
|
{
|
|
14863
15305
|
checked: autoSync,
|
|
14864
15306
|
onCheckedChange: setAutoSync,
|
|
@@ -14870,7 +15312,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
14870
15312
|
] })
|
|
14871
15313
|
] }),
|
|
14872
15314
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14873
|
-
|
|
15315
|
+
chunkTBPCG2PV_cjs.SyncDialogFooter,
|
|
14874
15316
|
{
|
|
14875
15317
|
onCancel: () => onOpenChange(false),
|
|
14876
15318
|
onSave: handleEnableSubmit,
|
|
@@ -14932,7 +15374,7 @@ function DriveFolderNode({
|
|
|
14932
15374
|
const mightHaveChildren = docCount == null || docCount > 0;
|
|
14933
15375
|
const orderedChildren = [...children].sort((a, b) => a.name.localeCompare(b.name));
|
|
14934
15376
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14935
|
-
|
|
15377
|
+
chunkTBPCG2PV_cjs.SyncFolderRow,
|
|
14936
15378
|
{
|
|
14937
15379
|
id: folder.id,
|
|
14938
15380
|
name: folder.name,
|
|
@@ -14946,7 +15388,7 @@ function DriveFolderNode({
|
|
|
14946
15388
|
onCheckedChange: () => onToggle(folder.id),
|
|
14947
15389
|
count: typeof docCount === "number" ? docCount : void 0,
|
|
14948
15390
|
isCountLoading: isSelectable && countLoading,
|
|
14949
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15391
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncFolderStatus, { depth, kind: "loading" }) : orderedChildren.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncFolderStatus, { depth, kind: "empty" }) : orderedChildren.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14950
15392
|
DriveFolderNode,
|
|
14951
15393
|
{
|
|
14952
15394
|
vendorKey,
|
|
@@ -15092,9 +15534,9 @@ function ConnectedDriveSyncDialog({
|
|
|
15092
15534
|
showDescription: true,
|
|
15093
15535
|
className: "w-[92vw] sm:max-w-lg",
|
|
15094
15536
|
children: [
|
|
15095
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15096
|
-
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15097
|
-
|
|
15537
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncDialogBody, { children: [
|
|
15538
|
+
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncField, { label: "Target workspace", htmlFor: "drive-sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15539
|
+
chunkTBPCG2PV_cjs.SyncSelect,
|
|
15098
15540
|
{
|
|
15099
15541
|
id: "drive-sync-workspace",
|
|
15100
15542
|
value: workspaceExtId,
|
|
@@ -15104,13 +15546,13 @@ function ConnectedDriveSyncDialog({
|
|
|
15104
15546
|
}
|
|
15105
15547
|
) }),
|
|
15106
15548
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15107
|
-
|
|
15549
|
+
chunkTBPCG2PV_cjs.SyncField,
|
|
15108
15550
|
{
|
|
15109
15551
|
label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
|
|
15110
15552
|
hint: "Select at least one folder. Importing a folder includes everything inside it.",
|
|
15111
|
-
actions: orderedFolders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15553
|
+
actions: orderedFolders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncLinkRow, { children: [
|
|
15112
15554
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15113
|
-
|
|
15555
|
+
chunkTBPCG2PV_cjs.SyncLinkButton,
|
|
15114
15556
|
{
|
|
15115
15557
|
onClick: () => setExpandAllNonce((n) => n + 1),
|
|
15116
15558
|
testId: "drive-folders-expand-all",
|
|
@@ -15118,7 +15560,7 @@ function ConnectedDriveSyncDialog({
|
|
|
15118
15560
|
}
|
|
15119
15561
|
),
|
|
15120
15562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15121
|
-
|
|
15563
|
+
chunkTBPCG2PV_cjs.SyncLinkButton,
|
|
15122
15564
|
{
|
|
15123
15565
|
onClick: () => setCollapseAllNonce((n) => n + 1),
|
|
15124
15566
|
testId: "drive-folders-collapse-all",
|
|
@@ -15126,19 +15568,19 @@ function ConnectedDriveSyncDialog({
|
|
|
15126
15568
|
}
|
|
15127
15569
|
)
|
|
15128
15570
|
] }),
|
|
15129
|
-
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15130
|
-
|
|
15571
|
+
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncLoading, { children: "Loading folders\u2026" }) : needsReconnect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15572
|
+
chunkTBPCG2PV_cjs.SyncReconnectNotice,
|
|
15131
15573
|
{
|
|
15132
15574
|
...reconnectButtonProps,
|
|
15133
15575
|
message: `Reconnect ${catalog.display_name} to enable ${productName} \u2014 your account needs to grant file access.`
|
|
15134
15576
|
}
|
|
15135
15577
|
) : foldersError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15136
|
-
|
|
15578
|
+
chunkTBPCG2PV_cjs.SyncReconnectNotice,
|
|
15137
15579
|
{
|
|
15138
15580
|
...reconnectButtonProps,
|
|
15139
15581
|
message: `Couldn\u2019t load folders from ${productName}. Reconnect the account and try again.`
|
|
15140
15582
|
}
|
|
15141
|
-
) : orderedFolders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15583
|
+
) : orderedFolders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", "data-testid": "drive-folder-tree", children: orderedFolders.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15142
15584
|
DriveFolderNode,
|
|
15143
15585
|
{
|
|
15144
15586
|
vendorKey: catalog.vendor_key,
|
|
@@ -15155,9 +15597,9 @@ function ConnectedDriveSyncDialog({
|
|
|
15155
15597
|
)) }) })
|
|
15156
15598
|
}
|
|
15157
15599
|
),
|
|
15158
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15600
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.SyncOptions, { children: [
|
|
15159
15601
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15160
|
-
|
|
15602
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
15161
15603
|
{
|
|
15162
15604
|
checked: skipDuplicates,
|
|
15163
15605
|
onCheckedChange: setSkipDuplicates,
|
|
@@ -15166,7 +15608,7 @@ function ConnectedDriveSyncDialog({
|
|
|
15166
15608
|
}
|
|
15167
15609
|
),
|
|
15168
15610
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15169
|
-
|
|
15611
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
15170
15612
|
{
|
|
15171
15613
|
checked: autoRename,
|
|
15172
15614
|
onCheckedChange: setAutoRename,
|
|
@@ -15175,7 +15617,7 @@ function ConnectedDriveSyncDialog({
|
|
|
15175
15617
|
}
|
|
15176
15618
|
),
|
|
15177
15619
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15178
|
-
|
|
15620
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
15179
15621
|
{
|
|
15180
15622
|
checked: shared,
|
|
15181
15623
|
onCheckedChange: setShared,
|
|
@@ -15184,7 +15626,7 @@ function ConnectedDriveSyncDialog({
|
|
|
15184
15626
|
}
|
|
15185
15627
|
),
|
|
15186
15628
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15187
|
-
|
|
15629
|
+
chunkTBPCG2PV_cjs.SyncOptionToggle,
|
|
15188
15630
|
{
|
|
15189
15631
|
checked: autoSync,
|
|
15190
15632
|
onCheckedChange: setAutoSync,
|
|
@@ -15196,7 +15638,7 @@ function ConnectedDriveSyncDialog({
|
|
|
15196
15638
|
] })
|
|
15197
15639
|
] }),
|
|
15198
15640
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15199
|
-
|
|
15641
|
+
chunkTBPCG2PV_cjs.SyncDialogFooter,
|
|
15200
15642
|
{
|
|
15201
15643
|
onCancel: () => onOpenChange(false),
|
|
15202
15644
|
onSave: handleEnableSubmit,
|
|
@@ -15287,8 +15729,8 @@ function InvoicesModal({
|
|
|
15287
15729
|
key: inv.number ?? String(i),
|
|
15288
15730
|
date: formatInvoiceDate(inv.date),
|
|
15289
15731
|
kind: KIND_LABELS2[inv.kind],
|
|
15290
|
-
amount:
|
|
15291
|
-
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${
|
|
15732
|
+
amount: chunkXJE7W42L_cjs.formatMoney(inv.amount, inv.currency),
|
|
15733
|
+
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${chunkXJE7W42L_cjs.formatMoney(inv.amount_ex_vat, inv.currency)} ex VAT` : void 0,
|
|
15292
15734
|
status: inv.status,
|
|
15293
15735
|
isPaid: isPaid2,
|
|
15294
15736
|
href: inv.hosted_invoice_url ?? inv.url ?? inv.pdf_url ?? void 0,
|
|
@@ -15296,7 +15738,7 @@ function InvoicesModal({
|
|
|
15296
15738
|
};
|
|
15297
15739
|
});
|
|
15298
15740
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15299
|
-
|
|
15741
|
+
chunkTBPCG2PV_cjs.InvoicesDialog,
|
|
15300
15742
|
{
|
|
15301
15743
|
open,
|
|
15302
15744
|
onOpenChange,
|
|
@@ -15306,33 +15748,115 @@ function InvoicesModal({
|
|
|
15306
15748
|
}
|
|
15307
15749
|
);
|
|
15308
15750
|
}
|
|
15309
|
-
function SubscriptionPlans({
|
|
15751
|
+
function SubscriptionPlans({
|
|
15752
|
+
projectExtId,
|
|
15753
|
+
projectName,
|
|
15754
|
+
onDismiss,
|
|
15755
|
+
dailyCapPerUser = null,
|
|
15756
|
+
currentQuotas
|
|
15757
|
+
}) {
|
|
15310
15758
|
const { data: products, isLoading, error } = react.useProducts();
|
|
15759
|
+
const rename = react.useUpdateProjectFields();
|
|
15760
|
+
const [name, setName] = react$1.useState(projectName ?? "");
|
|
15761
|
+
const [nameError, setNameError] = react$1.useState(null);
|
|
15762
|
+
const validName = projectName === void 0 || name.trim().length > 0;
|
|
15763
|
+
const [dailyCapValue, setDailyCapValue] = react$1.useState(
|
|
15764
|
+
dailyCapPerUser == null ? "" : String(dailyCapPerUser)
|
|
15765
|
+
);
|
|
15766
|
+
const [savedDailyCap, setSavedDailyCap] = react$1.useState(dailyCapPerUser);
|
|
15767
|
+
const [dailyCapError, setDailyCapError] = react$1.useState(null);
|
|
15768
|
+
const parsedDailyCap = dailyCapValue.trim() === "" ? null : Number(dailyCapValue);
|
|
15769
|
+
const validDailyCap = parsedDailyCap === null || Number.isFinite(parsedDailyCap) && parsedDailyCap >= 0;
|
|
15770
|
+
const dailyCap = parsedDailyCap === null ? null : Math.round(parsedDailyCap * 100) / 100;
|
|
15771
|
+
const dirtyDailyCap = dailyCap !== savedDailyCap;
|
|
15772
|
+
const choose = (next, capOnly = false) => {
|
|
15773
|
+
if (!capOnly && !validName || !validDailyCap || rename.isPending) return;
|
|
15774
|
+
const nameChanged = !capOnly && projectName !== void 0 && name.trim() !== projectName;
|
|
15775
|
+
if (!nameChanged && !dirtyDailyCap) {
|
|
15776
|
+
next();
|
|
15777
|
+
return;
|
|
15778
|
+
}
|
|
15779
|
+
setNameError(null);
|
|
15780
|
+
setDailyCapError(null);
|
|
15781
|
+
rename.mutate(
|
|
15782
|
+
{
|
|
15783
|
+
projectExtId,
|
|
15784
|
+
patch: {
|
|
15785
|
+
...nameChanged ? { name: name.trim() } : {},
|
|
15786
|
+
...dirtyDailyCap ? { daily_cap_per_user: dailyCap } : {}
|
|
15787
|
+
}
|
|
15788
|
+
},
|
|
15789
|
+
{
|
|
15790
|
+
onSuccess: () => {
|
|
15791
|
+
setSavedDailyCap(dailyCap);
|
|
15792
|
+
next();
|
|
15793
|
+
},
|
|
15794
|
+
onError: () => {
|
|
15795
|
+
if (dirtyDailyCap) setDailyCapError("Couldn't save the daily limit. Try again.");
|
|
15796
|
+
else setNameError("Couldn't save the project name. Try again.");
|
|
15797
|
+
}
|
|
15798
|
+
}
|
|
15799
|
+
);
|
|
15800
|
+
};
|
|
15801
|
+
const [promoCode, setPromoCode] = react$1.useState("");
|
|
15311
15802
|
const [aiBlocks, setAiBlocks] = react$1.useState(0);
|
|
15312
15803
|
const [storageBlocks, setStorageBlocks] = react$1.useState(0);
|
|
15313
15804
|
const [collaboratorBlocks, setCollaboratorBlocks] = react$1.useState(0);
|
|
15314
15805
|
const [checkout, setCheckout] = react$1.useState(null);
|
|
15315
15806
|
const [checkoutOpen, setCheckoutOpen] = react$1.useState(false);
|
|
15316
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15317
|
-
if (error) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15318
|
-
if (!products?.length) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15807
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { children: "Loading prices\u2026" });
|
|
15808
|
+
if (error) return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { tone: "error", children: "Prices didn't load. Try again." });
|
|
15809
|
+
if (!products?.length) return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { children: "No plans available." });
|
|
15319
15810
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15320
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15811
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PlanStack, { children: [
|
|
15812
|
+
projectName !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", "data-testid": "change-plan-project", children: [
|
|
15813
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "upgrade-project-name", children: "Project name" }),
|
|
15814
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15815
|
+
ui.Input,
|
|
15816
|
+
{
|
|
15817
|
+
id: "upgrade-project-name",
|
|
15818
|
+
value: name,
|
|
15819
|
+
onChange: (event) => {
|
|
15820
|
+
setName(event.target.value);
|
|
15821
|
+
setNameError(null);
|
|
15822
|
+
},
|
|
15823
|
+
disabled: rename.isPending,
|
|
15824
|
+
"aria-invalid": !validName || !!nameError,
|
|
15825
|
+
"aria-describedby": nameError ? "upgrade-project-name-error" : void 0
|
|
15826
|
+
}
|
|
15827
|
+
),
|
|
15828
|
+
nameError && /* @__PURE__ */ jsxRuntime.jsx("p", { id: "upgrade-project-name-error", role: "alert", className: "text-sm text-destructive", children: nameError })
|
|
15829
|
+
] }),
|
|
15321
15830
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15322
15831
|
ProjectPurchaseOptions,
|
|
15323
15832
|
{
|
|
15324
15833
|
products,
|
|
15834
|
+
promoCode,
|
|
15835
|
+
onPromoCodeChange: setPromoCode,
|
|
15325
15836
|
projectExtId,
|
|
15837
|
+
currentQuotas,
|
|
15326
15838
|
aiBlocks,
|
|
15327
15839
|
storageBlocks,
|
|
15328
15840
|
collaboratorBlocks,
|
|
15329
15841
|
onAiBlocksChange: setAiBlocks,
|
|
15330
15842
|
onStorageBlocksChange: setStorageBlocks,
|
|
15331
15843
|
onCollaboratorBlocksChange: setCollaboratorBlocks,
|
|
15332
|
-
|
|
15333
|
-
|
|
15844
|
+
dailyCapValue,
|
|
15845
|
+
onDailyCapChange: (value) => {
|
|
15846
|
+
setDailyCapValue(value);
|
|
15847
|
+
setDailyCapError(null);
|
|
15848
|
+
},
|
|
15849
|
+
onSaveDailyCap: () => choose(() => {
|
|
15850
|
+
}, true),
|
|
15851
|
+
canSaveDailyCap: dirtyDailyCap && validDailyCap,
|
|
15852
|
+
dailyCapError: !validDailyCap ? "Enter a positive amount, zero, or leave blank for no limit." : dailyCapError,
|
|
15853
|
+
disabled: !validName || !validDailyCap,
|
|
15854
|
+
busy: rename.isPending,
|
|
15855
|
+
busyLabel: "Saving project settings\u2026",
|
|
15856
|
+
onChoose: (interval, capPence, quote) => choose(() => {
|
|
15857
|
+
setCheckout({ interval, capPence, quote, promoCode: promoCode.trim() || void 0 });
|
|
15334
15858
|
setCheckoutOpen(true);
|
|
15335
|
-
}
|
|
15859
|
+
})
|
|
15336
15860
|
}
|
|
15337
15861
|
),
|
|
15338
15862
|
onDismiss && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: onDismiss, children: "Cancel" }) })
|
|
@@ -15340,7 +15864,8 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
15340
15864
|
checkout && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15341
15865
|
StripeCheckoutModal,
|
|
15342
15866
|
{
|
|
15343
|
-
|
|
15867
|
+
promoCode: checkout.promoCode,
|
|
15868
|
+
price: chunkXJE7W42L_cjs.findProPrices(products)[checkout.interval === "year" ? "annual" : "monthly"],
|
|
15344
15869
|
projectExtId,
|
|
15345
15870
|
interval: checkout.interval,
|
|
15346
15871
|
addonBudgetPence: checkout.capPence,
|
|
@@ -15387,7 +15912,7 @@ var FALLBACK_MESSAGES = {
|
|
|
15387
15912
|
BILLING_ADDRESS_REQUIRED: "Add a billing address first."
|
|
15388
15913
|
};
|
|
15389
15914
|
function addonErrorMessage(error) {
|
|
15390
|
-
const detail =
|
|
15915
|
+
const detail = chunkXJE7W42L_cjs.apiErrorDetail(error);
|
|
15391
15916
|
if (detail && typeof detail === "object") {
|
|
15392
15917
|
const { code, message } = detail;
|
|
15393
15918
|
if (message) return message;
|
|
@@ -15413,14 +15938,14 @@ function chargeRefusalMessage(error) {
|
|
|
15413
15938
|
return code ? REFUSALS[code] : null;
|
|
15414
15939
|
}
|
|
15415
15940
|
function addonErrorCode(error) {
|
|
15416
|
-
const detail =
|
|
15941
|
+
const detail = chunkXJE7W42L_cjs.apiErrorDetail(error);
|
|
15417
15942
|
if (detail && typeof detail === "object") {
|
|
15418
15943
|
const code = detail.code;
|
|
15419
15944
|
if (code && code in FALLBACK_MESSAGES) return code;
|
|
15420
15945
|
}
|
|
15421
15946
|
return null;
|
|
15422
15947
|
}
|
|
15423
|
-
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ??
|
|
15948
|
+
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ?? chunkXJE7W42L_cjs.ADDON_BLOCK_AI_GBP)} of AI credits added` : `${blockStorageGb ?? chunkXJE7W42L_cjs.STORAGE_BLOCK_GB} GB added`;
|
|
15424
15949
|
function useAddonPurchase() {
|
|
15425
15950
|
const addBlock = react.useAddProjectAddonBlock();
|
|
15426
15951
|
const { mutate } = addBlock;
|
|
@@ -15470,14 +15995,14 @@ function useAddonPurchase() {
|
|
|
15470
15995
|
function ConnectedReferralRewardNote() {
|
|
15471
15996
|
const reward = useReferralReward();
|
|
15472
15997
|
if (!reward) return null;
|
|
15473
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ReferralRewardNote, { amountLabel: chunkXJE7W42L_cjs.formatMoney(reward.amount, reward.currency) });
|
|
15474
15999
|
}
|
|
15475
16000
|
function PlanChangeLines({
|
|
15476
16001
|
preview,
|
|
15477
16002
|
isError,
|
|
15478
16003
|
className
|
|
15479
16004
|
}) {
|
|
15480
|
-
const lines = preview ?
|
|
16005
|
+
const lines = preview ? chunkXJE7W42L_cjs.planPreviewLines(preview) : [{ id: "pay-today", text: isError ? chunkXJE7W42L_cjs.PAY_TODAY_UNPRICED : "Checking price\u2026" }];
|
|
15481
16006
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-testid": "plan-change-lines", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": `plan-change-${line.id}`, children: line.text }, line.id)) });
|
|
15482
16007
|
}
|
|
15483
16008
|
var BANK_CONFIRM_PLAN_CHANGE = "Confirm with your bank. Nothing is charged until you do.";
|
|
@@ -15485,13 +16010,13 @@ function notifyPlanChange(data, fallback, planName2) {
|
|
|
15485
16010
|
const outcome = data?.plan_change;
|
|
15486
16011
|
switch (outcome?.result) {
|
|
15487
16012
|
case "upgraded": {
|
|
15488
|
-
const plan =
|
|
15489
|
-
const charged = outcome.charged_pence > 0 ? ` \xB7 ${
|
|
16013
|
+
const plan = chunkXJE7W42L_cjs.planNameForPacks(data?.addons?.packs ?? data?.packs);
|
|
16014
|
+
const charged = outcome.charged_pence > 0 ? ` \xB7 ${chunkXJE7W42L_cjs.formatMoney(outcome.charged_pence, "gbp")} charged` : "";
|
|
15490
16015
|
shell.notify.success(`Upgraded to ${plan}${charged}`);
|
|
15491
16016
|
break;
|
|
15492
16017
|
}
|
|
15493
16018
|
case "scheduled": {
|
|
15494
|
-
const when2 =
|
|
16019
|
+
const when2 = chunkXJE7W42L_cjs.formatPeriodEnd(data?.addons?.period_end ?? data?.current_period_end);
|
|
15495
16020
|
shell.notify.success(when2 ? `Scheduled for ${when2}` : fallback);
|
|
15496
16021
|
break;
|
|
15497
16022
|
}
|
|
@@ -15524,23 +16049,24 @@ function ChangeProPlan({
|
|
|
15524
16049
|
const { data: products } = react.useProducts();
|
|
15525
16050
|
const changePlan = react.useChangeProjectPlan();
|
|
15526
16051
|
const cancel = react.useCancelProjectSubscription();
|
|
15527
|
-
const prices =
|
|
16052
|
+
const prices = chunkXJE7W42L_cjs.findProPrices(products);
|
|
16053
|
+
const product = products?.[0];
|
|
15528
16054
|
const addons = project.addons;
|
|
15529
16055
|
const isCanceling = project.cancel_at_period_end === true || project.subscription === "canceled";
|
|
15530
|
-
const currentPacks = Math.max(addons?.packs ?? project.packs ??
|
|
15531
|
-
const isLegacyMultiPack = currentPacks >
|
|
16056
|
+
const currentPacks = Math.max(addons?.packs ?? project.packs ?? chunkXJE7W42L_cjs.PRO_PACKS, chunkXJE7W42L_cjs.PRO_PACKS);
|
|
16057
|
+
const isLegacyMultiPack = currentPacks > chunkXJE7W42L_cjs.PRO_PACKS;
|
|
15532
16058
|
const currentInterval = project.plan_interval === "year" ? "year" : "month";
|
|
15533
16059
|
const scheduledPacks = isCanceling ? 0 : addons?.packs_next ?? currentPacks;
|
|
15534
16060
|
const scheduledInterval = addons?.pending_interval ?? currentInterval;
|
|
15535
16061
|
const [targetPacks, setTargetPacks] = react$1.useState(scheduledPacks);
|
|
15536
16062
|
const [chosenInterval, setChosenInterval] = react$1.useState(scheduledInterval);
|
|
15537
|
-
const targetInterval = targetPacks >
|
|
16063
|
+
const targetInterval = targetPacks > chunkXJE7W42L_cjs.PRO_PACKS ? currentInterval : chosenInterval;
|
|
15538
16064
|
const periodEnd = formatDate(addons?.period_end ?? project.current_period_end);
|
|
15539
16065
|
const when2 = periodEnd ?? "the end of the period";
|
|
15540
16066
|
const shortWhen = periodEnd ? periodEnd.replace(/ \d{4}$/, "") : "period end";
|
|
15541
16067
|
const isPending = changePlan.isPending || cancel.isPending;
|
|
15542
16068
|
const sameAsScheduled = targetPacks === scheduledPacks && (targetPacks === 0 || targetInterval === scheduledInterval);
|
|
15543
|
-
const packOptions = isLegacyMultiPack ? [currentPacks,
|
|
16069
|
+
const packOptions = isLegacyMultiPack ? [currentPacks, chunkXJE7W42L_cjs.PRO_PACKS, 0] : [chunkXJE7W42L_cjs.PRO_PACKS, 0];
|
|
15544
16070
|
const intervalPrice = targetInterval === "year" ? prices.annual : prices.monthly;
|
|
15545
16071
|
const currency = intervalPrice?.currency ?? project.currency ?? "gbp";
|
|
15546
16072
|
const preview = react.usePreviewProjectPlanChange(
|
|
@@ -15549,7 +16075,7 @@ function ChangeProPlan({
|
|
|
15549
16075
|
);
|
|
15550
16076
|
const noChange = sameAsScheduled || preview.data?.unchanged === true;
|
|
15551
16077
|
const isPersonal = project.is_personal === true;
|
|
15552
|
-
const nameFor = (packs) => packs === 0 && !isPersonal ? "Cancel subscription" : packs === currentPacks && packs > 0 ?
|
|
16078
|
+
const nameFor = (packs) => packs === 0 && !isPersonal ? "Cancel subscription" : packs === currentPacks && packs > 0 ? chunkXJE7W42L_cjs.proTierName(project) : chunkXJE7W42L_cjs.planNameForPacks(packs);
|
|
15553
16079
|
const effects = [];
|
|
15554
16080
|
const target = nameFor(targetPacks);
|
|
15555
16081
|
if (targetPacks === 0) {
|
|
@@ -15561,7 +16087,7 @@ function ChangeProPlan({
|
|
|
15561
16087
|
if (targetPacks < currentPacks) {
|
|
15562
16088
|
effects.push(`Changes to one Pro licence on ${when2}. No refund.`);
|
|
15563
16089
|
} else if (!isCanceling && addons?.packs_next != null) {
|
|
15564
|
-
effects.push(`Cancels the change to ${
|
|
16090
|
+
effects.push(`Cancels the change to ${chunkXJE7W42L_cjs.planNameForPacks(addons.packs_next)}.`);
|
|
15565
16091
|
}
|
|
15566
16092
|
if (targetInterval !== currentInterval) {
|
|
15567
16093
|
effects.push(`${targetInterval === "year" ? "Annual" : "Monthly"} billing from ${when2}.`);
|
|
@@ -15599,34 +16125,34 @@ function ChangeProPlan({
|
|
|
15599
16125
|
const optionFor = (packs) => {
|
|
15600
16126
|
if (packs === 0) {
|
|
15601
16127
|
return {
|
|
15602
|
-
total: isPersonal ? "
|
|
15603
|
-
summary: isPersonal ? `${react.formatGbp(
|
|
16128
|
+
total: isPersonal ? "Free" : void 0,
|
|
16129
|
+
summary: isPersonal ? product ? `${react.formatGbp(product.free_ai_gbp)} of AI credits \xB7 ${product.free_storage_gb * 1e3} MB \xB7 just you` : "No subscription" : "Suspended after the paid period. 30 days to export or resubscribe."
|
|
15604
16130
|
};
|
|
15605
16131
|
}
|
|
15606
|
-
const allowance = `${react.formatGbp(
|
|
15607
|
-
const legacy = packs >
|
|
15608
|
-
const exVat = legacy ? project.amount_ex_vat :
|
|
16132
|
+
const allowance = product ? `${react.formatGbp(product.included_ai_gbp * packs)} of AI credits \xB7 ${product.included_storage_gb * packs} GB` : "AI credits and storage";
|
|
16133
|
+
const legacy = packs > chunkXJE7W42L_cjs.PRO_PACKS;
|
|
16134
|
+
const exVat = legacy ? project.amount_ex_vat : chunkXJE7W42L_cjs.packPrice(intervalPrice)?.amount_ex_vat;
|
|
15609
16135
|
return {
|
|
15610
|
-
total: exVat != null ?
|
|
16136
|
+
total: exVat != null ? chunkXJE7W42L_cjs.plusVat(exVat, currency) : void 0,
|
|
15611
16137
|
summary: allowance
|
|
15612
16138
|
};
|
|
15613
16139
|
};
|
|
15614
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16140
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PlanStack, { gap: 4, testId: "change-pro-plan", children: [
|
|
15615
16141
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
15616
16142
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: "Billing" }),
|
|
15617
|
-
targetPacks >
|
|
15618
|
-
|
|
16143
|
+
targetPacks > chunkXJE7W42L_cjs.PRO_PACKS ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", "data-testid": "change-plan-interval-fixed", children: currentInterval === "year" ? "Annual" : "Monthly" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
16144
|
+
chunkTBPCG2PV_cjs.PricingToggle,
|
|
15619
16145
|
{
|
|
15620
16146
|
isAnnual: targetInterval === "year",
|
|
15621
16147
|
onToggle: () => setChosenInterval(targetInterval === "year" ? "month" : "year"),
|
|
15622
|
-
savingsPercent:
|
|
16148
|
+
savingsPercent: chunkXJE7W42L_cjs.calcSavingsPercent(prices.monthly, prices.annual)
|
|
15623
16149
|
}
|
|
15624
16150
|
)
|
|
15625
16151
|
] }),
|
|
15626
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16152
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanStack, { gap: 2, children: packOptions.map((packs) => {
|
|
15627
16153
|
const { total, summary } = optionFor(packs);
|
|
15628
16154
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15629
|
-
|
|
16155
|
+
chunkTBPCG2PV_cjs.PlanTierOption,
|
|
15630
16156
|
{
|
|
15631
16157
|
onSelect: setTargetPacks,
|
|
15632
16158
|
option: {
|
|
@@ -15643,13 +16169,13 @@ function ChangeProPlan({
|
|
|
15643
16169
|
);
|
|
15644
16170
|
}) }),
|
|
15645
16171
|
isLegacyMultiPack && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
15646
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15647
|
-
|
|
16172
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PlanNotice, { className: "text-xs", testId: "change-plan-legacy-note", children: [
|
|
16173
|
+
chunkXJE7W42L_cjs.proTierName(project),
|
|
15648
16174
|
" is no longer sold"
|
|
15649
16175
|
] }),
|
|
15650
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16176
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.MoreInfo, { title: "Legacy plan", testId: "change-plan-legacy-more-info", children: [
|
|
15651
16177
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
15652
|
-
|
|
16178
|
+
chunkXJE7W42L_cjs.proTierName(project),
|
|
15653
16179
|
" keeps renewing at its own price, with its allowance and add-ons, until you change it."
|
|
15654
16180
|
] }),
|
|
15655
16181
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
@@ -15670,7 +16196,7 @@ function ChangeProPlan({
|
|
|
15670
16196
|
),
|
|
15671
16197
|
targetPacks > 0 && /* @__PURE__ */ jsxRuntime.jsx(ConnectedReferralRewardNote, {}),
|
|
15672
16198
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15673
|
-
|
|
16199
|
+
chunkTBPCG2PV_cjs.PlanActionButton,
|
|
15674
16200
|
{
|
|
15675
16201
|
onClick: apply,
|
|
15676
16202
|
disabled: noChange || isPending,
|
|
@@ -15680,10 +16206,10 @@ function ChangeProPlan({
|
|
|
15680
16206
|
)
|
|
15681
16207
|
] });
|
|
15682
16208
|
}
|
|
15683
|
-
function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
15684
|
-
const isPro = !!project &&
|
|
16209
|
+
function ChangePlanDialog({ project, open, onOpenChange, onBack }) {
|
|
16210
|
+
const isPro = !!project && chunkXJE7W42L_cjs.isProProject(project);
|
|
15685
16211
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15686
|
-
|
|
16212
|
+
chunkTBPCG2PV_cjs.PlanDialogFrame,
|
|
15687
16213
|
{
|
|
15688
16214
|
compact: !isPro,
|
|
15689
16215
|
className: isPro ? void 0 : "project-purchase-upgrade",
|
|
@@ -15692,28 +16218,33 @@ function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
|
15692
16218
|
title: isPro ? "Change plan" : "Upgrade",
|
|
15693
16219
|
isDescriptionHidden: true,
|
|
15694
16220
|
description: isPro ? "Changes start at the end of the period." : "More AI credits and storage, with collaboration included.",
|
|
15695
|
-
projectName: project?.name,
|
|
16221
|
+
projectName: isPro ? project?.name : void 0,
|
|
16222
|
+
onBack: isPro ? void 0 : onBack ?? (() => onOpenChange(false)),
|
|
15696
16223
|
children: project && (isPro ? /* @__PURE__ */ jsxRuntime.jsx(ChangeProPlan, { project, onDone: () => onOpenChange(false) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15697
16224
|
SubscriptionPlans,
|
|
15698
16225
|
{
|
|
15699
16226
|
projectExtId: project.external_id,
|
|
16227
|
+
projectName: project.name,
|
|
16228
|
+
dailyCapPerUser: project.daily_cap_per_user,
|
|
16229
|
+
currentQuotas: project.quotas,
|
|
15700
16230
|
isPersonal: project.is_personal === true,
|
|
15701
16231
|
onDismiss: () => onOpenChange(false)
|
|
15702
|
-
}
|
|
16232
|
+
},
|
|
16233
|
+
project.external_id
|
|
15703
16234
|
))
|
|
15704
16235
|
}
|
|
15705
16236
|
);
|
|
15706
16237
|
}
|
|
15707
16238
|
function ProjectsTable() {
|
|
15708
16239
|
const { data: projects, isLoading } = react.useProjects();
|
|
15709
|
-
const currentUserExtId =
|
|
16240
|
+
const currentUserExtId = chunkXJE7W42L_cjs.useSelfExtId();
|
|
15710
16241
|
const { openProject } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
15711
16242
|
const updateProject = react.useUpdateProjectFields();
|
|
15712
16243
|
const [renameTarget, setRenameTarget] = react$1.useState(null);
|
|
15713
16244
|
const [renameValue, setRenameValue] = react$1.useState("");
|
|
15714
16245
|
const [invoicesTarget, setInvoicesTarget] = react$1.useState(null);
|
|
15715
16246
|
const [upgradeTarget, setUpgradeTarget] = react$1.useState(null);
|
|
15716
|
-
const { stripeEnabled } =
|
|
16247
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
15717
16248
|
const ownedProjects = react$1.useMemo(
|
|
15718
16249
|
() => (projects ?? []).filter((p) => p.created_by === currentUserExtId),
|
|
15719
16250
|
[projects, currentUserExtId]
|
|
@@ -15752,13 +16283,13 @@ function ProjectsTable() {
|
|
|
15752
16283
|
const hasPaid = p.subscription === "active" || p.subscription === "past_due";
|
|
15753
16284
|
const canUpgrade = stripeEnabled && !hasPaid && p.subscription !== "canceled" && p.subscription !== "dev";
|
|
15754
16285
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15755
|
-
|
|
16286
|
+
chunkTBPCG2PV_cjs.ProjectRow,
|
|
15756
16287
|
{
|
|
15757
16288
|
testId: `project-row-${p.external_id}`,
|
|
15758
16289
|
onOpen: () => openProject(p.external_id),
|
|
15759
16290
|
identity: /* @__PURE__ */ jsxRuntime.jsx(ConnectedProjectEntity, { name: p.name, relation: "mine", subscription: p.subscription }),
|
|
15760
|
-
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15761
|
-
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16291
|
+
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanBadge, { ...chunkXJE7W42L_cjs.planBadgeView(p) }) }) : void 0,
|
|
16292
|
+
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.QuotaMeter, { items: chunkXJE7W42L_cjs.getQuotaItems(p.quotas), size: "lg" }) : void 0,
|
|
15762
16293
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15763
16294
|
canUpgrade && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15764
16295
|
ui.Button,
|
|
@@ -15792,9 +16323,9 @@ function ProjectsTable() {
|
|
|
15792
16323
|
);
|
|
15793
16324
|
};
|
|
15794
16325
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15795
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16326
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ProjectList, { isLoading, isEmpty: ownedProjects.length === 0, isFilteredOut: false, children: ownedProjects.map(renderRow) }),
|
|
15796
16327
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15797
|
-
|
|
16328
|
+
chunkTBPCG2PV_cjs.RenameDialog,
|
|
15798
16329
|
{
|
|
15799
16330
|
open: !!renameTarget,
|
|
15800
16331
|
onClose: () => setRenameTarget(null),
|
|
@@ -15825,7 +16356,7 @@ function ProjectsTable() {
|
|
|
15825
16356
|
}
|
|
15826
16357
|
function SharedProjects() {
|
|
15827
16358
|
const { data: projects } = react.useProjects();
|
|
15828
|
-
const currentUserExtId =
|
|
16359
|
+
const currentUserExtId = chunkXJE7W42L_cjs.useSelfExtId();
|
|
15829
16360
|
const { data: usageToday } = react.useUserUsageToday();
|
|
15830
16361
|
const shared = react$1.useMemo(
|
|
15831
16362
|
() => (projects ?? []).filter((p) => p.created_by !== currentUserExtId),
|
|
@@ -15834,13 +16365,13 @@ function SharedProjects() {
|
|
|
15834
16365
|
if (shared.length === 0) return null;
|
|
15835
16366
|
const usedToday = usageToday?.used_gbp ?? 0;
|
|
15836
16367
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15837
|
-
|
|
16368
|
+
chunkTBPCG2PV_cjs.SharedProjectsSection,
|
|
15838
16369
|
{
|
|
15839
16370
|
footnote: `Your daily AI credits allowance in ${ui.entityNoun("PROJECT", "PLURAL")} other people run \u2014 their plan and billing are theirs.`,
|
|
15840
16371
|
children: shared.map((p) => {
|
|
15841
16372
|
const cap = p.daily_cap_per_user;
|
|
15842
16373
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15843
|
-
|
|
16374
|
+
chunkTBPCG2PV_cjs.SharedProjectRow,
|
|
15844
16375
|
{
|
|
15845
16376
|
testId: `shared-project-${p.external_id}`,
|
|
15846
16377
|
identity: /* @__PURE__ */ jsxRuntime.jsx(ConnectedProjectEntity, { name: p.name, relation: "other" }),
|
|
@@ -15947,15 +16478,17 @@ function CollaboratorPlan({ project }) {
|
|
|
15947
16478
|
const next = addons.collaborator_blocks_next ?? blocks;
|
|
15948
16479
|
const included = addons.included_collaborators ?? 0;
|
|
15949
16480
|
const size = addons.block_collaborators ?? 0;
|
|
15950
|
-
const from =
|
|
16481
|
+
const from = chunkXJE7W42L_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end) ?? "the next billing period";
|
|
15951
16482
|
const annual = project.plan_interval === "year";
|
|
15952
|
-
const now = quote.data ?
|
|
15953
|
-
const renewal = quote.data ?
|
|
16483
|
+
const now = quote.data ? chunkXJE7W42L_cjs.quoteParts(quote.data.now) : null;
|
|
16484
|
+
const renewal = quote.data ? chunkXJE7W42L_cjs.quoteParts(quote.data.renewal) : null;
|
|
15954
16485
|
const busy = add.isPending || update.isPending;
|
|
15955
16486
|
const setNext = (count2) => update.mutate(
|
|
15956
16487
|
{ projectExtId: project.external_id, body: { collaborator_blocks: count2 } },
|
|
15957
16488
|
{
|
|
15958
|
-
onSuccess: () => shell.notify.success(
|
|
16489
|
+
onSuccess: () => shell.notify.success(
|
|
16490
|
+
count2 < blocks ? `Downgrade scheduled for your next billing cycle (${from})` : `Collaborator allowance updated from ${from}`
|
|
16491
|
+
),
|
|
15959
16492
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
15960
16493
|
}
|
|
15961
16494
|
);
|
|
@@ -15989,7 +16522,7 @@ function CollaboratorPlan({ project }) {
|
|
|
15989
16522
|
project.quotas.collaborators.limit,
|
|
15990
16523
|
" available \xB7 you don't count towards the limit."
|
|
15991
16524
|
] }),
|
|
15992
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: addons.collaborator_block_period_ex_vat_pence != null ? `${
|
|
16525
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: addons.collaborator_block_period_ex_vat_pence != null ? `${chunkXJE7W42L_cjs.formatMoney(addons.collaborator_block_period_ex_vat_pence, project.currency ?? "gbp")}/${annual ? "year" : "month"} per pack, plus tax.` : "The price is confirmed before purchase." }),
|
|
15993
16526
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Adding a pack charges your saved card for the rest of this billing period, then renews until removed. Collaborators share the project's AI credits budget." }),
|
|
15994
16527
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15995
16528
|
ui.Button,
|
|
@@ -16017,9 +16550,9 @@ function CollaboratorPlan({ project }) {
|
|
|
16017
16550
|
next > 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
|
|
16018
16551
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer text-muted-foreground", children: "Reduce allowance" }),
|
|
16019
16552
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "my-2", children: [
|
|
16020
|
-
"
|
|
16553
|
+
"Downgrades take effect next billing cycle (",
|
|
16021
16554
|
from,
|
|
16022
|
-
". Remove collaborators first if they won't fit in the smaller allowance."
|
|
16555
|
+
"). Remove collaborators first if they won't fit in the smaller allowance."
|
|
16023
16556
|
] }),
|
|
16024
16557
|
project.quotas.collaborators.used > included + size * (next - 1) && /* @__PURE__ */ jsxRuntime.jsxs("p", { role: "alert", className: "my-2 text-amber-700 dark:text-amber-400", children: [
|
|
16025
16558
|
"You currently have ",
|
|
@@ -16052,20 +16585,20 @@ function CollaboratorPlan({ project }) {
|
|
|
16052
16585
|
now && renewal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-sm", children: [
|
|
16053
16586
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
16054
16587
|
"Pay ",
|
|
16055
|
-
|
|
16588
|
+
chunkXJE7W42L_cjs.money2(now.total),
|
|
16056
16589
|
" today (",
|
|
16057
|
-
|
|
16590
|
+
chunkXJE7W42L_cjs.taxDetail(now),
|
|
16058
16591
|
"), covering until ",
|
|
16059
16592
|
from,
|
|
16060
16593
|
"."
|
|
16061
16594
|
] }),
|
|
16062
16595
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
16063
16596
|
"Then ",
|
|
16064
|
-
|
|
16597
|
+
chunkXJE7W42L_cjs.money2(renewal.total),
|
|
16065
16598
|
" every ",
|
|
16066
16599
|
annual ? "year" : "month",
|
|
16067
16600
|
" (",
|
|
16068
|
-
|
|
16601
|
+
chunkXJE7W42L_cjs.taxDetail(renewal),
|
|
16069
16602
|
"), starting ",
|
|
16070
16603
|
from,
|
|
16071
16604
|
", until you remove the pack."
|
|
@@ -16078,7 +16611,7 @@ function CollaboratorPlan({ project }) {
|
|
|
16078
16611
|
] }),
|
|
16079
16612
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogFooter, { children: [
|
|
16080
16613
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: () => setOpen(false), children: "Cancel" }),
|
|
16081
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: buy, disabled: !now || !renewal || quote.isFetching || busy, children: add.isPending ? "Paying\u2026" : now ? `Pay ${
|
|
16614
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: buy, disabled: !now || !renewal || quote.isFetching || busy, children: add.isPending ? "Paying\u2026" : now ? `Pay ${chunkXJE7W42L_cjs.money2(now.total)}` : "Add collaborators" })
|
|
16082
16615
|
] })
|
|
16083
16616
|
] }) })
|
|
16084
16617
|
] });
|
|
@@ -16109,7 +16642,7 @@ function DailyCapEditor({ project }) {
|
|
|
16109
16642
|
);
|
|
16110
16643
|
};
|
|
16111
16644
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16112
|
-
|
|
16645
|
+
chunkTBPCG2PV_cjs.DailyCapField,
|
|
16113
16646
|
{
|
|
16114
16647
|
value,
|
|
16115
16648
|
onChange: setValue,
|
|
@@ -16122,11 +16655,11 @@ function DailyCapEditor({ project }) {
|
|
|
16122
16655
|
function SubscriptionStatus({ project }) {
|
|
16123
16656
|
const { quotas, cancel_at_period_end, subscription, current_period_end, addons } = project;
|
|
16124
16657
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16125
|
-
|
|
16658
|
+
chunkTBPCG2PV_cjs.SubscriptionStatusView,
|
|
16126
16659
|
{
|
|
16127
|
-
resetDate:
|
|
16660
|
+
resetDate: chunkXJE7W42L_cjs.formatResetDate(addons?.ai_usage_reset_at ?? current_period_end),
|
|
16128
16661
|
isCanceling: subscription === "canceled" || cancel_at_period_end === true,
|
|
16129
|
-
meters:
|
|
16662
|
+
meters: chunkXJE7W42L_cjs.getQuotaItems(quotas).map((q) => ({
|
|
16130
16663
|
key: q.key,
|
|
16131
16664
|
icon: q.icon,
|
|
16132
16665
|
label: q.label,
|
|
@@ -16190,7 +16723,7 @@ function PendingChange({
|
|
|
16190
16723
|
}
|
|
16191
16724
|
);
|
|
16192
16725
|
}
|
|
16193
|
-
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ??
|
|
16726
|
+
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ?? chunkXJE7W42L_cjs.ADDON_BLOCK_AI_GBP)} of AI credits` : `Add ${blockStorageGb ?? chunkXJE7W42L_cjs.STORAGE_BLOCK_GB} GB storage`;
|
|
16194
16727
|
var blocksOf = (kind, project) => (kind === "ai_usage" ? project.addons?.ai_blocks : project.addons?.storage_blocks) ?? 0;
|
|
16195
16728
|
function Row({ label, children }) {
|
|
16196
16729
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
@@ -16211,11 +16744,11 @@ function AddAddonDialog({
|
|
|
16211
16744
|
const addons = project.addons;
|
|
16212
16745
|
if (!addons) return null;
|
|
16213
16746
|
const isAnnual = project.plan_interval === "year";
|
|
16214
|
-
const price =
|
|
16215
|
-
const nextCharge =
|
|
16216
|
-
const now = quote.data ?
|
|
16217
|
-
const renewal = quote.data ?
|
|
16218
|
-
const today = now ? { total:
|
|
16747
|
+
const price = chunkXJE7W42L_cjs.addonCharge(kind, addons, isAnnual, addons.period_end ?? project.current_period_end);
|
|
16748
|
+
const nextCharge = chunkXJE7W42L_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
16749
|
+
const now = quote.data ? chunkXJE7W42L_cjs.quoteParts(quote.data.now) : null;
|
|
16750
|
+
const renewal = quote.data ? chunkXJE7W42L_cjs.quoteParts(quote.data.renewal) : null;
|
|
16751
|
+
const today = now ? { total: chunkXJE7W42L_cjs.money2(now.total), detail: chunkXJE7W42L_cjs.taxDetail(now) } : { total: price.now, detail: `incl. VAT (${price.nowExVat} + ${price.nowVat} VAT)` };
|
|
16219
16752
|
const pricing = quote.isLoading;
|
|
16220
16753
|
const confirm = () => {
|
|
16221
16754
|
const before = blocksOf(kind, project);
|
|
@@ -16254,8 +16787,8 @@ function AddAddonDialog({
|
|
|
16254
16787
|
isAnnual ? "yearly" : "monthly",
|
|
16255
16788
|
" \xB7 no refund"
|
|
16256
16789
|
] }),
|
|
16257
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16258
|
-
|
|
16790
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.MoreInfo, { title: "Adding a top-up", testId: "add-addon-more-info", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16791
|
+
chunkTBPCG2PV_cjs.MoreInfoList,
|
|
16259
16792
|
{
|
|
16260
16793
|
items: [
|
|
16261
16794
|
{
|
|
@@ -16270,7 +16803,7 @@ function AddAddonDialog({
|
|
|
16270
16803
|
term: "Usage cap",
|
|
16271
16804
|
text: "Adding by hand is never blocked by the usage cap; the cap limits automatic top-ups only."
|
|
16272
16805
|
},
|
|
16273
|
-
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${
|
|
16806
|
+
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${chunkXJE7W42L_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : []
|
|
16274
16807
|
]
|
|
16275
16808
|
}
|
|
16276
16809
|
) })
|
|
@@ -16293,7 +16826,7 @@ function AddAddonDialog({
|
|
|
16293
16826
|
)
|
|
16294
16827
|
] }) }),
|
|
16295
16828
|
!pricing && /* @__PURE__ */ jsxRuntime.jsxs(Row, { label: "Next charge", children: [
|
|
16296
|
-
renewal ?
|
|
16829
|
+
renewal ? chunkXJE7W42L_cjs.totalWithTaxWord(renewal) : price.then.replace(/\/(month|year)/, ""),
|
|
16297
16830
|
nextCharge ? ` on ${nextCharge}` : " at renewal"
|
|
16298
16831
|
] })
|
|
16299
16832
|
] }) }),
|
|
@@ -16324,11 +16857,11 @@ function ReduceAddonDialog({
|
|
|
16324
16857
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
16325
16858
|
const addons = project.addons;
|
|
16326
16859
|
if (!addons) return null;
|
|
16327
|
-
const { min, next } =
|
|
16860
|
+
const { min, next } = chunkXJE7W42L_cjs.reduceBounds(kind, addons);
|
|
16328
16861
|
const keep2 = Math.max(min, next - 1);
|
|
16329
|
-
const size =
|
|
16330
|
-
const what =
|
|
16331
|
-
const from =
|
|
16862
|
+
const size = chunkXJE7W42L_cjs.nextRemovedBlockSize(kind, addons);
|
|
16863
|
+
const what = chunkXJE7W42L_cjs.stepLabel(kind, size);
|
|
16864
|
+
const from = chunkXJE7W42L_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end) ?? "your next renewal";
|
|
16332
16865
|
const fromShort = from.replace(/ \d{4}$/, "");
|
|
16333
16866
|
const allowanceNext = kind === "ai_usage" ? addons.ai_allowance_next_gbp - size : addons.storage_allowance_next_gb - size;
|
|
16334
16867
|
const allowanceNow = kind === "ai_usage" ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -16336,11 +16869,11 @@ function ReduceAddonDialog({
|
|
|
16336
16869
|
const save = () => update.mutate(
|
|
16337
16870
|
{
|
|
16338
16871
|
projectExtId: project.external_id,
|
|
16339
|
-
body:
|
|
16872
|
+
body: chunkXJE7W42L_cjs.nextPeriodBody(kind, keep2)
|
|
16340
16873
|
},
|
|
16341
16874
|
{
|
|
16342
16875
|
onSuccess: () => {
|
|
16343
|
-
shell.notify.success(
|
|
16876
|
+
shell.notify.success(`Downgrade scheduled for your next billing cycle (${from})`);
|
|
16344
16877
|
onOpenChange(false);
|
|
16345
16878
|
},
|
|
16346
16879
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
@@ -16360,11 +16893,11 @@ function ReduceAddonDialog({
|
|
|
16360
16893
|
] }),
|
|
16361
16894
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
16362
16895
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogDescription, { "data-testid": "reduce-addon-applies", children: [
|
|
16363
|
-
"
|
|
16896
|
+
"Takes effect next billing cycle \xB7 ",
|
|
16364
16897
|
fromShort,
|
|
16365
16898
|
" \xB7 no refund"
|
|
16366
16899
|
] }),
|
|
16367
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16900
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.MoreInfo, { title: "Reducing a top-up", testId: "reduce-addon-more-info", children: [
|
|
16368
16901
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
16369
16902
|
"The reduction applies from your next renewal (",
|
|
16370
16903
|
from,
|
|
@@ -16421,7 +16954,7 @@ function ReduceAddonDialog({
|
|
|
16421
16954
|
}
|
|
16422
16955
|
) });
|
|
16423
16956
|
}
|
|
16424
|
-
var gbp = (pence) =>
|
|
16957
|
+
var gbp = (pence) => chunkXJE7W42L_cjs.formatMoney(pence, "gbp");
|
|
16425
16958
|
var gb2 = (n) => `${Math.round(n * 10) / 10} GB`;
|
|
16426
16959
|
function formatShortDate(unix) {
|
|
16427
16960
|
if (!unix) return null;
|
|
@@ -16432,20 +16965,20 @@ function AutoTopupThreshold({
|
|
|
16432
16965
|
addons
|
|
16433
16966
|
}) {
|
|
16434
16967
|
const updateSettings = react.useUpdateProjectAddonSettings();
|
|
16435
|
-
const min = addons.min_auto_topup_threshold_gbp ||
|
|
16968
|
+
const min = addons.min_auto_topup_threshold_gbp || chunkXJE7W42L_cjs.MIN_AUTO_TOPUP_THRESHOLD_GBP;
|
|
16436
16969
|
const saved = addons.auto_topup_threshold_gbp;
|
|
16437
16970
|
const [value, setValue] = react$1.useState(String(saved));
|
|
16438
16971
|
react$1.useEffect(() => setValue(String(saved)), [saved]);
|
|
16439
16972
|
const parsed = Number(value);
|
|
16440
16973
|
const valid = Number.isFinite(parsed) && parsed >= min;
|
|
16441
16974
|
const dirty = valid && parsed !== saved;
|
|
16442
|
-
const off =
|
|
16975
|
+
const off = chunkXJE7W42L_cjs.isAddonBudgetZero(addons);
|
|
16443
16976
|
const save = () => {
|
|
16444
16977
|
if (!dirty) return;
|
|
16445
16978
|
updateSettings.mutate(
|
|
16446
16979
|
{
|
|
16447
16980
|
projectExtId: project.external_id,
|
|
16448
|
-
body:
|
|
16981
|
+
body: chunkXJE7W42L_cjs.addonSettingsBody(addons, { auto_topup_threshold_gbp: parsed })
|
|
16449
16982
|
},
|
|
16450
16983
|
{
|
|
16451
16984
|
onSuccess: () => shell.notify.success(`Auto-add below ${react.formatGbp(parsed)} of AI credits left`),
|
|
@@ -16542,10 +17075,10 @@ function ResourceMeter({
|
|
|
16542
17075
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
16543
17076
|
const isAi = kind === "ai_usage";
|
|
16544
17077
|
const slug = isAi ? "ai-usage" : "storage";
|
|
16545
|
-
const periodEnd =
|
|
17078
|
+
const periodEnd = chunkXJE7W42L_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
16546
17079
|
const from = periodEnd ?? "your next renewal";
|
|
16547
17080
|
const fromShort = formatShortDate(addons.period_end ?? project.current_period_end) ?? "renewal";
|
|
16548
|
-
const { min, current, next } =
|
|
17081
|
+
const { min, current, next } = chunkXJE7W42L_cjs.reduceBounds(kind, addons);
|
|
16549
17082
|
const fmt = (n) => isAi ? react.formatGbp(n) : gb2(n);
|
|
16550
17083
|
const used = isAi ? addons.ai_used_gbp : addons.storage_used_gb;
|
|
16551
17084
|
const allowance = isAi ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -16553,15 +17086,15 @@ function ResourceMeter({
|
|
|
16553
17086
|
const plan = isAi ? addons.plan_ai_gbp : addons.plan_storage_gb;
|
|
16554
17087
|
const topUps = Math.max(0, allowance - plan);
|
|
16555
17088
|
const blocks = isAi ? addons.ai_blocks : addons.storage_blocks;
|
|
16556
|
-
const hasLegacy =
|
|
16557
|
-
const room =
|
|
16558
|
-
const capZero =
|
|
16559
|
-
const resets = isAi ? formatShortDate(
|
|
16560
|
-
const removeSize =
|
|
17089
|
+
const hasLegacy = chunkXJE7W42L_cjs.splitBlocks(kind, blocks, addons).legacy > 0;
|
|
17090
|
+
const room = chunkXJE7W42L_cjs.autoRoom(kind, addons);
|
|
17091
|
+
const capZero = chunkXJE7W42L_cjs.isAddonBudgetZero(addons);
|
|
17092
|
+
const resets = isAi ? formatShortDate(chunkXJE7W42L_cjs.aiUsageResetTimestamp(project)) : null;
|
|
17093
|
+
const removeSize = chunkXJE7W42L_cjs.nextRemovedBlockSize(kind, addons);
|
|
16561
17094
|
const undo = () => update.mutate(
|
|
16562
17095
|
{
|
|
16563
17096
|
projectExtId: project.external_id,
|
|
16564
|
-
body:
|
|
17097
|
+
body: chunkXJE7W42L_cjs.nextPeriodBody(kind, current)
|
|
16565
17098
|
},
|
|
16566
17099
|
{
|
|
16567
17100
|
onSuccess: () => shell.notify.success("Kept"),
|
|
@@ -16578,7 +17111,7 @@ function ResourceMeter({
|
|
|
16578
17111
|
allowance: { used, plan, topUps, autoRoom: capZero ? 0 : room },
|
|
16579
17112
|
legend: {
|
|
16580
17113
|
plan: `Plan ${fmt(plan)}`,
|
|
16581
|
-
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${
|
|
17114
|
+
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${chunkXJE7W42L_cjs.blocksLabel(kind, blocks, addons)})` : ""}` : void 0,
|
|
16582
17115
|
autoRoom: room != null && room > 0 && !capZero ? `Automatic up to ${fmt(room)}` : void 0
|
|
16583
17116
|
},
|
|
16584
17117
|
testId: `usage-meter-${slug}`,
|
|
@@ -16607,9 +17140,9 @@ function ResourceMeter({
|
|
|
16607
17140
|
{
|
|
16608
17141
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-3.5" }),
|
|
16609
17142
|
label: isAi ? react.formatGbp(addons.block_ai_gbp) : `${addons.block_storage_gb} GB`,
|
|
16610
|
-
caption:
|
|
17143
|
+
caption: chunkXJE7W42L_cjs.addStepCaption(kind, addons),
|
|
16611
17144
|
onClick: onAdd,
|
|
16612
|
-
ariaLabel: `Add ${
|
|
17145
|
+
ariaLabel: `Add ${chunkXJE7W42L_cjs.stepLabel(kind, isAi ? addons.block_ai_gbp : addons.block_storage_gb)}`,
|
|
16613
17146
|
testId: isAi ? "add-ai-block-button" : "add-storage-block-button"
|
|
16614
17147
|
}
|
|
16615
17148
|
),
|
|
@@ -16622,7 +17155,7 @@ function ResourceMeter({
|
|
|
16622
17155
|
label: isAi ? react.formatGbp(removeSize) : `${removeSize} GB`,
|
|
16623
17156
|
caption: `from ${fromShort}`,
|
|
16624
17157
|
onClick: onReduce,
|
|
16625
|
-
ariaLabel: `Remove ${
|
|
17158
|
+
ariaLabel: `Remove ${chunkXJE7W42L_cjs.stepLabel(kind, removeSize)} from ${from}`,
|
|
16626
17159
|
testId: `reduce-${slug}-button`
|
|
16627
17160
|
}
|
|
16628
17161
|
)
|
|
@@ -16636,9 +17169,9 @@ function UsageCapEditor({ project, addons }) {
|
|
|
16636
17169
|
const sectionRef = react$1.useRef(null);
|
|
16637
17170
|
const inputRef = react$1.useRef(null);
|
|
16638
17171
|
const minimum = 0;
|
|
16639
|
-
const stepPence = addons.spend_cap_step_pence
|
|
16640
|
-
const saved = addons.spend_cap_pence ?? addons.default_spend_cap_pence
|
|
16641
|
-
const maximum = addons.maximum_spend_cap_pence
|
|
17172
|
+
const stepPence = addons.spend_cap_step_pence;
|
|
17173
|
+
const saved = addons.spend_cap_pence ?? addons.default_spend_cap_pence;
|
|
17174
|
+
const maximum = addons.maximum_spend_cap_pence;
|
|
16642
17175
|
const normalize = (n) => Math.max(0, Math.min(maximum, Math.floor(n / stepPence) * stepPence));
|
|
16643
17176
|
const [value, setValue] = react$1.useState(normalize(saved));
|
|
16644
17177
|
react$1.useEffect(
|
|
@@ -16655,10 +17188,10 @@ function UsageCapEditor({ project, addons }) {
|
|
|
16655
17188
|
const save = () => updateSettings.mutate(
|
|
16656
17189
|
{
|
|
16657
17190
|
projectExtId: project.external_id,
|
|
16658
|
-
body:
|
|
17191
|
+
body: chunkXJE7W42L_cjs.addonSettingsBody(addons, { spend_cap_pence: value })
|
|
16659
17192
|
},
|
|
16660
17193
|
{
|
|
16661
|
-
onSuccess: () => shell.notify.success(
|
|
17194
|
+
onSuccess: () => shell.notify.success(chunkXJE7W42L_cjs.budgetSavedMessage(value)),
|
|
16662
17195
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
16663
17196
|
}
|
|
16664
17197
|
);
|
|
@@ -16695,8 +17228,8 @@ function UsageCapEditor({ project, addons }) {
|
|
|
16695
17228
|
function UsageInfo({ addons, isAnnual }) {
|
|
16696
17229
|
const period = isAnnual ? "year" : "month";
|
|
16697
17230
|
const legacy = (addons.legacy_ai_blocks ?? 0) > 0 || (addons.legacy_storage_blocks ?? 0) > 0;
|
|
16698
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16699
|
-
|
|
17231
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.MoreInfo, { title: "Usage and top-ups", testId: "usage-more-info", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17232
|
+
chunkTBPCG2PV_cjs.MoreInfoList,
|
|
16700
17233
|
{
|
|
16701
17234
|
items: [
|
|
16702
17235
|
{
|
|
@@ -16711,7 +17244,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
16711
17244
|
term: "Automatic top-ups",
|
|
16712
17245
|
text: "One step is added when AI credits drops below your auto top-up level, or when an upload needs more storage."
|
|
16713
17246
|
},
|
|
16714
|
-
{ term: "Usage cap", text:
|
|
17247
|
+
{ term: "Usage cap", text: chunkXJE7W42L_cjs.USAGE_CAP_HELP },
|
|
16715
17248
|
{
|
|
16716
17249
|
term: "Reducing",
|
|
16717
17250
|
text: "\u2212 removes one step from your next renewal. You keep this period's allowance. No refunds."
|
|
@@ -16722,7 +17255,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
16722
17255
|
text: "Top-ups bought on an earlier price keep their size and price until removed; they are removed last."
|
|
16723
17256
|
}
|
|
16724
17257
|
] : [],
|
|
16725
|
-
...isAnnual ? [{ term: "Annual", text: `${
|
|
17258
|
+
...isAnnual ? [{ term: "Annual", text: `${chunkXJE7W42L_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : [],
|
|
16726
17259
|
{
|
|
16727
17260
|
term: "Prices",
|
|
16728
17261
|
text: "Shown ex VAT. The confirm step shows the total with VAT before you pay."
|
|
@@ -16815,7 +17348,7 @@ function formatShortDate2(unix) {
|
|
|
16815
17348
|
if (!unix) return null;
|
|
16816
17349
|
return new Date(unix * 1e3).toLocaleDateString("en-GB", { day: "numeric", month: "short" });
|
|
16817
17350
|
}
|
|
16818
|
-
var gbp2 = (pence) =>
|
|
17351
|
+
var gbp2 = (pence) => chunkXJE7W42L_cjs.formatMoney(pence, "gbp");
|
|
16819
17352
|
var gbNum = (n) => `${Math.round(n * 10) / 10}`;
|
|
16820
17353
|
var pct = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
16821
17354
|
function Meter({
|
|
@@ -16833,15 +17366,15 @@ function Meter({
|
|
|
16833
17366
|
] });
|
|
16834
17367
|
}
|
|
16835
17368
|
function usePlanPrice(project) {
|
|
16836
|
-
const { data: products } = react.useProducts({ enabled:
|
|
16837
|
-
if (!
|
|
17369
|
+
const { data: products } = react.useProducts({ enabled: chunkXJE7W42L_cjs.isProProject(project) });
|
|
17370
|
+
if (!chunkXJE7W42L_cjs.isProProject(project)) return null;
|
|
16838
17371
|
const isAnnual = project.plan_interval === "year";
|
|
16839
17372
|
if (project.amount != null) {
|
|
16840
17373
|
return { incl: project.amount, ex: project.amount_ex_vat ?? null, isAnnual };
|
|
16841
17374
|
}
|
|
16842
|
-
if ((project.packs ??
|
|
16843
|
-
const prices =
|
|
16844
|
-
const pp =
|
|
17375
|
+
if ((project.packs ?? chunkXJE7W42L_cjs.PRO_PACKS) > chunkXJE7W42L_cjs.PRO_PACKS) return null;
|
|
17376
|
+
const prices = chunkXJE7W42L_cjs.findProPrices(products);
|
|
17377
|
+
const pp = chunkXJE7W42L_cjs.packPrice(isAnnual ? prices.annual : prices.monthly);
|
|
16845
17378
|
return pp ? { incl: pp.amount, ex: pp.amount_ex_vat, isAnnual } : null;
|
|
16846
17379
|
}
|
|
16847
17380
|
function paidLine(payment, addons) {
|
|
@@ -16854,11 +17387,11 @@ function ProjectPlanCard({
|
|
|
16854
17387
|
onChangePlan
|
|
16855
17388
|
}) {
|
|
16856
17389
|
const { quotas, addons } = project;
|
|
16857
|
-
const isPro =
|
|
17390
|
+
const isPro = chunkXJE7W42L_cjs.isProProject(project);
|
|
16858
17391
|
const used = quotas?.ai_usage?.used ?? 0;
|
|
16859
17392
|
const limit = quotas?.ai_usage?.limit ?? 0;
|
|
16860
|
-
const resetDate = formatShortDate2(
|
|
16861
|
-
const periodEnd =
|
|
17393
|
+
const resetDate = formatShortDate2(chunkXJE7W42L_cjs.aiUsageResetTimestamp(project));
|
|
17394
|
+
const periodEnd = chunkXJE7W42L_cjs.formatPeriodEnd(addons?.period_end ?? project.current_period_end);
|
|
16862
17395
|
const when2 = periodEnd ?? "the end of the period";
|
|
16863
17396
|
const storageUsed = quotas?.storage_gb?.used ?? 0;
|
|
16864
17397
|
const storageLimit = quotas?.storage_gb?.limit ?? 0;
|
|
@@ -16874,7 +17407,7 @@ function ProjectPlanCard({
|
|
|
16874
17407
|
project.external_id,
|
|
16875
17408
|
hasScheduledChange && addons ? { packs: packsNext ?? addons.packs, interval: pending ?? currentInterval } : null
|
|
16876
17409
|
).data;
|
|
16877
|
-
const tier = isPro ?
|
|
17410
|
+
const tier = isPro ? chunkXJE7W42L_cjs.proTierName(project) : project.subscription === "dev" ? "Dev" : "Free";
|
|
16878
17411
|
const pendingPayment = addons?.payment?.status === "pending" ? addons.payment : null;
|
|
16879
17412
|
const confirmUrl = pendingPayment?.confirm_url ?? addons?.confirm_url;
|
|
16880
17413
|
const paidPayment = addons?.payment?.status === "paid" ? addons.payment : null;
|
|
@@ -16908,7 +17441,7 @@ function ProjectPlanCard({
|
|
|
16908
17441
|
isPro && " ",
|
|
16909
17442
|
isPro && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: currentInterval === "year" ? "Annual" : "Monthly" })
|
|
16910
17443
|
] }),
|
|
16911
|
-
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${
|
|
17444
|
+
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${chunkXJE7W42L_cjs.totalWithTaxWord({
|
|
16912
17445
|
subtotal: nextBill.next_renewal_ex_vat_pence,
|
|
16913
17446
|
tax: nextBill.next_renewal_tax_pence,
|
|
16914
17447
|
total: nextBill.next_renewal_pence,
|
|
@@ -16917,7 +17450,7 @@ function ProjectPlanCard({
|
|
|
16917
17450
|
] }),
|
|
16918
17451
|
price && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto text-right", "data-testid": "project-plan-price", children: [
|
|
16919
17452
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-lg font-semibold tabular-nums text-foreground", children: [
|
|
16920
|
-
price.ex != null ?
|
|
17453
|
+
price.ex != null ? chunkXJE7W42L_cjs.plusVat(price.ex) : gbp2(price.incl),
|
|
16921
17454
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: price.isAnnual ? "/year" : "/month" })
|
|
16922
17455
|
] }),
|
|
16923
17456
|
price.ex != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -16955,7 +17488,7 @@ function ProjectPlanCard({
|
|
|
16955
17488
|
undoTestId: "undo-plan-change-button",
|
|
16956
17489
|
children: [
|
|
16957
17490
|
"Changes to ",
|
|
16958
|
-
|
|
17491
|
+
chunkXJE7W42L_cjs.planNameForPacks(packsNext),
|
|
16959
17492
|
" on ",
|
|
16960
17493
|
when2,
|
|
16961
17494
|
"."
|
|
@@ -17000,8 +17533,8 @@ function ProjectPlanCard({
|
|
|
17000
17533
|
}
|
|
17001
17534
|
)
|
|
17002
17535
|
] }),
|
|
17003
|
-
addons?.billing_error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17004
|
-
confirmUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17536
|
+
addons?.billing_error && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { tone: "error", testId: "plan-billing-error", children: addons.billing_error }),
|
|
17537
|
+
confirmUrl ? /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PlanNotice, { testId: "plan-payment-state", children: [
|
|
17005
17538
|
"Waiting for your bank",
|
|
17006
17539
|
pendingPayment?.amount_pence ? ` \xB7 ${gbp2(pendingPayment.amount_pence)}` : "",
|
|
17007
17540
|
" \xB7",
|
|
@@ -17019,7 +17552,7 @@ function ProjectPlanCard({
|
|
|
17019
17552
|
]
|
|
17020
17553
|
}
|
|
17021
17554
|
)
|
|
17022
|
-
] }) : paidPayment && addons && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17555
|
+
] }) : paidPayment && addons && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanNotice, { testId: "plan-payment-state", children: paidLine(paidPayment, addons) }),
|
|
17023
17556
|
isPro && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17024
17557
|
"button",
|
|
17025
17558
|
{
|
|
@@ -17046,7 +17579,7 @@ function ProjectBilling({
|
|
|
17046
17579
|
const { addons } = project;
|
|
17047
17580
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": "project-billing", children: [
|
|
17048
17581
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectPlanCard, { project, onChangePlan }),
|
|
17049
|
-
addons &&
|
|
17582
|
+
addons && chunkXJE7W42L_cjs.isProProject(project) && /* @__PURE__ */ jsxRuntime.jsx(ProjectUsageCard, { project, addons })
|
|
17050
17583
|
] });
|
|
17051
17584
|
}
|
|
17052
17585
|
var BREAKDOWN_LABELS = react.DEFAULT_USAGE_BREAKDOWN_SOURCE_LABELS.by;
|
|
@@ -17084,13 +17617,13 @@ function ProjectUsageContent({
|
|
|
17084
17617
|
};
|
|
17085
17618
|
const quotaPct = effectiveUsage && aiUsageLimit ? Math.round(effectiveUsage.total_spend / aiUsageLimit * 100) : 0;
|
|
17086
17619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17087
|
-
|
|
17620
|
+
chunkTBPCG2PV_cjs.UsagePanel,
|
|
17088
17621
|
{
|
|
17089
17622
|
state,
|
|
17090
17623
|
dateRange,
|
|
17091
17624
|
emptyMessage: `No usage ${period === "current" ? "yet this month" : "last month"}.`,
|
|
17092
17625
|
period: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17093
|
-
|
|
17626
|
+
chunkTBPCG2PV_cjs.UsageToggle,
|
|
17094
17627
|
{
|
|
17095
17628
|
ariaLabel: "Period",
|
|
17096
17629
|
value: period,
|
|
@@ -17103,7 +17636,7 @@ function ProjectUsageContent({
|
|
|
17103
17636
|
),
|
|
17104
17637
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17105
17638
|
effectiveUsage?.invoice_pdf && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17106
|
-
|
|
17639
|
+
chunkTBPCG2PV_cjs.UsageActionButton,
|
|
17107
17640
|
{
|
|
17108
17641
|
label: "Download Stripe invoice PDF",
|
|
17109
17642
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-3.5" }),
|
|
@@ -17111,7 +17644,7 @@ function ProjectUsageContent({
|
|
|
17111
17644
|
}
|
|
17112
17645
|
),
|
|
17113
17646
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17114
|
-
|
|
17647
|
+
chunkTBPCG2PV_cjs.UsageActionButton,
|
|
17115
17648
|
{
|
|
17116
17649
|
label: "Print usage summary",
|
|
17117
17650
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Printer, { className: "size-3.5" }),
|
|
@@ -17148,7 +17681,7 @@ function ProjectUsagePanels({
|
|
|
17148
17681
|
[spend, panels.requests, panels.tokens].map((p) => /* @__PURE__ */ jsxRuntime.jsx(chunkUZHWXKS6_cjs.DashboardCell, { width: p.width, children: /* @__PURE__ */ jsxRuntime.jsx(chunkUZHWXKS6_cjs.DashboardPanel, { panel: p, testId: `project-usage-${p.id}` }) }, p.id)),
|
|
17149
17682
|
/* @__PURE__ */ jsxRuntime.jsx(chunkUZHWXKS6_cjs.DashboardCell, { width: 12, children: /* @__PURE__ */ jsxRuntime.jsx(chunkUZHWXKS6_cjs.DashboardPanel, { panel: { ...panels.spendByModel, width: 12 } }) }),
|
|
17150
17683
|
/* @__PURE__ */ jsxRuntime.jsx(chunkUZHWXKS6_cjs.DashboardCell, { width: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17151
|
-
|
|
17684
|
+
chunkTBPCG2PV_cjs.UsageToggle,
|
|
17152
17685
|
{
|
|
17153
17686
|
ariaLabel: "Breakdown by",
|
|
17154
17687
|
size: "fill",
|
|
@@ -17163,7 +17696,7 @@ function ProjectUsagePanels({
|
|
|
17163
17696
|
panel: panels.breakdown(breakdown, metric, 12),
|
|
17164
17697
|
testId: "project-usage-breakdown",
|
|
17165
17698
|
actions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17166
|
-
|
|
17699
|
+
chunkTBPCG2PV_cjs.UsageToggle,
|
|
17167
17700
|
{
|
|
17168
17701
|
ariaLabel: "Breakdown metric",
|
|
17169
17702
|
value: metric,
|
|
@@ -17179,13 +17712,13 @@ function ProjectUsagePanels({
|
|
|
17179
17712
|
] });
|
|
17180
17713
|
}
|
|
17181
17714
|
function ProjectDetail({ projectExtId, storage }) {
|
|
17182
|
-
const { stripeEnabled } =
|
|
17715
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
17183
17716
|
const [planOpen, setPlanOpen] = react$1.useState(false);
|
|
17184
17717
|
const [renameOpen, setRenameOpen] = react$1.useState(false);
|
|
17185
17718
|
const [renameValue, setRenameValue] = react$1.useState("");
|
|
17186
17719
|
const updateProject = react.useUpdateProjectFields();
|
|
17187
17720
|
const { data: projects, isLoading } = react.useProjects();
|
|
17188
|
-
const currentUserExtId =
|
|
17721
|
+
const currentUserExtId = chunkXJE7W42L_cjs.useSelfExtId();
|
|
17189
17722
|
const project = projects?.find((p) => p.external_id === projectExtId);
|
|
17190
17723
|
const handleSaveRename = react$1.useCallback(() => {
|
|
17191
17724
|
const trimmed = renameValue.trim();
|
|
@@ -17223,7 +17756,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
17223
17756
|
}
|
|
17224
17757
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-6 max-w-4xl", "data-testid": `project-detail-${project.external_id}`, children: [
|
|
17225
17758
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17226
|
-
|
|
17759
|
+
chunkTBPCG2PV_cjs.ProjectDetailHeader,
|
|
17227
17760
|
{
|
|
17228
17761
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "PROJECT" }),
|
|
17229
17762
|
name: project.name,
|
|
@@ -17231,12 +17764,12 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
17231
17764
|
setRenameValue(project.name);
|
|
17232
17765
|
setRenameOpen(true);
|
|
17233
17766
|
},
|
|
17234
|
-
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17767
|
+
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanBadge, { ...chunkXJE7W42L_cjs.planBadgeView(project), size: "md" }) : void 0
|
|
17235
17768
|
}
|
|
17236
17769
|
),
|
|
17237
17770
|
hasBilling && project.subscription === "suspended" ? /* @__PURE__ */ jsxRuntime.jsx(SuspendedProjectRecovery, { project, onResubscribe: () => setPlanOpen(true) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17238
17771
|
hasBilling && /* @__PURE__ */ jsxRuntime.jsx(ProjectBilling, { project, onChangePlan: () => setPlanOpen(true) }),
|
|
17239
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17772
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.ProjectDetailSection, { title: hasBilling ? "Collaborator limits" : "Plan limits", children: [
|
|
17240
17773
|
!hasBilling && /* @__PURE__ */ jsxRuntime.jsx(SubscriptionStatus, { project }),
|
|
17241
17774
|
hasBilling && project.addons && /* @__PURE__ */ jsxRuntime.jsx(CollaboratorPlan, { project }),
|
|
17242
17775
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17246,14 +17779,14 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
17246
17779
|
children: [
|
|
17247
17780
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
17248
17781
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-semibold text-foreground", children: "Daily limit per collaborator" }),
|
|
17249
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-muted-foreground", children: "
|
|
17782
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-muted-foreground", children: "Collaborators will use your project's quota. Set a daily limit on how much AI a collaborator can use." })
|
|
17250
17783
|
] }),
|
|
17251
17784
|
/* @__PURE__ */ jsxRuntime.jsx(DailyCapEditor, { project })
|
|
17252
17785
|
]
|
|
17253
17786
|
}
|
|
17254
17787
|
)
|
|
17255
17788
|
] }),
|
|
17256
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17789
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.ProjectDetailSection, { title: "Usage", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17257
17790
|
ProjectUsageContent,
|
|
17258
17791
|
{
|
|
17259
17792
|
projectExtId: project.external_id,
|
|
@@ -17264,7 +17797,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
17264
17797
|
storage
|
|
17265
17798
|
] }),
|
|
17266
17799
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17267
|
-
|
|
17800
|
+
chunkTBPCG2PV_cjs.RenameDialog,
|
|
17268
17801
|
{
|
|
17269
17802
|
open: renameOpen,
|
|
17270
17803
|
onClose: () => setRenameOpen(false),
|
|
@@ -17281,7 +17814,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
17281
17814
|
function useAutoRefreshPendingProjects() {
|
|
17282
17815
|
const { data: projects } = react.useProjects();
|
|
17283
17816
|
const refreshProject = react.useRefreshProject();
|
|
17284
|
-
const currentUserExtId =
|
|
17817
|
+
const currentUserExtId = chunkXJE7W42L_cjs.useSelfExtId();
|
|
17285
17818
|
const refreshedRef = react$1.useRef(/* @__PURE__ */ new Set());
|
|
17286
17819
|
react$1.useEffect(() => {
|
|
17287
17820
|
if (!projects || !currentUserExtId) return;
|
|
@@ -17312,7 +17845,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
17312
17845
|
if (quotaProjectId) void refetchProjects();
|
|
17313
17846
|
}, [quotaProjectId, refetchProjects]);
|
|
17314
17847
|
const project = info?.projectExtId ? projects?.find((p) => p.external_id === info.projectExtId) : void 0;
|
|
17315
|
-
const addons = project &&
|
|
17848
|
+
const addons = project && chunkXJE7W42L_cjs.isProProject(project) ? project.addons : null;
|
|
17316
17849
|
const handleUpgrade = () => {
|
|
17317
17850
|
if (info?.projectExtId) {
|
|
17318
17851
|
requestProjectBillingFocus({ projectExtId: info.projectExtId, openUpgrade: true });
|
|
@@ -17348,8 +17881,8 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
17348
17881
|
/* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
17349
17882
|
);
|
|
17350
17883
|
} else if (addons) {
|
|
17351
|
-
const price = `${
|
|
17352
|
-
const capZero =
|
|
17884
|
+
const price = `${chunkXJE7W42L_cjs.formatMoney(addons.ai_block_price_ex_vat_pence, "gbp")} ex VAT`;
|
|
17885
|
+
const capZero = chunkXJE7W42L_cjs.isAddonBudgetZero(addons);
|
|
17353
17886
|
const addAiUsage = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: handleAddAiUsage, "data-testid": "quota-add-ai-usage-button", children: [
|
|
17354
17887
|
"Add ",
|
|
17355
17888
|
react.formatGbp(addons.block_ai_gbp),
|
|
@@ -17357,7 +17890,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
17357
17890
|
price
|
|
17358
17891
|
] });
|
|
17359
17892
|
if (capZero || addons.cap_reached) {
|
|
17360
|
-
message = capZero ?
|
|
17893
|
+
message = capZero ? chunkXJE7W42L_cjs.ZERO_BUDGET_MESSAGE : chunkXJE7W42L_cjs.CAP_REACHED_MESSAGE;
|
|
17361
17894
|
actions = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17362
17895
|
addAiUsage,
|
|
17363
17896
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: handleRaiseCap, "data-testid": "quota-raise-cap-button", children: capZero ? "Set cap" : "Raise cap" })
|
|
@@ -17370,7 +17903,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
17370
17903
|
const addAiUsageProject = addAiUsageFor ? projects?.find((p) => p.external_id === addAiUsageFor) : void 0;
|
|
17371
17904
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17372
17905
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17373
|
-
|
|
17906
|
+
chunkTBPCG2PV_cjs.QuotaExceededDialogView,
|
|
17374
17907
|
{
|
|
17375
17908
|
open,
|
|
17376
17909
|
onClose: close,
|
|
@@ -17477,8 +18010,11 @@ function createPaymentRequiredMiddleware(options) {
|
|
|
17477
18010
|
function ConnectedAddContacts({
|
|
17478
18011
|
onSuccess,
|
|
17479
18012
|
onClose,
|
|
18013
|
+
onDone,
|
|
17480
18014
|
initialEmail = "",
|
|
17481
|
-
rewardAmount
|
|
18015
|
+
rewardAmount,
|
|
18016
|
+
keepFormOpen = false,
|
|
18017
|
+
labels
|
|
17482
18018
|
}) {
|
|
17483
18019
|
const { notify: notify19 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
17484
18020
|
const arbi = react.useArbi();
|
|
@@ -17505,7 +18041,12 @@ function ConnectedAddContacts({
|
|
|
17505
18041
|
}
|
|
17506
18042
|
try {
|
|
17507
18043
|
const response = await invite.mutateAsync(plan.send);
|
|
17508
|
-
|
|
18044
|
+
const results = chunkTXP2N3DC_cjs.applyContactInviteResults(plan, response);
|
|
18045
|
+
setRows(results);
|
|
18046
|
+
if (keepFormOpen)
|
|
18047
|
+
setText(
|
|
18048
|
+
results.filter((row2) => row2.status === "failed").map((row2) => row2.email).join(", ")
|
|
18049
|
+
);
|
|
17509
18050
|
const summary = chunkTXP2N3DC_cjs.summarizeContactInvites(response);
|
|
17510
18051
|
notify19(summary.message, summary.failed ? "error" : "success");
|
|
17511
18052
|
onSuccess?.();
|
|
@@ -17515,30 +18056,216 @@ function ConnectedAddContacts({
|
|
|
17515
18056
|
notify19(message, "error");
|
|
17516
18057
|
}
|
|
17517
18058
|
};
|
|
17518
|
-
if (rows)
|
|
18059
|
+
if (rows && !keepFormOpen)
|
|
17519
18060
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17520
18061
|
chunkTXP2N3DC_cjs.AddContactsResults,
|
|
17521
18062
|
{
|
|
17522
18063
|
rows,
|
|
17523
|
-
onDone: onClose,
|
|
18064
|
+
onDone: onDone ?? onClose,
|
|
17524
18065
|
onAddMore: () => {
|
|
17525
18066
|
setText("");
|
|
17526
18067
|
setRows(null);
|
|
17527
18068
|
}
|
|
17528
18069
|
}
|
|
17529
18070
|
);
|
|
17530
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17539
|
-
|
|
18071
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18072
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18073
|
+
chunkTXP2N3DC_cjs.AddContactsForm,
|
|
18074
|
+
{
|
|
18075
|
+
value: text,
|
|
18076
|
+
onChange: setText,
|
|
18077
|
+
emailCount: chunkTXP2N3DC_cjs.emailTokens(text).length,
|
|
18078
|
+
isPending: invite.isPending,
|
|
18079
|
+
onSubmit: () => void submit(),
|
|
18080
|
+
onCancel: onClose,
|
|
18081
|
+
rewardAmount,
|
|
18082
|
+
labels
|
|
18083
|
+
}
|
|
18084
|
+
),
|
|
18085
|
+
keepFormOpen && rows?.some((row2) => row2.status === "failed") && /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "alert", className: "text-sm text-destructive", children: rows.filter((row2) => row2.status === "failed").map((row2) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
18086
|
+
row2.email,
|
|
18087
|
+
": ",
|
|
18088
|
+
row2.message
|
|
18089
|
+
] }, row2.email)) })
|
|
18090
|
+
] });
|
|
18091
|
+
}
|
|
18092
|
+
var titles = {
|
|
18093
|
+
pending: "Invited",
|
|
18094
|
+
joined: "Joined",
|
|
18095
|
+
accepted: "Accepted",
|
|
18096
|
+
subscribed: "Subscribed"
|
|
18097
|
+
};
|
|
18098
|
+
function ConnectedWelcomeInvitations({
|
|
18099
|
+
currentUserExtId,
|
|
18100
|
+
onBack,
|
|
18101
|
+
onNavigate
|
|
18102
|
+
}) {
|
|
18103
|
+
const session = react.useArbiSessionStore();
|
|
18104
|
+
const { confirm, notify: notify19, openDirectChat } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
18105
|
+
const remove = react.useDeleteContact();
|
|
18106
|
+
const resend = react.useInviteContacts();
|
|
18107
|
+
const listRef = react$1.useRef(null);
|
|
18108
|
+
const history = react.useReferralSummary(currentUserExtId);
|
|
18109
|
+
const { data: contacts = [] } = react.useContacts();
|
|
18110
|
+
const invitations = [...history.data?.invitations ?? []];
|
|
18111
|
+
if (history.data) {
|
|
18112
|
+
for (const contact of contacts) {
|
|
18113
|
+
if (contact.status !== "registered" || !contact.external_id || !contact.email || !contact.user?.external_id?.startsWith("usr-") || invitations.some(
|
|
18114
|
+
(row2) => row2.contact_id === contact.external_id || row2.email.toLowerCase() === contact.email.toLowerCase()
|
|
18115
|
+
))
|
|
18116
|
+
continue;
|
|
18117
|
+
invitations.push({
|
|
18118
|
+
contact_id: contact.external_id,
|
|
18119
|
+
user_id: contact.user.external_id,
|
|
18120
|
+
email: contact.email,
|
|
18121
|
+
name: [contact.user.given_name, contact.user.family_name].filter(Boolean).join(" ") || contact.email,
|
|
18122
|
+
status: "joined",
|
|
18123
|
+
expired: false,
|
|
18124
|
+
has_shared_workspace: false,
|
|
18125
|
+
potential_bonus: 0,
|
|
18126
|
+
earned_bonus: 0,
|
|
18127
|
+
created_at: contact.created_at
|
|
18128
|
+
});
|
|
17540
18129
|
}
|
|
17541
|
-
|
|
18130
|
+
}
|
|
18131
|
+
invitations.sort(
|
|
18132
|
+
(a, b) => Number(b.status === "pending") - Number(a.status === "pending") || Date.parse(b.created_at) - Date.parse(a.created_at)
|
|
18133
|
+
);
|
|
18134
|
+
const pending = invitations.filter((row2) => row2.status === "pending").length;
|
|
18135
|
+
const unavailable = !history.data;
|
|
18136
|
+
const currency = history.data?.currency;
|
|
18137
|
+
const money = (amount) => amount != null && currency ? chunkXJE7W42L_cjs.formatMoney(amount, currency) : "\u2014";
|
|
18138
|
+
const potential = invitations.reduce((sum, row2) => sum + row2.potential_bonus, 0);
|
|
18139
|
+
const earned = invitations.reduce((sum, row2) => sum + row2.earned_bonus, 0);
|
|
18140
|
+
const deleteInvitation = async (row2) => {
|
|
18141
|
+
const yes = await confirm({
|
|
18142
|
+
title: "Delete invitation",
|
|
18143
|
+
message: `Delete the invitation to ${row2.email}?${row2.has_shared_workspace ? "\n\nThis also cancels its pending workspace access." : ""}`
|
|
18144
|
+
});
|
|
18145
|
+
if (!yes) return;
|
|
18146
|
+
try {
|
|
18147
|
+
await remove.mutateAsync(row2.contact_id);
|
|
18148
|
+
await history.refetch();
|
|
18149
|
+
} catch {
|
|
18150
|
+
notify19("The invitation could not be deleted. Try again.", "error");
|
|
18151
|
+
}
|
|
18152
|
+
};
|
|
18153
|
+
const resendInvitation = async (row2) => {
|
|
18154
|
+
try {
|
|
18155
|
+
const response = await resend.mutateAsync([row2.email]);
|
|
18156
|
+
const result = chunkTXP2N3DC_cjs.summarizeContactInvites(response);
|
|
18157
|
+
notify19(result.message, result.failed ? "error" : "success");
|
|
18158
|
+
await history.refetch();
|
|
18159
|
+
} catch {
|
|
18160
|
+
notify19("The invitation could not be sent. Try again.", "error");
|
|
18161
|
+
}
|
|
18162
|
+
};
|
|
18163
|
+
const message = (row2) => {
|
|
18164
|
+
if (!row2.user_id) return;
|
|
18165
|
+
if (openDirectChat) openDirectChat(row2.user_id);
|
|
18166
|
+
else session.openDmTab(row2.user_id);
|
|
18167
|
+
onNavigate?.();
|
|
18168
|
+
};
|
|
18169
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "welcome-invitations", children: [
|
|
18170
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
18171
|
+
"They get ",
|
|
18172
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: money(history.data?.invitee_reward_amount) }),
|
|
18173
|
+
" when they accept and join. You earn ",
|
|
18174
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: money(history.data?.reward_amount) }),
|
|
18175
|
+
" when they subscribe to Pro."
|
|
18176
|
+
] }),
|
|
18177
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18178
|
+
ConnectedAddContacts,
|
|
18179
|
+
{
|
|
18180
|
+
keepFormOpen: true,
|
|
18181
|
+
labels: { cancel: "Close" },
|
|
18182
|
+
onClose: onBack,
|
|
18183
|
+
onSuccess: () => {
|
|
18184
|
+
void history.refetch().then(() => {
|
|
18185
|
+
if (listRef.current) listRef.current.scrollTop = 0;
|
|
18186
|
+
});
|
|
18187
|
+
}
|
|
18188
|
+
}
|
|
18189
|
+
),
|
|
18190
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "welcome-invitation-history", "aria-label": "Your invitations", children: [
|
|
18191
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "welcome-invitation-heading", children: [
|
|
18192
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: "Your invitations" }),
|
|
18193
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
18194
|
+
"Pending ",
|
|
18195
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: unavailable ? "\u2014" : pending })
|
|
18196
|
+
] })
|
|
18197
|
+
] }),
|
|
18198
|
+
history.isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Loading invitations\u2026" }) : history.isError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Invitation history couldn\u2019t load. Try again." }) : invitations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "No invitations yet." }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { ref: listRef, className: "welcome-invitation-list", children: invitations.map((row2) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
18199
|
+
row2.status === "pending" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-4 w-4 shrink-0 text-amber-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 shrink-0 text-green-600" }),
|
|
18200
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: row2.email, children: row2.name || row2.email }),
|
|
18201
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18202
|
+
"span",
|
|
18203
|
+
{
|
|
18204
|
+
className: "welcome-invitation-status",
|
|
18205
|
+
"data-status": row2.expired ? "expired" : row2.status,
|
|
18206
|
+
title: row2.status === "joined" ? "On ARBI without accepting your invitation; no referral bonus attributed." : void 0,
|
|
18207
|
+
children: [
|
|
18208
|
+
row2.expired ? "Expired" : titles[row2.status],
|
|
18209
|
+
row2.status === "subscribed" && row2.earned_bonus > 0 && /* @__PURE__ */ jsxRuntime.jsxs("strong", { className: "welcome-invitation-credited", children: [
|
|
18210
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
18211
|
+
money(row2.earned_bonus),
|
|
18212
|
+
" credited"
|
|
18213
|
+
] })
|
|
18214
|
+
]
|
|
18215
|
+
}
|
|
18216
|
+
),
|
|
18217
|
+
row2.status === "pending" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18218
|
+
row2.expired && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18219
|
+
ui.Button,
|
|
18220
|
+
{
|
|
18221
|
+
type: "button",
|
|
18222
|
+
size: "icon",
|
|
18223
|
+
variant: "ghost",
|
|
18224
|
+
title: "Resend invitation",
|
|
18225
|
+
"aria-label": `Resend invitation to ${row2.email}`,
|
|
18226
|
+
disabled: resend.isPending,
|
|
18227
|
+
onClick: () => void resendInvitation(row2),
|
|
18228
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "h-4 w-4" })
|
|
18229
|
+
}
|
|
18230
|
+
),
|
|
18231
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18232
|
+
ui.Button,
|
|
18233
|
+
{
|
|
18234
|
+
type: "button",
|
|
18235
|
+
size: "icon",
|
|
18236
|
+
variant: "ghost",
|
|
18237
|
+
title: "Delete invitation",
|
|
18238
|
+
"aria-label": `Delete invitation to ${row2.email}`,
|
|
18239
|
+
disabled: remove.isPending,
|
|
18240
|
+
onClick: () => void deleteInvitation(row2),
|
|
18241
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4" })
|
|
18242
|
+
}
|
|
18243
|
+
)
|
|
18244
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
18245
|
+
ui.Button,
|
|
18246
|
+
{
|
|
18247
|
+
type: "button",
|
|
18248
|
+
size: "icon",
|
|
18249
|
+
variant: "ghost",
|
|
18250
|
+
title: "Message",
|
|
18251
|
+
"aria-label": `Message ${row2.name || row2.email}`,
|
|
18252
|
+
onClick: () => message(row2),
|
|
18253
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "h-4 w-4" })
|
|
18254
|
+
}
|
|
18255
|
+
)
|
|
18256
|
+
] }, row2.contact_id)) }),
|
|
18257
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "welcome-invitation-totals", children: [
|
|
18258
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
18259
|
+
"Potential bonus ",
|
|
18260
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: unavailable ? "\u2014" : money(potential) })
|
|
18261
|
+
] }),
|
|
18262
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
18263
|
+
"Earned bonus ",
|
|
18264
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: unavailable ? "\u2014" : money(earned) })
|
|
18265
|
+
] })
|
|
18266
|
+
] })
|
|
18267
|
+
] })
|
|
18268
|
+
] });
|
|
17542
18269
|
}
|
|
17543
18270
|
function ConnectedWelcomeDialog({
|
|
17544
18271
|
open,
|
|
@@ -17546,7 +18273,8 @@ function ConnectedWelcomeDialog({
|
|
|
17546
18273
|
}) {
|
|
17547
18274
|
const currentUser = react.useArbiSession().user;
|
|
17548
18275
|
const { data: projects } = react.useProjects();
|
|
17549
|
-
const balance =
|
|
18276
|
+
const balance = chunkXJE7W42L_cjs.useRewardBalance();
|
|
18277
|
+
const { data: products } = react.useProducts({ enabled: open });
|
|
17550
18278
|
const [showPlans, setShowPlans] = react$1.useState(false);
|
|
17551
18279
|
const [showInvite, setShowInvite] = react$1.useState(false);
|
|
17552
18280
|
const [selectedProjectId, setSelectedProjectId] = react$1.useState(null);
|
|
@@ -17557,31 +18285,21 @@ function ConnectedWelcomeDialog({
|
|
|
17557
18285
|
const selectedProject = ownedProjects.find((p) => p.external_id === selectedProjectId) ?? ownedProjects[0];
|
|
17558
18286
|
if (!selectedProject) return null;
|
|
17559
18287
|
const handleOpenChange = (next) => {
|
|
17560
|
-
|
|
18288
|
+
{
|
|
17561
18289
|
setShowPlans(false);
|
|
17562
18290
|
setShowInvite(false);
|
|
17563
18291
|
}
|
|
17564
18292
|
setOpen(next);
|
|
17565
18293
|
};
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
}
|
|
17569
|
-
if (showInvite) {
|
|
17570
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkT73BHNQX_cjs.InviteContactsDialog, { open, onClose: () => handleOpenChange(false), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17571
|
-
ConnectedAddContacts,
|
|
17572
|
-
{
|
|
17573
|
-
onClose: () => handleOpenChange(false),
|
|
17574
|
-
rewardAmount: chunkGEZB3OEC_cjs.formatMoney(REFERRAL_OFFER.amount, REFERRAL_OFFER.currency)
|
|
17575
|
-
}
|
|
17576
|
-
) });
|
|
17577
|
-
}
|
|
18294
|
+
const { monthly } = chunkXJE7W42L_cjs.findProPrices(products);
|
|
18295
|
+
const monthlyExVat = chunkXJE7W42L_cjs.packPrice(monthly)?.amount_ex_vat ?? monthly?.amount_ex_vat;
|
|
17578
18296
|
const firstName = currentUser?.given_name;
|
|
17579
18297
|
const hasBalance = balance !== null;
|
|
17580
|
-
const quotaItems =
|
|
17581
|
-
const resetTs =
|
|
17582
|
-
const aiUsageHint = resetTs ? `resets ${
|
|
18298
|
+
const quotaItems = chunkXJE7W42L_cjs.getQuotaItems(selectedProject.quotas);
|
|
18299
|
+
const resetTs = chunkXJE7W42L_cjs.aiUsageResetTimestamp(selectedProject);
|
|
18300
|
+
const aiUsageHint = resetTs ? `resets ${chunkXJE7W42L_cjs.formatResetDate(resetTs)}` : void 0;
|
|
17583
18301
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17584
|
-
|
|
18302
|
+
chunkTBPCG2PV_cjs.WelcomeDialog,
|
|
17585
18303
|
{
|
|
17586
18304
|
open,
|
|
17587
18305
|
onClose: () => handleOpenChange(false),
|
|
@@ -17596,7 +18314,7 @@ function ConnectedWelcomeDialog({
|
|
|
17596
18314
|
onChange: setSelectedProjectId
|
|
17597
18315
|
}
|
|
17598
18316
|
),
|
|
17599
|
-
planBadge: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18317
|
+
planBadge: /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PlanBadge, { ...chunkXJE7W42L_cjs.planBadgeView(selectedProject), size: "md" }),
|
|
17600
18318
|
quotas: quotaItems.map((q) => ({
|
|
17601
18319
|
key: q.key,
|
|
17602
18320
|
icon: q.icon,
|
|
@@ -17606,9 +18324,37 @@ function ConnectedWelcomeDialog({
|
|
|
17606
18324
|
hint: q.key === "ai-usage" ? aiUsageHint : void 0
|
|
17607
18325
|
})),
|
|
17608
18326
|
onSeePlans: () => setShowPlans(true),
|
|
17609
|
-
|
|
18327
|
+
upgradeStep: {
|
|
18328
|
+
active: showPlans,
|
|
18329
|
+
onBack: () => setShowPlans(false),
|
|
18330
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18331
|
+
SubscriptionPlans,
|
|
18332
|
+
{
|
|
18333
|
+
projectExtId: selectedProject.external_id,
|
|
18334
|
+
dailyCapPerUser: selectedProject.daily_cap_per_user,
|
|
18335
|
+
currentQuotas: selectedProject.quotas,
|
|
18336
|
+
onDismiss: () => handleOpenChange(false)
|
|
18337
|
+
},
|
|
18338
|
+
selectedProject.external_id
|
|
18339
|
+
)
|
|
18340
|
+
},
|
|
18341
|
+
proMonthlyPriceLabel: monthlyExVat != null ? chunkXJE7W42L_cjs.formatMoney(monthlyExVat, monthly?.currency ?? "gbp") : void 0,
|
|
18342
|
+
referralOfferLabel: products?.[0]?.inviter_reward_amount != null ? chunkXJE7W42L_cjs.formatMoney(products[0].inviter_reward_amount, products[0].reward_currency) : "\u2014",
|
|
17610
18343
|
onInvite: () => setShowInvite(true),
|
|
17611
|
-
|
|
18344
|
+
inviteStep: {
|
|
18345
|
+
active: showInvite,
|
|
18346
|
+
onBack: () => setShowInvite(false),
|
|
18347
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18348
|
+
ConnectedWelcomeInvitations,
|
|
18349
|
+
{
|
|
18350
|
+
currentUserExtId: currentUser?.external_id ?? "",
|
|
18351
|
+
onBack: () => setShowInvite(false),
|
|
18352
|
+
onNavigate: () => handleOpenChange(false)
|
|
18353
|
+
}
|
|
18354
|
+
)
|
|
18355
|
+
},
|
|
18356
|
+
rewardBalanceLabel: hasBalance ? chunkXJE7W42L_cjs.formatMoney(balance.amount, balance.currency) : void 0,
|
|
18357
|
+
labels: { emptyBalance: chunkXJE7W42L_cjs.formatMoney(0, products?.[0]?.reward_currency ?? monthly?.currency) }
|
|
17612
18358
|
}
|
|
17613
18359
|
);
|
|
17614
18360
|
}
|
|
@@ -17671,7 +18417,7 @@ function WorkspaceCardsView({
|
|
|
17671
18417
|
createDisabledReason,
|
|
17672
18418
|
workspaceState
|
|
17673
18419
|
}) {
|
|
17674
|
-
const { stripeEnabled } =
|
|
18420
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
17675
18421
|
const { hrefFor: hrefFor2 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
17676
18422
|
const workspaceLabel = ui.getEntityLabel("WORKSPACE");
|
|
17677
18423
|
const projectLabel = ui.getEntityLabel("PROJECT").toLowerCase();
|
|
@@ -17691,7 +18437,7 @@ function WorkspaceCardsView({
|
|
|
17691
18437
|
}
|
|
17692
18438
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkCMGNRMPA_cjs.WorkspaceList, { testId: "workspace-cards-list", children: groups.map((group) => {
|
|
17693
18439
|
const project = projects.find((p) => p.external_id === group.projectExtId);
|
|
17694
|
-
const { breakdown, readout } =
|
|
18440
|
+
const { breakdown, readout } = chunkXJE7W42L_cjs.projectGroupBilling(project, {
|
|
17695
18441
|
isOwned: group.isOwned,
|
|
17696
18442
|
stripeEnabled
|
|
17697
18443
|
});
|
|
@@ -17822,8 +18568,8 @@ function useConnectedWorkspaceList({
|
|
|
17822
18568
|
const { data: liveProjects } = react.useProjects({ enabled: !demoSeed });
|
|
17823
18569
|
const projects = demoSeed ? void 0 : liveProjects;
|
|
17824
18570
|
const { data: settings } = react.useUserSettings();
|
|
17825
|
-
const allowed = react.
|
|
17826
|
-
const
|
|
18571
|
+
const allowed = react.useCanCreateWorkspaces();
|
|
18572
|
+
const canCreateWorkspaces = demoSeed ? true : allowed;
|
|
17827
18573
|
const deleteWorkspaces = react.useDeleteWorkspaces();
|
|
17828
18574
|
const workspaces = react$1.useMemo(
|
|
17829
18575
|
() => (demoSeed ?? workspacesQuery.data ?? []).filter(chunkKWJW5TMH_cjs.isListedWorkspace),
|
|
@@ -17854,7 +18600,7 @@ function useConnectedWorkspaceList({
|
|
|
17854
18600
|
[selfId, pinned]
|
|
17855
18601
|
);
|
|
17856
18602
|
const filtered = react$1.useMemo(
|
|
17857
|
-
() =>
|
|
18603
|
+
() => chunkTBPCG2PV_cjs.applyTriStateFilters(workspaces, filterMap, attributesOf),
|
|
17858
18604
|
[workspaces, filterMap, attributesOf]
|
|
17859
18605
|
);
|
|
17860
18606
|
const groups = react$1.useMemo(
|
|
@@ -17907,7 +18653,7 @@ function useConnectedWorkspaceList({
|
|
|
17907
18653
|
shownCount: filtered.length,
|
|
17908
18654
|
isLoading: demoSeed ? false : workspacesQuery.isLoading,
|
|
17909
18655
|
error: demoSeed ? null : workspacesQuery.error,
|
|
17910
|
-
|
|
18656
|
+
canCreateWorkspaces,
|
|
17911
18657
|
filters: filterMap,
|
|
17912
18658
|
setFilters,
|
|
17913
18659
|
isCollapsed,
|
|
@@ -17920,7 +18666,7 @@ function useConnectedWorkspaceList({
|
|
|
17920
18666
|
};
|
|
17921
18667
|
}
|
|
17922
18668
|
var WorkspaceTableView = react$1.lazy(
|
|
17923
|
-
() => import('../WorkspaceTableView-
|
|
18669
|
+
() => import('../WorkspaceTableView-7BMZ2O3Y.cjs').then((m) => ({ default: m.WorkspaceTableView }))
|
|
17924
18670
|
);
|
|
17925
18671
|
var WORKSPACES_TAB_ID = "workspaces";
|
|
17926
18672
|
var renderMember = (user, size) => /* @__PURE__ */ jsxRuntime.jsx(chunkQMIHLJMH_cjs.ConnectedUserEntity, { user, size, variant: "icon" });
|
|
@@ -17969,7 +18715,7 @@ function ConnectedWorkspaceList({
|
|
|
17969
18715
|
if (select) select();
|
|
17970
18716
|
else void openWorkspace(workspace.external_id, { name: workspace.name });
|
|
17971
18717
|
};
|
|
17972
|
-
const createDisabledReason = list.
|
|
18718
|
+
const createDisabledReason = list.canCreateWorkspaces === false ? react.PROJECT_CREATION_DENIED_REASON : void 0;
|
|
17973
18719
|
if (temporaryOnly && workspacesQuery.isSuccess && workspacesQuery.data?.length === 0) {
|
|
17974
18720
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17975
18721
|
NoWorkspaceAccess,
|
|
@@ -17980,7 +18726,7 @@ function ConnectedWorkspaceList({
|
|
|
17980
18726
|
}
|
|
17981
18727
|
);
|
|
17982
18728
|
}
|
|
17983
|
-
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18729
|
+
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, { message: "Loading workspaces..." });
|
|
17984
18730
|
if (list.error) {
|
|
17985
18731
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17986
18732
|
chunkH7PHOTX2_cjs.HomeLoadError,
|
|
@@ -18053,7 +18799,7 @@ function ConnectedWorkspaceList({
|
|
|
18053
18799
|
workspaceState
|
|
18054
18800
|
}
|
|
18055
18801
|
) })
|
|
18056
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18802
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkH7PHOTX2_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18057
18803
|
WorkspaceTableView,
|
|
18058
18804
|
{
|
|
18059
18805
|
list,
|
|
@@ -18096,11 +18842,12 @@ function ConnectedProjectsPanel({
|
|
|
18096
18842
|
[openLocally]
|
|
18097
18843
|
);
|
|
18098
18844
|
const { data: projects } = react.useProjects();
|
|
18099
|
-
const
|
|
18845
|
+
const denial = react.useProjectCreationDenial();
|
|
18100
18846
|
const { userId } = chunkJR2YSBD5_cjs.useConnectedWorkspace();
|
|
18101
|
-
const { stripeEnabled } =
|
|
18847
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
18102
18848
|
const billingPortal = useOpenBillingPortal();
|
|
18103
18849
|
const [newProjectOpen, setNewProjectOpen] = react$1.useState(false);
|
|
18850
|
+
const [upgradeOpen, setUpgradeOpen] = react$1.useState(false);
|
|
18104
18851
|
useAutoRefreshPendingProjects();
|
|
18105
18852
|
const ownedCount = (projects ?? []).filter((p) => p.created_by === userId).length;
|
|
18106
18853
|
const activeProjectId = tabs.activeProjectId && tabs.openProjectIds.includes(tabs.activeProjectId) ? tabs.activeProjectId : null;
|
|
@@ -18125,22 +18872,25 @@ function ConnectedProjectsPanel({
|
|
|
18125
18872
|
[ownedCount, tabs, projects]
|
|
18126
18873
|
);
|
|
18127
18874
|
const paidProject = projects?.find(isPaid);
|
|
18128
|
-
const
|
|
18129
|
-
|
|
18875
|
+
const personalProject = projects?.find((p) => p.is_personal && p.created_by === userId);
|
|
18876
|
+
const upgradeFirst = denial?.refusal === "pro_required" && !!personalProject;
|
|
18877
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PanelFrame, { className, testId: "projects-panel", children: [
|
|
18878
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18130
18879
|
chunkSJSGSHIT_cjs.TabHeader,
|
|
18131
18880
|
{
|
|
18132
18881
|
tabs: headerTabs,
|
|
18133
18882
|
activeTabId: activeProjectId ?? PROJECTS_BASE_TAB_ID,
|
|
18134
18883
|
onTabChange: (id) => tabs.onSelect(id === PROJECTS_BASE_TAB_ID ? null : id),
|
|
18135
18884
|
afterTabs: (isCompact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
18136
|
-
|
|
18885
|
+
chunkTBPCG2PV_cjs.PanelAddButton,
|
|
18137
18886
|
{
|
|
18138
18887
|
label: `New ${ui.entityNoun("PROJECT")}`,
|
|
18139
|
-
onClick: () => setNewProjectOpen(true),
|
|
18888
|
+
onClick: () => upgradeFirst ? setUpgradeOpen(true) : setNewProjectOpen(true),
|
|
18140
18889
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" }),
|
|
18141
18890
|
isCompact,
|
|
18142
18891
|
testId: "new-project-button",
|
|
18143
|
-
|
|
18892
|
+
tooltip: upgradeFirst ? denial?.reason : void 0,
|
|
18893
|
+
disabledReason: upgradeFirst ? void 0 : denial?.reason
|
|
18144
18894
|
}
|
|
18145
18895
|
),
|
|
18146
18896
|
rightContent: headerRight,
|
|
@@ -18148,15 +18898,15 @@ function ConnectedProjectsPanel({
|
|
|
18148
18898
|
compactBreakpoint: 360
|
|
18149
18899
|
}
|
|
18150
18900
|
) }),
|
|
18151
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18901
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrameBody, { children: activeProjectId ? /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelScroll, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18152
18902
|
ProjectDetail,
|
|
18153
18903
|
{
|
|
18154
18904
|
projectExtId: activeProjectId,
|
|
18155
18905
|
storage: /* @__PURE__ */ jsxRuntime.jsx(ConnectedProjectStorage, { projectExtId: activeProjectId })
|
|
18156
18906
|
}
|
|
18157
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18907
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PanelScroll, { variant: "padded", children: [
|
|
18158
18908
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectsTable, {}),
|
|
18159
|
-
stripeEnabled && paidProject && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18909
|
+
stripeEnabled && paidProject && /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18160
18910
|
ui.Button,
|
|
18161
18911
|
{
|
|
18162
18912
|
onClick: () => billingPortal.open(paidProject.external_id),
|
|
@@ -18173,6 +18923,14 @@ function ConnectedProjectsPanel({
|
|
|
18173
18923
|
/* @__PURE__ */ jsxRuntime.jsx(SharedProjects, {}),
|
|
18174
18924
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedDeploymentStorage, {})
|
|
18175
18925
|
] }) }),
|
|
18926
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18927
|
+
ChangePlanDialog,
|
|
18928
|
+
{
|
|
18929
|
+
project: upgradeFirst ? personalProject ?? null : null,
|
|
18930
|
+
open: upgradeOpen && upgradeFirst,
|
|
18931
|
+
onOpenChange: setUpgradeOpen
|
|
18932
|
+
}
|
|
18933
|
+
),
|
|
18176
18934
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18177
18935
|
NewProjectFlow,
|
|
18178
18936
|
{
|
|
@@ -18243,7 +19001,7 @@ function ConnectedProjectsListPage({
|
|
|
18243
19001
|
};
|
|
18244
19002
|
const { openProject } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
18245
19003
|
const [search, setSearch] = react$1.useState("");
|
|
18246
|
-
const { projects, isLoading } =
|
|
19004
|
+
const { projects, isLoading } = chunkU7KB42OQ_cjs.useProjectSummaries();
|
|
18247
19005
|
const rows = react$1.useMemo(() => {
|
|
18248
19006
|
const q = search.trim().toLowerCase();
|
|
18249
19007
|
if (!q) return projects;
|
|
@@ -18314,7 +19072,7 @@ function ConnectedProjectsListPage({
|
|
|
18314
19072
|
}
|
|
18315
19073
|
),
|
|
18316
19074
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18317
|
-
|
|
19075
|
+
chunkKSDTK66A_cjs.Toolbar,
|
|
18318
19076
|
{
|
|
18319
19077
|
search,
|
|
18320
19078
|
onSearch: setSearch,
|
|
@@ -18376,7 +19134,7 @@ function ProjectDetailsForm({
|
|
|
18376
19134
|
const labels = { ...DEFAULT_PROJECT_DETAILS_LABELS, ...given };
|
|
18377
19135
|
const { notify: notify19 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
18378
19136
|
const update = react.useUpdateProjectFields();
|
|
18379
|
-
const workspace =
|
|
19137
|
+
const workspace = chunkU7KB42OQ_cjs.primaryProjectWorkspace(project);
|
|
18380
19138
|
const { data: members = [] } = react.useWorkspaceUsers(workspace?.id);
|
|
18381
19139
|
const people = members.filter((m) => !m.user.external_id.startsWith("agt-"));
|
|
18382
19140
|
const currency = project.budget?.currency ?? "GBP";
|
|
@@ -19438,11 +20196,11 @@ function ConnectedProjectPage({
|
|
|
19438
20196
|
figures: { ...DEFAULT_PROJECT_PAGE_LABELS.figures, ...given?.figures },
|
|
19439
20197
|
threads: { ...DEFAULT_PROJECT_PAGE_LABELS.threads, ...given?.threads }
|
|
19440
20198
|
};
|
|
19441
|
-
const { project, usage, isLoading } =
|
|
20199
|
+
const { project, usage, isLoading } = chunkU7KB42OQ_cjs.useProjectSummary(projectId);
|
|
19442
20200
|
const { workspaceId } = chunkJR2YSBD5_cjs.useConnectedWorkspace();
|
|
19443
20201
|
const { notify: notify19 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
19444
20202
|
const selectWorkspace = chunkMXGXKUSW_cjs.useSelectWorkspace();
|
|
19445
|
-
const workspace = project ?
|
|
20203
|
+
const workspace = project ? chunkU7KB42OQ_cjs.primaryProjectWorkspace(project) : void 0;
|
|
19446
20204
|
const open = !!workspace && workspace.id === workspaceId;
|
|
19447
20205
|
react$1.useEffect(() => {
|
|
19448
20206
|
if (!workspace || workspace.id === workspaceId) return;
|
|
@@ -21826,7 +22584,7 @@ function ConnectedMessengerThread({
|
|
|
21826
22584
|
const activeIsSelf = !!activePeer && activePeer.external_id === meId;
|
|
21827
22585
|
const groupTitle = active?.title ?? null;
|
|
21828
22586
|
const presence = activePeer ? host.presenceOf?.(activePeer.external_id) : void 0;
|
|
21829
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22587
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PanelFrame, { testId, className, children: [
|
|
21830
22588
|
children,
|
|
21831
22589
|
groupChat ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
21832
22590
|
chunkMOIZ2R5X_cjs.DmThreadHeader,
|
|
@@ -21876,7 +22634,7 @@ function ConnectedMessengerThread({
|
|
|
21876
22634
|
groupChat.external_id
|
|
21877
22635
|
) : null,
|
|
21878
22636
|
picker.element,
|
|
21879
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22637
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrameBody, { className: "flex flex-col overflow-visible", children: active ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedChatThread, { chat: active.chat, peer: activePeer, host }, activeId) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: isLoading ? "Loading conversation\u2026" : "This conversation is no longer available." }) })
|
|
21880
22638
|
] });
|
|
21881
22639
|
}
|
|
21882
22640
|
function ConnectedMessenger({
|
|
@@ -21898,7 +22656,7 @@ function ConnectedMessenger({
|
|
|
21898
22656
|
testId: "dm-messenger"
|
|
21899
22657
|
}
|
|
21900
22658
|
);
|
|
21901
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrame, { testId: "dm-messenger", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21902
22660
|
ConnectedMessengerList,
|
|
21903
22661
|
{
|
|
21904
22662
|
activeId: null,
|
|
@@ -22114,7 +22872,7 @@ function ConnectedContactsPanel({
|
|
|
22114
22872
|
];
|
|
22115
22873
|
}, [contactCount, hasActiveFilters, tabActions, dmHeaderTabs]);
|
|
22116
22874
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("flex flex-col h-full", className), children: [
|
|
22117
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22875
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
22118
22876
|
chunkSJSGSHIT_cjs.TabHeader,
|
|
22119
22877
|
{
|
|
22120
22878
|
tabs,
|
|
@@ -22149,7 +22907,7 @@ function ConnectedContactsPanel({
|
|
|
22149
22907
|
function ConnectedConfigForm({ availableModels, ...rest }) {
|
|
22150
22908
|
const hasModels = !!availableModels && availableModels.length > 0;
|
|
22151
22909
|
const renderModelSelect = react$1.useCallback(
|
|
22152
|
-
({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22910
|
+
({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedModelSelector, { value, onValueChange: onChange, className: "w-full" }),
|
|
22153
22911
|
[]
|
|
22154
22912
|
);
|
|
22155
22913
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkOD6NGGL3_cjs.ConfigForm, { ...rest, renderModelSelect: hasModels ? renderModelSelect : void 0 });
|
|
@@ -22336,6 +23094,7 @@ function ConnectedInviteContactsDialog({
|
|
|
22336
23094
|
onOpenChange
|
|
22337
23095
|
}) {
|
|
22338
23096
|
const { data: userSettings } = react.useUserSettings();
|
|
23097
|
+
const offer = useReferralOffer(open);
|
|
22339
23098
|
const isDeveloper = userSettings?.developer === true;
|
|
22340
23099
|
const [pendingAction, setPendingAction] = react.useTransientView(
|
|
22341
23100
|
PENDING_ACTION_VIEW,
|
|
@@ -22380,7 +23139,7 @@ function ConnectedInviteContactsDialog({
|
|
|
22380
23139
|
ConnectedAddContacts,
|
|
22381
23140
|
{
|
|
22382
23141
|
onClose: handleClose,
|
|
22383
|
-
rewardAmount:
|
|
23142
|
+
rewardAmount: offer ? chunkXJE7W42L_cjs.formatMoney(offer.amount, offer.currency) : void 0
|
|
22384
23143
|
}
|
|
22385
23144
|
),
|
|
22386
23145
|
isDeveloper && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -23221,7 +23980,7 @@ function createBuiltinActions(environment, session) {
|
|
|
23221
23980
|
category: "Workspace",
|
|
23222
23981
|
icon: "Plus",
|
|
23223
23982
|
keywords: ["new workspace", "add workspace"],
|
|
23224
|
-
available: ({ canCreateProjects }) => canCreateProjects !== false,
|
|
23983
|
+
available: ({ canCreateProjects, canCreateWorkspaces }) => (canCreateWorkspaces ?? canCreateProjects) !== false,
|
|
23225
23984
|
run: () => openDialog2("createWorkspace")
|
|
23226
23985
|
},
|
|
23227
23986
|
{
|
|
@@ -23556,6 +24315,7 @@ function ConnectedCommandPalette({
|
|
|
23556
24315
|
role,
|
|
23557
24316
|
isTemporaryAccess: react.useArbiSession().user?.temporary_access_only === true,
|
|
23558
24317
|
canCreateProjects: react.useCanCreateProjects(),
|
|
24318
|
+
canCreateWorkspaces: react.useCanCreateWorkspaces(),
|
|
23559
24319
|
isFeatureOn: react.useFeatureCheck()
|
|
23560
24320
|
};
|
|
23561
24321
|
const { ask, search } = useWorkspaceAsk();
|
|
@@ -23752,7 +24512,7 @@ function ConnectedRemoteControlConsent() {
|
|
|
23752
24512
|
}
|
|
23753
24513
|
function ConsentPrompt() {
|
|
23754
24514
|
const pending = react.useRemoteControl((s) => s.pending);
|
|
23755
|
-
const remote =
|
|
24515
|
+
const remote = chunkPDDYAY4Z_cjs.useRemoteControlActions();
|
|
23756
24516
|
const onceRef = react$1.useRef(null);
|
|
23757
24517
|
chunkORELHENJ_cjs.useMountedSurface("consent");
|
|
23758
24518
|
const handleOpenChange = (next) => {
|
|
@@ -23845,7 +24605,7 @@ function Indicator() {
|
|
|
23845
24605
|
const enabled = react.useRemoteControl((s) => s.enabled);
|
|
23846
24606
|
const sharing = react.useRemoteControl((s) => !!s.sharing);
|
|
23847
24607
|
const controllingAgent = react.useRemoteControl((s) => s.controllingAgent);
|
|
23848
|
-
const remote =
|
|
24608
|
+
const remote = chunkPDDYAY4Z_cjs.useRemoteControlActions();
|
|
23849
24609
|
if (!enabled && !controllingAgent) return null;
|
|
23850
24610
|
const isActive = controllingAgent !== null;
|
|
23851
24611
|
const label = sharing ? controllingAgent ? `${controllingAgent.name} \xB7 screen sharing and control on` : "Sharing screen \xB7 remote control on" : isActive ? `${controllingAgent.name} is controlling your screen` : "Remote control on";
|
|
@@ -24412,7 +25172,7 @@ function useDocumentFilters({
|
|
|
24412
25172
|
[documentFilters]
|
|
24413
25173
|
);
|
|
24414
25174
|
const baseFilteredDocuments = react$1.useMemo(
|
|
24415
|
-
() =>
|
|
25175
|
+
() => chunkTBPCG2PV_cjs.applyInvertedIndexFilter(documents, documentFilters, invertedIndex, getDocId),
|
|
24416
25176
|
[documents, documentFilters, invertedIndex]
|
|
24417
25177
|
);
|
|
24418
25178
|
const filteredDocuments = react$1.useMemo(() => {
|
|
@@ -27736,7 +28496,7 @@ function ConnectedSecureMailClaimPage({
|
|
|
27736
28496
|
}) {
|
|
27737
28497
|
const authenticated = react.useArbiSession().status === "signed-in";
|
|
27738
28498
|
const { openMail } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
27739
|
-
const { loading } =
|
|
28499
|
+
const { loading } = chunkPDDYAY4Z_cjs.useAuthPages();
|
|
27740
28500
|
const claim = react.useClaimSecureMail();
|
|
27741
28501
|
const [, setFirstLoginWorkspaces] = react.useTransientView(FIRST_LOGIN_WORKSPACES_VIEW, null);
|
|
27742
28502
|
const [failure, setFailure] = react$1.useState(null);
|
|
@@ -27776,7 +28536,7 @@ function ConnectedSecureMailClaimPage({
|
|
|
27776
28536
|
}
|
|
27777
28537
|
})();
|
|
27778
28538
|
}, [authenticated, claimId, key]);
|
|
27779
|
-
if (!error) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loading ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
28539
|
+
if (!error) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loading ?? /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, { variant: "splash" }) });
|
|
27780
28540
|
return /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex min-h-screen items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "w-full max-w-md rounded-lg border border-border bg-card p-6", children: [
|
|
27781
28541
|
/* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "mb-4 text-sm text-destructive", children: error }),
|
|
27782
28542
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33906,7 +34666,7 @@ function useBatchCompleteToasts() {
|
|
|
33906
34666
|
}
|
|
33907
34667
|
}, AI_FIELDS_NOTICE_WINDOW_MS);
|
|
33908
34668
|
} else if (message.batch_type === "entity_extract") {
|
|
33909
|
-
say(`${
|
|
34669
|
+
say(`${chunkKSDTK66A_cjs.entitiesPhrase()} extracted from ${chunkKSDTK66A_cjs.documentCount(docIds.length)}`, "success", {
|
|
33910
34670
|
...openTags && { action: { label: "View", onClick: openTags } }
|
|
33911
34671
|
});
|
|
33912
34672
|
} else if (message.batch_type === "upload") {
|
|
@@ -34718,13 +35478,13 @@ var TABLET_TABLE_BELOW = 860;
|
|
|
34718
35478
|
var TABLET_VIEWPORT_BELOW = 1100;
|
|
34719
35479
|
var NO_CONVERSATION_DOCUMENTS2 = [];
|
|
34720
35480
|
var DocumentReviewCard = react$1.lazy(
|
|
34721
|
-
() => import('../DocumentReviewCard-
|
|
35481
|
+
() => import('../DocumentReviewCard-2VI5OOLE.cjs').then((module) => ({ default: module.DocumentReviewCard }))
|
|
34722
35482
|
);
|
|
34723
35483
|
var FilesViewerDialog = react$1.lazy(
|
|
34724
|
-
() => import('../FilesViewerDialog-
|
|
35484
|
+
() => import('../FilesViewerDialog-77YTFIX3.cjs').then((module) => ({ default: module.FilesViewerDialog }))
|
|
34725
35485
|
);
|
|
34726
35486
|
function defaultReviewCard(props) {
|
|
34727
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35487
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, { message: "Loading document viewer..." }), children: /* @__PURE__ */ jsxRuntime.jsx(DocumentReviewCard, { ...props }, `navigator-${props.currentDocument.external_id}`) });
|
|
34728
35488
|
}
|
|
34729
35489
|
function ConnectedFilesPage({
|
|
34730
35490
|
isModal = false,
|
|
@@ -35302,7 +36062,7 @@ function ConnectedFilesPage({
|
|
|
35302
36062
|
viewMode === "grid" ? (
|
|
35303
36063
|
// ‹ n / N › over the table's displayed rows; a step opens the document.
|
|
35304
36064
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35305
|
-
|
|
36065
|
+
chunkKSDTK66A_cjs.GridRowNavigator,
|
|
35306
36066
|
{
|
|
35307
36067
|
gridApi,
|
|
35308
36068
|
selectedId: viewingDocumentId ?? selectedDocumentIds[0] ?? null,
|
|
@@ -36495,7 +37255,7 @@ function DeveloperFooter({
|
|
|
36495
37255
|
}, [configVersions, configToLoad, parentMessage?.config_ext_id]);
|
|
36496
37256
|
const hasLoadedConfig = !!loadedConfigId && loadedConfigId !== "default";
|
|
36497
37257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36498
|
-
|
|
37258
|
+
chunkTBPCG2PV_cjs.ConfigSwitcherBar,
|
|
36499
37259
|
{
|
|
36500
37260
|
options,
|
|
36501
37261
|
value: loadedConfigId || "default",
|
|
@@ -36764,8 +37524,8 @@ function ConnectedDeveloperConfig({ modeSwitcher } = {}) {
|
|
|
36764
37524
|
handleDeleteConfig,
|
|
36765
37525
|
handleLoadConfig
|
|
36766
37526
|
} = useDeveloperConfig();
|
|
36767
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36768
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
37527
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkTBPCG2PV_cjs.PanelFrame, { testId: "developer-config", children: [
|
|
37528
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36769
37529
|
chunkSJSGSHIT_cjs.TabHeader,
|
|
36770
37530
|
{
|
|
36771
37531
|
tabs: [{ id: "config", label: "Developer Config", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code2, { className: "size-4" }) }],
|
|
@@ -36775,7 +37535,7 @@ function ConnectedDeveloperConfig({ modeSwitcher } = {}) {
|
|
|
36775
37535
|
rightContent: modeSwitcher
|
|
36776
37536
|
}
|
|
36777
37537
|
) }),
|
|
36778
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
37538
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrameBody, { className: "overflow-auto p-4", children: configSchema ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
36779
37539
|
ConnectedConfigForm,
|
|
36780
37540
|
{
|
|
36781
37541
|
schema: configSchema,
|
|
@@ -36783,7 +37543,7 @@ function ConnectedDeveloperConfig({ modeSwitcher } = {}) {
|
|
|
36783
37543
|
onChange: handleConfigChange,
|
|
36784
37544
|
availableModels: availableModels?.models
|
|
36785
37545
|
}
|
|
36786
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
37546
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelNote, { children: "Loading configuration schema..." }) }),
|
|
36787
37547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36788
37548
|
DeveloperFooter,
|
|
36789
37549
|
{
|
|
@@ -37329,7 +38089,7 @@ function ConnectedAccountCluster({
|
|
|
37329
38089
|
}
|
|
37330
38090
|
);
|
|
37331
38091
|
}
|
|
37332
|
-
var gbp3 = (pence) =>
|
|
38092
|
+
var gbp3 = (pence) => chunkXJE7W42L_cjs.formatMoney(pence, "gbp");
|
|
37333
38093
|
function addonArrivalMessage(addons, added) {
|
|
37334
38094
|
const parts = [];
|
|
37335
38095
|
if (added.ai > 0) parts.push(`${react.formatGbp(added.ai * addons.block_ai_gbp)} of AI usage`);
|
|
@@ -37736,10 +38496,10 @@ var FreshChatModel = () => (useFreshChatModel(), null);
|
|
|
37736
38496
|
var WorkspaceOpenMetrics = ({ measure }) => (useWorkspaceOpenMetrics(measure), null);
|
|
37737
38497
|
var Prefetch = ({ loaders }) => (usePrefetchChunks(loaders), null);
|
|
37738
38498
|
function GuidedRuns() {
|
|
37739
|
-
|
|
38499
|
+
chunkPDDYAY4Z_cjs.useRemoteControlSessionReset();
|
|
37740
38500
|
const { cursorMark } = chunkORELHENJ_cjs.useGuidedRuns();
|
|
37741
38501
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
37742
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
38502
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.GuidedCursor, { markSrc: cursorMark }),
|
|
37743
38503
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedRemoteControlConsent, {})
|
|
37744
38504
|
] });
|
|
37745
38505
|
}
|
|
@@ -37750,7 +38510,7 @@ function ConnectedAppRuntime({
|
|
|
37750
38510
|
prefetch
|
|
37751
38511
|
}) {
|
|
37752
38512
|
const on = (effect) => effects[effect] !== false;
|
|
37753
|
-
const { stripeEnabled } =
|
|
38513
|
+
const { stripeEnabled } = chunkXJE7W42L_cjs.useBillingSupport();
|
|
37754
38514
|
const welcomeDialog = on("welcomeDialog") && stripeEnabled;
|
|
37755
38515
|
const resolveFirstLogin = () => {
|
|
37756
38516
|
if (welcomeDialog) skipWelcomeDialogThisSession();
|
|
@@ -37773,7 +38533,7 @@ function ConnectedAppRuntime({
|
|
|
37773
38533
|
on("pageTransition") && /* @__PURE__ */ jsxRuntime.jsx(PageTransition, {}),
|
|
37774
38534
|
on("freshChatModel") && /* @__PURE__ */ jsxRuntime.jsx(FreshChatModel, {}),
|
|
37775
38535
|
on("workspaceOpenMetrics") && measure && /* @__PURE__ */ jsxRuntime.jsx(WorkspaceOpenMetrics, { measure }),
|
|
37776
|
-
on("prefetch") && /* @__PURE__ */ jsxRuntime.jsx(Prefetch, { loaders: [...prefetch ?? [], ...
|
|
38536
|
+
on("prefetch") && /* @__PURE__ */ jsxRuntime.jsx(Prefetch, { loaders: [...prefetch ?? [], ...chunkKSDTK66A_cjs.KIT_CHUNK_LOADERS] }),
|
|
37777
38537
|
on("guidedRuns") && /* @__PURE__ */ jsxRuntime.jsx(GuidedRuns, {})
|
|
37778
38538
|
] });
|
|
37779
38539
|
}
|
|
@@ -38238,7 +38998,7 @@ async function renderAnnotatedScreenshot(image, marks, text) {
|
|
|
38238
38998
|
)
|
|
38239
38999
|
);
|
|
38240
39000
|
}
|
|
38241
|
-
return
|
|
39001
|
+
return chunkPDDYAY4Z_cjs.canvasToBlob(canvas);
|
|
38242
39002
|
}
|
|
38243
39003
|
function ReportProblemDialog({
|
|
38244
39004
|
open,
|
|
@@ -38532,7 +39292,7 @@ function ReportProblemDialog({
|
|
|
38532
39292
|
hidden: ticketId !== null,
|
|
38533
39293
|
children: [
|
|
38534
39294
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "No screenshot attached." }),
|
|
38535
|
-
|
|
39295
|
+
chunkPDDYAY4Z_cjs.canCaptureScreen() ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "sm", variant: "outline", onClick: onRetake, "data-testid": "report-retake", children: [
|
|
38536
39296
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { className: "mr-1 size-4" }),
|
|
38537
39297
|
" Take a screenshot"
|
|
38538
39298
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex cursor-pointer items-center gap-1 font-medium text-primary", children: [
|
|
@@ -38596,10 +39356,10 @@ function useReportProblem(options = {}) {
|
|
|
38596
39356
|
setPhase("capturing");
|
|
38597
39357
|
await new Promise((resolve) => window.setTimeout(resolve, 200));
|
|
38598
39358
|
try {
|
|
38599
|
-
setFrame(await
|
|
39359
|
+
setFrame(await chunkPDDYAY4Z_cjs.captureCurrentTab());
|
|
38600
39360
|
setImage(null);
|
|
38601
39361
|
} catch (error) {
|
|
38602
|
-
const code = error instanceof
|
|
39362
|
+
const code = error instanceof chunkPDDYAY4Z_cjs.ScreenCaptureError ? error.code : "failed";
|
|
38603
39363
|
if (code === "failed") {
|
|
38604
39364
|
notify19("Couldn't capture the screen. You can still describe the problem.", "error");
|
|
38605
39365
|
}
|
|
@@ -39083,9 +39843,9 @@ function ConnectedConversationSettings() {
|
|
|
39083
39843
|
});
|
|
39084
39844
|
if (confirmed) settings.share();
|
|
39085
39845
|
};
|
|
39086
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39846
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrame, { testId: "conversation-settings", className: "bg-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTBPCG2PV_cjs.PanelFrameBody, { className: "overflow-auto p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
39087
39847
|
!settings.isNewConversation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
39088
|
-
|
|
39848
|
+
chunkTBPCG2PV_cjs.ConversationTitleSection,
|
|
39089
39849
|
{
|
|
39090
39850
|
title: settings.title,
|
|
39091
39851
|
onTitleChange: settings.setTitle,
|
|
@@ -39103,9 +39863,9 @@ function ConnectedConversationSettings() {
|
|
|
39103
39863
|
}
|
|
39104
39864
|
),
|
|
39105
39865
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39106
|
-
|
|
39866
|
+
chunkTBPCG2PV_cjs.ModelSelectionSection,
|
|
39107
39867
|
{
|
|
39108
|
-
selector: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39868
|
+
selector: /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedModelSelector, {}),
|
|
39109
39869
|
onUseDefaults: settings.resetToDefaults
|
|
39110
39870
|
}
|
|
39111
39871
|
)
|
|
@@ -39164,7 +39924,7 @@ var BUILTIN_GLOBAL_DIALOGS = {
|
|
|
39164
39924
|
testId: "workspace-transfer-modal"
|
|
39165
39925
|
}
|
|
39166
39926
|
),
|
|
39167
|
-
logout: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
39927
|
+
logout: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedLogoutDialog, { open: props !== null, onClose }),
|
|
39168
39928
|
conversationSettings: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedConversationSettingsDialog, { open: props !== null, onClose }),
|
|
39169
39929
|
unarchiveWorkspace: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedUnarchiveWorkspaceDialog, { workspaceId: props?.workspaceId ?? null, onClose }),
|
|
39170
39930
|
productionSet: ConnectedProductionSetDialog,
|
|
@@ -39594,7 +40354,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
39594
40354
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkF6CEPWIF_cjs.ComposerDock, { children: [
|
|
39595
40355
|
slashWorkflows.launcher,
|
|
39596
40356
|
/* @__PURE__ */ jsxRuntime.jsx(chunkF6CEPWIF_cjs.ComposerContainer, { className: "mx-auto max-w-[49rem] px-3 sm:px-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39597
|
-
|
|
40357
|
+
chunkPDDYAY4Z_cjs.ConversationComposer,
|
|
39598
40358
|
{
|
|
39599
40359
|
value: draft,
|
|
39600
40360
|
onValueChange: setDraft,
|
|
@@ -39603,7 +40363,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
39603
40363
|
isConversationEmpty: true,
|
|
39604
40364
|
shouldOfferFollowUp: false,
|
|
39605
40365
|
skills,
|
|
39606
|
-
modelSelector: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40366
|
+
modelSelector: /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedModelSelector, { variant: "compact" }),
|
|
39607
40367
|
rightButton: /* @__PURE__ */ jsxRuntime.jsx(chunkF6CEPWIF_cjs.ComposerSend, { onSend: send, disabled: !draft.trim() })
|
|
39608
40368
|
}
|
|
39609
40369
|
) })
|
|
@@ -39746,7 +40506,7 @@ function AgentBarShell({
|
|
|
39746
40506
|
drawerRef: scrollRef,
|
|
39747
40507
|
onDrawerScroll: handleDrawerScroll,
|
|
39748
40508
|
drawer: /* @__PURE__ */ jsxRuntime.jsx(
|
|
39749
|
-
|
|
40509
|
+
chunkPDDYAY4Z_cjs.AgentSteps,
|
|
39750
40510
|
{
|
|
39751
40511
|
steps: stepList,
|
|
39752
40512
|
isStreaming,
|
|
@@ -39798,7 +40558,7 @@ function AgentControlBar({
|
|
|
39798
40558
|
const waitingOnChildren = runningLanes.length > 0 && ["sub_agent", "spawn_subagent", "deep_research", "run_skill"].includes(currentTool ?? "");
|
|
39799
40559
|
const waitingLabel = runningLanes.length === 1 ? `Waiting on ${runningLanes[0].job}` : `Waiting on ${runningLanes.length} sub-agents`;
|
|
39800
40560
|
const liveTimerNode = liveTimer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
39801
|
-
|
|
40561
|
+
chunkPDDYAY4Z_cjs.MessageLiveSeconds,
|
|
39802
40562
|
{
|
|
39803
40563
|
...liveTimer,
|
|
39804
40564
|
offsetSeconds: currentStep?.t ?? 0,
|
|
@@ -40988,7 +41748,7 @@ function ConversationThread({
|
|
|
40988
41748
|
useStartRequestedDraft();
|
|
40989
41749
|
const orphanedMessage = react.getOrphanedLastMessage(messageHistory, isGenerating, assistantMode);
|
|
40990
41750
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkKLMNCBLY_cjs.ConversationBody, { children: [
|
|
40991
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkKLMNCBLY_cjs.ConversationMain, { "data-testid": `conversation-${currentConversationId}`, children: threadsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKLMNCBLY_cjs.ConversationLoading, {}) : messageHistory.length > 0 || isBranching ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
41751
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkKLMNCBLY_cjs.ConversationMain, { "data-testid": `conversation-${currentConversationId}`, children: threadsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKLMNCBLY_cjs.ConversationLoading, {}) : messageHistory.length > 0 || isBranching ? /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.AskAgainContext.Provider, { value: handleAskAgain, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkVJCSEMXT_cjs.TranscriptRunsContext.Provider, { value: transcriptRunInfo, children: [
|
|
40992
41752
|
meetingCallExtId && transcriptLineCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40993
41753
|
chunkZBP4ZSAJ_cjs.ConversationFilter,
|
|
40994
41754
|
{
|
|
@@ -41006,7 +41766,7 @@ function ConversationThread({
|
|
|
41006
41766
|
]
|
|
41007
41767
|
}
|
|
41008
41768
|
) }),
|
|
41009
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41769
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedMessageArea, { ref: containerRef, messages: visibleMessages }),
|
|
41010
41770
|
showProvisional && /* @__PURE__ */ jsxRuntime.jsx(chunkBQ5RIWWT_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
|
|
41011
41771
|
] }) }) : meetingCallExtId ? (
|
|
41012
41772
|
// A meeting thread with nothing yet: call-aware, not the upload prompt.
|
|
@@ -41014,7 +41774,7 @@ function ConversationThread({
|
|
|
41014
41774
|
/* @__PURE__ */ jsxRuntime.jsx(chunkBQ5RIWWT_cjs.CallConversationEmpty, { callExtId: meetingCallExtId }),
|
|
41015
41775
|
/* @__PURE__ */ jsxRuntime.jsx(chunkBQ5RIWWT_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
|
|
41016
41776
|
] })
|
|
41017
|
-
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkOD6NGGL3_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
41777
|
+
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkOD6NGGL3_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(chunkPDDYAY4Z_cjs.ConnectedMessageArea, { ref: containerRef, messages: pendingFirstTurn }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
41018
41778
|
ConnectedConversationEmpty,
|
|
41019
41779
|
{
|
|
41020
41780
|
hasDocuments: allWorkspaceDocuments.length > 0,
|
|
@@ -41112,7 +41872,7 @@ function ConversationThread({
|
|
|
41112
41872
|
}
|
|
41113
41873
|
),
|
|
41114
41874
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41115
|
-
|
|
41875
|
+
chunkPDDYAY4Z_cjs.ConversationComposer,
|
|
41116
41876
|
{
|
|
41117
41877
|
handleSendMessage: handleUserSend,
|
|
41118
41878
|
placeholder: pendingAnswer ? assistant.answerPlaceholder : void 0,
|
|
@@ -41509,7 +42269,7 @@ function ConnectedThreadsPage({
|
|
|
41509
42269
|
}
|
|
41510
42270
|
),
|
|
41511
42271
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41512
|
-
|
|
42272
|
+
chunkTBPCG2PV_cjs.RenameDialog,
|
|
41513
42273
|
{
|
|
41514
42274
|
open: !!renaming,
|
|
41515
42275
|
onClose: () => {
|
|
@@ -42439,7 +43199,7 @@ function ConnectedConversationPage({
|
|
|
42439
43199
|
] })
|
|
42440
43200
|
}
|
|
42441
43201
|
),
|
|
42442
|
-
isInChat && /* @__PURE__ */ jsxRuntime.jsx(
|
|
43202
|
+
isInChat && /* @__PURE__ */ jsxRuntime.jsx(chunkU7KB42OQ_cjs.ConnectedThreadTaskBar, { conversationId: currentConversationId })
|
|
42443
43203
|
] }),
|
|
42444
43204
|
isInChat && /* @__PURE__ */ jsxRuntime.jsx(
|
|
42445
43205
|
ConversationThread,
|
|
@@ -42648,7 +43408,7 @@ function SsoResendVerificationButton({
|
|
|
42648
43408
|
onClick: async () => handleResendEmailVerification(),
|
|
42649
43409
|
disabled: loading || disabled,
|
|
42650
43410
|
"aria-label": "Resend verification email",
|
|
42651
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
43411
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkKSDTK66A_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
42652
43412
|
"Didn't get a verification email? ",
|
|
42653
43413
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Resend" })
|
|
42654
43414
|
] })
|
|
@@ -42659,16 +43419,16 @@ function SsoResendVerificationButton({
|
|
|
42659
43419
|
}
|
|
42660
43420
|
var NO_RECOVERY_KEY_WARNING = "Without your password or a recovery key, we cannot recover your account or data.";
|
|
42661
43421
|
function ConnectedSsoCallback() {
|
|
42662
|
-
const sso =
|
|
43422
|
+
const sso = chunkPDDYAY4Z_cjs.useSsoSignIn();
|
|
42663
43423
|
const { isAuthenticated: isAuthenticated2, isLoading, user } = sso;
|
|
42664
|
-
const auth =
|
|
43424
|
+
const auth = chunkPDDYAY4Z_cjs.useAuthPages();
|
|
42665
43425
|
const { notify: notify19, navigate } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
42666
43426
|
const passwordRules = auth.passwordRules;
|
|
42667
43427
|
const isProcessing = react$1.useRef(false);
|
|
42668
43428
|
const hasCheckedStatus = react$1.useRef(false);
|
|
42669
43429
|
const [accessToken, setAccessToken] = react$1.useState(null);
|
|
42670
43430
|
const [ssoStatus, setSsoStatus] = react$1.useState(null);
|
|
42671
|
-
const ssoName = react$1.useMemo(() =>
|
|
43431
|
+
const ssoName = react$1.useMemo(() => chunkPDDYAY4Z_cjs.resolveSsoName(user ?? {}, ssoStatus ?? {}), [user, ssoStatus]);
|
|
42672
43432
|
const [password, setPassword] = react$1.useState("");
|
|
42673
43433
|
const [confirmPassword, setConfirmPassword] = react$1.useState("");
|
|
42674
43434
|
const [error, setError] = react$1.useState(null);
|
|
@@ -42846,7 +43606,7 @@ function ConnectedSsoCallback() {
|
|
|
42846
43606
|
setIsCheckingStatus(true);
|
|
42847
43607
|
try {
|
|
42848
43608
|
console.info("[SSO] Checking user status...");
|
|
42849
|
-
const response = await
|
|
43609
|
+
const response = await chunkPDDYAY4Z_cjs.ssoAccountStatus(arbi, accessToken, user);
|
|
42850
43610
|
console.info("[SSO] User status:", response.status);
|
|
42851
43611
|
setSsoStatus(response);
|
|
42852
43612
|
} catch (error2) {
|
|
@@ -42890,7 +43650,7 @@ function ConnectedSsoCallback() {
|
|
|
42890
43650
|
setIsSubmitting(true);
|
|
42891
43651
|
setError(null);
|
|
42892
43652
|
try {
|
|
42893
|
-
const { login, registered, linked } = await
|
|
43653
|
+
const { login, registered, linked } = await chunkPDDYAY4Z_cjs.completeSsoSignIn(arbi, {
|
|
42894
43654
|
token: accessToken,
|
|
42895
43655
|
user,
|
|
42896
43656
|
status: ssoStatus,
|
|
@@ -43172,7 +43932,7 @@ function ConnectedSsoCallback() {
|
|
|
43172
43932
|
ssoStatus.status !== "new_user" && auth.footer
|
|
43173
43933
|
] }),
|
|
43174
43934
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43175
|
-
|
|
43935
|
+
chunkPDDYAY4Z_cjs.ConnectedForgotPassword,
|
|
43176
43936
|
{
|
|
43177
43937
|
open: showForgotPasswordModal,
|
|
43178
43938
|
onOpenChange: setShowForgotPasswordModal,
|
|
@@ -43180,7 +43940,7 @@ function ConnectedSsoCallback() {
|
|
|
43180
43940
|
}
|
|
43181
43941
|
),
|
|
43182
43942
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43183
|
-
|
|
43943
|
+
chunkPDDYAY4Z_cjs.ConnectedPasswordChangeDialog,
|
|
43184
43944
|
{
|
|
43185
43945
|
open: showChangePasswordModal,
|
|
43186
43946
|
onClose: () => setShowChangePasswordModal(false),
|
|
@@ -44049,7 +44809,7 @@ function ConnectedWorkspaceSwitcher({
|
|
|
44049
44809
|
const { workspace } = react.useCurrentWorkspace();
|
|
44050
44810
|
const { data: workspaces = [] } = react.useWorkspaces();
|
|
44051
44811
|
const { switchWorkspace } = react.useSwitchWorkspace();
|
|
44052
|
-
const
|
|
44812
|
+
const canCreateWorkspaces = react.useCanCreateWorkspaces();
|
|
44053
44813
|
const { active, recent, open } = react.useShellWorkspaces({
|
|
44054
44814
|
workspaces,
|
|
44055
44815
|
selectedId: workspace?.external_id ?? null,
|
|
@@ -44070,7 +44830,7 @@ function ConnectedWorkspaceSwitcher({
|
|
|
44070
44830
|
...props,
|
|
44071
44831
|
workspace: current,
|
|
44072
44832
|
recent,
|
|
44073
|
-
newWorkspaceDisabledReason:
|
|
44833
|
+
newWorkspaceDisabledReason: canCreateWorkspaces === false ? react.PROJECT_CREATION_DENIED_REASON : void 0,
|
|
44074
44834
|
onSwitch: (w) => void open(w),
|
|
44075
44835
|
labels: {
|
|
44076
44836
|
plural: ui.getEntityLabel("WORKSPACE", "PLURAL"),
|
|
@@ -44092,7 +44852,7 @@ function ConnectedTipBar({
|
|
|
44092
44852
|
className,
|
|
44093
44853
|
revealOnHover = false
|
|
44094
44854
|
}) {
|
|
44095
|
-
const { showHints, settingsLoaded, setShowHintsPersisted, setShowHints } =
|
|
44855
|
+
const { showHints, settingsLoaded, setShowHintsPersisted, setShowHints } = chunkPDDYAY4Z_cjs.useContextualHints();
|
|
44096
44856
|
const { dismissed, dismissTip } = react.useDismissedTips();
|
|
44097
44857
|
const { notify: notify19 } = chunkTKHCIHE2_cjs.useBlocksEnvironment();
|
|
44098
44858
|
const { data: workspaces } = react.useWorkspaces();
|
|
@@ -44103,7 +44863,7 @@ function ConnectedTipBar({
|
|
|
44103
44863
|
workspaceOpen,
|
|
44104
44864
|
...state
|
|
44105
44865
|
};
|
|
44106
|
-
const { tip, index, count: count2, previous, next, onHoverChange } =
|
|
44866
|
+
const { tip, index, count: count2, previous, next, onHoverChange } = chunkKSDTK66A_cjs.useTipsPlacement({
|
|
44107
44867
|
registry,
|
|
44108
44868
|
context,
|
|
44109
44869
|
state: situation,
|
|
@@ -44181,7 +44941,7 @@ function useGettingStarted({
|
|
|
44181
44941
|
const { user } = react.useArbiSession();
|
|
44182
44942
|
const userExtId = user?.external_id;
|
|
44183
44943
|
const temporaryOnly = user?.temporary_access_only === true;
|
|
44184
|
-
const { showHints, settingsLoaded, setShowHints, setShowHintsPersisted } =
|
|
44944
|
+
const { showHints, settingsLoaded, setShowHints, setShowHintsPersisted } = chunkPDDYAY4Z_cjs.useContextualHints();
|
|
44185
44945
|
const { dismissed, loaded: dismissedLoaded, dismissTip } = react.useDismissedTips();
|
|
44186
44946
|
const welcomeJourneyEnabled = react.useFeature("welcomeJourney");
|
|
44187
44947
|
const session = react.useArbiSessionStore();
|
|
@@ -44423,55 +45183,55 @@ Object.defineProperty(exports, "useSessionPanelMode", {
|
|
|
44423
45183
|
});
|
|
44424
45184
|
Object.defineProperty(exports, "CAP_REACHED_MESSAGE", {
|
|
44425
45185
|
enumerable: true,
|
|
44426
|
-
get: function () { return
|
|
45186
|
+
get: function () { return chunkXJE7W42L_cjs.CAP_REACHED_MESSAGE; }
|
|
44427
45187
|
});
|
|
44428
45188
|
Object.defineProperty(exports, "ZERO_BUDGET_MESSAGE", {
|
|
44429
45189
|
enumerable: true,
|
|
44430
|
-
get: function () { return
|
|
45190
|
+
get: function () { return chunkXJE7W42L_cjs.ZERO_BUDGET_MESSAGE; }
|
|
44431
45191
|
});
|
|
44432
45192
|
Object.defineProperty(exports, "aiUsageResetTimestamp", {
|
|
44433
45193
|
enumerable: true,
|
|
44434
|
-
get: function () { return
|
|
45194
|
+
get: function () { return chunkXJE7W42L_cjs.aiUsageResetTimestamp; }
|
|
44435
45195
|
});
|
|
44436
45196
|
Object.defineProperty(exports, "formatMoney", {
|
|
44437
45197
|
enumerable: true,
|
|
44438
|
-
get: function () { return
|
|
45198
|
+
get: function () { return chunkXJE7W42L_cjs.formatMoney; }
|
|
44439
45199
|
});
|
|
44440
45200
|
Object.defineProperty(exports, "formatResetDate", {
|
|
44441
45201
|
enumerable: true,
|
|
44442
|
-
get: function () { return
|
|
45202
|
+
get: function () { return chunkXJE7W42L_cjs.formatResetDate; }
|
|
44443
45203
|
});
|
|
44444
45204
|
Object.defineProperty(exports, "getQuotaItems", {
|
|
44445
45205
|
enumerable: true,
|
|
44446
|
-
get: function () { return
|
|
45206
|
+
get: function () { return chunkXJE7W42L_cjs.getQuotaItems; }
|
|
44447
45207
|
});
|
|
44448
45208
|
Object.defineProperty(exports, "isAddonBudgetZero", {
|
|
44449
45209
|
enumerable: true,
|
|
44450
|
-
get: function () { return
|
|
45210
|
+
get: function () { return chunkXJE7W42L_cjs.isAddonBudgetZero; }
|
|
44451
45211
|
});
|
|
44452
45212
|
Object.defineProperty(exports, "isProProject", {
|
|
44453
45213
|
enumerable: true,
|
|
44454
|
-
get: function () { return
|
|
45214
|
+
get: function () { return chunkXJE7W42L_cjs.isProProject; }
|
|
44455
45215
|
});
|
|
44456
45216
|
Object.defineProperty(exports, "planBadgeView", {
|
|
44457
45217
|
enumerable: true,
|
|
44458
|
-
get: function () { return
|
|
45218
|
+
get: function () { return chunkXJE7W42L_cjs.planBadgeView; }
|
|
44459
45219
|
});
|
|
44460
45220
|
Object.defineProperty(exports, "planName", {
|
|
44461
45221
|
enumerable: true,
|
|
44462
|
-
get: function () { return
|
|
45222
|
+
get: function () { return chunkXJE7W42L_cjs.planName; }
|
|
44463
45223
|
});
|
|
44464
45224
|
Object.defineProperty(exports, "projectGroupBilling", {
|
|
44465
45225
|
enumerable: true,
|
|
44466
|
-
get: function () { return
|
|
45226
|
+
get: function () { return chunkXJE7W42L_cjs.projectGroupBilling; }
|
|
44467
45227
|
});
|
|
44468
45228
|
Object.defineProperty(exports, "useBillingSupport", {
|
|
44469
45229
|
enumerable: true,
|
|
44470
|
-
get: function () { return
|
|
45230
|
+
get: function () { return chunkXJE7W42L_cjs.useBillingSupport; }
|
|
44471
45231
|
});
|
|
44472
45232
|
Object.defineProperty(exports, "useRewardBalance", {
|
|
44473
45233
|
enumerable: true,
|
|
44474
|
-
get: function () { return
|
|
45234
|
+
get: function () { return chunkXJE7W42L_cjs.useRewardBalance; }
|
|
44475
45235
|
});
|
|
44476
45236
|
Object.defineProperty(exports, "ConnectedMailInviteCard", {
|
|
44477
45237
|
enumerable: true,
|
|
@@ -44523,279 +45283,279 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
|
44523
45283
|
});
|
|
44524
45284
|
Object.defineProperty(exports, "ConnectedTaskActivityDialog", {
|
|
44525
45285
|
enumerable: true,
|
|
44526
|
-
get: function () { return
|
|
45286
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedTaskActivityDialog; }
|
|
44527
45287
|
});
|
|
44528
45288
|
Object.defineProperty(exports, "ConnectedTaskComposer", {
|
|
44529
45289
|
enumerable: true,
|
|
44530
|
-
get: function () { return
|
|
45290
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedTaskComposer; }
|
|
44531
45291
|
});
|
|
44532
45292
|
Object.defineProperty(exports, "ConnectedThreadTaskBar", {
|
|
44533
45293
|
enumerable: true,
|
|
44534
|
-
get: function () { return
|
|
45294
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedThreadTaskBar; }
|
|
44535
45295
|
});
|
|
44536
45296
|
Object.defineProperty(exports, "ConnectedWorkflowHistory", {
|
|
44537
45297
|
enumerable: true,
|
|
44538
|
-
get: function () { return
|
|
45298
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedWorkflowHistory; }
|
|
44539
45299
|
});
|
|
44540
45300
|
Object.defineProperty(exports, "ConnectedWorkflowRunPage", {
|
|
44541
45301
|
enumerable: true,
|
|
44542
|
-
get: function () { return
|
|
45302
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedWorkflowRunPage; }
|
|
44543
45303
|
});
|
|
44544
45304
|
Object.defineProperty(exports, "ConnectedWorkflowRunner", {
|
|
44545
45305
|
enumerable: true,
|
|
44546
|
-
get: function () { return
|
|
45306
|
+
get: function () { return chunkU7KB42OQ_cjs.ConnectedWorkflowRunner; }
|
|
44547
45307
|
});
|
|
44548
45308
|
Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS", {
|
|
44549
45309
|
enumerable: true,
|
|
44550
|
-
get: function () { return
|
|
45310
|
+
get: function () { return chunkU7KB42OQ_cjs.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS; }
|
|
44551
45311
|
});
|
|
44552
45312
|
Object.defineProperty(exports, "DEFAULT_WORKFLOW_RUN_PAGE_LABELS", {
|
|
44553
45313
|
enumerable: true,
|
|
44554
|
-
get: function () { return
|
|
45314
|
+
get: function () { return chunkU7KB42OQ_cjs.DEFAULT_WORKFLOW_RUN_PAGE_LABELS; }
|
|
44555
45315
|
});
|
|
44556
45316
|
Object.defineProperty(exports, "WorkflowRunThread", {
|
|
44557
45317
|
enumerable: true,
|
|
44558
|
-
get: function () { return
|
|
45318
|
+
get: function () { return chunkU7KB42OQ_cjs.WorkflowRunThread; }
|
|
44559
45319
|
});
|
|
44560
45320
|
Object.defineProperty(exports, "WorkflowRunWorkspaceChangedError", {
|
|
44561
45321
|
enumerable: true,
|
|
44562
|
-
get: function () { return
|
|
45322
|
+
get: function () { return chunkU7KB42OQ_cjs.WorkflowRunWorkspaceChangedError; }
|
|
44563
45323
|
});
|
|
44564
45324
|
Object.defineProperty(exports, "buildProjectSummaries", {
|
|
44565
45325
|
enumerable: true,
|
|
44566
|
-
get: function () { return
|
|
45326
|
+
get: function () { return chunkU7KB42OQ_cjs.buildProjectSummaries; }
|
|
44567
45327
|
});
|
|
44568
45328
|
Object.defineProperty(exports, "primaryProjectWorkspace", {
|
|
44569
45329
|
enumerable: true,
|
|
44570
|
-
get: function () { return
|
|
45330
|
+
get: function () { return chunkU7KB42OQ_cjs.primaryProjectWorkspace; }
|
|
44571
45331
|
});
|
|
44572
45332
|
Object.defineProperty(exports, "useEnsureRequiredLabels", {
|
|
44573
45333
|
enumerable: true,
|
|
44574
|
-
get: function () { return
|
|
45334
|
+
get: function () { return chunkU7KB42OQ_cjs.useEnsureRequiredLabels; }
|
|
44575
45335
|
});
|
|
44576
45336
|
Object.defineProperty(exports, "useProjectSummaries", {
|
|
44577
45337
|
enumerable: true,
|
|
44578
|
-
get: function () { return
|
|
45338
|
+
get: function () { return chunkU7KB42OQ_cjs.useProjectSummaries; }
|
|
44579
45339
|
});
|
|
44580
45340
|
Object.defineProperty(exports, "useProjectSummary", {
|
|
44581
45341
|
enumerable: true,
|
|
44582
|
-
get: function () { return
|
|
45342
|
+
get: function () { return chunkU7KB42OQ_cjs.useProjectSummary; }
|
|
44583
45343
|
});
|
|
44584
45344
|
Object.defineProperty(exports, "useRenderTaskPerson", {
|
|
44585
45345
|
enumerable: true,
|
|
44586
|
-
get: function () { return
|
|
45346
|
+
get: function () { return chunkU7KB42OQ_cjs.useRenderTaskPerson; }
|
|
44587
45347
|
});
|
|
44588
45348
|
Object.defineProperty(exports, "useRequiredLabels", {
|
|
44589
45349
|
enumerable: true,
|
|
44590
|
-
get: function () { return
|
|
45350
|
+
get: function () { return chunkU7KB42OQ_cjs.useRequiredLabels; }
|
|
44591
45351
|
});
|
|
44592
45352
|
Object.defineProperty(exports, "useTaskPeople", {
|
|
44593
45353
|
enumerable: true,
|
|
44594
|
-
get: function () { return
|
|
45354
|
+
get: function () { return chunkU7KB42OQ_cjs.useTaskPeople; }
|
|
44595
45355
|
});
|
|
44596
45356
|
Object.defineProperty(exports, "useWorkflowsPageState", {
|
|
44597
45357
|
enumerable: true,
|
|
44598
|
-
get: function () { return
|
|
45358
|
+
get: function () { return chunkU7KB42OQ_cjs.useWorkflowsPageState; }
|
|
44599
45359
|
});
|
|
44600
45360
|
Object.defineProperty(exports, "workflowRunView", {
|
|
44601
45361
|
enumerable: true,
|
|
44602
|
-
get: function () { return
|
|
45362
|
+
get: function () { return chunkU7KB42OQ_cjs.workflowRunView; }
|
|
44603
45363
|
});
|
|
44604
45364
|
Object.defineProperty(exports, "AgentSteps", {
|
|
44605
45365
|
enumerable: true,
|
|
44606
|
-
get: function () { return
|
|
45366
|
+
get: function () { return chunkPDDYAY4Z_cjs.AgentSteps; }
|
|
44607
45367
|
});
|
|
44608
45368
|
Object.defineProperty(exports, "AnswerTable", {
|
|
44609
45369
|
enumerable: true,
|
|
44610
|
-
get: function () { return
|
|
45370
|
+
get: function () { return chunkPDDYAY4Z_cjs.AnswerTable; }
|
|
44611
45371
|
});
|
|
44612
45372
|
Object.defineProperty(exports, "ArbiChat", {
|
|
44613
45373
|
enumerable: true,
|
|
44614
|
-
get: function () { return
|
|
45374
|
+
get: function () { return chunkPDDYAY4Z_cjs.ArbiChat; }
|
|
44615
45375
|
});
|
|
44616
45376
|
Object.defineProperty(exports, "AskAgainContext", {
|
|
44617
45377
|
enumerable: true,
|
|
44618
|
-
get: function () { return
|
|
45378
|
+
get: function () { return chunkPDDYAY4Z_cjs.AskAgainContext; }
|
|
44619
45379
|
});
|
|
44620
45380
|
Object.defineProperty(exports, "ConnectedBranchControls", {
|
|
44621
45381
|
enumerable: true,
|
|
44622
|
-
get: function () { return
|
|
45382
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedBranchControls; }
|
|
44623
45383
|
});
|
|
44624
45384
|
Object.defineProperty(exports, "ConnectedCitationRenderer", {
|
|
44625
45385
|
enumerable: true,
|
|
44626
|
-
get: function () { return
|
|
45386
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedCitationRenderer; }
|
|
44627
45387
|
});
|
|
44628
45388
|
Object.defineProperty(exports, "ConnectedCompactConversation", {
|
|
44629
45389
|
enumerable: true,
|
|
44630
|
-
get: function () { return
|
|
45390
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedCompactConversation; }
|
|
44631
45391
|
});
|
|
44632
45392
|
Object.defineProperty(exports, "ConnectedCompactLogin", {
|
|
44633
45393
|
enumerable: true,
|
|
44634
|
-
get: function () { return
|
|
45394
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedCompactLogin; }
|
|
44635
45395
|
});
|
|
44636
45396
|
Object.defineProperty(exports, "ConnectedConversationDocumentPicker", {
|
|
44637
45397
|
enumerable: true,
|
|
44638
|
-
get: function () { return
|
|
45398
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedConversationDocumentPicker; }
|
|
44639
45399
|
});
|
|
44640
45400
|
Object.defineProperty(exports, "ConnectedDangerZone", {
|
|
44641
45401
|
enumerable: true,
|
|
44642
|
-
get: function () { return
|
|
45402
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedDangerZone; }
|
|
44643
45403
|
});
|
|
44644
45404
|
Object.defineProperty(exports, "ConnectedEmbeddedChat", {
|
|
44645
45405
|
enumerable: true,
|
|
44646
|
-
get: function () { return
|
|
45406
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedEmbeddedChat; }
|
|
44647
45407
|
});
|
|
44648
45408
|
Object.defineProperty(exports, "ConnectedForgotPassword", {
|
|
44649
45409
|
enumerable: true,
|
|
44650
|
-
get: function () { return
|
|
45410
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedForgotPassword; }
|
|
44651
45411
|
});
|
|
44652
45412
|
Object.defineProperty(exports, "ConnectedIdentityVerification", {
|
|
44653
45413
|
enumerable: true,
|
|
44654
|
-
get: function () { return
|
|
45414
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedIdentityVerification; }
|
|
44655
45415
|
});
|
|
44656
45416
|
Object.defineProperty(exports, "ConnectedLoginPage", {
|
|
44657
45417
|
enumerable: true,
|
|
44658
|
-
get: function () { return
|
|
45418
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedLoginPage; }
|
|
44659
45419
|
});
|
|
44660
45420
|
Object.defineProperty(exports, "ConnectedLogoutDialog", {
|
|
44661
45421
|
enumerable: true,
|
|
44662
|
-
get: function () { return
|
|
45422
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedLogoutDialog; }
|
|
44663
45423
|
});
|
|
44664
45424
|
Object.defineProperty(exports, "ConnectedMessage", {
|
|
44665
45425
|
enumerable: true,
|
|
44666
|
-
get: function () { return
|
|
45426
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedMessage; }
|
|
44667
45427
|
});
|
|
44668
45428
|
Object.defineProperty(exports, "ConnectedMessageArea", {
|
|
44669
45429
|
enumerable: true,
|
|
44670
|
-
get: function () { return
|
|
45430
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedMessageArea; }
|
|
44671
45431
|
});
|
|
44672
45432
|
Object.defineProperty(exports, "ConnectedMessageList", {
|
|
44673
45433
|
enumerable: true,
|
|
44674
|
-
get: function () { return
|
|
45434
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedMessageList; }
|
|
44675
45435
|
});
|
|
44676
45436
|
Object.defineProperty(exports, "ConnectedModelSelector", {
|
|
44677
45437
|
enumerable: true,
|
|
44678
|
-
get: function () { return
|
|
45438
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedModelSelector; }
|
|
44679
45439
|
});
|
|
44680
45440
|
Object.defineProperty(exports, "ConnectedNotificationPreferences", {
|
|
44681
45441
|
enumerable: true,
|
|
44682
|
-
get: function () { return
|
|
45442
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedNotificationPreferences; }
|
|
44683
45443
|
});
|
|
44684
45444
|
Object.defineProperty(exports, "ConnectedPasswordChangeDialog", {
|
|
44685
45445
|
enumerable: true,
|
|
44686
|
-
get: function () { return
|
|
45446
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedPasswordChangeDialog; }
|
|
44687
45447
|
});
|
|
44688
45448
|
Object.defineProperty(exports, "ConnectedProfileCard", {
|
|
44689
45449
|
enumerable: true,
|
|
44690
|
-
get: function () { return
|
|
45450
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedProfileCard; }
|
|
44691
45451
|
});
|
|
44692
45452
|
Object.defineProperty(exports, "ConnectedSecuritySection", {
|
|
44693
45453
|
enumerable: true,
|
|
44694
|
-
get: function () { return
|
|
45454
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedSecuritySection; }
|
|
44695
45455
|
});
|
|
44696
45456
|
Object.defineProperty(exports, "ConnectedSessionsRow", {
|
|
44697
45457
|
enumerable: true,
|
|
44698
|
-
get: function () { return
|
|
45458
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedSessionsRow; }
|
|
44699
45459
|
});
|
|
44700
45460
|
Object.defineProperty(exports, "ConnectedThreadsPreview", {
|
|
44701
45461
|
enumerable: true,
|
|
44702
|
-
get: function () { return
|
|
45462
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConnectedThreadsPreview; }
|
|
44703
45463
|
});
|
|
44704
45464
|
Object.defineProperty(exports, "ConversationComposer", {
|
|
44705
45465
|
enumerable: true,
|
|
44706
|
-
get: function () { return
|
|
45466
|
+
get: function () { return chunkPDDYAY4Z_cjs.ConversationComposer; }
|
|
44707
45467
|
});
|
|
44708
45468
|
Object.defineProperty(exports, "EmbeddedChatPanel", {
|
|
44709
45469
|
enumerable: true,
|
|
44710
|
-
get: function () { return
|
|
45470
|
+
get: function () { return chunkPDDYAY4Z_cjs.EmbeddedChatPanel; }
|
|
44711
45471
|
});
|
|
44712
45472
|
Object.defineProperty(exports, "MessageDetailsModal", {
|
|
44713
45473
|
enumerable: true,
|
|
44714
|
-
get: function () { return
|
|
45474
|
+
get: function () { return chunkPDDYAY4Z_cjs.MessageDetailsModal; }
|
|
44715
45475
|
});
|
|
44716
45476
|
Object.defineProperty(exports, "MessageLiveSeconds", {
|
|
44717
45477
|
enumerable: true,
|
|
44718
|
-
get: function () { return
|
|
45478
|
+
get: function () { return chunkPDDYAY4Z_cjs.MessageLiveSeconds; }
|
|
44719
45479
|
});
|
|
44720
45480
|
Object.defineProperty(exports, "PENDING_RECOVERY_KEY", {
|
|
44721
45481
|
enumerable: true,
|
|
44722
|
-
get: function () { return
|
|
45482
|
+
get: function () { return chunkPDDYAY4Z_cjs.PENDING_RECOVERY_KEY; }
|
|
44723
45483
|
});
|
|
44724
45484
|
Object.defineProperty(exports, "PREMIUM_TIER_TAG", {
|
|
44725
45485
|
enumerable: true,
|
|
44726
|
-
get: function () { return
|
|
45486
|
+
get: function () { return chunkPDDYAY4Z_cjs.PREMIUM_TIER_TAG; }
|
|
44727
45487
|
});
|
|
44728
45488
|
Object.defineProperty(exports, "RunningSubagents", {
|
|
44729
45489
|
enumerable: true,
|
|
44730
|
-
get: function () { return
|
|
45490
|
+
get: function () { return chunkPDDYAY4Z_cjs.RunningSubagents; }
|
|
44731
45491
|
});
|
|
44732
45492
|
Object.defineProperty(exports, "STANDARD_TIER_TAG", {
|
|
44733
45493
|
enumerable: true,
|
|
44734
|
-
get: function () { return
|
|
45494
|
+
get: function () { return chunkPDDYAY4Z_cjs.STANDARD_TIER_TAG; }
|
|
44735
45495
|
});
|
|
44736
45496
|
Object.defineProperty(exports, "WorkflowStepMessage", {
|
|
44737
45497
|
enumerable: true,
|
|
44738
|
-
get: function () { return
|
|
45498
|
+
get: function () { return chunkPDDYAY4Z_cjs.WorkflowStepMessage; }
|
|
44739
45499
|
});
|
|
44740
45500
|
Object.defineProperty(exports, "backUpOnSignup", {
|
|
44741
45501
|
enumerable: true,
|
|
44742
|
-
get: function () { return
|
|
45502
|
+
get: function () { return chunkPDDYAY4Z_cjs.backUpOnSignup; }
|
|
44743
45503
|
});
|
|
44744
45504
|
Object.defineProperty(exports, "createRemoteControl", {
|
|
44745
45505
|
enumerable: true,
|
|
44746
|
-
get: function () { return
|
|
45506
|
+
get: function () { return chunkPDDYAY4Z_cjs.createRemoteControl; }
|
|
44747
45507
|
});
|
|
44748
45508
|
Object.defineProperty(exports, "defaultHost", {
|
|
44749
45509
|
enumerable: true,
|
|
44750
|
-
get: function () { return
|
|
45510
|
+
get: function () { return chunkPDDYAY4Z_cjs.defaultHost; }
|
|
44751
45511
|
});
|
|
44752
45512
|
Object.defineProperty(exports, "renderConnectedUser", {
|
|
44753
45513
|
enumerable: true,
|
|
44754
|
-
get: function () { return
|
|
45514
|
+
get: function () { return chunkPDDYAY4Z_cjs.renderConnectedUser; }
|
|
44755
45515
|
});
|
|
44756
45516
|
Object.defineProperty(exports, "renderSessionStatusIcon", {
|
|
44757
45517
|
enumerable: true,
|
|
44758
|
-
get: function () { return
|
|
45518
|
+
get: function () { return chunkPDDYAY4Z_cjs.renderSessionStatusIcon; }
|
|
44759
45519
|
});
|
|
44760
45520
|
Object.defineProperty(exports, "resolveSsoName", {
|
|
44761
45521
|
enumerable: true,
|
|
44762
|
-
get: function () { return
|
|
45522
|
+
get: function () { return chunkPDDYAY4Z_cjs.resolveSsoName; }
|
|
44763
45523
|
});
|
|
44764
45524
|
Object.defineProperty(exports, "useAuthPages", {
|
|
44765
45525
|
enumerable: true,
|
|
44766
|
-
get: function () { return
|
|
45526
|
+
get: function () { return chunkPDDYAY4Z_cjs.useAuthPages; }
|
|
44767
45527
|
});
|
|
44768
45528
|
Object.defineProperty(exports, "useContextualHints", {
|
|
44769
45529
|
enumerable: true,
|
|
44770
|
-
get: function () { return
|
|
45530
|
+
get: function () { return chunkPDDYAY4Z_cjs.useContextualHints; }
|
|
44771
45531
|
});
|
|
44772
45532
|
Object.defineProperty(exports, "useModelPicker", {
|
|
44773
45533
|
enumerable: true,
|
|
44774
|
-
get: function () { return
|
|
45534
|
+
get: function () { return chunkPDDYAY4Z_cjs.useModelPicker; }
|
|
44775
45535
|
});
|
|
44776
45536
|
Object.defineProperty(exports, "useOpenChunk", {
|
|
44777
45537
|
enumerable: true,
|
|
44778
|
-
get: function () { return
|
|
45538
|
+
get: function () { return chunkPDDYAY4Z_cjs.useOpenChunk; }
|
|
44779
45539
|
});
|
|
44780
45540
|
Object.defineProperty(exports, "useOpenWorkspaceIcon", {
|
|
44781
45541
|
enumerable: true,
|
|
44782
|
-
get: function () { return
|
|
45542
|
+
get: function () { return chunkPDDYAY4Z_cjs.useOpenWorkspaceIcon; }
|
|
44783
45543
|
});
|
|
44784
45544
|
Object.defineProperty(exports, "useRemoteControlActions", {
|
|
44785
45545
|
enumerable: true,
|
|
44786
|
-
get: function () { return
|
|
45546
|
+
get: function () { return chunkPDDYAY4Z_cjs.useRemoteControlActions; }
|
|
44787
45547
|
});
|
|
44788
45548
|
Object.defineProperty(exports, "useRemoteControlHandlers", {
|
|
44789
45549
|
enumerable: true,
|
|
44790
|
-
get: function () { return
|
|
45550
|
+
get: function () { return chunkPDDYAY4Z_cjs.useRemoteControlHandlers; }
|
|
44791
45551
|
});
|
|
44792
45552
|
Object.defineProperty(exports, "useSsoSignIn", {
|
|
44793
45553
|
enumerable: true,
|
|
44794
|
-
get: function () { return
|
|
45554
|
+
get: function () { return chunkPDDYAY4Z_cjs.useSsoSignIn; }
|
|
44795
45555
|
});
|
|
44796
45556
|
Object.defineProperty(exports, "useWorkspaceDocTitles", {
|
|
44797
45557
|
enumerable: true,
|
|
44798
|
-
get: function () { return
|
|
45558
|
+
get: function () { return chunkPDDYAY4Z_cjs.useWorkspaceDocTitles; }
|
|
44799
45559
|
});
|
|
44800
45560
|
Object.defineProperty(exports, "parseTypedSkill", {
|
|
44801
45561
|
enumerable: true,
|
|
@@ -45352,7 +46112,6 @@ exports.ProgressiveLoadingChip = ProgressiveLoadingChip;
|
|
|
45352
46112
|
exports.ProjectDetail = ProjectDetail;
|
|
45353
46113
|
exports.ProjectUsageContent = ProjectUsageContent;
|
|
45354
46114
|
exports.ProjectsTable = ProjectsTable;
|
|
45355
|
-
exports.REFERRAL_OFFER = REFERRAL_OFFER;
|
|
45356
46115
|
exports.RecoveryKeyDownload = RecoveryKeyDownload;
|
|
45357
46116
|
exports.ReportProblemDialog = ReportProblemDialog;
|
|
45358
46117
|
exports.RunStatsBadges = RunStatsBadges;
|
|
@@ -45496,6 +46255,7 @@ exports.usePendingTaskThread = usePendingTaskThread;
|
|
|
45496
46255
|
exports.useProcessingCounts = useProcessingCounts;
|
|
45497
46256
|
exports.useProcessingPulse = useProcessingPulse;
|
|
45498
46257
|
exports.useProjectBillingFocus = useProjectBillingFocus;
|
|
46258
|
+
exports.useReferralOffer = useReferralOffer;
|
|
45499
46259
|
exports.useReferralReward = useReferralReward;
|
|
45500
46260
|
exports.useReplyWithArbi = useReplyWithArbi;
|
|
45501
46261
|
exports.useReportProblem = useReportProblem;
|