@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
@@ -0,0 +1 @@
1
+ import{b as l,c,a as u}from"./vendor-redux-a1f00e6b.js";import{da as a,_ as p}from"./index-3b5ce20a.js";async function E(e){return(await a.apiV10EntityPost(e)).data}async function y(e){return(await a.apiV10EntityGet(e)).data}async function C(e){return(await a.apiV10EntityIdGet(e)).data}async function b(e,t){return(await a.apiV10EntityIdPut(e,t)).data}async function S(e){return(await a.apiV10EntityIdDelete(e)).data}async function I(e){return(await a.apiV10EntityEntityUsersEntityIdGet(e)).data}const o="CountyData",n=l(`${o}/getCountyList`,async e=>(await y({filters:e==null?void 0:e.filters})).data),r=l(o+"/getCountyDetails",async e=>(await C(e.id)).data),f={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},D={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:f,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},CountyList:[],CountyDetails:{},paymentList:[]},d=c({name:`${o}`,initialState:D,reducers:{setTableData:(e,t)=>{e.tableData=t.payload},setFilterData:(e,t)=>{e.filterData=t.payload},toggleDeleteConfirmation:(e,t)=>{e.deleteConfirmation=t.payload},setSelectedRowData:(e,t)=>{e.selectedRowData=t.payload}},extraReducers:e=>{e.addCase(n.fulfilled,(t,s)=>{var i;t.CountyList=(i=s.payload.result)==null?void 0:i.$values,t.tableData.total=s.payload.result.$values.length,t.loading=!1}).addCase(n.pending,t=>{t.loading=!0}).addCase(n.rejected,t=>{t.loading=!1}).addCase(r.fulfilled,(t,s)=>{t.CountyDetails=s.payload,t.loading=!1}).addCase(r.pending,t=>{t.loading=!0})}}),{setTableData:G,setFilterData:L,toggleDeleteConfirmation:R,setSelectedRowData:V}=d.actions,g=d.reducer,h=u({data:g}),v=p;export{b as a,E as b,S as c,I as d,r as e,n as g,h as r,V as s,R as t,v as u};
@@ -0,0 +1 @@
1
+ import{j as o,p as Ln}from"./vendor-mui-98daa63f.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-de319a18.js";import{bs as Ye,bt as Rn,bu as dt,g as $,bv as ue,bw as Te,bx as yt,b7 as bt,by as Pn,bz as In,bA as _t,bB as On,ai as I,B as ft,bC as En,a0 as Dt,bD as be,aQ as Fn,ah as wt,bE as zt,bF as At,bG as Vn,bH as Yt,t as _n,bI as zn}from"./index-3b5ce20a.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;var Kt={},Gt={},Ge={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 Gn=Ne.exports,Xn=Gn,ge=typeof window>"u"?vt:window,Oe=["moz","webkit"],Ce="AnimationFrame",Se=ge["request"+Ce],He=ge["cancel"+Ce]||ge["cancelRequest"+Ce];for(var Me=0;!Se&&Me<Oe.length;Me++)Se=ge[Oe[Me]+"Request"+Ce],He=ge[Oe[Me]+"Cancel"+Ce]||ge[Oe[Me]+"CancelRequest"+Ce];if(!Se||!He){var lt=0,Lt=0,we=[],qn=1e3/60;Se=function(e){if(we.length===0){var t=Xn(),a=Math.max(0,qn-(t-lt));lt=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(lt)}catch(l){setTimeout(function(){throw l},0)}},Math.round(a))}return we.push({handle:++Lt,callback:e,cancelled:!1}),Lt},He=function(e){for(var t=0;t<we.length;t++)we[t].handle===e&&(we[t].cancelled=!0)}}Ge.exports=function(e){return Se.call(ge,e)};Ge.exports.cancel=function(){He.apply(ge,arguments)};Ge.exports.polyfill=function(e){e||(e=ge),e.requestAnimationFrame=Se,e.cancelAnimationFrame=He};var Zn=Ge.exports,Xe={exports:{}},it=null,jt=["Webkit","Moz","O","ms"],Qn=function(t){it||(it=document.createElement("div"));var a=it.style;if(t in a)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=jt.length;r>=0;r--){var l=jt[r]+n;if(l in a)return l}return!1},Jn=aa,ea=/\s/,ta=/(_|-|\.|:)/,na=/([a-z][A-Z]|[A-Z][a-z])/;function aa(e){return ea.test(e)?e.toLowerCase():ta.test(e)?(oa(e)||e).toLowerCase():na.test(e)?la(e).toLowerCase():e.toLowerCase()}var ra=/[\W_]+(.|$)/g;function oa(e){return e.replace(ra,function(t,a){return a?" "+a:""})}var sa=/(.)([A-Z]+)/g;function la(e){return e.replace(sa,function(t,a,n){return a+" "+n.toLowerCase().split("").join(" ")})}var ia=Jn,ca=ua;function ua(e){return ia(e).replace(/[\W_]+(.|$)/g,function(t,a){return a?" "+a:""}).trim()}var da=ca,fa=ha;function ha(e){return da(e).replace(/\s(\w)/g,function(t,a){return a.toUpperCase()})}var ma={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},pa=function(e,t){return typeof t=="number"&&!ma[e]?t+"px":t},ga=Qn,va=fa,Fe={float:"cssFloat"},ya=pa;function We(e,t,a){var n=Fe[t];if(typeof n>"u"&&(n=Da(t)),n){if(a===void 0)return e.style[n];e.style[n]=ya(n,a)}}function ba(e,t){for(var a in t)t.hasOwnProperty(a)&&We(e,a,t[a])}function Da(e){var t=va(e),a=ga(t);return Fe[t]=Fe[e]=Fe[a]=a,a}function Xt(){arguments.length===2?typeof arguments[1]=="string"?arguments[0].style.cssText=arguments[1]:ba(arguments[0],arguments[1]):We(arguments[0],arguments[1],arguments[2])}Xe.exports=Xt;Xe.exports.set=Xt;Xe.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 qt=Xe.exports,Zt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(a){return typeof a=="string"}})(Zt);var Qt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var t=qt,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}})(Qt);var Jt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})(Jt);var en={};(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)}})(en);var tn={};(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)}})(tn);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=xa;xe.renderTrackHorizontalDefault=Ca;xe.renderTrackVerticalDefault=Sa;xe.renderThumbHorizontalDefault=Ma;xe.renderThumbVerticalDefault=Ta;var wa=h,je=ka(wa);function ka(e){return e&&e.__esModule?e:{default:e}}function qe(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 xa(e){return je.default.createElement("div",e)}function Ca(e){var t=e.style,a=qe(e,["style"]),n=ye({},t,{right:2,bottom:2,left:2,borderRadius:3});return je.default.createElement("div",ye({style:n},a))}function Sa(e){var t=e.style,a=qe(e,["style"]),n=ye({},t,{right:2,bottom:2,top:2,borderRadius:3});return je.default.createElement("div",ye({style:n},a))}function Ma(e){var t=e.style,a=qe(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 Ta(e){var t=e.style,a=qe(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=Zn,r=j(n),l=qt,i=j(l),d=h,f=Ln,u=j(f),C=Zt,v=j(C),y=Qt,x=j(y),m=Jt,w=j(m),S=en,p=j(S),T=tn,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,J=G===void 0?0:G,P=s.clientHeight,E=P===void 0?0:P;return{left:k/(z-J)||0,top:c/(_-E)||0,scrollLeft:k,scrollTop:c,scrollWidth:z,scrollHeight:_,clientWidth:J,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,J=this.getThumbVerticalHeight(),P=J-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(),J=O/(V-z)*(_-G),P={width:G,transform:"translateX("+J+"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 J=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 "+J+"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}})(Gt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=Gt,a=n(t);function n(r){return r&&r.__esModule?r:{default:r}}e.default=a.default,e.Scrollbars=a.default})(Kt);const Na=h.forwardRef((e,t)=>{const{direction:a="ltr",...n}=e;return o.jsx(Kt.Scrollbars,{ref:t,renderView:r=>o.jsx("div",{...r,style:{...r.style,...a==="rtl"&&{marginLeft:r.style.marginRight,marginRight:0}}}),...n})});Na.displayName="ScrollBar";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 Ha({focusable:e,hasValue:t,selected:a,firstInMonth:n}){return e?t?a?0:-1:n?0:-1:-1}const nn=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:Ha({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()})});nn.displayName="Day";function Ve(e,t){return I(new Date(e,1,1)).format(t)}function La(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 ja(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 an(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 Ra(e,t="monday"){const a=e.getMonth(),n=new Date(e.getFullYear(),a,1),r=new Date(e.getFullYear(),e.getMonth()+1,0),l=ja(r,t),i=an(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 Pa(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 Ia(e,t="monday",a="dd"){const n=[],r=an(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 rn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function me(e,t){return rn(e,t)&&e.getDate()===t.getDate()}function Oa(e,t=[0,6]){return t.includes(e.getDay())}function Ea(e,t){return!rn(e,t)}function Fa({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 Va(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 Rt(e){const{date:t,month:a,hasValue:n,minDate:r,maxDate:l,value:i,disableDate:d,disableOutOfMonth:f,range:u,weekendDays:C}=e,v=Ea(t,a),y=n&&(Array.isArray(i)?i.some(p=>me(p,t)):me(t,i)),{inRange:x,lastInRange:m,firstInRange:w,selectedInRange:S}=Va(t,u);return{disabled:Fa({minDate:r,maxDate:l,disableDate:d,disableOutOfMonth:f,date:t,outOfMonth:v}),weekend:Oa(t,C),selectedInRange:S,selected:y,inRange:x,firstInRange:w,lastInRange:m,outOfMonth:v}}const Ee=()=>!1,on=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=Ee,isDateFirstInRange:A=Ee,isDateLastInRange:U=Ee,renderDay:ee,weekdayLabelFormat:W,weekendDays:R=[0,6],...N}=e,{locale:D}=ue(),s=d||D,g=Ra(n,M),k=Ia(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=Rt({...O,date:_});return!G.disabled&&!G.outOfMonth})||I(n).startOf("month").toDate(),[]),V=g.map((_,G)=>{const J=_.map((P,E)=>{const F=Rt({...O,date:P}),ne={rowIndex:G,cellIndex:E,date:P};return o.jsx("td",{className:$("date-picker-cell"),children:o.jsx(nn,{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:Ee})},E)});return o.jsx("tr",{className:$("date-picker-week-cell"),children:J},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})]})});on.displayName="Month";function de(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}function Pt({month:e,locale:t,format:a}){return de(I(e).locale(t).format(a))}const _a=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:Pt({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:Pt({month:ee,locale:r,format:(x==null?void 0:x.year)||"YYYY"})})]})}),o.jsx(on,{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})},za=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=Pa(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:Ve(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})]})},Aa=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=La(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:Ve(w,d)},w)});return o.jsxs("div",{className:$("year-picker",t),...f,children:[o.jsx(Mt,{nextLevelDisabled:!0,label:`${Ve(x[0],d)} - ${Ve(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(()=>[])),[J,P]=Be({prop:H,defaultProp:i!==void 0?i:new Date,onChange:U}),[E,F]=h.useState(J==null?void 0:J.getFullYear()),[ne,X]=h.useState(J==null?void 0:J.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(Aa,{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(za,{value:{month:J.getMonth(),year:J.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(_a,{dateViewCount:n,paginateBy:ee,month:J,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 sn=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})},Ya=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:"×"})]})});Ya.displayName="Tag";var ln={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)}}})})(ln);var $a=ln.exports;const Wa=jn($a);I.extend(Wa);const Ze=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})})]})});Ze.displayName="BasePicker";const It="YYYY-MM-DD",cn=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:J,...P}=e,{locale:E}=ue(),F=U||E,ne=V==="date"?It:b||It,[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 Je=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)},Q=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(Ze,{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:Q,onBlur:tt,onFocus:at,onKeyDown:nt,onClear:et,onDropdownClose:g,onDropdownOpen:k,...P,children:o.jsx(sn,{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:J,onMonthChange:oe,onChange:Je})})});cn.displayName="DatePicker";const un=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})});un.displayName="RangeCalendar";const Ot=e=>Array.isArray(e)&&e.length===2&&e.every(t=>t instanceof Date),Ba=e=>Array.isArray(e)&&e.length===2&&e[0]instanceof Date,dn=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(),J=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&&Ot(Z)&&(F(!1),N==null||N(),window.setTimeout(()=>{var re;return(re=ne.current)==null?void 0:re.focus()},0))},le=Ot(X),B=Ba(X),te=X!=null&&X[0]?de(I(X[0]).locale(J).format(P)):"",K=X!=null&&X[1]?de(I(X[1]).locale(J).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(Ze,{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(un,{locale:J,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)})})});dn.displayName="DatePickerRange";function pt(e,t,a){return Math.min(Math.max(e,t),a)}function Ua({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 ct(e){return Math.floor(e/10)}function ut({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>ct(n)||d){const v=f%10;let y,x;f>n&&r&&v<=ct(r)?(y=ve(ct(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 Ka(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 Et(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 _e=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:" : "})]})});_e.displayName="TimeInputField";const fn=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})});fn.displayName="AmPmInput";const Le=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(Et(A||i,f,a,S)),[k,L]=h.useState(A||i);Ae(()=>{g(Et(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=Ka(E.hours,E.minutes,E.seconds,f,S,E.amPm);L(F),typeof w=="function"&&w(F)},O=ut({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=ut({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=ut({onChange:P=>{c({seconds:P})},min:0,max:59,nextRef:f==="12"?D:m}),_=Ua({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()},J=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:J,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(_e,{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(_e,{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(_e,{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(fn,{ref:D,value:s.amPm,placeholder:n,amLabel:a,pmLabel:S,"aria-label":"am pm",disabled:d,onChange:_})]})})});Le.displayName="TimeInput";const Ga="DD-MMM-YYYY hh:mm a",hn=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,...J}=e,{locale:P}=ue(),E=U||P,F=b||Ga,[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=Q=>{if(B)Q.setHours(B.getHours()),Q.setMinutes(B.getMinutes());else{const Y=new Date(Date.now());Q.setHours(Y.getHours()),Q.setMinutes(Y.getMinutes())}te(Q),!V&&!l&&ie(I(Q).locale(E).format(F)),l&&ie(de(I(Q).locale(E).format(F))),l&&ce(),window.setTimeout(()=>{var Y;return(Y=se.current)==null?void 0:Y.focus()},0)},Je=()=>{var Q;te(null),le(null),ie(""),c&&pe(),(Q=se.current)==null||Q.focus(),s==null||s(null)},et=Q=>I(Q,F,E).toDate(),Pe=Q=>{typeof D=="function"&&D(Q),Z(!1)},Ie=Q=>{typeof g=="function"&&g(Q),Z(!0)},tt=Q=>{pe();const Y=et(Q.target.value);I(Y).isValid()?(te(Y),le(Y),l&&ie(Q.target.value),ae(Y)):l&&ie(Q.target.value)},nt=Q=>{if(B instanceof Date&&Q instanceof Date){const Y=new Date(B.getFullYear(),B.getMonth(),B.getDate(),Q.getHours(),Q.getMinutes(),Q.getSeconds(),Q.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 Q;return(Q=se.current)==null?void 0:Q.focus()},0),s==null||s(B)};return o.jsxs(Ze,{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:Je,onDropdownClose:k,onDropdownOpen:L,...J,children:[o.jsx(sn,{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(Le,{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})]})]})});hn.displayName="DateTimepicker";const mn=cn;mn.DatePickerRange=dn;mn.DateTimepicker=hn;const Qe=h.createContext({}),Xa=Qe.Provider,qa=Qe.Consumer,pn=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(Xa,{value:{onSelect:d,menuItemHeight:i,variant:u,sideCollapsed:f,defaultExpandedKeys:l,defaultActiveKeys:r},children:a})})});pn.displayName="Menu";const gn=h.createContext(null),Za=gn.Provider,Qa=gn.Consumer,vn=h.createContext(!1),Ja=vn.Provider,er=vn.Consumer,yn=e=>{const{eventKey:t,...a}=e;return o.jsx(qa,{children:n=>o.jsx(Qa,{children:()=>o.jsx(er,{children:()=>o.jsx($e,{menuItemHeight:n.menuItemHeight,variant:n.variant,isActive:n.defaultActiveKeys.includes(t),eventKey:t,onSelect:n.onSelect,...a})})})})};yn.displayName="MenuItem";const bn=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(Qe),{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(Ja,{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})})]})};bn.displayName="MenuCollapse";const Dn=e=>{const{label:t,children:a,className:n}=e,{variant:r,sideCollapsed:l}=h.useContext(Qe),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(Za,{value:null,children:o.jsx("ul",{children:a})})]})};Dn.displayName="MenuGroup";const Nt=pn;Nt.MenuItem=yn;Nt.MenuCollapse=bn;Nt.MenuGroup=Dn;const wn=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]})};wn.displayName="ProgressLine";const kn=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})]})]})};kn.displayName="ProgressCircle";const tr=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(wn,{percent:d,size:u,strokeColor:p,...e,children:b})),x==="circle"&&(H=o.jsx(kn,{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()})});tr.displayName="Progress";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(Le,{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(Le,{ref:q,unstyle:!0,value:A[1],clearable:!1,suffix:null,onChange:N=>U([A[0],N]),...R})]})})});Tn.displayName="TimeInputRange";const ur=Le;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{Ya as C,Ut as D,$e as M,tr as P,Na as S,ur as T,mn as a,Nt as b,dn as c,hn as d};
@@ -0,0 +1 @@
1
+ import{b as u,c as i,a as c}from"./vendor-redux-a1f00e6b.js";import{b as n,c as D}from"./WidgetLayoutsService-49730609.js";import{_ as g}from"./index-3b5ce20a.js";const y="layouts",p={loading:!1,loadingDetails:!1,isDeleteConfirmation:!1,layoutList:[],isDrawerOpen:!1,type:"Add",selectedLayout:{},selectedLayoutData:[]},d=u(y+"/getLayouts",async()=>{var t,l,s;const e=await n();return{data:((l=(t=e==null?void 0:e.data)==null?void 0:t.layouts)==null?void 0:l.$values)||[],totalCount:((s=e==null?void 0:e.data)==null?void 0:s.totalCount)||0}}),o=u(y+"/getLayoutById",async e=>{var l,s;const a=await D(e);return{layoutData:(l=a==null?void 0:a.data)!=null&&l.layoutData?JSON.parse((s=a==null?void 0:a.data)==null?void 0:s.layoutData):[],layoutDetails:(a==null?void 0:a.data)||[]}}),r=i({name:"layouts",initialState:p,reducers:{setSelectedLayout:(e,a)=>{e.selectedLayout=a.payload},toggleDrawer:(e,a)=>{e.isDrawerOpen=a.payload.isDrawerOpen,e.type=a.payload.type},toggleDelete:(e,a)=>{e.isDeleteConfirmation=a.payload}},extraReducers:e=>{e.addCase(d.fulfilled,(a,t)=>{var l;a.layoutList=(l=t==null?void 0:t.payload)==null?void 0:l.data,a.loading=!1}).addCase(d.pending,a=>{a.loading=!0}).addCase(d.rejected,a=>{a.loading=!1}).addCase(o.fulfilled,(a,t)=>{var l,s;a.selectedLayout=(l=t==null?void 0:t.payload)==null?void 0:l.layoutDetails,a.selectedLayoutData=(s=t==null?void 0:t.payload)==null?void 0:s.layoutData,a.loadingDetails=!1}).addCase(o.pending,a=>{a.loadingDetails=!0}).addCase(o.rejected,a=>{a.loadingDetails=!1})}}),{toggleDrawer:S,toggleDelete:w,setSelectedLayout:b}=r.actions,f=r.reducer,A=c({data:f}),I=g;export{w as a,o as b,d as g,A as r,b as s,S as t,I as u};
@@ -0,0 +1 @@
1
+ import{R as r}from"./RoleNew-e86a1513.js";import"./vendor-mui-98daa63f.js";import"./vendor-react-ece1c85f.js";import"./RoleForm-47691f91.js";import"./FormContainer-9a52b9e8.js";import"./index-3b5ce20a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./index-b0ef7ac3.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./StickyFooter-3e569b80.js";import"./ConfirmDialog-2838a642.js";import"./index.esm-b2d342b5.js";import"./AdaptableCard-3d1e1f96.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./RoleService-2f9ed883.js";export{r as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{r as b,u as $e,f as Te,j as _e,c as je}from"./vendor-react-ece1c85f.js";import{k as He,c as fe,P as Ie,b as Ve,g as y,E as pe,F as me,e8 as We,e9 as Ge,ea as Ke,eb as Ye,ax as Ue}from"./index-3b5ce20a.js";import{h as Je}from"./vendor-charts-4be0b5ab.js";import{b as qe,g as Xe,f as Qe}from"./DynamicTablesService-6aa57f52.js";import{b as Ze,c as et,a as tt,d as st,e as at,f as rt}from"./WidgetLayoutsService-49730609.js";import{u as nt,T as lt,a as ue,C as ot,b as Ce,c as Be,d as he,e as it,f as dt,g as ct,t as Se}from"./TweaksPanel-bc10bc47.js";import{N as xt,M as pt,O as De,u as be,a as mt,r as ut}from"./useFilteredData-e8fad668.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";const Q={ink:"var(--ink)",orange:"var(--custom-600)",muted:"var(--fg-muted)",line:"var(--border)",soft:"var(--bg-muted)",cream:"color-mix(in oklab, var(--custom-600) 8%, var(--bg))",green:"#16A34A"},ye=[{id:"datatable",name:"Data Table",icon:"table",category:"Data",desc:"Sortable, filterable rows from any source"},{id:"kpi",name:"KPI Stats",icon:"kpi",category:"Data",desc:"Headline metric tiles with deltas"},{id:"graph",name:"Graph",icon:"barChart",category:"Visualize",desc:"Bar, line, area or pie charts"},{id:"tabs",name:"Tabs",icon:"tabs",category:"Layout",desc:"Group related views in a single tab strip"},{id:"map",name:"Map",icon:"map",category:"Visualize",desc:"Geo data with points, heat & polygons"},{id:"calendar",name:"Calendar",icon:"calendar",category:"Layout",desc:"Schedule, events and bookings view"},{id:"chat",name:"Chat",icon:"chat",category:"Engage",desc:"Threaded conversation or AI assistant"},{id:"report",name:"Report",icon:"fileText",category:"Data",desc:"Long-form analytical document"},{id:"files",name:"File Explorer",icon:"folder",category:"Engage",desc:"Browse documents and assets"}],Ne=[{id:"graph",name:"Graph",icon:"barChart",category:"Visualize",desc:"Bar / line / area chart widget"},{id:"kpi",name:"KPI Stats",icon:"kpi",category:"Data",desc:"Single-number tile with sparkline"},{id:"datagrid",name:"Data Grid",icon:"grid",category:"Data",desc:"Compact tabular data block"},{id:"map",name:"Map",icon:"map",category:"Visualize",desc:"Live location & territory map"},{id:"alert",name:"Alert Message",icon:"alert",category:"Status",desc:"Inline status / warning callout"},{id:"donut",name:"Donut Chart",icon:"donut",category:"Visualize",desc:"Composition & share breakdown"},{id:"activity",name:"Activity Feed",icon:"inbox",category:"Status",desc:"Streaming timeline of events"},{id:"leaderboard",name:"Leaderboard",icon:"barChart",category:"Data",desc:"Ranked top-N list"}],ht=[{id:"operations",label:"Operations",children:[{id:"fleet",label:"Fleet"},{id:"transloads",label:"Transloads"},{id:"incidents",label:"Incidents"}]},{id:"compliance",label:"Compliance",children:[{id:"audits",label:"Audits"},{id:"permits",label:"Permits"}]},{id:"people",label:"People",children:[{id:"directory",label:"Directory"},{id:"training",label:"Training"}]},{id:"analytics",label:"Analytics",children:[{id:"exec",label:"Executive overview"},{id:"ops-kpis",label:"Ops KPIs"}]}],ne=[{eyebrow:"Build, not boilerplate",headline:["Compose internal apps in minutes","— not sprints."],body:"Drag in a <b>Data Table</b>, <b>KPI tile</b>, <b>Map</b>, or <b>Chat</b> — connect a source and ship. Auth, RBAC, and audit included.",primary:"Build",secondary:"See an example dashboard"},{eyebrow:"Configurable canvas",headline:["From idea to live page in","one afternoon."],body:"Pick a <b>Page</b> or <b>Dashboard</b>. Arrange tables, KPIs, and charts on a true grid. Hit publish.",primary:"Build a Page",secondary:"Build a Dashboard"},{eyebrow:"Ship without waiting on engineering",headline:["Drop in. Connect a source.","Hit publish."],body:"<b>No code, no theme work, no deploy.</b> Auth, RBAC, and audit logs are wired in from day one.",primary:"Get started",secondary:"Browse templates"}],bt={currentUser:"⚡ Current User",currentDate:"⚡ Today",currentMonth:"⚡ Month Start",currentYear:"⚡ Year Start",userRole:"⚡ My Role"},gt=[{target:".xf-build-cta",placement:"bottom",title:"Step 1 — Click the Build button",body:"Every page or dashboard starts here. Click the orange Build button to open the creation wizard.",cta:"Skip step",waitFor:()=>!!document.querySelector("[data-tour='wizard-title']")},{target:"[data-tour='wizard-title']",placement:"right",title:"Step 2 — Name your page",body:`Type a clear title like "Driver Performance." Once you've typed something, we'll move on.`,cta:"Skip step",waitFor:()=>{const t=document.querySelector("[data-tour='wizard-title']");return!!(t&&t.value&&t.value.trim().length>=3)}},{target:"[data-tour='wizard-continue']",placement:"top",title:"Step 3 — Continue to nav placement",body:"Click the orange Continue button to move to the next step where you choose where this page lives.",cta:"Skip step",waitFor:()=>!!document.querySelector("[data-tour='wizard-audience']")},{target:"[data-tour='wizard-audience']",placement:"left",title:"Step 4 — Audience & create",body:"Pick who can see the page, then click Create. You'll land on a blank canvas with a left-rail palette.",cta:"Skip step",waitFor:()=>!!document.querySelector("[data-tour='component-list']")},{target:"[data-tour='component-list']",placement:"right",title:"Step 5 — You're in the builder!",body:"Drag any component onto the canvas, or click it to drop it in. Click the gear on a slot to configure it. That's the whole flow.",cta:"Finish tour",waitFor:null}],le=new Map,de=new Map;function ft(t){if(le.has(t))return Promise.resolve(le.get(t));if(de.has(t))return de.get(t);const a=qe(t).then(i=>{var n;const r=((n=i==null?void 0:i.data)==null?void 0:n.schemaDefinition)??(i==null?void 0:i.schemaDefinition),d=r?typeof r=="string"?JSON.parse(r):r:null,o=((d==null?void 0:d.Columns)??[]).filter(s=>s.Name!=="Id").map(s=>({name:s.Name,label:s.DisplayName||s.Name,dataType:(s.DataType??s.dataType??"string").toLowerCase()}));return le.set(t,o),o}).catch(()=>(de.delete(t),[])).finally(()=>de.delete(t));return de.set(t,a),a}function Ee(t){const[a,i]=b.useState(()=>t?le.get(t)??[]:[]),[r,d]=b.useState(!1);return b.useEffect(()=>{if(!t){i([]);return}if(le.has(t)){i(le.get(t));return}d(!0),ft(t).then(o=>{i(o),d(!1)})},[t]),{columns:a,loading:r}}function Fe(t,a){const{title:i,...r}=t;return JSON.stringify({...r,slots:a})}function jt(t){try{const a=JSON.parse(t.layoutData||"{}");return{kind:a.kind||"page",title:t.layoutName,desc:a.desc||t.description||"",nav:a.nav||{mode:"child",parent:"operations",parentLabel:"Operations"},icon:a.icon||"fileText",refresh:a.refresh||"5m",audience:a.audience||"team",slots:a.slots||[],isDraft:a.isDraft===!0}}catch{return{kind:"page",title:t.layoutName,desc:t.description||"",nav:{mode:"child",parent:"operations",parentLabel:"Operations"},icon:"fileText",refresh:"5m",audience:"team",slots:[],isDraft:!1}}}function Ae(t){var a;try{return((a=JSON.parse(t.layoutData||"{}"))==null?void 0:a.isDraft)===!0}catch{return!1}}function Me(t){if(!t)return"";const a=Date.now()-new Date(t).getTime(),i=Math.floor(a/36e5);if(i<1)return"Just now";if(i<24)return`${i}h ago`;const r=Math.floor(i/24);return r===1?"Yesterday":`${r} days ago`}const N=({name:t,size:a=16,stroke:i=1.7})=>{const r={width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round"},d={plus:e.jsx("path",{d:"M12 5v14M5 12h14"}),x:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"}),chevronDown:e.jsx("path",{d:"M6 9l6 6 6-6"}),chevronRight:e.jsx("path",{d:"M9 6l6 6-6 6"}),chevronLeft:e.jsx("path",{d:"M15 6l-6 6 6 6"}),search:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"M21 21l-4.3-4.3"})]}),bell:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M18 8a6 6 0 10-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),e.jsx("path",{d:"M14 21a2 2 0 01-4 0"})]}),help:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"M9.1 9a3 3 0 015.8 1c0 2-3 3-3 3M12 17h.01"})]}),user:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),settings:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),logout:e.jsx(e.Fragment,{children:e.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9"})}),home:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M3 12L12 3l9 9"}),e.jsx("path",{d:"M5 10v10h14V10"})]}),layout:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"5",rx:"1.5"}),e.jsx("rect",{x:"14",y:"12",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"3",y:"16",width:"7",height:"5",rx:"1.5"})]}),layers:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),e.jsx("path",{d:"M2 17l10 5 10-5"}),e.jsx("path",{d:"M2 12l10 5 10-5"})]}),folder:e.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),file:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6"})]}),fileText:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8"})]}),table:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M3 9h18M3 15h18M9 3v18M15 3v18"})]}),barChart:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M3 3v18h18"}),e.jsx("rect",{x:"7",y:"12",width:"3",height:"6"}),e.jsx("rect",{x:"12",y:"8",width:"3",height:"10"}),e.jsx("rect",{x:"17",y:"5",width:"3",height:"13"})]}),kpi:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M7 14l3-3 3 3 4-5"})]}),map:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2z"}),e.jsx("path",{d:"M9 4v14M15 6v14"})]}),calendar:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),chat:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"}),alert:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M10.3 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),e.jsx("path",{d:"M12 9v4M12 17h.01"})]}),grid:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),sparkles:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M12 3l2 5 5 2-5 2-2 5-2-5-5-2 5-2z"}),e.jsx("path",{d:"M19 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1z"})]}),eye:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),save:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z"}),e.jsx("path",{d:"M17 21v-8H7v8M7 3v5h8"})]}),sliders:e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 21V14M4 10V3M12 21V12M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6"})}),drag:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"9",cy:"6",r:"1"}),e.jsx("circle",{cx:"9",cy:"12",r:"1"}),e.jsx("circle",{cx:"9",cy:"18",r:"1"}),e.jsx("circle",{cx:"15",cy:"6",r:"1"}),e.jsx("circle",{cx:"15",cy:"12",r:"1"}),e.jsx("circle",{cx:"15",cy:"18",r:"1"})]}),trash:e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6"})}),check:e.jsx("path",{d:"M20 6L9 17l-5-5"}),donut:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),refresh:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M23 4v6h-6"}),e.jsx("path",{d:"M1 20v-6h6"}),e.jsx("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10"}),e.jsx("path",{d:"M20.49 15A9 9 0 015.64 18.36L1 14"})]}),compass:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polygon",{points:"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"})]}),arrowRight:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"M13 5l7 7-7 7"})]}),tabs:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"9",width:"18",height:"12",rx:"2"}),e.jsx("path",{d:"M3 9V7a2 2 0 012-2h3l2-2h4l2 2h3a2 2 0 012 2v2"})]}),inbox:e.jsxs(e.Fragment,{children:[e.jsx("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),e.jsx("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]}),copy:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})};return e.jsx("svg",{...r,children:d[t]??null})},ve=({config:t,compact:a})=>{const i=t.source,r=t.columns,d=t.filters,o=a?4:50,{rows:n,total:s,loading:c}=be(i,d??null,{columns:r!=null&&r.length?r:void 0,pageNumber:1,pageSize:o}),x=r!=null&&r.length?r:n.length>0?Object.keys(n[0]).filter(v=>v.toLowerCase()!=="id"):[],E=(v,p)=>{if(v[p]!==void 0)return String(v[p]??"");const k=Object.keys(v).find(u=>u.toLowerCase()===p.toLowerCase());return k?String(v[k]??""):"—"},j=a?11:12;return c?e.jsx("div",{className:"p-2",children:[1,2,3].map(v=>e.jsx("div",{className:"h-6 rounded mb-1.5 bg-[#E9E9E9]",style:{opacity:.3+v*.15}},v))}):n.length?e.jsxs("div",{className:"xf-slot-scroll overflow-x-auto max-h-[400px] overflow-y-auto",children:[e.jsxs("table",{className:"w-full border-collapse",style:{fontSize:j},children:[e.jsx("thead",{children:e.jsx("tr",{className:"border-b-2 border-[#E9E9E9]",children:x.map(v=>e.jsx("th",{className:y("text-left font-bold uppercase tracking-[0.06em] text-[#646464] whitespace-nowrap sticky top-0 bg-white z-10",a?"text-[10px] px-1.5 py-[5px]":"text-[11px] p-2"),children:v},v))})}),e.jsx("tbody",{children:n.map((v,p)=>e.jsx("tr",{className:"border-b border-[#E9E9E9]",children:x.map(k=>e.jsx("td",{className:y("text-[#1B1B1B] max-w-[160px] overflow-hidden text-ellipsis whitespace-nowrap",a?"px-1.5 py-[5px]":"p-2"),children:E(v,k)},k))},p))})]}),s>o&&e.jsxs("div",{className:"px-2 py-[5px] text-[11px] text-[#646464] border-t border-[#E9E9E9] bg-[#F6F4F1]",children:["Showing ",o," of ",s," rows"]})]}):e.jsxs("div",{className:"py-6 text-center text-[#646464]",children:[e.jsx(N,{name:"table",size:22,stroke:1.4}),e.jsx("div",{className:"mt-1.5 text-[13px]",children:"No rows in this table yet."})]})},vt=({config:t})=>{const a=t.source,i=t.xAxis,r=t.yAxis,d=t.chart||"bar",o=t.filters,{rows:n,loading:s}=be(a,o??null,{pageSize:500});if(!a||!i||!r)return e.jsxs("div",{className:"py-6 text-center text-[#646464]",children:[e.jsx(N,{name:"barChart",size:22,stroke:1.4}),e.jsx("div",{className:"mt-1.5 text-[13px]",children:"Select a data source and X & Y axis columns to populate this chart."})]});if(s)return e.jsx("div",{className:"p-2",children:[1,2,3].map(p=>e.jsx("div",{className:"h-6 rounded mb-1.5 bg-[#E9E9E9]",style:{opacity:.3+p*.15}},p))});const c=n.map(p=>p[i]),x=n.map(p=>Number(p[r])||0),E=d==="area"?"area":d==="line"?"line":"bar",j={chart:{type:E,height:200,toolbar:{show:!1}},xaxis:{categories:c,title:{text:i}},yaxis:{title:{text:r}},colors:[Q.orange],dataLabels:{enabled:!1}},v=E==="bar"?{plotOptions:{bar:{borderRadius:4,columnWidth:"55%"}}}:{stroke:{curve:"smooth",width:2},markers:{size:4}};return e.jsx(Je,{options:{...j,...v},series:[{name:t.title||r,data:x}],type:E,height:200})};function yt(t){const a=new Date,i=d=>d.toISOString().slice(0,10),r=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(t==="day"){const d=new Date(r);return d.setDate(r.getDate()-1),{curStart:i(r),curEnd:i(a),prevStart:i(d),prevEnd:i(r)}}if(t==="week"){const d=new Date(r);d.setDate(r.getDate()-r.getDay());const o=new Date(d);return o.setDate(d.getDate()-7),{curStart:i(d),curEnd:i(a),prevStart:i(o),prevEnd:i(d)}}if(t==="month"){const d=new Date(a.getFullYear(),a.getMonth(),1),o=new Date(a.getFullYear(),a.getMonth()-1,1);return{curStart:i(d),curEnd:i(a),prevStart:i(o),prevEnd:i(d)}}if(t==="year"){const d=new Date(a.getFullYear(),0,1),o=new Date(a.getFullYear()-1,0,1);return{curStart:i(d),curEnd:i(a),prevStart:i(o),prevEnd:i(d)}}return{curStart:"",curEnd:"",prevStart:"",prevEnd:""}}function Nt(t,a){const i=a.valueFormat??"number",r=a.decimalPrecision??0,d=a.useAbbreviation??!1,o=a.currencySymbol??"$";let n=t,s="";d&&(n>=1e6?(n=n/1e6,s="M"):n>=1e3&&(n=n/1e3,s="K"));const c=n.toLocaleString(void 0,{minimumFractionDigits:r,maximumFractionDigits:r});return i==="currency"?`${o}${c}${s}`:i==="percentage"?`${c}${s}%`:`${c}${s}`}const Et=({card:t})=>{const{source:a,col:i,label:r,comparisonPeriod:d="none",dateColumn:o,dateRangeStart:n,dateRangeEnd:s,valueFormat:c="number",currencySymbol:x="$",useAbbreviation:E=!1,decimalPrecision:j=0,showTrend:v=!0,positiveIsGood:p=!0,filters:k}=t,[u,m]=b.useState(null),[l,g]=b.useState(null),[D,f]=b.useState(!1),F=JSON.stringify(k),S=b.useCallback(async A=>{var W;const T=[];o&&A&&(T.push({columnName:o,operator:">=",value:A.from}),T.push({columnName:o,operator:"<=",value:A.to}));const P=((k==null?void 0:k.conditions)??[]).filter(G=>G.enabled&&G.columnName).map(G=>{const se=mt[G.operator]??G.operator;return{columnName:G.columnName,operator:se,values:G.dynamic?[ut(G.dynamic)]:G.values??[]}}),H={conditions:[...T,...P],logicalOperator:"AND",pageNumber:1,pageSize:1},V=await Qe(a,H);console.log("res",V);const Y=((W=V==null?void 0:V.data)==null?void 0:W.totalRows)??null;return typeof Y=="number"?Y:null},[a,i,o,F]);b.useEffect(()=>{if(!a){m(null),g(null);return}f(!0),(async()=>{try{if(d==="dateRange"&&o&&n&&s)m(await S({from:n,to:s})),g(null);else if(d!=="none"&&o){const{curStart:T,curEnd:P,prevStart:H,prevEnd:V}=yt(d),[Y,W]=await Promise.all([S({from:T,to:P}),S({from:H,to:V})]);m(Y),g(W)}else m(await S()),g(null)}catch{m(null),g(null)}finally{f(!1)}})()},[a,i,d,o,n,s,S]);const w=u!==null&&l!==null&&l!==0?(u-l)/l*100:null,R=w!==null&&w>=0,_=p?R:!R,C=_?"#16A34A":"#DC2626",I=_?"#E8F7EE":"#FEE2E2",X={day:"vs yesterday",week:"vs last week",month:"vs last month",year:"vs last year"};return e.jsxs("div",{className:"bg-[#FBF2EA] rounded-[10px] p-3",children:[e.jsx("div",{className:"text-[15px] font-bold uppercase tracking-[0.06em] text-[#646464]",children:r||i||"Metric"}),e.jsx("div",{className:"text-[22px] font-black text-[#1B1B1B] leading-none mt-1",children:D?e.jsx("span",{className:"text-sm text-[#999]",children:"…"}):u!==null?Nt(u,{valueFormat:c,currencySymbol:x,useAbbreviation:E,decimalPrecision:j}):"—"}),d!=="none"&&v&&w!==null&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2",children:[e.jsxs("span",{className:"text-[11px] font-bold px-1.5 py-0.5 rounded-full",style:{background:I,color:C},children:[R?"▲":"▼"," ",Math.abs(w).toFixed(1),"%"]}),e.jsx("span",{className:"text-xs text-[#646464]",children:X[d]??""})]})]})},wt=({config:t})=>{const a=t.source,i=t.latCol,r=t.lngCol,d=t.filters,{rows:o,total:n,loading:s}=be(a,d??null,{pageSize:500});if(!i||!r)return e.jsxs("div",{className:"h-[180px] rounded-lg flex items-center justify-center flex-col gap-2",style:{background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)"},children:[e.jsx(N,{name:"map",size:24}),e.jsx("div",{className:"text-[13px] text-[#646464] text-center px-4",children:"Select a data source, then pick latitude and longitude columns to visualise points."})]});const c=o.map(f=>({lat:parseFloat(f[i]),lng:parseFloat(f[r])})).filter(f=>!isNaN(f.lat)&&!isNaN(f.lng));if(s)return e.jsx("div",{className:"h-[180px] rounded-lg flex items-center justify-center",style:{background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)"},children:e.jsx("div",{className:"text-[13px] text-[#646464]",children:"Loading map data…"})});const x=c.map(f=>f.lat),E=c.map(f=>f.lng),j=c.length?Math.min(...x):0,v=c.length?Math.max(...x):1,p=c.length?Math.min(...E):0,k=c.length?Math.max(...E):1,u=v-j||1,m=k-p||1,l=24,g=600-l*2,D=200-l*2;return e.jsxs("div",{className:"h-[180px] rounded-lg relative overflow-hidden",style:{background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)"},children:[e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 600 200",preserveAspectRatio:"none",children:[e.jsx("path",{d:"M0,140 Q120,100 200,120 T400,90 T600,110 L600,200 L0,200 Z",fill:"rgba(46,122,194,0.12)"}),c.map((f,F)=>{const S=l+(f.lng-p)/m*g,w=l+(v-f.lat)/u*D;return e.jsxs("g",{children:[e.jsx("circle",{cx:S,cy:w,r:"12",fill:Q.orange,opacity:"0.2"}),e.jsx("circle",{cx:S,cy:w,r:"5",fill:Q.orange})]},F)}),c.length===0&&e.jsx("text",{x:"300",y:"108",textAnchor:"middle",fontSize:"13",fill:Q.muted,children:"No rows matched for selected columns"})]}),e.jsxs("div",{className:"absolute top-2.5 right-2.5 bg-white px-2.5 py-[5px] rounded-full text-[13px] font-bold shadow-[0_1px_3px_rgba(0,0,0,0.06)]",children:[t.layer||"Points"," · ",c.length,n>500?` of ${n}`:""]})]})},kt=({config:t})=>{const a=t.tabDefs||[],[i,r]=b.useState(0),d=Math.min(i,Math.max(0,a.length-1)),o=a[d];return a.length===0?e.jsxs("div",{children:[e.jsx("div",{className:"flex border-b border-[#E9E9E9] mb-3",children:["Overview","Activity","Settings"].map((n,s)=>e.jsx("button",{className:y("border-0 bg-transparent px-3.5 py-2.5 font-bold text-[15px] cursor-pointer border-b-2",s===0?"text-custom-600 border-custom-600":"text-[#646464] border-transparent"),children:n},n))}),e.jsx("div",{className:"text-[13px] text-[#646464]",children:"Configure each tab with a data source to show live data."})]}):e.jsxs("div",{children:[e.jsx("div",{className:"flex border-b border-[#E9E9E9] mb-3 flex-wrap",children:a.map((n,s)=>e.jsx("button",{onClick:()=>r(s),className:y("border-0 bg-transparent px-3.5 py-2.5 font-bold text-[15px] cursor-pointer whitespace-nowrap border-b-2",s===d?"text-custom-600 border-custom-600":"text-[#646464] border-transparent"),children:n.label||`Tab ${s+1}`},s))}),o&&(o.source?e.jsx(ve,{config:{source:o.source,columns:o.columns,filters:o.filters}}):e.jsx("div",{className:"py-5 text-center text-[#646464] text-[13px]",children:"No data source configured for this tab."}))]})},Ct=({config:t})=>{const a=t.source,i=t.nameCol,r=t.infoCol,d=t.dateCol,o=t.filters,{rows:n,loading:s}=be(a,o??null,{pageSize:100});if(!a)return e.jsx("div",{className:"border border-[#E9E9E9] rounded-lg overflow-hidden",children:[["folder","Permits 2026","12 files","2d"],["folder","SOWs","48 files","5d"],["file","Driver-handbook-v9.pdf","2.4 MB","6d"],["file","Safety-stand-down-Q1.docx","380 KB","2w"]].map((x,E)=>e.jsxs("div",{className:y("grid items-center gap-2.5 px-3.5 py-2.5 text-[13px]",E<3?"border-b border-[#E9E9E9]":""),style:{gridTemplateColumns:"24px 1fr 100px 60px"},children:[e.jsx(N,{name:x[0],size:16,stroke:1.6}),e.jsx("span",{className:"font-bold text-[#1B1B1B]",children:x[1]}),e.jsx("span",{className:"text-[#646464] text-xs",children:x[2]}),e.jsx("span",{className:"text-[#646464] text-xs",children:x[3]})]},E))});if(s)return e.jsx("div",{className:"border border-[#E9E9E9] rounded-lg overflow-hidden",children:[1,2,3,4].map(x=>e.jsxs("div",{className:"flex gap-2.5 items-center px-3.5 py-2.5 border-b border-[#E9E9E9]",children:[e.jsx("div",{className:"w-4 h-4 rounded-[3px] bg-[#E9E9E9] opacity-50 shrink-0"}),e.jsx("div",{className:"h-[13px] flex-1 rounded-[3px] bg-[#E9E9E9] opacity-40"}),e.jsx("div",{className:"w-[70px] h-[11px] rounded-[3px] bg-[#E9E9E9] opacity-30"})]},x))});if(n.length===0)return e.jsxs("div",{className:"border border-[#E9E9E9] rounded-lg px-4 py-7 text-center text-[#646464]",children:[e.jsx(N,{name:"folder",size:22,stroke:1.4}),e.jsx("div",{className:"mt-1.5 text-[13px]",children:"No items found in this data source."})]});const c=i||(Object.keys(n[0]).find(x=>!["$id","id","Id"].includes(x))??"");return e.jsx("div",{className:"xf-slot-scroll border border-[#E9E9E9] rounded-lg overflow-hidden max-h-[400px] overflow-y-auto",children:n.map((x,E)=>{const j=String(x[i||c]??"—"),v=r?String(x[r]??"—"):"—",p=d?String(x[d]??"—"):"—",k=E===n.length-1;return e.jsxs("div",{className:y("grid items-center gap-2.5 px-3.5 py-2.5 text-[13px]",!k&&"border-b border-[#E9E9E9]"),style:{gridTemplateColumns:"24px 1fr 100px 60px"},children:[e.jsx(N,{name:"file",size:16,stroke:1.6}),e.jsx("span",{className:"font-bold text-[#1B1B1B] overflow-hidden text-ellipsis whitespace-nowrap",children:j}),e.jsx("span",{className:"text-[#646464] text-xs",children:v}),e.jsx("span",{className:"text-[#646464] text-xs",children:p})]},E)})})},Bt=({kind:t,type:a,config:i})=>{const r=i||{},d=(o,n)=>{const s={ok:"text-[#16A34A] bg-[rgba(22,163,74,0.1)]",wrn:"text-[#c47b18] bg-[rgba(232,163,58,0.16)]",err:"text-[#DC2626] bg-[rgba(220,38,38,0.1)]"}[n];return e.jsx("span",{className:`text-sm font-bold px-[7px] py-0.5 rounded-full ${s}`,children:o})};if(a==="datatable")return r.source?e.jsx(ve,{config:r}):e.jsx("div",{children:e.jsxs("table",{className:"w-full border-collapse text-xs",children:[e.jsx("thead",{children:e.jsx("tr",{className:"border-b-2 border-[#E9E9E9]",children:(r.columns||["Driver","Route","Status","On-time"]).map(o=>e.jsx("th",{className:"text-left px-2 py-1.5 text-sm font-bold uppercase tracking-[0.06em] text-[#646464]",children:o},o))})}),e.jsx("tbody",{children:[["M. Saldana","HOU-DAL-23","ok","98.4%"],["R. Patel","HOU-SAT-11","wrn","91.0%"],["L. Nguyen","HOU-AUS-07","ok","96.2%"],["D. Carter","HOU-CRP-09","err","83.7%"]].map(([o,n,s,c])=>e.jsxs("tr",{className:"border-b border-[#E9E9E9]",children:[e.jsx("td",{className:"p-2 font-bold text-[#1B1B1B]",children:o}),e.jsx("td",{className:"p-2 text-[#646464]",children:n}),e.jsx("td",{className:"p-2",children:d(s==="ok"?"On-time":s==="wrn"?"Delayed":"Late",s)}),e.jsx("td",{className:"p-2 text-[#1B1B1B]",children:c})]},o))})]})});if(a==="kpi"){const o=r.kpiCards||[];return o.length===0?e.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:[{l:"Active drivers",v:"142"},{l:"Avg on-time",v:"94.6%"},{l:"Idle min/day",v:"18m"}].map((n,s)=>e.jsxs("div",{className:"bg-[#FBF2EA] rounded-[10px] p-3",children:[e.jsx("div",{className:"text-[15px] font-bold uppercase tracking-[0.06em] text-[#646464]",children:n.l}),e.jsx("div",{className:"text-[22px] font-black text-[#1B1B1B] leading-none mt-1",children:n.v})]},s))}):e.jsx("div",{className:"grid gap-2.5",style:{gridTemplateColumns:`repeat(${o.length},1fr)`},children:o.map((n,s)=>e.jsx(Et,{card:n},s))})}if(a==="graph")return e.jsx(vt,{config:r});if(a==="tabs")return e.jsx(kt,{config:r});if(a==="map")return e.jsx(wt,{config:r});if(a==="calendar")return e.jsxs("div",{children:[e.jsx("div",{className:"grid grid-cols-7 text-sm text-[#646464] font-bold mb-1.5 uppercase tracking-[0.04em]",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(o=>e.jsx("div",{className:"px-2 py-1",children:o},o))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:35}).map((o,n)=>{const s=n-2,c=s===14,x=[3,7,12,14,18,22,26].includes(s);return e.jsx("div",{className:y("border border-[#E9E9E9] rounded-[6px] p-1.5 relative",c?"bg-[#FBF2EA]":"bg-white"),style:{aspectRatio:"1.4/1"},children:s>0&&s<=31&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:y("text-[15px]",c?"font-bold text-custom-600":"font-normal text-[#1B1B1B]"),children:s}),x&&e.jsx("div",{className:"absolute bottom-1.5 left-1.5 right-1.5 h-[3px] bg-custom-600 rounded-sm opacity-80"})]})},n)})})]});if(a==="chat")return e.jsxs("div",{className:"border border-[#E9E9E9] rounded-lg overflow-hidden bg-white",children:[e.jsxs("div",{className:"px-3 py-2 border-b border-[#E9E9E9] text-sm font-bold text-[#1B1B1B] flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-[#16A34A]"}),r.channel||"Operations · #drivers"]}),e.jsx("div",{className:"p-3 flex flex-col gap-2.5 text-xs",children:[{init:"RM",bg:"#D6E5F5",fg:"#2E7AC2",name:"Rafael M.",time:"9:42a",msg:"Truck 22 needs an unscheduled inspection at HOU yard."},{init:"BO",bg:"rgba(241,90,34,0.1)",fg:Q.orange,name:"Brian O.",time:"9:43a",msg:"Got it — routing to bay 4. ETA 11min."}].map(o=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center text-sm font-bold shrink-0",style:{background:o.bg,color:o.fg},children:o.init}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-bold text-[15px] text-[#1B1B1B]",children:[o.name," ",e.jsx("span",{className:"text-[#646464] font-light ml-1.5",children:o.time})]}),e.jsx("div",{className:"text-[#1B1B1B]",children:o.msg})]})]},o.init))}),e.jsx("div",{className:"px-3 py-2 border-t border-[#E9E9E9] text-sm text-[#646464]",children:"Type a message…"})]});if(a==="report")return e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-[18px] text-[#1B1B1B] mb-1.5",children:"Q1 Operations review"}),e.jsx("div",{className:"text-sm text-[#646464] mb-3",children:"Generated weekly · last run 2h ago"}),e.jsxs("div",{className:"text-[15px] text-[#1B1B1B] leading-[1.6] mb-2.5",children:["Total transload throughput up ",e.jsx("b",{children:"14.2%"})," quarter-over-quarter, with the largest gains in the Houston Yard and HOU-DAL corridor…"]}),e.jsx("div",{className:"flex gap-2",children:["12 sections","Auto-export · PDF"].map(o=>e.jsx("div",{className:"px-2.5 py-1 bg-[#F6F4F1] rounded-full text-[15px] text-[#646464] font-bold",children:o},o))})]});if(a==="files")return e.jsx(Ct,{config:r});if(a==="datagrid")return r.source?e.jsx(ve,{config:r,compact:!0}):e.jsxs("table",{className:"w-full border-collapse text-xs",children:[e.jsx("thead",{children:e.jsx("tr",{className:"border-b-2 border-[#E9E9E9]",children:["Site","Throughput","Dwell","State"].map(o=>e.jsx("th",{className:"text-left px-2 py-1.5 text-sm font-bold uppercase tracking-[0.06em] text-[#646464]",children:o},o))})}),e.jsxs("tbody",{children:[e.jsxs("tr",{className:"border-b border-[#E9E9E9]",children:[e.jsx("td",{className:"p-2 font-bold text-[#1B1B1B]",children:"HOU-Yard-1"}),e.jsx("td",{className:"p-2",children:"2,140 / hr"}),e.jsx("td",{className:"p-2",children:"8.4m"}),e.jsx("td",{className:"p-2",children:d("Healthy","ok")})]}),e.jsxs("tr",{className:"border-b border-[#E9E9E9]",children:[e.jsx("td",{className:"p-2 font-bold text-[#1B1B1B]",children:"DAL-NorthGate"}),e.jsx("td",{className:"p-2",children:"1,820 / hr"}),e.jsx("td",{className:"p-2",children:"11.0m"}),e.jsx("td",{className:"p-2",children:d("Watch","wrn")})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"p-2 font-bold text-[#1B1B1B]",children:"SAT-Inland"}),e.jsx("td",{className:"p-2",children:"1,540 / hr"}),e.jsx("td",{className:"p-2",children:"14.8m"}),e.jsx("td",{className:"p-2",children:d("Backed up","err")})]})]})]});if(a==="alert"){const o=r.level||"warning",n={info:"bg-[#E6EFF8] text-[#2E7AC2]",warning:"bg-[rgba(232,163,58,0.16)] text-[#c47b18]",danger:"bg-[rgba(220,38,38,0.1)] text-[#DC2626]"};return e.jsxs("div",{className:`${n[o]||n.warning} px-4 py-3.5 rounded-lg flex items-start gap-3`,children:[e.jsx(N,{name:"alert",size:18,stroke:1.8}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-[15px] mb-0.5",children:r.title||"Throughput threshold breached"}),e.jsx("div",{className:"text-sm opacity-90",children:r.body||"SAT-Inland exceeded average dwell time of 12m for the last 30min window."})]})]})}return a==="donut"?e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 42 42",children:[e.jsx("circle",{cx:"21",cy:"21",r:"15.9",fill:"none",stroke:Q.soft,strokeWidth:"6"}),e.jsx("circle",{cx:"21",cy:"21",r:"15.9",fill:"none",stroke:Q.orange,strokeWidth:"6",strokeDasharray:"58 100",strokeDashoffset:"25",transform:"rotate(-90 21 21)"}),e.jsx("circle",{cx:"21",cy:"21",r:"15.9",fill:"none",stroke:"#F49A5C",strokeWidth:"6",strokeDasharray:"22 100",strokeDashoffset:"-33",transform:"rotate(-90 21 21)"}),e.jsx("circle",{cx:"21",cy:"21",r:"15.9",fill:"none",stroke:"#334155",strokeWidth:"6",strokeDasharray:"20 100",strokeDashoffset:"-55",transform:"rotate(-90 21 21)"})]}),e.jsx("div",{className:"text-[13px]",children:[["Government",Q.orange,"58%"],["Industrial","#F49A5C","22%"],["Medical","#334155","20%"]].map(([o,n,s])=>e.jsxs("div",{className:"flex items-center gap-2 my-1",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-[2px] shrink-0",style:{background:n}}),e.jsx("span",{className:"text-[#1B1B1B]",children:o}),e.jsxs("span",{className:"text-[#646464]",children:[" · ",s]})]},o))})]}):a==="activity"?e.jsx("ul",{className:"p-0 m-0 list-none",children:[["green","Cimarron deployed v2.4","12 min ago"],["accent","ca-discovery generated W6HCG report","1 hr ago"],["accent","Harris County · 3,500 devices synced","3 hr ago"],["gray","Healix SOW signed","Yesterday"]].map(([o,n,s],c)=>e.jsxs("li",{className:y("flex gap-2.5 py-2.5",c<3&&"border-b border-[#F0F0F0]"),children:[e.jsx("span",{className:y("w-2 h-2 rounded-full mt-1.5 shrink-0",o==="green"?"bg-[#16A34A]":o==="gray"?"bg-[#CBD5E1]":"bg-custom-600")}),e.jsxs("div",{className:"flex-1 text-xs",children:[e.jsx("div",{className:"text-[#1B1B1B]",children:n}),e.jsx("div",{className:"text-[#646464] text-[15px] mt-0.5",children:s})]})]},c))}):a==="leaderboard"?e.jsx("div",{children:[["1","HOU-Yard-1","98.4%"],["2","DAL-NorthGate","96.1%"],["3","AUS-Central","94.0%"],["4","SAT-Inland","91.8%"]].map(([o,n,s])=>e.jsxs("div",{className:"grid items-center px-1 py-2.5 border-b border-[#E9E9E9] text-[13px]",style:{gridTemplateColumns:"24px 1fr 60px"},children:[e.jsx("span",{className:"font-bold text-custom-600",children:o}),e.jsx("span",{className:"text-[#1B1B1B] font-bold",children:n}),e.jsx("span",{className:"text-[#646464] text-right",children:s})]},o))}):e.jsx("div",{className:"p-5 text-[#646464] text-[13px]",children:"No preview available."})},St=({value:t,onChange:a,menus:i=[]})=>{var p;const r=b.useMemo(()=>{const k=i.filter(u=>{var m,l;return(((l=(m=u.childMenus)==null?void 0:m.$values)==null?void 0:l.length)??0)>0});return k.length>0?k.map(u=>{var m;return{id:u.id,label:u.menuName,children:(((m=u.childMenus)==null?void 0:m.$values)??[]).map(l=>({id:l.id,label:l.menuName})).sort((l,g)=>l.label.localeCompare(g.label))}}).sort((u,m)=>u.label.localeCompare(m.label)):ht},[i]),d=t.parent||((p=r[0])==null?void 0:p.id)||"",[o,n]=b.useState(t.mode||"child"),[s,c]=b.useState(d),[x,E]=b.useState(d),j=(k,u)=>{if(n(k),c(u),k==="parent")a({mode:"parent"});else{const m=r.find(l=>l.id===u);a({mode:"child",parent:u,parentLabel:m==null?void 0:m.label})}},v=({active:k,title:u,desc:m,onClick:l})=>e.jsxs("div",{onClick:l,className:y("flex items-start gap-3 px-3.5 py-3 rounded-lg border-2 cursor-pointer mb-2",k?"border-custom-600 bg-[#FBF2EA]":"border-[#E9E9E9] bg-white"),children:[e.jsx("div",{className:y("w-[18px] h-[18px] rounded-full border-2 shrink-0 mt-0.5 flex items-center justify-center",k?"border-custom-600 bg-custom-600":"border-[#CCC] bg-transparent"),children:k&&e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-bold text-[#1B1B1B]",children:u}),e.jsx("div",{className:"text-[15px] text-[#646464] mt-0.5",children:m})]})]});return e.jsxs("div",{children:[e.jsx(v,{active:o==="child",title:"Place under an existing parent",desc:"Adds this as a child link inside a current navigation group.",onClick:()=>j("child",s)}),e.jsx(v,{active:o==="parent",title:"Make it its own top-level parent",desc:"Adds a new section to the main navigation bar.",onClick:()=>{n("parent"),a({mode:"parent"})}}),o==="child"&&e.jsxs("div",{className:"mt-1",children:[e.jsx("div",{className:"text-[15px] text-[#646464] mb-1.5",children:"Pick the parent group:"}),e.jsxs("div",{className:"border border-[#E9E9E9] rounded-lg overflow-hidden",children:[r.map(k=>e.jsxs("div",{children:[e.jsxs("div",{onClick:()=>{const u=x===k.id?null:k.id;E(u),j("child",k.id)},className:y("flex items-center gap-2 px-3 py-[9px] border-b border-[#E9E9E9] cursor-pointer text-[15px] font-semibold text-[#1B1B1B]",s===k.id?"bg-[#FBF2EA]":"bg-white"),children:[e.jsx(N,{name:"folder",size:14}),k.label,e.jsx("span",{className:"ml-auto text-sm text-[#646464] bg-[#F6F4F1] rounded-full px-1.5 py-0",children:k.children.length}),e.jsx(N,{name:x===k.id?"chevronDown":"chevronRight",size:12})]}),x===k.id&&k.children.map(u=>e.jsxs("div",{className:"flex items-center gap-2 pl-8 pr-3 py-2 border-b border-[#F8F8F8] text-sm text-[#646464] bg-[#FAFAFA]",children:[e.jsx(N,{name:"file",size:12}),u.label]},u.id))]},k.id)),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-[9px] text-[15px] text-[#646464] cursor-pointer hover:bg-[#F6F4F1]",children:[e.jsx(N,{name:"plus",size:14}),"Create new parent group…"]})]})]})]})},Dt=({catalog:t,onAdd:a,onDragStart:i})=>{const[r,d]=b.useState(""),o=t.filter(s=>!r||s.name.toLowerCase().includes(r.toLowerCase())||s.desc.toLowerCase().includes(r.toLowerCase())),n=[...new Set(o.map(s=>s.category))];return e.jsxs("aside",{"data-tour":"component-list",className:"w-[260px] border-r border-[#E9E9E9] bg-[#F6F4F1] overflow-auto shrink-0 flex flex-col",children:[e.jsxs("div",{className:"px-3.5 pt-3 pb-2.5 border-b border-[#E9E9E9]",children:[e.jsx("div",{className:"text-[15px] font-bold text-[#1B1B1B] mb-1",children:"Components"}),e.jsx("div",{className:"text-[15px] text-[#646464]",children:"Drag onto the canvas or click to add"})]}),e.jsx("div",{className:"px-2.5 py-2 border-b border-[#E9E9E9]",children:e.jsxs("div",{className:"flex items-center gap-1.5 bg-white border border-[#E9E9E9] rounded-[6px] px-2 py-1.5",children:[e.jsx(N,{name:"search",size:12,stroke:1.8}),e.jsx("input",{value:r,onChange:s=>d(s.target.value),placeholder:"Search…",className:"border-none bg-transparent outline-none text-[15px] text-[#1B1B1B] w-full"})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:n.map(s=>e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-bold uppercase tracking-[0.08em] text-[#999] px-3.5 pt-2.5 pb-1",children:s}),o.filter(c=>c.category===s).map(c=>e.jsxs("div",{draggable:!0,onDragStart:x=>i(x,c.id),onClick:()=>a(c),className:"flex items-center gap-2.5 px-3.5 py-2 cursor-pointer hover:bg-[#EBEBEB]",children:[e.jsx("div",{className:"w-7 h-7 rounded-[7px] bg-white grid place-items-center text-custom-600 shrink-0 shadow-[0_1px_3px_rgba(0,0,0,0.06)]",children:e.jsx(N,{name:c.icon,size:14})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-bold text-[#1B1B1B]",children:c.name}),e.jsx("div",{className:"text-sm text-[#646464] mt-0.5 leading-[1.3]",children:c.desc})]})]},c.id))]},s))})]})},Ft=({artifact:t,slots:a,selectedId:i,mode:r,dragOver:d,onSelect:o,onRemove:n,onAdd:s,onCanvasDragOver:c,onCanvasDragLeave:x,onCanvasDrop:E,onSlotDragStart:j,onSlotDragOver:v,onSlotDrop:p,onSlotDragEnd:k,dropTarget:u,draggingId:m,gridRef:l,resizing:g,startResize:D})=>{const f=t.kind==="page"?ye:Ne,F=t.kind==="page"?["datatable","kpi","graph","tabs","map","calendar","chat","report","files"]:["kpi","graph","datagrid","map","alert","donut","activity","leaderboard"],S=({max:w})=>e.jsx("div",{className:"flex flex-wrap gap-1.5",children:(w?F.slice(0,w):F).map(R=>{const _=f.find(C=>C.id===R);return e.jsxs("button",{onClick:()=>s(R),className:"inline-flex items-center gap-[5px] text-[15px] font-bold px-2.5 py-[5px] rounded-full border border-[#E9E9E9] bg-white text-[#1B1B1B] cursor-pointer hover:border-custom-600 hover:text-custom-600",children:[e.jsx(N,{name:_.icon,size:11}),_.name]},R)})});return e.jsx("div",{className:"flex-1 overflow-auto bg-[#FAFAFA]",onDragOver:c,onDragLeave:x,onDrop:E,children:e.jsxs("div",{className:"px-6 pb-12",children:[e.jsxs("div",{className:"pt-6 pb-4 border-b border-[#E9E9E9] mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-1",children:[e.jsx("h1",{className:"text-[24px] font-black text-[#1B1B1B] m-0",children:t.title}),t.isDraft?e.jsx("span",{className:"text-[15px] font-bold px-2 py-0.5 rounded-full bg-[rgba(241,90,34,0.1)] text-custom-600",children:"● Draft"}):e.jsx("span",{className:"text-[13px] font-bold px-2 py-0.5 rounded-full bg-[rgba(22,163,74,0.1)] text-[#16A34A]",children:"● Published"})]}),t.desc&&e.jsx("p",{className:"text-[15px] text-[#646464] m-0 mb-2",children:t.desc}),e.jsxs("div",{className:"flex gap-4 text-sm text-[#646464] flex-wrap",children:[e.jsxs("span",{children:[e.jsx("b",{className:"text-[#1B1B1B]",children:"Type"})," · ",t.kind==="page"?"Page":"Dashboard"]}),e.jsxs("span",{children:[e.jsx("b",{className:"text-[#1B1B1B]",children:"Location"})," · ",t.nav.mode==="parent"?`${t.title} (top-level)`:`${t.nav.parentLabel} / ${t.title}`]}),e.jsxs("span",{children:[e.jsx("b",{className:"text-[#1B1B1B]",children:"Audience"})," · ",t.audience]}),t.kind!=="page"&&e.jsxs("span",{children:[e.jsx("b",{className:"text-[#1B1B1B]",children:"Refresh"})," · ",t.refresh]})]})]}),a.length===0?e.jsxs("div",{className:y("border-2 border-dashed rounded-2xl px-6 py-10 text-center transition-[border-color,background] duration-200",d?"border-custom-600 bg-[#FBF2EA]":"border-[#E9E9E9] bg-white"),children:[e.jsx("div",{className:"w-14 h-14 rounded-[14px] border-2 border-dashed border-[#E9E9E9] grid place-items-center mx-auto mb-4 text-[#CCC]",children:e.jsx(N,{name:"plus",size:24,stroke:1.5})}),e.jsx("h3",{className:"font-bold text-[18px] text-[#1B1B1B] m-0 mb-1.5",children:t.kind==="page"?"This page is empty":"This dashboard is empty"}),e.jsxs("p",{className:"text-[15px] text-[#646464] m-0 mb-5",children:["Drag a ",t.kind==="page"?"component":"widget"," from the left panel, or pick a quick-start below."]}),e.jsx(S,{})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:l,className:"grid grid-cols-12 gap-3",children:a.map(w=>{const R=f.find(A=>A.id===w.type),_=w.span||(t.kind==="page"?12:6),C=(g==null?void 0:g.id)===w.id,I={4:"1/3",6:"1/2",8:"2/3",12:"Full"},X=(u==null?void 0:u.id)===w.id?`${u.side==="before"?"-4px":"4px"} 0 0 var(--custom-600)`:void 0;return e.jsxs("div",{className:y("bg-white border-2 rounded-xl overflow-hidden relative transition-[border-color,box-shadow] duration-150",i===w.id?"border-custom-600 shadow-[0_0_0_3px_rgba(241,90,34,0.12)]":"border-[#E9E9E9]",m===w.id?"opacity-50":"opacity-100",r==="edit"?"cursor-pointer":"cursor-default"),style:{gridColumn:`span ${_}`,boxShadow:X},draggable:r==="edit"&&!g,onClick:()=>o(w.id),onDragStart:A=>j(A,w),onDragOver:A=>v(A,w),onDrop:A=>p(A,w),onDragEnd:k,children:[r==="edit"&&e.jsxs("div",{className:y("flex items-center gap-2 px-2.5 py-[7px] border-b border-[#F4F4F4]",i===w.id?"bg-[#FBF2EA]":"bg-[#F6F4F1]"),children:[e.jsxs("span",{className:"flex items-center gap-1 text-sm font-bold uppercase tracking-[0.06em] text-[#646464]",children:[e.jsx(N,{name:R.icon,size:10}),R.name]}),e.jsx("span",{className:"text-sm font-bold text-[#1B1B1B] flex-1",children:w.config.title||R.name}),(()=>{var P,H,V;const A=(P=w.config)==null?void 0:P.filters,T=((V=(H=A==null?void 0:A.conditions)==null?void 0:H.filter(Y=>Y.enabled&&Y.columnName))==null?void 0:V.length)??0;return T>0?e.jsxs("span",{className:"text-[10px] font-bold px-1.5 py-0 rounded-full bg-[rgba(241,90,34,0.12)] text-custom-600 shrink-0",children:[T," filter",T!==1?"s":""]}):null})(),e.jsx("div",{className:"flex gap-0.5",children:[["sliders","Configure",()=>{o(w.id)}],["drag","Reorder",null],["copy","Duplicate",null],["trash","Remove",()=>n(w.id)]].map(([A,T,P])=>e.jsx("button",{title:T,onClick:H=>{H.stopPropagation(),P&&P()},className:y("w-[22px] h-[22px] rounded border-none bg-transparent grid place-items-center",A==="drag"?"cursor-grab":"cursor-pointer",A==="trash"?"text-[#CCC] hover:text-[#DC2626]":"text-[#646464] hover:text-custom-600"),children:e.jsx(N,{name:A,size:12})},A))})]}),e.jsx("div",{className:"p-4",children:w.configured?e.jsx(Bt,{kind:t.kind,type:w.type,config:w.config}):e.jsxs("div",{className:"text-center px-4 py-6",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-[#F6F4F1] grid place-items-center mx-auto mb-2.5 text-[#646464]",children:e.jsx(N,{name:R.icon,size:18})}),e.jsxs("p",{className:"text-[15px] text-[#646464] m-0 mb-3",children:[R.name," added — configure it to populate data."]}),e.jsxs("button",{onClick:A=>{A.stopPropagation(),o(w.id)},className:"inline-flex items-center gap-1.5 px-3.5 py-[7px] text-sm font-bold text-custom-600 border border-[1.5px] border-custom-600 rounded-lg bg-transparent cursor-pointer",children:[e.jsx(N,{name:"sliders",size:12}),"Open configurator"]})]})}),r==="edit"&&e.jsx("div",{title:"Drag to resize",onMouseDown:A=>D(A,w),onClick:A=>A.stopPropagation(),className:"absolute top-0 right-0 bottom-0 w-2 cursor-ew-resize flex items-center justify-center opacity-0 hover:opacity-100",children:e.jsx("div",{className:y("w-[3px] h-6 rounded",C?"bg-custom-600":"bg-[rgba(27,27,27,0.25)]")})}),C&&e.jsxs("div",{className:"absolute top-2 right-3.5 bg-[#1B1B1B] text-white text-sm font-bold px-2 py-[3px] rounded-full pointer-events-none",children:[I[_]," · ",_,"/12"]})]},w.id)})}),r==="edit"&&e.jsxs("div",{className:y("border-2 border-dashed rounded-xl px-4 py-5 mt-4 text-center transition-[border-color,background] duration-200",d?"border-custom-600 bg-[#FBF2EA]":"border-[#E9E9E9] bg-transparent"),children:[e.jsxs("p",{className:"m-0 mb-2.5 text-[15px] text-[#646464]",children:["Drop another ",t.kind==="page"?"component":"widget"," here, or add:"]}),e.jsx(S,{max:6})]})]})]})})},At=({card:t,index:a,sources:i,onUpdate:r,onRemove:d})=>{var u;const[o,n]=b.useState(!1),{columns:s,loading:c}=Ee(t.source||void 0);t.aggregation;const x=t.comparisonPeriod??"none";t.valueFormat;const E="w-full px-1.5 py-1 border border-[#E9E9E9] rounded text-[13px] cursor-pointer bg-white text-[#1B1B1B] outline-none focus:border-custom-600",j="text-[10px] font-bold text-[#646464] uppercase tracking-[0.06em] mt-1",v="flex items-center gap-1 text-xs text-[#646464] cursor-pointer",p="w-full px-1.5 py-1 border border-[1.5px] border-[#E9E9E9] rounded text-[13px] outline-none bg-white text-[#1B1B1B] focus:border-custom-600",k=t.source?[t.label||t.col||"Metric",t.source&&((u=i.find(m=>m.id===t.source))==null?void 0:u.tableName)].filter(Boolean).join(" · "):"Not configured";return e.jsxs("div",{className:"border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:[e.jsxs("div",{onClick:()=>n(m=>!m),className:y("flex items-center gap-1 px-2 py-1.5 cursor-pointer select-none",o?"bg-[#F6F4F1]":"bg-transparent"),children:[e.jsx("span",{className:"text-[10px] text-[#646464] leading-none transition-transform duration-150 inline-block",style:{transform:o?"rotate(90deg)":"rotate(0deg)"},children:"▶"}),e.jsxs("span",{className:"text-[11px] font-bold text-[#646464] uppercase tracking-[0.06em] flex-1",children:["Card ",a+1]}),!o&&e.jsx("span",{className:"text-[11px] text-[#646464] font-normal max-w-[120px] overflow-hidden text-ellipsis whitespace-nowrap",children:k}),e.jsx("button",{onClick:m=>{m.stopPropagation(),d()},className:"w-4 h-4 border-none bg-transparent text-[#646464] cursor-pointer grid place-items-center p-0 shrink-0",children:e.jsx(N,{name:"x",size:10})})]}),o&&e.jsxs("div",{className:"p-2 flex flex-col gap-1 border-t border-[#E9E9E9]",children:[e.jsx("span",{className:j,children:"Data Source"}),e.jsxs("select",{className:E,value:t.source,onChange:m=>r({...t,source:m.target.value,col:"",dateColumn:""}),children:[e.jsx("option",{value:"",children:"— data source —"}),i.map(m=>e.jsx("option",{value:m.id,children:m.tableName},m.id))]}),e.jsx("span",{className:j,children:"Title"}),e.jsx("input",{className:p,placeholder:"Title",value:t.label,onChange:m=>r({...t,label:m.target.value})}),e.jsx("span",{className:j,children:"Comparison"}),e.jsxs("select",{className:E,value:x,onChange:m=>r({...t,comparisonPeriod:m.target.value}),children:[e.jsx("option",{value:"none",children:"No filter"}),e.jsx("option",{value:"day",children:"Previous Day"}),e.jsx("option",{value:"week",children:"Previous Week"}),e.jsx("option",{value:"month",children:"Previous Month"}),e.jsx("option",{value:"year",children:"Previous Year"}),e.jsx("option",{value:"dateRange",children:"Custom Date Range"})]}),x==="dateRange"&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"date",className:p,value:t.dateRangeStart??"",onChange:m=>r({...t,dateRangeStart:m.target.value})}),e.jsx("input",{type:"date",className:p,value:t.dateRangeEnd??"",onChange:m=>r({...t,dateRangeEnd:m.target.value})})]}),x!=="none"&&e.jsxs(e.Fragment,{children:[e.jsxs("select",{className:E,value:t.dateColumn??"",onChange:m=>r({...t,dateColumn:m.target.value}),disabled:!t.source||c,children:[e.jsx("option",{value:"",children:"— date column —"}),s.map(m=>e.jsx("option",{value:m.name,children:m.label},m.name))]}),e.jsxs("label",{className:v,children:[e.jsx("input",{type:"checkbox",checked:t.showTrend??!0,onChange:m=>r({...t,showTrend:m.target.checked})}),"Show trend indicator"]}),e.jsxs("label",{className:v,children:[e.jsx("input",{type:"checkbox",checked:t.positiveIsGood??!0,onChange:m=>r({...t,positiveIsGood:m.target.checked})}),"Increase = positive (green)"]})]}),e.jsxs("select",{className:E,value:t.decimalPrecision??0,onChange:m=>r({...t,decimalPrecision:Number(m.target.value)}),children:[e.jsx("option",{value:0,children:"0 decimal places"}),e.jsx("option",{value:1,children:"1 decimal place"}),e.jsx("option",{value:2,children:"2 decimal places"}),e.jsx("option",{value:3,children:"3 decimal places"})]}),e.jsx("span",{className:j,children:"Filters"}),e.jsx(we,{filters:t.filters??{logicalOperator:"AND",conditions:[]},columns:s,onChange:m=>r({...t,filters:m})})]})]})},Mt=({tab:t,index:a,sources:i,onUpdate:r,onRemove:d})=>{const[o,n]=b.useState(a===0),{columns:s,loading:c}=Ee(t.source||void 0);return e.jsxs("div",{className:"border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-[7px] bg-[#F6F4F1] cursor-pointer",onClick:()=>n(x=>!x),children:[e.jsx(N,{name:o?"chevronDown":"chevronRight",size:11}),e.jsxs("span",{className:"text-[13px] font-bold text-[#1B1B1B] flex-1",children:["Tab ",a+1,": ",t.label||"(unnamed)"]}),e.jsx("button",{onClick:x=>{x.stopPropagation(),d()},className:"w-4 h-4 border-none bg-transparent text-[#646464] cursor-pointer grid place-items-center p-0",children:e.jsx(N,{name:"x",size:10})})]}),o&&e.jsxs("div",{className:"p-2 flex flex-col gap-1.5",children:[e.jsx("input",{className:"w-full px-1.5 py-1 border border-[1.5px] border-[#E9E9E9] rounded text-[13px] outline-none bg-white text-[#1B1B1B] focus:border-custom-600",placeholder:"Tab label",value:t.label,onChange:x=>r({...t,label:x.target.value})}),e.jsxs("select",{className:"w-full px-1.5 py-1 border border-[#E9E9E9] rounded text-[13px] cursor-pointer bg-white text-[#1B1B1B] outline-none focus:border-custom-600",value:t.source,onChange:x=>r({...t,source:x.target.value,columns:[]}),children:[e.jsx("option",{value:"",children:"— data source —"}),i.map(x=>e.jsx("option",{value:x.id,children:x.tableName},x.id))]}),t.source&&(c?e.jsx("div",{className:"text-xs text-[#646464]",children:"Loading columns…"}):s.length>0?e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] text-[#646464] mb-1",children:"Toggle columns — all shown by default:"}),e.jsx("div",{className:"flex flex-wrap gap-[3px]",children:s.map(x=>{const E=t.columns.length===0||t.columns.includes(x.name);return e.jsx("button",{onClick:()=>{const j=t.columns.length===0?s.map(p=>p.name):t.columns,v=E?j.filter(p=>p!==x.name):[...j,x.name];r({...t,columns:v.length===s.length?[]:v})},className:y("text-xs font-bold px-[7px] py-[3px] rounded-full border-[1.5px] cursor-pointer",E?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:x.label},x.name)})})]}):null),t.source&&e.jsx(we,{filters:t.filters??{logicalOperator:"AND",conditions:[]},columns:s,onChange:x=>r({...t,filters:x})})]})]})};function Tt(t){const a=(t??"").toLowerCase();return a==="bool"||a==="boolean"?"boolean":["int","decimal","float","double","number","long","short","byte","single"].some(i=>a.includes(i))?"number":a.includes("date")||a.includes("time")?"date":"text"}function Lt(){return{id:Math.random().toString(36).slice(2,9),columnName:"",operator:"eq",values:[],enabled:!0}}const zt=({values:t,onChange:a,style:i})=>{const[r,d]=je.useState(""),o=je.useRef(null),n=x=>{const E=x.trim();E&&!t.includes(E)&&a([...t,E]),d("")},s=x=>{x.key==="Enter"||x.key===","?(x.preventDefault(),n(r)):x.key==="Backspace"&&r===""&&t.length>0&&a(t.slice(0,-1))},c=()=>{r.trim()&&n(r)};return e.jsxs("div",{onClick:()=>{var x;return(x=o.current)==null?void 0:x.focus()},className:"flex flex-wrap gap-[3px] items-center flex-1 min-w-0 border border-[#E9E9E9] rounded px-1 py-[2px] bg-white cursor-text min-h-6",style:i,children:[t.map(x=>e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] font-semibold bg-[#F6F4F1] text-custom-600 rounded-[3px] px-[5px] py-0 leading-4",children:[x,e.jsx("span",{onClick:E=>{E.stopPropagation(),a(t.filter(j=>j!==x))},className:"cursor-pointer text-[#646464] text-[10px] leading-none ml-px",children:"×"})]},x)),e.jsx("input",{ref:o,value:r,placeholder:t.length?"":"type & press Enter…",onChange:x=>d(x.target.value),onKeyDown:s,onBlur:c,className:"border-none outline-none text-[11px] flex-1 min-w-[60px] px-0.5 py-px bg-transparent text-[#1B1B1B]"})]})},we=({filters:t,columns:a,onChange:i})=>{const r="text-[11px] px-1 py-[3px] border border-[#E9E9E9] rounded cursor-pointer bg-white text-[#1B1B1B] outline-none",d=`${r} flex-1 min-w-0 px-[5px]`,o=(n,s)=>i({...t,conditions:t.conditions.map(c=>c.id===n?{...c,...s}:c)});return e.jsxs("div",{children:[t.conditions.length>1&&e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[["AND","OR"].map(n=>e.jsx("button",{onClick:()=>i({...t,logicalOperator:n}),className:y("px-2.5 py-0.5 rounded-[6px] border-[1.5px] text-[11px] font-bold cursor-pointer uppercase",t.logicalOperator===n?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:n},n)),e.jsxs("span",{className:"text-[10px] text-[#646464]",children:["match ",t.logicalOperator==="AND"?"all conditions":"any condition"]})]}),t.conditions.map(n=>{const s=a.find(p=>p.name===n.columnName),c=Tt(s==null?void 0:s.dataType),x=Object.keys(De),E=!xt.has(n.operator),j=pt.has(n.operator),v=!!n.dynamic;return e.jsxs("div",{className:y("border rounded-[6px] p-1.5 mb-1.5",n.enabled?"border-[#E9E9E9] bg-white":"border-[#F5F5F5] bg-[#FAFAFA]"),style:{opacity:n.enabled?1:.65},children:[e.jsxs("div",{className:y("flex gap-1 items-center",n.columnName?"mb-1":""),children:[e.jsx("div",{onClick:()=>o(n.id,{enabled:!n.enabled}),className:y("w-[26px] h-[14px] rounded-full cursor-pointer relative transition-[background] duration-150 shrink-0",n.enabled?"bg-custom-600":"bg-[#DDD]"),children:e.jsx("div",{className:"absolute top-[2px] w-[10px] h-[10px] rounded-full bg-white transition-[left] duration-150",style:{left:n.enabled?12:2}})}),e.jsxs("select",{value:n.columnName,onChange:p=>o(n.id,{columnName:p.target.value,operator:"eq",value:void 0,values:void 0,dynamic:void 0}),className:`${r} flex-1 min-w-0`,children:[e.jsx("option",{value:"",children:"— column —"}),a.map(p=>e.jsx("option",{value:p.name,children:p.label},p.name))]}),e.jsx("button",{onClick:()=>i({...t,conditions:t.conditions.filter(p=>p.id!==n.id)}),className:"w-[18px] h-[18px] border-none bg-transparent text-[#CCC] cursor-pointer grid place-items-center p-0 shrink-0 hover:text-[#DC2626]",children:e.jsx(N,{name:"x",size:10})})]}),n.columnName&&e.jsxs("div",{className:"flex gap-1",children:[e.jsx("select",{value:n.operator,onChange:p=>o(n.id,{operator:p.target.value,value:void 0,values:void 0}),className:`${r} w-[104px] shrink-0`,children:x.map(p=>e.jsx("option",{value:p,children:De[p]},p))}),E&&!v&&!j&&(c==="boolean"?e.jsxs("select",{value:String(n.value??"true"),onChange:p=>o(n.id,{value:p.target.value}),className:`${r} flex-1`,children:[e.jsx("option",{value:"true",children:"True"}),e.jsx("option",{value:"false",children:"False"})]}):e.jsx("input",{type:"text",value:String(n.value??""),onChange:p=>o(n.id,{value:p.target.value}),className:d})),E&&!v&&j&&e.jsx(zt,{values:(n.values??[]).map(String),onChange:p=>o(n.id,{values:p})}),v&&E&&e.jsx("div",{className:"flex-1 text-[11px] px-1.5 py-[3px] bg-[rgba(241,90,34,0.08)] text-custom-600 rounded font-bold flex items-center",children:bt[n.dynamic]??n.dynamic})]})]},n.id)}),e.jsx("button",{onClick:()=>i({...t,conditions:[...t.conditions,Lt()]}),disabled:a.length===0,className:y("w-full p-[5px] text-[11px] font-bold border-[1.5px] border-dashed rounded-[6px]",a.length===0?"text-[#646464] bg-[#F9F9F9] border-[#E9E9E9] cursor-not-allowed":"text-custom-600 bg-[#F6F4F1] border-custom-600 cursor-pointer"),children:"+ Add filter condition"}),a.length===0&&e.jsx("div",{className:"text-[10px] text-[#BBB] text-center mt-1",children:"Select a data source to enable filters"})]})},Pt=({slot:t,artifact:a,onClose:i,onSave:r,onRemove:d})=>{const[o,n]=b.useState("data"),[s,c]=b.useState((t==null?void 0:t.config)||{}),[x,E]=b.useState([]);b.useEffect(()=>{c((t==null?void 0:t.config)||{}),n("data")},[t==null?void 0:t.id]),b.useEffect(()=>{var f,F,S,w;const{auth:l}=Ue.getState(),g=((F=(f=l==null?void 0:l.session)==null?void 0:f.tenantId)==null?void 0:F.toString())??"",D=((w=(S=l==null?void 0:l.session)==null?void 0:S.userId)==null?void 0:w.toString())??"";Xe({searchString:"",userId:D,tenantId:g,fromDate:null,toDate:null,sortBy:"",sortDirection:"",page:0,pageSize:100}).then(R=>{var _,C;return E(((C=(_=R==null?void 0:R.data)==null?void 0:_.tables)==null?void 0:C.$values)||[])}).catch(()=>{})},[]);const{columns:j,loading:v}=Ee(s.source||void 0),p=(l,g)=>c(D=>({...D,[l]:g})),k=a.kind==="page"?ye:Ne,u=t?k.find(l=>l.id===t.type):null,m=({on:l,onClick:g})=>e.jsx("div",{onClick:g,className:y("w-9 h-5 rounded-full cursor-pointer relative transition-[background] duration-200 shrink-0",l?"bg-custom-600":"bg-[#E9E9E9]"),children:e.jsx("div",{className:"absolute top-[3px] w-3.5 h-3.5 rounded-full bg-white transition-[left] duration-200 shadow-[0_1px_3px_rgba(0,0,0,0.2)]",style:{left:l?17:3}})});return!t||!u?e.jsx("div",{className:"w-[320px] border-l border-[#E9E9E9] bg-white flex items-center justify-center shrink-0",children:e.jsxs("div",{className:"text-center text-[#CCC] p-6",children:[e.jsx(N,{name:"sliders",size:28,stroke:1.4}),e.jsx("div",{className:"text-[15px] font-semibold text-[#646464] mt-3",children:"Select a component"}),e.jsx("div",{className:"text-[15px] mt-1 leading-[1.5] text-[#999]",children:"Click any slot on the canvas to configure it"})]})}):e.jsxs("div",{className:"w-[320px] border-l border-[#E9E9E9] bg-white flex flex-col shrink-0",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[#E9E9E9] flex items-center gap-2.5",children:[e.jsx("div",{className:"w-7 h-7 rounded-[6px] bg-[#F6F4F1] grid place-items-center text-custom-600 shrink-0",children:e.jsx(N,{name:u.icon,size:14})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm text-[#646464] font-bold uppercase tracking-[0.06em]",children:"Configure"}),e.jsx("div",{className:"text-[15px] font-bold text-[#1B1B1B]",children:u.name})]}),e.jsx("button",{onClick:i,className:"w-[22px] h-[22px] rounded border-none bg-transparent text-[#646464] grid place-items-center cursor-pointer",children:e.jsx(N,{name:"x",size:12})})]}),e.jsx("div",{className:"flex border-b border-[#E9E9E9]",children:["data","filters","display","advanced"].map(l=>{var D,f,F;const g=l==="filters"&&((F=(f=(D=s.filters)==null?void 0:D.conditions)==null?void 0:f.filter(S=>S.enabled&&S.columnName))==null?void 0:F.length);return e.jsxs("button",{onClick:()=>n(l),className:y("flex-1 py-[7px] px-0.5 text-xs font-bold capitalize border-none border-b-2 bg-transparent cursor-pointer -mb-px relative",o===l?"border-custom-600 text-[#1B1B1B]":"border-transparent text-[#646464]"),children:[l,g?e.jsx("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full bg-custom-600"}):null]},l)})}),e.jsxs("div",{className:"flex-1 overflow-auto p-3.5",children:[o==="data"&&e.jsxs("div",{className:"flex flex-col gap-3.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Title"}),e.jsx("input",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] focus:border-custom-600",value:s.title||"",placeholder:u.name,onChange:l=>p("title",l.target.value)})]}),t.type!=="kpi"&&t.type!=="tabs"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Data source"}),e.jsxs("select",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] cursor-pointer focus:border-custom-600",value:s.source||"",onChange:l=>{p("source",l.target.value),p("columns",[])},children:[e.jsx("option",{value:"",children:"— select a data source —"}),x.map(l=>e.jsx("option",{value:l.id,children:l.tableName},l.id))]})]}),s.source&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:["Columns",v&&e.jsx("span",{className:"font-normal normal-case tracking-normal ml-1.5 text-[#999]",children:"loading…"}),!v&&j.length>0&&e.jsxs("span",{className:"font-normal normal-case tracking-normal ml-1.5 text-[#999]",children:[j.length," found"]})]}),v?e.jsx("div",{className:"flex flex-wrap gap-1",children:[80,110,70,90,60].map(l=>e.jsx("div",{className:"h-7 rounded-full bg-[#E9E9E9] opacity-50",style:{width:l}},l))}):j.length===0?e.jsx("div",{className:"text-[13px] text-[#999] py-1.5",children:"No columns found for this source."}):t.type==="datatable"||t.type==="datagrid"?e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[#646464] mb-1.5",children:"Toggle to show or hide each column"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(l=>{const g=s.columns?s.columns.includes(l.name):!0,D=()=>{const f=s.columns??j.map(F=>F.name);p("columns",g?f.filter(F=>F!==l.name):[...f,l.name])};return e.jsx("button",{onClick:D,className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",g?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:l.label},l.name)})})]}):t.type==="graph"?e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold text-custom-600 uppercase tracking-[0.06em] mb-1.5",children:"X Axis (categories)"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(l=>{const g=s.xAxis===l.name;return e.jsx("button",{onClick:()=>p("xAxis",l.name),className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",g?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:l.label},l.name)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold text-[#2E7AC2] uppercase tracking-[0.06em] mb-1.5",children:"Y Axis (values)"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(l=>{const g=s.yAxis===l.name;return e.jsx("button",{onClick:()=>p("yAxis",l.name),className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",g?"border-[#2E7AC2] bg-[#E6EFF8] text-[#2E7AC2]":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:l.label},l.name)})})]})]}):t.type==="map"?e.jsxs("div",{className:"flex flex-col gap-2.5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold text-custom-600 uppercase tracking-[0.06em] mb-1.5",children:"Latitude Column"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(l=>{const g=s.latCol===l.name;return e.jsx("button",{onClick:()=>p("latCol",l.name),className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",g?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:l.label},l.name)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold text-[#2E7AC2] uppercase tracking-[0.06em] mb-1.5",children:"Longitude Column"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(l=>{const g=s.lngCol===l.name;return e.jsx("button",{onClick:()=>p("lngCol",l.name),className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",g?"border-[#2E7AC2] bg-[#E6EFF8] text-[#2E7AC2]":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:l.label},l.name)})})]})]}):t.type==="files"?e.jsxs("div",{className:"flex flex-col gap-2.5",children:[[{key:"nameCol",label:"Name Column",activeCls:"border-custom-600 bg-[#FBF2EA] text-custom-600"},{key:"infoCol",label:"Info / Size Column",activeCls:"border-[#2E7AC2] bg-[#E6EFF8] text-[#2E7AC2]"},{key:"dateCol",label:"Date Column",activeCls:"border-[#16A34A] bg-[rgba(22,163,74,0.08)] text-[#16A34A]"}].map(({key:l,label:g,activeCls:D})=>e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.06em] mb-1.5 text-[#646464]",children:g}),e.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(f=>{const F=s[l]===f.name;return e.jsx("button",{onClick:()=>p(l,F?"":f.name),className:y("text-[13px] font-bold px-2 py-1 rounded-full border-[1.5px] cursor-pointer",F?D:"border-[#E9E9E9] bg-transparent text-[#646464]"),children:f.label},f.name)})})]},l)),e.jsx("small",{className:"text-[11px] text-[#999]",children:"All selectors are optional. Click again to deselect. Name defaults to the first column."})]}):e.jsx("div",{className:"border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:j.map((l,g)=>e.jsxs("div",{className:y("grid items-center px-2.5 py-1.5 text-[13px]",g<j.length-1&&"border-b border-[#E9E9E9]"),style:{gridTemplateColumns:"1fr auto"},children:[e.jsx("span",{className:"text-[#1B1B1B] font-semibold",children:l.label}),e.jsx("span",{className:"text-[#999] text-[11px] font-mono",children:l.name})]},l.name))})]})]}),t.type==="graph"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Chart type"}),e.jsx("div",{className:"flex border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:[["bar","Bar"],["line","Line"],["area","Area"]].map(([l,g])=>e.jsx("button",{onClick:()=>p("chart",l),className:y("flex-1 py-[7px] px-1 text-[15px] font-bold border-none cursor-pointer",(s.chart||"bar")===l?"bg-[#1B1B1B] text-white":"bg-transparent text-[#646464]"),children:g},l))})]}),t.type==="kpi"&&(()=>{const l=s.kpiCards??[{source:"",col:"",label:""},{source:"",col:"",label:""},{source:"",col:"",label:""}],g=D=>p("kpiCards",D);return e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:["KPI Cards ",e.jsxs("span",{className:"font-normal normal-case tracking-normal ml-1.5 text-[#999]",children:[l.length," cards"]})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.map((D,f)=>e.jsx(At,{card:D,index:f,sources:x,onUpdate:F=>g(l.map((S,w)=>w===f?F:S)),onRemove:()=>g(l.filter((F,S)=>S!==f))},f)),e.jsx("button",{onClick:()=>g([...l,{source:"",col:"",label:""}]),className:"px-2.5 py-1.5 text-[13px] font-bold text-custom-600 bg-[#F6F4F1] border-[1.5px] border-dashed border-custom-600 rounded-[6px] cursor-pointer",children:"+ Add card"})]})]})})(),t.type==="tabs"&&(()=>{const l=s.tabDefs??[{label:"Tab 1",source:"",columns:[]},{label:"Tab 2",source:"",columns:[]}],g=D=>p("tabDefs",D);return e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:["Tabs ",e.jsxs("span",{className:"font-normal normal-case tracking-normal ml-1.5 text-[#999]",children:[l.length," tabs"]})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.map((D,f)=>e.jsx(Mt,{tab:D,index:f,sources:x,onUpdate:F=>g(l.map((S,w)=>w===f?F:S)),onRemove:()=>g(l.filter((F,S)=>S!==f))},f)),e.jsx("button",{onClick:()=>g([...l,{label:`Tab ${l.length+1}`,source:"",columns:[]}]),className:"px-2.5 py-1.5 text-[13px] font-bold text-custom-600 bg-[#F6F4F1] border-[1.5px] border-dashed border-custom-600 rounded-[6px] cursor-pointer",children:"+ Add tab"})]})]})})(),t.type==="map"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Layer"}),e.jsx("div",{className:"flex border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:[["points","Points"],["heat","Heatmap"],["polygons","Territories"]].map(([l,g])=>e.jsx("button",{onClick:()=>p("layer",l),className:y("flex-1 py-[7px] px-1 text-[15px] font-bold border-none cursor-pointer",(s.layer||"points")===l?"bg-[#1B1B1B] text-white":"bg-transparent text-[#646464]"),children:g},l))})]}),t.type==="alert"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Severity"}),e.jsx("div",{className:"flex border border-[#E9E9E9] rounded-[6px] overflow-hidden",children:[["info","Info"],["warning","Warning"],["danger","Critical"]].map(([l,g])=>e.jsx("button",{onClick:()=>p("level",l),className:y("flex-1 py-[7px] px-1 text-[15px] font-bold border-none cursor-pointer",(s.level||"warning")===l?"bg-[#1B1B1B] text-white":"bg-transparent text-[#646464]"),children:g},l))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Message"}),e.jsx("textarea",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] resize-y focus:border-custom-600",value:s.body||"",placeholder:"Describe what triggered this alert…",onChange:l=>p("body",l.target.value)})]})]}),t.type==="chat"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Channel"}),e.jsx("input",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] focus:border-custom-600",placeholder:"Operations · #drivers",value:s.channel||"",onChange:l=>p("channel",l.target.value)})]})]}),o==="display"&&e.jsxs("div",{className:"flex flex-col gap-3.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-bold text-[#1B1B1B]",children:"Show header"}),e.jsx("div",{className:"text-[15px] text-[#646464] mt-0.5",children:"Displays title bar above component"})]}),e.jsx(m,{on:s.showHeader!==!1,onClick:()=>p("showHeader",s.showHeader===!1)})]}),e.jsx("div",{className:"h-px bg-[#E9E9E9]"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-bold text-[#1B1B1B]",children:"Compact density"}),e.jsx("div",{className:"text-[15px] text-[#646464] mt-0.5",children:"Reduces row height and padding"})]}),e.jsx(m,{on:!!s.compact,onClick:()=>p("compact",!s.compact)})]})]}),o==="filters"&&e.jsx("div",{className:"flex flex-col gap-2.5",children:t.type==="kpi"?e.jsxs("div",{className:"py-5 text-center text-[#646464]",children:[e.jsx(N,{name:"sliders",size:18,stroke:1.4}),e.jsxs("div",{className:"mt-2 text-[13px]",children:["Filters for KPI cards are configured per-card. Open each card in the ",e.jsx("b",{children:"Data"})," tab to set filters."]})]}):t.type==="tabs"?e.jsxs("div",{className:"py-5 text-center text-[#646464]",children:[e.jsx(N,{name:"sliders",size:18,stroke:1.4}),e.jsxs("div",{className:"mt-2 text-[13px]",children:["Filters for tabs are configured per-tab. Expand each tab in the ",e.jsx("b",{children:"Data"})," tab to set filters."]})]}):s.source?e.jsx(we,{filters:s.filters??{logicalOperator:"AND",conditions:[]},columns:j,onChange:l=>p("filters",l)}):e.jsxs("div",{className:"py-5 text-center text-[#646464]",children:[e.jsx(N,{name:"sliders",size:18,stroke:1.4}),e.jsxs("div",{className:"mt-2 text-[13px]",children:["Select a ",e.jsx("b",{children:"Data source"})," in the Data tab first to configure filters."]})]})}),o==="advanced"&&e.jsxs("div",{className:"flex flex-col gap-3.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Refresh interval"}),e.jsxs("select",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] cursor-pointer focus:border-custom-600",value:s.refresh||"5m",onChange:l=>p("refresh",l.target.value),children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"30s",children:"30 seconds"}),e.jsx("option",{value:"1m",children:"1 minute"}),e.jsx("option",{value:"5m",children:"5 minutes"}),e.jsx("option",{value:"live",children:"Live"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Permission"}),e.jsxs("select",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] cursor-pointer focus:border-custom-600",value:s.perm||"team",onChange:l=>p("perm",l.target.value),children:[e.jsx("option",{value:"team",children:"Team only"}),e.jsx("option",{value:"org",children:"Whole org"}),e.jsx("option",{value:"execs",children:"Executives"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Component ID"}),e.jsx("input",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-[11px] outline-none bg-white text-[#1B1B1B] font-mono",value:`xf-${t.type}-${t.id.slice(-6)}`,readOnly:!0})]})]})]}),e.jsxs("div",{className:"px-3.5 py-2.5 border-t border-[#E9E9E9] flex gap-2",children:[e.jsx("button",{onClick:d,className:"w-[34px] h-[34px] rounded-lg border border-[#E9E9E9] bg-transparent text-[#CCC] grid place-items-center cursor-pointer hover:text-[#DC2626] hover:border-[#DC2626]",children:e.jsx(N,{name:"trash",size:14})}),e.jsxs("button",{onClick:()=>r(s),className:"flex-1 flex items-center justify-center gap-1.5 py-[9px] text-[15px] font-bold bg-custom-600 text-white border-none rounded-lg cursor-pointer",children:[e.jsx(N,{name:"save",size:14,stroke:2}),"Save configuration"]})]})]})},Rt=({artifact:t,layoutId:a,onBack:i,onSave:r,onDuplicate:d,onDelete:o})=>{const n=t.kind==="page",s=n?ye:Ne,[c,x]=b.useState(t.slots||[]),[E,j]=b.useState(null),[v,p]=b.useState("edit"),[k,u]=b.useState(!1),[m,l]=b.useState(null),[g,D]=b.useState(!1),[f,F]=b.useState(!1),[S,w]=b.useState(!1),[R,_]=b.useState(!1),[C,I]=b.useState(!1),[X,A]=b.useState(!1),T=b.useRef(JSON.stringify(t.slots||[])),[P,H]=b.useState(null),[V,Y]=b.useState(null),[W,G]=b.useState(null),se=b.useRef(null),ae=c.find(B=>B.id===E)??null,oe=B=>{const z=`slot_${Math.random().toString(36).slice(2,9)}`,$=n?12:6;x(K=>[...K,{id:z,type:B.id,configured:!1,config:{},span:$}]),j(z)},ie=B=>{const z=s.find($=>$.id===B);z&&oe(z)},ge=(B,z)=>x($=>$.map(K=>K.id===B?{...K,span:z}:K)),h=B=>{x(z=>z.filter($=>$.id!==B)),E===B&&j(null)};b.useEffect(()=>{if(!W)return;const B=$=>{const K=(W.gridWidth+12)/12,Z=W.startSpan+($.clientX-W.startX)/K,xe=[4,6,8,12],ee=xe.reduce((te,re)=>Math.abs(re-Z)<Math.abs(te-Z)?re:te,xe[0]);ee!==W.currentSpan&&(G(te=>te&&{...te,currentSpan:ee}),ge(W.id,ee))},z=()=>G(null);return window.addEventListener("mousemove",B),window.addEventListener("mouseup",z),document.body.style.cursor="ew-resize",document.body.style.userSelect="none",()=>{window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""}},[W]);const L=(B,z)=>{var K;B.stopPropagation(),B.preventDefault();const $=z.span||(n?12:6);G({id:z.id,startSpan:$,startX:B.clientX,gridWidth:((K=se.current)==null?void 0:K.getBoundingClientRect().width)||1100,currentSpan:$})},M=(B,z)=>{if(W){B.preventDefault();return}B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/xf-reorder",z.id),H(z.id)},J=(B,z)=>{if(!P||P===z.id)return;B.preventDefault();const $=B.currentTarget.getBoundingClientRect();Y({id:z.id,side:B.clientX-$.left<$.width/2?"before":"after"})},q=(B,z)=>{if(B.preventDefault(),B.stopPropagation(),!P||P===z.id){H(null),Y(null);return}x($=>{const K=$.findIndex(re=>re.id===P),Z=$.findIndex(re=>re.id===z.id);if(K===-1||Z===-1)return $;const xe=(V==null?void 0:V.side)==="after"?Z+(K<Z?0:1):Z+(K<Z?-1:0),ee=[...$],[te]=ee.splice(K,1);return ee.splice(Math.max(0,Math.min(xe,ee.length)),0,te),ee}),H(null),Y(null)},U=()=>{H(null),Y(null)},O=(B,z)=>B.dataTransfer.setData("text/xf-type",z),ce=B=>{B.preventDefault(),u(!0)},Le=()=>u(!1),ze=B=>{B.preventDefault(),u(!1);const z=B.dataTransfer.getData("text/xf-type");z&&ie(z)};b.useEffect(()=>{w(JSON.stringify(c)!==T.current)},[c]);const Pe=async B=>{if(!ae)return;const z=c.map($=>$.id===ae.id?{...$,configured:!0,config:B}:$);x(z),j(null),F(!0);try{await r({...t,isDraft:t.isDraft??!0},z),T.current=JSON.stringify(z),w(!1),l("Widget configuration saved"),setTimeout(()=>l(null),2200)}catch{}finally{F(!1)}},ke=async B=>{if(!g){D(!0);try{await r({...t,isDraft:B,slots:c},c),T.current=JSON.stringify(c),w(!1),l(B?"Draft saved":`${t.title} published`),setTimeout(()=>l(null),2400)}finally{D(!1)}}},Re=async()=>{if(!(R||!a)){_(!0);try{await d()}finally{_(!1)}}},Oe=async()=>{if(!X){A(!0);return}if(!(C||!a)){I(!0);try{await o()}finally{I(!1),A(!1)}}};return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-2 border-b border-[#E9E9E9] bg-white shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-1 text-sm text-[#646464] flex-1",children:[e.jsx("button",{onClick:i,className:"bg-transparent border-none cursor-pointer text-sm text-[#646464] font-semibold p-0",children:"Home"}),e.jsx(N,{name:"chevronRight",size:12}),e.jsx("span",{children:t.nav.mode==="parent"?t.title:t.nav.parentLabel}),t.nav.mode==="child"&&e.jsxs(e.Fragment,{children:[e.jsx(N,{name:"chevronRight",size:12}),e.jsx("span",{className:"font-bold text-[#1B1B1B]",children:t.title})]})]}),e.jsx("div",{className:"flex border border-[#E9E9E9] rounded-lg overflow-hidden",children:["edit","preview"].map(B=>e.jsxs("button",{onClick:()=>{p(B),B==="preview"&&j(null)},className:y("flex items-center gap-[5px] px-3 py-1.5 text-sm font-bold border-none cursor-pointer",v===B?"bg-[#1B1B1B] text-white":"bg-transparent text-[#646464]"),children:[e.jsx(N,{name:B==="edit"?"sliders":"eye",size:11}),B]},B))}),t.isDraft&&e.jsx("span",{className:"text-[13px] font-bold px-[9px] py-[3px] rounded-full bg-[rgba(241,90,34,0.1)] text-custom-600 tracking-[0.02em]",children:"● Draft"}),S&&!g&&!f&&e.jsx("span",{className:"text-xs font-bold px-[9px] py-[3px] rounded-full bg-[rgba(100,100,100,0.08)] text-[#646464] tracking-[0.02em]",children:"● Unsaved changes"}),e.jsxs("button",{onClick:Re,disabled:R||!a,className:y("flex items-center gap-[5px] px-3 py-1.5 text-sm font-bold border border-[#E9E9E9] rounded-lg bg-transparent",R?"text-[#646464] cursor-not-allowed":"text-[#1B1B1B] cursor-pointer",!a&&"opacity-40"),children:[e.jsx(N,{name:"copy",size:12}),R?"Duplicating…":"Duplicate"]}),e.jsxs("button",{onClick:Oe,disabled:C||!a,className:y("flex items-center gap-[5px] px-3 py-1.5 text-sm font-bold border rounded-lg",X?"border-[#DC2626] bg-[rgba(220,38,38,0.06)] text-[#DC2626]":"border-[#E9E9E9] bg-transparent text-[#646464]",C||!a?"cursor-not-allowed":"cursor-pointer",!a&&"opacity-40"),onBlur:()=>A(!1),children:[e.jsx(N,{name:"trash",size:12}),C?"Deleting…":X?"Confirm delete?":"Delete"]}),e.jsxs("button",{onClick:()=>ke(!0),disabled:g,className:y("flex items-center gap-[5px] px-[13px] py-1.5 text-sm font-bold border border-[#E9E9E9] rounded-lg bg-transparent",g?"text-[#646464] cursor-not-allowed":"text-[#1B1B1B] cursor-pointer"),children:[e.jsx(N,{name:"save",size:13}),g?"Saving…":"Save draft"]}),e.jsxs("button",{onClick:()=>ke(!1),disabled:g,className:y("flex items-center gap-[5px] px-4 py-[7px] text-[15px] font-bold text-white border-none rounded-lg",g?"bg-[#c0441a] cursor-not-allowed":"bg-custom-600 cursor-pointer"),children:[e.jsx(N,{name:"check",size:14,stroke:2.5}),g?"Saving…":"Publish"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[e.jsx(Dt,{catalog:s,onAdd:oe,onDragStart:O}),e.jsx(Ft,{artifact:t,slots:c,selectedId:E,mode:v,dragOver:k,onSelect:j,onRemove:h,onAdd:ie,onCanvasDragOver:ce,onCanvasDragLeave:Le,onCanvasDrop:ze,onSlotDragStart:M,onSlotDragOver:J,onSlotDrop:q,onSlotDragEnd:U,dropTarget:V,draggingId:P,gridRef:se,resizing:W,startResize:L}),ae&&v==="edit"&&e.jsx(Pt,{slot:ae,artifact:t,onClose:()=>j(null),onSave:Pe,onRemove:()=>h(ae.id)})]}),(m||f)&&e.jsx("div",{className:"fixed bottom-6 right-6 bg-[#1B1B1B] text-white px-[18px] py-3 rounded-[10px] text-[15px] font-bold shadow-[0_8px_24px_rgba(0,0,0,0.2)] z-[500] flex items-center gap-2",children:f?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full inline-block animate-spin"})," Saving…"]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[#16A34A]",children:e.jsx(N,{name:"check",size:14,stroke:3})}),m]})})]})},Ot=()=>{const t="bg-white/5 border border-white/10 rounded-[10px] p-3 text-white/90 flex flex-col gap-1.5 relative overflow-hidden",a="bg-custom-600 border-custom-600 text-white shadow-[0_8px_24px_rgba(241,90,34,0.4)]",i="bg-white text-[#1B1B1B] border-white/20",r=(o,n,s)=>e.jsxs("div",{className:"flex gap-1 items-center text-[9px] opacity-70 tracking-[0.06em] uppercase font-bold",style:s?{color:s}:{},children:[e.jsx(N,{name:o,size:10,stroke:2}),n]}),d=(o,n)=>e.jsx("div",{className:"flex gap-0.5 items-end flex-1",style:n?{color:n}:{},children:o.map((s,c)=>e.jsx("i",{className:"flex-1 bg-current opacity-70 rounded-[1px]",style:{height:`${s}%`}},c))});return e.jsxs("div",{className:"absolute grid gap-2.5",style:{inset:30,gridTemplateColumns:"repeat(6,1fr)",gridTemplateRows:"repeat(6,1fr)"},children:[e.jsxs("div",{className:`${t} ${a}`,style:{gridColumn:"1/4",gridRow:"1/3"},children:[r("kpi","KPI · Active drivers"),e.jsx("div",{className:"text-[22px] font-bold tracking-[-0.02em] leading-none",children:"142"}),d([30,45,40,60,72,85])]}),e.jsxs("div",{className:t,style:{gridColumn:"4/7",gridRow:"1/4"},children:[r("barChart","Throughput","#fff"),e.jsx("div",{className:"text-[13px] font-bold leading-[1.2] text-white",children:"2,140/hr"}),d([35,48,42,60,72,65,80,90,78],Q.orange)]}),e.jsxs("div",{className:`${t} ${i}`,style:{gridColumn:"1/3",gridRow:"3/5"},children:[r("map","Map","#646464"),e.jsxs("div",{className:"flex-1 rounded-[6px] relative",style:{background:"linear-gradient(135deg,#E8EEF3,#D4DEE8)"},children:[e.jsx("span",{className:"absolute w-2 h-2 bg-custom-600 rounded-full",style:{top:"40%",left:"30%"}}),e.jsx("span",{className:"absolute w-2 h-2 bg-custom-600 rounded-full",style:{top:"60%",left:"55%"}})]})]}),e.jsxs("div",{className:t,style:{gridColumn:"3/5",gridRow:"4/7"},children:[r("table","Drivers","#fff"),e.jsx("div",{className:"flex flex-col gap-[3px] text-white",children:["M. Saldana","R. Patel","L. Nguyen"].map(o=>e.jsx("div",{className:"text-[9px] py-0.5 border-b border-white/10",children:o},o))})]}),e.jsxs("div",{className:`${t} ${a}`,style:{gridColumn:"5/7",gridRow:"4/5"},children:[r("check","On-time"),e.jsx("div",{className:"text-[13px] font-bold leading-[1.2]",children:"94.6%"})]}),e.jsxs("div",{className:`${t} ${i}`,style:{gridColumn:"1/3",gridRow:"5/7"},children:[r("chat","Chat","#646464"),e.jsx("div",{className:"text-[9px] text-[#1B1B1B]",children:"Truck 22 needs an unscheduled inspection."})]}),e.jsxs("div",{className:t,style:{gridColumn:"5/7",gridRow:"5/7"},children:[r("alert","Alert","#fff"),e.jsx("div",{className:"text-[11px] font-bold leading-[1.2] text-white",children:"Dwell breach · SAT"})]})]})},$t=({onCta:t})=>{const[a,i]=b.useState(0),[r,d]=b.useState(!1),o=b.useRef(void 0);b.useEffect(()=>{if(!r)return o.current=setTimeout(()=>i(s=>(s+1)%ne.length),6500),()=>clearTimeout(o.current)},[a,r]);const n=s=>{clearTimeout(o.current),i(s)};return e.jsxs("div",{className:"relative rounded-2xl overflow-hidden h-[420px] mb-9 border border-[#E9E9E9] shadow-[0_2px_16px_rgba(0,0,0,0.07)]",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[e.jsx("div",{className:"flex h-full will-change-transform transition-transform duration-[600ms] ease-[cubic-bezier(.4,0,.2,1)]",style:{transform:`translateX(-${a*100}%)`},children:ne.map((s,c)=>e.jsxs("div",{className:"min-w-full h-full grid grid-cols-2",children:[e.jsxs("div",{className:"px-14 py-[60px] flex flex-col justify-center bg-white border-r border-[#E9E9E9]",children:[e.jsxs("div",{className:"flex items-center gap-2.5 text-sm text-custom-600 tracking-[0.16em] uppercase font-bold mb-[18px]",children:[e.jsx("span",{className:"w-7 h-0.5 bg-custom-600 shrink-0"}),s.eyebrow]}),e.jsxs("h2",{className:"text-[40px] font-bold tracking-[-0.02em] text-[#1B1B1B] m-0 mb-4 leading-[1.08]",children:[s.headline[0],e.jsx("br",{}),e.jsx("i",{className:"italic text-custom-600",children:s.headline[1]})]}),e.jsx("p",{className:"text-sm leading-[1.65] text-[#646464] font-light m-0 mb-7",dangerouslySetInnerHTML:{__html:s.body}}),e.jsxs("div",{className:"flex gap-2.5 flex-wrap",children:[e.jsxs("button",{onClick:t,className:"inline-flex items-center gap-[7px] px-[22px] py-[11px] text-sm font-bold bg-custom-600 text-white border-none rounded-full cursor-pointer",children:[s.primary," ",e.jsx(N,{name:"arrowRight",size:14})]}),e.jsx("button",{onClick:t,className:"inline-flex items-center gap-[7px] px-5 py-[10px] text-[15px] font-semibold bg-transparent text-[#1B1B1B] border-[1.5px] border-[#E9E9E9] rounded-full cursor-pointer",children:s.secondary})]})]}),e.jsxs("div",{className:"relative overflow-hidden",style:{background:c===1?"linear-gradient(135deg,#FBD4B8 0%,#F6A166 100%)":"linear-gradient(135deg,#1B1B1B 0%,#2E2E2E 100%)"},children:[e.jsx("div",{className:"absolute inset-0",style:{background:c===1?"radial-gradient(circle at 80% 20%,rgba(255,255,255,0.2),transparent 60%)":"radial-gradient(circle at 80% 20%,rgba(241,90,34,0.2),transparent 60%)"}}),e.jsx(Ot,{})]})]},c))}),e.jsx("div",{className:"absolute bottom-7 left-1/2 -translate-x-1/2 flex gap-1.5 z-10",children:ne.map((s,c)=>e.jsx("button",{onClick:()=>n(c),className:"h-1 rounded-sm border-none cursor-pointer p-0 transition-[width,background] duration-300",style:{width:c===a?36:22,background:c===a?Q.orange:"rgba(0,0,0,0.15)"}},c))}),e.jsx("div",{className:"absolute bottom-[22px] right-[22px] flex gap-1.5 z-10",children:[{name:"chevronLeft",fn:()=>n((a-1+ne.length)%ne.length)},{name:"chevronRight",fn:()=>n((a+1)%ne.length)}].map(s=>e.jsx("button",{onClick:s.fn,className:"w-9 h-9 rounded-full bg-white/90 border-none text-[#1B1B1B] grid place-items-center cursor-pointer backdrop-blur-[4px] shadow-[0_2px_8px_rgba(0,0,0,0.15)]",children:e.jsx(N,{name:s.name,size:14})},s.name))})]})},_t=({onBuild:t})=>e.jsxs("div",{className:"xf-build-block",children:[e.jsxs("div",{className:"xf-build-left",children:[e.jsx("span",{className:"label-tag",children:"Start building"}),e.jsx("h2",{children:"What do you want to build today?"}),e.jsxs("p",{children:["Build a ",e.jsx("b",{children:"Page"})," for end-users to interact with — tables, forms, maps, chat — slotted under any branch of your main navigation. Or build a ",e.jsx("b",{children:"Dashboard"})," for executives & operators — a grid of widgets that surface what matters in real time."]}),e.jsxs("button",{className:"xf-build-cta",onClick:t,children:[e.jsx(N,{name:"plus",size:15})," Open the Build menu"]})]}),e.jsx("div",{className:"xf-build-options",children:e.jsxs("button",{className:"xf-build-card xf-build-card--page",onClick:t,children:[e.jsx("div",{className:"ic",children:e.jsx(N,{name:"layout",size:22})}),e.jsx("h3",{children:"Build a Page"}),e.jsx("p",{children:"An interactive screen for daily users. Mix Tables, KPIs, Maps, Chat, Calendar, Reports."}),e.jsxs("div",{className:"meta",children:[e.jsx("span",{children:"9 components"}),e.jsx("span",{children:"Nav-routable"})]}),e.jsx("div",{className:"arrow",children:e.jsx(N,{name:"arrowRight",size:14})})]})})]}),Ht=({onBuild:t,layouts:a,loadingLayouts:i,onOpenLayout:r,onDelete:d})=>{const o=Te(),[n,s]=b.useState(null),[c,x]=b.useState(null),E=a.filter(Ae),j=a.filter(u=>!Ae(u)),v=async(u,m)=>{if(u.stopPropagation(),n!==m){s(m);return}x(m);try{await d(m)}finally{x(null),s(null)}},p=({type:u})=>u==="dashboard"?e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 200 84",preserveAspectRatio:"none",children:[e.jsx("rect",{x:"10",y:"10",width:"55",height:"30",rx:"3",fill:"#fff",stroke:"#E9E9E9"}),e.jsx("rect",{x:"70",y:"10",width:"55",height:"30",rx:"3",fill:"#fff",stroke:"#E9E9E9"}),e.jsx("rect",{x:"130",y:"10",width:"60",height:"30",rx:"3",fill:"currentColor"}),e.jsx("rect",{x:"10",y:"46",width:"115",height:"30",rx:"3",fill:"#fff",stroke:"#E9E9E9"}),e.jsx("rect",{x:"14",y:"62",width:"6",height:"10",fill:"currentColor"}),e.jsx("rect",{x:"24",y:"58",width:"6",height:"14",fill:"currentColor"}),e.jsx("rect",{x:"34",y:"54",width:"6",height:"18",fill:"currentColor"}),e.jsx("rect",{x:"44",y:"50",width:"6",height:"22",fill:"currentColor"}),e.jsx("rect",{x:"130",y:"46",width:"60",height:"30",rx:"3",fill:"#fff",stroke:"#E9E9E9"}),e.jsx("circle",{cx:"160",cy:"61",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"3"})]}):e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 200 84",preserveAspectRatio:"none",children:[e.jsx("rect",{x:"10",y:"8",width:"80",height:"6",rx:"1",fill:"currentColor"}),e.jsx("rect",{x:"10",y:"18",width:"120",height:"3",rx:"1",fill:"#A1A1A1"}),e.jsx("rect",{x:"10",y:"30",width:"180",height:"48",rx:"3",fill:"#fff",stroke:"#E9E9E9"}),e.jsx("rect",{x:"10",y:"30",width:"180",height:"10",rx:"3",fill:"#F2F2F2"}),e.jsx("line",{x1:"10",y1:"50",x2:"190",y2:"50",stroke:"#E9E9E9"}),e.jsx("line",{x1:"10",y1:"60",x2:"190",y2:"60",stroke:"#E9E9E9"}),e.jsx("line",{x1:"10",y1:"70",x2:"190",y2:"70",stroke:"#E9E9E9"}),e.jsx("circle",{cx:"20",cy:"45",r:"2",fill:"currentColor"}),e.jsx("circle",{cx:"20",cy:"55",r:"2",fill:"currentColor"}),e.jsx("circle",{cx:"20",cy:"65",r:"2",fill:"currentColor"})]}),k=u=>e.jsxs("button",{onClick:m=>v(m,u),disabled:c===u,className:y("inline-flex items-center gap-1 text-[11px] font-bold px-2 py-[3px] rounded-[6px] border cursor-pointer shrink-0 whitespace-nowrap",n===u?"border-[#DC2626] bg-[rgba(220,38,38,0.08)] text-[#DC2626]":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:[e.jsx(N,{name:"trash",size:10}),n===u?c===u?"Deleting…":"Confirm?":"Delete"]});return e.jsxs("div",{className:"px-9 pt-7 pb-12 max-w-[1200px] mx-auto",children:[e.jsx("div",{className:"mb-6",children:e.jsxs("span",{className:"inline-flex items-center gap-2 text-[13px] font-normal text-[#1B1B1B] bg-[#F6F4F1] border border-[#E9E9E9] px-3.5 py-1.5 rounded-full",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-[#16A34A] shrink-0 shadow-[0_0_0_3px_rgba(22,163,74,0.2)]"}),e.jsx("span",{children:"Build pages & dashboards — connect a source and ship"})]})}),e.jsx($t,{onCta:t}),e.jsx(_t,{onBuild:t}),!i&&E.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"xf-section-head",children:[e.jsx("h2",{children:"Drafts"}),e.jsxs("span",{className:"sub",children:[E.length," in progress"]})]}),e.jsx("div",{className:"xf-recent-grid",children:E.map(u=>{const{kind:m,navLabel:l,updated:g}=(()=>{try{const D=JSON.parse(u.layoutData||"{}"),f=D.nav||{mode:"child"},F=f.mode==="parent"?`${u.layoutName} (top-level)`:`${f.parentLabel||""} / ${u.layoutName}`;return{kind:D.kind||"page",navLabel:F,updated:Me(u.createdDate)}}catch{return{kind:"page",navLabel:u.layoutName,updated:""}}})();return e.jsxs("div",{className:"xf-recent-card relative",onClick:()=>r(u),children:[e.jsx("div",{className:`pre ${m}`,children:e.jsx(p,{type:m})}),e.jsx("span",{className:"absolute top-2 right-2 text-[11px] font-bold px-[7px] py-0.5 rounded-full bg-[rgba(241,90,34,0.15)] text-custom-600",children:"Draft"}),e.jsx("h4",{children:u.layoutName}),e.jsxs("div",{className:"nav-loc flex items-center justify-between",children:[e.jsxs("span",{children:[l,g?` · ${g}`:""," ",e.jsx("span",{className:"text-custom-600 font-bold",children:"Resume →"})]}),k(u.id)]})]},u.id)})})]}),e.jsxs("div",{className:"xf-section-head",children:[e.jsx("h2",{children:"Continue where you left off"}),e.jsx("span",{className:"sub",children:i?"Loading…":`${j.length} layout${j.length!==1?"s":""}`}),e.jsx("button",{className:"right",onClick:()=>o("/build/build-dashboards"),children:"View all →"})]}),e.jsx("div",{className:"xf-recent-grid",children:i?[1,2,3,4].map(u=>e.jsxs("div",{className:"xf-recent-card opacity-40 pointer-events-none",children:[e.jsx("div",{className:"pre page bg-[#E9E9E9]"}),e.jsx("span",{className:"type-badge page",children:"…"}),e.jsx("h4",{className:"bg-[#E9E9E9] rounded text-transparent",children:"Loading layout"}),e.jsx("div",{className:"nav-loc bg-[#E9E9E9] rounded text-transparent",children:"—"})]},u)):j.length===0?e.jsxs("div",{className:"col-span-full px-6 py-8 text-center border-2 border-dashed border-[#E9E9E9] rounded-xl text-[#646464]",children:[e.jsx(N,{name:"layout",size:28,stroke:1.4}),e.jsxs("p",{className:"mt-2.5 m-0 text-sm",children:["No published layouts yet — create one and click ",e.jsx("b",{children:"Publish"}),"."]})]}):j.map(u=>{const{kind:m,navLabel:l,updated:g}=(()=>{try{const D=JSON.parse(u.layoutData||"{}"),f=D.nav||{mode:"child"},F=f.mode==="parent"?`${u.layoutName} (top-level)`:`${f.parentLabel||""} / ${u.layoutName}`;return{kind:D.kind||"page",navLabel:F,updated:Me(u.createdDate)}}catch{return{kind:"page",navLabel:u.layoutName,updated:""}}})();return e.jsxs("div",{className:"xf-recent-card",onClick:()=>r(u),children:[e.jsx("div",{className:`pre ${m}`,children:e.jsx(p,{type:m})}),e.jsx("span",{className:`type-badge ${m}`,children:m}),e.jsx("h4",{children:u.layoutName}),e.jsxs("div",{className:"nav-loc flex items-center justify-between",children:[e.jsxs("span",{children:[l,g?` · ${g}`:""]}),k(u.id)]})]},u.id)})})]})},It=({kind:t,onClose:a,onCreate:i,menus:r=[]})=>{const[d,o]=b.useState(1),[n,s]=b.useState(""),[c,x]=b.useState(""),[E,j]=b.useState(t==="page"?"fileText":"grid"),[v,p]=b.useState({mode:"child",parent:"operations",parentLabel:"Operations"}),[k,u]=b.useState("team"),[m,l]=b.useState("5m"),[g,D]=b.useState("title"),f=b.useRef(void 0),F=b.useRef(void 0),S=t==="page",w=d===1&&!n.trim();b.useEffect(()=>{if(d===1){if(clearTimeout(f.current),clearTimeout(F.current),!n.trim()){D("title");return}if(!c.trim()){f.current=setTimeout(()=>D("desc"),3e3);return}return D("desc"),F.current=setTimeout(()=>D("next"),5e3),()=>{clearTimeout(f.current),clearTimeout(F.current)}}},[n,c,d]),b.useEffect(()=>{d>=2&&D("next")},[d]);const R=S?["fileText","layout","table","map","calendar","chat"]:["grid","barChart","kpi","map","alert","donut"],_=C=>y("px-3 py-1.5 rounded-lg border-[1.5px] text-sm font-bold cursor-pointer",C?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]");return e.jsx("div",{className:"fixed inset-0 bg-black/45 z-[300] flex items-center justify-center",onClick:C=>{C.target===C.currentTarget&&a()},children:e.jsxs("div",{className:"bg-white rounded-[20px] w-[620px] max-h-[90vh] flex flex-col shadow-[0_30px_80px_rgba(0,0,0,0.22)] overflow-hidden",children:[e.jsxs("div",{className:"px-[22px] py-[18px] border-b border-[#E9E9E9] flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-[9px] bg-[#FBF2EA] grid place-items-center text-custom-600 shrink-0",children:e.jsx(N,{name:S?"layout":"grid",size:18})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-black text-[18px] text-[#1B1B1B] m-0",children:S?"Build a Page":"Build a Dashboard"}),e.jsx("div",{className:"text-sm text-[#646464] mt-0.5",children:S?"End-user screen with mixed components.":"Live grid of widgets for ops & execs."})]}),e.jsx("button",{onClick:a,className:"w-7 h-7 rounded-[7px] border border-[#E9E9E9] bg-[#F6F4F1] grid place-items-center cursor-pointer",children:e.jsx(N,{name:"x",size:13})})]}),e.jsx("div",{className:"flex items-center px-[22px] py-3.5 border-b border-[#E9E9E9] gap-0",children:[["Basics",1],["Navigation",2],["Review",3]].map(([C,I],X)=>{const A=d>I,T=d===I;return e.jsxs(je.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:y("w-[26px] h-[26px] rounded-full grid place-items-center text-[15px] font-bold shrink-0",A?"bg-[#16A34A] text-white":T?"bg-custom-600 text-white":"bg-[#E9E9E9] text-[#646464]"),children:A?e.jsx(N,{name:"check",size:11,stroke:3}):I}),e.jsx("span",{className:y("text-sm font-bold",T?"text-[#1B1B1B]":"text-[#646464]"),children:C})]}),X<2&&e.jsx("div",{className:"flex-1 h-px bg-[#E9E9E9] mx-3"})]},C)})}),e.jsxs("div",{className:"flex-1 overflow-auto p-[22px]",children:[d===1&&e.jsxs("div",{className:"flex flex-col gap-3.5",children:[e.jsxs("div",{className:y("px-3.5 py-3 rounded-[10px] border-2 transition-[border-color,background] duration-200",g==="title"?"border-custom-600 bg-[#FBF2EA]":"border-[#E9E9E9] bg-white"),children:[e.jsxs("label",{className:y("text-xs font-bold uppercase tracking-[0.06em] block mb-1.5",g==="title"?"text-custom-600":"text-[#646464]"),children:[S?"Page":"Dashboard"," title ",e.jsx("span",{className:"text-[#DC2626]",children:"*"})]}),e.jsx("div",{className:"text-[15px] text-[#646464] mb-2",children:"Shown in the nav, the breadcrumb and the browser tab."}),e.jsx("input",{"data-tour":"wizard-title",className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] focus:border-custom-600",value:n,onChange:C=>s(C.target.value),placeholder:S?"e.g. Driver Performance":"e.g. Transload Health",autoFocus:!0})]}),e.jsxs("div",{className:y("px-3.5 py-3 rounded-[10px] border-2 transition-[border-color,background] duration-200",g==="desc"?"border-custom-600 bg-[#FBF2EA]":"border-[#E9E9E9] bg-white"),children:[e.jsxs("label",{className:y("text-xs font-bold uppercase tracking-[0.06em] block mb-1.5",g==="desc"?"text-custom-600":"text-[#646464]"),children:["Description ",e.jsx("span",{className:"text-sm text-[#646464] font-normal normal-case tracking-normal",children:"optional"})]}),e.jsxs("div",{className:"text-[15px] text-[#646464] mb-2",children:["A short one-liner that helps your team find this ",S?"page":"dashboard"," later."]}),e.jsx("textarea",{className:"w-full px-2.5 py-2 border border-[1.5px] border-[#E9E9E9] rounded text-sm outline-none bg-white text-[#1B1B1B] resize-none h-[68px] focus:border-custom-600",value:c,onChange:C=>x(C.target.value),placeholder:S?"Track on-time delivery, idle time and route adherence per driver.":"Real-time health of all transload sites — throughput, dwell, exceptions."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Icon"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:R.map(C=>e.jsxs("button",{onClick:()=>j(C),className:y("inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border-[1.5px] text-sm font-bold cursor-pointer",E===C?"border-custom-600 bg-[#FBF2EA] text-custom-600":"border-[#E9E9E9] bg-transparent text-[#646464]"),children:[e.jsx(N,{name:C,size:12}),C]},C))})]})]}),d===2&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:["Navigation location ",e.jsx("span",{className:"text-[#DC2626]",children:"*"})]}),e.jsxs("div",{className:"text-[15px] text-[#646464] mb-3",children:["Where should this ",S?"page":"dashboard"," appear in the navigation?"]}),e.jsx(St,{value:v,onChange:p,menus:r}),e.jsxs("div",{className:"mt-3.5 px-3.5 py-2.5 bg-[#F6F4F1] rounded-lg text-xs",children:["Will be reachable at:",e.jsxs("div",{className:"font-mono text-[15px] text-custom-600 mt-1",children:["/",v.mode==="parent"?n.toLowerCase().replace(/\s+/g,"-")||"new-parent":`${(v.parentLabel||v.parent||"").toLowerCase().replace(/\s+/g,"-")}/${(n||"untitled").toLowerCase().replace(/\s+/g,"-")}`]})]})]}),d===3&&e.jsxs("div",{"data-tour":"wizard-audience",className:"flex flex-col gap-3.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Audience"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[["team","My team"],["org","Whole org"],["execs","Executives only"],["external","External clients"]].map(([C,I])=>e.jsx("button",{onClick:()=>u(C),className:_(k===C),children:I},C))})]}),!S&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-bold text-[#646464] uppercase tracking-[0.06em] block mb-1.5",children:"Auto-refresh"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[["off","Off"],["1m","1 min"],["5m","5 min"],["15m","15 min"],["live","Live stream"]].map(([C,I])=>e.jsx("button",{onClick:()=>l(C),className:_(m===C),children:I},C))})]}),e.jsxs("div",{className:"bg-[#FAFAFA] border border-[#E9E9E9] rounded-[10px] px-4 py-3.5",children:[e.jsx("div",{className:"font-bold text-[15px] text-[#646464] tracking-[0.06em] uppercase mb-2.5",children:"Review"}),e.jsxs("div",{className:"grid gap-x-3.5 gap-y-2 text-[13px]",style:{gridTemplateColumns:"100px 1fr"},children:[e.jsx("div",{className:"text-[#646464]",children:"Type"}),e.jsx("div",{children:e.jsx("b",{children:S?"Page":"Dashboard"})}),e.jsx("div",{className:"text-[#646464]",children:"Title"}),e.jsx("div",{children:e.jsx("b",{children:n||"—"})}),e.jsx("div",{className:"text-[#646464]",children:"Description"}),e.jsx("div",{children:c||e.jsx("i",{className:"text-[#646464]",children:"(none)"})}),e.jsx("div",{className:"text-[#646464]",children:"Navigation"}),e.jsx("div",{children:v.mode==="parent"?e.jsx("span",{children:"New top-level parent"}):e.jsxs("span",{children:["Under ",e.jsx("b",{children:v.parentLabel})]})}),e.jsx("div",{className:"text-[#646464]",children:"Audience"}),e.jsx("div",{children:k}),!S&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[#646464]",children:"Refresh"}),e.jsx("div",{children:m})]})]})]})]})]}),e.jsxs("div",{className:"px-[22px] py-3.5 border-t border-[#E9E9E9] flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-[#646464]",children:["Step ",d," of 3"]}),e.jsxs("div",{className:"flex gap-2",children:[d>1&&e.jsx("button",{onClick:()=>o(C=>C-1),className:"px-4 py-2 text-[15px] font-bold text-[#646464] border border-[#E9E9E9] rounded-lg bg-transparent cursor-pointer",children:"Back"}),e.jsx("button",{onClick:a,className:"px-4 py-2 text-[15px] font-bold text-[#646464] border border-[#E9E9E9] rounded-lg bg-transparent cursor-pointer",children:"Cancel"}),d<3?e.jsxs("button",{"data-tour":"wizard-continue",onClick:()=>o(C=>C+1),disabled:w,className:y("flex items-center gap-1.5 px-5 py-2 text-[15px] font-bold text-white border-none rounded-lg",w?"bg-[#CCC] cursor-not-allowed opacity-60":"bg-custom-600 cursor-pointer"),children:["Continue ",e.jsx(N,{name:"arrowRight",size:14,stroke:2.2})]}):e.jsxs("button",{onClick:()=>i({kind:t,title:n.trim(),desc:c.trim(),nav:v,icon:E,refresh:m,audience:k,slots:[]}),className:"flex items-center gap-1.5 px-5 py-2 text-[15px] font-bold text-white bg-custom-600 border-none rounded-lg cursor-pointer",children:["Create ",S?"page":"dashboard"]})]})]})]})})},Vt=()=>{const t=$e(),a=Te(),{layoutId:i}=_e(),r=t.state,[d,o]=b.useState(i||r!=null&&r.openBuilder?"builder":"home"),[n,s]=b.useState((r==null?void 0:r.artifact)??null),[c,x]=b.useState(i??null),[E,j]=b.useState(!!i),[v,p]=b.useState([]),[k,u]=b.useState(!1),[m,l]=b.useState(r!=null&&r.openCreate?"page":null),[g,D]=b.useState(0),f=He(),F=fe(h=>{var L,M;return((M=(L=h==null?void 0:h.theme)==null?void 0:L.themeColours)==null?void 0:M["600"])||"#F15A22"}),S=fe(h=>{var L,M;return((M=(L=h==null?void 0:h.theme)==null?void 0:L.themeSecondaryColours)==null?void 0:M["600"])||"#1B1B1B"}),w=fe(h=>{var L;return((L=h==null?void 0:h.theme)==null?void 0:L.siteSettings)||{}}),[R,_]=b.useState([]);b.useEffect(()=>{const h=localStorage.getItem(Ie);h&&Ve(h,"default").then(L=>{var M;_(((M=L==null?void 0:L.data)==null?void 0:M.$values)??[])})},[]);const[C,I]=b.useState(!1),[X,A]=b.useState(!1),[T,P]=nt({accent:F,ink:S,sliderSpeedMs:6500,sliderAutoplay:!0,showSliderDots:!0,heroVariant:"banner",headerSticky:!0,welcomeName:"Gabriel",darkMode:!1,navOrientation:"horizontal"});b.useEffect(()=>{(r!=null&&r.openCreate||r!=null&&r.openBuilder)&&a(t.pathname,{replace:!0,state:{}})},[]);const H=b.useCallback(async()=>{var h,L;u(!0);try{const M=await Ze();p(((L=(h=M==null?void 0:M.data)==null?void 0:h.layouts)==null?void 0:L.$values)||[])}catch(M){console.error("Failed to load layouts",M)}finally{u(!1)}},[]);b.useEffect(()=>{H()},[H]),b.useEffect(()=>{i&&(j(!0),o("builder"),x(i),et(i).then(h=>{const L=(h==null?void 0:h.data)||h||null;L&&s(jt(L))}).catch(h=>console.error("Failed to load layout",h)).finally(()=>j(!1)))},[i]);const V=()=>l("page"),Y=async h=>{var L,M,J,q;try{const U={...h,isDraft:!0},O=await tt({layoutName:h.title,description:h.desc,layoutData:Fe(U,[])});if((O==null?void 0:O.success)===!1){pe.push(e.jsx(me,{title:"Error",type:"danger",duration:3e3,children:O.message||"Failed to create page layout."}),{placement:"top-center"});return}const ce=((L=O==null?void 0:O.data)==null?void 0:L.id)||(O==null?void 0:O.id)||(O==null?void 0:O.layoutId)||((M=O==null?void 0:O.data)==null?void 0:M.layoutId);l(null),a(ce?`/build/page-builder/${ce}`:"/build/page-builder")}catch(U){const O=((q=(J=U==null?void 0:U.response)==null?void 0:J.data)==null?void 0:q.message)||(U==null?void 0:U.message)||"Something went wrong. Please try again.";pe.push(e.jsx(me,{title:"Error",type:"danger",duration:3e3,children:O}),{placement:"top-center"})}},W=async(h,L)=>{if(c)try{await st(c,{layoutName:h.title,description:h.desc,layoutData:Fe(h,L)}),s({...h,slots:L}),H()}catch(M){throw console.error("Failed to save layout",M),M}},G=async()=>{if(c)try{await at(c,`${n==null?void 0:n.title} (copy)`),H()}catch(h){throw console.error("Failed to duplicate layout",h),h}},se=async h=>{const L=h??c;if(L)try{await rt(L),p(M=>M.filter(J=>J.id!==L)),h||oe()}catch(M){throw console.error("Failed to delete layout",M),M}},ae=h=>{a(`/build/page-builder/${h.id}`)},oe=()=>{o("home"),s(null),x(null),H(),a("/build/page-builder")};b.useEffect(()=>{document.documentElement.style.setProperty("--ca-ink",T.ink)},[T.ink]);const ie=h=>{const L={50:.5,100:.4,200:.3,300:.2,400:.1,500:.05,600:0,700:-.05,800:-.1,900:-.15,950:-.2},M={};for(const[J,q]of Object.entries(L))M[J]=q>=0?Se(h).lighten(q*100).toHexString():Se(h).darken(Math.abs(q)*100).toHexString();return M},ge=async()=>{A(!0);const h=T.accent,L=T.ink,M=ie(h),J=ie(L);document.documentElement.style.setProperty("--ca-ink",L),Object.entries(M).forEach(([U,O])=>document.documentElement.style.setProperty(`--custom-${U}`,O));const q=parseInt(M[600].slice(1),16);document.documentElement.style.setProperty("--customs-600",`${q>>16&255}, ${q>>8&255}, ${q&255}`),document.documentElement.style.setProperty("--tw-custom-600",M[600]),document.documentElement.style.setProperty("--text-custom-600",M[500]),Object.entries(J).forEach(([U,O])=>document.documentElement.style.setProperty(`--secondary-${U}`,O)),f(We(M)),f(Ge(J));try{await Ke(w.id,w.settingKey,w.settingName,w.settingValue,w.settingType,w.settingDescription,void 0,JSON.stringify({custom:M,customSecondary:J})),f(Ye()),pe.push(e.jsx(me,{title:"Saved!",type:"success",children:"Brand colors updated."}),{placement:"top-center"})}catch{pe.push(e.jsx(me,{title:"Error",type:"danger",children:"Failed to save colors. Please try again."}),{placement:"top-center"})}finally{A(!1)}};return b.useCallback(()=>{D(h=>h===null||h+1>=gt.length?null:h+1)},[]),e.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-[#FAFAFA]",children:[e.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:d==="home"?e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(Ht,{onBuild:V,layouts:v,loadingLayouts:k,onOpenLayout:ae,onDelete:h=>se(h)})}):E?e.jsxs("div",{className:"flex-1 flex items-center justify-center text-[#646464] text-[15px]",children:[e.jsx(N,{name:"refresh",size:18,stroke:1.5})," Loading layout…"]}):n?e.jsx(Rt,{artifact:n,layoutId:c,onBack:oe,onSave:W,onDuplicate:G,onDelete:()=>se()}):null}),m&&e.jsx(It,{kind:m,onClose:()=>l(null),onCreate:Y,menus:R}),d==="home"&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>I(h=>!h),title:"Tweaks",className:y("fixed bottom-6 right-6 z-[9000] flex items-center gap-1.5 px-3.5 py-2 text-[13px] font-bold text-white border-none rounded-full cursor-pointer shadow-[0_4px_14px_rgba(0,0,0,0.18)]",C?"bg-custom-600":"bg-[#1B1B1B]"),children:[e.jsx(N,{name:"sliders",size:13}),"Tweaks"]}),e.jsxs(lt,{title:"Tweaks",open:C,onClose:()=>I(!1),children:[e.jsx(ue,{title:"Color scheme",children:e.jsx(ot,{accent:T.accent,ink:T.ink,onApply:h=>{P("accent",h.accent),P("ink",h.ink)}})}),e.jsxs(ue,{title:"Custom brand colors",children:[e.jsx(Ce,{label:"Accent",value:T.accent,onChange:h=>P("accent",h)}),e.jsx(Ce,{label:"Ink (heading / dark)",value:T.ink,onChange:h=>P("ink",h)})]}),e.jsxs(ue,{title:"Hero slider",children:[e.jsx(Be,{label:"Hero style",value:T.heroVariant,options:[{value:"banner",label:"Banner slider"},{value:"simple",label:"Header + tagline"}],onChange:h=>P("heroVariant",h)}),e.jsx(he,{label:"Auto-advance",value:T.sliderAutoplay,onChange:h=>P("sliderAutoplay",h)}),e.jsx(it,{label:"Speed",value:T.sliderSpeedMs,min:3e3,max:12e3,step:500,unit:"ms",onChange:h=>P("sliderSpeedMs",h)}),e.jsx(he,{label:"Show pagination dots",value:T.showSliderDots,onChange:h=>P("showSliderDots",h)})]}),e.jsxs(ue,{title:"Workspace",children:[e.jsx(dt,{label:"Welcome name",value:T.welcomeName,onChange:h=>P("welcomeName",h)}),e.jsx(he,{label:"Sticky header",value:T.headerSticky,onChange:h=>P("headerSticky",h)}),e.jsx(he,{label:"Dark mode",value:T.darkMode,onChange:h=>P("darkMode",h)}),e.jsx(Be,{label:"Navigation",value:T.navOrientation,options:[{value:"horizontal",label:"Top bar"},{value:"vertical",label:"Sidebar"}],onChange:h=>P("navOrientation",h)})]}),e.jsx(ct,{label:X?"Saving…":"Save color changes",onClick:ge})]})]})]})},as=Vt;export{as as default};
@@ -0,0 +1 @@
1
+ import{a as e,u as s}from"./useControllableState-d0909575.js";import{c$ as a,bD as o,bJ as u,d0 as t}from"./index-3b5ce20a.js";import{c as r,b as i,u as l,a as m}from"./useDidUpdate-de319a18.js";const c={useCallbackRef:e,useColorLevel:a,useControllableState:s,useDidUpdate:r,useMergeRef:o,useRootClose:i,useTimeout:u,useUncertainRef:l,useUniqueId:m,useWindowSize:t};export{c as h};
@@ -0,0 +1 @@
1
+ import{j as e,l as de}from"./vendor-mui-98daa63f.js";import{A as B}from"./AdaptableCard-3d1e1f96.js";import{P as ce}from"./PageBreadcrumb-cf54a6e9.js";import{r as n,f as X}from"./vendor-react-ece1c85f.js";import{eP as k,_ as me,k as M,a0 as m,B as v,cF as ue,E as y,F as C,aA as he,D as xe,l as fe,d as ge,ai as be}from"./index-3b5ce20a.js";import{b as Ae,c as je,a as De}from"./vendor-redux-a1f00e6b.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{C as H}from"./index-a14e51de.js";import{D as G}from"./Drawer-4f97e662.js";import{a as u,F as we}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as ye,T as R}from"./actioncell-6b5ebd6c.js";import{D as Ce}from"./tableV2-99c808c0.js";import{u as Se}from"./usePermission-4689548c.js";import{h as Ne}from"./index-b0ef7ac3.js";import{S as Pe}from"./StickyFooter-3e569b80.js";import{C as Ie}from"./ConfirmDialog-2838a642.js";import{u as ve,d as h,a as f,c as Ue,F as Fe,b as Re}from"./index.esm-b2d342b5.js";import{a as Be}from"./index-0b08ce18.js";import{V as Y,i as ke}from"./validationPatterns-77446c46.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";async function Me(t){return(await k.apiV10InstallAppInstallAppApiPost(t,{timeout:12e4})).data}async function qe(t){return(await k.apiV10InstallAppInstallAppUiPost(t,{timeout:12e4})).data}async function Le(t){return await await k.apiV10InstallAppGetAppListGet()}const J="InstallAppData",S=Ae(`${J}/getAppData`,async t=>{const a=await Le();return console.log("appdata",a),a.data}),Ee={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},Oe={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:Ee,filterData:{position:"",account:""},appList:[]},K=je({name:`${J}`,initialState:Oe,reducers:{setTableData:(t,a)=>{t.tableData=a.payload},setFilterData:(t,a)=>{t.filterData=a.payload},toggleDeleteConfirmation:(t,a)=>{t.deleteConfirmation=a.payload},setSelectedRowData:(t,a)=>{t.selectedRowData=a.payload}},extraReducers:t=>{t.addCase(S.fulfilled,(a,s)=>{a.appList=s.payload.data.$values,a.tableData.total=s.payload.data.$values.length,a.loading=!1}).addCase(S.pending,a=>{a.loading=!0}).addCase(S.rejected,(a,s)=>{a.appList=[],a.loading=!1})}}),{setTableData:va,setFilterData:_,toggleDeleteConfirmation:Te,setSelectedRowData:W}=K.actions,Ve=K.reducer,$e=De({data:Ve}),I=me,ze=t=>{const a=M(),{touched:s,errors:r,type:x}=t;n.useState(),ve(),n.useState(!1),n.useState(""),n.useState(""),n.useState([]),n.useState([]),n.useState(),n.useState(!1),n.useEffect(()=>{d()},[]);const d=()=>{const g=S({});a(g)};return e.jsx(B,{className:"mb-4",children:e.jsxs("div",{className:"grid md:grid-cols-1 gap-4 py-1",children:[e.jsx(u,{label:"App Name",asterisk:!0,invalid:r.appName&&s.appName,errorMessage:r.appName,children:e.jsx(h,{type:"text",autoComplete:"off",name:"appName",placeholder:"App Name",component:m})}),e.jsx(u,{asterisk:!0,label:"Database Server",invalid:r.databaseServer&&s.databaseServer,errorMessage:r.databaseServer,children:e.jsx(h,{type:"text",autoComplete:"off",name:"databaseServer",placeholder:"Database Server",component:m})}),e.jsx(u,{asterisk:!0,label:"Database Name",invalid:r.databaseName&&s.databaseName,errorMessage:r.databaseName,children:e.jsx(h,{type:"text",autoComplete:"off",name:"databaseName",placeholder:"Database Name",component:m})}),e.jsx(u,{label:"Database Username",children:e.jsx(h,{type:"text",autoComplete:"off",name:"databaseUserName",placeholder:"Database UserName",component:m})}),e.jsx(u,{label:"Database Password",children:e.jsx(h,{type:"text",autoComplete:"off",name:"databasePassword",placeholder:"Database Password",component:m})}),e.jsx(u,{asterisk:!0,label:"Api Url",invalid:r.apiBaseUrl&&s.apiBaseUrl,errorMessage:r.apiBaseUrl,children:e.jsx(h,{type:"text",autoComplete:"off",name:"apiBaseUrl",placeholder:"Api Url",component:m})}),e.jsx(u,{asterisk:!0,label:"Api Hosting Folder",invalid:r.apiDestinationPath&&s.apiDestinationPath,errorMessage:r.apiDestinationPath,children:e.jsx(h,{type:"text",autoComplete:"off",name:"apiDestinationPath",placeholder:"Api Hosting Folder",component:m})}),e.jsx(u,{asterisk:!0,label:"App Url",invalid:r.appBaseUrl&&s.appBaseUrl,errorMessage:r.appBaseUrl,children:e.jsx(h,{type:"text",autoComplete:"off",name:"appBaseUrl",placeholder:"App Url",component:m})}),e.jsx(u,{asterisk:!0,label:"APP Hosting Folder",invalid:r.uiDestinationPath&&s.uiDestinationPath,errorMessage:r.uiDestinationPath,children:e.jsx(h,{type:"text",autoComplete:"off",name:"uiDestinationPath",placeholder:"APP Hosting Folder",component:m})}),e.jsx(u,{asterisk:!0,label:"App Login Username",invalid:r.userName&&s.userName,errorMessage:r.userName,children:e.jsx(h,{type:"text",autoComplete:"off",name:"userName",placeholder:"App Login Username",component:m})}),e.jsx(u,{asterisk:!0,label:"App Login Password",invalid:r.password&&s.password,errorMessage:r.password,children:e.jsx(h,{type:"text",autoComplete:"off",name:"password",placeholder:"App Login Password",component:m})})]})})},{useUniqueId:He}=Ne;f().matches(Y.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(Y.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",t=>t?!ke(t.trim()):!0);const Q=Ue().shape({appName:f().required("App Name Required").max(100,"Maximum 100 characters allowed"),databaseServer:f().required("Database Server Required").max(100,"Maximum 100 characters allowed"),databaseName:f().required("Database Name Required").max(100,"Maximum 100 characters allowed"),userName:f().required("App Username Required").max(100,"Maximum 100 characters allowed"),apiBaseUrl:f().required("Api Base Url Required").max(100,"Maximum 100 characters allowed"),appBaseUrl:f().required("App Base Url Required").max(100,"Maximum 100 characters allowed"),uiDestinationPath:f().required("Ui Hosting Path Required").max(100,"Maximum 100 characters allowed"),apiDestinationPath:f().required("Api Hosting Path Required").max(100,"Maximum 100 characters allowed"),password:f().required("App Password Required").max(100,"Maximum 100 characters allowed")}),Ge=({onDelete:t})=>{const[a,s]=n.useState(!1),r=()=>{s(!0)},x=()=>{s(!1)},d=()=>{t==null||t(s)};return e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(ue,{}),type:"button",onClick:r,children:"Delete"}),e.jsx(Ie,{isOpen:a,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:x,onRequestClose:x,onCancel:x,onConfirm:d,children:e.jsx("p",{children:"Are you sure you want to delete this? All record related to this role will be deleted as well. This action cannot be undone."})})]})},Z=n.forwardRef((t,a)=>{const{type:s,footerWidth:r,initialData:x={id:"",appName:"",databaseServer:"",databaseUserName:"",databaseName:"",databasePassword:"",userName:"",apiBaseUrl:"",appBaseUrl:"",uiSourcePath:"",apiSourcePath:"",uiDestinationPath:"",apiDestinationPath:"",password:""},onFormSubmit:d,onDiscard:g,onDelete:j}=t,P=He("Contact-");return e.jsx(e.Fragment,{children:e.jsx(Fe,{innerRef:a,initialValues:{...x},validationSchema:Q,onSubmit:(D,{setSubmitting:o})=>{const c=D;s==="new"&&(c.id=P),d==null||d(c,o)},children:({values:D,touched:o,errors:c,isSubmitting:b})=>e.jsx(Re,{children:e.jsxs(we,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsx(ze,{type:s,touched:o,errors:c})})}),e.jsxs(Pe,{className:`px-8 flex items-center justify-between py-4 ${r?`md:${r}`:""}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:s==="edit"&&e.jsx(Ge,{onDelete:j})}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(v,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>g==null?void 0:g(),children:"Discard"}),e.jsx(v,{size:"sm",variant:"solid",loading:b,icon:e.jsx(Be,{}),type:"submit",children:"Save"})]})]})]})})})})});Z.displayName="InstallAppForm";const Ye=t=>{const{footerWidth:a,onDrawerClose:s,fetchData:r}=t;X();const x=M();n.useState(!1);const d=async o=>await Me(o),g=async o=>await qe(o),j=()=>{if(he("apiCache-contactsData"),r){r();return}x(S({}))},P=async(o,c)=>{c(!0);const b={appName:o.appName??"",databaseServer:o.databaseServer??"",databaseUserName:o.databaseUserName??"",databaseName:o.databaseName??"",databasePassword:o.databasePassword??"",userName:o.userName??"",apiBaseUrl:o.apiBaseUrl??"",appBaseUrl:o.appBaseUrl??"",uiSourcePath:o.uiSourcePath??"",apiSourcePath:o.apiSourcePath??"",uiDestinationPath:o.uiDestinationPath??"",apiDestinationPath:o.apiDestinationPath??"",password:o.password??""};try{d(b).then(p=>{console.log("res",p),p&&p.indexOf("Updated the connection string")>-1?(y.push(e.jsx(C,{title:"Success",type:"success",duration:2500,children:"App API Successfully Copied"}),{placement:"top-center"}),g(b).then(A=>{A&&A.indexOf("Updated the Api Base Url")>-1?(y.push(e.jsx(C,{title:"Success",type:"success",duration:2500,children:"App UI Successfully Copied"}),{placement:"top-center"}),j(),s()):y.push(e.jsxs(C,{title:"Error",type:"danger",duration:2500,children:["App UI Failed:",e.jsx("br",{}),A]}),{placement:"top-center"})}).catch(A=>{var U=A.response.data;c(!1),y.push(e.jsx(C,{title:"Error",type:"danger",duration:2500,children:U.message}),{placement:"top-center"})})):y.push(e.jsxs(C,{title:"Error",type:"danger",duration:2500,children:["App Install Failed:",e.jsx("br",{}),p]}),{placement:"top-center"})})}catch(p){console.log("e",p),y.push(e.jsx(C,{title:"Error",type:"danger",duration:2500,children:"Something went wrong. please try again!"}),{placement:"top-center"})}},D=()=>{s()};return e.jsx(e.Fragment,{children:e.jsx(Z,{type:"new",footerWidth:a,onFormSubmit:P,onDiscard:D})})};xe("InstallAppData",$e);const _e=()=>{var T,V,$,z;const[t,a]=n.useState([]),[s,r]=n.useState(!1);n.useState(!1);const[x,d]=n.useState(!1),[g,j]=n.useState(!1),[P,D]=n.useState(),[o,c]=n.useState(!1),b=Se("Contacts"),p={edit:b.isEdit,delete:b.isDelete,view:b.isView},A=()=>{c(!0)},U=()=>{d(!0)},q=()=>{d(!1)};n.useRef(null);const ee=X(),w=M(),l=I(i=>i.InstallAppData.data.filterData),L=I(i=>i.InstallAppData.data.loading),F=I(i=>i.InstallAppData.data.appList);console.log("applistdata",F),fe();const{pageIndex:ae,pageSize:te,sort:se,query:We,total:Qe}=I(i=>i.InstallAppData.data.tableData);n.useEffect(()=>{E()},[ae,te,se,s,l]);const E=()=>{const i=S({});w(i)};console.log("data",F);const re=i=>{ee("/app/crm/contact-details/"+i.id)},[ie,oe]=n.useState({pageSize:"",pageIndex:""}),ne=(i,N)=>{N===R.view&&re(i),N===R.edit&&(D(i.id),w(W(i)),j(!0)),N===R.delete&&(w(Te(!0)),w(W(i)))},le=()=>{j(!1)},O=i=>{i==="accountId"&&w(_({...l,account:""})),i==="Position"&&w(_({...l,position:""}))},pe=[...p!=null&&p.edit||p!=null&&p.delete?[{dataField:"Action",caption:"Action",width:"130",cellRender:i=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(ye,{row:i==null?void 0:i.data,actions:p,buttonClick:ne})})}]:[],{dataField:"appName",caption:"App Name",width:"230"},{dataField:"databaseServer",caption:"Database Server",width:"230"},{dataField:"databaseUserName",caption:"Database User Name",width:"230"},{dataField:"databaseName",caption:"Database Name",width:"230"},{dataField:"userName",caption:"User Name",width:"230"},{dataField:"apiBaseUrl",caption:"Api Base Url",width:"230"},{dataField:"appBaseUrl",caption:"App Base Url",width:"230"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:i=>{const N=be(i.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:N})}}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(ce,{items:[{label:"App Settings"},{label:"Install Apps"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Install Apps"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[b.isEdit&&e.jsx(v,{onClick:()=>U(),block:!0,variant:"solid",size:"sm",icon:e.jsx(ge,{}),children:"Add App"}),e.jsx(G,{title:"Setup App",isOpen:x,onClose:q,portalClassName:"w30 prevent-overflow",children:e.jsx(Ye,{footerWidth:"w30",onDrawerClose:q,fetchData:E})}),e.jsx(G,{title:"Edit Contact",isOpen:g,onClose:le,portalClassName:"w30 prevent-overflow"})]})]})]}),e.jsxs(B,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:[L&&e.jsx(de,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(B,{className:"borderless",children:[e.jsxs("div",{className:"text-right mb-3 ",children:[((T=l==null?void 0:l.account)==null?void 0:T.value)&&e.jsx(H,{title:"Account",value:(V=l==null?void 0:l.account)==null?void 0:V.label,onRemovefilter:O,tagId:"accountId"}),(($=l==null?void 0:l.position)==null?void 0:$.value)&&e.jsx(H,{title:"Position",value:(z=l==null?void 0:l.position)==null?void 0:z.label,onRemovefilter:O,tagId:"Position"})]}),e.jsx(Ce,{columns:pe,tableName:"app-table",data:F||[],height:"calc(100vh - 290px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:t,setSelectedRowId:a,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:ie,setPager:oe,openFilter:A,isPaginationReq:!0,isFilterReq:!0,isSelectionReq:!1,isLoading:L})]})]})]})},Ua=_e;export{Ua as default};