impact-nova 2.5.16 → 2.6.0-alpha.0

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 (254) hide show
  1. package/README.md +27 -25
  2. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +28 -1
  3. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.d.ts +0 -3
  4. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +31 -38
  5. package/dist/components/data/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  6. package/dist/components/data/ag-grid-react/chat/chat-capabilities.d.ts +9 -0
  7. package/dist/components/data/ag-grid-react/chat/chat-capabilities.js +22 -0
  8. package/dist/components/data/ag-grid-react/chat/chat-column.d.ts +20 -0
  9. package/dist/components/data/ag-grid-react/chat/chat-column.js +81 -0
  10. package/dist/components/data/ag-grid-react/chat/chat-composer.d.ts +10 -0
  11. package/dist/components/data/ag-grid-react/chat/chat-composer.js +352 -0
  12. package/dist/components/data/ag-grid-react/chat/chat-constants.d.ts +17 -0
  13. package/dist/components/data/ag-grid-react/chat/chat-constants.js +22 -0
  14. package/dist/components/data/ag-grid-react/chat/chat-format.d.ts +41 -0
  15. package/dist/components/data/ag-grid-react/chat/chat-format.js +94 -0
  16. package/dist/components/data/ag-grid-react/chat/chat-host.d.ts +10 -0
  17. package/dist/components/data/ag-grid-react/chat/chat-host.js +651 -0
  18. package/dist/components/data/ag-grid-react/chat/chat-host.types.d.ts +13 -0
  19. package/dist/components/data/ag-grid-react/chat/chat-html.d.ts +2 -0
  20. package/dist/components/data/ag-grid-react/chat/chat-html.js +40 -0
  21. package/dist/components/data/ag-grid-react/chat/chat-identity.d.ts +13 -0
  22. package/dist/components/data/ag-grid-react/chat/chat-identity.js +24 -0
  23. package/dist/components/data/ag-grid-react/chat/chat-menu.d.ts +13 -0
  24. package/dist/components/data/ag-grid-react/chat/chat-menu.js +15 -0
  25. package/dist/components/data/ag-grid-react/chat/chat-notify.d.ts +17 -0
  26. package/dist/components/data/ag-grid-react/chat/chat-notify.js +124 -0
  27. package/dist/components/data/ag-grid-react/chat/chat-persist.d.ts +13 -0
  28. package/dist/components/data/ag-grid-react/chat/chat-persist.js +34 -0
  29. package/dist/components/data/ag-grid-react/chat/chat-priority.d.ts +13 -0
  30. package/dist/components/data/ag-grid-react/chat/chat-priority.js +79 -0
  31. package/dist/components/data/ag-grid-react/chat/chat-summaries.d.ts +2 -0
  32. package/dist/components/data/ag-grid-react/chat/chat-summaries.js +24 -0
  33. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.d.ts +72 -0
  34. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.js +713 -0
  35. package/dist/components/data/ag-grid-react/chat/chat-toggle.d.ts +6 -0
  36. package/dist/components/data/ag-grid-react/chat/chat-toggle.js +25 -0
  37. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.d.ts +13 -0
  38. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.js +26 -0
  39. package/dist/components/data/ag-grid-react/chat/chat-window.d.ts +14 -0
  40. package/dist/components/data/ag-grid-react/chat/chat-window.js +82 -0
  41. package/dist/components/data/ag-grid-react/chat/chat-workspace.d.ts +91 -0
  42. package/dist/components/data/ag-grid-react/chat/chat-workspace.js +555 -0
  43. package/dist/components/data/ag-grid-react/chat/chat.types.d.ts +319 -0
  44. package/dist/components/data/ag-grid-react/chat/index.d.ts +6 -0
  45. package/dist/components/data/ag-grid-react/chat/index.js +24 -0
  46. package/dist/components/data/ag-grid-react/chat.story-data.d.ts +34 -0
  47. package/dist/components/data/ag-grid-react/chat.story-sources.d.ts +4 -0
  48. package/dist/components/data/ag-grid-react/comments/assets/comments-no-results.png.js +4 -0
  49. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.d.ts +6 -0
  50. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.js +29 -0
  51. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.d.ts +8 -0
  52. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.js +18 -0
  53. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.d.ts +18 -0
  54. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.js +16 -0
  55. package/dist/components/data/ag-grid-react/comments/comments-capabilities.d.ts +11 -0
  56. package/dist/components/data/ag-grid-react/comments/comments-capabilities.js +26 -0
  57. package/dist/components/data/ag-grid-react/comments/comments-constants.d.ts +12 -0
  58. package/dist/components/data/ag-grid-react/comments/comments-constants.js +21 -0
  59. package/dist/components/data/ag-grid-react/comments/comments-format.d.ts +20 -0
  60. package/dist/components/data/ag-grid-react/comments/comments-format.js +49 -0
  61. package/dist/components/data/ag-grid-react/comments/comments-generation.d.ts +14 -0
  62. package/dist/components/data/ag-grid-react/comments/comments-generation.js +18 -0
  63. package/dist/components/data/ag-grid-react/comments/comments-host.d.ts +10 -0
  64. package/dist/components/data/ag-grid-react/comments/comments-host.js +343 -0
  65. package/dist/components/data/ag-grid-react/comments/comments-host.types.d.ts +18 -0
  66. package/dist/components/data/ag-grid-react/comments/comments-identity.d.ts +7 -0
  67. package/dist/components/data/ag-grid-react/comments/comments-identity.js +20 -0
  68. package/dist/components/data/ag-grid-react/comments/comments-menu.d.ts +29 -0
  69. package/dist/components/data/ag-grid-react/comments/comments-menu.js +35 -0
  70. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.d.ts +22 -0
  71. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.js +98 -0
  72. package/dist/components/data/ag-grid-react/comments/comments-overlay.d.ts +21 -0
  73. package/dist/components/data/ag-grid-react/comments/comments-overlay.js +406 -0
  74. package/dist/components/data/ag-grid-react/comments/comments-panel.d.ts +9 -0
  75. package/dist/components/data/ag-grid-react/comments/comments-panel.js +272 -0
  76. package/dist/components/data/ag-grid-react/comments/comments-persist.d.ts +11 -0
  77. package/dist/components/data/ag-grid-react/comments/comments-persist.js +19 -0
  78. package/dist/components/data/ag-grid-react/comments/comments-reveal.d.ts +11 -0
  79. package/dist/components/data/ag-grid-react/comments/comments-reveal.js +31 -0
  80. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.d.ts +18 -0
  81. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.js +22 -0
  82. package/dist/components/data/ag-grid-react/comments/comments-window.d.ts +10 -0
  83. package/dist/components/data/ag-grid-react/comments/comments-window.js +62 -0
  84. package/dist/components/data/ag-grid-react/comments/comments.types.d.ts +178 -0
  85. package/dist/components/data/ag-grid-react/comments/index.d.ts +5 -0
  86. package/dist/components/data/ag-grid-react/comments/index.js +15 -0
  87. package/dist/components/data/ag-grid-react/comments-cell-renderers-showcase.d.ts +25 -0
  88. package/dist/components/data/ag-grid-react/comments.story-data.d.ts +37 -0
  89. package/dist/components/data/ag-grid-react/comments.story-sources.d.ts +11 -0
  90. package/dist/components/data/ag-grid-react/grid-cell-address.d.ts +21 -0
  91. package/dist/components/data/ag-grid-react/grid-cell-address.js +21 -0
  92. package/dist/components/data/ag-grid-react/grid-row-reveal.d.ts +34 -0
  93. package/dist/components/data/ag-grid-react/grid-row-reveal.js +33 -0
  94. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +75 -65
  95. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +1 -1
  96. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +54 -54
  97. package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +1 -1
  98. package/dist/components/data/ag-grid-react/headers/header-search-input.js +122 -119
  99. package/dist/components/data/ag-grid-react/headers/utils/date-utils.d.ts +2 -1
  100. package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +25 -20
  101. package/dist/components/data/ag-grid-react/headers/utils/filter-utils.d.ts +1 -1
  102. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  103. package/dist/components/data/ag-grid-react/index.js +481 -254
  104. package/dist/components/data/ag-grid-react/notes/index.d.ts +2 -0
  105. package/dist/components/data/ag-grid-react/notes/index.js +1 -0
  106. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.d.ts +25 -0
  107. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.js +32 -0
  108. package/dist/components/data/ag-grid-react/notes/notes-constants.d.ts +2 -0
  109. package/dist/components/data/ag-grid-react/notes/notes-constants.js +4 -0
  110. package/dist/components/data/ag-grid-react/notes/notes.types.d.ts +12 -0
  111. package/dist/components/data/ag-grid-react/notes.story-sources.d.ts +7 -0
  112. package/dist/components/data/ag-grid-react/nova-system-column.d.ts +7 -0
  113. package/dist/components/data/ag-grid-react/nova-system-column.js +18 -0
  114. package/dist/components/data/ag-grid-react/theme.js +6 -2
  115. package/dist/components/data/ag-grid-react/value-formatter.types.d.ts +4 -0
  116. package/dist/components/data/ag-grid-react/value-formatters.d.ts +0 -19
  117. package/dist/components/data/ag-grid-react/value-formatters.js +88 -90
  118. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
  119. package/dist/components/data/data-table/build-column-tree-from-grid.js +49 -53
  120. package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
  121. package/dist/components/data/data-table/data-table-column-apply.js +73 -84
  122. package/dist/components/data/data-table/data-table-column-def-pin.js +34 -31
  123. package/dist/components/data/data-table/data-table-column-list.js +64 -94
  124. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
  125. package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
  126. package/dist/components/data/data-table/data-table-context.js +5 -5
  127. package/dist/components/data/data-table/data-table-sheet-context.js +1 -1
  128. package/dist/components/data/data-table/data-table-sheet.js +2 -1
  129. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
  130. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
  131. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
  132. package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
  133. package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
  134. package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
  135. package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
  136. package/dist/components/data/nested-list/components/SortableItem.js +60 -62
  137. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
  138. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
  139. package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
  140. package/dist/components/data/nested-list/nested-list-constants.js +4 -10
  141. package/dist/components/data/nested-list/nested-list.js +336 -322
  142. package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
  143. package/dist/components/data-display/calendar/calendar-config.js +22 -21
  144. package/dist/components/data-display/calendar/calendar-day-button.js +21 -21
  145. package/dist/components/data-display/calendar/calendar-day-picker-view.js +36 -35
  146. package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +3 -3
  147. package/dist/components/data-display/calendar/calendar-fiscal-labels.js +50 -62
  148. package/dist/components/data-display/calendar/calendar.js +138 -137
  149. package/dist/components/data-display/calendar/fiscal-period-caption-select.js +23 -22
  150. package/dist/components/data-display/calendar/use-calendar-i18n.d.ts +1 -0
  151. package/dist/components/data-display/calendar/use-calendar-i18n.js +10 -9
  152. package/dist/components/data-display/chart/chart.js +72 -72
  153. package/dist/components/data-display/chart/chart.utils.d.ts +1 -1
  154. package/dist/components/data-display/chart/chart.utils.js +40 -31
  155. package/dist/components/feedback/sheet/sheet.js +1 -1
  156. package/dist/components/feedback/toast/toast.d.ts +1 -1
  157. package/dist/components/feedback/toast/toast.variants.d.ts +1 -1
  158. package/dist/components/flows/filter-panel/filter-panel.d.ts +1 -1
  159. package/dist/components/flows/filter-panel/filter-panel.js +65 -64
  160. package/dist/components/flows/filter-panel/filter-panel.types.d.ts +1 -0
  161. package/dist/components/forms/date-picker/date-picker.js +125 -126
  162. package/dist/components/forms/date-picker/date-range-picker.js +191 -192
  163. package/dist/components/forms/date-picker/multi-date-picker.js +66 -67
  164. package/dist/components/forms/date-picker/multi-week-picker.js +82 -83
  165. package/dist/components/forms/date-picker/use-picker-i18n.d.ts +6 -0
  166. package/dist/components/forms/date-picker/use-picker-i18n.js +11 -0
  167. package/dist/components/forms/date-picker/week-picker.js +146 -147
  168. package/dist/components/forms/date-picker/week-range-picker.js +158 -159
  169. package/dist/components/ui/local-raster-icons/message3d.webp.js +4 -0
  170. package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +1 -0
  171. package/dist/components/ui/local-raster-icons/rasterIcons.js +27 -25
  172. package/dist/form-react/Fields/WeekRangePicker.js +16 -16
  173. package/dist/i18n/defaultMessages.d.ts +144 -0
  174. package/dist/i18n/defaultMessages.js +161 -19
  175. package/dist/i18n/format/collator.d.ts +1 -0
  176. package/dist/i18n/format/collator.js +7 -0
  177. package/dist/i18n/format/date-pattern.d.ts +5 -0
  178. package/dist/i18n/format/date-pattern.js +20 -0
  179. package/dist/i18n/format/format-date.d.ts +9 -0
  180. package/dist/i18n/format/format-date.js +56 -0
  181. package/dist/i18n/format/format-number.d.ts +20 -0
  182. package/dist/i18n/format/format-number.js +68 -0
  183. package/dist/i18n/format/formatter-cache.d.ts +9 -0
  184. package/dist/i18n/format/formatter-cache.js +66 -0
  185. package/dist/i18n/format/index.d.ts +6 -0
  186. package/dist/i18n/format/parse-number.d.ts +6 -0
  187. package/dist/i18n/format/parse-number.js +53 -0
  188. package/dist/i18n/getDateFnsLocale.d.ts +5 -4
  189. package/dist/i18n/getDateFnsLocale.js +46 -16
  190. package/dist/i18n/i18n.types.d.ts +13 -0
  191. package/dist/i18n/impact-nova-i18n-context.d.ts +1 -1
  192. package/dist/i18n/impact-nova-i18n-context.js +33 -25
  193. package/dist/i18n/impact-nova-i18n-defaults.js +8 -6
  194. package/dist/i18n/index.d.ts +4 -1
  195. package/dist/i18n/index.js +41 -16
  196. package/dist/i18n/locale-config.d.ts +28 -0
  197. package/dist/i18n/locale-config.js +32 -0
  198. package/dist/i18n/locales/de.js +142 -0
  199. package/dist/i18n/locales/es.js +142 -0
  200. package/dist/i18n/locales/hi.js +142 -0
  201. package/dist/i18n/locales/kn.js +142 -0
  202. package/dist/i18n/week-start.d.ts +6 -0
  203. package/dist/i18n/week-start.js +30 -0
  204. package/dist/impact-nova-components.css +249 -0
  205. package/dist/impact-nova-tokens.scss +6 -0
  206. package/dist/impact-nova.css +1 -1
  207. package/dist/index.d.ts +1 -1
  208. package/dist/index.js +624 -601
  209. package/dist/llms/index.js +26 -2
  210. package/dist/llms/rules/ag-grid.js +1 -1
  211. package/dist/llms/rules/best-practices.js +1 -1
  212. package/dist/llms/rules/data-table-chat.js +1 -0
  213. package/dist/llms/rules/data-table-comments.js +1 -0
  214. package/dist/llms/rules/data-table-notes.js +1 -0
  215. package/dist/llms/rules/installation.js +1 -1
  216. package/dist/llms/rules/migration.js +1 -1
  217. package/dist/llms/rules/real-world-patterns.js +1 -1
  218. package/dist/llms/rules/requirements.js +1 -1
  219. package/dist/llms/rules/troubleshooting.js +1 -1
  220. package/dist/providers/app-providers.d.ts +3 -1
  221. package/dist/providers/app-providers.js +22 -11
  222. package/package.json +13 -1
  223. package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
  224. package/dist/components/data/data-table/column-picker-authority.js +0 -116
  225. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
  226. package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
  227. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
  228. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
  229. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
  230. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
  231. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
  232. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
  233. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
  234. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
  235. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
  236. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
  237. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
  238. package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
  239. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
  240. package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
  241. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
  242. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
  243. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
  244. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
  245. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
  246. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
  247. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
  248. package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
  249. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
  250. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
  251. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
  252. package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
  253. package/dist/lib/hash/fnv1a128.d.ts +0 -16
  254. package/dist/lib/hash/fnv1a128.js +0 -21
@@ -0,0 +1,713 @@
1
+ import { jsx as e, jsxs as a, Fragment as Q } from "react/jsx-runtime";
2
+ import { useState as z, useEffect as te } from "react";
3
+ import { Avatar as ae, AvatarImage as ne, AvatarFallback as le } from "../../../data-display/avatar/avatar.js";
4
+ import { Badge as re } from "../../../data-display/badge/badge.js";
5
+ import { Button as k } from "../../../primitives/button/button.js";
6
+ import { Input as J } from "../../../forms/input/input.js";
7
+ import { DropdownMenu as ie, DropdownMenuTrigger as ce, DropdownMenuContent as de, DropdownMenuItem as se } from "../../../feedback/dropdown-menu/dropdown-menu.js";
8
+ import { ThreeDots as oe, Search as he, Pin as X, AddUser as pe, ChevronRight as F, Plus as me, Bin as ue, Checkmark as xe } from "impact-nova-icons";
9
+ import { useImpactNovaI18n as _ } from "../../../../i18n/use-impact-nova-i18n.js";
10
+ import { cn as w } from "../../../../lib/utils.js";
11
+ import { CHAT_DRAWER_MIN_WIDTH as be, CHAT_MEMBERS_VISIBLE as G, CHAT_PEOPLE_PAGE_SIZE as O } from "./chat-constants.js";
12
+ import { chatAllows as L } from "./chat-capabilities.js";
13
+ import { ChatComposer as Y } from "./chat-composer.js";
14
+ import { ChatSendIcon as st } from "./chat-composer.js";
15
+ import { chatLooksLikeHtml as fe, sanitizeChatHtml as ve } from "./chat-html.js";
16
+ import { isValidChatMessageText as $, chatPlainText as ee } from "./chat-identity.js";
17
+ import { resolveChatMembers as Ce, formatChatStamp as V, findChatMember as W, chatInitials as ye, chatAvatarTone as Ne, chatDayKey as ke, formatChatClock as we, formatChatDayLabel as Ae, filterChatPeople as Me } from "./chat-format.js";
18
+ import { ChatPriorityGlyph as Pe, chatPriorityLabel as Te, chatPriorityRailClass as ge, ChatPriorityMenu as ze } from "./chat-priority.js";
19
+ import { buildChatMessageMenuItems as Se } from "./chat-ui-actions.js";
20
+ const Le = "!h-8 !w-8 !rounded-md text-sm font-extrabold", Be = "!h-9 !w-9 !rounded-xl text-xs font-extrabold", Z = "flex h-10 w-full items-center gap-2 rounded-lg px-2 -mx-2 text-left hover:bg-accent";
21
+ function He() {
22
+ return /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
23
+ /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.5" }),
24
+ /* @__PURE__ */ e("path", { d: "M4.2 4.2 11.8 11.8", stroke: "currentColor", strokeWidth: "1.5" })
25
+ ] });
26
+ }
27
+ function _e() {
28
+ return /* @__PURE__ */ e("svg", { className: "iv-chat-reply-curve", width: "18", height: "12", viewBox: "0 0 18 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
29
+ "path",
30
+ {
31
+ d: "M0.5 0C0.5 3.66667 2.7 10.9 11.5 10.5C20.3 10.1 15.8333 10.3333 12.5 10.5",
32
+ stroke: "currentColor"
33
+ }
34
+ ) });
35
+ }
36
+ function at() {
37
+ return /* @__PURE__ */ e("svg", { className: "size-4", viewBox: "0 0 12 7", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
38
+ "path",
39
+ {
40
+ d: "M0.666667 4C1.03333 4 1.33333 3.7 1.33333 3.33333C1.33333 2.96667 1.03333 2.66667 0.666667 2.66667C0.3 2.66667 0 2.96667 0 3.33333C0 3.7 0.3 4 0.666667 4ZM0.666667 6.66667C1.03333 6.66667 1.33333 6.36667 1.33333 6C1.33333 5.63333 1.03333 5.33333 0.666667 5.33333C0.3 5.33333 0 5.63333 0 6C0 6.36667 0.3 6.66667 0.666667 6.66667ZM0.666667 1.33333C1.03333 1.33333 1.33333 1.03333 1.33333 0.666667C1.33333 0.3 1.03333 0 0.666667 0C0.3 0 0 0.3 0 0.666667C0 1.03333 0.3 1.33333 0.666667 1.33333ZM3.33333 4H11.3333C11.7 4 12 3.7 12 3.33333C12 2.96667 11.7 2.66667 11.3333 2.66667H3.33333C2.96667 2.66667 2.66667 2.96667 2.66667 3.33333C2.66667 3.7 2.96667 4 3.33333 4ZM3.33333 6.66667H11.3333C11.7 6.66667 12 6.36667 12 6C12 5.63333 11.7 5.33333 11.3333 5.33333H3.33333C2.96667 5.33333 2.66667 5.63333 2.66667 6C2.66667 6.36667 2.96667 6.66667 3.33333 6.66667ZM2.66667 0.666667C2.66667 1.03333 2.96667 1.33333 3.33333 1.33333H11.3333C11.7 1.33333 12 1.03333 12 0.666667C12 0.3 11.7 0 11.3333 0H3.33333C2.96667 0 2.66667 0.3 2.66667 0.666667Z",
41
+ fill: "currentColor"
42
+ }
43
+ ) });
44
+ }
45
+ function nt() {
46
+ return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
47
+ "path",
48
+ {
49
+ d: "M9.66536 13.333C9.66536 13.775 9.48977 14.199 9.17721 14.5115C8.86465 14.8241 8.44072 14.9997 7.9987 14.9997C7.55667 14.9997 7.13275 14.8241 6.82019 14.5115C6.50763 14.199 6.33203 13.775 6.33203 13.333M0.332031 0.333008L15.6654 15.6663M11.6654 11.6663H14.9987V11.4997L14.4334 10.8943C13.284 9.66259 12.5528 8.09942 12.344 6.42767L12.12 4.63834C12.0018 3.68845 11.5592 2.80854 10.8669 2.14745C10.1747 1.48636 9.27532 1.08468 8.321 1.01035C7.36668 0.936015 6.41598 1.1936 5.62971 1.73952C4.84344 2.28545 4.26987 3.08621 4.00603 4.00634M9.33203 11.6663H0.998698V11.4997L1.56403 10.8943C2.71342 9.66259 3.44461 8.09942 3.65336 6.42767L3.7027 6.03701",
50
+ stroke: "currentColor"
51
+ }
52
+ ) });
53
+ }
54
+ function B({
55
+ author: t,
56
+ member: s,
57
+ size: m = "sm",
58
+ shape: o = "square",
59
+ render: n
60
+ }) {
61
+ if (n) return n({ author: t, member: s });
62
+ const f = s?.avatarUrl;
63
+ return /* @__PURE__ */ a(
64
+ ae,
65
+ {
66
+ size: "sm",
67
+ shape: o,
68
+ className: w(m === "md" ? Be : Le, o === "circle" && "!rounded-full"),
69
+ children: [
70
+ f ? /* @__PURE__ */ e(ne, { src: f, alt: "" }) : null,
71
+ /* @__PURE__ */ e(le, { className: w("font-extrabold", m === "md" ? "text-xs" : "text-sm", Ne(t)), children: ye(t) })
72
+ ]
73
+ }
74
+ );
75
+ }
76
+ function De({
77
+ label: t,
78
+ items: s,
79
+ trigger: m
80
+ }) {
81
+ return s.length === 0 ? null : /* @__PURE__ */ a(ie, { children: [
82
+ /* @__PURE__ */ e(ce, { asChild: !0, children: m ?? /* @__PURE__ */ e(k, { type: "button", size: "iconSm", variant: "ghost", className: "[&_svg]:size-4", "aria-label": t, children: /* @__PURE__ */ e(oe, {}) }) }),
83
+ /* @__PURE__ */ e(de, { align: "end", children: s.map((o) => /* @__PURE__ */ e(se, { disabled: o.disabled, icon: o.icon, onSelect: o.onSelect, children: o.label }, o.id)) })
84
+ ] });
85
+ }
86
+ function lt({
87
+ message: t,
88
+ previousDayKey: s,
89
+ rowId: m,
90
+ conversationId: o,
91
+ config: n,
92
+ members: f,
93
+ highlighted: T,
94
+ locale: h,
95
+ compact: v,
96
+ onReply: p,
97
+ onOpenThread: C,
98
+ onPin: A,
99
+ onEdit: i,
100
+ onDelete: u,
101
+ onSetPriority: P,
102
+ onClose: y
103
+ }) {
104
+ const { t: d } = _(), [r, c] = z(null), x = { rowId: m, conversationId: o, message: t, close: y }, g = { rowId: m, conversationId: o, message: t }, M = t.author === n.getAuthor(), N = W(f ?? [], t.author), D = Se({ extras: n.messageActions, context: x }), H = [
105
+ ...L(n, "edit", g) && !t.deleted ? [{ id: "edit", label: d("chat.edit"), onSelect: () => c(t.text) }] : [],
106
+ ...L(n, "delete", g) && !t.deleted ? [{ id: "delete", label: d("chat.delete"), onSelect: () => u(t) }] : [],
107
+ ...D
108
+ ], I = ke(t.createdAt), E = !v && I !== s, R = !!(t.updatedAt && t.updatedAt !== t.createdAt && !t.deleted), S = n.quickActions ?? [], j = we(t.updatedAt ?? t.createdAt, h), q = t.replyTo?.author === n.getAuthor() ? d("chat.you") : t.replyTo?.author, l = n.renderMessageBody ? n.renderMessageBody({ message: t }) : fe(t.text) ? /* @__PURE__ */ e(
109
+ "div",
110
+ {
111
+ className: "iv-chat-html text-sm leading-5 text-content",
112
+ dangerouslySetInnerHTML: { __html: ve(t.text) }
113
+ }
114
+ ) : /* @__PURE__ */ e("p", { className: "whitespace-pre-wrap break-words text-sm leading-5 text-content", children: t.text });
115
+ return /* @__PURE__ */ a(
116
+ "div",
117
+ {
118
+ "data-iv-chat-message": "",
119
+ "data-iv-chat-message-id": t.id,
120
+ "data-iv-chat-priority": t.priority,
121
+ "data-iv-chat-mine": M ? "" : void 0,
122
+ "data-slot": "chat-message",
123
+ className: "mb-4",
124
+ children: [
125
+ E ? /* @__PURE__ */ e("p", { className: "iv-chat-day", children: Ae(t.createdAt, h, { today: d("chat.today"), yesterday: d("chat.yesterday") }) }) : null,
126
+ t.system ? /* @__PURE__ */ e("p", { "data-iv-chat-system": "", className: "iv-chat-day", children: t.text }) : t.deleted ? /* @__PURE__ */ a(
127
+ "div",
128
+ {
129
+ "data-iv-chat-deleted": "",
130
+ className: "flex items-center gap-2 rounded-lg bg-canvas-subtle px-4 py-3 text-sm text-content-secondary",
131
+ children: [
132
+ /* @__PURE__ */ e("span", { className: "text-content-tertiary", children: /* @__PURE__ */ e(He, {}) }),
133
+ /* @__PURE__ */ e("span", { children: d("chat.deleted") }),
134
+ /* @__PURE__ */ e("time", { className: "iv-chat-stamp ml-auto", dateTime: t.updatedAt ?? t.createdAt, children: j })
135
+ ]
136
+ }
137
+ ) : /* @__PURE__ */ a("div", { className: w("flex gap-2", M ? "justify-end" : "justify-start", T && "rounded-lg ring-2 ring-brand-tint"), children: [
138
+ M ? null : /* @__PURE__ */ e(B, { author: t.author, member: N, shape: "circle", render: n.renderAvatar }),
139
+ /* @__PURE__ */ a("div", { className: w("w-fit min-w-0 max-w-[min(100%,32rem)]", M && "ml-auto"), children: [
140
+ r != null ? /* @__PURE__ */ a(
141
+ "div",
142
+ {
143
+ className: "rounded-lg border border-brand p-2",
144
+ onKeyDown: (b) => {
145
+ b.key === "Escape" && (b.preventDefault(), b.stopPropagation(), c(null));
146
+ },
147
+ children: [
148
+ /* @__PURE__ */ e(
149
+ Y,
150
+ {
151
+ value: r,
152
+ onChange: c,
153
+ onSave: () => {
154
+ $(r) && (i(t, r), c(null));
155
+ },
156
+ disabled: !1,
157
+ saving: !1,
158
+ author: n.getAuthor(),
159
+ placeholder: d("chat.composerPlaceholder"),
160
+ hideSend: !0,
161
+ hideChrome: !0
162
+ }
163
+ ),
164
+ /* @__PURE__ */ a("div", { className: "mt-2 flex justify-end gap-3", children: [
165
+ /* @__PURE__ */ e(k, { type: "button", size: "sm", variant: "outline", onClick: () => c(null), children: d("chat.cancel") }),
166
+ /* @__PURE__ */ e(
167
+ k,
168
+ {
169
+ type: "button",
170
+ size: "sm",
171
+ disabled: !$(r),
172
+ onClick: () => {
173
+ i(t, r), c(null);
174
+ },
175
+ children: d("chat.update")
176
+ }
177
+ )
178
+ ] })
179
+ ]
180
+ }
181
+ ) : /* @__PURE__ */ a("div", { className: w("iv-chat-bubble flex flex-col", ge(t.priority)), children: [
182
+ t.priority ? /* @__PURE__ */ a("p", { className: "mb-2 flex items-center gap-1.5 text-sm font-medium text-content", children: [
183
+ /* @__PURE__ */ e(Pe, { priority: t.priority }),
184
+ Te(t.priority, d)
185
+ ] }) : null,
186
+ t.replyTo ? /* @__PURE__ */ a("blockquote", { className: "iv-chat-quote", children: [
187
+ /* @__PURE__ */ e("p", { className: "iv-chat-quote-author", children: `“ ${q}` }),
188
+ /* @__PURE__ */ e("p", { className: "iv-chat-quote-text line-clamp-3", children: ee(t.replyTo.text) })
189
+ ] }) : null,
190
+ l,
191
+ t.attachments && t.attachments.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-2 flex flex-wrap gap-1.5", children: t.attachments.map((b) => /* @__PURE__ */ e("li", { className: "max-w-full", children: b.kind === "image" ? /* @__PURE__ */ e("img", { src: b.url, alt: b.name, className: "max-h-40 max-w-full rounded-md" }) : /* @__PURE__ */ e(
192
+ "a",
193
+ {
194
+ href: b.url,
195
+ className: "inline-flex rounded-md border border-stroke-hairline bg-canvas px-2 py-1 text-xs text-brand",
196
+ children: b.name
197
+ }
198
+ ) }, b.id)) }) : null,
199
+ /* @__PURE__ */ a("time", { className: "iv-chat-stamp", dateTime: t.updatedAt ?? t.createdAt, children: [
200
+ j,
201
+ R ? ` · ${d("chat.edited")}` : ""
202
+ ] })
203
+ ] }),
204
+ !v && !t.parentId && r == null ? /* @__PURE__ */ a("div", { className: w("mt-1 flex flex-wrap items-center gap-2", M && "justify-end"), children: [
205
+ L(n, "create", g) ? /* @__PURE__ */ a(
206
+ k,
207
+ {
208
+ type: "button",
209
+ size: "sm",
210
+ variant: "ghost",
211
+ className: "h-7 gap-1 px-1 text-sm font-medium text-brand",
212
+ onClick: () => p(t),
213
+ children: [
214
+ /* @__PURE__ */ e(_e, {}),
215
+ d("chat.reply")
216
+ ]
217
+ }
218
+ ) : null,
219
+ S.map((b) => /* @__PURE__ */ e(
220
+ k,
221
+ {
222
+ type: "button",
223
+ size: "sm",
224
+ variant: "outline",
225
+ className: "h-8 text-xs",
226
+ disabled: b.disabled,
227
+ onClick: () => b.onSelect(x),
228
+ children: b.label
229
+ },
230
+ b.id
231
+ )),
232
+ (t.replyCount ?? 0) > 0 ? /* @__PURE__ */ e(
233
+ k,
234
+ {
235
+ type: "button",
236
+ size: "sm",
237
+ variant: "ghost",
238
+ className: "h-7 px-2 text-xs",
239
+ "data-iv-chat-open-thread": "",
240
+ onClick: () => C(t),
241
+ children: d("chat.replies", { count: t.replyCount ?? 0 })
242
+ }
243
+ ) : null,
244
+ /* @__PURE__ */ e(
245
+ k,
246
+ {
247
+ type: "button",
248
+ size: "iconSm",
249
+ variant: "ghost",
250
+ "aria-pressed": t.pinned ? !0 : void 0,
251
+ "aria-label": t.pinned ? d("chat.unpin") : d("chat.pin"),
252
+ "data-iv-chat-pin": "",
253
+ onClick: () => A(t, !t.pinned),
254
+ children: /* @__PURE__ */ e(X, { className: w("size-4", t.pinned && "text-brand") })
255
+ }
256
+ ),
257
+ P && !t.deleted ? /* @__PURE__ */ e(
258
+ ze,
259
+ {
260
+ variant: "row",
261
+ value: t.priority,
262
+ onChange: (b) => P(t, b)
263
+ }
264
+ ) : null,
265
+ n.renderMessageActions ? n.renderMessageActions({ items: H, context: x }) : /* @__PURE__ */ e(De, { label: d("chat.messageActions"), items: H })
266
+ ] }) : null
267
+ ] })
268
+ ] })
269
+ ]
270
+ }
271
+ );
272
+ }
273
+ function rt({
274
+ conversation: t,
275
+ rowId: s,
276
+ searchOpen: m,
277
+ search: o,
278
+ drawer: n,
279
+ onToggleSearch: f,
280
+ onSearchChange: T,
281
+ onOpenPinned: h,
282
+ threadActions: v
283
+ }) {
284
+ const { t: p, dateLocale: C } = _(), A = t ? Ce(t).slice(0, 3) : [], i = t?.createdAt ?? t?.messages[0]?.createdAt;
285
+ return /* @__PURE__ */ a("div", { className: "flex h-16 shrink-0 items-start justify-between gap-2 border-b border-stroke-hairline p-4", children: [
286
+ /* @__PURE__ */ a("div", { className: "min-w-0", children: [
287
+ /* @__PURE__ */ e("p", { className: "truncate text-base font-extrabold leading-6 text-content", children: t?.title ?? p("chat.emptyThreadTitle") }),
288
+ s ? /* @__PURE__ */ a("p", { className: "truncate text-sm font-bold leading-[21px] text-content-tertiary", children: [
289
+ p("chat.rowIdLabel", { rowId: s }),
290
+ t?.createdBy && i ? ` | ${p("chat.createdBy", { author: t.createdBy, time: V(i, C) })}` : null
291
+ ] }) : null
292
+ ] }),
293
+ /* @__PURE__ */ a("div", { className: "flex shrink-0 items-center gap-1", children: [
294
+ m ? /* @__PURE__ */ e(
295
+ J,
296
+ {
297
+ value: o,
298
+ autoFocus: !0,
299
+ className: "h-8 w-40",
300
+ placeholder: p("chat.searchMessages"),
301
+ "aria-label": p("chat.searchMessages"),
302
+ onChange: (u) => T(u.target.value)
303
+ }
304
+ ) : null,
305
+ /* @__PURE__ */ e(k, { type: "button", size: "iconSm", variant: "ghost", "aria-pressed": m || void 0, "aria-label": p("chat.searchMessages"), onClick: f, children: /* @__PURE__ */ e(he, { className: "size-4" }) }),
306
+ /* @__PURE__ */ a(
307
+ k,
308
+ {
309
+ type: "button",
310
+ size: "sm",
311
+ variant: "ghost",
312
+ className: "h-8 gap-1 px-1",
313
+ "aria-pressed": n?.kind === "pinned" || void 0,
314
+ "aria-label": p("chat.pinned"),
315
+ "data-iv-chat-open-pinned": "",
316
+ onClick: h,
317
+ children: [
318
+ /* @__PURE__ */ e(X, { className: "size-4" }),
319
+ A.length > 0 ? /* @__PURE__ */ e("span", { className: "flex -space-x-2", "data-iv-chat-participants": "", children: A.map((u) => /* @__PURE__ */ e(B, { author: u.name, member: u }, u.id)) }) : /* @__PURE__ */ e(pe, { className: "size-4", "data-iv-chat-add-user": "" })
320
+ ]
321
+ }
322
+ ),
323
+ v
324
+ ] })
325
+ ] });
326
+ }
327
+ function it({
328
+ drawer: t,
329
+ messages: s,
330
+ locale: m,
331
+ loading: o,
332
+ draft: n,
333
+ saving: f,
334
+ selfName: T,
335
+ members: h,
336
+ rowId: v,
337
+ conversationId: p,
338
+ config: C,
339
+ onAddMembers: A,
340
+ onRemoveMember: i,
341
+ onDraftChange: u,
342
+ onSave: P,
343
+ onClose: y,
344
+ onSelect: d,
345
+ toolContext: r
346
+ }) {
347
+ const { t: c } = _(), x = t.kind === "pinned", g = L(C, "create", { rowId: v, conversationId: p }), M = h ?? [];
348
+ return /* @__PURE__ */ e(
349
+ "aside",
350
+ {
351
+ "data-iv-chat-drawer": t.kind,
352
+ className: "flex h-full min-w-0 flex-1 flex-col border-l border-stroke-hairline bg-canvas",
353
+ style: { minWidth: be },
354
+ children: x ? /* @__PURE__ */ e(
355
+ Ie,
356
+ {
357
+ messages: s,
358
+ locale: m,
359
+ loading: o,
360
+ selfName: T,
361
+ members: M,
362
+ rowId: v,
363
+ conversationId: p,
364
+ config: C,
365
+ onAddMembers: A,
366
+ onRemoveMember: i,
367
+ onClose: y,
368
+ onSelect: d
369
+ }
370
+ ) : /* @__PURE__ */ a(Q, { children: [
371
+ /* @__PURE__ */ a("div", { className: "flex h-16 shrink-0 items-center justify-between border-b border-stroke-hairline px-3", children: [
372
+ /* @__PURE__ */ e("h2", { className: "truncate text-base font-extrabold text-content", children: c("chat.thread") }),
373
+ /* @__PURE__ */ e(k, { type: "button", size: "sm", variant: "ghost", "data-iv-chat-close-drawer": "", onClick: y, children: c("chat.closeThread") })
374
+ ] }),
375
+ /* @__PURE__ */ a("div", { className: "min-h-0 flex-1 overflow-auto p-3", children: [
376
+ o ? /* @__PURE__ */ e("p", { className: "text-sm text-content-secondary", children: c("chat.loading") }) : null,
377
+ !o && s.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-sm text-content-tertiary", children: c("chat.emptyThreadDescription") }) : null,
378
+ t.kind === "thread" ? /* @__PURE__ */ a("div", { className: "mb-4 rounded-lg bg-canvas-subtle p-2", children: [
379
+ /* @__PURE__ */ e("p", { className: "text-xs font-semibold text-content", children: t.parent.author }),
380
+ /* @__PURE__ */ e("p", { className: "line-clamp-3 text-sm text-content", children: t.parent.deleted ? c("chat.deleted") : t.parent.text })
381
+ ] }) : null,
382
+ s.map((N) => /* @__PURE__ */ a(
383
+ "button",
384
+ {
385
+ type: "button",
386
+ "data-iv-chat-drawer-item": "",
387
+ className: "mb-3 flex w-full gap-2 rounded-lg p-2 text-left hover:bg-canvas-subtle",
388
+ onClick: () => d(N.id),
389
+ children: [
390
+ /* @__PURE__ */ e(
391
+ B,
392
+ {
393
+ author: N.author,
394
+ member: W(M, N.author),
395
+ render: C.renderAvatar
396
+ }
397
+ ),
398
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
399
+ /* @__PURE__ */ a("span", { className: "flex items-center justify-between gap-2", children: [
400
+ /* @__PURE__ */ e("span", { className: "truncate text-sm font-semibold text-content", children: N.author }),
401
+ /* @__PURE__ */ e("span", { className: "shrink-0 text-[11px] text-content-tertiary", children: V(N.createdAt, m) })
402
+ ] }),
403
+ /* @__PURE__ */ e("span", { className: "mt-1 line-clamp-3 text-sm text-content", children: N.deleted ? c("chat.deleted") : N.text })
404
+ ] })
405
+ ]
406
+ },
407
+ N.id
408
+ ))
409
+ ] }),
410
+ g ? /* @__PURE__ */ e("div", { className: "shrink-0 border-t border-stroke-hairline px-3 py-2", children: /* @__PURE__ */ e(
411
+ Y,
412
+ {
413
+ value: n,
414
+ onChange: u,
415
+ onSave: P,
416
+ disabled: f,
417
+ saving: f,
418
+ author: "",
419
+ placeholder: c("chat.threadComposerPlaceholder"),
420
+ render: C.renderComposer,
421
+ tools: C.composerTools,
422
+ toolContext: r
423
+ }
424
+ ) }) : null
425
+ ] })
426
+ }
427
+ );
428
+ }
429
+ function K(t, s) {
430
+ return t === "split" ? "split" : t === s ? "expanded" : "collapsed";
431
+ }
432
+ function U(t) {
433
+ return t === "expanded" ? "rotate-90" : t === "split" ? "rotate-45" : "rotate-0";
434
+ }
435
+ function Ie({
436
+ messages: t,
437
+ locale: s,
438
+ loading: m,
439
+ selfName: o,
440
+ members: n,
441
+ rowId: f,
442
+ conversationId: T,
443
+ config: h,
444
+ onAddMembers: v,
445
+ onRemoveMember: p,
446
+ onClose: C,
447
+ onSelect: A
448
+ }) {
449
+ const { t: i } = _(), [u, P] = z(!1), [y, d] = z("split"), [r, c] = z(G), x = y !== "members", g = y !== "pinned", M = K(y, "pinned"), N = K(y, "members"), D = { rowId: f, conversationId: T }, H = !!v && L(h, "invite", D), I = (l) => !!p && L(h, "remove-member", { ...D, member: l }), E = n.slice(0, r), R = n.length - E.length, S = () => P(!1), j = u && h.listPeople && v ? h.renderPeoplePicker ? h.renderPeoplePicker({
450
+ members: n,
451
+ listPeople: h.listPeople,
452
+ onAdd: (l) => {
453
+ v(l), S();
454
+ },
455
+ onCancel: S
456
+ }) : /* @__PURE__ */ e(
457
+ Ee,
458
+ {
459
+ members: n,
460
+ listPeople: h.listPeople,
461
+ renderAvatar: h.renderAvatar,
462
+ onAddMembers: (l) => {
463
+ v(l), S();
464
+ }
465
+ }
466
+ ) : null, q = {
467
+ members: n,
468
+ canInvite: H,
469
+ canRemoveMember: I,
470
+ onInvite: () => P(!0),
471
+ onRemove: (l) => p?.(l)
472
+ };
473
+ return /* @__PURE__ */ a(Q, { children: [
474
+ /* @__PURE__ */ a("div", { className: "flex h-16 shrink-0 items-center justify-between border-b border-stroke-hairline px-3", children: [
475
+ /* @__PURE__ */ e("h2", { className: "truncate text-base font-extrabold text-content", children: i(u ? "chat.addMember" : "chat.info") }),
476
+ /* @__PURE__ */ e(
477
+ k,
478
+ {
479
+ type: "button",
480
+ size: "sm",
481
+ variant: "ghost",
482
+ "data-iv-chat-close-drawer": "",
483
+ onClick: u ? S : C,
484
+ children: i(u ? "chat.cancel" : "chat.closePinned")
485
+ }
486
+ )
487
+ ] }),
488
+ j ?? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", "data-iv-chat-section": y, children: [
489
+ /* @__PURE__ */ a(
490
+ "section",
491
+ {
492
+ "data-iv-chat-pinned-section": "",
493
+ className: w("flex min-h-0 flex-col border-b border-stroke-hairline", x ? "flex-1" : "shrink-0"),
494
+ children: [
495
+ /* @__PURE__ */ a(
496
+ "button",
497
+ {
498
+ type: "button",
499
+ className: "flex h-10 w-full shrink-0 items-center gap-2 px-3 text-left",
500
+ "aria-expanded": x,
501
+ "aria-label": i(y === "pinned" ? "chat.collapsePinned" : "chat.expandPinned"),
502
+ "data-iv-chat-expand-pinned": "",
503
+ "data-iv-chat-chevron": M,
504
+ onClick: () => d((l) => l === "pinned" ? "split" : "pinned"),
505
+ children: [
506
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-sm font-extrabold text-content", children: i("chat.pinnedMessages") }),
507
+ /* @__PURE__ */ e(
508
+ F,
509
+ {
510
+ className: w("size-4 shrink-0 text-content-tertiary transition-transform", U(M))
511
+ }
512
+ )
513
+ ]
514
+ }
515
+ ),
516
+ x ? /* @__PURE__ */ a("div", { className: "min-h-0 flex-1 overflow-auto px-3 pb-2", children: [
517
+ m ? /* @__PURE__ */ e("p", { className: "text-sm text-content-secondary", children: i("chat.loading") }) : null,
518
+ !m && t.length === 0 ? /* @__PURE__ */ e("p", { className: "py-4 text-sm text-content-tertiary", children: i("chat.noPinned") }) : null,
519
+ t.map((l) => /* @__PURE__ */ a(
520
+ "button",
521
+ {
522
+ type: "button",
523
+ "data-iv-chat-drawer-item": "",
524
+ className: "mb-3 flex w-full gap-2 rounded-lg bg-canvas-subtle p-3 text-left",
525
+ onClick: () => A(l.id),
526
+ children: [
527
+ /* @__PURE__ */ e(
528
+ B,
529
+ {
530
+ author: l.author,
531
+ member: W(n, l.author),
532
+ shape: "circle",
533
+ render: h.renderAvatar
534
+ }
535
+ ),
536
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
537
+ /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
538
+ /* @__PURE__ */ e("span", { className: "truncate text-sm font-bold text-content", children: l.author === o ? i("chat.me") : l.author }),
539
+ /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-content-tertiary", children: V(l.createdAt, s) })
540
+ ] }),
541
+ /* @__PURE__ */ e("span", { className: "mt-1 line-clamp-1 text-sm text-content", children: l.deleted ? i("chat.deleted") : ee(l.text) })
542
+ ] })
543
+ ]
544
+ },
545
+ l.id
546
+ ))
547
+ ] }) : null
548
+ ]
549
+ }
550
+ ),
551
+ /* @__PURE__ */ a("section", { "data-iv-chat-members": "", className: w("flex min-h-0 flex-col", g ? "flex-1" : "shrink-0"), children: [
552
+ /* @__PURE__ */ a(
553
+ "button",
554
+ {
555
+ type: "button",
556
+ className: "flex h-10 w-full shrink-0 items-center gap-2 px-3 text-left",
557
+ "aria-expanded": g,
558
+ "aria-label": i(y === "members" ? "chat.collapseMembers" : "chat.expandMembers"),
559
+ "data-iv-chat-expand-members": "",
560
+ "data-iv-chat-chevron": N,
561
+ onClick: () => d((l) => l === "members" ? "split" : "members"),
562
+ children: [
563
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-sm font-extrabold text-content", children: i("chat.members") }),
564
+ /* @__PURE__ */ e(
565
+ re,
566
+ {
567
+ color: "primary",
568
+ shape: "circle",
569
+ size: "md",
570
+ variant: "subtle",
571
+ "data-iv-chat-member-count": "",
572
+ children: n.length
573
+ }
574
+ ),
575
+ /* @__PURE__ */ e(
576
+ F,
577
+ {
578
+ className: w("size-4 shrink-0 text-content-tertiary transition-transform", U(N))
579
+ }
580
+ )
581
+ ]
582
+ }
583
+ ),
584
+ g ? h.renderMembers ? /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-auto px-3 pb-5 pt-2", children: h.renderMembers(q) }) : /* @__PURE__ */ a("ul", { className: "min-h-0 flex-1 overflow-auto px-3 pb-5 pt-2", children: [
585
+ H ? /* @__PURE__ */ e("li", { className: "mb-1", children: /* @__PURE__ */ a(
586
+ "button",
587
+ {
588
+ type: "button",
589
+ className: w(Z, "text-sm font-medium text-content"),
590
+ "data-iv-chat-add-member": "",
591
+ onClick: () => P(!0),
592
+ children: [
593
+ /* @__PURE__ */ e("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-canvas-subtle", children: /* @__PURE__ */ e(me, { className: "size-4" }) }),
594
+ i("chat.addMember")
595
+ ]
596
+ }
597
+ ) }) : null,
598
+ E.map((l) => /* @__PURE__ */ a("li", { className: Z, "data-iv-chat-member": l.id, children: [
599
+ /* @__PURE__ */ e(B, { author: l.name, member: l, shape: "circle", render: h.renderAvatar }),
600
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-content", children: l.name }),
601
+ I(l) ? /* @__PURE__ */ e(
602
+ k,
603
+ {
604
+ type: "button",
605
+ size: "iconSm",
606
+ variant: "ghost",
607
+ "aria-label": i("chat.removeMember", { name: l.name }),
608
+ "data-iv-chat-remove-member": l.id,
609
+ onClick: () => p?.(l),
610
+ children: /* @__PURE__ */ e(ue, { className: "size-4" })
611
+ }
612
+ ) : null
613
+ ] }, l.id)),
614
+ R > 0 ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
615
+ "button",
616
+ {
617
+ type: "button",
618
+ className: "mt-1 w-full py-2 text-sm font-medium text-brand",
619
+ "data-iv-chat-more-members": "",
620
+ onClick: () => c((l) => l + G),
621
+ children: i("chat.showMoreMembers", { count: R })
622
+ }
623
+ ) }) : null
624
+ ] }) : null
625
+ ] })
626
+ ] })
627
+ ] });
628
+ }
629
+ function Ee({
630
+ members: t,
631
+ listPeople: s,
632
+ renderAvatar: m,
633
+ onAddMembers: o
634
+ }) {
635
+ const { t: n } = _(), [f, T] = z(""), [h, v] = z([]), [p, C] = z(!0), [A, i] = z(!1), [u, P] = z([]);
636
+ te(() => {
637
+ let r = !1;
638
+ const c = window.setTimeout(() => {
639
+ C(!0), i(!1), Promise.resolve(s({ query: f, limit: O + t.length })).then((x) => {
640
+ r || (v(x), C(!1));
641
+ }).catch(() => {
642
+ r || (v([]), i(!0), C(!1));
643
+ });
644
+ }, 200);
645
+ return () => {
646
+ r = !0, window.clearTimeout(c);
647
+ };
648
+ }, [s, t.length, f]);
649
+ const y = Me(h, { members: t, query: f, limit: O }), d = (r) => {
650
+ P(
651
+ (c) => c.some((x) => x.id === r.id) ? c.filter((x) => x.id !== r.id) : [...c, r]
652
+ );
653
+ };
654
+ return /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col", "data-iv-chat-people": "", children: [
655
+ /* @__PURE__ */ e("div", { className: "shrink-0 px-3 pt-3", children: /* @__PURE__ */ e(
656
+ J,
657
+ {
658
+ value: f,
659
+ autoFocus: !0,
660
+ className: "h-8",
661
+ placeholder: n("chat.searchPeople"),
662
+ "aria-label": n("chat.searchPeople"),
663
+ "data-iv-chat-people-search": "",
664
+ onChange: (r) => T(r.target.value)
665
+ }
666
+ ) }),
667
+ /* @__PURE__ */ a("ul", { className: "min-h-0 flex-1 overflow-auto px-3 py-2", children: [
668
+ p ? /* @__PURE__ */ e("p", { className: "py-4 text-sm text-content-secondary", children: n("chat.loading") }) : null,
669
+ !p && A ? /* @__PURE__ */ e("p", { className: "py-4 text-sm text-content-secondary", children: n("chat.loadError") }) : null,
670
+ !p && !A && y.length === 0 ? /* @__PURE__ */ e("p", { className: "py-4 text-sm text-content-tertiary", children: n("chat.noPeople") }) : null,
671
+ y.map((r) => {
672
+ const c = u.some((x) => x.id === r.id);
673
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
674
+ "button",
675
+ {
676
+ type: "button",
677
+ "data-iv-chat-person": r.id,
678
+ "aria-pressed": c || void 0,
679
+ className: w(Z, "text-sm font-semibold text-content"),
680
+ onClick: () => d(r),
681
+ children: [
682
+ /* @__PURE__ */ e(B, { author: r.name, member: r, shape: "circle", render: m }),
683
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-content", children: r.name }),
684
+ c ? /* @__PURE__ */ e(xe, { className: "size-4 text-brand" }) : null
685
+ ]
686
+ }
687
+ ) }, r.id);
688
+ })
689
+ ] }),
690
+ /* @__PURE__ */ e("div", { className: "shrink-0 border-t border-stroke-hairline px-3 pb-5 pt-3", children: /* @__PURE__ */ e(
691
+ k,
692
+ {
693
+ type: "button",
694
+ className: "w-full",
695
+ disabled: u.length === 0,
696
+ "data-iv-chat-add-selected": "",
697
+ onClick: () => o(u),
698
+ children: n("chat.addSelected")
699
+ }
700
+ ) })
701
+ ] });
702
+ }
703
+ export {
704
+ De as ChatActionsMenu,
705
+ B as ChatAvatar,
706
+ Y as ChatComposer,
707
+ at as ChatListGlyph,
708
+ lt as ChatMessageRow,
709
+ nt as ChatMuteGlyph,
710
+ st as ChatSendIcon,
711
+ it as ChatSideDrawer,
712
+ rt as ChatThreadToolbar
713
+ };