@xframework-ca-test/cli 1.0.33 → 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 +22 -8
  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,4 @@
1
+ import{j as n,a0 as De,l as an}from"./vendor-mui-98daa63f.js";import{r as g,R as ln,f as on,L as bt}from"./vendor-react-ece1c85f.js";import{P as cn}from"./PageBreadcrumb-cf54a6e9.js";import{r as un}from"./index-91505016.js";import{T as yt,A as dn}from"./actioncell-6b5ebd6c.js";import{D as fn,l as mn,k as pn,ai as vt,B as L,Z as Pt,dP as gn,dE as hn,r as xn,dQ as Fe,c7 as Ie,E as ve,F as Pe}from"./index-3b5ce20a.js";import{A as zt}from"./AdaptableCard-3d1e1f96.js";import{C as bn}from"./ConfirmDialog-2838a642.js";import{S as jt}from"./StickyFooter-3e569b80.js";import{C as yn}from"./tableV3-24eed052.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as Nt}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import{T as Oe,a as Ue,b as me}from"./index-289b3fd9.js";import{U as Xe}from"./Upload-be937eb6.js";import{c as _t,i as at,F as St,b as wt,d as Ze}from"./index.esm-b2d342b5.js";import{u as vn}from"./usePermission-4689548c.js";import{w as Pn}from"./WrapperCell-3d5592cf.js";import"./vendor-redux-a1f00e6b.js";import"./LeadSourceService-cf71ea64.js";import"./ContactService-8afcaeb7.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"./FileSaver.min-20f3f13a.js";import"./mapView-c8063ed6.js";import"./esm-c40433f8.js";import"./lodash-306e3f66.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";const We=g.createContext(null);We.displayName="PanelGroupContext";const W={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},dt=10,je=g.useLayoutEffect,Ct=ln["useId".toString()],zn=typeof Ct=="function"?Ct:()=>null;let jn=0;function ft(t=null){const e=zn(),r=g.useRef(t||e||null);return r.current===null&&(r.current=""+jn++),t??r.current}function Ht({children:t,className:e="",collapsedSize:r,collapsible:a,defaultSize:s,forwardedRef:o,id:u,maxSize:c,minSize:l,onCollapse:m,onExpand:d,onResize:i,order:f,style:h,tagName:p="div",...x}){const y=g.useContext(We);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:z,expandPanel:S,getPanelSize:U,getPanelStyle:J,groupId:Y,isPanelCollapsed:A,reevaluatePanelConstraints:w,registerPanel:Q,resizePanel:ae,unregisterPanel:X}=y,K=ft(u),M=g.useRef({callbacks:{onCollapse:m,onExpand:d,onResize:i},constraints:{collapsedSize:r,collapsible:a,defaultSize:s,maxSize:c,minSize:l},id:K,idIsFromProps:u!==void 0,order:f});g.useRef({didLogMissingDefaultSizeWarning:!1}),je(()=>{const{callbacks:G,constraints:B}=M.current,q={...B};M.current.id=K,M.current.idIsFromProps=u!==void 0,M.current.order=f,G.onCollapse=m,G.onExpand=d,G.onResize=i,B.collapsedSize=r,B.collapsible=a,B.defaultSize=s,B.maxSize=c,B.minSize=l,(q.collapsedSize!==B.collapsedSize||q.collapsible!==B.collapsible||q.maxSize!==B.maxSize||q.minSize!==B.minSize)&&w(M.current,q)}),je(()=>{const G=M.current;return Q(G),()=>{X(G)}},[f,K,Q,X]),g.useImperativeHandle(o,()=>({collapse:()=>{z(M.current)},expand:G=>{S(M.current,G)},getId(){return K},getSize(){return U(M.current)},isCollapsed(){return A(M.current)},isExpanded(){return!A(M.current)},resize:G=>{ae(M.current,G)}}),[z,S,U,A,K,ae]);const fe=J(M.current,s);return g.createElement(p,{...x,children:t,className:e,id:K,style:{...fe,...h},[W.groupId]:Y,[W.panel]:"",[W.panelCollapsible]:a||void 0,[W.panelId]:K,[W.panelSize]:parseFloat(""+fe.flexGrow).toFixed(1)})}const Ee=g.forwardRef((t,e)=>g.createElement(Ht,{...t,forwardedRef:e}));Ht.displayName="Panel";Ee.displayName="forwardRef(Panel)";let lt=null,Te=-1,pe=null;function Nn(t,e,r){const a=(e&Wt)!==0,s=(e&Gt)!==0,o=(e&Kt)!==0,u=(e&qt)!==0;if(e){if(a)return o?"se-resize":u?"ne-resize":"e-resize";if(s)return o?"sw-resize":u?"nw-resize":"w-resize";if(o)return"s-resize";if(u)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Sn(){pe!==null&&(document.head.removeChild(pe),lt=null,pe=null,Te=-1)}function Qe(t,e,r){var a,s;const o=Nn(t,e);if(lt!==o){if(lt=o,pe===null&&(pe=document.createElement("style"),document.head.appendChild(pe)),Te>=0){var u;(u=pe.sheet)===null||u===void 0||u.removeRule(Te)}Te=(a=(s=pe.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${o} !important;}`))!==null&&a!==void 0?a:-1}}function Tt(t){return t.type==="keydown"}function Jt(t){return t.type.startsWith("pointer")}function Vt(t){return t.type.startsWith("mouse")}function Ge(t){if(Jt(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Vt(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function wn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Cn(t,e,r){return r?t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y:t.x<=e.x+e.width&&t.x+t.width>=e.x&&t.y<=e.y+e.height&&t.y+t.height>=e.y}function Rn(t,e){if(t===e)throw new Error("Cannot compare node with itself");const r={a:Ft(t),b:Ft(e)};let a;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),e=r.b.pop(),a=t;k(a,"Stacking order can only be calculated for elements with a common ancestor");const s={a:kt(Rt(r.a)),b:kt(Rt(r.b))};if(s.a===s.b){const o=a.childNodes,u={a:r.a.at(-1),b:r.b.at(-1)};let c=o.length;for(;c--;){const l=o[c];if(l===u.a)return 1;if(l===u.b)return-1}}return Math.sign(s.a-s.b)}const kn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Fn(t){var e;const r=getComputedStyle((e=Bt(t))!==null&&e!==void 0?e:t).display;return r==="flex"||r==="inline-flex"}function In(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Fn(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||kn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Rt(t){let e=t.length;for(;e--;){const r=t[e];if(k(r,"Missing node"),In(r))return r}return null}function kt(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ft(t){const e=[];for(;t;)e.push(t),t=Bt(t);return e}function Bt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const Wt=1,Gt=2,Kt=4,qt=8,En=wn()==="coarse";let oe=[],ke=!1,ge=new Map,Ke=new Map;const $e=new Set;function An(t,e,r,a,s){var o;const{ownerDocument:u}=e,c={direction:r,element:e,hitAreaMargins:a,setResizeHandlerState:s},l=(o=ge.get(u))!==null&&o!==void 0?o:0;return ge.set(u,l+1),$e.add(c),Ve(),function(){var d;Ke.delete(t),$e.delete(c);const i=(d=ge.get(u))!==null&&d!==void 0?d:1;if(ge.set(u,i-1),Ve(),i===1&&ge.delete(u),oe.includes(c)){const f=oe.indexOf(c);f>=0&&oe.splice(f,1),qe(),s("up",!0,null)}}}function Ln(t){const{target:e}=t,{x:r,y:a}=Ge(t);ke=!0,mt({target:e,x:r,y:a}),Ve(),oe.length>0&&(Be("down",t),qe(),t.preventDefault(),Yt(e)||t.stopImmediatePropagation())}function et(t){const{x:e,y:r}=Ge(t);if(ke&&t.type!=="pointerleave"&&t.buttons===0&&(ke=!1,Be("up",t)),!ke){const{target:a}=t;mt({target:a,x:e,y:r})}Be("move",t),qe(),oe.length>0&&t.preventDefault()}function tt(t){const{target:e}=t,{x:r,y:a}=Ge(t);Ke.clear(),ke=!1,oe.length>0&&(t.preventDefault(),Yt(e)||t.stopImmediatePropagation()),Be("up",t),mt({target:e,x:r,y:a}),qe(),Ve()}function Yt(t){let e=t;for(;e;){if(e.hasAttribute(W.resizeHandle))return!0;e=e.parentElement}return!1}function mt({target:t,x:e,y:r}){oe.splice(0);let a=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(a=t),$e.forEach(s=>{const{element:o,hitAreaMargins:u}=s,c=o.getBoundingClientRect(),{bottom:l,left:m,right:d,top:i}=c,f=En?u.coarse:u.fine;if(e>=m-f&&e<=d+f&&r>=i-f&&r<=l+f){if(a!==null&&document.contains(a)&&o!==a&&!o.contains(a)&&!a.contains(o)&&Rn(a,o)>0){let p=a,x=!1;for(;p&&!p.contains(o);){if(Cn(p.getBoundingClientRect(),c,!0)){x=!0;break}p=p.parentElement}if(x)return}oe.push(s)}})}function nt(t,e){Ke.set(t,e)}function qe(){let t=!1,e=!1;oe.forEach(a=>{const{direction:s}=a;s==="horizontal"?t=!0:e=!0});let r=0;Ke.forEach(a=>{r|=a}),t&&e?Qe("intersection",r):t?Qe("horizontal",r):e?Qe("vertical",r):Sn()}let st;function Ve(){var t;(t=st)===null||t===void 0||t.abort(),st=new AbortController;const e={capture:!0,signal:st.signal};$e.size&&(ke?(oe.length>0&&ge.forEach((r,a)=>{const{body:s}=a;r>0&&(s.addEventListener("contextmenu",tt,e),s.addEventListener("pointerleave",et,e),s.addEventListener("pointermove",et,e))}),ge.forEach((r,a)=>{const{body:s}=a;s.addEventListener("pointerup",tt,e),s.addEventListener("pointercancel",tt,e)})):ge.forEach((r,a)=>{const{body:s}=a;r>0&&(s.addEventListener("pointerdown",Ln,e),s.addEventListener("pointermove",et,e))}))}function Be(t,e){$e.forEach(r=>{const{setResizeHandlerState:a}=r,s=oe.includes(r);a(t,s,e)})}function $n(){const[t,e]=g.useState(0);return g.useCallback(()=>e(r=>r+1),[])}function k(t,e){if(!t)throw console.error(e),Error(e)}function Ne(t,e,r=dt){return t.toFixed(r)===e.toFixed(r)?0:t>e?1:-1}function de(t,e,r=dt){return Ne(t,e,r)===0}function re(t,e,r){return Ne(t,e,r)===0}function Mn(t,e,r){if(t.length!==e.length)return!1;for(let a=0;a<t.length;a++){const s=t[a],o=e[a];if(!re(s,o,r))return!1}return!0}function Re({panelConstraints:t,panelIndex:e,size:r}){const a=t[e];k(a!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:o,maxSize:u=100,minSize:c=0}=a;if(Ne(r,c)<0)if(o){const l=(s+c)/2;Ne(r,l)<0?r=s:r=c}else r=c;return r=Math.min(u,r),r=parseFloat(r.toFixed(dt)),r}function Ae({delta:t,initialLayout:e,panelConstraints:r,pivotIndices:a,prevLayout:s,trigger:o}){if(re(t,0))return e;const u=[...e],[c,l]=a;k(c!=null,"Invalid first pivot index"),k(l!=null,"Invalid second pivot index");let m=0;if(o==="keyboard"){{const i=t<0?l:c,f=r[i];k(f,`Panel constraints not found for index ${i}`);const{collapsedSize:h=0,collapsible:p,minSize:x=0}=f;if(p){const y=e[i];if(k(y!=null,`Previous layout not found for panel index ${i}`),re(y,h)){const z=x-y;Ne(z,Math.abs(t))>0&&(t=t<0?0-z:z)}}}{const i=t<0?c:l,f=r[i];k(f,`No panel constraints found for index ${i}`);const{collapsedSize:h=0,collapsible:p,minSize:x=0}=f;if(p){const y=e[i];if(k(y!=null,`Previous layout not found for panel index ${i}`),re(y,x)){const z=y-h;Ne(z,Math.abs(t))>0&&(t=t<0?0-z:z)}}}}{const i=t<0?1:-1;let f=t<0?l:c,h=0;for(;;){const x=e[f];k(x!=null,`Previous layout not found for panel index ${f}`);const z=Re({panelConstraints:r,panelIndex:f,size:100})-x;if(h+=z,f+=i,f<0||f>=r.length)break}const p=Math.min(Math.abs(t),Math.abs(h));t=t<0?0-p:p}{let f=t<0?c:l;for(;f>=0&&f<r.length;){const h=Math.abs(t)-Math.abs(m),p=e[f];k(p!=null,`Previous layout not found for panel index ${f}`);const x=p-h,y=Re({panelConstraints:r,panelIndex:f,size:x});if(!re(p,y)&&(m+=p-y,u[f]=y,m.toFixed(3).localeCompare(Math.abs(t).toFixed(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(Mn(s,u))return s;{const i=t<0?l:c,f=e[i];k(f!=null,`Previous layout not found for panel index ${i}`);const h=f+m,p=Re({panelConstraints:r,panelIndex:i,size:h});if(u[i]=p,!re(p,h)){let x=h-p,z=t<0?l:c;for(;z>=0&&z<r.length;){const S=u[z];k(S!=null,`Previous layout not found for panel index ${z}`);const U=S+x,J=Re({panelConstraints:r,panelIndex:z,size:U});if(re(S,J)||(x-=J-S,u[z]=J),re(x,0))break;t>0?z--:z++}}}const d=u.reduce((i,f)=>f+i,0);return re(d,100)?u:s}function Dn({layout:t,panelsArray:e,pivotIndices:r}){let a=0,s=100,o=0,u=0;const c=r[0];k(c!=null,"No pivot index found"),e.forEach((i,f)=>{const{constraints:h}=i,{maxSize:p=100,minSize:x=0}=h;f===c?(a=x,s=p):(o+=x,u+=p)});const l=Math.min(s,100-o),m=Math.max(a,100-u),d=t[c];return{valueMax:l,valueMin:m,valueNow:d}}function Me(t,e=document){return Array.from(e.querySelectorAll(`[${W.resizeHandleId}][data-panel-group-id="${t}"]`))}function Xt(t,e,r=document){const s=Me(t,r).findIndex(o=>o.getAttribute(W.resizeHandleId)===e);return s??null}function Zt(t,e,r){const a=Xt(t,e,r);return a!=null?[a,a+1]:[-1,-1]}function On(t){return t instanceof HTMLElement?!0:typeof t=="object"&&t!==null&&"tagName"in t&&"getAttribute"in t}function Qt(t,e=document){if(On(e)&&e.dataset.panelGroupId==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Ye(t,e=document){const r=e.querySelector(`[${W.resizeHandleId}="${t}"]`);return r||null}function Un(t,e,r,a=document){var s,o,u,c;const l=Ye(e,a),m=Me(t,a),d=l?m.indexOf(l):-1,i=(s=(o=r[d])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,f=(u=(c=r[d+1])===null||c===void 0?void 0:c.id)!==null&&u!==void 0?u:null;return[i,f]}function _n({committedValuesRef:t,eagerValuesRef:e,groupId:r,layout:a,panelDataArray:s,panelGroupElement:o,setLayout:u}){g.useRef({didWarnAboutMissingResizeHandle:!1}),je(()=>{if(!o)return;const c=Me(r,o);for(let l=0;l<s.length-1;l++){const{valueMax:m,valueMin:d,valueNow:i}=Dn({layout:a,panelsArray:s,pivotIndices:[l,l+1]}),f=c[l];if(f!=null){const h=s[l];k(h,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",h.id),f.setAttribute("aria-valuemax",""+Math.round(m)),f.setAttribute("aria-valuemin",""+Math.round(d)),f.setAttribute("aria-valuenow",i!=null?""+Math.round(i):"")}}return()=>{c.forEach((l,m)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[r,a,s,o]),g.useEffect(()=>{if(!o)return;const c=e.current;k(c,"Eager values not found");const{panelDataArray:l}=c,m=Qt(r,o);k(m!=null,`No group found for id "${r}"`);const d=Me(r,o);k(d,`No resize handles found for group id "${r}"`);const i=d.map(f=>{const h=f.getAttribute(W.resizeHandleId);k(h,"Resize handle element has no handle id attribute");const[p,x]=Un(r,h,l,o);if(p==null||x==null)return()=>{};const y=z=>{if(!z.defaultPrevented)switch(z.key){case"Enter":{z.preventDefault();const S=l.findIndex(U=>U.id===p);if(S>=0){const U=l[S];k(U,`No panel data found for index ${S}`);const J=a[S],{collapsedSize:Y=0,collapsible:A,minSize:w=0}=U.constraints;if(J!=null&&A){const Q=Ae({delta:re(J,Y)?w-Y:Y-J,initialLayout:a,panelConstraints:l.map(ae=>ae.constraints),pivotIndices:Zt(r,h,o),prevLayout:a,trigger:"keyboard"});a!==Q&&u(Q)}}break}}};return f.addEventListener("keydown",y),()=>{f.removeEventListener("keydown",y)}});return()=>{i.forEach(f=>f())}},[o,t,e,r,a,s,u])}function It(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function en(t,e){const r=t==="horizontal",{x:a,y:s}=Ge(e);return r?a:s}function Hn(t,e,r,a,s){const o=r==="horizontal",u=Ye(e,s);k(u,`No resize handle element found for id "${e}"`);const c=u.getAttribute(W.groupId);k(c,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=a;const m=en(r,t),d=Qt(c,s);k(d,`No group element found for id "${c}"`);const i=d.getBoundingClientRect(),f=o?i.width:i.height;return(m-l)/f*100}function Tn(t,e,r,a,s,o){if(Tt(t)){const u=r==="horizontal";let c=0;t.shiftKey?c=100:s!=null?c=s:c=10;let l=0;switch(t.key){case"ArrowDown":l=u?0:c;break;case"ArrowLeft":l=u?-c:0;break;case"ArrowRight":l=u?c:0;break;case"ArrowUp":l=u?0:-c;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return a==null?0:Hn(t,e,r,a,o)}function Jn({panelDataArray:t}){const e=Array(t.length),r=t.map(o=>o.constraints);let a=0,s=100;for(let o=0;o<t.length;o++){const u=r[o];k(u,`Panel constraints not found for index ${o}`);const{defaultSize:c}=u;c!=null&&(a++,e[o]=c,s-=c)}for(let o=0;o<t.length;o++){const u=r[o];k(u,`Panel constraints not found for index ${o}`);const{defaultSize:c}=u;if(c!=null)continue;const l=t.length-a,m=s/l;a++,e[o]=m,s-=m}return e}function we(t,e,r){e.forEach((a,s)=>{const o=t[s];k(o,`Panel data not found for index ${s}`);const{callbacks:u,constraints:c,id:l}=o,{collapsedSize:m=0,collapsible:d}=c,i=r[l];if(i==null||a!==i){r[l]=a;const{onCollapse:f,onExpand:h,onResize:p}=u;p&&p(a,i),d&&(f||h)&&(h&&(i==null||de(i,m))&&!de(a,m)&&h(),f&&(i==null||!de(i,m))&&de(a,m)&&f())}})}function _e(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}function Vn({defaultSize:t,dragState:e,layout:r,panelData:a,panelIndex:s,precision:o=3}){const u=r[s];let c;return u==null?c=t!=null?t.toFixed(o):"1":a.length===1?c="1":c=u.toFixed(o),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Bn(t,e=10){let r=null;return(...s)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...s)},e)}}function Et(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,r)=>{localStorage.setItem(e,r)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function tn(t){return`react-resizable-panels:${t}`}function nn(t){return t.map(e=>{const{constraints:r,id:a,idIsFromProps:s,order:o}=e;return s?a:o?`${o}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((e,r)=>e.localeCompare(r)).join(",")}function sn(t,e){try{const r=tn(t),a=e.getItem(r);if(a){const s=JSON.parse(a);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function Wn(t,e,r){var a,s;const o=(a=sn(t,r))!==null&&a!==void 0?a:{},u=nn(e);return(s=o[u])!==null&&s!==void 0?s:null}function Gn(t,e,r,a,s){var o;const u=tn(t),c=nn(e),l=(o=sn(t,s))!==null&&o!==void 0?o:{};l[c]={expandToSizes:Object.fromEntries(r.entries()),layout:a};try{s.setItem(u,JSON.stringify(l))}catch(m){console.error(m)}}function At({layout:t,panelConstraints:e}){const r=[...t],a=r.reduce((o,u)=>o+u,0);if(r.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${r.map(o=>`${o}%`).join(", ")}`);if(!re(a,100)&&r.length>0)for(let o=0;o<e.length;o++){const u=r[o];k(u!=null,`No layout data found for index ${o}`);const c=100/a*u;r[o]=c}let s=0;for(let o=0;o<e.length;o++){const u=r[o];k(u!=null,`No layout data found for index ${o}`);const c=Re({panelConstraints:e,panelIndex:o,size:u});u!=c&&(s+=u-c,r[o]=c)}if(!re(s,0))for(let o=0;o<e.length;o++){const u=r[o];k(u!=null,`No layout data found for index ${o}`);const c=u+s,l=Re({panelConstraints:e,panelIndex:o,size:c});if(u!==l&&(s-=l-u,r[o]=l,re(s,0)))break}return r}const Kn=100,Le={getItem:t=>(Et(Le),Le.getItem(t)),setItem:(t,e)=>{Et(Le),Le.setItem(t,e)}},Lt={};function rn({autoSaveId:t=null,children:e,className:r="",direction:a,forwardedRef:s,id:o=null,onLayout:u=null,keyboardResizeBy:c=null,storage:l=Le,style:m,tagName:d="div",...i}){const f=ft(o),h=g.useRef(null),[p,x]=g.useState(null),[y,z]=g.useState([]),S=$n(),U=g.useRef({}),J=g.useRef(new Map),Y=g.useRef(0),A=g.useRef({autoSaveId:t,direction:a,dragState:p,id:f,keyboardResizeBy:c,onLayout:u,storage:l}),w=g.useRef({layout:y,panelDataArray:[],panelDataArrayChanged:!1});g.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),g.useImperativeHandle(s,()=>({getId:()=>A.current.id,getLayout:()=>{const{layout:v}=w.current;return v},setLayout:v=>{const{onLayout:N}=A.current,{layout:R,panelDataArray:j}=w.current,P=At({layout:v,panelConstraints:j.map(C=>C.constraints)});It(R,P)||(z(P),w.current.layout=P,N&&N(P),we(j,P,U.current))}}),[]),je(()=>{A.current.autoSaveId=t,A.current.direction=a,A.current.dragState=p,A.current.id=f,A.current.onLayout=u,A.current.storage=l}),_n({committedValuesRef:A,eagerValuesRef:w,groupId:f,layout:y,panelDataArray:w.current.panelDataArray,setLayout:z,panelGroupElement:h.current}),g.useEffect(()=>{const{panelDataArray:v}=w.current;if(t){if(y.length===0||y.length!==v.length)return;let N=Lt[t];N==null&&(N=Bn(Gn,Kn),Lt[t]=N);const R=[...v],j=new Map(J.current);N(t,R,j,y,l)}},[t,y,l]),g.useEffect(()=>{});const Q=g.useCallback(v=>{const{onLayout:N}=A.current,{layout:R,panelDataArray:j}=w.current;if(v.constraints.collapsible){const P=j.map(ne=>ne.constraints),{collapsedSize:C=0,panelSize:$,pivotIndices:V}=ze(j,v,R);if(k($!=null,`Panel size not found for panel "${v.id}"`),!de($,C)){J.current.set(v.id,$);const se=Ce(j,v)===j.length-1?$-C:C-$,H=Ae({delta:se,initialLayout:R,panelConstraints:P,pivotIndices:V,prevLayout:R,trigger:"imperative-api"});_e(R,H)||(z(H),w.current.layout=H,N&&N(H),we(j,H,U.current))}}},[]),ae=g.useCallback((v,N)=>{const{onLayout:R}=A.current,{layout:j,panelDataArray:P}=w.current;if(v.constraints.collapsible){const C=P.map(ee=>ee.constraints),{collapsedSize:$=0,panelSize:V=0,minSize:ne=0,pivotIndices:se}=ze(P,v,j),H=N??ne;if(de(V,$)){const ee=J.current.get(v.id),b=ee!=null&&ee>=H?ee:H,D=Ce(P,v)===P.length-1?V-b:b-V,E=Ae({delta:D,initialLayout:j,panelConstraints:C,pivotIndices:se,prevLayout:j,trigger:"imperative-api"});_e(j,E)||(z(E),w.current.layout=E,R&&R(E),we(P,E,U.current))}}},[]),X=g.useCallback(v=>{const{layout:N,panelDataArray:R}=w.current,{panelSize:j}=ze(R,v,N);return k(j!=null,`Panel size not found for panel "${v.id}"`),j},[]),K=g.useCallback((v,N)=>{const{panelDataArray:R}=w.current,j=Ce(R,v);return Vn({defaultSize:N,dragState:p,layout:y,panelData:R,panelIndex:j})},[p,y]),M=g.useCallback(v=>{const{layout:N,panelDataArray:R}=w.current,{collapsedSize:j=0,collapsible:P,panelSize:C}=ze(R,v,N);return k(C!=null,`Panel size not found for panel "${v.id}"`),P===!0&&de(C,j)},[]),fe=g.useCallback(v=>{const{layout:N,panelDataArray:R}=w.current,{collapsedSize:j=0,collapsible:P,panelSize:C}=ze(R,v,N);return k(C!=null,`Panel size not found for panel "${v.id}"`),!P||Ne(C,j)>0},[]),G=g.useCallback(v=>{const{panelDataArray:N}=w.current;N.push(v),N.sort((R,j)=>{const P=R.order,C=j.order;return P==null&&C==null?0:P==null?-1:C==null?1:P-C}),w.current.panelDataArrayChanged=!0,S()},[S]);je(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:v,onLayout:N,storage:R}=A.current,{layout:j,panelDataArray:P}=w.current;let C=null;if(v){const V=Wn(v,P,R);V&&(J.current=new Map(Object.entries(V.expandToSizes)),C=V.layout)}C==null&&(C=Jn({panelDataArray:P}));const $=At({layout:C,panelConstraints:P.map(V=>V.constraints)});It(j,$)||(z($),w.current.layout=$,N&&N($),we(P,$,U.current))}}),je(()=>{const v=w.current;return()=>{v.layout=[]}},[]);const B=g.useCallback(v=>{let N=!1;const R=h.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(N=!0),function(P){P.preventDefault();const C=h.current;if(!C)return()=>null;const{direction:$,dragState:V,id:ne,keyboardResizeBy:se,onLayout:H}=A.current,{layout:ee,panelDataArray:b}=w.current,{initialLayout:F}=V??{},D=Zt(ne,v,C);let E=Tn(P,v,$,V,se,C);const I=$==="horizontal";I&&N&&(E=-E);const O=b.map(ye=>ye.constraints),T=Ae({delta:E,initialLayout:F??ee,panelConstraints:O,pivotIndices:D,prevLayout:ee,trigger:Tt(P)?"keyboard":"mouse-or-touch"}),Z=!_e(ee,T);(Jt(P)||Vt(P))&&Y.current!=E&&(Y.current=E,!Z&&E!==0?I?nt(v,E<0?Wt:Gt):nt(v,E<0?Kt:qt):nt(v,0)),Z&&(z(T),w.current.layout=T,H&&H(T),we(b,T,U.current))}},[]),q=g.useCallback((v,N)=>{const{onLayout:R}=A.current,{layout:j,panelDataArray:P}=w.current,C=P.map(ee=>ee.constraints),{panelSize:$,pivotIndices:V}=ze(P,v,j);k($!=null,`Panel size not found for panel "${v.id}"`);const se=Ce(P,v)===P.length-1?$-N:N-$,H=Ae({delta:se,initialLayout:j,panelConstraints:C,pivotIndices:V,prevLayout:j,trigger:"imperative-api"});_e(j,H)||(z(H),w.current.layout=H,R&&R(H),we(P,H,U.current))},[]),he=g.useCallback((v,N)=>{const{layout:R,panelDataArray:j}=w.current,{collapsedSize:P=0,collapsible:C}=N,{collapsedSize:$=0,collapsible:V,maxSize:ne=100,minSize:se=0}=v.constraints,{panelSize:H}=ze(j,v,R);H!=null&&(C&&V&&de(H,P)?de(P,$)||q(v,$):H<se?q(v,se):H>ne&&q(v,ne))},[q]),xe=g.useCallback((v,N)=>{const{direction:R}=A.current,{layout:j}=w.current;if(!h.current)return;const P=Ye(v,h.current);k(P,`Drag handle element not found for id "${v}"`);const C=en(R,N);x({dragHandleId:v,dragHandleRect:P.getBoundingClientRect(),initialCursorPosition:C,initialLayout:j})},[]),be=g.useCallback(()=>{x(null)},[]),te=g.useCallback(v=>{const{panelDataArray:N}=w.current,R=Ce(N,v);R>=0&&(N.splice(R,1),delete U.current[v.id],w.current.panelDataArrayChanged=!0,S())},[S]),le=g.useMemo(()=>({collapsePanel:Q,direction:a,dragState:p,expandPanel:ae,getPanelSize:X,getPanelStyle:K,groupId:f,isPanelCollapsed:M,isPanelExpanded:fe,reevaluatePanelConstraints:he,registerPanel:G,registerResizeHandle:B,resizePanel:q,startDragging:xe,stopDragging:be,unregisterPanel:te,panelGroupElement:h.current}),[Q,p,a,ae,X,K,f,M,fe,he,G,B,q,xe,be,te]),ue={display:"flex",flexDirection:a==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g.createElement(We.Provider,{value:le},g.createElement(d,{...i,children:e,className:r,id:o,ref:h,style:{...ue,...m},[W.group]:"",[W.groupDirection]:a,[W.groupId]:f}))}const it=g.forwardRef((t,e)=>g.createElement(rn,{...t,forwardedRef:e}));rn.displayName="PanelGroup";it.displayName="forwardRef(PanelGroup)";function Ce(t,e){return t.findIndex(r=>r===e||r.id===e.id)}function ze(t,e,r){const a=Ce(t,e),o=a===t.length-1?[a-1,a]:[a,a+1],u=r[a];return{...e.constraints,panelSize:u,pivotIndices:o}}function qn({disabled:t,handleId:e,resizeHandler:r,panelGroupElement:a}){g.useEffect(()=>{if(t||r==null||a==null)return;const s=Ye(e,a);if(s==null)return;const o=u=>{if(!u.defaultPrevented)switch(u.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{u.preventDefault(),r(u);break}case"F6":{u.preventDefault();const c=s.getAttribute(W.groupId);k(c,`No group element found for id "${c}"`);const l=Me(c,a),m=Xt(c,e,a);k(m!==null,`No resize element found for id "${e}"`);const d=u.shiftKey?m>0?m-1:l.length-1:m+1<l.length?m+1:0;l[d].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[a,t,e,r])}function ot({children:t=null,className:e="",disabled:r=!1,hitAreaMargins:a,id:s,onBlur:o,onClick:u,onDragging:c,onFocus:l,onPointerDown:m,onPointerUp:d,style:i={},tabIndex:f=0,tagName:h="div",...p}){var x,y;const z=g.useRef(null),S=g.useRef({onClick:u,onDragging:c,onPointerDown:m,onPointerUp:d});g.useEffect(()=>{S.current.onClick=u,S.current.onDragging=c,S.current.onPointerDown=m,S.current.onPointerUp=d});const U=g.useContext(We);if(U===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:J,groupId:Y,registerResizeHandle:A,startDragging:w,stopDragging:Q,panelGroupElement:ae}=U,X=ft(s),[K,M]=g.useState("inactive"),[fe,G]=g.useState(!1),[B,q]=g.useState(null),he=g.useRef({state:K});je(()=>{he.current.state=K}),g.useEffect(()=>{if(r)q(null);else{const le=A(X);q(()=>le)}},[r,X,A]);const xe=(x=a==null?void 0:a.coarse)!==null&&x!==void 0?x:15,be=(y=a==null?void 0:a.fine)!==null&&y!==void 0?y:5;g.useEffect(()=>{if(r||B==null)return;const le=z.current;k(le,"Element ref not attached");let ue=!1;return An(X,le,J,{coarse:xe,fine:be},(N,R,j)=>{if(!R){M("inactive");return}switch(N){case"down":{M("drag"),ue=!1,k(j,'Expected event to be defined for "down" action'),w(X,j);const{onDragging:P,onPointerDown:C}=S.current;P==null||P(!0),C==null||C();break}case"move":{const{state:P}=he.current;ue=!0,P!=="drag"&&M("hover"),k(j,'Expected event to be defined for "move" action'),B(j);break}case"up":{M("hover"),Q();const{onClick:P,onDragging:C,onPointerUp:$}=S.current;C==null||C(!1),$==null||$(),ue||P==null||P();break}}})},[xe,J,r,be,A,X,B,w,Q]),qn({disabled:r,handleId:X,resizeHandler:B,panelGroupElement:ae});const te={touchAction:"none",userSelect:"none"};return g.createElement(h,{...p,children:t,className:e,id:s,onBlur:()=>{G(!1),o==null||o()},onFocus:()=>{G(!0),l==null||l()},ref:z,role:"separator",style:{...te,...i},tabIndex:f,[W.groupDirection]:J,[W.groupId]:Y,[W.resizeHandle]:"",[W.resizeHandleActive]:K==="drag"?"pointer":fe?"keyboard":void 0,[W.resizeHandleEnabled]:!r,[W.resizeHandleId]:X,[W.resizeHandleState]:K})}ot.displayName="PanelResizeHandle";fn("LeadsData",un);const $t=1,Yn=10*1024*1024,Xn=_t({files:at().min(1,"Please upload at least one file").required("File upload is required")}),Zn=_t({basefile:at().min(1,"Please upload at least one file").required("File upload is required"),referenceFile:at().min(1,"Please upload at least one file").required("File upload is required")});function Je(t){let e=t;const r=s=>s.replace(/^``````$/g,"").replace(/^---$/gm,"").trim(),a=s=>{try{return JSON.parse('"'+s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"')}catch{return s}};for(;typeof e=="string";){const s=r(e);try{const o=JSON.parse(s);if(o!==e)e=o;else break}catch{break}}if(Array.isArray(e))return e.map(Je);if(typeof e=="object"&&e!==null)for(const s in e)typeof e[s]=="string"?(e[s]=Je(e[s]),typeof e[s]=="string"&&(e[s]=a(e[s]))):typeof e[s]=="object"&&(e[s]=Je(e[s]));else typeof e=="string"&&(e=a(e));return e}function Qn(t){var e,r,a;if(!t)return{pageResults:[],error:"No response data"};try{let s=t;if(typeof t=="string")try{s=JSON.parse(t)}catch{return console.warn("JSON parse failed, attempting salvage..."),rt(t)}if((s==null?void 0:s.parsedResult)!==void 0){const f=typeof s.parsedResult=="string"?Mt(s.parsedResult):s.parsedResult;if(f)s=f;else if(typeof s.parsedResult=="string")return rt(s.parsedResult,s)}if(!(s!=null&&s.PageResults)&&((e=s==null?void 0:s.operation)!=null&&e.processingResult)){const f=typeof s.operation.processingResult=="string"?Mt(s.operation.processingResult):s.operation.processingResult;if(f)s=f;else if(typeof s.operation.processingResult=="string")return rt(s.operation.processingResult,s)}const o=(s==null?void 0:s.PageResults)||(s==null?void 0:s.pageResults)||[],u=(s==null?void 0:s.TotalPages)||(s==null?void 0:s.totalPages)||o.length,c=(s==null?void 0:s.PagesProcessed)||(s==null?void 0:s.pagesProcessed)||o.length,l=Array.isArray(o)?o.map(f=>({pageNumber:f.PageNumber??f.pageNumber,content:f.Content??f.content??""})):[],m=l[l.length-1],d=((r=m==null?void 0:m.content)==null?void 0:r.includes("truncated for storage"))||((a=m==null?void 0:m.content)==null?void 0:a.includes("... (truncated")),i={pageResults:l,totalPages:u,pagesProcessed:c,availablePages:l.length,averageConfidence:(s==null?void 0:s.AverageConfidence)??(s==null?void 0:s.averageConfidence)};return(l.length<u||d)&&(i.warning=`Data truncated: Only ${l.length} of ${u} pages available. The document exceeded storage limits.`,i.isTruncated=!0,i.missingPages=Array.from({length:u-l.length},(f,h)=>l.length+1+h)),i}catch(s){return console.error("Failed to transform API response:",s),{pageResults:[],error:`Transform failed: ${s.message}`}}}function Mt(t){try{return JSON.parse(t)}catch{return null}}function rt(t,e){const r=[];let a=0;const s=t.match(/"TotalPages"\s*:\s*(\d+)/);s&&(a=parseInt(s[1]));const o=t.match(/"PagesProcessed"\s*:\s*(\d+)/),u=o?parseInt(o[1]):a,c=t.split(/"PageNumber"\s*:/);for(let m=1;m<c.length;m++){const d=c[m],i=d.match(/^\s*(\d+)/);if(!i)continue;const f=parseInt(i[1]),h=d.match(/"Content"\s*:\s*"((?:[^"\\]|\\[\s\S])*?)(?:"\s*,\s*"(?:OverallConfidence|ErrorMessage)|"\s*}|$)/);if(h){let p=h[1];try{p=p.replace(/\\n/g,`
2
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\").replace(/\\u0027/g,"'").replace(/\\u0026/g,"&").replace(/\\u003c/g,"<").replace(/\\u003e/g,">")}catch{}const x=p.includes("truncated for storage")||p.includes("... (truncated")||!d.includes('"OverallConfidence"');r.push({pageNumber:f,content:p,isTruncated:x})}}r.sort((m,d)=>m.pageNumber-d.pageNumber),console.log(`Salvaged ${r.length} pages from truncated data (expected ${a})`);const l={pageResults:r,totalPages:a||u||r.length,pagesProcessed:u||a||r.length,availablePages:r.length,isTruncated:!0,warning:`Data was truncated during storage. Only ${r.length} of ${a||"unknown"} pages could be recovered.`};return a>r.length&&(l.missingPages=Array.from({length:a-r.length},(m,d)=>r.length+1+d)),l}const es=t=>{if(!t||typeof t!="string")return{};try{const e=t.split(`
3
+ `).map(d=>d.trim()).filter(d=>d),r={},a={};let s=null,o=[],u=[];const c=d=>d?d.replace(/\*\*/g,"").replace(/^\*\s*/,"").trim():"",l=(d,i)=>{if(!d)return;const f=c(d),h=typeof i=="string"?c(i):i;f&&(a[f]===void 0?(a[f]=1,r[f]=h):(a[f]++,r[`${f}_${a[f]}`]=h))},m=()=>{if(o.length>0&&s)l(s,[...o]),o=[],s=null;else if(o.length>0){const d=`List_Items_${Object.keys(r).filter(i=>i.startsWith("List_Items_")).length+1}`;r[d]=[...o],o=[]}s=null};for(const d of e)try{if(d.toLowerCase().includes("here's the extracted")||d.toLowerCase().includes("here is the extracted"))continue;if(d.startsWith("|")){m(),u.push(d);continue}let i=d.match(/^\*\s+\*\*(.*?):\*\*\s*(.+)/);if(i){m(),l(i[1],i[2]);continue}if(i=d.match(/^\*\s+\*\*(.*?)\*\*:\s*(.+)/),i){m(),l(i[1],i[2]);continue}if(i=d.match(/^\*\*(.*?):\*\*\s*$/),i){m(),s=i[1].trim();continue}if(i=d.match(/^\*\*(.*?)\*\*:?\s*$/),i){m(),s=i[1].trim();continue}if(i=d.match(/^\*\s+([\w\s'\/\-]+?):\s*(.+)/),i&&i[1].length<50){m(),l(i[1],i[2]);continue}if(d.match(/^[\*\-]\s+/)){const f=c(d.replace(/^[\*\-]\s+/,""));f&&o.push(f);continue}if(d.includes("?")&&(d.toUpperCase().includes("YES")||d.toUpperCase().includes("NO"))){m();const f=d.lastIndexOf("?"),h=c(d.substring(0,f+1)),p=d.substring(f+1);let x="Unselected";p.includes("**YES**")&&!p.includes("**NO**")?x="YES":p.includes("**NO**")&&(x="NO"),l(h,x);continue}if(i=d.match(/^(This consent was signed by):\s*(.*)/i),i){m(),l(i[1],i[2]);continue}if(i=d.match(/^(Signature):\s*(.*)/i),i){m(),l(i[1],i[2]);continue}if(i=d.match(/^(Date):\s*([\d\/\-]+)/i),i){m(),l(i[1],i[2]);continue}if(i=d.match(/^([A-Za-z][A-Za-z0-9\s'\/\-]*?):\s*(.+)/),i&&i[1].length>2&&i[1].length<60){const f=i[1].trim(),h=i[2].trim();if(f.split(" ").length<=6){m(),l(f,h);continue}}d.length>0&&u.push(d)}catch{u.push(d)}return m(),u.length>0&&(r.Document_Context=u),r}catch(e){return console.error("Error parsing text to JSON:",e),{raw_text:t}}};function Dt({responseData:t,handleReset:e,isReadOnly:r=!1}){const[a,s]=g.useState(14),o=()=>s(d=>Math.min(24,d+2)),u=()=>s(d=>Math.max(10,d-2)),c=g.useMemo(()=>{if(!t)return null;try{return typeof t=="string"?JSON.parse(t):t}catch(d){return console.error("Failed to parse response data:",d),null}},[t]),l=(c==null?void 0:c.AverageConfidence)??(c==null?void 0:c.averageConfidence)??null,m=(c==null?void 0:c.PageResults)||(c==null?void 0:c.pageResults)||[];return c?n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsx("h4",{className:"font-semibold",children:"Response"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:u,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:o,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!r&&n.jsx(L,{variant:"solid",size:"sm",onClick:e,children:"Next"})]})]}),n.jsx("div",{className:"space-y-6 max-h-[72vh] overflow-y-auto pr-2",children:m.length===0?n.jsx("div",{className:"bg-black text-green-300 p-4 rounded h-[72vh]",children:"No content available"}):m.map((d,i)=>{const f=(d==null?void 0:d.Content)||(d==null?void 0:d.content)||"",h=es(f),p={pageNumber:(d==null?void 0:d.PageNumber)||(d==null?void 0:d.pageNumber)||i+1,AverageConfidence:l,content:h};return n.jsxs("div",{children:[n.jsxs("h5",{className:"font-semibold mb-1",children:["Page ",p.pageNumber]}),n.jsx("pre",{style:{fontSize:`${a}px`,lineHeight:"1.5"},className:"bg-black text-green-300 font-mono p-4 rounded whitespace-pre-wrap break-all border border-gray-700",children:JSON.stringify(p,null,2)})]},i)})})]}):n.jsx("div",{className:"bg-black text-red-400 p-4 rounded h-[72vh]",children:"Failed to parse response data"})}function ts({responseData:t,handleReset:e,isReadOnly:r=!1}){const a=t!=null&&t.content?Je(t.content):{},[s,o]=g.useState(16),u=()=>{o(l=>l+2)},c=()=>{o(l=>l-2)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsx("h4",{className:"font-semibold mb-2",children:"Response"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:c,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:u,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!r&&n.jsx(L,{variant:"solid",size:"sm",onClick:e,children:"Next"})]})]}),n.jsx("pre",{style:{fontSize:`${s}px`},className:"bg-black text-green-300 text-md font-mono p-4 rounded overflow-x-auto min-h-[72vh] max-h-[72vh] whitespace-pre-wrap",children:typeof a=="string"?a:JSON.stringify(a,null,2)})]})}function ct(t){let e=t;for(;typeof e=="string";)try{e=JSON.parse(e)}catch{break}if(Array.isArray(e))return e.map(ct);if(typeof e=="object"&&e!==null){const r={};for(const a in e)r[a]=ct(e[a]);return r}else if(typeof e=="string")return e.replace(/\\n/g,`
4
+ `).replace(/\\r/g,"").replace(/\\"/g,'"').replace(/\\\\/g,"\\");return e}function ns({responseData:t,handleReset:e,isReadOnly:r=!1}){const a=g.useMemo(()=>{if(!t)return"";const l=ct(t);return typeof l=="string"?l:JSON.stringify(l,null,2)},[t]),[s,o]=g.useState(16),u=()=>{o(l=>l+2)},c=()=>{o(l=>l-2)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsx("h4",{className:"font-semibold mb-2",children:"Response"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:c,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:u,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!r&&n.jsx(L,{variant:"solid",size:"sm",onClick:e,children:"Next"})]})]}),n.jsx("pre",{style:{fontSize:`${s}px`},className:"bg-black text-green-300 text-md font-mono p-4 rounded overflow-x-auto min-h-[72vh] max-h-[73vh] whitespace-pre-wrap",children:a||"[No content to display]"})]})}function ut(t){let e=t;for(typeof e=="string"&&(e=e.trim().replace(/^```json\n?|\n?```$/g,""));typeof e=="string";)try{e=JSON.parse(e),e.remoteResults&&typeof e.remoteResults=="string"&&(e.remoteResults=ut(e.remoteResults))}catch{break}if(typeof e=="object"&&e!==null){for(const r in e)if(typeof e[r]=="string"){const a=e[r].trim();(a.startsWith("{")&&a.endsWith("}")||a.startsWith("[")&&a.endsWith("]")||a.startsWith("```json"))&&(e[r]=ut(a))}}return e}function ss({responseData:t,handleReset:e,isReadOnly:r=!1}){const a=g.useMemo(()=>{try{const l=t==null?void 0:t.formData;if(!l)return"{}";const m=ut(l);return JSON.stringify(m,null,2)}catch(l){return console.error("Failed to process formData:",l),"{}"}},[t]),[s,o]=g.useState(16),u=()=>{o(l=>l+2)},c=()=>{o(l=>l-2)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsx("h4",{className:"font-semibold mb-2",children:"Response"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:c,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:u,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!r&&n.jsx(L,{variant:"solid",size:"sm",onClick:e,children:"Next"})]})]}),n.jsx("pre",{style:{fontSize:`${s}px`},className:"bg-black text-green-300 text-md font-mono p-4 rounded overflow-x-auto min-h-[72vh] max-h-[72vh] whitespace-pre-wrap",children:a})]})}function rs({responseData:t,handleReset:e,isReadOnly:r=!1}){const[a,s]=g.useState(14),o=g.useMemo(()=>{if(!t)return"{}";try{let l=typeof t=="string"?JSON.parse(t):t;const m=(l==null?void 0:l.PageResults)||(l==null?void 0:l.pageResults)||[],d={};return m.sort((i,f)=>(i.ReferencePageNumber||0)-(f.ReferencePageNumber||0)).forEach(i=>{const f=i.ReferencePageNumber||i.referencePageNumber;let h={};try{const p=i.FormData||i.formData,x=typeof p=="string"?JSON.parse(p):p,y=(x==null?void 0:x.remoteResults)||"";y&&(h=as(y))}catch{h={_error:"Parse failed"}}d[`PAGE_${f}`]={pageInfo:{referencePageNumber:f,matchedInputPage:i.MatchedInputPageNumber,similarityScore:`${((i.SimilarityScore||0)*100).toFixed(1)}%`,success:i.Success},formData:h}}),JSON.stringify(d,null,2)}catch(l){return console.error("Parse error:",l),JSON.stringify({error:"Failed to parse data"},null,2)}},[t]),u=()=>s(l=>Math.min(32,l+2)),c=()=>s(l=>Math.max(8,l-2));return n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsx("h4",{className:"font-semibold mb-2",children:"Response"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:c,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:u,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!r&&n.jsx(L,{variant:"solid",size:"sm",onClick:e,children:"Next"})]})]}),n.jsx("pre",{style:{fontSize:`${a}px`},className:"bg-black text-green-300 font-mono p-4 rounded overflow-auto min-h-[72vh] max-h-[72vh] whitespace-pre-wrap break-words",children:o})]})}function as(t){if(!t||typeof t!="string")return{};let e=t.replace(/^```json\s*/gi,"").replace(/^```\s*/gi,"").replace(/\s*```$/gi,"").trim();try{const l=JSON.parse(e);return l.data||l.Data||l}catch{}const r={},a=/"([^"]+)":\s*"([^"]*?)"/g;let s;for(;(s=a.exec(e))!==null;){const l=s[1],m=s[2];He(l)||(r[l]=m)}const o=/"([^"]+)":\s*(true|false)/g;for(;(s=o.exec(e))!==null;){const l=s[1],m=s[2]==="true";He(l)||(r[l]=m)}const u=/"([^"]+)":\s*(-?\d+\.?\d*)/g;for(;(s=u.exec(e))!==null;){const l=s[1],m=parseFloat(s[2]);!He(l)&&!ls(l,e)&&(r[l]=m)}const c=/"([^"]+)":\s*null/g;for(;(s=c.exec(e))!==null;){const l=s[1];He(l)||(r[l]=null)}return Object.keys(r).length>0?r:{}}function He(t){return["overall","processed","imagePath","processingMode","timestamp","targetPageNumber","identifiedPage","matchedReferencePageNumber","data","confidence","fields"].includes(t)}function ls(t,e){const r=e.indexOf(`"${t}"`),a=e.indexOf('"confidence"');if(a!==-1&&r>a){const s=e.indexOf('"fields"',a);if(s!==-1&&r>s)return!0}return!1}const Ot=({responseData:t,selectedPageIndex:e,setSelectedPageIndex:r,setPreviewUrl:a,setPdfUrl:s})=>{const[o,u]=g.useState(!1),c=(t==null?void 0:t.pageResults)||(t==null?void 0:t.PageResults)||[];if(!c.length)return null;g.useEffect(()=>{[e-1,e+1].forEach(h=>{if(h>=0&&h<c.length){const p=c[h],x=(p==null?void 0:p.azureDownloads)||(p==null?void 0:p.AzureDownloads),y=(x==null?void 0:x.identifiedPageImageUrl)||(x==null?void 0:x.IdentifiedPageImageUrl);if(y){const z=new Image;z.src=y}}})},[e,c]);const l=h=>{if(h<0||h>=c.length)return;const p=c[h],x=(p==null?void 0:p.azureDownloads)||(p==null?void 0:p.AzureDownloads),y=(x==null?void 0:x.identifiedPageImageUrl)||(x==null?void 0:x.IdentifiedPageImageUrl),z=(x==null?void 0:x.modifiedPdfUrl)||(x==null?void 0:x.ModifiedPdfUrl);if(y){u(!0);const S=new Image;S.onload=()=>{r(h),a(y),s(z),u(!1)},S.onerror=()=>{r(h),a(y),s(z),u(!1)},S.src=y}else r(h),s(z)},m=c.length,d=c[e],i=(d==null?void 0:d.referencePageNumber)||(d==null?void 0:d.ReferencePageNumber),f=(d==null?void 0:d.similarityScore)||(d==null?void 0:d.SimilarityScore)||0;return n.jsxs("div",{className:"mb-4 flex items-center justify-between gap-2 p-3 bg-gray-100 dark:bg-gray-800 rounded-lg",children:[n.jsxs("div",{className:"text-sm flex items-center gap-2",children:[n.jsxs("span",{className:"font-medium",children:["Page ",i]}),n.jsxs("span",{className:"text-gray-500",children:["(",(f*100).toFixed(0),"% match)"]}),o&&n.jsx("span",{className:"text-custom-500 text-xs animate-pulse",children:"Loading..."})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(L,{size:"xs",variant:"solid",disabled:e===0||o,onClick:()=>l(0),children:"◀◀ First"}),n.jsx(L,{size:"xs",variant:"solid",disabled:e===0||o,onClick:()=>l(e-1),children:"◀ Prev"}),n.jsxs("span",{className:"px-3 py-1 bg-white dark:bg-gray-700 rounded text-sm font-medium min-w-[60px] text-center",children:[e+1," / ",m]}),n.jsx(L,{size:"xs",variant:"solid",disabled:e===m-1||o,onClick:()=>l(e+1),children:"Next ▶"}),n.jsx(L,{size:"xs",variant:"solid",disabled:e===m-1||o,onClick:()=>l(m-1),children:"Last ▶▶"})]})]})};function Ut({responseData:t,selectedPageIndex:e,handleReset:r,isReadOnly:a=!1}){const[s,o]=g.useState(14),c=((t==null?void 0:t.pageResults)||(t==null?void 0:t.PageResults)||[])[e],l=h=>{const p={},x=/"([^"]+)"\s*:\s*(?:"([^"\\]*(?:\\.[^"\\]*)*)"|(\btrue\b|\bfalse\b|\bnull\b|-?\d+\.?\d*))/g;let y;for(;(y=x.exec(h))!==null;){const z=y[1];let S;["overall","processed","imagePath","processingMode","timestamp","targetPageNumber","identifiedPage","matchedReferencePageNumber"].includes(z)||(y[2]!==void 0?S=y[2].replace(/\\"/g,'"').replace(/\\n/g," ").replace(/\\\\/g,"\\"):y[3]==="true"?S=!0:y[3]==="false"?S=!1:y[3]==="null"?S=null:y[3]!==void 0&&(S=Number(y[3])),p[z]=S)}return p},m=g.useMemo(()=>{try{if(!c)return"{}";const h=c.formData||c.FormData;if(!h)return"{}";let p=h;if(typeof p=="string"&&(p=JSON.parse(p)),p!=null&&p.remoteResults){let x=p.remoteResults,y=null;if(typeof x=="string"){let Y=x.replace(/^```json\s*/gi,"").replace(/^```\s*/gi,"").replace(/\s*```$/gi,"").replace(/^json\s*/gi,"").trim();try{const A=JSON.parse(Y);y=(A==null?void 0:A.data)||A}catch{const w=Y.match(/"data"\s*:\s*\{([\s\S]*)/);w?(y=l(w[1]),y._note="Data was truncated by API"):(y=l(Y),Object.keys(y).length>0&&(y._note="Data was truncated by API"))}}else y=(x==null?void 0:x.data)||x;const z=c.referencePageNumber||c.ReferencePageNumber,S=c.matchedInputPageNumber||c.MatchedInputPageNumber,U=c.similarityScore||c.SimilarityScore||0,J={pageNumber:z,matchedInputPage:S,similarityScore:`${(U*100).toFixed(1)}%`,data:y||{}};return JSON.stringify(J,null,2)}return JSON.stringify(p,null,2)}catch(h){return console.error("Failed to process formData:",h),"{}"}},[c]),d=()=>o(h=>Math.min(24,h+2)),i=()=>o(h=>Math.max(10,h-2)),f=(c==null?void 0:c.referencePageNumber)||(c==null?void 0:c.ReferencePageNumber);return c?n.jsxs("div",{children:[n.jsxs("div",{className:"flex justify-between items-center pb-2",children:[n.jsxs("h4",{className:"font-semibold mb-2",children:["Page ",f," Data"]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(L,{onClick:i,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Fe,{className:"text-sm"})]}),n.jsxs(L,{onClick:d,className:"flex gap-1",size:"xs",children:[n.jsx("span",{className:"font-bold text-xs",children:"A"}),n.jsx(Ie,{className:"text-sm"})]}),!a&&n.jsx(L,{variant:"solid",size:"sm",onClick:r,children:"Next"})]})]}),n.jsx("pre",{style:{fontSize:`${s}px`},className:"bg-black text-green-300 font-mono p-4 rounded overflow-auto min-h-[68vh] max-h-[68vh] whitespace-pre-wrap",children:m})]}):n.jsx("div",{className:"bg-black text-yellow-300 p-4 rounded h-[72vh]",children:"No page data available"})}const Vs=()=>{var $,V,ne,se,H,ee;on();const[t,e]=g.useState(!1),[r,a]=g.useState(!1),[s,o]=g.useState(null),[u,c]=g.useState(!1),[l,m]=g.useState(null),{textTheme:d}=mn(),[i,f]=g.useState({label:"Image - Extract Text",value:"Image"});pn();const[h,p]=g.useState(null),[x,y]=g.useState("Output Form"),[z,S]=g.useState(!1),[U,J]=g.useState(null),[Y,A]=g.useState([]),[w,Q]=g.useState(!1),ae=vn("Time Log"),X={delete:ae.isDelete,view:ae.isView},[K,M]=g.useState(0),[fe,G]=g.useState(null),B=(b,F)=>{if(F.length>=$t)return`You can only upload ${$t} file(s)`;if(b){for(const D of b)if(D.size>=Yn)return"Upload file cannot be more than 10 MB!"}return!0},q=g.useCallback(async()=>{var b;Q(!0);try{const D=await(await fetch("/api/Operations?Page=1&PageSize=100",{method:"GET",headers:{Authorization:"Bearer sample-user-key-456"}})).json();if(D!=null&&D.operations){let E=(b=D==null?void 0:D.operations)==null?void 0:b.map(I=>({...I,id:I==null?void 0:I.operationId,startTime:I!=null&&I.startTime?vt(I==null?void 0:I.startTime).format("MM/DD/YYYY"):"",endTime:I!=null&&I.endTime?vt(I==null?void 0:I.endTime).format("MM/DD/YYYY"):""}));A(E)}}catch(F){A([]),console.error("Failed to fetch data:",F)}finally{Q(!1)}},[]);g.useEffect(()=>{q()},[]);const he=async(b,F,D)=>{c(!0);try{const E=new FormData;E.append("File",b.files[0]),E.append("AiProvider","Gemini"),E.append("CustomPrompt","extract text"),E.append("EnableStreaming","false"),E.append("Temperature","0.5"),D==="ImgPdf"&&(E.append("Pages","all"),E.append("MaxPages",100),E.append("UploadInputFile",!0));const I=await fetch(`/api/ImageProcessing/${D==="ImgPdf"?"process-remote-pdf-multipage-upload":"process-remote-upload"}`,{method:"POST",headers:{Authorization:"Bearer sample-user-key-456"},body:E}),O=await I.json(),T=URL.createObjectURL(b.files[0]);I.ok?(o(O),m(T)):console.error("Upload failed",O)}catch(E){console.error("API Error",E),ve.push(n.jsx(Pe,{title:"Something Went Wrong",type:"danger",children:"Failed to Upload Image. Please try again later."}),{placement:"top-center"})}finally{F(!1),c(!1)}},xe=async(b,F)=>{var D,E,I;c(!0);try{const O=new FormData;O.append("InputPdf",b==null?void 0:b.basefile[0]),O.append("ReferencePdf",b==null?void 0:b.referenceFile[0]),O.append("UploadIdentifiedPageImage","true"),O.append("RemoveIdentifiedPage","true"),O.append("ExtractPageRange","false"),O.append("PageRangeSize","1"),O.append("ImageDpi","300"),O.append("ImageFormat","jpeg");const T=await fetch("/api/ImageProcessing/process-pdf-upload-multipage",{method:"POST",headers:{Authorization:"Bearer sample-user-key-456"},body:O}),Z=await T.json();if(T.ok&&Z.success){if(G(Z),o(Z),M(0),((D=Z.pageResults)==null?void 0:D.length)>0){const ye=Z.pageResults[0];m((E=ye.azureDownloads)==null?void 0:E.identifiedPageImageUrl),p((I=ye.azureDownloads)==null?void 0:I.modifiedPdfUrl)}ve.push(n.jsxs(Pe,{title:"Success",type:"success",children:["Processed ",Z.successfulMatches," of ",Z.totalReferencePages," pages successfully."]}),{placement:"top-center"})}else console.error("Upload failed",Z),ve.push(n.jsx(Pe,{title:"Processing Failed",type:"danger",children:Z.errorMessage||"Failed to process documents."}),{placement:"top-center"})}catch(O){console.error("API Error",O),ve.push(n.jsx(Pe,{title:"Something Went Wrong",type:"danger",children:"Failed to Upload File. Please try again later."}),{placement:"top-center"})}finally{F(!1),c(!1)}},be=async b=>{var F,D,E,I,O,T,Z,ye,pt;c(!0);try{const gt=await fetch(`/api/Operations/${b==null?void 0:b.id}/refresh-urls`,{method:"POST",headers:{Authorization:"Bearer sample-user-key-456"}}),ht=await fetch(`/api/Operations/${b==null?void 0:b.id}`,{method:"GET",headers:{Authorization:"Bearer sample-user-key-456"}}),_=await ht.json();if(ht.ok)if(((F=_.operation)==null?void 0:F.operationType)==="ProcessPdfUploadMultiPage"){f({label:"PDF - Find Form & Extract Text",value:"Pdf"});let ce=(D=_==null?void 0:_.operation)==null?void 0:D.processingResult;typeof ce=="string"&&(ce=JSON.parse(ce)),o(ce),M(0);const xt=(ce==null?void 0:ce.pageResults)||(ce==null?void 0:ce.PageResults)||[];if(xt.length>0){const Se=xt[0],ie=(Se==null?void 0:Se.azureDownloads)||(Se==null?void 0:Se.AzureDownloads);m((ie==null?void 0:ie.identifiedPageImageUrl)||(ie==null?void 0:ie.IdentifiedPageImageUrl)),p((ie==null?void 0:ie.modifiedPdfUrl)||(ie==null?void 0:ie.ModifiedPdfUrl))}else m((E=_==null?void 0:_.operation)==null?void 0:E.extractedImageUrl),p((I=_==null?void 0:_.operation)==null?void 0:I.modifiedPdfUrl);a(!0)}else((O=_==null?void 0:_.operation)==null?void 0:O.inputFileType)==="application/pdf"?(o((T=_==null?void 0:_.operation)==null?void 0:T.processingResult),f({label:"PDF - Extract Text",value:"ImgPdf"}),m((Z=_==null?void 0:_.operation)==null?void 0:Z.inputFileUrl),a(!0)):(o((ye=_==null?void 0:_.operation)==null?void 0:ye.processingResult),f({label:"Image - Extract Text",value:"Image"}),m((pt=_==null?void 0:_.operation)==null?void 0:pt.inputFileUrl),a(!0));else console.error("Upload failed",_)}catch(gt){console.error("API Error",gt),ve.push(n.jsx(Pe,{title:"Something Went Wrong",type:"danger",children:"Failed to fetch. Please try again later."}),{placement:"top-center"})}finally{c(!1)}},te=()=>{o(null),m(null),p(null),y("Output Form"),M(0),G(null)},le=()=>{q(),e(!1),o(null),m(null),p(null),y("Output Form"),f({label:"Image - Extract Text",value:"Image"}),M(0),G(null)},ue=()=>{a(!1),o(null),m(null),p(null),y("Output Form"),f({label:"Image - Extract Text",value:"Image"}),M(0),G(null)},v=(b,F)=>{F===yt.delete&&N(b),F===yt.view&&j(b)},N=b=>{J(b),S(!0)},R=async()=>{c(!0);try{const b=await fetch(`/api/Operations/${U==null?void 0:U.id}?deleteFiles=true`,{method:"DELETE",headers:{Authorization:"Bearer sample-api-key-123"}}),F=await b.json();b.ok?(ve.push(n.jsx(Pe,{title:"Success",type:"success",children:"Successfully Deleted"}),{placement:"top-center"}),q(),S(!1)):console.error("Upload failed",F)}catch(b){console.error("API Error",b),ve.push(n.jsx(Pe,{title:"Something Went Wrong",type:"danger",children:"Failed to Delete. Please try again later."}),{placement:"top-center"})}finally{c(!1)}},j=b=>{J(b),be(b)},C=[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:b=>n.jsx("div",{id:"mAction","data-cname":"Actions",children:n.jsx(dn,{row:b==null?void 0:b.data,actions:X,buttonClick:v})})},{dataField:"inputFileName",caption:"File",cellRender:b=>{var F;return n.jsx("div",{"data-cname":"File",children:n.jsx(bt,{to:`${(F=b.data)==null?void 0:F.inputFileUrl}`,className:`${d} ml-2 rtl:mr-2`,target:"_blank",rel:"noopener noreferrer",children:b.value})})}},{dataField:"referenceFileName",caption:"Reference",cellRender:b=>{var F;return n.jsx("div",{"data-cname":"Reference",children:b.value?n.jsx(bt,{to:`${(F=b.data)==null?void 0:F.referenceFileUrl}`,className:`${d} ml-2 rtl:mr-2`,target:"_blank",rel:"noopener noreferrer",children:b.value}):n.jsx(n.Fragment,{children:b.value})})}},{dataField:"startTime",caption:"Uploaded Date",cellRender:b=>n.jsx("div",{"data-cname":"Uploaded Date",children:b.value})},{dataField:"endTime",caption:"Processed Date",cellRender:b=>n.jsx("div",{"data-cname":"Processed Date",children:b.value})}].map(b=>({...b,cellRender:Pn(b.cellRender)}));return g.useRef(null),g.useRef(!1),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"topbar py-4 px-6 border-b border-gray-200 dark:bg-[#292f3c] dark:text-white",children:[n.jsx(cn,{items:[{label:"Build"},{label:"AI Vision"}]}),n.jsxs("div",{className:"lg:flex items-center justify-between",children:[n.jsx("h3",{className:"mb-4 lg:mb-0",children:"AI Vision"}),n.jsx(L,{variant:"solid",size:"sm",onClick:()=>e(!0),children:"AI Processing"})]})]}),n.jsxs(Nt,{title:"File Upload",isOpen:t,portalClassName:"w100 prevent-overflow",onClose:le,children:[u&&n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center dark:bg-black/60",children:n.jsx(Pt,{loading:!0})}),n.jsxs(it,{direction:"horizontal",className:"flex h-[calc(100vh-110px)] gap-2",children:[n.jsx(Ee,{defaultSize:70,minSize:20,order:1,children:n.jsxs(De,{className:"w-full bg-white dark:bg-gray-800 h-full overflow-auto borderless",children:[((i==null?void 0:i.value)==="Image"||(i==null?void 0:i.value)==="ImgPdf")&&n.jsx(n.Fragment,{children:l?(i==null?void 0:i.value)==="ImgPdf"?n.jsx("iframe",{src:l,title:"PDF Preview",className:"w-full h-[80vh] border rounded"}):n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto"}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"text-gray-500 italic",children:"No File To Preview"})})}),(i==null?void 0:i.value)==="Pdf"&&n.jsx(n.Fragment,{children:(($=s==null?void 0:s.pageResults)==null?void 0:$.length)>0?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{responseData:s,selectedPageIndex:K,setSelectedPageIndex:M,setPreviewUrl:m,setPdfUrl:p}),n.jsxs(Oe,{variant:"pill",className:"p-0",value:x,onChange:y,children:[n.jsxs(Ue,{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(me,{icon:n.jsx(gn,{}),value:"Output Form",children:"Output Form"}),n.jsx(me,{icon:n.jsx(hn,{}),value:"Output Document",children:"Output Document"})]}),x==="Output Document"&&h&&n.jsx("iframe",{src:h,title:"PDF Preview",className:"w-full h-[78vh] border rounded mt-4"}),x==="Output Form"&&l&&n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto mt-4"})]})]}):l?n.jsxs(Oe,{variant:"pill",className:"p-0",value:x,onChange:y,children:[n.jsxs(Ue,{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(me,{value:"Output Form",children:"Output Form"}),n.jsx(me,{value:"Output Document",children:"Output Document"})]}),x==="Output Document"&&n.jsx("iframe",{src:h,title:"PDF Preview",className:"w-full h-[78vh] border rounded"}),x==="Output Form"&&n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto"})]}):n.jsx("div",{className:"text-gray-500 italic",children:"No File To Preview"})})]})}),n.jsx(ot,{children:n.jsx("div",{className:"w-3 h-full flex items-center justify-center group cursor-col-resize bg-gray-200 dark:bg-gray-700 hover:bg-custom-300 dark:hover:bg-custom-600 transition-colors relative z-20 shadow-md","aria-label":"Resize panel",tabIndex:0,children:n.jsxs("div",{className:"flex flex-col space-y-1",children:[n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"}),n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"}),n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"})]})})}),n.jsx(Ee,{order:2,defaultSize:30,minSize:20,id:"n-right-panel",children:n.jsxs(De,{className:"w-full bg-gray-50 dark:bg-gray-900 h-full overflow-auto borderless",children:[!s&&n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block text-sm font-medium mb-1",children:"File Type"}),n.jsx(xn,{options:[{label:"Image - Extract Text",value:"Image"},{label:"PDF - Extract Text",value:"ImgPdf"},{label:"PDF - Find Form & Extract Text",value:"Pdf"}],value:i,onChange:b=>f(b)})]}),(i==null?void 0:i.value)==="Image"||(i==null?void 0:i.value)==="ImgPdf"?n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[s&&((i==null?void 0:i.value)!=="ImgPdf"?n.jsx(ts,{responseData:s,handleReset:te}):n.jsx(Dt,{responseData:s,handleReset:te})),n.jsx("div",{className:"mt-4 text-right",children:n.jsx(L,{variant:"solid",size:"sm",onClick:le,children:"Close"})})]}):n.jsx(St,{initialValues:{files:[]},validationSchema:Xn,onSubmit:(b,{setSubmitting:F})=>he(b,F,i.value),children:({values:b,touched:F,errors:D,isSubmitting:E})=>n.jsxs(wt,{children:[n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload File"}),n.jsx(Ze,{name:"files",children:({field:I,form:O})=>n.jsx(Xe,{accept:(i==null?void 0:i.value)==="Image"?"image/*":"application/pdf",cropNeeded:!1,draggable:!0,beforeUpload:B,fileList:b.files||[],onChange:T=>O.setFieldValue(I.name,T),onFileRemove:T=>O.setFieldValue(I.name,T)})}),D.files&&F.files&&n.jsx("div",{className:"text-red-500 text-sm mt-1",children:D.files})]}),n.jsxs(jt,{className:"px-4 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700",children:[n.jsx(L,{type:"button",size:"sm",onClick:le,children:"Cancel"}),n.jsx(L,{type:"submit",size:"sm",variant:"solid",loading:u,children:"Process"})]})]})})}):n.jsx(n.Fragment,{children:s?n.jsxs(n.Fragment,{children:[((V=s==null?void 0:s.pageResults)==null?void 0:V.length)>0?n.jsx(Ut,{responseData:s,selectedPageIndex:K,handleReset:te,isReadOnly:!1}):n.jsx(ss,{responseData:s,handleReset:te}),n.jsx("div",{className:"mt-4 text-right",children:n.jsx(L,{variant:"solid",size:"sm",onClick:le,children:"Close"})})]}):n.jsx(St,{initialValues:{basefile:[],referenceFile:[]},validationSchema:Zn,onSubmit:(b,{setSubmitting:F})=>xe(b,F),children:({values:b,touched:F,errors:D,isSubmitting:E})=>n.jsxs(wt,{children:[n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload Input File"}),n.jsx(Ze,{name:"basefile",children:({field:I,form:O})=>n.jsx(Xe,{accept:"application/pdf",cropNeeded:!1,draggable:!0,beforeUpload:B,fileList:b.basefile||[],onChange:T=>O.setFieldValue(I.name,T),onFileRemove:T=>O.setFieldValue(I.name,T)})}),D.basefile&&F.basefile&&n.jsx("div",{className:"text-red-500 text-sm mt-1",children:D.basefile})]}),n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload Reference File"}),n.jsx(Ze,{name:"referenceFile",children:({field:I,form:O})=>n.jsx(Xe,{accept:"application/pdf",cropNeeded:!1,draggable:!0,beforeUpload:B,fileList:b.referenceFile||[],onChange:T=>O.setFieldValue(I.name,T),onFileRemove:T=>O.setFieldValue(I.name,T)})}),D.referenceFile&&F.referenceFile&&n.jsx("div",{className:"text-red-500 text-sm mt-1",children:D.referenceFile})]}),n.jsxs(jt,{className:"px-4 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700",children:[n.jsx(L,{type:"button",size:"sm",onClick:le,children:"Cancel"}),n.jsx(L,{type:"submit",size:"sm",variant:"solid",loading:u,children:"Process"})]})]})})})]})})]})]}),w&&n.jsx(an,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),n.jsx(zt,{className:"m-6 h-full py-4 px-6 bg-transparent",children:n.jsx(zt,{className:"borderless",children:n.jsx(yn,{columns:C,tableName:"AIVision",dataSource:Y,height:"calc(100vh - 270px)",keyExpr:"id",buttonClick:(b,F)=>v(b,F),filterClick:()=>{},exportClick:()=>{},isLoading:w})})}),n.jsxs(Nt,{title:"Processed File",isOpen:r,portalClassName:"w100 prevent-overflow",onClose:ue,children:[u&&n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center dark:bg-black/60",children:n.jsx(Pt,{loading:!0})}),n.jsxs(it,{direction:"horizontal",className:"flex h-[calc(100vh-110px)] gap-2",children:[n.jsx(Ee,{defaultSize:70,minSize:20,order:1,children:n.jsxs(De,{className:"w-full bg-white dark:bg-gray-800 h-full overflow-auto borderless",children:[((i==null?void 0:i.value)==="Image"||(i==null?void 0:i.value)==="ImgPdf")&&n.jsx(n.Fragment,{children:l?(i==null?void 0:i.value)==="ImgPdf"?n.jsx("iframe",{src:l,title:"PDF Preview",className:"w-full h-full border rounded"}):n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto"}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"text-gray-500 italic",children:"No File To Preview"})})}),(i==null?void 0:i.value)==="Pdf"&&n.jsx(n.Fragment,{children:((ne=s==null?void 0:s.pageResults)==null?void 0:ne.length)>0||((se=s==null?void 0:s.PageResults)==null?void 0:se.length)>0?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{responseData:s,selectedPageIndex:K,setSelectedPageIndex:M,setPreviewUrl:m,setPdfUrl:p}),n.jsxs(Oe,{variant:"pill",className:"p-0",value:x,onChange:y,children:[n.jsxs(Ue,{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(me,{value:"Output Form",children:"Output Form"}),n.jsx(me,{value:"Output Document",children:"Output Document"})]}),x==="Output Document"&&h&&n.jsx("iframe",{src:h,title:"PDF Preview",className:"w-full h-[70vh] border rounded mt-4"}),x==="Output Form"&&l&&n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto mt-4"})]})]}):l?n.jsxs(Oe,{variant:"pill",className:"p-0",value:x,onChange:y,children:[n.jsxs(Ue,{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(me,{value:"Output Form",children:"Output Form"}),n.jsx(me,{value:"Output Document",children:"Output Document"})]}),x==="Output Document"&&n.jsx("iframe",{src:h,title:"PDF Preview",className:"w-full h-[78vh] border rounded"}),x==="Output Form"&&n.jsx("img",{src:l,alt:"Preview",className:"rounded border w-auto h-auto"})]}):n.jsx("div",{className:"text-gray-500 italic",children:"No File To Preview"})})]})}),n.jsx(ot,{children:n.jsx("div",{className:"w-3 h-full flex items-center justify-center group cursor-col-resize bg-gray-200 dark:bg-gray-700 hover:bg-custom-300 dark:hover:bg-custom-600 transition-colors relative z-20 shadow-md","aria-label":"Resize panel",tabIndex:0,children:n.jsxs("div",{className:"flex flex-col space-y-1",children:[n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"}),n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"}),n.jsx("span",{className:"block w-1 h-1 rounded-full bg-gray-500 group-hover:bg-custom-600"})]})})}),n.jsx(Ee,{order:2,defaultSize:30,minSize:20,id:"n-right-panel",children:n.jsx(De,{className:"w-full bg-gray-50 dark:bg-gray-900 h-full overflow-auto borderless",children:(i==null?void 0:i.value)==="Image"||(i==null?void 0:i.value)==="ImgPdf"?n.jsxs(n.Fragment,{children:[s&&((i==null?void 0:i.value)==="Image"?n.jsx(ns,{responseData:s,handleReset:te,isReadOnly:!0}):n.jsx(Dt,{responseData:Qn(s),handleReset:te,isReadOnly:!0})),n.jsx("div",{className:"mt-4 text-right",children:n.jsx(L,{variant:"solid",size:"sm",onClick:ue,children:"Close"})})]}):n.jsx(n.Fragment,{children:(i==null?void 0:i.value)==="Pdf"&&n.jsxs(n.Fragment,{children:[((H=s==null?void 0:s.pageResults)==null?void 0:H.length)>0||((ee=s==null?void 0:s.PageResults)==null?void 0:ee.length)>0?n.jsx(Ut,{responseData:s,selectedPageIndex:K,handleReset:te,isReadOnly:!0}):n.jsx(rs,{responseData:s,handleReset:te,isReadOnly:!0}),n.jsx("div",{className:"mt-4 text-right",children:n.jsx(L,{variant:"solid",size:"sm",onClick:ue,children:"Close"})})]})})})})]})]}),n.jsx(bn,{isOpen:z,type:"danger",title:"Delete File Record",confirmButtonColor:"red-600",onClose:()=>S(!1),onCancel:()=>S(!1),onConfirm:R,children:n.jsx("p",{children:"Are you sure you want to delete this File Record? This action cannot be undone."})})]})};export{Je as deepParseEscapedJsons,Vs as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{P as K}from"./PageBreadcrumb-cf54a6e9.js";import{j as F,r as a,f as k,L as de}from"./vendor-react-ece1c85f.js";import{r as R,u as W,c as ne}from"./index-0fd6e996.js";import{D as L,k as T,l as me,B as H,d as le,E as V,F as z,ai as pe,aB as ue,aC as he,aD as xe,aE as fe,aF as je}from"./index-3b5ce20a.js";import{A as u}from"./AdaptableCard-3d1e1f96.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as q}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import{S as be}from"./Switcher-e2fba588.js";import{T as Q}from"./index-289b3fd9.js";import"./Upload-be937eb6.js";import ye from"./OpportunitiesList-2f96958f.js";import Ne from"./ContactsList-5b06c9b8.js";import{E as Ce}from"./AddAccount-2cd72664.js";import{C as re}from"./ConfirmDialog-2838a642.js";import{C as oe}from"./tableV3-24eed052.js";import{A as ce,T as G}from"./actioncell-6b5ebd6c.js";import{b as ge,c as Ae}from"./AccountServices-f68f471d.js";import{A as ve}from"./AddEditFile-6ae10d57.js";import{b as we,c as De,d as Se,e as Ie}from"./OpportunityServices-c4510dd2.js";import{P as Ue}from"./permissionHoc-0818bfb0.js";import{U as Ee}from"./UserNew-31fa258f.js";import{U as Oe}from"./UserEdit-1f8208f3.js";import{c as Fe}from"./UserService-1b93ceb0.js";import"./vendor-redux-a1f00e6b.js";import"./ContactService-8afcaeb7.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"./index-52963879.js";import"./index.esm-b2d342b5.js";import"./EditLead-c8c9760a.js";import"./index-91505016.js";import"./LeadSourceService-cf71ea64.js";import"./DoubleSidedImage-b4bd3915.js";import"./index-b0ef7ac3.js";import"./StickyFooter-3e569b80.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./index-d221d69e.js";import"./index-11297f4a.js";import"./usePermission-4689548c.js";import"./WrapperCell-3d5592cf.js";import"./tableV2-99c808c0.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./DepartmentServices-a53e998b.js";import"./ImportFile-026b1771.js";import"./papaparse.min-f30b4da6.js";import"./vendor-excel-3b3553df.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./mapView-c8063ed6.js";import"./esm-c40433f8.js";import"./lodash-306e3f66.js";import"./UserForm-e9b56aff.js";import"./index-fc9f8c4b.js";import"./RoleService-2f9ed883.js";import"./PasswordInput-333c82ca.js";import"./index-88c52b97.js";import"./index-985cf3f6.js";import"./strongPassword-6bc8786f.js";L("AccountsData",R);const X=U=>{let{id:l}=F();const[d,m]=a.useState("");return k(),T(),a.useState(!1),console.log("useParams",l),a.useEffect(()=>{l&&m(l)},[l]),e.jsx(e.Fragment,{children:e.jsx(u,{className:"h-full pt-0 bg-transparent borderless",bodyClass:"h-full borderless",children:e.jsx(ye,{accountId:l})})})};L("AccountsData",R);const Z=U=>{let{id:l}=F();const[d,m]=a.useState("");k(),T(),a.useState(!1),a.useState(!1),a.useState(0);const h=W(x=>{var i,o;return(o=(i=x.AccountsData)==null?void 0:i.data)==null?void 0:o.account});return a.useEffect(()=>{l&&m(l)},[l]),e.jsx(e.Fragment,{children:e.jsx(u,{className:"h-full pt-0 bg-transparent borderless",bodyClass:"h-full",children:e.jsx(Ne,{accountId:l,accountName:h==null?void 0:h.accountName})})})};L("AccountsData",R);const ee=U=>{let{id:l}=F();const[d,m]=a.useState("");return k(),T(),a.useState(!1),a.useState(!1),a.useState(0),a.useEffect(()=>{l&&m(l)},[l]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 pt-0 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:[e.jsx(K,{items:[{label:"CRM"},{label:"Accounts"},{label:"Invoices"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Invoices"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center"})]})]}),e.jsx("div",{className:"py-1",style:{display:"flex"}})]})};L("AccountsData",R);const te=U=>{let{mode:l}=U,{id:d}=F();const[m,h]=a.useState("");k();const x=T(),i=W(r=>{var b,g;return(g=(b=r.AccountsData)==null?void 0:b.data)==null?void 0:g.account});a.useEffect(()=>{d&&(x(ne({id:d})),h(d))},[d]);const o=l==="horizontal";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`border-gray-200 border-b ${o?"py-2":"py-4"}`,children:e.jsx("h3",{children:i==null?void 0:i.accountName})}),e.jsxs("div",{className:` border-gray-200 border-b ${o?"lg:grid grid-cols-3 gap-x-8":""}`,children:[e.jsxs("div",{className:o?"":"mb-2",children:[e.jsx("p",{children:"Primary Contact"}),e.jsx("h6",{children:i==null?void 0:i.primaryContactName})]}),e.jsxs("div",{className:o?"":"mb-2",children:[e.jsx("p",{children:"Billing Contact"}),e.jsx("h6",{children:i==null?void 0:i.billingContactName})]}),e.jsxs("div",{className:o?"":"mb-2",children:[e.jsx("p",{children:"Phone"}),e.jsx("h6",{children:"--"})]}),e.jsxs("div",{className:o?"":"mb-2",children:[e.jsx("p",{children:"Website"}),e.jsx("h6",{children:i==null?void 0:i.website})]}),e.jsxs("div",{className:`${o?"":"col-span-2 mb-2"}`,children:[e.jsx("p",{children:"Address"}),e.jsx("h6",{children:i==null?void 0:i.address})]}),e.jsxs("div",{className:o?"":"mb-2",children:[e.jsx("p",{children:"Parent Account"}),e.jsx("h6",{children:i==null?void 0:i.accountName})]}),e.jsxs("div",{className:`${o?"":"col-span-2 mb-2"}`,children:[e.jsx("p",{children:"Notes"}),e.jsx("h6",{children:i==null?void 0:i.notes})]})]})]})};L("AccountsData",R);const se=U=>{let{id:l}=F();a.useState(""),k(),T(),a.useState(!1);const[d,m]=a.useState([]),[h,x]=a.useState(!1),[i,o]=a.useState("Add");a.useState("");const[r,b]=a.useState(null),[g,f]=a.useState(!1),[P,w]=a.useState("");W(t=>{var c,v;return(v=(c=t.AccountsData)==null?void 0:c.data)==null?void 0:v.account});const{textTheme:M}=me(),j=()=>{o("Add"),x(!h)},D=async()=>{var t;try{let c=await ge(l);m((t=c==null?void 0:c.data)==null?void 0:t.$values)}catch{m([])}};a.useEffect(()=>{l&&D()},[l]);const _=async(t,c)=>{var v,B,y,S,O,s;try{const n=i==="Edit"?await we((v=t==null?void 0:t.opportunityId)==null?void 0:v.value,r==null?void 0:r.fileId,t==null?void 0:t.fileName,(y=(B=t==null?void 0:t.files)==null?void 0:B[0])!=null&&y.isViewOnly||(S=t==null?void 0:t.files)==null?void 0:S[0]):await De((O=t==null?void 0:t.opportunityId)==null?void 0:O.value,t==null?void 0:t.fileName,(s=t==null?void 0:t.files)==null?void 0:s[0]);n.success?(D(),V.push(e.jsx(z,{title:"Success",type:"success",duration:2500,children:`File ${i==="Edit"?"Updated":"Uploaded"} Successfully`}),{placement:"top-center"})):V.push(e.jsx(z,{title:"Error",type:"danger",duration:2500,children:n.message}),{placement:"top-center"})}catch(n){console.error("Failed to opportunity logs:",n),V.push(e.jsx(z,{title:"Error",type:"danger",duration:2500,children:"Something went Wrong"}),{placement:"top-center"})}c(!1),j()},$=()=>{j()},p=(t,c)=>{c===G.edit&&(x(!0),o("Edit"),b(t)),c===G.delete&&(w(t==null?void 0:t.fileId),b(t),f(!0))},E=[{dataField:"Action",caption:"Action",width:"20%",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(ce,{row:t==null?void 0:t.data,actions:{view:!1,edit:!0,delete:!0},buttonClick:p})})},{dataField:"opportunityName",caption:"Opportunity Name",width:"20%",cellRender:t=>{var c;return e.jsx("div",{"data-cname":"Opportunity Name",children:e.jsx(de,{to:`/app/crm/opportunity-details/${(c=t==null?void 0:t.data)==null?void 0:c.opportunityId}`,className:`${M} ml-2 rtl:mr-2`,children:t.value})})}},{dataField:"fileName",caption:"File",width:"60%",cellRender:t=>e.jsx("div",{"data-cname":"File",children:e.jsx("span",{className:`${M} ml-2 rtl:mr-2 cursor-pointer`,onClick:()=>{J(t==null?void 0:t.data)},children:t.value})})}],J=async t=>{const{opportunityId:c,fileId:v,fileName:B}=t,y=await Se(c,v),S=y.headers["content-type"],O=new Blob([y.data],{type:S}),s=URL.createObjectURL(O);if(S.startsWith("image/")||S==="application/pdf")window.open(s,"_blank");else{const n=document.createElement("a");n.href=s,n.download=B,document.body.appendChild(n),n.click(),document.body.removeChild(n)}},A=()=>{w(null),f(!1),b(null)},Y=async()=>{await Ie(r==null?void 0:r.opportunityId,P)&&V.push(e.jsx(z,{title:"Deleted",type:"success",duration:2500,children:"File Successfully Deleted"}),{placement:"top-center"}),D(),A()};return e.jsxs(e.Fragment,{children:[e.jsx(u,{className:"h-full pt-0 bg-transparent borderless",bodyClass:"h-full",children:e.jsxs(u,{className:"h-full bg-transparent borderless",children:[e.jsxs("div",{className:"topbar border-gray-200 border-b dark:bg-[#292f3c] dark:text-white mb-2",children:[e.jsx(K,{items:[{label:"CRM"},{label:"Accounts"},{label:"Documents"}]}),e.jsxs("div",{className:"lg:flex pb-2 items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Documents"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(H,{block:!0,variant:"solid",size:"sm",icon:e.jsx(le,{}),onClick:()=>x(!0),children:"Add Document "}),e.jsx(q,{title:`${i} File`,isOpen:h,onClose:()=>j(),portalClassName:"w30",children:e.jsx(ve,{initialData:i==="Add"?{files:[],fileName:"",opportunityId:""}:{files:[{name:r==null?void 0:r.fileName,type:"applicatiojjn/zip",size:26775,isViewOnly:!0}],fileName:r==null?void 0:r.fileName,opportunityId:{label:r==null?void 0:r.opportunityName,value:r==null?void 0:r.opportunityId}},onSubmit:_,onCancel:$,accountId:l})})]})]})]}),e.jsx(oe,{tableName:"Account-documents",dataSource:d,height:"calc(100vh - 400px)",columns:E,keyExpr:"$id",stateStorageKey:"documents"})]})}),e.jsx(re,{isOpen:g,type:"danger",title:"Delete file",confirmButtonColor:"red-600",onClose:A,onRequestClose:A,onCancel:A,onConfirm:Y,children:e.jsx("p",{children:"Are you sure you want to delete this File?"})})]})};L("AccountsData",R);const ae=U=>{var O;let{id:l}=F();k(),T();const[d,m]=a.useState(!1),[h,x]=a.useState([]),[i,o]=a.useState(!1),[r,b]=a.useState("Add"),[g,f]=a.useState(null),[P,w]=a.useState(!1),[M,j]=a.useState("");W(s=>{var n,N;return(N=(n=s.AccountsData)==null?void 0:n.data)==null?void 0:N.account});const[D,_]=a.useState(""),$="Users",p=W(s=>{var n;return((n=s.auth.session)==null?void 0:n.permission)||[]});let E=((O=p==null?void 0:p.filter(s=>(s==null?void 0:s.defaultMenuName)===$))==null?void 0:O[0])||{isDelete:!1,isEdit:!1,isManage:!1,isView:!1};const J={edit:E.isEdit,archive:E.isDelete,loginAsUser:!0},A=async()=>{var s;try{let n=await Ae(l);x((s=n==null?void 0:n.data)==null?void 0:s.$values)}catch{x([])}};a.useEffect(()=>{l&&A()},[l]);const Y=s=>{m(!1)},t=(s,n,N)=>{V.push(e.jsx(z,{title:n,type:s,duration:2500,children:N}),{placement:"top-center"})},c=async s=>{var n;try{let N=await ue({userId:s});N.success&&window.open({}.VITE_CUSTOMER_PORTAL_URL+"/loginAsUser/"+((n=N==null?void 0:N.data)==null?void 0:n.token),"_blank","noreferrer")}catch{t("danger","Error","Failed")}},v=(s,n)=>{n===G.edit&&(m(!0),_(s.id)),n===G.loginAsUser&&c(s.id),n===G.delete&&(j(s==null?void 0:s.id),f(s),w(!0))},B=[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:s=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(ce,{row:s==null?void 0:s.data,actions:J,buttonClick:v})})},{dataField:"firstName",caption:"First Name",cellRender:s=>e.jsx("div",{"data-cname":"First Name",children:s.data.firstName})},{dataField:"lastName",caption:"Last Name",cellRender:s=>e.jsx("div",{"data-cname":"Last Name",children:s.data.lastName})},{dataField:"email",caption:"Email",cellRender:s=>e.jsx("div",{"data-cname":"Email",children:s.data.email})},{dataField:"phoneNumber",caption:"Phone No",cellRender:s=>e.jsx("div",{"data-cname":"Phone No",children:s.data.phoneNumber})},{dataField:"role",caption:"Role",cellRender:s=>e.jsx("div",{"data-cname":"Role",children:s.data.role})},{dataField:"createdByName",caption:"Created By",cellRender:s=>e.jsx("div",{"data-cname":"Created By",children:s.data.createdByName})},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:s=>{const n=pe(s.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:n})}}],y=()=>{j(null),w(!1),f(null)},S=async()=>{const s=await Fe(M);y(),s&&V.push(e.jsx(z,{title:"Archived",type:"success",duration:2500,children:"User Successfully Archived"}),{placement:"top-center"}),A()};return e.jsxs(e.Fragment,{children:[e.jsx(u,{className:"h-full pt-0 bg-transparent borderless",bodyClass:"h-full",children:e.jsxs(u,{className:"h-full bg-transparent borderless",children:[e.jsxs("div",{className:"topbar border-gray-200 border-b dark:bg-[#292f3c] dark:text-white mb-2",children:[e.jsx(K,{items:[{label:"CRM"},{label:"Accounts"},{label:"Users"}]}),e.jsxs("div",{className:"lg:flex pb-2 items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Users"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(H,{block:!0,variant:"solid",size:"sm",icon:e.jsx(le,{}),onClick:()=>o(!0),children:"Add User "}),e.jsx(q,{title:`${r} User`,isOpen:i,onClose:()=>o(!1),portalClassName:"w30",children:e.jsx(Ee,{accountId:l,footerWidth:"w30",onClose:()=>o(!1),onAddNew:()=>{A(),o(!1)}})})]})]})]}),e.jsx(oe,{tableName:"Account-Users",dataSource:h,height:"calc(100vh - 400px)",columns:B,keyExpr:"$id",stateStorageKey:"documents"})]})}),e.jsx(re,{isOpen:P,type:"danger",title:"Archive User",confirmButtonColor:"red-600",onClose:y,onRequestClose:y,onCancel:y,onConfirm:S,children:e.jsx("p",{children:"Are you sure you want to archive this Users?"})}),D&&e.jsx(q,{title:"Edit User",isOpen:d,onClose:Y,portalClassName:"w30",children:e.jsx(Oe,{footerWidth:"w30",userId:D,isAccountList:!0,onDrawerClose:Y,fetchData:A})})]})},{TabNav:I,TabList:ie,TabContent:C}=Q;L("AccountsData",R);const ke=U=>{var $;const l="Accounts";let{id:d}=F();const[m,h]=a.useState("");k();const x=T(),[i,o]=a.useState(!1);a.useState(!1),a.useState(0);const[r,b]=a.useState("Oppurtunity"),g=W(p=>{var E;return((E=p.auth.session)==null?void 0:E.permission)||[]});let f=(($=g==null?void 0:g.filter(p=>(p==null?void 0:p.defaultMenuName)===l))==null?void 0:$[0])||{isDelete:!1,isEdit:!1,isManage:!1,isView:!1};a.useEffect(()=>{d&&h(d)},[d]);const P=()=>{o(!0)},w=()=>{console.log("on drawer close"),o(!1),M()},M=()=>{x(ne({id:m}))},[j,D]=a.useState("vertical"),_=()=>{D(p=>p==="vertical"?"horizontal":"vertical")};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(K,{items:[{label:"CRM"},{label:"Accounts"},{label:"Account Details"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Account Details"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm font-medium",children:"Horizontal View"}),e.jsx(be,{checked:j==="horizontal",onChange:_}),e.jsx("span",{className:"text-sm font-medium",children:"Vertical View"})]})]})]}),j==="vertical"?e.jsxs("div",{className:"flex flex-wrap mb-1 px-3",children:[e.jsx("div",{className:"w-full md:w-1/3 mb-6 md:mb-0",children:e.jsx(u,{className:"h-full py-2 px-2 bg-transparent mt-4 ",bodyClass:"h-full",children:e.jsxs(u,{className:"borderless",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("h5",{children:"Account Details"}),(f==null?void 0:f.isEdit)&&e.jsx(H,{variant:"solid",size:"sm",onClick:P,children:"Edit"})]}),e.jsx(te,{mode:j})]})})}),e.jsx("div",{className:"w-full md:w-2/3 mb-6 md:mb-0 sm:pl-4",children:e.jsxs(Q,{className:"opportunity-tabs",variant:"pill",value:r,onChange:b,children:[e.jsx(u,{className:"borderless my-4",children:e.jsxs(ie,{className:"flex flex-col sm:flex-row sm:justify-between gap-2",children:[e.jsx(I,{icon:e.jsx(he,{}),value:"Oppurtunity",children:"Opportunity"}),e.jsx(I,{icon:e.jsx(xe,{}),value:"Contacts",children:"Contacts"}),e.jsx(I,{icon:e.jsx(fe,{}),value:"Users",children:"Users"}),e.jsx(I,{icon:e.jsx(je,{}),value:"Documents",children:"Documents"})]})}),e.jsx(u,{className:"my-4 ",children:e.jsxs("div",{className:"p-4",children:[e.jsx(C,{value:"Oppurtunity",children:e.jsx(X,{})}),e.jsx(C,{value:"Contacts",children:e.jsx(Z,{})}),e.jsx(C,{value:"Documents",children:e.jsx(se,{})}),e.jsx(C,{value:"Invoices",children:e.jsx(ee,{})}),e.jsx(C,{value:"Users",children:e.jsx(ae,{})})]})})]})})]}):e.jsxs("div",{className:"px-3",children:[e.jsxs(u,{className:"mt-4 ",bodyClass:"p-2 borderless",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("h5",{children:"Account Details"}),(f==null?void 0:f.isEdit)&&e.jsx(H,{variant:"solid",size:"sm",onClick:P,children:"Edit"})]}),e.jsx("div",{className:"",children:e.jsx(te,{mode:j})})]}),e.jsxs(Q,{className:"opportunity-tabs",variant:"pill",value:r,onChange:b,children:[e.jsx(u,{className:"p-2 mb-4",children:e.jsxs(ie,{className:"flex flex-col sm:flex-row sm:justify-between gap-2",children:[e.jsx(I,{value:"Oppurtunity",children:"Opportunity"}),e.jsx(I,{value:"Contacts",children:"Contacts"}),e.jsx(I,{value:"Users",children:"Users"}),e.jsx(I,{value:"Documents",children:"Documents"})]})}),e.jsxs(u,{className:"borderless",children:[e.jsx(C,{value:"Oppurtunity",children:e.jsx(X,{})}),e.jsx(C,{value:"Contacts",children:e.jsx(Z,{})}),e.jsx(C,{value:"Documents",children:e.jsx(se,{})}),e.jsx(C,{value:"Invoices",children:e.jsx(ee,{})}),e.jsx(C,{value:"Users",children:e.jsx(ae,{})})]})]})]}),e.jsx(q,{title:"Edit Account",isOpen:i,onClose:w,portalClassName:"w30",children:e.jsx(Ce,{id:m,onDrawerClose:w})})]})},Xt=Ue(ke,"Accounts");export{Xt as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{j as b,r as i,f as C,L as Q,u as X}from"./vendor-react-ece1c85f.js";import{r as w,u as V,E as Y,g as Z}from"./EditAccount-e42d66af.js";import{D,k as S,l as ee,E as v,F as E,aC as te,aD as se,aF as ie}from"./index-3b5ce20a.js";import{A as m}from"./AdaptableCard-3d1e1f96.js";import{P as B}from"./PageBreadcrumb-cf54a6e9.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as W}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import{T as z}from"./index-289b3fd9.js";import"./Upload-be937eb6.js";import re from"./OpportunitiesList-2f96958f.js";import oe from"./ContactsList-5b06c9b8.js";import{C as ne}from"./ConfirmDialog-2838a642.js";import{C as ae}from"./tableV3-24eed052.js";import{A as le,T as G}from"./actioncell-6b5ebd6c.js";import{b as ce}from"./AccountServices-f68f471d.js";import{A as de}from"./AddEditFile-6ae10d57.js";import{b as me,c as pe,d as ue,e as he}from"./OpportunityServices-c4510dd2.js";import"./DoubleSidedImage-b4bd3915.js";import"./vendor-redux-a1f00e6b.js";import"./ContactService-8afcaeb7.js";import"./index-b0ef7ac3.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./StickyFooter-3e569b80.js";import"./index.esm-b2d342b5.js";import"./AddAccount-2cd72664.js";import"./index-0fd6e996.js";import"./index-11297f4a.js";import"./vendor-i18n-b89304ef.js";import"./DepartmentServices-a53e998b.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./index-52963879.js";import"./EditLead-c8c9760a.js";import"./index-91505016.js";import"./LeadSourceService-cf71ea64.js";import"./index-d221d69e.js";import"./UserService-1b93ceb0.js";import"./usePermission-4689548c.js";import"./WrapperCell-3d5592cf.js";import"./FileSaver.min-20f3f13a.js";import"./mapView-c8063ed6.js";import"./esm-c40433f8.js";import"./lodash-306e3f66.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./tableV2-99c808c0.js";import"./ImportFile-026b1771.js";import"./papaparse.min-f30b4da6.js";import"./vendor-excel-3b3553df.js";D("AccountsData",w);const xe=l=>{let{id:s}=b();return i.useState(""),C(),S(),i.useState(!1),e.jsx(e.Fragment,{children:e.jsx(m,{className:"h-full pt-0 bg-transparent",bodyClass:"h-full",children:e.jsx(re,{accountId:s})})})};D("AccountsData",w);const fe=l=>{let{id:s}=b();const[x,c]=i.useState("");C(),S(),i.useState(!1),i.useState(!1),i.useState(0);const d=V(f=>{var a,p;return(p=(a=f.AccountsData)==null?void 0:a.data)==null?void 0:p.account});return i.useEffect(()=>{s&&c(s)},[s]),e.jsx(e.Fragment,{children:e.jsx(m,{className:"h-full pt-0 bg-transparent",bodyClass:"h-full",children:e.jsx(oe,{accountId:s,accountName:d==null?void 0:d.accountName})})})};D("AccountsData",w);const je=l=>{let{id:s}=b();const[x,c]=i.useState("");return C(),S(),i.useState(!1),i.useState(!1),i.useState(0),i.useEffect(()=>{s&&c(s)},[s]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 pt-0 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:[e.jsx(B,{items:[{label:"Build"},{label:"Grid"},{label:"Invoices"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Invoices"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center"})]})]}),e.jsx("div",{className:"py-1",style:{display:"flex"}})]})},be=l=>{b(),i.useState("");const s=(l==null?void 0:l.accountData)||{};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 border-gray-200 border-b",children:e.jsx("h3",{children:s==null?void 0:s.accountName})}),e.jsxs("div",{className:"topbar py-4 border-gray-200 border-b",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Primary Contact"}),e.jsx("h6",{children:s==null?void 0:s.primaryContactName})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Billing Contact"}),e.jsx("h6",{children:s==null?void 0:s.billingContactName})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Phone"}),e.jsx("h6",{children:"--"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Website"}),e.jsx("h6",{children:"--"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Address"}),e.jsx("h6",{children:s==null?void 0:s.address})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Parent Account"}),e.jsx("h6",{children:s==null?void 0:s.accountName})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{children:"Notes"}),e.jsx("h6",{children:s==null?void 0:s.notes})]})]})]})};D("AccountsData",w);const ye=l=>{let{id:s}=b();i.useState(""),C(),S(),i.useState(!1);const[x,c]=i.useState([]),[d,f]=i.useState(!1),[a,p]=i.useState("Add");i.useState("");const[r,u]=i.useState(null),[k,y]=i.useState(!1),[T,L]=i.useState("");V(t=>{var o,h;return(h=(o=t.AccountsData)==null?void 0:o.data)==null?void 0:h.account});const{textTheme:$}=ee(),P=()=>{p("Add"),f(!d)},R=async()=>{var t;try{let o=await ce(s);c((t=o==null?void 0:o.data)==null?void 0:t.$values)}catch{c([])}};i.useEffect(()=>{s&&R()},[s]);const q=async(t,o)=>{var h,I,N,j,O,g;try{const n=a==="Edit"?await me((h=t==null?void 0:t.opportunityId)==null?void 0:h.value,r==null?void 0:r.fileId,t==null?void 0:t.fileName,(N=(I=t==null?void 0:t.files)==null?void 0:I[0])!=null&&N.isViewOnly||(j=t==null?void 0:t.files)==null?void 0:j[0]):await pe((O=t==null?void 0:t.opportunityId)==null?void 0:O.value,t==null?void 0:t.fileName,(g=t==null?void 0:t.files)==null?void 0:g[0]);n.success?(R(),v.push(e.jsx(E,{title:"Success",type:"success",duration:2500,children:`File ${a==="Edit"?"Updated":"Uploaded"} Successfully`}),{placement:"top-center"})):v.push(e.jsx(E,{title:"Error",type:"danger",duration:2500,children:n.message}),{placement:"top-center"})}catch(n){console.error("Failed to opportunity logs:",n),v.push(e.jsx(E,{title:"Error",type:"danger",duration:2500,children:"Something went Wrong"}),{placement:"top-center"})}o(!1),P()},H=()=>{P()},K=(t,o)=>{o===G.edit&&(f(!0),p("Edit"),u(t)),o===G.delete&&(L(t==null?void 0:t.fileId),u(t),y(!0))},_=[{dataField:"Action",caption:"Action",width:"10%",cellRender:t=>e.jsx("div",{children:e.jsx(le,{row:t==null?void 0:t.data,actions:{view:!1,edit:!0,delete:!0},buttonClick:K})})},{dataField:"opportunityName",caption:"Opportunity Name",width:"40%",cellRender:t=>{var o;return e.jsx(Q,{to:`/app/crm/opportunity-details/${(o=t==null?void 0:t.data)==null?void 0:o.id}`,className:`${$} ml-2 rtl:mr-2`,children:t.value})}},{dataField:"fileName",caption:"File",width:"50%",cellRender:t=>e.jsx("p",{className:`${$} ml-2 rtl:mr-2 cursor-pointer`,onClick:()=>{J(t==null?void 0:t.data)},children:t.value})}],J=async t=>{const{opportunityId:o,fileId:h,fileName:I}=t,N=await ue(o,h),j=N.headers["content-type"],O=new Blob([N.data],{type:j}),g=URL.createObjectURL(O);if(j.startsWith("image/")||j==="application/pdf")window.open(g,"_blank");else{const n=document.createElement("a");n.href=g,n.download=I,document.body.appendChild(n),n.click(),document.body.removeChild(n)}},A=()=>{L(null),y(!1),u(null)},M=async()=>{await he(r==null?void 0:r.opportunityId,T)&&v.push(e.jsx(E,{title:"Deleted",type:"success",duration:2500,children:"File Successfully Deleted"}),{placement:"top-center"}),R(),A()};return e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"h-full pt-0 bg-transparent",bodyClass:"h-full",children:e.jsxs(m,{className:"h-full bg-transparent",children:[e.jsxs("div",{className:"topbar border-gray-200 border-b dark:bg-[#292f3c] dark:text-white mb-2",children:[e.jsx(B,{items:[{label:"Build"},{label:"Grid"},{label:"Documents"}]}),e.jsxs("div",{className:"lg:flex pb-2 items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Documents"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:e.jsx(W,{title:`${a} File`,isOpen:d,onClose:()=>P(),portalClassName:"w30",children:e.jsx(de,{initialData:a==="Add"?{files:[],fileName:"",opportunityId:""}:{files:[{name:r==null?void 0:r.fileName,type:"applicatiojjn/zip",size:26775,isViewOnly:!0}],fileName:r==null?void 0:r.fileName,opportunityId:{label:r==null?void 0:r.opportunityName,value:r==null?void 0:r.opportunityId}},onSubmit:q,onCancel:H,accountId:s})})})]})]}),e.jsx(ae,{dataSource:x,height:"calc(100vh - 400px)",columns:_,keyExpr:"$id",stateStorageKey:"documents"})]})}),e.jsx(ne,{isOpen:k,type:"danger",title:"Delete file",confirmButtonColor:"red-600",onClose:A,onRequestClose:A,onCancel:A,onConfirm:M,children:e.jsx("p",{children:"Are you sure you want to delete this File?"})})]})},{TabNav:U,TabList:Ne,TabContent:F}=z;D("AccountsData",w);const Et=l=>{let{id:s}=b();const[x,c]=i.useState("");C();const d=S(),[f,a]=i.useState(!1);i.useState(!1),i.useState(0);const[p,r]=i.useState("Oppurtunity"),{state:u}=X(),k=u==null?void 0:u.accountDetails;i.useEffect(()=>{s&&c(s)},[s]);const y=()=>{a(!1),T()},T=()=>{d(Z({id:x}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(B,{items:[{label:"Build"},{label:"Grid"},{label:"Details"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Grid Details"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center"})]})]}),e.jsxs("div",{className:"flex flex-wrap mb-1 px-3",children:[e.jsx("div",{className:"w-full md:w-1/3 mb-6 md:mb-0",children:e.jsx(m,{className:"h-full py-4 px-2 bg-transparent",bodyClass:"h-full",children:e.jsxs(m,{className:"borderless",children:[e.jsx("div",{className:"flex justify-between mt-5",children:e.jsx("h5",{children:"Details"})}),e.jsx("div",{children:e.jsx(be,{accountData:k})})]})})}),e.jsx("div",{className:"w-full md:w-2/3 mb-6 md:mb-0 sm:pl-4",children:e.jsxs(z,{className:"opportunity-tabs",variant:"pill",value:p,onChange:r,children:[e.jsx(m,{className:"borderless my-4",children:e.jsxs(Ne,{className:"justify-between",children:[e.jsx(U,{icon:e.jsx(te,{}),value:"Oppurtunity",children:"Opportunity"}),e.jsx(U,{icon:e.jsx(se,{}),value:"Contacts",children:"Contacts"}),e.jsx(U,{icon:e.jsx(ie,{}),value:"Documents",children:"Documents"})]})}),e.jsx(m,{className:"my-4",children:e.jsxs("div",{className:"p-4",children:[e.jsx(F,{value:"Oppurtunity",children:e.jsx(xe,{})}),e.jsxs(F,{value:"Contacts",children:[e.jsx(fe,{})," "]}),e.jsxs(F,{value:"Documents",children:[e.jsx(ye,{})," "]}),e.jsxs(F,{value:"Invoices",children:[e.jsx(je,{})," "]})]})})]})})]}),e.jsx(W,{title:"Edit Account",isOpen:f,onClose:y,portalClassName:"w30",children:e.jsx(Y,{id:x,onDrawerClose:y})})]})};export{Et as default};
@@ -0,0 +1 @@
1
+ import{cY as e}from"./index-3b5ce20a.js";const c={data:[],loadable:!1};async function a(){try{return c}catch{return c}}async function i(n){return(await e.apiV10AccountAddAccountPost(n)).data}async function r(n){return(await e.apiV10AccountGetAccountsPost(n)).data}async function u(n){return(await e.apiV10AccountGetAccountByIdIdGet(n)).data}async function p(n,t){return(await e.apiV10AccountUpdateAccountIdPut(n,t)).data}async function A(n){return(await e.apiV10AccountDeleteAccountIdDelete(n)).data}async function y(n){return(await e.apiV10AccountGetOpportunityFilesByAccountIdIdGet(n)).data}async function G(n,t){return(await e.apiV10AccountGetLoginActivitiesPost(n==null?void 0:n.pageNumber,n.pageSize,n==null?void 0:n.sortBy,n==null?void 0:n.isAscending,t)).data}async function f(n){return(await e.apiV10AccountGetAccountUsersByAccountIdAccountIdGet(n)).data}export{A as a,y as b,f as c,r as d,u as e,p as f,i as g,a as h,G as i};
@@ -0,0 +1 @@
1
+ import{j as e,l as Ce}from"./vendor-mui-98daa63f.js";import{A as ae}from"./AdaptableCard-3d1e1f96.js";import{r as o,f as he,L as se}from"./vendor-react-ece1c85f.js";import{u,t as k,g as M,a as xe,s as y,r as ge,b as ne}from"./index-0fd6e996.js";import{k as T,aA as Ae,E as fe,F as be,r as R,B as N,D as ce,l as je,d as oe,ai as ve}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{C as E}from"./index-a14e51de.js";import{D as I}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as we,E as ye}from"./AddAccount-2cd72664.js";import{A as Ne,T as O}from"./actioncell-6b5ebd6c.js";import{D as Fe}from"./tableV2-99c808c0.js";import{C as Se}from"./ConfirmDialog-2838a642.js";import{a as Ie}from"./AccountServices-f68f471d.js";import{r as Le}from"./index-11297f4a.js";import{u as De}from"./usePermission-4689548c.js";import{C as Pe}from"./ImportFile-026b1771.js";import{a as Re}from"./ContactService-8afcaeb7.js";import{P as Ee}from"./PageBreadcrumb-cf54a6e9.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"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./index-b0ef7ac3.js";import"./StickyFooter-3e569b80.js";import"./index.esm-b2d342b5.js";import"./DepartmentServices-a53e998b.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./DoubleSidedImage-b4bd3915.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./papaparse.min-f30b4da6.js";import"./vendor-excel-3b3553df.js";const Oe=()=>{const l=T(),m=u(r=>r.AccountsData.data.deleteConfirmation),C=u(r=>r.AccountsData.data.selectedRowData),A=u(r=>r.AccountsData.data.tableData),s=()=>{l(k(!1))},h=async()=>{l(k(!1)),await Ie(C.id)&&(Ae("apiCache-accountsData-"),l(M(A)),fe.push(e.jsx(be,{title:"Deleted",type:"success",duration:2500,children:"Account Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(Se,{isOpen:m,type:"danger",title:"Delete Contact",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:h,children:e.jsx("p",{children:"Are you sure you want to delete this Account? This action cannot be undone."})})},ke=({onSaveClick:l,onCancel:m,onClearFilers:C})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(N,{size:"sm",className:"mr-2",onClick:C,children:"Clear All"}),e.jsx(N,{size:"sm",className:"mr-2",onClick:m,children:"Cancel"}),e.jsx(N,{size:"sm",variant:"solid",onClick:l,children:"Query"})]}),Me=l=>{o.useRef(null);const m=T(),[C,A]=o.useState(!1),s=u(n=>{var p,d;return(d=(p=n==null?void 0:n.AccountsData)==null?void 0:p.data)==null?void 0:d.filterData}),[h,r]=o.useState(s==null?void 0:s.parentAccount),[b,j]=o.useState(s==null?void 0:s.primaryContact),[F,v]=o.useState(s==null?void 0:s.billingContact),f=()=>{A(!1),l.onClose()},x=u(n=>{var p,d,g;return(g=(d=(p=n.AccountsData)==null?void 0:p.data)==null?void 0:d.accountList)==null?void 0:g.map(i=>({value:i.id,label:i.accountName}))}),S=u(n=>{var d,g,i;return(i=(g=(d=n==null?void 0:n.AccountsData)==null?void 0:d.data)==null?void 0:g.contactList)==null?void 0:i.map(t=>({value:t.id,label:t.contactName}))});o.useEffect(()=>{L()},[]);const L=()=>{const n=xe({});m(n),m(M({}))},D=()=>{m(y({parentAccount:"",primaryContact:"",billingContact:""})),r(""),j(""),v("")},w=()=>{l.onClose(),A(!1),m(y({parentAccount:h,primaryContact:b,billingContact:F}))};return o.useEffect(()=>{l.isOpen&&A(!0)},[l.isOpen]),o.useEffect(()=>{(s==null?void 0:s.billingContact)===""&&v(""),(s==null?void 0:s.parentAccount)===""&&r(""),(s==null?void 0:s.primaryContact)===""&&j("")},[s]),e.jsx(e.Fragment,{children:e.jsxs(I,{title:"Advanced Filter Selection Page",isOpen:C,portalClassName:"w30",footer:e.jsx(ke,{onCancel:f,onSaveClick:w,onClearFilers:D}),onClose:f,onRequestClose:f,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Parent Account"})}),e.jsx(R,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:h,onChange:n=>r(n),options:x,isClearable:!0})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Primary Contact"})}),e.jsx(R,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:b,onChange:n=>j(n),options:S,isClearable:!0})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Billing Contact"})}),e.jsx(R,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:F,onChange:n=>v(n),options:S})]})]})})};ce("AccountsData",ge);ce("ContactsData",Le);const Pt=()=>{var W,_,U,Q,Z,G;const[l,m]=o.useState([]),[C,A]=o.useState(!1),[s,h]=o.useState(!1),[r,b]=o.useState(!1),[j,F]=o.useState(),[v,f]=o.useState(!1),x=De("Accounts"),S={edit:x.isEdit,delete:x.isDelete,view:x.isView},L=()=>{f(!0)},D=()=>{f(!1)},[w,n]=o.useState({drawerType:""}),p=()=>{h(!0)},d=()=>{h(!1)},g=he(),i=T(),t=u(a=>a.AccountsData.data.filterData),z=u(a=>a.AccountsData.data.loading),ie=u(a=>a.AccountsData.data.accountList),{textTheme:B}=je(),{pageIndex:q,pageSize:$,sort:V,query:le,total:Te}=u(a=>a.AccountsData.data.tableData);o.useEffect(()=>{Y()},[q,$,V,C,t]);const Y=()=>{var c,J,K,X,ee,te;const a=M({pageIndex:q,pageSize:$,sort:V,query:le,...((c=t==null?void 0:t.billingContact)==null?void 0:c.value)&&{billingContactId:(J=t==null?void 0:t.billingContact)==null?void 0:J.value},...((K=t==null?void 0:t.parentAccount)==null?void 0:K.value)&&{parentAccountId:(X=t==null?void 0:t.parentAccount)==null?void 0:X.value},...((ee=t==null?void 0:t.primaryContact)==null?void 0:ee.value)&&{primaryContactId:(te=t==null?void 0:t.primaryContact)==null?void 0:te.value}});i(a)},re=a=>{g("/app/crm/account-details/"+a.id)},[de,me]=o.useState({pageSize:"",pageIndex:""}),ue=(a,c)=>{c===O.view&&re(a),c===O.edit&&(F(a.id),i(ne(a)),b(!0)),c===O.delete&&(i(k(!0)),i(ne(a)))},H=()=>{b(!1)},pe=[{dataField:"Action",caption:"Action",width:"130",cellRender:a=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(Ne,{row:a==null?void 0:a.data,actions:S,buttonClick:ue})})},{dataField:"accountName",caption:"Account Name",width:"230",cellRender:a=>{var c;return e.jsx("div",{"data-cname":"Account Name",children:e.jsx(se,{to:`/app/crm/account-details/${(c=a==null?void 0:a.data)==null?void 0:c.id}`,className:`${B} ml-2 rtl:mr-2`,children:a.value})})}},{dataField:"parentAccountName",caption:"Parent Account",width:"230",cellRender:a=>{var c;return e.jsx("div",{"data-cname":"Parent Account",children:e.jsx(se,{to:`/app/crm/account-details/${(c=a==null?void 0:a.data)==null?void 0:c.parentAccountId}`,className:`${B} ml-2 rtl:mr-2`,children:a.value})})}},{dataField:"address",caption:"Address",width:"230"},{dataField:"city",caption:"City",width:"230"},{dataField:"state",caption:"State",width:"230"},{dataField:"zip",caption:"Zip",width:"230"},{dataField:"primaryContactName",caption:"Primary Contact",width:"230"},{dataField:"billingContactName",caption:"Billing Contact",width:"230"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:a=>{const c=ve(a.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:c})}}],P=a=>{a==="billingContact"&&i(y({...t,billingContact:""})),a==="parentAccount"&&i(y({...t,parentAccount:""})),a==="primaryContact"&&i(y({...t,primaryContact:""}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Ee,{items:[{label:"CRM"},{label:"Accounts"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Accounts"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[x.isEdit&&e.jsx(N,{block:!0,variant:"solid",size:"sm",icon:e.jsx(oe,{}),onClick:()=>p(),children:"Add Account"}),x.isEdit&&e.jsx(N,{block:!0,variant:"solid",size:"sm",icon:e.jsx(oe,{}),onClick:()=>n(a=>({...a,drawerType:"import"})),children:"Import Accounts"})]}),e.jsx(I,{title:"Add Account",isOpen:s,onClose:d,portalClassName:"w30",children:e.jsx(we,{footerWidth:"w30",onDrawerClose:d})}),e.jsx(I,{title:"Edit Account",isOpen:r,onClose:H,portalClassName:"w30",children:e.jsx(ye,{footerWidth:"w30",id:j,onDrawerClose:H})})]})]})]}),e.jsxs(ae,{className:"m-6 h-full borderless bg-transparent",bodyClass:"h-full",children:[z&&e.jsx(Ce,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(ae,{className:"borderless",children:[e.jsxs("div",{className:"text-right mb-3 ",children:[((W=t==null?void 0:t.parentAccount)==null?void 0:W.value)&&e.jsx(E,{title:"Parent Account",value:(_=t==null?void 0:t.parentAccount)==null?void 0:_.label,tagId:"parentAccount",onRemovefilter:P}),((U=t==null?void 0:t.primaryContact)==null?void 0:U.value)&&e.jsx(E,{title:"Primary Contact",value:(Q=t==null?void 0:t.primaryContact)==null?void 0:Q.label,tagId:"primaryContact",onRemovefilter:P}),((Z=t==null?void 0:t.billingContact)==null?void 0:Z.value)&&e.jsx(E,{title:"Billing Contact",value:(G=t==null?void 0:t.billingContact)==null?void 0:G.label,tagId:"billingContact",onRemovefilter:P})]}),e.jsx(Fe,{columns:pe,tableName:"Account-List",data:ie||[],defaultHiddenColumn:[],height:"calc(100vh - 290px)",fetchData:()=>{},id_label:"$id",selectedRowId:l,setSelectedRowId:m,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:de,setPager:me,openFilter:L,isPaginationReq:!0,isFilterReq:!0,isSelectionReq:!1,isLoading:z})]})]}),e.jsx(Oe,{}),e.jsx(Me,{isOpen:v,onClose:D}),e.jsx(I,{title:"Import Accounts",portalClassName:"w30 prevent-overflow",isOpen:(w==null?void 0:w.drawerType)==="import",closable:!0,onClose:()=>n(a=>({...a,drawerType:""})),children:e.jsx(Pe,{requiredHeaders:["accountName","website"],allowedHeaders:["accountName","parentAccountId","address","city","state","zip","primaryContact","billingContact","website","industry","noOfEmployees","course","notes"],apiUrl:Re,importType:"Accounts",templateFile:"/data/Accounts_Import_template.csv",fetchData:()=>Y(),onDiscard:()=>n(a=>({...a,drawerType:""}))})})]})};export{Pt as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./vendor-mui-98daa63f.js";import{l as h,g as p}from"./index-3b5ce20a.js";import{L as u}from"./vendor-react-ece1c85f.js";const N=a=>{const{children:s,className:m,themeColor:n=!0,to:e,reloadDocument:c,href:l="",...o}=a,{textTheme:i}=h(),r={className:p(n&&i,"hover:underline",m)};return e?t.jsx(u,{to:e,reloadDocument:c,...r,...o,children:s}):t.jsx("a",{href:l,...r,...o,children:s})};export{N as A};
@@ -0,0 +1 @@
1
+ import{j as p}from"./vendor-mui-98daa63f.js";import{c,al as g,g as e,n as d}from"./index-3b5ce20a.js";const x=o=>{const{className:n,children:t,bodyClass:l,leftSideBorder:a,rightSideBorder:s,divider:b,shadow:m,isLastChild:u,...y}=o,r=c(i=>i.theme.layout.type);return p.jsx(g,{className:e(n,r===d&&"border-0",r===d&&s&&"ltr:border-r-0 rtl:border-l-0 ltr:md:border-r rtl:md:border-l md:border-gray-200 md:dark:border-gray-600 rounded-tr-none rounded-br-none rtl:rounded-tr-none rtl:rounded-br-none",r===d&&a&&"ltr:border-l-0 rtl:border-r-0 ltr:md:border-l rtl:md:border-r md:border-gray-200 md:dark:border-gray-600 rounded-tl-none rounded-bl-none rtl:rounded-tl-none rtl:rounded-bl-none",r===d&&b&&`${u?"":"pb-6"} py-4 md:border-gray-200 md:dark:border-gray-600 rounded-br-none rounded-bl-none`,r!==d&&m&&"rounded-none shadow-none border-0"),...y,bodyClass:e(r===d?"card-gutterless":"",l),children:t})};export{x as A};
@@ -0,0 +1 @@
1
+ import{_ as Re,j as e}from"./vendor-mui-98daa63f.js";import{cv as je,cw as de,cx as Be,cy as ye,cz as We,cA as Ue,cB as Ge,cC as Ze,k as W,cD as Ie,D as Oe,Z as Ae,cE as ne,E as R,F as B,a0 as T,r as U,B as G,cF as ve,aA as Ee,c as Qe}from"./index-3b5ce20a.js";import{r as S,f as le}from"./vendor-react-ece1c85f.js";import{a as M,F as Fe}from"./FormContainer-9a52b9e8.js";import{h as Me}from"./index-b0ef7ac3.js";import{S as _e}from"./StickyFooter-3e569b80.js";import{C as ke}from"./ConfirmDialog-2838a642.js";import{u as ue,d as _,a as Z,c as oe,F as $e,b as Pe,g as Xe,h as He}from"./index.esm-b2d342b5.js";import{A as Le}from"./AdaptableCard-3d1e1f96.js";import{b as Je,r as Ke,u as te,c as Ye,g as ce,a as Ne}from"./index-0fd6e996.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as re}from"./Drawer-4f97e662.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{u as se,g as et,a as he,s as tt,r as at,b as st}from"./index-11297f4a.js";import{b as nt}from"./vendor-i18n-b89304ef.js";import{f as ot,a as ct,g as rt}from"./AccountServices-f68f471d.js";import{a as it,b as lt}from"./DepartmentServices-a53e998b.js";import{d as qe}from"./Check-af681a30.js";import{D as Te}from"./DoubleSidedImage-b4bd3915.js";import{a as Ve}from"./index-0b08ce18.js";import{V as ie,i as ze}from"./validationPatterns-77446c46.js";import{c as dt,d as mt,e as pt}from"./ContactService-8afcaeb7.js";import{a as ut}from"./CourseService-29ad460c.js";var ht=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],be=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,u=String(t).toLowerCase(),n=String(s.getOptionValue(o)).toLowerCase(),d=String(s.getOptionLabel(o)).toLowerCase();return n===u||d===u},me={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,o,s,u){return!(!t||o.some(function(n){return be(t,n,u)})||s.some(function(n){return be(t,n,u)}))},getNewOptionData:function(t,o){return{label:o,value:t,__isNew__:!0}}};function xt(i){var t=i.allowCreateWhileLoading,o=t===void 0?!1:t,s=i.createOptionPosition,u=s===void 0?"last":s,n=i.formatCreateLabel,d=n===void 0?me.formatCreateLabel:n,w=i.isValidNewOption,h=w===void 0?me.isValidNewOption:w,D=i.getNewOptionData,f=D===void 0?me.getNewOptionData:D,g=i.onCreateOption,l=i.options,j=l===void 0?[]:l,a=i.onChange,p=nt(i,ht),N=p.getOptionValue,C=N===void 0?We:N,A=p.getOptionLabel,E=A===void 0?Ue:A,I=p.inputValue,y=p.isLoading,v=p.isMulti,k=p.value,$=p.name,b=S.useMemo(function(){return h(I,je(k),j,{getOptionValue:C,getOptionLabel:E})?f(I,d(I)):void 0},[d,f,E,C,I,h,j,k]),V=S.useMemo(function(){return(o||!y)&&b?u==="first"?[b].concat(de(j)):[].concat(de(j),[b]):j},[o,u,y,b,j]),z=S.useCallback(function(P,L){if(L.action!=="select-option")return a(P,L);var m=Array.isArray(P)?P:[P];if(m[m.length-1]===b){if(g)g(I);else{var c=f(I,I),r={action:"create-option",name:$,option:c};a(Be(v,[].concat(de(je(k)),[c]),c),r)}return}a(P,L)},[f,I,v,$,b,g,a,k]);return ye(ye({},p),{},{options:V,onChange:z})}var gt=S.forwardRef(function(i,t){var o=Ge(i),s=xt(o);return S.createElement(Ze,Re({ref:t},s))}),xe=gt;const ft=i=>{var h,D,f,g,l,j,a,p,N,C,A;const{data:t,sortedAccounts:o,setIsEditModalOpen:s,setEditedId:u}=i,n=((h=o==null?void 0:o.filter(E=>(E==null?void 0:E.value)===(t==null?void 0:t.value)))==null?void 0:h[0])||{},d=W(),w=()=>{var E;u((E=n.desc)==null?void 0:E.id),d(Je(n.desc)),s(!0)};return e.jsxs("div",{className:"card-account relative flex flex-col p-3 rounded-lg bg-gray-100 cursor-pointer mt-2",children:[e.jsx("h4",{className:"font-bold",children:n.label}),e.jsx("div",{className:"absolute top-2 right-2",onClick:()=>{w()},children:e.jsx(Ie,{})}),e.jsx("div",{className:"flex mt-2",children:e.jsxs("p",{className:"text-gray-600",children:[e.jsx("strong",{children:"Address:"}),e.jsxs("span",{children:[(D=n==null?void 0:n.desc)==null?void 0:D.address,(f=n==null?void 0:n.desc)==null?void 0:f.city,",",(g=n==null?void 0:n.desc)==null?void 0:g.state,",",(l=n==null?void 0:n.desc)==null?void 0:l.zip]})]})}),e.jsxs("div",{className:"flex mt-2",children:[e.jsxs("p",{className:"text-gray-600 w-2/3",children:[e.jsx("strong",{children:"Parent Account:"}),e.jsx("span",{children:(j=n==null?void 0:n.desc)==null?void 0:j.parentAccountName})]}),e.jsxs("p",{className:"text-gray-600 w-1/3",children:[e.jsx("strong",{children:"Industry:"})," ",(a=n==null?void 0:n.desc)==null?void 0:a.industry]})]}),e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Primary Contact:"})," ",(p=n==null?void 0:n.desc)==null?void 0:p.primaryContactName]}),e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Billing Contact:"})," ",(N=n==null?void 0:n.desc)==null?void 0:N.billingContactName]})]}),e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-2/3",children:[e.jsx("strong",{children:"Website:"})," ",(C=n==null?void 0:n.desc)==null?void 0:C.website]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/3",children:[e.jsx("strong",{children:"No of Employee:"})," ",(A=n==null?void 0:n.desc)==null?void 0:A.noOfEmployees]})]})]})},Ct=i=>{var n,d,w,h,D,f,g,l,j,a;const{data:t,innerRef:o,innerProps:s,isSelected:u}=i;return e.jsxs("div",{ref:o,...s,className:"card-account relative flex flex-col p-3 border rounded-lg bg-white shadow-sm cursor-pointer my-3",children:[u&&e.jsx("div",{className:"absolute top-2 right-2",children:e.jsx(qe,{style:{color:"var(--custom-600)"}})}),e.jsx("h4",{className:"font-bold",children:t.label}),!(t!=null&&t.__isNew__)&&e.jsx("div",{className:"flex mt-2",children:e.jsxs("p",{className:"text-sm text-gray-600",children:[e.jsx("strong",{children:"Address:"}),e.jsxs("span",{children:[(n=t==null?void 0:t.desc)==null?void 0:n.address,(d=t==null?void 0:t.desc)==null?void 0:d.city,",",(w=t==null?void 0:t.desc)==null?void 0:w.state,",",(h=t==null?void 0:t.desc)==null?void 0:h.zip]})]})}),!(t!=null&&t.__isNew__)&&e.jsxs("div",{className:"flex mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-2/3",children:[e.jsx("strong",{children:"Parent Account:"}),e.jsx("span",{children:(D=t==null?void 0:t.desc)==null?void 0:D.parentAccountName})]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/3",children:[e.jsx("strong",{children:"Industry:"})," ",(f=t==null?void 0:t.desc)==null?void 0:f.industry]})]}),!(t!=null&&t.__isNew__)&&e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Primary Contact:"})," ",(g=t==null?void 0:t.desc)==null?void 0:g.primaryContactName]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Billing Contact:"})," ",(l=t==null?void 0:t.desc)==null?void 0:l.billingContactName]})]}),!(t!=null&&t.__isNew__)&&e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-2/3",children:[e.jsx("strong",{children:"Website:"})," ",(j=t==null?void 0:t.desc)==null?void 0:j.website]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/3",children:[e.jsx("strong",{children:"No of Employee:"})," ",(a=t==null?void 0:t.desc)==null?void 0:a.noOfEmployees]})]})]})};Oe("AccountsData",Ke);const jt=i=>{const{id:t,footerWidth:o,onDrawerClose:s}=i,u=W();le();const n=te(a=>a.AccountsData.data.tableData),d=te(a=>{var p,N,C,A,E,I,y,v,k,$,b,V,z,P,L,m,c,r,x,O,F,q,Q,X,H,J,K,Y,ee;return{...(N=(p=a.AccountsData)==null?void 0:p.data)==null?void 0:N.account,primaryContact:{value:(E=(A=(C=a.AccountsData)==null?void 0:C.data)==null?void 0:A.account)==null?void 0:E.primaryContact,label:(v=(y=(I=a.AccountsData)==null?void 0:I.data)==null?void 0:y.account)==null?void 0:v.primaryContactName},billingContact:{value:(b=($=(k=a.AccountsData)==null?void 0:k.data)==null?void 0:$.account)==null?void 0:b.billingContact,label:(P=(z=(V=a.AccountsData)==null?void 0:V.data)==null?void 0:z.account)==null?void 0:P.billingContactName},parentAccountId:{value:(c=(m=(L=a.AccountsData)==null?void 0:L.data)==null?void 0:m.account)==null?void 0:c.parentAccountId,label:(O=(x=(r=a.AccountsData)==null?void 0:r.data)==null?void 0:x.account)==null?void 0:O.parentAccountName},courseId:(Q=(q=(F=a.AccountsData)==null?void 0:F.data)==null?void 0:q.account)!=null&&Q.courseId?{value:(J=(H=(X=a.AccountsData)==null?void 0:X.data)==null?void 0:H.account)==null?void 0:J.courseId,label:(ee=(Y=(K=a.AccountsData)==null?void 0:K.data)==null?void 0:Y.account)==null?void 0:ee.courseTitle}:null}}),w=te(a=>{var p,N;return(N=(p=a.AccountsData)==null?void 0:p.data)==null?void 0:N.loading}),h=a=>{u(Ye({id:a}))},D=()=>{const a="apiCache-accountsData-";Object.keys(localStorage).forEach(p=>{p.startsWith(a)&&localStorage.removeItem(p)}),u(ce({}))},f=async(a,p)=>{var C,A,E,I,y,v,k,$;p(!0);const N={accountName:a.accountName??"",parentAccount:(C=a.parentAccountId)!=null&&C.value&&((A=a.parentAccountId)==null?void 0:A.value)!==""?(E=a.parentAccountId)==null?void 0:E.value:void 0,address:a.address??"",city:a.city??"",state:a.state??"",zip:a.zip??"",primaryContact:(I=a==null?void 0:a.primaryContact)==null?void 0:I.value,billingContact:(y=a==null?void 0:a.billingContact)==null?void 0:y.value,notes:a.notes??"",website:a.website??"",noOfEmployees:a.noOfEmployees?String(a.noOfEmployees):"",industry:a.industry??"",latitude:(a==null?void 0:a.latitude)??"",longitude:(a==null?void 0:a.longitude)??"",courseId:((v=a==null?void 0:a.courseId)==null?void 0:v.value)??null};try{const b=await ot(t,N);p(!1),b&&(j("updated"),D(),s())}catch(b){R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:(($=(k=b==null?void 0:b.response)==null?void 0:k.data)==null?void 0:$.message)||"Something went wrong. please try again!"}),{placement:"top-center"})}},g=()=>{s()},l=async a=>{a(!1),await ct(t)&&(u(ce(n)),R.push(e.jsx(B,{title:"Deleted",type:"success",duration:2500,children:"Account Successfully Deleted"}),{placement:"top-center"}),g())},j=a=>{R.push(e.jsxs(B,{title:"Success",type:"success",duration:2500,children:["Account Successfully ",a]}),{placement:"top-center"})};return S.useEffect(()=>{h(t)},[t]),e.jsxs(e.Fragment,{children:[e.jsx(Ae,{loading:w,children:!ne(d)&&e.jsx(e.Fragment,{children:e.jsx(fe,{type:"edit",footerWidth:o,initialData:d,onFormSubmit:f,onDiscard:g,onDelete:l})})}),!w&&ne(d)&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(Te,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),e.jsx("h3",{className:"mt-8",children:"No account found!"})]})]})},yt=i=>{const t=W(),{touched:o,errors:s,type:u}=i;S.useState();const{setFieldValue:n,values:d}=ue(),[w,h]=S.useState(!1),[D,f]=S.useState(""),[g,l]=S.useState(""),[j,a]=S.useState([]),[p,N]=S.useState([]),[C,A]=S.useState(),[E,I]=S.useState(!1),y=se(m=>{var r,x,O;return(O=(x=(r=m==null?void 0:m.ContactsData)==null?void 0:r.data)==null?void 0:x.accountList)==null?void 0:O.map(F=>({value:F.id,label:F.accountName,desc:F}))});S.useEffect(()=>{v(),k(),$()},[]);const v=()=>{const m=et({});t(m)},k=S.useCallback(async()=>{var m,c;try{const r=await it();if(r!=null&&r.data){let x=(c=(m=r==null?void 0:r.data)==null?void 0:m.$values)==null?void 0:c.map(O=>({value:O.id,label:O.positionName}));a(x)}}catch(r){a([]),console.error("Failed to opportunity logs:",r)}},[]),$=S.useCallback(async()=>{var m,c;try{const r=await lt();if(r!=null&&r.data){let x=(c=(m=r==null?void 0:r.data)==null?void 0:m.$values)==null?void 0:c.map(O=>({value:O.id,label:O.departmentName}));N(x)}}catch(r){N([]),console.error("Failed to opportunity logs:",r)}},[]),b=m=>{let{value:c}=m.target;c=c.replace(/\D/g,"");var r=c.length;r>0&&(c="("+c),r>3&&(c=c.slice(0,4)+") "+c.slice(4,11)),r>6&&(c=c.slice(0,9)+"-"+c.slice(9)),m.target.value=c},V=(m,c)=>{f(m),l(c),h(!0)},z=m=>{h(!1),n(g,{value:m.id,label:m.accountName}),v(),f(""),l("")},P=()=>{h(!1),f(""),l("")},L=()=>{A(null),I(!1),v()};return e.jsxs(Le,{className:"mb-4",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[e.jsx(M,{label:"First Name",asterisk:!0,invalid:s.firstName&&o.firstName,errorMessage:s.firstName,children:e.jsx(_,{type:"text",autoComplete:"off",name:"firstName",placeholder:"First Name",component:T})}),e.jsx(M,{label:"Last Name",invalid:s.lastName&&o.lastName,errorMessage:s.lastName,children:e.jsx(_,{type:"text",autoComplete:"off",name:"lastName",placeholder:"Last Name",component:T})})]}),e.jsxs(M,{label:"Account",asterisk:!0,invalid:s.accountId&&o.accountId,errorMessage:s.accountId,children:[e.jsx(_,{name:"accountId",children:({field:m,form:c})=>e.jsx(U,{field:m,form:c,options:y,name:"accountId",placeholder:"Create or Select Account",componentAs:xe,onCreateOption:r=>V(r,"accountId"),components:{DropdownIndicator:null,IndicatorSeparator:null,Option:Ct},styles:{control:(r,x)=>({...r,borderColor:s!=null&&s[m.name]&&(o!=null&&o[m.name])?"red":r.borderColor,boxShadow:s!=null&&s[m.name]&&(o!=null&&o[m.name])?"0 0 0 1px red":x.isFocused?"0 0 0 1px #2684FF":r.boxShadow,"&:hover":{borderColor:s!=null&&s[m.name]&&(o!=null&&o[m.name])?"red":r.borderColor}}),input:r=>({...r,color:"black"})},onChange:r=>{c.setFieldValue(m.name,r)}})}),(d==null?void 0:d.accountId)&&e.jsx(ft,{data:d==null?void 0:d.accountId,sortedAccounts:y,setIsEditModalOpen:I,setEditedId:A})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[e.jsx(M,{asterisk:!0,label:"Email",invalid:s.email&&o.email,errorMessage:s.email,children:e.jsx(_,{type:"text",autoComplete:"off",name:"email",placeholder:"Email",component:T})}),e.jsx(M,{asterisk:!0,label:"Contact Number",invalid:s.contactNumber&&o.contactNumber,errorMessage:s.contactNumber,children:e.jsx(_,{onInput:m=>{b(m)},type:"text",autoComplete:"off",name:"contactNumber",placeholder:"Contact Number",component:T})})]}),e.jsx(M,{label:"Position",invalid:s.posistion&&o.posistion,errorMessage:s.posistion,children:e.jsx(_,{name:"posistion",children:({field:m,form:c})=>e.jsx(U,{field:m,form:c,options:j,name:"posistion",onChange:r=>{c.setFieldValue(m.name,r)}})})}),e.jsx(M,{label:"Department",invalid:s.department&&o.department,errorMessage:s.department,children:e.jsx(_,{name:"department",children:({field:m,form:c})=>e.jsx(U,{field:m,form:c,options:p,name:"department",onChange:r=>{c.setFieldValue(m.name,r)}})})}),e.jsx(M,{label:"Preferred Contact Time",invalid:s.preferredContactTime&&o.preferredContactTime,errorMessage:s.preferredContactTime,children:e.jsx(_,{type:"text",autoComplete:"off",name:"preferredContactTime",placeholder:"Preferred Contact Time",component:T})}),e.jsx(M,{label:"Notes",invalid:s.notes&&o.notes,errorMessage:s.notes,children:e.jsx(_,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:T,textArea:!0})}),e.jsx(re,{title:"New Account",isOpen:w,onClose:P,portalClassName:"w30",showBackdrop:!1,children:e.jsx(At,{onDrawerClose:P,isfromDropdown:!0,onContactCreated:z,newContactName:D})}),e.jsx(re,{title:"Edit Account",isOpen:E,onClose:L,portalClassName:"w30",showBackdrop:!1,children:e.jsx(jt,{id:C,onDrawerClose:L})})]})},{useUniqueId:Nt}=Me,pe=Z().matches(ie.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(ie.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",i=>i?!ze(i.trim()):!0),we=oe().shape({firstName:pe.required("First Name Required").max(100,"Maximum 100 characters allowed"),accountId:oe().required("Account Required"),email:Z().matches(/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/,"Invalid email").required("Please enter your email").nullable(),contactNumber:Z().matches(/^[0-9()\-\s]+$/,"Phone must only contain numbers, parentheses, dashes, and spaces").test("is-ten-digits","Please enter valid Contact No",i=>i?i.replace(/[()\-\s]/g,"").length===10:!0).required("Contact Number is required"),preferredContactTime:pe.max(100,"Maximum 100 characters allowed"),notes:pe}),bt=({onDelete:i})=>{const[t,o]=S.useState(!1),s=()=>{o(!0)},u=()=>{o(!1)},n=()=>{i==null||i(o)};return e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(ve,{}),type:"button",onClick:s,children:"Delete"}),e.jsx(ke,{isOpen:t,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:u,onRequestClose:u,onCancel:u,onConfirm:n,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."})})]})},ge=S.forwardRef((i,t)=>{const{type:o,footerWidth:s,initialData:u={id:"",firstName:"",lastName:"",email:"",accountId:null,contactNumber:"",posistion:"",notes:""},onFormSubmit:n,onDiscard:d,onDelete:w}=i,h=Nt("Contact-");return e.jsx(e.Fragment,{children:e.jsx($e,{innerRef:t,initialValues:{...u},validationSchema:we,onSubmit:(D,{setSubmitting:f})=>{const g=D;o==="new"&&(g.id=h),n==null||n(g,f)},children:({values:D,touched:f,errors:g,isSubmitting:l})=>e.jsx(Pe,{children:e.jsxs(Fe,{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(yt,{type:o,touched:f,errors:g})})}),e.jsxs(_e,{className:`px-8 flex items-center justify-between py-4 ${s?`md:${s}`:""}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:o==="edit"&&e.jsx(bt,{onDelete:w})}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(G,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>d==null?void 0:d(),children:"Discard"}),e.jsx(G,{size:"sm",variant:"solid",loading:l,icon:e.jsx(Ve,{}),type:"submit",children:"Save"})]})]})]})})})})});ge.displayName="ContactForm";const wt=i=>{var p,N;const{footerWidth:t,onDrawerClose:o,customerId:s,onContactCreated:u,isfromDropdown:n=!1,newContactName:d="",accountId:w=null,accountName:h="",fetchData:D}=i;le();const f=W();S.useState(!1);const g=async C=>await dt(C),l=()=>{if(Ee("apiCache-contactsData"),D){D();return}f(he({}))},j=async(C,A)=>{var I,y,v,k,$;A(!0);const E={contactName:`${C.firstName} ${C.lastName}`??"",email:C.email??"",contactNumber:C.contactNumber??"",contactPosistion:((I=C.posistion)==null?void 0:I.value)??null,accountId:((y=C.accountId)==null?void 0:y.value)??"",notes:C.notes??"",departmentId:((v=C==null?void 0:C.department)==null?void 0:v.value)??null,preferredContactTime:C.preferredContactTime??""};try{g(E).then(b=>{b.success&&(R.push(e.jsx(B,{title:"Success",type:"success",duration:2500,children:"Contact Successfully Added"}),{placement:"top-center"}),u&&u(b==null?void 0:b.data),l(),o())}).catch(b=>{var V=b.response.data;A(!1),R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:V.message}),{placement:"top-center"})})}catch(b){R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:(($=(k=b==null?void 0:b.response)==null?void 0:k.data)==null?void 0:$.message)||"Something went wrong. please try again!"}),{placement:"top-center"})}},a=()=>{o()};return e.jsx(e.Fragment,{children:e.jsx(ge,{type:"new",footerWidth:t,onFormSubmit:j,onDiscard:a,accountId:w,initialData:n?{id:"",firstName:(p=d==null?void 0:d.split(" "))==null?void 0:p[0],lastName:(N=d==null?void 0:d.split(" "))==null?void 0:N[1],email:"",contactNumber:"",posistion:"",notes:""}:w?{id:"",firstName:"",lastName:"",email:"",accountId:{label:h,value:w},contactNumber:"",posistion:"",notes:""}:void 0})})},De=i=>{var h,D,f,g,l,j;const{data:t,sortedContacts:o,setIsEditModalOpen:s,setEditedId:u}=i,n=((h=o==null?void 0:o.filter(a=>(a==null?void 0:a.value)===(t==null?void 0:t.value)))==null?void 0:h[0])||{},d=W(),w=()=>{var a;u((a=n.desc)==null?void 0:a.id),d(tt(n.desc)),s(!0)};return e.jsxs("div",{className:"card-account relative flex flex-col p-3 rounded-lg bg-gray-100 cursor-pointer mt-2",children:[e.jsx("h4",{className:"font-bold",children:n.label}),e.jsx("div",{className:"flex justify-between space-x-4 mt-2",children:e.jsxs("p",{className:"text-gray-600 w-3/4",children:[e.jsx("strong",{children:"Email:"})," ",(D=n==null?void 0:n.desc)==null?void 0:D.email]})}),e.jsx("div",{className:"absolute top-2 right-2",onClick:()=>{w()},children:e.jsx(Ie,{})}),e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Designation:"})," ",((f=n==null?void 0:n.desc)==null?void 0:f.contactPosistion)??""]}),e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Contact No:"})," ",(g=n==null?void 0:n.desc)==null?void 0:g.contactNumber]})]}),e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Department:"})," ",(l=n==null?void 0:n.desc)==null?void 0:l.department]}),e.jsxs("p",{className:"text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Contact Time:"})," ",(j=n==null?void 0:n.desc)==null?void 0:j.preferredContactTime]})]})]})},Se=i=>{var w,h,D,f,g;const{data:t,innerRef:o,innerProps:s,isSelected:u,setIsEditModalOpen:n,setEditedId:d}=i;return e.jsxs("div",{ref:o,...s,className:"card-account relative flex flex-col p-3 border rounded-lg bg-white border-blue cursor-pointer my-3",children:[u&&e.jsx("div",{className:"absolute top-2 right-2",children:e.jsx(qe,{style:{color:"#F3741C"}})}),e.jsx("h4",{className:"font-bold",children:t.label}),!(t!=null&&t.__isNew__)&&e.jsx("div",{className:"flex justify-between space-x-4 mt-2",children:e.jsxs("p",{className:"text-sm text-gray-600 w-3/4",children:[e.jsx("strong",{children:"Email:"})," ",(w=t==null?void 0:t.desc)==null?void 0:w.email]})}),!(t!=null&&t.__isNew__)&&e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Designation:"})," ",(h=t==null?void 0:t.desc)==null?void 0:h.contactPosistion]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Contact No:"})," ",(D=t==null?void 0:t.desc)==null?void 0:D.contactNumber]})]}),!(t!=null&&t.__isNew__)&&e.jsxs("div",{className:"flex justify-between space-x-4 mt-2",children:[e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Department:"})," ",(f=t==null?void 0:t.desc)==null?void 0:f.department]}),e.jsxs("p",{className:"text-sm text-gray-600 w-1/2",children:[e.jsx("strong",{children:"Contact Time:"})," ",(g=t==null?void 0:t.desc)==null?void 0:g.preferredContactTime]})]})]})};Oe("ContactssData",at);const Dt=i=>{const{id:t,footerWidth:o,onDrawerClose:s}=i,u=W();le();const n=se(a=>a.ContactsData.data.tableData),d=se(a=>{var p,N,C,A,E,I,y,v,k,$,b,V,z,P,L,m,c,r,x,O,F,q,Q,X,H,J,K,Y,ee,Ce;return{...(N=(p=a.ContactsData)==null?void 0:p.data)==null?void 0:N.contact,posistion:{value:(E=(A=(C=a.ContactsData)==null?void 0:C.data)==null?void 0:A.contact)==null?void 0:E.contactPosistionId,label:(v=(y=(I=a.ContactsData)==null?void 0:I.data)==null?void 0:y.contact)==null?void 0:v.contactPosistion},accountId:{value:(b=($=(k=a.ContactsData)==null?void 0:k.data)==null?void 0:$.contact)==null?void 0:b.accountId,label:(P=(z=(V=a.ContactsData)==null?void 0:V.data)==null?void 0:z.contact)==null?void 0:P.accountName},firstName:(x=(r=(c=(m=(L=a.ContactsData)==null?void 0:L.data)==null?void 0:m.contact)==null?void 0:c.contactName)==null?void 0:r.split(" "))==null?void 0:x[0],lastName:(X=(Q=(q=(F=(O=a.ContactsData)==null?void 0:O.data)==null?void 0:F.contact)==null?void 0:q.contactName)==null?void 0:Q.split(" "))==null?void 0:X[1],department:{label:(K=(J=(H=a.ContactsData)==null?void 0:H.data)==null?void 0:J.contact)==null?void 0:K.department,value:(Ce=(ee=(Y=a.ContactsData)==null?void 0:Y.data)==null?void 0:ee.contact)==null?void 0:Ce.departmentId}}});console.log("contactData",d);const w=se(a=>{var p,N;return(N=(p=a.ContactsData)==null?void 0:p.data)==null?void 0:N.loading}),h=a=>{u(st({id:a}))},D=()=>{if(Ee("apiCache-contactsData"),i!=null&&i.fetchData){i==null||i.fetchData();return}u(he({}))},f=async(a,p)=>{var C,A,E,I,y;p(!0);const N={contactName:`${a.firstName} ${a.lastName}`??"",email:a.email??"",contactNumber:a.contactNumber??"",contactPosistion:((C=a.posistion)==null?void 0:C.value)??"",accountId:((A=a.accountId)==null?void 0:A.value)??"",notes:a.notes??"",departmentId:((E=a==null?void 0:a.department)==null?void 0:E.value)??void 0,preferredContactTime:(a==null?void 0:a.preferredContactTime)??""};try{const v=await mt(t,N);p(!1),v&&(j("updated"),D(),s())}catch(v){R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:((y=(I=v==null?void 0:v.response)==null?void 0:I.data)==null?void 0:y.message)||"Something went wrong. please try again!"}),{placement:"top-center"})}},g=()=>{s()},l=async a=>{a(!1),await pt(t)&&(u(he(n)),R.push(e.jsx(B,{title:"Deleted",type:"success",duration:2500,children:"Contact Successfully Deleted"}),{placement:"top-center"}),g())},j=a=>{R.push(e.jsxs(B,{title:"Success",type:"success",duration:2500,children:["Contact Successfully ",a]}),{placement:"top-center"})};return S.useEffect(()=>{h(t)},[t]),e.jsxs(e.Fragment,{children:[e.jsx(Ae,{loading:w,children:!ne(d)&&e.jsx(e.Fragment,{children:e.jsx(ge,{type:"edit",footerWidth:o,initialData:d,onFormSubmit:f,onDiscard:g,onDelete:l})})}),!w&&ne(d)&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(Te,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),e.jsx("h3",{className:"mt-8",children:"No contact found!"})]})]})},St=i=>{var L,m;const t=W(),{touched:o,errors:s,type:u,isCourseEnable:n}=i,{setFieldValue:d}=ue(),w=S.useRef(null),{values:h}=ue(),[D,f]=S.useState(!1),[g,l]=S.useState(""),[j,a]=S.useState(""),[p,N]=S.useState(!1),[C,A]=S.useState(),[E,I]=S.useState([]),y=te(c=>{var r,x,O;return(O=(x=(r=c.AccountsData)==null?void 0:r.data)==null?void 0:x.accountList)==null?void 0:O.map(F=>({value:F.id,label:F.accountName}))}),v=te(c=>{var x,O,F;return(F=(O=(x=c==null?void 0:c.AccountsData)==null?void 0:x.data)==null?void 0:O.contactList)==null?void 0:F.map(q=>({value:q.id,label:q.contactName,desc:q}))}),k=async()=>{var c,r,x;try{const O=await ut();O.success&&I((x=(r=(c=O==null?void 0:O.data)==null?void 0:c.finalResults)==null?void 0:r.$values)==null?void 0:x.map(F=>({label:F==null?void 0:F.title,value:F==null?void 0:F.id})))}catch{I([])}};S.useEffect(()=>{$(),k()},[]);const $=()=>{const c=Ne({});t(c),(y==null?void 0:y.length)==0&&t(ce({}))},b=(c,r)=>{l(c),a(r),f(!0)},V=c=>{f(!1),d(j,{value:c.id,label:c.contactName}),$(),l(""),a("")},z=()=>{f(!1),l(""),a("")};S.useEffect(()=>{const c=()=>{if(window.google&&window.google.maps){const r=new window.google.maps.places.Autocomplete(w.current,{types:["address"],componentRestrictions:{country:"us"}});r.addListener("place_changed",()=>{const x=r.getPlace();if(x.geometry){const{lat:F,lng:q}=x.geometry.location;d("latitude",F()),d("longitude",q())}let O={};x.address_components.forEach(F=>{const q=F.types;q.includes("locality")?O.city=F.long_name:q.includes("administrative_area_level_1")?O.state=F.short_name:q.includes("postal_code")&&(O.zipcode=F.long_name)}),d("address",x.name),d("city",O.city||""),d("state",O.state||""),d("zip",O.zipcode||"")})}};if(window.google&&window.google.maps)c();else{const r=setInterval(()=>{window.google&&window.google.maps&&(c(),clearInterval(r))},500)}},[i]);const P=()=>{A(null),N(!1),t(Ne({}))};return e.jsxs(Le,{className:"mb-4",children:[e.jsx(M,{asterisk:!0,label:"Name",invalid:s.accountName&&o.accountName,errorMessage:s.accountName,children:e.jsx(_,{type:"text",autoComplete:"off",name:"accountName",placeholder:"Account Name",component:T})}),e.jsx(M,{label:"Parent Account",invalid:s.parentAccountId&&o.parentAccountId,errorMessage:s.parentAccountId,children:e.jsx(_,{name:"parentAccountId",children:({field:c,form:r})=>e.jsx(U,{field:c,form:r,options:y,name:"parentAccountId",onChange:x=>{r.setFieldValue(c.name,x)}})})}),e.jsx(M,{label:"Address",invalid:s.address&&o.address,errorMessage:s.address,children:e.jsx(_,{name:"address",children:({field:c})=>e.jsx(T,{...c,ref:w,placeholder:"Address"})})}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4 py-1",children:[e.jsx(M,{label:"City",invalid:s.city&&o.city,errorMessage:s.city,children:e.jsx(_,{type:"text",autoComplete:"off",name:"city",placeholder:"City",component:T})}),e.jsx(M,{label:"State",invalid:s.state&&o.state,errorMessage:s.state,children:e.jsx(_,{type:"text",autoComplete:"off",name:"state",placeholder:"State",component:T})}),e.jsx(M,{label:"Zip",invalid:s.zip&&o.zip,errorMessage:s.zip,children:e.jsx(_,{type:"text",autoComplete:"off",name:"zip",placeholder:"Zip",component:T})})]}),e.jsxs(M,{label:"Primary Contact",invalid:s.primaryContact&&o.primaryContact,errorMessage:s.primaryContact,children:[e.jsx(_,{name:"primaryContact",children:({field:c,form:r})=>e.jsx(U,{field:c,form:r,options:v,name:"primaryContact",components:{DropdownIndicator:null,IndicatorSeparator:null,Option:Se},componentAs:xe,onCreateOption:x=>b(x,"primaryContact"),onChange:x=>{r.setFieldValue(c.name,x)},styles:{input:x=>({...x,color:"black"})}})}),((L=h==null?void 0:h.primaryContact)==null?void 0:L.value)&&e.jsx(De,{data:h==null?void 0:h.primaryContact,sortedContacts:v,setIsEditModalOpen:N,setEditedId:A})]}),e.jsxs(M,{label:"Billing Contact",invalid:s.billingContact&&o.billingContact,errorMessage:s.billingContact,children:[e.jsx(_,{name:"billingContact",children:({field:c,form:r})=>e.jsx(U,{field:c,form:r,options:v,name:"billingContact",componentAs:xe,components:{DropdownIndicator:null,IndicatorSeparator:null,Option:Se},onCreateOption:x=>b(x,"billingContact"),onChange:x=>{r.setFieldValue(c.name,x)},styles:{input:x=>({...x,color:"black"})}})}),((m=h==null?void 0:h.billingContact)==null?void 0:m.value)&&e.jsx(De,{data:h==null?void 0:h.billingContact,sortedContacts:v,setIsEditModalOpen:N,setEditedId:A})]}),e.jsx(M,{label:"Website",invalid:s.website&&o.website,errorMessage:s.website,children:e.jsx(_,{type:"text",autoComplete:"off",name:"website",placeholder:"Website",component:T})}),e.jsx(M,{label:"Industry",invalid:s.industry&&o.industry,errorMessage:s.industry,children:e.jsx(_,{type:"text",autoComplete:"off",name:"industry",placeholder:"Industry",component:T})}),e.jsx(M,{label:"No of Employees",invalid:s.noOfEmployees&&o.noOfEmployees,errorMessage:s.noOfEmployees,children:e.jsx(_,{type:"number",autoComplete:"off",name:"noOfEmployees",placeholder:"No of Employees",component:T})}),n&&e.jsx(M,{label:"Course",asterisk:!0,invalid:s.courseId&&o.courseId,errorMessage:s.courseId,children:e.jsx(_,{name:"courseId",children:({field:c,form:r})=>e.jsx(U,{field:c,form:r,options:E,name:"courseId",onChange:x=>{r.setFieldValue(c.name,x)}})})}),e.jsx(M,{label:"Notes",invalid:s.notes&&o.notes,errorMessage:s.notes,children:e.jsx(_,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:T,textArea:!0})}),e.jsx(re,{title:"New Contact",isOpen:D,onClose:z,onRequestClose:z,portalClassName:"w30",showBackdrop:!1,children:e.jsx(wt,{onDrawerClose:z,isfromDropdown:!0,onContactCreated:V,newContactName:g})}),e.jsx(re,{title:"Edit Contact",isOpen:p,onClose:P,onRequestClose:P,portalClassName:"w30",showBackdrop:!1,children:e.jsx(Dt,{id:C,onDrawerClose:P})})]})},{useUniqueId:It}=Me,ae=Z().matches(ie.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(ie.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",i=>i?!ze(i.trim()):!0),Ot=({onDelete:i})=>{const[t,o]=S.useState(!1),s=()=>{o(!0)},u=()=>{o(!1)},n=()=>{i==null||i(o)};return e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(ve,{}),type:"button",onClick:s,children:"Delete"}),e.jsx(ke,{isOpen:t,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:u,onRequestClose:u,onCancel:u,onConfirm:n,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."})})]})},fe=S.forwardRef((i,t)=>{const{type:o,footerWidth:s,initialData:u={id:"",accountName:"",parentAccountId:"",address:"",city:"",state:"",zip:"",primaryContact:"",billingContact:"",notes:"",courseId:null},onFormSubmit:n,onDiscard:d,onDelete:w}=i,{isCourseEnable:h}=Qe(g=>g==null?void 0:g.theme),D=oe().shape({accountName:ae.required("Account name Required").max(200,"Maximum 200 characters allowed"),website:ae.max(100,"Maximum 100 characters allowed"),industry:ae.max(100,"Maximum 100 characters allowed"),noOfEmployees:ae.max(100,"Maximum 100 characters allowed"),courseId:Xe(()=>h?oe({value:Z().required("Course is required"),label:Z().required()}).required("Course is required"):He().nullable(!0))}),f=It("Lead-");return e.jsx(e.Fragment,{children:e.jsx($e,{innerRef:t,initialValues:{...u},validationSchema:D,onSubmit:(g,{setSubmitting:l})=>{const j=g;o==="new"&&(j.id=f),n==null||n(j,l)},children:({values:g,touched:l,errors:j,isSubmitting:a})=>e.jsx(Pe,{children:e.jsxs(Fe,{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(St,{type:o,touched:l,errors:j,isCourseEnable:h})})}),e.jsxs(_e,{className:`px-8 flex items-center justify-between py-4 ${s?`md:${s}`:""}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:o==="edit"&&e.jsx(Ot,{onDelete:w})}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(G,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>d==null?void 0:d(),children:"Discard"}),e.jsx(G,{size:"sm",variant:"solid",loading:a,icon:e.jsx(Ve,{}),type:"submit",children:"Save"})]})]})]})})})})});fe.displayName="AccountForm";const At=i=>{const{onDrawerClose:t,footerWidth:o,customerId:s,onContactCreated:u,isfromDropdown:n=!1,newContactName:d=""}=i;le();const w=W();S.useState(!1);const h=async l=>await rt(l),D=()=>{const l="apiCache-accountsData-";Object.keys(localStorage).forEach(j=>{j.startsWith(l)&&localStorage.removeItem(j)}),w(ce({}))},f=async(l,j)=>{var p,N,C,A,E,I;j(!0);const a={accountName:l.accountName??"",parentAccount:((p=l.parentAccountId)==null?void 0:p.value)??void 0,address:l.address??"",city:l.city??"",state:l.state??"",zip:l.zip??"",primaryContact:((N=l.primaryContact)==null?void 0:N.value)??void 0,billingContact:((C=l.billingContact)==null?void 0:C.value)??void 0,notes:l.notes??"",website:l.website??"",noOfEmployees:l.noOfEmployees?String(l.noOfEmployees):"",industry:l.industry??"",latitude:(l==null?void 0:l.latitude)??null,longitude:(l==null?void 0:l.longitude)??null,courseId:((A=l==null?void 0:l.courseId)==null?void 0:A.value)??null};try{h(a).then(y=>{y.success&&(R.push(e.jsx(B,{title:"Success",type:"success",duration:2500,children:"Account Successfully Added"}),{placement:"top-center"}),u&&u(y==null?void 0:y.data),D(),t())}).catch(y=>{var v=y.response.data;j(!1),R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:v.message}),{placement:"top-center"})})}catch(y){R.push(e.jsx(B,{title:"Error",type:"danger",duration:2500,children:((I=(E=y==null?void 0:y.response)==null?void 0:E.data)==null?void 0:I.message)||"Something went wrong. please try again!"}),{placement:"top-center"})}},g=()=>{t()};return e.jsx(e.Fragment,{children:e.jsx(fe,{type:"new",footerWidth:o,onFormSubmit:f,onDiscard:g,initialData:n?{id:"",accountName:d,parentAccountId:"",address:"",city:"",state:"",zip:"",primaryContact:"",billingContact:"",notes:""}:void 0})})};export{At as A,xe as C,jt as E,wt as a,Dt as b,Se as c,De as d,Ct as e,ft as f};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{c as m,i as y,a as f,F as g,b as v,d as n,E as S}from"./index.esm-b2d342b5.js";import{r as q,a0 as k,B as u}from"./index-3b5ce20a.js";import{U as I}from"./Upload-be937eb6.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./vendor-react-ece1c85f.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import{u as A}from"./index-52963879.js";import{S as E}from"./StickyFooter-3e569b80.js";const x=1,U=m({files:y().min(1,"Please upload at least one file").required("File upload is required"),fileName:f().required("File Name is required")}),C=m({files:y().min(1,"Please upload at least one file").required("File upload is required"),fileName:f().required("File Name is required"),opportunityId:m().required("Opportunity is required")}),Y=({initialData:h={files:[]},footerWidth:d,onSubmit:j,onCancel:N,accountId:c=null})=>{const b=A(t=>{var a,o,i;return(i=(o=(a=t==null?void 0:t.opportunity)==null?void 0:a.data)==null?void 0:o.opportunityList)==null?void 0:i.map(s=>({value:s.id,label:s.opportunityName}))}),F=(t,r)=>{let a=!0;const o=5242880;if(r.length>=x)return`You can only upload ${x} file(s)`;if(t)for(const i of t)i.size>=o&&(a="Upload file cannot more then 5 MB!");return a};return e.jsx(g,{initialValues:h,footerWidth:d,validationSchema:c?C:U,onSubmit:(t,{setSubmitting:r})=>{j(t,r)},children:({values:t,touched:r,errors:a,isSubmitting:o})=>e.jsx(v,{children:e.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[e.jsxs("div",{children:[c&&e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Opportunity"}),e.jsx(n,{name:"opportunityId",children:({field:i,form:s})=>e.jsx(q,{field:i,form:s,options:b,name:"opportunityId",placeholder:"Select Opportunity",onChange:l=>{s.setFieldValue(i.name,l)}})}),a.opportunityId&&r.opportunityId&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:a.opportunityId})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Upload File"}),e.jsx(n,{name:"files",children:({field:i,form:s})=>e.jsx(I,{draggable:!0,beforeUpload:F,fileList:t.files||[],cropNeeded:!1,onChange:l=>{var p;s.setFieldValue(i.name,l),s.setFieldValue("fileName",(p=l==null?void 0:l[0])==null?void 0:p.name)},onFileRemove:l=>s.setFieldValue(i.name,l)})}),a.files&&r.files&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:a.files})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"File Name"}),e.jsx(n,{name:"fileName",children:({field:i})=>e.jsx(k,{...i,placeholder:"File Name"})}),e.jsx(S,{name:"fileName",component:"div",className:"text-red-600"})]})]}),e.jsx(E,{className:`px-8 flex items-center justify-between py-4 ${d}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(u,{type:"button",size:"sm",className:"mr-2",onClick:N,children:"Cancel"}),e.jsx(u,{size:"sm",variant:"solid",type:"submit",loading:o,children:"Save"})]})})]})})})};export{Y as A};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{_ as Y,r as Z,a0 as j,B as z,k as ee,E as $,F as H}from"./index-3b5ce20a.js";import{r as f,f as ae}from"./vendor-react-ece1c85f.js";import{a as p,F as ne}from"./FormContainer-9a52b9e8.js";import{h as te}from"./index-b0ef7ac3.js";import{S as se}from"./StickyFooter-3e569b80.js";import{u as ie,d as u,c as M,h as re,a as O,F as oe,b as le}from"./index.esm-b2d342b5.js";import{A as ce}from"./AdaptableCard-3d1e1f96.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import{U as K}from"./Upload-be937eb6.js";import{F as P}from"./index-533fd007.js";import{p as _}from"./Notify-8fb74d48.js";import{c as G,a as de}from"./index-0b08ce18.js";import{b as R,c as me,a as pe}from"./vendor-redux-a1f00e6b.js";import{b as ge}from"./CompanyService-491a9cc1.js";const T="TranslationData",J=R(`${T}/getScreen`,async()=>{}),k=R(`${T}/getAllTranslations`,async()=>{}),Q=R(T+"/getCompanyDetails",async t=>(await ge(t.id)).data),xe={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},he={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:xe,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},ScreenList:[],TranslationList:[]},W=me({name:`${T}`,initialState:he,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(J.fulfilled,(a,s)=>{var l;a.ScreenList=(l=s.payload)==null?void 0:l.$values,a.loading=!1}).addCase(J.pending,a=>{a.loading=!0}).addCase(k.fulfilled,(a,s)=>{var l;a.TranslationList=(l=s.payload)==null?void 0:l.$values,a.loading=!1}).addCase(k.pending,a=>{a.loading=!0}).addCase(k.rejected,(a,s)=>{a.TranslationList=[],a.loading=!1}).addCase(Q.fulfilled,(a,s)=>{a.company=s.payload,a.loading=!1}).addCase(Q.pending,a=>{a.loading=!0})}}),{setTableData:He,setFilterData:Me,toggleDeleteConfirmation:Oe,setSelectedRowData:Ke}=W.actions,ue=W.reducer,Pe=pe({data:ue}),_e=Y,fe=({touched:t,errors:a,isEdit:s,isBannerNeeded:l,isIconNeeded:x,isRedirectionNeeded:h})=>{var S,F,n;const[y,I]=f.useState([]),[C,w]=f.useState(!1),{values:d,setFieldValue:r}=ie();f.useEffect(()=>{},[]);const g=m=>{const o=m[0];if(!o)return;const i=URL.createObjectURL(o),c=new Image;c.onload=()=>{const b=c.width/c.height;if(b<1.9||b>2.1){_("Please use a landscape image with ~2:1 aspect ratio (800×400px or ideally 1200×600px).","Invalid Banner Image","warning",4500),URL.revokeObjectURL(i);return}r("bannerImage",i),r("bannerFile",o)},c.src=i},D=m=>{const o=m[0];if(!o)return;const i=URL.createObjectURL(o),c=new Image;c.onload=()=>{if(c.width!==210||c.height!==210){_("Icon image must be exactly 210×210 px for best clarity.","Invalid Icon Image","warning",4500),URL.revokeObjectURL(i);return}r("iconImage",i),r("iconFile",o)},c.src=i};return e.jsxs(ce,{className:"mb-6",children:[e.jsx("div",{className:"mb-5",children:e.jsx(p,{asterisk:!0,label:"Mobile Screen",invalid:a.screen&&t.screen,errorMessage:a.screen,children:e.jsx(u,{name:"screen",children:({field:m,form:o})=>e.jsx(Z,{field:m,form:o,options:y.map(i=>({value:i.id,label:i.screenName})),isLoading:C,name:"screen",placeholder:"Select a Screen",onChange:i=>{o.setFieldValue(m.name,i)}})})})}),e.jsx("div",{className:"mb-5",children:e.jsx(p,{label:"Translation Key",asterisk:!0,invalid:a.key&&t.key,errorMessage:a.key,children:e.jsx(u,{type:"text",disabled:s,autoComplete:"off",name:"key",placeholder:"e.g., Login.Header.Title",component:j})})}),e.jsx("h4",{className:"font-semibold mt-6 mb-4",children:"Base Language - English"}),e.jsx(p,{asterisk:!0,label:"Text (English)",invalid:((S=a.en)==null?void 0:S.name)&&((F=t.en)==null?void 0:F.name),errorMessage:(n=a.en)==null?void 0:n.name,children:e.jsx(u,{type:"text",autoComplete:"off",name:"en.name",placeholder:"Enter text in English",component:j})}),e.jsx("h4",{className:"font-semibold mt-6 mb-2",children:"Translations"}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium",children:"Español"}),e.jsx(p,{label:"Text",children:e.jsx(u,{type:"text",name:"es.name",placeholder:"Texto en español",component:j})})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium",children:"Tiếng Việt"}),e.jsx(p,{label:"Text",children:e.jsx(u,{type:"text",name:"vi.name",placeholder:"Văn bản tiếng Việt",component:j})})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium",children:"中文"}),e.jsx(p,{label:"Text",children:e.jsx(u,{type:"text",name:"zh.name",placeholder:"中文文本",component:j})})]}),l&&e.jsx("div",{className:"mt-6",children:e.jsxs(p,{label:"Banner Image (2:1 Aspect)",children:[d.bannerImage&&e.jsxs("div",{className:"relative mt-4 max-w-[600px] mx-auto mb-2",children:[e.jsx("img",{src:d.bannerImage,alt:"Banner Preview",className:"w-full rounded-lg border shadow-md object-contain"}),e.jsx("button",{type:"button",className:"absolute top-2 right-2 bg-white rounded-full p-1 shadow",onClick:()=>{r("bannerImage",""),r("bannerFile",null)},children:e.jsx(G,{className:"text-red-500 text-xl"})})]}),e.jsx(K,{draggable:!0,accept:"image/*",onChange:g,cropNeeded:!1,children:e.jsxs("div",{className:"my-10 text-center",children:[e.jsx("div",{className:"text-5xl mb-3 flex justify-center",children:e.jsx(P,{})}),e.jsx("p",{className:"font-semibold",children:"Drop banner image here or browse"}),e.jsx("p",{className:"mt-1 opacity-60",children:"Recommended: 800×400 px (2×), ideally 1200×600 px (3×)"})]})})]})}),x&&e.jsx("div",{className:"mt-6",children:e.jsxs(p,{label:"Icon Image (210×210)",children:[d.iconImage&&e.jsxs("div",{className:"relative mt-4 w-[210px] mx-auto mb-2",children:[e.jsx("img",{src:d.iconImage,alt:"Icon Preview",className:"rounded border"}),e.jsx("button",{type:"button",className:"absolute top-2 right-2 bg-white rounded-full p-1 shadow",onClick:()=>{r("iconImage",""),r("iconFile",null)},children:e.jsx(G,{className:"text-red-500 text-xl"})})]}),e.jsx(K,{draggable:!0,accept:"image/*",onChange:D,cropNeeded:!1,children:e.jsxs("div",{className:"my-10 text-center",children:[e.jsx("div",{className:"text-5xl mb-3 flex justify-center",children:e.jsx(P,{})}),e.jsx("p",{className:"font-semibold",children:"Drop icon image here or browse"}),e.jsx("p",{className:"mt-1 opacity-60",children:"Required: 210×210 px"})]})})]})}),h&&e.jsx("div",{className:"mt-6",children:e.jsx(p,{label:"Redirection URL",invalid:a.redirectionUrl&&t.redirectionUrl,errorMessage:a.redirectionUrl,children:e.jsx(u,{type:"text",name:"redirectionUrl",placeholder:"https://example.com/target-page",component:j})})})]})},{useUniqueId:be}=te,je=M().shape({screen:re().required("Screen is Required"),key:O().required("Translation key is required"),en:M().shape({name:O().required("English text is required")})}),X=f.forwardRef((t,a)=>{const{type:s,initialData:l={id:"",screen:"",key:"",en:{name:""},es:{name:""},vi:{name:""},zh:{name:""},bannerImage:"",iconImage:"",redirectionUrl:"",bannerFile:null,iconFile:null},onFormSubmit:x,onDiscard:h,isBannerNeeded:y,isIconNeeded:I,isRedirectionNeeded:C}=t,w=be("CAT-");return e.jsx(oe,{innerRef:a,enableReinitialize:!0,initialValues:{...l},validationSchema:je,onSubmit:(d,{setSubmitting:r})=>{const g={...d};s==="new"&&(g.id=w),x==null||x(g,r)},children:({touched:d,errors:r,isSubmitting:g})=>e.jsx(le,{children:e.jsxs(ne,{children:[e.jsx(fe,{touched:d,errors:r,isEdit:s!=="new",isBannerNeeded:y,isIconNeeded:I,isRedirectionNeeded:C}),e.jsxs(se,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(z,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>h==null?void 0:h(),children:"Discard"}),e.jsx(z,{size:"sm",variant:"solid",loading:g,icon:e.jsx(de,{}),type:"submit",children:"Save"})]})]})})})});X.displayName="TranslationForm";const Ge=t=>{const{onDrawerClose:a,categoryId:s,fetchData:l,isBannerNeeded:x=!1,isIconNeeded:h=!1,isRedirectionNeeded:y=!1}=t;ae(),ee(),f.useState(!1);const[I,C]=f.useState(null),[w,d]=f.useState(!1),r=async n=>{},g=async n=>{},D=()=>{l()},S=async(n,m)=>{var L,A,E,v,B,V;m(!0);const o=["Home.Header.Slider1.Title","Home.Header.Slider2.Title","Home.Header.Slider3.Title"],i=((L=n==null?void 0:n.key)==null?void 0:L.toString().trim())||"",c=o.some(N=>N.toLowerCase()===i.toLowerCase());let b;c?(console.log("Using banner image"),b=n.bannerFile?[n.bannerFile]:n.bannerImage?[{fileUrl:n.bannerImage}]:void 0):(console.log("Using icon image"),b=n.iconFile?[n.iconFile]:n.iconImage?[{fileUrl:n.iconImage}]:void 0),(A=n==null?void 0:n.screen)==null||A.value,(E=n.en)==null||E.name,(v=n.es)==null||v.name,(B=n.vi)==null||B.name,(V=n.zh)==null||V.name,n==null||n.redirectionUrl,n!=null&&n.redirectionUrl,(s?g:r)().then(N=>{N.success&&($.push(e.jsxs(H,{title:"Success",type:"success",duration:2500,children:["Translation ",s?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),D(),a())}).catch(N=>{var q;m(!1);const U=(q=N.response)==null?void 0:q.data;$.push(e.jsx(H,{title:"Error",type:"danger",duration:2500,children:(U==null?void 0:U.message)||"Something went wrong"}),{placement:"top-center"})})},F=()=>{a()};return s&&w?e.jsx("div",{className:"p-6",children:"Loading Translation details..."}):e.jsx(X,{type:s?"edit":"new",initialData:I,onFormSubmit:S,onDiscard:F,isBannerNeeded:x,isIconNeeded:h,isRedirectionNeeded:y})};export{Ge as A,Pe as r,Ke as s,Oe as t,_e as u};
@@ -0,0 +1 @@
1
+ import{j as s,l as G}from"./vendor-mui-98daa63f.js";import{A as k}from"./AdaptableCard-3d1e1f96.js";import{P as Q}from"./PageBreadcrumb-cf54a6e9.js";import{r as t,f as J}from"./vendor-react-ece1c85f.js";import{b as P,c as K,a as U}from"./vendor-redux-a1f00e6b.js";import{e as W}from"./TimeLogService-83166cbc.js";import{dS as X,_ as Y,k as M,ai as I,B as x,D as Z,l as ee}from"./index-3b5ce20a.js";import{D as te}from"./tableV2-99c808c0.js";import{D as ae}from"./Drawer-4f97e662.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as N}from"./index-a14e51de.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.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"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";async function se(a){return(await X.apiV10AIAPILogGetAllAILogsPost(a)).data}const F="AiApiLogData",S=P(`${F}/getAiApiLoData`,async a=>{var c,i;const e=await se({fromDate:(c=a==null?void 0:a.filterData)==null?void 0:c.fromDate,toDate:(i=a==null?void 0:a.filterData)==null?void 0:i.toDate});console.log("response",e);const r=e.data.$values.map(n=>({...n,fullName:`${n.firstName} ${n.lastName}`}));return console.log("resData",r),r}),R=P(F+"/getTimeLogDetails",async a=>(console.log("getTimeLogDetails"),(await W(a.id)).data)),oe={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},ie={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:oe,filterData:{fromDate:void 0,toDate:void 0},AiApiLogList:[],TimeLogList:[]},O=K({name:`${F}`,initialState:ie,reducers:{setTableData:(a,e)=>{a.tableData=e.payload},setFilterData:(a,e)=>{a.filterData=e.payload},toggleDeleteConfirmation:(a,e)=>{a.deleteConfirmation=e.payload},setSelectedRowData:(a,e)=>{a.selectedRowData=e.payload}},extraReducers:a=>{a.addCase(S.fulfilled,(e,r)=>{e.AiApiLogList=r.payload,e.tableData.total=r.payload.length,e.loading=!1}).addCase(S.pending,e=>{e.loading=!0}).addCase(R.fulfilled,(e,r)=>{e.TimeLogData=r.payload,e.loading=!1}).addCase(R.pending,e=>{e.loading=!0})}}),{setTableData:Be,setFilterData:T,toggleDeleteConfirmation:$e,setSelectedRowData:He}=O.actions,le=O.reducer,re=U({data:le}),f=Y,ne=({onSaveClick:a,onCancel:e,onClearFilers:r})=>s.jsxs("div",{className:"text-right w-full",children:[s.jsx(x,{size:"sm",className:"mr-2",onClick:r,children:"Clear All"}),s.jsx(x,{size:"sm",className:"mr-2",onClick:e,children:"Cancel"}),s.jsx(x,{size:"sm",variant:"solid",onClick:a,children:"Query"})]}),ce=a=>{const e=M(),[r,c]=t.useState(!1),i=f(l=>l.AiApiLogData.data.filterData),[n,d]=t.useState(i==null?void 0:i.fromDate),[D,C]=t.useState(i==null?void 0:i.toDate);t.useState([]);const m=()=>{c(!1),a.onClose()},u=()=>{e(T({fromDate:"",toDate:""})),d(""),C("")},y=()=>{a.onClose(),c(!1),e(T({fromDate:n,toDate:D}))};return t.useEffect(()=>{a.isOpen&&c(!0)},[a.isOpen]),t.useEffect(()=>{var l,A;((l=i==null?void 0:i.toDate)==null?void 0:l.value)===""&&d(""),((A=i==null?void 0:i.toDate)==null?void 0:A.value)===""&&d("")},[i]),s.jsx(s.Fragment,{children:s.jsxs(ae,{title:"Advanced Filter Selection Page",isOpen:r,portalClassName:"w30",footer:s.jsx(ne,{onCancel:m,onSaveClick:y,onClearFilers:u}),onClose:m,onRequestClose:m,children:[s.jsxs("div",{className:"mb-5",children:[s.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:s.jsx("h5",{children:"From Date"})}),s.jsx(N,{field:"",placeholder:"Pick a From Date",onChange:l=>{console.log(l,"From Date"),d(l?I(l).format("yyyy-MM-DD"):void 0)},value:n})]}),s.jsxs("div",{className:"mb-5",children:[s.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:s.jsx("h5",{children:"To Date"})}),s.jsx(N,{field:"",placeholder:"Pick a TO Date",onChange:l=>{console.log(l,"To Date"),C(l?I(l).format("yyyy-MM-DD"):void 0)},value:D})]})]})})},de=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],me=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],ue=["nextColumn","widget"];Z("AiApiLogData",re);const Ve=()=>{const[a,e]=t.useState([]),[r,c]=t.useState(!1);t.useState(!1),t.useState(!1),t.useState(!1),t.useState(),t.useState();const[i,n]=t.useState(!0),[d,D]=t.useState(!0),[C,m]=t.useState(de[0].key),u=t.useRef(null);t.useState(ue[0]),t.useState(me[1].key),t.useState(!0),t.useState(!0),t.useState(!0),t.useState(!0);const[y,l]=t.useState(!1);J();const A=()=>{l(!0)},z=()=>{l(!1)},q=M(),L=f(o=>{var p,g;return(g=(p=o==null?void 0:o.AiApiLogData)==null?void 0:p.data)==null?void 0:g.filterData}),b=f(o=>{var p,g;return(g=(p=o==null?void 0:o.AiApiLogData)==null?void 0:p.data)==null?void 0:g.loading}),E=f(o=>o.AiApiLogData.data.AiApiLogList);ee();const{pageIndex:w,pageSize:j,sort:v,query:B,total:pe}=f(o=>o.AiApiLogData.data.tableData);t.useEffect(()=>{$()},[w,j,v,r,L]);const $=()=>{const o=S({pageIndex:w,pageSize:j,sort:v,filterData:L,query:B});q(o)},h=t.useCallback(()=>{var o;(o=u==null?void 0:u.current)==null||o.instance().clearFilter()},[]);t.useCallback(o=>{n(o.value),h()},[h]),t.useCallback(o=>{D(o.value),h()},[h]),t.useCallback(o=>{m(o.value)},[]);const[H,V]=t.useState({pageSize:"",pageIndex:""}),_=[{dataField:"fullName",caption:"Name",width:"200"},{dataField:"email",caption:"Email",width:"200"},{dataField:"type",caption:"Type",width:"200"},{dataField:"callFrom",caption:"Called From",width:"200"},{dataField:"openAIRequest",caption:"Open AIRequest",width:"30%",cssClass:"truncate-cell"},{dataField:"ipAddress",caption:"Ip Address",width:"150"},{dataField:"callDateAndTime",caption:"Created Date",width:"240",dataType:"datetime",format:"MM/dd/yyyy HH:mm:ss a"}];return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[s.jsx(Q,{items:[{label:"Build"},{label:"AI API Logs"}]}),s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Azure AI Api Logs"})})]}),b&&s.jsx(G,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),s.jsx(k,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:s.jsx(k,{className:"borderless",children:s.jsx(te,{columns:_,tableName:"AI-logs",data:E||[],height:"calc(100vh - 320px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:e,isSelectionReq:!1,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"app-key-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:H,setPager:V,isPaginationReq:!0,openFilter:A,isFilterReq:!0,isLoading:b})})}),s.jsx(ce,{isOpen:y,onClose:z})]})};export{Ve as default};
@@ -0,0 +1 @@
1
+ import{j as a}from"./vendor-mui-98daa63f.js";import{D as A,k as D,E as S,F as E,g as $,G as n,H as v,I as w}from"./index-3b5ce20a.js";import{r}from"./vendor-react-ece1c85f.js";import{u as l,C as I,M,r as P,h as R,t as m,a as k}from"./MessageInput-07fcc5cb.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-88c52b97.js";import"./useDeviceCheck-920641a5.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./useControllableState-d0909575.js";import"./index-a14e51de.js";import"./useDidUpdate-de319a18.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import"./BrainServices-4cb93af5.js";import"./index-00a8eb64.js";const d="/img/logo/";A("aiChat",P);const ia=g=>{const t=D(),c=l(s=>s.aiChat.data.error),h=l(s=>s.aiChat.data.isChatDialog);l(s=>s.aiChat.data);const[f,u]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await w.get("https://api.ipify.org?format=json");u(e.data.ip),console.log("response.data.ip",e.data.ip)}catch(e){console.error(e)}})()},[]);const C=()=>{t(R({file:"",fileName:"",fileType:""})),t(m(!0))},p=()=>{t(m(!1))};r.useEffect(()=>{c&&S.push(a.jsx(E,{title:"Error",type:"danger",duration:2500,children:"Something went wrong. Please try again later."}),{placement:"top-center"})},[c]);const x=s=>{t(k({message:s,ipAddress:f}))},{type:F="full",mode:o="light",className:j,imgClass:i,style:N,logoWidth:y="auto"}=g;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:$("aica",j),style:{...N,width:y},onClick:()=>C(),children:a.jsx("img",{className:i,src:`${d}aica.svg`,alt:`${n} logo`,style:{fill:`${o}`}})}),a.jsx(v,{isOpen:h,portalClassName:"aica-dialog",contentClassName:"h-auto p-0",closable:!1,onClose:p,onRequestClose:p,children:a.jsxs("div",{className:"p-4",children:[a.jsx("div",{className:"aica-m-logo",children:a.jsx("img",{style:{fill:`${o}`},className:i,src:`${d}aica.svg`,alt:`${n} logo`})}),a.jsx(I,{mode:o,imgClass:i}),a.jsx(M,{onSendMessage:x})]})})]})};export{ia as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./vendor-mui-98daa63f.js";import{r as x}from"./vendor-react-ece1c85f.js";import{bJ as D,g as P,bu as v,bK as A,ah as E,m as I,bL as R,bM as Y,bN as M}from"./index-3b5ce20a.js";const m="warning",S={success:{backgroundColor:"bg-emerald-50 dark:bg-emerald-500",titleColor:"text-emerald-700 dark:text-emerald-50",textColor:"text-emerald-500 dark:text-emerald-50",iconColor:"text-emerald-400 dark:text-emerald-50",icon:e.jsx(I,{})},info:{backgroundColor:"bg-blue-50 dark:bg-blue-500",titleColor:"text-blue-700 dark:text-blue-100",textColor:"text-blue-500 dark:text-blue-100",iconColor:"text-blue-400 dark:text-blue-100",icon:e.jsx(R,{})},warning:{backgroundColor:"bg-yellow-50 dark:bg-yellow-500",titleColor:"text-yellow-700 dark:text-yellow-50",textColor:"text-yellow-500 dark:text-yellow-50",iconColor:"text-yellow-400 dark:text-yellow-50",icon:e.jsx(Y,{})},danger:{backgroundColor:"bg-red-50 dark:bg-red-500",titleColor:"text-red-700 dark:text-red-100",textColor:"text-red-500 dark:text-red-100",iconColor:"text-red-400 dark:text-red-100",icon:e.jsx(M,{})}},_=["success","danger","info","warning"],B=x.forwardRef((s,b)=>{const{children:C,className:g,closable:a=!1,customClose:y,customIcon:f,duration:n=3e3,title:o=null,onClose:r,rounded:k=!0,showIcon:i=!1,triggerByToast:p=!1,...w}=s,d=(()=>{const{type:t=m}=s;return _.includes(t)?t:m})(),l=S[d],[c,u]=x.useState("show"),{clear:h}=D(r,n,n>0),j=t=>{u("hiding"),r==null||r(t),h(),p||setTimeout(()=>{u("hide")},400)},N=()=>e.jsx("div",{className:"cursor-pointer",role:"presentation",onClick:t=>j(t),children:y||e.jsx(E,{defaultStyle:!1})}),T=P("alert","p-4 relative flex",l.backgroundColor,l.textColor,o?"":"font-semibold",a?"justify-between":"",a&&!o?"items-center":"",k&&"rounded-lg",g);return c==="hide"?null:e.jsxs(v.div,{ref:b,className:T,initial:{opacity:1},animate:c==="hiding"?"exit":"animate",transition:{duration:.25,type:"tween"},variants:{animate:{opacity:1},exit:{opacity:0}},...w,children:[e.jsxs("div",{className:`flex ${o?"":"items-center"}`,children:[i&&e.jsx(A,{iconColor:l.iconColor,custom:f,type:d}),e.jsxs("div",{className:i?"ltr:ml-2 rtl:mr-2":"",children:[o?e.jsx("div",{className:`font-semibold mb-1 ${l.titleColor}`,children:o}):null,C]})]}),a?N():null]})});B.displayName="Alert";export{B as A};
@@ -0,0 +1 @@
1
+ import{c0 as a}from"./index-3b5ce20a.js";const o={fetchData(r){return new Promise((t,c)=>{a(r).then(e=>{t(e)}).catch(e=>{c(e)})})}};export{o as A};