@emintech/core 0.8.2 → 0.8.3

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 (257) hide show
  1. package/dist/{chunk-2IY27GNO.js → chunk-2W4V6OS5.js} +1 -1
  2. package/dist/{chunk-I3QZZ3J3.js → chunk-4DHRTWA7.js} +1 -1
  3. package/dist/{chunk-7HSVB2YB.js → chunk-4UKWXJLU.js} +1 -1
  4. package/dist/{chunk-VCEGD5BK.js → chunk-5LM3XDOP.js} +1 -1
  5. package/dist/{chunk-257CHURF.js → chunk-6BJXU7MN.js} +1 -1
  6. package/dist/{chunk-HKP7JVJ5.js → chunk-ACROI5E7.js} +1 -1
  7. package/dist/{chunk-JVMILYS7.js → chunk-BTQRVGVP.js} +1 -1
  8. package/dist/{chunk-SAJJOSSX.js → chunk-BYMXHDVW.js} +1 -1
  9. package/dist/{chunk-JXW6OO7X.js → chunk-CGPRL6N5.js} +1 -1
  10. package/dist/{chunk-LKIIEX2B.js → chunk-FKBHPI4F.js} +1 -1
  11. package/dist/{chunk-IGNMN2AK.js → chunk-FUYZM7RW.js} +1 -1
  12. package/dist/{chunk-GA3Z2EXN.js → chunk-GK2BSYC2.js} +1 -1
  13. package/dist/{chunk-R5RPU5I6.js → chunk-GQSSSGSQ.js} +1 -1
  14. package/dist/{chunk-PJ6MZXM5.js → chunk-J6VMIDXB.js} +1 -1
  15. package/dist/{chunk-52ASNV4H.js → chunk-JPRDG5YS.js} +1 -1
  16. package/dist/{chunk-MJ2QJSVQ.js → chunk-KFZMTWFX.js} +1 -1
  17. package/dist/{chunk-T4RY3BHZ.js → chunk-OCXCXT7W.js} +1 -1
  18. package/dist/{chunk-6H7NPW5T.js → chunk-QYMVOLIB.js} +1 -1
  19. package/dist/{chunk-EWPOEDQB.js → chunk-VR747T3H.js} +1 -1
  20. package/dist/{chunk-CBBCXRGB.js → chunk-YVC6IO3K.js} +1 -1
  21. package/dist/emincore.register.js +1 -1
  22. package/dist/features/account/change-password/components/PasswordForm.js +1 -1
  23. package/dist/features/account/change-password/index.js +1 -1
  24. package/dist/features/account/change-password/pages/index.js +1 -1
  25. package/dist/features/account/delete-account/components/DeleteAccountForm.js +1 -1
  26. package/dist/features/account/delete-account/index.js +1 -1
  27. package/dist/features/account/delete-account/pages/index.js +1 -1
  28. package/dist/features/account/index.js +1 -1
  29. package/dist/features/account/preferences/pages/index.js +1 -1
  30. package/dist/features/account/profile/components/Profile.js +1 -1
  31. package/dist/features/account/profile/components/ProfileForm.js +1 -1
  32. package/dist/features/account/profile/index.js +1 -1
  33. package/dist/features/account/profile/pages/EditProfilePage.js +1 -1
  34. package/dist/features/account/profile/pages/IndexProfilePage.js +1 -1
  35. package/dist/features/account/shared/components/MyAccountHeader.js +1 -1
  36. package/dist/features/account/shared/components/UserLabel.d.ts +1 -1
  37. package/dist/features/account/shared/components/UserLabel.js +1 -1
  38. package/dist/features/account/shared/components/UserMenu.d.ts +1 -1
  39. package/dist/features/account/shared/components/UserMenu.js +1 -1
  40. package/dist/features/account/shared/components/index.js +1 -1
  41. package/dist/features/account/shared/index.js +1 -1
  42. package/dist/features/account/shared/layouts/MyAccountLayout.d.ts +1 -1
  43. package/dist/features/account/shared/layouts/MyAccountLayout.js +1 -1
  44. package/dist/features/account/shared/lib/account-utils.d.ts +1 -1
  45. package/dist/features/app/components/AppHeader.js +1 -1
  46. package/dist/features/app/components/AppLogo.js +1 -1
  47. package/dist/features/app/index.js +1 -1
  48. package/dist/features/app/layout/AppLayout.js +1 -1
  49. package/dist/features/appearance/components/AppearanceButton.js +1 -1
  50. package/dist/features/appearance/components/AppearanceDropdown.js +1 -1
  51. package/dist/features/appearance/components/AppearanceToggle.js +1 -1
  52. package/dist/features/appearance/hooks/use-appearance.js +1 -1
  53. package/dist/features/appearance/index.js +1 -1
  54. package/dist/features/appearance/lib/appearance-service.js +1 -1
  55. package/dist/features/auth/index.js +1 -1
  56. package/dist/features/auth/login/components/Login.d.ts +1 -1
  57. package/dist/features/auth/login/components/Login.js +1 -1
  58. package/dist/features/auth/login/hooks/use-login-form.js +1 -1
  59. package/dist/features/auth/login/index.js +1 -1
  60. package/dist/features/auth/password/confirmation/components/PasswordConfirmation.js +1 -1
  61. package/dist/features/auth/password/confirmation/index.js +1 -1
  62. package/dist/features/auth/password/forgot/components/PasswordForgot.js +1 -1
  63. package/dist/features/auth/password/forgot/index.js +1 -1
  64. package/dist/features/auth/password/index.js +1 -1
  65. package/dist/features/auth/password/reset/components/PasswordReset.d.ts +1 -1
  66. package/dist/features/auth/password/reset/components/PasswordReset.js +1 -1
  67. package/dist/features/auth/password/reset/hooks/use-reset-password-form.d.ts +1 -1
  68. package/dist/features/auth/password/reset/index.js +1 -1
  69. package/dist/features/auth/register/components/Register.js +1 -1
  70. package/dist/features/auth/register/index.js +1 -1
  71. package/dist/features/auth/shared/components/PasswordInput.js +1 -1
  72. package/dist/features/auth/shared/index.js +1 -1
  73. package/dist/features/auth/shared/layouts/AuthLayout.js +1 -1
  74. package/dist/features/auth/verify/email/components/EmailVerify.js +1 -1
  75. package/dist/features/auth/verify/email/index.js +1 -1
  76. package/dist/features/auth/verify/index.js +1 -1
  77. package/dist/features/dashboard/components/DashboardSidebar.js +1 -1
  78. package/dist/features/dashboard/components/DashboardTopbar.d.ts +1 -1
  79. package/dist/features/dashboard/components/DashboardTopbar.js +1 -1
  80. package/dist/features/dashboard/index.js +1 -1
  81. package/dist/features/dashboard/layouts/DashboardLayout.d.ts +1 -1
  82. package/dist/features/dashboard/layouts/DashboardLayout.js +1 -1
  83. package/dist/features/emin-jobs/components/EminJobsComponents.d.ts +1 -1
  84. package/dist/features/emin-jobs/components/EminJobsComponents.js +1 -1
  85. package/dist/features/emin-jobs/hooks/use-emin-jobs.d.ts +1 -1
  86. package/dist/features/emin-jobs/hooks/use-emin-jobs.js +1 -1
  87. package/dist/features/emin-jobs/index.js +1 -1
  88. package/dist/features/marketplace/components/MarketplaceComponents.d.ts +1 -1
  89. package/dist/features/marketplace/components/MarketplaceComponents.js +1 -1
  90. package/dist/features/marketplace/context/MarketplaceContext.d.ts +3 -3
  91. package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
  92. package/dist/features/marketplace/index.js +1 -1
  93. package/dist/features/marketplace/lib/marketplace-services.d.ts +1 -1
  94. package/dist/features/marketplace/lib/marketplace-utils.d.ts +2 -2
  95. package/dist/features/marketplace/pages/IndexMarketplacePage.d.ts +2 -2
  96. package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
  97. package/dist/features/marketplace/types/marketplace.types.d.ts +1 -1
  98. package/dist/features/notifications/components/EminNotification.d.ts +1 -1
  99. package/dist/features/notifications/components/EminNotification.js +1 -1
  100. package/dist/features/notifications/context/NotificationsContext.d.ts +1 -1
  101. package/dist/features/notifications/context/NotificationsContext.js +1 -1
  102. package/dist/features/notifications/index.js +1 -1
  103. package/dist/features/notifications/pages/UserNotificationsPage.d.ts +1 -1
  104. package/dist/features/notifications/pages/UserNotificationsPage.js +1 -1
  105. package/dist/features/notifications/types/notifications.types.d.ts +1 -1
  106. package/dist/features/package-manager/index.js +1 -1
  107. package/dist/features/package-manager/installer/index.js +1 -1
  108. package/dist/features/package-manager/installer/lib/installer-formatter.js +1 -1
  109. package/dist/features/package-manager/shared/api/package-manager.api.js +1 -1
  110. package/dist/features/package-manager/shared/components/PackageManagerModal.js +1 -1
  111. package/dist/features/package-manager/shared/context/PackageManagerContext.d.ts +1 -1
  112. package/dist/features/package-manager/shared/context/PackageManagerContext.js +1 -1
  113. package/dist/features/package-manager/shared/index.js +1 -1
  114. package/dist/features/package-manager/shared/lib/package-manager-formatter.d.ts +1 -1
  115. package/dist/features/package-manager/shared/lib/package-manager-formatter.js +1 -1
  116. package/dist/features/package-manager/shared/lib/package-manager-services.d.ts +1 -1
  117. package/dist/features/package-manager/shared/lib/package-manager-services.js +1 -1
  118. package/dist/features/package-manager/updater/api/updater.api.d.ts +2 -2
  119. package/dist/features/package-manager/updater/index.js +1 -1
  120. package/dist/features/package-manager/updater/lib/updater-formatter.js +1 -1
  121. package/dist/features/package-manager/updater/lib/updater-service.d.ts +1 -1
  122. package/dist/features/packages/api/packages.api.d.ts +1 -1
  123. package/dist/features/packages/components/Packages.d.ts +2 -2
  124. package/dist/features/packages/components/Packages.js +1 -1
  125. package/dist/features/packages/components/PackagesTable.js +1 -1
  126. package/dist/features/packages/context/PackagesContext.d.ts +1 -1
  127. package/dist/features/packages/context/PackagesContext.js +1 -1
  128. package/dist/features/packages/index.js +1 -1
  129. package/dist/features/packages/lib/packages-formatter.d.ts +2 -2
  130. package/dist/features/packages/lib/packages-formatter.js +1 -1
  131. package/dist/features/packages/pages/IndexPackagesPage.d.ts +1 -1
  132. package/dist/features/packages/pages/IndexPackagesPage.js +1 -1
  133. package/dist/features/platform/components/PlatformComponents.js +1 -1
  134. package/dist/features/platform/components/PlatformPageComponents.d.ts +2 -2
  135. package/dist/features/platform/components/PlatformPageComponents.js +1 -1
  136. package/dist/features/platform/index.js +1 -1
  137. package/dist/features/platform/lib/platform-formatter.d.ts +1 -1
  138. package/dist/features/platform/lib/platform-formatter.js +1 -1
  139. package/dist/features/platform/pages/IndexPlatformPage.d.ts +1 -1
  140. package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
  141. package/dist/features/platform/types/platform.types.d.ts +1 -1
  142. package/dist/features/settings/api/settings.api.js +1 -1
  143. package/dist/features/settings/context/SettingsContext.d.ts +1 -1
  144. package/dist/features/settings/context/SettingsContext.js +1 -1
  145. package/dist/features/settings/index.js +1 -1
  146. package/dist/features/settings/layouts/SettingsLayout.d.ts +2 -2
  147. package/dist/features/settings/layouts/SettingsLayout.js +1 -1
  148. package/dist/features/settings/lib/settings-formatter.d.ts +2 -2
  149. package/dist/features/settings/lib/settings-formatter.js +1 -1
  150. package/dist/features/settings/pages/DesignSettingsPage.d.ts +1 -1
  151. package/dist/features/settings/pages/DesignSettingsPage.js +1 -1
  152. package/dist/features/settings/pages/GeneralSettingsPage.d.ts +1 -1
  153. package/dist/features/settings/pages/GeneralSettingsPage.js +1 -1
  154. package/dist/features/settings/pages/MailSettingsPage.d.ts +1 -1
  155. package/dist/features/settings/pages/MailSettingsPage.js +1 -1
  156. package/dist/features/settings/pages/NavPage.js +1 -1
  157. package/dist/features/slugs/components/slugs.d.ts +1 -1
  158. package/dist/features/slugs/components/slugs.js +1 -1
  159. package/dist/features/slugs/context/SlugsContext.js +1 -1
  160. package/dist/features/slugs/index.js +1 -1
  161. package/dist/features/slugs/lib/slugs-utils.d.ts +1 -1
  162. package/dist/features/users/components/UserModal.js +1 -1
  163. package/dist/features/users/components/UsersPage.d.ts +2 -2
  164. package/dist/features/users/components/UsersPage.js +1 -1
  165. package/dist/features/users/components/UsersStatistics.js +1 -1
  166. package/dist/features/users/components/UsersTable.js +1 -1
  167. package/dist/features/users/context/UsersContext.d.ts +1 -1
  168. package/dist/features/users/index.js +1 -1
  169. package/dist/features/users/lib/users-formatter.d.ts +1 -1
  170. package/dist/features/users/lib/users-formatter.js +1 -1
  171. package/dist/features/users/widgets/UserStatisticsWidget.js +1 -1
  172. package/dist/features/widgets/components/WidgetsComponents.d.ts +1 -1
  173. package/dist/features/widgets/components/WidgetsComponents.js +1 -1
  174. package/dist/features/widgets/context/WidgetsContext.d.ts +1 -1
  175. package/dist/features/widgets/context/WidgetsContext.js +1 -1
  176. package/dist/features/widgets/index.js +1 -1
  177. package/dist/features/widgets/lib/widgets-services.d.ts +1 -1
  178. package/dist/features/widgets/lib/widgets-services.js +1 -1
  179. package/dist/features/widgets/lib/widgets-utils.d.ts +1 -1
  180. package/dist/features/widgets/pages/IndexWidgetsPage.d.ts +1 -1
  181. package/dist/features/widgets/pages/IndexWidgetsPage.js +1 -1
  182. package/dist/pages/auth/login.d.ts +1 -1
  183. package/dist/pages/auth/login.js +1 -1
  184. package/dist/pages/auth/password-confirm.js +1 -1
  185. package/dist/pages/auth/password-forgot.js +1 -1
  186. package/dist/pages/auth/password-reset.d.ts +1 -1
  187. package/dist/pages/auth/password-reset.js +1 -1
  188. package/dist/pages/auth/register.js +1 -1
  189. package/dist/pages/auth/verify-email.js +1 -1
  190. package/dist/pages/dashboard/index.d.ts +1 -1
  191. package/dist/pages/dashboard/index.js +1 -1
  192. package/dist/pages/dashboard/marketplace/index.d.ts +2 -2
  193. package/dist/pages/dashboard/marketplace/index.js +1 -1
  194. package/dist/pages/dashboard/packages/index.d.ts +1 -1
  195. package/dist/pages/dashboard/packages/index.js +1 -1
  196. package/dist/pages/dashboard/platform/index.d.ts +2 -2
  197. package/dist/pages/dashboard/platform/index.js +1 -1
  198. package/dist/pages/dashboard/settings/index.d.ts +1 -1
  199. package/dist/pages/dashboard/settings/index.js +1 -1
  200. package/dist/pages/dashboard/settings/slugs/index.d.ts +1 -1
  201. package/dist/pages/dashboard/settings/slugs/index.js +1 -1
  202. package/dist/pages/dashboard/users/index.d.ts +2 -2
  203. package/dist/pages/dashboard/users/index.js +1 -1
  204. package/dist/pages/my-account/notifications/index.d.ts +2 -2
  205. package/dist/pages/my-account/notifications/index.js +1 -1
  206. package/dist/pages/my-account/profile/edit-password.js +1 -1
  207. package/dist/pages/my-account/profile/edit.js +1 -1
  208. package/dist/pages/my-account/profile/index.js +1 -1
  209. package/dist/provider.js +1 -1
  210. package/dist/shared/components/composite/AlertModal.js +1 -1
  211. package/dist/shared/components/composite/EminEditable.js +1 -1
  212. package/dist/shared/components/composite/EminFormButton.d.ts +1 -1
  213. package/dist/shared/components/composite/EminFormButton.js +1 -1
  214. package/dist/shared/components/composite/EminInfiniteScrool.d.ts +1 -1
  215. package/dist/shared/components/composite/EminInput.js +1 -1
  216. package/dist/shared/components/composite/EminPreference.js +1 -1
  217. package/dist/shared/components/composite/EminPreloader.js +1 -1
  218. package/dist/shared/components/composite/Menu/EminMenu.js +1 -1
  219. package/dist/shared/components/composite/Menu/EminSidebarMenu.js +1 -1
  220. package/dist/shared/components/composite/Menu/index.js +1 -1
  221. package/dist/shared/components/composite/QuickMenu/QuickMenu.js +1 -1
  222. package/dist/shared/components/composite/QuickMenu/index.js +1 -1
  223. package/dist/shared/components/composite/RoleBadge.js +1 -1
  224. package/dist/shared/components/composite/SectionCard.js +1 -1
  225. package/dist/shared/components/composite/StatisticCards.js +1 -1
  226. package/dist/shared/components/composite/index.js +1 -1
  227. package/dist/shared/components/index.js +1 -1
  228. package/dist/shared/components/ui/alert-dialog.d.ts +1 -1
  229. package/dist/shared/components/ui/avatar.js +1 -1
  230. package/dist/shared/components/ui/breadcrumbs.d.ts +1 -1
  231. package/dist/shared/components/ui/breadcrumbs.js +1 -1
  232. package/dist/shared/components/ui/chart.js +1 -1
  233. package/dist/shared/components/ui/command.d.ts +1 -1
  234. package/dist/shared/components/ui/sidebar.d.ts +4 -4
  235. package/dist/shared/components/ui/sidebar.js +1 -1
  236. package/dist/shared/components/ui/slider.js +1 -1
  237. package/dist/shared/components/ui/team-switcher.js +1 -1
  238. package/dist/shared/components/ui/toggle-group.d.ts +1 -1
  239. package/dist/shared/index.js +1 -1
  240. package/dist/shared/modules/emin-table/components/EminTable.d.ts +1 -1
  241. package/dist/shared/modules/emin-table/components/EminTable.js +1 -1
  242. package/dist/shared/modules/emin-table/components/EminTableContent.js +1 -1
  243. package/dist/shared/modules/emin-table/components/EminTablePagination.js +1 -1
  244. package/dist/shared/modules/emin-table/components/EminTableToolbar.js +1 -1
  245. package/dist/shared/modules/emin-table/context/EminTableContext.d.ts +2 -2
  246. package/dist/shared/modules/emin-table/context/EminTableContext.js +1 -1
  247. package/dist/shared/modules/emin-table/index.js +1 -1
  248. package/dist/shared/modules/emin-table/lib/emin-table-utils.d.ts +1 -1
  249. package/dist/shared/modules/emin-table/types/emin-table.types.d.ts +1 -1
  250. package/dist/shared/modules/index.js +1 -1
  251. package/dist/shared/modules/world-map/components/WorldMap2D.d.ts +1 -1
  252. package/dist/shared/modules/world-map/components/WorldMap2D.js +1 -1
  253. package/dist/shared/modules/world-map/context/WorldMapContext.d.ts +1 -1
  254. package/dist/shared/modules/world-map/context/WorldMapContext.js +1 -1
  255. package/dist/shared/modules/world-map/index.js +1 -1
  256. package/dist/shared/types/index.d.ts +1 -1
  257. package/package.json +3 -2
@@ -1 +1 @@
1
- import{i,ia as m,xa as n}from"./chunk-6H7NPW5T.js";import{a as t}from"./chunk-E2ZUBHVJ.js";import{d as o}from"./chunk-EWPOEDQB.js";import{a as r}from"./chunk-CZM7FKLS.js";import{a as s}from"./chunk-3H6NZAII.js";import{usePage as a}from"@inertiajs/react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var k=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:b}=d.auth;return e("header",{className:"flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:c("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[e(o,{className:"-ml-1"}),e(r,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),e(s,{breadcrumbs:p,className:"hidden md:flex"}),c("div",{className:"ml-auto flex items-center gap-2",children:[u&&e(m,{notifications:b??[]}),e(n,{placeholder:"Type a command or search...",menu:t(l,h)}),e(i,{className:"w-8 h-8"})]})]})})};export{k as a};
1
+ import{i,ia as m,xa as n}from"./chunk-QYMVOLIB.js";import{a as t}from"./chunk-E2ZUBHVJ.js";import{d as o}from"./chunk-VR747T3H.js";import{a as r}from"./chunk-CZM7FKLS.js";import{a as s}from"./chunk-3H6NZAII.js";import{usePage as a}from"@inertiajs/react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var k=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:b}=d.auth;return e("header",{className:"flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:c("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[e(o,{className:"-ml-1"}),e(r,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),e(s,{breadcrumbs:p,className:"hidden md:flex"}),c("div",{className:"ml-auto flex items-center gap-2",children:[u&&e(m,{notifications:b??[]}),e(n,{placeholder:"Type a command or search...",menu:t(l,h)}),e(i,{className:"w-8 h-8"})]})]})})};export{k as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-DSY4KVMF.js";import{a}from"./chunk-QKGQOXDM.js";import{a as n}from"./chunk-GND5KQRZ.js";import{jsx as e,jsxs as i}from"react/jsx-runtime";var I=({label:r,icon:t,value:p,placeholder:m,type:l="text",error:u,onChange:d,helpPopover:c,className:g,...v})=>i("div",{className:"grid gap-1",children:[r&&e("span",{className:"text-sm text-muted-foreground",children:r}),i("div",{className:"group relative",children:[e(a,{type:l,value:p,onChange:d,placeholder:m,className:n("w-full px-10",g),min:"1",...v}),t&&e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:typeof t=="string"?e(s,{iconName:t,size:16}):t}),c??null]}),e(o,{message:u})]});export{I as a};
1
+ import{a as o}from"./chunk-DSY4KVMF.js";import{a}from"./chunk-QKGQOXDM.js";import{a as s}from"./chunk-G4EEZUTC.js";import{a as n}from"./chunk-GND5KQRZ.js";import{jsx as e,jsxs as i}from"react/jsx-runtime";var I=({label:r,icon:t,value:p,placeholder:m,type:l="text",error:u,onChange:d,helpPopover:c,className:g,...v})=>i("div",{className:"grid gap-1",children:[r&&e("span",{className:"text-sm text-muted-foreground",children:r}),i("div",{className:"group relative",children:[e(a,{type:l,value:p,onChange:d,placeholder:m,className:n("w-full px-10",g),min:"1",...v}),t&&e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:typeof t=="string"?e(s,{iconName:t,size:16}):t}),c??null]}),e(o,{message:u})]});export{I as a};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-SAJJOSSX.js";import{a as L,b as m}from"./chunk-WQ53I46F.js";import{a as R}from"./chunk-KND3PUAR.js";import{a as A}from"./chunk-JVMILYS7.js";import{Ea as M,c as E,t as k,u as S,v as T}from"./chunk-6H7NPW5T.js";import{a as p,b as u,c as g,d as v}from"./chunk-PRCYNFKC.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as c}from"./chunk-G22OJQWL.js";import{a as y}from"./chunk-M5QT5SFN.js";import{a as D,f as C,g as I,i as w}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as x,d as P}from"./chunk-GND5KQRZ.js";import{router as F}from"@inertiajs/react";import{jsx as $}from"react/jsx-runtime";var f=()=>{let t=m(),{users:l,meta:s}=t,i=B();return $(M,{data:l,columns:i,meta:s,handleRequest:e=>V(e,t)})},V=(t,l)=>{F.get(route("dashboard.users"),{...t},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:s=>{l.setUsers(s.props.users),l.setMeta(s.props.meta)}})};import{Head as O}from"@inertiajs/react";import{jsx as d,jsxs as H}from"react/jsx-runtime";var W=({users:t,meta:l,statistics:s})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return H(A,{breadcrumbs:i,children:[d(O,{title:"Users"}),d(R,{title:"Users",description:"Here you can see and manage all the system users.",icon:d(n,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),H(L,{users:t,meta:l,children:[d(_,{statistics:s}),d(f,{}),d(U,{})]})]})};import{useEffect as Z,useState as G}from"react";import{Fragment as J,jsx as a,jsxs as r}from"react/jsx-runtime";var q=t=>[{key:"name",label:"Name",value:t.name,type:"text"},{key:"surname",label:"surname",value:t.surname,type:"text"},{key:"email",label:"Email",value:t.email,editable:!1},{key:"role",label:"Role",value:t.role_code,type:"select",options:[{label:"Root",value:"root"},{label:"User",value:"user"}]},{key:"status",label:"Status",value:Number(t.status),type:"select",options:[{label:"Inactive",value:0},{label:"Active",value:1},{label:"Pending",value:2},{label:"Suspended",value:3}]},{key:"last_seen_at",label:"Last Seen At",value:t.last_seen_at?new Date(t.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(t.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(t.updated_at).toLocaleString(),editable:!1}],B=()=>{let{setSelectedUser:t,setShowUserModal:l}=m(),[s,i]=G(!0);return Z(()=>{i(!1);let e=setTimeout(()=>i(!0),50);return()=>clearTimeout(e)},[]),[{id:"select",header:({table:e})=>a(y,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:h=>e.toggleAllPageRowsSelected(!!h),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:e,table:h})=>a(y,{id:`select-row-${e.id}`,checked:e.getIsSelected(),onCheckedChange:z=>{e.toggleSelected(!!z)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("span",{style:{display:s?"block":"none"},children:["#",e.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("div",{style:{display:s?"flex":"none"},className:"cursor-pointer",onClick:()=>{t(e.original),l(!0)},children:[a("div",{className:"flex sm:hidden",children:a(T,{user:e.original??null,settings:{showEmail:!0}})}),r("div",{className:"hidden sm:flex items-center gap-2",children:[a(k,{user:e.original,type:"square"}),a(S,{user:e.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Status"}),r(v,{children:[a(u,{children:"Status"}),a("span",{children:"The status of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"},children:e.original.status==0?a(n,{iconName:"IconPlayerPauseFilled",className:"h-4 w-4 text-primary"}):e.original.status==1?a(n,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):e.original.status==2?a(n,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):e.original.status==3&&a(n,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),r(v,{children:[a(u,{children:"User Status"}),a("span",{children:e.original?.status==0?"Inactive":e.original?.status==1?"Active":e.original?.status==2?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Role"}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:"The role of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",isActive:e.original.role!==void 0,children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"}})]}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:e?.original?.role?.title??e.original.role_code})]})]})},{id:"actions",header:()=>"Actions",cell:({row:e})=>r(J,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"flex":"none"},className:"gap-1",children:a(N,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),t(e.original),l(!0)},children:a(n,{iconName:"IconEye"})})})]})}]};import{jsx as o,jsxs as b}from"react/jsx-runtime";var U=()=>{let{selectedUser:t,setSelectedUser:l,showUserModal:s,setShowUserModal:i}=m();return o(D,{open:s,onOpenChange:i,children:b(C,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[o(I,{className:"pb-4 border-b shrink-0",children:b(w,{children:["Details of ",t?.name]})}),o(K,{})]})})},K=()=>{let{selectedUser:t}=m();if(!t)return;let l=q(t);return b("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[o("div",{className:"flex items-center gap-4",children:o("div",{style:{backgroundImage:`url(${P(t?.avatar??"")})`,backgroundSize:"cover"},className:"aspect-square h-auto w-full border rounded-sm object-cover"})}),o("div",{className:"grid grid-cols-2 gap-y-3",children:l.map(s=>b("div",{className:x("flex flex-col items-start justify-start",s.value?.toString()?.length>30?"col-span-2":""),children:[o("p",{className:"text-sm text-muted-foreground capitalize",children:s?.label}),o(E,{item:s,children:s.key==="status"?s.value==0?o("span",{className:"text-sm text-primary",children:"Inactive"}):s.value==1?o("span",{className:"text-sm text-green-400",children:"Active"}):s.value==2?o("span",{className:"text-sm text-yellow-400",children:"Pending"}):s.value==3&&o("span",{className:"text-sm text-red-400",children:"Suspended"}):o("span",{className:"text-sm",children:s?.value??"-"})},s.key)]},s.key))})]})};export{U as a,K as b,f as c,W as d,q as e,B as f};
1
+ import{a as L,b as m}from"./chunk-WQ53I46F.js";import{a as _}from"./chunk-BYMXHDVW.js";import{a as R}from"./chunk-KND3PUAR.js";import{a as A}from"./chunk-BTQRVGVP.js";import{Ea as M,c as E,t as k,u as S,v as T}from"./chunk-QYMVOLIB.js";import{a as y}from"./chunk-M5QT5SFN.js";import{a as D,f as C,g as I,i as w}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as c}from"./chunk-G22OJQWL.js";import{a as p,b as u,c as g,d as v}from"./chunk-PRCYNFKC.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as x,d as P}from"./chunk-GND5KQRZ.js";import{router as F}from"@inertiajs/react";import{jsx as $}from"react/jsx-runtime";var f=()=>{let t=m(),{users:l,meta:s}=t,i=B();return $(M,{data:l,columns:i,meta:s,handleRequest:e=>V(e,t)})},V=(t,l)=>{F.get(route("dashboard.users"),{...t},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:s=>{l.setUsers(s.props.users),l.setMeta(s.props.meta)}})};import{Head as O}from"@inertiajs/react";import{jsx as d,jsxs as H}from"react/jsx-runtime";var W=({users:t,meta:l,statistics:s})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return H(A,{breadcrumbs:i,children:[d(O,{title:"Users"}),d(R,{title:"Users",description:"Here you can see and manage all the system users.",icon:d(n,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),H(L,{users:t,meta:l,children:[d(_,{statistics:s}),d(f,{}),d(U,{})]})]})};import{useEffect as Z,useState as G}from"react";import{Fragment as J,jsx as a,jsxs as r}from"react/jsx-runtime";var q=t=>[{key:"name",label:"Name",value:t.name,type:"text"},{key:"surname",label:"surname",value:t.surname,type:"text"},{key:"email",label:"Email",value:t.email,editable:!1},{key:"role",label:"Role",value:t.role_code,type:"select",options:[{label:"Root",value:"root"},{label:"User",value:"user"}]},{key:"status",label:"Status",value:Number(t.status),type:"select",options:[{label:"Inactive",value:0},{label:"Active",value:1},{label:"Pending",value:2},{label:"Suspended",value:3}]},{key:"last_seen_at",label:"Last Seen At",value:t.last_seen_at?new Date(t.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(t.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(t.updated_at).toLocaleString(),editable:!1}],B=()=>{let{setSelectedUser:t,setShowUserModal:l}=m(),[s,i]=G(!0);return Z(()=>{i(!1);let e=setTimeout(()=>i(!0),50);return()=>clearTimeout(e)},[]),[{id:"select",header:({table:e})=>a(y,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:h=>e.toggleAllPageRowsSelected(!!h),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:e,table:h})=>a(y,{id:`select-row-${e.id}`,checked:e.getIsSelected(),onCheckedChange:z=>{e.toggleSelected(!!z)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("span",{style:{display:s?"block":"none"},children:["#",e.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("div",{style:{display:s?"flex":"none"},className:"cursor-pointer",onClick:()=>{t(e.original),l(!0)},children:[a("div",{className:"flex sm:hidden",children:a(T,{user:e.original??null,settings:{showEmail:!0}})}),r("div",{className:"hidden sm:flex items-center gap-2",children:[a(k,{user:e.original,type:"square"}),a(S,{user:e.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Status"}),r(v,{children:[a(u,{children:"Status"}),a("span",{children:"The status of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"},children:e.original.status==0?a(n,{iconName:"IconPlayerPauseFilled",className:"h-4 w-4 text-primary"}):e.original.status==1?a(n,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):e.original.status==2?a(n,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):e.original.status==3&&a(n,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),r(v,{children:[a(u,{children:"User Status"}),a("span",{children:e.original?.status==0?"Inactive":e.original?.status==1?"Active":e.original?.status==2?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Role"}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:"The role of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",isActive:e.original.role!==void 0,children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"}})]}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:e?.original?.role?.title??e.original.role_code})]})]})},{id:"actions",header:()=>"Actions",cell:({row:e})=>r(J,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"flex":"none"},className:"gap-1",children:a(N,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),t(e.original),l(!0)},children:a(n,{iconName:"IconEye"})})})]})}]};import{jsx as o,jsxs as b}from"react/jsx-runtime";var U=()=>{let{selectedUser:t,setSelectedUser:l,showUserModal:s,setShowUserModal:i}=m();return o(D,{open:s,onOpenChange:i,children:b(C,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[o(I,{className:"pb-4 border-b shrink-0",children:b(w,{children:["Details of ",t?.name]})}),o(K,{})]})})},K=()=>{let{selectedUser:t}=m();if(!t)return;let l=q(t);return b("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[o("div",{className:"flex items-center gap-4",children:o("div",{style:{backgroundImage:`url(${P(t?.avatar??"")})`,backgroundSize:"cover"},className:"aspect-square h-auto w-full border rounded-sm object-cover"})}),o("div",{className:"grid grid-cols-2 gap-y-3",children:l.map(s=>b("div",{className:x("flex flex-col items-start justify-start",s.value?.toString()?.length>30?"col-span-2":""),children:[o("p",{className:"text-sm text-muted-foreground capitalize",children:s?.label}),o(E,{item:s,children:s.key==="status"?s.value==0?o("span",{className:"text-sm text-primary",children:"Inactive"}):s.value==1?o("span",{className:"text-sm text-green-400",children:"Active"}):s.value==2?o("span",{className:"text-sm text-yellow-400",children:"Pending"}):s.value==3&&o("span",{className:"text-sm text-red-400",children:"Suspended"}):o("span",{className:"text-sm",children:s?.value??"-"})},s.key)]},s.key))})]})};export{U as a,K as b,f as c,W as d,q as e,B as f};
@@ -1 +1 @@
1
- import{a as O,b as p}from"./chunk-CBBCXRGB.js";import{a as R,b as g,c as C,d as U,e as V,f as T}from"./chunk-RCUM5ZGQ.js";import{d as f}from"./chunk-IGNMN2AK.js";import{b as y}from"./chunk-LKIIEX2B.js";import{a as A}from"./chunk-JVMILYS7.js";import{g as x}from"./chunk-6H7NPW5T.js";import{a as I}from"./chunk-65LRDGYI.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as B}from"./chunk-QKGQOXDM.js";import{a as _}from"./chunk-3DBYUBWW.js";import{a as F,f as L,j as z}from"./chunk-QFUZ6MVT.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as o}from"./chunk-GND5KQRZ.js";import{IconCircleCheckFilled as W,IconCircleX as X,IconDownload as oe,IconRefresh as ne,IconStar as G,IconStarFilled as D,IconUsersGroup as ie,IconX as le}from"@tabler/icons-react";import{Fragment as re,jsx as n,jsxs as h}from"react/jsx-runtime";var ve=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(A,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(O,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:h("div",{className:"grid gap-10",children:[n($,{className:"mt-15 mb-25"}),n(ce,{}),n(q,{})]})})}),ce=()=>{let{marketPackages:a}=p(),t=a?.filter(r=>r.code.startsWith("emintech")),c=a?.filter(r=>!r.code.startsWith("emintech"));return h(re,{children:[t&&t?.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:t.map(r=>n(M,{pkg:r}))})]}),c&&c.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:c.map(r=>n(M,{pkg:r}))})]})]})};import{useForm as me}from"@inertiajs/react";import{Fragment as H,jsx as e,jsxs as s}from"react/jsx-runtime";var $=({className:a})=>{let{meta:t}=p();return s("div",{className:o("grid gap-4",a),children:[e(l,{iconName:"IconPackages",className:"mx-auto h-15 w-15"}),s("div",{className:"grid text-center",children:[e("h2",{className:"text-2xl font-bold",children:"Search what do you need?"}),e("span",{className:"text-sm text-muted-foreground",children:"Search for packages by name or category."})]}),e(B,{placeholder:"Search package name, author, or category...",value:t?.search,className:"bg-accent/10"})]})},M=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=f(),u=i.find(N=>N.code===a.code)??null;return s(_,{className:o("p-2 bg-accent/10 w-full shadow-md hover:scale-105 duration-300",t),children:[s("div",{className:"grid gap-4 cursor-pointer",onClick:()=>{c(a),r(!0)},children:[e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),s("div",{className:"grid px-2 gap-2",children:[s("div",{className:"flex items-center gap-1",children:[e(K,{pkg:a}),e(y,{pkg:{...a,is_custom:!1},className:"ml-auto text-sm",size:18})]}),e("hr",{}),s("span",{className:"text-sm text-muted-foreground truncate",children:[a.description," "]}),s("div",{className:"flex items-center",children:[u?s("div",{className:"flex items-center gap-2",children:[e(W,{className:"w-5 h-5 text-green-500 shrink-0"}),e("span",{className:"text-xs text-green-500",children:"Installed"})]}):e(Y,{pkg:a,className:"text-xs"}),e(J,{pkg:a,className:"text-xs ml-auto text-muted-foreground"})]})]})]}),e("div",{className:"px-2 mb-1",children:e(Z,{pkg:a})})]})},q=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=f();if(!a||!c)return;let i=r.find(u=>u.code===c.code)??null;return e(F,{open:a,onOpenChange:t,children:s(L,{className:"min-h-[25vh] max-h-[80vh] min-w-[90vw] sm:min-w-[70vw] xl:min-w-[60vw] 2xl:min-w-[50vw] grid gap-5 overflow-y-auto",children:[e("div",{className:"",children:e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm lg:aspect-[16/5]",style:{backgroundImage:`url(${c.cover??c.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}})}),s("div",{className:"grid grid-cols-1 lg:grid-cols-[4fr_2fr] gap-5",children:[s("div",{className:"grid grid-cols-1 gap-2",children:[e(K,{pkg:c}),e(z,{children:c.description}),e(Y,{pkg:c,className:"text-xs"})]}),s("div",{className:"grid gap-3",children:[e(Q,{pkg:c,className:"text-sm text-muted-foreground hover:text-primary cursor-pointer"}),e(y,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(de,{pkg:c,className:"text-sm text-muted-foreground"}),e(pe,{pkg:c,className:"text-sm text-muted-foreground"}),s("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(ie,{className:"w-5 h-5 shrink-0"}),e(J,{pkg:c,className:"text-sm"})]})]}),s("div",{className:"col-span-full grid gap-2",children:[e(Z,{pkg:c}),C(g(c),i)==="uninstall"&&e("div",{className:"col-span-full w-full grid gap-2",children:s("span",{className:"text-xs text-center text-muted-foreground",children:["You installed that at ",new Date(i?.created_at).toLocaleString()]})})]})]})]})})},K=({pkg:a,className:t})=>s("div",{className:o("grid grid-cols-[25px_auto] gap-2",t),children:[e(l,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),Ge=({pkg:a,className:t})=>e("div",{className:o("grid gap-2",t),children:e(Q,{pkg:a})}),Y=({pkg:a,className:t})=>e("div",{className:o("flex items-center gap-2",t),children:T(g(a))?s(H,{children:[e(W,{className:"w-5 h-5 shrink-0 text-green-400"}),e("div",{className:"grid",children:e("span",{className:"text-green-400 truncate",children:"Compatible with your app"})})]}):s(H,{children:[e(X,{className:"w-5 h-5 shrink-0 text-red-400"}),e("div",{className:"grid",children:e("span",{className:"text-red-400 truncate",children:"Not compatible with your app"})})]})}),J=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2 shrink-0",t),children:[s("span",{className:"shrink-0",children:[Math.floor(Math.random()*1e3).toFixed(0)," Reviews"]}),s("div",{className:"flex items-center gap-0 shrink-0",children:[e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(G,{className:"h-[18px] w-[18px] shrink-0"}),e(G,{className:"h-[18px] w-[18px] shrink-0"})]})]}),Q=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2",t),children:[e(l,{iconName:"IconUserCircle",className:"shrink-0 w-5 h-5"}),e("a",{href:R(a.author),className:"capitalize",children:a.author??"yok"})]}),pe=({pkg:a,text:t="Last Update:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),de=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",g(a)?.core_constraint??"-"]})]}),Z=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,packageManifest:u,setIsLoading:N,setIsModalOpen:S,process:ge}=f(),j=c.find(d=>d.code===a.code)??null,v=g(a),k=C(v,j),{post:ee,setData:ae,recentlySuccessful:P,processing:w}=me(),se=()=>(N(!0),S(!0),new Promise(E=>ee(route("dashboard.packages.manager"),{onSuccess:()=>E(!0),onError:te=>E(te)}))),b=d=>{r(d),i(U(a,v.version)),ae({process:d,packageCode:a.code,version:v.version}),se().then(()=>S(!1))};return k==="buy"?e("a",{href:V(a),target:"_blank",rel:"noopener noreferrer",children:s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(l,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):k==="install"?s(x,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("install"),recentlySuccessful:P,processing:w,children:[e(oe,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):k=="uninstall"?s(x,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("uninstall"),recentlySuccessful:P,processing:w,children:[e(le,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):k=="update"?s(x,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("update"),recentlySuccessful:P,processing:w,children:[e(ne,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),disabled:!0,children:[e(X,{className:"w-5 h-5 shrink-0 text-red-400"}),e("span",{children:"Not Compatible with your core version"})]})};export{$ as a,M as b,q as c,K as d,Ge as e,Y as f,J as g,Q as h,pe as i,de as j,Z as k,ve as l,ce as m};
1
+ import{a as R,b as g,c as C,d as U,e as V,f as T}from"./chunk-RCUM5ZGQ.js";import{a as O,b as p}from"./chunk-YVC6IO3K.js";import{d as f}from"./chunk-FUYZM7RW.js";import{b as y}from"./chunk-FKBHPI4F.js";import{a as A}from"./chunk-BTQRVGVP.js";import{g as x}from"./chunk-QYMVOLIB.js";import{a as B}from"./chunk-QKGQOXDM.js";import{a as _}from"./chunk-3DBYUBWW.js";import{a as F,f as L,j as z}from"./chunk-QFUZ6MVT.js";import{a as I}from"./chunk-65LRDGYI.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-GND5KQRZ.js";import{IconCircleCheckFilled as W,IconCircleX as X,IconDownload as oe,IconRefresh as ne,IconStar as G,IconStarFilled as D,IconUsersGroup as ie,IconX as le}from"@tabler/icons-react";import{Fragment as re,jsx as n,jsxs as h}from"react/jsx-runtime";var ve=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(A,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(O,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:h("div",{className:"grid gap-10",children:[n($,{className:"mt-15 mb-25"}),n(ce,{}),n(q,{})]})})}),ce=()=>{let{marketPackages:a}=p(),t=a?.filter(r=>r.code.startsWith("emintech")),c=a?.filter(r=>!r.code.startsWith("emintech"));return h(re,{children:[t&&t?.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:t.map(r=>n(M,{pkg:r}))})]}),c&&c.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:c.map(r=>n(M,{pkg:r}))})]})]})};import{useForm as me}from"@inertiajs/react";import{Fragment as H,jsx as e,jsxs as s}from"react/jsx-runtime";var $=({className:a})=>{let{meta:t}=p();return s("div",{className:o("grid gap-4",a),children:[e(l,{iconName:"IconPackages",className:"mx-auto h-15 w-15"}),s("div",{className:"grid text-center",children:[e("h2",{className:"text-2xl font-bold",children:"Search what do you need?"}),e("span",{className:"text-sm text-muted-foreground",children:"Search for packages by name or category."})]}),e(B,{placeholder:"Search package name, author, or category...",value:t?.search,className:"bg-accent/10"})]})},M=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=f(),u=i.find(N=>N.code===a.code)??null;return s(_,{className:o("p-2 bg-accent/10 w-full shadow-md hover:scale-105 duration-300",t),children:[s("div",{className:"grid gap-4 cursor-pointer",onClick:()=>{c(a),r(!0)},children:[e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),s("div",{className:"grid px-2 gap-2",children:[s("div",{className:"flex items-center gap-1",children:[e(K,{pkg:a}),e(y,{pkg:{...a,is_custom:!1},className:"ml-auto text-sm",size:18})]}),e("hr",{}),s("span",{className:"text-sm text-muted-foreground truncate",children:[a.description," "]}),s("div",{className:"flex items-center",children:[u?s("div",{className:"flex items-center gap-2",children:[e(W,{className:"w-5 h-5 text-green-500 shrink-0"}),e("span",{className:"text-xs text-green-500",children:"Installed"})]}):e(Y,{pkg:a,className:"text-xs"}),e(J,{pkg:a,className:"text-xs ml-auto text-muted-foreground"})]})]})]}),e("div",{className:"px-2 mb-1",children:e(Z,{pkg:a})})]})},q=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=f();if(!a||!c)return;let i=r.find(u=>u.code===c.code)??null;return e(F,{open:a,onOpenChange:t,children:s(L,{className:"min-h-[25vh] max-h-[80vh] min-w-[90vw] sm:min-w-[70vw] xl:min-w-[60vw] 2xl:min-w-[50vw] grid gap-5 overflow-y-auto",children:[e("div",{className:"",children:e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm lg:aspect-[16/5]",style:{backgroundImage:`url(${c.cover??c.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}})}),s("div",{className:"grid grid-cols-1 lg:grid-cols-[4fr_2fr] gap-5",children:[s("div",{className:"grid grid-cols-1 gap-2",children:[e(K,{pkg:c}),e(z,{children:c.description}),e(Y,{pkg:c,className:"text-xs"})]}),s("div",{className:"grid gap-3",children:[e(Q,{pkg:c,className:"text-sm text-muted-foreground hover:text-primary cursor-pointer"}),e(y,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(de,{pkg:c,className:"text-sm text-muted-foreground"}),e(pe,{pkg:c,className:"text-sm text-muted-foreground"}),s("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(ie,{className:"w-5 h-5 shrink-0"}),e(J,{pkg:c,className:"text-sm"})]})]}),s("div",{className:"col-span-full grid gap-2",children:[e(Z,{pkg:c}),C(g(c),i)==="uninstall"&&e("div",{className:"col-span-full w-full grid gap-2",children:s("span",{className:"text-xs text-center text-muted-foreground",children:["You installed that at ",new Date(i?.created_at).toLocaleString()]})})]})]})]})})},K=({pkg:a,className:t})=>s("div",{className:o("grid grid-cols-[25px_auto] gap-2",t),children:[e(l,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),Ge=({pkg:a,className:t})=>e("div",{className:o("grid gap-2",t),children:e(Q,{pkg:a})}),Y=({pkg:a,className:t})=>e("div",{className:o("flex items-center gap-2",t),children:T(g(a))?s(H,{children:[e(W,{className:"w-5 h-5 shrink-0 text-green-400"}),e("div",{className:"grid",children:e("span",{className:"text-green-400 truncate",children:"Compatible with your app"})})]}):s(H,{children:[e(X,{className:"w-5 h-5 shrink-0 text-red-400"}),e("div",{className:"grid",children:e("span",{className:"text-red-400 truncate",children:"Not compatible with your app"})})]})}),J=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2 shrink-0",t),children:[s("span",{className:"shrink-0",children:[Math.floor(Math.random()*1e3).toFixed(0)," Reviews"]}),s("div",{className:"flex items-center gap-0 shrink-0",children:[e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(G,{className:"h-[18px] w-[18px] shrink-0"}),e(G,{className:"h-[18px] w-[18px] shrink-0"})]})]}),Q=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2",t),children:[e(l,{iconName:"IconUserCircle",className:"shrink-0 w-5 h-5"}),e("a",{href:R(a.author),className:"capitalize",children:a.author??"yok"})]}),pe=({pkg:a,text:t="Last Update:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),de=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",g(a)?.core_constraint??"-"]})]}),Z=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,packageManifest:u,setIsLoading:N,setIsModalOpen:S,process:ge}=f(),j=c.find(d=>d.code===a.code)??null,v=g(a),k=C(v,j),{post:ee,setData:ae,recentlySuccessful:P,processing:w}=me(),se=()=>(N(!0),S(!0),new Promise(E=>ee(route("dashboard.packages.manager"),{onSuccess:()=>E(!0),onError:te=>E(te)}))),b=d=>{r(d),i(U(a,v.version)),ae({process:d,packageCode:a.code,version:v.version}),se().then(()=>S(!1))};return k==="buy"?e("a",{href:V(a),target:"_blank",rel:"noopener noreferrer",children:s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(l,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):k==="install"?s(x,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("install"),recentlySuccessful:P,processing:w,children:[e(oe,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):k=="uninstall"?s(x,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("uninstall"),recentlySuccessful:P,processing:w,children:[e(le,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):k=="update"?s(x,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("update"),recentlySuccessful:P,processing:w,children:[e(ne,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),disabled:!0,children:[e(X,{className:"w-5 h-5 shrink-0 text-red-400"}),e("span",{children:"Not Compatible with your core version"})]})};export{$ as a,M as b,q as c,K as d,Ge as e,Y as f,J as g,Q as h,pe as i,de as j,Z as k,ve as l,ce as m};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-KND3PUAR.js";import{a as c}from"./chunk-JVMILYS7.js";import{a as t}from"./chunk-G4EEZUTC.js";import{a as i,b as n,c as r}from"./chunk-3DBYUBWW.js";import{Head as m,Link as g}from"@inertiajs/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var N=()=>{let d=[{title:"General Settings",description:"Manage general system settings",href:route("dashboard.settings",{tab:"general"}),icon:e(t,{iconName:"IconSettings"}),colSpan:1},{title:"Manage Slugs",description:"Configure URL slugs and permalinks",href:route("dashboard.settings.slugs"),icon:e(t,{iconName:"IconLink"}),colSpan:1},{title:"Design Settings",description:"Manage appereance, branding and design settings for the system",href:route("dashboard.settings",{tab:"design"}),icon:e(t,{iconName:"IconPalette"}),colSpan:1},{title:"Mail Settings",description:"Manage email settings for the system",href:route("dashboard.settings",{tab:"mail"}),icon:e(t,{iconName:"IconMail"}),colSpan:1},{title:"Platform Status",description:"View system health and service status",href:route("dashboard.settings.platform"),icon:e(t,{iconName:"IconCloudCog"}),colSpan:2}],l=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings"}];return o(c,{breadcrumbs:l,children:[e(m,{title:"All Settings"}),o("div",{className:"container mx-auto grid grid-cols-2 gap-4",children:[e(s,{title:"All Settings",description:"Which settings do you want to manage?",icon:e(t,{iconName:"IconSettings2"})}),d.map((a,p)=>e(g,{href:a.href,className:`col-span-${a.colSpan}`,children:e(i,{className:"cursor-pointer hover:shadow-lg transition-shadow",children:o(n,{children:[o(r,{className:"flex items-center gap-2 mx-auto",children:[a.icon,a.title]}),e("p",{className:"text-sm text-muted-foreground text-center",children:a.description})]})})}))]})]})};export{N as a};
1
+ import{a as s}from"./chunk-KND3PUAR.js";import{a as c}from"./chunk-BTQRVGVP.js";import{a as i,b as n,c as r}from"./chunk-3DBYUBWW.js";import{a as t}from"./chunk-G4EEZUTC.js";import{Head as m,Link as g}from"@inertiajs/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var N=()=>{let d=[{title:"General Settings",description:"Manage general system settings",href:route("dashboard.settings",{tab:"general"}),icon:e(t,{iconName:"IconSettings"}),colSpan:1},{title:"Manage Slugs",description:"Configure URL slugs and permalinks",href:route("dashboard.settings.slugs"),icon:e(t,{iconName:"IconLink"}),colSpan:1},{title:"Design Settings",description:"Manage appereance, branding and design settings for the system",href:route("dashboard.settings",{tab:"design"}),icon:e(t,{iconName:"IconPalette"}),colSpan:1},{title:"Mail Settings",description:"Manage email settings for the system",href:route("dashboard.settings",{tab:"mail"}),icon:e(t,{iconName:"IconMail"}),colSpan:1},{title:"Platform Status",description:"View system health and service status",href:route("dashboard.settings.platform"),icon:e(t,{iconName:"IconCloudCog"}),colSpan:2}],l=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings"}];return o(c,{breadcrumbs:l,children:[e(m,{title:"All Settings"}),o("div",{className:"container mx-auto grid grid-cols-2 gap-4",children:[e(s,{title:"All Settings",description:"Which settings do you want to manage?",icon:e(t,{iconName:"IconSettings2"})}),d.map((a,p)=>e(g,{href:a.href,className:`col-span-${a.colSpan}`,children:e(i,{className:"cursor-pointer hover:shadow-lg transition-shadow",children:o(n,{children:[o(r,{className:"flex items-center gap-2 mx-auto",children:[a.icon,a.title]}),e("p",{className:"text-sm text-muted-foreground text-center",children:a.description})]})})}))]})]})};export{N as a};
@@ -1 +1 @@
1
- import{a as R,b as B,c as H,d as O}from"./chunk-R5RPU5I6.js";import{c as V}from"./chunk-IGNMN2AK.js";import{a as E}from"./chunk-I3QZZ3J3.js";import{a as F}from"./chunk-KND3PUAR.js";import{a as M}from"./chunk-JVMILYS7.js";import{g as C}from"./chunk-6H7NPW5T.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as w}from"./chunk-DSY4KVMF.js";import{a as h,b as P,f as D,g as b,i as I,j as k}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as A}from"./chunk-DWAU5VTB.js";import{useState as z}from"react";import{useForm as G,usePage as j}from"@inertiajs/react";import{IconAlertCircle as Y}from"@tabler/icons-react";import{Fragment as c,jsx as r,jsxs as u}from"react/jsx-runtime";var K=o=>[{step:u(c,{children:["Sign up at ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Create an application for ",r("strong",{children:o.app.url})]})},{step:u(c,{children:["Copy your ",r("strong",{children:"verification key"})]})},{step:r(c,{children:"Submit and verify your application"})}],L=o=>[{step:u(c,{children:["Log in to ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Select the application for ",r("strong",{children:o.app.url})]})},{step:r(c,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:r(c,{children:"Submit and complete the connection process."})}],X=o=>{switch(o){case"invalid_api_secret":return{icon:r(Y,{className:"text-red-500 mx-auto h-15 w-15"}),title:"Invalid API Secret Key",message:"Please check your API Secret key to access all ecosystem features.",content:r(S,{})};case"get_api_secret":return{icon:"IconPackages",title:"Connect to EminCore Platform",message:"Connect your application to the EminCore platform with your API Secret key to access all ecosystem features.",content:r(S,{})};case"verify_app":return{icon:"IconProgressCheck",title:"Verify your application",message:"Verify your application on the EminCore platform to access marketplace.",content:r(T,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as $}from"@inertiajs/react";import{Fragment as J,jsx as s,jsxs as _}from"react/jsx-runtime";var ce=({packages:o,requirements:m,account:l,error:g})=>{let p=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=o.find(f=>f.code==A);return _(J,{children:[s($,{title:"Platform"}),s(M,{breadcrumbs:p,children:s(V,{packages:o,children:_("div",{className:"container mx-auto",children:[s(F,{title:"Platform",description:"Platform overview",icon:s(n,{iconName:"IconCloudCog"})}),_("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s(R,{account:l}),s(B,{eminCore:d}),s(H,{requirements:m}),s(O,{})]})]})})})]})};import{toast as q}from"sonner";import{jsx as e,jsxs as t}from"react/jsx-runtime";var _e=({icon:o,title:m,message:l,content:g,className:p})=>t("div",{className:`grid gap-4 mt-15 mb-25 ${p}`,children:[o&&(typeof o=="string"?e(n,{iconName:o,className:"mx-auto h-15 w-15"}):o),t("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:m}),e("span",{className:"text-sm text-muted-foreground",children:l}),g]})]}),S=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({api_secret_key:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(k,{className:"text-center",children:"Please provide valid API Secret Key to connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.connect"),{onFinish:x}));q.promise(i,{loading:"Connecting to EminCore Platform..."})},children:[t("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:[e("strong",{className:"text-center text-sm",children:"How to get API & Verification key"}),L(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))]}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your API secret key",icon:"IconKey",value:g.api_secret_key,onChange:a=>p({api_secret_key:a.target.value}),error:y.api_secret_key}),t(C,{recentlySuccessful:v,processing:f,variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})},T=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({verification_code:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconProgressCheck",className:"mx-auto h-10 w-10"}),e("span",{children:"Verify your application on EminCore Platform"})]}),e(k,{className:"text-center",children:"Please follow the steps below to verify your application on the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.verify"),{onFinish:x}));q.promise(i,{loading:"Verifying your application..."})},children:[e("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:K(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your verification code",icon:"IconKey",value:g.verification_code,onChange:a=>p({verification_code:a.target.value}),error:y.verification_code}),t(C,{processing:f,recentlySuccessful:v,className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]}),e(w,{message:y?.verification_code})]})]})})]})]})};export{_e as a,S as b,T as c,K as d,L as e,X as f,ce as g};
1
+ import{a as R,b as B,c as H,d as O}from"./chunk-GQSSSGSQ.js";import{a as E}from"./chunk-4DHRTWA7.js";import{c as V}from"./chunk-FUYZM7RW.js";import{a as F}from"./chunk-KND3PUAR.js";import{a as M}from"./chunk-BTQRVGVP.js";import{g as C}from"./chunk-QYMVOLIB.js";import{a as w}from"./chunk-DSY4KVMF.js";import{a as h,b as P,f as D,g as b,i as I,j as k}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as A}from"./chunk-DWAU5VTB.js";import{useState as z}from"react";import{useForm as G,usePage as j}from"@inertiajs/react";import{IconAlertCircle as Y}from"@tabler/icons-react";import{Fragment as c,jsx as r,jsxs as u}from"react/jsx-runtime";var K=o=>[{step:u(c,{children:["Sign up at ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Create an application for ",r("strong",{children:o.app.url})]})},{step:u(c,{children:["Copy your ",r("strong",{children:"verification key"})]})},{step:r(c,{children:"Submit and verify your application"})}],L=o=>[{step:u(c,{children:["Log in to ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Select the application for ",r("strong",{children:o.app.url})]})},{step:r(c,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:r(c,{children:"Submit and complete the connection process."})}],X=o=>{switch(o){case"invalid_api_secret":return{icon:r(Y,{className:"text-red-500 mx-auto h-15 w-15"}),title:"Invalid API Secret Key",message:"Please check your API Secret key to access all ecosystem features.",content:r(S,{})};case"get_api_secret":return{icon:"IconPackages",title:"Connect to EminCore Platform",message:"Connect your application to the EminCore platform with your API Secret key to access all ecosystem features.",content:r(S,{})};case"verify_app":return{icon:"IconProgressCheck",title:"Verify your application",message:"Verify your application on the EminCore platform to access marketplace.",content:r(T,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as $}from"@inertiajs/react";import{Fragment as J,jsx as s,jsxs as _}from"react/jsx-runtime";var ce=({packages:o,requirements:m,account:l,error:g})=>{let p=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=o.find(f=>f.code==A);return _(J,{children:[s($,{title:"Platform"}),s(M,{breadcrumbs:p,children:s(V,{packages:o,children:_("div",{className:"container mx-auto",children:[s(F,{title:"Platform",description:"Platform overview",icon:s(n,{iconName:"IconCloudCog"})}),_("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s(R,{account:l}),s(B,{eminCore:d}),s(H,{requirements:m}),s(O,{})]})]})})})]})};import{toast as q}from"sonner";import{jsx as e,jsxs as t}from"react/jsx-runtime";var _e=({icon:o,title:m,message:l,content:g,className:p})=>t("div",{className:`grid gap-4 mt-15 mb-25 ${p}`,children:[o&&(typeof o=="string"?e(n,{iconName:o,className:"mx-auto h-15 w-15"}):o),t("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:m}),e("span",{className:"text-sm text-muted-foreground",children:l}),g]})]}),S=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({api_secret_key:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(k,{className:"text-center",children:"Please provide valid API Secret Key to connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.connect"),{onFinish:x}));q.promise(i,{loading:"Connecting to EminCore Platform..."})},children:[t("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:[e("strong",{className:"text-center text-sm",children:"How to get API & Verification key"}),L(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))]}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your API secret key",icon:"IconKey",value:g.api_secret_key,onChange:a=>p({api_secret_key:a.target.value}),error:y.api_secret_key}),t(C,{recentlySuccessful:v,processing:f,variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})},T=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({verification_code:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconProgressCheck",className:"mx-auto h-10 w-10"}),e("span",{children:"Verify your application on EminCore Platform"})]}),e(k,{className:"text-center",children:"Please follow the steps below to verify your application on the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.verify"),{onFinish:x}));q.promise(i,{loading:"Verifying your application..."})},children:[e("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:K(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your verification code",icon:"IconKey",value:g.verification_code,onChange:a=>p({verification_code:a.target.value}),error:y.verification_code}),t(C,{processing:f,recentlySuccessful:v,className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]}),e(w,{message:y?.verification_code})]})]})})]})]})};export{_e as a,S as b,T as c,K as d,L as e,X as f,ce as g};
@@ -1 +1 @@
1
- import{a}from"./chunk-52ASNV4H.js";import{a as e}from"./chunk-2IY27GNO.js";import{va as i,wa as t}from"./chunk-6H7NPW5T.js";import{b as o,f as d}from"./chunk-EWPOEDQB.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var c=({children:b,type:p="sidebar",breadcrumbs:m})=>{if(typeof window>"u")return r(t,{});if(p==="sidebar")return r(i,{children:s(o,{style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[r(a,{variant:"inset"}),s(d,{children:[r(e,{breadcrumbs:m}),r("div",{className:"@container/main p-7",children:b})]})]})})};export{c as a};
1
+ import{a as e}from"./chunk-2W4V6OS5.js";import{a}from"./chunk-JPRDG5YS.js";import{va as i,wa as t}from"./chunk-QYMVOLIB.js";import{b as o,f as d}from"./chunk-VR747T3H.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var c=({children:b,type:p="sidebar",breadcrumbs:m})=>{if(typeof window>"u")return r(t,{});if(p==="sidebar")return r(i,{children:s(o,{style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[r(a,{variant:"inset"}),s(d,{children:[r(e,{breadcrumbs:m}),r("div",{className:"@container/main p-7",children:b})]})]})})};export{c as a};
@@ -1 +1 @@
1
- import{Ca as r}from"./chunk-6H7NPW5T.js";import{useEffect as n,useState as a}from"react";import{jsx as i}from"react/jsx-runtime";var g=({statistics:t})=>{let[s,c]=a(t);n(()=>{c(t)},[t]);let o=[{title:"Total Users",value:String(s.total_users),icon:"IconUsers"},{title:"Active Users",value:String(s.active_users),icon:"IconUserCheck"},{title:"Pending Users",value:String(s.pending_users),icon:"IconUserSearch"},{title:"Inactive Users",value:String(s.inactive_users),icon:"IconUserX"},{title:"Blocked Users",value:String(s.blocked_users),icon:"IconUserCancel"}];return i("div",{className:"grid grid-cols-1 md:grid-cols-5 lg:grid-cols-5 gap-5",children:o.map(e=>i(r,{...e},e.title?.toString()))})};export{g as a};
1
+ import{Ca as r}from"./chunk-QYMVOLIB.js";import{useEffect as n,useState as a}from"react";import{jsx as i}from"react/jsx-runtime";var g=({statistics:t})=>{let[s,c]=a(t);n(()=>{c(t)},[t]);let o=[{title:"Total Users",value:String(s.total_users),icon:"IconUsers"},{title:"Active Users",value:String(s.active_users),icon:"IconUserCheck"},{title:"Pending Users",value:String(s.pending_users),icon:"IconUserSearch"},{title:"Inactive Users",value:String(s.inactive_users),icon:"IconUserX"},{title:"Blocked Users",value:String(s.blocked_users),icon:"IconUserCancel"}];return i("div",{className:"grid grid-cols-1 md:grid-cols-5 lg:grid-cols-5 gap-5",children:o.map(e=>i(r,{...e},e.title?.toString()))})};export{g as a};
@@ -1 +1 @@
1
- import{B as o,ga as t}from"./chunk-6H7NPW5T.js";import{Head as e}from"@inertiajs/react";import{jsx as c,jsxs as i}from"react/jsx-runtime";var f=()=>i(o,{children:[c(e,{title:"Account Settings"}),c(t,{})]});export{f as a};
1
+ import{B as o,ga as t}from"./chunk-QYMVOLIB.js";import{Head as e}from"@inertiajs/react";import{jsx as c,jsxs as i}from"react/jsx-runtime";var f=()=>i(o,{children:[c(e,{title:"Account Settings"}),c(t,{})]});export{f as a};
@@ -1 +1 @@
1
- import{Ca as k}from"./chunk-6H7NPW5T.js";import{a as c}from"./chunk-G4EEZUTC.js";import{a as d,f as m,g,i as u,j as p}from"./chunk-QFUZ6MVT.js";import{a as o}from"./chunk-GND5KQRZ.js";import{useState as N,useEffect as x}from"react";import{Fragment as l,jsx as e,jsxs as n}from"react/jsx-runtime";var h=({pkg:a,showBadge:t=!0,showBadgeTitle:s=!0,className:i})=>n("div",{className:o("flex items-center gap-1",i),children:[e("span",{className:"font-medium",children:a?.name||a?.code}),t&&e(f,{pkg:a,showBadgeTitle:s})]}),f=({pkg:a,showBadgeTitle:t=!0,className:s,size:i=18})=>e("div",{className:o("flex items-center gap-1",s),children:a?.is_custom===!1?a.code.slice(0,8)==="emintech"?n(l,{children:[e(c,{iconName:"IconCertificate",className:"text-cyan-600 dark:text-cyan-400",size:i}),t&&e("span",{className:"font-medium text-cyan-600 dark:text-cyan-400",children:"Official"})]}):n(l,{children:[e(c,{iconName:"IconRosetteDiscountCheckFilled",className:"text-emerald-600 dark:text-emerald-400",size:i}),t&&e("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:"Verified"})]}):n(l,{children:[e(c,{iconName:"IconInfoCircleFilled",className:"text-slate-500 dark:text-slate-400",size:i}),t&&e("span",{className:"font-medium text-slate-500 dark:text-slate-400",children:"Unverified"})]})}),w=({statistics:a})=>{let[t,s]=N(a);x(()=>{s(a)},[a]);let i=[{title:"Total Packages",subtext:"Total packages counts",value:String(t.total_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Enabled Packages",subtext:"Enabled packages counts",value:String(t.enabled_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Disabled Packages",subtext:"Disabled packages counts",value:String(t.disabled_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Need Update",subtext:"Packages need update counts",value:String(t?.need_update_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})}];return e("div",{className:"grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 gap-6 mb-8",children:i.map(r=>e(k,{...r},r.title?.toString()))})},v=({pkg:a})=>{let t=[{key:"version"},{key:"status",value:a.is_active?e("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Enabled"}):e("span",{className:"text-red-600 dark:text-red-400",children:"Disabled"})},{key:"source",value:a.is_custom?e("span",{className:"text-orange-600 dark:text-orange-400",children:"Custom"}):e("span",{className:"text-cyan-600 dark:text-cyan-400",children:"Official"})},{key:"installed at",value:new Date(a?.created_at??"-").toLocaleString()},{key:"last updated at",value:new Date(a?.updated_at??"-").toLocaleString()}];return n("div",{className:"space-y-4",children:[n("div",{className:a?.image?"grid gap-3":"flex items-center gap-3",children:[a?.image?e("div",{className:"w-full h-auto rounded-lg aspect-[16/9] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}):e(c,{iconName:"IconPackage",className:"h-7 w-7 text-muted-foreground shrink-0"}),n(g,{children:[e(u,{className:"text-base",children:a?.name??a.code}),e(p,{className:"text-xs",children:a?.description??"No description"})]})]}),e("hr",{}),e("div",{className:"space-y-3 text-sm",children:t.map(s=>n("div",{className:"flex justify-between",children:[e("span",{className:"text-muted-foreground capitalize",children:s.key}),s.value??a[s.key]??"N/A"]},s.key))})]})},I=({isModalOpen:a,setIsModalOpen:t,package:s})=>e(d,{open:a,onOpenChange:t,children:e(m,{className:"sm:max-w-md",children:e(v,{pkg:s})})});export{h as a,f as b,w as c,v as d,I as e};
1
+ import{Ca as k}from"./chunk-QYMVOLIB.js";import{a as d,f as m,g,i as u,j as p}from"./chunk-QFUZ6MVT.js";import{a as c}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-GND5KQRZ.js";import{useState as N,useEffect as x}from"react";import{Fragment as l,jsx as e,jsxs as n}from"react/jsx-runtime";var h=({pkg:a,showBadge:t=!0,showBadgeTitle:s=!0,className:i})=>n("div",{className:o("flex items-center gap-1",i),children:[e("span",{className:"font-medium",children:a?.name||a?.code}),t&&e(f,{pkg:a,showBadgeTitle:s})]}),f=({pkg:a,showBadgeTitle:t=!0,className:s,size:i=18})=>e("div",{className:o("flex items-center gap-1",s),children:a?.is_custom===!1?a.code.slice(0,8)==="emintech"?n(l,{children:[e(c,{iconName:"IconCertificate",className:"text-cyan-600 dark:text-cyan-400",size:i}),t&&e("span",{className:"font-medium text-cyan-600 dark:text-cyan-400",children:"Official"})]}):n(l,{children:[e(c,{iconName:"IconRosetteDiscountCheckFilled",className:"text-emerald-600 dark:text-emerald-400",size:i}),t&&e("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:"Verified"})]}):n(l,{children:[e(c,{iconName:"IconInfoCircleFilled",className:"text-slate-500 dark:text-slate-400",size:i}),t&&e("span",{className:"font-medium text-slate-500 dark:text-slate-400",children:"Unverified"})]})}),w=({statistics:a})=>{let[t,s]=N(a);x(()=>{s(a)},[a]);let i=[{title:"Total Packages",subtext:"Total packages counts",value:String(t.total_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Enabled Packages",subtext:"Enabled packages counts",value:String(t.enabled_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Disabled Packages",subtext:"Disabled packages counts",value:String(t.disabled_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Need Update",subtext:"Packages need update counts",value:String(t?.need_update_packages),icon:e(c,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})}];return e("div",{className:"grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 gap-6 mb-8",children:i.map(r=>e(k,{...r},r.title?.toString()))})},v=({pkg:a})=>{let t=[{key:"version"},{key:"status",value:a.is_active?e("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Enabled"}):e("span",{className:"text-red-600 dark:text-red-400",children:"Disabled"})},{key:"source",value:a.is_custom?e("span",{className:"text-orange-600 dark:text-orange-400",children:"Custom"}):e("span",{className:"text-cyan-600 dark:text-cyan-400",children:"Official"})},{key:"installed at",value:new Date(a?.created_at??"-").toLocaleString()},{key:"last updated at",value:new Date(a?.updated_at??"-").toLocaleString()}];return n("div",{className:"space-y-4",children:[n("div",{className:a?.image?"grid gap-3":"flex items-center gap-3",children:[a?.image?e("div",{className:"w-full h-auto rounded-lg aspect-[16/9] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}):e(c,{iconName:"IconPackage",className:"h-7 w-7 text-muted-foreground shrink-0"}),n(g,{children:[e(u,{className:"text-base",children:a?.name??a.code}),e(p,{className:"text-xs",children:a?.description??"No description"})]})]}),e("hr",{}),e("div",{className:"space-y-3 text-sm",children:t.map(s=>n("div",{className:"flex justify-between",children:[e("span",{className:"text-muted-foreground capitalize",children:s.key}),s.value??a[s.key]??"N/A"]},s.key))})]})},I=({isModalOpen:a,setIsModalOpen:t,package:s})=>e(d,{open:a,onOpenChange:t,children:e(m,{className:"sm:max-w-md",children:e(v,{pkg:s})})});export{h as a,f as b,w as c,v as d,I as e};
@@ -1 +1 @@
1
- import{a as fe}from"./chunk-MEURTOUQ.js";import{a as ke}from"./chunk-FAHSY2DO.js";import{a as H}from"./chunk-MDY5P6AG.js";import{a as G,d as B,e as ue}from"./chunk-LKIIEX2B.js";import{a as pe}from"./chunk-KND3PUAR.js";import{a as ge}from"./chunk-JVMILYS7.js";import{a as de}from"./chunk-EABDMJDG.js";import{a as oe}from"./chunk-L37X7O6L.js";import{Ea as me,b as z,g as ne}from"./chunk-6H7NPW5T.js";import{a as _,c as T,d as F}from"./chunk-PRCYNFKC.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as R}from"./chunk-G22OJQWL.js";import{a as se}from"./chunk-7NKFSFMC.js";import{a as Y}from"./chunk-M5QT5SFN.js";import{a as re,f as ie,g as ce,h as le,i as Z,j as L}from"./chunk-QFUZ6MVT.js";import{b as v}from"./chunk-TVCWAJFT.js";import{router as na}from"@inertiajs/react";import{Fragment as Re,jsx as M,jsxs as Q}from"react/jsx-runtime";var Pe=()=>{let{isModalOpen:e,setIsModalOpen:t,isLoading:o,process:n,step:r,isCustom:a,setStep:i,setValidationError:m}=u(),c=a()?"custom":"market",p=o?"loading":`${c}-${n}-${r}`,g=ve(p);return M(re,{open:e,onOpenChange:t,children:Q(ie,{className:"max-h-[90vh] overflow-auto break-all min-w-[50vh] max-w-[75vh] w-auto",children:[M(ce,{children:!o&&(g.title||g.description)&&Q(Re,{children:[M(Z,{className:"text-base text-lg",children:g.title}),M(L,{className:"text-sm",children:g.description}),M("hr",{})]})}),g.content,M(le,{children:r>1&&!o&&M("div",{className:"grid mx-auto",children:Q(v,{variant:"link",size:"sm",className:"flex items-center gap-1",onClick:()=>{i(r-1),m("")},children:[M(l,{iconName:"IconArrowLeft",className:"h-4 w-4"}),"Back"]})})})]})})};import{createContext as ze,useContext as Ze,useEffect as X,useState as b}from"react";import{jsx as He,jsxs as $e}from"react/jsx-runtime";var xe=ze({}),he=({children:e,packages:t,process:o="install",step:n=1,isValid:r=!1,is_custom:a=!1})=>{let i={title:"Loading",description:"Please wait while we process your request."},[m,c]=b(t),[p,g]=b(o),[f,y]=b(!1),[k,V]=b(n),[I,E]=b(null),[C,h]=b(null),[D,U]=b(r),[Le,ee]=b(""),[Be,ae]=b(!1),[Oe,J]=b(i),K=de();X(()=>{f||setTimeout(()=>{V(1),g(o),E(null),h(null),U(!1),ae(!1),ee(""),J(i)},250)},[f]),X(()=>{!C||!K||Object.values(K).forEach(A=>{A?.jobCode===`${C.code}_${p}`&&J({title:A.title,description:A.description,progress:A.progress,error:A.status==="failed"})})},[K]),X(()=>{c(t)},[t]);let te=()=>C?.is_custom===!1,Ue={packages:m,setPackages:c,process:p,setProcess:g,isModalOpen:f,setIsModalOpen:y,step:k,setStep:V,selectedFile:I,setSelectedFile:E,packageManifest:C,setPackageManifest:h,isValid:D,setIsValid:U,validationError:Le,setValidationError:ee,isLoading:Be,setIsLoading:ae,loadingContent:Oe,setLoadingContent:J,isOfficial:te,isCustom:()=>!te()};return $e(xe.Provider,{value:Ue,children:[e,He(Pe,{})]})},u=()=>{let e=Ze(xe);if(!e)throw new Error("PackageManagerContext must be used within a PackageManagerProvider");return e};import{Fragment as be,jsx as w,jsxs as $}from"react/jsx-runtime";var ve=e=>{let{loadingContent:t,validationError:o}=u(),n={title:t.title,description:t.description,content:$(be,{children:[w("div",{className:"animate-spin rounded-full h-15 w-15 border-b-2 border-primary mx-auto"}),$("div",{className:"text-center",children:[w(Z,{className:"text-base text-lg",children:t.title}),w(L,{className:"text-sm",children:t.description}),t.progress&&$(be,{children:[w(oe,{value:t.progress,className:"my-2"}),"%",t.progress]}),t.error&&w(L,{className:"text-red-500 text-sm",children:t.error})]})]})},r={title:null,description:null,content:$("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500",children:[w(l,{iconName:"IconExclamationCircleFilled",className:"text-red-500 h-15 w-15 mx-auto"}),w("span",{className:"text-2xl font-bold",children:"Error"}),w("span",{className:"text-sm text-muted-foreground",children:o})]})};if(o)return r;if(e=="loading")return n;let a=Ne(),i=ye(),[m,c,p]=e.split("-"),g=m,f=c,y=Number(p);return{custom:{install:{1:a.selectInstallationMethod,2:a.uploadPackageZipFile,3:a.customInstallSummary()},update:{1:a.uploadPackageZipFile,2:i.updateSummary()}},market:{update:{1:i.updateSummary()}}}[g]?.[f]?.[y]??a.selectInstallationMethod};import{unzip as qe}from"fflate";import{toast as We}from"sonner";var Je=e=>new Promise((t,o)=>{qe(e,(n,r)=>{if(n)return o(new Error("ZIP file is corrupted"));t(r)})}),Ce=async e=>{let{process:t,selectedFile:o,setIsLoading:n,step:r,setStep:a,setPackageManifest:i,setValidationError:m,setIsValid:c,packages:p,setLoadingContent:g}=e;try{if(!o)throw new Error("Please select a file.");if(n(!0),g({title:"Package Verifying",description:"Please wait while we verify the package."}),o.size>100*1024*1024)throw new Error("File should be less than 100MB");let f=new Uint8Array(await o.arrayBuffer()),y=await Je(f);if(!y["emincore.json"])throw new Error("Manifest (emincore.json) has not been found in the ZIP file.");let k=JSON.parse(new TextDecoder().decode(y["emincore.json"]));i(k);let I=["code","name","version","description","author","core_constraint"].filter(h=>k[h]==null||k[h]==="");if(I.length)throw new Error("Manifest is missing required fields: "+I.join(", "));let E=k.composer_package&&k.composer_package_version,C=k.npm_package&&k.npm_package_version;if(!E&&!C)throw new Error("Package must has at least one of composer package or npm package.");if(t=="update"){let h=ke(p.find(D=>D.code==k?.code),k);if(typeof h=="string")throw new Error(h)}c(!0)}catch(f){throw We.error(String(f)),m(String(f)),c(!1),f}finally{a(r+1),n(!1)}};import{router as ta,useForm as oa}from"@inertiajs/react";import{Fragment as Ke,jsx as q,jsxs as Me}from"react/jsx-runtime";var we=()=>{let{packages:e,selectedPackage:t,isDetailsModalOpen:o,setIsDetailsModalOpen:n}=W(),{setIsModalOpen:r,setProcess:a,setStep:i}=u(),m=Ee(),c=Ie();return Me(Ke,{children:[Me(v,{size:"sm",variant:"outline",className:"mb-4 flex items-center gap-2",onClick:()=>{r(!0),a("install"),i(1)},children:[q(l,{iconName:"IconUpload"}),q("span",{children:"Install Package"})]}),q(me,{columns:c,data:e,bulkActions:m}),t&&q(ue,{isModalOpen:o,setIsModalOpen:n,package:t})]})};import{router as Ye}from"@inertiajs/react";import{useEffect as Ge,useState as Qe}from"react";import{toast as De}from"sonner";import{Fragment as Se,jsx as s,jsxs as N}from"react/jsx-runtime";var Ie=()=>{let[e,t]=Qe(!0);Ge(()=>{t(!1);let a=setTimeout(()=>t(!0),50);return()=>clearTimeout(a)},[]);let{setSelectedPackage:o,setIsDetailsModalOpen:n}=W(),r=u();return[{id:"select",header:({table:a})=>s(Y,{checked:a.getIsAllPageRowsSelected()||a.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:i=>a.toggleAllPageRowsSelected(!!i),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:a,table:i})=>s(Y,{id:`select-row-${a.id}`,checked:a.getIsSelected(),onCheckedChange:m=>{a.toggleSelected(!!m)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"package",header:"Package",cell:({row:a})=>N("div",{className:"flex items-center gap-5 cursor-pointer",onClick:()=>{o(a.original),n(!0)},children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),N("span",{style:{display:e?"flex":"none"},className:"items-center gap-3",children:[s(l,{iconName:"IconPackage",className:"h-7 my-2 cursor-pointer"}),N("div",{className:"flex flex-col",children:[s("div",{className:"flex items-center gap-1",children:s(G,{pkg:a.original})}),s("span",{className:"text-muted-foreground text-xs",children:a.original.description?a.original.description.length>61?a.original?.description?.slice(0,60)+"...":a.original?.description:"No description"}),s("span",{className:"text-muted-foreground text-xs",children:a.original?.version})]})]})]})},{accessorKey:"is_active",header:()=>N(_,{trigger:"hover",children:[s(T,{children:"Status"}),s(F,{className:"w-auto",children:"Is the package enabled?"})]}),cell:({row:a})=>N(Se,{children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),s("div",{style:{display:e?"block":"none"},children:s(se,{checked:a.original.is_active,onCheckedChange:i=>{H([a.original.id],{is_active:i})}})})]})},{accessorKey:"actions",header:()=>N(_,{trigger:"hover",children:[s(T,{children:"Actions"}),s(F,{className:"w-auto",children:"Actions of the package"})]}),cell:({row:a})=>N(Se,{children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),N("div",{style:{display:e?"flex":"none"},className:"gap-2",children:[s(z,{title:"Uninstall Package",content:"Are you sure to uninstall this package?",onConfirm:()=>{Ye.post(route("dashboard.packages.manager"),{process:"uninstall",packageCode:a.original.code})},children:N(_,{trigger:"hover",children:[s(T,{children:s(v,{variant:"outline",size:"sm",className:"flex items-center",disabled:a.original.is_active,children:s(l,{iconName:"IconTrash",className:"h-4 w-4"})})}),s(F,{children:a.original.is_active?"Disable Package First":"Uninstall Package"})]})}),N(_,{trigger:"hover",children:[s(T,{children:s(v,{variant:"outline",size:"sm",className:"flex items-center",onClick:()=>{let i=a.original;r.setPackageManifest(i),r.setProcess("update"),r.setIsModalOpen(!0),r.setIsLoading(!0),i.is_custom||fe(r).then(m=>{if(typeof m=="boolean"&&m===!0)r.setLoadingContent({title:`${i.name} is up to date`,description:"No updates available"});else{let c=m;r.setPackageManifest({...c,is_custom:!1}),r.setStep(1),r.setIsLoading(!1)}})},children:s(l,{iconName:"IconRefresh",className:"h-4 w-4"})})}),s(F,{children:a.original.is_custom?"Update Package":"Check Updates"})]})]})]})}]},Ee=()=>[{label:"Enable",icon:s(l,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Enable Packages",confirmContent:"Are you sure to enable these packages?",confirmIcon:s(l,{iconName:"IconCheck",size:30}),cancel:()=>{De.info("Process cancelled")},action:(e,t)=>{let o=e.map(n=>n.original.id);H(o,{is_active:!0},n=>{n&&t&&t()})}},{label:"Disable",icon:s(l,{iconName:"IconCreativeCommonsNd",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Disable Packages",confirmContent:"Are you sure to disable these packages?",confirmIcon:s(l,{iconName:"IconCreativeCommonsNd",size:30}),cancel:()=>{De.info("Process cancelled")},action:(e,t)=>{let o=e.map(n=>n.original.id);H(o,{is_active:!1},n=>{n&&t&&t()})}}],nt=e=>({name:s(G,{pkg:e}),code:s("span",{className:"",children:e.code??"\u2014"}),version:s("span",{children:e?.version??"\u2014"}),author:s("span",{children:e?.author??"\u2014"}),status:s("span",{className:e?.is_active?"text-green-600":"text-destructive",children:e?.is_active?"Enabled":"Disabled"}),source:s("span",{className:e?.is_custom?"text-orange-400":"text-green-600",children:e?.is_custom?"Custom":"Marketplace"}),installedAt:s("span",{children:e?.created_at?new Date(e.created_at).toLocaleDateString():"\u2014"}),lastUpdatedAt:s("span",{children:e?.updated_at?new Date(e.updated_at).toLocaleDateString():"\u2014"})});import{createContext as Xe,useContext as je,useEffect as ea,useState as j}from"react";import{jsx as Ve}from"react/jsx-runtime";var Ae=Xe({}),_e=({packages:e,children:t})=>{let[o,n]=j(e),[r,a]=j(null),[i,m]=j(!1);ea(()=>{n(e)},[e]);let c={packages:o,setPackages:n,selectedPackage:r,setSelectedPackage:a,isDetailsModalOpen:i,setIsDetailsModalOpen:m};return Ve(he,{packages:o,children:Ve(Ae.Provider,{value:c,children:t})})},W=()=>{let e=je(Ae);if(!e)throw new Error("usePackagesContext must be used within a PackagesProvider");return e};import{Head as aa}from"@inertiajs/react";import{jsx as O,jsxs as Te}from"react/jsx-runtime";var xt=({packages:e})=>{let t=[{title:"WM Dashboard",href:route("dashboard")},{title:"Packages",href:"#"}];return Te(ge,{breadcrumbs:t,children:[O(aa,{title:"Packages"}),Te("div",{className:"container mx-auto",children:[O(pe,{title:"Packages",description:"Here you can see and manage all the system packages.",icon:O(l,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),O(_e,{packages:e,children:O(we,{})})]})]})};import{Fragment as Fe,jsx as d,jsxs as P}from"react/jsx-runtime";var Ne=()=>{let{process:e,setStep:t,selectedFile:o,setSelectedFile:n,isValid:r,packageManifest:a,validationError:i}=u(),m=u();return{selectInstallationMethod:{title:"Select Installation Method",description:"Choose whether to install the package from a file or a URL.",content:P("div",{className:"grid grid-cols-2 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>t(2),children:[d(l,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Manual Upload"}),d("p",{className:"text-sm",children:"Upload your custom package file"})]}),P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>ta.get(route("dashboard.packages.marketplace")),children:[d(l,{iconName:"IconShoppingBag",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Marketplace"}),d("p",{className:"text-sm",children:"Browse and install from marketplace"})]})]})},uploadPackageZipFile:{title:o?"Verify Package File":"Upload Package File",description:o?"Verify the package file to ensure it is valid.":"Upload your custom package file (.zip)",content:P("div",{className:"grid grid-cols-1 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer border-dashed "+(o?"border-gray-400 text-primary":"text-muted-foreground hover:border-gray-400 hover:text-primary transition-colors"),onDrop:c=>{c.preventDefault();let p=c.dataTransfer.files;if(p.length>0){n(p[0]);return}},onClick:()=>document.querySelector('input[type="file"]')?.click(),onDragOver:c=>c.preventDefault(),children:[o?P("div",{children:[d(l,{iconName:"IconFileTypeZip",className:"h-12 w-12 mx-auto mb-3"}),d("div",{className:"flex items-center justify-center gap-2",children:d("span",{className:"text-sm",children:o.name})})]}):P(Fe,{children:[d(l,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Upload Package"}),P("p",{className:"text-sm",children:["Drag and drop or ",d("span",{className:"text-primary cursor-pointer",children:"choose file"})," to upload"]})]}),d("input",{type:"file",className:"hidden",onChange:c=>{c?.target?.files&&c.target.files.length>0&&(n(c.target.files[0]),c.target.files=null)}})]}),o&&P(Fe,{children:[P(v,{variant:"link",size:"sm",className:"w-full flex items-center",onClick:()=>n(null),children:[d(l,{iconName:"IconTrash",className:"h-4 w-4 text-muted-foreground cursor-pointer"}),"Delete"]}),d(v,{className:"w-full",variant:"outline",onClick:()=>Ce(m),children:"Verify Package"})]})]})},customInstallSummary:()=>{let{packages:c,setIsLoading:p}=u(),g=c.find(h=>h.code==a?.code)??!1,f=g!==!1,y=r?"Package Verified":"Package Not Verified",k=r?"Your package documents are valid. You can install it now.":"Your package is not verified. Please contact the package author for more information.",{post:V,recentlySuccessful:I,processing:E}=oa({process:e,packageCode:a?.code,version:a?.version,packageZip:o??null}),C=()=>{p(!0);let h=new Promise(D=>V(route("dashboard.packages.manager"),{onSuccess:()=>D(!0),onError:U=>D(U),onFinish:()=>p(!1)}))};return{title:y,description:k,content:r?P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer text-muted-foreground text-primary transition-colors",children:[d(B,{pkg:a}),P("div",{className:"mt-4",children:[d(z,{title:e=="install"?"Confirm Installation":"Confirm Update",content:d("div",{className:"!text-center",children:"This package has passed basic manifest validation only. This does not guarantee safety or full compatibility. Only proceed if you are absolutely certain of its origin and trust the source."}),confirmText:e=="install"?"Confirm and Install":"Confirm and Update",onConfirm:C,children:f?d(v,{className:"w-full",variant:"outline",disabled:!0,children:"Installed"}):P(ne,{recentlySuccessful:I,processing:E,children:[d(l,{iconName:e=="install"?"IconDownload":"IconRefresh"}),d("span",{children:e=="install"?"Install Package":"Update Package"})]})}),f&&P("div",{className:"text-red-500 my-3",children:[g.code," - ",g.version," already exists."]})]})]}):d("div",{children:i??"An error occurred while verifying the package. Please contact the package author for more information."})}}}};import{Fragment as sa,jsx as x,jsxs as S}from"react/jsx-runtime";var ye=()=>{let{packages:e,packageManifest:t,validationError:o,isCustom:n}=u();return{updateSummary:()=>{let r="Package Updates",a="Here are the latest updates for this package.",i=e.find(p=>p.code===t?.code),m=t,c=m?.version!=i?.version;return!c&&i?.is_custom===!1&&(r=a=null),{title:r,description:a,content:x(sa,{children:!c&&i?.is_custom===!1?S("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500 !border-none",children:[x(l,{iconName:"IconCircleCheckFilled",className:"text-green-500 h-15 w-15 mx-auto"}),S("span",{className:"text-2xl font-bold",children:[i.name," is up to date!"]}),x("span",{className:"text-sm text-muted-foreground",children:"There are no updates available for this package."})]}):S("div",{className:"grid grid-cols-1 gap-3",children:[S("div",{className:"grid grid-cols-[4fr_40px_4fr] gap-2",children:[S("div",{className:"!opacity-70",children:[x("span",{className:"font-bold mb-2 block text-center",children:"Old Version"}),x("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:i&&x(B,{pkg:i})})]}),x("div",{className:"flex items-center justify-center",children:x(l,{iconName:"IconArrowBarRight",className:"h-10 w-10"})}),S("div",{children:[x("span",{className:"font-bold mb-2 block text-center",children:"New Version"}),x("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:m&&x(B,{pkg:{...m,is_active:!1,is_custom:n(),id:0}})})]})]}),x(v,{className:"w-full mt-2",variant:"outline",disabled:!!o,children:"Update Package"})]})})}}}};var to=()=>{let{process:e,packageManifest:t,selectedFile:o,setIsLoading:n}=u();t&&(n(!0),na.post(route("dashboard.packages.manager"),{process:e,packageCode:t.code,version:t.version,packageZip:o??null}))};export{to as a,Pe as b,he as c,u as d,ve as e,Ce as f,we as g,Ie as h,Ee as i,nt as j,_e as k,W as l,xt as m,Ne as n,ye as o};
1
+ import{a as ke}from"./chunk-FAHSY2DO.js";import{a as fe}from"./chunk-MEURTOUQ.js";import{a as H}from"./chunk-MDY5P6AG.js";import{a as G,d as B,e as ue}from"./chunk-FKBHPI4F.js";import{a as pe}from"./chunk-KND3PUAR.js";import{a as ge}from"./chunk-BTQRVGVP.js";import{a as de}from"./chunk-EABDMJDG.js";import{a as oe}from"./chunk-L37X7O6L.js";import{Ea as me,b as z,g as ne}from"./chunk-QYMVOLIB.js";import{a as se}from"./chunk-7NKFSFMC.js";import{a as Y}from"./chunk-M5QT5SFN.js";import{a as re,f as ie,g as ce,h as le,i as Z,j as L}from"./chunk-QFUZ6MVT.js";import{b as v}from"./chunk-TVCWAJFT.js";import{a as R}from"./chunk-G22OJQWL.js";import{a as _,c as T,d as F}from"./chunk-PRCYNFKC.js";import{a as l}from"./chunk-G4EEZUTC.js";import{router as na}from"@inertiajs/react";import{Fragment as Re,jsx as M,jsxs as Q}from"react/jsx-runtime";var Pe=()=>{let{isModalOpen:e,setIsModalOpen:t,isLoading:o,process:n,step:r,isCustom:a,setStep:i,setValidationError:m}=u(),c=a()?"custom":"market",p=o?"loading":`${c}-${n}-${r}`,g=ve(p);return M(re,{open:e,onOpenChange:t,children:Q(ie,{className:"max-h-[90vh] overflow-auto break-all min-w-[50vh] max-w-[75vh] w-auto",children:[M(ce,{children:!o&&(g.title||g.description)&&Q(Re,{children:[M(Z,{className:"text-base text-lg",children:g.title}),M(L,{className:"text-sm",children:g.description}),M("hr",{})]})}),g.content,M(le,{children:r>1&&!o&&M("div",{className:"grid mx-auto",children:Q(v,{variant:"link",size:"sm",className:"flex items-center gap-1",onClick:()=>{i(r-1),m("")},children:[M(l,{iconName:"IconArrowLeft",className:"h-4 w-4"}),"Back"]})})})]})})};import{createContext as ze,useContext as Ze,useEffect as X,useState as b}from"react";import{jsx as He,jsxs as $e}from"react/jsx-runtime";var xe=ze({}),he=({children:e,packages:t,process:o="install",step:n=1,isValid:r=!1,is_custom:a=!1})=>{let i={title:"Loading",description:"Please wait while we process your request."},[m,c]=b(t),[p,g]=b(o),[f,y]=b(!1),[k,V]=b(n),[I,E]=b(null),[C,h]=b(null),[D,U]=b(r),[Le,ee]=b(""),[Be,ae]=b(!1),[Oe,J]=b(i),K=de();X(()=>{f||setTimeout(()=>{V(1),g(o),E(null),h(null),U(!1),ae(!1),ee(""),J(i)},250)},[f]),X(()=>{!C||!K||Object.values(K).forEach(A=>{A?.jobCode===`${C.code}_${p}`&&J({title:A.title,description:A.description,progress:A.progress,error:A.status==="failed"})})},[K]),X(()=>{c(t)},[t]);let te=()=>C?.is_custom===!1,Ue={packages:m,setPackages:c,process:p,setProcess:g,isModalOpen:f,setIsModalOpen:y,step:k,setStep:V,selectedFile:I,setSelectedFile:E,packageManifest:C,setPackageManifest:h,isValid:D,setIsValid:U,validationError:Le,setValidationError:ee,isLoading:Be,setIsLoading:ae,loadingContent:Oe,setLoadingContent:J,isOfficial:te,isCustom:()=>!te()};return $e(xe.Provider,{value:Ue,children:[e,He(Pe,{})]})},u=()=>{let e=Ze(xe);if(!e)throw new Error("PackageManagerContext must be used within a PackageManagerProvider");return e};import{Fragment as be,jsx as w,jsxs as $}from"react/jsx-runtime";var ve=e=>{let{loadingContent:t,validationError:o}=u(),n={title:t.title,description:t.description,content:$(be,{children:[w("div",{className:"animate-spin rounded-full h-15 w-15 border-b-2 border-primary mx-auto"}),$("div",{className:"text-center",children:[w(Z,{className:"text-base text-lg",children:t.title}),w(L,{className:"text-sm",children:t.description}),t.progress&&$(be,{children:[w(oe,{value:t.progress,className:"my-2"}),"%",t.progress]}),t.error&&w(L,{className:"text-red-500 text-sm",children:t.error})]})]})},r={title:null,description:null,content:$("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500",children:[w(l,{iconName:"IconExclamationCircleFilled",className:"text-red-500 h-15 w-15 mx-auto"}),w("span",{className:"text-2xl font-bold",children:"Error"}),w("span",{className:"text-sm text-muted-foreground",children:o})]})};if(o)return r;if(e=="loading")return n;let a=Ne(),i=ye(),[m,c,p]=e.split("-"),g=m,f=c,y=Number(p);return{custom:{install:{1:a.selectInstallationMethod,2:a.uploadPackageZipFile,3:a.customInstallSummary()},update:{1:a.uploadPackageZipFile,2:i.updateSummary()}},market:{update:{1:i.updateSummary()}}}[g]?.[f]?.[y]??a.selectInstallationMethod};import{unzip as qe}from"fflate";import{toast as We}from"sonner";var Je=e=>new Promise((t,o)=>{qe(e,(n,r)=>{if(n)return o(new Error("ZIP file is corrupted"));t(r)})}),Ce=async e=>{let{process:t,selectedFile:o,setIsLoading:n,step:r,setStep:a,setPackageManifest:i,setValidationError:m,setIsValid:c,packages:p,setLoadingContent:g}=e;try{if(!o)throw new Error("Please select a file.");if(n(!0),g({title:"Package Verifying",description:"Please wait while we verify the package."}),o.size>100*1024*1024)throw new Error("File should be less than 100MB");let f=new Uint8Array(await o.arrayBuffer()),y=await Je(f);if(!y["emincore.json"])throw new Error("Manifest (emincore.json) has not been found in the ZIP file.");let k=JSON.parse(new TextDecoder().decode(y["emincore.json"]));i(k);let I=["code","name","version","description","author","core_constraint"].filter(h=>k[h]==null||k[h]==="");if(I.length)throw new Error("Manifest is missing required fields: "+I.join(", "));let E=k.composer_package&&k.composer_package_version,C=k.npm_package&&k.npm_package_version;if(!E&&!C)throw new Error("Package must has at least one of composer package or npm package.");if(t=="update"){let h=ke(p.find(D=>D.code==k?.code),k);if(typeof h=="string")throw new Error(h)}c(!0)}catch(f){throw We.error(String(f)),m(String(f)),c(!1),f}finally{a(r+1),n(!1)}};import{router as ta,useForm as oa}from"@inertiajs/react";import{Fragment as Ke,jsx as q,jsxs as Me}from"react/jsx-runtime";var we=()=>{let{packages:e,selectedPackage:t,isDetailsModalOpen:o,setIsDetailsModalOpen:n}=W(),{setIsModalOpen:r,setProcess:a,setStep:i}=u(),m=Ee(),c=Ie();return Me(Ke,{children:[Me(v,{size:"sm",variant:"outline",className:"mb-4 flex items-center gap-2",onClick:()=>{r(!0),a("install"),i(1)},children:[q(l,{iconName:"IconUpload"}),q("span",{children:"Install Package"})]}),q(me,{columns:c,data:e,bulkActions:m}),t&&q(ue,{isModalOpen:o,setIsModalOpen:n,package:t})]})};import{router as Ye}from"@inertiajs/react";import{useEffect as Ge,useState as Qe}from"react";import{toast as De}from"sonner";import{Fragment as Se,jsx as s,jsxs as N}from"react/jsx-runtime";var Ie=()=>{let[e,t]=Qe(!0);Ge(()=>{t(!1);let a=setTimeout(()=>t(!0),50);return()=>clearTimeout(a)},[]);let{setSelectedPackage:o,setIsDetailsModalOpen:n}=W(),r=u();return[{id:"select",header:({table:a})=>s(Y,{checked:a.getIsAllPageRowsSelected()||a.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:i=>a.toggleAllPageRowsSelected(!!i),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:a,table:i})=>s(Y,{id:`select-row-${a.id}`,checked:a.getIsSelected(),onCheckedChange:m=>{a.toggleSelected(!!m)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"package",header:"Package",cell:({row:a})=>N("div",{className:"flex items-center gap-5 cursor-pointer",onClick:()=>{o(a.original),n(!0)},children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),N("span",{style:{display:e?"flex":"none"},className:"items-center gap-3",children:[s(l,{iconName:"IconPackage",className:"h-7 my-2 cursor-pointer"}),N("div",{className:"flex flex-col",children:[s("div",{className:"flex items-center gap-1",children:s(G,{pkg:a.original})}),s("span",{className:"text-muted-foreground text-xs",children:a.original.description?a.original.description.length>61?a.original?.description?.slice(0,60)+"...":a.original?.description:"No description"}),s("span",{className:"text-muted-foreground text-xs",children:a.original?.version})]})]})]})},{accessorKey:"is_active",header:()=>N(_,{trigger:"hover",children:[s(T,{children:"Status"}),s(F,{className:"w-auto",children:"Is the package enabled?"})]}),cell:({row:a})=>N(Se,{children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),s("div",{style:{display:e?"block":"none"},children:s(se,{checked:a.original.is_active,onCheckedChange:i=>{H([a.original.id],{is_active:i})}})})]})},{accessorKey:"actions",header:()=>N(_,{trigger:"hover",children:[s(T,{children:"Actions"}),s(F,{className:"w-auto",children:"Actions of the package"})]}),cell:({row:a})=>N(Se,{children:[s(R,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),N("div",{style:{display:e?"flex":"none"},className:"gap-2",children:[s(z,{title:"Uninstall Package",content:"Are you sure to uninstall this package?",onConfirm:()=>{Ye.post(route("dashboard.packages.manager"),{process:"uninstall",packageCode:a.original.code})},children:N(_,{trigger:"hover",children:[s(T,{children:s(v,{variant:"outline",size:"sm",className:"flex items-center",disabled:a.original.is_active,children:s(l,{iconName:"IconTrash",className:"h-4 w-4"})})}),s(F,{children:a.original.is_active?"Disable Package First":"Uninstall Package"})]})}),N(_,{trigger:"hover",children:[s(T,{children:s(v,{variant:"outline",size:"sm",className:"flex items-center",onClick:()=>{let i=a.original;r.setPackageManifest(i),r.setProcess("update"),r.setIsModalOpen(!0),r.setIsLoading(!0),i.is_custom||fe(r).then(m=>{if(typeof m=="boolean"&&m===!0)r.setLoadingContent({title:`${i.name} is up to date`,description:"No updates available"});else{let c=m;r.setPackageManifest({...c,is_custom:!1}),r.setStep(1),r.setIsLoading(!1)}})},children:s(l,{iconName:"IconRefresh",className:"h-4 w-4"})})}),s(F,{children:a.original.is_custom?"Update Package":"Check Updates"})]})]})]})}]},Ee=()=>[{label:"Enable",icon:s(l,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Enable Packages",confirmContent:"Are you sure to enable these packages?",confirmIcon:s(l,{iconName:"IconCheck",size:30}),cancel:()=>{De.info("Process cancelled")},action:(e,t)=>{let o=e.map(n=>n.original.id);H(o,{is_active:!0},n=>{n&&t&&t()})}},{label:"Disable",icon:s(l,{iconName:"IconCreativeCommonsNd",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Disable Packages",confirmContent:"Are you sure to disable these packages?",confirmIcon:s(l,{iconName:"IconCreativeCommonsNd",size:30}),cancel:()=>{De.info("Process cancelled")},action:(e,t)=>{let o=e.map(n=>n.original.id);H(o,{is_active:!1},n=>{n&&t&&t()})}}],nt=e=>({name:s(G,{pkg:e}),code:s("span",{className:"",children:e.code??"\u2014"}),version:s("span",{children:e?.version??"\u2014"}),author:s("span",{children:e?.author??"\u2014"}),status:s("span",{className:e?.is_active?"text-green-600":"text-destructive",children:e?.is_active?"Enabled":"Disabled"}),source:s("span",{className:e?.is_custom?"text-orange-400":"text-green-600",children:e?.is_custom?"Custom":"Marketplace"}),installedAt:s("span",{children:e?.created_at?new Date(e.created_at).toLocaleDateString():"\u2014"}),lastUpdatedAt:s("span",{children:e?.updated_at?new Date(e.updated_at).toLocaleDateString():"\u2014"})});import{createContext as Xe,useContext as je,useEffect as ea,useState as j}from"react";import{jsx as Ve}from"react/jsx-runtime";var Ae=Xe({}),_e=({packages:e,children:t})=>{let[o,n]=j(e),[r,a]=j(null),[i,m]=j(!1);ea(()=>{n(e)},[e]);let c={packages:o,setPackages:n,selectedPackage:r,setSelectedPackage:a,isDetailsModalOpen:i,setIsDetailsModalOpen:m};return Ve(he,{packages:o,children:Ve(Ae.Provider,{value:c,children:t})})},W=()=>{let e=je(Ae);if(!e)throw new Error("usePackagesContext must be used within a PackagesProvider");return e};import{Head as aa}from"@inertiajs/react";import{jsx as O,jsxs as Te}from"react/jsx-runtime";var xt=({packages:e})=>{let t=[{title:"WM Dashboard",href:route("dashboard")},{title:"Packages",href:"#"}];return Te(ge,{breadcrumbs:t,children:[O(aa,{title:"Packages"}),Te("div",{className:"container mx-auto",children:[O(pe,{title:"Packages",description:"Here you can see and manage all the system packages.",icon:O(l,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),O(_e,{packages:e,children:O(we,{})})]})]})};import{Fragment as Fe,jsx as d,jsxs as P}from"react/jsx-runtime";var Ne=()=>{let{process:e,setStep:t,selectedFile:o,setSelectedFile:n,isValid:r,packageManifest:a,validationError:i}=u(),m=u();return{selectInstallationMethod:{title:"Select Installation Method",description:"Choose whether to install the package from a file or a URL.",content:P("div",{className:"grid grid-cols-2 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>t(2),children:[d(l,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Manual Upload"}),d("p",{className:"text-sm",children:"Upload your custom package file"})]}),P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>ta.get(route("dashboard.packages.marketplace")),children:[d(l,{iconName:"IconShoppingBag",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Marketplace"}),d("p",{className:"text-sm",children:"Browse and install from marketplace"})]})]})},uploadPackageZipFile:{title:o?"Verify Package File":"Upload Package File",description:o?"Verify the package file to ensure it is valid.":"Upload your custom package file (.zip)",content:P("div",{className:"grid grid-cols-1 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer border-dashed "+(o?"border-gray-400 text-primary":"text-muted-foreground hover:border-gray-400 hover:text-primary transition-colors"),onDrop:c=>{c.preventDefault();let p=c.dataTransfer.files;if(p.length>0){n(p[0]);return}},onClick:()=>document.querySelector('input[type="file"]')?.click(),onDragOver:c=>c.preventDefault(),children:[o?P("div",{children:[d(l,{iconName:"IconFileTypeZip",className:"h-12 w-12 mx-auto mb-3"}),d("div",{className:"flex items-center justify-center gap-2",children:d("span",{className:"text-sm",children:o.name})})]}):P(Fe,{children:[d(l,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),d("h3",{className:"font-semibold mb-1",children:"Upload Package"}),P("p",{className:"text-sm",children:["Drag and drop or ",d("span",{className:"text-primary cursor-pointer",children:"choose file"})," to upload"]})]}),d("input",{type:"file",className:"hidden",onChange:c=>{c?.target?.files&&c.target.files.length>0&&(n(c.target.files[0]),c.target.files=null)}})]}),o&&P(Fe,{children:[P(v,{variant:"link",size:"sm",className:"w-full flex items-center",onClick:()=>n(null),children:[d(l,{iconName:"IconTrash",className:"h-4 w-4 text-muted-foreground cursor-pointer"}),"Delete"]}),d(v,{className:"w-full",variant:"outline",onClick:()=>Ce(m),children:"Verify Package"})]})]})},customInstallSummary:()=>{let{packages:c,setIsLoading:p}=u(),g=c.find(h=>h.code==a?.code)??!1,f=g!==!1,y=r?"Package Verified":"Package Not Verified",k=r?"Your package documents are valid. You can install it now.":"Your package is not verified. Please contact the package author for more information.",{post:V,recentlySuccessful:I,processing:E}=oa({process:e,packageCode:a?.code,version:a?.version,packageZip:o??null}),C=()=>{p(!0);let h=new Promise(D=>V(route("dashboard.packages.manager"),{onSuccess:()=>D(!0),onError:U=>D(U),onFinish:()=>p(!1)}))};return{title:y,description:k,content:r?P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer text-muted-foreground text-primary transition-colors",children:[d(B,{pkg:a}),P("div",{className:"mt-4",children:[d(z,{title:e=="install"?"Confirm Installation":"Confirm Update",content:d("div",{className:"!text-center",children:"This package has passed basic manifest validation only. This does not guarantee safety or full compatibility. Only proceed if you are absolutely certain of its origin and trust the source."}),confirmText:e=="install"?"Confirm and Install":"Confirm and Update",onConfirm:C,children:f?d(v,{className:"w-full",variant:"outline",disabled:!0,children:"Installed"}):P(ne,{recentlySuccessful:I,processing:E,children:[d(l,{iconName:e=="install"?"IconDownload":"IconRefresh"}),d("span",{children:e=="install"?"Install Package":"Update Package"})]})}),f&&P("div",{className:"text-red-500 my-3",children:[g.code," - ",g.version," already exists."]})]})]}):d("div",{children:i??"An error occurred while verifying the package. Please contact the package author for more information."})}}}};import{Fragment as sa,jsx as x,jsxs as S}from"react/jsx-runtime";var ye=()=>{let{packages:e,packageManifest:t,validationError:o,isCustom:n}=u();return{updateSummary:()=>{let r="Package Updates",a="Here are the latest updates for this package.",i=e.find(p=>p.code===t?.code),m=t,c=m?.version!=i?.version;return!c&&i?.is_custom===!1&&(r=a=null),{title:r,description:a,content:x(sa,{children:!c&&i?.is_custom===!1?S("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500 !border-none",children:[x(l,{iconName:"IconCircleCheckFilled",className:"text-green-500 h-15 w-15 mx-auto"}),S("span",{className:"text-2xl font-bold",children:[i.name," is up to date!"]}),x("span",{className:"text-sm text-muted-foreground",children:"There are no updates available for this package."})]}):S("div",{className:"grid grid-cols-1 gap-3",children:[S("div",{className:"grid grid-cols-[4fr_40px_4fr] gap-2",children:[S("div",{className:"!opacity-70",children:[x("span",{className:"font-bold mb-2 block text-center",children:"Old Version"}),x("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:i&&x(B,{pkg:i})})]}),x("div",{className:"flex items-center justify-center",children:x(l,{iconName:"IconArrowBarRight",className:"h-10 w-10"})}),S("div",{children:[x("span",{className:"font-bold mb-2 block text-center",children:"New Version"}),x("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:m&&x(B,{pkg:{...m,is_active:!1,is_custom:n(),id:0}})})]})]}),x(v,{className:"w-full mt-2",variant:"outline",disabled:!!o,children:"Update Package"})]})})}}}};var to=()=>{let{process:e,packageManifest:t,selectedFile:o,setIsLoading:n}=u();t&&(n(!0),na.post(route("dashboard.packages.manager"),{process:e,packageCode:t.code,version:t.version,packageZip:o??null}))};export{to as a,Pe as b,he as c,u as d,ve as e,Ce as f,we as g,Ie as h,Ee as i,nt as j,_e as k,W as l,xt as m,Ne as n,ye as o};
@@ -1 +1 @@
1
- import{B as d,da as m,ha as l,k as n}from"./chunk-6H7NPW5T.js";import{a as i}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{a as o,b as c,f as t}from"./chunk-3DBYUBWW.js";import{Head as p}from"@inertiajs/react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var A=({mustVerifyEmail:s,status:f})=>r(d,{breadcrumbs:[{title:"Edit Profile",href:route("user.profile.edit"),icon:"IconEdit"}],children:[e(p,{title:"Account Settings"}),r("div",{className:"grid md:grid-cols-[2fr_4fr] gap-12",children:[e(m,{}),r(o,{children:[e(c,{children:e(i,{icon:e(a,{iconName:"IconUser"}),title:"Profile Information",description:"Update your name and email address"})}),e(t,{children:e(l,{mustVerifyEmail:s,status:f})})]}),e(o,{className:"col-span-full",children:r(t,{className:"grid gap-8 md:flex md:items-center",children:[e(i,{icon:e(a,{iconName:"IconPalette"}),title:"Appearance",description:"Change your account appearance"}),e(n,{className:"md:ml-auto"})]})})]})]});export{A as a};
1
+ import{B as d,da as m,ha as l,k as n}from"./chunk-QYMVOLIB.js";import{a as o,b as c,f as t}from"./chunk-3DBYUBWW.js";import{a as i}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{Head as p}from"@inertiajs/react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var A=({mustVerifyEmail:s,status:f})=>r(d,{breadcrumbs:[{title:"Edit Profile",href:route("user.profile.edit"),icon:"IconEdit"}],children:[e(p,{title:"Account Settings"}),r("div",{className:"grid md:grid-cols-[2fr_4fr] gap-12",children:[e(m,{}),r(o,{children:[e(c,{children:e(i,{icon:e(a,{iconName:"IconUser"}),title:"Profile Information",description:"Update your name and email address"})}),e(t,{children:e(l,{mustVerifyEmail:s,status:f})})]}),e(o,{className:"col-span-full",children:r(t,{className:"grid gap-8 md:flex md:items-center",children:[e(i,{icon:e(a,{iconName:"IconPalette"}),title:"Appearance",description:"Change your account appearance"}),e(n,{className:"md:ml-auto"})]})})]})]});export{A as a};
@@ -1 +1 @@
1
- import{a as T,d as B}from"./chunk-IGNMN2AK.js";import{a as D}from"./chunk-MEURTOUQ.js";import{a as U}from"./chunk-65LRDGYI.js";import{a as r}from"./chunk-G4EEZUTC.js";import{a as f,b as x,c as N,d as b,f as k}from"./chunk-3DBYUBWW.js";import{b as c}from"./chunk-TVCWAJFT.js";import{a as d}from"./chunk-GND5KQRZ.js";import{a as C}from"./chunk-DWAU5VTB.js";import{Link as A}from"@inertiajs/react";import{useEffect as R,useState as p}from"react";import{toast as O}from"sonner";import{IconAlertCircleFilled as V,IconArrowUpRight as q,IconCircleCheckFilled as F,IconRefresh as L}from"@tabler/icons-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var te=({account:n})=>e(U,{title:"My Platform Account",icon:"IconUserCircle",description:"Manage your platform account settings.",className:"col-span-full",buttons:n?e(c,{variant:"outline",size:"sm",children:t("a",{href:"https://emincore.io/login",target:"_blank",className:"flex items-center gap-2",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:n})]})}):e(A,{href:route("dashboard.marketplace"),className:"flex items-center gap-2",children:t(c,{variant:"default",size:"sm",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:"Connect to Platform"})]})})}),ae=({eminCore:n})=>t(f,{className:"col-span-2",children:[t(x,{children:[t(N,{className:"flex gap-1",children:[t("div",{className:"grid gap-2",children:[e("img",{src:"https://emin.llc/wp-content/uploads/2022/11/siyah-logo-arkasiz.svg",className:"h-8"}),e("span",{className:"text-xl font-bold text-primary",children:"EminCore - The Cross-Ecosystem Orchestrator"})]}),t("div",{className:"ml-auto flex max-w-[400px] flex-wrap gap-1",children:[t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconCode",className:"h-4 w-4"}),t("span",{className:"text-xs font-bold",children:["v",n.version]})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBuilding",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Emin Tech"})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBook",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Docs"})]})]})]}),e(b,{children:e("p",{children:"A modular application platform that orchestrates Composer and npm ecosystems through a unified package architecture, marketplace, and runtime."})})]}),e(k,{className:"grid gap-6",children:e(H,{})})]}),se=({requirements:n})=>{let s=({requirement:o})=>{let i=Math.random()*500+800,[u,l]=p(!0);return p(()=>{let g=setTimeout(()=>l(!1),i);return()=>clearTimeout(g)}),u?e(r,{iconName:"IconLoader2",className:"animate-spin mx-auto h-4 w-4 my-0.5"}):e("span",{className:d("font-mono font-bold text-sm",o.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:o.value??"-"})};return t(f,{className:"col-span-2",children:[e(x,{children:t(N,{className:"flex items-center gap-2",children:[e(r,{iconName:"IconServer",className:"h-5 w-5 text-primary"}),e("h3",{className:"font-semibold",children:"System Status"})]})}),e(k,{children:e("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:n?.map(o=>t("div",{className:"rounded-md border p-3 text-center grid gap-[1px]",children:[t("span",{className:"text-xs text-muted-foreground mx-auto flex items-center gap-1",children:[e(r,{iconName:o.icon,className:"h-4 w-4 text-primary mx-auto"}),o.title]}),e(s,{requirement:o}),o.requirements&&e("span",{className:"font-mono font-bold text-xs text-muted-foreground",children:o.requirements})]}))})})]})},oe=()=>t("div",{className:"col-span-2 text-center grid gap-3",children:[t("p",{className:"text-sm text-muted-foreground px-5 mx-auto",children:["A two-year R&D effort carried out by a single-person team resulted in the completion of this platform and ecosystem. It provides users with a unique infrastructure built on the most modern and powerful technology stacks. This infrastructure enables you to prepare your project in the shortest possible time while achieving maximum performance, user engagement, and rich functionality.",e("br",{}),"Thank you for choosing us."]}),e("img",{src:"https://eminilhan.com/wp-content/uploads/2023/04/beyaz-logo-1.png",className:"h-10 mx-auto"})]}),H=()=>{let n=localStorage?.getItem("last_core_update_checked"),[s,o]=p(localStorage?.getItem("is_core_up_to_date")==="true"),[i,u]=p(n?new Date(n):null),[l,g]=p(localStorage?.getItem("last_core_update_version")??"");R(()=>{localStorage.setItem("is_core_up_to_date",s?"true":"false"),localStorage.setItem("last_core_update_version",typeof l=="string"?l:""),localStorage.setItem("last_core_update_checked",i?i.toISOString():"")},[s,l,i]);let v=B(),{packages:y,isLoading:a,setIsLoading:M,setIsModalOpen:P,setPackageManifest:w,setProcess:I}=v,E=()=>a?e(L,{className:"h-6 w-6 text-primary animate-spin shrink-0"}):s?e(F,{className:"h-6 w-6 text-green-600 dark:text-green-400 shrink-0"}):e(V,{className:"h-6 w-6 text-blue-600 dark:text-blue-500 shrink-0"}),z=()=>t("div",{className:"grid",children:[e("span",{className:d("text-sm font-medium",a?"text-primary":s?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-500"),children:a?"Checking updates...":s?"System is up to date!":"New version available!"}),t("span",{className:"text-xs text-primary/70",children:[s?"Last checked: "+(i?.toLocaleString()??"never"):"You should update your system to the latest version!",!s&&l&&" (Latest version: "+l+")"]})]});return t("div",{className:"grid md:flex md:items-center gap-2",children:[e(()=>t("div",{className:"flex items-center gap-2",children:[e(E,{}),e(z,{})]}),{}),t("div",{className:"grid md:flex md:items-center gap-3 md:ml-auto",children:[e(()=>!s&&!a&&t(c,{size:"sm",variant:"ghost",className:d("gap-2"),onClick:()=>{a||(I("update"),M(!0),w({...y.find(h=>h.code==C),version:"latest"}),P(!0),T())},"aria-readonly":a,children:[e(q,{className:d("h-4 w-4")}),"Update Now"]}),{}),e(()=>{let h=()=>{if(!i)return!0;let m=new Date().getTime()-i.getTime(),S=60*1e3-m;if(S>0)return O.warning(`Please wait ${Math.ceil(S/1e3)} seconds before checking again.`),!1;let _=new Date().toISOString();return u(new Date(_)),localStorage.setItem("last_core_update_checked",_),!0};return t(c,{size:"sm",variant:"outline",className:d("gap-2",a&&"animate-pulse"),onClick:()=>{a||!h()||(I("update"),w(y.find(m=>m.code==C)),D(v).then(m=>{o(m===!0),typeof m!="boolean"&&g(m.version)}).catch())},"aria-readonly":a,children:[e(L,{className:d("h-4 w-4",a&&"animate-spin")}),a?"Checking updates...":"Check Updates"]})},{})]})]})};export{te as a,ae as b,se as c,oe as d};
1
+ import{a as T,d as B}from"./chunk-FUYZM7RW.js";import{a as D}from"./chunk-MEURTOUQ.js";import{a as f,b as x,c as N,d as b,f as k}from"./chunk-3DBYUBWW.js";import{a as U}from"./chunk-65LRDGYI.js";import{b as c}from"./chunk-TVCWAJFT.js";import{a as r}from"./chunk-G4EEZUTC.js";import{a as d}from"./chunk-GND5KQRZ.js";import{a as C}from"./chunk-DWAU5VTB.js";import{Link as A}from"@inertiajs/react";import{useEffect as R,useState as p}from"react";import{toast as O}from"sonner";import{IconAlertCircleFilled as V,IconArrowUpRight as q,IconCircleCheckFilled as F,IconRefresh as L}from"@tabler/icons-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var te=({account:n})=>e(U,{title:"My Platform Account",icon:"IconUserCircle",description:"Manage your platform account settings.",className:"col-span-full",buttons:n?e(c,{variant:"outline",size:"sm",children:t("a",{href:"https://emincore.io/login",target:"_blank",className:"flex items-center gap-2",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:n})]})}):e(A,{href:route("dashboard.marketplace"),className:"flex items-center gap-2",children:t(c,{variant:"default",size:"sm",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:"Connect to Platform"})]})})}),ae=({eminCore:n})=>t(f,{className:"col-span-2",children:[t(x,{children:[t(N,{className:"flex gap-1",children:[t("div",{className:"grid gap-2",children:[e("img",{src:"https://emin.llc/wp-content/uploads/2022/11/siyah-logo-arkasiz.svg",className:"h-8"}),e("span",{className:"text-xl font-bold text-primary",children:"EminCore - The Cross-Ecosystem Orchestrator"})]}),t("div",{className:"ml-auto flex max-w-[400px] flex-wrap gap-1",children:[t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconCode",className:"h-4 w-4"}),t("span",{className:"text-xs font-bold",children:["v",n.version]})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBuilding",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Emin Tech"})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBook",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Docs"})]})]})]}),e(b,{children:e("p",{children:"A modular application platform that orchestrates Composer and npm ecosystems through a unified package architecture, marketplace, and runtime."})})]}),e(k,{className:"grid gap-6",children:e(H,{})})]}),se=({requirements:n})=>{let s=({requirement:o})=>{let i=Math.random()*500+800,[u,l]=p(!0);return p(()=>{let g=setTimeout(()=>l(!1),i);return()=>clearTimeout(g)}),u?e(r,{iconName:"IconLoader2",className:"animate-spin mx-auto h-4 w-4 my-0.5"}):e("span",{className:d("font-mono font-bold text-sm",o.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:o.value??"-"})};return t(f,{className:"col-span-2",children:[e(x,{children:t(N,{className:"flex items-center gap-2",children:[e(r,{iconName:"IconServer",className:"h-5 w-5 text-primary"}),e("h3",{className:"font-semibold",children:"System Status"})]})}),e(k,{children:e("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:n?.map(o=>t("div",{className:"rounded-md border p-3 text-center grid gap-[1px]",children:[t("span",{className:"text-xs text-muted-foreground mx-auto flex items-center gap-1",children:[e(r,{iconName:o.icon,className:"h-4 w-4 text-primary mx-auto"}),o.title]}),e(s,{requirement:o}),o.requirements&&e("span",{className:"font-mono font-bold text-xs text-muted-foreground",children:o.requirements})]}))})})]})},oe=()=>t("div",{className:"col-span-2 text-center grid gap-3",children:[t("p",{className:"text-sm text-muted-foreground px-5 mx-auto",children:["A two-year R&D effort carried out by a single-person team resulted in the completion of this platform and ecosystem. It provides users with a unique infrastructure built on the most modern and powerful technology stacks. This infrastructure enables you to prepare your project in the shortest possible time while achieving maximum performance, user engagement, and rich functionality.",e("br",{}),"Thank you for choosing us."]}),e("img",{src:"https://eminilhan.com/wp-content/uploads/2023/04/beyaz-logo-1.png",className:"h-10 mx-auto"})]}),H=()=>{let n=localStorage?.getItem("last_core_update_checked"),[s,o]=p(localStorage?.getItem("is_core_up_to_date")==="true"),[i,u]=p(n?new Date(n):null),[l,g]=p(localStorage?.getItem("last_core_update_version")??"");R(()=>{localStorage.setItem("is_core_up_to_date",s?"true":"false"),localStorage.setItem("last_core_update_version",typeof l=="string"?l:""),localStorage.setItem("last_core_update_checked",i?i.toISOString():"")},[s,l,i]);let v=B(),{packages:y,isLoading:a,setIsLoading:M,setIsModalOpen:P,setPackageManifest:w,setProcess:I}=v,E=()=>a?e(L,{className:"h-6 w-6 text-primary animate-spin shrink-0"}):s?e(F,{className:"h-6 w-6 text-green-600 dark:text-green-400 shrink-0"}):e(V,{className:"h-6 w-6 text-blue-600 dark:text-blue-500 shrink-0"}),z=()=>t("div",{className:"grid",children:[e("span",{className:d("text-sm font-medium",a?"text-primary":s?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-500"),children:a?"Checking updates...":s?"System is up to date!":"New version available!"}),t("span",{className:"text-xs text-primary/70",children:[s?"Last checked: "+(i?.toLocaleString()??"never"):"You should update your system to the latest version!",!s&&l&&" (Latest version: "+l+")"]})]});return t("div",{className:"grid md:flex md:items-center gap-2",children:[e(()=>t("div",{className:"flex items-center gap-2",children:[e(E,{}),e(z,{})]}),{}),t("div",{className:"grid md:flex md:items-center gap-3 md:ml-auto",children:[e(()=>!s&&!a&&t(c,{size:"sm",variant:"ghost",className:d("gap-2"),onClick:()=>{a||(I("update"),M(!0),w({...y.find(h=>h.code==C),version:"latest"}),P(!0),T())},"aria-readonly":a,children:[e(q,{className:d("h-4 w-4")}),"Update Now"]}),{}),e(()=>{let h=()=>{if(!i)return!0;let m=new Date().getTime()-i.getTime(),S=60*1e3-m;if(S>0)return O.warning(`Please wait ${Math.ceil(S/1e3)} seconds before checking again.`),!1;let _=new Date().toISOString();return u(new Date(_)),localStorage.setItem("last_core_update_checked",_),!0};return t(c,{size:"sm",variant:"outline",className:d("gap-2",a&&"animate-pulse"),onClick:()=>{a||!h()||(I("update"),w(y.find(m=>m.code==C)),D(v).then(m=>{o(m===!0),typeof m!="boolean"&&g(m.version)}).catch())},"aria-readonly":a,children:[e(L,{className:d("h-4 w-4",a&&"animate-spin")}),a?"Checking updates...":"Check Updates"]})},{})]})]})};export{te as a,ae as b,se as c,oe as d};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-HDYNFDEV.js";import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as L}from"./chunk-KND3PUAR.js";import{a as P}from"./chunk-JVMILYS7.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as D}from"./chunk-G22OJQWL.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{useEffect as F}from"react";import{Head as U,usePage as W}from"@inertiajs/react";import{createContext as J,useContext as K,useState as p}from"react";import{jsx as O}from"react/jsx-runtime";var _=J({}),E=({children:t,slugGroups:a,onChange:u})=>{let[l,i]=p(a),[d,c]=p(""),[n,m]=p(new Set),[N,r]=p(new Set),[f,v]=p(new Set),[x,y]=p({}),[k,A]=p({}),j={onChange:u,slugGroups:l,setSlugGroups:i,searchTerm:d,setSearchTerm:c,expandedGroups:n,setExpandedGroups:m,expandedSlugs:N,setExpandedSlugs:r,invalidSlugs:f,setInvalidSlugs:v,slugInputTemps:x,setSlugInputTemps:y,slugInput:k,setSlugInput:A,toggleSlug:g=>{r(S=>{let w=new Set(S);return w.has(g)?w.delete(g):w.add(g),w})},setAllExpanded:g=>{g?(m(new Set(B(l))),r(new Set(V(l)))):(m(new Set),r(new Set))},toggleGroup:g=>{let S=new Set(n);S.has(g)?S.delete(g):S.add(g),m(S)}};return O(_.Provider,{value:j,children:t})},h=()=>{let t=K(_);if(!t)throw new Error("useSlugs sadece SlugsProvider i\xE7inde kullan\u0131labilir!");return t};import{jsx as e,jsxs as s}from"react/jsx-runtime";var $=()=>{let{slugGroups:t,searchTerm:a,setSearchTerm:u,setExpandedGroups:l,setSlugInputTemps:i,setSlugInput:d,setAllExpanded:c}=h();return F(()=>{let n=R(t);i(n),d(n)},[t]),F(()=>{if(a){let n=new Set;H(t,n,a),l(n)}},[a]),s("div",{className:"p-4",children:[e("div",{className:"mb-4",children:s("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e(o,{iconName:"IconSearch",className:"h-5 w-5 text-gray-400"})}),e(C,{type:"text",className:"pr-10 focus-visible:ring-0"+(a?"border-gray-400":""),placeholder:"Searchs...",value:a,onChange:n=>u(n.target.value)})]})}),s("div",{className:"mb-4 grid grid-cols-1 lg:flex gap-2",children:[s(G,{size:"sm",variant:"outline",onClick:()=>c(!1),className:"flex items-center gap-2",children:[e(o,{iconName:"IconMinimize"}),"Collapse All"]}),s(G,{size:"sm",variant:"outline",onClick:()=>c(!0),className:"flex items-center gap-2",children:[e(o,{iconName:"IconArrowsMaximize"}),"Expand All"]})]}),e("div",{className:"space-y-2",children:t.length>0?z(t,a).map(n=>e(q,{group:n,depth:0},n.id)):s("div",{className:"text-center py-8 text-muted-foreground",children:[e(o,{iconName:"IconSearch",className:"mx-auto mb-2",size:24}),e("p",{children:"Arama kriterlerinize uygun sonu\xE7 bulunamad\u0131."})]})})]})},X=({slug:t})=>{let{expandedSlugs:a,searchTerm:u,setSlugInputTemps:l,slugInputTemps:i,setSlugInput:d,slugInput:c,setInvalidSlugs:n,invalidSlugs:m,onChange:N,toggleSlug:r}=h(),{title:f,description:v}=t?.slug_data??{title:"N/A",description:"N/A"},x=a.has(t.id),y=b(f,u),k=b(v,u);return e("div",{className:"ml-6 p-2 pr-0 border-l-2 border-accent",children:s("div",{className:`dark:bg-[#101010] bg-accent rounded-lg p-3 grid grid-cols-1 items-center shadow-sm ${y||k?"bg-accent/50":""}`,children:[s("button",{onClick:()=>r(t.id),className:"flex items-center gap-2 w-full text-left",children:[x?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),s("div",{className:"flex items-center gap-1 w-full",children:[e(o,{iconName:t.icon??"IconLink"}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:y?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:t.slug_data.title}):f}),e("p",{className:"text-sm",children:k?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:v}):v})]})]})]}),s("div",{className:`${x?"grid":"hidden"}`,children:[e("hr",{className:"mb-5 mt-2"}),e("div",{children:e("div",{className:"flex gap-2",children:e("div",{className:"w-full",children:e("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-2",children:s("div",{className:"group relative",children:[e(C,{id:t.id.toString(),type:"text",required:!0,defaultValue:i[t.id],onBlur:I=>{l({...i,[t.id]:I.target.value})},placeholder:"slug",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off","aria-invalid":m.has(t.id)}),e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:e(o,{iconName:t.icon??"IconLink",size:16})}),e("div",{className:"absolute inset-y-0 end-0 flex items-center justify-center gap-1",children:s(G,{variant:"ghost",disabled:i[t.id]===c[t.id],onClick:()=>{let I={...t,slug:i[t.id]};N(I,M=>{M?d({...c,[t.id]:i[t.id]}):n(new Set(m).add(t.id))})},children:[e(o,{iconName:t.icon??"IconDeviceFloppy",size:16}),e("span",{className:"text-xs",children:"Save"})]})})]})},t.code)})})})]})]})},t.code)},q=({group:t,depth:a=0})=>{let{expandedGroups:u,toggleGroup:l}=h(),{title:i,description:d}=t?.group_data??{title:"N/A",description:"N/A"},c=u.has(t.id),n=b(i),m=b(d);return s("div",{children:[s("button",{onClick:()=>l(t.id),className:`w-full flex items-center p-3 rounded-lg dark:bg-[#101010] bg-accent hover:bg-accent/20 transition-colors ${n||m?"bg-accent/50":"bg-accent"}`,children:[c?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),e(o,{iconName:t.icon??"IconLink",className:"ml-2",fallback:e(D,{className:"w-5 h-5"})}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:n?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:i}):i}),e("p",{className:"text-sm",children:m?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:d}):d})]})]}),c&&s("div",{className:"mt-2",children:[e("div",{className:"mb-2",style:{marginLeft:a*16},children:t.slugs?.map(r=>e(X,{slug:r},r.id))}),Array.isArray(t.childrens)&&t.childrens.length>0&&e("div",{className:"mt-2",style:{marginLeft:(a<1?1:a)*16},children:t.childrens.map(r=>e("div",{className:"mb-2",style:{marginLeft:a*16},children:e(q,{group:r,depth:a+1},r.id)}))}),Number(t.slugs?.length)<1&&Number(t.childrens?.length)<1&&e("div",{className:"text-sm text-muted-foreground mt-2 ml-4",children:"There is no slugs or child groups found."})]})]},t.code)},Q=({slugGroups:t})=>{let a=[{title:"Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Slugs",href:route("dashboard.settings.slugs")}],{eminLang:u}=W().props;return s(P,{breadcrumbs:a,children:[e(U,{title:"Slugs"}),s("div",{className:"container mx-auto",children:[e(L,{title:"Slugs",description:"Here you can see and manage all the system slugs.",icon:e(o,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),u?.multiLanguage&&s("div",{className:"flex items-center gap-4",children:[e(o,{iconName:"IconAlertTriangle",className:"h-10 w-10 my-2 text-red-500"}),s("div",{children:[e("h3",{className:"font-bold text-lg",children:"Dikkat!"}),e("span",{className:"text-muted-foreground",children:"Sisteminizde \xE7oklu dil eklentisi aktiftir. Bu sebeple buradaki link yap\u0131lar\u0131 \xE7oklu dil eklentisi aktif oldu\u011Fu s\xFCre boyunca \xE7al\u0131\u015Fmayacakt\u0131r."})]})]}),e(E,{slugGroups:t,onChange:(l,i)=>{T(l,d=>{d?(l.slug=l.slug,i?.(!0)):i?.(!1)})},children:e($,{})})]})]})};export{$ as a,X as b,q as c,Q as d,E as e,h as f};
1
+ import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as T}from"./chunk-HDYNFDEV.js";import{a as L}from"./chunk-KND3PUAR.js";import{a as P}from"./chunk-BTQRVGVP.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{a as D}from"./chunk-G22OJQWL.js";import{a as o}from"./chunk-G4EEZUTC.js";import{useEffect as F}from"react";import{Head as U,usePage as W}from"@inertiajs/react";import{createContext as J,useContext as K,useState as p}from"react";import{jsx as O}from"react/jsx-runtime";var _=J({}),E=({children:t,slugGroups:a,onChange:u})=>{let[l,i]=p(a),[d,c]=p(""),[n,m]=p(new Set),[N,r]=p(new Set),[f,v]=p(new Set),[x,y]=p({}),[k,A]=p({}),j={onChange:u,slugGroups:l,setSlugGroups:i,searchTerm:d,setSearchTerm:c,expandedGroups:n,setExpandedGroups:m,expandedSlugs:N,setExpandedSlugs:r,invalidSlugs:f,setInvalidSlugs:v,slugInputTemps:x,setSlugInputTemps:y,slugInput:k,setSlugInput:A,toggleSlug:g=>{r(S=>{let w=new Set(S);return w.has(g)?w.delete(g):w.add(g),w})},setAllExpanded:g=>{g?(m(new Set(B(l))),r(new Set(V(l)))):(m(new Set),r(new Set))},toggleGroup:g=>{let S=new Set(n);S.has(g)?S.delete(g):S.add(g),m(S)}};return O(_.Provider,{value:j,children:t})},h=()=>{let t=K(_);if(!t)throw new Error("useSlugs sadece SlugsProvider i\xE7inde kullan\u0131labilir!");return t};import{jsx as e,jsxs as s}from"react/jsx-runtime";var $=()=>{let{slugGroups:t,searchTerm:a,setSearchTerm:u,setExpandedGroups:l,setSlugInputTemps:i,setSlugInput:d,setAllExpanded:c}=h();return F(()=>{let n=R(t);i(n),d(n)},[t]),F(()=>{if(a){let n=new Set;H(t,n,a),l(n)}},[a]),s("div",{className:"p-4",children:[e("div",{className:"mb-4",children:s("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e(o,{iconName:"IconSearch",className:"h-5 w-5 text-gray-400"})}),e(C,{type:"text",className:"pr-10 focus-visible:ring-0"+(a?"border-gray-400":""),placeholder:"Searchs...",value:a,onChange:n=>u(n.target.value)})]})}),s("div",{className:"mb-4 grid grid-cols-1 lg:flex gap-2",children:[s(G,{size:"sm",variant:"outline",onClick:()=>c(!1),className:"flex items-center gap-2",children:[e(o,{iconName:"IconMinimize"}),"Collapse All"]}),s(G,{size:"sm",variant:"outline",onClick:()=>c(!0),className:"flex items-center gap-2",children:[e(o,{iconName:"IconArrowsMaximize"}),"Expand All"]})]}),e("div",{className:"space-y-2",children:t.length>0?z(t,a).map(n=>e(q,{group:n,depth:0},n.id)):s("div",{className:"text-center py-8 text-muted-foreground",children:[e(o,{iconName:"IconSearch",className:"mx-auto mb-2",size:24}),e("p",{children:"Arama kriterlerinize uygun sonu\xE7 bulunamad\u0131."})]})})]})},X=({slug:t})=>{let{expandedSlugs:a,searchTerm:u,setSlugInputTemps:l,slugInputTemps:i,setSlugInput:d,slugInput:c,setInvalidSlugs:n,invalidSlugs:m,onChange:N,toggleSlug:r}=h(),{title:f,description:v}=t?.slug_data??{title:"N/A",description:"N/A"},x=a.has(t.id),y=b(f,u),k=b(v,u);return e("div",{className:"ml-6 p-2 pr-0 border-l-2 border-accent",children:s("div",{className:`dark:bg-[#101010] bg-accent rounded-lg p-3 grid grid-cols-1 items-center shadow-sm ${y||k?"bg-accent/50":""}`,children:[s("button",{onClick:()=>r(t.id),className:"flex items-center gap-2 w-full text-left",children:[x?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),s("div",{className:"flex items-center gap-1 w-full",children:[e(o,{iconName:t.icon??"IconLink"}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:y?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:t.slug_data.title}):f}),e("p",{className:"text-sm",children:k?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:v}):v})]})]})]}),s("div",{className:`${x?"grid":"hidden"}`,children:[e("hr",{className:"mb-5 mt-2"}),e("div",{children:e("div",{className:"flex gap-2",children:e("div",{className:"w-full",children:e("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-2",children:s("div",{className:"group relative",children:[e(C,{id:t.id.toString(),type:"text",required:!0,defaultValue:i[t.id],onBlur:I=>{l({...i,[t.id]:I.target.value})},placeholder:"slug",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off","aria-invalid":m.has(t.id)}),e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:e(o,{iconName:t.icon??"IconLink",size:16})}),e("div",{className:"absolute inset-y-0 end-0 flex items-center justify-center gap-1",children:s(G,{variant:"ghost",disabled:i[t.id]===c[t.id],onClick:()=>{let I={...t,slug:i[t.id]};N(I,M=>{M?d({...c,[t.id]:i[t.id]}):n(new Set(m).add(t.id))})},children:[e(o,{iconName:t.icon??"IconDeviceFloppy",size:16}),e("span",{className:"text-xs",children:"Save"})]})})]})},t.code)})})})]})]})},t.code)},q=({group:t,depth:a=0})=>{let{expandedGroups:u,toggleGroup:l}=h(),{title:i,description:d}=t?.group_data??{title:"N/A",description:"N/A"},c=u.has(t.id),n=b(i),m=b(d);return s("div",{children:[s("button",{onClick:()=>l(t.id),className:`w-full flex items-center p-3 rounded-lg dark:bg-[#101010] bg-accent hover:bg-accent/20 transition-colors ${n||m?"bg-accent/50":"bg-accent"}`,children:[c?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),e(o,{iconName:t.icon??"IconLink",className:"ml-2",fallback:e(D,{className:"w-5 h-5"})}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:n?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:i}):i}),e("p",{className:"text-sm",children:m?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:d}):d})]})]}),c&&s("div",{className:"mt-2",children:[e("div",{className:"mb-2",style:{marginLeft:a*16},children:t.slugs?.map(r=>e(X,{slug:r},r.id))}),Array.isArray(t.childrens)&&t.childrens.length>0&&e("div",{className:"mt-2",style:{marginLeft:(a<1?1:a)*16},children:t.childrens.map(r=>e("div",{className:"mb-2",style:{marginLeft:a*16},children:e(q,{group:r,depth:a+1},r.id)}))}),Number(t.slugs?.length)<1&&Number(t.childrens?.length)<1&&e("div",{className:"text-sm text-muted-foreground mt-2 ml-4",children:"There is no slugs or child groups found."})]})]},t.code)},Q=({slugGroups:t})=>{let a=[{title:"Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Slugs",href:route("dashboard.settings.slugs")}],{eminLang:u}=W().props;return s(P,{breadcrumbs:a,children:[e(U,{title:"Slugs"}),s("div",{className:"container mx-auto",children:[e(L,{title:"Slugs",description:"Here you can see and manage all the system slugs.",icon:e(o,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),u?.multiLanguage&&s("div",{className:"flex items-center gap-4",children:[e(o,{iconName:"IconAlertTriangle",className:"h-10 w-10 my-2 text-red-500"}),s("div",{children:[e("h3",{className:"font-bold text-lg",children:"Dikkat!"}),e("span",{className:"text-muted-foreground",children:"Sisteminizde \xE7oklu dil eklentisi aktiftir. Bu sebeple buradaki link yap\u0131lar\u0131 \xE7oklu dil eklentisi aktif oldu\u011Fu s\xFCre boyunca \xE7al\u0131\u015Fmayacakt\u0131r."})]})]}),e(E,{slugGroups:t,onChange:(l,i)=>{T(l,d=>{d?(l.slug=l.slug,i?.(!0)):i?.(!1)})},children:e($,{})})]})]})};export{$ as a,X as b,q as c,Q as d,E as e,h as f};
@@ -1 +1 @@
1
- import{a as l,ua as v,y as h}from"./chunk-6H7NPW5T.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as b}from"./chunk-G4EEZUTC.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-EWPOEDQB.js";import{b as t}from"./chunk-TVCWAJFT.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
1
+ import{a as l,ua as v,y as h}from"./chunk-QYMVOLIB.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-VR747T3H.js";import{b as t}from"./chunk-TVCWAJFT.js";import{a as b}from"./chunk-G4EEZUTC.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
@@ -1 +1 @@
1
- import{a as U,b as g}from"./chunk-KYNCXEGC.js";import{b as R}from"./chunk-B4FQFQOO.js";import{a as W,b as q,c as k,d as h}from"./chunk-HZVHIJJY.js";import{a as G}from"./chunk-I3QZZ3J3.js";import{a as d}from"./chunk-KND3PUAR.js";import{a as F}from"./chunk-JVMILYS7.js";import{f as m,g as _}from"./chunk-6H7NPW5T.js";import{a as N}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{a as I}from"./chunk-DSY4KVMF.js";import{a as M,b as w,c as B,d as H,f as x}from"./chunk-3DBYUBWW.js";import{b as y}from"./chunk-TVCWAJFT.js";import{a as f,d as L}from"./chunk-GND5KQRZ.js";import{Head as oe}from"@inertiajs/react";import{jsx as S,jsxs as Z}from"react/jsx-runtime";var ge=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"General Settings"}];return Z(p,{settings:e,title:"General",breadcrumbs:s,children:[S(d,{title:"General Settings",description:"Manage general system settings",icon:S(a,{iconName:"IconSettings2"})}),S("div",{className:"container mx-auto",children:S(Y,{})})]})},Y=()=>{let{settings:e,handleChange:s}=g();return W(e,s).map(i=>S(m,{section:i}))};import{useEffect as j,useState as z}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";var xe=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Design Settings"}];return c(p,{settings:e,title:"Design",breadcrumbs:s,children:[t(d,{title:"Design Settings",description:"Manage design system settings",icon:t(a,{iconName:"IconSettings2"})}),c("div",{className:"container mx-auto grid grid-cols-1 gap-5",children:[t(ee,{}),t(te,{}),t(re,{})]})]})},ee=()=>{let{settings:e,handleChange:s}=g(),[i,l]=z(k(e));return j(()=>{l(k(e))},[e]),c("div",{className:"grid grid-cols-1 gap-5",children:[t(N,{icon:t(a,{iconName:"IconPalette"}),title:"System Logos",description:"Manage system logo appereances",className:"col-span-2"}),t("div",{className:"grid grid-cols-1 w-[75%] sm:w-full sm:grid-cols-[1fr_2fr_2fr] gap-3",children:i.map(r=>c(M,{className:f("!w-full",r.key.slice(0,4)=="dark"?"bg-black/90 text-white dark:bg-background":r.key.slice(0,5)=="light"&&"dark:bg-white/90 bg-background text-black"),children:[c(x,{children:[t("div",{className:f("aspect-[16/9] h-25 w-full flex items-center object-fit cursor-pointer",r.value?"":"border-[1.5px] border-dashed rounded-lg"),onClick:()=>document.querySelector(`#${r.key}`)?.click(),children:r.value?t("img",{src:L(r.value),alt:r.title,className:"h-full w-auto"}):t(a,{iconName:"IconUpload"})}),t("input",{id:r.key,hidden:!0,type:"file",accept:"image/*",onChange:u=>{s(r.key,u.target.files?.[0])}})]}),c(w,{children:[t(B,{children:r.title}),t(H,{children:r.description})]})]}))})]})},te=()=>{let{settings:e,handleChange:s}=g();return q(e,s).map(i=>t(m,{section:i}))},re=()=>{let{settings:e,handleChange:s}=g(),[i,l]=z(e?.main_color);return t(M,{children:c(x,{className:"flex items-center gap-5",children:[t(N,{title:"Color",description:"Define the primary color of the system",icon:t(a,{iconName:"IconPalette"})}),t("input",{type:"color",className:"ml-auto aspect-square w-12 h-12 cursor-pointer",value:i,onChange:r=>l(r.target.value)}),t(y,{size:"sm",variant:"ghost",onClick:()=>s("main_color",i),children:t(a,{iconName:"IconDeviceFloppy"})})]})})};import{useEffect as $,useState as v}from"react";import{useForm as ie}from"@inertiajs/react";import{Fragment as se,jsx as n,jsxs as b}from"react/jsx-runtime";var Ke=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Mail Settings"}],[i,l]=v(e?.mail_mailer),[r,u]=v(h(e)),[D,P]=v(!1),[A,J]=v(!1),{recentlySuccessful:E,processing:K,errors:O,hasErrors:Q,post:V}=ie();return $(()=>{l(e?.mail_mailer)},[e?.mail_mailer]),$(()=>{u(h({...e,mail_mailer:i}))},[i]),n(p,{settings:e,title:"Mail",breadcrumbs:s,children:b("div",{className:"grid gap-5 mx-auto px-5",children:[n(d,{title:"Mail Settings",description:"Manage mail system settings",icon:n(a,{iconName:"IconMail"})}),n(m,{section:{icon:"IconMail",title:"Mailer Driver",description:"The mailer driver to use for sending emails.",key:"mail_mailer",value:i,options:[{icon:"IconMail",title:"SMTP",description:"Use SMTP to send emails with your own email server.",value:"smtp"},{icon:"IconLogs",title:"Log",description:"It will log the emails to the system log. Dont send mails.",value:"log"}],onSave:o=>(l(o.value),u(h(e))),type:"radio"}}),b("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[r.map(o=>n(G,{label:o.title,value:o.value,onChange:X=>u(r.map(C=>C.key===o?.key?{...C,value:X.target.value}:C)),placeholder:o.placeholder,icon:o.icon,type:o.type})),b("div",{className:"col-span-full",children:[b(y,{className:f("w-full items-center gap-2",D&&"animate-pulse"),variant:"outline",disabled:D,onClick:()=>{P(!0),R(r.map(o=>({key:o.key,value:o.value}))).catch(o=>J(o)).finally(()=>P(!1))},children:[n(a,{iconName:"IconDeviceFloppy"}),n("span",{children:"Save"})]}),i!=="log"&&i!=="array"&&b(se,{children:[n(_,{className:"w-full",variant:"link",onClick:()=>V(route("dashboard.settings.mail.test")),processing:K,recentlySuccessful:E,processingText:"Testing...",successText:"Test mail sent!",children:"Send Test Mail"}),E&&!O&&n("span",{className:"text-success",children:"Test mail sent to your email address"})]}),n(I,{className:"text-center",message:A?"Failed to save mail settings":""}),n(I,{className:"text-center",message:Q?"Failed to send test mail":""})]})]})]})})};import{Fragment as ae,jsx as T,jsxs as ne}from"react/jsx-runtime";var p=({settings:e,title:s,breadcrumbs:i,children:l})=>ne(ae,{children:[T(oe,{title:s}),T(F,{breadcrumbs:i??[],children:T(U,{settings:e,children:l})})]});export{p as a,ge as b,xe as c,Ke as d};
1
+ import{a as W,b as q,c as k,d as h}from"./chunk-HZVHIJJY.js";import{a as U,b as g}from"./chunk-KYNCXEGC.js";import{b as R}from"./chunk-B4FQFQOO.js";import{a as G}from"./chunk-4DHRTWA7.js";import{a as d}from"./chunk-KND3PUAR.js";import{a as F}from"./chunk-BTQRVGVP.js";import{f as m,g as _}from"./chunk-QYMVOLIB.js";import{a as I}from"./chunk-DSY4KVMF.js";import{a as M,b as w,c as B,d as H,f as x}from"./chunk-3DBYUBWW.js";import{a as N}from"./chunk-65LRDGYI.js";import{b as y}from"./chunk-TVCWAJFT.js";import{a}from"./chunk-G4EEZUTC.js";import{a as f,d as L}from"./chunk-GND5KQRZ.js";import{Head as oe}from"@inertiajs/react";import{jsx as S,jsxs as Z}from"react/jsx-runtime";var ge=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"General Settings"}];return Z(p,{settings:e,title:"General",breadcrumbs:s,children:[S(d,{title:"General Settings",description:"Manage general system settings",icon:S(a,{iconName:"IconSettings2"})}),S("div",{className:"container mx-auto",children:S(Y,{})})]})},Y=()=>{let{settings:e,handleChange:s}=g();return W(e,s).map(i=>S(m,{section:i}))};import{useEffect as j,useState as z}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";var xe=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Design Settings"}];return c(p,{settings:e,title:"Design",breadcrumbs:s,children:[t(d,{title:"Design Settings",description:"Manage design system settings",icon:t(a,{iconName:"IconSettings2"})}),c("div",{className:"container mx-auto grid grid-cols-1 gap-5",children:[t(ee,{}),t(te,{}),t(re,{})]})]})},ee=()=>{let{settings:e,handleChange:s}=g(),[i,l]=z(k(e));return j(()=>{l(k(e))},[e]),c("div",{className:"grid grid-cols-1 gap-5",children:[t(N,{icon:t(a,{iconName:"IconPalette"}),title:"System Logos",description:"Manage system logo appereances",className:"col-span-2"}),t("div",{className:"grid grid-cols-1 w-[75%] sm:w-full sm:grid-cols-[1fr_2fr_2fr] gap-3",children:i.map(r=>c(M,{className:f("!w-full",r.key.slice(0,4)=="dark"?"bg-black/90 text-white dark:bg-background":r.key.slice(0,5)=="light"&&"dark:bg-white/90 bg-background text-black"),children:[c(x,{children:[t("div",{className:f("aspect-[16/9] h-25 w-full flex items-center object-fit cursor-pointer",r.value?"":"border-[1.5px] border-dashed rounded-lg"),onClick:()=>document.querySelector(`#${r.key}`)?.click(),children:r.value?t("img",{src:L(r.value),alt:r.title,className:"h-full w-auto"}):t(a,{iconName:"IconUpload"})}),t("input",{id:r.key,hidden:!0,type:"file",accept:"image/*",onChange:u=>{s(r.key,u.target.files?.[0])}})]}),c(w,{children:[t(B,{children:r.title}),t(H,{children:r.description})]})]}))})]})},te=()=>{let{settings:e,handleChange:s}=g();return q(e,s).map(i=>t(m,{section:i}))},re=()=>{let{settings:e,handleChange:s}=g(),[i,l]=z(e?.main_color);return t(M,{children:c(x,{className:"flex items-center gap-5",children:[t(N,{title:"Color",description:"Define the primary color of the system",icon:t(a,{iconName:"IconPalette"})}),t("input",{type:"color",className:"ml-auto aspect-square w-12 h-12 cursor-pointer",value:i,onChange:r=>l(r.target.value)}),t(y,{size:"sm",variant:"ghost",onClick:()=>s("main_color",i),children:t(a,{iconName:"IconDeviceFloppy"})})]})})};import{useEffect as $,useState as v}from"react";import{useForm as ie}from"@inertiajs/react";import{Fragment as se,jsx as n,jsxs as b}from"react/jsx-runtime";var Ke=({settings:e})=>{let s=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Mail Settings"}],[i,l]=v(e?.mail_mailer),[r,u]=v(h(e)),[D,P]=v(!1),[A,J]=v(!1),{recentlySuccessful:E,processing:K,errors:O,hasErrors:Q,post:V}=ie();return $(()=>{l(e?.mail_mailer)},[e?.mail_mailer]),$(()=>{u(h({...e,mail_mailer:i}))},[i]),n(p,{settings:e,title:"Mail",breadcrumbs:s,children:b("div",{className:"grid gap-5 mx-auto px-5",children:[n(d,{title:"Mail Settings",description:"Manage mail system settings",icon:n(a,{iconName:"IconMail"})}),n(m,{section:{icon:"IconMail",title:"Mailer Driver",description:"The mailer driver to use for sending emails.",key:"mail_mailer",value:i,options:[{icon:"IconMail",title:"SMTP",description:"Use SMTP to send emails with your own email server.",value:"smtp"},{icon:"IconLogs",title:"Log",description:"It will log the emails to the system log. Dont send mails.",value:"log"}],onSave:o=>(l(o.value),u(h(e))),type:"radio"}}),b("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[r.map(o=>n(G,{label:o.title,value:o.value,onChange:X=>u(r.map(C=>C.key===o?.key?{...C,value:X.target.value}:C)),placeholder:o.placeholder,icon:o.icon,type:o.type})),b("div",{className:"col-span-full",children:[b(y,{className:f("w-full items-center gap-2",D&&"animate-pulse"),variant:"outline",disabled:D,onClick:()=>{P(!0),R(r.map(o=>({key:o.key,value:o.value}))).catch(o=>J(o)).finally(()=>P(!1))},children:[n(a,{iconName:"IconDeviceFloppy"}),n("span",{children:"Save"})]}),i!=="log"&&i!=="array"&&b(se,{children:[n(_,{className:"w-full",variant:"link",onClick:()=>V(route("dashboard.settings.mail.test")),processing:K,recentlySuccessful:E,processingText:"Testing...",successText:"Test mail sent!",children:"Send Test Mail"}),E&&!O&&n("span",{className:"text-success",children:"Test mail sent to your email address"})]}),n(I,{className:"text-center",message:A?"Failed to save mail settings":""}),n(I,{className:"text-center",message:Q?"Failed to send test mail":""})]})]})]})})};import{Fragment as ae,jsx as T,jsxs as ne}from"react/jsx-runtime";var p=({settings:e,title:s,breadcrumbs:i,children:l})=>ne(ae,{children:[T(oe,{title:s}),T(F,{breadcrumbs:i??[],children:T(U,{settings:e,children:l})})]});export{p as a,ge as b,xe as c,Ke as d};
@@ -1 +1 @@
1
- import{a as A,c as S,d as _,e as Y}from"./chunk-BQDDRNR2.js";import{a as j}from"./chunk-JVMILYS7.js";import{a as E}from"./chunk-EE4AUEUS.js";import{a as Z}from"./chunk-65LRDGYI.js";import{a as L}from"./chunk-G4EEZUTC.js";import{a as R,f as B,g as T,i as G,j as V}from"./chunk-QFUZ6MVT.js";import{b as D}from"./chunk-TVCWAJFT.js";import{a as P}from"./chunk-GND5KQRZ.js";import{createContext as ae,useContext as ie,useEffect as re,useState as C}from"react";import{jsx as de}from"react/jsx-runtime";var F=ae({}),ne={lg:1200,md:996,sm:640,xs:0},J=({widgets:e,children:t})=>{let{layouts:o,activeWidgetPaths:s,collapsedWidgets:n}=X(),[l,d]=C(e),[g,h]=C(n),[p,r]=C(!1),[c,v]=C(s),[f,x]=C(o),W={widgets:l,setWidgets:d,collapsedWidgets:g,setCollapsedWidgets:h,isWidgetsModalOpen:p,setIsWidgetsModalOpen:r,activeWidgetPaths:c,setActiveWidgetPaths:v,layouts:f,setLayouts:x,breakPoints:ne};return re(()=>Q(g,f,c),[g,f,c]),de(F.Provider,{value:W,children:t})},y=()=>{let e=ie(F);if(!e)throw new Error("useWidgets must be used within a WidgetsProvider");return e};var q=(e,t)=>{t.setActiveWidgetPaths([...t.activeWidgetPaths,e.path])},k=(e,t)=>{t.setActiveWidgetPaths(t.activeWidgetPaths.filter(o=>o!==e.path))},z=(e,t,o,s,n,l)=>{let d=!1,g={...e},h=new Map(t.map(p=>[p.path,p]));return Object.keys(n).forEach(p=>{let r=Array.isArray(e[p])?e[p]:[],c=3,v=r.filter(i=>s.has(i.i)).map(i=>{let b=h.get(i.i),w=o.includes(i.i);if(w){let m=c;return i.h===m&&i.minH===m&&i.maxH===m?i:(d=!0,{...i,h:m,minH:m,maxH:m})}if(i.maxH===c&&i.minH===c&&i.h===c&&b){let m=S(b,w,p,l,n);return d=!0,m}return i}),f=new Set(v.map(i=>i.i)),x=t.filter(i=>!f.has(i.path)).map(i=>{let b=o.includes(i.path),w=S(i,b,p,l,n);if(b){let m=c;return{...w,h:m,minH:m,maxH:m}}return w}),W=[...v,...x];if(g[p]=W,!d){if(W.length!==r.length)d=!0;else for(let i=0;i<W.length;i++)if(!_(W[i],r[i])){d=!0;break}}}),d?g:e},K=e=>{let t={};return e.forEach(o=>{let s=o.packageCode;t[s]||(t[s]=[]),t[s].push(o)}),Object.entries(t).map(([o,s])=>({title:o,widgets:s}))},Q=(e,t,o)=>{window?.localStorage&&window.localStorage.setItem("emincore-widgets",JSON.stringify({collapsedWidgets:e,layouts:t,activeWidgetPaths:o}))},X=()=>{let e=s=>{let n=Array.isArray(s?.collapsedWidgets)?s.collapsedWidgets.filter(g=>typeof g=="string"):[],l=Array.isArray(s?.activeWidgetPaths)?s.activeWidgetPaths.filter(g=>typeof g=="string"):[],d=s?.layouts&&typeof s.layouts=="object"&&!Array.isArray(s.layouts)?s.layouts:{};return{collapsedWidgets:n,layouts:d,activeWidgetPaths:l}},t={collapsedWidgets:[],layouts:{},activeWidgetPaths:[]};if(!window?.localStorage)return t;let o=window.localStorage.getItem("emincore-widgets");if(!o)return t;try{return e(JSON.parse(o))}catch{return t}};import{jsx as I,jsxs as U}from"react/jsx-runtime";var je=({widgets:e})=>I(j,{breadcrumbs:[{title:"Dashboard"}],children:U(J,{widgets:e,children:[U("div",{className:"grid grid-cols-1 gap-7 overflow-visible",children:[I(Z,{title:"Dashboard",description:"Overview of your application",icon:"IconDeviceDesktop",buttons:I(te,{})}),I($,{})]}),I(ee,{})]})});import{IconLayoutGrid as oe,IconLoader2 as ce,IconMinus as le,IconPlus as ge,IconX as pe}from"@tabler/icons-react";import{lazy as ue,Suspense as me,useCallback as he,useEffect as H,useMemo as O,useRef as We}from"react";import{WidthProvider as fe,Responsive as ye}from"react-grid-layout/legacy";import"react-grid-layout/css/styles.css";import{jsx as a,jsxs as u}from"react/jsx-runtime";var ve=fe(ye),N={lg:12,md:6,sm:2,xs:1},M=10,se=new Map,xe=(e,t)=>{let o=se.get(e);if(o)return o;let s=ue(t);return se.set(e,s),s},$=()=>{let{layouts:e,setLayouts:t,breakPoints:o,widgets:s,activeWidgetPaths:n,collapsedWidgets:l}=y(),d=O(()=>s.filter(r=>n.includes(r.path)),[s,n]);H(()=>{let r=new Set(n);t(c=>z(c,d,l,r,N,M))},[n,d,l,t]);let g=O(()=>Object.keys(N),[]),h=We(e);H(()=>{h.current=e},[e]);let p=he((r,c)=>{let v=c,f=new Set(n),x=z(v,d,l,f,N,M),W=h.current;Y(W,x,g)||t(x)},[n,d,l,g,t]);return a(ve,{layouts:e,breakpoints:o,cols:N,rowHeight:M,margin:[12,12],containerPadding:[0,0],isDraggable:!0,isResizable:!0,draggableHandle:".widget-drag-handle",onLayoutChange:p,children:d.map(r=>a("div",{className:" overflow-visible",children:a(be,{widget:r})},r.path))})},be=({widget:e,...t})=>{let o=y(),{collapsedWidgets:s,setCollapsedWidgets:n}=o,l=E.get(e.path),d=typeof l=="function";if(H(()=>{d||(o.setActiveWidgetPaths(r=>r.filter(c=>c!==e.path)),n(r=>r.filter(c=>c!==e.path)))},[d,n,e.path,o]),!d)return;let g=O(()=>xe(e.path,l),[e.path,l]),h=!s.includes(e.path),p=()=>n(r=>r.includes(e.path)?r.filter(c=>c!==e.path):[...r,e.path]);return u("div",{className:P(h?"flex h-full w-full min-h-0 flex-col overflow-hidden rounded-lg border bg-background shadow-sm":""),children:[u("div",{className:P("flex items-center gap-2 widget-drag-handle shrink-0 px-3 py-3 bg-muted/30",h?"border-b cursor-move select-none":"rounded-lg border shadow-sm"),children:[a(L,{iconName:e.icon,className:"w-5 h-5 shrink-0"}),a("span",{className:"text-sm font-medium",children:e.title}),u("div",{className:"flex items-center gap-5 ml-auto",children:[a("span",{className:"text-sm text-muted-foreground",children:e.packageCode.replace("_","/")}),u("div",{className:"flex items-center gap-2",children:[a("div",{onClick:p,children:h?a(le,{className:"h-5 w-5 cursor-pointer"}):a(ge,{className:"h-5 w-5 cursor-pointer"})}),a("div",{onClick:()=>k(e,o),children:a(pe,{className:"h-5 w-5 cursor-pointer"})})]})]})]}),h&&a("div",{className:"flex-1 min-h-0 overflow-auto p-3",children:a(me,{fallback:a("div",{className:"flex items-center justify-center w-full h-full",children:u("div",{className:"grid gap-2",children:[a("span",{className:"font-bold",children:e.title}),a(ce,{className:"animate-spin h-7 w-7 mx-auto"})]})}),children:a(g,{})})})]})},ee=()=>{let{widgets:e,isWidgetsModalOpen:t,setIsWidgetsModalOpen:o}=y();return a(R,{open:t,onOpenChange:o,children:u(B,{children:[u(T,{children:[a(G,{children:"Widgets"}),a(V,{children:"Select a widget to add to your dashboard."})]}),K(e).map(({title:s,widgets:n})=>u("div",{className:"grid grid-cols-2 gap-3",children:[u("div",{className:"col-span-full flex items-center gap-2",children:[a(oe,{}),u("span",{className:"font-bold capitalize",children:[s.replace("_"," ")," widgets"]})]}),n.map(l=>a(we,{widget:l},l.path))]},s))]})})},we=({widget:e})=>{let{activeWidgetPaths:t}=y();return u("div",{className:P("grid gap-3 justify-center h-full w-full min-h-[50px] rounded-lg border bg-muted/10 p-4",A(e,t)?"text-muted-foreground":""),children:[e.previewImage?a("img",{src:e.previewImage,alt:e.title,className:"w-12 h-12 rounded-md mx-auto"}):a(L,{iconName:e.icon??"IconPackage",className:"mx-auto"}),u("div",{children:[a("div",{className:"text-sm font-bold text-center",children:e.title}),e.description&&a("div",{className:"text-xs text-center",children:e.description??""})]}),a(Ce,{widget:e})]})},te=()=>{let{isWidgetsModalOpen:e,setIsWidgetsModalOpen:t}=y();return u(D,{variant:"outline",className:"flex items-center gap-2",onClick:()=>t(!e),children:[a(oe,{}),"Widgets"]})},Ce=({widget:e})=>{let t=y(),{activeWidgetPaths:o}=t,s=A(e,o);return a(D,{variant:"outline",size:"sm",className:"w-full text-primary",onClick:()=>s?k(e,t):q(e,t),children:s?"Remove":"Add"})};export{$ as a,be as b,ee as c,we as d,te as e,Ce as f,F as g,J as h,y as i,q as j,k,z as l,K as m,Q as n,X as o,je as p};
1
+ import{a as A,c as S,d as _,e as Y}from"./chunk-BQDDRNR2.js";import{a as j}from"./chunk-BTQRVGVP.js";import{a as E}from"./chunk-EE4AUEUS.js";import{a as R,f as B,g as T,i as G,j as V}from"./chunk-QFUZ6MVT.js";import{a as Z}from"./chunk-65LRDGYI.js";import{b as D}from"./chunk-TVCWAJFT.js";import{a as L}from"./chunk-G4EEZUTC.js";import{a as P}from"./chunk-GND5KQRZ.js";import{createContext as ae,useContext as ie,useEffect as re,useState as C}from"react";import{jsx as de}from"react/jsx-runtime";var F=ae({}),ne={lg:1200,md:996,sm:640,xs:0},J=({widgets:e,children:t})=>{let{layouts:o,activeWidgetPaths:s,collapsedWidgets:n}=X(),[l,d]=C(e),[g,h]=C(n),[p,r]=C(!1),[c,v]=C(s),[f,x]=C(o),W={widgets:l,setWidgets:d,collapsedWidgets:g,setCollapsedWidgets:h,isWidgetsModalOpen:p,setIsWidgetsModalOpen:r,activeWidgetPaths:c,setActiveWidgetPaths:v,layouts:f,setLayouts:x,breakPoints:ne};return re(()=>Q(g,f,c),[g,f,c]),de(F.Provider,{value:W,children:t})},y=()=>{let e=ie(F);if(!e)throw new Error("useWidgets must be used within a WidgetsProvider");return e};var q=(e,t)=>{t.setActiveWidgetPaths([...t.activeWidgetPaths,e.path])},k=(e,t)=>{t.setActiveWidgetPaths(t.activeWidgetPaths.filter(o=>o!==e.path))},z=(e,t,o,s,n,l)=>{let d=!1,g={...e},h=new Map(t.map(p=>[p.path,p]));return Object.keys(n).forEach(p=>{let r=Array.isArray(e[p])?e[p]:[],c=3,v=r.filter(i=>s.has(i.i)).map(i=>{let b=h.get(i.i),w=o.includes(i.i);if(w){let m=c;return i.h===m&&i.minH===m&&i.maxH===m?i:(d=!0,{...i,h:m,minH:m,maxH:m})}if(i.maxH===c&&i.minH===c&&i.h===c&&b){let m=S(b,w,p,l,n);return d=!0,m}return i}),f=new Set(v.map(i=>i.i)),x=t.filter(i=>!f.has(i.path)).map(i=>{let b=o.includes(i.path),w=S(i,b,p,l,n);if(b){let m=c;return{...w,h:m,minH:m,maxH:m}}return w}),W=[...v,...x];if(g[p]=W,!d){if(W.length!==r.length)d=!0;else for(let i=0;i<W.length;i++)if(!_(W[i],r[i])){d=!0;break}}}),d?g:e},K=e=>{let t={};return e.forEach(o=>{let s=o.packageCode;t[s]||(t[s]=[]),t[s].push(o)}),Object.entries(t).map(([o,s])=>({title:o,widgets:s}))},Q=(e,t,o)=>{window?.localStorage&&window.localStorage.setItem("emincore-widgets",JSON.stringify({collapsedWidgets:e,layouts:t,activeWidgetPaths:o}))},X=()=>{let e=s=>{let n=Array.isArray(s?.collapsedWidgets)?s.collapsedWidgets.filter(g=>typeof g=="string"):[],l=Array.isArray(s?.activeWidgetPaths)?s.activeWidgetPaths.filter(g=>typeof g=="string"):[],d=s?.layouts&&typeof s.layouts=="object"&&!Array.isArray(s.layouts)?s.layouts:{};return{collapsedWidgets:n,layouts:d,activeWidgetPaths:l}},t={collapsedWidgets:[],layouts:{},activeWidgetPaths:[]};if(!window?.localStorage)return t;let o=window.localStorage.getItem("emincore-widgets");if(!o)return t;try{return e(JSON.parse(o))}catch{return t}};import{jsx as I,jsxs as U}from"react/jsx-runtime";var je=({widgets:e})=>I(j,{breadcrumbs:[{title:"Dashboard"}],children:U(J,{widgets:e,children:[U("div",{className:"grid grid-cols-1 gap-7 overflow-visible",children:[I(Z,{title:"Dashboard",description:"Overview of your application",icon:"IconDeviceDesktop",buttons:I(te,{})}),I($,{})]}),I(ee,{})]})});import{IconLayoutGrid as oe,IconLoader2 as ce,IconMinus as le,IconPlus as ge,IconX as pe}from"@tabler/icons-react";import{lazy as ue,Suspense as me,useCallback as he,useEffect as H,useMemo as O,useRef as We}from"react";import{WidthProvider as fe,Responsive as ye}from"react-grid-layout/legacy";import"react-grid-layout/css/styles.css";import{jsx as a,jsxs as u}from"react/jsx-runtime";var ve=fe(ye),N={lg:12,md:6,sm:2,xs:1},M=10,se=new Map,xe=(e,t)=>{let o=se.get(e);if(o)return o;let s=ue(t);return se.set(e,s),s},$=()=>{let{layouts:e,setLayouts:t,breakPoints:o,widgets:s,activeWidgetPaths:n,collapsedWidgets:l}=y(),d=O(()=>s.filter(r=>n.includes(r.path)),[s,n]);H(()=>{let r=new Set(n);t(c=>z(c,d,l,r,N,M))},[n,d,l,t]);let g=O(()=>Object.keys(N),[]),h=We(e);H(()=>{h.current=e},[e]);let p=he((r,c)=>{let v=c,f=new Set(n),x=z(v,d,l,f,N,M),W=h.current;Y(W,x,g)||t(x)},[n,d,l,g,t]);return a(ve,{layouts:e,breakpoints:o,cols:N,rowHeight:M,margin:[12,12],containerPadding:[0,0],isDraggable:!0,isResizable:!0,draggableHandle:".widget-drag-handle",onLayoutChange:p,children:d.map(r=>a("div",{className:" overflow-visible",children:a(be,{widget:r})},r.path))})},be=({widget:e,...t})=>{let o=y(),{collapsedWidgets:s,setCollapsedWidgets:n}=o,l=E.get(e.path),d=typeof l=="function";if(H(()=>{d||(o.setActiveWidgetPaths(r=>r.filter(c=>c!==e.path)),n(r=>r.filter(c=>c!==e.path)))},[d,n,e.path,o]),!d)return;let g=O(()=>xe(e.path,l),[e.path,l]),h=!s.includes(e.path),p=()=>n(r=>r.includes(e.path)?r.filter(c=>c!==e.path):[...r,e.path]);return u("div",{className:P(h?"flex h-full w-full min-h-0 flex-col overflow-hidden rounded-lg border bg-background shadow-sm":""),children:[u("div",{className:P("flex items-center gap-2 widget-drag-handle shrink-0 px-3 py-3 bg-muted/30",h?"border-b cursor-move select-none":"rounded-lg border shadow-sm"),children:[a(L,{iconName:e.icon,className:"w-5 h-5 shrink-0"}),a("span",{className:"text-sm font-medium",children:e.title}),u("div",{className:"flex items-center gap-5 ml-auto",children:[a("span",{className:"text-sm text-muted-foreground",children:e.packageCode.replace("_","/")}),u("div",{className:"flex items-center gap-2",children:[a("div",{onClick:p,children:h?a(le,{className:"h-5 w-5 cursor-pointer"}):a(ge,{className:"h-5 w-5 cursor-pointer"})}),a("div",{onClick:()=>k(e,o),children:a(pe,{className:"h-5 w-5 cursor-pointer"})})]})]})]}),h&&a("div",{className:"flex-1 min-h-0 overflow-auto p-3",children:a(me,{fallback:a("div",{className:"flex items-center justify-center w-full h-full",children:u("div",{className:"grid gap-2",children:[a("span",{className:"font-bold",children:e.title}),a(ce,{className:"animate-spin h-7 w-7 mx-auto"})]})}),children:a(g,{})})})]})},ee=()=>{let{widgets:e,isWidgetsModalOpen:t,setIsWidgetsModalOpen:o}=y();return a(R,{open:t,onOpenChange:o,children:u(B,{children:[u(T,{children:[a(G,{children:"Widgets"}),a(V,{children:"Select a widget to add to your dashboard."})]}),K(e).map(({title:s,widgets:n})=>u("div",{className:"grid grid-cols-2 gap-3",children:[u("div",{className:"col-span-full flex items-center gap-2",children:[a(oe,{}),u("span",{className:"font-bold capitalize",children:[s.replace("_"," ")," widgets"]})]}),n.map(l=>a(we,{widget:l},l.path))]},s))]})})},we=({widget:e})=>{let{activeWidgetPaths:t}=y();return u("div",{className:P("grid gap-3 justify-center h-full w-full min-h-[50px] rounded-lg border bg-muted/10 p-4",A(e,t)?"text-muted-foreground":""),children:[e.previewImage?a("img",{src:e.previewImage,alt:e.title,className:"w-12 h-12 rounded-md mx-auto"}):a(L,{iconName:e.icon??"IconPackage",className:"mx-auto"}),u("div",{children:[a("div",{className:"text-sm font-bold text-center",children:e.title}),e.description&&a("div",{className:"text-xs text-center",children:e.description??""})]}),a(Ce,{widget:e})]})},te=()=>{let{isWidgetsModalOpen:e,setIsWidgetsModalOpen:t}=y();return u(D,{variant:"outline",className:"flex items-center gap-2",onClick:()=>t(!e),children:[a(oe,{}),"Widgets"]})},Ce=({widget:e})=>{let t=y(),{activeWidgetPaths:o}=t,s=A(e,o);return a(D,{variant:"outline",size:"sm",className:"w-full text-primary",onClick:()=>s?k(e,t):q(e,t),children:s?"Remove":"Add"})};export{$ as a,be as b,ee as c,we as d,te as e,Ce as f,F as g,J as h,y as i,q as j,k,z as l,K as m,Q as n,X as o,je as p};