@burdenoff/microfe-store 2026.1014.1 → 2026.1028.1

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.
@@ -3,18 +3,19 @@ import { useCart as t } from "../hooks/useCart.js";
3
3
  import { formatNumber as n, formatPrice as r } from "../utils/index.js";
4
4
  import { useCreateReview as i, useDeleteReview as ee, useMarkReviewHelpful as te, useStoreProductDetails as ne, useUpdateReview as re } from "../hooks/useStoreGraphQL.js";
5
5
  import { Markdown as ie } from "../node_modules/react-markdown/lib/index.js";
6
- import { useTr as a } from "../shared/hooks/useTr.js";
7
- import { InstallAppModal as ae } from "../components/InstallAppModal.js";
8
- import { useInstallations as oe } from "../hooks/useInstallations.js";
9
- import { nativeConfirm as se, nativeImpact as ce, nativeNotify as le } from "../utils/nativeBridge.js";
10
- import { useCallback as o, useEffect as ue, useMemo as de, useRef as fe, useState as s } from "react";
11
- import { useLocation as pe, useNavigate as me, useParams as he } from "react-router";
12
- import { AlertCircle as c, ArrowLeft as ge, Check as _e, Loader2 as ve, Package as l, ShieldCheck as u, ShoppingCart as ye, Star as d, ThumbsUp as f } from "lucide-react";
13
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
14
- import { EmphasisPanel as be, GlassCard as g, IllustratedEmptyState as xe, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
15
- import { useEventBus as we } from "@burdenoff/fe-libs/shared/events";
6
+ import { useTr as ae } from "../shared/hooks/useTr.js";
7
+ import { InstallAppModal as oe } from "../components/InstallAppModal.js";
8
+ import { useInstallations as se } from "../hooks/useInstallations.js";
9
+ import { getExternalListing as ce, isSoldExternally as le } from "../utils/externalListing.js";
10
+ import { nativeConfirm as ue, nativeImpact as de, nativeNotify as fe } from "../utils/nativeBridge.js";
11
+ import { useCallback as a, useEffect as pe, useMemo as me, useRef as he, useState as o } from "react";
12
+ import { useLocation as ge, useNavigate as _e, useParams as ve } from "react-router";
13
+ import { AlertCircle as s, ArrowLeft as ye, Check as be, ExternalLink as xe, Loader2 as Se, Package as c, ShieldCheck as l, ShoppingCart as Ce, Star as u, ThumbsUp as d } from "lucide-react";
14
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
15
+ import { EmphasisPanel as we, GlassCard as h, IllustratedEmptyState as Te, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
16
+ import { useEventBus as Oe } from "@burdenoff/fe-libs/shared/events";
16
17
  //#region src/pages/ProductDetailPage.tsx
17
- var Te = (e, t, n) => ({
18
+ var ke = (e, t, n) => ({
18
19
  id: e.id,
19
20
  publisherId: t?.id || "",
20
21
  publisher: {
@@ -89,43 +90,43 @@ var Te = (e, t, n) => ({
89
90
  createdAt: e.createdAt,
90
91
  updatedAt: e.updatedAt,
91
92
  publishedAt: e.publishedAt
92
- }), Ee = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ h("div", {
93
+ }), Ae = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ m("div", {
93
94
  className: "flex items-center gap-2",
94
95
  children: [
95
- /* @__PURE__ */ m("span", {
96
+ /* @__PURE__ */ p("span", {
96
97
  className: "w-3 text-xs text-text-muted",
97
98
  children: e
98
99
  }),
99
- /* @__PURE__ */ m("div", {
100
+ /* @__PURE__ */ p("div", {
100
101
  className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
101
- children: /* @__PURE__ */ m("div", {
102
+ children: /* @__PURE__ */ p("div", {
102
103
  className: "h-full rounded-full bg-status-warning-bg-subtle",
103
104
  style: { width: `${t}%` }
104
105
  })
105
106
  }),
106
- /* @__PURE__ */ m("span", {
107
+ /* @__PURE__ */ p("span", {
107
108
  className: "w-12 text-right text-xs text-text-muted",
108
109
  children: n(r)
109
110
  })
110
111
  ]
111
- }), De = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => {
112
- let r = a();
113
- return /* @__PURE__ */ h("div", {
112
+ }), je = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => {
113
+ let r = ae();
114
+ return /* @__PURE__ */ m("div", {
114
115
  className: "rounded-lg border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
115
116
  children: [
116
- /* @__PURE__ */ m("div", {
117
+ /* @__PURE__ */ p("div", {
117
118
  className: "mb-3 flex items-start justify-between",
118
- children: /* @__PURE__ */ h("div", {
119
+ children: /* @__PURE__ */ m("div", {
119
120
  className: "flex items-center gap-3",
120
- children: [/* @__PURE__ */ m("div", {
121
+ children: [/* @__PURE__ */ p("div", {
121
122
  className: "flex size-10 items-center justify-center rounded-full bg-bg-sunken text-text-muted",
122
- children: /* @__PURE__ */ m(d, { className: "size-4 fill-current" })
123
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
123
+ children: /* @__PURE__ */ p(u, { className: "size-4 fill-current" })
124
+ }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
124
125
  className: "font-medium text-text-primary",
125
126
  children: r("pages.productDetail.verifiedBuyer", "Verified Buyer")
126
- }), /* @__PURE__ */ h("div", {
127
+ }), /* @__PURE__ */ m("div", {
127
128
  className: "flex items-center gap-2",
128
- children: [/* @__PURE__ */ m("div", {
129
+ children: [/* @__PURE__ */ p("div", {
129
130
  className: "flex gap-0.5",
130
131
  children: [
131
132
  1,
@@ -133,8 +134,8 @@ var Te = (e, t, n) => ({
133
134
  3,
134
135
  4,
135
136
  5
136
- ].map((t) => /* @__PURE__ */ m(d, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
137
- }), /* @__PURE__ */ m("span", {
137
+ ].map((t) => /* @__PURE__ */ p(u, { className: `size-3 ${t <= e.rating ? "fill-current text-status-warning-text" : "text-text-muted"}` }, t))
138
+ }), /* @__PURE__ */ p("span", {
138
139
  className: "text-xs text-text-muted",
139
140
  children: ((e) => {
140
141
  try {
@@ -151,148 +152,148 @@ var Te = (e, t, n) => ({
151
152
  })] })]
152
153
  })
153
154
  }),
154
- e.title && /* @__PURE__ */ m("h4", {
155
+ e.title && /* @__PURE__ */ p("h4", {
155
156
  className: "mb-2 font-medium text-text-primary",
156
157
  children: e.title
157
158
  }),
158
- e.comment && /* @__PURE__ */ m("p", {
159
+ e.comment && /* @__PURE__ */ p("p", {
159
160
  className: "mb-3 text-sm text-text-muted",
160
161
  children: e.comment
161
162
  }),
162
- /* @__PURE__ */ m("div", {
163
+ /* @__PURE__ */ p("div", {
163
164
  className: "flex items-center justify-between",
164
- children: /* @__PURE__ */ h("button", {
165
+ children: /* @__PURE__ */ m("button", {
165
166
  type: "button",
166
167
  onClick: () => t(e.id),
167
168
  disabled: n,
168
169
  "aria-label": r("pages.productDetail.markHelpful", "Mark this review as helpful"),
169
170
  className: "flex items-center gap-1 text-xs text-text-muted transition-colors hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-60",
170
- children: [/* @__PURE__ */ m(f, { className: "size-3.5" }), /* @__PURE__ */ m("span", { children: n ? r("pages.productDetail.updatingHelpful", "Updating…") : r("pages.productDetail.helpful", "Helpful ({{count}})", { count: e.helpful }) })]
171
+ children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), /* @__PURE__ */ p("span", { children: n ? r("pages.productDetail.updatingHelpful", "Updating…") : r("pages.productDetail.helpful", "Helpful ({{count}})", { count: e.helpful }) })]
171
172
  })
172
173
  })
173
174
  ]
174
175
  });
175
- }, Oe = () => /* @__PURE__ */ h("div", {
176
+ }, Me = () => /* @__PURE__ */ m("div", {
176
177
  className: "h-full overflow-y-auto",
177
- children: [/* @__PURE__ */ m("div", {
178
+ children: [/* @__PURE__ */ p("div", {
178
179
  className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
179
- children: /* @__PURE__ */ h("div", {
180
+ children: /* @__PURE__ */ m("div", {
180
181
  className: "flex items-center gap-4",
181
182
  children: [
182
- /* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
183
- /* @__PURE__ */ m("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
184
- /* @__PURE__ */ h("div", {
183
+ /* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }),
184
+ /* @__PURE__ */ p("div", { className: "h-6 w-48 flex-1 animate-pulse rounded bg-bg-sunken" }),
185
+ /* @__PURE__ */ m("div", {
185
186
  className: "flex gap-2",
186
- children: [/* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
187
+ children: [/* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-10 animate-pulse rounded-lg bg-bg-sunken" })]
187
188
  })
188
189
  ]
189
190
  })
190
- }), /* @__PURE__ */ h("div", {
191
+ }), /* @__PURE__ */ m("div", {
191
192
  className: "mx-auto max-w-6xl p-6",
192
193
  children: [
193
- /* @__PURE__ */ h("div", {
194
+ /* @__PURE__ */ m("div", {
194
195
  className: "mb-8 flex flex-col gap-6 md:flex-row",
195
- children: [/* @__PURE__ */ h("div", {
196
+ children: [/* @__PURE__ */ m("div", {
196
197
  className: "flex gap-4 md:w-1/2",
197
- children: [/* @__PURE__ */ m("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ h("div", {
198
+ children: [/* @__PURE__ */ p("div", { className: "size-28 animate-pulse rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ m("div", {
198
199
  className: "flex flex-1 flex-col justify-center gap-2",
199
200
  children: [
200
- /* @__PURE__ */ m("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
201
- /* @__PURE__ */ h("div", {
201
+ /* @__PURE__ */ p("div", { className: "h-8 w-3/4 animate-pulse rounded bg-bg-sunken" }),
202
+ /* @__PURE__ */ m("div", {
202
203
  className: "flex items-center gap-2",
203
- children: [/* @__PURE__ */ m("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
204
+ children: [/* @__PURE__ */ p("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-4 animate-pulse rounded-full bg-bg-sunken" })]
204
205
  }),
205
- /* @__PURE__ */ h("div", {
206
+ /* @__PURE__ */ m("div", {
206
207
  className: "flex gap-3",
207
- children: [/* @__PURE__ */ m("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
208
+ children: [/* @__PURE__ */ p("div", { className: "h-5 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-5 w-24 animate-pulse rounded bg-bg-sunken" })]
208
209
  })
209
210
  ]
210
211
  })]
211
- }), /* @__PURE__ */ h("div", {
212
+ }), /* @__PURE__ */ m("div", {
212
213
  className: "flex flex-col gap-4 md:w-1/2 md:items-end",
213
- children: [/* @__PURE__ */ h("div", {
214
+ children: [/* @__PURE__ */ m("div", {
214
215
  className: "flex items-center gap-4",
215
216
  children: [
216
- /* @__PURE__ */ h("div", {
217
+ /* @__PURE__ */ m("div", {
217
218
  className: "text-center",
218
- children: [/* @__PURE__ */ m("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
219
+ children: [/* @__PURE__ */ p("div", { className: "h-10 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-20 animate-pulse rounded bg-bg-sunken" })]
219
220
  }),
220
- /* @__PURE__ */ m("div", { className: "h-12 w-px bg-border-default" }),
221
- /* @__PURE__ */ h("div", {
221
+ /* @__PURE__ */ p("div", { className: "h-12 w-px bg-border-default" }),
222
+ /* @__PURE__ */ m("div", {
222
223
  className: "text-center",
223
- children: [/* @__PURE__ */ m("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
224
+ children: [/* @__PURE__ */ p("div", { className: "h-8 w-16 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-16 animate-pulse rounded bg-bg-sunken" })]
224
225
  }),
225
- /* @__PURE__ */ m("div", { className: "h-12 w-px bg-border-default" }),
226
- /* @__PURE__ */ h("div", {
226
+ /* @__PURE__ */ p("div", { className: "h-12 w-px bg-border-default" }),
227
+ /* @__PURE__ */ m("div", {
227
228
  className: "text-center",
228
- children: [/* @__PURE__ */ m("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
229
+ children: [/* @__PURE__ */ p("div", { className: "h-8 w-20 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-12 animate-pulse rounded bg-bg-sunken" })]
229
230
  })
230
231
  ]
231
- }), /* @__PURE__ */ h("div", {
232
+ }), /* @__PURE__ */ m("div", {
232
233
  className: "flex gap-3",
233
- children: [/* @__PURE__ */ m("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
234
+ children: [/* @__PURE__ */ p("div", { className: "h-12 w-40 animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-12 animate-pulse rounded-lg bg-bg-sunken" })]
234
235
  })]
235
236
  })]
236
237
  }),
237
- /* @__PURE__ */ h("section", {
238
+ /* @__PURE__ */ m("section", {
238
239
  className: "mb-8",
239
- children: [/* @__PURE__ */ m("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", {
240
+ children: [/* @__PURE__ */ p("div", { className: "aspect-video animate-pulse rounded-lg bg-bg-sunken" }), /* @__PURE__ */ p("div", {
240
241
  className: "mt-4 flex gap-4",
241
242
  children: [...[
242
243
  ,
243
244
  ,
244
245
  ,
245
246
  ,
246
- ]].map((e, t) => /* @__PURE__ */ m("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
247
+ ]].map((e, t) => /* @__PURE__ */ p("div", { className: "h-20 w-36 animate-pulse rounded-lg bg-bg-sunken" }, t))
247
248
  })]
248
249
  }),
249
- /* @__PURE__ */ h("section", {
250
+ /* @__PURE__ */ m("section", {
250
251
  className: "mb-8",
251
- children: [/* @__PURE__ */ h("div", {
252
+ children: [/* @__PURE__ */ m("div", {
252
253
  className: "mb-4 flex items-center gap-2",
253
- children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
254
- }), /* @__PURE__ */ h("div", {
254
+ children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" })]
255
+ }), /* @__PURE__ */ m("div", {
255
256
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
256
- children: [/* @__PURE__ */ h("div", {
257
+ children: [/* @__PURE__ */ m("div", {
257
258
  className: "space-y-2",
258
259
  children: [
259
- /* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
260
- /* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
261
- /* @__PURE__ */ m("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
262
- /* @__PURE__ */ m("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
260
+ /* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
261
+ /* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }),
262
+ /* @__PURE__ */ p("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }),
263
+ /* @__PURE__ */ p("div", { className: "h-4 w-5/6 rounded bg-bg-sunken" })
263
264
  ]
264
- }), /* @__PURE__ */ m("div", {
265
+ }), /* @__PURE__ */ p("div", {
265
266
  className: "mt-4 flex gap-2",
266
267
  children: [...[
267
268
  ,
268
269
  ,
269
270
  ,
270
271
  ,
271
- ]].map((e, t) => /* @__PURE__ */ m("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
272
+ ]].map((e, t) => /* @__PURE__ */ p("div", { className: "h-6 w-16 rounded-full bg-bg-sunken" }, t))
272
273
  })]
273
274
  })]
274
275
  }),
275
- /* @__PURE__ */ h("section", {
276
+ /* @__PURE__ */ m("section", {
276
277
  className: "mb-8",
277
278
  children: [
278
- /* @__PURE__ */ h("div", {
279
+ /* @__PURE__ */ m("div", {
279
280
  className: "mb-4 flex items-center justify-between",
280
- children: [/* @__PURE__ */ h("div", {
281
+ children: [/* @__PURE__ */ m("div", {
281
282
  className: "flex items-center gap-2",
282
- children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
283
- }), /* @__PURE__ */ m("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
283
+ children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
284
+ }), /* @__PURE__ */ p("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
284
285
  }),
285
- /* @__PURE__ */ h("div", {
286
+ /* @__PURE__ */ m("div", {
286
287
  className: "mb-6 flex flex-col gap-6 md:flex-row",
287
- children: [/* @__PURE__ */ m("div", {
288
+ children: [/* @__PURE__ */ p("div", {
288
289
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4 md:w-64",
289
- children: /* @__PURE__ */ h("div", {
290
+ children: /* @__PURE__ */ m("div", {
290
291
  className: "flex items-center gap-6",
291
- children: [/* @__PURE__ */ h("div", {
292
+ children: [/* @__PURE__ */ m("div", {
292
293
  className: "text-center",
293
294
  children: [
294
- /* @__PURE__ */ m("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
295
- /* @__PURE__ */ m("div", {
295
+ /* @__PURE__ */ p("div", { className: "h-12 w-16 rounded bg-bg-sunken" }),
296
+ /* @__PURE__ */ p("div", {
296
297
  className: "my-1 flex justify-center gap-0.5",
297
298
  children: [...[
298
299
  ,
@@ -300,11 +301,11 @@ var Te = (e, t, n) => ({
300
301
  ,
301
302
  ,
302
303
  ,
303
- ]].map((e, t) => /* @__PURE__ */ m("div", { className: "size-4 rounded bg-bg-sunken" }, t))
304
+ ]].map((e, t) => /* @__PURE__ */ p("div", { className: "size-4 rounded bg-bg-sunken" }, t))
304
305
  }),
305
- /* @__PURE__ */ m("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
306
+ /* @__PURE__ */ p("div", { className: "h-3 w-20 rounded bg-bg-sunken" })
306
307
  ]
307
- }), /* @__PURE__ */ m("div", {
308
+ }), /* @__PURE__ */ p("div", {
308
309
  className: "flex-1 space-y-1",
309
310
  children: [...[
310
311
  ,
@@ -312,29 +313,29 @@ var Te = (e, t, n) => ({
312
313
  ,
313
314
  ,
314
315
  ,
315
- ]].map((e, t) => /* @__PURE__ */ h("div", {
316
+ ]].map((e, t) => /* @__PURE__ */ m("div", {
316
317
  className: "flex items-center gap-2",
317
318
  children: [
318
- /* @__PURE__ */ m("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
319
- /* @__PURE__ */ m("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
320
- /* @__PURE__ */ m("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
319
+ /* @__PURE__ */ p("div", { className: "h-2 w-3 rounded bg-bg-sunken" }),
320
+ /* @__PURE__ */ p("div", { className: "h-2 flex-1 rounded-full bg-bg-sunken" }),
321
+ /* @__PURE__ */ p("div", { className: "h-2 w-8 rounded bg-bg-sunken" })
321
322
  ]
322
323
  }, t))
323
324
  })]
324
325
  })
325
- }), /* @__PURE__ */ m("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
326
+ }), /* @__PURE__ */ p("div", { className: "h-12 w-32 animate-pulse rounded-lg bg-bg-sunken" })]
326
327
  }),
327
- /* @__PURE__ */ m("div", {
328
+ /* @__PURE__ */ p("div", {
328
329
  className: "space-y-4",
329
- children: [...[, ,]].map((e, t) => /* @__PURE__ */ h("div", {
330
+ children: [...[, ,]].map((e, t) => /* @__PURE__ */ m("div", {
330
331
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
331
- children: [/* @__PURE__ */ h("div", {
332
+ children: [/* @__PURE__ */ m("div", {
332
333
  className: "mb-3 flex items-start gap-3",
333
- children: [/* @__PURE__ */ m("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ h("div", {
334
+ children: [/* @__PURE__ */ p("div", { className: "size-10 rounded-full bg-bg-sunken" }), /* @__PURE__ */ m("div", {
334
335
  className: "flex-1",
335
- children: [/* @__PURE__ */ m("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ h("div", {
336
+ children: [/* @__PURE__ */ p("div", { className: "h-4 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", {
336
337
  className: "mt-1 flex items-center gap-2",
337
- children: [/* @__PURE__ */ m("div", {
338
+ children: [/* @__PURE__ */ p("div", {
338
339
  className: "flex gap-0.5",
339
340
  children: [...[
340
341
  ,
@@ -342,26 +343,26 @@ var Te = (e, t, n) => ({
342
343
  ,
343
344
  ,
344
345
  ,
345
- ]].map((e, t) => /* @__PURE__ */ m("div", { className: "size-3 rounded bg-bg-sunken" }, t))
346
- }), /* @__PURE__ */ m("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
346
+ ]].map((e, t) => /* @__PURE__ */ p("div", { className: "size-3 rounded bg-bg-sunken" }, t))
347
+ }), /* @__PURE__ */ p("div", { className: "h-3 w-20 rounded bg-bg-sunken" })]
347
348
  })]
348
349
  })]
349
- }), /* @__PURE__ */ h("div", {
350
+ }), /* @__PURE__ */ m("div", {
350
351
  className: "space-y-2",
351
- children: [/* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
352
+ children: [/* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
352
353
  })]
353
354
  }, t))
354
355
  })
355
356
  ]
356
357
  }),
357
- /* @__PURE__ */ h("section", {
358
+ /* @__PURE__ */ m("section", {
358
359
  className: "mb-8",
359
- children: [/* @__PURE__ */ h("div", {
360
+ children: [/* @__PURE__ */ m("div", {
360
361
  className: "mb-4 flex items-center gap-2",
361
- children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
362
- }), /* @__PURE__ */ m("div", {
362
+ children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-48 animate-pulse rounded bg-bg-sunken" })]
363
+ }), /* @__PURE__ */ p("div", {
363
364
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
364
- children: /* @__PURE__ */ m("div", {
365
+ children: /* @__PURE__ */ p("div", {
365
366
  className: "grid gap-4 md:grid-cols-2",
366
367
  children: [...[
367
368
  ,
@@ -370,37 +371,37 @@ var Te = (e, t, n) => ({
370
371
  ,
371
372
  ,
372
373
  ,
373
- ]].map((e, t) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
374
+ ]].map((e, t) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", { className: "h-3 w-16 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "mt-1 h-5 w-24 rounded bg-bg-sunken" })] }, t))
374
375
  })
375
376
  })]
376
377
  }),
377
- /* @__PURE__ */ h("section", {
378
+ /* @__PURE__ */ m("section", {
378
379
  className: "mb-8",
379
- children: [/* @__PURE__ */ h("div", {
380
+ children: [/* @__PURE__ */ m("div", {
380
381
  className: "mb-4 flex items-center justify-between",
381
- children: [/* @__PURE__ */ h("div", {
382
+ children: [/* @__PURE__ */ m("div", {
382
383
  className: "flex items-center gap-2",
383
- children: [/* @__PURE__ */ m("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
384
- }), /* @__PURE__ */ m("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
385
- }), /* @__PURE__ */ m("div", {
384
+ children: [/* @__PURE__ */ p("div", { className: "size-5 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-6 w-40 animate-pulse rounded bg-bg-sunken" })]
385
+ }), /* @__PURE__ */ p("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
386
+ }), /* @__PURE__ */ p("div", {
386
387
  className: "grid gap-4 md:grid-cols-4",
387
388
  children: [...[
388
389
  ,
389
390
  ,
390
391
  ,
391
392
  ,
392
- ]].map((e, t) => /* @__PURE__ */ m("div", {
393
+ ]].map((e, t) => /* @__PURE__ */ p("div", {
393
394
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-3",
394
- children: /* @__PURE__ */ h("div", {
395
+ children: /* @__PURE__ */ m("div", {
395
396
  className: "flex items-center gap-3",
396
- children: [/* @__PURE__ */ m("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ h("div", {
397
+ children: [/* @__PURE__ */ p("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ m("div", {
397
398
  className: "flex-1",
398
399
  children: [
399
- /* @__PURE__ */ m("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
400
- /* @__PURE__ */ m("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
401
- /* @__PURE__ */ h("div", {
400
+ /* @__PURE__ */ p("div", { className: "h-4 w-24 rounded bg-bg-sunken" }),
401
+ /* @__PURE__ */ p("div", { className: "mt-1 h-3 w-16 rounded bg-bg-sunken" }),
402
+ /* @__PURE__ */ m("div", {
402
403
  className: "mt-1 flex items-center gap-2",
403
- children: [/* @__PURE__ */ m("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
404
+ children: [/* @__PURE__ */ p("div", { className: "h-3 w-8 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-3 w-12 rounded bg-bg-sunken" })]
404
405
  })
405
406
  ]
406
407
  })]
@@ -408,48 +409,48 @@ var Te = (e, t, n) => ({
408
409
  }, t))
409
410
  })]
410
411
  }),
411
- /* @__PURE__ */ h("section", {
412
+ /* @__PURE__ */ m("section", {
412
413
  className: "mb-8",
413
- children: [/* @__PURE__ */ m("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ h("div", {
414
+ children: [/* @__PURE__ */ p("div", { className: "mb-4 h-6 w-36 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", {
414
415
  className: "animate-pulse rounded-lg border border-border-seam bg-bg-surface p-4",
415
- children: [/* @__PURE__ */ h("div", {
416
+ children: [/* @__PURE__ */ m("div", {
416
417
  className: "flex items-center gap-4",
417
- children: [/* @__PURE__ */ m("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
418
+ children: [/* @__PURE__ */ p("div", { className: "size-12 rounded-lg bg-bg-sunken" }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
418
419
  className: "flex items-center gap-2",
419
- children: [/* @__PURE__ */ m("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "size-4 rounded-full bg-bg-sunken" })]
420
- }), /* @__PURE__ */ m("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
421
- }), /* @__PURE__ */ h("div", {
420
+ children: [/* @__PURE__ */ p("div", { className: "h-5 w-32 rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "size-4 rounded-full bg-bg-sunken" })]
421
+ }), /* @__PURE__ */ p("div", { className: "mt-1 h-4 w-40 rounded bg-bg-sunken" })] })]
422
+ }), /* @__PURE__ */ m("div", {
422
423
  className: "mt-3 space-y-2",
423
- children: [/* @__PURE__ */ m("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ m("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
424
+ children: [/* @__PURE__ */ p("div", { className: "h-4 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ p("div", { className: "h-4 w-2/3 rounded bg-bg-sunken" })]
424
425
  })]
425
426
  })]
426
427
  })
427
428
  ]
428
429
  })]
429
- }), ke = ({ error: e, onRetry: t, onBack: n }) => {
430
- let r = a();
431
- return /* @__PURE__ */ m("div", {
430
+ }), Ne = ({ error: e, onRetry: t, onBack: n }) => {
431
+ let r = ae();
432
+ return /* @__PURE__ */ p("div", {
432
433
  className: "flex h-full items-center justify-center",
433
- children: /* @__PURE__ */ h("div", {
434
+ children: /* @__PURE__ */ m("div", {
434
435
  className: "text-center",
435
436
  children: [
436
- /* @__PURE__ */ m(c, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
437
- /* @__PURE__ */ m("h2", {
437
+ /* @__PURE__ */ p(s, { className: "mx-auto mb-4 size-12 text-status-error-text" }),
438
+ /* @__PURE__ */ p("h2", {
438
439
  className: "mb-2 text-xl font-semibold text-text-primary",
439
440
  children: r("pages.productDetail.errorTitle", "Failed to load product")
440
441
  }),
441
- /* @__PURE__ */ m("p", {
442
+ /* @__PURE__ */ p("p", {
442
443
  className: "mb-4 text-text-muted",
443
444
  children: e.message || r("pages.productDetail.errorDescription", "An error occurred while loading the product details.")
444
445
  }),
445
- /* @__PURE__ */ h("div", {
446
+ /* @__PURE__ */ m("div", {
446
447
  className: "flex justify-center gap-3",
447
- children: [/* @__PURE__ */ m("button", {
448
+ children: [/* @__PURE__ */ p("button", {
448
449
  type: "button",
449
450
  onClick: t,
450
451
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
451
452
  children: r("common.tryAgain", "Try Again")
452
- }), /* @__PURE__ */ m("button", {
453
+ }), /* @__PURE__ */ p("button", {
453
454
  type: "button",
454
455
  onClick: n,
455
456
  className: "rounded-lg border border-border-default px-4 py-2 text-text-primary transition-colors hover:bg-bg-sunken",
@@ -459,233 +460,235 @@ var Te = (e, t, n) => ({
459
460
  ]
460
461
  })
461
462
  });
462
- }, Ae = () => {
463
- let { productId: c } = he(), f = me(), Ae = pe(), { basePath: _, workspaceId: v } = e(), y = a(), { addProduct: je, cartItems: Me, addingToCart: Ne, createOrder: Pe, checkingOut: Fe } = t(), { installations: Ie, refetch: Le } = oe({
464
- filter: de(() => c && v ? {
465
- productId: c,
466
- workspaceId: v
467
- } : void 0, [c, v]),
463
+ }, Pe = () => {
464
+ let { productId: s } = ve(), d = _e(), Pe = ge(), { basePath: g, workspaceId: _ } = e(), v = ae(), { addProduct: Fe, cartItems: Ie, addingToCart: Le, createOrder: Re, checkingOut: ze } = t(), { installations: Be, refetch: Ve } = se({
465
+ filter: me(() => s && _ ? {
466
+ productId: s,
467
+ workspaceId: _
468
+ } : void 0, [s, _]),
468
469
  limit: 1
469
- }), Re = Ie.find((e) => e.productId === c && e.workspaceId === v && e.status === "ACTIVE"), b = !!Re, x = Re?.version ?? null, { createReview: ze, loading: Be } = i(), { updateReview: Ve, loading: He } = re(), { deleteReview: Ue, loading: We } = ee(), { markHelpful: Ge, loading: Ke } = te(), S = we(), [C, qe] = s(!1), [Je, Ye] = s(!1), [Xe, Ze] = s(!1), [w, Qe] = s(1), [$e, T] = s(null), [et, E] = s(null), [tt, D] = s("success"), [O, k] = s(!1), [A, j] = s(""), [M, N] = s(""), [P, F] = s(5), [nt, rt] = s(null), [it, at] = s(!1), { data: ot, loading: st, error: ct, refetch: I } = ne({
470
- id: c,
471
- slug: c,
470
+ }), He = Be.find((e) => e.productId === s && e.workspaceId === _ && e.status === "ACTIVE"), y = !!He, b = He?.version ?? null, { createReview: Ue, loading: We } = i(), { updateReview: Ge, loading: Ke } = re(), { deleteReview: qe, loading: Je } = ee(), { markHelpful: Ye, loading: Xe } = te(), x = Oe(), [Ze, Qe] = o(!1), [$e, et] = o(!1), [tt, nt] = o(!1), [S, rt] = o(1), [it, C] = o(null), [at, w] = o(null), [ot, T] = o("success"), [E, D] = o(!1), [O, k] = o(""), [A, j] = o(""), [M, N] = o(5), [st, ct] = o(null), [lt, ut] = o(!1), { data: dt, loading: ft, error: pt, refetch: P } = ne({
471
+ id: s,
472
+ slug: s,
472
473
  includeReviews: !0,
473
474
  reviewsLimit: 10,
474
475
  includeRelated: !0,
475
476
  relatedLimit: 4,
476
477
  includeVersions: !0
477
- }), L = ot, R = L?.product, z = L?.publisher, B = Me.some((e) => e.productId === R?.id), lt = (e) => {
478
+ }), F = dt, I = F?.product, L = F?.publisher, R = Ie.some((e) => e.productId === I?.id), mt = (e) => {
478
479
  let t = e.split(".");
479
480
  for (; t.length < 3;) t.push("0");
480
481
  return t.join(".");
481
- }, ut = R?.manifestVersion ?? null, dt = !!(b && x && ut && lt(x) !== lt(ut)), ft = o(async () => {
482
- if (R) {
483
- if (T(null), B) {
484
- f(`${_}/cart`);
482
+ }, ht = I?.manifestVersion ?? null, gt = !!(y && b && ht && mt(b) !== mt(ht)), _t = a(async () => {
483
+ if (I) {
484
+ if (C(null), R) {
485
+ d(`${g}/cart`);
485
486
  return;
486
487
  }
487
488
  try {
488
- await je(Te(R, z, y), void 0, w);
489
+ await Fe(ke(I, L, v), void 0, S);
489
490
  } catch (e) {
490
- console.error("Failed to add product to cart:", e), T(y("pages.productDetail.addToCartError", "Failed to add this product to cart. Please try again."));
491
+ console.error("Failed to add product to cart:", e), C(v("pages.productDetail.addToCartError", "Failed to add this product to cart. Please try again."));
491
492
  }
492
493
  }
493
494
  }, [
495
+ I,
496
+ L,
497
+ Fe,
494
498
  R,
495
- z,
496
- je,
497
- B,
498
- f,
499
- _,
500
- w,
501
- y
502
- ]), pt = o(async () => {
503
- if (R) {
504
- T(null), Ze(!0);
499
+ d,
500
+ g,
501
+ S,
502
+ v
503
+ ]), vt = a(async () => {
504
+ if (I) {
505
+ C(null), nt(!0);
505
506
  try {
506
- let e = R.price || 0, t = {
507
- productId: R.id,
508
- name: R.name,
509
- quantity: w,
507
+ let e = I.price || 0, t = {
508
+ productId: I.id,
509
+ name: I.name,
510
+ quantity: S,
510
511
  unitPrice: e,
511
- subtotal: e * w,
512
- itemType: R.nature?.toLowerCase() || "digital",
513
- pricingModel: R.pricingModel || "PAID_ONETIME"
514
- }, n = await Pe({
515
- total: e * w,
512
+ subtotal: e * S,
513
+ itemType: I.nature?.toLowerCase() || "digital",
514
+ pricingModel: I.pricingModel || "PAID_ONETIME"
515
+ }, n = await Re({
516
+ total: e * S,
516
517
  lineItems: [t],
517
518
  billingAccountId: ""
518
519
  });
519
- n?.id ? f(`/billing/checkout/store/${n.id}${Ae.search}`) : (console.error("Failed to create order"), T(y("pages.productDetail.createOrderError", "Failed to create order. Please try again.")), Ze(!1));
520
+ n?.id ? d(`/billing/checkout/store/${n.id}${Pe.search}`) : (console.error("Failed to create order"), C(v("pages.productDetail.createOrderError", "Failed to create order. Please try again.")), nt(!1));
520
521
  } catch (e) {
521
- console.error("Buy Now error:", e), T(e instanceof Error ? e.message : y("pages.productDetail.checkoutError", "Failed to start checkout")), Ze(!1);
522
+ console.error("Buy Now error:", e), C(e instanceof Error ? e.message : v("pages.productDetail.checkoutError", "Failed to start checkout")), nt(!1);
522
523
  }
523
524
  }
524
525
  }, [
525
- R,
526
- w,
527
- Pe,
528
- f,
529
- Ae.search,
530
- y
531
- ]), V = o(() => {
532
- R && at(!0);
533
- }, [R]), mt = fe(R);
534
- mt.current = R;
535
- let ht = fe(S);
536
- ht.current = S, ue(() => {
537
- let e = mt.current;
538
- e && ht.current.emit("store.product.viewed", {
526
+ I,
527
+ S,
528
+ Re,
529
+ d,
530
+ Pe.search,
531
+ v
532
+ ]), z = a(() => {
533
+ I && ut(!0);
534
+ }, [I]), yt = he(I);
535
+ yt.current = I;
536
+ let bt = he(x);
537
+ bt.current = x, pe(() => {
538
+ let e = yt.current;
539
+ e && bt.current.emit("store.product.viewed", {
539
540
  productId: e.id,
540
541
  productSlug: e.slug,
541
542
  productType: e.type,
542
543
  pricingModel: e.pricingModel
543
544
  });
544
- }, [R?.id]);
545
- let gt = o((e, t) => {
546
- R && (S.emit("store.product.installed", {
547
- productId: R.id,
545
+ }, [I?.id]);
546
+ let xt = a((e, t) => {
547
+ I && (x.emit("store.product.installed", {
548
+ productId: I.id,
548
549
  workspaceId: e
549
- }), console.log(`Successfully installed ${R.name} to workspace ${t} (${e})`), Le());
550
+ }), console.log(`Successfully installed ${I.name} to workspace ${t} (${e})`), Ve());
550
551
  }, [
551
- R,
552
- S,
553
- Le
554
- ]), _t = o((e) => {
552
+ I,
553
+ x,
554
+ Ve
555
+ ]), St = a((e) => {
555
556
  console.error("Installation failed:", e.message);
556
- }, []), vt = o(() => {
557
- j(L?.userReview?.title ?? ""), N(L?.userReview?.comment ?? ""), F(L?.userReview?.rating ?? 5), E(null), D("success"), k(!0);
558
- }, [L?.userReview]), yt = o(async () => {
559
- if (!R) return;
560
- if (P < 1 || P > 5) {
561
- D("error"), E(y("pages.productDetail.ratingRequired", "Choose a rating from 1 to 5 stars."));
557
+ }, []), Ct = a(() => {
558
+ k(F?.userReview?.title ?? ""), j(F?.userReview?.comment ?? ""), N(F?.userReview?.rating ?? 5), w(null), T("success"), D(!0);
559
+ }, [F?.userReview]), wt = a(async () => {
560
+ if (!I) return;
561
+ if (M < 1 || M > 5) {
562
+ T("error"), w(v("pages.productDetail.ratingRequired", "Choose a rating from 1 to 5 stars."));
562
563
  return;
563
564
  }
564
565
  let e = {
565
- productId: R.id,
566
- rating: P,
567
- title: A.trim() || void 0,
568
- comment: M.trim() || void 0
569
- }, t = L?.userReview ? {
570
- data: await Ve(L.userReview.id, {
566
+ productId: I.id,
567
+ rating: M,
568
+ title: O.trim() || void 0,
569
+ comment: A.trim() || void 0
570
+ }, t = F?.userReview ? {
571
+ data: await Ge(F.userReview.id, {
571
572
  rating: e.rating,
572
573
  title: e.title,
573
574
  comment: e.comment
574
575
  }),
575
576
  errorMessage: null
576
- } : await ze(e);
577
+ } : await Ue(e);
577
578
  if (!t?.data) {
578
- D("error"), E(t?.errorMessage ?? y("pages.productDetail.reviewSaveError", "We could not save your review. Please try again."));
579
+ T("error"), w(t?.errorMessage ?? v("pages.productDetail.reviewSaveError", "We could not save your review. Please try again."));
579
580
  return;
580
581
  }
581
- D("success"), E(L?.userReview ? y("pages.productDetail.reviewUpdated", "Your review was updated.") : y("pages.productDetail.reviewSubmitted", "Your review was submitted.")), k(!1), S.emit("store.review.submitted", {
582
- productId: R.id,
583
- rating: P
584
- }), await I();
582
+ T("success"), w(F?.userReview ? v("pages.productDetail.reviewUpdated", "Your review was updated.") : v("pages.productDetail.reviewSubmitted", "Your review was submitted.")), D(!1), x.emit("store.review.submitted", {
583
+ productId: I.id,
584
+ rating: M
585
+ }), await P();
585
586
  }, [
586
- S,
587
- ze,
588
- R,
589
- L?.userReview,
587
+ x,
588
+ Ue,
590
589
  I,
591
- M,
590
+ F?.userReview,
592
591
  P,
593
592
  A,
594
- Ve,
595
- y
596
- ]), bt = o(async () => {
597
- if (L?.userReview && (ce("medium"), await se({
598
- title: y("pages.productDetail.deleteReviewTitle", "Delete review"),
599
- message: y("pages.productDetail.deleteReviewMessage", "Are you sure you want to remove your review?"),
600
- okButtonTitle: y("common.delete", "Delete"),
601
- cancelButtonTitle: y("common.cancel", "Cancel")
593
+ M,
594
+ O,
595
+ Ge,
596
+ v
597
+ ]), Tt = a(async () => {
598
+ if (F?.userReview && (de("medium"), await ue({
599
+ title: v("pages.productDetail.deleteReviewTitle", "Delete review"),
600
+ message: v("pages.productDetail.deleteReviewMessage", "Are you sure you want to remove your review?"),
601
+ okButtonTitle: v("common.delete", "Delete"),
602
+ cancelButtonTitle: v("common.cancel", "Cancel")
602
603
  }) !== !1)) {
603
- if (!await Ue(L.userReview.id)) {
604
- D("error"), E(y("pages.productDetail.reviewDeleteError", "We could not remove your review. Please try again.")), le("error");
604
+ if (!await qe(F.userReview.id)) {
605
+ T("error"), w(v("pages.productDetail.reviewDeleteError", "We could not remove your review. Please try again.")), fe("error");
605
606
  return;
606
607
  }
607
- D("success"), E(y("pages.productDetail.reviewRemoved", "Your review was removed.")), k(!1), j(""), N(""), F(5), le("success"), await I();
608
+ T("success"), w(v("pages.productDetail.reviewRemoved", "Your review was removed.")), D(!1), k(""), j(""), N(5), fe("success"), await P();
608
609
  }
609
610
  }, [
610
- Ue,
611
- L?.userReview,
612
- I,
613
- y
614
- ]), xt = o(async (e) => {
615
- rt(e), await Ge(e) && await I(), rt(null);
616
- }, [Ge, I]);
617
- if (st) return /* @__PURE__ */ m(Oe, {});
618
- if (ct) return /* @__PURE__ */ m(ke, {
619
- error: ct,
620
- onRetry: I,
621
- onBack: () => f(`${_}/marketplace`)
611
+ qe,
612
+ F?.userReview,
613
+ P,
614
+ v
615
+ ]), Et = a(async (e) => {
616
+ ct(e), await Ye(e) && await P(), ct(null);
617
+ }, [Ye, P]);
618
+ if (ft) return /* @__PURE__ */ p(Me, {});
619
+ if (pt) return /* @__PURE__ */ p(Ne, {
620
+ error: pt,
621
+ onRetry: P,
622
+ onBack: () => d(`${g}/marketplace`)
622
623
  });
623
- if (!L?.product) return /* @__PURE__ */ m("div", {
624
+ if (!F?.product) return /* @__PURE__ */ p("div", {
624
625
  className: "flex h-full items-center justify-center p-6",
625
- children: /* @__PURE__ */ m(xe, {
626
+ children: /* @__PURE__ */ p(Te, {
626
627
  illustration: "empty-search",
627
- title: y("pages.productDetail.notFoundTitle", "Product not found"),
628
- description: y("pages.productDetail.notFoundDetail", "The product you are looking for does not exist or has been removed."),
629
- action: /* @__PURE__ */ m("button", {
628
+ title: v("pages.productDetail.notFoundTitle", "Product not found"),
629
+ description: v("pages.productDetail.notFoundDetail", "The product you are looking for does not exist or has been removed."),
630
+ action: /* @__PURE__ */ p("button", {
630
631
  type: "button",
631
- onClick: () => f(`${_}/marketplace`),
632
+ onClick: () => d(`${g}/marketplace`),
632
633
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-action-primary-text transition-opacity hover:opacity-90",
633
- children: y("pages.productDetail.backToMarketplace", "Back to Marketplace")
634
+ children: v("pages.productDetail.backToMarketplace", "Back to Marketplace")
634
635
  })
635
636
  })
636
637
  });
637
- let { reviews: H, reviewsCount: St, relatedProducts: Ct, ratingDistribution: U, isPurchased: W, userEntitlement: G } = L, K = R, q = U ? U.fiveStars + U.fourStars + U.threeStars + U.twoStars + U.oneStar : 0, wt = U ? [
638
+ let { reviews: B, reviewsCount: Dt, relatedProducts: Ot, ratingDistribution: V, isPurchased: H, userEntitlement: U } = F, W = I, G = V ? V.fiveStars + V.fourStars + V.threeStars + V.twoStars + V.oneStar : 0, kt = V ? [
638
639
  {
639
640
  stars: 5,
640
- count: U.fiveStars,
641
- percentage: q > 0 ? U.fiveStars / q * 100 : 0
641
+ count: V.fiveStars,
642
+ percentage: G > 0 ? V.fiveStars / G * 100 : 0
642
643
  },
643
644
  {
644
645
  stars: 4,
645
- count: U.fourStars,
646
- percentage: q > 0 ? U.fourStars / q * 100 : 0
646
+ count: V.fourStars,
647
+ percentage: G > 0 ? V.fourStars / G * 100 : 0
647
648
  },
648
649
  {
649
650
  stars: 3,
650
- count: U.threeStars,
651
- percentage: q > 0 ? U.threeStars / q * 100 : 0
651
+ count: V.threeStars,
652
+ percentage: G > 0 ? V.threeStars / G * 100 : 0
652
653
  },
653
654
  {
654
655
  stars: 2,
655
- count: U.twoStars,
656
- percentage: q > 0 ? U.twoStars / q * 100 : 0
656
+ count: V.twoStars,
657
+ percentage: G > 0 ? V.twoStars / G * 100 : 0
657
658
  },
658
659
  {
659
660
  stars: 1,
660
- count: U.oneStar,
661
- percentage: q > 0 ? U.oneStar / q * 100 : 0
661
+ count: V.oneStar,
662
+ percentage: G > 0 ? V.oneStar / G * 100 : 0
662
663
  }
663
- ] : [], J = K.requiredPermissions || [], Tt = K.integrationDeps || [], Et = () => K.pricingModel === "FREE" ? y("pages.marketplace.free", "Free") : K.pricingModel === "SUBSCRIPTION" ? y("pages.productDetail.subscriptionPrice", "{{price}}/mo", { price: r(K.price, K.currency) }) : r(K.price, K.currency), Y = K.pricingModel === "FREE" || K.price === 0, X = K.nature === "PHYSICAL", Z = X && K.trackInventory === !0, Q = K.stockQuantity ?? 0, $ = Z && Q <= 0;
664
- return /* @__PURE__ */ h("div", {
664
+ ] : [], K = W.requiredPermissions || [], At = W.integrationDeps || [], jt = () => W.pricingModel === "FREE" ? v("pages.marketplace.free", "Free") : W.pricingModel === "SUBSCRIPTION" ? v("pages.productDetail.subscriptionPrice", "{{price}}/mo", { price: r(W.price, W.currency) }) : r(W.price, W.currency), q = W.pricingModel === "FREE" || W.price === 0, J = W.nature === "PHYSICAL", Y = J && W.trackInventory === !0, X = W.stockQuantity ?? 0, Z = Y && X <= 0, Q = le(W), $ = ce(W), Mt = $ !== null && new URL($.url).origin === window.location.origin, Nt = () => {
665
+ $ && (Mt ? window.location.assign($.url) : window.open($.url, "_blank", "noopener,noreferrer"));
666
+ };
667
+ return /* @__PURE__ */ m("div", {
665
668
  className: "h-full overflow-y-auto bg-bg-base",
666
669
  children: [
667
- /* @__PURE__ */ m("div", {
670
+ /* @__PURE__ */ p("div", {
668
671
  className: "bg-bg-surface",
669
- children: /* @__PURE__ */ m("div", {
672
+ children: /* @__PURE__ */ p("div", {
670
673
  className: "mx-auto max-w-7xl",
671
- children: /* @__PURE__ */ h("div", {
674
+ children: /* @__PURE__ */ m("div", {
672
675
  className: "flex flex-col lg:flex-row",
673
- children: [/* @__PURE__ */ h("div", {
676
+ children: [/* @__PURE__ */ m("div", {
674
677
  className: "flex-1 px-6 py-8 lg:max-w-xl lg:py-12",
675
678
  children: [
676
- /* @__PURE__ */ h("button", {
679
+ /* @__PURE__ */ m("button", {
677
680
  type: "button",
678
- onClick: () => f(-1),
681
+ onClick: () => d(-1),
679
682
  className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
680
- children: [/* @__PURE__ */ m(ge, { className: "size-4" }), y("common.back", "Back")]
683
+ children: [/* @__PURE__ */ p(ye, { className: "size-4" }), v("common.back", "Back")]
681
684
  }),
682
- /* @__PURE__ */ m("h1", {
685
+ /* @__PURE__ */ p("h1", {
683
686
  className: "mb-3 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
684
- children: K.name
687
+ children: W.name
685
688
  }),
686
- b && /* @__PURE__ */ h("div", {
689
+ y && /* @__PURE__ */ m("div", {
687
690
  className: "mb-4 inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
688
- children: [/* @__PURE__ */ m("svg", {
691
+ children: [/* @__PURE__ */ p("svg", {
689
692
  className: "size-3.5",
690
693
  viewBox: "0 0 16 16",
691
694
  fill: "none",
@@ -694,144 +697,144 @@ var Te = (e, t, n) => ({
694
697
  strokeLinecap: "round",
695
698
  strokeLinejoin: "round",
696
699
  "aria-hidden": "true",
697
- children: /* @__PURE__ */ m("polyline", { points: "2,8 6,12 14,4" })
698
- }), x ? y("pages.productDetail.installedVersion", "Installed v{{version}}", { version: x }) : y("pages.productDetail.installed", "Installed")]
700
+ children: /* @__PURE__ */ p("polyline", { points: "2,8 6,12 14,4" })
701
+ }), b ? v("pages.productDetail.installedVersion", "Installed v{{version}}", { version: b }) : v("pages.productDetail.installed", "Installed")]
699
702
  }),
700
- /* @__PURE__ */ m("div", {
703
+ /* @__PURE__ */ p("div", {
701
704
  className: "mb-2",
702
705
  children: (() => {
703
- let e = z?.developerOrganization, t = e?.name || z?.name || K.authorName || y("common.unknownPublisher", "Unknown Publisher"), n = e?.logoUrl || z?.logoUrl, r = e?.isVerified || z?.isVerified, i = z?.websiteUrl;
704
- return /* @__PURE__ */ h("div", {
706
+ let e = L?.developerOrganization, t = e?.name || L?.name || W.authorName || v("common.unknownPublisher", "Unknown Publisher"), n = e?.logoUrl || L?.logoUrl, r = e?.isVerified || L?.isVerified, i = L?.websiteUrl;
707
+ return /* @__PURE__ */ m("div", {
705
708
  className: "flex items-center gap-2",
706
709
  children: [
707
- n && /* @__PURE__ */ m("img", {
710
+ n && /* @__PURE__ */ p("img", {
708
711
  src: n,
709
712
  alt: t,
710
713
  className: "size-5 rounded object-cover"
711
714
  }),
712
- i ? /* @__PURE__ */ m("a", {
715
+ i ? /* @__PURE__ */ p("a", {
713
716
  href: i,
714
717
  target: "_blank",
715
718
  rel: "noreferrer",
716
719
  className: "text-base font-medium text-text-link hover:underline",
717
720
  children: t
718
- }) : /* @__PURE__ */ m("span", {
721
+ }) : /* @__PURE__ */ p("span", {
719
722
  className: "text-base font-medium text-text-primary",
720
723
  children: t
721
724
  }),
722
- r && /* @__PURE__ */ m(u, { className: "size-4 text-status-success-text" })
725
+ r && /* @__PURE__ */ p(l, { className: "size-4 text-status-success-text" })
723
726
  ]
724
727
  });
725
728
  })()
726
729
  }),
727
- /* @__PURE__ */ h("p", {
730
+ /* @__PURE__ */ m("p", {
728
731
  className: "mb-6 text-sm text-text-muted",
729
732
  children: [
730
- K.category && /* @__PURE__ */ m("span", { children: K.category }),
731
- K.category && " · ",
732
- X ? y("pages.productDetail.purchasesCount", "{{count}}+ purchases", { count: n(K.purchaseCount) }) : y("pages.productDetail.downloadsCount", "{{count}}+ downloads", { count: n(K.downloads) })
733
+ W.category && /* @__PURE__ */ p("span", { children: W.category }),
734
+ W.category && " · ",
735
+ J ? v("pages.productDetail.purchasesCount", "{{count}}+ purchases", { count: n(W.purchaseCount) }) : v("pages.productDetail.downloadsCount", "{{count}}+ downloads", { count: n(W.downloads) })
733
736
  ]
734
737
  }),
735
- /* @__PURE__ */ h(be, {
738
+ /* @__PURE__ */ m(we, {
736
739
  className: "mb-6 p-5",
737
740
  children: [
738
- /* @__PURE__ */ h("div", {
741
+ /* @__PURE__ */ m("div", {
739
742
  className: "mb-6 flex items-center gap-4",
740
743
  children: [
741
- /* @__PURE__ */ m("div", {
744
+ /* @__PURE__ */ p("div", {
742
745
  className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
743
- children: K.icon ? /* @__PURE__ */ m("img", {
744
- src: K.icon,
746
+ children: W.icon ? /* @__PURE__ */ p("img", {
747
+ src: W.icon,
745
748
  alt: "",
746
749
  className: "size-full object-cover"
747
- }) : /* @__PURE__ */ m("span", {
750
+ }) : /* @__PURE__ */ p("span", {
748
751
  className: "text-lg font-bold text-text-muted",
749
- children: K.name.charAt(0)
752
+ children: W.name.charAt(0)
750
753
  })
751
754
  }),
752
- /* @__PURE__ */ h("div", {
755
+ /* @__PURE__ */ m("div", {
753
756
  className: "flex items-center gap-1 border-l border-border-default pl-4",
754
757
  children: [
755
- /* @__PURE__ */ m("span", {
758
+ /* @__PURE__ */ p("span", {
756
759
  className: "text-sm font-medium text-text-primary",
757
- children: (K.rating || 0).toFixed(1)
760
+ children: (W.rating || 0).toFixed(1)
758
761
  }),
759
- /* @__PURE__ */ m(d, { className: "size-4 fill-current text-status-warning-text" }),
760
- /* @__PURE__ */ m("span", {
762
+ /* @__PURE__ */ p(u, { className: "size-4 fill-current text-status-warning-text" }),
763
+ /* @__PURE__ */ p("span", {
761
764
  className: "ml-1 text-xs text-text-muted",
762
- children: y("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(St || K.reviewCount) })
765
+ children: v("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(Dt || W.reviewCount) })
763
766
  })
764
767
  ]
765
768
  }),
766
- X ? /* @__PURE__ */ h("div", {
769
+ J ? /* @__PURE__ */ m("div", {
767
770
  className: "border-l border-border-default pl-4",
768
- children: [/* @__PURE__ */ h("span", {
771
+ children: [/* @__PURE__ */ m("span", {
769
772
  className: "text-sm font-medium text-text-primary",
770
- children: [n(K.purchaseCount), "+"]
771
- }), /* @__PURE__ */ m("p", {
773
+ children: [n(W.purchaseCount), "+"]
774
+ }), /* @__PURE__ */ p("p", {
772
775
  className: "text-xs text-text-muted",
773
- children: y("pages.productDetail.purchasesLabel", "Purchases")
776
+ children: v("pages.productDetail.purchasesLabel", "Purchases")
774
777
  })]
775
- }) : /* @__PURE__ */ h("div", {
778
+ }) : /* @__PURE__ */ m("div", {
776
779
  className: "border-l border-border-default pl-4",
777
- children: [/* @__PURE__ */ h("span", {
780
+ children: [/* @__PURE__ */ m("span", {
778
781
  className: "text-sm font-medium text-text-primary",
779
- children: [n(K.downloads), "+"]
780
- }), /* @__PURE__ */ m("p", {
782
+ children: [n(W.downloads), "+"]
783
+ }), /* @__PURE__ */ p("p", {
781
784
  className: "text-xs text-text-muted",
782
- children: y("pages.productDetail.downloadsLabel", "Downloads")
785
+ children: v("pages.productDetail.downloadsLabel", "Downloads")
783
786
  })]
784
787
  }),
785
- /* @__PURE__ */ h("div", {
788
+ /* @__PURE__ */ m("div", {
786
789
  className: "border-l border-border-default pl-4",
787
- children: [/* @__PURE__ */ m("span", {
790
+ children: [/* @__PURE__ */ p("span", {
788
791
  className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
789
- children: K.type
790
- }), /* @__PURE__ */ m("p", {
792
+ children: W.type
793
+ }), /* @__PURE__ */ p("p", {
791
794
  className: "mt-0.5 text-xs text-text-muted",
792
- children: y("pages.productDetail.typeLabel", "Type")
795
+ children: v("pages.productDetail.typeLabel", "Type")
793
796
  })]
794
797
  })
795
798
  ]
796
799
  }),
797
- $e && /* @__PURE__ */ m("div", {
800
+ it && /* @__PURE__ */ p("div", {
798
801
  role: "alert",
799
802
  className: "mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
800
- children: $e
803
+ children: it
801
804
  }),
802
- X && /* @__PURE__ */ h("div", {
805
+ J && !Q && /* @__PURE__ */ m("div", {
803
806
  className: "mb-4 flex flex-wrap items-center gap-4",
804
- children: [Z && ($ ? /* @__PURE__ */ h("span", {
807
+ children: [Y && (Z ? /* @__PURE__ */ m("span", {
805
808
  className: "inline-flex items-center gap-1.5 rounded-full bg-status-error-bg-subtle px-3 py-1 text-sm font-medium text-status-error-text",
806
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.outOfStock", "Out of stock")]
807
- }) : /* @__PURE__ */ h("span", {
809
+ children: [/* @__PURE__ */ p(c, { className: "size-4" }), v("pages.productDetail.outOfStock", "Out of stock")]
810
+ }) : /* @__PURE__ */ m("span", {
808
811
  className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle px-3 py-1 text-sm font-medium text-status-success-text",
809
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.inStock", "{{count}} in stock", { count: n(Q) })]
810
- })), !$ && /* @__PURE__ */ h("div", {
812
+ children: [/* @__PURE__ */ p(c, { className: "size-4" }), v("pages.productDetail.inStock", "{{count}} in stock", { count: n(X) })]
813
+ })), !Z && /* @__PURE__ */ m("div", {
811
814
  className: "flex items-center gap-2",
812
- children: [/* @__PURE__ */ m("span", {
815
+ children: [/* @__PURE__ */ p("span", {
813
816
  className: "text-sm text-text-muted",
814
- children: y("pages.productDetail.quantity", "Qty")
815
- }), /* @__PURE__ */ h("div", {
817
+ children: v("pages.productDetail.quantity", "Qty")
818
+ }), /* @__PURE__ */ m("div", {
816
819
  className: "flex items-center rounded-full border border-border-default",
817
820
  children: [
818
- /* @__PURE__ */ m("button", {
821
+ /* @__PURE__ */ p("button", {
819
822
  type: "button",
820
- onClick: () => Qe((e) => Math.max(1, e - 1)),
821
- disabled: w <= 1,
822
- "aria-label": y("pages.productDetail.decreaseQuantity", "Decrease quantity"),
823
+ onClick: () => rt((e) => Math.max(1, e - 1)),
824
+ disabled: S <= 1,
825
+ "aria-label": v("pages.productDetail.decreaseQuantity", "Decrease quantity"),
823
826
  className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
824
827
  children: "−"
825
828
  }),
826
- /* @__PURE__ */ m("span", {
829
+ /* @__PURE__ */ p("span", {
827
830
  className: "min-w-8 px-2 text-center text-sm font-medium tabular-nums text-text-primary",
828
- children: w
831
+ children: S
829
832
  }),
830
- /* @__PURE__ */ m("button", {
833
+ /* @__PURE__ */ p("button", {
831
834
  type: "button",
832
- onClick: () => Qe((e) => Z ? Math.min(Q, e + 1) : e + 1),
833
- disabled: Z && w >= Q,
834
- "aria-label": y("pages.productDetail.increaseQuantity", "Increase quantity"),
835
+ onClick: () => rt((e) => Y ? Math.min(X, e + 1) : e + 1),
836
+ disabled: Y && S >= X,
837
+ "aria-label": v("pages.productDetail.increaseQuantity", "Increase quantity"),
835
838
  className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
836
839
  children: "+"
837
840
  })
@@ -839,13 +842,28 @@ var Te = (e, t, n) => ({
839
842
  })]
840
843
  })]
841
844
  }),
842
- /* @__PURE__ */ h("div", {
845
+ /* @__PURE__ */ m("div", {
843
846
  className: "mb-6 flex items-center gap-3",
844
- children: [b ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("button", {
847
+ children: [Q ? $ ? /* @__PURE__ */ m("a", {
848
+ href: $.url,
849
+ ...Mt ? {} : {
850
+ target: "_blank",
851
+ rel: "noopener noreferrer"
852
+ },
853
+ "data-testid": "store-view-external-listing",
854
+ className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
855
+ children: [/* @__PURE__ */ p(xe, {
856
+ className: "size-4",
857
+ "aria-hidden": "true"
858
+ }), v("pages.productDetail.viewOnProduct", "View on {{product}}", { product: $.productName })]
859
+ }) : /* @__PURE__ */ p("p", {
860
+ className: "text-sm text-text-muted",
861
+ children: v("pages.productDetail.soldElsewhereUnavailable", "This item is sold outside the store and is not available right now.")
862
+ }) : y ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
845
863
  type: "button",
846
864
  disabled: !0,
847
865
  className: "flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default",
848
- children: [/* @__PURE__ */ m("svg", {
866
+ children: [/* @__PURE__ */ p("svg", {
849
867
  className: "size-4",
850
868
  viewBox: "0 0 16 16",
851
869
  fill: "none",
@@ -854,93 +872,96 @@ var Te = (e, t, n) => ({
854
872
  strokeLinecap: "round",
855
873
  strokeLinejoin: "round",
856
874
  "aria-hidden": "true",
857
- children: /* @__PURE__ */ m("polyline", { points: "2,8 6,12 14,4" })
858
- }), y("pages.productDetail.installed", "Installed")]
859
- }), dt && /* @__PURE__ */ m("button", {
875
+ children: /* @__PURE__ */ p("polyline", { points: "2,8 6,12 14,4" })
876
+ }), v("pages.productDetail.installed", "Installed")]
877
+ }), gt && /* @__PURE__ */ p("button", {
860
878
  type: "button",
861
- onClick: V,
879
+ onClick: z,
862
880
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
863
- children: y("pages.productDetail.updateToVersion", "Update to v{{version}}", { version: K.manifestVersion ?? "" })
864
- })] }) : !X && W && !Y ? /* @__PURE__ */ m("button", {
881
+ children: v("pages.productDetail.updateToVersion", "Update to v{{version}}", { version: W.manifestVersion ?? "" })
882
+ })] }) : !J && H && !q ? /* @__PURE__ */ p("button", {
865
883
  type: "button",
866
- onClick: V,
884
+ onClick: z,
867
885
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
868
- children: y("pages.productDetail.installToWorkspace", "Install to Workspace")
869
- }) : !X && Y ? /* @__PURE__ */ m("button", {
886
+ children: v("pages.productDetail.installToWorkspace", "Install to Workspace")
887
+ }) : !J && q ? /* @__PURE__ */ p("button", {
870
888
  type: "button",
871
- onClick: V,
889
+ onClick: z,
872
890
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
873
- children: y("pages.productDetail.install", "Install")
874
- }) : /* @__PURE__ */ m("button", {
891
+ children: v("pages.productDetail.install", "Install")
892
+ }) : /* @__PURE__ */ p("button", {
875
893
  type: "button",
876
- onClick: pt,
877
- disabled: Xe || Fe || $,
894
+ onClick: vt,
895
+ disabled: tt || ze || Z,
878
896
  className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70",
879
- children: Xe || Fe ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ve, { className: "size-4 animate-spin" }), y("pages.productDetail.processing", "Processing…")] }) : $ ? y("pages.productDetail.outOfStock", "Out of stock") : y("pages.productDetail.buyNow", "Buy {{price}}", { price: Et() })
880
- }), !Y && (!W || X) && /* @__PURE__ */ h("button", {
897
+ children: tt || ze ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Se, { className: "size-4 animate-spin" }), v("pages.productDetail.processing", "Processing…")] }) : Z ? v("pages.productDetail.outOfStock", "Out of stock") : v("pages.productDetail.buyNow", "Buy {{price}}", { price: jt() })
898
+ }), !Q && !q && (!H || J) && /* @__PURE__ */ m("button", {
881
899
  type: "button",
882
- onClick: ft,
883
- disabled: Ne || $,
900
+ onClick: _t,
901
+ disabled: Le || Z,
884
902
  className: "cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
885
- children: [Ne ? /* @__PURE__ */ m(ve, { className: "size-4 animate-spin" }) : B ? /* @__PURE__ */ m(_e, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ m(ye, { className: "size-4" }), B ? y("pages.productDetail.inCart", "In Cart") : y("pages.productDetail.addToCart", "Add to Cart")]
903
+ children: [Le ? /* @__PURE__ */ p(Se, { className: "size-4 animate-spin" }) : R ? /* @__PURE__ */ p(be, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ p(Ce, { className: "size-4" }), R ? v("pages.productDetail.inCart", "In Cart") : v("pages.productDetail.addToCart", "Add to Cart")]
886
904
  })]
887
905
  }),
888
- X ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("p", {
906
+ Q ? $ && /* @__PURE__ */ m("p", {
889
907
  className: "flex items-center gap-2 text-xs text-text-muted",
890
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), K.requiresShipping === !1 ? y("pages.productDetail.pickupAvailable", "Available for pickup — no shipping required") : y("pages.productDetail.shipsToAddress", "Ships to your delivery address")]
891
- }), !Y && /* @__PURE__ */ m("p", {
908
+ children: [/* @__PURE__ */ p(c, { className: "size-4" }), v("pages.productDetail.soldOnProductNotice", "Sold by {{product}}. Checkout, delivery and returns are handled there.", { product: $.productName })]
909
+ }) : J ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("p", {
910
+ className: "flex items-center gap-2 text-xs text-text-muted",
911
+ children: [/* @__PURE__ */ p(c, { className: "size-4" }), W.requiresShipping === !1 ? v("pages.productDetail.pickupAvailable", "Available for pickup — no shipping required") : v("pages.productDetail.shipsToAddress", "Ships to your delivery address")]
912
+ }), !q && /* @__PURE__ */ p("p", {
892
913
  className: "text-xs text-text-tertiary",
893
- children: y("pages.productDetail.sellerReturnsPolicy", "Returns and refunds are handled by {{seller}} per their store policy.", { seller: z?.name || y("pages.productDetail.theSeller", "the seller") })
894
- })] }) : /* @__PURE__ */ h(p, { children: [
895
- /* @__PURE__ */ h("p", {
914
+ children: v("pages.productDetail.sellerReturnsPolicy", "Returns and refunds are handled by {{seller}} per their store policy.", { seller: L?.name || v("pages.productDetail.theSeller", "the seller") })
915
+ })] }) : /* @__PURE__ */ m(f, { children: [
916
+ /* @__PURE__ */ m("p", {
896
917
  className: "flex items-center gap-2 text-xs text-text-muted",
897
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), y("pages.productDetail.availableForWorkspace", "This app is available for your workspace")]
918
+ children: [/* @__PURE__ */ p(c, { className: "size-4" }), v("pages.productDetail.availableForWorkspace", "This app is available for your workspace")]
898
919
  }),
899
- !Y && !W && /* @__PURE__ */ m("p", {
920
+ !q && !H && /* @__PURE__ */ p("p", {
900
921
  className: "text-xs text-text-tertiary",
901
- children: y("pages.productDetail.purchaseFinalNotice", "All purchases are final. Digital app orders cannot be cancelled or refunded once completed.")
922
+ children: v("pages.productDetail.purchaseFinalNotice", "All purchases are final. Digital app orders cannot be cancelled or refunded once completed.")
902
923
  }),
903
- G && /* @__PURE__ */ h("p", {
924
+ U && /* @__PURE__ */ m("p", {
904
925
  className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
905
926
  children: [
906
- /* @__PURE__ */ m(u, { className: "size-4 text-status-success-text" }),
907
- y("pages.productDetail.licenseStatus", "License: {{status}}", { status: G.status }),
908
- G.expiresAt && y("pages.productDetail.licenseExpires", " (Expires: {{date}})", { date: new Date(G.expiresAt).toLocaleDateString() })
927
+ /* @__PURE__ */ p(l, { className: "size-4 text-status-success-text" }),
928
+ v("pages.productDetail.licenseStatus", "License: {{status}}", { status: U.status }),
929
+ U.expiresAt && v("pages.productDetail.licenseExpires", " (Expires: {{date}})", { date: new Date(U.expiresAt).toLocaleDateString() })
909
930
  ]
910
931
  })
911
932
  ] })
912
933
  ]
913
934
  })
914
935
  ]
915
- }), /* @__PURE__ */ m("div", {
936
+ }), /* @__PURE__ */ p("div", {
916
937
  className: "relative flex-1 overflow-hidden bg-bg-sunken lg:min-h-[500px]",
917
- children: K.type === "WORKFLOW" ? /* @__PURE__ */ m("iframe", {
918
- src: `${window.location.origin}/embed/workflow?productId=${encodeURIComponent(K.id)}&cta=false&theme=${document.documentElement.classList.contains("dark") ? "dark" : "light"}`,
919
- title: `${K.name} workflow preview`,
938
+ children: W.type === "WORKFLOW" ? /* @__PURE__ */ p("iframe", {
939
+ src: `${window.location.origin}/embed/workflow?productId=${encodeURIComponent(W.id)}&cta=false&theme=${document.documentElement.classList.contains("dark") ? "dark" : "light"}`,
940
+ title: `${W.name} workflow preview`,
920
941
  loading: "lazy",
921
942
  className: "size-full min-h-[300px] border-0 lg:min-h-[500px]"
922
- }) : K.bannerUrl ? /* @__PURE__ */ m("img", {
923
- src: K.bannerUrl,
924
- alt: `${K.name} banner`,
943
+ }) : W.bannerUrl ? /* @__PURE__ */ p("img", {
944
+ src: W.bannerUrl,
945
+ alt: `${W.name} banner`,
925
946
  className: "size-full object-cover"
926
- }) : K.screenshots && K.screenshots.length > 0 ? /* @__PURE__ */ m("img", {
927
- src: K.screenshots[0],
928
- alt: `${K.name} preview`,
947
+ }) : W.screenshots && W.screenshots.length > 0 ? /* @__PURE__ */ p("img", {
948
+ src: W.screenshots[0],
949
+ alt: `${W.name} preview`,
929
950
  className: "size-full object-cover"
930
- }) : /* @__PURE__ */ h("div", {
951
+ }) : /* @__PURE__ */ m("div", {
931
952
  className: "flex h-full min-h-[300px] flex-col items-center justify-center gap-3 p-8 text-center",
932
953
  children: [
933
- /* @__PURE__ */ m("div", {
954
+ /* @__PURE__ */ p("div", {
934
955
  className: "flex size-20 items-center justify-center rounded-2xl bg-bg-surface text-3xl font-bold text-text-muted",
935
- children: K.name.charAt(0)
956
+ children: W.name.charAt(0)
936
957
  }),
937
- /* @__PURE__ */ m("p", {
958
+ /* @__PURE__ */ p("p", {
938
959
  className: "text-sm text-text-muted",
939
- children: y("pages.productDetail.noPreview", "No preview available")
960
+ children: v("pages.productDetail.noPreview", "No preview available")
940
961
  }),
941
- /* @__PURE__ */ m("p", {
962
+ /* @__PURE__ */ p("p", {
942
963
  className: "max-w-[200px] text-xs text-text-muted opacity-60",
943
- children: y("pages.productDetail.noPreviewHint", "Upload screenshots in the Store Listing tab to show a preview here")
964
+ children: v("pages.productDetail.noPreviewHint", "Upload screenshots in the Store Listing tab to show a preview here")
944
965
  })
945
966
  ]
946
967
  })
@@ -948,17 +969,17 @@ var Te = (e, t, n) => ({
948
969
  })
949
970
  })
950
971
  }),
951
- K.screenshots && K.screenshots.length > 0 && /* @__PURE__ */ m("div", {
972
+ W.screenshots && W.screenshots.length > 0 && /* @__PURE__ */ p("div", {
952
973
  className: "border-y border-border-default bg-bg-base",
953
- children: /* @__PURE__ */ h("div", {
974
+ children: /* @__PURE__ */ m("div", {
954
975
  className: "px-6 py-6",
955
- children: [/* @__PURE__ */ m("h2", {
976
+ children: [/* @__PURE__ */ p("h2", {
956
977
  className: "mb-4 text-sm font-semibold uppercase tracking-wider text-text-muted",
957
- children: y("pages.productDetail.previewTitle", "Preview")
958
- }), /* @__PURE__ */ h("div", {
978
+ children: v("pages.productDetail.previewTitle", "Preview")
979
+ }), /* @__PURE__ */ m("div", {
959
980
  className: "flex gap-4 overflow-x-auto pb-2",
960
981
  style: { scrollSnapType: "x mandatory" },
961
- children: [K.screenshots.map((e, t) => /* @__PURE__ */ m("div", {
982
+ children: [W.screenshots.map((e, t) => /* @__PURE__ */ p("div", {
962
983
  className: "relative flex-shrink-0 overflow-hidden rounded-2xl shadow-lg",
963
984
  style: {
964
985
  width: "72vw",
@@ -967,113 +988,119 @@ var Te = (e, t, n) => ({
967
988
  aspectRatio: "16/9",
968
989
  scrollSnapAlign: "start"
969
990
  },
970
- children: /* @__PURE__ */ m("img", {
991
+ children: /* @__PURE__ */ p("img", {
971
992
  src: e,
972
993
  alt: `Screenshot ${t + 1}`,
973
994
  className: "size-full object-cover"
974
995
  })
975
- }, t)), /* @__PURE__ */ m("div", { className: "flex-shrink-0 w-2" })]
996
+ }, t)), /* @__PURE__ */ p("div", { className: "flex-shrink-0 w-2" })]
976
997
  })]
977
998
  })
978
999
  }),
979
- /* @__PURE__ */ h("main", {
1000
+ /* @__PURE__ */ m("main", {
980
1001
  className: "mx-auto max-w-7xl px-6 py-8",
981
1002
  children: [
982
- /* @__PURE__ */ m(Ce, {
1003
+ /* @__PURE__ */ p(De, {
983
1004
  className: "mb-6",
984
- children: y("pages.productDetail.pagePurpose", "Everything you need to decide whether to install {{name}}: what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you are ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you have used it.", { name: K.name })
1005
+ children: v("pages.productDetail.pagePurpose", "Everything you need to decide whether to install {{name}}: what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you are ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you have used it.", { name: W.name })
985
1006
  }),
986
- /* @__PURE__ */ m(Se, {
1007
+ /* @__PURE__ */ p(Ee, {
987
1008
  className: "mb-8",
988
1009
  storageKey: "store-product-detail",
989
1010
  steps: [
990
- Y ? {
1011
+ Q ? {
1012
+ id: "buy",
1013
+ label: $ ? v("pages.productDetail.viewOnProduct", "View on {{product}}", { product: $.productName }) : v("pages.productDetail.nextStepSoldElsewhereLabel", "Sold outside the store"),
1014
+ description: v("pages.productDetail.nextStepSoldElsewhereDescription", "This item is bought in the product that sells it, not through the store cart."),
1015
+ onClick: Nt,
1016
+ done: !1
1017
+ } : q ? {
991
1018
  id: "install",
992
- label: y("pages.productDetail.nextStepInstallLabel", "Install this app"),
993
- description: y("pages.productDetail.nextStepInstallDescription", "It’s free — add it to a workspace in a couple of clicks."),
994
- onClick: V,
995
- done: b
1019
+ label: v("pages.productDetail.nextStepInstallLabel", "Install this app"),
1020
+ description: v("pages.productDetail.nextStepInstallDescription", "It’s free — add it to a workspace in a couple of clicks."),
1021
+ onClick: z,
1022
+ done: y
996
1023
  } : {
997
1024
  id: "buy",
998
- label: W ? y("pages.productDetail.nextStepInstallLabel", "Install to a workspace") : y("pages.productDetail.nextStepBuyLabel", "Buy or add to cart"),
999
- description: W ? y("pages.productDetail.nextStepOwnedDescription", "You already own this — install it where you need it.") : y("pages.productDetail.nextStepBuyDescription", "Purchase now, or add it to your cart to check out later."),
1000
- onClick: W ? V : pt,
1001
- done: b
1025
+ label: H ? v("pages.productDetail.nextStepInstallLabel", "Install to a workspace") : v("pages.productDetail.nextStepBuyLabel", "Buy or add to cart"),
1026
+ description: H ? v("pages.productDetail.nextStepOwnedDescription", "You already own this — install it where you need it.") : v("pages.productDetail.nextStepBuyDescription", "Purchase now, or add it to your cart to check out later."),
1027
+ onClick: H ? z : vt,
1028
+ done: y
1002
1029
  },
1003
- ...J.length > 0 ? [{
1030
+ ...K.length > 0 ? [{
1004
1031
  id: "permissions",
1005
- label: y("pages.productDetail.nextStepPermissionsLabel", "Review what it can access"),
1006
- description: y("pages.productDetail.nextStepPermissionsDescription", "Check the permissions this app requires before installing."),
1032
+ label: v("pages.productDetail.nextStepPermissionsLabel", "Review what it can access"),
1033
+ description: v("pages.productDetail.nextStepPermissionsDescription", "Check the permissions this app requires before installing."),
1007
1034
  href: "#about-permissions"
1008
1035
  }] : [],
1009
1036
  {
1010
1037
  id: "reviews",
1011
- label: y("pages.productDetail.nextStepReviewsLabel", "Read the reviews"),
1012
- description: y("pages.productDetail.nextStepReviewsDescription", "See what other customers think before committing."),
1038
+ label: v("pages.productDetail.nextStepReviewsLabel", "Read the reviews"),
1039
+ description: v("pages.productDetail.nextStepReviewsDescription", "See what other customers think before committing."),
1013
1040
  href: "#ratings-reviews"
1014
1041
  }
1015
1042
  ]
1016
1043
  }),
1017
- /* @__PURE__ */ h("div", {
1044
+ /* @__PURE__ */ m("div", {
1018
1045
  className: "flex flex-col gap-8 lg:flex-row",
1019
- children: [/* @__PURE__ */ h("div", {
1046
+ children: [/* @__PURE__ */ m("div", {
1020
1047
  className: "flex-1 lg:max-w-3xl",
1021
1048
  children: [
1022
- /* @__PURE__ */ h("section", {
1049
+ /* @__PURE__ */ m("section", {
1023
1050
  className: "mb-8",
1024
1051
  children: [
1025
- /* @__PURE__ */ m("div", {
1052
+ /* @__PURE__ */ p("div", {
1026
1053
  className: "mb-4 flex items-center justify-between text-left",
1027
- children: /* @__PURE__ */ m("h2", {
1054
+ children: /* @__PURE__ */ p("h2", {
1028
1055
  className: "text-lg font-medium text-text-primary",
1029
- children: y("pages.productDetail.aboutThisApp", "About this app")
1056
+ children: v("pages.productDetail.aboutThisApp", "About this app")
1030
1057
  })
1031
1058
  }),
1032
- /* @__PURE__ */ h("div", {
1059
+ /* @__PURE__ */ m("div", {
1033
1060
  className: "text-sm leading-relaxed text-text-secondary",
1034
- children: [/* @__PURE__ */ m("div", {
1035
- className: C ? "" : "line-clamp-4",
1036
- children: /* @__PURE__ */ m(ie, { children: K.longDescription || K.description || y("pages.productDetail.noDescription", "No description available.") })
1037
- }), ((K.longDescription || K.description)?.length ?? 0) > 200 && /* @__PURE__ */ m("button", {
1061
+ children: [/* @__PURE__ */ p("div", {
1062
+ className: Ze ? "" : "line-clamp-4",
1063
+ children: /* @__PURE__ */ p(ie, { children: W.longDescription || W.description || v("pages.productDetail.noDescription", "No description available.") })
1064
+ }), ((W.longDescription || W.description)?.length ?? 0) > 200 && /* @__PURE__ */ p("button", {
1038
1065
  type: "button",
1039
- onClick: () => qe(!C),
1066
+ onClick: () => Qe(!Ze),
1040
1067
  className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
1041
- children: C ? y("pages.productDetail.showLess", "Show less") : y("pages.productDetail.showMore", "Show more")
1068
+ children: Ze ? v("pages.productDetail.showLess", "Show less") : v("pages.productDetail.showMore", "Show more")
1042
1069
  })]
1043
1070
  }),
1044
- K.tags && K.tags.length > 0 && /* @__PURE__ */ m("div", {
1071
+ W.tags && W.tags.length > 0 && /* @__PURE__ */ p("div", {
1045
1072
  className: "mt-4 flex flex-wrap gap-2",
1046
- children: K.tags.map((e) => /* @__PURE__ */ m("span", {
1073
+ children: W.tags.map((e) => /* @__PURE__ */ p("span", {
1047
1074
  className: "rounded-full border border-border-seam px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
1048
1075
  children: e
1049
1076
  }, e))
1050
1077
  })
1051
1078
  ]
1052
1079
  }),
1053
- /* @__PURE__ */ h("section", {
1080
+ /* @__PURE__ */ m("section", {
1054
1081
  id: "ratings-reviews",
1055
1082
  className: "mb-8 scroll-mt-6",
1056
1083
  children: [
1057
- /* @__PURE__ */ m("div", {
1084
+ /* @__PURE__ */ p("div", {
1058
1085
  className: "mb-4 flex items-center justify-between text-left",
1059
- children: /* @__PURE__ */ m("h2", {
1086
+ children: /* @__PURE__ */ p("h2", {
1060
1087
  className: "text-lg font-medium text-text-primary",
1061
- children: y("pages.productDetail.ratingsAndReviews", "Ratings & Reviews")
1088
+ children: v("pages.productDetail.ratingsAndReviews", "Ratings & Reviews")
1062
1089
  })
1063
1090
  }),
1064
- /* @__PURE__ */ h(g, {
1091
+ /* @__PURE__ */ m(h, {
1065
1092
  treatment: "insight",
1066
1093
  className: "p-5",
1067
- children: [H && H.length > 0 ? /* @__PURE__ */ h("div", {
1094
+ children: [B && B.length > 0 ? /* @__PURE__ */ m("div", {
1068
1095
  className: "flex items-start gap-8",
1069
- children: [/* @__PURE__ */ h("div", {
1096
+ children: [/* @__PURE__ */ m("div", {
1070
1097
  className: "text-center",
1071
1098
  children: [
1072
- /* @__PURE__ */ m("p", {
1099
+ /* @__PURE__ */ p("p", {
1073
1100
  className: "text-5xl font-light tabular-nums text-text-primary",
1074
- children: (K.rating || 0).toFixed(1)
1101
+ children: (W.rating || 0).toFixed(1)
1075
1102
  }),
1076
- /* @__PURE__ */ m("div", {
1103
+ /* @__PURE__ */ p("div", {
1077
1104
  className: "my-2 flex justify-center gap-0.5",
1078
1105
  children: [
1079
1106
  1,
@@ -1081,21 +1108,21 @@ var Te = (e, t, n) => ({
1081
1108
  3,
1082
1109
  4,
1083
1110
  5
1084
- ].map((e) => /* @__PURE__ */ m(d, { className: `size-4 ${e <= Math.round(K.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
1111
+ ].map((e) => /* @__PURE__ */ p(u, { className: `size-4 ${e <= Math.round(W.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
1085
1112
  }),
1086
- /* @__PURE__ */ m("p", {
1113
+ /* @__PURE__ */ p("p", {
1087
1114
  className: "text-sm text-text-muted",
1088
- children: y("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(St || K.reviewCount) })
1115
+ children: v("pages.productDetail.reviews_count", "{{count}} reviews", { count: n(Dt || W.reviewCount) })
1089
1116
  })
1090
1117
  ]
1091
- }), wt.length > 0 && /* @__PURE__ */ m("div", {
1118
+ }), kt.length > 0 && /* @__PURE__ */ p("div", {
1092
1119
  className: "flex-1 space-y-1.5",
1093
- children: wt.map((e) => /* @__PURE__ */ m(Ee, { ...e }, e.stars))
1120
+ children: kt.map((e) => /* @__PURE__ */ p(Ae, { ...e }, e.stars))
1094
1121
  })]
1095
- }) : /* @__PURE__ */ h("div", {
1122
+ }) : /* @__PURE__ */ m("div", {
1096
1123
  className: "flex flex-col items-center justify-center py-6 text-center",
1097
1124
  children: [
1098
- /* @__PURE__ */ m("div", {
1125
+ /* @__PURE__ */ p("div", {
1099
1126
  className: "mb-3 flex gap-0.5",
1100
1127
  children: [
1101
1128
  1,
@@ -1103,37 +1130,37 @@ var Te = (e, t, n) => ({
1103
1130
  3,
1104
1131
  4,
1105
1132
  5
1106
- ].map((e) => /* @__PURE__ */ m(d, { className: "size-5 text-border-default" }, e))
1133
+ ].map((e) => /* @__PURE__ */ p(u, { className: "size-5 text-border-default" }, e))
1107
1134
  }),
1108
- /* @__PURE__ */ m("p", {
1135
+ /* @__PURE__ */ p("p", {
1109
1136
  className: "font-medium text-text-primary",
1110
- children: y("pages.productDetail.noReviews", "No reviews yet")
1137
+ children: v("pages.productDetail.noReviews", "No reviews yet")
1111
1138
  }),
1112
- /* @__PURE__ */ m("p", {
1139
+ /* @__PURE__ */ p("p", {
1113
1140
  className: "mt-1 text-sm text-text-muted",
1114
- children: y("pages.productDetail.beFirstToReview", "Be the first to share your experience with this app.")
1141
+ children: v("pages.productDetail.beFirstToReview", "Be the first to share your experience with this app.")
1115
1142
  })
1116
1143
  ]
1117
- }), /* @__PURE__ */ h("div", {
1144
+ }), /* @__PURE__ */ m("div", {
1118
1145
  className: "mt-6 border-t border-border-seam pt-4",
1119
- children: [et && /* @__PURE__ */ m("p", {
1120
- role: tt === "success" ? "status" : "alert",
1121
- className: `mb-3 rounded-lg px-3 py-2 text-sm ${tt === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
1122
- children: et
1123
- }), b || L?.isPurchased || L?.userReview ? /* @__PURE__ */ h("div", {
1146
+ children: [at && /* @__PURE__ */ p("p", {
1147
+ role: ot === "success" ? "status" : "alert",
1148
+ className: `mb-3 rounded-lg px-3 py-2 text-sm ${ot === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
1149
+ children: at
1150
+ }), y || F?.isPurchased || F?.userReview ? /* @__PURE__ */ m("div", {
1124
1151
  className: "space-y-4",
1125
- children: [/* @__PURE__ */ m("button", {
1152
+ children: [/* @__PURE__ */ p("button", {
1126
1153
  type: "button",
1127
- onClick: () => O ? k(!1) : vt(),
1154
+ onClick: () => E ? D(!1) : Ct(),
1128
1155
  className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
1129
- children: L?.userReview ? O ? y("pages.productDetail.cancelReviewEditing", "Cancel review editing") : y("pages.productDetail.editYourReview", "Edit your review") : O ? y("pages.productDetail.cancelReview", "Cancel review") : y("pages.productDetail.writeReview", "Write a Review")
1130
- }), O && /* @__PURE__ */ h("div", {
1156
+ children: F?.userReview ? E ? v("pages.productDetail.cancelReviewEditing", "Cancel review editing") : v("pages.productDetail.editYourReview", "Edit your review") : E ? v("pages.productDetail.cancelReview", "Cancel review") : v("pages.productDetail.writeReview", "Write a Review")
1157
+ }), E && /* @__PURE__ */ m("div", {
1131
1158
  className: "rounded-xl border border-border-seam bg-bg-sunken p-4",
1132
1159
  children: [
1133
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1160
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1134
1161
  className: "text-sm font-medium text-text-primary",
1135
- children: y("pages.productDetail.yourRatingLabel", "Your rating")
1136
- }), /* @__PURE__ */ m("div", {
1162
+ children: v("pages.productDetail.yourRatingLabel", "Your rating")
1163
+ }), /* @__PURE__ */ p("div", {
1137
1164
  className: "mt-2 flex flex-wrap gap-2",
1138
1165
  children: [
1139
1166
  1,
@@ -1141,275 +1168,275 @@ var Te = (e, t, n) => ({
1141
1168
  3,
1142
1169
  4,
1143
1170
  5
1144
- ].map((e) => /* @__PURE__ */ h("button", {
1171
+ ].map((e) => /* @__PURE__ */ m("button", {
1145
1172
  type: "button",
1146
- onClick: () => F(e),
1147
- className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${P === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
1173
+ onClick: () => N(e),
1174
+ className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${M === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
1148
1175
  children: [e, " ★"]
1149
1176
  }, e))
1150
1177
  })] }),
1151
- /* @__PURE__ */ h("label", {
1178
+ /* @__PURE__ */ m("label", {
1152
1179
  className: "mt-4 block text-sm font-medium text-text-primary",
1153
- children: [y("pages.productDetail.reviewTitleLabel", "Title"), /* @__PURE__ */ m("input", {
1154
- "aria-label": y("pages.productDetail.reviewTitleLabel", "Review title"),
1155
- value: A,
1156
- onChange: (e) => j(e.target.value),
1180
+ children: [v("pages.productDetail.reviewTitleLabel", "Title"), /* @__PURE__ */ p("input", {
1181
+ "aria-label": v("pages.productDetail.reviewTitleLabel", "Review title"),
1182
+ value: O,
1183
+ onChange: (e) => k(e.target.value),
1157
1184
  className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
1158
- placeholder: y("pages.productDetail.reviewTitlePlaceholder", "Summarize your experience")
1185
+ placeholder: v("pages.productDetail.reviewTitlePlaceholder", "Summarize your experience")
1159
1186
  })]
1160
1187
  }),
1161
- /* @__PURE__ */ h("label", {
1188
+ /* @__PURE__ */ m("label", {
1162
1189
  className: "mt-4 block text-sm font-medium text-text-primary",
1163
- children: [y("pages.productDetail.reviewBodyLabel", "Review"), /* @__PURE__ */ m("textarea", {
1164
- "aria-label": y("pages.productDetail.reviewBodyLabel", "Review body"),
1165
- value: M,
1166
- onChange: (e) => N(e.target.value),
1190
+ children: [v("pages.productDetail.reviewBodyLabel", "Review"), /* @__PURE__ */ p("textarea", {
1191
+ "aria-label": v("pages.productDetail.reviewBodyLabel", "Review body"),
1192
+ value: A,
1193
+ onChange: (e) => j(e.target.value),
1167
1194
  rows: 4,
1168
1195
  required: !0,
1169
1196
  "aria-required": "true",
1170
1197
  className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
1171
- placeholder: y("pages.productDetail.reviewBodyPlaceholder", "What worked well? What should improve?")
1198
+ placeholder: v("pages.productDetail.reviewBodyPlaceholder", "What worked well? What should improve?")
1172
1199
  })]
1173
1200
  }),
1174
- /* @__PURE__ */ h("div", {
1201
+ /* @__PURE__ */ m("div", {
1175
1202
  className: "mt-4 flex flex-wrap gap-3",
1176
- children: [/* @__PURE__ */ m("button", {
1203
+ children: [/* @__PURE__ */ p("button", {
1177
1204
  type: "button",
1178
- onClick: yt,
1179
- disabled: Be || He,
1205
+ onClick: wt,
1206
+ disabled: We || Ke,
1180
1207
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
1181
- children: Be || He ? y("pages.productDetail.savingReview", "Saving...") : L?.userReview ? y("pages.productDetail.updateReview", "Update Review") : y("pages.productDetail.submitReview", "Submit Review")
1182
- }), L?.userReview && /* @__PURE__ */ m("button", {
1208
+ children: We || Ke ? v("pages.productDetail.savingReview", "Saving...") : F?.userReview ? v("pages.productDetail.updateReview", "Update Review") : v("pages.productDetail.submitReview", "Submit Review")
1209
+ }), F?.userReview && /* @__PURE__ */ p("button", {
1183
1210
  type: "button",
1184
- onClick: bt,
1185
- disabled: We,
1211
+ onClick: Tt,
1212
+ disabled: Je,
1186
1213
  className: "cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60",
1187
- children: We ? y("pages.productDetail.removingReview", "Removing...") : y("pages.productDetail.deleteReview", "Delete Review")
1214
+ children: Je ? v("pages.productDetail.removingReview", "Removing...") : v("pages.productDetail.deleteReview", "Delete Review")
1188
1215
  })]
1189
1216
  })
1190
1217
  ]
1191
1218
  })]
1192
- }) : /* @__PURE__ */ m("p", {
1219
+ }) : /* @__PURE__ */ p("p", {
1193
1220
  className: "text-center text-sm text-text-muted",
1194
- children: y("pages.productDetail.installToReview", "Install this app to leave a review.")
1221
+ children: v("pages.productDetail.installToReview", "Install this app to leave a review.")
1195
1222
  })]
1196
1223
  })]
1197
1224
  }),
1198
- H && H.length > 0 && /* @__PURE__ */ h("div", {
1225
+ B && B.length > 0 && /* @__PURE__ */ m("div", {
1199
1226
  className: "mt-4 space-y-3",
1200
- children: [/* @__PURE__ */ m("ul", {
1227
+ children: [/* @__PURE__ */ p("ul", {
1201
1228
  className: "space-y-3",
1202
- children: (Je ? H : H.slice(0, 2)).map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m(De, {
1229
+ children: ($e ? B : B.slice(0, 2)).map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(je, {
1203
1230
  review: e,
1204
- onMarkHelpful: xt,
1205
- markingHelpful: Ke && nt === e.id
1231
+ onMarkHelpful: Et,
1232
+ markingHelpful: Xe && st === e.id
1206
1233
  }) }, e.id))
1207
- }), H.length > 2 && /* @__PURE__ */ m("button", {
1234
+ }), B.length > 2 && /* @__PURE__ */ p("button", {
1208
1235
  type: "button",
1209
- onClick: () => Ye(!Je),
1236
+ onClick: () => et(!$e),
1210
1237
  className: "cursor-pointer text-sm font-medium text-text-link",
1211
- children: Je ? y("pages.productDetail.showLess", "Show less") : y("pages.productDetail.showAllReviews", "Show all {{count}} reviews", { count: H.length })
1238
+ children: $e ? v("pages.productDetail.showLess", "Show less") : v("pages.productDetail.showAllReviews", "Show all {{count}} reviews", { count: B.length })
1212
1239
  })]
1213
1240
  }),
1214
- (!H || H.length === 0) && /* @__PURE__ */ m("p", {
1241
+ (!B || B.length === 0) && /* @__PURE__ */ p("p", {
1215
1242
  className: "mt-4 text-sm text-text-muted",
1216
- children: y("pages.productDetail.beFirstToReviewShort", "No reviews yet. Be the first to review!")
1243
+ children: v("pages.productDetail.beFirstToReviewShort", "No reviews yet. Be the first to review!")
1217
1244
  })
1218
1245
  ]
1219
1246
  }),
1220
- J.length > 0 && /* @__PURE__ */ h("section", {
1247
+ K.length > 0 && /* @__PURE__ */ m("section", {
1221
1248
  id: "about-permissions",
1222
1249
  className: "mb-8 scroll-mt-6",
1223
- children: [/* @__PURE__ */ m("h2", {
1250
+ children: [/* @__PURE__ */ p("h2", {
1224
1251
  className: "mb-4 text-lg font-medium text-text-primary",
1225
- children: y("pages.productDetail.requiredPermissions", "Required Permissions")
1226
- }), /* @__PURE__ */ m("div", {
1252
+ children: v("pages.productDetail.requiredPermissions", "Required Permissions")
1253
+ }), /* @__PURE__ */ p("div", {
1227
1254
  className: "space-y-2",
1228
- children: J.map((e) => /* @__PURE__ */ h("div", {
1255
+ children: K.map((e) => /* @__PURE__ */ m("div", {
1229
1256
  className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
1230
- children: [/* @__PURE__ */ m(u, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ m("span", {
1257
+ children: [/* @__PURE__ */ p(l, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ p("span", {
1231
1258
  className: "text-sm text-text-primary",
1232
1259
  children: e
1233
1260
  })]
1234
1261
  }, e))
1235
1262
  })]
1236
1263
  }),
1237
- Tt.length > 0 && /* @__PURE__ */ h("section", {
1264
+ At.length > 0 && /* @__PURE__ */ m("section", {
1238
1265
  className: "mb-8",
1239
- children: [/* @__PURE__ */ m("h2", {
1266
+ children: [/* @__PURE__ */ p("h2", {
1240
1267
  className: "mb-4 text-lg font-medium text-text-primary",
1241
- children: y("pages.productDetail.integrations", "Integrations")
1242
- }), /* @__PURE__ */ m("div", {
1268
+ children: v("pages.productDetail.integrations", "Integrations")
1269
+ }), /* @__PURE__ */ p("div", {
1243
1270
  className: "flex flex-wrap gap-2",
1244
- children: Tt.map((e) => /* @__PURE__ */ m("span", {
1271
+ children: At.map((e) => /* @__PURE__ */ p("span", {
1245
1272
  className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
1246
1273
  children: e
1247
1274
  }, e))
1248
1275
  })]
1249
1276
  }),
1250
- /* @__PURE__ */ h("section", {
1277
+ /* @__PURE__ */ m("section", {
1251
1278
  className: "mb-8",
1252
- children: [/* @__PURE__ */ m("h2", {
1279
+ children: [/* @__PURE__ */ p("h2", {
1253
1280
  className: "mb-4 text-lg font-medium text-text-primary",
1254
- children: y("pages.productDetail.additionalInformation", "Additional Information")
1255
- }), /* @__PURE__ */ h(g, {
1281
+ children: v("pages.productDetail.additionalInformation", "Additional Information")
1282
+ }), /* @__PURE__ */ m(h, {
1256
1283
  treatment: "metric",
1257
1284
  className: "grid grid-cols-2 gap-6 p-5 md:grid-cols-3",
1258
1285
  children: [
1259
- K.manifestVersion && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1286
+ W.manifestVersion && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1260
1287
  className: "text-xs text-text-muted",
1261
- children: y("pages.productDetail.versionLabel", "Version")
1262
- }), /* @__PURE__ */ m("p", {
1288
+ children: v("pages.productDetail.versionLabel", "Version")
1289
+ }), /* @__PURE__ */ p("p", {
1263
1290
  className: "mt-1 text-sm font-medium text-text-primary",
1264
- children: K.manifestVersion
1291
+ children: W.manifestVersion
1265
1292
  })] }),
1266
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1293
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1267
1294
  className: "text-xs text-text-muted",
1268
- children: y("pages.productDetail.typeLabel", "Type")
1269
- }), /* @__PURE__ */ m("p", {
1295
+ children: v("pages.productDetail.typeLabel", "Type")
1296
+ }), /* @__PURE__ */ p("p", {
1270
1297
  className: "mt-1 text-sm font-medium text-text-primary",
1271
- children: K.type
1298
+ children: W.type
1272
1299
  })] }),
1273
- K.publishedAt && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1300
+ W.publishedAt && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1274
1301
  className: "text-xs text-text-muted",
1275
- children: y("pages.productDetail.publishedLabel", "Published")
1276
- }), /* @__PURE__ */ m("p", {
1302
+ children: v("pages.productDetail.publishedLabel", "Published")
1303
+ }), /* @__PURE__ */ p("p", {
1277
1304
  className: "mt-1 text-sm font-medium text-text-primary",
1278
- children: new Date(K.publishedAt).toLocaleDateString()
1305
+ children: new Date(W.publishedAt).toLocaleDateString()
1279
1306
  })] }),
1280
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1307
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1281
1308
  className: "text-xs text-text-muted",
1282
- children: y("pages.productDetail.updatedLabel", "Updated")
1283
- }), /* @__PURE__ */ m("p", {
1309
+ children: v("pages.productDetail.updatedLabel", "Updated")
1310
+ }), /* @__PURE__ */ p("p", {
1284
1311
  className: "mt-1 text-sm font-medium text-text-primary",
1285
- children: new Date(K.updatedAt).toLocaleDateString()
1312
+ children: new Date(W.updatedAt).toLocaleDateString()
1286
1313
  })] }),
1287
- K.license && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1314
+ W.license && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1288
1315
  className: "text-xs text-text-muted",
1289
- children: y("pages.productDetail.licenseLabel", "License")
1290
- }), /* @__PURE__ */ m("p", {
1316
+ children: v("pages.productDetail.licenseLabel", "License")
1317
+ }), /* @__PURE__ */ p("p", {
1291
1318
  className: "mt-1 text-sm font-medium text-text-primary",
1292
- children: K.license
1319
+ children: W.license
1293
1320
  })] }),
1294
- K.minPlatformVersion && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
1321
+ W.minPlatformVersion && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
1295
1322
  className: "text-xs text-text-muted",
1296
- children: y("pages.productDetail.minPlatformVersionLabel", "Min Platform Version")
1297
- }), /* @__PURE__ */ m("p", {
1323
+ children: v("pages.productDetail.minPlatformVersionLabel", "Min Platform Version")
1324
+ }), /* @__PURE__ */ p("p", {
1298
1325
  className: "mt-1 text-sm font-medium text-text-primary",
1299
- children: K.minPlatformVersion
1326
+ children: W.minPlatformVersion
1300
1327
  })] })
1301
1328
  ]
1302
1329
  })]
1303
1330
  })
1304
1331
  ]
1305
- }), /* @__PURE__ */ h("div", {
1332
+ }), /* @__PURE__ */ m("div", {
1306
1333
  className: "w-full lg:w-80",
1307
1334
  children: [
1308
- (K.documentationUrl || K.repositoryUrl || z?.email) && /* @__PURE__ */ h(g, {
1335
+ (W.documentationUrl || W.repositoryUrl || L?.email) && /* @__PURE__ */ m(h, {
1309
1336
  className: "mb-6 p-4",
1310
- children: [/* @__PURE__ */ m("h3", {
1337
+ children: [/* @__PURE__ */ p("h3", {
1311
1338
  className: "font-medium text-text-primary",
1312
- children: y("pages.productDetail.appSupport", "App support")
1313
- }), /* @__PURE__ */ h("div", {
1339
+ children: v("pages.productDetail.appSupport", "App support")
1340
+ }), /* @__PURE__ */ m("div", {
1314
1341
  className: "mt-3 space-y-2 text-sm",
1315
1342
  children: [
1316
- K.documentationUrl && /* @__PURE__ */ m("a", {
1317
- href: K.documentationUrl,
1343
+ W.documentationUrl && /* @__PURE__ */ p("a", {
1344
+ href: W.documentationUrl,
1318
1345
  target: "_blank",
1319
1346
  rel: "noreferrer",
1320
1347
  className: "block text-text-link hover:underline",
1321
- children: y("pages.productDetail.documentation", "Documentation")
1348
+ children: v("pages.productDetail.documentation", "Documentation")
1322
1349
  }),
1323
- K.repositoryUrl && /* @__PURE__ */ m("a", {
1324
- href: K.repositoryUrl,
1350
+ W.repositoryUrl && /* @__PURE__ */ p("a", {
1351
+ href: W.repositoryUrl,
1325
1352
  target: "_blank",
1326
1353
  rel: "noreferrer",
1327
1354
  className: "block text-text-link hover:underline",
1328
- children: y("pages.productDetail.sourceRepository", "Source repository")
1355
+ children: v("pages.productDetail.sourceRepository", "Source repository")
1329
1356
  }),
1330
- z?.email && /* @__PURE__ */ m("a", {
1331
- href: `mailto:${z.email}`,
1357
+ L?.email && /* @__PURE__ */ p("a", {
1358
+ href: `mailto:${L.email}`,
1332
1359
  className: "block text-text-link hover:underline",
1333
- children: y("pages.productDetail.contactPublisher", "Contact publisher")
1360
+ children: v("pages.productDetail.contactPublisher", "Contact publisher")
1334
1361
  })
1335
1362
  ]
1336
1363
  })]
1337
1364
  }),
1338
- z && /* @__PURE__ */ m(g, {
1365
+ L && /* @__PURE__ */ p(h, {
1339
1366
  className: "mb-6 p-4",
1340
1367
  children: (() => {
1341
- let e = z.developerOrganization, t = e?.name || z.name, n = e?.logoUrl || z.logoUrl, r = e?.description || z.bio, i = e?.isVerified || z.isVerified;
1342
- return /* @__PURE__ */ h(p, { children: [
1343
- /* @__PURE__ */ h("div", {
1368
+ let e = L.developerOrganization, t = e?.name || L.name, n = e?.logoUrl || L.logoUrl, r = e?.description || L.bio, i = e?.isVerified || L.isVerified;
1369
+ return /* @__PURE__ */ m(f, { children: [
1370
+ /* @__PURE__ */ m("div", {
1344
1371
  className: "flex items-center gap-2.5",
1345
- children: [n ? /* @__PURE__ */ m("img", {
1372
+ children: [n ? /* @__PURE__ */ p("img", {
1346
1373
  src: n,
1347
1374
  alt: t,
1348
1375
  className: "size-8 rounded-lg object-cover"
1349
- }) : /* @__PURE__ */ m("div", {
1376
+ }) : /* @__PURE__ */ p("div", {
1350
1377
  className: "flex size-8 items-center justify-center rounded-lg bg-bg-sunken text-sm font-bold text-text-muted",
1351
1378
  children: t.charAt(0)
1352
- }), /* @__PURE__ */ m("div", {
1379
+ }), /* @__PURE__ */ p("div", {
1353
1380
  className: "flex-1 min-w-0",
1354
- children: /* @__PURE__ */ h("div", {
1381
+ children: /* @__PURE__ */ m("div", {
1355
1382
  className: "flex items-center gap-1.5",
1356
- children: [/* @__PURE__ */ m("span", {
1383
+ children: [/* @__PURE__ */ p("span", {
1357
1384
  className: "font-medium text-text-primary truncate",
1358
1385
  children: t
1359
- }), i && /* @__PURE__ */ m(u, { className: "size-3.5 text-status-success-text shrink-0" })]
1386
+ }), i && /* @__PURE__ */ p(l, { className: "size-3.5 text-status-success-text shrink-0" })]
1360
1387
  })
1361
1388
  })]
1362
1389
  }),
1363
- r && /* @__PURE__ */ m("p", {
1390
+ r && /* @__PURE__ */ p("p", {
1364
1391
  className: "mt-2 text-sm text-text-muted",
1365
1392
  children: r
1366
1393
  }),
1367
- z.websiteUrl && /* @__PURE__ */ m("a", {
1368
- href: z.websiteUrl,
1394
+ L.websiteUrl && /* @__PURE__ */ p("a", {
1395
+ href: L.websiteUrl,
1369
1396
  target: "_blank",
1370
1397
  rel: "noreferrer",
1371
1398
  className: "mt-3 inline-block text-sm text-text-link hover:underline",
1372
- children: y("pages.productDetail.visitWebsite", "Visit website")
1399
+ children: v("pages.productDetail.visitWebsite", "Visit website")
1373
1400
  })
1374
1401
  ] });
1375
1402
  })()
1376
1403
  }),
1377
- Ct && Ct.length > 0 && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
1404
+ Ot && Ot.length > 0 && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
1378
1405
  className: "mb-4 flex items-center justify-between text-left",
1379
- children: /* @__PURE__ */ m("span", {
1406
+ children: /* @__PURE__ */ p("span", {
1380
1407
  className: "font-medium text-text-primary",
1381
- children: y("pages.productDetail.similarApps", "Similar apps")
1408
+ children: v("pages.productDetail.similarApps", "Similar apps")
1382
1409
  })
1383
- }), /* @__PURE__ */ m("div", {
1410
+ }), /* @__PURE__ */ p("div", {
1384
1411
  className: "space-y-3",
1385
- children: Ct.slice(0, 4).map((e) => /* @__PURE__ */ h("button", {
1412
+ children: Ot.slice(0, 4).map((e) => /* @__PURE__ */ m("button", {
1386
1413
  type: "button",
1387
- onClick: () => f(`${_}/marketplace/product/${e.id}`),
1414
+ onClick: () => d(`${g}/marketplace/product/${e.id}`),
1388
1415
  className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
1389
- children: [e.icon ? /* @__PURE__ */ m("img", {
1416
+ children: [e.icon ? /* @__PURE__ */ p("img", {
1390
1417
  src: e.icon,
1391
1418
  alt: e.name,
1392
1419
  className: "size-12 rounded-xl object-cover"
1393
- }) : /* @__PURE__ */ m("div", {
1420
+ }) : /* @__PURE__ */ p("div", {
1394
1421
  className: "flex size-12 items-center justify-center rounded-xl bg-bg-sunken text-lg font-bold text-text-muted",
1395
1422
  children: e.name.charAt(0)
1396
- }), /* @__PURE__ */ h("div", {
1423
+ }), /* @__PURE__ */ m("div", {
1397
1424
  className: "flex-1 overflow-hidden",
1398
1425
  children: [
1399
- /* @__PURE__ */ m("p", {
1426
+ /* @__PURE__ */ p("p", {
1400
1427
  className: "truncate text-sm font-medium text-text-primary",
1401
1428
  children: e.name
1402
1429
  }),
1403
- /* @__PURE__ */ m("p", {
1430
+ /* @__PURE__ */ p("p", {
1404
1431
  className: "text-xs text-text-muted",
1405
- children: z?.name || y("common.unknown", "Unknown")
1432
+ children: L?.name || v("common.unknown", "Unknown")
1406
1433
  }),
1407
- (e.reviewCount ?? 0) > 0 && /* @__PURE__ */ h("div", {
1434
+ (e.reviewCount ?? 0) > 0 && /* @__PURE__ */ m("div", {
1408
1435
  className: "flex items-center gap-1",
1409
- children: [/* @__PURE__ */ m("span", {
1436
+ children: [/* @__PURE__ */ p("span", {
1410
1437
  className: "text-xs text-text-muted",
1411
1438
  children: (e.rating || 0).toFixed(1)
1412
- }), /* @__PURE__ */ m(d, { className: "size-3 fill-current text-status-warning-text" })]
1439
+ }), /* @__PURE__ */ p(u, { className: "size-3 fill-current text-status-warning-text" })]
1413
1440
  })
1414
1441
  ]
1415
1442
  })]
@@ -1420,27 +1447,27 @@ var Te = (e, t, n) => ({
1420
1447
  })
1421
1448
  ]
1422
1449
  }),
1423
- K && /* @__PURE__ */ m(ae, {
1424
- isOpen: it,
1425
- onClose: () => at(!1),
1450
+ W && /* @__PURE__ */ p(oe, {
1451
+ isOpen: lt,
1452
+ onClose: () => ut(!1),
1426
1453
  app: {
1427
- id: K.id,
1428
- applicationId: K.productId,
1429
- name: K.name,
1430
- slug: K.slug,
1431
- icon: K.icon,
1432
- type: K.type,
1433
- version: K.manifestVersion,
1434
- permissions: J.length > 0 ? J : void 0
1454
+ id: W.id,
1455
+ applicationId: W.productId,
1456
+ name: W.name,
1457
+ slug: W.slug,
1458
+ icon: W.icon,
1459
+ type: W.type,
1460
+ version: W.manifestVersion,
1461
+ permissions: K.length > 0 ? K : void 0
1435
1462
  },
1436
- purchaseState: W && !Y ? "purchased" : "free",
1437
- onInstallSuccess: gt,
1438
- onInstallError: _t
1463
+ purchaseState: H && !q ? "purchased" : "free",
1464
+ onInstallSuccess: xt,
1465
+ onInstallError: St
1439
1466
  })
1440
1467
  ]
1441
1468
  });
1442
1469
  };
1443
1470
  //#endregion
1444
- export { Ae as ProductDetailPage };
1471
+ export { Pe as ProductDetailPage };
1445
1472
 
1446
1473
  //# sourceMappingURL=ProductDetailPage.js.map