@burdenoff/microfe-devportal 2026.715.4 → 2026.715.6

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