@js-empire/emperor-ui 1.3.6 → 1.3.8

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 (322) hide show
  1. package/dist/emperor-ui.js +4157 -158
  2. package/dist/index.d.ts +3 -2
  3. package/package.json +56 -10
  4. package/.cursor/rules/code-conventions.mdc +0 -50
  5. package/.husky/pre-commit +0 -4
  6. package/.prettierrc +0 -10
  7. package/.storybook/main.ts +0 -24
  8. package/.storybook/preview.ts +0 -19
  9. package/.storybook/vitest.setup.ts +0 -7
  10. package/.vscode/extensions.json +0 -1
  11. package/dist/emperor-ui.umd.cjs +0 -77
  12. package/dist/icons/emperor-ui-logo.ico +0 -0
  13. package/dist/images/avatar-female.jpg +0 -0
  14. package/dist/images/avatar-male.jpg +0 -0
  15. package/dist/images/emperor-ui-logo.png +0 -0
  16. package/dist/index-ABKcY4tX.js +0 -60607
  17. package/dist/index-CWu5fG3N.js +0 -6
  18. package/dist/index-DpemL3iQ.js +0 -291
  19. package/dist/src-UW24ZMRV-I8bMqcTI.js +0 -6
  20. package/eslint.config.js +0 -34
  21. package/index.html +0 -13
  22. package/public/icons/emperor-ui-logo.ico +0 -0
  23. package/public/images/avatar-female.jpg +0 -0
  24. package/public/images/avatar-male.jpg +0 -0
  25. package/public/images/emperor-ui-logo.png +0 -0
  26. package/src/animations/blink.ts +0 -26
  27. package/src/animations/floating.ts +0 -12
  28. package/src/animations/index.ts +0 -2
  29. package/src/components/atoms/brand/brand.stories.tsx +0 -27
  30. package/src/components/atoms/brand/brand.tsx +0 -56
  31. package/src/components/atoms/brand/index.ts +0 -1
  32. package/src/components/atoms/brand/styles/classes.ts +0 -9
  33. package/src/components/atoms/brand/styles/index.ts +0 -2
  34. package/src/components/atoms/brand/styles/styles.ts +0 -0
  35. package/src/components/atoms/color-picker/color-picker.tsx +0 -12
  36. package/src/components/atoms/color-picker/free-color-picker.tsx +0 -58
  37. package/src/components/atoms/color-picker/index.ts +0 -3
  38. package/src/components/atoms/color-picker/preset-color-picker.tsx +0 -66
  39. package/src/components/atoms/color-picker/stories/color-picker.stories.tsx +0 -63
  40. package/src/components/atoms/column/column.stories.tsx +0 -37
  41. package/src/components/atoms/column/column.tsx +0 -21
  42. package/src/components/atoms/column/index.ts +0 -1
  43. package/src/components/atoms/container/column.stories.tsx +0 -37
  44. package/src/components/atoms/container/container.tsx +0 -28
  45. package/src/components/atoms/container/index.ts +0 -1
  46. package/src/components/atoms/copy-button/copy-button.tsx +0 -73
  47. package/src/components/atoms/copy-button/index.ts +0 -1
  48. package/src/components/atoms/copy-button/stories/copy-button.stories.tsx +0 -21
  49. package/src/components/atoms/field/field.tsx +0 -81
  50. package/src/components/atoms/field/index.ts +0 -3
  51. package/src/components/atoms/field/styles/classes.ts +0 -9
  52. package/src/components/atoms/field/styles/index.ts +0 -1
  53. package/src/components/atoms/field/units/autocomplete-field.tsx +0 -49
  54. package/src/components/atoms/field/units/checkbox-field.tsx +0 -35
  55. package/src/components/atoms/field/units/index.ts +0 -7
  56. package/src/components/atoms/field/units/input-field.tsx +0 -35
  57. package/src/components/atoms/field/units/radio-field.tsx +0 -43
  58. package/src/components/atoms/field/units/select-field.tsx +0 -50
  59. package/src/components/atoms/field/units/switch-field.tsx +0 -35
  60. package/src/components/atoms/field/units/textarea-field.tsx +0 -37
  61. package/src/components/atoms/filter/filter.tsx +0 -93
  62. package/src/components/atoms/filter/index.ts +0 -3
  63. package/src/components/atoms/filter/stories/filter.stories.tsx +0 -238
  64. package/src/components/atoms/filter/styles/classes.ts +0 -20
  65. package/src/components/atoms/filter/styles/index.ts +0 -1
  66. package/src/components/atoms/filter/units/autocomplete-filter.tsx +0 -66
  67. package/src/components/atoms/filter/units/checkbox-filter.tsx +0 -42
  68. package/src/components/atoms/filter/units/checkbox-group-filter.tsx +0 -68
  69. package/src/components/atoms/filter/units/date-filter.tsx +0 -46
  70. package/src/components/atoms/filter/units/index.ts +0 -9
  71. package/src/components/atoms/filter/units/numeric-filter.tsx +0 -41
  72. package/src/components/atoms/filter/units/range-filter.tsx +0 -65
  73. package/src/components/atoms/filter/units/search-filter.tsx +0 -53
  74. package/src/components/atoms/filter/units/select-filter.tsx +0 -57
  75. package/src/components/atoms/filter/units/switch-filter.tsx +0 -35
  76. package/src/components/atoms/index.ts +0 -11
  77. package/src/components/atoms/portal/index.ts +0 -1
  78. package/src/components/atoms/portal/portal.stories.tsx +0 -43
  79. package/src/components/atoms/portal/portal.tsx +0 -25
  80. package/src/components/atoms/row/index.ts +0 -1
  81. package/src/components/atoms/row/row.stories.tsx +0 -37
  82. package/src/components/atoms/row/row.tsx +0 -26
  83. package/src/components/atoms/theme-switch/index.ts +0 -1
  84. package/src/components/atoms/theme-switch/styles/classes.ts +0 -16
  85. package/src/components/atoms/theme-switch/styles/index.ts +0 -1
  86. package/src/components/atoms/theme-switch/theme-switch.stories.tsx +0 -26
  87. package/src/components/atoms/theme-switch/theme-switch.tsx +0 -54
  88. package/src/components/atoms/uploader/components/avatar-label.tsx +0 -102
  89. package/src/components/atoms/uploader/components/index.ts +0 -8
  90. package/src/components/atoms/uploader/components/upload-file-error-box.tsx +0 -40
  91. package/src/components/atoms/uploader/components/upload-file-input.tsx +0 -36
  92. package/src/components/atoms/uploader/components/upload-file-label.tsx +0 -92
  93. package/src/components/atoms/uploader/components/upload-file-listing.tsx +0 -64
  94. package/src/components/atoms/uploader/components/uploader-title.tsx +0 -21
  95. package/src/components/atoms/uploader/components/uploader.tsx +0 -89
  96. package/src/components/atoms/uploader/components/view-image-modal.tsx +0 -41
  97. package/src/components/atoms/uploader/index.ts +0 -1
  98. package/src/components/atoms/uploader/stories/uploader.stories.tsx +0 -202
  99. package/src/components/index.ts +0 -4
  100. package/src/components/molecules/index.ts +0 -4
  101. package/src/components/molecules/item-card/components/actions/index.ts +0 -3
  102. package/src/components/molecules/item-card/components/actions/item-actions-buttons.tsx +0 -43
  103. package/src/components/molecules/item-card/components/actions/item-actions-dropdown.tsx +0 -57
  104. package/src/components/molecules/item-card/components/actions/item-actions-overlay.tsx +0 -50
  105. package/src/components/molecules/item-card/components/additions/index.ts +0 -2
  106. package/src/components/molecules/item-card/components/additions/item-banner.tsx +0 -22
  107. package/src/components/molecules/item-card/components/additions/loading-item.tsx +0 -88
  108. package/src/components/molecules/item-card/components/card/index.ts +0 -4
  109. package/src/components/molecules/item-card/components/card/item-card-body.tsx +0 -74
  110. package/src/components/molecules/item-card/components/card/item-card-footer.tsx +0 -79
  111. package/src/components/molecules/item-card/components/card/item-card-header.tsx +0 -69
  112. package/src/components/molecules/item-card/components/card/item-card.tsx +0 -123
  113. package/src/components/molecules/item-card/components/index.ts +0 -3
  114. package/src/components/molecules/item-card/index.ts +0 -2
  115. package/src/components/molecules/item-card/stories/item-card.stories.tsx +0 -218
  116. package/src/components/molecules/item-card/styles/classes.ts +0 -141
  117. package/src/components/molecules/item-card/styles/index.ts +0 -1
  118. package/src/components/molecules/nav-bar/index.ts +0 -3
  119. package/src/components/molecules/nav-bar/nav-bar-item.tsx +0 -64
  120. package/src/components/molecules/nav-bar/nav-bar.tsx +0 -57
  121. package/src/components/molecules/nav-bar/stories/hover-effect/nav-bar-hover-effect.stories.tsx +0 -52
  122. package/src/components/molecules/nav-bar/stories/nav-bar.stories.tsx +0 -50
  123. package/src/components/molecules/nav-bar/styles/classes.ts +0 -68
  124. package/src/components/molecules/nav-bar/styles/index.ts +0 -2
  125. package/src/components/molecules/nav-bar/styles/styles.ts +0 -85
  126. package/src/components/molecules/nav-bar/sub-items-box.tsx +0 -58
  127. package/src/components/molecules/scaffold/index.ts +0 -2
  128. package/src/components/molecules/scaffold/scaffold.stories.tsx +0 -21
  129. package/src/components/molecules/scaffold/scaffold.tsx +0 -23
  130. package/src/components/molecules/scaffold/styles/index.ts +0 -1
  131. package/src/components/molecules/scaffold/styles/scaffold-classes.ts +0 -10
  132. package/src/components/molecules/side-bar/compact-side-bar.tsx +0 -77
  133. package/src/components/molecules/side-bar/index.ts +0 -1
  134. package/src/components/molecules/side-bar/side-bar-drawer.tsx +0 -113
  135. package/src/components/molecules/side-bar/side-bar.stories.tsx +0 -111
  136. package/src/components/molecules/side-bar/side-bar.tsx +0 -31
  137. package/src/components/molecules/side-bar/styles/classes.ts +0 -28
  138. package/src/components/molecules/side-bar/styles/index.ts +0 -2
  139. package/src/components/molecules/side-bar/styles/styles.ts +0 -13
  140. package/src/components/organisms/deletion-confirmor/deletion-confirmor.tsx +0 -110
  141. package/src/components/organisms/deletion-confirmor/index.ts +0 -3
  142. package/src/components/organisms/deletion-confirmor/stories/components.tsx +0 -25
  143. package/src/components/organisms/deletion-confirmor/stories/deletion-confirmor.stories.tsx +0 -78
  144. package/src/components/organisms/deletion-confirmor/styles/classes.ts +0 -28
  145. package/src/components/organisms/deletion-confirmor/styles/index.ts +0 -2
  146. package/src/components/organisms/deletion-confirmor/styles/styles.ts +0 -4
  147. package/src/components/organisms/footer/copy-rights-box.tsx +0 -27
  148. package/src/components/organisms/footer/footer.tsx +0 -75
  149. package/src/components/organisms/footer/index.ts +0 -5
  150. package/src/components/organisms/footer/policies-box.tsx +0 -27
  151. package/src/components/organisms/footer/quick-links-box.tsx +0 -46
  152. package/src/components/organisms/footer/social-links-box.tsx +0 -33
  153. package/src/components/organisms/footer/stories/footer.stories.tsx +0 -61
  154. package/src/components/organisms/footer/styles/classes.ts +0 -71
  155. package/src/components/organisms/footer/styles/index.ts +0 -2
  156. package/src/components/organisms/footer/styles/styles.ts +0 -6
  157. package/src/components/organisms/form-builder/form-builder.stories.tsx +0 -144
  158. package/src/components/organisms/form-builder/form-builder.tsx +0 -75
  159. package/src/components/organisms/form-builder/index.ts +0 -1
  160. package/src/components/organisms/header/header.tsx +0 -87
  161. package/src/components/organisms/header/index.ts +0 -1
  162. package/src/components/organisms/header/segmented-header-content.tsx +0 -29
  163. package/src/components/organisms/header/stories/header.stories.tsx +0 -144
  164. package/src/components/organisms/header/styles/classes.ts +0 -22
  165. package/src/components/organisms/header/styles/index.ts +0 -2
  166. package/src/components/organisms/header/styles/styles.ts +0 -39
  167. package/src/components/organisms/index.ts +0 -6
  168. package/src/components/organisms/item-details/index.ts +0 -1
  169. package/src/components/organisms/item-details/item-details.tsx +0 -6
  170. package/src/components/organisms/listings/empty-listings.tsx +0 -80
  171. package/src/components/organisms/listings/index.ts +0 -3
  172. package/src/components/organisms/listings/listings.tsx +0 -96
  173. package/src/components/organisms/listings/stories/grid-listings.stories.tsx +0 -153
  174. package/src/components/organisms/listings/stories/list-listings.stories.tsx +0 -171
  175. package/src/components/organisms/listings/styles/classes.ts +0 -49
  176. package/src/components/organisms/listings/styles/index.ts +0 -2
  177. package/src/components/organisms/listings/styles/styles.ts +0 -6
  178. package/src/components/templates/index.ts +0 -1
  179. package/src/components/templates/landing-page/index.ts +0 -1
  180. package/src/components/templates/landing-page/landing-page.stories.tsx +0 -21
  181. package/src/components/templates/landing-page/landing-page.tsx +0 -57
  182. package/src/components/templates/landing-page/styles/classes.ts +0 -11
  183. package/src/components/templates/landing-page/styles/index.ts +0 -1
  184. package/src/constants/animations.ts +0 -14
  185. package/src/constants/card.tsx +0 -42
  186. package/src/constants/defaults.ts +0 -59
  187. package/src/constants/fake.ts +0 -5
  188. package/src/constants/footer.tsx +0 -157
  189. package/src/constants/index.ts +0 -6
  190. package/src/constants/uploader.ts +0 -33
  191. package/src/context/emperor-ui-context.ts +0 -6
  192. package/src/context/form-builder-context.tsx +0 -8
  193. package/src/context/index.ts +0 -4
  194. package/src/context/navigation-context.ts +0 -6
  195. package/src/context/uploader-context.ts +0 -6
  196. package/src/enums/index.ts +0 -2
  197. package/src/enums/placeholders.ts +0 -4
  198. package/src/enums/preserved-keys.ts +0 -3
  199. package/src/examples/index.ts +0 -1
  200. package/src/hooks/index.ts +0 -8
  201. package/src/hooks/use-emperor-ui.ts +0 -12
  202. package/src/hooks/use-filters.ts +0 -20
  203. package/src/hooks/use-form-builder-context.ts +0 -16
  204. package/src/hooks/use-navigation.ts +0 -12
  205. package/src/hooks/use-search-params-handler.tsx +0 -186
  206. package/src/hooks/use-uploader-context.ts +0 -14
  207. package/src/hooks/use-uploader.tsx +0 -164
  208. package/src/hooks/use-window-size.tsx +0 -53
  209. package/src/i18n/configs/i18n.ts +0 -7
  210. package/src/i18n/configs/index.ts +0 -1
  211. package/src/i18n/constants/index.ts +0 -1
  212. package/src/i18n/constants/locales.ts +0 -4
  213. package/src/i18n/index.ts +0 -5
  214. package/src/i18n/locales/ar.ts +0 -15
  215. package/src/i18n/locales/atoms/ar.ts +0 -18
  216. package/src/i18n/locales/atoms/en.ts +0 -18
  217. package/src/i18n/locales/atoms/index.ts +0 -2
  218. package/src/i18n/locales/common/ar.ts +0 -1
  219. package/src/i18n/locales/common/en.ts +0 -1
  220. package/src/i18n/locales/common/index.ts +0 -2
  221. package/src/i18n/locales/en.ts +0 -15
  222. package/src/i18n/locales/index.ts +0 -4
  223. package/src/i18n/locales/molecules/ar.ts +0 -1
  224. package/src/i18n/locales/molecules/en.ts +0 -1
  225. package/src/i18n/locales/molecules/index.ts +0 -2
  226. package/src/i18n/locales/organisms/ar.ts +0 -11
  227. package/src/i18n/locales/organisms/en.ts +0 -11
  228. package/src/i18n/locales/organisms/index.ts +0 -2
  229. package/src/i18n/locales/templates/ar.ts +0 -1
  230. package/src/i18n/locales/templates/en.ts +0 -1
  231. package/src/i18n/locales/templates/index.ts +0 -2
  232. package/src/i18n/locales/toasts/ar.ts +0 -1
  233. package/src/i18n/locales/toasts/en.ts +0 -1
  234. package/src/i18n/locales/toasts/index.ts +0 -2
  235. package/src/i18n/types/index.ts +0 -2
  236. package/src/i18n/types/locale.ts +0 -5
  237. package/src/i18n/types/toasts.ts +0 -3
  238. package/src/i18n/utils/get-locales.ts +0 -4
  239. package/src/i18n/utils/index.ts +0 -2
  240. package/src/i18n/utils/localize.ts +0 -15
  241. package/src/index.ts +0 -14
  242. package/src/mocks/constants.ts +0 -103
  243. package/src/mocks/deletion-confirmor.ts +0 -16
  244. package/src/mocks/header.tsx +0 -118
  245. package/src/mocks/index.ts +0 -6
  246. package/src/mocks/listings.tsx +0 -154
  247. package/src/mocks/locales/index.ts +0 -1
  248. package/src/mocks/locales/uploader.ts +0 -33
  249. package/src/mocks/types.ts +0 -64
  250. package/src/providers/config-provider.tsx +0 -72
  251. package/src/providers/emperor-ui-provider.tsx +0 -35
  252. package/src/providers/form-builder-provider-context.tsx +0 -18
  253. package/src/providers/index.ts +0 -6
  254. package/src/providers/navigation-provider.tsx +0 -42
  255. package/src/providers/theme-provider.tsx +0 -16
  256. package/src/providers/uploader-provider.tsx +0 -53
  257. package/src/styles/globals.css +0 -38
  258. package/src/styles/hero.ts +0 -3
  259. package/src/styles/index.css +0 -18
  260. package/src/types/components/atoms/brand.ts +0 -13
  261. package/src/types/components/atoms/color-picker/color-picker.ts +0 -21
  262. package/src/types/components/atoms/color-picker/index.ts +0 -1
  263. package/src/types/components/atoms/column.ts +0 -3
  264. package/src/types/components/atoms/container.ts +0 -3
  265. package/src/types/components/atoms/field/field.ts +0 -61
  266. package/src/types/components/atoms/field/index.ts +0 -1
  267. package/src/types/components/atoms/filter/filter.ts +0 -52
  268. package/src/types/components/atoms/filter/index.ts +0 -2
  269. package/src/types/components/atoms/filter/select-filter.ts +0 -8
  270. package/src/types/components/atoms/index.ts +0 -9
  271. package/src/types/components/atoms/portal.ts +0 -6
  272. package/src/types/components/atoms/row.ts +0 -3
  273. package/src/types/components/atoms/uploader.ts +0 -103
  274. package/src/types/components/index.ts +0 -4
  275. package/src/types/components/molecules/footer/footer.ts +0 -68
  276. package/src/types/components/molecules/footer/index.ts +0 -1
  277. package/src/types/components/molecules/header/header.ts +0 -51
  278. package/src/types/components/molecules/header/index.ts +0 -1
  279. package/src/types/components/molecules/index.ts +0 -9
  280. package/src/types/components/molecules/item-card/index.ts +0 -1
  281. package/src/types/components/molecules/item-card/item-card.ts +0 -69
  282. package/src/types/components/molecules/item-details/index.ts +0 -1
  283. package/src/types/components/molecules/item-details/item-details.ts +0 -9
  284. package/src/types/components/molecules/listings/index.ts +0 -1
  285. package/src/types/components/molecules/listings/listings.ts +0 -29
  286. package/src/types/components/molecules/nav-bar/index.ts +0 -1
  287. package/src/types/components/molecules/nav-bar/nav-bar.ts +0 -66
  288. package/src/types/components/molecules/scaffold/index.ts +0 -1
  289. package/src/types/components/molecules/scaffold/scaffold.ts +0 -9
  290. package/src/types/components/molecules/side-bar/index.ts +0 -1
  291. package/src/types/components/molecules/side-bar/side-bar.ts +0 -40
  292. package/src/types/components/molecules/theme-switch/index.ts +0 -1
  293. package/src/types/components/molecules/theme-switch/theme-switch.ts +0 -9
  294. package/src/types/components/organisms/deletion-confirmor/deletion-confirmor.ts +0 -22
  295. package/src/types/components/organisms/deletion-confirmor/index.ts +0 -1
  296. package/src/types/components/organisms/filters/filters.ts +0 -11
  297. package/src/types/components/organisms/filters/index.ts +0 -1
  298. package/src/types/components/organisms/form-builder/context.ts +0 -6
  299. package/src/types/components/organisms/form-builder/form-builder.ts +0 -39
  300. package/src/types/components/organisms/form-builder/index.ts +0 -2
  301. package/src/types/components/organisms/index.ts +0 -3
  302. package/src/types/components/templates/index.ts +0 -1
  303. package/src/types/components/templates/landing-page.ts +0 -10
  304. package/src/types/context/config.ts +0 -24
  305. package/src/types/context/index.ts +0 -4
  306. package/src/types/context/localization.ts +0 -24
  307. package/src/types/context/navigation.ts +0 -17
  308. package/src/types/context/theme.ts +0 -33
  309. package/src/types/index.ts +0 -3
  310. package/src/types/shared/components.ts +0 -13
  311. package/src/types/shared/index.ts +0 -1
  312. package/src/utils/cn.ts +0 -6
  313. package/src/utils/compress-images.ts +0 -36
  314. package/src/utils/index.ts +0 -5
  315. package/src/utils/locales.ts +0 -54
  316. package/src/utils/storybook.tsx +0 -15
  317. package/src/utils/uploader.ts +0 -170
  318. package/tsconfig.app.json +0 -37
  319. package/tsconfig.json +0 -7
  320. package/tsconfig.node.json +0 -25
  321. package/vite.config.ts +0 -47
  322. package/vitest.shims.d.ts +0 -1
@@ -1,161 +1,4160 @@
1
1
  "use client";
2
- import { dB as a, dC as i, dD as o, dE as t, dF as r, dG as l, dH as d, dI as C, dJ as f, dK as n, dL as E, dM as I, dN as _, dO as m, dP as S, dQ as p, dR as T, dS as c, dT as M, dU as F, dV as g, dW as A, dX as O, dY as L, dZ as u, d_ as B, d$ as P, e0 as D, e1 as R, e2 as K, e3 as N, e4 as U, e5 as x, e6 as y, e7 as W, e8 as h, e9 as k, ea as v, eb as H, ec as G, ed as w, ee as V, ef as b, eg as Y, eh as z, ei as Q, ej as q, ek as J, el as X, em as Z, en as $, eo as j, ep as ee, eq as se, er as ae, es as ie, et as oe, eu as te, ev as re, ew as le, ex as de, ey as Ce, ez as fe, eA as ne, eB as Ee, eC as Ie, eD as _e, eE as me, eF as Se, eG as pe, eH as Te, eI as ce, eJ as Me, eK as Fe, eL as ge, eM as Ae, eN as Oe, eO as Le, eP as ue, eQ as Be, eR as Pe, eS as De, eT as Re, eU as Ke, eV as Ne, eW as Ue, eX as xe, eY as ye, eZ as We, e_ as he, e$ as ke, f0 as ve, f1 as He, f2 as Ge, f3 as we, f4 as Ve, f5 as be, f6 as Ye, f7 as ze, f8 as Qe, f9 as qe, fa as Je, fb as Xe, fc as Ze, fd as $e, fe as je, ff as es, fg as ss, fh as as, fi as is, fj as os, fk as ts, fl as rs, fm as ls, fn as ds, fo as Cs, fp as fs, fq as ns, fr as Es, fs as Is, ft as _s, fu as ms, fv as Ss, fw as ps, fx as Ts, fy as cs, fz as Ms, fA as Fs, fB as gs, fC as As, fD as Os, fE as Ls, fF as us, fG as Bs, fH as Ps, fI as Ds, fJ as Rs, fK as Ks, fL as Ns, fM as Us, fN as xs, fO as ys, fP as Ws, fQ as hs, fR as ks, fS as vs, fT as Hs, fU as Gs, fV as ws, fW as Vs, fX as bs, fY as Ys, fZ as zs, f_ as Qs, f$ as qs, g0 as Js, g1 as Xs } from "./index-ABKcY4tX.js";
2
+ import { jsxs as b, jsx as r, Fragment as se } from "react/jsx-runtime";
3
+ import { forwardRef as A, useState as I, useEffect as $, useMemo as N, useRef as yt, Children as ze, isValidElement as It, cloneElement as St, createContext as Y, useContext as X, useCallback as O } from "react";
4
+ import { cn as c, mergeUploaderLocale as Z, getAllowedTypes as Et, validateUploadedFiles as Nt, refineUploadedFiles as Lt, mergeLocales as Ie, compressImage as At } from "@/utils";
5
+ import { cva as C } from "class-variance-authority";
6
+ import { Header as Pt, Brand as ie, NavBar as ke, itemImageWrapperClasses as Ve, itemHeaderClasses as De, itemBodyClasses as Oe, itemChipsClasses as $e, itemFooterClasses as Re, itemMainWrapperClasses as Ue, itemCardMotionClasses as He, itemBannerClasses as Ft, LoadingItem as We, ItemCardHeader as _t, ItemCardBody as Mt, ItemCardFooter as Tt, ItemActionsOverlay as Bt, ItemBanner as zt, ItemActionsDropdown as Ge, itemTitleClasses as kt, itemDescriptionClasses as Vt, itemPriceClasses as Dt, ItemActionsButtons as Ot, NavBarItem as $t, SubItemsBox as Rt, scaffoldClasses as Ut, Row as le, UploaderTitle as Ht, AvatarLabel as Wt, UploadFileLabel as Gt, UploadFileListing as Kt, UploadFileErrorBox as jt, UploadFileInput as qt, ViewImageModal as Yt, RangeFilter as Xt, SwitchFilter as Zt, CheckboxGroupFilter as Qt, CheckboxFilter as Jt, NumericFilter as ea, DateFilter as ta, AutocompleteFilter as aa, SelectFilter as ra, SearchFilter as oa, filterClasses as M, fieldClasses as na, RadioField as sa, SwitchField as ia, AutocompleteField as la, SelectField as ca, CheckboxField as da, TextareaField as ma, InputField as ua, PresetColorPicker as pa, FreeColorPicker as fa, CopyButton as Ke, DeletionConfirmor as ha, EmptyListings as ga, ItemCard as va, emptyListingsClasses as ba, QuickLinksBox as Ca, SocialLinksBox as wa, PoliciesBox as xa, CopyRightsBox as ya, SideBar as Ia, Field as Sa, Scaffold as Ea } from "@/components";
7
+ import { MOCK_HEADER_ITEMS_WITH_SUB_ITEMS as Na, MOCK_HEADER_ACTIONS as La, MOCK_HEADER_ITEMS as Se } from "@/mocks";
8
+ import { FAKE_PARAGRAPH as K, getCardMotion as je, fileTypesMapping as Aa, ONE_MEGABYTE as qe, defaultEmperorUIConfig as k, ALLOWED_IMAGES_TYPES as Ye, ALLOWED_DOC_TYPES as Xe, ALLOWED_PDF_TYPES as Ze, ALLOWED_SHEET_TYPES as Qe } from "@/constants";
9
+ import { Card as Je, CardHeader as et, CardBody as tt, CardFooter as at } from "@heroui/card";
10
+ import { Skeleton as z } from "@heroui/skeleton";
11
+ import { motion as _, AnimatePresence as Pa } from "framer-motion";
12
+ import { useWindowSize as Fa, useNavigation as rt, useEmperorUI as w, useUploaderContext as R, useSearchParamsHandler as F, useFormBuilder as U } from "@/hooks";
13
+ import { Image as me } from "@heroui/image";
14
+ import { Chip as _a } from "@heroui/chip";
15
+ import { Button as L } from "@heroui/button";
16
+ import { Dropdown as Ma, DropdownTrigger as Ta, DropdownMenu as Ba, DropdownItem as za } from "@heroui/dropdown";
17
+ import { EllipsisVertical as ka, UploadCloud as Va, Trash2 as Q, Eye as ue, Search as Da, SunIcon as Oa, MoonIcon as $a, Copy as Ra, Check as Ua, Inbox as Ha, FacebookIcon as Wa, TwitterIcon as Ga, InstagramIcon as Ka, LinkedinIcon as ja, YoutubeIcon as qa, Pencil as ot, HomeIcon as nt, InfoIcon as pe, MailIcon as fe, ServerIcon as he, SettingsIcon as Ya, HelpCircleIcon as Xa, LifeBuoyIcon as Za, LogOutIcon as Qa, Star as Ja } from "lucide-react";
18
+ import { Tooltip as er } from "@heroui/tooltip";
19
+ import { Link as J } from "@heroui/link";
20
+ import { Drawer as tr, DrawerContent as ar, DrawerHeader as rr, DrawerBody as or, DrawerFooter as nr } from "@heroui/drawer";
21
+ import { ScrollShadow as st } from "@heroui/scroll-shadow";
22
+ import { Divider as ge } from "@heroui/divider";
23
+ import { createPortal as it } from "react-dom";
24
+ import { UploaderProvider as sr, FormBuilderProvider as ir, ConfigProvider as lr, NavigationProvider as cr, EmperorUIProvider as dr } from "@/providers";
25
+ import { Placeholders as mr, PreservedKeys as ur } from "@/enums";
26
+ import { Avatar as pr } from "@heroui/avatar";
27
+ import { Spinner as ve } from "@heroui/spinner";
28
+ import { getLocales as ee, ar as fr, en as hr, LangKey as V } from "@/i18n";
29
+ import { Modal as lt, ModalContent as ct, ModalBody as dt, ModalHeader as gr, ModalFooter as vr, useDisclosure as mt } from "@heroui/modal";
30
+ import { Input as te, Textarea as br } from "@heroui/input";
31
+ import { useDebounce as Cr } from "use-debounce";
32
+ import { Select as be, SelectItem as Ce } from "@heroui/select";
33
+ import { Autocomplete as ut, AutocompleteItem as pt } from "@heroui/autocomplete";
34
+ import { DatePicker as wr } from "@heroui/date-picker";
35
+ import { parseDate as xr } from "@internationalized/date";
36
+ import { Checkbox as we, CheckboxGroup as yr } from "@heroui/checkbox";
37
+ import { Switch as ft } from "@heroui/switch";
38
+ import { Slider as Ir } from "@heroui/slider";
39
+ import { Controller as H, useForm as Sr, useWatch as Er } from "react-hook-form";
40
+ import { RadioGroup as Nr, Radio as Lr } from "@heroui/radio";
41
+ import { useTheme as Ar, ThemeProvider as ht } from "next-themes";
42
+ import { motion as Ee, AnimatePresence as Pr } from "motion/react";
43
+ import { Pagination as Fr } from "@heroui/pagination";
44
+ import { blinkContainer as _r, blinkItem as oe, floating as Mr } from "@/animations";
45
+ import { EmperorUIContext as ce, NavigationContext as gt, UploaderContext as vt, FormBuilderContext as bt } from "@/context";
46
+ import { addToast as G, ToastProvider as Tr } from "@heroui/toast";
47
+ import { HeroUIProvider as Br } from "@heroui/system";
48
+ import zr from "clsx";
49
+ import { twMerge as kr } from "tailwind-merge";
50
+ import Vr from "browser-image-compression";
51
+ import { MOCK_ITEM_BRANDS as Ne, MOCK_COLORS as Le, MOCK_LISTING_TITLES as Ae, MOCK_LISTING_DESCRIPTIONS as Pe, MOCK_LISTING_IMAGES as Fe, MOCK_BASE_DATE as de, MOCK_REVIEW_COMMENTS as _e, MOCK_REVIEW_AUTHORS as Me, MOCK_ITEM_CATEGORIES as Te } from "@/mocks/constants";
52
+ const Dr = C(["flex flex-col w-full"], {
53
+ variants: {
54
+ variant: {
55
+ default: []
56
+ }
57
+ },
58
+ defaultVariants: {},
59
+ compoundVariants: []
60
+ }), Or = {
61
+ enabled: !0,
62
+ blur: 10,
63
+ backgroundColor: "#006fed",
64
+ foregroundColor: "#fff",
65
+ opacity: 40
66
+ }, Bn = A(({ className: e, variant: t = "default", children: a, ...o }, n) => /* @__PURE__ */ b(
67
+ "main",
68
+ {
69
+ ref: n,
70
+ "data-slot": "emperor-landing-page",
71
+ className: c(Dr({ className: e })),
72
+ ...o,
73
+ children: [
74
+ /* @__PURE__ */ b(Pt, { variant: "floating", glassEffect: Or, children: [
75
+ /* @__PURE__ */ r(ie, {}),
76
+ /* @__PURE__ */ r(
77
+ ke,
78
+ {
79
+ items: Na,
80
+ hoverEffect: "none",
81
+ variant: "default",
82
+ className: "hidden md:flex",
83
+ subItemsColumns: 4
84
+ }
85
+ )
86
+ ] }),
87
+ /* @__PURE__ */ b("main", { className: "w-full container mx-auto p-5 pt-24 flex flex-col gap-6", children: [
88
+ /* @__PURE__ */ r("p", { children: K }),
89
+ /* @__PURE__ */ r("p", { children: K }),
90
+ /* @__PURE__ */ r("p", { children: K }),
91
+ /* @__PURE__ */ r("p", { children: K }),
92
+ /* @__PURE__ */ r("p", { children: K })
93
+ ] }),
94
+ a
95
+ ]
96
+ }
97
+ ));
98
+ function zn({
99
+ className: e,
100
+ classNames: t,
101
+ hoverEffect: a = "none",
102
+ orientation: o = "vertical"
103
+ }) {
104
+ return /* @__PURE__ */ r(
105
+ _.div,
106
+ {
107
+ ...je({ hoverEffect: a }),
108
+ "data-slot": "emperor-ui-item-card",
109
+ className: c(
110
+ He({ orientation: o }),
111
+ t?.base,
112
+ e
113
+ ),
114
+ children: /* @__PURE__ */ b(
115
+ Je,
116
+ {
117
+ shadow: "sm",
118
+ "data-slot": "emperor-ui-item-card-main-wrapper",
119
+ className: c(
120
+ Ue({ orientation: o }),
121
+ t?.mainWrapper
122
+ ),
123
+ children: [
124
+ /* @__PURE__ */ r(
125
+ et,
126
+ {
127
+ "data-slot": "emperor-ui-item-card-header",
128
+ className: c(De({ orientation: o }), t?.header),
129
+ children: /* @__PURE__ */ r(
130
+ z,
131
+ {
132
+ className: c(
133
+ Ve({ orientation: o }),
134
+ t?.imageWrapper
135
+ )
136
+ }
137
+ )
138
+ }
139
+ ),
140
+ /* @__PURE__ */ b(
141
+ tt,
142
+ {
143
+ "data-slot": "emperor-ui-item-card-body",
144
+ className: c(Oe({ orientation: o }), t?.body),
145
+ children: [
146
+ /* @__PURE__ */ b("div", { className: "flex items-start justify-between gap-2", children: [
147
+ /* @__PURE__ */ r(z, { className: "h-5 flex-1 rounded-lg" }),
148
+ /* @__PURE__ */ r(z, { className: "size-8 shrink-0 rounded-lg" })
149
+ ] }),
150
+ /* @__PURE__ */ r(z, { className: "h-4 w-4/5 rounded-lg" }),
151
+ /* @__PURE__ */ r(z, { className: "h-4 w-full rounded-lg" })
152
+ ]
153
+ }
154
+ ),
155
+ /* @__PURE__ */ r(
156
+ at,
157
+ {
158
+ "data-slot": "emperor-ui-item-card-footer",
159
+ className: c(Re({ orientation: o }), t?.footer),
160
+ children: /* @__PURE__ */ b(
161
+ "menu",
162
+ {
163
+ "data-slot": "emperor-ui-item-card-chips",
164
+ className: c($e({ orientation: o }), t?.chips),
165
+ children: [
166
+ " ",
167
+ /* @__PURE__ */ r(z, { className: "h-6 w-16 rounded-full" }),
168
+ /* @__PURE__ */ r(z, { className: "h-6 w-20 rounded-full" }),
169
+ /* @__PURE__ */ r(z, { className: "h-6 w-14 rounded-full" })
170
+ ]
171
+ }
172
+ )
173
+ }
174
+ )
175
+ ]
176
+ }
177
+ )
178
+ }
179
+ );
180
+ }
181
+ function kn({
182
+ item: e,
183
+ orientation: t,
184
+ classNames: a
185
+ }) {
186
+ return e?.banner ? /* @__PURE__ */ r(
187
+ "div",
188
+ {
189
+ "data-slot": "emperor-ui-item-card-banner",
190
+ className: c(Ft({ orientation: t }), a?.banner),
191
+ children: e?.banner
192
+ }
193
+ ) : null;
194
+ }
195
+ function Vn({
196
+ variants: e,
197
+ isLoading: t = !1,
198
+ className: a,
199
+ classNames: o,
200
+ item: n,
201
+ actions: s = [],
202
+ hoverEffect: i = "none",
203
+ onActionClick: l,
204
+ orientation: d = "vertical",
205
+ actionsViewVariant: m = "dropdown"
206
+ }) {
207
+ const { isExtraSmallDevice: p } = Fa(), u = p ? "vertical" : d;
208
+ if (t)
209
+ return /* @__PURE__ */ r(
210
+ We,
211
+ {
212
+ className: a,
213
+ classNames: o,
214
+ orientation: u
215
+ }
216
+ );
217
+ const f = s && s.length > 0, h = m === "dropdown", v = m === "hover-overlay";
218
+ return /* @__PURE__ */ r(
219
+ _.div,
220
+ {
221
+ "data-slot": "emperor-ui-item-card",
222
+ className: c(
223
+ He({ orientation: u }),
224
+ "group",
225
+ o?.base,
226
+ a
227
+ ),
228
+ variants: e,
229
+ ...je({ hoverEffect: i }),
230
+ children: /* @__PURE__ */ b(
231
+ Je,
232
+ {
233
+ shadow: "sm",
234
+ "data-slot": "emperor-ui-item-card-main-wrapper",
235
+ className: c(
236
+ Ue({ orientation: u }),
237
+ "relative overflow-hidden",
238
+ o?.mainWrapper
239
+ ),
240
+ children: [
241
+ /* @__PURE__ */ r(
242
+ _t,
243
+ {
244
+ item: n,
245
+ orientation: u,
246
+ classNames: o,
247
+ actions: s,
248
+ onActionClick: l,
249
+ actionsViewVariant: h ? "dropdown" : m
250
+ }
251
+ ),
252
+ /* @__PURE__ */ r(
253
+ Mt,
254
+ {
255
+ item: n,
256
+ orientation: u,
257
+ classNames: o,
258
+ actions: s,
259
+ onActionClick: l,
260
+ actionsViewVariant: h ? "dropdown" : m
261
+ }
262
+ ),
263
+ /* @__PURE__ */ r(
264
+ Tt,
265
+ {
266
+ item: n,
267
+ orientation: u,
268
+ classNames: o,
269
+ actions: s,
270
+ onActionClick: l,
271
+ actionsViewVariant: m
272
+ }
273
+ ),
274
+ v && f && /* @__PURE__ */ r(
275
+ Bt,
276
+ {
277
+ actions: s,
278
+ classNames: o,
279
+ onActionClick: l,
280
+ orientation: u
281
+ }
282
+ )
283
+ ]
284
+ }
285
+ )
286
+ }
287
+ );
288
+ }
289
+ function Dn({
290
+ item: e,
291
+ orientation: t,
292
+ classNames: a,
293
+ actions: o,
294
+ onActionClick: n,
295
+ actionsViewVariant: s = "dropdown"
296
+ }) {
297
+ return /* @__PURE__ */ b(
298
+ et,
299
+ {
300
+ "data-slot": "emperor-ui-item-card-header",
301
+ className: c(De({ orientation: t }), a?.header),
302
+ children: [
303
+ e?.image && /* @__PURE__ */ r(
304
+ "div",
305
+ {
306
+ "data-slot": "emperor-ui-item-card-image-wrapper",
307
+ className: c(
308
+ Ve({ orientation: t }),
309
+ a?.imageWrapper
310
+ ),
311
+ children: /* @__PURE__ */ r(
312
+ me,
313
+ {
314
+ "data-slot": "emperor-ui-item-card-image",
315
+ src: e?.image?.src,
316
+ alt: e?.image?.alt,
317
+ className: c("size-full object-cover", a?.image),
318
+ radius: "none",
319
+ removeWrapper: !0
320
+ }
321
+ )
322
+ }
323
+ ),
324
+ /* @__PURE__ */ r(
325
+ zt,
326
+ {
327
+ item: e,
328
+ orientation: t,
329
+ classNames: a
330
+ }
331
+ ),
332
+ t === "vertical" && s === "dropdown" && /* @__PURE__ */ r(
333
+ Ge,
334
+ {
335
+ actions: o,
336
+ classNames: a,
337
+ onActionClick: n
338
+ }
339
+ )
340
+ ]
341
+ }
342
+ );
343
+ }
344
+ function On({
345
+ item: e,
346
+ orientation: t,
347
+ classNames: a,
348
+ actions: o,
349
+ onActionClick: n,
350
+ actionsViewVariant: s = "dropdown"
351
+ }) {
352
+ return /* @__PURE__ */ b(
353
+ tt,
354
+ {
355
+ "data-slot": "emperor-ui-item-card-body",
356
+ className: c(Oe({ orientation: t }), a?.body),
357
+ children: [
358
+ e?.title && /* @__PURE__ */ r(
359
+ "h3",
360
+ {
361
+ "data-slot": "emperor-ui-item-card-title",
362
+ className: c(kt({ orientation: t }), a?.title),
363
+ children: e?.title
364
+ }
365
+ ),
366
+ e?.description && /* @__PURE__ */ r(
367
+ "p",
368
+ {
369
+ "data-slot": "emperor-ui-item-card-description",
370
+ className: c(
371
+ Vt({ orientation: t }),
372
+ a?.description
373
+ ),
374
+ children: e?.description
375
+ }
376
+ ),
377
+ e?.price && /* @__PURE__ */ r(
378
+ "p",
379
+ {
380
+ "data-slot": "emperor-ui-item-card-price",
381
+ className: c(Dt({ orientation: t }), a?.price),
382
+ children: e?.price
383
+ }
384
+ ),
385
+ t === "horizontal" && s === "dropdown" && /* @__PURE__ */ r(
386
+ Ge,
387
+ {
388
+ actions: o,
389
+ classNames: a,
390
+ onActionClick: n
391
+ }
392
+ )
393
+ ]
394
+ }
395
+ );
396
+ }
397
+ function $n({
398
+ item: e,
399
+ orientation: t,
400
+ classNames: a,
401
+ actions: o,
402
+ onActionClick: n,
403
+ actionsViewVariant: s = "dropdown"
404
+ }) {
405
+ return /* @__PURE__ */ b(
406
+ at,
407
+ {
408
+ "data-slot": "emperor-ui-item-card-footer",
409
+ className: c(Re({ orientation: t }), a?.footer),
410
+ children: [
411
+ e?.chips && e?.chips?.length > 0 && /* @__PURE__ */ r(
412
+ "menu",
413
+ {
414
+ "data-slot": "emperor-ui-item-card-chips",
415
+ className: c($e({ orientation: t }), a?.chips),
416
+ children: e?.chips?.map(
417
+ ({
418
+ label: i,
419
+ className: l,
420
+ classNames: d,
421
+ ...m
422
+ }, p) => /* @__PURE__ */ r(
423
+ _a,
424
+ {
425
+ "data-slot": "emperor-ui-item-card-chip",
426
+ className: c(l, a?.chip),
427
+ classNames: {
428
+ content: "text-xs mx-1",
429
+ ...d
430
+ },
431
+ size: "sm",
432
+ variant: "flat",
433
+ color: "primary",
434
+ ...m,
435
+ children: i
436
+ },
437
+ p
438
+ )
439
+ )
440
+ }
441
+ ),
442
+ s === "buttons" && o && o?.length > 0 && /* @__PURE__ */ r(
443
+ Ot,
444
+ {
445
+ actions: o,
446
+ classNames: a,
447
+ onActionClick: n,
448
+ className: "ml-auto"
449
+ }
450
+ )
451
+ ]
452
+ }
453
+ );
454
+ }
455
+ function Rn({
456
+ actions: e,
457
+ classNames: t,
458
+ onActionClick: a
459
+ }) {
460
+ return !e || e?.length === 0 ? null : /* @__PURE__ */ b(Ma, { placement: "bottom-end", children: [
461
+ /* @__PURE__ */ r(Ta, { "data-slot": "emperor-ui-item-card-actions-dropdown-trigger", children: /* @__PURE__ */ r(
462
+ L,
463
+ {
464
+ isIconOnly: !0,
465
+ size: "sm",
466
+ variant: "flat",
467
+ radius: "full",
468
+ className: c(
469
+ "absolute right-2 top-2 z-10 size-7 min-w-7 backdrop-blur-lg",
470
+ "border border-default-300",
471
+ t?.dropdown
472
+ ),
473
+ children: /* @__PURE__ */ r(ka, { className: "size-4" })
474
+ }
475
+ ) }),
476
+ /* @__PURE__ */ r(
477
+ Ba,
478
+ {
479
+ "data-slot": "emperor-ui-item-card-actions-dropdown-menu",
480
+ "aria-label": "Card actions",
481
+ onAction: (o) => a?.(String(o)),
482
+ items: e,
483
+ children: ({ key: o, label: n, ...s }) => /* @__PURE__ */ r(
484
+ za,
485
+ {
486
+ "data-slot": "emperor-ui-item-card-actions-dropdown-item",
487
+ textValue: n,
488
+ title: n,
489
+ ...s
490
+ },
491
+ o
492
+ )
493
+ }
494
+ )
495
+ ] });
496
+ }
497
+ function Un({
498
+ actions: e,
499
+ classNames: t,
500
+ onActionClick: a,
501
+ className: o
502
+ }) {
503
+ return !e || e.length === 0 ? null : /* @__PURE__ */ r(
504
+ "div",
505
+ {
506
+ "data-slot": "emperor-ui-item-card-actions-buttons",
507
+ className: c("flex flex-wrap gap-2", t?.actions, o),
508
+ children: e.map(
509
+ ({ key: n, label: s, className: i, ...l }, d) => /* @__PURE__ */ r(
510
+ L,
511
+ {
512
+ "data-slot": "emperor-ui-item-card-actions-button",
513
+ size: "sm",
514
+ className: c(t?.action, i),
515
+ onPress: () => n && a?.(String(n)),
516
+ ...l,
517
+ children: s
518
+ },
519
+ n ?? d
520
+ )
521
+ )
522
+ }
523
+ );
524
+ }
525
+ function Hn({
526
+ actions: e,
527
+ classNames: t,
528
+ onActionClick: a,
529
+ orientation: o
530
+ }) {
531
+ return !e || e?.length === 0 ? null : /* @__PURE__ */ r(
532
+ "div",
533
+ {
534
+ "data-slot": "emperor-ui-item-card-actions-overlay",
535
+ className: c(
536
+ "absolute inset-0 z-20 gap-3 flex items-center justify-center bg-black/60 opacity-0",
537
+ o === "horizontal" ? "flex-row" : "flex-col",
538
+ "transition-opacity duration-200 group-hover:opacity-100",
539
+ t?.actions
540
+ ),
541
+ children: e?.map(
542
+ ({ key: n, label: s, className: i, ...l }, d) => /* @__PURE__ */ r(er, { content: s, children: /* @__PURE__ */ r(
543
+ L,
544
+ {
545
+ "data-slot": "emperor-ui-item-card-actions-overlay-button",
546
+ isIconOnly: !0,
547
+ radius: "full",
548
+ className: c(t?.action, i),
549
+ onPress: () => n && a?.(String(n)),
550
+ ...l
551
+ },
552
+ n ?? d
553
+ ) })
554
+ )
555
+ }
556
+ );
557
+ }
558
+ const Wn = C(["w-full relative"], {
559
+ variants: {
560
+ orientation: {
561
+ vertical: "max-w-80",
562
+ horizontal: "min-w-full max-w-full"
563
+ }
564
+ },
565
+ defaultVariants: {},
566
+ compoundVariants: []
567
+ }), Gn = C(["size-full"], {
568
+ variants: {
569
+ orientation: {
570
+ vertical: "flex flex-col",
571
+ horizontal: "grid grid-cols-[200px_auto]"
572
+ }
573
+ },
574
+ defaultVariants: {},
575
+ compoundVariants: []
576
+ }), Kn = C(
577
+ ["relative aspect-4/3 overflow-hidden"],
578
+ {
579
+ variants: {
580
+ orientation: {
581
+ vertical: "w-full",
582
+ horizontal: "w-fit h-full"
583
+ }
584
+ },
585
+ defaultVariants: {},
586
+ compoundVariants: []
587
+ }
588
+ ), jn = C(["relative p-0"], {
589
+ variants: {
590
+ orientation: {
591
+ vertical: "",
592
+ horizontal: "row-span-2"
593
+ }
594
+ },
595
+ defaultVariants: {},
596
+ compoundVariants: []
597
+ }), qn = C(["relative flex flex-col gap-2 p-4"], {
598
+ variants: {
599
+ orientation: {
600
+ vertical: "",
601
+ horizontal: ""
602
+ }
603
+ },
604
+ defaultVariants: {},
605
+ compoundVariants: []
606
+ }), Yn = C(
607
+ ["flex flex-wrap flex-col p-4 gap-4 items-start"],
608
+ {
609
+ variants: {
610
+ orientation: {
611
+ vertical: "",
612
+ horizontal: "justify-end"
613
+ }
614
+ },
615
+ defaultVariants: {},
616
+ compoundVariants: []
617
+ }
618
+ ), Xn = C(
619
+ ["line-clamp-1 font-semibold text-foreground"],
620
+ {
621
+ variants: {
622
+ orientation: {
623
+ vertical: "",
624
+ horizontal: "w-[calc(100%-30px)]"
625
+ }
626
+ },
627
+ defaultVariants: {},
628
+ compoundVariants: []
629
+ }
630
+ ), Zn = C(["text-2xl font-bold text-foreground"], {
631
+ variants: {
632
+ orientation: {
633
+ vertical: "",
634
+ horizontal: ""
635
+ }
636
+ },
637
+ defaultVariants: {},
638
+ compoundVariants: []
639
+ }), Qn = C(
640
+ ["line-clamp-2 text-sm text-default-600"],
641
+ {
642
+ variants: {
643
+ orientation: {
644
+ vertical: "",
645
+ horizontal: ""
646
+ }
647
+ },
648
+ defaultVariants: {},
649
+ compoundVariants: []
650
+ }
651
+ ), Jn = C(["flex flex-wrap items-center gap-2 p-1"], {
652
+ variants: {
653
+ orientation: {
654
+ vertical: "",
655
+ horizontal: ""
656
+ }
657
+ },
658
+ defaultVariants: {},
659
+ compoundVariants: []
660
+ }), es = C(
661
+ [
662
+ "absolute left-0 top-0 z-10 px-2 py-1 text-xs font-semibold",
663
+ "bg-primary-500/50 backdrop-blur-sm text-center flex justify-center items-center",
664
+ "-rotate-45 w-full text-white"
665
+ ],
666
+ {
667
+ variants: {
668
+ orientation: {
669
+ vertical: "-translate-x-28 translate-y-7",
670
+ horizontal: "-translate-x-14 translate-y-7"
671
+ }
672
+ },
673
+ defaultVariants: {},
674
+ compoundVariants: []
675
+ }
676
+ ), $r = C(["relative flex items-center gap-3"], {
677
+ variants: {
678
+ hoverEffect: {
679
+ default: [],
680
+ solid: [],
681
+ underline: [],
682
+ ghost: [],
683
+ bordered: [],
684
+ none: []
685
+ },
686
+ variant: {
687
+ default: [],
688
+ solid: [],
689
+ bordered: []
690
+ }
691
+ },
692
+ defaultVariants: {
693
+ hoverEffect: "default",
694
+ variant: "default"
695
+ }
696
+ }), Rr = C(["size-full flex items-center"], {
697
+ variants: {
698
+ variant: {
699
+ default: [],
700
+ solid: [],
701
+ bordered: []
702
+ }
703
+ },
704
+ defaultVariants: {
705
+ variant: "default"
706
+ }
707
+ }), Ur = C(
708
+ [
709
+ "relative cursor-pointer px-4 py-2 transition-all font-semibold flex items-center gap-2"
710
+ ],
711
+ {
712
+ variants: {
713
+ hoverEffect: {
714
+ default: [],
715
+ solid: ["hover:opacity-80"],
716
+ underline: [
717
+ "relative font-bold",
718
+ "before:absolute before:bottom-0 before:left-0",
719
+ "before:h-0.5 before:w-full before:bg-current before:rounded-lg",
720
+ "before:scale-x-0 before:transition-transform hover:before:scale-x-100"
721
+ ],
722
+ ghost: [],
723
+ bordered: ["last:border-r-2! first:border-l-2!"],
724
+ none: []
725
+ },
726
+ variant: {
727
+ default: [],
728
+ solid: [],
729
+ bordered: ["last:border-r-2! first:border-l-2!"]
730
+ }
731
+ },
732
+ defaultVariants: {
733
+ hoverEffect: "default",
734
+ variant: "default"
735
+ }
736
+ }
737
+ ), Hr = ({
738
+ primaryColor: e,
739
+ foregroundColor: t,
740
+ variant: a
741
+ }) => a === "solid" ? {
742
+ backgroundColor: e,
743
+ color: t
744
+ } : {}, Wr = ({}) => ({}), Gr = ({
745
+ foregroundColor: e,
746
+ hoverEffect: t,
747
+ primaryColor: a,
748
+ isHovered: o,
749
+ variant: n
750
+ }) => t === "solid" ? {
751
+ color: e,
752
+ backgroundColor: a
753
+ } : t === "underline" ? {
754
+ // color: primaryColor,
755
+ } : t === "ghost" ? {
756
+ color: o ? a : e,
757
+ backgroundColor: o ? "transparent" : a,
758
+ borderColor: o ? a : "transparent",
759
+ borderWidth: "2px",
760
+ borderStyle: "solid"
761
+ } : t === "bordered" ? {
762
+ color: o ? e : a,
763
+ backgroundColor: o ? a : "transparent",
764
+ borderColor: o ? "transparent" : a,
765
+ borderTopWidth: "2px",
766
+ borderBottomWidth: "2px",
767
+ borderRightWidth: "1px",
768
+ borderLeftWidth: "1px",
769
+ borderStyle: "solid"
770
+ } : n === "bordered" ? {
771
+ color: a,
772
+ backgroundColor: "transparent",
773
+ borderColor: a,
774
+ borderTopWidth: "2px",
775
+ borderBottomWidth: "2px",
776
+ borderRightWidth: "1px",
777
+ borderLeftWidth: "1px",
778
+ borderStyle: "solid"
779
+ } : {}, ts = A(
780
+ ({
781
+ className: e,
782
+ hoverEffect: t = "default",
783
+ variant: a = "default",
784
+ items: o = [],
785
+ subItemsColumns: n = 3,
786
+ ...s
787
+ }, i) => /* @__PURE__ */ b(
788
+ "nav",
789
+ {
790
+ ref: i,
791
+ "data-slot": "emperor-nav-bar",
792
+ className: c($r({ hoverEffect: t, variant: a, className: e })),
793
+ style: Hr({
794
+ variant: a
795
+ }),
796
+ ...s,
797
+ children: [
798
+ /* @__PURE__ */ r(
799
+ "ul",
800
+ {
801
+ className: c(Rr({ className: e })),
802
+ style: Wr({}),
803
+ "data-slot": "emperor-nav-bar-menu",
804
+ children: o?.map((l) => /* @__PURE__ */ r(
805
+ $t,
806
+ {
807
+ item: l,
808
+ variant: a,
809
+ hoverEffect: t
810
+ },
811
+ l.id
812
+ ))
813
+ }
814
+ ),
815
+ /* @__PURE__ */ r(Rt, { subItemsColumns: n })
816
+ ]
817
+ }
818
+ )
819
+ ), as = ({ subItemsColumns: e = 3 }) => {
820
+ const {
821
+ hoveredItemId: t,
822
+ subItems: a,
823
+ isSubItemsBoxOpen: o,
824
+ subItemsBoxIsHovered: n,
825
+ setSubItemsBoxIsHovered: s,
826
+ setIsSubItemsBoxOpen: i
827
+ } = rt(), l = o || n;
828
+ return /* @__PURE__ */ r(
829
+ "div",
830
+ {
831
+ className: c(
832
+ "absolute top-full left-0 w-full overflow-hidden bg-background",
833
+ "transition-all duration-300 ease-in-out z-50"
834
+ ),
835
+ style: {
836
+ maxHeight: l ? `${Number(a.length / e) * 70}px` : "0px"
837
+ },
838
+ onMouseEnter: () => {
839
+ s(!0), i(!0);
840
+ },
841
+ onMouseLeave: () => {
842
+ s(!1), t || i(!1);
843
+ },
844
+ children: /* @__PURE__ */ r(
845
+ "ul",
846
+ {
847
+ className: "grid border border-gray-200",
848
+ style: { gridTemplateColumns: `repeat(${e}, 1fr)` },
849
+ children: a?.map(({ id: d, href: m, label: p, Icon: u }) => /* @__PURE__ */ b(
850
+ J,
851
+ {
852
+ href: m,
853
+ className: c(
854
+ " w-full flex items-center gap-2 text-foreground p-2 transition-all duration-300 ease-in-out",
855
+ "hover:text-background hover:bg-primary"
856
+ ),
857
+ children: [
858
+ u && /* @__PURE__ */ r(u, { className: "size-4" }),
859
+ p && /* @__PURE__ */ r("p", { children: p })
860
+ ]
861
+ },
862
+ d
863
+ ))
864
+ }
865
+ )
866
+ }
867
+ );
868
+ }, rs = A(({ className: e, item: t, variant: a, hoverEffect: o, ...n }, s) => {
869
+ const {
870
+ hoveredItemId: i,
871
+ subItemsBoxIsHovered: l,
872
+ setSubItems: d,
873
+ setHoveredItemId: m,
874
+ setIsSubItemsBoxOpen: p
875
+ } = rt(), { id: u, label: f, Icon: h, subItems: v } = t, g = i === u, x = (S) => {
876
+ if (S) {
877
+ m(S), v && v.length > 0 ? (d(v), p(!0)) : p(!1);
878
+ return;
879
+ }
880
+ m(null), l || p(!1);
881
+ };
882
+ return /* @__PURE__ */ b(
883
+ "li",
884
+ {
885
+ ref: s,
886
+ "data-slot": "emperor-nav-bar-item",
887
+ style: Gr({
888
+ hoverEffect: o,
889
+ isHovered: g,
890
+ variant: a
891
+ }),
892
+ className: c(Ur({ hoverEffect: o, variant: a })),
893
+ onMouseEnter: () => x(u),
894
+ onMouseLeave: () => x(null),
895
+ ...n,
896
+ children: [
897
+ h && /* @__PURE__ */ r(h, { className: "size-4" }),
898
+ f && /* @__PURE__ */ r("p", { children: f })
899
+ ]
900
+ }
901
+ );
902
+ }), Kr = ({
903
+ foregroundColor: e,
904
+ primaryColor: t,
905
+ isHovered: a
906
+ }) => ({
907
+ color: a ? e : "inherit",
908
+ backgroundColor: a ? t : "transparent"
909
+ }), jr = C([""], {
910
+ variants: {
911
+ variant: {
912
+ default: [],
913
+ compact: []
914
+ }
915
+ },
916
+ defaultVariants: {},
917
+ compoundVariants: []
918
+ }), qr = C(
919
+ [
920
+ "w-full cursor-pointer px-6 py-2 transition-all font-semibold text-sm flex items-center gap-2"
921
+ ],
922
+ {
923
+ variants: {
924
+ variant: {
925
+ default: [],
926
+ compact: []
927
+ }
928
+ },
929
+ defaultVariants: {},
930
+ compoundVariants: []
931
+ }
932
+ ), Yr = ({
933
+ isOpen: e,
934
+ onOpenChange: t,
935
+ triggerProps: a,
936
+ classNames: o,
937
+ header: n,
938
+ items: s = [],
939
+ actions: i = [],
940
+ variant: l = "default"
941
+ }) => {
942
+ const { config: d } = w(), [m, p] = I(null), { content: u, ...f } = a || {}, h = d?.interLocalization?.dir, v = h === "rtl";
943
+ return /* @__PURE__ */ b(se, { children: [
944
+ /* @__PURE__ */ r(
945
+ L,
946
+ {
947
+ variant: "ghost",
948
+ isIconOnly: !0,
949
+ size: "sm",
950
+ onPress: () => t?.(!0),
951
+ className: c(o?.trigger),
952
+ ...f,
953
+ children: u
954
+ }
955
+ ),
956
+ /* @__PURE__ */ r(
957
+ tr,
958
+ {
959
+ isOpen: e,
960
+ onOpenChange: t,
961
+ placement: v ? "right" : "left",
962
+ size: "sm",
963
+ dir: h,
964
+ className: "p-0",
965
+ children: /* @__PURE__ */ b(ar, { className: "p-0", children: [
966
+ /* @__PURE__ */ r(rr, { className: c("text-xl font-bold", o?.title), children: n }),
967
+ /* @__PURE__ */ r(or, { className: c("p-0 mt-4 h-fit"), children: /* @__PURE__ */ r(
968
+ st,
969
+ {
970
+ as: "ul",
971
+ hideScrollBar: !0,
972
+ "data-slot": "emperor-side-bar-menu",
973
+ className: c("max-h-[60vh] overflow-y-auto", o?.menu),
974
+ children: s?.map(({ id: g, label: x, href: S, Icon: y }) => /* @__PURE__ */ b(
975
+ "li",
976
+ {
977
+ "data-slot": "emperor-side-bar-item",
978
+ style: Kr({
979
+ isHovered: m === g
980
+ }),
981
+ className: c(
982
+ qr({ variant: l }),
983
+ o?.menuItem
984
+ ),
985
+ onMouseEnter: () => p(g),
986
+ onMouseLeave: () => p(null),
987
+ children: [
988
+ y && /* @__PURE__ */ r(y, { className: "size-4" }),
989
+ x && /* @__PURE__ */ r("p", { children: x })
990
+ ]
991
+ },
992
+ S
993
+ ))
994
+ }
995
+ ) }),
996
+ i && i?.length > 0 && /* @__PURE__ */ b(se, { children: [
997
+ /* @__PURE__ */ r(ge, { className: "m-auto w-11/12" }),
998
+ /* @__PURE__ */ r(nr, { className: c(o?.actionsWrapper), children: i?.map(({ key: g, label: x, ...S }) => /* @__PURE__ */ r(
999
+ L,
1000
+ {
1001
+ variant: "ghost",
1002
+ size: "sm",
1003
+ className: c(o?.actionItem),
1004
+ ...S,
1005
+ children: x
1006
+ },
1007
+ g
1008
+ )) })
1009
+ ] })
1010
+ ] })
1011
+ }
1012
+ )
1013
+ ] });
1014
+ }, Xr = ({
1015
+ items: e = [],
1016
+ isOpen: t,
1017
+ onOpenChange: a,
1018
+ triggerProps: o
1019
+ }) => {
1020
+ const { content: n, ...s } = o || {};
1021
+ return /* @__PURE__ */ b(
1022
+ "div",
1023
+ {
1024
+ className: c(
1025
+ "flex flex-col gap-4 p-2",
1026
+ "h-[calc(100vh-16px)] bg-gray-200 m-2 rounded-lg overflow-hidden",
1027
+ "transition-width ease-in-out duration-300",
1028
+ t ? "w-[20vw]" : "w-[48px]"
1029
+ ),
1030
+ children: [
1031
+ /* @__PURE__ */ r("div", { className: "w-fit flex flex-col", children: /* @__PURE__ */ r(
1032
+ L,
1033
+ {
1034
+ variant: "light",
1035
+ size: "sm",
1036
+ onPress: () => a?.(!0),
1037
+ className: c("min-w-7 w-fit px-0.5"),
1038
+ ...s,
1039
+ children: n
1040
+ }
1041
+ ) }),
1042
+ /* @__PURE__ */ r(ge, {}),
1043
+ /* @__PURE__ */ r(
1044
+ st,
1045
+ {
1046
+ as: "ul",
1047
+ hideScrollBar: !0,
1048
+ className: "max-h-[70vh] flex flex-col gap-4 p-0 overflow-y-auto",
1049
+ children: e?.map(({ id: i, Icon: l, label: d }) => /* @__PURE__ */ b(
1050
+ "li",
1051
+ {
1052
+ className: "w-fit flex items-center justify-center gap-3 ms-1.5 cursor-pointer",
1053
+ children: [
1054
+ l && /* @__PURE__ */ r(l, { className: "size-5" }),
1055
+ d && t && /* @__PURE__ */ r("p", { className: c("text-sm font-semibold"), children: d })
1056
+ ]
1057
+ },
1058
+ i
1059
+ ))
1060
+ }
1061
+ )
1062
+ ]
1063
+ }
1064
+ );
1065
+ }, Zr = (e) => {
1066
+ const [t, a] = I(null);
1067
+ return $(() => {
1068
+ const o = document.getElementById("emperor-compact-sidebar");
1069
+ setTimeout(() => {
1070
+ a(o);
1071
+ }, 100);
1072
+ }, []), t ? it(/* @__PURE__ */ r(Xr, { ...e }), t) : null;
1073
+ }, os = A((e, t) => {
1074
+ const { variant: a = "default", className: o, classNames: n } = e;
1075
+ return /* @__PURE__ */ b(
1076
+ "div",
1077
+ {
1078
+ ref: t,
1079
+ "data-slot": "emperor-side-bar",
1080
+ className: c(
1081
+ jr({
1082
+ variant: a,
1083
+ className: c(o, n?.base)
1084
+ })
1085
+ ),
1086
+ ...e,
1087
+ children: [
1088
+ a === "default" && /* @__PURE__ */ r(Yr, { ...e }),
1089
+ a === "compact" && /* @__PURE__ */ r(Zr, { ...e })
1090
+ ]
1091
+ }
1092
+ );
1093
+ }), ns = A(
1094
+ ({ className: e, children: t, ...a }, o) => {
1095
+ const { config: n } = w();
1096
+ return /* @__PURE__ */ r(
1097
+ "main",
1098
+ {
1099
+ ref: o,
1100
+ dir: n?.interLocalization?.dir,
1101
+ "data-slot": "scaffold",
1102
+ className: c(Ut({ className: e }), e),
1103
+ ...a,
1104
+ children: t
1105
+ }
1106
+ );
1107
+ }
1108
+ ), ss = C(
1109
+ ["flex flex-col min-h-screen w-full max-w-screen"],
1110
+ {
1111
+ variants: {},
1112
+ defaultVariants: {},
1113
+ compoundVariants: []
1114
+ }
1115
+ ), Qr = C([""], {
1116
+ variants: {
1117
+ variant: {}
1118
+ },
1119
+ defaultVariants: {},
1120
+ compoundVariants: []
1121
+ }), is = A(
1122
+ ({
1123
+ className: e,
1124
+ variant: t,
1125
+ src: a,
1126
+ alt: o = "Emperor UI",
1127
+ name: n = "Emperor UI",
1128
+ isIconOnly: s = !1,
1129
+ classNames: i,
1130
+ ...l
1131
+ }, d) => /* @__PURE__ */ b(
1132
+ le,
1133
+ {
1134
+ ref: d,
1135
+ "data-slot": "emperor-brand",
1136
+ className: c(
1137
+ Qr({ variant: t, className: c(e, i?.base) })
1138
+ ),
1139
+ ...l,
1140
+ children: [
1141
+ a && /* @__PURE__ */ r(
1142
+ me,
1143
+ {
1144
+ "data-slot": "emperor-brand-logo",
1145
+ src: a,
1146
+ alt: o,
1147
+ radius: "md",
1148
+ className: c("min-w-7 min-h-7 size-7", i?.logo)
1149
+ }
1150
+ ),
1151
+ n && !s && /* @__PURE__ */ r(
1152
+ "p",
1153
+ {
1154
+ "data-slot": "emperor-brand-name",
1155
+ className: c("font-semibold text-lg", i?.name),
1156
+ children: n
1157
+ }
1158
+ )
1159
+ ]
1160
+ }
1161
+ )
1162
+ ), Jr = C(["flex flex-col gap-3"], {
1163
+ variants: {},
1164
+ defaultVariants: {},
1165
+ compoundVariants: []
1166
+ }), ls = A(({ className: e, children: t, ...a }, o) => /* @__PURE__ */ r("section", { ref: o, className: c(Jr({ className: e })), ...a, children: t })), eo = C(["flex w-full container p-4 mx-auto"], {
1167
+ variants: {},
1168
+ defaultVariants: {},
1169
+ compoundVariants: []
1170
+ }), cs = A(({ className: e, children: t, ...a }, o) => /* @__PURE__ */ r(
1171
+ "section",
1172
+ {
1173
+ ref: o,
1174
+ "data-slot": "container",
1175
+ className: c(eo({ className: e })),
1176
+ ...a,
1177
+ children: t
1178
+ }
1179
+ )), to = C(["flex items-center gap-3"], {
1180
+ variants: {},
1181
+ defaultVariants: {},
1182
+ compoundVariants: []
1183
+ }), ds = A(({ className: e, children: t, ...a }, o) => /* @__PURE__ */ r(
1184
+ "section",
1185
+ {
1186
+ ref: o,
1187
+ "data-slot": "row",
1188
+ className: c(to({ className: e })),
1189
+ ...a,
1190
+ children: t
1191
+ }
1192
+ ));
1193
+ function ms({
1194
+ children: e,
1195
+ containerId: t,
1196
+ isVisible: a = !0
1197
+ }) {
1198
+ const [o, n] = I(null);
1199
+ return $(() => {
1200
+ const s = document.getElementById(t);
1201
+ setTimeout(() => {
1202
+ n(s);
1203
+ }, 100);
1204
+ }, [t]), !o || !a ? null : it(e, o);
1205
+ }
1206
+ const ao = C(["w-full flex flex-col gap-2"], {
1207
+ variants: {},
1208
+ defaultVariants: {},
1209
+ compoundVariants: []
1210
+ }), us = A(({ className: e, ...t }, a) => {
1211
+ const {
1212
+ isAvatar: o,
1213
+ hideListing: n,
1214
+ isFileViewable: s,
1215
+ hideErrorMessage: i,
1216
+ // Uploader API — must not be forwarded to a DOM element (React warns on unknown props).
1217
+ selectedFile: l,
1218
+ setSelectedFile: d,
1219
+ labelId: m,
1220
+ labelContent: p,
1221
+ avatarLabelContent: u,
1222
+ title: f,
1223
+ errorMessage: h,
1224
+ isRequired: v,
1225
+ isDraggable: g,
1226
+ isLoading: x,
1227
+ isMulti: S,
1228
+ placeholderImage: y,
1229
+ files: P,
1230
+ fileTypes: T,
1231
+ onInputChange: W,
1232
+ handleClearFile: xt,
1233
+ modal: E,
1234
+ classNames: B,
1235
+ locales: D,
1236
+ setFiles: ye,
1237
+ ...ae
1238
+ } = t;
1239
+ return /* @__PURE__ */ r(sr, { ...t, children: /* @__PURE__ */ b(
1240
+ "div",
1241
+ {
1242
+ ref: a,
1243
+ className: c(ao({ className: e })),
1244
+ ...ae,
1245
+ children: [
1246
+ /* @__PURE__ */ r(Ht, {}),
1247
+ o ? /* @__PURE__ */ r(Wt, {}) : /* @__PURE__ */ r(Gt, {}),
1248
+ !n && /* @__PURE__ */ r(Kt, {}),
1249
+ !i && /* @__PURE__ */ r(jt, {}),
1250
+ /* @__PURE__ */ r(qt, {}),
1251
+ s && /* @__PURE__ */ r(Yt, {})
1252
+ ]
1253
+ }
1254
+ ) });
1255
+ });
1256
+ function ps() {
1257
+ const { config: e } = w(), [t, a] = I(null), {
1258
+ labelId: o,
1259
+ classNames: n,
1260
+ labelContent: s,
1261
+ isDraggable: i,
1262
+ onInputChange: l,
1263
+ avatarLabelContent: d,
1264
+ placeholderImage: m,
1265
+ files: p,
1266
+ isLoading: u,
1267
+ isMulti: f,
1268
+ locales: h
1269
+ } = R(), v = e?.interLocalization?.locales, g = e?.interLocalization?.lang || e?.interLocalization?.defaultLanguage || "en", x = ee(g), S = Z({
1270
+ defaultUploaderLocale: x.atoms.uploader,
1271
+ configUploaderLocale: v?.[g]?.atoms?.uploader,
1272
+ contextUploaderLocale: h
1273
+ }), y = (W) => {
1274
+ W.preventDefault(), l && l(W);
1275
+ }, P = (W) => {
1276
+ W.preventDefault(), a(S.dropHere);
1277
+ }, T = () => {
1278
+ a("");
1279
+ };
1280
+ return !f && p?.length > 0 ? null : u ? /* @__PURE__ */ b("div", { className: c("mx-auto", n?.label), children: [
1281
+ /* @__PURE__ */ r(ve, { className: "mx-auto", size: "lg" }),
1282
+ ";"
1283
+ ] }) : /* @__PURE__ */ b(
1284
+ "label",
1285
+ {
1286
+ className: c(
1287
+ "w-full cursor-pointer mx-auto transition-opacity flex flex-col gap-5",
1288
+ t && "opacity-60",
1289
+ n?.label
1290
+ ),
1291
+ htmlFor: o,
1292
+ onDrop: i ? y : () => {
1293
+ },
1294
+ onDragOver: i ? P : () => {
1295
+ },
1296
+ onDragLeave: i ? T : () => {
1297
+ },
1298
+ children: [
1299
+ d,
1300
+ s || /* @__PURE__ */ r(
1301
+ pr,
1302
+ {
1303
+ src: p?.[0]?.view || m || mr.PLACEHOLDER_MALE_AVATAR,
1304
+ alt: "avatar",
1305
+ size: "lg",
1306
+ className: c("size-24", n?.avatar)
1307
+ }
1308
+ )
1309
+ ]
1310
+ }
1311
+ );
1312
+ }
1313
+ function fs() {
1314
+ const { config: e } = w(), [t, a] = I(""), {
1315
+ labelId: o,
1316
+ classNames: n,
1317
+ labelContent: s,
1318
+ isDraggable: i,
1319
+ onInputChange: l,
1320
+ isLoading: d,
1321
+ isMulti: m,
1322
+ files: p,
1323
+ locales: u
1324
+ } = R(), f = e?.interLocalization?.locales, h = e?.interLocalization?.lang || e?.interLocalization?.defaultLanguage || "en", v = ee(h), g = Z({
1325
+ defaultUploaderLocale: v.atoms.uploader,
1326
+ configUploaderLocale: f?.[h]?.atoms?.uploader,
1327
+ contextUploaderLocale: u
1328
+ }), x = (P) => {
1329
+ P.preventDefault(), l && l(P);
1330
+ }, S = (P) => {
1331
+ P.preventDefault(), a(g.dropHere);
1332
+ }, y = () => {
1333
+ a("");
1334
+ };
1335
+ return !m && p?.length > 0 ? null : d ? /* @__PURE__ */ b("div", { className: c("w-full flex mx-auto", n?.label), children: [
1336
+ /* @__PURE__ */ r(ve, { className: "mx-auto", size: "lg" }),
1337
+ ";"
1338
+ ] }) : /* @__PURE__ */ r(
1339
+ "label",
1340
+ {
1341
+ className: c("w-full cursor-pointer mx-auto", n?.label),
1342
+ htmlFor: o,
1343
+ onDrop: i ? x : () => {
1344
+ },
1345
+ onDragOver: i ? S : () => {
1346
+ },
1347
+ onDragLeave: i ? y : () => {
1348
+ },
1349
+ children: s || /* @__PURE__ */ b("div", { className: "pointer-events-none flex size-full flex-col items-center justify-center gap-2 rounded-md border border-dashed bg-primary/10 px-2 py-8 text-xs", children: [
1350
+ /* @__PURE__ */ r(Va, { className: "size-10 text-primary" }),
1351
+ /* @__PURE__ */ r("p", { className: "font-bold", children: g.selectFile }),
1352
+ /* @__PURE__ */ r("p", { className: "opacity-70", children: g.selectionTypes }),
1353
+ t && /* @__PURE__ */ r("p", { className: "text-sm font-bold", children: t })
1354
+ ] })
1355
+ }
1356
+ );
1357
+ }
1358
+ function hs() {
1359
+ const { config: e } = w(), { modal: t, selectedFile: a } = R(), o = e?.interLocalization?.lang || "en", n = a?.view, s = a?.file?.name;
1360
+ return !n || !s ? null : /* @__PURE__ */ r(
1361
+ lt,
1362
+ {
1363
+ placement: "center",
1364
+ isOpen: t?.isOpen,
1365
+ dir: o === "ar" ? "rtl" : "ltr",
1366
+ onClose: t?.onClose,
1367
+ onOpenChange: t?.onOpenChange,
1368
+ size: "xl",
1369
+ ...t,
1370
+ children: /* @__PURE__ */ r(ct, { className: "px-5", children: /* @__PURE__ */ r(dt, { className: "h-[60vh]", children: /* @__PURE__ */ r(
1371
+ me,
1372
+ {
1373
+ className: "size-full rounded-md object-cover",
1374
+ src: n,
1375
+ alt: s,
1376
+ width: 500,
1377
+ height: 500
1378
+ }
1379
+ ) }) })
1380
+ }
1381
+ );
1382
+ }
1383
+ function gs() {
1384
+ const { files: e, setSelectedFile: t, handleClearFile: a, classNames: o, modal: n } = R();
1385
+ return /* @__PURE__ */ r("ul", { className: c("w-full flex flex-col gap-2", o?.listing), children: e?.map((s) => {
1386
+ const i = n?.onOpen && s?.view && s?.file?.name && s?.type === "image";
1387
+ return s ? /* @__PURE__ */ b(
1388
+ "li",
1389
+ {
1390
+ className: c(
1391
+ "flex justify-between items-center p-2 gap-2 w-full border border-black/30 rounded-lg",
1392
+ o?.listingItem
1393
+ ),
1394
+ children: [
1395
+ /* @__PURE__ */ r("p", { className: "w-full line-clamp-1 text-xs max-w-60", children: s?.file?.name }),
1396
+ /* @__PURE__ */ r(
1397
+ L,
1398
+ {
1399
+ isIconOnly: !0,
1400
+ variant: "flat",
1401
+ radius: "full",
1402
+ className: "size-6 min-w-6",
1403
+ color: "danger",
1404
+ onPress: () => a(s?.file?.name),
1405
+ startContent: /* @__PURE__ */ r(Q, { className: "rounded-lg size-3" })
1406
+ }
1407
+ ),
1408
+ i && /* @__PURE__ */ r(
1409
+ L,
1410
+ {
1411
+ isIconOnly: !0,
1412
+ variant: "flat",
1413
+ radius: "full",
1414
+ className: "size-6 min-w-6",
1415
+ color: "primary",
1416
+ onPress: () => {
1417
+ t?.(s), n?.onOpen?.();
1418
+ },
1419
+ startContent: /* @__PURE__ */ r(ue, { className: "rounded-lg size-3" })
1420
+ }
1421
+ )
1422
+ ]
1423
+ },
1424
+ s?.file?.name
1425
+ ) : null;
1426
+ }) });
1427
+ }
1428
+ function vs() {
1429
+ const { config: e } = w(), { files: t, isRequired: a, classNames: o, errorMessage: n, locales: s } = R(), i = e?.interLocalization?.locales, l = e?.interLocalization?.lang || e?.interLocalization?.defaultLanguage || "en", d = ee(l), m = Z({
1430
+ defaultUploaderLocale: d.atoms.uploader,
1431
+ configUploaderLocale: i?.[l]?.atoms?.uploader,
1432
+ contextUploaderLocale: s
1433
+ });
1434
+ return N(
1435
+ () => t?.length === 0 && a,
1436
+ [t, a]
1437
+ ) ? /* @__PURE__ */ r("p", { className: c("text-[14px] text-danger", o?.error), children: n ?? m.errorUploadingFile }) : null;
1438
+ }
1439
+ function bs() {
1440
+ const {
1441
+ fileTypes: e = [],
1442
+ isMulti: t,
1443
+ labelId: a,
1444
+ onInputChange: o,
1445
+ classNames: n
1446
+ } = R();
1447
+ return /* @__PURE__ */ r(
1448
+ "input",
1449
+ {
1450
+ id: a,
1451
+ type: "file",
1452
+ accept: (() => {
1453
+ const i = [];
1454
+ return e?.forEach((l) => {
1455
+ i.push(...Aa?.[l] || []);
1456
+ }), i.join(", ");
1457
+ })(),
1458
+ className: c("hidden", n?.input),
1459
+ onChange: o,
1460
+ multiple: t
1461
+ }
1462
+ );
1463
+ }
1464
+ function Cs({ ...e }) {
1465
+ const { title: t, classNames: a } = R();
1466
+ return t ? /* @__PURE__ */ r(
1467
+ "h3",
1468
+ {
1469
+ className: c("text-lg font-bold", a?.title),
1470
+ "data-slot": "emperor-uploader-title",
1471
+ ...e,
1472
+ children: t
1473
+ }
1474
+ ) : null;
1475
+ }
1476
+ const ro = C([""], {
1477
+ variants: {
1478
+ type: {
1479
+ search: "",
1480
+ select: "",
1481
+ autocomplete: "",
1482
+ date: "",
1483
+ numeric: "",
1484
+ checkbox: "",
1485
+ checkboxGroup: "",
1486
+ radio: "",
1487
+ switch: "",
1488
+ range: ""
1489
+ }
1490
+ },
1491
+ defaultVariants: {},
1492
+ compoundVariants: []
1493
+ });
1494
+ function ws({
1495
+ className: e,
1496
+ type: t,
1497
+ searchProps: a,
1498
+ selectProps: o,
1499
+ autocompleteProps: n,
1500
+ dateProps: s,
1501
+ numericProps: i,
1502
+ checkboxProps: l,
1503
+ checkboxGroupProps: d,
1504
+ radioProps: m,
1505
+ switchProps: p,
1506
+ rangeProps: u,
1507
+ paramKey: f,
1508
+ options: h,
1509
+ ...v
1510
+ }) {
1511
+ const g = { paramKey: f }, x = {
1512
+ search: /* @__PURE__ */ r(oa, { searchProps: a, ...g, ...v }),
1513
+ select: /* @__PURE__ */ r(
1514
+ ra,
1515
+ {
1516
+ selectProps: o,
1517
+ options: h,
1518
+ ...g,
1519
+ ...v
1520
+ }
1521
+ ),
1522
+ autocomplete: /* @__PURE__ */ r(
1523
+ aa,
1524
+ {
1525
+ autocompleteProps: n,
1526
+ options: h,
1527
+ ...g,
1528
+ ...v
1529
+ }
1530
+ ),
1531
+ date: /* @__PURE__ */ r(ta, { dateProps: s, ...g, ...v }),
1532
+ numeric: /* @__PURE__ */ r(ea, { numericProps: i, ...g, ...v }),
1533
+ checkbox: /* @__PURE__ */ r(
1534
+ Jt,
1535
+ {
1536
+ checkboxProps: l,
1537
+ ...g,
1538
+ ...v
1539
+ }
1540
+ ),
1541
+ checkboxGroup: /* @__PURE__ */ r(
1542
+ Qt,
1543
+ {
1544
+ checkboxGroupProps: d,
1545
+ options: h,
1546
+ ...g,
1547
+ ...v
1548
+ }
1549
+ ),
1550
+ switch: /* @__PURE__ */ r(Zt, { switchProps: p, ...g, ...v }),
1551
+ range: /* @__PURE__ */ r(Xt, { rangeProps: u, ...g, ...v })
1552
+ };
1553
+ return /* @__PURE__ */ r(
1554
+ "div",
1555
+ {
1556
+ "data-slot": "emperor-ui-filter",
1557
+ className: c(
1558
+ ro({ type: t }),
1559
+ e,
1560
+ v?.classNames?.base
1561
+ ),
1562
+ children: x[t]
1563
+ }
1564
+ );
1565
+ }
1566
+ function xs({
1567
+ classNames: e,
1568
+ searchProps: t,
1569
+ paramKey: a
1570
+ }) {
1571
+ const { config: o } = w(), n = o?.theme?.components?.input, [s, i] = I(
1572
+ t?.defaultValue || ""
1573
+ ), { setParams: l } = F(), [d] = Cr(s, 700);
1574
+ return $(() => {
1575
+ l({
1576
+ params: {
1577
+ [a]: d
1578
+ }
1579
+ });
1580
+ }, [d]), /* @__PURE__ */ r(
1581
+ te,
1582
+ {
1583
+ ...n,
1584
+ ...t,
1585
+ endContent: /* @__PURE__ */ r(Da, { className: "size-4" }),
1586
+ value: s,
1587
+ onValueChange: i,
1588
+ className: c(M({ type: "search" }), e?.field),
1589
+ classNames: {
1590
+ input: "min-w-40",
1591
+ label: "font-semibold",
1592
+ ...n?.classNames,
1593
+ ...t?.classNames
1594
+ }
1595
+ }
1596
+ );
1597
+ }
1598
+ function ys({
1599
+ classNames: e,
1600
+ selectProps: t,
1601
+ selectItemProps: a,
1602
+ paramKey: o,
1603
+ options: n
1604
+ }) {
1605
+ const { getParam: s, setParams: i } = F(), { config: l } = w(), d = l?.theme?.components?.select, m = l?.theme?.components?.selectItem, p = o ?? "select", u = s(p);
1606
+ if (!n?.length)
1607
+ throw new Error("Filter with type 'select' must have 'options' property.");
1608
+ return /* @__PURE__ */ r(
1609
+ be,
1610
+ {
1611
+ ...d,
1612
+ ...t,
1613
+ selectedKeys: u ? [u] : [],
1614
+ onSelectionChange: (f) => {
1615
+ const h = Array.from(f)[0];
1616
+ i({
1617
+ params: { [p]: h ? String(h) : void 0 }
1618
+ });
1619
+ },
1620
+ className: c(M({ type: "select" }), e?.field),
1621
+ classNames: {
1622
+ trigger: "min-w-40",
1623
+ label: "font-semibold",
1624
+ ...d?.classNames,
1625
+ ...t?.classNames
1626
+ },
1627
+ children: n.map((f) => /* @__PURE__ */ r(Ce, { ...m, ...a, children: f.label }, f.key))
1628
+ }
1629
+ );
1630
+ }
1631
+ function Is({
1632
+ classNames: e,
1633
+ autocompleteProps: t,
1634
+ autocompleteItemProps: a,
1635
+ paramKey: o,
1636
+ options: n
1637
+ }) {
1638
+ const { config: s } = w(), i = s?.theme?.components?.autocomplete, l = s?.theme?.components?.autocompleteItem, { getParam: d, setParams: m } = F(), p = d(o);
1639
+ if (!n?.length)
1640
+ throw new Error(
1641
+ "Filter with type 'autocomplete' must have 'options' property."
1642
+ );
1643
+ return /* @__PURE__ */ r(
1644
+ ut,
1645
+ {
1646
+ ...i,
1647
+ ...t,
1648
+ selectedKey: p || null,
1649
+ onSelectionChange: (u) => m({
1650
+ params: {
1651
+ [o]: u ? String(u) : void 0
1652
+ }
1653
+ }),
1654
+ className: c(M({ type: "autocomplete" }), e?.field),
1655
+ classNames: {
1656
+ base: "min-w-40",
1657
+ ...i?.classNames,
1658
+ ...t?.classNames
1659
+ },
1660
+ children: (n || [])?.map((u) => /* @__PURE__ */ r(
1661
+ pt,
1662
+ {
1663
+ ...l,
1664
+ ...a,
1665
+ children: u.label
1666
+ },
1667
+ u.key
1668
+ ))
1669
+ }
1670
+ );
1671
+ }
1672
+ function Ss({
1673
+ classNames: e,
1674
+ dateProps: t,
1675
+ paramKey: a
1676
+ }) {
1677
+ const { getParam: o, setParams: n } = F(), { config: s } = w(), i = s?.theme?.components?.datePicker, l = o(a), d = l && /^\d{4}-\d{2}-\d{2}$/.test(l) ? xr(l) : null;
1678
+ return /* @__PURE__ */ r(
1679
+ wr,
1680
+ {
1681
+ ...i,
1682
+ ...t,
1683
+ value: d,
1684
+ onChange: (m) => n({
1685
+ params: {
1686
+ [a]: m ? String(m) : void 0
1687
+ }
1688
+ }),
1689
+ className: c(M({ type: "date" }), e?.field),
1690
+ classNames: {
1691
+ label: "font-semibold",
1692
+ ...i?.classNames,
1693
+ ...t?.classNames
1694
+ }
1695
+ }
1696
+ );
1697
+ }
1698
+ function Es({
1699
+ classNames: e,
1700
+ numericProps: t,
1701
+ paramKey: a
1702
+ }) {
1703
+ const { getParam: o, setParams: n } = F(), { config: s } = w(), i = s?.theme?.components?.input, l = o(a);
1704
+ return /* @__PURE__ */ r(
1705
+ te,
1706
+ {
1707
+ ...i,
1708
+ ...t,
1709
+ type: "number",
1710
+ value: l ?? "",
1711
+ onValueChange: (d) => n({
1712
+ params: { [a]: d || void 0 }
1713
+ }),
1714
+ className: c(M({ type: "numeric" }), e?.field),
1715
+ classNames: {
1716
+ input: "min-w-40",
1717
+ label: "font-semibold",
1718
+ ...i?.classNames,
1719
+ ...t?.classNames
1720
+ }
1721
+ }
1722
+ );
1723
+ }
1724
+ function Ns({
1725
+ classNames: e,
1726
+ checkboxProps: t,
1727
+ paramKey: a
1728
+ }) {
1729
+ const { config: o } = w(), n = o?.theme?.components?.checkbox, { getParam: s, setParams: i } = F(), { isSelected: l } = N(() => {
1730
+ const d = s(a);
1731
+ return { value: d, isSelected: d === "true" || d === "1" || d === "yes" };
1732
+ }, [a]);
1733
+ return /* @__PURE__ */ r(
1734
+ we,
1735
+ {
1736
+ ...n,
1737
+ ...t,
1738
+ isSelected: l,
1739
+ onValueChange: (d) => i({
1740
+ params: { [a]: d ? "true" : void 0 }
1741
+ }),
1742
+ className: c(M({ type: "checkbox" }), e?.field)
1743
+ }
1744
+ );
1745
+ }
1746
+ function Ls({
1747
+ classNames: e,
1748
+ checkboxGroupProps: t,
1749
+ paramKey: a,
1750
+ options: o
1751
+ }) {
1752
+ const { config: n } = w(), s = n?.theme?.components?.checkboxGroup, i = n?.theme?.components?.checkbox, { getParam: l, setParams: d } = F(), { value: m } = N(() => {
1753
+ const p = l(a);
1754
+ return { value: p ? p.split(",").filter(Boolean) : [] };
1755
+ }, [a]);
1756
+ if (!o?.length)
1757
+ throw new Error(
1758
+ "Filter with type 'checkboxGroup' must have 'options' property."
1759
+ );
1760
+ return /* @__PURE__ */ r(
1761
+ yr,
1762
+ {
1763
+ ...s,
1764
+ ...t,
1765
+ value: m,
1766
+ onValueChange: (p) => d({
1767
+ params: {
1768
+ [a]: p.length > 0 ? p.join(",") : void 0
1769
+ }
1770
+ }),
1771
+ classNames: {
1772
+ label: "font-semibold",
1773
+ ...s?.classNames,
1774
+ ...t?.classNames
1775
+ },
1776
+ className: c(
1777
+ M({ type: "checkboxGroup" }),
1778
+ e?.field
1779
+ ),
1780
+ children: o.map((p) => /* @__PURE__ */ r(we, { ...i, value: p.key, children: p.label }, p.key))
1781
+ }
1782
+ );
1783
+ }
1784
+ function As({
1785
+ classNames: e,
1786
+ switchProps: t,
1787
+ paramKey: a
1788
+ }) {
1789
+ const { getParam: o, setParams: n } = F(), { config: s } = w(), i = s?.theme?.components?.switch, l = o(a);
1790
+ return /* @__PURE__ */ r(
1791
+ ft,
1792
+ {
1793
+ ...i,
1794
+ ...t,
1795
+ isSelected: l === "true" || l === "1" || l === "yes",
1796
+ onValueChange: (m) => n({
1797
+ params: { [a]: m ? "true" : void 0 }
1798
+ }),
1799
+ className: c(M({ type: "switch" }), e?.field)
1800
+ }
1801
+ );
1802
+ }
1803
+ function Ps({
1804
+ classNames: e,
1805
+ rangeProps: t,
1806
+ paramKey: a
1807
+ }) {
1808
+ const { getParam: o, setParams: n, allParams: s } = F(), { config: i } = w(), l = i?.theme?.components?.slider, d = t?.minValue ?? 0, m = t?.maxValue ?? 100, p = N(() => {
1809
+ const u = o(a), f = [d, m];
1810
+ if (u == null) return f;
1811
+ const [h, v] = u.split(",").map(Number);
1812
+ return !Number.isNaN(h) && !Number.isNaN(v) && h <= v ? [h, v] : f;
1813
+ }, [a, d, m, s]);
1814
+ return /* @__PURE__ */ r(
1815
+ Ir,
1816
+ {
1817
+ ...l,
1818
+ ...t,
1819
+ value: p,
1820
+ onChange: (u) => {
1821
+ const f = Array.isArray(u) ? u : [u], h = f.length === 2 && f[0] === d && f[1] === m;
1822
+ n({
1823
+ params: {
1824
+ [a]: f.length === 2 && !h ? `${f[0]},${f[1]}` : void 0
1825
+ }
1826
+ });
1827
+ },
1828
+ classNames: {
1829
+ base: "min-w-40",
1830
+ label: "font-semibold",
1831
+ ...l?.classNames,
1832
+ ...t?.classNames
1833
+ },
1834
+ className: c(M({ type: "range" }), e?.field)
1835
+ }
1836
+ );
1837
+ }
1838
+ function Fs({
1839
+ className: e,
1840
+ classNames: t,
1841
+ name: a,
1842
+ type: o,
1843
+ inputProps: n,
1844
+ textareaProps: s,
1845
+ checkboxProps: i,
1846
+ selectProps: l,
1847
+ selectItemProps: d,
1848
+ autocompleteProps: m,
1849
+ autocompleteItemProps: p,
1850
+ switchProps: u,
1851
+ radioGroupProps: f,
1852
+ options: h,
1853
+ children: v
1854
+ }) {
1855
+ const g = {
1856
+ input: /* @__PURE__ */ r(ua, { name: a, inputProps: n }),
1857
+ textarea: /* @__PURE__ */ r(ma, { name: a, textareaProps: s }),
1858
+ checkbox: /* @__PURE__ */ r(da, { name: a, checkboxProps: i, children: v }),
1859
+ select: /* @__PURE__ */ r(
1860
+ ca,
1861
+ {
1862
+ name: a,
1863
+ options: h,
1864
+ selectProps: l,
1865
+ selectItemProps: d
1866
+ }
1867
+ ),
1868
+ autocomplete: /* @__PURE__ */ r(
1869
+ la,
1870
+ {
1871
+ name: a,
1872
+ options: h,
1873
+ autocompleteProps: m,
1874
+ autocompleteItemProps: p
1875
+ }
1876
+ ),
1877
+ switch: /* @__PURE__ */ r(ia, { name: a, switchProps: u, children: v }),
1878
+ radio: /* @__PURE__ */ r(
1879
+ sa,
1880
+ {
1881
+ name: a,
1882
+ options: h,
1883
+ radioGroupProps: f
1884
+ }
1885
+ )
1886
+ };
1887
+ return /* @__PURE__ */ r(
1888
+ "div",
1889
+ {
1890
+ "data-slot": "emperor-ui-field",
1891
+ className: c(na({}), e, t?.base),
1892
+ children: g[o]
1893
+ }
1894
+ );
1895
+ }
1896
+ const _s = C([""], {
1897
+ variants: {
1898
+ variant: {}
1899
+ },
1900
+ defaultVariants: {},
1901
+ compoundVariants: []
1902
+ });
1903
+ function Ms({
1904
+ inputProps: e,
1905
+ name: t
1906
+ }) {
1907
+ const { config: a } = w(), o = a?.theme?.components?.input, { control: n } = U();
1908
+ return /* @__PURE__ */ r(
1909
+ H,
1910
+ {
1911
+ control: n,
1912
+ name: t,
1913
+ render: ({ field: s, fieldState: i }) => /* @__PURE__ */ r(
1914
+ te,
1915
+ {
1916
+ ...o,
1917
+ ...e,
1918
+ value: s.value ? String(s.value) : "",
1919
+ onBlur: s.onBlur,
1920
+ onValueChange: s.onChange,
1921
+ isInvalid: e?.isInvalid ?? !!i.error,
1922
+ errorMessage: e?.errorMessage ?? i.error?.message
1923
+ }
1924
+ )
1925
+ }
1926
+ );
1927
+ }
1928
+ function Ts({
1929
+ textareaProps: e,
1930
+ name: t
1931
+ }) {
1932
+ const { config: a } = w(), o = a?.theme?.components?.textarea, { control: n } = U();
1933
+ return /* @__PURE__ */ r(
1934
+ H,
1935
+ {
1936
+ control: n,
1937
+ name: t,
1938
+ render: ({ field: s, fieldState: i }) => /* @__PURE__ */ r(
1939
+ br,
1940
+ {
1941
+ ...o,
1942
+ ...e,
1943
+ value: s.value ? String(s.value) : "",
1944
+ onBlur: s.onBlur,
1945
+ onValueChange: s.onChange,
1946
+ isInvalid: e?.isInvalid ?? !!i.error,
1947
+ errorMessage: e?.errorMessage ?? i.error?.message
1948
+ }
1949
+ )
1950
+ }
1951
+ );
1952
+ }
1953
+ function Bs({
1954
+ checkboxProps: e,
1955
+ name: t,
1956
+ children: a
1957
+ }) {
1958
+ const { config: o } = w(), n = o?.theme?.components?.checkbox, { control: s } = U();
1959
+ return /* @__PURE__ */ r(
1960
+ H,
1961
+ {
1962
+ control: s,
1963
+ name: t,
1964
+ render: ({ field: { value: i, onChange: l } }) => /* @__PURE__ */ r(
1965
+ we,
1966
+ {
1967
+ ...n,
1968
+ ...e,
1969
+ isSelected: !!i,
1970
+ onValueChange: l,
1971
+ children: a
1972
+ }
1973
+ )
1974
+ }
1975
+ );
1976
+ }
1977
+ function zs({
1978
+ options: e,
1979
+ selectItemProps: t,
1980
+ selectProps: a,
1981
+ name: o
1982
+ }) {
1983
+ const { config: n } = w(), s = n?.theme?.components?.select;
1984
+ if (!e?.length)
1985
+ throw new Error("Field with type 'select' must include 'options'.");
1986
+ const { control: i } = U();
1987
+ return /* @__PURE__ */ r(
1988
+ H,
1989
+ {
1990
+ control: i,
1991
+ name: o,
1992
+ render: ({ field: l }) => /* @__PURE__ */ r(
1993
+ be,
1994
+ {
1995
+ ...s,
1996
+ ...a,
1997
+ selectedKeys: l.value ? [String(l.value)] : [],
1998
+ onSelectionChange: (d) => {
1999
+ const m = Array.from(d)[0];
2000
+ l.onChange(m ? String(m) : "");
2001
+ },
2002
+ children: e.map((d) => /* @__PURE__ */ r(Ce, { ...t, children: d.label }, d.key))
2003
+ }
2004
+ )
2005
+ }
2006
+ );
2007
+ }
2008
+ function ks({
2009
+ autocompleteItemProps: e,
2010
+ autocompleteProps: t,
2011
+ options: a,
2012
+ name: o
2013
+ }) {
2014
+ const { config: n } = w(), s = n?.theme?.components?.autocomplete;
2015
+ if (!a?.length)
2016
+ throw new Error("Field with type 'autocomplete' must include 'options'.");
2017
+ const { control: i } = U();
2018
+ return /* @__PURE__ */ r(
2019
+ H,
2020
+ {
2021
+ control: i,
2022
+ name: o,
2023
+ render: ({ field: l }) => /* @__PURE__ */ r(
2024
+ ut,
2025
+ {
2026
+ ...s,
2027
+ ...t,
2028
+ selectedKey: l.value ? String(l.value) : null,
2029
+ onSelectionChange: (d) => l.onChange(d ? String(d) : ""),
2030
+ children: a.map((d) => /* @__PURE__ */ r(pt, { ...e, children: d.label }, d.key))
2031
+ }
2032
+ )
2033
+ }
2034
+ );
2035
+ }
2036
+ function Vs({
2037
+ switchProps: e,
2038
+ name: t,
2039
+ children: a
2040
+ }) {
2041
+ const { config: o } = w(), n = o?.theme?.components?.switch, { control: s } = U();
2042
+ return /* @__PURE__ */ r(
2043
+ H,
2044
+ {
2045
+ control: s,
2046
+ name: t,
2047
+ render: ({ field: i }) => /* @__PURE__ */ r(
2048
+ ft,
2049
+ {
2050
+ ...n,
2051
+ ...e,
2052
+ isSelected: !!i.value,
2053
+ onValueChange: i.onChange,
2054
+ children: a
2055
+ }
2056
+ )
2057
+ }
2058
+ );
2059
+ }
2060
+ function Ds({
2061
+ options: e,
2062
+ radioGroupProps: t,
2063
+ name: a
2064
+ }) {
2065
+ const { config: o } = w(), n = o?.theme?.components?.radio, { control: s } = U();
2066
+ if (!e?.length)
2067
+ throw new Error("Field with type 'radio' must include 'options'.");
2068
+ return /* @__PURE__ */ r(
2069
+ H,
2070
+ {
2071
+ control: s,
2072
+ name: a,
2073
+ render: ({ field: i }) => /* @__PURE__ */ r(
2074
+ Nr,
2075
+ {
2076
+ ...n,
2077
+ ...t,
2078
+ value: i.value ? String(i.value) : "",
2079
+ onValueChange: i.onChange,
2080
+ children: e.map((l) => /* @__PURE__ */ r(Lr, { value: l.key, children: l.label }, l.key))
2081
+ }
2082
+ )
2083
+ }
2084
+ );
2085
+ }
2086
+ const oo = C(
2087
+ [
2088
+ "flex items-center justify-center size-9 rounded-lg transition-all duration-300 text-foreground/80 cursor-pointer",
2089
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 ",
2090
+ "hover:bg-default-100 hover:text-foreground"
2091
+ ],
2092
+ {
2093
+ variants: {
2094
+ variant: {}
2095
+ },
2096
+ defaultVariants: {},
2097
+ compoundVariants: []
2098
+ }
2099
+ );
2100
+ function Os({
2101
+ className: e,
2102
+ classNames: t,
2103
+ ...a
2104
+ }) {
2105
+ const { setTheme: o, resolvedTheme: n } = Ar(), s = () => {
2106
+ o(n === "dark" ? "light" : "dark");
2107
+ };
2108
+ return /* @__PURE__ */ r(
2109
+ Ee.button,
2110
+ {
2111
+ "data-slot": "emperor-ui-theme-knob",
2112
+ className: c(oo(), e, t?.base),
2113
+ onClick: s,
2114
+ initial: !1,
2115
+ whileHover: { scale: 1.08 },
2116
+ whileTap: { scale: 0.92 },
2117
+ transition: {
2118
+ type: "spring",
2119
+ stiffness: 500,
2120
+ damping: 28
2121
+ },
2122
+ ...a,
2123
+ children: /* @__PURE__ */ r("span", { className: "relative flex size-5 items-center justify-center", children: /* @__PURE__ */ r(Pr, { mode: "wait", children: /* @__PURE__ */ r(
2124
+ Ee.span,
2125
+ {
2126
+ initial: { opacity: 0 },
2127
+ animate: { opacity: 1 },
2128
+ exit: { opacity: 0 },
2129
+ transition: { duration: 0.2 },
2130
+ className: "absolute inset-0 flex items-center justify-center",
2131
+ children: n === "dark" ? /* @__PURE__ */ r(Oa, { className: "size-5" }) : /* @__PURE__ */ r($a, { className: "size-5" })
2132
+ },
2133
+ n ?? "loading"
2134
+ ) }) })
2135
+ }
2136
+ );
2137
+ }
2138
+ function $s({ ...e }) {
2139
+ return e?.inputType === "preset" ? /* @__PURE__ */ r(pa, { ...e }) : /* @__PURE__ */ r(fa, { ...e });
2140
+ }
2141
+ function Rs({
2142
+ className: e,
2143
+ classNames: t,
2144
+ value: a = "#000000",
2145
+ onChange: o,
2146
+ defaultValue: n,
2147
+ inputType: s = "free",
2148
+ ...i
2149
+ }) {
2150
+ const { config: l } = w(), d = l?.interLocalization?.locales, m = l?.interLocalization?.lang, u = d?.[m ?? "en"]?.atoms?.colorPicker?.invalidColorFormat, f = N(() => a ? !/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(a) : !0, [a]);
2151
+ return /* @__PURE__ */ r(
2152
+ te,
2153
+ {
2154
+ labelPlacement: "outside",
2155
+ variant: "faded",
2156
+ className: c(e),
2157
+ classNames: { label: "font-bold", input: "h-12", ...t },
2158
+ defaultValue: n,
2159
+ value: a,
2160
+ onValueChange: o,
2161
+ isInvalid: f,
2162
+ errorMessage: f ? u : void 0,
2163
+ endContent: /* @__PURE__ */ r(Ke, { value: a }),
2164
+ startContent: /* @__PURE__ */ r(
2165
+ "input",
2166
+ {
2167
+ type: "color",
2168
+ className: "color-swatch",
2169
+ value: a,
2170
+ onChange: (h) => {
2171
+ o?.(h.target.value);
2172
+ }
2173
+ }
2174
+ ),
2175
+ ...i
2176
+ }
2177
+ );
2178
+ }
2179
+ function Us({
2180
+ className: e,
2181
+ classNames: t,
2182
+ value: a = "#000000",
2183
+ onChange: o,
2184
+ defaultValue: n,
2185
+ inputType: s,
2186
+ presets: i = [],
2187
+ ...l
2188
+ }) {
2189
+ if (s === "preset" && (!i || i?.length === 0))
2190
+ throw new Error(
2191
+ "Presets array is required in the ColorPicker when the input type is 'preset'."
2192
+ );
2193
+ return /* @__PURE__ */ r(
2194
+ be,
2195
+ {
2196
+ labelPlacement: "outside",
2197
+ variant: "faded",
2198
+ className: c(e),
2199
+ classNames: {
2200
+ label: "font-bold",
2201
+ input: "h-12",
2202
+ trigger: "min-w-52",
2203
+ ...t
2204
+ },
2205
+ selectedKeys: a ? [a] : void 0,
2206
+ defaultSelectedKeys: n ? [n] : void 0,
2207
+ onSelectionChange: (d) => o?.(d?.currentKey ?? ""),
2208
+ endContent: /* @__PURE__ */ r(Ke, { value: a }),
2209
+ renderValue: () => /* @__PURE__ */ b("div", { className: "flex items-center gap-2 text-gray-600", children: [
2210
+ /* @__PURE__ */ r(
2211
+ "div",
2212
+ {
2213
+ style: { backgroundColor: a },
2214
+ className: "size-4 rounded-full border border-gray-300"
2215
+ }
2216
+ ),
2217
+ a
2218
+ ] }),
2219
+ ...l,
2220
+ children: Array.from(new Set(i))?.map((d) => /* @__PURE__ */ r(
2221
+ Ce,
2222
+ {
2223
+ startContent: /* @__PURE__ */ r(
2224
+ "div",
2225
+ {
2226
+ style: { backgroundColor: d },
2227
+ className: "size-4 rounded-full border border-gray-300"
2228
+ }
2229
+ ),
2230
+ children: d
2231
+ },
2232
+ d
2233
+ ))
2234
+ }
2235
+ );
2236
+ }
2237
+ function Hs({ value: e }) {
2238
+ const [t, a] = I("copy"), o = yt(null), n = () => {
2239
+ t === "copy" && (o.current && clearTimeout(o.current), navigator.clipboard.writeText(e), a("loading"), o.current = setTimeout(() => {
2240
+ a("success"), o.current = setTimeout(() => a("copy"), 2e3);
2241
+ }, 500));
2242
+ };
2243
+ return $(
2244
+ () => () => {
2245
+ o.current && clearTimeout(o.current);
2246
+ },
2247
+ []
2248
+ ), /* @__PURE__ */ r(
2249
+ L,
2250
+ {
2251
+ variant: "light",
2252
+ size: "sm",
2253
+ isIconOnly: !0,
2254
+ onPress: n,
2255
+ disabled: t !== "copy",
2256
+ startContent: /* @__PURE__ */ r("span", { className: "relative size-4", children: /* @__PURE__ */ r(Pa, { mode: "wait", children: /* @__PURE__ */ b(
2257
+ _.span,
2258
+ {
2259
+ initial: { opacity: 0 },
2260
+ animate: { opacity: 1 },
2261
+ exit: { opacity: 0 },
2262
+ transition: { duration: 0.2 },
2263
+ className: "absolute inset-0 flex items-center justify-center",
2264
+ children: [
2265
+ t === "copy" && /* @__PURE__ */ r(Ra, { className: "size-4" }),
2266
+ t === "loading" && /* @__PURE__ */ r(
2267
+ ve,
2268
+ {
2269
+ size: "sm",
2270
+ classNames: {
2271
+ circle1: "border-b-current",
2272
+ circle2: "border-current"
2273
+ }
2274
+ }
2275
+ ),
2276
+ t === "success" && /* @__PURE__ */ r(Ua, { className: "size-4 text-success" })
2277
+ ]
2278
+ },
2279
+ t
2280
+ ) }) })
2281
+ }
2282
+ );
2283
+ }
2284
+ const no = C(["p-0"], {
2285
+ variants: {},
2286
+ defaultVariants: {},
2287
+ compoundVariants: []
2288
+ }), so = C([], {
2289
+ variants: {},
2290
+ defaultVariants: {},
2291
+ compoundVariants: []
2292
+ }), io = C([], {
2293
+ variants: {},
2294
+ defaultVariants: {},
2295
+ compoundVariants: []
2296
+ }), lo = C(
2297
+ ["flex gap-2 justify-end flex-wrap"],
2298
+ {
2299
+ variants: {},
2300
+ defaultVariants: {},
2301
+ compoundVariants: []
2302
+ }
2303
+ ), Ws = ({}) => ({});
2304
+ function Gs({
2305
+ isOpen: e,
2306
+ onClose: t,
2307
+ title: a,
2308
+ description: o,
2309
+ className: n,
2310
+ classNames: s,
2311
+ confirmProps: i,
2312
+ declineProps: l
2313
+ }) {
2314
+ const { config: d } = w(), m = d?.interLocalization?.lang ?? "en", u = d?.interLocalization?.locales?.[m]?.organisms?.deletionConfirmor, f = (h) => {
2315
+ typeof l?.onPress == "function" && l.onPress(h), t();
2316
+ };
2317
+ return /* @__PURE__ */ r(
2318
+ lt,
2319
+ {
2320
+ placement: "center",
2321
+ isOpen: e,
2322
+ onClose: t,
2323
+ onOpenChange: (h) => {
2324
+ h || t();
2325
+ },
2326
+ dir: m === "ar" ? "rtl" : "ltr",
2327
+ classNames: n || s?.base ? { base: c(n, s?.base) } : void 0,
2328
+ children: /* @__PURE__ */ b(
2329
+ ct,
2330
+ {
2331
+ className: c(no(), s?.content),
2332
+ children: [
2333
+ /* @__PURE__ */ r(
2334
+ gr,
2335
+ {
2336
+ className: c(so(), s?.header),
2337
+ children: a
2338
+ }
2339
+ ),
2340
+ /* @__PURE__ */ r(
2341
+ dt,
2342
+ {
2343
+ className: c(io(), s?.body),
2344
+ children: o
2345
+ }
2346
+ ),
2347
+ /* @__PURE__ */ b(
2348
+ vr,
2349
+ {
2350
+ className: c(lo(), s?.footer),
2351
+ children: [
2352
+ /* @__PURE__ */ r(
2353
+ L,
2354
+ {
2355
+ variant: "flat",
2356
+ size: "sm",
2357
+ ...l,
2358
+ onPress: f,
2359
+ className: c(l?.className, s?.declineButton),
2360
+ children: l?.children ?? u?.decline
2361
+ }
2362
+ ),
2363
+ /* @__PURE__ */ r(
2364
+ L,
2365
+ {
2366
+ color: "danger",
2367
+ size: "sm",
2368
+ startContent: i?.isLoading ? void 0 : i?.startContent ?? /* @__PURE__ */ r(Q, { className: "size-4", "aria-hidden": !0 }),
2369
+ ...i,
2370
+ className: c(i?.className, s?.confirmButton),
2371
+ children: i?.children ?? u?.confirm
2372
+ }
2373
+ )
2374
+ ]
2375
+ }
2376
+ )
2377
+ ]
2378
+ }
2379
+ )
2380
+ }
2381
+ );
2382
+ }
2383
+ const Ks = (e) => {
2384
+ const [t, a] = I(!1);
2385
+ return /* @__PURE__ */ b("div", { className: "flex flex-col gap-4", children: [
2386
+ /* @__PURE__ */ r(L, { color: "danger", onPress: () => a(!0), children: "Delete item" }),
2387
+ /* @__PURE__ */ r(
2388
+ ha,
2389
+ {
2390
+ confirmProps: {
2391
+ onPress: () => a(!1)
2392
+ },
2393
+ ...e,
2394
+ isOpen: t,
2395
+ onClose: () => a(!1)
2396
+ }
2397
+ )
2398
+ ] });
2399
+ };
2400
+ function js({ className: e }) {
2401
+ return /* @__PURE__ */ r("div", { className: c("", e), children: "ItemDetails Component" });
2402
+ }
2403
+ const co = C(["w-full p-4 gap-4 relative"], {
2404
+ variants: {
2405
+ layout: {
2406
+ grid: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
2407
+ list: "flex flex-col gap-4",
2408
+ carousel: "flex flex-col gap-4"
2409
+ }
2410
+ },
2411
+ defaultVariants: {},
2412
+ compoundVariants: []
2413
+ }), mo = C([""], {
2414
+ variants: {
2415
+ layout: {
2416
+ grid: "size-full",
2417
+ list: "w-full h-fit",
2418
+ carousel: ""
2419
+ }
2420
+ },
2421
+ defaultVariants: {},
2422
+ compoundVariants: []
2423
+ }), uo = C(["mx-auto my-5 col-span-full"], {
2424
+ variants: {
2425
+ layout: {
2426
+ grid: "",
2427
+ list: "",
2428
+ carousel: ""
2429
+ }
2430
+ },
2431
+ defaultVariants: {},
2432
+ compoundVariants: []
2433
+ }), qs = C(
2434
+ [
2435
+ "flex flex-col items-center justify-center min-h-[280px] w-full py-12 px-4",
2436
+ "text-center"
2437
+ ],
2438
+ {
2439
+ variants: {},
2440
+ defaultVariants: {},
2441
+ compoundVariants: []
2442
+ }
2443
+ ), po = ({}) => ({});
2444
+ function Ys({
2445
+ items: e = [],
2446
+ isLoading: t = !1,
2447
+ className: a,
2448
+ classNames: o,
2449
+ layout: n = "grid",
2450
+ actions: s = [],
2451
+ onActionClick: i,
2452
+ pagination: l
2453
+ }) {
2454
+ const d = {
2455
+ grid: "vertical",
2456
+ list: "horizontal",
2457
+ carousel: "vertical"
2458
+ }[n], m = e?.length === 0;
2459
+ return /* @__PURE__ */ b(
2460
+ _.section,
2461
+ {
2462
+ "data-slot": "emperor-ui-listings",
2463
+ className: c(co({ className: a, layout: n })),
2464
+ style: po({}),
2465
+ initial: "hidden",
2466
+ animate: "visible",
2467
+ children: [
2468
+ t && Array.from({ length: l?.pageSize || 12 }).map((p, u) => /* @__PURE__ */ r(
2469
+ We,
2470
+ {
2471
+ className: a,
2472
+ classNames: o,
2473
+ orientation: d
2474
+ },
2475
+ u
2476
+ )),
2477
+ !t && m && /* @__PURE__ */ r(ga, { className: "col-span-full" }),
2478
+ !t && !m && e?.map(
2479
+ ({
2480
+ item: p,
2481
+ actions: u,
2482
+ onActionClick: f
2483
+ }) => /* @__PURE__ */ r(
2484
+ va,
2485
+ {
2486
+ className: c(mo({ layout: n }), o?.item),
2487
+ item: p,
2488
+ isLoading: t,
2489
+ actions: u || s || [],
2490
+ onActionClick: f || i,
2491
+ orientation: d
2492
+ },
2493
+ p?.key
2494
+ )
2495
+ ),
2496
+ !t && !m && l && /* @__PURE__ */ r(
2497
+ Fr,
2498
+ {
2499
+ className: c(
2500
+ uo({ layout: n }),
2501
+ o?.pagination
2502
+ ),
2503
+ classNames: {
2504
+ next: "rtl:rotate-180 cursor-pointer",
2505
+ prev: "rtl:rotate-180 cursor-pointer",
2506
+ item: "cursor-pointer",
2507
+ chevronNext: "rtl:rotate-180 cursor-pointer",
2508
+ forwardIcon: "rtl:rotate-180 cursor-pointer"
2509
+ },
2510
+ total: l?.pagesCount,
2511
+ page: l?.page,
2512
+ onChange: l?.setPage,
2513
+ variant: "faded",
2514
+ showControls: !0,
2515
+ color: "primary",
2516
+ initialPage: 1,
2517
+ showShadow: !0
2518
+ }
2519
+ )
2520
+ ]
2521
+ }
2522
+ );
2523
+ }
2524
+ function Xs({
2525
+ className: e,
2526
+ classNames: t
2527
+ }) {
2528
+ const { config: a } = w(), o = a?.interLocalization?.locales, n = a?.interLocalization?.lang, i = o?.[n || "en"]?.organisms?.listings;
2529
+ return /* @__PURE__ */ b(
2530
+ _.div,
2531
+ {
2532
+ "data-slot": "emperor-ui-empty-listings",
2533
+ className: c(ba(), e),
2534
+ variants: _r,
2535
+ initial: "hidden",
2536
+ animate: "visible",
2537
+ children: [
2538
+ /* @__PURE__ */ r(
2539
+ _.div,
2540
+ {
2541
+ className: c(
2542
+ "flex items-center justify-center rounded-2xl bg-default-100/80 p-6 mb-5",
2543
+ t?.iconWrapper
2544
+ ),
2545
+ variants: oe,
2546
+ children: /* @__PURE__ */ r(
2547
+ _.div,
2548
+ {
2549
+ variants: Mr,
2550
+ animate: "animate",
2551
+ className: "flex items-center justify-center",
2552
+ children: /* @__PURE__ */ r(
2553
+ Ha,
2554
+ {
2555
+ className: "size-14 text-default-400",
2556
+ strokeWidth: 1.25,
2557
+ "aria-hidden": !0
2558
+ }
2559
+ )
2560
+ }
2561
+ )
2562
+ }
2563
+ ),
2564
+ /* @__PURE__ */ r(
2565
+ _.h2,
2566
+ {
2567
+ className: c(
2568
+ "text-xl font-semibold text-foreground mb-2",
2569
+ t?.title
2570
+ ),
2571
+ variants: oe,
2572
+ children: i?.emptyTitle
2573
+ }
2574
+ ),
2575
+ /* @__PURE__ */ r(
2576
+ _.p,
2577
+ {
2578
+ className: c(
2579
+ "text-sm text-default-500 max-w-sm",
2580
+ t?.description
2581
+ ),
2582
+ variants: oe,
2583
+ children: i?.emptyDescription
2584
+ }
2585
+ )
2586
+ ]
2587
+ }
2588
+ );
2589
+ }
2590
+ const fo = C(
2591
+ [
2592
+ "w-full grid md:grid-cols-[1fr_2fr] gap-4 p-5 min-h-80",
2593
+ "bg-foreground text-background"
2594
+ ],
2595
+ {
2596
+ variants: {
2597
+ variant: {
2598
+ default: []
2599
+ }
2600
+ },
2601
+ defaultVariants: {},
2602
+ compoundVariants: []
2603
+ }
2604
+ ), ho = C(["flex flex-col gap-4"], {
2605
+ variants: {},
2606
+ defaultVariants: {},
2607
+ compoundVariants: []
2608
+ }), go = C(
2609
+ [
2610
+ "col-span-full w-fit flex flex-col items-center gap-4 p-5 text-center",
2611
+ "md:flex-row"
2612
+ ],
2613
+ {
2614
+ variants: {},
2615
+ defaultVariants: {},
2616
+ compoundVariants: []
2617
+ }
2618
+ ), vo = C(
2619
+ ["w-fit flex p-5 gap-4 items-center flex-wrap"],
2620
+ {
2621
+ variants: {},
2622
+ defaultVariants: {},
2623
+ compoundVariants: []
2624
+ }
2625
+ ), bo = C(
2626
+ ["col-span-full w-fit flex p-2 mx-auto text-center"],
2627
+ {
2628
+ variants: {},
2629
+ defaultVariants: {},
2630
+ compoundVariants: []
2631
+ }
2632
+ );
2633
+ C([""], {
2634
+ variants: {},
2635
+ defaultVariants: {},
2636
+ compoundVariants: []
2637
+ });
2638
+ const Co = C(
2639
+ [
2640
+ "grid gap-4 p-5 w-fit mx-auto",
2641
+ "sm:w-full sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"
2642
+ ],
2643
+ {
2644
+ variants: {},
2645
+ defaultVariants: {},
2646
+ compoundVariants: []
2647
+ }
2648
+ ), wo = ({}) => ({}), Zs = A(
2649
+ ({
2650
+ className: e,
2651
+ classNames: t,
2652
+ policies: a,
2653
+ copyRights: o,
2654
+ socialLinks: n,
2655
+ contacts: s,
2656
+ quickLinks: i,
2657
+ variant: l = "default",
2658
+ children: d,
2659
+ ...m
2660
+ }, p) => /* @__PURE__ */ b(
2661
+ "footer",
2662
+ {
2663
+ ref: p,
2664
+ "data-slot": "emperor-ui-footer",
2665
+ className: c(
2666
+ fo({
2667
+ variant: l,
2668
+ className: c(e, t?.base)
2669
+ })
2670
+ ),
2671
+ style: wo({}),
2672
+ ...m,
2673
+ children: [
2674
+ /* @__PURE__ */ r(
2675
+ "div",
2676
+ {
2677
+ "data-slot": "emperor-footer-content",
2678
+ className: c(
2679
+ ho({
2680
+ className: c(e, t?.content)
2681
+ })
2682
+ ),
2683
+ children: d
2684
+ }
2685
+ ),
2686
+ /* @__PURE__ */ r(Ca, { quickLinks: i, classNames: t }),
2687
+ /* @__PURE__ */ r(ge, { className: "col-span-full bg-background/30" }),
2688
+ /* @__PURE__ */ b(
2689
+ "div",
2690
+ {
2691
+ className: c(
2692
+ "col-span-full flex flex-col gap-4 justify-between items-center w-full",
2693
+ "md:flex-row"
2694
+ ),
2695
+ children: [
2696
+ /* @__PURE__ */ r(wa, { socialLinks: n, classNames: t }),
2697
+ /* @__PURE__ */ r(xa, { policies: a, classNames: t })
2698
+ ]
2699
+ }
2700
+ ),
2701
+ /* @__PURE__ */ r(ya, { copyRights: o, classNames: t })
2702
+ ]
2703
+ }
2704
+ )
2705
+ );
2706
+ function Qs({ policies: e, classNames: t }) {
2707
+ return /* @__PURE__ */ r(
2708
+ "section",
2709
+ {
2710
+ "data-slot": "emperor-footer-policies",
2711
+ className: c(
2712
+ go({
2713
+ className: c(t?.policiesWrapper)
2714
+ })
2715
+ ),
2716
+ children: e?.map((a) => /* @__PURE__ */ r(
2717
+ J,
2718
+ {
2719
+ href: a.href,
2720
+ className: c(t?.policy),
2721
+ children: a.label
2722
+ },
2723
+ a.href
2724
+ ))
2725
+ }
2726
+ );
2727
+ }
2728
+ function Js({ copyRights: e, classNames: t }) {
2729
+ return /* @__PURE__ */ r(
2730
+ "section",
2731
+ {
2732
+ "data-slot": "emperor-footer-policies",
2733
+ className: c(
2734
+ bo({
2735
+ className: c(t?.copyRightsWrapper)
2736
+ })
2737
+ ),
2738
+ children: /* @__PURE__ */ b(
2739
+ "p",
2740
+ {
2741
+ className: c(
2742
+ "flex items-center gap-1 text-sm text-gray-400 text-center",
2743
+ t?.copyRightsText
2744
+ ),
2745
+ children: [
2746
+ /* @__PURE__ */ r("span", { children: "©" }),
2747
+ /* @__PURE__ */ r("span", { children: e?.year }),
2748
+ /* @__PURE__ */ r("span", { children: e?.text })
2749
+ ]
2750
+ }
2751
+ )
2752
+ }
2753
+ );
2754
+ }
2755
+ function ei({ socialLinks: e, classNames: t }) {
2756
+ return /* @__PURE__ */ r(
2757
+ "section",
2758
+ {
2759
+ "data-slot": "emperor-footer-social-links",
2760
+ className: c(
2761
+ vo({
2762
+ className: c(t?.socialLinksWrapper)
2763
+ })
2764
+ ),
2765
+ children: e?.map(({ href: a, icon: o, label: n }) => /* @__PURE__ */ b(
2766
+ J,
2767
+ {
2768
+ href: a,
2769
+ className: c(
2770
+ "flex items-center gap-2 text-sm text-gray-400 hover:text-white transition-all duration-300 ease-in-out",
2771
+ t?.socialLink
2772
+ ),
2773
+ target: "_blank",
2774
+ rel: "noopener noreferrer",
2775
+ children: [
2776
+ o,
2777
+ n
2778
+ ]
2779
+ },
2780
+ a
2781
+ ))
2782
+ }
2783
+ );
2784
+ }
2785
+ function ti({ quickLinks: e, classNames: t }) {
2786
+ return /* @__PURE__ */ r(
2787
+ "section",
2788
+ {
2789
+ "data-slot": "emperor-footer-quick-links",
2790
+ className: c(
2791
+ Co({
2792
+ className: c(t?.quickLinksWrapper)
2793
+ })
2794
+ ),
2795
+ children: e?.map(({ links: a, title: o }) => /* @__PURE__ */ b(
2796
+ "div",
2797
+ {
2798
+ className: c("flex flex-col gap-4", t?.quickLinksItem),
2799
+ children: [
2800
+ /* @__PURE__ */ r(
2801
+ "h3",
2802
+ {
2803
+ className: c("text-lg font-semibold", t?.quickLinksTitle),
2804
+ children: o
2805
+ }
2806
+ ),
2807
+ /* @__PURE__ */ r("ul", { className: c("flex flex-col gap-2", t?.quickLinksList), children: a?.map(({ href: n, label: s, isExternal: i }) => /* @__PURE__ */ r(
2808
+ J,
2809
+ {
2810
+ href: n,
2811
+ target: i ? "_blank" : "_self",
2812
+ className: c(
2813
+ " text-gray-400 hover:text-white transition-all duration-300 ease-in-out",
2814
+ t?.quickLinksLink
2815
+ ),
2816
+ children: s
2817
+ },
2818
+ n
2819
+ )) })
2820
+ ]
2821
+ },
2822
+ o
2823
+ ))
2824
+ }
2825
+ );
2826
+ }
2827
+ const xo = C(
2828
+ ["flex min-h-16 items-center justify-between gap-4 px-6 w-full"],
2829
+ {
2830
+ variants: {
2831
+ variant: {
2832
+ default: ["flex-nowrap w-full"],
2833
+ floating: [
2834
+ "fixed min-h-14 w-[90vw] rounded-full shadow-lg",
2835
+ "top-3 left-1/2 -translate-x-1/2 z-10"
2836
+ ],
2837
+ light: [],
2838
+ "segmented-floating": [
2839
+ "fixed min-h-12 w-[90vw] top-3 left-1/2 -translate-x-1/2 z-10"
2840
+ ]
2841
+ }
2842
+ },
2843
+ defaultVariants: {},
2844
+ compoundVariants: []
2845
+ }
2846
+ ), Ct = ({
2847
+ glassEffect: e
2848
+ }) => ({
2849
+ backgroundColor: e?.backgroundColor ? `${e?.backgroundColor}${e?.opacity ?? 30}` : "transparent",
2850
+ backdropFilter: `blur(${e?.blur ?? 0}px)`,
2851
+ color: e?.foregroundColor
2852
+ }), yo = ({
2853
+ primaryColor: e,
2854
+ foregroundColor: t,
2855
+ variant: a,
2856
+ glassEffect: o
2857
+ }) => o?.enabled && a !== "segmented-floating" ? Ct({
2858
+ glassEffect: {
2859
+ ...o,
2860
+ foregroundColor: o?.foregroundColor ?? t
2861
+ }
2862
+ }) : ["default", "floating"].includes(a ?? "") ? {
2863
+ backgroundColor: e,
2864
+ color: t
2865
+ } : {}, Io = ({
2866
+ children: e,
2867
+ glassEffect: t
2868
+ }) => /* @__PURE__ */ r(le, { className: "w-full min-h-12 justify-between", children: ze.toArray(e).map((a, o) => /* @__PURE__ */ r(
2869
+ le,
2870
+ {
2871
+ className: "rounded-full min-h-12 px-5",
2872
+ style: {
2873
+ ...t ? Ct({
2874
+ glassEffect: t
2875
+ }) : {}
2876
+ },
2877
+ children: a
2878
+ },
2879
+ o
2880
+ )) }), ai = A(
2881
+ ({ className: e, variant: t = "default", glassEffect: a, children: o, ...n }, s) => {
2882
+ const { isOpen: i, onOpenChange: l } = mt(), d = o || /* @__PURE__ */ b(se, { children: [
2883
+ /* @__PURE__ */ r(
2884
+ Ia,
2885
+ {
2886
+ items: Se,
2887
+ actions: La,
2888
+ isOpen: i,
2889
+ onOpenChange: l,
2890
+ header: /* @__PURE__ */ r(ie, { className: "text-white" }),
2891
+ triggerProps: {
2892
+ startContent: /* @__PURE__ */ r(
2893
+ ie,
2894
+ {
2895
+ className: "text-white",
2896
+ classNames: {
2897
+ logo: "size-6"
2898
+ }
2899
+ }
2900
+ ),
2901
+ isIconOnly: !1,
2902
+ variant: "light"
2903
+ }
2904
+ }
2905
+ ),
2906
+ /* @__PURE__ */ r(
2907
+ ke,
2908
+ {
2909
+ className: "hidden md:flex mx-auto",
2910
+ items: Se,
2911
+ hoverEffect: {
2912
+ default: "default",
2913
+ floating: "underline",
2914
+ light: "underline",
2915
+ "segmented-floating": "default"
2916
+ }[t],
2917
+ variant: {
2918
+ default: "default",
2919
+ floating: "default",
2920
+ light: "default",
2921
+ "segmented-floating": "default"
2922
+ }[t]
2923
+ }
2924
+ )
2925
+ ] });
2926
+ return /* @__PURE__ */ r(
2927
+ "header",
2928
+ {
2929
+ ref: s,
2930
+ "data-slot": "emperor-header",
2931
+ className: c(xo({ variant: t, className: e })),
2932
+ style: yo({
2933
+ variant: t,
2934
+ glassEffect: a
2935
+ }),
2936
+ ...n,
2937
+ children: t === "segmented-floating" ? /* @__PURE__ */ r(Io, { glassEffect: a, children: d }) : d
2938
+ }
2939
+ );
2940
+ }
2941
+ );
2942
+ function ri({
2943
+ children: e,
2944
+ className: t,
2945
+ classNames: a,
2946
+ formProps: o,
2947
+ onSubmit: n,
2948
+ onSuccess: s,
2949
+ onError: i,
2950
+ onValuesChange: l
2951
+ }) {
2952
+ const { control: d, handleSubmit: m } = Sr(o), p = N(() => ({}), []), u = Er({ control: d }) ?? p, f = ze.toArray(e);
2953
+ f.forEach((g) => {
2954
+ if (!It(g) || g.type !== Sa)
2955
+ throw new Error(
2956
+ "FormBuilder accepts only 'Field' components as children."
2957
+ );
2958
+ });
2959
+ const h = f.map(
2960
+ (g) => St(g)
2961
+ );
2962
+ $(() => {
2963
+ l?.(u);
2964
+ }, [u, l]);
2965
+ const v = async (g) => {
2966
+ try {
2967
+ await n(g), s?.(g);
2968
+ } catch (x) {
2969
+ i?.(x);
2970
+ }
2971
+ };
2972
+ return /* @__PURE__ */ r(ir, { value: { control: d, formValues: u }, children: /* @__PURE__ */ r(
2973
+ "form",
2974
+ {
2975
+ className: c(t, a?.base),
2976
+ onSubmit: m(
2977
+ v,
2978
+ (g) => i?.({
2979
+ errors: g
2980
+ })
2981
+ ),
2982
+ children: h
2983
+ }
2984
+ ) });
2985
+ }
2986
+ const oi = {
2987
+ layout: {
2988
+ withScaffold: !0
2989
+ },
2990
+ interLocalization: {
2991
+ lang: "en",
2992
+ languages: ["en", "ar"],
2993
+ defaultLanguage: "en",
2994
+ dir: "ltr",
2995
+ isMultiLingual: !1,
2996
+ locales: {
2997
+ en: hr,
2998
+ ar: fr
2999
+ }
3000
+ },
3001
+ theme: {
3002
+ components: {
3003
+ input: {
3004
+ variant: "faded",
3005
+ labelPlacement: "outside",
3006
+ size: "sm"
3007
+ },
3008
+ textarea: {
3009
+ variant: "faded",
3010
+ labelPlacement: "outside",
3011
+ size: "sm"
3012
+ },
3013
+ button: {
3014
+ variant: "faded",
3015
+ size: "sm"
3016
+ },
3017
+ select: {
3018
+ variant: "faded",
3019
+ labelPlacement: "outside",
3020
+ placeholder: "Select an option",
3021
+ size: "sm"
3022
+ },
3023
+ selectItem: {
3024
+ variant: "faded"
3025
+ },
3026
+ autocomplete: {
3027
+ variant: "faded",
3028
+ labelPlacement: "outside",
3029
+ size: "sm"
3030
+ },
3031
+ autocompleteItem: {
3032
+ variant: "faded"
3033
+ },
3034
+ datePicker: {
3035
+ variant: "faded",
3036
+ labelPlacement: "outside",
3037
+ size: "sm"
3038
+ }
3039
+ }
3040
+ }
3041
+ }, ni = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.", si = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,", ii = [
3042
+ "image/jpeg",
3043
+ "image/jpg",
3044
+ "image/png",
3045
+ "image/webp",
3046
+ "image/gif",
3047
+ "image/bmp",
3048
+ "image/svg+xml",
3049
+ "image/tiff",
3050
+ "image/x-icon"
3051
+ ], li = ["application/pdf"], ci = [
3052
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
3053
+ ], di = [
3054
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
3055
+ "application/vnd.ms-excel",
3056
+ "text/csv"
3057
+ ], mi = 1024, ui = {
3058
+ image: [".jpg", ".jpeg", ".png"],
3059
+ doc: [".doc", ".docx"],
3060
+ pdf: [".pdf"],
3061
+ video: [".mp4"],
3062
+ sheet: [".xlsx", ".xlx", ".xls", ".csv"]
3063
+ }, pi = [
3064
+ {
3065
+ title: "Products",
3066
+ links: [
3067
+ {
3068
+ label: "Product 1",
3069
+ href: "/product-1"
3070
+ },
3071
+ {
3072
+ label: "Product 2",
3073
+ href: "/product-2"
3074
+ },
3075
+ {
3076
+ label: "Product 3",
3077
+ href: "/product-3"
3078
+ }
3079
+ ]
3080
+ },
3081
+ {
3082
+ title: "Services",
3083
+ links: [
3084
+ {
3085
+ label: "Service 1",
3086
+ href: "/service-1"
3087
+ },
3088
+ {
3089
+ label: "Service 2",
3090
+ href: "/service-2"
3091
+ },
3092
+ {
3093
+ label: "Service 3",
3094
+ href: "/service-3"
3095
+ },
3096
+ {
3097
+ label: "Service 4",
3098
+ href: "/service-4"
3099
+ }
3100
+ ]
3101
+ },
3102
+ {
3103
+ title: "Resources",
3104
+ links: [
3105
+ {
3106
+ label: "Resource 1",
3107
+ href: "/resource-1"
3108
+ }
3109
+ ]
3110
+ },
3111
+ {
3112
+ title: "Company",
3113
+ links: [
3114
+ {
3115
+ label: "About Us",
3116
+ href: "/about-us"
3117
+ },
3118
+ {
3119
+ label: "Careers",
3120
+ href: "/careers"
3121
+ },
3122
+ {
3123
+ label: "Blog",
3124
+ href: "/blog"
3125
+ }
3126
+ ]
3127
+ },
3128
+ {
3129
+ title: "Support",
3130
+ links: [
3131
+ {
3132
+ label: "Contact Us",
3133
+ href: "/contact-us"
3134
+ }
3135
+ ]
3136
+ }
3137
+ ], fi = [
3138
+ {
3139
+ label: "Privacy Policy",
3140
+ href: "/privacy-policy"
3141
+ },
3142
+ {
3143
+ label: "Terms of Service",
3144
+ href: "/terms-of-service"
3145
+ },
3146
+ {
3147
+ label: "Cookie Policy",
3148
+ href: "/cookie-policy"
3149
+ }
3150
+ ], hi = {
3151
+ year: 2026,
3152
+ text: "All rights reserved - Emperor UI"
3153
+ }, gi = {
3154
+ mobile: "+964 770 000 0000",
3155
+ email: "contact@emperorui.com",
3156
+ website: "https://jsempire.com",
3157
+ workingHours: "Monday - Friday: 9:00 AM - 5:00 PM",
3158
+ addresses: [
3159
+ {
3160
+ country: "Jordan",
3161
+ street: "Amman, Jordan",
3162
+ city: "Amman",
3163
+ state: "Amman",
3164
+ zip: "11111"
3165
+ },
3166
+ {
3167
+ country: "Saudi Arabia",
3168
+ street: "Riyadh, Saudi Arabia",
3169
+ city: "Riyadh",
3170
+ state: "Riyadh",
3171
+ zip: "11111"
3172
+ }
3173
+ ]
3174
+ }, vi = [
3175
+ {
3176
+ href: "https://facebook.com",
3177
+ icon: /* @__PURE__ */ r(Wa, {})
3178
+ },
3179
+ {
3180
+ href: "https://twitter.com",
3181
+ icon: /* @__PURE__ */ r(Ga, {})
3182
+ },
3183
+ {
3184
+ href: "https://instagram.com",
3185
+ icon: /* @__PURE__ */ r(Ka, {})
3186
+ },
3187
+ {
3188
+ href: "https://linkedin.com",
3189
+ icon: /* @__PURE__ */ r(ja, {})
3190
+ },
3191
+ {
3192
+ href: "https://youtube.com",
3193
+ icon: /* @__PURE__ */ r(qa, {})
3194
+ }
3195
+ ], bi = ({}) => ({
3196
+ initial: { opacity: 0, y: 12 },
3197
+ animate: { opacity: 1, y: 0 },
3198
+ transition: { duration: 0.3, ease: "easeOut" },
3199
+ whileHover: {
3200
+ y: -4
3201
+ }
3202
+ }), So = [
3203
+ {
3204
+ key: "view",
3205
+ label: "View details",
3206
+ color: "primary",
3207
+ variant: "flat",
3208
+ size: "sm",
3209
+ startContent: /* @__PURE__ */ r(ue, { className: "size-4" })
3210
+ },
3211
+ {
3212
+ key: "edit",
3213
+ label: "Edit",
3214
+ color: "secondary",
3215
+ variant: "flat",
3216
+ size: "sm",
3217
+ startContent: /* @__PURE__ */ r(ot, { className: "size-4" })
3218
+ },
3219
+ {
3220
+ key: "delete",
3221
+ label: "Delete",
3222
+ color: "danger",
3223
+ variant: "flat",
3224
+ size: "sm",
3225
+ startContent: /* @__PURE__ */ r(Q, { className: "size-4" })
3226
+ }
3227
+ ], Ci = So.map((e) => ({
3228
+ ...e,
3229
+ variant: "solid",
3230
+ size: "lg",
3231
+ startContent: {
3232
+ view: /* @__PURE__ */ r(ue, { className: "size-5" }),
3233
+ edit: /* @__PURE__ */ r(ot, { className: "size-5" }),
3234
+ delete: /* @__PURE__ */ r(Q, { className: "size-5" })
3235
+ }[e?.key]
3236
+ })), wi = Y(
3237
+ void 0
3238
+ ), xi = Y(void 0), yi = Y(
3239
+ void 0
3240
+ ), Ii = Y(null);
3241
+ function Si() {
3242
+ const e = X(ce);
3243
+ if (!e)
3244
+ throw new Error("useEmperorUI must be used within a EmperorUIProvider");
3245
+ return e;
3246
+ }
3247
+ function Ei() {
3248
+ const e = X(gt);
3249
+ if (!e)
3250
+ throw new Error("useNavigation must be used within a NavigationProvider");
3251
+ return e;
3252
+ }
3253
+ const ne = "URLSearchParamsChange";
3254
+ function Ni() {
3255
+ const e = O(() => {
3256
+ if (typeof window > "u")
3257
+ return {};
3258
+ const m = new URLSearchParams(window.location.search);
3259
+ return Array.from(m.entries()).reduce((p, [u, f]) => (p[u] = f, p), {});
3260
+ }, []), [t, a] = I(
3261
+ () => e()
3262
+ ), o = O(
3263
+ ({ searchParams: m }) => {
3264
+ if (typeof window > "u") return;
3265
+ const p = m.toString(), u = p ? `?${p}` : "", f = `${window.location.pathname}${u}${window.location.hash}`, h = `${window.location.pathname}${window.location.search}${window.location.hash}`;
3266
+ f !== h && (window.history.replaceState(window.history.state, "", f), window.dispatchEvent(new Event(ne)));
3267
+ },
3268
+ []
3269
+ ), n = O(
3270
+ ({
3271
+ params: m,
3272
+ options: p = { replace: !0 }
3273
+ }) => {
3274
+ if (typeof window > "u") return;
3275
+ const u = new URLSearchParams(window.location.search);
3276
+ let f = !1;
3277
+ Object.entries(m).forEach(([h, v]) => {
3278
+ if (v == null || v === "") {
3279
+ const y = u.has(h);
3280
+ u.delete(h), y && (f = !0);
3281
+ return;
3282
+ }
3283
+ const g = String(v);
3284
+ if (p.replace) {
3285
+ const y = u.getAll(h);
3286
+ if (y.length === 1 && y[0] === g)
3287
+ return;
3288
+ u.delete(h), u.append(h, g), f = !0;
3289
+ return;
3290
+ }
3291
+ u.getAll(h).some(
3292
+ (y) => y === g
3293
+ ) || (u.append(h, g), f = !0);
3294
+ }), f && o({ searchParams: u });
3295
+ },
3296
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3297
+ []
3298
+ ), s = O(
3299
+ ({ key: m }) => {
3300
+ if (typeof window > "u")
3301
+ return;
3302
+ const p = new URLSearchParams(window.location.search);
3303
+ p.delete(m), o({ searchParams: p });
3304
+ },
3305
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3306
+ []
3307
+ ), i = O(
3308
+ ({ keys: m }) => {
3309
+ if (typeof window > "u") return;
3310
+ const p = new URLSearchParams(window.location.search);
3311
+ let u = !1;
3312
+ m.forEach((f) => {
3313
+ const h = p.has(f);
3314
+ p.delete(f), h && (u = !0);
3315
+ }), u && o({ searchParams: p });
3316
+ },
3317
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3318
+ []
3319
+ ), l = O(() => {
3320
+ typeof window > "u" || window.location.search && o({ searchParams: new URLSearchParams() });
3321
+ }, [o]), d = O((m) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(m), []);
3322
+ return $(() => {
3323
+ if (typeof window > "u")
3324
+ return;
3325
+ const m = () => {
3326
+ a(e());
3327
+ };
3328
+ return m(), window.addEventListener("popstate", m), window.addEventListener(ne, m), () => {
3329
+ window.removeEventListener("popstate", m), window.removeEventListener(ne, m);
3330
+ };
3331
+ }, [e]), {
3332
+ getParam: d,
3333
+ allParams: t,
3334
+ setParams: n,
3335
+ deleteParam: s,
3336
+ deleteParams: i,
3337
+ clearParams: l
3338
+ };
3339
+ }
3340
+ function Li() {
3341
+ const e = X(vt);
3342
+ if (!e)
3343
+ throw new Error(
3344
+ "useUploaderContext must be used within a UploaderProvider"
3345
+ );
3346
+ return e;
3347
+ }
3348
+ const Ai = ({
3349
+ labelContent: e,
3350
+ labelId: t,
3351
+ fileTypes: a,
3352
+ isRequired: o = !1,
3353
+ isDraggable: n = !0,
3354
+ isMulti: s = !1,
3355
+ preventDuplicates: i = !0,
3356
+ maxCount: l = 10,
3357
+ maxFileSize: d = qe * 10,
3358
+ compressFiles: m = !1,
3359
+ onChange: p = () => {
3360
+ },
3361
+ locales: u
3362
+ }) => {
3363
+ const { config: f } = w(), [h, v] = I([]), [g, x] = I(!1), S = f?.interLocalization?.locales, y = f?.interLocalization?.lang || f?.interLocalization?.defaultLanguage || "en", P = ee(y), T = Z({
3364
+ defaultUploaderLocale: P.atoms.uploader,
3365
+ configUploaderLocale: S?.[y]?.atoms?.uploader,
3366
+ contextUploaderLocale: u
3367
+ });
3368
+ return {
3369
+ files: h,
3370
+ fileTypes: a,
3371
+ labelId: t,
3372
+ isRequired: o,
3373
+ labelContent: e,
3374
+ isDraggable: n,
3375
+ isMulti: s,
3376
+ handleClearFile: (E) => {
3377
+ if (v((B) => B?.filter((D) => D?.file?.name !== E)), t) {
3378
+ const B = document.getElementById(t);
3379
+ B && (B.value = "");
3380
+ }
3381
+ },
3382
+ onInputChange: async (E) => {
3383
+ if (console.log("files: ", E.target.files), (!E.target.files || !E.target.files?.[0]) && (!E?.dataTransfer?.files || !E?.dataTransfer?.files[0]))
3384
+ return G({
3385
+ title: T.errorUploadingFile
3386
+ });
3387
+ const B = Et(a);
3388
+ if (!E.target.files && !E.dataTransfer.files) return;
3389
+ const D = Array.from(
3390
+ E.target.files || E.dataTransfer.files
3391
+ );
3392
+ if (s && (D?.length > l || h?.length + D?.length > l)) {
3393
+ G({
3394
+ title: `${T.maxNumImages} ${l}`
3395
+ });
3396
+ return;
3397
+ }
3398
+ if (!D?.map((re) => re?.type)?.every((re) => B.includes(re))) {
3399
+ G({
3400
+ title: T.errorUploadedTypes
3401
+ });
3402
+ return;
3403
+ }
3404
+ const { compressedFiles: ye, isInValid: ae } = await Nt({
3405
+ uploadedFiles: D,
3406
+ maxFileSize: d,
3407
+ compressFiles: m,
3408
+ preventDuplicates: i,
3409
+ files: h,
3410
+ uploaderLocale: T
3411
+ });
3412
+ ae || (x(!0), await Promise.all(
3413
+ await Lt({
3414
+ uploadedFiles: ye,
3415
+ uploaderLocale: T,
3416
+ allowedTypes: B,
3417
+ isMulti: s,
3418
+ setFiles: v
3419
+ })
3420
+ ).finally(() => {
3421
+ x(!1);
3422
+ }), setTimeout(() => {
3423
+ p();
3424
+ }, 200), E.target && "value" in E.target && E.target.files && (E.target.value = ""));
3425
+ },
3426
+ setFiles: v,
3427
+ isLoading: g,
3428
+ locales: u
3429
+ };
3430
+ }, j = {
3431
+ sm: 640,
3432
+ md: 768,
3433
+ lg: 1024,
3434
+ xl: 1280,
3435
+ "2xl": 1536
3436
+ }, Pi = () => {
3437
+ const [e, t] = I({ width: 0, height: 0 });
3438
+ $(() => {
3439
+ function s() {
3440
+ t({ width: window.innerWidth, height: window.innerHeight });
3441
+ }
3442
+ return window.addEventListener("resize", s), s(), () => window.removeEventListener("resize", s);
3443
+ }, []);
3444
+ const a = N(() => e?.width > j?.["2xl"] ? "2xl" : e?.width > j?.xl ? "xl" : e?.width > j?.lg ? "lg" : e?.width > j?.md ? "md" : e?.width > j?.sm ? "sm" : "base", [e]), o = N(
3445
+ () => ["base", "sm", "md"].includes(a),
3446
+ [a]
3447
+ ), n = N(
3448
+ () => ["base"].includes(a),
3449
+ [a]
3450
+ );
3451
+ return {
3452
+ viewportWidth: e.width,
3453
+ viewportHeight: e.height,
3454
+ currentScreen: a,
3455
+ isSmallDevice: o,
3456
+ isExtraSmallDevice: n
3457
+ };
3458
+ };
3459
+ function Fi() {
3460
+ const { allParams: e, clearParams: t } = F();
3461
+ return { filters: N(() => Object.keys(e).length ? e : null, [e]), clearFilters: t };
3462
+ }
3463
+ function _i() {
3464
+ const e = X(bt);
3465
+ if (!e)
3466
+ throw new Error(
3467
+ "'useFormBuilder' must be used within a 'FormBuilderProvider', make sure to wrap 'Field' components with 'FormBuilder' as well."
3468
+ );
3469
+ return e;
3470
+ }
3471
+ function Mi({
3472
+ children: e,
3473
+ config: t = k
3474
+ }) {
3475
+ const a = N(() => ({
3476
+ config: {
3477
+ layout: {
3478
+ ...k?.layout,
3479
+ ...t?.layout
3480
+ },
3481
+ interLocalization: {
3482
+ ...k?.interLocalization,
3483
+ ...t?.interLocalization,
3484
+ locales: {
3485
+ [V.ENGLISH]: Ie({
3486
+ defaultLocales: k?.interLocalization?.locales?.[V.ENGLISH],
3487
+ configLocales: t?.interLocalization?.locales?.[V.ENGLISH]
3488
+ }),
3489
+ [V.ARABIC]: Ie({
3490
+ defaultLocales: k?.interLocalization?.locales?.[V.ARABIC],
3491
+ configLocales: t?.interLocalization?.locales?.[V.ARABIC]
3492
+ })
3493
+ }
3494
+ },
3495
+ theme: {
3496
+ ...k?.theme,
3497
+ ...t?.theme,
3498
+ components: {
3499
+ ...k?.theme?.components,
3500
+ ...t?.theme?.components
3501
+ }
3502
+ }
3503
+ }
3504
+ }), [t]);
3505
+ return t.layout?.withScaffold ?? !0 ? /* @__PURE__ */ r(ce.Provider, { value: a, children: /* @__PURE__ */ r(Ea, { children: e }) }) : /* @__PURE__ */ r(ce.Provider, { value: a, children: e });
3506
+ }
3507
+ function Ti({
3508
+ children: e,
3509
+ ...t
3510
+ }) {
3511
+ return /* @__PURE__ */ r(lr, { ...t, children: /* @__PURE__ */ r(Br, { children: /* @__PURE__ */ r(cr, { children: /* @__PURE__ */ b(ht, { children: [
3512
+ /* @__PURE__ */ r(
3513
+ Tr,
3514
+ {
3515
+ placement: "top-center",
3516
+ toastProps: {
3517
+ radius: "lg",
3518
+ size: "lg",
3519
+ color: "primary",
3520
+ variant: "flat",
3521
+ timeout: 4e3
3522
+ },
3523
+ ...t?.config?.toast
3524
+ }
3525
+ ),
3526
+ e
3527
+ ] }) }) }) });
3528
+ }
3529
+ function Bi({ children: e }) {
3530
+ const [t, a] = I(null), [o, n] = I([]), [s, i] = I(!1), [l, d] = I(!1), m = N(() => ({
3531
+ hoveredItemId: t,
3532
+ subItems: o,
3533
+ isSubItemsBoxOpen: s,
3534
+ subItemsBoxIsHovered: l,
3535
+ setHoveredItemId: a,
3536
+ setSubItems: n,
3537
+ setIsSubItemsBoxOpen: i,
3538
+ setSubItemsBoxIsHovered: d
3539
+ }), [t, o, s, l]);
3540
+ return /* @__PURE__ */ b(
3541
+ gt.Provider,
3542
+ {
3543
+ value: m,
3544
+ "data-slot": "emperor-navigation-provider",
3545
+ children: [
3546
+ /* @__PURE__ */ r(
3547
+ "div",
3548
+ {
3549
+ id: ur.COMPACT_SIDEBAR_ID,
3550
+ "data-slot": "emperor-compact-sidebar"
3551
+ }
3552
+ ),
3553
+ e
3554
+ ]
3555
+ }
3556
+ );
3557
+ }
3558
+ function zi({
3559
+ children: e,
3560
+ ...t
3561
+ }) {
3562
+ const { isOpen: a, onOpen: o, onOpenChange: n } = mt(), [s, i] = I(null), l = N(
3563
+ () => !!s?.view && !!s?.file?.name && s?.type === "image",
3564
+ [s]
3565
+ ), d = N(() => ({
3566
+ isOpen: a,
3567
+ onOpen: o,
3568
+ onOpenChange: n,
3569
+ selectedFile: s,
3570
+ setSelectedFile: i,
3571
+ isFileViewable: l,
3572
+ ...t
3573
+ }), [
3574
+ a,
3575
+ l,
3576
+ s,
3577
+ o,
3578
+ n,
3579
+ i,
3580
+ t
3581
+ ]);
3582
+ return /* @__PURE__ */ r(
3583
+ vt.Provider,
3584
+ {
3585
+ value: d,
3586
+ "data-slot": "emperor-uploader-provider",
3587
+ children: e
3588
+ }
3589
+ );
3590
+ }
3591
+ function ki({ children: e }) {
3592
+ return /* @__PURE__ */ r(ht, { attribute: "class", defaultTheme: "system", enableSystem: !0, children: e });
3593
+ }
3594
+ function Vi({
3595
+ children: e,
3596
+ value: t
3597
+ }) {
3598
+ return /* @__PURE__ */ r(bt.Provider, { value: t, children: e });
3599
+ }
3600
+ function Di(...e) {
3601
+ return kr(zr(e));
3602
+ }
3603
+ const Oi = ({
3604
+ config: e = k
3605
+ }) => [
3606
+ (t) => /* @__PURE__ */ r(dr, { config: e, children: /* @__PURE__ */ r(t, {}) })
3607
+ ];
3608
+ async function $i(e, t) {
3609
+ try {
3610
+ if (!e?.file) return null;
3611
+ const a = await Vr(e?.file, {
3612
+ maxSizeMB: t || 2,
3613
+ useWebWorker: !0,
3614
+ // Optimize performance
3615
+ initialQuality: 0.8
3616
+ // Adjust the compression quality (0.1 to 1)
3617
+ }), o = new File([a], e?.file?.name, {
3618
+ type: a.type
3619
+ });
3620
+ return {
3621
+ ...e,
3622
+ file: o
3623
+ };
3624
+ } catch (a) {
3625
+ return console.error("Image compression failed:", a), null;
3626
+ }
3627
+ }
3628
+ const Eo = (e) => Ye.includes(e) ? "image" : Ze.includes(e) ? "pdf" : Xe.includes(e) ? "doc" : Qe.includes(e) ? "sheet" : null, Ri = (e) => {
3629
+ const t = [];
3630
+ return e.forEach((a) => {
3631
+ a === "image" && t.push(...Ye), a === "doc" && t.push(...Xe), a === "pdf" && t.push(...Ze), a === "sheet" && t.push(...Qe);
3632
+ }), t;
3633
+ }, No = ({
3634
+ files: e,
3635
+ fileName: t
3636
+ }) => e?.filter(({ file: a }) => a?.name === t)?.length > 0, Lo = ({
3637
+ fileSize: e,
3638
+ maxFileSize: t
3639
+ }) => e > t * 1024;
3640
+ async function Ui({
3641
+ uploadedFiles: e,
3642
+ maxFileSize: t = qe * 10,
3643
+ compressFiles: a,
3644
+ uploaderLocale: o,
3645
+ preventDuplicates: n,
3646
+ files: s
3647
+ }) {
3648
+ let i = !1;
3649
+ return {
3650
+ compressedFiles: await Promise.all(
3651
+ e?.map(async (d) => Lo({ fileSize: d?.size, maxFileSize: t }) ? (G({
3652
+ title: o.maxSizeExceededError.replace("MAX_FILE_SIZE", (t / 1024 || 0)?.toString()).replace(
3653
+ "UPLOADED_FILE_SIZE",
3654
+ (d?.size / 1024 / 1024 || 0)?.toFixed(1)?.toString()
3655
+ )
3656
+ }), a ? (await At({ file: d }))?.file : (i = !0, d)) : (n && No({ fileName: d?.name, files: s }) && (G({
3657
+ title: o.duplicatesDenied
3658
+ }), i = !0), d))
3659
+ ),
3660
+ isInValid: i
3661
+ };
3662
+ }
3663
+ async function Hi({
3664
+ uploadedFiles: e,
3665
+ uploaderLocale: t,
3666
+ allowedTypes: a,
3667
+ isMulti: o,
3668
+ setFiles: n
3669
+ }) {
3670
+ return e?.map((s) => {
3671
+ if (s) {
3672
+ const i = Eo(s?.type);
3673
+ if (!i) {
3674
+ G({
3675
+ title: `${t.errorUploadedTypes} ${a.join(", ")}`
3676
+ });
3677
+ return;
3678
+ }
3679
+ const l = new FileReader();
3680
+ l.onload = () => {
3681
+ n((d) => [
3682
+ ...o ? d : [],
3683
+ {
3684
+ file: s,
3685
+ view: l.result,
3686
+ type: i,
3687
+ url: URL.createObjectURL(s)
3688
+ }
3689
+ ]);
3690
+ }, l.readAsDataURL(s);
3691
+ }
3692
+ });
3693
+ }
3694
+ const Wi = ({
3695
+ defaultUploaderLocale: e,
3696
+ configUploaderLocale: t,
3697
+ contextUploaderLocale: a
3698
+ }) => ({
3699
+ ...e,
3700
+ ...t || {},
3701
+ ...a || {}
3702
+ }), Be = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Gi = ({
3703
+ defaultLocales: e,
3704
+ configLocales: t
3705
+ }) => {
3706
+ const a = (o, n) => {
3707
+ if (n == null || Object.keys(n).length === 0)
3708
+ return o;
3709
+ const s = { ...o };
3710
+ for (const i of Object.keys(n)) {
3711
+ const l = n[i], d = o[i];
3712
+ l !== void 0 && (Be(l) && Be(d) ? s[i] = a(
3713
+ d,
3714
+ l
3715
+ ) : s[i] = l);
3716
+ }
3717
+ return s;
3718
+ };
3719
+ return a(
3720
+ e,
3721
+ t
3722
+ );
3723
+ }, Ki = [
3724
+ "laptops",
3725
+ "desktops",
3726
+ "monitors",
3727
+ "keyboards",
3728
+ "mice",
3729
+ "headsets",
3730
+ "printers",
3731
+ "storage",
3732
+ "components",
3733
+ "networking"
3734
+ ], ji = [
3735
+ "Apple",
3736
+ "Dell",
3737
+ "HP",
3738
+ "Lenovo",
3739
+ "Asus",
3740
+ "Acer",
3741
+ "MSI",
3742
+ "Razer",
3743
+ "Samsung",
3744
+ "Microsoft"
3745
+ ], qi = [
3746
+ "black",
3747
+ "gray",
3748
+ "white",
3749
+ "silver",
3750
+ "blue",
3751
+ "red"
3752
+ ], Yi = /* @__PURE__ */ new Date("2026-02-04T00:00:00.000Z"), Xi = [
3753
+ "Excellent performance for the price.",
3754
+ "Very quiet and fast machine.",
3755
+ "Solid build quality and screen.",
3756
+ "Battery life could be better.",
3757
+ "Perfect for gaming and streaming.",
3758
+ "Great value, highly recommended.",
3759
+ "Runs cool even under heavy load.",
3760
+ "Keyboard and trackpad feel premium.",
3761
+ "Display is bright and color-accurate.",
3762
+ "Setup was easy and straightforward."
3763
+ ], Zi = [
3764
+ "Ahmed K.",
3765
+ "Sara M.",
3766
+ "Omar A.",
3767
+ "Lina H.",
3768
+ "Mohammed S.",
3769
+ "Nour E.",
3770
+ "Youssef R.",
3771
+ "Fatima D.",
3772
+ "Hassan T.",
3773
+ "Mona L."
3774
+ ], Qi = [
3775
+ 'Ultrabook Pro 14" Laptop',
3776
+ "Gaming Beast RTX Desktop",
3777
+ "Office Essential Mini PC",
3778
+ 'Curved 27" 2K Monitor',
3779
+ "Mechanical RGB Gaming Keyboard",
3780
+ "Wireless Silent Mouse",
3781
+ "Studio USB-C Headset",
3782
+ "All-in-One Color Printer",
3783
+ "1TB NVMe PCIe 4.0 SSD",
3784
+ "High-Airflow ATX Case"
3785
+ ], Ji = [
3786
+ "Powerful and lightweight device ideal for productivity, study, and everyday use.",
3787
+ "High-end desktop designed for 1440p and 4K gaming with excellent cooling.",
3788
+ "Compact form factor PC optimized for office applications and web browsing.",
3789
+ "High refresh rate display with vivid colors and thin bezels for immersive work.",
3790
+ "Durable keyboard with customizable RGB lighting and fast mechanical switches.",
3791
+ "Ergonomic wireless mouse with precise sensor and long battery life.",
3792
+ "Comfortable over-ear headset with crystal-clear microphone and rich sound.",
3793
+ "Fast wireless printer with automatic duplex printing and mobile support.",
3794
+ "Next-generation SSD with blazing read and write speeds for fast boot times.",
3795
+ "Spacious case with optimized airflow, cable management, and tempered glass."
3796
+ ], el = [
3797
+ "https://images.pexels.com/photos/18105/pexels-photo.jpg",
3798
+ "https://images.pexels.com/photos/1714208/pexels-photo-1714208.jpeg",
3799
+ "https://images.pexels.com/photos/1714341/pexels-photo-1714341.jpeg",
3800
+ "https://images.pexels.com/photos/2047905/pexels-photo-2047905.jpeg",
3801
+ "https://images.pexels.com/photos/163117/keyboard-black-notebook-input-163117.jpeg",
3802
+ "https://images.pexels.com/photos/3829246/pexels-photo-3829246.jpeg",
3803
+ "https://images.pexels.com/photos/3394664/pexels-photo-3394664.jpeg",
3804
+ "https://images.pexels.com/photos/3996439/pexels-photo-3996439.jpeg",
3805
+ "https://images.pexels.com/photos/97077/pexels-photo-97077.jpeg",
3806
+ "https://images.pexels.com/photos/3945650/pexels-photo-3945650.jpeg"
3807
+ ], Ao = 2e3, tl = (e, t = Ao) => () => new Promise((a) => {
3808
+ setTimeout(() => {
3809
+ e(), a();
3810
+ }, t);
3811
+ }), q = [
3812
+ {
3813
+ id: "info",
3814
+ label: "Info",
3815
+ href: "#info",
3816
+ Icon: pe
3817
+ },
3818
+ {
3819
+ id: "contact",
3820
+ label: "Contact",
3821
+ href: "#contact",
3822
+ Icon: fe
3823
+ },
3824
+ {
3825
+ id: "services",
3826
+ label: "Services",
3827
+ href: "#services",
3828
+ Icon: he
3829
+ },
3830
+ {
3831
+ id: "settings",
3832
+ label: "Settings",
3833
+ href: "#settings",
3834
+ Icon: Ya
3835
+ },
3836
+ {
3837
+ id: "help",
3838
+ label: "Help",
3839
+ href: "#help",
3840
+ Icon: Xa
3841
+ },
3842
+ {
3843
+ id: "support",
3844
+ label: "Support",
3845
+ href: "#support",
3846
+ Icon: Za
3847
+ }
3848
+ ], al = [
3849
+ {
3850
+ id: "home",
3851
+ label: "Home",
3852
+ href: "#home",
3853
+ Icon: nt
3854
+ },
3855
+ {
3856
+ id: "about",
3857
+ label: "About",
3858
+ href: "#about",
3859
+ Icon: pe
3860
+ },
3861
+ {
3862
+ id: "contact",
3863
+ label: "Contact",
3864
+ href: "#contact",
3865
+ Icon: fe
3866
+ },
3867
+ {
3868
+ id: "services",
3869
+ label: "Services",
3870
+ href: "#services",
3871
+ Icon: he
3872
+ }
3873
+ ], rl = [
3874
+ {
3875
+ id: "home",
3876
+ label: "Home",
3877
+ href: "#home",
3878
+ Icon: nt,
3879
+ subItems: q
3880
+ },
3881
+ {
3882
+ id: "about",
3883
+ label: "About",
3884
+ href: "#about",
3885
+ Icon: pe,
3886
+ subItems: q
3887
+ },
3888
+ {
3889
+ id: "contact",
3890
+ label: "Contact",
3891
+ href: "#contact",
3892
+ Icon: fe,
3893
+ subItems: q
3894
+ },
3895
+ {
3896
+ id: "services",
3897
+ label: "Services",
3898
+ href: "#services",
3899
+ Icon: he,
3900
+ subItems: q
3901
+ }
3902
+ ], ol = [
3903
+ {
3904
+ key: "logout",
3905
+ label: "Logout",
3906
+ color: "danger",
3907
+ onPress: () => console.log("logout"),
3908
+ startContent: /* @__PURE__ */ r(Qa, {})
3909
+ }
3910
+ ], xe = (e, t) => Array.from({ length: e }, (a, o) => {
3911
+ const n = t + o + 1, s = o % 5 + 1 + o % 3 * 0.1, i = Number(Math.min(5, s).toFixed(1)), l = _e[o % _e?.length], d = Me[o % Me.length];
3912
+ return {
3913
+ id: n,
3914
+ rating: i,
3915
+ comment: l,
3916
+ author: d,
3917
+ createdAt: de,
3918
+ updatedAt: de
3919
+ };
3920
+ }), Po = xe(10, 0), Fo = xe(50, 10), _o = xe(100, 60), Mo = (e) => {
3921
+ const t = e % 5 + 1, a = [];
3922
+ for (let o = 0; o < t; o += 1) {
3923
+ const n = {
3924
+ label: Te[(e + o) % Te.length],
3925
+ startContent: /* @__PURE__ */ r(Ja, { className: "size-3 fill-current" })
3926
+ };
3927
+ a.includes(n) || a.push(n);
3928
+ }
3929
+ return a;
3930
+ }, To = (e) => {
3931
+ if (e < 10) return Po;
3932
+ if (e < 30) return Fo;
3933
+ const a = e % (100 + 1);
3934
+ return _o.slice(0, a);
3935
+ }, Bo = (e) => {
3936
+ if (!e.length) return 0;
3937
+ const a = e.reduce((o, n) => o + n.rating, 0) / e.length;
3938
+ return Number(a.toFixed(1));
3939
+ }, wt = Array.from(
3940
+ { length: 50 },
3941
+ (e, t) => {
3942
+ const a = t + 1, o = Ne[t % Ne.length], n = Le[t % Le.length], s = Ae[t % Ae.length], i = Pe[t % Pe.length], l = Fe[t % Fe.length], d = 300 + t % 10 * 75, m = t % 3 * 50, p = d + m, u = t % 7 !== 0, f = t % 6 === 0, h = t % 5 === 0, v = To(t), g = Bo(v), x = new Date(
3943
+ de.getTime() - t * 24 * 60 * 60 * 1e3
3944
+ ), S = x;
3945
+ return {
3946
+ id: a,
3947
+ title: s,
3948
+ description: i,
3949
+ image: l,
3950
+ price: p,
3951
+ categories: Mo(t),
3952
+ isAvailable: u,
3953
+ isBestSeller: f,
3954
+ isTopRated: h,
3955
+ averageRating: g,
3956
+ reviews: v,
3957
+ brand: o,
3958
+ color: n,
3959
+ createdAt: x,
3960
+ updatedAt: S
3961
+ };
3962
+ }
3963
+ ), nl = async ({
3964
+ page: e = 1,
3965
+ pageSize: t = 12
3966
+ }) => {
3967
+ const a = wt.slice((e - 1) * t, e * t);
3968
+ return await new Promise((o) => {
3969
+ setTimeout(o, 2e3);
3970
+ }), {
3971
+ items: a
3972
+ };
3973
+ }, sl = async () => (await new Promise((e) => {
3974
+ setTimeout(e, 2e3);
3975
+ }), {
3976
+ item: wt[0]
3977
+ }), il = {
3978
+ [V.ENGLISH]: {
3979
+ dropHere: "Drop your custom file here",
3980
+ selectFile: "Choose a custom file or drag it here",
3981
+ selectionTypes: "PNG, JPG or PDF, max size 5MB (custom localized)",
3982
+ selectBtn: "Browse custom files",
3983
+ errorUploadingFile: "Custom error: please upload at least one file",
3984
+ maxNumImages: "Custom limit reached for uploaded images: ",
3985
+ errorUploadedTypes: "Custom error: allowed file types are only: ",
3986
+ maxSizeExceededError: "Custom error: maximum allowed size is MAX_FILE_SIZE MB, but your file is UPLOADED_FILE_SIZE MB",
3987
+ duplicatesDenied: "Custom error: duplicate file names are not allowed, please rename before uploading"
3988
+ },
3989
+ [V.ARABIC]: {
3990
+ dropHere: "أسقط الملف المخصص هنا",
3991
+ selectFile: "اختر ملفًا مخصصًا أو اسحبه إلى هنا",
3992
+ selectionTypes: "PNG، JPG أو PDF، الحجم الأقصى 5MB (نص مخصص)",
3993
+ selectBtn: "استعراض الملفات المخصصة",
3994
+ errorUploadingFile: "خطأ مخصص: يرجى رفع ملف واحد على الأقل",
3995
+ maxNumImages: "خطأ مخصص: تم الوصول إلى الحد الأقصى للصور المرفوعة: ",
3996
+ errorUploadedTypes: "خطأ مخصص: يمكنك فقط رفع الملفات من الأنواع التالية: ",
3997
+ maxSizeExceededError: "خطأ مخصص: الحد الأقصى المسموح هو MAX_FILE_SIZE ميغابايت، بينما حجم ملفك هو UPLOADED_FILE_SIZE ميغابايت",
3998
+ duplicatesDenied: "خطأ مخصص: لا يمكنك رفع ملفات بأسماء مكررة، يرجى إعادة تسميتها قبل الرفع"
3999
+ }
4000
+ };
4001
+ var zo = /* @__PURE__ */ ((e) => (e.COMPACT_SIDEBAR_ID = "emperor-compact-sidebar", e))(zo || {}), ko = /* @__PURE__ */ ((e) => (e.PLACEHOLDER_MALE_AVATAR = "https://api.dicebear.com/7.x/avataaars/svg?seed=male", e.PLACEHOLDER_FEMALE_AVATAR = "https://api.dicebear.com/7.x/avataaars/svg?seed=female", e))(ko || {});
3
4002
  export {
4
- a as ALLOWED_DOC_TYPES,
5
- i as ALLOWED_IMAGES_TYPES,
6
- o as ALLOWED_PDF_TYPES,
7
- t as ALLOWED_SHEET_TYPES,
8
- r as AutocompleteField,
9
- l as AutocompleteFilter,
10
- d as AvatarLabel,
11
- C as Brand,
12
- f as CheckboxField,
13
- n as CheckboxFilter,
14
- E as CheckboxGroupFilter,
15
- I as ColorPicker,
16
- _ as Column,
17
- m as ConfigProvider,
18
- S as Container,
19
- p as CopyButton,
20
- T as CopyRightsBox,
21
- c as DateFilter,
22
- M as DeletionConfirmor,
23
- F as DeletionConfirmorWithTrigger,
24
- g as EmperorUIContext,
25
- A as EmperorUIProvider,
26
- O as EmptyListings,
27
- L as FAKE_PARAGRAPH,
28
- u as FAKE_SENTENCE,
29
- B as Field,
30
- P as Filter,
31
- D as Footer,
32
- R as FormBuilder,
33
- K as FormBuilderContext,
34
- N as FormBuilderProvider,
35
- U as FreeColorPicker,
36
- x as Header,
37
- y as ITEM_CARD_ACTIONS,
38
- W as ITEM_CARD_ACTIONS_OVERLAY,
39
- h as InputField,
40
- k as ItemActionsButtons,
41
- v as ItemActionsDropdown,
42
- H as ItemActionsOverlay,
43
- G as ItemBanner,
44
- w as ItemCard,
45
- V as ItemCardBody,
46
- b as ItemCardFooter,
47
- Y as ItemCardHeader,
48
- z as ItemDetails,
49
- Q as LandingPage,
50
- q as Listings,
51
- J as LoadingItem,
52
- X as MOCK_AWAITING_DELETE_MS,
53
- Z as MOCK_BASE_DATE,
54
- $ as MOCK_COLORS,
55
- j as MOCK_HEADER_ACTIONS,
56
- ee as MOCK_HEADER_ITEMS,
57
- se as MOCK_HEADER_ITEMS_WITH_SUB_ITEMS,
58
- ae as MOCK_HEADER_SUB_ITEMS,
59
- ie as MOCK_ITEM_BRANDS,
60
- oe as MOCK_ITEM_CATEGORIES,
61
- te as MOCK_ITEM_REVIEWS_1,
62
- re as MOCK_ITEM_REVIEWS_2,
63
- le as MOCK_ITEM_REVIEWS_3,
64
- de as MOCK_LISTINGS,
65
- Ce as MOCK_LISTING_DESCRIPTIONS,
66
- fe as MOCK_LISTING_IMAGES,
67
- ne as MOCK_LISTING_TITLES,
68
- Ee as MOCK_REVIEW_AUTHORS,
69
- Ie as MOCK_REVIEW_COMMENTS,
70
- _e as NavBar,
71
- me as NavBarItem,
72
- Se as NavigationContext,
73
- pe as NavigationProvider,
74
- Te as NumericFilter,
75
- ce as ONE_MEGABYTE,
76
- Me as Placeholders,
77
- Fe as PoliciesBox,
78
- ge as Portal,
79
- Ae as PreservedKeys,
80
- Oe as PresetColorPicker,
81
- Le as QuickLinksBox,
82
- ue as RadioField,
83
- Be as RangeFilter,
84
- Pe as Row,
85
- De as Scaffold,
86
- Re as SearchFilter,
87
- Ke as SelectField,
88
- Ne as SelectFilter,
89
- Ue as SideBar,
90
- xe as SocialLinksBox,
91
- ye as SubItemsBox,
92
- We as SwitchField,
93
- he as SwitchFilter,
94
- ke as TextareaField,
95
- ve as ThemeProvider,
96
- He as ThemeSwitch,
97
- Ge as UploadFileErrorBox,
98
- we as UploadFileInput,
99
- Ve as UploadFileLabel,
100
- be as UploadFileListing,
101
- Ye as Uploader,
102
- ze as UploaderContext,
103
- Qe as UploaderProvider,
104
- qe as UploaderTitle,
105
- Je as ViewImageModal,
106
- Xe as cn,
107
- Ze as compressImage,
108
- $e as contacts,
109
- je as copyRights,
110
- es as defaultEmperorUIConfig,
111
- ss as deletionConfirmorBodyClasses,
112
- as as deletionConfirmorContentClasses,
113
- is as deletionConfirmorFooterClasses,
114
- os as deletionConfirmorHeaderClasses,
115
- ts as deletionConfirmorStyles,
116
- rs as emptyListingsClasses,
117
- ls as fieldClasses,
118
- ds as fileTypesMapping,
119
- Cs as filterClasses,
120
- fs as getAllowedTypes,
121
- ns as getCardMotion,
122
- Es as getListing,
123
- Is as getListings,
124
- _s as getStorybookDecorators,
125
- ms as isFileDuplicated,
126
- Ss as isMaxFileSizeExceeded,
127
- ps as itemBannerClasses,
128
- Ts as itemBodyClasses,
129
- cs as itemCardMotionClasses,
130
- Ms as itemChipsClasses,
131
- Fs as itemDescriptionClasses,
132
- gs as itemFooterClasses,
133
- As as itemHeaderClasses,
134
- Os as itemImageWrapperClasses,
135
- Ls as itemMainWrapperClasses,
136
- us as itemPriceClasses,
137
- Bs as itemTitleClasses,
138
- Ps as listingsClasses,
139
- Ds as listingsItemClasses,
140
- Rs as listingsPaginationClasses,
141
- Ks as listingsStyles,
142
- Ns as mapFileType,
143
- Us as mergeLocales,
144
- xs as mergeUploaderLocale,
145
- ys as mockAwaitingDelete,
146
- Ws as policies,
147
- hs as quickLinks,
148
- ks as refineUploadedFiles,
149
- vs as scaffoldClasses,
150
- Hs as socialLinks,
151
- Gs as uploaderLocalesMock,
152
- ws as useEmperorUI,
153
- Vs as useFilters,
154
- bs as useFormBuilder,
155
- Ys as useNavigation,
156
- zs as useSearchParamsHandler,
157
- Qs as useUploader,
158
- qs as useUploaderContext,
159
- Js as useWindowSize,
160
- Xs as validateUploadedFiles
4003
+ ci as ALLOWED_DOC_TYPES,
4004
+ ii as ALLOWED_IMAGES_TYPES,
4005
+ li as ALLOWED_PDF_TYPES,
4006
+ di as ALLOWED_SHEET_TYPES,
4007
+ ks as AutocompleteField,
4008
+ Is as AutocompleteFilter,
4009
+ ps as AvatarLabel,
4010
+ is as Brand,
4011
+ Bs as CheckboxField,
4012
+ Ns as CheckboxFilter,
4013
+ Ls as CheckboxGroupFilter,
4014
+ $s as ColorPicker,
4015
+ ls as Column,
4016
+ Mi as ConfigProvider,
4017
+ cs as Container,
4018
+ Hs as CopyButton,
4019
+ Js as CopyRightsBox,
4020
+ Ss as DateFilter,
4021
+ Gs as DeletionConfirmor,
4022
+ Ks as DeletionConfirmorWithTrigger,
4023
+ wi as EmperorUIContext,
4024
+ Ti as EmperorUIProvider,
4025
+ Xs as EmptyListings,
4026
+ si as FAKE_PARAGRAPH,
4027
+ ni as FAKE_SENTENCE,
4028
+ Fs as Field,
4029
+ ws as Filter,
4030
+ Zs as Footer,
4031
+ ri as FormBuilder,
4032
+ Ii as FormBuilderContext,
4033
+ Vi as FormBuilderProvider,
4034
+ Rs as FreeColorPicker,
4035
+ ai as Header,
4036
+ So as ITEM_CARD_ACTIONS,
4037
+ Ci as ITEM_CARD_ACTIONS_OVERLAY,
4038
+ Ms as InputField,
4039
+ Un as ItemActionsButtons,
4040
+ Rn as ItemActionsDropdown,
4041
+ Hn as ItemActionsOverlay,
4042
+ kn as ItemBanner,
4043
+ Vn as ItemCard,
4044
+ On as ItemCardBody,
4045
+ $n as ItemCardFooter,
4046
+ Dn as ItemCardHeader,
4047
+ js as ItemDetails,
4048
+ Bn as LandingPage,
4049
+ Ys as Listings,
4050
+ zn as LoadingItem,
4051
+ Ao as MOCK_AWAITING_DELETE_MS,
4052
+ Yi as MOCK_BASE_DATE,
4053
+ qi as MOCK_COLORS,
4054
+ ol as MOCK_HEADER_ACTIONS,
4055
+ al as MOCK_HEADER_ITEMS,
4056
+ rl as MOCK_HEADER_ITEMS_WITH_SUB_ITEMS,
4057
+ q as MOCK_HEADER_SUB_ITEMS,
4058
+ ji as MOCK_ITEM_BRANDS,
4059
+ Ki as MOCK_ITEM_CATEGORIES,
4060
+ Po as MOCK_ITEM_REVIEWS_1,
4061
+ Fo as MOCK_ITEM_REVIEWS_2,
4062
+ _o as MOCK_ITEM_REVIEWS_3,
4063
+ wt as MOCK_LISTINGS,
4064
+ Ji as MOCK_LISTING_DESCRIPTIONS,
4065
+ el as MOCK_LISTING_IMAGES,
4066
+ Qi as MOCK_LISTING_TITLES,
4067
+ Zi as MOCK_REVIEW_AUTHORS,
4068
+ Xi as MOCK_REVIEW_COMMENTS,
4069
+ ts as NavBar,
4070
+ rs as NavBarItem,
4071
+ xi as NavigationContext,
4072
+ Bi as NavigationProvider,
4073
+ Es as NumericFilter,
4074
+ mi as ONE_MEGABYTE,
4075
+ ko as Placeholders,
4076
+ Qs as PoliciesBox,
4077
+ ms as Portal,
4078
+ zo as PreservedKeys,
4079
+ Us as PresetColorPicker,
4080
+ ti as QuickLinksBox,
4081
+ Ds as RadioField,
4082
+ Ps as RangeFilter,
4083
+ ds as Row,
4084
+ ns as Scaffold,
4085
+ xs as SearchFilter,
4086
+ zs as SelectField,
4087
+ ys as SelectFilter,
4088
+ os as SideBar,
4089
+ ei as SocialLinksBox,
4090
+ as as SubItemsBox,
4091
+ Vs as SwitchField,
4092
+ As as SwitchFilter,
4093
+ Ts as TextareaField,
4094
+ ki as ThemeProvider,
4095
+ Os as ThemeSwitch,
4096
+ vs as UploadFileErrorBox,
4097
+ bs as UploadFileInput,
4098
+ fs as UploadFileLabel,
4099
+ gs as UploadFileListing,
4100
+ us as Uploader,
4101
+ yi as UploaderContext,
4102
+ zi as UploaderProvider,
4103
+ Cs as UploaderTitle,
4104
+ hs as ViewImageModal,
4105
+ Di as cn,
4106
+ $i as compressImage,
4107
+ gi as contacts,
4108
+ hi as copyRights,
4109
+ oi as defaultEmperorUIConfig,
4110
+ io as deletionConfirmorBodyClasses,
4111
+ no as deletionConfirmorContentClasses,
4112
+ lo as deletionConfirmorFooterClasses,
4113
+ so as deletionConfirmorHeaderClasses,
4114
+ Ws as deletionConfirmorStyles,
4115
+ qs as emptyListingsClasses,
4116
+ _s as fieldClasses,
4117
+ ui as fileTypesMapping,
4118
+ ro as filterClasses,
4119
+ Ri as getAllowedTypes,
4120
+ bi as getCardMotion,
4121
+ sl as getListing,
4122
+ nl as getListings,
4123
+ Oi as getStorybookDecorators,
4124
+ No as isFileDuplicated,
4125
+ Lo as isMaxFileSizeExceeded,
4126
+ es as itemBannerClasses,
4127
+ qn as itemBodyClasses,
4128
+ Wn as itemCardMotionClasses,
4129
+ Jn as itemChipsClasses,
4130
+ Qn as itemDescriptionClasses,
4131
+ Yn as itemFooterClasses,
4132
+ jn as itemHeaderClasses,
4133
+ Kn as itemImageWrapperClasses,
4134
+ Gn as itemMainWrapperClasses,
4135
+ Zn as itemPriceClasses,
4136
+ Xn as itemTitleClasses,
4137
+ co as listingsClasses,
4138
+ mo as listingsItemClasses,
4139
+ uo as listingsPaginationClasses,
4140
+ po as listingsStyles,
4141
+ Eo as mapFileType,
4142
+ Gi as mergeLocales,
4143
+ Wi as mergeUploaderLocale,
4144
+ tl as mockAwaitingDelete,
4145
+ fi as policies,
4146
+ pi as quickLinks,
4147
+ Hi as refineUploadedFiles,
4148
+ ss as scaffoldClasses,
4149
+ vi as socialLinks,
4150
+ il as uploaderLocalesMock,
4151
+ Si as useEmperorUI,
4152
+ Fi as useFilters,
4153
+ _i as useFormBuilder,
4154
+ Ei as useNavigation,
4155
+ Ni as useSearchParamsHandler,
4156
+ Ai as useUploader,
4157
+ Li as useUploaderContext,
4158
+ Pi as useWindowSize,
4159
+ Ui as validateUploadedFiles
161
4160
  };