@argusoft/medplat-core 1.0.31 → 1.0.33

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 (218) hide show
  1. package/dist/AccessRights-BC43Jhml.js +1093 -0
  2. package/dist/AccessRights-BC43Jhml.js.map +1 -0
  3. package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
  4. package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
  5. package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
  6. package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
  7. package/dist/AddMenuConfiguration.css +1 -1
  8. package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js → BrandsPage-CdcAvaml-CYT80CMH.js} +45 -45
  9. package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js.map → BrandsPage-CdcAvaml-CYT80CMH.js.map} +1 -1
  10. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js → CategoriesPage-BprQEYJw-BRAukJB1.js} +43 -43
  11. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js.map → CategoriesPage-BprQEYJw-BRAukJB1.js.map} +1 -1
  12. package/dist/ChangePasswordModalCore-rypTxA2O.js +238 -0
  13. package/dist/ChangePasswordModalCore-rypTxA2O.js.map +1 -0
  14. package/dist/{ConditionConfig-BQBmBHaM.js → ConditionConfig-Bpm6OoV5.js} +3 -3
  15. package/dist/{ConditionConfig-BQBmBHaM.js.map → ConditionConfig-Bpm6OoV5.js.map} +1 -1
  16. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js → DashboardPage-CTiGSx71-DX-TzGOH.js} +29 -29
  17. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js.map → DashboardPage-CTiGSx71-DX-TzGOH.js.map} +1 -1
  18. package/dist/EntityManagement-BGwJGl9k.js +62 -0
  19. package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
  20. package/dist/{EventConfigurations-CUPEN5BV.js → EventConfigurations-B-z7xHh_.js} +3 -3
  21. package/dist/{EventConfigurations-CUPEN5BV.js.map → EventConfigurations-B-z7xHh_.js.map} +1 -1
  22. package/dist/{EventsExceptionModal-BX-ArkBE.js → EventsExceptionModal-DafomIv6.js} +2 -2
  23. package/dist/{EventsExceptionModal-BX-ArkBE.js.map → EventsExceptionModal-DafomIv6.js.map} +1 -1
  24. package/dist/{EventsUi-D6O9S7BK.js → EventsUi-Dl_yckSA.js} +37 -32
  25. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  26. package/dist/FacilityPicker-BXa2VF7i-D0JUIqLv.js +112 -0
  27. package/dist/FacilityPicker-BXa2VF7i-D0JUIqLv.js.map +1 -0
  28. package/dist/FaqList-CeDEuhU_.js +237 -0
  29. package/dist/FaqList-CeDEuhU_.js.map +1 -0
  30. package/dist/FaqSkeletons-hLCEcRr-.js +19 -0
  31. package/dist/FaqSkeletons-hLCEcRr-.js.map +1 -0
  32. package/dist/FaqView-sDzBVyXV.js +617 -0
  33. package/dist/FaqView-sDzBVyXV.js.map +1 -0
  34. package/dist/{FeatureMenu-CHsBbw3W.js → FeatureMenu-CaI-ZhSZ.js} +2 -2
  35. package/dist/{FeatureMenu-CHsBbw3W.js.map → FeatureMenu-CaI-ZhSZ.js.map} +1 -1
  36. package/dist/{FhirServerList-iXBPkRVF.js → FhirServerList-CrIHMAxz.js} +19 -19
  37. package/dist/{FhirServerList-iXBPkRVF.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  38. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  39. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  40. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  41. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  42. package/dist/{ImmunizationConfigurationBase-aUtx0JEe.js → ImmunizationConfigurationBase-Clkk0-n6.js} +2638 -2577
  43. package/dist/ImmunizationConfigurationBase-Clkk0-n6.js.map +1 -0
  44. package/dist/InventoryPage-JadYMCzU-CWcCauMI.js +1017 -0
  45. package/dist/InventoryPage-JadYMCzU-CWcCauMI.js.map +1 -0
  46. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  47. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  48. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  49. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  50. package/dist/{ManageEventConfiguration-DqW3krT6.js → ManageEventConfiguration-DqPbn3Oi.js} +5 -5
  51. package/dist/{ManageEventConfiguration-DqW3krT6.js.map → ManageEventConfiguration-DqPbn3Oi.js.map} +1 -1
  52. package/dist/ManageFaq-4cT6bntx.js +1583 -0
  53. package/dist/ManageFaq-4cT6bntx.js.map +1 -0
  54. package/dist/ManageFaq.css +1 -0
  55. package/dist/ManageRole-CyfpySt9.js +981 -0
  56. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  57. package/dist/{ManageUser-DZltBina.js → ManageUser-DchUMAyC.js} +172 -172
  58. package/dist/{ManageUser-DZltBina.js.map → ManageUser-DchUMAyC.js.map} +1 -1
  59. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js → MemberProfileCard-01d_jz3w-CQi_zu6x.js} +37 -37
  60. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map → MemberProfileCard-01d_jz3w-CQi_zu6x.js.map} +1 -1
  61. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  62. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  63. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  64. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  65. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js → MobileTypeEventConfigModal-DodU3beR.js} +3 -3
  66. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js.map → MobileTypeEventConfigModal-DodU3beR.js.map} +1 -1
  67. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  68. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  69. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  70. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  71. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js → PaymentCreatePage-D6NZBUC3-_98S21Sa.js} +56 -56
  72. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map → PaymentCreatePage-D6NZBUC3-_98S21Sa.js.map} +1 -1
  73. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js → PaymentsPage-CHieGNrn-ChCXEyck.js} +38 -38
  74. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map → PaymentsPage-CHieGNrn-ChCXEyck.js.map} +1 -1
  75. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  76. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  77. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js → PickupBatchLinesEditor-QPaqFtUO-BEtI5mIU.js} +2 -2
  78. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map → PickupBatchLinesEditor-QPaqFtUO-BEtI5mIU.js.map} +1 -1
  79. package/dist/PickupCreatePage-C7_67u_u-DbDIZ1WC.js +801 -0
  80. package/dist/PickupCreatePage-C7_67u_u-DbDIZ1WC.js.map +1 -0
  81. package/dist/{PickupsPage-D7zyioJB-bHKnARYw.js → PickupsPage-BWblMlic-KehDMebm.js} +122 -122
  82. package/dist/PickupsPage-BWblMlic-KehDMebm.js.map +1 -0
  83. package/dist/PmGuard-BvUUbU80-DJipZoSg.js +641 -0
  84. package/dist/PmGuard-BvUUbU80-DJipZoSg.js.map +1 -0
  85. package/dist/ProductEditPage-Dbq4vUAA-DusAdAvm.js +1523 -0
  86. package/dist/ProductEditPage-Dbq4vUAA-DusAdAvm.js.map +1 -0
  87. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js → ProductsPage-BI22nPb4-D3GnWz34.js} +29 -29
  88. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js.map → ProductsPage-BI22nPb4-D3GnWz34.js.map} +1 -1
  89. package/dist/PurchaseCreatePage-C0EK9z4w-D4PlZsOH.js +724 -0
  90. package/dist/PurchaseCreatePage-C0EK9z4w-D4PlZsOH.js.map +1 -0
  91. package/dist/{PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js → PurchaseRequestDetailPage-DhBuOGHZ-CAmlL4fP.js} +446 -436
  92. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CAmlL4fP.js.map +1 -0
  93. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js → PurchaseRequestsPage-Bj9HUMxb-BCAhEEkL.js} +55 -55
  94. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map → PurchaseRequestsPage-Bj9HUMxb-BCAhEEkL.js.map} +1 -1
  95. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js → PurchasesPage-Djl1AqD_-DxBRFRDy.js} +61 -61
  96. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js.map → PurchasesPage-Djl1AqD_-DxBRFRDy.js.map} +1 -1
  97. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  98. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  99. package/dist/Roles-BoNGJhtR.js +19 -0
  100. package/dist/Roles-BoNGJhtR.js.map +1 -0
  101. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js → SaleCreatePage-DHBLmlBr-aEGmvJQq.js} +33 -33
  102. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js.map → SaleCreatePage-DHBLmlBr-aEGmvJQq.js.map} +1 -1
  103. package/dist/{SalesPage-DPIRrC_O-M8rqnK7z.js → SalesPage-eF9Yr42z-CvOr82vo.js} +34 -34
  104. package/dist/SalesPage-eF9Yr42z-CvOr82vo.js.map +1 -0
  105. package/dist/SettingsPage-Cre-UE3r-CGTVp5Zw.js +741 -0
  106. package/dist/SettingsPage-Cre-UE3r-CGTVp5Zw.js.map +1 -0
  107. package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-C7zkwKMz.js} +213 -190
  108. package/dist/StorageUnitsPage-CTEVuemZ-C7zkwKMz.js.map +1 -0
  109. package/dist/{SubMenu-BdMTYtC1.js → SubMenu-DZIhur09.js} +2 -2
  110. package/dist/{SubMenu-BdMTYtC1.js.map → SubMenu-DZIhur09.js.map} +1 -1
  111. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  112. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  113. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  114. package/dist/TableList-B5tX4wII.js.map +1 -0
  115. package/dist/{TransactionsPage-CqWTMNU8-Df6eGFDW.js → TransactionsPage-Zuu7sjID-BDmUK7s1.js} +185 -170
  116. package/dist/TransactionsPage-Zuu7sjID-BDmUK7s1.js.map +1 -0
  117. package/dist/TransferCreatePage-DlT0nCDj-evHPJc99.js +635 -0
  118. package/dist/TransferCreatePage-DlT0nCDj-evHPJc99.js.map +1 -0
  119. package/dist/TransfersPage-DqaSvHda-DAUn5SSr.js +600 -0
  120. package/dist/TransfersPage-DqaSvHda-DAUn5SSr.js.map +1 -0
  121. package/dist/{TypeConfiguration-JbRCN6GR.js → TypeConfiguration-EaFiOzRE.js} +3 -3
  122. package/dist/{TypeConfiguration-JbRCN6GR.js.map → TypeConfiguration-EaFiOzRE.js.map} +1 -1
  123. package/dist/UserList-Cf5B-o_1.js +1904 -0
  124. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  125. package/dist/Users-MC7txo1V.js +43 -0
  126. package/dist/{Users-CsJ08Kjm.js.map → Users-MC7txo1V.js.map} +1 -1
  127. package/dist/VaccineEducation-DWkNNasF.js +231 -0
  128. package/dist/VaccineEducation-DWkNNasF.js.map +1 -0
  129. package/dist/VaccineEducation.css +1 -0
  130. package/dist/VaccineEducationConfigurator-BFCvu5Mw.js +1450 -0
  131. package/dist/VaccineEducationConfigurator-BFCvu5Mw.js.map +1 -0
  132. package/dist/VaccineEducationConfigurator.css +1 -0
  133. package/dist/VaccineEducationList-BxZHahCh.js +334 -0
  134. package/dist/VaccineEducationList-BxZHahCh.js.map +1 -0
  135. package/dist/VialsPage-LoDaUqVv-Dw00Zc06.js +457 -0
  136. package/dist/VialsPage-LoDaUqVv-Dw00Zc06.js.map +1 -0
  137. package/dist/ckeditor5-_x14lrzc.js +49590 -0
  138. package/dist/ckeditor5-_x14lrzc.js.map +1 -0
  139. package/dist/ckeditor5.css +4 -0
  140. package/dist/{constants-DpXnLsAB-D6lN5cjK.js → constants-BTpJFQe_-CYPZIqQF.js} +160 -61
  141. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  142. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  143. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  144. package/dist/faqMedia-FDpje7v0.js +234 -0
  145. package/dist/faqMedia-FDpje7v0.js.map +1 -0
  146. package/dist/index-mfoqII2U.js +524 -0
  147. package/dist/index-mfoqII2U.js.map +1 -0
  148. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  149. package/dist/index-o8Pyt1Bt.js.map +1 -0
  150. package/dist/index.css +1 -1
  151. package/dist/index.js +1 -1
  152. package/dist/{index.lib-ETRQOzvE.js → index.lib-QDEODnRT.js} +409 -327
  153. package/dist/index.lib-QDEODnRT.js.map +1 -0
  154. package/dist/listValueStore-5d4vNGQM-DB08drLf.js +43 -0
  155. package/dist/listValueStore-5d4vNGQM-DB08drLf.js.map +1 -0
  156. package/dist/proxy-C4gcRXzG.js +5265 -0
  157. package/dist/proxy-C4gcRXzG.js.map +1 -0
  158. package/package.json +7 -2
  159. package/dist/AccessRights-DUgY6ewy.js +0 -1031
  160. package/dist/AccessRights-DUgY6ewy.js.map +0 -1
  161. package/dist/AddMenuConfiguration-c6ZKiN0i.js +0 -8898
  162. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +0 -1
  163. package/dist/ChangePasswordModalCore-lQ9GamH1.js +0 -5494
  164. package/dist/ChangePasswordModalCore-lQ9GamH1.js.map +0 -1
  165. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  166. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  167. package/dist/EventsUi-D6O9S7BK.js.map +0 -1
  168. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +0 -79
  169. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +0 -1
  170. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +0 -1
  171. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +0 -665
  172. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +0 -1
  173. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  174. package/dist/ManageRole-CNZBRKGU.js +0 -776
  175. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  176. package/dist/MobileAnalytics-BLOionG_.js +0 -17301
  177. package/dist/MobileAnalytics-BLOionG_.js.map +0 -1
  178. package/dist/MobileMenuManagement-68Wijb0X.js +0 -220
  179. package/dist/MobileMenuManagement-68Wijb0X.js.map +0 -1
  180. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  181. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +0 -1812
  182. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +0 -1
  183. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  184. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +0 -783
  185. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +0 -1
  186. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +0 -1
  187. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +0 -599
  188. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +0 -1
  189. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +0 -1305
  190. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +0 -1
  191. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +0 -675
  192. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +0 -1
  193. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +0 -1
  194. package/dist/Roles-BIyiic67.js +0 -14
  195. package/dist/Roles-BIyiic67.js.map +0 -1
  196. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +0 -1
  197. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +0 -676
  198. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +0 -1
  199. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +0 -1
  200. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  201. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  202. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +0 -1
  203. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +0 -315
  204. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +0 -1
  205. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +0 -476
  206. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +0 -1
  207. package/dist/UserList-L41Xw0Q6.js +0 -1129
  208. package/dist/UserList-L41Xw0Q6.js.map +0 -1
  209. package/dist/Users-CsJ08Kjm.js +0 -40
  210. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +0 -321
  211. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +0 -1
  212. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +0 -1
  213. package/dist/dashboardLayoutUtils-CJivzaU1.js +0 -408
  214. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +0 -1
  215. package/dist/index-D9YNFPn9.js.map +0 -1
  216. package/dist/index.lib-ETRQOzvE.js.map +0 -1
  217. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +0 -36
  218. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +0 -1
@@ -0,0 +1,1450 @@
1
+ import { jsxs as m, jsx as n, Fragment as Zt } from "react/jsx-runtime";
2
+ import { useState as k, useMemo as Un, useRef as Tt, useEffect as Ve } from "react";
3
+ import { useParams as Fn, useNavigate as zn } from "react-router";
4
+ import r from "prop-types";
5
+ import { useTheme as Hn, Box as p, Typography as C, TextField as Ye, IconButton as ae, Chip as Wn, Card as At, Button as J, Tooltip as we, CircularProgress as Ie, Dialog as bt, DialogTitle as vt, DialogContent as yt, DialogActions as St, DialogContentText as qn } from "@mui/material";
6
+ import { FontAwesomeIcon as S } from "@fortawesome/react-fontawesome";
7
+ import { faPlus as Ke, faTrash as cn, faCircleInfo as Bn, faFolderOpen as $n, faXmark as Gn, faImage as dn, faVideo as un, faEye as Vn, faCheck as Yn, faSyringe as jn, faCircleCheck as je, faFileLines as mn, faArrowLeft as Xn, faChevronDown as fn } from "@fortawesome/free-solid-svg-icons";
8
+ import { showToast as oe } from "@/common/toaster/toaster";
9
+ import { G as Te, g as Kn, c as Jt, b as Zn, i as pn, d as Jn, s as Qn, C as Qt, e as ei } from "./VaccineEducation-DWkNNasF.js";
10
+ import { C as ti } from "./index-mfoqII2U.js";
11
+ import { C as ni, E as ii, A as oi, P as ai, B as ri, I as li, U as si, L as ci, a as di } from "./ckeditor5-_x14lrzc.js";
12
+ import { useQuery as ui } from "@tanstack/react-query";
13
+ import { api as mi } from "@/common/interceptors/AxiosInterceptor";
14
+ import { FormConfiguratorService as fi } from "@/common/services/FormConfiguratorService";
15
+ import { execute as pi } from "@/common/services/GlobalApis";
16
+ import './VaccineEducationConfigurator.css';/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
17
+ const {
18
+ entries: hn,
19
+ setPrototypeOf: en,
20
+ isFrozen: hi,
21
+ getPrototypeOf: gi,
22
+ getOwnPropertyDescriptor: Ti
23
+ } = Object;
24
+ let {
25
+ freeze: W,
26
+ seal: Y,
27
+ create: gn
28
+ } = Object, {
29
+ apply: Et,
30
+ construct: _t
31
+ } = typeof Reflect < "u" && Reflect;
32
+ W || (W = function(i) {
33
+ return i;
34
+ });
35
+ Y || (Y = function(i) {
36
+ return i;
37
+ });
38
+ Et || (Et = function(i, o) {
39
+ for (var l = arguments.length, s = new Array(l > 2 ? l - 2 : 0), c = 2; c < l; c++)
40
+ s[c - 2] = arguments[c];
41
+ return i.apply(o, s);
42
+ });
43
+ _t || (_t = function(i) {
44
+ for (var o = arguments.length, l = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
45
+ l[s - 1] = arguments[s];
46
+ return new i(...l);
47
+ });
48
+ const qe = q(Array.prototype.forEach), Ei = q(Array.prototype.lastIndexOf), tn = q(Array.prototype.pop), Ne = q(Array.prototype.push), _i = q(Array.prototype.splice), Ge = q(String.prototype.toLowerCase), ut = q(String.prototype.toString), mt = q(String.prototype.match), Ce = q(String.prototype.replace), Ai = q(String.prototype.indexOf), bi = q(String.prototype.trim), j = q(Object.prototype.hasOwnProperty), H = q(RegExp.prototype.test), xe = vi(TypeError);
49
+ function q(t) {
50
+ return function(i) {
51
+ i instanceof RegExp && (i.lastIndex = 0);
52
+ for (var o = arguments.length, l = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
53
+ l[s - 1] = arguments[s];
54
+ return Et(t, i, l);
55
+ };
56
+ }
57
+ function vi(t) {
58
+ return function() {
59
+ for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
60
+ o[l] = arguments[l];
61
+ return _t(t, o);
62
+ };
63
+ }
64
+ function E(t, i) {
65
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ge;
66
+ en && en(t, null);
67
+ let l = i.length;
68
+ for (; l--; ) {
69
+ let s = i[l];
70
+ if (typeof s == "string") {
71
+ const c = o(s);
72
+ c !== s && (hi(i) || (i[l] = c), s = c);
73
+ }
74
+ t[s] = !0;
75
+ }
76
+ return t;
77
+ }
78
+ function yi(t) {
79
+ for (let i = 0; i < t.length; i++)
80
+ j(t, i) || (t[i] = null);
81
+ return t;
82
+ }
83
+ function ie(t) {
84
+ const i = gn(null);
85
+ for (const [o, l] of hn(t))
86
+ j(t, o) && (Array.isArray(l) ? i[o] = yi(l) : l && typeof l == "object" && l.constructor === Object ? i[o] = ie(l) : i[o] = l);
87
+ return i;
88
+ }
89
+ function Le(t, i) {
90
+ for (; t !== null; ) {
91
+ const l = Ti(t, i);
92
+ if (l) {
93
+ if (l.get)
94
+ return q(l.get);
95
+ if (typeof l.value == "function")
96
+ return q(l.value);
97
+ }
98
+ t = gi(t);
99
+ }
100
+ function o() {
101
+ return null;
102
+ }
103
+ return o;
104
+ }
105
+ const nn = W(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ft = W(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), pt = W(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Si = W(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ht = W(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ri = W(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), on = W(["#text"]), an = W(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), gt = W(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), rn = W(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Be = W(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ni = Y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ci = Y(/<%[\w\W]*|[\w\W]*%>/gm), xi = Y(/\$\{[\w\W]*/gm), Li = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Oi = Y(/^aria-[\-\w]+$/), Tn = Y(
106
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
107
+ // eslint-disable-line no-useless-escape
108
+ ), wi = Y(/^(?:\w+script|data):/i), Ii = Y(
109
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
110
+ // eslint-disable-line no-control-regex
111
+ ), En = Y(/^html$/i), ki = Y(/^[a-z][.\w]*(-[.\w]+)+$/i);
112
+ var ln = /* @__PURE__ */ Object.freeze({
113
+ __proto__: null,
114
+ ARIA_ATTR: Oi,
115
+ ATTR_WHITESPACE: Ii,
116
+ CUSTOM_ELEMENT: ki,
117
+ DATA_ATTR: Li,
118
+ DOCTYPE_NAME: En,
119
+ ERB_EXPR: Ci,
120
+ IS_ALLOWED_URI: Tn,
121
+ IS_SCRIPT_OR_DATA: wi,
122
+ MUSTACHE_EXPR: Ni,
123
+ TMPLIT_EXPR: xi
124
+ });
125
+ const Oe = {
126
+ element: 1,
127
+ text: 3,
128
+ // Deprecated
129
+ progressingInstruction: 7,
130
+ comment: 8,
131
+ document: 9
132
+ }, Di = function() {
133
+ return typeof window > "u" ? null : window;
134
+ }, Mi = function(i, o) {
135
+ if (typeof i != "object" || typeof i.createPolicy != "function")
136
+ return null;
137
+ let l = null;
138
+ const s = "data-tt-policy-suffix";
139
+ o && o.hasAttribute(s) && (l = o.getAttribute(s));
140
+ const c = "dompurify" + (l ? "#" + l : "");
141
+ try {
142
+ return i.createPolicy(c, {
143
+ createHTML(T) {
144
+ return T;
145
+ },
146
+ createScriptURL(T) {
147
+ return T;
148
+ }
149
+ });
150
+ } catch {
151
+ return console.warn("TrustedTypes policy " + c + " could not be created."), null;
152
+ }
153
+ }, sn = function() {
154
+ return {
155
+ afterSanitizeAttributes: [],
156
+ afterSanitizeElements: [],
157
+ afterSanitizeShadowDOM: [],
158
+ beforeSanitizeAttributes: [],
159
+ beforeSanitizeElements: [],
160
+ beforeSanitizeShadowDOM: [],
161
+ uponSanitizeAttribute: [],
162
+ uponSanitizeElement: [],
163
+ uponSanitizeShadowNode: []
164
+ };
165
+ };
166
+ function _n() {
167
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Di();
168
+ const i = (u) => _n(u);
169
+ if (i.version = "3.2.7", i.removed = [], !t || !t.document || t.document.nodeType !== Oe.document || !t.Element)
170
+ return i.isSupported = !1, i;
171
+ let {
172
+ document: o
173
+ } = t;
174
+ const l = o, s = l.currentScript, {
175
+ DocumentFragment: c,
176
+ HTMLTemplateElement: T,
177
+ Node: A,
178
+ Element: _,
179
+ NodeFilter: b,
180
+ NamedNodeMap: x = t.NamedNodeMap || t.MozNamedAttrMap,
181
+ HTMLFormElement: z,
182
+ DOMParser: X,
183
+ trustedTypes: M
184
+ } = t, B = _.prototype, re = Le(B, "cloneNode"), V = Le(B, "remove"), g = Le(B, "nextSibling"), O = Le(B, "childNodes"), $ = Le(B, "parentNode");
185
+ if (typeof T == "function") {
186
+ const u = o.createElement("template");
187
+ u.content && u.content.ownerDocument && (o = u.content.ownerDocument);
188
+ }
189
+ let v, Q = "";
190
+ const {
191
+ implementation: Ee,
192
+ createNodeIterator: ke,
193
+ createDocumentFragment: _e,
194
+ getElementsByTagName: Ze
195
+ } = o, {
196
+ importNode: Je
197
+ } = l;
198
+ let P = sn();
199
+ i.isSupported = typeof hn == "function" && typeof $ == "function" && Ee && Ee.createHTMLDocument !== void 0;
200
+ const {
201
+ MUSTACHE_EXPR: le,
202
+ ERB_EXPR: Ae,
203
+ TMPLIT_EXPR: be,
204
+ DATA_ATTR: De,
205
+ ARIA_ATTR: Qe,
206
+ IS_SCRIPT_OR_DATA: f,
207
+ ATTR_WHITESPACE: h,
208
+ CUSTOM_ELEMENT: N
209
+ } = ln;
210
+ let {
211
+ IS_ALLOWED_URI: K
212
+ } = ln, y = null;
213
+ const ve = E({}, [...nn, ...ft, ...pt, ...ht, ...on]);
214
+ let w = null;
215
+ const Lt = E({}, [...an, ...gt, ...rn, ...Be]);
216
+ let L = Object.seal(gn(null, {
217
+ tagNameCheck: {
218
+ writable: !0,
219
+ configurable: !1,
220
+ enumerable: !0,
221
+ value: null
222
+ },
223
+ attributeNameCheck: {
224
+ writable: !0,
225
+ configurable: !1,
226
+ enumerable: !0,
227
+ value: null
228
+ },
229
+ allowCustomizedBuiltInElements: {
230
+ writable: !0,
231
+ configurable: !1,
232
+ enumerable: !0,
233
+ value: !1
234
+ }
235
+ })), ye = null, et = null, Ot = !0, tt = !0, wt = !1, It = !0, de = !1, Me = !0, se = !1, nt = !1, it = !1, ue = !1, Pe = !1, Ue = !1, kt = !0, Dt = !1;
236
+ const Ln = "user-content-";
237
+ let ot = !0, Se = !1, me = {}, fe = null;
238
+ const Mt = E({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
239
+ let Pt = null;
240
+ const Ut = E({}, ["audio", "video", "img", "source", "image", "track"]);
241
+ let at = null;
242
+ const Ft = E({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Fe = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", ee = "http://www.w3.org/1999/xhtml";
243
+ let pe = ee, rt = !1, lt = null;
244
+ const On = E({}, [Fe, ze, ee], ut);
245
+ let He = E({}, ["mi", "mo", "mn", "ms", "mtext"]), We = E({}, ["annotation-xml"]);
246
+ const wn = E({}, ["title", "style", "font", "a", "script"]);
247
+ let Re = null;
248
+ const In = ["application/xhtml+xml", "text/html"], kn = "text/html";
249
+ let D = null, he = null;
250
+ const Dn = o.createElement("form"), zt = function(e) {
251
+ return e instanceof RegExp || e instanceof Function;
252
+ }, st = function() {
253
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
254
+ if (!(he && he === e)) {
255
+ if ((!e || typeof e != "object") && (e = {}), e = ie(e), Re = // eslint-disable-next-line unicorn/prefer-includes
256
+ In.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? kn : e.PARSER_MEDIA_TYPE, D = Re === "application/xhtml+xml" ? ut : Ge, y = j(e, "ALLOWED_TAGS") ? E({}, e.ALLOWED_TAGS, D) : ve, w = j(e, "ALLOWED_ATTR") ? E({}, e.ALLOWED_ATTR, D) : Lt, lt = j(e, "ALLOWED_NAMESPACES") ? E({}, e.ALLOWED_NAMESPACES, ut) : On, at = j(e, "ADD_URI_SAFE_ATTR") ? E(ie(Ft), e.ADD_URI_SAFE_ATTR, D) : Ft, Pt = j(e, "ADD_DATA_URI_TAGS") ? E(ie(Ut), e.ADD_DATA_URI_TAGS, D) : Ut, fe = j(e, "FORBID_CONTENTS") ? E({}, e.FORBID_CONTENTS, D) : Mt, ye = j(e, "FORBID_TAGS") ? E({}, e.FORBID_TAGS, D) : ie({}), et = j(e, "FORBID_ATTR") ? E({}, e.FORBID_ATTR, D) : ie({}), me = j(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Ot = e.ALLOW_ARIA_ATTR !== !1, tt = e.ALLOW_DATA_ATTR !== !1, wt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, It = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, de = e.SAFE_FOR_TEMPLATES || !1, Me = e.SAFE_FOR_XML !== !1, se = e.WHOLE_DOCUMENT || !1, ue = e.RETURN_DOM || !1, Pe = e.RETURN_DOM_FRAGMENT || !1, Ue = e.RETURN_TRUSTED_TYPE || !1, it = e.FORCE_BODY || !1, kt = e.SANITIZE_DOM !== !1, Dt = e.SANITIZE_NAMED_PROPS || !1, ot = e.KEEP_CONTENT !== !1, Se = e.IN_PLACE || !1, K = e.ALLOWED_URI_REGEXP || Tn, pe = e.NAMESPACE || ee, He = e.MATHML_TEXT_INTEGRATION_POINTS || He, We = e.HTML_INTEGRATION_POINTS || We, L = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && zt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (L.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && zt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (L.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (L.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), de && (tt = !1), Pe && (ue = !0), me && (y = E({}, on), w = [], me.html === !0 && (E(y, nn), E(w, an)), me.svg === !0 && (E(y, ft), E(w, gt), E(w, Be)), me.svgFilters === !0 && (E(y, pt), E(w, gt), E(w, Be)), me.mathMl === !0 && (E(y, ht), E(w, rn), E(w, Be))), e.ADD_TAGS && (y === ve && (y = ie(y)), E(y, e.ADD_TAGS, D)), e.ADD_ATTR && (w === Lt && (w = ie(w)), E(w, e.ADD_ATTR, D)), e.ADD_URI_SAFE_ATTR && E(at, e.ADD_URI_SAFE_ATTR, D), e.FORBID_CONTENTS && (fe === Mt && (fe = ie(fe)), E(fe, e.FORBID_CONTENTS, D)), ot && (y["#text"] = !0), se && E(y, ["html", "head", "body"]), y.table && (E(y, ["tbody"]), delete ye.tbody), e.TRUSTED_TYPES_POLICY) {
257
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
258
+ throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
259
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
260
+ throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
261
+ v = e.TRUSTED_TYPES_POLICY, Q = v.createHTML("");
262
+ } else
263
+ v === void 0 && (v = Mi(M, s)), v !== null && typeof Q == "string" && (Q = v.createHTML(""));
264
+ W && W(e), he = e;
265
+ }
266
+ }, Ht = E({}, [...ft, ...pt, ...Si]), Wt = E({}, [...ht, ...Ri]), Mn = function(e) {
267
+ let a = $(e);
268
+ (!a || !a.tagName) && (a = {
269
+ namespaceURI: pe,
270
+ tagName: "template"
271
+ });
272
+ const d = Ge(e.tagName), R = Ge(a.tagName);
273
+ return lt[e.namespaceURI] ? e.namespaceURI === ze ? a.namespaceURI === ee ? d === "svg" : a.namespaceURI === Fe ? d === "svg" && (R === "annotation-xml" || He[R]) : !!Ht[d] : e.namespaceURI === Fe ? a.namespaceURI === ee ? d === "math" : a.namespaceURI === ze ? d === "math" && We[R] : !!Wt[d] : e.namespaceURI === ee ? a.namespaceURI === ze && !We[R] || a.namespaceURI === Fe && !He[R] ? !1 : !Wt[d] && (wn[d] || !Ht[d]) : !!(Re === "application/xhtml+xml" && lt[e.namespaceURI]) : !1;
274
+ }, Z = function(e) {
275
+ Ne(i.removed, {
276
+ element: e
277
+ });
278
+ try {
279
+ $(e).removeChild(e);
280
+ } catch {
281
+ V(e);
282
+ }
283
+ }, ce = function(e, a) {
284
+ try {
285
+ Ne(i.removed, {
286
+ attribute: a.getAttributeNode(e),
287
+ from: a
288
+ });
289
+ } catch {
290
+ Ne(i.removed, {
291
+ attribute: null,
292
+ from: a
293
+ });
294
+ }
295
+ if (a.removeAttribute(e), e === "is")
296
+ if (ue || Pe)
297
+ try {
298
+ Z(a);
299
+ } catch {
300
+ }
301
+ else
302
+ try {
303
+ a.setAttribute(e, "");
304
+ } catch {
305
+ }
306
+ }, qt = function(e) {
307
+ let a = null, d = null;
308
+ if (it)
309
+ e = "<remove></remove>" + e;
310
+ else {
311
+ const I = mt(e, /^[\r\n\t ]+/);
312
+ d = I && I[0];
313
+ }
314
+ Re === "application/xhtml+xml" && pe === ee && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
315
+ const R = v ? v.createHTML(e) : e;
316
+ if (pe === ee)
317
+ try {
318
+ a = new X().parseFromString(R, Re);
319
+ } catch {
320
+ }
321
+ if (!a || !a.documentElement) {
322
+ a = Ee.createDocument(pe, "template", null);
323
+ try {
324
+ a.documentElement.innerHTML = rt ? Q : R;
325
+ } catch {
326
+ }
327
+ }
328
+ const F = a.body || a.documentElement;
329
+ return e && d && F.insertBefore(o.createTextNode(d), F.childNodes[0] || null), pe === ee ? Ze.call(a, se ? "html" : "body")[0] : se ? a.documentElement : F;
330
+ }, Bt = function(e) {
331
+ return ke.call(
332
+ e.ownerDocument || e,
333
+ e,
334
+ // eslint-disable-next-line no-bitwise
335
+ b.SHOW_ELEMENT | b.SHOW_COMMENT | b.SHOW_TEXT | b.SHOW_PROCESSING_INSTRUCTION | b.SHOW_CDATA_SECTION,
336
+ null
337
+ );
338
+ }, ct = function(e) {
339
+ return e instanceof z && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof x) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
340
+ }, $t = function(e) {
341
+ return typeof A == "function" && e instanceof A;
342
+ };
343
+ function te(u, e, a) {
344
+ qe(u, (d) => {
345
+ d.call(i, e, a, he);
346
+ });
347
+ }
348
+ const Gt = function(e) {
349
+ let a = null;
350
+ if (te(P.beforeSanitizeElements, e, null), ct(e))
351
+ return Z(e), !0;
352
+ const d = D(e.nodeName);
353
+ if (te(P.uponSanitizeElement, e, {
354
+ tagName: d,
355
+ allowedTags: y
356
+ }), Me && e.hasChildNodes() && !$t(e.firstElementChild) && H(/<[/\w!]/g, e.innerHTML) && H(/<[/\w!]/g, e.textContent) || e.nodeType === Oe.progressingInstruction || Me && e.nodeType === Oe.comment && H(/<[/\w]/g, e.data))
357
+ return Z(e), !0;
358
+ if (!y[d] || ye[d]) {
359
+ if (!ye[d] && Yt(d) && (L.tagNameCheck instanceof RegExp && H(L.tagNameCheck, d) || L.tagNameCheck instanceof Function && L.tagNameCheck(d)))
360
+ return !1;
361
+ if (ot && !fe[d]) {
362
+ const R = $(e) || e.parentNode, F = O(e) || e.childNodes;
363
+ if (F && R) {
364
+ const I = F.length;
365
+ for (let G = I - 1; G >= 0; --G) {
366
+ const ne = re(F[G], !0);
367
+ ne.__removalCount = (e.__removalCount || 0) + 1, R.insertBefore(ne, g(e));
368
+ }
369
+ }
370
+ }
371
+ return Z(e), !0;
372
+ }
373
+ return e instanceof _ && !Mn(e) || (d === "noscript" || d === "noembed" || d === "noframes") && H(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Z(e), !0) : (de && e.nodeType === Oe.text && (a = e.textContent, qe([le, Ae, be], (R) => {
374
+ a = Ce(a, R, " ");
375
+ }), e.textContent !== a && (Ne(i.removed, {
376
+ element: e.cloneNode()
377
+ }), e.textContent = a)), te(P.afterSanitizeElements, e, null), !1);
378
+ }, Vt = function(e, a, d) {
379
+ if (kt && (a === "id" || a === "name") && (d in o || d in Dn))
380
+ return !1;
381
+ if (!(tt && !et[a] && H(De, a))) {
382
+ if (!(Ot && H(Qe, a))) {
383
+ if (!w[a] || et[a]) {
384
+ if (
385
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
386
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
387
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
388
+ !(Yt(e) && (L.tagNameCheck instanceof RegExp && H(L.tagNameCheck, e) || L.tagNameCheck instanceof Function && L.tagNameCheck(e)) && (L.attributeNameCheck instanceof RegExp && H(L.attributeNameCheck, a) || L.attributeNameCheck instanceof Function && L.attributeNameCheck(a, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
389
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
390
+ a === "is" && L.allowCustomizedBuiltInElements && (L.tagNameCheck instanceof RegExp && H(L.tagNameCheck, d) || L.tagNameCheck instanceof Function && L.tagNameCheck(d)))
391
+ ) return !1;
392
+ } else if (!at[a]) {
393
+ if (!H(K, Ce(d, h, ""))) {
394
+ if (!((a === "src" || a === "xlink:href" || a === "href") && e !== "script" && Ai(d, "data:") === 0 && Pt[e])) {
395
+ if (!(wt && !H(f, Ce(d, h, "")))) {
396
+ if (d)
397
+ return !1;
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ }
404
+ return !0;
405
+ }, Yt = function(e) {
406
+ return e !== "annotation-xml" && mt(e, N);
407
+ }, jt = function(e) {
408
+ te(P.beforeSanitizeAttributes, e, null);
409
+ const {
410
+ attributes: a
411
+ } = e;
412
+ if (!a || ct(e))
413
+ return;
414
+ const d = {
415
+ attrName: "",
416
+ attrValue: "",
417
+ keepAttr: !0,
418
+ allowedAttributes: w,
419
+ forceKeepAttr: void 0
420
+ };
421
+ let R = a.length;
422
+ for (; R--; ) {
423
+ const F = a[R], {
424
+ name: I,
425
+ namespaceURI: G,
426
+ value: ne
427
+ } = F, ge = D(I), dt = ne;
428
+ let U = I === "value" ? dt : bi(dt);
429
+ if (d.attrName = ge, d.attrValue = U, d.keepAttr = !0, d.forceKeepAttr = void 0, te(P.uponSanitizeAttribute, e, d), U = d.attrValue, Dt && (ge === "id" || ge === "name") && (ce(I, e), U = Ln + U), Me && H(/((--!?|])>)|<\/(style|title|textarea)/i, U)) {
430
+ ce(I, e);
431
+ continue;
432
+ }
433
+ if (ge === "attributename" && mt(U, "href")) {
434
+ ce(I, e);
435
+ continue;
436
+ }
437
+ if (d.forceKeepAttr)
438
+ continue;
439
+ if (!d.keepAttr) {
440
+ ce(I, e);
441
+ continue;
442
+ }
443
+ if (!It && H(/\/>/i, U)) {
444
+ ce(I, e);
445
+ continue;
446
+ }
447
+ de && qe([le, Ae, be], (Kt) => {
448
+ U = Ce(U, Kt, " ");
449
+ });
450
+ const Xt = D(e.nodeName);
451
+ if (!Vt(Xt, ge, U)) {
452
+ ce(I, e);
453
+ continue;
454
+ }
455
+ if (v && typeof M == "object" && typeof M.getAttributeType == "function" && !G)
456
+ switch (M.getAttributeType(Xt, ge)) {
457
+ case "TrustedHTML": {
458
+ U = v.createHTML(U);
459
+ break;
460
+ }
461
+ case "TrustedScriptURL": {
462
+ U = v.createScriptURL(U);
463
+ break;
464
+ }
465
+ }
466
+ if (U !== dt)
467
+ try {
468
+ G ? e.setAttributeNS(G, I, U) : e.setAttribute(I, U), ct(e) ? Z(e) : tn(i.removed);
469
+ } catch {
470
+ ce(I, e);
471
+ }
472
+ }
473
+ te(P.afterSanitizeAttributes, e, null);
474
+ }, Pn = function u(e) {
475
+ let a = null;
476
+ const d = Bt(e);
477
+ for (te(P.beforeSanitizeShadowDOM, e, null); a = d.nextNode(); )
478
+ te(P.uponSanitizeShadowNode, a, null), Gt(a), jt(a), a.content instanceof c && u(a.content);
479
+ te(P.afterSanitizeShadowDOM, e, null);
480
+ };
481
+ return i.sanitize = function(u) {
482
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, d = null, R = null, F = null;
483
+ if (rt = !u, rt && (u = "<!-->"), typeof u != "string" && !$t(u))
484
+ if (typeof u.toString == "function") {
485
+ if (u = u.toString(), typeof u != "string")
486
+ throw xe("dirty is not a string, aborting");
487
+ } else
488
+ throw xe("toString is not a function");
489
+ if (!i.isSupported)
490
+ return u;
491
+ if (nt || st(e), i.removed = [], typeof u == "string" && (Se = !1), Se) {
492
+ if (u.nodeName) {
493
+ const ne = D(u.nodeName);
494
+ if (!y[ne] || ye[ne])
495
+ throw xe("root node is forbidden and cannot be sanitized in-place");
496
+ }
497
+ } else if (u instanceof A)
498
+ a = qt("<!---->"), d = a.ownerDocument.importNode(u, !0), d.nodeType === Oe.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? a = d : a.appendChild(d);
499
+ else {
500
+ if (!ue && !de && !se && // eslint-disable-next-line unicorn/prefer-includes
501
+ u.indexOf("<") === -1)
502
+ return v && Ue ? v.createHTML(u) : u;
503
+ if (a = qt(u), !a)
504
+ return ue ? null : Ue ? Q : "";
505
+ }
506
+ a && it && Z(a.firstChild);
507
+ const I = Bt(Se ? u : a);
508
+ for (; R = I.nextNode(); )
509
+ Gt(R), jt(R), R.content instanceof c && Pn(R.content);
510
+ if (Se)
511
+ return u;
512
+ if (ue) {
513
+ if (Pe)
514
+ for (F = _e.call(a.ownerDocument); a.firstChild; )
515
+ F.appendChild(a.firstChild);
516
+ else
517
+ F = a;
518
+ return (w.shadowroot || w.shadowrootmode) && (F = Je.call(l, F, !0)), F;
519
+ }
520
+ let G = se ? a.outerHTML : a.innerHTML;
521
+ return se && y["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && H(En, a.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
522
+ ` + G), de && qe([le, Ae, be], (ne) => {
523
+ G = Ce(G, ne, " ");
524
+ }), v && Ue ? v.createHTML(G) : G;
525
+ }, i.setConfig = function() {
526
+ let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
527
+ st(u), nt = !0;
528
+ }, i.clearConfig = function() {
529
+ he = null, nt = !1;
530
+ }, i.isValidAttribute = function(u, e, a) {
531
+ he || st({});
532
+ const d = D(u), R = D(e);
533
+ return Vt(d, R, a);
534
+ }, i.addHook = function(u, e) {
535
+ typeof e == "function" && Ne(P[u], e);
536
+ }, i.removeHook = function(u, e) {
537
+ if (e !== void 0) {
538
+ const a = Ei(P[u], e);
539
+ return a === -1 ? void 0 : _i(P[u], a, 1)[0];
540
+ }
541
+ return tn(P[u]);
542
+ }, i.removeHooks = function(u) {
543
+ P[u] = [];
544
+ }, i.removeAllHooks = function() {
545
+ P = sn();
546
+ }, i;
547
+ }
548
+ var Pi = _n();
549
+ const Ui = /^https?:\/\/\S+$/i, Fi = (t) => {
550
+ const i = Pi.sanitize(t, {
551
+ ALLOWED_TAGS: ["b", "i", "u", "strong", "em", "p", "br", "ul", "ol", "li", "span", "a"],
552
+ ALLOWED_ATTR: ["href"],
553
+ FORBID_TAGS: ["script", "iframe"],
554
+ FORBID_ATTR: ["onclick", "onerror", "style"]
555
+ }), o = document.createElement("div");
556
+ return o.innerHTML = i, o.querySelectorAll("a").forEach((l) => {
557
+ const s = l.getAttribute("href") || "";
558
+ Ui.test(s) ? (l.setAttribute("target", "_blank"), l.setAttribute("rel", "noopener noreferrer")) : l.removeAttribute("href");
559
+ }), o.innerHTML;
560
+ }, Xe = (t) => (t || "").replace(/<[^>]*>/g, "").trim();
561
+ class Rt extends ni {
562
+ }
563
+ Rt.builtinPlugins = [
564
+ ii,
565
+ oi,
566
+ ai,
567
+ ri,
568
+ li,
569
+ si,
570
+ ci,
571
+ di
572
+ ];
573
+ Rt.defaultConfig = {
574
+ licenseKey: "GPL",
575
+ toolbar: {
576
+ items: ["bold", "italic", "underline", "|", "bulletedList", "numberedList", "|", "link"]
577
+ },
578
+ link: {
579
+ addTargetToExternalLinks: !0,
580
+ defaultProtocol: "https://"
581
+ },
582
+ language: "en"
583
+ };
584
+ function Nt({
585
+ defaultValue: t,
586
+ onCommit: i,
587
+ placeholder: o,
588
+ maxLength: l,
589
+ dataTestId: s
590
+ }) {
591
+ const c = Hn(), T = c.palette.mode === "dark", [A, _] = k(() => Xe(t).length);
592
+ return /* @__PURE__ */ m(p, { "data-testid": s, children: [
593
+ /* @__PURE__ */ n(
594
+ p,
595
+ {
596
+ sx: {
597
+ borderRadius: "8px",
598
+ overflow: "hidden",
599
+ border: `1px solid ${c.palette.divider}`,
600
+ "& .ck-editor__main > .ck-editor__editable": {
601
+ backgroundColor: `${c.palette.background.paper} !important`,
602
+ color: `${c.palette.text.primary} !important`,
603
+ minHeight: "76px",
604
+ fontSize: "13.5px",
605
+ "&.ck-focused": {
606
+ borderColor: `${c.palette.primary.main} !important`
607
+ }
608
+ },
609
+ "& .ck.ck-toolbar": {
610
+ backgroundColor: T ? "#21262D !important" : "var(--color-gray4) !important",
611
+ borderColor: `${c.palette.divider} !important`
612
+ },
613
+ "& .ck.ck-toolbar .ck-button": {
614
+ color: `${c.palette.text.primary} !important`,
615
+ cursor: "pointer",
616
+ "&:hover": {
617
+ backgroundColor: T ? "#30363D !important" : "var(--color-gray3) !important"
618
+ },
619
+ "&.ck-on": {
620
+ backgroundColor: T ? "rgba(17,182,102,0.2) !important" : "var(--color-gray3) !important",
621
+ color: `${c.palette.primary.main} !important`
622
+ }
623
+ }
624
+ },
625
+ children: /* @__PURE__ */ n(
626
+ ti,
627
+ {
628
+ editor: Rt,
629
+ data: t || "",
630
+ config: { placeholder: o },
631
+ onChange: (b, x) => {
632
+ const z = Fi(x.getData());
633
+ _(Xe(z).length), i(z);
634
+ },
635
+ "data-testid": s ? `${s}-ckeditor` : void 0
636
+ }
637
+ )
638
+ }
639
+ ),
640
+ l && /* @__PURE__ */ m(
641
+ C,
642
+ {
643
+ variant: "caption",
644
+ sx: {
645
+ display: "block",
646
+ textAlign: "right",
647
+ mt: 0.5,
648
+ color: A > l ? "error.main" : "text.disabled"
649
+ },
650
+ children: [
651
+ A,
652
+ " / ",
653
+ l
654
+ ]
655
+ }
656
+ )
657
+ ] });
658
+ }
659
+ Nt.propTypes = {
660
+ defaultValue: r.string,
661
+ onCommit: r.func.isRequired,
662
+ placeholder: r.string,
663
+ maxLength: r.number,
664
+ dataTestId: r.string
665
+ };
666
+ const zi = {
667
+ default: "",
668
+ critical: "chip-list-item-critical",
669
+ warning: "chip-list-item-warning"
670
+ };
671
+ function An({
672
+ items: t = [],
673
+ onChange: i,
674
+ placeholder: o = "Type one item, then press Enter…",
675
+ tone: l = "default",
676
+ dataTestId: s
677
+ }) {
678
+ const [c, T] = k(""), A = () => {
679
+ const b = c.trim();
680
+ b && (i([...t || [], b]), T(""));
681
+ }, _ = (b) => {
682
+ i(t.filter((x, z) => z !== b));
683
+ };
684
+ return /* @__PURE__ */ m(p, { "data-testid": s, children: [
685
+ /* @__PURE__ */ m(p, { sx: { display: "flex", gap: 1 }, children: [
686
+ /* @__PURE__ */ n(
687
+ Ye,
688
+ {
689
+ size: "small",
690
+ fullWidth: !0,
691
+ value: c,
692
+ placeholder: o,
693
+ onChange: (b) => T(b.target.value),
694
+ onKeyDown: (b) => {
695
+ b.key === "Enter" && (b.preventDefault(), A());
696
+ }
697
+ }
698
+ ),
699
+ /* @__PURE__ */ n(ae, { size: "small", onClick: A, disabled: !c.trim(), children: /* @__PURE__ */ n(S, { icon: Ke, size: "xs" }) })
700
+ ] }),
701
+ /* @__PURE__ */ m(p, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mt: 1.5 }, children: [
702
+ (!t || t.length === 0) && /* @__PURE__ */ n(C, { variant: "caption", sx: { color: "text.disabled", fontStyle: "italic" }, children: "None added yet." }),
703
+ (t || []).map((b, x) => /* @__PURE__ */ n(
704
+ Wn,
705
+ {
706
+ label: b,
707
+ size: "small",
708
+ onDelete: () => _(x),
709
+ className: zi[l] || ""
710
+ },
711
+ `${b}-${x}`
712
+ ))
713
+ ] })
714
+ ] });
715
+ }
716
+ An.propTypes = {
717
+ items: r.arrayOf(r.string),
718
+ onChange: r.func.isRequired,
719
+ placeholder: r.string,
720
+ tone: r.oneOf(["default", "critical", "warning"]),
721
+ dataTestId: r.string
722
+ };
723
+ function bn({ items: t = [], onChange: i }) {
724
+ const o = (c, T, A) => {
725
+ const _ = t.map((b, x) => x === c ? { ...b, [T]: A } : b);
726
+ i(_);
727
+ }, l = (c) => i(t.filter((T, A) => A !== c)), s = () => i([...t || [], { question: "", answer: "" }]);
728
+ return /* @__PURE__ */ m(p, { children: [
729
+ (t || []).map((c, T) => /* @__PURE__ */ n(
730
+ At,
731
+ {
732
+ variant: "outlined",
733
+ sx: { p: 1.5, mb: 1.5, borderRadius: "8px", boxShadow: "none" },
734
+ children: /* @__PURE__ */ m(p, { sx: { display: "flex", gap: 1, alignItems: "flex-start" }, children: [
735
+ /* @__PURE__ */ m(p, { sx: { flex: 1 }, children: [
736
+ /* @__PURE__ */ n(
737
+ Ye,
738
+ {
739
+ size: "small",
740
+ fullWidth: !0,
741
+ placeholder: "Question",
742
+ value: c.question,
743
+ onChange: (A) => o(T, "question", A.target.value),
744
+ sx: { mb: 1 }
745
+ }
746
+ ),
747
+ /* @__PURE__ */ n(
748
+ Ye,
749
+ {
750
+ size: "small",
751
+ fullWidth: !0,
752
+ multiline: !0,
753
+ minRows: 2,
754
+ placeholder: "Answer",
755
+ value: c.answer,
756
+ onChange: (A) => o(T, "answer", A.target.value)
757
+ }
758
+ )
759
+ ] }),
760
+ /* @__PURE__ */ n(ae, { size: "small", onClick: () => l(T), "aria-label": "Remove question", children: /* @__PURE__ */ n(S, { icon: cn, size: "xs" }) })
761
+ ] })
762
+ },
763
+ T
764
+ )),
765
+ /* @__PURE__ */ n(
766
+ J,
767
+ {
768
+ size: "small",
769
+ variant: "text",
770
+ startIcon: /* @__PURE__ */ n(S, { icon: Ke }),
771
+ onClick: s,
772
+ className: "normal-case",
773
+ children: "Add question"
774
+ }
775
+ )
776
+ ] });
777
+ }
778
+ bn.propTypes = {
779
+ items: r.arrayOf(
780
+ r.shape({ question: r.string, answer: r.string })
781
+ ),
782
+ onChange: r.func.isRequired
783
+ };
784
+ const Hi = "VACCINE_EDUCATION", Wi = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp"]), qi = /* @__PURE__ */ new Set(["mp4", "mov", "avi", "wmv", "mkv", "webm"]), Bi = async (t) => {
785
+ const i = crypto.randomUUID(), o = new URLSearchParams({
786
+ moduleName: Hi,
787
+ documentUUID: i,
788
+ isTemporary: "false"
789
+ });
790
+ return await mi.post(
791
+ `/document/uploaddocumentV2?${o.toString()}`,
792
+ { fileToUpload: t },
793
+ { type: "fileUpload", showLoader: !1 }
794
+ ), { uuid: i, fileName: t.name };
795
+ }, Ct = (t) => {
796
+ const { data: i, status: o } = ui({
797
+ queryKey: ["ve-media", t],
798
+ queryFn: () => fi.getFileByUUID(t).then((s) => s.data),
799
+ enabled: !!t,
800
+ staleTime: 6e5,
801
+ retry: !1
802
+ });
803
+ return { dataUrl: Un(() => !i || !(i instanceof Blob) ? null : URL.createObjectURL(i), [i]), isLoading: o === "pending" };
804
+ }, vn = async (t) => {
805
+ var s;
806
+ const i = await pi({ code: "FETCH_VACCINE_EDUCATION_MEDIA_LIBRARY", parameters: {} }), o = ((s = i == null ? void 0 : i.data) == null ? void 0 : s.result) || [], l = t === "video" ? qi : Wi;
807
+ return o.filter((c) => l.has(String(c.extension || "").toLowerCase())).map((c) => ({ uuid: c.document_uuid, fileName: c.actual_file_name || c.document_uuid }));
808
+ }, $i = {
809
+ image: {
810
+ accept: ".jpg,.jpeg,.png,.webp,image/jpeg,image/png,image/webp",
811
+ extensions: /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "webp"]),
812
+ allowedLabel: "JPG, PNG, or WEBP",
813
+ maxFileMb: 5
814
+ },
815
+ video: {
816
+ accept: ".mp4,.mov,.webm,video/mp4,video/quicktime,video/webm",
817
+ extensions: /* @__PURE__ */ new Set(["mp4", "mov", "webm"]),
818
+ allowedLabel: "MP4, MOV, or WEBM",
819
+ maxFileMb: 50
820
+ }
821
+ }, $e = { image: 5, video: 2 }, Gi = (t) => (t.split(".").pop() || "").toLowerCase();
822
+ function yn({ items: t = [], onChange: i, mediaType: o, label: l }) {
823
+ const s = Tt(null), [c, T] = k(!1), [A, _] = k(!1), [b, x] = k(!1), [z, X] = k(null), M = $i[o], B = (t || []).length >= $e[o];
824
+ Ve(() => {
825
+ let g = !1;
826
+ return vn(o).then((O) => {
827
+ g || x(O.length > 0);
828
+ }), () => {
829
+ g = !0;
830
+ };
831
+ }, [o]);
832
+ const re = async (g) => {
833
+ var $;
834
+ const O = ($ = g.target.files) == null ? void 0 : $[0];
835
+ if (g.target.value = "", !!O) {
836
+ if (B) {
837
+ oe({ message: `You can add up to ${$e[o]} ${o}s`, type: "info" });
838
+ return;
839
+ }
840
+ if (!M.extensions.has(Gi(O.name))) {
841
+ oe({ message: `Only ${M.allowedLabel} files are allowed`, type: "error" });
842
+ return;
843
+ }
844
+ if (O.size > M.maxFileMb * 1024 * 1024) {
845
+ oe({ message: `File must be under ${M.maxFileMb}MB`, type: "error" });
846
+ return;
847
+ }
848
+ T(!0);
849
+ try {
850
+ const v = await Bi(O);
851
+ i([...t || [], v]), x(!0), oe({ message: "File uploaded", type: "success" });
852
+ } catch (v) {
853
+ console.error(v), oe({ message: "Upload failed, please try again", type: "error" });
854
+ } finally {
855
+ T(!1);
856
+ }
857
+ }
858
+ }, V = (g) => {
859
+ i((t || []).filter((O) => O.uuid !== g));
860
+ };
861
+ return /* @__PURE__ */ m(p, { className: "media-picker-grid", children: [
862
+ (t || []).map((g) => /* @__PURE__ */ n(
863
+ Sn,
864
+ {
865
+ item: g,
866
+ mediaType: o,
867
+ onOpen: () => X(g),
868
+ onRemove: () => V(g.uuid)
869
+ },
870
+ g.uuid
871
+ )),
872
+ !B && /* @__PURE__ */ m(Zt, { children: [
873
+ /* @__PURE__ */ m(
874
+ p,
875
+ {
876
+ className: "media-picker-tile add",
877
+ onClick: () => {
878
+ var g;
879
+ return !c && ((g = s.current) == null ? void 0 : g.click());
880
+ },
881
+ role: "button",
882
+ tabIndex: 0,
883
+ children: [
884
+ /* @__PURE__ */ n(we, { title: `Allowed: ${M.allowedLabel} — up to ${M.maxFileMb}MB each`, arrow: !0, children: /* @__PURE__ */ n(
885
+ ae,
886
+ {
887
+ size: "small",
888
+ className: "media-picker-info-btn",
889
+ "aria-label": "Allowed file types",
890
+ onClick: (g) => g.stopPropagation(),
891
+ children: /* @__PURE__ */ n(S, { icon: Bn, size: "xs" })
892
+ }
893
+ ) }),
894
+ c ? /* @__PURE__ */ n(Ie, { size: 20 }) : /* @__PURE__ */ m(Zt, { children: [
895
+ /* @__PURE__ */ n(S, { icon: Ke }),
896
+ /* @__PURE__ */ n(C, { variant: "caption", children: l })
897
+ ] }),
898
+ /* @__PURE__ */ n("input", { ref: s, type: "file", hidden: !0, accept: M.accept, onChange: re })
899
+ ]
900
+ }
901
+ ),
902
+ b && /* @__PURE__ */ m(p, { className: "media-picker-tile add", onClick: () => _(!0), role: "button", tabIndex: 0, children: [
903
+ /* @__PURE__ */ n(S, { icon: $n }),
904
+ /* @__PURE__ */ n(C, { variant: "caption", children: "Browse existing" })
905
+ ] })
906
+ ] }),
907
+ B && /* @__PURE__ */ m(C, { variant: "caption", sx: { color: "text.disabled", alignSelf: "center" }, children: [
908
+ "Limit of ",
909
+ $e[o],
910
+ " ",
911
+ o,
912
+ "s reached — remove one to add another."
913
+ ] }),
914
+ z && /* @__PURE__ */ n(xt, { item: z, mediaType: o, onClose: () => X(null) }),
915
+ /* @__PURE__ */ n(
916
+ Rn,
917
+ {
918
+ open: A,
919
+ onClose: () => _(!1),
920
+ mediaType: o,
921
+ alreadySelected: t || [],
922
+ remainingSlots: $e[o] - (t || []).length,
923
+ onAdd: (g) => {
924
+ i([...t || [], ...g]), _(!1);
925
+ }
926
+ }
927
+ )
928
+ ] });
929
+ }
930
+ yn.propTypes = {
931
+ items: r.arrayOf(r.shape({ uuid: r.string, fileName: r.string })),
932
+ onChange: r.func.isRequired,
933
+ mediaType: r.oneOf(["image", "video"]).isRequired,
934
+ label: r.string.isRequired
935
+ };
936
+ function Sn({ item: t, mediaType: i, onOpen: o, onRemove: l }) {
937
+ const { dataUrl: s, isLoading: c } = Ct(i === "image" ? t.uuid : null), T = i === "image" ? dn : un;
938
+ return /* @__PURE__ */ m(p, { className: "media-picker-tile selected", title: `${t.fileName} — click to view`, onClick: o, children: [
939
+ /* @__PURE__ */ n(
940
+ ae,
941
+ {
942
+ size: "small",
943
+ className: "media-picker-check media-picker-remove",
944
+ onClick: (A) => {
945
+ A.stopPropagation(), l();
946
+ },
947
+ disableRipple: !0,
948
+ children: /* @__PURE__ */ n(S, { icon: Gn, size: "2xs" })
949
+ }
950
+ ),
951
+ i === "image" && c ? /* @__PURE__ */ n(Ie, { size: 18 }) : i === "image" && s ? /* @__PURE__ */ n(p, { component: "img", src: s, alt: t.fileName, className: "media-picker-thumb-img" }) : /* @__PURE__ */ n(S, { icon: T, className: "media-picker-icon" }),
952
+ /* @__PURE__ */ n(C, { variant: "caption", className: "media-picker-caption", title: t.fileName, children: t.fileName })
953
+ ] });
954
+ }
955
+ Sn.propTypes = {
956
+ item: r.shape({ uuid: r.string, fileName: r.string }).isRequired,
957
+ mediaType: r.oneOf(["image", "video"]).isRequired,
958
+ onOpen: r.func.isRequired,
959
+ onRemove: r.func.isRequired
960
+ };
961
+ function xt({ item: t, mediaType: i, onClose: o }) {
962
+ const { dataUrl: l, isLoading: s } = Ct(t.uuid);
963
+ return /* @__PURE__ */ m(bt, { open: !0, onClose: o, maxWidth: "md", fullWidth: !0, children: [
964
+ /* @__PURE__ */ n(vt, { sx: { pr: 6, wordBreak: "break-all" }, children: t.fileName }),
965
+ /* @__PURE__ */ n(yt, { dividers: !0, sx: { display: "flex", justifyContent: "center", minHeight: 160 }, children: s ? /* @__PURE__ */ n(p, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ n(Ie, { size: 28 }) }) : l ? i === "video" ? /* @__PURE__ */ n("video", { src: l, controls: !0, autoPlay: !0, style: { width: "100%", maxHeight: "70vh" } }) : /* @__PURE__ */ n(p, { component: "img", src: l, alt: t.fileName, sx: { maxWidth: "100%", maxHeight: "70vh", objectFit: "contain" } }) : /* @__PURE__ */ n(C, { variant: "body2", sx: { color: "error.main", alignSelf: "center", textAlign: "center" }, children: "Couldn't load this file. It may be missing from storage — try removing it and uploading again." }) }),
966
+ /* @__PURE__ */ n(St, { children: /* @__PURE__ */ n(J, { className: "normal-case", onClick: o, children: "Close" }) })
967
+ ] });
968
+ }
969
+ xt.propTypes = {
970
+ item: r.shape({ uuid: r.string, fileName: r.string }).isRequired,
971
+ mediaType: r.oneOf(["image", "video"]).isRequired,
972
+ onClose: r.func.isRequired
973
+ };
974
+ function Rn({ open: t, onClose: i, mediaType: o, alreadySelected: l, remainingSlots: s, onAdd: c }) {
975
+ const [T, A] = k([]), [_, b] = k(!1), [x, z] = k([]), [X, M] = k(null), B = new Set(l.map((g) => g.uuid));
976
+ Ve(() => {
977
+ t && (z([]), b(!0), vn(o).then(A).finally(() => b(!1)));
978
+ }, [t, o]);
979
+ const re = (g) => {
980
+ z((O) => O.some((v) => v.uuid === g.uuid) ? O.filter((v) => v.uuid !== g.uuid) : O.length >= s ? (oe({ message: `You can only add ${s} more`, type: "info" }), O) : [...O, g]);
981
+ }, V = T.filter((g) => !B.has(g.uuid));
982
+ return /* @__PURE__ */ m(bt, { open: t, onClose: i, maxWidth: "sm", fullWidth: !0, children: [
983
+ /* @__PURE__ */ m(vt, { children: [
984
+ "Browse existing ",
985
+ o,
986
+ "s"
987
+ ] }),
988
+ /* @__PURE__ */ n(yt, { dividers: !0, children: _ ? /* @__PURE__ */ n(p, { sx: { display: "flex", justifyContent: "center", py: 4 }, children: /* @__PURE__ */ n(Ie, { size: 24 }) }) : V.length === 0 ? /* @__PURE__ */ m(C, { variant: "body2", sx: { color: "text.secondary", textAlign: "center", py: 3 }, children: [
989
+ "No previously uploaded ",
990
+ o,
991
+ "s to reuse yet."
992
+ ] }) : /* @__PURE__ */ n(p, { className: "media-picker-grid", children: V.map((g) => {
993
+ const O = x.some(($) => $.uuid === g.uuid);
994
+ return /* @__PURE__ */ n(
995
+ Nn,
996
+ {
997
+ item: g,
998
+ mediaType: o,
999
+ isPicked: O,
1000
+ onClick: () => re(g),
1001
+ onView: () => M(g)
1002
+ },
1003
+ g.uuid
1004
+ );
1005
+ }) }) }),
1006
+ /* @__PURE__ */ m(St, { children: [
1007
+ /* @__PURE__ */ n(J, { className: "normal-case", onClick: i, children: "Cancel" }),
1008
+ /* @__PURE__ */ m(
1009
+ J,
1010
+ {
1011
+ className: "normal-case",
1012
+ variant: "contained",
1013
+ disabled: x.length === 0,
1014
+ onClick: () => c(x),
1015
+ children: [
1016
+ "Add ",
1017
+ x.length > 0 ? `(${x.length})` : ""
1018
+ ]
1019
+ }
1020
+ )
1021
+ ] }),
1022
+ X && /* @__PURE__ */ n(xt, { item: X, mediaType: o, onClose: () => M(null) })
1023
+ ] });
1024
+ }
1025
+ Rn.propTypes = {
1026
+ open: r.bool.isRequired,
1027
+ onClose: r.func.isRequired,
1028
+ mediaType: r.oneOf(["image", "video"]).isRequired,
1029
+ alreadySelected: r.arrayOf(r.shape({ uuid: r.string })).isRequired,
1030
+ remainingSlots: r.number.isRequired,
1031
+ onAdd: r.func.isRequired
1032
+ };
1033
+ function Nn({ item: t, mediaType: i, isPicked: o, onClick: l, onView: s }) {
1034
+ const { dataUrl: c, isLoading: T } = Ct(i === "image" ? t.uuid : null);
1035
+ return /* @__PURE__ */ m(
1036
+ p,
1037
+ {
1038
+ className: `media-picker-tile ${o ? "selected" : ""}`,
1039
+ onClick: l,
1040
+ role: "button",
1041
+ tabIndex: 0,
1042
+ title: t.fileName,
1043
+ children: [
1044
+ /* @__PURE__ */ n(we, { title: "View", arrow: !0, children: /* @__PURE__ */ n(
1045
+ ae,
1046
+ {
1047
+ size: "small",
1048
+ className: "media-picker-view-btn",
1049
+ "aria-label": "View file",
1050
+ onClick: (A) => {
1051
+ A.stopPropagation(), s();
1052
+ },
1053
+ children: /* @__PURE__ */ n(S, { icon: Vn, size: "xs" })
1054
+ }
1055
+ ) }),
1056
+ o && /* @__PURE__ */ n(ae, { size: "small", className: "media-picker-check", disableRipple: !0, children: /* @__PURE__ */ n(S, { icon: Yn, size: "2xs" }) }),
1057
+ i === "image" && T ? /* @__PURE__ */ n(Ie, { size: 18 }) : i === "image" && c ? /* @__PURE__ */ n(p, { component: "img", src: c, alt: t.fileName, className: "media-picker-thumb-img" }) : /* @__PURE__ */ n(S, { icon: i === "video" ? un : dn, className: "media-picker-icon" }),
1058
+ /* @__PURE__ */ n(C, { variant: "caption", className: "media-picker-caption", title: t.fileName, children: t.fileName })
1059
+ ]
1060
+ }
1061
+ );
1062
+ }
1063
+ Nn.propTypes = {
1064
+ item: r.shape({ uuid: r.string, fileName: r.string }).isRequired,
1065
+ mediaType: r.oneOf(["image", "video"]).isRequired,
1066
+ isPicked: r.bool.isRequired,
1067
+ onClick: r.func.isRequired,
1068
+ onView: r.func.isRequired
1069
+ };
1070
+ function lo() {
1071
+ const { vaccineId: t } = Fn(), i = zn(), [o, l] = k(null), [s, c] = k(null), [T, A] = k(!0), [_, b] = k(null), [x, z] = k(!1), [X, M] = k(Te[0].id), [B, re] = k(() => /* @__PURE__ */ new Set([Te[0].id])), V = Tt(null), [g, O] = k(null), $ = Tt(null), [v, Q] = k(!1);
1072
+ Ve(() => {
1073
+ A(!0), b(null), Kn(t).then(({ vaccine: f, record: h }) => {
1074
+ l(f), c(h), $.current = JSON.stringify(h);
1075
+ }).catch((f) => {
1076
+ console.error(f), b("This vaccine couldn't be found. It may have been removed.");
1077
+ }).finally(() => A(!1));
1078
+ }, [t]), Ve(() => {
1079
+ var y, ve;
1080
+ const h = () => {
1081
+ if (!V.current) return;
1082
+ const w = V.current.closest(".overflow-y-auto") || V.current.parentElement;
1083
+ w && O(Math.max(320, w.clientHeight - 2));
1084
+ };
1085
+ h(), window.addEventListener("resize", h);
1086
+ const N = typeof ResizeObserver < "u" ? new ResizeObserver(h) : null, K = ((y = V.current) == null ? void 0 : y.closest(".overflow-y-auto")) || ((ve = V.current) == null ? void 0 : ve.parentElement);
1087
+ return N && K && N.observe(K), () => {
1088
+ window.removeEventListener("resize", h), N == null || N.disconnect();
1089
+ };
1090
+ }, [s]);
1091
+ const Ee = (f, h) => {
1092
+ c((N) => ({ ...N, [f]: h }));
1093
+ }, ke = (f) => {
1094
+ re((h) => {
1095
+ const N = new Set(h);
1096
+ return N.has(f) ? N.delete(f) : N.add(f), N;
1097
+ });
1098
+ }, _e = (f) => {
1099
+ M(f), re((h) => new Set(h).add(f)), requestAnimationFrame(() => {
1100
+ var h;
1101
+ (h = document.getElementById(`ve-sec-${f}`)) == null || h.scrollIntoView({ behavior: "smooth", block: "start" });
1102
+ });
1103
+ }, Ze = () => {
1104
+ const f = Jn();
1105
+ c((h) => ({ ...h, customSections: [...h.customSections, f] })), _e(f.id);
1106
+ }, Je = (f, h, N) => {
1107
+ c((K) => ({
1108
+ ...K,
1109
+ customSections: K.customSections.map((y) => y.id === f ? { ...y, [h]: N } : y)
1110
+ }));
1111
+ }, P = (f) => {
1112
+ c((h) => ({ ...h, customSections: h.customSections.filter((N) => N.id !== f) }));
1113
+ }, le = () => i("/ui/medplat/manage/vaccineEducation"), Ae = async () => {
1114
+ if (Jt(s) === 0) {
1115
+ oe({ message: "Fill in at least one section before saving", type: "error" });
1116
+ return;
1117
+ }
1118
+ z(!0);
1119
+ try {
1120
+ await Qn(t, s), oe({ message: "Vaccine education saved", type: "success" }), le();
1121
+ } catch (f) {
1122
+ console.error(f), oe({ message: "Couldn't save changes, please try again", type: "error" }), z(!1);
1123
+ }
1124
+ }, be = () => {
1125
+ $.current !== null && JSON.stringify(s) !== $.current ? Q(!0) : le();
1126
+ };
1127
+ if (T)
1128
+ return null;
1129
+ if (_ || !s || !o)
1130
+ return /* @__PURE__ */ m(p, { sx: { p: 6, textAlign: "center" }, children: [
1131
+ /* @__PURE__ */ n(C, { variant: "subtitle1", sx: { fontWeight: 600, mb: 1 }, children: _ || "Something went wrong loading this vaccine." }),
1132
+ /* @__PURE__ */ n(J, { variant: "contained", className: "normal-case", onClick: le, children: "Back to list" })
1133
+ ] });
1134
+ const De = Jt(s), Qe = Math.round(De / Te.length * 100);
1135
+ return /* @__PURE__ */ m(p, { ref: V, className: "ve-configurator", style: { height: g ? `${g}px` : "80vh" }, children: [
1136
+ /* @__PURE__ */ m(p, { className: "ve-rail", children: [
1137
+ /* @__PURE__ */ m(p, { className: "ve-rail-vax", children: [
1138
+ /* @__PURE__ */ n(p, { className: "ve-rail-vax-avatar", children: /* @__PURE__ */ n(S, { icon: jn }) }),
1139
+ /* @__PURE__ */ m(p, { sx: { minWidth: 0 }, children: [
1140
+ /* @__PURE__ */ n(C, { variant: "caption", sx: { textTransform: "uppercase", letterSpacing: "0.05em", color: "text.secondary", fontWeight: 700, display: "block" }, children: "Configuring education for" }),
1141
+ /* @__PURE__ */ n(C, { sx: { fontWeight: 700, fontSize: 15, lineHeight: 1.3 }, children: o.name }),
1142
+ /* @__PURE__ */ n(C, { variant: "caption", sx: { color: "text.secondary" }, children: o.category })
1143
+ ] })
1144
+ ] }),
1145
+ /* @__PURE__ */ m(p, { sx: { px: 1, pb: 2 }, children: [
1146
+ /* @__PURE__ */ m(p, { sx: { display: "flex", alignItems: "baseline", gap: 0.5 }, children: [
1147
+ /* @__PURE__ */ n(C, { component: "span", className: "ve-progress-count", children: De }),
1148
+ /* @__PURE__ */ m(C, { component: "span", variant: "caption", sx: { color: "text.secondary" }, children: [
1149
+ " of ",
1150
+ Te.length,
1151
+ " sections completed"
1152
+ ] })
1153
+ ] }),
1154
+ /* @__PURE__ */ n(p, { className: "ve-progress-track", sx: { mt: 1 }, children: /* @__PURE__ */ n(p, { className: "ve-progress-fill", sx: { width: `${Qe}%` } }) })
1155
+ ] }),
1156
+ Zn.map((f) => /* @__PURE__ */ m(p, { children: [
1157
+ /* @__PURE__ */ n(C, { className: "ve-rail-group-label", children: f }),
1158
+ Te.filter((h) => h.group === f).map((h) => {
1159
+ const N = h.tone ? `tone-${h.tone}` : `group-${h.group.toLowerCase()}`, K = pn(s, h);
1160
+ return /* @__PURE__ */ m(
1161
+ p,
1162
+ {
1163
+ className: `ve-rail-item ${N} ${h.id === X ? "active" : ""}`,
1164
+ onClick: () => _e(h.id),
1165
+ children: [
1166
+ /* @__PURE__ */ n(S, { icon: h.icon, fixedWidth: !0 }),
1167
+ /* @__PURE__ */ n("span", { children: h.title }),
1168
+ K ? /* @__PURE__ */ n(S, { icon: je, className: "ve-rail-check" }) : /* @__PURE__ */ n(p, { className: "ve-rail-dot" })
1169
+ ]
1170
+ },
1171
+ h.id
1172
+ );
1173
+ })
1174
+ ] }, f)),
1175
+ s.customSections.length > 0 && /* @__PURE__ */ m(p, { children: [
1176
+ /* @__PURE__ */ n(C, { className: "ve-rail-group-label", children: "Custom" }),
1177
+ s.customSections.map((f) => /* @__PURE__ */ m(
1178
+ p,
1179
+ {
1180
+ className: `ve-rail-item group-custom ${f.id === X ? "active" : ""}`,
1181
+ onClick: () => _e(f.id),
1182
+ children: [
1183
+ /* @__PURE__ */ n(S, { icon: mn, fixedWidth: !0 }),
1184
+ /* @__PURE__ */ n("span", { children: f.title.trim() || "Untitled section" }),
1185
+ Xe(f.content) ? /* @__PURE__ */ n(S, { icon: je, className: "ve-rail-check" }) : /* @__PURE__ */ n(p, { className: "ve-rail-dot" })
1186
+ ]
1187
+ },
1188
+ f.id
1189
+ ))
1190
+ ] }),
1191
+ /* @__PURE__ */ n(
1192
+ J,
1193
+ {
1194
+ size: "small",
1195
+ className: "ve-add-section-btn normal-case",
1196
+ startIcon: /* @__PURE__ */ n(S, { icon: Ke }),
1197
+ onClick: Ze,
1198
+ children: "Add custom section"
1199
+ }
1200
+ )
1201
+ ] }),
1202
+ /* @__PURE__ */ m(p, { className: "ve-config-main", children: [
1203
+ /* @__PURE__ */ m(p, { className: "ve-config-topbar", children: [
1204
+ /* @__PURE__ */ n(
1205
+ J,
1206
+ {
1207
+ size: "small",
1208
+ className: "normal-case",
1209
+ startIcon: /* @__PURE__ */ n(S, { icon: Xn }),
1210
+ onClick: be,
1211
+ children: "Back to list"
1212
+ }
1213
+ ),
1214
+ /* @__PURE__ */ n(J, { variant: "contained", className: "normal-case", onClick: Ae, disabled: x, children: x ? "Saving…" : "Save changes" })
1215
+ ] }),
1216
+ /* @__PURE__ */ n(p, { className: "ve-config-scroll", children: /* @__PURE__ */ m(p, { className: "ve-config-inner", children: [
1217
+ Te.map((f) => /* @__PURE__ */ n(
1218
+ Cn,
1219
+ {
1220
+ section: f,
1221
+ vaccine: o,
1222
+ draft: s,
1223
+ updateField: Ee,
1224
+ expanded: B.has(f.id),
1225
+ onToggleExpand: () => ke(f.id)
1226
+ },
1227
+ f.id
1228
+ )),
1229
+ s.customSections.map((f) => /* @__PURE__ */ n(
1230
+ xn,
1231
+ {
1232
+ vaccineId: o.id,
1233
+ customSection: f,
1234
+ expanded: B.has(f.id),
1235
+ onToggleExpand: () => ke(f.id),
1236
+ onChange: (h, N) => Je(f.id, h, N),
1237
+ onRemove: () => P(f.id)
1238
+ },
1239
+ f.id
1240
+ ))
1241
+ ] }) })
1242
+ ] }),
1243
+ /* @__PURE__ */ m(bt, { open: v, onClose: () => Q(!1), children: [
1244
+ /* @__PURE__ */ n(vt, { children: "Discard unsaved changes?" }),
1245
+ /* @__PURE__ */ n(yt, { children: /* @__PURE__ */ n(qn, { children: "If you leave now, the changes you've made on this page will be discarded." }) }),
1246
+ /* @__PURE__ */ m(St, { children: [
1247
+ /* @__PURE__ */ n(J, { className: "normal-case", onClick: () => Q(!1), children: "Keep editing" }),
1248
+ /* @__PURE__ */ n(J, { className: "normal-case", color: "error", onClick: le, children: "Discard and leave" })
1249
+ ] })
1250
+ ] })
1251
+ ] });
1252
+ }
1253
+ function Cn({ section: t, vaccine: i, draft: o, updateField: l, expanded: s, onToggleExpand: c }) {
1254
+ const T = t.tone ? `tone-${t.tone}` : `group-${t.group.toLowerCase()}`, A = pn(o, t);
1255
+ return /* @__PURE__ */ m(
1256
+ At,
1257
+ {
1258
+ id: `ve-sec-${t.id}`,
1259
+ className: `ve-section-card ${T} ${s ? "is-expanded" : "is-collapsed"}`,
1260
+ variant: "outlined",
1261
+ children: [
1262
+ /* @__PURE__ */ m(
1263
+ p,
1264
+ {
1265
+ className: "ve-section-header",
1266
+ onClick: s ? void 0 : c,
1267
+ role: s ? void 0 : "button",
1268
+ tabIndex: s ? void 0 : 0,
1269
+ children: [
1270
+ /* @__PURE__ */ n(p, { className: `ve-section-ico ${T}`, children: /* @__PURE__ */ n(S, { icon: t.icon }) }),
1271
+ /* @__PURE__ */ m(p, { sx: { flex: 1, minWidth: 0 }, children: [
1272
+ /* @__PURE__ */ m(C, { sx: { fontWeight: 700, fontSize: 15 }, children: [
1273
+ t.title,
1274
+ t.optional && /* @__PURE__ */ n(C, { component: "span", variant: "caption", sx: { color: "text.disabled", fontWeight: 400, ml: 0.75 }, children: "(optional)" }),
1275
+ A && !s && /* @__PURE__ */ n(S, { icon: je, className: "ve-section-header-check" })
1276
+ ] }),
1277
+ /* @__PURE__ */ n(
1278
+ C,
1279
+ {
1280
+ variant: "caption",
1281
+ className: "ve-section-help",
1282
+ sx: { color: "text.secondary", display: "block" },
1283
+ children: t.help
1284
+ }
1285
+ )
1286
+ ] }),
1287
+ /* @__PURE__ */ n(we, { title: s ? "Collapse" : "Expand", arrow: !0, children: /* @__PURE__ */ n(
1288
+ ae,
1289
+ {
1290
+ size: "small",
1291
+ className: `ve-section-chevron ${s ? "is-open" : ""}`,
1292
+ onClick: (_) => {
1293
+ _.stopPropagation(), c();
1294
+ },
1295
+ children: /* @__PURE__ */ n(S, { icon: fn, size: "xs" })
1296
+ }
1297
+ ) })
1298
+ ]
1299
+ }
1300
+ ),
1301
+ s && /* @__PURE__ */ n(p, { className: "ve-section-body", children: /* @__PURE__ */ m(p, { sx: { mt: 1.75 }, children: [
1302
+ t.type === "richtext" && /* @__PURE__ */ n(
1303
+ Nt,
1304
+ {
1305
+ defaultValue: o[t.field],
1306
+ onCommit: (_) => l(t.field, _),
1307
+ placeholder: "Write in clear, simple language…",
1308
+ maxLength: t.maxLength
1309
+ },
1310
+ `${i.id}-${t.field}`
1311
+ ),
1312
+ t.type === "chips" && /* @__PURE__ */ n(
1313
+ An,
1314
+ {
1315
+ items: o[t.field],
1316
+ onChange: (_) => l(t.field, _),
1317
+ tone: t.chipTone
1318
+ }
1319
+ ),
1320
+ t.type === "faq" && /* @__PURE__ */ n(bn, { items: o[t.field], onChange: (_) => l(t.field, _) }),
1321
+ t.type === "media" && /* @__PURE__ */ n(
1322
+ yn,
1323
+ {
1324
+ items: o[t.field],
1325
+ onChange: (_) => l(t.field, _),
1326
+ mediaType: t.mediaType,
1327
+ label: `Add ${t.mediaType}`
1328
+ }
1329
+ )
1330
+ ] }) })
1331
+ ]
1332
+ }
1333
+ );
1334
+ }
1335
+ Cn.propTypes = {
1336
+ section: r.shape({
1337
+ id: r.string.isRequired,
1338
+ field: r.string.isRequired,
1339
+ title: r.string.isRequired,
1340
+ group: r.string.isRequired,
1341
+ help: r.string,
1342
+ icon: r.object.isRequired,
1343
+ tone: r.string,
1344
+ optional: r.bool,
1345
+ type: r.oneOf(["richtext", "chips", "faq", "media"]).isRequired,
1346
+ maxLength: r.number,
1347
+ chipTone: r.string,
1348
+ mediaType: r.oneOf(["image", "video"])
1349
+ }).isRequired,
1350
+ vaccine: r.shape({ id: r.oneOfType([r.string, r.number]) }).isRequired,
1351
+ draft: r.object.isRequired,
1352
+ updateField: r.func.isRequired,
1353
+ expanded: r.bool.isRequired,
1354
+ onToggleExpand: r.func.isRequired
1355
+ };
1356
+ function xn({ vaccineId: t, customSection: i, expanded: o, onToggleExpand: l, onChange: s, onRemove: c }) {
1357
+ const T = Xe(i.content).length > 0, A = i.title.trim() || "Untitled section";
1358
+ return /* @__PURE__ */ m(
1359
+ At,
1360
+ {
1361
+ id: `ve-sec-${i.id}`,
1362
+ className: `ve-section-card group-custom ${o ? "is-expanded" : "is-collapsed"}`,
1363
+ variant: "outlined",
1364
+ children: [
1365
+ /* @__PURE__ */ m(
1366
+ p,
1367
+ {
1368
+ className: "ve-section-header",
1369
+ onClick: o ? void 0 : l,
1370
+ role: o ? void 0 : "button",
1371
+ tabIndex: o ? void 0 : 0,
1372
+ children: [
1373
+ /* @__PURE__ */ n(p, { className: "ve-section-ico group-custom", children: /* @__PURE__ */ n(S, { icon: mn }) }),
1374
+ /* @__PURE__ */ m(p, { sx: { flex: 1, minWidth: 0 }, children: [
1375
+ /* @__PURE__ */ m(C, { sx: { fontWeight: 700, fontSize: 15 }, children: [
1376
+ A,
1377
+ T && !o && /* @__PURE__ */ n(S, { icon: je, className: "ve-section-header-check" })
1378
+ ] }),
1379
+ /* @__PURE__ */ n(C, { variant: "caption", className: "ve-section-help", sx: { color: "text.secondary", display: "block" }, children: "Custom section you added — not part of the guided list." })
1380
+ ] }),
1381
+ o && /* @__PURE__ */ n(we, { title: "Remove this section", arrow: !0, children: /* @__PURE__ */ n(
1382
+ ae,
1383
+ {
1384
+ size: "small",
1385
+ onClick: (_) => {
1386
+ _.stopPropagation(), c();
1387
+ },
1388
+ children: /* @__PURE__ */ n(S, { icon: cn, size: "xs", style: { color: "var(--ve-critical)" } })
1389
+ }
1390
+ ) }),
1391
+ /* @__PURE__ */ n(we, { title: o ? "Collapse" : "Expand", arrow: !0, children: /* @__PURE__ */ n(
1392
+ ae,
1393
+ {
1394
+ size: "small",
1395
+ className: `ve-section-chevron ${o ? "is-open" : ""}`,
1396
+ onClick: (_) => {
1397
+ _.stopPropagation(), l();
1398
+ },
1399
+ children: /* @__PURE__ */ n(S, { icon: fn, size: "xs" })
1400
+ }
1401
+ ) })
1402
+ ]
1403
+ }
1404
+ ),
1405
+ o && /* @__PURE__ */ m(p, { className: "ve-section-body", children: [
1406
+ /* @__PURE__ */ n(
1407
+ Ye,
1408
+ {
1409
+ size: "small",
1410
+ fullWidth: !0,
1411
+ label: "Section title",
1412
+ placeholder: "e.g. Storage & handling notes",
1413
+ value: i.title,
1414
+ onChange: (_) => s("title", _.target.value.slice(0, Qt)),
1415
+ helperText: `${i.title.length} / ${Qt}`,
1416
+ FormHelperTextProps: { sx: { textAlign: "right", mr: 0 } },
1417
+ sx: { mb: 1.75 }
1418
+ }
1419
+ ),
1420
+ /* @__PURE__ */ n(
1421
+ Nt,
1422
+ {
1423
+ defaultValue: i.content,
1424
+ onCommit: (_) => s("content", _),
1425
+ placeholder: "Write in clear, simple language…",
1426
+ maxLength: ei
1427
+ },
1428
+ `${t}-${i.id}`
1429
+ )
1430
+ ] })
1431
+ ]
1432
+ }
1433
+ );
1434
+ }
1435
+ xn.propTypes = {
1436
+ vaccineId: r.oneOfType([r.string, r.number]).isRequired,
1437
+ customSection: r.shape({
1438
+ id: r.string.isRequired,
1439
+ title: r.string.isRequired,
1440
+ content: r.string.isRequired
1441
+ }).isRequired,
1442
+ expanded: r.bool.isRequired,
1443
+ onToggleExpand: r.func.isRequired,
1444
+ onChange: r.func.isRequired,
1445
+ onRemove: r.func.isRequired
1446
+ };
1447
+ export {
1448
+ lo as default
1449
+ };
1450
+ //# sourceMappingURL=VaccineEducationConfigurator-BFCvu5Mw.js.map