@burdenoff/microfe-devportal 2026.616.1 → 2026.622.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,27 +2,27 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { LoadingState as n } from "../components/LoadingState.js";
4
4
  import { EmptyState as r } from "../components/EmptyState.js";
5
- import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useInstallApplicationMutation as l, useRevokeDelegationMutation as u, useRotateAppSecretMutation as d, useUpdateApplicationMutation as f } from "../../generated/global-operations.js";
6
- import { PageLayout as p, PageSection as m } from "../components/PageLayout.js";
7
- import { APP_TYPE_LABELS as h } from "../utils/constants.js";
8
- import { FeaturedBadge as g, StatusBadge as _, VerifiedBadge as v } from "../components/StatusBadge.js";
9
- import { SelectionCheckbox as y } from "../components/SelectionCheckbox.js";
10
- import { nativeNotify as b } from "../../utils/nativeBridge.js";
11
- import { NewSecretAlert as x } from "../components/SecretDisplay.js";
12
- import { DataTable as S, DetailList as C } from "../components/DataTable.js";
5
+ import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useInstallApplicationMutation as l, useRevokeDelegationMutation as u, useRotateAppSecretMutation as d, useSubmitApplicationMutation as f, useUpdateApplicationMutation as p } from "../../generated/global-operations.js";
6
+ import { PageLayout as m, PageSection as h } from "../components/PageLayout.js";
7
+ import { APP_TYPE_LABELS as g } from "../utils/constants.js";
8
+ import { FeaturedBadge as _, StatusBadge as v, VerifiedBadge as y } from "../components/StatusBadge.js";
9
+ import { SelectionCheckbox as b } from "../components/SelectionCheckbox.js";
10
+ import { nativeNotify as x } from "../../utils/nativeBridge.js";
11
+ import { NewSecretAlert as S } from "../components/SecretDisplay.js";
12
+ import { DataTable as C, DetailList as ee } from "../components/DataTable.js";
13
13
  import { InputField as w, SelectField as T, TextareaField as E } from "../components/FormField.js";
14
- import { ConfirmDialog as D } from "../components/ConfirmDialog.js";
15
- import { GrantDelegationModal as ee } from "../components/GrantDelegationModal.js";
14
+ import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
15
+ import { GrantDelegationModal as D } from "../components/GrantDelegationModal.js";
16
16
  import { DEVPORTAL_PERMISSIONS as O } from "../constants/permissions.js";
17
17
  import { useDevportalPermission as k } from "../hooks/usePermission.js";
18
- import { usePackageUpload as te } from "../hooks/usePackageUpload.js";
19
- import { useCallback as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
18
+ import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
19
+ import { useCallback as j, useEffect as ne, useMemo as M, useRef as N, useState as P } from "react";
20
20
  import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as I, AppWindow as ne, BarChart3 as L, CheckCircle as R, Clock as z, Download as re, Edit as ie, ExternalLink as B, FlaskConical as ae, Info as oe, Key as V, Loader2 as H, MoreHorizontal as se, Plus as U, Power as ce, RefreshCw as le, Shield as W, Store as G, Upload as K, Users as q, Webhook as ue, XCircle as de } from "lucide-react";
22
- import { useParams as fe } from "react-router-dom";
23
- import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
21
+ import { AlertCircle as re, AppWindow as ie, BarChart3 as I, CheckCircle as L, Clock as ae, Download as oe, Edit as se, ExternalLink as R, FlaskConical as ce, Info as z, Key as B, Loader2 as V, MoreHorizontal as H, Plus as U, Power as le, RefreshCw as ue, Shield as W, Store as de, Upload as G, Users as fe, Webhook as pe, X as me, XCircle as K } from "lucide-react";
22
+ import { useParams as he } from "react-router-dom";
23
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
24
24
  //#region src/devportal/pages/ApplicationDetailPage.tsx
25
- function pe(e) {
25
+ function ge(e) {
26
26
  return e ? {
27
27
  id: e.id,
28
28
  name: e.name,
@@ -62,7 +62,7 @@ function pe(e) {
62
62
  updatedAt: e.updatedAt
63
63
  } : null;
64
64
  }
65
- function Z(e) {
65
+ function _e(e) {
66
66
  return {
67
67
  id: e.id,
68
68
  applicationId: e.applicationId,
@@ -86,7 +86,7 @@ function Z(e) {
86
86
  updatedAt: e.updatedAt
87
87
  };
88
88
  }
89
- function me(e) {
89
+ function ve(e) {
90
90
  return {
91
91
  id: e.id,
92
92
  applicationId: e.applicationId,
@@ -102,7 +102,7 @@ function me(e) {
102
102
  createdAt: e.createdAt
103
103
  };
104
104
  }
105
- function he(e) {
105
+ function ye(e) {
106
106
  return {
107
107
  id: e.id,
108
108
  appId: e.appId,
@@ -124,11 +124,11 @@ function he(e) {
124
124
  revokedBy: e.revokedBy || void 0
125
125
  };
126
126
  }
127
- var ge = [
127
+ var be = [
128
128
  {
129
129
  id: "overview",
130
130
  label: "Overview",
131
- icon: ne
131
+ icon: ie
132
132
  },
133
133
  {
134
134
  id: "oauth",
@@ -138,359 +138,362 @@ var ge = [
138
138
  {
139
139
  id: "api-keys",
140
140
  label: "API Keys",
141
- icon: V
141
+ icon: B
142
142
  },
143
143
  {
144
144
  id: "webhooks",
145
145
  label: "Webhooks",
146
- icon: ue
146
+ icon: pe
147
147
  },
148
148
  {
149
149
  id: "delegations",
150
150
  label: "Delegations",
151
- icon: q
151
+ icon: fe
152
152
  },
153
153
  {
154
154
  id: "analytics",
155
155
  label: "Analytics",
156
- icon: L
156
+ icon: I
157
157
  },
158
158
  {
159
159
  id: "playground",
160
160
  label: "API Playground",
161
- icon: B
161
+ icon: R
162
162
  },
163
163
  {
164
164
  id: "store-listing",
165
165
  label: "Store Listing",
166
- icon: G
166
+ icon: de
167
167
  }
168
- ], _e = {
168
+ ], xe = {
169
169
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
170
170
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
171
171
  EXPIRED: "bg-bg-sunken text-text-secondary"
172
- }, ve = ({ message: e = "Loading..." }) => /* @__PURE__ */ X("div", {
172
+ }, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
173
173
  className: "flex items-center justify-center gap-3 py-12",
174
- children: [/* @__PURE__ */ Y(H, {
174
+ children: [/* @__PURE__ */ J(V, {
175
175
  size: 20,
176
176
  className: "animate-spin text-muted-foreground"
177
- }), /* @__PURE__ */ Y("p", {
177
+ }), /* @__PURE__ */ J("p", {
178
178
  className: "text-sm text-muted-foreground",
179
179
  children: e
180
180
  })]
181
- }), ye = ({ message: e }) => /* @__PURE__ */ X("div", {
181
+ }), Z = ({ message: e }) => /* @__PURE__ */ Y("div", {
182
182
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
183
- children: [/* @__PURE__ */ Y(I, {
183
+ children: [/* @__PURE__ */ J(re, {
184
184
  size: 32,
185
185
  className: "text-destructive"
186
- }), /* @__PURE__ */ Y("p", {
186
+ }), /* @__PURE__ */ J("p", {
187
187
  className: "text-sm text-muted-foreground",
188
188
  children: e
189
189
  })]
190
- }), be = () => {
190
+ }), Se = () => {
191
191
  let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = F(), f = (e, t) => {
192
192
  let n = u(e);
193
193
  return n === e ? t : n;
194
- }, { allowed: m } = k(O.APP_UPDATE), { allowed: y } = k(O.APP_DELETE), { appId: S } = fe(), [C, w] = P("overview"), [T, E] = P(!1), [te, j] = P(!1), [M, N] = P(null), [L, R] = P(!1), { data: re, loading: B, error: oe } = s({
195
- variables: { id: S },
196
- skip: !S
197
- }), [V, { loading: se }] = d(), [U, { loading: W }] = a(), [G, { loading: K }] = l(), q = A((e) => {
194
+ }, { allowed: p } = k(O.APP_UPDATE), { allowed: h } = k(O.APP_DELETE), { appId: b } = he(), [C, ee] = P("overview"), [w, T] = P(!1), [E, A] = P(!1), [ne, M] = P(null), [N, I] = P(!1), { data: L, loading: oe, error: R } = s({
195
+ variables: { id: b },
196
+ skip: !b
197
+ }), [z, { loading: B }] = d(), [H, { loading: U }] = a(), [W, { loading: de }] = l(), G = j((e) => {
198
198
  i?.(`${o}${e}`);
199
- }, [i, o]), ue = A(async () => {
200
- if (S) try {
201
- let e = (await V({ variables: { id: S } })).data?.rotateAppSecret.clientSecret;
202
- e && N(e), E(!1);
199
+ }, [i, o]), fe = j(async () => {
200
+ let e = L?.application?.appId;
201
+ if (e) try {
202
+ let t = (await z({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
203
+ t && M(t), T(!1);
203
204
  } catch {}
204
- }, [S, V]), de = A(async () => {
205
- if (S) try {
206
- await U({ variables: { id: S } }), j(!1), q("/apps");
205
+ }, [L?.application?.appId, z]), pe = j(async () => {
206
+ if (b) try {
207
+ await H({ variables: { id: b } }), A(!1), G("/apps");
207
208
  } catch {}
208
209
  }, [
209
- S,
210
- U,
211
- q
212
- ]), J = A(async () => {
213
- if (!(!S || !c)) try {
214
- await G({ variables: { input: {
215
- applicationId: S,
210
+ b,
211
+ H,
212
+ G
213
+ ]), me = j(async () => {
214
+ if (!(!b || !c)) try {
215
+ await W({ variables: { input: {
216
+ applicationId: b,
216
217
  scope: "WORKSPACE",
217
218
  workspaceId: c,
218
219
  autoUpdate: !1
219
- } } }), b("success");
220
+ } } }), x("success");
220
221
  } catch {
221
- b("error");
222
+ x("error");
222
223
  }
223
224
  }, [
224
- S,
225
+ b,
225
226
  c,
226
- G
227
+ W
227
228
  ]);
228
- if (B && !re) return /* @__PURE__ */ Y(n, { message: f("devportal.loadingApplication", "Loading application...") });
229
- if (oe) return /* @__PURE__ */ Y(p, {
229
+ if (oe && !L) return /* @__PURE__ */ J(n, { message: f("devportal.loadingApplication", "Loading application...") });
230
+ if (R) return /* @__PURE__ */ J(m, {
230
231
  title: f("devportal.error", "Error"),
231
232
  backLink: `${o}/apps`,
232
233
  backLabel: f("devportal.backToApplications", "Back to Applications"),
233
- children: /* @__PURE__ */ X("div", {
234
+ children: /* @__PURE__ */ Y("div", {
234
235
  className: "flex flex-col items-center justify-center py-12 text-center",
235
236
  children: [
236
- /* @__PURE__ */ Y(I, {
237
+ /* @__PURE__ */ J(re, {
237
238
  size: 48,
238
239
  className: "text-destructive mb-4"
239
240
  }),
240
- /* @__PURE__ */ Y("h3", {
241
+ /* @__PURE__ */ J("h3", {
241
242
  className: "text-lg font-semibold mb-2",
242
243
  children: f("devportal.failedToLoadApplication", "Failed to load application")
243
244
  }),
244
- /* @__PURE__ */ Y("p", {
245
+ /* @__PURE__ */ J("p", {
245
246
  className: "text-sm text-muted-foreground",
246
- children: oe.message
247
+ children: R.message
247
248
  })
248
249
  ]
249
250
  })
250
251
  });
251
- let Z = pe(re?.application);
252
- return Z ? /* @__PURE__ */ X(p, {
253
- title: Z.name,
254
- description: Z.shortDescription,
252
+ let K = ge(L?.application);
253
+ return K ? /* @__PURE__ */ Y(m, {
254
+ title: K.name,
255
+ description: K.shortDescription,
255
256
  backLink: `${o}/apps`,
256
257
  backLabel: f("devportal.backToApplications", "Back to Applications"),
257
- actions: /* @__PURE__ */ X("div", {
258
+ actions: /* @__PURE__ */ Y("div", {
258
259
  className: "flex items-center gap-2",
259
260
  children: [
260
- /* @__PURE__ */ X("button", {
261
- onClick: () => E(!0),
262
- className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
263
- children: [/* @__PURE__ */ Y(le, { size: 16 }), f("devportal.rotateSecret", "Rotate Secret")]
261
+ /* @__PURE__ */ Y("button", {
262
+ onClick: () => T(!0),
263
+ disabled: !K.appId,
264
+ title: K.appId ? f("devportal.rotateSecretHint", "Generate a new client secret") : f("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
265
+ 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",
266
+ children: [/* @__PURE__ */ J(ue, { size: 16 }), f("devportal.rotateSecret", "Rotate Secret")]
264
267
  }),
265
- /* @__PURE__ */ X("button", {
266
- onClick: () => q(`/apps/${Z.id}/versions`),
268
+ /* @__PURE__ */ Y("button", {
269
+ onClick: () => G(`/apps/${K.id}/versions`),
267
270
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
268
- children: [/* @__PURE__ */ Y(z, { size: 16 }), f("devportal.versions", "Versions")]
271
+ children: [/* @__PURE__ */ J(ae, { size: 16 }), f("devportal.versions", "Versions")]
269
272
  }),
270
- /* @__PURE__ */ X("button", {
271
- onClick: () => void J(),
272
- disabled: K || !c,
273
+ /* @__PURE__ */ Y("button", {
274
+ onClick: () => void me(),
275
+ disabled: de || !c,
273
276
  "aria-disabled": !c,
274
277
  title: c ? f("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : f("devportal.noWorkspaceContext", "No workspace context available"),
275
278
  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",
276
- children: [K ? /* @__PURE__ */ Y(H, {
279
+ children: [de ? /* @__PURE__ */ J(V, {
277
280
  size: 16,
278
281
  className: "animate-spin"
279
- }) : /* @__PURE__ */ Y(ae, { size: 16 }), f("devportal.testInWorkspace", "Test in Workspace")]
282
+ }) : /* @__PURE__ */ J(ce, { size: 16 }), f("devportal.testInWorkspace", "Test in Workspace")]
280
283
  }),
281
- /* @__PURE__ */ X("button", {
282
- onClick: () => q(`/apps/${Z.id}/edit`),
283
- disabled: !m,
284
- "aria-disabled": !m,
284
+ /* @__PURE__ */ Y("button", {
285
+ onClick: () => G(`/apps/${K.id}/edit`),
286
+ disabled: !p,
287
+ "aria-disabled": !p,
285
288
  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",
286
- children: [/* @__PURE__ */ Y(ie, { size: 16 }), f("devportal.editApp", "Edit App")]
289
+ children: [/* @__PURE__ */ J(se, { size: 16 }), f("devportal.editApp", "Edit App")]
287
290
  }),
288
- /* @__PURE__ */ X("button", {
289
- onClick: () => j(!0),
290
- disabled: !y,
291
- "aria-disabled": !y,
291
+ /* @__PURE__ */ Y("button", {
292
+ onClick: () => A(!0),
293
+ disabled: !h,
294
+ "aria-disabled": !h,
292
295
  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",
293
- children: [/* @__PURE__ */ Y(ce, { size: 16 }), f("devportal.deactivate", "Deactivate")]
296
+ children: [/* @__PURE__ */ J(le, { size: 16 }), f("devportal.deactivate", "Deactivate")]
294
297
  })
295
298
  ]
296
299
  }),
297
300
  children: [
298
- M && /* @__PURE__ */ Y(x, {
301
+ ne && /* @__PURE__ */ J(S, {
299
302
  title: f("devportal.newAppSecretGenerated", "New App Secret Generated"),
300
- secret: M,
303
+ secret: ne,
301
304
  description: f("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
302
- onDismiss: () => N(null)
305
+ onDismiss: () => M(null)
303
306
  }),
304
- /* @__PURE__ */ X("div", {
307
+ /* @__PURE__ */ Y("div", {
305
308
  className: "flex flex-wrap items-center gap-2",
306
309
  children: [
307
- /* @__PURE__ */ Y(_, {
308
- status: Z.status,
310
+ /* @__PURE__ */ J(v, {
311
+ status: K.status,
309
312
  type: "app"
310
313
  }),
311
- /* @__PURE__ */ Y(_, {
312
- status: Z.visibility,
314
+ /* @__PURE__ */ J(v, {
315
+ status: K.visibility,
313
316
  type: "app"
314
317
  }),
315
- Z.isVerified && /* @__PURE__ */ Y(v, { verified: !0 }),
316
- Z.isFeatured && /* @__PURE__ */ Y(g, {}),
317
- /* @__PURE__ */ Y("span", {
318
+ K.isVerified && /* @__PURE__ */ J(y, { verified: !0 }),
319
+ K.isFeatured && /* @__PURE__ */ J(_, {}),
320
+ /* @__PURE__ */ J("span", {
318
321
  className: "text-sm text-muted-foreground",
319
- children: h[Z.appType] || Z.appType
322
+ children: g[K.appType] || K.appType
320
323
  })
321
324
  ]
322
325
  }),
323
- /* @__PURE__ */ Y("div", {
326
+ /* @__PURE__ */ J("div", {
324
327
  className: "border-b",
325
- children: /* @__PURE__ */ Y("nav", {
328
+ children: /* @__PURE__ */ J("nav", {
326
329
  className: "-mb-px flex gap-4 overflow-x-auto",
327
330
  role: "tablist",
328
331
  "aria-label": f("devportal.applicationSections", "Application sections"),
329
- children: ge.map((e) => {
332
+ children: be.map((e) => {
330
333
  let n = e.icon;
331
- return /* @__PURE__ */ X("button", {
334
+ return /* @__PURE__ */ Y("button", {
332
335
  id: `application-tab-${e.id}`,
333
336
  role: "tab",
334
337
  "aria-selected": C === e.id,
335
338
  "aria-controls": `application-panel-${e.id}`,
336
- onClick: () => w(e.id),
339
+ onClick: () => ee(e.id),
337
340
  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"),
338
- children: [/* @__PURE__ */ Y(n, { size: 16 }), e.label]
341
+ children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
339
342
  }, e.id);
340
343
  })
341
344
  })
342
345
  }),
343
- /* @__PURE__ */ X("div", {
346
+ /* @__PURE__ */ Y("div", {
344
347
  className: "mt-6",
345
348
  id: `application-panel-${C}`,
346
349
  role: "tabpanel",
347
350
  "aria-labelledby": `application-tab-${C}`,
348
351
  tabIndex: 0,
349
352
  children: [
350
- C === "overview" && /* @__PURE__ */ Y(Ee, { app: Z }),
351
- C === "oauth" && /* @__PURE__ */ Y(xe, {
352
- appId: Z.appId || Z.id,
353
- onNavigate: q
353
+ C === "overview" && /* @__PURE__ */ J(Oe, { app: K }),
354
+ C === "oauth" && /* @__PURE__ */ J(Ce, {
355
+ appId: K.appId || K.id,
356
+ onNavigate: G
354
357
  }),
355
- C === "api-keys" && /* @__PURE__ */ Y(Se, {
356
- appId: Z.appId || Z.id,
357
- onNavigate: q
358
+ C === "api-keys" && /* @__PURE__ */ J(we, {
359
+ appId: K.appId || K.id,
360
+ onNavigate: G
358
361
  }),
359
- C === "webhooks" && /* @__PURE__ */ Y(Ce, {
360
- appId: Z.id,
361
- onNavigate: q
362
+ C === "webhooks" && /* @__PURE__ */ J(Te, {
363
+ appId: K.id,
364
+ onNavigate: G
362
365
  }),
363
- C === "delegations" && /* @__PURE__ */ Y(we, {
364
- authAppId: Z.appId || void 0,
365
- appName: Z.name,
366
- onGrantDelegation: () => R(!0),
367
- onNavigate: q
366
+ C === "delegations" && /* @__PURE__ */ J(Ee, {
367
+ authAppId: K.appId || void 0,
368
+ appName: K.name,
369
+ onGrantDelegation: () => I(!0),
370
+ onNavigate: G
368
371
  }),
369
- C === "analytics" && /* @__PURE__ */ Y(Te, { appId: Z.id }),
370
- C === "playground" && /* @__PURE__ */ Y(je, { app: Z }),
371
- C === "store-listing" && /* @__PURE__ */ Y(Le, { app: Z })
372
+ C === "analytics" && /* @__PURE__ */ J(De, { appId: K.id }),
373
+ C === "playground" && /* @__PURE__ */ J(Ne, { app: K }),
374
+ C === "store-listing" && /* @__PURE__ */ J(Be, { app: K })
372
375
  ]
373
376
  }),
374
- /* @__PURE__ */ Y(D, {
375
- open: T,
376
- onOpenChange: E,
377
- onConfirm: ue,
377
+ /* @__PURE__ */ J(te, {
378
+ open: w,
379
+ onOpenChange: T,
380
+ onConfirm: fe,
378
381
  title: f("devportal.rotateAppSecret", "Rotate App Secret"),
379
382
  description: f("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."),
380
383
  confirmLabel: f("devportal.rotateSecret", "Rotate Secret"),
381
384
  cancelLabel: f("devportal.cancel", "Cancel"),
382
385
  variant: "warning",
383
- loading: se
386
+ loading: B
384
387
  }),
385
- /* @__PURE__ */ Y(D, {
386
- open: te,
387
- onOpenChange: j,
388
- onConfirm: de,
388
+ /* @__PURE__ */ J(te, {
389
+ open: E,
390
+ onOpenChange: A,
391
+ onConfirm: pe,
389
392
  title: f("devportal.deactivateApplication", "Deactivate Application"),
390
393
  description: f("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."),
391
394
  confirmLabel: f("devportal.deactivate", "Deactivate"),
392
395
  cancelLabel: f("devportal.cancel", "Cancel"),
393
396
  variant: "destructive",
394
- loading: W
397
+ loading: U
395
398
  }),
396
- /* @__PURE__ */ Y(ee, {
397
- open: L,
398
- onOpenChange: R,
399
- appId: Z.appId || "",
400
- appName: Z.name,
401
- appScopes: Z.scopes?.map((e) => e.scope) ?? [],
399
+ /* @__PURE__ */ J(D, {
400
+ open: N,
401
+ onOpenChange: I,
402
+ appId: K.appId || "",
403
+ appName: K.name,
404
+ appScopes: K.scopes?.map((e) => e.scope) ?? [],
402
405
  onSuccess: () => {
403
- R(!1);
406
+ I(!1);
404
407
  }
405
408
  })
406
409
  ]
407
- }) : /* @__PURE__ */ Y(p, {
410
+ }) : /* @__PURE__ */ J(m, {
408
411
  title: f("devportal.notFound", "Not Found"),
409
412
  backLink: `${o}/apps`,
410
413
  backLabel: f("devportal.backToApplications", "Back to Applications"),
411
- children: /* @__PURE__ */ Y(r, {
412
- icon: /* @__PURE__ */ Y(ne, { size: 48 }),
414
+ children: /* @__PURE__ */ J(r, {
415
+ icon: /* @__PURE__ */ J(ie, { size: 48 }),
413
416
  title: f("devportal.applicationNotFound", "Application not found"),
414
417
  description: f("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
415
418
  })
416
419
  });
417
- }, xe = ({ onNavigate: e }) => {
420
+ }, Ce = ({ onNavigate: e }) => {
418
421
  let { t } = F(), n = (e, n) => {
419
422
  let r = t(e);
420
423
  return r === e ? n : r;
421
424
  };
422
- return /* @__PURE__ */ X("div", {
425
+ return /* @__PURE__ */ Y("div", {
423
426
  className: "space-y-4 py-4 text-center",
424
427
  children: [
425
- /* @__PURE__ */ Y(W, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
426
- /* @__PURE__ */ Y("h3", {
428
+ /* @__PURE__ */ J(W, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
429
+ /* @__PURE__ */ J("h3", {
427
430
  className: "font-medium",
428
431
  children: n("devportal.oauthApps", "OAuth Apps")
429
432
  }),
430
- /* @__PURE__ */ Y("p", {
433
+ /* @__PURE__ */ J("p", {
431
434
  className: "text-sm text-muted-foreground",
432
435
  children: n("devportal.oauthAppsManagedCentrally", "OAuth apps are now managed centrally. Visit the OAuth Apps page to create and manage your apps.")
433
436
  }),
434
- /* @__PURE__ */ X("button", {
437
+ /* @__PURE__ */ Y("button", {
435
438
  onClick: () => e("/oauth"),
436
439
  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",
437
- children: [/* @__PURE__ */ Y(B, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
440
+ children: [/* @__PURE__ */ J(R, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
438
441
  })
439
442
  ]
440
443
  });
441
- }, Se = ({ onNavigate: e }) => {
444
+ }, we = ({ onNavigate: e }) => {
442
445
  let { t } = F(), n = (e, n) => {
443
446
  let r = t(e);
444
447
  return r === e ? n : r;
445
448
  };
446
- return /* @__PURE__ */ X("div", {
449
+ return /* @__PURE__ */ Y("div", {
447
450
  className: "space-y-4 py-4 text-center",
448
451
  children: [
449
- /* @__PURE__ */ Y(V, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
450
- /* @__PURE__ */ Y("h3", {
452
+ /* @__PURE__ */ J(B, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
453
+ /* @__PURE__ */ J("h3", {
451
454
  className: "font-medium",
452
455
  children: n("devportal.apiKeys", "API Keys")
453
456
  }),
454
- /* @__PURE__ */ Y("p", {
457
+ /* @__PURE__ */ J("p", {
455
458
  className: "text-sm text-muted-foreground",
456
459
  children: n("devportal.apiKeysManagedCentrally", "API keys are now managed centrally. Visit the API Keys page to generate and manage your keys.")
457
460
  }),
458
- /* @__PURE__ */ X("button", {
461
+ /* @__PURE__ */ Y("button", {
459
462
  onClick: () => e("/api-keys"),
460
463
  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",
461
- children: [/* @__PURE__ */ Y(B, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
464
+ children: [/* @__PURE__ */ J(R, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
462
465
  })
463
466
  ]
464
467
  });
465
- }, Ce = ({ appId: e, onNavigate: t }) => {
468
+ }, Te = ({ appId: e, onNavigate: t }) => {
466
469
  let { t: n } = F(), r = (e, t) => {
467
470
  let r = n(e);
468
471
  return r === e ? t : r;
469
472
  }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
470
- return a ? /* @__PURE__ */ Y(ve, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ Y(ye, { message: o.message }) : /* @__PURE__ */ Y(De, {
473
+ return a ? /* @__PURE__ */ J(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Z, { message: o.message }) : /* @__PURE__ */ J(ke, {
471
474
  appId: e,
472
- webhooks: (i?.webhooks ?? []).map(Z),
475
+ webhooks: (i?.webhooks ?? []).map(_e),
473
476
  onNavigate: t
474
477
  });
475
- }, we = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
478
+ }, Ee = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
476
479
  let { t: o } = F(), s = (e, t) => {
477
480
  let n = o(e);
478
481
  return n === e ? t : n;
479
- }, { data: c, loading: l, error: d, refetch: f } = i(), [p] = u(), [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(he) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = M(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), E = C.some((e) => v.has(e.id)) && !T, ee = A((e, t) => {
482
+ }, { data: c, loading: l, error: d, refetch: f } = i(), [p] = u(), [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(ye) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = M(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = j((e, t) => {
480
483
  y((n) => {
481
484
  let r = new Set(n);
482
485
  return t ? r.add(e) : r.delete(e), r;
483
486
  });
484
- }, []), O = A((e) => {
487
+ }, []), D = j((e) => {
485
488
  y((t) => {
486
489
  let n = new Set(t);
487
490
  return C.forEach((t) => {
488
491
  e ? n.add(t.id) : n.delete(t.id);
489
492
  }), n;
490
493
  });
491
- }, [C]), k = A(() => {
494
+ }, [C]), O = j(() => {
492
495
  y(/* @__PURE__ */ new Set());
493
- }, []), te = A(async (e) => {
496
+ }, []), k = j(async (e) => {
494
497
  _(!0);
495
498
  try {
496
499
  let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
@@ -502,38 +505,38 @@ var ge = [
502
505
  _(!1);
503
506
  }
504
507
  }, [p, f]);
505
- return e ? l ? /* @__PURE__ */ Y(ve, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : d ? /* @__PURE__ */ Y(ye, { message: d.message }) : /* @__PURE__ */ X(J, { children: [
506
- b && /* @__PURE__ */ Y("div", {
508
+ return e ? l ? /* @__PURE__ */ J(X, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : d ? /* @__PURE__ */ J(Z, { message: d.message }) : /* @__PURE__ */ Y(q, { children: [
509
+ b && /* @__PURE__ */ J("div", {
507
510
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
508
- children: /* @__PURE__ */ X("div", {
511
+ children: /* @__PURE__ */ Y("div", {
509
512
  className: "flex items-center justify-between gap-3",
510
- children: [/* @__PURE__ */ Y("span", { children: b }), /* @__PURE__ */ Y("button", {
513
+ children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
511
514
  onClick: () => x(null),
512
515
  className: "text-status-success-text hover:text-status-success-text",
513
516
  children: s("devportal.dismiss", "Dismiss")
514
517
  })]
515
518
  })
516
519
  }),
517
- /* @__PURE__ */ Y(Oe, {
520
+ /* @__PURE__ */ J(Ae, {
518
521
  appName: t,
519
522
  delegations: S,
520
523
  onGrantDelegation: n,
521
524
  onRevokeDelegation: (e) => h([e]),
522
525
  selectedDelegationIds: v,
523
- onToggleSelectDelegation: ee,
524
- onToggleAllDelegations: O,
525
- onClearSelection: k,
526
- onRevokeSelected: () => h(w.map((e) => e.id)),
527
- allVisibleSelected: T,
528
- partiallySelected: E
526
+ onToggleSelectDelegation: E,
527
+ onToggleAllDelegations: D,
528
+ onClearSelection: O,
529
+ onRevokeSelected: () => h(ee.map((e) => e.id)),
530
+ allVisibleSelected: w,
531
+ partiallySelected: T
529
532
  }),
530
- /* @__PURE__ */ Y(D, {
533
+ /* @__PURE__ */ J(te, {
531
534
  open: m.length > 0,
532
535
  onOpenChange: (e) => {
533
536
  e || h([]);
534
537
  },
535
538
  onConfirm: () => {
536
- m.length > 0 && te(m);
539
+ m.length > 0 && k(m);
537
540
  },
538
541
  title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
539
542
  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."),
@@ -542,17 +545,17 @@ var ge = [
542
545
  variant: "destructive",
543
546
  loading: g
544
547
  })
545
- ] }) : /* @__PURE__ */ Y(r, {
546
- icon: /* @__PURE__ */ Y(W, { size: 32 }),
548
+ ] }) : /* @__PURE__ */ J(r, {
549
+ icon: /* @__PURE__ */ J(W, { size: 32 }),
547
550
  title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
548
551
  description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
549
- action: /* @__PURE__ */ X("button", {
552
+ action: /* @__PURE__ */ Y("button", {
550
553
  onClick: () => a("/oauth"),
551
554
  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",
552
- children: [/* @__PURE__ */ Y(B, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
555
+ children: [/* @__PURE__ */ J(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
553
556
  })
554
557
  });
555
- }, Te = ({ appId: e }) => {
558
+ }, De = ({ appId: e }) => {
556
559
  let { t } = F(), n = (e, n) => {
557
560
  let r = t(e);
558
561
  return r === e ? n : r;
@@ -565,67 +568,67 @@ var ge = [
565
568
  }, [r]).toISOString(),
566
569
  endDate: r.toISOString()
567
570
  } });
568
- return a ? /* @__PURE__ */ Y(ve, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ Y(ye, { message: s.message }) : /* @__PURE__ */ Y(ke, { analytics: (i?.applicationAnalytics ?? []).map(me) });
569
- }, Ee = ({ app: e }) => {
571
+ return a ? /* @__PURE__ */ J(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Z, { message: s.message }) : /* @__PURE__ */ J(je, { analytics: (i?.applicationAnalytics ?? []).map(ve) });
572
+ }, Oe = ({ app: e }) => {
570
573
  let { t } = F(), n = (e, n) => {
571
574
  let r = t(e);
572
575
  return r === e ? n : r;
573
576
  };
574
- return /* @__PURE__ */ X("div", {
577
+ return /* @__PURE__ */ Y("div", {
575
578
  className: "grid gap-6 lg:grid-cols-3",
576
- children: [/* @__PURE__ */ X("div", {
579
+ children: [/* @__PURE__ */ Y("div", {
577
580
  className: "lg:col-span-2 space-y-6",
578
581
  children: [
579
- /* @__PURE__ */ X("div", {
582
+ /* @__PURE__ */ Y("div", {
580
583
  className: "grid gap-4 sm:grid-cols-4",
581
584
  children: [
582
- /* @__PURE__ */ Y(Q, {
585
+ /* @__PURE__ */ J(Q, {
583
586
  label: n("devportal.totalInstalls", "Total Installs"),
584
587
  value: e.installCount.toLocaleString()
585
588
  }),
586
- /* @__PURE__ */ Y(Q, {
589
+ /* @__PURE__ */ J(Q, {
587
590
  label: n("devportal.activeInstalls", "Active Installs"),
588
591
  value: e.activeInstallCount.toLocaleString()
589
592
  }),
590
- /* @__PURE__ */ Y(Q, {
593
+ /* @__PURE__ */ J(Q, {
591
594
  label: n("devportal.averageRating", "Average Rating"),
592
595
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
593
596
  }),
594
- /* @__PURE__ */ Y(Q, {
597
+ /* @__PURE__ */ J(Q, {
595
598
  label: n("devportal.reviews", "Reviews"),
596
599
  value: e.reviewCount.toString()
597
600
  })
598
601
  ]
599
602
  }),
600
- /* @__PURE__ */ Y(m, {
603
+ /* @__PURE__ */ J(h, {
601
604
  title: n("devportal.description", "Description"),
602
- children: /* @__PURE__ */ Y("div", {
605
+ children: /* @__PURE__ */ J("div", {
603
606
  className: "prose prose-sm max-w-none",
604
- children: /* @__PURE__ */ Y("pre", {
607
+ children: /* @__PURE__ */ J("pre", {
605
608
  className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
606
609
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
607
610
  })
608
611
  })
609
612
  }),
610
- /* @__PURE__ */ Y(m, {
613
+ /* @__PURE__ */ J(h, {
611
614
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
612
- children: /* @__PURE__ */ X("div", {
615
+ children: /* @__PURE__ */ Y("div", {
613
616
  className: "space-y-3",
614
- children: [e.tags.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
617
+ children: [e.tags.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
615
618
  className: "text-xs text-muted-foreground mb-2",
616
619
  children: n("devportal.tags", "Tags")
617
- }), /* @__PURE__ */ Y("div", {
620
+ }), /* @__PURE__ */ J("div", {
618
621
  className: "flex flex-wrap gap-2",
619
- children: e.tags.map((e) => /* @__PURE__ */ Y("span", {
622
+ children: e.tags.map((e) => /* @__PURE__ */ J("span", {
620
623
  className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
621
624
  children: e
622
625
  }, e))
623
- })] }), e.keywords.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
626
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
624
627
  className: "text-xs text-muted-foreground mb-2",
625
628
  children: n("devportal.keywords", "Keywords")
626
- }), /* @__PURE__ */ Y("div", {
629
+ }), /* @__PURE__ */ J("div", {
627
630
  className: "flex flex-wrap gap-2",
628
- children: e.keywords.map((e) => /* @__PURE__ */ Y("span", {
631
+ children: e.keywords.map((e) => /* @__PURE__ */ J("span", {
629
632
  className: "rounded-full bg-muted px-3 py-1 text-xs",
630
633
  children: e
631
634
  }, e))
@@ -633,14 +636,14 @@ var ge = [
633
636
  })
634
637
  })
635
638
  ]
636
- }), /* @__PURE__ */ X("div", {
639
+ }), /* @__PURE__ */ Y("div", {
637
640
  className: "space-y-6",
638
- children: [/* @__PURE__ */ Y(m, {
641
+ children: [/* @__PURE__ */ J(h, {
639
642
  title: n("devportal.details", "Details"),
640
- children: /* @__PURE__ */ Y(C, { items: [
643
+ children: /* @__PURE__ */ J(ee, { items: [
641
644
  {
642
645
  label: n("devportal.appId", "App ID"),
643
- value: /* @__PURE__ */ Y("code", {
646
+ value: /* @__PURE__ */ J("code", {
644
647
  className: "text-xs",
645
648
  children: e.id
646
649
  })
@@ -670,32 +673,32 @@ var ge = [
670
673
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
671
674
  }
672
675
  ] })
673
- }), /* @__PURE__ */ Y(m, {
676
+ }), /* @__PURE__ */ J(h, {
674
677
  title: n("devportal.links", "Links"),
675
- children: /* @__PURE__ */ X("div", {
678
+ children: /* @__PURE__ */ Y("div", {
676
679
  className: "space-y-2",
677
680
  children: [
678
- e.websiteUrl && /* @__PURE__ */ Y($, {
681
+ e.websiteUrl && /* @__PURE__ */ J($, {
679
682
  label: n("devportal.website", "Website"),
680
683
  url: e.websiteUrl
681
684
  }),
682
- e.documentationUrl && /* @__PURE__ */ Y($, {
685
+ e.documentationUrl && /* @__PURE__ */ J($, {
683
686
  label: n("devportal.documentation", "Documentation"),
684
687
  url: e.documentationUrl
685
688
  }),
686
- e.supportUrl && /* @__PURE__ */ Y($, {
689
+ e.supportUrl && /* @__PURE__ */ J($, {
687
690
  label: n("devportal.support", "Support"),
688
691
  url: e.supportUrl
689
692
  }),
690
- e.githubUrl && /* @__PURE__ */ Y($, {
693
+ e.githubUrl && /* @__PURE__ */ J($, {
691
694
  label: n("devportal.github", "GitHub"),
692
695
  url: e.githubUrl
693
696
  }),
694
- e.privacyPolicyUrl && /* @__PURE__ */ Y($, {
697
+ e.privacyPolicyUrl && /* @__PURE__ */ J($, {
695
698
  label: n("devportal.privacyPolicy", "Privacy Policy"),
696
699
  url: e.privacyPolicyUrl
697
700
  }),
698
- e.termsOfServiceUrl && /* @__PURE__ */ Y($, {
701
+ e.termsOfServiceUrl && /* @__PURE__ */ J($, {
699
702
  label: n("devportal.termsOfService", "Terms of Service"),
700
703
  url: e.termsOfServiceUrl
701
704
  })
@@ -704,16 +707,16 @@ var ge = [
704
707
  })]
705
708
  })]
706
709
  });
707
- }, De = ({ appId: e, webhooks: t, onNavigate: n }) => {
710
+ }, ke = ({ appId: e, webhooks: t, onNavigate: n }) => {
708
711
  let { t: i } = F(), a = (e, t) => {
709
712
  let n = i(e);
710
713
  return n === e ? t : n;
711
714
  };
712
- return /* @__PURE__ */ X("div", {
715
+ return /* @__PURE__ */ Y("div", {
713
716
  className: "space-y-6",
714
- children: [/* @__PURE__ */ X("div", {
717
+ children: [/* @__PURE__ */ Y("div", {
715
718
  className: "flex items-center justify-between",
716
- children: [/* @__PURE__ */ X("p", {
719
+ children: [/* @__PURE__ */ Y("p", {
717
720
  className: "text-sm text-muted-foreground",
718
721
  children: [
719
722
  t.length,
@@ -722,81 +725,81 @@ var ge = [
722
725
  " ",
723
726
  a("devportal.configured", "configured")
724
727
  ]
725
- }), /* @__PURE__ */ X("button", {
728
+ }), /* @__PURE__ */ Y("button", {
726
729
  onClick: () => n(`/apps/${e}/webhooks/new`),
727
730
  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",
728
- children: [/* @__PURE__ */ Y(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
731
+ children: [/* @__PURE__ */ J(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
729
732
  })]
730
- }), t.length > 0 ? /* @__PURE__ */ Y("div", {
733
+ }), t.length > 0 ? /* @__PURE__ */ J("div", {
731
734
  className: "space-y-4",
732
- children: t.map((t) => /* @__PURE__ */ X("div", {
735
+ children: t.map((t) => /* @__PURE__ */ Y("div", {
733
736
  className: "rounded-lg border bg-card p-4 space-y-4",
734
737
  children: [
735
- /* @__PURE__ */ X("div", {
738
+ /* @__PURE__ */ Y("div", {
736
739
  className: "flex items-start justify-between",
737
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
740
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
738
741
  className: "flex items-center gap-2",
739
- children: [/* @__PURE__ */ Y("h3", {
742
+ children: [/* @__PURE__ */ J("h3", {
740
743
  className: "font-medium",
741
744
  children: t.name
742
- }), /* @__PURE__ */ Y(_, {
745
+ }), /* @__PURE__ */ J(v, {
743
746
  status: t.status,
744
747
  type: "webhook"
745
748
  })]
746
- }), t.description && /* @__PURE__ */ Y("p", {
749
+ }), t.description && /* @__PURE__ */ J("p", {
747
750
  className: "text-sm text-muted-foreground mt-1",
748
751
  children: t.description
749
- })] }), /* @__PURE__ */ Y("button", {
752
+ })] }), /* @__PURE__ */ J("button", {
750
753
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
751
754
  className: "rounded-md p-1 hover:bg-muted",
752
- children: /* @__PURE__ */ Y(se, { size: 20 })
755
+ children: /* @__PURE__ */ J(H, { size: 20 })
753
756
  })]
754
757
  }),
755
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
758
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
756
759
  className: "text-xs text-muted-foreground mb-1",
757
760
  children: a("devportal.endpointUrl", "Endpoint URL")
758
- }), /* @__PURE__ */ Y("code", {
761
+ }), /* @__PURE__ */ J("code", {
759
762
  className: "text-sm bg-muted px-2 py-1 rounded block truncate",
760
763
  children: t.url
761
764
  })] }),
762
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
765
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
763
766
  className: "text-xs text-muted-foreground mb-2",
764
767
  children: a("devportal.events", "Events")
765
- }), /* @__PURE__ */ Y("div", {
768
+ }), /* @__PURE__ */ J("div", {
766
769
  className: "flex flex-wrap gap-2",
767
- children: t.events.map((e) => /* @__PURE__ */ Y("span", {
770
+ children: t.events.map((e) => /* @__PURE__ */ J("span", {
768
771
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
769
772
  children: e
770
773
  }, e))
771
774
  })] }),
772
- /* @__PURE__ */ X("div", {
775
+ /* @__PURE__ */ Y("div", {
773
776
  className: "grid gap-4 sm:grid-cols-4 text-sm",
774
777
  children: [
775
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
778
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
776
779
  className: "text-xs text-muted-foreground",
777
780
  children: a("devportal.success", "Success")
778
- }), /* @__PURE__ */ Y("p", {
781
+ }), /* @__PURE__ */ J("p", {
779
782
  className: "font-medium text-status-success-text",
780
783
  children: t.successCount.toLocaleString()
781
784
  })] }),
782
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
785
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
783
786
  className: "text-xs text-muted-foreground",
784
787
  children: a("devportal.failed", "Failed")
785
- }), /* @__PURE__ */ Y("p", {
788
+ }), /* @__PURE__ */ J("p", {
786
789
  className: "font-medium text-status-error-text",
787
790
  children: t.failureCount.toLocaleString()
788
791
  })] }),
789
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
792
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
790
793
  className: "text-xs text-muted-foreground",
791
794
  children: a("devportal.successRate", "Success Rate")
792
- }), /* @__PURE__ */ X("p", {
795
+ }), /* @__PURE__ */ Y("p", {
793
796
  className: "font-medium",
794
797
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
795
798
  })] }),
796
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
799
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
797
800
  className: "text-xs text-muted-foreground",
798
801
  children: a("devportal.lastTriggered", "Last Triggered")
799
- }), /* @__PURE__ */ Y("p", {
802
+ }), /* @__PURE__ */ J("p", {
800
803
  className: "font-medium",
801
804
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
802
805
  })] })
@@ -804,28 +807,28 @@ var ge = [
804
807
  })
805
808
  ]
806
809
  }, t.id))
807
- }) : /* @__PURE__ */ Y(r, {
808
- icon: /* @__PURE__ */ Y(ue, { size: 32 }),
810
+ }) : /* @__PURE__ */ J(r, {
811
+ icon: /* @__PURE__ */ J(pe, { size: 32 }),
809
812
  title: a("devportal.noWebhooks", "No webhooks"),
810
813
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
811
- action: /* @__PURE__ */ X("button", {
814
+ action: /* @__PURE__ */ Y("button", {
812
815
  onClick: () => n(`/apps/${e}/webhooks/new`),
813
816
  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",
814
- children: [/* @__PURE__ */ Y(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
817
+ children: [/* @__PURE__ */ J(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
815
818
  })
816
819
  })]
817
820
  });
818
- }, Oe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
821
+ }, Ae = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
819
822
  let { t: p } = F(), m = (e, t) => {
820
823
  let n = p(e);
821
824
  return n === e ? t : n;
822
825
  }, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
823
- return /* @__PURE__ */ X("div", {
826
+ return /* @__PURE__ */ Y("div", {
824
827
  className: "space-y-6",
825
828
  children: [
826
- /* @__PURE__ */ X("div", {
829
+ /* @__PURE__ */ Y("div", {
827
830
  className: "flex items-center justify-between",
828
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("p", {
831
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
829
832
  className: "text-sm text-muted-foreground",
830
833
  children: [
831
834
  n.length,
@@ -836,7 +839,7 @@ var ge = [
836
839
  " ",
837
840
  e
838
841
  ]
839
- }), h.length > 0 && /* @__PURE__ */ X("p", {
842
+ }), h.length > 0 && /* @__PURE__ */ Y("p", {
840
843
  className: "text-xs text-muted-foreground mt-0.5",
841
844
  children: [
842
845
  h.length,
@@ -848,44 +851,44 @@ var ge = [
848
851
  " ",
849
852
  m("devportal.revokedExpired", "revoked/expired")
850
853
  ]
851
- })] }), /* @__PURE__ */ X("button", {
854
+ })] }), /* @__PURE__ */ Y("button", {
852
855
  onClick: i,
853
856
  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",
854
- children: [/* @__PURE__ */ Y(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
857
+ children: [/* @__PURE__ */ J(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
855
858
  })]
856
859
  }),
857
- h.length > 0 && /* @__PURE__ */ Y("div", {
860
+ h.length > 0 && /* @__PURE__ */ J("div", {
858
861
  className: "rounded-lg border bg-card p-4",
859
- children: /* @__PURE__ */ X("div", {
862
+ children: /* @__PURE__ */ Y("div", {
860
863
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
861
- children: [/* @__PURE__ */ X("div", {
864
+ children: [/* @__PURE__ */ Y("div", {
862
865
  className: "flex flex-wrap items-center gap-3",
863
- children: [/* @__PURE__ */ X("div", {
866
+ children: [/* @__PURE__ */ Y("div", {
864
867
  className: "flex items-center gap-2",
865
- children: [/* @__PURE__ */ Y(y, {
868
+ children: [/* @__PURE__ */ J(b, {
866
869
  checked: d,
867
870
  indeterminate: f,
868
871
  onChange: c,
869
872
  ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
870
- }), /* @__PURE__ */ Y("span", {
873
+ }), /* @__PURE__ */ J("span", {
871
874
  className: "text-sm font-medium",
872
875
  children: m("devportal.selectAllActive", "Select all active")
873
876
  })]
874
- }), o.size > 0 && /* @__PURE__ */ Y("button", {
877
+ }), o.size > 0 && /* @__PURE__ */ J("button", {
875
878
  onClick: l,
876
879
  className: "text-sm text-muted-foreground hover:text-foreground",
877
880
  children: m("devportal.clearSelection", "Clear selection")
878
881
  })]
879
- }), /* @__PURE__ */ X("div", {
882
+ }), /* @__PURE__ */ Y("div", {
880
883
  className: "flex flex-wrap items-center gap-2",
881
- children: [/* @__PURE__ */ X("span", {
884
+ children: [/* @__PURE__ */ Y("span", {
882
885
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
883
886
  children: [
884
887
  o.size,
885
888
  " ",
886
889
  m("devportal.selected", "selected")
887
890
  ]
888
- }), /* @__PURE__ */ X("button", {
891
+ }), /* @__PURE__ */ Y("button", {
889
892
  onClick: u,
890
893
  disabled: o.size === 0,
891
894
  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",
@@ -894,33 +897,33 @@ var ge = [
894
897
  })]
895
898
  })
896
899
  }),
897
- n.length > 0 ? /* @__PURE__ */ Y("div", {
900
+ n.length > 0 ? /* @__PURE__ */ J("div", {
898
901
  className: "space-y-4",
899
- children: n.map((e) => /* @__PURE__ */ X("div", {
902
+ children: n.map((e) => /* @__PURE__ */ Y("div", {
900
903
  className: "rounded-lg border bg-card p-4 space-y-4",
901
904
  children: [
902
- /* @__PURE__ */ X("div", {
905
+ /* @__PURE__ */ Y("div", {
903
906
  className: "flex items-start justify-between",
904
- children: [/* @__PURE__ */ X("div", {
907
+ children: [/* @__PURE__ */ Y("div", {
905
908
  className: "flex items-start gap-3",
906
- children: [e.status === "ACTIVE" && /* @__PURE__ */ Y("div", {
909
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
907
910
  onClick: (e) => e.stopPropagation(),
908
- children: /* @__PURE__ */ Y(y, {
911
+ children: /* @__PURE__ */ J(b, {
909
912
  checked: o.has(e.id),
910
913
  onChange: (t) => s(e.id, t),
911
914
  ariaLabel: `Select delegation ${e.id}`,
912
915
  className: "mt-1"
913
916
  })
914
- }), /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
917
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
915
918
  className: "flex items-center gap-2",
916
- children: [/* @__PURE__ */ X("h3", {
919
+ children: [/* @__PURE__ */ Y("h3", {
917
920
  className: "font-medium",
918
921
  children: ["Delegation #", e.id.slice(0, 8)]
919
- }), /* @__PURE__ */ Y("span", {
920
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", _e[e.status]),
922
+ }), /* @__PURE__ */ J("span", {
923
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", xe[e.status]),
921
924
  children: e.status
922
925
  })]
923
- }), /* @__PURE__ */ X("p", {
926
+ }), /* @__PURE__ */ Y("p", {
924
927
  className: "text-sm text-muted-foreground mt-1",
925
928
  children: [
926
929
  m("devportal.granted", "Granted"),
@@ -932,55 +935,55 @@ var ge = [
932
935
  e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
933
936
  ]
934
937
  })] })]
935
- }), e.status === "ACTIVE" && /* @__PURE__ */ X("button", {
938
+ }), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
936
939
  onClick: () => a(e.id),
937
940
  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",
938
- children: [/* @__PURE__ */ Y(de, { size: 14 }), m("devportal.revoke", "Revoke")]
941
+ children: [/* @__PURE__ */ J(K, { size: 14 }), m("devportal.revoke", "Revoke")]
939
942
  })]
940
943
  }),
941
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
944
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
942
945
  className: "text-xs text-muted-foreground mb-2",
943
946
  children: m("devportal.grantedScopes", "Granted Scopes")
944
- }), /* @__PURE__ */ Y("div", {
947
+ }), /* @__PURE__ */ J("div", {
945
948
  className: "flex flex-wrap gap-2",
946
- children: e.scopes.map((e) => /* @__PURE__ */ Y("span", {
949
+ children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
947
950
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
948
951
  children: e
949
952
  }, e))
950
953
  })] }),
951
- e.workspaceIds.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
954
+ e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
952
955
  className: "text-xs text-muted-foreground mb-2",
953
956
  children: m("devportal.workspaceScope", "Workspace Scope")
954
- }), /* @__PURE__ */ Y("div", {
957
+ }), /* @__PURE__ */ J("div", {
955
958
  className: "flex flex-wrap gap-2",
956
- children: e.workspaceIds.map((e) => /* @__PURE__ */ Y("code", {
959
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
957
960
  className: "rounded bg-muted px-2 py-0.5 text-xs",
958
961
  children: e
959
962
  }, e))
960
963
  })] }),
961
- /* @__PURE__ */ X("div", {
964
+ /* @__PURE__ */ Y("div", {
962
965
  className: "flex items-center gap-4 text-xs text-muted-foreground",
963
966
  children: [
964
- e.expiresAt && /* @__PURE__ */ X("span", {
967
+ e.expiresAt && /* @__PURE__ */ Y("span", {
965
968
  className: "flex items-center gap-1",
966
969
  children: [
967
- /* @__PURE__ */ Y(z, { size: 12 }),
970
+ /* @__PURE__ */ J(ae, { size: 12 }),
968
971
  m("devportal.expires", "Expires"),
969
972
  " ",
970
973
  new Date(e.expiresAt).toLocaleDateString()
971
974
  ]
972
975
  }),
973
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ X("span", {
976
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
974
977
  className: "flex items-center gap-1",
975
- children: [/* @__PURE__ */ Y(R, {
978
+ children: [/* @__PURE__ */ J(L, {
976
979
  size: 12,
977
980
  className: "text-status-success-text"
978
981
  }), m("devportal.noExpiration", "No expiration")]
979
982
  }),
980
- e.revokedAt && /* @__PURE__ */ X("span", {
983
+ e.revokedAt && /* @__PURE__ */ Y("span", {
981
984
  className: "flex items-center gap-1",
982
985
  children: [
983
- /* @__PURE__ */ Y(de, {
986
+ /* @__PURE__ */ J(K, {
984
987
  size: 12,
985
988
  className: "text-status-error-text"
986
989
  }),
@@ -993,52 +996,52 @@ var ge = [
993
996
  })
994
997
  ]
995
998
  }, e.id))
996
- }) : /* @__PURE__ */ Y(r, {
997
- icon: /* @__PURE__ */ Y(q, { size: 32 }),
999
+ }) : /* @__PURE__ */ J(r, {
1000
+ icon: /* @__PURE__ */ J(fe, { size: 32 }),
998
1001
  title: m("devportal.noDelegations", "No delegations"),
999
1002
  description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
1000
- action: /* @__PURE__ */ X("button", {
1003
+ action: /* @__PURE__ */ Y("button", {
1001
1004
  onClick: i,
1002
1005
  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",
1003
- children: [/* @__PURE__ */ Y(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1006
+ children: [/* @__PURE__ */ J(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1004
1007
  })
1005
1008
  })
1006
1009
  ]
1007
1010
  });
1008
- }, ke = ({ analytics: e }) => {
1011
+ }, je = ({ analytics: e }) => {
1009
1012
  let { t } = F(), n = (e, n) => {
1010
1013
  let r = t(e);
1011
1014
  return r === e ? n : r;
1012
1015
  }, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
1013
- return /* @__PURE__ */ X("div", {
1016
+ return /* @__PURE__ */ Y("div", {
1014
1017
  className: "space-y-6",
1015
- children: [/* @__PURE__ */ X("div", {
1018
+ children: [/* @__PURE__ */ Y("div", {
1016
1019
  className: "grid gap-4 sm:grid-cols-4",
1017
1020
  children: [
1018
- /* @__PURE__ */ Y(Q, {
1021
+ /* @__PURE__ */ J(Q, {
1019
1022
  label: n("devportal.activeUsers", "Active Users"),
1020
1023
  value: i?.activeUsers.toLocaleString() || "0",
1021
1024
  trend: a ? o(i.activeUsers, a.activeUsers) : void 0
1022
1025
  }),
1023
- /* @__PURE__ */ Y(Q, {
1026
+ /* @__PURE__ */ J(Q, {
1024
1027
  label: n("devportal.apiCalls", "API Calls"),
1025
1028
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
1026
1029
  trend: a ? o(i.apiCalls, a.apiCalls) : void 0
1027
1030
  }),
1028
- /* @__PURE__ */ Y(Q, {
1031
+ /* @__PURE__ */ J(Q, {
1029
1032
  label: n("devportal.avgResponseTime", "Avg Response Time"),
1030
1033
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
1031
1034
  trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
1032
1035
  }),
1033
- /* @__PURE__ */ Y(Q, {
1036
+ /* @__PURE__ */ J(Q, {
1034
1037
  label: n("devportal.errorRate", "Error Rate"),
1035
1038
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1036
1039
  trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
1037
1040
  })
1038
1041
  ]
1039
- }), /* @__PURE__ */ Y(m, {
1042
+ }), /* @__PURE__ */ J(h, {
1040
1043
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1041
- children: e.length > 0 ? /* @__PURE__ */ Y(S, {
1044
+ children: e.length > 0 ? /* @__PURE__ */ J(C, {
1042
1045
  data: e,
1043
1046
  keyField: "id",
1044
1047
  columns: [
@@ -1078,66 +1081,66 @@ var ge = [
1078
1081
  render: (e) => e.sessions.toLocaleString()
1079
1082
  }
1080
1083
  ]
1081
- }) : /* @__PURE__ */ Y(r, {
1082
- icon: /* @__PURE__ */ Y(L, { size: 32 }),
1084
+ }) : /* @__PURE__ */ J(r, {
1085
+ icon: /* @__PURE__ */ J(I, { size: 32 }),
1083
1086
  title: n("devportal.noAnalyticsData", "No analytics data"),
1084
1087
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1085
1088
  })
1086
1089
  })]
1087
1090
  });
1088
- }, Ae = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", je = ({ app: t }) => {
1089
- let { apiGatewayUrl: n, authToken: r } = e(), { t: i } = F(), a = (e, t) => {
1090
- let n = i(e);
1091
+ }, Me = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Ne = ({ app: t }) => {
1092
+ let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = F(), o = (e, t) => {
1093
+ let n = a(e);
1091
1094
  return n === e ? t : n;
1092
- }, [o, s] = P(Ae), [c, l] = P("{}"), [u, d] = P(""), [f, p] = P(!1), [m, h] = P(`${n || "http://localhost:4000"}/global/graphql`), [g, _] = P(r || ""), [v, y] = P(!1), b = A(async () => {
1093
- p(!0), d("");
1095
+ }, [s, c] = P(Me), [l, u] = P("{}"), [d, f] = P(""), [p, m] = P(!1), [h, g] = P(`${n || "http://localhost:4000"}/global/graphql`), [_, v] = P(i || ""), [y, b] = P(!1), x = j(async () => {
1096
+ m(!0), f("");
1094
1097
  try {
1095
1098
  let e = {};
1096
1099
  try {
1097
- e = JSON.parse(c);
1100
+ e = JSON.parse(l);
1098
1101
  } catch {
1099
- d(JSON.stringify({ error: "Invalid JSON in variables" }, null, 2)), p(!1);
1102
+ f(JSON.stringify({ error: "Invalid JSON in variables" }, null, 2)), m(!1);
1100
1103
  return;
1101
1104
  }
1102
1105
  let t = { "Content-Type": "application/json" };
1103
- g && (t.Authorization = `Bearer ${g}`);
1104
- let n = await (await fetch(m, {
1106
+ _ && (t.Authorization = `Bearer ${_}`);
1107
+ let n = await (await fetch(h, {
1105
1108
  method: "POST",
1106
1109
  headers: t,
1107
1110
  body: JSON.stringify({
1108
- query: o,
1111
+ query: s,
1109
1112
  variables: e
1110
1113
  })
1111
1114
  })).json();
1112
- d(JSON.stringify(n, null, 2));
1115
+ f(JSON.stringify(n, null, 2));
1113
1116
  } catch (e) {
1114
- d(JSON.stringify({ error: e instanceof Error ? e.message : "Request failed" }, null, 2));
1117
+ f(JSON.stringify({ error: e instanceof Error ? e.message : "Request failed" }, null, 2));
1115
1118
  } finally {
1116
- p(!1);
1119
+ m(!1);
1117
1120
  }
1118
1121
  }, [
1119
- o,
1120
- c,
1121
- m,
1122
- g
1123
- ]), x = A(() => {
1124
- r && _(r), y(!0);
1125
- }, [r]);
1126
- return /* @__PURE__ */ X("div", {
1122
+ s,
1123
+ l,
1124
+ h,
1125
+ _
1126
+ ]), S = j(() => {
1127
+ i && v(i), b(!0);
1128
+ }, [i]);
1129
+ return /* @__PURE__ */ Y("div", {
1127
1130
  className: "space-y-4",
1128
1131
  children: [
1129
- /* @__PURE__ */ X("div", {
1132
+ /* @__PURE__ */ Y("div", {
1130
1133
  className: "flex items-center justify-between",
1131
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h3", {
1134
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("h3", {
1132
1135
  className: "text-lg font-semibold",
1133
- children: a("devportal.apiPlayground", "API Playground")
1134
- }), /* @__PURE__ */ X("p", {
1136
+ children: o("devportal.apiPlayground", "API Playground")
1137
+ }), /* @__PURE__ */ Y("p", {
1135
1138
  className: "text-sm text-muted-foreground",
1136
1139
  children: [
1137
- a("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1140
+ o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1138
1141
  " ",
1139
- /* @__PURE__ */ Y("strong", { children: t.name }),
1140
- t.appId && /* @__PURE__ */ X("span", {
1142
+ /* @__PURE__ */ J("strong", { children: t.name }),
1143
+ t.appId && /* @__PURE__ */ Y("span", {
1141
1144
  className: "ml-1 text-xs text-muted-foreground",
1142
1145
  children: [
1143
1146
  "(OAuth App: ",
@@ -1146,146 +1149,272 @@ var ge = [
1146
1149
  ]
1147
1150
  })
1148
1151
  ]
1149
- })] }), /* @__PURE__ */ X("button", {
1150
- onClick: x,
1152
+ })] }), /* @__PURE__ */ Y("button", {
1153
+ onClick: S,
1151
1154
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1152
- children: [/* @__PURE__ */ Y(V, { size: 14 }), a("devportal.autoFillCredentials", "Auto-fill Credentials")]
1155
+ children: [/* @__PURE__ */ J(B, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1153
1156
  })]
1154
1157
  }),
1155
- v && /* @__PURE__ */ X("div", {
1158
+ y && /* @__PURE__ */ Y("div", {
1156
1159
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1157
1160
  children: [
1158
- /* @__PURE__ */ Y("p", {
1161
+ /* @__PURE__ */ J("p", {
1159
1162
  className: "font-medium text-status-info-text",
1160
- children: a("devportal.authenticationGuide", "Authentication Guide")
1163
+ children: o("devportal.authenticationGuide", "Authentication Guide")
1161
1164
  }),
1162
- /* @__PURE__ */ X("p", {
1165
+ /* @__PURE__ */ Y("p", {
1163
1166
  className: "text-status-info-text",
1164
1167
  children: [
1165
- a("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1168
+ o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1166
1169
  " ",
1167
- /* @__PURE__ */ Y("strong", { children: a("devportal.oauthClientsTab", "OAuth Clients") }),
1170
+ /* @__PURE__ */ J("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1168
1171
  " ",
1169
- a("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1172
+ o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1170
1173
  ]
1171
1174
  }),
1172
- /* @__PURE__ */ Y("pre", {
1175
+ /* @__PURE__ */ J("pre", {
1173
1176
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1174
1177
  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}"
1175
1178
  }),
1176
- /* @__PURE__ */ X("p", {
1179
+ /* @__PURE__ */ Y("p", {
1177
1180
  className: "text-status-info-text",
1178
1181
  children: [
1179
- a("devportal.useReturnedAccessToken", "Use the returned"),
1182
+ o("devportal.useReturnedAccessToken", "Use the returned"),
1180
1183
  " ",
1181
- /* @__PURE__ */ Y("code", {
1184
+ /* @__PURE__ */ J("code", {
1182
1185
  className: "bg-status-info-bg-subtle px-1 rounded",
1183
1186
  children: "accessToken"
1184
1187
  }),
1185
1188
  " ",
1186
- a("devportal.asBearerToken", "as the Bearer token below.")
1189
+ o("devportal.asBearerToken", "as the Bearer token below.")
1187
1190
  ]
1188
1191
  }),
1189
- /* @__PURE__ */ Y("button", {
1190
- onClick: () => y(!1),
1192
+ /* @__PURE__ */ J("button", {
1193
+ onClick: () => b(!1),
1191
1194
  className: "text-xs text-accent-blue hover:underline",
1192
- children: a("devportal.dismiss", "Dismiss")
1195
+ children: o("devportal.dismiss", "Dismiss")
1193
1196
  })
1194
1197
  ]
1195
1198
  }),
1196
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1199
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1197
1200
  className: "block text-sm font-medium mb-1",
1198
- children: a("devportal.gatewayEndpoint", "Gateway Endpoint")
1199
- }), /* @__PURE__ */ X("div", {
1201
+ children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
1202
+ }), /* @__PURE__ */ Y("div", {
1200
1203
  className: "flex gap-2",
1201
- children: [/* @__PURE__ */ Y("input", {
1204
+ children: [/* @__PURE__ */ J("input", {
1202
1205
  type: "text",
1203
- value: m,
1204
- onChange: (e) => h(e.target.value),
1206
+ value: h,
1207
+ onChange: (e) => g(e.target.value),
1205
1208
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
1206
- }), /* @__PURE__ */ X("select", {
1207
- onChange: (e) => h(e.target.value),
1209
+ }), /* @__PURE__ */ Y("select", {
1210
+ onChange: (e) => g(e.target.value),
1208
1211
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1209
- value: m,
1210
- children: [/* @__PURE__ */ Y("option", {
1212
+ value: h,
1213
+ children: [/* @__PURE__ */ J("option", {
1211
1214
  value: `${n || "http://localhost:4000"}/global/graphql`,
1212
- children: a("devportal.globalGateway", "Global Gateway")
1213
- }), /* @__PURE__ */ Y("option", {
1214
- value: `${n || "http://localhost:4000"}/workspaces/graphql`,
1215
- children: a("devportal.workspaceGateway", "Workspace Gateway")
1215
+ children: o("devportal.globalGateway", "Global Gateway")
1216
+ }), /* @__PURE__ */ J("option", {
1217
+ value: `${r || "http://localhost:4003"}/workspaces/graphql`,
1218
+ children: o("devportal.workspaceGateway", "Workspace Gateway")
1216
1219
  })]
1217
1220
  })]
1218
1221
  })] }),
1219
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1222
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1220
1223
  className: "block text-sm font-medium mb-1",
1221
- children: a("devportal.bearerToken", "Bearer Token")
1222
- }), /* @__PURE__ */ Y("input", {
1224
+ children: o("devportal.bearerToken", "Bearer Token")
1225
+ }), /* @__PURE__ */ J("input", {
1223
1226
  type: "password",
1224
- value: g,
1225
- onChange: (e) => _(e.target.value),
1226
- placeholder: a("devportal.pasteAccessToken", "Paste access token here..."),
1227
+ value: _,
1228
+ onChange: (e) => v(e.target.value),
1229
+ placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
1227
1230
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
1228
1231
  })] }),
1229
- /* @__PURE__ */ X("div", {
1232
+ /* @__PURE__ */ Y("div", {
1230
1233
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1231
- children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1234
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1232
1235
  className: "block text-sm font-medium mb-1",
1233
- children: a("devportal.query", "Query")
1234
- }), /* @__PURE__ */ Y("textarea", {
1235
- value: o,
1236
- onChange: (e) => s(e.target.value),
1236
+ children: o("devportal.query", "Query")
1237
+ }), /* @__PURE__ */ J("textarea", {
1238
+ value: s,
1239
+ onChange: (e) => c(e.target.value),
1237
1240
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1238
1241
  spellCheck: !1
1239
- })] }), /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1242
+ })] }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1240
1243
  className: "block text-sm font-medium mb-1",
1241
- children: a("devportal.variablesJson", "Variables (JSON)")
1242
- }), /* @__PURE__ */ Y("textarea", {
1243
- value: c,
1244
- onChange: (e) => l(e.target.value),
1244
+ children: o("devportal.variablesJson", "Variables (JSON)")
1245
+ }), /* @__PURE__ */ J("textarea", {
1246
+ value: l,
1247
+ onChange: (e) => u(e.target.value),
1245
1248
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1246
1249
  spellCheck: !1
1247
1250
  })] })]
1248
1251
  }),
1249
- /* @__PURE__ */ X("button", {
1250
- onClick: b,
1251
- disabled: f,
1252
+ /* @__PURE__ */ Y("button", {
1253
+ onClick: x,
1254
+ disabled: p,
1252
1255
  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",
1253
- children: [f ? /* @__PURE__ */ Y(H, {
1256
+ children: [p ? /* @__PURE__ */ J(V, {
1254
1257
  size: 16,
1255
1258
  className: "animate-spin"
1256
- }) : /* @__PURE__ */ Y(B, { size: 16 }), f ? a("devportal.executing", "Executing...") : a("devportal.executeQuery", "Execute Query")]
1259
+ }) : /* @__PURE__ */ J(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1257
1260
  }),
1258
- u && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1261
+ d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1259
1262
  className: "block text-sm font-medium mb-1",
1260
- children: a("devportal.response", "Response")
1261
- }), /* @__PURE__ */ Y("pre", {
1263
+ children: o("devportal.response", "Response")
1264
+ }), /* @__PURE__ */ J("pre", {
1262
1265
  className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
1263
- children: u
1266
+ children: d
1264
1267
  })] })
1265
1268
  ]
1266
1269
  });
1267
- }, Me = new Set(["workflow", "template"]), Ne = [
1268
- {
1269
- value: "FREE",
1270
- label: "Free"
1271
- },
1272
- {
1273
- value: "FREEMIUM",
1274
- label: "Freemium"
1275
- },
1276
- {
1277
- value: "PAID",
1278
- label: "Paid"
1279
- },
1280
- {
1281
- value: "SUBSCRIPTION",
1282
- label: "Subscription"
1283
- },
1284
- {
1285
- value: "USAGE_BASED",
1286
- label: "Usage-based"
1287
- }
1288
- ], Pe = [
1270
+ }, Pe = ({ 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 }) => {
1271
+ let d = N(null), f = j(async (e) => {
1272
+ try {
1273
+ r((await s(e)).downloadUrl);
1274
+ } catch {}
1275
+ }, [s, r]);
1276
+ return /* @__PURE__ */ Y("div", {
1277
+ className: "space-y-1.5",
1278
+ children: [
1279
+ /* @__PURE__ */ J("label", {
1280
+ className: "text-sm font-medium",
1281
+ children: e
1282
+ }),
1283
+ /* @__PURE__ */ Y("div", {
1284
+ className: "flex gap-3 items-start",
1285
+ children: [/* @__PURE__ */ Y("div", {
1286
+ className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
1287
+ children: [n ? /* @__PURE__ */ J("img", {
1288
+ src: n,
1289
+ alt: e,
1290
+ className: "w-full h-full object-cover"
1291
+ }) : /* @__PURE__ */ J(G, {
1292
+ size: 18,
1293
+ className: "text-text-secondary opacity-40"
1294
+ }), c && /* @__PURE__ */ Y("div", {
1295
+ className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
1296
+ children: [/* @__PURE__ */ J(V, {
1297
+ size: 14,
1298
+ className: "animate-spin text-white"
1299
+ }), /* @__PURE__ */ Y("span", {
1300
+ className: "text-white text-xs",
1301
+ children: [l, "%"]
1302
+ })]
1303
+ })]
1304
+ }), /* @__PURE__ */ Y("div", {
1305
+ className: "flex-1 space-y-1.5",
1306
+ children: [
1307
+ /* @__PURE__ */ J("input", {
1308
+ type: "url",
1309
+ value: n,
1310
+ onChange: (e) => r(e.target.value),
1311
+ placeholder: "https://...",
1312
+ 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"
1313
+ }),
1314
+ /* @__PURE__ */ J("input", {
1315
+ ref: d,
1316
+ type: "file",
1317
+ accept: a,
1318
+ className: "hidden",
1319
+ onChange: (e) => {
1320
+ let t = e.target.files?.[0];
1321
+ t && f(t), e.target.value = "";
1322
+ }
1323
+ }),
1324
+ /* @__PURE__ */ Y("button", {
1325
+ type: "button",
1326
+ disabled: c,
1327
+ onClick: () => d.current?.click(),
1328
+ 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",
1329
+ children: [/* @__PURE__ */ J(G, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1330
+ }),
1331
+ u && /* @__PURE__ */ J("p", {
1332
+ className: "text-xs text-status-error-text",
1333
+ children: u
1334
+ })
1335
+ ]
1336
+ })]
1337
+ }),
1338
+ i && /* @__PURE__ */ J("p", {
1339
+ className: "text-xs text-text-secondary",
1340
+ children: i
1341
+ })
1342
+ ]
1343
+ });
1344
+ }, Fe = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1345
+ let s = N(null), c = j(async (t) => {
1346
+ try {
1347
+ let i = await r(t);
1348
+ n([...e, i.downloadUrl]);
1349
+ } catch {}
1350
+ }, [
1351
+ r,
1352
+ n,
1353
+ e
1354
+ ]), l = (t) => {
1355
+ n(e.filter((e, n) => n !== t));
1356
+ };
1357
+ return /* @__PURE__ */ Y("div", {
1358
+ className: "space-y-2",
1359
+ children: [
1360
+ /* @__PURE__ */ J("label", {
1361
+ className: "text-sm font-medium",
1362
+ children: "Screenshots"
1363
+ }),
1364
+ /* @__PURE__ */ Y("div", {
1365
+ className: "flex flex-wrap gap-3",
1366
+ children: [e.map((e, t) => /* @__PURE__ */ Y("div", {
1367
+ className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
1368
+ children: [/* @__PURE__ */ J("img", {
1369
+ src: e,
1370
+ alt: `Screenshot ${t + 1}`,
1371
+ className: "w-full h-full object-cover"
1372
+ }), /* @__PURE__ */ J("button", {
1373
+ type: "button",
1374
+ onClick: () => l(t),
1375
+ className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
1376
+ children: /* @__PURE__ */ J(me, { size: 12 })
1377
+ })]
1378
+ }, t)), /* @__PURE__ */ J("button", {
1379
+ type: "button",
1380
+ disabled: i,
1381
+ onClick: () => s.current?.click(),
1382
+ 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"),
1383
+ children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
1384
+ size: 18,
1385
+ className: "animate-spin text-primary"
1386
+ }), /* @__PURE__ */ Y("span", {
1387
+ className: "text-xs",
1388
+ children: [a, "%"]
1389
+ })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G, { size: 18 }), /* @__PURE__ */ J("span", {
1390
+ className: "text-xs",
1391
+ children: "Add screenshot"
1392
+ })] })
1393
+ })]
1394
+ }),
1395
+ /* @__PURE__ */ J("input", {
1396
+ ref: s,
1397
+ type: "file",
1398
+ accept: "image/png,image/jpeg,image/webp,image/gif",
1399
+ className: "hidden",
1400
+ onChange: (e) => {
1401
+ let t = e.target.files?.[0];
1402
+ t && c(t), e.target.value = "";
1403
+ }
1404
+ }),
1405
+ o && /* @__PURE__ */ J("p", {
1406
+ className: "text-xs text-status-error-text",
1407
+ children: o
1408
+ })
1409
+ ]
1410
+ });
1411
+ }, Ie = new Set(["workflow", "template"]), Le = [{
1412
+ value: "FREE",
1413
+ label: "Free"
1414
+ }, {
1415
+ value: "PAID",
1416
+ label: "Paid"
1417
+ }], Re = [
1289
1418
  {
1290
1419
  value: "agent",
1291
1420
  label: "Agent"
@@ -1354,25 +1483,8 @@ var ge = [
1354
1483
  value: "component",
1355
1484
  label: "Component"
1356
1485
  }
1357
- ], Fe = [
1358
- {
1359
- value: "npm",
1360
- label: "npm"
1361
- },
1362
- {
1363
- value: "git",
1364
- label: "git"
1365
- },
1366
- {
1367
- value: "zip",
1368
- label: "zip"
1369
- },
1370
- {
1371
- value: "builtin",
1372
- label: "builtin"
1373
- }
1374
1486
  ];
1375
- function Ie(e) {
1487
+ function ze(e) {
1376
1488
  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") : "";
1377
1489
  return {
1378
1490
  iconUrl: e.iconUrl ?? "",
@@ -1391,439 +1503,567 @@ function Ie(e) {
1391
1503
  price: typeof o.price == "number" ? String(o.price) : "",
1392
1504
  currency: typeof o.currency == "string" ? o.currency : "",
1393
1505
  manifestItemType: typeof t.itemType == "string" ? t.itemType : "",
1394
- manifestDisplayName: typeof n.displayName == "string" ? n.displayName : "",
1506
+ manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
1395
1507
  manifestVersion: typeof n.version == "string" ? n.version : "",
1396
- manifestInstallType: typeof r.type == "string" ? r.type : "npm",
1397
- manifestPackageName: typeof r.packageName == "string" ? r.packageName : "",
1398
- manifestRegistryUrl: typeof r.registryUrl == "string" ? r.registryUrl : "",
1508
+ manifestInstallType: typeof r.type == "string" ? r.type : "zip",
1509
+ manifestPackageName: "",
1510
+ manifestRegistryUrl: typeof r.url == "string" ? r.url : typeof r.registryUrl == "string" ? r.registryUrl : "",
1399
1511
  manifestPermissionsText: a.join("\n"),
1400
1512
  manifestMinPlatformVersion: typeof i.minPlatformVersion == "string" ? i.minPlatformVersion : "",
1401
1513
  manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1402
1514
  };
1403
1515
  }
1404
- var Le = ({ app: t }) => {
1405
- let { workspacesGatewayUrl: n, authToken: r, workspaceId: i, getWorkspaceToken: a } = e(), { t: o } = F(), s = (e, t) => {
1406
- let n = o(e);
1516
+ var Be = ({ app: n }) => {
1517
+ let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o } = e(), { t: s } = F(), c = (e, t) => {
1518
+ let n = s(e);
1407
1519
  return n === e ? t : n;
1408
- }, [c, l] = P(() => Ie(t)), [u, d] = P(!1), p = N(t);
1409
- p.current = t;
1410
- let [h] = f();
1411
- j(() => {
1412
- l(Ie(p.current));
1413
- }, [t.id]);
1414
- let g = (e, t) => {
1415
- l((n) => ({
1520
+ }, [l, u] = P(() => ze(n)), [d, m] = P(!1), [g, _] = P(!1), v = N(n);
1521
+ v.current = n;
1522
+ let [y] = p(), [b, { loading: S }] = f();
1523
+ ne(() => {
1524
+ u(ze(v.current));
1525
+ }, [n.id]);
1526
+ let C = (e, t) => {
1527
+ u((n) => ({
1416
1528
  ...n,
1417
1529
  [e]: t
1418
1530
  }));
1419
- }, _ = async () => {
1420
- d(!0);
1531
+ }, ee = async () => {
1532
+ m(!0);
1421
1533
  try {
1422
- let e = c.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = c.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Me.has(c.manifestItemType), i = t.manifest ?? {}, a = {
1534
+ let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Ie.has(l.manifestItemType), i = n.manifest ?? {}, a = {
1423
1535
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1424
- itemType: c.manifestItemType || void 0,
1536
+ itemType: l.manifestItemType || void 0,
1425
1537
  identity: {
1426
- version: c.manifestVersion || "1.0.0",
1427
- displayName: c.manifestDisplayName
1538
+ version: l.manifestVersion || "1.0.0",
1539
+ displayName: l.manifestDisplayName
1428
1540
  },
1429
- ...r ? { jsonContent: c.manifestJsonContent || void 0 } : { digital: { install: {
1430
- type: c.manifestInstallType,
1431
- packageName: c.manifestPackageName,
1432
- registryUrl: c.manifestRegistryUrl
1541
+ ...r ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1542
+ type: l.manifestInstallType,
1543
+ ...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
1433
1544
  } } },
1434
- permissions: n,
1435
- compatibility: { minPlatformVersion: c.manifestMinPlatformVersion }
1436
- }, o = { ...t.pricingDetails ?? {} };
1437
- if (c.pricingType !== "FREE") {
1438
- let e = parseFloat(c.price);
1439
- isNaN(e) || (o.price = e), c.currency && (o.currency = c.currency);
1545
+ permissions: t,
1546
+ compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1547
+ }, o = { ...n.pricingDetails ?? {} };
1548
+ if (l.pricingType !== "FREE") {
1549
+ let e = parseFloat(l.price);
1550
+ isNaN(e) || (o.price = e), l.currency && (o.currency = l.currency);
1440
1551
  }
1441
- await h({ variables: {
1442
- id: t.id,
1552
+ await y({ variables: {
1553
+ id: n.id,
1443
1554
  input: {
1444
- iconUrl: c.iconUrl || null,
1445
- bannerUrl: c.bannerUrl || null,
1446
- videoUrl: c.videoUrl || null,
1447
- shortDescription: c.shortDescription || null,
1448
- description: c.description || null,
1555
+ iconUrl: l.iconUrl || null,
1556
+ bannerUrl: l.bannerUrl || null,
1557
+ videoUrl: l.videoUrl || null,
1558
+ shortDescription: l.shortDescription || null,
1559
+ description: l.description || null,
1449
1560
  screenshots: e.length > 0 ? e : null,
1450
- websiteUrl: c.websiteUrl || null,
1451
- documentationUrl: c.documentationUrl || null,
1452
- githubUrl: c.githubUrl || null,
1453
- supportUrl: c.supportUrl || null,
1454
- privacyPolicyUrl: c.privacyPolicyUrl || null,
1455
- termsOfServiceUrl: c.termsOfServiceUrl || null,
1456
- pricingType: c.pricingType || null,
1561
+ websiteUrl: l.websiteUrl || null,
1562
+ documentationUrl: l.documentationUrl || null,
1563
+ githubUrl: l.githubUrl || null,
1564
+ supportUrl: l.supportUrl || null,
1565
+ privacyPolicyUrl: l.privacyPolicyUrl || null,
1566
+ termsOfServiceUrl: l.termsOfServiceUrl || null,
1567
+ pricingType: l.pricingType || null,
1457
1568
  pricingDetails: Object.keys(o).length > 0 ? o : null,
1458
1569
  manifest: a
1459
1570
  }
1460
- } }), b("success");
1571
+ } }), x("success");
1461
1572
  } catch {
1462
- b("error");
1573
+ x("error");
1463
1574
  } finally {
1464
- d(!1);
1575
+ m(!1);
1576
+ }
1577
+ }, te = async () => {
1578
+ try {
1579
+ await b({ variables: { id: n.id } }), x("success");
1580
+ } catch {
1581
+ x("error");
1465
1582
  }
1466
- }, v = N(null), y = N(null), { upload: x, uploading: S, progress: C, error: D } = te(n, r, i, a), ee = A(async (e) => {
1583
+ }, D = N(null), O = N(null), { upload: k, uploading: M, progress: ie, error: I } = A(r, i, a, o), { upload: se, uploading: R, progress: ce, error: B } = A(r, i, a, o, "/DevPortal/Assets"), { upload: H, uploading: U, progress: le, error: ue } = A(r, i, a, o, "/DevPortal/Assets"), { upload: W, uploading: fe, progress: pe, error: me } = A(r, i, a, o, "/DevPortal/Assets"), K = j(async (e) => {
1467
1584
  let t = e.target.files?.[0];
1468
1585
  if (t) {
1469
1586
  e.target.value = "";
1470
1587
  try {
1471
- let e = await x(t);
1472
- l((t) => ({
1588
+ let e = await k(t);
1589
+ u((t) => ({
1473
1590
  ...t,
1474
1591
  manifestRegistryUrl: e.downloadUrl
1475
1592
  }));
1476
1593
  } catch {}
1477
1594
  }
1478
- }, [x]), O = A((e) => {
1595
+ }, [k]), he = j(async (e) => {
1596
+ e.preventDefault(), _(!1);
1597
+ let t = e.dataTransfer.files?.[0];
1598
+ if (t) try {
1599
+ let e = await k(t);
1600
+ u((t) => ({
1601
+ ...t,
1602
+ manifestRegistryUrl: e.downloadUrl
1603
+ }));
1604
+ } catch {}
1605
+ }, [k]), ge = j((e) => {
1479
1606
  let t = e.target.files?.[0];
1480
1607
  if (!t) return;
1481
1608
  let n = new FileReader();
1482
1609
  n.onload = (e) => {
1483
1610
  try {
1484
1611
  let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
1485
- l((e) => ({
1612
+ u((e) => ({
1486
1613
  ...e,
1487
1614
  manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
1488
1615
  manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
1489
1616
  manifestVersion: typeof n.version == "string" ? n.version : e.manifestVersion,
1490
1617
  manifestInstallType: typeof r.type == "string" ? r.type : e.manifestInstallType,
1491
- manifestPackageName: typeof r.packageName == "string" ? r.packageName : e.manifestPackageName,
1492
- manifestRegistryUrl: typeof r.registryUrl == "string" ? r.registryUrl : typeof r.url == "string" ? r.url : e.manifestRegistryUrl,
1618
+ manifestRegistryUrl: typeof r.url == "string" ? r.url : typeof r.registryUrl == "string" ? r.registryUrl : e.manifestRegistryUrl,
1493
1619
  manifestPermissionsText: a.length > 0 ? a.join("\n") : e.manifestPermissionsText,
1494
1620
  manifestMinPlatformVersion: typeof i.minPlatformVersion == "string" ? i.minPlatformVersion : e.manifestMinPlatformVersion
1495
1621
  }));
1496
1622
  } catch {}
1497
1623
  }, n.readAsText(t), e.target.value = "";
1498
- }, []), k = A(() => {
1499
- let e = c.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), n = Me.has(c.manifestItemType), r = {
1624
+ }, []), _e = j(() => {
1625
+ let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Ie.has(l.manifestItemType), r = {
1500
1626
  manifestVersion: "1.0",
1501
- itemType: c.manifestItemType || void 0,
1627
+ itemType: l.manifestItemType || void 0,
1502
1628
  identity: {
1503
- version: c.manifestVersion || "1.0.0",
1504
- displayName: c.manifestDisplayName
1629
+ version: l.manifestVersion || "1.0.0",
1630
+ displayName: l.manifestDisplayName
1505
1631
  },
1506
- ...n ? { jsonContent: c.manifestJsonContent || void 0 } : { digital: { install: {
1507
- type: c.manifestInstallType,
1508
- packageName: c.manifestPackageName,
1509
- registryUrl: c.manifestRegistryUrl
1632
+ ...t ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1633
+ type: l.manifestInstallType,
1634
+ ...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
1510
1635
  } } },
1511
1636
  permissions: e,
1512
- compatibility: { minPlatformVersion: c.manifestMinPlatformVersion }
1637
+ compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1513
1638
  }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1514
- o.href = a, o.download = `${t.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1515
- }, [t.slug, c]), M = c.pricingType !== "FREE", I = Me.has(c.manifestItemType), ne = !I && (c.manifestInstallType === "npm" || c.manifestInstallType === "git"), L = !I && (c.manifestInstallType === "git" || c.manifestInstallType === "zip"), R = c.manifestInstallType === "zip" ? s("devportal.zipDownloadUrl", "Zip Download URL") : s("devportal.repositoryUrl", "Repository URL"), z = c.manifestInstallType === "zip" ? "https://cdn.example.com/my-app-1.0.0.zip" : "https://github.com/org/repo";
1516
- return /* @__PURE__ */ X("div", {
1639
+ o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1640
+ }, [n.slug, l]), ve = Ie.has(l.manifestItemType), ye = l.manifestInstallType === "builtin", be = l.pricingType !== "FREE", xe = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1641
+ n.status;
1642
+ let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED";
1643
+ return /* @__PURE__ */ Y("div", {
1517
1644
  className: "space-y-8 max-w-3xl",
1518
1645
  children: [
1519
- /* @__PURE__ */ Y(m, {
1520
- title: s("devportal.storePresentation", "Store Presentation"),
1521
- description: s("devportal.storePresentationDescription", "Visual assets and descriptions shown in the store listing"),
1522
- children: /* @__PURE__ */ X("div", {
1523
- className: "space-y-4",
1646
+ Z ? /* @__PURE__ */ Y("div", {
1647
+ className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
1648
+ children: [/* @__PURE__ */ J(L, {
1649
+ size: 16,
1650
+ className: "text-success mt-0.5 shrink-0"
1651
+ }), /* @__PURE__ */ Y("div", {
1652
+ className: "text-sm",
1653
+ children: [/* @__PURE__ */ J("span", {
1654
+ className: "font-medium text-success",
1655
+ children: c("devportal.storeListing.published", "Published")
1656
+ }), n.publishedAt && /* @__PURE__ */ Y("span", {
1657
+ className: "text-muted-foreground ml-2",
1658
+ children: [
1659
+ c("devportal.storeListing.since", "since"),
1660
+ " ",
1661
+ new Date(n.publishedAt).toLocaleDateString()
1662
+ ]
1663
+ })]
1664
+ })]
1665
+ }) : X ? /* @__PURE__ */ Y("div", {
1666
+ className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
1667
+ children: [/* @__PURE__ */ J(ae, {
1668
+ size: 16,
1669
+ className: "text-primary mt-0.5 shrink-0"
1670
+ }), /* @__PURE__ */ Y("div", {
1671
+ className: "text-sm",
1524
1672
  children: [
1525
- /* @__PURE__ */ Y(w, {
1526
- label: s("devportal.iconUrl", "Icon URL"),
1527
- value: c.iconUrl,
1528
- onChange: (e) => g("iconUrl", e.target.value),
1529
- placeholder: "https://..."
1673
+ /* @__PURE__ */ J("span", {
1674
+ className: "font-medium text-primary",
1675
+ children: c("devportal.storeListing.underReview", "Submitted for review")
1530
1676
  }),
1531
- /* @__PURE__ */ Y(w, {
1532
- label: s("devportal.bannerUrl", "Banner URL"),
1533
- value: c.bannerUrl,
1534
- onChange: (e) => g("bannerUrl", e.target.value),
1535
- placeholder: "https://..."
1677
+ n.submittedAt && /* @__PURE__ */ J("span", {
1678
+ className: "text-muted-foreground ml-2",
1679
+ children: new Date(n.submittedAt).toLocaleDateString()
1536
1680
  }),
1537
- /* @__PURE__ */ Y(w, {
1538
- label: s("devportal.videoUrl", "Video URL"),
1539
- value: c.videoUrl,
1540
- onChange: (e) => g("videoUrl", e.target.value),
1681
+ n.reviewStatus && /* @__PURE__ */ Y("span", {
1682
+ className: "text-muted-foreground ml-2",
1683
+ children: ["· ", n.reviewStatus]
1684
+ })
1685
+ ]
1686
+ })]
1687
+ }) : /* @__PURE__ */ Y("div", {
1688
+ className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
1689
+ children: [/* @__PURE__ */ J(re, {
1690
+ size: 16,
1691
+ className: "text-warning mt-0.5 shrink-0"
1692
+ }), /* @__PURE__ */ Y("div", {
1693
+ className: "text-sm",
1694
+ children: [/* @__PURE__ */ J("span", {
1695
+ className: "font-medium text-warning",
1696
+ children: c("devportal.storeListing.draft", "Draft")
1697
+ }), /* @__PURE__ */ J("span", {
1698
+ className: "text-muted-foreground ml-2",
1699
+ children: c("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1700
+ })]
1701
+ })]
1702
+ }),
1703
+ /* @__PURE__ */ J(h, {
1704
+ title: c("devportal.package", "Package"),
1705
+ description: c("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1706
+ children: /* @__PURE__ */ Y("div", {
1707
+ className: "space-y-6",
1708
+ children: [
1709
+ /* @__PURE__ */ J(T, {
1710
+ label: c("devportal.storeItemType", "Item Type"),
1711
+ value: l.manifestItemType,
1712
+ onChange: (e) => {
1713
+ let t = e.target.value;
1714
+ C("manifestItemType", t), Ie.has(t) ? C("manifestInstallType", "json") : l.manifestInstallType === "json" && C("manifestInstallType", "zip");
1715
+ },
1716
+ options: Re,
1717
+ placeholder: c("devportal.selectItemType", "Select item type…"),
1718
+ hint: c("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1719
+ }),
1720
+ /* @__PURE__ */ Y("div", {
1721
+ className: "grid gap-4 sm:grid-cols-2",
1722
+ children: [/* @__PURE__ */ J(w, {
1723
+ label: c("devportal.manifestDisplayName", "Display Name"),
1724
+ value: l.manifestDisplayName,
1725
+ onChange: (e) => C("manifestDisplayName", e.target.value),
1726
+ placeholder: "My Awesome Node"
1727
+ }), /* @__PURE__ */ J(w, {
1728
+ label: c("devportal.manifestVersion", "Version"),
1729
+ value: l.manifestVersion,
1730
+ onChange: (e) => C("manifestVersion", e.target.value),
1731
+ placeholder: "1.0.0",
1732
+ hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1733
+ })]
1734
+ }),
1735
+ ve && /* @__PURE__ */ J(E, {
1736
+ label: c("devportal.jsonContent", l.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1737
+ value: l.manifestJsonContent,
1738
+ onChange: (e) => C("manifestJsonContent", e.target.value),
1739
+ rows: 12,
1740
+ placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1741
+ hint: c("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1742
+ }),
1743
+ !ve && /* @__PURE__ */ Y("div", {
1744
+ className: "space-y-3",
1745
+ children: [
1746
+ /* @__PURE__ */ Y("div", {
1747
+ className: "flex items-center justify-between flex-wrap gap-2",
1748
+ children: [/* @__PURE__ */ J("label", {
1749
+ className: "text-sm font-medium",
1750
+ children: c("devportal.packageFile", "Package File")
1751
+ }), /* @__PURE__ */ Y("label", {
1752
+ className: "flex items-center gap-2 text-sm cursor-pointer select-none",
1753
+ children: [/* @__PURE__ */ J("input", {
1754
+ type: "checkbox",
1755
+ checked: ye,
1756
+ onChange: (e) => C("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1757
+ className: "h-4 w-4 rounded border-border accent-primary"
1758
+ }), /* @__PURE__ */ J("span", {
1759
+ className: "text-text-secondary",
1760
+ children: c("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
1761
+ })]
1762
+ })]
1763
+ }),
1764
+ !ye && /* @__PURE__ */ Y(q, { children: [
1765
+ /* @__PURE__ */ Y("div", {
1766
+ className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1767
+ children: [/* @__PURE__ */ J(z, {
1768
+ size: 15,
1769
+ className: "mt-0.5 shrink-0"
1770
+ }), /* @__PURE__ */ Y("span", { children: [
1771
+ c("devportal.zipModelHint", "Package your code and a "),
1772
+ /* @__PURE__ */ J("code", {
1773
+ className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
1774
+ children: "manifest.json"
1775
+ }),
1776
+ c("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
1777
+ ] })]
1778
+ }),
1779
+ /* @__PURE__ */ Y("div", {
1780
+ onDragOver: (e) => {
1781
+ e.preventDefault(), _(!0);
1782
+ },
1783
+ onDragLeave: () => _(!1),
1784
+ onDrop: (e) => void he(e),
1785
+ onClick: () => !M && O.current?.click(),
1786
+ 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", g ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", M && "pointer-events-none opacity-75"),
1787
+ children: [/* @__PURE__ */ J("input", {
1788
+ ref: O,
1789
+ type: "file",
1790
+ accept: ".zip,application/zip,application/x-zip-compressed",
1791
+ className: "hidden",
1792
+ onChange: (e) => void K(e)
1793
+ }), M ? /* @__PURE__ */ Y(q, { children: [
1794
+ /* @__PURE__ */ J(V, {
1795
+ size: 28,
1796
+ className: "animate-spin text-primary"
1797
+ }),
1798
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
1799
+ className: "text-sm font-medium",
1800
+ children: [
1801
+ c("devportal.uploading", "Uploading…"),
1802
+ " ",
1803
+ ie,
1804
+ "%"
1805
+ ]
1806
+ }), /* @__PURE__ */ J("p", {
1807
+ className: "text-xs text-text-secondary mt-0.5",
1808
+ children: c("devportal.uploadingHint", "Stored securely in your workspace")
1809
+ })] }),
1810
+ /* @__PURE__ */ J("div", {
1811
+ className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
1812
+ children: /* @__PURE__ */ J("div", {
1813
+ className: "h-full bg-primary transition-all",
1814
+ style: { width: `${ie}%` }
1815
+ })
1816
+ })
1817
+ ] }) : xe ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, {
1818
+ size: 28,
1819
+ className: "text-status-success-text"
1820
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1821
+ className: "text-sm font-medium",
1822
+ children: xe
1823
+ }), /* @__PURE__ */ J("p", {
1824
+ className: "text-xs text-text-secondary mt-0.5",
1825
+ children: c("devportal.clickToReplace", "Click or drag to replace")
1826
+ })] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G, {
1827
+ size: 28,
1828
+ className: "text-text-secondary"
1829
+ }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1830
+ className: "text-sm font-medium",
1831
+ children: c("devportal.dropZipHere", "Drop your .zip here")
1832
+ }), /* @__PURE__ */ J("p", {
1833
+ className: "text-xs text-text-secondary mt-0.5",
1834
+ children: c("devportal.orClickToBrowse", "or click to browse")
1835
+ })] })] })]
1836
+ }),
1837
+ I && /* @__PURE__ */ J("p", {
1838
+ className: "text-xs text-status-error-text",
1839
+ children: I
1840
+ })
1841
+ ] }),
1842
+ ye && /* @__PURE__ */ Y("div", {
1843
+ className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1844
+ children: [/* @__PURE__ */ J(z, {
1845
+ size: 15,
1846
+ className: "mt-0.5 shrink-0"
1847
+ }), /* @__PURE__ */ J("span", { children: c("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1848
+ })
1849
+ ]
1850
+ }),
1851
+ /* @__PURE__ */ Y("div", {
1852
+ className: "flex flex-wrap items-center gap-2 border-t pt-4",
1853
+ children: [
1854
+ /* @__PURE__ */ J("input", {
1855
+ ref: D,
1856
+ type: "file",
1857
+ accept: ".json,application/json",
1858
+ className: "hidden",
1859
+ onChange: ge
1860
+ }),
1861
+ /* @__PURE__ */ J("span", {
1862
+ className: "text-xs text-text-secondary mr-1",
1863
+ children: "manifest.json:"
1864
+ }),
1865
+ /* @__PURE__ */ Y("button", {
1866
+ type: "button",
1867
+ onClick: () => D.current?.click(),
1868
+ 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",
1869
+ children: [/* @__PURE__ */ J(G, { size: 12 }), c("devportal.importManifest", "Import")]
1870
+ }),
1871
+ /* @__PURE__ */ Y("button", {
1872
+ type: "button",
1873
+ onClick: _e,
1874
+ 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",
1875
+ children: [/* @__PURE__ */ J(oe, { size: 12 }), c("devportal.exportManifest", "Export")]
1876
+ }),
1877
+ /* @__PURE__ */ J("span", {
1878
+ className: "text-xs text-text-secondary",
1879
+ children: c("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
1880
+ })
1881
+ ]
1882
+ })
1883
+ ]
1884
+ })
1885
+ }),
1886
+ /* @__PURE__ */ J(h, {
1887
+ title: c("devportal.storePresentation", "Store Presence"),
1888
+ description: c("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
1889
+ children: /* @__PURE__ */ Y("div", {
1890
+ className: "space-y-5",
1891
+ children: [
1892
+ /* @__PURE__ */ Y("div", {
1893
+ className: "grid gap-5 sm:grid-cols-2",
1894
+ children: [/* @__PURE__ */ J(Pe, {
1895
+ label: c("devportal.iconUrl", "Icon"),
1896
+ value: l.iconUrl,
1897
+ onChange: (e) => C("iconUrl", e),
1898
+ hint: c("devportal.iconUrlHint", "Square, 256×256 px recommended"),
1899
+ aspectClass: "aspect-square",
1900
+ upload: se,
1901
+ uploading: R,
1902
+ progress: ce,
1903
+ error: B
1904
+ }), /* @__PURE__ */ J(Pe, {
1905
+ label: c("devportal.bannerUrl", "Banner"),
1906
+ value: l.bannerUrl,
1907
+ onChange: (e) => C("bannerUrl", e),
1908
+ hint: c("devportal.bannerUrlHint", "1280×640 px recommended"),
1909
+ aspectClass: "aspect-video",
1910
+ upload: H,
1911
+ uploading: U,
1912
+ progress: le,
1913
+ error: ue
1914
+ })]
1915
+ }),
1916
+ /* @__PURE__ */ J(w, {
1917
+ label: c("devportal.videoUrl", "Demo Video URL"),
1918
+ value: l.videoUrl,
1919
+ onChange: (e) => C("videoUrl", e.target.value),
1541
1920
  placeholder: "https://...",
1542
- hint: s("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
1921
+ hint: c("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
1543
1922
  }),
1544
- /* @__PURE__ */ Y(E, {
1545
- label: s("devportal.shortDescription", "Short Description"),
1546
- value: c.shortDescription,
1547
- onChange: (e) => g("shortDescription", e.target.value),
1923
+ /* @__PURE__ */ J(E, {
1924
+ label: c("devportal.shortDescription", "Short Description"),
1925
+ value: l.shortDescription,
1926
+ onChange: (e) => C("shortDescription", e.target.value),
1548
1927
  maxLength: 200,
1549
1928
  rows: 2,
1550
- hint: `${c.shortDescription.length}/200 ${s("devportal.characters", "characters")}`
1929
+ hint: `${l.shortDescription.length}/200 · ${c("devportal.shortDescHint", "Shown in search results and cards")}`
1551
1930
  }),
1552
- /* @__PURE__ */ Y(E, {
1553
- label: s("devportal.longDescription", "Long Description"),
1554
- value: c.description,
1555
- onChange: (e) => g("description", e.target.value),
1556
- rows: 4
1931
+ /* @__PURE__ */ J(E, {
1932
+ label: c("devportal.longDescription", "Full Description"),
1933
+ value: l.description,
1934
+ onChange: (e) => C("description", e.target.value),
1935
+ rows: 5,
1936
+ hint: c("devportal.fullDescHint", "Markdown supported")
1557
1937
  }),
1558
- /* @__PURE__ */ Y(E, {
1559
- label: s("devportal.screenshotUrls", "Screenshot URLs (one per line)"),
1560
- value: c.screenshotsText,
1561
- onChange: (e) => g("screenshotsText", e.target.value),
1562
- rows: 4,
1563
- placeholder: "https://...\nhttps://..."
1938
+ /* @__PURE__ */ J(Fe, {
1939
+ urls: l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
1940
+ onChange: (e) => C("screenshotsText", e.join("\n")),
1941
+ upload: W,
1942
+ uploading: fe,
1943
+ progress: pe,
1944
+ error: me
1564
1945
  })
1565
1946
  ]
1566
1947
  })
1567
1948
  }),
1568
- /* @__PURE__ */ Y(m, {
1569
- title: s("devportal.linksPolicies", "Links & Policies"),
1570
- description: s("devportal.linksPoliciesDescription", "External resources and legal documents for your application"),
1571
- children: /* @__PURE__ */ X("div", {
1949
+ /* @__PURE__ */ J(h, {
1950
+ title: c("devportal.linksPolicies", "Links & Policies"),
1951
+ description: c("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
1952
+ children: /* @__PURE__ */ Y("div", {
1572
1953
  className: "grid gap-4 sm:grid-cols-2",
1573
1954
  children: [
1574
- /* @__PURE__ */ Y(w, {
1575
- label: s("devportal.websiteUrl", "Website URL"),
1576
- value: c.websiteUrl,
1577
- onChange: (e) => g("websiteUrl", e.target.value),
1955
+ /* @__PURE__ */ J(w, {
1956
+ label: c("devportal.websiteUrl", "Website"),
1957
+ value: l.websiteUrl,
1958
+ onChange: (e) => C("websiteUrl", e.target.value),
1578
1959
  placeholder: "https://..."
1579
1960
  }),
1580
- /* @__PURE__ */ Y(w, {
1581
- label: s("devportal.documentationUrl", "Documentation URL"),
1582
- value: c.documentationUrl,
1583
- onChange: (e) => g("documentationUrl", e.target.value),
1961
+ /* @__PURE__ */ J(w, {
1962
+ label: c("devportal.documentationUrl", "Documentation"),
1963
+ value: l.documentationUrl,
1964
+ onChange: (e) => C("documentationUrl", e.target.value),
1584
1965
  placeholder: "https://..."
1585
1966
  }),
1586
- /* @__PURE__ */ Y(w, {
1587
- label: s("devportal.githubUrl", "GitHub URL"),
1588
- value: c.githubUrl,
1589
- onChange: (e) => g("githubUrl", e.target.value),
1590
- placeholder: "https://..."
1967
+ /* @__PURE__ */ J(w, {
1968
+ label: c("devportal.githubUrl", "GitHub"),
1969
+ value: l.githubUrl,
1970
+ onChange: (e) => C("githubUrl", e.target.value),
1971
+ placeholder: "https://github.com/..."
1591
1972
  }),
1592
- /* @__PURE__ */ Y(w, {
1593
- label: s("devportal.supportUrl", "Support URL"),
1594
- value: c.supportUrl,
1595
- onChange: (e) => g("supportUrl", e.target.value),
1973
+ /* @__PURE__ */ J(w, {
1974
+ label: c("devportal.supportUrl", "Support"),
1975
+ value: l.supportUrl,
1976
+ onChange: (e) => C("supportUrl", e.target.value),
1596
1977
  placeholder: "https://..."
1597
1978
  }),
1598
- /* @__PURE__ */ Y(w, {
1599
- label: `${s("devportal.privacyPolicyUrl", "Privacy Policy URL")} *`,
1600
- value: c.privacyPolicyUrl,
1601
- onChange: (e) => g("privacyPolicyUrl", e.target.value),
1979
+ /* @__PURE__ */ J(w, {
1980
+ label: `${c("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
1981
+ value: l.privacyPolicyUrl,
1982
+ onChange: (e) => C("privacyPolicyUrl", e.target.value),
1602
1983
  placeholder: "https://...",
1603
- hint: s("devportal.requiredForStore", "Required for store submission")
1984
+ hint: c("devportal.requiredForStore", "Required for store submission")
1604
1985
  }),
1605
- /* @__PURE__ */ Y(w, {
1606
- label: `${s("devportal.termsOfServiceUrl", "Terms of Service URL")} *`,
1607
- value: c.termsOfServiceUrl,
1608
- onChange: (e) => g("termsOfServiceUrl", e.target.value),
1986
+ /* @__PURE__ */ J(w, {
1987
+ label: `${c("devportal.termsOfServiceUrl", "Terms of Service")} *`,
1988
+ value: l.termsOfServiceUrl,
1989
+ onChange: (e) => C("termsOfServiceUrl", e.target.value),
1609
1990
  placeholder: "https://...",
1610
- hint: s("devportal.requiredForStore", "Required for store submission")
1991
+ hint: c("devportal.requiredForStore", "Required for store submission")
1611
1992
  })
1612
1993
  ]
1613
1994
  })
1614
1995
  }),
1615
- /* @__PURE__ */ Y(m, {
1616
- title: s("devportal.pricing", "Pricing"),
1617
- description: s("devportal.pricingDescription", "Configure how your app is priced in the store"),
1618
- children: /* @__PURE__ */ X("div", {
1996
+ /* @__PURE__ */ J(h, {
1997
+ title: c("devportal.pricing", "Pricing"),
1998
+ description: c("devportal.pricingDescription", "How this item is priced in the marketplace"),
1999
+ children: /* @__PURE__ */ Y("div", {
1619
2000
  className: "space-y-4",
1620
- children: [/* @__PURE__ */ Y(T, {
1621
- label: s("devportal.pricingType", "Pricing Type"),
1622
- value: c.pricingType,
1623
- onChange: (e) => g("pricingType", e.target.value),
1624
- options: Ne
1625
- }), M && /* @__PURE__ */ X("div", {
2001
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
2002
+ className: "mb-2 block text-sm font-medium",
2003
+ children: c("devportal.pricingType", "Pricing Type")
2004
+ }), /* @__PURE__ */ J("div", {
2005
+ className: "flex flex-wrap gap-2",
2006
+ children: Le.map((e) => /* @__PURE__ */ J("button", {
2007
+ type: "button",
2008
+ onClick: () => C("pricingType", e.value),
2009
+ className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
2010
+ children: e.label
2011
+ }, e.value))
2012
+ })] }), be && /* @__PURE__ */ Y("div", {
1626
2013
  className: "grid gap-4 sm:grid-cols-2",
1627
- children: [/* @__PURE__ */ Y(w, {
1628
- label: s("devportal.price", "Price"),
2014
+ children: [/* @__PURE__ */ J(w, {
2015
+ label: c("devportal.price", "Price"),
1629
2016
  type: "number",
1630
- value: c.price,
1631
- onChange: (e) => g("price", e.target.value),
2017
+ value: l.price,
2018
+ onChange: (e) => C("price", e.target.value),
1632
2019
  placeholder: "0.00"
1633
- }), /* @__PURE__ */ Y(w, {
1634
- label: s("devportal.currency", "Currency"),
1635
- value: c.currency,
1636
- onChange: (e) => g("currency", e.target.value),
2020
+ }), /* @__PURE__ */ J(w, {
2021
+ label: c("devportal.currency", "Currency"),
2022
+ value: l.currency,
2023
+ onChange: (e) => C("currency", e.target.value),
1637
2024
  placeholder: "USD"
1638
2025
  })]
1639
2026
  })]
1640
2027
  })
1641
2028
  }),
1642
- /* @__PURE__ */ Y(m, {
1643
- title: s("devportal.manifestInstallConfig", "Manifest / Install Config"),
1644
- description: s("devportal.manifestInstallConfigDescription", "Technical metadata the platform uses to install and run this item"),
1645
- children: /* @__PURE__ */ X("div", {
1646
- className: "space-y-4",
1647
- children: [
1648
- /* @__PURE__ */ X("div", {
1649
- className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
1650
- children: [/* @__PURE__ */ Y(oe, {
1651
- size: 16,
1652
- className: "mt-0.5 shrink-0 text-text-secondary"
1653
- }), /* @__PURE__ */ X("div", {
1654
- className: "space-y-1 text-text-secondary",
1655
- children: [/* @__PURE__ */ Y("p", {
1656
- className: "font-medium text-foreground",
1657
- children: I ? s("devportal.howDeliveryWorksJsonOnly", "JSON-only delivery") : s("devportal.howDeliveryWorks", "How delivery works")
1658
- }), I ? /* @__PURE__ */ Y("p", { children: s("devportal.howDeliveryWorksJsonOnlyDescription", "Workflows and templates are pure JSON — no binary code needed. Paste or import your JSON content below. When a user installs this item, the platform applies this JSON directly (no zip download required).") }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("p", { children: s("devportal.howDeliveryWorksDescription", "Package your code + manifest.json into a zip file (like a Chrome extension). Host it on S3, GitHub Releases, or any CDN, then paste the URL below. When a user installs this item, the platform downloads and extracts the zip.") }), /* @__PURE__ */ Y("p", { children: s("devportal.versioningNote", "Each published version captures a snapshot of this manifest. Use the Versions tab to manage per-version zip URLs, see changelogs, or roll back to a prior release.") })] })]
1659
- })]
1660
- }),
1661
- /* @__PURE__ */ X("div", {
1662
- className: "flex items-center gap-2",
1663
- children: [
1664
- /* @__PURE__ */ Y("input", {
1665
- ref: v,
1666
- type: "file",
1667
- accept: ".json,application/json",
1668
- className: "hidden",
1669
- onChange: O
1670
- }),
1671
- /* @__PURE__ */ X("button", {
1672
- type: "button",
1673
- onClick: () => v.current?.click(),
1674
- className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
1675
- children: [/* @__PURE__ */ Y(K, { size: 14 }), s("devportal.importManifest", "Import manifest.json")]
1676
- }),
1677
- /* @__PURE__ */ X("button", {
1678
- type: "button",
1679
- onClick: k,
1680
- className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
1681
- children: [/* @__PURE__ */ Y(re, { size: 14 }), s("devportal.exportManifest", "Export manifest.json")]
1682
- })
1683
- ]
1684
- }),
1685
- /* @__PURE__ */ Y(T, {
1686
- label: s("devportal.storeItemType", "Store Item Type"),
1687
- value: c.manifestItemType,
1688
- onChange: (e) => g("manifestItemType", e.target.value),
1689
- options: Pe,
1690
- placeholder: s("devportal.selectItemType", "Select item type…"),
1691
- hint: s("devportal.storeItemTypeHint", "How this app is categorized in the Burdenoff marketplace (e.g. agent, node, widget)")
1692
- }),
1693
- /* @__PURE__ */ X("div", {
1694
- className: "grid gap-4 sm:grid-cols-2",
1695
- children: [/* @__PURE__ */ Y(w, {
1696
- label: s("devportal.manifestDisplayName", "Display Name"),
1697
- value: c.manifestDisplayName,
1698
- onChange: (e) => g("manifestDisplayName", e.target.value)
1699
- }), /* @__PURE__ */ Y(w, {
1700
- label: s("devportal.manifestVersion", "Version"),
1701
- value: c.manifestVersion,
1702
- onChange: (e) => g("manifestVersion", e.target.value),
1703
- placeholder: "1.0.0",
1704
- hint: s("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1705
- })]
1706
- }),
1707
- I && /* @__PURE__ */ Y(E, {
1708
- label: s("devportal.jsonContent", c.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1709
- value: c.manifestJsonContent,
1710
- onChange: (e) => g("manifestJsonContent", e.target.value),
1711
- rows: 12,
1712
- placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1713
- hint: s("devportal.jsonContentHint", "Paste the full JSON definition. This is stored directly — no zip needed.")
1714
- }),
1715
- !I && /* @__PURE__ */ Y(T, {
1716
- label: s("devportal.installType", "Install Type"),
1717
- value: c.manifestInstallType,
1718
- onChange: (e) => g("manifestInstallType", e.target.value),
1719
- options: Fe,
1720
- hint: c.manifestInstallType === "npm" ? s("devportal.installTypeNpmHint", "Published to an npm-compatible registry. Provide the package name below.") : c.manifestInstallType === "git" ? s("devportal.installTypeGitHint", "Cloned from a git repository URL.") : c.manifestInstallType === "zip" ? s("devportal.installTypeZipHint", "Package your code + manifest.json into a zip. Host it publicly (S3, CDN, GitHub Releases) and paste the URL below. Use the Versions tab to manage per-release zip URLs.") : c.manifestInstallType === "builtin" ? s("devportal.installTypeBuiltinHint", "Pre-installed in the platform. No download needed.") : void 0
1721
- }),
1722
- ne && /* @__PURE__ */ Y(w, {
1723
- label: s("devportal.packageName", "Package Name"),
1724
- value: c.manifestPackageName,
1725
- onChange: (e) => g("manifestPackageName", e.target.value),
1726
- placeholder: "@yourscope/your-package"
1727
- }),
1728
- !I && c.manifestInstallType === "zip" && /* @__PURE__ */ X("div", {
1729
- className: "space-y-2",
1730
- children: [
1731
- /* @__PURE__ */ Y("input", {
1732
- ref: y,
1733
- type: "file",
1734
- accept: ".zip,application/zip,application/x-zip-compressed",
1735
- className: "hidden",
1736
- onChange: (e) => void ee(e)
1737
- }),
1738
- /* @__PURE__ */ X("div", {
1739
- className: "flex items-center gap-2 flex-wrap",
1740
- children: [/* @__PURE__ */ Y("button", {
1741
- type: "button",
1742
- disabled: S || !n,
1743
- onClick: () => y.current?.click(),
1744
- title: n ? void 0 : s("devportal.workspacesGatewayNotConfigured", "workspacesGatewayUrl not configured — contact your shell integration"),
1745
- className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
1746
- children: S ? /* @__PURE__ */ X(J, { children: [
1747
- /* @__PURE__ */ Y(H, {
1748
- size: 14,
1749
- className: "animate-spin"
1750
- }),
1751
- s("devportal.uploading", "Uploading..."),
1752
- " ",
1753
- C,
1754
- "%"
1755
- ] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(K, { size: 14 }), s("devportal.uploadZipPackage", "Upload zip package")] })
1756
- }), S && /* @__PURE__ */ Y("div", {
1757
- className: "flex-1 h-1.5 min-w-[120px] rounded-full bg-muted overflow-hidden",
1758
- children: /* @__PURE__ */ Y("div", {
1759
- className: "h-full bg-primary transition-all",
1760
- style: { width: `${C}%` }
1761
- })
1762
- })]
1763
- }),
1764
- D && /* @__PURE__ */ Y("p", {
1765
- className: "text-xs text-status-error-text",
1766
- children: D
1767
- }),
1768
- /* @__PURE__ */ Y("p", {
1769
- className: "text-xs text-text-secondary",
1770
- children: s("devportal.zipUploadHint", "Upload stores the zip in your workspace Files (/DevPortal/Packages) and fills the URL below automatically.")
1771
- })
1772
- ]
1773
- }),
1774
- L && /* @__PURE__ */ Y(w, {
1775
- label: R,
1776
- value: c.manifestRegistryUrl,
1777
- onChange: (e) => g("manifestRegistryUrl", e.target.value),
1778
- placeholder: z,
1779
- hint: c.manifestInstallType === "zip" ? s("devportal.zipUrlHint", "Filled automatically after upload, or paste a URL to an externally-hosted zip.") : void 0
1780
- }),
1781
- /* @__PURE__ */ Y(E, {
1782
- label: s("devportal.requiredPermissions", "Required Permissions (one per line)"),
1783
- value: c.manifestPermissionsText,
1784
- onChange: (e) => g("manifestPermissionsText", e.target.value),
1785
- rows: 3,
1786
- placeholder: "read:users\nwrite:data",
1787
- hint: s("devportal.permissionsHint", "Platform capabilities this item requires the user to grant on install")
1788
- }),
1789
- /* @__PURE__ */ Y(w, {
1790
- label: s("devportal.minPlatformVersion", "Min Platform Version"),
1791
- value: c.manifestMinPlatformVersion,
1792
- onChange: (e) => g("manifestMinPlatformVersion", e.target.value),
1793
- placeholder: "2024.1.0"
1794
- })
1795
- ]
1796
- })
1797
- }),
1798
2029
  /* @__PURE__ */ Y("div", {
1799
- className: "border-t pt-6",
1800
- children: /* @__PURE__ */ Y("button", {
2030
+ className: "border-t pt-6 flex items-center gap-3 flex-wrap",
2031
+ children: [/* @__PURE__ */ J("button", {
1801
2032
  type: "button",
1802
- onClick: _,
1803
- disabled: u,
2033
+ onClick: ee,
2034
+ disabled: d,
1804
2035
  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",
1805
- children: u ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(H, {
2036
+ children: d ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
1806
2037
  size: 16,
1807
2038
  className: "animate-spin"
1808
- }), s("devportal.saving", "Saving...")] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(G, { size: 16 }), s("devportal.saveStoreListing", "Save Store Listing")] })
1809
- })
2039
+ }), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(de, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
2040
+ }), !Z && /* @__PURE__ */ J("button", {
2041
+ type: "button",
2042
+ onClick: () => void te(),
2043
+ disabled: S || d,
2044
+ 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",
2045
+ children: S ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
2046
+ size: 16,
2047
+ className: "animate-spin"
2048
+ }), c("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, { size: 16 }), X ? c("devportal.resubmitForReview", "Resubmit for Review") : c("devportal.submitForReview", "Submit for Review")] })
2049
+ })]
1810
2050
  })
1811
2051
  ]
1812
2052
  });
1813
2053
  }, Q = ({ label: e, value: n, trend: r }) => {
1814
2054
  let { t: i } = F();
1815
- return /* @__PURE__ */ X("div", {
2055
+ return /* @__PURE__ */ Y("div", {
1816
2056
  className: "rounded-lg border bg-card p-4",
1817
2057
  children: [
1818
- /* @__PURE__ */ Y("p", {
2058
+ /* @__PURE__ */ J("p", {
1819
2059
  className: "text-sm text-muted-foreground",
1820
2060
  children: e
1821
2061
  }),
1822
- /* @__PURE__ */ Y("p", {
2062
+ /* @__PURE__ */ J("p", {
1823
2063
  className: "text-2xl font-bold",
1824
2064
  children: n
1825
2065
  }),
1826
- r !== void 0 && /* @__PURE__ */ X("p", {
2066
+ r !== void 0 && /* @__PURE__ */ Y("p", {
1827
2067
  className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
1828
2068
  children: [
1829
2069
  r > 0 ? "+" : "",
@@ -1837,14 +2077,14 @@ var Le = ({ app: t }) => {
1837
2077
  })
1838
2078
  ]
1839
2079
  });
1840
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ X("a", {
2080
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ Y("a", {
1841
2081
  href: t,
1842
2082
  target: "_blank",
1843
2083
  rel: "noopener noreferrer",
1844
2084
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
1845
- children: [/* @__PURE__ */ Y(B, { size: 14 }), e]
2085
+ children: [/* @__PURE__ */ J(R, { size: 14 }), e]
1846
2086
  });
1847
2087
  //#endregion
1848
- export { be as ApplicationDetailPage };
2088
+ export { Se as ApplicationDetailPage };
1849
2089
 
1850
2090
  //# sourceMappingURL=ApplicationDetailPage.js.map