@burdenoff/microfe-devportal 2026.916.1 → 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 se, Building2 as ce, CheckCircle as O, CreditCard as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as le, Shield as ue, Trash2 as de, TrendingUp as P, Users as F } 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 fe, graphqlFetch as U } 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 pe = "\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 me(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,
@@ -102,11 +102,11 @@ function G(e) {
102
102
  updatedAt: e.updatedAt
103
103
  };
104
104
  }
105
- function K(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 q(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,90 +114,97 @@ function q(e) {
114
114
  return !1;
115
115
  }
116
116
  }
117
- function he(e) {
117
+ function ve(e) {
118
118
  let t = e.trim();
119
119
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
120
120
  }
121
- var J = {
121
+ var q = {
122
122
  VIEWER: 0,
123
123
  DEVELOPER: 1,
124
124
  ADMIN: 2,
125
125
  OWNER: 3
126
- }, Y = () => {
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: ce
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: F
167
+ icon: pe
151
168
  },
152
169
  {
153
170
  id: "settings",
154
171
  label: x("devportal.settings", "Settings"),
155
- icon: le
172
+ icon: de
156
173
  }
157
- ], { data: w, previousData: oe, loading: se, error: O } = o({
158
- variables: { id: m },
159
- skip: !m
160
- }), j = w ?? oe, { data: ue } = a({
161
- variables: {
162
- limit: 50,
163
- organizationId: m
164
- },
165
- skip: !m,
166
- fetchPolicy: "cache-and-network"
167
- }), de = (j?.developerOrganization?.members ?? []).map(G), P = (f ? de.find((e) => e.userId === f.id) : void 0)?.role, L = P !== void 0 && J[P] >= J.DEVELOPER, V = P !== void 0 && J[P] >= J.ADMIN, fe = V, U = V, pe = re.filter((e) => e.id !== "settings" || V), W = (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 = j?.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]), se && !j) 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
197
  children: /* @__PURE__ */ R(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
191
198
  })
192
199
  });
193
- if (O || !j?.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")
@@ -207,24 +214,24 @@ var J = {
207
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: () => W(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 K = me(j.developerOrganization), q = de, he = ue?.applications?.edges?.map((e) => e.node) ?? [], Y = `/billing/earnings?developerOrgId=${encodeURIComponent(K.id)}&developerOrgName=${encodeURIComponent(K.name)}&returnTo=${encodeURIComponent(`${c}${r(p, K.id)}`)}`;
218
- return /* @__PURE__ */ z(d, {
219
- title: K.name,
220
- description: K.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: fe ? /* @__PURE__ */ z("button", {
227
- onClick: () => n?.(Y),
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
236
  children: [/* @__PURE__ */ R(A, { size: 16 }), x("devportal.revenue", "Revenue")]
230
237
  }) : null
@@ -236,7 +243,7 @@ var J = {
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: pe.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 J = {
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-${K.id}`,
275
+ storageKey: `devportal-org-${Y.id}`,
269
276
  steps: [
270
- ...U ? [{
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(F, { 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(le, { size: 16 }),
288
+ icon: /* @__PURE__ */ R(de, { size: 16 }),
282
289
  onClick: () => C("settings"),
283
- done: !!K.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(k, { size: 16 }),
290
- onClick: () => n?.(Y),
291
- done: !!K.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: () => W("/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
311
  icon: /* @__PURE__ */ R(N, { size: 16 }),
305
- onClick: () => W("/seller/items/new")
312
+ onClick: () => J("/seller/items/new")
306
313
  }] : []
307
314
  ]
308
315
  }),
@@ -313,190 +320,179 @@ var J = {
313
320
  "aria-labelledby": `organization-tab-${S}`,
314
321
  tabIndex: 0,
315
322
  children: [
316
- S === "overview" && /* @__PURE__ */ R(X, {
317
- org: K,
318
- apps: he,
319
- members: q,
320
- canCreateApps: L,
321
- canViewRevenue: fe,
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: W,
331
+ onNavigate: J,
324
332
  onShowApps: () => C("apps")
325
333
  }),
326
- S === "apps" && /* @__PURE__ */ R(ge, {
327
- org: K,
328
- apps: he,
329
- onNavigate: W,
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(_e, {
333
- members: q,
334
- onNavigate: W,
335
- orgId: K.id,
336
- canInviteMembers: U
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(ve, {
339
- org: K,
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
- }, X = ({ 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" ? a ? 3 : 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
- /* @__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
- }),
367
- e.kind !== "PHYSICAL" && /* @__PURE__ */ R(h, {
368
- title: u("devportal.totalInstalls", "Total Installs"),
374
+ icon: /* @__PURE__ */ R(E, { size: 20 })
375
+ }), /* @__PURE__ */ R(g, {
376
+ title: d("devportal.totalInstalls", "Total Installs"),
369
377
  value: e.totalInstalls.toLocaleString(),
370
- icon: /* @__PURE__ */ R(P, { size: 20 })
371
- }),
372
- a ? /* @__PURE__ */ R(h, {
373
- title: u("devportal.totalRevenue", "Total Revenue"),
374
- value: w(e.totalRevenue, o),
378
+ icon: /* @__PURE__ */ R(F, { size: 20 })
379
+ })] }),
380
+ o ? /* @__PURE__ */ R(g, {
381
+ title: d("devportal.totalRevenue", "Total Revenue"),
382
+ value: se(e.totalRevenue, s),
375
383
  icon: /* @__PURE__ */ R(A, { size: 20 })
376
384
  }) : null,
377
- /* @__PURE__ */ R(h, {
378
- title: u("devportal.avgRating", "Avg Rating"),
379
- value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : u("devportal.notAvailable", "N/A"),
380
- icon: /* @__PURE__ */ R(se, { size: 20 })
385
+ /* @__PURE__ */ R(g, {
386
+ title: d("devportal.avgRating", "Avg Rating"),
387
+ value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : d("devportal.notAvailable", "N/A"),
388
+ icon: /* @__PURE__ */ R(O, { size: 20 })
381
389
  })
382
390
  ]
383
- }) }), /* @__PURE__ */ R(f, {
384
- 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"),
385
393
  actions: /* @__PURE__ */ z("button", {
386
- onClick: c,
394
+ onClick: l,
387
395
  className: "text-sm text-primary hover:underline flex items-center gap-1",
388
396
  children: [
389
- u("devportal.viewAll", "View all"),
397
+ d("devportal.viewAll", "View all"),
390
398
  " ",
391
- /* @__PURE__ */ R(oe, { size: 14 })
399
+ /* @__PURE__ */ R(D, { size: 14 })
392
400
  ]
393
401
  }),
394
- 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", {
395
419
  className: "space-y-2",
396
- children: t.slice(0, 3).map((e) => /* @__PURE__ */ R(m, {
420
+ children: t.slice(0, 3).map((e) => /* @__PURE__ */ R(h, {
397
421
  app: e,
398
- onClick: () => s(`/apps/${e.id}`)
422
+ onClick: () => c(`/apps/${e.id}`)
399
423
  }, e.id))
400
424
  }) : /* @__PURE__ */ R(n, {
401
425
  illustration: "empty-data",
402
- icon: /* @__PURE__ */ R(D, { size: 24 }),
403
- title: u("devportal.noApplications", "No applications"),
404
- description: e.kind === "PHYSICAL" ? u("devportal.createYourFirstItem", "List your first physical item") : u("devportal.createYourFirstApplication", "Create your first application"),
405
- action: i ? /* @__PURE__ */ z("button", {
406
- 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"),
407
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",
408
- children: [/* @__PURE__ */ R(N, { 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")]
409
433
  }) : void 0
410
434
  })
411
435
  })]
412
436
  }), /* @__PURE__ */ z("div", {
413
437
  className: "space-y-6",
414
- children: [
415
- a ? /* @__PURE__ */ R(f, {
416
- title: u("devportal.revenueSummary", "Revenue Summary"),
417
- children: /* @__PURE__ */ R(v, { items: [
418
- {
419
- label: u("devportal.totalRevenue", "Total Revenue"),
420
- value: w(e.totalRevenue, o)
421
- },
422
- {
423
- label: u("devportal.platformFees", "Platform Fees"),
424
- value: w(e.totalPlatformFees, o)
425
- },
426
- {
427
- label: u("devportal.netPayouts", "Net Payouts"),
428
- value: w(e.totalPayouts, o)
429
- },
430
- {
431
- label: u("devportal.pendingBalance", "Pending Balance"),
432
- value: w(e.pendingBalance, o)
433
- },
434
- {
435
- label: u("devportal.lifetimeRevenue", "Lifetime Revenue"),
436
- value: w(e.lifetimeRevenue, o)
437
- }
438
- ] })
439
- }) : null,
440
- /* @__PURE__ */ R(f, {
441
- title: u("devportal.teamMembers", "Team Members"),
442
- actions: /* @__PURE__ */ R("button", {
443
- onClick: () => s(`/organizations/${e.id}/members`),
444
- className: "text-sm text-primary hover:underline",
445
- children: u("devportal.manage", "Manage")
446
- }),
447
- children: /* @__PURE__ */ z("div", {
448
- className: "space-y-2",
449
- children: [r.slice(0, 3).map((e) => /* @__PURE__ */ R("div", {
450
- className: "flex items-center justify-between py-2",
451
- children: /* @__PURE__ */ z("div", {
452
- className: "flex items-center gap-3",
453
- children: [/* @__PURE__ */ R("div", {
454
- className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
455
- children: e.email?.charAt(0).toUpperCase() || "U"
456
- }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("p", {
457
- className: "text-sm font-medium",
458
- children: e.email
459
- }), /* @__PURE__ */ R("p", {
460
- className: "text-xs text-text-secondary",
461
- children: p[e.role]
462
- })] })]
463
- })
464
- }, e.id)), r.length > 3 && /* @__PURE__ */ z("p", {
465
- className: "text-xs text-text-secondary",
466
- children: [
467
- "+",
468
- r.length - 3,
469
- " ",
470
- u("devportal.moreMembers", "more members")
471
- ]
472
- })]
473
- })
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")
474
444
  }),
475
- /* @__PURE__ */ R(f, {
476
- title: u("devportal.links", "Links"),
477
- children: /* @__PURE__ */ z("div", {
478
- className: "space-y-2",
479
- children: [e.websiteUrl && /* @__PURE__ */ z("a", {
480
- href: e.websiteUrl,
481
- target: "_blank",
482
- rel: "noopener noreferrer",
483
- className: "flex items-center gap-2 text-sm text-primary hover:underline",
484
- children: [/* @__PURE__ */ R(j, { size: 14 }), u("devportal.website", "Website")]
485
- }), e.contactEmail && /* @__PURE__ */ z("a", {
486
- href: `mailto:${e.contactEmail}`,
487
- className: "flex items-center gap-2 text-sm text-primary hover:underline",
488
- children: [/* @__PURE__ */ R(j, { size: 14 }), e.contactEmail]
489
- })]
490
- })
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
+ })]
491
471
  })
492
- ]
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
+ })]
493
489
  })]
494
490
  });
495
- }, ge = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
496
- let { t: a } = B(), o = (e, t) => {
497
- 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);
498
494
  return n === e ? t : n;
499
- }, 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");
500
496
  return /* @__PURE__ */ z("div", {
501
497
  className: "space-y-6",
502
498
  children: [/* @__PURE__ */ z("div", {
@@ -504,34 +500,73 @@ var J = {
504
500
  children: [/* @__PURE__ */ z("p", {
505
501
  className: "text-sm text-text-secondary",
506
502
  children: [
507
- t.length,
503
+ l.length,
508
504
  " ",
509
- 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")
510
506
  ]
511
- }), i ? /* @__PURE__ */ z("button", {
512
- onClick: () => r(c),
507
+ }), a ? /* @__PURE__ */ z("button", {
508
+ onClick: () => i(u),
513
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",
514
- children: [/* @__PURE__ */ R(N, { size: 16 }), l]
510
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d]
515
511
  }) : null]
516
- }), t.length > 0 ? /* @__PURE__ */ R("div", {
512
+ }), l.length > 0 ? /* @__PURE__ */ R("div", {
517
513
  className: "space-y-2",
518
- 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, {
519
518
  app: e,
520
- onClick: () => r(`/apps/${e.id}`)
519
+ onClick: () => i(`/apps/${e.id}`)
521
520
  }, e.id))
522
521
  }) : /* @__PURE__ */ R(n, {
523
522
  illustration: "empty-data",
524
- icon: /* @__PURE__ */ R(D, { size: 32 }),
525
- title: o("devportal.noApplications", "No applications"),
526
- description: s ? o("devportal.createFirstItemForOrg", "List your first physical item for this organization") : o("devportal.createFirstAppForOrg", "Create your first application for this organization"),
527
- action: i ? /* @__PURE__ */ z("button", {
528
- 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),
529
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",
530
- children: [/* @__PURE__ */ R(N, { size: 16 }), l]
529
+ children: [/* @__PURE__ */ R(N, { size: 16 }), d]
531
530
  }) : void 0
532
531
  })]
533
532
  });
534
- }, _e = ({ 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 }) => {
535
570
  let { t: a } = B(), o = (e, t) => {
536
571
  let n = a(e);
537
572
  return n === e ? t : n;
@@ -552,7 +587,7 @@ var J = {
552
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",
553
588
  children: [/* @__PURE__ */ R(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
554
589
  }) : null]
555
- }), /* @__PURE__ */ R(_, {
590
+ }), /* @__PURE__ */ R(v, {
556
591
  data: e,
557
592
  keyField: "id",
558
593
  columns: [
@@ -575,7 +610,7 @@ var J = {
575
610
  header: o("devportal.roleColumn", "Role"),
576
611
  render: (e) => /* @__PURE__ */ R("span", {
577
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"),
578
- children: p[e.role]
613
+ children: m[e.role]
579
614
  })
580
615
  },
581
616
  {
@@ -586,21 +621,21 @@ var J = {
586
621
  ]
587
622
  })]
588
623
  });
589
- }, ve = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
590
- let [s, d] = E(!1);
591
- T(() => {
624
+ }, Se = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
625
+ let [s, c] = T(!1);
626
+ w(() => {
592
627
  if (!a) return;
593
628
  document.getElementById("fulfillment-section")?.scrollIntoView({
594
629
  behavior: "smooth",
595
630
  block: "start"
596
- }), d(!0);
597
- let e = setTimeout(() => d(!1), 2500);
631
+ }), c(!0);
632
+ let e = setTimeout(() => c(!1), 2500);
598
633
  return o?.(), () => clearTimeout(e);
599
634
  }, [a]);
600
- let { t: p } = B(), { allowed: m } = C(re.ORG_UPDATE), h = (e, t) => {
601
- let n = p(e);
635
+ let { t: l } = B(), { allowed: f } = C(ae.ORG_UPDATE), m = (e, t) => {
636
+ let n = l(e);
602
637
  return n === e ? t : n;
603
- }, [g, _] = E({
638
+ }, [h, g] = T({
604
639
  name: e.name,
605
640
  description: e.description ?? "",
606
641
  websiteUrl: e.websiteUrl ?? "",
@@ -608,25 +643,25 @@ var J = {
608
643
  supportEmail: e.supportEmail ?? "",
609
644
  logoUrl: e.logoUrl ?? "",
610
645
  bannerUrl: e.bannerUrl ?? ""
611
- }), [b, ie] = E({
646
+ }), [_, v] = T({
612
647
  legalEntityName: e.legalEntityName ?? "",
613
648
  legalEntityType: e.legalEntityType ?? ""
614
- }), [w, ae] = E({
649
+ }), [b, oe] = T({
615
650
  taxId: e.taxId ?? "",
616
651
  taxCountry: e.taxCountry ?? ""
617
- }), { locations: D, refetch: oe } = ne(), [se, ce] = E(!1), [k, A] = E(null), [j, P] = E(null), [F, I] = E(null), [V, H] = E(null), [me, G] = E(null), [J, Y] = E(null), [X, ge] = E("manual"), [_e, ve] = E(!1), [ye, be] = E(""), [xe, Se] = E(""), [Ce, we] = E(""), [Te, Ee] = E(null), [De, Oe] = E(!1), Z = Te ?? {
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 ?? {
618
653
  verificationMethod: e.verificationMethod,
619
654
  verificationRequestedAt: e.verificationRequestedAt,
620
655
  verificationStatus: e.verificationStatus,
621
656
  verificationRequestNotes: e.verificationRequestNotes,
622
657
  verificationRejectedReason: e.verificationRejectedReason
623
- }, Q = [];
624
- g.contactEmail.trim() ? he(g.contactEmail) || Q.push(h("devportal.contactEmailInvalid", "Contact email must be valid")) : Q.push(h("devportal.contactEmailRequired", "Contact email is required")), g.supportEmail.trim() && !he(g.supportEmail) && Q.push(h("devportal.supportEmailInvalid", "Support email must be valid")), g.websiteUrl.trim() ? q(g.websiteUrl) || Q.push(h("devportal.websiteInvalid", "Website URL must be valid")) : Q.push(h("devportal.websiteRequired", "Website URL is required")), b.legalEntityName.trim() || Q.push(h("devportal.legalEntityNameRequired", "Legal entity name is required")), b.legalEntityType.trim() || Q.push(h("devportal.legalEntityTypeRequired", "Entity type is required")), w.taxId.trim() || Q.push(h("devportal.taxIdRequired", "Tax ID is required")), w.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(w.taxCountry.trim()) || Q.push(h("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : Q.push(h("devportal.taxCountryRequired", "Tax country is required"));
625
- let $ = [];
626
- X === "domain" && !K(Ce.trim()) && $.push(h("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), X === "document" && !q(xe.trim()) && $.push(h("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), X === "manual" && !ye.trim() && $.push(h("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
627
- let ke = Q.length === 0 && $.length === 0 && !De && m, [Ae, { loading: je }] = u({ refetchQueries: ["GetOrganization"] }), [Me, { loading: Ne }] = c({ refetchQueries: ["GetOrganization"] }), [Pe, { loading: Fe }] = l({ refetchQueries: ["GetOrganization"] });
628
- T(() => {
629
- _({
658
+ }, $ = [];
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"));
660
+ let Oe = [];
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({
630
665
  name: e.name,
631
666
  description: e.description ?? "",
632
667
  websiteUrl: e.websiteUrl ?? "",
@@ -634,216 +669,216 @@ var J = {
634
669
  supportEmail: e.supportEmail ?? "",
635
670
  logoUrl: e.logoUrl ?? "",
636
671
  bannerUrl: e.bannerUrl ?? ""
637
- }), ie({
672
+ }), v({
638
673
  legalEntityName: e.legalEntityName ?? "",
639
674
  legalEntityType: e.legalEntityType ?? ""
640
- }), ae({
675
+ }), oe({
641
676
  taxId: e.taxId ?? "",
642
677
  taxCountry: e.taxCountry ?? ""
643
678
  });
644
- }, [e.id]), T(() => {
645
- e.id && U({
679
+ }, [e.id]), w(() => {
680
+ e.id && H({
646
681
  gateway: "global",
647
- query: pe,
682
+ query: U,
648
683
  variables: { id: e.id }
649
- }).then((e) => Ee(e.data?.developerOrganization ?? null)).catch(() => Ee(null));
650
- }, [e.id, _e]);
684
+ }).then((e) => Te(e.data?.developerOrganization ?? null)).catch(() => Te(null));
685
+ }, [e.id, ye]);
651
686
  let Ie = async () => {
652
- Y(null), G(null);
687
+ G(null), V(null);
653
688
  try {
654
689
  await Ae({ variables: {
655
690
  id: e.id,
656
691
  input: {
657
- name: g.name.trim() || void 0,
658
- description: g.description.trim() || null,
659
- websiteUrl: g.websiteUrl.trim() || null,
660
- contactEmail: g.contactEmail.trim() || null,
661
- supportEmail: g.supportEmail.trim() || null,
662
- logoUrl: g.logoUrl.trim() || null,
663
- 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
664
699
  }
665
- } }), G(h("devportal.organizationUpdated", "Organization details updated"));
700
+ } }), V(m("devportal.organizationUpdated", "Organization details updated"));
666
701
  } catch (e) {
667
- Y(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"));
668
703
  }
669
704
  }, Le = async () => {
670
- Y(null), G(null);
705
+ G(null), V(null);
671
706
  try {
672
707
  await Me({ variables: {
673
708
  id: e.id,
674
709
  input: {
675
- legalEntityName: b.legalEntityName.trim() || null,
676
- legalEntityType: b.legalEntityType.trim() || null
710
+ legalEntityName: _.legalEntityName.trim() || null,
711
+ legalEntityType: _.legalEntityType.trim() || null
677
712
  }
678
- } }), G(h("devportal.legalInfoUpdated", "Legal information updated"));
713
+ } }), V(m("devportal.legalInfoUpdated", "Legal information updated"));
679
714
  } catch (e) {
680
- Y(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"));
681
716
  }
682
717
  }, Re = async () => {
683
- Y(null), G(null);
718
+ G(null), V(null);
684
719
  try {
685
720
  await Pe({ variables: {
686
721
  id: e.id,
687
722
  input: {
688
- taxId: w.taxId.trim() || null,
689
- taxCountry: w.taxCountry.trim() || null
723
+ taxId: b.taxId.trim() || null,
724
+ taxCountry: b.taxCountry.trim() || null
690
725
  }
691
- } }), G(h("devportal.taxInfoUpdated", "Tax information updated"));
726
+ } }), V(m("devportal.taxInfoUpdated", "Tax information updated"));
692
727
  } catch (e) {
693
- Y(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"));
694
729
  }
695
730
  }, ze = async (e) => {
696
- H(null), I(null), P(e);
731
+ I(null), F(null), A(e);
697
732
  try {
698
- let t = await U({
733
+ let t = await H({
699
734
  gateway: "global",
700
735
  query: "\n mutation DevportalSetDefaultPickupAddress($id: ID!) {\n setDefaultPickupAddress(id: $id) {\n id\n }\n }\n ",
701
736
  variables: { id: e }
702
737
  });
703
738
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to switch pickup address");
704
- fe(), i(), I(h("devportal.pickupAddressSetActive", "Pickup address updated"));
739
+ he(), i(), F(m("devportal.pickupAddressSetActive", "Pickup address updated"));
705
740
  } catch (e) {
706
- 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"));
707
742
  } finally {
708
- P(null);
743
+ A(null);
709
744
  }
710
745
  }, Be = async (e) => {
711
- H(null), I(null), P(e);
746
+ I(null), F(null), A(e);
712
747
  try {
713
- let t = await U({
748
+ let t = await H({
714
749
  gateway: "global",
715
750
  query: "\n mutation DevportalRemoveOrgPickupAddress($id: ID!) {\n removeDeveloperOrgPickupAddress(id: $id)\n }\n ",
716
751
  variables: { id: e }
717
752
  });
718
753
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove pickup address");
719
- fe(), i(), I(h("devportal.pickupAddressRemoved", "Pickup address removed"));
754
+ he(), i(), F(m("devportal.pickupAddressRemoved", "Pickup address removed"));
720
755
  } catch (e) {
721
- 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"));
722
757
  } finally {
723
- P(null), A(null);
758
+ A(null), le(null);
724
759
  }
725
760
  };
726
761
  return /* @__PURE__ */ z("div", {
727
762
  className: "space-y-6 max-w-2xl",
728
763
  children: [
729
- J && /* @__PURE__ */ R("div", {
764
+ ge && /* @__PURE__ */ R("div", {
730
765
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
731
- children: J
766
+ children: ge
732
767
  }),
733
768
  me && /* @__PURE__ */ R("div", {
734
769
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
735
770
  children: me
736
771
  }),
737
- /* @__PURE__ */ R(f, {
738
- title: h("devportal.organizationDetails", "Organization Details"),
772
+ /* @__PURE__ */ R(p, {
773
+ title: m("devportal.organizationDetails", "Organization Details"),
739
774
  children: /* @__PURE__ */ z("div", {
740
775
  className: "space-y-4",
741
776
  children: [
742
777
  /* @__PURE__ */ z("div", {
743
778
  className: "grid gap-4 sm:grid-cols-2",
744
779
  children: [/* @__PURE__ */ R(y, {
745
- label: h("devportal.organizationName", "Organization Name"),
746
- value: g.name,
747
- onChange: (e) => _((t) => ({
780
+ label: m("devportal.organizationName", "Organization Name"),
781
+ value: h.name,
782
+ onChange: (e) => g((t) => ({
748
783
  ...t,
749
784
  name: e.target.value
750
785
  })),
751
- disabled: !m,
786
+ disabled: !f,
752
787
  required: !0
753
788
  }), /* @__PURE__ */ R(y, {
754
- label: h("devportal.slug", "Slug"),
789
+ label: m("devportal.slug", "Slug"),
755
790
  value: e.slug,
756
791
  disabled: !0,
757
- hint: h("devportal.slugReadOnly", "Slug cannot be changed here")
792
+ hint: m("devportal.slugReadOnly", "Slug cannot be changed here")
758
793
  })]
759
794
  }),
760
- /* @__PURE__ */ R(ee, {
761
- label: h("devportal.description", "Description"),
762
- value: g.description,
763
- onChange: (e) => _((t) => ({
795
+ /* @__PURE__ */ R(ne, {
796
+ label: m("devportal.description", "Description"),
797
+ value: h.description,
798
+ onChange: (e) => g((t) => ({
764
799
  ...t,
765
800
  description: e.target.value
766
801
  })),
767
- disabled: !m,
802
+ disabled: !f,
768
803
  rows: 4
769
804
  }),
770
805
  /* @__PURE__ */ z("div", {
771
806
  className: "grid gap-4 sm:grid-cols-2",
772
807
  children: [
773
808
  /* @__PURE__ */ R(y, {
774
- label: h("devportal.website", "Website"),
809
+ label: m("devportal.website", "Website"),
775
810
  type: "url",
776
- value: g.websiteUrl,
777
- onChange: (e) => _((t) => ({
811
+ value: h.websiteUrl,
812
+ onChange: (e) => g((t) => ({
778
813
  ...t,
779
814
  websiteUrl: e.target.value
780
815
  })),
781
- disabled: !m
816
+ disabled: !f
782
817
  }),
783
818
  /* @__PURE__ */ R(y, {
784
- label: h("devportal.contactEmail", "Contact Email"),
819
+ label: m("devportal.contactEmail", "Contact Email"),
785
820
  type: "email",
786
- value: g.contactEmail,
787
- onChange: (e) => _((t) => ({
821
+ value: h.contactEmail,
822
+ onChange: (e) => g((t) => ({
788
823
  ...t,
789
824
  contactEmail: e.target.value
790
825
  })),
791
- disabled: !m
826
+ disabled: !f
792
827
  }),
793
828
  /* @__PURE__ */ R(y, {
794
- label: h("devportal.supportEmail", "Support Email"),
829
+ label: m("devportal.supportEmail", "Support Email"),
795
830
  type: "email",
796
- value: g.supportEmail,
797
- onChange: (e) => _((t) => ({
831
+ value: h.supportEmail,
832
+ onChange: (e) => g((t) => ({
798
833
  ...t,
799
834
  supportEmail: e.target.value
800
835
  })),
801
- disabled: !m
836
+ disabled: !f
802
837
  }),
803
838
  /* @__PURE__ */ R(y, {
804
- label: h("devportal.logoUrl", "Logo URL"),
839
+ label: m("devportal.logoUrl", "Logo URL"),
805
840
  type: "url",
806
- value: g.logoUrl,
807
- onChange: (e) => _((t) => ({
841
+ value: h.logoUrl,
842
+ onChange: (e) => g((t) => ({
808
843
  ...t,
809
844
  logoUrl: e.target.value
810
845
  })),
811
- disabled: !m
846
+ disabled: !f
812
847
  })
813
848
  ]
814
849
  }),
815
850
  /* @__PURE__ */ R(y, {
816
- label: h("devportal.bannerUrl", "Banner URL"),
851
+ label: m("devportal.bannerUrl", "Banner URL"),
817
852
  type: "url",
818
- value: g.bannerUrl,
819
- onChange: (e) => _((t) => ({
853
+ value: h.bannerUrl,
854
+ onChange: (e) => g((t) => ({
820
855
  ...t,
821
856
  bannerUrl: e.target.value
822
857
  })),
823
- disabled: !m
858
+ disabled: !f
824
859
  }),
825
- /* @__PURE__ */ R(v, { items: [
860
+ /* @__PURE__ */ R(te, { items: [
826
861
  {
827
- label: h("devportal.organizationId", "Organization ID"),
862
+ label: m("devportal.organizationId", "Organization ID"),
828
863
  value: /* @__PURE__ */ R("code", {
829
864
  className: "text-xs",
830
865
  children: e.id
831
866
  })
832
867
  },
833
868
  {
834
- label: h("devportal.tier", "Tier"),
869
+ label: m("devportal.tier", "Tier"),
835
870
  value: e.tier
836
871
  },
837
872
  {
838
- label: h("devportal.partnerTier", "Partner Tier"),
839
- value: e.partnerTier || h("devportal.none", "None")
873
+ label: m("devportal.partnerTier", "Partner Tier"),
874
+ value: e.partnerTier || m("devportal.none", "None")
840
875
  },
841
876
  {
842
- label: h("devportal.created", "Created"),
877
+ label: m("devportal.created", "Created"),
843
878
  value: new Date(e.createdAt).toLocaleDateString()
844
879
  },
845
880
  {
846
- label: h("devportal.platformFeeRate", "Platform Fee Rate"),
881
+ label: m("devportal.platformFeeRate", "Platform Fee Rate"),
847
882
  value: `${(e.platformFeeRate * 100).toFixed(0)}%`
848
883
  }
849
884
  ] }),
@@ -851,20 +886,20 @@ var J = {
851
886
  className: "flex justify-end",
852
887
  children: /* @__PURE__ */ z("button", {
853
888
  type: "button",
854
- disabled: !m || je,
889
+ disabled: !f || je,
855
890
  onClick: () => void Ie(),
856
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",
857
892
  children: [je ? /* @__PURE__ */ R(M, {
858
893
  size: 14,
859
894
  className: "animate-spin"
860
- }) : /* @__PURE__ */ R(le, { size: 14 }), h("devportal.saveChanges", "Save Changes")]
895
+ }) : /* @__PURE__ */ R(de, { size: 14 }), m("devportal.saveChanges", "Save Changes")]
861
896
  })
862
897
  })
863
898
  ]
864
899
  })
865
900
  }),
866
- /* @__PURE__ */ R(f, {
867
- title: h("devportal.legalInformation", "Legal Information"),
901
+ /* @__PURE__ */ R(p, {
902
+ title: m("devportal.legalInformation", "Legal Information"),
868
903
  children: /* @__PURE__ */ z("div", {
869
904
  className: "space-y-4",
870
905
  children: [
@@ -872,111 +907,111 @@ var J = {
872
907
  className: "grid gap-4 sm:grid-cols-2",
873
908
  children: [
874
909
  /* @__PURE__ */ R(y, {
875
- label: h("devportal.legalEntityName", "Legal Entity Name"),
876
- value: b.legalEntityName,
877
- onChange: (e) => ie((t) => ({
910
+ label: m("devportal.legalEntityName", "Legal Entity Name"),
911
+ value: _.legalEntityName,
912
+ onChange: (e) => v((t) => ({
878
913
  ...t,
879
914
  legalEntityName: e.target.value
880
915
  })),
881
- disabled: !m
916
+ disabled: !f
882
917
  }),
883
918
  /* @__PURE__ */ R(y, {
884
- label: h("devportal.entityType", "Entity Type"),
885
- value: b.legalEntityType,
886
- onChange: (e) => ie((t) => ({
919
+ label: m("devportal.entityType", "Entity Type"),
920
+ value: _.legalEntityType,
921
+ onChange: (e) => v((t) => ({
887
922
  ...t,
888
923
  legalEntityType: e.target.value
889
924
  })),
890
- disabled: !m
925
+ disabled: !f
891
926
  }),
892
927
  /* @__PURE__ */ R(y, {
893
- label: h("devportal.taxId", "Tax ID"),
894
- value: w.taxId,
895
- onChange: (e) => ae((t) => ({
928
+ label: m("devportal.taxId", "Tax ID"),
929
+ value: b.taxId,
930
+ onChange: (e) => oe((t) => ({
896
931
  ...t,
897
932
  taxId: e.target.value
898
933
  })),
899
- disabled: !m
934
+ disabled: !f
900
935
  }),
901
936
  /* @__PURE__ */ R(y, {
902
- label: h("devportal.taxCountry", "Tax Country"),
903
- value: w.taxCountry,
904
- onChange: (e) => ae((t) => ({
937
+ label: m("devportal.taxCountry", "Tax Country"),
938
+ value: b.taxCountry,
939
+ onChange: (e) => oe((t) => ({
905
940
  ...t,
906
941
  taxCountry: e.target.value.toUpperCase()
907
942
  })),
908
- disabled: !m
943
+ disabled: !f
909
944
  })
910
945
  ]
911
946
  }),
912
- /* @__PURE__ */ R(v, { items: [{
913
- label: h("devportal.taxForm", "Tax Form"),
914
- 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")
915
950
  }, {
916
- label: h("devportal.taxFormStatus", "Tax Form Status"),
951
+ label: m("devportal.taxFormStatus", "Tax Form Status"),
917
952
  value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ z("span", {
918
953
  className: "text-status-success-text flex items-center gap-1",
919
954
  children: [
920
- /* @__PURE__ */ R(O, { size: 14 }),
955
+ /* @__PURE__ */ R(k, { size: 14 }),
921
956
  " ",
922
- h("devportal.verified", "Verified")
957
+ m("devportal.verified", "Verified")
923
958
  ]
924
- }) : h("devportal.pendingVerification", "Pending verification") : h("devportal.notSubmitted", "Not submitted")
959
+ }) : m("devportal.pendingVerification", "Pending verification") : m("devportal.notSubmitted", "Not submitted")
925
960
  }] }),
926
961
  /* @__PURE__ */ z("div", {
927
962
  className: "flex justify-end gap-2",
928
963
  children: [/* @__PURE__ */ z("button", {
929
964
  type: "button",
930
- disabled: !m || Ne,
965
+ disabled: !f || Ne,
931
966
  onClick: () => void Le(),
932
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",
933
968
  children: [Ne ? /* @__PURE__ */ R(M, {
934
969
  size: 14,
935
970
  className: "animate-spin"
936
- }) : null, h("devportal.saveLegalInfo", "Save Legal Info")]
971
+ }) : null, m("devportal.saveLegalInfo", "Save Legal Info")]
937
972
  }), /* @__PURE__ */ z("button", {
938
973
  type: "button",
939
- disabled: !m || Fe,
974
+ disabled: !f || Fe,
940
975
  onClick: () => void Re(),
941
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",
942
977
  children: [Fe ? /* @__PURE__ */ R(M, {
943
978
  size: 14,
944
979
  className: "animate-spin"
945
- }) : null, h("devportal.saveTaxInfo", "Save Tax Info")]
980
+ }) : null, m("devportal.saveTaxInfo", "Save Tax Info")]
946
981
  })]
947
982
  })
948
983
  ]
949
984
  })
950
985
  }),
951
- e.kind === "PHYSICAL" && /* @__PURE__ */ R(f, {
986
+ e.kind === "PHYSICAL" && /* @__PURE__ */ R(p, {
952
987
  id: "fulfillment-section",
953
- title: h("devportal.fulfillment", "Fulfillment"),
988
+ title: m("devportal.fulfillment", "Fulfillment"),
954
989
  className: t("scroll-mt-6 rounded-lg transition-shadow duration-500", s && "ring-2 ring-action-primary-bg ring-offset-4"),
955
990
  children: /* @__PURE__ */ z("div", {
956
991
  className: "space-y-3",
957
992
  children: [
958
- V && /* @__PURE__ */ R("div", {
993
+ pe && /* @__PURE__ */ R("div", {
959
994
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
960
- children: V
995
+ children: pe
961
996
  }),
962
- F && /* @__PURE__ */ R("div", {
997
+ j && /* @__PURE__ */ R("div", {
963
998
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
964
- children: F
999
+ children: j
965
1000
  }),
966
1001
  !r && n.length === 0 && /* @__PURE__ */ z("div", {
967
1002
  className: "rounded-md border border-border-seam bg-bg-sunken p-4",
968
1003
  children: [/* @__PURE__ */ R("p", {
969
1004
  className: "text-sm font-medium",
970
- children: h("devportal.noPickupAddress", "No pickup address set up yet")
1005
+ children: m("devportal.noPickupAddress", "No pickup address set up yet")
971
1006
  }), /* @__PURE__ */ R("p", {
972
1007
  className: "mt-1 text-sm text-text-secondary",
973
- 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.")
974
1009
  })]
975
1010
  }),
976
1011
  n.length > 0 && /* @__PURE__ */ R("div", {
977
1012
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
978
1013
  children: n.map((e) => {
979
- let n = D.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = j === e.id;
1014
+ let n = se.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = ue === e.id;
980
1015
  return /* @__PURE__ */ z("div", {
981
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"),
982
1017
  children: [
@@ -987,7 +1022,7 @@ var J = {
987
1022
  children: e.carrierLocationLabel
988
1023
  }), e.isDefault && /* @__PURE__ */ R("span", {
989
1024
  className: "rounded-full bg-status-success-bg px-2 py-0.5 text-xs font-medium text-white",
990
- children: h("devportal.active", "Active")
1025
+ children: m("devportal.active", "Active")
991
1026
  })]
992
1027
  }),
993
1028
  /* @__PURE__ */ z("p", {
@@ -1007,127 +1042,127 @@ var J = {
1007
1042
  }),
1008
1043
  /* @__PURE__ */ R("p", {
1009
1044
  className: "mt-1 text-xs text-text-secondary",
1010
- children: te(e.carrier)
1045
+ children: re(e.carrier)
1011
1046
  }),
1012
1047
  !n && /* @__PURE__ */ R("p", {
1013
1048
  className: "mt-2 text-xs text-status-error-text",
1014
- 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.")
1015
1050
  }),
1016
- m && /* @__PURE__ */ z("div", {
1051
+ f && /* @__PURE__ */ z("div", {
1017
1052
  className: "mt-3 flex items-center gap-4",
1018
1053
  children: [!e.isDefault && /* @__PURE__ */ R("button", {
1019
1054
  type: "button",
1020
1055
  disabled: r,
1021
1056
  onClick: () => void ze(e.id),
1022
1057
  className: "text-sm font-medium text-action-primary-text hover:underline disabled:opacity-50",
1023
- children: h("devportal.setPickupAddressActiveCta", "Set as active")
1058
+ children: m("devportal.setPickupAddressActiveCta", "Set as active")
1024
1059
  }), /* @__PURE__ */ z("button", {
1025
1060
  type: "button",
1026
1061
  disabled: r,
1027
- onClick: () => A(e.id),
1062
+ onClick: () => le(e.id),
1028
1063
  className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
1029
- children: [/* @__PURE__ */ R(de, { 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")]
1030
1065
  })]
1031
1066
  })
1032
1067
  ]
1033
1068
  }, e.id);
1034
1069
  })
1035
1070
  }),
1036
- m && /* @__PURE__ */ R("div", {
1071
+ f && /* @__PURE__ */ R("div", {
1037
1072
  className: "flex justify-end",
1038
1073
  children: /* @__PURE__ */ z("button", {
1039
1074
  type: "button",
1040
- onClick: () => ce(!0),
1075
+ onClick: () => D(!0),
1041
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",
1042
- children: [/* @__PURE__ */ R(N, { size: 14 }), h("devportal.addPickupAddressCta", "Add pickup address")]
1077
+ children: [/* @__PURE__ */ R(N, { size: 14 }), m("devportal.addPickupAddressCta", "Add pickup address")]
1043
1078
  })
1044
1079
  }),
1045
- se && /* @__PURE__ */ R(S, {
1046
- open: se,
1047
- onOpenChange: ce,
1080
+ E && /* @__PURE__ */ R(S, {
1081
+ open: E,
1082
+ onOpenChange: D,
1048
1083
  organizationId: e.id,
1049
1084
  carrier: "shiprocket",
1050
1085
  onRegistered: () => {
1051
- i(), oe(), I(h("devportal.pickupAddressAdded", "Pickup address added"));
1086
+ i(), ce(), F(m("devportal.pickupAddressAdded", "Pickup address added"));
1052
1087
  }
1053
1088
  }),
1054
1089
  /* @__PURE__ */ R(x, {
1055
- open: k !== null,
1090
+ open: O !== null,
1056
1091
  onOpenChange: (e) => {
1057
- e || A(null);
1092
+ e || le(null);
1058
1093
  },
1059
1094
  variant: "danger",
1060
- loading: j === k,
1061
- title: h("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1062
- 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."),
1063
- confirmLabel: h("devportal.remove", "Remove"),
1064
- 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"),
1065
1100
  onConfirm: async () => {
1066
- k && await Be(k);
1101
+ O && await Be(O);
1067
1102
  }
1068
1103
  })
1069
1104
  ]
1070
1105
  })
1071
1106
  }),
1072
- /* @__PURE__ */ z(f, {
1073
- title: h("devportal.verificationStatus", "Verification Status"),
1074
- children: [/* @__PURE__ */ R(v, { items: [{
1075
- label: h("devportal.verifiedLabel", "Verified"),
1076
- value: Z.verificationStatus === "VERIFIED" ? /* @__PURE__ */ z("span", {
1107
+ /* @__PURE__ */ z(p, {
1108
+ title: m("devportal.verificationStatus", "Verification Status"),
1109
+ children: [/* @__PURE__ */ R(te, { items: [{
1110
+ label: m("devportal.verifiedLabel", "Verified"),
1111
+ value: Q.verificationStatus === "VERIFIED" ? /* @__PURE__ */ z("span", {
1077
1112
  className: "text-status-success-text flex items-center gap-1",
1078
1113
  children: [
1079
- /* @__PURE__ */ R(O, { size: 14 }),
1114
+ /* @__PURE__ */ R(k, { size: 14 }),
1080
1115
  " ",
1081
- h("devportal.verifiedVia", "Verified via"),
1116
+ m("devportal.verifiedVia", "Verified via"),
1082
1117
  " ",
1083
- Z.verificationMethod
1118
+ Q.verificationMethod
1084
1119
  ]
1085
- }) : Z.verificationStatus === "PENDING" ? h("devportal.pendingVerification", "Pending verification") : Z.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")
1086
1121
  }, {
1087
- label: h("devportal.certifiedLabel", "Certified"),
1122
+ label: m("devportal.certifiedLabel", "Certified"),
1088
1123
  value: e.isCertified ? /* @__PURE__ */ z("span", {
1089
1124
  className: "text-accent-blue flex items-center gap-1",
1090
1125
  children: [
1091
- /* @__PURE__ */ R(ue, { size: 14 }),
1126
+ /* @__PURE__ */ R(P, { size: 14 }),
1092
1127
  " ",
1093
- h("devportal.certifiedUntil", "Certified until"),
1128
+ m("devportal.certifiedUntil", "Certified until"),
1094
1129
  " ",
1095
1130
  e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
1096
1131
  ]
1097
- }) : h("devportal.notCertified", "Not certified")
1098
- }] }), Z.verificationStatus !== "VERIFIED" && /* @__PURE__ */ R("div", {
1132
+ }) : m("devportal.notCertified", "Not certified")
1133
+ }] }), Q.verificationStatus !== "VERIFIED" && /* @__PURE__ */ R("div", {
1099
1134
  className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
1100
- children: _e ? /* @__PURE__ */ z("p", {
1135
+ children: ye ? /* @__PURE__ */ z("p", {
1101
1136
  className: "text-sm text-status-success-text flex items-center gap-2",
1102
- children: [/* @__PURE__ */ R(O, { 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.")]
1103
1138
  }) : /* @__PURE__ */ z(L, { children: [
1104
1139
  /* @__PURE__ */ R("p", {
1105
1140
  className: "text-sm text-text-secondary",
1106
- 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:")
1107
1142
  }),
1108
- Z.verificationStatus === "PENDING" && /* @__PURE__ */ z("div", {
1143
+ Q.verificationStatus === "PENDING" && /* @__PURE__ */ z("div", {
1109
1144
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1110
1145
  children: [
1111
- h("devportal.pendingVerification", "Pending verification"),
1112
- Z.verificationMethod ? ` · ${Z.verificationMethod}` : "",
1113
- Z.verificationRequestNotes ? ` · ${Z.verificationRequestNotes}` : ""
1146
+ m("devportal.pendingVerification", "Pending verification"),
1147
+ Q.verificationMethod ? ` · ${Q.verificationMethod}` : "",
1148
+ Q.verificationRequestNotes ? ` · ${Q.verificationRequestNotes}` : ""
1114
1149
  ]
1115
1150
  }),
1116
- Z.verificationStatus === "REJECTED" && Z.verificationRejectedReason && /* @__PURE__ */ R("div", {
1151
+ Q.verificationStatus === "REJECTED" && Q.verificationRejectedReason && /* @__PURE__ */ R("div", {
1117
1152
  className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
1118
- children: Z.verificationRejectedReason
1153
+ children: Q.verificationRejectedReason
1119
1154
  }),
1120
- Q.length > 0 && /* @__PURE__ */ z("div", {
1155
+ $.length > 0 && /* @__PURE__ */ z("div", {
1121
1156
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1122
1157
  children: [/* @__PURE__ */ R("div", {
1123
1158
  className: "font-medium text-text-primary",
1124
- children: h("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1159
+ children: m("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1125
1160
  }), /* @__PURE__ */ R("ul", {
1126
1161
  className: "mt-2 list-disc pl-5 space-y-1",
1127
- children: Q.map((e) => /* @__PURE__ */ R("li", { children: e }, e))
1162
+ children: $.map((e) => /* @__PURE__ */ R("li", { children: e }, e))
1128
1163
  })]
1129
1164
  }),
1130
- Z.verificationStatus !== "PENDING" && /* @__PURE__ */ z(L, { children: [
1165
+ Q.verificationStatus !== "PENDING" && /* @__PURE__ */ z(L, { children: [
1131
1166
  /* @__PURE__ */ R("div", {
1132
1167
  className: "flex gap-2 flex-wrap",
1133
1168
  children: [
@@ -1136,99 +1171,99 @@ var J = {
1136
1171
  "manual"
1137
1172
  ].map((e) => /* @__PURE__ */ R("button", {
1138
1173
  type: "button",
1139
- onClick: () => ge(e),
1140
- className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${X === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1141
- 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")
1142
1177
  }, e))
1143
1178
  }),
1144
- X === "domain" ? /* @__PURE__ */ R(y, {
1145
- label: h("devportal.domainVerification", "Domain"),
1146
- value: Ce,
1147
- onChange: (e) => we(e.target.value),
1179
+ q === "domain" ? /* @__PURE__ */ R(y, {
1180
+ label: m("devportal.domainVerification", "Domain"),
1181
+ value: Z,
1182
+ onChange: (e) => Ce(e.target.value),
1148
1183
  placeholder: "example.com"
1149
- }) : X === "document" ? /* @__PURE__ */ R(y, {
1150
- label: h("devportal.evidenceUrl", "Evidence URL"),
1184
+ }) : q === "document" ? /* @__PURE__ */ R(y, {
1185
+ label: m("devportal.evidenceUrl", "Evidence URL"),
1151
1186
  value: xe,
1152
1187
  onChange: (e) => Se(e.target.value),
1153
1188
  placeholder: "https://..."
1154
1189
  }) : null,
1155
- /* @__PURE__ */ R(ee, {
1156
- label: h("devportal.notes", "Notes"),
1157
- value: ye,
1158
- onChange: (e) => be(e.target.value),
1190
+ /* @__PURE__ */ R(ne, {
1191
+ label: m("devportal.notes", "Notes"),
1192
+ value: Y,
1193
+ onChange: (e) => X(e.target.value),
1159
1194
  placeholder: "What should reviewers validate?"
1160
1195
  }),
1161
1196
  /* @__PURE__ */ z("button", {
1162
1197
  type: "button",
1163
1198
  disabled: !ke,
1164
1199
  onClick: () => void (async () => {
1165
- let t = Ce.trim(), n = xe.trim(), r = ye.trim();
1166
- if (X === "domain" && !K(t)) {
1167
- Y(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"));
1168
1203
  return;
1169
1204
  }
1170
- if (X === "document" && !q(n)) {
1171
- Y(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://"));
1172
1207
  return;
1173
1208
  }
1174
- if (X === "manual" && !r) {
1175
- Y(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"));
1176
1211
  return;
1177
1212
  }
1178
- Y(null), G(null), Oe(!0);
1213
+ G(null), V(null), De(!0);
1179
1214
  try {
1180
1215
  await Ae({ variables: {
1181
1216
  id: e.id,
1182
1217
  input: {
1183
- name: g.name.trim() || void 0,
1184
- description: g.description.trim() || null,
1185
- websiteUrl: g.websiteUrl.trim() || null,
1186
- contactEmail: g.contactEmail.trim() || null,
1187
- supportEmail: g.supportEmail.trim() || null,
1188
- logoUrl: g.logoUrl.trim() || null,
1189
- 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
1190
1225
  }
1191
1226
  } }), await Me({ variables: {
1192
1227
  id: e.id,
1193
1228
  input: {
1194
- legalEntityName: b.legalEntityName.trim() || null,
1195
- legalEntityType: b.legalEntityType.trim() || null
1229
+ legalEntityName: _.legalEntityName.trim() || null,
1230
+ legalEntityType: _.legalEntityType.trim() || null
1196
1231
  }
1197
1232
  } }), await Pe({ variables: {
1198
1233
  id: e.id,
1199
1234
  input: {
1200
- taxId: w.taxId.trim() || null,
1201
- taxCountry: w.taxCountry.trim() || null
1235
+ taxId: b.taxId.trim() || null,
1236
+ taxCountry: b.taxCountry.trim() || null
1202
1237
  }
1203
1238
  } });
1204
- let i = await U({
1239
+ let i = await H({
1205
1240
  gateway: "global",
1206
1241
  query: W,
1207
1242
  variables: {
1208
1243
  id: e.id,
1209
- method: X,
1244
+ method: q,
1210
1245
  notes: r || null,
1211
- evidenceUrl: X === "domain" ? null : n || null,
1212
- domain: X === "domain" && t || null
1246
+ evidenceUrl: q === "domain" ? null : n || null,
1247
+ domain: q === "domain" && t || null
1213
1248
  }
1214
1249
  });
1215
1250
  if (i.errors?.length) throw Error(i.errors[0]?.message || "Verification request failed");
1216
- ve(!0), G(h("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Ee((await U({
1251
+ be(!0), V(m("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Te((await H({
1217
1252
  gateway: "global",
1218
- query: pe,
1253
+ query: U,
1219
1254
  variables: { id: e.id }
1220
1255
  })).data?.developerOrganization ?? null);
1221
1256
  } catch (e) {
1222
- Y(e instanceof Error ? e.message : h("devportal.verificationRequestFailed", "Verification request failed"));
1257
+ G(e instanceof Error ? e.message : m("devportal.verificationRequestFailed", "Verification request failed"));
1223
1258
  } finally {
1224
- Oe(!1);
1259
+ De(!1);
1225
1260
  }
1226
1261
  })(),
1227
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",
1228
- children: [De ? /* @__PURE__ */ R(M, {
1263
+ children: [Ee ? /* @__PURE__ */ R(M, {
1229
1264
  size: 14,
1230
1265
  className: "animate-spin"
1231
- }) : /* @__PURE__ */ R(ue, { size: 14 }), h("devportal.requestVerification", "Request Verification")]
1266
+ }) : /* @__PURE__ */ R(P, { size: 14 }), m("devportal.requestVerification", "Request Verification")]
1232
1267
  })
1233
1268
  ] })
1234
1269
  ] })
@@ -1238,6 +1273,6 @@ var J = {
1238
1273
  });
1239
1274
  };
1240
1275
  //#endregion
1241
- export { Y as OrganizationDetailPage };
1276
+ export { J as OrganizationDetailPage };
1242
1277
 
1243
1278
  //# sourceMappingURL=OrganizationDetailPage.js.map