@fluid-app/portal-sdk 0.1.248 → 0.1.250

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 (340) hide show
  1. package/dist/{fluid-pay-api-adapter-CJ7-I8k-.mjs → AddressAutocompleteInput-Bdsv2iFU.mjs} +153 -3
  2. package/dist/AddressAutocompleteInput-Bdsv2iFU.mjs.map +1 -0
  3. package/dist/{fluid-pay-api-adapter-D63KLi5c.cjs → AddressAutocompleteInput-CbpNjpwB.cjs} +157 -1
  4. package/dist/AddressAutocompleteInput-CbpNjpwB.cjs.map +1 -0
  5. package/dist/{AlertWidget-CbhrQa9Z.mjs → AlertWidget-CcIBGBik.mjs} +3 -3
  6. package/dist/{AlertWidget-CbhrQa9Z.mjs.map → AlertWidget-CcIBGBik.mjs.map} +1 -1
  7. package/dist/{AppDownloadScreen-DPnbWP5G.mjs → AppDownloadScreen-ZxlnSAZ6.mjs} +3 -3
  8. package/dist/{AppDownloadScreen-DPnbWP5G.mjs.map → AppDownloadScreen-ZxlnSAZ6.mjs.map} +1 -1
  9. package/dist/{AppNavigationContext-DNod9mf6.mjs → AppNavigationContext-BcZZMtV6.mjs} +1 -1
  10. package/dist/{AppNavigationContext-DNod9mf6.mjs.map → AppNavigationContext-BcZZMtV6.mjs.map} +1 -1
  11. package/dist/{BulletListWidget-qvZIZ_B-.mjs → BulletListWidget-mRwUgtzN.mjs} +3 -3
  12. package/dist/{BulletListWidget-qvZIZ_B-.mjs.map → BulletListWidget-mRwUgtzN.mjs.map} +1 -1
  13. package/dist/{CalendarWidget-C03VcDLQ.mjs → CalendarWidget-Cn3Ngl8_.mjs} +5 -5
  14. package/dist/{CalendarWidget-C03VcDLQ.mjs.map → CalendarWidget-Cn3Ngl8_.mjs.map} +1 -1
  15. package/dist/{CardWidget-2wcjCf2M.mjs → CardWidget-DHTqvQPa.mjs} +4 -4
  16. package/dist/{CardWidget-2wcjCf2M.mjs.map → CardWidget-DHTqvQPa.mjs.map} +1 -1
  17. package/dist/{CarouselWidget-Cn5P4FVN.mjs → CarouselWidget-C0X-nFyW.mjs} +5 -5
  18. package/dist/{CarouselWidget-Cn5P4FVN.mjs.map → CarouselWidget-C0X-nFyW.mjs.map} +1 -1
  19. package/dist/{CatchUpWidget-B9CI7lq0.mjs → CatchUpWidget-BkeZR91e.mjs} +5 -5
  20. package/dist/{CatchUpWidget-B9CI7lq0.mjs.map → CatchUpWidget-BkeZR91e.mjs.map} +1 -1
  21. package/dist/{ChartWidget-obje-Xj9.mjs → ChartWidget-aFsH9gwD.mjs} +4 -4
  22. package/dist/{ChartWidget-obje-Xj9.mjs.map → ChartWidget-aFsH9gwD.mjs.map} +1 -1
  23. package/dist/{ContactsScreen-DuhDzRtI.mjs → ContactsScreen-DlxwuLwy.mjs} +11 -11
  24. package/dist/{ContactsScreen-DuhDzRtI.mjs.map → ContactsScreen-DlxwuLwy.mjs.map} +1 -1
  25. package/dist/{ContainerWidget-DNenbORS.mjs → ContainerWidget-cbX_KEOQ.mjs} +4 -4
  26. package/dist/{ContainerWidget-DNenbORS.mjs.map → ContainerWidget-cbX_KEOQ.mjs.map} +1 -1
  27. package/dist/{CustomersScreen-BJOBG5f5.mjs → CustomersScreen-0uI1R9lm.mjs} +2 -2
  28. package/dist/{CustomersScreen-BJOBG5f5.mjs.map → CustomersScreen-0uI1R9lm.mjs.map} +1 -1
  29. package/dist/{EmbedWidget-LYnd3TZD.mjs → EmbedWidget-BwR9mICd.mjs} +3 -3
  30. package/dist/{EmbedWidget-LYnd3TZD.mjs.map → EmbedWidget-BwR9mICd.mjs.map} +1 -1
  31. package/dist/FluidProvider-CvS807e4.mjs +6371 -0
  32. package/dist/FluidProvider-CvS807e4.mjs.map +1 -0
  33. package/dist/FluidProvider-DGxCCmVB.cjs +17240 -0
  34. package/dist/FluidProvider-DGxCCmVB.cjs.map +1 -0
  35. package/dist/{ImageWidget-vNWT_O1E.mjs → ImageWidget-DmaAQZBK.mjs} +4 -4
  36. package/dist/{ImageWidget-vNWT_O1E.mjs.map → ImageWidget-DmaAQZBK.mjs.map} +1 -1
  37. package/dist/{InfiniteScrollSentinel-D0XRJi51.mjs → InfiniteScrollSentinel-Dq--_LMC.mjs} +2 -2
  38. package/dist/{InfiniteScrollSentinel-D0XRJi51.mjs.map → InfiniteScrollSentinel-Dq--_LMC.mjs.map} +1 -1
  39. package/dist/{LayoutWidget-UI5fbsx4.mjs → LayoutWidget-CxaMx1nd.mjs} +4 -4
  40. package/dist/{LayoutWidget-UI5fbsx4.mjs.map → LayoutWidget-CxaMx1nd.mjs.map} +1 -1
  41. package/dist/{LinkWidget-CO-Cxf7Z.mjs → LinkWidget-CcEATaYa.mjs} +5 -5
  42. package/dist/{LinkWidget-CO-Cxf7Z.mjs.map → LinkWidget-CcEATaYa.mjs.map} +1 -1
  43. package/dist/{ListWidget-f88QhcGI.mjs → ListWidget-CNAxW_3c.mjs} +6 -6
  44. package/dist/{ListWidget-f88QhcGI.mjs.map → ListWidget-CNAxW_3c.mjs.map} +1 -1
  45. package/dist/{MediaRenderer-DMdb_5xw.mjs → MediaRenderer-13Jlf38P.mjs} +1 -1
  46. package/dist/{MediaRenderer-DMdb_5xw.mjs.map → MediaRenderer-13Jlf38P.mjs.map} +1 -1
  47. package/dist/{MessagingScreen-DGhqsVXi.mjs → MessagingScreen-D7crRUnX.mjs} +9 -12
  48. package/dist/{MessagingScreen-DGhqsVXi.mjs.map → MessagingScreen-D7crRUnX.mjs.map} +1 -1
  49. package/dist/MessagingScreen-DZfFOdFI.mjs +47 -0
  50. package/dist/{MessagingScreen-CDiLGmMi.cjs → MessagingScreen-GLb5id9n.cjs} +64 -131
  51. package/dist/MessagingScreen-GLb5id9n.cjs.map +1 -0
  52. package/dist/{MessagingScreen-BKb4mWGa.cjs → MessagingScreen-jOf-MSk1.cjs} +3 -3
  53. package/dist/{MySiteScreen-CK84vXa9.mjs → MySiteScreen-CZFM4MQO.mjs} +7 -7
  54. package/dist/{MySiteScreen-CK84vXa9.mjs.map → MySiteScreen-CZFM4MQO.mjs.map} +1 -1
  55. package/dist/{MySiteWidget-CQNASVaF.mjs → MySiteWidget-C0n9cSw7.mjs} +5 -5
  56. package/dist/{MySiteWidget-CQNASVaF.mjs.map → MySiteWidget-C0n9cSw7.mjs.map} +1 -1
  57. package/dist/{NestedWidget-RuyrOrFn.mjs → NestedWidget-BMKtDP_4.mjs} +6 -6
  58. package/dist/{NestedWidget-RuyrOrFn.mjs.map → NestedWidget-BMKtDP_4.mjs.map} +1 -1
  59. package/dist/{OrdersScreen-b-ZC4_NI.mjs → OrdersScreen-BDTtvnBR.mjs} +7 -7
  60. package/dist/{OrdersScreen-b-ZC4_NI.mjs.map → OrdersScreen-BDTtvnBR.mjs.map} +1 -1
  61. package/dist/{PointsWidget-BwA6aGVZ.mjs → PointsWidget-CaWklfIH.mjs} +5 -5
  62. package/dist/{PointsWidget-BwA6aGVZ.mjs.map → PointsWidget-CaWklfIH.mjs.map} +1 -1
  63. package/dist/{PortalProductsApiProvider-BFdHFvog.mjs → PortalProductsApiProvider-CNAu2pAb.mjs} +2 -2
  64. package/dist/{PortalProductsApiProvider-BFdHFvog.mjs.map → PortalProductsApiProvider-CNAu2pAb.mjs.map} +1 -1
  65. package/dist/{PortalTenantClientProvider-CjJzBCTL.mjs → PortalTenantClientProvider-Bni6J3KS.mjs} +1 -1
  66. package/dist/{PortalTenantClientProvider-CjJzBCTL.mjs.map → PortalTenantClientProvider-Bni6J3KS.mjs.map} +1 -1
  67. package/dist/{ProfileScreen-CmQDKNaP.mjs → ProfileScreen--6ETap-j.mjs} +33 -18
  68. package/dist/ProfileScreen--6ETap-j.mjs.map +1 -0
  69. package/dist/{ProfileScreen-DHv2Cjpz.cjs → ProfileScreen-BJzW-gC_.cjs} +4 -4
  70. package/dist/ProfileScreen-BXzIR1xc.mjs +48 -0
  71. package/dist/{ProfileScreen-BDLJgcXg.cjs → ProfileScreen-DucZeLWI.cjs} +40 -20
  72. package/dist/ProfileScreen-DucZeLWI.cjs.map +1 -0
  73. package/dist/{QuickLinksWidget-CJqwiBJ7.mjs → QuickLinksWidget-D0b33oyn.mjs} +3 -3
  74. package/dist/{QuickLinksWidget-CJqwiBJ7.mjs.map → QuickLinksWidget-D0b33oyn.mjs.map} +1 -1
  75. package/dist/{QuickShareWidget-DKE7Tba2.mjs → QuickShareWidget-DJ0Y71om.mjs} +3 -3
  76. package/dist/{QuickShareWidget-DKE7Tba2.mjs.map → QuickShareWidget-DJ0Y71om.mjs.map} +1 -1
  77. package/dist/{RecentActivityWidget-D1AlZgfV.mjs → RecentActivityWidget-Rpj33TiN.mjs} +5 -5
  78. package/dist/{RecentActivityWidget-D1AlZgfV.mjs.map → RecentActivityWidget-Rpj33TiN.mjs.map} +1 -1
  79. package/dist/{ScreenHeaderContext-Cemdo7bM.mjs → ScreenHeaderContext-4WYXIqQ5.mjs} +1 -1
  80. package/dist/{ScreenHeaderContext-Cemdo7bM.mjs.map → ScreenHeaderContext-4WYXIqQ5.mjs.map} +1 -1
  81. package/dist/{ScreenRenderer-Cl2aAJ7D.mjs → ScreenRenderer-BQal-fnZ.mjs} +2 -2
  82. package/dist/{ScreenRenderer-Cl2aAJ7D.mjs.map → ScreenRenderer-BQal-fnZ.mjs.map} +1 -1
  83. package/dist/{SearchSort-CokMCrhy.mjs → SearchSort-CnUiCGu2.mjs} +2 -2
  84. package/dist/{SearchSort-CokMCrhy.mjs.map → SearchSort-CnUiCGu2.mjs.map} +1 -1
  85. package/dist/{SeparatorWidget-gVlyr1MV.mjs → SeparatorWidget-Bgzsloji.mjs} +3 -3
  86. package/dist/{SeparatorWidget-gVlyr1MV.mjs.map → SeparatorWidget-Bgzsloji.mjs.map} +1 -1
  87. package/dist/{ShareablesScreen-BZZ-RT71.mjs → ShareablesScreen-BY47-Q_G.mjs} +14 -18
  88. package/dist/{ShareablesScreen-BZZ-RT71.mjs.map → ShareablesScreen-BY47-Q_G.mjs.map} +1 -1
  89. package/dist/ShareablesScreen-D0z03RD0.mjs +13 -0
  90. package/dist/{ShopScreen-kiVwC38W.mjs → ShopScreen-BLU3IQ5B.mjs} +29 -34
  91. package/dist/{ShopScreen-kiVwC38W.mjs.map → ShopScreen-BLU3IQ5B.mjs.map} +1 -1
  92. package/dist/{ShopScreen---dB03HI.cjs → ShopScreen-BsfMjIPn.cjs} +22 -22
  93. package/dist/{ShopScreen---dB03HI.cjs.map → ShopScreen-BsfMjIPn.cjs.map} +1 -1
  94. package/dist/ShopScreen-CKRSy_uk.mjs +47 -0
  95. package/dist/{ShopScreen-B6ygTHDB.cjs → ShopScreen-P7EazKlQ.cjs} +3 -3
  96. package/dist/{SpacerWidget-BY7ywGP4.mjs → SpacerWidget-C1byII28.mjs} +2 -2
  97. package/dist/{SpacerWidget-BY7ywGP4.mjs.map → SpacerWidget-C1byII28.mjs.map} +1 -1
  98. package/dist/{SubscriptionsScreen-B88_dLfE.cjs → SubscriptionsScreen-Bglm_cfM.cjs} +682 -283
  99. package/dist/SubscriptionsScreen-Bglm_cfM.cjs.map +1 -0
  100. package/dist/{SubscriptionsScreen-DK9-h3Cz.mjs → SubscriptionsScreen-Dh03oU0H.mjs} +582 -243
  101. package/dist/SubscriptionsScreen-Dh03oU0H.mjs.map +1 -0
  102. package/dist/{SubscriptionsScreen-dhnfYn4L.cjs → SubscriptionsScreen-Dx1cZCdY.cjs} +3 -3
  103. package/dist/{TableWidget-dfUvhH0S.mjs → TableWidget-BtAfTNH_.mjs} +6 -6
  104. package/dist/{TableWidget-dfUvhH0S.mjs.map → TableWidget-BtAfTNH_.mjs.map} +1 -1
  105. package/dist/{TextWidget-BteaMIsX.mjs → TextWidget-CfLUQr6V.mjs} +3 -3
  106. package/dist/{TextWidget-BteaMIsX.mjs.map → TextWidget-CfLUQr6V.mjs.map} +1 -1
  107. package/dist/{ToDoWidget-BciI_D70.mjs → ToDoWidget-bn9bc_MO.mjs} +7 -7
  108. package/dist/{ToDoWidget-BciI_D70.mjs.map → ToDoWidget-bn9bc_MO.mjs.map} +1 -1
  109. package/dist/{UpgradeScreen-X6j0_625.mjs → UpgradeScreen-B-5QKZ_X.mjs} +3 -3
  110. package/dist/{UpgradeScreen-X6j0_625.mjs.map → UpgradeScreen-B-5QKZ_X.mjs.map} +1 -1
  111. package/dist/{VideoWidget-Dj9wue7j.mjs → VideoWidget-DKhqN_Rx.mjs} +4 -4
  112. package/dist/{VideoWidget-Dj9wue7j.mjs.map → VideoWidget-DKhqN_Rx.mjs.map} +1 -1
  113. package/dist/{WidgetInteractionContext-B1mELhQ_.mjs → WidgetInteractionContext-pLGNr8_2.mjs} +1 -1
  114. package/dist/{WidgetInteractionContext-B1mELhQ_.mjs.map → WidgetInteractionContext-pLGNr8_2.mjs.map} +1 -1
  115. package/dist/api-context-3GmfqvIB.mjs +22 -0
  116. package/dist/api-context-3GmfqvIB.mjs.map +1 -0
  117. package/dist/api-context-BkBvyFVK.cjs +46 -0
  118. package/dist/api-context-BkBvyFVK.cjs.map +1 -0
  119. package/dist/{components-CjgEvBYG.mjs → components-hloC7Tbu.mjs} +3 -3
  120. package/dist/{components-CjgEvBYG.mjs.map → components-hloC7Tbu.mjs.map} +1 -1
  121. package/dist/de-DGEv3Wj7.cjs +43 -0
  122. package/dist/de-DGEv3Wj7.cjs.map +1 -0
  123. package/dist/de-f_0MEvly.mjs +37 -0
  124. package/dist/de-f_0MEvly.mjs.map +1 -0
  125. package/dist/{dist-CTLDCXCc.mjs → dist-Di1hciu4.mjs} +1 -1
  126. package/dist/{dist-CTLDCXCc.mjs.map → dist-Di1hciu4.mjs.map} +1 -1
  127. package/dist/el-DBeHybzu.mjs +37 -0
  128. package/dist/el-DBeHybzu.mjs.map +1 -0
  129. package/dist/el-a-BUUyaN.cjs +43 -0
  130. package/dist/el-a-BUUyaN.cjs.map +1 -0
  131. package/dist/{error-state-DYzHx8tt.mjs → error-state--Z2OlDFr.mjs} +1 -1
  132. package/dist/{error-state-DYzHx8tt.mjs.map → error-state--Z2OlDFr.mjs.map} +1 -1
  133. package/dist/{es-BXxGlAp6.mjs → es-B1tdcIoq.mjs} +4 -39
  134. package/dist/{es-BXxGlAp6.mjs.map → es-B1tdcIoq.mjs.map} +1 -1
  135. package/dist/es-N-LjvJCS.cjs +43 -0
  136. package/dist/es-N-LjvJCS.cjs.map +1 -0
  137. package/dist/es-zRvcomm1.mjs +37 -0
  138. package/dist/es-zRvcomm1.mjs.map +1 -0
  139. package/dist/fr-CFggon_j.cjs +43 -0
  140. package/dist/fr-CFggon_j.cjs.map +1 -0
  141. package/dist/fr-DZ8hb7Li.mjs +37 -0
  142. package/dist/fr-DZ8hb7Li.mjs.map +1 -0
  143. package/dist/he-BXo3e9k9.mjs +37 -0
  144. package/dist/he-BXo3e9k9.mjs.map +1 -0
  145. package/dist/he-T4b_SIEg.cjs +43 -0
  146. package/dist/he-T4b_SIEg.cjs.map +1 -0
  147. package/dist/hu-C5uVO1Gi.cjs +43 -0
  148. package/dist/hu-C5uVO1Gi.cjs.map +1 -0
  149. package/dist/hu-DUbmD_v7.mjs +37 -0
  150. package/dist/hu-DUbmD_v7.mjs.map +1 -0
  151. package/dist/id-I8bH5NN_.mjs +37 -0
  152. package/dist/id-I8bH5NN_.mjs.map +1 -0
  153. package/dist/id-_R_sj2Zl.cjs +43 -0
  154. package/dist/id-_R_sj2Zl.cjs.map +1 -0
  155. package/dist/index.cjs +16 -15
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +7 -0
  158. package/dist/index.d.cts.map +1 -1
  159. package/dist/index.d.mts +7 -0
  160. package/dist/index.d.mts.map +1 -1
  161. package/dist/index.mjs +86 -85
  162. package/dist/index.mjs.map +1 -1
  163. package/dist/{format-CLUjV1oR.cjs → isAfter-DXdeICis.cjs} +80 -1
  164. package/dist/isAfter-DXdeICis.cjs.map +1 -0
  165. package/dist/it-BMvqaIb9.cjs +43 -0
  166. package/dist/it-BMvqaIb9.cjs.map +1 -0
  167. package/dist/it-D3Jf5QRi.mjs +37 -0
  168. package/dist/it-D3Jf5QRi.mjs.map +1 -0
  169. package/dist/ja-9CIQCExk.mjs +37 -0
  170. package/dist/ja-9CIQCExk.mjs.map +1 -0
  171. package/dist/ja-DBbelgna.cjs +43 -0
  172. package/dist/ja-DBbelgna.cjs.map +1 -0
  173. package/dist/ko-Bw-gMUu6.mjs +37 -0
  174. package/dist/ko-Bw-gMUu6.mjs.map +1 -0
  175. package/dist/ko-C0Tajaz1.cjs +43 -0
  176. package/dist/ko-C0Tajaz1.cjs.map +1 -0
  177. package/dist/nl-B89YTYeT.cjs +43 -0
  178. package/dist/nl-B89YTYeT.cjs.map +1 -0
  179. package/dist/nl-DDGMf5eH.mjs +37 -0
  180. package/dist/nl-DDGMf5eH.mjs.map +1 -0
  181. package/dist/{order-status-badge-xuJ732eH.mjs → order-status-badge-CKLegNhv.mjs} +4 -4
  182. package/dist/{order-status-badge-xuJ732eH.mjs.map → order-status-badge-CKLegNhv.mjs.map} +1 -1
  183. package/dist/{parse-task-body-DEmYvdNM.mjs → parse-task-body-BK1v2806.mjs} +1 -1
  184. package/dist/{parse-task-body-DEmYvdNM.mjs.map → parse-task-body-BK1v2806.mjs.map} +1 -1
  185. package/dist/pl--xhIwSlw.cjs +43 -0
  186. package/dist/pl--xhIwSlw.cjs.map +1 -0
  187. package/dist/pl-CdZlOTsS.mjs +37 -0
  188. package/dist/pl-CdZlOTsS.mjs.map +1 -0
  189. package/dist/{portal_tenant_content-CQQfNOTc.mjs → portal_tenant_content-DPLnrtOG.mjs} +38 -2
  190. package/dist/{portal_tenant_content-CQQfNOTc.mjs.map → portal_tenant_content-DPLnrtOG.mjs.map} +1 -1
  191. package/dist/pt-BdKQZfRo.mjs +37 -0
  192. package/dist/pt-BdKQZfRo.mjs.map +1 -0
  193. package/dist/pt-Cfp_A3CX.cjs +43 -0
  194. package/dist/pt-Cfp_A3CX.cjs.map +1 -0
  195. package/dist/{purify.es-DzInNL5X.mjs → purify.es-Ba5Ug4-y.mjs} +1 -1
  196. package/dist/{purify.es-DzInNL5X.mjs.map → purify.es-Ba5Ug4-y.mjs.map} +1 -1
  197. package/dist/{query-keys-8SVs82aF.mjs → query-keys-DXle2tm8.mjs} +1 -1
  198. package/dist/{query-keys-8SVs82aF.mjs.map → query-keys-DXle2tm8.mjs.map} +1 -1
  199. package/dist/{registries-Ct8o2YRe.mjs → registries-kvRRUHcO.mjs} +1 -1
  200. package/dist/{registries-Ct8o2YRe.mjs.map → registries-kvRRUHcO.mjs.map} +1 -1
  201. package/dist/{registry-context-CTHUCfEc.mjs → registry-context-Bc-2fQnr.mjs} +1 -1
  202. package/dist/{registry-context-CTHUCfEc.mjs.map → registry-context-Bc-2fQnr.mjs.map} +1 -1
  203. package/dist/ro-DnAztrxY.mjs +37 -0
  204. package/dist/ro-DnAztrxY.mjs.map +1 -0
  205. package/dist/ro-Qp0OJAI0.cjs +43 -0
  206. package/dist/ro-Qp0OJAI0.cjs.map +1 -0
  207. package/dist/ru-BkBpELbx.mjs +37 -0
  208. package/dist/ru-BkBpELbx.mjs.map +1 -0
  209. package/dist/ru-CY41Fh7R.cjs +43 -0
  210. package/dist/ru-CY41Fh7R.cjs.map +1 -0
  211. package/dist/{scroll-arrows-CqDxJ0Pe.mjs → scroll-arrows-D90Miaz_.mjs} +1 -1
  212. package/dist/{scroll-arrows-CqDxJ0Pe.mjs.map → scroll-arrows-D90Miaz_.mjs.map} +1 -1
  213. package/dist/{sortable.esm-C8riJ_zv.mjs → sortable.esm-NmKxJoc7.mjs} +1 -1
  214. package/dist/{sortable.esm-C8riJ_zv.mjs.map → sortable.esm-NmKxJoc7.mjs.map} +1 -1
  215. package/dist/{src-C9vtVoJs.mjs → src-CSFJnkfN.mjs} +1 -1
  216. package/dist/{src-C9vtVoJs.mjs.map → src-CSFJnkfN.mjs.map} +1 -1
  217. package/dist/{src-pgBBOcJa.mjs → src-jSFuc4IV.mjs} +2 -2
  218. package/dist/{src-pgBBOcJa.mjs.map → src-jSFuc4IV.mjs.map} +1 -1
  219. package/dist/th--13cvzk3.cjs +43 -0
  220. package/dist/th--13cvzk3.cjs.map +1 -0
  221. package/dist/th-B4QOqrXn.mjs +37 -0
  222. package/dist/th-B4QOqrXn.mjs.map +1 -0
  223. package/dist/tl-CEypklNf.mjs +37 -0
  224. package/dist/tl-CEypklNf.mjs.map +1 -0
  225. package/dist/tl-CaqI-eLl.cjs +43 -0
  226. package/dist/tl-CaqI-eLl.cjs.map +1 -0
  227. package/dist/tr-BzJ5aLBX.cjs +43 -0
  228. package/dist/tr-BzJ5aLBX.cjs.map +1 -0
  229. package/dist/tr-DUrLeX63.mjs +37 -0
  230. package/dist/tr-DUrLeX63.mjs.map +1 -0
  231. package/dist/{use-account-DsTz5BlS.mjs → use-account-CGaDP8xd.mjs} +2 -2
  232. package/dist/{use-account-DsTz5BlS.mjs.map → use-account-CGaDP8xd.mjs.map} +1 -1
  233. package/dist/{use-store-C2KBIS41.mjs → use-store-BVCCB9kx.mjs} +1 -1
  234. package/dist/{use-store-C2KBIS41.mjs.map → use-store-BVCCB9kx.mjs.map} +1 -1
  235. package/dist/zh_CN-2xAokYb4.cjs +43 -0
  236. package/dist/zh_CN-2xAokYb4.cjs.map +1 -0
  237. package/dist/zh_CN-Bhfuxe7w.mjs +37 -0
  238. package/dist/zh_CN-Bhfuxe7w.mjs.map +1 -0
  239. package/dist/zh_TW-B9XT91CL.cjs +43 -0
  240. package/dist/zh_TW-B9XT91CL.cjs.map +1 -0
  241. package/dist/zh_TW-DR3xhpLa.mjs +37 -0
  242. package/dist/zh_TW-DR3xhpLa.mjs.map +1 -0
  243. package/package.json +14 -13
  244. package/dist/FluidProvider-Bwg1cGSY.mjs +0 -2409
  245. package/dist/FluidProvider-Bwg1cGSY.mjs.map +0 -1
  246. package/dist/FluidProvider-DprqXNu4.cjs +0 -2520
  247. package/dist/FluidProvider-DprqXNu4.cjs.map +0 -1
  248. package/dist/MessagingScreen-CDiLGmMi.cjs.map +0 -1
  249. package/dist/ProfileScreen-BDLJgcXg.cjs.map +0 -1
  250. package/dist/ProfileScreen-CmQDKNaP.mjs.map +0 -1
  251. package/dist/SubscriptionsScreen-B88_dLfE.cjs.map +0 -1
  252. package/dist/SubscriptionsScreen-DK9-h3Cz.mjs.map +0 -1
  253. package/dist/de-CqKH8kwp.cjs +0 -12
  254. package/dist/de-CqKH8kwp.cjs.map +0 -1
  255. package/dist/de-DWONEOZS.mjs +0 -6
  256. package/dist/de-DWONEOZS.mjs.map +0 -1
  257. package/dist/el-CIrAhB-W.cjs +0 -12
  258. package/dist/el-CIrAhB-W.cjs.map +0 -1
  259. package/dist/el-De7Ne7it.mjs +0 -6
  260. package/dist/el-De7Ne7it.mjs.map +0 -1
  261. package/dist/es-4Wsa13tV.cjs +0 -12
  262. package/dist/es-4Wsa13tV.cjs.map +0 -1
  263. package/dist/es-B5_ItPIn.mjs +0 -6
  264. package/dist/es-B5_ItPIn.mjs.map +0 -1
  265. package/dist/fluid-pay-api-adapter-CJ7-I8k-.mjs.map +0 -1
  266. package/dist/fluid-pay-api-adapter-D63KLi5c.cjs.map +0 -1
  267. package/dist/format-CLUjV1oR.cjs.map +0 -1
  268. package/dist/fr-BDKPrKKW.cjs +0 -12
  269. package/dist/fr-BDKPrKKW.cjs.map +0 -1
  270. package/dist/fr-jgEDP2og.mjs +0 -6
  271. package/dist/fr-jgEDP2og.mjs.map +0 -1
  272. package/dist/he-5dq6lV2h.cjs +0 -12
  273. package/dist/he-5dq6lV2h.cjs.map +0 -1
  274. package/dist/he-DLQdVr_g.mjs +0 -6
  275. package/dist/he-DLQdVr_g.mjs.map +0 -1
  276. package/dist/hu-CC4QdkPb.mjs +0 -6
  277. package/dist/hu-CC4QdkPb.mjs.map +0 -1
  278. package/dist/hu-Dpgriy5N.cjs +0 -12
  279. package/dist/hu-Dpgriy5N.cjs.map +0 -1
  280. package/dist/id-Ba-0RT7y.cjs +0 -12
  281. package/dist/id-Ba-0RT7y.cjs.map +0 -1
  282. package/dist/id-CwGC2v1d.mjs +0 -6
  283. package/dist/id-CwGC2v1d.mjs.map +0 -1
  284. package/dist/it-CaxIV-R4.cjs +0 -12
  285. package/dist/it-CaxIV-R4.cjs.map +0 -1
  286. package/dist/it-jUZZ5sjO.mjs +0 -6
  287. package/dist/it-jUZZ5sjO.mjs.map +0 -1
  288. package/dist/ja-Lcg_Qqtj.cjs +0 -12
  289. package/dist/ja-Lcg_Qqtj.cjs.map +0 -1
  290. package/dist/ja-QVQymwAE.mjs +0 -6
  291. package/dist/ja-QVQymwAE.mjs.map +0 -1
  292. package/dist/ko-CFu0TjJO.cjs +0 -12
  293. package/dist/ko-CFu0TjJO.cjs.map +0 -1
  294. package/dist/ko-DfzzTwZI.mjs +0 -6
  295. package/dist/ko-DfzzTwZI.mjs.map +0 -1
  296. package/dist/nl-DR9IRXGT.cjs +0 -12
  297. package/dist/nl-DR9IRXGT.cjs.map +0 -1
  298. package/dist/nl-Dys3mUo2.mjs +0 -6
  299. package/dist/nl-Dys3mUo2.mjs.map +0 -1
  300. package/dist/pay-api-context-CqKGSXnP.mjs +0 -13
  301. package/dist/pay-api-context-CqKGSXnP.mjs.map +0 -1
  302. package/dist/pay-api-context-_o5ZEXYt.cjs +0 -25
  303. package/dist/pay-api-context-_o5ZEXYt.cjs.map +0 -1
  304. package/dist/pl-CBwEisEK.mjs +0 -6
  305. package/dist/pl-CBwEisEK.mjs.map +0 -1
  306. package/dist/pl-DSGSRDM2.cjs +0 -12
  307. package/dist/pl-DSGSRDM2.cjs.map +0 -1
  308. package/dist/pt-D5al7xw3.mjs +0 -6
  309. package/dist/pt-D5al7xw3.mjs.map +0 -1
  310. package/dist/pt-Pz_D1HUz.cjs +0 -12
  311. package/dist/pt-Pz_D1HUz.cjs.map +0 -1
  312. package/dist/ro-B43SoGdE.mjs +0 -6
  313. package/dist/ro-B43SoGdE.mjs.map +0 -1
  314. package/dist/ro-BoGeZTac.cjs +0 -12
  315. package/dist/ro-BoGeZTac.cjs.map +0 -1
  316. package/dist/ru-Cd7LUmcu.cjs +0 -12
  317. package/dist/ru-Cd7LUmcu.cjs.map +0 -1
  318. package/dist/ru-ChwnncDc.mjs +0 -6
  319. package/dist/ru-ChwnncDc.mjs.map +0 -1
  320. package/dist/th-C9S_8Tv6.mjs +0 -6
  321. package/dist/th-C9S_8Tv6.mjs.map +0 -1
  322. package/dist/th-DwLAQd0u.cjs +0 -12
  323. package/dist/th-DwLAQd0u.cjs.map +0 -1
  324. package/dist/tl-CiPbx_5F.mjs +0 -6
  325. package/dist/tl-CiPbx_5F.mjs.map +0 -1
  326. package/dist/tl-DwAVpDyB.cjs +0 -12
  327. package/dist/tl-DwAVpDyB.cjs.map +0 -1
  328. package/dist/tr-BFbCmHQZ.cjs +0 -12
  329. package/dist/tr-BFbCmHQZ.cjs.map +0 -1
  330. package/dist/tr-CUd4dp2u.mjs +0 -6
  331. package/dist/tr-CUd4dp2u.mjs.map +0 -1
  332. package/dist/zh_CN-Cn-k18Y5.cjs +0 -12
  333. package/dist/zh_CN-Cn-k18Y5.cjs.map +0 -1
  334. package/dist/zh_CN-D46-GUTP.mjs +0 -6
  335. package/dist/zh_CN-D46-GUTP.mjs.map +0 -1
  336. package/dist/zh_TW-CIUhIeJP.cjs +0 -12
  337. package/dist/zh_TW-CIUhIeJP.cjs.map +0 -1
  338. package/dist/zh_TW-XqA7UKxt.mjs +0 -6
  339. package/dist/zh_TW-XqA7UKxt.mjs.map +0 -1
  340. /package/dist/{fields-B_iAnFXl.mjs → fields-FTgjMOdh.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  require("./chunk-9hOWP6kD.cjs");
2
- const require_pay_api_context = require("./pay-api-context-_o5ZEXYt.cjs");
2
+ const require_api_context = require("./api-context-BkBvyFVK.cjs");
3
3
  const require_countries_api_context = require("./countries-api-context-C0C0K9gJ.cjs");
4
4
  const require_portal_tenant = require("./portal_tenant-CNmiAf_A.cjs");
5
5
  const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-BT5Y4YyL.cjs");
@@ -8,8 +8,8 @@ const require_ScreenHeaderContext = require("./ScreenHeaderContext-oIu5Bvhs.cjs"
8
8
  const require_query_keys = require("./query-keys-e9EEoWxN.cjs");
9
9
  const require_use_account = require("./use-account-D6Z9hkDX.cjs");
10
10
  const require_AppNavigationContext = require("./AppNavigationContext-BDs1cOuG.cjs");
11
- const require_fluid_pay_api_adapter = require("./fluid-pay-api-adapter-D63KLi5c.cjs");
12
- const require_format = require("./format-CLUjV1oR.cjs");
11
+ const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-CbpNjpwB.cjs");
12
+ const require_isAfter = require("./isAfter-DXdeICis.cjs");
13
13
  const require_SearchSort = require("./SearchSort-BP2ktxyN.cjs");
14
14
  const require_InfiniteScrollSentinel = require("./InfiniteScrollSentinel-BaPx1tjC.cjs");
15
15
  const require_order_status_badge = require("./order-status-badge-BKvLeVsM.cjs");
@@ -19,7 +19,66 @@ let react_jsx_runtime = require("react/jsx-runtime");
19
19
  let lucide_react = require("lucide-react");
20
20
  let clsx = require("clsx");
21
21
  let tailwind_merge = require("tailwind-merge");
22
- let react_hook_form = require("react-hook-form");
22
+ //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addWeeks.js
23
+ /**
24
+ * The {@link addWeeks} function options.
25
+ */
26
+ /**
27
+ * @name addWeeks
28
+ * @category Week Helpers
29
+ * @summary Add the specified number of weeks to the given date.
30
+ *
31
+ * @description
32
+ * Add the specified number of weeks to the given date.
33
+ *
34
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
35
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
36
+ *
37
+ * @param date - The date to be changed
38
+ * @param amount - The amount of weeks to be added.
39
+ * @param options - An object with options
40
+ *
41
+ * @returns The new date with the weeks added
42
+ *
43
+ * @example
44
+ * // Add 4 weeks to 1 September 2014:
45
+ * const result = addWeeks(new Date(2014, 8, 1), 4)
46
+ * //=> Mon Sep 29 2014 00:00:00
47
+ */
48
+ function addWeeks(date, amount, options) {
49
+ return require_isAfter.addDays(date, amount * 7, options);
50
+ }
51
+ //#endregion
52
+ //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addYears.js
53
+ /**
54
+ * The {@link addYears} function options.
55
+ */
56
+ /**
57
+ * @name addYears
58
+ * @category Year Helpers
59
+ * @summary Add the specified number of years to the given date.
60
+ *
61
+ * @description
62
+ * Add the specified number of years to the given date.
63
+ *
64
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
65
+ * @typeParam ResultDate - The result `Date` type.
66
+ *
67
+ * @param date - The date to be changed
68
+ * @param amount - The amount of years to be added.
69
+ * @param options - The options
70
+ *
71
+ * @returns The new date with the years added
72
+ *
73
+ * @example
74
+ * // Add 5 years to 1 September 2014:
75
+ * const result = addYears(new Date(2014, 8, 1), 5)
76
+ * //=> Sun Sep 01 2019 00:00:00
77
+ */
78
+ function addYears(date, amount, options) {
79
+ return require_isAfter.addMonths(date, amount * 12, options);
80
+ }
81
+ //#endregion
23
82
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDefaultOptions.js
24
83
  /**
25
84
  * @name getDefaultOptions
@@ -46,7 +105,7 @@ let react_hook_form = require("react-hook-form");
46
105
  * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }
47
106
  */
48
107
  function getDefaultOptions() {
49
- return Object.assign({}, require_format.getDefaultOptions());
108
+ return Object.assign({}, require_isAfter.getDefaultOptions());
50
109
  }
51
110
  //#endregion
52
111
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISODay.js
@@ -75,7 +134,7 @@ function getDefaultOptions() {
75
134
  * //=> 7
76
135
  */
77
136
  function getISODay(date, options) {
78
- const day = require_format.toDate(date, options?.in).getDay();
137
+ const day = require_isAfter.toDate(date, options?.in).getDay();
79
138
  return day === 0 ? 7 : day;
80
139
  }
81
140
  //#endregion
@@ -109,7 +168,7 @@ function getISODay(date, options) {
109
168
  * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'
110
169
  */
111
170
  function transpose(date, constructor) {
112
- const date_ = isConstructor(constructor) ? new constructor(0) : require_format.constructFrom(constructor, 0);
171
+ const date_ = isConstructor(constructor) ? new constructor(0) : require_isAfter.constructFrom(constructor, 0);
113
172
  date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
114
173
  date_.setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
115
174
  return date_;
@@ -147,11 +206,11 @@ var DateTimezoneSetter = class extends Setter {
147
206
  subPriority = -1;
148
207
  constructor(context, reference) {
149
208
  super();
150
- this.context = context || ((date) => require_format.constructFrom(reference, date));
209
+ this.context = context || ((date) => require_isAfter.constructFrom(reference, date));
151
210
  }
152
211
  set(date, flags) {
153
212
  if (flags.timestampIsSet) return date;
154
- return require_format.constructFrom(date, transpose(date, this.context));
213
+ return require_isAfter.constructFrom(date, transpose(date, this.context));
155
214
  }
156
215
  };
157
216
  //#endregion
@@ -254,7 +313,7 @@ function parseTimezonePattern(pattern, dateString) {
254
313
  const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;
255
314
  const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;
256
315
  return {
257
- value: sign * (hours * require_format.millisecondsInHour + minutes * require_format.millisecondsInMinute + seconds * require_format.millisecondsInSecond),
316
+ value: sign * (hours * require_isAfter.millisecondsInHour + minutes * require_isAfter.millisecondsInMinute + seconds * require_isAfter.millisecondsInSecond),
258
317
  rest: dateString.slice(matchResult[0].length)
259
318
  };
260
319
  }
@@ -368,17 +427,17 @@ var LocalWeekYearParser = class extends Parser {
368
427
  return value.isTwoDigitYear || value.year > 0;
369
428
  }
370
429
  set(date, flags, value, options) {
371
- const currentYear = require_format.getWeekYear(date, options);
430
+ const currentYear = require_isAfter.getWeekYear(date, options);
372
431
  if (value.isTwoDigitYear) {
373
432
  const normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);
374
433
  date.setFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);
375
434
  date.setHours(0, 0, 0, 0);
376
- return require_format.startOfWeek(date, options);
435
+ return require_isAfter.startOfWeek(date, options);
377
436
  }
378
437
  const year = !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
379
438
  date.setFullYear(year, 0, options.firstWeekContainsDate);
380
439
  date.setHours(0, 0, 0, 0);
381
- return require_format.startOfWeek(date, options);
440
+ return require_isAfter.startOfWeek(date, options);
382
441
  }
383
442
  incompatibleTokens = [
384
443
  "y",
@@ -405,10 +464,10 @@ var ISOWeekYearParser = class extends Parser {
405
464
  return parseNDigitsSigned(token.length, dateString);
406
465
  }
407
466
  set(date, _flags, value) {
408
- const firstWeekOfYear = require_format.constructFrom(date, 0);
467
+ const firstWeekOfYear = require_isAfter.constructFrom(date, 0);
409
468
  firstWeekOfYear.setFullYear(value, 0, 4);
410
469
  firstWeekOfYear.setHours(0, 0, 0, 0);
411
- return require_format.startOfISOWeek(firstWeekOfYear);
470
+ return require_isAfter.startOfISOWeek(firstWeekOfYear);
412
471
  }
413
472
  incompatibleTokens = [
414
473
  "G",
@@ -727,10 +786,10 @@ var StandAloneMonthParser = class extends Parser {
727
786
  * //=> Sun Jan 4 2004 00:00:00
728
787
  */
729
788
  function setWeek(date, week, options) {
730
- const date_ = require_format.toDate(date, options?.in);
731
- const diff = require_format.getWeek(date_, options) - week;
789
+ const date_ = require_isAfter.toDate(date, options?.in);
790
+ const diff = require_isAfter.getWeek(date_, options) - week;
732
791
  date_.setDate(date_.getDate() - diff * 7);
733
- return require_format.toDate(date_, options?.in);
792
+ return require_isAfter.toDate(date_, options?.in);
734
793
  }
735
794
  //#endregion
736
795
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js
@@ -747,7 +806,7 @@ var LocalWeekParser = class extends Parser {
747
806
  return value >= 1 && value <= 53;
748
807
  }
749
808
  set(date, _flags, value, options) {
750
- return require_format.startOfWeek(setWeek(date, value, options), options);
809
+ return require_isAfter.startOfWeek(setWeek(date, value, options), options);
751
810
  }
752
811
  incompatibleTokens = [
753
812
  "y",
@@ -795,8 +854,8 @@ var LocalWeekParser = class extends Parser {
795
854
  * //=> Sat Jan 01 2005 00:00:00
796
855
  */
797
856
  function setISOWeek(date, week, options) {
798
- const _date = require_format.toDate(date, options?.in);
799
- const diff = require_format.getISOWeek(_date, options) - week;
857
+ const _date = require_isAfter.toDate(date, options?.in);
858
+ const diff = require_isAfter.getISOWeek(_date, options) - week;
800
859
  _date.setDate(_date.getDate() - diff * 7);
801
860
  return _date;
802
861
  }
@@ -815,7 +874,7 @@ var ISOWeekParser = class extends Parser {
815
874
  return value >= 1 && value <= 53;
816
875
  }
817
876
  set(date, _flags, value) {
818
- return require_format.startOfISOWeek(setISOWeek(date, value));
877
+ return require_isAfter.startOfISOWeek(setISOWeek(date, value));
819
878
  }
820
879
  incompatibleTokens = [
821
880
  "y",
@@ -973,13 +1032,13 @@ var DayOfYearParser = class extends Parser {
973
1032
  * //=> Sun Sep 07 2014 00:00:00
974
1033
  */
975
1034
  function setDay(date, day, options) {
976
- const defaultOptions = require_format.getDefaultOptions();
1035
+ const defaultOptions = require_isAfter.getDefaultOptions();
977
1036
  const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
978
- const date_ = require_format.toDate(date, options?.in);
1037
+ const date_ = require_isAfter.toDate(date, options?.in);
979
1038
  const currentDay = date_.getDay();
980
1039
  const dayIndex = (day % 7 + 7) % 7;
981
1040
  const delta = 7 - weekStartsOn;
982
- return require_format.addDays(date_, day < 0 || day > 6 ? day - (currentDay + delta) % 7 : (dayIndex + delta) % 7 - (currentDay + delta) % 7, options);
1041
+ return require_isAfter.addDays(date_, day < 0 || day > 6 ? day - (currentDay + delta) % 7 : (dayIndex + delta) % 7 - (currentDay + delta) % 7, options);
983
1042
  }
984
1043
  //#endregion
985
1044
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js
@@ -1222,8 +1281,8 @@ var StandAloneLocalDayParser = class extends Parser {
1222
1281
  * //=> Sun Sep 07 2014 00:00:00
1223
1282
  */
1224
1283
  function setISODay(date, day, options) {
1225
- const date_ = require_format.toDate(date, options?.in);
1226
- return require_format.addDays(date_, day - getISODay(date_, options), options);
1284
+ const date_ = require_isAfter.toDate(date, options?.in);
1285
+ return require_isAfter.addDays(date_, day - getISODay(date_, options), options);
1227
1286
  }
1228
1287
  //#endregion
1229
1288
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js
@@ -1612,7 +1671,7 @@ var ISOTimezoneWithZParser = class extends Parser {
1612
1671
  }
1613
1672
  set(date, flags, value) {
1614
1673
  if (flags.timestampIsSet) return date;
1615
- return require_format.constructFrom(date, date.getTime() - require_format.getTimezoneOffsetInMilliseconds(date) - value);
1674
+ return require_isAfter.constructFrom(date, date.getTime() - require_isAfter.getTimezoneOffsetInMilliseconds(date) - value);
1616
1675
  }
1617
1676
  incompatibleTokens = [
1618
1677
  "t",
@@ -1635,7 +1694,7 @@ var ISOTimezoneParser = class extends Parser {
1635
1694
  }
1636
1695
  set(date, flags, value) {
1637
1696
  if (flags.timestampIsSet) return date;
1638
- return require_format.constructFrom(date, date.getTime() - require_format.getTimezoneOffsetInMilliseconds(date) - value);
1697
+ return require_isAfter.constructFrom(date, date.getTime() - require_isAfter.getTimezoneOffsetInMilliseconds(date) - value);
1639
1698
  }
1640
1699
  incompatibleTokens = [
1641
1700
  "t",
@@ -1651,7 +1710,7 @@ var TimestampSecondsParser = class extends Parser {
1651
1710
  return parseAnyDigitsSigned(dateString);
1652
1711
  }
1653
1712
  set(date, _flags, value) {
1654
- return [require_format.constructFrom(date, value * 1e3), { timestampIsSet: true }];
1713
+ return [require_isAfter.constructFrom(date, value * 1e3), { timestampIsSet: true }];
1655
1714
  }
1656
1715
  incompatibleTokens = "*";
1657
1716
  };
@@ -1663,7 +1722,7 @@ var TimestampMillisecondsParser = class extends Parser {
1663
1722
  return parseAnyDigitsSigned(dateString);
1664
1723
  }
1665
1724
  set(date, _flags, value) {
1666
- return [require_format.constructFrom(date, value), { timestampIsSet: true }];
1725
+ return [require_isAfter.constructFrom(date, value), { timestampIsSet: true }];
1667
1726
  }
1668
1727
  incompatibleTokens = "*";
1669
1728
  };
@@ -2012,12 +2071,12 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
2012
2071
  * //=> Sun Feb 28 2010 00:00:00
2013
2072
  */
2014
2073
  function parse(dateStr, formatStr, referenceDate, options) {
2015
- const invalidDate = () => require_format.constructFrom(options?.in || referenceDate, NaN);
2074
+ const invalidDate = () => require_isAfter.constructFrom(options?.in || referenceDate, NaN);
2016
2075
  const defaultOptions = getDefaultOptions();
2017
- const locale = options?.locale ?? defaultOptions.locale ?? require_format.enUS;
2076
+ const locale = options?.locale ?? defaultOptions.locale ?? require_isAfter.enUS;
2018
2077
  const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions.firstWeekContainsDate ?? defaultOptions.locale?.options?.firstWeekContainsDate ?? 1;
2019
2078
  const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions.weekStartsOn ?? defaultOptions.locale?.options?.weekStartsOn ?? 0;
2020
- if (!formatStr) return dateStr ? invalidDate() : require_format.toDate(referenceDate, options?.in);
2079
+ if (!formatStr) return dateStr ? invalidDate() : require_isAfter.toDate(referenceDate, options?.in);
2021
2080
  const subFnOptions = {
2022
2081
  firstWeekContainsDate,
2023
2082
  weekStartsOn,
@@ -2026,16 +2085,16 @@ function parse(dateStr, formatStr, referenceDate, options) {
2026
2085
  const setters = [new DateTimezoneSetter(options?.in, referenceDate)];
2027
2086
  const tokens = formatStr.match(longFormattingTokensRegExp).map((substring) => {
2028
2087
  const firstCharacter = substring[0];
2029
- if (firstCharacter in require_format.longFormatters) {
2030
- const longFormatter = require_format.longFormatters[firstCharacter];
2088
+ if (firstCharacter in require_isAfter.longFormatters) {
2089
+ const longFormatter = require_isAfter.longFormatters[firstCharacter];
2031
2090
  return longFormatter(substring, locale.formatLong);
2032
2091
  }
2033
2092
  return substring;
2034
2093
  }).join("").match(formattingTokensRegExp);
2035
2094
  const usedTokens = [];
2036
2095
  for (let token of tokens) {
2037
- if (!options?.useAdditionalWeekYearTokens && require_format.isProtectedWeekYearToken(token)) require_format.warnOrThrowProtectedError(token, formatStr, dateStr);
2038
- if (!options?.useAdditionalDayOfYearTokens && require_format.isProtectedDayOfYearToken(token)) require_format.warnOrThrowProtectedError(token, formatStr, dateStr);
2096
+ if (!options?.useAdditionalWeekYearTokens && require_isAfter.isProtectedWeekYearToken(token)) require_isAfter.warnOrThrowProtectedError(token, formatStr, dateStr);
2097
+ if (!options?.useAdditionalDayOfYearTokens && require_isAfter.isProtectedDayOfYearToken(token)) require_isAfter.warnOrThrowProtectedError(token, formatStr, dateStr);
2039
2098
  const firstCharacter = token[0];
2040
2099
  const parser = parsers[firstCharacter];
2041
2100
  if (parser) {
@@ -2062,7 +2121,7 @@ function parse(dateStr, formatStr, referenceDate, options) {
2062
2121
  }
2063
2122
  if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) return invalidDate();
2064
2123
  const uniquePrioritySetters = setters.map((setter) => setter.priority).sort((a, b) => b - a).filter((priority, index, array) => array.indexOf(priority) === index).map((priority) => setters.filter((setter) => setter.priority === priority).sort((a, b) => b.subPriority - a.subPriority)).map((setterArray) => setterArray[0]);
2065
- let date = require_format.toDate(referenceDate, options?.in);
2124
+ let date = require_isAfter.toDate(referenceDate, options?.in);
2066
2125
  if (isNaN(+date)) return invalidDate();
2067
2126
  const flags = {};
2068
2127
  for (const setter of uniquePrioritySetters) {
@@ -2111,6 +2170,16 @@ const subscriptionsKeys = {
2111
2170
  ]
2112
2171
  };
2113
2172
  //#endregion
2173
+ //#region ../../subscriptions/core/src/hooks/use-subscriptions.ts
2174
+ function useSubscriptions(params, options) {
2175
+ const api = useSubscriptionsApi();
2176
+ return (0, _tanstack_react_query.useQuery)({
2177
+ queryKey: subscriptionsKeys.list(params),
2178
+ queryFn: () => api.fetchCustomerSubscriptions(params),
2179
+ enabled: options?.enabled ?? !!params.customerId
2180
+ });
2181
+ }
2182
+ //#endregion
2114
2183
  //#region ../../subscriptions/core/src/hooks/use-infinite-subscriptions.ts
2115
2184
  function useInfiniteSubscriptions(params, options) {
2116
2185
  const api = useSubscriptionsApi();
@@ -2638,6 +2707,7 @@ function createPortalSubscriptionsAdapter(client) {
2638
2707
  const subscription = {};
2639
2708
  if (body.payment_method_id != null) subscription.payment_method_id = body.payment_method_id;
2640
2709
  if (body.quantity != null) subscription.quantity = body.quantity;
2710
+ if (body.next_bill_date != null) subscription.next_bill_date = body.next_bill_date;
2641
2711
  return mapSubscriptionDetail(await require_portal_tenant.subscriptions_update(client, subscriptionToken, { subscription }));
2642
2712
  }
2643
2713
  };
@@ -3003,92 +3073,127 @@ function SubscriptionsListScreen({ customerId, isLoadingCustomer }) {
3003
3073
  });
3004
3074
  }
3005
3075
  //#endregion
3006
- //#region ../../subscriptions/ui/src/components/confirm-dialog.tsx
3007
- function ConfirmDialog({ title, description, actionButtonText = "Delete", cancelButtonText = "Cancel", open, setOpen, onConfirm }) {
3076
+ //#region ../../subscriptions/ui/src/components/cancel-subscription-dialog.tsx
3077
+ const PAUSE_MONTH_OPTIONS = [
3078
+ 1,
3079
+ 2,
3080
+ 3
3081
+ ];
3082
+ function CancelSubscriptionDialog({ open, onOpenChange, onConfirm, onPauseInstead, errorMessage, title = "Cancel Subscription", description = "Are you sure you want to cancel this subscription? You can reactivate it later.", pauseQuestion = "Would you like to pause your subscription instead?", pauseButtonText = "Pause Subscription", cancelButtonText = "Cancel", actionButtonText = "Cancel Subscription" }) {
3008
3083
  const [isPending, setIsPending] = (0, react.useState)(false);
3084
+ const [selectedMonths, setSelectedMonths] = (0, react.useState)(null);
3085
+ (0, react.useEffect)(() => {
3086
+ if (!open) setSelectedMonths(null);
3087
+ }, [open]);
3009
3088
  const handleConfirm = async () => {
3089
+ const result = onConfirm();
3090
+ if (!(result instanceof Promise)) {
3091
+ onOpenChange(false);
3092
+ return;
3093
+ }
3094
+ setIsPending(true);
3010
3095
  try {
3011
- const result = onConfirm();
3012
- if (result instanceof Promise) {
3013
- setIsPending(true);
3014
- await result;
3015
- }
3096
+ await result;
3097
+ onOpenChange(false);
3016
3098
  } catch (error) {
3017
- console.error("ConfirmDialog: action rejected", error);
3099
+ console.error("CancelSubscriptionDialog: action rejected", error);
3018
3100
  } finally {
3019
3101
  setIsPending(false);
3020
- setOpen(false);
3021
3102
  }
3022
3103
  };
3104
+ const handlePause = () => {
3105
+ if (!selectedMonths) return;
3106
+ onPauseInstead(selectedMonths);
3107
+ };
3023
3108
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialog, {
3024
3109
  open,
3025
- onOpenChange: (v) => !isPending && setOpen(v),
3026
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogTitle, { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogDescription, { children: description })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogCancel, {
3027
- disabled: isPending,
3028
- children: cancelButtonText
3029
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogAction, {
3030
- onClick: handleConfirm,
3031
- disabled: isPending,
3032
- className: "bg-red-600 text-white hover:bg-red-500",
3033
- children: isPending ? "..." : actionButtonText
3034
- })] })] })
3110
+ onOpenChange: (v) => !isPending && onOpenChange(v),
3111
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogContent, { children: [
3112
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogTitle, { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogDescription, { children: description })] }),
3113
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3114
+ className: "border-border space-y-2 rounded-md border p-3",
3115
+ children: [
3116
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3117
+ className: "text-foreground text-sm font-medium",
3118
+ children: pauseQuestion
3119
+ }),
3120
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Label, {
3121
+ htmlFor: "cancel-pause-months",
3122
+ className: "text-foreground text-sm font-semibold",
3123
+ children: "Pause for"
3124
+ }),
3125
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Select, {
3126
+ value: selectedMonths ? String(selectedMonths) : void 0,
3127
+ onValueChange: (value) => setSelectedMonths(value ? Number(value) : null),
3128
+ disabled: isPending,
3129
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectTrigger, {
3130
+ id: "cancel-pause-months",
3131
+ className: "w-full",
3132
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectValue, { placeholder: "Select duration" })
3133
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectContent, { children: PAUSE_MONTH_OPTIONS.map((months) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.SelectItem, {
3134
+ value: String(months),
3135
+ children: [
3136
+ months,
3137
+ " ",
3138
+ months === 1 ? "month" : "months"
3139
+ ]
3140
+ }, months)) })]
3141
+ }),
3142
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3143
+ variant: "outline",
3144
+ onClick: handlePause,
3145
+ disabled: isPending || !selectedMonths,
3146
+ className: "w-full",
3147
+ children: pauseButtonText
3148
+ })
3149
+ ]
3150
+ }),
3151
+ errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3152
+ className: "text-destructive text-left text-sm",
3153
+ children: errorMessage
3154
+ }),
3155
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.AlertDialogFooter, {
3156
+ className: "flex-col gap-2 sm:flex-row sm:justify-end",
3157
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AlertDialogCancel, {
3158
+ disabled: isPending,
3159
+ children: cancelButtonText
3160
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3161
+ variant: "destructive",
3162
+ onClick: handleConfirm,
3163
+ disabled: isPending,
3164
+ autoFocus: true,
3165
+ children: isPending ? "..." : actionButtonText
3166
+ })]
3167
+ })
3168
+ ] })
3035
3169
  });
3036
3170
  }
3037
3171
  //#endregion
3038
- //#region ../../subscriptions/ui/src/lib/parse-iso-date.ts
3039
- const ISO_DATE = "yyyy-MM-dd";
3040
- /**
3041
- * Parse an ISO date string as local midnight. Accepts either a bare
3042
- * "yyyy-MM-dd" or a full ISO timestamp — both are sliced to the date
3043
- * portion first so the result lands on the intended calendar day
3044
- * regardless of the viewer's timezone.
3045
- */
3046
- function parseIsoDate(value) {
3047
- return parse(value.slice(0, 10), ISO_DATE, /* @__PURE__ */ new Date());
3048
- }
3049
- //#endregion
3050
3172
  //#region ../../subscriptions/ui/src/components/pause-subscription-dialog.tsx
3051
3173
  function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, currentNextBillDate, billingInterval = 1, billingIntervalUnit = "month", title = "Pause subscription", description = "Are you sure you want to pause subscription?", actionText = "Pause" }) {
3052
- const [pauseType, setPauseType] = (0, react.useState)("specific");
3053
- const [selectedDate, setSelectedDate] = (0, react.useState)(void 0);
3054
- const [calendarOpen, setCalendarOpen] = (0, react.useState)(false);
3174
+ const [pauseType, setPauseType] = (0, react.useState)("indefinite");
3055
3175
  const [selectedOrderCount, setSelectedOrderCount] = (0, react.useState)(null);
3056
- const today = /* @__PURE__ */ new Date();
3057
- today.setHours(0, 0, 0, 0);
3058
- const minDate = require_format.addDays(today, 1);
3059
3176
  const orderCountOptions = Array.from({ length: 99 }, (_, i) => i + 1);
3060
3177
  const calculatedResumeDate = selectedOrderCount && currentNextBillDate ? calculateResumeDate(billingInterval, billingIntervalUnit, selectedOrderCount, currentNextBillDate) : null;
3061
3178
  (0, react.useEffect)(() => {
3062
3179
  if (!open) return;
3063
- setPauseType("specific");
3180
+ setPauseType("indefinite");
3064
3181
  setSelectedOrderCount(null);
3065
- if (currentNextBillDate) {
3066
- const initial = parseIsoDate(currentNextBillDate);
3067
- setSelectedDate(initial < minDate ? minDate : initial);
3068
- } else setSelectedDate(void 0);
3069
- }, [open, currentNextBillDate]);
3182
+ }, [open]);
3070
3183
  const handleConfirm = () => {
3071
3184
  if (pauseType === "indefinite") {
3072
3185
  onConfirm({ type: "indefinite" });
3073
3186
  return;
3074
3187
  }
3075
- if (pauseType === "order_count" && selectedOrderCount) {
3076
- onConfirm({
3077
- type: "order_count",
3078
- numberOfOrders: selectedOrderCount
3079
- });
3080
- return;
3081
- }
3082
- if (pauseType === "specific" && selectedDate) onConfirm({
3083
- type: "specific",
3084
- nextBillDate: require_format.format(selectedDate, "yyyy-MM-dd")
3188
+ if (pauseType === "order_count" && selectedOrderCount) onConfirm({
3189
+ type: "order_count",
3190
+ numberOfOrders: selectedOrderCount
3085
3191
  });
3086
3192
  };
3087
3193
  const handleDismiss = (next) => {
3088
3194
  if (!next) {
3089
- setPauseType("specific");
3195
+ setPauseType("indefinite");
3090
3196
  setSelectedOrderCount(null);
3091
- setSelectedDate(void 0);
3092
3197
  }
3093
3198
  onOpenChange(next);
3094
3199
  };
@@ -3098,29 +3203,24 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3098
3203
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: "Resume" }),
3099
3204
  " from your account."
3100
3205
  ] });
3101
- if (pauseType === "order_count" && !selectedOrderCount) return null;
3102
- let displayDate;
3103
- if (pauseType === "order_count" && calculatedResumeDate) displayDate = require_format.format(calculatedResumeDate, "MMMM d, yyyy");
3104
- else if (pauseType === "specific" && selectedDate) displayDate = require_format.format(selectedDate, "MMMM d, yyyy");
3105
- else if (currentNextBillDate) displayDate = require_format.format(parseIsoDate(currentNextBillDate), "MMMM d, yyyy");
3106
- else displayDate = "a future date";
3206
+ if (!selectedOrderCount) return null;
3107
3207
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
3108
3208
  "You won't be charged until your subscription resumes on",
3109
3209
  " ",
3110
3210
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3111
3211
  className: "font-semibold",
3112
- children: displayDate
3212
+ children: calculatedResumeDate ? require_isAfter.format(calculatedResumeDate, "MMMM d, yyyy") : "a future date"
3113
3213
  }),
3114
3214
  "."
3115
3215
  ] });
3116
3216
  })();
3117
- const isActionDisabled = pauseType === "specific" && !selectedDate || pauseType === "order_count" && !selectedOrderCount;
3217
+ const isActionDisabled = pauseType === "order_count" && !selectedOrderCount;
3118
3218
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Dialog, {
3119
3219
  open,
3120
3220
  onOpenChange: handleDismiss,
3121
3221
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.DialogContent, {
3122
3222
  "aria-describedby": "pause-subscription-dialog-description",
3123
- className: "max-w-sm rounded md:w-90",
3223
+ className: "rounded",
3124
3224
  children: [
3125
3225
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogHeader, {
3126
3226
  className: "flex flex-row justify-between",
@@ -3187,57 +3287,6 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3187
3287
  })]
3188
3288
  })]
3189
3289
  }),
3190
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3191
- className: "space-y-2",
3192
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3193
- className: "flex items-center space-x-2",
3194
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
3195
- id: "pause-until-date",
3196
- type: "radio",
3197
- checked: pauseType === "specific",
3198
- onChange: () => setPauseType("specific"),
3199
- className: "border-border accent-primary h-4 w-4 focus:ring-0"
3200
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Label, {
3201
- htmlFor: "pause-until-date",
3202
- className: "text-foreground cursor-pointer text-sm font-medium",
3203
- children: "Pause until a specific date"
3204
- })]
3205
- }), pauseType === "specific" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3206
- className: "ml-6",
3207
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Popover, {
3208
- open: calendarOpen,
3209
- onOpenChange: setCalendarOpen,
3210
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.PopoverTrigger, {
3211
- asChild: true,
3212
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3213
- variant: "outline",
3214
- className: require_src.cn("border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground h-9 w-full justify-start border px-3 py-2 text-left font-normal", !selectedDate && "text-muted-foreground hover:text-muted-foreground"),
3215
- children: [selectedDate ? require_format.format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3216
- })
3217
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.PopoverContent, {
3218
- className: "bg-popover w-auto rounded-md border p-0 shadow-lg",
3219
- align: "start",
3220
- sideOffset: 4,
3221
- style: { zIndex: 9999 },
3222
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Calendar, {
3223
- mode: "single",
3224
- selected: selectedDate,
3225
- onSelect: (date) => {
3226
- setSelectedDate(date);
3227
- setCalendarOpen(false);
3228
- },
3229
- disabled: (date) => date < minDate,
3230
- defaultMonth: selectedDate ?? (currentNextBillDate ? parseIsoDate(currentNextBillDate) : void 0),
3231
- modifiersStyles: { selected: {
3232
- backgroundColor: "var(--primary)",
3233
- color: "var(--primary-foreground)"
3234
- } },
3235
- initialFocus: true
3236
- })
3237
- })]
3238
- })
3239
- })]
3240
- }),
3241
3290
  statusMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3242
3291
  className: "text-muted-foreground text-xs",
3243
3292
  children: statusMessage
@@ -3252,12 +3301,13 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3252
3301
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogFooter, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3253
3302
  className: "flex w-full flex-row justify-between space-x-2",
3254
3303
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3255
- className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
3304
+ variant: "outline",
3305
+ className: "h-10 min-w-[70px] rounded p-3",
3256
3306
  onClick: () => handleDismiss(false),
3257
3307
  children: "Cancel"
3258
3308
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3259
3309
  type: "button",
3260
- className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90 disabled:opacity-50",
3310
+ className: "h-10 min-w-[70px] rounded p-3",
3261
3311
  onClick: handleConfirm,
3262
3312
  disabled: isActionDisabled || isLoading,
3263
3313
  children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "border-primary-foreground h-5 w-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : actionText
@@ -3268,13 +3318,25 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3268
3318
  });
3269
3319
  }
3270
3320
  //#endregion
3321
+ //#region ../../subscriptions/ui/src/lib/parse-iso-date.ts
3322
+ const ISO_DATE = "yyyy-MM-dd";
3323
+ /**
3324
+ * Parse an ISO date string as local midnight. Accepts either a bare
3325
+ * "yyyy-MM-dd" or a full ISO timestamp — both are sliced to the date
3326
+ * portion first so the result lands on the intended calendar day
3327
+ * regardless of the viewer's timezone.
3328
+ */
3329
+ function parseIsoDate(value) {
3330
+ return parse(value.slice(0, 10), ISO_DATE, /* @__PURE__ */ new Date());
3331
+ }
3332
+ //#endregion
3271
3333
  //#region ../../subscriptions/ui/src/components/resume-subscription-dialog.tsx
3272
3334
  function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, defaultNextBillDate, title = "Resume subscription", description = "Choose the date your subscription should resume.", actionText = "Resume" }) {
3273
3335
  const [selectedDate, setSelectedDate] = (0, react.useState)(void 0);
3274
3336
  const [calendarOpen, setCalendarOpen] = (0, react.useState)(false);
3275
3337
  const today = /* @__PURE__ */ new Date();
3276
3338
  today.setHours(0, 0, 0, 0);
3277
- const minDate = require_format.addDays(today, 1);
3339
+ const minDate = require_isAfter.addDays(today, 1);
3278
3340
  (0, react.useEffect)(() => {
3279
3341
  if (!open) return;
3280
3342
  if (defaultNextBillDate) {
@@ -3284,7 +3346,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3284
3346
  }, [open, defaultNextBillDate]);
3285
3347
  const handleConfirm = () => {
3286
3348
  if (!selectedDate) return;
3287
- onConfirm(require_format.format(selectedDate, "yyyy-MM-dd"));
3349
+ onConfirm(require_isAfter.format(selectedDate, "yyyy-MM-dd"));
3288
3350
  };
3289
3351
  const handleDismiss = (next) => {
3290
3352
  if (!next) setSelectedDate(void 0);
@@ -3295,7 +3357,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3295
3357
  onOpenChange: handleDismiss,
3296
3358
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.DialogContent, {
3297
3359
  "aria-describedby": "resume-subscription-dialog-description",
3298
- className: "max-w-sm rounded md:w-90",
3360
+ className: "rounded",
3299
3361
  children: [
3300
3362
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogHeader, {
3301
3363
  className: "flex flex-row justify-between",
@@ -3325,7 +3387,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3325
3387
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3326
3388
  variant: "outline",
3327
3389
  className: require_src.cn("border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground h-9 w-full justify-start border px-3 py-2 text-left font-normal", !selectedDate && "text-muted-foreground hover:text-muted-foreground"),
3328
- children: [selectedDate ? require_format.format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3390
+ children: [selectedDate ? require_isAfter.format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3329
3391
  })
3330
3392
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.PopoverContent, {
3331
3393
  className: "bg-popover w-auto rounded-md border p-0 shadow-lg",
@@ -3356,7 +3418,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3356
3418
  " ",
3357
3419
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3358
3420
  className: "font-semibold",
3359
- children: require_format.format(selectedDate, "MMMM d, yyyy")
3421
+ children: require_isAfter.format(selectedDate, "MMMM d, yyyy")
3360
3422
  }),
3361
3423
  "."
3362
3424
  ]
@@ -3387,6 +3449,255 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3387
3449
  });
3388
3450
  }
3389
3451
  //#endregion
3452
+ //#region ../../subscriptions/ui/src/components/edit-bill-date-dialog.tsx
3453
+ function advanceByInterval(date, interval, unit) {
3454
+ const step = Math.max(1, interval);
3455
+ switch (unit.toLowerCase()) {
3456
+ case "day": return require_isAfter.addDays(date, step);
3457
+ case "week": return addWeeks(date, step);
3458
+ case "year": return addYears(date, step);
3459
+ default: return require_isAfter.addMonths(date, step);
3460
+ }
3461
+ }
3462
+ const SUBSCRIPTION_COLORS = [
3463
+ "#3b82f6",
3464
+ "#f97316",
3465
+ "#10b981",
3466
+ "#a855f7",
3467
+ "#ec4899",
3468
+ "#eab308",
3469
+ "#14b8a6",
3470
+ "#ef4444",
3471
+ "#0ea5e9",
3472
+ "#84cc16"
3473
+ ];
3474
+ const MAX_PROJECTIONS_PER_SUB = 104;
3475
+ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, currentNextBillDate, otherSubscriptions, onNavigateToSubscription, title = "Edit bill date", description = "Select a new date for your next bill.", actionText = "Save" }) {
3476
+ const [selectedDate, setSelectedDate] = (0, react.useState)(void 0);
3477
+ const [calendarOpen, setCalendarOpen] = (0, react.useState)(false);
3478
+ const today = /* @__PURE__ */ new Date();
3479
+ today.setHours(0, 0, 0, 0);
3480
+ const minDate = require_isAfter.addDays(today, 1);
3481
+ const subscriptionsWithColor = (0, react.useMemo)(() => (otherSubscriptions ?? []).map((sub, idx) => ({
3482
+ ...sub,
3483
+ color: SUBSCRIPTION_COLORS[idx % SUBSCRIPTION_COLORS.length]
3484
+ })), [otherSubscriptions]);
3485
+ const billingColorsByDate = (0, react.useMemo)(() => {
3486
+ const m = /* @__PURE__ */ new Map();
3487
+ const horizon = addYears(/* @__PURE__ */ new Date(), 2);
3488
+ for (const sub of subscriptionsWithColor) {
3489
+ if (!sub.nextBillDate) continue;
3490
+ let d = parseIsoDate(sub.nextBillDate);
3491
+ let count = 0;
3492
+ while (!require_isAfter.isAfter(d, horizon) && count < MAX_PROJECTIONS_PER_SUB) {
3493
+ const key = require_isAfter.format(d, "yyyy-MM-dd");
3494
+ const arr = m.get(key) ?? [];
3495
+ arr.push(sub.color);
3496
+ m.set(key, arr);
3497
+ d = advanceByInterval(d, sub.billingInterval, sub.billingIntervalUnit);
3498
+ count++;
3499
+ }
3500
+ }
3501
+ return m;
3502
+ }, [subscriptionsWithColor]);
3503
+ const calendarComponents = (0, react.useMemo)(() => ({
3504
+ DayContent: ({ date }) => {
3505
+ const key = require_isAfter.format(date, "yyyy-MM-dd");
3506
+ const colors = billingColorsByDate.get(key) ?? [];
3507
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3508
+ className: "flex h-full w-full flex-col items-center justify-center",
3509
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3510
+ className: "leading-none",
3511
+ children: date.getDate()
3512
+ }), colors.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3513
+ className: "mt-0.5 flex items-center justify-center gap-0.5",
3514
+ children: colors.map((c, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3515
+ className: "h-1 w-1 rounded-[1px]",
3516
+ style: { backgroundColor: c }
3517
+ }, `${key}-${i}`))
3518
+ })]
3519
+ });
3520
+ },
3521
+ IconLeft: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeft, {
3522
+ className: require_src.cn("h-4 w-4", iconClassName),
3523
+ ...iconProps
3524
+ }),
3525
+ IconRight: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, {
3526
+ className: require_src.cn("h-4 w-4", iconClassName),
3527
+ ...iconProps
3528
+ })
3529
+ }), [billingColorsByDate]);
3530
+ (0, react.useEffect)(() => {
3531
+ if (!open) return;
3532
+ if (currentNextBillDate) {
3533
+ const initial = parseIsoDate(currentNextBillDate);
3534
+ setSelectedDate(initial < minDate ? minDate : initial);
3535
+ } else setSelectedDate(void 0);
3536
+ }, [open, currentNextBillDate]);
3537
+ const handleConfirm = () => {
3538
+ if (!selectedDate) return;
3539
+ onConfirm(require_isAfter.format(selectedDate, "yyyy-MM-dd"));
3540
+ };
3541
+ const handleDismiss = (next) => {
3542
+ if (!next) setSelectedDate(void 0);
3543
+ onOpenChange(next);
3544
+ };
3545
+ const previewDate = selectedDate ? require_isAfter.format(selectedDate, "MMMM d, yyyy") : currentNextBillDate ? require_isAfter.format(parseIsoDate(currentNextBillDate), "MMMM d, yyyy") : "a future date";
3546
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Dialog, {
3547
+ open,
3548
+ onOpenChange: handleDismiss,
3549
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.DialogContent, {
3550
+ "aria-describedby": "edit-bill-date-dialog-description",
3551
+ className: "rounded",
3552
+ children: [
3553
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogHeader, {
3554
+ className: "flex flex-row justify-between",
3555
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogTitle, {
3556
+ className: "text-md w-full text-left font-medium",
3557
+ children: title
3558
+ })
3559
+ }),
3560
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3561
+ className: "space-y-4",
3562
+ children: [
3563
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3564
+ id: "edit-bill-date-dialog-description",
3565
+ className: "text-muted-foreground text-sm",
3566
+ children: description
3567
+ }),
3568
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3569
+ className: "space-y-2",
3570
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Label, {
3571
+ className: "text-foreground text-sm font-semibold",
3572
+ children: "Next bill date"
3573
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Popover, {
3574
+ open: calendarOpen,
3575
+ onOpenChange: setCalendarOpen,
3576
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.PopoverTrigger, {
3577
+ asChild: true,
3578
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3579
+ variant: "outline",
3580
+ className: require_src.cn("border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground h-9 w-full justify-start border px-3 py-2 text-left font-normal", !selectedDate && "text-muted-foreground hover:text-muted-foreground"),
3581
+ children: [selectedDate ? require_isAfter.format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3582
+ })
3583
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.PopoverContent, {
3584
+ className: "bg-popover z-[9999] w-auto rounded-md border p-0 shadow-lg",
3585
+ align: "start",
3586
+ sideOffset: 4,
3587
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Calendar, {
3588
+ mode: "single",
3589
+ selected: selectedDate,
3590
+ onSelect: (date) => {
3591
+ setSelectedDate(date);
3592
+ setCalendarOpen(false);
3593
+ },
3594
+ disabled: (date) => date < minDate,
3595
+ defaultMonth: selectedDate ?? (currentNextBillDate ? parseIsoDate(currentNextBillDate) : void 0),
3596
+ components: calendarComponents,
3597
+ initialFocus: true
3598
+ })
3599
+ })]
3600
+ })]
3601
+ }),
3602
+ selectedDate && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3603
+ className: "text-muted-foreground text-xs",
3604
+ children: [
3605
+ "Your next bill will be on",
3606
+ " ",
3607
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3608
+ className: "font-semibold",
3609
+ children: previewDate
3610
+ }),
3611
+ "."
3612
+ ]
3613
+ }),
3614
+ subscriptionsWithColor.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3615
+ className: "space-y-2",
3616
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Label, {
3617
+ className: "text-foreground text-sm font-semibold",
3618
+ children: "Your other subscriptions"
3619
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3620
+ className: "border-border max-h-40 overflow-auto rounded-md border",
3621
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
3622
+ className: "w-full text-sm",
3623
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
3624
+ className: "bg-muted text-muted-foreground sticky top-0",
3625
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
3626
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3627
+ className: "w-6 px-2 py-2",
3628
+ "aria-label": "Color"
3629
+ }),
3630
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3631
+ className: "px-3 py-2 text-left font-medium",
3632
+ children: "Product"
3633
+ }),
3634
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3635
+ className: "px-3 py-2 text-left font-medium",
3636
+ children: "Bill Date"
3637
+ })
3638
+ ] })
3639
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
3640
+ className: "divide-border divide-y",
3641
+ children: subscriptionsWithColor.map((sub) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
3642
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3643
+ className: "px-2 py-2",
3644
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3645
+ "aria-hidden": true,
3646
+ className: "inline-block h-2.5 w-2.5 rounded-full",
3647
+ style: { backgroundColor: sub.color }
3648
+ })
3649
+ }),
3650
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3651
+ className: "truncate px-3 py-2",
3652
+ title: sub.productTitle,
3653
+ children: onNavigateToSubscription ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3654
+ type: "button",
3655
+ onClick: () => {
3656
+ onNavigateToSubscription(sub.token);
3657
+ handleDismiss(false);
3658
+ },
3659
+ className: "text-primary truncate text-left hover:underline",
3660
+ children: sub.productTitle
3661
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3662
+ className: "text-foreground",
3663
+ children: sub.productTitle
3664
+ })
3665
+ }),
3666
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3667
+ className: "text-muted-foreground px-3 py-2",
3668
+ children: sub.nextBillDate ? require_isAfter.format(parseIsoDate(sub.nextBillDate), "MMM d, yyyy") : "—"
3669
+ })
3670
+ ] }, sub.token))
3671
+ })]
3672
+ })
3673
+ })]
3674
+ })
3675
+ ]
3676
+ }),
3677
+ errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3678
+ className: "text-destructive text-left text-sm",
3679
+ children: errorMessage
3680
+ }),
3681
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogFooter, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3682
+ className: "flex w-full flex-row justify-between space-x-2",
3683
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3684
+ variant: "outline",
3685
+ className: "h-10 min-w-[70px] rounded p-3",
3686
+ onClick: () => handleDismiss(false),
3687
+ children: "Cancel"
3688
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3689
+ type: "button",
3690
+ className: "h-10 min-w-[70px] rounded p-3",
3691
+ onClick: handleConfirm,
3692
+ disabled: !selectedDate || isLoading,
3693
+ children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "border-primary-foreground h-5 w-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : actionText
3694
+ })]
3695
+ }) })
3696
+ ]
3697
+ })
3698
+ });
3699
+ }
3700
+ //#endregion
3390
3701
  //#region ../../subscriptions/ui/src/components/subscription-detail.tsx
3391
3702
  function SubscriptionDetailSkeleton() {
3392
3703
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3452,7 +3763,7 @@ function SubscriptionDetailSkeleton() {
3452
3763
  })]
3453
3764
  });
3454
3765
  }
3455
- function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuantity = false, onQuantityChange, isUpdatingQuantity = false }) {
3766
+ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBillDate, canEditQuantity = false, onQuantityChange, isUpdatingQuantity = false }) {
3456
3767
  const variant = subscription.variant;
3457
3768
  const product = variant?.product;
3458
3769
  const quantity = displayQuantity ?? subscription.quantity;
@@ -3461,7 +3772,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3461
3772
  const discount = subscription.original_price != null ? subscription.original_price - subscription.price : 0;
3462
3773
  const subtotal = discount > 0 ? formatCurrency(subscription.original_price * quantity) : totalPrice;
3463
3774
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
3464
- className: "bg-muted flex w-full flex-col items-center px-8 lg:col-span-4",
3775
+ className: "bg-muted flex w-full flex-col items-center rounded-lg px-8 lg:col-span-4 lg:self-start",
3465
3776
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3466
3777
  className: "flex w-full max-w-lg flex-col",
3467
3778
  children: [
@@ -3481,17 +3792,27 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3481
3792
  children: "Next Order Date"
3482
3793
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3483
3794
  className: "text-foreground text-2xl font-bold",
3484
- children: getNextBillDisplay(subscription)
3795
+ children: getNextBillDisplay(displayNextBillDate ? {
3796
+ ...subscription,
3797
+ next_bill_date: displayNextBillDate
3798
+ } : subscription)
3485
3799
  })]
3486
3800
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3487
3801
  className: "pl-4",
3488
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3489
- className: "text-muted-foreground mb-1 text-sm",
3490
- children: "Next Bill Amount"
3491
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3492
- className: "text-foreground text-2xl font-bold",
3493
- children: formatCurrency(subscription.price * quantity)
3494
- })]
3802
+ children: [
3803
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3804
+ className: "text-muted-foreground mb-1 text-sm",
3805
+ children: "Next Bill Amount"
3806
+ }),
3807
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3808
+ className: "text-foreground text-2xl font-bold",
3809
+ children: formatCurrency(subscription.price * quantity)
3810
+ }),
3811
+ (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3812
+ className: "text-muted-foreground mt-1 text-xs",
3813
+ children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
3814
+ })
3815
+ ]
3495
3816
  })]
3496
3817
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: "border-border mt-4" })]
3497
3818
  })]
@@ -3604,7 +3925,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3604
3925
  })
3605
3926
  });
3606
3927
  }
3607
- function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, renderPaymentMethod }) {
3928
+ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, onEditBillDate, displayNextBillDate, renderPaymentMethod, renderShippingAddress }) {
3608
3929
  const plan = subscription.subscription_plan;
3609
3930
  const quantity = subscription.quantity;
3610
3931
  const totalPrice = formatCurrency(subscription.price * quantity);
@@ -3636,22 +3957,22 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3636
3957
  }),
3637
3958
  isActive && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3638
3959
  variant: "outline",
3639
- onClick: onPause,
3960
+ onClick: onEditBillDate,
3640
3961
  disabled: isMutating,
3641
3962
  className: actionButtonClass,
3642
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pause, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3963
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarDays, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3643
3964
  className: "truncate",
3644
- children: "Pause Subscription"
3965
+ children: "Edit Bill Date"
3645
3966
  })]
3646
3967
  }),
3647
- isPaused && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3968
+ isActive && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3648
3969
  variant: "outline",
3649
- onClick: onResume,
3970
+ onClick: onPause,
3650
3971
  disabled: isMutating,
3651
3972
  className: actionButtonClass,
3652
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Play, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3973
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pause, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3653
3974
  className: "truncate",
3654
- children: "Resume Subscription"
3975
+ children: "Pause Subscription"
3655
3976
  })]
3656
3977
  }),
3657
3978
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
@@ -3661,7 +3982,17 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3661
3982
  className: actionButtonClass,
3662
3983
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XCircle, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3663
3984
  className: "truncate",
3664
- children: isCancelled ? "Cancelled" : "Cancel Subscription"
3985
+ children: isCancelled ? "Cancelled Subscription" : "Cancel Subscription"
3986
+ })]
3987
+ }),
3988
+ isPaused && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3989
+ variant: "outline",
3990
+ onClick: onResume,
3991
+ disabled: isMutating,
3992
+ className: actionButtonClass,
3993
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Play, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3994
+ className: "truncate",
3995
+ children: "Resume Subscription"
3665
3996
  })]
3666
3997
  }),
3667
3998
  isCancelled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
@@ -3703,13 +4034,20 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3703
4034
  }),
3704
4035
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3705
4036
  className: "flex-1 px-4",
3706
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3707
- className: "text-muted-foreground text-sm",
3708
- children: "Next Payment"
3709
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3710
- className: "text-foreground font-medium",
3711
- children: totalPrice
3712
- })]
4037
+ children: [
4038
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4039
+ className: "text-muted-foreground text-sm",
4040
+ children: "Next Payment"
4041
+ }),
4042
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4043
+ className: "text-foreground font-medium",
4044
+ children: totalPrice
4045
+ }),
4046
+ (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4047
+ className: "text-muted-foreground text-xs",
4048
+ children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
4049
+ })
4050
+ ]
3713
4051
  }),
3714
4052
  subscription.last_bill_date && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3715
4053
  className: "flex-1 pl-4 text-right",
@@ -3731,7 +4069,12 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3731
4069
  children: "Payment & Shipping"
3732
4070
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3733
4071
  className: "flex flex-col",
3734
- children: [subscription.address && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4072
+ children: [renderShippingAddress ? renderShippingAddress({
4073
+ address: subscription.address ?? null,
4074
+ subscriptionToken: subscription.subscription_token,
4075
+ customerId: subscription.customer?.id ?? 0,
4076
+ countryCode: subscription.address?.country_code ?? "US"
4077
+ }) : subscription.address && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3735
4078
  className: "border-border mb-6 border-b pb-4",
3736
4079
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3737
4080
  className: "text-muted-foreground mt-3 mb-1 text-sm",
@@ -3755,7 +4098,9 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3755
4098
  })]
3756
4099
  }), paymentMethod && (renderPaymentMethod ? renderPaymentMethod({
3757
4100
  paymentMethod,
3758
- subscriptionToken: subscription.subscription_token
4101
+ subscriptionToken: subscription.subscription_token,
4102
+ customerId: subscription.customer?.id ?? 0,
4103
+ countryCode: subscription.address?.country_code ?? "US"
3759
4104
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3760
4105
  className: "border-border mb-6 border-b pb-4",
3761
4106
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -3774,71 +4119,87 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3774
4119
  })]
3775
4120
  }))]
3776
4121
  })]
3777
- }),
3778
- subscription.orders.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3779
- className: "border-border mb-4 border-b pb-4",
3780
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3781
- className: "text-foreground mb-3 text-sm/6 font-semibold",
3782
- children: "Order History"
3783
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3784
- className: "overflow-x-auto",
3785
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
3786
- className: "divide-border min-w-full divide-y text-sm",
3787
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
3788
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3789
- className: "text-muted-foreground py-2 pr-3 text-left font-medium",
3790
- children: "Order"
3791
- }),
3792
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3793
- className: "text-muted-foreground px-3 py-2 text-left font-medium",
3794
- children: "Date"
3795
- }),
3796
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3797
- className: "text-muted-foreground px-3 py-2 text-left font-medium",
3798
- children: "Status"
3799
- }),
3800
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
3801
- className: "text-muted-foreground py-2 pl-3 text-right font-medium",
3802
- children: "Amount"
3803
- })
3804
- ] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
3805
- className: "divide-border divide-y",
3806
- children: subscription.orders.map((order) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
3807
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3808
- className: "text-foreground py-2 pr-3 font-medium",
3809
- children: order.order_number ?? `#${order.id}`
3810
- }),
3811
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3812
- className: "text-muted-foreground px-3 py-2",
3813
- children: formatDate(order.created_at.split("T")[0] ?? "")
3814
- }),
3815
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3816
- className: "px-3 py-2",
3817
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusPill, {
3818
- status: order.status,
3819
- children: startCase(order.status)
3820
- })
3821
- }),
3822
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
3823
- className: "text-foreground py-2 pl-3 text-right",
3824
- children: order.amount != null ? formatCurrency(Number(order.amount)) : "N/A"
3825
- })
3826
- ] }, order.id))
3827
- })]
3828
- })
3829
- })]
3830
4122
  })
3831
4123
  ]
3832
4124
  })
3833
4125
  });
3834
4126
  }
3835
- function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod }) {
4127
+ function OrderHistorySection({ subscription }) {
4128
+ if (subscription.orders.length === 0) return null;
4129
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
4130
+ className: "mt-6 px-8 pt-6 pb-8",
4131
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
4132
+ className: "text-foreground mb-3 text-sm/6 font-semibold",
4133
+ children: "Subscription Order History"
4134
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4135
+ className: "border-border overflow-x-auto rounded-md border",
4136
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
4137
+ className: "divide-border min-w-full divide-y text-sm",
4138
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
4139
+ className: "bg-muted",
4140
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
4141
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
4142
+ className: "text-muted-foreground py-2 pr-3 pl-3 text-left font-medium",
4143
+ children: "Order"
4144
+ }),
4145
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
4146
+ className: "text-muted-foreground px-3 py-2 text-left font-medium",
4147
+ children: "Date"
4148
+ }),
4149
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
4150
+ className: "text-muted-foreground px-3 py-2 text-left font-medium",
4151
+ children: "Status"
4152
+ }),
4153
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
4154
+ className: "text-muted-foreground py-2 pr-3 pl-3 text-right font-medium",
4155
+ children: "Amount"
4156
+ })
4157
+ ] })
4158
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
4159
+ className: "divide-border divide-y",
4160
+ children: subscription.orders.map((order) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
4161
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
4162
+ className: "text-foreground py-2 pr-3 pl-3 font-medium",
4163
+ children: order.order_number ?? `#${order.id}`
4164
+ }),
4165
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
4166
+ className: "text-muted-foreground px-3 py-2",
4167
+ children: formatDate(order.created_at.split("T")[0] ?? "")
4168
+ }),
4169
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
4170
+ className: "px-3 py-2",
4171
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusPill, {
4172
+ status: order.status,
4173
+ children: startCase(order.status)
4174
+ })
4175
+ }),
4176
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
4177
+ className: "text-foreground py-2 pr-3 pl-3 text-right",
4178
+ children: order.amount != null ? formatCurrency(Number(order.amount)) : "N/A"
4179
+ })
4180
+ ] }, order.id))
4181
+ })]
4182
+ })
4183
+ })]
4184
+ });
4185
+ }
4186
+ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, onNavigateToSubscription, renderPaymentMethod, renderShippingAddress }) {
3836
4187
  const [showCancelModal, setShowCancelModal] = (0, react.useState)(false);
3837
4188
  const [showPauseModal, setShowPauseModal] = (0, react.useState)(false);
3838
4189
  const [showResumeModal, setShowResumeModal] = (0, react.useState)(false);
4190
+ const [showEditBillDateModal, setShowEditBillDateModal] = (0, react.useState)(false);
4191
+ const [pendingNextBillDate, setPendingNextBillDate] = (0, react.useState)(null);
3839
4192
  const { data, isLoading, error } = useSubscription(token);
3840
4193
  const subscription = data?.subscription;
3841
4194
  const customerId = subscription?.customer?.id ?? 0;
4195
+ const customerSubscriptionsQuery = useSubscriptions({ perPage: 100 }, { enabled: showEditBillDateModal });
4196
+ const otherSubscriptionsForBillDate = (0, react.useMemo)(() => (customerSubscriptionsQuery.data?.subscriptions ?? []).filter((s) => s.subscription_token !== token).map((s) => ({
4197
+ token: s.subscription_token,
4198
+ productTitle: s.variant?.product?.title ?? "Subscription",
4199
+ nextBillDate: s.next_bill_date,
4200
+ billingInterval: s.subscription_plan?.billing_interval ?? 1,
4201
+ billingIntervalUnit: s.subscription_plan?.billing_interval_unit ?? "month"
4202
+ })), [customerSubscriptionsQuery.data, token]);
3842
4203
  const pauseMutation = usePauseSubscription({
3843
4204
  onSuccess: () => onSuccess?.("Subscription paused"),
3844
4205
  onError: (err) => onMutationError?.("Failed to pause subscription", err)
@@ -3873,6 +4234,20 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3873
4234
  onMutationError?.("Failed to update quantity", err);
3874
4235
  }
3875
4236
  });
4237
+ const editBillDateMutation = useUpdateSubscriptionInfo({
4238
+ onSuccess: () => {
4239
+ onSuccess?.("Bill date updated");
4240
+ setShowEditBillDateModal(false);
4241
+ },
4242
+ onError: (err) => {
4243
+ setPendingNextBillDate(null);
4244
+ onMutationError?.("Failed to update bill date", err);
4245
+ }
4246
+ });
4247
+ const serverNextBillDate = data?.subscription.next_bill_date ?? null;
4248
+ (0, react.useEffect)(() => {
4249
+ if (pendingNextBillDate != null && serverNextBillDate != null && serverNextBillDate.startsWith(pendingNextBillDate)) setPendingNextBillDate(null);
4250
+ }, [pendingNextBillDate, serverNextBillDate]);
3876
4251
  const serverQuantity = data?.subscription.quantity;
3877
4252
  (0, react.useEffect)(() => {
3878
4253
  if (pendingQuantity != null && serverQuantity === pendingQuantity) setPendingQuantity(null);
@@ -3920,11 +4295,10 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3920
4295
  const isActive = subscription.status === "active";
3921
4296
  const isPaused = subscription.status === "paused";
3922
4297
  const isCancelled = subscription.status === "cancelled";
3923
- const isMutating = pauseMutation.isPending || resumeMutation.isPending || skipMutation.isPending || cancelMutation.isPending || reactivateMutation.isPending;
4298
+ const isMutating = pauseMutation.isPending || resumeMutation.isPending || skipMutation.isPending || cancelMutation.isPending || reactivateMutation.isPending || editBillDateMutation.isPending;
3924
4299
  const handlePauseConfirm = (selection) => {
3925
4300
  const pauseParams = { customerId };
3926
4301
  if (selection.type === "order_count") pauseParams.numberOfOrders = selection.numberOfOrders;
3927
- else if (selection.type === "specific") pauseParams.nextBillDate = selection.nextBillDate;
3928
4302
  pauseMutation.mutate({
3929
4303
  subscriptionToken: token,
3930
4304
  pauseParams
@@ -3967,6 +4341,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3967
4341
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SubscriptionItemsSection, {
3968
4342
  subscription,
3969
4343
  displayQuantity: pendingQuantity ?? void 0,
4344
+ displayNextBillDate: pendingNextBillDate ?? void 0,
3970
4345
  canEditQuantity: isActive,
3971
4346
  onQuantityChange: handleQuantityChange,
3972
4347
  isUpdatingQuantity: quantityMutation.isPending
@@ -3981,16 +4356,46 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3981
4356
  onResume: () => setShowResumeModal(true),
3982
4357
  onCancel: () => setShowCancelModal(true),
3983
4358
  onReactivate: handleReactivate,
3984
- renderPaymentMethod
4359
+ onEditBillDate: () => setShowEditBillDateModal(true),
4360
+ displayNextBillDate: pendingNextBillDate ?? void 0,
4361
+ renderPaymentMethod,
4362
+ renderShippingAddress
3985
4363
  })]
3986
4364
  }),
3987
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConfirmDialog, {
3988
- title: "Cancel Subscription",
3989
- actionButtonText: "Cancel Subscription",
3990
- description: "Are you sure you want to cancel this subscription? You can reactivate it later.",
4365
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OrderHistorySection, { subscription }),
4366
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CancelSubscriptionDialog, {
3991
4367
  open: showCancelModal,
3992
- setOpen: setShowCancelModal,
3993
- onConfirm: handleCancel
4368
+ onOpenChange: setShowCancelModal,
4369
+ onConfirm: handleCancel,
4370
+ onPauseInstead: (months) => {
4371
+ setShowCancelModal(false);
4372
+ pauseMutation.mutate({
4373
+ subscriptionToken: token,
4374
+ pauseParams: {
4375
+ customerId,
4376
+ nextBillDate: require_isAfter.format(require_isAfter.addMonths(/* @__PURE__ */ new Date(), months), "yyyy-MM-dd")
4377
+ }
4378
+ });
4379
+ }
4380
+ }),
4381
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EditBillDateDialog, {
4382
+ open: showEditBillDateModal,
4383
+ onOpenChange: (next) => {
4384
+ if (!next) editBillDateMutation.reset();
4385
+ setShowEditBillDateModal(next);
4386
+ },
4387
+ onConfirm: (nextBillDate) => {
4388
+ setPendingNextBillDate(nextBillDate);
4389
+ editBillDateMutation.mutate({
4390
+ subscriptionToken: token,
4391
+ body: { next_bill_date: nextBillDate }
4392
+ });
4393
+ },
4394
+ isLoading: editBillDateMutation.isPending,
4395
+ errorMessage: editBillDateMutation.isError ? "Could not update the bill date. Please try a different date." : void 0,
4396
+ currentNextBillDate: subscription.next_bill_date,
4397
+ otherSubscriptions: otherSubscriptionsForBillDate,
4398
+ onNavigateToSubscription
3994
4399
  }),
3995
4400
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PauseSubscriptionDialog, {
3996
4401
  open: showPauseModal,
@@ -4020,7 +4425,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
4020
4425
  }
4021
4426
  //#endregion
4022
4427
  //#region ../../subscriptions/ui/src/screens/SubscriptionDetailScreen.tsx
4023
- function SubscriptionDetailScreen$1({ token, onNavigateToList, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod }) {
4428
+ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNavigateToSubscription, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod, renderShippingAddress }) {
4024
4429
  require_ScreenHeaderContext.useScreenHeaderBreadcrumbs((0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Breadcrumb, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.BreadcrumbList, {
4025
4430
  className: "text-lg",
4026
4431
  children: [
@@ -4047,7 +4452,9 @@ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNotFound, onErr
4047
4452
  onError,
4048
4453
  onSuccess,
4049
4454
  onMutationError,
4050
- renderPaymentMethod
4455
+ onNavigateToSubscription,
4456
+ renderPaymentMethod,
4457
+ renderShippingAddress
4051
4458
  })
4052
4459
  });
4053
4460
  }
@@ -4061,12 +4468,12 @@ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNotFound, onErr
4061
4468
  function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentMethodList, selectedPaymentMethodId, onSelectPaymentMethod, onAddPaymentMethodClick, addPaymentMethodLabel = "+ Add a payment method", showAddButton = true, isLoading = false, isPending = false, className = "" }) {
4062
4469
  const [paymentsValue, setPaymentsValue] = (0, react.useState)("");
4063
4470
  const renderPaymentMethod = (paymentMethod) => {
4064
- const expiry = require_fluid_pay_api_adapter.getCardExpiry(paymentMethod);
4471
+ const expiry = require_AddressAutocompleteInput.getCardExpiry(paymentMethod);
4065
4472
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4066
4473
  className: "flex flex-row items-center space-x-2",
4067
4474
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4068
4475
  className: "flex h-6 w-10 flex-shrink-0 items-center justify-center",
4069
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_pay_api_adapter.PaymentIcon, {
4476
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.PaymentIcon, {
4070
4477
  logoUrl: paymentMethod.details.logo_url,
4071
4478
  brand: paymentMethod.details.card_type,
4072
4479
  alt: paymentMethod.details.card_type ?? "Payment Method"
@@ -4075,7 +4482,7 @@ function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentM
4075
4482
  className: "flex flex-col",
4076
4483
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4077
4484
  className: "text-foreground flex items-center text-sm font-medium capitalize",
4078
- children: require_fluid_pay_api_adapter.getCardDisplayName(paymentMethod)
4485
+ children: require_AddressAutocompleteInput.getCardDisplayName(paymentMethod)
4079
4486
  }), expiry && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4080
4487
  className: "text-muted-foreground text-sm",
4081
4488
  children: expiry
@@ -4128,7 +4535,7 @@ function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentM
4128
4535
  })
4129
4536
  }, `skeleton-${i}`)) }) : paymentMethodList.map((paymentMethod) => {
4130
4537
  const isSelected = selectedPaymentMethodId === paymentMethod.id;
4131
- const expiry = require_fluid_pay_api_adapter.getCardExpiry(paymentMethod);
4538
+ const expiry = require_AddressAutocompleteInput.getCardExpiry(paymentMethod);
4132
4539
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
4133
4540
  type: "button",
4134
4541
  "aria-pressed": isSelected,
@@ -4148,7 +4555,7 @@ function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentM
4148
4555
  }),
4149
4556
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4150
4557
  className: "flex h-6 w-10 flex-shrink-0 items-center justify-center",
4151
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_pay_api_adapter.PaymentIcon, {
4558
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.PaymentIcon, {
4152
4559
  logoUrl: paymentMethod.details.logo_url,
4153
4560
  brand: paymentMethod.details.card_type,
4154
4561
  alt: paymentMethod.details.card_type ?? "Payment Method"
@@ -4158,7 +4565,7 @@ function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentM
4158
4565
  className: "flex flex-col",
4159
4566
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4160
4567
  className: "text-card-foreground flex items-center text-sm font-medium capitalize",
4161
- children: require_fluid_pay_api_adapter.getCardDisplayName(paymentMethod)
4568
+ children: require_AddressAutocompleteInput.getCardDisplayName(paymentMethod)
4162
4569
  }), expiry && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4163
4570
  className: "text-muted-foreground text-sm",
4164
4571
  children: expiry
@@ -4231,14 +4638,14 @@ function subscriptionPaymentMethodToFluidPay(raw) {
4231
4638
  };
4232
4639
  }
4233
4640
  function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentMethod, subscriptionToken, onSuccess, onError }) {
4234
- const payApi = require_pay_api_context.usePayApi();
4641
+ const payApi = require_api_context.usePayApi();
4235
4642
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
4236
- const fluidPayShim = (0, react.useMemo)(() => require_fluid_pay_api_adapter.createFluidPayApiAdapter(payApi), [payApi]);
4643
+ const fluidPayShim = (0, react.useMemo)(() => require_AddressAutocompleteInput.createFluidPayApiAdapter(payApi), [payApi]);
4237
4644
  const [isAddDialogOpen, setIsAddDialogOpen] = (0, react.useState)(false);
4238
4645
  const { data: paymentMethods = [], isLoading: isLoadingMethods } = (0, _tanstack_react_query.useQuery)({
4239
4646
  queryKey: require_query_keys.payKeys.paymentMethods.list(),
4240
4647
  queryFn: async () => {
4241
- return (await payApi.fetchPaymentMethods()).payment_methods.map(require_fluid_pay_api_adapter.mapToFluidPayPaymentMethod);
4648
+ return (await payApi.fetchPaymentMethods()).payment_methods.map(require_AddressAutocompleteInput.mapToFluidPayPaymentMethod);
4242
4649
  }
4243
4650
  });
4244
4651
  const countriesApi = require_countries_api_context.useCountriesApi();
@@ -4270,7 +4677,7 @@ function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentM
4270
4677
  },
4271
4678
  onError: (err) => onError?.("Failed to add payment method", err)
4272
4679
  });
4273
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_fluid_pay_api_adapter.FluidPayCoreProvider, {
4680
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AddressAutocompleteInput.FluidPayCoreProvider, {
4274
4681
  api: fluidPayShim,
4275
4682
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectablePaymentMethodDropdown, {
4276
4683
  title: "Payment Method",
@@ -4289,7 +4696,7 @@ function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentM
4289
4696
  body: { payment_method_id: pm.id }
4290
4697
  });
4291
4698
  }
4292
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_pay_api_adapter.CreditCardFormDialog, {
4699
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.CreditCardFormDialog, {
4293
4700
  isOpen: isAddDialogOpen,
4294
4701
  onClose: () => setIsAddDialogOpen(false),
4295
4702
  t,
@@ -4302,28 +4709,19 @@ function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentM
4302
4709
  isSubmitting: addCardMutation.isPending,
4303
4710
  countries: countryOptions,
4304
4711
  jwt: "",
4305
- renderAddressAutocomplete: ({ control }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainAddressInput, {
4712
+ renderAddressAutocomplete: ({ control, setValue, countryCode }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.AddressAutocompleteInput, {
4306
4713
  control,
4307
- name: "address1"
4714
+ setValue,
4715
+ countryIso: countryCode,
4716
+ addressLineField: "address1",
4717
+ cityField: "city",
4718
+ stateField: "state",
4719
+ postalCodeField: "zip",
4720
+ placeholder: t("address_line_1")
4308
4721
  })
4309
4722
  })]
4310
4723
  });
4311
4724
  }
4312
- function PlainAddressInput({ control, name }) {
4313
- const { field } = (0, react_hook_form.useController)({
4314
- control,
4315
- name
4316
- });
4317
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
4318
- type: "text",
4319
- ref: field.ref,
4320
- value: field.value ?? "",
4321
- placeholder: "Address Line 1",
4322
- className: "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
4323
- onChange: field.onChange,
4324
- onBlur: field.onBlur
4325
- });
4326
- }
4327
4725
  //#endregion
4328
4726
  //#region src/screens/SubscriptionDetailScreen.tsx
4329
4727
  function SubscriptionDetailScreen({ token, onToast }) {
@@ -4331,6 +4729,7 @@ function SubscriptionDetailScreen({ token, onToast }) {
4331
4729
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SubscriptionDetailScreen$1, {
4332
4730
  token,
4333
4731
  onNavigateToList: () => navigate("subscriptions"),
4732
+ onNavigateToSubscription: (nextToken) => navigate(`subscriptions/${nextToken}`),
4334
4733
  onNotFound: () => {
4335
4734
  onToast("Subscription not found", "warning");
4336
4735
  navigate("subscriptions");
@@ -4407,4 +4806,4 @@ Object.defineProperty(exports, "subscriptionsScreenPropertySchema", {
4407
4806
  }
4408
4807
  });
4409
4808
 
4410
- //# sourceMappingURL=SubscriptionsScreen-B88_dLfE.cjs.map
4809
+ //# sourceMappingURL=SubscriptionsScreen-Bglm_cfM.cjs.map