@burdenoff/microfe-devportal 2026.701.1 → 2026.702.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.
@@ -2,28 +2,28 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { LoadingState as n } from "../components/LoadingState.js";
4
4
  import { EmptyState as r } from "../components/EmptyState.js";
5
- import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useGetWorkspaceInstallationQuery as l, useInstallApplicationMutation as u, useRevokeDelegationMutation as d, useRotateAppSecretMutation as f, useSubmitApplicationMutation as p, useUninstallApplicationMutation as m, useUpdateApplicationMutation as h } from "../../generated/global-operations.js";
6
- import { PageLayout as g, PageSection as _ } from "../components/PageLayout.js";
7
- import { APP_TYPE_LABELS as v } from "../utils/constants.js";
8
- import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as x } from "../components/StatusBadge.js";
9
- import { SelectionCheckbox as S } from "../components/SelectionCheckbox.js";
10
- import { nativeNotify as C } from "../../utils/nativeBridge.js";
5
+ import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetApplicationVersionsQuery as c, useGetOrganizationQuery as l, useGetWebhooksQuery as u, useGetWorkspaceInstallationQuery as d, useInstallApplicationMutation as f, useRevokeDelegationMutation as p, useRotateAppSecretMutation as m, useSubmitApplicationMutation as h, useUninstallApplicationMutation as g, useUpdateApplicationMutation as _ } from "../../generated/global-operations.js";
6
+ import { PageLayout as v, PageSection as y } from "../components/PageLayout.js";
7
+ import { APP_TYPE_LABELS as b } from "../utils/constants.js";
8
+ import { FeaturedBadge as x, StatusBadge as S, VerifiedBadge as C } from "../components/StatusBadge.js";
9
+ import { SelectionCheckbox as w } from "../components/SelectionCheckbox.js";
10
+ import { nativeNotify as T } from "../../utils/nativeBridge.js";
11
11
  import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
12
- import { DataTable as w, DetailList as T } from "../components/DataTable.js";
13
- import { InputField as E, SelectField as D, TextareaField as O } from "../components/FormField.js";
14
- import { ConfirmDialog as k } from "../components/ConfirmDialog.js";
15
- import { GrantDelegationModal as te } from "../components/GrantDelegationModal.js";
16
- import { DEVPORTAL_PERMISSIONS as ne } from "../constants/permissions.js";
17
- import { useDevportalPermission as re } from "../hooks/usePermission.js";
12
+ import { DataTable as E, DetailList as D } from "../components/DataTable.js";
13
+ import { InputField as O, SelectField as k, TextareaField as te } from "../components/FormField.js";
14
+ import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
15
+ import { GrantDelegationModal as re } from "../components/GrantDelegationModal.js";
16
+ import { DEVPORTAL_PERMISSIONS as ie } from "../constants/permissions.js";
17
+ import { useDevportalPermission as ae } from "../hooks/usePermission.js";
18
18
  import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
19
- import { useCallback as j, useEffect as ie, useMemo as M, useRef as ae, useState as N } from "react";
19
+ import { useCallback as j, useEffect as oe, useMemo as M, useRef as se, useState as N } from "react";
20
20
  import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as oe, AppWindow as se, BarChart3 as F, CheckCircle as I, Clock as L, Edit as ce, ExternalLink as R, FlaskConical as le, Info as ue, Key as z, Loader2 as B, MoreHorizontal as de, Plus as V, Power as fe, RefreshCw as pe, SendHorizontal as me, Shield as H, Store as he, Upload as U, Users as W, Webhook as ge, X as _e, XCircle as ve } from "lucide-react";
22
- import { useNavigate as ye, useParams as be } from "react-router-dom";
23
- import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
24
- import { CTAOverflowMenu as xe, EmphasisPanel as Se, GlassCard as J, NextSteps as Ce } from "@burdenoff/fe-libs/ui";
21
+ import { AlertCircle as ce, AppWindow as le, BarChart3 as F, Check as I, CheckCircle as ue, ChevronRight as de, CircleDollarSign as L, Clock as fe, Edit as pe, ExternalLink as R, FlaskConical as me, Gift as he, Info as ge, Key as _e, Loader2 as z, MoreHorizontal as ve, Package as ye, Plus as be, Power as xe, RefreshCw as Se, SendHorizontal as Ce, Shield as we, Store as Te, TrendingUp as Ee, Upload as B, Users as De, Wallet as Oe, Webhook as ke, X as Ae, XCircle as je } from "lucide-react";
22
+ import { useParams as Me } from "react-router-dom";
23
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
24
+ import { CTAOverflowMenu as Ne, EmphasisPanel as W, GlassCard as Pe } from "@burdenoff/fe-libs/ui";
25
25
  //#region src/devportal/pages/ApplicationDetailPage.tsx
26
- function we(e) {
26
+ function Fe(e) {
27
27
  return e ? {
28
28
  id: e.id,
29
29
  name: e.name,
@@ -73,7 +73,7 @@ function we(e) {
73
73
  updatedAt: e.updatedAt
74
74
  } : null;
75
75
  }
76
- function Te(e) {
76
+ function Ie(e) {
77
77
  return {
78
78
  id: e.id,
79
79
  applicationId: e.applicationId,
@@ -97,7 +97,7 @@ function Te(e) {
97
97
  updatedAt: e.updatedAt
98
98
  };
99
99
  }
100
- function Y(e) {
100
+ function G(e) {
101
101
  return {
102
102
  id: e.id,
103
103
  applicationId: e.applicationId,
@@ -113,7 +113,7 @@ function Y(e) {
113
113
  createdAt: e.createdAt
114
114
  };
115
115
  }
116
- function Ee(e) {
116
+ function Le(e) {
117
117
  return {
118
118
  id: e.id,
119
119
  appId: e.appId,
@@ -135,367 +135,1152 @@ function Ee(e) {
135
135
  revokedBy: e.revokedBy || void 0
136
136
  };
137
137
  }
138
- var De = [
138
+ var Re = [
139
139
  {
140
140
  id: "overview",
141
141
  label: "Overview",
142
- icon: se
142
+ icon: le
143
+ },
144
+ {
145
+ id: "analytics",
146
+ label: "Analytics",
147
+ icon: F
148
+ },
149
+ {
150
+ id: "store-listing",
151
+ label: "Store Listing",
152
+ icon: Te
153
+ },
154
+ {
155
+ id: "versions",
156
+ label: "Versions",
157
+ icon: ye
158
+ },
159
+ {
160
+ id: "pricing",
161
+ label: "Pricing",
162
+ icon: L
143
163
  },
144
164
  {
145
165
  id: "permissions",
146
166
  label: "Permissions",
147
- icon: H
167
+ icon: we
148
168
  },
149
169
  {
150
170
  id: "webhooks",
151
171
  label: "Webhooks",
152
- icon: ge
172
+ icon: ke
153
173
  },
154
174
  {
155
175
  id: "delegations",
156
176
  label: "Delegations",
157
- icon: W
158
- },
159
- {
160
- id: "analytics",
161
- label: "Analytics",
162
- icon: F
177
+ icon: De
163
178
  },
164
179
  {
165
180
  id: "playground",
166
181
  label: "API Playground",
167
182
  icon: R
168
- },
169
- {
170
- id: "store-listing",
171
- label: "Store Listing",
172
- icon: he
173
183
  }
174
- ], Oe = {
184
+ ], ze = {
175
185
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
176
186
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
177
187
  EXPIRED: "bg-bg-sunken text-text-secondary"
178
- }, ke = ({ message: e = "Loading..." }) => /* @__PURE__ */ q("div", {
188
+ }, K = ({ message: e = "Loading..." }) => /* @__PURE__ */ U("div", {
179
189
  className: "flex items-center justify-center gap-3 py-12",
180
- children: [/* @__PURE__ */ K(B, {
190
+ children: [/* @__PURE__ */ H(z, {
181
191
  size: 20,
182
192
  className: "animate-spin text-text-secondary"
183
- }), /* @__PURE__ */ K("p", {
193
+ }), /* @__PURE__ */ H("p", {
184
194
  className: "text-sm text-text-secondary",
185
195
  children: e
186
196
  })]
187
- }), Ae = ({ message: e }) => /* @__PURE__ */ q("div", {
197
+ }), Be = ({ message: e }) => /* @__PURE__ */ U("div", {
188
198
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
189
- children: [/* @__PURE__ */ K(oe, {
199
+ children: [/* @__PURE__ */ H(ce, {
190
200
  size: 32,
191
201
  className: "text-status-error-text"
192
- }), /* @__PURE__ */ K("p", {
202
+ }), /* @__PURE__ */ H("p", {
193
203
  className: "text-sm text-text-secondary",
194
204
  children: e
195
205
  })]
196
- }), X = () => {
197
- let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = P(), p = (e, t) => {
198
- let n = d(e);
206
+ }), Ve = () => {
207
+ let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = P(), p = (e, t) => {
208
+ let n = u(e);
199
209
  return n === e ? t : n;
200
- }, { allowed: h } = re(ne.APP_UPDATE), { allowed: _ } = re(ne.APP_DELETE), { appId: S } = be(), [w, T] = N("overview"), [E, D] = N(!1), [O, A] = N(!1), [ie, M] = N(null), [ae, F] = N(!1), { data: I, loading: ue, error: z } = s({
201
- variables: { id: S },
202
- skip: !S
203
- }), [B, { loading: de }] = f(), [V, { loading: U }] = a(), [W, { loading: _e }] = u(), [ye, { loading: G }] = m(), { data: Se, refetch: J } = l({
210
+ }, { allowed: _ } = ae(ie.APP_UPDATE), { allowed: y } = ae(ie.APP_DELETE), { appId: w } = Me(), [E, D] = N("overview"), [O, k] = N(!1), [te, A] = N(!1), [oe, M] = N(null), [se, F] = N(!1), { data: L, loading: R, error: he, refetch: ge } = s({
211
+ variables: { id: w },
212
+ skip: !w
213
+ }), [_e, { loading: ve }] = m(), [ye, { loading: be }] = a(), [we, { loading: Ee }] = h(), [B, { loading: De }] = f(), [Oe, { loading: ke }] = g(), { data: Ae, refetch: W } = d({
204
214
  variables: {
205
- applicationId: S,
215
+ applicationId: w,
206
216
  workspaceId: c ?? void 0
207
217
  },
208
- skip: !c || !S,
218
+ skip: !c || !w,
209
219
  fetchPolicy: "cache-and-network"
210
- }), Te = Se?.appInstallations?.edges?.[0]?.node ?? null, Y = j((e) => {
220
+ }), Pe = Ae?.appInstallations?.edges?.[0]?.node ?? null, { data: Ie } = l({
221
+ variables: { id: L?.application?.developerOrganizationId ?? "" },
222
+ skip: !L?.application?.developerOrganizationId,
223
+ fetchPolicy: "cache-first"
224
+ }), G = j((e) => {
211
225
  i?.(`${o}${e}`);
212
- }, [i, o]), Ee = j(async () => {
213
- let e = I?.application?.appId;
226
+ }, [i, o]), Le = j(async () => {
227
+ let e = L?.application?.appId;
214
228
  if (e) try {
215
- let t = (await B({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
216
- t && M(t), D(!1);
229
+ let t = (await _e({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
230
+ t && M(t), k(!1);
217
231
  } catch {}
218
- }, [I?.application?.appId, B]), Oe = j(async () => {
219
- if (S) try {
220
- await V({ variables: { id: S } }), A(!1), Y("/apps");
232
+ }, [L?.application?.appId, _e]), ze = j(async () => {
233
+ if (w) try {
234
+ await ye({ variables: { id: w } }), A(!1), G("/apps");
221
235
  } catch {}
222
236
  }, [
223
- S,
224
- V,
225
- Y
226
- ]), ke = j(async () => {
227
- if (!(!S || !c)) try {
228
- await W({ variables: { input: {
229
- applicationId: S,
237
+ w,
238
+ ye,
239
+ G
240
+ ]), K = j(async () => {
241
+ if (!(!w || !c)) try {
242
+ await B({ variables: { input: {
243
+ applicationId: w,
230
244
  scope: "WORKSPACE",
231
245
  workspaceId: c,
232
246
  autoUpdate: !1
233
- } } }), J(), C("success");
247
+ } } }), W(), T("success");
234
248
  } catch (e) {
235
- console.error("[DevPortal] Test in Workspace failed:", e), C("error");
249
+ console.error("[DevPortal] Test in Workspace failed:", e), T("error");
236
250
  }
237
251
  }, [
238
- S,
252
+ w,
239
253
  c,
240
- W,
241
- J
242
- ]), Ae = j(async (e) => {
254
+ B,
255
+ W
256
+ ]), Be = j(async (e) => {
243
257
  try {
244
- await ye({ variables: { id: e } }), J(), C("success");
258
+ await Oe({ variables: { id: e } }), W(), T("success");
245
259
  } catch {
246
- C("error");
260
+ T("error");
261
+ }
262
+ }, [Oe, W]), Ve = j(async () => {
263
+ if (w) try {
264
+ await we({ variables: { id: w } }), T("success");
265
+ } catch (e) {
266
+ console.error("[DevPortal] Submit failed:", e), T("error");
267
+ } finally {
268
+ ge();
247
269
  }
248
- }, [ye, J]);
249
- if (ue && !I) return /* @__PURE__ */ K(n, { message: p("devportal.loadingApplication", "Loading application...") });
250
- if (z) return /* @__PURE__ */ K(g, {
270
+ }, [
271
+ w,
272
+ we,
273
+ ge
274
+ ]);
275
+ if (R && !L) return /* @__PURE__ */ H(n, { message: p("devportal.loadingApplication", "Loading application...") });
276
+ if (he) return /* @__PURE__ */ H(v, {
251
277
  title: p("devportal.error", "Error"),
252
278
  backLink: `${o}/apps`,
253
279
  backLabel: p("devportal.backToApplications", "Back to Applications"),
254
- children: /* @__PURE__ */ q("div", {
280
+ children: /* @__PURE__ */ U("div", {
255
281
  className: "flex flex-col items-center justify-center py-12 text-center",
256
282
  children: [
257
- /* @__PURE__ */ K(oe, {
283
+ /* @__PURE__ */ H(ce, {
258
284
  size: 48,
259
285
  className: "text-status-error-text mb-4"
260
286
  }),
261
- /* @__PURE__ */ K("h3", {
287
+ /* @__PURE__ */ H("h3", {
262
288
  className: "text-lg font-semibold mb-2",
263
289
  children: p("devportal.failedToLoadApplication", "Failed to load application")
264
290
  }),
265
- /* @__PURE__ */ K("p", {
291
+ /* @__PURE__ */ H("p", {
266
292
  className: "text-sm text-text-secondary",
267
- children: z.message
293
+ children: he.message
268
294
  })
269
295
  ]
270
296
  })
271
297
  });
272
- let X = we(I?.application);
273
- if (!X) return /* @__PURE__ */ K(g, {
298
+ let q = Fe(L?.application);
299
+ if (!q) return /* @__PURE__ */ H(v, {
274
300
  title: p("devportal.notFound", "Not Found"),
275
301
  backLink: `${o}/apps`,
276
302
  backLabel: p("devportal.backToApplications", "Back to Applications"),
277
- children: /* @__PURE__ */ K(r, {
303
+ children: /* @__PURE__ */ H(r, {
278
304
  illustration: "empty-generic",
279
- icon: /* @__PURE__ */ K(se, { size: 48 }),
305
+ icon: /* @__PURE__ */ H(le, { size: 48 }),
280
306
  title: p("devportal.applicationNotFound", "Application not found"),
281
307
  description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
282
308
  })
283
309
  });
284
- let Z = X.appType === "NODE" || X.appType === "WORKFLOW", Fe = X.status !== "PUBLISHED" && (!Z || (I?.application?.versions?.totalCount ?? 0) > 0), Ie = [
285
- ...Z ? [] : [{
310
+ let J = q.appType === "NODE" || q.appType === "WORKFLOW", Y = L?.application?.versions?.totalCount ?? 0, Je = q.pricingType === "PAID", Ye = Ie?.developerOrganization, Xe = Ye?.platformFeeRate ?? .3, Ze = !!Ye?.billingAccountId, $e = q.pricingDetails ?? {}, X = q.pricingType === "FREE" || q.pricingType === "PAID" && typeof $e.price == "number" && $e.price > 0, Z = !!q.description?.trim() && !!q.category && !!q.iconUrl && (q.visibility === "PUBLIC" || q.visibility === "UNLISTED") && (!J || Y > 0) && (!Je || Ze) && X, et = Z && q.status !== "PUBLISHED" && q.status !== "SUBMITTED", tt = [
311
+ ...J ? [] : [{
286
312
  label: p("devportal.rotateSecret", "Rotate Secret"),
287
- icon: /* @__PURE__ */ K(pe, { size: 16 }),
288
- disabled: !X.appId,
289
- onSelect: () => D(!0)
313
+ icon: /* @__PURE__ */ H(Se, { size: 16 }),
314
+ disabled: !q.appId,
315
+ onSelect: () => k(!0)
290
316
  }],
291
- {
292
- label: p("devportal.versions", "Versions"),
293
- icon: /* @__PURE__ */ K(L, { size: 16 }),
294
- onSelect: () => Y(`/apps/${X.id}/versions`)
295
- },
296
- ...X.status === "SUBMITTED" ? [{
297
- label: p("devportal.viewSubmissionStatus", "View Submission Status"),
298
- icon: /* @__PURE__ */ K(R, { size: 16 }),
299
- onSelect: () => Y(`/apps/${X.id}/store-submission`)
300
- }] : Fe ? [{
301
- label: p("devportal.submitForReview", "Submit for Review"),
302
- icon: /* @__PURE__ */ K(me, { size: 16 }),
303
- onSelect: () => T("store-listing")
304
- }] : [],
305
- ...Z ? [] : Te ? [{
317
+ ...J ? [] : Pe ? [{
306
318
  label: p("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
307
- icon: /* @__PURE__ */ K(ve, { size: 16 }),
308
- disabled: G || !c,
309
- onSelect: () => void Ae(Te.id)
319
+ icon: /* @__PURE__ */ H(je, { size: 16 }),
320
+ disabled: ke || !c,
321
+ onSelect: () => void Be(Pe.id)
310
322
  }] : [{
311
323
  label: p("devportal.testInWorkspace", "Test in Workspace"),
312
- icon: /* @__PURE__ */ K(le, { size: 16 }),
313
- disabled: _e || !c,
314
- onSelect: () => void ke()
324
+ icon: /* @__PURE__ */ H(me, { size: 16 }),
325
+ disabled: De || !c,
326
+ onSelect: () => void K()
315
327
  }],
316
328
  {
317
329
  label: p("devportal.deactivate", "Deactivate"),
318
- icon: /* @__PURE__ */ K(fe, { size: 16 }),
330
+ icon: /* @__PURE__ */ H(xe, { size: 16 }),
319
331
  intent: "destructive",
320
- disabled: !_,
332
+ disabled: !y,
321
333
  onSelect: () => A(!0)
322
334
  }
323
335
  ];
324
- return /* @__PURE__ */ q(g, {
325
- title: X.name,
326
- description: X.shortDescription,
336
+ return /* @__PURE__ */ U(v, {
337
+ title: q.name,
338
+ description: q.shortDescription,
327
339
  purpose: p("devportal.appDetailPurpose", "Everything about this application in one place — its credentials, the permissions and webhooks it uses, its analytics, and its store listing. Use the tabs to configure each area, then edit or publish when it is ready."),
328
340
  backLink: `${o}/apps`,
329
341
  backLabel: p("devportal.backToApplications", "Back to Applications"),
330
- actions: /* @__PURE__ */ K(xe, {
331
- primary: {
332
- label: p("devportal.editApp", "Edit App"),
333
- icon: /* @__PURE__ */ K(ce, { size: 16 }),
334
- disabled: !h,
335
- onSelect: () => Y(`/apps/${X.id}/edit`)
336
- },
337
- actions: Ie
342
+ actions: /* @__PURE__ */ U("div", {
343
+ className: "flex items-center gap-2",
344
+ children: [q.status === "SUBMITTED" ? /* @__PURE__ */ U("div", {
345
+ className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
346
+ children: [/* @__PURE__ */ H(fe, { size: 13 }), p("devportal.underReview", "Under Review")]
347
+ }) : q.status === "PUBLISHED" ? null : /* @__PURE__ */ H("button", {
348
+ type: "button",
349
+ onClick: () => void Ve(),
350
+ disabled: !et || Ee,
351
+ title: Z ? void 0 : [
352
+ !q.description?.trim() && "Add full description",
353
+ !q.category && "Select a category",
354
+ !q.iconUrl && "Upload an app icon",
355
+ q.visibility === "PRIVATE" && "Set visibility to Public/Unlisted",
356
+ J && Y === 0 && "Upload at least one version",
357
+ !X && "Set pricing (choose Free or Paid in the Pricing tab)",
358
+ Je && !Ze && "Link a billing account to receive payments"
359
+ ].filter(Boolean).join(" · "),
360
+ className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", et && !Ee ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
361
+ children: Ee ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(z, {
362
+ size: 15,
363
+ className: "animate-spin"
364
+ }), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Ce, { size: 15 }), p("devportal.submitForReview", "Submit for Review")] })
365
+ }), /* @__PURE__ */ H(Ne, {
366
+ primary: {
367
+ label: p("devportal.editApp", "Edit App"),
368
+ icon: /* @__PURE__ */ H(pe, { size: 16 }),
369
+ disabled: !_,
370
+ onSelect: () => G(`/apps/${q.id}/edit`)
371
+ },
372
+ actions: tt
373
+ })]
338
374
  }),
339
375
  children: [
340
- ie && /* @__PURE__ */ K(ee, {
376
+ oe && /* @__PURE__ */ H(ee, {
341
377
  title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
342
- secret: ie,
378
+ secret: oe,
343
379
  description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
344
380
  onDismiss: () => M(null)
345
381
  }),
346
- /* @__PURE__ */ q("div", {
382
+ /* @__PURE__ */ U("div", {
347
383
  className: "flex flex-wrap items-center gap-2",
348
384
  children: [
349
- /* @__PURE__ */ K(b, {
350
- status: X.status,
385
+ /* @__PURE__ */ H(S, {
386
+ status: q.status,
351
387
  type: "app"
352
388
  }),
353
- /* @__PURE__ */ K(b, {
354
- status: X.visibility,
389
+ /* @__PURE__ */ H(S, {
390
+ status: q.visibility,
355
391
  type: "app"
356
392
  }),
357
- X.isVerified && /* @__PURE__ */ K(x, { verified: !0 }),
358
- X.isFeatured && /* @__PURE__ */ K(y, {}),
359
- /* @__PURE__ */ K("span", {
393
+ q.isVerified && /* @__PURE__ */ H(C, { verified: !0 }),
394
+ q.isFeatured && /* @__PURE__ */ H(x, {}),
395
+ /* @__PURE__ */ H("span", {
360
396
  className: "text-sm text-text-secondary",
361
- children: v[X.appType] || X.appType
397
+ children: b[q.appType] || q.appType
362
398
  })
363
399
  ]
364
400
  }),
365
- /* @__PURE__ */ K(Ce, {
366
- storageKey: `devportal-app-${X.id}`,
367
- steps: [
401
+ q.status === "SUBMITTED" && /* @__PURE__ */ U("div", {
402
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
403
+ children: [/* @__PURE__ */ H(fe, {
404
+ size: 18,
405
+ className: "text-status-warning-text mt-0.5 flex-shrink-0"
406
+ }), /* @__PURE__ */ U("div", {
407
+ className: "text-sm",
408
+ children: [/* @__PURE__ */ H("p", {
409
+ className: "font-medium text-status-warning-text",
410
+ children: p("devportal.underReview", "Under Review")
411
+ }), /* @__PURE__ */ U("p", {
412
+ className: "mt-0.5 text-text-secondary",
413
+ children: [p("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."), q.submittedAt && /* @__PURE__ */ U("span", {
414
+ className: "ml-1",
415
+ children: [
416
+ "Submitted ",
417
+ new Date(q.submittedAt).toLocaleDateString(),
418
+ "."
419
+ ]
420
+ })]
421
+ })]
422
+ })]
423
+ }),
424
+ q.status === "REJECTED" && /* @__PURE__ */ U("div", {
425
+ className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
426
+ children: [/* @__PURE__ */ H(je, {
427
+ size: 18,
428
+ className: "text-status-error-text mt-0.5 flex-shrink-0"
429
+ }), /* @__PURE__ */ U("div", {
430
+ className: "text-sm",
431
+ children: [
432
+ /* @__PURE__ */ H("p", {
433
+ className: "font-medium text-status-error-text",
434
+ children: p("devportal.reviewRejected", "Review Rejected")
435
+ }),
436
+ /* @__PURE__ */ H("p", {
437
+ className: "mt-0.5 text-text-secondary",
438
+ children: q.reviewNotes || p("devportal.reviewRejectedDesc", "Your submission was not approved. Please review the feedback, update your app, and re-submit.")
439
+ }),
440
+ /* @__PURE__ */ H("button", {
441
+ type: "button",
442
+ onClick: () => G(`/apps/${q.id}/edit`),
443
+ className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
444
+ children: p("devportal.editAndResubmit", "Edit app and re-submit →")
445
+ })
446
+ ]
447
+ })]
448
+ }),
449
+ q.status === "PUBLISHED" && /* @__PURE__ */ U("div", {
450
+ className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
451
+ children: [/* @__PURE__ */ H(ue, {
452
+ size: 18,
453
+ className: "text-status-success-text mt-0.5 flex-shrink-0"
454
+ }), /* @__PURE__ */ U("div", {
455
+ className: "text-sm",
456
+ children: [/* @__PURE__ */ H("p", {
457
+ className: "font-medium text-status-success-text",
458
+ children: p("devportal.liveInStore", "Live in the Store")
459
+ }), /* @__PURE__ */ H("p", {
460
+ className: "mt-0.5 text-text-secondary",
461
+ children: p("devportal.liveInStoreDesc", "Your app is published and visible to users in the marketplace.")
462
+ })]
463
+ })]
464
+ }),
465
+ (q.status === "DRAFT" || q.status === "REJECTED") && !Z && (() => {
466
+ let e = !!q.description?.trim() && !!q.category && !!q.iconUrl && (q.visibility === "PUBLIC" || q.visibility === "UNLISTED"), n = !J || Y > 0, r = [
467
+ !q.description?.trim() && "Add a full description",
468
+ !q.category && "Select a category",
469
+ !q.iconUrl && "Upload an app icon",
470
+ q.visibility === "PRIVATE" && "Set visibility to Public or Unlisted"
471
+ ].filter(Boolean), i = [
368
472
  {
369
- id: "edit",
370
- label: p("devportal.editApp", "Edit App"),
371
- description: p("devportal.appDetailStepEdit", "Update the name, description, and settings"),
372
- icon: /* @__PURE__ */ K(ce, { size: 16 }),
373
- onClick: () => Y(`/apps/${X.id}/edit`)
473
+ id: "store",
474
+ label: p("devportal.setupStoreListingStep", "Complete Store Listing"),
475
+ hint: e ? p("devportal.done", "Done") : r.join(" · "),
476
+ done: e,
477
+ onClick: () => D("store-listing")
374
478
  },
375
- ...Z ? [{
376
- id: "versions",
377
- label: p("devportal.versions", "Versions"),
378
- description: p("devportal.appDetailStepVersions", "Upload a zip package to create your first version"),
379
- icon: /* @__PURE__ */ K(L, { size: 16 }),
380
- onClick: () => Y(`/apps/${X.id}/versions`)
381
- }] : [{
382
- id: "permissions",
383
- label: p("devportal.permissions", "Permissions"),
384
- description: p("devportal.appDetailStepPermissions", "Request the scopes your app needs"),
385
- icon: /* @__PURE__ */ K(H, { size: 16 }),
386
- onClick: () => T("permissions")
387
- }, {
388
- id: "webhooks",
389
- label: p("devportal.webhooks", "Webhooks"),
390
- description: p("devportal.appDetailStepWebhooks", "Subscribe to events for real-time updates"),
391
- icon: /* @__PURE__ */ K(ge, { size: 16 }),
392
- onClick: () => T("webhooks")
393
- }],
479
+ ...J ? [{
480
+ id: "version",
481
+ label: p("devportal.setupVersionStep", "Upload a Version"),
482
+ hint: n ? p("devportal.done", "Done") : p("devportal.uploadVersionHint", "Upload your ZIP bundle and manifest"),
483
+ done: n,
484
+ onClick: () => D("versions")
485
+ }] : [],
394
486
  {
395
- id: "store-listing",
396
- label: p("devportal.storeListing", "Store Listing"),
397
- description: p("devportal.appDetailStepStore", "Prepare and publish to the marketplace"),
398
- icon: /* @__PURE__ */ K(he, { size: 16 }),
399
- onClick: () => T("store-listing")
487
+ id: "pricing",
488
+ label: p("devportal.setupPricingStep", "Set Pricing"),
489
+ hint: X ? p("devportal.done", "Done") : p("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
490
+ done: X,
491
+ onClick: () => D("pricing")
492
+ },
493
+ {
494
+ id: "submit",
495
+ label: p("devportal.submitForReview", "Submit for Review"),
496
+ hint: Z ? p("devportal.readyToSubmit", "Ready — click Submit for Review above") : p("devportal.completeStepsFirst", "Complete the steps above first"),
497
+ done: !1,
498
+ onClick: void 0
400
499
  }
401
- ]
402
- }),
403
- /* @__PURE__ */ K("div", {
500
+ ], a = i.filter((e) => e.done).length;
501
+ return /* @__PURE__ */ U("div", {
502
+ className: "rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
503
+ children: [/* @__PURE__ */ H("div", {
504
+ className: "flex items-center justify-between border-b border-border-subtle px-5 py-4",
505
+ children: /* @__PURE__ */ U("div", {
506
+ className: "flex items-center gap-3",
507
+ children: [/* @__PURE__ */ H("div", {
508
+ className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
509
+ children: /* @__PURE__ */ H(Te, {
510
+ size: 16,
511
+ className: "text-primary"
512
+ })
513
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
514
+ className: "text-sm font-semibold text-text-primary",
515
+ children: p("devportal.completeSetup", "Complete your app setup")
516
+ }), /* @__PURE__ */ U("p", {
517
+ className: "text-xs text-text-secondary",
518
+ children: [
519
+ a,
520
+ " of",
521
+ " ",
522
+ i.filter((e) => e.id !== "submit").length,
523
+ " ",
524
+ p("devportal.stepsDone", "steps complete")
525
+ ]
526
+ })] })]
527
+ })
528
+ }), /* @__PURE__ */ H("div", {
529
+ className: "divide-y divide-border-subtle",
530
+ children: i.map((e, n) => /* @__PURE__ */ U("button", {
531
+ type: "button",
532
+ onClick: e.onClick,
533
+ disabled: !e.onClick,
534
+ className: t("w-full flex items-center gap-4 px-5 py-4 text-left transition-colors", e.onClick ? "hover:bg-bg-sunken/40 cursor-pointer" : "cursor-default opacity-60"),
535
+ children: [
536
+ /* @__PURE__ */ H("div", {
537
+ className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
538
+ children: e.done ? /* @__PURE__ */ H(I, { size: 13 }) : n + 1
539
+ }),
540
+ /* @__PURE__ */ U("div", {
541
+ className: "flex-1 min-w-0",
542
+ children: [/* @__PURE__ */ H("p", {
543
+ className: t("text-sm font-medium", e.done ? "text-text-secondary line-through" : "text-text-primary"),
544
+ children: e.label
545
+ }), e.hint && !e.done && /* @__PURE__ */ H("p", {
546
+ className: "mt-0.5 text-xs text-text-secondary truncate",
547
+ children: e.hint
548
+ })]
549
+ }),
550
+ e.onClick && !e.done && /* @__PURE__ */ H(de, {
551
+ size: 16,
552
+ className: "flex-shrink-0 text-text-secondary"
553
+ })
554
+ ]
555
+ }, e.id))
556
+ })]
557
+ });
558
+ })(),
559
+ /* @__PURE__ */ H("div", {
404
560
  className: "border-b",
405
- children: /* @__PURE__ */ K("nav", {
561
+ children: /* @__PURE__ */ H("nav", {
406
562
  className: "-mb-px flex gap-4 overflow-x-auto",
407
563
  role: "tablist",
408
564
  "aria-label": p("devportal.applicationSections", "Application sections"),
409
- children: De.filter((e) => !((X.appType === "NODE" || X.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
565
+ children: Re.filter((e) => !(J && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground") || !J && e.id === "versions")).map((e) => {
410
566
  let n = e.icon;
411
- return /* @__PURE__ */ q("button", {
567
+ return /* @__PURE__ */ U("button", {
412
568
  id: `application-tab-${e.id}`,
413
569
  role: "tab",
414
- "aria-selected": w === e.id,
570
+ "aria-selected": E === e.id,
415
571
  "aria-controls": `application-panel-${e.id}`,
416
- onClick: () => T(e.id),
417
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
418
- children: [/* @__PURE__ */ K(n, { size: 16 }), e.label]
572
+ onClick: () => D(e.id),
573
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", E === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
574
+ children: [/* @__PURE__ */ H(n, { size: 16 }), e.label]
419
575
  }, e.id);
420
576
  })
421
577
  })
422
578
  }),
423
- /* @__PURE__ */ q("div", {
579
+ /* @__PURE__ */ U("div", {
424
580
  className: "mt-6",
425
- id: `application-panel-${w}`,
581
+ id: `application-panel-${E}`,
426
582
  role: "tabpanel",
427
- "aria-labelledby": `application-tab-${w}`,
583
+ "aria-labelledby": `application-tab-${E}`,
428
584
  tabIndex: 0,
429
585
  children: [
430
- w === "overview" && /* @__PURE__ */ K(Pe, { app: X }),
431
- w === "permissions" && /* @__PURE__ */ K(Xe, { app: X }),
432
- w === "webhooks" && /* @__PURE__ */ K(je, {
433
- appId: X.id,
434
- onNavigate: Y
586
+ E === "overview" && /* @__PURE__ */ H(qe, { app: q }),
587
+ E === "permissions" && /* @__PURE__ */ H(st, { app: q }),
588
+ E === "webhooks" && /* @__PURE__ */ H(We, {
589
+ appId: q.id,
590
+ onNavigate: G
435
591
  }),
436
- w === "delegations" && /* @__PURE__ */ K(Me, {
437
- authAppId: X.appId || void 0,
438
- appName: X.name,
592
+ E === "delegations" && /* @__PURE__ */ H(Ge, {
593
+ authAppId: q.appId || void 0,
594
+ appName: q.name,
439
595
  onGrantDelegation: () => F(!0),
440
- onNavigate: Y
596
+ onNavigate: G
597
+ }),
598
+ E === "analytics" && /* @__PURE__ */ H(Ke, { appId: q.id }),
599
+ E === "playground" && /* @__PURE__ */ H(Qe, { app: q }),
600
+ E === "store-listing" && /* @__PURE__ */ H(it, {
601
+ app: q,
602
+ versionCount: L?.application?.versions?.totalCount ?? 0,
603
+ isPackageApp: J,
604
+ pricingDone: X,
605
+ onNavigateToVersions: J ? () => D("versions") : void 0,
606
+ onNavigateToPricing: () => D("pricing"),
607
+ onNavigateToSubmission: () => G(`/apps/${q.id}/store-submission`)
441
608
  }),
442
- w === "analytics" && /* @__PURE__ */ K(Ne, { appId: X.id }),
443
- w === "playground" && /* @__PURE__ */ K(Re, { app: X }),
444
- w === "store-listing" && /* @__PURE__ */ K(qe, {
445
- app: X,
446
- versionCount: I?.application?.versions?.totalCount ?? 0
609
+ E === "pricing" && /* @__PURE__ */ H(He, {
610
+ app: q,
611
+ platformFeeRate: Xe,
612
+ billingAccountLinked: Ze,
613
+ onNavigateToRevenue: () => G("/revenue"),
614
+ isReadyToSubmit: Z
615
+ }),
616
+ E === "versions" && /* @__PURE__ */ H(Ue, {
617
+ appId: q.id,
618
+ onNavigate: G,
619
+ pricingDone: X,
620
+ onNavigateToPricing: () => D("pricing")
447
621
  })
448
622
  ]
449
623
  }),
450
- /* @__PURE__ */ K(k, {
451
- open: E,
452
- onOpenChange: D,
453
- onConfirm: Ee,
624
+ /* @__PURE__ */ H(ne, {
625
+ open: O,
626
+ onOpenChange: k,
627
+ onConfirm: Le,
454
628
  title: p("devportal.rotateAppSecret", "Rotate App Secret"),
455
629
  description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
456
630
  confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
457
631
  cancelLabel: p("devportal.cancel", "Cancel"),
458
632
  variant: "warning",
459
- loading: de
633
+ loading: ve
460
634
  }),
461
- /* @__PURE__ */ K(k, {
462
- open: O,
635
+ /* @__PURE__ */ H(ne, {
636
+ open: te,
463
637
  onOpenChange: A,
464
- onConfirm: Oe,
638
+ onConfirm: ze,
465
639
  title: p("devportal.deactivateApplication", "Deactivate Application"),
466
640
  description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
467
641
  confirmLabel: p("devportal.deactivate", "Deactivate"),
468
642
  cancelLabel: p("devportal.cancel", "Cancel"),
469
643
  variant: "destructive",
470
- loading: U
644
+ loading: be
471
645
  }),
472
- /* @__PURE__ */ K(te, {
473
- open: ae,
646
+ /* @__PURE__ */ H(re, {
647
+ open: se,
474
648
  onOpenChange: F,
475
- appId: X.appId || "",
476
- appName: X.name,
477
- appScopes: X.scopes?.map((e) => e.scope) ?? [],
649
+ appId: q.appId || "",
650
+ appName: q.name,
651
+ appScopes: q.scopes?.map((e) => e.scope) ?? [],
478
652
  onSuccess: () => {
479
653
  F(!1);
480
654
  }
481
655
  })
482
656
  ]
483
657
  });
484
- }, je = ({ appId: e, onNavigate: t }) => {
658
+ }, q = .01, J = (e) => e * q, Y = (e) => Math.round(e / q), He = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
659
+ let { t: o } = P(), s = (e, t) => {
660
+ let n = o(e);
661
+ return n === e ? t : n;
662
+ }, c = e.pricingDetails ?? {}, [l, u] = N({
663
+ pricingType: e.pricingType ?? "FREE",
664
+ price: typeof c.price == "number" ? String(c.price) : ""
665
+ }), [d, f] = N(!1), [p] = _(), m = se(e);
666
+ m.current = e, oe(() => {
667
+ let e = m.current.pricingDetails ?? {};
668
+ u({
669
+ pricingType: m.current.pricingType ?? "FREE",
670
+ price: typeof e.price == "number" ? String(e.price) : ""
671
+ });
672
+ }, [e.id]);
673
+ let h = (e, t) => {
674
+ u((n) => ({
675
+ ...n,
676
+ [e]: t
677
+ }));
678
+ }, g = async () => {
679
+ f(!0);
680
+ try {
681
+ let t = { ...e.pricingDetails ?? {} };
682
+ if (l.pricingType !== "FREE") {
683
+ let e = parseInt(l.price, 10);
684
+ !isNaN(e) && e > 0 && (t.price = e, t.currency = "CREDITS");
685
+ } else delete t.price, delete t.currency;
686
+ await p({ variables: {
687
+ id: e.id,
688
+ input: {
689
+ pricingType: l.pricingType || null,
690
+ pricingDetails: Object.keys(t).length > 0 ? t : null
691
+ }
692
+ } }), T("success");
693
+ } catch {
694
+ T("error");
695
+ } finally {
696
+ f(!1);
697
+ }
698
+ }, v = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = v && !isNaN(y) && y > 0, x = b ? J(y) : 0, S = b ? Math.round(y * n) : 0, C = J(S), w = b ? y - S : 0, ee = J(w), E = (e) => "$" + e.toLocaleString("en-US", {
699
+ minimumFractionDigits: 2,
700
+ maximumFractionDigits: 2
701
+ }), D = (e) => e.toLocaleString("en-US") + " cr";
702
+ return /* @__PURE__ */ U("div", {
703
+ className: "space-y-8",
704
+ children: [
705
+ /* @__PURE__ */ U("div", {
706
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
707
+ children: [/* @__PURE__ */ H(L, {
708
+ size: 16,
709
+ className: "mt-0.5 shrink-0 text-primary"
710
+ }), /* @__PURE__ */ U("p", {
711
+ className: "text-sm text-text-secondary",
712
+ children: [
713
+ /* @__PURE__ */ H("span", {
714
+ className: "font-medium text-text-primary",
715
+ children: "Platform credits"
716
+ }),
717
+ " ",
718
+ "are the currency of the Burdenoff marketplace.",
719
+ " ",
720
+ /* @__PURE__ */ U("span", {
721
+ className: "font-medium",
722
+ children: [
723
+ "1 credit = ",
724
+ E(q),
725
+ " USD."
726
+ ]
727
+ }),
728
+ " ",
729
+ "Buyers purchase credits and spend them on apps. You earn credits on every sale and can withdraw them as cash via your billing account."
730
+ ]
731
+ })]
732
+ }),
733
+ /* @__PURE__ */ U("div", {
734
+ className: "space-y-3",
735
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h2", {
736
+ className: "text-lg font-semibold",
737
+ children: s("devportal.howMonetizationWorks", "How App Monetization Works")
738
+ }), /* @__PURE__ */ H("p", {
739
+ className: "mt-1 text-sm text-text-secondary",
740
+ children: s("devportal.monetizationDesc", "Earn revenue when users install or purchase your app. Here's exactly how the money flows.")
741
+ })] }), /* @__PURE__ */ U("div", {
742
+ className: "grid gap-4 sm:grid-cols-3",
743
+ children: [
744
+ /* @__PURE__ */ U("div", {
745
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
746
+ children: [/* @__PURE__ */ H("div", {
747
+ className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
748
+ children: /* @__PURE__ */ H(Ee, {
749
+ size: 18,
750
+ className: "text-status-success-text"
751
+ })
752
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("p", {
753
+ className: "font-semibold",
754
+ children: [(100 - n * 100).toFixed(0), "% revenue share"]
755
+ }), /* @__PURE__ */ U("p", {
756
+ className: "mt-1 text-sm text-text-secondary",
757
+ children: [
758
+ "You keep",
759
+ " ",
760
+ /* @__PURE__ */ U("span", {
761
+ className: "font-medium text-status-success-text",
762
+ children: [(100 - n * 100).toFixed(0), "%"]
763
+ }),
764
+ " ",
765
+ "of every sale in credits. The platform retains a",
766
+ " ",
767
+ /* @__PURE__ */ U("span", {
768
+ className: "font-medium",
769
+ children: [(n * 100).toFixed(0), "%"]
770
+ }),
771
+ " ",
772
+ "fee to cover infrastructure, payments processing, and marketplace operations."
773
+ ]
774
+ })] })]
775
+ }),
776
+ /* @__PURE__ */ U("div", {
777
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
778
+ children: [/* @__PURE__ */ H("div", {
779
+ className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
780
+ children: /* @__PURE__ */ H(Oe, {
781
+ size: 18,
782
+ className: "text-primary"
783
+ })
784
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
785
+ className: "font-semibold",
786
+ children: "Credits → cash via billing"
787
+ }), /* @__PURE__ */ U("p", {
788
+ className: "mt-1 text-sm text-text-secondary",
789
+ children: [
790
+ "Every sale instantly deposits your earned credits into your linked billing account. You can spend them on platform services or request a cash withdrawal. Track everything on the",
791
+ " ",
792
+ i ? /* @__PURE__ */ H("button", {
793
+ type: "button",
794
+ onClick: i,
795
+ className: "font-medium text-primary underline-offset-2 hover:underline",
796
+ children: "Revenue page"
797
+ }) : /* @__PURE__ */ H("span", {
798
+ className: "font-medium text-primary",
799
+ children: "Revenue page"
800
+ }),
801
+ "."
802
+ ]
803
+ })] })]
804
+ }),
805
+ /* @__PURE__ */ U("div", {
806
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
807
+ children: [/* @__PURE__ */ H("div", {
808
+ className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
809
+ children: /* @__PURE__ */ H(he, {
810
+ size: 18,
811
+ className: "text-status-warning-text"
812
+ })
813
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
814
+ className: "font-semibold",
815
+ children: "Reach the full marketplace"
816
+ }), /* @__PURE__ */ H("p", {
817
+ className: "mt-1 text-sm text-text-secondary",
818
+ children: "Any user with platform credits can discover and install your app directly from the marketplace. Free apps maximise reach; paid apps let you monetise your work."
819
+ })] })]
820
+ })
821
+ ]
822
+ })]
823
+ }),
824
+ /* @__PURE__ */ U("div", {
825
+ className: "space-y-4",
826
+ children: [
827
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", {
828
+ className: "text-base font-semibold",
829
+ children: s("devportal.setPricingTitle", "Set Your Price")
830
+ }), /* @__PURE__ */ U("p", {
831
+ className: "mt-0.5 text-sm text-text-secondary",
832
+ children: [
833
+ "Choose ",
834
+ /* @__PURE__ */ H("strong", { children: "Free" }),
835
+ " to maximise installs, or",
836
+ " ",
837
+ /* @__PURE__ */ H("strong", { children: "Paid" }),
838
+ " to earn credits on every install. Paid apps require a linked billing account before publishing."
839
+ ]
840
+ })] }),
841
+ /* @__PURE__ */ H("div", {
842
+ className: "flex flex-wrap gap-2",
843
+ children: et.map((e) => /* @__PURE__ */ H("button", {
844
+ type: "button",
845
+ onClick: () => h("pricingType", e.value),
846
+ className: t("rounded-md border px-4 py-2 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
847
+ children: e.label
848
+ }, e.value))
849
+ }),
850
+ v && /* @__PURE__ */ U("div", {
851
+ className: "space-y-4",
852
+ children: [
853
+ /* @__PURE__ */ U("div", {
854
+ className: "max-w-xs",
855
+ children: [
856
+ /* @__PURE__ */ U("label", {
857
+ className: "mb-1.5 block text-sm font-medium",
858
+ children: [
859
+ "Listing price",
860
+ " ",
861
+ /* @__PURE__ */ H("span", {
862
+ className: "text-text-tertiary font-normal",
863
+ children: "(credits)"
864
+ })
865
+ ]
866
+ }),
867
+ /* @__PURE__ */ U("div", {
868
+ className: "relative flex items-center",
869
+ children: [/* @__PURE__ */ H("input", {
870
+ type: "number",
871
+ min: 1,
872
+ step: 1,
873
+ value: l.price,
874
+ onChange: (e) => h("price", e.target.value),
875
+ placeholder: "e.g. 1000",
876
+ className: "w-full rounded-md border border-border-subtle bg-bg-input px-3 py-2 pr-20 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"
877
+ }), /* @__PURE__ */ H("span", {
878
+ className: "pointer-events-none absolute right-3 text-xs text-text-tertiary",
879
+ children: "credits"
880
+ })]
881
+ }),
882
+ b && /* @__PURE__ */ U("p", {
883
+ className: "mt-1.5 text-xs text-text-secondary",
884
+ children: [
885
+ "≈ ",
886
+ E(x),
887
+ " USD at the current credit rate (1 cr =",
888
+ " ",
889
+ E(q),
890
+ ")"
891
+ ]
892
+ }),
893
+ /* @__PURE__ */ H("p", {
894
+ className: "mt-1 text-xs text-text-tertiary",
895
+ children: s("devportal.priceHint", "Set the number of credits a buyer spends to install your app")
896
+ })
897
+ ]
898
+ }),
899
+ /* @__PURE__ */ U("div", {
900
+ className: "flex items-center gap-2 text-xs text-text-secondary",
901
+ children: [/* @__PURE__ */ H("span", { children: "Quick convert:" }), [
902
+ 5,
903
+ 10,
904
+ 25,
905
+ 50
906
+ ].map((e) => /* @__PURE__ */ U("button", {
907
+ type: "button",
908
+ onClick: () => h("price", String(Y(e))),
909
+ className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
910
+ children: [
911
+ "$",
912
+ e,
913
+ " = ",
914
+ Y(e).toLocaleString(),
915
+ " cr"
916
+ ]
917
+ }, e))]
918
+ }),
919
+ b && /* @__PURE__ */ U("div", {
920
+ className: "rounded-lg border border-border-subtle bg-bg-sunken p-4 space-y-3",
921
+ children: [
922
+ /* @__PURE__ */ H("p", {
923
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
924
+ children: s("devportal.revenueBreakdown", "Revenue Breakdown per Sale")
925
+ }),
926
+ /* @__PURE__ */ U("div", {
927
+ className: "space-y-2 text-sm",
928
+ children: [
929
+ /* @__PURE__ */ U("div", {
930
+ className: "flex items-center justify-between",
931
+ children: [/* @__PURE__ */ H("span", {
932
+ className: "text-text-secondary",
933
+ children: "Buyer pays"
934
+ }), /* @__PURE__ */ U("span", {
935
+ className: "font-medium tabular-nums",
936
+ children: [
937
+ D(y),
938
+ " ",
939
+ /* @__PURE__ */ U("span", {
940
+ className: "text-text-tertiary text-xs",
941
+ children: [
942
+ "(",
943
+ E(x),
944
+ ")"
945
+ ]
946
+ })
947
+ ]
948
+ })]
949
+ }),
950
+ /* @__PURE__ */ U("div", {
951
+ className: "flex items-center justify-between text-status-error-text",
952
+ children: [/* @__PURE__ */ U("span", { children: [
953
+ "Platform fee",
954
+ " ",
955
+ /* @__PURE__ */ U("span", {
956
+ className: "opacity-70",
957
+ children: [
958
+ "(",
959
+ (n * 100).toFixed(0),
960
+ "%)"
961
+ ]
962
+ })
963
+ ] }), /* @__PURE__ */ U("span", {
964
+ className: "tabular-nums",
965
+ children: [
966
+ "− ",
967
+ D(S),
968
+ " ",
969
+ /* @__PURE__ */ U("span", {
970
+ className: "text-xs opacity-70",
971
+ children: [
972
+ "(",
973
+ E(C),
974
+ ")"
975
+ ]
976
+ })
977
+ ]
978
+ })]
979
+ }),
980
+ /* @__PURE__ */ U("div", {
981
+ className: "flex items-center justify-between border-t border-border-subtle pt-2 font-semibold text-status-success-text",
982
+ children: [/* @__PURE__ */ H("span", { children: "You earn" }), /* @__PURE__ */ U("span", {
983
+ className: "tabular-nums",
984
+ children: [
985
+ D(w),
986
+ " ",
987
+ /* @__PURE__ */ U("span", {
988
+ className: "text-sm font-normal",
989
+ children: ["≈ ", E(ee)]
990
+ })
991
+ ]
992
+ })]
993
+ })
994
+ ]
995
+ }),
996
+ /* @__PURE__ */ H("p", {
997
+ className: "text-xs text-text-tertiary",
998
+ children: "Credits are deposited to your billing account on each sale. Cash withdrawal is subject to platform terms and minimum payout thresholds."
999
+ })
1000
+ ]
1001
+ }),
1002
+ !r && /* @__PURE__ */ U("div", {
1003
+ className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
1004
+ children: [/* @__PURE__ */ H(ce, {
1005
+ size: 16,
1006
+ className: "mt-0.5 shrink-0 text-status-warning-text"
1007
+ }), /* @__PURE__ */ U("div", {
1008
+ className: "flex-1 min-w-0",
1009
+ children: [
1010
+ /* @__PURE__ */ H("p", {
1011
+ className: "text-sm font-medium text-status-warning-text",
1012
+ children: s("devportal.billingAccountRequired", "Billing account required to publish")
1013
+ }),
1014
+ /* @__PURE__ */ H("p", {
1015
+ className: "mt-0.5 text-xs text-text-secondary",
1016
+ children: "Paid apps must have a billing account linked to your developer organization before you can submit for review. This is where your earned credits and cash withdrawals will be managed."
1017
+ }),
1018
+ i && /* @__PURE__ */ H("button", {
1019
+ type: "button",
1020
+ onClick: i,
1021
+ className: "mt-2 text-xs font-medium text-primary hover:underline underline-offset-2",
1022
+ children: s("devportal.goToRevenueBilling", "Go to Revenue & Billing →")
1023
+ })
1024
+ ]
1025
+ })]
1026
+ })
1027
+ ]
1028
+ })
1029
+ ]
1030
+ }),
1031
+ /* @__PURE__ */ U("div", {
1032
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
1033
+ children: [/* @__PURE__ */ H("h3", {
1034
+ className: "text-sm font-semibold",
1035
+ children: s("devportal.termsTitle", "Developer & Marketplace Terms")
1036
+ }), /* @__PURE__ */ U("ul", {
1037
+ className: "space-y-2 text-sm text-text-secondary",
1038
+ children: [
1039
+ /* @__PURE__ */ U("li", {
1040
+ className: "flex items-start gap-2",
1041
+ children: [/* @__PURE__ */ H(I, {
1042
+ size: 14,
1043
+ className: "mt-0.5 shrink-0 text-status-success-text"
1044
+ }), /* @__PURE__ */ U("span", { children: [
1045
+ "By publishing to the marketplace you agree to the",
1046
+ " ",
1047
+ /* @__PURE__ */ H("a", {
1048
+ href: "/legal/developer-terms",
1049
+ target: "_blank",
1050
+ rel: "noopener noreferrer",
1051
+ className: "text-primary underline-offset-2 hover:underline",
1052
+ children: "Developer Program Agreement"
1053
+ }),
1054
+ "."
1055
+ ] })]
1056
+ }),
1057
+ /* @__PURE__ */ U("li", {
1058
+ className: "flex items-start gap-2",
1059
+ children: [/* @__PURE__ */ H(I, {
1060
+ size: 14,
1061
+ className: "mt-0.5 shrink-0 text-status-success-text"
1062
+ }), /* @__PURE__ */ H("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
1063
+ }),
1064
+ /* @__PURE__ */ U("li", {
1065
+ className: "flex items-start gap-2",
1066
+ children: [/* @__PURE__ */ H(I, {
1067
+ size: 14,
1068
+ className: "mt-0.5 shrink-0 text-status-success-text"
1069
+ }), /* @__PURE__ */ H("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
1070
+ }),
1071
+ /* @__PURE__ */ U("li", {
1072
+ className: "flex items-start gap-2",
1073
+ children: [/* @__PURE__ */ H(I, {
1074
+ size: 14,
1075
+ className: "mt-0.5 shrink-0 text-status-success-text"
1076
+ }), /* @__PURE__ */ U("span", { children: [
1077
+ "The platform reserves the right to adjust the credit rate, fee structure, or payout schedule with 30 days notice. See the",
1078
+ " ",
1079
+ /* @__PURE__ */ H("a", {
1080
+ href: "/legal/marketplace-terms",
1081
+ target: "_blank",
1082
+ rel: "noopener noreferrer",
1083
+ className: "text-primary underline-offset-2 hover:underline",
1084
+ children: "Marketplace Terms"
1085
+ }),
1086
+ " ",
1087
+ "for full details."
1088
+ ] })]
1089
+ })
1090
+ ]
1091
+ })]
1092
+ }),
1093
+ /* @__PURE__ */ U("div", {
1094
+ className: "border-t border-border-subtle pt-6 space-y-4",
1095
+ children: [/* @__PURE__ */ H("button", {
1096
+ type: "button",
1097
+ onClick: () => void g(),
1098
+ disabled: d,
1099
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
1100
+ children: d ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(z, {
1101
+ size: 16,
1102
+ className: "animate-spin"
1103
+ }), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(L, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
1104
+ }), a && /* @__PURE__ */ U("div", {
1105
+ className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
1106
+ children: [/* @__PURE__ */ H(I, {
1107
+ size: 16,
1108
+ className: "mt-0.5 shrink-0 text-status-success-text"
1109
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
1110
+ className: "text-sm font-medium text-status-success-text",
1111
+ children: s("devportal.allSetToSubmit", "You're all set!")
1112
+ }), /* @__PURE__ */ H("p", {
1113
+ className: "mt-0.5 text-xs text-text-secondary",
1114
+ children: s("devportal.allSetDesc", "Store listing, versions, and pricing are complete. Head to the top of the page and click Submit for Review.")
1115
+ })] })]
1116
+ })]
1117
+ })
1118
+ ]
1119
+ });
1120
+ }, Ue = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
1121
+ let { t: o } = P(), s = (e, t) => {
1122
+ let n = o(e);
1123
+ return n === e ? t : n;
1124
+ }, { data: l, loading: u, error: d } = c({
1125
+ variables: { applicationId: e },
1126
+ fetchPolicy: "cache-and-network"
1127
+ });
1128
+ if (u) return /* @__PURE__ */ H(K, { message: s("devportal.loadingVersions", "Loading versions…") });
1129
+ if (d) return /* @__PURE__ */ H(Be, { message: d.message });
1130
+ let f = (l?.application?.versions?.edges ?? []).map((e) => e.node);
1131
+ return /* @__PURE__ */ U("div", {
1132
+ className: "space-y-4",
1133
+ children: [
1134
+ /* @__PURE__ */ U("div", {
1135
+ className: "flex items-center justify-between",
1136
+ children: [/* @__PURE__ */ U("p", {
1137
+ className: "text-sm text-text-secondary",
1138
+ children: [
1139
+ f.length,
1140
+ " ",
1141
+ f.length === 1 ? s("devportal.version", "version") : s("devportal.versions", "versions")
1142
+ ]
1143
+ }), /* @__PURE__ */ U("button", {
1144
+ onClick: () => n(`/apps/${e}/versions`),
1145
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
1146
+ children: [/* @__PURE__ */ H(B, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
1147
+ })]
1148
+ }),
1149
+ f.length > 0 ? /* @__PURE__ */ H("div", {
1150
+ className: "overflow-hidden rounded-lg border border-border-subtle",
1151
+ children: /* @__PURE__ */ U("table", {
1152
+ className: "w-full text-sm",
1153
+ children: [/* @__PURE__ */ H("thead", { children: /* @__PURE__ */ U("tr", {
1154
+ className: "border-b border-border-subtle bg-bg-sunken/50",
1155
+ children: [
1156
+ /* @__PURE__ */ H("th", {
1157
+ className: "px-4 py-3 text-left font-medium text-text-secondary",
1158
+ children: s("devportal.version", "Version")
1159
+ }),
1160
+ /* @__PURE__ */ H("th", {
1161
+ className: "px-4 py-3 text-left font-medium text-text-secondary",
1162
+ children: s("devportal.status", "Status")
1163
+ }),
1164
+ /* @__PURE__ */ H("th", {
1165
+ className: "px-4 py-3 text-left font-medium text-text-secondary",
1166
+ children: s("devportal.released", "Released")
1167
+ }),
1168
+ /* @__PURE__ */ H("th", {
1169
+ className: "px-4 py-3 text-left font-medium text-text-secondary",
1170
+ children: s("devportal.flags", "Flags")
1171
+ })
1172
+ ]
1173
+ }) }), /* @__PURE__ */ H("tbody", {
1174
+ className: "divide-y divide-border-subtle",
1175
+ children: f.map((e) => /* @__PURE__ */ U(V, { children: [
1176
+ /* @__PURE__ */ U("tr", {
1177
+ className: "hover:bg-bg-sunken/30 transition-colors",
1178
+ children: [
1179
+ /* @__PURE__ */ H("td", {
1180
+ className: "px-4 py-3 font-mono font-medium",
1181
+ children: e.version
1182
+ }),
1183
+ /* @__PURE__ */ H("td", {
1184
+ className: "px-4 py-3",
1185
+ children: /* @__PURE__ */ H("span", {
1186
+ className: t("inline-flex rounded-full px-2 py-0.5 text-xs font-medium", e.status === "published" ? "bg-status-success-bg-subtle text-status-success-text" : e.status === "pending_review" ? "bg-status-info-bg-subtle text-status-info-text" : e.status === "rejected" ? "bg-status-error-bg-subtle text-status-error-text" : e.status === "deprecated" ? "bg-bg-sunken text-text-secondary" : "bg-status-warning-bg-subtle text-status-warning-text"),
1187
+ children: e.status === "pending_review" ? "In Review" : e.status
1188
+ })
1189
+ }),
1190
+ /* @__PURE__ */ H("td", {
1191
+ className: "px-4 py-3 text-text-secondary",
1192
+ children: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : new Date(e.createdAt).toLocaleDateString()
1193
+ }),
1194
+ /* @__PURE__ */ H("td", {
1195
+ className: "px-4 py-3",
1196
+ children: /* @__PURE__ */ U("div", {
1197
+ className: "flex gap-1.5",
1198
+ children: [e.isLatest && /* @__PURE__ */ H("span", {
1199
+ className: "rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs text-primary font-medium",
1200
+ children: "latest"
1201
+ }), e.isStable && /* @__PURE__ */ H("span", {
1202
+ className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text font-medium",
1203
+ children: "stable"
1204
+ })]
1205
+ })
1206
+ })
1207
+ ]
1208
+ }, e.id),
1209
+ e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ H("tr", {
1210
+ className: "bg-status-error-bg-subtle/40",
1211
+ children: /* @__PURE__ */ H("td", {
1212
+ colSpan: 4,
1213
+ className: "px-4 py-2",
1214
+ children: /* @__PURE__ */ U("p", {
1215
+ className: "text-xs text-status-error-text",
1216
+ children: [/* @__PURE__ */ H("span", {
1217
+ className: "font-semibold",
1218
+ children: "Review feedback: "
1219
+ }), e.reviewNotes]
1220
+ })
1221
+ })
1222
+ }, `${e.id}-notes`),
1223
+ e.status === "pending_review" && /* @__PURE__ */ H("tr", {
1224
+ className: "bg-status-info-bg-subtle/30",
1225
+ children: /* @__PURE__ */ H("td", {
1226
+ colSpan: 4,
1227
+ className: "px-4 py-2",
1228
+ children: /* @__PURE__ */ H("p", {
1229
+ className: "text-xs text-status-info-text",
1230
+ children: "Submitted for platform review — you will be notified once approved or if changes are needed."
1231
+ })
1232
+ })
1233
+ }, `${e.id}-review`)
1234
+ ] }))
1235
+ })]
1236
+ })
1237
+ }) : /* @__PURE__ */ H(r, {
1238
+ illustration: "empty-generic",
1239
+ icon: /* @__PURE__ */ H(ye, { size: 32 }),
1240
+ title: s("devportal.noVersions", "No versions yet"),
1241
+ description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
1242
+ action: /* @__PURE__ */ U("button", {
1243
+ onClick: () => n(`/apps/${e}/versions`),
1244
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
1245
+ children: [/* @__PURE__ */ H(B, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
1246
+ })
1247
+ }),
1248
+ !i && a && /* @__PURE__ */ U("div", {
1249
+ className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
1250
+ children: [
1251
+ /* @__PURE__ */ H(L, {
1252
+ size: 16,
1253
+ className: "shrink-0 text-primary"
1254
+ }),
1255
+ /* @__PURE__ */ H("p", {
1256
+ className: "flex-1 text-sm text-text-secondary",
1257
+ children: s("devportal.versionsNextPricing", "You've got versions covered. Now set your pricing before you can submit.")
1258
+ }),
1259
+ /* @__PURE__ */ U("button", {
1260
+ type: "button",
1261
+ onClick: a,
1262
+ className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
1263
+ children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ H(de, { size: 15 })]
1264
+ })
1265
+ ]
1266
+ })
1267
+ ]
1268
+ });
1269
+ }, We = ({ appId: e, onNavigate: t }) => {
485
1270
  let { t: n } = P(), r = (e, t) => {
486
1271
  let r = n(e);
487
1272
  return r === e ? t : r;
488
- }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
489
- return a ? /* @__PURE__ */ K(ke, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ K(Ae, { message: o.message }) : /* @__PURE__ */ K(Z, {
1273
+ }, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
1274
+ return a ? /* @__PURE__ */ H(K, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ H(Be, { message: o.message }) : /* @__PURE__ */ H(Je, {
490
1275
  appId: e,
491
- webhooks: (i?.webhooks ?? []).map(Te),
1276
+ webhooks: (i?.webhooks ?? []).map(Ie),
492
1277
  onNavigate: t
493
1278
  });
494
- }, Me = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
1279
+ }, Ge = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
495
1280
  let { t: o } = P(), s = (e, t) => {
496
1281
  let n = o(e);
497
1282
  return n === e ? t : n;
498
- }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, x] = N(null), S = M(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Ee) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = M(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = j((e, t) => {
1283
+ }, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, x] = N(null), S = M(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Le) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = M(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), ee = C.some((e) => v.has(e.id)) && !T, E = j((e, t) => {
499
1284
  y((n) => {
500
1285
  let r = new Set(n);
501
1286
  return t ? r.add(e) : r.delete(e), r;
@@ -509,31 +1294,31 @@ var De = [
509
1294
  });
510
1295
  }, [C]), O = j(() => {
511
1296
  y(/* @__PURE__ */ new Set());
512
- }, []), te = j(async (e) => {
1297
+ }, []), k = j(async (e) => {
513
1298
  _(!0);
514
1299
  try {
515
- let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
1300
+ let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
516
1301
  x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
517
1302
  let n = new Set(t);
518
1303
  return e.forEach((e) => n.delete(e)), n;
519
- }), h([]), f();
1304
+ }), h([]), d();
520
1305
  } catch {} finally {
521
1306
  _(!1);
522
1307
  }
523
- }, [p, f]);
524
- return e ? l ? /* @__PURE__ */ K(ke, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ K(Ae, { message: u.message }) : /* @__PURE__ */ q(G, { children: [
525
- b && /* @__PURE__ */ K("div", {
1308
+ }, [f, d]);
1309
+ return e ? l ? /* @__PURE__ */ H(K, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ H(Be, { message: u.message }) : /* @__PURE__ */ U(V, { children: [
1310
+ b && /* @__PURE__ */ H("div", {
526
1311
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
527
- children: /* @__PURE__ */ q("div", {
1312
+ children: /* @__PURE__ */ U("div", {
528
1313
  className: "flex items-center justify-between gap-3",
529
- children: [/* @__PURE__ */ K("span", { children: b }), /* @__PURE__ */ K("button", {
1314
+ children: [/* @__PURE__ */ H("span", { children: b }), /* @__PURE__ */ H("button", {
530
1315
  onClick: () => x(null),
531
1316
  className: "text-status-success-text hover:text-status-success-text",
532
1317
  children: s("devportal.dismiss", "Dismiss")
533
1318
  })]
534
1319
  })
535
1320
  }),
536
- /* @__PURE__ */ K(Fe, {
1321
+ /* @__PURE__ */ H(Ye, {
537
1322
  appName: t,
538
1323
  delegations: S,
539
1324
  onGrantDelegation: n,
@@ -542,17 +1327,17 @@ var De = [
542
1327
  onToggleSelectDelegation: E,
543
1328
  onToggleAllDelegations: D,
544
1329
  onClearSelection: O,
545
- onRevokeSelected: () => h(ee.map((e) => e.id)),
546
- allVisibleSelected: w,
547
- partiallySelected: T
1330
+ onRevokeSelected: () => h(w.map((e) => e.id)),
1331
+ allVisibleSelected: T,
1332
+ partiallySelected: ee
548
1333
  }),
549
- /* @__PURE__ */ K(k, {
1334
+ /* @__PURE__ */ H(ne, {
550
1335
  open: m.length > 0,
551
1336
  onOpenChange: (e) => {
552
1337
  e || h([]);
553
1338
  },
554
1339
  onConfirm: () => {
555
- m.length > 0 && te(m);
1340
+ m.length > 0 && k(m);
556
1341
  },
557
1342
  title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
558
1343
  description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
@@ -561,18 +1346,18 @@ var De = [
561
1346
  variant: "destructive",
562
1347
  loading: g
563
1348
  })
564
- ] }) : /* @__PURE__ */ K(r, {
1349
+ ] }) : /* @__PURE__ */ H(r, {
565
1350
  illustration: "empty-generic",
566
- icon: /* @__PURE__ */ K(H, { size: 32 }),
1351
+ icon: /* @__PURE__ */ H(we, { size: 32 }),
567
1352
  title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
568
1353
  description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
569
- action: /* @__PURE__ */ q("button", {
1354
+ action: /* @__PURE__ */ U("button", {
570
1355
  onClick: () => a("/oauth"),
571
1356
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
572
- children: [/* @__PURE__ */ K(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
1357
+ children: [/* @__PURE__ */ H(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
573
1358
  })
574
1359
  });
575
- }, Ne = ({ appId: e }) => {
1360
+ }, Ke = ({ appId: e }) => {
576
1361
  let { t } = P(), n = (e, n) => {
577
1362
  let r = t(e);
578
1363
  return r === e ? n : r;
@@ -585,67 +1370,67 @@ var De = [
585
1370
  }, [r]).toISOString(),
586
1371
  endDate: r.toISOString()
587
1372
  } });
588
- return a ? /* @__PURE__ */ K(ke, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ K(Ae, { message: s.message }) : /* @__PURE__ */ K(Ie, { analytics: (i?.applicationAnalytics ?? []).map(Y) });
589
- }, Pe = ({ app: e }) => {
1373
+ return a ? /* @__PURE__ */ H(K, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ H(Be, { message: s.message }) : /* @__PURE__ */ H(Xe, { analytics: (i?.applicationAnalytics ?? []).map(G) });
1374
+ }, qe = ({ app: e }) => {
590
1375
  let { t } = P(), n = (e, n) => {
591
1376
  let r = t(e);
592
1377
  return r === e ? n : r;
593
1378
  };
594
- return /* @__PURE__ */ q("div", {
1379
+ return /* @__PURE__ */ U("div", {
595
1380
  className: "grid gap-6 lg:grid-cols-3",
596
- children: [/* @__PURE__ */ q("div", {
1381
+ children: [/* @__PURE__ */ U("div", {
597
1382
  className: "lg:col-span-2 space-y-6",
598
1383
  children: [
599
- /* @__PURE__ */ K(Se, { children: /* @__PURE__ */ q("div", {
1384
+ /* @__PURE__ */ H(W, { children: /* @__PURE__ */ U("div", {
600
1385
  className: "grid gap-4 sm:grid-cols-4",
601
1386
  children: [
602
- /* @__PURE__ */ K(Q, {
1387
+ /* @__PURE__ */ H(Q, {
603
1388
  label: n("devportal.totalInstalls", "Total Installs"),
604
1389
  value: e.installCount.toLocaleString()
605
1390
  }),
606
- /* @__PURE__ */ K(Q, {
1391
+ /* @__PURE__ */ H(Q, {
607
1392
  label: n("devportal.activeInstalls", "Active Installs"),
608
1393
  value: e.activeInstallCount.toLocaleString()
609
1394
  }),
610
- /* @__PURE__ */ K(Q, {
1395
+ /* @__PURE__ */ H(Q, {
611
1396
  label: n("devportal.averageRating", "Average Rating"),
612
1397
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
613
1398
  }),
614
- /* @__PURE__ */ K(Q, {
1399
+ /* @__PURE__ */ H(Q, {
615
1400
  label: n("devportal.reviews", "Reviews"),
616
1401
  value: e.reviewCount.toString()
617
1402
  })
618
1403
  ]
619
1404
  }) }),
620
- /* @__PURE__ */ K(_, {
1405
+ /* @__PURE__ */ H(y, {
621
1406
  title: n("devportal.description", "Description"),
622
- children: /* @__PURE__ */ K("div", {
1407
+ children: /* @__PURE__ */ H("div", {
623
1408
  className: "prose prose-sm max-w-none",
624
- children: /* @__PURE__ */ K("pre", {
1409
+ children: /* @__PURE__ */ H("pre", {
625
1410
  className: "whitespace-pre-wrap font-sans text-sm text-text-primary bg-transparent p-0 m-0",
626
1411
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
627
1412
  })
628
1413
  })
629
1414
  }),
630
- /* @__PURE__ */ K(_, {
1415
+ /* @__PURE__ */ H(y, {
631
1416
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
632
- children: /* @__PURE__ */ q("div", {
1417
+ children: /* @__PURE__ */ U("div", {
633
1418
  className: "space-y-3",
634
- children: [e.tags.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1419
+ children: [e.tags.length > 0 && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
635
1420
  className: "text-xs text-text-secondary mb-2",
636
1421
  children: n("devportal.tags", "Tags")
637
- }), /* @__PURE__ */ K("div", {
1422
+ }), /* @__PURE__ */ H("div", {
638
1423
  className: "flex flex-wrap gap-2",
639
- children: e.tags.map((e) => /* @__PURE__ */ K("span", {
1424
+ children: e.tags.map((e) => /* @__PURE__ */ H("span", {
640
1425
  className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
641
1426
  children: e
642
1427
  }, e))
643
- })] }), e.keywords.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1428
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
644
1429
  className: "text-xs text-text-secondary mb-2",
645
1430
  children: n("devportal.keywords", "Keywords")
646
- }), /* @__PURE__ */ K("div", {
1431
+ }), /* @__PURE__ */ H("div", {
647
1432
  className: "flex flex-wrap gap-2",
648
- children: e.keywords.map((e) => /* @__PURE__ */ K("span", {
1433
+ children: e.keywords.map((e) => /* @__PURE__ */ H("span", {
649
1434
  className: "rounded-full bg-bg-sunken px-3 py-1 text-xs",
650
1435
  children: e
651
1436
  }, e))
@@ -653,14 +1438,14 @@ var De = [
653
1438
  })
654
1439
  })
655
1440
  ]
656
- }), /* @__PURE__ */ q("div", {
1441
+ }), /* @__PURE__ */ U("div", {
657
1442
  className: "space-y-6",
658
- children: [/* @__PURE__ */ K(_, {
1443
+ children: [/* @__PURE__ */ H(y, {
659
1444
  title: n("devportal.details", "Details"),
660
- children: /* @__PURE__ */ K(T, { items: [
1445
+ children: /* @__PURE__ */ H(D, { items: [
661
1446
  {
662
1447
  label: n("devportal.appId", "App ID"),
663
- value: /* @__PURE__ */ K("code", {
1448
+ value: /* @__PURE__ */ H("code", {
664
1449
  className: "text-xs",
665
1450
  children: e.id
666
1451
  })
@@ -696,32 +1481,32 @@ var De = [
696
1481
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
697
1482
  }
698
1483
  ] })
699
- }), /* @__PURE__ */ K(_, {
1484
+ }), /* @__PURE__ */ H(y, {
700
1485
  title: n("devportal.links", "Links"),
701
- children: /* @__PURE__ */ q("div", {
1486
+ children: /* @__PURE__ */ U("div", {
702
1487
  className: "space-y-2",
703
1488
  children: [
704
- e.websiteUrl && /* @__PURE__ */ K($, {
1489
+ e.websiteUrl && /* @__PURE__ */ H($, {
705
1490
  label: n("devportal.website", "Website"),
706
1491
  url: e.websiteUrl
707
1492
  }),
708
- e.documentationUrl && /* @__PURE__ */ K($, {
1493
+ e.documentationUrl && /* @__PURE__ */ H($, {
709
1494
  label: n("devportal.documentation", "Documentation"),
710
1495
  url: e.documentationUrl
711
1496
  }),
712
- e.supportUrl && /* @__PURE__ */ K($, {
1497
+ e.supportUrl && /* @__PURE__ */ H($, {
713
1498
  label: n("devportal.support", "Support"),
714
1499
  url: e.supportUrl
715
1500
  }),
716
- e.githubUrl && /* @__PURE__ */ K($, {
1501
+ e.githubUrl && /* @__PURE__ */ H($, {
717
1502
  label: n("devportal.github", "GitHub"),
718
1503
  url: e.githubUrl
719
1504
  }),
720
- e.privacyPolicyUrl && /* @__PURE__ */ K($, {
1505
+ e.privacyPolicyUrl && /* @__PURE__ */ H($, {
721
1506
  label: n("devportal.privacyPolicy", "Privacy Policy"),
722
1507
  url: e.privacyPolicyUrl
723
1508
  }),
724
- e.termsOfServiceUrl && /* @__PURE__ */ K($, {
1509
+ e.termsOfServiceUrl && /* @__PURE__ */ H($, {
725
1510
  label: n("devportal.termsOfService", "Terms of Service"),
726
1511
  url: e.termsOfServiceUrl
727
1512
  })
@@ -730,16 +1515,16 @@ var De = [
730
1515
  })]
731
1516
  })]
732
1517
  });
733
- }, Z = ({ appId: e, webhooks: t, onNavigate: n }) => {
1518
+ }, Je = ({ appId: e, webhooks: t, onNavigate: n }) => {
734
1519
  let { t: i } = P(), a = (e, t) => {
735
1520
  let n = i(e);
736
1521
  return n === e ? t : n;
737
1522
  };
738
- return /* @__PURE__ */ q("div", {
1523
+ return /* @__PURE__ */ U("div", {
739
1524
  className: "space-y-6",
740
- children: [/* @__PURE__ */ q("div", {
1525
+ children: [/* @__PURE__ */ U("div", {
741
1526
  className: "flex items-center justify-between",
742
- children: [/* @__PURE__ */ q("p", {
1527
+ children: [/* @__PURE__ */ U("p", {
743
1528
  className: "text-sm text-text-secondary",
744
1529
  children: [
745
1530
  t.length,
@@ -748,81 +1533,81 @@ var De = [
748
1533
  " ",
749
1534
  a("devportal.configured", "configured")
750
1535
  ]
751
- }), /* @__PURE__ */ q("button", {
1536
+ }), /* @__PURE__ */ U("button", {
752
1537
  onClick: () => n(`/apps/${e}/webhooks/new`),
753
1538
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
754
- children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
1539
+ children: [/* @__PURE__ */ H(be, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
755
1540
  })]
756
- }), t.length > 0 ? /* @__PURE__ */ K("div", {
1541
+ }), t.length > 0 ? /* @__PURE__ */ H("div", {
757
1542
  className: "space-y-4",
758
- children: t.map((t) => /* @__PURE__ */ q("div", {
1543
+ children: t.map((t) => /* @__PURE__ */ U("div", {
759
1544
  className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
760
1545
  children: [
761
- /* @__PURE__ */ q("div", {
1546
+ /* @__PURE__ */ U("div", {
762
1547
  className: "flex items-start justify-between",
763
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("div", {
1548
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("div", {
764
1549
  className: "flex items-center gap-2",
765
- children: [/* @__PURE__ */ K("h3", {
1550
+ children: [/* @__PURE__ */ H("h3", {
766
1551
  className: "font-medium",
767
1552
  children: t.name
768
- }), /* @__PURE__ */ K(b, {
1553
+ }), /* @__PURE__ */ H(S, {
769
1554
  status: t.status,
770
1555
  type: "webhook"
771
1556
  })]
772
- }), t.description && /* @__PURE__ */ K("p", {
1557
+ }), t.description && /* @__PURE__ */ H("p", {
773
1558
  className: "text-sm text-text-secondary mt-1",
774
1559
  children: t.description
775
- })] }), /* @__PURE__ */ K("button", {
1560
+ })] }), /* @__PURE__ */ H("button", {
776
1561
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
777
1562
  className: "rounded-md p-1 hover:bg-bg-sunken",
778
- children: /* @__PURE__ */ K(de, { size: 20 })
1563
+ children: /* @__PURE__ */ H(ve, { size: 20 })
779
1564
  })]
780
1565
  }),
781
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1566
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
782
1567
  className: "text-xs text-text-secondary mb-1",
783
1568
  children: a("devportal.endpointUrl", "Endpoint URL")
784
- }), /* @__PURE__ */ K("code", {
1569
+ }), /* @__PURE__ */ H("code", {
785
1570
  className: "text-sm bg-bg-sunken px-2 py-1 rounded block truncate",
786
1571
  children: t.url
787
1572
  })] }),
788
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1573
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
789
1574
  className: "text-xs text-text-secondary mb-2",
790
1575
  children: a("devportal.events", "Events")
791
- }), /* @__PURE__ */ K("div", {
1576
+ }), /* @__PURE__ */ H("div", {
792
1577
  className: "flex flex-wrap gap-2",
793
- children: t.events.map((e) => /* @__PURE__ */ K("span", {
1578
+ children: t.events.map((e) => /* @__PURE__ */ H("span", {
794
1579
  className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs",
795
1580
  children: e
796
1581
  }, e))
797
1582
  })] }),
798
- /* @__PURE__ */ q("div", {
1583
+ /* @__PURE__ */ U("div", {
799
1584
  className: "grid gap-4 sm:grid-cols-4 text-sm",
800
1585
  children: [
801
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1586
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
802
1587
  className: "text-xs text-text-secondary",
803
1588
  children: a("devportal.success", "Success")
804
- }), /* @__PURE__ */ K("p", {
1589
+ }), /* @__PURE__ */ H("p", {
805
1590
  className: "font-medium text-status-success-text",
806
1591
  children: t.successCount.toLocaleString()
807
1592
  })] }),
808
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1593
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
809
1594
  className: "text-xs text-text-secondary",
810
1595
  children: a("devportal.failed", "Failed")
811
- }), /* @__PURE__ */ K("p", {
1596
+ }), /* @__PURE__ */ H("p", {
812
1597
  className: "font-medium text-status-error-text",
813
1598
  children: t.failureCount.toLocaleString()
814
1599
  })] }),
815
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1600
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
816
1601
  className: "text-xs text-text-secondary",
817
1602
  children: a("devportal.successRate", "Success Rate")
818
- }), /* @__PURE__ */ q("p", {
1603
+ }), /* @__PURE__ */ U("p", {
819
1604
  className: "font-medium",
820
1605
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
821
1606
  })] }),
822
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1607
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
823
1608
  className: "text-xs text-text-secondary",
824
1609
  children: a("devportal.lastTriggered", "Last Triggered")
825
- }), /* @__PURE__ */ K("p", {
1610
+ }), /* @__PURE__ */ H("p", {
826
1611
  className: "font-medium",
827
1612
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
828
1613
  })] })
@@ -830,29 +1615,29 @@ var De = [
830
1615
  })
831
1616
  ]
832
1617
  }, t.id))
833
- }) : /* @__PURE__ */ K(r, {
1618
+ }) : /* @__PURE__ */ H(r, {
834
1619
  illustration: "empty-notifications",
835
- icon: /* @__PURE__ */ K(ge, { size: 32 }),
1620
+ icon: /* @__PURE__ */ H(ke, { size: 32 }),
836
1621
  title: a("devportal.noWebhooks", "No webhooks"),
837
1622
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
838
- action: /* @__PURE__ */ q("button", {
1623
+ action: /* @__PURE__ */ U("button", {
839
1624
  onClick: () => n(`/apps/${e}/webhooks/new`),
840
1625
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
841
- children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
1626
+ children: [/* @__PURE__ */ H(be, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
842
1627
  })
843
1628
  })]
844
1629
  });
845
- }, Fe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
1630
+ }, Ye = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
846
1631
  let { t: p } = P(), m = (e, t) => {
847
1632
  let n = p(e);
848
1633
  return n === e ? t : n;
849
1634
  }, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
850
- return /* @__PURE__ */ q("div", {
1635
+ return /* @__PURE__ */ U("div", {
851
1636
  className: "space-y-6",
852
1637
  children: [
853
- /* @__PURE__ */ q("div", {
1638
+ /* @__PURE__ */ U("div", {
854
1639
  className: "flex items-center justify-between",
855
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("p", {
1640
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("p", {
856
1641
  className: "text-sm text-text-secondary",
857
1642
  children: [
858
1643
  n.length,
@@ -863,7 +1648,7 @@ var De = [
863
1648
  " ",
864
1649
  e
865
1650
  ]
866
- }), h.length > 0 && /* @__PURE__ */ q("p", {
1651
+ }), h.length > 0 && /* @__PURE__ */ U("p", {
867
1652
  className: "text-xs text-text-secondary mt-0.5",
868
1653
  children: [
869
1654
  h.length,
@@ -875,44 +1660,44 @@ var De = [
875
1660
  " ",
876
1661
  m("devportal.revokedExpired", "revoked/expired")
877
1662
  ]
878
- })] }), /* @__PURE__ */ q("button", {
1663
+ })] }), /* @__PURE__ */ U("button", {
879
1664
  onClick: i,
880
1665
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
881
- children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1666
+ children: [/* @__PURE__ */ H(be, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
882
1667
  })]
883
1668
  }),
884
- h.length > 0 && /* @__PURE__ */ K("div", {
1669
+ h.length > 0 && /* @__PURE__ */ H("div", {
885
1670
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
886
- children: /* @__PURE__ */ q("div", {
1671
+ children: /* @__PURE__ */ U("div", {
887
1672
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
888
- children: [/* @__PURE__ */ q("div", {
1673
+ children: [/* @__PURE__ */ U("div", {
889
1674
  className: "flex flex-wrap items-center gap-3",
890
- children: [/* @__PURE__ */ q("div", {
1675
+ children: [/* @__PURE__ */ U("div", {
891
1676
  className: "flex items-center gap-2",
892
- children: [/* @__PURE__ */ K(S, {
1677
+ children: [/* @__PURE__ */ H(w, {
893
1678
  checked: d,
894
1679
  indeterminate: f,
895
1680
  onChange: c,
896
1681
  ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
897
- }), /* @__PURE__ */ K("span", {
1682
+ }), /* @__PURE__ */ H("span", {
898
1683
  className: "text-sm font-medium",
899
1684
  children: m("devportal.selectAllActive", "Select all active")
900
1685
  })]
901
- }), o.size > 0 && /* @__PURE__ */ K("button", {
1686
+ }), o.size > 0 && /* @__PURE__ */ H("button", {
902
1687
  onClick: l,
903
1688
  className: "text-sm text-text-secondary hover:text-text-primary",
904
1689
  children: m("devportal.clearSelection", "Clear selection")
905
1690
  })]
906
- }), /* @__PURE__ */ q("div", {
1691
+ }), /* @__PURE__ */ U("div", {
907
1692
  className: "flex flex-wrap items-center gap-2",
908
- children: [/* @__PURE__ */ q("span", {
1693
+ children: [/* @__PURE__ */ U("span", {
909
1694
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
910
1695
  children: [
911
1696
  o.size,
912
1697
  " ",
913
1698
  m("devportal.selected", "selected")
914
1699
  ]
915
- }), /* @__PURE__ */ q("button", {
1700
+ }), /* @__PURE__ */ U("button", {
916
1701
  onClick: u,
917
1702
  disabled: o.size === 0,
918
1703
  className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
@@ -921,33 +1706,33 @@ var De = [
921
1706
  })]
922
1707
  })
923
1708
  }),
924
- n.length > 0 ? /* @__PURE__ */ K("div", {
1709
+ n.length > 0 ? /* @__PURE__ */ H("div", {
925
1710
  className: "space-y-4",
926
- children: n.map((e) => /* @__PURE__ */ q("div", {
1711
+ children: n.map((e) => /* @__PURE__ */ U("div", {
927
1712
  className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
928
1713
  children: [
929
- /* @__PURE__ */ q("div", {
1714
+ /* @__PURE__ */ U("div", {
930
1715
  className: "flex items-start justify-between",
931
- children: [/* @__PURE__ */ q("div", {
1716
+ children: [/* @__PURE__ */ U("div", {
932
1717
  className: "flex items-start gap-3",
933
- children: [e.status === "ACTIVE" && /* @__PURE__ */ K("div", {
1718
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ H("div", {
934
1719
  onClick: (e) => e.stopPropagation(),
935
- children: /* @__PURE__ */ K(S, {
1720
+ children: /* @__PURE__ */ H(w, {
936
1721
  checked: o.has(e.id),
937
1722
  onChange: (t) => s(e.id, t),
938
1723
  ariaLabel: `Select delegation ${e.id}`,
939
1724
  className: "mt-1"
940
1725
  })
941
- }), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("div", {
1726
+ }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("div", {
942
1727
  className: "flex items-center gap-2",
943
- children: [/* @__PURE__ */ q("h3", {
1728
+ children: [/* @__PURE__ */ U("h3", {
944
1729
  className: "font-medium",
945
1730
  children: ["Delegation #", e.id.slice(0, 8)]
946
- }), /* @__PURE__ */ K("span", {
947
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", Oe[e.status]),
1731
+ }), /* @__PURE__ */ H("span", {
1732
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", ze[e.status]),
948
1733
  children: e.status
949
1734
  })]
950
- }), /* @__PURE__ */ q("p", {
1735
+ }), /* @__PURE__ */ U("p", {
951
1736
  className: "text-sm text-text-secondary mt-1",
952
1737
  children: [
953
1738
  m("devportal.granted", "Granted"),
@@ -959,55 +1744,55 @@ var De = [
959
1744
  e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
960
1745
  ]
961
1746
  })] })]
962
- }), e.status === "ACTIVE" && /* @__PURE__ */ q("button", {
1747
+ }), e.status === "ACTIVE" && /* @__PURE__ */ U("button", {
963
1748
  onClick: () => a(e.id),
964
1749
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
965
- children: [/* @__PURE__ */ K(ve, { size: 14 }), m("devportal.revoke", "Revoke")]
1750
+ children: [/* @__PURE__ */ H(je, { size: 14 }), m("devportal.revoke", "Revoke")]
966
1751
  })]
967
1752
  }),
968
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1753
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
969
1754
  className: "text-xs text-text-secondary mb-2",
970
1755
  children: m("devportal.grantedScopes", "Granted Scopes")
971
- }), /* @__PURE__ */ K("div", {
1756
+ }), /* @__PURE__ */ H("div", {
972
1757
  className: "flex flex-wrap gap-2",
973
- children: e.scopes.map((e) => /* @__PURE__ */ K("span", {
1758
+ children: e.scopes.map((e) => /* @__PURE__ */ H("span", {
974
1759
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
975
1760
  children: e
976
1761
  }, e))
977
1762
  })] }),
978
- e.workspaceIds.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1763
+ e.workspaceIds.length > 0 && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
979
1764
  className: "text-xs text-text-secondary mb-2",
980
1765
  children: m("devportal.workspaceScope", "Workspace Scope")
981
- }), /* @__PURE__ */ K("div", {
1766
+ }), /* @__PURE__ */ H("div", {
982
1767
  className: "flex flex-wrap gap-2",
983
- children: e.workspaceIds.map((e) => /* @__PURE__ */ K("code", {
1768
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ H("code", {
984
1769
  className: "rounded bg-bg-sunken px-2 py-0.5 text-xs",
985
1770
  children: e
986
1771
  }, e))
987
1772
  })] }),
988
- /* @__PURE__ */ q("div", {
1773
+ /* @__PURE__ */ U("div", {
989
1774
  className: "flex items-center gap-4 text-xs text-text-secondary",
990
1775
  children: [
991
- e.expiresAt && /* @__PURE__ */ q("span", {
1776
+ e.expiresAt && /* @__PURE__ */ U("span", {
992
1777
  className: "flex items-center gap-1",
993
1778
  children: [
994
- /* @__PURE__ */ K(L, { size: 12 }),
1779
+ /* @__PURE__ */ H(fe, { size: 12 }),
995
1780
  m("devportal.expires", "Expires"),
996
1781
  " ",
997
1782
  new Date(e.expiresAt).toLocaleDateString()
998
1783
  ]
999
1784
  }),
1000
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ q("span", {
1785
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ U("span", {
1001
1786
  className: "flex items-center gap-1",
1002
- children: [/* @__PURE__ */ K(I, {
1787
+ children: [/* @__PURE__ */ H(ue, {
1003
1788
  size: 12,
1004
1789
  className: "text-status-success-text"
1005
1790
  }), m("devportal.noExpiration", "No expiration")]
1006
1791
  }),
1007
- e.revokedAt && /* @__PURE__ */ q("span", {
1792
+ e.revokedAt && /* @__PURE__ */ U("span", {
1008
1793
  className: "flex items-center gap-1",
1009
1794
  children: [
1010
- /* @__PURE__ */ K(ve, {
1795
+ /* @__PURE__ */ H(je, {
1011
1796
  size: 12,
1012
1797
  className: "text-status-error-text"
1013
1798
  }),
@@ -1020,53 +1805,53 @@ var De = [
1020
1805
  })
1021
1806
  ]
1022
1807
  }, e.id))
1023
- }) : /* @__PURE__ */ K(r, {
1808
+ }) : /* @__PURE__ */ H(r, {
1024
1809
  illustration: "empty-people",
1025
- icon: /* @__PURE__ */ K(W, { size: 32 }),
1810
+ icon: /* @__PURE__ */ H(De, { size: 32 }),
1026
1811
  title: m("devportal.noDelegations", "No delegations"),
1027
1812
  description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
1028
- action: /* @__PURE__ */ q("button", {
1813
+ action: /* @__PURE__ */ U("button", {
1029
1814
  onClick: i,
1030
1815
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
1031
- children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1816
+ children: [/* @__PURE__ */ H(be, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1032
1817
  })
1033
1818
  })
1034
1819
  ]
1035
1820
  });
1036
- }, Ie = ({ analytics: e }) => {
1821
+ }, Xe = ({ analytics: e }) => {
1037
1822
  let { t } = P(), n = (e, n) => {
1038
1823
  let r = t(e);
1039
1824
  return r === e ? n : r;
1040
1825
  }, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
1041
- return /* @__PURE__ */ q("div", {
1826
+ return /* @__PURE__ */ U("div", {
1042
1827
  className: "space-y-6",
1043
- children: [/* @__PURE__ */ q("div", {
1828
+ children: [/* @__PURE__ */ U("div", {
1044
1829
  className: "grid gap-4 sm:grid-cols-4",
1045
1830
  children: [
1046
- /* @__PURE__ */ K(Q, {
1831
+ /* @__PURE__ */ H(Q, {
1047
1832
  label: n("devportal.activeUsers", "Active Users"),
1048
1833
  value: i?.activeUsers.toLocaleString() || "0",
1049
1834
  trend: a ? o(i.activeUsers, a.activeUsers) : void 0
1050
1835
  }),
1051
- /* @__PURE__ */ K(Q, {
1836
+ /* @__PURE__ */ H(Q, {
1052
1837
  label: n("devportal.apiCalls", "API Calls"),
1053
1838
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
1054
1839
  trend: a ? o(i.apiCalls, a.apiCalls) : void 0
1055
1840
  }),
1056
- /* @__PURE__ */ K(Q, {
1841
+ /* @__PURE__ */ H(Q, {
1057
1842
  label: n("devportal.avgResponseTime", "Avg Response Time"),
1058
1843
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
1059
1844
  trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
1060
1845
  }),
1061
- /* @__PURE__ */ K(Q, {
1846
+ /* @__PURE__ */ H(Q, {
1062
1847
  label: n("devportal.errorRate", "Error Rate"),
1063
1848
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1064
1849
  trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
1065
1850
  })
1066
1851
  ]
1067
- }), /* @__PURE__ */ K(_, {
1852
+ }), /* @__PURE__ */ H(y, {
1068
1853
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1069
- children: e.length > 0 ? /* @__PURE__ */ K(w, {
1854
+ children: e.length > 0 ? /* @__PURE__ */ H(E, {
1070
1855
  data: e,
1071
1856
  keyField: "id",
1072
1857
  columns: [
@@ -1106,19 +1891,19 @@ var De = [
1106
1891
  render: (e) => e.sessions.toLocaleString()
1107
1892
  }
1108
1893
  ]
1109
- }) : /* @__PURE__ */ K(r, {
1894
+ }) : /* @__PURE__ */ H(r, {
1110
1895
  illustration: "empty-data",
1111
- icon: /* @__PURE__ */ K(F, { size: 32 }),
1896
+ icon: /* @__PURE__ */ H(F, { size: 32 }),
1112
1897
  title: n("devportal.noAnalyticsData", "No analytics data"),
1113
1898
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1114
1899
  })
1115
1900
  })]
1116
1901
  });
1117
- }, Le = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Re = ({ app: t }) => {
1902
+ }, Ze = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Qe = ({ app: t }) => {
1118
1903
  let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
1119
1904
  let n = a(e);
1120
1905
  return n === e ? t : n;
1121
- }, [s, c] = N(Le), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), x = j(async () => {
1906
+ }, [s, c] = N(Ze), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), x = j(async () => {
1122
1907
  m(!0), f("");
1123
1908
  try {
1124
1909
  let e = {};
@@ -1152,21 +1937,21 @@ var De = [
1152
1937
  ]), S = j(() => {
1153
1938
  i && v(i), b(!0);
1154
1939
  }, [i]);
1155
- return /* @__PURE__ */ q("div", {
1940
+ return /* @__PURE__ */ U("div", {
1156
1941
  className: "space-y-4",
1157
1942
  children: [
1158
- /* @__PURE__ */ q("div", {
1943
+ /* @__PURE__ */ U("div", {
1159
1944
  className: "flex items-center justify-between",
1160
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("h3", {
1945
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", {
1161
1946
  className: "text-lg font-semibold",
1162
1947
  children: o("devportal.apiPlayground", "API Playground")
1163
- }), /* @__PURE__ */ q("p", {
1948
+ }), /* @__PURE__ */ U("p", {
1164
1949
  className: "text-sm text-text-secondary",
1165
1950
  children: [
1166
1951
  o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1167
1952
  " ",
1168
- /* @__PURE__ */ K("strong", { children: t.name }),
1169
- t.appId && /* @__PURE__ */ q("span", {
1953
+ /* @__PURE__ */ H("strong", { children: t.name }),
1954
+ t.appId && /* @__PURE__ */ U("span", {
1170
1955
  className: "ml-1 text-xs text-text-secondary",
1171
1956
  children: [
1172
1957
  "(OAuth App: ",
@@ -1175,39 +1960,39 @@ var De = [
1175
1960
  ]
1176
1961
  })
1177
1962
  ]
1178
- })] }), /* @__PURE__ */ q("button", {
1963
+ })] }), /* @__PURE__ */ U("button", {
1179
1964
  onClick: S,
1180
1965
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1181
- children: [/* @__PURE__ */ K(z, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1966
+ children: [/* @__PURE__ */ H(_e, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1182
1967
  })]
1183
1968
  }),
1184
- y && /* @__PURE__ */ q("div", {
1969
+ y && /* @__PURE__ */ U("div", {
1185
1970
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1186
1971
  children: [
1187
- /* @__PURE__ */ K("p", {
1972
+ /* @__PURE__ */ H("p", {
1188
1973
  className: "font-medium text-status-info-text",
1189
1974
  children: o("devportal.authenticationGuide", "Authentication Guide")
1190
1975
  }),
1191
- /* @__PURE__ */ q("p", {
1976
+ /* @__PURE__ */ U("p", {
1192
1977
  className: "text-status-info-text",
1193
1978
  children: [
1194
1979
  o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1195
1980
  " ",
1196
- /* @__PURE__ */ K("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1981
+ /* @__PURE__ */ H("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1197
1982
  " ",
1198
1983
  o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1199
1984
  ]
1200
1985
  }),
1201
- /* @__PURE__ */ K("pre", {
1986
+ /* @__PURE__ */ H("pre", {
1202
1987
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1203
1988
  children: "mutation {\n authenticateApp(input: {\n clientId: \"<your-client-id>\"\n clientSecret: \"<your-client-secret>\"\n scopes: []\n }) {\n accessToken\n tokenType\n expiresIn\n }\n}"
1204
1989
  }),
1205
- /* @__PURE__ */ q("p", {
1990
+ /* @__PURE__ */ U("p", {
1206
1991
  className: "text-status-info-text",
1207
1992
  children: [
1208
1993
  o("devportal.useReturnedAccessToken", "Use the returned"),
1209
1994
  " ",
1210
- /* @__PURE__ */ K("code", {
1995
+ /* @__PURE__ */ H("code", {
1211
1996
  className: "bg-status-info-bg-subtle px-1 rounded",
1212
1997
  children: "accessToken"
1213
1998
  }),
@@ -1215,129 +2000,129 @@ var De = [
1215
2000
  o("devportal.asBearerToken", "as the Bearer token below.")
1216
2001
  ]
1217
2002
  }),
1218
- /* @__PURE__ */ K("button", {
2003
+ /* @__PURE__ */ H("button", {
1219
2004
  onClick: () => b(!1),
1220
2005
  className: "text-xs text-accent-blue hover:underline",
1221
2006
  children: o("devportal.dismiss", "Dismiss")
1222
2007
  })
1223
2008
  ]
1224
2009
  }),
1225
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
2010
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
1226
2011
  className: "block text-sm font-medium mb-1",
1227
2012
  children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
1228
- }), /* @__PURE__ */ q("div", {
2013
+ }), /* @__PURE__ */ U("div", {
1229
2014
  className: "flex gap-2",
1230
- children: [/* @__PURE__ */ K("input", {
2015
+ children: [/* @__PURE__ */ H("input", {
1231
2016
  type: "text",
1232
2017
  value: h,
1233
2018
  onChange: (e) => g(e.target.value),
1234
2019
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
1235
- }), /* @__PURE__ */ q("select", {
2020
+ }), /* @__PURE__ */ U("select", {
1236
2021
  onChange: (e) => g(e.target.value),
1237
2022
  className: "rounded-md border px-3 py-2 text-sm bg-bg-surface",
1238
2023
  value: h,
1239
- children: [/* @__PURE__ */ K("option", {
2024
+ children: [/* @__PURE__ */ H("option", {
1240
2025
  value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
1241
2026
  children: o("devportal.globalGateway", "Global Gateway")
1242
- }), /* @__PURE__ */ K("option", {
2027
+ }), /* @__PURE__ */ H("option", {
1243
2028
  value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
1244
2029
  children: o("devportal.workspaceGateway", "Workspace Gateway")
1245
2030
  })]
1246
2031
  })]
1247
2032
  })] }),
1248
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
2033
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
1249
2034
  className: "block text-sm font-medium mb-1",
1250
2035
  children: o("devportal.bearerToken", "Bearer Token")
1251
- }), /* @__PURE__ */ K("input", {
2036
+ }), /* @__PURE__ */ H("input", {
1252
2037
  type: "password",
1253
2038
  value: _,
1254
2039
  onChange: (e) => v(e.target.value),
1255
2040
  placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
1256
2041
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
1257
2042
  })] }),
1258
- /* @__PURE__ */ q("div", {
2043
+ /* @__PURE__ */ U("div", {
1259
2044
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1260
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
2045
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
1261
2046
  className: "block text-sm font-medium mb-1",
1262
2047
  children: o("devportal.query", "Query")
1263
- }), /* @__PURE__ */ K("textarea", {
2048
+ }), /* @__PURE__ */ H("textarea", {
1264
2049
  value: s,
1265
2050
  onChange: (e) => c(e.target.value),
1266
2051
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
1267
2052
  spellCheck: !1
1268
- })] }), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
2053
+ })] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
1269
2054
  className: "block text-sm font-medium mb-1",
1270
2055
  children: o("devportal.variablesJson", "Variables (JSON)")
1271
- }), /* @__PURE__ */ K("textarea", {
2056
+ }), /* @__PURE__ */ H("textarea", {
1272
2057
  value: l,
1273
2058
  onChange: (e) => u(e.target.value),
1274
2059
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
1275
2060
  spellCheck: !1
1276
2061
  })] })]
1277
2062
  }),
1278
- /* @__PURE__ */ q("button", {
2063
+ /* @__PURE__ */ U("button", {
1279
2064
  onClick: x,
1280
2065
  disabled: p,
1281
2066
  className: "flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
1282
- children: [p ? /* @__PURE__ */ K(B, {
2067
+ children: [p ? /* @__PURE__ */ H(z, {
1283
2068
  size: 16,
1284
2069
  className: "animate-spin"
1285
- }) : /* @__PURE__ */ K(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
2070
+ }) : /* @__PURE__ */ H(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1286
2071
  }),
1287
- d && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
2072
+ d && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
1288
2073
  className: "block text-sm font-medium mb-1",
1289
2074
  children: o("devportal.response", "Response")
1290
- }), /* @__PURE__ */ K("pre", {
2075
+ }), /* @__PURE__ */ H("pre", {
1291
2076
  className: "w-full max-h-96 overflow-auto rounded-md border bg-bg-sunken p-4 text-xs font-mono",
1292
2077
  children: d
1293
2078
  })] })
1294
2079
  ]
1295
2080
  });
1296
- }, ze = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1297
- let d = ae(null), f = j(async (e) => {
2081
+ }, $e = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
2082
+ let d = se(null), f = j(async (e) => {
1298
2083
  try {
1299
2084
  r((await s(e)).downloadUrl);
1300
2085
  } catch {}
1301
2086
  }, [s, r]);
1302
- return /* @__PURE__ */ q("div", {
2087
+ return /* @__PURE__ */ U("div", {
1303
2088
  className: "space-y-1.5",
1304
2089
  children: [
1305
- /* @__PURE__ */ K("label", {
2090
+ /* @__PURE__ */ H("label", {
1306
2091
  className: "text-sm font-medium",
1307
2092
  children: e
1308
2093
  }),
1309
- /* @__PURE__ */ q("div", {
2094
+ /* @__PURE__ */ U("div", {
1310
2095
  className: "flex gap-3 items-start",
1311
- children: [/* @__PURE__ */ q("div", {
2096
+ children: [/* @__PURE__ */ U("div", {
1312
2097
  className: t("relative shrink-0 w-20 rounded-lg border border-border-subtle bg-bg-sunken overflow-hidden flex items-center justify-center", o),
1313
- children: [n ? /* @__PURE__ */ K("img", {
2098
+ children: [n ? /* @__PURE__ */ H("img", {
1314
2099
  src: n,
1315
2100
  alt: e,
1316
2101
  className: "w-full h-full object-cover"
1317
- }) : /* @__PURE__ */ K(U, {
2102
+ }) : /* @__PURE__ */ H(B, {
1318
2103
  size: 18,
1319
2104
  className: "text-text-secondary opacity-40"
1320
- }), c && /* @__PURE__ */ q("div", {
2105
+ }), c && /* @__PURE__ */ U("div", {
1321
2106
  className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
1322
- children: [/* @__PURE__ */ K(B, {
2107
+ children: [/* @__PURE__ */ H(z, {
1323
2108
  size: 14,
1324
2109
  className: "animate-spin text-white"
1325
- }), /* @__PURE__ */ q("span", {
2110
+ }), /* @__PURE__ */ U("span", {
1326
2111
  className: "text-white text-xs",
1327
2112
  children: [l, "%"]
1328
2113
  })]
1329
2114
  })]
1330
- }), /* @__PURE__ */ q("div", {
2115
+ }), /* @__PURE__ */ U("div", {
1331
2116
  className: "flex-1 space-y-1.5",
1332
2117
  children: [
1333
- /* @__PURE__ */ K("input", {
2118
+ /* @__PURE__ */ H("input", {
1334
2119
  type: "url",
1335
2120
  value: n,
1336
2121
  onChange: (e) => r(e.target.value),
1337
2122
  placeholder: "https://...",
1338
2123
  className: "w-full rounded-md border border-border-subtle bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
1339
2124
  }),
1340
- /* @__PURE__ */ K("input", {
2125
+ /* @__PURE__ */ H("input", {
1341
2126
  ref: d,
1342
2127
  type: "file",
1343
2128
  accept: a,
@@ -1347,28 +2132,28 @@ var De = [
1347
2132
  t && f(t), e.target.value = "";
1348
2133
  }
1349
2134
  }),
1350
- /* @__PURE__ */ q("button", {
2135
+ /* @__PURE__ */ U("button", {
1351
2136
  type: "button",
1352
2137
  disabled: c,
1353
2138
  onClick: () => d.current?.click(),
1354
2139
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
1355
- children: [/* @__PURE__ */ K(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
2140
+ children: [/* @__PURE__ */ H(B, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1356
2141
  }),
1357
- u && /* @__PURE__ */ K("p", {
2142
+ u && /* @__PURE__ */ H("p", {
1358
2143
  className: "text-xs text-status-error-text",
1359
2144
  children: u
1360
2145
  })
1361
2146
  ]
1362
2147
  })]
1363
2148
  }),
1364
- i && /* @__PURE__ */ K("p", {
2149
+ i && /* @__PURE__ */ H("p", {
1365
2150
  className: "text-xs text-text-secondary",
1366
2151
  children: i
1367
2152
  })
1368
2153
  ]
1369
2154
  });
1370
- }, Be = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1371
- let s = ae(null), c = j(async (t) => {
2155
+ }, X = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
2156
+ let s = se(null), c = j(async (t) => {
1372
2157
  try {
1373
2158
  let i = await r(t);
1374
2159
  n([...e, i.downloadUrl]);
@@ -1380,45 +2165,51 @@ var De = [
1380
2165
  ]), l = (t) => {
1381
2166
  n(e.filter((e, n) => n !== t));
1382
2167
  };
1383
- return /* @__PURE__ */ q("div", {
2168
+ return /* @__PURE__ */ U("div", {
1384
2169
  className: "space-y-2",
1385
2170
  children: [
1386
- /* @__PURE__ */ K("label", {
1387
- className: "text-sm font-medium",
1388
- children: "Screenshots"
2171
+ /* @__PURE__ */ U("div", {
2172
+ className: "flex flex-col gap-0.5",
2173
+ children: [/* @__PURE__ */ H("label", {
2174
+ className: "text-sm font-medium",
2175
+ children: "Screenshots"
2176
+ }), /* @__PURE__ */ H("p", {
2177
+ className: "text-xs text-text-muted",
2178
+ children: "Shown in the horizontal preview strip below the hero — wide landscape proportions work best (16:9)"
2179
+ })]
1389
2180
  }),
1390
- /* @__PURE__ */ q("div", {
2181
+ /* @__PURE__ */ U("div", {
1391
2182
  className: "flex flex-wrap gap-3",
1392
- children: [e.map((e, t) => /* @__PURE__ */ q("div", {
2183
+ children: [e.map((e, t) => /* @__PURE__ */ U("div", {
1393
2184
  className: "relative group w-36 aspect-video rounded-lg border border-border-subtle overflow-hidden bg-bg-sunken",
1394
- children: [/* @__PURE__ */ K("img", {
2185
+ children: [/* @__PURE__ */ H("img", {
1395
2186
  src: e,
1396
2187
  alt: `Screenshot ${t + 1}`,
1397
2188
  className: "w-full h-full object-cover"
1398
- }), /* @__PURE__ */ K("button", {
2189
+ }), /* @__PURE__ */ H("button", {
1399
2190
  type: "button",
1400
2191
  onClick: () => l(t),
1401
2192
  className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
1402
- children: /* @__PURE__ */ K(_e, { size: 12 })
2193
+ children: /* @__PURE__ */ H(Ae, { size: 12 })
1403
2194
  })]
1404
- }, t)), /* @__PURE__ */ K("button", {
2195
+ }, t)), /* @__PURE__ */ H("button", {
1405
2196
  type: "button",
1406
2197
  disabled: i,
1407
2198
  onClick: () => s.current?.click(),
1408
2199
  className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
1409
- children: i ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
2200
+ children: i ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(z, {
1410
2201
  size: 18,
1411
2202
  className: "animate-spin text-primary"
1412
- }), /* @__PURE__ */ q("span", {
2203
+ }), /* @__PURE__ */ U("span", {
1413
2204
  className: "text-xs",
1414
2205
  children: [a, "%"]
1415
- })] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(U, { size: 18 }), /* @__PURE__ */ K("span", {
2206
+ })] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(B, { size: 18 }), /* @__PURE__ */ H("span", {
1416
2207
  className: "text-xs",
1417
2208
  children: "Add screenshot"
1418
2209
  })] })
1419
2210
  })]
1420
2211
  }),
1421
- /* @__PURE__ */ K("input", {
2212
+ /* @__PURE__ */ H("input", {
1422
2213
  ref: s,
1423
2214
  type: "file",
1424
2215
  accept: "image/png,image/jpeg,image/webp,image/gif",
@@ -1428,52 +2219,19 @@ var De = [
1428
2219
  t && c(t), e.target.value = "";
1429
2220
  }
1430
2221
  }),
1431
- o && /* @__PURE__ */ K("p", {
2222
+ o && /* @__PURE__ */ H("p", {
1432
2223
  className: "text-xs text-status-error-text",
1433
2224
  children: o
1434
2225
  })
1435
2226
  ]
1436
2227
  });
1437
- }, Ve = new Set(["workflow", "template"]), He = [{
2228
+ }, Z = new Set(["workflow", "template"]), et = [{
1438
2229
  value: "FREE",
1439
2230
  label: "Free"
1440
2231
  }, {
1441
2232
  value: "PAID",
1442
2233
  label: "Paid"
1443
- }], Ue = [
1444
- {
1445
- value: "USD",
1446
- label: "USD — US Dollar"
1447
- },
1448
- {
1449
- value: "EUR",
1450
- label: "EUR — Euro"
1451
- },
1452
- {
1453
- value: "GBP",
1454
- label: "GBP — British Pound"
1455
- },
1456
- {
1457
- value: "INR",
1458
- label: "INR — Indian Rupee"
1459
- },
1460
- {
1461
- value: "CAD",
1462
- label: "CAD — Canadian Dollar"
1463
- },
1464
- {
1465
- value: "AUD",
1466
- label: "AUD — Australian Dollar"
1467
- },
1468
- {
1469
- value: "SGD",
1470
- label: "SGD — Singapore Dollar"
1471
- },
1472
- {
1473
- value: "JPY",
1474
- label: "JPY — Japanese Yen"
1475
- }
1476
- ], We = {
2234
+ }], tt = {
1477
2235
  NODE: [
1478
2236
  {
1479
2237
  value: "node",
@@ -1545,30 +2303,27 @@ var De = [
1545
2303
  label: "Plugin"
1546
2304
  }
1547
2305
  ]
1548
- }, Ge = {
2306
+ }, nt = {
1549
2307
  NODE: "node",
1550
2308
  WORKFLOW: "workflow",
1551
2309
  APP: "app"
1552
2310
  };
1553
- function Ke(e) {
1554
- let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
2311
+ function rt(e) {
2312
+ let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
1555
2313
  return {
1556
2314
  iconUrl: e.iconUrl ?? "",
1557
2315
  bannerUrl: e.bannerUrl ?? "",
1558
2316
  videoUrl: e.videoUrl ?? "",
1559
2317
  shortDescription: e.shortDescription ?? "",
1560
2318
  description: e.description ?? "",
1561
- screenshotsText: s,
2319
+ screenshotsText: o,
1562
2320
  websiteUrl: e.websiteUrl ?? "",
1563
2321
  documentationUrl: e.documentationUrl ?? "",
1564
2322
  githubUrl: e.githubUrl ?? "",
1565
2323
  supportUrl: e.supportUrl ?? "",
1566
2324
  privacyPolicyUrl: e.privacyPolicyUrl ?? "",
1567
2325
  termsOfServiceUrl: e.termsOfServiceUrl ?? "",
1568
- pricingType: e.pricingType ?? "",
1569
- price: typeof o.price == "number" ? String(o.price) : "",
1570
- currency: typeof o.currency == "string" ? o.currency : "",
1571
- manifestItemType: typeof t.itemType == "string" ? t.itemType : Ge[e.appType] ?? "",
2326
+ manifestItemType: typeof t.itemType == "string" ? t.itemType : nt[e.appType] ?? "",
1572
2327
  manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
1573
2328
  manifestVersion: typeof n.version == "string" ? n.version : "",
1574
2329
  manifestInstallType: typeof r.type == "string" ? r.type : "zip",
@@ -1579,25 +2334,25 @@ function Ke(e) {
1579
2334
  manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1580
2335
  };
1581
2336
  }
1582
- var qe = ({ app: n, versionCount: r = 0 }) => {
1583
- let i = ye(), { workspacesGatewayUrl: a, authToken: o, workspaceId: s, getWorkspaceToken: c } = e(), { t: l } = P(), u = (e, t) => {
1584
- let n = l(e);
2337
+ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
2338
+ let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = P(), p = (e, t) => {
2339
+ let n = f(e);
1585
2340
  return n === e ? t : n;
1586
- }, d = n.appType === "NODE" || n.appType === "WORKFLOW", f = n.status !== "PUBLISHED" && (!d || r > 0), [m, g] = N(() => Ke(n)), [v, y] = N(!1), b = ae(n);
1587
- b.current = n;
1588
- let [x] = h(), [S, { loading: ee }] = p();
1589
- ie(() => {
1590
- g(Ke(b.current));
1591
- }, [n.id]);
1592
- let w = (e, t) => {
1593
- g((n) => ({
2341
+ }, [m, h] = N(() => rt(t)), [g, v] = N(!1), b = se(t);
2342
+ b.current = t;
2343
+ let [x] = _();
2344
+ oe(() => {
2345
+ h(rt(b.current));
2346
+ }, [t.id]);
2347
+ let S = (e, t) => {
2348
+ h((n) => ({
1594
2349
  ...n,
1595
2350
  [e]: t
1596
2351
  }));
1597
- }, T = async () => {
1598
- y(!0);
2352
+ }, C = async () => {
2353
+ v(!0);
1599
2354
  try {
1600
- let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Ve.has(m.manifestItemType), i = n.manifest ?? {}, a = {
2355
+ let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Z.has(m.manifestItemType), i = t.manifest ?? {}, a = {
1601
2356
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1602
2357
  itemType: m.manifestItemType || void 0,
1603
2358
  identity: {
@@ -1608,15 +2363,11 @@ var qe = ({ app: n, versionCount: r = 0 }) => {
1608
2363
  type: m.manifestInstallType,
1609
2364
  ...m.manifestInstallType === "zip" && m.manifestRegistryUrl ? { url: m.manifestRegistryUrl } : {}
1610
2365
  } } },
1611
- permissions: t,
2366
+ permissions: n,
1612
2367
  compatibility: { minPlatformVersion: m.manifestMinPlatformVersion }
1613
- }, o = { ...n.pricingDetails ?? {} };
1614
- if (m.pricingType !== "FREE") {
1615
- let e = parseFloat(m.price);
1616
- isNaN(e) || (o.price = e), m.currency && (o.currency = m.currency);
1617
- }
2368
+ };
1618
2369
  await x({ variables: {
1619
- id: n.id,
2370
+ id: t.id,
1620
2371
  input: {
1621
2372
  iconUrl: m.iconUrl || null,
1622
2373
  bannerUrl: m.bannerUrl || null,
@@ -1630,325 +2381,280 @@ var qe = ({ app: n, versionCount: r = 0 }) => {
1630
2381
  supportUrl: m.supportUrl || null,
1631
2382
  privacyPolicyUrl: m.privacyPolicyUrl || null,
1632
2383
  termsOfServiceUrl: m.termsOfServiceUrl || null,
1633
- pricingType: m.pricingType || null,
1634
- pricingDetails: Object.keys(o).length > 0 ? o : null,
1635
2384
  manifest: a
1636
2385
  }
1637
- } }), C("success");
2386
+ } }), T("success");
1638
2387
  } catch {
1639
- C("error");
2388
+ T("error");
1640
2389
  } finally {
1641
- y(!1);
1642
- }
1643
- }, k = async () => {
1644
- try {
1645
- await S({ variables: { id: n.id } }), C("success");
1646
- } catch {
1647
- C("error");
2390
+ v(!1);
1648
2391
  }
1649
- }, { upload: te, uploading: ne, progress: re, error: j } = A(a, o, s, c, "/DevPortal/Assets"), { upload: M, uploading: se, progress: F, error: ce } = A(a, o, s, c, "/DevPortal/Assets"), { upload: le, uploading: ue, progress: z, error: de } = A(a, o, s, c, "/DevPortal/Assets"), V = Ve.has(m.manifestItemType), fe = m.pricingType !== "FREE";
1650
- n.status;
1651
- let pe = n.status === "SUBMITTED", me = n.status === "PUBLISHED";
1652
- return /* @__PURE__ */ q("div", {
2392
+ }, { upload: w, uploading: ee, progress: E, error: D } = A(c, l, u, d, "/DevPortal/Assets"), { upload: ne, uploading: re, progress: ie, error: ae } = A(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: M, progress: le, error: F } = A(c, l, u, d, "/DevPortal/Assets"), I = Z.has(m.manifestItemType), L = t.status === "SUBMITTED";
2393
+ return /* @__PURE__ */ U("div", {
1653
2394
  className: "space-y-8 max-w-3xl",
1654
2395
  children: [
1655
- me ? /* @__PURE__ */ q("div", {
2396
+ t.status === "PUBLISHED" ? /* @__PURE__ */ U("div", {
1656
2397
  className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
1657
- children: [/* @__PURE__ */ K(I, {
2398
+ children: [/* @__PURE__ */ H(ue, {
1658
2399
  size: 16,
1659
2400
  className: "text-success mt-0.5 shrink-0"
1660
- }), /* @__PURE__ */ q("div", {
2401
+ }), /* @__PURE__ */ U("div", {
1661
2402
  className: "text-sm",
1662
- children: [/* @__PURE__ */ K("span", {
2403
+ children: [/* @__PURE__ */ H("span", {
1663
2404
  className: "font-medium text-success",
1664
- children: u("devportal.storeListing.published", "Published")
1665
- }), n.publishedAt && /* @__PURE__ */ q("span", {
2405
+ children: p("devportal.storeListing.published", "Published")
2406
+ }), t.publishedAt && /* @__PURE__ */ U("span", {
1666
2407
  className: "text-text-secondary ml-2",
1667
2408
  children: [
1668
- u("devportal.storeListing.since", "since"),
2409
+ p("devportal.storeListing.since", "since"),
1669
2410
  " ",
1670
- new Date(n.publishedAt).toLocaleDateString()
2411
+ new Date(t.publishedAt).toLocaleDateString()
1671
2412
  ]
1672
2413
  })]
1673
2414
  })]
1674
- }) : pe ? /* @__PURE__ */ q("div", {
2415
+ }) : L ? /* @__PURE__ */ U("div", {
1675
2416
  className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
1676
- children: [/* @__PURE__ */ q("div", {
2417
+ children: [/* @__PURE__ */ U("div", {
1677
2418
  className: "flex items-start gap-3",
1678
- children: [/* @__PURE__ */ K(L, {
2419
+ children: [/* @__PURE__ */ H(fe, {
1679
2420
  size: 16,
1680
2421
  className: "text-primary mt-0.5 shrink-0"
1681
- }), /* @__PURE__ */ q("div", {
2422
+ }), /* @__PURE__ */ U("div", {
1682
2423
  className: "text-sm",
1683
2424
  children: [
1684
- /* @__PURE__ */ K("span", {
2425
+ /* @__PURE__ */ H("span", {
1685
2426
  className: "font-medium text-primary",
1686
- children: u("devportal.storeListing.underReview", "Submitted for review")
2427
+ children: p("devportal.storeListing.underReview", "Submitted for review")
1687
2428
  }),
1688
- n.submittedAt && /* @__PURE__ */ K("span", {
2429
+ t.submittedAt && /* @__PURE__ */ H("span", {
1689
2430
  className: "text-text-secondary ml-2",
1690
- children: new Date(n.submittedAt).toLocaleDateString()
2431
+ children: new Date(t.submittedAt).toLocaleDateString()
1691
2432
  }),
1692
- n.reviewStatus && /* @__PURE__ */ q("span", {
2433
+ t.reviewStatus && /* @__PURE__ */ U("span", {
1693
2434
  className: "text-text-secondary ml-2",
1694
- children: ["· ", n.reviewStatus]
2435
+ children: ["· ", t.reviewStatus]
1695
2436
  })
1696
2437
  ]
1697
2438
  })]
1698
- }), /* @__PURE__ */ q("button", {
2439
+ }), s && /* @__PURE__ */ U("button", {
1699
2440
  type: "button",
1700
- onClick: () => i(`/apps/${n.id}/store-submission`),
2441
+ onClick: s,
1701
2442
  className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
1702
- children: [u("devportal.viewStatus", "View Status"), /* @__PURE__ */ K(R, { size: 12 })]
2443
+ children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ H(R, { size: 12 })]
1703
2444
  })]
1704
- }) : /* @__PURE__ */ q("div", {
2445
+ }) : /* @__PURE__ */ U("div", {
1705
2446
  className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
1706
- children: [/* @__PURE__ */ K(oe, {
2447
+ children: [/* @__PURE__ */ H(ce, {
1707
2448
  size: 16,
1708
2449
  className: "text-warning mt-0.5 shrink-0"
1709
- }), /* @__PURE__ */ q("div", {
2450
+ }), /* @__PURE__ */ U("div", {
1710
2451
  className: "text-sm",
1711
- children: [/* @__PURE__ */ K("span", {
2452
+ children: [/* @__PURE__ */ H("span", {
1712
2453
  className: "font-medium text-warning",
1713
- children: u("devportal.storeListing.draft", "Draft")
1714
- }), /* @__PURE__ */ K("span", {
2454
+ children: p("devportal.storeListing.draft", "Draft")
2455
+ }), /* @__PURE__ */ H("span", {
1715
2456
  className: "text-text-secondary ml-2",
1716
- children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
2457
+ children: p("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1717
2458
  })]
1718
2459
  })]
1719
2460
  }),
1720
- /* @__PURE__ */ K(_, {
1721
- title: u("devportal.package", "Package"),
1722
- description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1723
- children: /* @__PURE__ */ q("div", {
2461
+ /* @__PURE__ */ H(y, {
2462
+ title: p("devportal.package", "Package"),
2463
+ description: p("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
2464
+ children: /* @__PURE__ */ U("div", {
1724
2465
  className: "space-y-6",
1725
2466
  children: [
1726
- /* @__PURE__ */ K(D, {
1727
- label: u("devportal.storeItemType", "Item Type"),
2467
+ /* @__PURE__ */ H(k, {
2468
+ label: p("devportal.storeItemType", "Item Type"),
1728
2469
  value: m.manifestItemType,
1729
2470
  onChange: (e) => {
1730
2471
  let t = e.target.value;
1731
- w("manifestItemType", t), Ve.has(t) ? w("manifestInstallType", "json") : m.manifestInstallType === "json" && w("manifestInstallType", "zip");
2472
+ S("manifestItemType", t), Z.has(t) ? S("manifestInstallType", "json") : m.manifestInstallType === "json" && S("manifestInstallType", "zip");
1732
2473
  },
1733
- options: We[n.appType] ?? We.APP,
1734
- placeholder: u("devportal.selectItemType", "Select item type…"),
1735
- hint: u("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
2474
+ options: tt[t.appType] ?? tt.APP,
2475
+ placeholder: p("devportal.selectItemType", "Select item type…"),
2476
+ hint: p("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
1736
2477
  }),
1737
- /* @__PURE__ */ K(E, {
1738
- label: u("devportal.manifestDisplayName", "Display Name"),
2478
+ /* @__PURE__ */ H(O, {
2479
+ label: p("devportal.manifestDisplayName", "Display Name"),
1739
2480
  value: m.manifestDisplayName,
1740
- onChange: (e) => w("manifestDisplayName", e.target.value),
2481
+ onChange: (e) => S("manifestDisplayName", e.target.value),
1741
2482
  placeholder: "My Awesome Node"
1742
2483
  }),
1743
- V && n.appType !== "WORKFLOW" && /* @__PURE__ */ K(O, {
1744
- label: u("devportal.jsonContent", "Template Definition (JSON)"),
2484
+ I && t.appType !== "WORKFLOW" && /* @__PURE__ */ H(te, {
2485
+ label: p("devportal.jsonContent", "Template Definition (JSON)"),
1745
2486
  value: m.manifestJsonContent,
1746
- onChange: (e) => w("manifestJsonContent", e.target.value),
2487
+ onChange: (e) => S("manifestJsonContent", e.target.value),
1747
2488
  rows: 12,
1748
2489
  placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1749
- hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
2490
+ hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1750
2491
  }),
1751
- V && n.appType === "WORKFLOW" && /* @__PURE__ */ q("p", {
2492
+ I && t.appType === "WORKFLOW" && /* @__PURE__ */ U("p", {
1752
2493
  className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
1753
2494
  children: [
1754
2495
  "The Workflow Definition (JSON) is set per version. Go to the",
1755
2496
  " ",
1756
- /* @__PURE__ */ K("strong", { children: "Versions" }),
2497
+ /* @__PURE__ */ H("strong", { children: "Versions" }),
1757
2498
  " tab to add or update it."
1758
2499
  ]
1759
2500
  })
1760
2501
  ]
1761
2502
  })
1762
2503
  }),
1763
- /* @__PURE__ */ K(_, {
1764
- title: u("devportal.storePresentation", "Store Presence"),
1765
- description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
1766
- children: /* @__PURE__ */ q("div", {
2504
+ /* @__PURE__ */ H(y, {
2505
+ title: p("devportal.storePresentation", "Store Presence"),
2506
+ description: p("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
2507
+ children: /* @__PURE__ */ U("div", {
1767
2508
  className: "space-y-5",
1768
2509
  children: [
1769
- /* @__PURE__ */ q("div", {
2510
+ /* @__PURE__ */ U("div", {
1770
2511
  className: "grid gap-5 sm:grid-cols-2",
1771
- children: [/* @__PURE__ */ K(ze, {
1772
- label: u("devportal.iconUrl", "Icon"),
2512
+ children: [/* @__PURE__ */ H($e, {
2513
+ label: p("devportal.iconUrl", "Icon"),
1773
2514
  value: m.iconUrl,
1774
- onChange: (e) => w("iconUrl", e),
1775
- hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
2515
+ onChange: (e) => S("iconUrl", e),
2516
+ hint: p("devportal.iconUrlHint", "Shown in marketplace cards and search — square proportions (1:1)"),
1776
2517
  aspectClass: "aspect-square",
1777
- upload: te,
1778
- uploading: ne,
1779
- progress: re,
1780
- error: j
1781
- }), /* @__PURE__ */ K(ze, {
1782
- label: u("devportal.bannerUrl", "Banner"),
2518
+ upload: w,
2519
+ uploading: ee,
2520
+ progress: E,
2521
+ error: D
2522
+ }), /* @__PURE__ */ H($e, {
2523
+ label: p("devportal.bannerUrl", "Banner"),
1783
2524
  value: m.bannerUrl,
1784
- onChange: (e) => w("bannerUrl", e),
1785
- hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
1786
- aspectClass: "aspect-video",
1787
- upload: M,
1788
- uploading: se,
1789
- progress: F,
1790
- error: ce
2525
+ onChange: (e) => S("bannerUrl", e),
2526
+ hint: p("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
2527
+ aspectClass: "aspect-square",
2528
+ upload: ne,
2529
+ uploading: re,
2530
+ progress: ie,
2531
+ error: ae
1791
2532
  })]
1792
2533
  }),
1793
- /* @__PURE__ */ K(E, {
1794
- label: u("devportal.videoUrl", "Demo Video URL"),
2534
+ /* @__PURE__ */ H(O, {
2535
+ label: p("devportal.videoUrl", "Demo Video URL"),
1795
2536
  value: m.videoUrl,
1796
- onChange: (e) => w("videoUrl", e.target.value),
2537
+ onChange: (e) => S("videoUrl", e.target.value),
1797
2538
  placeholder: "https://...",
1798
- hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
2539
+ hint: p("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
1799
2540
  }),
1800
- /* @__PURE__ */ K(O, {
1801
- label: u("devportal.shortDescription", "Short Description"),
2541
+ /* @__PURE__ */ H(te, {
2542
+ label: p("devportal.shortDescription", "Short Description"),
1802
2543
  value: m.shortDescription,
1803
- onChange: (e) => w("shortDescription", e.target.value),
2544
+ onChange: (e) => S("shortDescription", e.target.value),
1804
2545
  maxLength: 200,
1805
2546
  rows: 2,
1806
- hint: `${m.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
2547
+ hint: `${m.shortDescription.length}/200 · ${p("devportal.shortDescHint", "Shown in search results and cards")}`
1807
2548
  }),
1808
- /* @__PURE__ */ K(O, {
1809
- label: u("devportal.longDescription", "Full Description"),
2549
+ /* @__PURE__ */ H(te, {
2550
+ label: p("devportal.longDescription", "Full Description"),
1810
2551
  value: m.description,
1811
- onChange: (e) => w("description", e.target.value),
2552
+ onChange: (e) => S("description", e.target.value),
1812
2553
  rows: 5,
1813
- hint: u("devportal.fullDescHint", "Markdown supported")
2554
+ hint: p("devportal.fullDescHint", "Markdown supported")
1814
2555
  }),
1815
- /* @__PURE__ */ K(Be, {
2556
+ /* @__PURE__ */ H(X, {
1816
2557
  urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
1817
- onChange: (e) => w("screenshotsText", e.join("\n")),
1818
- upload: le,
1819
- uploading: ue,
1820
- progress: z,
1821
- error: de
2558
+ onChange: (e) => S("screenshotsText", e.join("\n")),
2559
+ upload: j,
2560
+ uploading: M,
2561
+ progress: le,
2562
+ error: F
1822
2563
  })
1823
2564
  ]
1824
2565
  })
1825
2566
  }),
1826
- /* @__PURE__ */ K(_, {
1827
- title: u("devportal.linksPolicies", "Links & Policies"),
1828
- description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
1829
- children: /* @__PURE__ */ q("div", {
2567
+ /* @__PURE__ */ H(y, {
2568
+ title: p("devportal.linksPolicies", "Links & Policies"),
2569
+ description: p("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
2570
+ children: /* @__PURE__ */ U("div", {
1830
2571
  className: "grid gap-4 sm:grid-cols-2",
1831
2572
  children: [
1832
- /* @__PURE__ */ K(E, {
1833
- label: u("devportal.websiteUrl", "Website"),
2573
+ /* @__PURE__ */ H(O, {
2574
+ label: p("devportal.websiteUrl", "Website"),
1834
2575
  value: m.websiteUrl,
1835
- onChange: (e) => w("websiteUrl", e.target.value),
2576
+ onChange: (e) => S("websiteUrl", e.target.value),
1836
2577
  placeholder: "https://..."
1837
2578
  }),
1838
- /* @__PURE__ */ K(E, {
1839
- label: u("devportal.documentationUrl", "Documentation"),
2579
+ /* @__PURE__ */ H(O, {
2580
+ label: p("devportal.documentationUrl", "Documentation"),
1840
2581
  value: m.documentationUrl,
1841
- onChange: (e) => w("documentationUrl", e.target.value),
2582
+ onChange: (e) => S("documentationUrl", e.target.value),
1842
2583
  placeholder: "https://..."
1843
2584
  }),
1844
- /* @__PURE__ */ K(E, {
1845
- label: u("devportal.githubUrl", "GitHub"),
2585
+ /* @__PURE__ */ H(O, {
2586
+ label: p("devportal.githubUrl", "GitHub"),
1846
2587
  value: m.githubUrl,
1847
- onChange: (e) => w("githubUrl", e.target.value),
2588
+ onChange: (e) => S("githubUrl", e.target.value),
1848
2589
  placeholder: "https://github.com/..."
1849
2590
  }),
1850
- /* @__PURE__ */ K(E, {
1851
- label: u("devportal.supportUrl", "Support"),
2591
+ /* @__PURE__ */ H(O, {
2592
+ label: p("devportal.supportUrl", "Support"),
1852
2593
  value: m.supportUrl,
1853
- onChange: (e) => w("supportUrl", e.target.value),
2594
+ onChange: (e) => S("supportUrl", e.target.value),
1854
2595
  placeholder: "https://..."
1855
2596
  }),
1856
- /* @__PURE__ */ K(E, {
1857
- label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
2597
+ /* @__PURE__ */ H(O, {
2598
+ label: `${p("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
1858
2599
  value: m.privacyPolicyUrl,
1859
- onChange: (e) => w("privacyPolicyUrl", e.target.value),
2600
+ onChange: (e) => S("privacyPolicyUrl", e.target.value),
1860
2601
  placeholder: "https://...",
1861
- hint: u("devportal.requiredForStore", "Required for store submission")
2602
+ hint: p("devportal.requiredForStore", "Required for store submission")
1862
2603
  }),
1863
- /* @__PURE__ */ K(E, {
1864
- label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
2604
+ /* @__PURE__ */ H(O, {
2605
+ label: `${p("devportal.termsOfServiceUrl", "Terms of Service")} *`,
1865
2606
  value: m.termsOfServiceUrl,
1866
- onChange: (e) => w("termsOfServiceUrl", e.target.value),
2607
+ onChange: (e) => S("termsOfServiceUrl", e.target.value),
1867
2608
  placeholder: "https://...",
1868
- hint: u("devportal.requiredForStore", "Required for store submission")
2609
+ hint: p("devportal.requiredForStore", "Required for store submission")
1869
2610
  })
1870
2611
  ]
1871
2612
  })
1872
2613
  }),
1873
- /* @__PURE__ */ K(_, {
1874
- title: u("devportal.pricing", "Pricing"),
1875
- description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
1876
- children: /* @__PURE__ */ q("div", {
1877
- className: "space-y-4",
1878
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
1879
- className: "mb-2 block text-sm font-medium",
1880
- children: u("devportal.pricingType", "Pricing Type")
1881
- }), /* @__PURE__ */ K("div", {
1882
- className: "flex flex-wrap gap-2",
1883
- children: He.map((e) => /* @__PURE__ */ K("button", {
1884
- type: "button",
1885
- onClick: () => w("pricingType", e.value),
1886
- className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", m.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken"),
1887
- children: e.label
1888
- }, e.value))
1889
- })] }), fe && /* @__PURE__ */ q("div", {
1890
- className: "grid gap-4 sm:grid-cols-2",
1891
- children: [/* @__PURE__ */ K(E, {
1892
- label: u("devportal.price", "Price"),
1893
- type: "number",
1894
- value: m.price,
1895
- onChange: (e) => w("price", e.target.value),
1896
- placeholder: "0.00"
1897
- }), /* @__PURE__ */ K(D, {
1898
- label: u("devportal.currency", "Currency"),
1899
- value: m.currency,
1900
- onChange: (e) => w("currency", e.target.value),
1901
- options: Ue,
1902
- placeholder: u("devportal.selectCurrency", "Select currency…")
1903
- })]
1904
- })]
1905
- })
1906
- }),
1907
- /* @__PURE__ */ q("div", {
1908
- className: "border-t pt-6 flex items-center gap-3 flex-wrap",
1909
- children: [/* @__PURE__ */ K("button", {
1910
- type: "button",
1911
- onClick: T,
1912
- disabled: v,
1913
- className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
1914
- children: v ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
1915
- size: 16,
1916
- className: "animate-spin"
1917
- }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(he, { size: 16 }), u("devportal.saveStoreListing", "Save Store Listing")] })
1918
- }), !me && /* @__PURE__ */ q("div", {
1919
- className: "flex flex-col gap-1",
1920
- children: [/* @__PURE__ */ K("button", {
2614
+ /* @__PURE__ */ U("div", {
2615
+ className: "border-t pt-6 flex flex-wrap items-center gap-3",
2616
+ children: [
2617
+ /* @__PURE__ */ H("button", {
1921
2618
  type: "button",
1922
- onClick: () => void k(),
1923
- disabled: ee || v || !f,
1924
- className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-action-primary-bg/5 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
1925
- children: ee ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
2619
+ onClick: C,
2620
+ disabled: g,
2621
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
2622
+ children: g ? /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(z, {
1926
2623
  size: 16,
1927
2624
  className: "animate-spin"
1928
- }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(I, { size: 16 }), pe ? u("devportal.resubmitForReview", "Resubmit for Review") : u("devportal.submitForReview", "Submit for Review")] })
1929
- }), !f && d && /* @__PURE__ */ K("p", {
1930
- className: "text-xs text-text-secondary",
1931
- children: u("devportal.versionRequiredHint", "At least one version is required before submitting for review.")
1932
- })]
1933
- })]
2625
+ }), p("devportal.saving", "Saving…")] }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Te, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] })
2626
+ }),
2627
+ r && n === 0 && a && /* @__PURE__ */ U("button", {
2628
+ type: "button",
2629
+ onClick: a,
2630
+ className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
2631
+ children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ H(de, { size: 15 })]
2632
+ }),
2633
+ (!r || n > 0) && !i && o && /* @__PURE__ */ U("button", {
2634
+ type: "button",
2635
+ onClick: o,
2636
+ className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
2637
+ children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ H(de, { size: 15 })]
2638
+ })
2639
+ ]
1934
2640
  })
1935
2641
  ]
1936
2642
  });
1937
2643
  }, Q = ({ label: e, value: n, trend: r }) => {
1938
2644
  let { t: i } = P();
1939
- return /* @__PURE__ */ q(J, {
2645
+ return /* @__PURE__ */ U(Pe, {
1940
2646
  treatment: "metric",
1941
2647
  className: "p-4",
1942
2648
  children: [
1943
- /* @__PURE__ */ K("p", {
2649
+ /* @__PURE__ */ H("p", {
1944
2650
  className: "text-sm text-text-secondary",
1945
2651
  children: e
1946
2652
  }),
1947
- /* @__PURE__ */ K("p", {
2653
+ /* @__PURE__ */ H("p", {
1948
2654
  className: "text-2xl font-bold tabular-nums",
1949
2655
  children: n
1950
2656
  }),
1951
- r !== void 0 && /* @__PURE__ */ q("p", {
2657
+ r !== void 0 && /* @__PURE__ */ U("p", {
1952
2658
  className: t("text-xs mt-1 tabular-nums", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-text-secondary"),
1953
2659
  children: [
1954
2660
  r > 0 ? "+" : "",
@@ -1962,13 +2668,13 @@ var qe = ({ app: n, versionCount: r = 0 }) => {
1962
2668
  })
1963
2669
  ]
1964
2670
  });
1965
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ q("a", {
2671
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ U("a", {
1966
2672
  href: t,
1967
2673
  target: "_blank",
1968
2674
  rel: "noopener noreferrer",
1969
2675
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
1970
- children: [/* @__PURE__ */ K(R, { size: 14 }), e]
1971
- }), Je = [
2676
+ children: [/* @__PURE__ */ H(R, { size: 14 }), e]
2677
+ }), at = [
1972
2678
  {
1973
2679
  id: "auth",
1974
2680
  label: "Authentication",
@@ -2040,14 +2746,14 @@ var qe = ({ app: n, versionCount: r = 0 }) => {
2040
2746
  description: "Access control configuration"
2041
2747
  }
2042
2748
  ];
2043
- function Ye(e) {
2044
- let t = Object.fromEntries(Je.map((e) => [e.id, "none"]));
2749
+ function ot(e) {
2750
+ let t = Object.fromEntries(at.map((e) => [e.id, "none"]));
2045
2751
  if (!e || !Array.isArray(e.permissions)) return t;
2046
2752
  for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
2047
2753
  return t;
2048
2754
  }
2049
- var Xe = ({ app: e }) => {
2050
- let t = e.manifest ?? {}, [n, r] = N(() => Ye(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = h(), l = (e, t) => {
2755
+ var st = ({ app: e }) => {
2756
+ let t = e.manifest ?? {}, [n, r] = N(() => ot(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = _(), l = (e, t) => {
2051
2757
  s(!1), r((n) => ({
2052
2758
  ...n,
2053
2759
  [e]: t
@@ -2078,41 +2784,41 @@ var Xe = ({ app: e }) => {
2078
2784
  "read",
2079
2785
  "write"
2080
2786
  ];
2081
- return /* @__PURE__ */ K(_, {
2787
+ return /* @__PURE__ */ H(y, {
2082
2788
  title: "Permissions",
2083
2789
  description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
2084
- children: /* @__PURE__ */ q("div", {
2790
+ children: /* @__PURE__ */ U("div", {
2085
2791
  className: "space-y-4",
2086
2792
  children: [
2087
- /* @__PURE__ */ K("div", {
2793
+ /* @__PURE__ */ H("div", {
2088
2794
  className: "overflow-x-auto rounded-lg border border-border-subtle",
2089
- children: /* @__PURE__ */ q("table", {
2795
+ children: /* @__PURE__ */ U("table", {
2090
2796
  className: "w-full text-sm",
2091
- children: [/* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", {
2797
+ children: [/* @__PURE__ */ H("thead", { children: /* @__PURE__ */ U("tr", {
2092
2798
  className: "border-b border-border-subtle bg-bg-sunken/50",
2093
- children: [/* @__PURE__ */ K("th", {
2799
+ children: [/* @__PURE__ */ H("th", {
2094
2800
  className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
2095
2801
  children: "Resource"
2096
- }), f.map((e) => /* @__PURE__ */ K("th", {
2802
+ }), f.map((e) => /* @__PURE__ */ H("th", {
2097
2803
  className: "px-4 py-3 text-center font-medium text-text-secondary",
2098
2804
  children: d[e]
2099
2805
  }, e))]
2100
- }) }), /* @__PURE__ */ K("tbody", {
2806
+ }) }), /* @__PURE__ */ H("tbody", {
2101
2807
  className: "divide-y divide-border",
2102
- children: Je.map((e) => /* @__PURE__ */ q("tr", {
2808
+ children: at.map((e) => /* @__PURE__ */ U("tr", {
2103
2809
  className: "hover:bg-bg-sunken/30 transition-colors",
2104
- children: [/* @__PURE__ */ q("td", {
2810
+ children: [/* @__PURE__ */ U("td", {
2105
2811
  className: "px-4 py-3",
2106
- children: [/* @__PURE__ */ K("p", {
2812
+ children: [/* @__PURE__ */ H("p", {
2107
2813
  className: "font-medium text-text-primary",
2108
2814
  children: e.label
2109
- }), /* @__PURE__ */ K("p", {
2815
+ }), /* @__PURE__ */ H("p", {
2110
2816
  className: "text-xs text-text-secondary",
2111
2817
  children: e.description
2112
2818
  })]
2113
- }), f.map((t) => /* @__PURE__ */ K("td", {
2819
+ }), f.map((t) => /* @__PURE__ */ H("td", {
2114
2820
  className: "px-4 py-3 text-center",
2115
- children: /* @__PURE__ */ K("input", {
2821
+ children: /* @__PURE__ */ H("input", {
2116
2822
  type: "radio",
2117
2823
  name: `perm-${e.id}`,
2118
2824
  value: t,
@@ -2125,27 +2831,27 @@ var Xe = ({ app: e }) => {
2125
2831
  })]
2126
2832
  })
2127
2833
  }),
2128
- /* @__PURE__ */ q("div", {
2834
+ /* @__PURE__ */ U("div", {
2129
2835
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
2130
- children: [/* @__PURE__ */ K(ue, {
2836
+ children: [/* @__PURE__ */ H(ge, {
2131
2837
  size: 14,
2132
2838
  className: "flex-shrink-0 mt-0.5"
2133
- }), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ K("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2839
+ }), /* @__PURE__ */ U("span", { children: [/* @__PURE__ */ H("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2134
2840
  }),
2135
- /* @__PURE__ */ q("div", {
2841
+ /* @__PURE__ */ U("div", {
2136
2842
  className: "flex items-center justify-end gap-3",
2137
- children: [o && /* @__PURE__ */ q("span", {
2843
+ children: [o && /* @__PURE__ */ U("span", {
2138
2844
  className: "flex items-center gap-1.5 text-sm text-status-success-text",
2139
- children: [/* @__PURE__ */ K(I, { size: 14 }), "Saved"]
2140
- }), /* @__PURE__ */ q("button", {
2845
+ children: [/* @__PURE__ */ H(ue, { size: 14 }), "Saved"]
2846
+ }), /* @__PURE__ */ U("button", {
2141
2847
  type: "button",
2142
2848
  onClick: () => void u(),
2143
2849
  disabled: i,
2144
2850
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
2145
- children: [i ? /* @__PURE__ */ K(B, {
2851
+ children: [i ? /* @__PURE__ */ H(z, {
2146
2852
  size: 14,
2147
2853
  className: "animate-spin"
2148
- }) : /* @__PURE__ */ K(H, { size: 14 }), "Save Permissions"]
2854
+ }) : /* @__PURE__ */ H(we, { size: 14 }), "Save Permissions"]
2149
2855
  })]
2150
2856
  })
2151
2857
  ]
@@ -2153,6 +2859,6 @@ var Xe = ({ app: e }) => {
2153
2859
  });
2154
2860
  };
2155
2861
  //#endregion
2156
- export { X as ApplicationDetailPage };
2862
+ export { Ve as ApplicationDetailPage };
2157
2863
 
2158
2864
  //# sourceMappingURL=ApplicationDetailPage.js.map