@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
@@ -1,28 +1,28 @@
1
- import { E as e, O as t, f as n, l as r, p as i, w as a } from "./admin-utils-wuPUD0uh.js";
2
- import { t as o } from "./admin-button-DBzTD6By.js";
3
- import { t as s } from "./admin-input-JKrQIGfD.js";
4
- import { a as c, d as l, i as u, n as d, u as f } from "./admin-capabilities-CZdT1Pxe.js";
5
- import { h as p, n as m, o as h, r as g, s as _, t as v } from "./admin-format-BbiTCqUG.js";
6
- import { n as ee } from "./admin-confirm-katGq0Qo.js";
7
- import { t as y } from "./admin-badge-DR_8AhdC.js";
8
- import { t as b } from "./admin-form-field-errors-hbUMIriS.js";
9
- import { a as x, i as S, n as C, r as w, t as T } from "./admin-select-6Yuh5M1Q.js";
10
- import { a as E, n as D, o as O, r as k, s as A, t as j } from "./admin-table-D-GdGM1m.js";
11
- import { a as M, i as N, n as P, o as F, r as te, s as ne, t as re } from "./admin-dialog-Dn2FRJu4.js";
12
- import { t as I } from "./admin-label-CHWsVIZC.js";
13
- import { t as ie } from "./admin-switch-DpwQSzEm.js";
14
- import { r as L } from "./admin-dialog-width-CC7QHT1p.js";
15
- import { t as ae } from "./admin-typed-confirm-dialog-NiEDwX_0.js";
16
- import { a as oe, i as R, n as z, r as se, t as ce } from "./admin-tabs-B--1flzO.js";
17
- import * as B from "react";
18
- import { useMutation as V, useQuery as H, useQueryClient as U } from "@tanstack/react-query";
19
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
20
- import { HugeiconsIcon as q } from "@hugeicons/react";
21
- import { Add01Icon as le, Cancel01Icon as ue, Delete02Icon as de } from "@hugeicons/core-free-icons";
22
- import { useForm as J } from "@tanstack/react-form";
23
- //#region src/admin/pages/settings/configuration-edit.ts
24
- function Y(e) {
25
- let { toast: t, toastApiError: n, toastStaleEdit: r, adminMutations: o } = i(), [s, c] = B.useState(null), l = U(), u = V(o.updateMerchantConfiguration(l));
1
+ import { E as e, O as t, f as n, l as r, p as i, w as a } from "./admin-utils-CX097OR7.js";
2
+ import { t as o } from "./admin-badge-CAlUmS2s.js";
3
+ import { t as s } from "./admin-typed-confirm-dialog-B_00EHlT.js";
4
+ import { t as c } from "./admin-form-field-errors-Cuhy38F1.js";
5
+ import { n as l } from "./admin-confirm-DWq-edDC.js";
6
+ import { t as u } from "./admin-button-Bn4otsuw.js";
7
+ import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./admin-dialog-CgYGInHi.js";
8
+ import { t as v } from "./admin-input-B_EUzCAE.js";
9
+ import { t as y } from "./admin-label-DQsOkp1p.js";
10
+ import { a as b, i as x, n as S, r as C, t as w } from "./admin-select-DSGCZFiZ.js";
11
+ import { a as T, n as E, o as D, r as O, s as k, t as A } from "./admin-table-DIKl2rpV.js";
12
+ import { a as j, i as M, n as N, r as ee, t as te } from "./admin-tabs-DR74xX0-.js";
13
+ import { h as ne, n as P, o as re, r as ie, s as ae, t as oe } from "./admin-format-D9Ablh0P.js";
14
+ import { r as F } from "./admin-dialog-width-C_WFpow0.js";
15
+ import { a as se, d as I, i as ce, n as le, u as ue } from "./admin-capabilities-DS-X-__V.js";
16
+ import { t as de } from "./admin-switch-aOiQQzST.js";
17
+ import * as L from "react";
18
+ import { useMutation as R, useQuery as z, useQueryClient as B } from "@tanstack/react-query";
19
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
20
+ import { HugeiconsIcon as W } from "@hugeicons/react";
21
+ import { Add01Icon as fe, Cancel01Icon as pe, Delete02Icon as me } from "@hugeicons/core-free-icons";
22
+ import { useForm as G } from "@tanstack/react-form";
23
+ // src/admin/pages/settings/configuration-edit.ts
24
+ function K(e) {
25
+ let { toast: t, toastApiError: n, toastStaleEdit: r, adminMutations: o } = i(), [s, c] = L.useState(null), l = B(), u = R(o.updateMerchantConfiguration(l));
26
26
  return {
27
27
  editing: s !== null,
28
28
  open: () => {
@@ -45,81 +45,79 @@ function Y(e) {
45
45
  }
46
46
  };
47
47
  }
48
- //#endregion
49
- //#region src/admin/pages/settings/setting-fields.tsx
50
- function fe() {
51
- let { adminQueries: t } = i(), { data: n } = H(t.config());
52
- return !n || n.capabilities.features?.merchant_config_edits ? null : /* @__PURE__ */ G("p", {
48
+ // src/admin/pages/settings/setting-fields.tsx
49
+ function q() {
50
+ let { adminQueries: t } = i(), { data: n } = z(t.config());
51
+ return !n || n.capabilities.features?.merchant_config_edits ? null : /* @__PURE__ */ H("p", {
53
52
  className: "rounded-md border px-3 py-2 text-sm text-muted-foreground",
54
- children: /* @__PURE__ */ G(e, { id: "Read-only: this merchant's configuration comes from a file. Change it there." })
53
+ children: /* @__PURE__ */ H(e, { id: "Read-only: this merchant's configuration comes from a file. Change it there." })
55
54
  });
56
55
  }
57
- function pe({ edits: t, editing: n, form: r, saving: i, canSave: a = !0, onEdit: s, onCancel: c }) {
58
- return t ? n ? /* @__PURE__ */ K("div", {
56
+ function J({ edits: t, editing: n, form: r, saving: i, canSave: a = !0, onEdit: o, onCancel: s }) {
57
+ return t ? n ? /* @__PURE__ */ U("div", {
59
58
  className: "flex items-center gap-2",
60
- children: [/* @__PURE__ */ G(o, {
59
+ children: [/* @__PURE__ */ H(u, {
61
60
  type: "button",
62
61
  variant: "outline",
63
62
  size: "sm",
64
63
  disabled: i,
65
- onClick: c,
66
- children: /* @__PURE__ */ G(e, { id: "Cancel" })
67
- }), /* @__PURE__ */ G(o, {
64
+ onClick: s,
65
+ children: /* @__PURE__ */ H(e, { id: "Cancel" })
66
+ }), /* @__PURE__ */ H(u, {
68
67
  type: "submit",
69
68
  size: "sm",
70
69
  form: r,
71
70
  disabled: !a || i,
72
71
  children: i ? "Saving…" : "Save"
73
72
  })]
74
- }) : /* @__PURE__ */ G(o, {
73
+ }) : /* @__PURE__ */ H(u, {
75
74
  type: "button",
76
75
  variant: "outline",
77
76
  size: "sm",
78
- onClick: s,
79
- children: /* @__PURE__ */ G(e, { id: "Edit" })
77
+ onClick: o,
78
+ children: /* @__PURE__ */ H(e, { id: "Edit" })
80
79
  }) : null;
81
80
  }
82
- function X({ label: e, value: t }) {
83
- return /* @__PURE__ */ K("div", {
81
+ function Y({ label: e, value: t }) {
82
+ return /* @__PURE__ */ U("div", {
84
83
  className: "grid gap-1.5 md:grid-cols-[11rem_minmax(0,1fr)] md:gap-6",
85
- children: [/* @__PURE__ */ G("dt", {
84
+ children: [/* @__PURE__ */ H("dt", {
86
85
  className: "text-sm text-muted-foreground",
87
86
  children: e
88
- }), /* @__PURE__ */ G("dd", {
87
+ }), /* @__PURE__ */ H("dd", {
89
88
  className: t ? "min-w-0 text-sm break-words" : "text-sm text-muted-foreground",
90
89
  children: t || "Not set"
91
90
  })]
92
91
  });
93
92
  }
94
- function Z({ label: e, id: n, children: r }) {
93
+ function X({ label: e, id: n, children: r }) {
95
94
  let { id: i } = t();
96
- return /* @__PURE__ */ K("div", {
95
+ return /* @__PURE__ */ U("div", {
97
96
  className: "grid gap-2 md:grid-cols-[11rem_minmax(0,1fr)] md:items-center md:gap-6",
98
- children: [/* @__PURE__ */ G(I, {
97
+ children: [/* @__PURE__ */ H(y, {
99
98
  htmlFor: i(n),
100
99
  children: e
101
- }), /* @__PURE__ */ G("div", {
100
+ }), /* @__PURE__ */ H("div", {
102
101
  className: "min-w-0",
103
102
  children: r
104
103
  })]
105
104
  });
106
105
  }
107
- //#endregion
108
- //#region src/admin/pages/settings/notifications.tsx
109
- function me() {
110
- let { adminQueries: t } = i(), n = H(t.merchantConfiguration("Load settings")), r = H(t.webhooks()), a = l(), o = r.data?.data ?? [];
111
- return /* @__PURE__ */ K("div", {
106
+ // src/admin/pages/settings/notifications.tsx
107
+ function he() {
108
+ let { adminQueries: t } = i(), n = z(t.merchantConfiguration("Load settings")), r = z(t.webhooks()), a = I(), o = r.data?.data ?? [];
109
+ return /* @__PURE__ */ U("div", {
112
110
  className: "flex flex-col gap-10",
113
111
  children: [
114
- /* @__PURE__ */ G(fe, {}),
115
- n.data ? /* @__PURE__ */ G(he, {
112
+ /* @__PURE__ */ H(q, {}),
113
+ n.data ? /* @__PURE__ */ H(ge, {
116
114
  configuration: n.data,
117
115
  edits: a
118
- }) : /* @__PURE__ */ G("p", {
116
+ }) : /* @__PURE__ */ H("p", {
119
117
  className: "text-sm text-muted-foreground",
120
- children: /* @__PURE__ */ G(e, { id: "Loading…" })
118
+ children: /* @__PURE__ */ H(e, { id: "Loading…" })
121
119
  }),
122
- /* @__PURE__ */ G(_e, {
120
+ /* @__PURE__ */ H(ve, {
123
121
  webhooks: o,
124
122
  loading: r.isPending,
125
123
  edits: a
@@ -127,48 +125,48 @@ function me() {
127
125
  ]
128
126
  });
129
127
  }
130
- function he({ configuration: n, edits: r }) {
131
- let { id: i, text: a } = t(), o = n.alert_email ?? "", c = Y(n), l = J({
128
+ function ge({ configuration: n, edits: r }) {
129
+ let { id: i, text: a } = t(), o = n.alert_email ?? "", s = K(n), c = G({
132
130
  defaultValues: { email: o },
133
- onSubmit: ({ value: e }) => c.save({ alert_email: e.email.trim() }, e.email.trim() ? "Alert email saved" : "Alert email cleared", "Save alert email")
131
+ onSubmit: ({ value: e }) => s.save({ alert_email: e.email.trim() }, e.email.trim() ? "Alert email saved" : "Alert email cleared", "Save alert email")
134
132
  });
135
- return /* @__PURE__ */ K("section", {
133
+ return /* @__PURE__ */ U("section", {
136
134
  className: "grid gap-5",
137
- children: [/* @__PURE__ */ K("div", {
135
+ children: [/* @__PURE__ */ U("div", {
138
136
  className: "flex flex-wrap items-start justify-between gap-4",
139
- children: [/* @__PURE__ */ K("div", {
137
+ children: [/* @__PURE__ */ U("div", {
140
138
  className: "grid gap-1",
141
- children: [/* @__PURE__ */ G("h2", {
139
+ children: [/* @__PURE__ */ H("h2", {
142
140
  className: "text-base font-semibold",
143
- children: /* @__PURE__ */ G(e, { id: "Email delivery" })
144
- }), /* @__PURE__ */ G("p", {
141
+ children: /* @__PURE__ */ H(e, { id: "Email delivery" })
142
+ }), /* @__PURE__ */ H("p", {
145
143
  className: "text-sm text-muted-foreground",
146
- children: /* @__PURE__ */ G(e, { id: "Send email alerts to this address." })
144
+ children: /* @__PURE__ */ H(e, { id: "Send email alerts to this address." })
147
145
  })]
148
- }), /* @__PURE__ */ G(l.Subscribe, {
146
+ }), /* @__PURE__ */ H(c.Subscribe, {
149
147
  selector: (e) => e.isSubmitting,
150
- children: (e) => /* @__PURE__ */ G(pe, {
148
+ children: (e) => /* @__PURE__ */ H(J, {
151
149
  edits: r,
152
- editing: c.editing,
150
+ editing: s.editing,
153
151
  form: "alert-email-form",
154
152
  saving: e,
155
153
  onEdit: () => {
156
- l.reset({ email: o }), c.open();
154
+ c.reset({ email: o }), s.open();
157
155
  },
158
- onCancel: c.close
156
+ onCancel: s.close
159
157
  })
160
158
  })]
161
- }), c.editing ? /* @__PURE__ */ G("form", {
159
+ }), s.editing ? /* @__PURE__ */ H("form", {
162
160
  id: i("alert-email-form"),
163
161
  onSubmit: (e) => {
164
- e.preventDefault(), e.stopPropagation(), l.handleSubmit();
162
+ e.preventDefault(), e.stopPropagation(), c.handleSubmit();
165
163
  },
166
- children: /* @__PURE__ */ G(l.Field, {
164
+ children: /* @__PURE__ */ H(c.Field, {
167
165
  name: "email",
168
- children: (e) => /* @__PURE__ */ G(Z, {
166
+ children: (e) => /* @__PURE__ */ H(X, {
169
167
  label: a("Alert email"),
170
168
  id: "alert-email",
171
- children: /* @__PURE__ */ G(s, {
169
+ children: /* @__PURE__ */ H(v, {
172
170
  id: i("alert-email"),
173
171
  type: "email",
174
172
  placeholder: a("alerts@example.com"),
@@ -178,13 +176,13 @@ function he({ configuration: n, edits: r }) {
178
176
  })
179
177
  })
180
178
  })
181
- }) : /* @__PURE__ */ G("dl", { children: /* @__PURE__ */ G(X, {
179
+ }) : /* @__PURE__ */ H("dl", { children: /* @__PURE__ */ H(Y, {
182
180
  label: a("Alert email"),
183
181
  value: o
184
182
  }) })]
185
183
  });
186
184
  }
187
- var ge = [
185
+ var _e = [
188
186
  {
189
187
  value: "generic",
190
188
  label: "Generic (your own receiver)"
@@ -198,111 +196,111 @@ var ge = [
198
196
  label: "Slack"
199
197
  }
200
198
  ];
201
- function _e({ webhooks: t, loading: n, edits: r }) {
202
- return /* @__PURE__ */ K("section", {
199
+ function ve({ webhooks: t, loading: n, edits: r }) {
200
+ return /* @__PURE__ */ U("section", {
203
201
  className: "grid gap-5",
204
- children: [/* @__PURE__ */ K("div", {
202
+ children: [/* @__PURE__ */ U("div", {
205
203
  className: "flex flex-wrap items-start justify-between gap-4",
206
- children: [/* @__PURE__ */ K("div", {
204
+ children: [/* @__PURE__ */ U("div", {
207
205
  className: "grid max-w-2xl gap-1",
208
- children: [/* @__PURE__ */ G("h2", {
206
+ children: [/* @__PURE__ */ H("h2", {
209
207
  className: "text-base font-semibold",
210
- children: /* @__PURE__ */ G(e, { id: "Webhooks" })
211
- }), /* @__PURE__ */ G("p", {
208
+ children: /* @__PURE__ */ H(e, { id: "Webhooks" })
209
+ }), /* @__PURE__ */ H("p", {
212
210
  className: "text-sm text-pretty text-muted-foreground",
213
- children: /* @__PURE__ */ G(e, { id: "Send alerts to Discord, Slack, or your own endpoint." })
211
+ children: /* @__PURE__ */ H(e, { id: "Send alerts to Discord, Slack, or your own endpoint." })
214
212
  })]
215
- }), r && /* @__PURE__ */ G(ye, {})]
216
- }), n ? /* @__PURE__ */ G("p", {
213
+ }), r && /* @__PURE__ */ H(be, {})]
214
+ }), n ? /* @__PURE__ */ H("p", {
217
215
  className: "text-sm text-muted-foreground",
218
- children: /* @__PURE__ */ G(e, { id: "Loading…" })
219
- }) : t.length === 0 ? /* @__PURE__ */ G("p", {
216
+ children: /* @__PURE__ */ H(e, { id: "Loading…" })
217
+ }) : t.length === 0 ? /* @__PURE__ */ H("p", {
220
218
  className: "py-2 text-sm text-muted-foreground",
221
- children: /* @__PURE__ */ G(e, { id: "No webhooks configured." })
222
- }) : /* @__PURE__ */ K(j, {
219
+ children: /* @__PURE__ */ H(e, { id: "No webhooks configured." })
220
+ }) : /* @__PURE__ */ U(A, {
223
221
  className: "min-w-[36rem]",
224
- children: [/* @__PURE__ */ G(O, { children: /* @__PURE__ */ K(A, {
222
+ children: [/* @__PURE__ */ H(D, { children: /* @__PURE__ */ U(k, {
225
223
  className: "hover:bg-transparent",
226
224
  children: [
227
- /* @__PURE__ */ G(E, {
225
+ /* @__PURE__ */ H(T, {
228
226
  className: "text-muted-foreground",
229
- children: /* @__PURE__ */ G(e, { id: "Name" })
227
+ children: /* @__PURE__ */ H(e, { id: "Name" })
230
228
  }),
231
- /* @__PURE__ */ G(E, {
229
+ /* @__PURE__ */ H(T, {
232
230
  className: "text-muted-foreground",
233
- children: /* @__PURE__ */ G(e, { id: "Format" })
231
+ children: /* @__PURE__ */ H(e, { id: "Format" })
234
232
  }),
235
- /* @__PURE__ */ G(E, {
233
+ /* @__PURE__ */ H(T, {
236
234
  className: "text-muted-foreground",
237
235
  children: "URL"
238
236
  }),
239
- r && /* @__PURE__ */ G(E, {
237
+ r && /* @__PURE__ */ H(T, {
240
238
  className: "text-right text-muted-foreground",
241
- children: /* @__PURE__ */ G(e, { id: "Action" })
239
+ children: /* @__PURE__ */ H(e, { id: "Action" })
242
240
  })
243
241
  ]
244
- }) }), /* @__PURE__ */ G(D, { children: t.map((e) => /* @__PURE__ */ G(ve, {
242
+ }) }), /* @__PURE__ */ H(E, { children: t.map((e) => /* @__PURE__ */ H(ye, {
245
243
  webhook: e,
246
244
  edits: r
247
245
  }, e.id)) })]
248
246
  })]
249
247
  });
250
248
  }
251
- function ve({ webhook: n, edits: r }) {
252
- let { toast: a, toastApiError: s, adminMutations: c } = i(), { text: l } = t(), [u, d] = B.useState(!1), f = U(), p = V(c.deleteWebhook(f)), m = n.name ?? n.destination_host;
253
- return /* @__PURE__ */ K(A, {
249
+ function ye({ webhook: n, edits: r }) {
250
+ let { toast: a, toastApiError: c, adminMutations: l } = i(), { text: d } = t(), [f, p] = L.useState(!1), m = B(), h = R(l.deleteWebhook(m)), g = n.name ?? n.destination_host;
251
+ return /* @__PURE__ */ U(k, {
254
252
  className: n.enabled ? void 0 : "opacity-60",
255
253
  children: [
256
- /* @__PURE__ */ G(k, {
254
+ /* @__PURE__ */ H(O, {
257
255
  className: "py-3 font-medium",
258
- children: m
256
+ children: g
259
257
  }),
260
- /* @__PURE__ */ G(k, {
258
+ /* @__PURE__ */ H(O, {
261
259
  className: "py-3",
262
- children: /* @__PURE__ */ K("span", {
260
+ children: /* @__PURE__ */ U("span", {
263
261
  className: "flex flex-wrap gap-1",
264
- children: [/* @__PURE__ */ G(y, {
262
+ children: [/* @__PURE__ */ H(o, {
265
263
  variant: "secondary",
266
264
  children: n.format
267
- }), !n.enabled && /* @__PURE__ */ G(y, {
265
+ }), !n.enabled && /* @__PURE__ */ H(o, {
268
266
  variant: "outline",
269
- children: /* @__PURE__ */ G(e, { id: "disabled" })
267
+ children: /* @__PURE__ */ H(e, { id: "disabled" })
270
268
  })]
271
269
  })
272
270
  }),
273
- /* @__PURE__ */ G(k, {
271
+ /* @__PURE__ */ H(O, {
274
272
  className: "max-w-[22rem] truncate py-3 text-xs text-muted-foreground",
275
273
  title: n.destination_host,
276
274
  children: n.destination_host
277
275
  }),
278
- r && /* @__PURE__ */ G(k, {
276
+ r && /* @__PURE__ */ H(O, {
279
277
  className: "py-3 text-right",
280
- children: /* @__PURE__ */ K("div", {
278
+ children: /* @__PURE__ */ U("div", {
281
279
  className: "flex justify-end gap-1",
282
280
  children: [
283
- /* @__PURE__ */ G(ye, { webhook: n }),
284
- /* @__PURE__ */ G(o, {
281
+ /* @__PURE__ */ H(be, { webhook: n }),
282
+ /* @__PURE__ */ H(u, {
285
283
  variant: "ghost",
286
284
  size: "icon",
287
- "aria-label": l("Delete webhook"),
288
- onClick: () => d(!0),
289
- children: /* @__PURE__ */ G(q, {
290
- icon: de,
285
+ "aria-label": d("Delete webhook"),
286
+ onClick: () => p(!0),
287
+ children: /* @__PURE__ */ H(W, {
288
+ icon: me,
291
289
  className: "size-4 text-muted-foreground"
292
290
  })
293
291
  }),
294
- /* @__PURE__ */ G(ae, {
295
- open: u,
296
- onOpenChange: d,
297
- title: `Delete "${m}"?`,
298
- description: l("Operational notifications will stop delivering to this webhook. This cannot be undone."),
292
+ /* @__PURE__ */ H(s, {
293
+ open: f,
294
+ onOpenChange: p,
295
+ title: `Delete "${g}"?`,
296
+ description: d("Operational notifications will stop delivering to this webhook. This cannot be undone."),
299
297
  confirmationWord: "DELETE",
300
298
  actionLabel: "Delete webhook",
301
299
  onConfirm: async () => {
302
300
  try {
303
- await p.mutateAsync(n.id), a.success("Webhook deleted");
301
+ await h.mutateAsync(n.id), a.success("Webhook deleted");
304
302
  } catch (e) {
305
- s(e, "Delete webhook");
303
+ c(e, "Delete webhook");
306
304
  }
307
305
  }
308
306
  })
@@ -312,18 +310,18 @@ function ve({ webhook: n, edits: r }) {
312
310
  ]
313
311
  });
314
312
  }
315
- function ye({ webhook: n }) {
316
- let { toast: r, toastApiError: a, adminMutations: c } = i(), { id: l, text: u } = t(), [d, f] = B.useState(!1), p = U(), m = V(c.createWebhook(p)), h = V(c.updateWebhook(p)), g = () => ({
313
+ function be({ webhook: n }) {
314
+ let { toast: r, toastApiError: a, adminMutations: o } = i(), { id: s, text: l } = t(), [T, E] = L.useState(!1), D = B(), O = R(o.createWebhook(D)), k = R(o.updateWebhook(D)), A = () => ({
317
315
  name: n?.name ?? "",
318
316
  url: "",
319
317
  format: n?.format ?? "generic",
320
318
  enabled: n?.enabled ?? !0
321
- }), _ = J({
322
- defaultValues: g(),
319
+ }), j = G({
320
+ defaultValues: A(),
323
321
  onSubmit: async ({ value: e }) => {
324
322
  let t = e.url.trim();
325
323
  try {
326
- n ? await h.mutateAsync({
324
+ n ? await k.mutateAsync({
327
325
  id: n.id,
328
326
  webhook: {
329
327
  name: e.name.trim() || null,
@@ -331,86 +329,86 @@ function ye({ webhook: n }) {
331
329
  enabled: e.enabled,
332
330
  ...t ? { url: t } : {}
333
331
  }
334
- }) : await m.mutateAsync({
332
+ }) : await O.mutateAsync({
335
333
  name: e.name.trim(),
336
334
  url: t,
337
335
  format: e.format
338
- }), r.success(n ? "Webhook saved" : "Webhook added"), v(!1);
336
+ }), r.success(n ? "Webhook saved" : "Webhook added"), M(!1);
339
337
  } catch (e) {
340
338
  a(e, n ? "Save webhook" : "Add webhook");
341
339
  }
342
340
  }
343
- }), v = (e) => {
344
- e ? _.reset(g()) : _.reset(), f(e);
341
+ }), M = (e) => {
342
+ e ? j.reset(A()) : j.reset(), E(e);
345
343
  };
346
- return /* @__PURE__ */ K(re, {
347
- open: d,
348
- onOpenChange: v,
349
- children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ K(o, {
344
+ return /* @__PURE__ */ U(_, {
345
+ open: T,
346
+ onOpenChange: M,
347
+ children: [/* @__PURE__ */ H(g, { render: /* @__PURE__ */ U(u, {
350
348
  size: "sm",
351
349
  variant: "outline",
352
350
  children: [
353
- !n && /* @__PURE__ */ G(q, {
354
- icon: le,
351
+ !n && /* @__PURE__ */ H(W, {
352
+ icon: fe,
355
353
  className: "size-4"
356
354
  }),
357
355
  " ",
358
356
  n ? "Edit" : "Add webhook"
359
357
  ]
360
- }) }), /* @__PURE__ */ K(P, {
361
- className: L,
362
- children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ G(F, { children: n ? `Edit ${n.name ?? n.destination_host}` : "Add webhook" }), /* @__PURE__ */ G(te, { children: n ? "The current URL is never shown. Paste a new one to replace it, or leave it blank to keep it." : "Paste a webhook address from Discord, Slack, or your own alert receiver." })] }), /* @__PURE__ */ K("form", {
358
+ }) }), /* @__PURE__ */ U(p, {
359
+ className: F,
360
+ children: [/* @__PURE__ */ U(d, { children: [/* @__PURE__ */ H(m, { children: n ? `Edit ${n.name ?? n.destination_host}` : "Add webhook" }), /* @__PURE__ */ H(h, { children: n ? "The current URL is never shown. Paste a new one to replace it, or leave it blank to keep it." : "Paste a webhook address from Discord, Slack, or your own alert receiver." })] }), /* @__PURE__ */ U("form", {
363
361
  onSubmit: (e) => {
364
- e.preventDefault(), e.stopPropagation(), _.handleSubmit();
362
+ e.preventDefault(), e.stopPropagation(), j.handleSubmit();
365
363
  },
366
364
  className: "grid gap-4",
367
- children: [/* @__PURE__ */ K("div", {
365
+ children: [/* @__PURE__ */ U("div", {
368
366
  className: "grid gap-3",
369
367
  children: [
370
- /* @__PURE__ */ G(_.Field, {
368
+ /* @__PURE__ */ H(j.Field, {
371
369
  name: "name",
372
370
  validators: { onChange: ({ value: e }) => n || e.trim() ? void 0 : "Enter a webhook name" },
373
- children: (t) => /* @__PURE__ */ K("div", {
371
+ children: (t) => /* @__PURE__ */ U("div", {
374
372
  className: "grid gap-1.5",
375
373
  children: [
376
- /* @__PURE__ */ G(I, {
377
- htmlFor: l("wh-name"),
378
- children: /* @__PURE__ */ G(e, { id: "Name" })
374
+ /* @__PURE__ */ H(y, {
375
+ htmlFor: s("wh-name"),
376
+ children: /* @__PURE__ */ H(e, { id: "Name" })
379
377
  }),
380
- /* @__PURE__ */ G(s, {
381
- id: l("wh-name"),
382
- placeholder: u("e.g. #billing-alerts"),
378
+ /* @__PURE__ */ H(v, {
379
+ id: s("wh-name"),
380
+ placeholder: l("e.g. #billing-alerts"),
383
381
  value: t.state.value,
384
382
  onBlur: t.handleBlur,
385
383
  onChange: (e) => t.handleChange(e.target.value),
386
384
  "aria-invalid": t.state.meta.errors.length > 0
387
385
  }),
388
- /* @__PURE__ */ G(b, { errors: t.state.meta.errors })
386
+ /* @__PURE__ */ H(c, { errors: t.state.meta.errors })
389
387
  ]
390
388
  })
391
389
  }),
392
- /* @__PURE__ */ G(_.Field, {
390
+ /* @__PURE__ */ H(j.Field, {
393
391
  name: "format",
394
- children: (t) => /* @__PURE__ */ K("div", {
392
+ children: (t) => /* @__PURE__ */ U("div", {
395
393
  className: "grid gap-1.5",
396
- children: [/* @__PURE__ */ G(I, {
397
- htmlFor: l("wh-format"),
398
- children: /* @__PURE__ */ G(e, { id: "Format" })
399
- }), /* @__PURE__ */ K(T, {
394
+ children: [/* @__PURE__ */ H(y, {
395
+ htmlFor: s("wh-format"),
396
+ children: /* @__PURE__ */ H(e, { id: "Format" })
397
+ }), /* @__PURE__ */ U(w, {
400
398
  value: t.state.value,
401
399
  onValueChange: (e) => t.handleChange(e),
402
- children: [/* @__PURE__ */ G(S, {
403
- id: l("wh-format"),
400
+ children: [/* @__PURE__ */ H(x, {
401
+ id: s("wh-format"),
404
402
  className: "w-full",
405
- children: /* @__PURE__ */ G(x, {})
406
- }), /* @__PURE__ */ G(C, { children: ge.map((e) => /* @__PURE__ */ G(w, {
403
+ children: /* @__PURE__ */ H(b, {})
404
+ }), /* @__PURE__ */ H(S, { children: _e.map((e) => /* @__PURE__ */ H(C, {
407
405
  value: e.value,
408
406
  children: e.label
409
407
  }, e.value)) })]
410
408
  })]
411
409
  })
412
410
  }),
413
- /* @__PURE__ */ G(_.Field, {
411
+ /* @__PURE__ */ H(j.Field, {
414
412
  name: "url",
415
413
  validators: { onChange: ({ value: e }) => {
416
414
  if (!e.trim()) return n ? void 0 : "Enter a webhook URL";
@@ -421,15 +419,15 @@ function ye({ webhook: n }) {
421
419
  return "Enter a valid webhook URL";
422
420
  }
423
421
  } },
424
- children: (t) => /* @__PURE__ */ K("div", {
422
+ children: (t) => /* @__PURE__ */ U("div", {
425
423
  className: "grid gap-1.5",
426
424
  children: [
427
- /* @__PURE__ */ G(I, {
428
- htmlFor: l("wh-url"),
429
- children: /* @__PURE__ */ G(e, { id: "Webhook URL" })
425
+ /* @__PURE__ */ H(y, {
426
+ htmlFor: s("wh-url"),
427
+ children: /* @__PURE__ */ H(e, { id: "Webhook URL" })
430
428
  }),
431
- /* @__PURE__ */ G(s, {
432
- id: l("wh-url"),
429
+ /* @__PURE__ */ H(v, {
430
+ id: s("wh-url"),
433
431
  type: "url",
434
432
  autoComplete: "off",
435
433
  className: "text-xs",
@@ -439,26 +437,26 @@ function ye({ webhook: n }) {
439
437
  onChange: (e) => t.handleChange(e.target.value),
440
438
  "aria-invalid": t.state.meta.errors.length > 0
441
439
  }),
442
- /* @__PURE__ */ G(b, { errors: t.state.meta.errors })
440
+ /* @__PURE__ */ H(c, { errors: t.state.meta.errors })
443
441
  ]
444
442
  })
445
443
  }),
446
- n && /* @__PURE__ */ G(_.Field, {
444
+ n && /* @__PURE__ */ H(j.Field, {
447
445
  name: "enabled",
448
- children: (t) => /* @__PURE__ */ K("div", {
446
+ children: (t) => /* @__PURE__ */ U("div", {
449
447
  className: "flex items-center gap-2",
450
- children: [/* @__PURE__ */ G(ie, {
451
- id: l("wh-enabled"),
448
+ children: [/* @__PURE__ */ H(de, {
449
+ id: s("wh-enabled"),
452
450
  checked: t.state.value,
453
451
  onCheckedChange: t.handleChange
454
- }), /* @__PURE__ */ G(I, {
455
- htmlFor: l("wh-enabled"),
456
- children: /* @__PURE__ */ G(e, { id: "Enabled" })
452
+ }), /* @__PURE__ */ H(y, {
453
+ htmlFor: s("wh-enabled"),
454
+ children: /* @__PURE__ */ H(e, { id: "Enabled" })
457
455
  })]
458
456
  })
459
457
  })
460
458
  ]
461
- }), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(_.Subscribe, {
459
+ }), /* @__PURE__ */ H(f, { children: /* @__PURE__ */ H(j.Subscribe, {
462
460
  selector: (e) => [
463
461
  e.values.name,
464
462
  e.values.url,
@@ -466,7 +464,7 @@ function ye({ webhook: n }) {
466
464
  e.canSubmit,
467
465
  e.isSubmitting
468
466
  ],
469
- children: ([e, t, r, i, a]) => /* @__PURE__ */ G(o, {
467
+ children: ([e, t, r, i, a]) => /* @__PURE__ */ H(u, {
470
468
  type: "submit",
471
469
  disabled: (n ? !r : !e.trim() || !t.trim()) || !i || a,
472
470
  children: a ? "Saving…" : n ? "Save" : "Add webhook"
@@ -476,15 +474,14 @@ function ye({ webhook: n }) {
476
474
  })]
477
475
  });
478
476
  }
479
- //#endregion
480
- //#region src/admin/pages/settings/custody.tsx
481
- function be() {
482
- let e = i(), t = U(), n = l(), r = H(e.adminQueries.merchantConfiguration()), a = H(e.adminQueries.psps()), s = [...e.queryKeys.settings(), "custodians"], c = H({
483
- queryKey: s,
477
+ // src/admin/pages/settings/custody.tsx
478
+ function xe() {
479
+ let e = i(), t = B(), n = I(), r = z(e.adminQueries.merchantConfiguration()), a = z(e.adminQueries.psps()), o = [...e.queryKeys.settings(), "custodians"], s = z({
480
+ queryKey: o,
484
481
  queryFn: ({ signal: t }) => e.listCustodians(t)
485
- }), [u, d] = B.useState(null), [f] = B.useState(() => e.selectedMerchant()), p = () => t.invalidateQueries({ queryKey: e.queryKeys.settings() }), m = V({
482
+ }), [c, l] = L.useState(null), [d] = L.useState(() => e.selectedMerchant()), f = () => t.invalidateQueries({ queryKey: e.queryKeys.settings() }), p = R({
486
483
  mutationFn: async ({ psp: t, custody: n }) => {
487
- if (f !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
484
+ if (d !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
488
485
  let r = a.data?.data.find((e) => e.id === t);
489
486
  if (!r) throw Error("PSP is no longer available");
490
487
  return e.updatePSP(t, {
@@ -492,43 +489,43 @@ function be() {
492
489
  custodian: n
493
490
  });
494
491
  },
495
- onSuccess: p,
492
+ onSuccess: f,
496
493
  onError: (t) => e.toastApiError(t, "Change card custody")
497
- }), h = V({
494
+ }), m = R({
498
495
  mutationFn: async (t) => {
499
- if (!r.data || f !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
496
+ if (!r.data || d !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
500
497
  return e.updateMerchantConfiguration({
501
498
  expected_revision: r.data.revision,
502
499
  card_vault: String(t.get("card_vault") ?? ""),
503
500
  charge_psps: t.getAll("charge_psps").map(String)
504
501
  });
505
502
  },
506
- onSuccess: p,
503
+ onSuccess: f,
507
504
  onError: (t) => e.toastApiError(t, "Save card routing")
508
505
  });
509
- if (!r.data || !a.data || !c.data) return null;
510
- let g = a.data.data.filter((e) => !e.archived && (e.rail === "nmi" || e.rail === "stripe"));
511
- return /* @__PURE__ */ K("section", {
506
+ if (!r.data || !a.data || !s.data) return null;
507
+ let h = a.data.data.filter((e) => !e.archived && (e.rail === "nmi" || e.rail === "stripe"));
508
+ return /* @__PURE__ */ U("section", {
512
509
  className: "grid gap-5",
513
510
  "aria-label": "Card vaults",
514
511
  children: [
515
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h2", {
512
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h2", {
516
513
  className: "text-base font-semibold",
517
514
  children: "Card vaults"
518
- }), /* @__PURE__ */ G("p", {
515
+ }), /* @__PURE__ */ H("p", {
519
516
  className: "text-sm text-muted-foreground",
520
517
  children: "Choose where new cards are stored and which accounts charge them. Existing cards and subscriptions keep their accepted custody."
521
518
  })] }),
522
- /* @__PURE__ */ G("ul", {
519
+ /* @__PURE__ */ H("ul", {
523
520
  className: "grid gap-2",
524
- children: c.data.data.map((e) => /* @__PURE__ */ K("li", {
521
+ children: s.data.data.map((e) => /* @__PURE__ */ U("li", {
525
522
  className: "flex flex-wrap items-center justify-between gap-3 rounded border p-3",
526
- children: [/* @__PURE__ */ K("div", { children: [
527
- /* @__PURE__ */ G("strong", { children: e.key }),
523
+ children: [/* @__PURE__ */ U("div", { children: [
524
+ /* @__PURE__ */ H("strong", { children: e.key }),
528
525
  " · Basis Theory · ",
529
526
  e.environment,
530
- /* @__PURE__ */ G("br", {}),
531
- /* @__PURE__ */ K("span", {
527
+ /* @__PURE__ */ H("br", {}),
528
+ /* @__PURE__ */ U("span", {
532
529
  className: "text-sm text-muted-foreground",
533
530
  children: [
534
531
  e.account_id,
@@ -537,72 +534,72 @@ function be() {
537
534
  e.credentials?.api_key?.configured ? "Credential configured" : "Credential missing"
538
535
  ]
539
536
  })
540
- ] }), n && !e.archived && /* @__PURE__ */ G(o, {
537
+ ] }), n && !e.archived && /* @__PURE__ */ H(u, {
541
538
  size: "sm",
542
539
  variant: "outline",
543
- onClick: () => d(e),
540
+ onClick: () => l(e),
544
541
  children: "Edit vault"
545
542
  })]
546
543
  }, e.key))
547
544
  }),
548
- n && /* @__PURE__ */ G(o, {
545
+ n && /* @__PURE__ */ H(u, {
549
546
  className: "justify-self-start",
550
547
  variant: "outline",
551
- onClick: () => d("new"),
548
+ onClick: () => l("new"),
552
549
  children: "Add Basis Theory vault"
553
550
  }),
554
- u && /* @__PURE__ */ G(xe, {
555
- current: u === "new" ? void 0 : u,
556
- close: () => d(null),
557
- saved: p
558
- }, u === "new" ? "new" : `${u.key}:${u.revision}`),
559
- g.filter((e) => e.rail === "nmi").map((e) => /* @__PURE__ */ K(I, {
551
+ c && /* @__PURE__ */ H(Se, {
552
+ current: c === "new" ? void 0 : c,
553
+ close: () => l(null),
554
+ saved: f
555
+ }, c === "new" ? "new" : `${c.key}:${c.revision}`),
556
+ h.filter((e) => e.rail === "nmi").map((e) => /* @__PURE__ */ U(y, {
560
557
  className: "grid gap-2",
561
558
  children: [
562
559
  e.key,
563
560
  ": card storage",
564
- /* @__PURE__ */ K("select", {
561
+ /* @__PURE__ */ U("select", {
565
562
  className: "rounded border bg-background p-2",
566
563
  "aria-label": `${e.key} card storage`,
567
- disabled: !n || m.isPending,
564
+ disabled: !n || p.isPending,
568
565
  value: e.custodian ?? "",
569
- onChange: (t) => m.mutate({
566
+ onChange: (t) => p.mutate({
570
567
  psp: e.id,
571
568
  custody: t.target.value
572
569
  }),
573
- children: [/* @__PURE__ */ G("option", {
570
+ children: [/* @__PURE__ */ H("option", {
574
571
  value: "",
575
572
  children: "NMI customer vault"
576
- }), c.data.data.filter((t) => !t.archived && t.environment === e.environment).map((e) => /* @__PURE__ */ K("option", {
573
+ }), s.data.data.filter((t) => !t.archived && t.environment === e.environment).map((e) => /* @__PURE__ */ U("option", {
577
574
  value: e.key,
578
575
  children: [e.key, " · Basis Theory"]
579
576
  }, e.key))]
580
577
  })
581
578
  ]
582
579
  }, e.id)),
583
- /* @__PURE__ */ K("form", {
580
+ /* @__PURE__ */ U("form", {
584
581
  className: "grid gap-3",
585
582
  onSubmit: (e) => {
586
- e.preventDefault(), h.mutate(new FormData(e.currentTarget));
583
+ e.preventDefault(), m.mutate(new FormData(e.currentTarget));
587
584
  },
588
585
  children: [
589
- /* @__PURE__ */ K(I, {
586
+ /* @__PURE__ */ U(y, {
590
587
  className: "grid gap-2",
591
- children: ["Vault for new cards", /* @__PURE__ */ K("select", {
588
+ children: ["Vault for new cards", /* @__PURE__ */ U("select", {
592
589
  name: "card_vault",
593
590
  className: "rounded border bg-background p-2",
594
591
  defaultValue: r.data.card_vault ?? "",
595
592
  disabled: !n,
596
593
  children: [
597
- /* @__PURE__ */ G("option", {
594
+ /* @__PURE__ */ H("option", {
598
595
  value: "",
599
596
  children: "No card vault selected"
600
597
  }),
601
- r.data.platform_vault.available && /* @__PURE__ */ G("option", {
598
+ r.data.platform_vault.available && /* @__PURE__ */ H("option", {
602
599
  value: "platform",
603
600
  children: "Hosted vault · isolated to this merchant"
604
601
  }),
605
- g.map((e) => /* @__PURE__ */ K("option", {
602
+ h.map((e) => /* @__PURE__ */ U("option", {
606
603
  value: e.key,
607
604
  children: [
608
605
  e.key,
@@ -614,21 +611,21 @@ function be() {
614
611
  ]
615
612
  })]
616
613
  }),
617
- /* @__PURE__ */ K("fieldset", {
614
+ /* @__PURE__ */ U("fieldset", {
618
615
  className: "grid gap-2",
619
616
  disabled: !n,
620
617
  children: [
621
- /* @__PURE__ */ G("legend", {
618
+ /* @__PURE__ */ H("legend", {
622
619
  className: "mb-2 font-medium",
623
620
  children: "Charge PSPs"
624
621
  }),
625
- /* @__PURE__ */ G("p", {
622
+ /* @__PURE__ */ H("p", {
626
623
  className: "text-sm text-muted-foreground",
627
624
  children: "Select the accounts allowed for new charges. With none selected, routing considers all eligible accounts."
628
625
  }),
629
- g.map((e) => /* @__PURE__ */ K(I, {
626
+ h.map((e) => /* @__PURE__ */ U(y, {
630
627
  className: "flex gap-2",
631
- children: [/* @__PURE__ */ G("input", {
628
+ children: [/* @__PURE__ */ H("input", {
632
629
  type: "checkbox",
633
630
  name: "charge_psps",
634
631
  value: e.key,
@@ -637,9 +634,9 @@ function be() {
637
634
  }, e.id))
638
635
  ]
639
636
  }),
640
- n && /* @__PURE__ */ G(o, {
637
+ n && /* @__PURE__ */ H(u, {
641
638
  className: "justify-self-start",
642
- disabled: h.isPending,
639
+ disabled: m.isPending,
643
640
  type: "submit",
644
641
  children: "Save card routing"
645
642
  })
@@ -648,8 +645,8 @@ function be() {
648
645
  ]
649
646
  });
650
647
  }
651
- function xe({ current: e, close: t, saved: n }) {
652
- let r = i(), [a] = B.useState(() => r.selectedMerchant()), c = V({
648
+ function Se({ current: e, close: t, saved: n }) {
649
+ let r = i(), [a] = L.useState(() => r.selectedMerchant()), o = R({
653
650
  mutationFn: async (t) => {
654
651
  if (a !== r.selectedMerchant()) throw Error("Merchant changed; reopen this form");
655
652
  let n = String(t.get("private_key") ?? "").trim();
@@ -670,75 +667,75 @@ function xe({ current: e, close: t, saved: n }) {
670
667
  },
671
668
  onError: (e) => r.toastApiError(e, "Configure vault")
672
669
  });
673
- return /* @__PURE__ */ K("form", {
670
+ return /* @__PURE__ */ U("form", {
674
671
  className: "grid gap-3 rounded border p-4",
675
672
  onSubmit: (e) => {
676
- e.preventDefault(), c.mutate(new FormData(e.currentTarget));
673
+ e.preventDefault(), o.mutate(new FormData(e.currentTarget));
677
674
  },
678
675
  children: [
679
- /* @__PURE__ */ G("h3", {
676
+ /* @__PURE__ */ H("h3", {
680
677
  className: "font-medium",
681
678
  children: e ? `Edit ${e.key}` : "Add Basis Theory vault"
682
679
  }),
683
- !e && /* @__PURE__ */ K(W, { children: [
684
- /* @__PURE__ */ K(I, {
680
+ !e && /* @__PURE__ */ U(V, { children: [
681
+ /* @__PURE__ */ U(y, {
685
682
  className: "grid gap-1",
686
- children: ["Vault key", /* @__PURE__ */ G(s, {
683
+ children: ["Vault key", /* @__PURE__ */ H(v, {
687
684
  name: "key",
688
685
  required: !0,
689
686
  pattern: "[a-z0-9_-]{1,63}"
690
687
  })]
691
688
  }),
692
- /* @__PURE__ */ K(I, {
689
+ /* @__PURE__ */ U(y, {
693
690
  className: "grid gap-1",
694
- children: ["Environment", /* @__PURE__ */ K("select", {
691
+ children: ["Environment", /* @__PURE__ */ U("select", {
695
692
  name: "environment",
696
693
  className: "rounded border bg-background p-2",
697
- children: [/* @__PURE__ */ G("option", {
694
+ children: [/* @__PURE__ */ H("option", {
698
695
  value: "test",
699
696
  children: "Test"
700
- }), /* @__PURE__ */ G("option", {
697
+ }), /* @__PURE__ */ H("option", {
701
698
  value: "live",
702
699
  children: "Live"
703
700
  })]
704
701
  })]
705
702
  }),
706
- /* @__PURE__ */ K(I, {
703
+ /* @__PURE__ */ U(y, {
707
704
  className: "grid gap-1",
708
- children: ["Basis Theory tenant ID", /* @__PURE__ */ G(s, {
705
+ children: ["Basis Theory tenant ID", /* @__PURE__ */ H(v, {
709
706
  name: "account_id",
710
707
  required: !0
711
708
  })]
712
709
  })
713
710
  ] }),
714
- /* @__PURE__ */ K(I, {
711
+ /* @__PURE__ */ U(y, {
715
712
  className: "grid gap-1",
716
- children: ["Public collection key", /* @__PURE__ */ G(s, {
713
+ children: ["Public collection key", /* @__PURE__ */ H(v, {
717
714
  name: "public_key",
718
715
  required: !0,
719
716
  defaultValue: String(e?.settings?.public_api_key ?? "")
720
717
  })]
721
718
  }),
722
- /* @__PURE__ */ K(I, {
719
+ /* @__PURE__ */ U(y, {
723
720
  className: "grid gap-1",
724
- children: ["Private API key", /* @__PURE__ */ G(s, {
721
+ children: ["Private API key", /* @__PURE__ */ H(v, {
725
722
  type: "password",
726
723
  name: "private_key",
727
724
  autoComplete: "new-password",
728
725
  required: !e
729
726
  })]
730
727
  }),
731
- /* @__PURE__ */ G("p", {
728
+ /* @__PURE__ */ H("p", {
732
729
  className: "text-sm text-muted-foreground",
733
730
  children: "Use a key that can read its application, manage the merchant’s card tokens and invoke the proxy. Existing credentials stay unchanged when left blank."
734
731
  }),
735
- /* @__PURE__ */ K("div", {
732
+ /* @__PURE__ */ U("div", {
736
733
  className: "flex gap-2",
737
- children: [/* @__PURE__ */ G(o, {
734
+ children: [/* @__PURE__ */ H(u, {
738
735
  type: "submit",
739
- disabled: c.isPending,
736
+ disabled: o.isPending,
740
737
  children: "Validate and save vault"
741
- }), /* @__PURE__ */ G(o, {
738
+ }), /* @__PURE__ */ H(u, {
742
739
  type: "button",
743
740
  variant: "outline",
744
741
  onClick: t,
@@ -748,106 +745,105 @@ function xe({ current: e, close: t, saved: n }) {
748
745
  ]
749
746
  });
750
747
  }
751
- //#endregion
752
- //#region src/admin/pages/settings/index.tsx
753
- var Q = "h-8 flex-none px-0 after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary pointer-coarse:h-10";
754
- function Se() {
755
- let [t, i] = r(), a = f(), o = u(), s = n().props.settingsTabs ?? [], c = s.map((e) => e.value), l = d(null, a, o, c), p = d(t.get("tab"), a, o, c);
756
- return /* @__PURE__ */ K(ce, {
757
- value: p,
748
+ // src/admin/pages/settings/index.tsx
749
+ var Z = "h-8 flex-none px-0 after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary pointer-coarse:h-10";
750
+ function Ce() {
751
+ let [t, i] = r(), a = ue(), o = ce(), s = n().props.settingsTabs ?? [], c = s.map((e) => e.value), l = le(null, a, o, c), u = le(t.get("tab"), a, o, c);
752
+ return /* @__PURE__ */ U(te, {
753
+ value: u,
758
754
  onValueChange: (e) => {
759
755
  let n = new URLSearchParams(t);
760
756
  !e || e === l ? n.delete("tab") : n.set("tab", e), i(n);
761
757
  },
762
758
  className: "flex flex-col gap-4",
763
759
  children: [
764
- /* @__PURE__ */ G("div", {
760
+ /* @__PURE__ */ H("div", {
765
761
  className: "overflow-x-auto",
766
- children: /* @__PURE__ */ K(se, {
762
+ children: /* @__PURE__ */ U(ee, {
767
763
  variant: "line",
768
764
  className: "w-max min-w-full justify-start gap-6 rounded-none p-0",
769
765
  children: [
770
- a && /* @__PURE__ */ G(R, {
766
+ a && /* @__PURE__ */ H(M, {
771
767
  value: "merchant",
772
- className: Q,
773
- children: /* @__PURE__ */ G(e, { id: "Merchant" })
768
+ className: Z,
769
+ children: /* @__PURE__ */ H(e, { id: "Merchant" })
774
770
  }),
775
- a && /* @__PURE__ */ G(R, {
771
+ a && /* @__PURE__ */ H(M, {
776
772
  value: "notifications",
777
- className: Q,
778
- children: /* @__PURE__ */ G(e, { id: "Notifications" })
773
+ className: Z,
774
+ children: /* @__PURE__ */ H(e, { id: "Notifications" })
779
775
  }),
780
- a && /* @__PURE__ */ G(R, {
776
+ a && /* @__PURE__ */ H(M, {
781
777
  value: "psps",
782
- className: Q,
783
- children: /* @__PURE__ */ G(e, { id: "PSPs" })
778
+ className: Z,
779
+ children: /* @__PURE__ */ H(e, { id: "PSPs" })
784
780
  }),
785
- o && /* @__PURE__ */ G(R, {
781
+ o && /* @__PURE__ */ H(M, {
786
782
  value: "customer-controls",
787
- className: Q,
788
- children: /* @__PURE__ */ G(e, { id: "Customer controls" })
783
+ className: Z,
784
+ children: /* @__PURE__ */ H(e, { id: "Customer controls" })
789
785
  }),
790
- s.map((e) => /* @__PURE__ */ G(R, {
786
+ s.map((e) => /* @__PURE__ */ H(M, {
791
787
  value: e.value,
792
- className: Q,
788
+ className: Z,
793
789
  children: e.title
794
790
  }, e.value))
795
791
  ]
796
792
  })
797
793
  }),
798
- a && /* @__PURE__ */ G(z, {
794
+ a && /* @__PURE__ */ H(N, {
799
795
  value: "merchant",
800
- children: /* @__PURE__ */ G(Ce, {})
796
+ children: /* @__PURE__ */ H(we, {})
801
797
  }),
802
- a && /* @__PURE__ */ G(z, {
798
+ a && /* @__PURE__ */ H(N, {
803
799
  value: "notifications",
804
- children: /* @__PURE__ */ G(me, {})
800
+ children: /* @__PURE__ */ H(he, {})
805
801
  }),
806
- a && /* @__PURE__ */ G(z, {
802
+ a && /* @__PURE__ */ H(N, {
807
803
  value: "psps",
808
- children: /* @__PURE__ */ G(Ee, {})
804
+ children: /* @__PURE__ */ H(De, {})
809
805
  }),
810
- o && /* @__PURE__ */ G(z, {
806
+ o && /* @__PURE__ */ H(N, {
811
807
  value: "customer-controls",
812
- children: /* @__PURE__ */ G(Re, {})
808
+ children: /* @__PURE__ */ H(Re, {})
813
809
  }),
814
- s.map((e) => /* @__PURE__ */ G(z, {
810
+ s.map((e) => /* @__PURE__ */ H(N, {
815
811
  value: e.value,
816
812
  children: e.element
817
813
  }, e.value))
818
814
  ]
819
815
  });
820
816
  }
821
- function Ce() {
822
- let { adminQueries: t } = i(), { data: n } = H(t.merchantConfiguration("Load settings")), r = l();
823
- return n ? /* @__PURE__ */ K("div", {
817
+ function we() {
818
+ let { adminQueries: t } = i(), { data: n } = z(t.merchantConfiguration("Load settings")), r = I();
819
+ return n ? /* @__PURE__ */ U("div", {
824
820
  className: "grid gap-10",
825
821
  children: [
826
- /* @__PURE__ */ G(fe, {}),
827
- /* @__PURE__ */ G(we, {
822
+ /* @__PURE__ */ H(q, {}),
823
+ /* @__PURE__ */ H(Te, {
828
824
  configuration: n,
829
825
  edits: r
830
826
  }),
831
- /* @__PURE__ */ G(Te, {
827
+ /* @__PURE__ */ H(Ee, {
832
828
  configuration: n,
833
829
  edits: r
834
830
  })
835
831
  ]
836
- }) : /* @__PURE__ */ G("p", {
832
+ }) : /* @__PURE__ */ H("p", {
837
833
  className: "text-sm text-muted-foreground",
838
- children: /* @__PURE__ */ G(e, { id: "Loading…" })
834
+ children: /* @__PURE__ */ H(e, { id: "Loading…" })
839
835
  });
840
836
  }
841
- function we({ configuration: n, edits: r }) {
842
- let { id: i, text: a } = t(), o = n.profile, c = () => ({
837
+ function Te({ configuration: n, edits: r }) {
838
+ let { id: i, text: a } = t(), o = n.profile, s = () => ({
843
839
  displayName: n.display_name,
844
840
  fromEmail: o?.from_email ?? "",
845
841
  supportURL: o?.support_url ?? "",
846
842
  subscribeURL: o?.subscribe_url ?? "",
847
843
  billingURL: o?.billing_url ?? "",
848
844
  logoURL: o?.logo_url ?? ""
849
- }), l = Y(n), u = J({
850
- defaultValues: c(),
845
+ }), l = K(n), u = G({
846
+ defaultValues: s(),
851
847
  onSubmit: ({ value: e }) => l.save({
852
848
  display_name: e.displayName.trim(),
853
849
  profile: {
@@ -859,65 +855,65 @@ function we({ configuration: n, edits: r }) {
859
855
  }
860
856
  }, "Profile saved", "Save profile")
861
857
  });
862
- return /* @__PURE__ */ K("section", {
858
+ return /* @__PURE__ */ U("section", {
863
859
  className: "grid gap-5",
864
- children: [/* @__PURE__ */ K("div", {
860
+ children: [/* @__PURE__ */ U("div", {
865
861
  className: "flex flex-wrap items-start justify-between gap-4",
866
- children: [/* @__PURE__ */ K("div", {
862
+ children: [/* @__PURE__ */ U("div", {
867
863
  className: "grid gap-1",
868
- children: [/* @__PURE__ */ G("h2", {
864
+ children: [/* @__PURE__ */ H("h2", {
869
865
  className: "text-base font-semibold",
870
- children: /* @__PURE__ */ G(e, { id: "Merchant profile" })
871
- }), /* @__PURE__ */ G("p", {
866
+ children: /* @__PURE__ */ H(e, { id: "Merchant profile" })
867
+ }), /* @__PURE__ */ H("p", {
872
868
  className: "text-sm text-pretty text-muted-foreground",
873
- children: /* @__PURE__ */ G(e, { id: "Customer-facing merchant details used on invoices and emails." })
869
+ children: /* @__PURE__ */ H(e, { id: "Customer-facing merchant details used on invoices and emails." })
874
870
  })]
875
- }), /* @__PURE__ */ G(u.Subscribe, {
871
+ }), /* @__PURE__ */ H(u.Subscribe, {
876
872
  selector: (e) => [e.canSubmit, e.isSubmitting],
877
- children: ([e, t]) => /* @__PURE__ */ G(pe, {
873
+ children: ([e, t]) => /* @__PURE__ */ H(J, {
878
874
  edits: r,
879
875
  editing: l.editing,
880
876
  form: "merchant-profile-form",
881
877
  saving: t,
882
878
  canSave: e,
883
879
  onEdit: () => {
884
- u.reset(c()), l.open();
880
+ u.reset(s()), l.open();
885
881
  },
886
882
  onCancel: l.close
887
883
  })
888
884
  })]
889
- }), l.editing ? /* @__PURE__ */ K("form", {
885
+ }), l.editing ? /* @__PURE__ */ U("form", {
890
886
  id: i("merchant-profile-form"),
891
887
  onSubmit: (e) => {
892
888
  e.preventDefault(), e.stopPropagation(), u.handleSubmit();
893
889
  },
894
890
  className: "grid gap-4",
895
891
  children: [
896
- /* @__PURE__ */ G(u.Field, {
892
+ /* @__PURE__ */ H(u.Field, {
897
893
  name: "displayName",
898
894
  validators: { onChange: ({ value: e }) => e.trim() ? void 0 : "Enter the merchant's name" },
899
- children: (e) => /* @__PURE__ */ G(Z, {
895
+ children: (e) => /* @__PURE__ */ H(X, {
900
896
  label: a("Display name"),
901
897
  id: "s-name",
902
- children: /* @__PURE__ */ K("div", {
898
+ children: /* @__PURE__ */ U("div", {
903
899
  className: "grid gap-1.5",
904
- children: [/* @__PURE__ */ G(s, {
900
+ children: [/* @__PURE__ */ H(v, {
905
901
  id: i("s-name"),
906
902
  value: e.state.value,
907
903
  onBlur: e.handleBlur,
908
904
  onChange: (t) => e.handleChange(t.target.value),
909
905
  autoComplete: "organization",
910
906
  "aria-invalid": e.state.meta.errors.length > 0
911
- }), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
907
+ }), /* @__PURE__ */ H(c, { errors: e.state.meta.errors })]
912
908
  })
913
909
  })
914
910
  }),
915
- /* @__PURE__ */ G(u.Field, {
911
+ /* @__PURE__ */ H(u.Field, {
916
912
  name: "fromEmail",
917
- children: (e) => /* @__PURE__ */ G(Z, {
913
+ children: (e) => /* @__PURE__ */ H(X, {
918
914
  label: a("From email"),
919
915
  id: "s-email",
920
- children: /* @__PURE__ */ G(s, {
916
+ children: /* @__PURE__ */ H(v, {
921
917
  id: i("s-email"),
922
918
  type: "email",
923
919
  value: e.state.value,
@@ -927,12 +923,12 @@ function we({ configuration: n, edits: r }) {
927
923
  })
928
924
  })
929
925
  }),
930
- /* @__PURE__ */ G(u.Field, {
926
+ /* @__PURE__ */ H(u.Field, {
931
927
  name: "supportURL",
932
- children: (e) => /* @__PURE__ */ G(Z, {
928
+ children: (e) => /* @__PURE__ */ H(X, {
933
929
  label: a("Support URL"),
934
930
  id: "s-support",
935
- children: /* @__PURE__ */ G(s, {
931
+ children: /* @__PURE__ */ H(v, {
936
932
  id: i("s-support"),
937
933
  type: "url",
938
934
  value: e.state.value,
@@ -942,12 +938,12 @@ function we({ configuration: n, edits: r }) {
942
938
  })
943
939
  })
944
940
  }),
945
- /* @__PURE__ */ G(u.Field, {
941
+ /* @__PURE__ */ H(u.Field, {
946
942
  name: "subscribeURL",
947
- children: (e) => /* @__PURE__ */ G(Z, {
943
+ children: (e) => /* @__PURE__ */ H(X, {
948
944
  label: a("Subscribe URL"),
949
945
  id: "s-subscribe",
950
- children: /* @__PURE__ */ G(s, {
946
+ children: /* @__PURE__ */ H(v, {
951
947
  id: i("s-subscribe"),
952
948
  type: "url",
953
949
  value: e.state.value,
@@ -957,12 +953,12 @@ function we({ configuration: n, edits: r }) {
957
953
  })
958
954
  })
959
955
  }),
960
- /* @__PURE__ */ G(u.Field, {
956
+ /* @__PURE__ */ H(u.Field, {
961
957
  name: "billingURL",
962
- children: (e) => /* @__PURE__ */ G(Z, {
958
+ children: (e) => /* @__PURE__ */ H(X, {
963
959
  label: a("Billing URL"),
964
960
  id: "s-billing",
965
- children: /* @__PURE__ */ G(s, {
961
+ children: /* @__PURE__ */ H(v, {
966
962
  id: i("s-billing"),
967
963
  type: "url",
968
964
  value: e.state.value,
@@ -972,12 +968,12 @@ function we({ configuration: n, edits: r }) {
972
968
  })
973
969
  })
974
970
  }),
975
- /* @__PURE__ */ G(u.Field, {
971
+ /* @__PURE__ */ H(u.Field, {
976
972
  name: "logoURL",
977
- children: (e) => /* @__PURE__ */ G(Z, {
973
+ children: (e) => /* @__PURE__ */ H(X, {
978
974
  label: a("Logo URL"),
979
975
  id: "s-logo",
980
- children: /* @__PURE__ */ G(s, {
976
+ children: /* @__PURE__ */ H(v, {
981
977
  id: i("s-logo"),
982
978
  type: "url",
983
979
  value: e.state.value,
@@ -988,30 +984,30 @@ function we({ configuration: n, edits: r }) {
988
984
  })
989
985
  })
990
986
  ]
991
- }) : /* @__PURE__ */ K("dl", {
987
+ }) : /* @__PURE__ */ U("dl", {
992
988
  className: "grid gap-4",
993
989
  children: [
994
- /* @__PURE__ */ G(X, {
990
+ /* @__PURE__ */ H(Y, {
995
991
  label: a("Display name"),
996
992
  value: n.display_name
997
993
  }),
998
- /* @__PURE__ */ G(X, {
994
+ /* @__PURE__ */ H(Y, {
999
995
  label: a("From email"),
1000
996
  value: o?.from_email
1001
997
  }),
1002
- /* @__PURE__ */ G(X, {
998
+ /* @__PURE__ */ H(Y, {
1003
999
  label: a("Support URL"),
1004
1000
  value: o?.support_url
1005
1001
  }),
1006
- /* @__PURE__ */ G(X, {
1002
+ /* @__PURE__ */ H(Y, {
1007
1003
  label: a("Subscribe URL"),
1008
1004
  value: o?.subscribe_url
1009
1005
  }),
1010
- /* @__PURE__ */ G(X, {
1006
+ /* @__PURE__ */ H(Y, {
1011
1007
  label: a("Billing URL"),
1012
1008
  value: o?.billing_url
1013
1009
  }),
1014
- /* @__PURE__ */ G(X, {
1010
+ /* @__PURE__ */ H(Y, {
1015
1011
  label: a("Logo URL"),
1016
1012
  value: o?.logo_url
1017
1013
  })
@@ -1019,55 +1015,55 @@ function we({ configuration: n, edits: r }) {
1019
1015
  })]
1020
1016
  });
1021
1017
  }
1022
- function Te({ configuration: n, edits: r }) {
1023
- let { id: i, text: a } = t(), o = n.reprice_notice_window_days ?? 30, c = Y(n), l = J({
1018
+ function Ee({ configuration: n, edits: r }) {
1019
+ let { id: i, text: a } = t(), o = n.reprice_notice_window_days ?? 30, s = K(n), l = G({
1024
1020
  defaultValues: { days: String(o) },
1025
- onSubmit: ({ value: e }) => c.save({ reprice_notice_window_days: Number(e.days) }, "Notice window saved", "Save notice window")
1021
+ onSubmit: ({ value: e }) => s.save({ reprice_notice_window_days: Number(e.days) }, "Notice window saved", "Save notice window")
1026
1022
  });
1027
- return /* @__PURE__ */ K("section", {
1023
+ return /* @__PURE__ */ U("section", {
1028
1024
  className: "grid gap-5",
1029
- children: [/* @__PURE__ */ K("div", {
1025
+ children: [/* @__PURE__ */ U("div", {
1030
1026
  className: "flex flex-wrap items-start justify-between gap-4",
1031
- children: [/* @__PURE__ */ K("div", {
1027
+ children: [/* @__PURE__ */ U("div", {
1032
1028
  className: "grid max-w-2xl gap-1",
1033
- children: [/* @__PURE__ */ G("h2", {
1029
+ children: [/* @__PURE__ */ H("h2", {
1034
1030
  className: "text-base font-semibold",
1035
- children: /* @__PURE__ */ G(e, { id: "Pricing policies" })
1036
- }), /* @__PURE__ */ G("p", {
1031
+ children: /* @__PURE__ */ H(e, { id: "Pricing policies" })
1032
+ }), /* @__PURE__ */ H("p", {
1037
1033
  className: "text-sm text-pretty text-muted-foreground",
1038
- children: /* @__PURE__ */ G(e, { id: "Set how much notice customers receive before a price increase." })
1034
+ children: /* @__PURE__ */ H(e, { id: "Set how much notice customers receive before a price increase." })
1039
1035
  })]
1040
- }), /* @__PURE__ */ G(l.Subscribe, {
1036
+ }), /* @__PURE__ */ H(l.Subscribe, {
1041
1037
  selector: (e) => [e.canSubmit, e.isSubmitting],
1042
- children: ([e, t]) => /* @__PURE__ */ G(pe, {
1038
+ children: ([e, t]) => /* @__PURE__ */ H(J, {
1043
1039
  edits: r,
1044
- editing: c.editing,
1040
+ editing: s.editing,
1045
1041
  form: "notice-window-form",
1046
1042
  saving: t,
1047
1043
  canSave: e,
1048
1044
  onEdit: () => {
1049
- l.reset({ days: String(o) }), c.open();
1045
+ l.reset({ days: String(o) }), s.open();
1050
1046
  },
1051
- onCancel: c.close
1047
+ onCancel: s.close
1052
1048
  })
1053
1049
  })]
1054
- }), c.editing ? /* @__PURE__ */ G("form", {
1050
+ }), s.editing ? /* @__PURE__ */ H("form", {
1055
1051
  id: i("notice-window-form"),
1056
1052
  onSubmit: (e) => {
1057
1053
  e.preventDefault(), e.stopPropagation(), l.handleSubmit();
1058
1054
  },
1059
- children: /* @__PURE__ */ G(l.Field, {
1055
+ children: /* @__PURE__ */ H(l.Field, {
1060
1056
  name: "days",
1061
1057
  validators: { onChange: ({ value: e }) => {
1062
1058
  let t = Number(e);
1063
1059
  return e.trim() && Number.isInteger(t) && t >= 0 ? void 0 : "Enter a whole number of days";
1064
1060
  } },
1065
- children: (e) => /* @__PURE__ */ G(Z, {
1061
+ children: (e) => /* @__PURE__ */ H(X, {
1066
1062
  label: a("Notice period (days)"),
1067
1063
  id: "s-notice-window",
1068
- children: /* @__PURE__ */ K("div", {
1064
+ children: /* @__PURE__ */ U("div", {
1069
1065
  className: "grid gap-1.5",
1070
- children: [/* @__PURE__ */ G(s, {
1066
+ children: [/* @__PURE__ */ H(v, {
1071
1067
  id: i("s-notice-window"),
1072
1068
  type: "number",
1073
1069
  step: "1",
@@ -1076,193 +1072,193 @@ function Te({ configuration: n, edits: r }) {
1076
1072
  onBlur: e.handleBlur,
1077
1073
  onChange: (t) => e.handleChange(t.target.value),
1078
1074
  "aria-invalid": e.state.meta.errors.length > 0
1079
- }), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
1075
+ }), /* @__PURE__ */ H(c, { errors: e.state.meta.errors })]
1080
1076
  })
1081
1077
  })
1082
1078
  })
1083
- }) : /* @__PURE__ */ G("dl", { children: /* @__PURE__ */ G(X, {
1079
+ }) : /* @__PURE__ */ H("dl", { children: /* @__PURE__ */ H(Y, {
1084
1080
  label: a("Notice period"),
1085
1081
  value: `${o} ${o === 1 ? "day" : "days"}`
1086
1082
  }) })]
1087
1083
  });
1088
1084
  }
1089
- function Ee() {
1090
- let { selectedMerchant: t, adminQueries: n } = i(), r = H(n.psps()), a = H(n.rails()), o = l();
1091
- if (r.isPending || a.isPending) return /* @__PURE__ */ G("p", {
1085
+ function De() {
1086
+ let { selectedMerchant: t, adminQueries: n } = i(), r = z(n.psps()), a = z(n.rails()), o = I();
1087
+ if (r.isPending || a.isPending) return /* @__PURE__ */ H("p", {
1092
1088
  className: "text-sm text-muted-foreground",
1093
- children: /* @__PURE__ */ G(e, { id: "Loading…" })
1089
+ children: /* @__PURE__ */ H(e, { id: "Loading…" })
1094
1090
  });
1095
1091
  let s = a.data ?? [];
1096
- return /* @__PURE__ */ K("div", {
1092
+ return /* @__PURE__ */ U("div", {
1097
1093
  className: "grid gap-6",
1098
1094
  children: [
1099
- /* @__PURE__ */ G(fe, {}),
1100
- /* @__PURE__ */ K("section", {
1095
+ /* @__PURE__ */ H(q, {}),
1096
+ /* @__PURE__ */ U("section", {
1101
1097
  className: "grid gap-5",
1102
- children: [/* @__PURE__ */ K("div", {
1098
+ children: [/* @__PURE__ */ U("div", {
1103
1099
  className: "flex flex-wrap items-start justify-between gap-4",
1104
- children: [/* @__PURE__ */ K("div", {
1100
+ children: [/* @__PURE__ */ U("div", {
1105
1101
  className: "grid gap-1",
1106
- children: [/* @__PURE__ */ G("h2", {
1102
+ children: [/* @__PURE__ */ H("h2", {
1107
1103
  className: "text-base font-semibold",
1108
- children: /* @__PURE__ */ G(e, { id: "PSPs" })
1109
- }), /* @__PURE__ */ G("p", {
1104
+ children: /* @__PURE__ */ H(e, { id: "PSPs" })
1105
+ }), /* @__PURE__ */ H("p", {
1110
1106
  className: "text-sm text-muted-foreground",
1111
- children: /* @__PURE__ */ G(e, { id: "The accounts this merchant takes payments through, one or more per rail." })
1107
+ children: /* @__PURE__ */ H(e, { id: "The accounts this merchant takes payments through, one or more per rail." })
1112
1108
  })]
1113
- }), o && /* @__PURE__ */ G(Le, { railDefinitions: s }, t() ?? "")]
1114
- }), r.data?.data?.length ? /* @__PURE__ */ K(j, {
1109
+ }), o && /* @__PURE__ */ H(Le, { railDefinitions: s }, t() ?? "")]
1110
+ }), r.data?.data?.length ? /* @__PURE__ */ U(A, {
1115
1111
  className: "min-w-[44rem]",
1116
- children: [/* @__PURE__ */ G(O, { children: /* @__PURE__ */ K(A, {
1112
+ children: [/* @__PURE__ */ H(D, { children: /* @__PURE__ */ U(k, {
1117
1113
  className: "hover:bg-transparent",
1118
1114
  children: [
1119
- /* @__PURE__ */ G(E, {
1115
+ /* @__PURE__ */ H(T, {
1120
1116
  className: "text-muted-foreground",
1121
1117
  children: "PSP"
1122
1118
  }),
1123
- /* @__PURE__ */ G(E, {
1119
+ /* @__PURE__ */ H(T, {
1124
1120
  className: "text-muted-foreground",
1125
- children: /* @__PURE__ */ G(e, { id: "Environment" })
1121
+ children: /* @__PURE__ */ H(e, { id: "Environment" })
1126
1122
  }),
1127
- /* @__PURE__ */ G(E, {
1123
+ /* @__PURE__ */ H(T, {
1128
1124
  className: "text-muted-foreground",
1129
- children: /* @__PURE__ */ G(e, { id: "Credentials" })
1125
+ children: /* @__PURE__ */ H(e, { id: "Credentials" })
1130
1126
  }),
1131
- /* @__PURE__ */ G(E, {
1127
+ /* @__PURE__ */ H(T, {
1132
1128
  className: "text-muted-foreground",
1133
- children: /* @__PURE__ */ G(e, { id: "State" })
1129
+ children: /* @__PURE__ */ H(e, { id: "State" })
1134
1130
  }),
1135
- o && /* @__PURE__ */ G(E, {
1131
+ o && /* @__PURE__ */ H(T, {
1136
1132
  className: "text-right text-muted-foreground",
1137
- children: /* @__PURE__ */ G(e, { id: "Action" })
1133
+ children: /* @__PURE__ */ H(e, { id: "Action" })
1138
1134
  })
1139
1135
  ]
1140
- }) }), /* @__PURE__ */ G(D, { children: r.data.data.map((e) => /* @__PURE__ */ G(Oe, {
1136
+ }) }), /* @__PURE__ */ H(E, { children: r.data.data.map((e) => /* @__PURE__ */ H(ke, {
1141
1137
  psp: e,
1142
1138
  railDefinitions: s,
1143
1139
  edits: o
1144
1140
  }, e.id)) })]
1145
- }) : /* @__PURE__ */ G("p", {
1141
+ }) : /* @__PURE__ */ H("p", {
1146
1142
  className: "py-2 text-sm text-muted-foreground",
1147
- children: /* @__PURE__ */ G(e, { id: "No PSPs configured." })
1143
+ children: /* @__PURE__ */ H(e, { id: "No PSPs configured." })
1148
1144
  })]
1149
1145
  }),
1150
- /* @__PURE__ */ G(be, {})
1146
+ /* @__PURE__ */ H(xe, {})
1151
1147
  ]
1152
1148
  });
1153
1149
  }
1154
- function De(e) {
1155
- return e.validated_at ? `Validated ${h(e.validated_at)}` : e.configured ? "Configured" : "Not configured";
1150
+ function Oe(e) {
1151
+ return e.validated_at ? `Validated ${re(e.validated_at)}` : e.configured ? "Configured" : "Not configured";
1156
1152
  }
1157
- function Oe({ psp: n, railDefinitions: r, edits: s }) {
1158
- let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { text: p } = t(), m = U(), h = V(d.updatePSP(m)), [g, _] = B.useState(!1), v = ee(), b = r.find((e) => e.rail === n.rail), x = b?.display_name ?? n.rail, S = n.credentials ?? {}, C = async (e) => {
1159
- if (!(!e && !await v({
1153
+ function ke({ psp: n, railDefinitions: r, edits: c }) {
1154
+ let { toast: d, toastApiError: f, toastStaleEdit: p, adminMutations: m, selectedMerchant: h } = i(), { text: g } = t(), _ = B(), v = R(m.updatePSP(_)), [y, b] = L.useState(!1), x = l(), S = r.find((e) => e.rail === n.rail), C = S?.display_name ?? n.rail, w = n.credentials ?? {}, T = async (e) => {
1155
+ if (e || await x({
1160
1156
  title: `Archive ${n.key}?`,
1161
1157
  description: "New purchase stops routing to it. Existing subscriptions, refunds and webhooks keep using it.",
1162
1158
  confirmLabel: "Archive PSP"
1163
- }))) try {
1164
- await h.mutateAsync({
1159
+ })) try {
1160
+ await v.mutateAsync({
1165
1161
  id: n.id,
1166
1162
  psp: {
1167
1163
  archived: !0,
1168
1164
  expected_revision: n.revision,
1169
1165
  ...e ? { allow_last: !0 } : {}
1170
1166
  }
1171
- }), c.success("PSP archived");
1167
+ }), d.success("PSP archived");
1172
1168
  } catch (t) {
1173
1169
  if (t instanceof a && t.code === "psp_last_active") {
1174
- e ? l(t, "Archive PSP") : _(!0);
1170
+ e ? f(t, "Archive PSP") : b(!0);
1175
1171
  return;
1176
1172
  }
1177
1173
  if (t instanceof a && t.revisionMismatch) {
1178
- u(`PSP ${n.key}`);
1174
+ p(`PSP ${n.key}`);
1179
1175
  return;
1180
1176
  }
1181
- l(t, "Archive PSP");
1177
+ f(t, "Archive PSP");
1182
1178
  }
1183
1179
  };
1184
- return /* @__PURE__ */ K(A, {
1180
+ return /* @__PURE__ */ U(k, {
1185
1181
  className: n.archived ? "opacity-60" : void 0,
1186
1182
  children: [
1187
- /* @__PURE__ */ G(k, {
1183
+ /* @__PURE__ */ H(O, {
1188
1184
  className: "py-3",
1189
- children: /* @__PURE__ */ K("div", {
1185
+ children: /* @__PURE__ */ U("div", {
1190
1186
  className: "grid min-w-0 leading-tight",
1191
- children: [/* @__PURE__ */ G("span", {
1187
+ children: [/* @__PURE__ */ H("span", {
1192
1188
  className: "font-medium",
1193
1189
  children: n.key
1194
- }), /* @__PURE__ */ K("span", {
1190
+ }), /* @__PURE__ */ U("span", {
1195
1191
  className: "truncate text-xs text-muted-foreground",
1196
1192
  children: [
1197
- x,
1193
+ C,
1198
1194
  " · ",
1199
- je(n)
1195
+ Me(n)
1200
1196
  ]
1201
1197
  })]
1202
1198
  })
1203
1199
  }),
1204
- /* @__PURE__ */ G(k, {
1200
+ /* @__PURE__ */ H(O, {
1205
1201
  className: "py-3 capitalize",
1206
1202
  children: n.environment
1207
1203
  }),
1208
- /* @__PURE__ */ G(k, {
1204
+ /* @__PURE__ */ H(O, {
1209
1205
  className: "py-3",
1210
- children: Object.keys(S).length > 0 ? /* @__PURE__ */ G("span", {
1206
+ children: Object.keys(w).length > 0 ? /* @__PURE__ */ H("span", {
1211
1207
  className: "flex flex-wrap gap-1",
1212
- children: Object.entries(S).map(([e, t]) => /* @__PURE__ */ G(y, {
1208
+ children: Object.entries(w).map(([e, t]) => /* @__PURE__ */ H(o, {
1213
1209
  variant: "secondary",
1214
1210
  className: t.configured ? "" : "bg-held-surface text-held",
1215
- title: De(t),
1211
+ title: Oe(t),
1216
1212
  children: e
1217
1213
  }, e))
1218
- }) : /* @__PURE__ */ G("span", {
1214
+ }) : /* @__PURE__ */ H("span", {
1219
1215
  className: "text-sm text-muted-foreground",
1220
- children: /* @__PURE__ */ G(e, { id: "None required" })
1216
+ children: /* @__PURE__ */ H(e, { id: "None required" })
1221
1217
  })
1222
1218
  }),
1223
- /* @__PURE__ */ G(k, {
1219
+ /* @__PURE__ */ H(O, {
1224
1220
  className: "py-3",
1225
- children: n.archived && n.open_obligations === 0 ? /* @__PURE__ */ G(y, {
1221
+ children: n.archived && n.open_obligations === 0 ? /* @__PURE__ */ H(o, {
1226
1222
  variant: "secondary",
1227
- children: /* @__PURE__ */ G(e, { id: "archived" })
1228
- }) : n.archived ? /* @__PURE__ */ K(y, {
1223
+ children: /* @__PURE__ */ H(e, { id: "archived" })
1224
+ }) : n.archived ? /* @__PURE__ */ U(o, {
1229
1225
  variant: "secondary",
1230
1226
  className: "bg-held-surface text-held",
1231
1227
  children: [
1232
- /* @__PURE__ */ G(e, { id: "draining (" }),
1228
+ /* @__PURE__ */ H(e, { id: "draining (" }),
1233
1229
  n.open_obligations,
1234
1230
  ")"
1235
1231
  ]
1236
- }) : /* @__PURE__ */ G(y, {
1232
+ }) : /* @__PURE__ */ H(o, {
1237
1233
  variant: "secondary",
1238
1234
  className: "bg-settled-surface text-settled",
1239
- children: /* @__PURE__ */ G(e, { id: "active" })
1235
+ children: /* @__PURE__ */ H(e, { id: "active" })
1240
1236
  })
1241
1237
  }),
1242
- s && /* @__PURE__ */ G(k, {
1238
+ c && /* @__PURE__ */ H(O, {
1243
1239
  className: "py-3 text-right",
1244
- children: !n.archived && /* @__PURE__ */ K("div", {
1240
+ children: !n.archived && /* @__PURE__ */ U("div", {
1245
1241
  className: "flex justify-end gap-2",
1246
1242
  children: [
1247
- /* @__PURE__ */ G(ke, {
1243
+ /* @__PURE__ */ H(Ae, {
1248
1244
  psp: n,
1249
- credentialKeys: b?.credential_keys ?? Object.keys(S)
1250
- }, `${f() ?? ""}:${n.id}`),
1251
- /* @__PURE__ */ G(o, {
1245
+ credentialKeys: S?.credential_keys ?? Object.keys(w)
1246
+ }, `${h() ?? ""}:${n.id}`),
1247
+ /* @__PURE__ */ H(u, {
1252
1248
  variant: "outline",
1253
1249
  size: "sm",
1254
- disabled: h.isPending,
1255
- onClick: () => C(!1),
1256
- children: /* @__PURE__ */ G(e, { id: "Archive" })
1250
+ disabled: v.isPending,
1251
+ onClick: () => T(!1),
1252
+ children: /* @__PURE__ */ H(e, { id: "Archive" })
1257
1253
  }),
1258
- /* @__PURE__ */ G(ae, {
1259
- open: g,
1260
- onOpenChange: _,
1261
- title: `Archive the last active ${x} PSP?`,
1262
- description: p("New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one."),
1254
+ /* @__PURE__ */ H(s, {
1255
+ open: y,
1256
+ onOpenChange: b,
1257
+ title: `Archive the last active ${C} PSP?`,
1258
+ description: g("New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one."),
1263
1259
  confirmationWord: "ARCHIVE",
1264
1260
  actionLabel: "Archive PSP",
1265
- onConfirm: () => C(!0)
1261
+ onConfirm: () => T(!0)
1266
1262
  })
1267
1263
  ]
1268
1264
  })
@@ -1270,63 +1266,63 @@ function Oe({ psp: n, railDefinitions: r, edits: s }) {
1270
1266
  ]
1271
1267
  });
1272
1268
  }
1273
- function ke({ psp: n, credentialKeys: r }) {
1274
- let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { id: p } = t(), [m, g] = B.useState(!1), [_] = B.useState(() => f() ?? ""), v = B.useRef(n.revision), ee = U(), y = V(d.updatePSP(ee)), b = n.credentials ?? {}, x = J({
1269
+ function Ae({ psp: n, credentialKeys: r }) {
1270
+ let { toast: o, toastApiError: s, toastStaleEdit: c, adminMutations: l, selectedMerchant: y } = i(), { id: b } = t(), [x, S] = L.useState(!1), [C] = L.useState(() => y() ?? ""), w = L.useRef(n.revision), T = B(), E = R(l.updatePSP(T)), D = n.credentials ?? {}, O = G({
1275
1271
  defaultValues: { credentials: {} },
1276
1272
  onSubmit: async ({ value: e }) => {
1277
1273
  let t = Object.fromEntries(Object.entries(e.credentials).filter(([, e]) => e.trim()));
1278
1274
  try {
1279
- if ((f() ?? "") !== _) throw Error("Merchant changed; reopen this form");
1280
- await y.mutateAsync({
1275
+ if ((y() ?? "") !== C) throw Error("Merchant changed; reopen this form");
1276
+ await E.mutateAsync({
1281
1277
  id: n.id,
1282
1278
  psp: {
1283
- expected_revision: v.current,
1279
+ expected_revision: w.current,
1284
1280
  credentials: t
1285
1281
  }
1286
- }), c.success(`${n.key} credentials validated and rotated`), S(!1);
1282
+ }), o.success(`${n.key} credentials validated and rotated`), k(!1);
1287
1283
  } catch (e) {
1288
1284
  if (e instanceof a && e.revisionMismatch) {
1289
- u(`PSP ${n.key}`), S(!1);
1285
+ c(`PSP ${n.key}`), k(!1);
1290
1286
  return;
1291
1287
  }
1292
- l(e, "Rotate credentials");
1288
+ s(e, "Rotate credentials");
1293
1289
  } finally {
1294
- y.reset();
1290
+ E.reset();
1295
1291
  }
1296
1292
  }
1297
- }), S = (e) => {
1298
- e || x.reset(), e && (v.current = n.revision), g(e);
1293
+ }), k = (e) => {
1294
+ e || O.reset(), e && (w.current = n.revision), S(e);
1299
1295
  };
1300
- return /* @__PURE__ */ K(re, {
1301
- open: m,
1302
- onOpenChange: S,
1303
- children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ G(o, {
1296
+ return /* @__PURE__ */ U(_, {
1297
+ open: x,
1298
+ onOpenChange: k,
1299
+ children: [/* @__PURE__ */ H(g, { render: /* @__PURE__ */ H(u, {
1304
1300
  variant: "outline",
1305
1301
  size: "sm",
1306
- children: /* @__PURE__ */ G(e, { id: "Rotate" })
1307
- }) }), /* @__PURE__ */ K(P, {
1308
- className: L,
1309
- children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ K(F, { children: [
1310
- /* @__PURE__ */ G(e, { id: "Rotate " }),
1302
+ children: /* @__PURE__ */ H(e, { id: "Rotate" })
1303
+ }) }), /* @__PURE__ */ U(p, {
1304
+ className: F,
1305
+ children: [/* @__PURE__ */ U(d, { children: [/* @__PURE__ */ U(m, { children: [
1306
+ /* @__PURE__ */ H(e, { id: "Rotate " }),
1311
1307
  n.key,
1312
- /* @__PURE__ */ G(e, { id: " credentials · " }),
1313
- je(n)
1314
- ] }), /* @__PURE__ */ G(te, { children: /* @__PURE__ */ G(e, { id: "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." }) })] }), /* @__PURE__ */ K("form", {
1308
+ /* @__PURE__ */ H(e, { id: " credentials · " }),
1309
+ Me(n)
1310
+ ] }), /* @__PURE__ */ H(h, { children: /* @__PURE__ */ H(e, { id: "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." }) })] }), /* @__PURE__ */ U("form", {
1315
1311
  onSubmit: (e) => {
1316
- e.preventDefault(), e.stopPropagation(), x.handleSubmit();
1312
+ e.preventDefault(), e.stopPropagation(), O.handleSubmit();
1317
1313
  },
1318
1314
  className: "grid gap-4",
1319
- children: [/* @__PURE__ */ G(x.Field, {
1315
+ children: [/* @__PURE__ */ H(O.Field, {
1320
1316
  name: "credentials",
1321
- children: (t) => /* @__PURE__ */ K("div", {
1317
+ children: (t) => /* @__PURE__ */ U("div", {
1322
1318
  className: "grid gap-3",
1323
1319
  children: [r.map((r) => {
1324
- let i = b[r];
1325
- return /* @__PURE__ */ K($, {
1320
+ let i = D[r];
1321
+ return /* @__PURE__ */ U($, {
1326
1322
  label: r,
1327
1323
  id: `rot-${n.id}-${r}`,
1328
- children: [/* @__PURE__ */ G(s, {
1329
- id: p(`rot-${n.id}-${r}`),
1324
+ children: [/* @__PURE__ */ H(v, {
1325
+ id: b(`rot-${n.id}-${r}`),
1330
1326
  type: "password",
1331
1327
  autoComplete: "new-password",
1332
1328
  placeholder: i?.configured ? "unchanged" : "not configured",
@@ -1335,19 +1331,19 @@ function ke({ psp: n, credentialKeys: r }) {
1335
1331
  ...t.state.value,
1336
1332
  [r]: e.target.value
1337
1333
  })
1338
- }), i?.validated_at && /* @__PURE__ */ K("p", {
1334
+ }), i?.validated_at && /* @__PURE__ */ U("p", {
1339
1335
  className: "text-xs text-muted-foreground",
1340
- children: [/* @__PURE__ */ G(e, { id: "Last validated " }), h(i.validated_at)]
1336
+ children: [/* @__PURE__ */ H(e, { id: "Last validated " }), re(i.validated_at)]
1341
1337
  })]
1342
1338
  }, r);
1343
- }), /* @__PURE__ */ G("p", {
1339
+ }), /* @__PURE__ */ H("p", {
1344
1340
  className: "text-xs text-muted-foreground",
1345
- children: /* @__PURE__ */ G(e, { id: "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." })
1341
+ children: /* @__PURE__ */ H(e, { id: "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." })
1346
1342
  })]
1347
1343
  })
1348
- }), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(x.Subscribe, {
1344
+ }), /* @__PURE__ */ H(f, { children: /* @__PURE__ */ H(O.Subscribe, {
1349
1345
  selector: (e) => [e.values.credentials, e.isSubmitting],
1350
- children: ([e, t]) => /* @__PURE__ */ G(o, {
1346
+ children: ([e, t]) => /* @__PURE__ */ H(u, {
1351
1347
  type: "submit",
1352
1348
  disabled: t || !Object.values(e).some((e) => e.trim()),
1353
1349
  children: t ? "Validating…" : "Validate & rotate"
@@ -1357,7 +1353,7 @@ function ke({ psp: n, credentialKeys: r }) {
1357
1353
  })]
1358
1354
  });
1359
1355
  }
1360
- var Ae = {
1356
+ var je = {
1361
1357
  gateway_id: {
1362
1358
  label: "Gateway ID",
1363
1359
  hint: "The Gateway ID shown in your NMI dashboard."
@@ -1379,36 +1375,36 @@ var Ae = {
1379
1375
  hint: "The Solana address your payments land in."
1380
1376
  }
1381
1377
  };
1382
- function je(e) {
1378
+ function Me(e) {
1383
1379
  return e.client_accnum ? `${e.client_accnum}-${e.client_subacc ?? ""}` : e.gateway_id ?? e.account_id ?? e.treasury ?? "";
1384
1380
  }
1385
- var Me = {
1381
+ var Ne = {
1386
1382
  live: "Live: real money",
1387
1383
  test: "Test: the provider's own system, no money moves",
1388
1384
  sandbox: "Sandbox: the provider's separate sandbox",
1389
1385
  mainnet: "Mainnet: real money",
1390
1386
  devnet: "Devnet: Solana's development network",
1391
1387
  testnet: "Testnet: Solana's test network"
1392
- }, Ne = {
1388
+ }, Pe = {
1393
1389
  nmi: "NMI",
1394
1390
  ccbill: "CCBill",
1395
1391
  stripe: "Stripe",
1396
1392
  solana: "Solana"
1397
1393
  };
1398
- function Pe(e, t) {
1399
- let n = Ne[e] ?? e;
1394
+ function Fe(e, t) {
1395
+ let n = Pe[e] ?? e;
1400
1396
  return !t || t.toLowerCase() === n.toLowerCase() ? n : `${t} (${n})`;
1401
1397
  }
1402
- var Fe = {
1398
+ var Ie = {
1403
1399
  api: "API",
1404
1400
  id: "ID",
1405
1401
  url: "URL"
1406
1402
  };
1407
- function Ie(e) {
1408
- return e.split(/[_-]+/).filter(Boolean).map((e, t) => Fe[e.toLowerCase()] || (t > 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase())).join(" ");
1403
+ function Q(e) {
1404
+ return e.split(/[_-]+/).filter(Boolean).map((e, t) => Ie[e.toLowerCase()] || (t > 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase())).join(" ");
1409
1405
  }
1410
1406
  function Le({ railDefinitions: n }) {
1411
- let { toast: r, toastApiError: a, adminMutations: c, selectedMerchant: l } = i(), { text: u, id: d } = t(), [f, p] = B.useState(!1), [m] = B.useState(() => l() ?? ""), h = U(), g = V(c.createPSP(h)), _ = J({
1407
+ let { toast: r, toastApiError: a, adminMutations: o, selectedMerchant: s } = i(), { text: l, id: y } = t(), [T, E] = L.useState(!1), [D] = L.useState(() => s() ?? ""), O = B(), k = R(o.createPSP(O)), A = G({
1412
1408
  defaultValues: {
1413
1409
  rail: "",
1414
1410
  environment: "",
@@ -1419,126 +1415,126 @@ function Le({ railDefinitions: n }) {
1419
1415
  onSubmit: async ({ value: e }) => {
1420
1416
  let t = Object.fromEntries(Object.entries(e.credentials).filter(([, e]) => e !== ""));
1421
1417
  try {
1422
- if ((l() ?? "") !== m) throw Error("Merchant changed; reopen this form");
1418
+ if ((s() ?? "") !== D) throw Error("Merchant changed; reopen this form");
1423
1419
  let i = n.find((t) => t.rail === e.rail);
1424
- await g.mutateAsync({
1420
+ await k.mutateAsync({
1425
1421
  key: e.key.trim().toLowerCase(),
1426
1422
  rail: e.rail,
1427
1423
  environment: e.environment,
1428
1424
  ...Object.fromEntries((i?.account_fields ?? []).map((t) => [t, (e.account[t] ?? "").trim()])),
1429
1425
  ...Object.keys(t).length ? { credentials: t } : {}
1430
- }), _.reset(), r.success("PSP added"), p(!1);
1426
+ }), A.reset(), r.success("PSP added"), E(!1);
1431
1427
  } catch (e) {
1432
1428
  a(e, "Add PSP");
1433
1429
  } finally {
1434
- g.reset();
1430
+ k.reset();
1435
1431
  }
1436
1432
  }
1437
- }), v = (e) => {
1438
- e || _.reset(), p(e);
1433
+ }), j = (e) => {
1434
+ e || A.reset(), E(e);
1439
1435
  };
1440
- return /* @__PURE__ */ K(re, {
1441
- open: f,
1442
- onOpenChange: v,
1443
- children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ G(o, {
1436
+ return /* @__PURE__ */ U(_, {
1437
+ open: T,
1438
+ onOpenChange: j,
1439
+ children: [/* @__PURE__ */ H(g, { render: /* @__PURE__ */ H(u, {
1444
1440
  size: "sm",
1445
- children: /* @__PURE__ */ G(e, { id: "Add PSP" })
1446
- }) }), /* @__PURE__ */ K(P, {
1447
- className: L,
1448
- children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ G(F, { children: /* @__PURE__ */ G(e, { id: "Add a PSP" }) }), /* @__PURE__ */ G(te, { children: /* @__PURE__ */ G(e, { id: "Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again." }) })] }), /* @__PURE__ */ K("form", {
1441
+ children: /* @__PURE__ */ H(e, { id: "Add PSP" })
1442
+ }) }), /* @__PURE__ */ U(p, {
1443
+ className: F,
1444
+ children: [/* @__PURE__ */ U(d, { children: [/* @__PURE__ */ H(m, { children: /* @__PURE__ */ H(e, { id: "Add a PSP" }) }), /* @__PURE__ */ H(h, { children: /* @__PURE__ */ H(e, { id: "Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again." }) })] }), /* @__PURE__ */ U("form", {
1449
1445
  onSubmit: (e) => {
1450
- e.preventDefault(), e.stopPropagation(), _.handleSubmit();
1446
+ e.preventDefault(), e.stopPropagation(), A.handleSubmit();
1451
1447
  },
1452
1448
  className: "grid gap-4",
1453
- children: [/* @__PURE__ */ K("div", {
1449
+ children: [/* @__PURE__ */ U("div", {
1454
1450
  className: "grid gap-3",
1455
1451
  children: [
1456
- /* @__PURE__ */ G(_.Field, {
1452
+ /* @__PURE__ */ H(A.Field, {
1457
1453
  name: "rail",
1458
1454
  validators: { onChange: ({ value: e }) => e ? void 0 : "Choose a payment rail" },
1459
- children: (e) => /* @__PURE__ */ K($, {
1460
- label: u("Payment rail"),
1455
+ children: (e) => /* @__PURE__ */ U($, {
1456
+ label: l("Payment rail"),
1461
1457
  id: "pv-rail",
1462
- children: [/* @__PURE__ */ K(T, {
1458
+ children: [/* @__PURE__ */ U(w, {
1463
1459
  items: n.map((e) => ({
1464
1460
  value: e.rail,
1465
- label: Pe(e.rail, e.display_name)
1461
+ label: Fe(e.rail, e.display_name)
1466
1462
  })),
1467
1463
  value: e.state.value || null,
1468
1464
  onValueChange: (t) => {
1469
- e.handleChange(t ?? ""), _.setFieldValue("account", {}), _.setFieldValue("credentials", {}), _.setFieldValue("environment", n.find((e) => e.rail === t)?.environments[0] ?? "");
1465
+ e.handleChange(t ?? ""), A.setFieldValue("account", {}), A.setFieldValue("credentials", {}), A.setFieldValue("environment", n.find((e) => e.rail === t)?.environments[0] ?? "");
1470
1466
  },
1471
- children: [/* @__PURE__ */ G(S, {
1472
- id: d("pv-rail"),
1467
+ children: [/* @__PURE__ */ H(x, {
1468
+ id: y("pv-rail"),
1473
1469
  className: "w-full",
1474
1470
  "aria-invalid": e.state.meta.errors.length > 0,
1475
- children: /* @__PURE__ */ G(x, { placeholder: u("Pick a rail…") })
1476
- }), /* @__PURE__ */ G(C, { children: n.map((e) => /* @__PURE__ */ G(w, {
1471
+ children: /* @__PURE__ */ H(b, { placeholder: l("Pick a rail…") })
1472
+ }), /* @__PURE__ */ H(S, { children: n.map((e) => /* @__PURE__ */ H(C, {
1477
1473
  value: e.rail,
1478
- children: Pe(e.rail, e.display_name)
1474
+ children: Fe(e.rail, e.display_name)
1479
1475
  }, e.rail)) })]
1480
- }), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
1476
+ }), /* @__PURE__ */ H(c, { errors: e.state.meta.errors })]
1481
1477
  })
1482
1478
  }),
1483
- /* @__PURE__ */ G(_.Subscribe, {
1479
+ /* @__PURE__ */ H(A.Subscribe, {
1484
1480
  selector: (e) => e.values.rail,
1485
1481
  children: (e) => {
1486
1482
  let t = n.find((t) => t.rail === e)?.environments ?? [];
1487
- return /* @__PURE__ */ G(_.Field, {
1483
+ return /* @__PURE__ */ H(A.Field, {
1488
1484
  name: "environment",
1489
1485
  validators: { onChange: ({ value: e }) => e ? void 0 : "Choose whether it moves real money" },
1490
- children: (n) => /* @__PURE__ */ K($, {
1491
- label: u("Environment"),
1486
+ children: (n) => /* @__PURE__ */ U($, {
1487
+ label: l("Environment"),
1492
1488
  id: "pv-environment",
1493
1489
  hint: "Whether this PSP moves real money. It is checked with the provider before the PSP is used.",
1494
- children: [/* @__PURE__ */ K(T, {
1490
+ children: [/* @__PURE__ */ U(w, {
1495
1491
  items: t.map((e) => ({
1496
1492
  value: e,
1497
- label: u(Me[e] ?? e)
1493
+ label: l(Ne[e] ?? e)
1498
1494
  })),
1499
1495
  value: n.state.value || null,
1500
1496
  onValueChange: (e) => n.handleChange(e ?? ""),
1501
- children: [/* @__PURE__ */ G(S, {
1502
- id: d("pv-environment"),
1497
+ children: [/* @__PURE__ */ H(x, {
1498
+ id: y("pv-environment"),
1503
1499
  className: "w-full",
1504
1500
  disabled: !e,
1505
1501
  "aria-invalid": n.state.meta.errors.length > 0,
1506
- children: /* @__PURE__ */ G(x, { placeholder: u("Pick an environment…") })
1507
- }), /* @__PURE__ */ G(C, { children: t.map((e) => /* @__PURE__ */ G(w, {
1502
+ children: /* @__PURE__ */ H(b, { placeholder: l("Pick an environment…") })
1503
+ }), /* @__PURE__ */ H(S, { children: t.map((e) => /* @__PURE__ */ H(C, {
1508
1504
  value: e,
1509
- children: u(Me[e] ?? e)
1505
+ children: l(Ne[e] ?? e)
1510
1506
  }, e)) })]
1511
- }), /* @__PURE__ */ G(b, { errors: n.state.meta.errors })]
1507
+ }), /* @__PURE__ */ H(c, { errors: n.state.meta.errors })]
1512
1508
  })
1513
1509
  });
1514
1510
  }
1515
1511
  }),
1516
- /* @__PURE__ */ G(_.Field, {
1512
+ /* @__PURE__ */ H(A.Field, {
1517
1513
  name: "key",
1518
1514
  validators: { onChange: ({ value: e }) => /^[a-z0-9][a-z0-9_-]{0,62}$/.test(e.trim().toLowerCase()) ? void 0 : "Lowercase letters, digits, - or _" },
1519
- children: (e) => /* @__PURE__ */ K($, {
1520
- label: u("Key"),
1515
+ children: (e) => /* @__PURE__ */ U($, {
1516
+ label: l("Key"),
1521
1517
  id: "pv-key",
1522
1518
  hint: "Your name for this PSP, such as mobius. Prices and purchase name it by this key.",
1523
- children: [/* @__PURE__ */ G(s, {
1524
- id: d("pv-key"),
1519
+ children: [/* @__PURE__ */ H(v, {
1520
+ id: y("pv-key"),
1525
1521
  value: e.state.value,
1526
1522
  onBlur: e.handleBlur,
1527
1523
  onChange: (t) => e.handleChange(t.target.value),
1528
1524
  "aria-invalid": e.state.meta.errors.length > 0
1529
- }), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
1525
+ }), /* @__PURE__ */ H(c, { errors: e.state.meta.errors })]
1530
1526
  })
1531
1527
  }),
1532
- /* @__PURE__ */ G(_.Subscribe, {
1528
+ /* @__PURE__ */ H(A.Subscribe, {
1533
1529
  selector: (e) => e.values.rail,
1534
- children: (e) => /* @__PURE__ */ G(_.Field, {
1530
+ children: (e) => /* @__PURE__ */ H(A.Field, {
1535
1531
  name: "account",
1536
- children: (t) => /* @__PURE__ */ G(W, { children: n.find((t) => t.rail === e)?.account_fields.map((e) => /* @__PURE__ */ G($, {
1537
- label: u(Ae[e]?.label ?? Ie(e)),
1532
+ children: (t) => /* @__PURE__ */ H(V, { children: n.find((t) => t.rail === e)?.account_fields.map((e) => /* @__PURE__ */ H($, {
1533
+ label: l(je[e]?.label ?? Q(e)),
1538
1534
  id: `pv-account-${e}`,
1539
- hint: Ae[e]?.hint,
1540
- children: /* @__PURE__ */ G(s, {
1541
- id: d(`pv-account-${e}`),
1535
+ hint: je[e]?.hint,
1536
+ children: /* @__PURE__ */ H(v, {
1537
+ id: y(`pv-account-${e}`),
1542
1538
  value: t.state.value[e] ?? "",
1543
1539
  onBlur: t.handleBlur,
1544
1540
  onChange: (n) => t.handleChange({
@@ -1549,17 +1545,17 @@ function Le({ railDefinitions: n }) {
1549
1545
  }, e)) })
1550
1546
  })
1551
1547
  }),
1552
- /* @__PURE__ */ G(_.Subscribe, {
1548
+ /* @__PURE__ */ H(A.Subscribe, {
1553
1549
  selector: (e) => e.values.rail,
1554
1550
  children: (e) => {
1555
1551
  let t = n.find((t) => t.rail === e);
1556
- return /* @__PURE__ */ G(_.Field, {
1552
+ return /* @__PURE__ */ H(A.Field, {
1557
1553
  name: "credentials",
1558
- children: (e) => /* @__PURE__ */ G(W, { children: t?.credential_keys.map((t) => /* @__PURE__ */ G($, {
1559
- label: Ie(t),
1554
+ children: (e) => /* @__PURE__ */ H(V, { children: t?.credential_keys.map((t) => /* @__PURE__ */ H($, {
1555
+ label: Q(t),
1560
1556
  id: `pv-credential-${t}`,
1561
- children: /* @__PURE__ */ G(s, {
1562
- id: d(`pv-credential-${t}`),
1557
+ children: /* @__PURE__ */ H(v, {
1558
+ id: y(`pv-credential-${t}`),
1563
1559
  type: "password",
1564
1560
  autoComplete: "new-password",
1565
1561
  value: e.state.value[t] ?? "",
@@ -1573,7 +1569,7 @@ function Le({ railDefinitions: n }) {
1573
1569
  }
1574
1570
  })
1575
1571
  ]
1576
- }), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(_.Subscribe, {
1572
+ }), /* @__PURE__ */ H(f, { children: /* @__PURE__ */ H(A.Subscribe, {
1577
1573
  selector: (e) => [
1578
1574
  e.values.rail,
1579
1575
  e.values.environment,
@@ -1582,15 +1578,15 @@ function Le({ railDefinitions: n }) {
1582
1578
  e.canSubmit,
1583
1579
  e.isSubmitting
1584
1580
  ],
1585
- children: ([t, r, i, a, s, c]) => /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(o, {
1581
+ children: ([t, r, i, a, o, s]) => /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(u, {
1586
1582
  type: "button",
1587
1583
  variant: "outline",
1588
- onClick: () => v(!1),
1589
- children: /* @__PURE__ */ G(e, { id: "Cancel" })
1590
- }), /* @__PURE__ */ G(o, {
1584
+ onClick: () => j(!1),
1585
+ children: /* @__PURE__ */ H(e, { id: "Cancel" })
1586
+ }), /* @__PURE__ */ H(u, {
1591
1587
  type: "submit",
1592
- disabled: !t || !r || !i.trim() || !n.find((e) => e.rail === t)?.account_fields.every((e) => (a[e] ?? "").trim()) || !s || c,
1593
- children: c ? "Saving…" : "Add PSP"
1588
+ disabled: !t || !r || !i.trim() || !n.find((e) => e.rail === t)?.account_fields.every((e) => (a[e] ?? "").trim()) || !o || s,
1589
+ children: s ? "Saving…" : "Add PSP"
1594
1590
  })] })
1595
1591
  }) })]
1596
1592
  })]
@@ -1598,173 +1594,173 @@ function Le({ railDefinitions: n }) {
1598
1594
  });
1599
1595
  }
1600
1596
  function Re() {
1601
- let { toast: n, toastApiError: r, adminMutations: a, adminQueries: l } = i(), { text: u, id: d } = t(), [f, h] = B.useState(), ee = V(a.lookupCustomerControls()), y = V(a.setCreditLimit()), E = c(), D = J({
1597
+ let { toast: n, toastApiError: r, adminMutations: a, adminQueries: o } = i(), { text: s, id: l } = t(), [d, f] = L.useState(), p = R(a.lookupCustomerControls()), m = R(a.setCreditLimit()), h = se(), g = G({
1602
1598
  defaultValues: { newLimit: "" },
1603
1599
  onSubmit: async ({ value: e }) => {
1604
- if (!f) return;
1605
- let t = m(f.currency), i = t === void 0 ? null : v(e.newLimit, t);
1600
+ if (!d) return;
1601
+ let t = P(d.currency), i = t === void 0 ? null : oe(e.newLimit, t);
1606
1602
  if (!(i === null || i.startsWith("-"))) try {
1607
- await y.mutateAsync({
1608
- customerId: f.customerID,
1609
- currency: f.currency,
1603
+ await m.mutateAsync({
1604
+ customerId: d.customerID,
1605
+ currency: d.currency,
1610
1606
  amount: i
1611
- }), h((e) => e && {
1607
+ }), f((e) => e && {
1612
1608
  ...e,
1613
1609
  creditLimit: i
1614
- }), D.reset(), n.success("Credit limit updated");
1610
+ }), g.reset(), n.success("Credit limit updated");
1615
1611
  } catch (e) {
1616
1612
  r(e, "Set credit limit");
1617
1613
  }
1618
1614
  }
1619
- }), [O, k] = B.useState(), { data: A } = H(l.merchantConfiguration()), j = [...new Set([
1620
- ...A?.usage_billing?.currencies ?? [],
1621
- ...O?.balances ?? [],
1622
- ...O?.settings.credit_limits ?? [],
1623
- ...O?.settings.trust_levels ?? []
1624
- ].map((e) => e.currency.toUpperCase()))].sort(), M = j.length ? j : Object.keys(p).sort(), N = J({
1615
+ }), [_, T] = L.useState(), { data: E } = z(o.merchantConfiguration()), D = [...new Set([
1616
+ ...E?.usage_billing?.currencies ?? [],
1617
+ ..._?.balances ?? [],
1618
+ ..._?.settings.credit_limits ?? [],
1619
+ ..._?.settings.trust_levels ?? []
1620
+ ].map((e) => e.currency.toUpperCase()))].sort(), O = D.length ? D : Object.keys(ne).sort(), k = G({
1625
1621
  defaultValues: { currency: "" },
1626
1622
  onSubmit: async ({ value: e }) => {
1627
- let t = e.currency || M[0];
1628
- if (!(!O || !t)) try {
1629
- let e = await ee.mutateAsync({
1630
- customerId: O.id,
1623
+ let t = e.currency || O[0];
1624
+ if (_ && t) try {
1625
+ let e = await p.mutateAsync({
1626
+ customerId: _.id,
1631
1627
  currency: t
1632
1628
  });
1633
- h({
1634
- customerID: O.id,
1629
+ f({
1630
+ customerID: _.id,
1635
1631
  ...e
1636
- }), D.reset();
1632
+ }), g.reset();
1637
1633
  } catch (e) {
1638
- r(e, "Lookup customer controls"), h(void 0);
1634
+ r(e, "Lookup customer controls"), f(void 0);
1639
1635
  }
1640
1636
  }
1641
- }), P = (e) => {
1642
- k(e), h(void 0), N.reset();
1637
+ }), A = (e) => {
1638
+ T(e), f(void 0), k.reset();
1643
1639
  };
1644
- return /* @__PURE__ */ K("div", {
1640
+ return /* @__PURE__ */ U("div", {
1645
1641
  className: "grid gap-10",
1646
- children: [/* @__PURE__ */ K("section", {
1642
+ children: [/* @__PURE__ */ U("section", {
1647
1643
  className: "grid gap-5",
1648
- children: [/* @__PURE__ */ K("div", {
1644
+ children: [/* @__PURE__ */ U("div", {
1649
1645
  className: "grid gap-1",
1650
- children: [/* @__PURE__ */ G("h2", {
1646
+ children: [/* @__PURE__ */ H("h2", {
1651
1647
  className: "text-base font-semibold",
1652
- children: /* @__PURE__ */ G(e, { id: "Customer lookup" })
1653
- }), /* @__PURE__ */ G("p", {
1648
+ children: /* @__PURE__ */ H(e, { id: "Customer lookup" })
1649
+ }), /* @__PURE__ */ H("p", {
1654
1650
  className: "text-sm text-muted-foreground",
1655
- children: /* @__PURE__ */ G(e, { id: "Find a customer by name or email, then pick a currency." })
1651
+ children: /* @__PURE__ */ H(e, { id: "Find a customer by name or email, then pick a currency." })
1656
1652
  })]
1657
- }), /* @__PURE__ */ K("div", {
1653
+ }), /* @__PURE__ */ U("div", {
1658
1654
  className: "grid gap-4 md:grid-cols-[minmax(0,1fr)_10rem_auto] md:items-end",
1659
- children: [/* @__PURE__ */ K("div", {
1655
+ children: [/* @__PURE__ */ U("div", {
1660
1656
  className: "grid gap-1.5",
1661
- children: [/* @__PURE__ */ G(I, { children: /* @__PURE__ */ G(e, { id: "Customer" }) }), O ? /* @__PURE__ */ K("span", {
1657
+ children: [/* @__PURE__ */ H(y, { children: /* @__PURE__ */ H(e, { id: "Customer" }) }), _ ? /* @__PURE__ */ U("span", {
1662
1658
  className: "inline-flex h-8 w-fit max-w-full items-center gap-1 rounded-md bg-muted pr-1 pl-2 text-sm font-medium",
1663
- children: [/* @__PURE__ */ G("span", {
1659
+ children: [/* @__PURE__ */ H("span", {
1664
1660
  className: "truncate",
1665
- children: g(O)
1666
- }), /* @__PURE__ */ G(o, {
1661
+ children: ie(_)
1662
+ }), /* @__PURE__ */ H(u, {
1667
1663
  variant: "ghost",
1668
1664
  size: "icon",
1669
1665
  className: "size-5",
1670
- "aria-label": u("Clear customer"),
1671
- onClick: () => P(void 0),
1672
- children: /* @__PURE__ */ G(q, {
1673
- icon: ue,
1666
+ "aria-label": s("Clear customer"),
1667
+ onClick: () => A(void 0),
1668
+ children: /* @__PURE__ */ H(W, {
1669
+ icon: pe,
1674
1670
  className: "size-3"
1675
1671
  })
1676
1672
  })]
1677
- }) : /* @__PURE__ */ G(oe, { onPick: P })]
1678
- }), /* @__PURE__ */ K("form", {
1673
+ }) : /* @__PURE__ */ H(j, { onPick: A })]
1674
+ }), /* @__PURE__ */ U("form", {
1679
1675
  onSubmit: (e) => {
1680
- e.preventDefault(), e.stopPropagation(), N.handleSubmit();
1676
+ e.preventDefault(), e.stopPropagation(), k.handleSubmit();
1681
1677
  },
1682
1678
  className: "contents",
1683
- children: [/* @__PURE__ */ G(N.Field, {
1679
+ children: [/* @__PURE__ */ H(k.Field, {
1684
1680
  name: "currency",
1685
- children: (e) => /* @__PURE__ */ G($, {
1686
- label: u("Currency"),
1681
+ children: (e) => /* @__PURE__ */ H($, {
1682
+ label: s("Currency"),
1687
1683
  id: "customer-controls-currency",
1688
- children: /* @__PURE__ */ K(T, {
1689
- items: M.map((e) => ({
1684
+ children: /* @__PURE__ */ U(w, {
1685
+ items: O.map((e) => ({
1690
1686
  value: e,
1691
1687
  label: e
1692
1688
  })),
1693
- value: e.state.value || M[0] || null,
1689
+ value: e.state.value || O[0] || null,
1694
1690
  onValueChange: (t) => e.handleChange(t ?? ""),
1695
- children: [/* @__PURE__ */ G(S, {
1696
- id: d("customer-controls-currency"),
1691
+ children: [/* @__PURE__ */ H(x, {
1692
+ id: l("customer-controls-currency"),
1697
1693
  className: "w-full",
1698
- disabled: M.length === 0,
1699
- children: /* @__PURE__ */ G(x, { placeholder: u(O ? "No currency yet" : "Pick a customer first") })
1700
- }), /* @__PURE__ */ G(C, { children: M.map((e) => /* @__PURE__ */ G(w, {
1694
+ disabled: O.length === 0,
1695
+ children: /* @__PURE__ */ H(b, { placeholder: s(_ ? "No currency yet" : "Pick a customer first") })
1696
+ }), /* @__PURE__ */ H(S, { children: O.map((e) => /* @__PURE__ */ H(C, {
1701
1697
  value: e,
1702
1698
  children: e
1703
1699
  }, e)) })]
1704
1700
  })
1705
1701
  })
1706
- }), /* @__PURE__ */ G(N.Subscribe, {
1702
+ }), /* @__PURE__ */ H(k.Subscribe, {
1707
1703
  selector: (e) => e.isSubmitting,
1708
- children: (e) => /* @__PURE__ */ G(o, {
1704
+ children: (e) => /* @__PURE__ */ H(u, {
1709
1705
  type: "submit",
1710
1706
  variant: "outline",
1711
- disabled: !O || !M.length || e,
1707
+ disabled: !_ || !O.length || e,
1712
1708
  children: e ? "Looking up…" : "Look up"
1713
1709
  })
1714
1710
  })]
1715
1711
  })]
1716
1712
  })]
1717
- }), f && /* @__PURE__ */ K("section", {
1713
+ }), d && /* @__PURE__ */ U("section", {
1718
1714
  className: "grid gap-5",
1719
1715
  children: [
1720
- /* @__PURE__ */ K("div", {
1716
+ /* @__PURE__ */ U("div", {
1721
1717
  className: "grid gap-1",
1722
- children: [/* @__PURE__ */ G("h2", {
1718
+ children: [/* @__PURE__ */ H("h2", {
1723
1719
  className: "text-base font-semibold",
1724
- children: /* @__PURE__ */ G(e, { id: "Credit and trust" })
1725
- }), /* @__PURE__ */ K("p", {
1720
+ children: /* @__PURE__ */ H(e, { id: "Credit and trust" })
1721
+ }), /* @__PURE__ */ U("p", {
1726
1722
  className: "text-sm text-muted-foreground",
1727
1723
  children: [
1728
- /* @__PURE__ */ G("span", {
1724
+ /* @__PURE__ */ H("span", {
1729
1725
  className: "font-mono text-xs break-all text-foreground",
1730
- children: f.customerID
1726
+ children: d.customerID
1731
1727
  }),
1732
1728
  " ",
1733
1729
  "· ",
1734
- f.currency.toUpperCase()
1730
+ d.currency.toUpperCase()
1735
1731
  ]
1736
1732
  })]
1737
1733
  }),
1738
- /* @__PURE__ */ K("dl", {
1734
+ /* @__PURE__ */ U("dl", {
1739
1735
  className: "grid gap-4",
1740
- children: [/* @__PURE__ */ G(X, {
1741
- label: u("Trust level"),
1742
- value: f.trustLevel || "Default"
1743
- }), /* @__PURE__ */ G(X, {
1744
- label: u("Credit limit"),
1745
- value: f.creditLimit === "0" ? "Off" : _(f.creditLimit, f.currency)
1736
+ children: [/* @__PURE__ */ H(Y, {
1737
+ label: s("Trust level"),
1738
+ value: d.trustLevel || "Default"
1739
+ }), /* @__PURE__ */ H(Y, {
1740
+ label: s("Credit limit"),
1741
+ value: d.creditLimit === "0" ? "Off" : ae(d.creditLimit, d.currency)
1746
1742
  })]
1747
1743
  }),
1748
- E && /* @__PURE__ */ G("form", {
1744
+ h && /* @__PURE__ */ H("form", {
1749
1745
  onSubmit: (e) => {
1750
- e.preventDefault(), e.stopPropagation(), D.handleSubmit();
1746
+ e.preventDefault(), e.stopPropagation(), g.handleSubmit();
1751
1747
  },
1752
- children: /* @__PURE__ */ G(Z, {
1753
- label: `New limit (${f.currency.toUpperCase()})`,
1748
+ children: /* @__PURE__ */ H(X, {
1749
+ label: `New limit (${d.currency.toUpperCase()})`,
1754
1750
  id: "customer-controls-limit",
1755
- children: /* @__PURE__ */ G(D.Field, {
1751
+ children: /* @__PURE__ */ H(g.Field, {
1756
1752
  name: "newLimit",
1757
1753
  validators: { onChange: ({ value: e }) => {
1758
- let t = m(f.currency), n = t === void 0 ? null : v(e, t);
1754
+ let t = P(d.currency), n = t === void 0 ? null : oe(e, t);
1759
1755
  return e !== "" && n !== null && !n.startsWith("-") ? void 0 : "Enter a valid amount";
1760
1756
  } },
1761
- children: (t) => /* @__PURE__ */ K("div", {
1757
+ children: (t) => /* @__PURE__ */ U("div", {
1762
1758
  className: "grid gap-1.5",
1763
1759
  children: [
1764
- /* @__PURE__ */ K("div", {
1760
+ /* @__PURE__ */ U("div", {
1765
1761
  className: "flex gap-2",
1766
- children: [/* @__PURE__ */ G(s, {
1767
- id: d("customer-controls-limit"),
1762
+ children: [/* @__PURE__ */ H(v, {
1763
+ id: l("customer-controls-limit"),
1768
1764
  placeholder: "0.00",
1769
1765
  type: "number",
1770
1766
  step: "any",
@@ -1773,23 +1769,23 @@ function Re() {
1773
1769
  onBlur: t.handleBlur,
1774
1770
  onChange: (e) => t.handleChange(e.target.value),
1775
1771
  "aria-invalid": t.state.meta.errors.length > 0
1776
- }), /* @__PURE__ */ G(D.Subscribe, {
1772
+ }), /* @__PURE__ */ H(g.Subscribe, {
1777
1773
  selector: (e) => [
1778
1774
  e.values.newLimit,
1779
1775
  e.canSubmit,
1780
1776
  e.isSubmitting
1781
1777
  ],
1782
- children: ([e, t, n]) => /* @__PURE__ */ G(o, {
1778
+ children: ([e, t, n]) => /* @__PURE__ */ H(u, {
1783
1779
  type: "submit",
1784
1780
  disabled: !e || !t || n,
1785
1781
  children: n ? "Updating…" : "Update"
1786
1782
  })
1787
1783
  })]
1788
1784
  }),
1789
- /* @__PURE__ */ G(b, { errors: t.state.meta.errors }),
1790
- /* @__PURE__ */ G("p", {
1785
+ /* @__PURE__ */ H(c, { errors: t.state.meta.errors }),
1786
+ /* @__PURE__ */ H("p", {
1791
1787
  className: "text-xs text-muted-foreground",
1792
- children: /* @__PURE__ */ G(e, { id: "Enter 0 to turn credit off." })
1788
+ children: /* @__PURE__ */ H(e, { id: "Enter 0 to turn credit off." })
1793
1789
  })
1794
1790
  ]
1795
1791
  })
@@ -1802,14 +1798,14 @@ function Re() {
1802
1798
  }
1803
1799
  function $({ label: e, id: n, hint: r, children: i }) {
1804
1800
  let { id: a } = t();
1805
- return /* @__PURE__ */ K("div", {
1801
+ return /* @__PURE__ */ U("div", {
1806
1802
  className: "grid gap-1.5",
1807
1803
  children: [
1808
- /* @__PURE__ */ G(I, {
1804
+ /* @__PURE__ */ H(y, {
1809
1805
  htmlFor: a(n),
1810
1806
  children: e
1811
1807
  }),
1812
- r ? /* @__PURE__ */ G("p", {
1808
+ r ? /* @__PURE__ */ H("p", {
1813
1809
  className: "text-[13px] text-muted-foreground",
1814
1810
  children: r
1815
1811
  }) : null,
@@ -1817,7 +1813,6 @@ function $({ label: e, id: n, hint: r, children: i }) {
1817
1813
  ]
1818
1814
  });
1819
1815
  }
1820
- //#endregion
1821
- export { Se as SettingsPage };
1816
+ export { Ce as SettingsPage };
1822
1817
 
1823
- //# sourceMappingURL=admin-settings-DscHu4ww.js.map
1818
+ //# sourceMappingURL=admin-settings-BrvNTJlM.js.map