@burdenoff/microfe-devportal 2026.914.5 → 2026.914.7

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.
Files changed (35) hide show
  1. package/dist/devportal/hooks/usePackageUpload.d.ts.map +1 -1
  2. package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
  3. package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
  4. package/dist/devportal/pages/CreateOrganizationPage.js +11 -2
  5. package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
  6. package/dist/devportal/pages/CreatePhysicalItemPage.d.ts.map +1 -1
  7. package/dist/devportal/pages/CreatePhysicalItemPage.js +237 -236
  8. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  9. package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
  10. package/dist/devportal/pages/EditApplicationPage.js +4 -0
  11. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  12. package/dist/devportal/pages/OrganizationDetailPage.js +144 -109
  13. package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
  14. package/dist/devportal/pages/PublishPage.d.ts.map +1 -1
  15. package/dist/devportal/pages/PublishPage.js.map +1 -1
  16. package/dist/devportal/pages/RevenueDashboardPage.d.ts.map +1 -1
  17. package/dist/devportal/pages/RevenueDashboardPage.js +478 -258
  18. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  19. package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
  20. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  21. package/dist/devportal/providers/DevportalProvider.d.ts.map +1 -1
  22. package/dist/devportal/providers/DevportalProvider.js +31 -30
  23. package/dist/devportal/providers/DevportalProvider.js.map +1 -1
  24. package/dist/devportal/types/index.d.ts +10 -0
  25. package/dist/devportal/types/index.d.ts.map +1 -1
  26. package/dist/devportal/types/index.js.map +1 -1
  27. package/dist/generated/global-operations.d.ts +16 -0
  28. package/dist/generated/global-operations.d.ts.map +1 -1
  29. package/dist/generated/global-operations.js +74 -46
  30. package/dist/generated/global-operations.js.map +1 -1
  31. package/dist/generated/global-types.d.ts +15 -0
  32. package/dist/generated/global-types.d.ts.map +1 -1
  33. package/dist/generated/global-types.js +8 -0
  34. package/dist/generated/global-types.js.map +1 -0
  35. package/package.json +1 -1
@@ -3,76 +3,122 @@ import { useTr as t } from "../utils/i18n.js";
3
3
  import { cn as n } from "../utils/cn.js";
4
4
  import { EmptyState as r } from "../components/EmptyState.js";
5
5
  import { useIsSellerSection as ee } from "../hooks/useIsSellerSection.js";
6
- import { useGetBillingAccountsByOrgQuery as te, useGetMyOrganizationsQuery as ne, useGetRevenueDashboardDataQuery as re, useLinkDevOrgBillingAccountMutation as ie } from "../../generated/global-operations.js";
7
- import { getErrorMessage as i } from "../hooks/useGraphQL.js";
8
- import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
9
- import { StatusBadge as s } from "../components/StatusBadge.js";
10
- import { StatCard as c, StatCardGrid as ae } from "../components/StatCard.js";
11
- import { DataTable as l } from "../components/DataTable.js";
6
+ import { useAddPaymentMethodMutation as te, useGetBillingAccountsByOrgQuery as ne, useGetMyOrganizationsQuery as re, useGetPaymentMethodsQuery as ie, useGetRevenueDashboardDataQuery as ae, useLinkDevOrgBillingAccountMutation as oe, useRequestPayoutMutation as se } from "../../generated/global-operations.js";
7
+ import { getErrorMessage as ce } from "../hooks/useGraphQL.js";
8
+ import { PageLayout as i, PageSection as a } from "../components/PageLayout.js";
9
+ import { StatusBadge as o } from "../components/StatusBadge.js";
10
+ import { StatCard as s, StatCardGrid as le } from "../components/StatCard.js";
11
+ import { DataTable as c } from "../components/DataTable.js";
12
12
  import "../hooks/index.js";
13
- import { Tooltip as u } from "../../node_modules/recharts/es6/component/Tooltip.js";
14
- import { ResponsiveContainer as d } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
15
- import { Bar as oe } from "../../node_modules/recharts/es6/cartesian/Bar.js";
16
- import { CartesianGrid as f } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
17
- import { Line as p } from "../../node_modules/recharts/es6/cartesian/Line.js";
18
- import { XAxis as m } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
19
- import { YAxis as h } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
20
- import { LineChart as se } from "../../node_modules/recharts/es6/chart/LineChart.js";
21
- import { BarChart as ce } from "../../node_modules/recharts/es6/chart/BarChart.js";
22
- import { useMemo as g, useState as _ } from "react";
23
- import { AlertCircle as v, ArrowDownToLine as le, Building2 as y, Check as b, CreditCard as x, DollarSign as S, Link2 as C, Loader2 as w, Wallet as ue } from "lucide-react";
24
- import { useSearchParams as de } from "react-router";
25
- import { Fragment as fe, jsx as T, jsxs as E } from "react/jsx-runtime";
26
- import { EmphasisPanel as pe, GlassCard as D } from "@burdenoff/fe-libs/ui";
13
+ import { Tooltip as l } from "../../node_modules/recharts/es6/component/Tooltip.js";
14
+ import { ResponsiveContainer as ue } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
15
+ import { Bar as de } from "../../node_modules/recharts/es6/cartesian/Bar.js";
16
+ import { CartesianGrid as fe } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
17
+ import { Line as pe } from "../../node_modules/recharts/es6/cartesian/Line.js";
18
+ import { XAxis as me } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
19
+ import { YAxis as he } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
20
+ import { LineChart as ge } from "../../node_modules/recharts/es6/chart/LineChart.js";
21
+ import { BarChart as _e } from "../../node_modules/recharts/es6/chart/BarChart.js";
22
+ import { DevPortalPaymentMethodType as u } from "../../generated/global-types.js";
23
+ import { useMemo as d, useState as f } from "react";
24
+ import { AlertCircle as ve, ArrowDownToLine as ye, Banknote as be, Building2 as xe, Check as p, CreditCard as m, DollarSign as h, Link2 as g, Loader2 as _, Send as Se, Wallet as Ce } from "lucide-react";
25
+ import { useSearchParams as we } from "react-router";
26
+ import { Fragment as Te, jsx as v, jsxs as y } from "react/jsx-runtime";
27
+ import { EmphasisPanel as Ee, GlassCard as b } from "@burdenoff/fe-libs/ui";
27
28
  //#region src/devportal/pages/RevenueDashboardPage.tsx
28
- var O = {
29
+ var x = 100, S = {
29
30
  primary: "var(--color-chart-1)",
30
31
  secondary: "var(--color-chart-2)",
31
32
  tertiary: "var(--color-chart-4)"
32
- }, me = {
33
+ }, De = {
33
34
  "30d": 30,
34
35
  "90d": 90,
35
36
  "12m": 365
36
- }, k = () => {
37
- let k = t(), { activeOrgId: he, activePhysicalOrgId: ge, tenantId: A } = e(), j = ee() ? ge : he, [M, _e] = _("90d"), [N, P] = _(!1), [F, I] = _(null), [ve] = ie(), [L, R] = _(!1), [z, B] = _(null), [ye] = de(), V = g(() => /* @__PURE__ */ new Date(), []), { data: be, loading: H } = te({
37
+ }, C = () => {
38
+ let C = t(), { activeOrgId: Oe, activePhysicalOrgId: ke, tenantId: Ae } = e(), w = ee() ? ke : Oe, [T, je] = f("90d"), [E, D] = f(!1), [O, k] = f(null), [Me] = oe(), [A, j] = f(!1), [M, N] = f(null), [Ne] = we(), P = d(() => /* @__PURE__ */ new Date(), []), [Pe, F] = f(!1), [Fe, I] = f(null), [L, R] = f(null), [Ie, z] = f(!1), [B, Le] = f(u.BankAccount), [Re, ze] = f(""), [V, Be] = f(""), [Ve, He] = f(""), [H, Ue] = f(""), [We, U] = f(null), { data: Ge, loading: Ke } = ie({
39
+ variables: { organizationId: w ?? "" },
40
+ skip: !w,
41
+ fetchPolicy: "cache-and-network"
42
+ }), [qe, { loading: Je }] = te(), [Ye, { loading: Xe }] = se(), { data: Ze, loading: W } = ne({
38
43
  fetchPolicy: "cache-and-network",
39
- context: { headers: { "x-org-id": A ?? "" } }
40
- }), xe = g(() => {
41
- let e = new Date(V);
42
- return e.setDate(e.getDate() - me[M]), e.toISOString();
43
- }, [V, M]), { data: U, loading: Se, error: W } = ne({ fetchPolicy: "cache-and-network" }), { data: G, loading: Ce, error: K } = re({
44
+ context: { headers: { "x-org-id": Ae ?? "" } }
45
+ }), Qe = d(() => {
46
+ let e = new Date(P);
47
+ return e.setDate(e.getDate() - De[T]), e.toISOString();
48
+ }, [P, T]), { data: G, loading: $e, error: et } = re({ fetchPolicy: "cache-and-network" }), { data: K, loading: tt, error: nt } = ae({
44
49
  variables: {
45
- organizationId: j ?? "",
50
+ organizationId: w ?? "",
46
51
  period: "monthly",
47
- startDate: xe,
48
- endDate: V.toISOString(),
52
+ startDate: Qe,
53
+ endDate: P.toISOString(),
49
54
  salesLimit: 10,
50
55
  salesOffset: 0,
51
56
  payoutsLimit: 10,
52
57
  payoutsOffset: 0
53
58
  },
54
- skip: !j,
59
+ skip: !w,
55
60
  fetchPolicy: "cache-and-network"
56
- }), q = g(() => U?.myDeveloperOrganizations?.map((e) => e) ?? [], [U?.myDeveloperOrganizations]).find((e) => e.id === j), J = be?.getBillingAccountsByOrg ?? [], Y = J.find((e) => e.id === q?.billingAccountId) ?? null, X = () => {
57
- B(q?.billingAccountId ?? J.find((e) => e.isDefault)?.id ?? J[0]?.id ?? null), R(!0);
58
- }, Z = async () => {
59
- if (!(!j || !z)) {
60
- P(!0), I(null);
61
+ }), q = d(() => G?.myDeveloperOrganizations?.map((e) => e) ?? [], [G?.myDeveloperOrganizations]).find((e) => e.id === w), J = Ze?.getBillingAccountsByOrg ?? [], Y = J.find((e) => e.id === q?.billingAccountId) ?? null, rt = () => {
62
+ N(q?.billingAccountId ?? J.find((e) => e.isDefault)?.id ?? J[0]?.id ?? null), j(!0);
63
+ }, it = async () => {
64
+ if (!(!w || !M)) {
65
+ D(!0), k(null);
61
66
  try {
62
- await ve({
67
+ await Me({
63
68
  variables: {
64
- organizationId: j,
65
- billingAccountId: z
69
+ organizationId: w,
70
+ billingAccountId: M
66
71
  },
67
72
  refetchQueries: ["GetMyOrganizations"]
68
- }), R(!1);
73
+ }), j(!1);
69
74
  } catch (e) {
70
- I(e instanceof Error ? e.message : "Failed to link billing account");
75
+ k(e instanceof Error ? e.message : "Failed to link billing account");
71
76
  } finally {
72
- P(!1);
77
+ D(!1);
73
78
  }
74
79
  }
75
- }, Q = G?.developerOrgRevenueSummary, we = [...G?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), Te = G?.developerOrgSales?.edges?.map((e) => e.node) ?? [], Ee = G?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = we.map((e) => ({
80
+ }, X = (Ge?.developerOrgPaymentMethods ?? []).filter((e) => e.isActive), at = () => {
81
+ R((X.find((e) => e.isDefault) ?? X[0])?.id ?? null), z(X.length === 0), U(null), I(null), F(!0);
82
+ }, ot = async () => {
83
+ if (!w) return;
84
+ U(null);
85
+ let e = B === u.Paypal, t = e ? { email: H } : {
86
+ accountNumber: V,
87
+ routingNumber: Ve
88
+ };
89
+ try {
90
+ let n = (await qe({
91
+ variables: {
92
+ organizationId: w,
93
+ input: {
94
+ type: B,
95
+ name: Re || (e ? "PayPal" : "Bank Account"),
96
+ accountDetails: t,
97
+ isDefault: X.length === 0
98
+ }
99
+ },
100
+ refetchQueries: ["GetPaymentMethods"]
101
+ })).data?.addDeveloperOrgPaymentMethod;
102
+ n && R(n.id), z(!1), ze(""), Be(""), He(""), Ue("");
103
+ } catch (e) {
104
+ U(e instanceof Error ? e.message : "Failed to add payout method");
105
+ }
106
+ }, st = async () => {
107
+ if (!(!w || !L)) {
108
+ I(null);
109
+ try {
110
+ await Ye({
111
+ variables: {
112
+ organizationId: w,
113
+ paymentMethodId: L
114
+ },
115
+ refetchQueries: ["GetRevenueDashboardData"]
116
+ }), F(!1);
117
+ } catch (e) {
118
+ I(e instanceof Error ? e.message : "Failed to request withdrawal");
119
+ }
120
+ }
121
+ }, Z = K?.developerOrgRevenueSummary, Q = (Z?.pendingBalance ?? 0) >= x, ct = [...K?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), lt = K?.developerOrgSales?.edges?.map((e) => e.node) ?? [], ut = K?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = ct.map((e) => ({
76
122
  date: new Date(e.date).toLocaleDateString(void 0, {
77
123
  month: "short",
78
124
  day: "numeric"
@@ -83,360 +129,534 @@ var O = {
83
129
  refunds: e.refunds,
84
130
  salesCount: e.salesCount
85
131
  }));
86
- return Se && !U ? /* @__PURE__ */ T(a, {
87
- title: k("devportal.revenue.title", "Revenue"),
88
- description: k("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
89
- children: /* @__PURE__ */ T("div", {
132
+ return $e && !G ? /* @__PURE__ */ v(i, {
133
+ title: C("devportal.revenue.title", "Revenue"),
134
+ description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
135
+ children: /* @__PURE__ */ v("div", {
90
136
  className: "flex items-center justify-center py-16 text-text-secondary",
91
- children: /* @__PURE__ */ T(w, { className: "h-8 w-8 animate-spin" })
137
+ children: /* @__PURE__ */ v(_, { className: "h-8 w-8 animate-spin" })
92
138
  })
93
- }) : W ? /* @__PURE__ */ T(a, {
94
- title: k("devportal.revenue.title", "Revenue"),
95
- description: k("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
96
- children: /* @__PURE__ */ T(r, {
97
- icon: /* @__PURE__ */ T(v, {
139
+ }) : et ? /* @__PURE__ */ v(i, {
140
+ title: C("devportal.revenue.title", "Revenue"),
141
+ description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
142
+ children: /* @__PURE__ */ v(r, {
143
+ icon: /* @__PURE__ */ v(ve, {
98
144
  size: 32,
99
145
  className: "text-status-error-text"
100
146
  }),
101
- title: k("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
102
- description: i(W)
147
+ title: C("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
148
+ description: ce(et)
103
149
  })
104
- }) : j ? K ? /* @__PURE__ */ T(a, {
105
- title: k("devportal.revenue.title", "Revenue"),
106
- description: k("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
107
- children: /* @__PURE__ */ T(r, {
108
- icon: /* @__PURE__ */ T(v, {
150
+ }) : w ? nt ? /* @__PURE__ */ v(i, {
151
+ title: C("devportal.revenue.title", "Revenue"),
152
+ description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
153
+ children: /* @__PURE__ */ v(r, {
154
+ icon: /* @__PURE__ */ v(ve, {
109
155
  size: 32,
110
156
  className: "text-status-error-text"
111
157
  }),
112
- title: k("devportal.revenue.errorLoadData", "Unable to load revenue data"),
113
- description: i(K)
158
+ title: C("devportal.revenue.errorLoadData", "Unable to load revenue data"),
159
+ description: ce(nt)
114
160
  })
115
- }) : /* @__PURE__ */ E(a, {
116
- title: k("devportal.revenue.title", "Revenue"),
117
- description: q ? `${k("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${q.name}` : k("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
118
- purpose: k("devportal.revenue.purpose", "Revenue tracks the money your paid apps earn — gross sales, platform fees, and what gets paid out to your organization. Link a billing account, then use this to reconcile payouts and watch growth across time ranges."),
119
- actions: /* @__PURE__ */ T("div", {
161
+ }) : /* @__PURE__ */ y(i, {
162
+ title: C("devportal.revenue.title", "Revenue"),
163
+ description: q ? `${C("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${q.name}` : C("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
164
+ purpose: C("devportal.revenue.purpose", "Revenue tracks the money your paid apps earn — gross sales, platform fees, and what gets paid out to your organization. Link a billing account, then use this to reconcile payouts and watch growth across time ranges."),
165
+ actions: /* @__PURE__ */ v("div", {
120
166
  className: "flex flex-wrap gap-2",
121
- children: /* @__PURE__ */ E("select", {
122
- value: M,
123
- onChange: (e) => _e(e.target.value),
124
- "aria-label": k("devportal.revenue.selectRangeAria", "Select time range"),
167
+ children: /* @__PURE__ */ y("select", {
168
+ value: T,
169
+ onChange: (e) => je(e.target.value),
170
+ "aria-label": C("devportal.revenue.selectRangeAria", "Select time range"),
125
171
  className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
126
172
  children: [
127
- /* @__PURE__ */ T("option", {
173
+ /* @__PURE__ */ v("option", {
128
174
  value: "30d",
129
- children: k("devportal.revenue.range.30d", "Last 30 days")
175
+ children: C("devportal.revenue.range.30d", "Last 30 days")
130
176
  }),
131
- /* @__PURE__ */ T("option", {
177
+ /* @__PURE__ */ v("option", {
132
178
  value: "90d",
133
- children: k("devportal.revenue.range.90d", "Last 90 days")
179
+ children: C("devportal.revenue.range.90d", "Last 90 days")
134
180
  }),
135
- /* @__PURE__ */ T("option", {
181
+ /* @__PURE__ */ v("option", {
136
182
  value: "12m",
137
- children: k("devportal.revenue.range.12m", "Last 12 months")
183
+ children: C("devportal.revenue.range.12m", "Last 12 months")
138
184
  })
139
185
  ]
140
186
  })
141
187
  }),
142
188
  children: [
143
- q && !q.billingAccountId && /* @__PURE__ */ E("div", {
189
+ q && !q.billingAccountId && /* @__PURE__ */ y("div", {
144
190
  className: "mb-6 rounded-card border border-border-seam bg-status-info-bg-subtle p-4 flex flex-col gap-3",
145
191
  children: [
146
- /* @__PURE__ */ E("div", {
192
+ /* @__PURE__ */ y("div", {
147
193
  className: "flex items-start gap-3",
148
194
  children: [
149
- /* @__PURE__ */ T(C, {
195
+ /* @__PURE__ */ v(g, {
150
196
  size: 20,
151
197
  className: "text-accent-blue flex-shrink-0 mt-0.5"
152
198
  }),
153
- /* @__PURE__ */ E("div", {
199
+ /* @__PURE__ */ y("div", {
154
200
  className: "flex-1 min-w-0",
155
201
  children: [
156
- /* @__PURE__ */ T("p", {
202
+ /* @__PURE__ */ v("p", {
157
203
  className: "text-sm font-medium text-status-info-text",
158
- children: k("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
204
+ children: C("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
159
205
  }),
160
- /* @__PURE__ */ T("p", {
206
+ /* @__PURE__ */ v("p", {
161
207
  className: "mt-1 text-sm text-status-info-text",
162
- children: k("devportal.revenue.billingNotLinkedDesc", "Once linked, net earnings from app sales will appear in your billing credits — you can spend them on platform services or withdraw to your bank.")
208
+ children: C("devportal.revenue.billingNotLinkedDesc", "Once linked, net earnings from app sales will appear in your billing credits — you can spend them on platform services or withdraw to your bank.")
163
209
  }),
164
- F && /* @__PURE__ */ T("p", {
210
+ O && /* @__PURE__ */ v("p", {
165
211
  className: "mt-2 text-sm text-status-error-text",
166
- children: F
212
+ children: O
167
213
  })
168
214
  ]
169
215
  }),
170
- /* @__PURE__ */ E("button", {
216
+ /* @__PURE__ */ y("button", {
171
217
  type: "button",
172
- onClick: X,
173
- disabled: N || H,
218
+ onClick: rt,
219
+ disabled: E || W,
174
220
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex-shrink-0",
175
- children: [N || H ? /* @__PURE__ */ T(w, {
221
+ children: [E || W ? /* @__PURE__ */ v(_, {
176
222
  size: 14,
177
223
  className: "animate-spin"
178
- }) : /* @__PURE__ */ T(C, { size: 14 }), N ? k("devportal.revenue.linking", "Linking...") : k("devportal.revenue.linkBillingAccount", "Link Billing Account")]
224
+ }) : /* @__PURE__ */ v(g, { size: 14 }), E ? C("devportal.revenue.linking", "Linking...") : C("devportal.revenue.linkBillingAccount", "Link Billing Account")]
179
225
  })
180
226
  ]
181
227
  }),
182
- L && J.length === 0 && /* @__PURE__ */ T("div", {
228
+ A && J.length === 0 && /* @__PURE__ */ v("div", {
183
229
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 text-sm text-text-secondary",
184
- children: k("devportal.revenue.noBillingAccounts", "You don't have any billing accounts yet. Create one from your account billing settings first.")
230
+ children: C("devportal.revenue.noBillingAccounts", "You don't have any billing accounts yet. Create one from your account billing settings first.")
185
231
  }),
186
- L && J.length > 0 && /* @__PURE__ */ E("div", {
232
+ A && J.length > 0 && /* @__PURE__ */ y("div", {
187
233
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 space-y-3",
188
234
  children: [
189
- /* @__PURE__ */ T("p", {
235
+ /* @__PURE__ */ v("p", {
190
236
  className: "text-sm font-medium",
191
- children: k("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
237
+ children: C("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
192
238
  }),
193
- /* @__PURE__ */ T("div", {
239
+ /* @__PURE__ */ v("div", {
194
240
  className: "space-y-2",
195
- children: J.map((e) => /* @__PURE__ */ E("button", {
241
+ children: J.map((e) => /* @__PURE__ */ y("button", {
196
242
  type: "button",
197
- onClick: () => B(e.id ?? null),
198
- className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", z === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
199
- children: [/* @__PURE__ */ T(b, {
243
+ onClick: () => N(e.id ?? null),
244
+ className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", M === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
245
+ children: [/* @__PURE__ */ v(p, {
200
246
  size: 14,
201
- className: n("flex-shrink-0", z === e.id ? "opacity-100 text-primary" : "opacity-0")
202
- }), /* @__PURE__ */ E("div", {
247
+ className: n("flex-shrink-0", M === e.id ? "opacity-100 text-primary" : "opacity-0")
248
+ }), /* @__PURE__ */ y("div", {
203
249
  className: "flex-1 min-w-0",
204
- children: [/* @__PURE__ */ T("p", {
250
+ children: [/* @__PURE__ */ v("p", {
205
251
  className: "font-medium truncate",
206
252
  children: e.name
207
- }), e.isDefault && /* @__PURE__ */ T("p", {
253
+ }), e.isDefault && /* @__PURE__ */ v("p", {
208
254
  className: "text-xs text-text-secondary",
209
- children: k("devportal.revenue.defaultAccount", "Default")
255
+ children: C("devportal.revenue.defaultAccount", "Default")
210
256
  })]
211
257
  })]
212
258
  }, e.id))
213
259
  }),
214
- /* @__PURE__ */ E("div", {
260
+ /* @__PURE__ */ y("div", {
215
261
  className: "flex items-center justify-end gap-2 pt-1",
216
- children: [/* @__PURE__ */ T("button", {
262
+ children: [/* @__PURE__ */ v("button", {
217
263
  type: "button",
218
264
  onClick: () => {
219
- R(!1), I(null);
265
+ j(!1), k(null);
220
266
  },
221
267
  className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
222
- children: k("devportal.cancel", "Cancel")
223
- }), /* @__PURE__ */ E("button", {
268
+ children: C("devportal.cancel", "Cancel")
269
+ }), /* @__PURE__ */ y("button", {
224
270
  type: "button",
225
- disabled: N || !z,
226
- onClick: () => void Z(),
271
+ disabled: E || !M,
272
+ onClick: () => void it(),
227
273
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
228
- children: [N ? /* @__PURE__ */ T(w, {
274
+ children: [E ? /* @__PURE__ */ v(_, {
229
275
  size: 13,
230
276
  className: "animate-spin"
231
- }) : /* @__PURE__ */ T(C, { size: 13 }), k("devportal.revenue.confirm", "Confirm")]
277
+ }) : /* @__PURE__ */ v(g, { size: 13 }), C("devportal.revenue.confirm", "Confirm")]
232
278
  })]
233
279
  })
234
280
  ]
235
281
  })
236
282
  ]
237
283
  }),
238
- q?.billingAccountId && /* @__PURE__ */ E("div", {
284
+ q?.billingAccountId && /* @__PURE__ */ y("div", {
239
285
  className: "mb-6 rounded-lg border border-border-subtle bg-bg-surface p-3 flex flex-col gap-3",
240
- children: [/* @__PURE__ */ E("div", {
286
+ children: [/* @__PURE__ */ y("div", {
241
287
  className: "flex items-center gap-3",
242
288
  children: [
243
- /* @__PURE__ */ T(x, {
289
+ /* @__PURE__ */ v(m, {
244
290
  size: 16,
245
291
  className: "text-text-secondary flex-shrink-0"
246
292
  }),
247
- /* @__PURE__ */ E("div", {
293
+ /* @__PURE__ */ y("div", {
248
294
  className: "flex-1 min-w-0",
249
- children: [/* @__PURE__ */ T("p", {
295
+ children: [/* @__PURE__ */ v("p", {
250
296
  className: "text-sm font-medium truncate",
251
- children: Y?.name ?? k("devportal.revenue.billingAccount", "Billing account")
252
- }), /* @__PURE__ */ T("p", {
297
+ children: Y?.name ?? C("devportal.revenue.billingAccount", "Billing account")
298
+ }), /* @__PURE__ */ v("p", {
253
299
  className: "text-xs text-text-secondary truncate",
254
300
  children: Y ? `${Y.currency}${Y.email ? ` · ${Y.email}` : ""}` : q.billingAccountId
255
301
  })]
256
302
  }),
257
- !L && /* @__PURE__ */ T("button", {
303
+ !A && /* @__PURE__ */ v("button", {
258
304
  type: "button",
259
- onClick: X,
260
- disabled: H,
305
+ onClick: rt,
306
+ disabled: W,
261
307
  className: "text-xs text-text-secondary hover:text-text-primary transition-colors flex-shrink-0 disabled:opacity-50",
262
- children: k("devportal.revenue.changeBillingAccount", "Change")
308
+ children: C("devportal.revenue.changeBillingAccount", "Change")
263
309
  })
264
310
  ]
265
- }), L && J.length > 0 && /* @__PURE__ */ E("div", {
311
+ }), A && J.length > 0 && /* @__PURE__ */ y("div", {
266
312
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 space-y-3",
267
313
  children: [
268
- /* @__PURE__ */ T("p", {
314
+ /* @__PURE__ */ v("p", {
269
315
  className: "text-sm font-medium",
270
- children: k("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
316
+ children: C("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
271
317
  }),
272
- /* @__PURE__ */ T("div", {
318
+ /* @__PURE__ */ v("div", {
273
319
  className: "space-y-2",
274
- children: J.map((e) => /* @__PURE__ */ E("button", {
320
+ children: J.map((e) => /* @__PURE__ */ y("button", {
275
321
  type: "button",
276
- onClick: () => B(e.id ?? null),
277
- className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", z === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
278
- children: [/* @__PURE__ */ T(b, {
322
+ onClick: () => N(e.id ?? null),
323
+ className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", M === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
324
+ children: [/* @__PURE__ */ v(p, {
279
325
  size: 14,
280
- className: n("flex-shrink-0", z === e.id ? "opacity-100 text-primary" : "opacity-0")
281
- }), /* @__PURE__ */ E("div", {
326
+ className: n("flex-shrink-0", M === e.id ? "opacity-100 text-primary" : "opacity-0")
327
+ }), /* @__PURE__ */ y("div", {
282
328
  className: "flex-1 min-w-0",
283
- children: [/* @__PURE__ */ T("p", {
329
+ children: [/* @__PURE__ */ v("p", {
284
330
  className: "font-medium truncate",
285
331
  children: e.name
286
- }), e.isDefault && /* @__PURE__ */ T("p", {
332
+ }), e.isDefault && /* @__PURE__ */ v("p", {
287
333
  className: "text-xs text-text-secondary",
288
- children: k("devportal.revenue.defaultAccount", "Default")
334
+ children: C("devportal.revenue.defaultAccount", "Default")
289
335
  })]
290
336
  })]
291
337
  }, e.id))
292
338
  }),
293
- /* @__PURE__ */ E("div", {
339
+ /* @__PURE__ */ y("div", {
294
340
  className: "flex items-center justify-end gap-2 pt-1",
295
- children: [/* @__PURE__ */ T("button", {
341
+ children: [/* @__PURE__ */ v("button", {
296
342
  type: "button",
297
343
  onClick: () => {
298
- R(!1), I(null);
344
+ j(!1), k(null);
299
345
  },
300
346
  className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
301
- children: k("devportal.cancel", "Cancel")
302
- }), /* @__PURE__ */ E("button", {
347
+ children: C("devportal.cancel", "Cancel")
348
+ }), /* @__PURE__ */ y("button", {
303
349
  type: "button",
304
- disabled: N || !z,
305
- onClick: () => void Z(),
350
+ disabled: E || !M,
351
+ onClick: () => void it(),
306
352
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
307
- children: [N ? /* @__PURE__ */ T(w, {
353
+ children: [E ? /* @__PURE__ */ v(_, {
308
354
  size: 13,
309
355
  className: "animate-spin"
310
- }) : /* @__PURE__ */ T(C, { size: 13 }), k("devportal.revenue.confirm", "Confirm")]
356
+ }) : /* @__PURE__ */ v(g, { size: 13 }), C("devportal.revenue.confirm", "Confirm")]
311
357
  })]
312
358
  }),
313
- F && /* @__PURE__ */ T("p", {
359
+ O && /* @__PURE__ */ v("p", {
314
360
  className: "text-xs text-status-error-text",
315
- children: F
361
+ children: O
316
362
  })
317
363
  ]
318
364
  })]
319
365
  }),
320
- Ce && !Q ? /* @__PURE__ */ T("div", {
366
+ q?.billingAccountId && Z && /* @__PURE__ */ y("div", {
367
+ className: "mb-6 rounded-lg border border-border-subtle bg-bg-surface p-3 flex flex-col gap-3",
368
+ children: [/* @__PURE__ */ y("div", {
369
+ className: "flex items-center gap-3",
370
+ children: [
371
+ /* @__PURE__ */ v(be, {
372
+ size: 16,
373
+ className: "text-text-secondary flex-shrink-0"
374
+ }),
375
+ /* @__PURE__ */ y("div", {
376
+ className: "flex-1 min-w-0",
377
+ children: [/* @__PURE__ */ v("p", {
378
+ className: "text-sm font-medium",
379
+ children: C("devportal.revenue.withdrawTitle", "Withdraw earned credits")
380
+ }), /* @__PURE__ */ v("p", {
381
+ className: "text-xs text-text-secondary",
382
+ children: Q ? `${C("devportal.revenue.available", "Available")}: $${Z.pendingBalance.toLocaleString()}` : `${C("devportal.revenue.belowMinimum", "Minimum payout is")} $${x} — ${C("devportal.revenue.youHave", "you have")} $${Z.pendingBalance.toLocaleString()} ${C("devportal.revenue.pending", "pending")}.`
383
+ })]
384
+ }),
385
+ !Pe && /* @__PURE__ */ y("button", {
386
+ type: "button",
387
+ onClick: at,
388
+ disabled: !Q,
389
+ title: Q ? void 0 : C("devportal.revenue.belowMinimumHint", `Payouts require a pending balance of at least $${x}.`),
390
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0",
391
+ children: [/* @__PURE__ */ v(Se, { size: 14 }), C("devportal.revenue.requestWithdrawal", "Request Withdrawal")]
392
+ })
393
+ ]
394
+ }), Pe && /* @__PURE__ */ v("div", {
395
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 space-y-3",
396
+ children: Ke ? /* @__PURE__ */ y("div", {
397
+ className: "flex items-center gap-2 text-sm text-text-secondary",
398
+ children: [/* @__PURE__ */ v(_, {
399
+ size: 14,
400
+ className: "animate-spin"
401
+ }), C("devportal.revenue.loadingMethods", "Loading payout methods...")]
402
+ }) : Ie ? /* @__PURE__ */ y("div", {
403
+ className: "space-y-3",
404
+ children: [
405
+ /* @__PURE__ */ v("p", {
406
+ className: "text-sm font-medium",
407
+ children: C("devportal.revenue.addPayoutMethod", "Add a payout method")
408
+ }),
409
+ /* @__PURE__ */ y("div", {
410
+ className: "grid grid-cols-2 gap-2",
411
+ children: [/* @__PURE__ */ v("button", {
412
+ type: "button",
413
+ onClick: () => Le(u.BankAccount),
414
+ className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", B === u.BankAccount ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-accent"),
415
+ children: C("devportal.revenue.bankAccount", "Bank Account")
416
+ }), /* @__PURE__ */ v("button", {
417
+ type: "button",
418
+ onClick: () => Le(u.Paypal),
419
+ className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", B === u.Paypal ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-accent"),
420
+ children: C("devportal.revenue.paypal", "PayPal")
421
+ })]
422
+ }),
423
+ /* @__PURE__ */ v("input", {
424
+ type: "text",
425
+ value: Re,
426
+ onChange: (e) => ze(e.target.value),
427
+ placeholder: C("devportal.revenue.methodNamePlaceholder", "Label (e.g. \"Primary account\")"),
428
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
429
+ }),
430
+ B === u.Paypal ? /* @__PURE__ */ v("input", {
431
+ type: "email",
432
+ value: H,
433
+ onChange: (e) => Ue(e.target.value),
434
+ placeholder: C("devportal.revenue.paypalEmailPlaceholder", "PayPal email"),
435
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
436
+ }) : /* @__PURE__ */ y(Te, { children: [/* @__PURE__ */ v("input", {
437
+ type: "text",
438
+ value: V,
439
+ onChange: (e) => Be(e.target.value),
440
+ placeholder: C("devportal.revenue.accountNumberPlaceholder", "Account number"),
441
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
442
+ }), /* @__PURE__ */ v("input", {
443
+ type: "text",
444
+ value: Ve,
445
+ onChange: (e) => He(e.target.value),
446
+ placeholder: C("devportal.revenue.routingNumberPlaceholder", "Routing number"),
447
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
448
+ })] }),
449
+ We && /* @__PURE__ */ v("p", {
450
+ className: "text-xs text-status-error-text",
451
+ children: We
452
+ }),
453
+ /* @__PURE__ */ y("div", {
454
+ className: "flex items-center justify-end gap-2 pt-1",
455
+ children: [/* @__PURE__ */ v("button", {
456
+ type: "button",
457
+ onClick: () => F(!1),
458
+ className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
459
+ children: C("devportal.cancel", "Cancel")
460
+ }), /* @__PURE__ */ y("button", {
461
+ type: "button",
462
+ disabled: Je || (B === u.Paypal ? !H : !V),
463
+ onClick: () => void ot(),
464
+ className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
465
+ children: [Je ? /* @__PURE__ */ v(_, {
466
+ size: 13,
467
+ className: "animate-spin"
468
+ }) : /* @__PURE__ */ v(p, { size: 13 }), C("devportal.revenue.saveMethod", "Save method")]
469
+ })]
470
+ })
471
+ ]
472
+ }) : /* @__PURE__ */ y("div", {
473
+ className: "space-y-3",
474
+ children: [
475
+ /* @__PURE__ */ v("p", {
476
+ className: "text-sm font-medium",
477
+ children: C("devportal.revenue.chooseMethod", "Choose where to send this payout")
478
+ }),
479
+ /* @__PURE__ */ y("div", {
480
+ className: "space-y-2",
481
+ children: [X.map((e) => /* @__PURE__ */ y("button", {
482
+ type: "button",
483
+ onClick: () => R(e.id),
484
+ className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", L === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
485
+ children: [/* @__PURE__ */ v(p, {
486
+ size: 14,
487
+ className: n("flex-shrink-0", L === e.id ? "opacity-100 text-primary" : "opacity-0")
488
+ }), /* @__PURE__ */ y("div", {
489
+ className: "flex-1 min-w-0",
490
+ children: [/* @__PURE__ */ v("p", {
491
+ className: "font-medium truncate",
492
+ children: e.displayName ?? e.name
493
+ }), e.isDefault && /* @__PURE__ */ v("p", {
494
+ className: "text-xs text-text-secondary",
495
+ children: C("devportal.revenue.defaultAccount", "Default")
496
+ })]
497
+ })]
498
+ }, e.id)), /* @__PURE__ */ y("button", {
499
+ type: "button",
500
+ onClick: () => z(!0),
501
+ className: "w-full rounded-md border border-dashed border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-accent transition-colors",
502
+ children: [
503
+ "+",
504
+ " ",
505
+ C("devportal.revenue.addAnotherMethod", "Add a different method")
506
+ ]
507
+ })]
508
+ }),
509
+ Fe && /* @__PURE__ */ v("p", {
510
+ className: "text-xs text-status-error-text",
511
+ children: Fe
512
+ }),
513
+ /* @__PURE__ */ y("div", {
514
+ className: "flex items-center justify-end gap-2 pt-1",
515
+ children: [/* @__PURE__ */ v("button", {
516
+ type: "button",
517
+ onClick: () => F(!1),
518
+ className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
519
+ children: C("devportal.cancel", "Cancel")
520
+ }), /* @__PURE__ */ y("button", {
521
+ type: "button",
522
+ disabled: Xe || !L,
523
+ onClick: () => void st(),
524
+ className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
525
+ children: [
526
+ Xe ? /* @__PURE__ */ v(_, {
527
+ size: 13,
528
+ className: "animate-spin"
529
+ }) : /* @__PURE__ */ v(Se, { size: 13 }),
530
+ C("devportal.revenue.confirmWithdrawal", "Request"),
531
+ " $",
532
+ Z.pendingBalance.toLocaleString()
533
+ ]
534
+ })]
535
+ })
536
+ ]
537
+ })
538
+ })]
539
+ }),
540
+ tt && !Z ? /* @__PURE__ */ v("div", {
321
541
  className: "flex items-center justify-center py-16 text-text-secondary",
322
- children: /* @__PURE__ */ T(w, { className: "h-8 w-8 animate-spin" })
323
- }) : Q ? /* @__PURE__ */ E(fe, { children: [
324
- /* @__PURE__ */ T(pe, {
542
+ children: /* @__PURE__ */ v(_, { className: "h-8 w-8 animate-spin" })
543
+ }) : Z ? /* @__PURE__ */ y(Te, { children: [
544
+ /* @__PURE__ */ v(Ee, {
325
545
  className: "mb-6",
326
- children: /* @__PURE__ */ E(ae, {
546
+ children: /* @__PURE__ */ y(le, {
327
547
  columns: 4,
328
548
  children: [
329
- /* @__PURE__ */ T(c, {
330
- title: k("devportal.revenue.grossRevenue", "Gross Revenue"),
331
- value: `$${Q.totalGrossRevenue.toLocaleString()}`,
332
- icon: /* @__PURE__ */ T(S, { size: 20 })
549
+ /* @__PURE__ */ v(s, {
550
+ title: C("devportal.revenue.grossRevenue", "Gross Revenue"),
551
+ value: `$${Z.totalGrossRevenue.toLocaleString()}`,
552
+ icon: /* @__PURE__ */ v(h, { size: 20 })
333
553
  }),
334
- /* @__PURE__ */ T(c, {
335
- title: k("devportal.revenue.netRevenue", "Net Revenue"),
336
- value: `$${Q.totalNetRevenue.toLocaleString()}`,
337
- icon: /* @__PURE__ */ T(ue, { size: 20 })
554
+ /* @__PURE__ */ v(s, {
555
+ title: C("devportal.revenue.netRevenue", "Net Revenue"),
556
+ value: `$${Z.totalNetRevenue.toLocaleString()}`,
557
+ icon: /* @__PURE__ */ v(Ce, { size: 20 })
338
558
  }),
339
- /* @__PURE__ */ T(c, {
340
- title: k("devportal.revenue.pendingBalance", "Pending Balance"),
341
- value: `$${Q.pendingBalance.toLocaleString()}`,
342
- icon: /* @__PURE__ */ T(x, { size: 20 }),
343
- description: Q.nextPayoutDate ? `${k("devportal.revenue.nextPayout", "Next payout")} ${new Date(Q.nextPayoutDate).toLocaleDateString()}` : k("devportal.revenue.noPayoutScheduled", "No payout scheduled")
559
+ /* @__PURE__ */ v(s, {
560
+ title: C("devportal.revenue.pendingBalance", "Pending Balance"),
561
+ value: `$${Z.pendingBalance.toLocaleString()}`,
562
+ icon: /* @__PURE__ */ v(m, { size: 20 }),
563
+ description: Z.nextPayoutDate ? `${C("devportal.revenue.nextPayout", "Next payout")} ${new Date(Z.nextPayoutDate).toLocaleDateString()}` : C("devportal.revenue.noPayoutScheduled", "No payout scheduled")
344
564
  }),
345
- /* @__PURE__ */ T(c, {
346
- title: k("devportal.revenue.platformFees", "Platform Fees"),
347
- value: `$${Q.totalPlatformFees.toLocaleString()}`,
348
- icon: /* @__PURE__ */ T(le, { size: 20 }),
349
- description: `${Q.totalRefundsCount} ${k("devportal.revenue.refunds", "refunds")}`
565
+ /* @__PURE__ */ v(s, {
566
+ title: C("devportal.revenue.platformFees", "Platform Fees"),
567
+ value: `$${Z.totalPlatformFees.toLocaleString()}`,
568
+ icon: /* @__PURE__ */ v(ye, { size: 20 }),
569
+ description: `${Z.totalRefundsCount} ${C("devportal.revenue.refunds", "refunds")}`
350
570
  })
351
571
  ]
352
572
  })
353
573
  }),
354
- /* @__PURE__ */ E("div", {
574
+ /* @__PURE__ */ y("div", {
355
575
  className: "grid gap-6 xl:grid-cols-2",
356
- children: [/* @__PURE__ */ T(o, {
357
- title: k("devportal.revenue.revenueTrend", "Revenue trend"),
358
- children: /* @__PURE__ */ T(D, {
576
+ children: [/* @__PURE__ */ v(a, {
577
+ title: C("devportal.revenue.revenueTrend", "Revenue trend"),
578
+ children: /* @__PURE__ */ v(b, {
359
579
  treatment: "insight",
360
580
  className: "p-4",
361
- children: $.length > 0 ? /* @__PURE__ */ T(d, {
581
+ children: $.length > 0 ? /* @__PURE__ */ v(ue, {
362
582
  width: "100%",
363
583
  height: 300,
364
- children: /* @__PURE__ */ E(se, {
584
+ children: /* @__PURE__ */ y(ge, {
365
585
  data: $,
366
586
  children: [
367
- /* @__PURE__ */ T(f, {
587
+ /* @__PURE__ */ v(fe, {
368
588
  strokeDasharray: "3 3",
369
589
  stroke: "var(--color-chart-grid)"
370
590
  }),
371
- /* @__PURE__ */ T(m, {
591
+ /* @__PURE__ */ v(me, {
372
592
  dataKey: "date",
373
593
  stroke: "var(--color-chart-axis)",
374
594
  fontSize: 12
375
595
  }),
376
- /* @__PURE__ */ T(h, {
596
+ /* @__PURE__ */ v(he, {
377
597
  stroke: "var(--color-chart-axis)",
378
598
  fontSize: 12
379
599
  }),
380
- /* @__PURE__ */ T(u, { contentStyle: {
600
+ /* @__PURE__ */ v(l, { contentStyle: {
381
601
  backgroundColor: "var(--color-card)",
382
602
  border: "1px solid var(--color-border-default)",
383
603
  borderRadius: 12
384
604
  } }),
385
- /* @__PURE__ */ T(p, {
605
+ /* @__PURE__ */ v(pe, {
386
606
  type: "monotone",
387
607
  dataKey: "grossRevenue",
388
- stroke: O.primary,
608
+ stroke: S.primary,
389
609
  strokeWidth: 2,
390
610
  dot: !1
391
611
  }),
392
- /* @__PURE__ */ T(p, {
612
+ /* @__PURE__ */ v(pe, {
393
613
  type: "monotone",
394
614
  dataKey: "netRevenue",
395
- stroke: O.secondary,
615
+ stroke: S.secondary,
396
616
  strokeWidth: 2,
397
617
  dot: !1
398
618
  })
399
619
  ]
400
620
  })
401
- }) : /* @__PURE__ */ E("div", {
621
+ }) : /* @__PURE__ */ y("div", {
402
622
  className: "flex h-[300px] flex-col items-center justify-center gap-2 text-text-secondary",
403
- children: [/* @__PURE__ */ T("p", {
623
+ children: [/* @__PURE__ */ v("p", {
404
624
  className: "text-sm font-medium",
405
- children: k("devportal.revenue.noTrendData", "No trend data yet")
406
- }), /* @__PURE__ */ T("p", {
625
+ children: C("devportal.revenue.noTrendData", "No trend data yet")
626
+ }), /* @__PURE__ */ v("p", {
407
627
  className: "text-xs text-text-tertiary",
408
- children: k("devportal.revenue.noTrendDataHint", "Revenue trend appears once daily analytics have been aggregated.")
628
+ children: C("devportal.revenue.noTrendDataHint", "Revenue trend appears once daily analytics have been aggregated.")
409
629
  })]
410
630
  })
411
631
  })
412
- }), /* @__PURE__ */ T(o, {
413
- title: k("devportal.revenue.topApps", "Top applications by revenue"),
414
- children: Q.topApps.length > 0 ? /* @__PURE__ */ T("div", {
632
+ }), /* @__PURE__ */ v(a, {
633
+ title: C("devportal.revenue.topApps", "Top applications by revenue"),
634
+ children: Z.topApps.length > 0 ? /* @__PURE__ */ v("div", {
415
635
  className: "space-y-2",
416
- children: Q.topApps.map((e) => /* @__PURE__ */ T(D, {
636
+ children: Z.topApps.map((e) => /* @__PURE__ */ v(b, {
417
637
  treatment: "insight",
418
638
  className: "border-border-seam p-4",
419
- children: /* @__PURE__ */ E("div", {
639
+ children: /* @__PURE__ */ y("div", {
420
640
  className: "flex items-start justify-between gap-3",
421
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
641
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
422
642
  className: "font-medium",
423
643
  children: e.applicationName
424
- }), /* @__PURE__ */ E("p", {
644
+ }), /* @__PURE__ */ y("p", {
425
645
  className: "text-sm text-text-secondary",
426
646
  children: [
427
647
  e.salesCount,
428
648
  " ",
429
- k("devportal.revenue.sales", "sales")
649
+ C("devportal.revenue.sales", "sales")
430
650
  ]
431
- })] }), /* @__PURE__ */ E("div", {
651
+ })] }), /* @__PURE__ */ y("div", {
432
652
  className: "text-right",
433
- children: [/* @__PURE__ */ E("p", {
653
+ children: [/* @__PURE__ */ y("p", {
434
654
  className: "font-semibold",
435
655
  children: ["$", e.grossRevenue.toLocaleString()]
436
- }), /* @__PURE__ */ E("p", {
656
+ }), /* @__PURE__ */ y("p", {
437
657
  className: "text-sm text-text-secondary",
438
658
  children: [
439
- k("devportal.revenue.net", "Net"),
659
+ C("devportal.revenue.net", "Net"),
440
660
  " $",
441
661
  e.netRevenue.toLocaleString()
442
662
  ]
@@ -444,46 +664,46 @@ var O = {
444
664
  })]
445
665
  })
446
666
  }, e.applicationId))
447
- }) : /* @__PURE__ */ T(r, {
667
+ }) : /* @__PURE__ */ v(r, {
448
668
  illustration: "empty-data",
449
- icon: /* @__PURE__ */ T(y, { size: 24 }),
450
- title: k("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
451
- description: k("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
669
+ icon: /* @__PURE__ */ v(xe, { size: 24 }),
670
+ title: C("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
671
+ description: C("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
452
672
  })
453
673
  })]
454
674
  }),
455
- /* @__PURE__ */ T(o, {
456
- title: k("devportal.revenue.salesVolume", "Sales volume"),
457
- children: /* @__PURE__ */ T(D, {
675
+ /* @__PURE__ */ v(a, {
676
+ title: C("devportal.revenue.salesVolume", "Sales volume"),
677
+ children: /* @__PURE__ */ v(b, {
458
678
  treatment: "insight",
459
679
  className: "p-4",
460
- children: $.length > 0 ? /* @__PURE__ */ T(d, {
680
+ children: $.length > 0 ? /* @__PURE__ */ v(ue, {
461
681
  width: "100%",
462
682
  height: 280,
463
- children: /* @__PURE__ */ E(ce, {
683
+ children: /* @__PURE__ */ y(_e, {
464
684
  data: $,
465
685
  children: [
466
- /* @__PURE__ */ T(f, {
686
+ /* @__PURE__ */ v(fe, {
467
687
  strokeDasharray: "3 3",
468
688
  stroke: "var(--color-chart-grid)"
469
689
  }),
470
- /* @__PURE__ */ T(m, {
690
+ /* @__PURE__ */ v(me, {
471
691
  dataKey: "date",
472
692
  stroke: "var(--color-chart-axis)",
473
693
  fontSize: 12
474
694
  }),
475
- /* @__PURE__ */ T(h, {
695
+ /* @__PURE__ */ v(he, {
476
696
  stroke: "var(--color-chart-axis)",
477
697
  fontSize: 12
478
698
  }),
479
- /* @__PURE__ */ T(u, { contentStyle: {
699
+ /* @__PURE__ */ v(l, { contentStyle: {
480
700
  backgroundColor: "var(--color-card)",
481
701
  border: "1px solid var(--color-border-default)",
482
702
  borderRadius: 12
483
703
  } }),
484
- /* @__PURE__ */ T(oe, {
704
+ /* @__PURE__ */ v(de, {
485
705
  dataKey: "salesCount",
486
- fill: O.tertiary,
706
+ fill: S.tertiary,
487
707
  radius: [
488
708
  6,
489
709
  6,
@@ -493,71 +713,71 @@ var O = {
493
713
  })
494
714
  ]
495
715
  })
496
- }) : /* @__PURE__ */ E("div", {
716
+ }) : /* @__PURE__ */ y("div", {
497
717
  className: "flex h-[280px] flex-col items-center justify-center gap-2 text-text-secondary",
498
- children: [/* @__PURE__ */ T("p", {
718
+ children: [/* @__PURE__ */ v("p", {
499
719
  className: "text-sm font-medium",
500
- children: k("devportal.revenue.noVolumeData", "No sales volume data yet")
501
- }), /* @__PURE__ */ T("p", {
720
+ children: C("devportal.revenue.noVolumeData", "No sales volume data yet")
721
+ }), /* @__PURE__ */ v("p", {
502
722
  className: "text-xs text-text-tertiary",
503
- children: k("devportal.revenue.noVolumeDataHint", "Sales volume by period appears once analytics have been aggregated.")
723
+ children: C("devportal.revenue.noVolumeDataHint", "Sales volume by period appears once analytics have been aggregated.")
504
724
  })]
505
725
  })
506
726
  })
507
727
  }),
508
- /* @__PURE__ */ E("div", {
728
+ /* @__PURE__ */ y("div", {
509
729
  className: "grid gap-6 xl:grid-cols-2",
510
- children: [/* @__PURE__ */ T(o, {
511
- title: k("devportal.revenue.recentSales", "Recent sales"),
512
- children: /* @__PURE__ */ T(l, {
513
- data: Te,
730
+ children: [/* @__PURE__ */ v(a, {
731
+ title: C("devportal.revenue.recentSales", "Recent sales"),
732
+ children: /* @__PURE__ */ v(c, {
733
+ data: lt,
514
734
  keyField: "id",
515
735
  columns: [
516
736
  {
517
737
  key: "application",
518
- header: k("devportal.revenue.application", "Application"),
519
- render: (e) => e.application?.name || e.planName || k("devportal.common.unknown", "Unknown")
738
+ header: C("devportal.revenue.application", "Application"),
739
+ render: (e) => e.application?.name || e.planName || C("devportal.common.unknown", "Unknown")
520
740
  },
521
741
  {
522
742
  key: "grossAmount",
523
- header: k("devportal.revenue.gross", "Gross"),
743
+ header: C("devportal.revenue.gross", "Gross"),
524
744
  render: (e) => `$${e.grossAmount.toLocaleString()}`
525
745
  },
526
746
  {
527
747
  key: "netAmount",
528
- header: k("devportal.revenue.net", "Net"),
748
+ header: C("devportal.revenue.net", "Net"),
529
749
  render: (e) => `$${e.netAmount.toLocaleString()}`
530
750
  },
531
751
  {
532
752
  key: "status",
533
- header: k("devportal.revenue.status", "Status"),
534
- render: (e) => /* @__PURE__ */ T(s, {
753
+ header: C("devportal.revenue.status", "Status"),
754
+ render: (e) => /* @__PURE__ */ v(o, {
535
755
  status: e.status,
536
756
  type: "app"
537
757
  })
538
758
  }
539
759
  ]
540
760
  })
541
- }), /* @__PURE__ */ T(o, {
542
- title: k("devportal.revenue.payoutHistory", "Payout history"),
543
- children: /* @__PURE__ */ T(l, {
544
- data: Ee,
761
+ }), /* @__PURE__ */ v(a, {
762
+ title: C("devportal.revenue.payoutHistory", "Payout history"),
763
+ children: /* @__PURE__ */ v(c, {
764
+ data: ut,
545
765
  keyField: "id",
546
766
  columns: [
547
767
  {
548
768
  key: "periodLabel",
549
- header: k("devportal.revenue.period", "Period"),
769
+ header: C("devportal.revenue.period", "Period"),
550
770
  render: (e) => e.periodLabel
551
771
  },
552
772
  {
553
773
  key: "netAmount",
554
- header: k("devportal.revenue.netPayout", "Net payout"),
774
+ header: C("devportal.revenue.netPayout", "Net payout"),
555
775
  render: (e) => `$${e.netAmount.toLocaleString()}`
556
776
  },
557
777
  {
558
778
  key: "status",
559
- header: k("devportal.revenue.status", "Status"),
560
- render: (e) => /* @__PURE__ */ T(s, {
779
+ header: C("devportal.revenue.status", "Status"),
780
+ render: (e) => /* @__PURE__ */ v(o, {
561
781
  status: e.status,
562
782
  type: "app"
563
783
  })
@@ -566,28 +786,28 @@ var O = {
566
786
  })
567
787
  })]
568
788
  })
569
- ] }) : /* @__PURE__ */ T(r, {
789
+ ] }) : /* @__PURE__ */ v(r, {
570
790
  illustration: "empty-data",
571
- icon: /* @__PURE__ */ T(S, { size: 32 }),
572
- title: k("devportal.revenue.noDataTitle", "No revenue data yet"),
573
- description: k("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
791
+ icon: /* @__PURE__ */ v(h, { size: 32 }),
792
+ title: C("devportal.revenue.noDataTitle", "No revenue data yet"),
793
+ description: C("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
574
794
  })
575
795
  ]
576
- }) : /* @__PURE__ */ T(a, {
577
- title: k("devportal.revenue.title", "Revenue"),
578
- description: k("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
579
- children: /* @__PURE__ */ T(r, {
796
+ }) : /* @__PURE__ */ v(i, {
797
+ title: C("devportal.revenue.title", "Revenue"),
798
+ description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
799
+ children: /* @__PURE__ */ v(r, {
580
800
  illustration: "empty-people",
581
- icon: /* @__PURE__ */ T(y, {
801
+ icon: /* @__PURE__ */ v(xe, {
582
802
  size: 32,
583
803
  className: "text-text-secondary"
584
804
  }),
585
- title: k("devportal.revenue.selectOrgTitle", "Select an organization"),
586
- description: k("devportal.revenue.selectOrgHint", "Use the organization switcher in the nav bar above to choose which organization's revenue to view.")
805
+ title: C("devportal.revenue.selectOrgTitle", "Select an organization"),
806
+ description: C("devportal.revenue.selectOrgHint", "Use the organization switcher in the nav bar above to choose which organization's revenue to view.")
587
807
  })
588
808
  });
589
809
  };
590
810
  //#endregion
591
- export { k as RevenueDashboardPage };
811
+ export { C as RevenueDashboardPage };
592
812
 
593
813
  //# sourceMappingURL=RevenueDashboardPage.js.map