@fluid-app/fluid-cli-theme-dev 0.1.59 → 0.1.61

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 (252) hide show
  1. package/README.md +109 -0
  2. package/dist/dist-cli-preview/.vite/manifest.json +1831 -0
  3. package/dist/dist-cli-preview/account-screens.js +1 -0
  4. package/dist/dist-cli-preview/capabilities.json +1 -0
  5. package/dist/dist-cli-preview/chunks/Breadcrumb-CZ-skiUy.js +91 -0
  6. package/dist/dist-cli-preview/chunks/Combobox-BGiCYa56.js +1455 -0
  7. package/dist/dist-cli-preview/chunks/ContactsScreen-vsNgy_gn.js +6930 -0
  8. package/dist/dist-cli-preview/chunks/MemberManagementProviders-DMwkh3JW.js +1509 -0
  9. package/dist/dist-cli-preview/chunks/MessagingScreen-DzJOwPGH.js +38475 -0
  10. package/dist/dist-cli-preview/chunks/MobileActionSheet-DqVPgFKI.js +2895 -0
  11. package/dist/dist-cli-preview/chunks/MySiteScreen-BSmWlCKA.js +4950 -0
  12. package/dist/dist-cli-preview/chunks/OrdersScreen-CVEl9FnN.js +1349 -0
  13. package/dist/dist-cli-preview/chunks/OrdersScreen-d4fJE_dm.js +9 -0
  14. package/dist/dist-cli-preview/chunks/ProfileScreen-BC5gyJDY.js +2581 -0
  15. package/dist/dist-cli-preview/chunks/SubscriptionsScreen-CFM4Pufg.js +38 -0
  16. package/dist/dist-cli-preview/chunks/account-screen-runtime-DxhJm6Qd.js +12407 -0
  17. package/dist/dist-cli-preview/chunks/ar-4OhalXtk.js +628 -0
  18. package/dist/dist-cli-preview/chunks/ar-8iaFSgop.js +189 -0
  19. package/dist/dist-cli-preview/chunks/ar-B7NQmkZ1.js +341 -0
  20. package/dist/dist-cli-preview/chunks/ar-DEUMqcX3.js +563 -0
  21. package/dist/dist-cli-preview/chunks/ar-DT9j-dOi.js +720 -0
  22. package/dist/dist-cli-preview/chunks/ar-D_B30x0o.js +176 -0
  23. package/dist/dist-cli-preview/chunks/arrow-left-UFKI-PQf.js +14 -0
  24. package/dist/dist-cli-preview/chunks/bg-CIgMfa9k.js +176 -0
  25. package/dist/dist-cli-preview/chunks/bg-CS2zt-UV.js +720 -0
  26. package/dist/dist-cli-preview/chunks/bg-CxfL8rZN.js +341 -0
  27. package/dist/dist-cli-preview/chunks/bg-DOdbUYGw.js +563 -0
  28. package/dist/dist-cli-preview/chunks/bg-D_C_HmWn.js +189 -0
  29. package/dist/dist-cli-preview/chunks/bg-DeBjzn9B.js +628 -0
  30. package/dist/dist-cli-preview/chunks/bn-BAGJspTJ.js +563 -0
  31. package/dist/dist-cli-preview/chunks/bn-BgnBXWHo.js +176 -0
  32. package/dist/dist-cli-preview/chunks/bn-CRBwi_3N.js +628 -0
  33. package/dist/dist-cli-preview/chunks/bn-CdhHCK--.js +341 -0
  34. package/dist/dist-cli-preview/chunks/bn-DiqHsF7K.js +720 -0
  35. package/dist/dist-cli-preview/chunks/bn-UEAt87N9.js +189 -0
  36. package/dist/dist-cli-preview/chunks/cli-preview-DunPfnjU.js +151 -0
  37. package/dist/dist-cli-preview/chunks/client.gen-CSTBgfxj.js +672 -0
  38. package/dist/dist-cli-preview/chunks/contacts-CpYlEgAq.js +4 -0
  39. package/dist/dist-cli-preview/chunks/countries-api-adapter-B3usO25w.js +108 -0
  40. package/dist/dist-cli-preview/chunks/create-card-entry-container-DHgsbSyr.js +23942 -0
  41. package/dist/dist-cli-preview/chunks/cs-B8rJsMOS.js +189 -0
  42. package/dist/dist-cli-preview/chunks/cs-ChKaPMtV.js +563 -0
  43. package/dist/dist-cli-preview/chunks/cs-CkdXQxaf.js +720 -0
  44. package/dist/dist-cli-preview/chunks/cs-DTe-xGeI.js +341 -0
  45. package/dist/dist-cli-preview/chunks/cs-DmLSumGB.js +176 -0
  46. package/dist/dist-cli-preview/chunks/cs-jXPm6Nhj.js +628 -0
  47. package/dist/dist-cli-preview/chunks/da-7uI_CROE.js +628 -0
  48. package/dist/dist-cli-preview/chunks/da-B8Cl_vkl.js +341 -0
  49. package/dist/dist-cli-preview/chunks/da-Bee-xQNq.js +563 -0
  50. package/dist/dist-cli-preview/chunks/da-DYlEkykt.js +720 -0
  51. package/dist/dist-cli-preview/chunks/da-EfkyseOR.js +176 -0
  52. package/dist/dist-cli-preview/chunks/da-J--1RxZp.js +189 -0
  53. package/dist/dist-cli-preview/chunks/de-BTNiErdB.js +189 -0
  54. package/dist/dist-cli-preview/chunks/de-CIhZnrdS.js +720 -0
  55. package/dist/dist-cli-preview/chunks/de-CKtChtTF.js +628 -0
  56. package/dist/dist-cli-preview/chunks/de-D8cYy8G-.js +341 -0
  57. package/dist/dist-cli-preview/chunks/de-EARi-xk5.js +176 -0
  58. package/dist/dist-cli-preview/chunks/de-zeOnL7Nl.js +563 -0
  59. package/dist/dist-cli-preview/chunks/el-0NNTwBnJ.js +563 -0
  60. package/dist/dist-cli-preview/chunks/el-BPz4rb5a.js +176 -0
  61. package/dist/dist-cli-preview/chunks/el-Bg6zRbVK.js +720 -0
  62. package/dist/dist-cli-preview/chunks/el-CUjODD23.js +628 -0
  63. package/dist/dist-cli-preview/chunks/el-Chjin2JW.js +341 -0
  64. package/dist/dist-cli-preview/chunks/el-DYay96x-.js +189 -0
  65. package/dist/dist-cli-preview/chunks/es-CFZtv6aF.js +176 -0
  66. package/dist/dist-cli-preview/chunks/es-CGgD1AV1.js +720 -0
  67. package/dist/dist-cli-preview/chunks/es-CXXB8ubn.js +628 -0
  68. package/dist/dist-cli-preview/chunks/es-Cf56ydFZ.js +189 -0
  69. package/dist/dist-cli-preview/chunks/es-DirUtV7k.js +563 -0
  70. package/dist/dist-cli-preview/chunks/es-mp8RwFN4.js +341 -0
  71. package/dist/dist-cli-preview/chunks/fi-91gcpxoy.js +341 -0
  72. package/dist/dist-cli-preview/chunks/fi-BfDoQ1rt.js +628 -0
  73. package/dist/dist-cli-preview/chunks/fi-Bn9_l4IH.js +176 -0
  74. package/dist/dist-cli-preview/chunks/fi-Bo5QdhP_.js +563 -0
  75. package/dist/dist-cli-preview/chunks/fi-CC2YqekN.js +189 -0
  76. package/dist/dist-cli-preview/chunks/fi-DUhIWph7.js +720 -0
  77. package/dist/dist-cli-preview/chunks/fr-BSouGEGN.js +176 -0
  78. package/dist/dist-cli-preview/chunks/fr-BnYsse99.js +563 -0
  79. package/dist/dist-cli-preview/chunks/fr-C32S8PvA.js +720 -0
  80. package/dist/dist-cli-preview/chunks/fr-DIQcYUq-.js +628 -0
  81. package/dist/dist-cli-preview/chunks/fr-Do6AIa1z.js +189 -0
  82. package/dist/dist-cli-preview/chunks/fr-ekvUCKTH.js +341 -0
  83. package/dist/dist-cli-preview/chunks/he-B7QiuquT.js +341 -0
  84. package/dist/dist-cli-preview/chunks/he-BYEZTUry.js +176 -0
  85. package/dist/dist-cli-preview/chunks/he-CO8gUz9X.js +628 -0
  86. package/dist/dist-cli-preview/chunks/he-DaWGyHjM.js +189 -0
  87. package/dist/dist-cli-preview/chunks/he-pFefco4W.js +563 -0
  88. package/dist/dist-cli-preview/chunks/he-xSGbvsti.js +720 -0
  89. package/dist/dist-cli-preview/chunks/hey-api-client-DSvKWGPq.js +153 -0
  90. package/dist/dist-cli-preview/chunks/hi-BLnEaAml.js +176 -0
  91. package/dist/dist-cli-preview/chunks/hi-BMFNssNU.js +720 -0
  92. package/dist/dist-cli-preview/chunks/hi-BXBdXuFm.js +189 -0
  93. package/dist/dist-cli-preview/chunks/hi-DNNhi7ud.js +341 -0
  94. package/dist/dist-cli-preview/chunks/hi-DVSXxEzh.js +628 -0
  95. package/dist/dist-cli-preview/chunks/hi-Uqd1FKtv.js +563 -0
  96. package/dist/dist-cli-preview/chunks/hr-B1T2UY_p.js +176 -0
  97. package/dist/dist-cli-preview/chunks/hr-B432GvmU.js +720 -0
  98. package/dist/dist-cli-preview/chunks/hr-BJR58Xci.js +563 -0
  99. package/dist/dist-cli-preview/chunks/hr-CAwxMKX_.js +341 -0
  100. package/dist/dist-cli-preview/chunks/hr-DBrPFNLx.js +189 -0
  101. package/dist/dist-cli-preview/chunks/hr-yH6ab4ea.js +628 -0
  102. package/dist/dist-cli-preview/chunks/hu-BcC628Ln.js +189 -0
  103. package/dist/dist-cli-preview/chunks/hu-Bv0_YQEn.js +628 -0
  104. package/dist/dist-cli-preview/chunks/hu-D_oQwH4Q.js +341 -0
  105. package/dist/dist-cli-preview/chunks/hu-Q0aE9GvJ.js +720 -0
  106. package/dist/dist-cli-preview/chunks/hu-TNzzMEzp.js +563 -0
  107. package/dist/dist-cli-preview/chunks/hu-cQw9hgLe.js +176 -0
  108. package/dist/dist-cli-preview/chunks/id-Becf5X73.js +720 -0
  109. package/dist/dist-cli-preview/chunks/id-CLvNjXjm.js +189 -0
  110. package/dist/dist-cli-preview/chunks/id-CzSVbo5E.js +628 -0
  111. package/dist/dist-cli-preview/chunks/id-Vudf_d_f.js +563 -0
  112. package/dist/dist-cli-preview/chunks/id-Zd_5csjz.js +176 -0
  113. package/dist/dist-cli-preview/chunks/id-oeAszBoo.js +341 -0
  114. package/dist/dist-cli-preview/chunks/isAfter-BUGgByEf.js +1414 -0
  115. package/dist/dist-cli-preview/chunks/it-BlwQOBaX.js +720 -0
  116. package/dist/dist-cli-preview/chunks/it-C0jghILa.js +563 -0
  117. package/dist/dist-cli-preview/chunks/it-CmxC_FIJ.js +176 -0
  118. package/dist/dist-cli-preview/chunks/it-D5BXSiSl.js +189 -0
  119. package/dist/dist-cli-preview/chunks/it-Dme6GXSG.js +341 -0
  120. package/dist/dist-cli-preview/chunks/it-xT70eFoJ.js +628 -0
  121. package/dist/dist-cli-preview/chunks/ja-BJ7phJBG.js +720 -0
  122. package/dist/dist-cli-preview/chunks/ja-Bc8dA1LN.js +189 -0
  123. package/dist/dist-cli-preview/chunks/ja-BcOunH2q.js +176 -0
  124. package/dist/dist-cli-preview/chunks/ja-CRnvQNCa.js +341 -0
  125. package/dist/dist-cli-preview/chunks/ja-CfYfDP_F.js +563 -0
  126. package/dist/dist-cli-preview/chunks/ja-Dh3z4uJk.js +628 -0
  127. package/dist/dist-cli-preview/chunks/ko-8mk8A3_I.js +341 -0
  128. package/dist/dist-cli-preview/chunks/ko-Bnp-5GAn.js +720 -0
  129. package/dist/dist-cli-preview/chunks/ko-CG_0ufw6.js +176 -0
  130. package/dist/dist-cli-preview/chunks/ko-CJ-8gCc9.js +189 -0
  131. package/dist/dist-cli-preview/chunks/ko-CnpxBQ2W.js +628 -0
  132. package/dist/dist-cli-preview/chunks/ko-CtkKNEZB.js +563 -0
  133. package/dist/dist-cli-preview/chunks/log-out-CBUq5Hd-.js +15 -0
  134. package/dist/dist-cli-preview/chunks/map-pin-DHfjSyoR.js +20 -0
  135. package/dist/dist-cli-preview/chunks/messaging-DkyH4CPP.js +4 -0
  136. package/dist/dist-cli-preview/chunks/mount-account-screen-pc1VISwF.js +11041 -0
  137. package/dist/dist-cli-preview/chunks/ms-BF5gF9D5.js +189 -0
  138. package/dist/dist-cli-preview/chunks/ms-Bs0GvdOw.js +341 -0
  139. package/dist/dist-cli-preview/chunks/ms-CyhqvfOb.js +563 -0
  140. package/dist/dist-cli-preview/chunks/ms-D6Cf3VUm.js +628 -0
  141. package/dist/dist-cli-preview/chunks/ms-DR0U3aeO.js +720 -0
  142. package/dist/dist-cli-preview/chunks/ms-DTN7PIDq.js +176 -0
  143. package/dist/dist-cli-preview/chunks/mysite-wvfITV7T.js +4 -0
  144. package/dist/dist-cli-preview/chunks/nl-C1v8tc97.js +720 -0
  145. package/dist/dist-cli-preview/chunks/nl-C5fWLZkK.js +189 -0
  146. package/dist/dist-cli-preview/chunks/nl-Cgt3zlZ8.js +628 -0
  147. package/dist/dist-cli-preview/chunks/nl-DWtWnOvH.js +563 -0
  148. package/dist/dist-cli-preview/chunks/nl-tsI6lLxl.js +341 -0
  149. package/dist/dist-cli-preview/chunks/nl-x2lc8Ct5.js +176 -0
  150. package/dist/dist-cli-preview/chunks/no-BeVycdYu.js +563 -0
  151. package/dist/dist-cli-preview/chunks/no-DMot6qX0.js +341 -0
  152. package/dist/dist-cli-preview/chunks/no-Dk9D1gjY.js +189 -0
  153. package/dist/dist-cli-preview/chunks/no-R8FScfrK.js +176 -0
  154. package/dist/dist-cli-preview/chunks/no-dhNRqvE4.js +720 -0
  155. package/dist/dist-cli-preview/chunks/no-xVFexdWN.js +628 -0
  156. package/dist/dist-cli-preview/chunks/orders-c13r499A.js +4 -0
  157. package/dist/dist-cli-preview/chunks/pl-BH1bEHfg.js +720 -0
  158. package/dist/dist-cli-preview/chunks/pl-Bl9G1yOR.js +176 -0
  159. package/dist/dist-cli-preview/chunks/pl-Cu0JzUUV.js +563 -0
  160. package/dist/dist-cli-preview/chunks/pl-D7AZQwtK.js +189 -0
  161. package/dist/dist-cli-preview/chunks/pl-Dl0M9JDp.js +628 -0
  162. package/dist/dist-cli-preview/chunks/pl-DmTxONNg.js +341 -0
  163. package/dist/dist-cli-preview/chunks/plus-C-lo0pFM.js +14 -0
  164. package/dist/dist-cli-preview/chunks/profile-CoWo9Sxe.js +4 -0
  165. package/dist/dist-cli-preview/chunks/pt-62Kd-NN1.js +189 -0
  166. package/dist/dist-cli-preview/chunks/pt-BAq7bseT.js +628 -0
  167. package/dist/dist-cli-preview/chunks/pt-DgmwnAV-.js +341 -0
  168. package/dist/dist-cli-preview/chunks/pt-K0EDcWuR.js +720 -0
  169. package/dist/dist-cli-preview/chunks/pt-nD60RpwN.js +176 -0
  170. package/dist/dist-cli-preview/chunks/pt-voHVxH2b.js +563 -0
  171. package/dist/dist-cli-preview/chunks/ro-B4M17oRc.js +341 -0
  172. package/dist/dist-cli-preview/chunks/ro-CFfjUJ1T.js +563 -0
  173. package/dist/dist-cli-preview/chunks/ro-CtL0oK2c.js +628 -0
  174. package/dist/dist-cli-preview/chunks/ro-D6ybG7vp.js +176 -0
  175. package/dist/dist-cli-preview/chunks/ro-DTauvv2V.js +189 -0
  176. package/dist/dist-cli-preview/chunks/ro-DUxhal7c.js +720 -0
  177. package/dist/dist-cli-preview/chunks/ru-45VizwWQ.js +628 -0
  178. package/dist/dist-cli-preview/chunks/ru-BS2gZnbs.js +341 -0
  179. package/dist/dist-cli-preview/chunks/ru-C0oMeuhb.js +176 -0
  180. package/dist/dist-cli-preview/chunks/ru-COxlz18L.js +563 -0
  181. package/dist/dist-cli-preview/chunks/ru-CjEXCUxb.js +720 -0
  182. package/dist/dist-cli-preview/chunks/ru-g5Cz5HSk.js +189 -0
  183. package/dist/dist-cli-preview/chunks/schemas-9_ZwC5nC.js +3977 -0
  184. package/dist/dist-cli-preview/chunks/screen-route-slug-utils-B254xI_J.js +14954 -0
  185. package/dist/dist-cli-preview/chunks/sheet-haptics-context-D2WUiXJm.js +116 -0
  186. package/dist/dist-cli-preview/chunks/sidebar-CMSWZCPS.js +848 -0
  187. package/dist/dist-cli-preview/chunks/sk-BGDxj2sS.js +563 -0
  188. package/dist/dist-cli-preview/chunks/sk-BdDjjHfn.js +341 -0
  189. package/dist/dist-cli-preview/chunks/sk-Bpdt_mn0.js +176 -0
  190. package/dist/dist-cli-preview/chunks/sk-DX2wOf1g.js +628 -0
  191. package/dist/dist-cli-preview/chunks/sk-QbdQWjZy.js +714 -0
  192. package/dist/dist-cli-preview/chunks/sk-YuAeAaeZ.js +189 -0
  193. package/dist/dist-cli-preview/chunks/store-api-context-BIdILNWL.js +16 -0
  194. package/dist/dist-cli-preview/chunks/subscriptions-BHALQrcU.js +4 -0
  195. package/dist/dist-cli-preview/chunks/sv-BlNLvbmj.js +628 -0
  196. package/dist/dist-cli-preview/chunks/sv-CEmTDhJy.js +176 -0
  197. package/dist/dist-cli-preview/chunks/sv-CW7FL5HA.js +341 -0
  198. package/dist/dist-cli-preview/chunks/sv-CiCeNX1x.js +720 -0
  199. package/dist/dist-cli-preview/chunks/sv-DefBhX0c.js +563 -0
  200. package/dist/dist-cli-preview/chunks/sv-iaAh80e4.js +189 -0
  201. package/dist/dist-cli-preview/chunks/th-BNEA6ESz.js +720 -0
  202. package/dist/dist-cli-preview/chunks/th-BYBMKmSh.js +341 -0
  203. package/dist/dist-cli-preview/chunks/th-DMPCj1Fg.js +189 -0
  204. package/dist/dist-cli-preview/chunks/th-DV3lk4-6.js +563 -0
  205. package/dist/dist-cli-preview/chunks/th-F8oLBw5n.js +176 -0
  206. package/dist/dist-cli-preview/chunks/th-fPXxGW_m.js +628 -0
  207. package/dist/dist-cli-preview/chunks/tl-BMLmbhme.js +628 -0
  208. package/dist/dist-cli-preview/chunks/tl-BXIS85ly.js +176 -0
  209. package/dist/dist-cli-preview/chunks/tl-CDigaLsK.js +341 -0
  210. package/dist/dist-cli-preview/chunks/tl-DVdSJCnc.js +563 -0
  211. package/dist/dist-cli-preview/chunks/tl-fdtlfqan.js +720 -0
  212. package/dist/dist-cli-preview/chunks/tl-w5CgYWXn.js +189 -0
  213. package/dist/dist-cli-preview/chunks/tr-BA1MDk8A.js +563 -0
  214. package/dist/dist-cli-preview/chunks/tr-CHri_kqV.js +189 -0
  215. package/dist/dist-cli-preview/chunks/tr-DD75kuPl.js +720 -0
  216. package/dist/dist-cli-preview/chunks/tr-Mq5Hfqt2.js +628 -0
  217. package/dist/dist-cli-preview/chunks/tr-PxiurNCr.js +341 -0
  218. package/dist/dist-cli-preview/chunks/tr-YXIIDIEV.js +176 -0
  219. package/dist/dist-cli-preview/chunks/trash-2-Bq4IqH0j.js +137 -0
  220. package/dist/dist-cli-preview/chunks/uk-B4aYnJ8t.js +341 -0
  221. package/dist/dist-cli-preview/chunks/uk-ByJtQJHi.js +189 -0
  222. package/dist/dist-cli-preview/chunks/uk-CCVTTskN.js +720 -0
  223. package/dist/dist-cli-preview/chunks/uk-CS0tJc6H.js +628 -0
  224. package/dist/dist-cli-preview/chunks/uk-CYYjeT-V.js +176 -0
  225. package/dist/dist-cli-preview/chunks/uk-DGb0m_JV.js +563 -0
  226. package/dist/dist-cli-preview/chunks/use-optional-store-Csor1Z3z.js +22 -0
  227. package/dist/dist-cli-preview/chunks/useInfiniteQuery-BpFtQ7DH.js +67 -0
  228. package/dist/dist-cli-preview/chunks/user-BGrQJ1GJ.js +31 -0
  229. package/dist/dist-cli-preview/chunks/users-DBL0isYy.js +27 -0
  230. package/dist/dist-cli-preview/chunks/vi-BoKSdzH3.js +341 -0
  231. package/dist/dist-cli-preview/chunks/vi-CHKjehVL.js +628 -0
  232. package/dist/dist-cli-preview/chunks/vi-DFicISRE.js +189 -0
  233. package/dist/dist-cli-preview/chunks/vi-DT4XS4HU.js +176 -0
  234. package/dist/dist-cli-preview/chunks/vi-RFwPNQ96.js +720 -0
  235. package/dist/dist-cli-preview/chunks/vi-SG6trKny.js +563 -0
  236. package/dist/dist-cli-preview/chunks/zh_CN-BJVGrpVl.js +714 -0
  237. package/dist/dist-cli-preview/chunks/zh_CN-BeGANQIJ.js +176 -0
  238. package/dist/dist-cli-preview/chunks/zh_CN-BwpNGMQN.js +189 -0
  239. package/dist/dist-cli-preview/chunks/zh_CN-CFu3GI2I.js +563 -0
  240. package/dist/dist-cli-preview/chunks/zh_CN-DrCrXsZC.js +341 -0
  241. package/dist/dist-cli-preview/chunks/zh_CN-x6mJyUQH.js +628 -0
  242. package/dist/dist-cli-preview/chunks/zh_TW-CorN6cwY.js +720 -0
  243. package/dist/dist-cli-preview/chunks/zh_TW-D9gGVyEb.js +176 -0
  244. package/dist/dist-cli-preview/chunks/zh_TW-DdD6Hf_A.js +628 -0
  245. package/dist/dist-cli-preview/chunks/zh_TW-JmyC1W5K.js +341 -0
  246. package/dist/dist-cli-preview/chunks/zh_TW-Oq4Chn8F.js +189 -0
  247. package/dist/dist-cli-preview/chunks/zh_TW-kUnD3TL4.js +563 -0
  248. package/dist/index.mjs +1220 -513
  249. package/dist/index.mjs.map +1 -1
  250. package/dist/skills/themes-review/SKILL.md +2 -2
  251. package/dist/skills/themes-review/references/navigation.md +3 -1
  252. package/package.json +60 -10
@@ -0,0 +1,1349 @@
1
+ import { O as re, l as c, W as se, j as t, M as L, a1 as B, ai as ne, B as D, am as ae, E as ie } from "./account-screen-runtime-DxhJm6Qd.js";
2
+ import { a as le, c as oe, b as de, u as ce, I as ue, S as g } from "./sheet-haptics-context-D2WUiXJm.js";
3
+ import { h as R, I as me, R as pe, m as xe, r as T, n as U, i as P, f as fe, p as ge } from "./MemberManagementProviders-DMwkh3JW.js";
4
+ import { u as he, S as M } from "./useInfiniteQuery-BpFtQ7DH.js";
5
+ import { B as K, a as Y, b as S, c as W, d as _e, e as be } from "./Breadcrumb-CZ-skiUy.js";
6
+ import "./store-api-context-BIdILNWL.js";
7
+ import { u as je } from "./use-optional-store-Csor1Z3z.js";
8
+ const ye = {
9
+ all: ["orders"]
10
+ }, O = {
11
+ all: ["portalTenantOrders"],
12
+ list: (e) => [...O.all, "list", e],
13
+ detail: (e) => [...O.all, "detail", e]
14
+ };
15
+ function Ne(e, r) {
16
+ const s = R();
17
+ return he({
18
+ queryKey: [...ye.all, "infinite-list", e],
19
+ queryFn: ({ pageParam: a }) => {
20
+ if (!s.fetchCustomerOrders)
21
+ throw new Error(
22
+ "fetchCustomerOrders not implemented on this OrdersApi"
23
+ );
24
+ return s.fetchCustomerOrders({ ...e, cursor: a });
25
+ },
26
+ getNextPageParam: (a) => a.meta?.pagination?.next_cursor ?? void 0,
27
+ initialPageParam: void 0,
28
+ enabled: r?.enabled ?? !0
29
+ });
30
+ }
31
+ function q(e, r) {
32
+ const s = R();
33
+ return re({
34
+ queryKey: O.detail(e),
35
+ queryFn: () => {
36
+ if (!s.fetchOrderById)
37
+ throw new Error("fetchOrderById not implemented on this OrdersApi");
38
+ return s.fetchOrderById(e);
39
+ },
40
+ enabled: !!e
41
+ });
42
+ }
43
+ function ve(e) {
44
+ return e.order_total_after_points_redemption != null ? `${e.currency_symbol || "$"}${Number(
45
+ e.order_total_after_points_redemption
46
+ ).toFixed(2)}` : e.total_display_amount || `${e.currency_symbol || "$"}${Number(e.amount).toFixed(2)}`;
47
+ }
48
+ function we(e, r, s) {
49
+ if (!r.address1 || !r.city || !r.state || !r.postal_code)
50
+ return null;
51
+ const a = `${r.address1}, ${r.city}, ${r.state} ${r.postal_code.slice(0, 5)}`, n = encodeURIComponent(a), l = s?.width ?? 600, i = s?.height ?? 300, o = s?.zoom ?? 15, d = encodeURIComponent(s?.markerColor ?? "red");
52
+ return `https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=${o}&size=${l}x${i}&maptype=roadmap&markers=color:${d}%7C${n}&key=${e}`;
53
+ }
54
+ const $ = {
55
+ singular: "point",
56
+ plural: "points"
57
+ };
58
+ function ke() {
59
+ const { data: e } = je(), r = e?.reward_points_label_singular?.trim() || $.singular, s = e?.reward_points_label_plural?.trim() || $.plural;
60
+ return c.useMemo(() => ({ singular: r, plural: s }), [r, s]);
61
+ }
62
+ const Se = {
63
+ breadcrumb: "Orders",
64
+ breadcrumb_detail: "Order #{{id}}",
65
+ search_orders: "Search orders...",
66
+ order_number: "Order #",
67
+ date: "Date",
68
+ status: "Status",
69
+ product: "Product",
70
+ total: "Total",
71
+ no_orders_found: "No orders found",
72
+ no_matching_orders: "No matching orders",
73
+ no_image_available: "No image available",
74
+ no_image: "No image",
75
+ this_product_no_longer_exists: "This product no longer exists",
76
+ subscription: "Subscription",
77
+ subscription_hash: "Subscription #{{token}}",
78
+ view_subscription: "View Subscription",
79
+ results: "results",
80
+ previous: "Previous",
81
+ next: "Next",
82
+ pagination: "Pagination",
83
+ showing: "Showing",
84
+ to: "to",
85
+ of: "of",
86
+ order_not_found: "Order not found",
87
+ error_generic: "An error occurred",
88
+ error_loading_order: "Failed to load order: {{message}}",
89
+ items_count: "Items ({{count}})",
90
+ subtotal: "Subtotal",
91
+ discount: "Discount",
92
+ shipping: "Shipping",
93
+ shipping_free: "Free",
94
+ tax: "Tax",
95
+ tax_included: "{{name}}, included",
96
+ points_applied: "{{label}} Applied",
97
+ points_earned: "{{label}} Earned on This Order!",
98
+ points_total: "{{count}} {{label}} total",
99
+ points: "{{label}}",
100
+ status_label: "Status:",
101
+ payment_label: "Payment:",
102
+ fulfillment_label: "Fulfillment:",
103
+ delivery_label: "Delivery:",
104
+ order_info: "Order Info",
105
+ order: "Order",
106
+ order_number_label: "Order Number",
107
+ email: "Email",
108
+ customer: "Customer",
109
+ payment_method: "Payment Method",
110
+ no_payment_method: "No payment method",
111
+ card_ending_in: "{{brand}} ending in {{last4}}",
112
+ shipping_address: "Shipping Address",
113
+ no_shipping_address: "No shipping address available",
114
+ billing_address: "Billing Address",
115
+ shipping_method: "Shipping Method",
116
+ estimated_delivery: "Est. {{estimate}}",
117
+ sku_label: "SKU: {{sku}}",
118
+ // ── Orders list screen ──────────────────────────────────────────────
119
+ order_history: "Order history",
120
+ loading: "Loading...",
121
+ load_more: "Load more",
122
+ filter_all: "All",
123
+ filter_fulfilled: "Fulfilled",
124
+ filter_preparing: "Preparing",
125
+ filter_subscription: "Subscription",
126
+ status_cancelled: "Cancelled",
127
+ status_completed: "Completed",
128
+ status_fulfilled: "Fulfilled",
129
+ status_pending: "Pending",
130
+ status_preparing: "Preparing",
131
+ status_processing: "Processing",
132
+ status_refunded: "Refunded",
133
+ status_returned: "Returned",
134
+ status_shipped: "Shipped",
135
+ group_this_week: "This week",
136
+ group_this_month: "This month",
137
+ today: "Today",
138
+ yesterday: "Yesterday",
139
+ n_days_ago: "{{n}} days ago",
140
+ last_week: "Last week",
141
+ n_weeks_ago: "{{n}} weeks ago",
142
+ more_items: "+ {{n}} more",
143
+ from_subscription: "From subscription",
144
+ no_orders_yet: "No orders yet",
145
+ search_hint: "Try a different search term.",
146
+ empty_hint: "Your orders will show up here after you place one.",
147
+ load_failed_title: "Couldn't load your orders",
148
+ load_failed_hint: "Something went wrong on our end. Please try again.",
149
+ try_again: "Try again",
150
+ shipping_address_map: "Shipping address map",
151
+ card_fallback: "Card",
152
+ order_on_its_way: "Your order is on its way",
153
+ tracking_number: "Tracking number",
154
+ track_package: "Track package",
155
+ track_package_aria: "Track package {{number}}",
156
+ track_package_aria_with_carrier: "Track {{carrier}} package {{number}}"
157
+ }, Oe = le({
158
+ fallback: Se,
159
+ loaders: {
160
+ ar: () => import("./ar-8iaFSgop.js").then(
161
+ (e) => e.default
162
+ ),
163
+ bg: () => import("./bg-D_C_HmWn.js").then(
164
+ (e) => e.default
165
+ ),
166
+ bn: () => import("./bn-UEAt87N9.js").then(
167
+ (e) => e.default
168
+ ),
169
+ cs: () => import("./cs-B8rJsMOS.js").then(
170
+ (e) => e.default
171
+ ),
172
+ da: () => import("./da-J--1RxZp.js").then(
173
+ (e) => e.default
174
+ ),
175
+ de: () => import("./de-BTNiErdB.js").then(
176
+ (e) => e.default
177
+ ),
178
+ el: () => import("./el-DYay96x-.js").then(
179
+ (e) => e.default
180
+ ),
181
+ es: () => import("./es-Cf56ydFZ.js").then(
182
+ (e) => e.default
183
+ ),
184
+ fi: () => import("./fi-CC2YqekN.js").then(
185
+ (e) => e.default
186
+ ),
187
+ fr: () => import("./fr-Do6AIa1z.js").then(
188
+ (e) => e.default
189
+ ),
190
+ he: () => import("./he-DaWGyHjM.js").then(
191
+ (e) => e.default
192
+ ),
193
+ hi: () => import("./hi-BXBdXuFm.js").then(
194
+ (e) => e.default
195
+ ),
196
+ hr: () => import("./hr-DBrPFNLx.js").then(
197
+ (e) => e.default
198
+ ),
199
+ hu: () => import("./hu-BcC628Ln.js").then(
200
+ (e) => e.default
201
+ ),
202
+ id: () => import("./id-CLvNjXjm.js").then(
203
+ (e) => e.default
204
+ ),
205
+ it: () => import("./it-D5BXSiSl.js").then(
206
+ (e) => e.default
207
+ ),
208
+ ja: () => import("./ja-Bc8dA1LN.js").then(
209
+ (e) => e.default
210
+ ),
211
+ ko: () => import("./ko-CJ-8gCc9.js").then(
212
+ (e) => e.default
213
+ ),
214
+ ms: () => import("./ms-BF5gF9D5.js").then(
215
+ (e) => e.default
216
+ ),
217
+ nl: () => import("./nl-C5fWLZkK.js").then(
218
+ (e) => e.default
219
+ ),
220
+ no: () => import("./no-Dk9D1gjY.js").then(
221
+ (e) => e.default
222
+ ),
223
+ pl: () => import("./pl-D7AZQwtK.js").then(
224
+ (e) => e.default
225
+ ),
226
+ pt: () => import("./pt-62Kd-NN1.js").then(
227
+ (e) => e.default
228
+ ),
229
+ ro: () => import("./ro-DTauvv2V.js").then(
230
+ (e) => e.default
231
+ ),
232
+ ru: () => import("./ru-g5Cz5HSk.js").then(
233
+ (e) => e.default
234
+ ),
235
+ sk: () => import("./sk-YuAeAaeZ.js").then(
236
+ (e) => e.default
237
+ ),
238
+ sv: () => import("./sv-iaAh80e4.js").then(
239
+ (e) => e.default
240
+ ),
241
+ th: () => import("./th-DMPCj1Fg.js").then(
242
+ (e) => e.default
243
+ ),
244
+ tl: () => import("./tl-w5CgYWXn.js").then(
245
+ (e) => e.default
246
+ ),
247
+ tr: () => import("./tr-CHri_kqV.js").then(
248
+ (e) => e.default
249
+ ),
250
+ uk: () => import("./uk-ByJtQJHi.js").then(
251
+ (e) => e.default
252
+ ),
253
+ vi: () => import("./vi-DFicISRE.js").then(
254
+ (e) => e.default
255
+ ),
256
+ zh_CN: () => import("./zh_CN-BwpNGMQN.js").then(
257
+ (e) => e.default
258
+ ),
259
+ zh_TW: () => import("./zh_TW-Oq4Chn8F.js").then(
260
+ (e) => e.default
261
+ )
262
+ }
263
+ });
264
+ function De(e, r) {
265
+ return oe(e, r);
266
+ }
267
+ const { Provider: Ce, useTranslation: Le } = de("Orders"), Te = Ce, m = Le;
268
+ function F({
269
+ children: e
270
+ }) {
271
+ const { locale: r } = se(), s = ce(Oe, r), a = c.useMemo(
272
+ () => De(r, s),
273
+ [r, s]
274
+ );
275
+ return /* @__PURE__ */ t.jsx(Te, { value: a, children: e });
276
+ }
277
+ const Pe = {
278
+ green: "bg-green-500/15 text-foreground",
279
+ yellow: "bg-yellow-500/15 text-foreground",
280
+ red: "bg-red-500/15 text-foreground",
281
+ blue: "bg-blue-500/15 text-foreground",
282
+ orange: "bg-orange-500/15 text-foreground",
283
+ gray: "bg-foreground/10 text-foreground"
284
+ }, $e = {
285
+ green: "bg-green-500",
286
+ yellow: "bg-yellow-500",
287
+ red: "bg-red-500",
288
+ blue: "bg-blue-500",
289
+ orange: "bg-orange-500",
290
+ gray: "bg-gray-500"
291
+ }, Fe = {
292
+ xs: "px-1.5 py-0.5 text-[10px]",
293
+ sm: "px-2 py-0.5 text-xs",
294
+ md: "px-2.5 py-1 text-sm"
295
+ };
296
+ function Ee({
297
+ color: e,
298
+ dot: r,
299
+ size: s = "md",
300
+ className: a,
301
+ children: n
302
+ }) {
303
+ return /* @__PURE__ */ t.jsxs(
304
+ "span",
305
+ {
306
+ className: L(
307
+ "inline-flex items-center gap-1 rounded-full font-medium whitespace-nowrap capitalize",
308
+ Pe[e],
309
+ Fe[s],
310
+ a
311
+ ),
312
+ children: [
313
+ r && /* @__PURE__ */ t.jsx(
314
+ "span",
315
+ {
316
+ className: L("h-1.5 w-1.5 rounded-full", $e[e])
317
+ }
318
+ ),
319
+ n
320
+ ]
321
+ }
322
+ );
323
+ }
324
+ function ze(e) {
325
+ return e ? e.replace(/_/g, " ").replace(/\b\w/g, (r) => r.toUpperCase()) : "";
326
+ }
327
+ function E(e) {
328
+ return e.charAt(0).toUpperCase() + e.slice(1);
329
+ }
330
+ const Ae = /* @__PURE__ */ new Set([
331
+ "cancelled",
332
+ "completed",
333
+ "fulfilled",
334
+ "pending",
335
+ "preparing",
336
+ "processing",
337
+ "refunded",
338
+ "returned",
339
+ "shipped"
340
+ ]);
341
+ function Ie(e, r) {
342
+ const s = r.toLowerCase();
343
+ return Ae.has(s) ? e(`status_${s}`) : ze(r);
344
+ }
345
+ function Be(e) {
346
+ return e.sale_date ?? e.created_at;
347
+ }
348
+ const Re = {
349
+ fulfilled: "gray",
350
+ unfulfilled: "yellow",
351
+ in_progress: "yellow",
352
+ on_hold: "orange",
353
+ partially_fulfilled: "yellow",
354
+ scheduled: "blue",
355
+ // `processing` is not a fulfillment_status enum value but the BFF /
356
+ // legacy responses can surface it; admin colors it yellow, so we match.
357
+ processing: "yellow"
358
+ }, G = {
359
+ cancelled: "red",
360
+ returned: "red",
361
+ refunded: "red"
362
+ };
363
+ function Ue(e) {
364
+ return e.includes("fulfilled") || e.includes("complete") ? "gray" : e.includes("hold") ? "orange" : "yellow";
365
+ }
366
+ const Me = new Set(Object.keys(G)), z = "refunded";
367
+ function V(e, r, s) {
368
+ return e && Me.has(e.toLowerCase()) ? e : s?.toLowerCase() === z ? z : r ?? e ?? "";
369
+ }
370
+ function Ke(e) {
371
+ if (!e) return "gray";
372
+ const r = e.toLowerCase();
373
+ return Re[r] ?? G[r] ?? Ue(r);
374
+ }
375
+ function X({
376
+ status: e,
377
+ className: r
378
+ }) {
379
+ const { t: s } = m();
380
+ return /* @__PURE__ */ t.jsx(
381
+ Ee,
382
+ {
383
+ color: Ke(e),
384
+ dot: !0,
385
+ size: "sm",
386
+ className: r,
387
+ children: Ie(s, e)
388
+ }
389
+ );
390
+ }
391
+ function Ye({
392
+ apiKey: e,
393
+ address: r,
394
+ options: s,
395
+ alt: a,
396
+ className: n
397
+ }) {
398
+ const { t: l } = m(), [i, o] = c.useState(!1), d = we(e, r, s);
399
+ return !d || i ? null : /* @__PURE__ */ t.jsx(
400
+ "img",
401
+ {
402
+ src: d,
403
+ alt: a ?? l("shipping_address_map"),
404
+ width: s?.width ?? 600,
405
+ height: s?.height ?? 300,
406
+ className: n ?? "border-border w-full rounded border object-cover shadow-xs",
407
+ onError: () => o(!0)
408
+ }
409
+ );
410
+ }
411
+ const We = {
412
+ fulfilled: "fulfilled",
413
+ // `completed` is an order_status lifecycle value kept as a defensive
414
+ // alias so an order whose BFF response is missing `fulfillment_status`
415
+ // still classifies as fulfilled instead of unknown/pending.
416
+ completed: "fulfilled",
417
+ shipped: "shipped",
418
+ partially_fulfilled: "preparing",
419
+ in_progress: "preparing",
420
+ on_hold: "preparing",
421
+ scheduled: "preparing",
422
+ preparing: "preparing",
423
+ cancelled: "cancelled",
424
+ returned: "cancelled",
425
+ refunded: "cancelled",
426
+ pending: "pending",
427
+ unfulfilled: "pending",
428
+ processing: "pending"
429
+ };
430
+ function qe(e) {
431
+ return We[(e || "").toLowerCase()] ?? "pending";
432
+ }
433
+ function H(e) {
434
+ return V(
435
+ e.order_status,
436
+ e.fulfillment_status,
437
+ e.financial_status
438
+ );
439
+ }
440
+ function y(e, r) {
441
+ if (e === "all") return !0;
442
+ if (e === "subscription") return r.subscription != null;
443
+ const s = qe(H(r));
444
+ return e === "fulfilled" ? s === "fulfilled" || s === "shipped" : e === "preparing" ? s === "preparing" || s === "pending" : !0;
445
+ }
446
+ function Ge(e) {
447
+ return {
448
+ all: e.length,
449
+ fulfilled: e.filter((r) => y("fulfilled", r)).length,
450
+ preparing: e.filter((r) => y("preparing", r)).length,
451
+ subscription: e.filter((r) => y("subscription", r)).length
452
+ };
453
+ }
454
+ function Q(e) {
455
+ return e.sale_date ?? e.created_at;
456
+ }
457
+ function Ve(e, r, s = /* @__PURE__ */ new Date()) {
458
+ if (e.length === 0) return [];
459
+ const a = new Date(
460
+ s.getFullYear(),
461
+ s.getMonth(),
462
+ s.getDate()
463
+ ), n = new Date(a);
464
+ n.setDate(n.getDate() - 7);
465
+ const l = new Date(s.getFullYear(), s.getMonth(), 1), i = new Date(s.getFullYear(), 0, 1), o = /* @__PURE__ */ new Map(), d = [];
466
+ for (const u of e) {
467
+ const h = new Date(Q(u));
468
+ let x;
469
+ h >= n ? x = r("group_this_week") : h >= l ? x = r("group_this_month") : h >= i ? x = h.toLocaleDateString(void 0, {
470
+ month: "long"
471
+ }) : x = h.toLocaleDateString(void 0, {
472
+ month: "long",
473
+ year: "numeric"
474
+ });
475
+ let _ = o.get(x);
476
+ _ || (_ = [], o.set(x, _), d.push(x)), _.push(u);
477
+ }
478
+ return d.map((u) => ({
479
+ label: u,
480
+ orders: o.get(u) ?? []
481
+ }));
482
+ }
483
+ function Xe(e, r, s = /* @__PURE__ */ new Date()) {
484
+ try {
485
+ const a = new Date(e), n = new Date(
486
+ s.getFullYear(),
487
+ s.getMonth(),
488
+ s.getDate()
489
+ ), l = new Date(a.getFullYear(), a.getMonth(), a.getDate()), i = Math.round(
490
+ (n.getTime() - l.getTime()) / (1e3 * 60 * 60 * 24)
491
+ );
492
+ return i === 0 ? r("today") : i === 1 ? r("yesterday") : i < 7 ? r("n_days_ago", { n: i }) : i < 14 ? r("last_week") : i < 30 ? r("n_weeks_ago", { n: Math.round(i / 7) }) : a.getFullYear() === s.getFullYear() ? a.toLocaleDateString(void 0, {
493
+ month: "short",
494
+ day: "numeric"
495
+ }) : a.toLocaleDateString(void 0, {
496
+ month: "short",
497
+ day: "numeric",
498
+ year: "numeric"
499
+ });
500
+ } catch {
501
+ return "";
502
+ }
503
+ }
504
+ function He(e, r) {
505
+ return e === 0 ? {
506
+ left: "50%",
507
+ transform: "translateX(-50%)",
508
+ zIndex: 30
509
+ } : e === 1 ? {
510
+ left: "50%",
511
+ transform: r === 2 ? "translateX(-25%) rotate(7deg)" : "translateX(-20%) rotate(7deg)",
512
+ zIndex: 20
513
+ } : {
514
+ left: "50%",
515
+ transform: "translateX(-80%) rotate(-7deg)",
516
+ zIndex: 10
517
+ };
518
+ }
519
+ function Qe({
520
+ customerId: e,
521
+ onOrderClick: r,
522
+ t: s
523
+ }) {
524
+ const { t: a } = m(), n = s ?? a, [l, i] = c.useState(""), [o, d] = c.useState("all"), {
525
+ data: u,
526
+ isLoading: h,
527
+ isError: x,
528
+ refetch: _,
529
+ fetchNextPage: J,
530
+ hasNextPage: Z,
531
+ isFetchingNextPage: C
532
+ } = Ne(
533
+ {
534
+ customerId: e,
535
+ limit: 10,
536
+ search: l || void 0,
537
+ sort: "-created_at"
538
+ },
539
+ { enabled: !!e }
540
+ ), b = c.useMemo(
541
+ () => u?.pages.flatMap((f) => f.orders) ?? [],
542
+ [u]
543
+ ), ee = c.useMemo(() => Ge(b), [b]), N = c.useMemo(
544
+ () => b.filter((f) => y(o, f)),
545
+ [b, o]
546
+ ), te = c.useMemo(
547
+ () => Ve(N, n),
548
+ [N, n]
549
+ );
550
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
551
+ /* @__PURE__ */ t.jsx(B, { children: /* @__PURE__ */ t.jsx(K, { children: /* @__PURE__ */ t.jsx(Y, { className: "text-lg", children: /* @__PURE__ */ t.jsx(S, { children: /* @__PURE__ */ t.jsx(W, { className: "font-semibold", children: n("order_history") }) }) }) }) }),
552
+ /* @__PURE__ */ t.jsx("div", { className: "relative", children: /* @__PURE__ */ t.jsxs("div", { className: "relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8", children: [
553
+ /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
554
+ /* @__PURE__ */ t.jsx("h1", { className: "text-foreground flex-1 truncate text-xl font-bold tracking-tight md:text-2xl", children: n("order_history") }),
555
+ /* @__PURE__ */ t.jsxs("div", { className: "relative hidden sm:block", children: [
556
+ /* @__PURE__ */ t.jsx(
557
+ M,
558
+ {
559
+ className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2",
560
+ strokeWidth: 2
561
+ }
562
+ ),
563
+ /* @__PURE__ */ t.jsx(
564
+ ue,
565
+ {
566
+ value: l,
567
+ onChange: (f) => i(f.target.value),
568
+ placeholder: n("search_orders"),
569
+ className: "ring-border h-9 w-64 rounded-md bg-transparent pl-9 text-xs"
570
+ }
571
+ )
572
+ ] })
573
+ ] }),
574
+ b.length > 0 && /* @__PURE__ */ t.jsx(
575
+ Ze,
576
+ {
577
+ active: o,
578
+ counts: ee,
579
+ onChange: d,
580
+ t: n
581
+ }
582
+ ),
583
+ h ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(rt, {}) }) : x ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(nt, { onRetry: () => _(), t: n }) }) : N.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "ring-border mt-4 overflow-hidden rounded-2xl bg-transparent ring-1", children: /* @__PURE__ */ t.jsx(st, { searching: !!l || o !== "all", t: n }) }) : /* @__PURE__ */ t.jsx("div", { className: "mt-4 space-y-6", children: te.map((f) => /* @__PURE__ */ t.jsxs("div", { children: [
584
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground mb-2 px-1 text-xs font-semibold", children: f.label }),
585
+ /* @__PURE__ */ t.jsx("div", { className: "space-y-3", children: f.orders.map((v) => /* @__PURE__ */ t.jsx(
586
+ et,
587
+ {
588
+ order: v,
589
+ onClick: () => r(v),
590
+ t: n
591
+ },
592
+ v.id
593
+ )) })
594
+ ] }, f.label)) }),
595
+ Z && /* @__PURE__ */ t.jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ t.jsx(
596
+ "button",
597
+ {
598
+ type: "button",
599
+ onClick: () => J(),
600
+ disabled: C,
601
+ className: "ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40",
602
+ children: n(C ? "loading" : "load_more")
603
+ }
604
+ ) })
605
+ ] }) })
606
+ ] });
607
+ }
608
+ const Je = [
609
+ { key: "all", labelKey: "filter_all" },
610
+ { key: "fulfilled", labelKey: "filter_fulfilled" },
611
+ { key: "preparing", labelKey: "filter_preparing" },
612
+ { key: "subscription", labelKey: "filter_subscription" }
613
+ ];
614
+ function Ze({
615
+ active: e,
616
+ counts: r,
617
+ onChange: s,
618
+ t: a
619
+ }) {
620
+ return /* @__PURE__ */ t.jsx("div", { className: "-mx-1 mt-5 flex flex-wrap gap-1.5 px-1", children: Je.map((n) => {
621
+ const l = n.key === e, i = r[n.key];
622
+ return /* @__PURE__ */ t.jsxs(
623
+ "button",
624
+ {
625
+ type: "button",
626
+ onClick: () => s(n.key),
627
+ className: `inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-bold transition-all ${l ? "bg-primary text-primary-foreground" : "ring-border text-foreground hover:bg-muted bg-transparent ring-1"}`,
628
+ children: [
629
+ a(n.labelKey),
630
+ /* @__PURE__ */ t.jsx(
631
+ "span",
632
+ {
633
+ className: `text-xs tabular-nums ${l ? "text-primary-foreground/70" : "text-muted-foreground"}`,
634
+ children: i
635
+ }
636
+ )
637
+ ]
638
+ },
639
+ n.key
640
+ );
641
+ }) });
642
+ }
643
+ function et({
644
+ order: e,
645
+ onClick: r,
646
+ t: s
647
+ }) {
648
+ const a = Xe(Q(e), s), n = ve(e), l = e.first_item?.title || `${s("order_number")}${e.order_number}`, i = e.items_count > 1 ? s("more_items", { n: e.items_count - 1 }) : "";
649
+ return /* @__PURE__ */ t.jsxs(
650
+ "button",
651
+ {
652
+ type: "button",
653
+ onClick: r,
654
+ className: "group ring-foreground/5 hover:ring-foreground/10 focus-visible:ring-foreground/30 relative flex w-full cursor-pointer items-center gap-4 rounded-2xl bg-transparent p-4 text-left shadow-sm ring-1 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg focus-visible:ring-2 focus-visible:outline-none",
655
+ children: [
656
+ /* @__PURE__ */ t.jsxs("div", { className: "min-w-0 flex-1", children: [
657
+ e.order_number && e.first_item?.title && /* @__PURE__ */ t.jsxs("div", { className: "text-muted-foreground truncate text-xs", children: [
658
+ s("order_number"),
659
+ e.order_number
660
+ ] }),
661
+ /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
662
+ /* @__PURE__ */ t.jsxs("div", { className: "text-foreground truncate text-sm font-bold", children: [
663
+ l,
664
+ i && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground font-medium", children: i })
665
+ ] }),
666
+ /* @__PURE__ */ t.jsx(X, { status: H(e) })
667
+ ] }),
668
+ /* @__PURE__ */ t.jsxs("div", { className: "text-muted-foreground mt-1 truncate text-xs", children: [
669
+ a,
670
+ " · ",
671
+ n
672
+ ] })
673
+ ] }),
674
+ /* @__PURE__ */ t.jsx(
675
+ tt,
676
+ {
677
+ fallback: e.first_item,
678
+ urls: e.thumbnail_image_urls,
679
+ isSubscription: e.subscription != null,
680
+ t: s
681
+ }
682
+ )
683
+ ]
684
+ }
685
+ );
686
+ }
687
+ function tt({
688
+ urls: e,
689
+ fallback: r,
690
+ isSubscription: s,
691
+ t: a
692
+ }) {
693
+ const n = (e && e.length > 0 ? e : r?.image_url ? [r.image_url] : []).slice(0, 3);
694
+ if (n.length === 0)
695
+ return /* @__PURE__ */ t.jsxs("div", { className: "ring-border bg-muted text-muted-foreground relative flex size-12 shrink-0 items-center justify-center rounded-xl ring-1", children: [
696
+ /* @__PURE__ */ t.jsx(me, { className: "size-5", strokeWidth: 1.75 }),
697
+ s && /* @__PURE__ */ t.jsx(w, { t: a })
698
+ ] });
699
+ if (n.length === 1)
700
+ return /* @__PURE__ */ t.jsxs("div", { className: "relative size-12 shrink-0", children: [
701
+ /* @__PURE__ */ t.jsx(
702
+ "img",
703
+ {
704
+ src: n[0],
705
+ alt: "",
706
+ className: "ring-background size-12 rounded-xl bg-transparent object-cover ring-[3px]"
707
+ }
708
+ ),
709
+ s && /* @__PURE__ */ t.jsx(w, { t: a })
710
+ ] });
711
+ const l = n.length === 3 ? "w-[80px]" : "w-[60px]";
712
+ return /* @__PURE__ */ t.jsxs("div", { className: `relative h-12 ${l} shrink-0`, children: [
713
+ n.map((i, o) => /* @__PURE__ */ t.jsx(
714
+ "img",
715
+ {
716
+ src: i,
717
+ alt: "",
718
+ className: "ring-background absolute top-0 size-12 rounded-xl bg-transparent object-cover ring-[3px]",
719
+ style: He(o, n.length)
720
+ },
721
+ `${i}-${o}`
722
+ )),
723
+ s && /* @__PURE__ */ t.jsx(w, { t: a })
724
+ ] });
725
+ }
726
+ function w({ t: e }) {
727
+ return /* @__PURE__ */ t.jsx(
728
+ "div",
729
+ {
730
+ className: "bg-primary text-primary-foreground ring-background absolute -top-1 -right-1 z-40 flex size-5 items-center justify-center rounded-full ring-2",
731
+ title: e("from_subscription"),
732
+ children: /* @__PURE__ */ t.jsx(pe, { className: "size-2.5", strokeWidth: 2.75 })
733
+ }
734
+ );
735
+ }
736
+ function rt() {
737
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: Array(4).fill(0).map((e, r) => /* @__PURE__ */ t.jsxs(
738
+ "div",
739
+ {
740
+ className: `flex items-center gap-3 px-4 py-3.5 ${r < 3 ? "border-border border-b" : ""}`,
741
+ children: [
742
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted size-12 shrink-0 animate-pulse rounded-xl" }),
743
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1 space-y-2", children: [
744
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted h-4 w-1/3 animate-pulse rounded" }),
745
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted h-3 w-1/2 animate-pulse rounded" })
746
+ ] })
747
+ ]
748
+ },
749
+ r
750
+ )) });
751
+ }
752
+ function st({
753
+ searching: e,
754
+ t: r
755
+ }) {
756
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
757
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(M, { className: "text-muted-foreground size-5", strokeWidth: 2 }) }),
758
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-bold", children: r(e ? "no_matching_orders" : "no_orders_yet") }),
759
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground max-w-sm text-xs", children: r(e ? "search_hint" : "empty_hint") })
760
+ ] });
761
+ }
762
+ function nt({
763
+ onRetry: e,
764
+ t: r
765
+ }) {
766
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
767
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(ne, { className: "text-muted-foreground size-5", strokeWidth: 2 }) }),
768
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-bold", children: r("load_failed_title") }),
769
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground max-w-sm text-xs", children: r("load_failed_hint") }),
770
+ /* @__PURE__ */ t.jsx(
771
+ "button",
772
+ {
773
+ type: "button",
774
+ onClick: e,
775
+ className: "bg-primary text-primary-foreground hover:bg-primary/90 mt-2 inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-bold transition-all",
776
+ children: r("try_again")
777
+ }
778
+ )
779
+ ] });
780
+ }
781
+ const at = 1;
782
+ function it() {
783
+ const { navigate: e } = D(), { t: r } = m(), s = (a) => {
784
+ e(`orders/${a.token}`);
785
+ };
786
+ return /* @__PURE__ */ t.jsx(
787
+ Qe,
788
+ {
789
+ customerId: at,
790
+ onOrderClick: s,
791
+ t: r
792
+ }
793
+ );
794
+ }
795
+ const A = {
796
+ display: "inline-flex",
797
+ minHeight: "1.5rem",
798
+ alignItems: "center",
799
+ fontSize: "0.875rem",
800
+ lineHeight: 1,
801
+ // Let long unbroken fallback labels (e.g. a masked email/handle with no
802
+ // spaces) wrap instead of overflowing a narrow column. Inert for the
803
+ // masked-segments path, whose children are spans rather than text.
804
+ overflowWrap: "anywhere"
805
+ }, lt = {
806
+ display: "inline-flex",
807
+ alignItems: "center",
808
+ // Wrap onto a new line in narrow containers (e.g. the checkout
809
+ // order-confirmation grid) instead of overflowing the box.
810
+ flexWrap: "wrap",
811
+ rowGap: "0.25rem"
812
+ }, ot = {
813
+ display: "inline-flex",
814
+ alignItems: "center",
815
+ gap: "0.375rem",
816
+ // Let a single group's dots wrap too, so one atomic group can never
817
+ // overflow an extremely narrow container.
818
+ flexWrap: "wrap"
819
+ }, dt = {
820
+ display: "block",
821
+ width: "0.375rem",
822
+ height: "0.375rem",
823
+ borderRadius: "9999px",
824
+ backgroundColor: "currentColor"
825
+ }, ct = {
826
+ marginLeft: "0.125rem"
827
+ }, ut = "0.75rem";
828
+ function mt({
829
+ label: e,
830
+ className: r
831
+ }) {
832
+ const s = xe(e);
833
+ return s ? /* @__PURE__ */ t.jsx("p", { className: r, style: A, "aria-label": e, children: /* @__PURE__ */ t.jsx("span", { "aria-hidden": "true", style: lt, children: s.map((a, n) => {
834
+ if (a.kind === "gap") return null;
835
+ const l = s[n + 1]?.kind === "gap" ? { marginInlineEnd: ut } : null;
836
+ if (a.kind === "dots")
837
+ return /* @__PURE__ */ t.jsx(
838
+ "span",
839
+ {
840
+ style: { ...ot, ...l },
841
+ children: Array.from({ length: a.count }, (o, d) => /* @__PURE__ */ t.jsx("span", { style: dt }, d))
842
+ },
843
+ `${a.kind}-${n}`
844
+ );
845
+ const i = {
846
+ ...s[n - 1]?.kind === "dots" ? ct : null,
847
+ ...l
848
+ };
849
+ return /* @__PURE__ */ t.jsx(
850
+ "span",
851
+ {
852
+ style: Object.keys(i).length > 0 ? i : void 0,
853
+ children: a.value
854
+ },
855
+ `${a.kind}-${n}`
856
+ );
857
+ }) }) }) : /* @__PURE__ */ t.jsx("p", { className: r, style: A, children: e });
858
+ }
859
+ function pt(e) {
860
+ return e.last4 != null || fe(e.card_network) != null || U(e.card_network) != null || P(e.source) || P(e.payment_type);
861
+ }
862
+ function xt(e) {
863
+ return ge(e.payment_type, e.source) ?? "Payment method";
864
+ }
865
+ function ft(e) {
866
+ if (pt(e))
867
+ return T({
868
+ kind: "card",
869
+ brand: U(e.card_network),
870
+ last4: e.last4,
871
+ logoUrl: e.logo_url
872
+ });
873
+ const r = xt(e);
874
+ return T({
875
+ kind: "non_card",
876
+ brand: r,
877
+ fallbackLabel: r,
878
+ logoUrl: e.logo_url
879
+ });
880
+ }
881
+ function gt() {
882
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col lg:grid lg:grid-cols-8", children: [
883
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted flex flex-col items-center px-8 lg:col-span-4", children: /* @__PURE__ */ t.jsxs("div", { className: "w-full max-w-lg py-6", children: [
884
+ /* @__PURE__ */ t.jsx(g, { className: "mb-4 h-6 w-48" }),
885
+ /* @__PURE__ */ t.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-4", children: [
886
+ /* @__PURE__ */ t.jsx(g, { className: "size-24 rounded" }),
887
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1 space-y-2", children: [
888
+ /* @__PURE__ */ t.jsx(g, { className: "h-4 w-3/4" }),
889
+ /* @__PURE__ */ t.jsx(g, { className: "h-4 w-1/2" })
890
+ ] })
891
+ ] }) }),
892
+ /* @__PURE__ */ t.jsxs("div", { className: "mt-6 space-y-2", children: [
893
+ /* @__PURE__ */ t.jsx(g, { className: "h-4 w-full" }),
894
+ /* @__PURE__ */ t.jsx(g, { className: "h-5 w-full" })
895
+ ] })
896
+ ] }) }),
897
+ /* @__PURE__ */ t.jsx("div", { className: "bg-background px-8 pt-4 lg:col-span-4", children: /* @__PURE__ */ t.jsxs("div", { className: "mx-auto max-w-lg lg:mx-0 lg:mr-auto", children: [
898
+ /* @__PURE__ */ t.jsx(g, { className: "mb-4 h-10 w-full rounded" }),
899
+ /* @__PURE__ */ t.jsxs("div", { className: "mt-6 space-y-4", children: [
900
+ /* @__PURE__ */ t.jsx(g, { className: "h-5 w-40" }),
901
+ /* @__PURE__ */ t.jsx(g, { className: "h-16 w-full rounded" })
902
+ ] })
903
+ ] }) })
904
+ ] });
905
+ }
906
+ function j({ label: e, value: r }) {
907
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
908
+ /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: e }),
909
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground", children: r })
910
+ ] });
911
+ }
912
+ function I(e) {
913
+ return e.startsWith("-") ? e : `-${e}`;
914
+ }
915
+ function p(e, r) {
916
+ return e ?? r;
917
+ }
918
+ function ht(e) {
919
+ const r = [];
920
+ e.name && r.push(e.name), e.address1 && r.push(e.address1), e.address2 && r.push(e.address2);
921
+ const s = [e.city, e.state, e.postal_code].filter(Boolean).join(", ");
922
+ return s && r.push(s), e.country_code && r.push(e.country_code), e.phone && r.push(e.phone), r;
923
+ }
924
+ function k({
925
+ address: e,
926
+ title: r
927
+ }) {
928
+ const s = ht(e);
929
+ return s.length === 0 ? null : /* @__PURE__ */ t.jsxs("div", { children: [
930
+ /* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r }),
931
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground space-y-0.5 text-sm", children: s.map((a, n) => /* @__PURE__ */ t.jsx("p", { children: a }, n)) })
932
+ ] });
933
+ }
934
+ function _t({
935
+ shippingMethod: e
936
+ }) {
937
+ const { t: r } = m();
938
+ return e.title ? /* @__PURE__ */ t.jsxs("div", { children: [
939
+ /* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r("shipping_method") }),
940
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm", children: e.title })
941
+ ] }) : null;
942
+ }
943
+ function bt({
944
+ trackings: e
945
+ }) {
946
+ const { t: r } = m();
947
+ return e.length === 0 ? null : /* @__PURE__ */ t.jsxs("div", { className: "border-border bg-muted/40 mb-6 rounded-md border p-4", children: [
948
+ /* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r("order_on_its_way") }),
949
+ /* @__PURE__ */ t.jsx("ul", { className: "flex flex-col gap-3", children: e.map((s) => /* @__PURE__ */ t.jsxs(
950
+ "li",
951
+ {
952
+ className: "flex flex-row items-start justify-between gap-3",
953
+ children: [
954
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
955
+ /* @__PURE__ */ t.jsx("span", { className: "text-foreground text-sm", children: s.shipping_carrier ? `${s.shipping_carrier} · ${s.tracking_number}` : s.tracking_number }),
956
+ !s.shipping_carrier && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-xs", children: r("tracking_number") })
957
+ ] }),
958
+ s.tracking_url && /* @__PURE__ */ t.jsx(
959
+ "a",
960
+ {
961
+ href: s.tracking_url,
962
+ target: "_blank",
963
+ rel: "noopener noreferrer",
964
+ "aria-label": s.shipping_carrier ? r("track_package_aria_with_carrier", {
965
+ carrier: s.shipping_carrier,
966
+ number: s.tracking_number
967
+ }) : r("track_package_aria", {
968
+ number: s.tracking_number
969
+ }),
970
+ className: "text-primary shrink-0 text-sm font-medium hover:underline",
971
+ children: r("track_package")
972
+ }
973
+ )
974
+ ]
975
+ },
976
+ `${s.id}-${s.tracking_number}`
977
+ )) })
978
+ ] });
979
+ }
980
+ function jt({
981
+ paymentMethod: e
982
+ }) {
983
+ const { t: r } = m(), [s, a] = c.useState(!1), n = ft(e), l = s ? n.logo.fallbackUrl : n.logo.primaryUrl;
984
+ return c.useEffect(() => {
985
+ a(!1);
986
+ }, [
987
+ e.card_network,
988
+ e.last4,
989
+ e.logo_url,
990
+ e.payment_type,
991
+ e.source
992
+ ]), /* @__PURE__ */ t.jsxs("div", { children: [
993
+ /* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: r("payment_method") }),
994
+ /* @__PURE__ */ t.jsxs("div", { className: "flex min-h-6 items-center gap-2", children: [
995
+ /* @__PURE__ */ t.jsx("span", { className: "inline-flex h-6 max-w-16 shrink-0 items-center justify-center", children: /* @__PURE__ */ t.jsx(
996
+ "img",
997
+ {
998
+ src: l,
999
+ alt: n.accessibilityLabel,
1000
+ className: "block max-h-6 max-w-16 object-contain align-middle",
1001
+ onError: () => a(!0)
1002
+ }
1003
+ ) }),
1004
+ /* @__PURE__ */ t.jsx(mt, { label: n.label, className: "text-foreground" })
1005
+ ] })
1006
+ ] });
1007
+ }
1008
+ function yt({ src: e, alt: r }) {
1009
+ const { t: s } = m(), [a, n] = c.useState(!1);
1010
+ return a ? /* @__PURE__ */ t.jsx("span", { className: "text-xs", children: s("no_image") }) : /* @__PURE__ */ t.jsx(
1011
+ "img",
1012
+ {
1013
+ src: e,
1014
+ alt: r,
1015
+ className: "h-full w-full object-cover",
1016
+ onError: () => n(!0)
1017
+ }
1018
+ );
1019
+ }
1020
+ function Nt({
1021
+ item: e,
1022
+ onSubscriptionClick: r
1023
+ }) {
1024
+ const { t: s } = m(), a = e.source_subscription?.subscription_token;
1025
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-4 py-4", children: [
1026
+ /* @__PURE__ */ t.jsxs("div", { className: "relative shrink-0", children: [
1027
+ /* @__PURE__ */ t.jsx("div", { className: "bg-muted text-muted-foreground flex h-24 w-24 items-center justify-center overflow-hidden rounded", children: e.image_url ? /* @__PURE__ */ t.jsx(yt, { src: e.image_url, alt: e.product_name }) : /* @__PURE__ */ t.jsx("span", { className: "text-xs", children: s("no_image") }) }),
1028
+ e.quantity > 1 && /* @__PURE__ */ t.jsx("span", { className: "bg-foreground text-background absolute -top-2 -right-2 z-10 flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium", children: e.quantity })
1029
+ ] }),
1030
+ /* @__PURE__ */ t.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-y-0.5", children: [
1031
+ /* @__PURE__ */ t.jsx(
1032
+ "p",
1033
+ {
1034
+ className: "text-foreground truncate text-sm font-medium",
1035
+ title: e.product_name,
1036
+ children: e.product_name
1037
+ }
1038
+ ),
1039
+ e.variant_name && /* @__PURE__ */ t.jsx(
1040
+ "p",
1041
+ {
1042
+ className: "text-muted-foreground truncate text-xs",
1043
+ title: e.variant_name,
1044
+ children: e.variant_name
1045
+ }
1046
+ ),
1047
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-medium", children: p(e.total_in_currency, e.total) }),
1048
+ e.quantity > 1 && /* @__PURE__ */ t.jsxs("p", { className: "text-muted-foreground text-xs", children: [
1049
+ p(e.price_in_currency, e.price),
1050
+ " x ",
1051
+ e.quantity
1052
+ ] }),
1053
+ a && r && /* @__PURE__ */ t.jsx(
1054
+ "button",
1055
+ {
1056
+ type: "button",
1057
+ title: a,
1058
+ className: "mt-1 max-w-full cursor-pointer truncate text-left text-xs text-blue-600 transition-colors duration-200 hover:text-blue-700 hover:underline",
1059
+ onClick: () => r(a),
1060
+ children: s("subscription_hash", { token: a })
1061
+ }
1062
+ )
1063
+ ] })
1064
+ ] });
1065
+ }
1066
+ function vt({
1067
+ order: e,
1068
+ onSubscriptionClick: r
1069
+ }) {
1070
+ const { t: s } = m(), { singular: a, plural: n } = ke(), i = e.points_applied != null && e.points_applied > 0 ? p(
1071
+ e.order_total_after_points_redemption_in_currency ?? null,
1072
+ e.order_total_after_points_redemption != null ? String(e.order_total_after_points_redemption) : p(e.total_in_currency, e.total)
1073
+ ) : p(e.total_in_currency, e.total);
1074
+ return /* @__PURE__ */ t.jsx("section", { className: "bg-muted flex w-full flex-col items-center px-8 lg:col-span-4", children: /* @__PURE__ */ t.jsxs("div", { className: "flex w-full max-w-lg flex-col", children: [
1075
+ /* @__PURE__ */ t.jsxs("div", { className: "mt-4", children: [
1076
+ /* @__PURE__ */ t.jsx("h2", { className: "text-foreground mb-2 text-lg font-medium", children: s("items_count", { count: String(e.line_items.length) }) }),
1077
+ /* @__PURE__ */ t.jsx("hr", { className: "border-border" })
1078
+ ] }),
1079
+ /* @__PURE__ */ t.jsx("div", { className: "divide-border divide-y", children: e.line_items.map((o) => /* @__PURE__ */ t.jsx(
1080
+ Nt,
1081
+ {
1082
+ item: o,
1083
+ onSubscriptionClick: r
1084
+ },
1085
+ o.id
1086
+ )) }),
1087
+ /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-4 space-y-1 border-t pt-4", children: [
1088
+ /* @__PURE__ */ t.jsx(
1089
+ j,
1090
+ {
1091
+ label: s("subtotal"),
1092
+ value: p(
1093
+ e.totals?.gross_subtotal_in_currency ?? e.subtotal_in_currency,
1094
+ e.totals?.gross_subtotal ?? e.subtotal
1095
+ )
1096
+ }
1097
+ ),
1098
+ parseFloat(e.discount) > 0 && /* @__PURE__ */ t.jsx(
1099
+ j,
1100
+ {
1101
+ label: s("discount"),
1102
+ value: I(
1103
+ p(e.discount_in_currency, e.discount)
1104
+ )
1105
+ }
1106
+ ),
1107
+ /* @__PURE__ */ t.jsx(
1108
+ j,
1109
+ {
1110
+ label: s("shipping"),
1111
+ value: p(e.shipping_in_currency, e.shipping)
1112
+ }
1113
+ ),
1114
+ /* @__PURE__ */ t.jsx(
1115
+ j,
1116
+ {
1117
+ label: (
1118
+ // STU2-2580: when the served totals are tax-inclusive, the gross
1119
+ // Subtotal above already contains this VAT, so the Tax row is
1120
+ // informational ("VAT included") — not an amount added on top.
1121
+ // Keeping it a plain added row beside a GROSS subtotal would make
1122
+ // the rows visually sum above the authoritative Total.
1123
+ e.totals?.price_inclusive_of_tax && e.totals.tax_label ? `${s("tax")} (${s("tax_included", { name: e.totals.tax_label })})` : s("tax")
1124
+ ),
1125
+ value: p(e.tax_in_currency, e.tax)
1126
+ }
1127
+ ),
1128
+ e.points_applied != null && e.points_applied > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
1129
+ /* @__PURE__ */ t.jsxs("p", { className: "text-muted-foreground", children: [
1130
+ s("points_applied", { label: E(n) }),
1131
+ /* @__PURE__ */ t.jsxs("span", { className: "ml-1 text-xs", children: [
1132
+ "(",
1133
+ e.points_applied.toLocaleString(),
1134
+ " ",
1135
+ e.points_applied === 1 ? a : n,
1136
+ ")"
1137
+ ] })
1138
+ ] }),
1139
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground", children: I(
1140
+ p(
1141
+ e.points_applied_amount_in_currency ?? null,
1142
+ String(e.points_applied_amount ?? 0)
1143
+ )
1144
+ ) })
1145
+ ] }),
1146
+ /* @__PURE__ */ t.jsxs("div", { className: "mt-2 flex items-center justify-between text-base font-medium", children: [
1147
+ /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-sm font-medium", children: s("total") }),
1148
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground text-base font-bold", children: i })
1149
+ ] })
1150
+ ] }),
1151
+ e.total_points_credited != null && e.total_points_credited > 0 && /* @__PURE__ */ t.jsx("div", { className: "border-border mb-4 border-t pt-4", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-baseline justify-between", children: [
1152
+ /* @__PURE__ */ t.jsxs("div", { children: [
1153
+ /* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-semibold", children: s("points_earned", { label: E(n) }) }),
1154
+ e.customer_points_balance != null && /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-xs", children: s("points_total", {
1155
+ count: e.customer_points_balance.toLocaleString(),
1156
+ label: n
1157
+ }) })
1158
+ ] }),
1159
+ /* @__PURE__ */ t.jsxs("div", { className: "text-right", children: [
1160
+ /* @__PURE__ */ t.jsxs("p", { className: "text-foreground text-sm font-semibold", children: [
1161
+ "+",
1162
+ e.total_points_credited.toLocaleString()
1163
+ ] }),
1164
+ /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-xs", children: s("points", { label: n }) })
1165
+ ] })
1166
+ ] }) })
1167
+ ] }) });
1168
+ }
1169
+ function wt({
1170
+ order: e,
1171
+ googleMapsApiKey: r
1172
+ }) {
1173
+ const { t: s, locale: a } = m();
1174
+ return /* @__PURE__ */ t.jsx("div", { className: "bg-background px-8 pt-4 lg:col-span-4", children: /* @__PURE__ */ t.jsxs("div", { className: "mx-auto max-w-lg lg:mx-0 lg:mr-auto", children: [
1175
+ /* @__PURE__ */ t.jsx("div", { className: "border-border mb-6 border-b pb-6", children: /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap items-center gap-3", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
1176
+ /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-sm", children: s("status_label") }),
1177
+ /* @__PURE__ */ t.jsx(
1178
+ X,
1179
+ {
1180
+ status: V(
1181
+ e.status,
1182
+ e.fulfillment_status,
1183
+ e.financial_status
1184
+ )
1185
+ }
1186
+ )
1187
+ ] }) }) }),
1188
+ r && e.shipping_address && /* @__PURE__ */ t.jsx("div", { className: "mb-6", children: /* @__PURE__ */ t.jsx(
1189
+ Ye,
1190
+ {
1191
+ apiKey: r,
1192
+ address: e.shipping_address
1193
+ }
1194
+ ) }),
1195
+ /* @__PURE__ */ t.jsx(bt, { trackings: e.tracking_informations }),
1196
+ /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 border-b pb-6", children: [
1197
+ /* @__PURE__ */ t.jsx("h3", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: s("order_info") }),
1198
+ /* @__PURE__ */ t.jsxs("div", { className: "divide-border flex divide-x", children: [
1199
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1 pr-4", children: [
1200
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground text-sm", children: s("order") }),
1201
+ /* @__PURE__ */ t.jsxs("div", { className: "text-foreground font-medium", children: [
1202
+ "#",
1203
+ e.order_number ?? e.id
1204
+ ] })
1205
+ ] }),
1206
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1 pl-4 text-right", children: [
1207
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground text-sm", children: s("date") }),
1208
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground font-medium", children: new Date(Be(e)).toLocaleDateString(
1209
+ a,
1210
+ {
1211
+ year: "numeric",
1212
+ month: "short",
1213
+ day: "numeric"
1214
+ }
1215
+ ) })
1216
+ ] })
1217
+ ] }),
1218
+ e.customer_email && /* @__PURE__ */ t.jsxs("div", { className: "mt-3", children: [
1219
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground text-sm", children: s("email") }),
1220
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-medium", children: e.customer_email })
1221
+ ] }),
1222
+ e.customer_name && /* @__PURE__ */ t.jsxs("div", { className: "mt-3", children: [
1223
+ /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground text-sm", children: s("customer") }),
1224
+ /* @__PURE__ */ t.jsx("div", { className: "text-foreground text-sm font-medium", children: e.customer_name })
1225
+ ] })
1226
+ ] }),
1227
+ e.shipping_address && e.billing_address ? /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 grid grid-cols-2 gap-x-4 border-b pb-6", children: [
1228
+ /* @__PURE__ */ t.jsx(
1229
+ k,
1230
+ {
1231
+ address: e.shipping_address,
1232
+ title: s("shipping_address")
1233
+ }
1234
+ ),
1235
+ /* @__PURE__ */ t.jsx(
1236
+ k,
1237
+ {
1238
+ address: e.billing_address,
1239
+ title: s("billing_address")
1240
+ }
1241
+ )
1242
+ ] }) : e.shipping_address && /* @__PURE__ */ t.jsx("div", { className: "border-border mb-6 border-b pb-6", children: /* @__PURE__ */ t.jsx(
1243
+ k,
1244
+ {
1245
+ address: e.shipping_address,
1246
+ title: s("shipping_address")
1247
+ }
1248
+ ) }),
1249
+ (e.shipping_method || e.payment_method) && /* @__PURE__ */ t.jsxs("div", { className: "border-border mb-6 grid grid-cols-1 gap-x-4 gap-y-4 border-b pb-6 sm:grid-cols-2", children: [
1250
+ e.shipping_method && /* @__PURE__ */ t.jsx(_t, { shippingMethod: e.shipping_method }),
1251
+ e.payment_method && /* @__PURE__ */ t.jsx(jt, { paymentMethod: e.payment_method })
1252
+ ] })
1253
+ ] }) });
1254
+ }
1255
+ function kt({
1256
+ id: e,
1257
+ googleMapsApiKey: r,
1258
+ onNotFound: s,
1259
+ onError: a,
1260
+ onSubscriptionClick: n
1261
+ }) {
1262
+ const { data: l, isLoading: i, error: o } = q(e), d = l?.order;
1263
+ return c.useEffect(() => {
1264
+ !i && o && a?.(o);
1265
+ }, [i, o, a]), c.useEffect(() => {
1266
+ !i && !o && !d && s?.();
1267
+ }, [i, o, d, s]), i ? /* @__PURE__ */ t.jsx(gt, {}) : d ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col lg:grid lg:grid-cols-8", children: [
1268
+ /* @__PURE__ */ t.jsx(vt, { order: d, onSubscriptionClick: n }),
1269
+ /* @__PURE__ */ t.jsx(wt, { order: d, googleMapsApiKey: r })
1270
+ ] }) : null;
1271
+ }
1272
+ function St({
1273
+ id: e,
1274
+ googleMapsApiKey: r,
1275
+ onNavigateToList: s,
1276
+ onNotFound: a,
1277
+ onError: n,
1278
+ onSubscriptionClick: l
1279
+ }) {
1280
+ const { t: i } = m(), { data: o } = q(e), d = o?.order.order_number ?? o?.order.id.toString() ?? String(e);
1281
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1282
+ /* @__PURE__ */ t.jsx(B, { children: /* @__PURE__ */ t.jsx(K, { children: /* @__PURE__ */ t.jsxs(Y, { className: "text-lg", children: [
1283
+ /* @__PURE__ */ t.jsx(S, { children: /* @__PURE__ */ t.jsx(
1284
+ _e,
1285
+ {
1286
+ href: "#",
1287
+ onClick: (u) => {
1288
+ u.preventDefault(), s();
1289
+ },
1290
+ children: i("breadcrumb")
1291
+ }
1292
+ ) }),
1293
+ /* @__PURE__ */ t.jsx(be, {}),
1294
+ /* @__PURE__ */ t.jsx(S, { children: /* @__PURE__ */ t.jsx(W, { className: "font-semibold", children: i("breadcrumb_detail", { id: d }) }) })
1295
+ ] }) }) }),
1296
+ /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-7xl px-4 py-4 sm:px-6 sm:py-6 lg:px-10 lg:py-8", children: /* @__PURE__ */ t.jsx(
1297
+ kt,
1298
+ {
1299
+ id: e,
1300
+ googleMapsApiKey: r,
1301
+ onNotFound: a,
1302
+ onError: n,
1303
+ onSubscriptionClick: l
1304
+ }
1305
+ ) })
1306
+ ] });
1307
+ }
1308
+ function Ot({
1309
+ token: e,
1310
+ onToast: r
1311
+ }) {
1312
+ const { navigate: s } = D(), { config: a } = ae(), { t: n } = m();
1313
+ return /* @__PURE__ */ t.jsx(
1314
+ St,
1315
+ {
1316
+ id: e,
1317
+ googleMapsApiKey: a.googleMapsApiKey,
1318
+ onNavigateToList: () => s("orders"),
1319
+ onNotFound: () => {
1320
+ r(n("order_not_found"), "warning"), s("orders");
1321
+ },
1322
+ onError: (l) => {
1323
+ const i = l instanceof Error ? l.message : n("error_generic");
1324
+ r(n("error_loading_order", { message: i }), "error");
1325
+ },
1326
+ onSubscriptionClick: (l) => s(`subscriptions/${l}`)
1327
+ }
1328
+ );
1329
+ }
1330
+ function Dt(e, r) {
1331
+ ie({ title: e, type: r });
1332
+ }
1333
+ function zt({
1334
+ onToast: e,
1335
+ /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */
1336
+ background: r,
1337
+ textColor: s,
1338
+ accentColor: a,
1339
+ padding: n,
1340
+ borderRadius: l,
1341
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1342
+ ...i
1343
+ }) {
1344
+ const { currentSlug: o } = D(), d = e ?? Dt, u = o.split("/")[1];
1345
+ return u !== void 0 ? /* @__PURE__ */ t.jsx(F, { children: /* @__PURE__ */ t.jsx("div", { ...i, children: /* @__PURE__ */ t.jsx(Ot, { token: u, onToast: d }) }) }) : /* @__PURE__ */ t.jsx(F, { children: /* @__PURE__ */ t.jsx("div", { ...i, children: /* @__PURE__ */ t.jsx(it, {}) }) });
1346
+ }
1347
+ export {
1348
+ zt as O
1349
+ };