@burdenoff/microfe-devportal 2026.916.2 → 2026.916.3

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,30 +2,30 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { EmptyState as n } from "../components/EmptyState.js";
4
4
  import { orgSectionPath as r, useIsSellerSection as i } from "../hooks/useIsSellerSection.js";
5
- import { useGetApplicationsQuery as a, useGetOrganizationQuery as o, useGetRevenueSummaryQuery as s, useUpdateOrgLegalInfoMutation as c, useUpdateOrgTaxInfoMutation as l, useUpdateOrganizationMutation as u } from "../../generated/global-operations.js";
6
- import { PageLayout as d, PageSection as f } from "../components/PageLayout.js";
7
- import { ORG_ROLE_LABELS as p } from "../utils/constants.js";
8
- import { AppListItem as m } from "../components/AppCard.js";
9
- import { StatCard as h, StatCardGrid as g } from "../components/StatCard.js";
10
- import { DataTable as _, DetailList as v } from "../components/DataTable.js";
11
- import { InputField as y, TextareaField as ee } from "../components/FormField.js";
5
+ import { useGetApplicationsQuery as a, useGetMyPublisherQuery as o, useGetOrgPhysicalItemsQuery as s, useGetOrganizationQuery as c, useGetRevenueSummaryQuery as l, useUpdateOrgLegalInfoMutation as u, useUpdateOrgTaxInfoMutation as d, useUpdateOrganizationMutation as ee } from "../../generated/global-operations.js";
6
+ import { PageLayout as f, PageSection as p } from "../components/PageLayout.js";
7
+ import { ORG_ROLE_LABELS as m } from "../utils/constants.js";
8
+ import { AppListItem as h } from "../components/AppCard.js";
9
+ import { StatCard as g, StatCardGrid as _ } from "../components/StatCard.js";
10
+ import { DataTable as v, DetailList as te } from "../components/DataTable.js";
11
+ import { InputField as y, TextareaField as ne } from "../components/FormField.js";
12
12
  import { Alert as b, ConfirmDialog as x } from "../components/ConfirmDialog.js";
13
13
  import { RegisterPickupLocationModal as S } from "../components/RegisterPickupLocationModal.js";
14
14
  import { useDevportalPermission as C } from "../hooks/usePermission.js";
15
- import { capitalizeCarrierName as te, useCarrierPickupLocations as ne } from "../hooks/useCarrierPickupLocations.js";
16
- import { DEVPORTAL_PERMISSIONS as re } from "../constants/permissions.js";
17
- import { useOrganizationPickupAddresses as ie } from "../hooks/useOrganizationPickupAddresses.js";
18
- import { formatCurrency as w } from "../utils/currency.js";
19
- import { useEffect as T, useState as E } from "react";
20
- import { AlertCircle as ae, AppWindow as D, ArrowRight as oe, BarChart3 as O, Building2 as se, CheckCircle as k, CreditCard as A, DollarSign as j, ExternalLink as M, Loader2 as N, Plus as P, Settings as ce, Shield as le, Trash2 as ue, TrendingUp as F, Users as de } from "lucide-react";
15
+ import { capitalizeCarrierName as re, useCarrierPickupLocations as ie } from "../hooks/useCarrierPickupLocations.js";
16
+ import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
17
+ import { useOrganizationPickupAddresses as oe } from "../hooks/useOrganizationPickupAddresses.js";
18
+ import { formatCurrency as se } from "../utils/currency.js";
19
+ import { useEffect as w, useState as T } from "react";
20
+ import { AlertCircle as ce, AppWindow as E, ArrowRight as D, BarChart3 as O, Building2 as le, CheckCircle as k, CreditCard as ue, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as de, Shield as P, Trash2 as fe, TrendingUp as F, Users as pe } from "lucide-react";
21
21
  import { useParams as I } from "react-router";
22
22
  import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
23
23
  import { useI18n as B } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
- import { EmphasisPanel as V, NextSteps as H } from "@burdenoff/fe-libs/ui";
25
- import { clearGraphqlFetchResponseCache as U, graphqlFetch as W } from "@burdenoff/fe-libs/shared/graphql";
24
+ import { EmphasisPanel as me, NextSteps as V } from "@burdenoff/fe-libs/ui";
25
+ import { clearGraphqlFetchResponseCache as he, graphqlFetch as H } from "@burdenoff/fe-libs/shared/graphql";
26
26
  //#region src/devportal/pages/OrganizationDetailPage.tsx
27
- var fe = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", G = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
28
- function pe(e) {
27
+ var U = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", W = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
28
+ function ge(e) {
29
29
  let t = e;
30
30
  return {
31
31
  id: e.id,
@@ -83,7 +83,7 @@ function pe(e) {
83
83
  updatedAt: e.updatedAt
84
84
  };
85
85
  }
86
- function K(e) {
86
+ function G(e) {
87
87
  return {
88
88
  id: e.id,
89
89
  organizationId: e.organizationId,
@@ -102,11 +102,11 @@ function K(e) {
102
102
  updatedAt: e.updatedAt
103
103
  };
104
104
  }
105
- function q(e) {
105
+ function _e(e) {
106
106
  let t = e.trim().toLowerCase();
107
107
  return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(t) && !t.includes("@");
108
108
  }
109
- function J(e) {
109
+ function K(e) {
110
110
  try {
111
111
  let t = new URL(e.trim());
112
112
  return t.protocol === "http:" || t.protocol === "https:";
@@ -114,119 +114,126 @@ function J(e) {
114
114
  return !1;
115
115
  }
116
116
  }
117
- function me(e) {
117
+ function ve(e) {
118
118
  let t = e.trim();
119
119
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
120
120
  }
121
- var Y = {
121
+ var q = {
122
122
  VIEWER: 0,
123
123
  DEVELOPER: 1,
124
124
  ADMIN: 2,
125
125
  OWNER: 3
126
- }, X = () => {
127
- let { navigate: n, basePath: c, setActiveOrgId: l, setActivePhysicalOrgId: u, currentUser: f } = e(), p = i(), { orgId: m } = I(), { addresses: h, loading: g, refetch: _ } = ie(m), { data: v } = s({
126
+ }, J = () => {
127
+ let { navigate: n, basePath: u, setActiveOrgId: d, setActivePhysicalOrgId: ee, currentUser: p } = e(), m = i(), { orgId: h } = I(), { addresses: g, loading: _, refetch: v } = oe(h), { data: te } = l({
128
128
  variables: {
129
- organizationId: m ?? "",
129
+ organizationId: h ?? "",
130
130
  period: "monthly"
131
131
  },
132
- skip: !m
133
- }), y = v?.developerOrgRevenueSummary?.currency ?? "USD", { t: ee } = B(), x = (e, t) => {
134
- let n = ee(e);
132
+ skip: !h
133
+ }), y = te?.developerOrgRevenueSummary?.currency ?? "USD", { t: ne } = B(), x = (e, t) => {
134
+ let n = ne(e);
135
135
  return n === e ? t : n;
136
- }, [S, C] = E("overview"), [te, ne] = E(!1), re = [
136
+ }, [S, C] = T("overview"), [re, ie] = T(!1), { data: ae, previousData: se, loading: D, error: O } = c({
137
+ variables: { id: h },
138
+ skip: !h
139
+ }), k = ae ?? se, { data: j } = a({
140
+ variables: {
141
+ limit: 50,
142
+ organizationId: h
143
+ },
144
+ skip: !h,
145
+ fetchPolicy: "cache-and-network"
146
+ }), P = k?.developerOrganization?.kind === "PHYSICAL", { data: fe } = o({ skip: !P }), { data: F } = s({
147
+ variables: {
148
+ publisherId: fe?.myPublisher?.id ?? "",
149
+ limit: 50
150
+ },
151
+ skip: !P || !fe?.myPublisher?.id,
152
+ fetchPolicy: "cache-and-network"
153
+ }), L = F?.products ?? [], me = [
137
154
  {
138
155
  id: "overview",
139
156
  label: x("devportal.overview", "Overview"),
140
- icon: se
157
+ icon: le
141
158
  },
142
159
  {
143
160
  id: "apps",
144
- label: x("devportal.applications", "Applications"),
145
- icon: D
161
+ label: P ? x("devportal.items", "Items") : x("devportal.applications", "Applications"),
162
+ icon: E
146
163
  },
147
164
  {
148
165
  id: "members",
149
166
  label: x("devportal.members", "Members"),
150
- icon: de
167
+ icon: pe
151
168
  },
152
169
  {
153
170
  id: "settings",
154
171
  label: x("devportal.settings", "Settings"),
155
- icon: ce
172
+ icon: de
156
173
  }
157
- ], { data: w, previousData: oe, loading: O, error: k } = o({
158
- variables: { id: m },
159
- skip: !m
160
- }), M = w ?? oe, { data: le } = a({
161
- variables: {
162
- limit: 50,
163
- organizationId: m
164
- },
165
- skip: !m,
166
- fetchPolicy: "cache-and-network"
167
- }), ue = (M?.developerOrganization?.members ?? []).map(K), F = (f ? ue.find((e) => e.userId === f.id) : void 0)?.role, L = F !== void 0 && Y[F] >= Y.DEVELOPER, V = F !== void 0 && Y[F] >= Y.ADMIN, U = V, W = V, fe = re.filter((e) => e.id !== "settings" || V), G = (e) => {
168
- n?.(`${c}${e}`);
174
+ ], he = (k?.developerOrganization?.members ?? []).map(G), H = (p ? he.find((e) => e.userId === p.id) : void 0)?.role, U = H !== void 0 && q[H] >= q.DEVELOPER, W = H !== void 0 && q[H] >= q.ADMIN, _e = W, K = W, ve = me.filter((e) => e.id !== "settings" || W), J = (e) => {
175
+ n?.(`${u}${e}`);
169
176
  };
170
- if (T(() => {
171
- m && (p ? u(m) : l(m));
177
+ if (w(() => {
178
+ h && (m ? ee(h) : d(h));
172
179
  }, [
180
+ h,
173
181
  m,
174
- p,
175
- l,
176
- u
177
- ]), T(() => {
178
- S === "settings" && !V && C("overview");
179
- }, [S, V]), T(() => {
180
- let e = M?.developerOrganization?.name;
181
- if (!m || !e) return;
182
+ d,
183
+ ee
184
+ ]), w(() => {
185
+ S === "settings" && !W && C("overview");
186
+ }, [S, W]), w(() => {
187
+ let e = k?.developerOrganization?.name;
188
+ if (!h || !e) return;
182
189
  let t = window.__breadcrumbRegistry;
183
- return t?.register(m, e), () => t?.unregister(m);
184
- }, [m, w?.developerOrganization?.name]), O && !M) return /* @__PURE__ */ R(d, {
190
+ return t?.register(h, e), () => t?.unregister(h);
191
+ }, [h, ae?.developerOrganization?.name]), D && !k) return /* @__PURE__ */ R(f, {
185
192
  title: x("devportal.loadingDots", "Loading..."),
186
- backLink: `${c}${r(p)}`,
193
+ backLink: `${u}${r(m)}`,
187
194
  backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
188
195
  children: /* @__PURE__ */ R("div", {
189
196
  className: "flex items-center justify-center py-12",
190
- children: /* @__PURE__ */ R(N, { className: "h-8 w-8 animate-spin text-text-secondary" })
197
+ children: /* @__PURE__ */ R(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
191
198
  })
192
199
  });
193
- if (k || !M?.developerOrganization) return /* @__PURE__ */ R(d, {
200
+ if (O || !k?.developerOrganization) return /* @__PURE__ */ R(f, {
194
201
  title: x("devportal.organizationNotFound", "Organization Not Found"),
195
- backLink: `${c}${r(p)}`,
202
+ backLink: `${u}${r(m)}`,
196
203
  backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
197
204
  children: /* @__PURE__ */ z("div", {
198
205
  className: "flex flex-col items-center justify-center py-12 gap-4",
199
206
  children: [
200
- /* @__PURE__ */ R(ae, { className: "h-12 w-12 text-status-error-text" }),
207
+ /* @__PURE__ */ R(ce, { className: "h-12 w-12 text-status-error-text" }),
201
208
  /* @__PURE__ */ R("h2", {
202
209
  className: "text-lg font-semibold",
203
210
  children: x("devportal.organizationNotFoundLower", "Organization not found")
204
211
  }),
205
212
  /* @__PURE__ */ R("p", {
206
213
  className: "text-text-secondary",
207
- children: k?.message || x("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
214
+ children: O?.message || x("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
208
215
  }),
209
216
  /* @__PURE__ */ R("button", {
210
- onClick: () => G(r(p)),
217
+ onClick: () => J(r(m)),
211
218
  className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
212
219
  children: x("devportal.backToOrganizations", "Back to Organizations")
213
220
  })
214
221
  ]
215
222
  })
216
223
  });
217
- let q = pe(M.developerOrganization), J = ue, me = le?.applications?.edges?.map((e) => e.node) ?? [], X = `/billing/earnings?developerOrgId=${encodeURIComponent(q.id)}&developerOrgName=${encodeURIComponent(q.name)}&returnTo=${encodeURIComponent(`${c}${r(p, q.id)}`)}`;
218
- return /* @__PURE__ */ z(d, {
219
- title: q.name,
220
- description: q.description,
224
+ let Y = ge(k.developerOrganization), X = he, Z = j?.applications?.edges?.map((e) => e.node) ?? [], Ce = `/billing/earnings?developerOrgId=${encodeURIComponent(Y.id)}&developerOrgName=${encodeURIComponent(Y.name)}&returnTo=${encodeURIComponent(`${u}${r(m, Y.id)}`)}`;
225
+ return /* @__PURE__ */ z(f, {
226
+ title: Y.name,
227
+ description: Y.description,
221
228
  purpose: x("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
222
- backLink: `${c}${r(p)}`,
229
+ backLink: `${u}${r(m)}`,
223
230
  backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
224
231
  actions: /* @__PURE__ */ R("div", {
225
232
  className: "flex items-center gap-2",
226
- children: U ? /* @__PURE__ */ z("button", {
227
- onClick: () => n?.(X),
233
+ children: _e ? /* @__PURE__ */ z("button", {
234
+ onClick: () => n?.(Ce),
228
235
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
229
- children: [/* @__PURE__ */ R(j, { size: 16 }), x("devportal.revenue", "Revenue")]
236
+ children: [/* @__PURE__ */ R(A, { size: 16 }), x("devportal.revenue", "Revenue")]
230
237
  }) : null
231
238
  }),
232
239
  children: [
@@ -236,7 +243,7 @@ var Y = {
236
243
  className: "-mb-px flex gap-4 overflow-x-auto",
237
244
  role: "tablist",
238
245
  "aria-label": x("devportal.organizationSections", "Organization sections"),
239
- children: fe.map((e) => {
246
+ children: ve.map((e) => {
240
247
  let n = e.icon;
241
248
  return /* @__PURE__ */ z("button", {
242
249
  id: `organization-tab-${e.id}`,
@@ -250,59 +257,59 @@ var Y = {
250
257
  })
251
258
  })
252
259
  }),
253
- V && p && !g && h.length === 0 && /* @__PURE__ */ z(b, {
260
+ W && m && !_ && g.length === 0 && /* @__PURE__ */ z(b, {
254
261
  variant: "warning",
255
262
  title: x("devportal.pickupAddressRequiredTitle", "Pickup address required"),
256
263
  className: "mt-6",
257
264
  children: [/* @__PURE__ */ R("p", { children: x("devportal.pickupAddressRequiredDesc", "This organization sells physical items, so it needs a real pickup address before it's fully set up — buyers need to know where orders actually ship from.") }), /* @__PURE__ */ R("button", {
258
265
  type: "button",
259
266
  onClick: () => {
260
- C("settings"), ne(!0);
267
+ C("settings"), ie(!0);
261
268
  },
262
269
  className: "mt-2 text-sm font-semibold underline",
263
270
  children: x("devportal.pickupAddressRequiredCta", "Configure it now")
264
271
  })]
265
272
  }),
266
- /* @__PURE__ */ R(H, {
273
+ /* @__PURE__ */ R(V, {
267
274
  className: "mt-6",
268
- storageKey: `devportal-org-${q.id}`,
275
+ storageKey: `devportal-org-${Y.id}`,
269
276
  steps: [
270
- ...W ? [{
277
+ ...K ? [{
271
278
  id: "invite-members",
272
279
  label: x("devportal.inviteMembers", "Invite members"),
273
280
  description: x("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
274
- icon: /* @__PURE__ */ R(de, { size: 16 }),
281
+ icon: /* @__PURE__ */ R(pe, { size: 16 }),
275
282
  onClick: () => C("members")
276
283
  }] : [],
277
- ...V ? [{
284
+ ...W ? [{
278
285
  id: "settings",
279
286
  label: x("devportal.orgStepVerify", "Complete organization profile"),
280
287
  description: x("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
281
- icon: /* @__PURE__ */ R(ce, { size: 16 }),
288
+ icon: /* @__PURE__ */ R(de, { size: 16 }),
282
289
  onClick: () => C("settings"),
283
- done: !!q.isVerified
290
+ done: !!Y.isVerified
284
291
  }] : [],
285
- ...V ? [{
292
+ ...W ? [{
286
293
  id: "link-billing",
287
294
  label: x("devportal.orgStepLinkBilling", "Link billing account"),
288
295
  description: x("devportal.orgStepLinkBillingDesc", "Connect a billing account so sale and payout revenue has somewhere to go"),
289
- icon: /* @__PURE__ */ R(A, { size: 16 }),
290
- onClick: () => n?.(X),
291
- done: !!q.billingAccountId
296
+ icon: /* @__PURE__ */ R(ue, { size: 16 }),
297
+ onClick: () => n?.(Ce),
298
+ done: !!Y.billingAccountId
292
299
  }] : [],
293
- ...L && !p ? [{
300
+ ...U && !m ? [{
294
301
  id: "create-app",
295
302
  label: x("devportal.createApp", "Create App"),
296
303
  description: x("devportal.orgStepCreateApp", "Build a new application under this organization"),
297
- icon: /* @__PURE__ */ R(D, { size: 16 }),
298
- onClick: () => G("/apps/new")
304
+ icon: /* @__PURE__ */ R(E, { size: 16 }),
305
+ onClick: () => J("/apps/new")
299
306
  }] : [],
300
- ...L && p ? [{
307
+ ...U && m ? [{
301
308
  id: "list-item",
302
309
  label: x("devportal.listAnItem", "List an Item"),
303
310
  description: x("devportal.orgStepListItem", "List a physical product for sale under this organization"),
304
- icon: /* @__PURE__ */ R(P, { size: 16 }),
305
- onClick: () => G("/seller/items/new")
311
+ icon: /* @__PURE__ */ R(N, { size: 16 }),
312
+ onClick: () => J("/seller/items/new")
306
313
  }] : []
307
314
  ]
308
315
  }),
@@ -313,171 +320,179 @@ var Y = {
313
320
  "aria-labelledby": `organization-tab-${S}`,
314
321
  tabIndex: 0,
315
322
  children: [
316
- S === "overview" && /* @__PURE__ */ R(Z, {
317
- org: q,
318
- apps: me,
319
- members: J,
320
- canCreateApps: L,
321
- canViewRevenue: U,
323
+ S === "overview" && /* @__PURE__ */ R(ye, {
324
+ org: Y,
325
+ apps: Z,
326
+ physicalItems: L,
327
+ members: X,
328
+ canCreateApps: U,
329
+ canViewRevenue: _e,
322
330
  currency: y,
323
- onNavigate: G,
331
+ onNavigate: J,
324
332
  onShowApps: () => C("apps")
325
333
  }),
326
- S === "apps" && /* @__PURE__ */ R(he, {
327
- org: q,
328
- apps: me,
329
- onNavigate: G,
330
- canCreateApps: L
334
+ S === "apps" && /* @__PURE__ */ R(be, {
335
+ org: Y,
336
+ apps: Z,
337
+ physicalItems: L,
338
+ onNavigate: J,
339
+ canCreateApps: U
331
340
  }),
332
- S === "members" && /* @__PURE__ */ R(ge, {
333
- members: J,
334
- onNavigate: G,
335
- orgId: q.id,
336
- canInviteMembers: W
341
+ S === "members" && /* @__PURE__ */ R(xe, {
342
+ members: X,
343
+ onNavigate: J,
344
+ orgId: Y.id,
345
+ canInviteMembers: K
337
346
  }),
338
- S === "settings" && V && /* @__PURE__ */ R(_e, {
339
- org: q,
340
- pickupAddresses: h,
341
- pickupAddressesLoading: g,
342
- refetchPickupAddresses: _,
343
- focusFulfillment: te,
344
- onFocusFulfillmentHandled: () => ne(!1)
347
+ S === "settings" && W && /* @__PURE__ */ R(Se, {
348
+ org: Y,
349
+ pickupAddresses: g,
350
+ pickupAddressesLoading: _,
351
+ refetchPickupAddresses: v,
352
+ focusFulfillment: re,
353
+ onFocusFulfillmentHandled: () => ie(!1)
345
354
  })
346
355
  ]
347
356
  })
348
357
  ]
349
358
  });
350
- }, Z = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, currency: o, onNavigate: s, onShowApps: c }) => {
351
- let { t: l } = B(), u = (e, t) => {
352
- let n = l(e);
359
+ }, ye = ({ org: e, apps: t, physicalItems: r, members: i, canCreateApps: a, canViewRevenue: o, currency: s, onNavigate: c, onShowApps: l }) => {
360
+ let { t: u } = B(), d = (e, t) => {
361
+ let n = u(e);
353
362
  return n === e ? t : n;
354
363
  };
355
364
  return /* @__PURE__ */ z("div", {
356
365
  className: "grid gap-6 lg:grid-cols-3",
357
366
  children: [/* @__PURE__ */ z("div", {
358
367
  className: "lg:col-span-2 space-y-6",
359
- children: [/* @__PURE__ */ R(V, { children: /* @__PURE__ */ z(g, {
360
- columns: e.kind === "PHYSICAL" ? 2 : a ? 4 : 3,
368
+ children: [/* @__PURE__ */ R(me, { children: /* @__PURE__ */ z(_, {
369
+ columns: e.kind === "PHYSICAL" ? 2 : o ? 4 : 3,
361
370
  children: [
362
- e.kind !== "PHYSICAL" && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(h, {
363
- title: u("devportal.publishedApps", "Published Apps"),
371
+ e.kind !== "PHYSICAL" && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(g, {
372
+ title: d("devportal.publishedApps", "Published Apps"),
364
373
  value: `${e.publishedApps}/${e.totalApps}`,
365
- icon: /* @__PURE__ */ R(D, { size: 20 })
366
- }), /* @__PURE__ */ R(h, {
367
- title: u("devportal.totalInstalls", "Total Installs"),
374
+ icon: /* @__PURE__ */ R(E, { size: 20 })
375
+ }), /* @__PURE__ */ R(g, {
376
+ title: d("devportal.totalInstalls", "Total Installs"),
368
377
  value: e.totalInstalls.toLocaleString(),
369
378
  icon: /* @__PURE__ */ R(F, { size: 20 })
370
379
  })] }),
371
- a ? /* @__PURE__ */ R(h, {
372
- title: u("devportal.totalRevenue", "Total Revenue"),
373
- value: w(e.totalRevenue, o),
374
- icon: /* @__PURE__ */ R(j, { size: 20 })
380
+ o ? /* @__PURE__ */ R(g, {
381
+ title: d("devportal.totalRevenue", "Total Revenue"),
382
+ value: se(e.totalRevenue, s),
383
+ icon: /* @__PURE__ */ R(A, { size: 20 })
375
384
  }) : null,
376
- /* @__PURE__ */ R(h, {
377
- title: u("devportal.avgRating", "Avg Rating"),
378
- value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : u("devportal.notAvailable", "N/A"),
385
+ /* @__PURE__ */ R(g, {
386
+ title: d("devportal.avgRating", "Avg Rating"),
387
+ value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : d("devportal.notAvailable", "N/A"),
379
388
  icon: /* @__PURE__ */ R(O, { size: 20 })
380
389
  })
381
390
  ]
382
- }) }), /* @__PURE__ */ R(f, {
383
- title: u("devportal.recentApplications", "Recent Applications"),
391
+ }) }), /* @__PURE__ */ R(p, {
392
+ title: e.kind === "PHYSICAL" ? d("devportal.recentItems", "Recent Items") : d("devportal.recentApplications", "Recent Applications"),
384
393
  actions: /* @__PURE__ */ z("button", {
385
- onClick: c,
394
+ onClick: l,
386
395
  className: "text-sm text-primary hover:underline flex items-center gap-1",
387
396
  children: [
388
- u("devportal.viewAll", "View all"),
397
+ d("devportal.viewAll", "View all"),
389
398
  " ",
390
- /* @__PURE__ */ R(oe, { size: 14 })
399
+ /* @__PURE__ */ R(D, { size: 14 })
391
400
  ]
392
401
  }),
393
- children: t.length > 0 ? /* @__PURE__ */ R("div", {
402
+ children: e.kind === "PHYSICAL" ? r.length > 0 ? /* @__PURE__ */ R("div", {
403
+ className: "space-y-2",
404
+ children: r.slice(0, 3).map((e) => /* @__PURE__ */ R(X, {
405
+ item: e,
406
+ onClick: () => c(`/seller/items/${e.id}`)
407
+ }, e.id))
408
+ }) : /* @__PURE__ */ R(n, {
409
+ illustration: "empty-data",
410
+ icon: /* @__PURE__ */ R(E, { size: 24 }),
411
+ title: d("devportal.noItems", "No items"),
412
+ description: d("devportal.createYourFirstItem", "List your first physical item"),
413
+ action: a ? /* @__PURE__ */ z("button", {
414
+ onClick: () => c("/seller/items/new"),
415
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
416
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d("devportal.createItem", "Create Item")]
417
+ }) : void 0
418
+ }) : t.length > 0 ? /* @__PURE__ */ R("div", {
394
419
  className: "space-y-2",
395
- children: t.slice(0, 3).map((e) => /* @__PURE__ */ R(m, {
420
+ children: t.slice(0, 3).map((e) => /* @__PURE__ */ R(h, {
396
421
  app: e,
397
- onClick: () => s(`/apps/${e.id}`)
422
+ onClick: () => c(`/apps/${e.id}`)
398
423
  }, e.id))
399
424
  }) : /* @__PURE__ */ R(n, {
400
425
  illustration: "empty-data",
401
- icon: /* @__PURE__ */ R(D, { size: 24 }),
402
- title: u("devportal.noApplications", "No applications"),
403
- description: e.kind === "PHYSICAL" ? u("devportal.createYourFirstItem", "List your first physical item") : u("devportal.createYourFirstApplication", "Create your first application"),
404
- action: i ? /* @__PURE__ */ z("button", {
405
- onClick: () => s(e.kind === "PHYSICAL" ? "/seller/items/new" : "/apps/new"),
426
+ icon: /* @__PURE__ */ R(E, { size: 24 }),
427
+ title: d("devportal.noApplications", "No applications"),
428
+ description: d("devportal.createYourFirstApplication", "Create your first application"),
429
+ action: a ? /* @__PURE__ */ z("button", {
430
+ onClick: () => c("/apps/new"),
406
431
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
407
- children: [/* @__PURE__ */ R(P, { size: 16 }), e.kind === "PHYSICAL" ? u("devportal.createItem", "Create Item") : u("devportal.createApp", "Create App")]
432
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d("devportal.createApp", "Create App")]
408
433
  }) : void 0
409
434
  })
410
435
  })]
411
436
  }), /* @__PURE__ */ z("div", {
412
437
  className: "space-y-6",
413
- children: [
414
- a ? /* @__PURE__ */ R(f, {
415
- title: u("devportal.revenueSummary", "Revenue Summary"),
416
- children: /* @__PURE__ */ R(v, { items: [{
417
- label: u("devportal.totalRevenue", "Total Revenue"),
418
- value: w(e.totalRevenue, o)
419
- }] })
420
- }) : null,
421
- /* @__PURE__ */ R(f, {
422
- title: u("devportal.teamMembers", "Team Members"),
423
- actions: /* @__PURE__ */ R("button", {
424
- onClick: () => s(`/organizations/${e.id}/members`),
425
- className: "text-sm text-primary hover:underline",
426
- children: u("devportal.manage", "Manage")
427
- }),
428
- children: /* @__PURE__ */ z("div", {
429
- className: "space-y-2",
430
- children: [r.slice(0, 3).map((e) => /* @__PURE__ */ R("div", {
431
- className: "flex items-center justify-between py-2",
432
- children: /* @__PURE__ */ z("div", {
433
- className: "flex items-center gap-3",
434
- children: [/* @__PURE__ */ R("div", {
435
- className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
436
- children: e.email?.charAt(0).toUpperCase() || "U"
437
- }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("p", {
438
- className: "text-sm font-medium",
439
- children: e.email
440
- }), /* @__PURE__ */ R("p", {
441
- className: "text-xs text-text-secondary",
442
- children: p[e.role]
443
- })] })]
444
- })
445
- }, e.id)), r.length > 3 && /* @__PURE__ */ z("p", {
446
- className: "text-xs text-text-secondary",
447
- children: [
448
- "+",
449
- r.length - 3,
450
- " ",
451
- u("devportal.moreMembers", "more members")
452
- ]
453
- })]
454
- })
438
+ children: [/* @__PURE__ */ R(p, {
439
+ title: d("devportal.teamMembers", "Team Members"),
440
+ actions: /* @__PURE__ */ R("button", {
441
+ onClick: () => c(`/organizations/${e.id}/members`),
442
+ className: "text-sm text-primary hover:underline",
443
+ children: d("devportal.manage", "Manage")
455
444
  }),
456
- /* @__PURE__ */ R(f, {
457
- title: u("devportal.links", "Links"),
458
- children: /* @__PURE__ */ z("div", {
459
- className: "space-y-2",
460
- children: [e.websiteUrl && /* @__PURE__ */ z("a", {
461
- href: e.websiteUrl,
462
- target: "_blank",
463
- rel: "noopener noreferrer",
464
- className: "flex items-center gap-2 text-sm text-primary hover:underline",
465
- children: [/* @__PURE__ */ R(M, { size: 14 }), u("devportal.website", "Website")]
466
- }), e.contactEmail && /* @__PURE__ */ z("a", {
467
- href: `mailto:${e.contactEmail}`,
468
- className: "flex items-center gap-2 text-sm text-primary hover:underline",
469
- children: [/* @__PURE__ */ R(M, { size: 14 }), e.contactEmail]
470
- })]
471
- })
445
+ children: /* @__PURE__ */ z("div", {
446
+ className: "space-y-2",
447
+ children: [i.slice(0, 3).map((e) => /* @__PURE__ */ R("div", {
448
+ className: "flex items-center justify-between py-2",
449
+ children: /* @__PURE__ */ z("div", {
450
+ className: "flex items-center gap-3",
451
+ children: [/* @__PURE__ */ R("div", {
452
+ className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
453
+ children: e.email?.charAt(0).toUpperCase() || "U"
454
+ }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("p", {
455
+ className: "text-sm font-medium",
456
+ children: e.email
457
+ }), /* @__PURE__ */ R("p", {
458
+ className: "text-xs text-text-secondary",
459
+ children: m[e.role]
460
+ })] })]
461
+ })
462
+ }, e.id)), i.length > 3 && /* @__PURE__ */ z("p", {
463
+ className: "text-xs text-text-secondary",
464
+ children: [
465
+ "+",
466
+ i.length - 3,
467
+ " ",
468
+ d("devportal.moreMembers", "more members")
469
+ ]
470
+ })]
472
471
  })
473
- ]
472
+ }), /* @__PURE__ */ R(p, {
473
+ title: d("devportal.links", "Links"),
474
+ children: /* @__PURE__ */ z("div", {
475
+ className: "space-y-2",
476
+ children: [e.websiteUrl && /* @__PURE__ */ z("a", {
477
+ href: e.websiteUrl,
478
+ target: "_blank",
479
+ rel: "noopener noreferrer",
480
+ className: "flex items-center gap-2 text-sm text-primary hover:underline",
481
+ children: [/* @__PURE__ */ R(j, { size: 14 }), d("devportal.website", "Website")]
482
+ }), e.contactEmail && /* @__PURE__ */ z("a", {
483
+ href: `mailto:${e.contactEmail}`,
484
+ className: "flex items-center gap-2 text-sm text-primary hover:underline",
485
+ children: [/* @__PURE__ */ R(j, { size: 14 }), e.contactEmail]
486
+ })]
487
+ })
488
+ })]
474
489
  })]
475
490
  });
476
- }, he = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
477
- let { t: a } = B(), o = (e, t) => {
478
- let n = a(e);
491
+ }, be = ({ org: e, apps: t, physicalItems: r, onNavigate: i, canCreateApps: a }) => {
492
+ let { t: o } = B(), s = (e, t) => {
493
+ let n = o(e);
479
494
  return n === e ? t : n;
480
- }, s = e.kind === "PHYSICAL", c = s ? "/seller/items/new" : "/apps/new", l = s ? o("devportal.createItem", "Create Item") : o("devportal.createApp", "Create App");
495
+ }, c = e.kind === "PHYSICAL", l = c ? r : t, u = c ? "/seller/items/new" : "/apps/new", d = c ? s("devportal.createItem", "Create Item") : s("devportal.createApp", "Create App");
481
496
  return /* @__PURE__ */ z("div", {
482
497
  className: "space-y-6",
483
498
  children: [/* @__PURE__ */ z("div", {
@@ -485,34 +500,73 @@ var Y = {
485
500
  children: [/* @__PURE__ */ z("p", {
486
501
  className: "text-sm text-text-secondary",
487
502
  children: [
488
- t.length,
503
+ l.length,
489
504
  " ",
490
- t.length === 1 ? o("devportal.application", "application") : o("devportal.applications", "applications")
505
+ c ? l.length === 1 ? s("devportal.item", "item") : s("devportal.items", "items") : l.length === 1 ? s("devportal.application", "application") : s("devportal.applications", "applications")
491
506
  ]
492
- }), i ? /* @__PURE__ */ z("button", {
493
- onClick: () => r(c),
507
+ }), a ? /* @__PURE__ */ z("button", {
508
+ onClick: () => i(u),
494
509
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
495
- children: [/* @__PURE__ */ R(P, { size: 16 }), l]
510
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d]
496
511
  }) : null]
497
- }), t.length > 0 ? /* @__PURE__ */ R("div", {
512
+ }), l.length > 0 ? /* @__PURE__ */ R("div", {
498
513
  className: "space-y-2",
499
- children: t.map((e) => /* @__PURE__ */ R(m, {
514
+ children: c ? r.map((e) => /* @__PURE__ */ R(X, {
515
+ item: e,
516
+ onClick: () => i(`/seller/items/${e.id}`)
517
+ }, e.id)) : t.map((e) => /* @__PURE__ */ R(h, {
500
518
  app: e,
501
- onClick: () => r(`/apps/${e.id}`)
519
+ onClick: () => i(`/apps/${e.id}`)
502
520
  }, e.id))
503
521
  }) : /* @__PURE__ */ R(n, {
504
522
  illustration: "empty-data",
505
- icon: /* @__PURE__ */ R(D, { size: 32 }),
506
- title: o("devportal.noApplications", "No applications"),
507
- description: s ? o("devportal.createFirstItemForOrg", "List your first physical item for this organization") : o("devportal.createFirstAppForOrg", "Create your first application for this organization"),
508
- action: i ? /* @__PURE__ */ z("button", {
509
- onClick: () => r(c),
523
+ icon: /* @__PURE__ */ R(E, { size: 32 }),
524
+ title: c ? s("devportal.noItems", "No items") : s("devportal.noApplications", "No applications"),
525
+ description: c ? s("devportal.createFirstItemForOrg", "List your first physical item for this organization") : s("devportal.createFirstAppForOrg", "Create your first application for this organization"),
526
+ action: a ? /* @__PURE__ */ z("button", {
527
+ onClick: () => i(u),
510
528
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
511
- children: [/* @__PURE__ */ R(P, { size: 16 }), l]
529
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d]
512
530
  }) : void 0
513
531
  })]
514
532
  });
515
- }, ge = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
533
+ }, Y = {
534
+ PUBLISHED: "text-status-success-text bg-status-success-bg-subtle",
535
+ PENDING_REVIEW: "text-status-warning-text bg-status-warning-bg-subtle",
536
+ DRAFT: "text-text-muted bg-bg-muted",
537
+ REJECTED: "text-status-error-text bg-status-error-bg/10",
538
+ ARCHIVED: "text-text-muted bg-bg-muted",
539
+ DEPRECATED: "text-text-muted bg-bg-muted",
540
+ UNLISTED: "text-text-muted bg-bg-muted"
541
+ }, X = ({ item: e, onClick: n }) => /* @__PURE__ */ z("div", {
542
+ role: "button",
543
+ tabIndex: 0,
544
+ onClick: n,
545
+ onKeyDown: (e) => {
546
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
547
+ },
548
+ className: "flex cursor-pointer items-center justify-between gap-4 rounded-lg border border-border-seam bg-bg-surface p-4 transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
549
+ children: [
550
+ /* @__PURE__ */ z("div", {
551
+ className: "min-w-0 flex-1",
552
+ children: [/* @__PURE__ */ R("p", {
553
+ className: "truncate font-medium text-text-primary",
554
+ children: e.name
555
+ }), /* @__PURE__ */ z("p", {
556
+ className: "mt-0.5 text-xs text-text-secondary",
557
+ children: [e.stockQuantity ?? 0, " in stock"]
558
+ })]
559
+ }),
560
+ /* @__PURE__ */ R("span", {
561
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", Y[e.status]),
562
+ children: e.status.replace(/_/g, " ")
563
+ }),
564
+ /* @__PURE__ */ R("span", {
565
+ className: "whitespace-nowrap text-sm font-semibold tabular-nums",
566
+ children: se(e.price, e.currency)
567
+ })
568
+ ]
569
+ }), xe = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
516
570
  let { t: a } = B(), o = (e, t) => {
517
571
  let n = a(e);
518
572
  return n === e ? t : n;
@@ -531,9 +585,9 @@ var Y = {
531
585
  }), i ? /* @__PURE__ */ z("button", {
532
586
  onClick: () => n(`/organizations/${r}/members`),
533
587
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
534
- children: [/* @__PURE__ */ R(P, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
588
+ children: [/* @__PURE__ */ R(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
535
589
  }) : null]
536
- }), /* @__PURE__ */ R(_, {
590
+ }), /* @__PURE__ */ R(v, {
537
591
  data: e,
538
592
  keyField: "id",
539
593
  columns: [
@@ -556,7 +610,7 @@ var Y = {
556
610
  header: o("devportal.roleColumn", "Role"),
557
611
  render: (e) => /* @__PURE__ */ R("span", {
558
612
  className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.role === "OWNER" ? "bg-accent-purple-subtle text-accent-purple" : e.role === "ADMIN" ? "bg-status-info-bg-subtle text-status-info-text" : e.role === "DEVELOPER" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-primary"),
559
- children: p[e.role]
613
+ children: m[e.role]
560
614
  })
561
615
  },
562
616
  {
@@ -567,21 +621,21 @@ var Y = {
567
621
  ]
568
622
  })]
569
623
  });
570
- }, _e = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
571
- let [s, d] = E(!1);
572
- T(() => {
624
+ }, Se = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
625
+ let [s, c] = T(!1);
626
+ w(() => {
573
627
  if (!a) return;
574
628
  document.getElementById("fulfillment-section")?.scrollIntoView({
575
629
  behavior: "smooth",
576
630
  block: "start"
577
- }), d(!0);
578
- let e = setTimeout(() => d(!1), 2500);
631
+ }), c(!0);
632
+ let e = setTimeout(() => c(!1), 2500);
579
633
  return o?.(), () => clearTimeout(e);
580
634
  }, [a]);
581
- let { t: p } = B(), { allowed: m } = C(re.ORG_UPDATE), h = (e, t) => {
582
- let n = p(e);
635
+ let { t: l } = B(), { allowed: f } = C(ae.ORG_UPDATE), m = (e, t) => {
636
+ let n = l(e);
583
637
  return n === e ? t : n;
584
- }, [g, _] = E({
638
+ }, [h, g] = T({
585
639
  name: e.name,
586
640
  description: e.description ?? "",
587
641
  websiteUrl: e.websiteUrl ?? "",
@@ -589,25 +643,25 @@ var Y = {
589
643
  supportEmail: e.supportEmail ?? "",
590
644
  logoUrl: e.logoUrl ?? "",
591
645
  bannerUrl: e.bannerUrl ?? ""
592
- }), [b, ie] = E({
646
+ }), [_, v] = T({
593
647
  legalEntityName: e.legalEntityName ?? "",
594
648
  legalEntityType: e.legalEntityType ?? ""
595
- }), [w, ae] = E({
649
+ }), [b, oe] = T({
596
650
  taxId: e.taxId ?? "",
597
651
  taxCountry: e.taxCountry ?? ""
598
- }), { locations: D, refetch: oe } = ne(), [O, se] = E(!1), [A, j] = E(null), [M, F] = E(null), [de, I] = E(null), [V, H] = E(null), [pe, K] = E(null), [Y, X] = E(null), [Z, he] = E("manual"), [ge, _e] = E(!1), [ve, ye] = E(""), [be, xe] = E(""), [Se, Ce] = E(""), [we, Te] = E(null), [Ee, De] = E(!1), Q = we ?? {
652
+ }), { locations: se, refetch: ce } = ie(), [E, D] = T(!1), [O, le] = T(null), [ue, A] = T(null), [j, F] = T(null), [pe, I] = T(null), [me, V] = T(null), [ge, G] = T(null), [q, J] = T("manual"), [ye, be] = T(!1), [Y, X] = T(""), [xe, Se] = T(""), [Z, Ce] = T(""), [we, Te] = T(null), [Ee, De] = T(!1), Q = we ?? {
599
653
  verificationMethod: e.verificationMethod,
600
654
  verificationRequestedAt: e.verificationRequestedAt,
601
655
  verificationStatus: e.verificationStatus,
602
656
  verificationRequestNotes: e.verificationRequestNotes,
603
657
  verificationRejectedReason: e.verificationRejectedReason
604
658
  }, $ = [];
605
- g.contactEmail.trim() ? me(g.contactEmail) || $.push(h("devportal.contactEmailInvalid", "Contact email must be valid")) : $.push(h("devportal.contactEmailRequired", "Contact email is required")), g.supportEmail.trim() && !me(g.supportEmail) && $.push(h("devportal.supportEmailInvalid", "Support email must be valid")), g.websiteUrl.trim() ? J(g.websiteUrl) || $.push(h("devportal.websiteInvalid", "Website URL must be valid")) : $.push(h("devportal.websiteRequired", "Website URL is required")), b.legalEntityName.trim() || $.push(h("devportal.legalEntityNameRequired", "Legal entity name is required")), b.legalEntityType.trim() || $.push(h("devportal.legalEntityTypeRequired", "Entity type is required")), w.taxId.trim() || $.push(h("devportal.taxIdRequired", "Tax ID is required")), w.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(w.taxCountry.trim()) || $.push(h("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : $.push(h("devportal.taxCountryRequired", "Tax country is required"));
659
+ h.contactEmail.trim() ? ve(h.contactEmail) || $.push(m("devportal.contactEmailInvalid", "Contact email must be valid")) : $.push(m("devportal.contactEmailRequired", "Contact email is required")), h.supportEmail.trim() && !ve(h.supportEmail) && $.push(m("devportal.supportEmailInvalid", "Support email must be valid")), h.websiteUrl.trim() ? K(h.websiteUrl) || $.push(m("devportal.websiteInvalid", "Website URL must be valid")) : $.push(m("devportal.websiteRequired", "Website URL is required")), _.legalEntityName.trim() || $.push(m("devportal.legalEntityNameRequired", "Legal entity name is required")), _.legalEntityType.trim() || $.push(m("devportal.legalEntityTypeRequired", "Entity type is required")), b.taxId.trim() || $.push(m("devportal.taxIdRequired", "Tax ID is required")), b.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(b.taxCountry.trim()) || $.push(m("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : $.push(m("devportal.taxCountryRequired", "Tax country is required"));
606
660
  let Oe = [];
607
- Z === "domain" && !q(Se.trim()) && Oe.push(h("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), Z === "document" && !J(be.trim()) && Oe.push(h("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), Z === "manual" && !ve.trim() && Oe.push(h("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
608
- let ke = $.length === 0 && Oe.length === 0 && !Ee && m, [Ae, { loading: je }] = u({ refetchQueries: ["GetOrganization"] }), [Me, { loading: Ne }] = c({ refetchQueries: ["GetOrganization"] }), [Pe, { loading: Fe }] = l({ refetchQueries: ["GetOrganization"] });
609
- T(() => {
610
- _({
661
+ q === "domain" && !_e(Z.trim()) && Oe.push(m("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), q === "document" && !K(xe.trim()) && Oe.push(m("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), q === "manual" && !Y.trim() && Oe.push(m("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
662
+ let ke = $.length === 0 && Oe.length === 0 && !Ee && f, [Ae, { loading: je }] = ee({ refetchQueries: ["GetOrganization"] }), [Me, { loading: Ne }] = u({ refetchQueries: ["GetOrganization"] }), [Pe, { loading: Fe }] = d({ refetchQueries: ["GetOrganization"] });
663
+ w(() => {
664
+ g({
611
665
  name: e.name,
612
666
  description: e.description ?? "",
613
667
  websiteUrl: e.websiteUrl ?? "",
@@ -615,216 +669,216 @@ var Y = {
615
669
  supportEmail: e.supportEmail ?? "",
616
670
  logoUrl: e.logoUrl ?? "",
617
671
  bannerUrl: e.bannerUrl ?? ""
618
- }), ie({
672
+ }), v({
619
673
  legalEntityName: e.legalEntityName ?? "",
620
674
  legalEntityType: e.legalEntityType ?? ""
621
- }), ae({
675
+ }), oe({
622
676
  taxId: e.taxId ?? "",
623
677
  taxCountry: e.taxCountry ?? ""
624
678
  });
625
- }, [e.id]), T(() => {
626
- e.id && W({
679
+ }, [e.id]), w(() => {
680
+ e.id && H({
627
681
  gateway: "global",
628
- query: fe,
682
+ query: U,
629
683
  variables: { id: e.id }
630
684
  }).then((e) => Te(e.data?.developerOrganization ?? null)).catch(() => Te(null));
631
- }, [e.id, ge]);
685
+ }, [e.id, ye]);
632
686
  let Ie = async () => {
633
- X(null), K(null);
687
+ G(null), V(null);
634
688
  try {
635
689
  await Ae({ variables: {
636
690
  id: e.id,
637
691
  input: {
638
- name: g.name.trim() || void 0,
639
- description: g.description.trim() || null,
640
- websiteUrl: g.websiteUrl.trim() || null,
641
- contactEmail: g.contactEmail.trim() || null,
642
- supportEmail: g.supportEmail.trim() || null,
643
- logoUrl: g.logoUrl.trim() || null,
644
- bannerUrl: g.bannerUrl.trim() || null
692
+ name: h.name.trim() || void 0,
693
+ description: h.description.trim() || null,
694
+ websiteUrl: h.websiteUrl.trim() || null,
695
+ contactEmail: h.contactEmail.trim() || null,
696
+ supportEmail: h.supportEmail.trim() || null,
697
+ logoUrl: h.logoUrl.trim() || null,
698
+ bannerUrl: h.bannerUrl.trim() || null
645
699
  }
646
- } }), K(h("devportal.organizationUpdated", "Organization details updated"));
700
+ } }), V(m("devportal.organizationUpdated", "Organization details updated"));
647
701
  } catch (e) {
648
- X(e instanceof Error ? e.message : h("devportal.failedToUpdateOrganization", "Failed to update organization"));
702
+ G(e instanceof Error ? e.message : m("devportal.failedToUpdateOrganization", "Failed to update organization"));
649
703
  }
650
704
  }, Le = async () => {
651
- X(null), K(null);
705
+ G(null), V(null);
652
706
  try {
653
707
  await Me({ variables: {
654
708
  id: e.id,
655
709
  input: {
656
- legalEntityName: b.legalEntityName.trim() || null,
657
- legalEntityType: b.legalEntityType.trim() || null
710
+ legalEntityName: _.legalEntityName.trim() || null,
711
+ legalEntityType: _.legalEntityType.trim() || null
658
712
  }
659
- } }), K(h("devportal.legalInfoUpdated", "Legal information updated"));
713
+ } }), V(m("devportal.legalInfoUpdated", "Legal information updated"));
660
714
  } catch (e) {
661
- X(e instanceof Error ? e.message : h("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
715
+ G(e instanceof Error ? e.message : m("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
662
716
  }
663
717
  }, Re = async () => {
664
- X(null), K(null);
718
+ G(null), V(null);
665
719
  try {
666
720
  await Pe({ variables: {
667
721
  id: e.id,
668
722
  input: {
669
- taxId: w.taxId.trim() || null,
670
- taxCountry: w.taxCountry.trim() || null
723
+ taxId: b.taxId.trim() || null,
724
+ taxCountry: b.taxCountry.trim() || null
671
725
  }
672
- } }), K(h("devportal.taxInfoUpdated", "Tax information updated"));
726
+ } }), V(m("devportal.taxInfoUpdated", "Tax information updated"));
673
727
  } catch (e) {
674
- X(e instanceof Error ? e.message : h("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
728
+ G(e instanceof Error ? e.message : m("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
675
729
  }
676
730
  }, ze = async (e) => {
677
- H(null), I(null), F(e);
731
+ I(null), F(null), A(e);
678
732
  try {
679
- let t = await W({
733
+ let t = await H({
680
734
  gateway: "global",
681
735
  query: "\n mutation DevportalSetDefaultPickupAddress($id: ID!) {\n setDefaultPickupAddress(id: $id) {\n id\n }\n }\n ",
682
736
  variables: { id: e }
683
737
  });
684
738
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to switch pickup address");
685
- U(), i(), I(h("devportal.pickupAddressSetActive", "Pickup address updated"));
739
+ he(), i(), F(m("devportal.pickupAddressSetActive", "Pickup address updated"));
686
740
  } catch (e) {
687
- H(e instanceof Error ? e.message : h("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
741
+ I(e instanceof Error ? e.message : m("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
688
742
  } finally {
689
- F(null);
743
+ A(null);
690
744
  }
691
745
  }, Be = async (e) => {
692
- H(null), I(null), F(e);
746
+ I(null), F(null), A(e);
693
747
  try {
694
- let t = await W({
748
+ let t = await H({
695
749
  gateway: "global",
696
750
  query: "\n mutation DevportalRemoveOrgPickupAddress($id: ID!) {\n removeDeveloperOrgPickupAddress(id: $id)\n }\n ",
697
751
  variables: { id: e }
698
752
  });
699
753
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove pickup address");
700
- U(), i(), I(h("devportal.pickupAddressRemoved", "Pickup address removed"));
754
+ he(), i(), F(m("devportal.pickupAddressRemoved", "Pickup address removed"));
701
755
  } catch (e) {
702
- H(e instanceof Error ? e.message : h("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
756
+ I(e instanceof Error ? e.message : m("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
703
757
  } finally {
704
- F(null), j(null);
758
+ A(null), le(null);
705
759
  }
706
760
  };
707
761
  return /* @__PURE__ */ z("div", {
708
762
  className: "space-y-6 max-w-2xl",
709
763
  children: [
710
- Y && /* @__PURE__ */ R("div", {
764
+ ge && /* @__PURE__ */ R("div", {
711
765
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
712
- children: Y
766
+ children: ge
713
767
  }),
714
- pe && /* @__PURE__ */ R("div", {
768
+ me && /* @__PURE__ */ R("div", {
715
769
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
716
- children: pe
770
+ children: me
717
771
  }),
718
- /* @__PURE__ */ R(f, {
719
- title: h("devportal.organizationDetails", "Organization Details"),
772
+ /* @__PURE__ */ R(p, {
773
+ title: m("devportal.organizationDetails", "Organization Details"),
720
774
  children: /* @__PURE__ */ z("div", {
721
775
  className: "space-y-4",
722
776
  children: [
723
777
  /* @__PURE__ */ z("div", {
724
778
  className: "grid gap-4 sm:grid-cols-2",
725
779
  children: [/* @__PURE__ */ R(y, {
726
- label: h("devportal.organizationName", "Organization Name"),
727
- value: g.name,
728
- onChange: (e) => _((t) => ({
780
+ label: m("devportal.organizationName", "Organization Name"),
781
+ value: h.name,
782
+ onChange: (e) => g((t) => ({
729
783
  ...t,
730
784
  name: e.target.value
731
785
  })),
732
- disabled: !m,
786
+ disabled: !f,
733
787
  required: !0
734
788
  }), /* @__PURE__ */ R(y, {
735
- label: h("devportal.slug", "Slug"),
789
+ label: m("devportal.slug", "Slug"),
736
790
  value: e.slug,
737
791
  disabled: !0,
738
- hint: h("devportal.slugReadOnly", "Slug cannot be changed here")
792
+ hint: m("devportal.slugReadOnly", "Slug cannot be changed here")
739
793
  })]
740
794
  }),
741
- /* @__PURE__ */ R(ee, {
742
- label: h("devportal.description", "Description"),
743
- value: g.description,
744
- onChange: (e) => _((t) => ({
795
+ /* @__PURE__ */ R(ne, {
796
+ label: m("devportal.description", "Description"),
797
+ value: h.description,
798
+ onChange: (e) => g((t) => ({
745
799
  ...t,
746
800
  description: e.target.value
747
801
  })),
748
- disabled: !m,
802
+ disabled: !f,
749
803
  rows: 4
750
804
  }),
751
805
  /* @__PURE__ */ z("div", {
752
806
  className: "grid gap-4 sm:grid-cols-2",
753
807
  children: [
754
808
  /* @__PURE__ */ R(y, {
755
- label: h("devportal.website", "Website"),
809
+ label: m("devportal.website", "Website"),
756
810
  type: "url",
757
- value: g.websiteUrl,
758
- onChange: (e) => _((t) => ({
811
+ value: h.websiteUrl,
812
+ onChange: (e) => g((t) => ({
759
813
  ...t,
760
814
  websiteUrl: e.target.value
761
815
  })),
762
- disabled: !m
816
+ disabled: !f
763
817
  }),
764
818
  /* @__PURE__ */ R(y, {
765
- label: h("devportal.contactEmail", "Contact Email"),
819
+ label: m("devportal.contactEmail", "Contact Email"),
766
820
  type: "email",
767
- value: g.contactEmail,
768
- onChange: (e) => _((t) => ({
821
+ value: h.contactEmail,
822
+ onChange: (e) => g((t) => ({
769
823
  ...t,
770
824
  contactEmail: e.target.value
771
825
  })),
772
- disabled: !m
826
+ disabled: !f
773
827
  }),
774
828
  /* @__PURE__ */ R(y, {
775
- label: h("devportal.supportEmail", "Support Email"),
829
+ label: m("devportal.supportEmail", "Support Email"),
776
830
  type: "email",
777
- value: g.supportEmail,
778
- onChange: (e) => _((t) => ({
831
+ value: h.supportEmail,
832
+ onChange: (e) => g((t) => ({
779
833
  ...t,
780
834
  supportEmail: e.target.value
781
835
  })),
782
- disabled: !m
836
+ disabled: !f
783
837
  }),
784
838
  /* @__PURE__ */ R(y, {
785
- label: h("devportal.logoUrl", "Logo URL"),
839
+ label: m("devportal.logoUrl", "Logo URL"),
786
840
  type: "url",
787
- value: g.logoUrl,
788
- onChange: (e) => _((t) => ({
841
+ value: h.logoUrl,
842
+ onChange: (e) => g((t) => ({
789
843
  ...t,
790
844
  logoUrl: e.target.value
791
845
  })),
792
- disabled: !m
846
+ disabled: !f
793
847
  })
794
848
  ]
795
849
  }),
796
850
  /* @__PURE__ */ R(y, {
797
- label: h("devportal.bannerUrl", "Banner URL"),
851
+ label: m("devportal.bannerUrl", "Banner URL"),
798
852
  type: "url",
799
- value: g.bannerUrl,
800
- onChange: (e) => _((t) => ({
853
+ value: h.bannerUrl,
854
+ onChange: (e) => g((t) => ({
801
855
  ...t,
802
856
  bannerUrl: e.target.value
803
857
  })),
804
- disabled: !m
858
+ disabled: !f
805
859
  }),
806
- /* @__PURE__ */ R(v, { items: [
860
+ /* @__PURE__ */ R(te, { items: [
807
861
  {
808
- label: h("devportal.organizationId", "Organization ID"),
862
+ label: m("devportal.organizationId", "Organization ID"),
809
863
  value: /* @__PURE__ */ R("code", {
810
864
  className: "text-xs",
811
865
  children: e.id
812
866
  })
813
867
  },
814
868
  {
815
- label: h("devportal.tier", "Tier"),
869
+ label: m("devportal.tier", "Tier"),
816
870
  value: e.tier
817
871
  },
818
872
  {
819
- label: h("devportal.partnerTier", "Partner Tier"),
820
- value: e.partnerTier || h("devportal.none", "None")
873
+ label: m("devportal.partnerTier", "Partner Tier"),
874
+ value: e.partnerTier || m("devportal.none", "None")
821
875
  },
822
876
  {
823
- label: h("devportal.created", "Created"),
877
+ label: m("devportal.created", "Created"),
824
878
  value: new Date(e.createdAt).toLocaleDateString()
825
879
  },
826
880
  {
827
- label: h("devportal.platformFeeRate", "Platform Fee Rate"),
881
+ label: m("devportal.platformFeeRate", "Platform Fee Rate"),
828
882
  value: `${(e.platformFeeRate * 100).toFixed(0)}%`
829
883
  }
830
884
  ] }),
@@ -832,20 +886,20 @@ var Y = {
832
886
  className: "flex justify-end",
833
887
  children: /* @__PURE__ */ z("button", {
834
888
  type: "button",
835
- disabled: !m || je,
889
+ disabled: !f || je,
836
890
  onClick: () => void Ie(),
837
891
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
838
- children: [je ? /* @__PURE__ */ R(N, {
892
+ children: [je ? /* @__PURE__ */ R(M, {
839
893
  size: 14,
840
894
  className: "animate-spin"
841
- }) : /* @__PURE__ */ R(ce, { size: 14 }), h("devportal.saveChanges", "Save Changes")]
895
+ }) : /* @__PURE__ */ R(de, { size: 14 }), m("devportal.saveChanges", "Save Changes")]
842
896
  })
843
897
  })
844
898
  ]
845
899
  })
846
900
  }),
847
- /* @__PURE__ */ R(f, {
848
- title: h("devportal.legalInformation", "Legal Information"),
901
+ /* @__PURE__ */ R(p, {
902
+ title: m("devportal.legalInformation", "Legal Information"),
849
903
  children: /* @__PURE__ */ z("div", {
850
904
  className: "space-y-4",
851
905
  children: [
@@ -853,111 +907,111 @@ var Y = {
853
907
  className: "grid gap-4 sm:grid-cols-2",
854
908
  children: [
855
909
  /* @__PURE__ */ R(y, {
856
- label: h("devportal.legalEntityName", "Legal Entity Name"),
857
- value: b.legalEntityName,
858
- onChange: (e) => ie((t) => ({
910
+ label: m("devportal.legalEntityName", "Legal Entity Name"),
911
+ value: _.legalEntityName,
912
+ onChange: (e) => v((t) => ({
859
913
  ...t,
860
914
  legalEntityName: e.target.value
861
915
  })),
862
- disabled: !m
916
+ disabled: !f
863
917
  }),
864
918
  /* @__PURE__ */ R(y, {
865
- label: h("devportal.entityType", "Entity Type"),
866
- value: b.legalEntityType,
867
- onChange: (e) => ie((t) => ({
919
+ label: m("devportal.entityType", "Entity Type"),
920
+ value: _.legalEntityType,
921
+ onChange: (e) => v((t) => ({
868
922
  ...t,
869
923
  legalEntityType: e.target.value
870
924
  })),
871
- disabled: !m
925
+ disabled: !f
872
926
  }),
873
927
  /* @__PURE__ */ R(y, {
874
- label: h("devportal.taxId", "Tax ID"),
875
- value: w.taxId,
876
- onChange: (e) => ae((t) => ({
928
+ label: m("devportal.taxId", "Tax ID"),
929
+ value: b.taxId,
930
+ onChange: (e) => oe((t) => ({
877
931
  ...t,
878
932
  taxId: e.target.value
879
933
  })),
880
- disabled: !m
934
+ disabled: !f
881
935
  }),
882
936
  /* @__PURE__ */ R(y, {
883
- label: h("devportal.taxCountry", "Tax Country"),
884
- value: w.taxCountry,
885
- onChange: (e) => ae((t) => ({
937
+ label: m("devportal.taxCountry", "Tax Country"),
938
+ value: b.taxCountry,
939
+ onChange: (e) => oe((t) => ({
886
940
  ...t,
887
941
  taxCountry: e.target.value.toUpperCase()
888
942
  })),
889
- disabled: !m
943
+ disabled: !f
890
944
  })
891
945
  ]
892
946
  }),
893
- /* @__PURE__ */ R(v, { items: [{
894
- label: h("devportal.taxForm", "Tax Form"),
895
- value: e.taxFormType || h("devportal.notSubmitted", "Not submitted")
947
+ /* @__PURE__ */ R(te, { items: [{
948
+ label: m("devportal.taxForm", "Tax Form"),
949
+ value: e.taxFormType || m("devportal.notSubmitted", "Not submitted")
896
950
  }, {
897
- label: h("devportal.taxFormStatus", "Tax Form Status"),
951
+ label: m("devportal.taxFormStatus", "Tax Form Status"),
898
952
  value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ z("span", {
899
953
  className: "text-status-success-text flex items-center gap-1",
900
954
  children: [
901
955
  /* @__PURE__ */ R(k, { size: 14 }),
902
956
  " ",
903
- h("devportal.verified", "Verified")
957
+ m("devportal.verified", "Verified")
904
958
  ]
905
- }) : h("devportal.pendingVerification", "Pending verification") : h("devportal.notSubmitted", "Not submitted")
959
+ }) : m("devportal.pendingVerification", "Pending verification") : m("devportal.notSubmitted", "Not submitted")
906
960
  }] }),
907
961
  /* @__PURE__ */ z("div", {
908
962
  className: "flex justify-end gap-2",
909
963
  children: [/* @__PURE__ */ z("button", {
910
964
  type: "button",
911
- disabled: !m || Ne,
965
+ disabled: !f || Ne,
912
966
  onClick: () => void Le(),
913
967
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
914
- children: [Ne ? /* @__PURE__ */ R(N, {
968
+ children: [Ne ? /* @__PURE__ */ R(M, {
915
969
  size: 14,
916
970
  className: "animate-spin"
917
- }) : null, h("devportal.saveLegalInfo", "Save Legal Info")]
971
+ }) : null, m("devportal.saveLegalInfo", "Save Legal Info")]
918
972
  }), /* @__PURE__ */ z("button", {
919
973
  type: "button",
920
- disabled: !m || Fe,
974
+ disabled: !f || Fe,
921
975
  onClick: () => void Re(),
922
976
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
923
- children: [Fe ? /* @__PURE__ */ R(N, {
977
+ children: [Fe ? /* @__PURE__ */ R(M, {
924
978
  size: 14,
925
979
  className: "animate-spin"
926
- }) : null, h("devportal.saveTaxInfo", "Save Tax Info")]
980
+ }) : null, m("devportal.saveTaxInfo", "Save Tax Info")]
927
981
  })]
928
982
  })
929
983
  ]
930
984
  })
931
985
  }),
932
- e.kind === "PHYSICAL" && /* @__PURE__ */ R(f, {
986
+ e.kind === "PHYSICAL" && /* @__PURE__ */ R(p, {
933
987
  id: "fulfillment-section",
934
- title: h("devportal.fulfillment", "Fulfillment"),
988
+ title: m("devportal.fulfillment", "Fulfillment"),
935
989
  className: t("scroll-mt-6 rounded-lg transition-shadow duration-500", s && "ring-2 ring-action-primary-bg ring-offset-4"),
936
990
  children: /* @__PURE__ */ z("div", {
937
991
  className: "space-y-3",
938
992
  children: [
939
- V && /* @__PURE__ */ R("div", {
993
+ pe && /* @__PURE__ */ R("div", {
940
994
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
941
- children: V
995
+ children: pe
942
996
  }),
943
- de && /* @__PURE__ */ R("div", {
997
+ j && /* @__PURE__ */ R("div", {
944
998
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
945
- children: de
999
+ children: j
946
1000
  }),
947
1001
  !r && n.length === 0 && /* @__PURE__ */ z("div", {
948
1002
  className: "rounded-md border border-border-seam bg-bg-sunken p-4",
949
1003
  children: [/* @__PURE__ */ R("p", {
950
1004
  className: "text-sm font-medium",
951
- children: h("devportal.noPickupAddress", "No pickup address set up yet")
1005
+ children: m("devportal.noPickupAddress", "No pickup address set up yet")
952
1006
  }), /* @__PURE__ */ R("p", {
953
1007
  className: "mt-1 text-sm text-text-secondary",
954
- children: h("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Add your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
1008
+ children: m("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Add your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
955
1009
  })]
956
1010
  }),
957
1011
  n.length > 0 && /* @__PURE__ */ R("div", {
958
1012
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
959
1013
  children: n.map((e) => {
960
- let n = D.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = M === e.id;
1014
+ let n = se.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = ue === e.id;
961
1015
  return /* @__PURE__ */ z("div", {
962
1016
  className: t("rounded-md border p-4", e.isDefault ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-seam bg-bg-sunken"),
963
1017
  children: [
@@ -968,7 +1022,7 @@ var Y = {
968
1022
  children: e.carrierLocationLabel
969
1023
  }), e.isDefault && /* @__PURE__ */ R("span", {
970
1024
  className: "rounded-full bg-status-success-bg px-2 py-0.5 text-xs font-medium text-white",
971
- children: h("devportal.active", "Active")
1025
+ children: m("devportal.active", "Active")
972
1026
  })]
973
1027
  }),
974
1028
  /* @__PURE__ */ z("p", {
@@ -988,108 +1042,108 @@ var Y = {
988
1042
  }),
989
1043
  /* @__PURE__ */ R("p", {
990
1044
  className: "mt-1 text-xs text-text-secondary",
991
- children: te(e.carrier)
1045
+ children: re(e.carrier)
992
1046
  }),
993
1047
  !n && /* @__PURE__ */ R("p", {
994
1048
  className: "mt-2 text-xs text-status-error-text",
995
- children: h("devportal.pickupAddressNotRegisteredHint", "Not currently registered with the carrier — physical orders can't auto-ship from this address right now.")
1049
+ children: m("devportal.pickupAddressNotRegisteredHint", "Not currently registered with the carrier — physical orders can't auto-ship from this address right now.")
996
1050
  }),
997
- m && /* @__PURE__ */ z("div", {
1051
+ f && /* @__PURE__ */ z("div", {
998
1052
  className: "mt-3 flex items-center gap-4",
999
1053
  children: [!e.isDefault && /* @__PURE__ */ R("button", {
1000
1054
  type: "button",
1001
1055
  disabled: r,
1002
1056
  onClick: () => void ze(e.id),
1003
1057
  className: "text-sm font-medium text-action-primary-text hover:underline disabled:opacity-50",
1004
- children: h("devportal.setPickupAddressActiveCta", "Set as active")
1058
+ children: m("devportal.setPickupAddressActiveCta", "Set as active")
1005
1059
  }), /* @__PURE__ */ z("button", {
1006
1060
  type: "button",
1007
1061
  disabled: r,
1008
- onClick: () => j(e.id),
1062
+ onClick: () => le(e.id),
1009
1063
  className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
1010
- children: [/* @__PURE__ */ R(ue, { className: "h-3.5 w-3.5" }), h("devportal.removePickupAddressCta", "Remove")]
1064
+ children: [/* @__PURE__ */ R(fe, { className: "h-3.5 w-3.5" }), m("devportal.removePickupAddressCta", "Remove")]
1011
1065
  })]
1012
1066
  })
1013
1067
  ]
1014
1068
  }, e.id);
1015
1069
  })
1016
1070
  }),
1017
- m && /* @__PURE__ */ R("div", {
1071
+ f && /* @__PURE__ */ R("div", {
1018
1072
  className: "flex justify-end",
1019
1073
  children: /* @__PURE__ */ z("button", {
1020
1074
  type: "button",
1021
- onClick: () => se(!0),
1075
+ onClick: () => D(!0),
1022
1076
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
1023
- children: [/* @__PURE__ */ R(P, { size: 14 }), h("devportal.addPickupAddressCta", "Add pickup address")]
1077
+ children: [/* @__PURE__ */ R(N, { size: 14 }), m("devportal.addPickupAddressCta", "Add pickup address")]
1024
1078
  })
1025
1079
  }),
1026
- O && /* @__PURE__ */ R(S, {
1027
- open: O,
1028
- onOpenChange: se,
1080
+ E && /* @__PURE__ */ R(S, {
1081
+ open: E,
1082
+ onOpenChange: D,
1029
1083
  organizationId: e.id,
1030
1084
  carrier: "shiprocket",
1031
1085
  onRegistered: () => {
1032
- i(), oe(), I(h("devportal.pickupAddressAdded", "Pickup address added"));
1086
+ i(), ce(), F(m("devportal.pickupAddressAdded", "Pickup address added"));
1033
1087
  }
1034
1088
  }),
1035
1089
  /* @__PURE__ */ R(x, {
1036
- open: A !== null,
1090
+ open: O !== null,
1037
1091
  onOpenChange: (e) => {
1038
- e || j(null);
1092
+ e || le(null);
1039
1093
  },
1040
1094
  variant: "danger",
1041
- loading: M === A,
1042
- title: h("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1043
- description: h("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
1044
- confirmLabel: h("devportal.remove", "Remove"),
1045
- cancelLabel: h("devportal.cancel", "Cancel"),
1095
+ loading: ue === O,
1096
+ title: m("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1097
+ description: m("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
1098
+ confirmLabel: m("devportal.remove", "Remove"),
1099
+ cancelLabel: m("devportal.cancel", "Cancel"),
1046
1100
  onConfirm: async () => {
1047
- A && await Be(A);
1101
+ O && await Be(O);
1048
1102
  }
1049
1103
  })
1050
1104
  ]
1051
1105
  })
1052
1106
  }),
1053
- /* @__PURE__ */ z(f, {
1054
- title: h("devportal.verificationStatus", "Verification Status"),
1055
- children: [/* @__PURE__ */ R(v, { items: [{
1056
- label: h("devportal.verifiedLabel", "Verified"),
1107
+ /* @__PURE__ */ z(p, {
1108
+ title: m("devportal.verificationStatus", "Verification Status"),
1109
+ children: [/* @__PURE__ */ R(te, { items: [{
1110
+ label: m("devportal.verifiedLabel", "Verified"),
1057
1111
  value: Q.verificationStatus === "VERIFIED" ? /* @__PURE__ */ z("span", {
1058
1112
  className: "text-status-success-text flex items-center gap-1",
1059
1113
  children: [
1060
1114
  /* @__PURE__ */ R(k, { size: 14 }),
1061
1115
  " ",
1062
- h("devportal.verifiedVia", "Verified via"),
1116
+ m("devportal.verifiedVia", "Verified via"),
1063
1117
  " ",
1064
1118
  Q.verificationMethod
1065
1119
  ]
1066
- }) : Q.verificationStatus === "PENDING" ? h("devportal.pendingVerification", "Pending verification") : Q.verificationStatus === "REJECTED" ? h("devportal.verificationRejected", "Rejected") : h("devportal.notVerified", "Not verified")
1120
+ }) : Q.verificationStatus === "PENDING" ? m("devportal.pendingVerification", "Pending verification") : Q.verificationStatus === "REJECTED" ? m("devportal.verificationRejected", "Rejected") : m("devportal.notVerified", "Not verified")
1067
1121
  }, {
1068
- label: h("devportal.certifiedLabel", "Certified"),
1122
+ label: m("devportal.certifiedLabel", "Certified"),
1069
1123
  value: e.isCertified ? /* @__PURE__ */ z("span", {
1070
1124
  className: "text-accent-blue flex items-center gap-1",
1071
1125
  children: [
1072
- /* @__PURE__ */ R(le, { size: 14 }),
1126
+ /* @__PURE__ */ R(P, { size: 14 }),
1073
1127
  " ",
1074
- h("devportal.certifiedUntil", "Certified until"),
1128
+ m("devportal.certifiedUntil", "Certified until"),
1075
1129
  " ",
1076
1130
  e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
1077
1131
  ]
1078
- }) : h("devportal.notCertified", "Not certified")
1132
+ }) : m("devportal.notCertified", "Not certified")
1079
1133
  }] }), Q.verificationStatus !== "VERIFIED" && /* @__PURE__ */ R("div", {
1080
1134
  className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
1081
- children: ge ? /* @__PURE__ */ z("p", {
1135
+ children: ye ? /* @__PURE__ */ z("p", {
1082
1136
  className: "text-sm text-status-success-text flex items-center gap-2",
1083
- children: [/* @__PURE__ */ R(k, { size: 14 }), h("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1137
+ children: [/* @__PURE__ */ R(k, { size: 14 }), m("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1084
1138
  }) : /* @__PURE__ */ z(L, { children: [
1085
1139
  /* @__PURE__ */ R("p", {
1086
1140
  className: "text-sm text-text-secondary",
1087
- children: h("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1141
+ children: m("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1088
1142
  }),
1089
1143
  Q.verificationStatus === "PENDING" && /* @__PURE__ */ z("div", {
1090
1144
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1091
1145
  children: [
1092
- h("devportal.pendingVerification", "Pending verification"),
1146
+ m("devportal.pendingVerification", "Pending verification"),
1093
1147
  Q.verificationMethod ? ` · ${Q.verificationMethod}` : "",
1094
1148
  Q.verificationRequestNotes ? ` · ${Q.verificationRequestNotes}` : ""
1095
1149
  ]
@@ -1102,7 +1156,7 @@ var Y = {
1102
1156
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1103
1157
  children: [/* @__PURE__ */ R("div", {
1104
1158
  className: "font-medium text-text-primary",
1105
- children: h("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1159
+ children: m("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1106
1160
  }), /* @__PURE__ */ R("ul", {
1107
1161
  className: "mt-2 list-disc pl-5 space-y-1",
1108
1162
  children: $.map((e) => /* @__PURE__ */ R("li", { children: e }, e))
@@ -1117,99 +1171,99 @@ var Y = {
1117
1171
  "manual"
1118
1172
  ].map((e) => /* @__PURE__ */ R("button", {
1119
1173
  type: "button",
1120
- onClick: () => he(e),
1121
- className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${Z === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1122
- children: e === "domain" ? h("devportal.domainVerification", "Domain") : e === "document" ? h("devportal.documentVerification", "Document") : h("devportal.manualVerification", "Manual review")
1174
+ onClick: () => J(e),
1175
+ className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${q === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1176
+ children: e === "domain" ? m("devportal.domainVerification", "Domain") : e === "document" ? m("devportal.documentVerification", "Document") : m("devportal.manualVerification", "Manual review")
1123
1177
  }, e))
1124
1178
  }),
1125
- Z === "domain" ? /* @__PURE__ */ R(y, {
1126
- label: h("devportal.domainVerification", "Domain"),
1127
- value: Se,
1179
+ q === "domain" ? /* @__PURE__ */ R(y, {
1180
+ label: m("devportal.domainVerification", "Domain"),
1181
+ value: Z,
1128
1182
  onChange: (e) => Ce(e.target.value),
1129
1183
  placeholder: "example.com"
1130
- }) : Z === "document" ? /* @__PURE__ */ R(y, {
1131
- label: h("devportal.evidenceUrl", "Evidence URL"),
1132
- value: be,
1133
- onChange: (e) => xe(e.target.value),
1184
+ }) : q === "document" ? /* @__PURE__ */ R(y, {
1185
+ label: m("devportal.evidenceUrl", "Evidence URL"),
1186
+ value: xe,
1187
+ onChange: (e) => Se(e.target.value),
1134
1188
  placeholder: "https://..."
1135
1189
  }) : null,
1136
- /* @__PURE__ */ R(ee, {
1137
- label: h("devportal.notes", "Notes"),
1138
- value: ve,
1139
- onChange: (e) => ye(e.target.value),
1190
+ /* @__PURE__ */ R(ne, {
1191
+ label: m("devportal.notes", "Notes"),
1192
+ value: Y,
1193
+ onChange: (e) => X(e.target.value),
1140
1194
  placeholder: "What should reviewers validate?"
1141
1195
  }),
1142
1196
  /* @__PURE__ */ z("button", {
1143
1197
  type: "button",
1144
1198
  disabled: !ke,
1145
1199
  onClick: () => void (async () => {
1146
- let t = Se.trim(), n = be.trim(), r = ve.trim();
1147
- if (Z === "domain" && !q(t)) {
1148
- X(h("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1200
+ let t = Z.trim(), n = xe.trim(), r = Y.trim();
1201
+ if (q === "domain" && !_e(t)) {
1202
+ G(m("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1149
1203
  return;
1150
1204
  }
1151
- if (Z === "document" && !J(n)) {
1152
- X(h("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1205
+ if (q === "document" && !K(n)) {
1206
+ G(m("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1153
1207
  return;
1154
1208
  }
1155
- if (Z === "manual" && !r) {
1156
- X(h("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1209
+ if (q === "manual" && !r) {
1210
+ G(m("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1157
1211
  return;
1158
1212
  }
1159
- X(null), K(null), De(!0);
1213
+ G(null), V(null), De(!0);
1160
1214
  try {
1161
1215
  await Ae({ variables: {
1162
1216
  id: e.id,
1163
1217
  input: {
1164
- name: g.name.trim() || void 0,
1165
- description: g.description.trim() || null,
1166
- websiteUrl: g.websiteUrl.trim() || null,
1167
- contactEmail: g.contactEmail.trim() || null,
1168
- supportEmail: g.supportEmail.trim() || null,
1169
- logoUrl: g.logoUrl.trim() || null,
1170
- bannerUrl: g.bannerUrl.trim() || null
1218
+ name: h.name.trim() || void 0,
1219
+ description: h.description.trim() || null,
1220
+ websiteUrl: h.websiteUrl.trim() || null,
1221
+ contactEmail: h.contactEmail.trim() || null,
1222
+ supportEmail: h.supportEmail.trim() || null,
1223
+ logoUrl: h.logoUrl.trim() || null,
1224
+ bannerUrl: h.bannerUrl.trim() || null
1171
1225
  }
1172
1226
  } }), await Me({ variables: {
1173
1227
  id: e.id,
1174
1228
  input: {
1175
- legalEntityName: b.legalEntityName.trim() || null,
1176
- legalEntityType: b.legalEntityType.trim() || null
1229
+ legalEntityName: _.legalEntityName.trim() || null,
1230
+ legalEntityType: _.legalEntityType.trim() || null
1177
1231
  }
1178
1232
  } }), await Pe({ variables: {
1179
1233
  id: e.id,
1180
1234
  input: {
1181
- taxId: w.taxId.trim() || null,
1182
- taxCountry: w.taxCountry.trim() || null
1235
+ taxId: b.taxId.trim() || null,
1236
+ taxCountry: b.taxCountry.trim() || null
1183
1237
  }
1184
1238
  } });
1185
- let i = await W({
1239
+ let i = await H({
1186
1240
  gateway: "global",
1187
- query: G,
1241
+ query: W,
1188
1242
  variables: {
1189
1243
  id: e.id,
1190
- method: Z,
1244
+ method: q,
1191
1245
  notes: r || null,
1192
- evidenceUrl: Z === "domain" ? null : n || null,
1193
- domain: Z === "domain" && t || null
1246
+ evidenceUrl: q === "domain" ? null : n || null,
1247
+ domain: q === "domain" && t || null
1194
1248
  }
1195
1249
  });
1196
1250
  if (i.errors?.length) throw Error(i.errors[0]?.message || "Verification request failed");
1197
- _e(!0), K(h("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Te((await W({
1251
+ be(!0), V(m("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Te((await H({
1198
1252
  gateway: "global",
1199
- query: fe,
1253
+ query: U,
1200
1254
  variables: { id: e.id }
1201
1255
  })).data?.developerOrganization ?? null);
1202
1256
  } catch (e) {
1203
- X(e instanceof Error ? e.message : h("devportal.verificationRequestFailed", "Verification request failed"));
1257
+ G(e instanceof Error ? e.message : m("devportal.verificationRequestFailed", "Verification request failed"));
1204
1258
  } finally {
1205
1259
  De(!1);
1206
1260
  }
1207
1261
  })(),
1208
1262
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
1209
- children: [Ee ? /* @__PURE__ */ R(N, {
1263
+ children: [Ee ? /* @__PURE__ */ R(M, {
1210
1264
  size: 14,
1211
1265
  className: "animate-spin"
1212
- }) : /* @__PURE__ */ R(le, { size: 14 }), h("devportal.requestVerification", "Request Verification")]
1266
+ }) : /* @__PURE__ */ R(P, { size: 14 }), m("devportal.requestVerification", "Request Verification")]
1213
1267
  })
1214
1268
  ] })
1215
1269
  ] })
@@ -1219,6 +1273,6 @@ var Y = {
1219
1273
  });
1220
1274
  };
1221
1275
  //#endregion
1222
- export { X as OrganizationDetailPage };
1276
+ export { J as OrganizationDetailPage };
1223
1277
 
1224
1278
  //# sourceMappingURL=OrganizationDetailPage.js.map