@garantiabr/ui-kit 0.0.0-stage → 0.5.13
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.
- package/AGENTS.md +89 -0
- package/README.md +269 -2
- package/bin/init.mjs +238 -0
- package/dist/assets/produtos/agente-de-auditoria-icone.svg.js +6 -0
- package/dist/assets/produtos/agente-de-auditoria-icone.svg.js.map +1 -0
- package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js +6 -0
- package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js.map +1 -0
- package/dist/assets/produtos/central-de-conteudo-icone.svg.js +6 -0
- package/dist/assets/produtos/central-de-conteudo-icone.svg.js.map +1 -0
- package/dist/assets/produtos/registro-cartorario-icone.svg.js +6 -0
- package/dist/assets/produtos/registro-cartorario-icone.svg.js.map +1 -0
- package/dist/brand/apple-touch-icon.png +0 -0
- package/dist/brand/favicon-32.png +0 -0
- package/dist/brand/favicon.svg +11 -0
- package/dist/brand/icon-192.png +0 -0
- package/dist/brand/icon-512.png +0 -0
- package/dist/components/auth/OtpInput.d.ts +8 -0
- package/dist/components/auth/OtpInput.js +49 -0
- package/dist/components/auth/OtpInput.js.map +1 -0
- package/dist/components/chat/ChatConversationsDrawer.d.ts +29 -0
- package/dist/components/chat/ChatConversationsDrawer.js +156 -0
- package/dist/components/chat/ChatConversationsDrawer.js.map +1 -0
- package/dist/components/chat/chatFormatting.d.ts +2 -0
- package/dist/components/chat/chatFormatting.js +16 -0
- package/dist/components/chat/chatFormatting.js.map +1 -0
- package/dist/components/chat/types.d.ts +2 -0
- package/dist/components/chat/types.js +2 -0
- package/dist/components/chat/types.js.map +1 -0
- package/dist/components/chat/useChatWindowFrame.d.ts +23 -0
- package/dist/components/chat/useChatWindowFrame.js +42 -0
- package/dist/components/chat/useChatWindowFrame.js.map +1 -0
- package/dist/components/dashboard/DonutInsightCard.d.ts +11 -0
- package/dist/components/dashboard/DonutInsightCard.js +51 -0
- package/dist/components/dashboard/DonutInsightCard.js.map +1 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.d.ts +22 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.js +113 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.js.map +1 -0
- package/dist/components/dashboard/InsightCard.d.ts +14 -0
- package/dist/components/dashboard/InsightCard.js +44 -0
- package/dist/components/dashboard/InsightCard.js.map +1 -0
- package/dist/components/dashboard/RankingList.d.ts +11 -0
- package/dist/components/dashboard/RankingList.js +28 -0
- package/dist/components/dashboard/RankingList.js.map +1 -0
- package/dist/components/documentos/AnaliseIaDialog.d.ts +114 -0
- package/dist/components/documentos/AnaliseIaDialog.js +923 -0
- package/dist/components/documentos/AnaliseIaDialog.js.map +1 -0
- package/dist/components/documentos/BatchPdfViewerDialog.d.ts +83 -0
- package/dist/components/documentos/BatchPdfViewerDialog.js +752 -0
- package/dist/components/documentos/BatchPdfViewerDialog.js.map +1 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.d.ts +31 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.js +301 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.js.map +1 -0
- package/dist/components/documentos/DocumentoErroIcon.d.ts +5 -0
- package/dist/components/documentos/DocumentoErroIcon.js +64 -0
- package/dist/components/documentos/DocumentoErroIcon.js.map +1 -0
- package/dist/components/documentos/PdfViewerDialog.d.ts +109 -0
- package/dist/components/documentos/PdfViewerDialog.js +704 -0
- package/dist/components/documentos/PdfViewerDialog.js.map +1 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.d.ts +13 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.js +30 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.js.map +1 -0
- package/dist/components/documentos/notify.d.ts +6 -0
- package/dist/components/documentos/notify.js +9 -0
- package/dist/components/documentos/notify.js.map +1 -0
- package/dist/components/documentos/pdfDownload.d.ts +6 -0
- package/dist/components/documentos/pdfDownload.js +13 -0
- package/dist/components/documentos/pdfDownload.js.map +1 -0
- package/dist/components/documentos/pdfPageRenderers.d.ts +30 -0
- package/dist/components/documentos/pdfPageRenderers.js +38 -0
- package/dist/components/documentos/pdfPageRenderers.js.map +1 -0
- package/dist/components/documentos/pdfWorkerSetup.d.ts +1 -0
- package/dist/components/documentos/pdfWorkerSetup.js +4 -0
- package/dist/components/documentos/pdfWorkerSetup.js.map +1 -0
- package/dist/components/documentos/useDialogLayoutMode.d.ts +16 -0
- package/dist/components/documentos/useDialogLayoutMode.js +14 -0
- package/dist/components/documentos/useDialogLayoutMode.js.map +1 -0
- package/dist/components/documentos/useDockableDialogWindow.d.ts +66 -0
- package/dist/components/documentos/useDockableDialogWindow.js +105 -0
- package/dist/components/documentos/useDockableDialogWindow.js.map +1 -0
- package/dist/components/gia/GiaAudioPlayer.d.ts +9 -0
- package/dist/components/gia/GiaAudioPlayer.js +70 -0
- package/dist/components/gia/GiaAudioPlayer.js.map +1 -0
- package/dist/components/gia/GiaChatWindow.d.ts +44 -0
- package/dist/components/gia/GiaChatWindow.js +912 -0
- package/dist/components/gia/GiaChatWindow.js.map +1 -0
- package/dist/components/gia/GiaEmptyStateIllustration.d.ts +5 -0
- package/dist/components/gia/GiaEmptyStateIllustration.js +84 -0
- package/dist/components/gia/GiaEmptyStateIllustration.js.map +1 -0
- package/dist/components/gia/GiaMentionAutocomplete.d.ts +31 -0
- package/dist/components/gia/GiaMentionAutocomplete.js +115 -0
- package/dist/components/gia/GiaMentionAutocomplete.js.map +1 -0
- package/dist/components/gia/GiaMentionText.d.ts +10 -0
- package/dist/components/gia/GiaMentionText.js +66 -0
- package/dist/components/gia/GiaMentionText.js.map +1 -0
- package/dist/components/gia/mentionParsing.d.ts +79 -0
- package/dist/components/gia/mentionParsing.js +44 -0
- package/dist/components/gia/mentionParsing.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +66 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +68 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +45 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +105 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +58 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/calendar.js +175 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +33 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.js +148 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +233 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +23 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +24 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +120 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +82 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +33 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +62 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +28 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.js +129 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +116 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.js +93 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +20 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +57 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui-garantiabr/Alert.d.ts +17 -0
- package/dist/components/ui-garantiabr/Alert.js +77 -0
- package/dist/components/ui-garantiabr/Alert.js.map +1 -0
- package/dist/components/ui-garantiabr/accordion.d.ts +46 -0
- package/dist/components/ui-garantiabr/accordion.js +114 -0
- package/dist/components/ui-garantiabr/accordion.js.map +1 -0
- package/dist/components/ui-garantiabr/alertBanner.d.ts +14 -0
- package/dist/components/ui-garantiabr/alertBanner.js +49 -0
- package/dist/components/ui-garantiabr/alertBanner.js.map +1 -0
- package/dist/components/ui-garantiabr/altTabs.d.ts +19 -0
- package/dist/components/ui-garantiabr/altTabs.js +33 -0
- package/dist/components/ui-garantiabr/altTabs.js.map +1 -0
- package/dist/components/ui-garantiabr/appLayout.d.ts +56 -0
- package/dist/components/ui-garantiabr/appLayout.js +177 -0
- package/dist/components/ui-garantiabr/appLayout.js.map +1 -0
- package/dist/components/ui-garantiabr/avatar.d.ts +15 -0
- package/dist/components/ui-garantiabr/avatar.js +38 -0
- package/dist/components/ui-garantiabr/avatar.js.map +1 -0
- package/dist/components/ui-garantiabr/badge.d.ts +17 -0
- package/dist/components/ui-garantiabr/badge.js +54 -0
- package/dist/components/ui-garantiabr/badge.js.map +1 -0
- package/dist/components/ui-garantiabr/badgeNotification.d.ts +10 -0
- package/dist/components/ui-garantiabr/badgeNotification.js +41 -0
- package/dist/components/ui-garantiabr/badgeNotification.js.map +1 -0
- package/dist/components/ui-garantiabr/breadcrumb.d.ts +10 -0
- package/dist/components/ui-garantiabr/breadcrumb.js +61 -0
- package/dist/components/ui-garantiabr/breadcrumb.js.map +1 -0
- package/dist/components/ui-garantiabr/button.d.ts +23 -0
- package/dist/components/ui-garantiabr/button.js +71 -0
- package/dist/components/ui-garantiabr/button.js.map +1 -0
- package/dist/components/ui-garantiabr/buttonIcon.d.ts +15 -0
- package/dist/components/ui-garantiabr/buttonIcon.js +48 -0
- package/dist/components/ui-garantiabr/buttonIcon.js.map +1 -0
- package/dist/components/ui-garantiabr/calendar.d.ts +20 -0
- package/dist/components/ui-garantiabr/calendar.js +73 -0
- package/dist/components/ui-garantiabr/calendar.js.map +1 -0
- package/dist/components/ui-garantiabr/card.d.ts +12 -0
- package/dist/components/ui-garantiabr/card.js +31 -0
- package/dist/components/ui-garantiabr/card.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_area.d.ts +29 -0
- package/dist/components/ui-garantiabr/chart_area.js +62 -0
- package/dist/components/ui-garantiabr/chart_area.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar.d.ts +35 -0
- package/dist/components/ui-garantiabr/chart_bar.js +46 -0
- package/dist/components/ui-garantiabr/chart_bar.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.d.ts +28 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js +57 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.d.ts +26 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.js +44 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_composed.d.ts +36 -0
- package/dist/components/ui-garantiabr/chart_composed.js +70 -0
- package/dist/components/ui-garantiabr/chart_composed.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_funnel.d.ts +13 -0
- package/dist/components/ui-garantiabr/chart_funnel.js +25 -0
- package/dist/components/ui-garantiabr/chart_funnel.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_line.d.ts +27 -0
- package/dist/components/ui-garantiabr/chart_line.js +43 -0
- package/dist/components/ui-garantiabr/chart_line.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_pie.d.ts +26 -0
- package/dist/components/ui-garantiabr/chart_pie.js +62 -0
- package/dist/components/ui-garantiabr/chart_pie.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_statcard.d.ts +22 -0
- package/dist/components/ui-garantiabr/chart_statcard.js +175 -0
- package/dist/components/ui-garantiabr/chart_statcard.js.map +1 -0
- package/dist/components/ui-garantiabr/checkbox.d.ts +10 -0
- package/dist/components/ui-garantiabr/checkbox.js +31 -0
- package/dist/components/ui-garantiabr/checkbox.js.map +1 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.d.ts +12 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.js +40 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.js.map +1 -0
- package/dist/components/ui-garantiabr/chip.d.ts +12 -0
- package/dist/components/ui-garantiabr/chip.js +49 -0
- package/dist/components/ui-garantiabr/chip.js.map +1 -0
- package/dist/components/ui-garantiabr/codeBlock.d.ts +27 -0
- package/dist/components/ui-garantiabr/codeBlock.js +100 -0
- package/dist/components/ui-garantiabr/codeBlock.js.map +1 -0
- package/dist/components/ui-garantiabr/commandPalette.d.ts +67 -0
- package/dist/components/ui-garantiabr/commandPalette.js +278 -0
- package/dist/components/ui-garantiabr/commandPalette.js.map +1 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.d.ts +10 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.js +13 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.js.map +1 -0
- package/dist/components/ui-garantiabr/dashCard.d.ts +16 -0
- package/dist/components/ui-garantiabr/dashCard.js +51 -0
- package/dist/components/ui-garantiabr/dashCard.js.map +1 -0
- package/dist/components/ui-garantiabr/datePicker.d.ts +23 -0
- package/dist/components/ui-garantiabr/datePicker.js +143 -0
- package/dist/components/ui-garantiabr/datePicker.js.map +1 -0
- package/dist/components/ui-garantiabr/dialog.d.ts +14 -0
- package/dist/components/ui-garantiabr/dialog.js +69 -0
- package/dist/components/ui-garantiabr/dialog.js.map +1 -0
- package/dist/components/ui-garantiabr/divider.d.ts +7 -0
- package/dist/components/ui-garantiabr/divider.js +27 -0
- package/dist/components/ui-garantiabr/divider.js.map +1 -0
- package/dist/components/ui-garantiabr/dropdownMenu.d.ts +47 -0
- package/dist/components/ui-garantiabr/dropdownMenu.js +89 -0
- package/dist/components/ui-garantiabr/dropdownMenu.js.map +1 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.d.ts +18 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.js +66 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.js.map +1 -0
- package/dist/components/ui-garantiabr/emptyState.d.ts +12 -0
- package/dist/components/ui-garantiabr/emptyState.js +68 -0
- package/dist/components/ui-garantiabr/emptyState.js.map +1 -0
- package/dist/components/ui-garantiabr/fileUpload.d.ts +78 -0
- package/dist/components/ui-garantiabr/fileUpload.js +552 -0
- package/dist/components/ui-garantiabr/fileUpload.js.map +1 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.d.ts +9 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.js +50 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.js.map +1 -0
- package/dist/components/ui-garantiabr/footer.d.ts +11 -0
- package/dist/components/ui-garantiabr/footer.js +31 -0
- package/dist/components/ui-garantiabr/footer.js.map +1 -0
- package/dist/components/ui-garantiabr/giaButton.d.ts +6 -0
- package/dist/components/ui-garantiabr/giaButton.js +22 -0
- package/dist/components/ui-garantiabr/giaButton.js.map +1 -0
- package/dist/components/ui-garantiabr/giaIcon.d.ts +6 -0
- package/dist/components/ui-garantiabr/giaIcon.js +49 -0
- package/dist/components/ui-garantiabr/giaIcon.js.map +1 -0
- package/dist/components/ui-garantiabr/helperText.d.ts +6 -0
- package/dist/components/ui-garantiabr/helperText.js +25 -0
- package/dist/components/ui-garantiabr/helperText.js.map +1 -0
- package/dist/components/ui-garantiabr/hoverCard.d.ts +12 -0
- package/dist/components/ui-garantiabr/hoverCard.js +33 -0
- package/dist/components/ui-garantiabr/hoverCard.js.map +1 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.d.ts +4 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.js +19 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.js.map +1 -0
- package/dist/components/ui-garantiabr/input.d.ts +4 -0
- package/dist/components/ui-garantiabr/input.js +21 -0
- package/dist/components/ui-garantiabr/input.js.map +1 -0
- package/dist/components/ui-garantiabr/inputCounter.d.ts +14 -0
- package/dist/components/ui-garantiabr/inputCounter.js +117 -0
- package/dist/components/ui-garantiabr/inputCounter.js.map +1 -0
- package/dist/components/ui-garantiabr/inputFormField.d.ts +22 -0
- package/dist/components/ui-garantiabr/inputFormField.js +129 -0
- package/dist/components/ui-garantiabr/inputFormField.js.map +1 -0
- package/dist/components/ui-garantiabr/inputMasked.d.ts +12 -0
- package/dist/components/ui-garantiabr/inputMasked.js +130 -0
- package/dist/components/ui-garantiabr/inputMasked.js.map +1 -0
- package/dist/components/ui-garantiabr/inputSearch.d.ts +16 -0
- package/dist/components/ui-garantiabr/inputSearch.js +104 -0
- package/dist/components/ui-garantiabr/inputSearch.js.map +1 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.d.ts +30 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.js +72 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.js.map +1 -0
- package/dist/components/ui-garantiabr/loadingSpinner.d.ts +9 -0
- package/dist/components/ui-garantiabr/loadingSpinner.js +57 -0
- package/dist/components/ui-garantiabr/loadingSpinner.js.map +1 -0
- package/dist/components/ui-garantiabr/messageComposer.d.ts +62 -0
- package/dist/components/ui-garantiabr/messageComposer.js +296 -0
- package/dist/components/ui-garantiabr/messageComposer.js.map +1 -0
- package/dist/components/ui-garantiabr/mobileDrawer.d.ts +11 -0
- package/dist/components/ui-garantiabr/mobileDrawer.js +102 -0
- package/dist/components/ui-garantiabr/mobileDrawer.js.map +1 -0
- package/dist/components/ui-garantiabr/multiSelectField.d.ts +27 -0
- package/dist/components/ui-garantiabr/multiSelectField.js +140 -0
- package/dist/components/ui-garantiabr/multiSelectField.js.map +1 -0
- package/dist/components/ui-garantiabr/navbar.d.ts +82 -0
- package/dist/components/ui-garantiabr/navbar.js +417 -0
- package/dist/components/ui-garantiabr/navbar.js.map +1 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.d.ts +15 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.js +146 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.js.map +1 -0
- package/dist/components/ui-garantiabr/notificationCard.d.ts +35 -0
- package/dist/components/ui-garantiabr/notificationCard.js +70 -0
- package/dist/components/ui-garantiabr/notificationCard.js.map +1 -0
- package/dist/components/ui-garantiabr/optionSelect.d.ts +64 -0
- package/dist/components/ui-garantiabr/optionSelect.js +117 -0
- package/dist/components/ui-garantiabr/optionSelect.js.map +1 -0
- package/dist/components/ui-garantiabr/pagination.d.ts +13 -0
- package/dist/components/ui-garantiabr/pagination.js +141 -0
- package/dist/components/ui-garantiabr/pagination.js.map +1 -0
- package/dist/components/ui-garantiabr/popover.d.ts +18 -0
- package/dist/components/ui-garantiabr/popover.js +57 -0
- package/dist/components/ui-garantiabr/popover.js.map +1 -0
- package/dist/components/ui-garantiabr/productLogotype.d.ts +14 -0
- package/dist/components/ui-garantiabr/productLogotype.js +40 -0
- package/dist/components/ui-garantiabr/productLogotype.js.map +1 -0
- package/dist/components/ui-garantiabr/productSwitcher.d.ts +20 -0
- package/dist/components/ui-garantiabr/productSwitcher.js +62 -0
- package/dist/components/ui-garantiabr/productSwitcher.js.map +1 -0
- package/dist/components/ui-garantiabr/progressBar.d.ts +12 -0
- package/dist/components/ui-garantiabr/progressBar.js +32 -0
- package/dist/components/ui-garantiabr/progressBar.js.map +1 -0
- package/dist/components/ui-garantiabr/radioGroup.d.ts +14 -0
- package/dist/components/ui-garantiabr/radioGroup.js +47 -0
- package/dist/components/ui-garantiabr/radioGroup.js.map +1 -0
- package/dist/components/ui-garantiabr/segmentedControl.d.ts +28 -0
- package/dist/components/ui-garantiabr/segmentedControl.js +62 -0
- package/dist/components/ui-garantiabr/segmentedControl.js.map +1 -0
- package/dist/components/ui-garantiabr/select.d.ts +27 -0
- package/dist/components/ui-garantiabr/select.js +166 -0
- package/dist/components/ui-garantiabr/select.js.map +1 -0
- package/dist/components/ui-garantiabr/selectField.d.ts +12 -0
- package/dist/components/ui-garantiabr/selectField.js +38 -0
- package/dist/components/ui-garantiabr/selectField.js.map +1 -0
- package/dist/components/ui-garantiabr/sheet.d.ts +16 -0
- package/dist/components/ui-garantiabr/sheet.js +74 -0
- package/dist/components/ui-garantiabr/sheet.js.map +1 -0
- package/dist/components/ui-garantiabr/shinyButton.d.ts +24 -0
- package/dist/components/ui-garantiabr/shinyButton.js +34 -0
- package/dist/components/ui-garantiabr/shinyButton.js.map +1 -0
- package/dist/components/ui-garantiabr/shinyIconButton.d.ts +16 -0
- package/dist/components/ui-garantiabr/shinyIconButton.js +32 -0
- package/dist/components/ui-garantiabr/shinyIconButton.js.map +1 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.d.ts +31 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.js +87 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.js.map +1 -0
- package/dist/components/ui-garantiabr/sidebar.d.ts +36 -0
- package/dist/components/ui-garantiabr/sidebar.js +231 -0
- package/dist/components/ui-garantiabr/sidebar.js.map +1 -0
- package/dist/components/ui-garantiabr/splitButton.d.ts +33 -0
- package/dist/components/ui-garantiabr/splitButton.js +67 -0
- package/dist/components/ui-garantiabr/splitButton.js.map +1 -0
- package/dist/components/ui-garantiabr/stepper.d.ts +9 -0
- package/dist/components/ui-garantiabr/stepper.js +31 -0
- package/dist/components/ui-garantiabr/stepper.js.map +1 -0
- package/dist/components/ui-garantiabr/switch.d.ts +9 -0
- package/dist/components/ui-garantiabr/switch.js +50 -0
- package/dist/components/ui-garantiabr/switch.js.map +1 -0
- package/dist/components/ui-garantiabr/table.d.ts +133 -0
- package/dist/components/ui-garantiabr/table.js +544 -0
- package/dist/components/ui-garantiabr/table.js.map +1 -0
- package/dist/components/ui-garantiabr/tabs.d.ts +27 -0
- package/dist/components/ui-garantiabr/tabs.js +53 -0
- package/dist/components/ui-garantiabr/tabs.js.map +1 -0
- package/dist/components/ui-garantiabr/tagInput.d.ts +13 -0
- package/dist/components/ui-garantiabr/tagInput.js +55 -0
- package/dist/components/ui-garantiabr/tagInput.js.map +1 -0
- package/dist/components/ui-garantiabr/textarea.d.ts +11 -0
- package/dist/components/ui-garantiabr/textarea.js +62 -0
- package/dist/components/ui-garantiabr/textarea.js.map +1 -0
- package/dist/components/ui-garantiabr/timeline.d.ts +29 -0
- package/dist/components/ui-garantiabr/timeline.js +38 -0
- package/dist/components/ui-garantiabr/timeline.js.map +1 -0
- package/dist/components/ui-garantiabr/toastDownload.d.ts +13 -0
- package/dist/components/ui-garantiabr/toastDownload.js +55 -0
- package/dist/components/ui-garantiabr/toastDownload.js.map +1 -0
- package/dist/components/ui-garantiabr/tooltip.d.ts +18 -0
- package/dist/components/ui-garantiabr/tooltip.js +34 -0
- package/dist/components/ui-garantiabr/tooltip.js.map +1 -0
- package/dist/components/ui-garantiabr/topNavegation.d.ts +32 -0
- package/dist/components/ui-garantiabr/topNavegation.js +267 -0
- package/dist/components/ui-garantiabr/topNavegation.js.map +1 -0
- package/dist/components/ui-garantiabr/truncatedText.d.ts +14 -0
- package/dist/components/ui-garantiabr/truncatedText.js +27 -0
- package/dist/components/ui-garantiabr/truncatedText.js.map +1 -0
- package/dist/components/ui-garantiabr/useTemRolagem.d.ts +4 -0
- package/dist/components/ui-garantiabr/useTemRolagem.js +17 -0
- package/dist/components/ui-garantiabr/useTemRolagem.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +7 -0
- package/dist/hooks/useTheme.js +31 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/lib/confianca.d.ts +4 -0
- package/dist/lib/confianca.js +16 -0
- package/dist/lib/confianca.js.map +1 -0
- package/dist/lib/protocolosSuporte.d.ts +29 -0
- package/dist/lib/protocolosSuporte.js +44 -0
- package/dist/lib/protocolosSuporte.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/theme.css +1072 -0
- package/dist/types/svg.d.js +2 -0
- package/dist/types/svg.d.js.map +1 -0
- package/dist/utils/inputMasks.d.ts +5 -0
- package/dist/utils/inputMasks.js +16 -0
- package/dist/utils/inputMasks.js.map +1 -0
- package/dist/utils/useMediaQuery.d.ts +6 -0
- package/dist/utils/useMediaQuery.js +14 -0
- package/dist/utils/useMediaQuery.js.map +1 -0
- package/package.json +94 -4
- package/tools/agent-config.mjs +51 -0
- package/tools/check.mjs +110 -0
- package/tools/eslint-plugin.mjs +115 -0
- package/tools/hooks.mjs +133 -0
- package/tools/mcp.mjs +132 -0
- package/tools/version.mjs +43 -0
- package/tools/workspace.mjs +51 -0
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as i, Fragment as pe, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as xo, useState as u, useRef as d, useEffect as fe } from "react";
|
|
4
|
+
import { X as va, Headset as $e, Link2 as ga, Paperclip as ha } from "lucide-react";
|
|
5
|
+
import { Dialog as ba } from "radix-ui";
|
|
6
|
+
import { Dialog as Aa, DialogPortal as Ca, DialogOverlay as ya, DialogTitle as Na, DialogDescription as Ra } from "../ui/dialog.js";
|
|
7
|
+
import { alertBanner as Fe } from "../ui-garantiabr/alertBanner.js";
|
|
8
|
+
import { Avatar as Oa } from "../ui-garantiabr/avatar.js";
|
|
9
|
+
import { Button as y } from "../ui-garantiabr/button.js";
|
|
10
|
+
import { MessageComposer as wa } from "../ui-garantiabr/messageComposer.js";
|
|
11
|
+
import { ButtonIcon as J } from "../ui-garantiabr/buttonIcon.js";
|
|
12
|
+
import { Dialog as Le } from "../ui-garantiabr/dialog.js";
|
|
13
|
+
import { DropdownMenu as vo } from "../ui-garantiabr/dropdownMenu.js";
|
|
14
|
+
import { GiaIcon as xe } from "../ui-garantiabr/giaIcon.js";
|
|
15
|
+
import { InputFormField as Pa } from "../ui-garantiabr/inputFormField.js";
|
|
16
|
+
import { Select as Ea, SelectItem as go } from "../ui-garantiabr/select.js";
|
|
17
|
+
import { Tooltip as Sa } from "../ui-garantiabr/tooltip.js";
|
|
18
|
+
import { TruncatedText as Ue } from "../ui-garantiabr/truncatedText.js";
|
|
19
|
+
import { cn as v } from "../../lib/utils.js";
|
|
20
|
+
import { formatarHora as za } from "../chat/chatFormatting.js";
|
|
21
|
+
import { ChatConversationsDrawer as ho } from "../chat/ChatConversationsDrawer.js";
|
|
22
|
+
import { GiaAudioPlayer as bo } from "./GiaAudioPlayer.js";
|
|
23
|
+
import { GiaEmptyStateIllustration as Da } from "./GiaEmptyStateIllustration.js";
|
|
24
|
+
import { GiaMentionAutocomplete as ve } from "./GiaMentionAutocomplete.js";
|
|
25
|
+
import { GiaMentionText as Ao } from "./GiaMentionText.js";
|
|
26
|
+
import { analisarMencoes as Co, MARCADOR_PASTA as yo, MARCADOR_DOCUMENTO as No, MARCADOR_ELEMENTO as Ro, MARCADOR_USUARIO as Ia } from "./mentionParsing.js";
|
|
27
|
+
import { useChatWindowFrame as Ta, SETTLE_TRANSITION as ka } from "../chat/useChatWindowFrame.js";
|
|
28
|
+
import { carregarProtocolos as ge, salvarProtocolos as qe, classificarNivelMensagem as Ma, criarProtocolo as _a, RESPOSTA_SUPORTE_MOCK as Ga } from "../../lib/protocolosSuporte.js";
|
|
29
|
+
const $a = [
|
|
30
|
+
{
|
|
31
|
+
prefixo: "/pastas",
|
|
32
|
+
sugestoes: ["Resuma esta pasta para mim", "Quais documentos estão pendentes?", "O que é uma matrícula de imóvel?"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
prefixo: "/acervo",
|
|
36
|
+
sugestoes: [
|
|
37
|
+
"Quais documentos precisam de revisão?",
|
|
38
|
+
"Qual documento venceu recentemente?",
|
|
39
|
+
"Como funciona a recorrência de um documento?"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
prefixo: "/solicitacoes",
|
|
44
|
+
sugestoes: [
|
|
45
|
+
"Resuma esta solicitação para mim",
|
|
46
|
+
"Quais documentos ainda faltam entregar?",
|
|
47
|
+
"Qual o status desta solicitação?"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
prefixo: "/ajuda",
|
|
52
|
+
sugestoes: ["Como abro um chamado de suporte?", "Onde vejo meus chamados anteriores?", "Como falo com um atendente?"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
prefixo: "/dashboard",
|
|
56
|
+
sugestoes: ["O que mudou desde ontem?", "Quais pastas precisam de atenção?", "Resuma minhas pendências"]
|
|
57
|
+
}
|
|
58
|
+
], Fa = [
|
|
59
|
+
"O que é uma matrícula de imóvel?",
|
|
60
|
+
"Como funciona a recorrência de um documento?",
|
|
61
|
+
"Como solicito um novo documento?"
|
|
62
|
+
], La = /^https?:\/\/\S+$/i;
|
|
63
|
+
function qa(c, p, m) {
|
|
64
|
+
return p.find((w) => c.startsWith(w.prefixo))?.sugestoes ?? m;
|
|
65
|
+
}
|
|
66
|
+
const Ua = [
|
|
67
|
+
{ nome: "Luiz Alvarez", cargo: "Analista de Operações", email: "luiz.alvarez@exemplo.com.br" },
|
|
68
|
+
{ nome: "Marina Ferreira", cargo: "Gerente de Contas", email: "marina.ferreira@exemplo.com.br" },
|
|
69
|
+
{ nome: "Ricardo Nogueira", cargo: "Analista Jurídico", email: "ricardo.nogueira@exemplo.com.br" },
|
|
70
|
+
{ nome: "Camila Duarte", cargo: "Especialista em Due Diligence", email: "camila.duarte@exemplo.com.br" }
|
|
71
|
+
], Va = [
|
|
72
|
+
{ nome: "Ana Beatriz Souza", tipo: "pessoa", identificadorRotulo: "CPF", identificadorValor: "234.567.890-11" },
|
|
73
|
+
{ nome: "Marcos Vilela", tipo: "pessoa", identificadorRotulo: "CPF", identificadorValor: "345.678.901-22" },
|
|
74
|
+
{ nome: "Renata Pissolito", tipo: "pessoa", identificadorRotulo: "CPF", identificadorValor: "456.789.012-33" },
|
|
75
|
+
{ nome: "GarantiaBR Participações Ltda", tipo: "empresa", identificadorRotulo: "CNPJ", identificadorValor: "12.345.678/0001-90" },
|
|
76
|
+
{ nome: "Processo de Avaliação de Bens", tipo: "processo", identificadorRotulo: "Nº do processo", identificadorValor: "2024.00123456-7" },
|
|
77
|
+
{ nome: "Apartamento Jardim das Flores", tipo: "bem", identificadorRotulo: "Matrícula", identificadorValor: "45.678" }
|
|
78
|
+
], ja = [
|
|
79
|
+
{ nome: "Certidão Negativa de Débitos Municipais (CND Municipal)", tipo: "Certidão" },
|
|
80
|
+
{ nome: "Certidão de Distribuição (Justiça Federal)", tipo: "Certidão" },
|
|
81
|
+
{ nome: "Certidão de Matrícula do Imóvel", tipo: "Matrícula" },
|
|
82
|
+
{ nome: "Comprovante de Endereço", tipo: "Comprovante" },
|
|
83
|
+
{ nome: "Contrato Social", tipo: "Societário" }
|
|
84
|
+
], Ba = [
|
|
85
|
+
{ nome: "Financiamento imobiliário — Ana Beatriz Souza", tipoOperacao: "Financiamento imobiliário" },
|
|
86
|
+
{ nome: "Crédito consignado — Marina Ferreira", tipoOperacao: "Crédito consignado" },
|
|
87
|
+
{ nome: "Due diligence societária — Horizonte Participações", tipoOperacao: "Due diligence societária" },
|
|
88
|
+
{ nome: "Financiamento de veículo — João Pedro Alves", tipoOperacao: "Financiamento de veículo" }
|
|
89
|
+
], Qa = [
|
|
90
|
+
{ nome: "Dashboard", descricao: "Indicadores de performance e visão geral das operações." },
|
|
91
|
+
{ nome: "Gestão de pastas", descricao: "Lista e detalhes das pastas em andamento." },
|
|
92
|
+
{ nome: "Solicitações", descricao: "Acompanhamento das solicitações abertas." },
|
|
93
|
+
{ nome: "Acervo", descricao: "Documentos e arquivos armazenados na plataforma." },
|
|
94
|
+
{ nome: "Workflows", descricao: "Fluxos de automação configurados na plataforma." }
|
|
95
|
+
], Oo = "Essa é uma prévia da Gia — ainda não estou conectada aos dados reais da plataforma. Em breve vou responder com base na sua operação.", Ha = "Recebi seu áudio! Essa é uma prévia da Gia — ainda não consigo transcrever áudios de verdade, mas em breve vou conseguir.", Ja = "gia-conversas", Ka = "Luiz Alvarez";
|
|
96
|
+
function Wa(c) {
|
|
97
|
+
return c.trim().split(/\s+/).slice(0, 2).map((m) => m[0]?.toUpperCase() ?? "").join("");
|
|
98
|
+
}
|
|
99
|
+
function Xa(c) {
|
|
100
|
+
try {
|
|
101
|
+
const p = window.localStorage.getItem(c);
|
|
102
|
+
if (!p) return [];
|
|
103
|
+
const m = JSON.parse(p);
|
|
104
|
+
return Array.isArray(m) ? m : [];
|
|
105
|
+
} catch {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function wo(c) {
|
|
110
|
+
return c.tipo === "audio" ? "Mensagem de áudio" : c.texto?.trim() ? c.texto.length > 44 ? `${c.texto.slice(0, 44)}...` : c.texto : c.anexos?.length ? c.anexos[0].nome : "Nova conversa";
|
|
111
|
+
}
|
|
112
|
+
const Po = [
|
|
113
|
+
"Oi, preciso de uma atualização sobre o status da minha solicitação, pode me ajudar?",
|
|
114
|
+
"Gostaria de saber quais documentos ainda faltam para concluir essa operação.",
|
|
115
|
+
"Pode verificar se a avaliação do bem já foi finalizada?",
|
|
116
|
+
"Preciso confirmar o prazo de retorno dessa análise, você consegue me dizer?"
|
|
117
|
+
];
|
|
118
|
+
function Eo(c, p = 40) {
|
|
119
|
+
if (c.length === 0) return new Array(p).fill(0.15);
|
|
120
|
+
const m = c.length / p;
|
|
121
|
+
return Array.from({ length: p }, (L, w) => {
|
|
122
|
+
const K = Math.floor(w * m), he = Math.max(K + 1, Math.floor((w + 1) * m)), W = c.slice(K, he);
|
|
123
|
+
return W.reduce((be, N) => be + N, 0) / W.length;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function Za({ nome: c, className: p }) {
|
|
127
|
+
return /* @__PURE__ */ o(Ue, { text: c, className: v("max-w-[140px] truncate", p) });
|
|
128
|
+
}
|
|
129
|
+
function wt({
|
|
130
|
+
open: c,
|
|
131
|
+
onOpenChange: p,
|
|
132
|
+
janela: m,
|
|
133
|
+
onJanelaChange: L,
|
|
134
|
+
usuarioAtual: w = Ka,
|
|
135
|
+
currentPath: K,
|
|
136
|
+
contextoAtual: he,
|
|
137
|
+
onNavigate: W,
|
|
138
|
+
rotaProtocolo: be = (X) => `/ajuda/chamados/${X}`,
|
|
139
|
+
usuariosMencionaveis: N = Ua,
|
|
140
|
+
elementosMencionaveis: I = Va,
|
|
141
|
+
documentosMencionaveis: T = ja,
|
|
142
|
+
pastasMencionaveis: P = Ba,
|
|
143
|
+
paginasMencionaveis: q = Qa,
|
|
144
|
+
sugestoesPorTela: Ve = $a,
|
|
145
|
+
sugestoesPadrao: je = Fa,
|
|
146
|
+
chaveArmazenamento: Be = Ja
|
|
147
|
+
}) {
|
|
148
|
+
const X = K ?? (typeof window < "u" ? window.location.pathname : "/"), So = W ?? ((e) => {
|
|
149
|
+
typeof window < "u" && (window.location.href = e);
|
|
150
|
+
}), zo = xo(() => qa(X, Ve, je), [X, Ve, je]), [Z, k] = u(() => Xa(Be)), [Ae, Qe] = u(null), [Ce, M] = u(!1), [R, Y] = u(""), [He, E] = u(!1), Je = xo(
|
|
151
|
+
() => Co(R, {
|
|
152
|
+
usuarios: N,
|
|
153
|
+
elementos: I,
|
|
154
|
+
documentos: T,
|
|
155
|
+
pastas: P,
|
|
156
|
+
paginas: q
|
|
157
|
+
}).some((e) => e.tipo !== "texto"),
|
|
158
|
+
[R, N, I, T, P, q]
|
|
159
|
+
), [Do, ye] = u(!1), [Ke, U] = u(!1), [We, Ne] = u(!1), [Xe, Re] = u(0), [Io, Ze] = u(null), [To, ee] = u([]), [f, Oe] = u(null), [we, V] = u([]), [x, b] = u(null), [g, Ye] = u(null), [oe, ae] = u(null), [_, j] = u(null), [eo, oo] = u(null), [ko, Mo] = u(null), [te, B] = u(null), { contentRect: _o, radiusClass: Go } = Ta(c, m), ao = d(null), S = d(null), z = d(null), Pe = d(null), re = d([]), h = d(null), ne = d(null), ie = d(null), G = d(null), se = d([]), ce = d(null), Q = d(null), H = d(null), Ee = d(null), $ = d(0), Se = d(null), A = d(null), to = d(null), ze = (e) => {
|
|
160
|
+
to.current = e, Mo(e);
|
|
161
|
+
}, De = (e) => {
|
|
162
|
+
A.current = e, Qe(e);
|
|
163
|
+
}, C = Z.find((e) => e.id === Ae) ?? null, D = C?.mensagens ?? [], ro = C?.pastaVinculada ?? ko ?? he;
|
|
164
|
+
fe(() => {
|
|
165
|
+
ao.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
166
|
+
}, [D, He]), fe(() => {
|
|
167
|
+
try {
|
|
168
|
+
window.localStorage.setItem(Be, JSON.stringify(Z));
|
|
169
|
+
} catch {
|
|
170
|
+
}
|
|
171
|
+
}, [Z]), fe(() => {
|
|
172
|
+
if (g)
|
|
173
|
+
return Se.current = setInterval(() => {
|
|
174
|
+
const e = ge().find((r) => r.id === g.id);
|
|
175
|
+
if (!e) return;
|
|
176
|
+
const a = new Set(D.map((r) => r.id)), t = e.mensagens.filter((r) => !a.has(`protocolo-${r.id}`)).filter((r) => r.autor === "suporte").map(
|
|
177
|
+
(r) => ({
|
|
178
|
+
id: `protocolo-${r.id}`,
|
|
179
|
+
autor: "suporte",
|
|
180
|
+
tipo: "texto",
|
|
181
|
+
texto: r.texto,
|
|
182
|
+
criadoEm: r.criadoEm
|
|
183
|
+
})
|
|
184
|
+
);
|
|
185
|
+
t.length > 0 && F(t);
|
|
186
|
+
}, 3e3), () => {
|
|
187
|
+
Se.current && clearInterval(Se.current);
|
|
188
|
+
};
|
|
189
|
+
}, [g, D]);
|
|
190
|
+
const Ie = () => {
|
|
191
|
+
Pe.current?.getTracks().forEach((e) => e.stop()), Pe.current = null, z.current = null, G.current && clearInterval(G.current), G.current = null, ie.current = null, ne.current && (ne.current.close().catch(() => {
|
|
192
|
+
}), ne.current = null);
|
|
193
|
+
};
|
|
194
|
+
fe(
|
|
195
|
+
() => () => {
|
|
196
|
+
S.current && clearTimeout(S.current), h.current && clearInterval(h.current), Q.current && clearTimeout(Q.current), Ie();
|
|
197
|
+
},
|
|
198
|
+
[]
|
|
199
|
+
);
|
|
200
|
+
const F = (e) => {
|
|
201
|
+
const a = A.current, t = a ?? `conversa-${Date.now()}`;
|
|
202
|
+
k((r) => a && r.some((s) => s.id === a) ? r.map(
|
|
203
|
+
(s) => s.id === a ? { ...s, mensagens: [...s.mensagens, ...e], atualizadoEm: Date.now() } : s
|
|
204
|
+
) : [{
|
|
205
|
+
id: t,
|
|
206
|
+
titulo: wo(e[0]),
|
|
207
|
+
mensagens: e,
|
|
208
|
+
atualizadoEm: Date.now(),
|
|
209
|
+
pastaVinculada: to.current ?? void 0
|
|
210
|
+
}, ...r]), a || (A.current = t, Qe(t));
|
|
211
|
+
}, no = (e) => {
|
|
212
|
+
E(!0), S.current = setTimeout(() => {
|
|
213
|
+
F([{ id: `msg-${Date.now()}-gia`, autor: "gia", tipo: "texto", texto: e, criadoEm: Date.now() }]), E(!1);
|
|
214
|
+
}, 900);
|
|
215
|
+
}, $o = {
|
|
216
|
+
2: "Essa é uma configuração bem específica — acho melhor te colocar em contato com o nosso suporte especializado. Quer que eu abra um protocolo?",
|
|
217
|
+
3: "Isso parece ser um problema técnico que passa da minha alçada. Quer que eu abra um protocolo com o suporte para investigar?"
|
|
218
|
+
}, Fo = (e, a) => {
|
|
219
|
+
E(!0), S.current = setTimeout(() => {
|
|
220
|
+
const t = Date.now();
|
|
221
|
+
F([
|
|
222
|
+
{ id: `msg-${t}-gia`, autor: "gia", tipo: "texto", texto: Oo, criadoEm: t },
|
|
223
|
+
{
|
|
224
|
+
id: `msg-${t}-oferta`,
|
|
225
|
+
autor: "gia",
|
|
226
|
+
tipo: "oferta-protocolo",
|
|
227
|
+
texto: $o[e],
|
|
228
|
+
ofertaProtocolo: { nivel: e, textoOrigem: a, status: "pendente" },
|
|
229
|
+
criadoEm: t
|
|
230
|
+
}
|
|
231
|
+
]), E(!1);
|
|
232
|
+
}, 900);
|
|
233
|
+
}, Lo = (e) => {
|
|
234
|
+
E(!0), S.current = setTimeout(() => {
|
|
235
|
+
const a = Date.now(), t = { id: `sup-msg-${a}`, autor: "suporte", texto: Ga, criadoEm: a }, r = ge();
|
|
236
|
+
qe(
|
|
237
|
+
r.map(
|
|
238
|
+
(n) => n.id === e.id ? { ...n, mensagens: [...n.mensagens, t], atualizadoEm: a } : n
|
|
239
|
+
)
|
|
240
|
+
), F([{ id: `protocolo-${t.id}`, autor: "suporte", tipo: "texto", texto: t.texto, criadoEm: a }]), E(!1);
|
|
241
|
+
}, 900);
|
|
242
|
+
}, io = (e, a) => {
|
|
243
|
+
k(
|
|
244
|
+
(t) => t.map(
|
|
245
|
+
(r) => r.id === A.current ? { ...r, mensagens: r.mensagens.map((n) => n.id === e ? { ...n, ofertaProtocolo: a } : n) } : r
|
|
246
|
+
)
|
|
247
|
+
);
|
|
248
|
+
}, qo = (e, a) => {
|
|
249
|
+
io(e, { ...a, status: "recusada" });
|
|
250
|
+
}, Uo = (e, a) => {
|
|
251
|
+
const t = _a(a.nivel, a.textoOrigem, w);
|
|
252
|
+
qe([...ge(), t]), io(e, { ...a, status: "aceita", protocoloId: t.id }), Ye(t), Lo(t);
|
|
253
|
+
}, Vo = (e, a) => ae({ mensagemId: e, oferta: a }), jo = () => {
|
|
254
|
+
oe && (Uo(oe.mensagemId, oe.oferta), ae(null));
|
|
255
|
+
}, Bo = () => Ye(null), Qo = (e) => {
|
|
256
|
+
const t = [...Co(e, {
|
|
257
|
+
usuarios: N,
|
|
258
|
+
elementos: I,
|
|
259
|
+
documentos: T,
|
|
260
|
+
pastas: P,
|
|
261
|
+
paginas: q
|
|
262
|
+
})].reverse().find((n) => n.tipo === "pasta");
|
|
263
|
+
if (!t || t.tipo !== "pasta") return;
|
|
264
|
+
const r = t.pasta.nome;
|
|
265
|
+
if (A.current) {
|
|
266
|
+
const n = A.current;
|
|
267
|
+
k((s) => s.map((l) => l.id === n ? { ...l, pastaVinculada: r } : l));
|
|
268
|
+
} else
|
|
269
|
+
ze(r);
|
|
270
|
+
}, so = (e) => {
|
|
271
|
+
const { texto: a, links: t } = mo(e, !1), r = a.trim(), n = t.length > 0 ? [...we, ...uo(t)] : we;
|
|
272
|
+
if (!r && n.length === 0) return;
|
|
273
|
+
if (r && Qo(r), F([
|
|
274
|
+
{
|
|
275
|
+
id: `msg-${Date.now()}`,
|
|
276
|
+
autor: "usuario",
|
|
277
|
+
tipo: "texto",
|
|
278
|
+
texto: r || void 0,
|
|
279
|
+
anexos: n.length > 0 ? n : void 0,
|
|
280
|
+
criadoEm: Date.now()
|
|
281
|
+
}
|
|
282
|
+
]), Y(""), V([]), b(null), $.current = 0, g && r) {
|
|
283
|
+
const l = Date.now(), O = { id: `sup-msg-${l}`, autor: "usuario", texto: r, criadoEm: l }, de = ge();
|
|
284
|
+
qe(
|
|
285
|
+
de.map(
|
|
286
|
+
(me) => me.id === g.id ? { ...me, mensagens: [...me.mensagens, O], atualizadoEm: l } : me
|
|
287
|
+
)
|
|
288
|
+
);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (!r) return;
|
|
292
|
+
const s = Ma(r);
|
|
293
|
+
s === 1 ? no(Oo) : Fo(s, r);
|
|
294
|
+
}, Ho = (e, a, t, r) => {
|
|
295
|
+
F([
|
|
296
|
+
{ id: `msg-${Date.now()}`, autor: "usuario", tipo: "audio", audioUrl: e, duracaoAudio: a, transcricao: t, ondaEstatica: r, criadoEm: Date.now() }
|
|
297
|
+
]), no(Ha);
|
|
298
|
+
}, co = () => {
|
|
299
|
+
S.current && clearTimeout(S.current), De(null), Y(""), V([]), b(null), $.current = 0, E(!1), M(!1), ze(null);
|
|
300
|
+
}, lo = (e) => {
|
|
301
|
+
De(e), M(!1);
|
|
302
|
+
}, Te = (e) => {
|
|
303
|
+
k((a) => a.filter((t) => t.id !== e)), e === A.current && De(null);
|
|
304
|
+
}, Jo = (e, a) => j({ id: e, valor: a }), Ko = () => B({ valor: ro ?? "" }), Wo = () => {
|
|
305
|
+
if (!te) return;
|
|
306
|
+
const e = te.valor || void 0;
|
|
307
|
+
if (A.current) {
|
|
308
|
+
const a = A.current;
|
|
309
|
+
k((t) => t.map((r) => r.id === a ? { ...r, pastaVinculada: e } : r));
|
|
310
|
+
} else
|
|
311
|
+
ze(e ?? null);
|
|
312
|
+
B(null), Fe.show({
|
|
313
|
+
type: "success",
|
|
314
|
+
title: e ? "Conversa vinculada à pasta." : "Vínculo com a pasta removido.",
|
|
315
|
+
description: e ? `A Gia agora considera o contexto de "${e}".` : "A conversa volta a seguir o contexto da página atual."
|
|
316
|
+
});
|
|
317
|
+
}, Xo = () => {
|
|
318
|
+
if (!_) return;
|
|
319
|
+
const e = _.valor.trim();
|
|
320
|
+
e && (ke(_.id, e), j(null));
|
|
321
|
+
}, ke = (e, a) => {
|
|
322
|
+
k((t) => t.map((r) => r.id === e ? { ...r, titulo: a } : r)), Fe.show({ type: "success", title: "Conversa renomeada.", description: `Novo título: "${a}".` });
|
|
323
|
+
}, Zo = async (e, a) => {
|
|
324
|
+
try {
|
|
325
|
+
await navigator.clipboard.writeText(a), oo(e), Q.current && clearTimeout(Q.current), Q.current = setTimeout(() => oo((t) => t === e ? null : t), 1500);
|
|
326
|
+
} catch {
|
|
327
|
+
Fe.show({
|
|
328
|
+
type: "error",
|
|
329
|
+
title: "Não foi possível copiar a mensagem.",
|
|
330
|
+
description: "Tente novamente em instantes."
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}, Yo = (e) => {
|
|
334
|
+
const a = e.map((t, r) => ({
|
|
335
|
+
id: `anexo-${Date.now()}-${r}`,
|
|
336
|
+
tipo: "arquivo",
|
|
337
|
+
nome: t.name
|
|
338
|
+
}));
|
|
339
|
+
V((t) => [...t, ...a]);
|
|
340
|
+
}, ea = (e) => V((a) => a.filter((t) => t.id !== e)), uo = (e) => e.map((a, t) => ({ id: `anexo-${Date.now()}-${t}`, tipo: "link", nome: a })), mo = (e, a) => {
|
|
341
|
+
const t = e.split(/(\s+)/), r = t.length - 1, n = [], s = t.map((l, O) => a && O === r || !La.test(l) ? l : (n.push(l), ""));
|
|
342
|
+
return n.length === 0 ? { texto: e, links: n } : { texto: s.join(""), links: n };
|
|
343
|
+
}, oa = (e) => {
|
|
344
|
+
const { texto: a, links: t } = mo(e, !0);
|
|
345
|
+
return t.length > 0 && V((r) => [...r, ...uo(t)]), a;
|
|
346
|
+
};
|
|
347
|
+
function Me(e, ...a) {
|
|
348
|
+
const t = [...a, e].map((r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
349
|
+
return new RegExp(`(?:^|\\s)(${t.join("|")})([^\\s]*(?:\\s[^\\s]*){0,3})$`, "u");
|
|
350
|
+
}
|
|
351
|
+
const aa = [
|
|
352
|
+
{ fonte: "usuario", regex: /(@)([^\s@]*(?:\s[^\s@]*){0,3})$/u },
|
|
353
|
+
{ fonte: "elemento", regex: Me(Ro, "/elementos") },
|
|
354
|
+
{ fonte: "documento", regex: Me(No, "/documentos") },
|
|
355
|
+
{ fonte: "pasta", regex: Me(yo, "/pastas") }
|
|
356
|
+
], _e = () => {
|
|
357
|
+
const e = H.current;
|
|
358
|
+
if (!e) return;
|
|
359
|
+
e.value.length < $.current && ($.current = 0);
|
|
360
|
+
const a = e.selectionStart ?? 0, t = e.value.slice(0, a);
|
|
361
|
+
for (const { fonte: r, regex: n } of aa) {
|
|
362
|
+
const s = n.exec(t);
|
|
363
|
+
if (!s) continue;
|
|
364
|
+
const [, l, O] = s, de = a - l.length - O.length;
|
|
365
|
+
if (de < $.current) {
|
|
366
|
+
b(null);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
b({ fonte: r, query: O.replace(/^\s+/u, ""), inicio: de, fim: a });
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
b(null);
|
|
373
|
+
}, ta = () => {
|
|
374
|
+
Ee.current && H.current && (Ee.current.scrollTop = H.current.scrollTop);
|
|
375
|
+
}, ra = {
|
|
376
|
+
usuario: Ia,
|
|
377
|
+
elemento: Ro,
|
|
378
|
+
documento: No,
|
|
379
|
+
pasta: yo
|
|
380
|
+
}, le = (e) => {
|
|
381
|
+
if (!x) return;
|
|
382
|
+
const a = ra[x.fonte], t = H.current, r = R.slice(0, x.inicio), n = R.slice(x.fim), s = e.map((O) => `${a}${O.nome} `).join("");
|
|
383
|
+
Y(`${r}${s}${n}`);
|
|
384
|
+
const l = r.length + s.length;
|
|
385
|
+
$.current = l, requestAnimationFrame(() => {
|
|
386
|
+
t && (t.focus(), t.setSelectionRange(l, l));
|
|
387
|
+
});
|
|
388
|
+
}, po = (e) => {
|
|
389
|
+
const a = new Uint8Array(e.fftSize);
|
|
390
|
+
G.current = setInterval(() => {
|
|
391
|
+
e.getByteTimeDomainData(a);
|
|
392
|
+
const t = a.reduce((n, s) => {
|
|
393
|
+
const l = (s - 128) / 128;
|
|
394
|
+
return n + l * l;
|
|
395
|
+
}, 0), r = Math.min(1, Math.sqrt(t / a.length) * 4);
|
|
396
|
+
se.current.push(r), ee((n) => [...n, r].slice(-30));
|
|
397
|
+
}, 80);
|
|
398
|
+
}, na = async () => {
|
|
399
|
+
Ze(null);
|
|
400
|
+
try {
|
|
401
|
+
const e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
|
|
402
|
+
Pe.current = e, re.current = [];
|
|
403
|
+
const a = new MediaRecorder(e);
|
|
404
|
+
a.ondataavailable = (s) => {
|
|
405
|
+
s.data.size > 0 && re.current.push(s.data);
|
|
406
|
+
}, a.start(), z.current = a, ye(!0), U(!1), Re(0), h.current = setInterval(() => Re((s) => s + 1), 1e3), se.current = [], ee([]);
|
|
407
|
+
const t = window.AudioContext ?? window.webkitAudioContext, r = new t(), n = r.createAnalyser();
|
|
408
|
+
n.fftSize = 256, r.createMediaStreamSource(e).connect(n), ne.current = r, ie.current = n, po(n);
|
|
409
|
+
} catch {
|
|
410
|
+
Ze("Não foi possível acessar o microfone.");
|
|
411
|
+
}
|
|
412
|
+
}, ue = () => {
|
|
413
|
+
ce.current?.pause(), ce.current = null, Ne(!1);
|
|
414
|
+
}, ia = () => {
|
|
415
|
+
if (We) {
|
|
416
|
+
ue();
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const e = new Blob(re.current, { type: "audio/webm" }), a = URL.createObjectURL(e), t = new Audio(a);
|
|
420
|
+
t.onended = () => {
|
|
421
|
+
URL.revokeObjectURL(a), ce.current = null, Ne(!1);
|
|
422
|
+
}, ce.current = t, t.play(), Ne(!0);
|
|
423
|
+
}, sa = () => {
|
|
424
|
+
z.current?.requestData(), z.current?.pause(), h.current && clearInterval(h.current), G.current && clearInterval(G.current), U(!0);
|
|
425
|
+
}, ca = () => {
|
|
426
|
+
ue(), z.current?.resume(), h.current = setInterval(() => Re((e) => e + 1), 1e3), ie.current && po(ie.current), U(!1);
|
|
427
|
+
}, la = () => {
|
|
428
|
+
ue(), z.current?.stop(), h.current && clearInterval(h.current), Ie(), ye(!1), U(!1), ee([]);
|
|
429
|
+
}, ua = () => {
|
|
430
|
+
ue();
|
|
431
|
+
const e = z.current, a = Xe;
|
|
432
|
+
e && (e.onstop = () => {
|
|
433
|
+
const t = new Blob(re.current, { type: "audio/webm" }), r = URL.createObjectURL(t), n = Po[Math.floor(Math.random() * Po.length)];
|
|
434
|
+
Oe({ url: r, duracao: a, transcricao: n, ondaEstatica: Eo(se.current) }), Ie();
|
|
435
|
+
}, e.stop(), h.current && clearInterval(h.current), ye(!1), U(!1), ee([]));
|
|
436
|
+
}, da = () => {
|
|
437
|
+
f && URL.revokeObjectURL(f.url), Oe(null);
|
|
438
|
+
}, ma = () => {
|
|
439
|
+
f && (Ho(f.url, f.duracao, f.transcricao, f.ondaEstatica), Oe(null));
|
|
440
|
+
}, pa = [...Z].sort((e, a) => a.atualizadoEm - e.atualizadoEm), Ge = m === "fullscreen", fo = pa.map((e) => ({
|
|
441
|
+
id: e.id,
|
|
442
|
+
titulo: e.titulo,
|
|
443
|
+
preview: wo(e.mensagens[e.mensagens.length - 1])
|
|
444
|
+
})), fa = [
|
|
445
|
+
{ label: "Chat flutuante", icon: "PictureInPicture2", disabled: m === "floating", onClick: () => L("floating") },
|
|
446
|
+
{ label: "Chat lateral", icon: "PanelRight", disabled: m === "sidetray", onClick: () => L("sidetray") },
|
|
447
|
+
{ label: "Tela cheia", icon: "Fullscreen", disabled: m === "fullscreen", onClick: () => L("fullscreen") }
|
|
448
|
+
], xa = [
|
|
449
|
+
{
|
|
450
|
+
label: "Renomear esta conversa",
|
|
451
|
+
icon: "Pencil",
|
|
452
|
+
disabled: !C,
|
|
453
|
+
onClick: () => C && Jo(C.id, C.titulo)
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
label: "Alterar pasta",
|
|
457
|
+
icon: "FolderOpen",
|
|
458
|
+
onClick: Ko
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
label: "Excluir esta conversa",
|
|
462
|
+
icon: "Trash",
|
|
463
|
+
styleType: "destructive",
|
|
464
|
+
disabled: !C,
|
|
465
|
+
onClick: () => C && Te(C.id)
|
|
466
|
+
}
|
|
467
|
+
];
|
|
468
|
+
return /* @__PURE__ */ i(pe, { children: [
|
|
469
|
+
/* @__PURE__ */ o(Aa, { open: c, onOpenChange: p, children: /* @__PURE__ */ i(Ca, { children: [
|
|
470
|
+
/* @__PURE__ */ o(ya, { className: v("z-40", m === "fullscreen" ? "bg-overlay" : "bg-transparent") }),
|
|
471
|
+
/* @__PURE__ */ i(
|
|
472
|
+
ba.Content,
|
|
473
|
+
{
|
|
474
|
+
onPointerDownOutside: (e) => e.preventDefault(),
|
|
475
|
+
onInteractOutside: (e) => e.preventDefault(),
|
|
476
|
+
style: { ..._o, transition: ka },
|
|
477
|
+
className: v(
|
|
478
|
+
"fixed z-50 flex flex-col overflow-hidden bg-surface opacity-0 scale-95 transition-[opacity,transform] duration-200 ease-out data-[state=open]:opacity-100 data-[state=open]:scale-100",
|
|
479
|
+
Go
|
|
480
|
+
),
|
|
481
|
+
children: [
|
|
482
|
+
/* @__PURE__ */ o(Na, { className: "sr-only", children: "Pergunte à Gia" }),
|
|
483
|
+
/* @__PURE__ */ o(Ra, { className: "sr-only", children: "Painel de chat com a assistente Gia" }),
|
|
484
|
+
/* @__PURE__ */ i("div", { className: "relative flex min-h-0 flex-1 overflow-hidden", children: [
|
|
485
|
+
Ge ? null : /* @__PURE__ */ o(
|
|
486
|
+
"div",
|
|
487
|
+
{
|
|
488
|
+
"aria-hidden": "true",
|
|
489
|
+
onClick: () => M(!1),
|
|
490
|
+
className: v(
|
|
491
|
+
"absolute inset-0 z-10 bg-overlay transition-opacity duration-300",
|
|
492
|
+
Ce ? "opacity-100" : "pointer-events-none opacity-0"
|
|
493
|
+
)
|
|
494
|
+
}
|
|
495
|
+
),
|
|
496
|
+
Ge ? /* @__PURE__ */ o(
|
|
497
|
+
ho,
|
|
498
|
+
{
|
|
499
|
+
open: !0,
|
|
500
|
+
fixed: !0,
|
|
501
|
+
onOpenChange: M,
|
|
502
|
+
podeNovoChat: D.length > 0,
|
|
503
|
+
onNovoChat: co,
|
|
504
|
+
conversas: fo,
|
|
505
|
+
conversaAtualId: Ae,
|
|
506
|
+
onAbrirConversa: lo,
|
|
507
|
+
onRenomear: ke,
|
|
508
|
+
onExcluir: Te,
|
|
509
|
+
emptyMessage: "Suas conversas com a Gia vão aparecer aqui."
|
|
510
|
+
}
|
|
511
|
+
) : /* @__PURE__ */ o(
|
|
512
|
+
ho,
|
|
513
|
+
{
|
|
514
|
+
open: Ce,
|
|
515
|
+
onOpenChange: M,
|
|
516
|
+
podeNovoChat: D.length > 0,
|
|
517
|
+
onNovoChat: co,
|
|
518
|
+
conversas: fo,
|
|
519
|
+
conversaAtualId: Ae,
|
|
520
|
+
onAbrirConversa: lo,
|
|
521
|
+
onRenomear: ke,
|
|
522
|
+
onExcluir: Te,
|
|
523
|
+
emptyMessage: "Suas conversas com a Gia vão aparecer aqui."
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ i("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [
|
|
527
|
+
/* @__PURE__ */ o("div", { className: "shrink-0 px-xl pt-xl", children: /* @__PURE__ */ i("div", { className: "flex h-16 items-center justify-end gap-md rounded-lg bg-surface-neutral px-md py-xs", children: [
|
|
528
|
+
Ge ? null : /* @__PURE__ */ o(
|
|
529
|
+
J,
|
|
530
|
+
{
|
|
531
|
+
icon: "Menu",
|
|
532
|
+
variant: "ghost",
|
|
533
|
+
size: "sm",
|
|
534
|
+
className: "shrink-0 bg-surface [&_svg]:!size-4",
|
|
535
|
+
"aria-label": "Conversas",
|
|
536
|
+
"aria-expanded": Ce,
|
|
537
|
+
onClick: () => M((e) => !e)
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-xs", children: [
|
|
541
|
+
/* @__PURE__ */ o("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-gradient-to-r from-primary-900 to-primary-600", children: /* @__PURE__ */ o(xe, { className: "size-5" }) }),
|
|
542
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-col", children: [
|
|
543
|
+
/* @__PURE__ */ o("span", { className: "truncate text-sm font-medium text-fg", children: "GIA" }),
|
|
544
|
+
/* @__PURE__ */ o(Ue, { text: ro || "Agente de IA", className: "truncate text-xs text-fg-muted" })
|
|
545
|
+
] })
|
|
546
|
+
] }),
|
|
547
|
+
/* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
548
|
+
/* @__PURE__ */ o(
|
|
549
|
+
vo,
|
|
550
|
+
{
|
|
551
|
+
trigger: /* @__PURE__ */ o(
|
|
552
|
+
J,
|
|
553
|
+
{
|
|
554
|
+
icon: "PanelRight",
|
|
555
|
+
variant: "ghost",
|
|
556
|
+
size: "sm",
|
|
557
|
+
className: "shrink-0 bg-surface [&_svg]:!size-4",
|
|
558
|
+
"aria-label": "Modo de janela"
|
|
559
|
+
}
|
|
560
|
+
),
|
|
561
|
+
items: fa
|
|
562
|
+
}
|
|
563
|
+
),
|
|
564
|
+
/* @__PURE__ */ o(
|
|
565
|
+
vo,
|
|
566
|
+
{
|
|
567
|
+
align: "end",
|
|
568
|
+
trigger: /* @__PURE__ */ o(J, { icon: "Ellipsis", variant: "ghost", size: "sm", className: "shrink-0 bg-surface [&_svg]:!size-4", "aria-label": "Mais opções" }),
|
|
569
|
+
items: xa
|
|
570
|
+
}
|
|
571
|
+
)
|
|
572
|
+
] }),
|
|
573
|
+
/* @__PURE__ */ o(
|
|
574
|
+
"button",
|
|
575
|
+
{
|
|
576
|
+
type: "button",
|
|
577
|
+
"aria-label": "Fechar",
|
|
578
|
+
onClick: () => p(!1),
|
|
579
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-surface-disabled text-fg transition-colors hover:bg-surface-strong",
|
|
580
|
+
children: /* @__PURE__ */ o(va, { className: "size-5", "aria-hidden": "true" })
|
|
581
|
+
}
|
|
582
|
+
)
|
|
583
|
+
] }) }),
|
|
584
|
+
/* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-md overflow-y-auto pt-xl px-xl pb-[40px]", children: D.length === 0 ? /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex w-full flex-col gap-xl", children: [
|
|
585
|
+
m !== "floating" ? /* @__PURE__ */ i("div", { className: "flex flex-col items-center", children: [
|
|
586
|
+
/* @__PURE__ */ o(Da, { className: "size-[192px]" }),
|
|
587
|
+
/* @__PURE__ */ o("p", { className: "text-center text-2xl font-semibold text-fg", children: "Como posso te ajudar hoje?" })
|
|
588
|
+
] }) : null,
|
|
589
|
+
/* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-xs", children: zo.map((e) => /* @__PURE__ */ i(
|
|
590
|
+
"button",
|
|
591
|
+
{
|
|
592
|
+
type: "button",
|
|
593
|
+
onClick: () => so(e),
|
|
594
|
+
className: "flex items-center gap-sm rounded-lg border border-line bg-surface p-md text-left text-base text-fg transition-colors hover:border-primary-500 hover:bg-primary-50 active:border-primary-500 active:bg-primary-200",
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ o("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-primary-200", children: /* @__PURE__ */ o(xe, { className: "size-4" }) }),
|
|
597
|
+
/* @__PURE__ */ o(Ue, { text: e, className: "truncate leading-sm" })
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
e
|
|
601
|
+
)) })
|
|
602
|
+
] }) }) : /* @__PURE__ */ i(pe, { children: [
|
|
603
|
+
D.map((e) => /* @__PURE__ */ i("div", { className: v("group flex flex-col gap-3xs", e.autor === "usuario" ? "items-end" : "items-start"), children: [
|
|
604
|
+
/* @__PURE__ */ i("div", { className: v("flex items-start gap-sm", e.autor === "usuario" && "flex-row-reverse"), children: [
|
|
605
|
+
e.autor === "gia" ? /* @__PURE__ */ o("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-r from-primary-900 to-primary-600", children: /* @__PURE__ */ o(xe, { className: "size-3.5" }) }) : e.autor === "suporte" ? /* @__PURE__ */ o("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-surface-inverse-soft", children: /* @__PURE__ */ o($e, { className: "size-3.5 text-fg-inverse", "aria-hidden": "true" }) }) : /* @__PURE__ */ o(Oa, { size: "sm", initials: Wa(w) }),
|
|
606
|
+
/* @__PURE__ */ o(
|
|
607
|
+
"div",
|
|
608
|
+
{
|
|
609
|
+
className: v(
|
|
610
|
+
"flex max-w-[80%] flex-col gap-3xs rounded-lg px-md py-xs text-sm leading-sm",
|
|
611
|
+
e.autor === "usuario" ? "bg-primary-700 text-fg-on-brand" : "bg-surface-neutral text-fg-secondary"
|
|
612
|
+
),
|
|
613
|
+
children: e.tipo === "oferta-protocolo" && e.ofertaProtocolo ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-xs", children: [
|
|
614
|
+
/* @__PURE__ */ o("p", { children: e.texto }),
|
|
615
|
+
e.ofertaProtocolo.status === "pendente" ? /* @__PURE__ */ i("div", { className: "flex items-center gap-xs", children: [
|
|
616
|
+
/* @__PURE__ */ o(
|
|
617
|
+
y,
|
|
618
|
+
{
|
|
619
|
+
label: "Agora não",
|
|
620
|
+
variant: "secondary",
|
|
621
|
+
size: "sm",
|
|
622
|
+
onClick: () => qo(e.id, e.ofertaProtocolo)
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
/* @__PURE__ */ o(
|
|
626
|
+
y,
|
|
627
|
+
{
|
|
628
|
+
label: "Abrir protocolo",
|
|
629
|
+
variant: "primary",
|
|
630
|
+
size: "sm",
|
|
631
|
+
onClick: () => Vo(e.id, e.ofertaProtocolo)
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
] }) : e.ofertaProtocolo.status === "aceita" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-3xs", children: [
|
|
635
|
+
/* @__PURE__ */ i("p", { className: "text-xs text-fg-muted", children: [
|
|
636
|
+
"Protocolo ",
|
|
637
|
+
e.ofertaProtocolo.protocoloId,
|
|
638
|
+
" aberto com o suporte."
|
|
639
|
+
] }),
|
|
640
|
+
/* @__PURE__ */ o(
|
|
641
|
+
y,
|
|
642
|
+
{
|
|
643
|
+
label: "Ver protocolo",
|
|
644
|
+
variant: "ghost",
|
|
645
|
+
size: "sm",
|
|
646
|
+
className: "self-start",
|
|
647
|
+
onClick: () => So(be(e.ofertaProtocolo.protocoloId))
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
] }) : /* @__PURE__ */ o("p", { className: "text-xs text-fg-muted", children: "Sem problemas, sigo por aqui se precisar." })
|
|
651
|
+
] }) : e.tipo === "audio" && e.audioUrl ? /* @__PURE__ */ i("div", { className: "flex min-w-[256px] flex-col gap-xs", children: [
|
|
652
|
+
/* @__PURE__ */ o(
|
|
653
|
+
bo,
|
|
654
|
+
{
|
|
655
|
+
url: e.audioUrl,
|
|
656
|
+
duracaoTotal: e.duracaoAudio ?? 0,
|
|
657
|
+
ondaEstatica: e.ondaEstatica ?? [],
|
|
658
|
+
variante: e.autor === "usuario" ? "invertido" : "padrao"
|
|
659
|
+
}
|
|
660
|
+
),
|
|
661
|
+
e.transcricao ? /* @__PURE__ */ o("p", { className: v("text-base leading-sm", e.autor === "usuario" ? "text-fg-inverse" : "text-fg"), children: e.transcricao }) : null
|
|
662
|
+
] }) : /* @__PURE__ */ i(pe, { children: [
|
|
663
|
+
e.texto ? (
|
|
664
|
+
// Precisa de um único wrapper aqui: a bolha é `flex flex-col`, então sem isso
|
|
665
|
+
// cada trecho de texto/menção do GiaMentionText vira um item de flex à parte
|
|
666
|
+
// (um por linha, esticado — os chips deixam de ficar "hugged" ao conteúdo).
|
|
667
|
+
/* @__PURE__ */ o("p", { className: "whitespace-pre-wrap break-words", children: /* @__PURE__ */ o(
|
|
668
|
+
Ao,
|
|
669
|
+
{
|
|
670
|
+
texto: e.texto,
|
|
671
|
+
usuarios: N,
|
|
672
|
+
elementos: I,
|
|
673
|
+
documentos: T,
|
|
674
|
+
pastas: P,
|
|
675
|
+
paginas: q,
|
|
676
|
+
variante: e.autor === "usuario" ? "invertido" : "padrao"
|
|
677
|
+
}
|
|
678
|
+
) })
|
|
679
|
+
) : null,
|
|
680
|
+
e.anexos?.length ? /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-3xs", children: e.anexos.map((a) => /* @__PURE__ */ i(
|
|
681
|
+
"span",
|
|
682
|
+
{
|
|
683
|
+
className: v(
|
|
684
|
+
"flex h-8 items-center gap-3xs rounded-full border px-xs text-sm",
|
|
685
|
+
e.autor === "usuario" ? "border-primary-100 bg-primary-100 text-brand-fg-strong" : "border-line-subtle bg-surface-disabled text-fg-secondary"
|
|
686
|
+
),
|
|
687
|
+
children: [
|
|
688
|
+
a.tipo === "link" ? /* @__PURE__ */ o(ga, { className: "size-4 shrink-0", "aria-hidden": "true" }) : /* @__PURE__ */ o(ha, { className: "size-4 shrink-0", "aria-hidden": "true" }),
|
|
689
|
+
/* @__PURE__ */ o(Za, { nome: a.nome })
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
a.id
|
|
693
|
+
)) }) : null
|
|
694
|
+
] })
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
] }),
|
|
698
|
+
/* @__PURE__ */ o("span", { className: v("text-[11px] text-fg-subtle", e.autor === "usuario" ? "mr-11" : "ml-11"), children: za(e.criadoEm) }),
|
|
699
|
+
e.autor === "gia" ? /* @__PURE__ */ o("div", { className: "ml-11 flex items-center gap-3xs opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ o(
|
|
700
|
+
Sa,
|
|
701
|
+
{
|
|
702
|
+
content: eo === e.id ? "Copiado!" : "Copiar",
|
|
703
|
+
trigger: /* @__PURE__ */ o(
|
|
704
|
+
J,
|
|
705
|
+
{
|
|
706
|
+
icon: eo === e.id ? "Check" : "Copy",
|
|
707
|
+
variant: "ghost",
|
|
708
|
+
size: "sm",
|
|
709
|
+
"aria-label": "Copiar mensagem",
|
|
710
|
+
onClick: () => Zo(e.id, e.texto ?? "")
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
) }) : null
|
|
715
|
+
] }, e.id)),
|
|
716
|
+
He ? /* @__PURE__ */ i("div", { className: "flex items-start gap-sm", children: [
|
|
717
|
+
/* @__PURE__ */ o(
|
|
718
|
+
"span",
|
|
719
|
+
{
|
|
720
|
+
className: v(
|
|
721
|
+
"flex size-8 shrink-0 items-center justify-center rounded-full",
|
|
722
|
+
g ? "bg-surface-inverse-soft" : "bg-gradient-to-r from-primary-900 to-primary-600"
|
|
723
|
+
),
|
|
724
|
+
children: g ? /* @__PURE__ */ o($e, { className: "size-3.5 text-fg-inverse", "aria-hidden": "true" }) : /* @__PURE__ */ o(xe, { className: "size-3.5" })
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ o("div", { className: "max-w-[80%] rounded-lg border-2 border-primary-600 bg-surface-neutral px-md py-sm shadow-lg", children: /* @__PURE__ */ o("div", { className: "flex items-center gap-xs", children: /* @__PURE__ */ o("span", { className: "text-sm text-fg-secondary", children: g ? "Suporte está digitando..." : "Gia está pensando..." }) }) })
|
|
728
|
+
] }) : null,
|
|
729
|
+
/* @__PURE__ */ o("div", { ref: ao })
|
|
730
|
+
] }) }) }),
|
|
731
|
+
/* @__PURE__ */ o("div", { className: "px-xl pb-xl", children: /* @__PURE__ */ o(
|
|
732
|
+
wa,
|
|
733
|
+
{
|
|
734
|
+
value: R,
|
|
735
|
+
onValueChange: (e) => {
|
|
736
|
+
Y(oa(e)), _e();
|
|
737
|
+
},
|
|
738
|
+
onSend: so,
|
|
739
|
+
placeholder: "Pergunte alguma coisa à GIA...",
|
|
740
|
+
attachments: we.map((e) => ({ id: e.id, type: e.tipo === "link" ? "link" : "file", name: e.nome })),
|
|
741
|
+
onRemoveAttachment: ea,
|
|
742
|
+
onAttachFiles: Yo,
|
|
743
|
+
onStartRecording: na,
|
|
744
|
+
error: Io,
|
|
745
|
+
banner: g ? /* @__PURE__ */ i("div", { className: "mb-xs flex items-center gap-sm rounded-lg bg-surface-neutral px-md py-2xs", children: [
|
|
746
|
+
/* @__PURE__ */ o($e, { className: "size-4 shrink-0 text-fg-secondary", "aria-hidden": "true" }),
|
|
747
|
+
/* @__PURE__ */ i("span", { className: "flex-1 text-xs text-fg-secondary", children: [
|
|
748
|
+
"Atendimento do protocolo ",
|
|
749
|
+
/* @__PURE__ */ o("strong", { children: g.id }),
|
|
750
|
+
" — em andamento"
|
|
751
|
+
] }),
|
|
752
|
+
/* @__PURE__ */ o(J, { icon: "X", variant: "ghost", size: "sm", "aria-label": "Sair do protocolo", onClick: Bo })
|
|
753
|
+
] }) : null,
|
|
754
|
+
recording: Do ? {
|
|
755
|
+
duration: Xe,
|
|
756
|
+
paused: Ke,
|
|
757
|
+
wave: Ke ? Eo(se.current, 26) : To,
|
|
758
|
+
previewPlaying: We,
|
|
759
|
+
onCancel: la,
|
|
760
|
+
onPause: sa,
|
|
761
|
+
onResume: ca,
|
|
762
|
+
onFinish: ua,
|
|
763
|
+
onTogglePreview: ia
|
|
764
|
+
} : void 0,
|
|
765
|
+
review: f ? {
|
|
766
|
+
player: /* @__PURE__ */ o(bo, { url: f.url, duracaoTotal: f.duracao, ondaEstatica: f.ondaEstatica }),
|
|
767
|
+
transcript: f.transcricao,
|
|
768
|
+
onDiscard: da,
|
|
769
|
+
onSend: ma
|
|
770
|
+
} : void 0,
|
|
771
|
+
textareaRef: H,
|
|
772
|
+
textareaProps: { onKeyUp: _e, onClick: _e, onScroll: ta },
|
|
773
|
+
overlayActive: Je,
|
|
774
|
+
overlay: Je ? /* @__PURE__ */ i(
|
|
775
|
+
"div",
|
|
776
|
+
{
|
|
777
|
+
ref: Ee,
|
|
778
|
+
"aria-hidden": "true",
|
|
779
|
+
className: "pointer-events-none absolute inset-0 z-0 max-h-[120px] min-h-16 overflow-hidden whitespace-pre-wrap break-words text-base leading-[1.4] text-fg",
|
|
780
|
+
children: [
|
|
781
|
+
/* @__PURE__ */ o(
|
|
782
|
+
Ao,
|
|
783
|
+
{
|
|
784
|
+
texto: R,
|
|
785
|
+
usuarios: N,
|
|
786
|
+
elementos: I,
|
|
787
|
+
documentos: T,
|
|
788
|
+
pastas: P,
|
|
789
|
+
paginas: q
|
|
790
|
+
}
|
|
791
|
+
),
|
|
792
|
+
R.endsWith(`
|
|
793
|
+
`) || R === "" ? /* @__PURE__ */ o("span", { children: " " }) : null
|
|
794
|
+
]
|
|
795
|
+
}
|
|
796
|
+
) : null,
|
|
797
|
+
autocomplete: /* @__PURE__ */ i(pe, { children: [
|
|
798
|
+
x?.fonte === "usuario" ? /* @__PURE__ */ o(
|
|
799
|
+
ve,
|
|
800
|
+
{
|
|
801
|
+
query: x.query,
|
|
802
|
+
itens: N,
|
|
803
|
+
renderSubtitulo: (e) => `${e.cargo} · ${e.email}`,
|
|
804
|
+
vazioLabel: "Nenhum usuário encontrado.",
|
|
805
|
+
onConfirmar: le,
|
|
806
|
+
onFechar: () => b(null)
|
|
807
|
+
}
|
|
808
|
+
) : null,
|
|
809
|
+
x?.fonte === "elemento" ? /* @__PURE__ */ o(
|
|
810
|
+
ve,
|
|
811
|
+
{
|
|
812
|
+
query: x.query,
|
|
813
|
+
itens: I,
|
|
814
|
+
renderSubtitulo: (e) => `${e.identificadorRotulo}: ${e.identificadorValor}`,
|
|
815
|
+
vazioLabel: "Nenhum elemento encontrado.",
|
|
816
|
+
onConfirmar: le,
|
|
817
|
+
onFechar: () => b(null)
|
|
818
|
+
}
|
|
819
|
+
) : null,
|
|
820
|
+
x?.fonte === "documento" ? /* @__PURE__ */ o(
|
|
821
|
+
ve,
|
|
822
|
+
{
|
|
823
|
+
query: x.query,
|
|
824
|
+
itens: T,
|
|
825
|
+
renderSubtitulo: (e) => e.tipo,
|
|
826
|
+
vazioLabel: "Nenhum documento encontrado.",
|
|
827
|
+
onConfirmar: le,
|
|
828
|
+
onFechar: () => b(null)
|
|
829
|
+
}
|
|
830
|
+
) : null,
|
|
831
|
+
x?.fonte === "pasta" ? /* @__PURE__ */ o(
|
|
832
|
+
ve,
|
|
833
|
+
{
|
|
834
|
+
query: x.query,
|
|
835
|
+
itens: P,
|
|
836
|
+
renderSubtitulo: (e) => e.tipoOperacao,
|
|
837
|
+
vazioLabel: "Nenhuma pasta encontrada.",
|
|
838
|
+
onConfirmar: le,
|
|
839
|
+
onFechar: () => b(null)
|
|
840
|
+
}
|
|
841
|
+
) : null
|
|
842
|
+
] })
|
|
843
|
+
}
|
|
844
|
+
) })
|
|
845
|
+
] })
|
|
846
|
+
] })
|
|
847
|
+
]
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
] }) }),
|
|
851
|
+
/* @__PURE__ */ o(
|
|
852
|
+
Le,
|
|
853
|
+
{
|
|
854
|
+
open: !!_,
|
|
855
|
+
onOpenChange: (e) => !e && j(null),
|
|
856
|
+
title: "Renomear conversa",
|
|
857
|
+
body: /* @__PURE__ */ o(
|
|
858
|
+
Pa,
|
|
859
|
+
{
|
|
860
|
+
id: "gia-renomear",
|
|
861
|
+
label: "Título da conversa",
|
|
862
|
+
value: _?.valor ?? "",
|
|
863
|
+
onChange: (e) => j((a) => a && { ...a, valor: e.target.value })
|
|
864
|
+
}
|
|
865
|
+
),
|
|
866
|
+
secondaryAction: /* @__PURE__ */ o(y, { label: "Cancelar", variant: "secondary", size: "lg", onClick: () => j(null) }),
|
|
867
|
+
primaryAction: /* @__PURE__ */ o(y, { label: "Salvar", variant: "primary", size: "lg", disabled: !_?.valor.trim(), onClick: Xo })
|
|
868
|
+
}
|
|
869
|
+
),
|
|
870
|
+
/* @__PURE__ */ o(
|
|
871
|
+
Le,
|
|
872
|
+
{
|
|
873
|
+
open: !!te,
|
|
874
|
+
onOpenChange: (e) => !e && B(null),
|
|
875
|
+
title: "Alterar pasta",
|
|
876
|
+
body: /* @__PURE__ */ i("div", { className: "flex flex-col gap-xs", children: [
|
|
877
|
+
/* @__PURE__ */ o("label", { className: "text-sm font-medium leading-sm text-fg", htmlFor: "gia-pasta", children: "Com qual pasta você está conversando?" }),
|
|
878
|
+
/* @__PURE__ */ i(
|
|
879
|
+
Ea,
|
|
880
|
+
{
|
|
881
|
+
id: "gia-pasta",
|
|
882
|
+
placeholder: "Nenhuma pasta vinculada",
|
|
883
|
+
value: te?.valor ?? "",
|
|
884
|
+
onChange: (e) => B((a) => a && { valor: e.target.value }),
|
|
885
|
+
children: [
|
|
886
|
+
/* @__PURE__ */ o(go, { value: "", children: "Nenhuma pasta vinculada" }),
|
|
887
|
+
P.map((e) => /* @__PURE__ */ o(go, { value: e.nome, children: e.nome }, e.nome))
|
|
888
|
+
]
|
|
889
|
+
}
|
|
890
|
+
)
|
|
891
|
+
] }),
|
|
892
|
+
secondaryAction: /* @__PURE__ */ o(y, { label: "Cancelar", variant: "secondary", size: "lg", onClick: () => B(null) }),
|
|
893
|
+
primaryAction: /* @__PURE__ */ o(y, { label: "Salvar", variant: "primary", size: "lg", onClick: Wo })
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
/* @__PURE__ */ o(
|
|
897
|
+
Le,
|
|
898
|
+
{
|
|
899
|
+
open: !!oe,
|
|
900
|
+
onOpenChange: (e) => !e && ae(null),
|
|
901
|
+
title: "Abrir protocolo com o suporte",
|
|
902
|
+
body: /* @__PURE__ */ o("p", { className: "text-sm text-fg-secondary", children: "Isso vai abrir um protocolo e iniciar uma conversa com o time de suporte aqui mesmo neste chat. Suas próximas mensagens serão direcionadas para o suporte até você sair do atendimento." }),
|
|
903
|
+
secondaryAction: /* @__PURE__ */ o(y, { label: "Cancelar", variant: "secondary", size: "lg", onClick: () => ae(null) }),
|
|
904
|
+
primaryAction: /* @__PURE__ */ o(y, { label: "Abrir protocolo", variant: "primary", size: "lg", onClick: jo })
|
|
905
|
+
}
|
|
906
|
+
)
|
|
907
|
+
] });
|
|
908
|
+
}
|
|
909
|
+
export {
|
|
910
|
+
wt as GiaChatWindow
|
|
911
|
+
};
|
|
912
|
+
//# sourceMappingURL=GiaChatWindow.js.map
|