@burdenoff/microfe-devportal 2026.624.9 → 2026.624.11

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,24 +5,26 @@ import { EmptyState as r } from "../components/EmptyState.js";
5
5
  import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useGetWorkspaceInstallationQuery as l, useInstallApplicationMutation as u, useRevokeDelegationMutation as d, useRotateAppSecretMutation as f, useSubmitApplicationMutation as p, useUninstallApplicationMutation as m, useUpdateApplicationMutation as h } from "../../generated/global-operations.js";
6
6
  import { PageLayout as g, PageSection as _ } from "../components/PageLayout.js";
7
7
  import { APP_TYPE_LABELS as v } from "../utils/constants.js";
8
- import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as ee } from "../components/StatusBadge.js";
9
- import { SelectionCheckbox as x } from "../components/SelectionCheckbox.js";
10
- import { nativeNotify as S } from "../../utils/nativeBridge.js";
11
- import { NewSecretAlert as te } from "../components/SecretDisplay.js";
12
- import { DataTable as C, DetailList as ne } from "../components/DataTable.js";
13
- import { InputField as w, SelectField as T, TextareaField as E } from "../components/FormField.js";
14
- import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
15
- import { GrantDelegationModal as ie } from "../components/GrantDelegationModal.js";
16
- import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
17
- import { useDevportalPermission as D } from "../hooks/usePermission.js";
18
- import { usePackageUpload as O } from "../hooks/usePackageUpload.js";
19
- import { useCallback as k, useEffect as oe, useMemo as A, useRef as j, useState as M } from "react";
20
- import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as se, AppWindow as ce, BarChart3 as P, CheckCircle as F, Clock as I, Download as le, Edit as ue, ExternalLink as L, FlaskConical as de, Info as R, Key as fe, Loader2 as z, MoreHorizontal as pe, Plus as B, Power as me, RefreshCw as he, SendHorizontal as ge, Shield as V, Store as H, Upload as U, Users as W, Webhook as _e, X as G, XCircle as ve } from "lucide-react";
22
- import { useParams as ye } from "react-router-dom";
23
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
8
+ import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as x } from "../components/StatusBadge.js";
9
+ import { SelectionCheckbox as S } from "../components/SelectionCheckbox.js";
10
+ import { nativeNotify as C } from "../../utils/nativeBridge.js";
11
+ import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
12
+ import { DataTable as w, DetailList as te } from "../components/DataTable.js";
13
+ import { InputField as T, SelectField as E, TextareaField as D } from "../components/FormField.js";
14
+ import { ConfirmDialog as O } from "../components/ConfirmDialog.js";
15
+ import { GrantDelegationModal as k } from "../components/GrantDelegationModal.js";
16
+ import { DEVPORTAL_PERMISSIONS as ne } from "../constants/permissions.js";
17
+ import { useDevportalPermission as re } from "../hooks/usePermission.js";
18
+ import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
19
+ import { useCallback as j, useEffect as ie, useMemo as M, useRef as N, useState as P } from "react";
20
+ import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { AlertCircle as ae, AppWindow as oe, BarChart3 as I, CheckCircle as L, Clock as se, Download as ce, Edit as le, ExternalLink as R, FlaskConical as ue, Info as z, Key as de, Loader2 as B, MoreHorizontal as fe, Plus as V, Power as pe, RefreshCw as me, SendHorizontal as he, Shield as H, Store as U, Upload as W, Users as G, Webhook as ge, X as K, XCircle as _e } from "lucide-react";
22
+ import { useParams as ve } from "react-router-dom";
23
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
24
+ import { gql as X } from "@apollo/client";
25
+ import { useMutation as ye, useQuery as be } from "@apollo/client/react";
24
26
  //#region src/devportal/pages/ApplicationDetailPage.tsx
25
- function be(e) {
27
+ function xe(e) {
26
28
  return e ? {
27
29
  id: e.id,
28
30
  name: e.name,
@@ -39,6 +41,9 @@ function be(e) {
39
41
  tags: e.tags || [],
40
42
  keywords: e.keywords || [],
41
43
  iconUrl: e.iconUrl || void 0,
44
+ bannerUrl: e.bannerUrl || void 0,
45
+ videoUrl: e.videoUrl || void 0,
46
+ screenshots: e.screenshots ?? void 0,
42
47
  websiteUrl: e.websiteUrl || void 0,
43
48
  documentationUrl: e.documentationUrl || void 0,
44
49
  supportUrl: e.supportUrl || void 0,
@@ -46,6 +51,10 @@ function be(e) {
46
51
  termsOfServiceUrl: e.termsOfServiceUrl || void 0,
47
52
  githubUrl: e.githubUrl || void 0,
48
53
  pricingType: e.pricingType || void 0,
54
+ pricingDetails: e.pricingDetails ?? void 0,
55
+ manifest: e.manifest ?? void 0,
56
+ reviewNotes: e.reviewNotes || void 0,
57
+ reviewedBy: e.reviewedBy || void 0,
49
58
  installCount: e.installCount,
50
59
  activeInstallCount: e.activeInstallCount,
51
60
  averageRating: e.averageRating ?? void 0,
@@ -70,7 +79,7 @@ function be(e) {
70
79
  updatedAt: e.updatedAt
71
80
  } : null;
72
81
  }
73
- function Y(e) {
82
+ function Se(e) {
74
83
  return {
75
84
  id: e.id,
76
85
  applicationId: e.applicationId,
@@ -94,7 +103,7 @@ function Y(e) {
94
103
  updatedAt: e.updatedAt
95
104
  };
96
105
  }
97
- function xe(e) {
106
+ function Ce(e) {
98
107
  return {
99
108
  id: e.id,
100
109
  applicationId: e.applicationId,
@@ -110,7 +119,7 @@ function xe(e) {
110
119
  createdAt: e.createdAt
111
120
  };
112
121
  }
113
- function Se(e) {
122
+ function Z(e) {
114
123
  return {
115
124
  id: e.id,
116
125
  appId: e.appId,
@@ -132,356 +141,356 @@ function Se(e) {
132
141
  revokedBy: e.revokedBy || void 0
133
142
  };
134
143
  }
135
- var Ce = [
144
+ var we = [
136
145
  {
137
146
  id: "overview",
138
147
  label: "Overview",
139
- icon: ce
148
+ icon: oe
140
149
  },
141
150
  {
142
151
  id: "permissions",
143
152
  label: "Permissions",
144
- icon: V
153
+ icon: H
145
154
  },
146
155
  {
147
156
  id: "webhooks",
148
157
  label: "Webhooks",
149
- icon: _e
158
+ icon: ge
150
159
  },
151
160
  {
152
161
  id: "delegations",
153
162
  label: "Delegations",
154
- icon: W
163
+ icon: G
155
164
  },
156
165
  {
157
166
  id: "analytics",
158
167
  label: "Analytics",
159
- icon: P
168
+ icon: I
160
169
  },
161
170
  {
162
171
  id: "playground",
163
172
  label: "API Playground",
164
- icon: L
173
+ icon: R
165
174
  },
166
175
  {
167
176
  id: "store-listing",
168
177
  label: "Marketplace Listing",
169
- icon: H
178
+ icon: U
170
179
  }
171
- ], we = {
180
+ ], Te = {
172
181
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
173
182
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
174
183
  EXPIRED: "bg-bg-sunken text-text-secondary"
175
- }, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ J("div", {
184
+ }, Ee = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
176
185
  className: "flex items-center justify-center gap-3 py-12",
177
- children: [/* @__PURE__ */ q(z, {
186
+ children: [/* @__PURE__ */ J(B, {
178
187
  size: 20,
179
188
  className: "animate-spin text-muted-foreground"
180
- }), /* @__PURE__ */ q("p", {
189
+ }), /* @__PURE__ */ J("p", {
181
190
  className: "text-sm text-muted-foreground",
182
191
  children: e
183
192
  })]
184
- }), Z = ({ message: e }) => /* @__PURE__ */ J("div", {
193
+ }), De = ({ message: e }) => /* @__PURE__ */ Y("div", {
185
194
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
186
- children: [/* @__PURE__ */ q(se, {
195
+ children: [/* @__PURE__ */ J(ae, {
187
196
  size: 32,
188
197
  className: "text-destructive"
189
- }), /* @__PURE__ */ q("p", {
198
+ }), /* @__PURE__ */ J("p", {
190
199
  className: "text-sm text-muted-foreground",
191
200
  children: e
192
201
  })]
193
- }), Te = () => {
194
- let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = N(), p = (e, t) => {
202
+ }), Oe = () => {
203
+ let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = F(), p = (e, t) => {
195
204
  let n = d(e);
196
205
  return n === e ? t : n;
197
- }, { allowed: h } = D(ae.APP_UPDATE), { allowed: _ } = D(ae.APP_DELETE), { appId: x } = ye(), [C, ne] = M("overview"), [w, T] = M(!1), [E, O] = M(!1), [oe, A] = M(null), [j, P] = M(!1), { data: F, loading: le, error: L } = s({
198
- variables: { id: x },
199
- skip: !x
200
- }), [R, { loading: fe }] = f(), [pe, { loading: B }] = a(), [V, { loading: H }] = u(), [U, { loading: W }] = m(), { data: _e, refetch: G } = l({
206
+ }, { allowed: h } = re(ne.APP_UPDATE), { allowed: _ } = re(ne.APP_DELETE), { appId: S } = ve(), [w, te] = P("overview"), [T, E] = P(!1), [D, A] = P(!1), [ie, M] = P(null), [N, I] = P(!1), { data: L, loading: ce, error: R } = s({
207
+ variables: { id: S },
208
+ skip: !S
209
+ }), [z, { loading: de }] = f(), [fe, { loading: V }] = a(), [H, { loading: U }] = u(), [W, { loading: G }] = m(), { data: ge, refetch: K } = l({
201
210
  variables: {
202
- applicationId: x,
211
+ applicationId: S,
203
212
  workspaceId: c ?? void 0
204
213
  },
205
- skip: !c || !x,
214
+ skip: !c || !S,
206
215
  fetchPolicy: "cache-and-network"
207
- }), K = _e?.appInstallations?.edges?.[0]?.node ?? null, Y = k((e) => {
216
+ }), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X = j((e) => {
208
217
  i?.(`${o}${e}`);
209
- }, [i, o]), xe = k(async () => {
210
- let e = F?.application?.appId;
218
+ }, [i, o]), ye = j(async () => {
219
+ let e = L?.application?.appId;
211
220
  if (e) try {
212
- let t = (await R({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
213
- t && A(t), T(!1);
221
+ let t = (await z({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
222
+ t && M(t), E(!1);
214
223
  } catch {}
215
- }, [F?.application?.appId, R]), Se = k(async () => {
216
- if (x) try {
217
- await pe({ variables: { id: x } }), O(!1), Y("/apps");
224
+ }, [L?.application?.appId, z]), be = j(async () => {
225
+ if (S) try {
226
+ await fe({ variables: { id: S } }), A(!1), X("/apps");
218
227
  } catch {}
219
228
  }, [
220
- x,
221
- pe,
222
- Y
223
- ]), we = k(async () => {
224
- if (!(!x || !c)) try {
225
- await V({ variables: { input: {
226
- applicationId: x,
229
+ S,
230
+ fe,
231
+ X
232
+ ]), Se = j(async () => {
233
+ if (!(!S || !c)) try {
234
+ await H({ variables: { input: {
235
+ applicationId: S,
227
236
  scope: "WORKSPACE",
228
237
  workspaceId: c,
229
238
  autoUpdate: !1
230
- } } }), G(), S("success");
239
+ } } }), K(), C("success");
231
240
  } catch (e) {
232
- console.error("[DevPortal] Test in Workspace failed:", e), S("error");
241
+ console.error("[DevPortal] Test in Workspace failed:", e), C("error");
233
242
  }
234
243
  }, [
235
- x,
244
+ S,
236
245
  c,
237
- V,
238
- G
239
- ]), X = k(async (e) => {
246
+ H,
247
+ K
248
+ ]), Ce = j(async (e) => {
240
249
  try {
241
- await U({ variables: { id: e } }), G(), S("success");
250
+ await W({ variables: { id: e } }), K(), C("success");
242
251
  } catch {
243
- S("error");
252
+ C("error");
244
253
  }
245
- }, [U, G]);
246
- if (le && !F) return /* @__PURE__ */ q(n, { message: p("devportal.loadingApplication", "Loading application...") });
247
- if (L) return /* @__PURE__ */ q(g, {
254
+ }, [W, K]);
255
+ if (ce && !L) return /* @__PURE__ */ J(n, { message: p("devportal.loadingApplication", "Loading application...") });
256
+ if (R) return /* @__PURE__ */ J(g, {
248
257
  title: p("devportal.error", "Error"),
249
258
  backLink: `${o}/apps`,
250
259
  backLabel: p("devportal.backToApplications", "Back to Applications"),
251
- children: /* @__PURE__ */ J("div", {
260
+ children: /* @__PURE__ */ Y("div", {
252
261
  className: "flex flex-col items-center justify-center py-12 text-center",
253
262
  children: [
254
- /* @__PURE__ */ q(se, {
263
+ /* @__PURE__ */ J(ae, {
255
264
  size: 48,
256
265
  className: "text-destructive mb-4"
257
266
  }),
258
- /* @__PURE__ */ q("h3", {
267
+ /* @__PURE__ */ J("h3", {
259
268
  className: "text-lg font-semibold mb-2",
260
269
  children: p("devportal.failedToLoadApplication", "Failed to load application")
261
270
  }),
262
- /* @__PURE__ */ q("p", {
271
+ /* @__PURE__ */ J("p", {
263
272
  className: "text-sm text-muted-foreground",
264
- children: L.message
273
+ children: R.message
265
274
  })
266
275
  ]
267
276
  })
268
277
  });
269
- let Z = be(F?.application);
270
- return Z ? /* @__PURE__ */ J(g, {
278
+ let Z = xe(L?.application);
279
+ return Z ? /* @__PURE__ */ Y(g, {
271
280
  title: Z.name,
272
281
  description: Z.shortDescription,
273
282
  backLink: `${o}/apps`,
274
283
  backLabel: p("devportal.backToApplications", "Back to Applications"),
275
- actions: /* @__PURE__ */ J("div", {
284
+ actions: /* @__PURE__ */ Y("div", {
276
285
  className: "flex items-center gap-2",
277
286
  children: [
278
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ J("button", {
279
- onClick: () => T(!0),
287
+ Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ Y("button", {
288
+ onClick: () => E(!0),
280
289
  disabled: !Z.appId,
281
290
  title: Z.appId ? p("devportal.rotateSecretHint", "Generate a new client secret") : p("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
282
291
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
283
- children: [/* @__PURE__ */ q(he, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
292
+ children: [/* @__PURE__ */ J(me, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
284
293
  }),
285
- /* @__PURE__ */ J("button", {
286
- onClick: () => Y(`/apps/${Z.id}/versions`),
294
+ /* @__PURE__ */ Y("button", {
295
+ onClick: () => X(`/apps/${Z.id}/versions`),
287
296
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
288
- children: [/* @__PURE__ */ q(I, { size: 16 }), p("devportal.versions", "Versions")]
297
+ children: [/* @__PURE__ */ J(se, { size: 16 }), p("devportal.versions", "Versions")]
289
298
  }),
290
- Z.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
291
- onClick: () => Y(`/apps/${Z.id}/publish`),
299
+ Z.status !== "PUBLISHED" && /* @__PURE__ */ Y("button", {
300
+ onClick: () => X(`/apps/${Z.id}/publish`),
292
301
  className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
293
- children: [/* @__PURE__ */ q(ge, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
302
+ children: [/* @__PURE__ */ J(he, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
294
303
  }),
295
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (K ? /* @__PURE__ */ J("button", {
296
- onClick: () => void X(K.id),
297
- disabled: W || !c,
304
+ Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (q ? /* @__PURE__ */ Y("button", {
305
+ onClick: () => void Ce(q.id),
306
+ disabled: G || !c,
298
307
  title: p("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
299
308
  className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
300
- children: [W ? /* @__PURE__ */ q(z, {
309
+ children: [G ? /* @__PURE__ */ J(B, {
301
310
  size: 16,
302
311
  className: "animate-spin"
303
- }) : /* @__PURE__ */ q(ve, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
304
- }) : /* @__PURE__ */ J("button", {
305
- onClick: () => void we(),
306
- disabled: H || !c,
312
+ }) : /* @__PURE__ */ J(_e, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
313
+ }) : /* @__PURE__ */ Y("button", {
314
+ onClick: () => void Se(),
315
+ disabled: U || !c,
307
316
  "aria-disabled": !c,
308
317
  title: c ? p("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : p("devportal.noWorkspaceContext", "No workspace context available"),
309
318
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
310
- children: [H ? /* @__PURE__ */ q(z, {
319
+ children: [U ? /* @__PURE__ */ J(B, {
311
320
  size: 16,
312
321
  className: "animate-spin"
313
- }) : /* @__PURE__ */ q(de, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
322
+ }) : /* @__PURE__ */ J(ue, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
314
323
  })),
315
- Z.appType === "NODE" && /* @__PURE__ */ J("button", {
324
+ Z.appType === "NODE" && /* @__PURE__ */ Y("button", {
316
325
  onClick: () => i?.(`/workflows/new?nodeId=${Z.id}`),
317
326
  disabled: !c,
318
327
  "aria-disabled": !c,
319
328
  title: c ? p("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : p("devportal.noWorkspaceContext", "No workspace context available"),
320
329
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
321
- children: [/* @__PURE__ */ q(de, { size: 16 }), p("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
330
+ children: [/* @__PURE__ */ J(ue, { size: 16 }), p("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
322
331
  }),
323
- /* @__PURE__ */ J("button", {
324
- onClick: () => Y(`/apps/${Z.id}/edit`),
332
+ /* @__PURE__ */ Y("button", {
333
+ onClick: () => X(`/apps/${Z.id}/edit`),
325
334
  disabled: !h,
326
335
  "aria-disabled": !h,
327
336
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
328
- children: [/* @__PURE__ */ q(ue, { size: 16 }), p("devportal.editApp", "Edit App")]
337
+ children: [/* @__PURE__ */ J(le, { size: 16 }), p("devportal.editApp", "Edit App")]
329
338
  }),
330
- /* @__PURE__ */ J("button", {
331
- onClick: () => O(!0),
339
+ /* @__PURE__ */ Y("button", {
340
+ onClick: () => A(!0),
332
341
  disabled: !_,
333
342
  "aria-disabled": !_,
334
343
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
335
- children: [/* @__PURE__ */ q(me, { size: 16 }), p("devportal.deactivate", "Deactivate")]
344
+ children: [/* @__PURE__ */ J(pe, { size: 16 }), p("devportal.deactivate", "Deactivate")]
336
345
  })
337
346
  ]
338
347
  }),
339
348
  children: [
340
- oe && /* @__PURE__ */ q(te, {
349
+ ie && /* @__PURE__ */ J(ee, {
341
350
  title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
342
- secret: oe,
351
+ secret: ie,
343
352
  description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
344
- onDismiss: () => A(null)
353
+ onDismiss: () => M(null)
345
354
  }),
346
- /* @__PURE__ */ J("div", {
355
+ /* @__PURE__ */ Y("div", {
347
356
  className: "flex flex-wrap items-center gap-2",
348
357
  children: [
349
- /* @__PURE__ */ q(b, {
358
+ /* @__PURE__ */ J(b, {
350
359
  status: Z.status,
351
360
  type: "app"
352
361
  }),
353
- /* @__PURE__ */ q(b, {
362
+ /* @__PURE__ */ J(b, {
354
363
  status: Z.visibility,
355
364
  type: "app"
356
365
  }),
357
- Z.isVerified && /* @__PURE__ */ q(ee, { verified: !0 }),
358
- Z.isFeatured && /* @__PURE__ */ q(y, {}),
359
- /* @__PURE__ */ q("span", {
366
+ Z.isVerified && /* @__PURE__ */ J(x, { verified: !0 }),
367
+ Z.isFeatured && /* @__PURE__ */ J(y, {}),
368
+ /* @__PURE__ */ J("span", {
360
369
  className: "text-sm text-muted-foreground",
361
370
  children: v[Z.appType] || Z.appType
362
371
  })
363
372
  ]
364
373
  }),
365
- /* @__PURE__ */ q("div", {
374
+ /* @__PURE__ */ J("div", {
366
375
  className: "border-b",
367
- children: /* @__PURE__ */ q("nav", {
376
+ children: /* @__PURE__ */ J("nav", {
368
377
  className: "-mb-px flex gap-4 overflow-x-auto",
369
378
  role: "tablist",
370
379
  "aria-label": p("devportal.applicationSections", "Application sections"),
371
- children: Ce.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
380
+ children: we.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
372
381
  let n = e.icon;
373
- return /* @__PURE__ */ J("button", {
382
+ return /* @__PURE__ */ Y("button", {
374
383
  id: `application-tab-${e.id}`,
375
384
  role: "tab",
376
- "aria-selected": C === e.id,
385
+ "aria-selected": w === e.id,
377
386
  "aria-controls": `application-panel-${e.id}`,
378
- onClick: () => ne(e.id),
379
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", C === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
380
- children: [/* @__PURE__ */ q(n, { size: 16 }), e.label]
387
+ onClick: () => te(e.id),
388
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
389
+ children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
381
390
  }, e.id);
382
391
  })
383
392
  })
384
393
  }),
385
- /* @__PURE__ */ J("div", {
394
+ /* @__PURE__ */ Y("div", {
386
395
  className: "mt-6",
387
- id: `application-panel-${C}`,
396
+ id: `application-panel-${w}`,
388
397
  role: "tabpanel",
389
- "aria-labelledby": `application-tab-${C}`,
398
+ "aria-labelledby": `application-tab-${w}`,
390
399
  tabIndex: 0,
391
400
  children: [
392
- C === "overview" && /* @__PURE__ */ q(ke, { app: Z }),
393
- C === "permissions" && /* @__PURE__ */ q(We, { app: Z }),
394
- C === "webhooks" && /* @__PURE__ */ q(Ee, {
401
+ w === "overview" && /* @__PURE__ */ J(Me, { app: Z }),
402
+ w === "permissions" && /* @__PURE__ */ J(Ye, { app: Z }),
403
+ w === "webhooks" && /* @__PURE__ */ J(ke, {
395
404
  appId: Z.id,
396
- onNavigate: Y
405
+ onNavigate: X
397
406
  }),
398
- C === "delegations" && /* @__PURE__ */ q(De, {
407
+ w === "delegations" && /* @__PURE__ */ J(Ae, {
399
408
  authAppId: Z.appId || void 0,
400
409
  appName: Z.name,
401
- onGrantDelegation: () => P(!0),
402
- onNavigate: Y
410
+ onGrantDelegation: () => I(!0),
411
+ onNavigate: X
403
412
  }),
404
- C === "analytics" && /* @__PURE__ */ q(Oe, { appId: Z.id }),
405
- C === "playground" && /* @__PURE__ */ q(Pe, { app: Z }),
406
- C === "store-listing" && /* @__PURE__ */ q(Ve, { app: Z })
413
+ w === "analytics" && /* @__PURE__ */ J(je, { appId: Z.id }),
414
+ w === "playground" && /* @__PURE__ */ J(Le, { app: Z }),
415
+ w === "store-listing" && /* @__PURE__ */ J(Ke, { app: Z })
407
416
  ]
408
417
  }),
409
- /* @__PURE__ */ q(re, {
410
- open: w,
411
- onOpenChange: T,
412
- onConfirm: xe,
418
+ /* @__PURE__ */ J(O, {
419
+ open: T,
420
+ onOpenChange: E,
421
+ onConfirm: ye,
413
422
  title: p("devportal.rotateAppSecret", "Rotate App Secret"),
414
423
  description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
415
424
  confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
416
425
  cancelLabel: p("devportal.cancel", "Cancel"),
417
426
  variant: "warning",
418
- loading: fe
427
+ loading: de
419
428
  }),
420
- /* @__PURE__ */ q(re, {
421
- open: E,
422
- onOpenChange: O,
423
- onConfirm: Se,
429
+ /* @__PURE__ */ J(O, {
430
+ open: D,
431
+ onOpenChange: A,
432
+ onConfirm: be,
424
433
  title: p("devportal.deactivateApplication", "Deactivate Application"),
425
434
  description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
426
435
  confirmLabel: p("devportal.deactivate", "Deactivate"),
427
436
  cancelLabel: p("devportal.cancel", "Cancel"),
428
437
  variant: "destructive",
429
- loading: B
438
+ loading: V
430
439
  }),
431
- /* @__PURE__ */ q(ie, {
432
- open: j,
433
- onOpenChange: P,
440
+ /* @__PURE__ */ J(k, {
441
+ open: N,
442
+ onOpenChange: I,
434
443
  appId: Z.appId || "",
435
444
  appName: Z.name,
436
445
  appScopes: Z.scopes?.map((e) => e.scope) ?? [],
437
446
  onSuccess: () => {
438
- P(!1);
447
+ I(!1);
439
448
  }
440
449
  })
441
450
  ]
442
- }) : /* @__PURE__ */ q(g, {
451
+ }) : /* @__PURE__ */ J(g, {
443
452
  title: p("devportal.notFound", "Not Found"),
444
453
  backLink: `${o}/apps`,
445
454
  backLabel: p("devportal.backToApplications", "Back to Applications"),
446
- children: /* @__PURE__ */ q(r, {
447
- icon: /* @__PURE__ */ q(ce, { size: 48 }),
455
+ children: /* @__PURE__ */ J(r, {
456
+ icon: /* @__PURE__ */ J(oe, { size: 48 }),
448
457
  title: p("devportal.applicationNotFound", "Application not found"),
449
458
  description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
450
459
  })
451
460
  });
452
- }, Ee = ({ appId: e, onNavigate: t }) => {
453
- let { t: n } = N(), r = (e, t) => {
461
+ }, ke = ({ appId: e, onNavigate: t }) => {
462
+ let { t: n } = F(), r = (e, t) => {
454
463
  let r = n(e);
455
464
  return r === e ? t : r;
456
465
  }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
457
- return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Ae, {
466
+ return a ? /* @__PURE__ */ J(Ee, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(De, { message: o.message }) : /* @__PURE__ */ J(Ne, {
458
467
  appId: e,
459
- webhooks: (i?.webhooks ?? []).map(Y),
468
+ webhooks: (i?.webhooks ?? []).map(Se),
460
469
  onNavigate: t
461
470
  });
462
- }, De = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
463
- let { t: o } = N(), s = (e, t) => {
471
+ }, Ae = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
472
+ let { t: o } = F(), s = (e, t) => {
464
473
  let n = o(e);
465
474
  return n === e ? t : n;
466
- }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = M([]), [g, _] = M(!1), [v, y] = M(/* @__PURE__ */ new Set()), [b, ee] = M(null), x = A(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Se) : [], [e, c]), S = A(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = A(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), ne = S.some((e) => v.has(e.id)) && !C, w = k((e, t) => {
475
+ }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = P([]), [g, _] = P(!1), [v, y] = P(/* @__PURE__ */ new Set()), [b, x] = P(null), S = M(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Z) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = M(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), te = C.some((e) => v.has(e.id)) && !w, T = j((e, t) => {
467
476
  y((n) => {
468
477
  let r = new Set(n);
469
478
  return t ? r.add(e) : r.delete(e), r;
470
479
  });
471
- }, []), T = k((e) => {
480
+ }, []), E = j((e) => {
472
481
  y((t) => {
473
482
  let n = new Set(t);
474
- return S.forEach((t) => {
483
+ return C.forEach((t) => {
475
484
  e ? n.add(t.id) : n.delete(t.id);
476
485
  }), n;
477
486
  });
478
- }, [S]), E = k(() => {
487
+ }, [C]), D = j(() => {
479
488
  y(/* @__PURE__ */ new Set());
480
- }, []), ie = k(async (e) => {
489
+ }, []), k = j(async (e) => {
481
490
  _(!0);
482
491
  try {
483
492
  let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
484
- ee(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
493
+ x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
485
494
  let n = new Set(t);
486
495
  return e.forEach((e) => n.delete(e)), n;
487
496
  }), h([]), f();
@@ -489,38 +498,38 @@ var Ce = [
489
498
  _(!1);
490
499
  }
491
500
  }, [p, f]);
492
- return e ? l ? /* @__PURE__ */ q(X, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ q(Z, { message: u.message }) : /* @__PURE__ */ J(K, { children: [
493
- b && /* @__PURE__ */ q("div", {
501
+ return e ? l ? /* @__PURE__ */ J(Ee, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(De, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
502
+ b && /* @__PURE__ */ J("div", {
494
503
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
495
- children: /* @__PURE__ */ J("div", {
504
+ children: /* @__PURE__ */ Y("div", {
496
505
  className: "flex items-center justify-between gap-3",
497
- children: [/* @__PURE__ */ q("span", { children: b }), /* @__PURE__ */ q("button", {
498
- onClick: () => ee(null),
506
+ children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
507
+ onClick: () => x(null),
499
508
  className: "text-status-success-text hover:text-status-success-text",
500
509
  children: s("devportal.dismiss", "Dismiss")
501
510
  })]
502
511
  })
503
512
  }),
504
- /* @__PURE__ */ q(je, {
513
+ /* @__PURE__ */ J(Pe, {
505
514
  appName: t,
506
- delegations: x,
515
+ delegations: S,
507
516
  onGrantDelegation: n,
508
517
  onRevokeDelegation: (e) => h([e]),
509
518
  selectedDelegationIds: v,
510
- onToggleSelectDelegation: w,
511
- onToggleAllDelegations: T,
512
- onClearSelection: E,
513
- onRevokeSelected: () => h(te.map((e) => e.id)),
514
- allVisibleSelected: C,
515
- partiallySelected: ne
519
+ onToggleSelectDelegation: T,
520
+ onToggleAllDelegations: E,
521
+ onClearSelection: D,
522
+ onRevokeSelected: () => h(ee.map((e) => e.id)),
523
+ allVisibleSelected: w,
524
+ partiallySelected: te
516
525
  }),
517
- /* @__PURE__ */ q(re, {
526
+ /* @__PURE__ */ J(O, {
518
527
  open: m.length > 0,
519
528
  onOpenChange: (e) => {
520
529
  e || h([]);
521
530
  },
522
531
  onConfirm: () => {
523
- m.length > 0 && ie(m);
532
+ m.length > 0 && k(m);
524
533
  },
525
534
  title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
526
535
  description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
@@ -529,90 +538,90 @@ var Ce = [
529
538
  variant: "destructive",
530
539
  loading: g
531
540
  })
532
- ] }) : /* @__PURE__ */ q(r, {
533
- icon: /* @__PURE__ */ q(V, { size: 32 }),
541
+ ] }) : /* @__PURE__ */ J(r, {
542
+ icon: /* @__PURE__ */ J(H, { size: 32 }),
534
543
  title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
535
544
  description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
536
- action: /* @__PURE__ */ J("button", {
545
+ action: /* @__PURE__ */ Y("button", {
537
546
  onClick: () => a("/oauth"),
538
547
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
539
- children: [/* @__PURE__ */ q(L, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
548
+ children: [/* @__PURE__ */ J(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
540
549
  })
541
550
  });
542
- }, Oe = ({ appId: e }) => {
543
- let { t } = N(), n = (e, n) => {
551
+ }, je = ({ appId: e }) => {
552
+ let { t } = F(), n = (e, n) => {
544
553
  let r = t(e);
545
554
  return r === e ? n : r;
546
- }, r = A(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
555
+ }, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
547
556
  applicationId: e,
548
557
  period: "daily",
549
- startDate: A(() => {
558
+ startDate: M(() => {
550
559
  let e = new Date(r);
551
560
  return e.setDate(e.getDate() - 30), e;
552
561
  }, [r]).toISOString(),
553
562
  endDate: r.toISOString()
554
563
  } });
555
- return a ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ q(Z, { message: s.message }) : /* @__PURE__ */ q(Me, { analytics: (i?.applicationAnalytics ?? []).map(xe) });
556
- }, ke = ({ app: e }) => {
557
- let { t } = N(), n = (e, n) => {
564
+ return a ? /* @__PURE__ */ J(Ee, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(De, { message: s.message }) : /* @__PURE__ */ J(Fe, { analytics: (i?.applicationAnalytics ?? []).map(Ce) });
565
+ }, Me = ({ app: e }) => {
566
+ let { t } = F(), n = (e, n) => {
558
567
  let r = t(e);
559
568
  return r === e ? n : r;
560
569
  };
561
- return /* @__PURE__ */ J("div", {
570
+ return /* @__PURE__ */ Y("div", {
562
571
  className: "grid gap-6 lg:grid-cols-3",
563
- children: [/* @__PURE__ */ J("div", {
572
+ children: [/* @__PURE__ */ Y("div", {
564
573
  className: "lg:col-span-2 space-y-6",
565
574
  children: [
566
- /* @__PURE__ */ J("div", {
575
+ /* @__PURE__ */ Y("div", {
567
576
  className: "grid gap-4 sm:grid-cols-4",
568
577
  children: [
569
- /* @__PURE__ */ q(Q, {
578
+ /* @__PURE__ */ J(Q, {
570
579
  label: n("devportal.totalInstalls", "Total Installs"),
571
580
  value: e.installCount.toLocaleString()
572
581
  }),
573
- /* @__PURE__ */ q(Q, {
582
+ /* @__PURE__ */ J(Q, {
574
583
  label: n("devportal.activeInstalls", "Active Installs"),
575
584
  value: e.activeInstallCount.toLocaleString()
576
585
  }),
577
- /* @__PURE__ */ q(Q, {
586
+ /* @__PURE__ */ J(Q, {
578
587
  label: n("devportal.averageRating", "Average Rating"),
579
588
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
580
589
  }),
581
- /* @__PURE__ */ q(Q, {
590
+ /* @__PURE__ */ J(Q, {
582
591
  label: n("devportal.reviews", "Reviews"),
583
592
  value: e.reviewCount.toString()
584
593
  })
585
594
  ]
586
595
  }),
587
- /* @__PURE__ */ q(_, {
596
+ /* @__PURE__ */ J(_, {
588
597
  title: n("devportal.description", "Description"),
589
- children: /* @__PURE__ */ q("div", {
598
+ children: /* @__PURE__ */ J("div", {
590
599
  className: "prose prose-sm max-w-none",
591
- children: /* @__PURE__ */ q("pre", {
600
+ children: /* @__PURE__ */ J("pre", {
592
601
  className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
593
602
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
594
603
  })
595
604
  })
596
605
  }),
597
- /* @__PURE__ */ q(_, {
606
+ /* @__PURE__ */ J(_, {
598
607
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
599
- children: /* @__PURE__ */ J("div", {
608
+ children: /* @__PURE__ */ Y("div", {
600
609
  className: "space-y-3",
601
- children: [e.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
610
+ children: [e.tags.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
602
611
  className: "text-xs text-muted-foreground mb-2",
603
612
  children: n("devportal.tags", "Tags")
604
- }), /* @__PURE__ */ q("div", {
613
+ }), /* @__PURE__ */ J("div", {
605
614
  className: "flex flex-wrap gap-2",
606
- children: e.tags.map((e) => /* @__PURE__ */ q("span", {
615
+ children: e.tags.map((e) => /* @__PURE__ */ J("span", {
607
616
  className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
608
617
  children: e
609
618
  }, e))
610
- })] }), e.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
619
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
611
620
  className: "text-xs text-muted-foreground mb-2",
612
621
  children: n("devportal.keywords", "Keywords")
613
- }), /* @__PURE__ */ q("div", {
622
+ }), /* @__PURE__ */ J("div", {
614
623
  className: "flex flex-wrap gap-2",
615
- children: e.keywords.map((e) => /* @__PURE__ */ q("span", {
624
+ children: e.keywords.map((e) => /* @__PURE__ */ J("span", {
616
625
  className: "rounded-full bg-muted px-3 py-1 text-xs",
617
626
  children: e
618
627
  }, e))
@@ -620,14 +629,14 @@ var Ce = [
620
629
  })
621
630
  })
622
631
  ]
623
- }), /* @__PURE__ */ J("div", {
632
+ }), /* @__PURE__ */ Y("div", {
624
633
  className: "space-y-6",
625
- children: [/* @__PURE__ */ q(_, {
634
+ children: [/* @__PURE__ */ J(_, {
626
635
  title: n("devportal.details", "Details"),
627
- children: /* @__PURE__ */ q(ne, { items: [
636
+ children: /* @__PURE__ */ J(te, { items: [
628
637
  {
629
638
  label: n("devportal.appId", "App ID"),
630
- value: /* @__PURE__ */ q("code", {
639
+ value: /* @__PURE__ */ J("code", {
631
640
  className: "text-xs",
632
641
  children: e.id
633
642
  })
@@ -657,32 +666,32 @@ var Ce = [
657
666
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
658
667
  }
659
668
  ] })
660
- }), /* @__PURE__ */ q(_, {
669
+ }), /* @__PURE__ */ J(_, {
661
670
  title: n("devportal.links", "Links"),
662
- children: /* @__PURE__ */ J("div", {
671
+ children: /* @__PURE__ */ Y("div", {
663
672
  className: "space-y-2",
664
673
  children: [
665
- e.websiteUrl && /* @__PURE__ */ q($, {
674
+ e.websiteUrl && /* @__PURE__ */ J($, {
666
675
  label: n("devportal.website", "Website"),
667
676
  url: e.websiteUrl
668
677
  }),
669
- e.documentationUrl && /* @__PURE__ */ q($, {
678
+ e.documentationUrl && /* @__PURE__ */ J($, {
670
679
  label: n("devportal.documentation", "Documentation"),
671
680
  url: e.documentationUrl
672
681
  }),
673
- e.supportUrl && /* @__PURE__ */ q($, {
682
+ e.supportUrl && /* @__PURE__ */ J($, {
674
683
  label: n("devportal.support", "Support"),
675
684
  url: e.supportUrl
676
685
  }),
677
- e.githubUrl && /* @__PURE__ */ q($, {
686
+ e.githubUrl && /* @__PURE__ */ J($, {
678
687
  label: n("devportal.github", "GitHub"),
679
688
  url: e.githubUrl
680
689
  }),
681
- e.privacyPolicyUrl && /* @__PURE__ */ q($, {
690
+ e.privacyPolicyUrl && /* @__PURE__ */ J($, {
682
691
  label: n("devportal.privacyPolicy", "Privacy Policy"),
683
692
  url: e.privacyPolicyUrl
684
693
  }),
685
- e.termsOfServiceUrl && /* @__PURE__ */ q($, {
694
+ e.termsOfServiceUrl && /* @__PURE__ */ J($, {
686
695
  label: n("devportal.termsOfService", "Terms of Service"),
687
696
  url: e.termsOfServiceUrl
688
697
  })
@@ -691,16 +700,16 @@ var Ce = [
691
700
  })]
692
701
  })]
693
702
  });
694
- }, Ae = ({ appId: e, webhooks: t, onNavigate: n }) => {
695
- let { t: i } = N(), a = (e, t) => {
703
+ }, Ne = ({ appId: e, webhooks: t, onNavigate: n }) => {
704
+ let { t: i } = F(), a = (e, t) => {
696
705
  let n = i(e);
697
706
  return n === e ? t : n;
698
707
  };
699
- return /* @__PURE__ */ J("div", {
708
+ return /* @__PURE__ */ Y("div", {
700
709
  className: "space-y-6",
701
- children: [/* @__PURE__ */ J("div", {
710
+ children: [/* @__PURE__ */ Y("div", {
702
711
  className: "flex items-center justify-between",
703
- children: [/* @__PURE__ */ J("p", {
712
+ children: [/* @__PURE__ */ Y("p", {
704
713
  className: "text-sm text-muted-foreground",
705
714
  children: [
706
715
  t.length,
@@ -709,81 +718,81 @@ var Ce = [
709
718
  " ",
710
719
  a("devportal.configured", "configured")
711
720
  ]
712
- }), /* @__PURE__ */ J("button", {
721
+ }), /* @__PURE__ */ Y("button", {
713
722
  onClick: () => n(`/apps/${e}/webhooks/new`),
714
723
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
715
- children: [/* @__PURE__ */ q(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
724
+ children: [/* @__PURE__ */ J(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
716
725
  })]
717
- }), t.length > 0 ? /* @__PURE__ */ q("div", {
726
+ }), t.length > 0 ? /* @__PURE__ */ J("div", {
718
727
  className: "space-y-4",
719
- children: t.map((t) => /* @__PURE__ */ J("div", {
728
+ children: t.map((t) => /* @__PURE__ */ Y("div", {
720
729
  className: "rounded-lg border bg-card p-4 space-y-4",
721
730
  children: [
722
- /* @__PURE__ */ J("div", {
731
+ /* @__PURE__ */ Y("div", {
723
732
  className: "flex items-start justify-between",
724
- children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
733
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
725
734
  className: "flex items-center gap-2",
726
- children: [/* @__PURE__ */ q("h3", {
735
+ children: [/* @__PURE__ */ J("h3", {
727
736
  className: "font-medium",
728
737
  children: t.name
729
- }), /* @__PURE__ */ q(b, {
738
+ }), /* @__PURE__ */ J(b, {
730
739
  status: t.status,
731
740
  type: "webhook"
732
741
  })]
733
- }), t.description && /* @__PURE__ */ q("p", {
742
+ }), t.description && /* @__PURE__ */ J("p", {
734
743
  className: "text-sm text-muted-foreground mt-1",
735
744
  children: t.description
736
- })] }), /* @__PURE__ */ q("button", {
745
+ })] }), /* @__PURE__ */ J("button", {
737
746
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
738
747
  className: "rounded-md p-1 hover:bg-muted",
739
- children: /* @__PURE__ */ q(pe, { size: 20 })
748
+ children: /* @__PURE__ */ J(fe, { size: 20 })
740
749
  })]
741
750
  }),
742
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
751
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
743
752
  className: "text-xs text-muted-foreground mb-1",
744
753
  children: a("devportal.endpointUrl", "Endpoint URL")
745
- }), /* @__PURE__ */ q("code", {
754
+ }), /* @__PURE__ */ J("code", {
746
755
  className: "text-sm bg-muted px-2 py-1 rounded block truncate",
747
756
  children: t.url
748
757
  })] }),
749
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
758
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
750
759
  className: "text-xs text-muted-foreground mb-2",
751
760
  children: a("devportal.events", "Events")
752
- }), /* @__PURE__ */ q("div", {
761
+ }), /* @__PURE__ */ J("div", {
753
762
  className: "flex flex-wrap gap-2",
754
- children: t.events.map((e) => /* @__PURE__ */ q("span", {
763
+ children: t.events.map((e) => /* @__PURE__ */ J("span", {
755
764
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
756
765
  children: e
757
766
  }, e))
758
767
  })] }),
759
- /* @__PURE__ */ J("div", {
768
+ /* @__PURE__ */ Y("div", {
760
769
  className: "grid gap-4 sm:grid-cols-4 text-sm",
761
770
  children: [
762
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
771
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
763
772
  className: "text-xs text-muted-foreground",
764
773
  children: a("devportal.success", "Success")
765
- }), /* @__PURE__ */ q("p", {
774
+ }), /* @__PURE__ */ J("p", {
766
775
  className: "font-medium text-status-success-text",
767
776
  children: t.successCount.toLocaleString()
768
777
  })] }),
769
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
778
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
770
779
  className: "text-xs text-muted-foreground",
771
780
  children: a("devportal.failed", "Failed")
772
- }), /* @__PURE__ */ q("p", {
781
+ }), /* @__PURE__ */ J("p", {
773
782
  className: "font-medium text-status-error-text",
774
783
  children: t.failureCount.toLocaleString()
775
784
  })] }),
776
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
785
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
777
786
  className: "text-xs text-muted-foreground",
778
787
  children: a("devportal.successRate", "Success Rate")
779
- }), /* @__PURE__ */ J("p", {
788
+ }), /* @__PURE__ */ Y("p", {
780
789
  className: "font-medium",
781
790
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
782
791
  })] }),
783
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
792
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
784
793
  className: "text-xs text-muted-foreground",
785
794
  children: a("devportal.lastTriggered", "Last Triggered")
786
- }), /* @__PURE__ */ q("p", {
795
+ }), /* @__PURE__ */ J("p", {
787
796
  className: "font-medium",
788
797
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
789
798
  })] })
@@ -791,28 +800,28 @@ var Ce = [
791
800
  })
792
801
  ]
793
802
  }, t.id))
794
- }) : /* @__PURE__ */ q(r, {
795
- icon: /* @__PURE__ */ q(_e, { size: 32 }),
803
+ }) : /* @__PURE__ */ J(r, {
804
+ icon: /* @__PURE__ */ J(ge, { size: 32 }),
796
805
  title: a("devportal.noWebhooks", "No webhooks"),
797
806
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
798
- action: /* @__PURE__ */ J("button", {
807
+ action: /* @__PURE__ */ Y("button", {
799
808
  onClick: () => n(`/apps/${e}/webhooks/new`),
800
809
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
801
- children: [/* @__PURE__ */ q(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
810
+ children: [/* @__PURE__ */ J(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
802
811
  })
803
812
  })]
804
813
  });
805
- }, je = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
806
- let { t: p } = N(), m = (e, t) => {
814
+ }, Pe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
815
+ let { t: p } = F(), m = (e, t) => {
807
816
  let n = p(e);
808
817
  return n === e ? t : n;
809
818
  }, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
810
- return /* @__PURE__ */ J("div", {
819
+ return /* @__PURE__ */ Y("div", {
811
820
  className: "space-y-6",
812
821
  children: [
813
- /* @__PURE__ */ J("div", {
822
+ /* @__PURE__ */ Y("div", {
814
823
  className: "flex items-center justify-between",
815
- children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
824
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
816
825
  className: "text-sm text-muted-foreground",
817
826
  children: [
818
827
  n.length,
@@ -823,7 +832,7 @@ var Ce = [
823
832
  " ",
824
833
  e
825
834
  ]
826
- }), h.length > 0 && /* @__PURE__ */ J("p", {
835
+ }), h.length > 0 && /* @__PURE__ */ Y("p", {
827
836
  className: "text-xs text-muted-foreground mt-0.5",
828
837
  children: [
829
838
  h.length,
@@ -835,44 +844,44 @@ var Ce = [
835
844
  " ",
836
845
  m("devportal.revokedExpired", "revoked/expired")
837
846
  ]
838
- })] }), /* @__PURE__ */ J("button", {
847
+ })] }), /* @__PURE__ */ Y("button", {
839
848
  onClick: i,
840
849
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
841
- children: [/* @__PURE__ */ q(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
850
+ children: [/* @__PURE__ */ J(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
842
851
  })]
843
852
  }),
844
- h.length > 0 && /* @__PURE__ */ q("div", {
853
+ h.length > 0 && /* @__PURE__ */ J("div", {
845
854
  className: "rounded-lg border bg-card p-4",
846
- children: /* @__PURE__ */ J("div", {
855
+ children: /* @__PURE__ */ Y("div", {
847
856
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
848
- children: [/* @__PURE__ */ J("div", {
857
+ children: [/* @__PURE__ */ Y("div", {
849
858
  className: "flex flex-wrap items-center gap-3",
850
- children: [/* @__PURE__ */ J("div", {
859
+ children: [/* @__PURE__ */ Y("div", {
851
860
  className: "flex items-center gap-2",
852
- children: [/* @__PURE__ */ q(x, {
861
+ children: [/* @__PURE__ */ J(S, {
853
862
  checked: d,
854
863
  indeterminate: f,
855
864
  onChange: c,
856
865
  ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
857
- }), /* @__PURE__ */ q("span", {
866
+ }), /* @__PURE__ */ J("span", {
858
867
  className: "text-sm font-medium",
859
868
  children: m("devportal.selectAllActive", "Select all active")
860
869
  })]
861
- }), o.size > 0 && /* @__PURE__ */ q("button", {
870
+ }), o.size > 0 && /* @__PURE__ */ J("button", {
862
871
  onClick: l,
863
872
  className: "text-sm text-muted-foreground hover:text-foreground",
864
873
  children: m("devportal.clearSelection", "Clear selection")
865
874
  })]
866
- }), /* @__PURE__ */ J("div", {
875
+ }), /* @__PURE__ */ Y("div", {
867
876
  className: "flex flex-wrap items-center gap-2",
868
- children: [/* @__PURE__ */ J("span", {
877
+ children: [/* @__PURE__ */ Y("span", {
869
878
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
870
879
  children: [
871
880
  o.size,
872
881
  " ",
873
882
  m("devportal.selected", "selected")
874
883
  ]
875
- }), /* @__PURE__ */ J("button", {
884
+ }), /* @__PURE__ */ Y("button", {
876
885
  onClick: u,
877
886
  disabled: o.size === 0,
878
887
  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",
@@ -881,33 +890,33 @@ var Ce = [
881
890
  })]
882
891
  })
883
892
  }),
884
- n.length > 0 ? /* @__PURE__ */ q("div", {
893
+ n.length > 0 ? /* @__PURE__ */ J("div", {
885
894
  className: "space-y-4",
886
- children: n.map((e) => /* @__PURE__ */ J("div", {
895
+ children: n.map((e) => /* @__PURE__ */ Y("div", {
887
896
  className: "rounded-lg border bg-card p-4 space-y-4",
888
897
  children: [
889
- /* @__PURE__ */ J("div", {
898
+ /* @__PURE__ */ Y("div", {
890
899
  className: "flex items-start justify-between",
891
- children: [/* @__PURE__ */ J("div", {
900
+ children: [/* @__PURE__ */ Y("div", {
892
901
  className: "flex items-start gap-3",
893
- children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
902
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
894
903
  onClick: (e) => e.stopPropagation(),
895
- children: /* @__PURE__ */ q(x, {
904
+ children: /* @__PURE__ */ J(S, {
896
905
  checked: o.has(e.id),
897
906
  onChange: (t) => s(e.id, t),
898
907
  ariaLabel: `Select delegation ${e.id}`,
899
908
  className: "mt-1"
900
909
  })
901
- }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
910
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
902
911
  className: "flex items-center gap-2",
903
- children: [/* @__PURE__ */ J("h3", {
912
+ children: [/* @__PURE__ */ Y("h3", {
904
913
  className: "font-medium",
905
914
  children: ["Delegation #", e.id.slice(0, 8)]
906
- }), /* @__PURE__ */ q("span", {
907
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", we[e.status]),
915
+ }), /* @__PURE__ */ J("span", {
916
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", Te[e.status]),
908
917
  children: e.status
909
918
  })]
910
- }), /* @__PURE__ */ J("p", {
919
+ }), /* @__PURE__ */ Y("p", {
911
920
  className: "text-sm text-muted-foreground mt-1",
912
921
  children: [
913
922
  m("devportal.granted", "Granted"),
@@ -919,55 +928,55 @@ var Ce = [
919
928
  e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
920
929
  ]
921
930
  })] })]
922
- }), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
931
+ }), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
923
932
  onClick: () => a(e.id),
924
933
  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",
925
- children: [/* @__PURE__ */ q(ve, { size: 14 }), m("devportal.revoke", "Revoke")]
934
+ children: [/* @__PURE__ */ J(_e, { size: 14 }), m("devportal.revoke", "Revoke")]
926
935
  })]
927
936
  }),
928
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
937
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
929
938
  className: "text-xs text-muted-foreground mb-2",
930
939
  children: m("devportal.grantedScopes", "Granted Scopes")
931
- }), /* @__PURE__ */ q("div", {
940
+ }), /* @__PURE__ */ J("div", {
932
941
  className: "flex flex-wrap gap-2",
933
- children: e.scopes.map((e) => /* @__PURE__ */ q("span", {
942
+ children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
934
943
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
935
944
  children: e
936
945
  }, e))
937
946
  })] }),
938
- e.workspaceIds.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
947
+ e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
939
948
  className: "text-xs text-muted-foreground mb-2",
940
949
  children: m("devportal.workspaceScope", "Workspace Scope")
941
- }), /* @__PURE__ */ q("div", {
950
+ }), /* @__PURE__ */ J("div", {
942
951
  className: "flex flex-wrap gap-2",
943
- children: e.workspaceIds.map((e) => /* @__PURE__ */ q("code", {
952
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
944
953
  className: "rounded bg-muted px-2 py-0.5 text-xs",
945
954
  children: e
946
955
  }, e))
947
956
  })] }),
948
- /* @__PURE__ */ J("div", {
957
+ /* @__PURE__ */ Y("div", {
949
958
  className: "flex items-center gap-4 text-xs text-muted-foreground",
950
959
  children: [
951
- e.expiresAt && /* @__PURE__ */ J("span", {
960
+ e.expiresAt && /* @__PURE__ */ Y("span", {
952
961
  className: "flex items-center gap-1",
953
962
  children: [
954
- /* @__PURE__ */ q(I, { size: 12 }),
963
+ /* @__PURE__ */ J(se, { size: 12 }),
955
964
  m("devportal.expires", "Expires"),
956
965
  " ",
957
966
  new Date(e.expiresAt).toLocaleDateString()
958
967
  ]
959
968
  }),
960
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
969
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
961
970
  className: "flex items-center gap-1",
962
- children: [/* @__PURE__ */ q(F, {
971
+ children: [/* @__PURE__ */ J(L, {
963
972
  size: 12,
964
973
  className: "text-status-success-text"
965
974
  }), m("devportal.noExpiration", "No expiration")]
966
975
  }),
967
- e.revokedAt && /* @__PURE__ */ J("span", {
976
+ e.revokedAt && /* @__PURE__ */ Y("span", {
968
977
  className: "flex items-center gap-1",
969
978
  children: [
970
- /* @__PURE__ */ q(ve, {
979
+ /* @__PURE__ */ J(_e, {
971
980
  size: 12,
972
981
  className: "text-status-error-text"
973
982
  }),
@@ -980,52 +989,52 @@ var Ce = [
980
989
  })
981
990
  ]
982
991
  }, e.id))
983
- }) : /* @__PURE__ */ q(r, {
984
- icon: /* @__PURE__ */ q(W, { size: 32 }),
992
+ }) : /* @__PURE__ */ J(r, {
993
+ icon: /* @__PURE__ */ J(G, { size: 32 }),
985
994
  title: m("devportal.noDelegations", "No delegations"),
986
995
  description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
987
- action: /* @__PURE__ */ J("button", {
996
+ action: /* @__PURE__ */ Y("button", {
988
997
  onClick: i,
989
998
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
990
- children: [/* @__PURE__ */ q(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
999
+ children: [/* @__PURE__ */ J(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
991
1000
  })
992
1001
  })
993
1002
  ]
994
1003
  });
995
- }, Me = ({ analytics: e }) => {
996
- let { t } = N(), n = (e, n) => {
1004
+ }, Fe = ({ analytics: e }) => {
1005
+ let { t } = F(), n = (e, n) => {
997
1006
  let r = t(e);
998
1007
  return r === e ? n : r;
999
1008
  }, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
1000
- return /* @__PURE__ */ J("div", {
1009
+ return /* @__PURE__ */ Y("div", {
1001
1010
  className: "space-y-6",
1002
- children: [/* @__PURE__ */ J("div", {
1011
+ children: [/* @__PURE__ */ Y("div", {
1003
1012
  className: "grid gap-4 sm:grid-cols-4",
1004
1013
  children: [
1005
- /* @__PURE__ */ q(Q, {
1014
+ /* @__PURE__ */ J(Q, {
1006
1015
  label: n("devportal.activeUsers", "Active Users"),
1007
1016
  value: i?.activeUsers.toLocaleString() || "0",
1008
1017
  trend: a ? o(i.activeUsers, a.activeUsers) : void 0
1009
1018
  }),
1010
- /* @__PURE__ */ q(Q, {
1019
+ /* @__PURE__ */ J(Q, {
1011
1020
  label: n("devportal.apiCalls", "API Calls"),
1012
1021
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
1013
1022
  trend: a ? o(i.apiCalls, a.apiCalls) : void 0
1014
1023
  }),
1015
- /* @__PURE__ */ q(Q, {
1024
+ /* @__PURE__ */ J(Q, {
1016
1025
  label: n("devportal.avgResponseTime", "Avg Response Time"),
1017
1026
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
1018
1027
  trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
1019
1028
  }),
1020
- /* @__PURE__ */ q(Q, {
1029
+ /* @__PURE__ */ J(Q, {
1021
1030
  label: n("devportal.errorRate", "Error Rate"),
1022
1031
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1023
1032
  trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
1024
1033
  })
1025
1034
  ]
1026
- }), /* @__PURE__ */ q(_, {
1035
+ }), /* @__PURE__ */ J(_, {
1027
1036
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1028
- children: e.length > 0 ? /* @__PURE__ */ q(C, {
1037
+ children: e.length > 0 ? /* @__PURE__ */ J(w, {
1029
1038
  data: e,
1030
1039
  keyField: "id",
1031
1040
  columns: [
@@ -1065,18 +1074,18 @@ var Ce = [
1065
1074
  render: (e) => e.sessions.toLocaleString()
1066
1075
  }
1067
1076
  ]
1068
- }) : /* @__PURE__ */ q(r, {
1069
- icon: /* @__PURE__ */ q(P, { size: 32 }),
1077
+ }) : /* @__PURE__ */ J(r, {
1078
+ icon: /* @__PURE__ */ J(I, { size: 32 }),
1070
1079
  title: n("devportal.noAnalyticsData", "No analytics data"),
1071
1080
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1072
1081
  })
1073
1082
  })]
1074
1083
  });
1075
- }, Ne = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Pe = ({ app: t }) => {
1076
- let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = N(), o = (e, t) => {
1084
+ }, Ie = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Le = ({ app: t }) => {
1085
+ let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = F(), o = (e, t) => {
1077
1086
  let n = a(e);
1078
1087
  return n === e ? t : n;
1079
- }, [s, c] = M(Ne), [l, u] = M("{}"), [d, f] = M(""), [p, m] = M(!1), [h, g] = M(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = M(i || ""), [y, b] = M(!1), ee = k(async () => {
1088
+ }, [s, c] = P(Ie), [l, u] = P("{}"), [d, f] = P(""), [p, m] = P(!1), [h, g] = P(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = P(i || ""), [y, b] = P(!1), x = j(async () => {
1080
1089
  m(!0), f("");
1081
1090
  try {
1082
1091
  let e = {};
@@ -1107,24 +1116,24 @@ var Ce = [
1107
1116
  l,
1108
1117
  h,
1109
1118
  _
1110
- ]), x = k(() => {
1119
+ ]), S = j(() => {
1111
1120
  i && v(i), b(!0);
1112
1121
  }, [i]);
1113
- return /* @__PURE__ */ J("div", {
1122
+ return /* @__PURE__ */ Y("div", {
1114
1123
  className: "space-y-4",
1115
1124
  children: [
1116
- /* @__PURE__ */ J("div", {
1125
+ /* @__PURE__ */ Y("div", {
1117
1126
  className: "flex items-center justify-between",
1118
- children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
1127
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("h3", {
1119
1128
  className: "text-lg font-semibold",
1120
1129
  children: o("devportal.apiPlayground", "API Playground")
1121
- }), /* @__PURE__ */ J("p", {
1130
+ }), /* @__PURE__ */ Y("p", {
1122
1131
  className: "text-sm text-muted-foreground",
1123
1132
  children: [
1124
1133
  o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1125
1134
  " ",
1126
- /* @__PURE__ */ q("strong", { children: t.name }),
1127
- t.appId && /* @__PURE__ */ J("span", {
1135
+ /* @__PURE__ */ J("strong", { children: t.name }),
1136
+ t.appId && /* @__PURE__ */ Y("span", {
1128
1137
  className: "ml-1 text-xs text-muted-foreground",
1129
1138
  children: [
1130
1139
  "(OAuth App: ",
@@ -1133,39 +1142,39 @@ var Ce = [
1133
1142
  ]
1134
1143
  })
1135
1144
  ]
1136
- })] }), /* @__PURE__ */ J("button", {
1137
- onClick: x,
1145
+ })] }), /* @__PURE__ */ Y("button", {
1146
+ onClick: S,
1138
1147
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1139
- children: [/* @__PURE__ */ q(fe, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1148
+ children: [/* @__PURE__ */ J(de, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1140
1149
  })]
1141
1150
  }),
1142
- y && /* @__PURE__ */ J("div", {
1151
+ y && /* @__PURE__ */ Y("div", {
1143
1152
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1144
1153
  children: [
1145
- /* @__PURE__ */ q("p", {
1154
+ /* @__PURE__ */ J("p", {
1146
1155
  className: "font-medium text-status-info-text",
1147
1156
  children: o("devportal.authenticationGuide", "Authentication Guide")
1148
1157
  }),
1149
- /* @__PURE__ */ J("p", {
1158
+ /* @__PURE__ */ Y("p", {
1150
1159
  className: "text-status-info-text",
1151
1160
  children: [
1152
1161
  o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1153
1162
  " ",
1154
- /* @__PURE__ */ q("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1163
+ /* @__PURE__ */ J("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1155
1164
  " ",
1156
1165
  o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1157
1166
  ]
1158
1167
  }),
1159
- /* @__PURE__ */ q("pre", {
1168
+ /* @__PURE__ */ J("pre", {
1160
1169
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1161
1170
  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}"
1162
1171
  }),
1163
- /* @__PURE__ */ J("p", {
1172
+ /* @__PURE__ */ Y("p", {
1164
1173
  className: "text-status-info-text",
1165
1174
  children: [
1166
1175
  o("devportal.useReturnedAccessToken", "Use the returned"),
1167
1176
  " ",
1168
- /* @__PURE__ */ q("code", {
1177
+ /* @__PURE__ */ J("code", {
1169
1178
  className: "bg-status-info-bg-subtle px-1 rounded",
1170
1179
  children: "accessToken"
1171
1180
  }),
@@ -1173,129 +1182,129 @@ var Ce = [
1173
1182
  o("devportal.asBearerToken", "as the Bearer token below.")
1174
1183
  ]
1175
1184
  }),
1176
- /* @__PURE__ */ q("button", {
1185
+ /* @__PURE__ */ J("button", {
1177
1186
  onClick: () => b(!1),
1178
1187
  className: "text-xs text-accent-blue hover:underline",
1179
1188
  children: o("devportal.dismiss", "Dismiss")
1180
1189
  })
1181
1190
  ]
1182
1191
  }),
1183
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1192
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1184
1193
  className: "block text-sm font-medium mb-1",
1185
1194
  children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
1186
- }), /* @__PURE__ */ J("div", {
1195
+ }), /* @__PURE__ */ Y("div", {
1187
1196
  className: "flex gap-2",
1188
- children: [/* @__PURE__ */ q("input", {
1197
+ children: [/* @__PURE__ */ J("input", {
1189
1198
  type: "text",
1190
1199
  value: h,
1191
1200
  onChange: (e) => g(e.target.value),
1192
1201
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
1193
- }), /* @__PURE__ */ J("select", {
1202
+ }), /* @__PURE__ */ Y("select", {
1194
1203
  onChange: (e) => g(e.target.value),
1195
1204
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1196
1205
  value: h,
1197
- children: [/* @__PURE__ */ q("option", {
1206
+ children: [/* @__PURE__ */ J("option", {
1198
1207
  value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
1199
1208
  children: o("devportal.globalGateway", "Global Gateway")
1200
- }), /* @__PURE__ */ q("option", {
1209
+ }), /* @__PURE__ */ J("option", {
1201
1210
  value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
1202
1211
  children: o("devportal.workspaceGateway", "Workspace Gateway")
1203
1212
  })]
1204
1213
  })]
1205
1214
  })] }),
1206
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1215
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1207
1216
  className: "block text-sm font-medium mb-1",
1208
1217
  children: o("devportal.bearerToken", "Bearer Token")
1209
- }), /* @__PURE__ */ q("input", {
1218
+ }), /* @__PURE__ */ J("input", {
1210
1219
  type: "password",
1211
1220
  value: _,
1212
1221
  onChange: (e) => v(e.target.value),
1213
1222
  placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
1214
1223
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
1215
1224
  })] }),
1216
- /* @__PURE__ */ J("div", {
1225
+ /* @__PURE__ */ Y("div", {
1217
1226
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1218
- children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1227
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1219
1228
  className: "block text-sm font-medium mb-1",
1220
1229
  children: o("devportal.query", "Query")
1221
- }), /* @__PURE__ */ q("textarea", {
1230
+ }), /* @__PURE__ */ J("textarea", {
1222
1231
  value: s,
1223
1232
  onChange: (e) => c(e.target.value),
1224
1233
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1225
1234
  spellCheck: !1
1226
- })] }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1235
+ })] }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1227
1236
  className: "block text-sm font-medium mb-1",
1228
1237
  children: o("devportal.variablesJson", "Variables (JSON)")
1229
- }), /* @__PURE__ */ q("textarea", {
1238
+ }), /* @__PURE__ */ J("textarea", {
1230
1239
  value: l,
1231
1240
  onChange: (e) => u(e.target.value),
1232
1241
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1233
1242
  spellCheck: !1
1234
1243
  })] })]
1235
1244
  }),
1236
- /* @__PURE__ */ J("button", {
1237
- onClick: ee,
1245
+ /* @__PURE__ */ Y("button", {
1246
+ onClick: x,
1238
1247
  disabled: p,
1239
1248
  className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
1240
- children: [p ? /* @__PURE__ */ q(z, {
1249
+ children: [p ? /* @__PURE__ */ J(B, {
1241
1250
  size: 16,
1242
1251
  className: "animate-spin"
1243
- }) : /* @__PURE__ */ q(L, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1252
+ }) : /* @__PURE__ */ J(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1244
1253
  }),
1245
- d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1254
+ d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1246
1255
  className: "block text-sm font-medium mb-1",
1247
1256
  children: o("devportal.response", "Response")
1248
- }), /* @__PURE__ */ q("pre", {
1257
+ }), /* @__PURE__ */ J("pre", {
1249
1258
  className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
1250
1259
  children: d
1251
1260
  })] })
1252
1261
  ]
1253
1262
  });
1254
- }, Fe = ({ 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 }) => {
1255
- let d = j(null), f = k(async (e) => {
1263
+ }, Re = ({ 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 }) => {
1264
+ let d = N(null), f = j(async (e) => {
1256
1265
  try {
1257
1266
  r((await s(e)).downloadUrl);
1258
1267
  } catch {}
1259
1268
  }, [s, r]);
1260
- return /* @__PURE__ */ J("div", {
1269
+ return /* @__PURE__ */ Y("div", {
1261
1270
  className: "space-y-1.5",
1262
1271
  children: [
1263
- /* @__PURE__ */ q("label", {
1272
+ /* @__PURE__ */ J("label", {
1264
1273
  className: "text-sm font-medium",
1265
1274
  children: e
1266
1275
  }),
1267
- /* @__PURE__ */ J("div", {
1276
+ /* @__PURE__ */ Y("div", {
1268
1277
  className: "flex gap-3 items-start",
1269
- children: [/* @__PURE__ */ J("div", {
1278
+ children: [/* @__PURE__ */ Y("div", {
1270
1279
  className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
1271
- children: [n ? /* @__PURE__ */ q("img", {
1280
+ children: [n ? /* @__PURE__ */ J("img", {
1272
1281
  src: n,
1273
1282
  alt: e,
1274
1283
  className: "w-full h-full object-cover"
1275
- }) : /* @__PURE__ */ q(U, {
1284
+ }) : /* @__PURE__ */ J(W, {
1276
1285
  size: 18,
1277
1286
  className: "text-text-secondary opacity-40"
1278
- }), c && /* @__PURE__ */ J("div", {
1287
+ }), c && /* @__PURE__ */ Y("div", {
1279
1288
  className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
1280
- children: [/* @__PURE__ */ q(z, {
1289
+ children: [/* @__PURE__ */ J(B, {
1281
1290
  size: 14,
1282
1291
  className: "animate-spin text-white"
1283
- }), /* @__PURE__ */ J("span", {
1292
+ }), /* @__PURE__ */ Y("span", {
1284
1293
  className: "text-white text-xs",
1285
1294
  children: [l, "%"]
1286
1295
  })]
1287
1296
  })]
1288
- }), /* @__PURE__ */ J("div", {
1297
+ }), /* @__PURE__ */ Y("div", {
1289
1298
  className: "flex-1 space-y-1.5",
1290
1299
  children: [
1291
- /* @__PURE__ */ q("input", {
1300
+ /* @__PURE__ */ J("input", {
1292
1301
  type: "url",
1293
1302
  value: n,
1294
1303
  onChange: (e) => r(e.target.value),
1295
1304
  placeholder: "https://...",
1296
1305
  className: "w-full rounded-md border border-border bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
1297
1306
  }),
1298
- /* @__PURE__ */ q("input", {
1307
+ /* @__PURE__ */ J("input", {
1299
1308
  ref: d,
1300
1309
  type: "file",
1301
1310
  accept: a,
@@ -1305,28 +1314,28 @@ var Ce = [
1305
1314
  t && f(t), e.target.value = "";
1306
1315
  }
1307
1316
  }),
1308
- /* @__PURE__ */ J("button", {
1317
+ /* @__PURE__ */ Y("button", {
1309
1318
  type: "button",
1310
1319
  disabled: c,
1311
1320
  onClick: () => d.current?.click(),
1312
1321
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
1313
- children: [/* @__PURE__ */ q(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1322
+ children: [/* @__PURE__ */ J(W, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1314
1323
  }),
1315
- u && /* @__PURE__ */ q("p", {
1324
+ u && /* @__PURE__ */ J("p", {
1316
1325
  className: "text-xs text-status-error-text",
1317
1326
  children: u
1318
1327
  })
1319
1328
  ]
1320
1329
  })]
1321
1330
  }),
1322
- i && /* @__PURE__ */ q("p", {
1331
+ i && /* @__PURE__ */ J("p", {
1323
1332
  className: "text-xs text-text-secondary",
1324
1333
  children: i
1325
1334
  })
1326
1335
  ]
1327
1336
  });
1328
- }, Ie = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1329
- let s = j(null), c = k(async (t) => {
1337
+ }, ze = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1338
+ let s = N(null), c = j(async (t) => {
1330
1339
  try {
1331
1340
  let i = await r(t);
1332
1341
  n([...e, i.downloadUrl]);
@@ -1338,45 +1347,45 @@ var Ce = [
1338
1347
  ]), l = (t) => {
1339
1348
  n(e.filter((e, n) => n !== t));
1340
1349
  };
1341
- return /* @__PURE__ */ J("div", {
1350
+ return /* @__PURE__ */ Y("div", {
1342
1351
  className: "space-y-2",
1343
1352
  children: [
1344
- /* @__PURE__ */ q("label", {
1353
+ /* @__PURE__ */ J("label", {
1345
1354
  className: "text-sm font-medium",
1346
1355
  children: "Screenshots"
1347
1356
  }),
1348
- /* @__PURE__ */ J("div", {
1357
+ /* @__PURE__ */ Y("div", {
1349
1358
  className: "flex flex-wrap gap-3",
1350
- children: [e.map((e, t) => /* @__PURE__ */ J("div", {
1359
+ children: [e.map((e, t) => /* @__PURE__ */ Y("div", {
1351
1360
  className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
1352
- children: [/* @__PURE__ */ q("img", {
1361
+ children: [/* @__PURE__ */ J("img", {
1353
1362
  src: e,
1354
1363
  alt: `Screenshot ${t + 1}`,
1355
1364
  className: "w-full h-full object-cover"
1356
- }), /* @__PURE__ */ q("button", {
1365
+ }), /* @__PURE__ */ J("button", {
1357
1366
  type: "button",
1358
1367
  onClick: () => l(t),
1359
1368
  className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
1360
- children: /* @__PURE__ */ q(G, { size: 12 })
1369
+ children: /* @__PURE__ */ J(K, { size: 12 })
1361
1370
  })]
1362
- }, t)), /* @__PURE__ */ q("button", {
1371
+ }, t)), /* @__PURE__ */ J("button", {
1363
1372
  type: "button",
1364
1373
  disabled: i,
1365
1374
  onClick: () => s.current?.click(),
1366
1375
  className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border 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"),
1367
- children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
1376
+ children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
1368
1377
  size: 18,
1369
1378
  className: "animate-spin text-primary"
1370
- }), /* @__PURE__ */ J("span", {
1379
+ }), /* @__PURE__ */ Y("span", {
1371
1380
  className: "text-xs",
1372
1381
  children: [a, "%"]
1373
- })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 18 }), /* @__PURE__ */ q("span", {
1382
+ })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, { size: 18 }), /* @__PURE__ */ J("span", {
1374
1383
  className: "text-xs",
1375
1384
  children: "Add screenshot"
1376
1385
  })] })
1377
1386
  })]
1378
1387
  }),
1379
- /* @__PURE__ */ q("input", {
1388
+ /* @__PURE__ */ J("input", {
1380
1389
  ref: s,
1381
1390
  type: "file",
1382
1391
  accept: "image/png,image/jpeg,image/webp,image/gif",
@@ -1386,19 +1395,19 @@ var Ce = [
1386
1395
  t && c(t), e.target.value = "";
1387
1396
  }
1388
1397
  }),
1389
- o && /* @__PURE__ */ q("p", {
1398
+ o && /* @__PURE__ */ J("p", {
1390
1399
  className: "text-xs text-status-error-text",
1391
1400
  children: o
1392
1401
  })
1393
1402
  ]
1394
1403
  });
1395
- }, Le = new Set(["workflow", "template"]), Re = [{
1404
+ }, Be = new Set(["workflow", "template"]), Ve = [{
1396
1405
  value: "FREE",
1397
1406
  label: "Free"
1398
1407
  }, {
1399
1408
  value: "PAID",
1400
1409
  label: "Paid"
1401
- }], ze = [
1410
+ }], He = [
1402
1411
  {
1403
1412
  value: "agent",
1404
1413
  label: "Agent"
@@ -1468,7 +1477,7 @@ var Ce = [
1468
1477
  label: "Component"
1469
1478
  }
1470
1479
  ];
1471
- function Be(e) {
1480
+ function Ue(e) {
1472
1481
  let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
1473
1482
  return {
1474
1483
  iconUrl: e.iconUrl ?? "",
@@ -1497,17 +1506,25 @@ function Be(e) {
1497
1506
  manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1498
1507
  };
1499
1508
  }
1500
- var Ve = ({ app: n }) => {
1501
- let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = N(), u = (e, t) => {
1509
+ var We = X`
1510
+ query MyPublisherProducts {
1511
+ myPublisher { id products { id productId name } }
1512
+ }
1513
+ `, Ge = X`
1514
+ mutation UpdateStoreProduct($input: UpdateProductInput!) {
1515
+ updateProduct(input: $input) { id name description }
1516
+ }
1517
+ `, Ke = ({ app: n }) => {
1518
+ let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = F(), u = (e, t) => {
1502
1519
  let n = l(e);
1503
1520
  return n === e ? t : n;
1504
- }, [d, f] = M(() => Be(n)), [m, g] = M(!1), [v, y] = M(!1), b = j(n);
1521
+ }, [d, f] = P(() => Ue(n)), [m, g] = P(!1), [v, y] = P(!1), b = N(n);
1505
1522
  b.current = n;
1506
- let [ee] = h(), [x, { loading: te }] = p();
1507
- oe(() => {
1508
- f(Be(b.current));
1523
+ let { data: x } = be(We, { fetchPolicy: "cache-first" }), S = x?.myPublisher?.products.find((e) => e.productId === n.id)?.id ?? null, [ee] = ye(Ge), [w] = h(), [te, { loading: O }] = p();
1524
+ ie(() => {
1525
+ f(Ue(b.current));
1509
1526
  }, [n.id]);
1510
- let C = (e, t) => {
1527
+ let k = (e, t) => {
1511
1528
  f((n) => ({
1512
1529
  ...n,
1513
1530
  [e]: t
@@ -1515,7 +1532,7 @@ var Ve = ({ app: n }) => {
1515
1532
  }, ne = async () => {
1516
1533
  g(!0);
1517
1534
  try {
1518
- let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Le.has(d.manifestItemType), i = n.manifest ?? {}, a = {
1535
+ let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Be.has(d.manifestItemType), i = n.manifest ?? {}, a = {
1519
1536
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1520
1537
  itemType: d.manifestItemType || void 0,
1521
1538
  identity: {
@@ -1533,7 +1550,7 @@ var Ve = ({ app: n }) => {
1533
1550
  let e = parseFloat(d.price);
1534
1551
  isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
1535
1552
  }
1536
- await ee({ variables: {
1553
+ await w({ variables: {
1537
1554
  id: n.id,
1538
1555
  input: {
1539
1556
  iconUrl: d.iconUrl || null,
@@ -1552,41 +1569,50 @@ var Ve = ({ app: n }) => {
1552
1569
  pricingDetails: Object.keys(o).length > 0 ? o : null,
1553
1570
  manifest: a
1554
1571
  }
1555
- } }), S("success");
1572
+ } }), S && await ee({ variables: { input: {
1573
+ id: S,
1574
+ name: n.name,
1575
+ description: d.shortDescription || void 0,
1576
+ longDescription: d.description || void 0,
1577
+ icon: d.iconUrl || void 0,
1578
+ screenshots: e.length > 0 ? e : void 0,
1579
+ documentationUrl: d.documentationUrl || void 0,
1580
+ category: n.category || void 0
1581
+ } } }), C("success");
1556
1582
  } catch {
1557
- S("error");
1583
+ C("error");
1558
1584
  } finally {
1559
1585
  g(!1);
1560
1586
  }
1561
1587
  }, re = async () => {
1562
1588
  try {
1563
- await x({ variables: { id: n.id } }), S("success");
1589
+ await te({ variables: { id: n.id } }), C("success");
1564
1590
  } catch {
1565
- S("error");
1591
+ C("error");
1566
1592
  }
1567
- }, ie = j(null), ae = j(null), { upload: D, uploading: A, progress: ce, error: P } = O(r, i, a, o), { upload: ue, uploading: L, progress: de, error: fe } = O(r, i, a, o, "/DevPortal/Assets"), { upload: pe, uploading: B, progress: me, error: he } = O(r, i, a, o, "/DevPortal/Assets"), { upload: V, uploading: W, progress: _e, error: G } = O(r, i, a, o, "/DevPortal/Assets"), ve = k(async (e) => {
1593
+ }, M = N(null), oe = N(null), { upload: I, uploading: le, progress: R, error: ue } = A(r, i, a, o), { upload: de, uploading: fe, progress: V, error: pe } = A(r, i, a, o, "/DevPortal/Assets"), { upload: me, uploading: H, progress: G, error: ge } = A(r, i, a, o, "/DevPortal/Assets"), { upload: K, uploading: _e, progress: ve, error: X } = A(r, i, a, o, "/DevPortal/Assets"), xe = j(async (e) => {
1568
1594
  let t = e.target.files?.[0];
1569
1595
  if (t) {
1570
1596
  e.target.value = "";
1571
1597
  try {
1572
- let e = await D(t);
1598
+ let e = await I(t);
1573
1599
  f((t) => ({
1574
1600
  ...t,
1575
1601
  manifestRegistryUrl: e.downloadUrl
1576
1602
  }));
1577
1603
  } catch {}
1578
1604
  }
1579
- }, [D]), ye = k(async (e) => {
1605
+ }, [I]), Se = j(async (e) => {
1580
1606
  e.preventDefault(), y(!1);
1581
1607
  let t = e.dataTransfer.files?.[0];
1582
1608
  if (t) try {
1583
- let e = await D(t);
1609
+ let e = await I(t);
1584
1610
  f((t) => ({
1585
1611
  ...t,
1586
1612
  manifestRegistryUrl: e.downloadUrl
1587
1613
  }));
1588
1614
  } catch {}
1589
- }, [D]), be = k((e) => {
1615
+ }, [I]), Ce = j((e) => {
1590
1616
  let t = e.target.files?.[0];
1591
1617
  if (!t) return;
1592
1618
  let n = new FileReader();
@@ -1605,8 +1631,8 @@ var Ve = ({ app: n }) => {
1605
1631
  }));
1606
1632
  } catch {}
1607
1633
  }, n.readAsText(t), e.target.value = "";
1608
- }, []), Y = k(() => {
1609
- let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Le.has(d.manifestItemType), r = {
1634
+ }, []), Z = j(() => {
1635
+ let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Be.has(d.manifestItemType), r = {
1610
1636
  manifestVersion: "1.0",
1611
1637
  itemType: d.manifestItemType || void 0,
1612
1638
  identity: {
@@ -1621,9 +1647,9 @@ var Ve = ({ app: n }) => {
1621
1647
  compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
1622
1648
  }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1623
1649
  o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1624
- }, [n.slug, d]), xe = Le.has(d.manifestItemType), Se = d.manifestInstallType === "builtin", Ce = d.pricingType !== "FREE", we = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1650
+ }, [n.slug, d]), we = Be.has(d.manifestItemType), Te = d.manifestInstallType === "builtin", Ee = d.pricingType !== "FREE", De = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1625
1651
  n.status;
1626
- let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Te = n.appType === "NODE" || n.appType === "WORKFLOW", Ee = [
1652
+ let Oe = n.status === "SUBMITTED", ke = n.status === "PUBLISHED", Ae = n.appType === "NODE" || n.appType === "WORKFLOW", je = [
1627
1653
  {
1628
1654
  label: "Short description",
1629
1655
  done: !!d.shortDescription.trim()
@@ -1644,38 +1670,38 @@ var Ve = ({ app: n }) => {
1644
1670
  label: "Terms of Service URL",
1645
1671
  done: !!d.termsOfServiceUrl.trim()
1646
1672
  }
1647
- ], De = Ee.filter((e) => e.done).length, Oe = Ee.length;
1648
- return /* @__PURE__ */ J("div", {
1673
+ ], Me = je.filter((e) => e.done).length, Ne = je.length;
1674
+ return /* @__PURE__ */ Y("div", {
1649
1675
  className: "space-y-8 max-w-3xl",
1650
1676
  children: [
1651
- /* @__PURE__ */ J("div", {
1677
+ /* @__PURE__ */ Y("div", {
1652
1678
  className: "rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2",
1653
- children: [/* @__PURE__ */ q("p", {
1679
+ children: [/* @__PURE__ */ J("p", {
1654
1680
  className: "text-sm font-semibold text-primary",
1655
1681
  children: u("devportal.listingTabPurpose", "What is this tab for?")
1656
- }), /* @__PURE__ */ J("ul", {
1682
+ }), /* @__PURE__ */ Y("ul", {
1657
1683
  className: "text-sm text-muted-foreground space-y-1 list-none pl-0",
1658
1684
  children: [
1659
- /* @__PURE__ */ J("li", {
1685
+ /* @__PURE__ */ Y("li", {
1660
1686
  className: "flex items-start gap-2",
1661
- children: [/* @__PURE__ */ q(H, {
1687
+ children: [/* @__PURE__ */ J(U, {
1662
1688
  size: 14,
1663
1689
  className: "mt-0.5 shrink-0 text-primary"
1664
- }), /* @__PURE__ */ J("span", { children: [
1665
- /* @__PURE__ */ q("strong", { children: u("devportal.thisTab", "This tab") }),
1690
+ }), /* @__PURE__ */ Y("span", { children: [
1691
+ /* @__PURE__ */ J("strong", { children: u("devportal.thisTab", "This tab") }),
1666
1692
  " ",
1667
1693
  u("devportal.listingTabDesc", "controls your store card — the name, description, icon and screenshots users see in the marketplace. Save changes here any time without creating a new release.")
1668
1694
  ] })]
1669
1695
  }),
1670
- Te && /* @__PURE__ */ J("li", {
1696
+ Ae && /* @__PURE__ */ Y("li", {
1671
1697
  className: "flex items-start gap-2",
1672
- children: [/* @__PURE__ */ q(I, {
1698
+ children: [/* @__PURE__ */ J(se, {
1673
1699
  size: 14,
1674
1700
  className: "mt-0.5 shrink-0 text-primary"
1675
- }), /* @__PURE__ */ J("span", { children: [
1701
+ }), /* @__PURE__ */ Y("span", { children: [
1676
1702
  u("devportal.versionsTabDesc", "To release a new version (ZIP package + manifest), go to the"),
1677
1703
  " ",
1678
- /* @__PURE__ */ q("button", {
1704
+ /* @__PURE__ */ J("button", {
1679
1705
  type: "button",
1680
1706
  className: "underline text-primary hover:no-underline",
1681
1707
  onClick: () => s?.(`${c}/apps/${n.id}/versions`),
@@ -1684,66 +1710,66 @@ var Ve = ({ app: n }) => {
1684
1710
  "."
1685
1711
  ] })]
1686
1712
  }),
1687
- /* @__PURE__ */ J("li", {
1713
+ /* @__PURE__ */ Y("li", {
1688
1714
  className: "flex items-start gap-2",
1689
- children: [/* @__PURE__ */ q(ge, {
1715
+ children: [/* @__PURE__ */ J(he, {
1690
1716
  size: 14,
1691
1717
  className: "mt-0.5 shrink-0 text-primary"
1692
- }), /* @__PURE__ */ q("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
1718
+ }), /* @__PURE__ */ J("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
1693
1719
  })
1694
1720
  ]
1695
1721
  })]
1696
1722
  }),
1697
- !Z && /* @__PURE__ */ J("div", {
1723
+ !ke && /* @__PURE__ */ Y("div", {
1698
1724
  className: "rounded-lg border bg-card p-4 space-y-3",
1699
- children: [/* @__PURE__ */ J("div", {
1725
+ children: [/* @__PURE__ */ Y("div", {
1700
1726
  className: "flex items-center justify-between",
1701
- children: [/* @__PURE__ */ J("p", {
1727
+ children: [/* @__PURE__ */ Y("p", {
1702
1728
  className: "text-sm font-medium",
1703
1729
  children: [
1704
1730
  u("devportal.listingCompleteness", "Listing completeness"),
1705
1731
  " ",
1706
- /* @__PURE__ */ J("span", {
1707
- className: t("ml-1 text-xs font-semibold", De === Oe ? "text-status-success-text" : "text-status-warning-text"),
1732
+ /* @__PURE__ */ Y("span", {
1733
+ className: t("ml-1 text-xs font-semibold", Me === Ne ? "text-status-success-text" : "text-status-warning-text"),
1708
1734
  children: [
1709
- De,
1735
+ Me,
1710
1736
  "/",
1711
- Oe
1737
+ Ne
1712
1738
  ]
1713
1739
  })
1714
1740
  ]
1715
- }), De === Oe && /* @__PURE__ */ J("span", {
1741
+ }), Me === Ne && /* @__PURE__ */ Y("span", {
1716
1742
  className: "text-xs text-status-success-text flex items-center gap-1",
1717
- children: [/* @__PURE__ */ q(F, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
1743
+ children: [/* @__PURE__ */ J(L, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
1718
1744
  })]
1719
- }), /* @__PURE__ */ q("div", {
1745
+ }), /* @__PURE__ */ J("div", {
1720
1746
  className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
1721
- children: Ee.map((e) => /* @__PURE__ */ J("div", {
1747
+ children: je.map((e) => /* @__PURE__ */ Y("div", {
1722
1748
  className: "flex items-center gap-1.5 text-xs",
1723
- children: [e.done ? /* @__PURE__ */ q(F, {
1749
+ children: [e.done ? /* @__PURE__ */ J(L, {
1724
1750
  size: 12,
1725
1751
  className: "text-status-success-text shrink-0"
1726
- }) : /* @__PURE__ */ q(se, {
1752
+ }) : /* @__PURE__ */ J(ae, {
1727
1753
  size: 12,
1728
1754
  className: "text-status-warning-text shrink-0"
1729
- }), /* @__PURE__ */ q("span", {
1755
+ }), /* @__PURE__ */ J("span", {
1730
1756
  className: e.done ? "text-foreground" : "text-muted-foreground",
1731
1757
  children: e.label
1732
1758
  })]
1733
1759
  }, e.label))
1734
1760
  })]
1735
1761
  }),
1736
- Z ? /* @__PURE__ */ J("div", {
1762
+ ke ? /* @__PURE__ */ Y("div", {
1737
1763
  className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
1738
- children: [/* @__PURE__ */ q(F, {
1764
+ children: [/* @__PURE__ */ J(L, {
1739
1765
  size: 16,
1740
1766
  className: "text-success mt-0.5 shrink-0"
1741
- }), /* @__PURE__ */ J("div", {
1767
+ }), /* @__PURE__ */ Y("div", {
1742
1768
  className: "text-sm",
1743
- children: [/* @__PURE__ */ q("span", {
1769
+ children: [/* @__PURE__ */ J("span", {
1744
1770
  className: "font-medium text-success",
1745
1771
  children: u("devportal.storeListing.published", "Published")
1746
- }), n.publishedAt && /* @__PURE__ */ J("span", {
1772
+ }), n.publishedAt && /* @__PURE__ */ Y("span", {
1747
1773
  className: "text-muted-foreground ml-2",
1748
1774
  children: [
1749
1775
  u("devportal.storeListing.since", "since"),
@@ -1752,234 +1778,234 @@ var Ve = ({ app: n }) => {
1752
1778
  ]
1753
1779
  })]
1754
1780
  })]
1755
- }) : X ? /* @__PURE__ */ J("div", {
1781
+ }) : Oe ? /* @__PURE__ */ Y("div", {
1756
1782
  className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
1757
- children: [/* @__PURE__ */ q(I, {
1783
+ children: [/* @__PURE__ */ J(se, {
1758
1784
  size: 16,
1759
1785
  className: "text-primary mt-0.5 shrink-0"
1760
- }), /* @__PURE__ */ J("div", {
1786
+ }), /* @__PURE__ */ Y("div", {
1761
1787
  className: "text-sm",
1762
1788
  children: [
1763
- /* @__PURE__ */ q("span", {
1789
+ /* @__PURE__ */ J("span", {
1764
1790
  className: "font-medium text-primary",
1765
1791
  children: u("devportal.storeListing.underReview", "Submitted for review")
1766
1792
  }),
1767
- n.submittedAt && /* @__PURE__ */ q("span", {
1793
+ n.submittedAt && /* @__PURE__ */ J("span", {
1768
1794
  className: "text-muted-foreground ml-2",
1769
1795
  children: new Date(n.submittedAt).toLocaleDateString()
1770
1796
  }),
1771
- n.reviewStatus && /* @__PURE__ */ J("span", {
1797
+ n.reviewStatus && /* @__PURE__ */ Y("span", {
1772
1798
  className: "text-muted-foreground ml-2",
1773
1799
  children: ["· ", n.reviewStatus]
1774
1800
  })
1775
1801
  ]
1776
1802
  })]
1777
- }) : /* @__PURE__ */ J("div", {
1803
+ }) : /* @__PURE__ */ Y("div", {
1778
1804
  className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
1779
- children: [/* @__PURE__ */ q(se, {
1805
+ children: [/* @__PURE__ */ J(ae, {
1780
1806
  size: 16,
1781
1807
  className: "text-warning mt-0.5 shrink-0"
1782
- }), /* @__PURE__ */ J("div", {
1808
+ }), /* @__PURE__ */ Y("div", {
1783
1809
  className: "text-sm",
1784
- children: [/* @__PURE__ */ q("span", {
1810
+ children: [/* @__PURE__ */ J("span", {
1785
1811
  className: "font-medium text-warning",
1786
1812
  children: u("devportal.storeListing.draft", "Draft")
1787
- }), /* @__PURE__ */ q("span", {
1813
+ }), /* @__PURE__ */ J("span", {
1788
1814
  className: "text-muted-foreground ml-2",
1789
1815
  children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1790
1816
  })]
1791
1817
  })]
1792
1818
  }),
1793
- Te ? /* @__PURE__ */ J("div", {
1819
+ Ae ? /* @__PURE__ */ Y("div", {
1794
1820
  className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
1795
- children: [/* @__PURE__ */ q(R, {
1821
+ children: [/* @__PURE__ */ J(z, {
1796
1822
  size: 16,
1797
1823
  className: "shrink-0 mt-0.5 text-muted-foreground"
1798
- }), /* @__PURE__ */ J("div", {
1824
+ }), /* @__PURE__ */ Y("div", {
1799
1825
  className: "text-sm space-y-1",
1800
- children: [/* @__PURE__ */ q("p", {
1826
+ children: [/* @__PURE__ */ J("p", {
1801
1827
  className: "font-medium",
1802
1828
  children: u("devportal.packageManagedInVersions", "ZIP package & manifest are managed in Versions")
1803
- }), /* @__PURE__ */ q("p", {
1829
+ }), /* @__PURE__ */ J("p", {
1804
1830
  className: "text-muted-foreground",
1805
1831
  children: u("devportal.packageManagedInVersionsDesc", "For NODE and WORKFLOW types, each release is uploaded through the Versions page — including the ZIP archive and manifest.json. This keeps your code releases separate from your store card.")
1806
1832
  })]
1807
1833
  })]
1808
- }) : /* @__PURE__ */ q(_, {
1834
+ }) : /* @__PURE__ */ J(_, {
1809
1835
  title: u("devportal.package", "Package"),
1810
1836
  description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1811
- children: /* @__PURE__ */ J("div", {
1837
+ children: /* @__PURE__ */ Y("div", {
1812
1838
  className: "space-y-6",
1813
1839
  children: [
1814
- /* @__PURE__ */ q(T, {
1840
+ /* @__PURE__ */ J(E, {
1815
1841
  label: u("devportal.storeItemType", "Item Type"),
1816
1842
  value: d.manifestItemType,
1817
1843
  onChange: (e) => {
1818
1844
  let t = e.target.value;
1819
- C("manifestItemType", t), Le.has(t) ? C("manifestInstallType", "json") : d.manifestInstallType === "json" && C("manifestInstallType", "zip");
1845
+ k("manifestItemType", t), Be.has(t) ? k("manifestInstallType", "json") : d.manifestInstallType === "json" && k("manifestInstallType", "zip");
1820
1846
  },
1821
- options: ze,
1847
+ options: He,
1822
1848
  placeholder: u("devportal.selectItemType", "Select item type…"),
1823
1849
  hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1824
1850
  }),
1825
- /* @__PURE__ */ J("div", {
1851
+ /* @__PURE__ */ Y("div", {
1826
1852
  className: "grid gap-4 sm:grid-cols-2",
1827
- children: [/* @__PURE__ */ q(w, {
1853
+ children: [/* @__PURE__ */ J(T, {
1828
1854
  label: u("devportal.manifestDisplayName", "Display Name"),
1829
1855
  value: d.manifestDisplayName,
1830
- onChange: (e) => C("manifestDisplayName", e.target.value),
1856
+ onChange: (e) => k("manifestDisplayName", e.target.value),
1831
1857
  placeholder: "My Awesome Node"
1832
- }), /* @__PURE__ */ q(w, {
1858
+ }), /* @__PURE__ */ J(T, {
1833
1859
  label: u("devportal.manifestVersion", "Version"),
1834
1860
  value: d.manifestVersion,
1835
- onChange: (e) => C("manifestVersion", e.target.value),
1861
+ onChange: (e) => k("manifestVersion", e.target.value),
1836
1862
  placeholder: "1.0.0",
1837
1863
  hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1838
1864
  })]
1839
1865
  }),
1840
- xe && /* @__PURE__ */ q(E, {
1866
+ we && /* @__PURE__ */ J(D, {
1841
1867
  label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1842
1868
  value: d.manifestJsonContent,
1843
- onChange: (e) => C("manifestJsonContent", e.target.value),
1869
+ onChange: (e) => k("manifestJsonContent", e.target.value),
1844
1870
  rows: 12,
1845
1871
  placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1846
1872
  hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1847
1873
  }),
1848
- !xe && /* @__PURE__ */ J("div", {
1874
+ !we && /* @__PURE__ */ Y("div", {
1849
1875
  className: "space-y-3",
1850
1876
  children: [
1851
- /* @__PURE__ */ J("div", {
1877
+ /* @__PURE__ */ Y("div", {
1852
1878
  className: "flex items-center justify-between flex-wrap gap-2",
1853
- children: [/* @__PURE__ */ q("label", {
1879
+ children: [/* @__PURE__ */ J("label", {
1854
1880
  className: "text-sm font-medium",
1855
1881
  children: u("devportal.packageFile", "Package File")
1856
- }), /* @__PURE__ */ J("label", {
1882
+ }), /* @__PURE__ */ Y("label", {
1857
1883
  className: "flex items-center gap-2 text-sm cursor-pointer select-none",
1858
- children: [/* @__PURE__ */ q("input", {
1884
+ children: [/* @__PURE__ */ J("input", {
1859
1885
  type: "checkbox",
1860
- checked: Se,
1861
- onChange: (e) => C("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1886
+ checked: Te,
1887
+ onChange: (e) => k("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1862
1888
  className: "h-4 w-4 rounded border-border accent-primary"
1863
- }), /* @__PURE__ */ q("span", {
1889
+ }), /* @__PURE__ */ J("span", {
1864
1890
  className: "text-text-secondary",
1865
1891
  children: u("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
1866
1892
  })]
1867
1893
  })]
1868
1894
  }),
1869
- !Se && /* @__PURE__ */ J(K, { children: [
1870
- /* @__PURE__ */ J("div", {
1895
+ !Te && /* @__PURE__ */ Y(q, { children: [
1896
+ /* @__PURE__ */ Y("div", {
1871
1897
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1872
- children: [/* @__PURE__ */ q(R, {
1898
+ children: [/* @__PURE__ */ J(z, {
1873
1899
  size: 15,
1874
1900
  className: "mt-0.5 shrink-0"
1875
- }), /* @__PURE__ */ J("span", { children: [
1901
+ }), /* @__PURE__ */ Y("span", { children: [
1876
1902
  u("devportal.zipModelHint", "Package your code and a "),
1877
- /* @__PURE__ */ q("code", {
1903
+ /* @__PURE__ */ J("code", {
1878
1904
  className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
1879
1905
  children: "manifest.json"
1880
1906
  }),
1881
1907
  u("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
1882
1908
  ] })]
1883
1909
  }),
1884
- /* @__PURE__ */ J("div", {
1910
+ /* @__PURE__ */ Y("div", {
1885
1911
  onDragOver: (e) => {
1886
1912
  e.preventDefault(), y(!0);
1887
1913
  },
1888
1914
  onDragLeave: () => y(!1),
1889
- onDrop: (e) => void ye(e),
1890
- onClick: () => !A && ae.current?.click(),
1891
- className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", v ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", A && "pointer-events-none opacity-75"),
1892
- children: [/* @__PURE__ */ q("input", {
1893
- ref: ae,
1915
+ onDrop: (e) => void Se(e),
1916
+ onClick: () => !le && oe.current?.click(),
1917
+ className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", v ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", le && "pointer-events-none opacity-75"),
1918
+ children: [/* @__PURE__ */ J("input", {
1919
+ ref: oe,
1894
1920
  type: "file",
1895
1921
  accept: ".zip,application/zip,application/x-zip-compressed",
1896
1922
  className: "hidden",
1897
- onChange: (e) => void ve(e)
1898
- }), A ? /* @__PURE__ */ J(K, { children: [
1899
- /* @__PURE__ */ q(z, {
1923
+ onChange: (e) => void xe(e)
1924
+ }), le ? /* @__PURE__ */ Y(q, { children: [
1925
+ /* @__PURE__ */ J(B, {
1900
1926
  size: 28,
1901
1927
  className: "animate-spin text-primary"
1902
1928
  }),
1903
- /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
1929
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
1904
1930
  className: "text-sm font-medium",
1905
1931
  children: [
1906
1932
  u("devportal.uploading", "Uploading…"),
1907
1933
  " ",
1908
- ce,
1934
+ R,
1909
1935
  "%"
1910
1936
  ]
1911
- }), /* @__PURE__ */ q("p", {
1937
+ }), /* @__PURE__ */ J("p", {
1912
1938
  className: "text-xs text-text-secondary mt-0.5",
1913
1939
  children: u("devportal.uploadingHint", "Stored securely in your workspace")
1914
1940
  })] }),
1915
- /* @__PURE__ */ q("div", {
1941
+ /* @__PURE__ */ J("div", {
1916
1942
  className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
1917
- children: /* @__PURE__ */ q("div", {
1943
+ children: /* @__PURE__ */ J("div", {
1918
1944
  className: "h-full bg-primary transition-all",
1919
- style: { width: `${ce}%` }
1945
+ style: { width: `${R}%` }
1920
1946
  })
1921
1947
  })
1922
- ] }) : we ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(F, {
1948
+ ] }) : De ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, {
1923
1949
  size: 28,
1924
1950
  className: "text-status-success-text"
1925
- }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1951
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1926
1952
  className: "text-sm font-medium",
1927
- children: we
1928
- }), /* @__PURE__ */ q("p", {
1953
+ children: De
1954
+ }), /* @__PURE__ */ J("p", {
1929
1955
  className: "text-xs text-text-secondary mt-0.5",
1930
1956
  children: u("devportal.clickToReplace", "Click or drag to replace")
1931
- })] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, {
1957
+ })] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
1932
1958
  size: 28,
1933
1959
  className: "text-text-secondary"
1934
- }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1960
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1935
1961
  className: "text-sm font-medium",
1936
1962
  children: u("devportal.dropZipHere", "Drop your .zip here")
1937
- }), /* @__PURE__ */ q("p", {
1963
+ }), /* @__PURE__ */ J("p", {
1938
1964
  className: "text-xs text-text-secondary mt-0.5",
1939
1965
  children: u("devportal.orClickToBrowse", "or click to browse")
1940
1966
  })] })] })]
1941
1967
  }),
1942
- P && /* @__PURE__ */ q("p", {
1968
+ ue && /* @__PURE__ */ J("p", {
1943
1969
  className: "text-xs text-status-error-text",
1944
- children: P
1970
+ children: ue
1945
1971
  })
1946
1972
  ] }),
1947
- Se && /* @__PURE__ */ J("div", {
1973
+ Te && /* @__PURE__ */ Y("div", {
1948
1974
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1949
- children: [/* @__PURE__ */ q(R, {
1975
+ children: [/* @__PURE__ */ J(z, {
1950
1976
  size: 15,
1951
1977
  className: "mt-0.5 shrink-0"
1952
- }), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1978
+ }), /* @__PURE__ */ J("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1953
1979
  })
1954
1980
  ]
1955
1981
  }),
1956
- /* @__PURE__ */ J("div", {
1982
+ /* @__PURE__ */ Y("div", {
1957
1983
  className: "flex flex-wrap items-center gap-2 border-t pt-4",
1958
1984
  children: [
1959
- /* @__PURE__ */ q("input", {
1960
- ref: ie,
1985
+ /* @__PURE__ */ J("input", {
1986
+ ref: M,
1961
1987
  type: "file",
1962
1988
  accept: ".json,application/json",
1963
1989
  className: "hidden",
1964
- onChange: be
1990
+ onChange: Ce
1965
1991
  }),
1966
- /* @__PURE__ */ q("span", {
1992
+ /* @__PURE__ */ J("span", {
1967
1993
  className: "text-xs text-text-secondary mr-1",
1968
1994
  children: "manifest.json:"
1969
1995
  }),
1970
- /* @__PURE__ */ J("button", {
1996
+ /* @__PURE__ */ Y("button", {
1971
1997
  type: "button",
1972
- onClick: () => ie.current?.click(),
1998
+ onClick: () => M.current?.click(),
1973
1999
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
1974
- children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
2000
+ children: [/* @__PURE__ */ J(W, { size: 12 }), u("devportal.importManifest", "Import")]
1975
2001
  }),
1976
- /* @__PURE__ */ J("button", {
2002
+ /* @__PURE__ */ Y("button", {
1977
2003
  type: "button",
1978
- onClick: Y,
2004
+ onClick: Z,
1979
2005
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
1980
- children: [/* @__PURE__ */ q(le, { size: 12 }), u("devportal.exportManifest", "Export")]
2006
+ children: [/* @__PURE__ */ J(ce, { size: 12 }), u("devportal.exportManifest", "Export")]
1981
2007
  }),
1982
- /* @__PURE__ */ q("span", {
2008
+ /* @__PURE__ */ J("span", {
1983
2009
  className: "text-xs text-text-secondary",
1984
2010
  children: u("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
1985
2011
  })
@@ -1988,194 +2014,194 @@ var Ve = ({ app: n }) => {
1988
2014
  ]
1989
2015
  })
1990
2016
  }),
1991
- /* @__PURE__ */ q(_, {
2017
+ /* @__PURE__ */ J(_, {
1992
2018
  title: u("devportal.storePresentation", "Store Presence"),
1993
2019
  description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
1994
- children: /* @__PURE__ */ J("div", {
2020
+ children: /* @__PURE__ */ Y("div", {
1995
2021
  className: "space-y-5",
1996
2022
  children: [
1997
- /* @__PURE__ */ J("div", {
2023
+ /* @__PURE__ */ Y("div", {
1998
2024
  className: "grid gap-5 sm:grid-cols-2",
1999
- children: [/* @__PURE__ */ q(Fe, {
2025
+ children: [/* @__PURE__ */ J(Re, {
2000
2026
  label: u("devportal.iconUrl", "Icon"),
2001
2027
  value: d.iconUrl,
2002
- onChange: (e) => C("iconUrl", e),
2028
+ onChange: (e) => k("iconUrl", e),
2003
2029
  hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
2004
2030
  aspectClass: "aspect-square",
2005
- upload: ue,
2006
- uploading: L,
2007
- progress: de,
2008
- error: fe
2009
- }), /* @__PURE__ */ q(Fe, {
2031
+ upload: de,
2032
+ uploading: fe,
2033
+ progress: V,
2034
+ error: pe
2035
+ }), /* @__PURE__ */ J(Re, {
2010
2036
  label: u("devportal.bannerUrl", "Banner"),
2011
2037
  value: d.bannerUrl,
2012
- onChange: (e) => C("bannerUrl", e),
2038
+ onChange: (e) => k("bannerUrl", e),
2013
2039
  hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
2014
2040
  aspectClass: "aspect-video",
2015
- upload: pe,
2016
- uploading: B,
2017
- progress: me,
2018
- error: he
2041
+ upload: me,
2042
+ uploading: H,
2043
+ progress: G,
2044
+ error: ge
2019
2045
  })]
2020
2046
  }),
2021
- /* @__PURE__ */ q(w, {
2047
+ /* @__PURE__ */ J(T, {
2022
2048
  label: u("devportal.videoUrl", "Demo Video URL"),
2023
2049
  value: d.videoUrl,
2024
- onChange: (e) => C("videoUrl", e.target.value),
2050
+ onChange: (e) => k("videoUrl", e.target.value),
2025
2051
  placeholder: "https://...",
2026
2052
  hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
2027
2053
  }),
2028
- /* @__PURE__ */ q(E, {
2054
+ /* @__PURE__ */ J(D, {
2029
2055
  label: u("devportal.shortDescription", "Short Description"),
2030
2056
  value: d.shortDescription,
2031
- onChange: (e) => C("shortDescription", e.target.value),
2057
+ onChange: (e) => k("shortDescription", e.target.value),
2032
2058
  maxLength: 200,
2033
2059
  rows: 2,
2034
2060
  hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
2035
2061
  }),
2036
- /* @__PURE__ */ q(E, {
2062
+ /* @__PURE__ */ J(D, {
2037
2063
  label: u("devportal.longDescription", "Full Description"),
2038
2064
  value: d.description,
2039
- onChange: (e) => C("description", e.target.value),
2065
+ onChange: (e) => k("description", e.target.value),
2040
2066
  rows: 5,
2041
2067
  hint: u("devportal.fullDescHint", "Markdown supported")
2042
2068
  }),
2043
- /* @__PURE__ */ q(Ie, {
2069
+ /* @__PURE__ */ J(ze, {
2044
2070
  urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
2045
- onChange: (e) => C("screenshotsText", e.join("\n")),
2046
- upload: V,
2047
- uploading: W,
2048
- progress: _e,
2049
- error: G
2071
+ onChange: (e) => k("screenshotsText", e.join("\n")),
2072
+ upload: K,
2073
+ uploading: _e,
2074
+ progress: ve,
2075
+ error: X
2050
2076
  })
2051
2077
  ]
2052
2078
  })
2053
2079
  }),
2054
- /* @__PURE__ */ q(_, {
2080
+ /* @__PURE__ */ J(_, {
2055
2081
  title: u("devportal.linksPolicies", "Links & Policies"),
2056
2082
  description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
2057
- children: /* @__PURE__ */ J("div", {
2083
+ children: /* @__PURE__ */ Y("div", {
2058
2084
  className: "grid gap-4 sm:grid-cols-2",
2059
2085
  children: [
2060
- /* @__PURE__ */ q(w, {
2086
+ /* @__PURE__ */ J(T, {
2061
2087
  label: u("devportal.websiteUrl", "Website"),
2062
2088
  value: d.websiteUrl,
2063
- onChange: (e) => C("websiteUrl", e.target.value),
2089
+ onChange: (e) => k("websiteUrl", e.target.value),
2064
2090
  placeholder: "https://..."
2065
2091
  }),
2066
- /* @__PURE__ */ q(w, {
2092
+ /* @__PURE__ */ J(T, {
2067
2093
  label: u("devportal.documentationUrl", "Documentation"),
2068
2094
  value: d.documentationUrl,
2069
- onChange: (e) => C("documentationUrl", e.target.value),
2095
+ onChange: (e) => k("documentationUrl", e.target.value),
2070
2096
  placeholder: "https://..."
2071
2097
  }),
2072
- /* @__PURE__ */ q(w, {
2098
+ /* @__PURE__ */ J(T, {
2073
2099
  label: u("devportal.githubUrl", "GitHub"),
2074
2100
  value: d.githubUrl,
2075
- onChange: (e) => C("githubUrl", e.target.value),
2101
+ onChange: (e) => k("githubUrl", e.target.value),
2076
2102
  placeholder: "https://github.com/..."
2077
2103
  }),
2078
- /* @__PURE__ */ q(w, {
2104
+ /* @__PURE__ */ J(T, {
2079
2105
  label: u("devportal.supportUrl", "Support"),
2080
2106
  value: d.supportUrl,
2081
- onChange: (e) => C("supportUrl", e.target.value),
2107
+ onChange: (e) => k("supportUrl", e.target.value),
2082
2108
  placeholder: "https://..."
2083
2109
  }),
2084
- /* @__PURE__ */ q(w, {
2110
+ /* @__PURE__ */ J(T, {
2085
2111
  label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
2086
2112
  value: d.privacyPolicyUrl,
2087
- onChange: (e) => C("privacyPolicyUrl", e.target.value),
2113
+ onChange: (e) => k("privacyPolicyUrl", e.target.value),
2088
2114
  placeholder: "https://...",
2089
2115
  hint: u("devportal.requiredForStore", "Required for store submission")
2090
2116
  }),
2091
- /* @__PURE__ */ q(w, {
2117
+ /* @__PURE__ */ J(T, {
2092
2118
  label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
2093
2119
  value: d.termsOfServiceUrl,
2094
- onChange: (e) => C("termsOfServiceUrl", e.target.value),
2120
+ onChange: (e) => k("termsOfServiceUrl", e.target.value),
2095
2121
  placeholder: "https://...",
2096
2122
  hint: u("devportal.requiredForStore", "Required for store submission")
2097
2123
  })
2098
2124
  ]
2099
2125
  })
2100
2126
  }),
2101
- /* @__PURE__ */ q(_, {
2127
+ /* @__PURE__ */ J(_, {
2102
2128
  title: u("devportal.pricing", "Pricing"),
2103
2129
  description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
2104
- children: /* @__PURE__ */ J("div", {
2130
+ children: /* @__PURE__ */ Y("div", {
2105
2131
  className: "space-y-4",
2106
- children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
2132
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
2107
2133
  className: "mb-2 block text-sm font-medium",
2108
2134
  children: u("devportal.pricingType", "Pricing Type")
2109
- }), /* @__PURE__ */ q("div", {
2135
+ }), /* @__PURE__ */ J("div", {
2110
2136
  className: "flex flex-wrap gap-2",
2111
- children: Re.map((e) => /* @__PURE__ */ q("button", {
2137
+ children: Ve.map((e) => /* @__PURE__ */ J("button", {
2112
2138
  type: "button",
2113
- onClick: () => C("pricingType", e.value),
2139
+ onClick: () => k("pricingType", e.value),
2114
2140
  className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
2115
2141
  children: e.label
2116
2142
  }, e.value))
2117
- })] }), Ce && /* @__PURE__ */ J("div", {
2143
+ })] }), Ee && /* @__PURE__ */ Y("div", {
2118
2144
  className: "grid gap-4 sm:grid-cols-2",
2119
- children: [/* @__PURE__ */ q(w, {
2145
+ children: [/* @__PURE__ */ J(T, {
2120
2146
  label: u("devportal.price", "Price"),
2121
2147
  type: "number",
2122
2148
  value: d.price,
2123
- onChange: (e) => C("price", e.target.value),
2149
+ onChange: (e) => k("price", e.target.value),
2124
2150
  placeholder: "0.00"
2125
- }), /* @__PURE__ */ q(w, {
2151
+ }), /* @__PURE__ */ J(T, {
2126
2152
  label: u("devportal.currency", "Currency"),
2127
2153
  value: d.currency,
2128
- onChange: (e) => C("currency", e.target.value),
2154
+ onChange: (e) => k("currency", e.target.value),
2129
2155
  placeholder: "USD"
2130
2156
  })]
2131
2157
  })]
2132
2158
  })
2133
2159
  }),
2134
- /* @__PURE__ */ J("div", {
2160
+ /* @__PURE__ */ Y("div", {
2135
2161
  className: "border-t pt-6 flex items-center gap-3 flex-wrap",
2136
2162
  children: [
2137
- /* @__PURE__ */ q("button", {
2163
+ /* @__PURE__ */ J("button", {
2138
2164
  type: "button",
2139
2165
  onClick: ne,
2140
2166
  disabled: m,
2141
2167
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2142
- children: m ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
2168
+ children: m ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
2143
2169
  size: 16,
2144
2170
  className: "animate-spin"
2145
- }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(H, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
2171
+ }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(U, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
2146
2172
  }),
2147
- !Z && !X && /* @__PURE__ */ q("button", {
2173
+ !ke && !Oe && /* @__PURE__ */ J("button", {
2148
2174
  type: "button",
2149
2175
  onClick: () => void re(),
2150
- disabled: te || m,
2176
+ disabled: O || m,
2151
2177
  className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
2152
- children: te ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(z, {
2178
+ children: O ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
2153
2179
  size: 16,
2154
2180
  className: "animate-spin"
2155
- }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ge, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
2181
+ }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(he, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
2156
2182
  }),
2157
- !Z && X && /* @__PURE__ */ J("p", {
2183
+ !ke && Oe && /* @__PURE__ */ Y("p", {
2158
2184
  className: "text-xs text-muted-foreground flex items-center gap-1.5",
2159
- children: [/* @__PURE__ */ q(I, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
2185
+ children: [/* @__PURE__ */ J(se, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
2160
2186
  })
2161
2187
  ]
2162
2188
  })
2163
2189
  ]
2164
2190
  });
2165
2191
  }, Q = ({ label: e, value: n, trend: r }) => {
2166
- let { t: i } = N();
2167
- return /* @__PURE__ */ J("div", {
2192
+ let { t: i } = F();
2193
+ return /* @__PURE__ */ Y("div", {
2168
2194
  className: "rounded-lg border bg-card p-4",
2169
2195
  children: [
2170
- /* @__PURE__ */ q("p", {
2196
+ /* @__PURE__ */ J("p", {
2171
2197
  className: "text-sm text-muted-foreground",
2172
2198
  children: e
2173
2199
  }),
2174
- /* @__PURE__ */ q("p", {
2200
+ /* @__PURE__ */ J("p", {
2175
2201
  className: "text-2xl font-bold",
2176
2202
  children: n
2177
2203
  }),
2178
- r !== void 0 && /* @__PURE__ */ J("p", {
2204
+ r !== void 0 && /* @__PURE__ */ Y("p", {
2179
2205
  className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
2180
2206
  children: [
2181
2207
  r > 0 ? "+" : "",
@@ -2189,13 +2215,13 @@ var Ve = ({ app: n }) => {
2189
2215
  })
2190
2216
  ]
2191
2217
  });
2192
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ J("a", {
2218
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ Y("a", {
2193
2219
  href: t,
2194
2220
  target: "_blank",
2195
2221
  rel: "noopener noreferrer",
2196
2222
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
2197
- children: [/* @__PURE__ */ q(L, { size: 14 }), e]
2198
- }), He = [
2223
+ children: [/* @__PURE__ */ J(R, { size: 14 }), e]
2224
+ }), qe = [
2199
2225
  {
2200
2226
  id: "auth",
2201
2227
  label: "Authentication",
@@ -2267,14 +2293,14 @@ var Ve = ({ app: n }) => {
2267
2293
  description: "Access control configuration"
2268
2294
  }
2269
2295
  ];
2270
- function Ue(e) {
2271
- let t = Object.fromEntries(He.map((e) => [e.id, "none"]));
2296
+ function Je(e) {
2297
+ let t = Object.fromEntries(qe.map((e) => [e.id, "none"]));
2272
2298
  if (!e || !Array.isArray(e.permissions)) return t;
2273
2299
  for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
2274
2300
  return t;
2275
2301
  }
2276
- var We = ({ app: e }) => {
2277
- let t = e.manifest ?? {}, [n, r] = M(() => Ue(t)), [i, a] = M(!1), [o, s] = M(!1), [c] = h(), l = (e, t) => {
2302
+ var Ye = ({ app: e }) => {
2303
+ let t = e.manifest ?? {}, [n, r] = P(() => Je(t)), [i, a] = P(!1), [o, s] = P(!1), [c] = h(), l = (e, t) => {
2278
2304
  s(!1), r((n) => ({
2279
2305
  ...n,
2280
2306
  [e]: t
@@ -2305,41 +2331,41 @@ var We = ({ app: e }) => {
2305
2331
  "read",
2306
2332
  "write"
2307
2333
  ];
2308
- return /* @__PURE__ */ q(_, {
2334
+ return /* @__PURE__ */ J(_, {
2309
2335
  title: "Permissions",
2310
2336
  description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
2311
- children: /* @__PURE__ */ J("div", {
2337
+ children: /* @__PURE__ */ Y("div", {
2312
2338
  className: "space-y-4",
2313
2339
  children: [
2314
- /* @__PURE__ */ q("div", {
2340
+ /* @__PURE__ */ J("div", {
2315
2341
  className: "overflow-x-auto rounded-lg border border-border",
2316
- children: /* @__PURE__ */ J("table", {
2342
+ children: /* @__PURE__ */ Y("table", {
2317
2343
  className: "w-full text-sm",
2318
- children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", {
2344
+ children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", {
2319
2345
  className: "border-b border-border bg-muted/50",
2320
- children: [/* @__PURE__ */ q("th", {
2346
+ children: [/* @__PURE__ */ J("th", {
2321
2347
  className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
2322
2348
  children: "Resource"
2323
- }), f.map((e) => /* @__PURE__ */ q("th", {
2349
+ }), f.map((e) => /* @__PURE__ */ J("th", {
2324
2350
  className: "px-4 py-3 text-center font-medium text-muted-foreground",
2325
2351
  children: d[e]
2326
2352
  }, e))]
2327
- }) }), /* @__PURE__ */ q("tbody", {
2353
+ }) }), /* @__PURE__ */ J("tbody", {
2328
2354
  className: "divide-y divide-border",
2329
- children: He.map((e) => /* @__PURE__ */ J("tr", {
2355
+ children: qe.map((e) => /* @__PURE__ */ Y("tr", {
2330
2356
  className: "hover:bg-muted/30 transition-colors",
2331
- children: [/* @__PURE__ */ J("td", {
2357
+ children: [/* @__PURE__ */ Y("td", {
2332
2358
  className: "px-4 py-3",
2333
- children: [/* @__PURE__ */ q("p", {
2359
+ children: [/* @__PURE__ */ J("p", {
2334
2360
  className: "font-medium text-foreground",
2335
2361
  children: e.label
2336
- }), /* @__PURE__ */ q("p", {
2362
+ }), /* @__PURE__ */ J("p", {
2337
2363
  className: "text-xs text-muted-foreground",
2338
2364
  children: e.description
2339
2365
  })]
2340
- }), f.map((t) => /* @__PURE__ */ q("td", {
2366
+ }), f.map((t) => /* @__PURE__ */ J("td", {
2341
2367
  className: "px-4 py-3 text-center",
2342
- children: /* @__PURE__ */ q("input", {
2368
+ children: /* @__PURE__ */ J("input", {
2343
2369
  type: "radio",
2344
2370
  name: `perm-${e.id}`,
2345
2371
  value: t,
@@ -2352,27 +2378,27 @@ var We = ({ app: e }) => {
2352
2378
  })]
2353
2379
  })
2354
2380
  }),
2355
- /* @__PURE__ */ J("div", {
2381
+ /* @__PURE__ */ Y("div", {
2356
2382
  className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
2357
- children: [/* @__PURE__ */ q(R, {
2383
+ children: [/* @__PURE__ */ J(z, {
2358
2384
  size: 14,
2359
2385
  className: "flex-shrink-0 mt-0.5"
2360
- }), /* @__PURE__ */ J("span", { children: [/* @__PURE__ */ q("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2386
+ }), /* @__PURE__ */ Y("span", { children: [/* @__PURE__ */ J("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2361
2387
  }),
2362
- /* @__PURE__ */ J("div", {
2388
+ /* @__PURE__ */ Y("div", {
2363
2389
  className: "flex items-center justify-end gap-3",
2364
- children: [o && /* @__PURE__ */ J("span", {
2390
+ children: [o && /* @__PURE__ */ Y("span", {
2365
2391
  className: "flex items-center gap-1.5 text-sm text-status-success-text",
2366
- children: [/* @__PURE__ */ q(F, { size: 14 }), "Saved"]
2367
- }), /* @__PURE__ */ J("button", {
2392
+ children: [/* @__PURE__ */ J(L, { size: 14 }), "Saved"]
2393
+ }), /* @__PURE__ */ Y("button", {
2368
2394
  type: "button",
2369
2395
  onClick: () => void u(),
2370
2396
  disabled: i,
2371
2397
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2372
- children: [i ? /* @__PURE__ */ q(z, {
2398
+ children: [i ? /* @__PURE__ */ J(B, {
2373
2399
  size: 14,
2374
2400
  className: "animate-spin"
2375
- }) : /* @__PURE__ */ q(V, { size: 14 }), "Save Permissions"]
2401
+ }) : /* @__PURE__ */ J(H, { size: 14 }), "Save Permissions"]
2376
2402
  })]
2377
2403
  })
2378
2404
  ]
@@ -2380,6 +2406,6 @@ var We = ({ app: e }) => {
2380
2406
  });
2381
2407
  };
2382
2408
  //#endregion
2383
- export { Te as ApplicationDetailPage };
2409
+ export { Oe as ApplicationDetailPage };
2384
2410
 
2385
2411
  //# sourceMappingURL=ApplicationDetailPage.js.map