stream-chat-react 14.0.0-beta.8 → 14.0.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 (36) hide show
  1. package/dist/cjs/{WithAudioPlayback.58b0b39b.js → WithAudioPlayback.d26afa91.js} +1009 -985
  2. package/dist/cjs/WithAudioPlayback.d26afa91.js.map +1 -0
  3. package/dist/cjs/emojis.js +1 -1
  4. package/dist/cjs/index.js +584 -442
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/css/index.css +76 -25
  7. package/dist/css/index.css.map +1 -1
  8. package/dist/es/{WithAudioPlayback.2ffdc4c5.mjs → WithAudioPlayback.9b779236.mjs} +1195 -1171
  9. package/dist/es/WithAudioPlayback.9b779236.mjs.map +1 -0
  10. package/dist/es/emojis.mjs +1 -1
  11. package/dist/es/index.mjs +636 -494
  12. package/dist/es/index.mjs.map +1 -1
  13. package/dist/types/components/Attachment/Audio.d.ts.map +1 -1
  14. package/dist/types/components/Attachment/FileAttachment.d.ts.map +1 -1
  15. package/dist/types/components/Attachment/components/DownloadButton.d.ts +12 -3
  16. package/dist/types/components/Attachment/components/DownloadButton.d.ts.map +1 -1
  17. package/dist/types/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.d.ts.map +1 -1
  18. package/dist/types/components/Dialog/components/ContextMenu.d.ts.map +1 -1
  19. package/dist/types/components/FileIcon/FileIcon.d.ts +1 -3
  20. package/dist/types/components/FileIcon/FileIcon.d.ts.map +1 -1
  21. package/dist/types/components/FileIcon/FileIconSet.d.ts +10 -10
  22. package/dist/types/components/FileIcon/FileIconSet.d.ts.map +1 -1
  23. package/dist/types/components/Icons/icons.d.ts +4 -0
  24. package/dist/types/components/Icons/icons.d.ts.map +1 -1
  25. package/dist/types/components/Message/utils.d.ts +1 -0
  26. package/dist/types/components/Message/utils.d.ts.map +1 -1
  27. package/dist/types/components/MessageActions/MessageActions.d.ts.map +1 -1
  28. package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
  29. package/dist/types/components/MessageActions/downloadUtils.d.ts +25 -0
  30. package/dist/types/components/MessageActions/downloadUtils.d.ts.map +1 -0
  31. package/dist/types/components/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts.map +1 -1
  32. package/dist/types/i18n/Streami18n.d.ts +3 -4
  33. package/dist/types/i18n/Streami18n.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/cjs/WithAudioPlayback.58b0b39b.js.map +0 -1
  36. package/dist/es/WithAudioPlayback.2ffdc4c5.mjs.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -5,11 +5,11 @@ const clsx = require("clsx");
5
5
  const nanoid = require("nanoid");
6
6
  const React = require("react");
7
7
  const audioProcessing = require("./audioProcessing.56e5db9d.js");
8
- const WithAudioPlayback = require("./WithAudioPlayback.58b0b39b.js");
8
+ const WithAudioPlayback = require("./WithAudioPlayback.d26afa91.js");
9
9
  const streamChat = require("stream-chat");
10
+ const sanitizeUrl = require("@braintree/sanitize-url");
10
11
  const throttle = require("lodash.throttle");
11
12
  const linkify = require("linkifyjs");
12
- const sanitizeUrl = require("@braintree/sanitize-url");
13
13
  const ReactPlayer = require("react-player");
14
14
  const focus = require("@react-aria/focus");
15
15
  const reactDom = require("react-dom");
@@ -671,53 +671,38 @@ const AIStateIndicator = ({
671
671
  };
672
672
  return aiState in allowedStates ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__ai-state-indicator-container", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "str-chat__ai-state-indicator-text", children: allowedStates[aiState] }) }) : null;
673
673
  };
674
- const DownloadIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
675
- "svg",
676
- {
677
- className,
678
- "data-testid": "download",
679
- fill: "none",
680
- height: "24",
681
- viewBox: "0 0 24 24",
682
- width: "24",
683
- xmlns: "http://www.w3.org/2000/svg",
684
- children: /* @__PURE__ */ jsxRuntime.jsx(
685
- "path",
686
- {
687
- d: "M19.35 10.04C18.67 6.59 15.64 4 12 4C9.11 4 6.6 5.64 5.35 8.04C2.34 8.36 0 10.91 0 14C0 17.31 2.69 20 6 20H19C21.76 20 24 17.76 24 15C24 12.36 21.95 10.22 19.35 10.04ZM19 18H6C3.79 18 2 16.21 2 14C2 11.95 3.53 10.24 5.56 10.03L6.63 9.92L7.13 8.97C8.08 7.14 9.94 6 12 6C14.62 6 16.88 7.86 17.39 10.43L17.69 11.93L19.22 12.04C20.78 12.14 22 13.45 22 15C22 16.65 20.65 18 19 18ZM13.45 10H10.55V13H8L12 17L16 13H13.45V10Z",
688
- fill: "black"
689
- }
690
- )
691
- }
692
- );
693
- const ExternalLinkIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.586 2H10a1 1 0 1 1 0-2h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V3.414l-6.793 6.793a1 1 0 0 1-1.414-1.414L12.586 2zM6 1a1 1 0 1 1 0 2H3a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h8.967a1 1 0 0 0 1-.99L13 9.99a1 1 0 1 1 2 .02l-.033 3.023a3 3 0 0 1-3 2.967H3a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h3z" }) });
694
- const UnMemoizedSafeAnchor = (props) => {
695
- const { children, className, download, href, rel, target } = props;
674
+ const DownloadButton = ({
675
+ assetUrl,
676
+ className,
677
+ suggestedFileName,
678
+ tooltipTitle
679
+ }) => {
680
+ const { t } = WithAudioPlayback.useTranslationContext();
681
+ if (!assetUrl) return null;
682
+ const href = sanitizeUrl.sanitizeUrl(assetUrl);
696
683
  if (!href) return null;
697
- const sanitized = sanitizeUrl.sanitizeUrl(href);
698
684
  return /* @__PURE__ */ jsxRuntime.jsx(
699
685
  "a",
700
686
  {
701
- className,
702
- download,
703
- href: sanitized,
704
- rel,
705
- target,
706
- children
687
+ "aria-label": t("aria/Download attachment"),
688
+ className: clsx(
689
+ "str-chat__button",
690
+ "str-chat__button--secondary",
691
+ "str-chat__button--outline",
692
+ "str-chat__button--circular",
693
+ "str-chat__button--size-sm",
694
+ "str-chat__audio-attachment-download-button",
695
+ className
696
+ ),
697
+ download: suggestedFileName ?? "",
698
+ href,
699
+ rel: "noopener noreferrer",
700
+ target: "_blank",
701
+ title: tooltipTitle ?? t("Download Attachment"),
702
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__button__content", children: /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconDownload, { className: "str-chat__icon str-chat__audio-attachment-download-button__icon" }) })
707
703
  }
708
704
  );
709
705
  };
710
- const SafeAnchor = React.memo(UnMemoizedSafeAnchor);
711
- const DownloadButton = ({ assetUrl }) => /* @__PURE__ */ jsxRuntime.jsx(
712
- SafeAnchor,
713
- {
714
- className: "str-chat__message-attachment-file--item-download",
715
- download: true,
716
- href: assetUrl,
717
- target: "_blank",
718
- children: /* @__PURE__ */ jsxRuntime.jsx(DownloadIcon, { className: "str-chat__message-attachment-download-icon" })
719
- }
720
- );
721
706
  function prettifyFileSize(bytes, precision = 3) {
722
707
  const units = ["B", "kB", "MB", "GB"];
723
708
  const exponent = bytes === 0 ? 0 : Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
@@ -790,7 +775,7 @@ const Delete$b = "Löschen";
790
775
  const Delivered$b = "Zugestellt";
791
776
  const Edited$b = "Bearbeitet";
792
777
  const End$b = "Beenden";
793
- const File$b = "Datei";
778
+ const File$c = "Datei";
794
779
  const fileCount_one$9 = "1 datei";
795
780
  const fileCount_other$b = "{{ count }} dateien";
796
781
  const Flag$b = "Melden";
@@ -986,6 +971,8 @@ const deTranslations = {
986
971
  Delivered: Delivered$b,
987
972
  "Direct message": "Direktnachricht",
988
973
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Möchten Sie diese Umfrage jetzt beenden? Niemand wird mehr in dieser Umfrage abstimmen können.",
974
+ "Download All": "Alle herunterladen",
975
+ "Download Attachment": "Anhang herunterladen",
989
976
  "Download attachment {{ name }}": "Anhang {{ name }} herunterladen",
990
977
  "Drag your files here": "Ziehen Sie Ihre Dateien hierher",
991
978
  "Drag your files here to add to your post": "Ziehen Sie Ihre Dateien hierher, um sie Ihrem Beitrag hinzuzufügen",
@@ -1035,7 +1022,7 @@ const deTranslations = {
1035
1022
  "Failed to update channel archive status": "Archivierungsstatus des Kanals konnte nicht aktualisiert werden",
1036
1023
  "Failed to update channel mute status": "Stummschaltungsstatus des Kanals konnte nicht aktualisiert werden",
1037
1024
  "Failed to update channel pinned status": "Anheftstatus des Kanals konnte nicht aktualisiert werden",
1038
- File: File$b,
1025
+ File: File$c,
1039
1026
  "File is required for upload attachment": "Datei ist für den Anhang-Upload erforderlich",
1040
1027
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Datei ist zu groß: {{ size }}, maximale Upload-Größe beträgt {{ limit }}",
1041
1028
  "File too large": "Datei ist zu groß",
@@ -1325,7 +1312,7 @@ const Delete$a = "Delete";
1325
1312
  const Delivered$a = "Delivered";
1326
1313
  const Edited$a = "Edited";
1327
1314
  const End$a = "End";
1328
- const File$a = "File";
1315
+ const File$b = "File";
1329
1316
  const fileCount_one$8 = "File";
1330
1317
  const fileCount_other$a = "{{ count }} files";
1331
1318
  const Flag$a = "Flag";
@@ -1521,6 +1508,8 @@ const enTranslations = {
1521
1508
  Delivered: Delivered$a,
1522
1509
  "Direct message": "Direct message",
1523
1510
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.",
1511
+ "Download All": "Download All",
1512
+ "Download Attachment": "Download Attachment",
1524
1513
  "Download attachment {{ name }}": "Download attachment {{ name }}",
1525
1514
  "Drag your files here": "Drag your files here",
1526
1515
  "Drag your files here to add to your post": "Drag your files here to add to your post",
@@ -1570,7 +1559,7 @@ const enTranslations = {
1570
1559
  "Failed to update channel archive status": "Failed to update channel archive status",
1571
1560
  "Failed to update channel mute status": "Failed to update channel mute status",
1572
1561
  "Failed to update channel pinned status": "Failed to update channel pinned status",
1573
- File: File$a,
1562
+ File: File$b,
1574
1563
  "File is required for upload attachment": "File is required for upload attachment",
1575
1564
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "File is too large: {{ size }}, maximum upload size is {{ limit }}",
1576
1565
  "File too large": "File too large",
@@ -1860,7 +1849,7 @@ const Delete$9 = "Borrar";
1860
1849
  const Delivered$9 = "Entregado";
1861
1850
  const Edited$9 = "Editado";
1862
1851
  const End$9 = "Final";
1863
- const File$9 = "Archivo";
1852
+ const File$a = "Archivo";
1864
1853
  const fileCount_one$7 = "1 archivo";
1865
1854
  const fileCount_many$4 = "{{ count }} archivos";
1866
1855
  const fileCount_other$9 = "{{ count }} archivos";
@@ -2072,6 +2061,8 @@ const esTranslations = {
2072
2061
  Delivered: Delivered$9,
2073
2062
  "Direct message": "Mensaje directo",
2074
2063
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "¿Quieres terminar esta encuesta ahora? Nadie podrá votar más en esta encuesta.",
2064
+ "Download All": "Descargar todo",
2065
+ "Download Attachment": "Descargar archivo adjunto",
2075
2066
  "Download attachment {{ name }}": "Descargar adjunto {{ name }}",
2076
2067
  "Drag your files here": "Arrastra tus archivos aquí",
2077
2068
  "Drag your files here to add to your post": "Arrastra tus archivos aquí para agregarlos a tu publicación",
@@ -2121,7 +2112,7 @@ const esTranslations = {
2121
2112
  "Failed to update channel archive status": "No se pudo actualizar el estado de archivo del canal",
2122
2113
  "Failed to update channel mute status": "No se pudo actualizar el estado de silencio del canal",
2123
2114
  "Failed to update channel pinned status": "No se pudo actualizar el estado de fijación del canal",
2124
- File: File$9,
2115
+ File: File$a,
2125
2116
  "File is required for upload attachment": "Se requiere un archivo para subir el adjunto",
2126
2117
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "El archivo es demasiado grande: {{ size }}, el tamaño máximo de carga es de {{ limit }}",
2127
2118
  "File too large": "Archivo demasiado grande",
@@ -2422,7 +2413,7 @@ const Delete$8 = "Supprimer";
2422
2413
  const Delivered$8 = "Publié";
2423
2414
  const Edited$8 = "Modifié";
2424
2415
  const End$8 = "Fin";
2425
- const File$8 = "Fichier";
2416
+ const File$9 = "Fichier";
2426
2417
  const fileCount_one$6 = "1 fichier";
2427
2418
  const fileCount_many$3 = "{{ count }} fichiers";
2428
2419
  const fileCount_other$8 = "{{ count }} fichiers";
@@ -2634,6 +2625,8 @@ const frTranslations = {
2634
2625
  Delivered: Delivered$8,
2635
2626
  "Direct message": "Message direct",
2636
2627
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Voulez-vous terminer ce sondage maintenant ? Personne ne pourra plus voter dans ce sondage.",
2628
+ "Download All": "Tout télécharger",
2629
+ "Download Attachment": "Télécharger la pièce jointe",
2637
2630
  "Download attachment {{ name }}": "Télécharger la pièce jointe {{ name }}",
2638
2631
  "Drag your files here": "Glissez vos fichiers ici",
2639
2632
  "Drag your files here to add to your post": "Glissez vos fichiers ici pour les ajouter à votre publication",
@@ -2683,7 +2676,7 @@ const frTranslations = {
2683
2676
  "Failed to update channel archive status": "Impossible de mettre à jour l'état d'archivage du canal",
2684
2677
  "Failed to update channel mute status": "Impossible de mettre à jour l'état de la mise en sourdine du canal",
2685
2678
  "Failed to update channel pinned status": "Impossible de mettre à jour l'état d'épinglage du canal",
2686
- File: File$8,
2679
+ File: File$9,
2687
2680
  "File is required for upload attachment": "Un fichier est requis pour joindre une pièce",
2688
2681
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Le fichier est trop volumineux : {{ size }}, la taille maximale de téléchargement est de {{ limit }}",
2689
2682
  "File too large": "Fichier trop volumineux",
@@ -2984,7 +2977,7 @@ const Delete$7 = "डिलीट";
2984
2977
  const Delivered$7 = "पहुंच गया";
2985
2978
  const Edited$7 = "संपादित";
2986
2979
  const End$7 = "समाप्त";
2987
- const File$7 = "फ़ाइल";
2980
+ const File$8 = "फ़ाइल";
2988
2981
  const fileCount_one$5 = "1 फ़ाइल";
2989
2982
  const fileCount_other$7 = "{{ count }} फ़ाइलें";
2990
2983
  const Flag$7 = "फ्लैग करे";
@@ -3180,6 +3173,8 @@ const hiTranslations = {
3180
3173
  Delivered: Delivered$7,
3181
3174
  "Direct message": "प्रत्यक्ष संदेश",
3182
3175
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "क्या आप अभी इस पोल को समाप्त करना चाहते हैं? इस पोल में अब कोई भी वोट नहीं कर पाएगा।",
3176
+ "Download All": "सब डाउनलोड करें",
3177
+ "Download Attachment": "अटैचमेंट डाउनलोड करें",
3183
3178
  "Download attachment {{ name }}": "अनुलग्नक {{ name }} डाउनलोड करें",
3184
3179
  "Drag your files here": "अपनी फ़ाइलें यहाँ खींचें",
3185
3180
  "Drag your files here to add to your post": "अपनी फ़ाइलें यहाँ खींचें और अपने पोस्ट में जोड़ने के लिए",
@@ -3230,7 +3225,7 @@ const hiTranslations = {
3230
3225
  "Failed to update channel archive status": "चैनल के आर्काइव स्थिति को अपडेट करने में विफल",
3231
3226
  "Failed to update channel mute status": "चैनल की म्यूट स्थिति को अपडेट करने में विफल",
3232
3227
  "Failed to update channel pinned status": "चैनल की पिन स्थिति को अपडेट करने में विफल",
3233
- File: File$7,
3228
+ File: File$8,
3234
3229
  "File is required for upload attachment": "अटैचमेंट अपलोड के लिए फ़ाइल आवश्यक है",
3235
3230
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "फ़ाइल बहुत बड़ी है: {{ size }}, अधिकतम अपलोड साइज़ {{ limit }} है",
3236
3231
  "File too large": "फ़ाइल बहुत बड़ी है",
@@ -3520,7 +3515,7 @@ const Delete$6 = "Elimina";
3520
3515
  const Delivered$6 = "Consegnato";
3521
3516
  const Edited$6 = "Modificato";
3522
3517
  const End$6 = "Fine";
3523
- const File$6 = "File";
3518
+ const File$7 = "File";
3524
3519
  const fileCount_one$4 = "1 file";
3525
3520
  const fileCount_many$2 = "{{ count }} file";
3526
3521
  const fileCount_other$6 = "{{ count }} file";
@@ -3732,6 +3727,8 @@ const itTranslations = {
3732
3727
  Delivered: Delivered$6,
3733
3728
  "Direct message": "Messaggio diretto",
3734
3729
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Vuoi terminare questo sondaggio ora? Nessuno potrà più votare in questo sondaggio.",
3730
+ "Download All": "Scarica tutto",
3731
+ "Download Attachment": "Scarica allegato",
3735
3732
  "Download attachment {{ name }}": "Scarica l'allegato {{ name }}",
3736
3733
  "Drag your files here": "Trascina i tuoi file qui",
3737
3734
  "Drag your files here to add to your post": "Trascina i tuoi file qui per aggiungerli al tuo post",
@@ -3781,7 +3778,7 @@ const itTranslations = {
3781
3778
  "Failed to update channel archive status": "Impossibile aggiornare lo stato di archiviazione del canale",
3782
3779
  "Failed to update channel mute status": "Impossibile aggiornare lo stato di silenziamento del canale",
3783
3780
  "Failed to update channel pinned status": "Impossibile aggiornare lo stato di blocco del canale",
3784
- File: File$6,
3781
+ File: File$7,
3785
3782
  "File is required for upload attachment": "È richiesto un file per caricare l'allegato",
3786
3783
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Il file è troppo grande: {{ size }}, la dimensione massima di caricamento è {{ limit }}",
3787
3784
  "File too large": "File troppo grande",
@@ -4082,7 +4079,7 @@ const Delete$5 = "消去";
4082
4079
  const Delivered$5 = "配信しました";
4083
4080
  const Edited$5 = "編集済み";
4084
4081
  const End$5 = "終了";
4085
- const File$5 = "ファイル";
4082
+ const File$6 = "ファイル";
4086
4083
  const fileCount_other$5 = "{{ count }}件のファイル";
4087
4084
  const Flag$5 = "フラグ";
4088
4085
  const Image$6 = "画像";
@@ -4271,6 +4268,8 @@ const jaTranslations = {
4271
4268
  Delivered: Delivered$5,
4272
4269
  "Direct message": "ダイレクトメッセージ",
4273
4270
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "このアンケートを今終了しますか?終了すると、誰も投票できなくなります。",
4271
+ "Download All": "すべてダウンロード",
4272
+ "Download Attachment": "添付ファイルをダウンロード",
4274
4273
  "Download attachment {{ name }}": "添付ファイル {{ name }} をダウンロード",
4275
4274
  "Drag your files here": "ここにファイルをドラッグ",
4276
4275
  "Drag your files here to add to your post": "投稿に追加するためにここにファイルをドラッグ",
@@ -4320,7 +4319,7 @@ const jaTranslations = {
4320
4319
  "Failed to update channel archive status": "チャンネルのアーカイブ状態の更新に失敗しました",
4321
4320
  "Failed to update channel mute status": "チャンネルのミュート状態の更新に失敗しました",
4322
4321
  "Failed to update channel pinned status": "チャンネルのピン状態の更新に失敗しました",
4323
- File: File$5,
4322
+ File: File$6,
4324
4323
  "File is required for upload attachment": "添付ファイルのアップロードにはファイルが必要です",
4325
4324
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "ファイルが大きすぎます:{{ size }}、最大アップロードサイズは{{ limit }}です",
4326
4325
  "File too large": "ファイルが大きすぎます",
@@ -4603,7 +4602,7 @@ const Delete$4 = "삭제";
4603
4602
  const Delivered$4 = "배달됨";
4604
4603
  const Edited$4 = "편집됨";
4605
4604
  const End$4 = "종료";
4606
- const File$4 = "파일";
4605
+ const File$5 = "파일";
4607
4606
  const fileCount_other$4 = "파일 {{ count }}개";
4608
4607
  const Flag$4 = "플래그";
4609
4608
  const Image$5 = "이미지";
@@ -4792,6 +4791,8 @@ const koTranslations = {
4792
4791
  Delivered: Delivered$4,
4793
4792
  "Direct message": "다이렉트 메시지",
4794
4793
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "지금 이 투표를 종료하시겠습니까? 종료 후에는 더 이상 투표할 수 없습니다.",
4794
+ "Download All": "모두 다운로드",
4795
+ "Download Attachment": "첨부 파일 다운로드",
4795
4796
  "Download attachment {{ name }}": "첨부 파일 {{ name }} 다운로드",
4796
4797
  "Drag your files here": "여기로 파일을 끌어다 놓으세요",
4797
4798
  "Drag your files here to add to your post": "게시물에 추가하려면 파일을 여기로 끌어다 놓으세요",
@@ -4841,7 +4842,7 @@ const koTranslations = {
4841
4842
  "Failed to update channel archive status": "채널 아카이브 상태 업데이트에 실패했습니다",
4842
4843
  "Failed to update channel mute status": "채널 음소거 상태 업데이트에 실패했습니다",
4843
4844
  "Failed to update channel pinned status": "채널 고정 상태 업데이트에 실패했습니다",
4844
- File: File$4,
4845
+ File: File$5,
4845
4846
  "File is required for upload attachment": "첨부 파일 업로드에 파일이 필요합니다",
4846
4847
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "파일이 너무 큽니다: {{ size }}, 최대 업로드 크기는 {{ limit }}입니다",
4847
4848
  "File too large": "파일이 너무 큽니다",
@@ -5124,7 +5125,7 @@ const Delete$3 = "Verwijder";
5124
5125
  const Delivered$3 = "Afgeleverd";
5125
5126
  const Edited$3 = "Bewerkt";
5126
5127
  const End$3 = "Einde";
5127
- const File$3 = "Bestand";
5128
+ const File$4 = "Bestand";
5128
5129
  const fileCount_one$3 = "1 bestand";
5129
5130
  const fileCount_other$3 = "{{ count }} bestanden";
5130
5131
  const Flag$3 = "Markeer";
@@ -5320,6 +5321,8 @@ const nlTranslations = {
5320
5321
  Delivered: Delivered$3,
5321
5322
  "Direct message": "Direct bericht",
5322
5323
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Wil je deze peiling nu beëindigen? Niemand kan daarna meer op deze peiling stemmen.",
5324
+ "Download All": "Alles downloaden",
5325
+ "Download Attachment": "Bijlage downloaden",
5323
5326
  "Download attachment {{ name }}": "Bijlage {{ name }} downloaden",
5324
5327
  "Drag your files here": "Sleep je bestanden hier naartoe",
5325
5328
  "Drag your files here to add to your post": "Sleep je bestanden hier naartoe om aan je bericht toe te voegen",
@@ -5369,7 +5372,7 @@ const nlTranslations = {
5369
5372
  "Failed to update channel archive status": "Archiefstatus van kanaal kon niet worden bijgewerkt",
5370
5373
  "Failed to update channel mute status": "Muteerstatus van kanaal kon niet worden bijgewerkt",
5371
5374
  "Failed to update channel pinned status": "Vastgezette status van kanaal kon niet worden bijgewerkt",
5372
- File: File$3,
5375
+ File: File$4,
5373
5376
  "File is required for upload attachment": "Bestand is vereist voor het uploaden van een bijlage",
5374
5377
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Bestand is te groot: {{ size }}, maximale uploadgrootte is {{ limit }}",
5375
5378
  "File too large": "Bestand is te groot",
@@ -5661,7 +5664,7 @@ const Delete$2 = "Excluir";
5661
5664
  const Delivered$2 = "Entregue";
5662
5665
  const Edited$2 = "Editada";
5663
5666
  const End$2 = "Fim";
5664
- const File$2 = "Arquivo";
5667
+ const File$3 = "Arquivo";
5665
5668
  const fileCount_one$2 = "1 arquivo";
5666
5669
  const fileCount_many$1 = "{{ count }} arquivos";
5667
5670
  const fileCount_other$2 = "{{ count }} arquivos";
@@ -5873,6 +5876,8 @@ const ptTranslations = {
5873
5876
  Delivered: Delivered$2,
5874
5877
  "Direct message": "Mensagem direta",
5875
5878
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Deseja encerrar esta enquete agora? Ninguém poderá mais votar nesta enquete.",
5879
+ "Download All": "Baixar tudo",
5880
+ "Download Attachment": "Baixar anexo",
5876
5881
  "Download attachment {{ name }}": "Baixar anexo {{ name }}",
5877
5882
  "Drag your files here": "Arraste seus arquivos aqui",
5878
5883
  "Drag your files here to add to your post": "Arraste seus arquivos aqui para adicionar ao seu post",
@@ -5922,7 +5927,7 @@ const ptTranslations = {
5922
5927
  "Failed to update channel archive status": "Falha ao atualizar o status de arquivamento do canal",
5923
5928
  "Failed to update channel mute status": "Falha ao atualizar o status de mudo do canal",
5924
5929
  "Failed to update channel pinned status": "Falha ao atualizar o status de fixação do canal",
5925
- File: File$2,
5930
+ File: File$3,
5926
5931
  "File is required for upload attachment": "Arquivo é necessário para enviar o anexo",
5927
5932
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "O arquivo é muito grande: {{ size }}, o tamanho máximo de upload é {{ limit }}",
5928
5933
  "File too large": "Arquivo muito grande",
@@ -6223,7 +6228,7 @@ const Delete$1 = "Удалить";
6223
6228
  const Delivered$1 = "Отправлено";
6224
6229
  const Edited$1 = "Отредактировано";
6225
6230
  const End$1 = "Конец";
6226
- const File$1 = "Файл";
6231
+ const File$2 = "Файл";
6227
6232
  const fileCount_four = "{{ count }} файла";
6228
6233
  const fileCount_one$1 = "{{ count }} файл";
6229
6234
  const fileCount_few = "{{ count }} файла";
@@ -6455,6 +6460,8 @@ const ruTranslations = {
6455
6460
  Delivered: Delivered$1,
6456
6461
  "Direct message": "Личное сообщение",
6457
6462
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Вы хотите завершить этот опрос сейчас? После этого никто не сможет голосовать в этом опросе.",
6463
+ "Download All": "Скачать всё",
6464
+ "Download Attachment": "Скачать вложение",
6458
6465
  "Download attachment {{ name }}": "Скачать вложение {{ name }}",
6459
6466
  "Drag your files here": "Перетащите ваши файлы сюда",
6460
6467
  "Drag your files here to add to your post": "Перетащите ваши файлы сюда, чтобы добавить их в ваш пост",
@@ -6504,7 +6511,7 @@ const ruTranslations = {
6504
6511
  "Failed to update channel archive status": "Не удалось обновить статус архивации канала",
6505
6512
  "Failed to update channel mute status": "Не удалось обновить статус отключения звука канала",
6506
6513
  "Failed to update channel pinned status": "Не удалось обновить статус закрепления канала",
6507
- File: File$1,
6514
+ File: File$2,
6508
6515
  "File is required for upload attachment": "Для загрузки вложения требуется файл",
6509
6516
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Файл слишком большой: {{ size }}, максимальный размер загрузки составляет {{ limit }}",
6510
6517
  "File too large": "Файл слишком большой",
@@ -6819,7 +6826,7 @@ const Delete = "Sil";
6819
6826
  const Delivered = "İletildi";
6820
6827
  const Edited = "Düzenlendi";
6821
6828
  const End = "Son";
6822
- const File = "Dosya";
6829
+ const File$1 = "Dosya";
6823
6830
  const fileCount_one = "1 dosya";
6824
6831
  const fileCount_other = "{{ count }} dosya";
6825
6832
  const Flag = "Bayrak";
@@ -7015,6 +7022,8 @@ const trTranslations = {
7015
7022
  Delivered,
7016
7023
  "Direct message": "Doğrudan mesaj",
7017
7024
  "Do you want to end this poll now? Nobody will be able to vote in this poll anymore.": "Bu anketi şimdi sonlandırmak istiyor musunuz? Sonlandırdıktan sonra bu ankette kimse oy kullanamayacak.",
7025
+ "Download All": "Tümünü indir",
7026
+ "Download Attachment": "Eki indir",
7018
7027
  "Download attachment {{ name }}": "Ek {{ name }}'i indir",
7019
7028
  "Drag your files here": "Dosyalarınızı buraya sürükleyin",
7020
7029
  "Drag your files here to add to your post": "Gönderinize eklemek için dosyalarınızı buraya sürükleyin",
@@ -7064,7 +7073,7 @@ const trTranslations = {
7064
7073
  "Failed to update channel archive status": "Kanalın arşiv durumu güncellenemedi",
7065
7074
  "Failed to update channel mute status": "Kanalın sessiz durumu güncellenemedi",
7066
7075
  "Failed to update channel pinned status": "Kanalın sabitleme durumu güncellenemedi",
7067
- File,
7076
+ File: File$1,
7068
7077
  "File is required for upload attachment": "Ek yüklemek için dosya gerekli",
7069
7078
  "File is too large: {{ size }}, maximum upload size is {{ limit }}": "Dosya çok büyük: {{ size }}, maksimum yükleme boyutu {{ limit }}",
7070
7079
  "File too large": "Dosya çok büyük",
@@ -9911,9 +9920,11 @@ function ContextMenuContent({
9911
9920
  [ItemsWrapper]
9912
9921
  );
9913
9922
  const returnToParentMenu = React.useCallback(() => {
9914
- if (menuStack.length <= 1) return;
9915
- setMenuStack((current) => current.slice(0, current.length - 1));
9916
- }, [menuStack.length]);
9923
+ setMenuStack((current) => {
9924
+ if (current.length <= 1) return current;
9925
+ return current.slice(0, -1);
9926
+ });
9927
+ }, []);
9917
9928
  React.useEffect(() => {
9918
9929
  setMenuStack((current) => {
9919
9930
  if (current.length === 1 && current[0] === rootLevel) return current;
@@ -10402,7 +10413,9 @@ const useBaseMessageActionSetFilter = (messageActionSet, disable = false) => {
10402
10413
  if (message.error) {
10403
10414
  return type === "resendMessage" && canSendMessage && (allowRetry || isBounced) || type === "edit" && (isBounced && canEdit || hasNetworkSendFailure) || type === "delete" && !messageIsDeleted && (isBounced && canDelete || hasNetworkSendFailure);
10404
10415
  }
10405
- if (type === "resendMessage" || type === "blockUser" && !canBlockUser || type === "copyMessageText" && !message.text || type === "delete" && (!canDelete || messageIsDeleted) || type === "edit" && !canEdit || type === "flag" && !canFlag || type === "markUnread" && !canMarkUnread || type === "mute" && !canMute || type === "quote" && !canQuote || type === "react" && !canReact || type === "reply" && !canReply || type === "remindMe" && !channelConfig?.["user_message_reminders"] || type === "saveForLater" && !channelConfig?.["user_message_reminders"])
10416
+ if (type === "resendMessage" || type === "blockUser" && !canBlockUser || type === "copyMessageText" && !message.text || type === "download" && !message.attachments?.some(
10417
+ (attachment) => streamChat.isFileAttachment(attachment) || streamChat.isImageAttachment(attachment) || streamChat.isVideoAttachment(attachment) || streamChat.isAudioAttachment(attachment) || streamChat.isVoiceRecordingAttachment(attachment)
10418
+ ) || type === "delete" && (!canDelete || messageIsDeleted) || type === "edit" && !canEdit || type === "flag" && !canFlag || type === "markUnread" && !canMarkUnread || type === "mute" && !canMute || type === "quote" && !canQuote || type === "react" && !canReact || type === "reply" && !canReply || type === "remindMe" && !channelConfig?.["user_message_reminders"] || type === "saveForLater" && !channelConfig?.["user_message_reminders"])
10406
10419
  return false;
10407
10420
  return true;
10408
10421
  });
@@ -10424,6 +10437,7 @@ const useBaseMessageActionSetFilter = (messageActionSet, disable = false) => {
10424
10437
  messageIsDeleted,
10425
10438
  isMessageThreadReply,
10426
10439
  message.error,
10440
+ message.attachments,
10427
10441
  message.status,
10428
10442
  message.text,
10429
10443
  message.type,
@@ -12323,13 +12337,14 @@ const BASE_FILE_ICON_CLASSNAME = "str-chat__file-icon";
12323
12337
  const FILE_ICON_GRAPHIC_CLASSNAME = "str-chat__file-icon__graphic";
12324
12338
  const FILE_ICON_NO_LABEL_CLASSNAME = "str-chat__file-icon--no-label";
12325
12339
  const FILE_ICON_SIZE_CONFIG = {
12326
- lg: { height: 48, labelX: 16, labelY: 36, width: 40 },
12327
- md: { height: 40, labelX: 16, labelY: 35, width: 32 },
12328
- sm: { height: 24, labelX: 16, labelY: 31.5, width: 19 }
12340
+ lg: { height: 40, labelX: 16, labelY: 36, width: 32 },
12341
+ md: { height: 32, labelX: 16, labelY: 35, width: 26 },
12342
+ sm: { height: 24, labelX: 16, labelY: 31.5, width: 19 },
12343
+ xl: { height: 48, labelX: 16, labelY: 36, width: 40 }
12329
12344
  };
12330
12345
  const mergeFileIconSizeConfig = (overrides) => {
12331
12346
  if (!overrides) return FILE_ICON_SIZE_CONFIG;
12332
- return ["sm", "md", "lg"].reduce(
12347
+ return ["sm", "md", "lg", "xl"].reduce(
12333
12348
  (acc, size) => ({
12334
12349
  ...acc,
12335
12350
  [size]: { ...FILE_ICON_SIZE_CONFIG[size], ...overrides[size] }
@@ -12337,16 +12352,24 @@ const mergeFileIconSizeConfig = (overrides) => {
12337
12352
  {}
12338
12353
  );
12339
12354
  };
12340
- const VIEWBOX_WIDTH = 32;
12341
- const VIEWBOX_HEIGHT = 40;
12355
+ const FILE_ICON_VIEWBOX = { height: 40, width: 32 };
12356
+ const FILE_ICON_PAPER_PATH = "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z";
12357
+ const FILE_ICON_FOLD_PATH = "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z";
12358
+ const FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X = 32 / 26;
12359
+ const FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y = 40 / 32;
12342
12360
  const Svg = ({ className, size, sizeConfig, ...props }) => {
12343
12361
  const config = sizeConfig ?? FILE_ICON_SIZE_CONFIG;
12344
12362
  const dimensions = size ? config[size] : void 0;
12363
+ const dimensionsStyle = dimensions ? {
12364
+ flexShrink: 0,
12365
+ height: `${dimensions.height}px`,
12366
+ width: `${dimensions.width}px`
12367
+ } : void 0;
12345
12368
  return /* @__PURE__ */ jsxRuntime.jsx(
12346
12369
  "svg",
12347
12370
  {
12348
12371
  height: dimensions?.height,
12349
- viewBox: `0 0 ${VIEWBOX_WIDTH} ${VIEWBOX_HEIGHT}`,
12372
+ viewBox: `0 0 ${FILE_ICON_VIEWBOX.width} ${FILE_ICON_VIEWBOX.height}`,
12350
12373
  width: dimensions?.width,
12351
12374
  xmlns: "http://www.w3.org/2000/svg",
12352
12375
  ...props,
@@ -12354,7 +12377,8 @@ const Svg = ({ className, size, sizeConfig, ...props }) => {
12354
12377
  BASE_FILE_ICON_CLASSNAME,
12355
12378
  { [`${BASE_FILE_ICON_CLASSNAME}--size-${size}`]: size },
12356
12379
  className
12357
- )
12380
+ ),
12381
+ style: { ...dimensionsStyle, ...props.style }
12358
12382
  }
12359
12383
  );
12360
12384
  };
@@ -12363,397 +12387,343 @@ const FileIconLabel = ({ label, size, sizeConfig }) => {
12363
12387
  const config = size ? configMap[size] : { labelX: 16, labelY: 33 };
12364
12388
  return /* @__PURE__ */ jsxRuntime.jsx("text", { className: "str-chat__file-icon__label", x: config.labelX, y: config.labelY, children: label });
12365
12389
  };
12366
- const FilePdfIcon = ({
12390
+ const TEXT_SYMBOLS = {
12391
+ withCaption: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12392
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "12.2" }),
12393
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "20.2" }),
12394
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "9.6", x: "8", y: "16.2" })
12395
+ ] }),
12396
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12397
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.4", rx: "0.7", width: "12.6", x: "6", y: "14.8" }),
12398
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.4", rx: "0.7", width: "12.6", x: "6", y: "21.8" }),
12399
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.4", rx: "0.7", width: "8.4", x: "6", y: "18.3" })
12400
+ ] })
12401
+ };
12402
+ const OTHER_SYMBOLS = {
12403
+ withCaption: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12404
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "13.2" }),
12405
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "21.2" }),
12406
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "9.6", x: "8", y: "17.2" })
12407
+ ] }),
12408
+ withoutCaption: TEXT_SYMBOLS.withoutCaption
12409
+ };
12410
+ const CODE_SYMBOLS = {
12411
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12412
+ "path",
12413
+ {
12414
+ d: "M14.5 22.5L17.5 11.5M20.1666 14.1667L21.9732 16.0862C22.4564 16.5996 22.4564 17.4004 21.9732 17.9138L20.1666 19.8333M11.8333 19.8333L10.0267 17.9138C9.54351 17.4004 9.54351 16.5996 10.0267 16.0862L11.8333 14.1667",
12415
+ stroke: "white",
12416
+ strokeLinecap: "round",
12417
+ strokeLinejoin: "round",
12418
+ strokeWidth: "1.2"
12419
+ }
12420
+ ),
12421
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12422
+ "path",
12423
+ {
12424
+ d: "M11.6876 23.8125L14.3126 14.1875M16.646 16.5208L18.2267 18.2004C18.6495 18.6496 18.6495 19.3503 18.2267 19.7996L16.646 21.4792M9.3543 21.4792L7.77352 19.7996C7.35072 19.3503 7.35072 18.6496 7.77352 18.2004L9.3543 16.5208",
12425
+ stroke: "white",
12426
+ strokeLinecap: "round",
12427
+ strokeLinejoin: "round",
12428
+ strokeWidth: "1.33333"
12429
+ }
12430
+ )
12431
+ };
12432
+ const AUDIO_SYMBOLS = {
12433
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12434
+ "path",
12435
+ {
12436
+ d: "M20.5 15.5V18.5M22.5 14.5V19.5M13.5 19.5H10.5C10.3674 19.5 10.2402 19.4473 10.1464 19.3536C10.0527 19.2598 10 19.1326 10 19V15C10 14.8674 10.0527 14.7402 10.1464 14.6464C10.2402 14.5527 10.3674 14.5 10.5 14.5H13.5L18 11V23L13.5 19.5Z",
12437
+ stroke: "white",
12438
+ strokeLinecap: "round",
12439
+ strokeLinejoin: "round",
12440
+ strokeWidth: "1.2"
12441
+ }
12442
+ ),
12443
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12444
+ "path",
12445
+ {
12446
+ d: "M17.5 17.5V20.5M19.5 16.5V21.5M10.5 21.5H7.5C7.36739 21.5 7.24021 21.4473 7.14645 21.3536C7.05268 21.2598 7 21.1326 7 21V17C7 16.8674 7.05268 16.7402 7.14645 16.6464C7.24021 16.5527 7.36739 16.5 7.5 16.5H10.5L15 13V25L10.5 21.5Z",
12447
+ stroke: "white",
12448
+ strokeLinecap: "round",
12449
+ strokeLinejoin: "round",
12450
+ strokeWidth: "1.33333"
12451
+ }
12452
+ )
12453
+ };
12454
+ const PRESENTATION_SYMBOLS = {
12455
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12456
+ "path",
12457
+ {
12458
+ d: "M12.5 15.5H19.5M16 17.5V22.5M14 22.5H18M9.49999 17.5C9.41472 17.5001 9.33085 17.4783 9.25635 17.4368C9.18185 17.3953 9.1192 17.3355 9.07436 17.263C9.02952 17.1904 9.00397 17.1076 9.00014 17.0224C8.99631 16.9373 9.01433 16.8525 9.05249 16.7762L11.5525 11.7763C11.5941 11.6932 11.6579 11.6233 11.737 11.5745C11.816 11.5257 11.9071 11.4999 12 11.5H20C20.0929 11.4999 20.184 11.5257 20.263 11.5745C20.342 11.6233 20.4059 11.6932 20.4475 11.7763L22.9475 16.7762C22.9857 16.8525 23.0037 16.9373 22.9998 17.0224C22.996 17.1076 22.9705 17.1904 22.9256 17.263C22.8808 17.3355 22.8181 17.3953 22.7436 17.4368C22.6691 17.4783 22.5853 17.5001 22.5 17.5H9.49999Z",
12459
+ stroke: "white",
12460
+ strokeLinecap: "round",
12461
+ strokeLinejoin: "round",
12462
+ strokeWidth: "1.2"
12463
+ }
12464
+ ),
12465
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12466
+ "path",
12467
+ {
12468
+ d: "M9.49999 17.5H16.5M13 19.5V24.5M11 24.5H15M6.49999 19.5C6.41472 19.5001 6.33085 19.4783 6.25635 19.4368C6.18185 19.3953 6.11921 19.3355 6.07436 19.263C6.02952 19.1904 6.00397 19.1076 6.00014 19.0224C5.99631 18.9373 6.01433 18.8525 6.05249 18.7763L8.55249 13.7763C8.59406 13.6932 8.65795 13.6233 8.73699 13.5745C8.81603 13.5257 8.9071 13.4999 8.99999 13.5H17C17.0929 13.4999 17.184 13.5257 17.263 13.5745C17.342 13.6233 17.4059 13.6932 17.4475 13.7763L19.9475 18.7763C19.9857 18.8525 20.0037 18.9373 19.9998 19.0224C19.996 19.1076 19.9705 19.1904 19.9256 19.263C19.8808 19.3355 19.8181 19.3953 19.7436 19.4368C19.6691 19.4783 19.5853 19.5001 19.5 19.5H6.49999Z",
12469
+ stroke: "white",
12470
+ strokeLinecap: "round",
12471
+ strokeLinejoin: "round",
12472
+ strokeWidth: "1.33333"
12473
+ }
12474
+ )
12475
+ };
12476
+ const SPREADSHEET_SYMBOLS = {
12477
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12478
+ "path",
12479
+ {
12480
+ d: "M10 15.5H22M10 18.5H22M13.5 15.5V21.5M10 12.5H22V21C22 21.1326 21.9473 21.2598 21.8536 21.3536C21.7598 21.4473 21.6326 21.5 21.5 21.5H10.5C10.3674 21.5 10.2402 21.4473 10.1464 21.3536C10.0527 21.2598 10 21.1326 10 21V12.5Z",
12481
+ stroke: "white",
12482
+ strokeLinecap: "round",
12483
+ strokeLinejoin: "round",
12484
+ strokeWidth: "1.5"
12485
+ }
12486
+ ),
12487
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12488
+ "path",
12489
+ {
12490
+ d: "M7 17.5H19M7 20.5H19M10.5 17.5V23.5M7 14.5H19V23C19 23.1326 18.9473 23.2598 18.8536 23.3536C18.7598 23.4473 18.6326 23.5 18.5 23.5H7.5C7.36739 23.5 7.24021 23.4473 7.14645 23.3536C7.05268 23.2598 7 23.1326 7 23V14.5Z",
12491
+ stroke: "white",
12492
+ strokeLinecap: "round",
12493
+ strokeLinejoin: "round",
12494
+ strokeWidth: "1.2"
12495
+ }
12496
+ )
12497
+ };
12498
+ const COMPRESSION_SYMBOLS = {
12499
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12500
+ "path",
12501
+ {
12502
+ clipRule: "evenodd",
12503
+ d: "M9.41177 0H7.52942V2H9.41177V4H7.52942V6H9.41177V8H7.52942V10H9.41177V12H7.52942V14H9.41177V12H11.2941V10H9.41177V8H11.2941V6H9.41177V4H11.2941V2H9.41177V0ZM7.52942 17C7.52942 16.4477 7.9508 16 8.4706 16H10.3529C10.8727 16 11.2941 16.4477 11.2941 17V23C11.2941 23.5523 10.8727 24 10.3529 24H8.4706C7.9508 24 7.52942 23.5523 7.52942 23V17ZM8.4706 23V20H10.3529V23H8.4706Z",
12504
+ fill: "white",
12505
+ fillRule: "evenodd"
12506
+ }
12507
+ ),
12508
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12509
+ "path",
12510
+ {
12511
+ clipRule: "evenodd",
12512
+ d: "M8.17031 0H6.11768V2.14737H8.17031V4.29474H6.11768V6.4421H8.17031V8.58947H6.11768V10.7368H8.17031V12.8842H6.11768V15.0316H8.17031V12.8842H10.2229V10.7368H8.17031V8.58947H10.2229V6.4421H8.17031V4.29474H10.2229V2.14737H8.17031V0ZM6.11768 18.2526C6.11768 17.6597 6.57717 17.1789 7.14399 17.1789H9.19662C9.76344 17.1789 10.2229 17.6597 10.2229 18.2526V24.6947C10.2229 25.2877 9.76344 25.7684 9.19662 25.7684H7.14399C6.57717 25.7684 6.11768 25.2877 6.11768 24.6947V18.2526ZM7.14399 24.6947V21.4737H9.19662V24.6947H7.14399Z",
12513
+ fill: "white",
12514
+ fillRule: "evenodd"
12515
+ }
12516
+ )
12517
+ };
12518
+ const VIDEO_SYMBOLS = {
12519
+ withCaption: /* @__PURE__ */ jsxRuntime.jsx(
12520
+ "path",
12521
+ {
12522
+ d: "M20.5 16L23.5 14V20L20.5 18M10 13H20C20.2761 13 20.5 13.2239 20.5 13.5V20.5C20.5 20.7761 20.2761 21 20 21H10C9.72386 21 9.5 20.7761 9.5 20.5V13.5C9.5 13.2239 9.72386 13 10 13Z",
12523
+ stroke: "white",
12524
+ strokeLinecap: "round",
12525
+ strokeLinejoin: "round",
12526
+ strokeWidth: "1.2"
12527
+ }
12528
+ ),
12529
+ withoutCaption: /* @__PURE__ */ jsxRuntime.jsx(
12530
+ "path",
12531
+ {
12532
+ d: "M17.5001 18L20.5001 16V22L17.5001 20M7.00012 15H17.0001C17.2763 15 17.5001 15.2239 17.5001 15.5V22.5C17.5001 22.7761 17.2763 23 17.0001 23H7.00012C6.72398 23 6.50012 22.7761 6.50012 22.5V15.5C6.50012 15.2239 6.72398 15 7.00012 15Z",
12533
+ stroke: "white",
12534
+ strokeLinecap: "round",
12535
+ strokeLinejoin: "round",
12536
+ strokeWidth: "1.33333"
12537
+ }
12538
+ )
12539
+ };
12540
+ const StandardFileTypeIcon = ({
12367
12541
  className,
12542
+ color,
12543
+ fileTypeClassName,
12544
+ label,
12545
+ size,
12546
+ sizeConfig,
12547
+ symbols,
12368
12548
  ...props
12369
- }) => /* @__PURE__ */ jsxRuntime.jsx(
12370
- Svg,
12549
+ }) => {
12550
+ const renderLabel = !!label;
12551
+ const resolvedLabel = renderLabel ? label : void 0;
12552
+ const symbolVariant = renderLabel ? "withCaption" : "withoutCaption";
12553
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12554
+ Svg,
12555
+ {
12556
+ ...props,
12557
+ className: clsx(fileTypeClassName, className),
12558
+ size,
12559
+ sizeConfig,
12560
+ children: [
12561
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12562
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: FILE_ICON_PAPER_PATH, fill: color }),
12563
+ renderLabel ? symbols[symbolVariant] : /* @__PURE__ */ jsxRuntime.jsx(
12564
+ "g",
12565
+ {
12566
+ transform: `scale(${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X} ${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y})`,
12567
+ children: symbols[symbolVariant]
12568
+ }
12569
+ ),
12570
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: FILE_ICON_FOLD_PATH, fill: "white", opacity: "0.5" })
12571
+ ] }),
12572
+ resolvedLabel && /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label: resolvedLabel, size, sizeConfig })
12573
+ ]
12574
+ }
12575
+ );
12576
+ };
12577
+ const PDF_SMALL_SYMBOL = /* @__PURE__ */ jsxRuntime.jsx(
12578
+ "path",
12371
12579
  {
12372
- ...props,
12373
- className: clsx("str-chat__file-icon--pdf", FILE_ICON_NO_LABEL_CLASSNAME, className),
12374
- children: /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12375
- /* @__PURE__ */ jsxRuntime.jsx(
12376
- "path",
12377
- {
12378
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12379
- fill: "#E71A01"
12380
- }
12381
- ),
12382
- /* @__PURE__ */ jsxRuntime.jsx(
12383
- "path",
12384
- {
12385
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12386
- fill: "white",
12387
- opacity: "0.5"
12388
- }
12389
- ),
12390
- /* @__PURE__ */ jsxRuntime.jsx("g", { clipPath: "url(#clip0_1008_7871)", children: /* @__PURE__ */ jsxRuntime.jsx(
12391
- "path",
12392
- {
12393
- d: "M23.7533 19.2C23.28 18.7033 22.3093 18.42 20.9373 18.42C20.204 18.42 19.3526 18.4906 18.43 18.656C17.8647 18.1124 17.3499 17.5186 16.892 16.882C16.5373 16.4086 16.2293 15.8886 15.9453 15.3913C16.49 13.7353 16.75 12.3866 16.75 11.4166C16.75 10.3286 16.348 9.19263 15.1886 9.19263C14.834 9.19263 14.4786 9.40596 14.2893 9.71329C13.7693 10.636 14.006 12.6466 14.9046 14.634C14.5664 15.6502 14.1877 16.6526 13.7693 17.6386C13.3906 18.538 12.9646 19.4606 12.4913 20.312C9.88931 21.3533 8.20931 22.56 8.01998 23.5053C7.94931 23.8606 8.06731 24.192 8.32798 24.452C8.42265 24.5233 8.75398 24.8073 9.32131 24.8073C11.048 24.8073 12.87 22.0153 13.7926 20.336C14.5026 20.0993 15.2126 19.8626 15.922 19.6733C16.6704 19.4701 17.4284 19.3043 18.1933 19.1766C20.0146 20.8086 21.6233 21.0693 22.428 21.0693C23.4213 21.0693 23.7766 20.6666 23.8946 20.336C24.108 19.9093 23.966 19.4366 23.7533 19.2ZM22.8066 19.8866C22.7353 20.2413 22.38 20.478 21.884 20.478C21.742 20.478 21.624 20.454 21.4813 20.4306C20.5826 20.2173 19.7306 19.768 18.8793 19.058C19.5357 18.947 20.2003 18.8917 20.866 18.8926C21.3633 18.8926 21.7893 18.916 22.0726 18.9873C22.404 19.058 22.9246 19.2713 22.806 19.886L22.8066 19.8866ZM17.7906 18.7746C17.1305 18.8983 16.4755 19.0482 15.8273 19.224C15.262 19.3709 14.7017 19.5366 14.1473 19.7206C14.4355 19.1625 14.7039 18.5944 14.952 18.0173C15.236 17.3546 15.472 16.6686 15.7093 16.03C15.9453 16.432 16.206 16.8346 16.466 17.1893C16.8911 17.7313 17.3329 18.26 17.7906 18.7746ZM14.692 9.97329C14.7338 9.88949 14.7978 9.81875 14.877 9.7688C14.9563 9.71884 15.0477 9.69157 15.1413 9.68996C15.638 9.68996 15.7326 10.2573 15.7326 10.7073C15.7326 11.464 15.496 12.6233 15.094 13.948C14.4073 12.1026 14.3606 10.5653 14.692 9.97329ZM12.0893 20.998C10.8826 22.9853 9.72331 24.2153 9.01398 24.2153C8.88599 24.2161 8.76132 24.1746 8.65931 24.0973C8.51731 23.9553 8.44598 23.79 8.49331 23.6006C8.63531 22.8906 10.0073 21.8973 12.0893 20.998Z",
12394
- fill: "white"
12395
- }
12396
- ) }),
12397
- /* @__PURE__ */ jsxRuntime.jsx(
12398
- "path",
12399
- {
12400
- d: "M9.74219 34.4258V28.6992H10.8828V29.3633H10.9531C11.0286 29.2096 11.1276 29.0781 11.25 28.9688C11.375 28.8594 11.5208 28.776 11.6875 28.7188C11.8542 28.6589 12.0391 28.6289 12.2422 28.6289C12.6016 28.6289 12.9115 28.7188 13.1719 28.8984C13.4323 29.0781 13.6328 29.3333 13.7734 29.6641C13.9167 29.9922 13.9883 30.3854 13.9883 30.8438V30.8516C13.9883 31.3125 13.918 31.7083 13.7773 32.0391C13.6367 32.3698 13.4362 32.6237 13.1758 32.8008C12.9154 32.9779 12.6042 33.0664 12.2422 33.0664C12.0443 33.0664 11.8607 33.0365 11.6914 32.9766C11.5247 32.9141 11.3776 32.8268 11.25 32.7148C11.125 32.6029 11.026 32.4688 10.9531 32.3125H10.8828V34.4258H9.74219ZM11.8516 32.1211C12.0547 32.1211 12.2279 32.0703 12.3711 31.9688C12.5169 31.8672 12.6289 31.7214 12.707 31.5312C12.7878 31.3411 12.8281 31.1146 12.8281 30.8516V30.8438C12.8281 30.5807 12.7878 30.3542 12.707 30.1641C12.6289 29.974 12.5169 29.8281 12.3711 29.7266C12.2279 29.625 12.0547 29.5742 11.8516 29.5742C11.651 29.5742 11.4766 29.625 11.3281 29.7266C11.1823 29.8281 11.069 29.974 10.9883 30.1641C10.9102 30.3516 10.8711 30.5781 10.8711 30.8438V30.8516C10.8711 31.112 10.9115 31.3385 10.9922 31.5312C11.0729 31.7214 11.1862 31.8672 11.332 31.9688C11.4805 32.0703 11.6536 32.1211 11.8516 32.1211ZM16.457 33.0664C16.1003 33.0664 15.7904 32.9779 15.5273 32.8008C15.2669 32.6211 15.0651 32.3659 14.9219 32.0352C14.7812 31.7044 14.7109 31.3099 14.7109 30.8516V30.8438C14.7109 30.3828 14.7799 29.987 14.918 29.6562C15.0586 29.3255 15.2591 29.0716 15.5195 28.8945C15.7799 28.7174 16.0924 28.6289 16.457 28.6289C16.6523 28.6289 16.8333 28.6602 17 28.7227C17.1693 28.7826 17.3177 28.8685 17.4453 28.9805C17.5729 29.0924 17.6719 29.2279 17.7422 29.3867H17.8125V27.0547H18.9531V33H17.8125V32.332H17.7422C17.6693 32.4857 17.5703 32.6172 17.4453 32.7266C17.3229 32.8359 17.1784 32.9206 17.0117 32.9805C16.8451 33.0378 16.6602 33.0664 16.457 33.0664ZM16.8438 32.1211C17.0469 32.1211 17.2214 32.0703 17.3672 31.9688C17.513 31.8672 17.625 31.7214 17.7031 31.5312C17.7839 31.3411 17.8242 31.1159 17.8242 30.8555V30.8477C17.8242 30.582 17.7839 30.3555 17.7031 30.168C17.625 29.9779 17.5117 29.832 17.3633 29.7305C17.2174 29.6263 17.0443 29.5742 16.8438 29.5742C16.6458 29.5742 16.4727 29.6263 16.3242 29.7305C16.1784 29.832 16.0664 29.9779 15.9883 30.168C15.9102 30.3555 15.8711 30.5807 15.8711 30.8438V30.8516C15.8711 31.1146 15.9102 31.3411 15.9883 31.5312C16.0664 31.7214 16.1784 31.8672 16.3242 31.9688C16.4701 32.0703 16.6432 32.1211 16.8438 32.1211ZM20.4648 33V29.5586H19.7695V28.6992H20.4648V28.2969C20.4648 28.0104 20.5156 27.7721 20.6172 27.582C20.7188 27.3919 20.8776 27.25 21.0938 27.1562C21.3125 27.0599 21.5951 27.0117 21.9414 27.0117C22.0586 27.0117 22.1641 27.0156 22.2578 27.0234C22.3542 27.0312 22.444 27.0417 22.5273 27.0547V27.8164C22.4909 27.8086 22.4427 27.8034 22.3828 27.8008C22.3255 27.7956 22.2604 27.793 22.1875 27.793C21.9661 27.793 21.8099 27.8438 21.7188 27.9453C21.6276 28.0443 21.582 28.1875 21.582 28.375V28.6992H22.4922V29.5586H21.6055V33H20.4648Z",
12401
- fill: "white"
12402
- }
12403
- ),
12404
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "clip0_1008_7871", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "16", transform: "translate(8 9)", width: "16" }) }) })
12405
- ] })
12580
+ d: "M20.7533 19.5337C20.28 19.037 19.3093 18.7537 17.9373 18.7537C17.204 18.7537 16.3526 18.8244 15.43 18.9897C14.8647 18.4461 14.3499 17.8523 13.892 17.2157C13.5373 16.7424 13.2293 16.2224 12.9453 15.725C13.49 14.069 13.75 12.7204 13.75 11.7504C13.75 10.6624 13.348 9.52637 12.1886 9.52637C11.834 9.52637 11.4786 9.7397 11.2893 10.047C10.7693 10.9697 11.006 12.9804 11.9046 14.9677C11.5664 15.984 11.1876 16.9863 10.7693 17.9724C10.3906 18.8717 9.96465 19.7944 9.49131 20.6457C6.88931 21.687 5.20931 22.8937 5.01998 23.839C4.94931 24.1944 5.06731 24.5257 5.32798 24.7857C5.42265 24.857 5.75398 25.141 6.32131 25.141C8.04798 25.141 9.86998 22.349 10.7926 20.6697C11.5026 20.433 12.2126 20.1964 12.922 20.007C13.6704 19.8038 14.4284 19.638 15.1933 19.5104C17.0146 21.1424 18.6233 21.403 19.428 21.403C20.4213 21.403 20.7766 21.0004 20.8946 20.6697C21.108 20.243 20.966 19.7704 20.7533 19.5337ZM19.8066 20.2204C19.7353 20.575 19.38 20.8117 18.884 20.8117C18.742 20.8117 18.624 20.7877 18.4813 20.7644C17.5826 20.551 16.7306 20.1017 15.8793 19.3917C16.5357 19.2807 17.2003 19.2254 17.866 19.2264C18.3633 19.2264 18.7893 19.2497 19.0726 19.321C19.404 19.3917 19.9246 19.605 19.806 20.2197L19.8066 20.2204ZM14.7906 19.1084C14.1305 19.2321 13.4755 19.382 12.8273 19.5577C12.262 19.7047 11.7017 19.8703 11.1473 20.0544C11.4355 19.4962 11.7039 18.9281 11.952 18.351C12.236 17.6884 12.472 17.0024 12.7093 16.3637C12.9453 16.7657 13.206 17.1684 13.466 17.523C13.8911 18.065 14.3329 18.5937 14.7906 19.1084ZM11.692 10.307C11.7338 10.2232 11.7978 10.1525 11.877 10.1025C11.9563 10.0526 12.0477 10.0253 12.1413 10.0237C12.638 10.0237 12.7326 10.591 12.7326 11.041C12.7326 11.7977 12.496 12.957 12.094 14.2817C11.4073 12.4364 11.3606 10.899 11.692 10.307ZM9.08931 21.3317C7.88265 23.319 6.72331 24.549 6.01398 24.549C5.88599 24.5498 5.76132 24.5083 5.65931 24.431C5.51731 24.289 5.44598 24.1237 5.49331 23.9344C5.63531 23.2244 7.00731 22.231 9.08931 21.3317Z",
12581
+ fill: "white"
12406
12582
  }
12407
12583
  );
12408
- const FileWordIcon = ({
12584
+ const PDF_LEGACY_SYMBOL = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12585
+ /* @__PURE__ */ jsxRuntime.jsx(
12586
+ "path",
12587
+ {
12588
+ d: "M23.7533 19.2C23.28 18.7033 22.3093 18.42 20.9373 18.42C20.204 18.42 19.3526 18.4906 18.43 18.656C17.8647 18.1124 17.3499 17.5186 16.892 16.882C16.5373 16.4086 16.2293 15.8886 15.9453 15.3913C16.49 13.7353 16.75 12.3866 16.75 11.4166C16.75 10.3286 16.348 9.19263 15.1886 9.19263C14.834 9.19263 14.4786 9.40596 14.2893 9.71329C13.7693 10.636 14.006 12.6466 14.9046 14.634C14.5664 15.6502 14.1877 16.6526 13.7693 17.6386C13.3906 18.538 12.9646 19.4606 12.4913 20.312C9.88931 21.3533 8.20931 22.56 8.01998 23.5053C7.94931 23.8606 8.06731 24.192 8.32798 24.452C8.42265 24.5233 8.75398 24.8073 9.32131 24.8073C11.048 24.8073 12.87 22.0153 13.7926 20.336C14.5026 20.0993 15.2126 19.8626 15.922 19.6733C16.6704 19.4701 17.4284 19.3043 18.1933 19.1766C20.0146 20.8086 21.6233 21.0693 22.428 21.0693C23.4213 21.0693 23.7766 20.6666 23.8946 20.336C24.108 19.9093 23.966 19.4366 23.7533 19.2ZM22.8066 19.8866C22.7353 20.2413 22.38 20.478 21.884 20.478C21.742 20.478 21.624 20.454 21.4813 20.4306C20.5826 20.2173 19.7306 19.768 18.8793 19.058C19.5357 18.947 20.2003 18.8917 20.866 18.8926C21.3633 18.8926 21.7893 18.916 22.0726 18.9873C22.404 19.058 22.9246 19.2713 22.806 19.886L22.8066 19.8866ZM17.7906 18.7746C17.1305 18.8983 16.4755 19.0482 15.8273 19.224C15.262 19.3709 14.7017 19.5366 14.1473 19.7206C14.4355 19.1625 14.7039 18.5944 14.952 18.0173C15.236 17.3546 15.472 16.6686 15.7093 16.03C15.9453 16.432 16.206 16.8346 16.466 17.1893C16.8911 17.7313 17.3329 18.26 17.7906 18.7746ZM14.692 9.97329C14.7338 9.88949 14.7978 9.81875 14.877 9.7688C14.9563 9.71884 15.0477 9.69157 15.1413 9.68996C15.638 9.68996 15.7326 10.2573 15.7326 10.7073C15.7326 11.464 15.496 12.6233 15.094 13.948C14.4073 12.1026 14.3606 10.5653 14.692 9.97329ZM12.0893 20.998C10.8826 22.9853 9.72331 24.2153 9.01398 24.2153C8.88599 24.2161 8.76132 24.1746 8.65931 24.0973C8.51731 23.9553 8.44598 23.79 8.49331 23.6006C8.63531 22.8906 10.0073 21.8973 12.0893 20.998Z",
12589
+ fill: "white"
12590
+ }
12591
+ ),
12592
+ /* @__PURE__ */ jsxRuntime.jsx(
12593
+ "path",
12594
+ {
12595
+ d: "M9.74219 34.4258V28.6992H10.8828V29.3633H10.9531C11.0286 29.2096 11.1276 29.0781 11.25 28.9688C11.375 28.8594 11.5208 28.776 11.6875 28.7188C11.8542 28.6589 12.0391 28.6289 12.2422 28.6289C12.6016 28.6289 12.9115 28.7188 13.1719 28.8984C13.4323 29.0781 13.6328 29.3333 13.7734 29.6641C13.9167 29.9922 13.9883 30.3854 13.9883 30.8438V30.8516C13.9883 31.3125 13.918 31.7083 13.7773 32.0391C13.6367 32.3698 13.4362 32.6237 13.1758 32.8008C12.9154 32.9779 12.6042 33.0664 12.2422 33.0664C12.0443 33.0664 11.8607 33.0365 11.6914 32.9766C11.5247 32.9141 11.3776 32.8268 11.25 32.7148C11.125 32.6029 11.026 32.4688 10.9531 32.3125H10.8828V34.4258H9.74219ZM11.8516 32.1211C12.0547 32.1211 12.2279 32.0703 12.3711 31.9688C12.5169 31.8672 12.6289 31.7214 12.707 31.5312C12.7878 31.3411 12.8281 31.1146 12.8281 30.8516V30.8438C12.8281 30.5807 12.7878 30.3542 12.707 30.1641C12.6289 29.974 12.5169 29.8281 12.3711 29.7266C12.2279 29.625 12.0547 29.5742 11.8516 29.5742C11.651 29.5742 11.4766 29.625 11.3281 29.7266C11.1823 29.8281 11.069 29.974 10.9883 30.1641C10.9102 30.3516 10.8711 30.5781 10.8711 30.8438V30.8516C10.8711 31.112 10.9115 31.3385 10.9922 31.5312C11.0729 31.7214 11.1862 31.8672 11.332 31.9688C11.4805 32.0703 11.6536 32.1211 11.8516 32.1211ZM16.457 33.0664C16.1003 33.0664 15.7904 32.9779 15.5273 32.8008C15.2669 32.6211 15.0651 32.3659 14.9219 32.0352C14.7812 31.7044 14.7109 31.3099 14.7109 30.8516V30.8438C14.7109 30.3828 14.7799 29.987 14.918 29.6562C15.0586 29.3255 15.2591 29.0716 15.5195 28.8945C15.7799 28.7174 16.0924 28.6289 16.457 28.6289C16.6523 28.6289 16.8333 28.6602 17 28.7227C17.1693 28.7826 17.3177 28.8685 17.4453 28.9805C17.5729 29.0924 17.6719 29.2279 17.7422 29.3867H17.8125V27.0547H18.9531V33H17.8125V32.332H17.7422C17.6693 32.4857 17.5703 32.6172 17.4453 32.7266C17.3229 32.8359 17.1784 32.9206 17.0117 32.9805C16.8451 33.0378 16.6602 33.0664 16.457 33.0664ZM16.8438 32.1211C17.0469 32.1211 17.2214 32.0703 17.3672 31.9688C17.513 31.8672 17.625 31.7214 17.7031 31.5312C17.7839 31.3411 17.8242 31.1159 17.8242 30.8555V30.8477C17.8242 30.582 17.7839 30.3555 17.7031 30.168C17.625 29.9779 17.5117 29.832 17.3633 29.7305C17.2174 29.6263 17.0443 29.5742 16.8438 29.5742C16.6458 29.5742 16.4727 29.6263 16.3242 29.7305C16.1784 29.832 16.0664 29.9779 15.9883 30.168C15.9102 30.3555 15.8711 30.5807 15.8711 30.8438V30.8516C15.8711 31.1146 15.9102 31.3411 15.9883 31.5312C16.0664 31.7214 16.1784 31.8672 16.3242 31.9688C16.4701 32.0703 16.6432 32.1211 16.8438 32.1211ZM20.4648 33V29.5586H19.7695V28.6992H20.4648V28.2969C20.4648 28.0104 20.5156 27.7721 20.6172 27.582C20.7188 27.3919 20.8776 27.25 21.0938 27.1562C21.3125 27.0599 21.5951 27.0117 21.9414 27.0117C22.0586 27.0117 22.1641 27.0156 22.2578 27.0234C22.3542 27.0312 22.444 27.0417 22.5273 27.0547V27.8164C22.4909 27.8086 22.4427 27.8034 22.3828 27.8008C22.3255 27.7956 22.2604 27.793 22.1875 27.793C21.9661 27.793 21.8099 27.8438 21.7188 27.9453C21.6276 28.0443 21.582 28.1875 21.582 28.375V28.6992H22.4922V29.5586H21.6055V33H20.4648Z",
12596
+ fill: "white"
12597
+ }
12598
+ )
12599
+ ] });
12600
+ const FilePdfIcon = ({
12409
12601
  className,
12410
- label = "doc",
12602
+ label,
12411
12603
  size,
12412
12604
  sizeConfig,
12413
12605
  ...props
12414
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12415
- Svg,
12416
- {
12417
- ...props,
12418
- className: clsx(
12419
- "str-chat__file-icon--doc",
12420
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12421
- className
12422
- ),
12423
- size,
12424
- sizeConfig,
12425
- children: [
12426
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12427
- /* @__PURE__ */ jsxRuntime.jsx(
12428
- "path",
12429
- {
12430
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12431
- fill: "#3375E2"
12432
- }
12433
- ),
12434
- /* @__PURE__ */ jsxRuntime.jsx(
12435
- "path",
12606
+ }) => {
12607
+ const useLegacyPdfMarkup = !!label;
12608
+ return /* @__PURE__ */ jsxRuntime.jsx(
12609
+ Svg,
12610
+ {
12611
+ ...props,
12612
+ className: clsx(
12613
+ "str-chat__file-icon--pdf",
12614
+ useLegacyPdfMarkup && FILE_ICON_NO_LABEL_CLASSNAME,
12615
+ className
12616
+ ),
12617
+ size,
12618
+ sizeConfig,
12619
+ children: /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12620
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: FILE_ICON_PAPER_PATH, fill: "#E71A01" }),
12621
+ useLegacyPdfMarkup ? PDF_LEGACY_SYMBOL : /* @__PURE__ */ jsxRuntime.jsx(
12622
+ "g",
12436
12623
  {
12437
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12438
- fill: "white",
12439
- opacity: "0.5"
12624
+ transform: `scale(${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X} ${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y})`,
12625
+ children: PDF_SMALL_SYMBOL
12440
12626
  }
12441
12627
  ),
12442
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "12.2" }),
12443
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "20.2" }),
12444
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "9.6", x: "8", y: "16.2" })
12445
- ] }),
12446
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12447
- ]
12628
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: FILE_ICON_FOLD_PATH, fill: "white", opacity: "0.5" })
12629
+ ] })
12630
+ }
12631
+ );
12632
+ };
12633
+ const FileWordIcon = ({ className, label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12634
+ StandardFileTypeIcon,
12635
+ {
12636
+ ...props,
12637
+ className,
12638
+ color: "#3375E2",
12639
+ fileTypeClassName: "str-chat__file-icon--doc",
12640
+ label,
12641
+ symbols: TEXT_SYMBOLS
12448
12642
  }
12449
12643
  );
12450
- const FilePowerPointIcon = ({
12451
- className,
12452
- label = "ppt",
12453
- size,
12454
- sizeConfig,
12455
- ...props
12456
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12457
- Svg,
12644
+ const FilePowerPointIcon = ({ className, label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12645
+ StandardFileTypeIcon,
12458
12646
  {
12459
12647
  ...props,
12460
- className: clsx(
12461
- "str-chat__file-icon--ppt",
12462
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12463
- className
12464
- ),
12465
- size,
12466
- sizeConfig,
12467
- children: [
12468
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12469
- /* @__PURE__ */ jsxRuntime.jsx(
12470
- "path",
12471
- {
12472
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12473
- fill: "#D14423"
12474
- }
12475
- ),
12476
- /* @__PURE__ */ jsxRuntime.jsx(
12477
- "path",
12478
- {
12479
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12480
- fill: "white",
12481
- opacity: "0.5"
12482
- }
12483
- ),
12484
- /* @__PURE__ */ jsxRuntime.jsx(
12485
- "path",
12486
- {
12487
- d: "M11.1666 11.5H20.8333M11.1666 21.8333C10.4303 21.8333 9.83331 21.2364 9.83331 20.5V14.8333C9.83331 14.097 10.4303 13.5 11.1666 13.5H20.8333C21.5697 13.5 22.1666 14.097 22.1666 14.8333V20.5C22.1666 21.2364 21.5697 21.8333 20.8333 21.8333H11.1666Z",
12488
- stroke: "white",
12489
- strokeLinecap: "round",
12490
- strokeLinejoin: "round",
12491
- strokeWidth: "1.2"
12492
- }
12493
- )
12494
- ] }),
12495
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12496
- ]
12648
+ className,
12649
+ color: "#D14423",
12650
+ fileTypeClassName: "str-chat__file-icon--ppt",
12651
+ label,
12652
+ symbols: PRESENTATION_SYMBOLS
12497
12653
  }
12498
12654
  );
12499
- const FileExcelIcon = ({
12500
- className = "",
12501
- label = "xls",
12502
- size,
12503
- sizeConfig,
12504
- ...props
12505
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12506
- Svg,
12655
+ const FileExcelIcon = ({ className = "", label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12656
+ StandardFileTypeIcon,
12507
12657
  {
12508
12658
  ...props,
12509
- className: clsx(
12510
- "str-chat__file-icon--xls",
12511
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12512
- className
12513
- ),
12514
- size,
12515
- sizeConfig,
12516
- children: [
12517
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12518
- /* @__PURE__ */ jsxRuntime.jsx(
12519
- "path",
12520
- {
12521
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12522
- fill: "#0C864B"
12523
- }
12524
- ),
12525
- /* @__PURE__ */ jsxRuntime.jsx(
12526
- "path",
12527
- {
12528
- d: "M15 11.5V11H14V11.5H15ZM14 22.5V23H15V22.5H14ZM10.5 15H10V16H10.5V15ZM21.5 16H22V15H21.5V16ZM21 13.6333V20.3667H22V13.6333H21ZM19.3667 22H12.6333V23H19.3667V22ZM11 20.3667V13.6333H10V20.3667H11ZM12.6333 12H19.3667V11H12.6333V12ZM12.6333 22C12.2517 22 11.9956 21.9996 11.7983 21.9835C11.6069 21.9679 11.5154 21.9399 11.455 21.9092L11.001 22.8002C11.2259 22.9147 11.4636 22.9595 11.7169 22.9802C11.9643 23.0004 12.2682 23 12.6333 23V22ZM10 20.3667C10 20.7318 9.99961 21.0357 10.0198 21.2831C10.0405 21.5364 10.0853 21.7741 10.1998 21.999L11.0908 21.545C11.0601 21.4846 11.0321 21.3931 11.0165 21.2017C11.0004 21.0044 11 20.7483 11 20.3667H10ZM11.455 21.9092C11.2982 21.8293 11.1707 21.7018 11.0908 21.545L10.1998 21.999C10.3756 22.3439 10.6561 22.6244 11.001 22.8002L11.455 21.9092ZM21 20.3667C21 20.7483 20.9996 21.0044 20.9835 21.2017C20.9679 21.3931 20.9399 21.4846 20.9092 21.545L21.8002 21.999C21.9147 21.7741 21.9595 21.5364 21.9802 21.2831C22.0004 21.0357 22 20.7318 22 20.3667H21ZM19.3667 23C19.7318 23 20.0357 23.0004 20.2831 22.9802C20.5364 22.9595 20.7741 22.9147 20.999 22.8002L20.545 21.9092C20.4846 21.9399 20.3931 21.9679 20.2017 21.9835C20.0044 21.9996 19.7483 22 19.3667 22V23ZM20.9092 21.545C20.8293 21.7018 20.7018 21.8293 20.545 21.9092L20.999 22.8002C21.3439 22.6244 21.6244 22.3439 21.8002 21.999L20.9092 21.545ZM22 13.6333C22 13.2682 22.0004 12.9643 21.9802 12.7169C21.9595 12.4636 21.9147 12.2259 21.8002 12.001L20.9092 12.455C20.9399 12.5154 20.9679 12.6069 20.9835 12.7983C20.9996 12.9956 21 13.2517 21 13.6333H22ZM19.3667 12C19.7483 12 20.0044 12.0004 20.2017 12.0165C20.3931 12.0321 20.4846 12.0601 20.545 12.0908L20.999 11.1998C20.7741 11.0853 20.5364 11.0405 20.2831 11.0198C20.0357 10.9996 19.7318 11 19.3667 11V12ZM21.8002 12.001C21.6244 11.6561 21.3439 11.3756 20.999 11.1998L20.545 12.0908C20.7018 12.1707 20.8293 12.2982 20.9092 12.455L21.8002 12.001ZM11 13.6333C11 13.2517 11.0004 12.9956 11.0165 12.7983C11.0321 12.6069 11.0601 12.5154 11.0908 12.455L10.1998 12.001C10.0853 12.2259 10.0405 12.4636 10.0198 12.7169C9.99961 12.9643 10 13.2682 10 13.6333H11ZM12.6333 11C12.2682 11 11.9643 10.9996 11.7169 11.0198C11.4636 11.0405 11.2259 11.0853 11.001 11.1998L11.455 12.0908C11.5154 12.0601 11.6069 12.0321 11.7983 12.0165C11.9956 12.0004 12.2517 12 12.6333 12V11ZM11.0908 12.455C11.1707 12.2982 11.2982 12.1707 11.455 12.0908L11.001 11.1998C10.6561 11.3756 10.3756 11.6561 10.1998 12.001L11.0908 12.455ZM14 11.5V15.5H15V11.5H14ZM14 15.5V22.5H15V15.5H14ZM10.5 16H14.5V15H10.5V16ZM14.5 16H21.5V15H14.5V16Z",
12529
- fill: "white"
12530
- }
12531
- ),
12532
- /* @__PURE__ */ jsxRuntime.jsx(
12533
- "path",
12534
- {
12535
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12536
- fill: "white",
12537
- opacity: "0.5"
12538
- }
12539
- )
12540
- ] }),
12541
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12542
- ]
12659
+ className,
12660
+ color: "#0C864B",
12661
+ fileTypeClassName: "str-chat__file-icon--xls",
12662
+ label,
12663
+ symbols: SPREADSHEET_SYMBOLS
12543
12664
  }
12544
12665
  );
12545
12666
  const FileArchiveIcon = ({
12546
12667
  className = "",
12547
12668
  label = "",
12548
- size,
12549
- sizeConfig,
12550
12669
  ...props
12551
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12552
- Svg,
12670
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
12671
+ StandardFileTypeIcon,
12553
12672
  {
12554
12673
  ...props,
12555
- className: clsx(
12556
- "str-chat__file-icon--compressed",
12557
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12558
- className
12559
- ),
12560
- size,
12561
- sizeConfig,
12562
- children: [
12563
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12564
- /* @__PURE__ */ jsxRuntime.jsx(
12565
- "path",
12566
- {
12567
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12568
- fill: "#E59E34"
12569
- }
12570
- ),
12571
- /* @__PURE__ */ jsxRuntime.jsx(
12572
- "path",
12573
- {
12574
- clipRule: "evenodd",
12575
- d: "M9.41177 0H7.52942V2H9.41177V4H7.52942V6H9.41177V8H7.52942V10H9.41177V12H7.52942V14H9.41177V12H11.2941V10H9.41177V8H11.2941V6H9.41177V4H11.2941V2H9.41177V0ZM7.52942 17C7.52942 16.4477 7.9508 16 8.4706 16H10.3529C10.8727 16 11.2941 16.4477 11.2941 17V23C11.2941 23.5523 10.8727 24 10.3529 24H8.4706C7.9508 24 7.52942 23.5523 7.52942 23V17ZM8.4706 23V20H10.3529V23H8.4706Z",
12576
- fill: "white",
12577
- fillRule: "evenodd"
12578
- }
12579
- ),
12580
- /* @__PURE__ */ jsxRuntime.jsx(
12581
- "path",
12582
- {
12583
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12584
- fill: "white",
12585
- opacity: "0.5"
12586
- }
12587
- )
12588
- ] }),
12589
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12590
- ]
12674
+ className,
12675
+ color: "#E59E34",
12676
+ fileTypeClassName: "str-chat__file-icon--compressed",
12677
+ label,
12678
+ symbols: COMPRESSION_SYMBOLS
12591
12679
  }
12592
12680
  );
12593
- const FileCodeIcon = ({
12594
- className = "",
12595
- label = "code",
12596
- size,
12597
- sizeConfig,
12598
- ...props
12599
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12600
- Svg,
12681
+ const FileCodeIcon = ({ className = "", label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12682
+ StandardFileTypeIcon,
12601
12683
  {
12602
12684
  ...props,
12603
- className: clsx(
12604
- "str-chat__file-icon--code",
12605
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12606
- className
12607
- ),
12608
- size,
12609
- sizeConfig,
12610
- children: [
12611
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12612
- /* @__PURE__ */ jsxRuntime.jsx(
12613
- "path",
12614
- {
12615
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12616
- fill: "#00ACA1"
12617
- }
12618
- ),
12619
- /* @__PURE__ */ jsxRuntime.jsx(
12620
- "path",
12621
- {
12622
- d: "M14.8333 15L13.3047 16.5286C13.0444 16.7889 13.0444 17.2111 13.3047 17.4714L14.8333 19M17.1667 15L18.6953 16.5286C18.9556 16.7889 18.9556 17.2111 18.6953 17.4714L17.1667 19M11.8333 22.5H20.1667C20.9031 22.5 21.5 21.9031 21.5 21.1667V12.8333C21.5 12.097 20.9031 11.5 20.1667 11.5H11.8333C11.097 11.5 10.5 12.097 10.5 12.8333V21.1667C10.5 21.9031 11.097 22.5 11.8333 22.5Z",
12623
- stroke: "white",
12624
- strokeLinecap: "round",
12625
- strokeLinejoin: "round",
12626
- strokeWidth: "1.2"
12627
- }
12628
- ),
12629
- /* @__PURE__ */ jsxRuntime.jsx(
12630
- "path",
12631
- {
12632
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12633
- fill: "white",
12634
- opacity: "0.5"
12635
- }
12636
- )
12637
- ] }),
12638
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12639
- ]
12685
+ className,
12686
+ color: "#00ACA1",
12687
+ fileTypeClassName: "str-chat__file-icon--code",
12688
+ label,
12689
+ symbols: CODE_SYMBOLS
12640
12690
  }
12641
12691
  );
12642
- const FileAudioIcon = ({
12643
- className = "",
12644
- label = "audio",
12645
- size,
12646
- sizeConfig,
12647
- ...props
12648
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
12649
- Svg,
12692
+ const FileAudioIcon = ({ className = "", label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12693
+ StandardFileTypeIcon,
12650
12694
  {
12651
12695
  ...props,
12652
- className: clsx(
12653
- "str-chat__file-icon--audio",
12654
- !label && FILE_ICON_NO_LABEL_CLASSNAME,
12655
- className
12656
- ),
12657
- size,
12658
- sizeConfig,
12659
- children: [
12660
- /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12661
- /* @__PURE__ */ jsxRuntime.jsx(
12662
- "path",
12663
- {
12664
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12665
- fill: "#2727B0"
12666
- }
12667
- ),
12668
- /* @__PURE__ */ jsxRuntime.jsx(
12669
- "path",
12670
- {
12671
- d: "M20.8318 12.1679C22.0684 13.4045 22.8333 15.1128 22.8333 16.9998C22.8333 18.8867 22.0684 20.595 20.8318 21.8316M18.5927 14.4075C19.2562 15.071 19.6666 15.9876 19.6666 17.0002C19.6666 18.0127 19.2562 18.9294 18.5927 19.5929M10.5 14.1666H11.5699C11.8495 14.1666 12.1221 14.0787 12.349 13.9153L15.6385 11.5468C15.859 11.3881 16.1666 11.5456 16.1666 11.8173V22.1825C16.1666 22.4542 15.859 22.6118 15.6385 22.453L12.349 20.0845C12.1221 19.9211 11.8495 19.8332 11.5699 19.8332H10.5C9.76358 19.8332 9.16663 19.2363 9.16663 18.4999V15.4999C9.16663 14.7635 9.76358 14.1666 10.5 14.1666Z",
12672
- stroke: "white",
12673
- strokeLinecap: "round",
12674
- strokeLinejoin: "round",
12675
- strokeWidth: "1.2"
12676
- }
12677
- ),
12678
- /* @__PURE__ */ jsxRuntime.jsx(
12679
- "path",
12680
- {
12681
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12682
- fill: "white",
12683
- opacity: "0.5"
12684
- }
12685
- )
12686
- ] }),
12687
- /* @__PURE__ */ jsxRuntime.jsx(FileIconLabel, { label, size, sizeConfig })
12688
- ]
12696
+ className,
12697
+ color: "#2727B0",
12698
+ fileTypeClassName: "str-chat__file-icon--audio",
12699
+ label,
12700
+ symbols: AUDIO_SYMBOLS
12689
12701
  }
12690
12702
  );
12691
- const FileVideoIcon = ({ className = "", ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(
12692
- "svg",
12703
+ const FileVideoIcon = ({ className = "", label, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12704
+ StandardFileTypeIcon,
12693
12705
  {
12694
- className: clsx("rfu-file-video", className),
12695
- fill: "none",
12696
- viewBox: "0 0 34 40",
12697
- xmlns: "http://www.w3.org/2000/svg",
12698
12706
  ...props,
12699
- children: [
12700
- /* @__PURE__ */ jsxRuntime.jsx(
12701
- "path",
12702
- {
12703
- clipRule: "evenodd",
12704
- d: "M17.7168 33.172C18.2348 33.172 18.4238 33.655 18.4238 34.18C18.4238 34.642 18.2978 35.195 17.7168 35.195C17.1708 35.195 16.9888 34.642 16.9888 34.145C16.9888 33.683 17.1708 33.172 17.7168 33.172ZM19.5718 31.002H18.3818V32.7589H18.3678C18.1228 32.43 17.7798 32.262 17.3318 32.262C16.3028 32.262 15.7988 33.158 15.7988 34.103C15.7988 35.125 16.2818 36.1049 17.4228 36.1049C17.8428 36.1049 18.1928 35.923 18.4238 35.58H18.4378V36H19.5718V31.002ZM12.7095 34.1872C12.7095 33.7252 12.8775 33.1722 13.4305 33.1722C13.9835 33.1722 14.1585 33.7252 14.1585 34.1872C14.1585 34.6492 13.9835 35.1952 13.4305 35.1952C12.8775 35.1952 12.7095 34.6492 12.7095 34.1872ZM11.5195 34.1872C11.5195 35.2792 12.3035 36.1052 13.4305 36.1052C14.5575 36.1052 15.3485 35.2792 15.3485 34.1872C15.3485 33.0952 14.5575 32.2622 13.4305 32.2622C12.3035 32.2622 11.5195 33.0952 11.5195 34.1872ZM21.839 32.3671H22.574V33.1371H21.839V34.7891C21.839 35.0761 22.007 35.1391 22.266 35.1391C22.3142 35.1391 22.364 35.1357 22.4147 35.1323C22.4672 35.1287 22.5206 35.1251 22.574 35.1251V36.0001C22.481 36.0031 22.388 36.0099 22.295 36.0168C22.171 36.0259 22.047 36.0351 21.923 36.0351C20.908 36.0351 20.649 35.7411 20.649 34.7541V33.1371H20.047V32.3671H20.649V31.2681H21.839V32.3671Z",
12705
- fill: "white",
12706
- fillRule: "evenodd"
12707
- }
12708
- ),
12709
- /* @__PURE__ */ jsxRuntime.jsx(
12710
- "path",
12711
- {
12712
- d: "M0 28H34V37C34 38.6569 32.6569 40 31 40H3C1.34315 40 0 38.6569 0 37V28Z",
12713
- fill: "#9D27B0"
12714
- }
12715
- ),
12716
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 3C0 1.34315 1.34315 0 3 0H23L34 11V28H0V3Z", fill: "#F5F5F5" }),
12717
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M34 11L26 11C24.3431 11 23 9.65685 23 8V0L34 11Z", fill: "#DBDBDB" }),
12718
- /* @__PURE__ */ jsxRuntime.jsx(
12719
- "path",
12720
- {
12721
- d: "M9 17H25V24H9V17ZM27 14C27 12.8954 26.1046 12 25 12H22L24 15H21L19 12H17L19 15H16L14 12H12L14 15H11L9 12C7.9 12 7.01 12.9 7.01 14L7 24C7 25.1 7.9 26 9 26H25C26.1 26 27 25.1 27 24V14Z",
12722
- fill: "#9D27B0"
12723
- }
12724
- )
12725
- ]
12707
+ className,
12708
+ color: "#A847B7",
12709
+ fileTypeClassName: "str-chat__file-icon--video",
12710
+ label,
12711
+ symbols: VIDEO_SYMBOLS
12726
12712
  }
12727
12713
  );
12728
- const FileFallbackIcon = ({ className = "", ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
12729
- Svg,
12714
+ const FileFallbackIcon = ({
12715
+ className = "",
12716
+ label = "",
12717
+ ...props
12718
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
12719
+ StandardFileTypeIcon,
12730
12720
  {
12731
12721
  ...props,
12732
- className: clsx(
12733
- "str-chat__file-icon--other",
12734
- FILE_ICON_NO_LABEL_CLASSNAME,
12735
- className
12736
- ),
12737
- children: /* @__PURE__ */ jsxRuntime.jsxs("g", { className: FILE_ICON_GRAPHIC_CLASSNAME, children: [
12738
- /* @__PURE__ */ jsxRuntime.jsx(
12739
- "path",
12740
- {
12741
- d: "M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z",
12742
- fill: "#888888"
12743
- }
12744
- ),
12745
- /* @__PURE__ */ jsxRuntime.jsx(
12746
- "path",
12747
- {
12748
- d: "M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z",
12749
- fill: "white",
12750
- opacity: "0.5"
12751
- }
12752
- ),
12753
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "13.2" }),
12754
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "14.4", x: "8", y: "21.2" }),
12755
- /* @__PURE__ */ jsxRuntime.jsx("rect", { fill: "white", height: "1.6", rx: "0.8", width: "9.6", x: "8", y: "17.2" })
12756
- ] })
12722
+ className,
12723
+ color: "#888888",
12724
+ fileTypeClassName: "str-chat__file-icon--other",
12725
+ label,
12726
+ symbols: OTHER_SYMBOLS
12757
12727
  }
12758
12728
  );
12759
12729
  const wordMimeTypes = [
@@ -13158,7 +13128,6 @@ const FileIcon = (props) => {
13158
13128
  const {
13159
13129
  className,
13160
13130
  fileName,
13161
- hideLabel,
13162
13131
  mimeType,
13163
13132
  size = "md",
13164
13133
  sizeConfig: sizeConfigOverride,
@@ -13169,12 +13138,12 @@ const FileIcon = (props) => {
13169
13138
  [sizeConfigOverride]
13170
13139
  );
13171
13140
  const Icon = mimeTypeToIcon(mimeType);
13172
- const label = hideLabel ? void 0 : labelFromMimeType({ fileName, mimeType });
13141
+ const label = fileName ? labelFromMimeType({ fileName, mimeType }) : void 0;
13173
13142
  return /* @__PURE__ */ jsxRuntime.jsx(
13174
13143
  Icon,
13175
13144
  {
13176
13145
  ...rest,
13177
- className: clsx(className, hideLabel && FILE_ICON_NO_LABEL_CLASSNAME),
13146
+ className,
13178
13147
  label,
13179
13148
  size,
13180
13149
  sizeConfig
@@ -20656,6 +20625,79 @@ const DeleteMessageAlert = ({ onCancel, onDelete }) => {
20656
20625
  }
20657
20626
  );
20658
20627
  };
20628
+ const isDownloadableAttachment = (attachment) => {
20629
+ if (!attachment || typeof attachment !== "object") return false;
20630
+ const typedAttachment = attachment;
20631
+ return streamChat.isFileAttachment(typedAttachment) || streamChat.isImageAttachment(typedAttachment) || streamChat.isVideoAttachment(typedAttachment) || streamChat.isAudioAttachment(typedAttachment) || streamChat.isVoiceRecordingAttachment(typedAttachment);
20632
+ };
20633
+ const triggerUrlDownload = ({
20634
+ filename,
20635
+ openInNewTab,
20636
+ revokeObjectUrl,
20637
+ url
20638
+ }) => {
20639
+ const anchor = document.createElement("a");
20640
+ anchor.download = filename;
20641
+ anchor.href = url;
20642
+ anchor.rel = "noopener noreferrer";
20643
+ if (openInNewTab && !url.startsWith("blob:")) {
20644
+ anchor.target = "_blank";
20645
+ }
20646
+ document.body.append(anchor);
20647
+ anchor.click();
20648
+ anchor.remove();
20649
+ const shouldRevokeObjectUrl = revokeObjectUrl ?? url.startsWith("blob:");
20650
+ if (shouldRevokeObjectUrl && url.startsWith("blob:")) {
20651
+ setTimeout(() => URL.revokeObjectURL(url), 0);
20652
+ }
20653
+ };
20654
+ const fetchRemoteAttachmentAsObjectUrl = async (url) => {
20655
+ if (typeof fetch !== "function") return null;
20656
+ const response = await fetch(url);
20657
+ if (!response.ok) {
20658
+ throw new Error(`Failed to fetch attachment, status ${response.status}`);
20659
+ }
20660
+ const blob = await response.blob();
20661
+ return URL.createObjectURL(blob);
20662
+ };
20663
+ const downloadAttachment = async (attachment, options = {}) => {
20664
+ const { openRemoteInNewTab = true, preferRemoteFetch = true } = options;
20665
+ const titleFallback = attachment.title ?? "downloaded-attachment";
20666
+ const rawFile = attachment.localMetadata?.file;
20667
+ if (rawFile instanceof Blob) {
20668
+ const filename2 = rawFile instanceof File && rawFile.name ? rawFile.name : titleFallback;
20669
+ triggerUrlDownload({
20670
+ filename: filename2,
20671
+ url: URL.createObjectURL(rawFile)
20672
+ });
20673
+ return;
20674
+ }
20675
+ const filename = rawFile && typeof rawFile === "object" && "name" in rawFile && typeof rawFile.name === "string" ? rawFile.name : titleFallback;
20676
+ const url = attachment.asset_url ?? attachment.image_url;
20677
+ if (!url) return;
20678
+ if (preferRemoteFetch) {
20679
+ try {
20680
+ const objectUrl = await fetchRemoteAttachmentAsObjectUrl(url);
20681
+ if (objectUrl) {
20682
+ triggerUrlDownload({
20683
+ filename,
20684
+ url: objectUrl
20685
+ });
20686
+ return;
20687
+ }
20688
+ } catch {
20689
+ }
20690
+ }
20691
+ triggerUrlDownload({ filename, openInNewTab: openRemoteInNewTab, url });
20692
+ };
20693
+ const downloadAllAttachments = async (attachments) => {
20694
+ for (const attachment of attachments) {
20695
+ await downloadAttachment(attachment, {
20696
+ openRemoteInNewTab: true,
20697
+ preferRemoteFetch: true
20698
+ });
20699
+ }
20700
+ };
20659
20701
  const msgActionsBoxButtonClassName = "str-chat__message-actions-list-item-button";
20660
20702
  const getErrorMessage = (error, fallback) => error instanceof Error && error.message ? error.message : fallback;
20661
20703
  const getNotificationError = (error) => {
@@ -20769,6 +20811,82 @@ const DefaultMessageActionComponents = {
20769
20811
  }
20770
20812
  );
20771
20813
  },
20814
+ Download() {
20815
+ const { closeMenu, openSubmenu } = useContextMenuContext();
20816
+ const { message } = useMessageContext();
20817
+ const { t } = WithAudioPlayback.useTranslationContext();
20818
+ const downloadableAttachments = (message.attachments ?? []).filter(
20819
+ isDownloadableAttachment
20820
+ );
20821
+ if (!downloadableAttachments.length) return null;
20822
+ const DownloadSubmenuHeader = () => {
20823
+ const { returnToParentMenu: goBack } = useContextMenuContext();
20824
+ const { t: translate } = WithAudioPlayback.useTranslationContext();
20825
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuBackButton, { onClick: goBack, children: [
20826
+ /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconChevronLeft, {}),
20827
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: translate("Download Attachment") })
20828
+ ] }) });
20829
+ };
20830
+ const DownloadSubmenu = () => /* @__PURE__ */ jsxRuntime.jsxs(
20831
+ "div",
20832
+ {
20833
+ "aria-label": t("aria/Download attachment"),
20834
+ className: "str-chat__message-actions-box__submenu str-chat__message-actions-box__submenu--download-attachments",
20835
+ role: "listbox",
20836
+ children: [
20837
+ downloadableAttachments.map((attachment, index) => {
20838
+ const fileName = attachment.localMetadata?.file?.name ?? attachment.title ?? t("Download Attachment");
20839
+ return /* @__PURE__ */ jsxRuntime.jsx(
20840
+ ContextMenuButton,
20841
+ {
20842
+ className: msgActionsBoxButtonClassName,
20843
+ Icon: WithAudioPlayback.IconDownload,
20844
+ onClick: () => {
20845
+ void downloadAttachment(attachment);
20846
+ closeMenu();
20847
+ },
20848
+ children: `Download ${fileName}`
20849
+ },
20850
+ attachment.localMetadata?.id ?? attachment.asset_url ?? attachment.image_url ?? `${fileName}-${index}`
20851
+ );
20852
+ }),
20853
+ /* @__PURE__ */ jsxRuntime.jsx(
20854
+ ContextMenuButton,
20855
+ {
20856
+ className: msgActionsBoxButtonClassName,
20857
+ Icon: WithAudioPlayback.IconDownload,
20858
+ onClick: () => {
20859
+ void downloadAllAttachments(downloadableAttachments);
20860
+ closeMenu();
20861
+ },
20862
+ children: t("Download All")
20863
+ }
20864
+ )
20865
+ ]
20866
+ }
20867
+ );
20868
+ return /* @__PURE__ */ jsxRuntime.jsx(
20869
+ ContextMenuButton,
20870
+ {
20871
+ "aria-label": t("aria/Download attachment"),
20872
+ className: msgActionsBoxButtonClassName,
20873
+ hasSubMenu: downloadableAttachments.length > 1,
20874
+ Icon: WithAudioPlayback.IconDownload,
20875
+ onClick: () => {
20876
+ if (downloadableAttachments.length > 1) {
20877
+ openSubmenu({
20878
+ Header: DownloadSubmenuHeader,
20879
+ Submenu: DownloadSubmenu
20880
+ });
20881
+ return;
20882
+ }
20883
+ void downloadAttachment(downloadableAttachments[0]);
20884
+ closeMenu();
20885
+ },
20886
+ children: t("Download Attachment")
20887
+ }
20888
+ );
20889
+ },
20772
20890
  Pin() {
20773
20891
  const { closeMenu } = useContextMenuContext();
20774
20892
  const { handlePin, message } = useMessageContext();
@@ -21293,6 +21411,11 @@ const defaultMessageActionSet = [
21293
21411
  placement: "dropdown",
21294
21412
  type: "quote"
21295
21413
  },
21414
+ {
21415
+ Component: DefaultMessageActionComponents.dropdown.Download,
21416
+ placement: "dropdown",
21417
+ type: "download"
21418
+ },
21296
21419
  {
21297
21420
  Component: DefaultMessageActionComponents.dropdown.Pin,
21298
21421
  placement: "dropdown",
@@ -21413,6 +21536,7 @@ const MessageActions = ({
21413
21536
  /* @__PURE__ */ jsxRuntime.jsx(
21414
21537
  ContextMenuComponent,
21415
21538
  {
21539
+ allowFlip: false,
21416
21540
  backLabel: t("Back"),
21417
21541
  className: clsx("str-chat__message-actions-box", {
21418
21542
  "str-chat__message-actions-box--hidden": dropdownReactionSelectorDialogIsOpen,
@@ -27226,17 +27350,7 @@ const AudioAttachmentUI = ({ audioPlayer }) => {
27226
27350
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rootClassName2, "data-testid": dataTestId, children: [
27227
27351
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-audio-widget--play-controls", children: /* @__PURE__ */ jsxRuntime.jsx(PlayButton, { isPlaying: !!isPlaying, onClick: audioPlayer.togglePlay }) }),
27228
27352
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-attachment-audio-widget--data", children: [
27229
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "str-chat__message-attachment-audio-widget--text-first-row", children: [
27230
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-audio-widget--title", children: audioPlayer.title }),
27231
- /* @__PURE__ */ jsxRuntime.jsx(
27232
- FileIcon,
27233
- {
27234
- className: "str-chat__file-icon",
27235
- mimeType: audioPlayer.mimeType,
27236
- size: "sm"
27237
- }
27238
- )
27239
- ] }),
27353
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-audio-widget--text-first-row", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-audio-widget--title", children: audioPlayer.title }) }),
27240
27354
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-audio-widget--text-second-row", children: durationSeconds ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
27241
27355
  /* @__PURE__ */ jsxRuntime.jsx(
27242
27356
  DurationDisplay,
@@ -27251,7 +27365,9 @@ const AudioAttachmentUI = ({ audioPlayer }) => {
27251
27365
  /* @__PURE__ */ jsxRuntime.jsx(FileSizeIndicator$1, { fileSize: audioPlayer.fileSize }),
27252
27366
  /* @__PURE__ */ jsxRuntime.jsx(ProgressBar, { progress: progress ?? 0, seek: audioPlayer.seek })
27253
27367
  ] }) })
27254
- ] })
27368
+ ] }),
27369
+ /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className: "str-chat__file-icon", mimeType: audioPlayer.mimeType }),
27370
+ /* @__PURE__ */ jsxRuntime.jsx(DownloadButton, { assetUrl: audioPlayer.src, suggestedFileName: audioPlayer.title })
27255
27371
  ] });
27256
27372
  };
27257
27373
  const audioPlayerStateSelector$1 = (state) => ({
@@ -27639,6 +27755,23 @@ const ImageComponent = (galleryItem) => {
27639
27755
  const { ModalGallery: ModalGallery$1 = ModalGallery } = WithAudioPlayback.useComponentContext();
27640
27756
  return /* @__PURE__ */ jsxRuntime.jsx(ModalGallery$1, { items: [galleryItem], modalClassName: "str-chat__image-modal" });
27641
27757
  };
27758
+ const UnMemoizedSafeAnchor = (props) => {
27759
+ const { children, className, download, href, rel, target } = props;
27760
+ if (!href) return null;
27761
+ const sanitized = sanitizeUrl.sanitizeUrl(href);
27762
+ return /* @__PURE__ */ jsxRuntime.jsx(
27763
+ "a",
27764
+ {
27765
+ className,
27766
+ download,
27767
+ href: sanitized,
27768
+ rel,
27769
+ target,
27770
+ children
27771
+ }
27772
+ );
27773
+ };
27774
+ const SafeAnchor = React.memo(UnMemoizedSafeAnchor);
27642
27775
  const UnableToRenderCard = ({ type }) => {
27643
27776
  const { t } = WithAudioPlayback.useTranslationContext("Card");
27644
27777
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -27753,7 +27886,14 @@ const FileAttachment = ({ attachment }) => {
27753
27886
  }
27754
27887
  ) }),
27755
27888
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "str-chat__message-attachment-file--item__data", children: /* @__PURE__ */ jsxRuntime.jsx(FileSizeIndicator$1, { fileSize: attachment.file_size }) })
27756
- ] })
27889
+ ] }),
27890
+ /* @__PURE__ */ jsxRuntime.jsx(
27891
+ DownloadButton,
27892
+ {
27893
+ assetUrl: attachment.asset_url,
27894
+ suggestedFileName: attachment.title
27895
+ }
27896
+ )
27757
27897
  ]
27758
27898
  }
27759
27899
  );
@@ -27808,6 +27948,7 @@ const GiphyBadge = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "st
27808
27948
  /* @__PURE__ */ jsxRuntime.jsx(WithAudioPlayback.IconGiphy, {}),
27809
27949
  "Giphy"
27810
27950
  ] });
27951
+ const ExternalLinkIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.586 2H10a1 1 0 1 1 0-2h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V3.414l-6.793 6.793a1 1 0 0 1-1.414-1.414L12.586 2zM6 1a1 1 0 1 1 0 2H3a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h8.967a1 1 0 0 0 1-.99L13 9.99a1 1 0 1 1 2 .02l-.033 3.023a3 3 0 0 1-3 2.967H3a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h3z" }) });
27811
27952
  const Geolocation = ({
27812
27953
  GeolocationAttachmentMapPlaceholder = DefaultGeolocationAttachmentMapPlaceholder,
27813
27954
  GeolocationMap,
@@ -28387,7 +28528,7 @@ const useChat = ({
28387
28528
  };
28388
28529
  React.useEffect(() => {
28389
28530
  if (!client) return;
28390
- const version = "14.0.0-beta.8";
28531
+ const version = "14.0.0";
28391
28532
  const userAgent = client.getUserAgent();
28392
28533
  if (!userAgent.includes("stream-chat-react")) {
28393
28534
  client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
@@ -28688,6 +28829,7 @@ exports.IconClock = WithAudioPlayback.IconClock;
28688
28829
  exports.IconCommand = WithAudioPlayback.IconCommand;
28689
28830
  exports.IconCopy = WithAudioPlayback.IconCopy;
28690
28831
  exports.IconDelete = WithAudioPlayback.IconDelete;
28832
+ exports.IconDownload = WithAudioPlayback.IconDownload;
28691
28833
  exports.IconEdit = WithAudioPlayback.IconEdit;
28692
28834
  exports.IconEmoji = WithAudioPlayback.IconEmoji;
28693
28835
  exports.IconEmojiAdd = WithAudioPlayback.IconEmojiAdd;