tanstack_start_ts 1.0.0

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 (336) hide show
  1. package/.wrangler/deploy/config.json +1 -0
  2. package/bunfig.toml +6 -0
  3. package/components.json +22 -0
  4. package/config.json +0 -0
  5. package/dist/client/.assetsignore +2 -0
  6. package/dist/client/assets/ProductCard-DbIkJAE-.js +1 -0
  7. package/dist/client/assets/about-AskxOruL.js +1 -0
  8. package/dist/client/assets/admin-BZVcAQM3.js +1 -0
  9. package/dist/client/assets/admin.functions--RdVcuBx.js +1 -0
  10. package/dist/client/assets/admin.login-QgrF_9Fp.js +1 -0
  11. package/dist/client/assets/affiliate-disclosure-BIAsA-HO.js +1 -0
  12. package/dist/client/assets/categories-D0N418mK.js +1 -0
  13. package/dist/client/assets/category._slug-aCaQm14E.js +1 -0
  14. package/dist/client/assets/contact-PhvO-V15.js +1 -0
  15. package/dist/client/assets/faq-BsiHWPM8.js +1 -0
  16. package/dist/client/assets/hero-bg-BP2eVUIX.jpg +0 -0
  17. package/dist/client/assets/index-BU9rnkF3.js +1 -0
  18. package/dist/client/assets/index-BpJWZkva.js +1 -0
  19. package/dist/client/assets/index-vRX-zAyq.js +1 -0
  20. package/dist/client/assets/login-DteE0ZGp.js +1 -0
  21. package/dist/client/assets/logo-pSNfLJQk.png +0 -0
  22. package/dist/client/assets/privacy-B_Pu7040.js +1 -0
  23. package/dist/client/assets/product-links-BkZ41Gv3.js +1 -0
  24. package/dist/client/assets/product._id-BVUysCW-.js +1 -0
  25. package/dist/client/assets/products.functions-cGzRziKO.js +1 -0
  26. package/dist/client/assets/profile-CveRcKq2.js +1 -0
  27. package/dist/client/assets/reset-password-ySEjItX_.js +1 -0
  28. package/dist/client/assets/saved-CHtdQDJF.js +1 -0
  29. package/dist/client/assets/search-CXWfET1y.js +1 -0
  30. package/dist/client/assets/signup-CEx90iuV.js +1 -0
  31. package/dist/client/assets/styles-DrNJG0BO.css +1 -0
  32. package/dist/client/assets/terms-VqJ9kX9b.js +1 -0
  33. package/dist/client/assets/update-password-C-d0ix5e.js +1 -0
  34. package/dist/client/assets/vendor-aria-hidden-DvXkyWUv.js +1 -0
  35. package/dist/client/assets/vendor-class-variance-authority-5VPnzWs2.js +1 -0
  36. package/dist/client/assets/vendor-clsx-B-dksMZM.js +1 -0
  37. package/dist/client/assets/vendor-cookie-es-CS0aJGDi.js +1 -0
  38. package/dist/client/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
  39. package/dist/client/assets/vendor-floating-ui-core-BlUy28sp.js +1 -0
  40. package/dist/client/assets/vendor-floating-ui-dom-BxK0hn2R.js +1 -0
  41. package/dist/client/assets/vendor-floating-ui-react-dom-Bas3975S.js +1 -0
  42. package/dist/client/assets/vendor-floating-ui-utils-BfYUAVcw.js +1 -0
  43. package/dist/client/assets/vendor-framer-motion-BMdL-cuX.js +9 -0
  44. package/dist/client/assets/vendor-get-nonce-C-Z93AgS.js +1 -0
  45. package/dist/client/assets/vendor-iceberg-js-tWD4K6Lg.js +1 -0
  46. package/dist/client/assets/vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js +1 -0
  47. package/dist/client/assets/vendor-lucide-react-b5K2fehp.js +1 -0
  48. package/dist/client/assets/vendor-motion-dom-BETJamZt.js +1 -0
  49. package/dist/client/assets/vendor-motion-utils-BuWewJbj.js +1 -0
  50. package/dist/client/assets/vendor-radix-ui-primitive-Dc_FVRD7.js +1 -0
  51. package/dist/client/assets/vendor-radix-ui-react-accordion-C22Rgxe9.js +1 -0
  52. package/dist/client/assets/vendor-radix-ui-react-arrow-DMHj2mKI.js +1 -0
  53. package/dist/client/assets/vendor-radix-ui-react-avatar-CVPBkFXg.js +1 -0
  54. package/dist/client/assets/vendor-radix-ui-react-collapsible-BvM-4sKX.js +1 -0
  55. package/dist/client/assets/vendor-radix-ui-react-collection-D9KtqmHm.js +1 -0
  56. package/dist/client/assets/vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js +1 -0
  57. package/dist/client/assets/vendor-radix-ui-react-context-CAqqn5Nx.js +1 -0
  58. package/dist/client/assets/vendor-radix-ui-react-dialog-DZ01vOLq.js +5 -0
  59. package/dist/client/assets/vendor-radix-ui-react-direction-DxZwNuei.js +1 -0
  60. package/dist/client/assets/vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js +1 -0
  61. package/dist/client/assets/vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js +1 -0
  62. package/dist/client/assets/vendor-radix-ui-react-focus-guards-DgWoZ-fP.js +1 -0
  63. package/dist/client/assets/vendor-radix-ui-react-focus-scope-BLIu5QaL.js +1 -0
  64. package/dist/client/assets/vendor-radix-ui-react-id-bpga_rLa.js +1 -0
  65. package/dist/client/assets/vendor-radix-ui-react-menu-D0qf2r6_.js +1 -0
  66. package/dist/client/assets/vendor-radix-ui-react-popper-BafIylxU.js +1 -0
  67. package/dist/client/assets/vendor-radix-ui-react-portal-BnAsfNCS.js +1 -0
  68. package/dist/client/assets/vendor-radix-ui-react-presence-C-f3UKQ2.js +1 -0
  69. package/dist/client/assets/vendor-radix-ui-react-primitive-zTHwXNoz.js +1 -0
  70. package/dist/client/assets/vendor-radix-ui-react-roving-focus-jyJB8K2E.js +1 -0
  71. package/dist/client/assets/vendor-radix-ui-react-slot-6LXHJrHl.js +1 -0
  72. package/dist/client/assets/vendor-radix-ui-react-use-callback-ref-E91aPc6s.js +1 -0
  73. package/dist/client/assets/vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js +1 -0
  74. package/dist/client/assets/vendor-radix-ui-react-use-effect-event-CPeX4A3c.js +1 -0
  75. package/dist/client/assets/vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js +1 -0
  76. package/dist/client/assets/vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js +1 -0
  77. package/dist/client/assets/vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js +1 -0
  78. package/dist/client/assets/vendor-radix-ui-react-use-size-CXS04sct.js +1 -0
  79. package/dist/client/assets/vendor-react-dom-BnNs-kzm.js +9 -0
  80. package/dist/client/assets/vendor-react-gJPiVnX5.js +1 -0
  81. package/dist/client/assets/vendor-react-remove-scroll-DHKl-IMP.js +4 -0
  82. package/dist/client/assets/vendor-react-remove-scroll-bar-CSjdInc2.js +38 -0
  83. package/dist/client/assets/vendor-react-style-singleton-BqHpkgXn.js +1 -0
  84. package/dist/client/assets/vendor-scheduler-7OC5HNn7.js +1 -0
  85. package/dist/client/assets/vendor-seroval-B_Fur-nl.js +3 -0
  86. package/dist/client/assets/vendor-seroval-plugins-CBHnPkZJ.js +1 -0
  87. package/dist/client/assets/vendor-sonner-71-LdGG1.js +1 -0
  88. package/dist/client/assets/vendor-supabase-auth-js-DWrN-bIx.js +18 -0
  89. package/dist/client/assets/vendor-supabase-functions-js-uY_V-TxC.js +1 -0
  90. package/dist/client/assets/vendor-supabase-phoenix-BzEf37Ve.js +2 -0
  91. package/dist/client/assets/vendor-supabase-postgrest-js-C4rBWbCx.js +4 -0
  92. package/dist/client/assets/vendor-supabase-realtime-js-D6BlOYKE.js +23 -0
  93. package/dist/client/assets/vendor-supabase-storage-js-BG98L3Zz.js +1 -0
  94. package/dist/client/assets/vendor-supabase-supabase-js-DCCzdwBJ.js +1 -0
  95. package/dist/client/assets/vendor-tailwind-merge-Ct12j0u0.js +1 -0
  96. package/dist/client/assets/vendor-tanstack-history-C617CaxG.js +1 -0
  97. package/dist/client/assets/vendor-tanstack-query-core-7wuJJ5ZL.js +1 -0
  98. package/dist/client/assets/vendor-tanstack-react-query-HImzo8sX.js +1 -0
  99. package/dist/client/assets/vendor-tanstack-react-router-sIZLK-LU.js +1 -0
  100. package/dist/client/assets/vendor-tanstack-react-start-client-GiYCfWmf.js +1 -0
  101. package/dist/client/assets/vendor-tanstack-react-store-EvTi3ahh.js +1 -0
  102. package/dist/client/assets/vendor-tanstack-router-core-Cr7bYUZv.js +1 -0
  103. package/dist/client/assets/vendor-tanstack-start-client-core-C-00BBOu.js +2 -0
  104. package/dist/client/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
  105. package/dist/client/assets/vendor-tanstack-store-BC7mA7pq.js +1 -0
  106. package/dist/client/assets/vendor-tslib-Du-meQkk.js +1 -0
  107. package/dist/client/assets/vendor-use-callback-ref-C_fIAtot.js +1 -0
  108. package/dist/client/assets/vendor-use-sidecar-Bh0DDN6h.js +1 -0
  109. package/dist/client/assets/vendor-use-sync-external-store-ZvKHXaIn.js +1 -0
  110. package/dist/client/assets/vendor-vercel-analytics-DwPM5BWs.js +1 -0
  111. package/dist/client/assets/vendor-zod-By9teAtI.js +1 -0
  112. package/dist/client/robots.txt +2 -0
  113. package/dist/server/.dev.vars +5 -0
  114. package/dist/server/.vite/manifest.json +2528 -0
  115. package/dist/server/assets/ProductCard-CUPXy5Eo.js +149 -0
  116. package/dist/server/assets/_tanstack-start-manifest_v-do7vTWFD.js +4 -0
  117. package/dist/server/assets/about-TfKQw0Ga.js +28 -0
  118. package/dist/server/assets/admin-DspfJOJk.js +578 -0
  119. package/dist/server/assets/admin.functions-B78ppWLR.js +645 -0
  120. package/dist/server/assets/admin.functions-BWlKBoTL.js +93 -0
  121. package/dist/server/assets/admin.login-CV7QfeA6.js +139 -0
  122. package/dist/server/assets/affiliate-disclosure-B1wI1cDb.js +86 -0
  123. package/dist/server/assets/auth-middleware-Cn49MidW.js +62 -0
  124. package/dist/server/assets/categories-Z7jnAYZP.js +108 -0
  125. package/dist/server/assets/category._slug-D0XY3FGK.js +112 -0
  126. package/dist/server/assets/contact-IzyONsXs.js +104 -0
  127. package/dist/server/assets/faq-aRhB_CR3.js +133 -0
  128. package/dist/server/assets/hero-bg-BP2eVUIX.jpg +0 -0
  129. package/dist/server/assets/index-BTPHbXw9.js +221 -0
  130. package/dist/server/assets/index-ByJkHkrU.js +30 -0
  131. package/dist/server/assets/login-Dvy5Dm0f.js +175 -0
  132. package/dist/server/assets/logo-pSNfLJQk.png +0 -0
  133. package/dist/server/assets/privacy-B6Wiez1P.js +93 -0
  134. package/dist/server/assets/product-links-CGYEPP56.js +16 -0
  135. package/dist/server/assets/product._id-BpRa-1z0.js +231 -0
  136. package/dist/server/assets/products.functions-DSlmibYN.js +209 -0
  137. package/dist/server/assets/products.functions-DlHkRiqi.js +24 -0
  138. package/dist/server/assets/profile-B0NWzVAZ.js +314 -0
  139. package/dist/server/assets/reset-password-CY-rmqMr.js +115 -0
  140. package/dist/server/assets/saved-7FA6Dbom.js +126 -0
  141. package/dist/server/assets/search-Yw5c_fZa.js +329 -0
  142. package/dist/server/assets/signup-UPzgZo4i.js +143 -0
  143. package/dist/server/assets/styles-DrNJG0BO.css +1 -0
  144. package/dist/server/assets/terms-CMnX95bP.js +89 -0
  145. package/dist/server/assets/update-password-Cr94ea8n.js +131 -0
  146. package/dist/server/assets/vendor-aria-hidden-DPa16MWu.js +122 -0
  147. package/dist/server/assets/vendor-class-variance-authority-0YxJPB9Y.js +44 -0
  148. package/dist/server/assets/vendor-cloudflare-unenv-preset-ya0VEFBz.js +250 -0
  149. package/dist/server/assets/vendor-clsx-DgYk2OaC.js +16 -0
  150. package/dist/server/assets/vendor-cookie-es-DAoofYiI.js +44 -0
  151. package/dist/server/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
  152. package/dist/server/assets/vendor-floating-ui-core-3tkK0THV.js +726 -0
  153. package/dist/server/assets/vendor-floating-ui-dom-C-cPtgJv.js +626 -0
  154. package/dist/server/assets/vendor-floating-ui-react-dom-CRG6gBpH.js +319 -0
  155. package/dist/server/assets/vendor-floating-ui-utils-DmXANH-E.js +320 -0
  156. package/dist/server/assets/vendor-framer-motion-X4zAkX3J.js +1979 -0
  157. package/dist/server/assets/vendor-get-nonce-DiSj3EHl.js +9 -0
  158. package/dist/server/assets/vendor-h3-v2-CCobnLY5.js +287 -0
  159. package/dist/server/assets/vendor-iceberg-js-bHCkXyJn.js +534 -0
  160. package/dist/server/assets/vendor-isbot-CZ7WjwVs.js +21 -0
  161. package/dist/server/assets/vendor-lovable.dev-cloud-auth-js-BE03njZw.js +180 -0
  162. package/dist/server/assets/vendor-lucide-react-Ddew6HYb.js +458 -0
  163. package/dist/server/assets/vendor-motion-dom-D2MTwGIG.js +5983 -0
  164. package/dist/server/assets/vendor-motion-utils-LJlIFN6m.js +161 -0
  165. package/dist/server/assets/vendor-radix-ui-primitive-B-mNdDrH.js +11 -0
  166. package/dist/server/assets/vendor-radix-ui-react-accordion-1Izf6x00.js +308 -0
  167. package/dist/server/assets/vendor-radix-ui-react-arrow-B882lnFK.js +23 -0
  168. package/dist/server/assets/vendor-radix-ui-react-avatar-BVgZt2Ab.js +209 -0
  169. package/dist/server/assets/vendor-radix-ui-react-collapsible-DCBbMZiS.js +147 -0
  170. package/dist/server/assets/vendor-radix-ui-react-collection-BZ2srfgU.js +150 -0
  171. package/dist/server/assets/vendor-radix-ui-react-compose-refs-D3qsKVk1.js +39 -0
  172. package/dist/server/assets/vendor-radix-ui-react-context-BVoNDLue.js +78 -0
  173. package/dist/server/assets/vendor-radix-ui-react-dialog-DlxMaNYK.js +406 -0
  174. package/dist/server/assets/vendor-radix-ui-react-direction-Dt_WDL1t.js +9 -0
  175. package/dist/server/assets/vendor-radix-ui-react-dismissable-layer-CjsuPohV.js +210 -0
  176. package/dist/server/assets/vendor-radix-ui-react-dropdown-menu-DVxKumY8.js +263 -0
  177. package/dist/server/assets/vendor-radix-ui-react-focus-guards-D_6NoePE.js +29 -0
  178. package/dist/server/assets/vendor-radix-ui-react-focus-scope-DEIhTJJH.js +206 -0
  179. package/dist/server/assets/vendor-radix-ui-react-id-DFFpgh6m.js +14 -0
  180. package/dist/server/assets/vendor-radix-ui-react-menu-CiTMLwjT.js +893 -0
  181. package/dist/server/assets/vendor-radix-ui-react-popper-23Ye2Vyc.js +286 -0
  182. package/dist/server/assets/vendor-radix-ui-react-portal-CZCH5uPk.js +16 -0
  183. package/dist/server/assets/vendor-radix-ui-react-presence-CaAULlDU.js +128 -0
  184. package/dist/server/assets/vendor-radix-ui-react-primitive-BeOk3UYa.js +124 -0
  185. package/dist/server/assets/vendor-radix-ui-react-roving-focus-DES9GR8l.js +224 -0
  186. package/dist/server/assets/vendor-radix-ui-react-slot-DUhZbzoH.js +103 -0
  187. package/dist/server/assets/vendor-radix-ui-react-use-callback-ref-BynBgohw.js +11 -0
  188. package/dist/server/assets/vendor-radix-ui-react-use-controllable-state-C9KpT6DG.js +69 -0
  189. package/dist/server/assets/vendor-radix-ui-react-use-effect-event-gpNY2xjS.js +1 -0
  190. package/dist/server/assets/vendor-radix-ui-react-use-escape-keydown-CcYRQ2pp.js +17 -0
  191. package/dist/server/assets/vendor-radix-ui-react-use-is-hydrated-D_LcBPXY.js +15 -0
  192. package/dist/server/assets/vendor-radix-ui-react-use-layout-effect-1LNLXAjr.js +6 -0
  193. package/dist/server/assets/vendor-radix-ui-react-use-size-D6fiKJQo.js +39 -0
  194. package/dist/server/assets/vendor-react-DvBrY0qp.js +511 -0
  195. package/dist/server/assets/vendor-react-dom-yvMLPM0j.js +10484 -0
  196. package/dist/server/assets/vendor-react-remove-scroll-BNtiEvVN.js +328 -0
  197. package/dist/server/assets/vendor-react-remove-scroll-bar-hLqRASRk.js +82 -0
  198. package/dist/server/assets/vendor-react-style-singleton-BXjcXskB.js +69 -0
  199. package/dist/server/assets/vendor-rou3-3NaGPdI8.js +8 -0
  200. package/dist/server/assets/vendor-seroval-dJyC-Zhz.js +1775 -0
  201. package/dist/server/assets/vendor-seroval-plugins-Pq_U2meB.js +58 -0
  202. package/dist/server/assets/vendor-sonner-CqbjhsRh.js +1086 -0
  203. package/dist/server/assets/vendor-srvx-BA-baEX9.js +6 -0
  204. package/dist/server/assets/vendor-supabase-auth-js-D4xjVprw.js +7602 -0
  205. package/dist/server/assets/vendor-supabase-functions-js-sWy4UYn1.js +322 -0
  206. package/dist/server/assets/vendor-supabase-phoenix-Bw3Uh2Nn.js +1777 -0
  207. package/dist/server/assets/vendor-supabase-postgrest-js-AO-BXa7I.js +4938 -0
  208. package/dist/server/assets/vendor-supabase-realtime-js-BtdNgJbm.js +2111 -0
  209. package/dist/server/assets/vendor-supabase-storage-js-Dk_MrPYO.js +2679 -0
  210. package/dist/server/assets/vendor-supabase-supabase-js-D1EEtG3j.js +697 -0
  211. package/dist/server/assets/vendor-tailwind-merge-BHb_obmC.js +3255 -0
  212. package/dist/server/assets/vendor-tanstack-history-C4pKJmkt.js +204 -0
  213. package/dist/server/assets/vendor-tanstack-query-core-PwwTR5ld.js +2552 -0
  214. package/dist/server/assets/vendor-tanstack-react-query-hhHzXAK1.js +190 -0
  215. package/dist/server/assets/vendor-tanstack-react-router-XzqpA65A.js +1120 -0
  216. package/dist/server/assets/vendor-tanstack-react-start-RvWUpvat.js +37 -0
  217. package/dist/server/assets/vendor-tanstack-react-start-client-gpNY2xjS.js +1 -0
  218. package/dist/server/assets/vendor-tanstack-react-start-server-uj_Y9pEN.js +15 -0
  219. package/dist/server/assets/vendor-tanstack-react-store-gpNY2xjS.js +1 -0
  220. package/dist/server/assets/vendor-tanstack-router-core-6wywV3KN.js +4252 -0
  221. package/dist/server/assets/vendor-tanstack-start-client-core-DoOKV2pA.js +1741 -0
  222. package/dist/server/assets/vendor-tanstack-start-fn-stubs-l0sNRNKZ.js +1 -0
  223. package/dist/server/assets/vendor-tanstack-start-server-core-CsAstXv7.js +1421 -0
  224. package/dist/server/assets/vendor-tanstack-start-storage-context-DgH9hIJT.js +17 -0
  225. package/dist/server/assets/vendor-tanstack-store-l0sNRNKZ.js +1 -0
  226. package/dist/server/assets/vendor-tslib-_8ICaZ64.js +67 -0
  227. package/dist/server/assets/vendor-unenv-DUvF4YIF.js +544 -0
  228. package/dist/server/assets/vendor-use-callback-ref-DMFDRvmi.js +66 -0
  229. package/dist/server/assets/vendor-use-sidecar-DG1tHua4.js +106 -0
  230. package/dist/server/assets/vendor-use-sync-external-store-rZ8vi0It.js +64 -0
  231. package/dist/server/assets/vendor-vercel-analytics-oP8BDp0L.js +168 -0
  232. package/dist/server/assets/vendor-zod-BRyQdbC-.js +3580 -0
  233. package/dist/server/index.js +158 -0
  234. package/dist/server/wrangler.json +1 -0
  235. package/enable-powershell.ps1 +7 -0
  236. package/eslint.config.js +41 -0
  237. package/lint.bat +4 -0
  238. package/package.json +95 -0
  239. package/public/robots.txt +2 -0
  240. package/run-npm-build.cjs +20 -0
  241. package/run-npm-build.js +20 -0
  242. package/src/assets/hero-bg.jpg +0 -0
  243. package/src/assets/logo.png +0 -0
  244. package/src/components/scrollsy/Footer.tsx +68 -0
  245. package/src/components/scrollsy/LiveTicker.tsx +31 -0
  246. package/src/components/scrollsy/Logo.tsx +28 -0
  247. package/src/components/scrollsy/Nav.tsx +255 -0
  248. package/src/components/scrollsy/ProductCard.tsx +190 -0
  249. package/src/components/scrollsy/ProductFilters.tsx +226 -0
  250. package/src/components/scrollsy/SupportWidget.tsx +197 -0
  251. package/src/components/ui/accordion.tsx +51 -0
  252. package/src/components/ui/alert-dialog.tsx +115 -0
  253. package/src/components/ui/alert.tsx +49 -0
  254. package/src/components/ui/aspect-ratio.tsx +5 -0
  255. package/src/components/ui/avatar.tsx +47 -0
  256. package/src/components/ui/badge.tsx +32 -0
  257. package/src/components/ui/breadcrumb.tsx +101 -0
  258. package/src/components/ui/button.tsx +49 -0
  259. package/src/components/ui/calendar.tsx +177 -0
  260. package/src/components/ui/card.tsx +55 -0
  261. package/src/components/ui/carousel.tsx +240 -0
  262. package/src/components/ui/chart.tsx +331 -0
  263. package/src/components/ui/checkbox.tsx +26 -0
  264. package/src/components/ui/collapsible.tsx +11 -0
  265. package/src/components/ui/command.tsx +143 -0
  266. package/src/components/ui/context-menu.tsx +187 -0
  267. package/src/components/ui/dialog.tsx +104 -0
  268. package/src/components/ui/drawer.tsx +98 -0
  269. package/src/components/ui/dropdown-menu.tsx +188 -0
  270. package/src/components/ui/form.tsx +171 -0
  271. package/src/components/ui/hover-card.tsx +27 -0
  272. package/src/components/ui/input-otp.tsx +69 -0
  273. package/src/components/ui/input.tsx +22 -0
  274. package/src/components/ui/label.tsx +21 -0
  275. package/src/components/ui/menubar.tsx +229 -0
  276. package/src/components/ui/navigation-menu.tsx +120 -0
  277. package/src/components/ui/pagination.tsx +98 -0
  278. package/src/components/ui/popover.tsx +31 -0
  279. package/src/components/ui/progress.tsx +25 -0
  280. package/src/components/ui/radio-group.tsx +36 -0
  281. package/src/components/ui/resizable.tsx +37 -0
  282. package/src/components/ui/scroll-area.tsx +44 -0
  283. package/src/components/ui/select.tsx +152 -0
  284. package/src/components/ui/separator.tsx +24 -0
  285. package/src/components/ui/sheet.tsx +122 -0
  286. package/src/components/ui/sidebar.tsx +744 -0
  287. package/src/components/ui/skeleton.tsx +7 -0
  288. package/src/components/ui/slider.tsx +23 -0
  289. package/src/components/ui/sonner.tsx +23 -0
  290. package/src/components/ui/switch.tsx +27 -0
  291. package/src/components/ui/table.tsx +94 -0
  292. package/src/components/ui/tabs.tsx +53 -0
  293. package/src/components/ui/textarea.tsx +21 -0
  294. package/src/components/ui/toggle-group.tsx +57 -0
  295. package/src/components/ui/toggle.tsx +42 -0
  296. package/src/components/ui/tooltip.tsx +32 -0
  297. package/src/hooks/use-auth.ts +26 -0
  298. package/src/hooks/use-mobile.tsx +19 -0
  299. package/src/integrations/lovable/index.ts +41 -0
  300. package/src/lib/admin.functions.ts +564 -0
  301. package/src/lib/error-capture.ts +27 -0
  302. package/src/lib/error-page.ts +30 -0
  303. package/src/lib/product-links.ts +39 -0
  304. package/src/lib/products.functions.ts +101 -0
  305. package/src/lib/utils.ts +6 -0
  306. package/src/routeTree.gen.ts +480 -0
  307. package/src/router.tsx +16 -0
  308. package/src/routes/__root.tsx +177 -0
  309. package/src/routes/about.tsx +66 -0
  310. package/src/routes/admin.login.tsx +95 -0
  311. package/src/routes/admin.tsx +811 -0
  312. package/src/routes/affiliate-disclosure.tsx +35 -0
  313. package/src/routes/categories.tsx +57 -0
  314. package/src/routes/category.$slug.tsx +51 -0
  315. package/src/routes/contact.tsx +69 -0
  316. package/src/routes/faq.tsx +63 -0
  317. package/src/routes/index.tsx +269 -0
  318. package/src/routes/login.tsx +160 -0
  319. package/src/routes/privacy.tsx +39 -0
  320. package/src/routes/product.$id.tsx +212 -0
  321. package/src/routes/profile.tsx +393 -0
  322. package/src/routes/reset-password.tsx +71 -0
  323. package/src/routes/saved.tsx +83 -0
  324. package/src/routes/search.tsx +136 -0
  325. package/src/routes/signup.tsx +108 -0
  326. package/src/routes/sitemap[.]xml.ts +34 -0
  327. package/src/routes/terms.tsx +40 -0
  328. package/src/routes/update-password.tsx +91 -0
  329. package/src/server.ts +80 -0
  330. package/src/start.ts +24 -0
  331. package/src/styles.css +333 -0
  332. package/terminal-test-output.txt +1 -0
  333. package/tsconfig.json +27 -0
  334. package/vercel.json +26 -0
  335. package/vite.config.ts +38 -0
  336. package/wrangler.jsonc +7 -0
@@ -0,0 +1 @@
1
+ {"configPath":"..\\..\\dist\\server\\wrangler.json","auxiliaryWorkers":[]}
package/bunfig.toml ADDED
@@ -0,0 +1,6 @@
1
+ [install]
2
+ # 24h supply-chain guard: skip package versions published less than a day ago.
3
+ minimumReleaseAge = 86400
4
+ # Each entry bypasses the 24h guard for one package — confirm with the user
5
+ # before adding any.
6
+ minimumReleaseAgeExcludes = ["@lovable.dev/vite-tanstack-config"]
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "css": "src/styles.css",
8
+ "baseColor": "slate",
9
+ "cssVariables": true,
10
+ "prefix": ""
11
+ },
12
+ "iconLibrary": "lucide",
13
+ "rtl": false,
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
+ }
package/config.json ADDED
Binary file
@@ -0,0 +1,2 @@
1
+ wrangler.json
2
+ .dev.vars
@@ -0,0 +1 @@
1
+ import{r as N,j as s}from"./vendor-react-gJPiVnX5.js";import{L as y}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{b as w,a as _,u as q}from"./vendor-tanstack-react-query-HImzo8sX.js";import{u as k,s as l,e as r}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as d}from"./vendor-sonner-71-LdGG1.js";import{r as E,a as S}from"./product-links-BkZ41Gv3.js";import{i as C,z as F,B as L,H as P,E as Q}from"./vendor-lucide-react-b5K2fehp.js";function I({product:e,aspect:c="auto",className:m,priority:x=!1}){const{user:a}=k(),n=w(),{data:u}=_({queryKey:["saved-ids",a?.id],enabled:!!a,queryFn:async()=>{const{data:t}=await l.from("saved_items").select("product_id").eq("user_id",a.id);return new Set((t??[]).map(j=>j.product_id))}}),i=u?.has(e.id)??!1,p=q({mutationFn:async()=>{if(!a)throw new Error("login");i?await l.from("saved_items").delete().eq("user_id",a.id).eq("product_id",e.id):await l.from("saved_items").insert({user_id:a.id,product_id:e.id})},onSuccess:()=>{n.invalidateQueries({queryKey:["saved-ids",a?.id]}),n.invalidateQueries({queryKey:["saved-products",a?.id]}),d.success(i?"Removed from saved":"Saved to favorites",{duration:1500})},onError:t=>{t.message==="login"&&d.error("Sign in to save items")}}),o=e.original_price?Math.round((1-Number(e.price)/Number(e.original_price))*100):0,f={auto:"",square:"aspect-square",tall:"aspect-[3/4]",wide:"aspect-[4/3]"}[c],g=E(e),h=S(e),[b,v]=N.useState(!1);return s.jsxs("article",{className:r("group card-tilt relative overflow-hidden rounded-3xl bg-gradient-card border border-white/5",m),children:[s.jsxs(y,{to:"/product/$id",params:{id:e.id},className:"block",children:[s.jsxs("div",{className:r("relative overflow-hidden",f),children:[s.jsx("img",{src:b?"https://images.unsplash.com/photo-1556742205-9fe6f32a8f6f?auto=format&fit=crop&w=1200&q=80":e.image_url,alt:e.title,loading:x?"eager":"lazy",onError:()=>v(!0),className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/0 to-black/0"}),s.jsxs("div",{className:"absolute top-3 left-3 flex flex-col gap-1.5",children:[o>0&&s.jsxs("span",{className:"bg-gradient-brand text-white text-[11px] font-bold px-2 py-1 rounded-full shadow-lg",children:["-",o,"%"]}),e.is_hot&&s.jsxs("span",{className:"glass text-[10px] font-semibold px-2 py-1 rounded-full inline-flex items-center gap-1",children:[s.jsx(C,{className:"w-3 h-3 text-brand-orange"})," Hot"]}),e.is_trending&&!e.is_hot&&s.jsxs("span",{className:"glass text-[10px] font-semibold px-2 py-1 rounded-full inline-flex items-center gap-1",children:[s.jsx(F,{className:"w-3 h-3 text-brand-magenta"})," Trending"]})]})]}),s.jsxs("div",{className:"p-4 space-y-2",children:[s.jsx("h3",{className:"font-display font-semibold text-sm leading-snug line-clamp-2 min-h-[2.5rem]",children:e.title}),e.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),s.jsxs("div",{className:"flex items-baseline gap-2 pt-1",children:[s.jsxs("span",{className:"text-lg font-bold text-gradient",children:["$",Number(e.price).toFixed(2)]}),e.original_price&&s.jsxs("span",{className:"text-xs text-muted-foreground line-through",children:["$",Number(e.original_price).toFixed(2)]})]}),e.shipping_info&&s.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[s.jsx(L,{className:"w-3 h-3"}),s.jsx("span",{children:e.shipping_info}),e.delivery_estimate&&s.jsxs("span",{children:["· ",e.delivery_estimate]})]})]})]}),s.jsx("button",{onClick:t=>{t.preventDefault(),p.mutate()},className:r("absolute top-3 right-3 p-2 rounded-full glass transition-all",i&&"bg-gradient-brand border-transparent"),"aria-label":i?"Unsave":"Save",children:s.jsx(P,{className:r("w-4 h-4",i?"fill-white text-white":"text-white/90")})}),s.jsxs("a",{href:g??e.affiliate_url,target:"_blank",rel:"noopener noreferrer",onClick:t=>t.stopPropagation(),className:"absolute bottom-4 right-4 opacity-0 translate-y-2 group-hover:opacity-100 group-hover:translate-y-0 transition-all btn-glow rounded-full px-3 py-1.5 text-xs font-semibold inline-flex items-center gap-1",title:`Open ${h}`,children:["Buy Now ",s.jsx(Q,{className:"w-3 h-3"})]})]})}export{I as P};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-react-gJPiVnX5.js";function r({title:s,subtitle:t,children:l}){return e.jsxs("div",{className:"max-w-3xl mx-auto px-4 pt-12",children:[e.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold tracking-tight",children:e.jsx("span",{className:"text-gradient",children:s})}),t&&e.jsx("p",{className:"text-lg text-muted-foreground mt-3",children:t}),e.jsx("div",{className:"prose prose-invert mt-8 space-y-4 [&_h2]:font-display [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mt-10 [&_h2]:mb-2 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1 [&_p]:text-muted-foreground [&_li]:text-muted-foreground",children:l})]})}const a=()=>e.jsxs(r,{title:"The Scrollsy story",subtitle:"Built for the way Gen Z actually discovers products.",children:[e.jsx("p",{children:"Scrollsy is a visual product discovery platform. We curate viral gadgets, smart shopping finds and hidden deals from across the web — and present them in a feed that's built for endless, addictive scrolling."}),e.jsx("p",{children:"We started Scrollsy because online shopping was broken. Marketplaces feel like spreadsheets. Social feeds bury the good stuff between ads. We wanted a place where the products feel like the content — beautiful, surprising, share-worthy."}),e.jsx("h2",{children:"What we believe"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Great product discovery feels like inspiration, not advertising."}),e.jsx("li",{children:"Affordable doesn't have to mean cheap."}),e.jsx("li",{children:"Trends move fast — the feed should too."})]}),e.jsx("h2",{children:"How it works"}),e.jsx("p",{children:"Every product on Scrollsy links out to a trusted retailer through an affiliate link. You buy directly from the store, and Scrollsy may earn a small commission. It costs you nothing extra and helps keep the platform free."})]});export{r as Prose,a as component};
@@ -0,0 +1 @@
1
+ import{j as e,r as N}from"./vendor-react-gJPiVnX5.js";import{L as q}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{a as C,b as I,u as F}from"./vendor-tanstack-react-query-HImzo8sX.js";import{u as j}from"./index-BpJWZkva.js";import{a as E,g as T,b as M,u as U,d as K,i as R,l as Q,c as O}from"./admin.functions--RdVcuBx.js";import{g as $}from"./products.functions-cGzRziKO.js";import{u as z}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as f}from"./vendor-sonner-71-LdGG1.js";import{r as H}from"./product-links-BkZ41Gv3.js";import{t as S,g as P,p as B,D,z as Y,i as G,y as V,E as W,P as J,T as X,K as Z,M as ee,l as se,x as te,L as ie,k as ae,F as re,R as ne}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-tanstack-react-start-client-GiYCfWmf.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function Ds(){const{user:t,loading:m}=z(),o=j(E),u=j(T),{data:c,isLoading:d,refetch:p}=C({queryKey:["is-admin",t?.id],enabled:!!t,queryFn:()=>o()});return m||t&&d?e.jsx("div",{className:"p-10",children:"Loading…"}):t?c?.admin?e.jsx(le,{isMaster:!!c.is_master,adminId:c.admin_id}):e.jsxs("div",{className:"max-w-md mx-auto pt-24 px-4 text-center glass-strong rounded-3xl p-8",children:[e.jsx(S,{className:"w-10 h-10 mx-auto text-brand-magenta"}),e.jsx("h1",{className:"font-display text-2xl font-bold mt-4",children:"Not an admin yet"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["If you're the project owner, claim Master Admin access now. Only the very first user can self-grant — you will receive the master Admin ID"," ",e.jsx("span",{className:"text-foreground font-mono",children:"doraexplora"}),"."]}),e.jsx("button",{onClick:async()=>{try{const a=await u();f.success(`You're the Master Admin! Admin ID: ${a.admin_id}`),p()}catch(a){f.error(a.message??"Failed")}},className:"btn-glow mt-6 rounded-full px-6 py-3 font-semibold text-sm",children:"Claim Master Admin access"})]}):e.jsxs("div",{className:"max-w-md mx-auto pt-24 px-4 text-center glass-strong rounded-3xl p-8",children:[e.jsx(S,{className:"w-12 h-12 mx-auto text-brand-magenta"}),e.jsx("h1",{className:"font-display text-2xl font-bold mt-4",children:"Admin sign-in required"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Admins must sign in with their assigned Admin ID, email and password."}),e.jsx(q,{to:"/admin/login",className:"btn-glow inline-block mt-6 rounded-full px-6 py-3 font-semibold text-sm",children:"Go to admin sign-in"})]})}function le({isMaster:t,adminId:m}){const o=I(),u=j(M),c=j(U),d=j(K),p=j(R),{data:a}=C({queryKey:["admin-products"],queryFn:()=>u()}),{data:l}=C({queryKey:["cats"],queryFn:()=>$()}),[g,b]=N.useState(null),[h,v]=N.useState("products"),_=F({mutationFn:i=>c({data:i}),onSuccess:()=>{o.invalidateQueries({queryKey:["admin-products"]}),o.invalidateQueries({queryKey:["home"]}),f.success("Saved"),b(null)},onError:i=>f.error(i.message??"Failed")}),w=F({mutationFn:i=>d({data:{id:i}}),onSuccess:()=>{o.invalidateQueries({queryKey:["admin-products"]}),f.success("Deleted")}}),r={total:a?.length??0,trending:a?.filter(i=>i.is_trending).length??0,hot:a?.filter(i=>i.is_hot).length??0,featured:a?.filter(i=>i.is_featured).length??0,views:a?.reduce((i,s)=>i+(s.view_count??0),0)??0};return e.jsxs("div",{className:"max-w-7xl mx-auto px-4 pt-10 pb-20",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"font-display text-4xl font-bold",children:["Admin ",e.jsx("span",{className:"text-gradient",children:"dashboard"})]}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 inline-flex items-center gap-2",children:[t&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-brand-amber",children:[e.jsx(P,{className:"w-3.5 h-3.5"})," Master Admin"]}),e.jsxs("span",{children:["Admin ID: ",e.jsx("span",{className:"font-mono text-foreground",children:m})]})]})]}),h==="products"&&e.jsxs("button",{onClick:()=>b({}),className:"btn-glow rounded-full px-5 py-2.5 font-semibold text-sm inline-flex items-center gap-2",children:[e.jsx(B,{className:"w-4 h-4"})," New product"]})]}),e.jsxs("div",{className:"mt-6 inline-flex glass rounded-full p-1 text-sm",children:[e.jsx("button",{onClick:()=>v("products"),className:`px-4 py-1.5 rounded-full transition ${h==="products"?"bg-white/10 text-foreground":"text-muted-foreground"}`,children:"Products"}),e.jsxs("button",{onClick:()=>v("admins"),className:`px-4 py-1.5 rounded-full transition inline-flex items-center gap-1.5 ${h==="admins"?"bg-white/10 text-foreground":"text-muted-foreground"}`,children:[e.jsx(D,{className:"w-3.5 h-3.5"})," Admins"]})]}),h==="products"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3 mt-6",children:[e.jsx(y,{label:"Products",value:r.total}),e.jsx(y,{label:"Trending",value:r.trending,icon:e.jsx(Y,{className:"w-4 h-4 text-brand-magenta"})}),e.jsx(y,{label:"Hot deals",value:r.hot,icon:e.jsx(G,{className:"w-4 h-4 text-brand-orange"})}),e.jsx(y,{label:"Featured",value:r.featured,icon:e.jsx(V,{className:"w-4 h-4 text-brand-amber"})}),e.jsx(y,{label:"Total views",value:r.views.toLocaleString()})]}),e.jsxs("div",{className:"mt-10 glass-strong rounded-3xl overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 px-5 py-3 text-xs text-muted-foreground uppercase tracking-wider border-b border-white/5",children:[e.jsx("div",{className:"col-span-5",children:"Product"}),e.jsx("div",{className:"col-span-2",children:"Price"}),e.jsx("div",{className:"col-span-2",children:"Status"}),e.jsx("div",{className:"col-span-1",children:"Views"}),e.jsx("div",{className:"col-span-2 text-right",children:"Actions"})]}),(a??[]).map(i=>{const s=H(i)??i.affiliate_url??i.product_url??i.source_url;return e.jsxs("div",{className:"grid grid-cols-12 px-5 py-3 items-center hover:bg-white/5 border-b border-white/5 last:border-none text-sm",children:[e.jsxs("div",{className:"col-span-5 flex items-center gap-3 min-w-0",children:[e.jsx("img",{src:i.image_url,alt:"",className:"w-10 h-10 rounded-lg object-cover shrink-0"}),e.jsxs("div",{className:"truncate",children:[e.jsx("div",{className:"font-medium truncate",children:i.title}),e.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i.imported_from??i.merchant??"Shopping site"})]})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsxs("span",{className:"text-gradient font-bold",children:["$",Number(i.price).toFixed(2)]}),i.original_price&&e.jsxs("span",{className:"text-xs text-muted-foreground line-through ml-2",children:["$",Number(i.original_price).toFixed(2)]})]}),e.jsxs("div",{className:"col-span-2 flex gap-1 flex-wrap",children:[i.is_trending&&e.jsx("span",{className:"text-[10px] bg-brand-magenta/20 text-brand-magenta rounded px-1.5 py-0.5",children:"TREND"}),i.is_hot&&e.jsx("span",{className:"text-[10px] bg-brand-orange/20 text-brand-orange rounded px-1.5 py-0.5",children:"HOT"}),i.is_featured&&e.jsx("span",{className:"text-[10px] bg-brand-amber/20 text-brand-amber rounded px-1.5 py-0.5",children:"FEAT"})]}),e.jsx("div",{className:"col-span-1 text-xs text-muted-foreground",children:i.view_count}),e.jsxs("div",{className:"col-span-2 flex justify-end gap-1",children:[e.jsx("a",{href:s??"#",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg hover:bg-white/10",title:"Open store link",children:e.jsx(W,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>b(i),className:"p-2 rounded-lg hover:bg-white/10",title:"Edit",children:e.jsx(J,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>confirm("Delete this product?")&&w.mutate(i.id),className:"p-2 rounded-lg hover:bg-destructive/20 text-destructive",title:"Delete",children:e.jsx(X,{className:"w-4 h-4"})})]})]},i.id)}),(a??[]).length===0&&e.jsx("div",{className:"p-10 text-center text-muted-foreground text-sm",children:"No products yet. Add your first one above."})]})]}),h==="admins"&&e.jsx(oe,{isMaster:t}),g&&e.jsx(de,{product:g,categories:l??[],onClose:()=>b(null),onSave:i=>_.mutate(i),saving:_.isPending,onImport:i=>p({data:{url:i}}),importingLabel:"Import Product From Link"})]})}function oe({isMaster:t}){const m=I(),o=j(Q),u=j(O),{data:c}=C({queryKey:["admins"],queryFn:()=>o()}),[d,p]=N.useState({email:"",password:"",admin_id:""}),a=F({mutationFn:l=>u({data:l}),onSuccess:()=>{f.success("Admin added"),m.invalidateQueries({queryKey:["admins"]}),p({email:"",password:"",admin_id:""})},onError:l=>f.error(l.message??"Failed")});return e.jsxs("div",{className:"mt-6 grid lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass-strong rounded-3xl p-6",children:[e.jsxs("h2",{className:"font-display text-xl font-bold inline-flex items-center gap-2",children:[e.jsx(D,{className:"w-5 h-5 text-brand-magenta"})," Add new admin"]}),t?e.jsxs("form",{onSubmit:l=>{l.preventDefault(),a.mutate(d)},className:"space-y-3 mt-5",children:[e.jsx(k,{icon:e.jsx(Z,{className:"w-4 h-4"}),label:"Assign Admin ID",value:d.admin_id,onChange:l=>p(g=>({...g,admin_id:l})),placeholder:"e.g. jane_admin"}),e.jsx(k,{icon:e.jsx(ee,{className:"w-4 h-4"}),label:"Admin email",type:"email",value:d.email,onChange:l=>p(g=>({...g,email:l})),placeholder:"admin@company.com"}),e.jsx(k,{icon:e.jsx(se,{className:"w-4 h-4"}),label:"Initial password",type:"password",value:d.password,onChange:l=>p(g=>({...g,password:l})),placeholder:"Min 8 characters"}),e.jsx("button",{disabled:a.isPending||!d.email||!d.password||!d.admin_id,className:"btn-glow w-full rounded-full py-3 font-semibold text-sm disabled:opacity-60",children:a.isPending?"Creating…":"Create admin"}),e.jsxs("p",{className:"text-xs text-muted-foreground pt-1",children:["The new admin will sign in at ",e.jsx("span",{className:"font-mono",children:"/admin/login"})," using this Admin ID, email, and password."]})]}):e.jsxs("p",{className:"text-sm text-muted-foreground mt-3",children:["Only the Master Admin can add new admins. Ask the Master Admin (admin ID"," ",e.jsx("span",{className:"font-mono text-foreground",children:"doraexplora"}),") to assign you an Admin ID."]})]}),e.jsxs("div",{className:"glass-strong rounded-3xl p-6",children:[e.jsx("h2",{className:"font-display text-xl font-bold",children:"Current admins"}),e.jsxs("div",{className:"mt-4 divide-y divide-white/5",children:[(c??[]).map(l=>e.jsxs("div",{className:"py-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-medium truncate inline-flex items-center gap-2",children:[l.is_master&&e.jsx(P,{className:"w-3.5 h-3.5 text-brand-amber"}),l.email??"—"]}),e.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:l.admin_id??"(no admin id)"})]}),l.is_master&&e.jsx("span",{className:"text-[10px] bg-brand-amber/20 text-brand-amber rounded px-2 py-0.5 uppercase tracking-wider",children:"Master"})]},l.user_id)),(c??[]).length===0&&e.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No admins yet."})]})]})]})}function k({icon:t,label:m,value:o,onChange:u,placeholder:c,type:d="text"}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:m}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 glass rounded-xl px-3 py-2.5",children:[e.jsx("span",{className:"text-muted-foreground",children:t}),e.jsx("input",{type:d,value:o,onChange:p=>u(p.target.value),placeholder:c,className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"})]})]})}function y({label:t,value:m,icon:o}){return e.jsxs("div",{className:"glass rounded-2xl p-4",children:[e.jsxs("div",{className:"text-xs text-muted-foreground inline-flex items-center gap-1",children:[o,t]}),e.jsx("div",{className:"font-display text-2xl font-bold mt-1",children:m})]})}function de({product:t,categories:m,onClose:o,onSave:u,saving:c,onImport:d,importingLabel:p}){const[a,l]=N.useState({id:t.id,title:t.title??"",description:t.description??"",image_url:t.image_url??"",price:t.price??0,original_price:t.original_price??null,currency:t.currency??"USD",affiliate_url:t.affiliate_url??"",product_url:t.product_url??"",tracking_url:t.tracking_url??"",source_url:t.source_url??"",imported_from:t.imported_from??"",import_notes:t.import_notes??"",merchant:t.merchant??"",category_id:t.category_id??null,tags:t.tags??[],badges:t.badges??[],is_trending:t.is_trending??!1,is_hot:t.is_hot??!1,is_featured:t.is_featured??!1,shipping_info:t.shipping_info??"",delivery_estimate:t.delivery_estimate??""}),[g,b]=N.useState(t.product_url??t.source_url??t.affiliate_url??""),[h,v]=N.useState(!1),[_,w]=N.useState(null),r=(s,n)=>l(L=>({...L,[s]:n})),i=s=>{l(n=>({...n,title:s.title??n.title,description:s.description??n.description,image_url:s.image_url??n.image_url,price:s.price??n.price,original_price:s.original_price??n.original_price,currency:s.currency??n.currency,merchant:s.merchant??n.merchant,product_url:s.product_url??n.product_url,tracking_url:s.tracking_url??n.tracking_url,source_url:s.source_url??n.source_url,imported_from:s.imported_from??n.imported_from,import_notes:s.import_notes??n.import_notes,tags:s.tags??n.tags,badges:s.badges??n.badges,shipping_info:s.shipping_info??n.shipping_info,delivery_estimate:s.delivery_estimate??n.delivery_estimate,affiliate_url:s.tracking_url??s.product_url??n.affiliate_url})),s.product_url&&b(s.product_url),s.import_notes&&w(null)};return e.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overflow-y-auto",onClick:o,children:e.jsxs("div",{className:"glass-strong rounded-3xl p-6 max-w-3xl w-full my-auto",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-2xl font-bold",children:t.id?"Edit product":"New product"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 inline-flex items-center gap-1.5",children:[e.jsx(te,{className:"w-3.5 h-3.5 text-brand-magenta"}),"Keep the shopping experience clean while still allowing tracking behind the scenes."]})]}),e.jsx("span",{className:"text-[10px] uppercase tracking-wider bg-white/5 border border-white/10 rounded-full px-3 py-1 text-muted-foreground",children:"Manual + import"})]}),e.jsxs("div",{className:"rounded-3xl border border-white/10 bg-white/5 p-4 mb-5",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-3 md:items-end",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Import Product From Link"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 glass rounded-xl px-3 py-2.5",children:[e.jsx(ie,{className:"w-4 h-4 text-brand-magenta shrink-0"}),e.jsx("input",{value:g,onChange:s=>b(s.target.value),placeholder:"Paste an AliExpress, Temu, Amazon, eBay, Alibaba, or other store link",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"})]})]}),e.jsxs("button",{type:"button",disabled:h||!g.trim(),onClick:async()=>{try{v(!0),w(null);const s=await d(g.trim());i(s),f.success("Imported product details")}catch(s){const n=s?.message??"Import failed";w(n),f.error(n)}finally{v(!1)}},className:"btn-glow rounded-full px-5 py-3 font-semibold text-sm inline-flex items-center gap-2 disabled:opacity-60",children:[h?e.jsx(ae,{className:"w-4 h-4 animate-spin"}):e.jsx(re,{className:"w-4 h-4"}),h?"Fetching…":p]})]}),_?e.jsxs("div",{className:"mt-3 text-xs text-destructive inline-flex items-center gap-2",children:[e.jsx(ne,{className:"w-3.5 h-3.5"}),_]}):e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"We’ll try to fetch title, price, description, images, ratings, and source details automatically. You can edit everything before publishing."})]}),e.jsxs("div",{className:"space-y-3 max-h-[60vh] overflow-y-auto pr-2",children:[e.jsx(x,{label:"Title",value:a.title,onChange:s=>r("title",s)}),e.jsx(x,{label:"Description",value:a.description,onChange:s=>r("description",s),textarea:!0}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsx(x,{label:"Image URL",value:a.image_url,onChange:s=>r("image_url",s)}),e.jsx(x,{label:"Product URL",value:a.product_url,onChange:s=>r("product_url",s)})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsx(x,{label:"Tracking URL",value:a.tracking_url,onChange:s=>r("tracking_url",s)}),e.jsx(x,{label:"Source URL",value:a.source_url,onChange:s=>r("source_url",s)})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsx(x,{label:"Affiliate URL",value:a.affiliate_url,onChange:s=>r("affiliate_url",s)}),e.jsx(x,{label:"Currency",value:a.currency,onChange:s=>r("currency",s)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(x,{label:"Price",type:"number",value:a.price,onChange:s=>r("price",Number(s))}),e.jsx(x,{label:"Original price",type:"number",value:a.original_price??"",onChange:s=>r("original_price",s?Number(s):null)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(x,{label:"Merchant",value:a.merchant??"",onChange:s=>r("merchant",s)}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Category"}),e.jsxs("select",{value:a.category_id??"",onChange:s=>r("category_id",s.target.value||null),className:"w-full glass rounded-xl px-3 py-2.5 text-sm bg-transparent outline-none mt-1",children:[e.jsx("option",{value:"",children:"— None —"}),m.map(s=>e.jsx("option",{value:s.id,className:"bg-background",children:s.name},s.id))]})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsx(x,{label:"Imported from",value:a.imported_from??"",onChange:s=>r("imported_from",s)}),e.jsx(x,{label:"Import notes",value:a.import_notes??"",onChange:s=>r("import_notes",s)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(x,{label:"Shipping info",value:a.shipping_info??"",onChange:s=>r("shipping_info",s)}),e.jsx(x,{label:"Delivery estimate",value:a.delivery_estimate??"",onChange:s=>r("delivery_estimate",s)})]}),e.jsxs("div",{className:"flex flex-wrap gap-4 pt-2",children:[e.jsx(A,{label:"Trending",checked:a.is_trending,onChange:s=>r("is_trending",s)}),e.jsx(A,{label:"Hot deal",checked:a.is_hot,onChange:s=>r("is_hot",s)}),e.jsx(A,{label:"Featured",checked:a.is_featured,onChange:s=>r("is_featured",s)})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-5 mt-3 border-t border-white/10",children:[e.jsx("button",{onClick:o,className:"px-4 py-2 rounded-full text-sm hover:bg-white/5",children:"Cancel"}),e.jsx("button",{disabled:c,onClick:()=>u(a),className:"btn-glow rounded-full px-5 py-2 font-semibold text-sm disabled:opacity-60",children:c?"Saving…":"Save"})]})]})})}function x({label:t,value:m,onChange:o,type:u="text",textarea:c}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:t}),c?e.jsx("textarea",{value:m,onChange:d=>o(d.target.value),rows:3,className:"w-full glass rounded-xl px-3 py-2 text-sm bg-transparent outline-none mt-1 resize-none"}):e.jsx("input",{type:u,value:m,onChange:d=>o(d.target.value),className:"w-full glass rounded-xl px-3 py-2 text-sm bg-transparent outline-none mt-1"})]})}function A({label:t,checked:m,onChange:o}){return e.jsxs("label",{className:"inline-flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:u=>o(u.target.checked),className:"accent-brand-magenta w-4 h-4"}),t]})}export{Ds as component};
@@ -0,0 +1 @@
1
+ import{g as c,h as e,f as d}from"./vendor-tanstack-start-client-core-C-00BBOu.js";const a=c({type:"function"}),t=e({method:"GET"}).middleware([a]).handler(d("f56374ba3aaffab4ed8ab7e2a3691b799933caea50cc55628ceb0dfe711b588b"));e({method:"GET"}).handler(d("3ce88ecd9b40619039a92eb9befb2a1baa534430c56c7c035dc6cc7fb6ea3320"));e({method:"POST"}).handler(d("f228903e5a9f497053d1e0541c339d13437987d304e8fca9781a3a4b7021da29"));const b=e({method:"POST"}).middleware([a]).handler(d("89e33d850036f54ba22d80a5c340288b7904337506fd94deacc6372a910c3cac")),f=e({method:"POST"}).middleware([a]).handler(d("87057b699c92d5e9cc4f021e767a44009606525481c8a27886c5fc0375dc6625")),n=e({method:"POST"}).middleware([a]).handler(d("d58e9647e4364d7098cb0d840b98a827719a64c5b316ad80080e28b97fb3f1cb")),o=e({method:"GET"}).middleware([a]).handler(d("8db3a7d2924568f7f51e14d9d73d2a96f312b0d2adb7276fdd08fe90dcf12de3")),l=e({method:"POST"}).middleware([a]).handler(d("c579e6cf81462f6a2bea1160758f9416a190d3246ad7147937aa785904bea01e")),m=e({method:"POST"}).middleware([a]).handler(d("36d868d9acaba43916ce260adef4026deeafe7052311a1a61a689052f8d2a6a5")),s=e({method:"GET"}).middleware([a]).handler(d("1f15f91371ebbf2f3cadc34ffa88e17615477c189c7d20a14989f46b3a531730")),i=e({method:"POST"}).middleware([a]).handler(d("911c12f56db314b9eea0d9463dda510d0464e04b72b14405d69546cc93ebeb33"));export{t as a,o as b,m as c,n as d,l as g,b as i,s as l,f as u,i as v};
@@ -0,0 +1 @@
1
+ import{r as o,j as t}from"./vendor-react-gJPiVnX5.js";import{u as j,L as w}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{u as y}from"./index-BpJWZkva.js";import{L as v,F as s,s as p}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{v as N}from"./admin.functions--RdVcuBx.js";import{t as l}from"./vendor-sonner-71-LdGG1.js";import{t as b,K as S,M as A,l as L}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-react-start-client-GiYCfWmf.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function Qt(){const d=j(),c=y(N),[r,x]=o.useState(""),[e,u]=o.useState(""),[m,f]=o.useState(""),[a,n]=o.useState(!1),g=async h=>{h.preventDefault(),n(!0);try{const{error:i}=await p.auth.signInWithPassword({email:e,password:m});if(i)throw new Error(i.message);await c({data:{admin_id:r.trim()}}),l.success("Welcome, admin"),d({to:"/admin"})}catch(i){await p.auth.signOut(),l.error(i.message??"Sign-in failed")}finally{n(!1)}};return t.jsx("div",{className:"min-h-[80vh] flex items-center justify-center px-4 py-16",children:t.jsxs("div",{className:"w-full max-w-md glass-strong rounded-3xl p-8 shadow-elevated animate-scale-in",children:[t.jsx("div",{className:"flex justify-center mb-2",children:t.jsx(v,{size:40})}),t.jsxs("div",{className:"inline-flex items-center gap-2 mx-auto mt-4 px-3 py-1 rounded-full bg-brand-magenta/15 text-brand-magenta text-xs font-semibold w-fit block",children:[t.jsx(b,{className:"w-3.5 h-3.5"})," Restricted area"]}),t.jsx("h1",{className:"font-display text-3xl font-bold text-center mt-3",children:"Admin sign-in"}),t.jsx("p",{className:"text-center text-sm text-muted-foreground mt-1",children:"Enter your assigned Admin ID along with your email and password."}),t.jsxs("form",{onSubmit:g,className:"space-y-3 mt-6",children:[t.jsx(s,{icon:t.jsx(S,{className:"w-4 h-4"}),value:r,onChange:x,placeholder:"Admin ID"}),t.jsx(s,{icon:t.jsx(A,{className:"w-4 h-4"}),type:"email",value:e,onChange:u,placeholder:"Admin email"}),t.jsx(s,{icon:t.jsx(L,{className:"w-4 h-4"}),type:"password",value:m,onChange:f,placeholder:"Password"}),t.jsx("button",{disabled:a||!r||!e||!m,className:"btn-glow w-full rounded-full py-3 font-semibold text-sm disabled:opacity-60",children:a?"Verifying…":"Sign in as admin"})]}),t.jsxs("p",{className:"mt-6 text-xs text-center text-muted-foreground",children:["Not an admin?"," ",t.jsx(w,{to:"/login",className:"text-foreground font-semibold",children:"Regular sign-in"})]})]})})}export{Qt as component};
@@ -0,0 +1 @@
1
+ import{j as i}from"./vendor-react-gJPiVnX5.js";import{P as r}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-router-sIZLK-LU.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-lucide-react-b5K2fehp.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";const gi=()=>i.jsxs(r,{title:"Affiliate Disclosure",subtitle:"Full transparency, always.",children:[i.jsx("p",{children:i.jsx("strong",{children:"Scrollsy may earn commissions from purchases made through affiliate links."})}),i.jsx("p",{children:`When you click "View Deal" on a product, you'll be sent to a partner retailer — for example AliExpress, Amazon, Temu or Kilimall. If you buy something during that visit, Scrollsy may receive a small commission from the retailer.`}),i.jsx("h2",{children:"Does this cost you anything?"}),i.jsx("p",{children:"Nope. Affiliate commissions are paid by the retailer out of their margin. You pay the same price you would have paid going to the retailer directly."}),i.jsx("h2",{children:"Does it influence what we feature?"}),i.jsx("p",{children:"We feature products based on virality, quality and price — not commission rate. Our editorial picks stay independent of any merchant relationship."}),i.jsx("h2",{children:"Want to learn more?"}),i.jsx("p",{children:"Email us at affiliates@scrollsy.app."})]});export{gi as component};
@@ -0,0 +1 @@
1
+ import{j as t}from"./vendor-react-gJPiVnX5.js";import{L as m}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{a as p}from"./vendor-tanstack-react-query-HImzo8sX.js";import{g as e}from"./products.functions-cGzRziKO.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-tanstack-start-client-core-C-00BBOu.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-lucide-react-b5K2fehp.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";function kt(){const{data:o}=p({queryKey:["cats"],queryFn:()=>e()});return t.jsxs("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:[t.jsxs("h1",{className:"font-display text-4xl md:text-5xl font-bold tracking-tight",children:["Explore ",t.jsx("span",{className:"text-gradient",children:"categories"})]}),t.jsx("p",{className:"text-muted-foreground mt-2",children:"Every aesthetic. Every obsession. One scroll away."}),t.jsx("div",{className:"mt-10 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:(o??[]).map((r,i)=>t.jsxs(m,{to:"/category/$slug",params:{slug:r.slug},className:"group glass rounded-3xl p-6 aspect-square flex flex-col justify-between hover:scale-[1.03] transition-transform relative overflow-hidden",children:[t.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 rounded-full opacity-40 group-hover:opacity-70 transition-opacity blur-2xl",style:{background:`conic-gradient(from ${i*40}deg, #ff6b35, #e84393, #6c5ce7, #ff6b35)`}}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Category"}),t.jsx("div",{className:"font-display text-2xl font-bold mt-2",children:r.name})]}),t.jsx("div",{className:"relative text-xs text-muted-foreground group-hover:text-foreground transition-colors",children:"Explore →"})]},r.id))})]})}export{kt as component};
@@ -0,0 +1 @@
1
+ import{j as t}from"./vendor-react-gJPiVnX5.js";import{L as p}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{z as e}from"./vendor-tanstack-router-core-Cr7bYUZv.js";import{a as s}from"./vendor-tanstack-react-query-HImzo8sX.js";import{c as a}from"./products.functions-cGzRziKO.js";import{P as d}from"./ProductCard-DbIkJAE-.js";import{d as n}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{c}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-sonner-71-LdGG1.js";import"./product-links-BkZ41Gv3.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function At(){const{slug:o}=n.useParams(),{data:r,isLoading:m}=s({queryKey:["cat",o],queryFn:()=>a({data:{slug:o}})});if(!m&&!r?.category)throw e();return t.jsxs("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:[t.jsxs(p,{to:"/categories",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[t.jsx(c,{className:"w-4 h-4"})," All categories"]}),t.jsx("h1",{className:"mt-3 font-display text-4xl md:text-5xl font-bold tracking-tight",children:r?.category?.name??"…"}),t.jsxs("p",{className:"text-muted-foreground mt-1",children:[r?.products.length??0," trending finds in this drop"]}),t.jsx("div",{className:"mt-8 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:(r?.products??[]).map(i=>t.jsx(d,{product:i,aspect:"tall"},i.id))})]})}export{At as component};
@@ -0,0 +1 @@
1
+ import{r as m,j as t}from"./vendor-react-gJPiVnX5.js";import{P as a}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as l}from"./vendor-sonner-71-LdGG1.js";import{M as n,r as c}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-router-sIZLK-LU.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function qt(){const[i,o]=m.useState(""),[p,e]=m.useState(""),s=r=>{r.preventDefault(),l.success("Thanks! We'll be in touch soon."),o(""),e("")};return t.jsxs(a,{title:"Get in touch",subtitle:"Partnerships, press, support or creator collabs — we'd love to hear from you.",children:[t.jsxs("form",{onSubmit:s,className:"not-prose mt-8 space-y-3",children:[t.jsxs("label",{className:"flex items-center gap-2 glass rounded-xl px-3 py-2.5",children:[t.jsx(n,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("input",{required:!0,type:"email",value:i,onChange:r=>o(r.target.value),placeholder:"Your email",className:"flex-1 bg-transparent outline-none text-sm"})]}),t.jsx("textarea",{required:!0,value:p,onChange:r=>e(r.target.value),placeholder:"How can we help?",rows:5,className:"w-full glass rounded-xl px-3 py-2.5 text-sm bg-transparent outline-none resize-none"}),t.jsxs("button",{className:"btn-glow rounded-full px-6 py-3 font-semibold text-sm inline-flex items-center gap-2",children:[t.jsx(c,{className:"w-4 h-4"})," Send message"]})]}),t.jsxs("p",{className:"text-sm mt-6",children:["Or email us directly at"," ",t.jsx("a",{href:"mailto:hello@scrollsy.app",className:"text-gradient font-semibold",children:"hello@scrollsy.app"})]})]})}export{qt as component};
@@ -0,0 +1 @@
1
+ import{r as s,j as o}from"./vendor-react-gJPiVnX5.js";import{e as a,P as d}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{R as u,I as h,H as f,T as m,C as p}from"./vendor-radix-ui-react-accordion-C22Rgxe9.js";import{b as y}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-router-sIZLK-LU.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";import"./vendor-radix-ui-react-collapsible-BvM-4sKX.js";const x=u,n=s.forwardRef(({className:t,...r},e)=>o.jsx(h,{ref:e,className:a("border-b",t),...r}));n.displayName="AccordionItem";const l=s.forwardRef(({className:t,children:r,...e},i)=>o.jsx(f,{className:"flex",children:o.jsxs(m,{ref:i,className:a("flex flex-1 items-center justify-between py-4 text-sm font-medium cursor-pointer transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",t),...e,children:[r,o.jsx(y,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));l.displayName=m.displayName;const c=s.forwardRef(({className:t,children:r,...e},i)=>o.jsx(p,{ref:i,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...e,children:o.jsx("div",{className:a("pb-4 pt-0",t),children:r})}));c.displayName=p.displayName;const g=[{q:"What is Scrollsy?",a:"Scrollsy is a visual product discovery platform that surfaces trending gadgets, viral finds and the best deals from across the web."},{q:"Does Scrollsy sell products directly?",a:"No — when you tap 'View Deal' we send you to the retailer (AliExpress, Amazon, Temu, Kilimall, etc.) where you complete your purchase as normal."},{q:"How do you earn money?",a:"Scrollsy may earn a small commission from purchases made through our affiliate links. It costs you nothing extra and keeps Scrollsy free to use."},{q:"Is Scrollsy free?",a:"Yes — totally free for shoppers. Always."},{q:"How do I save products?",a:"Tap the heart on any product card. Saved items live in your Saved page (you'll need a free account)."},{q:"How are trending products selected?",a:"Our team curates each drop based on virality signals (TikTok, Pinterest, social shares) plus real shopper engagement on Scrollsy."},{q:"Are the deals real?",a:"Yes. We verify discount pricing at the time of curation, but stock and pricing on third-party retailers can change without notice."}],Ko=()=>o.jsx(d,{title:"Questions, answered",subtitle:"Everything you might want to know about Scrollsy.",children:o.jsx(x,{type:"single",collapsible:!0,className:"not-prose mt-6 space-y-2",children:g.map((t,r)=>o.jsxs(n,{value:`f${r}`,className:"glass rounded-2xl px-4 border-none",children:[o.jsx(l,{className:"text-left font-display font-semibold hover:no-underline",children:t.q}),o.jsx(c,{className:"text-muted-foreground",children:t.a})]},r))})});export{Ko as component};
@@ -0,0 +1 @@
1
+ import{r as c,j as e}from"./vendor-react-gJPiVnX5.js";import{u as f,L as m}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{a as j}from"./vendor-tanstack-react-query-HImzo8sX.js";import{a as b}from"./products.functions-cGzRziKO.js";import{P as l}from"./ProductCard-DbIkJAE-.js";import{v,h as N,S as w,x as y,Z as k,z as S,i as F,A as u}from"./vendor-lucide-react-b5K2fehp.js";import{j as T}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-sonner-71-LdGG1.js";import"./product-links-BkZ41Gv3.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";const h=["Mia just grabbed the Galaxy Projector","13,420 people viewing finds right now","Jordan saved the Levitating Moon Lamp","Aria scored the Wireless Earbuds X1","Sam claimed the Aurora LED Strip deal","9,870 deals viewed in the last hour"];function L(){const[s,r]=c.useState(0);return c.useEffect(()=>{const i=setInterval(()=>r(a=>(a+1)%h.length),3500);return()=>clearInterval(i)},[]),e.jsxs("div",{className:"glass-strong rounded-full px-4 py-2 inline-flex items-center gap-2 text-xs font-medium animate-pulse-glow",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-brand-magenta opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-brand-magenta"})]}),s%2===0?e.jsx(v,{className:"w-3.5 h-3.5"}):e.jsx(N,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"animate-fade-up",children:h[s]},s)]})}function Xe(){const{data:s}=j({queryKey:["home"],queryFn:()=>b()}),[r,i]=c.useState(""),a=f(),o=s?.featured??[],p=s?.trending??[],x=s?.recent??[],g=s?.categories??[];return e.jsxs("div",{className:"px-4",children:[e.jsxs("section",{className:"relative max-w-7xl mx-auto rounded-[2rem] overflow-hidden mt-4 border border-white/5",children:[e.jsx("img",{src:T,alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-60",width:1920,height:1080}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/30 via-background/40 to-background"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-radial"}),e.jsxs("div",{className:"relative z-10 px-6 md:px-14 py-20 md:py-28 max-w-4xl",children:[e.jsx("div",{className:"mb-6",children:e.jsx(L,{})}),e.jsxs("h1",{className:"font-display text-5xl md:text-7xl font-bold leading-[1.02] tracking-tight",children:["Scroll. Discover. ",e.jsx("span",{className:"text-gradient animate-gradient",children:"Save."})]}),e.jsx("p",{className:"mt-5 text-lg md:text-xl text-muted-foreground max-w-xl",children:"The visual marketplace of the internet's hidden gems. Viral gadgets, smart finds and trending deals — curated for endless scrolling."}),e.jsxs("form",{onSubmit:t=>{t.preventDefault(),a({to:"/search",search:{q:r}})},className:"mt-8 max-w-xl flex glass-strong rounded-2xl p-1.5 shadow-elevated",children:[e.jsx("div",{className:"flex items-center gap-2 px-3 text-muted-foreground",children:e.jsx(w,{className:"w-5 h-5"})}),e.jsx("input",{value:r,onChange:t=>i(t.target.value),placeholder:"Search products, gadgets, viral finds…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground py-3"}),e.jsxs("button",{type:"submit",className:"btn-glow rounded-xl px-5 py-2.5 text-sm font-semibold inline-flex items-center gap-1.5",children:[e.jsx(y,{className:"w-4 h-4"})," Discover"]})]}),e.jsx("div",{className:"mt-8 flex flex-wrap gap-2",children:g.slice(0,8).map(t=>e.jsx(m,{to:"/category/$slug",params:{slug:t.slug},className:"glass rounded-full px-3.5 py-1.5 text-xs font-medium hover:bg-white/10 transition",children:t.name},t.id))})]})]}),o.length>0&&e.jsx(n,{eyebrow:e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"w-3.5 h-3.5"})," Featured today"]}),title:"Most popular right now",subtitle:"Hand-picked finds the community is loving",href:"/search",children:e.jsx(q,{products:o})}),e.jsx(n,{title:"Shop by mood",eyebrow:e.jsx(e.Fragment,{children:"Categories"}),children:e.jsx("div",{className:"flex gap-3 overflow-x-auto pb-3 -mx-4 px-4 snap-x",children:g.map((t,d)=>e.jsxs(m,{to:"/category/$slug",params:{slug:t.slug},className:"snap-start shrink-0 glass rounded-2xl px-5 py-4 hover:scale-105 transition-transform min-w-[140px]",style:{background:`linear-gradient(135deg, hsl(${d*27%360} 80% 55% / 0.18), transparent)`},children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Category"}),e.jsx("div",{className:"text-base font-display font-semibold mt-1",children:t.name})]},t.id))})}),p.length>0&&e.jsx(n,{eyebrow:e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"w-3.5 h-3.5"})," Trending"]}),title:"Trending on TikTok",subtitle:"Going viral right now",href:"/search",children:e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:p.slice(0,8).map(t=>e.jsx(l,{product:t,aspect:"tall"},t.id))})}),e.jsx("section",{className:"max-w-7xl mx-auto mt-16 rounded-3xl overflow-hidden relative border border-white/5",children:e.jsx("div",{className:"bg-gradient-brand animate-gradient p-8 md:p-12",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold bg-black/30 rounded-full px-3 py-1",children:[e.jsx(F,{className:"w-3.5 h-3.5"})," Hot deals"]}),e.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mt-3 text-white",children:"Up to 70% off · today only"}),e.jsx("p",{className:"text-white/90 mt-2 max-w-md",children:"Limited drops curated from across the web. When they're gone, they're gone."})]}),e.jsxs(m,{to:"/search",search:{q:""},className:"bg-black text-white rounded-full px-5 py-3 font-semibold text-sm inline-flex items-center gap-2 hover:bg-black/80 transition",children:["Shop deals ",e.jsx(u,{className:"w-4 h-4"})]})]})})}),x.length>0&&e.jsx(n,{eyebrow:e.jsx(e.Fragment,{children:"Fresh drops"}),title:"Recently added",subtitle:"The newest finds, just in",children:e.jsx("div",{className:"columns-2 md:columns-3 lg:columns-4 gap-4 space-y-4 [&>*]:break-inside-avoid",children:x.map((t,d)=>e.jsx(l,{product:t,aspect:["tall","square","wide","tall"][d%4]},t.id))})})]})}function n({title:s,subtitle:r,eyebrow:i,href:a,children:o}){return e.jsxs("section",{className:"max-w-7xl mx-auto mt-16 animate-fade-up",children:[e.jsxs("div",{className:"flex items-end justify-between mb-6",children:[e.jsxs("div",{children:[i&&e.jsx("div",{className:"inline-flex items-center gap-1.5 text-xs font-semibold text-brand-magenta bg-brand-magenta/10 rounded-full px-3 py-1 mb-2",children:i}),e.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold tracking-tight",children:s}),r&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r})]}),a&&e.jsxs(m,{to:a,className:"text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:["View all ",e.jsx(u,{className:"w-3.5 h-3.5"})]})]}),o]})}function q({products:s}){if(s.length<4)return e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:s.map(a=>e.jsx(l,{product:a,aspect:"square"},a.id))});const[r,...i]=s;return e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 grid-rows-2 gap-4 md:h-[640px]",children:[e.jsx("div",{className:"col-span-2 row-span-2 md:row-span-2",children:e.jsx(l,{product:r,aspect:"auto",className:"h-full",priority:!0})}),i.slice(0,4).map(a=>e.jsx(l,{product:a,aspect:"auto",className:"h-full"},a.id))]})}export{Xe as component};
@@ -0,0 +1 @@
1
+ import{r as o,j as m}from"./vendor-react-gJPiVnX5.js";import{d as s}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{v as p}from"./vendor-tanstack-router-core-Cr7bYUZv.js";import{c as a}from"./vendor-react-dom-BnNs-kzm.js";import{S as n}from"./vendor-tanstack-react-start-client-GiYCfWmf.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-start-client-core-C-00BBOu.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-lucide-react-b5K2fehp.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";function Lt(i){const r=s();return o.useCallback(async(...e)=>{try{const t=await i(...e);if(p(t))throw t;return t}catch(t){if(p(t))return t.options._fromLocation=r.stores.location.get(),r.navigate(r.resolveRedirect(t).options);throw t}},[r,i])}o.startTransition(()=>{a.hydrateRoot(document,m.jsx(o.StrictMode,{children:m.jsx(n,{})}))});export{Lt as u};
@@ -0,0 +1 @@
1
+ import{c as s}from"./vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js";import{s as i}from"./vendor-tanstack-start-client-core-C-00BBOu.js";const n=s(),c={auth:{signInWithOAuth:async(a,e)=>{const r=await n.signInWithOAuth(a,{redirect_uri:e?.redirect_uri,extraParams:{...e?.extraParams}});if(r.redirected||r.error)return r;try{await i.auth.setSession(r.tokens)}catch(t){return{error:t instanceof Error?t:new Error(String(t))}}return r}}};export{c as l};
@@ -0,0 +1 @@
1
+ import{j as t,r as a}from"./vendor-react-gJPiVnX5.js";import{u as g,L as d}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{s as x,L as j}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{l as w}from"./index-vRX-zAyq.js";import{t as l}from"./vendor-sonner-71-LdGG1.js";import{M as v,l as N,x as b}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";import"./vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js";function _t(){const e=g(),[r,m]=a.useState(""),[i,n]=a.useState(""),[s,p]=a.useState(!1);a.useEffect(()=>{x.auth.getSession().then(({data:o})=>{o.session&&e({to:"/"})})},[e]);const f=async o=>{o.preventDefault(),p(!0);const{error:c}=await x.auth.signInWithPassword({email:r,password:i});if(p(!1),c)return l.error(c.message);l.success("Welcome back!"),e({to:"/"})},h=async()=>{const o=await w.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});if(o.error)return l.error("Sign-in failed");o.redirected||e({to:"/"})};return t.jsx("div",{className:"min-h-[80vh] flex items-center justify-center px-4 py-16",children:t.jsxs("div",{className:"w-full max-w-md glass-strong rounded-3xl p-8 shadow-elevated animate-scale-in",children:[t.jsx("div",{className:"flex justify-center mb-2",children:t.jsx(j,{size:40})}),t.jsx("h1",{className:"font-display text-3xl font-bold text-center mt-4",children:"Welcome back"}),t.jsx("p",{className:"text-center text-sm text-muted-foreground mt-1",children:"Sign in to save your favorite finds"}),t.jsxs("button",{onClick:h,className:"mt-6 w-full glass rounded-full py-3 font-medium text-sm hover:bg-white/10 transition flex items-center justify-center gap-2",children:[t.jsx(y,{})," Continue with Google"]}),t.jsxs("div",{className:"my-5 flex items-center gap-3 text-xs text-muted-foreground",children:[t.jsx("div",{className:"flex-1 h-px bg-white/10"})," or ",t.jsx("div",{className:"flex-1 h-px bg-white/10"})]}),t.jsxs("form",{onSubmit:f,className:"space-y-3",children:[t.jsx(u,{icon:t.jsx(v,{className:"w-4 h-4"}),type:"email",value:r,onChange:m,placeholder:"Email"}),t.jsx(u,{icon:t.jsx(N,{className:"w-4 h-4"}),type:"password",value:i,onChange:n,placeholder:"Password"}),t.jsxs("button",{disabled:s,className:"btn-glow w-full rounded-full py-3 font-semibold text-sm inline-flex items-center justify-center gap-2 disabled:opacity-60",children:[t.jsx(b,{className:"w-4 h-4"})," ",s?"Signing in…":"Sign in"]})]}),t.jsxs("div",{className:"mt-6 text-sm text-center text-muted-foreground space-y-2",children:[t.jsxs("p",{children:["Forgot your password?"," ",t.jsx(d,{to:"/reset-password",className:"text-foreground font-semibold hover:text-gradient",children:"Reset it"})]}),t.jsxs("p",{children:["New here?"," ",t.jsx(d,{to:"/signup",className:"text-foreground font-semibold hover:text-gradient",children:"Create account"})]})]})]})})}function u({icon:e,value:r,onChange:m,type:i="text",placeholder:n}){return t.jsxs("label",{className:"flex items-center gap-2 glass rounded-xl px-3 py-2.5",children:[t.jsx("span",{className:"text-muted-foreground",children:e}),t.jsx("input",{type:i,value:r,onChange:s=>m(s.target.value),placeholder:n,className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"})]})}function y(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 48 48","aria-hidden":"true",children:[t.jsx("path",{fill:"#20b47c",d:"M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.5 6 29.5 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.3-.4-3.5z"}),t.jsx("path",{fill:"#9e0ea3",d:"M6.3 14.7l6.6 4.8C14.7 16 19 13 24 13c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.5 7 29.5 5 24 5 16.3 5 9.7 9.4 6.3 14.7z"}),t.jsx("path",{fill:"#59e9f3",d:"M24 44c5.4 0 10.3-2.1 14-5.4l-6.5-5.3C29.6 34.8 26.9 36 24 36c-5.3 0-9.7-3.3-11.3-7.9l-6.5 5C9.6 39.6 16.2 44 24 44z"}),t.jsx("path",{fill:"#e64ce6",d:"M43.6 20.5H42V20H24v8h11.3c-.8 2.3-2.3 4.2-4.2 5.6l6.5 5.3C42 35 44 30 44 24c0-1.3-.1-2.3-.4-3.5z"})]})}export{u as Field,_t as component};
@@ -0,0 +1 @@
1
+ import{j as i}from"./vendor-react-gJPiVnX5.js";import{P as o}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-router-sIZLK-LU.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-lucide-react-b5K2fehp.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";const vi=()=>i.jsxs(o,{title:"Privacy Policy",subtitle:"Last updated May 2026",children:[i.jsx("p",{children:"Your privacy matters. This policy explains what we collect and how we use it."}),i.jsx("h2",{children:"Information we collect"}),i.jsxs("ul",{children:[i.jsx("li",{children:"Account info (email, display name) when you sign up."}),i.jsx("li",{children:"Saved items and browsing activity to personalize recommendations."}),i.jsx("li",{children:"Anonymous analytics (page views, clicks) to improve the product."})]}),i.jsx("h2",{children:"How we use it"}),i.jsx("p",{children:"To run Scrollsy, deliver recommendations, send transactional emails and improve the platform. We don't sell your personal data."}),i.jsx("h2",{children:"Affiliate clicks"}),i.jsx("p",{children:"When you click an affiliate link, the destination retailer may set cookies and collect their own data per their privacy policy."}),i.jsx("h2",{children:"Your choices"}),i.jsx("p",{children:"You can edit your profile, delete saved items, or close your account at any time from your profile page."}),i.jsx("h2",{children:"Contact"}),i.jsx("p",{children:"Questions? Email privacy@scrollsy.app."})]});export{vi as component};
@@ -0,0 +1 @@
1
+ function e(r){const t=r?.trim();return t?t.startsWith("//")?`https:${t}`:t:null}function n(r){return e(r.tracking_url)??e(r.affiliate_url)??e(r.product_url)??e(r.source_url)??null}function l(r){return r.merchant??r.imported_from??"shopping store"}export{l as a,n as r};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-react-gJPiVnX5.js";import{L as p}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{z as j}from"./vendor-tanstack-router-core-Cr7bYUZv.js";import{b as N,a as c,u as v}from"./vendor-tanstack-react-query-HImzo8sX.js";import{b}from"./products.functions-cGzRziKO.js";import{P as w}from"./ProductCard-DbIkJAE-.js";import{c as y,u as _,s as o}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as l}from"./vendor-sonner-71-LdGG1.js";import{c as S,i as k,z as q,B as F,u as L,E as C,H as P,s as E}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./product-links-BkZ41Gv3.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function Ze(){const{id:i}=y.useParams(),{user:r}=_(),x=N(),{data:a,isLoading:u}=c({queryKey:["product",i],queryFn:()=>b({data:{id:i}})}),{data:n}=c({queryKey:["saved-ids",r?.id],enabled:!!r,queryFn:async()=>{const{data:s}=await o.from("saved_items").select("product_id").eq("user_id",r.id);return new Set((s??[]).map(h=>h.product_id))}});if(!u&&!a?.product)throw j();const t=a?.product,g=v({mutationFn:async()=>{if(!r)throw new Error("login");n?.has(i)?await o.from("saved_items").delete().eq("user_id",r.id).eq("product_id",i):await o.from("saved_items").insert({user_id:r.id,product_id:i})},onSuccess:()=>{x.invalidateQueries({queryKey:["saved-ids",r?.id]}),l.success("Updated favorites")},onError:s=>{s.message==="login"&&l.error("Sign in to save items")}}),f=async()=>{typeof navigator<"u"&&navigator.share?await navigator.share({title:t?.title,url:window.location.href}):(navigator.clipboard.writeText(window.location.href),l.success("Link copied"))};if(!t)return e.jsx("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:"Loading…"});const m=t.original_price?Math.round((1-Number(t.price)/Number(t.original_price))*100):0,d=n?.has(i)??!1;return e.jsxs("div",{className:"px-4 max-w-7xl mx-auto pt-8",children:[e.jsxs(p,{to:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(S,{className:"w-4 h-4"})," Back"]}),e.jsxs("div",{className:"mt-6 grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"relative rounded-3xl overflow-hidden border border-white/5 bg-gradient-card",children:[e.jsx("img",{src:t.image_url,alt:t.title,className:"w-full h-auto object-cover"}),e.jsxs("div",{className:"absolute top-4 left-4 flex flex-col gap-2",children:[m>0&&e.jsxs("span",{className:"bg-gradient-brand text-white text-sm font-bold px-3 py-1.5 rounded-full",children:["-",m,"% off"]}),t.is_hot&&e.jsxs("span",{className:"glass-strong text-xs font-semibold px-3 py-1.5 rounded-full inline-flex items-center gap-1",children:[e.jsx(k,{className:"w-3.5 h-3.5 text-brand-orange"})," Hot Deal"]}),t.is_trending&&e.jsxs("span",{className:"glass-strong text-xs font-semibold px-3 py-1.5 rounded-full inline-flex items-center gap-1",children:[e.jsx(q,{className:"w-3.5 h-3.5 text-brand-magenta"})," Trending"]})]})]}),e.jsxs("div",{className:"space-y-5",children:[t.categories?.slug&&e.jsx(p,{to:"/category/$slug",params:{slug:t.categories.slug},className:"inline-flex glass rounded-full px-3 py-1 text-xs",children:t.categories.name}),e.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold tracking-tight",children:t.title}),e.jsx("p",{className:"text-muted-foreground",children:t.description}),e.jsxs("div",{className:"flex items-baseline gap-3",children:[e.jsxs("span",{className:"text-4xl font-display font-bold text-gradient",children:["$",Number(t.price).toFixed(2)]}),t.original_price&&e.jsxs("span",{className:"text-lg text-muted-foreground line-through",children:["$",Number(t.original_price).toFixed(2)]})]}),e.jsxs("div",{className:"glass rounded-2xl p-4 space-y-2 text-sm",children:[t.shipping_info&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"w-4 h-4 text-brand-magenta"}),e.jsx("span",{className:"text-muted-foreground",children:t.shipping_info}),t.delivery_estimate&&e.jsxs("span",{className:"text-muted-foreground",children:["· ",t.delivery_estimate]})]}),t.merchant&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"w-4 h-4 text-brand-magenta"}),e.jsxs("span",{className:"text-muted-foreground",children:["Sold via ",t.merchant]})]})]}),t.tags?.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.tags.map(s=>e.jsxs("span",{className:"glass rounded-full px-2.5 py-1 text-[11px] text-muted-foreground",children:["#",s]},s))}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs("a",{href:t.affiliate_url,target:"_blank",rel:"noopener noreferrer sponsored",className:"btn-glow flex-1 rounded-full py-3 font-semibold inline-flex items-center justify-center gap-2",children:["View Deal ",e.jsx(C,{className:"w-4 h-4"})]}),e.jsx("button",{onClick:()=>g.mutate(),className:`glass-strong rounded-full px-4 ${d?"bg-gradient-brand border-transparent":""}`,"aria-label":"Save",children:e.jsx(P,{className:d?"fill-white text-white":""})}),e.jsx("button",{onClick:f,className:"glass-strong rounded-full px-4","aria-label":"Share",children:e.jsx(E,{className:"w-5 h-5"})})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground/80 pt-2",children:"Scrollsy may earn a commission from purchases through this link."})]})]}),(a?.related??[]).length>0&&e.jsxs("div",{className:"mt-20",children:[e.jsx("h2",{className:"font-display text-2xl font-bold mb-6",children:"You might also love"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:a.related.map(s=>e.jsx(w,{product:s,aspect:"tall"},s.id))})]})]})}export{Ze as component};
@@ -0,0 +1 @@
1
+ import{h as e,f as d}from"./vendor-tanstack-start-client-core-C-00BBOu.js";const c=e({method:"GET"}).handler(d("1d8e8cdce79172e2882528d5d32b80bd35c0ea1b2438720a98289b792614f340")),t=e({method:"GET"}).handler(d("8e28ffefb35b7f29bda8f5128c6f8fb45636d264c3d475770b9bb49c082743e7")),b=e({method:"GET"}).handler(d("0238da445528618169909df2f20865e4e94cdd1ae332dd4871ecfce3a4f5e2e2")),f=e({method:"GET"}).handler(d("b1412d2ee3540c641acd3eadee47cab30a74bd74ee33cc79351c015701f7ed17")),o=e({method:"GET"}).handler(d("98f6ea06219c15c258067120d8debbcde0f6f83e0efb6c06816ddb77b33849a7"));export{c as a,f as b,b as c,t as g,o as s};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./vendor-react-gJPiVnX5.js";import{u as P,L as c}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{u as U,s as d,A as R,b as q,a as D}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as m}from"./vendor-sonner-71-LdGG1.js";import{a as I}from"./vendor-tanstack-react-query-HImzo8sX.js";import{C as L,g as O,t as u,H as h,y as E,v as y,A as F,n as M}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";function rs(){const{user:s,loading:r}=U(),i=P(),[a,n]=l.useState(""),[b,x]=l.useState(""),[j,v]=l.useState(!1),[S,N]=l.useState(!1),{data:o}=I({queryKey:["profile-role",s?.id],enabled:!!s,queryFn:async()=>{const{data:t}=await d.from("user_roles").select("admin_id").eq("user_id",s.id).eq("role","admin").maybeSingle();return t??null}});l.useEffect(()=>{s&&d.from("profiles").select("display_name, avatar_url").eq("id",s.id).maybeSingle().then(({data:t})=>{n(t?.display_name??""),x(t?.avatar_url??"")})},[s]);const _=l.useMemo(()=>a?.trim()?.slice(0,1)?.toUpperCase()??s?.email?.slice(0,1)?.toUpperCase()??"U",[a,s?.email]);if(r)return e.jsx("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:"Loading…"});if(!s)return e.jsxs("div",{className:"max-w-md mx-auto pt-24 px-4 text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-bold",children:"Sign in to view your profile"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Track saved finds, update your account, and manage your shop profile."}),e.jsx(c,{to:"/login",className:"btn-glow inline-block mt-6 rounded-full px-6 py-3 font-semibold text-sm",children:"Sign in"})]});const A=async()=>{v(!0);const{error:t}=await d.from("profiles").upsert({id:s.id,display_name:a,avatar_url:b||null,updated_at:new Date().toISOString()});if(v(!1),t)return m.error(t.message);m.success("Profile updated")},C=async t=>{if(t){if(!t.type.startsWith("image/")){m.error("Please choose an image file");return}N(!0);try{const p=await Q(t);x(p);const{error:w}=await d.from("profiles").upsert({id:s.id,display_name:a,avatar_url:p,updated_at:new Date().toISOString()});if(w)throw w;m.success("Profile photo updated")}catch(p){m.error(p?.message??"Could not update profile photo")}finally{N(!1)}}};return e.jsx("div",{className:"px-4 max-w-7xl mx-auto pt-10 pb-16",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[320px_1fr]",children:[e.jsx("aside",{className:"glass-strong rounded-[2rem] p-6 shadow-elevated h-fit",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-32 rounded-[1.5rem] bg-gradient-brand opacity-90"}),e.jsxs("div",{className:"relative pt-10 pb-6 px-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsxs("div",{className:"relative",children:[e.jsxs(R,{className:"h-28 w-28 border-[6px] border-background shadow-2xl",children:[e.jsx(q,{src:b||void 0,alt:a||"Profile photo"}),e.jsx(D,{className:"bg-brand-magenta/20 text-2xl font-bold text-foreground",children:_})]}),e.jsxs("label",{className:"absolute bottom-1 right-1 inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-foreground text-background shadow-lg transition hover:scale-105",children:[e.jsx(L,{className:"h-4 w-4"}),e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:t=>C(t.target.files?.[0]??null),disabled:S})]})]})}),e.jsxs("div",{className:"mt-5 text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-bold",children:a||"Scrollster"}),e.jsx("p",{className:"text-sm text-muted-foreground break-all",children:s.email}),o?.admin_id?e.jsxs("div",{className:"mt-3 inline-flex items-center gap-2 rounded-full border border-brand-amber/20 bg-brand-amber/10 px-3 py-1 text-xs font-semibold text-brand-amber",children:[o.admin_id==="doraexplora"?e.jsx(O,{className:"h-3.5 w-3.5"}):e.jsx(u,{className:"h-3.5 w-3.5"}),o.admin_id==="doraexplora"?"Master Admin":`Admin ID ${o.admin_id}`]}):null]}),e.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[e.jsx(k,{label:"Saved items",value:"24",icon:e.jsx(h,{className:"h-4 w-4"})}),e.jsx(k,{label:"Reviews",value:"8",icon:e.jsx(E,{className:"h-4 w-4"})})]})]})]})}),e.jsxs("main",{className:"space-y-6",children:[e.jsx("section",{className:"glass-strong rounded-[2rem] p-6 md:p-8 shadow-elevated",children:e.jsxs("div",{className:"flex flex-col gap-6 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{className:"max-w-2xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-brand-magenta/15 px-3 py-1 text-xs font-semibold text-brand-magenta",children:[e.jsx(y,{className:"h-3.5 w-3.5"}),"Shopping profile"]}),e.jsx("h2",{className:"mt-3 font-display text-3xl md:text-4xl font-bold tracking-tight",children:"Your account, styled like a marketplace profile"}),e.jsx("p",{className:"mt-3 text-sm md:text-base text-muted-foreground",children:"Update your display name and photo, access saved deals, and jump to admin tools if you manage the store."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsxs(c,{to:"/saved",className:"inline-flex items-center gap-2 rounded-full border border-white/10 px-4 py-2 text-sm hover:bg-white/5 transition",children:[e.jsx(h,{className:"h-4 w-4"}),"Saved items"]}),e.jsxs(c,{to:"/search",search:{q:""},className:"inline-flex items-center gap-2 rounded-full border border-white/10 px-4 py-2 text-sm hover:bg-white/5 transition",children:[e.jsx(F,{className:"h-4 w-4"}),"Keep shopping"]}),o?.admin_id?e.jsxs(c,{to:"/admin",className:"inline-flex items-center gap-2 rounded-full border border-brand-magenta/20 bg-brand-magenta/10 px-4 py-2 text-sm font-medium text-foreground hover:bg-brand-magenta/15 transition",children:[e.jsx(u,{className:"h-4 w-4"}),"Admin page"]}):null]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-3 md:w-[360px]",children:[e.jsx(g,{title:"Wishlist",value:"12",detail:"Items ready to buy"}),e.jsx(g,{title:"Orders",value:"3",detail:"Recent purchases"}),e.jsx(g,{title:"Rewards",value:"480",detail:"Points available"})]})]})}),e.jsxs("section",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"glass-strong rounded-[2rem] p-6 shadow-card",children:[e.jsx("h3",{className:"font-display text-xl font-bold",children:"Profile details"}),e.jsxs("div",{className:"mt-5 space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Display name"}),e.jsx("input",{value:a,onChange:t=>n(t.target.value),className:"w-full rounded-2xl border border-white/10 bg-background/60 px-4 py-3 text-sm outline-none",placeholder:"Your display name"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Profile photo"}),e.jsx("div",{className:"rounded-2xl border border-dashed border-white/10 bg-background/40 px-4 py-4 text-sm text-muted-foreground",children:"Upload a square image to make your profile look polished in the marketplace UI."})]})]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx("button",{onClick:A,disabled:j,className:"btn-glow rounded-full px-5 py-2.5 text-sm font-semibold disabled:opacity-60",children:j?"Saving…":"Save changes"}),e.jsx("button",{onClick:()=>{n(s.user_metadata?.display_name??""),x("")},className:"rounded-full border border-white/10 px-5 py-2.5 text-sm hover:bg-white/5 transition",children:"Reset"})]})]}),e.jsxs("div",{className:"glass-strong rounded-[2rem] p-6 shadow-card",children:[e.jsx("h3",{className:"font-display text-xl font-bold",children:"Quick links"}),e.jsxs("div",{className:"mt-5 space-y-3",children:[e.jsx(f,{to:"/saved",icon:e.jsx(h,{className:"h-4 w-4"}),title:"Saved items",description:"Open your wishlist and compare favorites."}),e.jsx(f,{to:"/categories",icon:e.jsx(y,{className:"h-4 w-4"}),title:"Browse categories",description:"Jump back into shopping by mood or category."}),e.jsx(f,{to:"/admin",icon:e.jsx(u,{className:"h-4 w-4"}),title:"Admin page",description:"Manage products and admins.",hidden:!o?.admin_id})]}),e.jsxs("div",{className:"mt-6 flex items-center justify-between rounded-2xl border border-white/10 bg-background/40 px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Sign out"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"End your current session"})]}),e.jsxs("button",{onClick:async()=>{await d.auth.signOut(),i({to:"/"})},className:"inline-flex items-center gap-2 rounded-full border border-white/10 px-4 py-2 text-sm hover:bg-white/5 transition",children:[e.jsx(M,{className:"h-4 w-4"}),"Sign out"]})]})]})]})]})]})})}function Q(s){return new Promise((r,i)=>{const a=new FileReader;a.onload=()=>r(String(a.result??"")),a.onerror=()=>i(new Error("Failed to read image")),a.readAsDataURL(s)})}function k({label:s,value:r,icon:i}){return e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-background/40 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i,s]}),e.jsx("div",{className:"mt-1 font-display text-2xl font-bold",children:r})]})}function g({title:s,value:r,detail:i}){return e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-background/40 p-4",children:[e.jsx("div",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:s}),e.jsx("div",{className:"mt-2 font-display text-2xl font-bold",children:r}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:i})]})}function f({to:s,icon:r,title:i,description:a,hidden:n}){return n?null:e.jsxs(c,{to:s,className:"flex items-start gap-3 rounded-2xl border border-white/10 bg-background/40 p-4 transition hover:bg-white/5",children:[e.jsx("div",{className:"mt-0.5 rounded-full bg-brand-magenta/15 p-2 text-brand-magenta",children:r}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-medium",children:i}),e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:a})]})]})}export{rs as component};
@@ -0,0 +1 @@
1
+ import{r as e,j as t}from"./vendor-react-gJPiVnX5.js";import{L as c}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{L as u,F as x,s as f}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{t as o}from"./vendor-sonner-71-LdGG1.js";import{M as h,A as g}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";function Dt(){const[r,a]=e.useState(""),[i,m]=e.useState(!1),[s,n]=e.useState(!1),l=async d=>{if(d.preventDefault(),!r)return o.error("Enter the email for your account.");m(!0);const{error:p}=await f.auth.resetPasswordForEmail(r,{redirectTo:`${window.location.origin}/update-password`});if(m(!1),p)return o.error(p.message||"Unable to send reset email.");n(!0),o.success("Check your email for a password reset link.")};return t.jsx("div",{className:"min-h-[80vh] flex items-center justify-center px-4 py-16",children:t.jsxs("div",{className:"w-full max-w-md glass-strong rounded-3xl p-8 shadow-elevated animate-scale-in",children:[t.jsx("div",{className:"flex justify-center mb-2",children:t.jsx(u,{size:40})}),t.jsx("h1",{className:"font-display text-3xl font-bold text-center mt-4",children:"Forgot your password?"}),t.jsx("p",{className:"text-center text-sm text-muted-foreground mt-1",children:"Enter the email tied to your Scrollsy account and we’ll send a secure reset link."}),t.jsxs("form",{onSubmit:l,className:"space-y-3 mt-6",children:[t.jsx(x,{icon:t.jsx(h,{className:"w-4 h-4"}),type:"email",value:r,onChange:a,placeholder:"Email"}),t.jsxs("button",{disabled:i||s,className:"btn-glow w-full rounded-full py-3 font-semibold text-sm inline-flex items-center justify-center gap-2 disabled:opacity-60",children:[t.jsx(g,{className:"w-4 h-4"})," ",i?"Sending…":s?"Email sent":"Send reset link"]})]}),t.jsxs("p",{className:"mt-6 text-sm text-center text-muted-foreground",children:["Remembered it?"," ",t.jsx(c,{to:"/login",className:"text-foreground font-semibold hover:text-gradient",children:"Sign in"})]})]})})}export{Dt as component};
@@ -0,0 +1 @@
1
+ import{j as t}from"./vendor-react-gJPiVnX5.js";import{L as e}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{a as p}from"./vendor-tanstack-react-query-HImzo8sX.js";import{u as d,s as l}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{P as n}from"./ProductCard-DbIkJAE-.js";import{H as c}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-sonner-71-LdGG1.js";import"./vendor-zod-By9teAtI.js";import"./product-links-BkZ41Gv3.js";function Bt(){const{user:i,loading:s}=d(),{data:o,isLoading:a}=p({queryKey:["saved-products",i?.id],enabled:!!i,queryFn:async()=>{const{data:r}=await l.from("saved_items").select("created_at, products(*)").eq("user_id",i.id).order("created_at",{ascending:!1});return(r??[]).map(m=>m.products).filter(Boolean)}});return s?t.jsx("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:"Loading…"}):i?t.jsxs("div",{className:"px-4 max-w-7xl mx-auto pt-10",children:[t.jsxs("h1",{className:"font-display text-4xl md:text-5xl font-bold tracking-tight",children:["Your ",t.jsx("span",{className:"text-gradient",children:"saved"})]}),t.jsxs("p",{className:"text-muted-foreground mt-2",children:[o?.length??0," finds in your collection"]}),a?t.jsx("div",{className:"mt-10 grid grid-cols-2 md:grid-cols-4 gap-4",children:Array.from({length:4}).map((r,m)=>t.jsx("div",{className:"aspect-[3/4] rounded-3xl shimmer bg-surface-elevated"},m))}):(o?.length??0)===0?t.jsxs("div",{className:"glass rounded-3xl p-12 text-center mt-10",children:[t.jsx("div",{className:"text-5xl mb-3",children:"💝"}),t.jsx("h3",{className:"font-display text-xl font-semibold",children:"No saved items yet"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1 mb-5",children:"Tap the heart on any find to save it here."}),t.jsx(e,{to:"/",className:"btn-glow inline-block rounded-full px-5 py-2.5 text-sm font-semibold",children:"Start discovering"})]}):t.jsx("div",{className:"mt-8 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:o.map(r=>t.jsx(n,{product:r,aspect:"tall"},r.id))})]}):t.jsxs("div",{className:"max-w-md mx-auto pt-24 px-4 text-center",children:[t.jsx(c,{className:"w-12 h-12 mx-auto text-brand-magenta"}),t.jsx("h1",{className:"font-display text-3xl font-bold mt-4",children:"Save your favorite finds"}),t.jsx("p",{className:"text-muted-foreground mt-2",children:"Sign in to start building your wishlist."}),t.jsx(e,{to:"/login",className:"btn-glow inline-block mt-6 rounded-full px-6 py-3 font-semibold text-sm",children:"Sign in"})]})}export{Bt as component};
@@ -0,0 +1 @@
1
+ import{j as e,r as l}from"./vendor-react-gJPiVnX5.js";import{u as f}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{a as b}from"./vendor-tanstack-react-query-HImzo8sX.js";import{s as j}from"./products.functions-cGzRziKO.js";import{P as N}from"./ProductCard-DbIkJAE-.js";import{e as h,R as v}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{w,q as y,j as S,S as k}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-sonner-71-LdGG1.js";import"./product-links-BkZ41Gv3.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";const g=()=>({sort:"relevance",maxPrice:"",trending:!1,hot:!1,featured:!1,freeShipping:!1});function P(t,r){const n=r.maxPrice?Number(r.maxPrice):Number.POSITIVE_INFINITY;let i=t.filter(o=>!(Number.isFinite(n)&&o.price>n||r.trending&&!o.is_trending||r.hot&&!o.is_hot||r.featured&&!o.is_featured||r.freeShipping&&!o.shipping_info?.toLowerCase().includes("free")));return i=[...i].sort((o,s)=>{switch(r.sort){case"newest":return new Date(s.created_at??0).getTime()-new Date(o.created_at??0).getTime();case"popular":return(s.view_count??0)-(o.view_count??0);case"price-asc":return o.price-s.price;case"price-desc":return s.price-o.price;default:return 0}}),i}function F({filters:t,onChange:r,resultCount:n}){const i=(s,m)=>r({...t,[s]:m}),o=()=>r(g());return e.jsxs("div",{className:"glass-strong rounded-3xl p-4 md:p-5 border border-white/10",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:[e.jsx(w,{className:"w-4 h-4"}),"Filters"]}),e.jsx("h2",{className:"font-display text-xl font-bold mt-2",children:"Refine your results"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[n," products match your filters"]})]}),e.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center justify-center gap-2 rounded-full border border-white/10 px-4 py-2 text-sm hover:bg-white/5 transition",children:[e.jsx(y,{className:"w-4 h-4"}),"Reset"]})]}),e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[e.jsx(x,{label:"Sort by",children:e.jsxs("select",{value:t.sort,onChange:s=>i("sort",s.target.value),className:"w-full rounded-2xl border border-white/10 bg-background/60 px-3 py-2.5 text-sm outline-none",children:[e.jsx("option",{value:"relevance",children:"Relevance"}),e.jsx("option",{value:"newest",children:"Newest"}),e.jsx("option",{value:"popular",children:"Most popular"}),e.jsx("option",{value:"price-asc",children:"Price: low to high"}),e.jsx("option",{value:"price-desc",children:"Price: high to low"})]})}),e.jsx(x,{label:"Max price",children:e.jsx("input",{inputMode:"numeric",type:"number",min:"0",value:t.maxPrice,onChange:s=>i("maxPrice",s.target.value),placeholder:"Any price",className:"w-full rounded-2xl border border-white/10 bg-background/60 px-3 py-2.5 text-sm outline-none"})}),e.jsx(d,{label:"Trending",checked:t.trending,onChange:s=>i("trending",s)}),e.jsx(d,{label:"Hot",checked:t.hot,onChange:s=>i("hot",s)}),e.jsx(d,{label:"Featured",checked:t.featured,onChange:s=>i("featured",s)})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:e.jsx(C,{active:t.freeShipping,onClick:()=>i("freeShipping",!t.freeShipping),label:"Free shipping",icon:e.jsx(S,{className:"w-3.5 h-3.5"})})})]})}function x({label:t,children:r}){return e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground",children:t}),r]})}function d({label:t,checked:r,onChange:n}){return e.jsxs("button",{type:"button",onClick:()=>n(!r),className:h("rounded-2xl border px-4 py-3 text-left text-sm transition",r?"border-brand-magenta/60 bg-brand-magenta/15 text-foreground shadow-lg":"border-white/10 bg-background/40 text-muted-foreground hover:bg-white/5 hover:text-foreground"),children:[e.jsx("span",{className:"block font-medium",children:t}),e.jsx("span",{className:"mt-0.5 block text-xs opacity-80",children:r?"On":"Off"})]})}function C({label:t,icon:r,active:n,onClick:i}){return e.jsxs("button",{type:"button",onClick:i,className:h("inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm transition",n?"bg-foreground text-background":"border border-white/10 bg-background/40 text-muted-foreground hover:bg-white/5 hover:text-foreground"),children:[r,t]})}function We(){const{q:t}=v.useSearch(),r=f(),[n,i]=l.useState(t),[o,s]=l.useState(g());l.useEffect(()=>i(t),[t]);const{data:m,isLoading:p}=b({queryKey:["search",t],queryFn:()=>j({data:{q:t}})}),u=l.useMemo(()=>m??[],[m]),c=l.useMemo(()=>P(u,o),[u,o]);return e.jsxs("div",{className:"px-4 max-w-7xl mx-auto pt-10 pb-16",children:[e.jsxs("div",{className:"flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-4xl md:text-5xl font-bold tracking-tight",children:t?e.jsxs(e.Fragment,{children:["Results for ",e.jsxs("span",{className:"text-gradient",children:['"',t,'"']})]}):"Discover trending finds"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Shop the web like a marketplace — sort, filter, and compare at a glance."})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?"Searching…":`${c.length} products found`})]}),e.jsxs("form",{onSubmit:a=>{a.preventDefault(),r({to:"/search",search:{q:n}})},className:"mt-6 flex glass-strong rounded-2xl p-1.5 max-w-2xl",children:[e.jsx("div",{className:"px-3 flex items-center",children:e.jsx(k,{className:"w-5 h-5 text-muted-foreground"})}),e.jsx("input",{autoFocus:!0,value:n,onChange:a=>i(a.target.value),placeholder:"Search anything…",className:"flex-1 bg-transparent outline-none text-sm py-3"}),e.jsx("button",{className:"btn-glow rounded-xl px-5 text-sm font-semibold",children:"Search"})]}),e.jsx("div",{className:"mt-6",children:e.jsx(F,{filters:o,onChange:s,resultCount:c.length})}),e.jsx("div",{className:"mt-8",children:p?e.jsx(_,{}):c.length===0?e.jsx(R,{}):e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:c.map(a=>e.jsx(N,{product:a,aspect:"tall"},a.id))})})]})}function _(){return e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Array.from({length:8}).map((t,r)=>e.jsx("div",{className:"aspect-[3/4] rounded-3xl shimmer bg-surface-elevated"},r))})}function R(){return e.jsxs("div",{className:"glass rounded-3xl p-12 text-center",children:[e.jsx("div",{className:"text-6xl mb-3",children:"🔍"}),e.jsx("h3",{className:"font-display text-xl font-semibold",children:"No finds match that search"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Try a different keyword or relax a few filters."})]})}export{We as component};
@@ -0,0 +1 @@
1
+ import{r as e,j as t}from"./vendor-react-gJPiVnX5.js";import{u as g,L as w}from"./vendor-tanstack-react-router-sIZLK-LU.js";import{L as j,F as i,s as y}from"./vendor-tanstack-start-client-core-C-00BBOu.js";import{l as v}from"./index-vRX-zAyq.js";import{t as r}from"./vendor-sonner-71-LdGG1.js";import{U as N,M as b,l as S,x as C}from"./vendor-lucide-react-b5K2fehp.js";import"./vendor-tanstack-router-core-Cr7bYUZv.js";import"./vendor-tanstack-history-C617CaxG.js";import"./vendor-seroval-B_Fur-nl.js";import"./vendor-seroval-plugins-CBHnPkZJ.js";import"./vendor-cookie-es-CS0aJGDi.js";import"./vendor-tanstack-react-store-EvTi3ahh.js";import"./vendor-use-sync-external-store-ZvKHXaIn.js";import"./vendor-react-dom-BnNs-kzm.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-tanstack-store-BC7mA7pq.js";import"./vendor-supabase-supabase-js-DCCzdwBJ.js";import"./vendor-supabase-postgrest-js-C4rBWbCx.js";import"./vendor-supabase-realtime-js-D6BlOYKE.js";import"./vendor-supabase-phoenix-BzEf37Ve.js";import"./vendor-supabase-storage-js-BG98L3Zz.js";import"./vendor-iceberg-js-tWD4K6Lg.js";import"./vendor-supabase-auth-js-DWrN-bIx.js";import"./vendor-tslib-Du-meQkk.js";import"./vendor-supabase-functions-js-uY_V-TxC.js";import"./vendor-tanstack-react-query-HImzo8sX.js";import"./vendor-tanstack-query-core-7wuJJ5ZL.js";import"./vendor-vercel-analytics-DwPM5BWs.js";import"./vendor-radix-ui-react-dropdown-menu-0uzvrqkn.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-Cvq0AS8Z.js";import"./vendor-radix-ui-react-context-CAqqn5Nx.js";import"./vendor-radix-ui-react-use-controllable-state-Ca3eMtxa.js";import"./vendor-radix-ui-react-use-layout-effect-B3AcGWPy.js";import"./vendor-radix-ui-react-primitive-zTHwXNoz.js";import"./vendor-radix-ui-react-menu-D0qf2r6_.js";import"./vendor-radix-ui-react-collection-D9KtqmHm.js";import"./vendor-radix-ui-react-direction-DxZwNuei.js";import"./vendor-radix-ui-react-dismissable-layer-Dqgrs55Y.js";import"./vendor-radix-ui-react-use-callback-ref-E91aPc6s.js";import"./vendor-radix-ui-react-use-escape-keydown-7n3YsXFo.js";import"./vendor-radix-ui-react-focus-guards-DgWoZ-fP.js";import"./vendor-radix-ui-react-focus-scope-BLIu5QaL.js";import"./vendor-radix-ui-react-popper-BafIylxU.js";import"./vendor-floating-ui-react-dom-Bas3975S.js";import"./vendor-floating-ui-dom-BxK0hn2R.js";import"./vendor-floating-ui-core-BlUy28sp.js";import"./vendor-floating-ui-utils-BfYUAVcw.js";import"./vendor-radix-ui-react-arrow-DMHj2mKI.js";import"./vendor-radix-ui-react-use-size-CXS04sct.js";import"./vendor-radix-ui-react-portal-BnAsfNCS.js";import"./vendor-radix-ui-react-presence-C-f3UKQ2.js";import"./vendor-radix-ui-react-roving-focus-jyJB8K2E.js";import"./vendor-radix-ui-react-id-bpga_rLa.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-react-remove-scroll-DHKl-IMP.js";import"./vendor-react-remove-scroll-bar-CSjdInc2.js";import"./vendor-react-style-singleton-BqHpkgXn.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-Bh0DDN6h.js";import"./vendor-use-callback-ref-C_fIAtot.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-tailwind-merge-Ct12j0u0.js";import"./vendor-radix-ui-react-avatar-CVPBkFXg.js";import"./vendor-radix-ui-react-slot-6LXHJrHl.js";import"./vendor-radix-ui-react-use-is-hydrated-C1PY1qNv.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-radix-ui-react-dialog-DZ01vOLq.js";import"./vendor-framer-motion-BMdL-cuX.js";import"./vendor-motion-dom-BETJamZt.js";import"./vendor-motion-utils-BuWewJbj.js";import"./vendor-zod-By9teAtI.js";import"./vendor-lovable.dev-cloud-auth-js-VuzqtJVg.js";function Bt(){const s=g(),[m,d]=e.useState(""),[a,x]=e.useState(""),[n,u]=e.useState(""),[p,l]=e.useState(!1),f=async o=>{o.preventDefault(),l(!0);const{error:c}=await y.auth.signUp({email:a,password:n,options:{data:{display_name:m},emailRedirectTo:typeof window<"u"?window.location.origin:void 0}});if(l(!1),c)return r.error(c.message);r.success("Account created — check your email to confirm."),s({to:"/"})},h=async()=>{const o=await v.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});o.error&&r.error("Sign-up failed"),!o.redirected&&s({to:"/"})};return t.jsx("div",{className:"min-h-[80vh] flex items-center justify-center px-4 py-16",children:t.jsxs("div",{className:"w-full max-w-md glass-strong rounded-3xl p-8 shadow-elevated animate-scale-in",children:[t.jsx("div",{className:"flex justify-center",children:t.jsx(j,{size:40})}),t.jsx("h1",{className:"font-display text-3xl font-bold text-center mt-4",children:"Join Scrollsy"}),t.jsx("p",{className:"text-center text-sm text-muted-foreground mt-1",children:"Save finds, follow trends, never miss a drop."}),t.jsx("button",{onClick:h,className:"mt-6 w-full glass rounded-full py-3 font-medium text-sm hover:bg-white/10 transition",children:"Continue with Google"}),t.jsxs("div",{className:"my-5 flex items-center gap-3 text-xs text-muted-foreground",children:[t.jsx("div",{className:"flex-1 h-px bg-white/10"})," or ",t.jsx("div",{className:"flex-1 h-px bg-white/10"})]}),t.jsxs("form",{onSubmit:f,className:"space-y-3",children:[t.jsx(i,{icon:t.jsx(N,{className:"w-4 h-4"}),value:m,onChange:d,placeholder:"Display name"}),t.jsx(i,{icon:t.jsx(b,{className:"w-4 h-4"}),type:"email",value:a,onChange:x,placeholder:"Email"}),t.jsx(i,{icon:t.jsx(S,{className:"w-4 h-4"}),type:"password",value:n,onChange:u,placeholder:"Password (min 6 chars)"}),t.jsxs("button",{disabled:p,className:"btn-glow w-full rounded-full py-3 font-semibold text-sm inline-flex items-center justify-center gap-2 disabled:opacity-60",children:[t.jsx(C,{className:"w-4 h-4"})," ",p?"Creating…":"Create account"]})]}),t.jsxs("p",{className:"mt-6 text-sm text-center text-muted-foreground",children:["Already a Scrollster?"," ",t.jsx(w,{to:"/login",className:"text-foreground font-semibold",children:"Sign in"})]})]})})}export{Bt as component};