@carlonicora/nextjs-jsonapi 3.24.2 → 3.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AssistantMessageInterface-1Kbz8RVs.d.ts → AssistantMessageInterface-CubxuBIJ.d.ts} +1 -1
- package/dist/{AssistantMessageInterface-CoxJyuFM.d.mts → AssistantMessageInterface-sHjI2zPN.d.mts} +1 -1
- package/dist/{BlockNoteEditor-35D4R7HJ.js → BlockNoteEditor-4EIKMNY3.js} +31 -21
- package/dist/BlockNoteEditor-4EIKMNY3.js.map +1 -0
- package/dist/{BlockNoteEditor-65HR6ULV.mjs → BlockNoteEditor-AXYVDDXM.mjs} +16 -6
- package/dist/{BlockNoteEditor-65HR6ULV.mjs.map → BlockNoteEditor-AXYVDDXM.mjs.map} +1 -1
- package/dist/{BlockNoteViewer-QDXDVYEM.js → BlockNoteViewer-7BFNTN4E.js} +4 -4
- package/dist/{BlockNoteViewer-QDXDVYEM.js.map → BlockNoteViewer-7BFNTN4E.js.map} +1 -1
- package/dist/{BlockNoteViewer-KDKGUIG5.mjs → BlockNoteViewer-KRTAFTUX.mjs} +3 -3
- package/dist/{HandbookSectionInterface-OePKPbqN.d.ts → HandbookSectionInterface-Ck1wZJ81.d.ts} +1 -1
- package/dist/{HandbookSectionInterface-BYsmnPEz.d.mts → HandbookSectionInterface-DgYH--Ik.d.mts} +1 -1
- package/dist/JsonApiRequest-TE5WD3WS.js +26 -0
- package/dist/{JsonApiRequest-G625QAH5.js.map → JsonApiRequest-TE5WD3WS.js.map} +1 -1
- package/dist/{JsonApiRequest-RRMNV7YE.mjs → JsonApiRequest-UHOWNI3O.mjs} +2 -2
- package/dist/analytics.modules-CfczU12P.d.ts +25 -0
- package/dist/analytics.modules-pzGwMASI.d.mts +25 -0
- package/dist/{auth.interface-BC1jp_ni.d.ts → auth.interface-BzI4onI_.d.ts} +1 -1
- package/dist/{auth.interface-dR2-6gPM.d.mts → auth.interface-Df4vXbNz.d.mts} +1 -1
- package/dist/billing/index.js +402 -402
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-YXRVPEEJ.js → chunk-26MQIJNB.js} +1 -1
- package/dist/{chunk-YXRVPEEJ.js.map → chunk-26MQIJNB.js.map} +1 -1
- package/dist/{chunk-T76WLDE5.mjs → chunk-37DMFVLN.mjs} +1 -1
- package/dist/{chunk-3AR4KA5D.js → chunk-4Z45NYPR.js} +13 -13
- package/dist/{chunk-3AR4KA5D.js.map → chunk-4Z45NYPR.js.map} +1 -1
- package/dist/chunk-7B4E42R5.mjs +280 -0
- package/dist/chunk-7B4E42R5.mjs.map +1 -0
- package/dist/{chunk-2XCUAHQT.js → chunk-ABVTYQIJ.js} +1563 -1336
- package/dist/chunk-ABVTYQIJ.js.map +1 -0
- package/dist/{chunk-U7QVISQS.js → chunk-CAKOFJZD.js} +450 -40
- package/dist/chunk-CAKOFJZD.js.map +1 -0
- package/dist/{chunk-IBVKPLHT.mjs → chunk-E3I4MT53.mjs} +422 -12
- package/dist/chunk-E3I4MT53.mjs.map +1 -0
- package/dist/chunk-GHFMKH3M.js +280 -0
- package/dist/chunk-GHFMKH3M.js.map +1 -0
- package/dist/chunk-GKDHYB2R.js +110 -0
- package/dist/chunk-GKDHYB2R.js.map +1 -0
- package/dist/{chunk-ZJI5ZZW5.mjs → chunk-Q6J2ICKO.mjs} +3 -3
- package/dist/{chunk-4O7R2Z2O.mjs → chunk-QWZAGQWJ.mjs} +2175 -1948
- package/dist/chunk-QWZAGQWJ.mjs.map +1 -0
- package/dist/chunk-U65JPKO3.mjs +110 -0
- package/dist/chunk-U65JPKO3.mjs.map +1 -0
- package/dist/client/index.d.mts +6 -5
- package/dist/client/index.d.ts +6 -5
- package/dist/client/index.js +5 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +4 -4
- package/dist/components/index.d.mts +33 -10
- package/dist/components/index.d.ts +33 -10
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +6 -4
- package/dist/{config-B6UB7j69.d.ts → config-3N1LSrcC.d.ts} +1 -1
- package/dist/{config-Cd5xTEfZ.d.ts → config-AVtuvfM1.d.ts} +1 -1
- package/dist/{config-n-ZpPmOL.d.mts → config-BSKTYDoh.d.mts} +1 -1
- package/dist/{config-YyhFHxkU.d.mts → config-BmufyEj6.d.mts} +1 -1
- package/dist/contexts/index.d.mts +5 -4
- package/dist/contexts/index.d.ts +5 -4
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +31 -14
- package/dist/core/index.d.ts +31 -14
- package/dist/core/index.js +9 -5
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +8 -4
- package/dist/features/analytics/index.css +30 -0
- package/dist/features/analytics/index.css.map +1 -0
- package/dist/features/analytics/index.d.mts +508 -0
- package/dist/features/analytics/index.d.ts +508 -0
- package/dist/features/analytics/index.js +1166 -0
- package/dist/features/analytics/index.js.map +1 -0
- package/dist/features/analytics/index.mjs +1166 -0
- package/dist/features/analytics/index.mjs.map +1 -0
- package/dist/features/analytics/server.d.mts +28 -0
- package/dist/features/analytics/server.d.ts +28 -0
- package/dist/features/analytics/server.js +41 -0
- package/dist/features/analytics/server.js.map +1 -0
- package/dist/features/analytics/server.mjs +41 -0
- package/dist/features/analytics/server.mjs.map +1 -0
- package/dist/features/help/index.d.mts +2 -2
- package/dist/features/help/index.d.ts +2 -2
- package/dist/features/help/index.js +43 -43
- package/dist/features/help/index.js.map +1 -1
- package/dist/features/help/index.mjs +9 -9
- package/dist/features/help/index.mjs.map +1 -1
- package/dist/features/tokenusage/index.d.mts +2 -2
- package/dist/features/tokenusage/index.d.ts +2 -2
- package/dist/features/tokenusage/index.js +141 -223
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +28 -110
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.d.mts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/notification.interface-BNCvnVCW.d.ts +34 -0
- package/dist/notification.interface-P_pNfzZQ.d.mts +34 -0
- package/dist/{s3.service-Bqr-fQmi.d.ts → s3.service-CbUa6a-8.d.ts} +3 -2
- package/dist/{s3.service-Buiy1ncj.d.mts → s3.service-DAp8FbuG.d.mts} +3 -2
- package/dist/server/index.d.mts +5 -4
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +39 -279
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +20 -260
- package/dist/server/index.mjs.map +1 -1
- package/dist/{types-bsm8Fp55.d.ts → types-Cn153-mH.d.ts} +1 -1
- package/dist/{types-Bq_UA8Lg.d.mts → types-D0uLYV2P.d.mts} +1 -1
- package/dist/{usePageUrlGenerator-J_ECv-oQ.d.ts → usePageUrlGenerator-B-3FRKBD.d.ts} +1 -1
- package/dist/{usePageUrlGenerator-uKBjAKqC.d.mts → usePageUrlGenerator-CCJ_cdQy.d.mts} +1 -1
- package/dist/{useSocket-BcH7l7B8.d.mts → useSocket-B9gTbuCj.d.mts} +1 -1
- package/dist/{useSocket-DCZd_eJk.d.ts → useSocket-BHVIyigI.d.ts} +1 -1
- package/dist/{notification.interface-MnRt1Tjm.d.mts → user.interface-CSaGWFbg.d.mts} +1 -31
- package/dist/{notification.interface-CjzV_KII.d.ts → user.interface-CrmwJLYW.d.ts} +1 -31
- package/package.json +11 -1
- package/src/client/index.ts +2 -0
- package/src/components/containers/PageContainer.tsx +1 -1
- package/src/components/containers/RoundPageContainer.tsx +60 -16
- package/src/components/containers/RoundPageContainerTitle.tsx +75 -35
- package/src/components/editors/BlockNoteEditor.tsx +13 -1
- package/src/components/forms/EntityMultiSelector.tsx +4 -4
- package/src/components/forms/EntitySelector.tsx +4 -4
- package/src/components/forms/FormBlockNote.tsx +21 -1
- package/src/components/forms/FormCheckbox.tsx +6 -2
- package/src/components/forms/__tests__/useEditorDialog.test.ts +47 -0
- package/src/components/forms/useEditorDialog.ts +22 -0
- package/src/components/navigations/Breadcrumb.tsx +45 -16
- package/src/components/navigations/Header.tsx +16 -3
- package/src/components/navigations/MobileNavigationBar.tsx +12 -0
- package/src/components/navigations/__tests__/MobileNavigationBar.spec.tsx +17 -0
- package/src/components/tables/ContentListTable.tsx +52 -32
- package/src/core/index.ts +4 -0
- package/src/core/registry/ModuleRegistry.ts +7 -0
- package/src/features/__tests__/i18n-keys.contract.spec.ts +1 -0
- package/src/features/analytics/__tests__/server-entry.spec.tsx +64 -0
- package/src/features/analytics/analytics.modules.ts +30 -0
- package/src/features/analytics/components/AnalyticsAdminContainer.tsx +97 -0
- package/src/features/analytics/components/AnalyticsAdminFilterBar.tsx +120 -0
- package/src/features/analytics/components/AnalyticsAdminPageContainer.tsx +25 -0
- package/src/features/analytics/components/AnalyticsAdminTiles.tsx +191 -0
- package/src/features/analytics/components/AnalyticsBreakdownTable.tsx +105 -0
- package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +246 -0
- package/src/features/analytics/components/AnalyticsJourneyPageContainer.tsx +14 -0
- package/src/features/analytics/components/AnalyticsSessionsTable.tsx +107 -0
- package/src/features/analytics/components/AnalyticsTimelineChart.tsx +175 -0
- package/src/features/analytics/components/AnalyticsTracker.tsx +112 -0
- package/src/features/analytics/components/__tests__/AnalyticsAdminTiles.spec.tsx +39 -0
- package/src/features/analytics/components/__tests__/AnalyticsBreakdownTable.spec.tsx +39 -0
- package/src/features/analytics/components/__tests__/AnalyticsJourneyContainer.spec.tsx +124 -0
- package/src/features/analytics/components/__tests__/AnalyticsPageContainers.spec.tsx +117 -0
- package/src/features/analytics/components/__tests__/AnalyticsSessionsTable.spec.tsx +121 -0
- package/src/features/analytics/components/__tests__/AnalyticsTimelineChart.spec.tsx +35 -0
- package/src/features/analytics/components/__tests__/AnalyticsTracker.spec.tsx +248 -0
- package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +28 -0
- package/src/features/analytics/components/server/AnalyticsJourneyPage.tsx +25 -0
- package/src/features/analytics/contexts/AnalyticsAdminContext.tsx +273 -0
- package/src/features/analytics/contexts/__tests__/AnalyticsAdminContext.spec.tsx +140 -0
- package/src/features/analytics/data/AnalyticsAdminService.ts +91 -0
- package/src/features/analytics/data/AnalyticsService.ts +23 -0
- package/src/features/analytics/data/__tests__/AnalyticsAdminService.spec.ts +117 -0
- package/src/features/analytics/data/__tests__/AnalyticsService.spec.ts +56 -0
- package/src/features/analytics/data/__tests__/models.spec.ts +300 -0
- package/src/features/analytics/data/analytics-breakdown.interface.ts +9 -0
- package/src/features/analytics/data/analytics-breakdown.ts +65 -0
- package/src/features/analytics/data/analytics-event.interface.ts +7 -0
- package/src/features/analytics/data/analytics-event.ts +63 -0
- package/src/features/analytics/data/analytics-page-view.interface.ts +9 -0
- package/src/features/analytics/data/analytics-page-view.ts +57 -0
- package/src/features/analytics/data/analytics-session.interface.ts +23 -0
- package/src/features/analytics/data/analytics-session.ts +144 -0
- package/src/features/analytics/data/analytics-summary.interface.ts +11 -0
- package/src/features/analytics/data/analytics-summary.ts +79 -0
- package/src/features/analytics/data/analytics-timeline.interface.ts +10 -0
- package/src/features/analytics/data/analytics-timeline.ts +67 -0
- package/src/features/analytics/data/analytics.types.ts +97 -0
- package/src/features/analytics/data/index.ts +15 -0
- package/src/features/analytics/i18n-keys.ts +76 -0
- package/src/features/analytics/index.ts +31 -0
- package/src/features/analytics/lib/__tests__/utm.spec.ts +20 -0
- package/src/features/analytics/lib/__tests__/visitorCookie.spec.ts +63 -0
- package/src/features/analytics/lib/utm.ts +29 -0
- package/src/features/analytics/lib/visitorCookie.ts +32 -0
- package/src/features/analytics/server-entry.ts +8 -0
- package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +1 -1
- package/src/features/assistant/components/parts/AssistantComposer.tsx +1 -1
- package/src/features/assistant-message/components/MessageItem.tsx +2 -2
- package/src/features/assistant-message/components/parts/tabs/CitationsTab.tsx +23 -5
- package/src/features/auth/components/containers/AuthContainer.tsx +8 -1
- package/src/features/company/components/details/CompanyContent.tsx +3 -1
- package/src/features/company/components/details/CompanyDetails.tsx +9 -1
- package/src/features/company/components/details/TokenStatusIndicator.tsx +42 -13
- package/src/features/help/components/HelpHeader.tsx +7 -5
- package/src/features/tokenusage/components/TokenUsageAdminFilterBar.tsx +9 -6
- package/src/features/tokenusage/lib/__tests__/formatters.spec.ts +21 -0
- package/src/features/tokenusage/lib/formatters.ts +5 -1
- package/src/features/waitlist/components/lists/WaitlistList.tsx +68 -121
- package/src/features/waitlist/data/WaitlistService.ts +2 -2
- package/src/features/waitlist/data/index.ts +1 -0
- package/src/features/waitlist/data/waitlist.fields.ts +8 -0
- package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +69 -30
- package/src/shadcnui/ui/button.tsx +1 -1
- package/src/shadcnui/ui/checkbox.tsx +1 -1
- package/src/shadcnui/ui/command.tsx +4 -4
- package/src/shadcnui/ui/dialog.tsx +2 -0
- package/src/shadcnui/ui/input.tsx +1 -1
- package/src/shadcnui/ui/popover.tsx +9 -0
- package/src/shadcnui/ui/select.tsx +1 -1
- package/src/shadcnui/ui/sheet.tsx +8 -1
- package/src/shadcnui/ui/table.tsx +2 -2
- package/src/shadcnui/ui/textarea.tsx +1 -1
- package/dist/BlockNoteEditor-35D4R7HJ.js.map +0 -1
- package/dist/JsonApiRequest-G625QAH5.js +0 -26
- package/dist/chunk-2XCUAHQT.js.map +0 -1
- package/dist/chunk-4O7R2Z2O.mjs.map +0 -1
- package/dist/chunk-IBVKPLHT.mjs.map +0 -1
- package/dist/chunk-U7QVISQS.js.map +0 -1
- /package/dist/{BlockNoteViewer-KDKGUIG5.mjs.map → BlockNoteViewer-KRTAFTUX.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-RRMNV7YE.mjs.map → JsonApiRequest-UHOWNI3O.mjs.map} +0 -0
- /package/dist/{chunk-T76WLDE5.mjs.map → chunk-37DMFVLN.mjs.map} +0 -0
- /package/dist/{chunk-ZJI5ZZW5.mjs.map → chunk-Q6J2ICKO.mjs.map} +0 -0
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var _chunkGKDHYB2Rjs = require('../../chunk-GKDHYB2R.js');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
@@ -26,8 +27,6 @@
|
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
var _chunk2XCUAHQTjs = require('../../chunk-2XCUAHQT.js');
|
|
30
|
-
require('../../chunk-3AR4KA5D.js');
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
@@ -38,6 +37,8 @@ require('../../chunk-3AR4KA5D.js');
|
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
|
|
40
|
+
var _chunkABVTYQIJjs = require('../../chunk-ABVTYQIJ.js');
|
|
41
|
+
require('../../chunk-4Z45NYPR.js');
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
@@ -45,10 +46,20 @@ require('../../chunk-3AR4KA5D.js');
|
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var _chunkCAKOFJZDjs = require('../../chunk-CAKOFJZD.js');
|
|
60
|
+
require('../../chunk-26MQIJNB.js');
|
|
49
61
|
require('../../chunk-LXKSUWAV.js');
|
|
50
62
|
require('../../chunk-JTPRJNT2.js');
|
|
51
|
-
require('../../chunk-YXRVPEEJ.js');
|
|
52
63
|
require('../../chunk-3EPNHTMH.js');
|
|
53
64
|
|
|
54
65
|
|
|
@@ -69,15 +80,15 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
|
|
|
69
80
|
...Object.fromEntries(companies.map((company) => [company.id, company.label]))
|
|
70
81
|
};
|
|
71
82
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
72
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
73
|
-
|
|
83
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
_chunkABVTYQIJjs.DateRangeSelector,
|
|
74
85
|
{
|
|
75
86
|
onDateChange: (range) => {
|
|
76
87
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
77
88
|
onChange({ from: range.from.toISOString(), to: range.to.toISOString() });
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
|
-
),
|
|
91
|
+
) }),
|
|
81
92
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
93
|
Segmented,
|
|
83
94
|
{
|
|
@@ -105,16 +116,16 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
|
|
|
105
116
|
}
|
|
106
117
|
),
|
|
107
118
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
108
|
-
|
|
119
|
+
_chunkABVTYQIJjs.Select,
|
|
109
120
|
{
|
|
110
121
|
items: companyItems,
|
|
111
122
|
value: _nullishCoalesce(companyId, () => ( ALL_COMPANIES)),
|
|
112
123
|
onValueChange: (value) => onChange({ companyId: !value || value === ALL_COMPANIES ? void 0 : value }),
|
|
113
124
|
children: [
|
|
114
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
115
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
116
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
117
|
-
companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
125
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectTrigger, { className: "w-56", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectValue, { placeholder: t("token_usage.admin.all_companies") }) }),
|
|
126
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.SelectContent, { children: [
|
|
127
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectItem, { value: ALL_COMPANIES, children: t("token_usage.admin.all_companies") }),
|
|
128
|
+
companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectItem, { value: company.id, children: company.label }, company.id))
|
|
118
129
|
] })
|
|
119
130
|
]
|
|
120
131
|
}
|
|
@@ -137,13 +148,13 @@ function Segmented({
|
|
|
137
148
|
children: options.map((option) => {
|
|
138
149
|
const selected = option.value === value;
|
|
139
150
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
140
|
-
|
|
151
|
+
_chunkABVTYQIJjs.Button,
|
|
141
152
|
{
|
|
142
153
|
type: "button",
|
|
143
154
|
size: "sm",
|
|
144
155
|
variant: selected ? "default" : "ghost",
|
|
145
156
|
"aria-pressed": selected,
|
|
146
|
-
className:
|
|
157
|
+
className: _chunkCAKOFJZDjs.cn.call(void 0, !selected && "text-muted-foreground"),
|
|
147
158
|
onClick: () => onSelect(option.value),
|
|
148
159
|
children: option.label
|
|
149
160
|
},
|
|
@@ -163,36 +174,36 @@ function withFilters(endpoint, filters) {
|
|
|
163
174
|
return endpoint;
|
|
164
175
|
}
|
|
165
176
|
_chunk7QVYU63Ejs.__name.call(void 0, withFilters, "withFilters");
|
|
166
|
-
var TokenUsageAdminService = class extends
|
|
177
|
+
var TokenUsageAdminService = class extends _chunkCAKOFJZDjs.AbstractService {
|
|
167
178
|
static {
|
|
168
179
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageAdminService");
|
|
169
180
|
}
|
|
170
181
|
/** Six rows: {customer, platform, total} × {current, previous}. */
|
|
171
182
|
static async getSummary(filters) {
|
|
172
|
-
const endpoint = withFilters(new (0,
|
|
183
|
+
const endpoint = withFilters(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageAdminSummary }), filters);
|
|
173
184
|
return this.callApi({
|
|
174
|
-
type:
|
|
185
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageAdminSummary,
|
|
175
186
|
method: "GET" /* GET */,
|
|
176
187
|
endpoint: endpoint.generate()
|
|
177
188
|
});
|
|
178
189
|
}
|
|
179
190
|
static async getTimeline(params) {
|
|
180
|
-
const endpoint = withFilters(new (0,
|
|
191
|
+
const endpoint = withFilters(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageAdminTimeline }), params);
|
|
181
192
|
endpoint.addAdditionalParam("granularity", params.granularity);
|
|
182
193
|
endpoint.addAdditionalParam("stackBy", params.stackBy);
|
|
183
194
|
return this.callApi({
|
|
184
|
-
type:
|
|
195
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageAdminTimeline,
|
|
185
196
|
method: "GET" /* GET */,
|
|
186
197
|
endpoint: endpoint.generate()
|
|
187
198
|
});
|
|
188
199
|
}
|
|
189
200
|
static async getBreakdown(params) {
|
|
190
|
-
const endpoint = withFilters(new (0,
|
|
201
|
+
const endpoint = withFilters(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageAdminBreakdown }), params);
|
|
191
202
|
endpoint.addAdditionalParam("dimension", params.dimension);
|
|
192
203
|
endpoint.addAdditionalParam("scope", params.scope);
|
|
193
204
|
if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
|
|
194
205
|
return this.callApi({
|
|
195
|
-
type:
|
|
206
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageAdminBreakdown,
|
|
196
207
|
method: "GET" /* GET */,
|
|
197
208
|
endpoint: endpoint.generate()
|
|
198
209
|
});
|
|
@@ -219,7 +230,7 @@ var TokenUsageAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
219
230
|
pageUrl = TOKEN_USAGE_ADMIN_PAGE_URL
|
|
220
231
|
}) => {
|
|
221
232
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
222
|
-
const generateUrl =
|
|
233
|
+
const generateUrl = _chunkABVTYQIJjs.usePageUrlGenerator.call(void 0, );
|
|
223
234
|
const [filters, setFilterState] = _react.useState.call(void 0, () => {
|
|
224
235
|
const range = defaultRange();
|
|
225
236
|
return {
|
|
@@ -337,7 +348,7 @@ var TokenUsageAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
337
348
|
error
|
|
338
349
|
]
|
|
339
350
|
);
|
|
340
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
351
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminContext.Provider, { value: contextValue, children }) });
|
|
341
352
|
}, "TokenUsageAdminProvider");
|
|
342
353
|
var useTokenUsageAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
343
354
|
const ctx = _react.useContext.call(void 0, TokenUsageAdminContext);
|
|
@@ -355,73 +366,10 @@ var useTokenUsageAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
|
|
|
355
366
|
var _lucidereact = require('lucide-react');
|
|
356
367
|
|
|
357
368
|
|
|
358
|
-
// src/features/tokenusage/lib/formatters.ts
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
function createUsageFormatters(locale, currency) {
|
|
362
|
-
const symbol = _nullishCoalesce(_optionalChain([new Intl.NumberFormat(locale, { style: "currency", currency, currencyDisplay: "narrowSymbol" }), 'access', _3 => _3.formatToParts, 'call', _4 => _4(0), 'access', _5 => _5.find, 'call', _6 => _6((part) => part.type === "currency"), 'optionalAccess', _7 => _7.value]), () => ( currency));
|
|
363
|
-
const decimal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value, decimals) => value.toLocaleString(locale, { minimumFractionDigits: decimals, maximumFractionDigits: decimals }), "decimal");
|
|
364
|
-
const dayFormat = new Intl.DateTimeFormat(locale, { day: "numeric", month: "short", timeZone: "UTC" });
|
|
365
|
-
const monthFormat = new Intl.DateTimeFormat(locale, { month: "short", year: "numeric", timeZone: "UTC" });
|
|
366
|
-
const compactFormat = new Intl.NumberFormat(locale, { notation: "compact", maximumFractionDigits: 1 });
|
|
367
|
-
const collator = new Intl.Collator(locale);
|
|
368
|
-
return {
|
|
369
|
-
decimal,
|
|
370
|
-
metricValue(value, metric) {
|
|
371
|
-
if (metric === "cost") return `${symbol} ${decimal(value, 2)}`;
|
|
372
|
-
if (metric === "credits") return decimal(value, 1);
|
|
373
|
-
return decimal(value, 0);
|
|
374
|
-
},
|
|
375
|
-
currency(value, decimals) {
|
|
376
|
-
return `${symbol} ${decimal(value, decimals)}`;
|
|
377
|
-
},
|
|
378
|
-
percent(value, decimals = 1) {
|
|
379
|
-
return `${decimal(value, decimals)} %`;
|
|
380
|
-
},
|
|
381
|
-
compact(value) {
|
|
382
|
-
return compactFormat.format(value);
|
|
383
|
-
},
|
|
384
|
-
bucketDate(iso, granularity) {
|
|
385
|
-
const date = /* @__PURE__ */ new Date(`${iso}T00:00:00.000Z`);
|
|
386
|
-
return granularity === "month" ? monthFormat.format(date) : dayFormat.format(date);
|
|
387
|
-
},
|
|
388
|
-
compare(a, b) {
|
|
389
|
-
return collator.compare(a, b);
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
_chunk7QVYU63Ejs.__name.call(void 0, createUsageFormatters, "createUsageFormatters");
|
|
394
|
-
function useUsageFormatters() {
|
|
395
|
-
const locale = _nextintl.useLocale.call(void 0, );
|
|
396
|
-
const currency = _chunkU7QVISQSjs.getTokenUsageCurrency.call(void 0, );
|
|
397
|
-
return _react.useMemo.call(void 0, () => createUsageFormatters(locale, currency), [locale, currency]);
|
|
398
|
-
}
|
|
399
|
-
_chunk7QVYU63Ejs.__name.call(void 0, useUsageFormatters, "useUsageFormatters");
|
|
400
|
-
|
|
401
|
-
// src/features/tokenusage/lib/metrics.ts
|
|
402
|
-
function metricValue(row, metric) {
|
|
403
|
-
if (metric === "cost") return row.cost;
|
|
404
|
-
if (metric === "credits") return row.credits;
|
|
405
|
-
return row.tokensIn + row.tokensOut;
|
|
406
|
-
}
|
|
407
|
-
_chunk7QVYU63Ejs.__name.call(void 0, metricValue, "metricValue");
|
|
408
|
-
function cacheHitPercentage(cached, tokensIn) {
|
|
409
|
-
if (!tokensIn) return 0;
|
|
410
|
-
return cached / tokensIn * 100;
|
|
411
|
-
}
|
|
412
|
-
_chunk7QVYU63Ejs.__name.call(void 0, cacheHitPercentage, "cacheHitPercentage");
|
|
413
|
-
function percentageDelta(current, previous) {
|
|
414
|
-
if (!previous) return void 0;
|
|
415
|
-
return Math.round((current - previous) / previous * 100);
|
|
416
|
-
}
|
|
417
|
-
_chunk7QVYU63Ejs.__name.call(void 0, percentageDelta, "percentageDelta");
|
|
418
|
-
|
|
419
|
-
// src/features/tokenusage/components/TokenUsageAdminTiles.tsx
|
|
420
|
-
|
|
421
369
|
var ZERO = { cost: 0, credits: 0, tokensIn: 0, tokensOut: 0, cached: 0, calls: 0 };
|
|
422
370
|
function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
|
|
423
371
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
424
|
-
const { decimal, metricValue: formatValue, currency, percent } = useUsageFormatters();
|
|
372
|
+
const { decimal, metricValue: formatValue, currency, percent } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
425
373
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (scope, window) => _nullishCoalesce(summary.find((r) => r.scope === scope && r.window === window), () => ( ZERO)), "rowFor");
|
|
426
374
|
const customerCurrent = rowFor("customer", "current");
|
|
427
375
|
const customerPrevious = rowFor("customer", "previous");
|
|
@@ -430,16 +378,16 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
|
|
|
430
378
|
const totalCurrent = rowFor("total", "current");
|
|
431
379
|
const totalPrevious = rowFor("total", "previous");
|
|
432
380
|
const averagePerCall = totalCurrent.calls ? totalCurrent.cost / totalCurrent.calls : 0;
|
|
433
|
-
const cacheHit = cacheHitPercentage(totalCurrent.cached, totalCurrent.tokensIn);
|
|
381
|
+
const cacheHit = _chunkGKDHYB2Rjs.cacheHitPercentage.call(void 0, totalCurrent.cached, totalCurrent.tokensIn);
|
|
434
382
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
|
|
435
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className:
|
|
383
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkCAKOFJZDjs.cn.call(void 0, "grid gap-3", singleCustomerMode ? "sm:grid-cols-1" : "sm:grid-cols-2"), children: [
|
|
436
384
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
437
385
|
LeadTile,
|
|
438
386
|
{
|
|
439
387
|
testId: "tile-customer",
|
|
440
388
|
label: t("token_usage.admin.customer_spend"),
|
|
441
|
-
value: formatValue(metricValue(customerCurrent, metric), metric),
|
|
442
|
-
delta: percentageDelta(metricValue(customerCurrent, metric), metricValue(customerPrevious, metric)),
|
|
389
|
+
value: formatValue(_chunkGKDHYB2Rjs.metricValue.call(void 0, customerCurrent, metric), metric),
|
|
390
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, _chunkGKDHYB2Rjs.metricValue.call(void 0, customerCurrent, metric), _chunkGKDHYB2Rjs.metricValue.call(void 0, customerPrevious, metric)),
|
|
443
391
|
previousLabel: t("token_usage.admin.vs_previous"),
|
|
444
392
|
decimal
|
|
445
393
|
}
|
|
@@ -449,8 +397,8 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
|
|
|
449
397
|
{
|
|
450
398
|
testId: "tile-platform",
|
|
451
399
|
label: t("token_usage.admin.platform_spend"),
|
|
452
|
-
value: formatValue(metricValue(platformCurrent, metric), metric),
|
|
453
|
-
delta: percentageDelta(metricValue(platformCurrent, metric), metricValue(platformPrevious, metric)),
|
|
400
|
+
value: formatValue(_chunkGKDHYB2Rjs.metricValue.call(void 0, platformCurrent, metric), metric),
|
|
401
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, _chunkGKDHYB2Rjs.metricValue.call(void 0, platformCurrent, metric), _chunkGKDHYB2Rjs.metricValue.call(void 0, platformPrevious, metric)),
|
|
454
402
|
previousLabel: t("token_usage.admin.vs_previous"),
|
|
455
403
|
decimal
|
|
456
404
|
}
|
|
@@ -462,8 +410,8 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
|
|
|
462
410
|
{
|
|
463
411
|
testId: "tile-total",
|
|
464
412
|
label: t("token_usage.admin.total_cost"),
|
|
465
|
-
value: formatValue(metricValue(totalCurrent, metric), metric),
|
|
466
|
-
delta: percentageDelta(metricValue(totalCurrent, metric), metricValue(totalPrevious, metric)),
|
|
413
|
+
value: formatValue(_chunkGKDHYB2Rjs.metricValue.call(void 0, totalCurrent, metric), metric),
|
|
414
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, _chunkGKDHYB2Rjs.metricValue.call(void 0, totalCurrent, metric), _chunkGKDHYB2Rjs.metricValue.call(void 0, totalPrevious, metric)),
|
|
467
415
|
decimal
|
|
468
416
|
}
|
|
469
417
|
),
|
|
@@ -497,7 +445,7 @@ function LeadTile({
|
|
|
497
445
|
previousLabel,
|
|
498
446
|
decimal
|
|
499
447
|
}) {
|
|
500
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
448
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
501
449
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
|
|
502
450
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
503
451
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
@@ -514,7 +462,7 @@ function SupportingTile({
|
|
|
514
462
|
delta,
|
|
515
463
|
decimal
|
|
516
464
|
}) {
|
|
517
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
465
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
518
466
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
|
|
519
467
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
520
468
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
@@ -537,7 +485,7 @@ function Delta({
|
|
|
537
485
|
"span",
|
|
538
486
|
{
|
|
539
487
|
"data-testid": testId,
|
|
540
|
-
className:
|
|
488
|
+
className: _chunkCAKOFJZDjs.cn.call(void 0,
|
|
541
489
|
"inline-flex items-center gap-0.5 text-xs tabular-nums",
|
|
542
490
|
increased ? "text-success" : "text-destructive"
|
|
543
491
|
),
|
|
@@ -558,10 +506,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, Delta, "Delta");
|
|
|
558
506
|
|
|
559
507
|
function TokenUsageBreakdownTable({ rows, metric }) {
|
|
560
508
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
561
|
-
const { decimal, metricValue: formatValue, percent, compare } = useUsageFormatters();
|
|
509
|
+
const { decimal, metricValue: formatValue, percent, compare } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
562
510
|
const [sort, setSort] = _react.useState.call(void 0, void 0);
|
|
563
511
|
const showActiveUsers = rows.some((row) => row.activeUsers !== void 0);
|
|
564
|
-
const total = _react.useMemo.call(void 0, () => rows.reduce((sum, row) => sum + metricValue(row, metric), 0), [rows, metric]);
|
|
512
|
+
const total = _react.useMemo.call(void 0, () => rows.reduce((sum, row) => sum + _chunkGKDHYB2Rjs.metricValue.call(void 0, row, metric), 0), [rows, metric]);
|
|
565
513
|
const sortValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, key) => {
|
|
566
514
|
switch (key) {
|
|
567
515
|
case "label":
|
|
@@ -571,9 +519,9 @@ function TokenUsageBreakdownTable({ rows, metric }) {
|
|
|
571
519
|
case "activeUsers":
|
|
572
520
|
return _nullishCoalesce(row.activeUsers, () => ( 0));
|
|
573
521
|
case "cacheHit":
|
|
574
|
-
return cacheHitPercentage(row.cached, row.tokensIn);
|
|
522
|
+
return _chunkGKDHYB2Rjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn);
|
|
575
523
|
case "share":
|
|
576
|
-
return metricValue(row, metric);
|
|
524
|
+
return _chunkGKDHYB2Rjs.metricValue.call(void 0, row, metric);
|
|
577
525
|
default:
|
|
578
526
|
return row[key];
|
|
579
527
|
}
|
|
@@ -591,7 +539,7 @@ function TokenUsageBreakdownTable({ rows, metric }) {
|
|
|
591
539
|
});
|
|
592
540
|
}, [rows, sort, metric, compare]);
|
|
593
541
|
const toggleSort = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (key) => setSort(
|
|
594
|
-
(current) => _optionalChain([current, 'optionalAccess',
|
|
542
|
+
(current) => _optionalChain([current, 'optionalAccess', _3 => _3.key]) === key ? { key, direction: current.direction === "desc" ? "asc" : "desc" } : { key, direction: "desc" }
|
|
595
543
|
), "toggleSort");
|
|
596
544
|
const columns = [
|
|
597
545
|
{ key: "label", label: t("token_usage.admin.columns.label"), numeric: false },
|
|
@@ -611,36 +559,36 @@ function TokenUsageBreakdownTable({ rows, metric }) {
|
|
|
611
559
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
612
560
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
613
561
|
// child override. Wide metric tables must scroll, never widen the page.
|
|
614
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
615
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
562
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Table, { children: [
|
|
563
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableHead, { className: _chunkCAKOFJZDjs.cn.call(void 0, column.numeric && "text-end"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
616
564
|
"button",
|
|
617
565
|
{
|
|
618
566
|
type: "button",
|
|
619
567
|
onClick: () => toggleSort(column.key),
|
|
620
|
-
className:
|
|
568
|
+
className: _chunkCAKOFJZDjs.cn.call(void 0,
|
|
621
569
|
"hover:text-primary inline-flex items-center gap-1 text-xs font-medium",
|
|
622
570
|
column.numeric && "flex-row-reverse"
|
|
623
571
|
),
|
|
624
572
|
children: [
|
|
625
573
|
column.label,
|
|
626
|
-
_optionalChain([sort, 'optionalAccess',
|
|
574
|
+
_optionalChain([sort, 'optionalAccess', _4 => _4.key]) === column.key && (sort.direction === "desc" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowDownIcon, { "aria-hidden": true, className: "size-3" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowUpIcon, { "aria-hidden": true, className: "size-3" }))
|
|
627
575
|
]
|
|
628
576
|
}
|
|
629
577
|
) }, column.key)) }) }),
|
|
630
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
631
|
-
const value = metricValue(row, metric);
|
|
578
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableBody, { children: sortedRows.map((row) => {
|
|
579
|
+
const value = _chunkGKDHYB2Rjs.metricValue.call(void 0, row, metric);
|
|
632
580
|
const share = total > 0 ? value / total * 100 : 0;
|
|
633
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
634
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
635
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
-
showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
637
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
638
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
639
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
640
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
641
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
642
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
643
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
581
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
|
|
582
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
|
|
583
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-muted-foreground text-xs", children: _nullishCoalesce(row.sublabel, () => ( "")) }),
|
|
584
|
+
showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
|
|
585
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.calls, 0) }),
|
|
586
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
|
|
587
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
|
|
588
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(_chunkGKDHYB2Rjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn)) }),
|
|
589
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
|
|
590
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
|
|
591
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(share) })
|
|
644
592
|
] }, row.id);
|
|
645
593
|
}) })
|
|
646
594
|
] }) })
|
|
@@ -665,41 +613,11 @@ var operationLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (type,
|
|
|
665
613
|
return has(key) ? translate(key) : type;
|
|
666
614
|
}, "operationLabel");
|
|
667
615
|
|
|
668
|
-
// src/features/tokenusage/lib/palette.ts
|
|
669
|
-
var CATEGORICAL_LIGHT = [
|
|
670
|
-
"#2a78d6",
|
|
671
|
-
"#eb6834",
|
|
672
|
-
"#1baf7a",
|
|
673
|
-
"#eda100",
|
|
674
|
-
"#e87ba4",
|
|
675
|
-
"#008300",
|
|
676
|
-
"#4a3aa7"
|
|
677
|
-
];
|
|
678
|
-
var CATEGORICAL_DARK = [
|
|
679
|
-
"#3987e5",
|
|
680
|
-
"#d95926",
|
|
681
|
-
"#199e70",
|
|
682
|
-
"#c98500",
|
|
683
|
-
"#d55181",
|
|
684
|
-
"#008300",
|
|
685
|
-
"#9085e9"
|
|
686
|
-
];
|
|
687
|
-
var CATEGORICAL_CEILING = CATEGORICAL_LIGHT.length;
|
|
688
|
-
var OTHER_COLOR = "#898781";
|
|
689
|
-
var SEQUENTIAL_RAMP_LIGHT = ["#104281", "#1c5cab", "#2a78d6", "#5598e7", "#86b6ef"];
|
|
690
|
-
var SEQUENTIAL_RAMP = SEQUENTIAL_RAMP_LIGHT;
|
|
691
|
-
var categoricalSet = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (mode) => mode === "dark" ? CATEGORICAL_DARK : CATEGORICAL_LIGHT, "categoricalSet");
|
|
692
|
-
function seriesColor(index, mode = "light") {
|
|
693
|
-
if (index < 0 || index >= CATEGORICAL_CEILING) return OTHER_COLOR;
|
|
694
|
-
return categoricalSet(mode)[index];
|
|
695
|
-
}
|
|
696
|
-
_chunk7QVYU63Ejs.__name.call(void 0, seriesColor, "seriesColor");
|
|
697
|
-
|
|
698
616
|
// src/features/tokenusage/components/TokenUsageRankedBar.tsx
|
|
699
617
|
|
|
700
618
|
function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes = false }) {
|
|
701
619
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
702
|
-
const { metricValue: formatValue, percent } = useUsageFormatters();
|
|
620
|
+
const { metricValue: formatValue, percent } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
703
621
|
const renderLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row) => {
|
|
704
622
|
if (row.id === "other") return t("token_usage.admin.other");
|
|
705
623
|
if (!labelsAreOperationTypes) return row.label;
|
|
@@ -712,13 +630,13 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
|
|
|
712
630
|
if (rows.length === 0) {
|
|
713
631
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground py-6 text-center text-sm", children: emptyLabel });
|
|
714
632
|
}
|
|
715
|
-
const values = rows.map((row) => metricValue(row, metric));
|
|
633
|
+
const values = rows.map((row) => _chunkGKDHYB2Rjs.metricValue.call(void 0, row, metric));
|
|
716
634
|
const total = values.reduce((sum, value) => sum + value, 0);
|
|
717
635
|
const max = Math.max(...values, 0);
|
|
718
636
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid gap-0.5", children: rows.map((row, index) => {
|
|
719
637
|
const value = values[index];
|
|
720
638
|
const isOther = row.id === "other";
|
|
721
|
-
const step = isOther ? SEQUENTIAL_RAMP.length - 1 : Math.min(index, SEQUENTIAL_RAMP.length - 1);
|
|
639
|
+
const step = isOther ? _chunkGKDHYB2Rjs.SEQUENTIAL_RAMP.length - 1 : Math.min(index, _chunkGKDHYB2Rjs.SEQUENTIAL_RAMP.length - 1);
|
|
722
640
|
const width = max > 0 ? value / max * 100 : 0;
|
|
723
641
|
const share = total > 0 ? value / total * 100 : 0;
|
|
724
642
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-3 gap-y-0.5 py-0.5", children: [
|
|
@@ -730,7 +648,7 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
|
|
|
730
648
|
"data-testid": `ranked-fill-${row.id}`,
|
|
731
649
|
"data-ramp-step": String(step),
|
|
732
650
|
className: "h-full rounded-r-[4px]",
|
|
733
|
-
style: { width: `${width}%`, backgroundColor: SEQUENTIAL_RAMP[step] }
|
|
651
|
+
style: { width: `${width}%`, backgroundColor: _chunkGKDHYB2Rjs.SEQUENTIAL_RAMP[step] }
|
|
734
652
|
}
|
|
735
653
|
) })
|
|
736
654
|
] }),
|
|
@@ -780,7 +698,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
780
698
|
}, "inferGranularity");
|
|
781
699
|
function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
782
700
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
783
|
-
const { compact, bucketDate, metricValue: formatValue } = useUsageFormatters();
|
|
701
|
+
const { compact, bucketDate, metricValue: formatValue } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
784
702
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
785
703
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
786
704
|
const { chartData, seriesKeys } = _react.useMemo.call(void 0, () => {
|
|
@@ -788,8 +706,8 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
|
788
706
|
const totals = /* @__PURE__ */ new Map();
|
|
789
707
|
for (const row of rows) totals.set(row.series, (_nullishCoalesce(totals.get(row.series), () => ( 0))) + metricValue2(row, metric));
|
|
790
708
|
const ranked = [...totals.entries()].sort((a, b) => b[1] - a[1]).map(([series]) => series);
|
|
791
|
-
const named = ranked.slice(0, CATEGORICAL_CEILING);
|
|
792
|
-
const folded = new Set(ranked.slice(CATEGORICAL_CEILING));
|
|
709
|
+
const named = ranked.slice(0, _chunkGKDHYB2Rjs.CATEGORICAL_CEILING);
|
|
710
|
+
const folded = new Set(ranked.slice(_chunkGKDHYB2Rjs.CATEGORICAL_CEILING));
|
|
793
711
|
const keys = folded.size > 0 ? [...named, OTHER_SERIES] : named;
|
|
794
712
|
const byBucket = /* @__PURE__ */ new Map();
|
|
795
713
|
for (const row of rows) {
|
|
@@ -829,7 +747,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
|
829
747
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: className ? `text-muted-foreground text-sm ${className}` : "text-muted-foreground text-sm", children: t.has(key) ? t(key) : "No data in the selected period" });
|
|
830
748
|
}
|
|
831
749
|
const granularity = inferGranularity(chartData.map((entry) => entry.bucket));
|
|
832
|
-
const seriesColorFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (series, index) => series === OTHER_SERIES ? OTHER_COLOR : seriesColor(index, mode), "seriesColorFor");
|
|
750
|
+
const seriesColorFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (series, index) => series === OTHER_SERIES ? _chunkGKDHYB2Rjs.OTHER_COLOR : _chunkGKDHYB2Rjs.seriesColor.call(void 0, index, mode), "seriesColorFor");
|
|
833
751
|
return (
|
|
834
752
|
// The chart is a coordinate system, not prose: recharts lays the axes and the
|
|
835
753
|
// stacked bars out left-to-right, so the whole chart stays an LTR island even
|
|
@@ -838,7 +756,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
|
838
756
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
839
757
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-data", children: JSON.stringify(chartData) }),
|
|
840
758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-series", children: JSON.stringify(seriesKeys) }),
|
|
841
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
759
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
|
|
842
760
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
843
761
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
844
762
|
_recharts.XAxis,
|
|
@@ -862,10 +780,10 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
|
862
780
|
}
|
|
863
781
|
),
|
|
864
782
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
865
|
-
|
|
783
|
+
_chunkABVTYQIJjs.ChartTooltip,
|
|
866
784
|
{
|
|
867
785
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
868
|
-
|
|
786
|
+
_chunkABVTYQIJjs.ChartTooltipContent,
|
|
869
787
|
{
|
|
870
788
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
871
789
|
valueFormatter: (value) => formatValue(Number(value), metric),
|
|
@@ -874,7 +792,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
|
|
|
874
792
|
)
|
|
875
793
|
}
|
|
876
794
|
),
|
|
877
|
-
seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
795
|
+
seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.ChartLegendContent, {}) }) : null,
|
|
878
796
|
seriesKeys.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
879
797
|
_recharts.Bar,
|
|
880
798
|
{
|
|
@@ -926,19 +844,19 @@ function TokenUsageAdminContainer() {
|
|
|
926
844
|
[t]
|
|
927
845
|
);
|
|
928
846
|
if (error) {
|
|
929
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
930
848
|
}
|
|
931
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
849
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
932
850
|
const emptyLabel = t("token_usage.admin.no_data");
|
|
933
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
851
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
934
852
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminTiles, { summary, metric: filters.metric, singleCustomerMode: hidePlatform }),
|
|
935
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
936
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
937
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
938
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
853
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
854
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: [
|
|
855
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.usage_over_time") }),
|
|
856
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardAction, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
939
857
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.admin.stack_by") }),
|
|
940
858
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
941
|
-
|
|
859
|
+
_chunkABVTYQIJjs.Select,
|
|
942
860
|
{
|
|
943
861
|
items: stackByItems,
|
|
944
862
|
value: filters.stackBy,
|
|
@@ -946,29 +864,29 @@ function TokenUsageAdminContainer() {
|
|
|
946
864
|
if (value) setFilters({ stackBy: value });
|
|
947
865
|
},
|
|
948
866
|
children: [
|
|
949
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
950
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
867
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectTrigger, { size: "sm", className: "w-36", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectValue, {}) }),
|
|
868
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectContent, { children: STACK_BY_VALUES.map((value) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SelectItem, { value, children: stackByItems[value] }, value)) })
|
|
951
869
|
]
|
|
952
870
|
}
|
|
953
871
|
)
|
|
954
872
|
] }) })
|
|
955
873
|
] }),
|
|
956
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: filters.metric, stackBy: filters.stackBy }) })
|
|
957
875
|
] }),
|
|
958
876
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-4 md:grid-cols-2", children: [
|
|
959
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
960
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
961
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
877
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
878
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.by_company") }) }),
|
|
879
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byCompany, metric: filters.metric, emptyLabel }) })
|
|
962
880
|
] }),
|
|
963
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
964
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
965
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
881
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
882
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.by_user") }) }),
|
|
883
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byUser, metric: filters.metric, emptyLabel }) })
|
|
966
884
|
] })
|
|
967
885
|
] }),
|
|
968
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className:
|
|
969
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
970
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
971
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
886
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkCAKOFJZDjs.cn.call(void 0, "grid gap-4", !hidePlatform && "md:grid-cols-2"), children: [
|
|
887
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
888
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.customer_by_operation") }) }),
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
972
890
|
TokenUsageRankedBar,
|
|
973
891
|
{
|
|
974
892
|
rows: byCustomerOperation,
|
|
@@ -978,9 +896,9 @@ function TokenUsageAdminContainer() {
|
|
|
978
896
|
}
|
|
979
897
|
) })
|
|
980
898
|
] }),
|
|
981
|
-
!hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
982
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
983
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
+
!hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.platform_by_operation") }) }),
|
|
901
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
984
902
|
TokenUsageRankedBar,
|
|
985
903
|
{
|
|
986
904
|
rows: byOperation,
|
|
@@ -991,9 +909,9 @@ function TokenUsageAdminContainer() {
|
|
|
991
909
|
) })
|
|
992
910
|
] })
|
|
993
911
|
] }),
|
|
994
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
995
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
996
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
912
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
913
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.admin.detail") }) }),
|
|
914
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageBreakdownTable, { rows: byCompany, metric: filters.metric }) })
|
|
997
915
|
] })
|
|
998
916
|
] }) });
|
|
999
917
|
}
|
|
@@ -1006,36 +924,36 @@ function withFilters2(endpoint, filters) {
|
|
|
1006
924
|
return endpoint;
|
|
1007
925
|
}
|
|
1008
926
|
_chunk7QVYU63Ejs.__name.call(void 0, withFilters2, "withFilters");
|
|
1009
|
-
var TokenUsageReportService = class extends
|
|
927
|
+
var TokenUsageReportService = class extends _chunkCAKOFJZDjs.AbstractService {
|
|
1010
928
|
static {
|
|
1011
929
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageReportService");
|
|
1012
930
|
}
|
|
1013
931
|
/** Two rows: window "current" and "previous". */
|
|
1014
932
|
static async getSummary(filters) {
|
|
1015
|
-
const endpoint = withFilters2(new (0,
|
|
933
|
+
const endpoint = withFilters2(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageReportSummary }), filters);
|
|
1016
934
|
return this.callApi({
|
|
1017
|
-
type:
|
|
935
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageReportSummary,
|
|
1018
936
|
method: "GET" /* GET */,
|
|
1019
937
|
endpoint: endpoint.generate()
|
|
1020
938
|
});
|
|
1021
939
|
}
|
|
1022
940
|
static async getTimeline(params) {
|
|
1023
|
-
const endpoint = withFilters2(new (0,
|
|
941
|
+
const endpoint = withFilters2(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageReportTimeline }), params);
|
|
1024
942
|
endpoint.addAdditionalParam("granularity", params.granularity);
|
|
1025
943
|
return this.callApi({
|
|
1026
|
-
type:
|
|
944
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageReportTimeline,
|
|
1027
945
|
method: "GET" /* GET */,
|
|
1028
946
|
endpoint: endpoint.generate()
|
|
1029
947
|
});
|
|
1030
948
|
}
|
|
1031
949
|
static async getBreakdown(params) {
|
|
1032
|
-
const endpoint = withFilters2(new (0,
|
|
950
|
+
const endpoint = withFilters2(new (0, _chunkCAKOFJZDjs.EndpointCreator)({ endpoint: _chunkCAKOFJZDjs.Modules.TokenUsageReportBreakdown }), params);
|
|
1033
951
|
endpoint.addAdditionalParam("dimension", params.dimension);
|
|
1034
952
|
if (params.targetLabel) endpoint.addAdditionalParam("targetLabel", params.targetLabel);
|
|
1035
953
|
endpoint.addAdditionalParam("metric", params.metric);
|
|
1036
954
|
if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
|
|
1037
955
|
return this.callApi({
|
|
1038
|
-
type:
|
|
956
|
+
type: _chunkCAKOFJZDjs.Modules.TokenUsageReportBreakdown,
|
|
1039
957
|
method: "GET" /* GET */,
|
|
1040
958
|
endpoint: endpoint.generate()
|
|
1041
959
|
});
|
|
@@ -1114,10 +1032,10 @@ var TOKEN_USAGE_REPORT_I18N_KEYS = [
|
|
|
1114
1032
|
|
|
1115
1033
|
function TokenUsageReportFilterBar({ onChange }) {
|
|
1116
1034
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-help": "tokenusage.filters", className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1117
|
-
|
|
1035
|
+
_chunkABVTYQIJjs.DateRangeSelector,
|
|
1118
1036
|
{
|
|
1119
1037
|
onDateChange: (range) => {
|
|
1120
|
-
if (!_optionalChain([range, 'optionalAccess',
|
|
1038
|
+
if (!_optionalChain([range, 'optionalAccess', _5 => _5.from]) || !_optionalChain([range, 'optionalAccess', _6 => _6.to])) return;
|
|
1121
1039
|
onChange({ from: range.from.toISOString(), to: range.to.toISOString() });
|
|
1122
1040
|
}
|
|
1123
1041
|
}
|
|
@@ -1147,7 +1065,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
1147
1065
|
pageUrl = TOKEN_USAGE_REPORT_PAGE_URL
|
|
1148
1066
|
}) => {
|
|
1149
1067
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1150
|
-
const generateUrl =
|
|
1068
|
+
const generateUrl = _chunkABVTYQIJjs.usePageUrlGenerator.call(void 0, );
|
|
1151
1069
|
const [filters, setFilterState] = _react.useState.call(void 0, () => {
|
|
1152
1070
|
const range = defaultRange2();
|
|
1153
1071
|
return { from: _nullishCoalesce(initialFrom, () => ( range.from)), to: _nullishCoalesce(initialTo, () => ( range.to)) };
|
|
@@ -1211,7 +1129,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
1211
1129
|
() => ({ summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error }),
|
|
1212
1130
|
[summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error]
|
|
1213
1131
|
);
|
|
1214
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1132
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportContext.Provider, { value: contextValue, children }) });
|
|
1215
1133
|
}, "TokenUsageReportProvider");
|
|
1216
1134
|
var useTokenUsageReport = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
1217
1135
|
const ctx = _react.useContext.call(void 0, TokenUsageReportContext);
|
|
@@ -1231,7 +1149,7 @@ var useTokenUsageReport = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
1231
1149
|
var ZERO2 = { cost: 0, credits: 0, tokensIn: 0, tokensOut: 0, cached: 0, calls: 0 };
|
|
1232
1150
|
function TokenUsageReportTiles({ summary, metric, balances }) {
|
|
1233
1151
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1234
|
-
const { decimal, metricValue: formatValue } = useUsageFormatters();
|
|
1152
|
+
const { decimal, metricValue: formatValue } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
1235
1153
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window) => _nullishCoalesce(summary.find((row) => row.window === window), () => ( ZERO2)), "rowFor");
|
|
1236
1154
|
const current = rowFor("current");
|
|
1237
1155
|
const previous = rowFor("previous");
|
|
@@ -1239,15 +1157,15 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
|
|
|
1239
1157
|
const monthlyColor = monthlyPercentage > 75 ? "text-success" : monthlyPercentage >= 5 ? "text-warning" : "text-destructive";
|
|
1240
1158
|
const whole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value) => decimal(Math.max(0, Math.floor(value)), 0), "whole");
|
|
1241
1159
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
|
|
1242
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1160
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": "tile-used", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
1243
1161
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.used_in_period") }),
|
|
1244
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: formatValue(metricValue(current, metric), metric) }),
|
|
1162
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: formatValue(_chunkGKDHYB2Rjs.metricValue.call(void 0, current, metric), metric) }),
|
|
1245
1163
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
1246
1164
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1247
1165
|
Delta2,
|
|
1248
1166
|
{
|
|
1249
1167
|
testId: "tile-used-delta",
|
|
1250
|
-
delta: percentageDelta(metricValue(current, metric), metricValue(previous, metric)),
|
|
1168
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, _chunkGKDHYB2Rjs.metricValue.call(void 0, current, metric), _chunkGKDHYB2Rjs.metricValue.call(void 0, previous, metric)),
|
|
1251
1169
|
decimal
|
|
1252
1170
|
}
|
|
1253
1171
|
),
|
|
@@ -1255,21 +1173,21 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
|
|
|
1255
1173
|
] })
|
|
1256
1174
|
] }) }),
|
|
1257
1175
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1258
|
-
balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1176
|
+
balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": "tile-monthly", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
1259
1177
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.monthly_left") }),
|
|
1260
1178
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-baseline gap-1", children: [
|
|
1261
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className:
|
|
1179
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className: _chunkCAKOFJZDjs.cn.call(void 0, "text-sm font-medium tabular-nums", monthlyColor), children: whole(balances.availableMonthlyCredits) }),
|
|
1262
1180
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: [
|
|
1263
1181
|
"/ ",
|
|
1264
1182
|
whole(balances.monthlyCredits)
|
|
1265
1183
|
] })
|
|
1266
1184
|
] })
|
|
1267
1185
|
] }) }),
|
|
1268
|
-
balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1186
|
+
balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": "tile-extra", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
1269
1187
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.extra_credits") }),
|
|
1270
1188
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: whole(balances.availableExtraCredits) })
|
|
1271
1189
|
] }) }),
|
|
1272
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1190
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { "data-testid": "tile-calls", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.CardContent, { className: "grid gap-1", children: [
|
|
1273
1191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.calls") }),
|
|
1274
1192
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: decimal(current.calls, 0) })
|
|
1275
1193
|
] }) })
|
|
@@ -1291,7 +1209,7 @@ function Delta2({
|
|
|
1291
1209
|
"span",
|
|
1292
1210
|
{
|
|
1293
1211
|
"data-testid": testId,
|
|
1294
|
-
className:
|
|
1212
|
+
className: _chunkCAKOFJZDjs.cn.call(void 0,
|
|
1295
1213
|
"inline-flex items-center gap-0.5 text-xs tabular-nums",
|
|
1296
1214
|
increased ? "text-warning" : "text-success"
|
|
1297
1215
|
),
|
|
@@ -1311,21 +1229,21 @@ function TokenUsageReportContainer({ balances = null }) {
|
|
|
1311
1229
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1312
1230
|
const { summary, timeline, byOperation, byTarget, isLoading, error, targetPanelTitleKey } = useTokenUsageReport();
|
|
1313
1231
|
if (error) {
|
|
1314
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1232
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
1315
1233
|
}
|
|
1316
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1234
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
1317
1235
|
const emptyLabel = t("token_usage.report.no_data");
|
|
1318
1236
|
const targetTitle = targetPanelTitleKey && byTarget.length > 0 ? t(targetPanelTitleKey) : void 0;
|
|
1319
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1237
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
1320
1238
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportTiles, { summary, metric: "credits", balances }),
|
|
1321
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1322
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1323
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1239
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
1240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.report.usage_over_time") }) }),
|
|
1241
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: "credits", stackBy: "type" }) })
|
|
1324
1242
|
] }),
|
|
1325
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className:
|
|
1326
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1327
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1328
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1243
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkCAKOFJZDjs.cn.call(void 0, "grid gap-4", targetTitle && "md:grid-cols-2"), children: [
|
|
1244
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
1245
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: t("token_usage.report.by_operation") }) }),
|
|
1246
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1329
1247
|
TokenUsageRankedBar,
|
|
1330
1248
|
{
|
|
1331
1249
|
rows: byOperation,
|
|
@@ -1335,9 +1253,9 @@ function TokenUsageReportContainer({ balances = null }) {
|
|
|
1335
1253
|
}
|
|
1336
1254
|
) })
|
|
1337
1255
|
] }),
|
|
1338
|
-
targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1339
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1340
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1256
|
+
targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkABVTYQIJjs.Card, { children: [
|
|
1257
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardTitle, { children: targetTitle }) }),
|
|
1258
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkABVTYQIJjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byTarget, metric: "credits", emptyLabel }) })
|
|
1341
1259
|
] })
|
|
1342
1260
|
] })
|
|
1343
1261
|
] }) });
|
|
@@ -1375,5 +1293,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, TokenUsageReportContainer, "TokenUsageRepor
|
|
|
1375
1293
|
|
|
1376
1294
|
|
|
1377
1295
|
|
|
1378
|
-
exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown =
|
|
1296
|
+
exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown = _chunkCAKOFJZDjs.TokenUsageAdminBreakdown; exports.TokenUsageAdminBreakdownModule = _chunkCAKOFJZDjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminContainer = TokenUsageAdminContainer; exports.TokenUsageAdminFilterBar = TokenUsageAdminFilterBar; exports.TokenUsageAdminProvider = TokenUsageAdminProvider; exports.TokenUsageAdminService = TokenUsageAdminService; exports.TokenUsageAdminSummary = _chunkCAKOFJZDjs.TokenUsageAdminSummary; exports.TokenUsageAdminSummaryModule = _chunkCAKOFJZDjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTiles = TokenUsageAdminTiles; exports.TokenUsageAdminTimeline = _chunkCAKOFJZDjs.TokenUsageAdminTimeline; exports.TokenUsageAdminTimelineModule = _chunkCAKOFJZDjs.TokenUsageAdminTimelineModule; exports.TokenUsageBreakdownTable = TokenUsageBreakdownTable; exports.TokenUsageRankedBar = TokenUsageRankedBar; exports.TokenUsageReportBreakdown = _chunkCAKOFJZDjs.TokenUsageReportBreakdown; exports.TokenUsageReportContainer = TokenUsageReportContainer; exports.TokenUsageReportFilterBar = TokenUsageReportFilterBar; exports.TokenUsageReportProvider = TokenUsageReportProvider; exports.TokenUsageReportService = TokenUsageReportService; exports.TokenUsageReportSummary = _chunkCAKOFJZDjs.TokenUsageReportSummary; exports.TokenUsageReportTiles = TokenUsageReportTiles; exports.TokenUsageReportTimeline = _chunkCAKOFJZDjs.TokenUsageReportTimeline; exports.TokenUsageTimelineChart = TokenUsageTimelineChart; exports.configureTokenUsage = _chunkCAKOFJZDjs.configureTokenUsage; exports.createUsageFormatters = _chunkGKDHYB2Rjs.createUsageFormatters; exports.getTokenUsageCurrency = _chunkCAKOFJZDjs.getTokenUsageCurrency; exports.tokenUsageModules = _chunkCAKOFJZDjs.tokenUsageModules; exports.useTokenUsageAdmin = useTokenUsageAdmin; exports.useTokenUsageReport = useTokenUsageReport; exports.useUsageFormatters = _chunkGKDHYB2Rjs.useUsageFormatters;
|
|
1379
1297
|
//# sourceMappingURL=index.js.map
|