@burdenoff/microfe-store 2026.525.2 → 2026.527.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 (120) hide show
  1. package/dist/StoreAdminRoutes.js +10 -9
  2. package/dist/StoreAdminRoutes.js.map +1 -1
  3. package/dist/StoreRoutes.js +2 -1
  4. package/dist/StoreRoutes.js.map +1 -1
  5. package/dist/components/AccessDenied.js +23 -0
  6. package/dist/components/AccessDenied.js.map +1 -0
  7. package/dist/components/InstallAppModal.js +183 -129
  8. package/dist/components/InstallAppModal.js.map +1 -1
  9. package/dist/components/PermissionGuard.js +8 -0
  10. package/dist/components/PermissionGuard.js.map +1 -0
  11. package/dist/components/RouteGuards.js +7 -21
  12. package/dist/components/RouteGuards.js.map +1 -1
  13. package/dist/components/cart/CartDrawer.js +20 -14
  14. package/dist/components/cart/CartDrawer.js.map +1 -1
  15. package/dist/hooks/useStoreGraphQL.js +22 -20
  16. package/dist/hooks/useStoreGraphQL.js.map +1 -1
  17. package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
  18. package/dist/hooks/useStorePermissions.js +4 -1
  19. package/dist/hooks/useStorePermissions.js.map +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/pages/AdminDashboardPage.js +182 -183
  22. package/dist/pages/AdminDashboardPage.js.map +1 -1
  23. package/dist/pages/AdminReviewModerationPage.js +7 -6
  24. package/dist/pages/AdminReviewModerationPage.js.map +1 -1
  25. package/dist/pages/AdminStoresPage.js +193 -185
  26. package/dist/pages/AdminStoresPage.js.map +1 -1
  27. package/dist/pages/AdminSubmissionsQueuePage.js +140 -142
  28. package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
  29. package/dist/pages/AppDetailPage.js +6 -3
  30. package/dist/pages/AppDetailPage.js.map +1 -1
  31. package/dist/pages/AppSettingsPage.js +6 -3
  32. package/dist/pages/AppSettingsPage.js.map +1 -1
  33. package/dist/pages/CartPage.js +23 -15
  34. package/dist/pages/CartPage.js.map +1 -1
  35. package/dist/pages/InstalledAppsPage.js +26 -15
  36. package/dist/pages/InstalledAppsPage.js.map +1 -1
  37. package/dist/pages/MarketplaceHomePage.js +275 -247
  38. package/dist/pages/MarketplaceHomePage.js.map +1 -1
  39. package/dist/pages/MyLicensesPage.js +10 -8
  40. package/dist/pages/MyLicensesPage.js.map +1 -1
  41. package/dist/pages/OrderConfirmationPage.js +72 -75
  42. package/dist/pages/OrderConfirmationPage.js.map +1 -1
  43. package/dist/pages/OrdersPage.js +22 -20
  44. package/dist/pages/OrdersPage.js.map +1 -1
  45. package/dist/pages/ProductCategoryPage.js +3 -1
  46. package/dist/pages/ProductCategoryPage.js.map +1 -1
  47. package/dist/pages/ProductDetailPage.js +458 -443
  48. package/dist/pages/ProductDetailPage.js.map +1 -1
  49. package/dist/pages/ProductReviewsPage.js +4 -3
  50. package/dist/pages/ProductReviewsPage.js.map +1 -1
  51. package/dist/pages/PublisherDashboardPage.js +13 -7
  52. package/dist/pages/PublisherDashboardPage.js.map +1 -1
  53. package/dist/pages/PublisherRevenuePage.js +7 -5
  54. package/dist/pages/PublisherRevenuePage.js.map +1 -1
  55. package/dist/pages/PublisherSubmissionsPage.js +12 -7
  56. package/dist/pages/PublisherSubmissionsPage.js.map +1 -1
  57. package/dist/pages/PublisherSubmitPage.js +6 -0
  58. package/dist/pages/PublisherSubmitPage.js.map +1 -1
  59. package/dist/pages/SearchResultsPage.js +6 -3
  60. package/dist/pages/SearchResultsPage.js.map +1 -1
  61. package/dist/pages/StoresPage.js +73 -74
  62. package/dist/pages/StoresPage.js.map +1 -1
  63. package/dist/providers/StoreProvider.js +25 -25
  64. package/dist/providers/StoreProvider.js.map +1 -1
  65. package/dist/utils/index.js +29 -19
  66. package/dist/utils/index.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/StoreAdminRoot.d.ts +0 -22
  69. package/dist/StoreAdminRoutes.d.ts +0 -9
  70. package/dist/StoreRoot.d.ts +0 -31
  71. package/dist/StoreRoutes.d.ts +0 -12
  72. package/dist/components/InstallAppModal.d.ts +0 -26
  73. package/dist/components/RouteGuards.d.ts +0 -17
  74. package/dist/components/cart/CartDrawer.d.ts +0 -35
  75. package/dist/components/index.d.ts +0 -9
  76. package/dist/components/index.js +0 -3
  77. package/dist/components/marketplace/ProductCard.d.ts +0 -18
  78. package/dist/components/marketplace/ProductCard.js +0 -2
  79. package/dist/dev/main.d.ts +0 -1
  80. package/dist/generated/global-operations.d.ts +0 -2012
  81. package/dist/generated/global-types.d.ts +0 -23526
  82. package/dist/generated/wspace-operations.d.ts +0 -1
  83. package/dist/generated/wspace-types.d.ts +0 -57850
  84. package/dist/hooks/index.d.ts +0 -12
  85. package/dist/hooks/useBackendCart.d.ts +0 -73
  86. package/dist/hooks/useCart.d.ts +0 -62
  87. package/dist/hooks/useInstallations.d.ts +0 -43
  88. package/dist/hooks/useOrders.d.ts +0 -40
  89. package/dist/hooks/useProductSearch.d.ts +0 -22
  90. package/dist/hooks/useStoreGraphQL.d.ts +0 -475
  91. package/dist/hooks/useStoreGraphQLWithContext.d.ts +0 -48
  92. package/dist/hooks/useStorePermissions.d.ts +0 -63
  93. package/dist/index.d.ts +0 -44
  94. package/dist/pages/AdminDashboardPage.d.ts +0 -3
  95. package/dist/pages/AdminReviewModerationPage.d.ts +0 -3
  96. package/dist/pages/AdminStoresPage.d.ts +0 -3
  97. package/dist/pages/AdminSubmissionsQueuePage.d.ts +0 -3
  98. package/dist/pages/AppDetailPage.d.ts +0 -3
  99. package/dist/pages/AppSettingsPage.d.ts +0 -3
  100. package/dist/pages/CartPage.d.ts +0 -8
  101. package/dist/pages/InstalledAppsPage.d.ts +0 -8
  102. package/dist/pages/MarketplaceHomePage.d.ts +0 -3
  103. package/dist/pages/MyLicensesPage.d.ts +0 -3
  104. package/dist/pages/OrderConfirmationPage.d.ts +0 -3
  105. package/dist/pages/OrdersPage.d.ts +0 -8
  106. package/dist/pages/ProductCategoryPage.d.ts +0 -3
  107. package/dist/pages/ProductDetailPage.d.ts +0 -8
  108. package/dist/pages/ProductReviewsPage.d.ts +0 -3
  109. package/dist/pages/PublisherDashboardPage.d.ts +0 -3
  110. package/dist/pages/PublisherRevenuePage.d.ts +0 -3
  111. package/dist/pages/PublisherSubmissionsPage.d.ts +0 -3
  112. package/dist/pages/PublisherSubmitPage.d.ts +0 -3
  113. package/dist/pages/SearchResultsPage.d.ts +0 -3
  114. package/dist/pages/StoresPage.d.ts +0 -3
  115. package/dist/providers/StoreProvider.d.ts +0 -38
  116. package/dist/store/storeStore.d.ts +0 -69
  117. package/dist/translations/en.d.ts +0 -518
  118. package/dist/types/index.d.ts +0 -575
  119. package/dist/utils/index.d.ts +0 -67
  120. package/dist/utils/nativeBridge.d.ts +0 -2
@@ -3,15 +3,15 @@ import { useCart as t } from "../hooks/useCart.js";
3
3
  import { useBrowseStoreWithContext as n, useHomeGroupedProducts as r } from "../hooks/useStoreGraphQL.js";
4
4
  import { PricingModel as i, ProductNature as a, StoreSortBy as o } from "../generated/global-types.js";
5
5
  import { CartDrawer as ee } from "../components/cart/CartDrawer.js";
6
- import { useCallback as te, useEffect as ne, useId as re, useMemo as s, useState as c } from "react";
7
- import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { AlertCircle as ae, Bot as l, Box as u, Brain as d, ChevronDown as f, ChevronRight as oe, Clock as se, Database as ce, Download as le, FileCode2 as ue, Filter as de, Gift as fe, GitBranch as p, LayoutDashboard as m, Loader2 as pe, Puzzle as h, Search as me, ShoppingCart as he, SlidersHorizontal as ge, Sparkles as g, Star as _, TrendingUp as _e, X as v } from "lucide-react";
9
- import { Fragment as ve, jsx as y, jsxs as b } from "react/jsx-runtime";
10
- import { useNavigate as ye } from "react-router-dom";
11
- import { useEventBus as be } from "@burdenoff/fe-libs/shared/events";
12
- import { useDebounce as xe } from "@burdenoff/fe-libs/shared/hooks";
6
+ import { useCallback as te, useEffect as ne, useId as re, useMemo as s, useRef as ie, useState as c } from "react";
7
+ import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { AlertCircle as oe, Bot as l, Box as u, Brain as d, ChevronDown as f, ChevronRight as se, Clock as ce, Database as le, Download as ue, FileCode2 as de, Filter as fe, Gift as pe, GitBranch as p, LayoutDashboard as m, Loader2 as me, Puzzle as h, Search as he, ShoppingCart as ge, SlidersHorizontal as _e, Sparkles as g, Star as _, TrendingUp as ve, X as v } from "lucide-react";
9
+ import { Fragment as ye, jsx as y, jsxs as b } from "react/jsx-runtime";
10
+ import { useNavigate as be } from "react-router-dom";
11
+ import { useEventBus as xe } from "@burdenoff/fe-libs/shared/events";
12
+ import { useDebounce as Se } from "@burdenoff/fe-libs/shared/hooks";
13
13
  //#region src/pages/MarketplaceHomePage.tsx
14
- var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K` : e.toString(), S = (e) => e.pricingModel === "FREE" || e.price === 0 ? "Free" : `$${e.price}`, C = (e) => ({
14
+ var Ce = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K` : e.toString(), x = (e) => e.pricingModel === "FREE" || e.price === 0 ? "Free" : `$${e.price}`, S = (e) => ({
15
15
  BOTAPP: "var(--color-accent-blue)",
16
16
  AGENT: "var(--color-accent-purple)",
17
17
  CONSOLE: "var(--color-accent-teal)",
@@ -29,7 +29,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
29
29
  THEME: "var(--color-accent-purple)",
30
30
  PLUGIN: "var(--color-status-success-bg)",
31
31
  COMPONENT: "var(--color-accent-blue)"
32
- })[e] || "var(--color-text-muted)", w = (e) => `color-mix(in srgb, ${C(e)}, transparent 85%)`, T = {
32
+ })[e] || "var(--color-text-muted)", C = (e) => `color-mix(in srgb, ${S(e)}, transparent 85%)`, w = {
33
33
  BOTAPP: l,
34
34
  AGENT: d,
35
35
  CONSOLE: m,
@@ -38,8 +38,8 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
38
38
  WIDGET: h,
39
39
  VIBEMODULE: h,
40
40
  DASHBOARD: m,
41
- PARSER: ue,
42
- DATASINK: ce,
41
+ PARSER: de,
42
+ DATASINK: le,
43
43
  APP: u,
44
44
  TEMPLATE: m,
45
45
  INTEGRATION: p,
@@ -47,31 +47,32 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
47
47
  THEME: h,
48
48
  PLUGIN: h,
49
49
  COMPONENT: u
50
- }, E = ({ type: e, className: t, style: n }) => /* @__PURE__ */ y(T[e] || u, {
50
+ }, T = ({ type: e, className: t, style: n }) => /* @__PURE__ */ y(w[e] || u, {
51
51
  className: t,
52
52
  style: n
53
- }), D = ({ product: e, onClick: t, variant: n = "default" }) => {
54
- let r = C(e.type);
53
+ }), E = ({ product: e, onClick: t, variant: n = "default" }) => {
54
+ let r = S(e.type);
55
55
  return n === "featured" ? /* @__PURE__ */ b("button", {
56
+ type: "button",
56
57
  onClick: t,
57
- className: "group relative flex h-full w-full cursor-pointer flex-col overflow-hidden rounded-2xl border border-border-default bg-gradient-to-br from-bg-surface to-bg-sunken p-6 text-left transition-all hover:border-action-primary-border hover:shadow-lg",
58
+ className: "group relative flex size-full cursor-pointer flex-col overflow-hidden rounded-2xl border border-border-default bg-gradient-to-br from-bg-surface to-bg-sunken p-6 text-left transition-all hover:border-action-primary-border hover:shadow-lg",
58
59
  children: [
59
60
  e.featured && /* @__PURE__ */ b("div", {
60
61
  className: "absolute right-4 top-4 flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-1 text-xs font-medium text-status-warning-text",
61
- children: [/* @__PURE__ */ y(g, { className: "h-3 w-3" }), "Featured"]
62
+ children: [/* @__PURE__ */ y(g, { className: "size-3" }), "Featured"]
62
63
  }),
63
64
  /* @__PURE__ */ b("div", {
64
65
  className: "flex items-start gap-4",
65
66
  children: [/* @__PURE__ */ y("div", {
66
- className: "flex h-16 w-16 flex-shrink-0 items-center justify-center rounded-2xl",
67
- style: { backgroundColor: w(e.type) },
67
+ className: "flex size-16 flex-shrink-0 items-center justify-center rounded-2xl",
68
+ style: { backgroundColor: C(e.type) },
68
69
  children: e.icon ? /* @__PURE__ */ y("img", {
69
70
  src: e.icon,
70
71
  alt: e.name,
71
- className: "h-10 w-10 rounded-lg object-cover"
72
- }) : /* @__PURE__ */ y(E, {
72
+ className: "size-10 rounded-lg object-cover"
73
+ }) : /* @__PURE__ */ y(T, {
73
74
  type: e.type,
74
- className: "h-10 w-10",
75
+ className: "size-10",
75
76
  style: { color: r }
76
77
  })
77
78
  }), /* @__PURE__ */ b("div", {
@@ -81,9 +82,9 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
81
82
  children: e.name
82
83
  }), /* @__PURE__ */ b("p", {
83
84
  className: "flex items-center gap-2 text-sm text-text-muted",
84
- children: [/* @__PURE__ */ y(E, {
85
+ children: [/* @__PURE__ */ y(T, {
85
86
  type: e.type,
86
- className: "h-3.5 w-3.5"
87
+ className: "size-3.5"
87
88
  }), e.category || e.type]
88
89
  })]
89
90
  })]
@@ -98,31 +99,32 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
98
99
  className: "flex items-center gap-3",
99
100
  children: [/* @__PURE__ */ b("span", {
100
101
  className: "flex items-center gap-1 text-sm text-text-muted",
101
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4 fill-current text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
102
+ children: [/* @__PURE__ */ y(_, { className: "size-4 fill-current text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
102
103
  }), /* @__PURE__ */ b("span", {
103
104
  className: "flex items-center gap-1 text-sm text-text-muted",
104
- children: [/* @__PURE__ */ y(le, { className: "h-4 w-4" }), x(e.downloads)]
105
+ children: [/* @__PURE__ */ y(ue, { className: "size-4" }), Ce(e.downloads)]
105
106
  })]
106
107
  }), /* @__PURE__ */ y("span", {
107
108
  className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-sm font-medium text-text-link",
108
- children: S(e)
109
+ children: x(e)
109
110
  })]
110
111
  })
111
112
  ]
112
113
  }) : n === "compact" ? /* @__PURE__ */ b("button", {
114
+ type: "button",
113
115
  onClick: t,
114
116
  className: "group flex cursor-pointer items-center gap-3 rounded-xl border border-transparent p-3 text-left transition-all hover:border-border-default hover:bg-bg-surface",
115
117
  children: [
116
118
  /* @__PURE__ */ y("div", {
117
- className: "flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-xl",
118
- style: { backgroundColor: w(e.type) },
119
+ className: "flex size-12 flex-shrink-0 items-center justify-center rounded-xl",
120
+ style: { backgroundColor: C(e.type) },
119
121
  children: e.icon ? /* @__PURE__ */ y("img", {
120
122
  src: e.icon,
121
123
  alt: e.name,
122
- className: "h-8 w-8 rounded-lg object-cover"
123
- }) : /* @__PURE__ */ y(E, {
124
+ className: "size-8 rounded-lg object-cover"
125
+ }) : /* @__PURE__ */ y(T, {
124
126
  type: e.type,
125
- className: "h-8 w-8",
127
+ className: "size-8",
126
128
  style: { color: r }
127
129
  })
128
130
  }),
@@ -143,25 +145,26 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
143
145
  }),
144
146
  /* @__PURE__ */ y("span", {
145
147
  className: "text-xs font-medium text-text-muted",
146
- children: S(e)
148
+ children: x(e)
147
149
  })
148
150
  ]
149
151
  }) : /* @__PURE__ */ b("button", {
152
+ type: "button",
150
153
  onClick: t,
151
154
  className: "group flex cursor-pointer flex-col overflow-hidden rounded-xl border border-border-default bg-bg-surface p-4 text-left transition-all hover:border-action-primary-border hover:shadow-md",
152
155
  children: [
153
156
  /* @__PURE__ */ b("div", {
154
157
  className: "flex items-start gap-3",
155
158
  children: [/* @__PURE__ */ y("div", {
156
- className: "flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-xl",
157
- style: { backgroundColor: w(e.type) },
159
+ className: "flex size-14 flex-shrink-0 items-center justify-center rounded-xl",
160
+ style: { backgroundColor: C(e.type) },
158
161
  children: e.icon ? /* @__PURE__ */ y("img", {
159
162
  src: e.icon,
160
163
  alt: e.name,
161
- className: "h-9 w-9 rounded-lg object-cover"
162
- }) : /* @__PURE__ */ y(E, {
164
+ className: "size-9 rounded-lg object-cover"
165
+ }) : /* @__PURE__ */ y(T, {
163
166
  type: e.type,
164
- className: "h-9 w-9",
167
+ className: "size-9",
165
168
  style: { color: r }
166
169
  })
167
170
  }), /* @__PURE__ */ b("div", {
@@ -171,9 +174,9 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
171
174
  children: e.name
172
175
  }), /* @__PURE__ */ b("p", {
173
176
  className: "flex items-center gap-1.5 text-xs text-text-muted",
174
- children: [/* @__PURE__ */ y(E, {
177
+ children: [/* @__PURE__ */ y(T, {
175
178
  type: e.type,
176
- className: "h-3 w-3"
179
+ className: "size-3"
177
180
  }), e.category || e.type]
178
181
  })]
179
182
  })]
@@ -189,7 +192,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
189
192
  children: [
190
193
  /* @__PURE__ */ b("span", {
191
194
  className: "flex items-center gap-0.5 text-xs text-text-muted",
192
- children: [/* @__PURE__ */ y(_, { className: "h-3.5 w-3.5 fill-current text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
195
+ children: [/* @__PURE__ */ y(_, { className: "size-3.5 fill-current text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
193
196
  }),
194
197
  /* @__PURE__ */ y("span", {
195
198
  className: "text-xs text-text-muted",
@@ -197,23 +200,23 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
197
200
  }),
198
201
  /* @__PURE__ */ b("span", {
199
202
  className: "text-xs text-text-muted",
200
- children: [x(e.downloads), " downloads"]
203
+ children: [Ce(e.downloads), " downloads"]
201
204
  })
202
205
  ]
203
206
  }), /* @__PURE__ */ y("span", {
204
207
  className: "text-xs font-semibold text-text-link",
205
- children: S(e)
208
+ children: x(e)
206
209
  })]
207
210
  })
208
211
  ]
209
212
  });
210
- }, O = ({ icon: e, title: t, subtitle: n, onViewAll: r }) => /* @__PURE__ */ b("div", {
213
+ }, D = ({ icon: e, title: t, subtitle: n, onViewAll: r }) => /* @__PURE__ */ b("div", {
211
214
  className: "mb-4 flex items-center justify-between",
212
215
  children: [/* @__PURE__ */ b("div", {
213
216
  className: "flex items-center gap-3",
214
217
  children: [/* @__PURE__ */ y("div", {
215
- className: "flex h-10 w-10 items-center justify-center rounded-xl bg-action-primary-bg/10",
216
- children: /* @__PURE__ */ y(e, { className: "h-5 w-5 text-text-link" })
218
+ className: "flex size-10 items-center justify-center rounded-xl bg-action-primary-bg/10",
219
+ children: /* @__PURE__ */ y(e, { className: "size-5 text-text-link" })
217
220
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
218
221
  className: "text-lg font-semibold text-text-primary",
219
222
  children: t
@@ -222,17 +225,19 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
222
225
  children: n
223
226
  })] })]
224
227
  }), r && /* @__PURE__ */ b("button", {
228
+ type: "button",
225
229
  onClick: r,
226
230
  className: "cursor-pointer flex items-center gap-1 text-sm font-medium text-text-link hover:underline",
227
- children: ["View all", /* @__PURE__ */ y(oe, { className: "h-4 w-4" })]
231
+ children: ["View all", /* @__PURE__ */ y(se, { className: "size-4" })]
228
232
  })]
229
- }), Se = ({ typeId: e, name: t, count: n, active: r, onClick: i }) => /* @__PURE__ */ b("button", {
233
+ }), we = ({ typeId: e, name: t, count: n, active: r, onClick: i }) => /* @__PURE__ */ b("button", {
234
+ type: "button",
230
235
  onClick: i,
231
236
  className: `flex cursor-pointer items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-all ${r ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"}`,
232
237
  children: [
233
- /* @__PURE__ */ y(E, {
238
+ /* @__PURE__ */ y(T, {
234
239
  type: e,
235
- className: "h-4 w-4"
240
+ className: "size-4"
236
241
  }),
237
242
  t,
238
243
  /* @__PURE__ */ y("span", {
@@ -240,10 +245,10 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
240
245
  children: n
241
246
  })
242
247
  ]
243
- }), Ce = ({ featuredProducts: e, onProductClick: t }) => {
248
+ }), Te = ({ featuredProducts: e, onProductClick: t }) => {
244
249
  let [n, r] = c(0), i = e[n] || e[0];
245
250
  if (!i) return null;
246
- let a = C(i.type);
251
+ let a = S(i.type);
247
252
  return /* @__PURE__ */ b("div", {
248
253
  className: "relative overflow-hidden rounded-2xl bg-gradient-to-r from-bg-surface via-bg-sunken to-bg-surface p-8",
249
254
  children: [
@@ -260,7 +265,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
260
265
  className: "mb-4 flex items-center gap-2",
261
266
  children: [/* @__PURE__ */ b("span", {
262
267
  className: "flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-3 py-1 text-xs font-semibold text-status-warning-text",
263
- children: [/* @__PURE__ */ y(g, { className: "h-3 w-3" }), "Featured App"]
268
+ children: [/* @__PURE__ */ y(g, { className: "size-3" }), "Featured App"]
264
269
  }), /* @__PURE__ */ y("span", {
265
270
  className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-text-link",
266
271
  children: i.category || i.type
@@ -279,7 +284,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
279
284
  children: [/* @__PURE__ */ b("span", {
280
285
  className: "flex items-center gap-1 text-sm",
281
286
  children: [
282
- /* @__PURE__ */ y(_, { className: "h-5 w-5 fill-current text-status-warning-text" }),
287
+ /* @__PURE__ */ y(_, { className: "size-5 fill-current text-status-warning-text" }),
283
288
  /* @__PURE__ */ y("span", {
284
289
  className: "font-semibold text-text-primary",
285
290
  children: (i.rating ?? 0).toFixed(1)
@@ -296,13 +301,14 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
296
301
  }), /* @__PURE__ */ b("span", {
297
302
  className: "flex items-center gap-1 text-sm text-text-muted",
298
303
  children: [
299
- /* @__PURE__ */ y(le, { className: "h-4 w-4" }),
304
+ /* @__PURE__ */ y(ue, { className: "size-4" }),
300
305
  i.downloads.toLocaleString(),
301
306
  " downloads"
302
307
  ]
303
308
  })]
304
309
  }),
305
310
  /* @__PURE__ */ y("button", {
311
+ type: "button",
306
312
  onClick: () => t(i),
307
313
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-6 py-3 font-semibold text-action-primary-text transition-opacity hover:opacity-90",
308
314
  children: "View Details"
@@ -311,15 +317,15 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
311
317
  }), /* @__PURE__ */ y("div", {
312
318
  className: "hidden flex-shrink-0 lg:block",
313
319
  children: /* @__PURE__ */ y("div", {
314
- className: "flex h-48 w-48 items-center justify-center rounded-3xl shadow-lg",
315
- style: { backgroundColor: w(i.type) },
320
+ className: "flex size-48 items-center justify-center rounded-3xl shadow-lg",
321
+ style: { backgroundColor: C(i.type) },
316
322
  children: i.icon ? /* @__PURE__ */ y("img", {
317
323
  src: i.icon,
318
324
  alt: i.name,
319
- className: "h-32 w-32 rounded-2xl object-cover"
320
- }) : /* @__PURE__ */ y(E, {
325
+ className: "size-32 rounded-2xl object-cover"
326
+ }) : /* @__PURE__ */ y(T, {
321
327
  type: i.type,
322
- className: "h-32 w-32",
328
+ className: "size-32",
323
329
  style: { color: a }
324
330
  })
325
331
  })
@@ -328,6 +334,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
328
334
  e.length > 1 && /* @__PURE__ */ y("div", {
329
335
  className: "relative z-10 mt-6 flex gap-2",
330
336
  children: e.map((e, t) => /* @__PURE__ */ y("button", {
337
+ type: "button",
331
338
  onClick: () => r(t),
332
339
  className: `h-2 w-8 rounded-full transition-all ${t === n ? "bg-action-primary-bg" : "bg-border-default hover:bg-action-primary-border"}`,
333
340
  "aria-label": `View ${e.name}`
@@ -335,11 +342,11 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
335
342
  })
336
343
  ]
337
344
  });
338
- }, k = ({ variant: e = "default" }) => e === "featured" ? /* @__PURE__ */ b("div", {
345
+ }, O = ({ variant: e = "default" }) => e === "featured" ? /* @__PURE__ */ b("div", {
339
346
  className: "h-full animate-pulse rounded-2xl border border-border-default bg-bg-surface p-6",
340
347
  children: [/* @__PURE__ */ b("div", {
341
348
  className: "flex items-start gap-4",
342
- children: [/* @__PURE__ */ y("div", { className: "h-16 w-16 rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
349
+ children: [/* @__PURE__ */ y("div", { className: "size-16 rounded-2xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
343
350
  className: "flex-1 space-y-2",
344
351
  children: [/* @__PURE__ */ y("div", { className: "h-5 w-3/4 rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", { className: "h-4 w-1/2 rounded bg-bg-sunken" })]
345
352
  })]
@@ -349,7 +356,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
349
356
  })]
350
357
  }) : e === "compact" ? /* @__PURE__ */ b("div", {
351
358
  className: "flex animate-pulse items-center gap-3 p-3",
352
- children: [/* @__PURE__ */ y("div", { className: "h-12 w-12 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
359
+ children: [/* @__PURE__ */ y("div", { className: "size-12 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
353
360
  className: "flex-1 space-y-2",
354
361
  children: [/* @__PURE__ */ y("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", { className: "h-3 w-1/2 rounded bg-bg-sunken" })]
355
362
  })]
@@ -357,7 +364,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
357
364
  className: "animate-pulse rounded-xl border border-border-default bg-bg-surface p-4",
358
365
  children: [/* @__PURE__ */ b("div", {
359
366
  className: "flex items-start gap-3",
360
- children: [/* @__PURE__ */ y("div", { className: "h-14 w-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
367
+ children: [/* @__PURE__ */ y("div", { className: "size-14 rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
361
368
  className: "flex-1 space-y-2",
362
369
  children: [/* @__PURE__ */ y("div", { className: "h-4 w-3/4 rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", { className: "h-3 w-1/2 rounded bg-bg-sunken" })]
363
370
  })]
@@ -365,7 +372,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
365
372
  className: "mt-3 space-y-2",
366
373
  children: [/* @__PURE__ */ y("div", { className: "h-3 w-full rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", { className: "h-3 w-2/3 rounded bg-bg-sunken" })]
367
374
  })]
368
- }), A = () => /* @__PURE__ */ b("div", {
375
+ }), k = () => /* @__PURE__ */ b("div", {
369
376
  className: "animate-pulse rounded-2xl bg-gradient-to-r from-bg-surface via-bg-sunken to-bg-surface p-8",
370
377
  children: [/* @__PURE__ */ b("div", {
371
378
  className: "flex items-center gap-8",
@@ -387,7 +394,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
387
394
  }),
388
395
  /* @__PURE__ */ y("div", { className: "h-12 w-36 rounded-lg bg-bg-sunken" })
389
396
  ]
390
- }), /* @__PURE__ */ y("div", { className: "hidden h-48 w-48 rounded-3xl bg-bg-sunken lg:block" })]
397
+ }), /* @__PURE__ */ y("div", { className: "hidden size-48 rounded-3xl bg-bg-sunken lg:block" })]
391
398
  }), /* @__PURE__ */ y("div", {
392
399
  className: "mt-6 flex gap-2",
393
400
  children: [...[
@@ -396,7 +403,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
396
403
  ,
397
404
  ]].map((e, t) => /* @__PURE__ */ y("div", { className: "h-2 w-8 rounded-full bg-bg-sunken" }, t))
398
405
  })]
399
- }), j = [
406
+ }), A = [
400
407
  100,
401
408
  120,
402
409
  90,
@@ -405,30 +412,30 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
405
412
  95,
406
413
  115,
407
414
  105
408
- ], M = () => /* @__PURE__ */ b("div", {
415
+ ], j = () => /* @__PURE__ */ b("div", {
409
416
  className: "space-y-4",
410
417
  children: [/* @__PURE__ */ y("div", { className: "h-6 w-32 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", {
411
418
  className: "flex flex-wrap gap-2",
412
- children: j.map((e, t) => /* @__PURE__ */ y("div", {
419
+ children: A.map((e, t) => /* @__PURE__ */ y("div", {
413
420
  className: "h-9 animate-pulse rounded-full bg-bg-sunken",
414
421
  style: { width: `${e}px` }
415
422
  }, t))
416
423
  })]
417
- }), N = () => /* @__PURE__ */ b("div", {
424
+ }), M = () => /* @__PURE__ */ b("div", {
418
425
  className: "mb-4 flex items-center justify-between",
419
426
  children: [/* @__PURE__ */ b("div", {
420
427
  className: "flex items-center gap-3",
421
- children: [/* @__PURE__ */ y("div", { className: "h-10 w-10 animate-pulse rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
428
+ children: [/* @__PURE__ */ y("div", { className: "size-10 animate-pulse rounded-xl bg-bg-sunken" }), /* @__PURE__ */ b("div", {
422
429
  className: "space-y-1",
423
430
  children: [/* @__PURE__ */ y("div", { className: "h-5 w-40 animate-pulse rounded bg-bg-sunken" }), /* @__PURE__ */ y("div", { className: "h-4 w-32 animate-pulse rounded bg-bg-sunken" })]
424
431
  })]
425
432
  }), /* @__PURE__ */ y("div", { className: "h-4 w-16 animate-pulse rounded bg-bg-sunken" })]
426
- }), we = () => /* @__PURE__ */ b("div", {
427
- className: "mx-auto max-w-7xl space-y-8 px-6 py-6",
433
+ }), Ee = () => /* @__PURE__ */ b("div", {
434
+ className: "mx-auto max-w-7xl space-y-8 p-6",
428
435
  children: [
429
- /* @__PURE__ */ y(A, {}),
430
- /* @__PURE__ */ y(M, {}),
431
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(N, {}), /* @__PURE__ */ y("div", {
436
+ /* @__PURE__ */ y(k, {}),
437
+ /* @__PURE__ */ y(j, {}),
438
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(M, {}), /* @__PURE__ */ y("div", {
432
439
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
433
440
  children: [...[
434
441
  ,
@@ -437,9 +444,9 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
437
444
  ,
438
445
  ,
439
446
  ,
440
- ]].map((e, t) => /* @__PURE__ */ y(k, {}, t))
447
+ ]].map((e, t) => /* @__PURE__ */ y(O, {}, t))
441
448
  })] }),
442
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(N, {}), /* @__PURE__ */ y("div", {
449
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(M, {}), /* @__PURE__ */ y("div", {
443
450
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
444
451
  children: [...[
445
452
  ,
@@ -448,9 +455,9 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
448
455
  ,
449
456
  ,
450
457
  ,
451
- ]].map((e, t) => /* @__PURE__ */ y(k, {}, t))
458
+ ]].map((e, t) => /* @__PURE__ */ y(O, {}, t))
452
459
  })] }),
453
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(N, {}), /* @__PURE__ */ y("div", {
460
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y(M, {}), /* @__PURE__ */ y("div", {
454
461
  className: "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-6",
455
462
  children: [...[
456
463
  ,
@@ -459,10 +466,10 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
459
466
  ,
460
467
  ,
461
468
  ,
462
- ]].map((e, t) => /* @__PURE__ */ y(k, { variant: "compact" }, t))
469
+ ]].map((e, t) => /* @__PURE__ */ y(O, { variant: "compact" }, t))
463
470
  })] })
464
471
  ]
465
- }), P = ({ label: e, value: t, options: n, onChange: r }) => {
472
+ }), N = ({ label: e, value: t, options: n, onChange: r }) => {
466
473
  let i = re();
467
474
  return /* @__PURE__ */ b("label", {
468
475
  htmlFor: i,
@@ -487,11 +494,11 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
487
494
  children: e.label
488
495
  }, e.value))
489
496
  }),
490
- /* @__PURE__ */ y(f, { className: "pointer-events-none absolute right-3 h-4 w-4 text-text-muted" })
497
+ /* @__PURE__ */ y(f, { className: "pointer-events-none absolute right-3 size-4 text-text-muted" })
491
498
  ]
492
499
  });
493
- }, F = () => {
494
- let l = ye(), { basePath: d } = e(), { t: f } = ie(), oe = re(), ce = be(), { cartOpen: le, closeCart: ue, itemCount: p, cartItems: m, subtotal: h, tax: x, total: S, updateQuantity: C, removeProduct: w } = t(), [T, E] = c(""), [k, A] = c("all"), [j, M] = c("all"), [N, F] = c("any"), [I, Te] = c("all"), [L, Ee] = c("all"), [R, De] = c("all"), [z, Oe] = c(!1), [B, ke] = c("relevance"), [Ae, je] = c(!1), V = xe(T, 1500), Me = [
500
+ }, P = () => {
501
+ let l = be(), { basePath: d } = e(), { t: f } = ae(), se = re(), le = xe(), { cartOpen: ue, closeCart: de, itemCount: p, cartItems: m, subtotal: h, tax: Ce, total: x, updateQuantity: S, removeProduct: C } = t(), [w, T] = c(""), [O, k] = c("all"), [A, j] = c("all"), [M, P] = c("any"), [F, De] = c("all"), [I, Oe] = c("all"), [L, ke] = c("all"), [R, Ae] = c(!1), [z, je] = c("relevance"), [B, Me] = c(!1), V = Se(w, 1500), Ne = [
495
502
  {
496
503
  value: "all",
497
504
  label: "All Prices"
@@ -508,7 +515,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
508
515
  value: "subscription",
509
516
  label: "Subscription"
510
517
  }
511
- ], Ne = [
518
+ ], Pe = [
512
519
  {
513
520
  value: "any",
514
521
  label: "Any Rating"
@@ -529,7 +536,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
529
536
  value: "4.5",
530
537
  label: "4.5+ Stars"
531
538
  }
532
- ], Pe = [
539
+ ], Fe = [
533
540
  {
534
541
  value: "all",
535
542
  label: "All Types"
@@ -542,7 +549,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
542
549
  value: "physical",
543
550
  label: "Physical"
544
551
  }
545
- ], Fe = [
552
+ ], Ie = [
546
553
  {
547
554
  value: "relevance",
548
555
  label: "Relevance"
@@ -571,7 +578,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
571
578
  value: "name-asc",
572
579
  label: "Name A-Z"
573
580
  }
574
- ], Ie = (e) => ({
581
+ ], Le = (e) => ({
575
582
  relevance: o.Relevance,
576
583
  rating: o.Rating,
577
584
  downloads: o.Downloads,
@@ -579,47 +586,49 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
579
586
  "price-low": o.PriceLow,
580
587
  "price-high": o.PriceHigh,
581
588
  "name-asc": o.NameAsc
582
- })[e], Le = (e) => {
589
+ })[e], Re = (e) => {
583
590
  if (e !== "all") return {
584
591
  free: i.Free,
585
592
  paid: i.PaidOnetime,
586
593
  subscription: i.Subscription
587
594
  }[e];
588
- }, H = V.trim() !== "" || j !== "all" || N !== "any" || I !== "all" || L !== "all" || R !== "all" || z || k !== "all" || B !== "relevance", Re = T.trim() !== "" && T !== V, ze = () => {
589
- E(""), M("all"), F("any"), Te("all"), Ee("all"), De("all"), Oe(!1), ke("relevance"), A("all");
590
- }, U = (j === "all" ? 0 : 1) + (N === "any" ? 0 : 1) + (I === "all" ? 0 : 1) + (L === "all" ? 0 : 1) + (R === "all" ? 0 : 1) + +!!z + (k === "all" ? 0 : 1), Be = s(() => {
595
+ }, H = V.trim() !== "" || A !== "all" || M !== "any" || F !== "all" || I !== "all" || L !== "all" || R || O !== "all" || z !== "relevance", ze = w.trim() !== "" && w !== V, Be = () => {
596
+ T(""), j("all"), P("any"), De("all"), Oe("all"), ke("all"), Ae(!1), je("relevance"), k("all");
597
+ }, U = (A === "all" ? 0 : 1) + (M === "any" ? 0 : 1) + (F === "all" ? 0 : 1) + (I === "all" ? 0 : 1) + (L === "all" ? 0 : 1) + +!!R + (O === "all" ? 0 : 1), Ve = s(() => {
591
598
  let e = {
592
- sortBy: Ie(B),
599
+ sortBy: Le(z),
593
600
  pagination: { limit: 50 }
594
601
  };
595
602
  if (H) {
596
- e.filter = {}, V.trim() && (e.filter.search = V.trim()), k !== "all" && (e.filter.type = k), L !== "all" && (e.filter.category = L), I !== "all" && (e.filter.nature = I === "digital" ? a.Digital : a.Physical);
597
- let t = Le(j);
598
- t && (e.filter.pricingModel = t), N !== "any" && (e.filter.minRating = parseFloat(N)), z && (e.filter.featured = !0), R !== "all" && (e.filter.license = R);
603
+ e.filter = {}, V.trim() && (e.filter.search = V.trim()), O !== "all" && (e.filter.type = O), I !== "all" && (e.filter.category = I), F !== "all" && (e.filter.nature = F === "digital" ? a.Digital : a.Physical);
604
+ let t = Re(A);
605
+ t && (e.filter.pricingModel = t), M !== "any" && (e.filter.minRating = parseFloat(M)), R && (e.filter.featured = !0), L !== "all" && (e.filter.license = L);
599
606
  }
600
607
  return e;
601
608
  }, [
602
609
  V,
603
- k,
604
- L,
610
+ O,
605
611
  I,
606
- j,
607
- N,
608
- z,
612
+ F,
613
+ A,
614
+ M,
609
615
  R,
610
- B,
616
+ L,
617
+ z,
611
618
  H
612
- ]), { featured: W, mostDownloaded: G, recentlyAdded: K, freeItems: q, loading: Ve, error: He, refetch: Ue } = r({ skip: H }), { products: We, totalCount: J, facets: Y, loading: X, error: Ge, refetch: Ke } = n(H ? Be : {}, { skip: !H }), qe = H ? X : Ve, Z = H ? Ge : He, Je = H ? Ke : Ue, Ye = H ? We : [];
613
- ne(() => {
614
- !V.trim() || X || ce.emit("store.marketplace.searched", {
619
+ ]), { featured: W, mostDownloaded: G, recentlyAdded: K, freeItems: q, loading: He, error: Ue, refetch: We } = r({ skip: H }), { products: Ge, totalCount: J, facets: Y, loading: X, error: Ke, refetch: qe } = n(H ? Ve : {}, { skip: !H }), Je = H ? X : He, Z = H ? Ke : Ue, Ye = H ? qe : We, Xe = H ? Ge : [], Ze = ie(J);
620
+ Ze.current = J;
621
+ let Qe = ie(le);
622
+ Qe.current = le, ne(() => {
623
+ !V.trim() || X || Qe.current.emit("store.marketplace.searched", {
615
624
  query: V,
616
- resultCount: J
625
+ resultCount: Ze.current
617
626
  });
618
627
  }, [V, X]);
619
628
  let Q = te((e) => {
620
629
  l(`${d}/marketplace/product/${e.id}`);
621
- }, [l, d]), Xe = () => {
622
- ue(), l(`${d}/cart`);
630
+ }, [l, d]), $e = () => {
631
+ de(), l(`${d}/cart`);
623
632
  }, $ = s(() => [...new Map([
624
633
  ...W,
625
634
  ...G,
@@ -630,27 +639,31 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
630
639
  G,
631
640
  K,
632
641
  q
633
- ]), Ze = s(() => Y?.types && Y.types.length > 0 ? [{
634
- id: "all",
635
- name: "All Apps",
636
- count: J
637
- }, ...Y.types.map((e) => ({
638
- id: e.value,
639
- name: e.value.charAt(0) + e.value.slice(1).toLowerCase().replace(/_/g, " "),
640
- count: e.count
641
- }))] : [{
642
- id: "all",
643
- name: "All Apps",
644
- count: $.length
645
- }, ...Array.from(new Set($.map((e) => e.type))).map((e) => ({
646
- id: e,
647
- name: e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "),
648
- count: $.filter((t) => t.type === e).length
649
- })).filter((e) => e.count > 0).sort((e, t) => t.count - e.count)], [
642
+ ]), et = s(() => {
643
+ if (Y?.types && Y.types.length > 0) return [{
644
+ id: "all",
645
+ name: "All Apps",
646
+ count: J
647
+ }, ...Y.types.map((e) => ({
648
+ id: e.value,
649
+ name: e.value.charAt(0) + e.value.slice(1).toLowerCase().replace(/_/g, " "),
650
+ count: e.count
651
+ }))];
652
+ let e = $.reduce((e, t) => (e.set(t.type, (e.get(t.type) ?? 0) + 1), e), /* @__PURE__ */ new Map()), t = Array.from(e.entries()).flatMap(([e, t]) => t > 0 ? [{
653
+ id: e,
654
+ name: e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "),
655
+ count: t
656
+ }] : []).sort((e, t) => t.count - e.count);
657
+ return [{
658
+ id: "all",
659
+ name: "All Apps",
660
+ count: $.length
661
+ }, ...t];
662
+ }, [
650
663
  Y,
651
664
  $,
652
665
  J
653
- ]), Qe = s(() => Y?.categories && Y.categories.length > 0 ? [{
666
+ ]), tt = s(() => Y?.categories && Y.categories.length > 0 ? [{
654
667
  value: "all",
655
668
  label: "All Categories"
656
669
  }, ...Y.categories.map((e) => ({
@@ -659,10 +672,10 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
659
672
  }))] : [{
660
673
  value: "all",
661
674
  label: "All Categories"
662
- }, ...Array.from(new Set($.map((e) => e.category).filter(Boolean))).map((e) => ({
675
+ }, ...Array.from(new Set($.flatMap((e) => e.category ? [e.category] : []))).map((e) => ({
663
676
  value: e,
664
677
  label: e
665
- })).sort((e, t) => e.label.localeCompare(t.label))], [Y, $]), $e = s(() => Y?.licenses && Y.licenses.length > 0 ? [{
678
+ })).sort((e, t) => e.label.localeCompare(t.label))], [Y, $]), nt = s(() => Y?.licenses && Y.licenses.length > 0 ? [{
666
679
  value: "all",
667
680
  label: "All Licenses"
668
681
  }, ...Y.licenses.map((e) => ({
@@ -687,13 +700,14 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
687
700
  className: "text-sm text-text-muted",
688
701
  children: f("pages.marketplace.subtitle", { defaultValue: "Discover apps, workflows, and integrations for your workspace" })
689
702
  })] }), /* @__PURE__ */ b("button", {
703
+ type: "button",
690
704
  onClick: () => l(`${d}/cart`),
691
705
  className: "cursor-pointer relative flex items-center gap-2 rounded-lg border border-border-default bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
692
706
  children: [
693
- /* @__PURE__ */ y(he, { className: "h-5 w-5" }),
707
+ /* @__PURE__ */ y(ge, { className: "size-5" }),
694
708
  f("pages.marketplace.cart", { defaultValue: "Cart" }),
695
709
  p > 0 && /* @__PURE__ */ y("span", {
696
- className: "absolute -right-2 -top-2 flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
710
+ className: "absolute -right-2 -top-2 flex size-5 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
697
711
  children: p
698
712
  })
699
713
  ]
@@ -705,35 +719,35 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
705
719
  className: "relative",
706
720
  children: [
707
721
  /* @__PURE__ */ y("label", {
708
- htmlFor: oe,
722
+ htmlFor: se,
709
723
  className: "sr-only",
710
724
  children: f("pages.marketplace.search.label", { defaultValue: "Search marketplace products" })
711
725
  }),
712
- /* @__PURE__ */ y(me, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-text-muted" }),
726
+ /* @__PURE__ */ y(he, { className: "absolute left-4 top-1/2 size-5 -translate-y-1/2 text-text-muted" }),
713
727
  /* @__PURE__ */ y("input", {
714
- id: oe,
728
+ id: se,
715
729
  "aria-label": f("pages.marketplace.search.label", { defaultValue: "Search marketplace products" }),
716
730
  type: "text",
717
- value: T,
718
- onChange: (e) => E(e.target.value),
731
+ value: w,
732
+ onChange: (e) => T(e.target.value),
719
733
  placeholder: f("pages.marketplace.search.placeholder", { defaultValue: "Search apps, workflows, integrations..." }),
720
734
  className: "w-full rounded-xl border border-border-default bg-bg-sunken py-3 pl-12 pr-4 text-text-primary placeholder-text-muted focus:border-action-primary-border focus:bg-bg-surface focus:outline-none focus:ring-2 focus:ring-action-primary-border/20"
721
735
  }),
722
- T && /* @__PURE__ */ y("button", {
736
+ w && /* @__PURE__ */ y("button", {
723
737
  type: "button",
724
- onClick: () => E(""),
738
+ onClick: () => T(""),
725
739
  "aria-label": f("pages.marketplace.search.clear", { defaultValue: "Clear search" }),
726
740
  className: "cursor-pointer absolute right-4 top-1/2 -translate-y-1/2 text-text-muted transition-colors hover:text-text-primary",
727
741
  children: /* @__PURE__ */ y(v, {
728
- className: "h-4 w-4",
742
+ className: "size-4",
729
743
  "aria-hidden": "true"
730
744
  })
731
745
  })
732
746
  ]
733
- }), T.trim() && /* @__PURE__ */ y("div", {
747
+ }), w.trim() && /* @__PURE__ */ y("div", {
734
748
  "aria-live": "polite",
735
749
  className: "mt-2 flex items-center gap-2 text-sm text-text-muted",
736
- children: Re || X ? /* @__PURE__ */ b(ve, { children: [/* @__PURE__ */ y(pe, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ y("span", { children: f("pages.marketplace.search.searching", { defaultValue: "Searching..." }) })] }) : /* @__PURE__ */ b("span", { children: [
750
+ children: ze || X ? /* @__PURE__ */ b(ye, { children: [/* @__PURE__ */ y(me, { className: "size-4 animate-spin" }), /* @__PURE__ */ y("span", { children: f("pages.marketplace.search.searching", { defaultValue: "Searching..." }) })] }) : /* @__PURE__ */ b("span", { children: [
737
751
  J,
738
752
  " result",
739
753
  J === 1 ? "" : "s",
@@ -747,13 +761,14 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
747
761
  className: "mt-4 flex flex-wrap items-center gap-3",
748
762
  children: [
749
763
  /* @__PURE__ */ b("button", {
750
- onClick: () => je(!Ae),
751
- className: `cursor-pointer flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${Ae || U > 0 ? "border-action-primary-border bg-action-primary-bg/10 text-text-link" : "border-border-default bg-bg-surface text-text-primary transition-colors hover:bg-bg-sunken"}`,
764
+ type: "button",
765
+ onClick: () => Me(!B),
766
+ className: `cursor-pointer flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${B || U > 0 ? "border-action-primary-border bg-action-primary-bg/10 text-text-link" : "border-border-default bg-bg-surface text-text-primary transition-colors hover:bg-bg-sunken"}`,
752
767
  children: [
753
- /* @__PURE__ */ y(ge, { className: "h-4 w-4" }),
768
+ /* @__PURE__ */ y(_e, { className: "size-4" }),
754
769
  f("pages.marketplace.filters", { defaultValue: "Filters" }),
755
770
  U > 0 && /* @__PURE__ */ y("span", {
756
- className: "flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-xs text-action-primary-text",
771
+ className: "flex size-5 items-center justify-center rounded-full bg-action-primary-bg text-xs text-action-primary-text",
757
772
  children: U
758
773
  })
759
774
  ]
@@ -762,42 +777,46 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
762
777
  className: "flex flex-wrap items-center gap-2",
763
778
  children: [
764
779
  /* @__PURE__ */ b("button", {
765
- onClick: () => M(j === "free" ? "all" : "free"),
766
- className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${j === "free" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
767
- children: [/* @__PURE__ */ y(fe, { className: "h-3.5 w-3.5" }), "Free"]
780
+ type: "button",
781
+ onClick: () => j(A === "free" ? "all" : "free"),
782
+ className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${A === "free" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
783
+ children: [/* @__PURE__ */ y(pe, { className: "size-3.5" }), "Free"]
768
784
  }),
769
785
  /* @__PURE__ */ b("button", {
770
- onClick: () => F(N === "4" ? "any" : "4"),
771
- className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${N === "4" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
772
- children: [/* @__PURE__ */ y(_, { className: "h-3.5 w-3.5" }), "4+ Stars"]
786
+ type: "button",
787
+ onClick: () => P(M === "4" ? "any" : "4"),
788
+ className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${M === "4" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
789
+ children: [/* @__PURE__ */ y(_, { className: "size-3.5" }), "4+ Stars"]
773
790
  }),
774
791
  /* @__PURE__ */ b("button", {
775
- onClick: () => Oe(!z),
776
- className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${z ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
777
- children: [/* @__PURE__ */ y(g, { className: "h-3.5 w-3.5" }), "Featured"]
792
+ type: "button",
793
+ onClick: () => Ae(!R),
794
+ className: `cursor-pointer flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors ${R ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary transition-colors hover:bg-bg-surface"}`,
795
+ children: [/* @__PURE__ */ y(g, { className: "size-3.5" }), "Featured"]
778
796
  })
779
797
  ]
780
798
  }),
781
799
  H && /* @__PURE__ */ b("button", {
782
- onClick: ze,
800
+ type: "button",
801
+ onClick: Be,
783
802
  className: "cursor-pointer flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-text-primary",
784
803
  children: [/* @__PURE__ */ y(v, {
785
- className: "h-4 w-4",
804
+ className: "size-4",
786
805
  "aria-hidden": "true"
787
806
  }), "Clear all"]
788
807
  }),
789
808
  /* @__PURE__ */ y("div", {
790
809
  className: "ml-auto",
791
- children: /* @__PURE__ */ y(P, {
810
+ children: /* @__PURE__ */ y(N, {
792
811
  label: "Sort",
793
- value: B,
794
- options: Fe,
795
- onChange: (e) => ke(e)
812
+ value: z,
813
+ options: Ie,
814
+ onChange: (e) => je(e)
796
815
  })
797
816
  })
798
817
  ]
799
818
  }),
800
- Ae && /* @__PURE__ */ b("div", {
819
+ B && /* @__PURE__ */ b("div", {
801
820
  className: "mt-4 rounded-lg border border-border-default bg-bg-surface p-4",
802
821
  children: [/* @__PURE__ */ b("div", {
803
822
  className: "flex flex-wrap items-start gap-6",
@@ -807,11 +826,11 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
807
826
  children: [/* @__PURE__ */ y("span", {
808
827
  className: "text-xs font-medium uppercase tracking-wider text-text-muted",
809
828
  children: "Pricing"
810
- }), /* @__PURE__ */ y(P, {
829
+ }), /* @__PURE__ */ y(N, {
811
830
  label: "Price",
812
- value: j,
813
- options: Me,
814
- onChange: (e) => M(e)
831
+ value: A,
832
+ options: Ne,
833
+ onChange: (e) => j(e)
815
834
  })]
816
835
  }),
817
836
  /* @__PURE__ */ b("div", {
@@ -819,23 +838,23 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
819
838
  children: [/* @__PURE__ */ y("span", {
820
839
  className: "text-xs font-medium uppercase tracking-wider text-text-muted",
821
840
  children: "Min Rating"
822
- }), /* @__PURE__ */ y(P, {
841
+ }), /* @__PURE__ */ y(N, {
823
842
  label: "Rating",
824
- value: N,
825
- options: Ne,
826
- onChange: (e) => F(e)
843
+ value: M,
844
+ options: Pe,
845
+ onChange: (e) => P(e)
827
846
  })]
828
847
  }),
829
- Qe.length > 1 && /* @__PURE__ */ b("div", {
848
+ tt.length > 1 && /* @__PURE__ */ b("div", {
830
849
  className: "flex flex-col gap-2",
831
850
  children: [/* @__PURE__ */ y("span", {
832
851
  className: "text-xs font-medium uppercase tracking-wider text-text-muted",
833
852
  children: "Category"
834
- }), /* @__PURE__ */ y(P, {
853
+ }), /* @__PURE__ */ y(N, {
835
854
  label: "Category",
836
- value: L,
837
- options: Qe,
838
- onChange: Ee
855
+ value: I,
856
+ options: tt,
857
+ onChange: Oe
839
858
  })]
840
859
  }),
841
860
  /* @__PURE__ */ b("div", {
@@ -843,23 +862,23 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
843
862
  children: [/* @__PURE__ */ y("span", {
844
863
  className: "text-xs font-medium uppercase tracking-wider text-text-muted",
845
864
  children: "Nature"
846
- }), /* @__PURE__ */ y(P, {
865
+ }), /* @__PURE__ */ y(N, {
847
866
  label: "Nature",
848
- value: I,
849
- options: Pe,
850
- onChange: (e) => Te(e)
867
+ value: F,
868
+ options: Fe,
869
+ onChange: (e) => De(e)
851
870
  })]
852
871
  }),
853
- $e.length > 1 && /* @__PURE__ */ b("div", {
872
+ nt.length > 1 && /* @__PURE__ */ b("div", {
854
873
  className: "flex flex-col gap-2",
855
874
  children: [/* @__PURE__ */ y("span", {
856
875
  className: "text-xs font-medium uppercase tracking-wider text-text-muted",
857
876
  children: "License"
858
- }), /* @__PURE__ */ y(P, {
877
+ }), /* @__PURE__ */ y(N, {
859
878
  label: "License",
860
- value: R,
861
- options: $e,
862
- onChange: De
879
+ value: L,
880
+ options: nt,
881
+ onChange: ke
863
882
  })]
864
883
  })
865
884
  ]
@@ -870,8 +889,9 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
870
889
  className: "text-xs font-medium text-text-muted",
871
890
  children: "Active filters:"
872
891
  }),
873
- k !== "all" && /* @__PURE__ */ b("button", {
874
- onClick: () => A("all"),
892
+ O !== "all" && /* @__PURE__ */ b("button", {
893
+ type: "button",
894
+ onClick: () => k("all"),
875
895
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
876
896
  children: [
877
897
  /* @__PURE__ */ y("span", {
@@ -879,15 +899,16 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
879
899
  children: "Type:"
880
900
  }),
881
901
  " ",
882
- k,
902
+ O,
883
903
  /* @__PURE__ */ y(v, {
884
- className: "h-3 w-3",
904
+ className: "size-3",
885
905
  "aria-hidden": "true"
886
906
  })
887
907
  ]
888
908
  }),
889
- j !== "all" && /* @__PURE__ */ b("button", {
890
- onClick: () => M("all"),
909
+ A !== "all" && /* @__PURE__ */ b("button", {
910
+ type: "button",
911
+ onClick: () => j("all"),
891
912
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
892
913
  children: [
893
914
  /* @__PURE__ */ y("span", {
@@ -895,15 +916,16 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
895
916
  children: "Price:"
896
917
  }),
897
918
  " ",
898
- Me.find((e) => e.value === j)?.label,
919
+ Ne.find((e) => e.value === A)?.label,
899
920
  /* @__PURE__ */ y(v, {
900
- className: "h-3 w-3",
921
+ className: "size-3",
901
922
  "aria-hidden": "true"
902
923
  })
903
924
  ]
904
925
  }),
905
- N !== "any" && /* @__PURE__ */ b("button", {
906
- onClick: () => F("any"),
926
+ M !== "any" && /* @__PURE__ */ b("button", {
927
+ type: "button",
928
+ onClick: () => P("any"),
907
929
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
908
930
  children: [
909
931
  /* @__PURE__ */ y("span", {
@@ -911,15 +933,16 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
911
933
  children: "Rating:"
912
934
  }),
913
935
  " ",
914
- Ne.find((e) => e.value === N)?.label,
936
+ Pe.find((e) => e.value === M)?.label,
915
937
  /* @__PURE__ */ y(v, {
916
- className: "h-3 w-3",
938
+ className: "size-3",
917
939
  "aria-hidden": "true"
918
940
  })
919
941
  ]
920
942
  }),
921
- L !== "all" && /* @__PURE__ */ b("button", {
922
- onClick: () => Ee("all"),
943
+ I !== "all" && /* @__PURE__ */ b("button", {
944
+ type: "button",
945
+ onClick: () => Oe("all"),
923
946
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
924
947
  children: [
925
948
  /* @__PURE__ */ y("span", {
@@ -927,15 +950,16 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
927
950
  children: "Category:"
928
951
  }),
929
952
  " ",
930
- L,
953
+ I,
931
954
  /* @__PURE__ */ y(v, {
932
- className: "h-3 w-3",
955
+ className: "size-3",
933
956
  "aria-hidden": "true"
934
957
  })
935
958
  ]
936
959
  }),
937
- I !== "all" && /* @__PURE__ */ b("button", {
938
- onClick: () => Te("all"),
960
+ F !== "all" && /* @__PURE__ */ b("button", {
961
+ type: "button",
962
+ onClick: () => De("all"),
939
963
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
940
964
  children: [
941
965
  /* @__PURE__ */ y("span", {
@@ -943,15 +967,16 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
943
967
  children: "Nature:"
944
968
  }),
945
969
  " ",
946
- Pe.find((e) => e.value === I)?.label,
970
+ Fe.find((e) => e.value === F)?.label,
947
971
  /* @__PURE__ */ y(v, {
948
- className: "h-3 w-3",
972
+ className: "size-3",
949
973
  "aria-hidden": "true"
950
974
  })
951
975
  ]
952
976
  }),
953
- R !== "all" && /* @__PURE__ */ b("button", {
954
- onClick: () => De("all"),
977
+ L !== "all" && /* @__PURE__ */ b("button", {
978
+ type: "button",
979
+ onClick: () => ke("all"),
955
980
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
956
981
  children: [
957
982
  /* @__PURE__ */ y("span", {
@@ -959,21 +984,22 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
959
984
  children: "License:"
960
985
  }),
961
986
  " ",
962
- $e.find((e) => e.value === R)?.label,
987
+ nt.find((e) => e.value === L)?.label,
963
988
  /* @__PURE__ */ y(v, {
964
- className: "h-3 w-3",
989
+ className: "size-3",
965
990
  "aria-hidden": "true"
966
991
  })
967
992
  ]
968
993
  }),
969
- z && /* @__PURE__ */ b("button", {
970
- onClick: () => Oe(!1),
994
+ R && /* @__PURE__ */ b("button", {
995
+ type: "button",
996
+ onClick: () => Ae(!1),
971
997
  className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-action-primary-border bg-action-primary-bg/5 px-3 py-1.5 text-xs font-medium text-text-link shadow-sm transition-colors hover:bg-action-primary-bg/15",
972
998
  children: [
973
- /* @__PURE__ */ y(g, { className: "h-3 w-3" }),
999
+ /* @__PURE__ */ y(g, { className: "size-3" }),
974
1000
  "Featured Only",
975
1001
  /* @__PURE__ */ y(v, {
976
- className: "h-3 w-3",
1002
+ className: "size-3",
977
1003
  "aria-hidden": "true"
978
1004
  })
979
1005
  ]
@@ -986,13 +1012,13 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
986
1012
  /* @__PURE__ */ y("main", {
987
1013
  className: "flex-1 overflow-y-auto",
988
1014
  children: /* @__PURE__ */ b("div", {
989
- className: "mx-auto max-w-7xl space-y-8 px-6 py-6",
1015
+ className: "mx-auto max-w-7xl space-y-8 p-6",
990
1016
  children: [
991
1017
  Z && /* @__PURE__ */ b("div", {
992
1018
  role: "alert",
993
1019
  className: "flex flex-col items-center justify-center rounded-xl border border-status-error-border bg-status-error-bg-subtle p-8 text-center",
994
1020
  children: [
995
- /* @__PURE__ */ y(ae, { className: "mb-4 h-12 w-12 text-status-error-text" }),
1021
+ /* @__PURE__ */ y(oe, { className: "mb-4 size-12 text-status-error-text" }),
996
1022
  /* @__PURE__ */ y("h3", {
997
1023
  className: "mb-2 text-lg font-semibold text-status-error-text-emphasis",
998
1024
  children: "Failed to load marketplace"
@@ -1002,45 +1028,46 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
1002
1028
  children: Z.message || "An error occurred while fetching products"
1003
1029
  }),
1004
1030
  /* @__PURE__ */ y("button", {
1005
- onClick: () => Je(),
1031
+ type: "button",
1032
+ onClick: () => Ye(),
1006
1033
  className: "cursor-pointer rounded-lg bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-emphasis",
1007
1034
  children: "Try Again"
1008
1035
  })
1009
1036
  ]
1010
1037
  }),
1011
- qe && !Z && /* @__PURE__ */ y(we, {}),
1012
- !qe && !Z && /* @__PURE__ */ b(ve, { children: [
1013
- !H && k === "all" && W.length > 0 && /* @__PURE__ */ y(Ce, {
1038
+ Je && !Z && /* @__PURE__ */ y(Ee, {}),
1039
+ !Je && !Z && /* @__PURE__ */ b(ye, { children: [
1040
+ !H && O === "all" && W.length > 0 && /* @__PURE__ */ y(Te, {
1014
1041
  featuredProducts: W,
1015
1042
  onProductClick: Q
1016
1043
  }),
1017
- Ze.length > 1 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
1044
+ et.length > 1 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
1018
1045
  className: "mb-4 text-lg font-semibold text-text-primary",
1019
1046
  children: "Browse by Type"
1020
1047
  }), /* @__PURE__ */ y("div", {
1021
1048
  className: "flex flex-wrap gap-2",
1022
- children: Ze.map((e) => /* @__PURE__ */ y(Se, {
1049
+ children: et.map((e) => /* @__PURE__ */ y(we, {
1023
1050
  typeId: e.id,
1024
1051
  name: e.name,
1025
1052
  count: e.count,
1026
- active: k === e.id,
1027
- onClick: () => A(e.id)
1053
+ active: O === e.id,
1054
+ onClick: () => k(e.id)
1028
1055
  }, e.id))
1029
1056
  })] }),
1030
- H && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(O, {
1031
- icon: de,
1057
+ H && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(D, {
1058
+ icon: fe,
1032
1059
  title: V ? "Search Results" : "Filtered Results",
1033
1060
  subtitle: `${J} app${J === 1 ? "" : "s"} found`
1034
- }), Ye.length > 0 ? /* @__PURE__ */ y("div", {
1061
+ }), Xe.length > 0 ? /* @__PURE__ */ y("div", {
1035
1062
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
1036
- children: Ye.map((e) => /* @__PURE__ */ y(D, {
1063
+ children: Xe.map((e) => /* @__PURE__ */ y(E, {
1037
1064
  product: e,
1038
1065
  onClick: () => Q(e)
1039
1066
  }, e.id))
1040
1067
  }) : /* @__PURE__ */ b("div", {
1041
1068
  className: "flex flex-col items-center justify-center rounded-xl border border-border-default bg-bg-surface p-8 text-center",
1042
1069
  children: [
1043
- /* @__PURE__ */ y(de, { className: "mb-4 h-12 w-12 text-text-muted" }),
1070
+ /* @__PURE__ */ y(fe, { className: "mb-4 size-12 text-text-muted" }),
1044
1071
  /* @__PURE__ */ y("h3", {
1045
1072
  className: "mb-2 text-lg font-semibold text-text-primary",
1046
1073
  children: "No apps match your filters"
@@ -1050,54 +1077,55 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
1050
1077
  children: "Try adjusting your filter criteria or clearing filters to see more results."
1051
1078
  }),
1052
1079
  /* @__PURE__ */ y("button", {
1053
- onClick: ze,
1080
+ type: "button",
1081
+ onClick: Be,
1054
1082
  className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90",
1055
1083
  children: "Clear All Filters"
1056
1084
  })
1057
1085
  ]
1058
1086
  })] }),
1059
- !H && k === "all" && /* @__PURE__ */ b(ve, { children: [
1060
- G.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(O, {
1061
- icon: _e,
1087
+ !H && O === "all" && /* @__PURE__ */ b(ye, { children: [
1088
+ G.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(D, {
1089
+ icon: ve,
1062
1090
  title: "Most Downloaded",
1063
1091
  subtitle: "Top picks by our community"
1064
1092
  }), /* @__PURE__ */ y("div", {
1065
1093
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
1066
- children: G.slice(0, 6).map((e) => /* @__PURE__ */ y(D, {
1094
+ children: G.slice(0, 6).map((e) => /* @__PURE__ */ y(E, {
1067
1095
  product: e,
1068
1096
  onClick: () => Q(e)
1069
1097
  }, e.id))
1070
1098
  })] }),
1071
- K.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(O, {
1072
- icon: se,
1099
+ K.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(D, {
1100
+ icon: ce,
1073
1101
  title: "New Releases",
1074
1102
  subtitle: "Recently published apps"
1075
1103
  }), /* @__PURE__ */ y("div", {
1076
1104
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
1077
- children: K.slice(0, 6).map((e) => /* @__PURE__ */ y(D, {
1105
+ children: K.slice(0, 6).map((e) => /* @__PURE__ */ y(E, {
1078
1106
  product: e,
1079
1107
  onClick: () => Q(e)
1080
1108
  }, e.id))
1081
1109
  })] }),
1082
- q.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(O, {
1083
- icon: fe,
1110
+ q.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(D, {
1111
+ icon: pe,
1084
1112
  title: "Free Apps",
1085
1113
  subtitle: "No cost, full functionality"
1086
1114
  }), /* @__PURE__ */ y("div", {
1087
1115
  className: "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-6",
1088
- children: q.slice(0, 6).map((e) => /* @__PURE__ */ y(D, {
1116
+ children: q.slice(0, 6).map((e) => /* @__PURE__ */ y(E, {
1089
1117
  product: e,
1090
1118
  onClick: () => Q(e),
1091
1119
  variant: "compact"
1092
1120
  }, e.id))
1093
1121
  })] }),
1094
- $.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(O, {
1122
+ $.length > 0 && /* @__PURE__ */ b("section", { children: [/* @__PURE__ */ y(D, {
1095
1123
  icon: u,
1096
1124
  title: "All Apps",
1097
1125
  subtitle: `${$.length} apps available`
1098
1126
  }), /* @__PURE__ */ y("div", {
1099
1127
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
1100
- children: $.map((e) => /* @__PURE__ */ y(D, {
1128
+ children: $.map((e) => /* @__PURE__ */ y(E, {
1101
1129
  product: e,
1102
1130
  onClick: () => Q(e)
1103
1131
  }, e.id))
@@ -1106,7 +1134,7 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
1106
1134
  $.length === 0 && /* @__PURE__ */ b("div", {
1107
1135
  className: "flex flex-col items-center justify-center rounded-xl border border-border-default bg-bg-surface p-12 text-center",
1108
1136
  children: [
1109
- /* @__PURE__ */ y(u, { className: "mb-4 h-16 w-16 text-text-muted" }),
1137
+ /* @__PURE__ */ y(u, { className: "mb-4 size-16 text-text-muted" }),
1110
1138
  /* @__PURE__ */ y("h3", {
1111
1139
  className: "mb-2 text-xl font-semibold text-text-primary",
1112
1140
  children: "No apps available yet"
@@ -1122,21 +1150,21 @@ var x = (e) => e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).t
1122
1150
  })
1123
1151
  }),
1124
1152
  /* @__PURE__ */ y(ee, {
1125
- isOpen: le,
1126
- onClose: ue,
1127
- onCheckout: Xe,
1153
+ isOpen: ue,
1154
+ onClose: de,
1155
+ onCheckout: $e,
1128
1156
  cartItems: m,
1129
1157
  itemCount: p,
1130
1158
  subtotal: h,
1131
- tax: x,
1132
- total: S,
1133
- updateQuantity: C,
1134
- removeProduct: w
1159
+ tax: Ce,
1160
+ total: x,
1161
+ updateQuantity: S,
1162
+ removeProduct: C
1135
1163
  })
1136
1164
  ]
1137
1165
  });
1138
1166
  };
1139
1167
  //#endregion
1140
- export { F as MarketplaceHomePage };
1168
+ export { P as MarketplaceHomePage };
1141
1169
 
1142
1170
  //# sourceMappingURL=MarketplaceHomePage.js.map