@burdenoff/microfe-store 2026.608.1 → 2026.614.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.
Files changed (94) hide show
  1. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
  2. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
  3. package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
  4. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
  5. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
  6. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  7. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
  8. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
  9. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
  10. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  11. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
  12. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  13. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
  14. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  15. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
  16. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  17. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
  18. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  19. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
  20. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
  21. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  22. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  23. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
  24. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  25. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  26. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  27. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
  28. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  29. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  30. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  31. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
  32. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
  33. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
  34. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  35. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
  36. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  37. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
  38. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  39. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
  40. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  41. package/dist/node_modules/@apollo/client/version.js +6 -0
  42. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  43. package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
  44. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  45. package/dist/node_modules/@wry/trie/lib/index.js +53 -0
  46. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  47. package/dist/node_modules/graphql-ws/dist/client.js +272 -0
  48. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
  49. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
  50. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
  51. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
  52. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  53. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
  54. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  55. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
  56. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  57. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
  58. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  59. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
  60. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  61. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
  62. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  63. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
  64. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  65. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
  66. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  67. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
  68. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  69. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  70. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  71. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
  72. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  73. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
  74. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  75. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  76. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  77. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  78. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  79. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  80. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  81. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
  82. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  83. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  84. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  85. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
  86. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  87. package/dist/pages/CartPage.js +1 -2
  88. package/dist/pages/CartPage.js.map +1 -1
  89. package/dist/pages/ProductDetailPage.js +247 -225
  90. package/dist/pages/ProductDetailPage.js.map +1 -1
  91. package/dist/pages/PublisherSubmitPage.js +36 -36
  92. package/dist/providers/StoreProvider.js +68 -37
  93. package/dist/providers/StoreProvider.js.map +1 -1
  94. package/package.json +2 -1
@@ -2,15 +2,16 @@ import { useStore as e } from "../providers/StoreProvider.js";
2
2
  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 ee, useDeleteReview as te, useMarkReviewHelpful as ne, useStoreProductDetails as re, useUpdateReview as ie } from "../hooks/useStoreGraphQL.js";
5
- import { nativeConfirm as ae, nativeImpact as oe, nativeNotify as se } from "../utils/nativeBridge.js";
6
- import { InstallAppModal as ce } from "../components/InstallAppModal.js";
7
- import { useCallback as i, useEffect as le, useRef as a, useState as o } from "react";
8
- import { AlertCircle as s, ArrowLeft as ue, Check as de, Loader2 as fe, Package as pe, ShieldCheck as c, ShoppingCart as me, Star as l, ThumbsUp as u } from "lucide-react";
9
- import { Fragment as he, jsx as d, jsxs as f } from "react/jsx-runtime";
10
- import { useNavigate as ge, useParams as _e } from "react-router-dom";
11
- import { useEventBus as ve } from "@burdenoff/fe-libs/shared/events";
5
+ import { useInstallations as ae } from "../hooks/useInstallations.js";
6
+ import { nativeConfirm as oe, nativeImpact as se, nativeNotify as ce } from "../utils/nativeBridge.js";
7
+ import { InstallAppModal as le } from "../components/InstallAppModal.js";
8
+ import { useCallback as i, useEffect as ue, useMemo as de, useRef as a, useState as o } from "react";
9
+ import { AlertCircle as s, ArrowLeft as fe, Check as pe, Loader2 as me, Package as he, ShieldCheck as c, ShoppingCart as ge, Star as l, ThumbsUp as u } from "lucide-react";
10
+ import { Fragment as _e, jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { useLocation as ve, useNavigate as ye, useParams as be } from "react-router-dom";
12
+ import { useEventBus as xe } from "@burdenoff/fe-libs/shared/events";
12
13
  //#region src/pages/ProductDetailPage.tsx
13
- var ye = (e, t) => ({
14
+ var Se = (e, t) => ({
14
15
  id: e.id,
15
16
  publisherId: t?.id || "",
16
17
  publisher: {
@@ -82,7 +83,7 @@ var ye = (e, t) => ({
82
83
  createdAt: e.createdAt,
83
84
  updatedAt: e.updatedAt,
84
85
  publishedAt: e.publishedAt
85
- }), be = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ f("div", {
86
+ }), Ce = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ f("div", {
86
87
  className: "flex items-center gap-2",
87
88
  children: [
88
89
  /* @__PURE__ */ d("span", {
@@ -101,7 +102,7 @@ var ye = (e, t) => ({
101
102
  children: n(r)
102
103
  })
103
104
  ]
104
- }), xe = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ f("div", {
105
+ }), we = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ f("div", {
105
106
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
106
107
  children: [
107
108
  /* @__PURE__ */ d("div", {
@@ -162,7 +163,7 @@ var ye = (e, t) => ({
162
163
  })
163
164
  })
164
165
  ]
165
- }), Se = () => /* @__PURE__ */ f("div", {
166
+ }), Te = () => /* @__PURE__ */ f("div", {
166
167
  className: "h-full overflow-y-auto",
167
168
  children: [/* @__PURE__ */ d("div", {
168
169
  className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
@@ -416,7 +417,7 @@ var ye = (e, t) => ({
416
417
  })
417
418
  ]
418
419
  })]
419
- }), Ce = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ d("div", {
420
+ }), Ee = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ d("div", {
420
421
  className: "flex h-full items-center justify-center",
421
422
  children: /* @__PURE__ */ f("div", {
422
423
  className: "text-center",
@@ -446,8 +447,14 @@ var ye = (e, t) => ({
446
447
  })
447
448
  ]
448
449
  })
449
- }), p = () => {
450
- let { productId: s } = _e(), u = ge(), { basePath: p } = e(), { addProduct: m, cartItems: we, addingToCart: h, createOrder: g, checkingOut: _ } = t(), { createReview: v, loading: y } = ee(), { updateReview: b, loading: Te } = ie(), { deleteReview: Ee, loading: De } = te(), { markHelpful: Oe, loading: ke } = ne(), x = ve(), [S, Ae] = o(!1), [C, je] = o(!1), [w, T] = o(!1), [E, D] = o(null), [O, k] = o(null), [A, j] = o("success"), [M, N] = o(!1), [P, F] = o(""), [I, L] = o(""), [R, z] = o(5), [Me, Ne] = o(null), [Pe, Fe] = o(!1), { data: Ie, loading: Le, error: Re, refetch: B } = re({
450
+ }), De = () => {
451
+ let { productId: s } = be(), u = ye(), De = ve(), { basePath: p, workspaceId: m } = e(), { addProduct: h, cartItems: Oe, addingToCart: g, createOrder: _, checkingOut: v } = t(), { installations: ke } = ae({
452
+ filter: de(() => s && m ? {
453
+ productId: s,
454
+ workspaceId: m
455
+ } : void 0, [s, m]),
456
+ limit: 1
457
+ }), Ae = ke.some((e) => e.productId === s && e.workspaceId === m && e.status === "ACTIVE"), { createReview: y, loading: b } = ee(), { updateReview: x, loading: S } = ie(), { deleteReview: C, loading: w } = te(), { markHelpful: T, loading: je } = ne(), E = xe(), [D, Me] = o(!1), [O, Ne] = o(!1), [Pe, k] = o(!1), [Fe, A] = o(null), [Ie, j] = o(null), [Le, M] = o("success"), [N, P] = o(!1), [F, I] = o(""), [L, R] = o(""), [z, B] = o(5), [Re, ze] = o(null), [Be, Ve] = o(!1), { data: He, loading: Ue, error: We, refetch: V } = re({
451
458
  id: s,
452
459
  slug: s,
453
460
  includeReviews: !0,
@@ -455,135 +462,135 @@ var ye = (e, t) => ({
455
462
  includeRelated: !0,
456
463
  relatedLimit: 4,
457
464
  includeVersions: !0
458
- }), V = Ie, H = V?.product, U = V?.publisher, W = we.some((e) => e.productId === H?.id), ze = i(async () => {
459
- if (H) {
460
- if (D(null), W) {
465
+ }), H = He, U = H?.product, W = H?.publisher, G = Oe.some((e) => e.productId === U?.id), Ge = i(async () => {
466
+ if (U) {
467
+ if (A(null), G) {
461
468
  u(`${p}/cart`);
462
469
  return;
463
470
  }
464
471
  try {
465
- await m(ye(H, U), void 0, 1);
472
+ await h(Se(U, W), void 0, 1);
466
473
  } catch (e) {
467
- console.error("Failed to add product to cart:", e), D("Failed to add this product to cart. Please try again.");
474
+ console.error("Failed to add product to cart:", e), A("Failed to add this product to cart. Please try again.");
468
475
  }
469
476
  }
470
477
  }, [
471
- H,
472
478
  U,
473
- m,
474
479
  W,
480
+ h,
481
+ G,
475
482
  u,
476
483
  p
477
- ]), Be = i(async () => {
478
- if (H) {
479
- D(null), T(!0);
484
+ ]), Ke = i(async () => {
485
+ if (U) {
486
+ A(null), k(!0);
480
487
  try {
481
- let e = H.price || 0, t = await g({
488
+ let e = U.price || 0, t = await _({
482
489
  total: e,
483
490
  lineItems: [{
484
- productId: H.id,
485
- name: H.name,
491
+ productId: U.id,
492
+ name: U.name,
486
493
  quantity: 1,
487
494
  unitPrice: e,
488
495
  subtotal: e,
489
- itemType: H.nature?.toLowerCase() || "digital",
490
- pricingModel: H.pricingModel || "PAID_ONETIME"
496
+ itemType: U.nature?.toLowerCase() || "digital",
497
+ pricingModel: U.pricingModel || "PAID_ONETIME"
491
498
  }],
492
499
  billingAccountId: ""
493
500
  });
494
- t?.id ? u(`/billing/checkout/store/${t.id}`) : (console.error("Failed to create order"), D("Failed to create order. Please try again."), T(!1));
501
+ t?.id ? u(`/billing/checkout/store/${t.id}${De.search}`) : (console.error("Failed to create order"), A("Failed to create order. Please try again."), k(!1));
495
502
  } catch (e) {
496
- console.error("Buy Now error:", e), D(e instanceof Error ? e.message : "Failed to start checkout"), T(!1);
503
+ console.error("Buy Now error:", e), A(e instanceof Error ? e.message : "Failed to start checkout"), k(!1);
497
504
  }
498
505
  }
499
506
  }, [
500
- H,
501
- g,
507
+ U,
508
+ _,
502
509
  u
503
- ]), Ve = i(() => {
504
- H && Fe(!0);
505
- }, [H]), He = a(H);
506
- He.current = H;
507
- let Ue = a(x);
508
- Ue.current = x, le(() => {
509
- let e = He.current;
510
- e && Ue.current.emit("store.product.viewed", {
510
+ ]), qe = i(() => {
511
+ U && Ve(!0);
512
+ }, [U]), Je = a(U);
513
+ Je.current = U;
514
+ let Ye = a(E);
515
+ Ye.current = E, ue(() => {
516
+ let e = Je.current;
517
+ e && Ye.current.emit("store.product.viewed", {
511
518
  productId: e.id,
512
519
  productSlug: e.slug,
513
520
  productType: e.type,
514
521
  pricingModel: e.pricingModel
515
522
  });
516
- }, [H?.id]);
517
- let We = i((e, t) => {
518
- H && (x.emit("store.product.installed", {
519
- productId: H.id,
523
+ }, [U?.id]);
524
+ let Xe = i((e, t) => {
525
+ U && (E.emit("store.product.installed", {
526
+ productId: U.id,
520
527
  workspaceId: e
521
- }), console.log(`Successfully installed ${H.name} to workspace ${t} (${e})`));
522
- }, [H, x]), Ge = i((e) => {
528
+ }), console.log(`Successfully installed ${U.name} to workspace ${t} (${e})`));
529
+ }, [U, E]), Ze = i((e) => {
523
530
  console.error("Installation failed:", e.message);
524
- }, []), Ke = i(() => {
525
- F(V?.userReview?.title ?? ""), L(V?.userReview?.comment ?? ""), z(V?.userReview?.rating ?? 5), k(null), j("success"), N(!0);
526
- }, [V?.userReview]), qe = i(async () => {
527
- if (!H) return;
528
- if (R < 1 || R > 5) {
529
- j("error"), k("Choose a rating from 1 to 5 stars.");
531
+ }, []), Qe = i(() => {
532
+ I(H?.userReview?.title ?? ""), R(H?.userReview?.comment ?? ""), B(H?.userReview?.rating ?? 5), j(null), M("success"), P(!0);
533
+ }, [H?.userReview]), $e = i(async () => {
534
+ if (!U) return;
535
+ if (z < 1 || z > 5) {
536
+ M("error"), j("Choose a rating from 1 to 5 stars.");
530
537
  return;
531
538
  }
532
539
  let e = {
533
- productId: H.id,
534
- rating: R,
535
- title: P.trim() || void 0,
536
- comment: I.trim() || void 0
540
+ productId: U.id,
541
+ rating: z,
542
+ title: F.trim() || void 0,
543
+ comment: L.trim() || void 0
537
544
  };
538
- if (!(V?.userReview ? await b(V.userReview.id, {
545
+ if (!(H?.userReview ? await x(H.userReview.id, {
539
546
  rating: e.rating,
540
547
  title: e.title,
541
548
  comment: e.comment
542
- }) : await v(e))) {
543
- j("error"), k("We could not save your review. Please try again.");
549
+ }) : await y(e))) {
550
+ M("error"), j("We could not save your review. Please try again.");
544
551
  return;
545
552
  }
546
- j("success"), k(V?.userReview ? "Your review was updated." : "Your review was submitted."), N(!1), x.emit("store.review.submitted", {
547
- productId: H.id,
548
- rating: R
549
- }), await B();
553
+ M("success"), j(H?.userReview ? "Your review was updated." : "Your review was submitted."), P(!1), E.emit("store.review.submitted", {
554
+ productId: U.id,
555
+ rating: z
556
+ }), await V();
550
557
  }, [
551
- x,
552
- v,
553
- H,
554
- V?.userReview,
555
- B,
556
- I,
557
- R,
558
- P,
559
- b
560
- ]), Je = i(async () => {
561
- if (V?.userReview && (oe("medium"), await ae({
558
+ E,
559
+ y,
560
+ U,
561
+ H?.userReview,
562
+ V,
563
+ L,
564
+ z,
565
+ F,
566
+ x
567
+ ]), et = i(async () => {
568
+ if (H?.userReview && (se("medium"), await oe({
562
569
  title: "Delete review",
563
570
  message: "Are you sure you want to remove your review?",
564
571
  okButtonTitle: "Delete",
565
572
  cancelButtonTitle: "Cancel"
566
573
  }) !== !1)) {
567
- if (!await Ee(V.userReview.id)) {
568
- j("error"), k("We could not remove your review. Please try again."), se("error");
574
+ if (!await C(H.userReview.id)) {
575
+ M("error"), j("We could not remove your review. Please try again."), ce("error");
569
576
  return;
570
577
  }
571
- j("success"), k("Your review was removed."), N(!1), F(""), L(""), z(5), se("success"), await B();
578
+ M("success"), j("Your review was removed."), P(!1), I(""), R(""), B(5), ce("success"), await V();
572
579
  }
573
580
  }, [
574
- Ee,
575
- V?.userReview,
576
- B
577
- ]), Ye = i(async (e) => {
578
- Ne(e), await Oe(e) && await B(), Ne(null);
579
- }, [Oe, B]);
580
- if (Le) return /* @__PURE__ */ d(Se, {});
581
- if (Re) return /* @__PURE__ */ d(Ce, {
582
- error: Re,
583
- onRetry: B,
581
+ C,
582
+ H?.userReview,
583
+ V
584
+ ]), tt = i(async (e) => {
585
+ ze(e), await T(e) && await V(), ze(null);
586
+ }, [T, V]);
587
+ if (Ue) return /* @__PURE__ */ d(Te, {});
588
+ if (We) return /* @__PURE__ */ d(Ee, {
589
+ error: We,
590
+ onRetry: V,
584
591
  onBack: () => u(`${p}/marketplace`)
585
592
  });
586
- if (!V?.product) return /* @__PURE__ */ d("div", {
593
+ if (!H?.product) return /* @__PURE__ */ d("div", {
587
594
  className: "flex h-full items-center justify-center",
588
595
  children: /* @__PURE__ */ f("div", {
589
596
  className: "text-center",
@@ -605,33 +612,33 @@ var ye = (e, t) => ({
605
612
  ]
606
613
  })
607
614
  });
608
- let { reviews: G, reviewsCount: Xe, relatedProducts: K, ratingDistribution: q, isPurchased: J, userEntitlement: Y } = V, X = H, Z = q ? q.fiveStars + q.fourStars + q.threeStars + q.twoStars + q.oneStar : 0, Ze = q ? [
615
+ let { reviews: K, reviewsCount: nt, relatedProducts: q, ratingDistribution: J, isPurchased: Y, userEntitlement: X } = H, Z = U, Q = J ? J.fiveStars + J.fourStars + J.threeStars + J.twoStars + J.oneStar : 0, rt = J ? [
609
616
  {
610
617
  stars: 5,
611
- count: q.fiveStars,
612
- percentage: Z > 0 ? q.fiveStars / Z * 100 : 0
618
+ count: J.fiveStars,
619
+ percentage: Q > 0 ? J.fiveStars / Q * 100 : 0
613
620
  },
614
621
  {
615
622
  stars: 4,
616
- count: q.fourStars,
617
- percentage: Z > 0 ? q.fourStars / Z * 100 : 0
623
+ count: J.fourStars,
624
+ percentage: Q > 0 ? J.fourStars / Q * 100 : 0
618
625
  },
619
626
  {
620
627
  stars: 3,
621
- count: q.threeStars,
622
- percentage: Z > 0 ? q.threeStars / Z * 100 : 0
628
+ count: J.threeStars,
629
+ percentage: Q > 0 ? J.threeStars / Q * 100 : 0
623
630
  },
624
631
  {
625
632
  stars: 2,
626
- count: q.twoStars,
627
- percentage: Z > 0 ? q.twoStars / Z * 100 : 0
633
+ count: J.twoStars,
634
+ percentage: Q > 0 ? J.twoStars / Q * 100 : 0
628
635
  },
629
636
  {
630
637
  stars: 1,
631
- count: q.oneStar,
632
- percentage: Z > 0 ? q.oneStar / Z * 100 : 0
638
+ count: J.oneStar,
639
+ percentage: Q > 0 ? J.oneStar / Q * 100 : 0
633
640
  }
634
- ] : [], Qe = X.requiredPermissions || [], Q = X.integrationDeps || [], $e = () => X.pricingModel === "FREE" ? "Free" : X.pricingModel === "SUBSCRIPTION" ? `${r(X.price, X.currency)}/mo` : r(X.price, X.currency), $ = X.pricingModel === "FREE" || X.price === 0;
641
+ ] : [], it = Z.requiredPermissions || [], at = Z.integrationDeps || [], ot = () => Z.pricingModel === "FREE" ? "Free" : Z.pricingModel === "SUBSCRIPTION" ? `${r(Z.price, Z.currency)}/mo` : r(Z.price, Z.currency), $ = Z.pricingModel === "FREE" || Z.price === 0;
635
642
  return /* @__PURE__ */ f("div", {
636
643
  className: "h-full overflow-y-auto bg-bg-base",
637
644
  children: [
@@ -648,31 +655,31 @@ var ye = (e, t) => ({
648
655
  type: "button",
649
656
  onClick: () => u(-1),
650
657
  className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
651
- children: [/* @__PURE__ */ d(ue, { className: "size-4" }), "Back"]
658
+ children: [/* @__PURE__ */ d(fe, { className: "size-4" }), "Back"]
652
659
  }),
653
660
  /* @__PURE__ */ d("h1", {
654
661
  className: "mb-4 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
655
- children: X.name
662
+ children: Z.name
656
663
  }),
657
664
  /* @__PURE__ */ f("div", {
658
665
  className: "mb-2",
659
- children: [U?.websiteUrl ? /* @__PURE__ */ d("a", {
660
- href: U.websiteUrl,
666
+ children: [W?.websiteUrl ? /* @__PURE__ */ d("a", {
667
+ href: W.websiteUrl,
661
668
  target: "_blank",
662
669
  rel: "noreferrer",
663
670
  className: "text-base font-medium text-text-link hover:underline",
664
- children: U.name
671
+ children: W.name
665
672
  }) : /* @__PURE__ */ d("span", {
666
673
  className: "text-base font-medium text-text-primary",
667
- children: U?.name || X.authorName || "Unknown Publisher"
668
- }), U?.isVerified && /* @__PURE__ */ d(c, { className: "ml-1.5 inline size-4 text-status-success-text" })]
674
+ children: W?.name || Z.authorName || "Unknown Publisher"
675
+ }), W?.isVerified && /* @__PURE__ */ d(c, { className: "ml-1.5 inline size-4 text-status-success-text" })]
669
676
  }),
670
677
  /* @__PURE__ */ f("p", {
671
678
  className: "mb-6 text-sm text-text-muted",
672
679
  children: [
673
- X.category && /* @__PURE__ */ d("span", { children: X.category }),
674
- X.category && " · ",
675
- n(X.downloads),
680
+ Z.category && /* @__PURE__ */ d("span", { children: Z.category }),
681
+ Z.category && " · ",
682
+ n(Z.downloads),
676
683
  "+ downloads"
677
684
  ]
678
685
  }),
@@ -681,13 +688,13 @@ var ye = (e, t) => ({
681
688
  children: [
682
689
  /* @__PURE__ */ d("div", {
683
690
  className: "flex size-12 items-center justify-center overflow-hidden rounded-xl bg-bg-sunken",
684
- children: X.icon ? /* @__PURE__ */ d("img", {
685
- src: X.icon,
691
+ children: Z.icon ? /* @__PURE__ */ d("img", {
692
+ src: Z.icon,
686
693
  alt: "",
687
694
  className: "size-full object-cover"
688
695
  }) : /* @__PURE__ */ d("span", {
689
696
  className: "text-lg font-bold text-text-muted",
690
- children: X.name.charAt(0)
697
+ children: Z.name.charAt(0)
691
698
  })
692
699
  }),
693
700
  /* @__PURE__ */ f("div", {
@@ -695,12 +702,12 @@ var ye = (e, t) => ({
695
702
  children: [
696
703
  /* @__PURE__ */ d("span", {
697
704
  className: "text-sm font-medium text-text-primary",
698
- children: (X.rating || 0).toFixed(1)
705
+ children: (Z.rating || 0).toFixed(1)
699
706
  }),
700
707
  /* @__PURE__ */ d(l, { className: "size-4 fill-current text-status-warning-text" }),
701
708
  /* @__PURE__ */ f("span", {
702
709
  className: "ml-1 text-xs text-text-muted",
703
- children: [n(Xe || X.reviewCount), " reviews"]
710
+ children: [n(nt || Z.reviewCount), " reviews"]
704
711
  })
705
712
  ]
706
713
  }),
@@ -708,7 +715,7 @@ var ye = (e, t) => ({
708
715
  className: "border-l border-border-default pl-4",
709
716
  children: [/* @__PURE__ */ f("span", {
710
717
  className: "text-sm font-medium text-text-primary",
711
- children: [n(X.downloads), "+"]
718
+ children: [n(Z.downloads), "+"]
712
719
  }), /* @__PURE__ */ d("p", {
713
720
  className: "text-xs text-text-muted",
714
721
  children: "Downloads"
@@ -718,7 +725,7 @@ var ye = (e, t) => ({
718
725
  className: "border-l border-border-default pl-4",
719
726
  children: [/* @__PURE__ */ d("span", {
720
727
  className: "rounded bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
721
- children: X.type
728
+ children: Z.type
722
729
  }), /* @__PURE__ */ d("p", {
723
730
  className: "mt-0.5 text-xs text-text-muted",
724
731
  children: "Type"
@@ -726,56 +733,71 @@ var ye = (e, t) => ({
726
733
  })
727
734
  ]
728
735
  }),
729
- E && /* @__PURE__ */ d("div", {
736
+ Fe && /* @__PURE__ */ d("div", {
730
737
  role: "alert",
731
738
  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",
732
- children: E
739
+ children: Fe
733
740
  }),
734
741
  /* @__PURE__ */ f("div", {
735
742
  className: "mb-6 flex items-center gap-3",
736
- children: [J && !$ ? /* @__PURE__ */ d("button", {
743
+ children: [Ae ? /* @__PURE__ */ f("button", {
744
+ type: "button",
745
+ disabled: !0,
746
+ 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",
747
+ children: [/* @__PURE__ */ d("svg", {
748
+ className: "size-4",
749
+ viewBox: "0 0 16 16",
750
+ fill: "none",
751
+ stroke: "currentColor",
752
+ strokeWidth: "2",
753
+ strokeLinecap: "round",
754
+ strokeLinejoin: "round",
755
+ "aria-hidden": "true",
756
+ children: /* @__PURE__ */ d("polyline", { points: "2,8 6,12 14,4" })
757
+ }), "Installed"]
758
+ }) : Y && !$ ? /* @__PURE__ */ d("button", {
737
759
  type: "button",
738
- onClick: Ve,
760
+ onClick: qe,
739
761
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
740
762
  children: "Install to Workspace"
741
763
  }) : $ ? /* @__PURE__ */ d("button", {
742
764
  type: "button",
743
- onClick: Ve,
765
+ onClick: qe,
744
766
  className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
745
767
  children: "Install"
746
768
  }) : /* @__PURE__ */ d("button", {
747
769
  type: "button",
748
- onClick: Be,
749
- disabled: w || _,
770
+ onClick: Ke,
771
+ disabled: Pe || v,
750
772
  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",
751
- children: w || _ ? /* @__PURE__ */ f(he, { children: [/* @__PURE__ */ d(fe, { className: "size-4 animate-spin" }), "Processing…"] }) : `Buy ${$e()}`
752
- }), !$ && !J && /* @__PURE__ */ f("button", {
773
+ children: Pe || v ? /* @__PURE__ */ f(_e, { children: [/* @__PURE__ */ d(me, { className: "size-4 animate-spin" }), "Processing…"] }) : `Buy ${ot()}`
774
+ }), !$ && !Y && /* @__PURE__ */ f("button", {
753
775
  type: "button",
754
- onClick: ze,
755
- disabled: h,
776
+ onClick: Ge,
777
+ disabled: g,
756
778
  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",
757
- children: [h ? /* @__PURE__ */ d(fe, { className: "size-4 animate-spin" }) : W ? /* @__PURE__ */ d(de, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ d(me, { className: "size-4" }), W ? "In Cart" : "Add to Cart"]
779
+ children: [g ? /* @__PURE__ */ d(me, { className: "size-4 animate-spin" }) : G ? /* @__PURE__ */ d(pe, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ d(ge, { className: "size-4" }), G ? "In Cart" : "Add to Cart"]
758
780
  })]
759
781
  }),
760
782
  /* @__PURE__ */ f("p", {
761
783
  className: "flex items-center gap-2 text-xs text-text-muted",
762
- children: [/* @__PURE__ */ d(pe, { className: "size-4" }), "This app is available for your workspace"]
784
+ children: [/* @__PURE__ */ d(he, { className: "size-4" }), "This app is available for your workspace"]
763
785
  }),
764
- Y && /* @__PURE__ */ f("p", {
786
+ X && /* @__PURE__ */ f("p", {
765
787
  className: "mt-2 flex items-center gap-2 text-xs text-text-muted",
766
788
  children: [
767
789
  /* @__PURE__ */ d(c, { className: "size-4 text-status-success-text" }),
768
790
  "License: ",
769
- Y.status,
770
- Y.expiresAt && ` (Expires: ${new Date(Y.expiresAt).toLocaleDateString()})`
791
+ X.status,
792
+ X.expiresAt && ` (Expires: ${new Date(X.expiresAt).toLocaleDateString()})`
771
793
  ]
772
794
  })
773
795
  ]
774
796
  }), /* @__PURE__ */ d("div", {
775
797
  className: "relative flex-1 bg-bg-sunken lg:min-h-[500px]",
776
- children: X.screenshots && X.screenshots.length > 0 ? /* @__PURE__ */ d("img", {
777
- src: X.screenshots[0],
778
- alt: `${X.name} screenshot`,
798
+ children: Z.screenshots && Z.screenshots.length > 0 ? /* @__PURE__ */ d("img", {
799
+ src: Z.screenshots[0],
800
+ alt: `${Z.name} screenshot`,
779
801
  className: "size-full object-cover"
780
802
  }) : /* @__PURE__ */ d("div", {
781
803
  className: "flex h-full min-h-[300px] items-center justify-center",
@@ -783,7 +805,7 @@ var ye = (e, t) => ({
783
805
  className: "text-center",
784
806
  children: [/* @__PURE__ */ d("div", {
785
807
  className: "mx-auto mb-4 flex size-24 items-center justify-center rounded-2xl bg-bg-surface text-4xl font-bold text-text-muted",
786
- children: X.name.charAt(0)
808
+ children: Z.name.charAt(0)
787
809
  }), /* @__PURE__ */ d("p", {
788
810
  className: "text-sm text-text-muted",
789
811
  children: "No preview available"
@@ -801,11 +823,11 @@ var ye = (e, t) => ({
801
823
  children: [/* @__PURE__ */ f("div", {
802
824
  className: "flex-1 lg:max-w-3xl",
803
825
  children: [
804
- X.screenshots && X.screenshots.length > 1 && /* @__PURE__ */ d("section", {
826
+ Z.screenshots && Z.screenshots.length > 1 && /* @__PURE__ */ d("section", {
805
827
  className: "mb-8",
806
828
  children: /* @__PURE__ */ d("div", {
807
829
  className: "flex gap-4 overflow-x-auto pb-4",
808
- children: X.screenshots.map((e, t) => /* @__PURE__ */ d("div", {
830
+ children: Z.screenshots.map((e, t) => /* @__PURE__ */ d("div", {
809
831
  className: "relative h-64 w-96 flex-shrink-0 overflow-hidden rounded-xl bg-bg-sunken",
810
832
  children: /* @__PURE__ */ d("img", {
811
833
  src: e,
@@ -828,18 +850,18 @@ var ye = (e, t) => ({
828
850
  /* @__PURE__ */ f("div", {
829
851
  className: "text-sm leading-relaxed text-text-secondary",
830
852
  children: [/* @__PURE__ */ d("p", {
831
- className: S ? "" : "line-clamp-4",
832
- children: X.longDescription || X.description || "No description available."
833
- }), ((X.longDescription || X.description)?.length ?? 0) > 200 && /* @__PURE__ */ d("button", {
853
+ className: D ? "" : "line-clamp-4",
854
+ children: Z.longDescription || Z.description || "No description available."
855
+ }), ((Z.longDescription || Z.description)?.length ?? 0) > 200 && /* @__PURE__ */ d("button", {
834
856
  type: "button",
835
- onClick: () => Ae(!S),
857
+ onClick: () => Me(!D),
836
858
  className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
837
- children: S ? "Show less" : "Show more"
859
+ children: D ? "Show less" : "Show more"
838
860
  })]
839
861
  }),
840
- X.tags && X.tags.length > 0 && /* @__PURE__ */ d("div", {
862
+ Z.tags && Z.tags.length > 0 && /* @__PURE__ */ d("div", {
841
863
  className: "mt-4 flex flex-wrap gap-2",
842
- children: X.tags.map((e) => /* @__PURE__ */ d("span", {
864
+ children: Z.tags.map((e) => /* @__PURE__ */ d("span", {
843
865
  className: "rounded-full border border-border-default px-3 py-1.5 text-xs text-text-muted transition-colors hover:bg-bg-sunken",
844
866
  children: e
845
867
  }, e))
@@ -858,14 +880,14 @@ var ye = (e, t) => ({
858
880
  }),
859
881
  /* @__PURE__ */ f("div", {
860
882
  className: "rounded-xl border border-border-default bg-bg-surface p-5",
861
- children: [G && G.length > 0 ? /* @__PURE__ */ f("div", {
883
+ children: [K && K.length > 0 ? /* @__PURE__ */ f("div", {
862
884
  className: "flex items-start gap-8",
863
885
  children: [/* @__PURE__ */ f("div", {
864
886
  className: "text-center",
865
887
  children: [
866
888
  /* @__PURE__ */ d("p", {
867
889
  className: "text-5xl font-light text-text-primary",
868
- children: (X.rating || 0).toFixed(1)
890
+ children: (Z.rating || 0).toFixed(1)
869
891
  }),
870
892
  /* @__PURE__ */ d("div", {
871
893
  className: "my-2 flex justify-center gap-0.5",
@@ -875,16 +897,16 @@ var ye = (e, t) => ({
875
897
  3,
876
898
  4,
877
899
  5
878
- ].map((e) => /* @__PURE__ */ d(l, { className: `size-4 ${e <= Math.round(X.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
900
+ ].map((e) => /* @__PURE__ */ d(l, { className: `size-4 ${e <= Math.round(Z.rating || 0) ? "fill-current text-status-warning-text" : "text-text-muted"}` }, e))
879
901
  }),
880
902
  /* @__PURE__ */ f("p", {
881
903
  className: "text-sm text-text-muted",
882
- children: [n(Xe || X.reviewCount), " reviews"]
904
+ children: [n(nt || Z.reviewCount), " reviews"]
883
905
  })
884
906
  ]
885
- }), Ze.length > 0 && /* @__PURE__ */ d("div", {
907
+ }), rt.length > 0 && /* @__PURE__ */ d("div", {
886
908
  className: "flex-1 space-y-1.5",
887
- children: Ze.map((e) => /* @__PURE__ */ d(be, { ...e }, e.stars))
909
+ children: rt.map((e) => /* @__PURE__ */ d(Ce, { ...e }, e.stars))
888
910
  })]
889
911
  }) : /* @__PURE__ */ f("div", {
890
912
  className: "flex flex-col items-center justify-center py-6 text-center",
@@ -910,18 +932,18 @@ var ye = (e, t) => ({
910
932
  ]
911
933
  }), /* @__PURE__ */ f("div", {
912
934
  className: "mt-6 border-t border-border-default pt-4",
913
- children: [O && /* @__PURE__ */ d("p", {
914
- role: A === "success" ? "status" : "alert",
915
- className: `mb-3 rounded-lg px-3 py-2 text-sm ${A === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
916
- children: O
917
- }), J || V?.userReview ? /* @__PURE__ */ f("div", {
935
+ children: [Ie && /* @__PURE__ */ d("p", {
936
+ role: Le === "success" ? "status" : "alert",
937
+ className: `mb-3 rounded-lg px-3 py-2 text-sm ${Le === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
938
+ children: Ie
939
+ }), Y || H?.userReview ? /* @__PURE__ */ f("div", {
918
940
  className: "space-y-4",
919
941
  children: [/* @__PURE__ */ d("button", {
920
942
  type: "button",
921
- onClick: () => M ? N(!1) : Ke(),
943
+ onClick: () => N ? P(!1) : Qe(),
922
944
  className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
923
- children: V?.userReview ? M ? "Cancel review editing" : "Edit your review" : M ? "Cancel review" : "Write a Review"
924
- }), M && /* @__PURE__ */ f("div", {
945
+ children: H?.userReview ? N ? "Cancel review editing" : "Edit your review" : N ? "Cancel review" : "Write a Review"
946
+ }), N && /* @__PURE__ */ f("div", {
925
947
  className: "rounded-xl border border-border-default bg-bg-sunken p-4",
926
948
  children: [
927
949
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
@@ -937,8 +959,8 @@ var ye = (e, t) => ({
937
959
  5
938
960
  ].map((e) => /* @__PURE__ */ f("button", {
939
961
  type: "button",
940
- onClick: () => z(e),
941
- className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${R === 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"}`,
962
+ onClick: () => B(e),
963
+ className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${z === 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"}`,
942
964
  children: [e, " ★"]
943
965
  }, e))
944
966
  })] }),
@@ -946,8 +968,8 @@ var ye = (e, t) => ({
946
968
  className: "mt-4 block text-sm font-medium text-text-primary",
947
969
  children: ["Title", /* @__PURE__ */ d("input", {
948
970
  "aria-label": "Review title",
949
- value: P,
950
- onChange: (e) => F(e.target.value),
971
+ value: F,
972
+ onChange: (e) => I(e.target.value),
951
973
  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",
952
974
  placeholder: "Summarize your experience"
953
975
  })]
@@ -956,8 +978,8 @@ var ye = (e, t) => ({
956
978
  className: "mt-4 block text-sm font-medium text-text-primary",
957
979
  children: ["Review", /* @__PURE__ */ d("textarea", {
958
980
  "aria-label": "Review body",
959
- value: I,
960
- onChange: (e) => L(e.target.value),
981
+ value: L,
982
+ onChange: (e) => R(e.target.value),
961
983
  rows: 4,
962
984
  required: !0,
963
985
  "aria-required": "true",
@@ -969,16 +991,16 @@ var ye = (e, t) => ({
969
991
  className: "mt-4 flex flex-wrap gap-3",
970
992
  children: [/* @__PURE__ */ d("button", {
971
993
  type: "button",
972
- onClick: qe,
973
- disabled: y || Te,
994
+ onClick: $e,
995
+ disabled: b || S,
974
996
  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",
975
- children: y || Te ? "Saving..." : V?.userReview ? "Update Review" : "Submit Review"
976
- }), V?.userReview && /* @__PURE__ */ d("button", {
997
+ children: b || S ? "Saving..." : H?.userReview ? "Update Review" : "Submit Review"
998
+ }), H?.userReview && /* @__PURE__ */ d("button", {
977
999
  type: "button",
978
- onClick: Je,
979
- disabled: De,
1000
+ onClick: et,
1001
+ disabled: w,
980
1002
  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",
981
- children: De ? "Removing..." : "Delete Review"
1003
+ children: w ? "Removing..." : "Delete Review"
982
1004
  })]
983
1005
  })
984
1006
  ]
@@ -989,36 +1011,36 @@ var ye = (e, t) => ({
989
1011
  })]
990
1012
  })]
991
1013
  }),
992
- G && G.length > 0 && /* @__PURE__ */ f("div", {
1014
+ K && K.length > 0 && /* @__PURE__ */ f("div", {
993
1015
  className: "mt-4 space-y-3",
994
1016
  children: [/* @__PURE__ */ d("ul", {
995
1017
  className: "space-y-3",
996
- children: (C ? G : G.slice(0, 2)).map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(xe, {
1018
+ children: (O ? K : K.slice(0, 2)).map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(we, {
997
1019
  review: e,
998
- onMarkHelpful: Ye,
999
- markingHelpful: ke && Me === e.id
1020
+ onMarkHelpful: tt,
1021
+ markingHelpful: je && Re === e.id
1000
1022
  }) }, e.id))
1001
- }), G.length > 2 && /* @__PURE__ */ d("button", {
1023
+ }), K.length > 2 && /* @__PURE__ */ d("button", {
1002
1024
  type: "button",
1003
- onClick: () => je(!C),
1025
+ onClick: () => Ne(!O),
1004
1026
  className: "cursor-pointer text-sm font-medium text-text-link",
1005
- children: C ? "Show less" : `Show all ${G.length} reviews`
1027
+ children: O ? "Show less" : `Show all ${K.length} reviews`
1006
1028
  })]
1007
1029
  }),
1008
- (!G || G.length === 0) && /* @__PURE__ */ d("p", {
1030
+ (!K || K.length === 0) && /* @__PURE__ */ d("p", {
1009
1031
  className: "mt-4 text-sm text-text-muted",
1010
1032
  children: "No reviews yet. Be the first to review!"
1011
1033
  })
1012
1034
  ]
1013
1035
  }),
1014
- Qe.length > 0 && /* @__PURE__ */ f("section", {
1036
+ it.length > 0 && /* @__PURE__ */ f("section", {
1015
1037
  className: "mb-8",
1016
1038
  children: [/* @__PURE__ */ d("h2", {
1017
1039
  className: "mb-4 text-lg font-medium text-text-primary",
1018
1040
  children: "Required Permissions"
1019
1041
  }), /* @__PURE__ */ d("div", {
1020
1042
  className: "space-y-2",
1021
- children: Qe.map((e) => /* @__PURE__ */ f("div", {
1043
+ children: it.map((e) => /* @__PURE__ */ f("div", {
1022
1044
  className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
1023
1045
  children: [/* @__PURE__ */ d(c, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ d("span", {
1024
1046
  className: "text-sm text-text-primary",
@@ -1027,14 +1049,14 @@ var ye = (e, t) => ({
1027
1049
  }, e))
1028
1050
  })]
1029
1051
  }),
1030
- Q.length > 0 && /* @__PURE__ */ f("section", {
1052
+ at.length > 0 && /* @__PURE__ */ f("section", {
1031
1053
  className: "mb-8",
1032
1054
  children: [/* @__PURE__ */ d("h2", {
1033
1055
  className: "mb-4 text-lg font-medium text-text-primary",
1034
1056
  children: "Integrations"
1035
1057
  }), /* @__PURE__ */ d("div", {
1036
1058
  className: "flex flex-wrap gap-2",
1037
- children: Q.map((e) => /* @__PURE__ */ d("span", {
1059
+ children: at.map((e) => /* @__PURE__ */ d("span", {
1038
1060
  className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
1039
1061
  children: e
1040
1062
  }, e))
@@ -1048,47 +1070,47 @@ var ye = (e, t) => ({
1048
1070
  }), /* @__PURE__ */ f("div", {
1049
1071
  className: "grid grid-cols-2 gap-6 md:grid-cols-3",
1050
1072
  children: [
1051
- X.manifestVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1073
+ Z.manifestVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1052
1074
  className: "text-xs text-text-muted",
1053
1075
  children: "Version"
1054
1076
  }), /* @__PURE__ */ d("p", {
1055
1077
  className: "mt-1 text-sm font-medium text-text-primary",
1056
- children: X.manifestVersion
1078
+ children: Z.manifestVersion
1057
1079
  })] }),
1058
1080
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1059
1081
  className: "text-xs text-text-muted",
1060
1082
  children: "Type"
1061
1083
  }), /* @__PURE__ */ d("p", {
1062
1084
  className: "mt-1 text-sm font-medium text-text-primary",
1063
- children: X.type
1085
+ children: Z.type
1064
1086
  })] }),
1065
- X.publishedAt && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1087
+ Z.publishedAt && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1066
1088
  className: "text-xs text-text-muted",
1067
1089
  children: "Published"
1068
1090
  }), /* @__PURE__ */ d("p", {
1069
1091
  className: "mt-1 text-sm font-medium text-text-primary",
1070
- children: new Date(X.publishedAt).toLocaleDateString()
1092
+ children: new Date(Z.publishedAt).toLocaleDateString()
1071
1093
  })] }),
1072
1094
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1073
1095
  className: "text-xs text-text-muted",
1074
1096
  children: "Updated"
1075
1097
  }), /* @__PURE__ */ d("p", {
1076
1098
  className: "mt-1 text-sm font-medium text-text-primary",
1077
- children: new Date(X.updatedAt).toLocaleDateString()
1099
+ children: new Date(Z.updatedAt).toLocaleDateString()
1078
1100
  })] }),
1079
- X.license && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1101
+ Z.license && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1080
1102
  className: "text-xs text-text-muted",
1081
1103
  children: "License"
1082
1104
  }), /* @__PURE__ */ d("p", {
1083
1105
  className: "mt-1 text-sm font-medium text-text-primary",
1084
- children: X.license
1106
+ children: Z.license
1085
1107
  })] }),
1086
- X.minPlatformVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1108
+ Z.minPlatformVersion && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1087
1109
  className: "text-xs text-text-muted",
1088
1110
  children: "Min Platform Version"
1089
1111
  }), /* @__PURE__ */ d("p", {
1090
1112
  className: "mt-1 text-sm font-medium text-text-primary",
1091
- children: X.minPlatformVersion
1113
+ children: Z.minPlatformVersion
1092
1114
  })] })
1093
1115
  ]
1094
1116
  })]
@@ -1097,7 +1119,7 @@ var ye = (e, t) => ({
1097
1119
  }), /* @__PURE__ */ f("div", {
1098
1120
  className: "w-full lg:w-80",
1099
1121
  children: [
1100
- (X.documentationUrl || X.repositoryUrl || U?.email) && /* @__PURE__ */ f("div", {
1122
+ (Z.documentationUrl || Z.repositoryUrl || W?.email) && /* @__PURE__ */ f("div", {
1101
1123
  className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
1102
1124
  children: [/* @__PURE__ */ d("h3", {
1103
1125
  className: "font-medium text-text-primary",
@@ -1105,29 +1127,29 @@ var ye = (e, t) => ({
1105
1127
  }), /* @__PURE__ */ f("div", {
1106
1128
  className: "mt-3 space-y-2 text-sm",
1107
1129
  children: [
1108
- X.documentationUrl && /* @__PURE__ */ d("a", {
1109
- href: X.documentationUrl,
1130
+ Z.documentationUrl && /* @__PURE__ */ d("a", {
1131
+ href: Z.documentationUrl,
1110
1132
  target: "_blank",
1111
1133
  rel: "noreferrer",
1112
1134
  className: "block text-text-link hover:underline",
1113
1135
  children: "Documentation"
1114
1136
  }),
1115
- X.repositoryUrl && /* @__PURE__ */ d("a", {
1116
- href: X.repositoryUrl,
1137
+ Z.repositoryUrl && /* @__PURE__ */ d("a", {
1138
+ href: Z.repositoryUrl,
1117
1139
  target: "_blank",
1118
1140
  rel: "noreferrer",
1119
1141
  className: "block text-text-link hover:underline",
1120
1142
  children: "Source repository"
1121
1143
  }),
1122
- U?.email && /* @__PURE__ */ d("a", {
1123
- href: `mailto:${U.email}`,
1144
+ W?.email && /* @__PURE__ */ d("a", {
1145
+ href: `mailto:${W.email}`,
1124
1146
  className: "block text-text-link hover:underline",
1125
1147
  children: "Contact publisher"
1126
1148
  })
1127
1149
  ]
1128
1150
  })]
1129
1151
  }),
1130
- U && /* @__PURE__ */ f("div", {
1152
+ W && /* @__PURE__ */ f("div", {
1131
1153
  className: "mb-6 rounded-xl border border-border-default bg-bg-surface p-4",
1132
1154
  children: [
1133
1155
  /* @__PURE__ */ d("h3", {
@@ -1136,14 +1158,14 @@ var ye = (e, t) => ({
1136
1158
  }),
1137
1159
  /* @__PURE__ */ d("p", {
1138
1160
  className: "mt-2 text-sm text-text-primary",
1139
- children: U.name
1161
+ children: W.name
1140
1162
  }),
1141
- U.bio && /* @__PURE__ */ d("p", {
1163
+ W.bio && /* @__PURE__ */ d("p", {
1142
1164
  className: "mt-2 text-sm text-text-muted",
1143
- children: U.bio
1165
+ children: W.bio
1144
1166
  }),
1145
- U.websiteUrl && /* @__PURE__ */ d("a", {
1146
- href: U.websiteUrl,
1167
+ W.websiteUrl && /* @__PURE__ */ d("a", {
1168
+ href: W.websiteUrl,
1147
1169
  target: "_blank",
1148
1170
  rel: "noreferrer",
1149
1171
  className: "mt-3 inline-block text-sm text-text-link hover:underline",
@@ -1151,7 +1173,7 @@ var ye = (e, t) => ({
1151
1173
  })
1152
1174
  ]
1153
1175
  }),
1154
- K && K.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
1176
+ q && q.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
1155
1177
  className: "mb-4 flex items-center justify-between text-left",
1156
1178
  children: /* @__PURE__ */ d("span", {
1157
1179
  className: "font-medium text-text-primary",
@@ -1159,7 +1181,7 @@ var ye = (e, t) => ({
1159
1181
  })
1160
1182
  }), /* @__PURE__ */ d("div", {
1161
1183
  className: "space-y-3",
1162
- children: K.slice(0, 4).map((e) => /* @__PURE__ */ f("button", {
1184
+ children: q.slice(0, 4).map((e) => /* @__PURE__ */ f("button", {
1163
1185
  type: "button",
1164
1186
  onClick: () => u(`${p}/marketplace/product/${e.id}`),
1165
1187
  className: "flex w-full cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-bg-sunken",
@@ -1179,7 +1201,7 @@ var ye = (e, t) => ({
1179
1201
  }),
1180
1202
  /* @__PURE__ */ d("p", {
1181
1203
  className: "text-xs text-text-muted",
1182
- children: U?.name || "Unknown"
1204
+ children: W?.name || "Unknown"
1183
1205
  }),
1184
1206
  (e.reviewCount ?? 0) > 0 && /* @__PURE__ */ f("div", {
1185
1207
  className: "flex items-center gap-1",
@@ -1196,25 +1218,25 @@ var ye = (e, t) => ({
1196
1218
  })]
1197
1219
  })
1198
1220
  }),
1199
- X && /* @__PURE__ */ d(ce, {
1200
- isOpen: Pe,
1201
- onClose: () => Fe(!1),
1221
+ Z && /* @__PURE__ */ d(le, {
1222
+ isOpen: Be,
1223
+ onClose: () => Ve(!1),
1202
1224
  app: {
1203
- id: X.id,
1204
- name: X.name,
1205
- slug: X.slug,
1206
- icon: X.icon,
1207
- type: X.type,
1208
- version: X.manifestVersion
1225
+ id: Z.id,
1226
+ name: Z.name,
1227
+ slug: Z.slug,
1228
+ icon: Z.icon,
1229
+ type: Z.type,
1230
+ version: Z.manifestVersion
1209
1231
  },
1210
- purchaseState: J && !$ ? "purchased" : "free",
1211
- onInstallSuccess: We,
1212
- onInstallError: Ge
1232
+ purchaseState: Y && !$ ? "purchased" : "free",
1233
+ onInstallSuccess: Xe,
1234
+ onInstallError: Ze
1213
1235
  })
1214
1236
  ]
1215
1237
  });
1216
1238
  };
1217
1239
  //#endregion
1218
- export { p as ProductDetailPage };
1240
+ export { De as ProductDetailPage };
1219
1241
 
1220
1242
  //# sourceMappingURL=ProductDetailPage.js.map