@openrails/billing-ui 0.280.0 → 0.281.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/{admin-attempts-CP5CWyNR.js → admin-attempts-DjgBAbx9.js} +71 -72
  2. package/dist/admin-attempts-DjgBAbx9.js.map +1 -0
  3. package/dist/{admin-auth-DlIOmwPo.js → admin-auth-BUUdvmqC.js} +3 -4
  4. package/dist/admin-auth-BUUdvmqC.js.map +1 -0
  5. package/dist/{admin-badge-DR_8AhdC.js → admin-badge-CAlUmS2s.js} +3 -4
  6. package/dist/admin-badge-CAlUmS2s.js.map +1 -0
  7. package/dist/{admin-button-DBzTD6By.js → admin-button-Bn4otsuw.js} +3 -4
  8. package/dist/admin-button-Bn4otsuw.js.map +1 -0
  9. package/dist/{admin-capabilities-CZdT1Pxe.js → admin-capabilities-DS-X-__V.js} +3 -4
  10. package/dist/admin-capabilities-DS-X-__V.js.map +1 -0
  11. package/dist/{admin-card-mZl4-s5d.js → admin-card-BHKW1dfB.js} +3 -4
  12. package/dist/admin-card-BHKW1dfB.js.map +1 -0
  13. package/dist/{admin-catalog-DpTjS0Yo.js → admin-catalog-BdLDhr8R.js} +309 -312
  14. package/dist/admin-catalog-BdLDhr8R.js.map +1 -0
  15. package/dist/{admin-confirm-katGq0Qo.js → admin-confirm-DWq-edDC.js} +2 -3
  16. package/dist/admin-confirm-DWq-edDC.js.map +1 -0
  17. package/dist/{admin-csv-CPoNZj2D.js → admin-csv-CRrmaR6a.js} +2 -3
  18. package/dist/admin-csv-CRrmaR6a.js.map +1 -0
  19. package/dist/{admin-cursor-pager-C-KjCIy9.js → admin-cursor-pager-Qo9Sq6lN.js} +6 -8
  20. package/dist/admin-cursor-pager-Qo9Sq6lN.js.map +1 -0
  21. package/dist/{admin-customers-BE3N839X.js → admin-customers-BZP6Jv-i.js} +21 -22
  22. package/dist/admin-customers-BZP6Jv-i.js.map +1 -0
  23. package/dist/{admin-dashboard-BxjkV15J.js → admin-dashboard-BJSonknv.js} +150 -153
  24. package/dist/admin-dashboard-BJSonknv.js.map +1 -0
  25. package/dist/{admin-data-table-D89AwWz_.js → admin-data-table-BiFmcf0Z.js} +19 -26
  26. package/dist/admin-data-table-BiFmcf0Z.js.map +1 -0
  27. package/dist/admin-detail-C03O0R6e.js +1351 -0
  28. package/dist/{admin-detail-P-UnNvXJ.js.map → admin-detail-C03O0R6e.js.map} +1 -1
  29. package/dist/{admin-detail-Ln56otK0.js → admin-detail-C6VH3i2v.js} +74 -75
  30. package/dist/admin-detail-C6VH3i2v.js.map +1 -0
  31. package/dist/{admin-detail-C8lD7U2t.js → admin-detail-CQws8363.js} +199 -202
  32. package/dist/admin-detail-CQws8363.js.map +1 -0
  33. package/dist/admin-detail-NApy5bio.js +337 -0
  34. package/dist/admin-detail-NApy5bio.js.map +1 -0
  35. package/dist/{admin-detail-D6zD085K.js → admin-detail-cijme9Lc.js} +92 -94
  36. package/dist/admin-detail-cijme9Lc.js.map +1 -0
  37. package/dist/{admin-dialog-Dn2FRJu4.js → admin-dialog-CgYGInHi.js} +4 -5
  38. package/dist/admin-dialog-CgYGInHi.js.map +1 -0
  39. package/dist/{admin-dialog-width-CC7QHT1p.js → admin-dialog-width-C_WFpow0.js} +2 -3
  40. package/dist/admin-dialog-width-C_WFpow0.js.map +1 -0
  41. package/dist/{admin-dom-C7Y7A6Wa.js → admin-dom-BP9QROfy.js} +2 -3
  42. package/dist/admin-dom-BP9QROfy.js.map +1 -0
  43. package/dist/{admin-dropdown-menu-DLUn6Uj3.js → admin-dropdown-menu-CU9RxoEJ.js} +3 -4
  44. package/dist/admin-dropdown-menu-CU9RxoEJ.js.map +1 -0
  45. package/dist/{admin-dunning-COaHzrmN.js → admin-dunning-D8lAP7OA.js} +3 -4
  46. package/dist/admin-dunning-D8lAP7OA.js.map +1 -0
  47. package/dist/{admin-fact-card-DKvBnUXB.js → admin-fact-card-lN-MsuSp.js} +3 -4
  48. package/dist/admin-fact-card-lN-MsuSp.js.map +1 -0
  49. package/dist/{admin-form-field-errors-hbUMIriS.js → admin-form-field-errors-Cuhy38F1.js} +2 -3
  50. package/dist/admin-form-field-errors-Cuhy38F1.js.map +1 -0
  51. package/dist/{admin-format-BbiTCqUG.js → admin-format-D9Ablh0P.js} +3 -5
  52. package/dist/admin-format-D9Ablh0P.js.map +1 -0
  53. package/dist/{admin-health-DmnI4e8K.js → admin-health-CnagC763.js} +91 -93
  54. package/dist/admin-health-CnagC763.js.map +1 -0
  55. package/dist/{admin-imports-C0aMP6sj.js → admin-imports-SM_fKKgW.js} +92 -93
  56. package/dist/admin-imports-SM_fKKgW.js.map +1 -0
  57. package/dist/{admin-input-JKrQIGfD.js → admin-input-B_EUzCAE.js} +3 -4
  58. package/dist/admin-input-B_EUzCAE.js.map +1 -0
  59. package/dist/{admin-invoice-profile-model-Cgjy3zV8.js → admin-invoice-profile-model-CNsvK89v.js} +2 -3
  60. package/dist/admin-invoice-profile-model-CNsvK89v.js.map +1 -0
  61. package/dist/{admin-label-CHWsVIZC.js → admin-label-DQsOkp1p.js} +3 -4
  62. package/dist/admin-label-DQsOkp1p.js.map +1 -0
  63. package/dist/{admin-linked-table-row-BMZYYsuk.js → admin-linked-table-row-BFsgc9tz.js} +5 -6
  64. package/dist/admin-linked-table-row-BFsgc9tz.js.map +1 -0
  65. package/dist/{admin-map-dialog-BHUGdCcv.js → admin-map-dialog-Dt3gTuTD.js} +26 -27
  66. package/dist/admin-map-dialog-Dt3gTuTD.js.map +1 -0
  67. package/dist/{admin-mapping-csv-FtkyTBmk.js → admin-mapping-csv-DzpB9HQn.js} +1 -2
  68. package/dist/admin-mapping-csv-DzpB9HQn.js.map +1 -0
  69. package/dist/admin-metering-DM4KhjOq.js +1717 -0
  70. package/dist/admin-metering-DM4KhjOq.js.map +1 -0
  71. package/dist/{admin-missing-record-BPFs3MmO.js → admin-missing-record-G2Jz-VUn.js} +3 -4
  72. package/dist/admin-missing-record-G2Jz-VUn.js.map +1 -0
  73. package/dist/{admin-ops-CL2kjDwi.js → admin-ops-mwzj-jpg.js} +99 -100
  74. package/dist/admin-ops-mwzj-jpg.js.map +1 -0
  75. package/dist/{admin-orders-C1Sf2qhc.js → admin-orders-D_aqV66h.js} +41 -42
  76. package/dist/admin-orders-D_aqV66h.js.map +1 -0
  77. package/dist/{admin-parked-a0tB5bhG.js → admin-parked-2FjIfyMg.js} +47 -48
  78. package/dist/admin-parked-2FjIfyMg.js.map +1 -0
  79. package/dist/{admin-payments-DJcjwRA4.js → admin-payments-B4hh31PR.js} +36 -37
  80. package/dist/admin-payments-B4hh31PR.js.map +1 -0
  81. package/dist/{admin-price-detail-BOmeWw15.js → admin-price-detail--5Bovz20.js} +88 -90
  82. package/dist/admin-price-detail--5Bovz20.js.map +1 -0
  83. package/dist/{admin-price-format-CqOmHrIn.js → admin-price-format-C-pus9FL.js} +4 -6
  84. package/dist/admin-price-format-C-pus9FL.js.map +1 -0
  85. package/dist/admin-price-wizard-Cj_Bgh-V.js +354 -0
  86. package/dist/admin-price-wizard-Cj_Bgh-V.js.map +1 -0
  87. package/dist/{admin-proposals-DVrl-ym4.js → admin-proposals-DPRFoWel.js} +114 -116
  88. package/dist/admin-proposals-DPRFoWel.js.map +1 -0
  89. package/dist/{admin-provider-prices-BVVogH7Q.js → admin-provider-prices-B8Oc86dP.js} +74 -75
  90. package/dist/admin-provider-prices-B8Oc86dP.js.map +1 -0
  91. package/dist/{admin-range-picker-C6BtSm2B.js → admin-range-picker-CSWcCYkg.js} +8 -11
  92. package/dist/admin-range-picker-CSWcCYkg.js.map +1 -0
  93. package/dist/admin-records-CWbfqyT8.js +390 -0
  94. package/dist/admin-records-CWbfqyT8.js.map +1 -0
  95. package/dist/{admin-reports-CtPoiceH.js → admin-reports-CAHWO_d6.js} +59 -60
  96. package/dist/admin-reports-CAHWO_d6.js.map +1 -0
  97. package/dist/{admin-select-6Yuh5M1Q.js → admin-select-DSGCZFiZ.js} +3 -4
  98. package/dist/admin-select-DSGCZFiZ.js.map +1 -0
  99. package/dist/{admin-settings-DscHu4ww.js → admin-settings-BrvNTJlM.js} +640 -645
  100. package/dist/admin-settings-BrvNTJlM.js.map +1 -0
  101. package/dist/{admin-shared-BywM-MMp.js → admin-shared-DdN2hyaR.js} +23 -25
  102. package/dist/admin-shared-DdN2hyaR.js.map +1 -0
  103. package/dist/{admin-skeleton-lndmw89u.js → admin-skeleton-DOfsDIu0.js} +3 -4
  104. package/dist/admin-skeleton-DOfsDIu0.js.map +1 -0
  105. package/dist/{admin-status-badge-IL8ofZ_6.js → admin-status-badge-BLEGt2Fw.js} +6 -7
  106. package/dist/{admin-status-badge-IL8ofZ_6.js.map → admin-status-badge-BLEGt2Fw.js.map} +1 -1
  107. package/dist/{admin-subscriptions-Cd5CGrue.js → admin-subscriptions-PL5G3f0O.js} +38 -39
  108. package/dist/admin-subscriptions-PL5G3f0O.js.map +1 -0
  109. package/dist/{admin-switch-DpwQSzEm.js → admin-switch-aOiQQzST.js} +3 -4
  110. package/dist/admin-switch-aOiQQzST.js.map +1 -0
  111. package/dist/{admin-table-D-GdGM1m.js → admin-table-DIKl2rpV.js} +3 -4
  112. package/dist/admin-table-DIKl2rpV.js.map +1 -0
  113. package/dist/{admin-tabs-B--1flzO.js → admin-tabs-DR74xX0-.js} +8 -10
  114. package/dist/admin-tabs-DR74xX0-.js.map +1 -0
  115. package/dist/{admin-textarea-xsp5V9xM.js → admin-textarea-W52-l_0n.js} +3 -4
  116. package/dist/admin-textarea-W52-l_0n.js.map +1 -0
  117. package/dist/{admin-tile-grids-CzGpidd9.js → admin-tile-grids-Gc67MtA6.js} +2 -3
  118. package/dist/admin-tile-grids-Gc67MtA6.js.map +1 -0
  119. package/dist/{admin-typed-confirm-dialog-NiEDwX_0.js → admin-typed-confirm-dialog-B_00EHlT.js} +13 -14
  120. package/dist/admin-typed-confirm-dialog-B_00EHlT.js.map +1 -0
  121. package/dist/{admin-utils-wuPUD0uh.js → admin-utils-CX097OR7.js} +23 -47
  122. package/dist/{admin-utils-wuPUD0uh.js.map → admin-utils-CX097OR7.js.map} +1 -1
  123. package/dist/{admin-widget-viz-kHHVmDEx.js → admin-widget-viz-DVV9aTQp.js} +21 -24
  124. package/dist/admin-widget-viz-DVV9aTQp.js.map +1 -0
  125. package/dist/admin.js +60 -84
  126. package/dist/admin.js.map +1 -1
  127. package/dist/client/generated/wire.d.ts +1 -0
  128. package/dist/{client-ctrbivyN.js → client-DwsFGm4M.js} +6 -11
  129. package/dist/client-DwsFGm4M.js.map +1 -0
  130. package/dist/client.js +1 -2
  131. package/dist/{create-card-BEILS1VB-DeyyfyFD.js → create-card-BEILS1VB-B1MQg0iK.js} +3 -4
  132. package/dist/create-card-BEILS1VB-B1MQg0iK.js.map +1 -0
  133. package/dist/{create-card-display-Dv5pcpzc-BWB6vzo2.js → create-card-display-Dv5pcpzc-DotrmqWH.js} +5 -9
  134. package/dist/create-card-display-Dv5pcpzc-DotrmqWH.js.map +1 -0
  135. package/dist/{create-copy-button-CAYmfugS-qNapojfj.js → create-copy-button-CAYmfugS-CAgco7FO.js} +3 -4
  136. package/dist/create-copy-button-CAYmfugS-CAgco7FO.js.map +1 -0
  137. package/dist/{dist-CslWupfi.js → dist-BPWQ2tCx.js} +6 -7
  138. package/dist/dist-BPWQ2tCx.js.map +1 -0
  139. package/dist/{hooks-KpTetx6F.js → hooks-C-MhXjQh.js} +13 -22
  140. package/dist/hooks-C-MhXjQh.js.map +1 -0
  141. package/dist/{index-rGw83t5v-BE6naeQR.js → index-rGw83t5v-ydBZxXI_.js} +10 -24
  142. package/dist/index-rGw83t5v-ydBZxXI_.js.map +1 -0
  143. package/dist/index.js +67 -124
  144. package/dist/index.js.map +1 -1
  145. package/dist/locales/de.js +1 -2
  146. package/dist/locales/de.js.map +1 -1
  147. package/dist/locales/en.js +1 -2
  148. package/dist/locales/en.js.map +1 -1
  149. package/dist/locales/es.js +1 -2
  150. package/dist/locales/es.js.map +1 -1
  151. package/dist/locales/ja.js +1 -2
  152. package/dist/locales/ja.js.map +1 -1
  153. package/dist/locales/ko.js +1 -2
  154. package/dist/locales/ko.js.map +1 -1
  155. package/dist/locales/zh.js +1 -2
  156. package/dist/locales/zh.js.map +1 -1
  157. package/dist/react.js +1 -2
  158. package/package.json +2 -2
  159. package/dist/admin-attempts-CP5CWyNR.js.map +0 -1
  160. package/dist/admin-auth-DlIOmwPo.js.map +0 -1
  161. package/dist/admin-badge-DR_8AhdC.js.map +0 -1
  162. package/dist/admin-button-DBzTD6By.js.map +0 -1
  163. package/dist/admin-capabilities-CZdT1Pxe.js.map +0 -1
  164. package/dist/admin-card-mZl4-s5d.js.map +0 -1
  165. package/dist/admin-catalog-DpTjS0Yo.js.map +0 -1
  166. package/dist/admin-confirm-katGq0Qo.js.map +0 -1
  167. package/dist/admin-csv-CPoNZj2D.js.map +0 -1
  168. package/dist/admin-cursor-pager-C-KjCIy9.js.map +0 -1
  169. package/dist/admin-customers-BE3N839X.js.map +0 -1
  170. package/dist/admin-dashboard-BxjkV15J.js.map +0 -1
  171. package/dist/admin-data-table-D89AwWz_.js.map +0 -1
  172. package/dist/admin-detail-BKe9xqPd.js +0 -338
  173. package/dist/admin-detail-BKe9xqPd.js.map +0 -1
  174. package/dist/admin-detail-C8lD7U2t.js.map +0 -1
  175. package/dist/admin-detail-D6zD085K.js.map +0 -1
  176. package/dist/admin-detail-Ln56otK0.js.map +0 -1
  177. package/dist/admin-detail-P-UnNvXJ.js +0 -1357
  178. package/dist/admin-dialog-Dn2FRJu4.js.map +0 -1
  179. package/dist/admin-dialog-width-CC7QHT1p.js.map +0 -1
  180. package/dist/admin-dom-C7Y7A6Wa.js.map +0 -1
  181. package/dist/admin-dropdown-menu-DLUn6Uj3.js.map +0 -1
  182. package/dist/admin-dunning-COaHzrmN.js.map +0 -1
  183. package/dist/admin-fact-card-DKvBnUXB.js.map +0 -1
  184. package/dist/admin-form-field-errors-hbUMIriS.js.map +0 -1
  185. package/dist/admin-format-BbiTCqUG.js.map +0 -1
  186. package/dist/admin-health-DmnI4e8K.js.map +0 -1
  187. package/dist/admin-imports-C0aMP6sj.js.map +0 -1
  188. package/dist/admin-input-JKrQIGfD.js.map +0 -1
  189. package/dist/admin-invoice-profile-model-Cgjy3zV8.js.map +0 -1
  190. package/dist/admin-label-CHWsVIZC.js.map +0 -1
  191. package/dist/admin-linked-table-row-BMZYYsuk.js.map +0 -1
  192. package/dist/admin-map-dialog-BHUGdCcv.js.map +0 -1
  193. package/dist/admin-mapping-csv-FtkyTBmk.js.map +0 -1
  194. package/dist/admin-metering-CDqueHUh.js +0 -1721
  195. package/dist/admin-metering-CDqueHUh.js.map +0 -1
  196. package/dist/admin-missing-record-BPFs3MmO.js.map +0 -1
  197. package/dist/admin-ops-CL2kjDwi.js.map +0 -1
  198. package/dist/admin-orders-C1Sf2qhc.js.map +0 -1
  199. package/dist/admin-parked-a0tB5bhG.js.map +0 -1
  200. package/dist/admin-payments-DJcjwRA4.js.map +0 -1
  201. package/dist/admin-price-detail-BOmeWw15.js.map +0 -1
  202. package/dist/admin-price-format-CqOmHrIn.js.map +0 -1
  203. package/dist/admin-price-wizard-B6s5OJeO.js +0 -356
  204. package/dist/admin-price-wizard-B6s5OJeO.js.map +0 -1
  205. package/dist/admin-proposals-DVrl-ym4.js.map +0 -1
  206. package/dist/admin-provider-prices-BVVogH7Q.js.map +0 -1
  207. package/dist/admin-range-picker-C6BtSm2B.js.map +0 -1
  208. package/dist/admin-records-DKtcgN11.js +0 -391
  209. package/dist/admin-records-DKtcgN11.js.map +0 -1
  210. package/dist/admin-reports-CtPoiceH.js.map +0 -1
  211. package/dist/admin-select-6Yuh5M1Q.js.map +0 -1
  212. package/dist/admin-settings-DscHu4ww.js.map +0 -1
  213. package/dist/admin-shared-BywM-MMp.js.map +0 -1
  214. package/dist/admin-skeleton-lndmw89u.js.map +0 -1
  215. package/dist/admin-subscriptions-Cd5CGrue.js.map +0 -1
  216. package/dist/admin-switch-DpwQSzEm.js.map +0 -1
  217. package/dist/admin-table-D-GdGM1m.js.map +0 -1
  218. package/dist/admin-tabs-B--1flzO.js.map +0 -1
  219. package/dist/admin-textarea-xsp5V9xM.js.map +0 -1
  220. package/dist/admin-tile-grids-CzGpidd9.js.map +0 -1
  221. package/dist/admin-typed-confirm-dialog-NiEDwX_0.js.map +0 -1
  222. package/dist/admin-widget-viz-kHHVmDEx.js.map +0 -1
  223. package/dist/client-ctrbivyN.js.map +0 -1
  224. package/dist/create-card-BEILS1VB-DeyyfyFD.js.map +0 -1
  225. package/dist/create-card-display-Dv5pcpzc-BWB6vzo2.js.map +0 -1
  226. package/dist/create-copy-button-CAYmfugS-qNapojfj.js.map +0 -1
  227. package/dist/dist-CslWupfi.js.map +0 -1
  228. package/dist/hooks-KpTetx6F.js.map +0 -1
  229. package/dist/index-rGw83t5v-BE6naeQR.js.map +0 -1
package/dist/admin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","names":[],"sources":["../src/appearance.ts","../src/admin/routes.tsx","../src/admin/hooks/use-mobile.ts","../src/admin/components/ui/separator.tsx","../src/admin/components/ui/sheet.tsx","../src/admin/components/ui/tooltip.tsx","../src/admin/components/ui/sidebar.tsx","../src/admin/navigation.tsx","../src/admin/components/app-sidebar.tsx","../src/admin/components/no-access.tsx","../src/admin/components/no-merchants.tsx","../src/admin/components/notification-bell.tsx","../src/admin/components/ui/breadcrumb.tsx","../src/admin/components/site-header.tsx","../src/admin/layouts/app-layout.tsx","../src/admin/components/ui/alert-dialog.tsx","../src/admin/components/confirm.tsx","../src/admin/components/ui/sonner.tsx","../src/admin/lib/chunk-error.ts","../src/admin/components/route-error.tsx","../src/admin/lib/query-client.ts","../src/admin/theme.ts","../src/admin/billing-admin.tsx","../src/admin/summary.tsx","../src/admin/console.tsx","../src/admin/messages.ts"],"sourcesContent":["// Integrator theming. The component scopes the standard shadcn token set\n// under its root, so `theme` flips the whole palette and `variables` override\n// individual tokens without the integrator touching our CSS.\nimport type { CSSProperties } from \"react\"\n\n// `inherit` uses the host page's shadcn tokens (`--background`, ...) and its\n// `.dark` class instead of the bundled zinc palette.\nexport type BillingTheme = \"light\" | \"dark\" | \"auto\" | \"inherit\"\n\n// The tokens integrators may override. Values are raw CSS color/length\n// strings; they land as custom properties on the purchase root.\nexport interface BillingVariables {\n background?: string\n foreground?: string\n card?: string\n mutedForeground?: string\n faintForeground?: string\n border?: string\n input?: string\n primary?: string\n primaryForeground?: string\n destructive?: string\n ring?: string\n radius?: string\n fontFamily?: string\n}\n\nexport interface BillingAppearance {\n theme?: BillingTheme\n variables?: BillingVariables\n}\n\nconst VARIABLE_TO_CSS: Record<keyof BillingVariables, string> = {\n background: \"--background\",\n foreground: \"--foreground\",\n card: \"--card\",\n mutedForeground: \"--muted-foreground\",\n faintForeground: \"--orck-faint\",\n border: \"--border\",\n input: \"--input\",\n primary: \"--primary\",\n primaryForeground: \"--primary-foreground\",\n destructive: \"--destructive\",\n ring: \"--ring\",\n radius: \"--radius\",\n fontFamily: \"--orck-font\",\n}\n\nexport function appearanceStyle(\n appearance: BillingAppearance | undefined,\n namespace: \"orck\" | \"orba\" = \"orck\"\n): CSSProperties | undefined {\n const variables = appearance?.variables\n if (!variables) return undefined\n const style: Record<string, string> = {}\n for (const [key, value] of Object.entries(variables)) {\n if (!value) continue\n style[\n VARIABLE_TO_CSS[key as keyof BillingVariables].replace(\n \"--orck-\",\n `--${namespace}-`\n )\n ] = value\n }\n return style as CSSProperties\n}\n\nexport function appearanceTheme(\n appearance: BillingAppearance | undefined\n): BillingTheme {\n return appearance?.theme ?? \"auto\"\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { lazy, Suspense } from \"react\"\nimport { RouteParams, useLocation } from \"./router\"\n\nconst routes = [\n {\n path: \"/payments/attempts\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.AttemptsPage,\n }))\n ),\n },\n {\n path: \"/catalog/metering\",\n Component: lazy(() =>\n import(\"./pages/catalog/metering\").then((m) => ({\n default: m.CatalogMeteringPage,\n }))\n ),\n },\n {\n path: \"/payments/health\",\n Component: lazy(() =>\n import(\"./pages/payments/health\").then((m) => ({\n default: m.PaymentHealthPage,\n }))\n ),\n },\n {\n path: \"/payments/cycles\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.CyclesPage,\n }))\n ),\n },\n {\n path: \"/catalog/prices\",\n Component: lazy(() =>\n import(\"./pages/catalog\").then((m) => ({ default: m.CatalogPricesPage }))\n ),\n },\n {\n path: \"/subscriptions\",\n Component: lazy(() =>\n import(\"./pages/subscriptions\").then((m) => ({\n default: m.SubscriptionsPage,\n }))\n ),\n },\n {\n path: \"/customers\",\n Component: lazy(() =>\n import(\"./pages/customers\").then((m) => ({ default: m.CustomersPage }))\n ),\n },\n {\n path: \"/payments\",\n Component: lazy(() =>\n import(\"./pages/payments\").then((m) => ({ default: m.PaymentsPage }))\n ),\n },\n {\n path: \"/settings\",\n Component: lazy(() =>\n import(\"./pages/settings\").then((m) => ({ default: m.SettingsPage }))\n ),\n },\n {\n path: \"/reports\",\n Component: lazy(() =>\n import(\"./pages/dashboard/reports\").then((m) => ({\n default: m.ReportsPage,\n }))\n ),\n },\n {\n path: \"/catalog\",\n Component: lazy(() =>\n import(\"./pages/catalog\").then((m) => ({\n default: m.CatalogProductsPage,\n }))\n ),\n },\n {\n path: \"/orders\",\n Component: lazy(() =>\n import(\"./pages/orders\").then((m) => ({ default: m.OrdersPage }))\n ),\n },\n {\n path: \"/ops/imports\",\n Component: lazy(() =>\n import(\"./pages/imports\").then((m) => ({ default: m.ImportsPage }))\n ),\n },\n {\n path: \"/ops/imports/:id\",\n Component: lazy(() =>\n import(\"./pages/imports/detail\").then((m) => ({\n default: m.ImportDetailPage,\n }))\n ),\n },\n {\n path: \"/ops/imports/:id/records\",\n Component: lazy(() =>\n import(\"./pages/imports/records\").then((m) => ({\n default: m.ImportRecordsPage,\n }))\n ),\n },\n {\n path: \"/ops/provider-prices\",\n Component: lazy(() =>\n import(\"./pages/provider-prices\").then((m) => ({\n default: m.ProviderPricesPage,\n }))\n ),\n },\n {\n path: \"/ops/proposals\",\n Component: lazy(() =>\n import(\"./pages/proposals\").then((m) => ({ default: m.ProposalsPage }))\n ),\n },\n {\n path: \"/ops/parked\",\n Component: lazy(() =>\n import(\"./pages/parked\").then((m) => ({ default: m.ParkedPage }))\n ),\n },\n {\n path: \"/ops\",\n Component: lazy(() =>\n import(\"./pages/ops\").then((m) => ({ default: m.OpsPage }))\n ),\n },\n {\n path: \"/\",\n Component: lazy(() =>\n import(\"./pages/dashboard\").then((m) => ({ default: m.DashboardPage }))\n ),\n },\n {\n path: \"/customers/:customerId\",\n Component: lazy(() =>\n import(\"./pages/customers/detail\").then((m) => ({\n default: m.CustomerDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/attempts/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.AttemptDetailPage,\n }))\n ),\n },\n {\n path: \"/catalog/metering/:key\",\n Component: lazy(() =>\n import(\"./pages/catalog/metering\").then((m) => ({\n default: m.MeterDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/cycles/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.CycleDetailPage,\n }))\n ),\n },\n {\n path: \"/catalog/prices/:id\",\n Component: lazy(() =>\n import(\"./pages/catalog/price-detail\").then((m) => ({\n default: m.PriceDetailPage,\n }))\n ),\n },\n {\n path: \"/subscriptions/:id\",\n Component: lazy(() =>\n import(\"./pages/subscriptions/detail\").then((m) => ({\n default: m.SubscriptionDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/detail\").then((m) => ({\n default: m.PaymentDetailPage,\n }))\n ),\n },\n {\n path: \"/orders/:id\",\n Component: lazy(() =>\n import(\"./pages/orders/detail\").then((m) => ({\n default: m.OrderDetailPage,\n }))\n ),\n },\n]\n\nexport function matchAdminRoute(pathname: string) {\n for (const { path, Component } of routes) {\n const actual = pathname.replace(/\\/$/, \"\").split(\"/\")\n const expected = path === \"/\" ? [\"\"] : path.split(\"/\")\n const params: Record<string, string> = {}\n if (actual.length !== expected.length) continue\n if (\n !expected.every((part, i) => {\n if (part.startsWith(\":\")) {\n try {\n params[part.slice(1)] = decodeURIComponent(actual[i])\n return true\n } catch {\n return false\n }\n }\n return part === actual[i]\n })\n )\n continue\n return { Component, params }\n }\n}\nexport function AdminPages() {\n const match = matchAdminRoute(useLocation().pathname)\n if (!match)\n return (\n <p role=\"status\">\n <AdminMessage id={\"This billing page does not exist.\"} />\n </p>\n )\n return (\n <RouteParams params={match.params}>\n <Suspense\n fallback={\n <p role=\"status\">\n <AdminMessage id={\"Loading…\"} />\n </p>\n }\n >\n <match.Component />\n </Suspense>\n </RouteParams>\n )\n}\n","import { useSyncExternalStore } from \"react\"\nconst query = \"(max-width: 767px)\"\nconst subscribe = (notify: () => void) => {\n const media = window.matchMedia(query)\n media.addEventListener(\"change\", notify)\n return () => media.removeEventListener(\"change\", notify)\n}\nexport function useIsMobile() {\n return useSyncExternalStore(\n subscribe,\n () => window.matchMedia(query).matches,\n () => false\n )\n}\n","import { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useAdminContext } from \"#orck/admin/context\"\nimport * as React from \"react\"\nimport { Dialog as SheetPrimitive } from \"@base-ui/react/dialog\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return (\n <SheetPrimitive.Portal\n container={useAdminContext().portal}\n data-slot=\"sheet-portal\"\n {...props}\n />\n )\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: SheetPrimitive.Popup.Props & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n \"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n data-slot=\"sheet-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-3 right-3\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"Close\"} />\n </span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-0.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\n \"font-heading text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","\"use client\"\nimport { useAdminContext } from \"#orck/admin/context\"\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\n\nfunction TooltipProvider({\n delay = 0,\n ...props\n}: TooltipPrimitive.Provider.Props) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <TooltipPrimitive.Portal container={useAdminContext().portal}>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","\"use client\"\nimport { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { useIsMobile } from \"#orck/admin/hooks/use-mobile\"\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { Input } from \"#orck/admin/components/ui/input\"\nimport { Separator } from \"#orck/admin/components/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"#orck/admin/components/ui/sheet\"\nimport { Skeleton } from \"#orck/admin/components/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"#orck/admin/components/ui/tooltip\"\nimport { PanelLeftIcon } from \"lucide-react\"\n\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n onKeyDown={(event) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }}\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar relative flex min-h-[30rem] w-full\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>\n <AdminMessage id={\"Sidebar\"} />\n </SheetTitle>\n <SheetDescription>\n <AdminMessage id={\"Displays the mobile sidebar.\"} />\n </SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer text-sidebar-foreground relative hidden md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"absolute inset-y-0 z-10 hidden h-full w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"Toggle Sidebar\"} />\n </span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { text: adminText } = useAdminUI()\n\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label={adminText(\"Toggle Sidebar\")}\n tabIndex={-1}\n onClick={toggleSidebar}\n title={adminText(\"Toggle Sidebar\")}\n className={cn(\n \"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"bg-sidebar-border mx-2 w-auto\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n })\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:font-medium [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar()\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n })\n\n if (!tooltip) {\n return comp\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n })\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden group-data-[collapsible=icon]:hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import {\n CreditCardIcon,\n DashboardCircleIcon,\n PackageIcon,\n RepeatIcon,\n Settings01Icon,\n UserGroupIcon,\n Wrench01Icon,\n} from \"@hugeicons/core-free-icons\"\nimport type { IconSvgElement } from \"@hugeicons/react\"\nimport {\n useAdminArea,\n useCatalogArea,\n useMerchantConfig,\n useMetrics,\n} from \"./lib/capabilities\"\nexport interface AdminNavItem {\n title: string\n path: string\n icon?: IconSvgElement\n useVisible?: () => boolean\n order?: number\n items?: { title: string; path: string; useVisible?: () => boolean }[]\n}\nexport const coreNav: AdminNavItem[] = [\n {\n title: \"Dashboard\",\n path: \"/\",\n icon: DashboardCircleIcon,\n order: 0,\n useVisible: useMetrics,\n items: [\n { title: \"Overview\", path: \"/\" },\n { title: \"Reports\", path: \"/reports\" },\n ],\n },\n {\n title: \"Customers\",\n path: \"/customers\",\n icon: UserGroupIcon,\n order: 10,\n useVisible: useAdminArea,\n },\n {\n title: \"Subscriptions\",\n path: \"/subscriptions\",\n icon: RepeatIcon,\n order: 20,\n useVisible: useAdminArea,\n },\n {\n title: \"Payments\",\n path: \"/payments\",\n icon: CreditCardIcon,\n order: 30,\n useVisible: useAdminArea,\n items: [\n { title: \"Payments\", path: \"/payments\" },\n { title: \"Health\", path: \"/payments/health\", useVisible: useMetrics },\n { title: \"Attempts\", path: \"/payments/attempts\" },\n { title: \"Renewals\", path: \"/payments/cycles\" },\n ],\n },\n {\n title: \"Orders\",\n path: \"/orders\",\n icon: CreditCardIcon,\n order: 40,\n useVisible: useAdminArea,\n },\n {\n title: \"Catalog\",\n path: \"/catalog\",\n icon: PackageIcon,\n order: 50,\n useVisible: useCatalogArea,\n items: [\n { title: \"Products\", path: \"/catalog\" },\n { title: \"Prices\", path: \"/catalog/prices\" },\n { title: \"Metering\", path: \"/catalog/metering\" },\n ],\n },\n {\n title: \"Ops\",\n path: \"/ops\",\n icon: Wrench01Icon,\n order: 60,\n useVisible: useMerchantConfig,\n items: [\n { title: \"Findings\", path: \"/ops\" },\n { title: \"Proposals\", path: \"/ops/proposals\" },\n { title: \"PSP imports\", path: \"/ops/imports\" },\n { title: \"Provider prices\", path: \"/ops/provider-prices\" },\n { title: \"Parked\", path: \"/ops/parked\" },\n ],\n },\n { title: \"Settings\", path: \"/settings\", icon: Settings01Icon, order: 70 },\n].map((item) => ({ ...item }))\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\n// App shell sidebar — same anatomy as the hosted product's shell\n// (inset variant, brand header, nav, footer user menu, rail).\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport {\n Add01Icon,\n Tick02Icon,\n UnfoldMoreIcon,\n} from \"@hugeicons/core-free-icons\"\nimport { Link, useLocation, useNavigate } from \"#orck/admin/router\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"#orck/admin/components/ui/dropdown-menu\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarRail,\n} from \"#orck/admin/components/ui/sidebar\"\nimport { coreNav, type AdminNavItem } from \"../navigation\"\nimport { useAdminContext } from \"../context\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\n\n// A section's first sub-page IS the section URL (/catalog, /payments), so it\n// can only be the active one when nothing deeper is selected.\nfunction subItemIsActive(pathname: string, url: string, sectionURL: string) {\n return url === sectionURL ? pathname === url : pathname.startsWith(url)\n}\n\nexport function AppSidebar() {\n const { pathname } = useLocation()\n const groups = [{ label: \"Billing\", items: coreNav }]\n const active = [...coreNav]\n .sort((a, b) => b.path.length - a.path.length)\n .find(\n (item) =>\n pathname === item.path ||\n (item.path !== \"/\" && pathname.startsWith(item.path + \"/\"))\n )?.path\n return (\n <Sidebar variant=\"inset\" collapsible=\"icon\">\n <SidebarHeader>\n {/* No product lockup: this console mounts inside the host's own app\n (host-one, host-three), where a vendor mark belongs to someone else's\n product. The merchant switcher is the orientation that matters here,\n and it names the merchant and role rather than the software. */}\n <MerchantSwitcher />\n </SidebarHeader>\n <SidebarContent>\n {groups.map((group) => (\n <SidebarGroup key={group.label}>\n <SidebarGroupLabel>\n <AdminMessage id={group.label} />\n </SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {group.items.map((item) => (\n <NavEntry\n key={item.path}\n item={item}\n active={item.path === active}\n pathname={pathname}\n />\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n ))}\n </SidebarContent>\n <SidebarRail />\n </Sidebar>\n )\n}\n\nconst always = () => true\n\nfunction NavEntry({\n item,\n active,\n pathname,\n}: {\n item: AdminNavItem\n active: boolean\n pathname: string\n}) {\n const { text: adminText } = useAdminUI()\n // A fixed hook per entry: an extension's item list never changes.\n const visible = (item.useVisible ?? always)()\n if (!visible) return null\n return (\n <SidebarMenuItem>\n <SidebarMenuButton\n isActive={active}\n tooltip={adminText(item.title)}\n render={\n <Link to={item.path}>\n {item.icon && <HugeiconsIcon icon={item.icon} />}\n <span>\n <AdminMessage id={item.title} />\n </span>\n </Link>\n }\n />\n {item.items && active && (\n <SidebarMenuSub>\n {item.items.map((sub) => (\n <NavSubEntry\n key={sub.path}\n sub={sub}\n active={subItemIsActive(pathname, sub.path, item.path)}\n />\n ))}\n </SidebarMenuSub>\n )}\n </SidebarMenuItem>\n )\n}\n\nfunction NavSubEntry({\n sub,\n active,\n}: {\n sub: NonNullable<AdminNavItem[\"items\"]>[number]\n active: boolean\n}) {\n // A fixed hook per entry, as for NavEntry.\n const visible = (sub.useVisible ?? always)()\n if (!visible) return null\n return (\n <SidebarMenuSubItem>\n <SidebarMenuSubButton\n isActive={active}\n render={\n <Link to={sub.path}>\n <span>\n <AdminMessage id={sub.title} />\n </span>\n </Link>\n }\n />\n </SidebarMenuSubItem>\n )\n}\n\nfunction MerchantSwitcher() {\n const { activeMerchant, merchants, selectMerchant } = useAuth()\n const navigate = useNavigate()\n const newMerchant = useAdminContext().props.newMerchantHref\n const label =\n activeMerchant?.display_name || activeMerchant?.slug || \"Select merchant\"\n const role = activeMerchant?.role || \"Merchant console\"\n const initials = activeMerchant?.slug.slice(0, 2) ?? \"µ\"\n\n return (\n <SidebarMenu>\n <SidebarMenuItem>\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <SidebarMenuButton\n size=\"lg\"\n tooltip={label}\n className=\"data-open:bg-sidebar-accent\"\n >\n <span className=\"flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-primary text-xs font-semibold text-primary-foreground uppercase\">\n {initials}\n </span>\n <span className=\"grid min-w-0 flex-1 text-left leading-tight\">\n <span className=\"truncate text-sm font-medium\">{label}</span>\n <span className=\"truncate text-xs text-muted-foreground capitalize\">\n {role}\n </span>\n </span>\n <HugeiconsIcon\n icon={UnfoldMoreIcon}\n className=\"ml-auto size-4 shrink-0\"\n />\n </SidebarMenuButton>\n }\n />\n <DropdownMenuContent side=\"bottom\" align=\"start\" className=\"min-w-60\">\n <DropdownMenuGroup>\n <DropdownMenuLabel className=\"text-xs text-muted-foreground\">\n <AdminMessage id={\"Merchants\"} />\n </DropdownMenuLabel>\n {merchants.map((merchant) => {\n const active = merchant.slug === activeMerchant?.slug\n return (\n <DropdownMenuItem\n key={merchant.slug}\n onClick={() => selectMerchant(merchant.slug)}\n className=\"gap-2 py-2\"\n >\n <span className=\"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-[10px] font-semibold uppercase\">\n {merchant.slug.slice(0, 2)}\n </span>\n <span className=\"grid min-w-0 flex-1 leading-tight\">\n <span className=\"truncate text-sm\">\n {merchant.display_name || merchant.slug}\n </span>\n {merchant.role && (\n <span className=\"truncate text-xs text-muted-foreground capitalize\">\n {merchant.role}\n </span>\n )}\n </span>\n {active && (\n <HugeiconsIcon\n icon={Tick02Icon}\n className=\"ml-auto size-4 shrink-0 text-primary\"\n />\n )}\n </DropdownMenuItem>\n )\n })}\n </DropdownMenuGroup>\n {/* The console creates no merchants itself: the entry exists only\n when a host extension serves a creation page. */}\n {newMerchant && (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => void navigate(newMerchant)}\n className=\"gap-2 py-2\"\n >\n <span className=\"flex size-7 shrink-0 items-center justify-center rounded-md border border-dashed border-border\">\n <HugeiconsIcon icon={Add01Icon} className=\"size-4\" />\n </span>\n <AdminMessage id={\"New merchant\"} />\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </SidebarMenuItem>\n </SidebarMenu>\n )\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\n// NoAccess is a merchant page the signed-in staff member may not use: none of\n// the console's areas, or not this one.\nexport function NoAccess({ area }: { area?: string }) {\n return (\n <div className=\"flex items-center justify-center py-16\">\n <div className=\"w-full max-w-sm\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-balance\">\n {area\n ? `You don't have access to ${area}`\n : \"You don't have access to this merchant's billing\"}\n </h1>\n <p className=\"mt-2 text-sm text-pretty text-muted-foreground\">\n <AdminMessage\n id={\"Ask an administrator for a role that includes it.\"}\n />\n </p>\n </div>\n </div>\n )\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useAdminContext } from \"../context\"\nexport function NoMerchants() {\n const { props } = useAdminContext()\n return (\n <div role=\"status\" className=\"p-8\">\n {props.emptyState ?? (\n <>\n <p>\n <AdminMessage id={\"Select a merchant to view its billing.\"} />\n </p>\n {props.newMerchantHref && (\n <a href={props.newMerchantHref}>\n <AdminMessage id={\"New merchant\"} />\n </a>\n )}\n </>\n )}\n </div>\n )\n}\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\nimport { useAdminServices } from \"#orck/admin/context\"\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport {\n Alert01Icon,\n AlertCircleIcon,\n Notification01Icon,\n} from \"@hugeicons/core-free-icons\"\nimport * as React from \"react\"\nimport { useNavigate } from \"#orck/admin/router\"\nimport { useQuery } from \"@tanstack/react-query\"\n\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"#orck/admin/components/ui/dropdown-menu\"\nimport type { Finding } from \"#orck/client/generated/wire\"\nimport { timeAgo } from \"#orck/admin/lib/format\"\nimport { useMerchantConfig, useMetrics } from \"#orck/admin/lib/capabilities\"\n\n// The bell is the findings queue: the open findings that need a person. A\n// finding leaves it when it is resolved, by an operator or by itself. Its\n// count is a metrics query, shown only to staff holding Metrics.\nexport function NotificationBell() {\n const { text: adminText } = useAdminUI()\n\n const { adminQueries } = useAdminServices()\n\n const navigate = useNavigate()\n const [open, setOpen] = React.useState(false)\n const metrics = useMetrics()\n const merchantConfig = useMerchantConfig()\n const { data: count = 0 } = useQuery({\n ...adminQueries.unreadNotifications(),\n enabled: merchantConfig && metrics,\n })\n const { data, isFetching: loading } = useQuery(\n adminQueries.notifications(merchantConfig && open)\n )\n const items = data?.data ?? []\n if (!merchantConfig) return null\n\n const onItemClick = (f: Finding) => {\n setOpen(false)\n navigate(`/ops?finding=${encodeURIComponent(f.id)}`)\n }\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={adminText(\"Notifications\")}\n className=\"relative\"\n >\n <HugeiconsIcon icon={Notification01Icon} className=\"size-4\" />\n {count > 0 && (\n <span className=\"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-medium text-white\">\n {count > 9 ? \"9+\" : count}\n </span>\n )}\n </Button>\n }\n />\n <DropdownMenuContent align=\"end\" className=\"w-80 p-0 sm:w-96\">\n <div className=\"flex items-center justify-between border-b px-3 py-2\">\n <span className=\"text-sm font-medium\">\n <AdminMessage id={\"Needs attention\"} />\n </span>\n {count > items.length && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-6 px-2 text-xs\"\n onClick={() => {\n setOpen(false)\n navigate(\"/ops\")\n }}\n >\n <AdminMessage id={\"View all \"} />\n {count}\n </Button>\n )}\n </div>\n <div className=\"max-h-96 overflow-y-auto\">\n {loading ? (\n <p className=\"px-3 py-6 text-center text-sm text-muted-foreground\">\n <AdminMessage id={\"Loading…\"} />\n </p>\n ) : items.length === 0 ? (\n <div className=\"flex flex-col items-center gap-1 px-3 py-8 text-center\">\n <HugeiconsIcon\n icon={Notification01Icon}\n className=\"size-5 text-muted-foreground\"\n />\n <p className=\"text-sm text-muted-foreground\">\n <AdminMessage id={\"You're all caught up.\"} />\n </p>\n </div>\n ) : (\n items.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n onClick={() => onItemClick(f)}\n className=\"flex w-full items-start gap-2 border-b px-3 py-2 text-left last:border-b-0 hover:bg-muted/50\"\n >\n <span className=\"mt-0.5 shrink-0\">\n {f.severity === \"critical\" || f.severity === \"high\" ? (\n <HugeiconsIcon\n icon={AlertCircleIcon}\n className=\"text-failed size-4\"\n />\n ) : (\n <HugeiconsIcon\n icon={Alert01Icon}\n className=\"text-held size-4\"\n />\n )}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex items-center justify-between gap-2\">\n <span className=\"truncate text-sm font-medium\">\n {f.finding_type}\n </span>\n <span className=\"shrink-0 text-[11px] text-muted-foreground\">\n {timeAgo(f.created_at)}\n </span>\n </span>\n {f.recommended_action && (\n <span className=\"mt-0.5 line-clamp-2 block text-xs text-muted-foreground\">\n {f.recommended_action}\n </span>\n )}\n </span>\n </button>\n ))\n )}\n </div>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n const { text: adminText } = useAdminUI()\n\n return (\n <nav\n aria-label={adminText(\"breadcrumb\")}\n data-slot=\"breadcrumb\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n \"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbLink({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"a\">) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\"transition-colors hover:text-foreground\", className),\n },\n props\n ),\n render,\n state: {\n slot: \"breadcrumb-link\",\n },\n })\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRightIcon />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\n \"flex size-5 items-center justify-center [&>svg]:size-4\",\n className\n )}\n {...props}\n >\n <MoreHorizontalIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"More\"} />\n </span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport * as React from \"react\"\nimport { Link } from \"#orck/admin/router\"\n\nimport { NotificationBell } from \"#orck/admin/components/notification-bell\"\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from \"#orck/admin/components/ui/breadcrumb\"\nimport { Separator } from \"#orck/admin/components/ui/separator\"\nimport { SidebarTrigger } from \"#orck/admin/components/ui/sidebar\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\nimport { useMerchantConfig } from \"#orck/admin/lib/capabilities\"\n\nexport interface Crumb {\n label: string\n /** A link when the step is somewhere you can go; plain text otherwise. */\n to?: string\n}\n\nexport function SiteHeader({ trail }: { trail: Crumb[] }) {\n const { activeMerchant } = useAuth()\n // Findings belong to merchant configuration.\n const merchantConfig = useMerchantConfig()\n return (\n <header className=\"flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n <SidebarTrigger className=\"-ml-1\" />\n <Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n <Breadcrumb>\n <BreadcrumbList>\n {trail.length === 0 ? (\n <BreadcrumbItem>\n <BreadcrumbPage>\n <AdminMessage id={\"Dashboard\"} />\n </BreadcrumbPage>\n </BreadcrumbItem>\n ) : (\n <>\n <BreadcrumbItem>\n <BreadcrumbLink\n render={\n <Link to=\"/\">\n <AdminMessage id={\"Dashboard\"} />\n </Link>\n }\n />\n </BreadcrumbItem>\n {trail.map((crumb, index) => (\n <React.Fragment key={crumb.label}>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n {crumb.to && index < trail.length - 1 ? (\n <BreadcrumbLink\n render={\n <Link to={crumb.to}>\n <AdminMessage id={crumb.label} />\n </Link>\n }\n />\n ) : (\n <BreadcrumbPage>\n <AdminMessage id={crumb.label} />\n </BreadcrumbPage>\n )}\n </BreadcrumbItem>\n </React.Fragment>\n ))}\n </>\n )}\n </BreadcrumbList>\n </Breadcrumb>\n <div className=\"ml-auto flex items-center gap-2\">\n {activeMerchant && merchantConfig && <NotificationBell />}\n </div>\n </header>\n )\n}\n","import { useQuery } from \"@tanstack/react-query\"\nimport { useAdminContext } from \"../context\"\nimport { AdminMessage } from \"../ui-context\"\nimport type { ReactNode } from \"react\"\nimport { useLocation } from \"#orck/admin/router\"\n\nimport { AppSidebar } from \"#orck/admin/components/app-sidebar\"\nimport { NoAccess } from \"#orck/admin/components/no-access\"\nimport { NoMerchants } from \"#orck/admin/components/no-merchants\"\nimport { SiteHeader } from \"#orck/admin/components/site-header\"\nimport {\n SidebarInset,\n SidebarProvider,\n} from \"#orck/admin/components/ui/sidebar\"\nimport { TooltipProvider } from \"#orck/admin/components/ui/tooltip\"\nimport type { AdminAccess } from \"#orck/client/generated/wire\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\nimport { hasAnyArea } from \"#orck/admin/lib/capabilities\"\nimport { errorText } from \"#orck/admin/lib/error-text\"\n\n// Longest path first: the catalog sub-pages have to match before the section\n// they live under. A trail of more than one entry becomes a real breadcrumb.\nconst trails: [string, { label: string; to?: string }[]][] = [\n [\"/customers\", [{ label: \"Customers\" }]],\n [\"/subscriptions\", [{ label: \"Subscriptions\" }]],\n [\"/payments\", [{ label: \"Payments\" }]],\n [\"/orders\", [{ label: \"Orders\" }]],\n [\n \"/catalog/metering\",\n [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Metering\" }],\n ],\n [\n \"/catalog/prices\",\n [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Prices\" }],\n ],\n [\"/catalog\", [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Products\" }]],\n [\n \"/ops/imports\",\n [\n { label: \"Ops\", to: \"/ops\" },\n { label: \"PSP imports\", to: \"/ops/imports\" },\n ],\n ],\n [\n \"/ops/provider-prices\",\n [{ label: \"Ops\", to: \"/ops\" }, { label: \"Provider prices\" }],\n ],\n [\"/ops/parked\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Parked\" }]],\n [\"/ops/proposals\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Proposals\" }]],\n [\"/ops\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Findings\" }]],\n [\"/settings\", [{ label: \"Settings\" }]],\n]\n\n// areaOf is the console area a merchant page belongs to, and whether the\n// caller may use it; Settings belongs to none (its tabs check their own).\nfunction areaOf(\n pathname: string,\n access: AdminAccess\n): { name: string; allowed: boolean } | null {\n const under = (prefix: string) =>\n pathname === prefix || pathname.startsWith(prefix + \"/\")\n if (under(\"/payments/health\"))\n return { name: \"payment health\", allowed: access.metrics === true }\n if ([\"/customers\", \"/subscriptions\", \"/payments\", \"/orders\"].some(under))\n return {\n name: \"customer support\",\n allowed: access.admin === \"read\" || access.admin === \"update\",\n }\n if (under(\"/ops\"))\n return {\n name: \"merchant configuration\",\n allowed:\n access.merchant_config === \"read\" ||\n access.merchant_config === \"update\",\n }\n if (under(\"/catalog\"))\n return {\n name: \"the catalog\",\n allowed: access.catalog === \"read\" || access.catalog === \"update\",\n }\n return null\n}\n\nexport function AppLayout({ children }: { children: ReactNode }) {\n const { activeMerchant } = useAuth()\n const { pathname } = useLocation()\n const { props, services } = useAdminContext()\n const permission = useQuery(services.adminQueries.access())\n const access = permission.data\n const hostSettings =\n (props.settingsTabs?.length ?? 0) > 0 &&\n (pathname === \"/settings\" || pathname === \"/\")\n const trail =\n trails.find(([prefix]) => pathname.startsWith(prefix))?.[1] ?? []\n if (!activeMerchant) return <NoMerchants />\n if (permission.isPending)\n return (\n <p role=\"status\" className=\"p-6\">\n <AdminMessage id=\"Loading billing permissions…\" />\n </p>\n )\n if (permission.error)\n return (\n <div role=\"alert\" className=\"p-6\">\n <p>{errorText(permission.error).text}</p>\n <button type=\"button\" onClick={() => void permission.refetch()}>\n <AdminMessage id=\"Try again\" />\n </button>\n </div>\n )\n if (\n activeMerchant.id &&\n access?.scope_id &&\n activeMerchant.id !== access.scope_id\n )\n return (\n <p role=\"alert\" className=\"p-6\">\n <AdminMessage id=\"The authenticated connection is bound to another merchant. Update the host connection before opening this merchant.\" />\n </p>\n )\n return (\n <TooltipProvider>\n {/* Below 64rem the console opens with its sidebar folded to icons, so a\n tablet keeps its width for the page; the inset may shrink below its\n content so wide tables scroll inside their own containers instead\n of pushing the page sideways. */}\n <SidebarProvider\n defaultOpen={window.matchMedia?.(\"(min-width: 64rem)\").matches ?? true}\n >\n <AppSidebar />\n <SidebarInset className=\"min-w-0\">\n <SiteHeader trail={trail} />\n {/* A switch remounts the merchant's pages: nothing of the\n previous merchant's survives it. */}\n <main\n key={activeMerchant?.id || activeMerchant?.slug || \"\"}\n className=\"flex min-w-0 flex-1 flex-col p-4 md:p-8\"\n >\n <div className=\"@container/page mx-auto w-full max-w-7xl min-w-0\">\n {access &&\n ((!hasAnyArea(access) && !hostSettings) ||\n areaOf(pathname, access)?.allowed === false) ? (\n <NoAccess area={areaOf(pathname, access)?.name} />\n ) : (\n children\n )}\n </div>\n </main>\n </SidebarInset>\n </SidebarProvider>\n </TooltipProvider>\n )\n}\n","import { useAdminContext } from \"#orck/admin/context\"\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal\n container={useAdminContext().portal}\n data-slot=\"alert-dialog-portal\"\n {...props}\n />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","// Promise-based confirmation for the console's plain (non-typed) confirms:\n//\n// const confirm = useConfirm()\n// if (await confirm({ title, description, confirmLabel, tone })) …\n//\n// One dialog per ConfirmProvider; a newer request answers an older one false.\n// Destructive acts that need a typed word use TypedConfirmDialog instead.\nimport * as React from \"react\"\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"#orck/admin/components/ui/alert-dialog\"\nimport {\n ConfirmContext,\n type Confirm,\n type ConfirmOptions,\n} from \"#orck/admin/lib/confirm\"\n\nexport function ConfirmProvider({ children }: { children: React.ReactNode }) {\n const [options, setOptions] = React.useState<ConfirmOptions | null>(null)\n const [open, setOpen] = React.useState(false)\n const pending = React.useRef<((answer: boolean) => void) | null>(null)\n\n const settle = React.useCallback((answer: boolean) => {\n pending.current?.(answer)\n pending.current = null\n setOpen(false)\n }, [])\n\n const confirm = React.useCallback<Confirm>(\n (next) =>\n new Promise<boolean>((resolve) => {\n pending.current?.(false)\n pending.current = resolve\n setOptions(next)\n setOpen(true)\n }),\n []\n )\n\n React.useEffect(() => () => pending.current?.(false), [])\n\n return (\n <ConfirmContext.Provider value={confirm}>\n {children}\n <AlertDialog\n open={open}\n onOpenChange={(next) => {\n if (!next) settle(false)\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{options?.title}</AlertDialogTitle>\n {options?.description ? (\n <AlertDialogDescription>\n {options.description}\n </AlertDialogDescription>\n ) : null}\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>\n {options?.cancelLabel ?? \"Cancel\"}\n </AlertDialogCancel>\n <AlertDialogAction\n variant={\n options?.tone === \"destructive\" ? \"destructive\" : \"default\"\n }\n onClick={() => settle(true)}\n >\n {options?.confirmLabel ?? \"Confirm\"}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </ConfirmContext.Provider>\n )\n}\n","\"use client\"\n\nimport { useAdminContext } from \"#orck/admin/context\"\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\"\nimport {\n CircleCheckIcon,\n InfoIcon,\n TriangleAlertIcon,\n OctagonXIcon,\n Loader2Icon,\n} from \"lucide-react\"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const theme = useAdminContext().props.appearance?.theme ?? \"system\"\n\n return (\n <Sonner\n id={useAdminContext().services.namespace}\n theme={(theme === \"inherit\" ? \"system\" : theme) as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n \"--border-radius\": \"var(--radius)\",\n } as React.CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: \"cn-toast\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n","// A deploy rotates chunk hashes, so an open tab's lazy chunk is gone: only a\n// document reload fetches the new index.html.\nconst CHUNK_ERRORS = [\n /dynamically imported module/i,\n /failed to load module script/i,\n /importing a module script failed/i,\n /loading (css )?chunk \\S+ failed/i,\n /unable to preload css/i,\n]\n\nexport function isChunkLoadError(error: unknown): boolean {\n const e = error as { name?: string; message?: string } | null\n if (e?.name === \"ChunkLoadError\") return true\n return CHUNK_ERRORS.some((pattern) => pattern.test(e?.message ?? \"\"))\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\n// A page that failed to render or load. After a deploy the hashed chunk an\n// open tab asks for is gone; only a document reload fetches the new\n// index.html, so that case offers a reload instead of a broken page.\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport { Refresh01Icon } from \"@hugeicons/core-free-icons\"\nimport { Link } from \"#orck/admin/router\"\n\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { isChunkLoadError } from \"#orck/admin/lib/chunk-error\"\n\nexport function RouteError({ error }: { error: unknown }) {\n const stale = isChunkLoadError(error)\n const message = error instanceof Error ? error.message : \"\"\n return (\n <div\n role=\"alert\"\n className=\"flex min-h-[50vh] flex-col items-center justify-center gap-4 p-6 text-center\"\n >\n <div className=\"max-w-md\">\n <p className=\"font-medium\">\n {stale\n ? \"The console has been updated. Reload to use the new version.\"\n : \"This page failed to load.\"}\n </p>\n {!stale && message ? (\n <p className=\"mt-1 text-sm break-words text-muted-foreground\">\n {message}\n </p>\n ) : null}\n </div>\n <div className=\"flex flex-wrap items-center justify-center gap-3\">\n <Button onClick={() => window.location.reload()}>\n <HugeiconsIcon icon={Refresh01Icon} className=\"size-4\" />\n {stale ? \"Reload\" : \"Try again\"}\n </Button>\n {/* A document load, not client-side navigation: a stale chunk keeps\n failing until index.html is fetched again. */}\n <Link\n to=\"/\"\n className=\"text-sm text-muted-foreground underline underline-offset-4\"\n >\n <AdminMessage id={\"Console home\"} />\n </Link>\n </div>\n </div>\n )\n}\n","import { QueryCache, QueryClient } from \"@tanstack/react-query\"\n\nimport { ApiError } from \"#orck/admin/lib/api/client\"\nimport { createAdminToast, createToastHandlers } from \"#orck/admin/lib/toast\"\n\nexport function shouldRetry(failureCount: number, error: unknown): boolean {\n // Status 0: OpenRails never answered.\n if (error instanceof ApiError && error.status > 0 && error.status < 500)\n return false\n return failureCount < 2\n}\n\nexport const createAdminQueryClient = (namespace?: string) => {\n const { toastApiError } = createToastHandlers(createAdminToast(namespace))\n return new QueryClient({\n queryCache: new QueryCache({\n onError: (error, query) => {\n const action = query.meta?.errorAction\n if (typeof action === \"string\") toastApiError(error, action)\n },\n }),\n defaultOptions: {\n queries: {\n staleTime: 20_000,\n gcTime: 5 * 60_000,\n retry: shouldRetry,\n },\n mutations: {\n retry: false,\n },\n },\n })\n}\n","import { useSyncExternalStore } from \"react\"\nimport type { BillingTheme } from \"../appearance\"\n\nconst media = () => window.matchMedia?.(\"(prefers-color-scheme: dark)\")\nconst subscribe = (notify: () => void) => {\n const query = media()\n query?.addEventListener(\"change\", notify)\n return () => query?.removeEventListener(\"change\", notify)\n}\nconst snapshot = () => (media()?.matches ? \"dark\" : \"light\")\nconst serverSnapshot = () => \"light\" as const\nconst unchanged = () => () => {}\n\nexport function useAdminTheme(theme: BillingTheme = \"inherit\") {\n const system = useSyncExternalStore(\n theme === \"auto\" ? subscribe : unchanged,\n snapshot,\n serverSnapshot\n )\n return theme === \"auto\" ? system : theme\n}\n","import { AdminUIContext } from \"./ui-context\"\nimport {\n Component,\n useId,\n useMemo,\n useRef,\n useCallback,\n useLayoutEffect,\n useState,\n type ReactNode,\n} from \"react\"\nimport { QueryClientProvider } from \"@tanstack/react-query\"\nimport { appearanceStyle } from \"../appearance\"\nimport { AdminContext, createAdminServices } from \"./context\"\nimport { AdminRouter, useLocation } from \"./router\"\nimport { AdminPages } from \"./routes\"\nimport { AppLayout } from \"./layouts/app-layout\"\nimport { ConfirmProvider } from \"./components/confirm\"\nimport { Toaster } from \"./components/ui/sonner\"\nimport { RouteError } from \"./components/route-error\"\nimport { createAdminQueryClient } from \"./lib/query-client\"\nimport type { BillingAdminMerchant, BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\nconst merchantFrom = (\n merchant: string | BillingAdminMerchant\n): BillingAdminMerchant =>\n typeof merchant === \"string\" ? { id: merchant, slug: merchant } : merchant\n\n/** Staff billing pages inside the host's app, authentication, router, and theme. */\nexport function BillingAdmin(props: BillingAdminProps) {\n const [selected, setSelected] = useState<string>()\n const [connection, setConnection] = useState({\n auth: props.auth,\n baseUrl: props.baseUrl,\n generation: 0,\n })\n if (connection.auth !== props.auth || connection.baseUrl !== props.baseUrl)\n setConnection({\n auth: props.auth,\n baseUrl: props.baseUrl,\n generation: connection.generation + 1,\n })\n return (\n <BillingAdminInstance\n key={connection.generation}\n {...props}\n selected={selected}\n onSelected={setSelected}\n />\n )\n}\n\nfunction BillingAdminInstance({\n selected,\n onSelected,\n ...props\n}: BillingAdminProps & {\n selected?: string\n onSelected: (value: string) => void\n}) {\n const theme = useAdminTheme(props.appearance?.theme)\n const namespace = useId()\n const [portal, setPortal] = useState<HTMLDivElement | null>(null)\n const merchants = useMemo(\n () =>\n props.merchants ??\n (props.merchant\n ? [merchantFrom(props.merchant)]\n : [{ id: \"\", slug: \"\", display_name: \"Billing\" }]),\n [props.merchants, props.merchant]\n )\n const requested = props.merchant ? merchantFrom(props.merchant).id : selected\n const activeMerchant =\n merchants.find((m) => m.id === requested || m.slug === requested) ??\n merchants[0]\n const scope = `${props.baseUrl}:${activeMerchant?.id ?? \"\"}:${activeMerchant?.slug ?? \"\"}`\n const currentScope = useRef<string | undefined>(scope)\n useLayoutEffect(() => {\n currentScope.current = scope\n return () => {\n currentScope.current = undefined\n }\n }, [scope])\n const isCurrent = useCallback(() => currentScope.current === scope, [scope])\n const queryClient = useMemo(\n () => props.queryClient ?? createAdminQueryClient(namespace),\n [namespace, props.queryClient]\n )\n const services = useMemo(\n () =>\n // The factory captures this callback; only request-time checks read the ref.\n // eslint-disable-next-line react-hooks/refs\n createAdminServices({\n namespace,\n isCurrent,\n baseUrl: props.baseUrl,\n auth: props.auth,\n merchant: activeMerchant,\n exchange: props.exchange,\n }),\n [\n isCurrent,\n namespace,\n props.baseUrl,\n props.auth,\n props.exchange,\n activeMerchant,\n ]\n )\n const value = {\n props,\n services,\n merchants,\n activeMerchant,\n portal,\n selectMerchant(slug: string) {\n const merchant = merchants.find((m) => m.slug === slug || m.id === slug)\n if (!merchant) return\n onSelected(merchant.id)\n props.onMerchantChange?.(merchant)\n },\n }\n return (\n <div\n lang={props.language ?? \"en\"}\n className={[\"orba\", props.className].filter(Boolean).join(\" \")}\n data-orba-theme={theme}\n style={{ ...appearanceStyle(props.appearance, \"orba\"), ...props.style }}\n >\n <AdminUIContext.Provider value={{ namespace, messages: props.messages }}>\n <AdminContext.Provider value={value}>\n <QueryClientProvider client={queryClient}>\n <AdminRouter\n basePath={props.basePath}\n navigation={props.navigation}\n >\n <ConfirmProvider>\n <AppLayout>\n <PageBoundary>\n <AdminPages />\n </PageBoundary>\n </AppLayout>\n </ConfirmProvider>\n <Toaster />\n </AdminRouter>\n </QueryClientProvider>\n <div ref={setPortal} />\n </AdminContext.Provider>\n </AdminUIContext.Provider>\n </div>\n )\n}\n\nclass Boundary extends Component<{ children: ReactNode }, { error?: unknown }> {\n state: { error?: unknown } = {}\n static getDerivedStateFromError(error: unknown) {\n return { error }\n }\n render() {\n return this.state.error ? (\n <RouteError error={this.state.error} />\n ) : (\n this.props.children\n )\n }\n}\nfunction PageBoundary({ children }: { children: ReactNode }) {\n const location = useLocation()\n return <Boundary key={location.pathname}>{children}</Boundary>\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useCallback, useEffect, useMemo, useState } from \"react\"\nimport { appearanceStyle } from \"../appearance\"\nimport type { AdminAccess } from \"../client/generated/wire\"\nimport { ApiError, createAdminClient } from \"./lib/api/client\"\nimport { createAdminAPI } from \"./lib/api\"\nimport { formatNativeAmount } from \"./lib/format\"\nimport { errorText } from \"./lib/error-text\"\nimport { statusLabel } from \"./components/status-badge\"\nimport type { BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\ntype Connection = Pick<\n BillingAdminProps,\n \"baseUrl\" | \"auth\" | \"merchant\" | \"exchange\"\n>\n\nfunction useAPI(options: Connection) {\n const id =\n typeof options.merchant === \"string\"\n ? options.merchant\n : options.merchant?.id\n const slug =\n typeof options.merchant === \"string\"\n ? options.merchant\n : options.merchant?.slug\n return useMemo(\n () =>\n createAdminAPI(\n createAdminClient({\n baseUrl: options.baseUrl,\n auth: options.auth,\n exchange: options.exchange,\n merchant: id ? { id, slug: slug ?? id } : undefined,\n })\n ),\n [options.baseUrl, options.auth, options.exchange, id, slug]\n )\n}\n\nfunction useRead<T>(load: (signal: AbortSignal) => Promise<T>) {\n const [attempt, setAttempt] = useState(0)\n const [result, setResult] = useState<{\n load: typeof load\n attempt: number\n data?: T\n error?: Error\n }>()\n useEffect(() => {\n const abort = new AbortController()\n load(abort.signal).then(\n (data) => {\n if (!abort.signal.aborted) setResult({ load, attempt, data })\n },\n (error) => {\n if (!abort.signal.aborted)\n setResult({\n load,\n attempt,\n error: error instanceof Error ? error : new Error(String(error)),\n })\n }\n )\n return () => abort.abort()\n }, [load, attempt])\n const current =\n result?.load === load && result.attempt === attempt ? result : undefined\n return {\n data: current?.data,\n error: current?.error,\n isPending: !current,\n refetch: () => setAttempt((n) => n + 1),\n }\n}\n\n/** Reads tab permissions without requiring a BillingAdmin or QueryClient provider. */\nexport function useBillingAdminAccess(options: Connection) {\n const api = useAPI(options)\n return useRead<AdminAccess>(\n useCallback((signal) => api.getAdminAccess(signal), [api])\n )\n}\n\nexport interface BillingCustomerSummaryProps extends Connection {\n customer: string\n href?: string\n appearance?: BillingAdminProps[\"appearance\"]\n className?: string\n}\n\n// An account that never reached billing has no customer yet: that is a state, not a failure.\nconst missingCustomer = (error: Error) =>\n error instanceof ApiError && error.code === \"customer_not_found\"\n\n/** A bounded preview for the host's customer or user page. */\nexport function BillingCustomerSummary(props: BillingCustomerSummaryProps) {\n const theme = useAdminTheme(props.appearance?.theme)\n const api = useAPI(props)\n const { data, error, isPending, refetch } = useRead(\n useCallback(\n async (signal: AbortSignal) => {\n const [customer, subscriptions, entitlements, access, payments] =\n await Promise.all([\n api.getCustomer(props.customer, signal),\n api.listSubscriptions(\n { customer_id: props.customer, status: \"active\" },\n 5,\n undefined,\n signal\n ),\n api.listCustomerEntitlements(props.customer, { limit: 5 }, signal),\n api.listCustomerProductAccess(props.customer, { limit: 5 }, signal),\n api.listPayments(\n { customer_id: props.customer },\n { limit: 5 },\n signal\n ),\n ])\n return { customer, subscriptions, entitlements, access, payments }\n },\n [api, props.customer]\n )\n )\n return (\n <section\n className={[\"orba\", props.className].filter(Boolean).join(\" \")}\n data-orba-theme={theme}\n style={appearanceStyle(props.appearance, \"orba\")}\n >\n <div className=\"overflow-hidden rounded-xl bg-card text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10\">\n <div className=\"flex flex-wrap items-center justify-between gap-3 border-b px-5 py-5 sm:px-6\">\n <h2 className=\"text-base leading-tight font-semibold\">\n <AdminMessage id={\"Billing\"} />\n </h2>\n {props.href && (\n <a\n className=\"inline-flex min-h-10 items-center text-sm text-muted-foreground underline-offset-4 hover:text-foreground hover:underline sm:min-h-0\"\n href={props.href}\n >\n <AdminMessage id={\"View billing details\"} />\n </a>\n )}\n </div>\n <div className=\"px-5 py-4 sm:px-6\">\n {isPending && (\n <p role=\"status\" className=\"text-muted-foreground\">\n <AdminMessage id={\"Loading billing…\"} />\n </p>\n )}\n {error && missingCustomer(error) && (\n <p className=\"text-muted-foreground\">\n <AdminMessage id={\"No billing activity yet.\"} />\n </p>\n )}\n {error && !missingCustomer(error) && (\n <p role=\"alert\">\n {errorText(error).text}{\" \"}\n <button\n type=\"button\"\n className=\"underline underline-offset-4\"\n onClick={refetch}\n >\n <AdminMessage id={\"Try again\"} />\n </button>\n </p>\n )}\n {data && (\n <dl className=\"grid gap-x-6 gap-y-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-y-3\">\n {data.customer.balances.map((balance) => (\n <SummaryRow\n key={balance.currency}\n label=\"Available balance\"\n items={[\n formatNativeAmount(\n balance.available_amount,\n balance.currency\n ),\n ]}\n />\n ))}\n <SummaryRow\n label=\"Active subscriptions\"\n items={data.subscriptions.data.map(\n (subscription) =>\n subscription.product?.display_name ?? subscription.id\n )}\n />\n <SummaryRow\n label=\"Entitlements\"\n items={data.entitlements.data.map(\n (entitlement) => entitlement.entitlement\n )}\n />\n <SummaryRow\n label=\"Product access\"\n items={data.access.data.map(\n (access) =>\n `${access.product_name} · ${statusLabel(access.status)}`\n )}\n />\n <SummaryRow\n label=\"Recent payments\"\n items={data.payments.data.map(\n (payment) =>\n `${formatNativeAmount(payment.amount, payment.currency)} · ${statusLabel(payment.status)}`\n )}\n />\n </dl>\n )}\n </div>\n </div>\n </section>\n )\n}\n\n// SummaryRow is one labelled list in the panel; an empty one says \"None\".\nfunction SummaryRow({ label, items }: { label: string; items: string[] }) {\n return (\n <>\n <dt className=\"pt-2 text-muted-foreground first:pt-0 sm:pt-0\">\n <AdminMessage id={label} />\n </dt>\n <dd className=\"min-w-0\">\n {items.length ? (\n <ul className=\"grid gap-0.5\">\n {items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n ) : (\n <span className=\"text-muted-foreground\">\n <AdminMessage id={\"None\"} />\n </span>\n )}\n </dd>\n </>\n )\n}\n\n/** A ban or account deletion never cancels the customer's subscriptions. */\nexport function billingConfirmWarnings(customer: {\n subscriptions: readonly { status: string }[]\n}): string[] {\n return customer.subscriptions.some(\n (subscription) => subscription.status !== \"canceled\"\n )\n ? [\n \"This customer has ongoing subscriptions. Banning or deleting the account does not cancel them; cancel them separately in billing.\",\n ]\n : []\n}\n\nexport interface BillingConfirmWarningsOptions extends Connection {\n customer: string\n signal?: AbortSignal\n}\n\nconst uncheckedBillingWarning =\n \"Subscription status could not be fully checked. Banning or deleting the account does not cancel subscriptions; review billing separately.\"\n\n/** Advisory-only billing check before a host bans or deletes an account. */\nexport async function loadBillingConfirmWarnings(\n options: BillingConfirmWarningsOptions\n): Promise<string[]> {\n const merchant =\n typeof options.merchant === \"string\"\n ? { id: options.merchant, slug: options.merchant }\n : options.merchant\n const api = createAdminAPI(createAdminClient({ ...options, merchant }))\n let cursor: string | undefined\n const visited = new Set<string>()\n try {\n // This is a confirmation hint, not an unbounded account export. A partial\n // scan stays advisory rather than preventing the host's account action.\n for (let page = 0; page < 10; page++) {\n options.signal?.throwIfAborted()\n const subscriptions = await api.listSubscriptions(\n { customer_id: options.customer },\n 100,\n cursor,\n options.signal\n )\n const warnings = billingConfirmWarnings({\n subscriptions: subscriptions.data,\n })\n if (warnings.length) return warnings\n if (!subscriptions.next_cursor) return []\n if (visited.has(subscriptions.next_cursor)) break\n visited.add(subscriptions.next_cursor)\n cursor = subscriptions.next_cursor\n }\n } catch (error) {\n options.signal?.throwIfAborted()\n if (error instanceof Error && error.name === \"AbortError\") throw error\n }\n return [uncheckedBillingWarning]\n}\n\nconst permissionAreas: Record<string, string> = {\n \"customer:read\": \"Read customers, subscriptions, payments, and orders.\",\n \"customer:manage\":\n \"Change customer billing, including refunds, cancellations, and credits.\",\n \"catalog:manage\": \"Change products, prices, meters, and catalog migrations.\",\n \"catalog:read\": \"Read products, prices, meters, and catalog migrations.\",\n \"config:read\":\n \"Read merchant configuration, PSPs, findings, and notifications.\",\n \"config:manage\":\n \"Change merchant configuration, PSPs, findings, and notifications.\",\n \"metrics:read\": \"Read revenue metrics, reports, and dashboards.\",\n \"entitlements:read\":\n \"Read customer entitlements through the application API.\",\n \"usage:read\":\n \"Read usage, admissions, and running charges through the application API.\",\n \"usage:manage\": \"Admit and charge usage through the application API.\",\n \"events:read\":\n \"Read retained billing events through the application API.\",\n \"orders:manage\":\n \"Preview, create, and withdraw merchant orders through the application API.\",\n \"customers:read\":\n \"Read merchant customer identity and billing settings.\",\n}\n\n/** Descriptions for a host's role editor; permissions are enforced by the API. */\nexport const billingPermissionHelp: Readonly<Record<string, string>> =\n Object.fromEntries(\n [\"merchant\", \"root\"].flatMap((scope) =>\n Object.entries(permissionAreas).map(([permission, description]) => [\n `${scope}:${permission}`,\n `${description} ${scope === \"root\" ? \"Applies across merchants.\" : \"Applies within this merchant.\"}`,\n ])\n )\n )\n","import { useEffect, type ReactNode } from \"react\"\nimport {\n SignInPanel,\n StepUpProvider,\n useStepUpGuard,\n type StepUpProviderProps,\n} from \"@openrails/auth-ui\"\nimport { useAuthClient, useSession } from \"@openrails/auth-ui/react\"\nimport {\n AuthAdmin,\n useGroupAdminAccess,\n useHistoryNavigation,\n useUsersAdminAccess,\n type AdminNavigation,\n type AuthAdminProps,\n} from \"@openrails/auth-ui/admin\"\nimport { appearanceStyle } from \"../appearance\"\nimport { BillingAdmin } from \"./billing-admin\"\nimport {\n BillingCustomerSummary,\n loadBillingConfirmWarnings,\n useBillingAdminAccess,\n} from \"./summary\"\nimport type { BillingAdminMerchant, BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\nexport interface AdminConsoleProps {\n /** AuthKit's JSON API mount, e.g. `/api/v1`. */\n authBaseUrl: string\n /** The engine's API prefix, including /v1. */\n billingBaseUrl: string\n merchant?: string | BillingAdminMerchant\n /** Where the console is mounted. Default `/admin`. */\n basePath?: string\n /** The host router; the history API without one. */\n navigation?: AdminNavigation\n /** The host's sign-in page, opened with `?return_to=`; AuthKit's sign-in panel without one. */\n signInPath?: string\n appearance?: BillingAdminProps[\"appearance\"]\n /** AuthKit's admin language; billing administration is English. */\n language?: string\n /** The user directory's options: tenant, entitlements, languages, and the host's own panels and warnings after billing's. */\n users?: Exclude<AuthAdminProps[\"users\"], false | undefined>\n /** Resolves the linked Solana wallet's signer for a wallet step-up. */\n acquireSolanaSigner?: StepUpProviderProps[\"acquireSolanaSigner\"]\n className?: string\n}\n\n/**\n * The staff console: AuthKit's account administration at `basePath` (users,\n * members, roles, credentials) and billing administration at\n * `basePath/billing`, each shown only to whoever holds its permissions. Users\n * carry their billing summary and a subscription warning before a ban or\n * delete; AuthKit's writes step up through the console's dialog. Render it\n * inside the host's `AuthProvider`. Every request is authorized by its API.\n */\nexport function AdminConsole(props: AdminConsoleProps) {\n const session = useSession()\n const history = useHistoryNavigation()\n const navigation = props.navigation ?? history\n const theme = useAdminTheme(props.appearance?.theme)\n let body: ReactNode\n if (session.status === \"loading\") body = <Status>Loading…</Status>\n else if (session.status !== \"authenticated\")\n body = props.signInPath ? (\n <SignInRedirect path={props.signInPath} navigation={navigation} />\n ) : (\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"2.5rem 0\",\n }}\n >\n <SignInPanel />\n </div>\n )\n else\n body = (\n <StepUpProvider\n key={session.userId}\n acquireSolanaSigner={props.acquireSolanaSigner}\n >\n <Console {...props} navigation={navigation} theme={theme} />\n </StepUpProvider>\n )\n return (\n <div className={props.className} data-openrails-admin-console=\"\">\n {body}\n </div>\n )\n}\n\nfunction SignInRedirect({\n path,\n navigation,\n}: {\n path: string\n navigation: AdminNavigation\n}) {\n const here = navigation.pathname + navigation.search\n useEffect(() => {\n // A full load: the sign-in page is the host's, outside this console's router.\n window.location.assign(`${path}?return_to=${encodeURIComponent(here)}`)\n }, [path, here])\n return <Status>Signing in…</Status>\n}\n\nconst trimSlashes = (s: string) => s.replace(/^\\/+|\\/+$/g, \"\")\n\nfunction Console({\n authBaseUrl,\n billingBaseUrl,\n merchant,\n basePath = \"/admin\",\n navigation,\n appearance,\n language,\n users: host = {},\n theme,\n}: AdminConsoleProps & { navigation: AdminNavigation; theme: string }) {\n const auth = useAuthClient()\n const guard = useStepUpGuard()\n const users = useUsersAdminAccess({\n auth,\n baseUrl: authBaseUrl,\n tenantId: host.tenantId,\n })\n const root = useGroupAdminAccess({\n auth,\n baseUrl: authBaseUrl,\n group: \"root\",\n })\n const billing = useBillingAdminAccess({\n baseUrl: billingBaseUrl,\n auth,\n merchant,\n })\n const base = `/${trimSlashes(basePath)}`\n const inside = navigation.pathname.startsWith(`${base}/`)\n ? trimSlashes(navigation.pathname.slice(base.length))\n : \"\"\n const onBilling = inside === \"billing\" || inside.startsWith(\"billing/\")\n const accounts = users.any || root.any\n const grant = billing.data\n const customers = !!grant && grant.admin !== \"none\"\n const billable =\n !!grant &&\n (customers ||\n grant.catalog !== \"none\" ||\n grant.merchant_config !== \"none\" ||\n grant.metrics)\n const checking =\n users.status === \"loading\" || root.status === \"loading\" || billing.isPending\n const landing = !checking && !accounts && billable && !onBilling\n useEffect(() => {\n if (landing) navigation.navigate(`${base}/billing`, { replace: true })\n }, [landing, navigation, base])\n\n if (checking) return <Status>Loading…</Status>\n if (!accounts && !billable) {\n const failed = users.error ?? root.error ?? billing.error\n return (\n <Status>\n {failed\n ? \"Your access could not be checked.\"\n : \"You have no administrative access.\"}\n {failed && (\n <>\n {\" \"}\n <button\n type=\"button\"\n className=\"underline underline-offset-4\"\n onClick={() => {\n users.reload()\n root.reload()\n billing.refetch()\n }}\n >\n Try again\n </button>\n </>\n )}\n </Status>\n )\n }\n const connection = { baseUrl: billingBaseUrl, auth, merchant }\n const tabs = [\n accounts && { href: base, label: \"Accounts\", current: !onBilling },\n billable && {\n href: `${base}/billing`,\n label: \"Billing\",\n current: onBilling,\n },\n ].filter((tab) => !!tab)\n return (\n <>\n {tabs.length > 1 && (\n <nav\n aria-label=\"Administration\"\n className=\"orba mb-6 flex gap-1 border-b px-4\"\n data-orba-theme={theme}\n style={appearanceStyle(appearance, \"orba\")}\n >\n {tabs.map((tab) => (\n <a\n key={tab.href}\n href={tab.href}\n aria-current={tab.current ? \"page\" : undefined}\n onClick={(event) => {\n if (event.metaKey || event.ctrlKey || event.shiftKey) return\n event.preventDefault()\n navigation.navigate(tab.href)\n }}\n className={[\n \"-mb-px border-b-2 px-3 py-2 text-sm font-medium\",\n tab.current\n ? \"border-primary text-foreground\"\n : \"border-transparent text-muted-foreground hover:text-foreground\",\n ].join(\" \")}\n >\n {tab.label}\n </a>\n ))}\n </nav>\n )}\n {onBilling || !accounts ? (\n billable && (\n <BillingAdmin\n {...connection}\n basePath={`${base}/billing`}\n navigation={navigation}\n userHref={\n users.users.read\n ? (id) => `${base}/users/${encodeURIComponent(id)}`\n : undefined\n }\n appearance={appearance}\n />\n )\n ) : (\n <div style={{ padding: \"0 1.5rem 1.5rem\" }}>\n <AuthAdmin\n auth={auth}\n baseUrl={authBaseUrl}\n basePath={base}\n navigation={navigation}\n guard={guard}\n appearance={{ theme: appearance?.theme ?? \"inherit\" }}\n language={language}\n users={\n customers\n ? {\n ...host,\n userPanels: (user) => (\n <>\n <BillingCustomerSummary\n {...connection}\n key={user.id}\n customer={user.id}\n appearance={appearance}\n href={`${base}/billing/customers/${encodeURIComponent(user.id)}`}\n />\n {host.userPanels?.(user)}\n </>\n ),\n confirmWarnings: async (user, action) => {\n const [billed, own] = await Promise.all([\n loadBillingConfirmWarnings({\n ...connection,\n customer: user.id,\n }),\n host.confirmWarnings?.(user, action),\n ])\n return [...billed, ...(own == null ? [] : [own].flat())]\n },\n }\n : host\n }\n />\n </div>\n )}\n </>\n )\n}\n\nfunction Status({ children }: { children: ReactNode }) {\n return (\n <p role=\"status\" style={{ padding: \"1.5rem\" }}>\n {children}\n </p>\n )\n}\n","/** English message keys. Override individual entries with BillingAdmin.messages. */\nexport const billingAdminMessages = {\n \"Sold by OpenRails\": \"Sold by OpenRails\",\n \"OpenRails bills this price through your card vault and charge PSPs, and on Solana. Provider catalogs are not synchronized. Hosted one-time Stripe payments use inline checkout objects.\":\n \"OpenRails bills this price through your card vault and charge PSPs, and on Solana. Provider catalogs are not synchronized. Hosted one-time Stripe payments use inline checkout objects.\",\n \"Sold via: \": \"Sold via: \",\n \"every method you have\": \"every method you have\",\n \"Solana plan \": \"Solana plan \",\n \"Owned by its provider\": \"Owned by its provider\",\n \"The provider owns and runs this price; OpenRails read its terms and never writes it. Verify asks the provider what it holds now, and changes nothing.\":\n \"The provider owns and runs this price; OpenRails read its terms and never writes it. Verify asks the provider what it holds now, and changes nothing.\",\n \"'s price\": \"'s price\",\n \" Edit widget\": \" Edit widget\",\n \" Price\": \" Price\",\n \" Product\": \" Product\",\n \" Product access\": \" Product access\",\n \" Refund\": \" Refund\",\n \" affected · requires human confirm\": \" affected · requires human confirm\",\n \" approved\": \" approved\",\n \" balance\": \" balance\",\n \" blocked and \": \" blocked and \",\n \" corrections Apply approves\": \" corrections Apply approves\",\n \" credentials · \": \" credentials · \",\n \" days away. Card networks require that much notice before a price goes up. You can change the number in Settings.\":\n \" days away. Card networks require that much notice before a price goes up. You can change the number in Settings.\",\n \" days. Pick a shorter range.\": \" days. Pick a shorter range.\",\n \" dismissed\": \" dismissed\",\n \" is not a supported currency.\": \" is not a supported currency.\",\n \" left alone because another change was already scheduled for them.\":\n \" left alone because another change was already scheduled for them.\",\n \" linked; \": \" linked; \",\n \" more\": \" more\",\n \" of\": \" of\",\n \" of \": \" of \",\n \" of 3:\": \" of 3:\",\n \" of them end access, move money or write to a provider.\":\n \" of them end access, move money or write to a provider.\",\n \" on \": \" on \",\n \" open proposals\": \" open proposals\",\n \" rail. Remaining refundable: \": \" rail. Remaining refundable: \",\n \" requests.\": \" requests.\",\n \" seats.\": \" seats.\",\n \" subscription\": \" subscription\",\n \" superseded\": \" superseded\",\n \" to\": \" to\",\n \" to \": \" to \",\n \" to confirm\": \" to confirm\",\n \" to delete, in \": \" to delete, in \",\n \" to set, \": \" to set, \",\n \" to this customer.\": \" to this customer.\",\n \" unmatched or conflicting stay staged.\":\n \" unmatched or conflicting stay staged.\",\n \" were refused: \": \" were refused: \",\n \" with this shape.\": \" with this shape.\",\n \" · applied \": \" · applied \",\n \" · due \": \" · due \",\n \" · exp \": \" · exp \",\n \" · last seen\": \" · last seen\",\n \" · owed\": \" · owed\",\n \" · since \": \" · since \",\n \" · theirs\": \" · theirs\",\n \" · txn\": \" · txn\",\n '\"Not sent to provider\" is fixed by publishing the catalog. Everything else is fixed under Settings, Payment providers.':\n '\"Not sent to provider\" is fixed by publishing the catalog. Everything else is fixed under Settings, Payment providers.',\n \", an edit set\": \", an edit set\",\n \", before another action.\": \", before another action.\",\n \", deleted: \": \", deleted: \",\n \".\": \".\",\n \". Active holds may prevent revocation. Payment refunds are managed separately.\":\n \". Active holds may prevent revocation. Payment refunds are managed separately.\",\n \". Currency and interval stay locked to the current price.\":\n \". Currency and interval stay locked to the current price.\",\n \"/app/usage-events\": \"/app/usage-events\",\n \"1 day\": \"1 day\",\n \"30 days\": \"30 days\",\n \"365 days\": \"365 days\",\n \"7 days\": \"7 days\",\n \"90 days\": \"90 days\",\n \": the batch says\": \": the batch says\",\n \": yours \": \": yours \",\n \"A CSV file with the header mapping,key,customer maps your own identifiers to customers. An empty customer deletes that mapping.\":\n \"A CSV file with the header mapping,key,customer maps your own identifiers to customers. An empty customer deletes that mapping.\",\n \"A collection of this order is in progress. It must finish, or be resolved with \":\n \"A collection of this order is in progress. It must finish, or be resolved with \",\n \"A manual link wins over every rule.\": \"A manual link wins over every rule.\",\n \"A newer import of this PSP supersedes this one: link and apply \":\n \"A newer import of this PSP supersedes this one: link and apply \",\n \"A price going down needs no notice, so today is fine.\":\n \"A price going down needs no notice, so today is fine.\",\n \"A product is the thing a customer gets. You set what it costs afterwards, by adding a price to it.\":\n \"A product is the thing a customer gets. You set what it costs afterwards, by adding a price to it.\",\n \"A reprice_scheduled notice is queued for every affected subscriber as soon as you confirm.\":\n \"A reprice_scheduled notice is queued for every affected subscriber as soon as you confirm.\",\n \"Access duration\": \"Access duration\",\n \"Access, not paying\": \"Access, not paying\",\n \"Account ID\": \"Account ID\",\n \"Accrual cap\": \"Accrual cap\",\n \"Accrue from another meter\": \"Accrue from another meter\",\n Action: \"Action\",\n Active: \"Active\",\n \"Active subscriptions\": \"Active subscriptions\",\n Activity: \"Activity\",\n \"Add PSP\": \"Add PSP\",\n \"Add a PSP\": \"Add a PSP\",\n \"Add cell\": \"Add cell\",\n \"Add contact\": \"Add contact\",\n \"Add credit in \": \"Add credit in \",\n \"Add dimension\": \"Add dimension\",\n \"Add filter\": \"Add filter\",\n \"Add tax detail\": \"Add tax detail\",\n \"Add tier\": \"Add tier\",\n Aggregation: \"Aggregation\",\n \"Alert email\": \"Alert email\",\n All: \"All\",\n \"All PSPs\": \"All PSPs\",\n \"All kinds\": \"All kinds\",\n \"All open proposals\": \"All open proposals\",\n \"All origins\": \"All origins\",\n \"All owners\": \"All owners\",\n \"All rails\": \"All rails\",\n \"All reasons\": \"All reasons\",\n \"All statuses\": \"All statuses\",\n Allowance: \"Allowance\",\n \"Also revoke access immediately\": \"Also revoke access immediately\",\n \"Also revoke granted access\": \"Also revoke granted access\",\n Amount: \"Amount\",\n \"Amount (\": \"Amount (\",\n Applied: \"Applied\",\n Apply: \"Apply\",\n \"Apply again\": \"Apply again\",\n \"Apply catalog\": \"Apply catalog\",\n \"Apply catalog changes\": \"Apply catalog changes\",\n \"Apply filters\": \"Apply filters\",\n \"Apply import\": \"Apply import\",\n \"Apply queued\": \"Apply queued\",\n \"Apply reviewed batch\": \"Apply reviewed batch\",\n \"Approvals and dismissals need a signed-in person: an API key or service token cannot decide them.\":\n \"Approvals and dismissals need a signed-in person: an API key or service token cannot decide them.\",\n Approve: \"Approve\",\n \"Approve \": \"Approve \",\n Archive: \"Archive\",\n Ask: \"Ask\",\n \"Ask an administrator for a role that includes it.\":\n \"Ask an administrator for a role that includes it.\",\n \"Attempt not found.\": \"Attempt not found.\",\n Attempted: \"Attempted\",\n Attempts: \"Attempts\",\n \"Available balance\": \"Available balance\",\n Back: \"Back\",\n \"Back to metering\": \"Back to metering\",\n Balance: \"Balance\",\n \"Batch receipt\": \"Batch receipt\",\n Billing: \"Billing\",\n \"Billing contacts\": \"Billing contacts\",\n \"Billing interval\": \"Billing interval\",\n \"Billing support\": \"Billing support\",\n \"Billing URL\": \"Billing URL\",\n \"Can this be bought?\": \"Can this be bought?\",\n Cancel: \"Cancel\",\n \"Cancel subscription\": \"Cancel subscription\",\n \"Cancel this migration?\": \"Cancel this migration?\",\n Canceled: \"Canceled\",\n Card: \"Card\",\n \"Card verifications\": \"Card verifications\",\n Catalog: \"Catalog\",\n \"Catalog document\": \"Catalog document\",\n \"Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator.\":\n \"Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator.\",\n \"Catalog updates are disabled. The console is read-only.\":\n \"Catalog updates are disabled. The console is read-only.\",\n \"Catalog updates are unavailable. You can still browse products and prices.\":\n \"Catalog updates are unavailable. You can still browse products and prices.\",\n \"Category / reason\": \"Category / reason\",\n Change: \"Change\",\n \"Choose a price\": \"Choose a price\",\n \"Choose a product\": \"Choose a product\",\n Clear: \"Clear\",\n \"Customer id\": \"Customer id\",\n \"Differences a PSP pull found in what OpenRails holds. Nothing changes until a person approves it.\":\n \"Differences a PSP pull found in what OpenRails holds. Nothing changes until a person approves it.\",\n Dismiss: \"Dismiss\",\n \"Dismiss \": \"Dismiss \",\n \"Dismiss provider price\": \"Dismiss provider price\",\n \"Dismissed proposals close without changing anything.\":\n \"Dismissed proposals close without changing anything.\",\n \"Each approved change applies on its own, if what it was based on has not moved.\":\n \"Each approved change applies on its own, if what it was based on has not moved.\",\n \"Each import pulls one PSP read-only and stages what it read. Link and map what it staged, then apply it.\":\n \"Each import pulls one PSP read-only and stages what it read. Link and map what it staged, then apply it.\",\n Effects: \"Effects\",\n Evidence: \"Evidence\",\n Facts: \"Facts\",\n Failed: \"Failed\",\n \"Find a customer with billing\": \"Find a customer with billing\",\n Findings: \"Findings\",\n \"From import \": \"From import \",\n \"Full history\": \"Full history\",\n \"Grants: \": \"Grants: \",\n \"History since\": \"History since\",\n \"History start date\": \"History start date\",\n \"History through \": \"History through \",\n \"Import of \": \"Import of \",\n \"Import records\": \"Import records\",\n Landing: \"Landing\",\n \"Lands the linked records as billing. \":\n \"Lands the linked records as billing. \",\n \"Lines \": \"Lines \",\n Link: \"Link\",\n \"Link record\": \"Link record\",\n \"Link removed: re-linking\": \"Link removed: re-linking\",\n \"Link saved: re-linking\": \"Link saved: re-linking\",\n \"Link to customer\": \"Link to customer\",\n Linking: \"Linking\",\n \"Linking rules\": \"Linking rules\",\n \"Links by the rules of this PSP's latest import:\":\n \"Links by the rules of this PSP's latest import:\",\n \"Listing prices needs catalog read.\": \"Listing prices needs catalog read.\",\n \"Live provider subscriptions OpenRails could not land. Each lands once, by itself, when its cause is fixed.\":\n \"Live provider subscriptions OpenRails could not land. Each lands once, by itself, when its cause is fixed.\",\n Map: \"Map\",\n \"Map provider price\": \"Map provider price\",\n \"Map to product\": \"Map to product\",\n Mapped: \"Mapped\",\n \"Mapped to\": \"Mapped to\",\n \"Mapping a price edits the catalog: it needs \":\n \"Mapping a price edits the catalog: it needs \",\n \"Mappings file\": \"Mappings file\",\n \"Mappings set: \": \"Mappings set: \",\n \"Needs \": \"Needs \",\n \"No PSP has been pulled yet.\": \"No PSP has been pulled yet.\",\n \"No PSP here has a catalog OpenRails observes.\":\n \"No PSP here has a catalog OpenRails observes.\",\n \"No proposals are open.\": \"No proposals are open.\",\n \"No provider prices match.\": \"No provider prices match.\",\n \"No records in this state.\": \"No records in this state.\",\n \"No staged subscription names a plan.\":\n \"No staged subscription names a plan.\",\n \"Not observed yet: read from the provider when mapped\":\n \"Not observed yet: read from the provider when mapped\",\n \"Notes (optional)\": \"Notes (optional)\",\n \"Notes (required)\": \"Notes (required)\",\n \"Nothing is parked.\": \"Nothing is parked.\",\n Object: \"Object\",\n \"Offer as a tier-change target\": \"Offer as a tier-change target\",\n \"PSP imports\": \"PSP imports\",\n Parked: \"Parked\",\n \"Parked subscriptions\": \"Parked subscriptions\",\n Plan: \"Plan\",\n \"Plans its subscriptions name\": \"Plans its subscriptions name\",\n \"Price cleared: re-linking\": \"Price cleared: re-linking\",\n \"Price dismissed\": \"Price dismissed\",\n \"Price key\": \"Price key\",\n \"Price mapped\": \"Price mapped\",\n \"Price saved: re-linking\": \"Price saved: re-linking\",\n \"Prices each PSP's own catalog holds, as OpenRails last observed them. A subscription on an unmapped price cannot land: map it to a product, or dismiss it as not yours.\":\n \"Prices each PSP's own catalog holds, as OpenRails last observed them. A subscription on an unmapped price cannot land: map it to a product, or dismiss it as not yours.\",\n Progress: \"Progress\",\n Proposals: \"Proposals\",\n \"Provider price\": \"Provider price\",\n \"Provider prices\": \"Provider prices\",\n \"Provider ref\": \"Provider ref\",\n \"Provider subscription\": \"Provider subscription\",\n \"Pulled: ready to apply\": \"Pulled: ready to apply\",\n \"Re-link\": \"Re-link\",\n \"Re-link an import to apply them:\": \"Re-link an import to apply them:\",\n \"Re-link requested\": \"Re-link requested\",\n \"Reading catalog and roster\": \"Reading catalog and roster\",\n \"Reads the PSP's catalog, customers, subscriptions and history, read-only. Nothing lands before you apply it.\":\n \"Reads the PSP's catalog, customers, subscriptions and history, read-only. Nothing lands before you apply it.\",\n \"Pull PSP\": \"Pull PSP\",\n \"Pull a PSP\": \"Pull a PSP\",\n \"Pull started\": \"Pull started\",\n \"Record state\": \"Record state\",\n Records: \"Records\",\n Reload: \"Reload\",\n Retired: \"Retired\",\n \"Review records\": \"Review records\",\n \"Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told.\":\n \"Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told.\",\n \"Change payment method\": \"Change payment method\",\n \"Change price\": \"Change price\",\n \"Change price for \": \"Change price for \",\n \"Change subscription\": \"Change subscription\",\n \"Change the title, chart type or date range behavior. The query stays the same.\":\n \"Change the title, chart type or date range behavior. The query stays the same.\",\n Channel: \"Channel\",\n \"Charged twice\": \"Charged twice\",\n \"Chart type\": \"Chart type\",\n \"Checking your catalog…\": \"Checking your catalog…\",\n \"Choose a method\": \"Choose a method\",\n Churn: \"Churn\",\n \"Clear all\": \"Clear all\",\n \"Clear customer\": \"Clear customer\",\n \"Clear customer filter\": \"Clear customer filter\",\n \"Clear filters\": \"Clear filters\",\n Close: \"Close\",\n Code: \"Code\",\n Collected: \"Collected\",\n \"Collection method\": \"Collection method\",\n \"Collection:\": \"Collection:\",\n \"Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again.\":\n \"Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again.\",\n \"Console home\": \"Console home\",\n Contact: \"Contact\",\n \"Continue with payment provider\": \"Continue with payment provider\",\n \"Could not load the available plans.\": \"Could not load the available plans.\",\n \"Count events\": \"Count events\",\n \"Count uses one unit for every matching event.\":\n \"Count uses one unit for every matching event.\",\n Coverage: \"Coverage\",\n \"Create a meter to describe the events your application will report and bill.\":\n \"Create a meter to describe the events your application will report and bill.\",\n \"Create or activate a product first\": \"Create or activate a product first\",\n Created: \"Created\",\n \"Creating this meter does not send events. The host application must report idempotent usage to\":\n \"Creating this meter does not send events. The host application must report idempotent usage to\",\n Credentials: \"Credentials\",\n \"Credit and trust\": \"Credit and trust\",\n \"Credit grants\": \"Credit grants\",\n \"Credit limit\": \"Credit limit\",\n \"Credit transaction ledger\": \"Credit transaction ledger\",\n Credits: \"Credits\",\n Currency: \"Currency\",\n \"Currency · interval\": \"Currency · interval\",\n \"Current amount\": \"Current amount\",\n \"Current credentials are never shown. A new one is validated against the live provider before it is stored; if that check fails, nothing is written. Leave a field blank to keep the credential it holds now.\":\n \"Current credentials are never shown. A new one is validated against the live provider before it is stored; if that check fails, nothing is written. Leave a field blank to keep the credential it holds now.\",\n \"Current period\": \"Current period\",\n \"Custom range\": \"Custom range\",\n Customer: \"Customer\",\n \"Customer ID\": \"Customer ID\",\n \"Customer controls\": \"Customer controls\",\n \"Customer lookup\": \"Customer lookup\",\n \"Customer not found.\": \"Customer not found.\",\n \"Customer-facing merchant details used on invoices and emails.\":\n \"Customer-facing merchant details used on invoices and emails.\",\n Customers: \"Customers\",\n Cycles: \"Cycles\",\n \"Daily subscriptions\": \"Daily subscriptions\",\n Dashboard: \"Dashboard\",\n Date: \"Date\",\n \"Date range\": \"Date range\",\n \"Days are added after any access they already have.\":\n \"Days are added after any access they already have.\",\n \"Decline reasons\": \"Decline reasons\",\n Declined: \"Declined\",\n Declines: \"Declines\",\n \"Default price\": \"Default price\",\n \"Default rate\": \"Default rate\",\n \"Default · \": \"Default · \",\n \"Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API.\":\n \"Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API.\",\n \"Define usage streams and the default rates charged when usage is recorded. Applications report the events separately.\":\n \"Define usage streams and the default rates charged when usage is recorded. Applications report the events separately.\",\n \"Delete webhook\": \"Delete webhook\",\n Description: \"Description\",\n \"Description (optional)\": \"Description (optional)\",\n Dimension: \"Dimension\",\n Dimensions: \"Dimensions\",\n Directory: \"Directory\",\n Discord: \"Discord\",\n \"Dismiss answer\": \"Dismiss answer\",\n \"Display name\": \"Display name\",\n \"Displays the mobile sidebar.\": \"Displays the mobile sidebar.\",\n Divisor: \"Divisor\",\n Down: \"Down\",\n \"Download CSV\": \"Download CSV\",\n \"Draft: new price\": \"Draft: new price\",\n \"Draft: price change\": \"Draft: price change\",\n Due: \"Due\",\n \"Due now\": \"Due now\",\n \"Due: \": \"Due: \",\n Dunning: \"Dunning\",\n \"Dunning recovery by days since the first failure\":\n \"Dunning recovery by days since the first failure\",\n \"Dunning recovery by retry (share of failed cycles)\":\n \"Dunning recovery by retry (share of failed cycles)\",\n \"Dunning recovery rate\": \"Dunning recovery rate\",\n Edit: \"Edit\",\n \"Edit batch\": \"Edit batch\",\n \"Edit definition\": \"Edit definition\",\n \"Edit widget\": \"Edit widget\",\n Effective: \"Effective\",\n \"Effective date\": \"Effective date\",\n Email: \"Email\",\n \"Email delivery\": \"Email delivery\",\n Enabled: \"Enabled\",\n End: \"End\",\n \"Enter 0 to turn credit off.\": \"Enter 0 to turn credit off.\",\n Entitlements: \"Entitlements\",\n Environment: \"Environment\",\n Event: \"Event\",\n \"Event contract\": \"Event contract\",\n \"Event filters\": \"Event filters\",\n \"Event type\": \"Event type\",\n \"Executes the refund at the \": \"Executes the refund at the \",\n \"Existing subscribers keep the current price.\":\n \"Existing subscribers keep the current price.\",\n Expired: \"Expired\",\n Expires: \"Expires\",\n \"Expires (optional)\": \"Expires (optional)\",\n Failure: \"Failure\",\n Filter: \"Filter\",\n \"Filter meters on this page\": \"Filter meters on this page\",\n \"Filter this page…\": \"Filter this page…\",\n \"Find a customer by name or email, then pick a currency.\":\n \"Find a customer by name or email, then pick a currency.\",\n \"First outcome\": \"First outcome\",\n \"First page\": \"First page\",\n \"Fixed included units\": \"Fixed included units\",\n \"Flat amount\": \"Flat amount\",\n Format: \"Format\",\n \"Free units\": \"Free units\",\n \"From email\": \"From email\",\n \"Generic (your own receiver)\": \"Generic (your own receiver)\",\n \"Give this customer one of your products without a payment. They hold its keys while the grant lasts, including keys you add to the product later.\":\n \"Give this customer one of your products without a payment. They hold its keys while the grant lasts, including keys you add to the product later.\",\n Graduated: \"Graduated\",\n \"Grandfather.\": \"Grandfather.\",\n Grant: \"Grant\",\n \"Grant credit\": \"Grant credit\",\n \"Grant product access\": \"Grant product access\",\n \"Grants · \": \"Grants · \",\n Health: \"Health\",\n \"How long it lasts\": \"How long it lasts\",\n \"Human-readable quantity shown in billing.\":\n \"Human-readable quantity shown in billing.\",\n Ignore: \"Ignore\",\n Included: \"Included\",\n \"Included units\": \"Included units\",\n \"Included units per period\": \"Included units per period\",\n \"Included usage\": \"Included usage\",\n \"Invoice memo\": \"Invoice memo\",\n \"Invoice profile\": \"Invoice profile\",\n \"Invoice profile saved. Billed orders were not changed.\":\n \"Invoice profile saved. Billed orders were not changed.\",\n \"Keep it\": \"Keep it\",\n \"Keep its own range\": \"Keep its own range\",\n \"Kept with the scheduled change.\": \"Kept with the scheduled change.\",\n Key: \"Key\",\n Kind: \"Kind\",\n \"Kind / reason\": \"Kind / reason\",\n \"Last 3 months\": \"Last 3 months\",\n \"Last 30 days\": \"Last 30 days\",\n \"Last 6 months\": \"Last 6 months\",\n \"Last 7 days\": \"Last 7 days\",\n \"Last 90 days\": \"Last 90 days\",\n \"Last active\": \"Last active\",\n \"Last day (UTC)\": \"Last day (UTC)\",\n \"Last decline\": \"Last decline\",\n \"Last event\": \"Last event\",\n \"Last failure: \": \"Last failure: \",\n \"Last seen\": \"Last seen\",\n \"Last validated \": \"Last validated \",\n \"Last year\": \"Last year\",\n \"Leave blank to use the meter key.\": \"Leave blank to use the meter key.\",\n \"Leave the final limit blank for the unbounded tier.\":\n \"Leave the final limit blank for the unbounded tier.\",\n Lines: \"Lines\",\n \"Loading billing permissions…\": \"Loading billing permissions…\",\n \"Loading billing…\": \"Loading billing…\",\n \"Loading grants…\": \"Loading grants…\",\n \"Loading invoice profile…\": \"Loading invoice profile…\",\n \"Loading order…\": \"Loading order…\",\n \"Loading products…\": \"Loading products…\",\n \"Loading transactions…\": \"Loading transactions…\",\n \"Loading plans…\": \"Loading plans…\",\n \"Loading…\": \"Loading…\",\n \"Logo URL\": \"Logo URL\",\n \"Manual remittance\": \"Manual remittance\",\n \"Matrix cells\": \"Matrix cells\",\n Maximum: \"Maximum\",\n \"Memo: \": \"Memo: \",\n Merchant: \"Merchant\",\n \"Merchant profile\": \"Merchant profile\",\n Merchants: \"Merchants\",\n Meter: \"Meter\",\n \"Meter key\": \"Meter key\",\n Metering: \"Metering\",\n \"Metering access is restricted\": \"Metering access is restricted\",\n \"Metering could not be loaded\": \"Metering could not be loaded\",\n Method: \"Method\",\n \"Migrate.\": \"Migrate.\",\n \"Missed rebills\": \"Missed rebills\",\n Model: \"Model\",\n \"Money for this price would go to\": \"Money for this price would go to\",\n Month: \"Month\",\n \"Monthly renewals\": \"Monthly renewals\",\n More: \"More\",\n \"Move everyone to the new price at their first renewal on or after a date you choose.\":\n \"Move everyone to the new price at their first renewal on or after a date you choose.\",\n \"Must be at least \": \"Must be at least \",\n \"NMI history (before OpenRails recorded attempts)\":\n \"NMI history (before OpenRails recorded attempts)\",\n \"NMI's own transaction history, read daily and kept 25 months. It counts every sender, OpenRails too once it started. One-off sales mix initial sales, upgrades and retries of declined rebills: the history cannot tell them apart. Scheduled rebills are NMI's own charges, each the first try of its period. Rates count authorizations, not buyers.\":\n \"NMI's own transaction history, read daily and kept 25 months. It counts every sender, OpenRails too once it started. One-off sales mix initial sales, upgrades and retries of declined rebills: the history cannot tell them apart. Scheduled rebills are NMI's own charges, each the first try of its period. Rates count authorizations, not buyers.\",\n \"NMI-owned\": \"NMI-owned\",\n \"NMI-scheduled rebills\": \"NMI-scheduled rebills\",\n Name: \"Name\",\n \"Name, such as tax_id\": \"Name, such as tax_id\",\n Nearest: \"Nearest\",\n \"Needs attention\": \"Needs attention\",\n \"Needs card\": \"Needs card\",\n \"Net change\": \"Net change\",\n \"Never expires\": \"Never expires\",\n New: \"New\",\n \"New amount (major units)\": \"New amount (major units)\",\n \"New batch\": \"New batch\",\n \"New cards by AVS result\": \"New cards by AVS result\",\n \"New cards by CVV result\": \"New cards by CVV result\",\n \"New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one.\":\n \"New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one.\",\n \"New merchant\": \"New merchant\",\n \"New plan\": \"New plan\",\n \"New price\": \"New price\",\n \"New-card purchase failure rate\": \"New-card purchase failure rate\",\n \"New-card decline rate\": \"New-card decline rate\",\n \"New-card decline rate by week\": \"New-card decline rate by week\",\n Next: \"Next\",\n \"Next attempt: \": \"Next attempt: \",\n \"Next billing date\": \"Next billing date\",\n \"Next charge\": \"Next charge\",\n \"Next page\": \"Next page\",\n \"No NMI history yet: it is read daily.\":\n \"No NMI history yet: it is read daily.\",\n \"No PSPs configured.\": \"No PSPs configured.\",\n \"No actions are available for your permissions and this order's state.\":\n \"No actions are available for your permissions and this order's state.\",\n \"No active products are available.\": \"No active products are available.\",\n \"No active subscriptions.\": \"No active subscriptions.\",\n \"No allowance\": \"No allowance\",\n \"No billing activity yet.\": \"No billing activity yet.\",\n \"No credit grants in this currency.\": \"No credit grants in this currency.\",\n \"No declines in this range.\": \"No declines in this range.\",\n \"No default rate. Usage is recorded but is not billed by this meter.\":\n \"No default rate. Usage is recorded but is not billed by this meter.\",\n \"No eligible recurring plans share this tier group and currency.\":\n \"No eligible recurring plans share this tier group and currency.\",\n \"No entitlements.\": \"No entitlements.\",\n \"No history yet.\": \"No history yet.\",\n \"No lines.\": \"No lines.\",\n \"No maximum\": \"No maximum\",\n \"No meters on this page match “\": \"No meters on this page match “\",\n \"No missed rebills in this range.\": \"No missed rebills in this range.\",\n \"No payment methods on file.\": \"No payment methods on file.\",\n \"No payments recorded.\": \"No payments recorded.\",\n \"No payments.\": \"No payments.\",\n \"No prices yet.\": \"No prices yet.\",\n \"No product access.\": \"No product access.\",\n \"No products yet.\": \"No products yet.\",\n \"No provider can take this payment, so nobody can buy this price yet.\":\n \"No provider can take this payment, so nobody can buy this price yet.\",\n \"No provider-scheduled charges in this range.\":\n \"No provider-scheduled charges in this range.\",\n \"No recovered cycles.\": \"No recovered cycles.\",\n \"No refunds.\": \"No refunds.\",\n \"No refusals in NMI's history.\": \"No refusals in NMI's history.\",\n \"No saved payment methods. Add one on the customer page before retrying collection.\":\n \"No saved payment methods. Add one on the customer page before retrying collection.\",\n \"No subscriptions.\": \"No subscriptions.\",\n \"No transactions in this currency.\": \"No transactions in this currency.\",\n \"No currency yet\": \"No currency yet\",\n \"No usage meters yet\": \"No usage meters yet\",\n \"No webhooks configured.\": \"No webhooks configured.\",\n \"No widgets yet\": \"No widgets yet\",\n \"None required\": \"None required\",\n Note: \"Note\",\n \"Notes \": \"Notes \",\n \"Nothing here can be fixed automatically. You can only note why you are leaving it.\":\n \"Nothing here can be fixed automatically. You can only note why you are leaving it.\",\n \"Nothing in this range. Pick a wider range.\":\n \"Nothing in this range. Pick a wider range.\",\n \"Nothing needs attention right now.\": \"Nothing needs attention right now.\",\n \"Notice period\": \"Notice period\",\n \"Notice period (days)\": \"Notice period (days)\",\n Notifications: \"Notifications\",\n \"Once this succeeds, the new credential is used for the next charge and every one after it. Previous webhook signing secrets remain accepted while their required overlap is active.\":\n \"Once this succeeds, the new credential is used for the next charge and every one after it. Previous webhook signing secrets remain accepted while their required overlap is active.\",\n \"One-off sales\": \"One-off sales\",\n \"One-time payment.\": \"One-time payment.\",\n Open: \"Open\",\n \"Open issues\": \"Open issues\",\n \"Open matching list\": \"Open matching list\",\n OpenRails: \"OpenRails\",\n \"OpenRails starts\": \"OpenRails starts\",\n \"OpenRails-owned\": \"OpenRails-owned\",\n \"Operational notifications will stop delivering to this webhook. This cannot be undone.\":\n \"Operational notifications will stop delivering to this webhook. This cannot be undone.\",\n Ops: \"Ops\",\n \"Optional. Only events with one of the listed dimension values are rated.\":\n \"Optional. Only events with one of the listed dimension values are rated.\",\n Order: \"Order\",\n \"Order not found.\": \"Order not found.\",\n Orders: \"Orders\",\n Origin: \"Origin\",\n Original: \"Original\",\n Outcome: \"Outcome\",\n \"Overdue only: still owed past the due date\":\n \"Overdue only: still owed past the due date\",\n \"Overdue usage orders\": \"Overdue usage orders\",\n Overview: \"Overview\",\n \"Overwrite edits\": \"Overwrite edits\",\n Owner: \"Owner\",\n PSP: \"PSP\",\n \"PSP answer\": \"PSP answer\",\n PSPs: \"PSPs\",\n Package: \"Package\",\n \"Package price\": \"Package price\",\n Paid: \"Paid\",\n \"Paste a JSON or YAML catalog batch; products, prices and meters are maps keyed by their key. Each product, price and meter applies whole, unless a field it names was set differently by an edit: it is skipped and listed, and the rest applies. A batch that applied whole is remembered; retries preserve later catalog edits. Omitted records stay unchanged unless prune is true, which archives the omitted ones only batches set.\":\n \"Paste a JSON or YAML catalog batch; products, prices and meters are maps keyed by their key. Each product, price and meter applies whole, unless a field it names was set differently by an edit: it is skipped and listed, and the rest applies. A batch that applied whole is remembered; retries preserve later catalog edits. Omitted records stay unchanged unless prune is true, which archives the omitted ones only batches set.\",\n Paying: \"Paying\",\n \"Paying, no access\": \"Paying, no access\",\n Payment: \"Payment\",\n \"Payment attempts\": \"Payment attempts\",\n \"Payment health\": \"Payment health\",\n \"Payment history\": \"Payment history\",\n \"Payment method\": \"Payment method\",\n \"Payment methods\": \"Payment methods\",\n \"Payment not found.\": \"Payment not found.\",\n \"Payment rail\": \"Payment rail\",\n \"Payment reference\": \"Payment reference\",\n \"Payment terms (days)\": \"Payment terms (days)\",\n Payments: \"Payments\",\n Pending: \"Pending\",\n \"Per unit\": \"Per unit\",\n \"Period ends\": \"Period ends\",\n \"Period maximum\": \"Period maximum\",\n \"Period: \": \"Period: \",\n \"Pick a later date.\": \"Pick a later date.\",\n \"Pick a customer first\": \"Pick a customer first\",\n \"Pick a product\": \"Pick a product\",\n \"Pick a product…\": \"Pick a product…\",\n \"Pick a rail…\": \"Pick a rail…\",\n \"Pick an environment…\": \"Pick an environment…\",\n \"Live: real money\": \"Live: real money\",\n \"Select \": \"Select \",\n \"Select all \": \"Select all \",\n \"Sending request \": \"Sending request \",\n \"Sent in \": \"Sent in \",\n \"Set price\": \"Set price\",\n \"Settings › PSPs\": \"Settings › PSPs\",\n Show: \"Show\",\n \"Show released\": \"Show released\",\n \"Since a date\": \"Since a date\",\n \"Started \": \"Started \",\n Terms: \"Terms\",\n \"Test: the provider's own system, no money moves\":\n \"Test: the provider's own system, no money moves\",\n \"Sandbox: the provider's separate sandbox\":\n \"Sandbox: the provider's separate sandbox\",\n \"Mainnet: real money\": \"Mainnet: real money\",\n \"Devnet: Solana's development network\":\n \"Devnet: Solana's development network\",\n \"Testnet: Solana's test network\": \"Testnet: Solana's test network\",\n \"The customer holds this product already: cancel one at the provider.\":\n \"The customer holds this product already: cancel one at the provider.\",\n \"The provider listed far fewer live subscriptions than OpenRails holds, so nothing was proposed. Check the PSP's account and pull again.\":\n \"The provider listed far fewer live subscriptions than OpenRails holds, so nothing was proposed. Check the PSP's account and pull again.\",\n \"The provider refused this PSP's credentials. Correct them in \":\n \"The provider refused this PSP's credentials. Correct them in \",\n \", then pull again.\": \", then pull again.\",\n \"The provider retired it: it keeps billing its subscriptions and is never sold.\":\n \"The provider retired it: it keeps billing its subscriptions and is never sold.\",\n \"This PSP cannot be read: it is gone, or a credential the pull needs is not declared.\":\n \"This PSP cannot be read: it is gone, or a credential the pull needs is not declared.\",\n Treasury: \"Treasury\",\n \"Gateway ID\": \"Gateway ID\",\n \"Client account number\": \"Client account number\",\n \"Client subaccount\": \"Client subaccount\",\n \"Pick a stored payment method\": \"Pick a stored payment method\",\n \"Pinned to an archived (prior) version\":\n \"Pinned to an archived (prior) version\",\n \"Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.\":\n \"Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.\",\n Preview: \"Preview\",\n \"Previous page\": \"Previous page\",\n \"Previous period\": \"Previous period\",\n Price: \"Price\",\n \"Price each value of one registered dimension separately.\":\n \"Price each value of one registered dimension separately.\",\n \"Price history\": \"Price history\",\n \"Price per divisor\": \"Price per divisor\",\n Prices: \"Prices\",\n \"Pricing model\": \"Pricing model\",\n \"Pricing policies\": \"Pricing policies\",\n Product: \"Product\",\n \"Product access\": \"Product access\",\n \"Product and model\": \"Product and model\",\n Products: \"Products\",\n Provider: \"Provider\",\n \"Provider charges seen by webhook\": \"Provider charges seen by webhook\",\n \"Provider-owned\": \"Provider-owned\",\n Providers: \"Providers\",\n Pull: \"Pull\",\n \"Purchase order\": \"Purchase order\",\n \"Purchase order: \": \"Purchase order: \",\n Purchased: \"Purchased\",\n \"Purchases, subscription renewals and usage billed in arrears: what each owes and how it was paid.\":\n \"Purchases, subscription renewals and usage billed in arrears: what each owes and how it was paid.\",\n Quantity: \"Quantity\",\n Rail: \"Rail\",\n Range: \"Range\",\n Rate: \"Rate\",\n \"Rate preview\": \"Rate preview\",\n \"Read-only: this merchant's configuration comes from a file. Change it there.\":\n \"Read-only: this merchant's configuration comes from a file. Change it there.\",\n Reason: \"Reason\",\n \"Reason (optional)\": \"Reason (optional)\",\n \"Rebill collection rate\": \"Rebill collection rate\",\n \"Rebill first-attempt failure rate\": \"Rebill first-attempt failure rate\",\n \"Rebill first-attempt failure rate by week\":\n \"Rebill first-attempt failure rate by week\",\n \"Recent payments\": \"Recent payments\",\n \"Recently canceled\": \"Recently canceled\",\n Recommendation: \"Recommendation\",\n \"Recommended: \": \"Recommended: \",\n \"Recovered by\": \"Recovered by\",\n \"Recurring billing\": \"Recurring billing\",\n Reference: \"Reference\",\n Refresh: \"Refresh\",\n \"Refresh payment methods\": \"Refresh payment methods\",\n \"Refresh widget\": \"Refresh widget\",\n Refund: \"Refund\",\n \"Refund payment\": \"Refund payment\",\n Refunded: \"Refunded\",\n Refunds: \"Refunds\",\n \"Refusal rate by month\": \"Refusal rate by month\",\n Refused: \"Refused\",\n \"Register event properties used by filters or matrix rates.\":\n \"Register event properties used by filters or matrix rates.\",\n Remaining: \"Remaining\",\n Remove: \"Remove\",\n \"Remove the default rate?\": \"Remove the default rate?\",\n Renewal: \"Renewal\",\n \"Renewal not found.\": \"Renewal not found.\",\n \"Renewal payments, cancellations and churn each calendar month (UTC); churn is the month's cancellations over the subscriptions it began with.\":\n \"Renewal payments, cancellations and churn each calendar month (UTC); churn is the month's cancellations over the subscriptions it began with.\",\n Renewals: \"Renewals\",\n \"Renewing soon\": \"Renewing soon\",\n Renews: \"Renews\",\n \"Replace the default rate?\": \"Replace the default rate?\",\n Reports: \"Reports\",\n Reset: \"Reset\",\n Resolve: \"Resolve\",\n \"Resolve finding\": \"Resolve finding\",\n Result: \"Result\",\n Retry: \"Retry\",\n Reverses: \"Reverses\",\n Review: \"Review\",\n \"Review batch\": \"Review batch\",\n \"Review complete. Applying sends this exact document; this is not a database diff.\":\n \"Review complete. Applying sends this exact document; this is not a database diff.\",\n Revoke: \"Revoke\",\n \"Revoke product access\": \"Revoke product access\",\n \"Revoke remaining credit\": \"Revoke remaining credit\",\n \"Revoke the unspent remainder of\": \"Revoke the unspent remainder of\",\n Revoked: \"Revoked\",\n Rotate: \"Rotate\",\n \"Rotate \": \"Rotate \",\n Rounding: \"Rounding\",\n \"Rows per page\": \"Rows per page\",\n \"Save changes\": \"Save changes\",\n \"Saved payment method\": \"Saved payment method\",\n \"Search customer email, ref, or id…\": \"Search customer email, ref, or id…\",\n \"Search email, username, name or id…\": \"Search email, username, name or id…\",\n Seats: \"Seats\",\n \"Select a merchant to view its billing.\":\n \"Select a merchant to view its billing.\",\n \"Select dimension\": \"Select dimension\",\n \"Select product\": \"Select product\",\n \"Send alerts to Discord, Slack, or your own endpoint.\":\n \"Send alerts to Discord, Slack, or your own endpoint.\",\n \"Send email alerts to this address.\": \"Send email alerts to this address.\",\n \"Set how much notice customers receive before a price increase.\":\n \"Set how much notice customers receive before a price increase.\",\n \"Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units.\":\n \"Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units.\",\n Settings: \"Settings\",\n Severity: \"Severity\",\n Share: \"Share\",\n Sidebar: \"Sidebar\",\n Since: \"Since\",\n \"Skipped objects\": \"Skipped objects\",\n Slack: \"Slack\",\n Source: \"Source\",\n \"Source meter\": \"Source meter\",\n Spent: \"Spent\",\n \"Stable identifier. It cannot be renamed after creation.\":\n \"Stable identifier. It cannot be renamed after creation.\",\n Start: \"Start\",\n Started: \"Started\",\n State: \"State\",\n Status: \"Status\",\n \"Status: \": \"Status: \",\n \"Step \": \"Step \",\n \"Still matches\": \"Still matches\",\n Subject: \"Subject\",\n Subscription: \"Subscription\",\n \"Subscription not found.\": \"Subscription not found.\",\n \"Subscription:\": \"Subscription:\",\n Subscriptions: \"Subscriptions\",\n \"Subscriptions started and canceled each day (UTC), newest first.\":\n \"Subscriptions started and canceled each day (UTC), newest first.\",\n \"Sum a numeric field\": \"Sum a numeric field\",\n \"Subscribe URL\": \"Subscribe URL\",\n \"Support URL\": \"Support URL\",\n Synced: \"Synced\",\n \"Take the product back\": \"Take the product back\",\n \"Tax details\": \"Tax details\",\n \"Terminal cancellation at the payment rail. This is a last resort. Dunning parks subscriptions as past_due without losing entitlements.\":\n \"Terminal cancellation at the payment rail. This is a last resort. Dunning parks subscriptions as past_due without losing entitlements.\",\n \"Terms and billing facts for future usage orders. Billed orders keep their original snapshots. Tax details are recorded; no tax is calculated.\":\n \"Terms and billing facts for future usage orders. Billed orders keep their original snapshots. Tax details are recorded; no tax is calculated.\",\n \"The accounts this merchant takes payments through, one or more per rail.\":\n \"The accounts this merchant takes payments through, one or more per rail.\",\n \"The customer loses its entitlements now. The grant stays on record with your reason.\":\n \"The customer loses its entitlements now. The grant stays on record with your reason.\",\n \"The customer's default card\": \"The customer's default card\",\n \"The daily report covers at most \": \"The daily report covers at most \",\n \"The keys of the products this customer holds now.\":\n \"The keys of the products this customer holds now.\",\n \"The payment provider calculates the final prorated amount.\":\n \"The payment provider calculates the final prorated amount.\",\n \"The payment provider hasn't confirmed this order's payment yet. It settles once the provider shows the result, or when it is resolved with \":\n \"The payment provider hasn't confirmed this order's payment yet. It settles once the provider shows the result, or when it is resolved with \",\n \"Their reference\": \"Their reference\",\n \"There were no providers to consider.\":\n \"There were no providers to consider.\",\n \"These are the customer's invoice profile when the order was billed. Editing the profile affects later orders.\":\n \"These are the customer's invoice profile when the order was billed. Editing the profile affects later orders.\",\n \"These terms cannot be changed later. To charge a different amount, create another price and deactivate this one.\":\n \"These terms cannot be changed later. To charge a different amount, create another price and deactivate this one.\",\n \"This billing page does not exist.\": \"This billing page does not exist.\",\n \"This is a price\": \"This is a price\",\n \"This meter uses an aggregation that the billing engine cannot rate.\":\n \"This meter uses an aggregation that the billing engine cannot rate.\",\n Tier: \"Tier\",\n \"Tier group\": \"Tier group\",\n \"Tier mode\": \"Tier mode\",\n \"Tier rank\": \"Tier rank\",\n Tiered: \"Tiered\",\n Tiers: \"Tiers\",\n Title: \"Title\",\n \"Toggle Sidebar\": \"Toggle Sidebar\",\n \"Top refusal reasons\": \"Top refusal reasons\",\n Total: \"Total\",\n \"Transaction ledger · \": \"Transaction ledger · \",\n \"Trust level\": \"Trust level\",\n \"Try again\": \"Try again\",\n \"Try again. If the problem continues, check the OpenRails API logs.\":\n \"Try again. If the problem continues, check the OpenRails API logs.\",\n Type: \"Type\",\n \"Type \": \"Type \",\n USD: \"USD\",\n Unit: \"Unit\",\n \"Unit price\": \"Unit price\",\n \"Units per package\": \"Units per package\",\n Unlink: \"Unlink\",\n Unmapped: \"Unmapped\",\n Unpaid: \"Unpaid\",\n \"Until a date\": \"Until a date\",\n Unverified: \"Unverified\",\n Up: \"Up\",\n Updated: \"Updated\",\n Upload: \"Upload\",\n \"Upload mappings\": \"Upload mappings\",\n \"Upper limit\": \"Upper limit\",\n \"Usage billed\": \"Usage billed\",\n \"Use matrix rates\": \"Use matrix rates\",\n \"Used for every customer.\": \"Used for every customer.\",\n Username: \"Username\",\n Value: \"Value\",\n \"Value property\": \"Value property\",\n Values: \"Values\",\n View: \"View\",\n \"View all \": \"View all \",\n \"View billing details\": \"View billing details\",\n \"View customer usage orders\": \"View customer usage orders\",\n \"View user account\": \"View user account\",\n Volume: \"Volume\",\n Webhook: \"Webhook\",\n \"Webhook URL\": \"Webhook URL\",\n Webhooks: \"Webhooks\",\n \"What the customer asked for\": \"What the customer asked for\",\n \"Which provider would take the money if someone bought this right now, and why the others were passed over. This asks the same question a real purchase asks, without starting one.\":\n \"Which provider would take the money if someone bought this right now, and why the others were passed over. This asks the same question a real purchase asks, without starting one.\",\n Why: \"Why\",\n \"Why it was granted\": \"Why it was granted\",\n \"Widget menu\": \"Widget menu\",\n \"Widget title\": \"Widget title\",\n \"You're all caught up.\": \"You're all caught up.\",\n \"Your directory holds no contact for this customer.\":\n \"Your directory holds no contact for this customer.\",\n \"Your role does not have permission to read the merchant catalog.\":\n \"Your role does not have permission to read the merchant catalog.\",\n \"access revocations\": \"access revocations\",\n active: \"active\",\n \"active-seats\": \"active-seats\",\n \"alerts@example.com\": \"alerts@example.com\",\n \"api-tokens\": \"api-tokens\",\n archived: \"archived\",\n \"at the first renewal from \": \"at the first renewal from \",\n blocked: \"blocked\",\n breadcrumb: \"breadcrumb\",\n \"changed cards\": \"changed cards\",\n conflict: \"conflict\",\n customer: \"customer\",\n default: \"default\",\n deleted: \"deleted\",\n disabled: \"disabled\",\n \"drafted by copilot\": \"drafted by copilot\",\n \"draining (\": \"draining (\",\n \"e.g. #billing-alerts\": \"e.g. #billing-alerts\",\n \"ends access\": \"ends access\",\n \"eu, us\": \"eu, us\",\n finding: \"finding\",\n \"gpt-5\": \"gpt-5\",\n held: \"held\",\n \"held \": \"held \",\n \"https://example.com/account\": \"https://example.com/account\",\n \"https://example.com/logo.png\": \"https://example.com/logo.png\",\n \"https://example.com/subscribe\": \"https://example.com/subscribe\",\n \"https://example.com/support\": \"https://example.com/support\",\n imported: \"imported\",\n inactive: \"inactive\",\n \"its finding is ignored; subscriptions on it stay parked.\":\n \"its finding is ignored; subscriptions on it stay parked.\",\n \"key: \": \"key: \",\n linked: \"linked\",\n \"metadata.model\": \"metadata.model\",\n \"missed charges\": \"missed charges\",\n \"missed refunds\": \"missed refunds\",\n model: \"model\",\n moved: \"moved\",\n \"moves money\": \"moves money\",\n \"no data in range\": \"no data in range\",\n \"no entitlements\": \"no entitlements\",\n \"no measure\": \"no measure\",\n \"of \": \"of \",\n offered: \"offered\",\n \"openrails intents resolve\": \"openrails intents resolve\",\n \"premium, downloads\": \"premium, downloads\",\n \"premium-monthly\": \"premium-monthly\",\n \"price \": \"price \",\n \"prior version\": \"prior version\",\n \"provider schedules to cancel\": \"provider schedules to cancel\",\n \"provider write\": \"provider write\",\n \"read-only\": \"read-only\",\n \"refunds after a cancel\": \"refunds after a cancel\",\n \"refused: \": \"refused: \",\n \"renewals to adopt\": \"renewals to adopt\",\n retired: \"retired\",\n \"review only\": \"review only\",\n selected: \"selected\",\n skipped: \"skipped\",\n \"skipped renewals to collect\": \"skipped renewals to collect\",\n subscription: \"subscription\",\n \"subscription corrections\": \"subscription corrections\",\n \"subscriptions ended at the provider\": \"subscriptions ended at the provider\",\n \"subscriptions to create\": \"subscriptions to create\",\n \"that import\": \"that import\",\n \"token.used\": \"token.used\",\n tokens: \"tokens\",\n transaction: \"transaction\",\n unmatched: \"unmatched\",\n \"via \": \"via \",\n \"waiting for import\": \"waiting for import\",\n \"why is this being canceled?\": \"why is this being canceled?\",\n \"· owed \": \"· owed \",\n \"← Orders\": \"← Orders\",\n Succeeded: \"Succeeded\",\n Completed: \"Completed\",\n Complete: \"Complete\",\n Linked: \"Linked\",\n Approved: \"Approved\",\n Landed: \"Landed\",\n Current: \"Current\",\n Held: \"Held\",\n \"Past due\": \"Past due\",\n Grace: \"Grace\",\n Unknown: \"Unknown\",\n \"Requires review\": \"Requires review\",\n Delinquent: \"Delinquent\",\n Lost: \"Lost\",\n \"Partially refunded\": \"Partially refunded\",\n Dismissed: \"Dismissed\",\n Superseded: \"Superseded\",\n \"Already resolved\": \"Already resolved\",\n \"Awaiting method\": \"Awaiting method\",\n \"Cancel this membership?\": \"Cancel this membership?\",\n \"Renewal stops now and can't be restarted from here.\":\n \"Renewal stops now and can't be restarted from here.\",\n \"The customer\": \"The customer\",\n keeps: \"keeps\",\n loses: \"loses\",\n \"now. No refund is made.\": \"now. No refund is made.\",\n \"their access\": \"their access\",\n until: \"until\",\n \"until the current period ends.\": \"until the current period ends.\",\n \"Cancel membership\": \"Cancel membership\",\n \"End access now instead (no refund is made)\":\n \"End access now instead (no refund is made)\",\n \"By the customer\": \"By the customer\",\n \"By staff\": \"By staff\",\n \"Renewal payment failed\": \"Renewal payment failed\",\n \"After a chargeback\": \"After a chargeback\",\n \"Replaced by an upgrade\": \"Replaced by an upgrade\",\n \"This page couldn't be loaded\": \"This page couldn't be loaded\",\n \"It may have been removed, or the link may be wrong.\":\n \"It may have been removed, or the link may be wrong.\",\n \"Code:\": \"Code:\",\n \"Subscription not found\": \"Subscription not found\",\n \"Payment not found\": \"Payment not found\",\n \"Order not found\": \"Order not found\",\n \"Customer not found\": \"Customer not found\",\n \"Refunds, revokes and cancels are paused for you after several in a short time. Someone else can clear the hold on the Ops page.\":\n \"Refunds, revokes and cancels are paused for you after several in a short time. Someone else can clear the hold on the Ops page.\",\n \"Billing couldn't check your permissions just now. Try again in a moment.\":\n \"Billing couldn't check your permissions just now. Try again in a moment.\",\n \"Your role doesn't allow this.\": \"Your role doesn't allow this.\",\n \"Search customers\": \"Search customers\",\n \"Customer email, ref, or id\": \"Customer email, ref, or id\",\n \"Clear search\": \"Clear search\",\n \"Searching…\": \"Searching…\",\n Search: \"Search\",\n \"No customer matches\": \"No customer matches\",\n \"More customers match. Choose one, or search for more of the name or email.\":\n \"More customers match. Choose one, or search for more of the name or email.\",\n \"customers match. Choose one.\": \"customers match. Choose one.\",\n \"Holds on refunds and cancels\": \"Holds on refunds and cancels\",\n \"A staff member reached the limit of\": \"A staff member reached the limit of\",\n \"Staff reached the limit of\": \"Staff reached the limit of\",\n \"refunds, revokes or cancels in an hour. These are paused until someone clears the hold.\":\n \"refunds, revokes or cancels in an hour. These are paused until someone clears the hold.\",\n \"refunds, revokes or cancels in a day. These are paused until someone clears the hold.\":\n \"refunds, revokes or cancels in a day. These are paused until someone clears the hold.\",\n \"Held since\": \"Held since\",\n \"Clear hold\": \"Clear hold\",\n \"Clear this hold?\": \"Clear this hold?\",\n \"Refunds, revokes and cancels start working again for the people it held. Someone other than the person it stopped must clear it.\":\n \"Refunds, revokes and cancels start working again for the people it held. Someone other than the person it stopped must clear it.\",\n \"Reason (required)\": \"Reason (required)\",\n \"Hold cleared\": \"Hold cleared\",\n \"Clearing…\": \"Clearing…\",\n \"A different person must clear this hold.\":\n \"A different person must clear this hold.\",\n \"You don't have permission to clear holds.\":\n \"You don't have permission to clear holds.\",\n \"Billing couldn't check your permission to clear holds. Try again in a moment.\":\n \"Billing couldn't check your permission to clear holds. Try again in a moment.\",\n \"This hold was already cleared or no longer exists.\":\n \"This hold was already cleared or no longer exists.\",\n None: \"None\",\n \"Payment methods are up to date\": \"Payment methods are up to date\",\n \"Refreshing…\": \"Refreshing…\",\n \"Last updated\": \"Last updated\",\n \"Current, read from your directory\": \"Current, read from your directory\",\n \"Refunding…\": \"Refunding…\",\n \"The money goes back through \": \"The money goes back through \",\n \". Up to \": \". Up to \",\n \" can still be refunded.\": \" can still be refunded.\",\n Pulling: \"Pulling\",\n Released: \"Released\",\n Resolved: \"Resolved\",\n Processing: \"Processing\",\n \"Requires action\": \"Requires action\",\n Void: \"Void\",\n Uncollectible: \"Uncollectible\",\n Converged: \"Converged\",\n Gone: \"Gone\",\n Ignored: \"Ignored\",\n Imported: \"Imported\",\n} as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAM,KAA0D;CAC9D,YAAY;CACZ,YAAY;CACZ,MAAM;CACN,iBAAiB;CACjB,iBAAiB;CACjB,QAAQ;CACR,OAAO;CACP,SAAS;CACT,mBAAmB;CACnB,aAAa;CACb,MAAM;CACN,QAAQ;CACR,YAAY;AACd;AAEA,SAAgB,EACd,GACA,IAA6B,QACF;CAC3B,IAAM,IAAY,GAAY;CAC9B,IAAI,CAAC,GAAW;CAChB,IAAM,IAAgC,CAAC;CACvC,KAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,CAAS,GAC5C,MACL,EACE,GAAgB,EAA8B,CAAC,QAC7C,WACA,KAAK,EAAU,EACjB,KACE;CAEN,OAAO;AACT;;;AC7DA,IAAM,KAAS;CACb;EACE,MAAM;EACN,WAAW,QACT,OAAO,+BAA4B,CAAC,MAAM,OAAO,EAC/C,SAAS,EAAE,aACb,EAAE,CACJ;CACF;CACA;EACE,MAAM;EACN,WAAW,QACT,O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AC3B,mCAAmC;CACnC,SAAS;CACT,QAAQ;CACR,WAAW;CACX,UAAU;CACV,iBAAiB;CACjB,gBAAgB;CAChB,wBAAwB;CACxB,sCAAsC;CACtC,uCAAuC;CACvC,OAAO;CACP,0CACE;CACF,oBAAoB;CACpB,kBAAkB;CAClB,wDACE;CACF,sCAAsC;CACtC,kEACE;CACF,kHACE;CACF,UAAU;CACV,UAAU;CACV,OAAO;CACP,SAAS;CACT,OAAO;CACP,mBAAmB;CACnB,OAAO;CACP,QAAQ;CACR,gBAAgB;CAChB,OAAO;CACP,2DACE;CACF,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,iBAAiB;CACjB,SAAS;CACT,cAAc;CACd,2BAA2B;CAC3B,iBAAiB;CACjB,eAAe;CACf,oEACE;CACF,uBAAuB;CACvB,iBAAiB;CACjB,eAAe;CACf,QAAQ;CACR,yBAAyB;CACzB,eAAe;CACf,0IACE;CACF,iJACE;CACF,4EACE;CACF,wFACE;CACF,+BAA+B;CAC/B,oCAAoC;CACpC,qDACE;CACF,8DACE;CACF,+IACE;CACF,mBAAmB;CACnB,wCACE;CACF,iHACE;CACF,oHACE;CACF,qCAAqC;CACrC,mBAAmB;CACnB,uEACE;CACF,MAAM;CACN,cAAc;CACd,aAAa;CACb,aAAa;CACb,QAAQ;CACR,OAAO;CACP,OAAO;CACP,kBAAkB;CAClB,uBAAuB;CACvB,OAAO;CACP,yBAAyB;CACzB,eAAe;CACf,aAAa;CACb,sEACE;CACF,MAAM;CACN,SAAS;CACT,KAAK;CACL,MAAM;CACN,cAAc;CACd,qBAAqB;CACrB,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,gBAAgB;CAChB,YAAY;CACZ,IAAI;CACJ,SAAS;CACT,QAAQ;CACR,mBAAmB;CACnB,eAAe;CACf,gBAAgB;CAChB,oBAAoB;CACpB,4BAA4B;CAC5B,UAAU;CACV,OAAO;CACP,kBAAkB;CAClB,QAAQ;CACR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AAM;CACN,YAAY;CACZ,OAAO;CACP,SAAS;CACT,mBAAmB;CACnB,YAAY;CACZ,MAAM;CACN,sBAAsB;CACtB,WAAW;CACX,YAAY;CACZ,oBAAoB;CACpB,mBAAmB;CACnB,2BAA2B;CAC3B,uDACE;CACF,gBAAgB;CAChB,OAAO;CACP,OAAO;CACP,2BAA2B;CAC3B,gBAAgB;CAChB,OAAO;CACP,kCAAkC;CAClC,qBAAqB;CACrB,8CACE;CACF,mBAAmB;CACnB,YAAY;CACZ,0BAA0B;CAC1B,sBAAsB;CACtB,0BAA0B;CAC1B,gCAAgC;CAChC,uDACE;CACF,SAAS;CACT,0BAA0B;CAC1B,qBAAqB;CACrB,mBAAmB;CACnB,sBAAsB;CACtB,mIACE;CACF,4EACE;CACF,iCAAiC;CACjC,oBAAoB;CACpB,8BAA8B;CAC9B,gBAAgB;CAChB,cAAc;CACd,QAAQ;CACR,uBAAuB;CACvB,8EACE;CACF,gCAAgC;CAChC,gCAAgC;CAChC,uCAAuC;CACvC,8BAA8B;CAC9B,2FACE;CACF,yFACE;CACF,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,oIACE;CACF,qBAAqB;CACrB,gBAAgB;CAChB,aAAa;CACb,4CACE;CACF,6CACE;CACF,iFACE;CACF,sDACE;CACF,MAAM;CACN,kCAAkC;CAClC,eAAe;CACf,gBAAgB;CAChB,qCAAqC;CACrC,cAAc;CACd,gCAAgC;CAChC,YAAY;CACZ,2BAA2B;CAC3B,SAAS;CACT,UAAU;CACV,UAAU;CACV,YAAY;CACZ,mBAAmB;CACnB,MAAM;CACN,eAAe;CACf,WAAW;CACX,MAAM;CACN,SAAS;CACT,UAAU;AACZ"}
1
+ {"version":3,"file":"admin.js","names":["subscribe","Separator","SeparatorPrimitive","SheetPrimitive","TooltipPrimitive","Tooltip","Tooltip","_Fragment","_Fragment","Separator","_Fragment","AlertDialog","AlertDialogPrimitive","AlertDialog","Toaster","Sonner","Toaster","_Fragment","_Fragment","AdminUIContext","AdminMessage","useAdminUI","createAdminClient","errorText","createAdminServices","useAdminContext","createToastHandlers","createAdminToast","AdminRouter","useLocation","useAdminServices","Link","useNavigate","cn","AdminContext","createAdminAPI","ApiError","DropdownMenuLabel","DropdownMenuItem","DropdownMenuContent","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuTrigger","DropdownMenu","Button","useAdminArea","useCatalogArea","useMetrics","hasAnyArea","useMerchantConfig","useAuth","timeAgo","formatNativeAmount","ConfirmContext","statusLabel","React","VARIABLE_TO_CSS","appearanceStyle","variables","appearance","style","key","value","namespace","routes","lazy","m","matchAdminRoute","actual","pathname","expected","path","params","part","i","AdminPages","match","RouteParams","Suspense","query","subscribe$1","media","notify","useIsMobile","useSyncExternalStore","Separator$1","props","Separator","className","Sheet","Dialog","SheetPortal","SheetOverlay","SheetContent","side","children","showCloseButton","XIcon","SheetHeader","SheetTitle","SheetDescription","TooltipProvider","Tooltip","Tooltip$1","TooltipTrigger","TooltipContent","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","useSidebar","context","SidebarProvider","openProp","setOpenProp","isMobile","openMobile","setOpenMobile","_open","_setOpen","defaultOpen","open","setOpen","openState","toggleSidebar","state","contextValue","event","Sidebar","collapsible","variant","SidebarTrigger","onClick","PanelLeftIcon","SidebarRail","adminText","SidebarInset","SidebarHeader","SidebarContent","SidebarGroup","SidebarGroupLabel","useRender","mergeProps","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","comp","tooltip","render","isActive","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton","coreNav","DashboardCircleIcon","UserGroupIcon","RepeatIcon","CreditCardIcon","PackageIcon","Wrench01Icon","Settings01Icon","item","subItemIsActive","url","sectionURL","AppSidebar","groups","active","b","a","MerchantSwitcher","group","NavEntry","always","HugeiconsIcon","NavSubEntry","sub","navigate","newMerchant","label","activeMerchant","role","initials","UnfoldMoreIcon","merchants","merchant","selectMerchant","Tick02Icon","Fragment","Add01Icon","NoAccess","area","NoMerchants","NotificationBell","metrics","merchantConfig","count","useQuery","adminQueries","loading","items","data","onItemClick","f","Notification01Icon","AlertCircleIcon","Alert01Icon","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","ChevronRightIcon","SiteHeader","trail","crumb","index","trails","areaOf","under","prefix","access","AppLayout","permission","services","hostSettings","AlertDialog$1","AlertDialog","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent","size","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","AlertDialogCancel","ConfirmProvider","options","setOptions","pending","settle","answer","confirm","resolve","next","Toaster$1","theme","Toaster","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon","CHUNK_ERRORS","isChunkLoadError","e","error","pattern","RouteError","stale","message","Refresh01Icon","shouldRetry","failureCount","createAdminQueryClient","QueryClient","QueryCache","action","toastApiError","subscribe","snapshot","serverSnapshot","unchanged","useAdminTheme","system","merchantFrom","BillingAdmin","selected","setSelected","useState","connection","setConnection","BillingAdminInstance","useId","portal","setPortal","useMemo","requested","scope","currentScope","useRef","isCurrent","useCallback","queryClient","slug","onSelected","QueryClientProvider","PageBoundary","Boundary","Component","location","useAPI","id","useRead","attempt","setAttempt","result","setResult","abort","load","current","n","useBillingAdminAccess","api","signal","missingCustomer","BillingCustomerSummary","customer","subscriptions","entitlements","payments","isPending","refetch","SummaryRow","balance","subscription","entitlement","payment","billingConfirmWarnings","uncheckedBillingWarning","loadBillingConfirmWarnings","cursor","visited","page","warnings","permissionAreas","billingPermissionHelp","description","AdminConsole","session","useSession","history","useHistoryNavigation","navigation","body","Status","StepUpProvider","Console","SignInRedirect","SignInPanel","here","useEffect","trimSlashes","s","host","auth","useAuthClient","guard","useStepUpGuard","users","useUsersAdminAccess","authBaseUrl","root","useGroupAdminAccess","billing","billingBaseUrl","base","basePath","inside","onBilling","accounts","grant","customers","billable","checking","landing","failed","tabs","tab","AuthAdmin","user","billed","own","billingAdminMessages"],"sources":["../src/appearance.ts","../src/admin/routes.tsx","../src/admin/hooks/use-mobile.ts","../src/admin/components/ui/separator.tsx","../src/admin/components/ui/sheet.tsx","../src/admin/components/ui/tooltip.tsx","../src/admin/components/ui/sidebar.tsx","../src/admin/navigation.tsx","../src/admin/components/app-sidebar.tsx","../src/admin/components/no-access.tsx","../src/admin/components/no-merchants.tsx","../src/admin/components/notification-bell.tsx","../src/admin/components/ui/breadcrumb.tsx","../src/admin/components/site-header.tsx","../src/admin/layouts/app-layout.tsx","../src/admin/components/ui/alert-dialog.tsx","../src/admin/components/confirm.tsx","../src/admin/components/ui/sonner.tsx","../src/admin/lib/chunk-error.ts","../src/admin/components/route-error.tsx","../src/admin/lib/query-client.ts","../src/admin/theme.ts","../src/admin/billing-admin.tsx","../src/admin/summary.tsx","../src/admin/console.tsx","../src/admin/messages.ts"],"sourcesContent":["// Integrator theming. The component scopes the standard shadcn token set\n// under its root, so `theme` flips the whole palette and `variables` override\n// individual tokens without the integrator touching our CSS.\nimport type { CSSProperties } from \"react\"\n\n// `inherit` uses the host page's shadcn tokens (`--background`, ...) and its\n// `.dark` class instead of the bundled zinc palette.\nexport type BillingTheme = \"light\" | \"dark\" | \"auto\" | \"inherit\"\n\n// The tokens integrators may override. Values are raw CSS color/length\n// strings; they land as custom properties on the purchase root.\nexport interface BillingVariables {\n background?: string\n foreground?: string\n card?: string\n mutedForeground?: string\n faintForeground?: string\n border?: string\n input?: string\n primary?: string\n primaryForeground?: string\n destructive?: string\n ring?: string\n radius?: string\n fontFamily?: string\n}\n\nexport interface BillingAppearance {\n theme?: BillingTheme\n variables?: BillingVariables\n}\n\nconst VARIABLE_TO_CSS: Record<keyof BillingVariables, string> = {\n background: \"--background\",\n foreground: \"--foreground\",\n card: \"--card\",\n mutedForeground: \"--muted-foreground\",\n faintForeground: \"--orck-faint\",\n border: \"--border\",\n input: \"--input\",\n primary: \"--primary\",\n primaryForeground: \"--primary-foreground\",\n destructive: \"--destructive\",\n ring: \"--ring\",\n radius: \"--radius\",\n fontFamily: \"--orck-font\",\n}\n\nexport function appearanceStyle(\n appearance: BillingAppearance | undefined,\n namespace: \"orck\" | \"orba\" = \"orck\"\n): CSSProperties | undefined {\n const variables = appearance?.variables\n if (!variables) return undefined\n const style: Record<string, string> = {}\n for (const [key, value] of Object.entries(variables)) {\n if (!value) continue\n style[\n VARIABLE_TO_CSS[key as keyof BillingVariables].replace(\n \"--orck-\",\n `--${namespace}-`\n )\n ] = value\n }\n return style as CSSProperties\n}\n\nexport function appearanceTheme(\n appearance: BillingAppearance | undefined\n): BillingTheme {\n return appearance?.theme ?? \"auto\"\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { lazy, Suspense } from \"react\"\nimport { RouteParams, useLocation } from \"./router\"\n\nconst routes = [\n {\n path: \"/payments/attempts\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.AttemptsPage,\n }))\n ),\n },\n {\n path: \"/catalog/metering\",\n Component: lazy(() =>\n import(\"./pages/catalog/metering\").then((m) => ({\n default: m.CatalogMeteringPage,\n }))\n ),\n },\n {\n path: \"/payments/health\",\n Component: lazy(() =>\n import(\"./pages/payments/health\").then((m) => ({\n default: m.PaymentHealthPage,\n }))\n ),\n },\n {\n path: \"/payments/cycles\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.CyclesPage,\n }))\n ),\n },\n {\n path: \"/catalog/prices\",\n Component: lazy(() =>\n import(\"./pages/catalog\").then((m) => ({ default: m.CatalogPricesPage }))\n ),\n },\n {\n path: \"/subscriptions\",\n Component: lazy(() =>\n import(\"./pages/subscriptions\").then((m) => ({\n default: m.SubscriptionsPage,\n }))\n ),\n },\n {\n path: \"/customers\",\n Component: lazy(() =>\n import(\"./pages/customers\").then((m) => ({ default: m.CustomersPage }))\n ),\n },\n {\n path: \"/payments\",\n Component: lazy(() =>\n import(\"./pages/payments\").then((m) => ({ default: m.PaymentsPage }))\n ),\n },\n {\n path: \"/settings\",\n Component: lazy(() =>\n import(\"./pages/settings\").then((m) => ({ default: m.SettingsPage }))\n ),\n },\n {\n path: \"/reports\",\n Component: lazy(() =>\n import(\"./pages/dashboard/reports\").then((m) => ({\n default: m.ReportsPage,\n }))\n ),\n },\n {\n path: \"/catalog\",\n Component: lazy(() =>\n import(\"./pages/catalog\").then((m) => ({\n default: m.CatalogProductsPage,\n }))\n ),\n },\n {\n path: \"/orders\",\n Component: lazy(() =>\n import(\"./pages/orders\").then((m) => ({ default: m.OrdersPage }))\n ),\n },\n {\n path: \"/ops/imports\",\n Component: lazy(() =>\n import(\"./pages/imports\").then((m) => ({ default: m.ImportsPage }))\n ),\n },\n {\n path: \"/ops/imports/:id\",\n Component: lazy(() =>\n import(\"./pages/imports/detail\").then((m) => ({\n default: m.ImportDetailPage,\n }))\n ),\n },\n {\n path: \"/ops/imports/:id/records\",\n Component: lazy(() =>\n import(\"./pages/imports/records\").then((m) => ({\n default: m.ImportRecordsPage,\n }))\n ),\n },\n {\n path: \"/ops/provider-prices\",\n Component: lazy(() =>\n import(\"./pages/provider-prices\").then((m) => ({\n default: m.ProviderPricesPage,\n }))\n ),\n },\n {\n path: \"/ops/proposals\",\n Component: lazy(() =>\n import(\"./pages/proposals\").then((m) => ({ default: m.ProposalsPage }))\n ),\n },\n {\n path: \"/ops/parked\",\n Component: lazy(() =>\n import(\"./pages/parked\").then((m) => ({ default: m.ParkedPage }))\n ),\n },\n {\n path: \"/ops\",\n Component: lazy(() =>\n import(\"./pages/ops\").then((m) => ({ default: m.OpsPage }))\n ),\n },\n {\n path: \"/\",\n Component: lazy(() =>\n import(\"./pages/dashboard\").then((m) => ({ default: m.DashboardPage }))\n ),\n },\n {\n path: \"/customers/:customerId\",\n Component: lazy(() =>\n import(\"./pages/customers/detail\").then((m) => ({\n default: m.CustomerDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/attempts/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.AttemptDetailPage,\n }))\n ),\n },\n {\n path: \"/catalog/metering/:key\",\n Component: lazy(() =>\n import(\"./pages/catalog/metering\").then((m) => ({\n default: m.MeterDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/cycles/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/attempts\").then((m) => ({\n default: m.CycleDetailPage,\n }))\n ),\n },\n {\n path: \"/catalog/prices/:id\",\n Component: lazy(() =>\n import(\"./pages/catalog/price-detail\").then((m) => ({\n default: m.PriceDetailPage,\n }))\n ),\n },\n {\n path: \"/subscriptions/:id\",\n Component: lazy(() =>\n import(\"./pages/subscriptions/detail\").then((m) => ({\n default: m.SubscriptionDetailPage,\n }))\n ),\n },\n {\n path: \"/payments/:id\",\n Component: lazy(() =>\n import(\"./pages/payments/detail\").then((m) => ({\n default: m.PaymentDetailPage,\n }))\n ),\n },\n {\n path: \"/orders/:id\",\n Component: lazy(() =>\n import(\"./pages/orders/detail\").then((m) => ({\n default: m.OrderDetailPage,\n }))\n ),\n },\n]\n\nexport function matchAdminRoute(pathname: string) {\n for (const { path, Component } of routes) {\n const actual = pathname.replace(/\\/$/, \"\").split(\"/\")\n const expected = path === \"/\" ? [\"\"] : path.split(\"/\")\n const params: Record<string, string> = {}\n if (actual.length !== expected.length) continue\n if (\n !expected.every((part, i) => {\n if (part.startsWith(\":\")) {\n try {\n params[part.slice(1)] = decodeURIComponent(actual[i])\n return true\n } catch {\n return false\n }\n }\n return part === actual[i]\n })\n )\n continue\n return { Component, params }\n }\n}\nexport function AdminPages() {\n const match = matchAdminRoute(useLocation().pathname)\n if (!match)\n return (\n <p role=\"status\">\n <AdminMessage id={\"This billing page does not exist.\"} />\n </p>\n )\n return (\n <RouteParams params={match.params}>\n <Suspense\n fallback={\n <p role=\"status\">\n <AdminMessage id={\"Loading…\"} />\n </p>\n }\n >\n <match.Component />\n </Suspense>\n </RouteParams>\n )\n}\n","import { useSyncExternalStore } from \"react\"\nconst query = \"(max-width: 767px)\"\nconst subscribe = (notify: () => void) => {\n const media = window.matchMedia(query)\n media.addEventListener(\"change\", notify)\n return () => media.removeEventListener(\"change\", notify)\n}\nexport function useIsMobile() {\n return useSyncExternalStore(\n subscribe,\n () => window.matchMedia(query).matches,\n () => false\n )\n}\n","import { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useAdminContext } from \"#orck/admin/context\"\nimport * as React from \"react\"\nimport { Dialog as SheetPrimitive } from \"@base-ui/react/dialog\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return (\n <SheetPrimitive.Portal\n container={useAdminContext().portal}\n data-slot=\"sheet-portal\"\n {...props}\n />\n )\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n ...props\n}: SheetPrimitive.Popup.Props & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n \"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n data-slot=\"sheet-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-3 right-3\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"Close\"} />\n </span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-0.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\n \"font-heading text-base font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","\"use client\"\nimport { useAdminContext } from \"#orck/admin/context\"\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\n\nfunction TooltipProvider({\n delay = 0,\n ...props\n}: TooltipPrimitive.Provider.Props) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n side = \"top\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <TooltipPrimitive.Portal container={useAdminContext().portal}>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95\",\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","\"use client\"\nimport { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\n\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { useIsMobile } from \"#orck/admin/hooks/use-mobile\"\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { Input } from \"#orck/admin/components/ui/input\"\nimport { Separator } from \"#orck/admin/components/ui/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"#orck/admin/components/ui/sheet\"\nimport { Skeleton } from \"#orck/admin/components/ui/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"#orck/admin/components/ui/tooltip\"\nimport { PanelLeftIcon } from \"lucide-react\"\n\nconst SIDEBAR_WIDTH = \"16rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\"\nconst SIDEBAR_WIDTH_ICON = \"3rem\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n data-slot=\"sidebar-wrapper\"\n onKeyDown={(event) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }}\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar relative flex min-h-[30rem] w-full\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n dir,\n ...props\n}: React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === \"none\") {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n \"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n dir={dir}\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>\n <AdminMessage id={\"Sidebar\"} />\n </SheetTitle>\n <SheetDescription>\n <AdminMessage id={\"Displays the mobile sidebar.\"} />\n </SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer text-sidebar-foreground relative hidden md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n data-side={side}\n className={cn(\n \"absolute inset-y-0 z-10 hidden h-full w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon-sm\"\n className={cn(className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"Toggle Sidebar\"} />\n </span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n const { text: adminText } = useAdminUI()\n\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label={adminText(\"Toggle Sidebar\")}\n tabIndex={-1}\n onClick={toggleSidebar}\n title={adminText(\"Toggle Sidebar\")}\n className={cn(\n \"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n return (\n <main\n data-slot=\"sidebar-inset\"\n className={cn(\n \"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot=\"sidebar-input\"\n data-sidebar=\"input\"\n className={cn(\"h-8 w-full bg-background shadow-none\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn(\"bg-sidebar-border mx-2 w-auto\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n \"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"div\"> & React.ComponentProps<\"div\">) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(\n \"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-label\",\n sidebar: \"group-label\",\n },\n })\n}\n\nfunction SidebarGroupAction({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"button\"> & React.ComponentProps<\"button\">) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-group-action\",\n sidebar: \"group-action\",\n },\n })\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-group-content\"\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-0\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button group/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:font-medium [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate\",\n {\n variants: {\n variant: {\n default: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n outline:\n \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction SidebarMenuButton({\n render,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>) {\n const { isMobile, state } = useSidebar()\n const comp = useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(sidebarMenuButtonVariants({ variant, size }), className),\n },\n props\n ),\n render: !tooltip ? render : <TooltipTrigger render={render} />,\n state: {\n slot: \"sidebar-menu-button\",\n sidebar: \"menu-button\",\n size,\n active: isActive,\n },\n })\n\n if (!tooltip) {\n return comp\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n {comp}\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\" || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n render,\n showOnHover = false,\n ...props\n}: useRender.ComponentProps<\"button\"> &\n React.ComponentProps<\"button\"> & {\n showOnHover?: boolean\n }) {\n return useRender({\n defaultTagName: \"button\",\n props: mergeProps<\"button\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0\",\n showOnHover &&\n \"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-action\",\n sidebar: \"menu-action\",\n },\n })\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n \"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const [width] = React.useState(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n })\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n \"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn(\"group/menu-sub-item relative\", className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n render,\n size = \"md\",\n isActive = false,\n className,\n ...props\n}: useRender.ComponentProps<\"a\"> &\n React.ComponentProps<\"a\"> & {\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\n \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden group-data-[collapsible=icon]:hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n className\n ),\n },\n props\n ),\n render,\n state: {\n slot: \"sidebar-menu-sub-button\",\n sidebar: \"menu-sub-button\",\n size,\n active: isActive,\n },\n })\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import {\n CreditCardIcon,\n DashboardCircleIcon,\n PackageIcon,\n RepeatIcon,\n Settings01Icon,\n UserGroupIcon,\n Wrench01Icon,\n} from \"@hugeicons/core-free-icons\"\nimport type { IconSvgElement } from \"@hugeicons/react\"\nimport {\n useAdminArea,\n useCatalogArea,\n useMerchantConfig,\n useMetrics,\n} from \"./lib/capabilities\"\nexport interface AdminNavItem {\n title: string\n path: string\n icon?: IconSvgElement\n useVisible?: () => boolean\n order?: number\n items?: { title: string; path: string; useVisible?: () => boolean }[]\n}\nexport const coreNav: AdminNavItem[] = [\n {\n title: \"Dashboard\",\n path: \"/\",\n icon: DashboardCircleIcon,\n order: 0,\n useVisible: useMetrics,\n items: [\n { title: \"Overview\", path: \"/\" },\n { title: \"Reports\", path: \"/reports\" },\n ],\n },\n {\n title: \"Customers\",\n path: \"/customers\",\n icon: UserGroupIcon,\n order: 10,\n useVisible: useAdminArea,\n },\n {\n title: \"Subscriptions\",\n path: \"/subscriptions\",\n icon: RepeatIcon,\n order: 20,\n useVisible: useAdminArea,\n },\n {\n title: \"Payments\",\n path: \"/payments\",\n icon: CreditCardIcon,\n order: 30,\n useVisible: useAdminArea,\n items: [\n { title: \"Payments\", path: \"/payments\" },\n { title: \"Health\", path: \"/payments/health\", useVisible: useMetrics },\n { title: \"Attempts\", path: \"/payments/attempts\" },\n { title: \"Renewals\", path: \"/payments/cycles\" },\n ],\n },\n {\n title: \"Orders\",\n path: \"/orders\",\n icon: CreditCardIcon,\n order: 40,\n useVisible: useAdminArea,\n },\n {\n title: \"Catalog\",\n path: \"/catalog\",\n icon: PackageIcon,\n order: 50,\n useVisible: useCatalogArea,\n items: [\n { title: \"Products\", path: \"/catalog\" },\n { title: \"Prices\", path: \"/catalog/prices\" },\n { title: \"Metering\", path: \"/catalog/metering\" },\n ],\n },\n {\n title: \"Ops\",\n path: \"/ops\",\n icon: Wrench01Icon,\n order: 60,\n useVisible: useMerchantConfig,\n items: [\n { title: \"Findings\", path: \"/ops\" },\n { title: \"Proposals\", path: \"/ops/proposals\" },\n { title: \"PSP imports\", path: \"/ops/imports\" },\n { title: \"Provider prices\", path: \"/ops/provider-prices\" },\n { title: \"Parked\", path: \"/ops/parked\" },\n ],\n },\n { title: \"Settings\", path: \"/settings\", icon: Settings01Icon, order: 70 },\n].map((item) => ({ ...item }))\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\n// App shell sidebar — same anatomy as the hosted product's shell\n// (inset variant, brand header, nav, footer user menu, rail).\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport {\n Add01Icon,\n Tick02Icon,\n UnfoldMoreIcon,\n} from \"@hugeicons/core-free-icons\"\nimport { Link, useLocation, useNavigate } from \"#orck/admin/router\"\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"#orck/admin/components/ui/dropdown-menu\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarRail,\n} from \"#orck/admin/components/ui/sidebar\"\nimport { coreNav, type AdminNavItem } from \"../navigation\"\nimport { useAdminContext } from \"../context\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\n\n// A section's first sub-page IS the section URL (/catalog, /payments), so it\n// can only be the active one when nothing deeper is selected.\nfunction subItemIsActive(pathname: string, url: string, sectionURL: string) {\n return url === sectionURL ? pathname === url : pathname.startsWith(url)\n}\n\nexport function AppSidebar() {\n const { pathname } = useLocation()\n const groups = [{ label: \"Billing\", items: coreNav }]\n const active = [...coreNav]\n .sort((a, b) => b.path.length - a.path.length)\n .find(\n (item) =>\n pathname === item.path ||\n (item.path !== \"/\" && pathname.startsWith(item.path + \"/\"))\n )?.path\n return (\n <Sidebar variant=\"inset\" collapsible=\"icon\">\n <SidebarHeader>\n {/* No product lockup: this console mounts inside the host's own app\n (host-one, host-three), where a vendor mark belongs to someone else's\n product. The merchant switcher is the orientation that matters here,\n and it names the merchant and role rather than the software. */}\n <MerchantSwitcher />\n </SidebarHeader>\n <SidebarContent>\n {groups.map((group) => (\n <SidebarGroup key={group.label}>\n <SidebarGroupLabel>\n <AdminMessage id={group.label} />\n </SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {group.items.map((item) => (\n <NavEntry\n key={item.path}\n item={item}\n active={item.path === active}\n pathname={pathname}\n />\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n ))}\n </SidebarContent>\n <SidebarRail />\n </Sidebar>\n )\n}\n\nconst always = () => true\n\nfunction NavEntry({\n item,\n active,\n pathname,\n}: {\n item: AdminNavItem\n active: boolean\n pathname: string\n}) {\n const { text: adminText } = useAdminUI()\n // A fixed hook per entry: an extension's item list never changes.\n const visible = (item.useVisible ?? always)()\n if (!visible) return null\n return (\n <SidebarMenuItem>\n <SidebarMenuButton\n isActive={active}\n tooltip={adminText(item.title)}\n render={\n <Link to={item.path}>\n {item.icon && <HugeiconsIcon icon={item.icon} />}\n <span>\n <AdminMessage id={item.title} />\n </span>\n </Link>\n }\n />\n {item.items && active && (\n <SidebarMenuSub>\n {item.items.map((sub) => (\n <NavSubEntry\n key={sub.path}\n sub={sub}\n active={subItemIsActive(pathname, sub.path, item.path)}\n />\n ))}\n </SidebarMenuSub>\n )}\n </SidebarMenuItem>\n )\n}\n\nfunction NavSubEntry({\n sub,\n active,\n}: {\n sub: NonNullable<AdminNavItem[\"items\"]>[number]\n active: boolean\n}) {\n // A fixed hook per entry, as for NavEntry.\n const visible = (sub.useVisible ?? always)()\n if (!visible) return null\n return (\n <SidebarMenuSubItem>\n <SidebarMenuSubButton\n isActive={active}\n render={\n <Link to={sub.path}>\n <span>\n <AdminMessage id={sub.title} />\n </span>\n </Link>\n }\n />\n </SidebarMenuSubItem>\n )\n}\n\nfunction MerchantSwitcher() {\n const { activeMerchant, merchants, selectMerchant } = useAuth()\n const navigate = useNavigate()\n const newMerchant = useAdminContext().props.newMerchantHref\n const label =\n activeMerchant?.display_name || activeMerchant?.slug || \"Select merchant\"\n const role = activeMerchant?.role || \"Merchant console\"\n const initials = activeMerchant?.slug.slice(0, 2) ?? \"µ\"\n\n return (\n <SidebarMenu>\n <SidebarMenuItem>\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <SidebarMenuButton\n size=\"lg\"\n tooltip={label}\n className=\"data-open:bg-sidebar-accent\"\n >\n <span className=\"flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-primary text-xs font-semibold text-primary-foreground uppercase\">\n {initials}\n </span>\n <span className=\"grid min-w-0 flex-1 text-left leading-tight\">\n <span className=\"truncate text-sm font-medium\">{label}</span>\n <span className=\"truncate text-xs text-muted-foreground capitalize\">\n {role}\n </span>\n </span>\n <HugeiconsIcon\n icon={UnfoldMoreIcon}\n className=\"ml-auto size-4 shrink-0\"\n />\n </SidebarMenuButton>\n }\n />\n <DropdownMenuContent side=\"bottom\" align=\"start\" className=\"min-w-60\">\n <DropdownMenuGroup>\n <DropdownMenuLabel className=\"text-xs text-muted-foreground\">\n <AdminMessage id={\"Merchants\"} />\n </DropdownMenuLabel>\n {merchants.map((merchant) => {\n const active = merchant.slug === activeMerchant?.slug\n return (\n <DropdownMenuItem\n key={merchant.slug}\n onClick={() => selectMerchant(merchant.slug)}\n className=\"gap-2 py-2\"\n >\n <span className=\"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-[10px] font-semibold uppercase\">\n {merchant.slug.slice(0, 2)}\n </span>\n <span className=\"grid min-w-0 flex-1 leading-tight\">\n <span className=\"truncate text-sm\">\n {merchant.display_name || merchant.slug}\n </span>\n {merchant.role && (\n <span className=\"truncate text-xs text-muted-foreground capitalize\">\n {merchant.role}\n </span>\n )}\n </span>\n {active && (\n <HugeiconsIcon\n icon={Tick02Icon}\n className=\"ml-auto size-4 shrink-0 text-primary\"\n />\n )}\n </DropdownMenuItem>\n )\n })}\n </DropdownMenuGroup>\n {/* The console creates no merchants itself: the entry exists only\n when a host extension serves a creation page. */}\n {newMerchant && (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => void navigate(newMerchant)}\n className=\"gap-2 py-2\"\n >\n <span className=\"flex size-7 shrink-0 items-center justify-center rounded-md border border-dashed border-border\">\n <HugeiconsIcon icon={Add01Icon} className=\"size-4\" />\n </span>\n <AdminMessage id={\"New merchant\"} />\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </SidebarMenuItem>\n </SidebarMenu>\n )\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\n// NoAccess is a merchant page the signed-in staff member may not use: none of\n// the console's areas, or not this one.\nexport function NoAccess({ area }: { area?: string }) {\n return (\n <div className=\"flex items-center justify-center py-16\">\n <div className=\"w-full max-w-sm\">\n <h1 className=\"text-2xl font-semibold tracking-tight text-balance\">\n {area\n ? `You don't have access to ${area}`\n : \"You don't have access to this merchant's billing\"}\n </h1>\n <p className=\"mt-2 text-sm text-pretty text-muted-foreground\">\n <AdminMessage\n id={\"Ask an administrator for a role that includes it.\"}\n />\n </p>\n </div>\n </div>\n )\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useAdminContext } from \"../context\"\nexport function NoMerchants() {\n const { props } = useAdminContext()\n return (\n <div role=\"status\" className=\"p-8\">\n {props.emptyState ?? (\n <>\n <p>\n <AdminMessage id={\"Select a merchant to view its billing.\"} />\n </p>\n {props.newMerchantHref && (\n <a href={props.newMerchantHref}>\n <AdminMessage id={\"New merchant\"} />\n </a>\n )}\n </>\n )}\n </div>\n )\n}\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\nimport { useAdminServices } from \"#orck/admin/context\"\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport {\n Alert01Icon,\n AlertCircleIcon,\n Notification01Icon,\n} from \"@hugeicons/core-free-icons\"\nimport * as React from \"react\"\nimport { useNavigate } from \"#orck/admin/router\"\nimport { useQuery } from \"@tanstack/react-query\"\n\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"#orck/admin/components/ui/dropdown-menu\"\nimport type { Finding } from \"#orck/client/generated/wire\"\nimport { timeAgo } from \"#orck/admin/lib/format\"\nimport { useMerchantConfig, useMetrics } from \"#orck/admin/lib/capabilities\"\n\n// The bell is the findings queue: the open findings that need a person. A\n// finding leaves it when it is resolved, by an operator or by itself. Its\n// count is a metrics query, shown only to staff holding Metrics.\nexport function NotificationBell() {\n const { text: adminText } = useAdminUI()\n\n const { adminQueries } = useAdminServices()\n\n const navigate = useNavigate()\n const [open, setOpen] = React.useState(false)\n const metrics = useMetrics()\n const merchantConfig = useMerchantConfig()\n const { data: count = 0 } = useQuery({\n ...adminQueries.unreadNotifications(),\n enabled: merchantConfig && metrics,\n })\n const { data, isFetching: loading } = useQuery(\n adminQueries.notifications(merchantConfig && open)\n )\n const items = data?.data ?? []\n if (!merchantConfig) return null\n\n const onItemClick = (f: Finding) => {\n setOpen(false)\n navigate(`/ops?finding=${encodeURIComponent(f.id)}`)\n }\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={adminText(\"Notifications\")}\n className=\"relative\"\n >\n <HugeiconsIcon icon={Notification01Icon} className=\"size-4\" />\n {count > 0 && (\n <span className=\"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-medium text-white\">\n {count > 9 ? \"9+\" : count}\n </span>\n )}\n </Button>\n }\n />\n <DropdownMenuContent align=\"end\" className=\"w-80 p-0 sm:w-96\">\n <div className=\"flex items-center justify-between border-b px-3 py-2\">\n <span className=\"text-sm font-medium\">\n <AdminMessage id={\"Needs attention\"} />\n </span>\n {count > items.length && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-6 px-2 text-xs\"\n onClick={() => {\n setOpen(false)\n navigate(\"/ops\")\n }}\n >\n <AdminMessage id={\"View all \"} />\n {count}\n </Button>\n )}\n </div>\n <div className=\"max-h-96 overflow-y-auto\">\n {loading ? (\n <p className=\"px-3 py-6 text-center text-sm text-muted-foreground\">\n <AdminMessage id={\"Loading…\"} />\n </p>\n ) : items.length === 0 ? (\n <div className=\"flex flex-col items-center gap-1 px-3 py-8 text-center\">\n <HugeiconsIcon\n icon={Notification01Icon}\n className=\"size-5 text-muted-foreground\"\n />\n <p className=\"text-sm text-muted-foreground\">\n <AdminMessage id={\"You're all caught up.\"} />\n </p>\n </div>\n ) : (\n items.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n onClick={() => onItemClick(f)}\n className=\"flex w-full items-start gap-2 border-b px-3 py-2 text-left last:border-b-0 hover:bg-muted/50\"\n >\n <span className=\"mt-0.5 shrink-0\">\n {f.severity === \"critical\" || f.severity === \"high\" ? (\n <HugeiconsIcon\n icon={AlertCircleIcon}\n className=\"text-failed size-4\"\n />\n ) : (\n <HugeiconsIcon\n icon={Alert01Icon}\n className=\"text-held size-4\"\n />\n )}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex items-center justify-between gap-2\">\n <span className=\"truncate text-sm font-medium\">\n {f.finding_type}\n </span>\n <span className=\"shrink-0 text-[11px] text-muted-foreground\">\n {timeAgo(f.created_at)}\n </span>\n </span>\n {f.recommended_action && (\n <span className=\"mt-0.5 line-clamp-2 block text-xs text-muted-foreground\">\n {f.recommended_action}\n </span>\n )}\n </span>\n </button>\n ))\n )}\n </div>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import { AdminMessage, useAdminUI } from \"#orck/admin/ui-context\"\nimport * as React from \"react\"\nimport { mergeProps } from \"@base-ui/react/merge-props\"\nimport { useRender } from \"@base-ui/react/use-render\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\"\n\nfunction Breadcrumb({ className, ...props }: React.ComponentProps<\"nav\">) {\n const { text: adminText } = useAdminUI()\n\n return (\n <nav\n aria-label={adminText(\"breadcrumb\")}\n data-slot=\"breadcrumb\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<\"ol\">) {\n return (\n <ol\n data-slot=\"breadcrumb-list\"\n className={cn(\n \"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-item\"\n className={cn(\"inline-flex items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbLink({\n className,\n render,\n ...props\n}: useRender.ComponentProps<\"a\">) {\n return useRender({\n defaultTagName: \"a\",\n props: mergeProps<\"a\">(\n {\n className: cn(\"transition-colors hover:text-foreground\", className),\n },\n props\n ),\n render,\n state: {\n slot: \"breadcrumb-link\",\n },\n })\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction BreadcrumbSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) {\n return (\n <li\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:size-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRightIcon />}\n </li>\n )\n}\n\nfunction BreadcrumbEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\n \"flex size-5 items-center justify-center [&>svg]:size-4\",\n className\n )}\n {...props}\n >\n <MoreHorizontalIcon />\n <span className=\"sr-only\">\n <AdminMessage id={\"More\"} />\n </span>\n </span>\n )\n}\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport * as React from \"react\"\nimport { Link } from \"#orck/admin/router\"\n\nimport { NotificationBell } from \"#orck/admin/components/notification-bell\"\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from \"#orck/admin/components/ui/breadcrumb\"\nimport { Separator } from \"#orck/admin/components/ui/separator\"\nimport { SidebarTrigger } from \"#orck/admin/components/ui/sidebar\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\nimport { useMerchantConfig } from \"#orck/admin/lib/capabilities\"\n\nexport interface Crumb {\n label: string\n /** A link when the step is somewhere you can go; plain text otherwise. */\n to?: string\n}\n\nexport function SiteHeader({ trail }: { trail: Crumb[] }) {\n const { activeMerchant } = useAuth()\n // Findings belong to merchant configuration.\n const merchantConfig = useMerchantConfig()\n return (\n <header className=\"flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n <SidebarTrigger className=\"-ml-1\" />\n <Separator orientation=\"vertical\" className=\"mr-2 h-4\" />\n <Breadcrumb>\n <BreadcrumbList>\n {trail.length === 0 ? (\n <BreadcrumbItem>\n <BreadcrumbPage>\n <AdminMessage id={\"Dashboard\"} />\n </BreadcrumbPage>\n </BreadcrumbItem>\n ) : (\n <>\n <BreadcrumbItem>\n <BreadcrumbLink\n render={\n <Link to=\"/\">\n <AdminMessage id={\"Dashboard\"} />\n </Link>\n }\n />\n </BreadcrumbItem>\n {trail.map((crumb, index) => (\n <React.Fragment key={crumb.label}>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n {crumb.to && index < trail.length - 1 ? (\n <BreadcrumbLink\n render={\n <Link to={crumb.to}>\n <AdminMessage id={crumb.label} />\n </Link>\n }\n />\n ) : (\n <BreadcrumbPage>\n <AdminMessage id={crumb.label} />\n </BreadcrumbPage>\n )}\n </BreadcrumbItem>\n </React.Fragment>\n ))}\n </>\n )}\n </BreadcrumbList>\n </Breadcrumb>\n <div className=\"ml-auto flex items-center gap-2\">\n {activeMerchant && merchantConfig && <NotificationBell />}\n </div>\n </header>\n )\n}\n","import { useQuery } from \"@tanstack/react-query\"\nimport { useAdminContext } from \"../context\"\nimport { AdminMessage } from \"../ui-context\"\nimport type { ReactNode } from \"react\"\nimport { useLocation } from \"#orck/admin/router\"\n\nimport { AppSidebar } from \"#orck/admin/components/app-sidebar\"\nimport { NoAccess } from \"#orck/admin/components/no-access\"\nimport { NoMerchants } from \"#orck/admin/components/no-merchants\"\nimport { SiteHeader } from \"#orck/admin/components/site-header\"\nimport {\n SidebarInset,\n SidebarProvider,\n} from \"#orck/admin/components/ui/sidebar\"\nimport { TooltipProvider } from \"#orck/admin/components/ui/tooltip\"\nimport type { AdminAccess } from \"#orck/client/generated/wire\"\nimport { useAuth } from \"#orck/admin/lib/auth\"\nimport { hasAnyArea } from \"#orck/admin/lib/capabilities\"\nimport { errorText } from \"#orck/admin/lib/error-text\"\n\n// Longest path first: the catalog sub-pages have to match before the section\n// they live under. A trail of more than one entry becomes a real breadcrumb.\nconst trails: [string, { label: string; to?: string }[]][] = [\n [\"/customers\", [{ label: \"Customers\" }]],\n [\"/subscriptions\", [{ label: \"Subscriptions\" }]],\n [\"/payments\", [{ label: \"Payments\" }]],\n [\"/orders\", [{ label: \"Orders\" }]],\n [\n \"/catalog/metering\",\n [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Metering\" }],\n ],\n [\n \"/catalog/prices\",\n [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Prices\" }],\n ],\n [\"/catalog\", [{ label: \"Catalog\", to: \"/catalog\" }, { label: \"Products\" }]],\n [\n \"/ops/imports\",\n [\n { label: \"Ops\", to: \"/ops\" },\n { label: \"PSP imports\", to: \"/ops/imports\" },\n ],\n ],\n [\n \"/ops/provider-prices\",\n [{ label: \"Ops\", to: \"/ops\" }, { label: \"Provider prices\" }],\n ],\n [\"/ops/parked\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Parked\" }]],\n [\"/ops/proposals\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Proposals\" }]],\n [\"/ops\", [{ label: \"Ops\", to: \"/ops\" }, { label: \"Findings\" }]],\n [\"/settings\", [{ label: \"Settings\" }]],\n]\n\n// areaOf is the console area a merchant page belongs to, and whether the\n// caller may use it; Settings belongs to none (its tabs check their own).\nfunction areaOf(\n pathname: string,\n access: AdminAccess\n): { name: string; allowed: boolean } | null {\n const under = (prefix: string) =>\n pathname === prefix || pathname.startsWith(prefix + \"/\")\n if (under(\"/payments/health\"))\n return { name: \"payment health\", allowed: access.metrics === true }\n if ([\"/customers\", \"/subscriptions\", \"/payments\", \"/orders\"].some(under))\n return {\n name: \"customer support\",\n allowed: access.admin === \"read\" || access.admin === \"update\",\n }\n if (under(\"/ops\"))\n return {\n name: \"merchant configuration\",\n allowed:\n access.merchant_config === \"read\" ||\n access.merchant_config === \"update\",\n }\n if (under(\"/catalog\"))\n return {\n name: \"the catalog\",\n allowed: access.catalog === \"read\" || access.catalog === \"update\",\n }\n return null\n}\n\nexport function AppLayout({ children }: { children: ReactNode }) {\n const { activeMerchant } = useAuth()\n const { pathname } = useLocation()\n const { props, services } = useAdminContext()\n const permission = useQuery(services.adminQueries.access())\n const access = permission.data\n const hostSettings =\n (props.settingsTabs?.length ?? 0) > 0 &&\n (pathname === \"/settings\" || pathname === \"/\")\n const trail =\n trails.find(([prefix]) => pathname.startsWith(prefix))?.[1] ?? []\n if (!activeMerchant) return <NoMerchants />\n if (permission.isPending)\n return (\n <p role=\"status\" className=\"p-6\">\n <AdminMessage id=\"Loading billing permissions…\" />\n </p>\n )\n if (permission.error)\n return (\n <div role=\"alert\" className=\"p-6\">\n <p>{errorText(permission.error).text}</p>\n <button type=\"button\" onClick={() => void permission.refetch()}>\n <AdminMessage id=\"Try again\" />\n </button>\n </div>\n )\n if (\n activeMerchant.id &&\n access?.scope_id &&\n activeMerchant.id !== access.scope_id\n )\n return (\n <p role=\"alert\" className=\"p-6\">\n <AdminMessage id=\"The authenticated connection is bound to another merchant. Update the host connection before opening this merchant.\" />\n </p>\n )\n return (\n <TooltipProvider>\n {/* Below 64rem the console opens with its sidebar folded to icons, so a\n tablet keeps its width for the page; the inset may shrink below its\n content so wide tables scroll inside their own containers instead\n of pushing the page sideways. */}\n <SidebarProvider\n defaultOpen={window.matchMedia?.(\"(min-width: 64rem)\").matches ?? true}\n >\n <AppSidebar />\n <SidebarInset className=\"min-w-0\">\n <SiteHeader trail={trail} />\n {/* A switch remounts the merchant's pages: nothing of the\n previous merchant's survives it. */}\n <main\n key={activeMerchant?.id || activeMerchant?.slug || \"\"}\n className=\"flex min-w-0 flex-1 flex-col p-4 md:p-8\"\n >\n <div className=\"@container/page mx-auto w-full max-w-7xl min-w-0\">\n {access &&\n ((!hasAnyArea(access) && !hostSettings) ||\n areaOf(pathname, access)?.allowed === false) ? (\n <NoAccess area={areaOf(pathname, access)?.name} />\n ) : (\n children\n )}\n </div>\n </main>\n </SidebarInset>\n </SidebarProvider>\n </TooltipProvider>\n )\n}\n","import { useAdminContext } from \"#orck/admin/context\"\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"#orck/admin/lib/utils\"\nimport { Button } from \"#orck/admin/components/ui/button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return (\n <AlertDialogPrimitive.Portal\n container={useAdminContext().portal}\n data-slot=\"alert-dialog-portal\"\n {...props}\n />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","// Promise-based confirmation for the console's plain (non-typed) confirms:\n//\n// const confirm = useConfirm()\n// if (await confirm({ title, description, confirmLabel, tone })) …\n//\n// One dialog per ConfirmProvider; a newer request answers an older one false.\n// Destructive acts that need a typed word use TypedConfirmDialog instead.\nimport * as React from \"react\"\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"#orck/admin/components/ui/alert-dialog\"\nimport {\n ConfirmContext,\n type Confirm,\n type ConfirmOptions,\n} from \"#orck/admin/lib/confirm\"\n\nexport function ConfirmProvider({ children }: { children: React.ReactNode }) {\n const [options, setOptions] = React.useState<ConfirmOptions | null>(null)\n const [open, setOpen] = React.useState(false)\n const pending = React.useRef<((answer: boolean) => void) | null>(null)\n\n const settle = React.useCallback((answer: boolean) => {\n pending.current?.(answer)\n pending.current = null\n setOpen(false)\n }, [])\n\n const confirm = React.useCallback<Confirm>(\n (next) =>\n new Promise<boolean>((resolve) => {\n pending.current?.(false)\n pending.current = resolve\n setOptions(next)\n setOpen(true)\n }),\n []\n )\n\n React.useEffect(() => () => pending.current?.(false), [])\n\n return (\n <ConfirmContext.Provider value={confirm}>\n {children}\n <AlertDialog\n open={open}\n onOpenChange={(next) => {\n if (!next) settle(false)\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{options?.title}</AlertDialogTitle>\n {options?.description ? (\n <AlertDialogDescription>\n {options.description}\n </AlertDialogDescription>\n ) : null}\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>\n {options?.cancelLabel ?? \"Cancel\"}\n </AlertDialogCancel>\n <AlertDialogAction\n variant={\n options?.tone === \"destructive\" ? \"destructive\" : \"default\"\n }\n onClick={() => settle(true)}\n >\n {options?.confirmLabel ?? \"Confirm\"}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </ConfirmContext.Provider>\n )\n}\n","\"use client\"\n\nimport { useAdminContext } from \"#orck/admin/context\"\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\"\nimport {\n CircleCheckIcon,\n InfoIcon,\n TriangleAlertIcon,\n OctagonXIcon,\n Loader2Icon,\n} from \"lucide-react\"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const theme = useAdminContext().props.appearance?.theme ?? \"system\"\n\n return (\n <Sonner\n id={useAdminContext().services.namespace}\n theme={(theme === \"inherit\" ? \"system\" : theme) as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n \"--border-radius\": \"var(--radius)\",\n } as React.CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: \"cn-toast\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n","// A deploy rotates chunk hashes, so an open tab's lazy chunk is gone: only a\n// document reload fetches the new index.html.\nconst CHUNK_ERRORS = [\n /dynamically imported module/i,\n /failed to load module script/i,\n /importing a module script failed/i,\n /loading (css )?chunk \\S+ failed/i,\n /unable to preload css/i,\n]\n\nexport function isChunkLoadError(error: unknown): boolean {\n const e = error as { name?: string; message?: string } | null\n if (e?.name === \"ChunkLoadError\") return true\n return CHUNK_ERRORS.some((pattern) => pattern.test(e?.message ?? \"\"))\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\n// A page that failed to render or load. After a deploy the hashed chunk an\n// open tab asks for is gone; only a document reload fetches the new\n// index.html, so that case offers a reload instead of a broken page.\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport { Refresh01Icon } from \"@hugeicons/core-free-icons\"\nimport { Link } from \"#orck/admin/router\"\n\nimport { Button } from \"#orck/admin/components/ui/button\"\nimport { isChunkLoadError } from \"#orck/admin/lib/chunk-error\"\n\nexport function RouteError({ error }: { error: unknown }) {\n const stale = isChunkLoadError(error)\n const message = error instanceof Error ? error.message : \"\"\n return (\n <div\n role=\"alert\"\n className=\"flex min-h-[50vh] flex-col items-center justify-center gap-4 p-6 text-center\"\n >\n <div className=\"max-w-md\">\n <p className=\"font-medium\">\n {stale\n ? \"The console has been updated. Reload to use the new version.\"\n : \"This page failed to load.\"}\n </p>\n {!stale && message ? (\n <p className=\"mt-1 text-sm break-words text-muted-foreground\">\n {message}\n </p>\n ) : null}\n </div>\n <div className=\"flex flex-wrap items-center justify-center gap-3\">\n <Button onClick={() => window.location.reload()}>\n <HugeiconsIcon icon={Refresh01Icon} className=\"size-4\" />\n {stale ? \"Reload\" : \"Try again\"}\n </Button>\n {/* A document load, not client-side navigation: a stale chunk keeps\n failing until index.html is fetched again. */}\n <Link\n to=\"/\"\n className=\"text-sm text-muted-foreground underline underline-offset-4\"\n >\n <AdminMessage id={\"Console home\"} />\n </Link>\n </div>\n </div>\n )\n}\n","import { QueryCache, QueryClient } from \"@tanstack/react-query\"\n\nimport { ApiError } from \"#orck/admin/lib/api/client\"\nimport { createAdminToast, createToastHandlers } from \"#orck/admin/lib/toast\"\n\nexport function shouldRetry(failureCount: number, error: unknown): boolean {\n // Status 0: OpenRails never answered.\n if (error instanceof ApiError && error.status > 0 && error.status < 500)\n return false\n return failureCount < 2\n}\n\nexport const createAdminQueryClient = (namespace?: string) => {\n const { toastApiError } = createToastHandlers(createAdminToast(namespace))\n return new QueryClient({\n queryCache: new QueryCache({\n onError: (error, query) => {\n const action = query.meta?.errorAction\n if (typeof action === \"string\") toastApiError(error, action)\n },\n }),\n defaultOptions: {\n queries: {\n staleTime: 20_000,\n gcTime: 5 * 60_000,\n retry: shouldRetry,\n },\n mutations: {\n retry: false,\n },\n },\n })\n}\n","import { useSyncExternalStore } from \"react\"\nimport type { BillingTheme } from \"../appearance\"\n\nconst media = () => window.matchMedia?.(\"(prefers-color-scheme: dark)\")\nconst subscribe = (notify: () => void) => {\n const query = media()\n query?.addEventListener(\"change\", notify)\n return () => query?.removeEventListener(\"change\", notify)\n}\nconst snapshot = () => (media()?.matches ? \"dark\" : \"light\")\nconst serverSnapshot = () => \"light\" as const\nconst unchanged = () => () => {}\n\nexport function useAdminTheme(theme: BillingTheme = \"inherit\") {\n const system = useSyncExternalStore(\n theme === \"auto\" ? subscribe : unchanged,\n snapshot,\n serverSnapshot\n )\n return theme === \"auto\" ? system : theme\n}\n","import { AdminUIContext } from \"./ui-context\"\nimport {\n Component,\n useId,\n useMemo,\n useRef,\n useCallback,\n useLayoutEffect,\n useState,\n type ReactNode,\n} from \"react\"\nimport { QueryClientProvider } from \"@tanstack/react-query\"\nimport { appearanceStyle } from \"../appearance\"\nimport { AdminContext, createAdminServices } from \"./context\"\nimport { AdminRouter, useLocation } from \"./router\"\nimport { AdminPages } from \"./routes\"\nimport { AppLayout } from \"./layouts/app-layout\"\nimport { ConfirmProvider } from \"./components/confirm\"\nimport { Toaster } from \"./components/ui/sonner\"\nimport { RouteError } from \"./components/route-error\"\nimport { createAdminQueryClient } from \"./lib/query-client\"\nimport type { BillingAdminMerchant, BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\nconst merchantFrom = (\n merchant: string | BillingAdminMerchant\n): BillingAdminMerchant =>\n typeof merchant === \"string\" ? { id: merchant, slug: merchant } : merchant\n\n/** Staff billing pages inside the host's app, authentication, router, and theme. */\nexport function BillingAdmin(props: BillingAdminProps) {\n const [selected, setSelected] = useState<string>()\n const [connection, setConnection] = useState({\n auth: props.auth,\n baseUrl: props.baseUrl,\n generation: 0,\n })\n if (connection.auth !== props.auth || connection.baseUrl !== props.baseUrl)\n setConnection({\n auth: props.auth,\n baseUrl: props.baseUrl,\n generation: connection.generation + 1,\n })\n return (\n <BillingAdminInstance\n key={connection.generation}\n {...props}\n selected={selected}\n onSelected={setSelected}\n />\n )\n}\n\nfunction BillingAdminInstance({\n selected,\n onSelected,\n ...props\n}: BillingAdminProps & {\n selected?: string\n onSelected: (value: string) => void\n}) {\n const theme = useAdminTheme(props.appearance?.theme)\n const namespace = useId()\n const [portal, setPortal] = useState<HTMLDivElement | null>(null)\n const merchants = useMemo(\n () =>\n props.merchants ??\n (props.merchant\n ? [merchantFrom(props.merchant)]\n : [{ id: \"\", slug: \"\", display_name: \"Billing\" }]),\n [props.merchants, props.merchant]\n )\n const requested = props.merchant ? merchantFrom(props.merchant).id : selected\n const activeMerchant =\n merchants.find((m) => m.id === requested || m.slug === requested) ??\n merchants[0]\n const scope = `${props.baseUrl}:${activeMerchant?.id ?? \"\"}:${activeMerchant?.slug ?? \"\"}`\n const currentScope = useRef<string | undefined>(scope)\n useLayoutEffect(() => {\n currentScope.current = scope\n return () => {\n currentScope.current = undefined\n }\n }, [scope])\n const isCurrent = useCallback(() => currentScope.current === scope, [scope])\n const queryClient = useMemo(\n () => props.queryClient ?? createAdminQueryClient(namespace),\n [namespace, props.queryClient]\n )\n const services = useMemo(\n () =>\n // The factory captures this callback; only request-time checks read the ref.\n // eslint-disable-next-line react-hooks/refs\n createAdminServices({\n namespace,\n isCurrent,\n baseUrl: props.baseUrl,\n auth: props.auth,\n merchant: activeMerchant,\n exchange: props.exchange,\n }),\n [\n isCurrent,\n namespace,\n props.baseUrl,\n props.auth,\n props.exchange,\n activeMerchant,\n ]\n )\n const value = {\n props,\n services,\n merchants,\n activeMerchant,\n portal,\n selectMerchant(slug: string) {\n const merchant = merchants.find((m) => m.slug === slug || m.id === slug)\n if (!merchant) return\n onSelected(merchant.id)\n props.onMerchantChange?.(merchant)\n },\n }\n return (\n <div\n lang={props.language ?? \"en\"}\n className={[\"orba\", props.className].filter(Boolean).join(\" \")}\n data-orba-theme={theme}\n style={{ ...appearanceStyle(props.appearance, \"orba\"), ...props.style }}\n >\n <AdminUIContext.Provider value={{ namespace, messages: props.messages }}>\n <AdminContext.Provider value={value}>\n <QueryClientProvider client={queryClient}>\n <AdminRouter\n basePath={props.basePath}\n navigation={props.navigation}\n >\n <ConfirmProvider>\n <AppLayout>\n <PageBoundary>\n <AdminPages />\n </PageBoundary>\n </AppLayout>\n </ConfirmProvider>\n <Toaster />\n </AdminRouter>\n </QueryClientProvider>\n <div ref={setPortal} />\n </AdminContext.Provider>\n </AdminUIContext.Provider>\n </div>\n )\n}\n\nclass Boundary extends Component<{ children: ReactNode }, { error?: unknown }> {\n state: { error?: unknown } = {}\n static getDerivedStateFromError(error: unknown) {\n return { error }\n }\n render() {\n return this.state.error ? (\n <RouteError error={this.state.error} />\n ) : (\n this.props.children\n )\n }\n}\nfunction PageBoundary({ children }: { children: ReactNode }) {\n const location = useLocation()\n return <Boundary key={location.pathname}>{children}</Boundary>\n}\n","import { AdminMessage } from \"#orck/admin/ui-context\"\nimport { useCallback, useEffect, useMemo, useState } from \"react\"\nimport { appearanceStyle } from \"../appearance\"\nimport type { AdminAccess } from \"../client/generated/wire\"\nimport { ApiError, createAdminClient } from \"./lib/api/client\"\nimport { createAdminAPI } from \"./lib/api\"\nimport { formatNativeAmount } from \"./lib/format\"\nimport { errorText } from \"./lib/error-text\"\nimport { statusLabel } from \"./components/status-badge\"\nimport type { BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\ntype Connection = Pick<\n BillingAdminProps,\n \"baseUrl\" | \"auth\" | \"merchant\" | \"exchange\"\n>\n\nfunction useAPI(options: Connection) {\n const id =\n typeof options.merchant === \"string\"\n ? options.merchant\n : options.merchant?.id\n const slug =\n typeof options.merchant === \"string\"\n ? options.merchant\n : options.merchant?.slug\n return useMemo(\n () =>\n createAdminAPI(\n createAdminClient({\n baseUrl: options.baseUrl,\n auth: options.auth,\n exchange: options.exchange,\n merchant: id ? { id, slug: slug ?? id } : undefined,\n })\n ),\n [options.baseUrl, options.auth, options.exchange, id, slug]\n )\n}\n\nfunction useRead<T>(load: (signal: AbortSignal) => Promise<T>) {\n const [attempt, setAttempt] = useState(0)\n const [result, setResult] = useState<{\n load: typeof load\n attempt: number\n data?: T\n error?: Error\n }>()\n useEffect(() => {\n const abort = new AbortController()\n load(abort.signal).then(\n (data) => {\n if (!abort.signal.aborted) setResult({ load, attempt, data })\n },\n (error) => {\n if (!abort.signal.aborted)\n setResult({\n load,\n attempt,\n error: error instanceof Error ? error : new Error(String(error)),\n })\n }\n )\n return () => abort.abort()\n }, [load, attempt])\n const current =\n result?.load === load && result.attempt === attempt ? result : undefined\n return {\n data: current?.data,\n error: current?.error,\n isPending: !current,\n refetch: () => setAttempt((n) => n + 1),\n }\n}\n\n/** Reads tab permissions without requiring a BillingAdmin or QueryClient provider. */\nexport function useBillingAdminAccess(options: Connection) {\n const api = useAPI(options)\n return useRead<AdminAccess>(\n useCallback((signal) => api.getAdminAccess(signal), [api])\n )\n}\n\nexport interface BillingCustomerSummaryProps extends Connection {\n customer: string\n href?: string\n appearance?: BillingAdminProps[\"appearance\"]\n className?: string\n}\n\n// An account that never reached billing has no customer yet: that is a state, not a failure.\nconst missingCustomer = (error: Error) =>\n error instanceof ApiError && error.code === \"customer_not_found\"\n\n/** A bounded preview for the host's customer or user page. */\nexport function BillingCustomerSummary(props: BillingCustomerSummaryProps) {\n const theme = useAdminTheme(props.appearance?.theme)\n const api = useAPI(props)\n const { data, error, isPending, refetch } = useRead(\n useCallback(\n async (signal: AbortSignal) => {\n const [customer, subscriptions, entitlements, access, payments] =\n await Promise.all([\n api.getCustomer(props.customer, signal),\n api.listSubscriptions(\n { customer_id: props.customer, status: \"active\" },\n 5,\n undefined,\n signal\n ),\n api.listCustomerEntitlements(props.customer, { limit: 5 }, signal),\n api.listCustomerProductAccess(props.customer, { limit: 5 }, signal),\n api.listPayments(\n { customer_id: props.customer },\n { limit: 5 },\n signal\n ),\n ])\n return { customer, subscriptions, entitlements, access, payments }\n },\n [api, props.customer]\n )\n )\n return (\n <section\n className={[\"orba\", props.className].filter(Boolean).join(\" \")}\n data-orba-theme={theme}\n style={appearanceStyle(props.appearance, \"orba\")}\n >\n <div className=\"overflow-hidden rounded-xl bg-card text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10\">\n <div className=\"flex flex-wrap items-center justify-between gap-3 border-b px-5 py-5 sm:px-6\">\n <h2 className=\"text-base leading-tight font-semibold\">\n <AdminMessage id={\"Billing\"} />\n </h2>\n {props.href && (\n <a\n className=\"inline-flex min-h-10 items-center text-sm text-muted-foreground underline-offset-4 hover:text-foreground hover:underline sm:min-h-0\"\n href={props.href}\n >\n <AdminMessage id={\"View billing details\"} />\n </a>\n )}\n </div>\n <div className=\"px-5 py-4 sm:px-6\">\n {isPending && (\n <p role=\"status\" className=\"text-muted-foreground\">\n <AdminMessage id={\"Loading billing…\"} />\n </p>\n )}\n {error && missingCustomer(error) && (\n <p className=\"text-muted-foreground\">\n <AdminMessage id={\"No billing activity yet.\"} />\n </p>\n )}\n {error && !missingCustomer(error) && (\n <p role=\"alert\">\n {errorText(error).text}{\" \"}\n <button\n type=\"button\"\n className=\"underline underline-offset-4\"\n onClick={refetch}\n >\n <AdminMessage id={\"Try again\"} />\n </button>\n </p>\n )}\n {data && (\n <dl className=\"grid gap-x-6 gap-y-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-y-3\">\n {data.customer.balances.map((balance) => (\n <SummaryRow\n key={balance.currency}\n label=\"Available balance\"\n items={[\n formatNativeAmount(\n balance.available_amount,\n balance.currency\n ),\n ]}\n />\n ))}\n <SummaryRow\n label=\"Active subscriptions\"\n items={data.subscriptions.data.map(\n (subscription) =>\n subscription.product?.display_name ?? subscription.id\n )}\n />\n <SummaryRow\n label=\"Entitlements\"\n items={data.entitlements.data.map(\n (entitlement) => entitlement.entitlement\n )}\n />\n <SummaryRow\n label=\"Product access\"\n items={data.access.data.map(\n (access) =>\n `${access.product_name} · ${statusLabel(access.status)}`\n )}\n />\n <SummaryRow\n label=\"Recent payments\"\n items={data.payments.data.map(\n (payment) =>\n `${formatNativeAmount(payment.amount, payment.currency)} · ${statusLabel(payment.status)}`\n )}\n />\n </dl>\n )}\n </div>\n </div>\n </section>\n )\n}\n\n// SummaryRow is one labelled list in the panel; an empty one says \"None\".\nfunction SummaryRow({ label, items }: { label: string; items: string[] }) {\n return (\n <>\n <dt className=\"pt-2 text-muted-foreground first:pt-0 sm:pt-0\">\n <AdminMessage id={label} />\n </dt>\n <dd className=\"min-w-0\">\n {items.length ? (\n <ul className=\"grid gap-0.5\">\n {items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n ) : (\n <span className=\"text-muted-foreground\">\n <AdminMessage id={\"None\"} />\n </span>\n )}\n </dd>\n </>\n )\n}\n\n/** A ban or account deletion never cancels the customer's subscriptions. */\nexport function billingConfirmWarnings(customer: {\n subscriptions: readonly { status: string }[]\n}): string[] {\n return customer.subscriptions.some(\n (subscription) => subscription.status !== \"canceled\"\n )\n ? [\n \"This customer has ongoing subscriptions. Banning or deleting the account does not cancel them; cancel them separately in billing.\",\n ]\n : []\n}\n\nexport interface BillingConfirmWarningsOptions extends Connection {\n customer: string\n signal?: AbortSignal\n}\n\nconst uncheckedBillingWarning =\n \"Subscription status could not be fully checked. Banning or deleting the account does not cancel subscriptions; review billing separately.\"\n\n/** Advisory-only billing check before a host bans or deletes an account. */\nexport async function loadBillingConfirmWarnings(\n options: BillingConfirmWarningsOptions\n): Promise<string[]> {\n const merchant =\n typeof options.merchant === \"string\"\n ? { id: options.merchant, slug: options.merchant }\n : options.merchant\n const api = createAdminAPI(createAdminClient({ ...options, merchant }))\n let cursor: string | undefined\n const visited = new Set<string>()\n try {\n // This is a confirmation hint, not an unbounded account export. A partial\n // scan stays advisory rather than preventing the host's account action.\n for (let page = 0; page < 10; page++) {\n options.signal?.throwIfAborted()\n const subscriptions = await api.listSubscriptions(\n { customer_id: options.customer },\n 100,\n cursor,\n options.signal\n )\n const warnings = billingConfirmWarnings({\n subscriptions: subscriptions.data,\n })\n if (warnings.length) return warnings\n if (!subscriptions.next_cursor) return []\n if (visited.has(subscriptions.next_cursor)) break\n visited.add(subscriptions.next_cursor)\n cursor = subscriptions.next_cursor\n }\n } catch (error) {\n options.signal?.throwIfAborted()\n if (error instanceof Error && error.name === \"AbortError\") throw error\n }\n return [uncheckedBillingWarning]\n}\n\nconst permissionAreas: Record<string, string> = {\n \"customer:read\": \"Read customers, subscriptions, payments, and orders.\",\n \"customer:manage\":\n \"Change customer billing, including refunds, cancellations, and credits.\",\n \"catalog:manage\": \"Change products, prices, meters, and catalog migrations.\",\n \"catalog:read\": \"Read products, prices, meters, and catalog migrations.\",\n \"config:read\":\n \"Read merchant configuration, PSPs, findings, and notifications.\",\n \"config:manage\":\n \"Change merchant configuration, PSPs, findings, and notifications.\",\n \"metrics:read\": \"Read revenue metrics, reports, and dashboards.\",\n \"entitlements:read\":\n \"Read customer entitlements through the application API.\",\n \"usage:read\":\n \"Read usage, admissions, and running charges through the application API.\",\n \"usage:manage\": \"Admit and charge usage through the application API.\",\n \"events:read\":\n \"Read retained billing events through the application API.\",\n \"orders:manage\":\n \"Preview, create, and withdraw merchant orders through the application API.\",\n \"customers:read\":\n \"Read merchant customer identity and billing settings.\",\n}\n\n/** Descriptions for a host's role editor; permissions are enforced by the API. */\nexport const billingPermissionHelp: Readonly<Record<string, string>> =\n Object.fromEntries(\n [\"merchant\", \"root\"].flatMap((scope) =>\n Object.entries(permissionAreas).map(([permission, description]) => [\n `${scope}:${permission}`,\n `${description} ${scope === \"root\" ? \"Applies across merchants.\" : \"Applies within this merchant.\"}`,\n ])\n )\n )\n","import { useEffect, type ReactNode } from \"react\"\nimport {\n SignInPanel,\n StepUpProvider,\n useStepUpGuard,\n type StepUpProviderProps,\n} from \"@openrails/auth-ui\"\nimport { useAuthClient, useSession } from \"@openrails/auth-ui/react\"\nimport {\n AuthAdmin,\n useGroupAdminAccess,\n useHistoryNavigation,\n useUsersAdminAccess,\n type AdminNavigation,\n type AuthAdminProps,\n} from \"@openrails/auth-ui/admin\"\nimport { appearanceStyle } from \"../appearance\"\nimport { BillingAdmin } from \"./billing-admin\"\nimport {\n BillingCustomerSummary,\n loadBillingConfirmWarnings,\n useBillingAdminAccess,\n} from \"./summary\"\nimport type { BillingAdminMerchant, BillingAdminProps } from \"./types\"\nimport { useAdminTheme } from \"./theme\"\n\nexport interface AdminConsoleProps {\n /** AuthKit's JSON API mount, e.g. `/api/v1`. */\n authBaseUrl: string\n /** The engine's API prefix, including /v1. */\n billingBaseUrl: string\n merchant?: string | BillingAdminMerchant\n /** Where the console is mounted. Default `/admin`. */\n basePath?: string\n /** The host router; the history API without one. */\n navigation?: AdminNavigation\n /** The host's sign-in page, opened with `?return_to=`; AuthKit's sign-in panel without one. */\n signInPath?: string\n appearance?: BillingAdminProps[\"appearance\"]\n /** AuthKit's admin language; billing administration is English. */\n language?: string\n /** The user directory's options: tenant, entitlements, languages, and the host's own panels and warnings after billing's. */\n users?: Exclude<AuthAdminProps[\"users\"], false | undefined>\n /** Resolves the linked Solana wallet's signer for a wallet step-up. */\n acquireSolanaSigner?: StepUpProviderProps[\"acquireSolanaSigner\"]\n className?: string\n}\n\n/**\n * The staff console: AuthKit's account administration at `basePath` (users,\n * members, roles, credentials) and billing administration at\n * `basePath/billing`, each shown only to whoever holds its permissions. Users\n * carry their billing summary and a subscription warning before a ban or\n * delete; AuthKit's writes step up through the console's dialog. Render it\n * inside the host's `AuthProvider`. Every request is authorized by its API.\n */\nexport function AdminConsole(props: AdminConsoleProps) {\n const session = useSession()\n const history = useHistoryNavigation()\n const navigation = props.navigation ?? history\n const theme = useAdminTheme(props.appearance?.theme)\n let body: ReactNode\n if (session.status === \"loading\") body = <Status>Loading…</Status>\n else if (session.status !== \"authenticated\")\n body = props.signInPath ? (\n <SignInRedirect path={props.signInPath} navigation={navigation} />\n ) : (\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"2.5rem 0\",\n }}\n >\n <SignInPanel />\n </div>\n )\n else\n body = (\n <StepUpProvider\n key={session.userId}\n acquireSolanaSigner={props.acquireSolanaSigner}\n >\n <Console {...props} navigation={navigation} theme={theme} />\n </StepUpProvider>\n )\n return (\n <div className={props.className} data-openrails-admin-console=\"\">\n {body}\n </div>\n )\n}\n\nfunction SignInRedirect({\n path,\n navigation,\n}: {\n path: string\n navigation: AdminNavigation\n}) {\n const here = navigation.pathname + navigation.search\n useEffect(() => {\n // A full load: the sign-in page is the host's, outside this console's router.\n window.location.assign(`${path}?return_to=${encodeURIComponent(here)}`)\n }, [path, here])\n return <Status>Signing in…</Status>\n}\n\nconst trimSlashes = (s: string) => s.replace(/^\\/+|\\/+$/g, \"\")\n\nfunction Console({\n authBaseUrl,\n billingBaseUrl,\n merchant,\n basePath = \"/admin\",\n navigation,\n appearance,\n language,\n users: host = {},\n theme,\n}: AdminConsoleProps & { navigation: AdminNavigation; theme: string }) {\n const auth = useAuthClient()\n const guard = useStepUpGuard()\n const users = useUsersAdminAccess({\n auth,\n baseUrl: authBaseUrl,\n tenantId: host.tenantId,\n })\n const root = useGroupAdminAccess({\n auth,\n baseUrl: authBaseUrl,\n group: \"root\",\n })\n const billing = useBillingAdminAccess({\n baseUrl: billingBaseUrl,\n auth,\n merchant,\n })\n const base = `/${trimSlashes(basePath)}`\n const inside = navigation.pathname.startsWith(`${base}/`)\n ? trimSlashes(navigation.pathname.slice(base.length))\n : \"\"\n const onBilling = inside === \"billing\" || inside.startsWith(\"billing/\")\n const accounts = users.any || root.any\n const grant = billing.data\n const customers = !!grant && grant.admin !== \"none\"\n const billable =\n !!grant &&\n (customers ||\n grant.catalog !== \"none\" ||\n grant.merchant_config !== \"none\" ||\n grant.metrics)\n const checking =\n users.status === \"loading\" || root.status === \"loading\" || billing.isPending\n const landing = !checking && !accounts && billable && !onBilling\n useEffect(() => {\n if (landing) navigation.navigate(`${base}/billing`, { replace: true })\n }, [landing, navigation, base])\n\n if (checking) return <Status>Loading…</Status>\n if (!accounts && !billable) {\n const failed = users.error ?? root.error ?? billing.error\n return (\n <Status>\n {failed\n ? \"Your access could not be checked.\"\n : \"You have no administrative access.\"}\n {failed && (\n <>\n {\" \"}\n <button\n type=\"button\"\n className=\"underline underline-offset-4\"\n onClick={() => {\n users.reload()\n root.reload()\n billing.refetch()\n }}\n >\n Try again\n </button>\n </>\n )}\n </Status>\n )\n }\n const connection = { baseUrl: billingBaseUrl, auth, merchant }\n const tabs = [\n accounts && { href: base, label: \"Accounts\", current: !onBilling },\n billable && {\n href: `${base}/billing`,\n label: \"Billing\",\n current: onBilling,\n },\n ].filter((tab) => !!tab)\n return (\n <>\n {tabs.length > 1 && (\n <nav\n aria-label=\"Administration\"\n className=\"orba mb-6 flex gap-1 border-b px-4\"\n data-orba-theme={theme}\n style={appearanceStyle(appearance, \"orba\")}\n >\n {tabs.map((tab) => (\n <a\n key={tab.href}\n href={tab.href}\n aria-current={tab.current ? \"page\" : undefined}\n onClick={(event) => {\n if (event.metaKey || event.ctrlKey || event.shiftKey) return\n event.preventDefault()\n navigation.navigate(tab.href)\n }}\n className={[\n \"-mb-px border-b-2 px-3 py-2 text-sm font-medium\",\n tab.current\n ? \"border-primary text-foreground\"\n : \"border-transparent text-muted-foreground hover:text-foreground\",\n ].join(\" \")}\n >\n {tab.label}\n </a>\n ))}\n </nav>\n )}\n {onBilling || !accounts ? (\n billable && (\n <BillingAdmin\n {...connection}\n basePath={`${base}/billing`}\n navigation={navigation}\n userHref={\n users.users.read\n ? (id) => `${base}/users/${encodeURIComponent(id)}`\n : undefined\n }\n appearance={appearance}\n />\n )\n ) : (\n <div style={{ padding: \"0 1.5rem 1.5rem\" }}>\n <AuthAdmin\n auth={auth}\n baseUrl={authBaseUrl}\n basePath={base}\n navigation={navigation}\n guard={guard}\n appearance={{ theme: appearance?.theme ?? \"inherit\" }}\n language={language}\n users={\n customers\n ? {\n ...host,\n userPanels: (user) => (\n <>\n <BillingCustomerSummary\n {...connection}\n key={user.id}\n customer={user.id}\n appearance={appearance}\n href={`${base}/billing/customers/${encodeURIComponent(user.id)}`}\n />\n {host.userPanels?.(user)}\n </>\n ),\n confirmWarnings: async (user, action) => {\n const [billed, own] = await Promise.all([\n loadBillingConfirmWarnings({\n ...connection,\n customer: user.id,\n }),\n host.confirmWarnings?.(user, action),\n ])\n return [...billed, ...(own == null ? [] : [own].flat())]\n },\n }\n : host\n }\n />\n </div>\n )}\n </>\n )\n}\n\nfunction Status({ children }: { children: ReactNode }) {\n return (\n <p role=\"status\" style={{ padding: \"1.5rem\" }}>\n {children}\n </p>\n )\n}\n","/** English message keys. Override individual entries with BillingAdmin.messages. */\nexport const billingAdminMessages = {\n \"Sold by OpenRails\": \"Sold by OpenRails\",\n \"OpenRails bills this price through your card vault and charge PSPs, and on Solana. Provider catalogs are not synchronized. Hosted one-time Stripe payments use inline checkout objects.\":\n \"OpenRails bills this price through your card vault and charge PSPs, and on Solana. Provider catalogs are not synchronized. Hosted one-time Stripe payments use inline checkout objects.\",\n \"Sold via: \": \"Sold via: \",\n \"every method you have\": \"every method you have\",\n \"Solana plan \": \"Solana plan \",\n \"Owned by its provider\": \"Owned by its provider\",\n \"The provider owns and runs this price; OpenRails read its terms and never writes it. Verify asks the provider what it holds now, and changes nothing.\":\n \"The provider owns and runs this price; OpenRails read its terms and never writes it. Verify asks the provider what it holds now, and changes nothing.\",\n \"'s price\": \"'s price\",\n \" Edit widget\": \" Edit widget\",\n \" Price\": \" Price\",\n \" Product\": \" Product\",\n \" Product access\": \" Product access\",\n \" Refund\": \" Refund\",\n \" affected · requires human confirm\": \" affected · requires human confirm\",\n \" approved\": \" approved\",\n \" balance\": \" balance\",\n \" blocked and \": \" blocked and \",\n \" corrections Apply approves\": \" corrections Apply approves\",\n \" credentials · \": \" credentials · \",\n \" days away. Card networks require that much notice before a price goes up. You can change the number in Settings.\":\n \" days away. Card networks require that much notice before a price goes up. You can change the number in Settings.\",\n \" days. Pick a shorter range.\": \" days. Pick a shorter range.\",\n \" dismissed\": \" dismissed\",\n \" is not a supported currency.\": \" is not a supported currency.\",\n \" left alone because another change was already scheduled for them.\":\n \" left alone because another change was already scheduled for them.\",\n \" linked; \": \" linked; \",\n \" more\": \" more\",\n \" of\": \" of\",\n \" of \": \" of \",\n \" of 3:\": \" of 3:\",\n \" of them end access, move money or write to a provider.\":\n \" of them end access, move money or write to a provider.\",\n \" on \": \" on \",\n \" open proposals\": \" open proposals\",\n \" rail. Remaining refundable: \": \" rail. Remaining refundable: \",\n \" requests.\": \" requests.\",\n \" seats.\": \" seats.\",\n \" subscription\": \" subscription\",\n \" superseded\": \" superseded\",\n \" to\": \" to\",\n \" to \": \" to \",\n \" to confirm\": \" to confirm\",\n \" to delete, in \": \" to delete, in \",\n \" to set, \": \" to set, \",\n \" to this customer.\": \" to this customer.\",\n \" unmatched or conflicting stay staged.\":\n \" unmatched or conflicting stay staged.\",\n \" were refused: \": \" were refused: \",\n \" with this shape.\": \" with this shape.\",\n \" · applied \": \" · applied \",\n \" · due \": \" · due \",\n \" · exp \": \" · exp \",\n \" · last seen\": \" · last seen\",\n \" · owed\": \" · owed\",\n \" · since \": \" · since \",\n \" · theirs\": \" · theirs\",\n \" · txn\": \" · txn\",\n '\"Not sent to provider\" is fixed by publishing the catalog. Everything else is fixed under Settings, Payment providers.':\n '\"Not sent to provider\" is fixed by publishing the catalog. Everything else is fixed under Settings, Payment providers.',\n \", an edit set\": \", an edit set\",\n \", before another action.\": \", before another action.\",\n \", deleted: \": \", deleted: \",\n \".\": \".\",\n \". Active holds may prevent revocation. Payment refunds are managed separately.\":\n \". Active holds may prevent revocation. Payment refunds are managed separately.\",\n \". Currency and interval stay locked to the current price.\":\n \". Currency and interval stay locked to the current price.\",\n \"/app/usage-events\": \"/app/usage-events\",\n \"1 day\": \"1 day\",\n \"30 days\": \"30 days\",\n \"365 days\": \"365 days\",\n \"7 days\": \"7 days\",\n \"90 days\": \"90 days\",\n \": the batch says\": \": the batch says\",\n \": yours \": \": yours \",\n \"A CSV file with the header mapping,key,customer maps your own identifiers to customers. An empty customer deletes that mapping.\":\n \"A CSV file with the header mapping,key,customer maps your own identifiers to customers. An empty customer deletes that mapping.\",\n \"A collection of this order is in progress. It must finish, or be resolved with \":\n \"A collection of this order is in progress. It must finish, or be resolved with \",\n \"A manual link wins over every rule.\": \"A manual link wins over every rule.\",\n \"A newer import of this PSP supersedes this one: link and apply \":\n \"A newer import of this PSP supersedes this one: link and apply \",\n \"A price going down needs no notice, so today is fine.\":\n \"A price going down needs no notice, so today is fine.\",\n \"A product is the thing a customer gets. You set what it costs afterwards, by adding a price to it.\":\n \"A product is the thing a customer gets. You set what it costs afterwards, by adding a price to it.\",\n \"A reprice_scheduled notice is queued for every affected subscriber as soon as you confirm.\":\n \"A reprice_scheduled notice is queued for every affected subscriber as soon as you confirm.\",\n \"Access duration\": \"Access duration\",\n \"Access, not paying\": \"Access, not paying\",\n \"Account ID\": \"Account ID\",\n \"Accrual cap\": \"Accrual cap\",\n \"Accrue from another meter\": \"Accrue from another meter\",\n Action: \"Action\",\n Active: \"Active\",\n \"Active subscriptions\": \"Active subscriptions\",\n Activity: \"Activity\",\n \"Add PSP\": \"Add PSP\",\n \"Add a PSP\": \"Add a PSP\",\n \"Add cell\": \"Add cell\",\n \"Add contact\": \"Add contact\",\n \"Add credit in \": \"Add credit in \",\n \"Add dimension\": \"Add dimension\",\n \"Add filter\": \"Add filter\",\n \"Add tax detail\": \"Add tax detail\",\n \"Add tier\": \"Add tier\",\n Aggregation: \"Aggregation\",\n \"Alert email\": \"Alert email\",\n All: \"All\",\n \"All PSPs\": \"All PSPs\",\n \"All kinds\": \"All kinds\",\n \"All open proposals\": \"All open proposals\",\n \"All origins\": \"All origins\",\n \"All owners\": \"All owners\",\n \"All rails\": \"All rails\",\n \"All reasons\": \"All reasons\",\n \"All statuses\": \"All statuses\",\n Allowance: \"Allowance\",\n \"Also revoke access immediately\": \"Also revoke access immediately\",\n \"Also revoke granted access\": \"Also revoke granted access\",\n Amount: \"Amount\",\n \"Amount (\": \"Amount (\",\n Applied: \"Applied\",\n Apply: \"Apply\",\n \"Apply again\": \"Apply again\",\n \"Apply catalog\": \"Apply catalog\",\n \"Apply catalog changes\": \"Apply catalog changes\",\n \"Apply filters\": \"Apply filters\",\n \"Apply import\": \"Apply import\",\n \"Apply queued\": \"Apply queued\",\n \"Apply reviewed batch\": \"Apply reviewed batch\",\n \"Approvals and dismissals need a signed-in person: an API key or service token cannot decide them.\":\n \"Approvals and dismissals need a signed-in person: an API key or service token cannot decide them.\",\n Approve: \"Approve\",\n \"Approve \": \"Approve \",\n Archive: \"Archive\",\n Ask: \"Ask\",\n \"Ask an administrator for a role that includes it.\":\n \"Ask an administrator for a role that includes it.\",\n \"Attempt not found.\": \"Attempt not found.\",\n Attempted: \"Attempted\",\n Attempts: \"Attempts\",\n \"Available balance\": \"Available balance\",\n Back: \"Back\",\n \"Back to metering\": \"Back to metering\",\n Balance: \"Balance\",\n \"Batch receipt\": \"Batch receipt\",\n Billing: \"Billing\",\n \"Billing contacts\": \"Billing contacts\",\n \"Billing interval\": \"Billing interval\",\n \"Billing support\": \"Billing support\",\n \"Billing URL\": \"Billing URL\",\n \"Can this be bought?\": \"Can this be bought?\",\n Cancel: \"Cancel\",\n \"Cancel subscription\": \"Cancel subscription\",\n \"Cancel this migration?\": \"Cancel this migration?\",\n Canceled: \"Canceled\",\n Card: \"Card\",\n \"Card verifications\": \"Card verifications\",\n Catalog: \"Catalog\",\n \"Catalog document\": \"Catalog document\",\n \"Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator.\":\n \"Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator.\",\n \"Catalog updates are disabled. The console is read-only.\":\n \"Catalog updates are disabled. The console is read-only.\",\n \"Catalog updates are unavailable. You can still browse products and prices.\":\n \"Catalog updates are unavailable. You can still browse products and prices.\",\n \"Category / reason\": \"Category / reason\",\n Change: \"Change\",\n \"Choose a price\": \"Choose a price\",\n \"Choose a product\": \"Choose a product\",\n Clear: \"Clear\",\n \"Customer id\": \"Customer id\",\n \"Differences a PSP pull found in what OpenRails holds. Nothing changes until a person approves it.\":\n \"Differences a PSP pull found in what OpenRails holds. Nothing changes until a person approves it.\",\n Dismiss: \"Dismiss\",\n \"Dismiss \": \"Dismiss \",\n \"Dismiss provider price\": \"Dismiss provider price\",\n \"Dismissed proposals close without changing anything.\":\n \"Dismissed proposals close without changing anything.\",\n \"Each approved change applies on its own, if what it was based on has not moved.\":\n \"Each approved change applies on its own, if what it was based on has not moved.\",\n \"Each import pulls one PSP read-only and stages what it read. Link and map what it staged, then apply it.\":\n \"Each import pulls one PSP read-only and stages what it read. Link and map what it staged, then apply it.\",\n Effects: \"Effects\",\n Evidence: \"Evidence\",\n Facts: \"Facts\",\n Failed: \"Failed\",\n \"Find a customer with billing\": \"Find a customer with billing\",\n Findings: \"Findings\",\n \"From import \": \"From import \",\n \"Full history\": \"Full history\",\n \"Grants: \": \"Grants: \",\n \"History since\": \"History since\",\n \"History start date\": \"History start date\",\n \"History through \": \"History through \",\n \"Import of \": \"Import of \",\n \"Import records\": \"Import records\",\n Landing: \"Landing\",\n \"Lands the linked records as billing. \":\n \"Lands the linked records as billing. \",\n \"Lines \": \"Lines \",\n Link: \"Link\",\n \"Link record\": \"Link record\",\n \"Link removed: re-linking\": \"Link removed: re-linking\",\n \"Link saved: re-linking\": \"Link saved: re-linking\",\n \"Link to customer\": \"Link to customer\",\n Linking: \"Linking\",\n \"Linking rules\": \"Linking rules\",\n \"Links by the rules of this PSP's latest import:\":\n \"Links by the rules of this PSP's latest import:\",\n \"Listing prices needs catalog read.\": \"Listing prices needs catalog read.\",\n \"Live provider subscriptions OpenRails could not land. Each lands once, by itself, when its cause is fixed.\":\n \"Live provider subscriptions OpenRails could not land. Each lands once, by itself, when its cause is fixed.\",\n Map: \"Map\",\n \"Map provider price\": \"Map provider price\",\n \"Map to product\": \"Map to product\",\n Mapped: \"Mapped\",\n \"Mapped to\": \"Mapped to\",\n \"Mapping a price edits the catalog: it needs \":\n \"Mapping a price edits the catalog: it needs \",\n \"Mappings file\": \"Mappings file\",\n \"Mappings set: \": \"Mappings set: \",\n \"Needs \": \"Needs \",\n \"No PSP has been pulled yet.\": \"No PSP has been pulled yet.\",\n \"No PSP here has a catalog OpenRails observes.\":\n \"No PSP here has a catalog OpenRails observes.\",\n \"No proposals are open.\": \"No proposals are open.\",\n \"No provider prices match.\": \"No provider prices match.\",\n \"No records in this state.\": \"No records in this state.\",\n \"No staged subscription names a plan.\":\n \"No staged subscription names a plan.\",\n \"Not observed yet: read from the provider when mapped\":\n \"Not observed yet: read from the provider when mapped\",\n \"Notes (optional)\": \"Notes (optional)\",\n \"Notes (required)\": \"Notes (required)\",\n \"Nothing is parked.\": \"Nothing is parked.\",\n Object: \"Object\",\n \"Offer as a tier-change target\": \"Offer as a tier-change target\",\n \"PSP imports\": \"PSP imports\",\n Parked: \"Parked\",\n \"Parked subscriptions\": \"Parked subscriptions\",\n Plan: \"Plan\",\n \"Plans its subscriptions name\": \"Plans its subscriptions name\",\n \"Price cleared: re-linking\": \"Price cleared: re-linking\",\n \"Price dismissed\": \"Price dismissed\",\n \"Price key\": \"Price key\",\n \"Price mapped\": \"Price mapped\",\n \"Price saved: re-linking\": \"Price saved: re-linking\",\n \"Prices each PSP's own catalog holds, as OpenRails last observed them. A subscription on an unmapped price cannot land: map it to a product, or dismiss it as not yours.\":\n \"Prices each PSP's own catalog holds, as OpenRails last observed them. A subscription on an unmapped price cannot land: map it to a product, or dismiss it as not yours.\",\n Progress: \"Progress\",\n Proposals: \"Proposals\",\n \"Provider price\": \"Provider price\",\n \"Provider prices\": \"Provider prices\",\n \"Provider ref\": \"Provider ref\",\n \"Provider subscription\": \"Provider subscription\",\n \"Pulled: ready to apply\": \"Pulled: ready to apply\",\n \"Re-link\": \"Re-link\",\n \"Re-link an import to apply them:\": \"Re-link an import to apply them:\",\n \"Re-link requested\": \"Re-link requested\",\n \"Reading catalog and roster\": \"Reading catalog and roster\",\n \"Reads the PSP's catalog, customers, subscriptions and history, read-only. Nothing lands before you apply it.\":\n \"Reads the PSP's catalog, customers, subscriptions and history, read-only. Nothing lands before you apply it.\",\n \"Pull PSP\": \"Pull PSP\",\n \"Pull a PSP\": \"Pull a PSP\",\n \"Pull started\": \"Pull started\",\n \"Record state\": \"Record state\",\n Records: \"Records\",\n Reload: \"Reload\",\n Retired: \"Retired\",\n \"Review records\": \"Review records\",\n \"Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told.\":\n \"Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told.\",\n \"Change payment method\": \"Change payment method\",\n \"Change price\": \"Change price\",\n \"Change price for \": \"Change price for \",\n \"Change subscription\": \"Change subscription\",\n \"Change the title, chart type or date range behavior. The query stays the same.\":\n \"Change the title, chart type or date range behavior. The query stays the same.\",\n Channel: \"Channel\",\n \"Charged twice\": \"Charged twice\",\n \"Chart type\": \"Chart type\",\n \"Checking your catalog…\": \"Checking your catalog…\",\n \"Choose a method\": \"Choose a method\",\n Churn: \"Churn\",\n \"Clear all\": \"Clear all\",\n \"Clear customer\": \"Clear customer\",\n \"Clear customer filter\": \"Clear customer filter\",\n \"Clear filters\": \"Clear filters\",\n Close: \"Close\",\n Code: \"Code\",\n Collected: \"Collected\",\n \"Collection method\": \"Collection method\",\n \"Collection:\": \"Collection:\",\n \"Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again.\":\n \"Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again.\",\n \"Console home\": \"Console home\",\n Contact: \"Contact\",\n \"Continue with payment provider\": \"Continue with payment provider\",\n \"Could not load the available plans.\": \"Could not load the available plans.\",\n \"Count events\": \"Count events\",\n \"Count uses one unit for every matching event.\":\n \"Count uses one unit for every matching event.\",\n Coverage: \"Coverage\",\n \"Create a meter to describe the events your application will report and bill.\":\n \"Create a meter to describe the events your application will report and bill.\",\n \"Create or activate a product first\": \"Create or activate a product first\",\n Created: \"Created\",\n \"Creating this meter does not send events. The host application must report idempotent usage to\":\n \"Creating this meter does not send events. The host application must report idempotent usage to\",\n Credentials: \"Credentials\",\n \"Credit and trust\": \"Credit and trust\",\n \"Credit grants\": \"Credit grants\",\n \"Credit limit\": \"Credit limit\",\n \"Credit transaction ledger\": \"Credit transaction ledger\",\n Credits: \"Credits\",\n Currency: \"Currency\",\n \"Currency · interval\": \"Currency · interval\",\n \"Current amount\": \"Current amount\",\n \"Current credentials are never shown. A new one is validated against the live provider before it is stored; if that check fails, nothing is written. Leave a field blank to keep the credential it holds now.\":\n \"Current credentials are never shown. A new one is validated against the live provider before it is stored; if that check fails, nothing is written. Leave a field blank to keep the credential it holds now.\",\n \"Current period\": \"Current period\",\n \"Custom range\": \"Custom range\",\n Customer: \"Customer\",\n \"Customer ID\": \"Customer ID\",\n \"Customer controls\": \"Customer controls\",\n \"Customer lookup\": \"Customer lookup\",\n \"Customer not found.\": \"Customer not found.\",\n \"Customer-facing merchant details used on invoices and emails.\":\n \"Customer-facing merchant details used on invoices and emails.\",\n Customers: \"Customers\",\n Cycles: \"Cycles\",\n \"Daily subscriptions\": \"Daily subscriptions\",\n Dashboard: \"Dashboard\",\n Date: \"Date\",\n \"Date range\": \"Date range\",\n \"Days are added after any access they already have.\":\n \"Days are added after any access they already have.\",\n \"Decline reasons\": \"Decline reasons\",\n Declined: \"Declined\",\n Declines: \"Declines\",\n \"Default price\": \"Default price\",\n \"Default rate\": \"Default rate\",\n \"Default · \": \"Default · \",\n \"Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API.\":\n \"Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API.\",\n \"Define usage streams and the default rates charged when usage is recorded. Applications report the events separately.\":\n \"Define usage streams and the default rates charged when usage is recorded. Applications report the events separately.\",\n \"Delete webhook\": \"Delete webhook\",\n Description: \"Description\",\n \"Description (optional)\": \"Description (optional)\",\n Dimension: \"Dimension\",\n Dimensions: \"Dimensions\",\n Directory: \"Directory\",\n Discord: \"Discord\",\n \"Dismiss answer\": \"Dismiss answer\",\n \"Display name\": \"Display name\",\n \"Displays the mobile sidebar.\": \"Displays the mobile sidebar.\",\n Divisor: \"Divisor\",\n Down: \"Down\",\n \"Download CSV\": \"Download CSV\",\n \"Draft: new price\": \"Draft: new price\",\n \"Draft: price change\": \"Draft: price change\",\n Due: \"Due\",\n \"Due now\": \"Due now\",\n \"Due: \": \"Due: \",\n Dunning: \"Dunning\",\n \"Dunning recovery by days since the first failure\":\n \"Dunning recovery by days since the first failure\",\n \"Dunning recovery by retry (share of failed cycles)\":\n \"Dunning recovery by retry (share of failed cycles)\",\n \"Dunning recovery rate\": \"Dunning recovery rate\",\n Edit: \"Edit\",\n \"Edit batch\": \"Edit batch\",\n \"Edit definition\": \"Edit definition\",\n \"Edit widget\": \"Edit widget\",\n Effective: \"Effective\",\n \"Effective date\": \"Effective date\",\n Email: \"Email\",\n \"Email delivery\": \"Email delivery\",\n Enabled: \"Enabled\",\n End: \"End\",\n \"Enter 0 to turn credit off.\": \"Enter 0 to turn credit off.\",\n Entitlements: \"Entitlements\",\n Environment: \"Environment\",\n Event: \"Event\",\n \"Event contract\": \"Event contract\",\n \"Event filters\": \"Event filters\",\n \"Event type\": \"Event type\",\n \"Executes the refund at the \": \"Executes the refund at the \",\n \"Existing subscribers keep the current price.\":\n \"Existing subscribers keep the current price.\",\n Expired: \"Expired\",\n Expires: \"Expires\",\n \"Expires (optional)\": \"Expires (optional)\",\n Failure: \"Failure\",\n Filter: \"Filter\",\n \"Filter meters on this page\": \"Filter meters on this page\",\n \"Filter this page…\": \"Filter this page…\",\n \"Find a customer by name or email, then pick a currency.\":\n \"Find a customer by name or email, then pick a currency.\",\n \"First outcome\": \"First outcome\",\n \"First page\": \"First page\",\n \"Fixed included units\": \"Fixed included units\",\n \"Flat amount\": \"Flat amount\",\n Format: \"Format\",\n \"Free units\": \"Free units\",\n \"From email\": \"From email\",\n \"Generic (your own receiver)\": \"Generic (your own receiver)\",\n \"Give this customer one of your products without a payment. They hold its keys while the grant lasts, including keys you add to the product later.\":\n \"Give this customer one of your products without a payment. They hold its keys while the grant lasts, including keys you add to the product later.\",\n Graduated: \"Graduated\",\n \"Grandfather.\": \"Grandfather.\",\n Grant: \"Grant\",\n \"Grant credit\": \"Grant credit\",\n \"Grant product access\": \"Grant product access\",\n \"Grants · \": \"Grants · \",\n Health: \"Health\",\n \"How long it lasts\": \"How long it lasts\",\n \"Human-readable quantity shown in billing.\":\n \"Human-readable quantity shown in billing.\",\n Ignore: \"Ignore\",\n Included: \"Included\",\n \"Included units\": \"Included units\",\n \"Included units per period\": \"Included units per period\",\n \"Included usage\": \"Included usage\",\n \"Invoice memo\": \"Invoice memo\",\n \"Invoice profile\": \"Invoice profile\",\n \"Invoice profile saved. Billed orders were not changed.\":\n \"Invoice profile saved. Billed orders were not changed.\",\n \"Keep it\": \"Keep it\",\n \"Keep its own range\": \"Keep its own range\",\n \"Kept with the scheduled change.\": \"Kept with the scheduled change.\",\n Key: \"Key\",\n Kind: \"Kind\",\n \"Kind / reason\": \"Kind / reason\",\n \"Last 3 months\": \"Last 3 months\",\n \"Last 30 days\": \"Last 30 days\",\n \"Last 6 months\": \"Last 6 months\",\n \"Last 7 days\": \"Last 7 days\",\n \"Last 90 days\": \"Last 90 days\",\n \"Last active\": \"Last active\",\n \"Last day (UTC)\": \"Last day (UTC)\",\n \"Last decline\": \"Last decline\",\n \"Last event\": \"Last event\",\n \"Last failure: \": \"Last failure: \",\n \"Last seen\": \"Last seen\",\n \"Last validated \": \"Last validated \",\n \"Last year\": \"Last year\",\n \"Leave blank to use the meter key.\": \"Leave blank to use the meter key.\",\n \"Leave the final limit blank for the unbounded tier.\":\n \"Leave the final limit blank for the unbounded tier.\",\n Lines: \"Lines\",\n \"Loading billing permissions…\": \"Loading billing permissions…\",\n \"Loading billing…\": \"Loading billing…\",\n \"Loading grants…\": \"Loading grants…\",\n \"Loading invoice profile…\": \"Loading invoice profile…\",\n \"Loading order…\": \"Loading order…\",\n \"Loading products…\": \"Loading products…\",\n \"Loading transactions…\": \"Loading transactions…\",\n \"Loading plans…\": \"Loading plans…\",\n \"Loading…\": \"Loading…\",\n \"Logo URL\": \"Logo URL\",\n \"Manual remittance\": \"Manual remittance\",\n \"Matrix cells\": \"Matrix cells\",\n Maximum: \"Maximum\",\n \"Memo: \": \"Memo: \",\n Merchant: \"Merchant\",\n \"Merchant profile\": \"Merchant profile\",\n Merchants: \"Merchants\",\n Meter: \"Meter\",\n \"Meter key\": \"Meter key\",\n Metering: \"Metering\",\n \"Metering access is restricted\": \"Metering access is restricted\",\n \"Metering could not be loaded\": \"Metering could not be loaded\",\n Method: \"Method\",\n \"Migrate.\": \"Migrate.\",\n \"Missed rebills\": \"Missed rebills\",\n Model: \"Model\",\n \"Money for this price would go to\": \"Money for this price would go to\",\n Month: \"Month\",\n \"Monthly renewals\": \"Monthly renewals\",\n More: \"More\",\n \"Move everyone to the new price at their first renewal on or after a date you choose.\":\n \"Move everyone to the new price at their first renewal on or after a date you choose.\",\n \"Must be at least \": \"Must be at least \",\n \"NMI history (before OpenRails recorded attempts)\":\n \"NMI history (before OpenRails recorded attempts)\",\n \"NMI's own transaction history, read daily and kept 25 months. It counts every sender, OpenRails too once it started. One-off sales mix initial sales, upgrades and retries of declined rebills: the history cannot tell them apart. Scheduled rebills are NMI's own charges, each the first try of its period. Rates count authorizations, not buyers.\":\n \"NMI's own transaction history, read daily and kept 25 months. It counts every sender, OpenRails too once it started. One-off sales mix initial sales, upgrades and retries of declined rebills: the history cannot tell them apart. Scheduled rebills are NMI's own charges, each the first try of its period. Rates count authorizations, not buyers.\",\n \"NMI-owned\": \"NMI-owned\",\n \"NMI-scheduled rebills\": \"NMI-scheduled rebills\",\n Name: \"Name\",\n \"Name, such as tax_id\": \"Name, such as tax_id\",\n Nearest: \"Nearest\",\n \"Needs attention\": \"Needs attention\",\n \"Needs card\": \"Needs card\",\n \"Net change\": \"Net change\",\n \"Never expires\": \"Never expires\",\n New: \"New\",\n \"New amount (major units)\": \"New amount (major units)\",\n \"New batch\": \"New batch\",\n \"New cards by AVS result\": \"New cards by AVS result\",\n \"New cards by CVV result\": \"New cards by CVV result\",\n \"New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one.\":\n \"New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one.\",\n \"New merchant\": \"New merchant\",\n \"New plan\": \"New plan\",\n \"New price\": \"New price\",\n \"New-card purchase failure rate\": \"New-card purchase failure rate\",\n \"New-card decline rate\": \"New-card decline rate\",\n \"New-card decline rate by week\": \"New-card decline rate by week\",\n Next: \"Next\",\n \"Next attempt: \": \"Next attempt: \",\n \"Next billing date\": \"Next billing date\",\n \"Next charge\": \"Next charge\",\n \"Next page\": \"Next page\",\n \"No NMI history yet: it is read daily.\":\n \"No NMI history yet: it is read daily.\",\n \"No PSPs configured.\": \"No PSPs configured.\",\n \"No actions are available for your permissions and this order's state.\":\n \"No actions are available for your permissions and this order's state.\",\n \"No active products are available.\": \"No active products are available.\",\n \"No active subscriptions.\": \"No active subscriptions.\",\n \"No allowance\": \"No allowance\",\n \"No billing activity yet.\": \"No billing activity yet.\",\n \"No credit grants in this currency.\": \"No credit grants in this currency.\",\n \"No declines in this range.\": \"No declines in this range.\",\n \"No default rate. Usage is recorded but is not billed by this meter.\":\n \"No default rate. Usage is recorded but is not billed by this meter.\",\n \"No eligible recurring plans share this tier group and currency.\":\n \"No eligible recurring plans share this tier group and currency.\",\n \"No entitlements.\": \"No entitlements.\",\n \"No history yet.\": \"No history yet.\",\n \"No lines.\": \"No lines.\",\n \"No maximum\": \"No maximum\",\n \"No meters on this page match “\": \"No meters on this page match “\",\n \"No missed rebills in this range.\": \"No missed rebills in this range.\",\n \"No payment methods on file.\": \"No payment methods on file.\",\n \"No payments recorded.\": \"No payments recorded.\",\n \"No payments.\": \"No payments.\",\n \"No prices yet.\": \"No prices yet.\",\n \"No product access.\": \"No product access.\",\n \"No products yet.\": \"No products yet.\",\n \"No provider can take this payment, so nobody can buy this price yet.\":\n \"No provider can take this payment, so nobody can buy this price yet.\",\n \"No provider-scheduled charges in this range.\":\n \"No provider-scheduled charges in this range.\",\n \"No recovered cycles.\": \"No recovered cycles.\",\n \"No refunds.\": \"No refunds.\",\n \"No refusals in NMI's history.\": \"No refusals in NMI's history.\",\n \"No saved payment methods. Add one on the customer page before retrying collection.\":\n \"No saved payment methods. Add one on the customer page before retrying collection.\",\n \"No subscriptions.\": \"No subscriptions.\",\n \"No transactions in this currency.\": \"No transactions in this currency.\",\n \"No currency yet\": \"No currency yet\",\n \"No usage meters yet\": \"No usage meters yet\",\n \"No webhooks configured.\": \"No webhooks configured.\",\n \"No widgets yet\": \"No widgets yet\",\n \"None required\": \"None required\",\n Note: \"Note\",\n \"Notes \": \"Notes \",\n \"Nothing here can be fixed automatically. You can only note why you are leaving it.\":\n \"Nothing here can be fixed automatically. You can only note why you are leaving it.\",\n \"Nothing in this range. Pick a wider range.\":\n \"Nothing in this range. Pick a wider range.\",\n \"Nothing needs attention right now.\": \"Nothing needs attention right now.\",\n \"Notice period\": \"Notice period\",\n \"Notice period (days)\": \"Notice period (days)\",\n Notifications: \"Notifications\",\n \"Once this succeeds, the new credential is used for the next charge and every one after it. Previous webhook signing secrets remain accepted while their required overlap is active.\":\n \"Once this succeeds, the new credential is used for the next charge and every one after it. Previous webhook signing secrets remain accepted while their required overlap is active.\",\n \"One-off sales\": \"One-off sales\",\n \"One-time payment.\": \"One-time payment.\",\n Open: \"Open\",\n \"Open issues\": \"Open issues\",\n \"Open matching list\": \"Open matching list\",\n OpenRails: \"OpenRails\",\n \"OpenRails starts\": \"OpenRails starts\",\n \"OpenRails-owned\": \"OpenRails-owned\",\n \"Operational notifications will stop delivering to this webhook. This cannot be undone.\":\n \"Operational notifications will stop delivering to this webhook. This cannot be undone.\",\n Ops: \"Ops\",\n \"Optional. Only events with one of the listed dimension values are rated.\":\n \"Optional. Only events with one of the listed dimension values are rated.\",\n Order: \"Order\",\n \"Order not found.\": \"Order not found.\",\n Orders: \"Orders\",\n Origin: \"Origin\",\n Original: \"Original\",\n Outcome: \"Outcome\",\n \"Overdue only: still owed past the due date\":\n \"Overdue only: still owed past the due date\",\n \"Overdue usage orders\": \"Overdue usage orders\",\n Overview: \"Overview\",\n \"Overwrite edits\": \"Overwrite edits\",\n Owner: \"Owner\",\n PSP: \"PSP\",\n \"PSP answer\": \"PSP answer\",\n PSPs: \"PSPs\",\n Package: \"Package\",\n \"Package price\": \"Package price\",\n Paid: \"Paid\",\n \"Paste a JSON or YAML catalog batch; products, prices and meters are maps keyed by their key. Each product, price and meter applies whole, unless a field it names was set differently by an edit: it is skipped and listed, and the rest applies. A batch that applied whole is remembered; retries preserve later catalog edits. Omitted records stay unchanged unless prune is true, which archives the omitted ones only batches set.\":\n \"Paste a JSON or YAML catalog batch; products, prices and meters are maps keyed by their key. Each product, price and meter applies whole, unless a field it names was set differently by an edit: it is skipped and listed, and the rest applies. A batch that applied whole is remembered; retries preserve later catalog edits. Omitted records stay unchanged unless prune is true, which archives the omitted ones only batches set.\",\n Paying: \"Paying\",\n \"Paying, no access\": \"Paying, no access\",\n Payment: \"Payment\",\n \"Payment attempts\": \"Payment attempts\",\n \"Payment health\": \"Payment health\",\n \"Payment history\": \"Payment history\",\n \"Payment method\": \"Payment method\",\n \"Payment methods\": \"Payment methods\",\n \"Payment not found.\": \"Payment not found.\",\n \"Payment rail\": \"Payment rail\",\n \"Payment reference\": \"Payment reference\",\n \"Payment terms (days)\": \"Payment terms (days)\",\n Payments: \"Payments\",\n Pending: \"Pending\",\n \"Per unit\": \"Per unit\",\n \"Period ends\": \"Period ends\",\n \"Period maximum\": \"Period maximum\",\n \"Period: \": \"Period: \",\n \"Pick a later date.\": \"Pick a later date.\",\n \"Pick a customer first\": \"Pick a customer first\",\n \"Pick a product\": \"Pick a product\",\n \"Pick a product…\": \"Pick a product…\",\n \"Pick a rail…\": \"Pick a rail…\",\n \"Pick an environment…\": \"Pick an environment…\",\n \"Live: real money\": \"Live: real money\",\n \"Select \": \"Select \",\n \"Select all \": \"Select all \",\n \"Sending request \": \"Sending request \",\n \"Sent in \": \"Sent in \",\n \"Set price\": \"Set price\",\n \"Settings › PSPs\": \"Settings › PSPs\",\n Show: \"Show\",\n \"Show released\": \"Show released\",\n \"Since a date\": \"Since a date\",\n \"Started \": \"Started \",\n Terms: \"Terms\",\n \"Test: the provider's own system, no money moves\":\n \"Test: the provider's own system, no money moves\",\n \"Sandbox: the provider's separate sandbox\":\n \"Sandbox: the provider's separate sandbox\",\n \"Mainnet: real money\": \"Mainnet: real money\",\n \"Devnet: Solana's development network\":\n \"Devnet: Solana's development network\",\n \"Testnet: Solana's test network\": \"Testnet: Solana's test network\",\n \"The customer holds this product already: cancel one at the provider.\":\n \"The customer holds this product already: cancel one at the provider.\",\n \"The provider listed far fewer live subscriptions than OpenRails holds, so nothing was proposed. Check the PSP's account and pull again.\":\n \"The provider listed far fewer live subscriptions than OpenRails holds, so nothing was proposed. Check the PSP's account and pull again.\",\n \"The provider refused this PSP's credentials. Correct them in \":\n \"The provider refused this PSP's credentials. Correct them in \",\n \", then pull again.\": \", then pull again.\",\n \"The provider retired it: it keeps billing its subscriptions and is never sold.\":\n \"The provider retired it: it keeps billing its subscriptions and is never sold.\",\n \"This PSP cannot be read: it is gone, or a credential the pull needs is not declared.\":\n \"This PSP cannot be read: it is gone, or a credential the pull needs is not declared.\",\n Treasury: \"Treasury\",\n \"Gateway ID\": \"Gateway ID\",\n \"Client account number\": \"Client account number\",\n \"Client subaccount\": \"Client subaccount\",\n \"Pick a stored payment method\": \"Pick a stored payment method\",\n \"Pinned to an archived (prior) version\":\n \"Pinned to an archived (prior) version\",\n \"Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.\":\n \"Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.\",\n Preview: \"Preview\",\n \"Previous page\": \"Previous page\",\n \"Previous period\": \"Previous period\",\n Price: \"Price\",\n \"Price each value of one registered dimension separately.\":\n \"Price each value of one registered dimension separately.\",\n \"Price history\": \"Price history\",\n \"Price per divisor\": \"Price per divisor\",\n Prices: \"Prices\",\n \"Pricing model\": \"Pricing model\",\n \"Pricing policies\": \"Pricing policies\",\n Product: \"Product\",\n \"Product access\": \"Product access\",\n \"Product and model\": \"Product and model\",\n Products: \"Products\",\n Provider: \"Provider\",\n \"Provider charges seen by webhook\": \"Provider charges seen by webhook\",\n \"Provider-owned\": \"Provider-owned\",\n Providers: \"Providers\",\n Pull: \"Pull\",\n \"Purchase order\": \"Purchase order\",\n \"Purchase order: \": \"Purchase order: \",\n Purchased: \"Purchased\",\n \"Purchases, subscription renewals and usage billed in arrears: what each owes and how it was paid.\":\n \"Purchases, subscription renewals and usage billed in arrears: what each owes and how it was paid.\",\n Quantity: \"Quantity\",\n Rail: \"Rail\",\n Range: \"Range\",\n Rate: \"Rate\",\n \"Rate preview\": \"Rate preview\",\n \"Read-only: this merchant's configuration comes from a file. Change it there.\":\n \"Read-only: this merchant's configuration comes from a file. Change it there.\",\n Reason: \"Reason\",\n \"Reason (optional)\": \"Reason (optional)\",\n \"Rebill collection rate\": \"Rebill collection rate\",\n \"Rebill first-attempt failure rate\": \"Rebill first-attempt failure rate\",\n \"Rebill first-attempt failure rate by week\":\n \"Rebill first-attempt failure rate by week\",\n \"Recent payments\": \"Recent payments\",\n \"Recently canceled\": \"Recently canceled\",\n Recommendation: \"Recommendation\",\n \"Recommended: \": \"Recommended: \",\n \"Recovered by\": \"Recovered by\",\n \"Recurring billing\": \"Recurring billing\",\n Reference: \"Reference\",\n Refresh: \"Refresh\",\n \"Refresh payment methods\": \"Refresh payment methods\",\n \"Refresh widget\": \"Refresh widget\",\n Refund: \"Refund\",\n \"Refund payment\": \"Refund payment\",\n Refunded: \"Refunded\",\n Refunds: \"Refunds\",\n \"Refusal rate by month\": \"Refusal rate by month\",\n Refused: \"Refused\",\n \"Register event properties used by filters or matrix rates.\":\n \"Register event properties used by filters or matrix rates.\",\n Remaining: \"Remaining\",\n Remove: \"Remove\",\n \"Remove the default rate?\": \"Remove the default rate?\",\n Renewal: \"Renewal\",\n \"Renewal not found.\": \"Renewal not found.\",\n \"Renewal payments, cancellations and churn each calendar month (UTC); churn is the month's cancellations over the subscriptions it began with.\":\n \"Renewal payments, cancellations and churn each calendar month (UTC); churn is the month's cancellations over the subscriptions it began with.\",\n Renewals: \"Renewals\",\n \"Renewing soon\": \"Renewing soon\",\n Renews: \"Renews\",\n \"Replace the default rate?\": \"Replace the default rate?\",\n Reports: \"Reports\",\n Reset: \"Reset\",\n Resolve: \"Resolve\",\n \"Resolve finding\": \"Resolve finding\",\n Result: \"Result\",\n Retry: \"Retry\",\n Reverses: \"Reverses\",\n Review: \"Review\",\n \"Review batch\": \"Review batch\",\n \"Review complete. Applying sends this exact document; this is not a database diff.\":\n \"Review complete. Applying sends this exact document; this is not a database diff.\",\n Revoke: \"Revoke\",\n \"Revoke product access\": \"Revoke product access\",\n \"Revoke remaining credit\": \"Revoke remaining credit\",\n \"Revoke the unspent remainder of\": \"Revoke the unspent remainder of\",\n Revoked: \"Revoked\",\n Rotate: \"Rotate\",\n \"Rotate \": \"Rotate \",\n Rounding: \"Rounding\",\n \"Rows per page\": \"Rows per page\",\n \"Save changes\": \"Save changes\",\n \"Saved payment method\": \"Saved payment method\",\n \"Search customer email, ref, or id…\": \"Search customer email, ref, or id…\",\n \"Search email, username, name or id…\": \"Search email, username, name or id…\",\n Seats: \"Seats\",\n \"Select a merchant to view its billing.\":\n \"Select a merchant to view its billing.\",\n \"Select dimension\": \"Select dimension\",\n \"Select product\": \"Select product\",\n \"Send alerts to Discord, Slack, or your own endpoint.\":\n \"Send alerts to Discord, Slack, or your own endpoint.\",\n \"Send email alerts to this address.\": \"Send email alerts to this address.\",\n \"Set how much notice customers receive before a price increase.\":\n \"Set how much notice customers receive before a price increase.\",\n \"Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units.\":\n \"Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units.\",\n Settings: \"Settings\",\n Severity: \"Severity\",\n Share: \"Share\",\n Sidebar: \"Sidebar\",\n Since: \"Since\",\n \"Skipped objects\": \"Skipped objects\",\n Slack: \"Slack\",\n Source: \"Source\",\n \"Source meter\": \"Source meter\",\n Spent: \"Spent\",\n \"Stable identifier. It cannot be renamed after creation.\":\n \"Stable identifier. It cannot be renamed after creation.\",\n Start: \"Start\",\n Started: \"Started\",\n State: \"State\",\n Status: \"Status\",\n \"Status: \": \"Status: \",\n \"Step \": \"Step \",\n \"Still matches\": \"Still matches\",\n Subject: \"Subject\",\n Subscription: \"Subscription\",\n \"Subscription not found.\": \"Subscription not found.\",\n \"Subscription:\": \"Subscription:\",\n Subscriptions: \"Subscriptions\",\n \"Subscriptions started and canceled each day (UTC), newest first.\":\n \"Subscriptions started and canceled each day (UTC), newest first.\",\n \"Sum a numeric field\": \"Sum a numeric field\",\n \"Subscribe URL\": \"Subscribe URL\",\n \"Support URL\": \"Support URL\",\n Synced: \"Synced\",\n \"Take the product back\": \"Take the product back\",\n \"Tax details\": \"Tax details\",\n \"Terminal cancellation at the payment rail. This is a last resort. Dunning parks subscriptions as past_due without losing entitlements.\":\n \"Terminal cancellation at the payment rail. This is a last resort. Dunning parks subscriptions as past_due without losing entitlements.\",\n \"Terms and billing facts for future usage orders. Billed orders keep their original snapshots. Tax details are recorded; no tax is calculated.\":\n \"Terms and billing facts for future usage orders. Billed orders keep their original snapshots. Tax details are recorded; no tax is calculated.\",\n \"The accounts this merchant takes payments through, one or more per rail.\":\n \"The accounts this merchant takes payments through, one or more per rail.\",\n \"The customer loses its entitlements now. The grant stays on record with your reason.\":\n \"The customer loses its entitlements now. The grant stays on record with your reason.\",\n \"The customer's default card\": \"The customer's default card\",\n \"The daily report covers at most \": \"The daily report covers at most \",\n \"The keys of the products this customer holds now.\":\n \"The keys of the products this customer holds now.\",\n \"The payment provider calculates the final prorated amount.\":\n \"The payment provider calculates the final prorated amount.\",\n \"The payment provider hasn't confirmed this order's payment yet. It settles once the provider shows the result, or when it is resolved with \":\n \"The payment provider hasn't confirmed this order's payment yet. It settles once the provider shows the result, or when it is resolved with \",\n \"Their reference\": \"Their reference\",\n \"There were no providers to consider.\":\n \"There were no providers to consider.\",\n \"These are the customer's invoice profile when the order was billed. Editing the profile affects later orders.\":\n \"These are the customer's invoice profile when the order was billed. Editing the profile affects later orders.\",\n \"These terms cannot be changed later. To charge a different amount, create another price and deactivate this one.\":\n \"These terms cannot be changed later. To charge a different amount, create another price and deactivate this one.\",\n \"This billing page does not exist.\": \"This billing page does not exist.\",\n \"This is a price\": \"This is a price\",\n \"This meter uses an aggregation that the billing engine cannot rate.\":\n \"This meter uses an aggregation that the billing engine cannot rate.\",\n Tier: \"Tier\",\n \"Tier group\": \"Tier group\",\n \"Tier mode\": \"Tier mode\",\n \"Tier rank\": \"Tier rank\",\n Tiered: \"Tiered\",\n Tiers: \"Tiers\",\n Title: \"Title\",\n \"Toggle Sidebar\": \"Toggle Sidebar\",\n \"Top refusal reasons\": \"Top refusal reasons\",\n Total: \"Total\",\n \"Transaction ledger · \": \"Transaction ledger · \",\n \"Trust level\": \"Trust level\",\n \"Try again\": \"Try again\",\n \"Try again. If the problem continues, check the OpenRails API logs.\":\n \"Try again. If the problem continues, check the OpenRails API logs.\",\n Type: \"Type\",\n \"Type \": \"Type \",\n USD: \"USD\",\n Unit: \"Unit\",\n \"Unit price\": \"Unit price\",\n \"Units per package\": \"Units per package\",\n Unlink: \"Unlink\",\n Unmapped: \"Unmapped\",\n Unpaid: \"Unpaid\",\n \"Until a date\": \"Until a date\",\n Unverified: \"Unverified\",\n Up: \"Up\",\n Updated: \"Updated\",\n Upload: \"Upload\",\n \"Upload mappings\": \"Upload mappings\",\n \"Upper limit\": \"Upper limit\",\n \"Usage billed\": \"Usage billed\",\n \"Use matrix rates\": \"Use matrix rates\",\n \"Used for every customer.\": \"Used for every customer.\",\n Username: \"Username\",\n Value: \"Value\",\n \"Value property\": \"Value property\",\n Values: \"Values\",\n View: \"View\",\n \"View all \": \"View all \",\n \"View billing details\": \"View billing details\",\n \"View customer usage orders\": \"View customer usage orders\",\n \"View user account\": \"View user account\",\n Volume: \"Volume\",\n Webhook: \"Webhook\",\n \"Webhook URL\": \"Webhook URL\",\n Webhooks: \"Webhooks\",\n \"What the customer asked for\": \"What the customer asked for\",\n \"Which provider would take the money if someone bought this right now, and why the others were passed over. This asks the same question a real purchase asks, without starting one.\":\n \"Which provider would take the money if someone bought this right now, and why the others were passed over. This asks the same question a real purchase asks, without starting one.\",\n Why: \"Why\",\n \"Why it was granted\": \"Why it was granted\",\n \"Widget menu\": \"Widget menu\",\n \"Widget title\": \"Widget title\",\n \"You're all caught up.\": \"You're all caught up.\",\n \"Your directory holds no contact for this customer.\":\n \"Your directory holds no contact for this customer.\",\n \"Your role does not have permission to read the merchant catalog.\":\n \"Your role does not have permission to read the merchant catalog.\",\n \"access revocations\": \"access revocations\",\n active: \"active\",\n \"active-seats\": \"active-seats\",\n \"alerts@example.com\": \"alerts@example.com\",\n \"api-tokens\": \"api-tokens\",\n archived: \"archived\",\n \"at the first renewal from \": \"at the first renewal from \",\n blocked: \"blocked\",\n breadcrumb: \"breadcrumb\",\n \"changed cards\": \"changed cards\",\n conflict: \"conflict\",\n customer: \"customer\",\n default: \"default\",\n deleted: \"deleted\",\n disabled: \"disabled\",\n \"drafted by copilot\": \"drafted by copilot\",\n \"draining (\": \"draining (\",\n \"e.g. #billing-alerts\": \"e.g. #billing-alerts\",\n \"ends access\": \"ends access\",\n \"eu, us\": \"eu, us\",\n finding: \"finding\",\n \"gpt-5\": \"gpt-5\",\n held: \"held\",\n \"held \": \"held \",\n \"https://example.com/account\": \"https://example.com/account\",\n \"https://example.com/logo.png\": \"https://example.com/logo.png\",\n \"https://example.com/subscribe\": \"https://example.com/subscribe\",\n \"https://example.com/support\": \"https://example.com/support\",\n imported: \"imported\",\n inactive: \"inactive\",\n \"its finding is ignored; subscriptions on it stay parked.\":\n \"its finding is ignored; subscriptions on it stay parked.\",\n \"key: \": \"key: \",\n linked: \"linked\",\n \"metadata.model\": \"metadata.model\",\n \"missed charges\": \"missed charges\",\n \"missed refunds\": \"missed refunds\",\n model: \"model\",\n moved: \"moved\",\n \"moves money\": \"moves money\",\n \"no data in range\": \"no data in range\",\n \"no entitlements\": \"no entitlements\",\n \"no measure\": \"no measure\",\n \"of \": \"of \",\n offered: \"offered\",\n \"openrails intents resolve\": \"openrails intents resolve\",\n \"premium, downloads\": \"premium, downloads\",\n \"premium-monthly\": \"premium-monthly\",\n \"price \": \"price \",\n \"prior version\": \"prior version\",\n \"provider schedules to cancel\": \"provider schedules to cancel\",\n \"provider write\": \"provider write\",\n \"read-only\": \"read-only\",\n \"refunds after a cancel\": \"refunds after a cancel\",\n \"refused: \": \"refused: \",\n \"renewals to adopt\": \"renewals to adopt\",\n retired: \"retired\",\n \"review only\": \"review only\",\n selected: \"selected\",\n skipped: \"skipped\",\n \"skipped renewals to collect\": \"skipped renewals to collect\",\n subscription: \"subscription\",\n \"subscription corrections\": \"subscription corrections\",\n \"subscriptions ended at the provider\": \"subscriptions ended at the provider\",\n \"subscriptions to create\": \"subscriptions to create\",\n \"that import\": \"that import\",\n \"token.used\": \"token.used\",\n tokens: \"tokens\",\n transaction: \"transaction\",\n unmatched: \"unmatched\",\n \"via \": \"via \",\n \"waiting for import\": \"waiting for import\",\n \"why is this being canceled?\": \"why is this being canceled?\",\n \"· owed \": \"· owed \",\n \"← Orders\": \"← Orders\",\n Succeeded: \"Succeeded\",\n Completed: \"Completed\",\n Complete: \"Complete\",\n Linked: \"Linked\",\n Approved: \"Approved\",\n Landed: \"Landed\",\n Current: \"Current\",\n Held: \"Held\",\n \"Past due\": \"Past due\",\n Grace: \"Grace\",\n Unknown: \"Unknown\",\n \"Requires review\": \"Requires review\",\n Delinquent: \"Delinquent\",\n Lost: \"Lost\",\n \"Partially refunded\": \"Partially refunded\",\n Dismissed: \"Dismissed\",\n Superseded: \"Superseded\",\n \"Already resolved\": \"Already resolved\",\n \"Awaiting method\": \"Awaiting method\",\n \"Cancel this membership?\": \"Cancel this membership?\",\n \"Renewal stops now and can't be restarted from here.\":\n \"Renewal stops now and can't be restarted from here.\",\n \"The customer\": \"The customer\",\n keeps: \"keeps\",\n loses: \"loses\",\n \"now. No refund is made.\": \"now. No refund is made.\",\n \"their access\": \"their access\",\n until: \"until\",\n \"until the current period ends.\": \"until the current period ends.\",\n \"Cancel membership\": \"Cancel membership\",\n \"End access now instead (no refund is made)\":\n \"End access now instead (no refund is made)\",\n \"By the customer\": \"By the customer\",\n \"By staff\": \"By staff\",\n \"Renewal payment failed\": \"Renewal payment failed\",\n \"After a chargeback\": \"After a chargeback\",\n \"Replaced by an upgrade\": \"Replaced by an upgrade\",\n \"This page couldn't be loaded\": \"This page couldn't be loaded\",\n \"It may have been removed, or the link may be wrong.\":\n \"It may have been removed, or the link may be wrong.\",\n \"Code:\": \"Code:\",\n \"Subscription not found\": \"Subscription not found\",\n \"Payment not found\": \"Payment not found\",\n \"Order not found\": \"Order not found\",\n \"Customer not found\": \"Customer not found\",\n \"Refunds, revokes and cancels are paused for you after several in a short time. Someone else can clear the hold on the Ops page.\":\n \"Refunds, revokes and cancels are paused for you after several in a short time. Someone else can clear the hold on the Ops page.\",\n \"Billing couldn't check your permissions just now. Try again in a moment.\":\n \"Billing couldn't check your permissions just now. Try again in a moment.\",\n \"Your role doesn't allow this.\": \"Your role doesn't allow this.\",\n \"Search customers\": \"Search customers\",\n \"Customer email, ref, or id\": \"Customer email, ref, or id\",\n \"Clear search\": \"Clear search\",\n \"Searching…\": \"Searching…\",\n Search: \"Search\",\n \"No customer matches\": \"No customer matches\",\n \"More customers match. Choose one, or search for more of the name or email.\":\n \"More customers match. Choose one, or search for more of the name or email.\",\n \"customers match. Choose one.\": \"customers match. Choose one.\",\n \"Holds on refunds and cancels\": \"Holds on refunds and cancels\",\n \"A staff member reached the limit of\": \"A staff member reached the limit of\",\n \"Staff reached the limit of\": \"Staff reached the limit of\",\n \"refunds, revokes or cancels in an hour. These are paused until someone clears the hold.\":\n \"refunds, revokes or cancels in an hour. These are paused until someone clears the hold.\",\n \"refunds, revokes or cancels in a day. These are paused until someone clears the hold.\":\n \"refunds, revokes or cancels in a day. These are paused until someone clears the hold.\",\n \"Held since\": \"Held since\",\n \"Clear hold\": \"Clear hold\",\n \"Clear this hold?\": \"Clear this hold?\",\n \"Refunds, revokes and cancels start working again for the people it held. Someone other than the person it stopped must clear it.\":\n \"Refunds, revokes and cancels start working again for the people it held. Someone other than the person it stopped must clear it.\",\n \"Reason (required)\": \"Reason (required)\",\n \"Hold cleared\": \"Hold cleared\",\n \"Clearing…\": \"Clearing…\",\n \"A different person must clear this hold.\":\n \"A different person must clear this hold.\",\n \"You don't have permission to clear holds.\":\n \"You don't have permission to clear holds.\",\n \"Billing couldn't check your permission to clear holds. Try again in a moment.\":\n \"Billing couldn't check your permission to clear holds. Try again in a moment.\",\n \"This hold was already cleared or no longer exists.\":\n \"This hold was already cleared or no longer exists.\",\n None: \"None\",\n \"Payment methods are up to date\": \"Payment methods are up to date\",\n \"Refreshing…\": \"Refreshing…\",\n \"Last updated\": \"Last updated\",\n \"Current, read from your directory\": \"Current, read from your directory\",\n \"Refunding…\": \"Refunding…\",\n \"The money goes back through \": \"The money goes back through \",\n \". Up to \": \". Up to \",\n \" can still be refunded.\": \" can still be refunded.\",\n Pulling: \"Pulling\",\n Released: \"Released\",\n Resolved: \"Resolved\",\n Processing: \"Processing\",\n \"Requires action\": \"Requires action\",\n Void: \"Void\",\n Uncollectible: \"Uncollectible\",\n Converged: \"Converged\",\n Gone: \"Gone\",\n Ignored: \"Ignored\",\n Imported: \"Imported\",\n} as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAMwD,KAA0D;CAC9D,YAAY;CACZ,YAAY;CACZ,MAAM;CACN,iBAAiB;CACjB,iBAAiB;CACjB,QAAQ;CACR,OAAO;CACP,SAAS;CACT,mBAAmB;CACnB,aAAa;CACb,MAAM;CACN,QAAQ;CACR,YAAY;AACd;AAEA,SAAgBC,EACd,GACA,IAA6B,QACF;CAC3B,IAAMC,IAAYC,GAAY;CAC9B,IAAI,CAACD,GAAW;CAChB,IAAME,IAAgC,CAAC;CACvC,KAAK,IAAM,CAACC,GAAKC,MAAU,OAAO,QAAQJ,CAAS,GACjD,AAAKI,MACL,EACEN,GAAgBK,EAA8B,CAAC,QAC7C,WACA,KAAKE,EAAU,EACjB,KACED;CAEN,OAAOF;AACT;;AC7DA,IAAMI,KAAS;CACb;EACE,MAAM;EACN,WAAWC,QACT,OAAO,+BAA4B,CAAC,MAAM,OAAO,EAC/C,SAASC,EAAE,aACb,EAAE,CACJ;CACF;CACA;EACE,MAAM;EACN,WAAWD,QACT,OAAO,+BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE,oBACb,EAAE,CACJ;CACF;CACA;EACE,MAAM;EACN,WAAWD,QACT,OAAO,6BAA0B,CAAC,MAAM,OAAO,EAC7C,SAASC,EAAE,kBACb,EAAE,CACJ;CACF;CACA;EACE,MAAM;EACN,WAAWD,QACT,OAAO,+BAA4B,CAAC,MAAM,OAAO,EAC/C,SAASC,EAAE,WACb,EAAE,CACJ;CACF;CACA;EACE,MAAM;EACN,WAAWD,QACT,OAAO,8BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,kBAAkB,EAAE,CAC1E;CACF;CACA;EACE,MAAM;EACN,WAAWD,QACT,OAAO,oCAAwB,CAAC,MAAM,OAAO,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rB,8BAA8B;CAC9B,gHACE;CACF,YAAY;CACZ,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,SAAS;CACT,kBAAkB;CAClB,0KACE;CACF,yBAAyB;CACzB,gBAAgB;CAChB,qBAAqB;CACrB,uBAAuB;CACvB,kFACE;CACF,SAAS;CACT,iBAAiB;CACjB,cAAc;CACd,0BAA0B;CAC1B,mBAAmB;CACnB,OAAO;CACP,aAAa;CACb,kBAAkB;CAClB,yBAAyB;CACzB,iBAAiB;CACjB,OAAO;CACP,MAAM;CACN,WAAW;CACX,qBAAqB;CACrB,eAAe;CACf,8HACE;CACF,gBAAgB;CAChB,SAAS;CACT,kCAAkC;CAClC,uCAAuC;CACvC,gBAAgB;CAChB,iDACE;CACF,UAAU;CACV,gFACE;CACF,sCAAsC;CACtC,SAAS;CACT,kGACE;CACF,aAAa;CACb,oBAAoB;CACpB,iBAAiB;CACjB,gBAAgB;CAChB,6BAA6B;CAC7B,SAAS;CACT,UAAU;CACV,uBAAuB;CACvB,kBAAkB;CAClB,gNACE;CACF,kBAAkB;CAClB,gBAAgB;CAChB,UAAU;CACV,eAAe;CACf,qBAAqB;CACrB,mBAAmB;CACnB,uBAAuB;CACvB,iEACE;CACF,WAAW;CACX,QAAQ;CACR,uBAAuB;CACvB,WAAW;CACX,MAAM;CACN,cAAc;CACd,sDACE;CACF,mBAAmB;CACnB,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,gBAAgB;CAChB,cAAc;CACd,+GACE;CACF,yHACE;CACF,kBAAkB;CAClB,aAAa;CACb,0BAA0B;CAC1B,WAAW;CACX,YAAY;CACZ,WAAW;CACX,SAAS;CACT,kBAAkB;CAClB,gBAAgB;CAChB,gCAAgC;CAChC,SAAS;CACT,MAAM;CACN,gBAAgB;CAChB,oBAAoB;CACpB,uBAAuB;CACvB,KAAK;CACL,WAAW;CACX,SAAS;CACT,SAAS;CACT,oDACE;CACF,sDACE;CACF,yBAAyB;CACzB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AAoB;CACpB,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,SAAS;CACT,8CACE;CACF,wBAAwB;CACxB,UAAU;CACV,mBAAmB;CACnB,OAAO;CACP,KAAK;CACL,cAAc;CACd,MAAM;CACN,SAAS;CACT,iBAAiB;CACjB,MAAM;CACN,4aACE;CACF,QAAQ;CACR,qBAAqB;CACrB,SAAS;CACT,oBAAoB;CACpB,kBAAkB;CAClB,mBAAmB;CACnB,kBAAkB;CAClB,mBAAmB;CACnB,sBAAsB;CACtB,gBAAgB;CAChB,qBAAqB;CACrB,wBAAwB;CACxB,UAAU;CACV,SAAS;CACT,YAAY;CACZ,eAAe;CACf,kBAAkB;CAClB,YAAY;CACZ,sBAAsB;CACtB,yBAAyB;CACzB,kBAAkB;CAClB,mBAAmB;CACnB,gBAAgB;CAChB,wBAAwB;CACxB,oBAAoB;CACpB,WAAW;CACX,eAAe;CACf,oBAAoB;CACpB,YAAY;CACZ,aAAa;CACb,mBAAmB;CACnB,MAAM;CACN,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,OAAO;CACP,mDACE;CACF,4CACE;CACF,uBAAuB;CACvB,wCACE;CACF,kCAAkC;CAClC,wEACE;CACF,2IACE;CACF,iEACE;CACF,sBAAsB;CACtB,kFACE;CACF,wFACE;CACF,UAAU;CACV,cAAc;CACd,yBAAyB;CACzB,qBAAqB;CACrB,gCAAgC;CAChC,yCACE;CACF,sJACE;CACF,SAAS;CACT,iBAAiB;CACjB,mBAAmB;CACnB,OAAO;CACP,4DACE;CACF,iBAAiB;CACjB,qBAAqB;CACrB,QAAQ;CACR,iBAAiB;CACjB,oBAAoB;CACpB,SAAS;CACT,kBAAkB;CAClB,qBAAqB;CACrB,UAAU;CACV,UAAU;CACV,oCAAoC;CACpC,kBAAkB;CAClB,WAAW;CACX,MAAM;CACN,kBAAkB;CAClB,oBAAoB;CACpB,WAAW;CACX,qGACE;CACF,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,gBAA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