@burdenoff/microfe-billing 2026.825.1 → 2026.825.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,27 +4,27 @@ import { QuotaStatus as n } from "../../../shared/types/graphql.js";
4
4
  import { formatDateTime as r, formatNumber as i, formatRelativeTime as a } from "../../../shared/utils/format.js";
5
5
  import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
6
6
  import { useBillingAccountsForUsage as s, useEnhancedUsagePage as c, useQuotaUsageDetails as l, useWorkspaceQuotaHistory as u, useWorkspaceQuotaOverview as d } from "../hooks/useUsage.js";
7
- import { useCallback as f, useDeferredValue as p, useMemo as m, useState as h } from "react";
8
- import { AlertCircle as g, AlertTriangle as _, CheckCircle as v, ChevronDown as y, ChevronLeft as b, ChevronRight as x, Clock as S, Info as C, Layers as w, Package as T, RefreshCw as E, Search as ee, X as D, XCircle as O } from "lucide-react";
9
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
7
+ import { Fragment as f, useCallback as p, useDeferredValue as m, useMemo as h, useState as g } from "react";
8
+ import { AlertCircle as _, AlertTriangle as v, CheckCircle as y, ChevronDown as b, ChevronLeft as x, ChevronRight as S, Clock as C, Info as w, Layers as T, Package as E, RefreshCw as D, Search as ee, X as O, XCircle as k } from "lucide-react";
9
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
10
10
  import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { IllustratedEmptyState as M, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
11
+ import { IllustratedEmptyState as N, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/billing/modules/usage/pages/UsagePage.tsx
13
- function N(e, t) {
13
+ function P(e, t) {
14
14
  if (t?.displayName && typeof t.displayName == "string") return t.displayName;
15
15
  if (t?.label && typeof t.label == "string") return t.label;
16
16
  let n = e.split(".");
17
17
  return (n.length > 1 ? n.slice(1) : n).map((e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())).join(" ");
18
18
  }
19
- var P = ({ status: e, className: n = "size-4" }) => {
19
+ var F = ({ status: e, className: n = "size-4" }) => {
20
20
  switch (e) {
21
- case "EXHAUSTED": return /* @__PURE__ */ A(O, { className: `${n} ${t.error.icon}` });
22
- case "CRITICAL": return /* @__PURE__ */ A(_, { className: `${n} ${t.error.icon}` });
23
- case "WARNING": return /* @__PURE__ */ A(g, { className: `${n} ${t.warning.icon}` });
24
- case "HEALTHY": return /* @__PURE__ */ A(v, { className: `${n} ${t.success.icon}` });
25
- default: return /* @__PURE__ */ A(C, { className: `${n} ${t.neutral.icon}` });
21
+ case "EXHAUSTED": return /* @__PURE__ */ j(k, { className: `${n} ${t.error.icon}` });
22
+ case "CRITICAL": return /* @__PURE__ */ j(v, { className: `${n} ${t.error.icon}` });
23
+ case "WARNING": return /* @__PURE__ */ j(_, { className: `${n} ${t.warning.icon}` });
24
+ case "HEALTHY": return /* @__PURE__ */ j(y, { className: `${n} ${t.success.icon}` });
25
+ default: return /* @__PURE__ */ j(w, { className: `${n} ${t.neutral.icon}` });
26
26
  }
27
- }, F = ({ status: e }) => /* @__PURE__ */ A("span", {
27
+ }, I = ({ status: e }) => /* @__PURE__ */ j("span", {
28
28
  className: `px-2 py-0.5 text-xs font-medium rounded-full ${{
29
29
  EXHAUSTED: `${t.error.bg} ${t.error.text}`,
30
30
  CRITICAL: `${t.error.bg} ${t.error.text}`,
@@ -33,11 +33,11 @@ var P = ({ status: e, className: n = "size-4" }) => {
33
33
  INACTIVE: `${t.neutral.bg} ${t.neutral.text}`
34
34
  }[e]}`,
35
35
  children: e
36
- }), I = ({ percentage: e, status: n }) => {
36
+ }), L = ({ percentage: e, status: n }) => {
37
37
  let r = Math.min(100, Math.max(0, e));
38
- return /* @__PURE__ */ A("div", {
38
+ return /* @__PURE__ */ j("div", {
39
39
  className: "w-full bg-bg-sunken rounded-full h-2.5 overflow-hidden",
40
- children: /* @__PURE__ */ A("div", {
40
+ children: /* @__PURE__ */ j("div", {
41
41
  className: `h-full rounded-full transition-all duration-300 ${{
42
42
  EXHAUSTED: t.error.dot,
43
43
  CRITICAL: t.error.dot,
@@ -48,7 +48,7 @@ var P = ({ status: e, className: n = "size-4" }) => {
48
48
  style: { width: `${r}%` }
49
49
  })
50
50
  });
51
- }, L = ({ label: e, value: n, icon: r, color: i, isActive: a, onClick: o }) => {
51
+ }, R = ({ label: e, value: n, icon: r, color: i, isActive: a, onClick: o }) => {
52
52
  let s = {
53
53
  blue: t.info,
54
54
  emerald: t.success,
@@ -62,64 +62,64 @@ var P = ({ status: e, className: n = "size-4" }) => {
62
62
  red: t.error.icon,
63
63
  gray: t.neutral.icon
64
64
  };
65
- return /* @__PURE__ */ j("button", {
65
+ return /* @__PURE__ */ M("button", {
66
66
  type: "button",
67
67
  onClick: o,
68
68
  "aria-pressed": a,
69
69
  className: `rounded-card border border-border-seam bg-bg-surface bg-accent-wash shadow-elevation-1 p-5 w-full text-left ${o ? "cursor-pointer transition-[box-shadow,transform] duration-200 ease-[var(--motion-easing-out)] shadow-[var(--shadow-pop)] hover:shadow-elevation-2 [@media(hover:none)]: focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]" : ""} ${a ? "ring-1 ring-[var(--color-focus-ring)] border-border-strong" : ""}`,
70
- children: [/* @__PURE__ */ j("div", {
70
+ children: [/* @__PURE__ */ M("div", {
71
71
  className: "flex items-start justify-between gap-3",
72
- children: [/* @__PURE__ */ A("span", {
72
+ children: [/* @__PURE__ */ j("span", {
73
73
  className: "text-sm text-text-secondary",
74
74
  children: e
75
- }), /* @__PURE__ */ A("span", {
75
+ }), /* @__PURE__ */ j("span", {
76
76
  className: `flex size-9 shrink-0 items-center justify-center rounded-lg ${s.bg}`,
77
- children: /* @__PURE__ */ A("span", {
77
+ children: /* @__PURE__ */ j("span", {
78
78
  className: c[i],
79
79
  children: r
80
80
  })
81
81
  })]
82
- }), /* @__PURE__ */ A("p", {
82
+ }), /* @__PURE__ */ j("p", {
83
83
  className: "mt-2 text-2xl font-semibold tabular-nums text-text-primary",
84
84
  children: n
85
85
  })]
86
86
  });
87
- }, R = ({ quota: e, planLabel: t, onClick: n }) => {
87
+ }, re = ({ quota: e, planLabel: t, onClick: n }) => {
88
88
  let r = e.totalLimit != null && e.totalLimit > 0 && !e.noLimit;
89
- return /* @__PURE__ */ j("tr", {
89
+ return /* @__PURE__ */ M("tr", {
90
90
  onClick: n,
91
91
  className: "cursor-pointer hover:bg-bg-sunken transition-colors border-b border-border-subtle last:border-b-0",
92
92
  children: [
93
- /* @__PURE__ */ j("td", {
93
+ /* @__PURE__ */ M("td", {
94
94
  className: "px-4 py-3",
95
95
  children: [
96
- /* @__PURE__ */ A("span", {
96
+ /* @__PURE__ */ j("span", {
97
97
  className: "text-sm font-medium text-text-link hover:underline capitalize",
98
98
  children: e.displayName || e.name.replace(/_/g, " ")
99
99
  }),
100
- /* @__PURE__ */ A("span", {
100
+ /* @__PURE__ */ j("span", {
101
101
  className: "block text-xs font-mono text-text-muted mt-0.5",
102
102
  children: e.name
103
103
  }),
104
- e.description && /* @__PURE__ */ A("span", {
104
+ e.description && /* @__PURE__ */ j("span", {
105
105
  className: "block text-xs text-text-secondary mt-0.5 max-w-[220px] truncate",
106
106
  children: e.description
107
107
  }),
108
- e.quotaCount > 1 && /* @__PURE__ */ j("span", {
108
+ e.quotaCount > 1 && /* @__PURE__ */ M("span", {
109
109
  className: "block text-xs text-text-secondary mt-0.5",
110
110
  children: [e.quotaCount, " assignments"]
111
111
  })
112
112
  ]
113
113
  }),
114
- t !== void 0 && /* @__PURE__ */ A("td", {
114
+ t !== void 0 && /* @__PURE__ */ j("td", {
115
115
  className: "px-4 py-3 text-sm text-text-secondary whitespace-nowrap",
116
116
  children: t
117
117
  }),
118
- /* @__PURE__ */ A("td", {
118
+ /* @__PURE__ */ j("td", {
119
119
  className: "px-4 py-3",
120
- children: /* @__PURE__ */ j("div", {
120
+ children: /* @__PURE__ */ M("div", {
121
121
  className: "space-y-1.5",
122
- children: [/* @__PURE__ */ j("span", {
122
+ children: [/* @__PURE__ */ M("span", {
123
123
  className: "text-sm text-text-primary tabular-nums",
124
124
  children: [
125
125
  i(e.totalUsed),
@@ -127,58 +127,58 @@ var P = ({ status: e, className: n = "size-4" }) => {
127
127
  r ? i(e.totalLimit) : "∞",
128
128
  e.unit ? ` ${e.unit}` : ""
129
129
  ]
130
- }), /* @__PURE__ */ A(I, {
130
+ }), /* @__PURE__ */ j(L, {
131
131
  percentage: r ? e.usagePercentage : 0,
132
132
  status: e.status
133
133
  })]
134
134
  })
135
135
  }),
136
- /* @__PURE__ */ A("td", {
136
+ /* @__PURE__ */ j("td", {
137
137
  className: "px-4 py-3 text-sm text-text-secondary tabular-nums whitespace-nowrap",
138
138
  children: r ? i(e.totalLimit) : "∞"
139
139
  }),
140
- /* @__PURE__ */ A("td", {
140
+ /* @__PURE__ */ j("td", {
141
141
  className: "px-4 py-3",
142
- children: /* @__PURE__ */ A(F, { status: e.status })
142
+ children: /* @__PURE__ */ j(I, { status: e.status })
143
143
  })
144
144
  ]
145
145
  });
146
- }, re = ({ quotas: e, planLabel: t, showPlanColumn: n = !0, onQuotaClick: r }) => /* @__PURE__ */ A("div", {
146
+ }, ie = ({ quotas: e, planLabel: t, showPlanColumn: n = !0, onQuotaClick: r }) => /* @__PURE__ */ j("div", {
147
147
  className: "overflow-x-auto rounded-card border border-border-seam bg-bg-surface shadow-elevation-1",
148
- children: /* @__PURE__ */ j("table", {
148
+ children: /* @__PURE__ */ M("table", {
149
149
  className: "w-full text-left",
150
- children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", {
150
+ children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
151
151
  className: "border-b border-border-subtle bg-bg-sunken",
152
152
  children: [
153
- /* @__PURE__ */ A("th", {
153
+ /* @__PURE__ */ j("th", {
154
154
  className: "px-4 py-2.5 text-xs font-semibold text-text-muted uppercase tracking-wider",
155
155
  children: "Quotas"
156
156
  }),
157
- n && /* @__PURE__ */ A("th", {
157
+ n && /* @__PURE__ */ j("th", {
158
158
  className: "px-4 py-2.5 text-xs font-semibold text-text-muted uppercase tracking-wider",
159
159
  children: "Plan"
160
160
  }),
161
- /* @__PURE__ */ A("th", {
161
+ /* @__PURE__ */ j("th", {
162
162
  className: "px-4 py-2.5 text-xs font-semibold text-text-muted uppercase tracking-wider",
163
163
  children: "Current Usage"
164
164
  }),
165
- /* @__PURE__ */ A("th", {
165
+ /* @__PURE__ */ j("th", {
166
166
  className: "px-4 py-2.5 text-xs font-semibold text-text-muted uppercase tracking-wider",
167
167
  children: "Limit"
168
168
  }),
169
- /* @__PURE__ */ A("th", {
169
+ /* @__PURE__ */ j("th", {
170
170
  className: "px-4 py-2.5 text-xs font-semibold text-text-muted uppercase tracking-wider",
171
171
  children: "Status"
172
172
  })
173
173
  ]
174
- }) }), /* @__PURE__ */ A("tbody", { children: e.map((e) => /* @__PURE__ */ A(R, {
174
+ }) }), /* @__PURE__ */ j("tbody", { children: e.map((e) => /* @__PURE__ */ j(re, {
175
175
  quota: e,
176
176
  planLabel: n ? t : void 0,
177
177
  onClick: () => r(e)
178
178
  }, e.name)) })]
179
179
  })
180
- }), ie = ({ subscription: e, onQuotaClick: n, defaultExpanded: r = !0 }) => {
181
- let [i, a] = h(r), o = {
180
+ }), ae = ({ subscription: e, onQuotaClick: n, defaultExpanded: r = !0 }) => {
181
+ let [i, a] = g(r), o = {
182
182
  active: `${t.success.bg} ${t.success.text}`,
183
183
  trialing: `${t.info.bg} ${t.info.text}`,
184
184
  past_due: `${t.warning.bg} ${t.warning.text}`,
@@ -186,31 +186,31 @@ var P = ({ status: e, className: n = "size-4" }) => {
186
186
  expired: `${t.neutral.bg} ${t.neutral.text}`,
187
187
  upgraded: `${t.primary.bg} ${t.primary.text}`
188
188
  };
189
- return /* @__PURE__ */ j("div", {
189
+ return /* @__PURE__ */ M("div", {
190
190
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
191
191
  children: [
192
- /* @__PURE__ */ j("button", {
192
+ /* @__PURE__ */ M("button", {
193
193
  type: "button",
194
194
  onClick: () => a(!i),
195
195
  "aria-expanded": i,
196
196
  className: "w-full flex items-center justify-between p-4 hover:bg-bg-sunken transition-colors",
197
- children: [/* @__PURE__ */ j("div", {
197
+ children: [/* @__PURE__ */ M("div", {
198
198
  className: "flex items-center gap-3",
199
- children: [/* @__PURE__ */ A("span", {
199
+ children: [/* @__PURE__ */ j("span", {
200
200
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)]",
201
- children: /* @__PURE__ */ A(T, { className: "size-5 text-text-link" })
202
- }), /* @__PURE__ */ j("div", {
201
+ children: /* @__PURE__ */ j(E, { className: "size-5 text-text-link" })
202
+ }), /* @__PURE__ */ M("div", {
203
203
  className: "text-left",
204
- children: [/* @__PURE__ */ j("div", {
204
+ children: [/* @__PURE__ */ M("div", {
205
205
  className: "flex items-center gap-2",
206
- children: [/* @__PURE__ */ A("span", {
206
+ children: [/* @__PURE__ */ j("span", {
207
207
  className: "font-medium text-text-primary",
208
- children: "Subscription"
209
- }), /* @__PURE__ */ A("span", {
208
+ children: e.planName || e.productId || "Subscription"
209
+ }), /* @__PURE__ */ j("span", {
210
210
  className: `px-2 py-0.5 text-xs font-medium rounded-full capitalize ${o[e.status.toLowerCase()] || o.active}`,
211
211
  children: e.status
212
212
  })]
213
- }), /* @__PURE__ */ j("p", {
213
+ }), /* @__PURE__ */ M("p", {
214
214
  className: "text-xs text-text-secondary",
215
215
  children: [
216
216
  e.aggregatedQuotas.length,
@@ -219,65 +219,65 @@ var P = ({ status: e, className: n = "size-4" }) => {
219
219
  ]
220
220
  })]
221
221
  })]
222
- }), A(i ? y : x, { className: "size-5 text-text-muted" })]
222
+ }), j(i ? b : S, { className: "size-5 text-text-muted" })]
223
223
  }),
224
- i && e.aggregatedQuotas.length > 0 && /* @__PURE__ */ A("div", {
224
+ i && e.aggregatedQuotas.length > 0 && /* @__PURE__ */ j("div", {
225
225
  className: "border-t border-border-subtle",
226
- children: /* @__PURE__ */ A(re, {
226
+ children: /* @__PURE__ */ j(ie, {
227
227
  quotas: e.aggregatedQuotas,
228
228
  planLabel: e.planName || e.productId || void 0,
229
229
  showPlanColumn: !!(e.planName || e.productId),
230
230
  onQuotaClick: n
231
231
  })
232
232
  }),
233
- i && e.aggregatedQuotas.length === 0 && /* @__PURE__ */ A("div", {
233
+ i && e.aggregatedQuotas.length === 0 && /* @__PURE__ */ j("div", {
234
234
  className: "border-t border-border-subtle p-6 text-center",
235
- children: /* @__PURE__ */ A("p", {
235
+ children: /* @__PURE__ */ j("p", {
236
236
  className: "text-sm text-text-secondary",
237
237
  children: "No quotas assigned to this subscription"
238
238
  })
239
239
  })
240
240
  ]
241
241
  });
242
- }, ae = ({ quota: n, onClose: o }) => {
243
- let [s, c] = h([null]), d = s[s.length - 1] ?? null, f = s.length, { workspaceId: p } = e(), m = n.quotaAssignments[0]?.id, { usages: g, hasNextPage: _, nextCursor: v, isLoading: y } = l(m, 10, d, p), { snapshots: S, isLoading: C } = u(p, n.name, 24), w = () => {
242
+ }, oe = ({ quota: n, onClose: o }) => {
243
+ let [s, c] = g([null]), d = s[s.length - 1] ?? null, f = s.length, { workspaceId: p } = e(), m = n.quotaAssignments[0]?.id, { usages: h, hasNextPage: _, nextCursor: v, isLoading: y } = l(m, 10, d, p), { snapshots: b, isLoading: C } = u(p, n.name, 24), w = () => {
244
244
  v && c((e) => [...e, v]);
245
245
  }, T = () => {
246
246
  s.length > 1 && c((e) => e.slice(0, -1));
247
247
  };
248
- return /* @__PURE__ */ j("div", {
248
+ return /* @__PURE__ */ M("div", {
249
249
  className: "fixed inset-0 z-50 flex items-center justify-center",
250
- children: [/* @__PURE__ */ A("div", {
250
+ children: [/* @__PURE__ */ j("div", {
251
251
  className: "absolute inset-0 bg-overlay-scrim",
252
252
  onClick: o
253
- }), /* @__PURE__ */ j("div", {
253
+ }), /* @__PURE__ */ M("div", {
254
254
  className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-2xl w-full mx-4 max-h-[90vh] overflow-auto",
255
255
  role: "dialog",
256
256
  "aria-modal": "true",
257
257
  "aria-labelledby": "quota-detail-title",
258
258
  children: [
259
- /* @__PURE__ */ j("div", {
259
+ /* @__PURE__ */ M("div", {
260
260
  className: "sticky top-0 bg-bg-elevated border-b border-border-subtle p-4 flex items-center justify-between",
261
- children: [/* @__PURE__ */ j("div", {
261
+ children: [/* @__PURE__ */ M("div", {
262
262
  className: "flex items-center gap-3",
263
- children: [/* @__PURE__ */ A(P, {
263
+ children: [/* @__PURE__ */ j(F, {
264
264
  status: n.status,
265
265
  className: "size-5"
266
- }), /* @__PURE__ */ j("div", { children: [
267
- /* @__PURE__ */ A("h2", {
266
+ }), /* @__PURE__ */ M("div", { children: [
267
+ /* @__PURE__ */ j("h2", {
268
268
  id: "quota-detail-title",
269
269
  className: "text-lg font-semibold capitalize text-text-primary",
270
270
  children: n.displayName || n.name.replace(/_/g, " ")
271
271
  }),
272
- /* @__PURE__ */ A("p", {
272
+ /* @__PURE__ */ j("p", {
273
273
  className: "text-xs font-mono text-text-muted",
274
274
  children: n.name
275
275
  }),
276
- n.description && /* @__PURE__ */ A("p", {
276
+ n.description && /* @__PURE__ */ j("p", {
277
277
  className: "text-sm text-text-secondary mt-0.5",
278
278
  children: n.description
279
279
  }),
280
- /* @__PURE__ */ j("p", {
280
+ /* @__PURE__ */ M("p", {
281
281
  className: "text-sm text-text-secondary mt-0.5",
282
282
  children: [
283
283
  n.quotaCount,
@@ -286,33 +286,33 @@ var P = ({ status: e, className: n = "size-4" }) => {
286
286
  ]
287
287
  })
288
288
  ] })]
289
- }), /* @__PURE__ */ A("button", {
289
+ }), /* @__PURE__ */ j("button", {
290
290
  type: "button",
291
291
  onClick: o,
292
292
  className: "p-1 rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
293
293
  "aria-label": "Close quota details",
294
- children: /* @__PURE__ */ A(D, { className: "size-5" })
294
+ children: /* @__PURE__ */ j(O, { className: "size-5" })
295
295
  })]
296
296
  }),
297
- /* @__PURE__ */ j("div", {
297
+ /* @__PURE__ */ M("div", {
298
298
  className: "p-4 border-b border-border-subtle",
299
- children: [/* @__PURE__ */ j("div", {
299
+ children: [/* @__PURE__ */ M("div", {
300
300
  className: "mb-4",
301
301
  children: [
302
- /* @__PURE__ */ j("div", {
302
+ /* @__PURE__ */ M("div", {
303
303
  className: "flex items-center justify-between mb-2",
304
- children: [/* @__PURE__ */ A("span", {
304
+ children: [/* @__PURE__ */ j("span", {
305
305
  className: "text-sm text-text-secondary",
306
306
  children: "Usage"
307
- }), /* @__PURE__ */ A(F, { status: n.status })]
307
+ }), /* @__PURE__ */ j(I, { status: n.status })]
308
308
  }),
309
- /* @__PURE__ */ A(I, {
309
+ /* @__PURE__ */ j(L, {
310
310
  percentage: n.usagePercentage,
311
311
  status: n.status
312
312
  }),
313
- /* @__PURE__ */ j("div", {
313
+ /* @__PURE__ */ M("div", {
314
314
  className: "flex items-center justify-between mt-2 text-sm",
315
- children: [/* @__PURE__ */ j("span", {
315
+ children: [/* @__PURE__ */ M("span", {
316
316
  className: "font-medium text-text-primary tabular-nums",
317
317
  children: [
318
318
  i(n.totalUsed),
@@ -321,44 +321,44 @@ var P = ({ status: e, className: n = "size-4" }) => {
321
321
  n.totalLimit != null && n.totalLimit > 0 ? i(n.totalLimit) : "∞",
322
322
  n.unit && ` ${n.unit}`
323
323
  ]
324
- }), /* @__PURE__ */ A("span", {
324
+ }), /* @__PURE__ */ j("span", {
325
325
  className: "text-text-secondary",
326
326
  children: n.totalLimit != null && n.totalLimit > 0 ? `${Math.round(n.usagePercentage)}% used` : "Unlimited"
327
327
  })]
328
328
  })
329
329
  ]
330
- }), n.quotaCount > 1 && /* @__PURE__ */ j("div", {
330
+ }), n.quotaCount > 1 && /* @__PURE__ */ M("div", {
331
331
  className: "mt-4",
332
- children: [/* @__PURE__ */ A("h3", {
332
+ children: [/* @__PURE__ */ j("h3", {
333
333
  className: "text-sm font-medium text-text-primary mb-3",
334
334
  children: "Quota Breakdown"
335
- }), /* @__PURE__ */ A("div", {
335
+ }), /* @__PURE__ */ j("div", {
336
336
  className: "border border-border-seam rounded-card overflow-hidden divide-y divide-border-subtle",
337
337
  children: [...n.quotaAssignments].sort((e, t) => (e.endtime ? new Date(e.endtime).getTime() : Infinity) - (t.endtime ? new Date(t.endtime).getTime() : Infinity)).map((e) => {
338
338
  let n = e.endtime ? new Date(e.endtime) : null, r = /* @__PURE__ */ new Date(), a = n && n < r, o = n ? Math.ceil((n.getTime() - r.getTime()) / (1440 * 60 * 1e3)) : null, s = o !== null && o > 0 && o <= 7;
339
- return /* @__PURE__ */ j("div", {
339
+ return /* @__PURE__ */ M("div", {
340
340
  className: `flex items-center justify-between px-3 py-2.5 ${a ? "bg-bg-sunken" : s ? t.warning.bg : "bg-bg-surface"}`,
341
- children: [/* @__PURE__ */ j("div", {
341
+ children: [/* @__PURE__ */ M("div", {
342
342
  className: "flex items-center gap-2",
343
- children: [s && !a && /* @__PURE__ */ A("span", { className: `size-2 rounded-full ${t.warning.dot} animate-pulse` }), /* @__PURE__ */ j("div", {
343
+ children: [s && !a && /* @__PURE__ */ j("span", { className: `size-2 rounded-full ${t.warning.dot} animate-pulse` }), /* @__PURE__ */ M("div", {
344
344
  className: "flex flex-col",
345
- children: [/* @__PURE__ */ A("span", {
345
+ children: [/* @__PURE__ */ j("span", {
346
346
  className: `text-sm ${a ? "text-text-muted" : "text-text-primary"}`,
347
347
  children: n ? n.toLocaleDateString("en-US", {
348
348
  month: "short",
349
349
  day: "numeric",
350
350
  year: "numeric"
351
351
  }) : "No expiry"
352
- }), /* @__PURE__ */ A("span", {
352
+ }), /* @__PURE__ */ j("span", {
353
353
  className: `text-xs ${a ? "text-status-error-text" : s ? t.warning.text : "text-text-secondary"}`,
354
354
  children: a ? "Expired" : o === null ? "Never expires" : o === 0 ? "Expires today" : o === 1 ? "Expires tomorrow" : `${o} days left`
355
355
  })]
356
356
  })]
357
- }), /* @__PURE__ */ A("div", {
357
+ }), /* @__PURE__ */ j("div", {
358
358
  className: "text-right",
359
- children: /* @__PURE__ */ j("span", {
359
+ children: /* @__PURE__ */ M("span", {
360
360
  className: `text-sm font-semibold tabular-nums ${a ? "text-text-muted" : "text-text-primary"}`,
361
- children: [i(e.used), /* @__PURE__ */ j("span", {
361
+ children: [i(e.used), /* @__PURE__ */ M("span", {
362
362
  className: "text-text-secondary font-normal",
363
363
  children: [
364
364
  " / ",
@@ -373,34 +373,34 @@ var P = ({ status: e, className: n = "size-4" }) => {
373
373
  })]
374
374
  })]
375
375
  }),
376
- (C || S.length > 0) && /* @__PURE__ */ j("div", {
376
+ (C || b.length > 0) && /* @__PURE__ */ M("div", {
377
377
  className: "p-4 border-t border-border-subtle",
378
- children: [/* @__PURE__ */ A("h3", {
378
+ children: [/* @__PURE__ */ j("h3", {
379
379
  className: "text-sm font-medium text-text-primary mb-3",
380
380
  children: "Live Value History"
381
- }), C ? /* @__PURE__ */ A("div", {
381
+ }), C ? /* @__PURE__ */ j("div", {
382
382
  className: "space-y-1.5",
383
383
  children: [
384
384
  1,
385
385
  2,
386
386
  3
387
- ].map((e) => /* @__PURE__ */ A("div", { className: "h-8 bg-bg-sunken animate-pulse rounded" }, e))
388
- }) : /* @__PURE__ */ A("div", {
387
+ ].map((e) => /* @__PURE__ */ j("div", { className: "h-8 bg-bg-sunken animate-pulse rounded" }, e))
388
+ }) : /* @__PURE__ */ j("div", {
389
389
  className: "space-y-1.5",
390
- children: S.map((e) => /* @__PURE__ */ j("div", {
390
+ children: b.map((e) => /* @__PURE__ */ M("div", {
391
391
  className: "flex items-center justify-between px-3 py-2 bg-bg-sunken rounded-button",
392
- children: [/* @__PURE__ */ A("span", {
392
+ children: [/* @__PURE__ */ j("span", {
393
393
  className: "text-xs text-text-secondary",
394
394
  children: r(e.snapshotAt)
395
- }), /* @__PURE__ */ j("span", {
395
+ }), /* @__PURE__ */ M("span", {
396
396
  className: "text-sm font-medium text-text-primary tabular-nums",
397
397
  children: [
398
398
  i(e.value),
399
- n.unit && /* @__PURE__ */ A("span", {
399
+ n.unit && /* @__PURE__ */ j("span", {
400
400
  className: "text-xs text-text-secondary ml-1",
401
401
  children: n.unit
402
402
  }),
403
- !e.noLimit && e.limit != null && /* @__PURE__ */ j("span", {
403
+ !e.noLimit && e.limit != null && /* @__PURE__ */ M("span", {
404
404
  className: "text-xs text-text-secondary ml-1",
405
405
  children: ["/ ", i(e.limit)]
406
406
  })
@@ -409,36 +409,36 @@ var P = ({ status: e, className: n = "size-4" }) => {
409
409
  }, e.id))
410
410
  })]
411
411
  }),
412
- /* @__PURE__ */ j("div", {
412
+ /* @__PURE__ */ M("div", {
413
413
  className: "p-4",
414
414
  children: [
415
- /* @__PURE__ */ A("h3", {
415
+ /* @__PURE__ */ j("h3", {
416
416
  className: "text-sm font-medium text-text-primary mb-3",
417
417
  children: "Recent Usage"
418
418
  }),
419
- n.isCollectorBased ? /* @__PURE__ */ A("p", {
419
+ n.isCollectorBased ? /* @__PURE__ */ j("p", {
420
420
  className: "text-sm text-text-secondary text-center py-6",
421
421
  children: "Usage is tracked via system metrics, individual event records are not available for this quota."
422
- }) : y ? /* @__PURE__ */ A("div", {
422
+ }) : y ? /* @__PURE__ */ j("div", {
423
423
  className: "space-y-2",
424
424
  children: [
425
425
  1,
426
426
  2,
427
427
  3
428
- ].map((e) => /* @__PURE__ */ A("div", { className: "h-12 bg-bg-sunken animate-pulse rounded" }, e))
429
- }) : g.length === 0 ? /* @__PURE__ */ A("p", {
428
+ ].map((e) => /* @__PURE__ */ j("div", { className: "h-12 bg-bg-sunken animate-pulse rounded" }, e))
429
+ }) : h.length === 0 ? /* @__PURE__ */ j("p", {
430
430
  className: "text-sm text-text-secondary text-center py-6",
431
431
  children: "No usage records found"
432
- }) : /* @__PURE__ */ A("div", {
432
+ }) : /* @__PURE__ */ j("div", {
433
433
  className: "space-y-2",
434
- children: g.map((e) => /* @__PURE__ */ j("div", {
434
+ children: h.map((e) => /* @__PURE__ */ M("div", {
435
435
  className: "flex items-center justify-between p-3 border border-border-seam rounded-card",
436
- children: [/* @__PURE__ */ j("div", {
436
+ children: [/* @__PURE__ */ M("div", {
437
437
  className: "flex-1 min-w-0",
438
- children: [/* @__PURE__ */ A("p", {
438
+ children: [/* @__PURE__ */ j("p", {
439
439
  className: "text-sm font-medium text-text-primary",
440
440
  children: e.description || "Usage recorded"
441
- }), /* @__PURE__ */ j("p", {
441
+ }), /* @__PURE__ */ M("p", {
442
442
  className: "text-xs text-text-secondary",
443
443
  children: [
444
444
  a(e.timestamp),
@@ -446,42 +446,42 @@ var P = ({ status: e, className: n = "size-4" }) => {
446
446
  r(e.timestamp)
447
447
  ]
448
448
  })]
449
- }), /* @__PURE__ */ A("span", {
449
+ }), /* @__PURE__ */ j("span", {
450
450
  className: "text-sm font-medium text-text-primary ml-4 tabular-nums",
451
451
  children: i(e.amount)
452
452
  })]
453
453
  }, e.id))
454
454
  }),
455
- !n.isCollectorBased && (s.length > 1 || _) && /* @__PURE__ */ j("div", {
455
+ !n.isCollectorBased && (s.length > 1 || _) && /* @__PURE__ */ M("div", {
456
456
  className: "flex items-center justify-center gap-2 mt-4",
457
457
  children: [
458
- /* @__PURE__ */ A("button", {
458
+ /* @__PURE__ */ j("button", {
459
459
  type: "button",
460
460
  onClick: T,
461
461
  disabled: s.length === 1,
462
462
  className: "px-3 py-1.5 text-sm border border-border-subtle rounded-button text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50",
463
463
  "aria-label": "Previous usage page",
464
- children: /* @__PURE__ */ A(b, { className: "size-4" })
464
+ children: /* @__PURE__ */ j(x, { className: "size-4" })
465
465
  }),
466
- /* @__PURE__ */ j("span", {
466
+ /* @__PURE__ */ M("span", {
467
467
  className: "text-sm text-text-secondary tabular-nums",
468
468
  children: ["Page ", f]
469
469
  }),
470
- /* @__PURE__ */ A("button", {
470
+ /* @__PURE__ */ j("button", {
471
471
  type: "button",
472
472
  onClick: w,
473
473
  disabled: !_,
474
474
  className: "px-3 py-1.5 text-sm border border-border-subtle rounded-button text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50",
475
475
  "aria-label": "Next usage page",
476
- children: /* @__PURE__ */ A(x, { className: "size-4" })
476
+ children: /* @__PURE__ */ j(S, { className: "size-4" })
477
477
  })
478
478
  ]
479
479
  })
480
480
  ]
481
481
  }),
482
- /* @__PURE__ */ A("div", {
482
+ /* @__PURE__ */ j("div", {
483
483
  className: "sticky bottom-0 bg-bg-elevated border-t border-border-subtle p-4",
484
- children: /* @__PURE__ */ A("button", {
484
+ children: /* @__PURE__ */ j("button", {
485
485
  type: "button",
486
486
  onClick: o,
487
487
  className: "w-full py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
@@ -495,10 +495,10 @@ var P = ({ status: e, className: n = "size-4" }) => {
495
495
  function z(e, t) {
496
496
  return t ? n.HEALTHY : e >= 100 ? n.EXHAUSTED : e >= 90 ? n.CRITICAL : e >= 75 ? n.WARNING : n.HEALTHY;
497
497
  }
498
- var oe = ({ workspaceId: e }) => {
499
- let { overview: r, isLoading: a, error: o, refetch: s } = d(e), [c, l] = h(/* @__PURE__ */ new Set()), u = m(() => {
498
+ var se = ({ workspaceId: e, productId: r }) => {
499
+ let { overview: i, isLoading: a, error: o, refetch: s } = d(e, r), [c, l] = g(/* @__PURE__ */ new Set()), u = h(() => {
500
500
  let e = /* @__PURE__ */ new Map();
501
- for (let t of r) {
501
+ for (let t of i) {
502
502
  let n = e.get(t.assignment.quotaName) ?? [];
503
503
  n.push(t), e.set(t.assignment.quotaName, n);
504
504
  }
@@ -517,29 +517,29 @@ var oe = ({ workspaceId: e }) => {
517
517
  hasMultiple: t.length > 1
518
518
  };
519
519
  });
520
- }, [r]), p = f((e) => {
520
+ }, [i]), f = h(() => u.filter((e) => e.items[0]?.assignment.quotaMode === "dedicated"), [u]), m = h(() => u.filter((e) => e.items[0]?.assignment.quotaMode === "pooled"), [u]), b = p((e) => {
521
521
  l((t) => {
522
522
  let n = new Set(t);
523
523
  return n.has(e) ? n.delete(e) : n.add(e), n;
524
524
  });
525
525
  }, []);
526
- if (a && r.length === 0) return /* @__PURE__ */ A("div", {
526
+ if (a && i.length === 0) return /* @__PURE__ */ j("div", {
527
527
  className: "space-y-3",
528
528
  children: [
529
529
  1,
530
530
  2,
531
531
  3
532
- ].map((e) => /* @__PURE__ */ A("div", { className: "h-16 bg-bg-sunken animate-pulse rounded-card" }, e))
532
+ ].map((e) => /* @__PURE__ */ j("div", { className: "h-16 bg-bg-sunken animate-pulse rounded-card" }, e))
533
533
  });
534
- if (o) return /* @__PURE__ */ j("div", {
534
+ if (o) return /* @__PURE__ */ M("div", {
535
535
  className: "text-center py-8 space-y-2",
536
536
  children: [
537
- /* @__PURE__ */ A(_, { className: "size-8 text-status-error-text mx-auto" }),
538
- /* @__PURE__ */ A("p", {
537
+ /* @__PURE__ */ j(v, { className: "size-8 text-status-error-text mx-auto" }),
538
+ /* @__PURE__ */ j("p", {
539
539
  className: "text-sm text-text-secondary",
540
540
  children: o.message
541
541
  }),
542
- /* @__PURE__ */ A("button", {
542
+ /* @__PURE__ */ j("button", {
543
543
  type: "button",
544
544
  onClick: () => s(),
545
545
  className: "px-3 py-1.5 text-sm border border-border-subtle rounded-button text-text-primary hover:bg-bg-sunken transition-colors",
@@ -547,249 +547,274 @@ var oe = ({ workspaceId: e }) => {
547
547
  })
548
548
  ]
549
549
  });
550
- if (r.length === 0) return /* @__PURE__ */ A(M, {
550
+ if (i.length === 0) return /* @__PURE__ */ j(N, {
551
551
  illustration: "empty-data",
552
552
  title: "No workspace quotas assigned",
553
553
  description: "Quotas are assigned to this workspace after a successful purchase. If you have an active subscription, contact support."
554
554
  });
555
- let y = u.filter((e) => e.status === n.HEALTHY).length, b = u.filter((e) => e.status === n.WARNING).length, S = u.filter((e) => e.status === n.CRITICAL || e.status === n.EXHAUSTED).length;
556
- return /* @__PURE__ */ j("div", {
555
+ let x = u.filter((e) => e.status === n.HEALTHY).length, S = u.filter((e) => e.status === n.WARNING).length, C = u.filter((e) => e.status === n.CRITICAL || e.status === n.EXHAUSTED).length;
556
+ return /* @__PURE__ */ M("div", {
557
557
  className: "space-y-4",
558
558
  children: [
559
- /* @__PURE__ */ j("div", {
559
+ /* @__PURE__ */ M("div", {
560
560
  className: "grid grid-cols-3 gap-3",
561
561
  children: [
562
- /* @__PURE__ */ j("div", {
562
+ /* @__PURE__ */ M("div", {
563
563
  className: "rounded-card border border-border-seam bg-bg-surface shadow-elevation-1 p-4",
564
- children: [/* @__PURE__ */ j("div", {
564
+ children: [/* @__PURE__ */ M("div", {
565
565
  className: "flex items-center gap-1.5 mb-1",
566
- children: [/* @__PURE__ */ A("span", {
566
+ children: [/* @__PURE__ */ j("span", {
567
567
  className: `flex size-7 items-center justify-center rounded-lg ${t.success.bg}`,
568
- children: /* @__PURE__ */ A(v, { className: `size-4 ${t.success.icon}` })
569
- }), /* @__PURE__ */ A("span", {
568
+ children: /* @__PURE__ */ j(y, { className: `size-4 ${t.success.icon}` })
569
+ }), /* @__PURE__ */ j("span", {
570
570
  className: "text-xs text-text-secondary",
571
571
  children: "Healthy"
572
572
  })]
573
- }), /* @__PURE__ */ A("p", {
573
+ }), /* @__PURE__ */ j("p", {
574
574
  className: "text-xl font-semibold tabular-nums text-text-primary",
575
- children: y
575
+ children: x
576
576
  })]
577
577
  }),
578
- /* @__PURE__ */ j("div", {
578
+ /* @__PURE__ */ M("div", {
579
579
  className: "rounded-card border border-border-seam bg-bg-surface shadow-elevation-1 p-4",
580
- children: [/* @__PURE__ */ j("div", {
580
+ children: [/* @__PURE__ */ M("div", {
581
581
  className: "flex items-center gap-1.5 mb-1",
582
- children: [/* @__PURE__ */ A("span", {
582
+ children: [/* @__PURE__ */ j("span", {
583
583
  className: `flex size-7 items-center justify-center rounded-lg ${t.warning.bg}`,
584
- children: /* @__PURE__ */ A(g, { className: `size-4 ${t.warning.icon}` })
585
- }), /* @__PURE__ */ A("span", {
584
+ children: /* @__PURE__ */ j(_, { className: `size-4 ${t.warning.icon}` })
585
+ }), /* @__PURE__ */ j("span", {
586
586
  className: "text-xs text-text-secondary",
587
587
  children: "Warning"
588
588
  })]
589
- }), /* @__PURE__ */ A("p", {
589
+ }), /* @__PURE__ */ j("p", {
590
590
  className: "text-xl font-semibold tabular-nums text-text-primary",
591
- children: b
591
+ children: S
592
592
  })]
593
593
  }),
594
- /* @__PURE__ */ j("div", {
594
+ /* @__PURE__ */ M("div", {
595
595
  className: "rounded-card border border-border-seam bg-bg-surface shadow-elevation-1 p-4",
596
- children: [/* @__PURE__ */ j("div", {
596
+ children: [/* @__PURE__ */ M("div", {
597
597
  className: "flex items-center gap-1.5 mb-1",
598
- children: [/* @__PURE__ */ A("span", {
598
+ children: [/* @__PURE__ */ j("span", {
599
599
  className: `flex size-7 items-center justify-center rounded-lg ${t.error.bg}`,
600
- children: /* @__PURE__ */ A(O, { className: `size-4 ${t.error.icon}` })
601
- }), /* @__PURE__ */ A("span", {
600
+ children: /* @__PURE__ */ j(k, { className: `size-4 ${t.error.icon}` })
601
+ }), /* @__PURE__ */ j("span", {
602
602
  className: "text-xs text-text-secondary",
603
603
  children: "Critical / Exhausted"
604
604
  })]
605
- }), /* @__PURE__ */ A("p", {
605
+ }), /* @__PURE__ */ j("p", {
606
606
  className: "text-xl font-semibold tabular-nums text-text-primary",
607
- children: S
607
+ children: C
608
608
  })]
609
609
  })
610
610
  ]
611
611
  }),
612
- /* @__PURE__ */ A("div", {
613
- className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
614
- children: /* @__PURE__ */ j("table", {
615
- className: "w-full text-sm",
616
- children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", {
617
- className: "border-b border-border-subtle bg-bg-sunken",
612
+ f.length > 0 && /* @__PURE__ */ M("div", { children: [
613
+ /* @__PURE__ */ j("h3", {
614
+ className: "text-sm font-semibold text-text-primary mb-2",
615
+ children: "Product Workspace Quota"
616
+ }),
617
+ /* @__PURE__ */ j("p", {
618
+ className: "text-xs text-text-secondary mb-2",
619
+ children: "Quotas dedicated to this product for your workspace."
620
+ }),
621
+ /* @__PURE__ */ j(B, {
622
+ groups: f,
623
+ expandedGroups: c,
624
+ onToggleGroup: b
625
+ })
626
+ ] }),
627
+ m.length > 0 && /* @__PURE__ */ M("div", { children: [
628
+ /* @__PURE__ */ j("h3", {
629
+ className: "text-sm font-semibold text-text-primary mb-2",
630
+ children: "Pooled Workspace Quota"
631
+ }),
632
+ /* @__PURE__ */ j("p", {
633
+ className: "text-xs text-text-secondary mb-2",
634
+ children: "Shared limits pooled across your workspace, independent of any single product."
635
+ }),
636
+ /* @__PURE__ */ j(B, {
637
+ groups: m,
638
+ expandedGroups: c,
639
+ onToggleGroup: b
640
+ })
641
+ ] }),
642
+ /* @__PURE__ */ M("p", {
643
+ className: "text-xs text-text-secondary",
644
+ children: ["Workspace quotas are sourced from the activity service. Usage is tracked cumulatively across all active sources for each quota.", i.some((e) => e.liveStatus) && " Live values are updated every ~60 seconds."]
645
+ })
646
+ ]
647
+ });
648
+ }, B = ({ groups: e, expandedGroups: t, onToggleGroup: n }) => /* @__PURE__ */ j("div", {
649
+ className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
650
+ children: /* @__PURE__ */ M("table", {
651
+ className: "w-full text-sm",
652
+ children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
653
+ className: "border-b border-border-subtle bg-bg-sunken",
654
+ children: [
655
+ /* @__PURE__ */ j("th", {
656
+ className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
657
+ children: "Quota"
658
+ }),
659
+ /* @__PURE__ */ j("th", {
660
+ className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs hidden sm:table-cell",
661
+ children: "Sources"
662
+ }),
663
+ /* @__PURE__ */ j("th", {
664
+ className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
665
+ children: "Usage"
666
+ }),
667
+ /* @__PURE__ */ j("th", {
668
+ className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs hidden sm:table-cell",
669
+ children: "Remaining"
670
+ }),
671
+ /* @__PURE__ */ j("th", {
672
+ className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
673
+ children: "Status"
674
+ })
675
+ ]
676
+ }) }), /* @__PURE__ */ j("tbody", {
677
+ className: "divide-y divide-border-subtle",
678
+ children: e.map((e) => {
679
+ let r = t.has(e.quotaName);
680
+ return /* @__PURE__ */ M(f, { children: [/* @__PURE__ */ M("tr", {
681
+ className: `transition-colors ${e.hasMultiple ? "cursor-pointer hover:bg-bg-sunken" : "hover:bg-bg-sunken"}`,
682
+ onClick: e.hasMultiple ? () => n(e.quotaName) : void 0,
683
+ children: [
684
+ /* @__PURE__ */ j("td", {
685
+ className: "px-4 py-3",
686
+ children: /* @__PURE__ */ M("div", {
687
+ className: "flex items-center gap-2",
688
+ children: [e.hasMultiple && /* @__PURE__ */ j(S, { className: `size-4 text-text-muted shrink-0 transition-transform duration-150 ${r ? "rotate-90" : ""}` }), /* @__PURE__ */ M("div", { children: [
689
+ /* @__PURE__ */ j("div", {
690
+ className: "font-medium text-text-primary",
691
+ children: P(e.quotaName)
692
+ }),
693
+ /* @__PURE__ */ j("div", {
694
+ className: "text-xs font-mono text-text-muted mt-0.5",
695
+ children: e.quotaName
696
+ }),
697
+ e.hasLive && /* @__PURE__ */ j("div", {
698
+ className: "text-xs text-text-secondary mt-0.5",
699
+ children: "Live · updated ~60s"
700
+ })
701
+ ] })]
702
+ })
703
+ }),
704
+ /* @__PURE__ */ j("td", {
705
+ className: "px-4 py-3 hidden sm:table-cell",
706
+ children: e.hasMultiple ? /* @__PURE__ */ M("span", {
707
+ className: "text-xs bg-[var(--color-accent-soft)] text-text-link px-1.5 py-0.5 rounded font-medium",
708
+ children: [e.items.length, " subscriptions"]
709
+ }) : /* @__PURE__ */ M("div", {
710
+ className: "flex items-center gap-1.5",
711
+ children: [/* @__PURE__ */ j("span", {
712
+ className: "text-xs text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded",
713
+ children: e.items[0]?.assignment.productId
714
+ }), /* @__PURE__ */ j("span", {
715
+ className: "text-xs text-text-secondary capitalize",
716
+ children: e.items[0]?.assignment.quotaMode
717
+ })]
718
+ })
719
+ }),
720
+ /* @__PURE__ */ j("td", {
721
+ className: "px-4 py-3",
722
+ children: /* @__PURE__ */ M("div", {
723
+ className: "space-y-1.5",
724
+ children: [/* @__PURE__ */ M("div", {
725
+ className: "text-text-primary tabular-nums",
726
+ children: [i(e.totalUsed), !e.noLimit && e.totalLimit != null && /* @__PURE__ */ M("span", {
727
+ className: "text-text-secondary",
728
+ children: [" / ", i(e.totalLimit)]
729
+ })]
730
+ }), !e.noLimit && /* @__PURE__ */ j(L, {
731
+ percentage: e.usagePercentage,
732
+ status: e.status
733
+ })]
734
+ })
735
+ }),
736
+ /* @__PURE__ */ j("td", {
737
+ className: "px-4 py-3 hidden sm:table-cell text-text-primary tabular-nums",
738
+ children: e.noLimit ? /* @__PURE__ */ j("span", {
739
+ className: "text-text-secondary",
740
+ children: "Unlimited"
741
+ }) : i(e.totalRemaining ?? 0)
742
+ }),
743
+ /* @__PURE__ */ j("td", {
744
+ className: "px-4 py-3",
745
+ children: /* @__PURE__ */ j(I, { status: e.status })
746
+ })
747
+ ]
748
+ }, e.quotaName), r && e.items.map((e) => {
749
+ let t = z(e.usagePercentage, e.assignment.noLimit);
750
+ return /* @__PURE__ */ M("tr", {
751
+ className: "bg-bg-sunken/50 border-t border-dashed border-border-subtle",
618
752
  children: [
619
- /* @__PURE__ */ A("th", {
620
- className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
621
- children: "Quota"
622
- }),
623
- /* @__PURE__ */ A("th", {
624
- className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs hidden sm:table-cell",
625
- children: "Sources"
753
+ /* @__PURE__ */ j("td", {
754
+ className: "pl-12 pr-4 py-2.5",
755
+ children: /* @__PURE__ */ M("div", {
756
+ className: "text-xs text-text-secondary space-y-0.5",
757
+ children: [/* @__PURE__ */ j("div", {
758
+ className: "font-mono truncate max-w-[200px]",
759
+ title: e.assignment.subscriptionId ?? void 0,
760
+ children: e.assignment.subscriptionId ?? "—"
761
+ }), /* @__PURE__ */ M("div", {
762
+ className: "flex items-center gap-1.5 flex-wrap",
763
+ children: [/* @__PURE__ */ j("span", {
764
+ className: "bg-bg-sunken px-1.5 py-0.5 rounded",
765
+ children: e.assignment.productId
766
+ }), /* @__PURE__ */ j("span", {
767
+ className: "capitalize",
768
+ children: e.assignment.quotaMode
769
+ })]
770
+ })]
771
+ })
626
772
  }),
627
- /* @__PURE__ */ A("th", {
628
- className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
629
- children: "Usage"
773
+ /* @__PURE__ */ j("td", { className: "px-4 py-2.5 hidden sm:table-cell" }),
774
+ /* @__PURE__ */ M("td", {
775
+ className: "px-4 py-2.5 text-xs text-text-secondary tabular-nums",
776
+ children: [i(e.effectiveUsed), !e.assignment.noLimit && e.assignment.limit != null && /* @__PURE__ */ M(A, { children: [" / ", i(e.assignment.limit)] })]
630
777
  }),
631
- /* @__PURE__ */ A("th", {
632
- className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs hidden sm:table-cell",
633
- children: "Remaining"
778
+ /* @__PURE__ */ j("td", {
779
+ className: "px-4 py-2.5 hidden sm:table-cell text-xs text-text-secondary tabular-nums",
780
+ children: e.assignment.noLimit ? "Unlimited" : i(e.remaining ?? 0)
634
781
  }),
635
- /* @__PURE__ */ A("th", {
636
- className: "text-left px-4 py-3 font-medium text-text-muted uppercase tracking-wide text-xs",
637
- children: "Status"
782
+ /* @__PURE__ */ j("td", {
783
+ className: "px-4 py-2.5",
784
+ children: /* @__PURE__ */ j(I, { status: t })
638
785
  })
639
786
  ]
640
- }) }), /* @__PURE__ */ A("tbody", {
641
- className: "divide-y divide-border-subtle",
642
- children: u.map((e) => {
643
- let t = c.has(e.quotaName);
644
- return /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("tr", {
645
- className: `transition-colors ${e.hasMultiple ? "cursor-pointer hover:bg-bg-sunken" : "hover:bg-bg-sunken"}`,
646
- onClick: e.hasMultiple ? () => p(e.quotaName) : void 0,
647
- children: [
648
- /* @__PURE__ */ A("td", {
649
- className: "px-4 py-3",
650
- children: /* @__PURE__ */ j("div", {
651
- className: "flex items-center gap-2",
652
- children: [e.hasMultiple && /* @__PURE__ */ A(x, { className: `size-4 text-text-muted shrink-0 transition-transform duration-150 ${t ? "rotate-90" : ""}` }), /* @__PURE__ */ j("div", { children: [
653
- /* @__PURE__ */ A("div", {
654
- className: "font-medium text-text-primary",
655
- children: N(e.quotaName)
656
- }),
657
- /* @__PURE__ */ A("div", {
658
- className: "text-xs font-mono text-text-muted mt-0.5",
659
- children: e.quotaName
660
- }),
661
- e.hasLive && /* @__PURE__ */ A("div", {
662
- className: "text-xs text-text-secondary mt-0.5",
663
- children: "Live · updated ~60s"
664
- })
665
- ] })]
666
- })
667
- }),
668
- /* @__PURE__ */ A("td", {
669
- className: "px-4 py-3 hidden sm:table-cell",
670
- children: e.hasMultiple ? /* @__PURE__ */ j("span", {
671
- className: "text-xs bg-[var(--color-accent-soft)] text-text-link px-1.5 py-0.5 rounded font-medium",
672
- children: [e.items.length, " subscriptions"]
673
- }) : /* @__PURE__ */ j("div", {
674
- className: "flex items-center gap-1.5",
675
- children: [/* @__PURE__ */ A("span", {
676
- className: "text-xs text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded",
677
- children: e.items[0]?.assignment.productId
678
- }), /* @__PURE__ */ A("span", {
679
- className: "text-xs text-text-secondary capitalize",
680
- children: e.items[0]?.assignment.quotaMode
681
- })]
682
- })
683
- }),
684
- /* @__PURE__ */ A("td", {
685
- className: "px-4 py-3",
686
- children: /* @__PURE__ */ j("div", {
687
- className: "space-y-1.5",
688
- children: [/* @__PURE__ */ j("div", {
689
- className: "text-text-primary tabular-nums",
690
- children: [i(e.totalUsed), !e.noLimit && e.totalLimit != null && /* @__PURE__ */ j("span", {
691
- className: "text-text-secondary",
692
- children: [
693
- " ",
694
- "/ ",
695
- i(e.totalLimit)
696
- ]
697
- })]
698
- }), !e.noLimit && /* @__PURE__ */ A(I, {
699
- percentage: e.usagePercentage,
700
- status: e.status
701
- })]
702
- })
703
- }),
704
- /* @__PURE__ */ A("td", {
705
- className: "px-4 py-3 hidden sm:table-cell text-text-primary tabular-nums",
706
- children: e.noLimit ? /* @__PURE__ */ A("span", {
707
- className: "text-text-secondary",
708
- children: "Unlimited"
709
- }) : i(e.totalRemaining ?? 0)
710
- }),
711
- /* @__PURE__ */ A("td", {
712
- className: "px-4 py-3",
713
- children: /* @__PURE__ */ A(F, { status: e.status })
714
- })
715
- ]
716
- }, e.quotaName), t && e.items.map((e) => {
717
- let t = z(e.usagePercentage, e.assignment.noLimit);
718
- return /* @__PURE__ */ j("tr", {
719
- className: "bg-bg-sunken/50 border-t border-dashed border-border-subtle",
720
- children: [
721
- /* @__PURE__ */ A("td", {
722
- className: "pl-12 pr-4 py-2.5",
723
- children: /* @__PURE__ */ j("div", {
724
- className: "text-xs text-text-secondary space-y-0.5",
725
- children: [/* @__PURE__ */ A("div", {
726
- className: "font-mono truncate max-w-[200px]",
727
- title: e.assignment.subscriptionId ?? void 0,
728
- children: e.assignment.subscriptionId ?? "—"
729
- }), /* @__PURE__ */ j("div", {
730
- className: "flex items-center gap-1.5 flex-wrap",
731
- children: [/* @__PURE__ */ A("span", {
732
- className: "bg-bg-sunken px-1.5 py-0.5 rounded",
733
- children: e.assignment.productId
734
- }), /* @__PURE__ */ A("span", {
735
- className: "capitalize",
736
- children: e.assignment.quotaMode
737
- })]
738
- })]
739
- })
740
- }),
741
- /* @__PURE__ */ A("td", { className: "px-4 py-2.5 hidden sm:table-cell" }),
742
- /* @__PURE__ */ j("td", {
743
- className: "px-4 py-2.5 text-xs text-text-secondary tabular-nums",
744
- children: [i(e.effectiveUsed), !e.assignment.noLimit && e.assignment.limit != null && /* @__PURE__ */ j(k, { children: [" / ", i(e.assignment.limit)] })]
745
- }),
746
- /* @__PURE__ */ A("td", {
747
- className: "px-4 py-2.5 hidden sm:table-cell text-xs text-text-secondary tabular-nums",
748
- children: e.assignment.noLimit ? "Unlimited" : i(e.remaining ?? 0)
749
- }),
750
- /* @__PURE__ */ A("td", {
751
- className: "px-4 py-2.5",
752
- children: /* @__PURE__ */ A(F, { status: t })
753
- })
754
- ]
755
- }, e.assignment.id);
756
- })] });
757
- })
758
- })]
759
- })
760
- }),
761
- /* @__PURE__ */ j("p", {
762
- className: "text-xs text-text-secondary",
763
- children: ["Workspace quotas are sourced from the activity service. Usage is tracked cumulatively across all active sources for each quota.", r.some((e) => e.liveStatus) && " Live values are updated every ~60 seconds."]
787
+ }, e.assignment.id);
788
+ })] }, e.quotaName);
764
789
  })
765
- ]
766
- });
767
- }, se = () => {
790
+ })]
791
+ })
792
+ }), V = () => {
768
793
  let { t: n } = te(), r = (e, t) => {
769
794
  let r = n(e);
770
795
  return r === e ? t : r;
771
- }, i = o(), [a, l] = h(() => {
796
+ }, i = o(), [a, l] = g(() => {
772
797
  if (!(typeof window > "u")) return new URLSearchParams(window.location.search).get("billingAccountId") || void 0;
773
- }), [u, d] = h(null), [b, x] = h(""), [C, N] = h("all"), [P, F] = h("active"), I = p(b), { billingAccounts: R, isLoading: z } = s(), se = (R.find((e) => e.isDefault) ?? R[0])?.id, B = a ?? se, { workspaceId: V, navigate: ce } = e(), [H, le] = h("workspace"), { dashboard: U, pooledQuotas: W, activeSubscriptions: G, pastSubscriptions: K, isLoading: ue, isPastSubscriptionsLoading: q, error: de, refetch: fe, loadMorePastSubscriptions: pe, hasMorePastSubscriptions: me, isLoadingMorePast: he, pastSubscriptionsCount: ge } = c({
798
+ }), [u, d] = g(null), [f, x] = g(""), [S, w] = g("all"), [P, F] = g("active"), I = m(f), { billingAccounts: L, isLoading: re } = s(), z = (L.find((e) => e.isDefault) ?? L[0])?.id, B = a ?? z, { workspaceId: V, productId: ce, navigate: le } = e(), [H, ue] = g("workspace"), { dashboard: U, pooledQuotas: W, activeSubscriptions: G, pastSubscriptions: K, isLoading: de, isPastSubscriptionsLoading: q, error: fe, refetch: pe, loadMorePastSubscriptions: me, hasMorePastSubscriptions: he, isLoadingMorePast: ge, pastSubscriptionsCount: _e } = c({
774
799
  billingAccountId: B,
775
800
  workspaceId: V,
776
801
  searchQuery: I || void 0,
777
802
  viewMode: P
778
- }), J = f((e) => C === "all" ? !0 : C === "healthy" ? e.status === "HEALTHY" : C === "warning" ? e.status === "WARNING" : C === "critical" ? e.status === "CRITICAL" || e.status === "EXHAUSTED" : !0, [C]), Y = m(() => W.filter(J), [W, J]), X = m(() => C === "all" ? G : G.map((e) => ({
803
+ }), J = p((e) => S === "all" ? !0 : S === "healthy" ? e.status === "HEALTHY" : S === "warning" ? e.status === "WARNING" : S === "critical" ? e.status === "CRITICAL" || e.status === "EXHAUSTED" : !0, [S]), Y = h(() => W.filter(J), [W, J]), X = h(() => S === "all" ? G : G.map((e) => ({
779
804
  ...e,
780
805
  aggregatedQuotas: e.aggregatedQuotas.filter(J)
781
806
  })).filter((e) => e.aggregatedQuotas.length > 0), [
782
807
  G,
783
- C,
808
+ S,
784
809
  J
785
- ]), Z = m(() => C === "all" ? K : K.map((e) => ({
810
+ ]), Z = h(() => S === "all" ? K : K.map((e) => ({
786
811
  ...e,
787
812
  aggregatedQuotas: e.aggregatedQuotas.filter(J)
788
813
  })).filter((e) => e.aggregatedQuotas.length > 0), [
789
814
  K,
790
- C,
815
+ S,
791
816
  J
792
- ]), Q = m(() => P === "active" ? {
817
+ ]), Q = h(() => P === "active" ? {
793
818
  active: X,
794
819
  past: []
795
820
  } : P === "past" ? {
@@ -802,258 +827,261 @@ var oe = ({ workspaceId: e }) => {
802
827
  P,
803
828
  X,
804
829
  Z
805
- ]), $ = b !== "" || C !== "all", _e = I !== b, ve = () => {
806
- x(""), N("all");
807
- }, ye = (e) => {
808
- N((t) => t === e ? "all" : e);
830
+ ]), $ = f !== "" || S !== "all", ve = I !== f, ye = () => {
831
+ x(""), w("all");
832
+ }, be = (e) => {
833
+ w((t) => t === e ? "all" : e);
809
834
  };
810
- if (!i.canViewUsage) return /* @__PURE__ */ A("div", {
835
+ if (!i.canViewUsage) return /* @__PURE__ */ j("div", {
811
836
  className: "flex items-center justify-center h-full min-h-[400px]",
812
- children: /* @__PURE__ */ j("div", {
837
+ children: /* @__PURE__ */ M("div", {
813
838
  className: "text-center space-y-2",
814
839
  children: [
815
- /* @__PURE__ */ A("div", {
840
+ /* @__PURE__ */ j("div", {
816
841
  className: "size-12 mx-auto rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center",
817
- children: /* @__PURE__ */ A(_, { className: "size-6 text-text-secondary" })
842
+ children: /* @__PURE__ */ j(v, { className: "size-6 text-text-secondary" })
818
843
  }),
819
- /* @__PURE__ */ A("h2", {
844
+ /* @__PURE__ */ j("h2", {
820
845
  className: "text-lg font-semibold text-text-primary",
821
846
  children: "Access Denied"
822
847
  }),
823
- /* @__PURE__ */ A("p", {
848
+ /* @__PURE__ */ j("p", {
824
849
  className: "text-sm text-text-secondary max-w-sm",
825
850
  children: "You don't have permission to view usage data."
826
851
  })
827
852
  ]
828
853
  })
829
854
  });
830
- if ((z || ue) && !U) return /* @__PURE__ */ j("div", {
855
+ if ((re || de) && !U) return /* @__PURE__ */ M("div", {
831
856
  className: "space-y-6 px-6 lg:px-8 py-6",
832
857
  children: [
833
- /* @__PURE__ */ A("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
834
- /* @__PURE__ */ A("div", {
858
+ /* @__PURE__ */ j("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
859
+ /* @__PURE__ */ j("div", {
835
860
  className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
836
861
  children: [
837
862
  1,
838
863
  2,
839
864
  3,
840
865
  4
841
- ].map((e) => /* @__PURE__ */ A("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-card" }, e))
866
+ ].map((e) => /* @__PURE__ */ j("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-card" }, e))
842
867
  }),
843
- /* @__PURE__ */ A("div", { className: "h-64 bg-bg-sunken animate-pulse rounded-card" })
868
+ /* @__PURE__ */ j("div", { className: "h-64 bg-bg-sunken animate-pulse rounded-card" })
844
869
  ]
845
870
  });
846
- if (de) return /* @__PURE__ */ A("div", {
871
+ if (fe) return /* @__PURE__ */ j("div", {
847
872
  className: "flex items-center justify-center h-full min-h-[400px]",
848
- children: /* @__PURE__ */ j("div", {
873
+ children: /* @__PURE__ */ M("div", {
849
874
  className: "text-center space-y-4",
850
875
  children: [
851
- /* @__PURE__ */ A("div", {
876
+ /* @__PURE__ */ j("div", {
852
877
  className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
853
- children: /* @__PURE__ */ A(_, { className: "size-6 text-status-error-text" })
878
+ children: /* @__PURE__ */ j(v, { className: "size-6 text-status-error-text" })
854
879
  }),
855
- /* @__PURE__ */ A("h2", {
880
+ /* @__PURE__ */ j("h2", {
856
881
  className: "text-lg font-semibold text-text-primary",
857
882
  children: "Failed to load usage data"
858
883
  }),
859
- /* @__PURE__ */ A("p", {
884
+ /* @__PURE__ */ j("p", {
860
885
  className: "text-sm text-text-secondary",
861
- children: de.message
886
+ children: fe.message
862
887
  }),
863
- /* @__PURE__ */ A("button", {
888
+ /* @__PURE__ */ j("button", {
864
889
  type: "button",
865
- onClick: () => fe(),
890
+ onClick: () => pe(),
866
891
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
867
892
  children: "Try Again"
868
893
  })
869
894
  ]
870
895
  })
871
896
  });
872
- let be = R.find((e) => e.id === B);
873
- return /* @__PURE__ */ j("div", {
897
+ let xe = L.find((e) => e.id === B);
898
+ return /* @__PURE__ */ M("div", {
874
899
  className: "space-y-6 px-6 lg:px-8 py-6",
875
900
  children: [
876
- /* @__PURE__ */ j("div", {
901
+ /* @__PURE__ */ M("div", {
877
902
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
878
- children: [/* @__PURE__ */ j("div", { children: [
879
- /* @__PURE__ */ A("h1", {
903
+ children: [/* @__PURE__ */ M("div", { children: [
904
+ /* @__PURE__ */ j("h1", {
880
905
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
881
906
  children: r("billing.usage.title", "Usage")
882
907
  }),
883
- /* @__PURE__ */ A("p", {
908
+ /* @__PURE__ */ j("p", {
884
909
  className: "text-sm text-text-secondary mt-1",
885
910
  children: "Monitor your resource consumption and quota usage"
886
911
  }),
887
- /* @__PURE__ */ A(ne, {
912
+ /* @__PURE__ */ j(ne, {
888
913
  className: "mt-3",
889
914
  children: r("billing.usage.purpose", "See how much of each quota you have consumed so you can avoid running out and know when to upgrade. Switch between workspace-level usage and your global per-account quotas, drill into any quota for its history, and request more capacity when something is running low.")
890
915
  })
891
- ] }), /* @__PURE__ */ j("div", {
916
+ ] }), /* @__PURE__ */ M("div", {
892
917
  className: "flex items-center gap-3",
893
918
  children: [
894
- /* @__PURE__ */ j("div", {
919
+ /* @__PURE__ */ M("div", {
895
920
  className: "flex items-center bg-bg-sunken rounded-lg p-1 border border-border-subtle",
896
- children: [/* @__PURE__ */ j("button", {
921
+ children: [/* @__PURE__ */ M("button", {
897
922
  type: "button",
898
- onClick: () => le("workspace"),
923
+ onClick: () => ue("workspace"),
899
924
  className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${H === "workspace" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
900
- children: [/* @__PURE__ */ A(w, { className: "size-3.5" }), "Workspace"]
901
- }), /* @__PURE__ */ j("button", {
925
+ children: [/* @__PURE__ */ j(T, { className: "size-3.5" }), "Workspace"]
926
+ }), /* @__PURE__ */ M("button", {
902
927
  type: "button",
903
- onClick: () => le("global"),
928
+ onClick: () => ue("global"),
904
929
  className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${H === "global" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
905
- children: [/* @__PURE__ */ A(T, { className: "size-3.5" }), "Global"]
930
+ children: [/* @__PURE__ */ j(E, { className: "size-3.5" }), "Global"]
906
931
  })]
907
932
  }),
908
- H === "global" && R.length > 1 && /* @__PURE__ */ A("select", {
933
+ H === "global" && L.length > 1 && /* @__PURE__ */ j("select", {
909
934
  value: B || "",
910
935
  onChange: (e) => l(e.target.value),
911
936
  className: "px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] w-full sm:min-w-[200px]",
912
- children: R.map((e) => /* @__PURE__ */ A("option", {
937
+ children: L.map((e) => /* @__PURE__ */ j("option", {
913
938
  value: e.id,
914
939
  children: e.name
915
940
  }, e.id))
916
941
  }),
917
- /* @__PURE__ */ A("button", {
942
+ /* @__PURE__ */ j("button", {
918
943
  type: "button",
919
- onClick: () => H === "workspace" ? void 0 : fe(),
944
+ onClick: () => H === "workspace" ? void 0 : pe(),
920
945
  className: "p-2 border border-border-subtle rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
921
946
  "aria-label": "Refresh",
922
947
  title: "Refresh",
923
- children: /* @__PURE__ */ A(E, { className: "size-4" })
948
+ children: /* @__PURE__ */ j(D, { className: "size-4" })
924
949
  })
925
950
  ]
926
951
  })]
927
952
  }),
928
- H === "workspace" && V && /* @__PURE__ */ A(oe, { workspaceId: V }),
929
- H === "workspace" && !V && /* @__PURE__ */ A("div", {
953
+ H === "workspace" && V && /* @__PURE__ */ j(se, {
954
+ workspaceId: V,
955
+ productId: ce
956
+ }),
957
+ H === "workspace" && !V && /* @__PURE__ */ j("div", {
930
958
  className: "text-center py-12 text-text-secondary text-sm",
931
959
  children: "No workspace context available."
932
960
  }),
933
- H === "global" && /* @__PURE__ */ j(k, { children: [
934
- /* @__PURE__ */ j("div", {
961
+ H === "global" && /* @__PURE__ */ M(A, { children: [
962
+ /* @__PURE__ */ M("div", {
935
963
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
936
964
  children: [
937
- /* @__PURE__ */ j("div", {
965
+ /* @__PURE__ */ M("div", {
938
966
  className: "relative flex-1 max-w-md",
939
967
  children: [
940
- /* @__PURE__ */ A(ee, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }),
941
- /* @__PURE__ */ A("input", {
968
+ /* @__PURE__ */ j(ee, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }),
969
+ /* @__PURE__ */ j("input", {
942
970
  type: "text",
943
- value: b,
971
+ value: f,
944
972
  onChange: (e) => x(e.target.value),
945
973
  placeholder: `Search ${P === "past" ? "past" : P === "all" ? "all" : "active"} quotas...`,
946
974
  className: "w-full pl-9 pr-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
947
975
  }),
948
- (b || _e) && /* @__PURE__ */ A("button", {
976
+ (f || ve) && /* @__PURE__ */ j("button", {
949
977
  type: "button",
950
978
  onClick: () => x(""),
951
979
  "aria-label": "Clear search",
952
980
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-sunken",
953
- children: _e ? /* @__PURE__ */ A(E, { className: "size-3 text-text-muted animate-spin" }) : /* @__PURE__ */ A(D, { className: "size-3 text-text-muted" })
981
+ children: ve ? /* @__PURE__ */ j(D, { className: "size-3 text-text-muted animate-spin" }) : /* @__PURE__ */ j(O, { className: "size-3 text-text-muted" })
954
982
  })
955
983
  ]
956
984
  }),
957
- /* @__PURE__ */ j("div", {
985
+ /* @__PURE__ */ M("div", {
958
986
  className: "flex items-center bg-bg-sunken rounded-lg p-1 border border-border-subtle",
959
- children: [/* @__PURE__ */ j("button", {
987
+ children: [/* @__PURE__ */ M("button", {
960
988
  type: "button",
961
989
  onClick: () => F("active"),
962
990
  className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${P === "active" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
963
- children: [/* @__PURE__ */ A(T, { className: "size-3.5" }), "Active"]
964
- }), /* @__PURE__ */ j("button", {
991
+ children: [/* @__PURE__ */ j(E, { className: "size-3.5" }), "Active"]
992
+ }), /* @__PURE__ */ M("button", {
965
993
  type: "button",
966
994
  onClick: () => F("past"),
967
995
  disabled: q && P !== "past",
968
996
  className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${P === "past" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"} ${q && P !== "past" ? "opacity-70" : ""}`,
969
- children: [q && P === "past" ? /* @__PURE__ */ A(E, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ A(S, { className: "size-3.5" }), "Past"]
997
+ children: [q && P === "past" ? /* @__PURE__ */ j(D, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ j(C, { className: "size-3.5" }), "Past"]
970
998
  })]
971
999
  }),
972
- $ && /* @__PURE__ */ j("button", {
1000
+ $ && /* @__PURE__ */ M("button", {
973
1001
  type: "button",
974
- onClick: ve,
1002
+ onClick: ye,
975
1003
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary border border-border-subtle rounded-button hover:bg-bg-sunken transition-colors",
976
- children: [/* @__PURE__ */ A(D, { className: "size-3" }), "Clear filters"]
1004
+ children: [/* @__PURE__ */ j(O, { className: "size-3" }), "Clear filters"]
977
1005
  })
978
1006
  ]
979
1007
  }),
980
- be && /* @__PURE__ */ j("div", {
1008
+ xe && /* @__PURE__ */ M("div", {
981
1009
  className: "text-sm text-text-secondary",
982
1010
  children: [
983
1011
  "Viewing usage for",
984
1012
  " ",
985
- /* @__PURE__ */ A("span", {
1013
+ /* @__PURE__ */ j("span", {
986
1014
  className: "font-medium text-text-primary",
987
- children: be.name
1015
+ children: xe.name
988
1016
  })
989
1017
  ]
990
1018
  }),
991
- U && /* @__PURE__ */ j("div", {
1019
+ U && /* @__PURE__ */ M("div", {
992
1020
  className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
993
1021
  children: [
994
- /* @__PURE__ */ A(L, {
1022
+ /* @__PURE__ */ j(R, {
995
1023
  label: "Total Quotas",
996
1024
  value: U.totalQuotas,
997
- icon: /* @__PURE__ */ A(w, { className: "size-5" }),
1025
+ icon: /* @__PURE__ */ j(T, { className: "size-5" }),
998
1026
  color: "blue",
999
- isActive: C === "all",
1000
- onClick: () => N("all")
1027
+ isActive: S === "all",
1028
+ onClick: () => w("all")
1001
1029
  }),
1002
- /* @__PURE__ */ A(L, {
1030
+ /* @__PURE__ */ j(R, {
1003
1031
  label: "Healthy",
1004
1032
  value: U.healthyQuotas,
1005
- icon: /* @__PURE__ */ A(v, { className: "size-5" }),
1033
+ icon: /* @__PURE__ */ j(y, { className: "size-5" }),
1006
1034
  color: "emerald",
1007
- isActive: C === "healthy",
1008
- onClick: () => ye("healthy")
1035
+ isActive: S === "healthy",
1036
+ onClick: () => be("healthy")
1009
1037
  }),
1010
- /* @__PURE__ */ A(L, {
1038
+ /* @__PURE__ */ j(R, {
1011
1039
  label: "Warning",
1012
1040
  value: U.warningQuotas,
1013
- icon: /* @__PURE__ */ A(g, { className: "size-5" }),
1041
+ icon: /* @__PURE__ */ j(_, { className: "size-5" }),
1014
1042
  color: "amber",
1015
- isActive: C === "warning",
1016
- onClick: () => ye("warning")
1043
+ isActive: S === "warning",
1044
+ onClick: () => be("warning")
1017
1045
  }),
1018
- /* @__PURE__ */ A(L, {
1046
+ /* @__PURE__ */ j(R, {
1019
1047
  label: "Critical / Exhausted",
1020
1048
  value: U.criticalQuotas + U.exhaustedQuotas,
1021
- icon: /* @__PURE__ */ A(_, { className: "size-5" }),
1049
+ icon: /* @__PURE__ */ j(v, { className: "size-5" }),
1022
1050
  color: "red",
1023
- isActive: C === "critical",
1024
- onClick: () => ye("critical")
1051
+ isActive: S === "critical",
1052
+ onClick: () => be("critical")
1025
1053
  })
1026
1054
  ]
1027
1055
  }),
1028
- U && (U.warningQuotas > 0 || U.criticalQuotas > 0 || U.exhaustedQuotas > 0) && /* @__PURE__ */ j("div", {
1056
+ U && (U.warningQuotas > 0 || U.criticalQuotas > 0 || U.exhaustedQuotas > 0) && /* @__PURE__ */ M("div", {
1029
1057
  className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between p-4 rounded-lg border ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? `${t.error.bg} ${t.error.border}` : `${t.warning.bg} ${t.warning.border}`}`,
1030
- children: [/* @__PURE__ */ j("div", {
1058
+ children: [/* @__PURE__ */ M("div", {
1031
1059
  className: "flex items-center gap-3",
1032
- children: [U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? /* @__PURE__ */ A(O, { className: `size-5 shrink-0 ${t.error.icon}` }) : /* @__PURE__ */ A(g, { className: `size-5 shrink-0 ${t.warning.icon}` }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
1060
+ children: [U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? /* @__PURE__ */ j(k, { className: `size-5 shrink-0 ${t.error.icon}` }) : /* @__PURE__ */ j(_, { className: `size-5 shrink-0 ${t.warning.icon}` }), /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", {
1033
1061
  className: `text-sm font-medium ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? t.error.text : t.warning.text}`,
1034
1062
  children: U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? `${U.criticalQuotas + U.exhaustedQuotas} quota${U.criticalQuotas + U.exhaustedQuotas === 1 ? "" : "s"} exhausted or critical` : `${U.warningQuotas} quota${U.warningQuotas === 1 ? "" : "s"} approaching the limit`
1035
- }), /* @__PURE__ */ A("p", {
1063
+ }), /* @__PURE__ */ j("p", {
1036
1064
  className: "text-xs text-text-secondary mt-0.5",
1037
1065
  children: "Contact support to request a quota increase for your plan."
1038
1066
  })] })]
1039
- }), /* @__PURE__ */ A("button", {
1067
+ }), /* @__PURE__ */ j("button", {
1040
1068
  type: "button",
1041
- onClick: () => ce("/support/tickets"),
1069
+ onClick: () => le("/support/tickets"),
1042
1070
  className: `shrink-0 px-4 py-2 text-sm font-medium rounded-button border transition-colors duration-200 ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? "bg-action-danger-bg text-action-danger-text border-action-danger-bg hover:bg-action-danger-bgHover" : "border-status-warning-border text-status-warning-text hover:bg-status-warning-bg-subtle"}`,
1043
1071
  children: "Request more quota"
1044
1072
  })]
1045
1073
  }),
1046
- ($ || P !== "active") && /* @__PURE__ */ j("div", {
1074
+ ($ || P !== "active") && /* @__PURE__ */ M("div", {
1047
1075
  className: "flex items-center gap-2 text-sm text-text-secondary flex-wrap",
1048
1076
  children: [
1049
- /* @__PURE__ */ j("span", { children: [
1077
+ /* @__PURE__ */ M("span", { children: [
1050
1078
  "Showing",
1051
1079
  " ",
1052
1080
  Q.active.reduce((e, t) => e + t.aggregatedQuotas.length, 0) + Q.past.reduce((e, t) => e + t.aggregatedQuotas.length, 0) + (P === "past" ? 0 : Y.length),
1053
1081
  " ",
1054
1082
  "quotas"
1055
1083
  ] }),
1056
- /* @__PURE__ */ j("span", {
1084
+ /* @__PURE__ */ M("span", {
1057
1085
  className: "px-2 py-0.5 bg-[var(--color-accent-soft)] text-text-link rounded text-xs capitalize",
1058
1086
  children: [
1059
1087
  P === "active" ? "Active" : P === "past" ? "Past" : "All",
@@ -1061,110 +1089,110 @@ var oe = ({ workspaceId: e }) => {
1061
1089
  "subscriptions"
1062
1090
  ]
1063
1091
  }),
1064
- C !== "all" && /* @__PURE__ */ A("span", {
1092
+ S !== "all" && /* @__PURE__ */ j("span", {
1065
1093
  className: "px-2 py-0.5 bg-bg-sunken text-text-secondary rounded text-xs capitalize",
1066
- children: C === "critical" ? "Critical / Exhausted" : C
1094
+ children: S === "critical" ? "Critical / Exhausted" : S
1067
1095
  }),
1068
- b && /* @__PURE__ */ j("span", {
1096
+ f && /* @__PURE__ */ M("span", {
1069
1097
  className: "px-2 py-0.5 bg-bg-sunken text-text-secondary rounded text-xs",
1070
1098
  children: [
1071
1099
  "“",
1072
- b,
1100
+ f,
1073
1101
  "”"
1074
1102
  ]
1075
1103
  })
1076
1104
  ]
1077
1105
  }),
1078
- Q.active.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
1106
+ Q.active.length > 0 && /* @__PURE__ */ M("section", { children: [/* @__PURE__ */ M("h2", {
1079
1107
  className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
1080
- children: [/* @__PURE__ */ A(T, { className: "size-5 text-text-link" }), P === "all" ? "Active Subscription Quotas" : "Subscription Quotas"]
1081
- }), /* @__PURE__ */ A("div", {
1108
+ children: [/* @__PURE__ */ j(E, { className: "size-5 text-text-link" }), P === "all" ? "Active Subscription Quotas" : "Subscription Quotas"]
1109
+ }), /* @__PURE__ */ j("div", {
1082
1110
  className: "space-y-4",
1083
- children: Q.active.map((e) => /* @__PURE__ */ A(ie, {
1111
+ children: Q.active.map((e) => /* @__PURE__ */ j(ae, {
1084
1112
  subscription: e,
1085
1113
  onQuotaClick: d,
1086
1114
  defaultExpanded: !0
1087
1115
  }, e.id))
1088
1116
  })] }),
1089
- Q.past.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
1117
+ Q.past.length > 0 && /* @__PURE__ */ M("section", { children: [/* @__PURE__ */ M("h2", {
1090
1118
  className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
1091
1119
  children: [
1092
- /* @__PURE__ */ A(S, { className: "size-5 text-text-muted" }),
1120
+ /* @__PURE__ */ j(C, { className: "size-5 text-text-muted" }),
1093
1121
  "Past Subscription Quotas",
1094
- /* @__PURE__ */ A("span", {
1122
+ /* @__PURE__ */ j("span", {
1095
1123
  className: "text-xs font-normal text-text-secondary",
1096
1124
  children: "(Canceled / Expired / Upgraded)"
1097
1125
  }),
1098
- ge > 0 && /* @__PURE__ */ j("span", {
1126
+ _e > 0 && /* @__PURE__ */ M("span", {
1099
1127
  className: "text-xs font-normal px-2 py-0.5 bg-bg-sunken text-text-secondary rounded-full tabular-nums",
1100
1128
  children: [
1101
1129
  Q.past.length,
1102
- me ? "+" : "",
1130
+ he ? "+" : "",
1103
1131
  " of ",
1104
- ge
1132
+ _e
1105
1133
  ]
1106
1134
  })
1107
1135
  ]
1108
- }), /* @__PURE__ */ j("div", {
1136
+ }), /* @__PURE__ */ M("div", {
1109
1137
  className: "space-y-4",
1110
- children: [Q.past.map((e) => /* @__PURE__ */ A(ie, {
1138
+ children: [Q.past.map((e) => /* @__PURE__ */ j(ae, {
1111
1139
  subscription: e,
1112
1140
  onQuotaClick: d,
1113
1141
  defaultExpanded: P === "past"
1114
- }, e.id)), me && /* @__PURE__ */ A("div", {
1142
+ }, e.id)), he && /* @__PURE__ */ j("div", {
1115
1143
  className: "flex justify-center pt-2",
1116
- children: /* @__PURE__ */ A("button", {
1144
+ children: /* @__PURE__ */ j("button", {
1117
1145
  type: "button",
1118
- onClick: pe,
1119
- disabled: he,
1146
+ onClick: me,
1147
+ disabled: ge,
1120
1148
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary border border-border-subtle rounded-button hover:bg-bg-sunken transition-colors disabled:opacity-50",
1121
- children: he ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(E, { className: "size-4 animate-spin" }), "Loading…"] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(y, { className: "size-4" }), "Load more past subscriptions"] })
1149
+ children: ge ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(D, { className: "size-4 animate-spin" }), "Loading…"] }) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(b, { className: "size-4" }), "Load more past subscriptions"] })
1122
1150
  })
1123
1151
  })]
1124
1152
  })] }),
1125
- P !== "past" && Y.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
1153
+ P !== "past" && Y.length > 0 && /* @__PURE__ */ M("section", { children: [/* @__PURE__ */ M("h2", {
1126
1154
  className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
1127
1155
  children: [
1128
- /* @__PURE__ */ A(w, { className: `size-5 ${t.info.icon}` }),
1156
+ /* @__PURE__ */ j(T, { className: `size-5 ${t.info.icon}` }),
1129
1157
  "Pooled Quotas",
1130
- /* @__PURE__ */ A("span", {
1158
+ /* @__PURE__ */ j("span", {
1131
1159
  className: "text-xs font-normal text-text-secondary",
1132
1160
  children: "(Shared across all products)"
1133
1161
  })
1134
1162
  ]
1135
- }), /* @__PURE__ */ A(re, {
1163
+ }), /* @__PURE__ */ j(ie, {
1136
1164
  quotas: Y,
1137
1165
  showPlanColumn: !1,
1138
1166
  onQuotaClick: d
1139
1167
  })] }),
1140
- P === "active" && G.length === 0 && W.length === 0 && !$ && /* @__PURE__ */ A(M, {
1168
+ P === "active" && G.length === 0 && W.length === 0 && !$ && /* @__PURE__ */ j(N, {
1141
1169
  illustration: "empty-data",
1142
1170
  title: "No active quotas found",
1143
1171
  description: "Quotas will appear here once you have active subscriptions or pooled allocations."
1144
1172
  }),
1145
- P === "past" && K.length === 0 && !$ && !q && /* @__PURE__ */ A(M, {
1173
+ P === "past" && K.length === 0 && !$ && !q && /* @__PURE__ */ j(N, {
1146
1174
  illustration: "empty-data",
1147
1175
  title: "No past subscriptions",
1148
1176
  description: "You don't have any canceled, expired, or upgraded subscriptions yet.",
1149
- action: /* @__PURE__ */ A("button", {
1177
+ action: /* @__PURE__ */ j("button", {
1150
1178
  type: "button",
1151
1179
  onClick: () => F("active"),
1152
1180
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
1153
1181
  children: "View active subscriptions"
1154
1182
  })
1155
1183
  }),
1156
- P === "past" && q && /* @__PURE__ */ A("div", {
1184
+ P === "past" && q && /* @__PURE__ */ j("div", {
1157
1185
  className: "space-y-4",
1158
1186
  children: [
1159
1187
  1,
1160
1188
  2,
1161
1189
  3
1162
- ].map((e) => /* @__PURE__ */ A("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-card" }, e))
1190
+ ].map((e) => /* @__PURE__ */ j("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-card" }, e))
1163
1191
  }),
1164
- $ && Q.active.length === 0 && Q.past.length === 0 && (P === "past" || Y.length === 0) && /* @__PURE__ */ A(M, {
1192
+ $ && Q.active.length === 0 && Q.past.length === 0 && (P === "past" || Y.length === 0) && /* @__PURE__ */ j(N, {
1165
1193
  illustration: "empty-search",
1166
- title: C !== "all" && !b ? `No ${C === "critical" ? "critical or exhausted" : C} quotas` : "No matching quotas",
1167
- description: C !== "all" && !b ? /* @__PURE__ */ j(k, { children: ["All your quotas are in a different status.", U && /* @__PURE__ */ j("span", {
1194
+ title: S !== "all" && !f ? `No ${S === "critical" ? "critical or exhausted" : S} quotas` : "No matching quotas",
1195
+ description: S !== "all" && !f ? /* @__PURE__ */ M(A, { children: ["All your quotas are in a different status.", U && /* @__PURE__ */ M("span", {
1168
1196
  className: "block mt-1",
1169
1197
  children: [
1170
1198
  "You have ",
@@ -1177,25 +1205,25 @@ var oe = ({ workspaceId: e }) => {
1177
1205
  " ",
1178
1206
  "critical quotas."
1179
1207
  ]
1180
- })] }) : /* @__PURE__ */ j(k, { children: [
1208
+ })] }) : /* @__PURE__ */ M(A, { children: [
1181
1209
  "No quotas match your current search or filter criteria in",
1182
1210
  " ",
1183
1211
  P === "past" ? "past" : P === "all" ? "any" : "active",
1184
1212
  " ",
1185
1213
  "subscriptions.",
1186
- P === "active" && !C.includes("all") && /* @__PURE__ */ A("span", {
1214
+ P === "active" && !S.includes("all") && /* @__PURE__ */ j("span", {
1187
1215
  className: "block mt-1",
1188
1216
  children: "Try switching to “Past” or “All” to search across more subscriptions."
1189
1217
  })
1190
1218
  ] }),
1191
- action: /* @__PURE__ */ j("div", {
1219
+ action: /* @__PURE__ */ M("div", {
1192
1220
  className: "flex gap-2",
1193
- children: [/* @__PURE__ */ A("button", {
1221
+ children: [/* @__PURE__ */ j("button", {
1194
1222
  type: "button",
1195
- onClick: ve,
1223
+ onClick: ye,
1196
1224
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
1197
- children: C === "all" ? "Clear filters" : "Show all quotas"
1198
- }), P === "active" && b && /* @__PURE__ */ A("button", {
1225
+ children: S === "all" ? "Clear filters" : "Show all quotas"
1226
+ }), P === "active" && f && /* @__PURE__ */ j("button", {
1199
1227
  type: "button",
1200
1228
  onClick: () => F("all"),
1201
1229
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
@@ -1204,7 +1232,7 @@ var oe = ({ workspaceId: e }) => {
1204
1232
  })
1205
1233
  })
1206
1234
  ] }),
1207
- u && /* @__PURE__ */ A(ae, {
1235
+ u && /* @__PURE__ */ j(oe, {
1208
1236
  quota: u,
1209
1237
  onClose: () => d(null)
1210
1238
  })
@@ -1212,6 +1240,6 @@ var oe = ({ workspaceId: e }) => {
1212
1240
  });
1213
1241
  };
1214
1242
  //#endregion
1215
- export { se as UsagePage };
1243
+ export { V as UsagePage };
1216
1244
 
1217
1245
  //# sourceMappingURL=UsagePage.js.map