@xframework-ca-test/cli 1.0.32 → 1.0.34

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 (377) hide show
  1. package/dist/ui/assets/AIVision-0025192f.js +4 -0
  2. package/dist/ui/assets/AccountDetails-42610e44.js +1 -0
  3. package/dist/ui/assets/AccountDetails-5b4cd3f7.js +1 -0
  4. package/dist/ui/assets/AccountServices-f68f471d.js +1 -0
  5. package/dist/ui/assets/AccountsList-262479cf.js +1 -0
  6. package/dist/ui/assets/ActionLink-9db8b1c2.js +1 -0
  7. package/dist/ui/assets/AdaptableCard-3d1e1f96.js +1 -0
  8. package/dist/ui/assets/AddAccount-2cd72664.js +1 -0
  9. package/dist/ui/assets/AddEditFile-6ae10d57.js +1 -0
  10. package/dist/ui/assets/AddEditTranslation-3812ff0f.js +1 -0
  11. package/dist/ui/assets/AiApiLogList-1eac39b7.js +1 -0
  12. package/dist/ui/assets/AiCa-2e90495f.js +1 -0
  13. package/dist/ui/assets/Alert-59d09a99.js +1 -0
  14. package/dist/ui/assets/ApiService-df126758.js +1 -0
  15. package/dist/ui/assets/AppLandingPage-afcea727.js +4 -0
  16. package/dist/ui/assets/AuditLogsList-ea37686b.js +1 -0
  17. package/dist/ui/assets/Auth0Callback-00729568.js +1 -0
  18. package/dist/ui/assets/BarCodes-4ff49536.js +1 -0
  19. package/dist/ui/assets/BlankLayout-7085ab88.js +1 -0
  20. package/dist/ui/assets/{BrainServices-a4bb698e.js → BrainServices-4cb93af5.js} +1 -1
  21. package/dist/ui/assets/CalendarList-689ed66a.js +2 -0
  22. package/dist/ui/assets/CalendarList-f4a9aa21.css +8 -0
  23. package/dist/ui/assets/CategoryList-a6d01041.js +1 -0
  24. package/dist/ui/assets/CategoryList-c03f4259.js +1 -0
  25. package/dist/ui/assets/ChatContainer-fec7b84d.js +1 -0
  26. package/dist/ui/assets/ChatsList-4b3194e4.js +1 -0
  27. package/dist/ui/assets/Check-af681a30.js +1 -0
  28. package/dist/ui/assets/CheckInVideo-aa9f50b2.js +6 -0
  29. package/dist/ui/assets/ClassicLayout-a9866742.js +2 -0
  30. package/dist/ui/assets/CompanyList-94119d71.js +1 -0
  31. package/dist/ui/assets/{CompanyService-1bf7c3c8.js → CompanyService-491a9cc1.js} +1 -1
  32. package/dist/ui/assets/{Component-59e4c14b.js → Component-566d01e0.js} +1 -1
  33. package/dist/ui/assets/ConfirmDialog-2838a642.js +1 -0
  34. package/dist/ui/assets/ContactDetails-c9dc0ed1.js +1 -0
  35. package/dist/ui/assets/{ContactService-92281a90.js → ContactService-8afcaeb7.js} +1 -1
  36. package/dist/ui/assets/ContactsList-5b06c9b8.js +1 -0
  37. package/dist/ui/assets/CountiesList-18b23cf7.js +1 -0
  38. package/dist/ui/assets/CountyDetails-ea024f14.js +1 -0
  39. package/dist/ui/assets/CourseDetails-8a5f8d63.js +1 -0
  40. package/dist/ui/assets/CourseList-3564fec3.js +1 -0
  41. package/dist/ui/assets/{CourseService-f0dc3bf1.js → CourseService-29ad460c.js} +1 -1
  42. package/dist/ui/assets/CreateSignature-c22e4a71.js +7 -0
  43. package/dist/ui/assets/{CustomerInfoField-fff65ace.js → CustomerInfoField-4bf880e2.js} +1 -1
  44. package/dist/ui/assets/DeckedLayout-610fe851.js +1 -0
  45. package/dist/ui/assets/DensitySelector-5d2e901f.js +1 -0
  46. package/dist/ui/assets/{DepartmentServices-3d56a9e7.js → DepartmentServices-a53e998b.js} +1 -1
  47. package/dist/ui/assets/{DigitalSignature-fff42e33.js → DigitalSignature-69eaf80c.js} +1 -1
  48. package/dist/ui/assets/{DocumemtManagementService-6501a5c1.js → DocumemtManagementService-85cde51a.js} +1 -1
  49. package/dist/ui/assets/DocumentActivity-bc938c61.js +1 -0
  50. package/dist/ui/assets/DocumentLayout-a12982d7.js +1 -0
  51. package/dist/ui/assets/DocumentList2-9c8c6284.js +23 -0
  52. package/dist/ui/assets/DocumentLists-1cdaae06.js +1 -0
  53. package/dist/ui/assets/DocumentUserSigned-f7371fc5.js +7 -0
  54. package/dist/ui/assets/DocumentsList-3b25907c.js +1 -0
  55. package/dist/ui/assets/DoubleSidedImage-b4bd3915.js +1 -0
  56. package/dist/ui/assets/{Drawer-949c18c6.js → Drawer-4f97e662.js} +1 -1
  57. package/dist/ui/assets/DynamicDashboard-0a41d287.js +1 -0
  58. package/dist/ui/assets/{DynamicTablesService-963fe77b.js → DynamicTablesService-6aa57f52.js} +1 -1
  59. package/dist/ui/assets/EditAccount-e42d66af.js +1 -0
  60. package/dist/ui/assets/EditLead-c8c9760a.js +1 -0
  61. package/dist/ui/assets/FaqItems-25d66543.js +6 -0
  62. package/dist/ui/assets/{FileManagementServices-25fd64c5.js → FileManagementServices-19b47568.js} +1 -1
  63. package/dist/ui/assets/{FolderOpen-88bfcc74.js → FolderOpen-7b0e2ac0.js} +1 -1
  64. package/dist/ui/assets/FormContainer-9a52b9e8.js +1 -0
  65. package/dist/ui/assets/{GeneralSettings-a7f805e8.js → GeneralSettings-c8c2f051.js} +5 -5
  66. package/dist/ui/assets/GenericPage-81e41302.js +1 -0
  67. package/dist/ui/assets/GridMapDetails-38f50b3c.js +1 -0
  68. package/dist/ui/assets/HorizontalMenuContent-fd559f4d.js +1 -0
  69. package/dist/ui/assets/{ImportFile-3f60d715.js → ImportFile-026b1771.js} +1 -1
  70. package/dist/ui/assets/{InlineSignaturePad-09c06619.js → InlineSignaturePad-f5630151.js} +1 -1
  71. package/dist/ui/assets/InvoicesList-9723bc5a.js +1 -0
  72. package/dist/ui/assets/{KeyVaultService-874d83fe.js → KeyVaultService-9608f0ff.js} +1 -1
  73. package/dist/ui/assets/LeadDetails-8cdaae0e.js +1 -0
  74. package/dist/ui/assets/{LeadSourceService-e46fa85e.js → LeadSourceService-cf71ea64.js} +1 -1
  75. package/dist/ui/assets/LeadsList-1ec20a77.js +1 -0
  76. package/dist/ui/assets/Logo-dd6f7656.js +1 -0
  77. package/dist/ui/assets/MapView-dcab88b3.js +1 -0
  78. package/dist/ui/assets/MarketingPage-998d10b0.js +4 -0
  79. package/dist/ui/assets/MenuNew-79fc95f3.js +1 -0
  80. package/dist/ui/assets/{MenuTable-c2c65021.js → MenuTable-f69e0fe4.js} +1 -1
  81. package/dist/ui/assets/MessageInput-07fcc5cb.js +21 -0
  82. package/dist/ui/assets/MessagesList-21d2b034.js +1 -0
  83. package/dist/ui/assets/ModernLayout-05af7cf7.js +1 -0
  84. package/dist/ui/assets/{NoData-8c485a3a.js → NoData-4cc4af03.js} +1 -1
  85. package/dist/ui/assets/Notify-8fb74d48.js +1 -0
  86. package/dist/ui/assets/OpportunitiesList-2f96958f.js +1 -0
  87. package/dist/ui/assets/OpportunityDetails-aaec3200.js +1 -0
  88. package/dist/ui/assets/{OpportunityServices-fa4fabfd.js → OpportunityServices-c4510dd2.js} +1 -1
  89. package/dist/ui/assets/OpportunityStatus-ea3b5ee2.js +1 -0
  90. package/dist/ui/assets/PageBreadcrumb-cf54a6e9.js +1 -0
  91. package/dist/ui/assets/{Password-d9294711.js → Password-21414dc6.js} +1 -1
  92. package/dist/ui/assets/PasswordInput-333c82ca.js +1 -0
  93. package/dist/ui/assets/{PreferenceService-75bf9db6.js → PreferenceService-d2b3e003.js} +1 -1
  94. package/dist/ui/assets/Profile-8c9fd2fc.js +1 -0
  95. package/dist/ui/assets/{ReportEditor-8880f57e.js → ReportEditor-4e4f6d53.js} +3 -3
  96. package/dist/ui/assets/{ReportViewer-9f1080f7.js → ReportViewer-616d3cfc.js} +30 -30
  97. package/dist/ui/assets/RoleEdit-a076ea85.js +1 -0
  98. package/dist/ui/assets/RoleForm-47691f91.js +1 -0
  99. package/dist/ui/assets/{RoleNew-49fadb16.js → RoleNew-e86a1513.js} +1 -1
  100. package/dist/ui/assets/{RoleService-7008da2c.js → RoleService-2f9ed883.js} +1 -1
  101. package/dist/ui/assets/ScheduleCycle-0ae23631.js +1 -0
  102. package/dist/ui/assets/{ScheduleService-7228f0a3.js → ScheduleService-41a88c41.js} +1 -1
  103. package/dist/ui/assets/ScreenList-8f58150b.js +1 -0
  104. package/dist/ui/assets/Settings-fc91c9d2.js +2 -0
  105. package/dist/ui/assets/{SetupWizard-4172e377.js → SetupWizard-d1363582.js} +1 -1
  106. package/dist/ui/assets/SimpleLayout-77cfb778.js +1 -0
  107. package/dist/ui/assets/StackedSideLayout-2f1ee9d1.js +1 -0
  108. package/dist/ui/assets/StickyFooter-3e569b80.js +1 -0
  109. package/dist/ui/assets/SupportRequets-0ecd4ab8.js +1 -0
  110. package/dist/ui/assets/{Switcher-c8648037.js → Switcher-e2fba588.js} +1 -1
  111. package/dist/ui/assets/TimeLogApprovalDataList-7b49a432.js +1 -0
  112. package/dist/ui/assets/TimeLogApprovalList-78cab2b6.js +1 -0
  113. package/dist/ui/assets/TimeLogList-592b29aa.js +1 -0
  114. package/dist/ui/assets/{TimeLogService-cd7b2f61.js → TimeLogService-83166cbc.js} +1 -1
  115. package/dist/ui/assets/TimesheetsList-d1520efb.js +1 -0
  116. package/dist/ui/assets/TranslationList-88d7d5d7.js +1 -0
  117. package/dist/ui/assets/TweaksPanel-bc10bc47.js +112 -0
  118. package/dist/ui/assets/{Upload-fb34ce03.js → Upload-be937eb6.js} +4 -4
  119. package/dist/ui/assets/UserEdit-1f8208f3.js +1 -0
  120. package/dist/ui/assets/UserForm-e9b56aff.js +1 -0
  121. package/dist/ui/assets/{UserNew-b36c342c.js → UserNew-31fa258f.js} +1 -1
  122. package/dist/ui/assets/{UserService-047aef51.js → UserService-1b93ceb0.js} +1 -1
  123. package/dist/ui/assets/ViewTimeLogForApproval-ae077050.js +1 -0
  124. package/dist/ui/assets/Views-1359da48.js +1 -0
  125. package/dist/ui/assets/WelcomeList-dc8666ec.js +9 -0
  126. package/dist/ui/assets/WidgetLayoutsService-49730609.js +1 -0
  127. package/dist/ui/assets/{WrapperCell-a7981b07.js → WrapperCell-3d5592cf.js} +1 -1
  128. package/dist/ui/assets/actioncell-6b5ebd6c.js +1 -0
  129. package/dist/ui/assets/{ar-3c9c213e.js → ar-fb4f0ea8.js} +1 -1
  130. package/dist/ui/assets/calendarList-ac838a86.js +2 -0
  131. package/dist/ui/assets/{cjs-162261df.js → cjs-998de55c.js} +1 -1
  132. package/dist/ui/assets/createSvgIcon-aba65987.js +1 -0
  133. package/dist/ui/assets/documentsList-4e2e061e.js +1 -0
  134. package/dist/ui/assets/{es-be649ede.js → es-cd58d3ad.js} +1 -1
  135. package/dist/ui/assets/{esm-f306d015.js → esm-c40433f8.js} +1 -1
  136. package/dist/ui/assets/gridList-e1571c87.js +1 -0
  137. package/dist/ui/assets/gridMapTable-d95f9c70.js +1 -0
  138. package/dist/ui/assets/{index-f6be0390.js → index-00a8eb64.js} +1 -1
  139. package/dist/ui/assets/index-04438b6b.js +22 -0
  140. package/dist/ui/assets/index-058738bc.js +1 -0
  141. package/dist/ui/assets/{index-e4c6057f.js → index-0b08ce18.js} +1 -1
  142. package/dist/ui/assets/index-0d730815.js +4 -0
  143. package/dist/ui/assets/index-0efcf53a.js +1 -0
  144. package/dist/ui/assets/index-0f432250.js +1 -0
  145. package/dist/ui/assets/{index-cebd880b.js → index-0fd6e996.js} +1 -1
  146. package/dist/ui/assets/{index-49a94e54.js → index-11297f4a.js} +1 -1
  147. package/dist/ui/assets/index-14c1c1d7.js +1 -0
  148. package/dist/ui/assets/index-15e1f4be.js +1 -0
  149. package/dist/ui/assets/index-16586c21.js +1 -0
  150. package/dist/ui/assets/index-19346c14.js +1 -0
  151. package/dist/ui/assets/{index-16bb10a6.js → index-1dc2b9d2.js} +1 -1
  152. package/dist/ui/assets/index-211fbe21.js +1 -0
  153. package/dist/ui/assets/index-23e16bff.js +1 -0
  154. package/dist/ui/assets/index-27aef8b5.js +1 -0
  155. package/dist/ui/assets/{index-36228db5.js → index-289b3fd9.js} +1 -1
  156. package/dist/ui/assets/{index-a22a3546.js → index-2dae59b1.js} +1 -1
  157. package/dist/ui/assets/index-353fd6dd.js +1 -0
  158. package/dist/ui/assets/{index-ea125a16.js → index-359d245d.js} +1 -1
  159. package/dist/ui/assets/{index-c62ac197.js → index-3b5ce20a.js} +70 -62
  160. package/dist/ui/assets/index-3b929ba4.js +34 -0
  161. package/dist/ui/assets/index-42e3a337.js +1 -0
  162. package/dist/ui/assets/index-44b6de3a.js +1 -0
  163. package/dist/ui/assets/index-46d3ca9a.js +7 -0
  164. package/dist/ui/assets/{index-e3cc723f.js → index-49016ad0.js} +1 -1
  165. package/dist/ui/assets/index-51132258.js +1 -0
  166. package/dist/ui/assets/{index-dc103f22.js → index-52963879.js} +1 -1
  167. package/dist/ui/assets/{index-fcc1c999.js → index-533fd007.js} +1 -1
  168. package/dist/ui/assets/index-59ec468b.js +13 -0
  169. package/dist/ui/assets/index-5e2d5279.js +1 -0
  170. package/dist/ui/assets/{index-d17da176.js → index-62f95885.js} +1 -1
  171. package/dist/ui/assets/index-659c6412.js +1 -0
  172. package/dist/ui/assets/index-6873dfc3.js +1 -0
  173. package/dist/ui/assets/index-69a68d9e.js +1 -0
  174. package/dist/ui/assets/index-6a6902c7.js +1 -0
  175. package/dist/ui/assets/index-7596c6bb.js +1 -0
  176. package/dist/ui/assets/{index-47dcc43a.js → index-8045c5f0.js} +1 -1
  177. package/dist/ui/assets/{index-b028e652.js → index-8677acd1.js} +1 -1
  178. package/dist/ui/assets/{index-42e65911.js → index-88c52b97.js} +1 -1
  179. package/dist/ui/assets/index-89cfefab.js +1 -0
  180. package/dist/ui/assets/{index-bea4c3dc.js → index-8c0643fd.js} +1 -1
  181. package/dist/ui/assets/index-8d5b6a1f.js +1 -0
  182. package/dist/ui/assets/index-8d5d70f9.js +1 -0
  183. package/dist/ui/assets/{index-9b41371d.js → index-91505016.js} +1 -1
  184. package/dist/ui/assets/{index-ffc00dbb.js → index-92314073.js} +1 -1
  185. package/dist/ui/assets/index-985cf3f6.js +1 -0
  186. package/dist/ui/assets/index-a14e51de.js +1 -0
  187. package/dist/ui/assets/index-a733f80b.js +1 -0
  188. package/dist/ui/assets/index-a84d5808.js +1 -0
  189. package/dist/ui/assets/index-acac6006.js +1 -0
  190. package/dist/ui/assets/index-b0ef7ac3.js +1 -0
  191. package/dist/ui/assets/index-b6ef5984.js +1 -0
  192. package/dist/ui/assets/{index-fc9071e0.js → index-bd4edda3.js} +1 -1
  193. package/dist/ui/assets/{index-0ec72c4b.js → index-c29b8474.js} +1 -1
  194. package/dist/ui/assets/index-c88c7790.js +19 -0
  195. package/dist/ui/assets/index-ce89a95e.css +7 -0
  196. package/dist/ui/assets/index-d221d69e.js +1 -0
  197. package/dist/ui/assets/{index-f1576468.js → index-d33facae.js} +1 -1
  198. package/dist/ui/assets/index-e46c57a5.js +1 -0
  199. package/dist/ui/assets/index-e863817c.js +1 -0
  200. package/dist/ui/assets/index-f4af2342.js +1 -0
  201. package/dist/ui/assets/{index-77e820d0.js → index-fc9f8c4b.js} +1 -1
  202. package/dist/ui/assets/{index-ec2010d2.js → index-ff23edc5.js} +1 -1
  203. package/dist/ui/assets/{index.esm-70ab539c.js → index.esm-b2d342b5.js} +1 -1
  204. package/dist/ui/assets/liveLocation-8e0bb2f3.js +1 -0
  205. package/dist/ui/assets/{mapView-ab35acaa.js → mapView-c8063ed6.js} +1 -1
  206. package/dist/ui/assets/modeuls-setup-4b06843c.js +1 -0
  207. package/dist/ui/assets/{permissionHoc-6f787658.js → permissionHoc-0818bfb0.js} +1 -1
  208. package/dist/ui/assets/{react-21134174.js → react-12ddbe48.js} +1 -1
  209. package/dist/ui/assets/{react-4d5dc208.js → react-61e0b284.js} +1 -1
  210. package/dist/ui/assets/{strongPassword-bbec776a.js → strongPassword-6bc8786f.js} +1 -1
  211. package/dist/ui/assets/{styles-0608350c.js → styles-b7ae7bf6.js} +1 -1
  212. package/dist/ui/assets/{tableV2-4d1c9fd2.js → tableV2-99c808c0.js} +1 -1
  213. package/dist/ui/assets/tableV3-24eed052.js +1 -0
  214. package/dist/ui/assets/ticketRequestDetails-8b299fbd.js +1 -0
  215. package/dist/ui/assets/{useDidUpdate-25c4d4ed.js → useDidUpdate-de319a18.js} +1 -1
  216. package/dist/ui/assets/{useDrop-02b0e5d7.js → useDrop-8f0d11a7.js} +1 -1
  217. package/dist/ui/assets/useFilteredData-e8fad668.js +1 -0
  218. package/dist/ui/assets/{usePermission-d94b4984.js → usePermission-4689548c.js} +1 -1
  219. package/dist/ui/assets/{vendor-charts-eccea5d1.js → vendor-charts-4be0b5ab.js} +1 -1
  220. package/dist/ui/assets/{vendor-codemirror-c8203b49.js → vendor-codemirror-1a1216c9.js} +11 -11
  221. package/dist/ui/assets/{vendor-devex-33a39e11.js → vendor-devex-4076ffeb.js} +2 -2
  222. package/dist/ui/assets/{vendor-excel-ee8fc4e5.js → vendor-excel-3b3553df.js} +1 -1
  223. package/dist/ui/assets/{vendor-i18n-2fcb1983.js → vendor-i18n-b89304ef.js} +1 -1
  224. package/dist/ui/assets/vendor-mui-98daa63f.js +185 -0
  225. package/dist/ui/assets/{vendor-pdf-b2a5d8b1.js → vendor-pdf-3c29882d.js} +1 -1
  226. package/dist/ui/assets/withHeaderItem-df2cc5d9.js +1 -0
  227. package/dist/ui/assets/{zh-cn-1881e930.js → zh-cn-13c6c696.js} +1 -1
  228. package/dist/ui/config.js +16 -20
  229. package/dist/ui/index.html +9 -9
  230. package/dist/ui/manifest.json +2 -2
  231. package/index.bundle.js +23 -9
  232. package/package.json +1 -1
  233. package/dist/ui/assets/AIVision-4f515575.js +0 -4
  234. package/dist/ui/assets/AccountDetails-2b42d262.js +0 -1
  235. package/dist/ui/assets/AccountDetails-492dee8f.js +0 -1
  236. package/dist/ui/assets/AccountServices-62599aae.js +0 -1
  237. package/dist/ui/assets/AccountsList-fe7cb5f9.js +0 -1
  238. package/dist/ui/assets/ActionLink-33e476e1.js +0 -1
  239. package/dist/ui/assets/AdaptableCard-df7695d6.js +0 -1
  240. package/dist/ui/assets/AddAccount-a05910e8.js +0 -1
  241. package/dist/ui/assets/AddEditFile-063c229b.js +0 -1
  242. package/dist/ui/assets/AddEditTranslation-43beae49.js +0 -1
  243. package/dist/ui/assets/AiApiLogList-a488921d.js +0 -1
  244. package/dist/ui/assets/AiCa-9c1b25b2.js +0 -1
  245. package/dist/ui/assets/Alert-7dfbd254.js +0 -1
  246. package/dist/ui/assets/ApiService-2b99757f.js +0 -1
  247. package/dist/ui/assets/AppLandingPage-3956cf0c.js +0 -4
  248. package/dist/ui/assets/AuditLogsList-7a2ce37d.js +0 -1
  249. package/dist/ui/assets/Auth0Callback-b943f19f.js +0 -1
  250. package/dist/ui/assets/BarCodes-17ed5da4.js +0 -1
  251. package/dist/ui/assets/BlankLayout-2f6e1153.js +0 -1
  252. package/dist/ui/assets/CalendarList-25834ddb.css +0 -11
  253. package/dist/ui/assets/CalendarList-72739043.js +0 -2
  254. package/dist/ui/assets/CategoryList-9f82e9a3.js +0 -1
  255. package/dist/ui/assets/CategoryList-c97891e7.js +0 -1
  256. package/dist/ui/assets/ChatContainer-4a38b179.js +0 -1
  257. package/dist/ui/assets/ChatsList-6c2c3e2f.js +0 -1
  258. package/dist/ui/assets/Check-71f21a49.js +0 -1
  259. package/dist/ui/assets/CheckInVideo-cb5fa9a2.js +0 -6
  260. package/dist/ui/assets/ClassicLayout-7d09e5ac.js +0 -1
  261. package/dist/ui/assets/CompanyList-9532f511.js +0 -1
  262. package/dist/ui/assets/ConfirmDialog-3202eb3d.js +0 -1
  263. package/dist/ui/assets/ContactDetails-3b70919b.js +0 -1
  264. package/dist/ui/assets/ContactsList-e9ac0fa3.js +0 -1
  265. package/dist/ui/assets/CountiesList-6ad338a5.js +0 -1
  266. package/dist/ui/assets/CountyDetails-22d4bc89.js +0 -1
  267. package/dist/ui/assets/CourseDetails-18040b49.js +0 -1
  268. package/dist/ui/assets/CourseList-e502f89d.js +0 -1
  269. package/dist/ui/assets/CreateSignature-375d191b.js +0 -7
  270. package/dist/ui/assets/DeckedLayout-909ac220.js +0 -1
  271. package/dist/ui/assets/DensitySelector-a2c1c68f.js +0 -1
  272. package/dist/ui/assets/DocumentActivity-d63dacec.js +0 -1
  273. package/dist/ui/assets/DocumentLayout-637075fd.js +0 -1
  274. package/dist/ui/assets/DocumentList2-518d2fa4.js +0 -23
  275. package/dist/ui/assets/DocumentLists-2da9ff88.js +0 -1
  276. package/dist/ui/assets/DocumentUserSigned-27bfa6e6.js +0 -7
  277. package/dist/ui/assets/DocumentsList-9f56db71.js +0 -1
  278. package/dist/ui/assets/DoubleSidedImage-ae98733b.js +0 -1
  279. package/dist/ui/assets/DynamicDashboard-6f177244.js +0 -1
  280. package/dist/ui/assets/EditAccount-1c1a8318.js +0 -1
  281. package/dist/ui/assets/EditLead-cc38d2a2.js +0 -1
  282. package/dist/ui/assets/FaqItems-c1c85af7.js +0 -6
  283. package/dist/ui/assets/FormContainer-91c2b0e4.js +0 -1
  284. package/dist/ui/assets/GenericPage-25a5d92a.js +0 -1
  285. package/dist/ui/assets/GridMapDetails-851a5781.js +0 -1
  286. package/dist/ui/assets/HorizontalMenuContent-96da38e1.js +0 -1
  287. package/dist/ui/assets/InvoicesList-8e66a112.js +0 -1
  288. package/dist/ui/assets/LeadDetails-ad63b3df.js +0 -1
  289. package/dist/ui/assets/LeadsList-bd7d9804.js +0 -1
  290. package/dist/ui/assets/Logo-3f3c9ee6.js +0 -1
  291. package/dist/ui/assets/MapView-afd1c913.js +0 -1
  292. package/dist/ui/assets/MarketingPage-89a860b1.js +0 -4
  293. package/dist/ui/assets/MenuEdit-d6e0d64c.js +0 -1
  294. package/dist/ui/assets/MessageInput-6dc83761.js +0 -21
  295. package/dist/ui/assets/MessagesList-966b69c5.js +0 -1
  296. package/dist/ui/assets/ModernLayout-03f30574.js +0 -1
  297. package/dist/ui/assets/Notify-bb3ce372.js +0 -1
  298. package/dist/ui/assets/OpportunitiesList-62eb34f6.js +0 -1
  299. package/dist/ui/assets/OpportunityDetails-356a8580.js +0 -1
  300. package/dist/ui/assets/OpportunityStatus-fa8108ea.js +0 -1
  301. package/dist/ui/assets/PasswordInput-8619a9df.js +0 -1
  302. package/dist/ui/assets/Profile-9104808b.js +0 -1
  303. package/dist/ui/assets/RoleEdit-98a6410b.js +0 -1
  304. package/dist/ui/assets/RoleForm-cc251eba.js +0 -1
  305. package/dist/ui/assets/ScheduleCycle-22c8e809.js +0 -1
  306. package/dist/ui/assets/ScreenList-9f7afa1c.js +0 -1
  307. package/dist/ui/assets/SidePanelContent-6b13836f.js +0 -1
  308. package/dist/ui/assets/SimpleLayout-d5445c0d.js +0 -2
  309. package/dist/ui/assets/StackedSideLayout-51127dc5.js +0 -1
  310. package/dist/ui/assets/StickyFooter-5b934274.js +0 -1
  311. package/dist/ui/assets/SupportRequets-be6542a9.js +0 -1
  312. package/dist/ui/assets/TimeLogApprovalDataList-c16d8bae.js +0 -1
  313. package/dist/ui/assets/TimeLogApprovalList-f6a75a20.js +0 -1
  314. package/dist/ui/assets/TimeLogList-ea288cce.js +0 -1
  315. package/dist/ui/assets/TimesheetsList-4a20e96c.js +0 -1
  316. package/dist/ui/assets/TranslationList-7a989333.js +0 -1
  317. package/dist/ui/assets/UserEdit-87262ea5.js +0 -1
  318. package/dist/ui/assets/UserForm-31fdd3b3.js +0 -1
  319. package/dist/ui/assets/ViewTimeLogForApproval-43b24a1a.js +0 -1
  320. package/dist/ui/assets/Views-74429e81.js +0 -1
  321. package/dist/ui/assets/WelcomeList-6c693eae.js +0 -9
  322. package/dist/ui/assets/actioncell-17e12e21.js +0 -1
  323. package/dist/ui/assets/calendarList-511b4d8f.js +0 -2
  324. package/dist/ui/assets/createSvgIcon-c5fc0d04.js +0 -1
  325. package/dist/ui/assets/documentsList-ac2c91ec.js +0 -1
  326. package/dist/ui/assets/dxicons-4c1b2089.ttf +0 -0
  327. package/dist/ui/assets/dxicons-ade3c9ed.woff2 +0 -0
  328. package/dist/ui/assets/dxicons-b4cd1226.woff +0 -0
  329. package/dist/ui/assets/gridList-cb9a14b1.js +0 -1
  330. package/dist/ui/assets/gridMapTable-c19770a8.js +0 -1
  331. package/dist/ui/assets/index-1d60e514.js +0 -1
  332. package/dist/ui/assets/index-26466d9d.js +0 -1
  333. package/dist/ui/assets/index-289cfedb.js +0 -1
  334. package/dist/ui/assets/index-2ce5b358.js +0 -1
  335. package/dist/ui/assets/index-307ce6d7.js +0 -1
  336. package/dist/ui/assets/index-36ba4ea7.js +0 -1
  337. package/dist/ui/assets/index-3f02e05a.js +0 -1
  338. package/dist/ui/assets/index-44662933.js +0 -13
  339. package/dist/ui/assets/index-51ee35f9.js +0 -1
  340. package/dist/ui/assets/index-54372d82.js +0 -1
  341. package/dist/ui/assets/index-569a9d2c.js +0 -1
  342. package/dist/ui/assets/index-62de659f.js +0 -13
  343. package/dist/ui/assets/index-6589dd2d.js +0 -1
  344. package/dist/ui/assets/index-6b6d0f06.js +0 -1
  345. package/dist/ui/assets/index-6c618440.js +0 -1
  346. package/dist/ui/assets/index-785ad361.js +0 -1
  347. package/dist/ui/assets/index-7df8779c.js +0 -1
  348. package/dist/ui/assets/index-82c9477e.js +0 -1
  349. package/dist/ui/assets/index-8ab45286.js +0 -1
  350. package/dist/ui/assets/index-8c229076.css +0 -7
  351. package/dist/ui/assets/index-a205cfed.js +0 -34
  352. package/dist/ui/assets/index-a23f9c87.js +0 -1
  353. package/dist/ui/assets/index-a455424a.js +0 -1
  354. package/dist/ui/assets/index-a4f78ee1.js +0 -1
  355. package/dist/ui/assets/index-aaad94c2.js +0 -1
  356. package/dist/ui/assets/index-b1b6b0f6.js +0 -1
  357. package/dist/ui/assets/index-c1f92742.js +0 -4
  358. package/dist/ui/assets/index-c2088808.js +0 -1
  359. package/dist/ui/assets/index-cbc29fa8.js +0 -1
  360. package/dist/ui/assets/index-cd2b7d32.js +0 -1
  361. package/dist/ui/assets/index-cf3804f1.js +0 -19
  362. package/dist/ui/assets/index-d0ef2cc2.js +0 -1
  363. package/dist/ui/assets/index-d1145737.js +0 -7
  364. package/dist/ui/assets/index-d58fb185.js +0 -1
  365. package/dist/ui/assets/index-d5b5a7e1.js +0 -1
  366. package/dist/ui/assets/index-daeff047.js +0 -1
  367. package/dist/ui/assets/index-ded3b055.js +0 -1
  368. package/dist/ui/assets/index-ede23a2b.js +0 -1
  369. package/dist/ui/assets/index-f8144346.js +0 -1
  370. package/dist/ui/assets/index-fd68b510.js +0 -1
  371. package/dist/ui/assets/index-fe3409ae.js +0 -1
  372. package/dist/ui/assets/liveLocation-646eef95.js +0 -1
  373. package/dist/ui/assets/modeuls-setup-402f891e.js +0 -1
  374. package/dist/ui/assets/tableV3-3d2f4952.js +0 -1
  375. package/dist/ui/assets/ticketRequestDetails-f78147f7.js +0 -1
  376. package/dist/ui/assets/vendor-mui-69397583.js +0 -185
  377. package/dist/ui/menudata/menus.json +0 -606
@@ -1,34 +0,0 @@
1
- import{j as e,U as W,R as v,V as M,W as X,Z as k,X as x,H as D,Y as H,E as R}from"./vendor-mui-69397583.js";import{A as I}from"./AdaptableCard-df7695d6.js";import{r as f}from"./vendor-react-ece1c85f.js";import{I as Y,B as L,E as Z,O as U,Q as S,V as G}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as Q}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import{U as J}from"./Upload-fb34ce03.js";import{c as K,i as ee,a as te,F as se,b as ae,d as O,E as ie}from"./index.esm-70ab539c.js";import{S as le}from"./StickyFooter-5b934274.js";import{d as T}from"./FolderOpen-88bfcc74.js";import{A as ne,T as z}from"./actioncell-17e12e21.js";import{l as E,m as re,n as oe,o as ce,p as de}from"./DocumemtManagementService-6501a5c1.js";import{C as me}from"./ConfirmDialog-3202eb3d.js";import{N as pe}from"./NoData-8c485a3a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./createSvgIcon-c5fc0d04.js";const B=1,fe=5e5,he=K({files:ee().min(1,"Please upload at least one file").required("File upload is required"),fileName:te().required("File Name is required")}),xe=({initialData:c={files:[],fileName:""},onSubmit:y,onCancel:u,footerWidth:j})=>{const w=(r,a)=>{let o=!0;if(a.length>=B)return`You can only upload ${B} file(s)`;if(r)for(const d of r)d.size>=fe&&(o="Upload file cannot more then 500kb!");return o};return e.jsx(se,{initialValues:c,validationSchema:he,onSubmit:(r,{setSubmitting:a})=>{y(r,a)},children:({values:r,touched:a,errors:o,isSubmitting:d})=>e.jsx(ae,{children:e.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Upload File"}),e.jsx(O,{name:"files",children:({field:m,form:b})=>e.jsx(J,{draggable:!0,beforeUpload:w,fileList:r.files||[],onChange:i=>{var t;b.setFieldValue(m.name,i),b.setFieldValue("fileName",(t=i==null?void 0:i[0])==null?void 0:t.name)},onFileRemove:i=>b.setFieldValue(m.name,i)})}),o.files&&a.files&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:o.files})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"File Name"}),e.jsx(O,{name:"fileName",children:({field:m})=>e.jsx(Y,{...m,placeholder:"File Name"})}),e.jsx(ie,{name:"fileName",component:"div",className:"text-red-600"})]})]}),e.jsx(le,{className:`px-8 flex items-center justify-between py-4 ${j}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(L,{size:"sm",className:"mr-2",type:"button",onClick:u,children:"Cancel"}),e.jsx(L,{size:"sm",variant:"solid",type:"submit",loading:d,children:"Save"})]})})]})})})};const ye=({files:c,fetchData:y,setType:u,setSelectedFile:j,setDrawerOpen:w,loading:r=!1})=>{const[a,o]=f.useState(!1),[d,m]=f.useState(""),[b,i]=f.useState(!1),t=(s,l)=>{l===z.edit&&(w(!0),u("Edit"),j(s)),l===z.delete&&(m(s==null?void 0:s.fileId),o(!0)),l===z.compareFiles&&N(s.fileId,s.analyzedFileId)},n=async s=>{try{i(!0);const l=await E(s),p=l.headers["content-type"],A=new Blob([l.data],{type:p}),F=URL.createObjectURL(A);if(p.startsWith("image/")||p==="application/pdf"||p==="text/html")window.open(F,"_blank");else{const h=document.createElement("a");h.href=F,h.download=`file-${s}`,document.body.appendChild(h),h.click(),document.body.removeChild(h)}}catch{i(!1)}finally{i(!1)}},N=async(s,l)=>{try{i(!0);const p=await E(s),A=new Blob([p.data],{type:p.headers["content-type"]}),F=URL.createObjectURL(A),h=await E(l),$=new Blob([h.data],{type:h.headers["content-type"]}),V=URL.createObjectURL($),_=`
2
- <html>
3
- <head>
4
- <title>Compare Documents</title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <style>
7
- body {
8
- display: flex;
9
- justify-content: space-between;
10
- gap: 10px;
11
- margin: 0;
12
- padding: 0;
13
- overflow: hidden;
14
- }
15
- iframe {
16
- height: 100vh;
17
- border: none;
18
- }
19
- iframe.pdf-content {
20
- width: 50%;
21
- }
22
- iframe.html-content {
23
- width: 50%;
24
- transform: scale(1.0);
25
- transform-origin: top left;
26
- }
27
- </style>
28
- </head>
29
- <body>
30
- <iframe class="pdf-content" src="${F}" title="Original Document"></iframe>
31
- <iframe class="html-content" src="${V}" title="Analyzed Document"></iframe>
32
- </body>
33
- </html>
34
- `,P=new Blob([_],{type:"text/html"}),q=URL.createObjectURL(P);window.open(q,"_blank")||console.error("Popup was blocked by the browser.")}catch(p){console.error("Error fetching documents:",p)}finally{i(!1)}},g=()=>{m(null),o(!1)},C=async()=>{await re(d??"")&&U.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"File Successfully Deleted"}),{placement:"top-center"}),y(),g()};return e.jsx(e.Fragment,{children:e.jsxs(W,{component:v,className:"file-items-table",children:[e.jsxs(M,{children:[e.jsx(X,{children:e.jsxs(k,{className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsx(x,{width:"10%"}),e.jsx(x,{width:"45%",children:e.jsx(D,{className:"text-md font-bold",children:"Original Files"})}),e.jsx(x,{width:"45%",children:e.jsx(D,{className:"text-md font-bold",children:"Analyzed Results"})})]})}),e.jsx(H,{children:b?e.jsx(k,{children:e.jsx(x,{colSpan:4,children:e.jsx(R,{className:"flex justify-center items-center py-8",children:e.jsx(Z,{loading:!0,type:"cover"})})})}):(c==null?void 0:c.length)>0?c.map((s,l)=>e.jsxs(k,{className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsx(x,{className:"dark:bg-[#292f3c] dark:text-white",children:e.jsx(ne,{row:s,actions:{edit:!0,delete:!0,compareFiles:!0},buttonClick:t})}),e.jsx(x,{className:"dark:bg-[#292f3c] dark:text-white",children:e.jsxs(R,{display:"flex",alignItems:"center",children:[e.jsx(T,{sx:{color:"var(--custom-600)"}}),e.jsx(D,{className:"text-sm",sx:{ml:1,cursor:"pointer"},onClick:()=>n(s.fileId),children:s.fileName})]})}),e.jsx(x,{className:"dark:bg-[#292f3c] dark:text-white",children:e.jsxs(R,{display:"flex",alignItems:"center",children:[e.jsx(T,{sx:{color:"#1C74F3"}}),e.jsx(D,{variant:"body1",className:"text-sm",sx:{ml:1,cursor:"pointer"},onClick:()=>n(s.analyzedFileId),children:s.fileName})]})})]},l)):e.jsx(k,{children:e.jsx(x,{colSpan:4,children:e.jsx(pe,{})})})})]}),e.jsx(me,{isOpen:a,type:"danger",title:"Delete file",confirmButtonColor:"red-600",onClose:g,onCancel:g,onConfirm:C,children:e.jsx("p",{children:"Are you sure you want to delete this File?"})})]})})},ue=()=>{const[c,y]=f.useState(!1),[u,j]=f.useState("Add"),[w,r]=f.useState([]),[a,o]=f.useState(null),d=()=>{j("Add"),y(!c)},m=()=>{d()},b=async(t,n)=>{var N,g,C,s;try{const l=u==="Edit"?await ce((a==null?void 0:a.fileId)??"",t==null?void 0:t.fileName,(g=(N=t==null?void 0:t.files)==null?void 0:N[0])!=null&&g.isViewOnly||(C=t==null?void 0:t.files)==null?void 0:C[0]):await de(t==null?void 0:t.fileName,(s=t==null?void 0:t.files)==null?void 0:s[0]);l.success?(i(),U.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`File ${u==="Edit"?"Updated":"Uploaded"} Successfully`}),{placement:"top-center"})):U.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:l.message}),{placement:"top-center"})}catch{U.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:"Something went Wrong"}),{placement:"top-center"})}n(!1),d()},i=f.useCallback(async()=>{var t;try{const n=await oe();n!=null&&n.data&&r((t=n==null?void 0:n.data)==null?void 0:t.$values)}catch{r([])}},[]);return f.useEffect(()=>{i()},[i]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"OCR"}),e.jsx(L,{size:"sm",variant:"solid",icon:e.jsx(G,{}),onClick:()=>y(!0),children:"Add File"})]})}),e.jsx(I,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsxs(I,{className:"h-full borderless",bodyClass:"h-full",children:[e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(Q,{title:"File",isOpen:c,portalClassName:"w30",onClose:()=>d(),children:e.jsx(xe,{footerWidth:"w30",initialData:u==="Add"?{files:[],fileName:""}:{files:[{name:(a==null?void 0:a.fileName)??"",type:"application/zip",size:26775,isViewOnly:!0}],fileName:(a==null?void 0:a.fileName)??""},onSubmit:b,onCancel:m})})})}),e.jsx(ye,{files:w,fetchData:i,setType:j,setSelectedFile:o,setDrawerOpen:y})]})})]})},He=ue;export{He as default};
@@ -1 +0,0 @@
1
- import{j as e,l as Pe}from"./vendor-mui-69397583.js";import{A as P}from"./AdaptableCard-df7695d6.js";import{r as n}from"./vendor-react-ece1c85f.js";import{r as ce,u as I,t as O,d as Se,g as de,s as Ae}from"./index-6589dd2d.js";import{ab as Re,F as ke,l as V,I as Te,cJ as Le,W as Ee,B as R,Y as me,O as ue,Q as pe,D as Me,V as Ie,dr as Oe,cf as $e,af as Be,T as Ve}from"./index-c62ac197.js";import{T as U,A as ae}from"./actioncell-17e12e21.js";import{C as te}from"./tableV3-3d2f4952.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import{a as qe}from"./index-c2088808.js";import{D as $}from"./Drawer-949c18c6.js";import{F as _e,a as S}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import{T as ze,a as Ge,b as re}from"./index-36228db5.js";import"./Upload-fb34ce03.js";import{U as He}from"./UserEdit-87262ea5.js";import{U as Ke}from"./UserNew-b36c342c.js";import{b as he,c as We,a as Qe}from"./vendor-redux-a1f00e6b.js";import{f as Je,g as Ye,h as Xe,i as Ze}from"./UserService-047aef51.js";import{g as fe}from"./index-77e820d0.js";import{F as ge,b as xe,d as A,c as es,a as oe,f as ss}from"./index.esm-70ab539c.js";import{C as B}from"./ConfirmDialog-3202eb3d.js";import{P as ne}from"./PasswordInput-8619a9df.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./FileSaver.min-20f3f13a.js";import"./mapView-ab35acaa.js";import"./esm-f306d015.js";import"./lodash-306e3f66.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./DoubleSidedImage-ae98733b.js";import"./UserForm-31fdd3b3.js";import"./index-36ba4ea7.js";import"./StickyFooter-5b934274.js";import"./index-cebd880b.js";import"./AccountServices-62599aae.js";import"./ContactService-92281a90.js";import"./index-785ad361.js";import"./index-e4c6057f.js";import"./strongPassword-bbec776a.js";import"./validationPatterns-77446c46.js";import"./RoleService-7008da2c.js";import"./index-42e65911.js";const q="userList",ie=he(q+"/getUsers",async t=>{var l,N,v,y,c,x,p;const{auth:a}=Re.getState(),i=((N=(l=a==null?void 0:a.session)==null?void 0:l.tenantId)==null?void 0:N.toString())??"",u={fromDate:(v=t.filterData)==null?void 0:v.fromDate,role:(c=(y=t.filterData)==null?void 0:y.role)==null?void 0:c.value,searchString:(x=t.filterData)==null?void 0:x.searchText,toDate:(p=t.filterData)==null?void 0:p.toDate},r=await Je(u,i);return{data:r.data.$values,total:r.data.$values.length}}),as=he(q+"/getUserTableHiddenCols",async t=>""),ts={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},rs={loading:!1,deleteConfirmation:!1,selectedUser:"",userList:[],roleList:[],tableData:ts,filterData:{tenantId:"",searchText:"",role:"",fromDate:"",toDate:"",dateRange:[null,null]},hiddenColums:[]},Ce=We({name:`${q}/state`,initialState:rs,reducers:{updateUserList:(t,a)=>{t.userList=a.payload},setTableData:(t,a)=>{t.tableData=a.payload},setFilterData:(t,a)=>{t.filterData=a.payload},toggleDeleteConfirmation:(t,a)=>{t.deleteConfirmation=a.payload},setSelectedUser:(t,a)=>{t.selectedUser=a.payload},setHiddenColumnsData:(t,a)=>{t.hiddenColums=a.payload}},extraReducers:t=>{t.addCase(ie.fulfilled,(a,i)=>{a.userList=i.payload.data,a.tableData.total=i.payload.total,a.loading=!1}).addCase(fe.fulfilled,(a,i)=>{a.roleList=i.payload.data}).addCase(as.fulfilled,(a,i)=>{a.loading=!1}).addCase(ie.pending,a=>{a.loading=!0})}}),{updateUserList:ma,toggleDeleteConfirmation:ua,setTableData:pa,setFilterData:os,setSelectedUser:ha,setHiddenColumnsData:fa}=Ce.actions,ns=Ce.reducer;Qe({data:ns});const le=ke,{DatePickerRange:is}=qe,we=n.forwardRef(({onSubmitComplete:t},a)=>{const i=V(),u=le(c=>c.userList.data.filterData),[r,d]=n.useState(u.dateRange),l=le(c=>{var p,C;return(C=(p=c.userList)==null?void 0:p.data)==null?void 0:C.roleList.map(h=>({value:h.id,label:h.name}))}),N=c=>{t==null||t(),i(os(c))},v=c=>{d(c)},y=()=>{const c=fe({});i(c)};return n.useEffect(()=>{y()},[]),e.jsx(ge,{enableReinitialize:!0,innerRef:a,initialValues:{...u},onSubmit:c=>{N(c)},children:({values:c,touched:x,errors:p})=>e.jsx(xe,{children:e.jsxs(_e,{children:[e.jsxs(S,{invalid:p.searchText&&x.searchText,errorMessage:p.searchText,children:[e.jsx("h6",{className:"mb-4",children:"Included text"}),e.jsx(A,{type:"text",autoComplete:"off",name:"searchText",placeholder:"Keyword",component:Te,prefix:e.jsx(Le,{className:"text-lg"})})]}),e.jsxs(S,{invalid:p.role&&x.role,errorMessage:p.role,children:[e.jsx("h6",{className:"mb-4",children:"Filter By Role"}),e.jsx(A,{name:"role",children:({field:C,form:h})=>e.jsx(e.Fragment,{children:e.jsx(Ee,{options:l,field:C,form:h,name:"role",onChange:f=>{h.setFieldValue(C.name,f)}})})})]}),e.jsxs(S,{errorMessage:p.dateRange,children:[e.jsx("h6",{className:"mb-4",children:"Filter By Date Range"}),e.jsx(A,{name:"dateRange",children:({field:C,form:h})=>e.jsx(e.Fragment,{children:e.jsx(is,{field:C,name:"dateRange",value:r,form:h,placeholder:"Select dates range",onChange:f=>{f[0]&&h.setFieldValue("fromDate",f[0].toDateString()),f[1]&&h.setFieldValue("toDate",f[1].toDateString()),h.setFieldValue("dateRange",f),v(f)}})})})]})]})})})}),ls=({onSaveClick:t,onCancel:a})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(R,{size:"sm",className:"mr-2",onClick:a,children:"Cancel"}),e.jsx(R,{size:"sm",variant:"solid",onClick:t,children:"Query"})]}),cs=t=>{const a=n.useRef(null),[i,u]=n.useState(!1),r=()=>{u(!1),t.onClose()},d=()=>{var l;(l=a.current)==null||l.submitForm()};return n.useEffect(()=>{t.isOpen&&u(!0)},[t.isOpen]),e.jsx(e.Fragment,{children:e.jsx($,{title:"Filter",isOpen:i,footer:e.jsx(ls,{onCancel:r,onSaveClick:d}),onClose:r,onRequestClose:r,children:e.jsx(we,{ref:a,onSubmitComplete:r})})})};we.displayName="FilterForm";me("users",ce);const ds=()=>{const t=V(),{deleteConfirmation:a,selectedUser:i,tableData:u}=I(l=>l.users.data),r=()=>{t(O(!1))},d=async()=>{t(O(!1)),await Se(i)&&(t(de(u)),ue.push(e.jsx(pe,{title:"Archive",type:"success",duration:2500,children:"User Successfully Archived"}),{placement:"top-center"}))};return e.jsx(B,{isOpen:a,type:"danger",title:"Archive User",confirmButtonColor:"red-600",onClose:r,onRequestClose:r,onCancel:r,onConfirm:d,children:e.jsx("p",{children:"Are you sure you want to Archive this user? All records related to this user will be Archived as well."})})},ms=es().shape({password:oe().required("Password is required"),confirmPassword:oe().oneOf([ss("password")],"Passwords must match").required("Confirm Password is required")}),us=({isOpen:t,onClose:a,onSubmit:i,loading:u})=>e.jsx(Me,{isOpen:t,onClose:a,contentClassName:"pb-0 px-0",className:"my-4",children:e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"px-6",children:"Change Password"}),e.jsx(ge,{initialValues:{password:"",confirmPassword:""},validationSchema:ms,onSubmit:r=>{i(r)},children:({errors:r,touched:d})=>e.jsxs(xe,{className:"px-6 pb-6 pt-4",children:[e.jsx(S,{label:"Password",invalid:!!r.password&&d.password,errorMessage:r.password,children:e.jsx(A,{type:"password",autoComplete:"new-password",name:"password",placeholder:"Password",component:ne,showPasswordStrength:!0,errors:r,touched:d})}),e.jsx(S,{label:"Confirm Password",invalid:!!r.confirmPassword&&d.confirmPassword,errorMessage:r.confirmPassword,children:e.jsx(A,{type:"password",autoComplete:"new-password",name:"confirmPassword",placeholder:"Confirm Password",component:ne,showPasswordStrength:!0,errors:r,touched:d})}),e.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[e.jsx(R,{type:"button",onClick:a,children:"Cancel"}),e.jsx(R,{type:"submit",loading:u,variant:"solid",children:"Update Password"})]})]})})]})});me("users",ce);const ps="Users",hs={isDelete:!1,isEdit:!1,isManage:!1,isView:!1},fs=({accountId:t=null})=>{const a=V(),{loading:i,filterData:u,usersList:r}=I(s=>s.users.data),d=I(s=>{var o;return((o=s.auth.session)==null?void 0:o.permission)||[]}),[l,N]=n.useState("active-users"),[v,y]=n.useState(!1),[c,x]=n.useState(""),[p,C]=n.useState(!1),[h,f]=n.useState(!1),[w,b]=n.useState(null),[je,E]=n.useState(!1),[De,_]=n.useState(!1),g=n.useMemo(()=>(d==null?void 0:d.find(s=>(s==null?void 0:s.defaultMenuName)===ps))??hs,[d]),z=n.useMemo(()=>({edit:g.isEdit,archive:g.isDelete,view:!1,loginAsUser:!0,resetPassword:g.isEdit,changePassword:g.isEdit}),[g]),k=()=>{a(de({isActive:l==="active-users"}))};n.useEffect(()=>{k(),x("")},[u,l]);const j=(s,o,m)=>{ue.push(e.jsx(pe,{title:o,type:s,duration:2500,children:m}),{placement:"top-center"})},G=async({action:s,successMessage:o,errorMessage:m,onClose:D})=>{try{const Fe=await s();D==null||D(),Fe?j("success",o,`User Successfully ${o}`):j("danger","Error",m)}catch{j("danger","Error","Something went wrong")}finally{k()}},H=()=>y(!0),F=()=>y(!1),K=s=>{H(),x(s.id)},ve=()=>{H(),x("")},W=s=>{a(O(!0)),a(Ae(s.id))},ye=()=>{F(),k()},Q=async s=>{var o;try{const m=await Be({userId:s});m.success&&window.open(`${{}.VITE_CUSTOMER_PORTAL_URL}/loginAsUser/${(o=m==null?void 0:m.data)==null?void 0:o.token}`,"_blank","noreferrer")}catch{j("danger","Error","Failed")}},J=async s=>{var o,m;try{(await Ve(s==null?void 0:s.email)).success?(b(null),j("success","Password Reset","Password Reset link sent to user email")):j("danger","Error","Failed")}catch(D){j("danger","Error",((m=(o=D.response)==null?void 0:o.data)==null?void 0:m.message)||"Something went wrong")}},be=async s=>{var o,m;try{_(!0),(await Ye(w==null?void 0:w.id,{password:btoa(s==null?void 0:s.password)})).success?(E(!1),b(null),j("success","Password Update","The password has been updated successfully.")):j("danger","Password Update","Unable to update the password. Please try again.")}catch(D){j("danger","Password Update",((m=(o=D.response)==null?void 0:o.data)==null?void 0:m.message)||"An unexpected error occurred while updating the password.")}finally{_(!1)}},Y=n.useCallback((s,o)=>{switch(o){case U.edit:K(s);break;case U.delete:W(s);break;case U.loginAsUser:Q(s.id);break;case U.resetPassword:J(s);break;case U.changePassword:b(s),E(!0);break}},[K,W,Q,J]),X=n.useCallback((s,o)=>{o===U.unarchive?(b(s),C(!0)):o===U.delete&&(b(s),f(!0))},[]),T=()=>{C(!1),b(null)},L=()=>{f(!1),b(null)},Ue=()=>{G({action:()=>Xe(w==null?void 0:w.id),successMessage:"Unarchived",errorMessage:"Failed to unarchive user",onClose:T})},Ne=()=>{G({action:()=>Ze(w==null?void 0:w.id),successMessage:"Deleted",errorMessage:"Failed to delete user",onClose:L})},Z=n.useMemo(()=>[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:s=>e.jsx("div",{id:"mAction","data-cname":"Action",children:l==="archived-users"?e.jsx(ae,{row:s==null?void 0:s.data,actions:{edit:!1,delete:g.isDelete,unarchive:g.isDelete,view:!1},buttonClick:X}):e.jsx(ae,{row:s==null?void 0:s.data,actions:z,buttonClick:Y})})},{dataField:"firstName",caption:"First Name",cellRender:s=>e.jsx("div",{"data-cname":"First Name",children:s.data.firstName})},{dataField:"lastName",caption:"Last Name",cellRender:s=>e.jsx("div",{"data-cname":"Last Name",children:s.data.lastName})},{dataField:"email",caption:"Email",cellRender:s=>e.jsx("div",{"data-cname":"Email",children:s.data.email})},{dataField:"phoneNumber",caption:"Phone No",cellRender:s=>e.jsx("div",{"data-cname":"Phone No",children:s.data.phoneNumber})},{dataField:"role",caption:"Role",cellRender:s=>e.jsx("div",{"data-cname":"Role",children:s.data.role})},{dataField:"loginType",caption:"LoginType",cellRender:s=>e.jsx("div",{"data-cname":"Login Type",children:s.data.loginType})},{dataField:"createdByName",caption:"Created By",cellRender:s=>e.jsx("div",{"data-cname":"Created By",children:s.data.createdByName})},{dataField:"createdDate",caption:"Created Date",cellRender:s=>e.jsx("div",{"data-cname":"Created Date",children:s.data.createdDate})}],[l,z,g,Y,X]),M=!!t,ee=M?"m-6 h-full py-1 px-1 bg-transparent":"m-6 h-full py-4 px-6 bg-transparent",se=M?"p-0":"p-4";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`topbar py-4 ${M?"pt-0":"px-6"} border-gray-200 border-b dark:bg-[#292f3c] dark:text-white`,children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Users"}),(g==null?void 0:g.isEdit)&&e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(cs,{}),l==="active-users"&&e.jsx(R,{onClick:ve,block:!0,variant:"solid",size:"sm",icon:e.jsx(Ie,{}),children:"Add User"}),!c&&e.jsx($,{title:"Add User",isOpen:v,onClose:F,portalClassName:"w30 prevent-overflow",children:e.jsx(Ke,{footerWidth:"w30",onClose:F,onAddNew:ye})})]})]})}),e.jsx(P,{className:"pl-4 mx-6 mt-6",children:e.jsx(ze,{value:l,onChange:s=>N(s),children:e.jsxs(Ge,{children:[e.jsx(re,{icon:e.jsx(Oe,{}),value:"active-users",children:"Active"}),e.jsx(re,{icon:e.jsx($e,{}),value:"archived-users",children:"Archived"})]})})}),i&&e.jsx(Pe,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),l==="active-users"&&e.jsx(P,{className:ee,children:e.jsx(P,{className:se,children:e.jsx(te,{tableName:"UserList",className:"pt-2",dataSource:r||[],height:"calc(100vh - 400px)",columns:Z,keyExpr:"$id",stateStorageKey:"opportunity",isLoading:i})})}),l==="archived-users"&&e.jsx(P,{className:ee,children:e.jsx(P,{className:se,children:e.jsx(te,{tableName:"archived-userList",className:"pt-2",dataSource:r||[],height:"calc(100vh - 400px)",columns:Z,keyExpr:"$id",stateStorageKey:"archived-user"})})}),c&&e.jsx($,{title:"Edit User",isOpen:v,onClose:F,portalClassName:"w30",children:e.jsx(He,{footerWidth:"w30",userId:c,onDrawerClose:F,fetchData:k})}),e.jsx(ds,{}),e.jsx(B,{isOpen:p,type:"danger",title:"Unarchive User",confirmButtonColor:"red-600",onClose:T,onRequestClose:T,onCancel:T,onConfirm:Ue,children:e.jsx("p",{children:"Are you sure you want to Unarchive this user? All records related to this user will be Unarchived as well."})}),e.jsx(B,{isOpen:h,type:"danger",title:"Delete User",confirmButtonColor:"red-600",onClose:L,onRequestClose:L,onCancel:L,onConfirm:Ne,children:e.jsx("p",{children:"Are you sure you want to delete this user? All records related to this user will be deleted as well."})}),e.jsx(us,{isOpen:je,onClose:()=>E(!1),userId:w,loading:De,onSubmit:be})]})},ga=fs;export{ga as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./vendor-mui-69397583.js";import{r as R,f as y}from"./vendor-react-ece1c85f.js";import{F as N,a as p}from"./FormContainer-91c2b0e4.js";import{B as w,U as A}from"./index-c62ac197.js";import{A as I}from"./Alert-7dfbd254.js";import{P as f}from"./PasswordInput-8619a9df.js";import{A as M}from"./ActionLink-33e476e1.js";import{u as B}from"./useTimeOutMessage-e4eaa9f2.js";import{c as E,f as T,F as U,b as $,d as h}from"./index.esm-70ab539c.js";import{p as u}from"./strongPassword-bbec776a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./index-42e65911.js";const q=E().shape({password:u.required("Enter password"),confirmPassword:u.required("Confirm password").oneOf([T("password"),null],"Passwords do not match")}),L=x=>{const{disableSubmit:j=!1,className:P,signInUrl:g="/sign-in"}=x,[n,b]=R.useState(!1),[i,v]=B(),C=y(),F=async(o,e)=>{var m,c,l;const r=window.location.search,d=(m=new URLSearchParams(r).get("passwordToken"))==null?void 0:m.toString();let{password:t}=o;t=btoa(t);const k={password:t,resetToken:d||""};e(!0);try{(await A(k)).success&&(e(!1),b(!0))}catch(a){v(((l=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:l.message)||a.toString()),e(!1)}},S=()=>{C("/sign-in")};return s.jsxs("div",{className:P,children:[s.jsx("div",{className:"mb-6",children:n?s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"mb-1",children:"Reset done"}),s.jsx("p",{children:"Your password has been successfully reset"})]}):s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"mb-1",children:"Set new password"}),s.jsx("p",{children:"Your new password must different to previous password"})]})}),i&&s.jsx(I,{showIcon:!0,className:"mb-4",type:"danger",children:i}),s.jsx(U,{initialValues:{password:"",confirmPassword:""},validationSchema:q,onSubmit:(o,{setSubmitting:e})=>{j?e(!1):F(o,e)},children:({touched:o,errors:e,isSubmitting:r})=>s.jsx($,{children:s.jsxs(N,{children:[n?s.jsx(w,{block:!0,variant:"solid",type:"button",onClick:S,children:"Continue"}):s.jsxs(s.Fragment,{children:[s.jsx(p,{label:"Password",invalid:e.password&&o.password,errorMessage:e.password,children:s.jsx(h,{autoComplete:"off",name:"password",placeholder:"Password",component:f,showPasswordStrength:!0,touched:o,errors:e})}),s.jsx(p,{label:"Confirm Password",invalid:e.confirmPassword&&o.confirmPassword,errorMessage:e.confirmPassword,children:s.jsx(h,{autoComplete:"off",name:"confirmPassword",placeholder:"Confirm Password",component:f,showPasswordStrength:!0,touched:o,errors:e})}),s.jsx(w,{block:!0,loading:r,variant:"solid",type:"submit",children:r?"Submitting...":"Submit"})]}),s.jsxs("div",{className:"mt-4 text-center",children:[s.jsx("span",{children:"Back to "}),s.jsx(M,{to:g,children:"Sign in"})]})]})})})]})},O=()=>s.jsx(L,{disableSubmit:!1}),ts=O;export{ts as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{f as j,r as x,u as y}from"./vendor-react-ece1c85f.js";import{F as N}from"./FormContainer-91c2b0e4.js";import{h as p,d as S,B as k,J as F,K as A,M as C}from"./index-c62ac197.js";import{A as w}from"./Alert-7dfbd254.js";import{c as E,a as M,F as P,b as V}from"./index.esm-70ab539c.js";import{a as $}from"./UserService-047aef51.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";const L=({tempToken:l,userId:c})=>{const m=j(),n=p(t=>{var a;return((a=t==null?void 0:t.theme)==null?void 0:a.themeColours)||{}}),[o,d]=x.useState(""),[g,h]=x.useState(!1),v=E().shape({validatethrough:M().required("Please select a verification method")}),f=async t=>{var a,i;h(!0);try{await $(c,t.validatethrough)?m(`/otp-verification?tempToken=${l}`,{state:{validatethrough:t.validatethrough}}):d("Failed to send otp. Please retry.")}catch(r){d(((i=(a=r==null?void 0:r.response)==null?void 0:a.data)==null?void 0:i.message)??"Failed to send otp. Please retry.")}finally{h(!1)}},b=[{label:"Authenticator App",value:"Authenticator",icon:e.jsx(F,{className:"text-3xl text-custom-500"})},{label:"Email",value:"Email",icon:e.jsx(A,{className:"text-3xl text-custom-500"})},{label:"SMS",value:"SMS",icon:e.jsx(C,{className:"text-3xl text-custom-500"})}];return e.jsxs("div",{className:"xl:min-w-[550px] px-4 space-y-6 mt-8 text-center",children:[e.jsxs("div",{className:"p-8 pt-4 pb-0",children:[e.jsx("h2",{className:"text-2xl font-black mb-2 pb-2",children:"2 Factor Authentication"}),e.jsx("p",{className:"text-base text-gray-700 leading-relaxed pb-2",children:"Choose a method to receive your one-time passcode."})]}),e.jsx(P,{initialValues:{validatethrough:""},validationSchema:v,onSubmit:f,children:({values:t,setFieldValue:a,errors:i,touched:r})=>e.jsx(V,{children:e.jsxs(N,{className:"space-y-6 px-4",children:[o&&e.jsx(w,{showIcon:!0,className:"mb-4",type:"danger",children:o}),e.jsx("div",{className:"flex flex-col sm:flex-row justify-center gap-6 sm:gap-8 items-center",children:b.map(s=>{const u=t.validatethrough===s.value;return e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{onClick:()=>a("validatethrough",s.value),className:S("w-32 h-32 border rounded-lg flex items-center justify-center transition dark:text-gray-400 dark:bg-[#292f3c]",u?"border-custom-500 bg-custom-50":"border-gray-300 bg-white cursor-pointer"),children:s.icon}),e.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm text-gray-800 cursor-pointer dark:text-gray-400",children:[e.jsx("input",{type:"radio",name:"validatethrough",value:s.value,checked:u,onChange:()=>a("validatethrough",s.value),style:{accentColor:n[600]}}),s.label]})]},s.value)})}),i.validatethrough&&r.validatethrough&&e.jsx("div",{className:"text-red-500 text-sm",children:i.validatethrough}),t.validatethrough&&e.jsx("div",{className:"pt-4 sm:pb-4",children:e.jsx(k,{type:"submit",variant:"solid",loading:g,block:!0,children:"Next"})})]})})})]})},O=()=>{const{email:l,id:c}=p(o=>o.auth.user);y();const n=new URLSearchParams(document.location.search).get("tempToken")??"";return e.jsx(L,{tempToken:n,email:l??"",userId:c})},W=O;export{W as default};
@@ -1 +0,0 @@
1
- import{bB as a}from"./index-c62ac197.js";function h(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 9l6 0"},child:[]},{tag:"path",attr:{d:"M4 5l4 0"},child:[]},{tag:"path",attr:{d:"M6 5v11a1 1 0 0 0 1 1h5"},child:[]},{tag:"path",attr:{d:"M12 7m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M12 15m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"},child:[]}]})(t)}function o(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 4l6 2v5h-3v8a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-8h-3v-5l6 -2a3 3 0 0 0 6 0"},child:[]}]})(t)}function i(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z"},child:[]}]})(t)}function d(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1"},child:[]},{tag:"path",attr:{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1"},child:[]},{tag:"path",attr:{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1"},child:[]},{tag:"path",attr:{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1"},child:[]}]})(t)}function n(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 21l4 -12m2 0l1.48 4.439m.949 2.847l1.571 4.714"},child:[]},{tag:"path",attr:{d:"M12 7m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M4 12c1.526 2.955 4.588 5 8 5c3.41 0 6.473 -2.048 8 -5"},child:[]},{tag:"path",attr:{d:"M12 5v-2"},child:[]}]})(t)}function e(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2z"},child:[]},{tag:"path",attr:{d:"M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"},child:[]}]})(t)}function l(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"},child:[]},{tag:"path",attr:{d:"M9 7l1 0"},child:[]},{tag:"path",attr:{d:"M9 13l6 0"},child:[]},{tag:"path",attr:{d:"M13 17l2 0"},child:[]}]})(t)}function c(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 12a9 9 0 1 0 -9 9"},child:[]},{tag:"path",attr:{d:"M12 7v5l1 1"},child:[]},{tag:"path",attr:{d:"M16 16h6v6h-6z"},child:[]}]})(t)}function s(t){return a({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"},child:[]},{tag:"path",attr:{d:"M16 3v4"},child:[]},{tag:"path",attr:{d:"M8 3v4"},child:[]},{tag:"path",attr:{d:"M4 11h16"},child:[]},{tag:"path",attr:{d:"M11 15h1"},child:[]},{tag:"path",attr:{d:"M12 15v3"},child:[]}]})(t)}export{d as T,h as a,s as b,e as c,l as d,n as e,c as f,o as g,i as h};
@@ -1 +0,0 @@
1
- import{j as s,l as I}from"./vendor-mui-69397583.js";import{u,t as j,g as C,s as V,a as w,r as W}from"./index-ea125a16.js";import{l as y,O as $,Q as z,Y as K,B as Q,V as Y}from"./index-c62ac197.js";import{A as L}from"./AdaptableCard-df7695d6.js";import{r as d,L as _}from"./vendor-react-ece1c85f.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as E}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{d as G,M as H,a as J}from"./MenuEdit-d6e0d64c.js";import{A as U,T as N}from"./actioncell-17e12e21.js";import{C as X}from"./ConfirmDialog-3202eb3d.js";import{M as Z}from"./MenuTable-c2c65021.js";import{p as ee}from"./Notify-bb3ce372.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./index-cbc29fa8.js";import"./DynamicTablesService-963fe77b.js";import"./index-36ba4ea7.js";import"./StickyFooter-5b934274.js";import"./index.esm-70ab539c.js";import"./index-e4c6057f.js";import"./validationPatterns-77446c46.js";import"./index-8ab45286.js";import"./DoubleSidedImage-ae98733b.js";import"./lodash-306e3f66.js";import"./FileSaver.min-20f3f13a.js";const te=()=>{const t=y(),x=u(i=>i.menuList.data.deleteConfirmation),r=u(i=>i.menuList.data.selectedMenu);u(i=>i.menuList.data.menus);const l=()=>{t(j(!1))},h=async()=>{t(j(!1)),await G(r)&&(t(C()),$.push(s.jsx(z,{title:"Deleted",type:"success",duration:2500,children:"Menu Successfully Deleted"}),{placement:"top-center"}))};return s.jsx(X,{isOpen:x,type:"danger",title:"Delete Menu",confirmButtonColor:"red-600",onClose:l,onRequestClose:l,onCancel:l,onConfirm:h,children:s.jsx("p",{children:"Are you sure you want to delete this menu? All records related to this menu will be deleted as well. This action cannot be undone."})})},se=t=>{const[x,r]=d.useState(!1),[l,h]=d.useState(),[i,p]=d.useState(),n=e=>{r(!0)},b=e=>{r(!1)},c=y(),m=u(e=>e.menuList.data.menus);d.useEffect(()=>{T()},[t.isRefetch]);const g=u(e=>e.menuList.data.loading);t!=null&&t.isEdit||(t==null||t.isDelete);const o=[...t!=null&&t.isEdit||t!=null&&t.isDelete?[{dataField:"actions",caption:"Actions",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:e=>s.jsx(U,{row:e==null?void 0:e.data,actions:R,buttonClick:S})}]:[],{dataField:"name",caption:"Menu Name"},{dataField:"description",caption:"Menu Description"}],D="MenuTable",S=(e,a)=>{a===N.edit&&k(e),a===N.delete&&A(e)},k=e=>{h(e),n()};console.log("menuData from tblv2",l);const A=e=>{c(j(!0)),c(V(e.id))},R={edit:t==null?void 0:t.isEdit,delete:t==null?void 0:t.isDelete,view:!1},T=()=>{const e=C();c(e)};d.useEffect(()=>{O()},[m]);const O=()=>{const e=M=>m.filter(f=>f.parentId===M).map(f=>({...f,innerData:e(f.id)})),a=e(null);p(a)},v=async({movedItem:e,replacedItem:a,fromIndex:M,toIndex:f})=>{console.log("reorder moved",e,"replaced",a);const F={menuName:e.name??"",menuId:e.id??"",description:e.description??"",sequence:f,routeLink:e.routeLink??"",portal:e.portal??"default",parentId:e.parentId??null},q={menuName:a.name??"",menuId:a.id??"",description:a.description??"",sequence:M,routeLink:a.routeLink??"",portal:a.portal??"default",parentId:a.parentId??null},[B,P]=await Promise.all([w(F),w(q)]);B&&P&&(ee("order updated"),c(C()))};return s.jsxs(s.Fragment,{children:[g&&s.jsx(I,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),i&&s.jsx(Z,{tableID:"MenuTable",dataSource:m,columns:o,height:"calc(100vh - 280px)",keyExpr:"$id",stateStorageKey:D,isDetailsRow:!0,isReorder:!0,onReorder:v}),s.jsx(E,{title:"Edit Menu",isOpen:x,onClose:b,portalClassName:"w30",children:s.jsx(H,{footerWidth:"w30",menuData:l,menuList:m,onDrawerClose:b})}),s.jsx(te,{})]})};K("menuList",W);const ae=()=>{var g;const t="Menus",[x,r]=d.useState(!1),[l,h]=d.useState(!1),i=u(o=>o.menuList.data.menus),p=u(o=>{var D;return((D=o.auth.session)==null?void 0:D.permission)||[]}),n=((g=p==null?void 0:p.filter(o=>(o==null?void 0:o.defaultMenuName)===t))==null?void 0:g[0])||{isDelete:!1,isEdit:!1,isManage:!1,isView:!1},b=()=>{r(!0)},c=o=>{r(!1)},m=o=>{r(!1),h(!l)};return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:s.jsxs("div",{className:"lg:flex items-center justify-between",children:[s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Menus"}),(n==null?void 0:n.isEdit)&&s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[s.jsx(_,{download:!0,className:"block lg:inline-block md:mx-2 md:mb-0 mb-4",to:"/data/product-list.csv",rel:"noopener noreferrer",target:"_blank"}),s.jsx(Q,{block:!0,variant:"solid",size:"sm",icon:s.jsx(Y,{}),onClick:()=>b(),children:"Add Menu"}),s.jsx(E,{title:"Add Menu",isOpen:x,onClose:c,portalClassName:"w30",children:s.jsx(J,{footerWidth:"w30",menuList:i,onDrawerClose:c,onAddNewSuccess:m})})]})]})}),s.jsx(L,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:s.jsx(L,{className:"borderless",children:s.jsx(se,{isRefetch:l,isEdit:n==null?void 0:n.isEdit,isDelete:n==null?void 0:n.isDelete})})})]})},We=ae;export{We as default};
@@ -1,4 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{r as h,f as Ps,u as Bs}from"./vendor-react-ece1c85f.js";import{T as is}from"./index-36228db5.js";import{A as Rs}from"./AdaptableCard-df7695d6.js";import{B as j,h as R,l as Es,dg as Os,dh as Ds,cj as Ts,cd as zs,n as N,V as E,I as A,W as Us,bd as Hs,k as $s,di as Vs,dj as Gs,dk as qs,dl as Zs,dm as je,dn as ye,O as K,Q}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import{R as we}from"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as $e}from"./Drawer-949c18c6.js";import{F as Ws,a as Ne}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import{U as Ve}from"./Upload-fb34ce03.js";import{L as oe}from"./Logo-3f3c9ee6.js";import{c as Js,a as Te,F as Xs,b as Ys,d as ze}from"./index.esm-70ab539c.js";import{F as Ge}from"./index-fcc1c999.js";import{J as Ks}from"./vendor-devex-33a39e11.js";import{F as Qs}from"./FileSaver.min-20f3f13a.js";import{a as ns}from"./index-e4c6057f.js";import{p as ie}from"./Notify-bb3ce372.js";import"./useControllableState-d0909575.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./useDidUpdate-25c4d4ed.js";function Se(s){"@babel/helpers - typeof";return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Se(s)}var ea=/^\s+/,sa=/\s+$/;function c(s,t){if(s=s||"",t=t||{},s instanceof c)return s;if(!(this instanceof c))return new c(s,t);var a=aa(s);this._originalInput=s,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||a.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=a.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),a,n,o,l,m,u;return a=t.r/255,n=t.g/255,o=t.b/255,a<=.03928?l=a/12.92:l=Math.pow((a+.055)/1.055,2.4),n<=.03928?m=n/12.92:m=Math.pow((n+.055)/1.055,2.4),o<=.03928?u=o/12.92:u=Math.pow((o+.055)/1.055,2.4),.2126*l+.7152*m+.0722*u},setAlpha:function(t){return this._a=rs(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Qe(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Qe(this._r,this._g,this._b),a=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+a+", "+n+"%, "+o+"%)":"hsva("+a+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Ke(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Ke(this._r,this._g,this._b),a=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+a+", "+n+"%, "+o+"%)":"hsla("+a+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return es(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return ra(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(v(this._r,255)*100)+"%",g:Math.round(v(this._g,255)*100)+"%",b:Math.round(v(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(v(this._r,255)*100)+"%, "+Math.round(v(this._g,255)*100)+"%, "+Math.round(v(this._b,255)*100)+"%)":"rgba("+Math.round(v(this._r,255)*100)+"%, "+Math.round(v(this._g,255)*100)+"%, "+Math.round(v(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ba[es(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var a="#"+ss(this._r,this._g,this._b,this._a),n=a,o=this._gradientType?"GradientType = 1, ":"";if(t){var l=c(t);n="#"+ss(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+a+",endColorstr="+n+")"},toString:function(t){var a=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,l=!a&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return l?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,a){var n=t.apply(null,[this].concat([].slice.call(a)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(da,arguments)},brighten:function(){return this._applyModification(ma,arguments)},darken:function(){return this._applyModification(ua,arguments)},desaturate:function(){return this._applyModification(la,arguments)},saturate:function(){return this._applyModification(oa,arguments)},greyscale:function(){return this._applyModification(ca,arguments)},spin:function(){return this._applyModification(ha,arguments)},_applyCombination:function(t,a){return t.apply(null,[this].concat([].slice.call(a)))},analogous:function(){return this._applyCombination(xa,arguments)},complement:function(){return this._applyCombination(ga,arguments)},monochromatic:function(){return this._applyCombination(pa,arguments)},splitcomplement:function(){return this._applyCombination(fa,arguments)},triad:function(){return this._applyCombination(as,[3])},tetrad:function(){return this._applyCombination(as,[4])}};c.fromRatio=function(s,t){if(Se(s)=="object"){var a={};for(var n in s)s.hasOwnProperty(n)&&(n==="a"?a[n]=s[n]:a[n]=ge(s[n]));s=a}return c(s,t)};function aa(s){var t={r:0,g:0,b:0},a=1,n=null,o=null,l=null,m=!1,u=!1;return typeof s=="string"&&(s=wa(s)),Se(s)=="object"&&(J(s.r)&&J(s.g)&&J(s.b)?(t=ta(s.r,s.g,s.b),m=!0,u=String(s.r).substr(-1)==="%"?"prgb":"rgb"):J(s.h)&&J(s.s)&&J(s.v)?(n=ge(s.s),o=ge(s.v),t=na(s.h,n,o),m=!0,u="hsv"):J(s.h)&&J(s.s)&&J(s.l)&&(n=ge(s.s),l=ge(s.l),t=ia(s.h,n,l),m=!0,u="hsl"),s.hasOwnProperty("a")&&(a=s.a)),a=rs(a),{ok:m,format:s.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a}}function ta(s,t,a){return{r:v(s,255)*255,g:v(t,255)*255,b:v(a,255)*255}}function Ke(s,t,a){s=v(s,255),t=v(t,255),a=v(a,255);var n=Math.max(s,t,a),o=Math.min(s,t,a),l,m,u=(n+o)/2;if(n==o)l=m=0;else{var g=n-o;switch(m=u>.5?g/(2-n-o):g/(n+o),n){case s:l=(t-a)/g+(t<a?6:0);break;case t:l=(a-s)/g+2;break;case a:l=(s-t)/g+4;break}l/=6}return{h:l,s:m,l:u}}function ia(s,t,a){var n,o,l;s=v(s,360),t=v(t,100),a=v(a,100);function m(d,b,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?d+(b-d)*6*f:f<1/2?b:f<2/3?d+(b-d)*(2/3-f)*6:d}if(t===0)n=o=l=a;else{var u=a<.5?a*(1+t):a+t-a*t,g=2*a-u;n=m(g,u,s+1/3),o=m(g,u,s),l=m(g,u,s-1/3)}return{r:n*255,g:o*255,b:l*255}}function Qe(s,t,a){s=v(s,255),t=v(t,255),a=v(a,255);var n=Math.max(s,t,a),o=Math.min(s,t,a),l,m,u=n,g=n-o;if(m=n===0?0:g/n,n==o)l=0;else{switch(n){case s:l=(t-a)/g+(t<a?6:0);break;case t:l=(a-s)/g+2;break;case a:l=(s-t)/g+4;break}l/=6}return{h:l,s:m,v:u}}function na(s,t,a){s=v(s,360)*6,t=v(t,100),a=v(a,100);var n=Math.floor(s),o=s-n,l=a*(1-t),m=a*(1-o*t),u=a*(1-(1-o)*t),g=n%6,d=[a,m,l,l,u,a][g],b=[u,a,a,m,l,l][g],f=[l,l,u,a,a,m][g];return{r:d*255,g:b*255,b:f*255}}function es(s,t,a,n){var o=[z(Math.round(s).toString(16)),z(Math.round(t).toString(16)),z(Math.round(a).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ra(s,t,a,n,o){var l=[z(Math.round(s).toString(16)),z(Math.round(t).toString(16)),z(Math.round(a).toString(16)),z(ls(n))];return o&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function ss(s,t,a,n){var o=[z(ls(n)),z(Math.round(s).toString(16)),z(Math.round(t).toString(16)),z(Math.round(a).toString(16))];return o.join("")}c.equals=function(s,t){return!s||!t?!1:c(s).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function la(s,t){t=t===0?0:t||10;var a=c(s).toHsl();return a.s-=t/100,a.s=Ce(a.s),c(a)}function oa(s,t){t=t===0?0:t||10;var a=c(s).toHsl();return a.s+=t/100,a.s=Ce(a.s),c(a)}function ca(s){return c(s).desaturate(100)}function da(s,t){t=t===0?0:t||10;var a=c(s).toHsl();return a.l+=t/100,a.l=Ce(a.l),c(a)}function ma(s,t){t=t===0?0:t||10;var a=c(s).toRgb();return a.r=Math.max(0,Math.min(255,a.r-Math.round(255*-(t/100)))),a.g=Math.max(0,Math.min(255,a.g-Math.round(255*-(t/100)))),a.b=Math.max(0,Math.min(255,a.b-Math.round(255*-(t/100)))),c(a)}function ua(s,t){t=t===0?0:t||10;var a=c(s).toHsl();return a.l-=t/100,a.l=Ce(a.l),c(a)}function ha(s,t){var a=c(s).toHsl(),n=(a.h+t)%360;return a.h=n<0?360+n:n,c(a)}function ga(s){var t=c(s).toHsl();return t.h=(t.h+180)%360,c(t)}function as(s,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var a=c(s).toHsl(),n=[c(s)],o=360/t,l=1;l<t;l++)n.push(c({h:(a.h+l*o)%360,s:a.s,l:a.l}));return n}function fa(s){var t=c(s).toHsl(),a=t.h;return[c(s),c({h:(a+72)%360,s:t.s,l:t.l}),c({h:(a+216)%360,s:t.s,l:t.l})]}function xa(s,t,a){t=t||6,a=a||30;var n=c(s).toHsl(),o=360/a,l=[c(s)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,l.push(c(n));return l}function pa(s,t){t=t||6;for(var a=c(s).toHsv(),n=a.h,o=a.s,l=a.v,m=[],u=1/t;t--;)m.push(c({h:n,s:o,v:l})),l=(l+u)%1;return m}c.mix=function(s,t,a){a=a===0?0:a||50;var n=c(s).toRgb(),o=c(t).toRgb(),l=a/100,m={r:(o.r-n.r)*l+n.r,g:(o.g-n.g)*l+n.g,b:(o.b-n.b)*l+n.b,a:(o.a-n.a)*l+n.a};return c(m)};c.readability=function(s,t){var a=c(s),n=c(t);return(Math.max(a.getLuminance(),n.getLuminance())+.05)/(Math.min(a.getLuminance(),n.getLuminance())+.05)};c.isReadable=function(s,t,a){var n=c.readability(s,t),o,l;switch(l=!1,o=Na(a),o.level+o.size){case"AAsmall":case"AAAlarge":l=n>=4.5;break;case"AAlarge":l=n>=3;break;case"AAAsmall":l=n>=7;break}return l};c.mostReadable=function(s,t,a){var n=null,o=0,l,m,u,g;a=a||{},m=a.includeFallbackColors,u=a.level,g=a.size;for(var d=0;d<t.length;d++)l=c.readability(s,t[d]),l>o&&(o=l,n=c(t[d]));return c.isReadable(s,n,{level:u,size:g})||!m?n:(a.includeFallbackColors=!1,c.mostReadable(s,["#fff","#000"],a))};var He=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ba=c.hexNames=va(He);function va(s){var t={};for(var a in s)s.hasOwnProperty(a)&&(t[s[a]]=a);return t}function rs(s){return s=parseFloat(s),(isNaN(s)||s<0||s>1)&&(s=1),s}function v(s,t){ja(s)&&(s="100%");var a=ya(s);return s=Math.min(t,Math.max(0,parseFloat(s))),a&&(s=parseInt(s*t,10)/100),Math.abs(s-t)<1e-6?1:s%t/parseFloat(t)}function Ce(s){return Math.min(1,Math.max(0,s))}function F(s){return parseInt(s,16)}function ja(s){return typeof s=="string"&&s.indexOf(".")!=-1&&parseFloat(s)===1}function ya(s){return typeof s=="string"&&s.indexOf("%")!=-1}function z(s){return s.length==1?"0"+s:""+s}function ge(s){return s<=1&&(s=s*100+"%"),s}function ls(s){return Math.round(parseFloat(s)*255).toString(16)}function ts(s){return F(s)/255}var T=function(){var s="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",a="(?:"+t+")|(?:"+s+")",n="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?",o="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?";return{CSS_UNIT:new RegExp(a),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function J(s){return!!T.CSS_UNIT.exec(s)}function wa(s){s=s.replace(ea,"").replace(sa,"").toLowerCase();var t=!1;if(He[s])s=He[s],t=!0;else if(s=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var a;return(a=T.rgb.exec(s))?{r:a[1],g:a[2],b:a[3]}:(a=T.rgba.exec(s))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=T.hsl.exec(s))?{h:a[1],s:a[2],l:a[3]}:(a=T.hsla.exec(s))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=T.hsv.exec(s))?{h:a[1],s:a[2],v:a[3]}:(a=T.hsva.exec(s))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=T.hex8.exec(s))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:ts(a[4]),format:t?"name":"hex8"}:(a=T.hex6.exec(s))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:t?"name":"hex"}:(a=T.hex4.exec(s))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:ts(a[4]+""+a[4]),format:t?"name":"hex8"}:(a=T.hex3.exec(s))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:t?"name":"hex"}:!1}function Na(s){var t,a;return s=s||{level:"AA",size:"small"},t=(s.level||"AA").toUpperCase(),a=(s.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),a!=="small"&&a!=="large"&&(a="small"),{level:t,size:a}}const ka=[{name:"favicon-16x16.png",size:16},{name:"favicon-32x32.png",size:32},{name:"favicon-48x48.png",size:48},{name:"apple-touch-icon.png",size:180},{name:"android-chrome-192x192.png",size:192},{name:"favicon-256x256.png",size:256},{name:"android-chrome-512x512.png",size:512}],_a=({isOpen:s,onClose:t})=>{const[a,n]=h.useState([]),o=async d=>{const b=await Promise.all(ka.map(({name:f,size:M})=>new Promise(P=>{const x=document.createElement("canvas");x.width=M,x.height=M;const U=x.getContext("2d"),S=new Image;S.onload=()=>{U.clearRect(0,0,M,M),U.drawImage(S,0,0,M,M),x.toBlob(O=>{const k=URL.createObjectURL(O);P({name:f,size:M,blob:O,url:k})},"image/png")},S.src=URL.createObjectURL(d)})));n(b)},l=d=>{const b=d==null?void 0:d[0];b instanceof File&&o(b)},m=async d=>{const f=`
2
- <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64">
3
- <image href="${await u(d)}" height="64" width="64"/>
4
- </svg>`.trim();return new Blob([f],{type:"image/svg+xml"})},u=d=>new Promise(b=>{const f=new FileReader;f.onloadend=()=>b(f.result),f.readAsDataURL(d)}),g=async()=>{var P;const d=new Ks;a.forEach(x=>{d.file(x.name,x.blob)});const b=(P=a.find(x=>x.size>=64))==null?void 0:P.blob;if(b){const x=await m(b);d.file("favicon.svg",x)}const f={name:"My App",short_name:"App",icons:a.filter(x=>[192,256,512].includes(x.size)).map(x=>({src:x.name,sizes:`${x.size}x${x.size}`,type:"image/png"})),theme_color:"#ffffff",background_color:"#ffffff",display:"standalone"};d.file("site.webmanifest",JSON.stringify(f,null,2));const M=await d.generateAsync({type:"blob"});Qs.saveAs(M,"favicons.zip")};return e.jsx($e,{title:"Manage Favicon Icon",isOpen:s,portalClassName:"w30",onClose:t,children:e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Manage Icon"}),e.jsx(Ve,{draggable:!0,accept:"image/*",showList:!1,uploadLimit:1,cropNeeded:!1,onChange:d=>l(d),children:e.jsxs("div",{className:"my-16 text-center",children:[e.jsx("div",{className:"text-6xl mb-4 flex justify-center",children:e.jsx(Ge,{})}),e.jsxs("p",{className:"font-semibold",children:[e.jsx("span",{className:"text-gray-800 dark:text-white",children:"Drop your image here, or "}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsx("p",{className:"mt-1 opacity-60 dark:text-white",children:"Support: jpeg, png, gif"})]})}),a.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Generated Favicons:"}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:a.map((d,b)=>e.jsxs("div",{className:"text-center",children:[e.jsx("img",{src:d.url,alt:`favicon-${d.size}`,className:"mx-auto border"}),e.jsx("p",{className:"text-sm mt-1",children:d.name})]},b))})]}),e.jsx("div",{className:"text-center mt-6",children:e.jsx(j,{variant:"solid",onClick:g,children:"Download ZIP"})})]})]})})},Ue=({isOpen:s,onClose:t,handleFileUpload:a,settingType:n})=>{const[o,l]=h.useState(null),[m,u]=h.useState(null),[g,d]=h.useState(null),[b,f]=h.useState(!1),M=P=>{var _;const x=P[0];if(!x)return;const U=10,S=U*1024*1024;if(x.size>S){ie(`File size should not exceed ${U} MB.`,"File Size","warning",4500);return}const O=(_=x.name.split(".").pop())==null?void 0:_.toLowerCase();if(!O||!["jpg","jpeg","png","mp4","mov"].includes(O)){ie("Unsupported file type. Only jpg, jpeg, png, mp4, and mov are allowed.","Unsupported File Type","warning",4500);return}const $=URL.createObjectURL(x);if(x.type.startsWith("image")){const p=new Image;p.onload=()=>{d(x),l($),u("image")},p.onerror=()=>{ie("Failed to load the image.","Failed","danger",4500),URL.revokeObjectURL($)},p.src=$}else if(x.type.startsWith("video")){const p=document.createElement("video");p.preload="metadata",p.onloadedmetadata=()=>{window.URL.revokeObjectURL(p.src),d(x),l($),u("video")},p.onerror=()=>{alert("Failed to load the video."),URL.revokeObjectURL($)},p.src=$}};return h.useEffect(()=>{s||(o&&URL.revokeObjectURL(o),l(null),u(null),d(null))},[s]),e.jsxs($e,{title:"Manage Background",isOpen:s,portalClassName:"w30",onClose:t,children:[e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Background (Image/Video)"}),e.jsx(Ve,{draggable:!0,accept:"image/*,video/*",onChange:M,cropNeeded:!1,children:e.jsxs("div",{className:"my-16 text-center",children:[e.jsx("div",{className:"text-6xl mb-4 flex justify-center",children:e.jsx(Ge,{})}),e.jsxs("p",{className:"font-semibold",children:[e.jsxs("span",{className:"text-gray-800 dark:text-white",children:["Drop your image or video here, or"," "]}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsx("p",{className:"mt-1 opacity-60 dark:text-white",children:"Support: jpeg, png, mp4, mov"})]})}),o&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Preview:"}),m==="image"?e.jsx("img",{src:o,alt:"Preview",className:"rounded border w-full"}):e.jsx("video",{src:o,controls:!0,className:"w-full rounded border"})]})]}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(j,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>t(),children:"Discard"}),e.jsx(j,{size:"sm",variant:"solid",loading:b,icon:e.jsx(ns,{}),onClick:async()=>{g&&(f(!0),await a({file:g,settingType:n})),t(),f(!1)},children:"Save"})]})]})},ke=({isOpen:s,onClose:t,handleFileUpload:a,settingType:n,label:o,title:l,expectedDimensions:m,isDark:u=!1})=>{const[g,d]=h.useState(null),[b,f]=h.useState(null),[M,P]=h.useState(!1),x=U=>{var D;const S=U[0];if(!S)return;const O=2,k=O*1024*1024;if(((D=S.name.split(".").pop())==null?void 0:D.toLowerCase())!=="png"||S.type!=="image/png"){ie("Logo must be a transparent PNG.","File Type","warning",4500);return}if(S.size>k){ie(`File size should not exceed ${O} MB.`,"File Size","warning",4500);return}const _=URL.createObjectURL(S),p=new Image;p.onload=()=>{const L=m.width,B=m.height;if(p.width===L&&p.height===B){f(S),d(_);return}if(p.width<=L&&p.height<=B){const C=document.createElement("canvas"),ee=C.getContext("2d");C.width=L,C.height=B,ee.clearRect(0,0,C.width,C.height);const Ae=(L-p.width)/2,Le=(B-p.height)/2;ee.drawImage(p,Ae,Le),C.toBlob(fe=>{if(fe){const xe=new File([fe],S.name,{type:"image/png"}),Ie=URL.createObjectURL(xe);f(xe),d(Ie)}},"image/png"),URL.revokeObjectURL(_)}else ie(`Image must be exactly ${L}×${B} or smaller to auto-pad.`,"File Dimension","warning",4500),URL.revokeObjectURL(_)},p.onerror=()=>{ie("Invalid image file.","Upload Error","error",4500),URL.revokeObjectURL(_)},p.src=_};return h.useEffect(()=>{s||(g&&URL.revokeObjectURL(g),d(null),f(null))},[s]),e.jsxs($e,{title:l,isOpen:s,portalClassName:"w30",onClose:t,children:[e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:o}),e.jsx(Ve,{draggable:!0,accept:"image/png",onChange:x,cropNeeded:!1,children:e.jsxs("div",{className:"my-16 text-center",children:[e.jsx("div",{className:"text-6xl mb-4 flex justify-center",children:e.jsx(Ge,{})}),e.jsxs("p",{className:"font-semibold",children:[e.jsxs("span",{className:"text-gray-800 dark:text-white",children:["Drop your PNG logo here, or"," "]}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsxs("p",{className:"mt-1 opacity-60 dark:text-white",children:["Must be transparent PNG — ",m.width,"×",m.height]}),e.jsx("p",{className:"mt-1 opacity-60 dark:text-white",children:"Max size: 2 MB"})]})}),g&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Preview:"}),e.jsx("div",{className:u?"bg-gray-900 text-white mt-6":"mt-6",children:e.jsx("img",{src:g,alt:"Preview",className:"rounded border w-full"})})]})]}),e.jsxs("div",{className:"md:flex items-center justify-between w-full mt-6",children:[e.jsx(j,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>t(),children:"Discard"}),e.jsx(j,{size:"sm",variant:"solid",loading:M,icon:e.jsx(ns,{}),onClick:async()=>{b&&(P(!0),await a({file:b,settingType:n})),t(),P(!1)},children:"Save"})]})]})},{TabNav:_e,TabList:Ma,TabContent:he}=is,Sa=["slate","zinc","gray","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","white","black"],Ca=Js().shape({fieldA:Te().required("Site Name is required").notOneOf(Sa,"This color name is reserved. Please choose another."),fieldB:Te().required("Primary Color is required"),fieldC:Te()});function Me(s){try{if(s!=null&&s.moreInformation){const t=JSON.parse(s.moreInformation);return(t==null?void 0:t.themeText)||{}}}catch(t){console.error("Error parsing themeText:",t)}return{}}function Aa(s){const t=[".jpg",".jpeg",".png",".gif",".webp"],a=[".mp4",".webm",".ogg",".mov"],n=s.slice(s.lastIndexOf(".")).toLowerCase();return t.includes(n)?"img":(a.includes(n),"video")}function La(s,t){if(!t)return"/img/video/bg-login.mp4";const n=t.replace(/\\/g,"/").split("/").map(encodeURIComponent).join("/");return`${s}/${n}`}const Ia=()=>{const[s,t]=h.useState("general"),[a,n]=h.useState(!1),[o,l]=h.useState(!1),[m,u]=h.useState(!1),[g,d]=h.useState(!1),[b,f]=h.useState(!1),[M,P]=h.useState(!1),[x,U]=h.useState(!1),[S,O]=h.useState(!1),[k,$]=h.useState({label:"Admin Portal",value:"Admin"}),_=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.sideLayout)||{}}),p=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.centerLayout)||{}}),D=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.coverLayout)||{}}),L=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.customerSideLayout)||{}}),B=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.customerCenterLayout)||{}}),C=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.customerCoverLayout)||{}}),ee=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.siteSettings)||{}}),Ae=R(i=>{var r;return((r=i==null?void 0:i.theme)==null?void 0:r.themeColours)||{}}),{logoIconLightMode:Le,fullLogoIconLightMode:fe,logoIconDarkMode:xe,fullLogoIconDarkMode:Ie}=R(i=>i==null?void 0:i.theme),V=h.useMemo(()=>Me(_),[_]),G=h.useMemo(()=>Me(D),[D]),q=h.useMemo(()=>Me(C),[C]),Z=h.useMemo(()=>Me(L),[L]),[X,ne]=h.useState({side:{heading:(V==null?void 0:V.primaryText)||"",subheading:(V==null?void 0:V.secondaryText)||"",description:(V==null?void 0:V.description)||""},cover:{heading:(G==null?void 0:G.primaryText)||"",subheading:(G==null?void 0:G.secondaryText)||"",description:(G==null?void 0:G.description)||""}}),[Y,re]=h.useState({side:{heading:(Z==null?void 0:Z.primaryText)||"",subheading:(Z==null?void 0:Z.secondaryText)||"",description:(Z==null?void 0:Z.description)||""},cover:{heading:(q==null?void 0:q.primaryText)||"",subheading:(q==null?void 0:q.secondaryText)||"",description:(q==null?void 0:q.description)||""}}),le=i=>{const r=La(window.RUNTIME_CONFIG.VITE_API_BASE_URL,i==null?void 0:i.settingFilePath),y=Aa(r);return{url:r,type:y}},Fe=h.useMemo(()=>le(_),[_==null?void 0:_.settingFilePath]),Pe=h.useMemo(()=>le(p),[p==null?void 0:p.settingFilePath]),Be=h.useMemo(()=>le(D),[D==null?void 0:D.settingFilePath]),Re=h.useMemo(()=>le(L),[L==null?void 0:L.settingFilePath]),Ee=h.useMemo(()=>le(B),[B==null?void 0:B.settingFilePath]),Oe=h.useMemo(()=>le(C),[C==null?void 0:C.settingFilePath]),qe=R(i=>i.theme.loginLayout),os=R(i=>i.theme.customerLoginLayout);R(i=>i.theme);const se=Es(),cs=()=>{n(!0)},ds=i=>{n(!1)},Ze=()=>{u(!0)},ms=i=>{u(!1)},us=()=>{l(!0)},hs=i=>{l(!1)},gs=()=>{d(!0)},fs=i=>{d(!1)},xs=()=>{us()},ps=i=>{f(!1)},bs=i=>{f(!0)},vs=i=>{P(!1)},We=i=>{P(!0)},js=i=>{U(!1)},Je=i=>{U(!0)},ys=i=>{O(!1)},Xe=i=>{O(!0)};Ps();const Ye=Bs(),ws=Ye.pathname.substring(Ye.pathname.lastIndexOf("/")+1),[Fa,Ns]=h.useState("#f05b41");h.useCallback(({value:i})=>{Ns(i)},[]);const[I,De]=h.useState(qe),ks=i=>{se(Gs(i)),De(i),Ss(i,k.value==="Admin"?p:B)};h.useEffect(()=>{k.value==="Admin"?De(qe):De(os)},[k]),h.useEffect(()=>{t(ws)},[]);async function _s(i,r,y,H){try{await je(i.id,i.settingKey,i.settingName,i.settingValue,r,i.settingDescription,void 0,JSON.stringify({custom:y,...H&&{customSecondary:H}})),se(ye()),K.push(e.jsx(Q,{title:"Saved!",type:"success",children:"Branding updated successfully."}),{placement:"top-center"})}catch(w){console.error("Error saving layout setting:",w),K.push(e.jsx(Q,{title:"Error",type:"danger",children:"Failed to update Branding. Please try again."}),{placement:"top-center"})}}const Ms=(i,r,y)=>{const H={50:.5,100:.4,200:.3,300:.2,400:.1,500:.05,600:0,700:-.05,800:-.1,900:-.15,950:-.2},w={};for(const[me,te]of Object.entries(H)){const ue=(te>=0?c(i).lighten(te*100):c(i).darken(Math.abs(te)*100)).toHexString();w[me]=ue,document.documentElement.style.setProperty(`--custom-${me}`,ue)}document.documentElement.style.setProperty("--text-custom-600",w[500]),document.documentElement.style.setProperty("--tw-custom-600",w[600]);const W=parseInt(w[600].slice(1),16),ce=W>>16&255,de=W>>8&255,Is=W&255;document.documentElement.style.setProperty("--customs-600",`${ce}, ${de}, ${Is}`);const ve={};if(r)for(const[me,te]of Object.entries(H)){const ue=(te>=0?c(r).lighten(te*100):c(r).darken(Math.abs(te)*100)).toHexString();ve[me]=ue,document.documentElement.style.setProperty(`--secondary-${me}`,ue)}return se(qs(w)),Object.keys(ve).length>0&&se(Zs(ve)),_s(ee,y,w,ve),w};async function pe({type:i,loginTexts:r,settingType:y}){const H=r[i],w=JSON.stringify({themeText:{primaryText:H.heading,secondaryText:H.subheading,description:H.description}});try{await je(y.id,y.settingKey,y.settingName,y.settingValue,y.settingType,y.settingDescription,void 0,w),se(ye()),K.push(e.jsx(Q,{title:"Saved!",type:"success",children:"Login text updated successfully"}),{placement:"top-center"})}catch(W){console.error("Error saving login text:",W),K.push(e.jsx(Q,{title:"Error",type:"danger",children:"Failed to update login text. Please try again."}),{placement:"top-center"})}}async function ae({file:i,settingType:r}){try{await je(r.id,r.settingKey,r.settingName,r.settingValue,r.settingType,r.settingDescription,i,r.moreInformation),se(ye()),K.push(e.jsx(Q,{title:"Saved!",type:"success",children:"Background uploaded successfully"}),{placement:"top-center"})}catch(y){console.error("Error uploading background:",y),K.push(e.jsx(Q,{title:"Error",type:"danger",children:"Failed to upload background. Please try again."}),{placement:"top-center"})}}async function Ss(i,r){try{await je(r.id,r.settingKey,r.settingName,r.settingValue,i,r.settingDescription,void 0,r.moreInformation),se(ye()),K.push(e.jsx(Q,{title:"Saved!",type:"success",children:"Login layout updated successfully."}),{placement:"top-center"})}catch(y){console.error("Error saving layout setting:",y),K.push(e.jsx(Q,{title:"Error",type:"danger",children:"Failed to update login layout. Please try again."}),{placement:"top-center"})}}const[be,Cs]=h.useState(null),As=i=>{Cs(be===i?null:i)},Ls=[{title:"Welcome Email",subject:"Welcome to ContentActive",message:"<p>Hello <b>[full_name]</b>,</p><br /><h3>Welcome to [site_name]!</h3><br /><p>Below are your login details to login to the [site_name] portal. Please make sure to save your credentails.</p><br/><p>Email: [email]</p><p>Password: [password]</p><br /><p>Thank you</p>",button:""},{title:"Forgot Password",subject:"Forgot your Password?",message:"<p>Hello <b>[full_name]</b>,</p><br /><p>Please follow the link below to update/reset your password.</p><br/><p>If you have any questeions please lets us know by emailing us at: [support_email]</p><br/><p>Email: [email]</p>",button:"Reset Your Password"},{title:"Activation Code",subject:"Activation code for ContentActive",message:"<p>Hello <b>[full_name]</b>,</p><br /><p>Your activation code is below.</p><br/><p>[activation_code]</p><br/><p>If you have any questeions please lets us know by emailing us at: [support_email]</p><br/>",button:""}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Branding Options"})})}),e.jsx(Rs,{className:"m-4 p-4",children:e.jsxs(is,{defaultValue:"logos",children:[e.jsxs(Ma,{children:[e.jsx(_e,{icon:e.jsx(Os,{}),value:"logos",children:"Logo"}),e.jsx(_e,{icon:e.jsx(Ds,{}),value:"colors",children:"Branding"}),e.jsx(_e,{icon:e.jsx(Ts,{}),value:"login",children:"Login"}),e.jsx(_e,{icon:e.jsx(zs,{}),value:"emails",children:"Email Templates"})]}),e.jsxs("div",{className:"p-4",children:[e.jsx(he,{value:"logos",children:e.jsxs(he,{value:"logos",className:"w-full p-0 relative",children:[e.jsxs("div",{className:"flex flex-wrap mb-4",children:[e.jsx("div",{className:"w-full md:w-full mb-4 pb-4 md:mb-0",children:e.jsx("strong",{children:"Favicon"})}),e.jsx("div",{className:"w-full md:w-full mb-4 md:mb-0",children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-4 xl:grid-cols-4 gap-4 mb-5",children:e.jsx(N,{children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2 w-full",children:[e.jsx(oe,{type:"streamline",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsx("small",{className:"font-bold leading-none",children:"Logo Icon"}),e.jsx("br",{}),e.jsxs("small",{children:["Icon size must me 400px x 400px.",e.jsx("br",{}),"Icon must be transparent and in PNG format!"]}),e.jsx(j,{className:"mt-2 block",onClick:bs,variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Manage Logo Icon"})]})})})})})]}),e.jsxs("div",{className:"flex flex-wrap mb-4",children:[e.jsx("div",{className:"w-full md:w-full mb-4 pb-4 md:mb-0",children:e.jsx("strong",{children:"Primary Logo"})}),e.jsx("div",{className:"w-full md:w-full mb-4 md:mb-0",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 xl:grid-cols-4 gap-4 mb-5",children:[e.jsx(N,{children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2 w-full",children:[e.jsx(oe,{type:"streamline",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsx("small",{className:"font-bold leading-none",children:"Logo Icon (Light Mode)"}),e.jsx("br",{}),e.jsxs("small",{children:["Image must be 48px x 64px.",e.jsx("br",{}),"Logo must be transparent and in PNG format!"]}),e.jsx(j,{onClick:cs,className:"mt-2 block",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Logo Icon"})]})})}),e.jsx(N,{children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2 w-full",children:[e.jsx(oe,{type:"full",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsx("small",{className:"font-bold leading-none",children:"Full Size Logo (Light Mode)"}),e.jsx("br",{}),e.jsxs("small",{children:["Image must be 300px x 120px.",e.jsx("br",{}),"Logo must be transparent and in PNG format!"]}),e.jsx(j,{onClick:Ze,className:"mt-2 block",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Logo"})]})})}),e.jsx(N,{className:"bg-gray-900 text-white",children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2 w-full",children:[e.jsx(oe,{type:"streamline",mode:"dark",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsx("small",{className:"font-bold leading-none",children:"Logo Icon (Dark Mode)"}),e.jsx("br",{}),e.jsxs("small",{children:["Image must be 48px x 64px.",e.jsx("br",{}),"Logo must be transparent and in PNG format!"]}),e.jsx(j,{onClick:xs,className:"mt-2 block",variant:"twoTone",size:"xs",icon:e.jsx(E,{}),children:"Add New Logo Icon"})]})})}),e.jsx(N,{className:"bg-gray-900 text-white",children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2 w-full",children:[e.jsx(oe,{type:"full",mode:"dark",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsx("small",{className:"font-bold leading-none",children:"Full Size Logo (Dark Mode)"}),e.jsx("br",{}),e.jsxs("small",{children:["Image must be 300px x 120px.",e.jsx("br",{}),"Logo must be transparent and in PNG format!"]}),e.jsx(j,{onClick:gs,className:"mt-2 block",variant:"twoTone",size:"xs",icon:e.jsx(E,{}),children:"Add New Logo"})]})})})]})})]})]})}),e.jsx(he,{value:"colors",children:e.jsx(Xs,{initialValues:{fieldA:(ee==null?void 0:ee.settingType)||"",fieldB:Ae[600],fieldC:getComputedStyle(document.documentElement).getPropertyValue("--secondary-600").trim()||""},validationSchema:Ca,onSubmit:async i=>{Ms(i==null?void 0:i.fieldB,i==null?void 0:i.fieldC,i==null?void 0:i.fieldA)},children:({values:i,touched:r,errors:y,isSubmitting:H})=>e.jsx(Ys,{children:e.jsxs(Ws,{children:[e.jsxs("div",{className:"flex flex-wrap mb-4",children:[e.jsx("div",{className:"w-1/3 md:w-1/3 my-auto",children:"Site name"}),e.jsx("div",{className:"w-2/3 md:w-2/3 my-auto",children:e.jsx(Ne,{className:"my-auto",invalid:y.fieldA&&r.fieldA,errorMessage:y.fieldA,children:e.jsx(ze,{type:"text",name:"fieldA",placeholder:"Site Name",component:A})})})]}),e.jsxs("div",{className:"flex flex-wrap mb-4 mt-4",children:[e.jsxs("div",{className:"w-1/3 md:w-1/3 my-auto",children:["Primary Color",e.jsx("br",{}),e.jsx("small",{className:"text-gray-400",children:"Applies as main theme color"})]}),e.jsxs("div",{className:"w-2/3 md:w-2/3 my-auto",children:[e.jsx(Ne,{className:"my-auto mt-3",invalid:y.fieldB&&r.fieldB,errorMessage:y.fieldB,children:e.jsx(ze,{name:"fieldB",children:({field:w,form:W})=>{const ce=getComputedStyle(document.documentElement).getPropertyValue("--custom-600").trim()||"#000000";return e.jsx("input",{type:"color",name:"fieldB",value:w.value||ce,onChange:de=>W.setFieldValue("fieldB",de.target.value),className:"w-16 h-10 p-0 border border-gray-300 rounded"})}})}),e.jsx("div",{className:"my-2 mt-6",children:e.jsxs("div",{className:"grid grid-cols-11 lg:grid-cols-11 xl:grid-cols-11 gap-1 mb-5 h-20",children:[e.jsx("div",{className:"bg-custom-50 h-20"}),e.jsx("div",{className:"bg-custom-100 h-20"}),e.jsx("div",{className:"bg-custom-200 h-20"}),e.jsx("div",{className:"bg-custom-300 h-20"}),e.jsx("div",{className:"bg-custom-400 h-20"}),e.jsx("div",{className:"bg-custom-500 h-20"}),e.jsx("div",{className:"flex bg-custom-600 text-white uppercase text-xs text-center align-center my-auto h-full",children:e.jsx("div",{className:"align-center align-middle h-full w-full content-center",children:"Primary"})}),e.jsx("div",{className:"bg-custom-700 h-20"}),e.jsx("div",{className:"bg-custom-800 h-20"}),e.jsx("div",{className:"bg-custom-900 h-20"}),e.jsx("div",{className:"bg-custom-950 h-20"})]})}),e.jsx("div",{className:"my-2",children:e.jsx("small",{children:"Once a Primary color has been chosen, the system will generate all other color variations for you. "})})]})]}),e.jsxs("div",{className:"flex flex-wrap mb-4 mt-4",children:[e.jsxs("div",{className:"w-1/3 md:w-1/3 my-auto",children:["Secondary Color ",e.jsx("br",{}),e.jsx("small",{className:"text-gray-400",children:"Applies as sidebar color"})," "]}),e.jsxs("div",{className:"w-2/3 md:w-2/3 my-auto",children:[e.jsx(Ne,{className:"my-auto mt-3",children:e.jsx(ze,{name:"fieldC",children:({field:w,form:W})=>{const ce=getComputedStyle(document.documentElement).getPropertyValue("--secondary-600").trim()||"#000000";return e.jsx("input",{type:"color",name:"fieldC",value:w.value||ce,onChange:de=>W.setFieldValue("fieldC",de.target.value),className:"w-16 h-10 p-0 border border-gray-300 rounded"})}})}),e.jsx("div",{className:"my-2 mt-6",children:e.jsx("div",{className:"grid grid-cols-11 lg:grid-cols-11 xl:grid-cols-11 gap-1 mb-5 h-20",children:[50,100,200,300,400,500,600,700,800,900,950].map(w=>e.jsx("div",{style:{backgroundColor:`var(--secondary-${w})`},className:`h-20 flex items-center justify-center${w===600?" text-white uppercase text-xs text-center":""}`,children:w===600&&e.jsx("span",{className:"content-center w-full text-center",children:"Secondary"})},w))})}),e.jsx("div",{className:"my-2",children:e.jsx("small",{children:"Once a Secondary color has been chosen, the system will generate all other color variations for you."})})]})]}),e.jsx(Ne,{children:e.jsx(j,{variant:"solid",type:"submit",children:"Submit"})})]})})})}),e.jsx(he,{value:"login",children:e.jsxs("div",{className:"flex flex-wrap mb-4",children:[e.jsxs("div",{className:"w-full md:w-full mb-4 pb-4 md:mb-0 flex justify-between",children:[e.jsx("div",{className:"flex-start",children:e.jsx("strong",{children:"Layout"})}),e.jsx("div",{className:"flex-end",children:e.jsx(Us,{size:"xl",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:k,onChange:i=>$(i),options:[{label:"Admin Portal",value:"Admin"},{label:"Customer Portal",value:"Customer"}]})})]}),e.jsx("div",{className:"w-full md:w-full mb-4 md:mb-0",children:e.jsx(we.Group,{value:I,onChange:ks,children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-5",children:[e.jsxs("div",{className:"flex justify-center",children:[" ",e.jsxs(N,{className:"w-full max-w-xs",children:[" ",e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("img",{src:"/img/theme/login_center.jpg",className:"border mb-2"}),e.jsx(we,{value:"center_layout",name:"simpleRadioExample",children:"Center Layout"})]})]})]}),e.jsx("div",{className:"flex justify-center",children:e.jsx(N,{className:"w-full max-w-xs",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("img",{src:"/img/theme/login_side.jpg",className:"border mb-2"}),e.jsx(we,{value:"side_layout",name:"simpleRadioExample",children:"Side Layout"})]})})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(N,{className:"w-full max-w-xs",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("img",{src:"/img/theme/login_side_wide.jpg",className:"border mb-2"}),e.jsx(we,{value:"cover_layout",name:"simpleRadioExample",children:"Cover Layout"})]})})})]})})}),I==="side_layout"&&k.value==="Admin"&&e.jsxs("div",{className:"w-full flex flex-col md:flex-row gap-4 mb-4 pb-4",children:[e.jsxs("div",{className:"w-full md:w-1/2 mb-4 pb-4",children:[e.jsx("strong",{children:"Background - Side Layout"}),e.jsxs(N,{className:"mt-4 p-4",children:[Fe.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Fe.url,type:"video/mp4"})}):e.jsx("img",{src:Fe.url,alt:"Side Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video as a background, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 640×940."]})}),e.jsx(j,{onClick:Je,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),e.jsxs("div",{className:"w-full md:w-1/2 mb-4 pb-4",children:[e.jsx("strong",{children:"Side Layout Texts"}),e.jsxs(N,{className:"mt-4 p-4 h-[95%]",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Primary Text"}),e.jsx(A,{value:X.side.heading,onChange:i=>ne(r=>({...r,side:{...r.side,heading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Secondary Text"}),e.jsx(A,{value:X.side.subheading,onChange:i=>ne(r=>({...r,side:{...r.side,subheading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Description"}),e.jsx(A,{textArea:!0,rows:6,value:X.side.description,onChange:i=>ne(r=>({...r,side:{...r.side,description:i.target.value}}))})]}),e.jsx(j,{variant:"solid",size:"sm",onClick:()=>{pe({type:"side",loginTexts:X,settingType:_})},children:"Save Changes"})]})]})]}),I==="center_layout"&&k.value==="Admin"&&e.jsxs("div",{className:"w-1/2 md:w-1/2 mb-4 pb-4 md:mb-0",children:[e.jsx("div",{className:"w-full md:w-full mb-4 pb-4 md:mb-0",children:e.jsx("strong",{children:"Background - Center Layout"})}),e.jsxs(N,{children:[Pe.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Pe.url,type:"video/mp4"})}):e.jsx("img",{src:Pe.url,alt:"Center Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 1024×768 or 1920×1080."]})}),e.jsx(j,{onClick:Xe,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),I==="cover_layout"&&k.value==="Admin"&&e.jsxs("div",{className:"w-full flex flex-col md:flex-row gap-4 mb-4 pb-4",children:[e.jsxs("div",{className:"w-full md:w-full flex-1 mb-4 pb-4 md:mb-0",children:[e.jsx("strong",{children:"Background - Cover Layout"}),e.jsxs(N,{children:[Be.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Be.url,type:"video/mp4"})}):e.jsx("img",{src:Be.url,alt:"Cover Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 640×940."]})}),e.jsx(j,{onClick:We,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),e.jsxs("div",{className:"w-full md:w-full flex-1 mb-4 pb-4 md:mb-0",children:[e.jsx("strong",{children:"Cover Layout Texts"}),e.jsxs(N,{className:"mt-4 p-4 h-[95%]",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Primary Text"}),e.jsx(A,{value:X.cover.heading,onChange:i=>ne(r=>({...r,cover:{...r.cover,heading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Secondary Text"}),e.jsx(A,{value:X[I==="side_layout"?"side":"cover"].subheading,onChange:i=>ne(r=>({...r,[I==="side_layout"?"side":"cover"]:{...r[I==="side_layout"?"side":"cover"],subheading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Description"}),e.jsx(A,{textArea:!0,rows:6,value:X.cover.description,onChange:i=>ne(r=>({...r,cover:{...r.cover,description:i.target.value}}))})]}),e.jsx(j,{variant:"solid",size:"sm",onClick:()=>{pe({type:"cover",loginTexts:X,settingType:D})},children:"Save Changes"})]})]})]}),I==="side_layout"&&k.value==="Customer"&&e.jsxs("div",{className:"w-full flex flex-col md:flex-row gap-4 mb-4 pb-4",children:[e.jsxs("div",{className:"w-full md:w-1/2 mb-4 pb-4",children:[e.jsx("strong",{children:"Background - Side Layout"}),e.jsxs(N,{className:"mt-4 p-4",children:[Re.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Re.url,type:"video/mp4"})}):e.jsx("img",{src:Re.url,alt:"Side Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video as a background, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 640×940."]})}),e.jsx(j,{onClick:Je,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),e.jsxs("div",{className:"w-full md:w-1/2 mb-4 pb-4",children:[e.jsx("strong",{children:"Side Layout Texts"}),e.jsxs(N,{className:"mt-4 p-4 h-[95%]",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Primary Text"}),e.jsx(A,{value:Y.side.heading,onChange:i=>re(r=>({...r,side:{...r.side,heading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Secondary Text"}),e.jsx(A,{value:Y.side.subheading,onChange:i=>re(r=>({...r,side:{...r.side,subheading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Description"}),e.jsx(A,{textArea:!0,rows:6,value:Y.side.description,onChange:i=>re(r=>({...r,side:{...r.side,description:i.target.value}}))})]}),e.jsx(j,{variant:"solid",size:"sm",onClick:()=>{pe({type:"side",loginTexts:Y,settingType:L})},children:"Save Changes"})]})]})]}),I==="center_layout"&&k.value==="Customer"&&e.jsxs("div",{className:"w-1/2 md:w-1/2 mb-4 pb-4 md:mb-0",children:[e.jsx("div",{className:"w-full md:w-full mb-4 pb-4 md:mb-0",children:e.jsx("strong",{children:"Background - Center Layout"})}),e.jsxs(N,{children:[Ee.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Ee.url,type:"video/mp4"})}):e.jsx("img",{src:Ee.url,alt:"Center Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 1024×768 or 1920×1080."]})}),e.jsx(j,{onClick:Xe,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),I==="cover_layout"&&k.value==="Customer"&&e.jsxs("div",{className:"w-full flex flex-col md:flex-row gap-4 mb-4 pb-4",children:[e.jsxs("div",{className:"w-full md:w-full flex-1 mb-4 pb-4 md:mb-0",children:[e.jsx("strong",{children:"Background - Cover Layout"}),e.jsxs(N,{children:[Oe.type==="video"?e.jsx("video",{muted:!0,loop:!0,controls:!0,className:"w-full rounded",children:e.jsx("source",{src:Oe.url,type:"video/mp4"})}):e.jsx("img",{src:Oe.url,alt:"Cover Background",className:"w-full rounded border"}),e.jsx("div",{className:"mt-2 text-sm opacity-70",children:e.jsxs("small",{children:["Background image can be a static image (jpg/png) or a video (mp4/mov).",e.jsx("br",{}),"If using a video, it should be 1920×1080.",e.jsx("br",{}),"If using an image, it should be 640×940."]})}),e.jsx(j,{onClick:We,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Background"})]})]}),e.jsxs("div",{className:"w-full md:w-full flex-1 mb-4 pb-4 md:mb-0",children:[e.jsx("strong",{children:"Cover Layout Texts"}),e.jsxs(N,{className:"mt-4 p-4 h-[95%]",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Primary Text"}),e.jsx(A,{value:Y.cover.heading,onChange:i=>re(r=>({...r,cover:{...r.cover,heading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Secondary Text"}),e.jsx(A,{value:Y[I==="side_layout"?"side":"cover"].subheading,onChange:i=>re(r=>({...r,[I==="side_layout"?"side":"cover"]:{...r[I==="side_layout"?"side":"cover"],subheading:i.target.value}}))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block font-medium mb-1",children:"Description"}),e.jsx(A,{textArea:!0,rows:6,value:Y.cover.description,onChange:i=>re(r=>({...r,cover:{...r.cover,description:i.target.value}}))})]}),e.jsx(j,{variant:"solid",size:"sm",onClick:()=>{pe({type:"cover",loginTexts:Y,settingType:C})},children:"Save Changes"})]})]})]})]})}),e.jsx(he,{value:"emails",children:e.jsxs("div",{className:"w-full flex gap-4",children:[e.jsxs("div",{className:"w-1/5 mb-4 pb-4 md:mb-0",children:[e.jsxs("div",{className:"pb-2",children:[" ",e.jsx("strong",{children:"Email Logo"})]}),e.jsx("div",{className:"w-full md:w-full mb-4 md:mb-0",children:e.jsx("div",{className:"grid grid-cols-1 gap-4 mb-5",children:e.jsx(N,{children:e.jsx("div",{className:"flex gap-4",children:e.jsxs("div",{className:"mb-2",children:[e.jsx(oe,{type:"full",imgClass:"mx-auto p-10",className:"h-[125px]"}),e.jsxs("div",{children:[e.jsx("small",{className:"font-bold leading-none",children:"Full Size Logo (Light Mode)"}),e.jsx("br",{}),e.jsxs("small",{children:["Image must be 300px x 120px.",e.jsx("br",{}),"Logo must be transparent and in PNG format!"]})]}),e.jsx(j,{onClick:Ze,className:"mt-2",variant:"solid",size:"xs",icon:e.jsx(E,{}),children:"Add New Logo"})]})})})})})]}),e.jsxs("div",{className:"w-3/5 mb-4 pb-4 md:mb-0",children:[e.jsxs("div",{className:"pb-2",children:[" ",e.jsx("strong",{children:"Email Messages"})]}),Ls.map((i,r)=>e.jsxs("div",{className:"border border-gray-300 rounded-md mb-1",children:[e.jsxs("button",{className:`w-full flex justify-between items-center text-left p-4 hover:bg-gray-100 focus:outline-none ${be===r?"bg-gray-50 border-b-2":""}`,onClick:()=>As(r),children:[e.jsxs("h3",{className:"font-semibold text-sm",children:[i.title," "]}),e.jsx("span",{children:be===r?e.jsx(Hs,{size:24}):e.jsx($s,{size:24})})]}),e.jsx("div",{className:`overflow-hidden transition-all duration-300 ${be===r?"max-h-screen p-2":"max-h-0 p-0"}`,children:e.jsxs("div",{className:"w-full p-4",children:[e.jsxs("div",{className:"flex w-full md:w-full mb-2",children:[e.jsx("div",{className:"w-1/4 my-auto",children:"Subject"}),e.jsx("div",{className:"w-3/4",children:e.jsx(A,{placeholder:i.subject})})]}),e.jsxs("div",{className:"flex w-full md:w-full mb-2",children:[e.jsx("div",{className:"w-1/4",children:"Message"}),e.jsx("div",{className:"w-3/4",children:e.jsx(Vs,{className:"msg-editor",value:i.message})})]}),i.button&&e.jsxs("div",{className:"flex w-full md:w-full mb-2",children:[e.jsx("div",{className:"w-1/4 my-auto",children:"Button Text"}),e.jsx("div",{className:"w-3/4",children:e.jsx(A,{placeholder:i.button})})]}),e.jsxs("div",{className:"flex w-full md:w-full mt-6",children:[e.jsx("div",{className:"w-1/4 my-auto"}),e.jsx("div",{className:"w-3/4",children:e.jsx(j,{variant:"solid",children:"Save Changes"})})]})]})})]},r))]}),e.jsxs("div",{className:"w-1/5 mb-4 pb-4 md:mb-0",children:[e.jsxs("div",{className:"pb-2",children:[" ",e.jsx("strong",{children:"Email Variables"})]}),e.jsx("div",{className:"w-full md:w-full mb-4 md:mb-0",children:e.jsx("div",{className:"grid grid-cols-1 gap-4 mb-5",children:e.jsxs(N,{children:[e.jsx("div",{className:"flex gap-4 text-sm",children:"Below are the variables that can be used in the email messages."}),e.jsxs("div",{className:"py-4",children:[e.jsx("div",{className:"py-1",children:"[activation_code]"}),e.jsx("div",{className:"py-1",children:"[email]"}),e.jsx("div",{className:"py-1",children:"[first_name]"}),e.jsx("div",{className:"py-1",children:"[full_name]"}),e.jsx("div",{className:"py-1",children:"[last_name]"}),e.jsx("div",{className:"py-1",children:"[password]"}),e.jsx("div",{className:"py-1",children:"[reset_link]"}),e.jsx("div",{className:"py-1",children:"[site_name]"}),e.jsx("div",{className:"py-1",children:"[support_email]"})]})]})})})]})]})})]})]})}),e.jsx(ke,{label:"Manage Logo",title:"Logo Icon (Light Mode)",isOpen:a,onClose:ds,handleFileUpload:ae,settingType:Le,expectedDimensions:{width:48,height:64}}),e.jsx(ke,{label:"Manage Logo",title:"Full Size Logo (Light Mode)",isOpen:m,onClose:ms,handleFileUpload:ae,settingType:fe,expectedDimensions:{width:300,height:120}}),e.jsx(ke,{label:"Manage Logo",title:"Logo Icon (Dark Mode)",isOpen:o,onClose:hs,handleFileUpload:ae,settingType:xe,expectedDimensions:{width:48,height:64},isDark:!0}),e.jsx(ke,{label:"Manage Logo",title:"Full Size Logo (Dark Mode)",isOpen:g,onClose:fs,handleFileUpload:ae,settingType:Ie,expectedDimensions:{width:300,height:120},isDark:!0}),e.jsx(_a,{isOpen:b,onClose:ps}),e.jsx(Ue,{isOpen:x,onClose:js,handleFileUpload:ae,settingType:k.value==="Admin"?_:L}),e.jsx(Ue,{isOpen:M,onClose:vs,handleFileUpload:ae,settingType:k.value==="Admin"?D:C}),e.jsx(Ue,{isOpen:S,onClose:ys,handleFileUpload:ae,settingType:k.value==="Admin"?p:B})]})},nt=Ia;export{nt as default};
@@ -1 +0,0 @@
1
- import{j as o,p as Ln}from"./vendor-mui-69397583.js";import{r as h,e as vt,g as jn}from"./vendor-react-ece1c85f.js";import{u as Ft,a as ke,b as Vt,c as Ae}from"./useDidUpdate-25c4d4ed.js";import{b7 as Ye,b8 as Rn,b5 as dt,d as $,b9 as ue,ba as Te,bb as yt,g as bt,bc as Pn,bd as In,k as _t,be as On,Z as I,B as ft,bf as En,I as Dt,bg as be,bh as Fn,b6 as wt,bi as zt,bj as At,bk as Vn,bl as Yt,aZ as _n,bm as zn}from"./index-c62ac197.js";import{u as Be}from"./useControllableState-d0909575.js";const kt=h.createContext(null),An=kt.Provider,Ue=h.createContext({}),$t=Ue.Provider;Ue.Consumer;function xt(e){const[t,a]=h.useState(!1),[n,r]=h.useState([]),[l,i]=h.useState(null),d=h.useRef(null),f=h.useCallback((S,p)=>{r(T=>[...T,{element:S,props:p}])},[]),u=h.useCallback(S=>{r(p=>p.filter(T=>{var M;return((M=T==null?void 0:T.element)==null?void 0:M.id)!==S}))},[]),C=h.useCallback(()=>{requestAnimationFrame(()=>{var S;document.activeElement!==e.current&&(d.current=document.activeElement,(S=e.current)==null||S.focus())})},[e]),v=h.useCallback(S=>{const p=n.indexOf(S);p!==-1&&(i(p),C())},[n,C]),y=h.useCallback((S,p)=>{var T;for(let M=S;M>-1&&M<n.length;M+=p)if(!((T=n[M].props)!=null&&T.disabled))return M;return null},[n]),x=h.useCallback(S=>{if(Ye(S))i(null),C();else{let p;S===0?p=y(0,1):S===-1&&(p=y(n.length-1,-1)),Ye(p)||v(n[p])}},[n,v,C,y]),m=h.useCallback(()=>{a(!0),C()},[C]),w=h.useCallback(()=>{a(!1),i(null),requestAnimationFrame(()=>{var S;(S=d.current)==null||S.focus()})},[]);return{open:t,items:n,activeItemIndex:l,registerItem:f,unregisterItem:u,focusItemAt:x,openMenu:m,closeMenu:w}}const ht=h.forwardRef((e,t)=>{const{children:a,activeKey:n,onSelect:r,hidden:l,placement:i,menuClass:d,...f}=e,u=Ft(t),C=ke("menu-"),v=xt(u),y=S=>{const p=`rotateX(${S}deg)`;return i&&i.includes("center")?`${p} translateX(-50%)`:p},x={opacity:1,visibility:"visible",transform:y(0)},m={opacity:0,visibility:"hidden",transform:y(40)},w=m;return o.jsx(An,{value:{activeKey:n,onSelect:r},children:o.jsx($t,{value:v,children:o.jsx(Rn,{mode:"wait",children:!l&&o.jsx(dt.ul,{ref:u,id:C,initial:w,animate:x,exit:m,transition:{duration:.15,type:"tween"},className:d,...f,children:a})})})})});ht.displayName="DropdownInnerMenu";const Ke=h.createContext(null);Ke.Provider;Ke.Consumer;const $e=h.forwardRef((e,t)=>{const{asElement:a="div",children:n,className:r,disabled:l,eventKey:i,isActive:d,menuItemHeight:f=35,onSelect:u,style:C,variant:v="light",...y}=e,x="menu-item-active",m="menu-item-hoverable",w="menu-item-disabled",S=$("menu-item",`menu-item-${v}`,d&&x,l&&w,!l&&m,r),p=T=>{u&&u(i,T)};return o.jsx(a,{ref:t,className:S,style:{height:`${f}px`,...C},onClick:p,...y,children:n})});$e.displayName="BaseMenuItem";const{DEFAULT:Yn,DIVIDER:Ht,HEADER:rt,CUSTOM:ot}=Pn,Ct=h.forwardRef((e,t)=>{const{asElement:a="li",children:n,active:r,disabled:l,className:i,submenu:d,style:f,eventKey:u,onClick:C,onSelect:v,variant:y=Yn,...x}=e,{mode:m,direction:w}=ue(),S=Ft(t),p=ke("menu-item-"),T=h.useRef(null),M=h.useContext(Ke),b=h.useContext(kt),H=h.useContext(Ue),j=xt(T),q=j.open,A=r||!Ye(b==null?void 0:b.activeKey)&&(b==null?void 0:b.activeKey)===u||!Ye(M==null?void 0:M.activeKey)&&(M==null?void 0:M.activeKey)===u,U=h.useCallback(()=>{d&&(j.openMenu(),j.focusItemAt(0))},[d,j]),ee=h.useCallback(c=>{var O;v==null||v(u,c),(O=b==null?void 0:b.onSelect)==null||O.call(b,u,c)},[u,v,b]),W=h.useCallback(c=>{l||(d?U():ee(c))},[l,d,U,ee]),R=h.useCallback(()=>{d&&j.openMenu()},[d,j]),N=h.useCallback(()=>{d&&j.closeMenu()},[d,j]),D={onClick:Te(W,C)},{registerItem:s,unregisterItem:g}=H??{};if(d&&(D.onMouseOver=R,D.onMouseOut=N),h.useEffect(()=>(y!==Ht&&y!==rt&&(s==null||s(S.current,{disabled:l})),()=>{g==null||g(p)}),[s,g,S,p,l,y]),y===Ht||y===rt||y===ot)return o.jsx(a,{ref:S,id:p,style:f,className:$(`menu-item-${y}`,i),...y===ot?D:{},...x,children:(y===rt||y===ot)&&n});function k(){return h.isValidElement(n)?h.cloneElement(n):n}function L(){return d?o.jsx($t,{value:j,children:h.cloneElement(d,{ref:T,hidden:!q})}):null}return d?o.jsxs("li",{...x,style:f,className:"relative",...D,children:[o.jsxs($e,{ref:S,asElement:"div",id:p,isActive:A,eventKey:u,variant:m,className:$("dropdown-submenu-item",i),children:[o.jsx("span",{children:n}),w==="rtl"?o.jsx(yt,{}):o.jsx(bt,{})]}),L()]}):o.jsxs($e,{ref:S,asElement:"li",style:f,isActive:A,disabled:l,eventKey:u,variant:m,className:i,...D,...x,children:[k(),L()]})});Ct.displayName="DropdownItem";const St=h.forwardRef((e,t)=>{const{eventKey:a,title:n,className:r,placement:l,...i}=e,d=h.useContext(kt),f="dropdown-menu",C=$(f,l,r),v=$(f,"dropdown-submenu"),y=o.jsx(ht,{ref:t,className:v,placement:l,...i});if(d){const x=$(r);return o.jsx(Ct,{className:x,submenu:y,eventKey:a,children:n})}return o.jsx(ht,{ref:t,className:C,placement:l,...i})});St.displayName="DropdownMenu";const $n=({placement:e,children:t})=>e&&e.includes("middle-start")?o.jsxs(o.Fragment,{children:[t,o.jsx(bt,{})]}):e&&e.includes("middle-end")?o.jsxs(o.Fragment,{children:[o.jsx(yt,{}),t]}):e&&e.includes("top")?o.jsxs(o.Fragment,{children:[t,o.jsx(In,{})]}):o.jsxs(o.Fragment,{children:[t,o.jsx(_t,{})]}),Wt=h.forwardRef((e,t)=>{const{className:a,renderTitle:n,children:r,placement:l="bottom-start",disabled:i,toggleClassName:d,...f}=e,v=$("dropdown-toggle",a,d,i&&"dropdown-toggle-disabled"),y=$(v,"dropdown-toggle-default");return n?o.jsx("div",{className:v,...f,ref:t,children:n}):o.jsx("div",{ref:t,className:y,...f,children:o.jsx("span",{className:"flex items-center",children:o.jsx($n,{placement:l,children:r})})})});Wt.displayName="DropdownToggle";function st(e,t){return Array.isArray(t)?t.indexOf(e)>=0:e===t}const{BOTTOM_START:Wn}=On,Bn="click",Un="hover",Kn="context",Bt=h.forwardRef((e,t)=>{const{title:a,children:n,menuClass:r,menuStyle:l,disabled:i,renderTitle:d,placement:f=Wn,activeKey:u,toggleClassName:C,trigger:v="click",style:y,onClick:x,onMouseEnter:m,onMouseLeave:w,onContextMenu:S,onSelect:p,onOpen:T,onClose:M,onToggle:b,...H}=e,j=h.useRef(null),q=h.useRef(null),A=xt(j),U=A.open,ee=ke("dropdown-toggle-"),W=ke("base-menu-"),R=h.useCallback(z=>{const V=typeof z>"u"?!U:z,_=V?T:M;_==null||_(),b==null||b(V),V?A.openMenu():A.closeMenu()},[M,T,b,U,A]),N=h.useCallback(z=>{z.preventDefault(),!i&&R()},[i,R]),D=h.useCallback(()=>{i||R(!0)},[i,R]),s=h.useCallback(()=>{i||R(!1)},[i,R]),g=(z,V)=>{p==null||p(z,V),R(!1)};Vt(()=>R(),{triggerTarget:q,overlayTarget:j,disabled:!U,listenEscape:!1});const k={onMouseEnter:m,onMouseLeave:w},L={onClick:x,onContextMenu:S};st(Bn,v)&&(L.onClick=Te(N,L.onClick)),st(Kn,v)&&(L.onContextMenu=Te(N,S)),st(Un,v)&&(k.onMouseEnter=Te(D,m),k.onMouseLeave=Te(s,w));const c=o.jsx(Wt,{...H,...L,ref:q,id:ee,className:C,renderTitle:d,disabled:i,placement:f,children:a}),O=o.jsx(St,{ref:j,className:r,style:l,activeKey:u,hidden:!U,placement:f,id:W,onSelect:g,children:n});return o.jsx(Ke.Provider,{value:{activeKey:u},children:o.jsxs("div",{...k,ref:t,style:y,className:"dropdown",children:[c,o.jsx(Ue.Provider,{value:A,children:O})]})})});Bt.displayName="Dropdown";const Ut=Bt;Ut.Item=Ct;Ut.Menu=St;function mt({date:e,minDate:t,maxDate:a}){const n=t instanceof Date,r=a instanceof Date;if(!r&&!n)return!0;const l=I(e).endOf("month"),i=I(e).startOf("month"),d=r?i.isBefore(a):!0,f=n?l.isAfter(t):!0;return d&&f}const Mt=e=>{const{hasNext:t,hasPrevious:a,onNext:n,onPrevious:r,onNextLevel:l,label:i,nextLevelDisabled:d,nextLabel:f,previousLabel:u,preventLevelFocus:C=!1,renderCenter:v=!1,preventFocus:y,children:x,className:m,...w}=e,p=x||o.jsx("button",{className:"picker-header-label",disabled:d,tabIndex:C?-1:0,type:"button",onClick:l,onMouseDown:T=>y&&T.preventDefault(),children:i});return o.jsxs("div",{className:$("picker-header flex items-center justify-between mb-2",m),...w,children:[!v&&p,o.jsxs("div",{className:$(v&&"justify-between w-full","flex items-center rtl:flex-row-reverse"),children:[o.jsx(ft,{type:"button",variant:"plain",className:$(!a&&v&&"opacity-0 cursor-default"),size:"sm",icon:o.jsx(yt,{}),disabled:!a,"aria-label":u,onClick:r,onMouseDown:T=>y&&T.preventDefault()}),v&&p,o.jsx(ft,{type:"button",variant:"plain",className:$(!t&&v&&"opacity-0 cursor-default"),size:"sm",icon:o.jsx(bt,{}),disabled:!t,"aria-label":f,onClick:n,onMouseDown:T=>y&&T.preventDefault()})]})]})};function Gn({focusable:e,hasValue:t,selected:a,firstInMonth:n}){return e?t?a?0:-1:n?0:-1:-1}const Kt=h.forwardRef((e,t)=>{const{className:a,value:n,selected:r,weekend:l,outOfMonth:i,onMouseEnter:d,hasValue:f,firstInRange:u,lastInRange:C,inRange:v,isToday:y,firstInMonth:x,focusable:m,hideOutOfMonthDates:w,renderDay:S,disabled:p,fullWidth:T,...M}=e,{themeColor:b,primaryColorLevel:H}=ue();return o.jsx("button",{...M,ref:t,type:"button",disabled:p,tabIndex:Gn({focusable:m,hasValue:f,selected:r,firstInMonth:x}),className:$("date-picker-cell-content",p&&"date-picker-cell-disabled",y&&`border border-${b}-${H}`,l&&!p&&"date-picker-cell-weekend",i&&!p&&"date-picker-other-month",i&&w&&"d-none",!i&&!p&&!r&&"date-picker-cell-current-month",!p&&!r&&!v&&"date-picker-cell-hoverable",r&&!p&&`bg-${b}-${H} text-gray-100`,v&&!p&&!u&&!C&&!r&&`bg-${b}-${H} bg-opacity-10`,!v&&!u&&!C&&"rounded-lg",u&&!p&&"ltr:rounded-tl-lg ltr:rounded-bl-lg rtl:rounded-tr-lg rtl:rounded-br-lg",C&&!p&&"ltr:rounded-tr-lg ltr:rounded-br-lg rtl:rounded-tl-lg rtl:rounded-bl-lg",a),onMouseEnter:j=>d(n,j),children:typeof S=="function"?S(n):n==null?void 0:n.getDate()})});Kt.displayName="Day";function Fe(e,t){return I(new Date(e,1,1)).format(t)}function Xn(e){const t=e-e%10-1,a=[];for(let n=0;n<12;n+=1){const r=t+n;a.push(r)}return a}function qn(e,t="monday"){const a=new Date(e),n=a.getDay(),r=t==="sunday",l=7-(r?n+1:n);return(r&&n!==6||n!==0)&&a.setDate(a.getDate()+l),a}function Gt(e,t="monday"){const a=new Date(e),n=a.getDay()||7,r=t==="sunday",l=r?n:n-1;return(r&&n!==0||n!==1)&&a.setHours(-24*l),a}function Zn(e,t="monday"){const a=e.getMonth(),n=new Date(e.getFullYear(),a,1),r=new Date(e.getFullYear(),e.getMonth()+1,0),l=qn(r,t),i=Gt(n,t),d=[];for(;i<=l;){const f=[];for(let u=0;u<7;u+=1)f.push(new Date(i)),i.setDate(i.getDate()+1);d.push(f)}return d}function Jn(e,t="MMM"){const a=[],n=new Date(2021,0,1);for(let r=0;r<12;r+=1)a.push(I(n).locale(e).format(t)),n.setMonth(n.getMonth()+1);return a}function Qn(e,t="monday",a="dd"){const n=[],r=Gt(new Date,t);for(let l=0;l<7;l+=1)n.push(I(r).locale(e).format(a)),r.setDate(r.getDate()+1);return n}function Xt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function me(e,t){return Xt(e,t)&&e.getDate()===t.getDate()}function ea(e,t=[0,6]){return t.includes(e.getDay())}function ta(e,t){return!Xt(e,t)}function na({minDate:e,maxDate:t,disableDate:a,disableOutOfMonth:n,date:r,outOfMonth:l}){const i=t instanceof Date&&I(t).isBefore(r,"day"),d=e instanceof Date&&I(e).isAfter(r,"day"),f=typeof a=="function"&&a(r);return i||d||f||!!n&&!!l}function aa(e,t){const a=Array.isArray(t)&&t.every(d=>d instanceof Date),n=a&&[I(t[0]).subtract(1,"day"),I(t[1]).add(1,"day")],r=a&&me(e,t[0]),l=a&&me(e,t[1]),i=a&&I(e).isAfter(n[0],"day")&&I(e).isBefore(n[1],"day");return{firstInRange:r,lastInRange:l,inRange:i,selectedInRange:r||l}}function Lt(e){const{date:t,month:a,hasValue:n,minDate:r,maxDate:l,value:i,disableDate:d,disableOutOfMonth:f,range:u,weekendDays:C}=e,v=ta(t,a),y=n&&(Array.isArray(i)?i.some(p=>me(p,t)):me(t,i)),{inRange:x,lastInRange:m,firstInRange:w,selectedInRange:S}=aa(t,u);return{disabled:na({minDate:r,maxDate:l,disableDate:d,disableOutOfMonth:f,date:t,outOfMonth:v}),weekend:ea(t,C),selectedInRange:S,selected:y,inRange:x,firstInRange:w,lastInRange:m,outOfMonth:v}}const Oe=()=>!1,qt=h.forwardRef((e,t)=>{const{className:a,month:n,value:r,onChange:l,disableOutOfMonth:i=!1,locale:d,dayClassName:f,dayStyle:u,minDate:C,maxDate:v,disableDate:y,onDayMouseEnter:x,range:m,hideWeekdays:w=!1,fullWidth:S=!1,preventFocus:p=!1,focusable:T=!0,firstDayOfWeek:M="monday",onDayKeyDown:b,daysRefs:H,hideOutOfMonthDates:j=!1,isDateInRange:q=Oe,isDateFirstInRange:A=Oe,isDateLastInRange:U=Oe,renderDay:ee,weekdayLabelFormat:W,weekendDays:R=[0,6],...N}=e,{locale:D}=ue(),s=d||D,g=Zn(n,M),k=Qn(s,M,W).map(_=>o.jsx("th",{className:"week-day-cell",children:o.jsx("span",{className:"week-day-cell-content",children:_})},_)),L=Array.isArray(r)?r.every(_=>_ instanceof Date):r instanceof Date,c=r instanceof Date&&I(r).isAfter(I(n).startOf("month"))&&I(r).isBefore(I(n).endOf("month")),O={month:n,hasValue:L,minDate:C,maxDate:v,value:r,disableDate:y,disableOutOfMonth:i,range:m,weekendDays:R},z=h.useMemo(()=>g.flatMap(_=>_).find(_=>{const G=Lt({...O,date:_});return!G.disabled&&!G.outOfMonth})||I(n).startOf("month").toDate(),[]),V=g.map((_,G)=>{const Q=_.map((P,E)=>{const F=Lt({...O,date:P}),ne={rowIndex:G,cellIndex:E,date:P};return o.jsx("td",{className:$("date-picker-cell"),children:o.jsx(Kt,{ref:X=>{H&&(Array.isArray(H[G])||(H[G]=[]),H[G][E]=X)},outOfMonth:F.outOfMonth,weekend:F.weekend,inRange:F.inRange||q(P,F),firstInRange:F.firstInRange||A(P,F),lastInRange:F.lastInRange||U(P,F),firstInMonth:me(P,z),selected:F.selected||F.selectedInRange,hasValue:c,className:typeof f=="function"?f(P,F):"",style:typeof u=="function"?u(P,F):{},disabled:F.disabled,fullWidth:S,focusable:T,hideOutOfMonthDates:j,renderDay:ee,isToday:me(P,new Date),value:P,onClick:()=>typeof l=="function"&&l(P),onMouseDown:X=>p&&X.preventDefault(),onKeyDown:X=>typeof b=="function"&&b(ne,X),onMouseEnter:typeof x=="function"?x:Oe})},E)});return o.jsx("tr",{className:$("date-picker-week-cell"),children:Q},G)});return o.jsxs("table",{ref:t,className:$("picker-table",a),cellSpacing:"0",...N,children:[!w&&o.jsx("thead",{children:o.jsx("tr",{children:k})}),o.jsx("tbody",{children:V})]})});qt.displayName="Month";function de(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}function jt({month:e,locale:t,format:a}){return de(I(e).locale(t).format(a))}const ra=e=>{const{dateViewCount:t,paginateBy:a,month:n,locale:r,minDate:l,maxDate:i,enableHeaderLabel:d,daysRefs:f,onMonthChange:u,onNextLevel:C,onDayKeyDown:v,className:y,labelFormat:x,weekdayLabelFormat:m,preventFocus:w,renderDay:S,...p}=e,T=I(n).add(t,"months").toDate(),M=I(n).subtract(1,"months").toDate(),{themeColor:b,primaryColorLevel:H}=ue(),j=`picker-header-label hover:text-${b}-${H}`,q=Array(t).fill(0).map((A,U)=>{const ee=I(n).add(U,"months").toDate();return o.jsxs("div",{className:"day-picker",children:[o.jsx(Mt,{hasNext:U+1===t&&mt({date:T,minDate:l,maxDate:i}),hasPrevious:U===0&&mt({date:M,minDate:l,maxDate:i}),className:y,renderCenter:t>1,onNext:()=>u(I(n).add(a,"months").toDate()),onPrevious:()=>u(I(n).subtract(a,"months").toDate()),children:o.jsxs("div",{children:[o.jsx("button",{className:$(j),disabled:!d,tabIndex:U>0?-1:0,onClick:()=>C("month"),onMouseDown:W=>w&&W.preventDefault(),type:"button",children:jt({month:ee,locale:r,format:(x==null?void 0:x.month)||"MMM"})}),o.jsx("button",{className:$(j),disabled:!d,tabIndex:U>0?-1:0,onClick:()=>C("year"),onMouseDown:W=>w&&W.preventDefault(),type:"button",children:jt({month:ee,locale:r,format:(x==null?void 0:x.year)||"YYYY"})})]})}),o.jsx(qt,{month:ee,daysRefs:f.current[U],minDate:l,maxDate:i,className:y,locale:r,focusable:U===0,preventFocus:w,renderDay:S,weekdayLabelFormat:m,onDayKeyDown:(...W)=>v(U,...W),...p})]},U)});return o.jsx(o.Fragment,{children:q})},oa=e=>{const{className:t,value:a,onChange:n,locale:r,year:l,onYearChange:i,onNextLevel:d,minDate:f,maxDate:u,preventFocus:C,monthLabelFormat:v="MMM",yearLabelFormat:y="YYYY",...x}=e,{themeColor:m,primaryColorLevel:w}=ue(),S=Jn(r,v),p=f instanceof Date?f.getFullYear():void 0,T=u instanceof Date?u.getFullYear():void 0,M=S.map((b,H)=>{const j=!mt({date:new Date(l,H),minDate:f,maxDate:u}),q=H===a.month&&l===a.year;return o.jsx("button",{className:$("year-picker-cell",q&&!j&&`bg-${m}-${w} text-white month-picker-cell-active`,!q&&!j&&"hover:bg-gray-100",j&&"month-picker-cell-disabled"),disabled:j,onClick:()=>n(H),onMouseDown:A=>C&&A.preventDefault(),type:"button",children:b},b)});return o.jsxs("div",{className:$("month-picker",t),...x,children:[o.jsx(Mt,{label:Fe(l,y),hasNext:typeof T=="number"?l<T:!0,hasPrevious:typeof p=="number"?l>p:!0,className:t,nextLabel:"Next year",previousLabel:"Previous year",preventFocus:C,onNext:()=>i(l+1),onPrevious:()=>i(l-1),onNextLevel:d}),o.jsx("div",{className:"month-table",children:M})]})},sa=e=>{const{className:t,value:a,onChange:n,minYear:r,maxYear:l,preventFocus:i,yearLabelFormat:d="YYYY",...f}=e,{themeColor:u,primaryColorLevel:C}=ue(),[v,y]=h.useState(a),x=Xn(v),m=x.map(w=>{const S=w<r||w>l,p=w===a;return o.jsx("button",{disabled:S,className:$("year-picker-cell",p&&!S&&`bg-${u}-${C} text-white year-picker-cell-active`,!p&&!S&&"hover:bg-gray-100",S&&"year-picker-cell-disabled"),onClick:()=>n(w),onMouseDown:T=>i&&T.preventDefault(),type:"button",children:Fe(w,d)},w)});return o.jsxs("div",{className:$("year-picker",t),...f,children:[o.jsx(Mt,{nextLevelDisabled:!0,label:`${Fe(x[0],d)} - ${Fe(x[x.length-1],d)}`,hasPrevious:typeof r=="number"?r<x[0]:!0,hasNext:typeof l=="number"?l>x[x.length-1]:!0,nextLabel:"Next decade",previousLabel:"Previous decade",preventFocus:i,onNext:()=>y(w=>w+10),onPrevious:()=>y(w=>w-10)}),o.jsx("div",{className:"year-table",children:m})]})},Tt=h.forwardRef((e,t)=>{const{className:a,dateViewCount:n=1,dayClassName:r,dayStyle:l,defaultMonth:i,defaultView:d="date",disableDate:f,disableOutOfMonth:u,enableHeaderLabel:C=!0,firstDayOfWeek:v="monday",hideOutOfMonthDates:y,hideWeekdays:x,isDateFirstInRange:m,isDateInRange:w,isDateLastInRange:S,labelFormat:p={month:"MMM",year:"YYYY"},locale:T,maxDate:M,minDate:b,month:H,monthLabelFormat:j="MMM",onChange:q,onDayMouseEnter:A,onMonthChange:U,paginateBy:ee=n,preventFocus:W,range:R,renderDay:N,style:D,value:s,weekdayLabelFormat:g="dd",weekendDays:k,yearLabelFormat:L="YYYY",...c}=e,{locale:O}=ue(),[z,V]=h.useState(d),_=T||O,G=h.useRef(Array(n).fill(0).map(()=>[])),[Q,P]=Be({prop:H,defaultProp:i!==void 0?i:new Date,onChange:U}),[E,F]=h.useState(Q==null?void 0:Q.getFullYear()),[ne,X]=h.useState(Q==null?void 0:Q.getMonth()),se=b instanceof Date?b.getFullYear():100,he=M instanceof Date?M.getFullYear():1e4,le=6,B=(K,ae,oe,Z=1)=>{const re=["down","up"].includes(K),ie=re?oe.rowIndex+(K==="down"?Z:-Z):oe.rowIndex,ce=re?oe.cellIndex:oe.cellIndex+(K==="right"?Z:-Z),pe=G.current[ae][ie][ce];pe&&(pe.disabled?B(K,ae,oe,Z+1):pe.focus())},te=(K,ae,oe)=>{var Z;switch(oe.key){case"ArrowDown":{oe.preventDefault(),ae.rowIndex+1<G.current[K].length&&B("down",K,ae);break}case"ArrowUp":{oe.preventDefault(),ae.rowIndex>0&&B("up",K,ae);break}case"ArrowRight":{oe.preventDefault(),ae.cellIndex!==le?B("right",K,ae):K+1<n&&G.current[K+1][ae.rowIndex]&&((Z=G.current[K+1][ae.rowIndex][0])==null||Z.focus());break}case"ArrowLeft":{oe.preventDefault(),ae.cellIndex!==0?B("left",K,ae):K>0&&G.current[K-1][ae.rowIndex]&&G.current[K-1][ae.rowIndex][le].focus();break}}};return o.jsxs("div",{ref:t,className:$("picker-view",a),...c,children:[z==="year"&&o.jsx(sa,{value:E,minYear:se,maxYear:he,className:a,preventFocus:W,yearLabelFormat:L,onChange:K=>{P(new Date(K,ne,1)),F(K),V("date")}}),z==="month"&&o.jsx(oa,{value:{month:Q.getMonth(),year:Q.getFullYear()},year:E,locale:_,minDate:b,maxDate:M,className:a,style:D,preventFocus:W,yearLabelFormat:L,monthLabelFormat:j,onYearChange:F,onNextLevel:()=>V("year"),onChange:K=>{P(new Date(E,K,1)),X(K),V("date")}}),z==="date"&&o.jsx(ra,{dateViewCount:n,paginateBy:ee,month:Q,locale:_,minDate:b,maxDate:M,enableHeaderLabel:C,daysRefs:G,style:D,dayClassName:r,dayStyle:l,disableOutOfMonth:u,disableDate:f,hideWeekdays:x,preventFocus:W,firstDayOfWeek:v,value:s,range:R,labelFormat:p,weekdayLabelFormat:g,renderDay:N,hideOutOfMonthDates:y,isDateInRange:w,isDateFirstInRange:m,isDateLastInRange:S,weekendDays:k,onMonthChange:P,onNextLevel:K=>V(K),onDayKeyDown:te,onChange:q,onDayMouseEnter:A})]})});Tt.displayName="CalendarBase";const Zt=e=>{const{multipleSelection:t,value:a,onChange:n,...r}=e,l=i=>{if(!t)return n==null?void 0:n(i);const d=a==null?void 0:a.some(f=>me(f,i));return n==null?void 0:n(d?a==null?void 0:a.filter(f=>!me(f,i)):[...a,i])};return o.jsx(Tt,{value:a,onChange:l,...r})},la=h.forwardRef((e,t)=>{const{className:a,onRemovefilter:n,title:r="Filter By",tagId:l,value:i,...d}=e;return o.jsxs("span",{className:"filter-pill mr-2",children:[r," : ",i," ",o.jsx("span",{className:"pl-1 pr-1",children:"|"})," ",o.jsx("span",{className:"filter-pill-close",onClick:()=>n(l),children:"×"})]})});la.displayName="Tag";var Jt={exports:{}};(function(e,t){(function(a,n){e.exports=n()})(vt,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,r,l){var i=r.prototype,d=i.format;l.en.formats=a,i.format=function(f){f===void 0&&(f="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,C=function(v,y){return v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,m,w){var S=w&&w.toUpperCase();return m||y[w]||a[w]||y[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,T,M){return T||M.slice(1)})})}(f,u===void 0?{}:u);return d.call(this,C)}}})})(Jt);var ia=Jt.exports;const ca=jn(ia);I.extend(ca);const Ge=h.forwardRef((e,t)=>{const{className:a,clearable:n=!0,clearButton:r,children:l,disabled:i,dropdownOpened:d,inputtable:f,inputtableBlurClose:u=!0,inputLabel:C,inputPrefix:v,inputSuffix:y=o.jsx(Fn,{className:"text-lg"}),name:x,onDropdownOpen:m,onDropdownClose:w,onBlur:S,onFocus:p,onChange:T,onKeyDown:M,onClear:b,placeholder:H,setDropdownOpened:j,size:q,type:A,form:U,field:ee}=e,W=()=>{f?s():D()},R=()=>{j(!1),w==null||w()},N=n?r?o.jsx("div",{role:"presentation",onClick:b,children:r}):o.jsx(wt,{className:"text-base",onClick:b}):o.jsx(o.Fragment,{children:y}),D=()=>{j(!d),d?w==null||w():m==null||m()},s=()=>{j(!0),m==null||m()},g=_=>{typeof M=="function"&&M(_),(_.key==="Space"||_.key==="Enter")&&!f&&(_.preventDefault(),s())},k=_=>{typeof S=="function"&&S(_),f&&u&&R()},L=_=>{typeof p=="function"&&p(_),f&&s()},c=h.useRef(null),O=h.useRef(null),{styles:z,attributes:V}=En(c.current,O.current,{placement:"bottom-start",modifiers:[{name:"offset",enabled:!0,options:{offset:[0,10]}}]});return Vt(()=>R(),{triggerTarget:c,overlayTarget:O,disabled:!d,listenEscape:!1}),o.jsxs(o.Fragment,{children:[o.jsx(Dt,{ref:be(t,c),form:U,field:ee,className:a,placeholder:H,size:q,name:x,value:C,readOnly:!f,suffix:N,prefix:v,autoComplete:"off",type:A,disabled:i,asElement:"input",onClick:W,onKeyDown:g,onBlur:k,onFocus:L,onChange:T}),o.jsx("div",{ref:O,className:"picker",style:z.popper,...V.popper,children:d&&o.jsx("div",{className:"picker-panel",children:l})})]})});Ge.displayName="BasePicker";const Rt="YYYY-MM-DD",Qt=h.forwardRef((e,t)=>{const{className:a,clearable:n=!0,clearButton:r,closePickerOnChange:l=!0,dateViewCount:i,dayClassName:d,dayStyle:f,defaultMonth:u,defaultOpen:C=!1,defaultValue:v,defaultView:y,disabled:x=!1,disableDate:m,enableHeaderLabel:w,disableOutOfMonth:S,firstDayOfWeek:p="monday",hideOutOfMonthDates:T,hideWeekdays:M,inputFormat:b,inputPrefix:H,inputSuffix:j,inputtable:q,labelFormat:A={month:"MMM",year:"YYYY"},locale:U,maxDate:ee,minDate:W,name:R="date",onBlur:N,onChange:D,onFocus:s,onDropdownClose:g,onDropdownOpen:k,openPickerOnClear:L=!1,renderDay:c,size:O,style:z,type:V,value:_,weekendDays:G,yearLabelFormat:Q,...P}=e,{locale:E}=ue(),F=U||E,ne=V==="date"?Rt:b||Rt,[X,se]=h.useState(C),he=h.useRef(null),[le,B]=h.useState(v??null),[te,K]=Be({prop:_,defaultProp:v,onChange:D}),[ae,oe]=h.useState(te||u||new Date),[Z,re]=h.useState(!1),[ie,ce]=h.useState(te instanceof Date?de(I(te).locale(F).format(ne)):""),pe=()=>{se(!1),g==null||g()},Re=()=>{se(!0),k==null||k()};h.useEffect(()=>{_===null&&!Z&&ce(""),_ instanceof Date&&!Z&&ce(de(I(_).locale(F).format(ne)))},[_,Z,E]),h.useEffect(()=>{v instanceof Date&&ie&&!Z&&ce(de(I(te).locale(F).format(ne)))},[E]);const Qe=Y=>{K(Y),ce(de(I(Y).locale(F).format(ne))),l&&pe(),window.setTimeout(()=>{var De;return(De=he.current)==null?void 0:De.focus()},0)},et=()=>{var Y;K(null),B(null),ce(""),L&&Re(),(Y=he.current)==null||Y.focus()},Pe=Y=>I(Y,ne,F).toDate(),Ie=()=>{let Y=typeof te=="string"?Pe(te):te;ee&&I(Y).isAfter(ee)&&(Y=ee),W&&I(Y).isBefore(W)&&(Y=W),I(Y).isValid()?(K(Y),B(Y),ce(de(I(Y).locale(F).format(ne))),oe(Y)):K(le)},tt=Y=>{typeof N=="function"&&N(Y),re(!1),q&&Ie()},nt=Y=>{Y.key==="Enter"&&q&&(pe(),Ie())},at=Y=>{typeof s=="function"&&s(Y),re(!0)},J=Y=>{Re();const De=Pe(Y.target.value);I(De).isValid()?(K(De),B(De),ce(Y.target.value),oe(De)):ce(Y.target.value)};return o.jsx(Ge,{ref:be(t,he),inputtable:q,dropdownOpened:X,setDropdownOpened:se,size:O,style:z,className:a,name:R,inputLabel:ie,clearable:V==="date"?!1:n&&!!te&&!x,clearButton:r,disabled:x,type:V,inputPrefix:H,inputSuffix:j,onChange:J,onBlur:tt,onFocus:at,onKeyDown:nt,onClear:et,onDropdownClose:g,onDropdownOpen:k,...P,children:o.jsx(Zt,{locale:F,month:q?ae:void 0,defaultMonth:u||(te instanceof Date?te:new Date),value:te instanceof Date?te:te&&I(te).toDate(),labelFormat:A,dayClassName:d,dayStyle:f,disableOutOfMonth:S,minDate:W,maxDate:ee,disableDate:m,firstDayOfWeek:p,preventFocus:q,dateViewCount:i,enableHeaderLabel:w,defaultView:y,hideOutOfMonthDates:T,hideWeekdays:M,renderDay:c,weekendDays:G,yearLabelFormat:Q,onMonthChange:oe,onChange:Qe})})});Qt.displayName="DatePicker";const en=h.forwardRef((e,t)=>{const{value:a,onChange:n,dayStyle:r,singleDate:l=!1,dateViewCount:i=1,paginateBy:d,...f}=e,[u,C]=h.useState(null),[v,y]=h.useState(null),x=p=>{if(v instanceof Date){if(me(p,v)&&!l)return y(null),C(null),null;const T=[p,v];return T.sort((M,b)=>M.getTime()-b.getTime()),n(T),y(null),null}return a[0]&&me(p,a[0])&&!l?(y(null),C(null),n([null,null]),null):(n([p,null]),y(p),null)},m=(p,T)=>{if(v instanceof Date&&u instanceof Date){const M=[u,v];return M.sort((b,H)=>b.getTime()-H.getTime()),!T.selected&&I(p).subtract(1,"day").isBefore(M[1])&&I(p).add(1,"day").isAfter(M[0])}return!1},w=(p,T)=>{if(v instanceof Date&&u instanceof Date){const M=[u,v];return M.sort((b,H)=>b.getTime()-H.getTime()),T.selected&&I(p).isBefore(M[1])}return!1},S=(p,T)=>{if(v instanceof Date&&u instanceof Date){const M=[u,v];return M.sort((b,H)=>b.getTime()-H.getTime()),T.selected&&I(p).isAfter(M[0])}return!1};return o.jsx(Tt,{ref:t,dayStyle:r,value:v,range:a,dateViewCount:i,paginateBy:d||i,hideOutOfMonthDates:i>1,isDateInRange:m,isDateFirstInRange:w,isDateLastInRange:S,onDayMouseEnter:p=>C(p),onChange:p=>x(p),...f})});en.displayName="RangeCalendar";const Pt=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date),ua=e=>Array.isArray(e)&&e.length===2&&e[0]instanceof Date,tn=h.forwardRef((e,t)=>{const{className:a,clearable:n=!0,clearButton:r,closePickerOnChange:l=!0,dateViewCount:i=1,dayClassName:d,dayStyle:f,defaultMonth:u,defaultOpen:C=!1,defaultValue:v,defaultView:y,disabled:x,disableDate:m,enableHeaderLabel:w,disableOutOfMonth:S,firstDayOfWeek:p="monday",hideOutOfMonthDates:T,hideWeekdays:M,inputFormat:b,inputPrefix:H,inputSuffix:j,labelFormat:q={month:"MMM",year:"YYYY"},separator:A="~",locale:U,maxDate:ee,minDate:W,onChange:R,onDropdownClose:N,onDropdownOpen:D,openPickerOnClear:s=!1,renderDay:g,singleDate:k=!1,size:L,style:c,value:O,weekendDays:z,yearLabelFormat:V,..._}=e,{locale:G}=ue(),Q=U||G,P=b||"YYYY-MM-DD",[E,F]=h.useState(C),ne=h.useRef(null),[X,se]=Be({prop:O,defaultProp:v!==void 0?v:[null,null],onChange:R}),he=Z=>{se(Z),l&&Pt(Z)&&(F(!1),N==null||N(),window.setTimeout(()=>{var re;return(re=ne.current)==null?void 0:re.focus()},0))},le=Pt(X),B=ua(X),te=X!=null&&X[0]?de(I(X[0]).locale(Q).format(P)):"",K=X!=null&&X[1]?de(I(X[1]).locale(Q).format(P)):"",ae=()=>{var Z;se([null,null]),F(!0),s&&(D==null||D()),(Z=ne.current)==null||Z.focus()},oe=Z=>{!Z&&B&&(X==null?void 0:X[1])===null&&ae(),F(Z)};return o.jsx(Ge,{ref:be(t,ne),dropdownOpened:E,setDropdownOpened:oe,size:L,style:c,className:a,inputLabel:B?`${te} ${A} ${K}`:"",clearable:n&&B,clearButton:r,disabled:x,inputPrefix:H,inputSuffix:j,onClear:ae,onDropdownClose:N,onDropdownOpen:D,..._,children:o.jsx(en,{locale:Q,defaultMonth:le?X==null?void 0:X[0]:u,value:X,labelFormat:q,dayClassName:d,dayStyle:f,disableOutOfMonth:S,minDate:W,maxDate:ee,disableDate:m,firstDayOfWeek:p,enableHeaderLabel:w,singleDate:k,dateViewCount:i,defaultView:y,hideOutOfMonthDates:T,hideWeekdays:M,renderDay:g,weekendDays:z,yearLabelFormat:V,onChange:Z=>he(Z)})})});tn.displayName="DatePickerRange";function pt(e,t,a){return Math.min(Math.max(e,t),a)}function da({amLabel:e,pmLabel:t,onChange:a,nextRef:n}){return(r,l)=>{var f,u;const i=new RegExp(`(^(${e}|${t})?$)`),d=r.toLowerCase();if(d===e||d===t){a(d),l&&((f=n==null?void 0:n.current)==null||f.focus()),l&&((u=n==null?void 0:n.current)==null||u.select());return}i.test(d)&&a(d)}}function ve(e){const t=parseInt(e,10);return t>=10?t.toString():`0${t}`}function lt(e){return Math.floor(e/10)}function it({onChange:e,nextRef:t,min:a,max:n,nextMax:r}){return(l,i,d=!1)=>{var u,C;const f=parseInt(l,10);if(!Number.isNaN(f)){if(f>lt(n)||d){const v=f%10;let y,x;f>n&&r&&v<=lt(r)?(y=ve(lt(f).toString()),x=ve(v.toString())):y=ve(pt(f,a,n).toString()),e(y,x),i&&((u=t==null?void 0:t.current)==null||u.focus()),i&&((C=t==null?void 0:t.current)==null||C.select());return}e(f.toString())}}}function fa(e,t,a,n,r,l){const i=I();let d=parseInt(e,10);const f=parseInt(t,10),u=parseInt(a,10);return Number.isNaN(d)&&(d=0),n==="12"&&(d%=12,l===r&&(d+=12)),i.hour(d).minute(Number.isNaN(f)?0:f).second(Number.isNaN(u)?0:u).millisecond(0).toDate()}function It(e,t,a,n){if(!(e instanceof Date))return{hours:"",minutes:"",seconds:"",amPm:""};let r=e.getHours();const l=r>=12;return t==="12"&&(r%=12,r===0&&(r+=12)),{hours:ve(r.toString()),minutes:ve(e.getMinutes().toString()),seconds:ve(e.getSeconds().toString()),amPm:l?n:a}}const Ve=h.forwardRef((e,t)=>{const{className:a,onFocus:n,onBlur:r,onChange:l,setValue:i,withSeparator:d=!1,max:f,min:u=0,value:C,...v}=e,[y,x]=h.useState(0),m=h.useRef(),w=b=>{var H;typeof n=="function"&&n(b),(H=m==null?void 0:m.current)==null||H.select(),x(0)},S=b=>{typeof r=="function"&&r(b),y===1&&typeof l=="function"&&l(b.currentTarget.value,!1)},p=b=>{var H;b.stopPropagation(),(H=m==null?void 0:m.current)==null||H.select()},T=b=>{if(b.key==="ArrowUp"){b.preventDefault();const H=ve(pt(parseInt(b.currentTarget.value,10)+1,u,f).toString());C!==H&&l(H,!1)}if(b.key==="ArrowDown"){b.preventDefault();const H=ve(pt(parseInt(b.currentTarget.value,10)-1,u,f).toString());C!==H&&l(H,!1)}},M=b=>{x(y+1);const H=parseInt(b.currentTarget.value,10).toString();if(H==="0"&&y===0){i("00");return}l(H,!0,y>0)};return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:be(m,t),type:"text",inputMode:"numeric",value:C,className:$("time-input-field",a),onChange:M,onClick:p,onFocus:w,onBlur:S,onKeyDown:T,...v}),d&&o.jsx("span",{children:" : "})]})});Ve.displayName="TimeInputField";const nn=h.forwardRef((e,t)=>{const{className:a,onChange:n,onFocus:r,value:l,amLabel:i,pmLabel:d,...f}=e,u=h.useRef(),C=m=>{var w;m.stopPropagation(),(w=u==null?void 0:u.current)==null||w.select()},v=m=>{(m.key==="ArrowUp"||m.key==="ArrowDown")&&(m.preventDefault(),n(l===i?d:i,!0))},y=m=>{var w;typeof r=="function"&&r(m),(w=u==null?void 0:u.current)==null||w.select()},x=m=>{const w=m.target.value.slice(-1).toLowerCase();if(w==="p"){m.preventDefault(),n(d,!0);return}if(w==="a"){m.preventDefault(),n(i,!0);return}n(l.toString(),!0)};return o.jsx("input",{ref:be(u,t),type:"text",value:l,className:$("time-input-field","am-pm-input",a),onClick:C,onFocus:y,onKeyDown:v,onChange:x,...f})});nn.displayName="AmPmInput";const He=h.forwardRef((e,t)=>{const{amLabel:a="am",amPmPlaceholder:n="am",className:r,clearable:l=!0,defaultValue:i,disabled:d=!1,format:f="24",field:u,form:C,id:v,invalid:y,name:x,nextRef:m,onChange:w,pmLabel:S="pm",prefix:p,showSeconds:T=!1,size:M="md",style:b,suffix:H=o.jsx(zt,{className:"text-lg"}),timeFieldPlaceholder:j="--",timeFieldClass:q,value:A,...U}=e,ee=ke(v),W=h.useRef(),R=h.useRef(),N=h.useRef(),D=h.useRef(),[s,g]=h.useState(It(A||i,f,a,S)),[k,L]=h.useState(A||i);Ae(()=>{g(It(k,f,a,S))},[k,f,a,S]),Ae(()=>{(A==null?void 0:A.getTime())!==(k==null?void 0:k.getTime())&&L(A)},[A]);const c=P=>{const E={...s,...P},F=fa(E.hours,E.minutes,E.seconds,f,S,E.amPm);L(F),typeof w=="function"&&w(F)},O=it({onChange:(P,E)=>{c({hours:P,minutes:E??s.minutes})},min:f==="12"?1:0,max:f==="12"?12:23,nextRef:R,nextMax:59}),z=it({onChange:(P,E)=>{c({minutes:P,seconds:E??s.seconds})},min:0,max:59,nextRef:T?N:f==="12"?D:m,nextMax:T?59:void 0}),V=it({onChange:P=>{c({seconds:P})},min:0,max:59,nextRef:f==="12"?D:m}),_=da({amLabel:a,pmLabel:S,onChange:P=>{c({amPm:P})},nextRef:m}),G=()=>{var P;g({hours:"",minutes:"",seconds:"",amPm:""}),L(null),w==null||w(null),(P=W==null?void 0:W.current)==null||P.focus()},Q=l&&k?o.jsx(wt,{onClick:G}):H;return o.jsx(Dt,{asElement:"div",invalid:y,disabled:d,style:b,className:r,size:M,prefix:p,suffix:Q,field:u,form:C,onClick:()=>{var P;return(P=W==null?void 0:W.current)==null?void 0:P.focus()},...U,children:o.jsxs("div",{className:"time-input-wrapper",children:[o.jsx(Ve,{ref:be(W,t),withSeparator:!0,value:s.hours,setValue:P=>g(E=>({...E,hours:P})),id:ee,className:q,max:f==="12"?12:23,placeholder:j,"aria-label":"hours",disabled:d,name:x,onChange:O}),o.jsx(Ve,{ref:R,value:s.minutes,setValue:P=>g(E=>({...E,minutes:P})),className:q,withSeparator:T,max:59,placeholder:j,"aria-label":"minutes",disabled:d,onChange:z}),T&&o.jsx(Ve,{ref:N,value:s.seconds,setValue:P=>g(E=>({...E,seconds:P})),className:q,max:59,placeholder:j,"aria-label":"seconds",disabled:d,onChange:V}),f==="12"&&o.jsx(nn,{ref:D,value:s.amPm,placeholder:n,amLabel:a,pmLabel:S,"aria-label":"am pm",disabled:d,onChange:_})]})})});He.displayName="TimeInput";const ha="DD-MMM-YYYY hh:mm a",an=h.forwardRef((e,t)=>{const{amPm:a=!0,className:n,clearable:r=!0,closePickerOnChange:l=!1,dateViewCount:i,dayClassName:d,dayStyle:f,defaultMonth:u,defaultOpen:C=!1,defaultValue:v,defaultView:y,disabled:x=!1,disableDate:m,enableHeaderLabel:w,disableOutOfMonth:S,firstDayOfWeek:p="monday",hideOutOfMonthDates:T,hideWeekdays:M,inputFormat:b,inputPrefix:H,inputSuffix:j,inputtable:q,labelFormat:A={month:"MMM",year:"YYYY"},locale:U,maxDate:ee,minDate:W,name:R="dateTime",okButtonContent:N="OK",onBlur:D,onChange:s,onFocus:g,onDropdownClose:k,onDropdownOpen:L,openPickerOnClear:c,renderDay:O,size:z,value:V,weekendDays:_,yearLabelFormat:G,...Q}=e,{locale:P}=ue(),E=U||P,F=b||ha,[ne,X]=h.useState(C),se=h.useRef(null),[he,le]=h.useState(v??null),[B,te]=Be({prop:V,defaultProp:v,onChange:s}),[K,ae]=h.useState(B||u||new Date),[oe,Z]=h.useState(!1),[re,ie]=h.useState(B instanceof Date?de(I(B).locale(E).format(F)):""),ce=()=>{X(!1),k==null||k()},pe=()=>{X(!0),L==null||L()};h.useEffect(()=>{V===null&&!oe&&ie(""),V instanceof Date&&!oe&&ie(I(V).locale(E).format(F))},[V,oe]);const Re=J=>{if(B)J.setHours(B.getHours()),J.setMinutes(B.getMinutes());else{const Y=new Date(Date.now());J.setHours(Y.getHours()),J.setMinutes(Y.getMinutes())}te(J),!V&&!l&&ie(I(J).locale(E).format(F)),l&&ie(de(I(J).locale(E).format(F))),l&&ce(),window.setTimeout(()=>{var Y;return(Y=se.current)==null?void 0:Y.focus()},0)},Qe=()=>{var J;te(null),le(null),ie(""),c&&pe(),(J=se.current)==null||J.focus(),s==null||s(null)},et=J=>I(J,F,E).toDate(),Pe=J=>{typeof D=="function"&&D(J),Z(!1)},Ie=J=>{typeof g=="function"&&g(J),Z(!0)},tt=J=>{pe();const Y=et(J.target.value);I(Y).isValid()?(te(Y),le(Y),l&&ie(J.target.value),ae(Y)):l&&ie(J.target.value)},nt=J=>{if(B instanceof Date&&J instanceof Date){const Y=new Date(B.getFullYear(),B.getMonth(),B.getDate(),J.getHours(),J.getMinutes(),J.getSeconds(),J.getMilliseconds());te(Y),!V&&!l&&ie(de(I(Y).locale(E).format(F))),l&&ie(de(I(Y).locale(E).format(F)))}l&&ce()},at=()=>{ie(de(I(B).locale(E).format(F))),ce(),window.setTimeout(()=>{var J;return(J=se.current)==null?void 0:J.focus()},0),s==null||s(B)};return o.jsxs(Ge,{ref:be(t,se),dropdownOpened:ne,setDropdownOpened:X,className:n,name:R,inputLabel:re,clearable:r&&!!B&&!x,disabled:x,size:z,inputPrefix:H,inputSuffix:j,onChange:tt,onBlur:Pe,onFocus:Ie,onClear:Qe,onDropdownClose:k,onDropdownOpen:L,...Q,children:[o.jsx(Zt,{locale:E,month:q?K:void 0,defaultMonth:u||(B instanceof Date?B:new Date),value:B instanceof Date?B:B&&I(B).toDate(),labelFormat:A,dayClassName:d,dayStyle:f,disableOutOfMonth:S,minDate:W,maxDate:ee,disableDate:m,firstDayOfWeek:p,preventFocus:!1,dateViewCount:i,enableHeaderLabel:w,defaultView:y,hideOutOfMonthDates:T,hideWeekdays:M,renderDay:O,weekendDays:_,yearLabelFormat:G,onMonthChange:ae,onChange:Re}),o.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[o.jsx(He,{disabled:!B,value:B,format:a?"12":"24",clearable:!1,size:"sm",onChange:nt}),o.jsx(ft,{size:"sm",disabled:!B,onClick:at,children:N})]})]})});an.displayName="DateTimepicker";const rn=Qt;rn.DatePickerRange=tn;rn.DateTimepicker=an;const Xe=h.createContext({}),ma=Xe.Provider,pa=Xe.Consumer,on=h.forwardRef((e,t)=>{const{children:a,className:n,defaultActiveKeys:r=[],defaultExpandedKeys:l=[],menuItemHeight:i=40,onSelect:d,sideCollapsed:f=!1,variant:u="light",...C}=e,v="menu",{themeColor:y,primaryColorLevel:x}=ue(),w=$(v,(()=>u==="themed"?`bg-${y}-${x} ${v}-${u}`:`${v}-${u}`)(),n);return o.jsx("nav",{ref:t,className:w,...C,children:o.jsx(ma,{value:{onSelect:d,menuItemHeight:i,variant:u,sideCollapsed:f,defaultExpandedKeys:l,defaultActiveKeys:r},children:a})})});on.displayName="Menu";const sn=h.createContext(null),ga=sn.Provider,va=sn.Consumer,ln=h.createContext(!1),ya=ln.Provider,ba=ln.Consumer,cn=e=>{const{eventKey:t,...a}=e;return o.jsx(pa,{children:n=>o.jsx(va,{children:()=>o.jsx(ba,{children:()=>o.jsx($e,{menuItemHeight:n.menuItemHeight,variant:n.variant,isActive:n.defaultActiveKeys.includes(t),eventKey:t,onSelect:n.onSelect,...a})})})})};cn.displayName="MenuItem";const un=e=>{const{id:t,children:a,className:n,eventKey:r,expanded:l=!1,label:i=null,isActive:d,onToggle:f,redirect:u=null}=e,[C,v]=h.useState(l),{menuItemHeight:y,variant:x,sideCollapsed:m,defaultExpandedKeys:w}=h.useContext(Xe),{direction:S}=ue();h.useEffect(()=>{w.includes(r.toLowerCase().replace(/\s+/g,""))&&v(!0)},[l,f,r,w]);const p=b=>{typeof f=="function"&&f(!C,b),v(!C),typeof u=="function"&&u(!C,b)},M=$(d&&"menu-item-active","menu-collapse-item",`menu-collapse-item-${x}`,n);return o.jsxs("div",{className:"menu-collapse mb-1",children:[o.jsxs("div",{id:t,className:M,role:"presentation",onClick:p,children:[o.jsx("span",{className:"flex items-center",children:i}),o.jsx(dt.span,{className:"text-lg mt-1",initial:{transform:"rotate(0deg)"},animate:{transform:C?"rotate(-180deg)":"rotate(0deg)"},transition:{duration:.15},children:m?null:o.jsx(_t,{})})]}),o.jsx(ya,{value:C,children:o.jsx(dt.ul,{className:S==="rtl"?"mr-5":"ml-5",initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:C?1:0,height:C?"auto":0},transition:{duration:.15},children:a})})]})};un.displayName="MenuCollapse";const dn=e=>{const{label:t,children:a,className:n}=e,{variant:r,sideCollapsed:l}=h.useContext(Xe),d=$("menu-group",n),f=ke("entity-header-");return o.jsxs("div",{className:d,children:[t&&!l&&o.jsx("div",{className:$("menu-title",`menu-title-${r}`),id:f,children:t}),o.jsx(ga,{value:null,children:o.jsx("ul",{children:a})})]})};dn.displayName="MenuGroup";const Nt=on;Nt.MenuItem=cn;Nt.MenuCollapse=un;Nt.MenuGroup=dn;const fn=e=>{const{percent:t,size:a,children:n,strokeColor:r}=e,l=$("progress-bg",a===At.SM?"h-1.5":"h-2",`bg-${r}`);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"progress-wrapper",children:o.jsx("div",{className:"progress-inner",children:o.jsx("div",{className:l,style:{width:`${t}%`}})})}),n]})};fn.displayName="ProgressLine";const hn=e=>{const{strokeWidth:t,percent:a,strokeLinecap:n,gapDegree:r,gapPosition:l,strokeColor:i,width:d,children:f}=e,u=h.useCallback(()=>{const m=50-t/2;let w=0,S=-m,p=0,T=-2*m;switch(l){case"left":w=-m,S=0,p=2*m,T=0;break;case"right":w=m,S=0,p=-2*m,T=0;break;case"bottom":S=m,T=2*m;break}const M=`M 50,50 m ${w},${S} a ${m},${m} 0 1 1 ${p},${-T} a ${m},${m} 0 1 1 ${-p},${T}`,b=Math.PI*2*m,H={strokeDasharray:`${b-r}px ${b}px`,strokeDashoffset:`-${r/2}px`},j={strokeDasharray:`${a/100*(b-r)}px ${b}px`,strokeDashoffset:`-${r/2}px`};return{pathString:M,trailPathStyle:H,strokePathStyle:j}},[r,l,a,t]),{pathString:C,trailPathStyle:v,strokePathStyle:y}=u(),x=`progress-circle-stroke text-${i}`;return o.jsxs("div",{className:"progress-circle",style:{width:d},children:[o.jsx("span",{className:"progress-circle-info",children:f}),o.jsxs("svg",{viewBox:"0 0 100 100",children:[o.jsx("path",{d:C,strokeWidth:t,fillOpacity:"0",style:v,className:"progress-circle-trail"}),o.jsx("path",{d:C,strokeLinecap:n,strokeWidth:a===0?0:t,fillOpacity:"0",style:y,className:x})]})]})};hn.displayName="ProgressCircle";const Da=h.forwardRef((e,t)=>{const{className:a,customInfo:n,color:r,gapDegree:l=0,gapPosition:i=Vn.TOP,percent:d=0,showInfo:f=!0,size:u=At.MD,strokeLinecap:C="round",strokeWidth:v=6,width:y=120,variant:x="line"}=e,{themeColor:m,primaryColorLevel:w}=ue(),S=()=>f?o.jsx("span",{className:`progress-info ${x}`,children:n||`${d}%`}):null,p=r||`${m}-${w}`,T=$("progress",a,x==="circle"?"circle":"line"),M=()=>{const b=S();let H;return x==="line"&&(H=o.jsx(fn,{percent:d,size:u,strokeColor:p,...e,children:b})),x==="circle"&&(H=o.jsx(hn,{gapDegree:l,gapPosition:i,percent:d,strokeColor:p,strokeLinecap:C,strokeWidth:v,width:y,...e,children:b})),H};return o.jsx("div",{ref:t,className:T,children:M()})});Da.displayName="Progress";var mn={},pn={},qe={exports:{}},Ne={exports:{}};(function(){var e,t,a,n,r,l;typeof performance<"u"&&performance!==null&&performance.now?Ne.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ne.exports=function(){return(e()-r)/1e6},t=process.hrtime,e=function(){var i;return i=t(),i[0]*1e9+i[1]},n=e(),l=process.uptime()*1e9,r=n-l):Date.now?(Ne.exports=function(){return Date.now()-a},a=Date.now()):(Ne.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(vt);var wa=Ne.exports,ka=wa,ge=typeof window>"u"?vt:window,Ee=["moz","webkit"],Ce="AnimationFrame",Se=ge["request"+Ce],Le=ge["cancel"+Ce]||ge["cancelRequest"+Ce];for(var Me=0;!Se&&Me<Ee.length;Me++)Se=ge[Ee[Me]+"Request"+Ce],Le=ge[Ee[Me]+"Cancel"+Ce]||ge[Ee[Me]+"CancelRequest"+Ce];if(!Se||!Le){var ct=0,Ot=0,we=[],xa=1e3/60;Se=function(e){if(we.length===0){var t=ka(),a=Math.max(0,xa-(t-ct));ct=a+t,setTimeout(function(){var n=we.slice(0);we.length=0;for(var r=0;r<n.length;r++)if(!n[r].cancelled)try{n[r].callback(ct)}catch(l){setTimeout(function(){throw l},0)}},Math.round(a))}return we.push({handle:++Ot,callback:e,cancelled:!1}),Ot},Le=function(e){for(var t=0;t<we.length;t++)we[t].handle===e&&(we[t].cancelled=!0)}}qe.exports=function(e){return Se.call(ge,e)};qe.exports.cancel=function(){Le.apply(ge,arguments)};qe.exports.polyfill=function(e){e||(e=ge),e.requestAnimationFrame=Se,e.cancelAnimationFrame=Le};var Ca=qe.exports,Ze={exports:{}},ut=null,Et=["Webkit","Moz","O","ms"],Sa=function(t){ut||(ut=document.createElement("div"));var a=ut.style;if(t in a)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=Et.length;r>=0;r--){var l=Et[r]+n;if(l in a)return l}return!1},Ma=La,Ta=/\s/,Na=/(_|-|\.|:)/,Ha=/([a-z][A-Z]|[A-Z][a-z])/;function La(e){return Ta.test(e)?e.toLowerCase():Na.test(e)?(Ra(e)||e).toLowerCase():Ha.test(e)?Ia(e).toLowerCase():e.toLowerCase()}var ja=/[\W_]+(.|$)/g;function Ra(e){return e.replace(ja,function(t,a){return a?" "+a:""})}var Pa=/(.)([A-Z]+)/g;function Ia(e){return e.replace(Pa,function(t,a,n){return a+" "+n.toLowerCase().split("").join(" ")})}var Oa=Ma,Ea=Fa;function Fa(e){return Oa(e).replace(/[\W_]+(.|$)/g,function(t,a){return a?" "+a:""}).trim()}var Va=Ea,_a=za;function za(e){return Va(e).replace(/\s(\w)/g,function(t,a){return a.toUpperCase()})}var Aa={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},Ya=function(e,t){return typeof t=="number"&&!Aa[e]?t+"px":t},$a=Sa,Wa=_a,_e={float:"cssFloat"},Ba=Ya;function We(e,t,a){var n=_e[t];if(typeof n>"u"&&(n=Ka(t)),n){if(a===void 0)return e.style[n];e.style[n]=Ba(n,a)}}function Ua(e,t){for(var a in t)t.hasOwnProperty(a)&&We(e,a,t[a])}function Ka(e){var t=Wa(e),a=$a(t);return _e[t]=_e[e]=_e[a]=a,a}function gn(){arguments.length===2?typeof arguments[1]=="string"?arguments[0].style.cssText=arguments[1]:Ua(arguments[0],arguments[1]):We(arguments[0],arguments[1],arguments[2])}Ze.exports=gn;Ze.exports.set=gn;Ze.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(a,n){return a[n]=We(e,n||""),a},{}):We(e,t||"")};var vn=Ze.exports,yn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(a){return typeof a=="string"}})(yn);var bn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var t=vn,a=n(t);function n(i){return i&&i.__esModule?i:{default:i}}var r=!1;function l(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(i&&r!==!1)return r;if(typeof document<"u"){var d=document.createElement("div");(0,a.default)(d,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(d),r=d.offsetWidth-d.clientWidth,document.body.removeChild(d)}else r=0;return r||0}})(bn);var Dn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})(Dn);var wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(a){var n=a.clientWidth,r=getComputedStyle(a),l=r.paddingLeft,i=r.paddingRight;return n-parseFloat(l)-parseFloat(i)}})(wn);var kn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(a){var n=a.clientHeight,r=getComputedStyle(a),l=r.paddingTop,i=r.paddingBottom;return n-parseFloat(l)-parseFloat(i)}})(kn);var fe={};Object.defineProperty(fe,"__esModule",{value:!0});fe.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"};fe.containerStyleAutoHeight={height:"auto"};fe.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"};fe.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0};fe.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0};fe.trackHorizontalStyleDefault={position:"absolute",height:6};fe.trackVerticalStyleDefault={position:"absolute",width:6};fe.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"};fe.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"};fe.disableSelectStyle={userSelect:"none"};fe.disableSelectStyleReset={userSelect:""};var xe={};Object.defineProperty(xe,"__esModule",{value:!0});var ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e};xe.renderViewDefault=qa;xe.renderTrackHorizontalDefault=Za;xe.renderTrackVerticalDefault=Ja;xe.renderThumbHorizontalDefault=Qa;xe.renderThumbVerticalDefault=er;var Ga=h,je=Xa(Ga);function Xa(e){return e&&e.__esModule?e:{default:e}}function Je(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}function qa(e){return je.default.createElement("div",e)}function Za(e){var t=e.style,a=Je(e,["style"]),n=ye({},t,{right:2,bottom:2,left:2,borderRadius:3});return je.default.createElement("div",ye({style:n},a))}function Ja(e){var t=e.style,a=Je(e,["style"]),n=ye({},t,{right:2,bottom:2,top:2,borderRadius:3});return je.default.createElement("div",ye({style:n},a))}function Qa(e){var t=e.style,a=Je(e,["style"]),n=ye({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return je.default.createElement("div",ye({style:n},a))}function er(e){var t=e.style,a=Je(e,["style"]),n=ye({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return je.default.createElement("div",ye({style:n},a))}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(R){for(var N=1;N<arguments.length;N++){var D=arguments[N];for(var s in D)Object.prototype.hasOwnProperty.call(D,s)&&(R[s]=D[s])}return R},a=function(){function R(N,D){for(var s=0;s<D.length;s++){var g=D[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(N,g.key,g)}}return function(N,D,s){return D&&R(N.prototype,D),s&&R(N,s),N}}(),n=Ca,r=j(n),l=vn,i=j(l),d=h,f=Ln,u=j(f),C=yn,v=j(C),y=bn,x=j(y),m=Dn,w=j(m),S=wn,p=j(S),T=kn,M=j(T),b=fe,H=xe;function j(R){return R&&R.__esModule?R:{default:R}}function q(R,N){var D={};for(var s in R)N.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(R,s)&&(D[s]=R[s]);return D}function A(R,N){if(!(R instanceof N))throw new TypeError("Cannot call a class as a function")}function U(R,N){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:R}function ee(R,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);R.prototype=Object.create(N&&N.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(R,N):R.__proto__=N)}var W=function(R){ee(N,R);function N(D){var s;A(this,N);for(var g=arguments.length,k=Array(g>1?g-1:0),L=1;L<g;L++)k[L-1]=arguments[L];var c=U(this,(s=N.__proto__||Object.getPrototypeOf(N)).call.apply(s,[this,D].concat(k)));return c.getScrollLeft=c.getScrollLeft.bind(c),c.getScrollTop=c.getScrollTop.bind(c),c.getScrollWidth=c.getScrollWidth.bind(c),c.getScrollHeight=c.getScrollHeight.bind(c),c.getClientWidth=c.getClientWidth.bind(c),c.getClientHeight=c.getClientHeight.bind(c),c.getValues=c.getValues.bind(c),c.getThumbHorizontalWidth=c.getThumbHorizontalWidth.bind(c),c.getThumbVerticalHeight=c.getThumbVerticalHeight.bind(c),c.getScrollLeftForOffset=c.getScrollLeftForOffset.bind(c),c.getScrollTopForOffset=c.getScrollTopForOffset.bind(c),c.scrollLeft=c.scrollLeft.bind(c),c.scrollTop=c.scrollTop.bind(c),c.scrollToLeft=c.scrollToLeft.bind(c),c.scrollToTop=c.scrollToTop.bind(c),c.scrollToRight=c.scrollToRight.bind(c),c.scrollToBottom=c.scrollToBottom.bind(c),c.handleTrackMouseEnter=c.handleTrackMouseEnter.bind(c),c.handleTrackMouseLeave=c.handleTrackMouseLeave.bind(c),c.handleHorizontalTrackMouseDown=c.handleHorizontalTrackMouseDown.bind(c),c.handleVerticalTrackMouseDown=c.handleVerticalTrackMouseDown.bind(c),c.handleHorizontalThumbMouseDown=c.handleHorizontalThumbMouseDown.bind(c),c.handleVerticalThumbMouseDown=c.handleVerticalThumbMouseDown.bind(c),c.handleWindowResize=c.handleWindowResize.bind(c),c.handleScroll=c.handleScroll.bind(c),c.handleDrag=c.handleDrag.bind(c),c.handleDragEnd=c.handleDragEnd.bind(c),c.state={didMountUniversal:!1},c}return a(N,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){var s=this.props.universal;s&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,n.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var s=this.view||{},g=s.scrollLeft,k=g===void 0?0:g,L=s.scrollTop,c=L===void 0?0:L,O=s.scrollWidth,z=O===void 0?0:O,V=s.scrollHeight,_=V===void 0?0:V,G=s.clientWidth,Q=G===void 0?0:G,P=s.clientHeight,E=P===void 0?0:P;return{left:k/(z-Q)||0,top:c/(_-E)||0,scrollLeft:k,scrollTop:c,scrollWidth:z,scrollHeight:_,clientWidth:Q,clientHeight:E}}},{key:"getThumbHorizontalWidth",value:function(){var s=this.props,g=s.thumbSize,k=s.thumbMinSize,L=this.view,c=L.scrollWidth,O=L.clientWidth,z=(0,p.default)(this.trackHorizontal),V=Math.ceil(O/c*z);return z<=V?0:g||Math.max(V,k)}},{key:"getThumbVerticalHeight",value:function(){var s=this.props,g=s.thumbSize,k=s.thumbMinSize,L=this.view,c=L.scrollHeight,O=L.clientHeight,z=(0,M.default)(this.trackVertical),V=Math.ceil(O/c*z);return z<=V?0:g||Math.max(V,k)}},{key:"getScrollLeftForOffset",value:function(s){var g=this.view,k=g.scrollWidth,L=g.clientWidth,c=(0,p.default)(this.trackHorizontal),O=this.getThumbHorizontalWidth();return s/(c-O)*(k-L)}},{key:"getScrollTopForOffset",value:function(s){var g=this.view,k=g.scrollHeight,L=g.clientHeight,c=(0,M.default)(this.trackVertical),O=this.getThumbVerticalHeight();return s/(c-O)*(k-L)}},{key:"scrollLeft",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollLeft=s)}},{key:"scrollTop",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollTop=s)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if(!(typeof document>"u"||!this.view)){var s=this.view,g=this.trackHorizontal,k=this.trackVertical,L=this.thumbHorizontal,c=this.thumbVertical;s.addEventListener("scroll",this.handleScroll),(0,x.default)()&&(g.addEventListener("mouseenter",this.handleTrackMouseEnter),g.addEventListener("mouseleave",this.handleTrackMouseLeave),g.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),k.addEventListener("mouseenter",this.handleTrackMouseEnter),k.addEventListener("mouseleave",this.handleTrackMouseLeave),k.addEventListener("mousedown",this.handleVerticalTrackMouseDown),L.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),c.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if(!(typeof document>"u"||!this.view)){var s=this.view,g=this.trackHorizontal,k=this.trackVertical,L=this.thumbHorizontal,c=this.thumbVertical;s.removeEventListener("scroll",this.handleScroll),(0,x.default)()&&(g.removeEventListener("mouseenter",this.handleTrackMouseEnter),g.removeEventListener("mouseleave",this.handleTrackMouseLeave),g.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),k.removeEventListener("mouseenter",this.handleTrackMouseEnter),k.removeEventListener("mouseleave",this.handleTrackMouseLeave),k.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),L.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),c.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(s){var g=this,k=this.props,L=k.onScroll,c=k.onScrollFrame;L&&L(s),this.update(function(O){var z=O.scrollLeft,V=O.scrollTop;g.viewScrollLeft=z,g.viewScrollTop=V,c&&c(O)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var s=this.props.onScrollStart;s&&s(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var s=this.props.autoHide;s&&this.showTracks()}},{key:"handleScrollStop",value:function(){var s=this.props.onScrollStop;s&&s(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var s=this.props.autoHide;s&&this.hideTracks()}},{key:"handleWindowResize",value:function(){(0,x.default)(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(s){s.preventDefault();var g=s.target,k=s.clientX,L=g.getBoundingClientRect(),c=L.left,O=this.getThumbHorizontalWidth(),z=Math.abs(c-k)-O/2;this.view.scrollLeft=this.getScrollLeftForOffset(z)}},{key:"handleVerticalTrackMouseDown",value:function(s){s.preventDefault();var g=s.target,k=s.clientY,L=g.getBoundingClientRect(),c=L.top,O=this.getThumbVerticalHeight(),z=Math.abs(c-k)-O/2;this.view.scrollTop=this.getScrollTopForOffset(z)}},{key:"handleHorizontalThumbMouseDown",value:function(s){s.preventDefault(),this.handleDragStart(s);var g=s.target,k=s.clientX,L=g.offsetWidth,c=g.getBoundingClientRect(),O=c.left;this.prevPageX=L-(k-O)}},{key:"handleVerticalThumbMouseDown",value:function(s){s.preventDefault(),this.handleDragStart(s);var g=s.target,k=s.clientY,L=g.offsetHeight,c=g.getBoundingClientRect(),O=c.top;this.prevPageY=L-(k-O)}},{key:"setupDragging",value:function(){(0,i.default)(document.body,b.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=w.default}},{key:"teardownDragging",value:function(){(0,i.default)(document.body,b.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(s){this.dragging=!0,s.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(s){if(this.prevPageX){var g=s.clientX,k=this.trackHorizontal.getBoundingClientRect(),L=k.left,c=this.getThumbHorizontalWidth(),O=c-this.prevPageX,z=-L+g-O;this.view.scrollLeft=this.getScrollLeftForOffset(z)}if(this.prevPageY){var V=s.clientY,_=this.trackVertical.getBoundingClientRect(),G=_.top,Q=this.getThumbVerticalHeight(),P=Q-this.prevPageY,E=-G+V-P;this.view.scrollTop=this.getScrollTopForOffset(E)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var s=this.props.autoHide;s&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var s=this.props.autoHide;s&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var s=this.props.autoHide;s&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,i.default)(this.trackHorizontal,{opacity:1}),(0,i.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var s=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var g=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,i.default)(s.trackHorizontal,{opacity:0}),(0,i.default)(s.trackVertical,{opacity:0})},g)}}},{key:"detectScrolling",value:function(){var s=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){s.lastViewScrollLeft===s.viewScrollLeft&&s.lastViewScrollTop===s.viewScrollTop&&(clearInterval(s.detectScrollingInterval),s.scrolling=!1,s.handleScrollStop()),s.lastViewScrollLeft=s.viewScrollLeft,s.lastViewScrollTop=s.viewScrollTop},100))}},{key:"raf",value:function(s){var g=this;this.requestFrame&&r.default.cancel(this.requestFrame),this.requestFrame=(0,r.default)(function(){g.requestFrame=void 0,s()})}},{key:"update",value:function(s){var g=this;this.raf(function(){return g._update(s)})}},{key:"_update",value:function(s){var g=this.props,k=g.onUpdate,L=g.hideTracksWhenNotNeeded,c=this.getValues();if((0,x.default)()){var O=c.scrollLeft,z=c.clientWidth,V=c.scrollWidth,_=(0,p.default)(this.trackHorizontal),G=this.getThumbHorizontalWidth(),Q=O/(V-z)*(_-G),P={width:G,transform:"translateX("+Q+"px)"},E=c.scrollTop,F=c.clientHeight,ne=c.scrollHeight,X=(0,M.default)(this.trackVertical),se=this.getThumbVerticalHeight(),he=E/(ne-F)*(X-se),le={height:se,transform:"translateY("+he+"px)"};if(L){var B={visibility:V>z?"visible":"hidden"},te={visibility:ne>F?"visible":"hidden"};(0,i.default)(this.trackHorizontal,B),(0,i.default)(this.trackVertical,te)}(0,i.default)(this.thumbHorizontal,P),(0,i.default)(this.thumbVertical,le)}k&&k(c),typeof s=="function"&&s(c)}},{key:"render",value:function(){var s=this,g=(0,x.default)(),k=this.props;k.onScroll,k.onScrollFrame,k.onScrollStart,k.onScrollStop,k.onUpdate;var L=k.renderView,c=k.renderTrackHorizontal,O=k.renderTrackVertical,z=k.renderThumbHorizontal,V=k.renderThumbVertical,_=k.tagName;k.hideTracksWhenNotNeeded;var G=k.autoHide;k.autoHideTimeout;var Q=k.autoHideDuration;k.thumbSize,k.thumbMinSize;var P=k.universal,E=k.autoHeight,F=k.autoHeightMin,ne=k.autoHeightMax,X=k.style,se=k.children,he=q(k,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),le=this.state.didMountUniversal,B=t({},b.containerStyleDefault,E&&t({},b.containerStyleAutoHeight,{minHeight:F,maxHeight:ne}),X),te=t({},b.viewStyleDefault,{marginRight:g?-g:0,marginBottom:g?-g:0},E&&t({},b.viewStyleAutoHeight,{minHeight:(0,v.default)(F)?"calc("+F+" + "+g+"px)":F+g,maxHeight:(0,v.default)(ne)?"calc("+ne+" + "+g+"px)":ne+g}),E&&P&&!le&&{minHeight:F,maxHeight:ne},P&&!le&&b.viewStyleUniversalInitial),K={transition:"opacity "+Q+"ms",opacity:0},ae=t({},b.trackHorizontalStyleDefault,G&&K,(!g||P&&!le)&&{display:"none"}),oe=t({},b.trackVerticalStyleDefault,G&&K,(!g||P&&!le)&&{display:"none"});return(0,d.createElement)(_,t({},he,{style:B,ref:function(re){s.container=re}}),[(0,d.cloneElement)(L({style:te}),{key:"view",ref:function(re){s.view=re}},se),(0,d.cloneElement)(c({style:ae}),{key:"trackHorizontal",ref:function(re){s.trackHorizontal=re}},(0,d.cloneElement)(z({style:b.thumbHorizontalStyleDefault}),{ref:function(re){s.thumbHorizontal=re}})),(0,d.cloneElement)(O({style:oe}),{key:"trackVertical",ref:function(re){s.trackVertical=re}},(0,d.cloneElement)(V({style:b.thumbVerticalStyleDefault}),{ref:function(re){s.thumbVertical=re}}))])}}]),N}(d.Component);e.default=W,W.propTypes={onScroll:u.default.func,onScrollFrame:u.default.func,onScrollStart:u.default.func,onScrollStop:u.default.func,onUpdate:u.default.func,renderView:u.default.func,renderTrackHorizontal:u.default.func,renderTrackVertical:u.default.func,renderThumbHorizontal:u.default.func,renderThumbVertical:u.default.func,tagName:u.default.string,thumbSize:u.default.number,thumbMinSize:u.default.number,hideTracksWhenNotNeeded:u.default.bool,autoHide:u.default.bool,autoHideTimeout:u.default.number,autoHideDuration:u.default.number,autoHeight:u.default.bool,autoHeightMin:u.default.oneOfType([u.default.number,u.default.string]),autoHeightMax:u.default.oneOfType([u.default.number,u.default.string]),universal:u.default.bool,style:u.default.object,children:u.default.node},W.defaultProps={renderView:H.renderViewDefault,renderTrackHorizontal:H.renderTrackHorizontalDefault,renderTrackVertical:H.renderTrackVerticalDefault,renderThumbHorizontal:H.renderThumbHorizontalDefault,renderThumbVertical:H.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})(pn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=pn,a=n(t);function n(r){return r&&r.__esModule?r:{default:r}}e.default=a.default,e.Scrollbars=a.default})(mn);const tr=h.forwardRef((e,t)=>{const{direction:a="ltr",...n}=e;return o.jsx(mn.Scrollbars,{ref:t,renderView:r=>o.jsx("div",{...r,style:{...r.style,...a==="rtl"&&{marginLeft:r.style.marginRight,marginRight:0}}}),...n})});tr.displayName="ScrollBar";function nr(e,t,a){let n=0;return h.Children.map(e,r=>{if(!h.isValidElement(r))return r;const l=t.call(a,r,n);return n+=1,l})}function xn(e,t,a){return nr(e,(n,r)=>h.cloneElement(n,{key:r,...t(n,r)}),a)}const{COMPLETE:ar,PENDING:rr,IN_PROGRESS:or,ERROR:sr}=Yt,Cn=h.forwardRef((e,t)=>{const{className:a,children:n,vertical:r=!1,current:l=0,status:i=or,onChange:d,...f}=e,u=h.Children.count(n),C=xn(n,(v,y)=>{const x={flexBasis:y<u-1?`${100/(u-1)}%`:void 0,maxWidth:y===u-1?`${100/u}%`:void 0},m={stepNumber:y+1,status:rr,style:r?void 0:x,isLast:y===u-1,vertical:r,onStepChange:d?()=>d(y):void 0,...v.props};return i===sr&&y===l-1&&(m.className=$("steps-item-error")),v.props.status||(y===l?(m.status=i,m.className=$(m.className,"steps-item-active")):y<l&&(m.status=ar)),m});return o.jsx("div",{ref:t,className:$("steps",r&&"steps-vertical",a),...f,children:C})});Cn.displayName="Steps";const{COMPLETE:gt,PENDING:lr,IN_PROGRESS:Sn,ERROR:ze}=Yt,ir={[gt]:o.jsx(_n,{}),[lr]:null,[Sn]:null,[ze]:o.jsx(zn,{})},Mn=h.forwardRef((e,t)=>{const{className:a,customIcon:n,description:r,isLast:l,onStepChange:i,status:d,stepNumber:f,title:u,vertical:C,...v}=e,{themeColor:y,primaryColorLevel:x}=ue(),m=`${y}-${x}`;let w=o.jsx("span",{children:ir[d]??f});n&&(w=o.jsx("span",{children:n}));const S=$(`step-item step-item-${d}`,C&&"step-item-vertical",a),p=$("step-item-wrapper",i&&"step-clickable"),T=$(`step-item-icon step-item-icon-${d}`,d===gt&&`bg-${m} text-white`,d===ze&&"step-item-icon-error",d===Sn&&`text-${m} dark:text-gray-100 border-${m} step-item-icon-current`),M=$("step-connect",u&&"ml-2.5 rtl:mr-2.5",C&&"step-connect-vertical",d===gt?`bg-${m}`:"inactive"),b=$("step-item-title",d===ze&&"step-item-title-error",i&&d!==ze&&`hover:text-${m}`),H=()=>{i==null||i()};return o.jsxs("div",{className:S,...v,ref:t,role:"presentation",onClick:H,children:[o.jsxs("div",{className:p,children:[o.jsx("div",{className:T,children:w}),u&&o.jsxs("div",{className:"step-item-content",children:[u&&o.jsx("span",{className:b,children:u}),r&&C&&o.jsx("span",{className:"step-item-description",children:r})]})]}),!l&&o.jsx("div",{className:M})]})});Mn.displayName="StepItem";const cr=Cn;cr.Item=Mn;const Tn=h.forwardRef((e,t)=>{const{amPmPlaceholder:a="am",clearable:n=!1,className:r,defaultValue:l=[null,null],disabled:i=!1,format:d="24",id:f,invalid:u,name:C,onChange:v,prefix:y,seperator:x="~",showSeconds:m=!1,size:w,style:S,suffix:p=o.jsx(zt,{className:"text-lg"}),timeFieldPlaceholder:T="--",value:M,...b}=e,H=ke(f),j=h.useRef(),q=h.useRef(),[A,U]=h.useState(M??l);Ae(()=>{typeof v=="function"&&v(A)},[A]),Ae(()=>{var N,D,s,g;M&&(((N=M[0])==null?void 0:N.getTime())!==((D=A[0])==null?void 0:D.getTime())||((s=M[1])==null?void 0:s.getTime())!==((g=A[1])==null?void 0:g.getTime()))&&U(M)},[M]);const ee=()=>{var N;U([null,null]),(N=j.current)==null||N.focus()},W=n&&A?o.jsx(wt,{onClick:ee}):o.jsx(o.Fragment,{children:p}),R={amPmPlaceholder:a,disabled:i,format:d,size:w,timeFieldPlaceholder:T,showSeconds:m};return o.jsx(Dt,{asElement:"div",invalid:u,size:w,className:r,style:S,disabled:i,suffix:W,prefix:y,onClick:()=>{var N;(N=j.current)==null||N.focus()},...b,children:o.jsxs("div",{className:"time-input-wrapper",children:[o.jsx(He,{ref:be(j,t),unstyle:!0,value:A[0],name:C,nextRef:q,id:H,clearable:!1,suffix:null,onChange:N=>U([N,A[1]]),...R}),o.jsx("span",{className:"time-input-separator",children:x}),o.jsx(He,{ref:q,unstyle:!0,value:A[1],clearable:!1,suffix:null,onChange:N=>U([A[0],N]),...R})]})})});Tn.displayName="TimeInputRange";const ur=He;ur.TimeInputRange=Tn;const Nn=h.forwardRef((e,t)=>{const{children:a,className:n}=e,r=h.Children.count(a),l=xn(a,(i,d)=>({isLast:d===r-1,...i.props}));return o.jsx("ul",{ref:t,className:$("timeline",n),children:l})});Nn.displayName="Timeline";const Hn=h.forwardRef((e,t)=>{const{children:a,className:n,isLast:r,media:l}=e;return o.jsx("li",{ref:t,className:$("timeline-item",r?"timeline-item-last":"",n),children:o.jsxs("div",{className:"timeline-item-wrapper",children:[o.jsxs("div",{className:"timeline-item-media",children:[o.jsx("div",{className:"timeline-item-media-content",children:l||o.jsx("div",{className:"timeline-item-media-default"})}),!r&&o.jsx("div",{className:"timeline-connect"})]}),o.jsx("div",{className:$("timeline-item-content",r&&"timeline-item-content-last"),children:a})]})})});Hn.displayName="TimeLineItem";const dr=Nn;dr.Item=Hn;export{la as C,Ut as D,$e as M,Da as P,tr as S,ur as T,rn as a,Nt as b,tn as c,an as d};
@@ -1 +0,0 @@
1
- import{b as p,c as u,a as g}from"./vendor-redux-a1f00e6b.js";import{a as D}from"./DynamicTablesService-963fe77b.js";import{ab as f,F as y}from"./index-c62ac197.js";const d="dynamicTables",s=p(d+"/getDynamicTables",async a=>{var o,r,i,l;const{auth:e}=f.getState(),t=((r=(o=e==null?void 0:e.session)==null?void 0:o.tenantId)==null?void 0:r.toString())??"",m={searchString:"",userId:((l=(i=e==null?void 0:e.session)==null?void 0:i.userId)==null?void 0:l.toString())??"",tenantId:t,fromDate:null,toDate:null,sortBy:"",sortDirection:"",page:0,pageSize:20},n=await D(m);return{data:n.data.tables.$values,total:n.data.totalCount}}),b={loading:!1,deleteConfirmation:!1,selectedGrid:[],dynamicTableList:[],filterData:{tenantId:"",searchString:"",fromDate:"",toDate:""}},c=u({name:`${d}/state`,initialState:b,reducers:{updateUserList:(a,e)=>{a.dynamicTableList=e.payload},setTableData:(a,e)=>{a.dynamicTableList=e.payload},setFilterData:(a,e)=>{a.filterData=e.payload},toggleDeleteConfirmation:(a,e)=>{a.deleteConfirmation=e.payload},setSelectedGrid:(a,e)=>{a.selectedGrid=e.payload}},extraReducers:a=>{a.addCase(s.fulfilled,(e,t)=>{e.dynamicTableList=t.payload.data,e.loading=!1}).addCase(s.pending,e=>{e.loading=!0}).addCase(s.rejected,e=>{e.loading=!1})}}),{updateUserList:A,toggleDeleteConfirmation:F,setTableData:x,setFilterData:E,setSelectedGrid:R}=c.actions,S=c.reducer,U=g({data:S}),_=y;export{s as g,U as r,R as s,F as t,_ as u};
@@ -1 +0,0 @@
1
- import{U as t}from"./UserEdit-87262ea5.js";import"./vendor-mui-69397583.js";import"./vendor-react-ece1c85f.js";import"./index-c62ac197.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./DoubleSidedImage-ae98733b.js";import"./UserService-047aef51.js";import"./UserForm-31fdd3b3.js";import"./FormContainer-91c2b0e4.js";import"./index-36ba4ea7.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./StickyFooter-5b934274.js";import"./ConfirmDialog-3202eb3d.js";import"./index.esm-70ab539c.js";import"./AdaptableCard-df7695d6.js";import"./index-77e820d0.js";import"./RoleService-7008da2c.js";import"./PasswordInput-8619a9df.js";import"./index-42e65911.js";import"./index-cebd880b.js";import"./AccountServices-62599aae.js";import"./ContactService-92281a90.js";import"./index-785ad361.js";import"./index-e4c6057f.js";import"./strongPassword-bbec776a.js";import"./validationPatterns-77446c46.js";export{t as default};