@sachahjkl/backoffice 0.2.6 → 0.2.8

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 (289) hide show
  1. package/README.md +4 -2
  2. package/dist/demo-reset.cjs +14 -12
  3. package/dist/main.cjs +14 -12
  4. package/dist/migrate.cjs +8 -6
  5. package/dist/web/chunk-3MmwmyDh.js +1 -0
  6. package/dist/web/{chunk-DhkjPUn4.js → chunk-6-OG9zy0.js} +1 -1
  7. package/dist/web/chunk-6twPawwh.js +1 -0
  8. package/dist/web/{chunk-Bck0-DJt2.js → chunk-AE7J7wcH2.js} +1 -1
  9. package/dist/web/chunk-AZB0sMq_.js +1 -0
  10. package/dist/web/{chunk-CGfyD3XX2.js → chunk-B-2b7DJP.js} +1 -1
  11. package/dist/web/{chunk-BYjxXKZ4.js → chunk-B-XrDECw.js} +1 -1
  12. package/dist/web/chunk-B0Pr-tNT.js +1 -0
  13. package/dist/web/chunk-B1Kpw1um.js +1 -0
  14. package/dist/web/chunk-B2X87TB92.js +1 -0
  15. package/dist/web/chunk-B3fBH9Bt2.js +1 -0
  16. package/dist/web/chunk-B4KnJ14M2.js +1 -0
  17. package/dist/web/{chunk-DZgf7AIe.js → chunk-B4Vcwa9l.js} +1 -1
  18. package/dist/web/chunk-B4cAnuMM2.js +1 -0
  19. package/dist/web/chunk-B6mYbErA2.js +1 -0
  20. package/dist/web/chunk-B6trGhNK2.js +3 -0
  21. package/dist/web/chunk-B89j6ppg2.js +1 -0
  22. package/dist/web/chunk-B8tEtjeZ2.js +1 -0
  23. package/dist/web/chunk-BAYVC6mO2.js +1 -0
  24. package/dist/web/{chunk-MpUdRrak2.js → chunk-BCN3uL5S.js} +1 -1
  25. package/dist/web/chunk-BDmE_ZEe2.js +1 -0
  26. package/dist/web/{chunk-aW8Vltn22.js → chunk-BEYQDr-4.js} +1 -1
  27. package/dist/web/{chunk-CLHj5Ycx2.js → chunk-BEqSiNum.js} +1 -1
  28. package/dist/web/chunk-BHnrX0WJ.js +1 -0
  29. package/dist/web/chunk-BJ0yZa2G.js +1 -0
  30. package/dist/web/{chunk-Fc120Hsi2.js → chunk-BL3upDtA.js} +1 -1
  31. package/dist/web/{chunk-POMKwNf_.js → chunk-BMiFx1ci.js} +1 -1
  32. package/dist/web/{chunk--RuvStn6.js → chunk-BNS7t55s2.js} +1 -1
  33. package/dist/web/{chunk-D1wrPwB5.js → chunk-BO6tYuf8.js} +1 -1
  34. package/dist/web/{chunk-HmRGBt692.js → chunk-BPA6_4Vt.js} +1 -1
  35. package/dist/web/chunk-BRp_hGNk.js +1 -0
  36. package/dist/web/chunk-BSDpuA332.js +1 -0
  37. package/dist/web/chunk-BSKQUQGn.js +1 -0
  38. package/dist/web/{chunk-C0Ceu-vg.js → chunk-BTsDF4C6.js} +1 -1
  39. package/dist/web/{chunk-CDK48Khc.js → chunk-BVXF-FYe2.js} +1 -1
  40. package/dist/web/{chunk-BkvskoFt2.js → chunk-BWBbQ7HE2.js} +1 -1
  41. package/dist/web/{chunk-DTPC4JtI2.js → chunk-BYRTViky2.js} +1 -1
  42. package/dist/web/chunk-BZe5DpAa.js +1 -0
  43. package/dist/web/chunk-B_7K7EHr.js +1 -0
  44. package/dist/web/{chunk-D8xHm8jb2.js → chunk-B_pcpccF.js} +1 -1
  45. package/dist/web/{chunk-xTX16tt2.js → chunk-B_xlO55a2.js} +1 -1
  46. package/dist/web/{chunk-BKufCOYq.js → chunk-BfKP2Lf9.js} +1 -1
  47. package/dist/web/chunk-Bfm6z5eI2.js +1 -0
  48. package/dist/web/chunk-Bgl7kJgO2.js +1 -0
  49. package/dist/web/{chunk-enci06qG.js → chunk-Bh2Diab5.js} +1 -1
  50. package/dist/web/chunk-Bi9TDDm92.js +1 -0
  51. package/dist/web/chunk-Bit8ybhq.js +1 -0
  52. package/dist/web/chunk-BmfZmUis.js +1 -0
  53. package/dist/web/chunk-BpkPnQ2K.js +1 -0
  54. package/dist/web/chunk-Bq24rsxm2.js +1 -0
  55. package/dist/web/{chunk-C_QyIKvy.js → chunk-BqXhvdC0.js} +1 -1
  56. package/dist/web/{chunk-CCkaRRSy.js → chunk-Brog8aBK.js} +1 -1
  57. package/dist/web/{chunk-C-O6GrQC2.js → chunk-Bu0zsnWO.js} +1 -1
  58. package/dist/web/chunk-BurkPLm-2.js +1 -0
  59. package/dist/web/chunk-BuyEsqZU2.js +1 -0
  60. package/dist/web/{chunk-AJOoJgZJ.js → chunk-BwFjLr9D2.js} +1 -1
  61. package/dist/web/chunk-BwGtxWvC.js +1 -0
  62. package/dist/web/chunk-Bxrld4562.js +1 -0
  63. package/dist/web/{chunk-Bq2zV2_3.js → chunk-C01EdpX9.js} +1 -1
  64. package/dist/web/{chunk-Dl4EbYnM2.js → chunk-C0dwIYf0.js} +1 -1
  65. package/dist/web/{chunk-CfcCxe_k.js → chunk-C1BibNrz.js} +1 -1
  66. package/dist/web/{chunk-Dns8uMf32.js → chunk-C1gYDta1.js} +1 -1
  67. package/dist/web/{chunk-CubfQf-X2.js → chunk-C2i4N9dz.js} +1 -1
  68. package/dist/web/{chunk-DpLF2wJ62.js → chunk-C6M6lCrw2.js} +1 -1
  69. package/dist/web/{chunk-CK6Sjqig.js → chunk-C94w9Yq2.js} +1 -1
  70. package/dist/web/chunk-CA-xctoQ2.js +1 -0
  71. package/dist/web/chunk-CBcFgY8f2.js +1 -0
  72. package/dist/web/{chunk-DGbo0App2.js → chunk-CCItYukO.js} +1 -1
  73. package/dist/web/chunk-CGLHod2X2.js +1 -0
  74. package/dist/web/{chunk-Bfx7EEIR.js → chunk-CHUNlDss2.js} +1 -1
  75. package/dist/web/chunk-CJ10tvOm.js +1 -0
  76. package/dist/web/chunk-CJE3VBx5.js +1 -0
  77. package/dist/web/chunk-CL9McPWU.js +1 -0
  78. package/dist/web/chunk-CLzfpBlo2.js +1 -0
  79. package/dist/web/chunk-CM29tQ7z.js +1 -0
  80. package/dist/web/{chunk-Ck6cItVE2.js → chunk-CMC_2rEW.js} +1 -1
  81. package/dist/web/chunk-CMFGRRh02.js +1 -0
  82. package/dist/web/chunk-CO_ECkiv.js +1 -0
  83. package/dist/web/{chunk-D97UUzIx.js → chunk-CQvxhLmC2.js} +1 -1
  84. package/dist/web/chunk-CRDadWvH2.js +1 -0
  85. package/dist/web/chunk-CS69nNvh.js +1 -0
  86. package/dist/web/chunk-CXb1THnv2.js +1 -0
  87. package/dist/web/chunk-CZM1REvY.js +1 -0
  88. package/dist/web/chunk-C_4qOSvi2.js +1 -0
  89. package/dist/web/chunk-C_wLUbPJ2.js +1 -0
  90. package/dist/web/chunk-CdvoW0GI.js +1 -0
  91. package/dist/web/{chunk-CE9WzUCM.js → chunk-CecoTW2V.js} +1 -1
  92. package/dist/web/chunk-Cg6D1SkX2.js +1 -0
  93. package/dist/web/chunk-ChMWeKtk2.js +1 -0
  94. package/dist/web/chunk-CiQcqWHR.js +1 -0
  95. package/dist/web/chunk-Cjj8GJIb2.js +1 -0
  96. package/dist/web/{chunk-niXXbm7H.js → chunk-CkRw7h0_.js} +1 -1
  97. package/dist/web/{chunk-nC_XlFOG.js → chunk-Ckk2HUrT.js} +1 -1
  98. package/dist/web/chunk-Cl9ktebj.js +1 -0
  99. package/dist/web/chunk-ClviGHGr.js +1 -0
  100. package/dist/web/{chunk-BVszSMJC.js → chunk-Cm2UNqwE.js} +1 -1
  101. package/dist/web/chunk-CoUH4AfS2.js +1 -0
  102. package/dist/web/chunk-CpB8RIpf.js +1 -0
  103. package/dist/web/{chunk-BpZ7MSOP.js → chunk-CqreQVp_.js} +1 -1
  104. package/dist/web/{chunk-DEXzwHB0.js → chunk-CrwYH4R_2.js} +1 -1
  105. package/dist/web/{chunk-RIi7_iVg.js → chunk-CuVXI21d.js} +1 -1
  106. package/dist/web/{chunk-CvsVlcIU2.js → chunk-CwkgffnU.js} +1 -1
  107. package/dist/web/chunk-CxgCrZQl.js +1 -0
  108. package/dist/web/{chunk-DDCyjjcE.js → chunk-CyavDx9Z.js} +1 -1
  109. package/dist/web/{chunk-r6H-BfOd.js → chunk-D0MIkZdd2.js} +1 -1
  110. package/dist/web/{chunk-D5qmP2Wu.js → chunk-D8Ui_APT.js} +1 -1
  111. package/dist/web/{chunk-CPHUl7N2.js → chunk-D8VZRHVx.js} +1 -1
  112. package/dist/web/chunk-D9pT7T7E.js +1 -0
  113. package/dist/web/chunk-DD8ATIqT2.js +1 -0
  114. package/dist/web/chunk-DE4GLf5B.js +1 -0
  115. package/dist/web/{chunk-CkWd-yMn.js → chunk-DEYSMPA_2.js} +1 -1
  116. package/dist/web/chunk-DGXdMht2.js +1 -0
  117. package/dist/web/chunk-DJfwJBD6.js +1 -0
  118. package/dist/web/chunk-DJwuZjJg2.js +1 -0
  119. package/dist/web/chunk-DKDWoDXU.js +1 -0
  120. package/dist/web/chunk-DLH3RPM22.js +1 -0
  121. package/dist/web/{chunk-qKosqkwC.js → chunk-DQRDJtdh.js} +1 -1
  122. package/dist/web/chunk-DRY4w4Td.js +1 -0
  123. package/dist/web/chunk-DTRJLfq02.js +1 -0
  124. package/dist/web/{chunk-4ipZT9nT.js → chunk-DTj9NKPI.js} +1 -1
  125. package/dist/web/chunk-DVbkiKVh2.js +1 -0
  126. package/dist/web/chunk-DVu24rwt.js +1 -0
  127. package/dist/web/chunk-DWN606KF2.js +1 -0
  128. package/dist/web/chunk-DZvdrgcs2.js +1 -0
  129. package/dist/web/chunk-D_X9J-dz2.js +1 -0
  130. package/dist/web/{chunk-C0gTeWW62.js → chunk-DbL20WIB2.js} +1 -1
  131. package/dist/web/{chunk-Bb31fHqC2.js → chunk-DbcNGxba.js} +1 -1
  132. package/dist/web/chunk-Dc29tEgJ2.js +1 -0
  133. package/dist/web/{chunk-DboSVJMM.js → chunk-Dc8-8Og_.js} +1 -1
  134. package/dist/web/chunk-DdVUVFhX.js +1 -0
  135. package/dist/web/chunk-DeERUxjp.js +1 -0
  136. package/dist/web/chunk-Dfxr5EJU.js +1 -0
  137. package/dist/web/chunk-DgZvyF3s.js +1 -0
  138. package/dist/web/chunk-DgZxoBPB.js +1 -0
  139. package/dist/web/{chunk-DsaNNeZe.js → chunk-DhpMFMQw.js} +1 -1
  140. package/dist/web/{chunk-DOCau85G2.js → chunk-DlBNgzF8.js} +1 -1
  141. package/dist/web/{chunk-CVHqiS63.js → chunk-DlecOMbR.js} +1 -1
  142. package/dist/web/chunk-DnKyRGr_.js +1 -0
  143. package/dist/web/{chunk-DhLlQTD-2.js → chunk-DnYJfVdt.js} +1 -1
  144. package/dist/web/chunk-Dr_Uz6uR2.js +1 -0
  145. package/dist/web/{chunk-NDpjbcAr2.js → chunk-DvAE1Kdh2.js} +1 -1
  146. package/dist/web/chunk-DwSL7UNj.js +1 -0
  147. package/dist/web/{chunk-DZgMGE6C.js → chunk-Dyouu0xF.js} +1 -1
  148. package/dist/web/{chunk-CABvk97t2.js → chunk-DytjnC4n2.js} +1 -1
  149. package/dist/web/{chunk-CApvwK4D.js → chunk-Fo633neF.js} +1 -1
  150. package/dist/web/chunk-I2ekTEA32.js +1 -0
  151. package/dist/web/{chunk-D5MFwK9L.js → chunk-IrDYxRzS.js} +1 -1
  152. package/dist/web/chunk-JqPdfaO22.js +1 -0
  153. package/dist/web/chunk-LKcToPK62.js +1 -0
  154. package/dist/web/{chunk-CtmP6l7_2.js → chunk-Qweefwro2.js} +1 -1
  155. package/dist/web/chunk-U_cdbXaE2.js +1 -0
  156. package/dist/web/chunk-Ub2hjsmX.js +1 -0
  157. package/dist/web/chunk-WylMVh3d.js +1 -0
  158. package/dist/web/chunk-ZZuAWaLQ.js +1 -0
  159. package/dist/web/{chunk-C19Alcnx2.js → chunk-Zj43itle.js} +1 -1
  160. package/dist/web/chunk-ZoQD3eIP2.js +1 -0
  161. package/dist/web/chunk-ZxYSyP21.js +1 -0
  162. package/dist/web/{chunk-D_8jIApo.js → chunk-a58d-9ZM2.js} +1 -1
  163. package/dist/web/{chunk-pV57uiBu2.js → chunk-aGxrcUQJ2.js} +1 -1
  164. package/dist/web/chunk-bIBAi42v2.js +1 -0
  165. package/dist/web/{chunk-DIJSXeQC2.js → chunk-bQhJGrXj2.js} +1 -1
  166. package/dist/web/chunk-c57UHX0J.js +1 -0
  167. package/dist/web/chunk-eAm9Qkk4.js +1 -0
  168. package/dist/web/{chunk-WNYFaDlu2.js → chunk-f6C5Rz_B2.js} +1 -1
  169. package/dist/web/chunk-fLDt2Dc5.js +1 -0
  170. package/dist/web/{chunk-CmokTGIG.js → chunk-fY-2jgAh.js} +1 -1
  171. package/dist/web/{chunk-SZJG1lFa2.js → chunk-f_xeGTT7.js} +1 -1
  172. package/dist/web/chunk-fxkvCM0b.js +1 -0
  173. package/dist/web/{chunk-9X4vLcFh.js → chunk-k8jJDyGi.js} +1 -1
  174. package/dist/web/{chunk-DerJPaBw.js → chunk-mCmB-2Tr.js} +1 -1
  175. package/dist/web/{chunk-DXvlXoVT2.js → chunk-mqeSFXPY2.js} +1 -1
  176. package/dist/web/{chunk-D6k6pmdU.js → chunk-o83QpKCY.js} +1 -1
  177. package/dist/web/chunk-pffFf_PV2.js +1 -0
  178. package/dist/web/{chunk-XtjMOmku2.js → chunk-sAfSVia62.js} +1 -1
  179. package/dist/web/{chunk-CEJjSd8-2.js → chunk-xIoy5TmG2.js} +1 -1
  180. package/dist/web/{chunk-B8_dFe5w.js → chunk-xRsHYitB.js} +1 -1
  181. package/dist/web/index.csr.html +1 -1
  182. package/dist/web/{main-F7D3L737.js → main-LXYWXFW4.js} +2 -2
  183. package/package.json +1 -1
  184. package/dist/web/chunk-6jIo5mZ42.js +0 -1
  185. package/dist/web/chunk-9d_UD-MQ.js +0 -1
  186. package/dist/web/chunk-B0bNirg2.js +0 -1
  187. package/dist/web/chunk-B3OxeBLO2.js +0 -1
  188. package/dist/web/chunk-B5xzAYYx2.js +0 -1
  189. package/dist/web/chunk-B6Rml85x2.js +0 -1
  190. package/dist/web/chunk-B91VAo1J.js +0 -1
  191. package/dist/web/chunk-B9NV1rY62.js +0 -1
  192. package/dist/web/chunk-BAn0tBhX.js +0 -1
  193. package/dist/web/chunk-BGVaNZdj.js +0 -1
  194. package/dist/web/chunk-BHDXYrox.js +0 -1
  195. package/dist/web/chunk-BI9lIdFn.js +0 -1
  196. package/dist/web/chunk-BNksdK_D2.js +0 -1
  197. package/dist/web/chunk-BQ7WWH4L.js +0 -1
  198. package/dist/web/chunk-BQrmVphu2.js +0 -1
  199. package/dist/web/chunk-BR0demlX.js +0 -1
  200. package/dist/web/chunk-BT8KtCYG.js +0 -1
  201. package/dist/web/chunk-BZZJ287h.js +0 -1
  202. package/dist/web/chunk-BcUjdID-.js +0 -1
  203. package/dist/web/chunk-Bf3eV_su2.js +0 -1
  204. package/dist/web/chunk-BfSewUhY.js +0 -1
  205. package/dist/web/chunk-Bi4Jixry2.js +0 -1
  206. package/dist/web/chunk-BiECfDS7.js +0 -1
  207. package/dist/web/chunk-Bj7Oze2U2.js +0 -1
  208. package/dist/web/chunk-Bjo6eVnk.js +0 -1
  209. package/dist/web/chunk-Bn46cQyx.js +0 -1
  210. package/dist/web/chunk-Bn6RkvPA2.js +0 -1
  211. package/dist/web/chunk-Bsy3r41y2.js +0 -1
  212. package/dist/web/chunk-By2EFyNM.js +0 -1
  213. package/dist/web/chunk-CCqlW8pS2.js +0 -3
  214. package/dist/web/chunk-CCr_R2Cg.js +0 -1
  215. package/dist/web/chunk-CDS6LjBz2.js +0 -1
  216. package/dist/web/chunk-CG4Kbo1n2.js +0 -1
  217. package/dist/web/chunk-CKFB1V-p2.js +0 -1
  218. package/dist/web/chunk-CL02A9wI.js +0 -1
  219. package/dist/web/chunk-CLZ5xsSQ2.js +0 -1
  220. package/dist/web/chunk-CMvRZBpn.js +0 -1
  221. package/dist/web/chunk-CNfmNEak.js +0 -1
  222. package/dist/web/chunk-COTrF1xY2.js +0 -1
  223. package/dist/web/chunk-COXN76fu2.js +0 -1
  224. package/dist/web/chunk-CUqj_Bxs2.js +0 -1
  225. package/dist/web/chunk-CV_fLVFT.js +0 -1
  226. package/dist/web/chunk-CYGyIy7J.js +0 -1
  227. package/dist/web/chunk-CYRUKYKv2.js +0 -1
  228. package/dist/web/chunk-Ca3lwqEF.js +0 -1
  229. package/dist/web/chunk-CaJrmM9V.js +0 -1
  230. package/dist/web/chunk-CpXqQPuw.js +0 -1
  231. package/dist/web/chunk-CuepVIkm2.js +0 -1
  232. package/dist/web/chunk-CvMAjyvr2.js +0 -1
  233. package/dist/web/chunk-CwzCbuXH.js +0 -1
  234. package/dist/web/chunk-Cx07K71K.js +0 -1
  235. package/dist/web/chunk-D-VHaopx.js +0 -1
  236. package/dist/web/chunk-D1DvlGbP.js +0 -1
  237. package/dist/web/chunk-D3XjW5Cm.js +0 -1
  238. package/dist/web/chunk-D8kEdb5y2.js +0 -1
  239. package/dist/web/chunk-D8t0s8LD.js +0 -1
  240. package/dist/web/chunk-DB6sOjsn2.js +0 -1
  241. package/dist/web/chunk-DIBFSF2Z.js +0 -1
  242. package/dist/web/chunk-DKlxu0GP2.js +0 -1
  243. package/dist/web/chunk-DM4Wc9U7.js +0 -1
  244. package/dist/web/chunk-DM5aibnW.js +0 -1
  245. package/dist/web/chunk-DMXgU6Nc2.js +0 -1
  246. package/dist/web/chunk-DMskLhpk2.js +0 -1
  247. package/dist/web/chunk-DOinRyX_2.js +0 -1
  248. package/dist/web/chunk-DQp-2GVv.js +0 -1
  249. package/dist/web/chunk-DQr_9Q6T.js +0 -1
  250. package/dist/web/chunk-DSpA-ZPx.js +0 -1
  251. package/dist/web/chunk-DURq7J8U2.js +0 -1
  252. package/dist/web/chunk-DVJ4YZuU.js +0 -1
  253. package/dist/web/chunk-DVyDnsGh.js +0 -1
  254. package/dist/web/chunk-D_vyhgGx.js +0 -1
  255. package/dist/web/chunk-Db2zQ-8C.js +0 -1
  256. package/dist/web/chunk-DdOc1fs-.js +0 -1
  257. package/dist/web/chunk-DddDKWSn2.js +0 -1
  258. package/dist/web/chunk-Dh86w63y.js +0 -1
  259. package/dist/web/chunk-Di9FA_QV.js +0 -1
  260. package/dist/web/chunk-DjwvqY3z2.js +0 -1
  261. package/dist/web/chunk-Dl4V93zm2.js +0 -1
  262. package/dist/web/chunk-Dnzjseqf2.js +0 -1
  263. package/dist/web/chunk-DpI44v1z.js +0 -1
  264. package/dist/web/chunk-Dqhs2Pyw2.js +0 -1
  265. package/dist/web/chunk-DubWLqvO.js +0 -1
  266. package/dist/web/chunk-IlM3eTPp2.js +0 -1
  267. package/dist/web/chunk-IzGdqlW82.js +0 -1
  268. package/dist/web/chunk-P1du2kWg2.js +0 -1
  269. package/dist/web/chunk-PqGGk0JD.js +0 -1
  270. package/dist/web/chunk-XvyWOb2Q.js +0 -1
  271. package/dist/web/chunk-ZBDWcE362.js +0 -1
  272. package/dist/web/chunk-ZcJhJsoo.js +0 -1
  273. package/dist/web/chunk-a_Va_Nj7.js +0 -1
  274. package/dist/web/chunk-fYJ7OBkh.js +0 -1
  275. package/dist/web/chunk-k6TIcaIA.js +0 -1
  276. package/dist/web/chunk-owvOEsA9.js +0 -1
  277. package/dist/web/chunk-scbWWgLx2.js +0 -1
  278. package/dist/web/chunk-tDREPM-0.js +0 -1
  279. package/dist/web/chunk-y0Vyi0HZ.js +0 -1
  280. package/dist/web/chunk-yfBrkklv.js +0 -1
  281. /package/dist/web/{chunk-1ErswIDf.js → chunk-1ErswIDf2.js} +0 -0
  282. /package/dist/web/{chunk-CARNiCDb2.js → chunk-CARNiCDb.js} +0 -0
  283. /package/dist/web/{chunk-CGo7Fepz.js → chunk-CGo7Fepz2.js} +0 -0
  284. /package/dist/web/{chunk-CKxU-VJf.js → chunk-CKxU-VJf2.js} +0 -0
  285. /package/dist/web/{chunk-CP-AnFGa2.js → chunk-CP-AnFGa.js} +0 -0
  286. /package/dist/web/{chunk-CXHCUTDs.js → chunk-CXHCUTDs2.js} +0 -0
  287. /package/dist/web/{chunk-CczD0yXn.js → chunk-CczD0yXn2.js} +0 -0
  288. /package/dist/web/{chunk-CtcsJTAS2.js → chunk-CtcsJTAS.js} +0 -0
  289. /package/dist/web/{chunk-WJWN7A_V2.js → chunk-WJWN7A_V.js} +0 -0
@@ -1 +1 @@
1
- import{t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,H as JD,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Tn as fd,Wn as kS,Wr as y_,dr as pe,lt as OS,o as A,pr as qS,rr as nv,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N}from"./main-F7D3L737.js";import{Ci as wt}from"./chunk-BAe_07VM.js";import{_ as te,h as pi,m as is}from"./chunk-BzUDWIzm.js";function V(a,i){if(a&1){let t=zS();Us(0,`label`,3),y_(1),Us(2,`input`,7),Gy(`input`,function(r){Ip(t);return wp(qS().secret.set(r.target.value))}),fd()()}if(a&2){let t=qS();ZC(),vd(` `,t.data.secretLabel,` `),ZC(),Fy(`value`,t.secret())}}function F(a,i){if(a&1){let t=zS();Us(0,`label`,3),y_(1),Us(2,`input`,8),Gy(`input`,function(r){Ip(t);return wp(qS().secret.set(r.target.value))}),fd()()}if(a&2){let t=qS();ZC(),vd(` `,t.data.acknowledgementLabel,` `),ZC(),Fy(`value`,t.secret())}}var p=class a{i18n=g(Ie);data=g(pi);dialog=g(te);secret=Ke(``);confirm(i){if(i.preventDefault(),this.data.expectedAcknowledgement!==void 0){this.secret()===this.data.expectedAcknowledgement&&this.dialog.close(!0);return}this.dialog.close(this.data.secretLabel===void 0?!0:this.secret())}static ɵfac=function(t){return new(t||a)};static ɵcmp=Fb({type:a,selectors:[[`app-confirmation-dialog`]],decls:12,vars:8,consts:[[3,`submit`],[`id`,`confirmation-title`],[`id`,`confirmation-message`],[1,`confirmation-secret`],[1,`confirmation-actions`],[`appButton`,``,`type`,`button`,`data-confirmation-cancel`,``,3,`click`],[`appButton`,``,`type`,`submit`,3,`variant`,`disabled`],[`data-confirmation-secret`,``,`type`,`password`,`autocomplete`,`current-password`,1,`input`,3,`input`,`value`],[`data-confirmation-acknowledgement`,``,`type`,`text`,`autocomplete`,`off`,1,`input`,3,`input`,`value`]],template:function(t,e){t&1&&(Us(0,`form`,0),Gy(`submit`,function(n){return e.confirm(n)}),Us(1,`h2`,1),y_(2),fd(),Us(3,`p`,2),y_(4),fd(),OS(5,V,3,2,`label`,3),OS(6,F,3,2,`label`,3),Us(7,`div`,4)(8,`button`,5),Gy(`click`,function(){return e.dialog.close(!1)}),y_(9),fd(),Us(10,`button`,6),y_(11),fd()()()),t&2&&(ZC(2),nv(e.i18n.t(`confirmation.title`)),ZC(2),nv(e.data.message),ZC(),kS(e.data.secretLabel?5:-1),ZC(),kS(e.data.acknowledgementLabel?6:-1),ZC(3),vd(` `,e.i18n.t(`confirmation.cancel`),` `),ZC(),Fy(`variant`,e.data.variant??`primary`)(`disabled`,e.data.secretLabel!==void 0&&e.secret()===``||e.data.expectedAcknowledgement!==void 0&&e.secret()!==e.data.expectedAcknowledgement),ZC(),vd(` `,e.data.acceptLabel??e.i18n.t(`confirmation.accept`),` `))},dependencies:[N],styles:[`[_nghost-%COMP%]{display:block;max-height:calc(100dvh - 2rem);overflow:auto;overscroll-behavior:contain;padding:var(--%NS%space-6);border-radius:var(--%NS%radius-md);background:var(--%NS%color-surface);color:var(--%NS%color-ink);box-shadow:var(--%NS%shadow-page)}h2[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-lg)}p[_ngcontent-%COMP%]{margin-block:var(--%NS%space-4) 0;overflow-wrap:anywhere;white-space:pre-line}.confirmation-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--%NS%space-3);margin-block-start:var(--%NS%space-6)}.confirmation-secret[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2);margin-block-start:var(--%NS%space-4)}button[_ngcontent-%COMP%]{min-height:2.75rem}`]})};var P=class a{dialogs=g(is);destroyRef=g(pe);active;constructor(){this.destroyRef.onDestroy(()=>this.active?.close(!1))}async request(i,t={}){if(this.active!==void 0||this.destroyRef.destroyed)return!1;let e=this.dialogs.open(p,{data:l({message:i},t),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-cancel]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`30rem`,maxWidth:`calc(100vw - 2rem)`});this.active=e;try{return await JD(e.closed,{defaultValue:!1})===!0}finally{this.active=void 0}}async requestSecret(i,t,e={}){if(this.active!==void 0||this.destroyRef.destroyed)return;let r=this.dialogs.open(p,{data:l({message:i,secretLabel:t},e),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-secret]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`30rem`,maxWidth:`calc(100vw - 2rem)`});this.active=r;try{let n=await JD(r.closed,{defaultValue:!1});return wt.isString(n)&&n.length>0?n:void 0}finally{this.active=void 0}}async requestAcknowledgement(i,t,e,r={}){if(this.active!==void 0||this.destroyRef.destroyed)return!1;let n=this.dialogs.open(p,{data:l({message:i,acknowledgementLabel:t,expectedAcknowledgement:e},r),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-acknowledgement]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`34rem`,maxWidth:`calc(100vw - 2rem)`});this.active=n;try{return await JD(n.closed,{defaultValue:!1})===!0}finally{this.active=void 0}}static ɵfac=function(t){return new(t||a)};static ɵprov=A({token:a,factory:a.ɵfac,providedIn:`root`})};export{P as t};
1
+ import{t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,H as JD,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Tn as fd,Wn as kS,Wr as y_,dr as pe,lt as OS,o as A,pr as qS,rr as nv,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N}from"./main-LXYWXFW4.js";import{Ci as wt}from"./chunk-BAe_07VM.js";import{_ as te,h as pi,m as is}from"./chunk-BzUDWIzm.js";function V(a,i){if(a&1){let t=zS();Us(0,`label`,3),y_(1),Us(2,`input`,7),Gy(`input`,function(r){Ip(t);return wp(qS().secret.set(r.target.value))}),fd()()}if(a&2){let t=qS();ZC(),vd(` `,t.data.secretLabel,` `),ZC(),Fy(`value`,t.secret())}}function F(a,i){if(a&1){let t=zS();Us(0,`label`,3),y_(1),Us(2,`input`,8),Gy(`input`,function(r){Ip(t);return wp(qS().secret.set(r.target.value))}),fd()()}if(a&2){let t=qS();ZC(),vd(` `,t.data.acknowledgementLabel,` `),ZC(),Fy(`value`,t.secret())}}var p=class a{i18n=g(Ie);data=g(pi);dialog=g(te);secret=Ke(``);confirm(i){if(i.preventDefault(),this.data.expectedAcknowledgement!==void 0){this.secret()===this.data.expectedAcknowledgement&&this.dialog.close(!0);return}this.dialog.close(this.data.secretLabel===void 0?!0:this.secret())}static ɵfac=function(t){return new(t||a)};static ɵcmp=Fb({type:a,selectors:[[`app-confirmation-dialog`]],decls:12,vars:8,consts:[[3,`submit`],[`id`,`confirmation-title`],[`id`,`confirmation-message`],[1,`confirmation-secret`],[1,`confirmation-actions`],[`appButton`,``,`type`,`button`,`data-confirmation-cancel`,``,3,`click`],[`appButton`,``,`type`,`submit`,3,`variant`,`disabled`],[`data-confirmation-secret`,``,`type`,`password`,`autocomplete`,`current-password`,1,`input`,3,`input`,`value`],[`data-confirmation-acknowledgement`,``,`type`,`text`,`autocomplete`,`off`,1,`input`,3,`input`,`value`]],template:function(t,e){t&1&&(Us(0,`form`,0),Gy(`submit`,function(n){return e.confirm(n)}),Us(1,`h2`,1),y_(2),fd(),Us(3,`p`,2),y_(4),fd(),OS(5,V,3,2,`label`,3),OS(6,F,3,2,`label`,3),Us(7,`div`,4)(8,`button`,5),Gy(`click`,function(){return e.dialog.close(!1)}),y_(9),fd(),Us(10,`button`,6),y_(11),fd()()()),t&2&&(ZC(2),nv(e.i18n.t(`confirmation.title`)),ZC(2),nv(e.data.message),ZC(),kS(e.data.secretLabel?5:-1),ZC(),kS(e.data.acknowledgementLabel?6:-1),ZC(3),vd(` `,e.i18n.t(`confirmation.cancel`),` `),ZC(),Fy(`variant`,e.data.variant??`primary`)(`disabled`,e.data.secretLabel!==void 0&&e.secret()===``||e.data.expectedAcknowledgement!==void 0&&e.secret()!==e.data.expectedAcknowledgement),ZC(),vd(` `,e.data.acceptLabel??e.i18n.t(`confirmation.accept`),` `))},dependencies:[N],styles:[`[_nghost-%COMP%]{display:block;max-height:calc(100dvh - 2rem);overflow:auto;overscroll-behavior:contain;padding:var(--%NS%space-6);border-radius:var(--%NS%radius-md);background:var(--%NS%color-surface);color:var(--%NS%color-ink);box-shadow:var(--%NS%shadow-page)}h2[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-lg)}p[_ngcontent-%COMP%]{margin-block:var(--%NS%space-4) 0;overflow-wrap:anywhere;white-space:pre-line}.confirmation-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--%NS%space-3);margin-block-start:var(--%NS%space-6)}.confirmation-secret[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2);margin-block-start:var(--%NS%space-4)}button[_ngcontent-%COMP%]{min-height:2.75rem}`]})};var P=class a{dialogs=g(is);destroyRef=g(pe);active;constructor(){this.destroyRef.onDestroy(()=>this.active?.close(!1))}async request(i,t={}){if(this.active!==void 0||this.destroyRef.destroyed)return!1;let e=this.dialogs.open(p,{data:l({message:i},t),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-cancel]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`30rem`,maxWidth:`calc(100vw - 2rem)`});this.active=e;try{return await JD(e.closed,{defaultValue:!1})===!0}finally{this.active=void 0}}async requestSecret(i,t,e={}){if(this.active!==void 0||this.destroyRef.destroyed)return;let r=this.dialogs.open(p,{data:l({message:i,secretLabel:t},e),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-secret]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`30rem`,maxWidth:`calc(100vw - 2rem)`});this.active=r;try{let n=await JD(r.closed,{defaultValue:!1});return wt.isString(n)&&n.length>0?n:void 0}finally{this.active=void 0}}async requestAcknowledgement(i,t,e,r={}){if(this.active!==void 0||this.destroyRef.destroyed)return!1;let n=this.dialogs.open(p,{data:l({message:i,acknowledgementLabel:t,expectedAcknowledgement:e},r),role:`alertdialog`,ariaModal:!0,ariaLabelledBy:`confirmation-title`,ariaDescribedBy:`confirmation-message`,autoFocus:`[data-confirmation-acknowledgement]`,restoreFocus:!0,hasBackdrop:!0,disableClose:!1,disableAnimations:!0,width:`34rem`,maxWidth:`calc(100vw - 2rem)`});this.active=n;try{return await JD(n.closed,{defaultValue:!1})===!0}finally{this.active=void 0}}static ɵfac=function(t){return new(t||a)};static ɵprov=A({token:a,factory:a.ɵfac,providedIn:`root`})};export{P as t};
@@ -1 +1 @@
1
- import{Dn as g,H as JD,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{C as BC,lo as cr,yn as Kd}from"./chunk-D5qmP2Wu.js";var c=class u{http=g(OD);async list(){return wu.decodeUnknownSync(Kd)(await JD(this.http.get(`/api/suppliers`)))}async get(e){return m(this.http.get(`/api/suppliers/${e}`),cr,BC,`supplier.error`)}async create(e){return m(this.http.post(`/api/suppliers`,e),cr,BC,`supplier.error`)}async update(e,i){return m(this.http.put(`/api/suppliers/${e}`,i),cr,BC,`supplier.error`)}async archive(e){return m(this.http.post(`/api/suppliers/${e}/archive`,void 0),cr,BC,`supplier.error`)}async reactivate(e){return m(this.http.post(`/api/suppliers/${e}/reactivate`,void 0),cr,BC,`supplier.error`)}static ɵfac=function(i){return new(i||u)};static ɵprov=A({token:u,factory:u.ɵfac,providedIn:`root`})};export{c as t};
1
+ import{Dn as g,H as JD,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{C as BC,lo as cr,yn as Kd}from"./chunk-D8Ui_APT.js";var c=class u{http=g(OD);async list(){return wu.decodeUnknownSync(Kd)(await JD(this.http.get(`/api/suppliers`)))}async get(e){return m(this.http.get(`/api/suppliers/${e}`),cr,BC,`supplier.error`)}async create(e){return m(this.http.post(`/api/suppliers`,e),cr,BC,`supplier.error`)}async update(e,i){return m(this.http.put(`/api/suppliers/${e}`,i),cr,BC,`supplier.error`)}async archive(e){return m(this.http.post(`/api/suppliers/${e}/archive`,void 0),cr,BC,`supplier.error`)}async reactivate(e){return m(this.http.post(`/api/suppliers/${e}/reactivate`,void 0),cr,BC,`supplier.error`)}static ɵfac=function(i){return new(i||u)};static ɵprov=A({token:u,factory:u.ɵfac,providedIn:`root`})};export{c as t};
@@ -0,0 +1 @@
1
+ import{$ as MH,$t as ZC,A as Gy,D as Fy,Dn as g,Dr as t_,Ir as wp,It as Us,Jr as zS,Tn as fd,V as Iy,nt as NH,pr as qS,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie}from"./main-LXYWXFW4.js";import{t as Fe}from"./chunk-CO_ECkiv.js";import{n as b,t as Z}from"./chunk-DytjnC4n2.js";import{i as U,r as Q,t as $}from"./chunk-B6trGhNK2.js";function N(r,u){if(r&1){let t=zS();Us(0,`app-filter-choice`,5),Gy(`committed`,function(c){Ip(t);let s=qS(),S=t_(3);return s.filterChange.emit(c),wp(S.close())}),fd()}if(r&2){let t=qS();Fy(`label`,t.i18n.t(`listWorkspace.searchChoices`))(`emptyLabel`,t.i18n.t(`listWorkspace.noChoices`))(`options`,t.filterOptions())(`value`,t.filter())(`disabled`,t.pending())}}var M=class r{i18n=g(Ie);query=NH.required();filter=NH.required();filterLabel=NH.required();filterSummary=NH.required();filterOptions=NH.required();columns=NH.required();rows=NH.required();filename=NH.required();pending=NH(!1);queryChange=MH();filterChange=MH();static ɵfac=function(t){return new(t||r)};static ɵcmp=Fb({type:r,selectors:[[`app-workspace-table-tools`]],hostAttrs:[2,`display`,`contents`],inputs:{query:[1,`query`],filter:[1,`filter`],filterLabel:[1,`filterLabel`],filterSummary:[1,`filterSummary`],filterOptions:[1,`filterOptions`],columns:[1,`columns`],rows:[1,`rows`],filename:[1,`filename`],pending:[1,`pending`]},outputs:{queryChange:`queryChange`,filterChange:`filterChange`},decls:6,vars:17,consts:[[`menu`,``],[`listSearch`,``,3,`valueChange`,`label`,`value`,`disabled`],[`listFilters`,``,3,`label`,`closeLabel`,`backLabel`,`activeCount`,`disabled`],[`appFilterPanel`,``,3,`label`,`summary`],[`listActions`,``,3,`columns`,`rows`,`filename`,`label`,`emptyHint`,`pendingHint`,`pending`],[3,`committed`,`label`,`emptyLabel`,`options`,`value`,`disabled`]],template:function(t,e){t&1&&(Us(0,`app-list-toolbar`)(1,`app-list-search`,1),Gy(`valueChange`,function(s){return e.queryChange.emit(s)}),fd(),Us(2,`app-filter-menu`,2,0),Iy(4,N,1,5,`ng-template`,3),fd(),Py(5,`app-table-export`,4),fd()),t&2&&(ZC(),Fy(`label`,e.i18n.t(`listWorkspace.search`))(`value`,e.query())(`disabled`,e.pending()),ZC(),Fy(`label`,e.i18n.t(`listWorkspace.filters`))(`closeLabel`,e.i18n.t(`listWorkspace.closeFilters`))(`backLabel`,e.i18n.t(`listWorkspace.backFilters`))(`activeCount`,e.filter()===`all`?0:1)(`disabled`,e.pending()),ZC(2),Fy(`label`,e.filterLabel())(`summary`,e.filterSummary()),ZC(),Fy(`columns`,e.columns())(`rows`,e.rows())(`filename`,e.filename())(`label`,e.i18n.t(`listWorkspace.exportCsv`))(`emptyHint`,e.i18n.t(`listWorkspace.exportEmpty`))(`pendingHint`,e.i18n.t(`listWorkspace.exportPending`))(`pending`,e.pending()))},dependencies:[Fe,Z,b,Q,U,$],encapsulation:2})};export{M as t};
@@ -0,0 +1 @@
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,Dr as t_,E as Ft$1,Gn as k_,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Rn as jS,Tn as fd,V as Iy,Wn as kS,Wr as y_,X as LS,dr as pe,ft as Ol,l as A_,lt as OS,mr as qT,pr as qS,qn as ky,rr as nv,tn as ZT,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{S as gr,T as ue,c as O,l as r,m as Ie,o as U,r as N,v as Dt$1,y as G}from"./main-LXYWXFW4.js";import"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import"./chunk-D8Ui_APT.js";import{t as c}from"./chunk-Bh2Diab5.js";import{t as g$1}from"./chunk-B56nz2lI.js";import{t as k}from"./chunk-IrDYxRzS.js";import{t as d}from"./chunk-CfwFJLFh.js";import{t as f}from"./chunk-CuVXI21d.js";import{t as h}from"./chunk-CCItYukO.js";import"./chunk-BzUDWIzm.js";import"./chunk-DhpMFMQw.js";import{t as l$1}from"./chunk-Cm2UNqwE.js";import{t as l$2}from"./chunk-C0dwIYf0.js";import"./chunk-CP-AnFGa.js";import"./chunk-Bit8ybhq.js";import{t as Ft$2}from"./chunk-DjewtV43.js";import"./chunk-DwSL7UNj.js";import"./chunk-CReShp-B.js";import{d as nr,h as yn}from"./chunk-CSkyOfSg.js";import{t as Fe}from"./chunk-CO_ECkiv.js";import"./chunk-CczD0yXn2.js";import"./chunk-B4KnJ14M2.js";import{n as b,t as Z}from"./chunk-DytjnC4n2.js";import"./chunk-CXHCUTDs2.js";import{i as U$1,n as B,r as Q,t as $}from"./chunk-B6trGhNK2.js";import{n as m$1,t as d$1}from"./chunk-cTGENC4T2.js";import{t as D}from"./chunk-BwFjLr9D2.js";import{t as u}from"./chunk-CHUNlDss2.js";import{t}from"./chunk-CKxU-VJf2.js";import{t as y}from"./chunk-B_xlO55a2.js";import{t as a}from"./chunk-WJWN7A_V.js";import{n as p,r as u$1}from"./chunk-CP9GxcYV.js";var vt=i=>({count:i});var kt=i=>[`/clients`,i];var St=(i,e)=>e.client.id;function wt(i,e){if(i&1&&(Us(0,`a`,7),y_(1),fd()),i&2){let t=qS();ZC(),nv(t.i18n.t(`backOffice.clients.create`))}}function Tt(i,e){if(i&1){let t=zS();Us(0,`app-filter-choice`,16),Gy(`committed`,function(r){Ip(t),qS();let m=t_(4);return qS().setFilter(`country`,r),wp(m.close())}),fd()}if(i&2){let t=qS(2);Fy(`label`,t.i18n.t(`listWorkspace.searchChoices`))(`emptyLabel`,t.i18n.t(`listWorkspace.noChoices`))(`options`,t.countryOptions())(`value`,t.filters.country().value())}}function Ft(i,e){if(i&1){let t=zS();Us(0,`div`,17)(1,`app-filter-choice`,16),Gy(`committed`,function(r){Ip(t),qS();let m=t_(4);return qS().setFilter(`contact`,r),wp(m.close())}),fd(),Us(2,`p`,18),y_(3),fd()()}if(i&2){let t=qS(2);ky(`aria-label`,t.i18n.t(`clientsWorkspace.contactFilter`)),ZC(),Fy(`label`,t.i18n.t(`listWorkspace.searchChoices`))(`emptyLabel`,t.i18n.t(`listWorkspace.noChoices`))(`options`,t.contactOptions())(`value`,t.filters.contact().value()),ZC(2),vd(` `,t.i18n.t(`clientsWorkspace.contactHint`),` `)}}function Vt(i,e){if(i&1){let t=zS();Us(0,`button`,21),Gy(`click`,function(){Ip(t);return wp(qS(3).setFilter(`search`,``))}),fd()}if(i&2)Fy(`label`,qS(3).filters.search().value())}function Ot(i,e){if(i&1){let t=zS();Us(0,`button`,21),Gy(`click`,function(){Ip(t);return wp(qS(3).setFilter(`country`,``))}),fd()}if(i&2)Fy(`label`,qS(3).filters.country().value())}function Et(i,e){if(i&1){let t=zS();Us(0,`button`,21),Gy(`click`,function(){Ip(t);return wp(qS(3).setFilter(`contact`,`all`))}),fd()}if(i&2)Fy(`label`,qS(3).i18n.t(`clientsWorkspace.contactIncomplete`))}function Wt(i,e){if(i&1){let t=zS();Us(0,`div`,13),OS(1,Vt,1,1,`button`,19),OS(2,Ot,1,1,`button`,19),OS(3,Et,1,1,`button`,19),Us(4,`button`,20),Gy(`click`,function(){Ip(t);return wp(qS(2).resetFilters())}),y_(5),fd()()}if(i&2){let t=qS(2);ZC(),kS(t.filters.search().value()?1:-1),ZC(),kS(t.filters.country().value()?2:-1),ZC(),kS(t.filters.contact().value()===`incomplete`?3:-1),ZC(2),vd(` `,t.i18n.t(`clientsWorkspace.resetFilters`),` `)}}function Mt(i,e){if(i&1&&(Us(0,`p`,14),y_(1),fd()),i&2){let t=qS(2);ZC(),nv(t.i18n.t(`backOffice.clients.loading`))}}function Dt(i,e){if(i&1){let t=zS();Us(0,`div`,15)(1,`p`,22),y_(2),fd(),Us(3,`button`,20),Gy(`click`,function(){Ip(t);return wp(qS(2).load())}),y_(4),fd()()}if(i&2){let t=qS(2);ZC(2),nv(t.i18n.t(`client.error`)),ZC(2),vd(` `,t.i18n.t(`backOffice.dashboard.retry`),` `)}}function It(i,e){if(i&1){let t=zS();Us(0,`button`,28),Gy(`click`,function(){Ip(t);return wp(qS(4).resetFilters())}),y_(1),fd()}if(i&2){let t=qS(4);ZC(),vd(` `,t.i18n.t(`clientsWorkspace.resetFilters`),` `)}}function Nt(i,e){if(i&1&&(Us(0,`a`,27),y_(1),fd()),i&2){let t=qS(5);ZC(),nv(t.i18n.t(`backOffice.clients.create`))}}function Pt(i,e){i&1&&Iy(0,Nt,2,1,`a`,29),i&2&&Fy(`appCan`,`client.create`)}function Lt(i,e){if(i&1&&(Us(0,`app-empty-state`,23)(1,`p`),y_(2),fd(),OS(3,It,2,1,`button`,26)(4,Pt,1,1,`a`,27),fd()),i&2){let t=qS(3);Fy(`title`,t.i18n.t(t.filtered()?`clientsWorkspace.noMatches`:`backOffice.clients.empty`)),ZC(2),vd(` `,t.i18n.t(t.filtered()?`clientsWorkspace.changeSearch`:`clientsWorkspace.emptyIntro`),` `),ZC(),kS(t.filtered()?3:4)}}function At(i,e){if(i&1&&(Us(0,`tr`)(1,`th`,34)(2,`div`,35),Py(3,`app-entity-icon`,36),Us(4,`a`,37),y_(5),fd()()(),Us(6,`td`)(7,`span`,38),y_(8),fd()(),Us(9,`td`),y_(10),fd(),Us(11,`td`),y_(12),fd(),Us(13,`td`)(14,`time`,39),y_(15),fd()(),Us(16,`td`)(17,`span`,40),y_(18),fd()()()),i&2){let t=e.$implicit,n=qS(3).tab,r=qS();ZC(3),Fy(`variant`,r.statusVariant(t.client)),ZC(),Fy(`routerLink`,k_(13,kt,t.client.id))(`queryParams`,r.detailQuery(n))(`appSearchHighlight`,t.nameMatches),ZC(),nv(t.client.displayName),ZC(2),Fy(`appSearchHighlight`,t.emailMatches),ZC(),nv(t.client.email||r.i18n.t(`clientsWorkspace.notProvided`)),ZC(2),nv(t.client.city||r.i18n.t(`clientsWorkspace.notProvided`)),ZC(2),nv(t.client.country||r.i18n.t(`clientsWorkspace.notProvided`)),ZC(2),Fy(`dateTime`,r.dateTime(t.client.updatedAt)),ZC(),nv(r.date(t.client.updatedAt)),ZC(2),Fy(`variant`,r.statusVariant(t.client)),ZC(),nv(r.i18n.t(t.client.archived?`backOffice.clients.archived`:`backOffice.clients.active`))}}function Bt(i,e){if(i&1){let t=zS();Us(0,`div`,24)(1,`table`)(2,`colgroup`),Py(3,`col`,30)(4,`col`,31)(5,`col`)(6,`col`)(7,`col`)(8,`col`),fd(),Us(9,`thead`)(10,`tr`)(11,`th`,32)(12,`button`,33),Gy(`click`,function(){Ip(t);return wp(qS(3).sortBy(`name`))}),fd()(),Us(13,`th`,32),y_(14),fd(),Us(15,`th`,32),y_(16),fd(),Us(17,`th`,32)(18,`button`,33),Gy(`click`,function(){Ip(t);return wp(qS(3).sortBy(`country`))}),fd()(),Us(19,`th`,32)(20,`button`,33),Gy(`click`,function(){Ip(t);return wp(qS(3).sortBy(`date`))}),fd()(),Us(21,`th`,32),y_(22),fd()()(),Us(23,`tbody`),LS(24,At,19,15,`tr`,null,St),fd()()()}if(i&2){let t=qS(2).tab,n=qS();ZC(11),ky(`aria-sort`,n.sortDirection(`name`)===`none`?null:n.sortDirection(`name`)),ZC(),Fy(`label`,n.i18n.t(`backOffice.clients.displayName`))(`direction`,n.sortDirection(`name`)),ZC(2),nv(n.i18n.t(`backOffice.clients.email`)),ZC(2),nv(n.i18n.t(`backOffice.clients.city`)),ZC(),ky(`aria-sort`,n.sortDirection(`country`)===`none`?null:n.sortDirection(`country`)),ZC(),Fy(`label`,n.i18n.t(`backOffice.clients.country`))(`direction`,n.sortDirection(`country`)),ZC(),ky(`aria-sort`,n.sortDirection(`date`)===`none`?null:n.sortDirection(`date`)),ZC(),Fy(`label`,n.i18n.t(`clientsWorkspace.updatedAt`))(`direction`,n.sortDirection(`date`)),ZC(2),nv(n.i18n.t(`backOffice.clients.status`)),ZC(2),jS(n.visibleClients(t))}}function Rt(i,e){if(i&1&&(OS(0,Lt,5,3,`app-empty-state`,23)(1,Bt,26,12,`div`,24),Us(2,`footer`,25)(3,`p`,14),y_(4),fd()()),i&2){let t=qS().tab,n=qS();kS(n.visibleClients(t).length===0?0:1),ZC(4),vd(` `,n.i18n.plural(`clientsWorkspace.count`,k_(2,vt,n.visibleClients(t).length)),` `)}}function Ht(i,e){if(i&1){let t=zS();Us(0,`section`,8)(1,`app-list-toolbar`)(2,`app-list-search`,9),Gy(`valueChange`,function(r){Ip(t);return wp(qS().setFilter(`search`,r))}),fd(),qT(),Us(3,`app-filter-menu`,10,0),Iy(5,Tt,1,4,`ng-template`,11)(6,Ft,4,6,`ng-template`,11),fd(),Py(7,`app-table-export`,12),fd(),OS(8,Wt,6,4,`div`,13),OS(9,Mt,2,1,`p`,14)(10,Dt,5,2,`div`,15)(11,Rt,5,4),fd()}if(i&2){let t,n=e.tab,r=e.id,m=e.tabId,p=qS();Fy(`id`,r),ky(`aria-labelledby`,m),ZC(2),Fy(`label`,p.i18n.t(`clientsWorkspace.search`))(`formField`,p.filters.search),ZT(),ZC(),Fy(`label`,p.i18n.t(`listWorkspace.filters`))(`closeLabel`,p.i18n.t(`listWorkspace.closeFilters`))(`backLabel`,p.i18n.t(`listWorkspace.backFilters`))(`activeCount`,p.activeFilterCount())(`disabled`,p.state()!==`ready`),ZC(2),Fy(`label`,p.i18n.t(`backOffice.clients.country`))(`summary`,p.filters.country().value()||p.i18n.t(`clientsWorkspace.countryFilter`)),ZC(),Fy(`label`,p.i18n.t(`clientsWorkspace.contactFilter`))(`summary`,p.contactFilterLabel()),ZC(),Fy(`columns`,p.exportColumns())(`rows`,p.exportRows(n))(`label`,p.i18n.t(`listWorkspace.exportCsv`))(`emptyHint`,p.i18n.t(`listWorkspace.exportEmpty`))(`pendingHint`,p.i18n.t(`listWorkspace.exportPending`))(`pending`,p.state()===`loading`),ZC(),kS(p.filtered()?8:-1),ZC(),kS((t=p.state())===`loading`?9:t===`error`?10:t===`ready`?11:-1)}}var gt=class i{i18n=g(Ie);api=g(y);route=g(G);router=g(ue);destroyRef=g(pe);loadGeneration=0;clients=Ke([]);model=Ke(p(this.route.snapshot.queryParamMap));collator=Ft$1(()=>new Intl.Collator(this.i18n.language(),{numeric:!0,sensitivity:`base`}));dateFormat=Ft$1(()=>new Intl.DateTimeFormat(this.i18n.language(),{dateStyle:`medium`}));filters=nr(this.model);filtered=Ft$1(()=>this.model().search.trim()!==``||this.model().country!==``||this.model().contact!==`all`);activeFilterCount=Ft$1(()=>+(this.model().country!==``)+ +(this.model().contact!==`all`));exportColumns=Ft$1(()=>[this.i18n.t(`backOffice.clients.displayName`),this.i18n.t(`backOffice.clients.email`),this.i18n.t(`backOffice.clients.city`),this.i18n.t(`backOffice.clients.country`),this.i18n.t(`clientsWorkspace.updatedAt`),this.i18n.t(`backOffice.clients.status`)]);countries=Ft$1(()=>[...new Set(this.clients().map(({country:e})=>e).filter(Boolean))].sort(this.collator().compare));countryOptions=Ft$1(()=>[{value:``,label:this.i18n.t(`clientsWorkspace.countryFilter`)},...this.countries().map(e=>({value:e,label:e}))]);contactOptions=Ft$1(()=>[{value:`all`,label:this.i18n.t(`clientsWorkspace.contactAll`)},{value:`incomplete`,label:this.i18n.t(`clientsWorkspace.contactIncomplete`)}]);contactFilterLabel=Ft$1(()=>this.i18n.t(this.model().contact===`incomplete`?`clientsWorkspace.contactIncomplete`:`clientsWorkspace.contactAll`));state=Ke(`loading`);tabs=Ft$1(()=>[`active`,`archived`,`all`].map(e=>({path:e,id:`clients-${e}-tab`,label:this.i18n.t(`backOffice.clients.tab.${e}`)})));searchResults=Ft$2(this.clients,Ft$1(()=>this.filters.search().value()),{keys:[`displayName`,`email`,`city`,`country`],ignoreDiacritics:!0,ignoreLocation:!0,includeMatches:!0,threshold:.35});results=Ft$1(()=>{let e=this.model().sort===`none`?`name-asc`:this.model().sort,t=e.endsWith(`-desc`)?-1:1,n=this.collator();return this.searchResults().toSorted(({item:r},{item:m})=>(e.startsWith(`date-`)?r.updatedAt-m.updatedAt:n.compare(e.startsWith(`country-`)?r.country:r.displayName,e.startsWith(`country-`)?m.country:m.displayName))*t||r.id.localeCompare(m.id)).map(r=>({client:r.item,nameMatches:r.matches?.find(m=>m.key===`displayName`)?.indices??[],emailMatches:r.matches?.find(m=>m.key===`email`)?.indices??[]}))});visibleClients(e){return this.results().filter(({client:t})=>(e===`all`||t.archived===(e===`archived`))&&(!this.model().country||t.country===this.model().country)&&(this.model().contact===`all`||a(t)))}constructor(){Ol(()=>{this.route.queryParamMap.pipe(U(this.destroyRef)).subscribe(e=>this.model.set(p(e))),this.load()})}setFilter(e,t){e===`contact`?this.model.update(n=>m(l({},n),{contact:t===`incomplete`?`incomplete`:`all`})):this.model.update(n=>m(l({},n),{[e]:t.slice(0,120)})),this.writeQuery()}resetFilters(){this.model.update(e=>m(l({},e),{search:``,country:``,contact:`all`})),this.writeQuery(),this.filters.search().focusBoundControl()}sortDirection(e){let{sort:t}=this.model();return t===`${e}-asc`?`ascending`:t===`${e}-desc`?`descending`:`none`}sortBy(e){let t$1=t(this.model().sort,`${e}-asc`,`${e}-desc`);this.model.update(n=>m(l({},n),{sort:t$1})),this.router.navigate([],{relativeTo:this.route,queryParams:{sort:t$1===`none`?null:t$1},queryParamsHandling:`merge`,replaceUrl:!0})}detailQuery(e){return m(l({},u$1(this.model())),{view:e===`active`?void 0:e})}statusVariant(e){return e.archived?`warning`:`success`}exportRows(e){return this.state()!==`ready`?[]:this.visibleClients(e).map(({client:t})=>[t.displayName,t.email,t.city,t.country,this.date(t.updatedAt),this.i18n.t(t.archived?`backOffice.clients.archived`:`backOffice.clients.active`)])}date(e){return this.dateFormat().format(e)}dateTime(e){return new Date(e).toISOString()}writeQuery(){this.router.navigate([],{relativeTo:this.route,queryParams:u$1(this.model()),replaceUrl:!0})}async load(){let e=++this.loadGeneration;this.state.set(`loading`);try{let t=await this.api.list();if(e!==this.loadGeneration||this.destroyRef.destroyed)return;this.clients.set(t),this.state.set(`ready`)}catch{e===this.loadGeneration&&!this.destroyRef.destroyed&&this.state.set(`error`)}}static ɵfac=function(t){return new(t||i)};static ɵcmp=Fb({type:i,selectors:[[`app-clients`]],hostAttrs:[1,`page-container`],features:[A_([d$1])],decls:10,vars:6,consts:[[`menu`,``],[`appTabLayout`,``,`aria-labelledby`,`clients-title`,1,`clients-page`],[`id`,`clients-title`],[1,`muted`],[`pageActions`,``,`appLinkButton`,``,`icon`,`plus`,`variant`,`primary`,`routerLink`,`/clients/new`,4,`appCan`],[3,`label`,`tabs`,`preserveQuery`],[`appTabPanel`,`clients`],[`pageActions`,``,`appLinkButton`,``,`icon`,`plus`,`variant`,`primary`,`routerLink`,`/clients/new`],[`appListWorkspace`,``,`role`,`region`,`tabindex`,`0`,3,`id`],[`listSearch`,``,3,`valueChange`,`label`,`formField`],[`listFilters`,``,3,`label`,`closeLabel`,`backLabel`,`activeCount`,`disabled`],[`appFilterPanel`,``,3,`label`,`summary`],[`listActions`,``,`filename`,`clients.csv`,3,`columns`,`rows`,`label`,`emptyHint`,`pendingHint`,`pending`],[1,`filter-chips`],[`role`,`status`],[1,`notice-flow`],[3,`committed`,`label`,`emptyLabel`,`options`,`value`],[`role`,`group`,`aria-describedby`,`clients-contact-hint`],[`id`,`clients-contact-hint`,1,`filter-hint`],[`appFilterChip`,``,3,`label`],[`appButton`,``,`type`,`button`,3,`click`],[`appFilterChip`,``,3,`click`,`label`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`icon`,`clients`,3,`title`],[`appDataTable`,``,`tableLayout`,`fluid`,1,`wide-table`],[1,`list-summary`],[`emptyActions`,``,`appButton`,``,`type`,`button`],[`emptyActions`,``,`appLinkButton`,``,`icon`,`plus`,`routerLink`,`/clients/new`],[`emptyActions`,``,`appButton`,``,`type`,`button`,3,`click`],[`emptyActions`,``,`appLinkButton`,``,`icon`,`plus`,`routerLink`,`/clients/new`,4,`appCan`],[1,`name-column`],[1,`email-column`],[`scope`,`col`],[`appTableSort`,``,3,`click`,`label`,`direction`],[`scope`,`row`],[1,`entity-label`],[`icon`,`clients`,3,`variant`],[3,`routerLink`,`queryParams`,`appSearchHighlight`],[3,`appSearchHighlight`],[3,`dateTime`],[`appBadge`,``,3,`variant`]],template:function(t,n){t&1&&(Us(0,`section`,1)(1,`app-page-header`)(2,`h1`,2),y_(3),fd(),Us(4,`p`,3),y_(5),fd(),Iy(6,wt,2,1,`a`,4),fd(),Py(7,`app-tabs`,5)(8,`router-outlet`),Iy(9,Ht,12,21,`ng-template`,6),fd()),t&2&&(ZC(3),nv(n.i18n.t(`backOffice.clients.title`)),ZC(2),nv(n.i18n.t(`clientsWorkspace.listIntro`)),ZC(),Fy(`appCan`,`client.create`),ZC(),Fy(`label`,n.i18n.t(`backOffice.clients.tabs`))(`tabs`,n.tabs())(`preserveQuery`,!0))},dependencies:[l$1,l$2,d,N,c,yn,h,k,Dt$1,gr,O,r,D,g$1,U$1,B,Q,Z,b,Fe,$,f,m$1,u],styles:[`.entity-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--%NS%space-2);min-inline-size:0}.entity-label[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child{min-inline-size:0}[_nghost-%COMP%]{display:block}.filter-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--%NS%space-2)}.filter-hint[_ngcontent-%COMP%]{color:var(--%NS%color-muted);font-size:var(--%NS%text-xs)}.clients-page[_ngcontent-%COMP%]{padding:var(--%NS%page-header-y) var(--%NS%page-x)}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding-block:var(--%NS%space-3)}tbody[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600}.name-column[_ngcontent-%COMP%], .email-column[_ngcontent-%COMP%]{width:26%}`]})};export{gt as Clients};
@@ -1 +1 @@
1
- import{Dn as g,d as Ar,g as Cr,ln as ad,nt as NH,or as ou}from"./chunk-BAHiFuUo.js";import{Tn as cn}from"./chunk-BAe_07VM.js";import{t as E}from"./chunk-DsaNNeZe.js";var l=class i{appCan=NH.required();authentication=g(E);template=g(Cr);container=g(Ar);constructor(){ou(()=>{let n=cn.ensure(this.appCan()),e=n.length>0&&n.every(d=>this.authentication.can(d));e&&this.container.length===0?this.container.createEmbeddedView(this.template):e||this.container.clear()})}static ɵfac=function(e){return new(e||i)};static ɵdir=ad({type:i,selectors:[[``,`appCan`,``]],inputs:{appCan:[1,`appCan`]}})};export{l as t};
1
+ import{Dn as g,d as Ar,g as Cr,ln as ad,nt as NH,or as ou}from"./chunk-BAHiFuUo.js";import{Tn as cn}from"./chunk-BAe_07VM.js";import{t as E}from"./chunk-DhpMFMQw.js";var l=class i{appCan=NH.required();authentication=g(E);template=g(Cr);container=g(Ar);constructor(){ou(()=>{let n=cn.ensure(this.appCan()),e=n.length>0&&n.every(d=>this.authentication.can(d));e&&this.container.length===0?this.container.createEmbeddedView(this.template):e||this.container.clear()})}static ɵfac=function(e){return new(e||i)};static ɵdir=ad({type:i,selectors:[[``,`appCan`,``]],inputs:{appCan:[1,`appCan`]}})};export{l as t};
@@ -0,0 +1 @@
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,Dr as t_,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Rn as jS,Sr as rv,Tn as fd,V as Iy,Wn as kS,Wr as y_,X as LS,ft as Ol,ht as PS,lt as OS,mr as qT,o as A,ot as OD,pr as qS,qn as ky,rn as Zw,rr as nv,tn as ZT,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N}from"./main-LXYWXFW4.js";import"./chunk-BAe_07VM.js";import{n as m$1}from"./chunk-Dv9sNWWK.js";import{in as Is,uu as wy,yl as ti,z as Cs}from"./chunk-D8Ui_APT.js";import{t as g$1}from"./chunk-B56nz2lI.js";import{t as k}from"./chunk-IrDYxRzS.js";import"./chunk-BzUDWIzm.js";import{t as P}from"./chunk-CkRw7h0_.js";import"./chunk-DhpMFMQw.js";import{t as l$1}from"./chunk-Cm2UNqwE.js";import"./chunk-CReShp-B.js";import{d as nr,f as or,h as yn,l as ln,n as an,o as gn,s as hn,u as mn}from"./chunk-CSkyOfSg.js";import"./chunk-CczD0yXn2.js";import{t as D}from"./chunk-CXHCUTDs2.js";import{a as u,i as m$2}from"./chunk-Dx1NwQCW.js";import{t as a}from"./chunk-1ErswIDf2.js";var I=class i{http=g(OD);async get(){return m$1(this.http.get(`/api/company`),ti,wy,`company.error`)}async update(t){return m$1(this.http.put(`/api/company`,t),ti,wy,`company.error`)}async initializeAccounting(t){return m$1(this.http.post(`/api/company/accounting/initialize`,t),ti,wy,`company.error`)}async listExchangeRates(){return m$1(this.http.get(`/api/company/exchange-rates`),Cs,wy,`company.error`)}async setExchangeRate(t){return m$1(this.http.put(`/api/company/exchange-rates`,t),Is,wy,`company.error`)}async importExchangeRates(){return m$1(this.http.post(`/api/company/exchange-rates/ecb`,null),Cs,wy,`company.error`)}static ɵfac=function(e){return new(e||i)};static ɵprov=A({token:i,factory:i.ɵfac,providedIn:`root`})};var me=(i,t)=>t.id;function ue(i,t){if(i&1&&(Us(0,`p`,4),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`company.loading`))}}function ge(i,t){if(i&1){let e=zS();Us(0,`div`,5)(1,`p`,6),y_(2),fd(),Us(3,`button`,7),Gy(`click`,function(){Ip(e);return wp(qS().load())}),y_(4),fd()()}if(i&2){let e=qS();ZC(2),nv(e.i18n.t(e.error())),ZC(2),vd(` `,e.i18n.t(`backOffice.dashboard.retry`),` `)}}function ye(i,t){if(i&1&&(Us(0,`p`,8),y_(1),fd()),i&2){let e=qS(2);ZC(),nv(e.i18n.t(`company.saved`))}}function xe(i,t){if(i&1&&(Us(0,`p`,6),y_(1),fd()),i&2){let e=qS(2);ZC(),nv(e.i18n.t(t))}}function he(i,t){if(i&1){let e=zS();Us(0,`app-hint`,21,0)(2,`label`)(3,`input`,35),Gy(`change`,function(a){let m=Ip(e).$implicit;return wp(qS(2).setModule(m,a))}),fd(),y_(4),fd()()}if(i&2){let e=t.$implicit,l=t_(1),a=qS(2);Fy(`text`,a.moduleHint(e)),ZC(3),Fy(`checked`,a.moduleEnabled(e)),ky(`aria-describedby`,l.id),ZC(),nv(a.moduleLabel(e))}}function fe(i,t){if(i&1&&(Us(0,`button`,36),y_(1),fd()),i&2){let e=qS(2);Fy(`disabled`,e.saving()),ZC(),vd(` `,e.i18n.t(`company.save`),` `)}}function _e(i,t){if(i&1){let e=zS();Us(0,`button`,37),Gy(`click`,function(){Ip(e);return wp(qS(3).initializeAccounting())}),y_(1),fd()}if(i&2){let e=qS(3);Fy(`disabled`,e.initializing()),ZC(),vd(` `,e.i18n.t(`company.initializeAccounting`),` `)}}function Ce(i,t){i&1&&Iy(0,_e,2,2,`button`,31),i&2&&Fy(`appCan`,`company.update`)}function ve(i,t){if(i&1){let e=zS();Us(0,`button`,37),Gy(`click`,function(){Ip(e);return wp(qS(2).importExchangeRates())}),y_(1),fd()}if(i&2){let e=qS(2);Fy(`disabled`,e.exchangeRateBusy()),ZC(),vd(` `,e.i18n.t(`company.exchangeRateImport`),` `)}}function be(i,t){if(i&1&&(Us(0,`p`,6),y_(1),fd()),i&2){let e=qS(2);ZC(),nv(e.i18n.t(t))}}function Se(i,t){if(i&1){let e=zS();Us(0,`form`,38),Gy(`submit`,function(a){Ip(e);return wp(qS(2).saveExchangeRate(a))}),Us(1,`label`,39),y_(2),Us(3,`input`,40),Gy(`input`,function(a){Ip(e);return wp(qS(2).setExchangeRateField(`date`,a))}),fd()(),Us(4,`label`,39),y_(5),Us(6,`input`,41),Gy(`input`,function(a){Ip(e);return wp(qS(2).setExchangeRateField(`currency`,a))}),fd()(),Us(7,`label`,39),y_(8),Us(9,`input`,42),Gy(`input`,function(a){Ip(e);return wp(qS(2).setExchangeRateField(`value`,a))}),fd()(),Us(10,`button`,36),y_(11),fd()()}if(i&2){let e=qS(2);ZC(2),vd(` `,e.i18n.t(`company.exchangeRateDate`),` `),ZC(),Fy(`value`,e.exchangeRateDate()),ZC(2),vd(` `,e.i18n.t(`company.exchangeRateCurrency`),` `),ZC(),Fy(`value`,e.exchangeRateCurrency()),ZC(2),vd(` `,e.i18n.t(`company.exchangeRateValue`),` `),ZC(),Fy(`value`,e.exchangeRateValue()),ZC(),Fy(`disabled`,e.exchangeRateBusy()),ZC(),vd(` `,e.i18n.t(`company.exchangeRateOverride`),` `)}}function Re(i,t){if(i&1&&(Us(0,`tr`)(1,`td`),y_(2),fd(),Us(3,`td`),y_(4),fd(),Us(5,`td`,43),y_(6),fd(),Us(7,`td`),y_(8),fd()()),i&2){let e=t.$implicit,l=qS(2);ZC(2),nv(e.rateDate),ZC(2),rv(``,e.functionalCurrency,`/`,e.foreignCurrency),ZC(2),nv(l.rateValue(e)),ZC(2),nv(l.rateSource(e))}}function Ee(i,t){if(i&1&&(Us(0,`tr`)(1,`td`,44),y_(2),fd()()),i&2){let e=qS(2);ZC(2),nv(e.i18n.t(`company.exchangeRateEmpty`))}}function Me(i,t){if(i&1){let e=zS();OS(0,ye,2,1,`p`,8),OS(1,xe,2,1,`p`,6),Us(2,`form`,9),Gy(`submit`,function(a){Ip(e);return wp(qS().save(a))}),Us(3,`fieldset`,10)(4,`legend`),y_(5),fd(),Us(6,`label`,11),y_(7),Py(8,`input`,12),fd(),Us(9,`label`,13),y_(10),Py(11,`input`,14),qT(),fd(),Us(12,`p`,15),y_(13),fd()(),Us(14,`fieldset`,10)(15,`legend`),y_(16),fd(),Us(17,`label`,16),y_(18),Py(19,`input`,17),qT(),fd(),Us(20,`label`,18),y_(21),Py(22,`input`,19),qT(),fd(),Us(23,`p`,15),y_(24),fd()(),Us(25,`fieldset`,10)(26,`legend`),y_(27),fd(),Us(28,`div`,20),LS(29,he,5,4,`app-hint`,21,PS),fd()(),Us(31,`fieldset`,10)(32,`legend`),y_(33),fd(),Us(34,`label`,22),y_(35),Py(36,`input`,23),qT(),fd(),Us(37,`p`,15),y_(38),fd()(),Us(39,`div`,24),Iy(40,fe,2,2,`button`,25),OS(41,Ce,1,1,`button`,26),fd()(),Us(42,`section`,27)(43,`div`,28)(44,`div`)(45,`h2`,29),y_(46),fd(),Us(47,`p`,30),y_(48),fd()(),Iy(49,ve,2,2,`button`,31),fd(),OS(50,be,2,1,`p`,6),Iy(51,Se,12,8,`form`,32),Us(52,`div`,33)(53,`table`)(54,`thead`)(55,`tr`)(56,`th`,34),y_(57),fd(),Us(58,`th`,34),y_(59),fd(),Us(60,`th`,34),y_(61),fd(),Us(62,`th`,34),y_(63),fd()()(),Us(64,`tbody`),LS(65,Re,9,5,`tr`,null,me,!1,Ee,3,1,`tr`),fd()()()()}if(i&2){let e,l,a=qS();kS(a.saved()?0:-1),ZC(),kS((e=a.error())?1:-1,e),ZC(4),nv(a.i18n.t(`company.legal`)),ZC(2),nv(a.i18n.t(`company.jurisdiction`)),ZC(),Fy(`value`,a.model().jurisdiction),ZC(2),nv(a.i18n.t(`company.functionalCurrency`)),ZC(),Fy(`formField`,a.settingsForm.functionalCurrency),ZT(),ZC(2),nv(a.accountingState()),ZC(3),nv(a.i18n.t(`company.fiscalYear`)),ZC(2),nv(a.i18n.t(`company.fiscalMonth`)),ZC(),Fy(`formField`,a.settingsForm.fiscalYearStartMonth),ZT(),ZC(2),nv(a.i18n.t(`company.fiscalDay`)),ZC(),Fy(`formField`,a.settingsForm.fiscalYearStartDay),ZT(),ZC(2),nv(a.i18n.t(`company.fiscalDuration`)),ZC(3),nv(a.i18n.t(`company.modules`)),ZC(2),jS(a.modules),ZC(4),nv(a.i18n.t(`company.retention`)),ZC(2),nv(a.i18n.t(`company.retentionYears`)),ZC(),Fy(`formField`,a.settingsForm.retentionYears),ZT(),ZC(2),nv(a.i18n.t(`company.retentionExplanation`)),ZC(2),Fy(`appCan`,`company.update`),ZC(),kS(a.currencyLocked()?-1:41),ZC(5),nv(a.i18n.t(`company.exchangeRates`)),ZC(2),nv(a.i18n.t(`company.exchangeRatesHint`)),ZC(),Fy(`appCan`,`company.update`),ZC(),kS((l=a.exchangeRateError())?50:-1,l),ZC(),Fy(`appCan`,`company.update`),ZC(6),nv(a.i18n.t(`company.exchangeRateDate`)),ZC(2),nv(a.i18n.t(`company.exchangeRatePair`)),ZC(2),nv(a.i18n.t(`company.exchangeRateValue`)),ZC(2),nv(a.i18n.t(`company.exchangeRateSource`)),ZC(2),jS(a.exchangeRates())}}var Pe=[`sales`,`purchasing`,`banking`,`accounting`,`tax`,`ai`,`demonstration`];var Ve=()=>({jurisdiction:`FR`,functionalCurrency:`EUR`,fiscalYearStartMonth:1,fiscalYearStartDay:1,enabledModules:[],retentionYears:10});var se=class i{i18n=g(Ie);api=g(I);confirmation=g(P);modules=Pe;state=Ke(`loading`);settings=Ke(void 0);model=Ke(Ve());settingsForm=nr(this.model,t=>{gn(t.functionalCurrency),mn(t.functionalCurrency,/^[A-Z]{3}$/),an(t.functionalCurrency,()=>this.currencyLocked()),hn(t.fiscalYearStartMonth,1),ln(t.fiscalYearStartMonth,12),hn(t.fiscalYearStartDay,1),ln(t.fiscalYearStartDay,31),hn(t.retentionYears,10)});saving=Ke(!1);initializing=Ke(!1);exchangeRates=Ke([]);exchangeRateDate=Ke(``);exchangeRateCurrency=Ke(``);exchangeRateValue=Ke(``);exchangeRateBusy=Ke(!1);exchangeRateError=Ke(void 0);saved=Ke(!1);error=Ke(void 0);constructor(){Ol(()=>{this.load()})}async canDeactivate(){return this.saving()||this.initializing()||this.exchangeRateBusy()?!1:this.settingsForm().dirty()?this.confirmation.request(this.i18n.t(`company.unsavedChanges`)):!0}preventUnsavedUnload(t){(this.saving()||this.initializing()||this.exchangeRateBusy()||this.settingsForm().dirty())&&t.preventDefault()}moduleEnabled(t){return this.model().enabledModules.includes(t)}setModule(t,e){if(!(e.currentTarget instanceof HTMLInputElement))return;let l$2=e.currentTarget.checked;this.model.update(a=>m(l({},a),{enabledModules:l$2?[...a.enabledModules,t]:a.enabledModules.filter(m=>m!==t)}))}moduleLabel(t){return this.i18n.t(`company.module.${t}`)}moduleHint(t){return this.i18n.t(`company.module.${t}.hint`)}currencyLocked(){return this.settings()?.accountingInitialized===!0}accountingState(){return this.i18n.t(this.currencyLocked()?`company.accountingInitialized`:`company.accountingNotInitialized`)}async load(){this.state.set(`loading`),this.error.set(void 0);let t=await this.api.get();if(!t.success){this.error.set(t.code),this.state.set(`error`);return}this.apply(t.result),this.state.set(`ready`),await this.loadExchangeRates()}save(t){if(t.preventDefault(),this.saving()||this.settingsForm().invalid()){this.settingsForm().markAsTouched();return}let e=this.settings();e&&or(this.settingsForm,async()=>{this.saving.set(!0),this.saved.set(!1),this.error.set(void 0);try{let l$3=await this.api.update(m(l({},this.model()),{expectedVersion:e.version}));if(!l$3.success){this.error.set(l$3.code);return}this.apply(l$3.result),this.saved.set(!0)}catch{this.error.set(`company.error`)}finally{this.saving.set(!1)}})}async initializeAccounting(){let t=this.settings();if(!(!t||t.accountingInitialized||this.initializing())&&await this.confirmation.request(this.i18n.t(`company.initializeConfirm`))){this.initializing.set(!0),this.error.set(void 0);try{let e=await this.api.initializeAccounting({functionalCurrency:this.model().functionalCurrency,expectedVersion:t.version});if(!e.success){this.error.set(e.code);return}this.apply(e.result),this.saved.set(!0)}catch{this.error.set(`company.error`)}finally{this.initializing.set(!1)}}}rateValue(t){return m$2(t.foreignUnitsPerFunctionalUnitNanos,9).replace(/\.?0+$/,``)}rateSource(t){return this.i18n.t(t.source===`ecb`?`company.exchangeRateEcb`:`company.exchangeRateManual`)}setExchangeRateField(t,e){e.currentTarget instanceof HTMLInputElement&&(t===`date`&&this.exchangeRateDate.set(e.currentTarget.value),t===`currency`&&this.exchangeRateCurrency.set(e.currentTarget.value.toUpperCase()),t===`value`&&this.exchangeRateValue.set(e.currentTarget.value))}async saveExchangeRate(t){t.preventDefault();let e=u(this.exchangeRateValue(),9);if(this.exchangeRateBusy()||!/^\d{4}-\d{2}-\d{2}$/.test(this.exchangeRateDate())||!/^[A-Z]{3}$/.test(this.exchangeRateCurrency())||e===void 0||e===0){this.exchangeRateError.set(`company.exchangeRateInvalid`);return}this.exchangeRateBusy.set(!0),this.exchangeRateError.set(void 0);try{let l=await this.api.setExchangeRate({rateDate:this.exchangeRateDate(),foreignCurrency:this.exchangeRateCurrency(),foreignUnitsPerFunctionalUnitNanos:e});if(!l.success){this.exchangeRateError.set(l.code);return}await this.loadExchangeRates()}catch{this.exchangeRateError.set(`company.error`)}finally{this.exchangeRateBusy.set(!1)}}async importExchangeRates(){if(!this.exchangeRateBusy()){this.exchangeRateBusy.set(!0),this.exchangeRateError.set(void 0);try{let t=await this.api.importExchangeRates();if(!t.success){this.exchangeRateError.set(t.code);return}this.exchangeRates.set(t.result)}catch{this.exchangeRateError.set(`company.error`)}finally{this.exchangeRateBusy.set(!1)}}}async loadExchangeRates(){try{let t=await this.api.listExchangeRates();t.success?this.exchangeRates.set(t.result):this.exchangeRateError.set(t.code)}catch{this.exchangeRateError.set(`company.error`)}}apply(t){this.settings.set(t),this.settingsForm().reset({jurisdiction:t.jurisdiction,functionalCurrency:t.functionalCurrency,fiscalYearStartMonth:t.fiscalYearStartMonth,fiscalYearStartDay:t.fiscalYearStartDay,enabledModules:t.enabledModules,retentionYears:t.retentionYears})}static ɵfac=function(e){return new(e||i)};static ɵcmp=Fb({type:i,selectors:[[`app-company-settings`]],hostAttrs:[1,`page-container`],hostBindings:function(e,l){e&1&&Gy(`beforeunload`,function(m){return l.preventUnsavedUnload(m)},Zw)},decls:9,vars:3,consts:[[`moduleHelp`,``],[`aria-labelledby`,`company-settings-title`,1,`detail-page`,`form-page`],[`layout`,`stacked`],[`id`,`company-settings-title`],[`role`,`status`],[1,`notice-flow`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`appButton`,``,`type`,`button`,3,`click`],[`appNotice`,``,`variant`,`success`,`role`,`status`],[`novalidate`,``,3,`submit`],[1,`field-grid`,`ds-panel`],[`for`,`company-jurisdiction`,1,`field`],[`id`,`company-jurisdiction`,`type`,`text`,`readonly`,``,1,`input`,3,`value`],[`for`,`company-currency`,1,`field`],[`id`,`company-currency`,`type`,`text`,1,`input`,3,`formField`],[`appFieldHint`,``,1,`wide`],[`for`,`company-fiscal-month`,1,`field`],[`id`,`company-fiscal-month`,`type`,`number`,`step`,`1`,1,`input`,3,`formField`],[`for`,`company-fiscal-day`,1,`field`],[`id`,`company-fiscal-day`,`type`,`number`,`step`,`1`,1,`input`,3,`formField`],[1,`module-grid`,`wide`],[3,`text`],[`for`,`company-retention`,1,`field`,`wide`],[`id`,`company-retention`,`type`,`number`,`step`,`1`,1,`input`,3,`formField`],[1,`actions`,`spacer-x-2`],[`appButton`,``,`variant`,`primary`,`type`,`submit`,3,`disabled`,4,`appCan`],[`appButton`,``,`type`,`button`,3,`disabled`],[`aria-labelledby`,`exchange-rates-title`,1,`ds-panel`,`form-panel`,`exchange-rates`],[1,`section-heading`],[`id`,`exchange-rates-title`],[1,`muted`],[`appButton`,``,`type`,`button`,3,`disabled`,`click`,4,`appCan`],[`class`,`rate-form`,3,`submit`,4,`appCan`],[1,`table-scroll`],[`scope`,`col`],[`type`,`checkbox`,3,`change`,`checked`],[`appButton`,``,`variant`,`primary`,`type`,`submit`,3,`disabled`],[`appButton`,``,`type`,`button`,3,`click`,`disabled`],[1,`rate-form`,3,`submit`],[1,`field`],[`type`,`date`,`required`,``,1,`input`,3,`input`,`value`],[`maxlength`,`3`,`pattern`,`[A-Z]{3}`,`required`,``,1,`input`,3,`input`,`value`],[`inputmode`,`decimal`,`required`,``,1,`input`,3,`input`,`value`],[1,`amount`],[`colspan`,`4`]],template:function(e,l){e&1&&(Us(0,`section`,1)(1,`app-page-header`,2)(2,`h1`,3),y_(3),fd(),Us(4,`p`),y_(5),fd()(),OS(6,ue,2,1,`p`,4)(7,ge,5,2,`div`,5)(8,Me,68,31),fd()),e&2&&(ZC(3),nv(l.i18n.t(`company.title`)),ZC(2),nv(l.i18n.t(`company.intro`)),ZC(),kS(l.state()===`loading`?6:l.state()===`error`?7:8))},dependencies:[N,l$1,a,yn,D,k,g$1],styles:[`[_nghost-%COMP%]{display:block}.detail-page[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4);min-inline-size:0;inline-size:100%;max-inline-size:var(--%NS%page-width-detail);margin-inline:auto;padding:var(--%NS%page-header-y) var(--%NS%page-x)}.detail-page.form-page[_ngcontent-%COMP%]{max-inline-size:var(--%NS%page-width-form)}.detail-page.wide-page[_ngcontent-%COMP%]{max-inline-size:var(--%NS%page-width-wide)}app-page-header[data-header-layout=stacked][_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-2xl);overflow-wrap:anywhere}app-page-header[data-header-layout=stacked][_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-base);color:var(--%NS%color-muted);overflow-wrap:anywhere}.detail-page[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{justify-self:start}@media print{.detail-page[_ngcontent-%COMP%], .detail-page.form-page[_ngcontent-%COMP%], .detail-page.wide-page[_ngcontent-%COMP%]{max-inline-size:none}}form[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-5)}fieldset[_ngcontent-%COMP%]{min-inline-size:0;margin:0;padding:var(--%NS%space-5)}.module-grid[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-3);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))}.module-grid[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;gap:var(--%NS%space-2);align-items:center}.module-grid[_ngcontent-%COMP%] app-hint[_ngcontent-%COMP%], .module-grid[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{inline-size:100%}.exchange-rates[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4);margin-block-start:var(--%NS%space-4)}.section-heading[_ngcontent-%COMP%], .rate-form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:var(--%NS%space-4)}.section-heading[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .section-heading[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.rate-form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{flex:1 1 10rem}.table-scroll[_ngcontent-%COMP%]{max-block-size:24rem;overflow:auto}table[_ngcontent-%COMP%]{width:100%}th[_ngcontent-%COMP%]{text-align:start}thead[_ngcontent-%COMP%]{position:sticky;z-index:1;inset-block-start:0;background:var(--%NS%color-panel)}`]})};export{se as CompanySettingsPage};
@@ -0,0 +1 @@
1
+ import{$t as ZC,D as Fy,Dn as g,It as Us,Nr as vd,Tn as fd,Wn as kS,Wr as y_,lt as OS,pr as qS,rr as nv,vt as Py,w as Fb}from"./chunk-BAHiFuUo.js";import{t as k}from"./chunk-IrDYxRzS.js";import{t as N$1}from"./chunk-BL3upDtA.js";import{t as w}from"./chunk-DbcNGxba.js";function T(e,i){if(e&1&&(Us(0,`p`,1),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.task.i18n.t(`backOffice.invoices.loading`))}}function I(e,i){if(e&1&&(Us(0,`p`,1),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.task.i18n.t(`billingWorkspace.pending`))}}function F(e,i){if(e&1&&(Us(0,`p`,2),y_(1),fd()),e&2){let t=qS();ZC(),vd(` `,t.task.i18n.t(`billingWorkspace.completed`),` `)}}function S(e,i){if(e&1&&(Us(0,`p`,3),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.task.i18n.t(`billingWorkspace.stale`))}}function E(e,i){if(e&1&&(Us(0,`p`,3),y_(1),fd()),e&2){let t=qS();ZC(),vd(` `,t.task.i18n.t(`billingWorkspace.uncertain`),` `)}}function N(e,i){if(e&1&&(Us(0,`p`,4),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.task.i18n.t(i))}}function D(e,i){if(e&1&&Py(0,`app-document-issues`,5),e&2)Fy(`issues`,qS().task.issues())(`clientId`,i.clientId)}var v=class e{task=g(w);static ɵfac=function(t){return new(t||e)};static ɵcmp=Fb({type:e,selectors:[[`app-invoice-task-feedback`]],decls:8,vars:5,consts:[[`data-task-feedback`,``,`tabindex`,`-1`,1,`feedback`],[`role`,`status`],[`appNotice`,``,`variant`,`success`,`role`,`status`],[`appNotice`,``,`variant`,`warning`,`role`,`alert`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`kind`,`invoice`,3,`issues`,`clientId`]],template:function(t,a){if(t&1&&(Us(0,`div`,0),OS(1,T,2,1,`p`,1),OS(2,I,2,1,`p`,1),OS(3,F,2,1,`p`,2),OS(4,S,2,1,`p`,3)(5,E,2,1,`p`,3)(6,N,2,1,`p`,4),OS(7,D,1,2,`app-document-issues`,5),fd()),t&2){let k,u;ZC(),kS(a.task.loading()?1:-1),ZC(),kS(a.task.busy()?2:-1),ZC(),kS(a.task.completed()?3:-1),ZC(),kS(a.task.stale()?4:a.task.uncertain()?5:(k=!a.task.issues().length&&a.task.error())?6:-1,k),ZC(3),kS((u=a.task.issues().length&&a.task.invoice())?7:-1,u)}},dependencies:[k,N$1],styles:[`.feedback[_ngcontent-%COMP%]{display:grid;justify-items:start;gap:var(--%NS%space-3)}p[_ngcontent-%COMP%]{margin:0}app-document-issues[_ngcontent-%COMP%]{margin:0}`]})};export{v as t};
@@ -1 +1 @@
1
- import{Dn as g,H as JD,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m$1}from"./chunk-Dv9sNWWK.js";import{Gn as Ml,fr as Ok,k as Bn}from"./chunk-D5qmP2Wu.js";var m=class r{http=g(OD);async list(){return wu.decodeUnknownSync(Ml)(await JD(this.http.get(`/api/quote-condition-presets`)))}async create(e){return m$1(this.http.post(`/api/quote-condition-presets`,e),Bn,Ok,`quote.error`)}async update(e,n){return m$1(this.http.put(`/api/quote-condition-presets/${e}`,n),Bn,Ok,`quote.error`)}async remove(e){return m$1(this.http.delete(`/api/quote-condition-presets/${e}`),Bn,Ok,`quote.error`)}static ɵfac=function(n){return new(n||r)};static ɵprov=A({token:r,factory:r.ɵfac,providedIn:`root`})};export{m as t};
1
+ import{Dn as g,H as JD,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m$1}from"./chunk-Dv9sNWWK.js";import{Gn as Ml,fr as Ok,k as Bn}from"./chunk-D8Ui_APT.js";var m=class r{http=g(OD);async list(){return wu.decodeUnknownSync(Ml)(await JD(this.http.get(`/api/quote-condition-presets`)))}async create(e){return m$1(this.http.post(`/api/quote-condition-presets`,e),Bn,Ok,`quote.error`)}async update(e,n){return m$1(this.http.put(`/api/quote-condition-presets/${e}`,n),Bn,Ok,`quote.error`)}async remove(e){return m$1(this.http.delete(`/api/quote-condition-presets/${e}`),Bn,Ok,`quote.error`)}static ɵfac=function(n){return new(n||r)};static ɵprov=A({token:r,factory:r.ɵfac,providedIn:`root`})};export{m as t};
@@ -1 +1 @@
1
- import{n as m,t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,E as Ft,Ir as wp,It as Us,J as Ky,Jr as zS,K as Ke,Nr as vd,P as Hn,Rn as jS,Tn as fd,Vr as xH,Wn as kS,Wr as y_,X as LS,c as AH,ft as Ol,gn as ce$1,lt as OS,mr as qT,nt as NH,pr as qS,qn as ky,rn as Zw,rr as nv,tn as ZT,vt as Py,w as Fb,xn as e_,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N}from"./main-F7D3L737.js";import"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import{Zr as Ss}from"./chunk-D5qmP2Wu.js";import"./chunk-BzUDWIzm.js";import"./chunk-CReShp-B.js";import{d as nr,h as yn,n as an,o as gn,r as cn}from"./chunk-CSkyOfSg.js";import{t as g$1}from"./chunk-B56nz2lI.js";import{t as k}from"./chunk-D5MFwK9L.js";import{t as P}from"./chunk-niXXbm7H.js";import{t as w}from"./chunk-y0Vyi0HZ.js";import{t as o}from"./chunk-CwkCpxYQ.js";var te=[`operationStatus`];var ie=(i,t)=>t.id;function ne(i,t){if(i&1&&(Us(0,`p`,5),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(t))}}function ae(i,t){if(i&1&&(Us(0,`p`,6,0),y_(2),fd()),i&2){let e=qS();ZC(2),vd(` `,e.i18n.t(t),` `)}}function se(i,t){if(i&1&&(Us(0,`div`,11)(1,`button`,13),y_(2),fd()()),i&2){let e=qS();ZC(),Fy(`disabled`,e.busy()||e.disabled()||e.loading()),ZC(),vd(` `,e.i18n.t(`passkey.add`),` `)}}function oe(i,t){if(i&1&&(Us(0,`p`,4),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`passkey.unavailable`))}}function re(i,t){if(i&1&&(Us(0,`p`,5),y_(1),fd()),i&2){let e=qS();ZC(),vd(` `,e.i18n.t(`configurationWorkspace.passwordInvalid`),` `)}}function de(i,t){if(i&1&&(Us(0,`p`,12),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`passkey.loading`))}}function le(i,t){if(i&1){let e=zS();Us(0,`div`,14)(1,`span`),y_(2),fd(),Us(3,`button`,15),Gy(`click`,function(){let y=Ip(e).$implicit;return wp(qS(2).remove(y))}),y_(4),fd()()}if(i&2){let e=t.$implicit,n=qS(2);ZC(2),nv(e.name),ZC(),Fy(`disabled`,n.busy()||n.disabled()),ky(`aria-label`,n.i18n.t(`passkey.remove`)+` `+e.name),ZC(),vd(` `,n.i18n.t(`passkey.remove`),` `)}}function ce(i,t){if(i&1&&(Us(0,`p`),y_(1),fd()),i&2){let e=qS(3);ZC(),nv(e.i18n.t(`passkey.empty`))}}function pe(i,t){if(i&1&&OS(0,ce,2,1,`p`),i&2)kS(qS(2).error()?-1:0)}function ue(i,t){if(i&1&&LS(0,le,5,4,`div`,14,ie,!1,pe,1,1),i&2)jS(qS().keys())}var ee=class i{busy=AH(!1);disabled=NH(!1);i18n=g(Ie);api=g(w);confirmation=g(P);injector=g(ce$1);operationStatus=xH(`operationStatus`,{read:Hn});keys=Ke([]);loading=Ke(!0);error=Ke(void 0);errorOperation=Ke(`load`);errorMessage=Ft(()=>o(this.error(),this.errorOperation()));status=Ke(void 0);values=Ke({name:``,password:``});fields=nr(this.values,t=>{an(t,()=>this.busy()||this.disabled()),gn(t.name),cn(t.name,80),gn(t.password),cn(t.password,Ss.maxLength)});constructor(){Ol(()=>{this.reload()})}async reload(){this.loading.set(!0);let t=await this.api.list();t.success?this.keys.set(t.result):(this.errorOperation.set(`load`),this.error.set(t.code)),this.loading.set(!1)}async add(t){if(t.preventDefault(),!(this.busy()||this.disabled()||this.loading())){if(this.fields().invalid()){this.fields().markAsTouched(),this.fields().errorSummary()[0]?.fieldTree().focusBoundControl();return}this.busy.set(!0),this.error.set(void 0),this.status.set(void 0);try{let e=await this.api.register(this.values());e.success?(this.status.set(`passkey.added`),await this.reload(),Ol(()=>this.operationStatus()?.nativeElement.focus(),{injector:this.injector})):(this.errorOperation.set(`add`),this.error.set(e.code))}finally{this.values.set({name:``,password:``}),this.fields().reset(),t.target instanceof HTMLFormElement&&t.target.reset(),this.busy.set(!1)}}}async remove(t){if(!(this.busy()||this.disabled())){if(this.fields.password().invalid()){this.fields.password().markAsTouched(),this.fields.password().focusBoundControl();return}if(await this.confirmation.request(this.i18n.t(`passkey.remove_confirm`),{variant:`danger`})){this.busy.set(!0),this.error.set(void 0),this.status.set(void 0);try{let e=await this.api.remove(t.id,{password:this.values().password});e.success?(this.status.set(`passkey.removed`),await this.reload(),Ol(()=>this.operationStatus()?.nativeElement.focus(),{injector:this.injector})):(this.errorOperation.set(`remove`),this.error.set(e.code))}finally{this.values.update(e=>m(l({},e),{password:``})),this.busy.set(!1)}}}}canDeactivate(){return this.busy()?!1:!this.fields().dirty()||this.confirmation.request(this.i18n.t(`configurationWorkspace.unsaved`))}beforeUnload(t){(this.busy()||this.fields().dirty())&&t.preventDefault()}static ɵfac=function(e){return new(e||i)};static ɵcmp=Fb({type:i,selectors:[[`app-account-passkeys`]],viewQuery:function(e,n){e&1&&Ky(n.operationStatus,te,5,Hn),e&2&&e_()},hostBindings:function(e,n){e&1&&Gy(`beforeunload`,function(c){return n.beforeUnload(c)},Zw)},inputs:{busy:[1,`busy`],disabled:[1,`disabled`]},outputs:{busy:`busyChange`},decls:22,vars:12,consts:[[`operationStatus`,``],[`aria-labelledby`,`passkeys-title`,1,`passkeys`],[`id`,`passkeys-title`],[1,`muted`],[`appNotice`,``,`variant`,`info`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`appNotice`,``,`variant`,`success`,`role`,`status`,`tabindex`,`-1`],[`novalidate`,``,3,`submit`],[1,`field`],[`autocomplete`,`off`,1,`input`,3,`formField`],[`type`,`password`,`autocomplete`,`current-password`,1,`input`,3,`formField`],[1,`spacer-x-3`],[`role`,`status`],[`appButton`,``,`type`,`submit`,3,`disabled`],[1,`key`,`spacer-x-3`],[`appButton`,``,`type`,`button`,3,`click`,`disabled`]],template:function(e,n){if(e&1&&(Us(0,`section`,1)(1,`app-page-header`)(2,`h2`,2),y_(3),fd(),Us(4,`p`,3),y_(5),fd()(),Us(6,`p`,4),y_(7),fd(),OS(8,ne,2,1,`p`,5),OS(9,ae,3,1,`p`,6),Us(10,`form`,7),Gy(`submit`,function(c){return n.add(c)}),Us(11,`label`,8),y_(12),Py(13,`input`,9),qT(),fd(),Us(14,`label`,8),y_(15),Py(16,`input`,10),qT(),fd(),OS(17,se,3,2,`div`,11)(18,oe,2,1,`p`,4),fd(),OS(19,re,2,1,`p`,5),OS(20,de,2,1,`p`,12)(21,ue,3,1),fd()),e&2){let y,c;ZC(3),nv(n.i18n.t(`passkey.title`)),ZC(2),nv(n.i18n.t(`passkey.description`)),ZC(2),nv(n.i18n.t(`passkey.password_notice`)),ZC(),kS((y=n.errorMessage())?8:-1,y),ZC(),kS((c=n.status())?9:-1,c),ZC(3),nv(n.i18n.t(`passkey.name`)),ZC(),Fy(`formField`,n.fields.name),ZT(),ZC(2),nv(n.i18n.t(`passkey.password`)),ZC(),Fy(`formField`,n.fields.password),ZT(),ZC(),kS(n.api.supported?17:18),ZC(2),kS(n.fields().touched()&&n.fields().invalid()?19:-1),ZC(),kS(n.loading()?20:21)}},dependencies:[N,k,yn,g$1],styles:[`.passkeys[_ngcontent-%COMP%], form[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4)}.passkeys[_ngcontent-%COMP%]{padding:var(--%NS%space-6) var(--%NS%page-x)}.key[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.key[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow-wrap:anywhere;min-width:0}`]})};export{ee as AccountPasskeys};
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{$t as ZC,A as Gy,D as Fy,Dn as g,E as Ft,Ir as wp,It as Us,J as Ky,Jr as zS,K as Ke,Nr as vd,P as Hn,Rn as jS,Tn as fd,Vr as xH,Wn as kS,Wr as y_,X as LS,c as AH,ft as Ol,gn as ce$1,lt as OS,mr as qT,nt as NH,pr as qS,qn as ky,rn as Zw,rr as nv,tn as ZT,vt as Py,w as Fb,xn as e_,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N}from"./main-LXYWXFW4.js";import"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import{Zr as Ss}from"./chunk-D8Ui_APT.js";import{t as g$1}from"./chunk-B56nz2lI.js";import{t as k}from"./chunk-IrDYxRzS.js";import"./chunk-BzUDWIzm.js";import{t as P}from"./chunk-CkRw7h0_.js";import"./chunk-CReShp-B.js";import{d as nr,h as yn,n as an,o as gn,r as cn}from"./chunk-CSkyOfSg.js";import{t as o}from"./chunk-CwkCpxYQ.js";import{t as w}from"./chunk-BHnrX0WJ.js";var te=[`operationStatus`];var ie=(i,t)=>t.id;function ne(i,t){if(i&1&&(Us(0,`p`,5),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(t))}}function ae(i,t){if(i&1&&(Us(0,`p`,6,0),y_(2),fd()),i&2){let e=qS();ZC(2),vd(` `,e.i18n.t(t),` `)}}function se(i,t){if(i&1&&(Us(0,`div`,11)(1,`button`,13),y_(2),fd()()),i&2){let e=qS();ZC(),Fy(`disabled`,e.busy()||e.disabled()||e.loading()),ZC(),vd(` `,e.i18n.t(`passkey.add`),` `)}}function oe(i,t){if(i&1&&(Us(0,`p`,4),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`passkey.unavailable`))}}function re(i,t){if(i&1&&(Us(0,`p`,5),y_(1),fd()),i&2){let e=qS();ZC(),vd(` `,e.i18n.t(`configurationWorkspace.passwordInvalid`),` `)}}function de(i,t){if(i&1&&(Us(0,`p`,12),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`passkey.loading`))}}function le(i,t){if(i&1){let e=zS();Us(0,`div`,14)(1,`span`),y_(2),fd(),Us(3,`button`,15),Gy(`click`,function(){let y=Ip(e).$implicit;return wp(qS(2).remove(y))}),y_(4),fd()()}if(i&2){let e=t.$implicit,n=qS(2);ZC(2),nv(e.name),ZC(),Fy(`disabled`,n.busy()||n.disabled()),ky(`aria-label`,n.i18n.t(`passkey.remove`)+` `+e.name),ZC(),vd(` `,n.i18n.t(`passkey.remove`),` `)}}function ce(i,t){if(i&1&&(Us(0,`p`),y_(1),fd()),i&2){let e=qS(3);ZC(),nv(e.i18n.t(`passkey.empty`))}}function pe(i,t){if(i&1&&OS(0,ce,2,1,`p`),i&2)kS(qS(2).error()?-1:0)}function ue(i,t){if(i&1&&LS(0,le,5,4,`div`,14,ie,!1,pe,1,1),i&2)jS(qS().keys())}var ee=class i{busy=AH(!1);disabled=NH(!1);i18n=g(Ie);api=g(w);confirmation=g(P);injector=g(ce$1);operationStatus=xH(`operationStatus`,{read:Hn});keys=Ke([]);loading=Ke(!0);error=Ke(void 0);errorOperation=Ke(`load`);errorMessage=Ft(()=>o(this.error(),this.errorOperation()));status=Ke(void 0);values=Ke({name:``,password:``});fields=nr(this.values,t=>{an(t,()=>this.busy()||this.disabled()),gn(t.name),cn(t.name,80),gn(t.password),cn(t.password,Ss.maxLength)});constructor(){Ol(()=>{this.reload()})}async reload(){this.loading.set(!0);let t=await this.api.list();t.success?this.keys.set(t.result):(this.errorOperation.set(`load`),this.error.set(t.code)),this.loading.set(!1)}async add(t){if(t.preventDefault(),!(this.busy()||this.disabled()||this.loading())){if(this.fields().invalid()){this.fields().markAsTouched(),this.fields().errorSummary()[0]?.fieldTree().focusBoundControl();return}this.busy.set(!0),this.error.set(void 0),this.status.set(void 0);try{let e=await this.api.register(this.values());e.success?(this.status.set(`passkey.added`),await this.reload(),Ol(()=>this.operationStatus()?.nativeElement.focus(),{injector:this.injector})):(this.errorOperation.set(`add`),this.error.set(e.code))}finally{this.values.set({name:``,password:``}),this.fields().reset(),t.target instanceof HTMLFormElement&&t.target.reset(),this.busy.set(!1)}}}async remove(t){if(!(this.busy()||this.disabled())){if(this.fields.password().invalid()){this.fields.password().markAsTouched(),this.fields.password().focusBoundControl();return}if(await this.confirmation.request(this.i18n.t(`passkey.remove_confirm`),{variant:`danger`})){this.busy.set(!0),this.error.set(void 0),this.status.set(void 0);try{let e=await this.api.remove(t.id,{password:this.values().password});e.success?(this.status.set(`passkey.removed`),await this.reload(),Ol(()=>this.operationStatus()?.nativeElement.focus(),{injector:this.injector})):(this.errorOperation.set(`remove`),this.error.set(e.code))}finally{this.values.update(e=>m(l({},e),{password:``})),this.busy.set(!1)}}}}canDeactivate(){return this.busy()?!1:!this.fields().dirty()||this.confirmation.request(this.i18n.t(`configurationWorkspace.unsaved`))}beforeUnload(t){(this.busy()||this.fields().dirty())&&t.preventDefault()}static ɵfac=function(e){return new(e||i)};static ɵcmp=Fb({type:i,selectors:[[`app-account-passkeys`]],viewQuery:function(e,n){e&1&&Ky(n.operationStatus,te,5,Hn),e&2&&e_()},hostBindings:function(e,n){e&1&&Gy(`beforeunload`,function(c){return n.beforeUnload(c)},Zw)},inputs:{busy:[1,`busy`],disabled:[1,`disabled`]},outputs:{busy:`busyChange`},decls:22,vars:12,consts:[[`operationStatus`,``],[`aria-labelledby`,`passkeys-title`,1,`passkeys`],[`id`,`passkeys-title`],[1,`muted`],[`appNotice`,``,`variant`,`info`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`appNotice`,``,`variant`,`success`,`role`,`status`,`tabindex`,`-1`],[`novalidate`,``,3,`submit`],[1,`field`],[`autocomplete`,`off`,1,`input`,3,`formField`],[`type`,`password`,`autocomplete`,`current-password`,1,`input`,3,`formField`],[1,`spacer-x-3`],[`role`,`status`],[`appButton`,``,`type`,`submit`,3,`disabled`],[1,`key`,`spacer-x-3`],[`appButton`,``,`type`,`button`,3,`click`,`disabled`]],template:function(e,n){if(e&1&&(Us(0,`section`,1)(1,`app-page-header`)(2,`h2`,2),y_(3),fd(),Us(4,`p`,3),y_(5),fd()(),Us(6,`p`,4),y_(7),fd(),OS(8,ne,2,1,`p`,5),OS(9,ae,3,1,`p`,6),Us(10,`form`,7),Gy(`submit`,function(c){return n.add(c)}),Us(11,`label`,8),y_(12),Py(13,`input`,9),qT(),fd(),Us(14,`label`,8),y_(15),Py(16,`input`,10),qT(),fd(),OS(17,se,3,2,`div`,11)(18,oe,2,1,`p`,4),fd(),OS(19,re,2,1,`p`,5),OS(20,de,2,1,`p`,12)(21,ue,3,1),fd()),e&2){let y,c;ZC(3),nv(n.i18n.t(`passkey.title`)),ZC(2),nv(n.i18n.t(`passkey.description`)),ZC(2),nv(n.i18n.t(`passkey.password_notice`)),ZC(),kS((y=n.errorMessage())?8:-1,y),ZC(),kS((c=n.status())?9:-1,c),ZC(3),nv(n.i18n.t(`passkey.name`)),ZC(),Fy(`formField`,n.fields.name),ZT(),ZC(2),nv(n.i18n.t(`passkey.password`)),ZC(),Fy(`formField`,n.fields.password),ZT(),ZC(),kS(n.api.supported?17:18),ZC(2),kS(n.fields().touched()&&n.fields().invalid()?19:-1),ZC(),kS(n.loading()?20:21)}},dependencies:[N,k,yn,g$1],styles:[`.passkeys[_ngcontent-%COMP%], form[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4)}.passkeys[_ngcontent-%COMP%]{padding:var(--%NS%space-6) var(--%NS%page-x)}.key[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.key[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow-wrap:anywhere;min-width:0}`]})};export{ee as AccountPasskeys};
@@ -1 +1 @@
1
- import{$t as ZC,D as Fy,It as Us,Tn as fd,W as KS,Wr as y_,en as ZS,nt as NH,rr as nv,vt as Py,w as Fb}from"./chunk-BAHiFuUo.js";import{i as r}from"./main-F7D3L737.js";var v=[`*`,[[``,`emptyActions`,``],[`button`],[`a`,`appLinkButton`,``]]];var S=[`*`,`[emptyActions], button, a[appLinkButton]`];var f=class p{icon=NH(`folder`);title=NH.required();static ɵfac=function(t){return new(t||p)};static ɵcmp=Fb({type:p,selectors:[[`app-empty-state`]],inputs:{icon:[1,`icon`],title:[1,`title`]},ngContentSelectors:S,decls:8,vars:2,consts:[[1,`heading`],[3,`name`],[1,`description`],[1,`actions`]],template:function(t,c){t&1&&(ZS(v),Us(0,`div`,0),Py(1,`app-icon`,1),Us(2,`h2`),y_(3),fd()(),Us(4,`div`,2),KS(5),fd(),Us(6,`div`,3),KS(7,1),fd()),t&2&&(ZC(),Fy(`name`,c.icon()),ZC(2),nv(c.title()))},dependencies:[r],styles:[`[_nghost-%COMP%]{display:grid;justify-items:start;gap:var(--%NS%space-4);padding:var(--%NS%space-5) var(--%NS%space-4)}.heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--%NS%space-3)}.heading[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{flex:none}h2[_ngcontent-%COMP%]{font-size:var(--%NS%text-lg)}.description[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-3);color:var(--%NS%color-muted)}.actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--%NS%space-3)}.description[_ngcontent-%COMP%]:empty, .actions[_ngcontent-%COMP%]:empty{display:none}`]})};export{f as t};
1
+ import{$t as ZC,D as Fy,It as Us,Tn as fd,W as KS,Wr as y_,en as ZS,nt as NH,rr as nv,vt as Py,w as Fb}from"./chunk-BAHiFuUo.js";import{i as r}from"./main-LXYWXFW4.js";var v=[`*`,[[``,`emptyActions`,``],[`button`],[`a`,`appLinkButton`,``]]];var S=[`*`,`[emptyActions], button, a[appLinkButton]`];var f=class p{icon=NH(`folder`);title=NH.required();static ɵfac=function(t){return new(t||p)};static ɵcmp=Fb({type:p,selectors:[[`app-empty-state`]],inputs:{icon:[1,`icon`],title:[1,`title`]},ngContentSelectors:S,decls:8,vars:2,consts:[[1,`heading`],[3,`name`],[1,`description`],[1,`actions`]],template:function(t,c){t&1&&(ZS(v),Us(0,`div`,0),Py(1,`app-icon`,1),Us(2,`h2`),y_(3),fd()(),Us(4,`div`,2),KS(5),fd(),Us(6,`div`,3),KS(7,1),fd()),t&2&&(ZC(),Fy(`name`,c.icon()),ZC(2),nv(c.title()))},dependencies:[r],styles:[`[_nghost-%COMP%]{display:grid;justify-items:start;gap:var(--%NS%space-4);padding:var(--%NS%space-5) var(--%NS%space-4)}.heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--%NS%space-3)}.heading[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{flex:none}h2[_ngcontent-%COMP%]{font-size:var(--%NS%text-lg)}.description[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-3);color:var(--%NS%color-muted)}.actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--%NS%space-3)}.description[_ngcontent-%COMP%]:empty, .actions[_ngcontent-%COMP%]:empty{display:none}`]})};export{f as t};
@@ -1 +1 @@
1
- import{n as m$1,t as l$1}from"./chunk-BwCtja5l.js";import{_ as o}from"./main-F7D3L737.js";import{i as I,n as D,y as x}from"./chunk-B6Rml85x2.js";function m(e,a){return e===null?a:`${e} \xB7 ${a}`}function g(e,a,u){let t=[{path:[`/affairs`,a.view??`attention`],queryParams:a,label:o(u,`backOffice.affairs.title`)}];return e&&t.push({path:[`/affairs`,e.id],queryParams:a,label:e.reference}),t}var l={draft:`default`,sent:`warning`,accepted:`success`,rejected:`danger`,expired:`warning`,cancelled:`danger`};function y(e){return{label:`backOffice.quote.status.${e}`,variant:l[e]}}var d={draft:`default`,issued:`success`,paid:`success`,void:`danger`};function b(e){return{label:x(e),variant:d[e]}}function v(e){let a=D(m$1(l$1({},e),{recordedPaidCents:I(e),totalCents:e.currentRevision.totalCents}));switch(a){case`billingWorkspace.paid`:case`billingWorkspace.credited`:return{label:a,variant:`success`};case`billingWorkspace.partial`:case`billingWorkspace.unpaid`:return{label:a,variant:`warning`};default:return{label:a,variant:`default`}}}export{y as a,v as i,g as n,m as r,b as t};
1
+ import{n as m$1,t as l$1}from"./chunk-BwCtja5l.js";import{_ as o}from"./main-LXYWXFW4.js";import{i as I,n as D,y as x}from"./chunk-BAYVC6mO2.js";function m(e,a){return e===null?a:`${e} \xB7 ${a}`}function g(e,a,u){let t=[{path:[`/affairs`,a.view??`attention`],queryParams:a,label:o(u,`backOffice.affairs.title`)}];return e&&t.push({path:[`/affairs`,e.id],queryParams:a,label:e.reference}),t}var l={draft:`default`,sent:`warning`,accepted:`success`,rejected:`danger`,expired:`warning`,cancelled:`danger`};function y(e){return{label:`backOffice.quote.status.${e}`,variant:l[e]}}var d={draft:`default`,issued:`success`,paid:`success`,void:`danger`};function b(e){return{label:x(e),variant:d[e]}}function v(e){let a=D(m$1(l$1({},e),{recordedPaidCents:I(e),totalCents:e.currentRevision.totalCents}));switch(a){case`billingWorkspace.paid`:case`billingWorkspace.credited`:return{label:a,variant:`success`};case`billingWorkspace.partial`:case`billingWorkspace.unpaid`:return{label:a,variant:`warning`};default:return{label:a,variant:`default`}}}export{y as a,v as i,g as n,m as r,b as t};
@@ -0,0 +1 @@
1
+ import{$t as ZC,A as Gy,D as Fy,Dn as g,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Rn as jS,Tn as fd,Wn as kS,Wr as y_,X as LS,ft as Ol,lt as OS,mr as qT,pr as qS,rr as nv,tn as ZT,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{T as ue,m as Ie,r as N}from"./main-LXYWXFW4.js";import"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import"./chunk-D8Ui_APT.js";import{t as S}from"./chunk-o83QpKCY.js";import{t as f}from"./chunk-BMiFx1ci.js";import{t as g$1}from"./chunk-B56nz2lI.js";import{t as k}from"./chunk-IrDYxRzS.js";import"./chunk-BzUDWIzm.js";import"./chunk-CReShp-B.js";import{d as nr,f as or,h as yn,o as gn}from"./chunk-CSkyOfSg.js";import"./chunk-CczD0yXn2.js";import{t as Ae}from"./chunk-C_4qOSvi2.js";import{t as c}from"./chunk-Ckk2HUrT.js";var K=(i,t)=>t.id;function $(i,t){if(i&1&&(Us(0,`p`,4),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(t))}}function G(i,t){if(i&1&&(Us(0,`p`,5),y_(1),fd()),i&2){let e=qS();ZC(),nv(e.i18n.t(`supplierInvoice.analysis.loading`))}}function J(i,t){if(i&1&&(Us(0,`option`,12),y_(1),fd()),i&2){let e=t.$implicit;Fy(`value`,e.id),ZC(),nv(e.displayName)}}function Q(i,t){if(i&1&&(Us(0,`p`,18),y_(1),fd(),Us(2,`label`,19),Py(3,`input`,20),qT(),y_(4),fd()),i&2){let e=qS(2);ZC(),nv(e.i18n.t(`supplierInvoice.analysis.externalNotice`)),ZC(2),Fy(`formField`,e.analysisForm.consent),ZT(),ZC(),nv(e.i18n.t(`supplierInvoice.analysis.consent`))}}function W(i,t){if(i&1&&(Us(0,`p`,15),y_(1),fd()),i&2){let e=qS(2);ZC(),nv(e.i18n.t(`supplierInvoice.analysis.localNotice`))}}function X(i,t){if(i&1){let e=zS();Us(0,`form`,7),Gy(`submit`,function(s){Ip(e);return wp(qS().analyze(s))}),Us(1,`div`,8)(2,`label`,9),y_(3),Us(4,`select`,10)(5,`option`,11),y_(6),fd(),LS(7,J,2,2,`option`,12,K),fd(),qT(),fd(),Us(9,`label`,13),y_(10),Us(11,`input`,14),Gy(`change`,function(s){Ip(e);return wp(qS().selectFile(s))}),fd()(),OS(12,Q,5,3)(13,W,2,1,`p`,15),fd(),Us(14,`div`,16)(15,`button`,17),y_(16),fd()()()}if(i&2){let e=qS();ZC(3),nv(e.i18n.t(`supplierInvoice.supplier`)),ZC(),Fy(`formField`,e.analysisForm.supplierId),ZT(),ZC(2),nv(e.i18n.t(`supplierInvoice.chooseSupplier`)),ZC(),jS(e.suppliers()),ZC(3),nv(e.i18n.t(`supplierInvoice.analysis.file`)),ZC(2),kS(e.external()?12:13),ZC(3),Fy(`disabled`,e.submitting()),ZC(),vd(` `,e.i18n.t(`supplierInvoice.analysis.submit`),` `)}}var Y=[`application/pdf`,`image/jpeg`,`image/png`,`image/webp`];var I=`,`;var Z=`supplier-invoice-analysis-file-read`;var q=i=>Y.some(t=>t===i);var ee=i=>new Promise((t,e)=>{let n=new FileReader;n.addEventListener(`error`,()=>e(n.error)),n.addEventListener(`load`,()=>{let s=n.result;if(!s.includes(I))return e(new Error(Z));t(s.slice(s.indexOf(I)+I.length))}),n.readAsDataURL(i)});var H=class i{i18n=g(Ie);invoicesApi=g(S);suppliersApi=g(c);router=g(ue);breadcrumbs=Ke([{label:this.i18n.t(`supplierInvoice.title`),path:`/purchases`}]);model=Ke({supplierId:``,consent:!1});analysisForm=nr(this.model,t=>gn(t.supplierId));suppliers=Ke([]);settings=Ke(void 0);file=Ke(void 0);loading=Ke(!0);submitting=Ke(!1);error=Ke(void 0);constructor(){Ol(()=>{this.load()})}external(){return this.settings()?.external===!0}selectFile(t){let e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;let n=e.files?.item(0)??void 0;this.file.set(n),n&&!q(n.type)?this.error.set(`supplierInvoice.analysis.invalidFile`):this.error.set(void 0)}analyze(t){t.preventDefault();let e=this.file();if(this.submitting()||this.analysisForm().invalid()||e===void 0){this.analysisForm().markAsTouched(),e===void 0&&this.error.set(`supplierInvoice.analysis.fileRequired`);return}if(!q(e.type)){this.error.set(`supplierInvoice.analysis.invalidFile`);return}let n=e.type;or(this.analysisForm,async()=>{this.submitting.set(!0),this.error.set(void 0);try{let s=await this.invoicesApi.analyze({requestId:crypto.randomUUID(),supplierId:this.model().supplierId,fileName:e.name,mediaType:n,contentBase64:await ee(e),consent:this.model().consent});if(!s.success){this.error.set(s.code);return}await this.router.navigate([`/purchases`,s.result.id])}catch{this.error.set(`supplierInvoice.analysis.failed`)}finally{this.submitting.set(!1)}})}async load(){try{let[t,e]=await Promise.all([this.suppliersApi.list(),this.invoicesApi.analysisStatus()]);this.suppliers.set(t.filter(n=>!n.archived)),e.success?this.settings.set(e.result):this.error.set(e.code)}catch{this.error.set(`supplierInvoice.analysis.failed`)}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=Fb({type:i,selectors:[[`app-supplier-invoice-analysis`]],hostAttrs:[1,`page-container`],decls:10,vars:7,consts:[[`aria-labelledby`,`supplier-invoice-analysis-title`,1,`detail-page`,`form-page`],[`layout`,`stacked`],[`pageBack`,``,3,`label`,`items`,`current`],[`id`,`supplier-invoice-analysis-title`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`role`,`status`],[`novalidate`,``],[`novalidate`,``,3,`submit`],[1,`ds-panel`,`form-panel`],[`for`,`analysis-supplier`,1,`field`],[`appFilterSelect`,``,`id`,`analysis-supplier`,1,`select`,3,`formField`],[`value`,``],[3,`value`],[`for`,`analysis-file`,1,`field`],[`id`,`analysis-file`,`type`,`file`,`accept`,`application/pdf,image/jpeg,image/png,image/webp`,1,`input`,3,`change`],[1,`muted`],[1,`actions`,`spacer-x-2`],[`appButton`,``,`variant`,`primary`,`type`,`submit`,3,`disabled`],[`appNotice`,``,`variant`,`warning`],[1,`consent`],[`type`,`checkbox`,3,`formField`]],template:function(e,n){if(e&1&&(Us(0,`section`,0)(1,`app-page-header`,1),Py(2,`app-breadcrumbs`,2),Us(3,`h1`,3),y_(4),fd(),Us(5,`p`),y_(6),fd()(),OS(7,$,2,1,`p`,4),OS(8,G,2,1,`p`,5)(9,X,17,7,`form`,6),fd()),e&2){let s;ZC(2),Fy(`label`,n.i18n.t(`backOfficeShell.breadcrumb`))(`items`,n.breadcrumbs())(`current`,n.i18n.t(`supplierInvoice.analysis.title`)),ZC(2),nv(n.i18n.t(`supplierInvoice.analysis.title`)),ZC(2),nv(n.i18n.t(`supplierInvoice.analysis.intro`)),ZC(),kS((s=n.error())?7:-1,s),ZC(),kS(n.loading()?8:9)}},dependencies:[Ae,f,N,yn,k,g$1],styles:[`[_nghost-%COMP%]{display:block}.detail-page[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4);min-inline-size:0;inline-size:100%;max-inline-size:var(--%NS%page-width-detail);margin-inline:auto;padding:var(--%NS%page-header-y) var(--%NS%page-x)}.detail-page.form-page[_ngcontent-%COMP%]{max-inline-size:var(--%NS%page-width-form)}.detail-page.wide-page[_ngcontent-%COMP%]{max-inline-size:var(--%NS%page-width-wide)}app-page-header[data-header-layout=stacked][_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-2xl);overflow-wrap:anywhere}app-page-header[data-header-layout=stacked][_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:var(--%NS%text-base);color:var(--%NS%color-muted);overflow-wrap:anywhere}.detail-page[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{justify-self:start}@media print{.detail-page[_ngcontent-%COMP%], .detail-page.form-page[_ngcontent-%COMP%], .detail-page.wide-page[_ngcontent-%COMP%]{max-inline-size:none}}.field[_ngcontent-%COMP%] + .field[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] + [appNotice][_ngcontent-%COMP%], .consent[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]{margin-block-start:var(--%NS%space-4)}.consent[_ngcontent-%COMP%]{display:flex;gap:var(--%NS%space-2);align-items:start}`]})};export{H as SupplierInvoiceAnalysisPage};
@@ -1 +1 @@
1
- import{Dn as g,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{bi as Va,gs as iy,ta as Ya}from"./chunk-D5qmP2Wu.js";var s=class e{http=g(OD);list(){return m(this.http.get(`/api/reminders`),iy,Va,`reminder.error`)}create(r,i){return m(this.http.put(`/api/reminders/${r}`,i),Ya,Va,`reminder.error`)}cancel(r){return m(this.http.post(`/api/reminders/${r}/cancel`,{}),Ya,Va,`reminder.error`)}static ɵfac=function(i){return new(i||e)};static ɵprov=A({token:e,factory:e.ɵfac,providedIn:`root`})};function T(e,r){if(e!==`reminder.error`)return e;switch(r){case`load`:return`reminder.loadError`;case`schedule`:return`reminder.scheduleUnconfirmed`;case`cancel`:return`reminder.cancelUnconfirmed`}}export{s as n,T as t};
1
+ import{Dn as g,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{bi as Va,gs as iy,ta as Ya}from"./chunk-D8Ui_APT.js";var s=class e{http=g(OD);list(){return m(this.http.get(`/api/reminders`),iy,Va,`reminder.error`)}create(r,i){return m(this.http.put(`/api/reminders/${r}`,i),Ya,Va,`reminder.error`)}cancel(r){return m(this.http.post(`/api/reminders/${r}/cancel`,{}),Ya,Va,`reminder.error`)}static ɵfac=function(i){return new(i||e)};static ɵprov=A({token:e,factory:e.ɵfac,providedIn:`root`})};function T(e,r){if(e!==`reminder.error`)return e;switch(r){case`load`:return`reminder.loadError`;case`schedule`:return`reminder.scheduleUnconfirmed`;case`cancel`:return`reminder.cancelUnconfirmed`}}export{s as n,T as t};
@@ -1 +1 @@
1
- import{$t as ZC,A as Gy,D as Fy,Dn as g,E as Ft,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Tn as fd,Wn as kS,Wr as y_,ft as Ol,lt as OS,mr as qT,pr as qS,rn as Zw,rr as nv,tn as ZT,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N,v as Dt}from"./main-F7D3L737.js";import{ct as Me,wi as wu}from"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import{E as Bg}from"./chunk-D5qmP2Wu.js";import"./chunk-BzUDWIzm.js";import"./chunk-CReShp-B.js";import{d as nr,h as yn,n as an,o as gn}from"./chunk-CSkyOfSg.js";import{t as k}from"./chunk-D5MFwK9L.js";import{t as P}from"./chunk-niXXbm7H.js";import{n as u,t as b}from"./chunk-BkvskoFt2.js";function L(n,t){if(n&1&&(Us(0,`p`,2),y_(1),fd()),n&2){let e=qS();ZC(),nv(e.i18n.t(t))}}function R(n,t){if(n&1&&(Us(0,`p`,3),y_(1),fd(),Us(2,`a`,4),y_(3),fd()),n&2){let e=qS();ZC(),nv(e.i18n.t(`team.joined`)),ZC(2),nv(e.i18n.t(`team.login`))}}function W(n,t){if(n&1){let e=zS();Us(0,`form`,5),Gy(`submit`,function(m){Ip(e);return wp(qS().accept(m))}),Us(1,`label`),y_(2),Py(3,`input`,6),qT(),fd(),Us(4,`p`,7),y_(5),fd(),Us(6,`label`),y_(7),Py(8,`input`,8),qT(),fd(),Us(9,`button`,9),y_(10),fd()()}if(n&2){let e=qS();ZC(2),nv(e.i18n.t(`team.password`)),ZC(),Fy(`formField`,e.joinForm.password),ZT(),ZC(2),nv(e.i18n.t(`team.passwordHint`)),ZC(2),nv(e.i18n.t(`team.confirmPassword`)),ZC(),Fy(`formField`,e.joinForm.confirmation),ZT(),ZC(),Fy(`disabled`,e.busy()||!e.ready()||e.joinForm().invalid()),ZC(),vd(` `,e.i18n.t(`team.accept`),` `)}}var K=class n{i18n=g(Ie);api=g(u);confirmation=g(P);token=``;busy=Ke(!1);ready=Ke(!1);accepted=Ke(!1);error=Ke(void 0);errorMessage=Ft(()=>b(this.error(),`join`));joinForm=nr(Ke({password:``,confirmation:``}),t=>{gn(t.password),gn(t.confirmation),an(t,()=>this.busy()||!this.ready())});constructor(){Ol(()=>{this.token=window.location.hash.slice(1),window.history.replaceState(window.history.state,``,window.location.pathname),this.ready.set(wu.is(Bg.fields.token)(this.token)),this.ready()||this.error.set(`team.invitation_rejected`)})}async accept(t){if(t.preventDefault(),this.busy()||!this.ready())return;let e=this.joinForm().value(),r=wu.decodeUnknownOption(Bg)({token:this.token,password:e.password});if(Me.isNone(r)||e.password!==e.confirmation){this.error.set(`team.passwordInvalid`);return}this.busy.set(!0),this.error.set(void 0);try{let m=await this.api.accept(r.value);if(!m.success){this.error.set(m.code);return}this.token=``,this.accepted.set(!0),this.ready.set(!1),this.joinForm().reset({password:``,confirmation:``})}finally{this.busy.set(!1)}}canDeactivate(){return this.busy()?!1:!this.joinForm().dirty()||this.confirmation.request(this.i18n.t(`team.leave`))}beforeUnload(t){(this.busy()||this.joinForm().dirty())&&(t.preventDefault(),t.returnValue=``)}static ɵfac=function(e){return new(e||n)};static ɵcmp=Fb({type:n,selectors:[[`app-team-join`]],hostAttrs:[1,`page-container`],hostBindings:function(e,r){e&1&&Gy(`beforeunload`,function(f){return r.beforeUnload(f)},Zw)},decls:8,vars:4,consts:[[`aria-labelledby`,`join-title`,1,`notice-flow`],[`id`,`join-title`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`appNotice`,``,`variant`,`success`,`role`,`status`],[`routerLink`,`/login`],[3,`submit`],[`type`,`password`,`autocomplete`,`new-password`,`aria-describedby`,`password-hint`,1,`input`,3,`formField`],[`id`,`password-hint`],[`type`,`password`,`autocomplete`,`new-password`,1,`input`,3,`formField`],[`appButton`,``,`variant`,`primary`,`type`,`submit`,3,`disabled`]],template:function(e,r){if(e&1&&(Us(0,`section`,0)(1,`h1`,1),y_(2),fd(),Us(3,`p`),y_(4),fd(),OS(5,L,2,1,`p`,2),OS(6,R,4,2)(7,W,11,7,`form`),fd()),e&2){let m;ZC(2),nv(r.i18n.t(`team.join`)),ZC(2),nv(r.i18n.t(`team.joinHint`)),ZC(),kS((m=r.errorMessage())?5:-1,m),ZC(),kS(r.accepted()?6:7)}},dependencies:[yn,N,k,Dt],styles:[`[_nghost-%COMP%]{display:block;max-width:38rem;margin-inline:auto;padding:var(--%NS%page-header-y) var(--%NS%page-x)}h1[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-block-start:var(--%NS%space-3)}form[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4);margin-block-start:var(--%NS%space-6)}label[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2)}`]})};export{K as TeamJoin};
1
+ import{$t as ZC,A as Gy,D as Fy,Dn as g,E as Ft,Ir as wp,It as Us,Jr as zS,K as Ke,Nr as vd,Tn as fd,Wn as kS,Wr as y_,ft as Ol,lt as OS,mr as qT,pr as qS,rn as Zw,rr as nv,tn as ZT,vt as Py,w as Fb,z as Ip}from"./chunk-BAHiFuUo.js";import{m as Ie,r as N,v as Dt}from"./main-LXYWXFW4.js";import{ct as Me,wi as wu}from"./chunk-BAe_07VM.js";import"./chunk-Dv9sNWWK.js";import{E as Bg}from"./chunk-D8Ui_APT.js";import{t as k}from"./chunk-IrDYxRzS.js";import"./chunk-BzUDWIzm.js";import{t as P}from"./chunk-CkRw7h0_.js";import"./chunk-CReShp-B.js";import{d as nr,h as yn,n as an,o as gn}from"./chunk-CSkyOfSg.js";import{n as u,t as b}from"./chunk-BWBbQ7HE2.js";function L(n,t){if(n&1&&(Us(0,`p`,2),y_(1),fd()),n&2){let e=qS();ZC(),nv(e.i18n.t(t))}}function R(n,t){if(n&1&&(Us(0,`p`,3),y_(1),fd(),Us(2,`a`,4),y_(3),fd()),n&2){let e=qS();ZC(),nv(e.i18n.t(`team.joined`)),ZC(2),nv(e.i18n.t(`team.login`))}}function W(n,t){if(n&1){let e=zS();Us(0,`form`,5),Gy(`submit`,function(m){Ip(e);return wp(qS().accept(m))}),Us(1,`label`),y_(2),Py(3,`input`,6),qT(),fd(),Us(4,`p`,7),y_(5),fd(),Us(6,`label`),y_(7),Py(8,`input`,8),qT(),fd(),Us(9,`button`,9),y_(10),fd()()}if(n&2){let e=qS();ZC(2),nv(e.i18n.t(`team.password`)),ZC(),Fy(`formField`,e.joinForm.password),ZT(),ZC(2),nv(e.i18n.t(`team.passwordHint`)),ZC(2),nv(e.i18n.t(`team.confirmPassword`)),ZC(),Fy(`formField`,e.joinForm.confirmation),ZT(),ZC(),Fy(`disabled`,e.busy()||!e.ready()||e.joinForm().invalid()),ZC(),vd(` `,e.i18n.t(`team.accept`),` `)}}var K=class n{i18n=g(Ie);api=g(u);confirmation=g(P);token=``;busy=Ke(!1);ready=Ke(!1);accepted=Ke(!1);error=Ke(void 0);errorMessage=Ft(()=>b(this.error(),`join`));joinForm=nr(Ke({password:``,confirmation:``}),t=>{gn(t.password),gn(t.confirmation),an(t,()=>this.busy()||!this.ready())});constructor(){Ol(()=>{this.token=window.location.hash.slice(1),window.history.replaceState(window.history.state,``,window.location.pathname),this.ready.set(wu.is(Bg.fields.token)(this.token)),this.ready()||this.error.set(`team.invitation_rejected`)})}async accept(t){if(t.preventDefault(),this.busy()||!this.ready())return;let e=this.joinForm().value(),r=wu.decodeUnknownOption(Bg)({token:this.token,password:e.password});if(Me.isNone(r)||e.password!==e.confirmation){this.error.set(`team.passwordInvalid`);return}this.busy.set(!0),this.error.set(void 0);try{let m=await this.api.accept(r.value);if(!m.success){this.error.set(m.code);return}this.token=``,this.accepted.set(!0),this.ready.set(!1),this.joinForm().reset({password:``,confirmation:``})}finally{this.busy.set(!1)}}canDeactivate(){return this.busy()?!1:!this.joinForm().dirty()||this.confirmation.request(this.i18n.t(`team.leave`))}beforeUnload(t){(this.busy()||this.joinForm().dirty())&&(t.preventDefault(),t.returnValue=``)}static ɵfac=function(e){return new(e||n)};static ɵcmp=Fb({type:n,selectors:[[`app-team-join`]],hostAttrs:[1,`page-container`],hostBindings:function(e,r){e&1&&Gy(`beforeunload`,function(f){return r.beforeUnload(f)},Zw)},decls:8,vars:4,consts:[[`aria-labelledby`,`join-title`,1,`notice-flow`],[`id`,`join-title`],[`appNotice`,``,`variant`,`danger`,`role`,`alert`],[`appNotice`,``,`variant`,`success`,`role`,`status`],[`routerLink`,`/login`],[3,`submit`],[`type`,`password`,`autocomplete`,`new-password`,`aria-describedby`,`password-hint`,1,`input`,3,`formField`],[`id`,`password-hint`],[`type`,`password`,`autocomplete`,`new-password`,1,`input`,3,`formField`],[`appButton`,``,`variant`,`primary`,`type`,`submit`,3,`disabled`]],template:function(e,r){if(e&1&&(Us(0,`section`,0)(1,`h1`,1),y_(2),fd(),Us(3,`p`),y_(4),fd(),OS(5,L,2,1,`p`,2),OS(6,R,4,2)(7,W,11,7,`form`),fd()),e&2){let m;ZC(2),nv(r.i18n.t(`team.join`)),ZC(2),nv(r.i18n.t(`team.joinHint`)),ZC(),kS((m=r.errorMessage())?5:-1,m),ZC(),kS(r.accepted()?6:7)}},dependencies:[yn,N,k,Dt],styles:[`[_nghost-%COMP%]{display:block;max-width:38rem;margin-inline:auto;padding:var(--%NS%page-header-y) var(--%NS%page-x)}h1[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-block-start:var(--%NS%space-3)}form[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-4);margin-block-start:var(--%NS%space-6)}label[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2)}`]})};export{K as TeamJoin};
@@ -1,4 +1,4 @@
1
- import{i as o,n as m$1,t as l}from"./chunk-BwCtja5l.js";import{A as F9,Ai as xt$1,An as du$1,Bn as fD,Br as qre,C as D$1,Cn as ce,Ct as RG,Dt as Rp$1,E as E0,En as cs,Er as oe,Fi as yo$1,Fn as eie,Fr as pt$1,G as J,Gn as fs,Gr as ra$1,Hn as fde,Hr as r6,In as es$1,It as To,J as Jn,Jn as hl$1,Jr as rm$1,Jt as Vm$1,Kr as re,Ln as et,Lt as Ty$1,Mr as pl$1,Ni as ya$1,O as Ee$1,Or as or$1,P as G$1,Pi as yn$1,Qr as s1,Ri as zi$1,Rt as U$1,S as Cr$1,Sr as nm$1,St as RD,T as De$1,Tr as obe,U as Ie$1,Un as fe$1,Ut as Us,Vn as fP,Vt as Uj,W as Ir,Wn as fee,Xn as i2,Xr as rs,Yn as ht$1,Yr as rp$1,Yt as We$1,Z as Jt$1,Zn as ip$1,Zr as rt$1,_r as ma$1,_t as OD,a as $h$1,ai as sy$1,an as Zd$1,b as Cn$1,bt as Pe$1,c as Ah,ct as Me,dt as Nh$1,ei as sX,en as YK,fn as aD$1,g as C0$1,gn as ay$1,gr as ls,h as Bne,hi as ut$1,hn as at,ht as O0,i as $de,in as ZU,jt as Sd$1,ki as xo$1,kn as dr$1,kr as ot$1,li as to$1,m as Bm$1,mi as us,mr as le,ni as sl$1,nn as Yt,nr as jde,nt as L$1,o as AG,on as Zf$1,ot as Lh$1,p as Be,pn as an$1,qr as rie,qt as Vd$1,r as $d$1,ri as sn$1,rn as Z,rr as jn,rt as LV,sn as Zi$1,sr as k$1,st as M0,t as $$1,tr as jb,tt as Kt$1,ui as u$1,ur as kt$1,vn as bn$1,vr as mte,wi as wu$1,wt as RO,xr as nc$1,z as Hde}from"./chunk-BAe_07VM.js";var Gc=wu$1.Struct({status:wu$1.Literal(`ok`)});var fe=wu$1.String.check(wu$1.isPattern(/\S/));var a=wu$1.String.check(wu$1.isPattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/));var Cy=wu$1.Literals([`api-token`,`client`]);var A={affairRead:{code:`affair.read`,audiences:[`api-token`]},affairCreate:{code:`affair.create`,audiences:[`api-token`]},affairUpdate:{code:`affair.update`,audiences:[`api-token`]},integrationConfigure:{code:`integration.configure`,audiences:[]},ledgerRead:{code:`ledger.read`,audiences:[]},ledgerPost:{code:`ledger.post`,audiences:[]},invoiceCredit:{code:`invoice.credit`,audiences:[]},invoiceRefund:{code:`invoice.refund`,audiences:[]},emailDraftManage:{code:`email.draft.manage`,audiences:[]},emailTemplateManage:{code:`email.template.manage`,audiences:[]},emailReminderManage:{code:`email.reminder.manage`,audiences:[]},bankRead:{code:`bank.read`,audiences:[]},bankImport:{code:`bank.import`,audiences:[]},bankReconcile:{code:`bank.reconcile`,audiences:[]},catalogRead:{code:`catalog.read`,audiences:[]},catalogManage:{code:`catalog.manage`,audiences:[]},issuerRead:{code:`issuer.read`,audiences:[]},issuerUpdate:{code:`issuer.update`,audiences:[]},companyRead:{code:`company.read`,audiences:[]},companyUpdate:{code:`company.update`,audiences:[]},conditionRead:{code:`condition.read`,audiences:[]},conditionManage:{code:`condition.manage`,audiences:[]},paymentRead:{code:`payment.read`,audiences:[`api-token`]},integrationManage:{code:`integration.manage`,audiences:[]},clientRead:{code:`client.read`,audiences:[`api-token`]},clientCreate:{code:`client.create`,audiences:[`api-token`]},clientUpdate:{code:`client.update`,audiences:[`api-token`]},clientArchive:{code:`client.archive`,audiences:[`api-token`]},clientAccessManage:{code:`client.access.manage`,audiences:[]},supplierRead:{code:`supplier.read`,audiences:[`api-token`]},supplierCreate:{code:`supplier.create`,audiences:[`api-token`]},supplierUpdate:{code:`supplier.update`,audiences:[`api-token`]},supplierArchive:{code:`supplier.archive`,audiences:[`api-token`]},supplierInvoiceRead:{code:`supplier-invoice.read`,audiences:[`api-token`]},supplierInvoiceCreate:{code:`supplier-invoice.create`,audiences:[`api-token`]},supplierInvoiceUpdate:{code:`supplier-invoice.update`,audiences:[`api-token`]},supplierInvoiceApprove:{code:`supplier-invoice.approve`,audiences:[]},supplierInvoiceAnalyze:{code:`supplier-invoice.analyze`,audiences:[]},supplierInvoicePay:{code:`supplier-invoice.pay`,audiences:[]},quoteRead:{code:`quote.read`,audiences:[`api-token`,`client`]},quoteCreate:{code:`quote.create`,audiences:[`api-token`]},quoteUpdate:{code:`quote.update`,audiences:[`api-token`]},quoteDelete:{code:`quote.delete`,audiences:[`api-token`]},quoteSend:{code:`quote.send`,audiences:[`api-token`]},quoteSign:{code:`quote.sign`,audiences:[]},orderRead:{code:`order.read`,audiences:[`api-token`,`client`]},orderCreate:{code:`order.create`,audiences:[]},orderUpdate:{code:`order.update`,audiences:[]},invoiceRead:{code:`invoice.read`,audiences:[`api-token`,`client`]},invoiceCreate:{code:`invoice.create`,audiences:[`api-token`]},invoiceUpdate:{code:`invoice.update`,audiences:[`api-token`]},invoiceIssue:{code:`invoice.issue`,audiences:[`api-token`]},invoiceSend:{code:`invoice.send`,audiences:[]},invoiceMarkPaid:{code:`invoice.mark-paid`,audiences:[`api-token`]},invoiceVoid:{code:`invoice.void`,audiences:[`api-token`]},templateRead:{code:`template.read`,audiences:[]},templateSelect:{code:`template.select`,audiences:[]},documentRender:{code:`document.render`,audiences:[]},documentDownload:{code:`document.download`,audiences:[`api-token`,`client`]},userRead:{code:`user.read`,audiences:[]},userCreate:{code:`user.create`,audiences:[]},userUpdate:{code:`user.update`,audiences:[]},roleRead:{code:`role.read`,audiences:[]},roleManage:{code:`role.manage`,audiences:[]},sessionManage:{code:`session.manage`,audiences:[]},apiTokenManage:{code:`api-token.manage`,audiences:[]},auditRead:{code:`audit.read`,audiences:[]},accountingRead:{code:`accounting.read`,audiences:[`api-token`]},accountingWrite:{code:`accounting.write`,audiences:[`api-token`]},accountingValidate:{code:`accounting.validate`,audiences:[]},accountingClose:{code:`accounting.close`,audiences:[]},accountingExport:{code:`accounting.export`,audiences:[`api-token`]},accountingEvidence:{code:`accounting.evidence`,audiences:[`api-token`]},demoReset:{code:`demo.reset`,audiences:[]}};var Kc=t=>{let[r,...o]=t;if(r===void 0)throw new Error(`permission.registry.empty`);return[r,...o]};var ky=t=>t.audiences.some(r=>r===`api-token`);var Ry=t=>t.audiences.some(r=>r===`client`);var ys=Kc(Object.values(A));var OA=Kc(ys.map(({code:t})=>t));var GA=Kc(ys.filter(ky).map(({code:t})=>t));var vy=ys.filter(Ry).map(({code:t})=>t);var Cr=wu$1.Literals(OA);var xs=wu$1.Literals(GA);var Ss={minLength:12,maxLength:256};var kr=wu$1.Literals([`sales`,`purchasing`,`banking`,`accounting`,`tax`,`ai`,`demonstration`]);var se=wu$1.String.check(wu$1.isMaxLength(254),wu$1.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/));var Oe=wu$1.String.check(wu$1.isMinLength(Ss.minLength),wu$1.isMaxLength(Ss.maxLength));var Wc=wu$1.Literals([`client`,`administrator`]);var Jc=wu$1.Struct({email:se,password:Oe});var Yc=wu$1.Struct({currentPassword:Oe,newPassword:Oe});var mo=class extends wu$1.TaggedError()(`PasswordChangeRejected`,{code:wu$1.Literal(`authentication.password_change_rejected`)},{httpApiStatus:409}){};var Vt=wu$1.Struct({expiresAt:wu$1.Int,mode:Wc});var KA=wu$1.Literals([`inline`,`toast`,`snack`]);var $n=wu$1.Struct({theme:wu$1.Literals([`light`,`dark`]),language:wu$1.Literals([`fr`,`en`]),flashMode:KA});var Vc=wu$1.Struct({userId:a,email:se,mode:Wc,permissions:wu$1.UniqueArray(Cr),enabledModules:wu$1.UniqueArray(kr),preferences:$n});var fo=class extends wu$1.TaggedError()(`AuthenticationRejected`,{code:wu$1.Literal(`authentication.invalid_credentials`)},{httpApiStatus:401}){};var ho=class extends wu$1.TaggedError()(`SessionRejected`,{code:wu$1.Literal(`authentication.invalid_session`)},{httpApiStatus:401}){};var go=class extends wu$1.TaggedError()(`AuthenticationRateLimited`,{code:wu$1.Literal(`authentication.rate_limited`)},{httpApiStatus:429}){};var E=class extends wu$1.TaggedError()(`RequestRateLimited`,{code:wu$1.Literal(`request.rate_limited`)},{httpApiStatus:429}){};var he=class extends wu$1.TaggedError()(`RequestInvalidOrigin`,{code:wu$1.Literal(`request.invalid_origin`)},{httpApiStatus:403}){};var Ve=class extends wu$1.TaggedError()(`RequestTooLarge`,{code:wu$1.Literal(`request.too_large`)},{httpApiStatus:413}){};var k=class extends wu$1.TaggedError()(`AuthenticationRequired`,{code:wu$1.Literal(`authentication.required`)},{httpApiStatus:401}){};var v=class extends wu$1.TaggedError()(`PermissionDenied`,{code:wu$1.Literal(`authentication.permission_denied`)},{httpApiStatus:403}){};var by=wu$1.Union([fo,go]);var Ey=wu$1.Union([mo,k,E,he,Ve]);var w=wu$1.String.check(wu$1.isPattern(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/),wu$1.makeFilter(t=>Me.exists(Ty$1.make(t),r=>Ty$1.formatIso(r)===t),{message:`temporal.utc.invalid`}));var Ze=wu$1.String.check(wu$1.isPattern(/^\d{4}-\d{2}-\d{2}$/));var T=Ze.check(wu$1.makeFilter(t=>Me.exists(Ty$1.make(t),r=>Ty$1.formatIsoDateUtc(r)===t),{message:`invoice.invalid_dates`}));var B=wu$1.Number.check(wu$1.isInt(),wu$1.isGreaterThanOrEqualTo(0),wu$1.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));var b=B.check(wu$1.isGreaterThan(0));var Rr=wu$1.Struct({description:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(160)),quantityMilli:b,unitPriceCents:B,vatRateBasisPoints:B.check(wu$1.isLessThanOrEqualTo(1e4))});var WA=(t,r)=>(t+r/2n)/r;var ei=wu$1.Struct(m$1(l({id:a,position:B},Rr.fields),{netTotalCents:B,vatTotalCents:B,totalCents:B})).check(wu$1.makeFilter(t=>{let r=WA(BigInt(t.quantityMilli)*BigInt(t.unitPriceCents),1000n),o=WA(r*BigInt(t.vatRateBasisPoints),10000n),n=[];return BigInt(t.netTotalCents)!==r&&n.push({path:[`netTotalCents`],issue:`document.line.net_total.invalid`}),BigInt(t.vatTotalCents)!==o&&n.push({path:[`vatTotalCents`],issue:`document.line.vat_total.invalid`}),BigInt(t.totalCents)!==r+o&&n.push({path:[`totalCents`],issue:`document.line.total.invalid`}),n}));var Zt=wu$1.Array(ei).check(wu$1.isMinLength(1),wu$1.isMaxLength(20),wu$1.makeFilter(t=>{let r=[],o=new Set;for(let[n,i]of t.entries())i.position!==n&&r.push({path:[n,`position`],issue:`document.line.position.invalid`}),o.has(i.id)&&r.push({path:[n,`id`],issue:`document.line.id.duplicate`}),o.add(i.id);return r}));var rt=wu$1.makeFilter(t=>{let r=t.lines.reduce((i,s)=>i+BigInt(s.netTotalCents),0n),o=t.lines.reduce((i,s)=>i+BigInt(s.vatTotalCents),0n),n=[];return BigInt(t.netTotalCents)!==r&&n.push({path:[`netTotalCents`],issue:`document.net_total.invalid`}),BigInt(t.vatTotalCents)!==o&&n.push({path:[`vatTotalCents`],issue:`document.vat_total.invalid`}),BigInt(t.totalCents)!==r+o&&n.push({path:[`totalCents`],issue:`document.total.invalid`}),n});var Zc=wu$1.Literal(`FR`);var U=wu$1.String.check(wu$1.isPattern(/^[A-Z]{3}$/));var _t=U;var JA=wu$1.Literals([`ecb`,`manual`]);var Is=wu$1.Struct({id:a,rateDate:T,functionalCurrency:U,foreignCurrency:U,foreignUnitsPerFunctionalUnitNanos:b,source:JA,importedAt:wu$1.Int,createdByUserId:wu$1.NullOr(a)}).annotate({identifier:`ExchangeRate`});var Cs=wu$1.Array(Is).check(wu$1.isMaxLength(1e4));var _c=wu$1.Struct({rateDate:T,foreignCurrency:U,foreignUnitsPerFunctionalUnitNanos:b}).annotate({identifier:`ExchangeRateManualRequest`});var YA=wu$1.Struct({fiscalYearStartMonth:wu$1.Int.check(wu$1.isBetween({minimum:1,maximum:12})),fiscalYearStartDay:wu$1.Int.check(wu$1.isBetween({minimum:1,maximum:31}))});var VA=wu$1.makeFilter(({fiscalYearStartMonth:t,fiscalYearStartDay:r})=>new Date(Date.UTC(2024,t-1,r)).getUTCMonth()===t-1,{message:`company.fiscal_year_start_invalid`});var ti=wu$1.Struct(m$1(l({jurisdiction:Zc,functionalCurrency:_t,accountingInitialized:wu$1.Boolean},YA.fields),{defaultFiscalYearMonths:wu$1.Literal(12),enabledModules:wu$1.Array(kr).check(wu$1.isUnique()),retentionYears:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(10)),version:wu$1.Int.check(wu$1.isGreaterThan(0)),updatedAt:wu$1.Int})).check(VA).annotate({identifier:`CompanySettings`});var jc=wu$1.Struct(m$1(l({jurisdiction:Zc,functionalCurrency:_t},YA.fields),{enabledModules:wu$1.Array(kr).check(wu$1.isUnique()),retentionYears:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(10)),expectedVersion:wu$1.Int.check(wu$1.isGreaterThan(0))})).check(VA).annotate({identifier:`CompanySettingsUpdateRequest`});var zc=wu$1.Struct({functionalCurrency:_t,expectedVersion:wu$1.Int.check(wu$1.isGreaterThan(0))}).annotate({identifier:`AccountingInitializeRequest`});var vr=class extends wu$1.TaggedError()(`CompanySettingsConflict`,{code:wu$1.Literal(`company.settings_conflict`)}){};var yo=class extends wu$1.TaggedError()(`FunctionalCurrencyLocked`,{code:wu$1.Literal(`company.functional_currency_locked`)}){};var xo=class extends wu$1.TaggedError()(`AccountingAlreadyInitialized`,{code:wu$1.Literal(`company.accounting_already_initialized`)}){};var So=class extends wu$1.TaggedError()(`ExchangeRateConflict`,{code:wu$1.Literal(`company.exchange_rate_conflict`)}){};var Io=class extends wu$1.TaggedError()(`ExchangeRateImportFailed`,{code:wu$1.Literal(`company.exchange_rate_import_failed`)}){};var wy=wu$1.Union([k,v,E,vr,yo,xo,So,Io]);var br=wu$1.Number.check(wu$1.isInt(),wu$1.isGreaterThanOrEqualTo(Number.MIN_SAFE_INTEGER),wu$1.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));var ni=wu$1.String.check(wu$1.isPattern(/^\d{2,20}$/));var $c=wu$1.Literals([`asset`,`liability`,`equity`,`income`,`expense`]);var ii=wu$1.Struct({id:a,code:ni,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(160)),kind:$c,system:wu$1.Boolean,archived:wu$1.Boolean,version:b});var ZA=wu$1.Array(ii).check(wu$1.isMaxLength(1e4));var ep=wu$1.Struct({code:ni,label:ii.fields.label,kind:$c,archived:wu$1.Boolean,expectedVersion:wu$1.NullOr(b)});var Er=wu$1.Struct({id:a,code:wu$1.String.check(wu$1.isPattern(/^[A-Z0-9]{2,10}$/)),label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),kind:wu$1.Literals([`sales`,`purchases`,`bank`,`general`,`opening`]),archived:wu$1.Boolean,version:b});var _A=wu$1.Array(Er);var tp=wu$1.Struct({code:Er.fields.code,label:Er.fields.label,kind:Er.fields.kind,archived:wu$1.Boolean,expectedVersion:wu$1.NullOr(b)});var Ty=wu$1.Literals([`open`,`locked`,`closed`]);var Ht=wu$1.Struct({id:a,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),startsOn:T,endsOn:T,status:Ty,finalClosed:wu$1.Boolean,version:b});var jA=wu$1.Array(Ht);var zA=wu$1.Struct({label:Ht.fields.label,startsOn:T,endsOn:T});var ks=wu$1.Struct({expectedVersion:b});var XA=wu$1.Struct({expectedVersion:b,acknowledgement:Ht.fields.label});var $A=wu$1.Struct({accountId:a,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(240)),debitCents:B,creditCents:B});var By=wu$1.Struct(l({id:a,position:B},$A.fields));var Ly=wu$1.Literals([`draft`,`posted`,`reversed`]);var jt=wu$1.Struct({id:a,requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a,entryDate:T,reference:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),description:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(240)),currency:U,status:Ly,reversalOfEntryId:wu$1.NullOr(a),version:b,createdAt:wu$1.Int,postedAt:wu$1.NullOr(wu$1.Int),lines:wu$1.Array(By).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var em=wu$1.Array(jt).check(wu$1.isMaxLength(1e4));var tm=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a,entryDate:T,reference:jt.fields.reference,description:jt.fields.description,lines:wu$1.Array($A).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var rp=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),expectedVersion:b});var zt=wu$1.Struct({startsOn:T,endsOn:T});var op=wu$1.Struct({accountCode:ni,accountLabel:wu$1.String,debitCents:B,creditCents:B,balanceCents:br});var rm=wu$1.Struct({startsOn:T,endsOn:T,rows:wu$1.Array(op),debitCents:B,creditCents:B});var Py=wu$1.Struct({entryId:a,entryDate:T,journalCode:wu$1.String,reference:wu$1.String,description:wu$1.String,accountCode:ni,accountLabel:wu$1.String,lineLabel:wu$1.String,debitCents:B,creditCents:B});var om=wu$1.Struct({startsOn:T,endsOn:T,rows:wu$1.Array(Py)});var ri=wu$1.Struct({kind:$c,rows:wu$1.Array(op),totalCents:br});var nm=wu$1.Struct({startsOn:T,endsOn:T,assets:ri,liabilities:ri,equity:ri,income:ri,expenses:ri,netIncomeCents:br});var Dy=wu$1.Struct({code:wu$1.String,amountCents:br});var im=wu$1.Struct({jurisdiction:wu$1.Literal(`FR`),startsOn:T,endsOn:T,collectedVatCents:br,deductibleVatCents:br,payableVatCents:br,ca3:wu$1.Array(Dy)});var np=wu$1.Literals([`local`,`http`]);var Fy=2e3;var Hy=2e3;var ip=wu$1.Struct({adapter:np,endpoint:wu$1.NullOr(wu$1.String),credentialsPresent:wu$1.Boolean,updatedAt:wu$1.NullOr(wu$1.Int)});var sm=wu$1.Struct({adapter:np,endpoint:wu$1.NullOr(wu$1.String.check(wu$1.isPattern(/^https:\/\/[^\s/@]+(?:\/[^\s]*)?$/),wu$1.isMaxLength(Fy))),apiKey:wu$1.NullOr(wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(Hy)))});var sp=wu$1.Struct(l({requestId:wu$1.String.check(wu$1.isUUID(4))},zt.fields));var ap=wu$1.Struct({id:a,requestId:sp.fields.requestId,adapter:np,startsOn:T,endsOn:T,payloadSha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),providerReceipt:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(500)),submittedAt:wu$1.Int});var am=wu$1.Array(ap);var My=wu$1.Struct({accountCode:wu$1.String,accountLabel:wu$1.String,debit:wu$1.String,credit:wu$1.String});var cp=wu$1.Struct({csv:wu$1.String.check(wu$1.isMaxLength(5e6)),delimiter:wu$1.Literals([`,`,`;`,` `]),columns:My,entryDate:T});var cm=wu$1.Struct({rows:wu$1.Array(op),debitCents:B,creditCents:B,balanced:wu$1.Boolean});var pm=wu$1.Struct(m$1(l({},cp.fields),{requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a}));var oi=wu$1.Struct({id:a,entryId:a,fileName:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(255)),mediaType:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),size:b,sha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),createdAt:wu$1.Int});var dm=wu$1.Array(oi);var um=wu$1.Struct({entryId:a,fileName:oi.fields.fileName,mediaType:oi.fields.mediaType,contentBase64:wu$1.String.check(wu$1.isMaxLength(2e7))});var qy=wu$1.Struct({lineId:a,entryId:a,entryDate:T,reference:wu$1.String,accountId:a,accountCode:ni,accountLabel:wu$1.String,lineLabel:wu$1.String,debitCents:B,creditCents:B,letteringCode:wu$1.NullOr(wu$1.String)});var lm=wu$1.Array(qy).check(wu$1.isMaxLength(1e4));var Am=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),lineIds:wu$1.Array(a).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var mm=wu$1.Struct({id:a,code:wu$1.String,accountId:a,lineIds:wu$1.Array(a),createdAt:wu$1.Int});var Xc=class extends wu$1.TaggedError()(`AccountingConflict`,{code:wu$1.Literals([`accounting.not_found`,`accounting.version_conflict`,`accounting.code_conflict`,`accounting.period_overlap`,`accounting.period_not_open`,`accounting.period_final_closed`,`accounting.period_transition_invalid`,`accounting.period_has_drafts`,`accounting.period_reopen_acknowledgement_invalid`,`accounting.entry_unbalanced`,`accounting.entry_not_draft`,`accounting.entry_not_posted`,`accounting.opening_unbalanced`,`accounting.csv_invalid`,`accounting.lettering_invalid`,`accounting.lettering_conflict`,`accounting.tax_filing_configuration_invalid`,`accounting.tax_filing_failed`,`accounting.encryption_unavailable`])}){};var G=wu$1.Union([k,v,E,Xc]);var wR=50;var TR=30;var BR=100;var LR=180;var PR=120;var DR=240;var FR=48;var fm=wu$1.Struct({clients:wu$1.Int,suppliers:wu$1.Int,affairs:wu$1.Int,quotes:wu$1.Int,supplierInvoices:wu$1.Int,bankTransactions:wu$1.Int,accountingEntries:wu$1.Int});var hm=wu$1.Struct({password:wu$1.String.check(wu$1.isMinLength(1),wu$1.isMaxLength(1024)),confirmed:wu$1.Literal(!0)});var pp=class extends wu$1.TaggedError()(`DemoResetRejected`,{code:wu$1.Literals([`demo.environment_rejected`,`demo.secret_missing`,`demo.password_conflict`,`demo.password_invalid`])}){};var gm=wu$1.Union([k,v,E,pp]);var dp=wu$1.String.check(wu$1.isMinLength(1),wu$1.isMaxLength(120));var up=wu$1.String.check(wu$1.isMaxLength(2048),wu$1.isPattern(/^(?:\/(?!\/)[^\s]*|https:\/\/[^\s]+)$/));var Rs=wu$1.Struct({name:dp,logoUrl:up,version:wu$1.Int});var lp=wu$1.Struct({name:wu$1.NullOr(dp),logoUrl:wu$1.NullOr(up),expectedVersion:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(0))});var si=class extends wu$1.TaggedError()(`BrandingConflict`,{code:wu$1.Literal(`company.branding_conflict`)}){};var ge=wu$1.String.check(wu$1.isPattern(/^DE-[0-9]{4}-[0-9]{6}$/));var Le=wu$1.String.check(wu$1.isPattern(/^CO-[0-9]{4}-[0-9]{6}$/));var vs=wu$1.String.check(wu$1.isPattern(/^FA-[0-9]{4}-[0-9]{6}$/));var Xt=wu$1.Union([vs,wu$1.String.check(wu$1.isPattern(/^F-[0-9]{6,}$/))]);var wr=wu$1.Struct({timeZone:wu$1.String.check(wu$1.makeFilter(t=>Me.isSome(Ty$1.zoneMakeNamed(t)),{message:`document.calendar.invalid_time_zone`}))});var $t=wu$1.Struct({displayName:fe.check(wu$1.isMaxLength(160)),addressLine1:wu$1.String.check(wu$1.isMaxLength(160)),addressLine2:wu$1.String.check(wu$1.isMaxLength(160)),postalCode:wu$1.String.check(wu$1.isMaxLength(32)),city:wu$1.String.check(wu$1.isMaxLength(120)),country:wu$1.String.check(wu$1.isMaxLength(120)),email:wu$1.String.check(wu$1.isMaxLength(254)),phone:wu$1.String.check(wu$1.isMaxLength(64))});var ft=wu$1.Struct(m$1(l({},$t.fields),{registrationNumber:wu$1.String.check(wu$1.isMaxLength(64)),vatNumber:wu$1.String.check(wu$1.isMaxLength(64))}));var ym=wu$1.Struct({party:wu$1.Literals([`issuer`,`client`]),field:wu$1.Literals([`displayName`,`addressLine1`,`city`,`country`,`email`,`phone`]),reason:wu$1.Literals([`required`,`invalid_email`,`invalid_phone`])});var ot=class extends wu$1.TaggedError()(`DocumentIncomplete`,{code:wu$1.Literal(`document.incomplete`),issues:wu$1.Array(ym).check(wu$1.isMinLength(1),wu$1.isMaxLength(10))},{httpApiStatus:409}){};var Ap=wu$1.Struct({id:a,quoteReference:ge,revisionId:a,kind:wu$1.Literal(`quote-pdf`),contentType:wu$1.Literal(`application/pdf`),byteSize:b,sha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),createdAt:w});var pe=class extends wu$1.TaggedError()(`DocumentNotFound`,{code:wu$1.Literal(`document.not_found`)},{httpApiStatus:404}){};var nt=class extends wu$1.TaggedError()(`QuotePreviewUnavailable`,{code:wu$1.Literal(`quote.preview_unavailable`)},{httpApiStatus:409}){};function gp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=gp();function bm(t){Lr=t}var Tr={exec:()=>null};function Co(t){let r=[];return o=>{let n=Math.max(0,Math.min(3,o-1)),i=r[n];return i||(i=t(n),r[n]=i),i}}function N(t,r=``){let o=typeof t==`string`?t:t.source,n={replace:(i,s)=>{let d=typeof s==`string`?s:s.source;return d=d.replace(ye.caret,`$1`),o=o.replace(i,d),n},getRegex:()=>new RegExp(o,r)};return n}var Uy=((t=``)=>{try{return!!new RegExp(`(?<=1)(?<!1)`+t)}catch{return!1}})();var ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Co(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Co(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Co(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Co(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Co(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Co(t=>new RegExp(`^ {0,${t}}>`))};var Qy=/^(?:[ \t]*(?:\n|$))+/;var Ny=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;var Oy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;var pi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;var Gy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;var yp=/ {0,3}(?:[*+-]|\d{1,9}[.)])/;var Em=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;var wm=N(Em).replace(/bull/g,yp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex();var Ky=N(Em).replace(/bull/g,yp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();var xp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;var Wy=/^[^\n]+/;var Sp=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;var Jy=N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Sp).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();var Yy=N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,yp).getRegex();var Bs=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`;var Ip=/<!--(?:-?>|[\s\S]*?(?:-->|$))/;var Vy=N(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Ip).replace(`tag`,Bs).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();var Tm=t=>N(xp).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,t).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex();var Zy=Tm(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);var _y=Tm(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);var Cp={blockquote:N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,_y).getRegex(),code:Ny,def:Jy,fences:Oy,heading:Gy,hr:pi,html:Vy,lheading:wm,list:Yy,newline:Qy,paragraph:Zy,table:Tr,text:Wy};var xm=N(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex();var zy=m$1(l({},Cp),{lheading:Ky,table:xm,paragraph:N(xp).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,xm).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex()});var Xy=m$1(l({},Cp),{html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Ip).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(xp).replace(`hr`,pi).replace(`heading`,` *#{1,6} *[^
1
+ import{i as o,n as m$1,t as l}from"./chunk-BwCtja5l.js";import{A as F9,Ai as xt$1,An as du$1,Bn as fD,Br as qre,C as D$1,Cn as ce,Ct as RG,Dt as Rp$1,E as E0,En as cs,Er as oe,Fi as yo$1,Fn as eie,Fr as pt$1,G as J,Gn as fs,Gr as ra$1,Hn as fde,Hr as r6,In as es$1,It as To,J as Jn,Jn as hl$1,Jr as rm$1,Jt as Vm$1,Kr as re,Ln as et,Lt as Ty$1,Mr as pl$1,Ni as ya$1,O as Ee$1,Or as or$1,P as G$1,Pi as yn$1,Qr as s1,Ri as zi$1,Rt as U$1,S as Cr$1,Sr as nm$1,St as RD,T as De$1,Tr as obe,U as Ie$1,Un as fe$1,Ut as Us,Vn as fP,Vt as Uj,W as Ir,Wn as fee,Xn as i2,Xr as rs,Yn as ht$1,Yr as rp$1,Yt as We$1,Z as Jt$1,Zn as ip$1,Zr as rt$1,_r as ma$1,_t as OD,a as $h$1,ai as sy$1,an as Zd$1,b as Cn$1,bt as Pe$1,c as Ah,ct as Me,dt as Nh$1,ei as sX,en as YK,fn as aD$1,g as C0$1,gn as ay$1,gr as ls,h as Bne,hi as ut$1,hn as at,ht as O0,i as $de,in as ZU,jt as Sd$1,ki as xo$1,kn as dr$1,kr as ot$1,li as to$1,m as Bm$1,mi as us,mr as le,ni as sl$1,nn as Yt,nr as jde,nt as L$1,o as AG,on as Zf$1,ot as Lh$1,p as Be,pn as an$1,qr as rie,qt as Vd$1,r as $d$1,ri as sn$1,rn as Z,rr as jn,rt as LV,sn as Zi$1,sr as k$1,st as M0,t as $$1,tr as jb,tt as Kt$1,ui as u$1,ur as kt$1,vn as bn$1,vr as mte,wi as wu$1,wt as RO,xr as nc$1,z as Hde}from"./chunk-BAe_07VM.js";var Gc=wu$1.Struct({status:wu$1.Literal(`ok`)});var fe=wu$1.String.check(wu$1.isPattern(/\S/));var a=wu$1.String.check(wu$1.isPattern(/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/));var Cy=wu$1.Literals([`api-token`,`client`]);var A={affairRead:{code:`affair.read`,audiences:[`api-token`]},affairCreate:{code:`affair.create`,audiences:[`api-token`]},affairUpdate:{code:`affair.update`,audiences:[`api-token`]},integrationConfigure:{code:`integration.configure`,audiences:[]},ledgerRead:{code:`ledger.read`,audiences:[]},ledgerPost:{code:`ledger.post`,audiences:[]},invoiceCredit:{code:`invoice.credit`,audiences:[]},invoiceRefund:{code:`invoice.refund`,audiences:[]},emailDraftManage:{code:`email.draft.manage`,audiences:[]},emailTemplateManage:{code:`email.template.manage`,audiences:[]},emailReminderManage:{code:`email.reminder.manage`,audiences:[]},bankRead:{code:`bank.read`,audiences:[]},bankImport:{code:`bank.import`,audiences:[]},bankReconcile:{code:`bank.reconcile`,audiences:[]},catalogRead:{code:`catalog.read`,audiences:[]},catalogManage:{code:`catalog.manage`,audiences:[]},issuerRead:{code:`issuer.read`,audiences:[]},issuerUpdate:{code:`issuer.update`,audiences:[]},companyRead:{code:`company.read`,audiences:[]},companyUpdate:{code:`company.update`,audiences:[]},conditionRead:{code:`condition.read`,audiences:[]},conditionManage:{code:`condition.manage`,audiences:[]},paymentRead:{code:`payment.read`,audiences:[`api-token`]},integrationManage:{code:`integration.manage`,audiences:[]},clientRead:{code:`client.read`,audiences:[`api-token`]},clientCreate:{code:`client.create`,audiences:[`api-token`]},clientUpdate:{code:`client.update`,audiences:[`api-token`]},clientArchive:{code:`client.archive`,audiences:[`api-token`]},clientAccessManage:{code:`client.access.manage`,audiences:[]},supplierRead:{code:`supplier.read`,audiences:[`api-token`]},supplierCreate:{code:`supplier.create`,audiences:[`api-token`]},supplierUpdate:{code:`supplier.update`,audiences:[`api-token`]},supplierArchive:{code:`supplier.archive`,audiences:[`api-token`]},supplierInvoiceRead:{code:`supplier-invoice.read`,audiences:[`api-token`]},supplierInvoiceCreate:{code:`supplier-invoice.create`,audiences:[`api-token`]},supplierInvoiceUpdate:{code:`supplier-invoice.update`,audiences:[`api-token`]},supplierInvoiceApprove:{code:`supplier-invoice.approve`,audiences:[]},supplierInvoiceAnalyze:{code:`supplier-invoice.analyze`,audiences:[]},supplierInvoicePay:{code:`supplier-invoice.pay`,audiences:[]},quoteRead:{code:`quote.read`,audiences:[`api-token`,`client`]},quoteCreate:{code:`quote.create`,audiences:[`api-token`]},quoteUpdate:{code:`quote.update`,audiences:[`api-token`]},quoteDelete:{code:`quote.delete`,audiences:[`api-token`]},quoteSend:{code:`quote.send`,audiences:[`api-token`]},quoteSign:{code:`quote.sign`,audiences:[]},orderRead:{code:`order.read`,audiences:[`api-token`,`client`]},orderCreate:{code:`order.create`,audiences:[]},orderUpdate:{code:`order.update`,audiences:[]},invoiceRead:{code:`invoice.read`,audiences:[`api-token`,`client`]},invoiceCreate:{code:`invoice.create`,audiences:[`api-token`]},invoiceUpdate:{code:`invoice.update`,audiences:[`api-token`]},invoiceIssue:{code:`invoice.issue`,audiences:[`api-token`]},invoiceSend:{code:`invoice.send`,audiences:[]},invoiceMarkPaid:{code:`invoice.mark-paid`,audiences:[`api-token`]},invoiceVoid:{code:`invoice.void`,audiences:[`api-token`]},templateRead:{code:`template.read`,audiences:[]},templateSelect:{code:`template.select`,audiences:[]},documentRender:{code:`document.render`,audiences:[]},documentDownload:{code:`document.download`,audiences:[`api-token`,`client`]},userRead:{code:`user.read`,audiences:[]},userCreate:{code:`user.create`,audiences:[]},userUpdate:{code:`user.update`,audiences:[]},roleRead:{code:`role.read`,audiences:[]},roleManage:{code:`role.manage`,audiences:[]},sessionManage:{code:`session.manage`,audiences:[]},apiTokenManage:{code:`api-token.manage`,audiences:[]},auditRead:{code:`audit.read`,audiences:[]},accountingRead:{code:`accounting.read`,audiences:[`api-token`]},accountingWrite:{code:`accounting.write`,audiences:[`api-token`]},accountingValidate:{code:`accounting.validate`,audiences:[]},accountingClose:{code:`accounting.close`,audiences:[]},accountingExport:{code:`accounting.export`,audiences:[`api-token`]},accountingEvidence:{code:`accounting.evidence`,audiences:[`api-token`]},demoReset:{code:`demo.reset`,audiences:[]}};var Kc=t=>{let[r,...o]=t;if(r===void 0)throw new Error(`permission.registry.empty`);return[r,...o]};var ky=t=>t.audiences.some(r=>r===`api-token`);var Ry=t=>t.audiences.some(r=>r===`client`);var ys=Kc(Object.values(A));var OA=Kc(ys.map(({code:t})=>t));var GA=Kc(ys.filter(ky).map(({code:t})=>t));var vy=ys.filter(Ry).map(({code:t})=>t);var Cr=wu$1.Literals(OA);var xs=wu$1.Literals(GA);var Ss={minLength:12,maxLength:256};var kr=wu$1.Literals([`sales`,`purchasing`,`banking`,`accounting`,`tax`,`ai`,`demonstration`]);var se=wu$1.String.check(wu$1.isMaxLength(254),wu$1.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/));var Oe=wu$1.String.check(wu$1.isMinLength(Ss.minLength),wu$1.isMaxLength(Ss.maxLength));var Wc=wu$1.Literals([`client`,`administrator`]);var Jc=wu$1.Struct({email:se,password:Oe});var Yc=wu$1.Struct({currentPassword:Oe,newPassword:Oe});var mo=class extends wu$1.TaggedError()(`PasswordChangeRejected`,{code:wu$1.Literal(`authentication.password_change_rejected`)},{httpApiStatus:409}){};var Vt=wu$1.Struct({expiresAt:wu$1.Int,mode:Wc});var KA=wu$1.Literals([`inline`,`toast`,`snack`]);var $n=wu$1.Struct({theme:wu$1.Literals([`light`,`dark`]),language:wu$1.Literals([`fr`,`en`]),flashMode:KA});var Vc=wu$1.Struct({userId:a,email:se,mode:Wc,permissions:wu$1.UniqueArray(Cr),enabledModules:wu$1.UniqueArray(kr),preferences:$n});var fo=class extends wu$1.TaggedError()(`AuthenticationRejected`,{code:wu$1.Literal(`authentication.invalid_credentials`)},{httpApiStatus:401}){};var ho=class extends wu$1.TaggedError()(`SessionRejected`,{code:wu$1.Literal(`authentication.invalid_session`)},{httpApiStatus:401}){};var go=class extends wu$1.TaggedError()(`AuthenticationRateLimited`,{code:wu$1.Literal(`authentication.rate_limited`)},{httpApiStatus:429}){};var E=class extends wu$1.TaggedError()(`RequestRateLimited`,{code:wu$1.Literal(`request.rate_limited`)},{httpApiStatus:429}){};var he=class extends wu$1.TaggedError()(`RequestInvalidOrigin`,{code:wu$1.Literal(`request.invalid_origin`)},{httpApiStatus:403}){};var Ve=class extends wu$1.TaggedError()(`RequestTooLarge`,{code:wu$1.Literal(`request.too_large`)},{httpApiStatus:413}){};var k=class extends wu$1.TaggedError()(`AuthenticationRequired`,{code:wu$1.Literal(`authentication.required`)},{httpApiStatus:401}){};var v=class extends wu$1.TaggedError()(`PermissionDenied`,{code:wu$1.Literal(`authentication.permission_denied`)},{httpApiStatus:403}){};var by=wu$1.Union([fo,go]);var Ey=wu$1.Union([mo,k,E,he,Ve]);var w=wu$1.String.check(wu$1.isPattern(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/),wu$1.makeFilter(t=>Me.exists(Ty$1.make(t),r=>Ty$1.formatIso(r)===t),{message:`temporal.utc.invalid`}));var Ze=wu$1.String.check(wu$1.isPattern(/^\d{4}-\d{2}-\d{2}$/));var T=Ze.check(wu$1.makeFilter(t=>Me.exists(Ty$1.make(t),r=>Ty$1.formatIsoDateUtc(r)===t),{message:`invoice.invalid_dates`}));var B=wu$1.Number.check(wu$1.isInt(),wu$1.isGreaterThanOrEqualTo(0),wu$1.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));var b=B.check(wu$1.isGreaterThan(0));var Rr=wu$1.Struct({description:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(160)),quantityMilli:b,unitPriceCents:B,vatRateBasisPoints:B.check(wu$1.isLessThanOrEqualTo(1e4))});var WA=(t,r)=>(t+r/2n)/r;var ei=wu$1.Struct(m$1(l({id:a,position:B},Rr.fields),{netTotalCents:B,vatTotalCents:B,totalCents:B})).check(wu$1.makeFilter(t=>{let r=WA(BigInt(t.quantityMilli)*BigInt(t.unitPriceCents),1000n),o=WA(r*BigInt(t.vatRateBasisPoints),10000n),n=[];return BigInt(t.netTotalCents)!==r&&n.push({path:[`netTotalCents`],issue:`document.line.net_total.invalid`}),BigInt(t.vatTotalCents)!==o&&n.push({path:[`vatTotalCents`],issue:`document.line.vat_total.invalid`}),BigInt(t.totalCents)!==r+o&&n.push({path:[`totalCents`],issue:`document.line.total.invalid`}),n}));var Zt=wu$1.Array(ei).check(wu$1.isMinLength(1),wu$1.isMaxLength(20),wu$1.makeFilter(t=>{let r=[],o=new Set;for(let[n,i]of t.entries())i.position!==n&&r.push({path:[n,`position`],issue:`document.line.position.invalid`}),o.has(i.id)&&r.push({path:[n,`id`],issue:`document.line.id.duplicate`}),o.add(i.id);return r}));var rt=wu$1.makeFilter(t=>{let r=t.lines.reduce((i,s)=>i+BigInt(s.netTotalCents),0n),o=t.lines.reduce((i,s)=>i+BigInt(s.vatTotalCents),0n),n=[];return BigInt(t.netTotalCents)!==r&&n.push({path:[`netTotalCents`],issue:`document.net_total.invalid`}),BigInt(t.vatTotalCents)!==o&&n.push({path:[`vatTotalCents`],issue:`document.vat_total.invalid`}),BigInt(t.totalCents)!==r+o&&n.push({path:[`totalCents`],issue:`document.total.invalid`}),n});var Zc=wu$1.Literal(`FR`);var U=wu$1.String.check(wu$1.isPattern(/^[A-Z]{3}$/));var _t=U;var JA=wu$1.Literals([`ecb`,`manual`]);var Is=wu$1.Struct({id:a,rateDate:T,functionalCurrency:U,foreignCurrency:U,foreignUnitsPerFunctionalUnitNanos:b,source:JA,importedAt:wu$1.Int,createdByUserId:wu$1.NullOr(a)}).annotate({identifier:`ExchangeRate`});var Cs=wu$1.Array(Is).check(wu$1.isMaxLength(1e4));var _c=wu$1.Struct({rateDate:T,foreignCurrency:U,foreignUnitsPerFunctionalUnitNanos:b}).annotate({identifier:`ExchangeRateManualRequest`});var YA=wu$1.Struct({fiscalYearStartMonth:wu$1.Int.check(wu$1.isBetween({minimum:1,maximum:12})),fiscalYearStartDay:wu$1.Int.check(wu$1.isBetween({minimum:1,maximum:31}))});var VA=wu$1.makeFilter(({fiscalYearStartMonth:t,fiscalYearStartDay:r})=>new Date(Date.UTC(2024,t-1,r)).getUTCMonth()===t-1,{message:`company.fiscal_year_start_invalid`});var ti=wu$1.Struct(m$1(l({jurisdiction:Zc,functionalCurrency:_t,accountingInitialized:wu$1.Boolean},YA.fields),{defaultFiscalYearMonths:wu$1.Literal(12),enabledModules:wu$1.Array(kr).check(wu$1.isUnique()),retentionYears:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(10)),version:wu$1.Int.check(wu$1.isGreaterThan(0)),updatedAt:wu$1.Int})).check(VA).annotate({identifier:`CompanySettings`});var jc=wu$1.Struct(m$1(l({jurisdiction:Zc,functionalCurrency:_t},YA.fields),{enabledModules:wu$1.Array(kr).check(wu$1.isUnique()),retentionYears:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(10)),expectedVersion:wu$1.Int.check(wu$1.isGreaterThan(0))})).check(VA).annotate({identifier:`CompanySettingsUpdateRequest`});var zc=wu$1.Struct({functionalCurrency:_t,expectedVersion:wu$1.Int.check(wu$1.isGreaterThan(0))}).annotate({identifier:`AccountingInitializeRequest`});var vr=class extends wu$1.TaggedError()(`CompanySettingsConflict`,{code:wu$1.Literal(`company.settings_conflict`)}){};var yo=class extends wu$1.TaggedError()(`FunctionalCurrencyLocked`,{code:wu$1.Literal(`company.functional_currency_locked`)}){};var xo=class extends wu$1.TaggedError()(`AccountingAlreadyInitialized`,{code:wu$1.Literal(`company.accounting_already_initialized`)}){};var So=class extends wu$1.TaggedError()(`ExchangeRateConflict`,{code:wu$1.Literal(`company.exchange_rate_conflict`)}){};var Io=class extends wu$1.TaggedError()(`ExchangeRateImportFailed`,{code:wu$1.Literal(`company.exchange_rate_import_failed`)}){};var wy=wu$1.Union([k,v,E,vr,yo,xo,So,Io]);var br=wu$1.Number.check(wu$1.isInt(),wu$1.isGreaterThanOrEqualTo(Number.MIN_SAFE_INTEGER),wu$1.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));var ni=wu$1.String.check(wu$1.isPattern(/^\d{2,20}$/));var $c=wu$1.Literals([`asset`,`liability`,`equity`,`income`,`expense`]);var ii=wu$1.Struct({id:a,code:ni,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(160)),kind:$c,system:wu$1.Boolean,archived:wu$1.Boolean,version:b});var ZA=wu$1.Array(ii).check(wu$1.isMaxLength(1e4));var ep=wu$1.Struct({code:ni,label:ii.fields.label,kind:$c,archived:wu$1.Boolean,expectedVersion:wu$1.NullOr(b)});var Er=wu$1.Struct({id:a,code:wu$1.String.check(wu$1.isPattern(/^[A-Z0-9]{2,10}$/)),label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),kind:wu$1.Literals([`sales`,`purchases`,`bank`,`general`,`opening`]),archived:wu$1.Boolean,version:b});var _A=wu$1.Array(Er);var tp=wu$1.Struct({code:Er.fields.code,label:Er.fields.label,kind:Er.fields.kind,archived:wu$1.Boolean,expectedVersion:wu$1.NullOr(b)});var Ty=wu$1.Literals([`open`,`locked`,`closed`]);var Ht=wu$1.Struct({id:a,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),startsOn:T,endsOn:T,status:Ty,finalClosed:wu$1.Boolean,version:b});var jA=wu$1.Array(Ht);var zA=wu$1.Struct({label:Ht.fields.label,startsOn:T,endsOn:T});var ks=wu$1.Struct({expectedVersion:b});var XA=wu$1.Struct({expectedVersion:b,acknowledgement:Ht.fields.label});var $A=wu$1.Struct({accountId:a,label:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(240)),debitCents:B,creditCents:B});var By=wu$1.Struct(l({id:a,position:B},$A.fields));var Ly=wu$1.Literals([`draft`,`posted`,`reversed`]);var jt=wu$1.Struct({id:a,requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a,entryDate:T,reference:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),description:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(240)),currency:U,status:Ly,reversalOfEntryId:wu$1.NullOr(a),version:b,createdAt:wu$1.Int,postedAt:wu$1.NullOr(wu$1.Int),lines:wu$1.Array(By).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var em=wu$1.Array(jt).check(wu$1.isMaxLength(1e4));var tm=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a,entryDate:T,reference:jt.fields.reference,description:jt.fields.description,lines:wu$1.Array($A).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var rp=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),expectedVersion:b});var zt=wu$1.Struct({startsOn:T,endsOn:T});var op=wu$1.Struct({accountCode:ni,accountLabel:wu$1.String,debitCents:B,creditCents:B,balanceCents:br});var rm=wu$1.Struct({startsOn:T,endsOn:T,rows:wu$1.Array(op),debitCents:B,creditCents:B});var Py=wu$1.Struct({entryId:a,entryDate:T,journalCode:wu$1.String,reference:wu$1.String,description:wu$1.String,accountCode:ni,accountLabel:wu$1.String,lineLabel:wu$1.String,debitCents:B,creditCents:B});var om=wu$1.Struct({startsOn:T,endsOn:T,rows:wu$1.Array(Py)});var ri=wu$1.Struct({kind:$c,rows:wu$1.Array(op),totalCents:br});var nm=wu$1.Struct({startsOn:T,endsOn:T,assets:ri,liabilities:ri,equity:ri,income:ri,expenses:ri,netIncomeCents:br});var Dy=wu$1.Struct({code:wu$1.String,amountCents:br});var im=wu$1.Struct({jurisdiction:wu$1.Literal(`FR`),startsOn:T,endsOn:T,collectedVatCents:br,deductibleVatCents:br,payableVatCents:br,ca3:wu$1.Array(Dy)});var np=wu$1.Literals([`local`,`http`]);var Fy=2e3;var Hy=2e3;var ip=wu$1.Struct({adapter:np,endpoint:wu$1.NullOr(wu$1.String),credentialsPresent:wu$1.Boolean,updatedAt:wu$1.NullOr(wu$1.Int)});var sm=wu$1.Struct({adapter:np,endpoint:wu$1.NullOr(wu$1.String.check(wu$1.isPattern(/^https:\/\/[^\s/@]+(?:\/[^\s]*)?$/),wu$1.isMaxLength(Fy))),apiKey:wu$1.NullOr(wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(Hy)))});var sp=wu$1.Struct(l({requestId:wu$1.String.check(wu$1.isUUID(4))},zt.fields));var ap=wu$1.Struct({id:a,requestId:sp.fields.requestId,adapter:np,startsOn:T,endsOn:T,payloadSha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),providerReceipt:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(500)),submittedAt:wu$1.Int});var am=wu$1.Array(ap);var My=wu$1.Struct({accountCode:wu$1.String,accountLabel:wu$1.String,debit:wu$1.String,credit:wu$1.String});var cp=wu$1.Struct({csv:wu$1.String.check(wu$1.isMaxLength(5e6)),delimiter:wu$1.Literals([`,`,`;`,` `]),columns:My,entryDate:T});var cm=wu$1.Struct({rows:wu$1.Array(op),debitCents:B,creditCents:B,balanced:wu$1.Boolean});var pm=wu$1.Struct(m$1(l({},cp.fields),{requestId:wu$1.String.check(wu$1.isUUID(4)),journalId:a,periodId:a}));var oi=wu$1.Struct({id:a,entryId:a,fileName:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(255)),mediaType:wu$1.String.check(wu$1.isPattern(/\S/),wu$1.isMaxLength(120)),size:b,sha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),createdAt:wu$1.Int});var dm=wu$1.Array(oi);var um=wu$1.Struct({entryId:a,fileName:oi.fields.fileName,mediaType:oi.fields.mediaType,contentBase64:wu$1.String.check(wu$1.isMaxLength(2e7))});var qy=wu$1.Struct({lineId:a,entryId:a,entryDate:T,reference:wu$1.String,accountId:a,accountCode:ni,accountLabel:wu$1.String,lineLabel:wu$1.String,debitCents:B,creditCents:B,letteringCode:wu$1.NullOr(wu$1.String)});var lm=wu$1.Array(qy).check(wu$1.isMaxLength(1e4));var Am=wu$1.Struct({requestId:wu$1.String.check(wu$1.isUUID(4)),lineIds:wu$1.Array(a).check(wu$1.isMinLength(2),wu$1.isMaxLength(1e3))});var mm=wu$1.Struct({id:a,code:wu$1.String,accountId:a,lineIds:wu$1.Array(a),createdAt:wu$1.Int});var Xc=class extends wu$1.TaggedError()(`AccountingConflict`,{code:wu$1.Literals([`accounting.not_found`,`accounting.version_conflict`,`accounting.code_conflict`,`accounting.period_overlap`,`accounting.period_not_open`,`accounting.period_final_closed`,`accounting.period_transition_invalid`,`accounting.period_has_drafts`,`accounting.period_reopen_acknowledgement_invalid`,`accounting.entry_unbalanced`,`accounting.entry_not_draft`,`accounting.entry_not_posted`,`accounting.opening_unbalanced`,`accounting.csv_invalid`,`accounting.lettering_invalid`,`accounting.lettering_conflict`,`accounting.tax_filing_configuration_invalid`,`accounting.tax_filing_failed`,`accounting.encryption_unavailable`])}){};var G=wu$1.Union([k,v,E,Xc]);var wR=50;var TR=30;var BR=100;var LR=180;var PR=120;var DR=240;var FR=48;var fm=wu$1.Struct({clients:wu$1.Int,suppliers:wu$1.Int,affairs:wu$1.Int,quotes:wu$1.Int,supplierInvoices:wu$1.Int,bankTransactions:wu$1.Int,accountingEntries:wu$1.Int});var hm=wu$1.Struct({password:wu$1.String.check(wu$1.isMinLength(1),wu$1.isMaxLength(1024)),confirmed:wu$1.Literal(!0)});var pp=class extends wu$1.TaggedError()(`DemoResetRejected`,{code:wu$1.Literals([`demo.environment_rejected`,`demo.secret_missing`,`demo.password_conflict`,`demo.password_invalid`])}){};var gm=wu$1.Union([k,v,E,pp]);var dp=wu$1.String.check(wu$1.isMinLength(1),wu$1.isMaxLength(120));var up=wu$1.String.check(wu$1.isMaxLength(35e4),wu$1.isPattern(/^(?:\/(?!\/)[^\s]*|https:\/\/[^\s]+|data:image\/(?:png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2})$/));var Rs=wu$1.Struct({name:dp,logoUrl:up,version:wu$1.Int});var lp=wu$1.Struct({name:wu$1.NullOr(dp),logoUrl:wu$1.NullOr(up),expectedVersion:wu$1.Int.check(wu$1.isGreaterThanOrEqualTo(0))});var si=class extends wu$1.TaggedError()(`BrandingConflict`,{code:wu$1.Literal(`company.branding_conflict`)}){};var ge=wu$1.String.check(wu$1.isPattern(/^DE-[0-9]{4}-[0-9]{6}$/));var Le=wu$1.String.check(wu$1.isPattern(/^CO-[0-9]{4}-[0-9]{6}$/));var vs=wu$1.String.check(wu$1.isPattern(/^FA-[0-9]{4}-[0-9]{6}$/));var Xt=wu$1.Union([vs,wu$1.String.check(wu$1.isPattern(/^F-[0-9]{6,}$/))]);var wr=wu$1.Struct({timeZone:wu$1.String.check(wu$1.makeFilter(t=>Me.isSome(Ty$1.zoneMakeNamed(t)),{message:`document.calendar.invalid_time_zone`}))});var $t=wu$1.Struct({displayName:fe.check(wu$1.isMaxLength(160)),addressLine1:wu$1.String.check(wu$1.isMaxLength(160)),addressLine2:wu$1.String.check(wu$1.isMaxLength(160)),postalCode:wu$1.String.check(wu$1.isMaxLength(32)),city:wu$1.String.check(wu$1.isMaxLength(120)),country:wu$1.String.check(wu$1.isMaxLength(120)),email:wu$1.String.check(wu$1.isMaxLength(254)),phone:wu$1.String.check(wu$1.isMaxLength(64))});var ft=wu$1.Struct(m$1(l({},$t.fields),{registrationNumber:wu$1.String.check(wu$1.isMaxLength(64)),vatNumber:wu$1.String.check(wu$1.isMaxLength(64))}));var ym=wu$1.Struct({party:wu$1.Literals([`issuer`,`client`]),field:wu$1.Literals([`displayName`,`addressLine1`,`city`,`country`,`email`,`phone`]),reason:wu$1.Literals([`required`,`invalid_email`,`invalid_phone`])});var ot=class extends wu$1.TaggedError()(`DocumentIncomplete`,{code:wu$1.Literal(`document.incomplete`),issues:wu$1.Array(ym).check(wu$1.isMinLength(1),wu$1.isMaxLength(10))},{httpApiStatus:409}){};var Ap=wu$1.Struct({id:a,quoteReference:ge,revisionId:a,kind:wu$1.Literal(`quote-pdf`),contentType:wu$1.Literal(`application/pdf`),byteSize:b,sha256:wu$1.String.check(wu$1.isPattern(/^[a-f0-9]{64}$/)),createdAt:w});var pe=class extends wu$1.TaggedError()(`DocumentNotFound`,{code:wu$1.Literal(`document.not_found`)},{httpApiStatus:404}){};var nt=class extends wu$1.TaggedError()(`QuotePreviewUnavailable`,{code:wu$1.Literal(`quote.preview_unavailable`)},{httpApiStatus:409}){};function gp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=gp();function bm(t){Lr=t}var Tr={exec:()=>null};function Co(t){let r=[];return o=>{let n=Math.max(0,Math.min(3,o-1)),i=r[n];return i||(i=t(n),r[n]=i),i}}function N(t,r=``){let o=typeof t==`string`?t:t.source,n={replace:(i,s)=>{let d=typeof s==`string`?s:s.source;return d=d.replace(ye.caret,`$1`),o=o.replace(i,d),n},getRegex:()=>new RegExp(o,r)};return n}var Uy=((t=``)=>{try{return!!new RegExp(`(?<=1)(?<!1)`+t)}catch{return!1}})();var ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Co(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Co(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Co(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Co(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Co(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Co(t=>new RegExp(`^ {0,${t}}>`))};var Qy=/^(?:[ \t]*(?:\n|$))+/;var Ny=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;var Oy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;var pi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;var Gy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;var yp=/ {0,3}(?:[*+-]|\d{1,9}[.)])/;var Em=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;var wm=N(Em).replace(/bull/g,yp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex();var Ky=N(Em).replace(/bull/g,yp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();var xp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;var Wy=/^[^\n]+/;var Sp=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;var Jy=N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Sp).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();var Yy=N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,yp).getRegex();var Bs=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`;var Ip=/<!--(?:-?>|[\s\S]*?(?:-->|$))/;var Vy=N(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Ip).replace(`tag`,Bs).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();var Tm=t=>N(xp).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,t).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex();var Zy=Tm(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);var _y=Tm(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);var Cp={blockquote:N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,_y).getRegex(),code:Ny,def:Jy,fences:Oy,heading:Gy,hr:pi,html:Vy,lheading:wm,list:Yy,newline:Qy,paragraph:Zy,table:Tr,text:Wy};var xm=N(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex();var zy=m$1(l({},Cp),{lheading:Ky,table:xm,paragraph:N(xp).replace(`hr`,pi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,xm).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Bs).getRegex()});var Xy=m$1(l({},Cp),{html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Ip).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(xp).replace(`hr`,pi).replace(`heading`,` *#{1,6} *[^
2
2
  ]`).replace(`lheading`,wm).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()});var $y=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;var ex=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;var Bm=/^( {2,}|\\)\n(?!\s*$)/;var tx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;var Mt=/[\p{P}\p{S}]/u;var ko=/[\s\p{P}\p{S}]/u;var di=/[^\s\p{P}\p{S}]/u;var rx=N(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,ko).getRegex();var ox=/[\p{Pi}\p{Ps}"']/u;var Lm=/(?!~)[\p{P}\p{S}]/u;var nx=/(?!~)[\s\p{P}\p{S}]/u;var ix=/(?:[^\s\p{P}\p{S}]|~)/u;var sx=N(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Uy?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex();var Pm=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;var ax=N(Pm,`u`).replace(/punct/g,Mt).getRegex();var cx=N(Pm,`u`).replace(/punct/g,Lm).getRegex();var dx=N(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,ox).replace(/punct/g,Mt).getRegex();var Dm=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`;var ux=N(Dm,`gu`).replace(/notPunctSpace/g,di).replace(/punctSpace/g,ko).replace(/punct/g,Mt).getRegex();var lx=N(Dm,`gu`).replace(/notPunctSpace/g,ix).replace(/punctSpace/g,nx).replace(/punct/g,Lm).getRegex();var mx=N(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,di).replace(/punctSpace/g,ko).replace(/punct/g,Mt).getRegex();var fx=N(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,di).replace(/punctSpace/g,ko).replace(/punct/g,Mt).getRegex();var gx=N(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,di).replace(/punctSpace/g,ko).replace(/punct/g,Mt).getRegex();var yx=N(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Mt).getRegex();var Sx=N(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,di).replace(/punctSpace/g,ko).replace(/punct/g,Mt).getRegex();var Ix=N(/\\(punct)/,`gu`).replace(/punct/g,Mt).getRegex();var Cx=N(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();var kx=N(Ip).replace(`(?:-->|$)`,`-->`).getRegex();var Rx=N(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,kx).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();var Es=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;var vx=N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Es).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();var Fm=N(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Es).replace(`ref`,Sp).getRegex();var Hm=N(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Sp).getRegex();var bx=N(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Fm).replace(`nolink`,Hm).getRegex();var Sm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;var kp={_backpedal:Tr,anyPunctuation:Ix,autolink:Cx,blockSkip:sx,br:Bm,code:ex,del:Tr,delLDelim:Tr,delRDelim:Tr,emStrongLDelim:ax,emStrongRDelimAst:ux,emStrongRDelimUnd:fx,escape:$y,link:vx,nolink:Hm,punctuation:rx,reflink:Fm,reflinkSearch:bx,tag:Rx,text:tx,url:Tr};var Ex=m$1(l({},kp),{emStrongLDelim:dx,emStrongRDelimAst:mx,emStrongRDelimUnd:gx,link:N(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Es).getRegex(),reflink:N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Es).getRegex()});var mp=m$1(l({},kp),{emStrongRDelimAst:lx,emStrongLDelim:cx,delLDelim:yx,delRDelim:Sx,url:N(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Sm).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:N(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Sm).getRegex()});var wx=m$1(l({},mp),{br:N(Bm).replace(`{2,}`,`*`).getRegex(),text:N(mp.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()});var bs={normal:Cp,gfm:zy,pedantic:Xy};var ai={normal:kp,gfm:mp,breaks:wx,pedantic:Ex};var Tx={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};var Im=t=>Tx[t];function ht(t,r){if(r){if(ye.escapeTest.test(t))return t.replace(ye.escapeReplace,Im)}else if(ye.escapeTestNoEncode.test(t))return t.replace(ye.escapeReplaceNoEncode,Im);return t}function Cm(t){try{t=encodeURI(t).replace(ye.percentDecode,`%`)}catch{return null}return t}function km(t,r){let n=t.replace(ye.findPipe,(s,d,c)=>{let h=!1,y=d;for(;--y>=0&&c[y]===`\\`;)h=!h;return h?`|`:` |`}).split(ye.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),r)if(n.length>r)n.splice(r);else for(;n.length<r;)n.push(``);for(;i<n.length;i++)n[i]=n[i].trim().replace(ye.slashPipe,`|`);return n}function er(t,r,o){let n=t.length;if(n===0)return``;let i=0;for(;i<n;){let s=t.charAt(n-i-1);if(s===r&&!o)i++;else if(s!==r&&o)i++;else break}return t.slice(0,n-i)}function Rm(t){let r=t.split(`
3
3
  `),o=r.length-1;for(;o>=0&&ye.blankLine.test(r[o]);)o--;return r.length-o<=2?t:r.slice(0,o+1).join(`
4
4
  `)}function Bx(t,r){if(t.indexOf(r[1])===-1)return-1;let o=0;for(let n=0;n<t.length;n++)if(t[n]===`\\`)n++;else if(t[n]===r[0])o++;else if(t[n]===r[1]&&(o--,o<0))return n;return o>0?-2:-1}function Lx(t,r=0){let o=r,n=``;for(let i of t)if(i===` `){let s=4-o%4;n+=` `.repeat(s),o+=s}else n+=i,o++;return n}function vm(t,r,o,n,i){let s=r.href,d=r.title||null,c=t[1].replace(i.other.outputLinkReplace,`$1`),h=t[0].charAt(0)===`!`;n.state.inLink=!0;let y=n.state.linkEmitted,C=n.state.inRawBlock;n.state.linkEmitted=!1;let l=n.inlineTokens(c),R=n.state.linkEmitted;if(n.state.linkEmitted=y,n.state.inLink=!1,!h){if(R){n.state.inRawBlock=C;return}n.state.linkEmitted=!0}return{type:h?`image`:`link`,raw:o,href:s,title:d,text:c,tokens:l}}function Px(t,r,o){let n=t.match(o.other.indentCodeCompensation);if(n===null)return r;let i=n[1];return r.split(`
@@ -1 +1 @@
1
- import{$t as ZC,D as Fy,E as Ft,It as Us,Jt as Xy,Rn as jS,S as FS,Tn as fd,Wn as kS,Wr as y_,X as LS,lt as OS,nt as NH,pr as qS,rr as nv,vt as Py,w as Fb}from"./chunk-BAHiFuUo.js";import{Q as Dp}from"./chunk-D5qmP2Wu.js";function D(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function v(e,n){if(e&1&&(Us(0,`p`),LS(1,D,2,5,`span`,0,FS),fd()),e&2){let t=qS().$implicit;ZC(),jS(t.spans)}}function k(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function h(e,n){if(e&1&&(Us(0,`h3`),LS(1,k,2,5,`span`,0,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.spans)}}function V(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function F(e,n){if(e&1&&(Us(0,`h4`),LS(1,V,2,5,`span`,0,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.spans)}}function S(e,n){if(e&1&&OS(0,h,3,0,`h3`)(1,F,3,0,`h4`),e&2){let t=qS().$implicit;kS(t.level===2?0:1)}}function M(e,n){if(e&1&&(Us(0,`li`),Py(1,`app-document-text-view`,2),fd()),e&2){let t=n.$implicit;ZC(),Fy(`blocks`,t)}}function P(e,n){if(e&1&&(Us(0,`ol`,1),LS(1,M,2,1,`li`,null,FS),fd()),e&2){let t=qS(2).$implicit;Fy(`start`,t.start),ZC(),jS(t.items)}}function $(e,n){if(e&1&&(Us(0,`li`),Py(1,`app-document-text-view`,2),fd()),e&2){let t=n.$implicit;ZC(),Fy(`blocks`,t)}}function N(e,n){if(e&1&&(Us(0,`ul`),LS(1,$,2,1,`li`,null,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.items)}}function E(e,n){if(e&1&&OS(0,P,3,1,`ol`,1)(1,N,3,0,`ul`),e&2){let t=qS().$implicit;kS(t.ordered?0:1)}}function I(e,n){if(e&1&&OS(0,v,3,0,`p`)(1,S,2,1)(2,E,2,1),e&2){let t,f=n.$implicit;kS((t=f.kind)===`paragraph`?0:t===`heading`?1:t===`list`?2:-1)}}function B(e,n){if(e&1&&LS(0,I,3,1,null,null,FS),e&2)jS(qS().content())}function O(e,n){if(e&1&&(Us(0,`p`),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.source())}}var g=class e{source=NH(``);presentation=NH();blocks=NH();content=Ft(()=>{let n=this.blocks();if(n!==void 0)return n;let t=this.presentation()?.format??`plain`;return t===`plain`?[]:Dp(this.source(),t)});formatted=Ft(()=>this.blocks()!==void 0||(this.presentation()?.format??`plain`)!==`plain`);static ɵfac=function(t){return new(t||e)};static ɵcmp=Fb({type:e,selectors:[[`app-document-text-view`]],inputs:{source:[1,`source`],presentation:[1,`presentation`],blocks:[1,`blocks`]},decls:2,vars:1,consts:[[3,`bold`,`italic`],[3,`start`],[3,`blocks`]],template:function(t,f){t&1&&OS(0,B,2,0)(1,O,2,1,`p`),t&2&&kS(f.formatted()?0:1)},dependencies:()=>[e],styles:[`[_nghost-%COMP%]{display:grid;gap:var(--%NS%space-3);min-inline-size:0;overflow-wrap:anywhere}p[_ngcontent-%COMP%]{white-space:pre-wrap;min-block-size:1lh}h3[_ngcontent-%COMP%]{font-size:var(--%NS%text-lg);white-space:pre-wrap}h4[_ngcontent-%COMP%]{font-size:var(--%NS%text-base);white-space:pre-wrap}.bold[_ngcontent-%COMP%]{font-weight:700}.italic[_ngcontent-%COMP%]{font-style:italic}ul[_ngcontent-%COMP%], ol[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2);margin:0;padding-inline-start:var(--%NS%space-6)}`]})};export{g as t};
1
+ import{$t as ZC,D as Fy,E as Ft,It as Us,Jt as Xy,Rn as jS,S as FS,Tn as fd,Wn as kS,Wr as y_,X as LS,lt as OS,nt as NH,pr as qS,rr as nv,vt as Py,w as Fb}from"./chunk-BAHiFuUo.js";import{Q as Dp}from"./chunk-D8Ui_APT.js";function D(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function v(e,n){if(e&1&&(Us(0,`p`),LS(1,D,2,5,`span`,0,FS),fd()),e&2){let t=qS().$implicit;ZC(),jS(t.spans)}}function k(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function h(e,n){if(e&1&&(Us(0,`h3`),LS(1,k,2,5,`span`,0,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.spans)}}function V(e,n){if(e&1&&(Us(0,`span`),y_(1),fd()),e&2){let t=n.$implicit;Xy(`bold`,t.bold)(`italic`,t.italic),ZC(),nv(t.text)}}function F(e,n){if(e&1&&(Us(0,`h4`),LS(1,V,2,5,`span`,0,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.spans)}}function S(e,n){if(e&1&&OS(0,h,3,0,`h3`)(1,F,3,0,`h4`),e&2){let t=qS().$implicit;kS(t.level===2?0:1)}}function M(e,n){if(e&1&&(Us(0,`li`),Py(1,`app-document-text-view`,2),fd()),e&2){let t=n.$implicit;ZC(),Fy(`blocks`,t)}}function P(e,n){if(e&1&&(Us(0,`ol`,1),LS(1,M,2,1,`li`,null,FS),fd()),e&2){let t=qS(2).$implicit;Fy(`start`,t.start),ZC(),jS(t.items)}}function $(e,n){if(e&1&&(Us(0,`li`),Py(1,`app-document-text-view`,2),fd()),e&2){let t=n.$implicit;ZC(),Fy(`blocks`,t)}}function N(e,n){if(e&1&&(Us(0,`ul`),LS(1,$,2,1,`li`,null,FS),fd()),e&2){let t=qS(2).$implicit;ZC(),jS(t.items)}}function E(e,n){if(e&1&&OS(0,P,3,1,`ol`,1)(1,N,3,0,`ul`),e&2){let t=qS().$implicit;kS(t.ordered?0:1)}}function I(e,n){if(e&1&&OS(0,v,3,0,`p`)(1,S,2,1)(2,E,2,1),e&2){let t,f=n.$implicit;kS((t=f.kind)===`paragraph`?0:t===`heading`?1:t===`list`?2:-1)}}function B(e,n){if(e&1&&LS(0,I,3,1,null,null,FS),e&2)jS(qS().content())}function O(e,n){if(e&1&&(Us(0,`p`),y_(1),fd()),e&2){let t=qS();ZC(),nv(t.source())}}var g=class e{source=NH(``);presentation=NH();blocks=NH();content=Ft(()=>{let n=this.blocks();if(n!==void 0)return n;let t=this.presentation()?.format??`plain`;return t===`plain`?[]:Dp(this.source(),t)});formatted=Ft(()=>this.blocks()!==void 0||(this.presentation()?.format??`plain`)!==`plain`);static ɵfac=function(t){return new(t||e)};static ɵcmp=Fb({type:e,selectors:[[`app-document-text-view`]],inputs:{source:[1,`source`],presentation:[1,`presentation`],blocks:[1,`blocks`]},decls:2,vars:1,consts:[[3,`bold`,`italic`],[3,`start`],[3,`blocks`]],template:function(t,f){t&1&&OS(0,B,2,0)(1,O,2,1,`p`),t&2&&kS(f.formatted()?0:1)},dependencies:()=>[e],styles:[`[_nghost-%COMP%]{display:grid;gap:var(--%NS%space-3);min-inline-size:0;overflow-wrap:anywhere}p[_ngcontent-%COMP%]{white-space:pre-wrap;min-block-size:1lh}h3[_ngcontent-%COMP%]{font-size:var(--%NS%text-lg);white-space:pre-wrap}h4[_ngcontent-%COMP%]{font-size:var(--%NS%text-base);white-space:pre-wrap}.bold[_ngcontent-%COMP%]{font-weight:700}.italic[_ngcontent-%COMP%]{font-style:italic}ul[_ngcontent-%COMP%], ol[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-2);margin:0;padding-inline-start:var(--%NS%space-6)}`]})};export{g as t};
@@ -0,0 +1 @@
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{$r as T$1}from"./chunk-D8Ui_APT.js";import{t}from"./chunk-CKxU-VJf2.js";function k(e,n){for(let{key:a}of n)if(e===`${a}-asc`||e===`${a}-desc`)return e;return`none`}function x(e,n){return e===`${n}-asc`?`ascending`:e===`${n}-desc`?`descending`:`none`}function L(e,n){return t(e,`${n}-asc`,`${n}-desc`)}var C=(e,n)=>e<n?-1:e>n?1:0;function I(e,n,a,d,g=`date-desc`){let b=e===`none`?g:e,t=n.find(({key:r})=>x(b,r)!==`none`);if(!t)throw new Error(`bank.sort_invalid`);let v=b.endsWith(`-desc`)?-1:1,f=new Intl.Collator(a,{numeric:!0,sensitivity:`base`});return(r,l)=>{let s;switch(t.kind){case`text`:s=f.compare(t.value(r),t.value(l));break;case`date`:{let i=t.value(r),c=t.value(l);if(i===null&&c!==null)return 1;if(i!==null&&c===null)return-1;s=i===null||c===null?0:Date.parse(i)-Date.parse(c);break}case`number`:case`rank`:s=t.value(r)-t.value(l);break}return v*s||C(d(r),d(l))}}var w=[`unmatched`,`partial`,`matched`,`cancelledPayment`,`notApplicable`];var T=e=>e.amountCents<0?`notApplicable`:e.allocations.some(n=>n.paymentCancelled)?`cancelledPayment`:e.matchedCents===0?`unmatched`:e.matchedCents<e.amountCents?`partial`:`matched`;var D=e=>`bankWorkspace.${e}`;var S={unmatched:0,partial:1,matched:2,cancelledPayment:3,notApplicable:4};var W={debit:0,fee:1};function V(e){return e===`fee`?`ledger.fee`:`ledger.debit`}function Q(e){return e.reversesId?`bankWorkspace.reversalEntry`:e.reversalId?`bankWorkspace.reversedEntry`:`bankWorkspace.activeEntry`}var B=[{key:`reference`,label:`bankWorkspace.reference`,kind:`text`,value:e=>e.reference},{key:`description`,label:`bankWorkspace.description`,kind:`text`,value:e=>e.description},{key:`account`,label:`bankWorkspace.account`,kind:`text`,value:e=>e.account},{key:`date`,label:`bankWorkspace.date`,kind:`date`,value:e=>e.bookedOn},{key:`status`,label:`bankWorkspace.status`,kind:`rank`,value:e=>S[T(e)]},{key:`amount`,label:`bankWorkspace.amount`,kind:`number`,value:e=>e.amountCents}];var M=[{key:`reference`,label:`bankWorkspace.reference`,kind:`text`,value:e=>e.reference},{key:`description`,label:`bankWorkspace.description`,kind:`text`,value:e=>e.description},{key:`date`,label:`bankWorkspace.date`,kind:`date`,value:e=>e.bookedOn},{key:`amount`,label:`bankWorkspace.amount`,kind:`number`,value:e=>e.amountCents},{key:`status`,label:`bankWorkspace.preview`,kind:`rank`,value:e=>e.existing?1:0}];var O=[{key:`invoice`,label:`bank.invoice`,kind:`text`,value:e=>e.invoiceNumber??``},{key:`payment`,label:`bankWorkspace.payment`,kind:`text`,value:e=>e.paymentId},{key:`amount`,label:`bank.allocationAmount`,kind:`number`,value:e=>e.amountCents},{key:`fee`,label:`bank.fees`,kind:`number`,value:e=>e.feeCents}];var j=[{key:`invoice`,label:`bank.invoice`,kind:`text`,value:e=>e.invoiceNumber??``},{key:`date`,label:`bank.matched`,kind:`date`,value:e=>e.matchedAt},{key:`amount`,label:`bank.allocationAmount`,kind:`number`,value:e=>e.amountCents},{key:`fee`,label:`bank.fees`,kind:`number`,value:e=>e.feeCents},{key:`cancelled`,label:`bank.unmatched`,kind:`date`,value:e=>e.cancelledAt}];var h=[{key:`reference`,label:`bankWorkspace.reference`,kind:`text`,value:e=>e.reference},{key:`account`,label:`bankWorkspace.account`,kind:`text`,value:e=>e.account},{key:`sourceKind`,label:`bankWorkspace.sourceType`,kind:`rank`,value:e=>W[e.sourceKind]},{key:`date`,label:`bankWorkspace.date`,kind:`date`,value:e=>e.bookedOn},{key:`amount`,label:`bankWorkspace.amount`,kind:`number`,value:e=>e.amountCents}];var R=[{key:`label`,label:`ledger.label`,kind:`text`,value:e=>e.label},{key:`reference`,label:`bankWorkspace.reference`,kind:`text`,value:e=>e.sourceReference},{key:`date`,label:`bankWorkspace.date`,kind:`date`,value:e=>e.bookedOn},{key:`debitAccount`,label:`ledger.debitAccount`,kind:`text`,value:e=>e.debitAccount},{key:`creditAccount`,label:`ledger.creditAccount`,kind:`text`,value:e=>e.creditAccount},{key:`status`,label:`bankWorkspace.entryStatus`,kind:`rank`,value:e=>e.reversesId?2:e.reversalId?1:0},{key:`amount`,label:`bankWorkspace.amount`,kind:`number`,value:e=>e.amountCents}];var q=e=>({q:(e.get(`q`)??``).slice(0,120),account:(e.get(`account`)??``).slice(0,100),from:e.get(`from`)??``,to:e.get(`to`)??``,flow:e.get(`flow`)===`credit`?`credit`:e.get(`flow`)===`debit`?`debit`:``,status:wu.is(wu.Literals(w))(e.get(`status`))?e.get(`status`)??``:``,sort:k(e.get(`sort`),B)});function H(e){return m(l({},e),{sort:e.sort===`none`?null:e.sort})}var J=(e,n)=>(e===``||wu.is(T$1)(e))&&(n===``||wu.is(T$1)(n))&&(e===``||n===``||e<=n);var N=(e,n)=>[{permission:`bank.read`,id:`bank-transactions-tab`,path:`/banking`,label:e.t(`bankWorkspace.transactions`),exact:!0},{id:`bank-entries-tab`,permission:`ledger.read`,path:`/banking/ledger`,label:e.t(`bankWorkspace.entries`)}].filter(a=>n(a.permission));var F=e=>{let n=new Date().getFullYear();return{from:e.get(`from`)??`${n}-01-01`,to:e.get(`to`)??`${n}-12-31`,q:(e.get(`q`)??``).slice(0,120),view:e.get(`view`)===`journal`?`journal`:`sources`,sort:e.get(`view`)===`journal`?k(e.get(`sort`),R):k(e.get(`sort`),h)}};var Y=(e,n)=>[`/banking/ledger/post`,e,n];var _=e=>[`/banking/ledger`,e,`reverse`];var z=e=>[`/banking/transactions`,e];export{z as C,x as S,h as _,I as a,q as b,M as c,Q as d,R as f,_ as g,Y as h,H as i,N as l,V as m,D as n,J as o,T as p,F as r,L as s,B as t,O as u,j as v,w as x,k as y};
@@ -0,0 +1 @@
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{$ as MH,$t as ZC,A as Gy,D as Fy,Dn as g,Dr as t_,E as Ft,Gn as k_,Ir as wp,It as Us,J as Ky,Jr as zS,K as Ke,Lt as Uy,N as Hb,Nr as vd,P as Hn,Rn as jS,Tn as fd,V as Iy,Vr as xH,Wr as y_,X as LS,b as E,c as AH,ct as OH,ft as Ol,in as Zy,l as A_,ln as ad,lr as pN,mt as PH,nt as NH,pr as qS,qn as ky,rr as nv,vt as Py,w as Fb,xn as e_,z as Ip}from"./chunk-BAHiFuUo.js";import{i as r,m as Ie,r as N}from"./main-LXYWXFW4.js";import{i as H,l as W}from"./chunk-BzUDWIzm.js";import{l as y}from"./chunk-CP-AnFGa.js";import{i as U,n as D,r as M,t as B}from"./chunk-Bit8ybhq.js";import{t as Ft$1}from"./chunk-DjewtV43.js";import{n as m$1,t as d}from"./chunk-cTGENC4T2.js";var w=(()=>{class n{static ɵfac=function(t){return new(t||n)};static ɵdir=ad({type:n,selectors:[[`ng-template`,`ngAccordionContent`,``]],features:[Hb([U])]})}return n})();var ce=(()=>{class n{_elementRef=g(Hn);element=this._elementRef.nativeElement;_deferredContentAware=g(M);_accordionContent=OH(w);id=NH(g(W).getId(`ng-accordion-panel-`,!0));visible=Ft(()=>this._pattern?.expanded()===!0);_pattern;constructor(){PH({write:()=>{this._deferredContentAware.contentVisible.set(this.visible())}})}expand(){this._pattern?.open()}collapse(){this._pattern?.close()}toggle(){this._pattern?.toggle()}static ɵfac=function(t){return new(t||n)};static ɵdir=ad({type:n,selectors:[[``,`ngAccordionPanel`,``]],contentQueries:function(t,i,m){t&1&&Zy(m,i._accordionContent,w,5),t&2&&e_()},hostAttrs:[`role`,`region`],hostVars:3,hostBindings:function(t,i){t&2&&ky(`id`,i.id())(`aria-labelledby`,i._pattern?.id())(`inert`,i.visible()?null:!0)},inputs:{id:[1,`id`]},exportAs:[`ngAccordionPanel`],features:[Hb([{directive:M,inputs:[`preserveContent`,`preserveContent`]}])]})}return n})();var le=new E(`ACCORDION_GROUP`);var pe=(()=>{class n{_elementRef=g(Hn);element=this._elementRef.nativeElement;_collection=new y;_triggerPatterns=Ft(()=>this._collection.orderedItems().map(e=>e._pattern));textDirection=g(H).valueSignal;disabled=NH(!1,{transform:pN});multiExpandable=NH(!0,{transform:pN});softDisabled=NH(!0,{transform:pN});wrap=NH(!1,{transform:pN});_pattern=new B(m(l({},this),{element:()=>this.element,activeItem:Ke(void 0),items:this._triggerPatterns,orientation:()=>`vertical`}));constructor(){Ol(()=>{this._collection.startObserving(this.element)})}ngOnDestroy(){this._collection.stopObserving()}expandAll(){this._pattern.expandAll()}collapseAll(){this._pattern.collapseAll()}static ɵfac=function(t){return new(t||n)};static ɵdir=ad({type:n,selectors:[[``,`ngAccordionGroup`,``]],hostBindings:function(t,i){t&1&&Gy(`keydown`,function(c){return i._pattern.onKeydown(c)})(`click`,function(c){return i._pattern.onClick(c)})(`focusin`,function(c){return i._pattern.onFocus(c)})},inputs:{disabled:[1,`disabled`],multiExpandable:[1,`multiExpandable`],softDisabled:[1,`softDisabled`],wrap:[1,`wrap`]},exportAs:[`ngAccordionGroup`],features:[A_([{provide:le,useExisting:n}])]})}return n})();var me=(()=>{class n{_elementRef=g(Hn);element=this._elementRef.nativeElement;_accordionGroup=g(le);panel=NH.required();id=NH(g(W).getId(`ng-accordion-trigger-`,!0));panelId=Ft(()=>this.panel().id());disabled=NH(!1,{transform:pN});expanded=AH(!1);active=Ft(()=>this._pattern.active());_pattern;constructor(){this.element.tagName===`BUTTON`&&!this.element.hasAttribute(`type`)&&this.element.setAttribute(`type`,`button`)}ngOnInit(){this._pattern=new D(m(l({},this),{element:()=>this.element,accordionGroup:()=>this._accordionGroup._pattern,accordionPanelId:this.panelId})),this.panel()._pattern=this._pattern,this._accordionGroup._collection.register(this)}ngOnDestroy(){this.panel()._pattern=void 0,this._accordionGroup._collection.unregister(this)}expand(){this._pattern.open()}collapse(){this._pattern.close()}toggle(){this._pattern.toggle()}static ɵfac=function(t){return new(t||n)};static ɵdir=ad({type:n,selectors:[[``,`ngAccordionTrigger`,``]],hostAttrs:[`role`,`button`],hostVars:7,hostBindings:function(t,i){t&2&&(Uy(`id`,i.id()),ky(`data-active`,i.active())(`aria-expanded`,i.expanded())(`aria-controls`,i._pattern.controls())(`aria-disabled`,i._pattern.disabled())(`disabled`,i._pattern.hardDisabled()?!0:null)(`tabindex`,i._pattern.tabIndex()))},inputs:{panel:[1,`panel`],id:[1,`id`],disabled:[1,`disabled`],expanded:[1,`expanded`]},outputs:{expanded:`expandedChange`},exportAs:[`ngAccordionTrigger`]})}return n})();var he=[`searchInput`];var _e=n=>({count:n});var ve=(n,r)=>r.domain;var ye=(n,r)=>r.item.code;function be(n,r){if(n&1){let e=zS();Us(0,`label`,16)(1,`input`,17,2),Gy(`change`,function(){let i=Ip(e).$implicit,m=t_(2);return wp(qS(3).selectionChange.emit({code:i.item.code,selected:m.checked}))}),fd(),Us(3,`span`)(4,`code`,18),y_(5),fd(),Us(6,`span`,19),y_(7),fd()()()}if(n&2){let e=r.$implicit,t=qS(3);ZC(),Fy(`checked`,t.selected(e.item.code)),ZC(3),Fy(`appSearchHighlight`,e.codeMatches),ZC(),nv(e.item.code),ZC(),Fy(`appSearchHighlight`,e.descriptionMatches),ZC(),nv(e.item.description)}}function Ce(n,r){if(n&1&&LS(0,be,8,5,`label`,16,ye),n&2){let e=qS().$implicit;jS(e.permissions)}}function xe(n,r){if(n&1){let e=zS();Us(0,`div`,7)(1,`h3`)(2,`button`,9),Gy(`expandedChange`,function(i){let m=Ip(e).$implicit;return wp(qS().setExpanded(m.domain,i))}),Us(3,`span`,10)(4,`code`),y_(5),fd(),Us(6,`span`,11),y_(7,` · `),fd(),Us(8,`span`),y_(9),fd()(),Us(10,`span`,12),y_(11),fd(),Py(12,`app-icon`,13),fd()(),Us(13,`div`,14,1),Iy(15,Ce,2,0,`ng-template`,15),fd()()}if(n&2){let e=r.$implicit,t=t_(14);ZC(2),Fy(`panel`,t)(`expanded`,e.expanded),ZC(3),nv(e.domain),ZC(4),nv(e.description),ZC(2),nv(e.selectionLabel),ZC(2),Fy(`preserveContent`,!0)}}function Pe(n,r){if(n&1&&(Us(0,`p`),y_(1),fd()),n&2){let e=qS();ZC(),nv(e.i18n.t(`backOffice.apiTokens.permissionEmpty`))}}var ue=[];var Me=[`affair`,`integration`,`ledger`,`invoice`,`email`,`bank`,`catalog`,`issuer`,`company`,`condition`,`payment`,`client`,`supplier`,`supplier-invoice`,`quote`,`order`,`template`,`document`,`user`,`role`,`session`,`api-token`,`audit`,`accounting`,`demo`];var ge=class n{i18n=g(Ie);options=NH.required();selectedCodes=NH.required();disabled=NH(!1);selectionChange=MH();query=Ke(``);expandedDomains=Ke(new Set);searchInput=xH.required(`searchInput`);searchResults=Ft$1(this.options,this.query,{keys:[{name:`code`,weight:.45},{name:`description`,weight:.55}],ignoreDiacritics:!0,ignoreLocation:!0,includeMatches:!0,threshold:.35});groups=Ft(()=>{let r=this.searchResults().map(({item:e,matches:t=[]})=>({item:e,codeMatches:t.find(({key:i})=>i===`code`)?.indices??ue,descriptionMatches:t.find(({key:i})=>i===`description`)?.indices??ue}));return Me.map(e=>({domain:e,description:this.i18n.t(`permission.group.${e}`),expanded:this.expandedDomains().has(e),selectionLabel:this.i18n.plural(`configurationWorkspace.permissionSelection`,{count:this.selectedCodes().filter(t=>t.startsWith(`${e}.`)).length,total:this.options().filter(({code:t})=>t.startsWith(`${e}.`)).length}),permissions:r.filter(({item:t})=>t.code.startsWith(`${e}.`))})).filter(({permissions:e})=>e.length>0)});focusSearch(){this.searchInput().nativeElement.focus()}updateQuery(r){this.query.set(r.value.slice(0,120)),this.query().trim()&&this.expandedDomains.update(e=>new Set([...e,...this.groups().map(({domain:t})=>t)]))}setExpanded(r,e){this.expandedDomains.update(t=>{let i=new Set(t);return e?i.add(r):i.delete(r),i})}selected(r){return this.selectedCodes().includes(r)}static ɵfac=function(e){return new(e||n)};static ɵcmp=Fb({type:n,selectors:[[`app-permission-picker`]],viewQuery:function(e,t){e&1&&Ky(t.searchInput,he,5),e&2&&e_()},inputs:{options:[1,`options`],selectedCodes:[1,`selectedCodes`],disabled:[1,`disabled`]},outputs:{selectionChange:`selectionChange`},features:[A_([d])],decls:13,vars:10,consts:[[`searchInput`,``],[`panel`,`ngAccordionPanel`],[`permission`,``],[3,`disabled`],[1,`field`],[`id`,`permission-search`,`type`,`search`,1,`input`,3,`input`,`placeholder`,`value`],[`ngAccordionGroup`,``,1,`permission-groups`,3,`multiExpandable`],[1,`permission-group`],[`role`,`status`],[`appButton`,``,`type`,`button`,`ngAccordionTrigger`,``,1,`permission-toggle`,3,`expandedChange`,`panel`,`expanded`],[1,`permission-domain`],[`aria-hidden`,`true`],[1,`permission-count`],[`name`,`chevron-right`],[`ngAccordionPanel`,``,1,`permission-panel`,3,`preserveContent`],[`ngAccordionContent`,``],[1,`permission-option`],[`type`,`checkbox`,3,`change`,`checked`],[3,`appSearchHighlight`],[1,`permission-description`,3,`appSearchHighlight`]],template:function(e,t){if(e&1){let i=zS();Us(0,`fieldset`,3)(1,`legend`),y_(2),fd(),Us(3,`label`,4),y_(4),Us(5,`input`,5,0),Gy(`input`,function(){Ip(i);let c=t_(6);return wp(t.updateQuery(c))}),fd()(),Us(7,`div`,6),LS(8,xe,16,6,`div`,7,ve,!1,Pe,2,1,`p`),fd(),Us(11,`p`,8),y_(12),fd()()}e&2&&(Fy(`disabled`,t.disabled()),ZC(2),nv(t.i18n.t(`backOffice.apiTokens.permissions`)),ZC(2),vd(` `,t.i18n.t(`backOffice.apiTokens.permissionSearch`),` `),ZC(),Fy(`placeholder`,t.i18n.t(`backOffice.apiTokens.permissionSearchPlaceholder`))(`value`,t.query()),ZC(2),Fy(`multiExpandable`,!0),ZC(),jS(t.groups()),ZC(4),vd(` `,t.i18n.plural(`configurationWorkspace.permissionCount`,k_(8,_e,t.selectedCodes().length)),` `))},dependencies:[w,pe,ce,me,N,r,m$1],styles:[`fieldset[_ngcontent-%COMP%]{display:grid;gap:var(--%NS%space-3);min-inline-size:0;margin:0;padding:0;border:0}legend[_ngcontent-%COMP%]{padding:0;margin-block-end:var(--%NS%space-3);font-weight:700}.permission-groups[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--%NS%space-3)}.permission-toggle[_ngcontent-%COMP%]{inline-size:100%;text-align:start;gap:var(--%NS%space-3)}.permission-domain[_ngcontent-%COMP%]{flex:1 1 auto;min-inline-size:0;overflow-wrap:anywhere}.permission-domain[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{color:var(--%NS%color-muted);font-size:var(--%NS%text-sm);font-weight:400}.permission-count[_ngcontent-%COMP%]{min-inline-size:0;color:var(--%NS%color-muted);font-size:var(--%NS%text-sm);font-weight:400;white-space:normal}.permission-toggle[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{flex:none}.permission-toggle[aria-expanded=true][_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{rotate:90deg}.permission-panel[_ngcontent-%COMP%]{padding:var(--%NS%space-2) var(--%NS%space-3)}.permission-panel[inert][_ngcontent-%COMP%]{display:none}.permission-option[_ngcontent-%COMP%]{display:flex;align-items:start;gap:var(--%NS%space-3);padding-block:var(--%NS%space-2)}.permission-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:.25rem}.permission-description[_ngcontent-%COMP%]{display:block;overflow-wrap:anywhere;color:var(--%NS%color-muted);font-size:var(--%NS%text-sm)}`]})};export{ge as t};
@@ -0,0 +1 @@
1
+ import{n as m,t as l}from"./chunk-BwCtja5l.js";import{n as w,r as x}from"./chunk-DVbkiKVh2.js";import{n as p,r as u,t as d}from"./chunk-CP9GxcYV.js";import{a as k,i as g,r as f,t as C}from"./chunk-Dyouu0xF.js";function b(e){let i=w(x(e,k),k),n=w(x(e,C),C),s=w(x(e,g),g),f$1=f(e),a=d(e.get(`view`));return m(l({},u(p(e))),{view:a===`active`?void 0:a,clientAffairQ:i.clientAffairQ,clientAffairSort:i.clientAffairSort,clientAffairStatus:i.clientAffairStatus,clientDocumentQ:n.clientDocumentQ,clientDocumentSort:n.clientDocumentSort,clientDocumentType:n.clientDocumentType,clientAccessQ:s.clientAccessQ,clientAccessSort:s.clientAccessSort,clientAccessFrom:f$1.from,clientAccessTo:f$1.to})}export{b as t};
@@ -1 +1 @@
1
- import{Dn as g,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{Hl as vg,Os as jr,Ua as an}from"./chunk-D5qmP2Wu.js";var n=class s{http=g(OD);list(){return m(this.http.get(`/api/roles`),vg,an,`role.error`)}get(t){return m(this.http.get(`/api/roles/${t}`),jr,an,`role.error`)}create(t){return m(this.http.post(`/api/roles`,t),jr,an,`role.error`)}update(t,i){return m(this.http.put(`/api/roles/${t}`,i),jr,an,`role.error`)}remove(t){return m(this.http.delete(`/api/roles/${t}`),wu.Null,an,`role.error`)}static ɵfac=function(i){return new(i||s)};static ɵprov=A({token:s,factory:s.ɵfac,providedIn:`root`})};export{n as t};
1
+ import{Dn as g,o as A,ot as OD}from"./chunk-BAHiFuUo.js";import{wi as wu}from"./chunk-BAe_07VM.js";import{n as m}from"./chunk-Dv9sNWWK.js";import{Hl as vg,Os as jr,Ua as an}from"./chunk-D8Ui_APT.js";var n=class s{http=g(OD);list(){return m(this.http.get(`/api/roles`),vg,an,`role.error`)}get(t){return m(this.http.get(`/api/roles/${t}`),jr,an,`role.error`)}create(t){return m(this.http.post(`/api/roles`,t),jr,an,`role.error`)}update(t,i){return m(this.http.put(`/api/roles/${t}`,i),jr,an,`role.error`)}remove(t){return m(this.http.delete(`/api/roles/${t}`),wu.Null,an,`role.error`)}static ɵfac=function(i){return new(i||s)};static ɵprov=A({token:s,factory:s.ɵfac,providedIn:`root`})};export{n as t};