@satek-team-intern/chatbot-widget 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/chatbot-widget.es.js +693 -865
- package/dist/chatbot-widget.umd.js +11 -9
- package/dist/src/components/modals/AddMember.d.ts +0 -7
- package/dist/src/components/sidebar/AppSideBar.d.ts +1 -3
- package/dist/src/components/sidebar/ChatInfoPanel.d.ts +1 -2
- package/dist/src/components/sidebar/ChatList.d.ts +0 -1
- package/dist/src/components/view/ChatInput.d.ts +1 -5
- package/dist/src/components/view/ContactList.d.ts +0 -2
- package/dist/src/hooks/useChat.d.ts +1 -1
- package/dist/src/types/types.d.ts +3 -3
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/validate.utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { createMp3Encoder as C } from "wasm-media-encoders";
|
|
|
7
7
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/styles/index.ts
|
|
10
|
-
var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family:Inter,-apple-system,sans-serif;font-size:16px;font-weight:400;line-height:24px;display:block;position:fixed;bottom:0;right:0}#chat-internal-root *{box-sizing:border-box;pointer-events:auto}#chat-internal-root ::-webkit-scrollbar{width:5px;height:5px}#chat-internal-root ::-webkit-scrollbar-thumb{background-color:#0000001a;border-radius:4px}#chat-internal-root ::-webkit-scrollbar-thumb:hover{background-color:#0003}.chatbot-container{width:100%;height:100%;position:relative}\n .floating-button{background:var(--primary);-webkit-backdrop-filter:blur(25px)saturate(150%);color:#fff;cursor:pointer;z-index:99999;border:1px solid #fff6;border-radius:20px;outline:none;justify-content:center;align-items:center;width:64px;height:64px;transition:all .4s cubic-bezier(.4,0,.2,1);display:flex;position:fixed;bottom:24px;right:24px;box-shadow:0 12px 40px #0000000d,inset 0 0 0 1px #fff6}.floating-button:hover{transform:scale(1.1)rotate(5deg)}.floating-button:active{transform:scale(.95)}.floating-button .ping{pointer-events:none;background:#fff3;border-radius:16px;animation:2s cubic-bezier(0,0,.2,1) infinite ping;position:absolute;inset:0}@keyframes ping{75%,to{opacity:0;transform:scale(1.5)}}.floating-button .icon{z-index:10;font-size:24px;position:relative}\n .chat-window{--primary:#155dfc;--chat-bg:#fff;--chat-text:#101828;--chat-subtext:#6a7282;--chat-header-bg:#fff;--chat-border:#e5e7eb;--sidebar-bg:#fff}.chat-window.dark-theme{--chat-bg:color-mix(in srgb, var(--primary), #0f172a99 85%);--chat-text:#f8fafc;--chat-subtext:#94a3b8;--chat-header-bg:color-mix(in srgb, var(--primary), #1e293b99 80%);--chat-border:#334155;--sidebar-bg:color-mix(in srgb, var(--primary), #0f172a66 95%)}.chat-window{background:var(--chat-bg);-webkit-backdrop-filter:blur(20px)saturate(180%);backdrop-filter:blur(20px)saturate(180%);border:1px solid var(--chat-border);z-index:99998;width:420px;height:640px;color:var(--chat-text);transform-origin:100% 100%;border-radius:14px;flex-direction:column;max-width:100%;max-height:100%;margin:0;transition:none;animation:.6s cubic-bezier(.34,1.56,.64,1) slideUp;display:flex;position:fixed;bottom:90px;right:20px;overflow:hidden;transform:none;box-shadow:0 8px 32px #0000005e,inset 0 0 0 1px #ffffff0d}.chat-window.fullpage{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--app-sidebar-bg:#f9f9f9;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;border-radius:16px;flex-direction:column;display:flex;transform:none}.chat-main-layout{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;background-color:var(--app-sidebar-bg);border-radius:0;flex-direction:row;flex:1;width:100%;max-width:none;height:100vh;display:flex;inset:0;overflow:hidden;transform:none}.chat-window.fullpage.dark-theme{--chat-bg:#0f172a;--chat-header-bg:#1e293b;--chat-border:#334155;--sidebar-bg:#0f172a;--app-sidebar-bg:#1e293b;--active-item-bg:#334155;overflow:hidden}.chat-header{background:var(--chat-header-bg);color:var(--chat-text);flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.header-info{align-items:center;gap:8px;display:flex}.header-logo{flex-shrink:0;justify-content:center;align-items:center;padding-left:6px;padding-right:8px;display:flex}.back-btn{color:#64748b;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin-right:8px;padding:0;font-size:20px;display:flex}.header-info-text{align-items:center;gap:6px;min-width:0;display:flex}.header-dot{color:var(--chat-subtext);opacity:.6}.header-title{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.header-subtitle{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:400;overflow:hidden}.chat-body-container{border-top-left-radius:8px;flex-direction:row;flex:1;display:flex;position:relative;overflow:hidden}.chat-sidebar{background:var(--sidebar-bg);border-right:1px solid #0000000d;flex-direction:column;width:100%;transition:all .3s;display:flex}.chat-sidebar.is-full{flex-shrink:0;width:320px}.chat-search-bar{background:0 0;align-items:center;gap:4px;padding:12px 12px 4px;display:flex}.search-input-wrapper{flex:1;align-items:center;display:flex;position:relative}.search-icon{color:#94a3b8;pointer-events:none;width:16px;height:16px;position:absolute;left:12px}.search-input{color:#1e293b;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:8px 36px;font-size:14px;transition:all .3s}.search-input:focus{background:#fff;border-color:#a855f74d;box-shadow:0 4px 12px #00000008}.clear-search{color:#94a3b8;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:18px;display:flex;position:absolute;right:10px}.clear-search:hover{color:#64748b}.sidebar-scroll{flex:1;padding:0 8px 20px;overflow-y:auto}.chat-filter-tabs{gap:24px;margin:0 12px;display:flex;position:relative}.chat-filter-tabs:before{content:\"\";background-color:#0000000d;height:1px;position:absolute;bottom:0;left:0;right:0}.chat-filter-tabs button{cursor:pointer;color:#667085;background:0 0;border:none;align-items:center;gap:6px;padding:8px 0;font-size:13px;font-weight:500;transition:all .2s;display:flex;position:relative}.chat-filter-tabs button.active{color:#155dfc;font-weight:600}.chat-filter-tabs button.active:after{content:\"\";z-index:1;background-color:#155dfc;border-radius:2px;height:2px;position:absolute;bottom:0;left:0;right:0}.filter-unread-badge-container{align-items:center;gap:6px;display:flex}.filter-unread-badge{color:#fff;background-color:#f04438;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;padding:0 4px;font-size:11px;font-weight:600;display:flex}.sidebar-scroll::-webkit-scrollbar{width:5px;margin-left:10px}.sidebar-scroll::-webkit-scrollbar-thumb{background:#0000000d;border-radius:10px}.member-search-section{border-top:1px solid #00000008;margin-top:10px;padding:20px 0;animation:.3s fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.member-search-section .section-header{color:var(--chat-text);text-transform:uppercase;letter-spacing:1px;padding:0 20px 12px;font-size:11px;font-weight:700}.member-search-section .members-list{max-height:none;padding:0 10px}.member-search-section .member-item{background:0 0;border:none;margin-bottom:4px;padding:10px 12px}.member-search-section .member-item:hover{background:#fff6}.chat-main{background:#ffffff1a;flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.drag-overlay-full{pointer-events:none;z-index:10;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0009;border:3px dashed #a855f7cc;justify-content:center;align-items:center;animation:.2s fadeIn;display:flex;position:absolute;inset:0}.drag-overlay-full .drag-content{color:#fff;text-shadow:0 2px 4px #0000004d;flex-direction:row;align-items:center;gap:12px;display:flex}.drag-overlay-full .drag-icon{font-size:20px;animation:.6s ease-in-out infinite bounce}.chat-list{background:0 0;flex:1;overflow-y:auto}.chat-item{cursor:pointer;border-radius:8px;align-items:center;gap:12px;height:64px;padding:8px;transition:background .1s ease-in-out;display:flex;position:relative}.chat-item:hover{background:#eff6ff99}.chat-item.active{background:#eff6ff}.chat-item-avatar{justify-content:center;align-items:center;width:32px;height:32px;font-size:22px;display:flex;position:relative}.online-indicator{z-index:1;background-color:#22c55e;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;bottom:2px;right:2px}.chat-item-info{flex:1;overflow:hidden}.chat-item-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-item-last{flex:1;min-width:0}.last-message-text{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;display:block;overflow:hidden}.info-bottom-right{flex-shrink:0;align-items:center;gap:4px;margin-top:4px;display:flex}.mute-icon-list{color:#94a3b8;flex-shrink:0}.chat-item.active .chat-item-last{color:var(--chat-text)}.unread-badge{color:#fff;z-index:2;background:linear-gradient(135deg,#f43f5e,#e11d48);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;min-width:18px;height:18px;padding:10px 7px;font-size:10px;font-weight:700;display:flex;position:absolute;top:-4px;right:-4px;box-shadow:0 2px 4px #0000001a}.chat-item-time{color:var(--chat-subtext);white-space:nowrap}.chat-list-section{margin-bottom:16px}.empty-chat-list{padding:12px 8px 4px}.section-header{color:#64748b;text-transform:none;align-items:center;gap:6px;padding:12px 8px 4px;display:flex}.section-icon{color:#94a3b8}.info-top-row{justify-content:space-between;align-items:baseline;margin-bottom:2px;display:flex}.info-bottom-row{justify-content:space-between;align-items:center;display:flex}.unread-badge-circle{color:#fff;background-color:#3b82f6;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;margin-left:8px;padding:0 5px;font-size:10px;font-weight:600;display:flex}.chat-options-wrapper{opacity:0;pointer-events:none;z-index:100;justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;position:absolute;top:50%;right:12px;transform:translateY(-50%)scale(.8)}.chat-item:hover .chat-options-wrapper,.chat-item.has-open-dropdown .chat-options-wrapper{opacity:1;pointer-events:auto;transform:translateY(-50%)scale(1)}.chat-options-btn{-webkit-backdrop-filter:blur(8px);color:#64748b;cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:10px;justify-content:center;align-items:center;width:32px;height:32px;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex}.chat-options-btn:hover,.chat-options-btn.active{color:#1e293b;background:#ffffff4d;border-color:#fff6;transform:scale(1.05)}.chat-options-btn svg{width:18px;height:18px}.chat-options-dropdown{-webkit-backdrop-filter:blur(20px)saturate(160%);z-index:1000;background:#ffffffe6;border:1px solid #fff9;border-radius:14px;flex-direction:column;gap:4px;min-width:160px;padding:6px;animation:.2s cubic-bezier(.4,0,.2,1) dropdownFadeIn;display:flex;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-10px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.dropdown-item{color:#334155;cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;font-size:13px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{color:#0f172a;background:#0000000a}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{color:#dc2626;background:#ef444414}.dropdown-icon{flex-shrink:0;width:16px;height:16px}.header-actions{gap:4px;display:flex}.action-btn{color:#667085;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#101828;background:#f2f4f7}.action-btn.close-btn:hover{color:#ef4444;background:#fee2e2}.add-group-btn{color:#667085;cursor:pointer;background:#f9fafb;border:1px solid #f2f4f7;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex}.add-group-btn:hover{color:#101828;background:#f2f4f7;border-color:#eaecf0}.dark-theme .add-group-btn{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .add-group-btn:hover{background:#1e293bcc;border-color:#fff3}.theme-toggle{background:#fff6;border:1px solid #ffffff80;border-radius:12px;font-size:16px;transition:all .4s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000000d}.theme-toggle:hover{background:#fff;box-shadow:0 8px 20px #0000001a;transform:rotate(15deg)scale(1.1)!important}.dark-theme .theme-toggle{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .theme-toggle:hover{background:#1e293bcc;border-color:#fff3}.modal-overlay{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100000;background:#0006;justify-content:center;align-items:center;animation:.3s modalFadeIn;display:flex;position:absolute;inset:0}.modal-content{background:color-mix(in srgb, var(--primary), #ffffffb3 92%);-webkit-backdrop-filter:blur(30px)saturate(150%);border:1px solid #fffc;border-radius:36px;width:90%;max-width:380px;height:85%;padding:32px;animation:.4s cubic-bezier(.175,.885,.32,1.275) modalPopUp;overflow-y:auto;box-shadow:0 30px 60px #00000014}.dark-theme .modal-content{background:color-mix(in srgb, var(--primary), #1e293bb3 90%);color:#f8fafc;border-color:#ffffff1a}.modal-content::-webkit-scrollbar-track{margin:10px 0}.modal-title{color:var(--chat-text);text-align:center;letter-spacing:-.5px;margin-bottom:24px;font-size:22px;font-weight:800}.modal-input{color:#1e293b;background:#fff;border:1px solid #0000000d;border-radius:18px;outline:none;width:100%;margin-bottom:28px;padding:16px 20px;font-size:15px;transition:all .3s}.modal-input:focus{background:#ffffff14;border-color:#155dfc;box-shadow:0 0 0 4px #155dfc26}.members-section{margin-bottom:24px}.section-title{color:#64748b;text-transform:uppercase;letter-spacing:1px;padding-left:4px;font-size:11px;font-weight:700;display:block}.members-list{max-height:250px;margin:0 -4px;padding:4px;overflow-y:auto}.members-list::-webkit-scrollbar{width:5px}.members-list::-webkit-scrollbar-thumb{background:#4f46e533;border-radius:10px}.member-item{cursor:pointer;background:#fff6;border:1px solid #0000;border-radius:16px;align-items:center;gap:14px;padding:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.member-item:hover{background:#fffc}.remove-member-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;margin-left:auto;padding:6px;transition:all .2s;display:flex}.remove-member-btn:hover{color:#ef4444;background:#ef44441a;transform:scale(1.1)}.remove-member-btn svg{width:18px;height:18px}.member-avatar{background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;display:flex;box-shadow:0 2px 5px #0000000d}.member-name{color:var(--chat-text);flex:1;font-size:14px;font-weight:600}.member-check{color:#fff;border:2px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:11px;font-weight:700;transition:all .2s;display:flex}.member-item.selected .member-check{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:#4f46e5;transform:scale(1.1)}.modal-actions{gap:12px;margin-top:8px;display:flex}.modal-btn{cursor:pointer;border:none;border-radius:16px;flex:1;padding:14px;font-size:14px;font-weight:700;transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-btn.cancel{color:#64748b;background:#f1f5f9cc}.modal-btn.cancel:hover{color:#0f172a;background:#f1f5f9}.modal-btn.confirm{color:#fff;background:linear-gradient(135deg,#6366f1,#4f46e5);box-shadow:0 10px 20px -5px #4f46e566}.modal-btn.confirm:hover{transform:translateY(-2px);box-shadow:0 15px 25px -5px #4f46e580}.modal-btn.disabled{color:#cbd5e1;cursor:not-allowed;box-shadow:none;background:#f1f5f9}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px;font-weight:700}.empty-chat-state p{opacity:.8;font-size:15px}.modal-search-wrapper{margin-bottom:20px}.no-members-found{text-align:center;text-align:center;color:#9ca3af;background:#ffffff4d;border:1px dashed #0000000d;border-radius:16px;padding:20px;font-size:14px}.member-item.loading{cursor:not-allowed;opacity:.6}.member-add-action{color:#6366f1;background:#6366f11a;border-radius:20px;margin-left:auto;padding:6px 14px;font-size:13px;font-weight:700;transition:all .2s}.member-item:hover .member-add-action{transform:scale(1.05);color:#fff!important;background:#6366f1!important}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalPopUp{0%{opacity:0;transform:scale(.8)translateY(30px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(40px)scale(.9)}to{opacity:1;transform:translateY(0)scale(1)}}.theme-modal{max-width:300px!important;height:auto!important;padding:24px!important}.modal-header{justify-content:space-between;align-items:center;display:flex}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px;font-size:24px;line-height:1}.theme-section{flex-direction:column;gap:12px;margin-bottom:24px;display:flex}.section-desc{color:#64748b;margin:0;font-size:13px;line-height:1.5}.color-presets{grid-template-columns:repeat(4,1fr);gap:12px;margin-top:8px;display:grid}.color-preset-btn{aspect-ratio:1;cursor:pointer;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 2px 8px #0000001a}.color-preset-btn:hover{transform:scale(1.1);box-shadow:0 4px 12px #00000026}.color-preset-btn.active{border-color:#334155;transform:scale(1.15)}.check-icon{color:#fff;text-shadow:0 0 2px #00000080;font-size:14px;font-weight:700}.custom-color-picker{background:#fff;border:1px solid #0000000d;border-radius:12px;align-items:center;gap:12px;margin-top:8px;padding:8px 12px;display:flex}.color-input{cursor:pointer;background:0 0;border:none;border-radius:6px;width:32px;height:32px;padding:0;overflow:hidden}.color-input::-webkit-color-swatch-wrapper{padding:0}.color-input::-webkit-color-swatch{border:none;border-radius:6px}.color-hex-code{color:#64748b;font-weight:600}.chat-window.fullpage .app-sidebar{background:var(--app-sidebar-bg);flex-direction:column;flex-shrink:0;align-items:center;gap:32px;width:64px;padding:12px 12px 24px;display:flex}.chat-window.fullpage .app-nav{flex-direction:column;flex:1;gap:16px;display:flex}.chat-window.fullpage .nav-item{color:#64748b;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.chat-window.fullpage .nav-item:hover{background:var(--active-item-bg);color:var(--primary)}.chat-window.fullpage .nav-item.active{background:var(--primary);color:var(--primary-contrast)}.contact-categories{flex-direction:column;gap:8px;padding:8px;display:flex}.category-item{cursor:pointer;color:var(--chat-text);border-radius:8px;align-items:center;gap:12px;width:100%;height:40px;padding:10px 12px;font-weight:500;transition:all .2s;display:flex}.category-item:hover{color:#1e293b;background:#f1f5f9}.category-item.active{color:#1447e6;background:#eff6ff}.category-item .count{color:#99a1af;border-radius:10px;margin-left:auto;padding:2px 8px}.contact-list-view{background:#fff;flex-direction:column;flex:1;height:100%;display:flex}.contact-list-header{color:var(--chat-text);border-bottom:1px solid #f1f5f9;height:45px;padding:10px 16px}.contact-list-toolbar{justify-content:space-between;align-items:center;padding:12px 16px 20px;display:flex}.toolbar-left{align-items:center;gap:20px;display:flex}.toolbar-left span{color:#64748b;font-weight:500}.toolbar-search{background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;width:300px;height:36px;padding:12px;display:flex}.toolbar-search input{background:0 0;border:none;outline:none;width:100%;font-size:14px}.toolbar-right{gap:12px;height:36px;display:flex}.filter-select{cursor:pointer;color:#1e293b;background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;padding:9px 12px;font-size:14px;display:flex}.dropdown-select{z-index:10;background:#fff;border:1px solid #e2e8f0;border-radius:8px;min-width:150px;margin-top:8px;position:absolute;top:100%;right:0;box-shadow:0 4px 6px #0000001a}.dropdown-select .dropdown-item{cursor:pointer;border-bottom:1px solid #e2e8f0;border-radius:0;align-items:center;gap:8px;height:40px;padding:12px 16px;display:flex}.dropdown-select .dropdown-item div{padding-top:3px}.contact-scroll-area{flex:1;padding:0 16px 16px;overflow-y:auto}.letter-title{color:var(--chat-subtext)}.contact-item-row{justify-content:space-between;align-items:center;height:64px;padding:12px 0;display:flex}.contact-item-left{align-items:center;gap:16px;display:flex}.contact-avatar{width:32px;height:32px;position:relative}.contact-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.contact-avatar .online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.contact-info{flex-direction:column;display:flex}.contact-name{color:var(--chat-text)}.contact-role{color:var(--chat-subtext)}.contact-item-actions{gap:8px;display:flex}.contact-action-btn{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;transition:all .2s;display:flex}.contact-action-btn:hover{color:#1e293b;background:#f1f5f9;border-color:#cbd5e1}.chat-window.fullpage .nav-separator{opacity:.8;background:#98a8b3;width:40px;height:1px;margin:4px 0}.chat-window.fullpage .app-sidebar-footer{flex-direction:column;align-items:center;gap:20px;padding-bottom:8px;display:flex}.chat-window.fullpage .app-avatar{background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;overflow:hidden;box-shadow:0 2px 8px #0000000d}.chat-window.fullpage .chat-body-container{background:#fff;overflow:hidden;flex:1!important;width:100%!important;height:100%!important;display:flex!important}.chat-window.fullpage .chat-sidebar{border-right:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:312px;display:flex}.chat-window.fullpage .chat-main{background:#fff;flex-direction:column;flex:1;display:flex;position:relative}.chat-main-header{border-bottom:1px solid var(--chat-border);background:#fff;flex-shrink:0;justify-content:space-between;align-items:center;min-height:64px;padding:12px 16px;display:flex}.chat-main-info{align-items:center;gap:10px;min-width:0;display:flex}.chat-main-avatar{flex-shrink:0;width:40px;height:40px}.chat-main-text{flex-direction:column;min-width:0;display:flex}.chat-main-text-container{align-items:center;gap:6px;display:flex}.chat-main-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;line-height:1.2;overflow:hidden}.chat-main-status{color:#94a3b8;margin-top:1px;font-size:13px}.chat-main-actions{flex-shrink:0;gap:4px;display:flex}.main-action-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;transition:all .2s;display:flex}.main-action-btn:hover{color:var(--primary);background:#f1f5f9}.chat-window.fullpage .chat-main-header{min-height:72px;padding:16px 24px}.chat-window.fullpage .chat-main-name{font-size:18px}.chat-window.fullpage .chat-main-actions{gap:8px;display:flex}.chat-window.fullpage .header-info-text{flex-direction:row;align-items:center;gap:6px}.chat-window.fullpage .header-subtitle{margin-top:0;font-size:16px}.chat-window.fullpage .chat-header .action-btn.theme-toggle{box-shadow:none;background:0 0}.chat-window.fullpage .chat-header{background-color:var(--app-sidebar-bg);height:45px;padding:8px 12px}.empty-chat-state{color:#94a3b8;text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:40px;display:flex}.empty-icon{opacity:.5;margin-bottom:24px;font-size:64px}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px}.empty-chat-state p{max-width:280px;font-size:14px;line-height:1.5}.search-section-title{color:#1e293b;align-items:center;gap:8px;margin-bottom:12px;font-size:16px;font-weight:700;display:flex}.search-count{color:#3b82f6;font-size:14px;font-weight:500}.search-section-content{flex-direction:column;gap:8px;display:flex}.search-result-item{cursor:pointer;border-radius:12px;align-items:center;gap:12px;height:64px;padding:8px;transition:all .2s;display:flex}.search-result-item:hover{background:#00000008}.search-result-avatar{border-radius:50%;flex-shrink:0;width:32px;height:32px;overflow:hidden}.search-result-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.avatar-placeholder{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);justify-content:center;align-items:center;width:100%;height:100%;font-size:18px;font-weight:600;display:flex}.search-result-info{flex:1;min-width:0}.search-result-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-sub{color:#64748b;margin-top:2px;font-size:12px}.search-view-all{color:#64748b;cursor:pointer;background:#00000008;border:none;border-radius:8px;width:100%;margin-top:12px;padding:10px;font-size:13px;font-weight:500;transition:all .2s}.search-view-all:hover{color:#1e293b;background:#0000000f}.message-result .search-result-top{justify-content:space-between;align-items:center;margin-bottom:2px;display:flex}.search-result-date{color:#94a3b8;font-size:11px}.search-result-text{color:#475569;-webkit-line-clamp:2;line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;font-size:13px;display:-webkit-box;overflow:hidden}.file-icon-wrapper{color:#3b82f6;background:#3b82f61a;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;font-size:20px;display:flex}.highlight-match{color:var(--primary);font-weight:500}.resize-handle.ne{cursor:ne-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;right:0}.resize-handle.nw{cursor:nw-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;left:0}.resize-handle.se{cursor:se-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;right:0}.resize-handle.sw{cursor:sw-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;left:0}\n .chat-input-area{background:#fff;border-top:1px solid #e5e7eb;align-items:center;gap:12px;padding:12px 16px;transition:all .3s;display:flex;position:relative}.chat-input-actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.action-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#374151;background:#f3f4f6}.action-btn.active{color:var(--primary);background:#f3f4f6}.chat-input-container{flex:1;align-items:center;display:flex}.chat-input{color:#1f2937;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:10px 16px;font-size:14px;transition:all .2s}.chat-input::placeholder{color:#9ca3af}.chat-input:focus{background:#f3f4f6;border-color:#3b82f64d}.send-btn{cursor:pointer;color:#fff;width:36px;height:36px;box-shadow:none;background:#8aaeff;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s;display:flex}.send-btn:hover:not(:disabled){background:#7096ff;transform:translateY(-1px)}.send-btn:disabled{cursor:not-allowed;background:#d1d5db}.send-btn svg{width:18px;height:18px}.emoji-picker{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:20px;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:10px;padding:12px;animation:.3s cubic-bezier(.34,1.56,.64,1) emojiSlideUp;display:grid;position:absolute;bottom:100%;left:16px;box-shadow:0 10px 30px #0000001a}@keyframes emojiSlideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.emoji-btn{cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:4px;font-size:20px;transition:all .2s;display:flex}.emoji-btn:hover{background:#fff;transform:scale(1.2);box-shadow:0 2px 5px #0000000d}.selected-files-list{background:#ffffff1a;border-bottom:1px solid #fff3;flex-wrap:nowrap;gap:12px;height:100px;padding:12px 20px;display:flex;overflow:auto hidden}.selected-file-item{background:#fef2f280;border-radius:12px;flex-direction:column;align-items:center;gap:8px;padding:8px;transition:all .2s;display:flex;position:relative;box-shadow:0 2px 8px #00000014}.selected-file-item.other-file{flex-direction:row}.selected-file-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.file-preview-image{object-fit:cover;border-radius:8px;width:54px;height:54px;display:block}.file-content-wrapper{flex-direction:row;align-items:center;gap:6px;display:flex}.file-icon{background:#f1f5f9;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:24px;display:flex}.file-info{flex-direction:column;gap:2px;min-width:0;display:flex}.file-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;width:400px;max-width:100%;font-size:12px;overflow:hidden}.file-size{color:#94a3b8;white-space:nowrap;text-overflow:ellipsis;max-width:120px;font-size:11px;overflow:hidden}.remove-file-btn{color:#fff;cursor:pointer;background:#ef4444;border:none;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;transition:all .2s;display:flex;position:absolute;top:-8px;right:-8px;box-shadow:0 2px 8px #ef44444d}.remove-file-btn:hover{background:#dc2626;transform:scale(1.1);box-shadow:0 4px 12px #ef444466}.selected-file-item.error-file-item{border:2px solid #ef4444;animation:.3s ease-in-out errorShake}@keyframes errorShake{0%{transform:translate(-3px)}50%{transform:translate(3px)}to{transform:translate(0)}}.selected-file-item.error-file-item:hover{background:#fef2f2b3;border-color:#dc2626}.file-size.error-size{color:#ef4444;font-weight:500}.reply-input-preview{background:#eff6ff;border-left:2px solid #2b7fff;border-top-left-radius:2px;border-bottom-left-radius:2px;justify-content:space-between;align-items:center;margin:0 10px 10px;padding:5px 20px;animation:.3s slideUp;display:flex;position:relative}.reply-content{flex-direction:column;flex:1;gap:2px;min-width:0;padding-left:18px;display:flex}.reply-user{color:#155dfc;margin-bottom:2px;font-size:.85rem;font-weight:700}.reply-user span{color:var(--primary,#155dfc)}.reply-text{color:#4a5565;white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.close-reply{color:#9ca3af;cursor:pointer;background:0 0;border:none;font-size:14px;transition:all .2s;position:absolute;top:0;right:0}.reply-icon{color:#155dfc;position:absolute;top:6px;left:10px}.close-reply:hover{color:#ef4444;transform:scale(1.1)}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.voice-recording-container{background:linear-gradient(135deg,#ef44441a,#ef44440d);border:1px solid #ef444433;flex:1;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recording-info{flex:1;align-items:center;gap:8px;display:flex}.recording-indicator{color:#374151;align-items:center;gap:6px;font-size:13px;font-weight:500;display:flex}.recording-dot{background:#ef4444;border-radius:50%;width:8px;height:8px;animation:1.5s ease-in-out infinite recordingPulse}@keyframes recordingPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}}.recording-duration{color:#374151;text-align:right;min-width:45px;font-size:13px;font-weight:600}.voice-recorded-container{background:linear-gradient(135deg,#3b82f61a,#3b82f60d);border:1px solid #3b82f633;flex:1;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recorded-info{flex:1;align-items:center;gap:8px;font-size:13px;display:flex}.voice-label{color:#1f2937;white-space:nowrap;font-weight:500}.voice-duration{color:#3b82f6;text-align:right;min-width:45px;margin-left:auto;font-weight:600}.voice-control-btn{color:#1f2937;cursor:pointer;background:#fff;border:1px solid #0000001a;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:all .2s;display:flex}.voice-control-btn:hover{background:#f9fafb;transform:scale(1.05)}.voice-control-btn.cancel-btn{color:#ef4444;background:#ef44440d;border-color:#ef44441a}.voice-control-btn.add-btn{color:#fff;background:#8aaeff;border-color:#8aaeff}\n .message-list{background:#f9fafb80;flex-direction:column-reverse;flex:1;gap:20px;padding:24px 20px;display:flex;overflow:hidden auto}.chat-date-divider{justify-content:center;align-items:center;width:100%;margin:20px 0;display:flex}.chat-date-divider span{color:#64748b;background:#f1f5f9;border-radius:20px;padding:4px 16px;font-size:12px;font-weight:500;box-shadow:0 1px 2px #0000000d}.message-item{gap:4px 8px;max-width:70%;display:flex;position:relative}.message-content{flex-direction:column;gap:4px;width:fit-content;max-width:100%;display:flex}.message-item.current-user .message-content{align-items:flex-end}.message-item.other-user .message-content{align-items:flex-start}.message-content-container{flex-direction:column;gap:12px;display:flex;position:relative}.message-item.current-user{flex-direction:row-reverse;align-self:flex-end}.message-item.other-user{align-self:flex-start}.message-bubble.current-user{background:#155dfc;align-self:flex-end}.message-bubble.other-user{background:#f3f4f6;border-radius:8px 16px 16px;align-self:flex-start}.message-avatar{object-fit:cover;border:2px solid #ffffff4d;border-radius:50%;flex-shrink:0;width:40px;height:40px;transition:transform .2s;box-shadow:0 4px 12px #00000026}.message-bubble{border-radius:16px 8px 16px 16px;grid-template-columns:minmax(0,1fr);padding:10px 16px;font-size:15px;line-height:1.6;display:grid;position:relative}.message-files{grid-template-columns:repeat(2,minmax(145px,1fr));align-content:start;gap:8px;max-width:100%;display:grid}.message-files>*{aspect-ratio:1.5;width:100%}.message-item .message-files>:last-child:nth-child(odd){grid-column:span 2}.message-item.current-user .message-files{align-self:flex-end}.message-item.other-user .message-files{align-self:flex-start}.file-item{cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:8px;align-items:center;gap:10px;max-height:60px;padding:8px 12px;text-decoration:none;transition:all .2s;display:flex}.file-item:hover{background:#ffffff40;border-color:#ffffff4d;transform:translate(4px)}.file-icon{flex-shrink:0;font-size:18px}.file-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.file-size{opacity:.7;color:inherit;font-size:11px}.file-image-wrapper{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:288px;margin-top:0;display:flex;position:relative;overflow:hidden}.file-image{object-fit:cover;cursor:pointer;border:1px solid #fff3;border-radius:8px;width:100%;height:100%;transition:transform .2s}.file-image:hover{transform:scale(1.05)}.image-overlay-more{cursor:pointer;background:#00000080;border-radius:8px;justify-content:center;align-items:center;width:100%;height:100%;transition:all .2s;display:flex;position:absolute;top:0;left:0}.image-overlay-more:hover{background:#000000a6}.image-overlay-text{color:#fff;text-shadow:0 2px 4px #0000004d;font-size:28px;font-weight:600}.user .file-image{border-color:#ffffff4d}.message-actions-bar{-webkit-backdrop-filter:none;box-shadow:none;opacity:0;pointer-events:none;z-index:100;background:0 0;border:none;gap:2px;padding:0;transition:all .2s;display:flex;position:absolute;bottom:0}.message-item:hover .message-actions-bar{opacity:1;pointer-events:auto}.message-item.current-user .message-actions-bar{right:calc(100% + 8px)}.message-item.other-user .message-actions-bar{left:calc(100% + 8px)}.chat-window:not(.fullpage) .message-list{overflow-x:hidden}.chat-window:not(.fullpage) .message-item.current-user .message-actions-bar,.chat-window:not(.fullpage) .message-item.other-user .message-actions-bar{-webkit-backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #0000000d;border-radius:20px;gap:2px;padding:2px 6px;display:flex;inset:auto 0 -22px auto;transform:none;box-shadow:0 2px 8px #00000014}.chat-window:not(.fullpage) .message-item.other-user .message-member-name{margin-right:0}.chat-window:not(.fullpage) .action-icon svg{width:13px;height:13px}.chat-window:not(.fullpage) .action-icon{width:26px;height:26px}.action-icon{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.action-icon svg{stroke-width:2.2px;width:16px;height:16px}.action-icon:hover{background:#0000000d;transform:translateY(-2px)}.action-icon[title=Xóa]:hover,.action-icon[title=Thu\\ hồi]:hover{color:#ef4444;background:#ef44441a}.action-icon[title=Trả\\ lời]:hover{color:#3b82f6;background:#3b82f61a}.action-icon[title=Thích]:hover{color:#f59e0b;background:#f59e0b1a}.action-icon[title=Yêu\\ thích]:hover{color:#ec4899;background:#ec48991a}.message-reactions-badge{z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:10px;align-items:center;gap:2px;padding:2px 6px;font-size:10px;animation:.3s cubic-bezier(.175,.885,.32,1.275) popIn;display:flex;position:absolute;bottom:-11px;box-shadow:0 2px 8px #0000001a}.message-reactions-badge span{line-height:1}.message-item.current-user .message-reactions-badge{right:8px}.message-item.other-user .message-reactions-badge{left:8px}@keyframes popIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.message-reply-preview{cursor:pointer;background:#0000001a;border-left:3px solid #ffffff80;border-radius:8px;min-width:120px;margin-bottom:8px;padding:6px 10px;font-size:.8rem;transition:all .2s}.message-bubble.other-user .message-reply-preview{border-left-color:var(--primary,#155dfc);background:#0000000d}.message-reply-preview:hover{background:#00000026}.reply-user-name{color:#fffffff2;white-space:nowrap;text-overflow:ellipsis;margin-bottom:2px;font-size:.75rem;font-weight:700;overflow:hidden}.message-bubble.other-user .reply-user-name{color:var(--primary,#155dfc)}.reply-content-text{color:#fffc;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;overflow:hidden}.message-bubble.other-user .reply-content-text{color:#475569}.message-text{overflow-wrap:break-word;word-break:break-word;width:auto;display:inline-block}.message-bubble.other-user .message-text{color:var(--chat-text)}.message-bubble.current-user .message-text{color:var(--primary-contrast,#f8fafc)}.message-bubble.other-user.revoked .message-text,.message-bubble.current-user.revoked .message-text{color:color-mix(in srgb, var(--chat-text), transparent 50%)}.message-member-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;min-width:0;margin-bottom:4px;font-size:15px;font-weight:500;overflow:hidden}.scroll-bottom-btn{-webkit-backdrop-filter:blur(8px);cursor:pointer;color:#4f46e5;z-index:1000;background:#ffffffb3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;transition:all .3s cubic-bezier(.4,0,.2,1);animation:.3s fadeInPop;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 4px 15px #00000026}.scroll-bottom-btn:hover{background:#fff;transform:translateY(-4px);box-shadow:0 6px 20px #0003}.unread-dot{background-color:#ff4d4f;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;top:0;right:0}@keyframes fadeInPop{0%{opacity:0;transform:scale(.5)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}.message-time{color:var(--chat-text);margin-top:2px;font-size:10px;font-weight:500}.message-item.current-user .message-time{text-align:right;margin-right:4px}.message-item.other-user .message-time{text-align:left;margin-left:4px}.message-item-status{color:var(--chat-text);margin-left:4px;font-size:10px;font-weight:400}.message-item-status.seen{color:#3b82f6;font-weight:600}@keyframes highlight-fade{0%{background-color:rgba(var(--primary-rgb), .2);transform:scale(1.02)}to{background-color:#0000;transform:scale(1)}}.highlight-message .message-bubble{animation:2s ease-out highlight-fade}.see-more-btn{color:#3b82f6;cursor:pointer;margin-left:8px;font-size:.85em;font-weight:600;text-decoration:none;transition:all .2s;display:inline-block}.message-bubble.current-user .see-more-btn{color:#ffffffe6;text-decoration:underline}.see-more-btn:hover{filter:brightness(1.1);text-decoration:underline}.message-bubble.current-user .see-more-btn:hover{color:#fff}\n .file-viewer-overlay{z-index:100001;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#000000e6;justify-content:center;align-items:center;animation:.2s ease-in-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.file-viewer-content{flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;animation:.3s ease-out slideUp;display:flex;position:relative}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.file-viewer-main{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:70vh;display:flex;position:relative;overflow:hidden}.file-viewer-image{object-fit:contain;border-radius:8px;max-width:100%;max-height:70vh;box-shadow:0 10px 40px #0000004d}.file-viewer-main:has(.file-viewer-video){overflow:visible}.file-viewer-video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}.video-container{justify-content:center;width:85vw;height:78vh;display:flex;overflow:visible}.file-viewer-close{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#fff3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:24px;transition:all .2s;display:flex;position:absolute;top:30px;right:70px}.file-viewer-close:hover{background:#ffffff4d;border-color:#fff6;transform:scale(1.1)}.file-viewer-close:active{transform:scale(.95)}.file-viewer-nav{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#ffffff26;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:32px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.file-viewer-nav:hover{background:#ffffff40;border-color:#ffffff4d}.file-viewer-nav:active{transform:translateY(-50%)scale(.95)}.file-viewer-prev{left:70px}.file-viewer-next{right:70px}@media (width<=768px){.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{top:10px;right:10px}}.file-viewer-counter{color:#fff;white-space:nowrap;z-index:100001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:50%;transform:translate(-50%)}.file-viewer-thumbnails-container{z-index:100001;opacity:0;pointer-events:none;visibility:hidden;justify-content:center;align-items:center;gap:2rem;width:100%;padding-bottom:3.5rem;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.file-viewer-thumbnails{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#0000004d;border-radius:8px;gap:8px;max-width:60%;padding-top:12px;padding-bottom:12px;display:flex;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%)}.file-viewer-counter:hover~.file-viewer-thumbnails-container,.file-viewer-thumbnails-container:hover{opacity:1;visibility:visible;pointer-events:auto}.file-viewer-thumbnails::-webkit-scrollbar{height:4px}.file-viewer-thumbnails::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:2px}.file-viewer-thumbnails::-webkit-scrollbar-thumb:hover{background:#ffffff80}.file-viewer-thumbnails-scroll-btn{color:#fff;cursor:pointer;z-index:100002;-webkit-backdrop-filter:blur(10px)saturate(180%);backdrop-filter:blur(10px)saturate(180%);background:#fff3;border:1px solid #ffffff4d;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:18px;transition:all .3s;display:flex;box-shadow:0 8px 32px #1f26875e}.file-viewer-thumbnails-scroll-btn:hover{background:#ffffff4d;border-color:#ffffff80;transform:scale(1.05);box-shadow:0 8px 32px #1f268780}.file-viewer-thumbnails-scroll-btn:active{transform:scale(.95)}.file-viewer-thumbnail{cursor:pointer;background:#0000004d;border:2px solid #0000;border-radius:4px;width:60px;min-width:60px;height:60px;padding:0;transition:all .2s;overflow:hidden}.file-viewer-thumbnail:hover{background:#0006;border-color:#ffffff80}.file-viewer-thumbnail.active{background:#0003;border-color:#fffc}.thumbnail-image{object-fit:cover;width:100%;height:100%}.thumbnail-video{object-fit:cover;z-index:1;cursor:pointer;width:100%;height:100%}.video-thumbnail-container{border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.play-icon-overlay{z-index:2;pointer-events:none;cursor:pointer;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;position:absolute}.play-arrow{color:#fff;margin-bottom:3px;margin-left:2px;font-size:18px}.file-viewer-overlay:has(.file-viewer-audio){background:0 0}.file-viewer-main:has(.file-viewer-audio){overflow:visible}.audio-container{justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;overflow:visible}.audio-player-wrapper{-webkit-backdrop-filter:blur(30px)saturate(150%);backdrop-filter:blur(30px)saturate(150%);color:#1e293b;z-index:1000;background:#ffffff4d;border:1px solid #ffffff80;border-radius:8px;flex-direction:column;flex-shrink:0;justify-content:center;align-items:center;gap:12px;width:100%;max-width:500px;padding:24px 20px;display:flex;position:relative;box-shadow:0 0 0 100vmax #000000e6}.file-viewer-audio{width:100%;height:40px}.file-viewer-audio::-webkit-media-controls-panel{background-color:#ffffff1a}.audio-name{color:#000;text-align:center;word-break:break-word;max-width:100%;margin:0;font-size:16px}.audio-thumbnail-container{background:linear-gradient(135deg,#6496ff80 0%,#c864ff80 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.audio-thumbnail-icon{font-size:28px}.pdf-thumbnail-container{background:linear-gradient(135deg,#f5222dcc 0%,#ff7a45cc 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.pdf-thumbnail-icon{font-size:28px}@media (width<=1024px){.file-viewer-content{max-width:95%}.file-viewer-image{max-height:60vh}.file-viewer-nav{width:40px;height:40px;font-size:24px}}@media (width<=600px){.file-viewer-overlay{inset:0}.file-viewer-content{max-width:100%;max-height:100vh}.file-viewer-main,.file-viewer-image{max-height:50vh}.file-viewer-nav{width:36px;height:36px;font-size:20px}.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{width:36px;height:36px;font-size:20px;top:10px;right:10px}.file-viewer-counter{padding:6px 12px;font-size:12px;bottom:60px}.file-viewer-thumbnails{max-width:100%;padding:8px}.file-viewer-thumbnails-scroll-btn{width:32px;height:32px;font-size:16px}.file-viewer-thumbnail{width:50px;min-width:50px;height:50px}}.file-viewer-main:has(.file-viewer-pdf){overflow:visible}.file-viewer-content:has(.file-viewer-pdf) .file-viewer-close{top:5rem}.pdf-container{justify-content:center;width:100vw;height:100vh;display:flex;overflow:visible}.file-viewer-pdf{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}\n .toast-container{z-index:100000;pointer-events:none;flex-direction:column;gap:10px;display:flex;position:absolute;bottom:24px;right:24px}.toast-item{pointer-events:auto;-webkit-backdrop-filter:blur(15px)saturate(150%);color:#1e293b;background:#fffc;border:1px solid #fff9;border-radius:20px;align-items:center;gap:12px;min-width:500px;max-width:calc(100% - 40px);padding:12px 16px;font-size:14px;font-weight:500;animation:.4s cubic-bezier(.175,.885,.32,1.275) toast-pop-in;display:flex;position:relative;overflow:hidden;box-shadow:0 4px 6px -1px #0000000d,0 10px 15px -3px #0000001a}.toast-item:before{content:\"\";width:4px;transition:background .3s;position:absolute;top:0;bottom:0;left:0}.toast-item.success:before{background:#10b981}.toast-item.error:before{background:#ef4444}.toast-item.info:before{background:#3b82f6}.toast-item.warning:before{background:#f59e0b}.toast-item span{background:#00000008;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;display:flex}.toast-item button{cursor:pointer;color:#94a3b8;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:4px;transition:all .2s;display:flex}.toast-item button:hover{color:#1e293b;background:#0000000d}@keyframes toast-pop-in{0%{opacity:0;transform:translate(20px)scale(.9)}to{opacity:1;transform:translate(0)scale(1)}}.dark-theme .toast-item{color:#f8fafc;background:#1e293bb3;border-color:#ffffff14;box-shadow:0 20px 25px -5px #0003}.dark-theme .toast-item span{background:#ffffff0d}\n .side-bar-info-chat{border-left:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:320px;display:flex}.info-header{justify-content:flex-end;padding:16px;display:flex}.close-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px}.close-info-btn:hover{background:#f1f5f9}.info-content-scroll{flex:1;padding:0 20px 20px;overflow-y:auto}.info-content-scroll::-webkit-scrollbar{width:4px}.info-content-scroll::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.info-basic-section{text-align:center;flex-direction:column;align-items:center;display:flex}.info-avatar-large{width:80px;height:80px}.info-avatar-large .chat-avatar{font-size:24px}.info-main-details{flex-direction:column;display:flex}.info-chat-name{color:#1e293b;justify-content:center;align-items:center;gap:8px;margin-top:12px;margin-bottom:4px;font-size:18px;font-weight:700;display:flex}.info-status-icons{color:#94a3b8;gap:4px;display:flex}.info-member-count{color:#64748b;margin-top:0;margin-bottom:10px;font-size:14px}.info-quick-actions{justify-content:space-around;margin-bottom:24px;display:flex}.action-item{cursor:pointer;flex-direction:column;align-items:center;gap:8px;display:flex}.action-icon-info{color:#475569;background:#f8fafc;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:80px;height:60px;transition:all .2s;display:flex}.action-item:hover .action-icon-info{color:var(--primary);background:#f1f5f9}.action-item span{color:#475569;font-size:13px;font-weight:500}.menu-item{cursor:pointer;color:#1e293b;border-radius:8px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:15px;font-weight:500;display:flex}.menu-item:hover{background:#f8fafc}.menu-left{align-items:center;gap:12px;display:flex}.info-members-section{padding:16px 0}.section-title-row{color:#64748b;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 4px;font-size:14px;font-weight:600;display:flex}.title-actions{color:#94a3b8;gap:8px;display:flex}.members-compact-list{flex-direction:column;display:flex}.members-facepile{align-items:center;padding:8px 4px;display:flex}.facepile-item{z-index:1;border:2px solid #fff;border-radius:50%;width:32px;height:32px;margin-left:-8px;transition:transform .2s;position:relative}.facepile-item:first-child{margin-left:0}.facepile-item:hover{z-index:10;transform:translateY(-4px)}.facepile-item .member-avatar-small{width:100%;height:100%}.facepile-item .online-status{border-width:1.5px;width:8px;height:8px;bottom:0;right:0}.facepile-more{color:#64748b;z-index:0;cursor:pointer;background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;margin-left:-8px;font-size:11px;font-weight:700;display:flex}.facepile-more:hover{background:#e2e8f0}.member-compact-item{border-radius:8px;justify-content:space-between;align-items:center;padding:8px;transition:background .2s;display:flex;position:relative}.member-compact-item:hover{background:#f8fafc}.member-item-left{align-items:center;gap:8px;display:flex}.member-avatar-small{border-radius:50%;width:32px;height:32px;position:relative}.member-avatar-small img,.member-img{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.member-initials{background:var(--primary);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:12px;font-weight:600;display:flex}.member-info{flex-direction:column;gap:2px;display:flex}.member-options-container{align-items:center;display:flex;position:relative}.member-options-btn{color:#94a3b8;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.member-compact-item:hover .member-options-btn{opacity:1}.member-options-btn:hover{color:#475569;background:#e2e8f0}.member-dropdown-menu{z-index:100;background:#fff;border:1px solid #f1f5f9;border-radius:12px;width:190px;margin-top:4px;padding:6px;animation:.2s fadeIn;position:absolute;top:100%;right:0;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.dropdown-item{color:#1e293b;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;width:100%;padding:10px 12px;font-size:14px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{background:#f1f5f9}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{background:#fef2f2}.dropdown-item svg{flex-shrink:0}.member-name-row{align-items:center;gap:4px;display:flex}.member-role{color:#64748b;font-size:12px}.online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.info-summary-section{padding:16px 0}.info-summary-section .section-title{color:#64748b;margin-bottom:12px;font-size:14px;font-weight:600}.summary-tabs{background:#f1f5f9;border-radius:8px;margin-bottom:16px;padding:4px;display:flex}.tab-item{text-align:center;color:#64748b;cursor:pointer;border-radius:6px;flex:1;padding:6px;font-size:13px}.tab-item.active{color:#1e293b;background:#fff;font-weight:600;box-shadow:0 1px 3px #0000001a}.file-item{border-radius:8px;align-items:center;gap:12px;padding:8px;display:flex}.file-item:hover{background:#f8fafc}.file-icon{background:#f1f5f9;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.file-details{flex-direction:column;flex:1;min-width:0;display:flex}.file-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.file-size{color:#94a3b8;font-size:12px}.file-download-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px}.file-download-btn:hover{color:var(--primary)}.group-management-view,.main-info-view{animation:.25s ease-out fadeInSlide}@keyframes fadeInSlide{0%{opacity:0;transform:translate(15px)}to{opacity:1;transform:translate(0)}}.header-left{flex:1;align-items:center;gap:12px;display:flex}.back-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:4px;display:flex}.back-info-btn:hover{background:#f1f5f9}.management-section{padding:16px 0}.management-section.border-top{border-top:1px solid #f1f5f9}.section-subtitle{color:#64748b;margin-bottom:16px;padding:0 4px;font-size:14px}.settings-list{flex-direction:column;display:flex}.setting-item{cursor:pointer;justify-content:space-between;align-items:center;padding:12px 4px;transition:background .2s;display:flex}.setting-item span{color:#1e293b;flex:1;padding-right:12px;font-size:14px;line-height:1.4}.setting-item input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}.setting-item-switch{justify-content:space-between;align-items:center;padding:12px 4px;display:flex}.setting-info{flex:1;align-items:center;gap:8px;display:flex}.setting-info span{color:#1e293b;max-width:200px;font-size:14px;line-height:1.4}.help-icon{color:#94a3b8;cursor:pointer}.switch{flex-shrink:0;width:36px;height:20px;display:inline-block;position:relative}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;background-color:#e2e8f0;transition:all .4s;position:absolute;inset:0}.slider:before{content:\"\";background-color:#fff;width:14px;height:14px;transition:all .4s;position:absolute;bottom:3px;left:3px}input:checked+.slider{background-color:var(--primary)}input:checked+.slider:before{transform:translate(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}.management-menu{flex-direction:column;display:flex}.management-menu .menu-item{padding:12px 4px}.management-menu .menu-left svg{color:#64748b}\n .modal-overlay{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.profile-modal-content{background:#fff;border-radius:20px;width:400px;padding:30px;animation:.3s cubic-bezier(.34,1.56,.64,1) modalScaleUp;position:relative;box-shadow:0 20px 40px #0003}@keyframes modalScaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:5px;transition:all .2s;display:flex;position:absolute;top:20px;right:20px}.close-modal-btn:hover{color:#475569;background:#f1f5f9}.profile-header{text-align:center;margin-bottom:25px}.profile-avatar-wrapper{width:90px;height:90px;margin:0 auto 15px;position:relative}.profile-avatar-wrapper img{object-fit:cover;border:4px solid #f8fafc;border-radius:50%;width:100%;height:100%}.profile-avatar-placeholder{color:#fff;background:#3b82f6;border:4px solid #f8fafc;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:600;display:flex}.profile-online-status{background:#22c55e;border:3px solid #fff;border-radius:50%;width:16px;height:16px;position:absolute;bottom:5px;right:5px}.profile-name{color:#1e293b;margin-bottom:4px;font-size:20px;font-weight:700}.status-text{color:#64748b;font-size:13px}.profile-actions{gap:12px;margin-bottom:30px;display:flex}.profile-action-btn{cursor:pointer;color:#475569;background:#f8fafc;border:none;border-radius:12px;flex-direction:column;flex:1;align-items:center;gap:6px;padding:12px 8px;transition:all .2s;display:flex}.profile-action-btn:hover{color:#3b82f6;background:#f1f5f9;transform:translateY(-2px)}.profile-action-btn svg{color:#64748b;transition:color .2s}.profile-action-btn:hover svg{color:#3b82f6}.profile-action-btn span{font-size:13px;font-weight:600}.profile-details{border-top:1px solid #f1f5f9;padding-top:10px}.detail-item{border-bottom:1px solid #f1f5f9;justify-content:flex-start;align-items:center;padding:12px 0;font-size:14px;display:flex}.detail-item:last-child{border-bottom:none}.detail-item .label{color:#64748b;flex-shrink:0;width:110px}.detail-item .value{color:#1e293b;font-size:16px;font-weight:400}.value.email,.value.phone{color:#3b82f6;cursor:pointer}.value.email:hover,.value.phone:hover{text-decoration:underline}\n .modal-content.add-chat-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.add-chat-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.add-chat-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.add-chat-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.add-chat-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.add-chat-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.add-chat-modal .group-info-section{align-items:center;gap:16px;display:flex}.add-chat-modal .group-avatar-upload{flex-shrink:0}.add-chat-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.add-chat-modal .upload-icon{color:#6b7280;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;display:flex;position:absolute;bottom:-2px;right:-2px}.add-chat-modal .preview-avatar{object-fit:cover;border-radius:100%;width:100%;height:100%}.add-chat-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.add-chat-modal .group-name-input:focus{border-bottom-color:#3b82f6}.add-chat-modal .search-section .chat-search-bar{padding:0}.add-chat-modal .search-section .search-input{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:10px 16px 10px 40px;font-size:15px}.add-chat-modal .search-section .search-icon{left:16px}.add-chat-modal .selected-members-tags{flex-wrap:wrap;gap:8px;display:flex}.add-chat-modal .member-tag{color:#2563eb;background:#eff6ff;border-radius:100px;align-items:center;gap:6px;padding:4px 10px;font-size:14px;font-weight:500;display:flex}.add-chat-modal .member-tag>span{margin-bottom:-4px}.add-chat-modal .remove-tag-btn{color:#2563eb;cursor:pointer;opacity:.7;background:0 0;border:none;justify-content:center;align-items:center;padding:2px;transition:opacity .2s;display:flex}.add-chat-modal .remove-tag-btn:hover{opacity:1}.modal-content.add-chat-modal.has-tags{height:550px}.add-chat-modal .members-list-container{border-top:1px solid #f3f4f6;flex:1;margin:0 -20px;padding:0 7px;overflow-y:hidden}.add-chat-modal .members-list{margin:0;padding:12px 0}.add-chat-modal .member-item{cursor:pointer;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.add-chat-modal .member-item.selected{background:#f0f7ff}.add-chat-modal .member-item:hover{background:#f9fafb}.add-chat-modal .member-item.selected:hover{background:#e0efff}.add-chat-modal .member-checkbox{flex-shrink:0}.add-chat-modal .checkbox-custom{border:1.5px solid #d1d5db;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;transition:all .2s;display:flex}.add-chat-modal .checkbox-custom.checked{background:#3b82f6;border-color:#3b82f6}.add-chat-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.add-chat-modal .member-avatar{color:#4b5563;background:#f3f4f6;border:none;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:600;display:flex;overflow:hidden}.add-chat-modal .member-avatar img{object-fit:cover;width:100%;height:100%}.add-chat-modal .avatar-letter{color:#fff;background:linear-gradient(135deg,#6366f1,#a855f7);justify-content:center;align-items:center;width:100%;height:100%;display:flex}.add-chat-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.add-chat-modal .member-name{color:#374151;font-size:15px;font-weight:500}.add-chat-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.add-chat-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.add-chat-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.add-chat-modal .footer-btn.cancel:hover{background:#e5e7eb}.add-chat-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.add-chat-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.add-chat-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}.display-none{display:none}\n", O = (e, t = 0, n = "Hội thoại không tên") => e ? e.name ? e.name : e.type === "group" ? n : e.members?.find((e) => e.id !== t)?.name ?? n : n, k = new Set([
|
|
10
|
+
var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family:Inter,-apple-system,sans-serif;font-size:16px;font-weight:400;line-height:24px;display:block;position:fixed;bottom:0;right:0}#chat-internal-root *{box-sizing:border-box;pointer-events:auto}#chat-internal-root ::-webkit-scrollbar{width:5px;height:5px}#chat-internal-root ::-webkit-scrollbar-thumb{background-color:#0000001a;border-radius:4px}#chat-internal-root ::-webkit-scrollbar-thumb:hover{background-color:#0003}.chatbot-container{width:100%;height:100%;position:relative}\n .floating-button{background:var(--primary);-webkit-backdrop-filter:blur(25px)saturate(150%);color:#fff;cursor:pointer;z-index:99999;border:1px solid #fff6;border-radius:20px;outline:none;justify-content:center;align-items:center;width:64px;height:64px;transition:all .4s cubic-bezier(.4,0,.2,1);display:flex;position:fixed;bottom:24px;right:24px;box-shadow:0 12px 40px #0000000d,inset 0 0 0 1px #fff6}.floating-button:hover{transform:scale(1.1)rotate(5deg)}.floating-button:active{transform:scale(.95)}.floating-button .ping{pointer-events:none;background:#fff3;border-radius:16px;animation:2s cubic-bezier(0,0,.2,1) infinite ping;position:absolute;inset:0}@keyframes ping{75%,to{opacity:0;transform:scale(1.5)}}.floating-button .icon{z-index:10;font-size:24px;position:relative}\n .chat-window{--primary:#155dfc;--chat-bg:#fff;--chat-text:#101828;--chat-subtext:#6a7282;--chat-header-bg:#fff;--chat-border:#e5e7eb;--sidebar-bg:#fff}.chat-window.dark-theme{--chat-bg:color-mix(in srgb, var(--primary), #0f172a99 85%);--chat-text:#f8fafc;--chat-subtext:#94a3b8;--chat-header-bg:color-mix(in srgb, var(--primary), #1e293b99 80%);--chat-border:#334155;--sidebar-bg:color-mix(in srgb, var(--primary), #0f172a66 95%)}.chat-window{background:var(--chat-bg);-webkit-backdrop-filter:blur(20px)saturate(180%);backdrop-filter:blur(20px)saturate(180%);border:1px solid var(--chat-border);z-index:99998;width:420px;height:640px;color:var(--chat-text);transform-origin:100% 100%;border-radius:14px;flex-direction:column;max-width:100%;max-height:100%;margin:0;transition:none;animation:.6s cubic-bezier(.34,1.56,.64,1) slideUp;display:flex;position:fixed;bottom:90px;right:20px;overflow:hidden;transform:none;box-shadow:0 8px 32px #0000005e,inset 0 0 0 1px #ffffff0d}.chat-window.fullpage{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--app-sidebar-bg:#f9f9f9;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;border-radius:16px;flex-direction:column;display:flex;transform:none}.chat-main-layout{--chat-bg:#fff;--chat-header-bg:#fff;--chat-border:#f1f5f9;--sidebar-bg:#fff;--active-item-bg:#f1f5f9;-webkit-backdrop-filter:none;z-index:9999;background-color:var(--app-sidebar-bg);border-radius:0;flex-direction:row;flex:1;width:100%;max-width:none;height:100vh;display:flex;inset:0;overflow:hidden;transform:none}.chat-window.fullpage.dark-theme{--chat-bg:#0f172a;--chat-header-bg:#1e293b;--chat-border:#334155;--sidebar-bg:#0f172a;--app-sidebar-bg:#1e293b;--active-item-bg:#334155;overflow:hidden}.chat-header{background:var(--chat-header-bg);color:var(--chat-text);flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.header-info{align-items:center;gap:8px;display:flex}.header-logo{flex-shrink:0;justify-content:center;align-items:center;padding-left:6px;padding-right:8px;display:flex}.header-logo img,.header-logo .satek-icon{object-fit:contain;width:22px;height:22px}.back-btn{color:#64748b;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;margin-right:8px;padding:0;font-size:20px;display:flex}.header-info-text{align-items:center;gap:6px;min-width:0;display:flex}.header-dot{color:var(--chat-subtext);opacity:.6}.header-title{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.header-subtitle{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:400;overflow:hidden}.chat-body-container{border-top-left-radius:8px;flex-direction:row;flex:1;display:flex;position:relative;overflow:hidden}.chat-sidebar{background:var(--sidebar-bg);border-right:1px solid #0000000d;flex-direction:column;width:100%;transition:all .3s;display:flex}.chat-sidebar.is-full{flex-shrink:0;width:320px}.chat-search-bar{background:0 0;align-items:center;gap:4px;padding:12px 12px 4px;display:flex}.search-input-wrapper{flex:1;align-items:center;display:flex;position:relative}.search-icon{color:#94a3b8;pointer-events:none;width:16px;height:16px;position:absolute;left:12px}.search-input{color:#1e293b;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:8px 36px;font-size:14px;transition:all .3s}.search-input:focus{background:#fff;border-color:#a855f74d;box-shadow:0 4px 12px #00000008}.clear-search{color:#94a3b8;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:18px;display:flex;position:absolute;right:10px}.clear-search:hover{color:#64748b}.sidebar-scroll{flex:1;padding:0 8px 20px;overflow-y:auto}.chat-filter-tabs{gap:24px;margin:0 12px;display:flex;position:relative}.chat-filter-tabs:before{content:\"\";background-color:#0000000d;height:1px;position:absolute;bottom:0;left:0;right:0}.chat-filter-tabs button{cursor:pointer;color:#667085;background:0 0;border:none;align-items:center;gap:6px;padding:8px 0;font-size:13px;font-weight:500;transition:all .2s;display:flex;position:relative}.chat-filter-tabs button.active{color:#155dfc;font-weight:600}.chat-filter-tabs button.active:after{content:\"\";z-index:1;background-color:#155dfc;border-radius:2px;height:2px;position:absolute;bottom:0;left:0;right:0}.filter-unread-badge-container{align-items:center;gap:6px;display:flex}.filter-unread-badge{color:#fff;background-color:#f04438;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;padding:0 4px;font-size:11px;font-weight:600;display:flex}.sidebar-scroll::-webkit-scrollbar{width:5px;margin-left:10px}.sidebar-scroll::-webkit-scrollbar-thumb{background:#0000000d;border-radius:10px}.member-search-section{border-top:1px solid #00000008;margin-top:10px;padding:20px 0;animation:.3s fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.member-search-section .section-header{color:var(--chat-text);text-transform:uppercase;letter-spacing:1px;padding:0 20px 12px;font-size:11px;font-weight:700}.member-search-section .members-list{max-height:none;padding:0 10px}.member-search-section .member-item{background:0 0;border:none;margin-bottom:4px;padding:10px 12px}.member-search-section .member-item:hover{background:#fff6}.chat-main{background:#ffffff1a;flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.drag-overlay-full{pointer-events:none;z-index:10;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0009;border:3px dashed #a855f7cc;justify-content:center;align-items:center;animation:.2s fadeIn;display:flex;position:absolute;inset:0}.drag-overlay-full .drag-content{color:#fff;text-shadow:0 2px 4px #0000004d;flex-direction:row;align-items:center;gap:12px;display:flex}.drag-overlay-full .drag-icon{font-size:20px;animation:.6s ease-in-out infinite bounce}.chat-list{background:0 0;flex:1;overflow-y:auto}.chat-item{cursor:pointer;border-radius:8px;align-items:center;gap:12px;height:64px;padding:8px;transition:background .1s ease-in-out;display:flex;position:relative}.chat-item:hover{background:#eff6ff99}.chat-item.active{background:#eff6ff}.chat-item-avatar{justify-content:center;align-items:center;width:32px;height:32px;font-size:22px;display:flex;position:relative}.online-indicator{z-index:1;background-color:#22c55e;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;bottom:2px;right:2px}.chat-item-info{flex:1;overflow:hidden}.chat-item-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-item-last{flex:1;min-width:0}.last-message-text{color:var(--chat-subtext);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;display:block;overflow:hidden}.info-bottom-right{flex-shrink:0;align-items:center;gap:4px;margin-top:4px;display:flex}.mute-icon-list{color:#94a3b8;flex-shrink:0}.chat-item.active .chat-item-last{color:var(--chat-text)}.unread-badge{color:#fff;z-index:2;background:linear-gradient(135deg,#f43f5e,#e11d48);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;min-width:18px;height:18px;padding:10px 7px;font-size:10px;font-weight:700;display:flex;position:absolute;top:-4px;right:-4px;box-shadow:0 2px 4px #0000001a}.chat-item-time{color:var(--chat-subtext);white-space:nowrap}.chat-list-section{margin-bottom:16px}.empty-chat-list{padding:12px 8px 4px}.section-header{color:#64748b;text-transform:none;align-items:center;gap:6px;padding:12px 8px 4px;display:flex}.section-icon{color:#94a3b8}.info-top-row{justify-content:space-between;align-items:baseline;margin-bottom:2px;display:flex}.info-bottom-row{justify-content:space-between;align-items:center;display:flex}.unread-badge-circle{color:#fff;background-color:#3b82f6;border-radius:9px;justify-content:center;align-items:center;min-width:18px;height:18px;margin-left:8px;padding:0 5px;font-size:10px;font-weight:600;display:flex}.chat-options-wrapper{opacity:0;pointer-events:none;z-index:100;justify-content:center;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;position:absolute;top:50%;right:12px;transform:translateY(-50%)scale(.8)}.chat-item:hover .chat-options-wrapper,.chat-item.has-open-dropdown .chat-options-wrapper{opacity:1;pointer-events:auto;transform:translateY(-50%)scale(1)}.chat-options-btn{-webkit-backdrop-filter:blur(8px);color:#64748b;cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:10px;justify-content:center;align-items:center;width:32px;height:32px;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex}.chat-options-btn:hover,.chat-options-btn.active{color:#1e293b;background:#ffffff4d;border-color:#fff6;transform:scale(1.05)}.chat-options-btn svg{width:18px;height:18px}.chat-options-dropdown{-webkit-backdrop-filter:blur(20px)saturate(160%);z-index:1000;background:#ffffffe6;border:1px solid #fff9;border-radius:14px;flex-direction:column;gap:4px;min-width:160px;padding:6px;animation:.2s cubic-bezier(.4,0,.2,1) dropdownFadeIn;display:flex;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-10px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.dropdown-item{color:#334155;cursor:pointer;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;font-size:13px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{color:#0f172a;background:#0000000a}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{color:#dc2626;background:#ef444414}.dropdown-icon{flex-shrink:0;width:16px;height:16px}.header-actions{gap:4px;display:flex}.action-btn{color:#667085;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#101828;background:#f2f4f7}.action-btn.close-btn:hover{color:#ef4444;background:#fee2e2}.add-group-btn{color:#667085;cursor:pointer;background:#f9fafb;border:1px solid #f2f4f7;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;transition:all .2s;display:flex}.add-group-btn:hover{color:#101828;background:#f2f4f7;border-color:#eaecf0}.dark-theme .add-group-btn{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .add-group-btn:hover{background:#1e293bcc;border-color:#fff3}.theme-toggle{background:#fff6;border:1px solid #ffffff80;border-radius:12px;font-size:16px;transition:all .4s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000000d}.theme-toggle:hover{background:#fff;box-shadow:0 8px 20px #0000001a;transform:rotate(15deg)scale(1.1)!important}.dark-theme .theme-toggle{color:#f8fafc;background:#1e293b66;border-color:#ffffff1a}.dark-theme .theme-toggle:hover{background:#1e293bcc;border-color:#fff3}.modal-overlay{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100000;background:#0006;justify-content:center;align-items:center;animation:.3s modalFadeIn;display:flex;position:absolute;inset:0}.modal-content{background:color-mix(in srgb, var(--primary), #ffffffb3 92%);-webkit-backdrop-filter:blur(30px)saturate(150%);border:1px solid #fffc;border-radius:36px;width:90%;max-width:380px;height:85%;padding:32px;animation:.4s cubic-bezier(.175,.885,.32,1.275) modalPopUp;overflow-y:auto;box-shadow:0 30px 60px #00000014}.dark-theme .modal-content{background:color-mix(in srgb, var(--primary), #1e293bb3 90%);color:#f8fafc;border-color:#ffffff1a}.modal-content::-webkit-scrollbar-track{margin:10px 0}.modal-title{color:var(--chat-text);text-align:center;letter-spacing:-.5px;margin-bottom:24px;font-size:22px;font-weight:800}.modal-input{color:#1e293b;background:#fff;border:1px solid #0000000d;border-radius:18px;outline:none;width:100%;margin-bottom:28px;padding:16px 20px;font-size:15px;transition:all .3s}.modal-input:focus{background:#ffffff14;border-color:#155dfc;box-shadow:0 0 0 4px #155dfc26}.members-section{margin-bottom:24px}.section-title{color:#64748b;text-transform:uppercase;letter-spacing:1px;padding-left:4px;font-size:11px;font-weight:700;display:block}.members-list{max-height:250px;margin:0 -4px;padding:4px;overflow-y:auto}.members-list::-webkit-scrollbar{width:5px}.members-list::-webkit-scrollbar-thumb{background:#4f46e533;border-radius:10px}.member-item{cursor:pointer;background:#fff6;border:1px solid #0000;border-radius:16px;align-items:center;gap:14px;padding:12px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.member-item:hover{background:#fffc}.remove-member-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;margin-left:auto;padding:6px;transition:all .2s;display:flex}.remove-member-btn:hover{color:#ef4444;background:#ef44441a;transform:scale(1.1)}.remove-member-btn svg{width:18px;height:18px}.member-avatar{background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;display:flex;box-shadow:0 2px 5px #0000000d}.member-name{color:var(--chat-text);flex:1;font-size:14px;font-weight:600}.member-check{color:#fff;border:2px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:11px;font-weight:700;transition:all .2s;display:flex}.member-item.selected .member-check{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:#4f46e5;transform:scale(1.1)}.modal-actions{gap:12px;margin-top:8px;display:flex}.modal-btn{cursor:pointer;border:none;border-radius:16px;flex:1;padding:14px;font-size:14px;font-weight:700;transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-btn.cancel{color:#64748b;background:#f1f5f9cc}.modal-btn.cancel:hover{color:#0f172a;background:#f1f5f9}.modal-btn.confirm{color:#fff;background:linear-gradient(135deg,#6366f1,#4f46e5);box-shadow:0 10px 20px -5px #4f46e566}.modal-btn.confirm:hover{transform:translateY(-2px);box-shadow:0 15px 25px -5px #4f46e580}.modal-btn.disabled{color:#cbd5e1;cursor:not-allowed;box-shadow:none;background:#f1f5f9}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px;font-weight:700}.empty-chat-state p{opacity:.8;font-size:15px}.modal-search-wrapper{margin-bottom:20px}.no-members-found{text-align:center;text-align:center;color:#9ca3af;background:#ffffff4d;border:1px dashed #0000000d;border-radius:16px;padding:20px;font-size:14px}.member-item.loading{cursor:not-allowed;opacity:.6}.member-add-action{color:#6366f1;background:#6366f11a;border-radius:6px;margin-left:auto;padding:4px 12px;font-size:13px;font-weight:700;transition:all .2s}.member-item:hover .member-add-action{color:#fff;background:#6366f1}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}@keyframes modalFadeIn{0%{opacity:0}to{opacity:1}}@keyframes modalPopUp{0%{opacity:0;transform:scale(.8)translateY(30px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(40px)scale(.9)}to{opacity:1;transform:translateY(0)scale(1)}}.theme-modal{max-width:300px!important;height:auto!important;padding:24px!important}.modal-header{justify-content:space-between;align-items:center;display:flex}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px;font-size:24px;line-height:1}.theme-section{flex-direction:column;gap:12px;margin-bottom:24px;display:flex}.section-desc{color:#64748b;margin:0;font-size:13px;line-height:1.5}.color-presets{grid-template-columns:repeat(4,1fr);gap:12px;margin-top:8px;display:grid}.color-preset-btn{aspect-ratio:1;cursor:pointer;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 2px 8px #0000001a}.color-preset-btn:hover{transform:scale(1.1);box-shadow:0 4px 12px #00000026}.color-preset-btn.active{border-color:#334155;transform:scale(1.15)}.check-icon{color:#fff;text-shadow:0 0 2px #00000080;font-size:14px;font-weight:700}.custom-color-picker{background:#fff;border:1px solid #0000000d;border-radius:12px;align-items:center;gap:12px;margin-top:8px;padding:8px 12px;display:flex}.color-input{cursor:pointer;background:0 0;border:none;border-radius:6px;width:32px;height:32px;padding:0;overflow:hidden}.color-input::-webkit-color-swatch-wrapper{padding:0}.color-input::-webkit-color-swatch{border:none;border-radius:6px}.color-hex-code{color:#64748b;font-weight:600}.contact-categories{flex-direction:column;gap:8px;padding:8px;display:flex}.category-item{cursor:pointer;color:var(--chat-text);border-radius:8px;align-items:center;gap:12px;width:100%;height:40px;padding:10px 12px;font-weight:500;transition:all .2s;display:flex}.category-item:hover{color:#1e293b;background:#f1f5f9}.category-item.active{color:#1447e6;background:#eff6ff}.category-item .count{color:#99a1af;border-radius:10px;margin-left:auto;padding:2px 8px}.contact-list-view{background:#fff;flex-direction:column;flex:1;height:100%;display:flex}.contact-list-header{color:var(--chat-text);border-bottom:1px solid #f1f5f9;height:45px;padding:10px 16px}.contact-list-toolbar{justify-content:space-between;align-items:center;padding:12px 16px 20px;display:flex}.toolbar-left{align-items:center;gap:20px;display:flex}.toolbar-left span{color:#64748b;font-weight:500}.toolbar-search{background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;width:300px;height:36px;padding:12px;display:flex}.toolbar-search input{background:0 0;border:none;outline:none;width:100%;font-size:14px}.toolbar-right{gap:12px;height:36px;display:flex}.filter-select{cursor:pointer;color:#1e293b;background:#f3f4f6;border-radius:6px;align-items:center;gap:8px;padding:9px 12px;font-size:14px;display:flex}.dropdown-select{z-index:10;background:#fff;border:1px solid #e2e8f0;border-radius:8px;min-width:150px;margin-top:8px;position:absolute;top:100%;right:0;box-shadow:0 4px 6px #0000001a}.dropdown-select .dropdown-item{cursor:pointer;border-bottom:1px solid #e2e8f0;border-radius:0;align-items:center;gap:8px;height:40px;padding:12px 16px;display:flex}.dropdown-select .dropdown-item div{padding-top:3px}.contact-scroll-area{flex:1;padding:0 16px 16px;overflow-y:auto}.letter-title{color:var(--chat-subtext)}.contact-item-row{justify-content:space-between;align-items:center;height:64px;padding:12px 0;display:flex}.contact-item-left{align-items:center;gap:16px;display:flex}.contact-avatar{width:32px;height:32px;position:relative}.contact-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.contact-avatar .online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.contact-info{flex-direction:column;display:flex}.contact-name{color:var(--chat-text)}.contact-role{color:var(--chat-subtext)}.contact-item-actions{gap:8px;display:flex}.contact-action-btn{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e2e8f0;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;transition:all .2s;display:flex}.contact-action-btn:hover{color:#1e293b;background:#f1f5f9;border-color:#cbd5e1}.chat-window.fullpage .chat-body-container{background:#fff;overflow:hidden;flex:1!important;width:100%!important;height:100%!important;display:flex!important}.chat-window.fullpage .chat-sidebar{border-right:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:312px;display:flex}.chat-window.fullpage .chat-main{background:#fff;flex-direction:column;flex:1;display:flex;position:relative}.chat-main-header{border-bottom:1px solid var(--chat-border);background:#fff;flex-shrink:0;justify-content:space-between;align-items:center;min-height:64px;padding:12px 16px;display:flex}.chat-main-info{align-items:center;gap:10px;min-width:0;display:flex}.chat-main-avatar{flex-shrink:0;width:40px;height:40px}.chat-main-text{flex-direction:column;min-width:0;display:flex}.chat-main-text-container{align-items:center;gap:6px;display:flex}.chat-main-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;line-height:1.2;overflow:hidden}.chat-main-status{color:#94a3b8;margin-top:1px;font-size:13px}.chat-main-actions{flex-shrink:0;gap:4px;display:flex}.main-action-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;transition:all .2s;display:flex}.main-action-btn:hover{color:var(--primary);background:#f1f5f9}.chat-window.fullpage .chat-main-header{min-height:72px;padding:16px 24px}.chat-window.fullpage .chat-main-name{font-size:18px}.chat-window.fullpage .chat-main-actions{gap:8px;display:flex}.chat-window.fullpage .header-info-text{flex-direction:row;align-items:center;gap:6px}.chat-window.fullpage .header-subtitle{margin-top:0;font-size:16px}.chat-window.fullpage .chat-header .action-btn.theme-toggle{box-shadow:none;background:0 0}.chat-window.fullpage .chat-header{background-color:var(--app-sidebar-bg);height:45px;padding:8px 12px}.empty-chat-state{color:#94a3b8;text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:40px;display:flex}.empty-icon{opacity:.5;margin-bottom:24px;font-size:64px}.empty-chat-state h3{color:#1e293b;margin-bottom:8px;font-size:20px}.empty-chat-state p{max-width:280px;font-size:14px;line-height:1.5}.search-section-title{color:#1e293b;align-items:center;gap:8px;margin-bottom:12px;font-size:16px;font-weight:700;display:flex}.search-count{color:#3b82f6;font-size:14px;font-weight:500}.search-section-content{flex-direction:column;gap:8px;display:flex}.search-result-item{cursor:pointer;border-radius:12px;align-items:center;gap:12px;height:64px;padding:8px;transition:all .2s;display:flex}.search-result-item:hover{background:#00000008}.search-result-avatar{border-radius:50%;flex-shrink:0;width:32px;height:32px;overflow:hidden}.search-result-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.avatar-placeholder{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);justify-content:center;align-items:center;width:100%;height:100%;font-size:18px;font-weight:600;display:flex}.search-result-info{flex:1;min-width:0}.search-result-name{color:var(--chat-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-sub{color:#64748b;margin-top:2px;font-size:12px}.search-view-all{color:#64748b;cursor:pointer;background:#00000008;border:none;border-radius:8px;width:100%;margin-top:12px;padding:10px;font-size:13px;font-weight:500;transition:all .2s}.search-view-all:hover{color:#1e293b;background:#0000000f}.message-result .search-result-top{justify-content:space-between;align-items:center;margin-bottom:2px;display:flex}.search-result-date{color:#94a3b8;font-size:11px}.search-result-text{color:#475569;-webkit-line-clamp:2;line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;font-size:13px;display:-webkit-box;overflow:hidden}.file-icon-wrapper{color:#3b82f6;background:#3b82f61a;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;font-size:20px;display:flex}.highlight-match{color:var(--primary);font-weight:500}.resize-handle.ne{cursor:ne-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;right:0}.resize-handle.nw{cursor:nw-resize;z-index:10001;width:15px;height:15px;position:absolute;top:0;left:0}.resize-handle.se{cursor:se-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;right:0}.resize-handle.sw{cursor:sw-resize;z-index:10001;width:15px;height:15px;position:absolute;bottom:0;left:0}\n .chat-input-area{background:#fff;border-top:1px solid #e5e7eb;align-items:center;gap:12px;padding:12px 16px;transition:all .3s;display:flex;position:relative}.chat-input-actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.action-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.action-btn:hover{color:#374151;background:#f3f4f6}.action-btn.active{color:var(--primary);background:#f3f4f6}.chat-input-container{flex:1;align-items:center;display:flex}.chat-input{color:#1f2937;background:#f3f4f6;border:1px solid #0000;border-radius:8px;outline:none;width:100%;padding:10px 16px;font-size:14px;transition:all .2s}.chat-input::placeholder{color:#9ca3af}.chat-input:focus{background:#f3f4f6;border-color:#3b82f64d}.chat-input:disabled{opacity:.6;cursor:not-allowed}.send-btn{cursor:pointer;color:#fff;background:var(--primary,#8aaeff);width:36px;height:36px;box-shadow:none;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s;display:flex}.send-btn:hover:not(:disabled){filter:brightness(.9);transform:translateY(-1px)}.send-btn:disabled{opacity:.6;cursor:not-allowed;background:#d1d5db}.send-btn svg{width:18px;height:18px}.emoji-picker{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:20px;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:10px;padding:12px;animation:.3s cubic-bezier(.34,1.56,.64,1) emojiSlideUp;display:grid;position:absolute;bottom:100%;left:16px;box-shadow:0 10px 30px #0000001a}@keyframes emojiSlideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.emoji-btn{cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;padding:4px;font-size:20px;transition:all .2s;display:flex}.emoji-btn:hover{background:#fff;transform:scale(1.2);box-shadow:0 2px 5px #0000000d}.selected-files-list{background:#ffffff1a;border-bottom:1px solid #fff3;flex-wrap:nowrap;gap:12px;height:100px;padding:12px 20px;display:flex;overflow:auto hidden}.selected-file-item{background:#fef2f280;border-radius:12px;flex-direction:column;align-items:center;gap:8px;padding:8px;transition:all .2s;display:flex;position:relative;box-shadow:0 2px 8px #00000014}.selected-file-item.other-file{flex-direction:row}.selected-file-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.file-preview-image{object-fit:cover;border-radius:8px;width:54px;height:54px;display:block}.file-content-wrapper{flex-direction:row;align-items:center;gap:6px;display:flex}.file-icon{background:#f1f5f9;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;font-size:24px;display:flex}.file-info{flex-direction:column;gap:2px;min-width:0;display:flex}.file-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;width:400px;max-width:100%;font-size:12px;overflow:hidden}.file-size{color:#94a3b8;white-space:nowrap;text-overflow:ellipsis;max-width:120px;font-size:11px;overflow:hidden}.remove-file-btn{color:#fff;cursor:pointer;background:#ef4444;border:none;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;transition:all .2s;display:flex;position:absolute;top:-8px;right:-8px;box-shadow:0 2px 8px #ef44444d}.remove-file-btn:hover{background:#dc2626;transform:scale(1.1);box-shadow:0 4px 12px #ef444466}.remove-file-btn:disabled{opacity:.5;cursor:not-allowed}.selected-file-item.error-file-item{border:2px solid #ef4444;animation:.3s ease-in-out errorShake}@keyframes errorShake{0%{transform:translate(-3px)}50%{transform:translate(3px)}to{transform:translate(0)}}.selected-file-item.error-file-item:hover{background:#fef2f2b3;border-color:#dc2626}.file-size.error-size{color:#ef4444;font-weight:500}.reply-input-preview{background:#eff6ff;border-left:2px solid #2b7fff;border-top-left-radius:2px;border-bottom-left-radius:2px;justify-content:space-between;align-items:center;margin:0 10px 10px;padding:5px 20px;animation:.3s slideUp;display:flex;position:relative}.reply-content{flex-direction:column;flex:1;gap:2px;min-width:0;padding-left:18px;display:flex}.reply-user{color:#155dfc;margin-bottom:2px;font-size:.85rem;font-weight:700}.reply-user span{color:var(--primary,#155dfc)}.reply-text{color:#4a5565;white-space:nowrap;text-overflow:ellipsis;font-size:.85rem;overflow:hidden}.close-reply{color:#9ca3af;cursor:pointer;background:0 0;border:none;font-size:14px;transition:all .2s;position:absolute;top:0;right:0}.reply-icon{color:#155dfc;position:absolute;top:6px;left:10px}.close-reply:hover{color:#ef4444;transform:scale(1.1)}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.voice-recording-container{background:linear-gradient(135deg,#ef44441a,#ef44440d);border:1px solid #ef444433;flex:1;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recording-info{flex:1;align-items:center;gap:8px;display:flex}.recording-indicator{color:#374151;align-items:center;gap:6px;font-size:13px;font-weight:500;display:flex}.recording-dot{background:#ef4444;border-radius:50%;width:8px;height:8px;animation:1.5s ease-in-out infinite recordingPulse}@keyframes recordingPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}}.recording-duration{color:#374151;text-align:right;min-width:45px;font-size:13px;font-weight:600}.voice-recorded-container{background:linear-gradient(135deg,#3b82f61a,#3b82f60d);border:1px solid #3b82f633;flex:1;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;animation:.2s slideUp;display:flex}.voice-recorded-info{flex:1;align-items:center;gap:8px;font-size:13px;display:flex}.voice-label{color:#1f2937;white-space:nowrap;font-weight:500}.voice-duration{color:#3b82f6;text-align:right;min-width:45px;margin-left:auto;font-weight:600}.voice-control-btn{color:#1f2937;cursor:pointer;background:#fff;border:1px solid #0000001a;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:all .2s;display:flex}.voice-control-btn:hover{background:#f9fafb;transform:scale(1.05)}.voice-control-btn.cancel-btn{color:#ef4444;background:#ef44440d;border-color:#ef44441a}.voice-control-btn.add-btn{color:#fff;background:#8aaeff;border-color:#8aaeff}\n .message-list{background:#f9fafb80;flex-direction:column-reverse;flex:1;gap:20px;padding:24px 20px;display:flex;overflow:hidden auto}.chat-date-divider{justify-content:center;align-items:center;width:100%;margin:20px 0;display:flex}.chat-date-divider span{color:#64748b;background:#f1f5f9;border-radius:20px;padding:4px 16px;font-size:12px;font-weight:500;box-shadow:0 1px 2px #0000000d}.message-item{gap:4px 8px;max-width:70%;display:flex;position:relative}.message-content{flex-direction:column;gap:4px;width:fit-content;max-width:100%;display:flex}.message-item.current-user .message-content{align-items:flex-end}.message-item.other-user .message-content{align-items:flex-start}.message-content-container{flex-direction:column;gap:12px;display:flex;position:relative}.message-item.current-user{flex-direction:row-reverse;align-self:flex-end}.message-item.other-user{align-self:flex-start}.message-bubble.current-user{background:#155dfc;align-self:flex-end}.message-bubble.other-user{background:#f3f4f6;border-radius:8px 16px 16px;align-self:flex-start}.message-avatar{object-fit:cover;border:2px solid #ffffff4d;border-radius:50%;flex-shrink:0;width:40px;height:40px;transition:transform .2s;box-shadow:0 4px 12px #00000026}.message-bubble{border-radius:16px 8px 16px 16px;grid-template-columns:minmax(0,1fr);padding:10px 16px;font-size:15px;line-height:1.6;display:grid;position:relative}.message-files{grid-template-columns:repeat(2,minmax(145px,1fr));align-content:start;gap:8px;max-width:100%;display:grid}.message-files>*{aspect-ratio:1.5;width:100%}.message-item .message-files>:last-child:nth-child(odd){grid-column:span 2}.message-item.current-user .message-files{align-self:flex-end}.message-item.other-user .message-files{align-self:flex-start}.file-item{cursor:pointer;background:#ffffff26;border:1px solid #fff3;border-radius:8px;align-items:center;gap:10px;max-height:60px;padding:8px 12px;text-decoration:none;transition:all .2s;display:flex}.file-item:hover{background:#ffffff40;border-color:#ffffff4d;transform:translate(4px)}.file-icon{flex-shrink:0;font-size:18px}.file-info{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.file-size{opacity:.7;color:inherit;font-size:11px}.file-image-wrapper{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:288px;margin-top:0;display:flex;position:relative;overflow:hidden}.file-image{object-fit:cover;cursor:pointer;border:1px solid #fff3;border-radius:8px;width:100%;height:100%;transition:transform .2s}.file-image:hover{transform:scale(1.05)}.image-overlay-more{cursor:pointer;background:#00000080;border-radius:8px;justify-content:center;align-items:center;width:100%;height:100%;transition:all .2s;display:flex;position:absolute;top:0;left:0}.image-overlay-more:hover{background:#000000a6}.image-overlay-text{color:#fff;text-shadow:0 2px 4px #0000004d;font-size:28px;font-weight:600}.user .file-image{border-color:#ffffff4d}.message-actions-bar{-webkit-backdrop-filter:none;box-shadow:none;opacity:0;pointer-events:none;z-index:100;background:0 0;border:none;gap:2px;padding:0;transition:all .2s;display:flex;position:absolute;bottom:0}.message-item:hover .message-actions-bar{opacity:1;pointer-events:auto}.message-item.current-user .message-actions-bar{right:calc(100% + 8px)}.message-item.other-user .message-actions-bar{left:calc(100% + 8px)}.chat-window:not(.fullpage) .message-list{overflow-x:hidden}.chat-window:not(.fullpage) .message-item.current-user .message-actions-bar,.chat-window:not(.fullpage) .message-item.other-user .message-actions-bar{-webkit-backdrop-filter:blur(8px);background:#ffffffe6;border:1px solid #0000000d;border-radius:20px;gap:2px;padding:2px 6px;display:flex;inset:auto 0 -22px auto;transform:none;box-shadow:0 2px 8px #00000014}.chat-window:not(.fullpage) .message-item.other-user .message-member-name{margin-right:0}.chat-window:not(.fullpage) .action-icon svg{width:13px;height:13px}.chat-window:not(.fullpage) .action-icon{width:26px;height:26px}.action-icon{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex}.action-icon svg{stroke-width:2.2px;width:16px;height:16px}.action-icon:hover{background:#0000000d;transform:translateY(-2px)}.action-icon[title=Xóa]:hover,.action-icon[title=Thu\\ hồi]:hover{color:#ef4444;background:#ef44441a}.action-icon[title=Trả\\ lời]:hover{color:#3b82f6;background:#3b82f61a}.action-icon[title=Thích]:hover{color:#f59e0b;background:#f59e0b1a}.action-icon[title=Yêu\\ thích]:hover{color:#ec4899;background:#ec48991a}.message-reactions-badge{z-index:10;background:#fffffff2;border:1px solid #0000000d;border-radius:10px;align-items:center;gap:2px;padding:2px 6px;font-size:10px;animation:.3s cubic-bezier(.175,.885,.32,1.275) popIn;display:flex;position:absolute;bottom:-11px;box-shadow:0 2px 8px #0000001a}.message-reactions-badge span{line-height:1}.message-item.current-user .message-reactions-badge{right:8px}.message-item.other-user .message-reactions-badge{left:8px}@keyframes popIn{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.message-reply-preview{cursor:pointer;background:#0000001a;border-left:3px solid #ffffff80;border-radius:8px;min-width:120px;margin-bottom:8px;padding:6px 10px;font-size:.8rem;transition:all .2s}.message-bubble.other-user .message-reply-preview{border-left-color:var(--primary,#155dfc);background:#0000000d}.message-reply-preview:hover{background:#00000026}.reply-user-name{color:#fffffff2;white-space:nowrap;text-overflow:ellipsis;margin-bottom:2px;font-size:.75rem;font-weight:700;overflow:hidden}.message-bubble.other-user .reply-user-name{color:var(--primary,#155dfc)}.reply-content-text{color:#fffc;white-space:nowrap;text-overflow:ellipsis;font-size:.8rem;overflow:hidden}.message-bubble.other-user .reply-content-text{color:#475569}.message-text{overflow-wrap:break-word;word-break:break-word;width:auto;display:inline-block}.message-bubble.other-user .message-text{color:var(--chat-text)}.message-bubble.current-user .message-text{color:var(--primary-contrast,#f8fafc)}.message-bubble.other-user.revoked .message-text,.message-bubble.current-user.revoked .message-text{color:color-mix(in srgb, var(--chat-text), transparent 50%)}.message-member-name{color:#475569;white-space:nowrap;text-overflow:ellipsis;min-width:0;margin-bottom:4px;font-size:15px;font-weight:500;overflow:hidden}.scroll-bottom-btn{-webkit-backdrop-filter:blur(8px);cursor:pointer;color:#4f46e5;z-index:1000;background:#ffffffb3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;transition:all .3s cubic-bezier(.4,0,.2,1);animation:.3s fadeInPop;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 4px 15px #00000026}.scroll-bottom-btn:hover{background:#fff;transform:translateY(-4px);box-shadow:0 6px 20px #0003}.unread-dot{background-color:#ff4d4f;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;top:0;right:0}@keyframes fadeInPop{0%{opacity:0;transform:scale(.5)translateY(20px)}to{opacity:1;transform:scale(1)translateY(0)}}.message-time{color:var(--chat-text);margin-top:2px;font-size:10px;font-weight:500}.message-item.current-user .message-time{text-align:right;margin-right:4px}.message-item.other-user .message-time{text-align:left;margin-left:4px}.message-item-status{color:var(--chat-text);margin-left:4px;font-size:10px;font-weight:400}.message-item-status.seen{color:#3b82f6;font-weight:600}.message-item-status.seen svg{margin-bottom:-2px}.message-bubble.revoked{opacity:.8;background:#ffffff0d;border:1px dashed #fff3;font-style:italic}@keyframes highlight-fade{0%{background-color:rgba(var(--primary-rgb), .2);transform:scale(1.02)}to{background-color:#0000;transform:scale(1)}}.highlight-message .message-bubble{animation:2s ease-out highlight-fade}.see-more-btn{color:#3b82f6;cursor:pointer;margin-left:8px;font-size:.85em;font-weight:600;text-decoration:none;transition:all .2s;display:inline-block}.message-bubble.current-user .see-more-btn{color:#ffffffe6;text-decoration:underline}.see-more-btn:hover{filter:brightness(1.1);text-decoration:underline}.message-bubble.current-user .see-more-btn:hover{color:#fff}\n .file-viewer-overlay{z-index:100001;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#000000e6;justify-content:center;align-items:center;animation:.2s ease-in-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.file-viewer-content{flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;animation:.3s ease-out slideUp;display:flex;position:relative}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.file-viewer-main{border-radius:8px;justify-content:center;align-items:center;max-width:100%;max-height:70vh;display:flex;position:relative;overflow:hidden}.file-viewer-image{object-fit:contain;border-radius:8px;max-width:100%;max-height:70vh;box-shadow:0 10px 40px #0000004d}.file-viewer-main:has(.file-viewer-video){overflow:visible}.file-viewer-video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}.video-container{justify-content:center;width:85vw;height:78vh;display:flex;overflow:visible}.file-viewer-close{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#fff3;border:1px solid #ffffff4d;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:24px;transition:all .2s;display:flex;position:absolute;top:30px;right:70px}.file-viewer-close:hover{background:#ffffff4d;border-color:#fff6;transform:scale(1.1)}.file-viewer-close:active{transform:scale(.95)}.file-viewer-nav{color:#fff;cursor:pointer;z-index:100001;text-align:center;background:#ffffff26;border:1px solid #fff3;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-size:32px;transition:all .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.file-viewer-nav:hover{background:#ffffff40;border-color:#ffffff4d}.file-viewer-nav:active{transform:translateY(-50%)scale(.95)}.file-viewer-prev{left:70px}.file-viewer-next{right:70px}@media (width<=768px){.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{top:10px;right:10px}}.file-viewer-counter{color:#fff;white-space:nowrap;z-index:100001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:50%;transform:translate(-50%)}.file-viewer-thumbnails-container{z-index:100001;opacity:0;pointer-events:none;visibility:hidden;justify-content:center;align-items:center;gap:2rem;width:100%;padding-bottom:3.5rem;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.file-viewer-thumbnails{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#0000004d;border-radius:8px;gap:8px;max-width:60%;padding-top:12px;padding-bottom:12px;display:flex;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%);mask-image:linear-gradient(90deg,#0000 0%,#000 10% 90%,#0000 100%)}.file-viewer-counter:hover~.file-viewer-thumbnails-container,.file-viewer-thumbnails-container:hover{opacity:1;visibility:visible;pointer-events:auto}.file-viewer-thumbnails::-webkit-scrollbar{height:4px}.file-viewer-thumbnails::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:2px}.file-viewer-thumbnails::-webkit-scrollbar-thumb:hover{background:#ffffff80}.file-viewer-thumbnails-scroll-btn{color:#fff;cursor:pointer;z-index:100002;-webkit-backdrop-filter:blur(10px)saturate(180%);backdrop-filter:blur(10px)saturate(180%);background:#fff3;border:1px solid #ffffff4d;border-radius:8px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:18px;transition:all .3s;display:flex;box-shadow:0 8px 32px #1f26875e}.file-viewer-thumbnails-scroll-btn:hover{background:#ffffff4d;border-color:#ffffff80;transform:scale(1.05);box-shadow:0 8px 32px #1f268780}.file-viewer-thumbnails-scroll-btn:active{transform:scale(.95)}.file-viewer-thumbnail{cursor:pointer;background:#0000004d;border:2px solid #0000;border-radius:4px;width:60px;min-width:60px;height:60px;padding:0;transition:all .2s;overflow:hidden}.file-viewer-thumbnail:hover{background:#0006;border-color:#ffffff80}.file-viewer-thumbnail.active{background:#0003;border-color:#fffc}.thumbnail-image{object-fit:cover;width:100%;height:100%}.thumbnail-video{object-fit:cover;z-index:1;cursor:pointer;width:100%;height:100%}.video-thumbnail-container{border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative;overflow:hidden}.play-icon-overlay{z-index:2;pointer-events:none;cursor:pointer;background-color:#00000080;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;position:absolute}.play-arrow{color:#fff;margin-bottom:3px;margin-left:2px;font-size:18px}.file-viewer-overlay:has(.file-viewer-audio){background:0 0}.file-viewer-main:has(.file-viewer-audio){overflow:visible}.audio-container{justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;overflow:visible}.audio-player-wrapper{-webkit-backdrop-filter:blur(30px)saturate(150%);backdrop-filter:blur(30px)saturate(150%);color:#1e293b;z-index:1000;background:#ffffff4d;border:1px solid #ffffff80;border-radius:8px;flex-direction:column;flex-shrink:0;justify-content:center;align-items:center;gap:12px;width:100%;max-width:500px;padding:24px 20px;display:flex;position:relative;box-shadow:0 0 0 100vmax #000000e6}.file-viewer-audio{width:100%;height:40px}.file-viewer-audio::-webkit-media-controls-panel{background-color:#ffffff1a}.audio-name{color:#000;text-align:center;word-break:break-word;max-width:100%;margin:0;font-size:16px}.audio-thumbnail-container{background:linear-gradient(135deg,#6496ff80 0%,#c864ff80 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.audio-thumbnail-icon{font-size:28px}.pdf-thumbnail-container{background:linear-gradient(135deg,#f5222dcc 0%,#ff7a45cc 100%);border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.pdf-thumbnail-icon{font-size:28px}@media (width<=1024px){.file-viewer-content{max-width:95%}.file-viewer-image{max-height:60vh}.file-viewer-nav{width:40px;height:40px;font-size:24px}}@media (width<=600px){.file-viewer-overlay{inset:0}.file-viewer-content{max-width:100%;max-height:100vh}.file-viewer-main,.file-viewer-image{max-height:50vh}.file-viewer-nav{width:36px;height:36px;font-size:20px}.file-viewer-prev{left:10px}.file-viewer-next{right:10px}.file-viewer-close{width:36px;height:36px;font-size:20px;top:10px;right:10px}.file-viewer-counter{padding:6px 12px;font-size:12px;bottom:60px}.file-viewer-thumbnails{max-width:100%;padding:8px}.file-viewer-thumbnails-scroll-btn{width:32px;height:32px;font-size:16px}.file-viewer-thumbnail{width:50px;min-width:50px;height:50px}}.file-viewer-main:has(.file-viewer-pdf){overflow:visible}.file-viewer-content:has(.file-viewer-pdf) .file-viewer-close{top:5rem}.pdf-container{justify-content:center;width:100vw;height:100vh;display:flex;overflow:visible}.file-viewer-pdf{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%;box-shadow:0 10px 40px #0000004d}\n .toast-container{z-index:100000;pointer-events:none;flex-direction:column;gap:10px;display:flex;position:absolute;bottom:24px;right:24px}.toast-item{pointer-events:auto;-webkit-backdrop-filter:blur(15px)saturate(150%);color:#1e293b;background:#fffc;border:1px solid #fff9;border-radius:20px;align-items:center;gap:12px;min-width:500px;max-width:calc(100% - 40px);padding:12px 16px;font-size:14px;font-weight:500;animation:.4s cubic-bezier(.175,.885,.32,1.275) toast-pop-in;display:flex;position:relative;overflow:hidden;box-shadow:0 4px 6px -1px #0000000d,0 10px 15px -3px #0000001a}.toast-item:before{content:\"\";width:4px;transition:background .3s;position:absolute;top:0;bottom:0;left:0}.toast-item.success:before{background:#10b981}.toast-item.error:before{background:#ef4444}.toast-item.info:before{background:#3b82f6}.toast-item.warning:before{background:#f59e0b}.toast-item span{background:#00000008;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;display:flex}.toast-item button{cursor:pointer;color:#94a3b8;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:4px;transition:all .2s;display:flex}.toast-item button:hover{color:#1e293b;background:#0000000d}@keyframes toast-pop-in{0%{opacity:0;transform:translate(20px)scale(.9)}to{opacity:1;transform:translate(0)scale(1)}}.dark-theme .toast-item{color:#f8fafc;background:#1e293bb3;border-color:#ffffff14;box-shadow:0 20px 25px -5px #0003}.dark-theme .toast-item span{background:#ffffff0d}\n .side-bar-info-chat{border-left:1px solid var(--chat-border);background:#fff;flex-direction:column;flex-shrink:0;width:320px;display:flex}.info-header{justify-content:flex-end;padding:16px;display:flex}.close-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px}.close-info-btn:hover{background:#f1f5f9}.info-content-scroll{flex:1;padding:0 20px 20px;overflow-y:auto}.info-content-scroll::-webkit-scrollbar{width:4px}.info-content-scroll::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.info-basic-section{text-align:center;flex-direction:column;align-items:center;display:flex}.info-avatar-large{width:80px;height:80px}.info-avatar-large .chat-avatar{font-size:24px}.info-main-details{flex-direction:column;display:flex}.info-chat-name{color:#1e293b;justify-content:center;align-items:center;gap:8px;margin-top:12px;margin-bottom:4px;font-size:18px;font-weight:700;display:flex}.info-status-icons{color:#94a3b8;gap:4px;display:flex}.info-member-count{color:#64748b;margin-top:0;margin-bottom:10px;font-size:14px}.info-quick-actions{justify-content:space-around;margin-bottom:24px;display:flex}.action-item{cursor:pointer;flex-direction:column;align-items:center;gap:8px;display:flex}.action-icon-info{color:#475569;background:#f8fafc;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:80px;height:60px;transition:all .2s;display:flex}.action-item:hover .action-icon-info{color:var(--primary);background:#f1f5f9}.action-item span{color:#475569;font-size:13px;font-weight:500}.menu-item{cursor:pointer;color:#1e293b;border-radius:8px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:15px;font-weight:500;display:flex}.menu-item:hover{background:#f8fafc}.menu-left{align-items:center;gap:12px;display:flex}.info-members-section{padding:16px 0}.section-title-row{color:#64748b;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 4px;font-size:14px;font-weight:600;display:flex}.title-actions{color:#94a3b8;gap:8px;display:flex}.title-actions svg{cursor:pointer}.arrow-icon{transition:transform .2s}.arrow-icon.collapsed{transform:rotate(-180deg)}.member-item-left.clickable{cursor:pointer}.members-compact-list{flex-direction:column;display:flex}.members-facepile{align-items:center;padding:8px 4px;display:flex}.facepile-item{z-index:1;border:2px solid #fff;border-radius:50%;width:32px;height:32px;margin-left:-8px;transition:transform .2s;position:relative}.facepile-item:first-child{margin-left:0}.facepile-item:hover{z-index:10;transform:translateY(-4px)}.facepile-item .member-avatar-small{width:100%;height:100%}.facepile-item .online-status{border-width:1.5px;width:8px;height:8px;bottom:0;right:0}.facepile-more{color:#64748b;z-index:0;cursor:pointer;background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:32px;height:32px;margin-left:-8px;font-size:11px;font-weight:700;display:flex}.facepile-more:hover{background:#e2e8f0}.member-compact-item{border-radius:8px;justify-content:space-between;align-items:center;padding:8px;transition:background .2s;display:flex;position:relative}.member-compact-item:hover{background:#f8fafc}.member-item-left{align-items:center;gap:8px;display:flex}.member-avatar-small{border-radius:50%;width:32px;height:32px;position:relative}.member-avatar-small img,.member-img{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.member-initials{background:var(--primary);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:12px;font-weight:600;display:flex}.member-info{flex-direction:column;gap:2px;display:flex}.member-options-container{align-items:center;display:flex;position:relative}.member-options-btn{color:#94a3b8;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:6px;transition:all .2s;display:flex}.member-compact-item:hover .member-options-btn{opacity:1}.member-options-btn:hover{color:#475569;background:#e2e8f0}.member-dropdown-menu{z-index:100;background:#fff;border:1px solid #f1f5f9;border-radius:12px;width:190px;margin-top:4px;padding:6px;animation:.2s fadeIn;position:absolute;top:100%;right:0;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.dropdown-item{color:#1e293b;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:10px;width:100%;padding:10px 12px;font-size:14px;font-weight:500;transition:all .2s;display:flex}.dropdown-item:hover{background:#f1f5f9}.dropdown-item.delete{color:#ef4444}.dropdown-item.delete:hover{background:#fef2f2}.dropdown-item svg{flex-shrink:0}.member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.member-role{color:#64748b;font-size:12px}.online-status{background:#22c55e;border:2px solid #fff;border-radius:50%;width:10px;height:10px;position:absolute;bottom:0;right:0}.info-summary-section{padding:16px 0}.info-summary-section .section-title{color:#64748b;margin-bottom:12px;font-size:14px;font-weight:600}.summary-tabs{background:#f1f5f9;border-radius:8px;margin-bottom:16px;padding:4px;display:flex}.tab-item{text-align:center;color:#64748b;cursor:pointer;border-radius:6px;flex:1;padding:6px;font-size:13px}.tab-item.active{color:#1e293b;background:#fff;font-weight:600;box-shadow:0 1px 3px #0000001a}.file-item{border-radius:8px;align-items:center;gap:12px;padding:8px;display:flex}.file-item:hover{background:#f8fafc}.file-icon{background:#f1f5f9;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.file-details{flex-direction:column;flex:1;min-width:0;display:flex}.file-name{color:#1e293b;white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.file-size{color:#94a3b8;font-size:12px}.file-download-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;padding:4px}.file-download-btn:hover{color:var(--primary)}.group-management-view,.main-info-view{animation:.25s ease-out fadeInSlide}@keyframes fadeInSlide{0%{opacity:0;transform:translate(15px)}to{opacity:1;transform:translate(0)}}.header-left{flex:1;align-items:center;gap:12px;display:flex}.back-info-btn{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;padding:4px;display:flex}.back-info-btn:hover{background:#f1f5f9}.management-section{padding:16px 0}.management-section.border-top{border-top:1px solid #f1f5f9}.section-subtitle{color:#64748b;margin-bottom:16px;padding:0 4px;font-size:14px}.settings-list{flex-direction:column;display:flex}.setting-item{cursor:pointer;justify-content:space-between;align-items:center;padding:12px 4px;transition:background .2s;display:flex}.setting-item span{color:#1e293b;flex:1;padding-right:12px;font-size:14px;line-height:1.4}.setting-item input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary);cursor:pointer}.setting-item-switch{justify-content:space-between;align-items:center;padding:12px 4px;display:flex}.setting-info{flex:1;align-items:center;gap:8px;display:flex}.setting-info span{color:#1e293b;max-width:200px;font-size:14px;line-height:1.4}.help-icon{color:#94a3b8;cursor:pointer}.switch{flex-shrink:0;width:36px;height:20px;display:inline-block;position:relative}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;background-color:#e2e8f0;transition:all .4s;position:absolute;inset:0}.slider:before{content:\"\";background-color:#fff;width:14px;height:14px;transition:all .4s;position:absolute;bottom:3px;left:3px}input:checked+.slider{background-color:var(--primary)}input:checked+.slider:before{transform:translate(16px)}.slider.round{border-radius:20px}.slider.round:before{border-radius:50%}.management-menu{flex-direction:column;display:flex}.management-menu .menu-item{padding:12px 4px}.management-menu .menu-left svg{color:#64748b}\n .app-sidebar{background:var(--app-sidebar-bg);flex-direction:column;flex-shrink:0;align-items:center;gap:32px;width:64px;padding:12px 12px 24px;display:flex}.app-nav{flex-direction:column;flex:1;gap:16px;display:flex}.nav-item{color:#64748b;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;display:flex}.nav-item:hover{background:var(--active-item-bg);color:var(--primary)}.nav-item.active{background:var(--primary);color:var(--primary-contrast)}.nav-separator{opacity:.8;background:#98a8b3;width:40px;height:1px;margin:4px 0}.app-sidebar-footer{flex-direction:column;align-items:center;gap:20px;padding-bottom:8px;display:flex}.app-avatar{background:#f1f5f9;border:2px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;display:flex;overflow:hidden;box-shadow:0 2px 8px #0000000d}.app-avatar img{object-fit:cover;border-radius:50%;width:100%;height:100%}.app-avatar-fallback{color:#64748b;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:700;display:flex}\n .modal-overlay{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.profile-modal-content{background:#fff;border-radius:20px;width:400px;padding:30px;animation:.3s cubic-bezier(.34,1.56,.64,1) modalScaleUp;position:relative;box-shadow:0 20px 40px #0003}@keyframes modalScaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.close-modal-btn{color:#94a3b8;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:5px;transition:all .2s;display:flex;position:absolute;top:20px;right:20px}.close-modal-btn:hover{color:#475569;background:#f1f5f9}.profile-header{text-align:center;margin-bottom:25px}.profile-avatar-wrapper{width:90px;height:90px;margin:0 auto 15px;position:relative}.profile-avatar-wrapper img{object-fit:cover;border:4px solid #f8fafc;border-radius:50%;width:100%;height:100%}.profile-avatar-placeholder{color:#fff;background:#3b82f6;border:4px solid #f8fafc;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:600;display:flex}.profile-online-status{background:#22c55e;border:3px solid #fff;border-radius:50%;width:16px;height:16px;position:absolute;bottom:5px;right:5px}.profile-name{color:#1e293b;margin-bottom:4px;font-size:20px;font-weight:700}.status-text{color:#64748b;font-size:13px}.profile-actions{gap:12px;margin-bottom:30px;display:flex}.profile-action-btn{cursor:pointer;color:#475569;background:#f8fafc;border:none;border-radius:12px;flex-direction:column;flex:1;align-items:center;gap:6px;padding:12px 8px;transition:all .2s;display:flex}.profile-action-btn:hover{color:#3b82f6;background:#f1f5f9;transform:translateY(-2px)}.profile-action-btn svg{color:#64748b;transition:color .2s}.profile-action-btn:hover svg{color:#3b82f6}.profile-action-btn span{font-size:13px;font-weight:600}.profile-details{border-top:1px solid #f1f5f9;padding-top:10px}.detail-item{border-bottom:1px solid #f1f5f9;justify-content:flex-start;align-items:center;padding:12px 0;font-size:14px;display:flex}.detail-item:last-child{border-bottom:none}.detail-item .label{color:#64748b;flex-shrink:0;width:110px}.detail-item .value{color:#1e293b;font-size:16px;font-weight:400}.value.email,.value.phone{color:#3b82f6;cursor:pointer}.value.email:hover,.value.phone:hover{text-decoration:underline}\n .modal-content.add-chat-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.add-chat-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.add-chat-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.add-chat-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.add-chat-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.add-chat-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.add-chat-modal .group-info-section{align-items:center;gap:16px;display:flex}.add-chat-modal .group-avatar-upload{flex-shrink:0}.add-chat-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.add-chat-modal .upload-icon{color:#6b7280;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;display:flex;position:absolute;bottom:-2px;right:-2px}.add-chat-modal .preview-avatar{object-fit:cover;border-radius:100%;width:100%;height:100%}.add-chat-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.add-chat-modal .group-name-input:focus{border-bottom-color:#3b82f6}.add-chat-modal .search-section .chat-search-bar{padding:0}.add-chat-modal .search-section .search-input{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:10px 16px 10px 40px;font-size:15px}.add-chat-modal .search-section .search-icon{left:16px}.add-chat-modal .selected-members-tags{flex-wrap:wrap;gap:8px;display:flex}.add-chat-modal .member-tag{color:#2563eb;background:#eff6ff;border-radius:100px;align-items:center;gap:6px;padding:4px 10px;font-size:14px;font-weight:500;display:flex}.add-chat-modal .member-tag>span{margin-bottom:-4px}.add-chat-modal .remove-tag-btn{color:#2563eb;cursor:pointer;opacity:.7;background:0 0;border:none;justify-content:center;align-items:center;padding:2px;transition:opacity .2s;display:flex}.add-chat-modal .remove-tag-btn:hover{opacity:1}.modal-content.add-chat-modal.has-tags{height:550px}.add-chat-modal .members-list-container{border-top:1px solid #f3f4f6;flex:1;margin:0 -20px;padding:0 7px;overflow-y:hidden}.add-chat-modal .members-list{margin:0;padding:12px 0}.add-chat-modal .member-item{cursor:pointer;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.add-chat-modal .member-item.selected{background:#f0f7ff}.add-chat-modal .member-item:hover{background:#f9fafb}.add-chat-modal .member-item.selected:hover{background:#e0efff}.add-chat-modal .member-checkbox{flex-shrink:0}.add-chat-modal .checkbox-custom{border:1.5px solid #d1d5db;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;transition:all .2s;display:flex}.add-chat-modal .checkbox-custom.checked{background:#3b82f6;border-color:#3b82f6}.add-chat-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.add-chat-modal .member-avatar{color:#4b5563;background:#f3f4f6;border:none;border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;font-size:14px;font-weight:600;display:flex;overflow:hidden}.add-chat-modal .member-avatar img{object-fit:cover;width:100%;height:100%}.add-chat-modal .avatar-letter{color:#fff;background:linear-gradient(135deg,#6366f1,#a855f7);justify-content:center;align-items:center;width:100%;height:100%;display:flex}.add-chat-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.add-chat-modal .member-name{color:#374151;font-size:15px;font-weight:500}.add-chat-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.add-chat-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.add-chat-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.add-chat-modal .footer-btn.cancel:hover{background:#e5e7eb}.add-chat-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.add-chat-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.add-chat-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}.display-none{display:none}.modal-content.update-group-modal{background:#fff;border:1px solid #0000000d;border-radius:10px;flex-direction:column;width:450px;max-width:450px;height:auto;min-height:430px;max-height:90vh;padding:0;display:flex;overflow:hidden;box-shadow:0 10px 40px #0000001a}.update-group-modal .modal-header{justify-content:space-between;align-items:center;padding:16px 20px 0;display:flex}.update-group-modal .modal-title{color:#1f2937;text-align:left;margin:0;font-size:18px;font-weight:600}.update-group-modal .close-modal-btn{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;transition:background .2s;display:flex}.update-group-modal .close-modal-btn:hover{color:#111827;background:#f3f4f6}.update-group-modal .modal-body{flex-direction:column;flex:1;gap:8px;padding:20px 20px 0;display:flex;overflow:hidden}.update-group-modal .group-info-section{align-items:center;gap:16px;display:flex}.update-group-modal .group-avatar-upload{cursor:pointer;flex-shrink:0}.update-group-modal .group-avatar-upload input{display:none}.update-group-modal .avatar-placeholder{color:#9ca3af;cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex;position:relative}.update-group-modal .avatar-placeholder img{object-fit:cover;border-radius:50%;width:100%;height:100%}.update-group-modal .group-name-input{border:none;border-bottom:1px solid #e5e7eb;outline:none;flex:1;padding:8px 0;font-size:16px;transition:border-color .2s}.update-group-modal .group-name-input:focus{border-bottom-color:#3b82f6}.update-group-modal .members-section{margin-top:8px}.update-group-modal .section-title{padding-left:0;display:block}.update-group-modal .members-list-container{border-top:none;flex:1;height:240px;margin:0 -20px;padding:0 7px;overflow-y:hidden}.update-group-modal .members-list{margin:0;padding:12px 0}.update-group-modal .member-item{cursor:default;background:0 0;border-radius:10px;align-items:center;gap:12px;padding:10px 12px;transition:background .2s;display:flex}.update-group-modal .member-item:hover{background:#f9fafb}.update-group-modal .member-avatar-wrapper{width:32px;height:32px;position:relative}.update-group-modal .status-dot{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.update-group-modal .member-info-wrapper{flex-direction:column;flex:1;gap:2px;display:flex}.update-group-modal .member-name-row{align-items:center;gap:4px;width:fit-content;display:flex}.update-group-modal .member-name{color:#1e293b;font-size:15px;font-weight:500}.update-group-modal .owner-icon{color:#64748b}.update-group-modal .member-role{color:#64748b;font-size:13px}.update-group-modal .remove-member-btn{color:#ef4444;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:4px;font-size:14px;display:flex}.update-group-modal .modal-footer{border-top:1px solid #f3f4f6;justify-content:flex-end;gap:12px;padding:11px 20px;display:flex}.update-group-modal .footer-btn{cursor:pointer;border:none;border-radius:10px;padding:10px 24px;font-size:15px;font-weight:600;transition:all .2s}.update-group-modal .footer-btn.cancel{color:#4b5563;background:#f3f4f6}.update-group-modal .footer-btn.cancel:hover{background:#e5e7eb}.update-group-modal .footer-btn.confirm{color:#fff;background:#3b82f6}.update-group-modal .footer-btn.confirm:hover:not(.disabled){background:#7a9ce9}.update-group-modal .footer-btn.disabled{opacity:.6;cursor:not-allowed}\n .contact-list-header>div{align-items:center;gap:8px;display:flex}.contact-list-toolbar{gap:12px}.toolbar-search{flex:1}.filter-select{position:relative}.avatar-placeholder{color:#fff;background:#3b82f6;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:16px;font-weight:600;display:flex}.online-status.is-online{background:#22c55e}.online-status.is-offline{background:#94a3b8}.contact-action-btn{background:0 0;border:none}\n", O = (e, t = 0, n = "Hội thoại không tên") => e ? e.name ? e.name : e.type === "group" ? n : e.members?.find((e) => e.id !== t)?.name ?? n : n, k = new Set([
|
|
11
11
|
"pdf",
|
|
12
12
|
"doc",
|
|
13
13
|
"docx",
|
|
@@ -23,12 +23,12 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
23
23
|
"tar",
|
|
24
24
|
"gz",
|
|
25
25
|
"json"
|
|
26
|
-
]),
|
|
26
|
+
]), A = {
|
|
27
27
|
"attachment:image": "image/*",
|
|
28
28
|
"attachment:video": "video/*",
|
|
29
29
|
"attachment:audio": "audio/*",
|
|
30
30
|
"attachment:file": Array.from(k).map((e) => `.${e}`).join(",")
|
|
31
|
-
},
|
|
31
|
+
}, j = (e) => {
|
|
32
32
|
let { attachments: t, communication: n, chatModes: r, customizations: i } = e, a = new Set(t ?? []), o = new Set(n ?? []), s = new Set(r ?? []), c = new Set(i ?? []);
|
|
33
33
|
return {
|
|
34
34
|
featureSet: {
|
|
@@ -44,14 +44,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
44
44
|
hasChangeColor: c.has("change-color"),
|
|
45
45
|
hasMultipleLanguages: c.has("multi-language")
|
|
46
46
|
};
|
|
47
|
-
},
|
|
47
|
+
}, M = (e) => Object.keys(A).filter((t) => e.attachments.has(t)).map((e) => A[e]).join(","), ee = (e) => (t) => {
|
|
48
48
|
let n = t.type;
|
|
49
49
|
if (n.startsWith("image/")) return e.attachments.has("image");
|
|
50
50
|
if (n.startsWith("video/")) return e.attachments.has("video");
|
|
51
51
|
if (n.startsWith("audio/")) return e.attachments.has("audio");
|
|
52
52
|
let r = t.name.split(".").pop()?.toLowerCase() ?? "";
|
|
53
53
|
return k.has(r), e.attachments.has("file");
|
|
54
|
-
},
|
|
54
|
+
}, te = (e) => {
|
|
55
55
|
if (!e) return !1;
|
|
56
56
|
let t = new Date(e).getTime();
|
|
57
57
|
return Date.now() - t <= 300 * 1e3;
|
|
@@ -83,7 +83,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
83
83
|
let a = n.reduce((e, t) => e + t.length, 0), o = new Uint8Array(a), s = 0;
|
|
84
84
|
for (let e of n) o.set(e, s), s += e.length;
|
|
85
85
|
return new Blob([o], { type: "audio/mp3" });
|
|
86
|
-
}, ie = 25 * 1024 * 1024,
|
|
86
|
+
}, ie = 25 * 1024 * 1024, F = [
|
|
87
87
|
"🙂",
|
|
88
88
|
"😀",
|
|
89
89
|
"😂",
|
|
@@ -102,7 +102,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
102
102
|
"💯",
|
|
103
103
|
"✅",
|
|
104
104
|
"❌"
|
|
105
|
-
],
|
|
105
|
+
], I = {
|
|
106
106
|
pdf: "📄",
|
|
107
107
|
doc: "📄",
|
|
108
108
|
docx: "📄",
|
|
@@ -125,13 +125,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
125
125
|
mov: "🎬",
|
|
126
126
|
mkv: "🎬",
|
|
127
127
|
default: "📎"
|
|
128
|
-
},
|
|
129
|
-
if (!
|
|
128
|
+
}, L = (e) => e && I[e.includes(".") ? e.split(".").pop()?.toLowerCase() ?? "" : e.toLowerCase()] || "📎", R = /* @__PURE__ */ new WeakMap(), ae = (e) => {
|
|
129
|
+
if (!R.has(e)) {
|
|
130
130
|
let t = Math.random().toString(36).substring(2, 9);
|
|
131
|
-
|
|
131
|
+
R.set(e, `${e.name}-${e.size}-${t}`);
|
|
132
132
|
}
|
|
133
|
-
return
|
|
134
|
-
},
|
|
133
|
+
return R.get(e);
|
|
134
|
+
}, oe = (e) => {
|
|
135
135
|
if (e === 0) return "0 B";
|
|
136
136
|
let t = 1024, n = [
|
|
137
137
|
"B",
|
|
@@ -140,7 +140,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
140
140
|
"GB"
|
|
141
141
|
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
142
142
|
return Math.round(e / t ** +r * 100) / 100 + " " + n[r];
|
|
143
|
-
},
|
|
143
|
+
}, z = (e) => {
|
|
144
144
|
let t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
145
145
|
return [
|
|
146
146
|
"jpg",
|
|
@@ -163,13 +163,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
163
163
|
"ogg",
|
|
164
164
|
"wma"
|
|
165
165
|
].includes(t) ? "audio" : "other";
|
|
166
|
-
},
|
|
166
|
+
}, se = (e) => URL.createObjectURL(e), ce = (e) => e.type.startsWith("image/"), le = (e) => {
|
|
167
167
|
let t = (e) => {
|
|
168
168
|
let t = e.name.toLowerCase().split(".").pop() ?? "";
|
|
169
169
|
return e.type.startsWith("image/") ? 0 : t === "mp4" ? 1 : t === "mp3" ? 2 : 3;
|
|
170
170
|
};
|
|
171
171
|
return [...e].sort((e, n) => t(e) - t(n));
|
|
172
|
-
},
|
|
172
|
+
}, B = (e) => new Promise((t) => {
|
|
173
173
|
if (!e.type.startsWith("image/")) {
|
|
174
174
|
t(e);
|
|
175
175
|
return;
|
|
@@ -197,7 +197,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
197
197
|
}, a, s);
|
|
198
198
|
}, r.onerror = () => t(e), r.src = n.target?.result;
|
|
199
199
|
}, n.onerror = () => t(e), n.readAsDataURL(e);
|
|
200
|
-
}),
|
|
200
|
+
}), ue = (e, t, n) => e.length === 0 ? null : !t && e.length > 1 ? {
|
|
201
201
|
message: "Chỉ cho phép đính kèm tối đa 1 file.",
|
|
202
202
|
type: "warning"
|
|
203
203
|
} : e.length > 20 ? {
|
|
@@ -209,7 +209,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
209
209
|
} : e.every(n) ? null : {
|
|
210
210
|
message: "Vui lòng chỉ chọn các loại file được phép.",
|
|
211
211
|
type: "warning"
|
|
212
|
-
},
|
|
212
|
+
}, de = (e) => {
|
|
213
|
+
try {
|
|
214
|
+
let t = new URL(e);
|
|
215
|
+
return t.protocol === "http:" || t.protocol === "https:";
|
|
216
|
+
} catch {
|
|
217
|
+
return !1;
|
|
218
|
+
}
|
|
219
|
+
}, fe = S({
|
|
213
220
|
name: "widget-chatslice",
|
|
214
221
|
initialState: {
|
|
215
222
|
currentUser: null,
|
|
@@ -240,7 +247,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
240
247
|
},
|
|
241
248
|
setMembers: (e, t) => {
|
|
242
249
|
e.members = t.payload.map((e) => {
|
|
243
|
-
let t =
|
|
250
|
+
let t = te(e.socket_at);
|
|
244
251
|
return {
|
|
245
252
|
...e,
|
|
246
253
|
socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
|
|
@@ -251,7 +258,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
251
258
|
},
|
|
252
259
|
setCurrentChatMembers: (e, t) => {
|
|
253
260
|
e.currentChatMembers = t.payload.map((e) => {
|
|
254
|
-
let t =
|
|
261
|
+
let t = te(e.socket_at);
|
|
255
262
|
return {
|
|
256
263
|
...e,
|
|
257
264
|
socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
|
|
@@ -366,7 +373,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
366
373
|
i && (i[r] = !i[r]), e.currentChat?.id === n && (e.currentChat[r] = !e.currentChat[r]);
|
|
367
374
|
}
|
|
368
375
|
}
|
|
369
|
-
}), { clearAll:
|
|
376
|
+
}), { clearAll: pe, setCurrentUser: me, setChats: he, setCurrentChat: V, setCurrentChatMessages: ge, setCurrentChatMembers: _e, setMembers: ve, setMember: H, setMemberDisconnect: ye, setMessagesPagination: be, prependMessages: xe, addNewMessage: Se, removeChat: Ce, addChat: we, updateChat: Te, updateChatAvatar: Ee, removeMessage: De, updateMessage: Oe, setReplyingMessage: ke, setTotalMessagesUnread: Ae, updateMemberReadStatus: U, toggleChatSetting: W } = fe.actions, je = fe.reducer, G = class e {
|
|
370
377
|
static instance;
|
|
371
378
|
chatSDK = null;
|
|
372
379
|
constructor() {
|
|
@@ -520,7 +527,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
520
527
|
setConfig(e) {
|
|
521
528
|
this.chatSDK && this.chatSDK.setConfig(e);
|
|
522
529
|
}
|
|
523
|
-
}.getInstance(),
|
|
530
|
+
}.getInstance(), Me = {
|
|
524
531
|
common: {
|
|
525
532
|
buttons: {
|
|
526
533
|
save: "Save",
|
|
@@ -653,7 +660,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
653
660
|
updateButton: "Update",
|
|
654
661
|
updatingButton: "Updating..."
|
|
655
662
|
}
|
|
656
|
-
},
|
|
663
|
+
}, K = {
|
|
657
664
|
common: {
|
|
658
665
|
buttons: {
|
|
659
666
|
save: "Lưu",
|
|
@@ -787,14 +794,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
787
794
|
updateButton: "Cập nhật",
|
|
788
795
|
updatingButton: "Đang cập nhật..."
|
|
789
796
|
}
|
|
790
|
-
},
|
|
797
|
+
}, q = class e {
|
|
791
798
|
static instance;
|
|
792
799
|
translations;
|
|
793
800
|
currentLocale;
|
|
794
801
|
constructor() {
|
|
795
802
|
this.currentLocale = "vietnamese", this.translations = {
|
|
796
|
-
vietnamese:
|
|
797
|
-
english:
|
|
803
|
+
vietnamese: K,
|
|
804
|
+
english: Me
|
|
798
805
|
};
|
|
799
806
|
}
|
|
800
807
|
static getInstance() {
|
|
@@ -809,7 +816,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
809
816
|
t(e, t) {
|
|
810
817
|
let n = e.split("."), r = (e) => n.reduce((e, t) => {
|
|
811
818
|
if (e && typeof e == "object") return e[t];
|
|
812
|
-
}, e), i = r(this.translations[this.currentLocale]) ?? r(
|
|
819
|
+
}, e), i = r(this.translations[this.currentLocale]) ?? r(Me);
|
|
813
820
|
if (typeof i != "string") return e;
|
|
814
821
|
let a = i;
|
|
815
822
|
if (t) for (let [e, n] of Object.entries(t)) a = a.replace(RegExp(`{${e}}`, "g"), n);
|
|
@@ -841,17 +848,17 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
841
848
|
e.primaryColor = t.payload, localStorage.setItem("chat-primary-color", e.primaryColor);
|
|
842
849
|
},
|
|
843
850
|
setLanguage: (e, t) => {
|
|
844
|
-
e.currentLanguage = t.payload,
|
|
851
|
+
e.currentLanguage = t.payload, q.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
|
|
845
852
|
}
|
|
846
853
|
}
|
|
847
|
-
}), { setConfig:
|
|
848
|
-
chat:
|
|
849
|
-
setting:
|
|
850
|
-
}),
|
|
851
|
-
reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0),
|
|
854
|
+
}), { setConfig: Pe, toggleTheme: J, setFeatures: Y, setPrimaryColor: X, setLanguage: Fe } = Ne.actions, Ie = Ne.reducer, Le = y({
|
|
855
|
+
chat: je,
|
|
856
|
+
setting: Ie
|
|
857
|
+
}), Re = b({
|
|
858
|
+
reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0), Le(e, t)),
|
|
852
859
|
middleware: (e) => e({ serializableCheck: { ignoredPaths: ["chat.instance"] } }),
|
|
853
860
|
devTools: { name: "ChatbotWidget" }
|
|
854
|
-
}),
|
|
861
|
+
}), ze = (e) => e.setting.features, Be = (e, t) => {
|
|
855
862
|
let n = {
|
|
856
863
|
minutes: 1e3 * 60,
|
|
857
864
|
hours: 1e3 * 60 * 60,
|
|
@@ -859,35 +866,35 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
|
|
|
859
866
|
};
|
|
860
867
|
return e * (n[t] || n.hours);
|
|
861
868
|
};
|
|
862
|
-
function
|
|
869
|
+
function Ve(e) {
|
|
863
870
|
return (t) => {
|
|
864
|
-
let { allow_delete_message: n, delete_duration: r } =
|
|
871
|
+
let { allow_delete_message: n, delete_duration: r } = G.setting || {};
|
|
865
872
|
if (!n) return !1;
|
|
866
873
|
if (r <= 0) return !0;
|
|
867
874
|
let i = new Date(t).getTime();
|
|
868
875
|
return Date.now() - i <= e;
|
|
869
876
|
};
|
|
870
877
|
}
|
|
871
|
-
function
|
|
878
|
+
function He(e) {
|
|
872
879
|
return (t) => {
|
|
873
|
-
let { allow_revoke_message: n, revoke_duration: r } =
|
|
880
|
+
let { allow_revoke_message: n, revoke_duration: r } = G.setting || {};
|
|
874
881
|
if (!n) return !1;
|
|
875
882
|
if (r <= 0) return !0;
|
|
876
883
|
let i = new Date(t).getTime();
|
|
877
884
|
return Date.now() - i <= e;
|
|
878
885
|
};
|
|
879
886
|
}
|
|
880
|
-
var
|
|
881
|
-
let t =
|
|
887
|
+
var Ue = x([ze], (e) => {
|
|
888
|
+
let t = j(e), n = Be(G.setting?.delete_duration ?? 0, G.setting?.delete_duration_unit ?? "hours"), r = Be(G.setting?.revoke_duration ?? 0, G.setting?.revoke_duration_unit ?? "hours");
|
|
882
889
|
return {
|
|
883
890
|
...t,
|
|
884
|
-
acceptFilter:
|
|
885
|
-
isFileTypeAllowed:
|
|
886
|
-
allowDeleteChat:
|
|
887
|
-
allowDeleteMessage:
|
|
888
|
-
allowRevokeMessage:
|
|
891
|
+
acceptFilter: M(t.featureSet),
|
|
892
|
+
isFileTypeAllowed: ee(t.featureSet),
|
|
893
|
+
allowDeleteChat: G.setting?.allow_delete_chat ?? !1,
|
|
894
|
+
allowDeleteMessage: Ve(n),
|
|
895
|
+
allowRevokeMessage: He(r)
|
|
889
896
|
};
|
|
890
|
-
}),
|
|
897
|
+
}), We = (e, t, n) => {
|
|
891
898
|
let r = g(), i = f(!1), { currentUser: a, chats: o, currentChat: s } = _((e) => e.chat), l = f({
|
|
892
899
|
chats: null,
|
|
893
900
|
currentUser: null,
|
|
@@ -906,9 +913,9 @@ var He = x([Re], (e) => {
|
|
|
906
913
|
]), c(() => {
|
|
907
914
|
(async () => {
|
|
908
915
|
let { code: a, name: o, avatar: s, email: c, phone: l } = t || {};
|
|
909
|
-
if (!(!a || !o || !s || !c || !n || i.current)) try {
|
|
910
|
-
i.current = !0, await
|
|
911
|
-
let t = await
|
|
916
|
+
if (!(!a || !o || s && !de(s) || !c || !n || i.current)) try {
|
|
917
|
+
i.current = !0, await G.init(e, n);
|
|
918
|
+
let t = await G.setAuth({
|
|
912
919
|
code: a,
|
|
913
920
|
name: o,
|
|
914
921
|
avatar: s,
|
|
@@ -919,11 +926,11 @@ var He = x([Re], (e) => {
|
|
|
919
926
|
i.current = !1, console.error("Authentication failed: No user data returned");
|
|
920
927
|
return;
|
|
921
928
|
}
|
|
922
|
-
r(
|
|
923
|
-
let [{ data: u }, { data: d }] = await Promise.all([
|
|
929
|
+
r(me(t)), console.warn("Authenticated as:", t);
|
|
930
|
+
let [{ data: u }, { data: d }] = await Promise.all([G.getMembers(), G.getChats()]);
|
|
924
931
|
r(he(d)), r(ve(u));
|
|
925
932
|
let f = d?.reduce((e, n) => e + (n.new[t.id] ?? 0), 0) ?? 0;
|
|
926
|
-
r(
|
|
933
|
+
r(Ae(f)), console.warn("Total unread messages:", f);
|
|
927
934
|
} catch (e) {
|
|
928
935
|
i.current = !1, console.error("Failed to init chat or authenticate:", e);
|
|
929
936
|
}
|
|
@@ -939,32 +946,32 @@ var He = x([Re], (e) => {
|
|
|
939
946
|
"chats.message": (e) => {
|
|
940
947
|
console.warn("Message Event:", e);
|
|
941
948
|
let { chat: t, message: n, type: i, chat_id: a, message_id: o } = e;
|
|
942
|
-
i === "add" ? r(
|
|
949
|
+
i === "add" ? r(Se({
|
|
943
950
|
chat: t,
|
|
944
951
|
message: n
|
|
945
|
-
})) : i === "remove" || i === "revoke" ? r(
|
|
952
|
+
})) : i === "remove" || i === "revoke" ? r(De({
|
|
946
953
|
chat_id: a,
|
|
947
954
|
message_id: o,
|
|
948
955
|
type: i
|
|
949
|
-
})) : (i === "love" || i === "like") && r(
|
|
956
|
+
})) : (i === "love" || i === "like") && r(Oe({
|
|
950
957
|
chat_id: a,
|
|
951
958
|
message: n
|
|
952
959
|
}));
|
|
953
960
|
},
|
|
954
961
|
"chats.created": (e) => {
|
|
955
|
-
console.warn("Chat Event:", e), r(
|
|
962
|
+
console.warn("Chat Event:", e), r(we(e.chat));
|
|
956
963
|
},
|
|
957
964
|
"chats.updated": (e) => {
|
|
958
|
-
console.warn("Chat Event:", e), r(
|
|
965
|
+
console.warn("Chat Event:", e), r(Te(e.chat));
|
|
959
966
|
},
|
|
960
967
|
"chats.deleted": (e) => {
|
|
961
|
-
l.current.chats && (console.warn("Chat Event:", e), l.current.chats.find((t) => t.id === e.chat_id)?.type === "group" && r(
|
|
968
|
+
l.current.chats && (console.warn("Chat Event:", e), l.current.chats.find((t) => t.id === e.chat_id)?.type === "group" && r(Ce(e.chat_id)));
|
|
962
969
|
},
|
|
963
970
|
"chats.action": (e) => {
|
|
964
971
|
if (console.warn("Chat Event:", e), e.type === "read") {
|
|
965
|
-
e.chat && r(
|
|
972
|
+
e.chat && r(Te(e.chat));
|
|
966
973
|
let t = e.chat?.id ?? e.chat_id, n = e.member_id ?? e.user_id, i = e.message_id ?? e.chat?.message?.id;
|
|
967
|
-
t && n && i && r(
|
|
974
|
+
t && n && i && r(U({
|
|
968
975
|
chatId: Number(t),
|
|
969
976
|
memberId: Number(n),
|
|
970
977
|
lastReadId: Number(i)
|
|
@@ -977,7 +984,7 @@ var He = x([Re], (e) => {
|
|
|
977
984
|
"members.connect"(e) {
|
|
978
985
|
console.warn("Member Connected:", e);
|
|
979
986
|
let { member: t, timestamp: n, socketId: i } = e;
|
|
980
|
-
r(
|
|
987
|
+
r(H({
|
|
981
988
|
member: t,
|
|
982
989
|
timestamp: n,
|
|
983
990
|
socketId: i
|
|
@@ -987,19 +994,19 @@ var He = x([Re], (e) => {
|
|
|
987
994
|
console.warn("Member Disconnected:", e);
|
|
988
995
|
let { socketId: t } = e;
|
|
989
996
|
setTimeout(() => {
|
|
990
|
-
r(
|
|
997
|
+
r(ye(t));
|
|
991
998
|
}, 3e3);
|
|
992
999
|
}
|
|
993
1000
|
};
|
|
994
1001
|
return Object.entries(e).forEach(([e, t]) => {
|
|
995
|
-
|
|
1002
|
+
G.addEventListener(e, t);
|
|
996
1003
|
}), console.warn("Chat event listeners registered"), () => {
|
|
997
1004
|
Object.entries(e).forEach(([e, t]) => {
|
|
998
|
-
|
|
999
|
-
}), console.warn("Chat event listeners removed"), r(
|
|
1005
|
+
G.removeEventListener(e, t);
|
|
1006
|
+
}), console.warn("Chat event listeners removed"), r(pe()), G.clearAuth(), console.warn("Clear auth");
|
|
1000
1007
|
};
|
|
1001
1008
|
}, [a?.id, r]);
|
|
1002
|
-
},
|
|
1009
|
+
}, Ge = t(void 0), Ke = ({ children: e }) => {
|
|
1003
1010
|
let [t, n] = p(!1), [r, i] = p([]), [o, s] = p(0), c = {
|
|
1004
1011
|
isOpen: t,
|
|
1005
1012
|
files: r,
|
|
@@ -1011,11 +1018,11 @@ var He = x([Re], (e) => {
|
|
|
1011
1018
|
n(!1);
|
|
1012
1019
|
}, [])
|
|
1013
1020
|
};
|
|
1014
|
-
return /* @__PURE__ */ T(
|
|
1021
|
+
return /* @__PURE__ */ T(Ge.Provider, {
|
|
1015
1022
|
value: c,
|
|
1016
1023
|
children: e
|
|
1017
1024
|
});
|
|
1018
|
-
},
|
|
1025
|
+
}, qe = ({ children: e }) => {
|
|
1019
1026
|
let [t, n] = p([]), r = a((e) => {
|
|
1020
1027
|
n((t) => t.filter((t) => t.id !== e));
|
|
1021
1028
|
}, []), i = a((e, t = "info") => {
|
|
@@ -1040,7 +1047,7 @@ var He = x([Re], (e) => {
|
|
|
1040
1047
|
}
|
|
1041
1048
|
}]);
|
|
1042
1049
|
}), [r]);
|
|
1043
|
-
return /* @__PURE__ */ T(
|
|
1050
|
+
return /* @__PURE__ */ T(Je.Provider, {
|
|
1044
1051
|
value: {
|
|
1045
1052
|
showToast: i,
|
|
1046
1053
|
removeToast: r,
|
|
@@ -1049,11 +1056,11 @@ var He = x([Re], (e) => {
|
|
|
1049
1056
|
},
|
|
1050
1057
|
children: e
|
|
1051
1058
|
});
|
|
1052
|
-
},
|
|
1053
|
-
let e = o(
|
|
1059
|
+
}, Je = t(void 0), Ye = () => {
|
|
1060
|
+
let e = o(Ge);
|
|
1054
1061
|
if (!e) throw Error("useFileViewer must be used within FileViewerProvider");
|
|
1055
1062
|
return e;
|
|
1056
|
-
},
|
|
1063
|
+
}, Xe = ({ onFilesAdded: e }) => {
|
|
1057
1064
|
let [t, n] = p(!1), r = f(0);
|
|
1058
1065
|
return {
|
|
1059
1066
|
isDragOver: t,
|
|
@@ -1072,7 +1079,7 @@ var He = x([Re], (e) => {
|
|
|
1072
1079
|
i && i.length > 0 && e(i);
|
|
1073
1080
|
}, [e])
|
|
1074
1081
|
};
|
|
1075
|
-
},
|
|
1082
|
+
}, Ze = () => {
|
|
1076
1083
|
let [e, t] = p({
|
|
1077
1084
|
isRecording: !1,
|
|
1078
1085
|
duration: 0,
|
|
@@ -1165,41 +1172,41 @@ var He = x([Re], (e) => {
|
|
|
1165
1172
|
_((e) => e.setting.currentLanguage);
|
|
1166
1173
|
let e = g();
|
|
1167
1174
|
return {
|
|
1168
|
-
t:
|
|
1175
|
+
t: q.t.bind(q),
|
|
1169
1176
|
toggleChangeLanguage: () => {
|
|
1170
|
-
|
|
1177
|
+
q.locale === "english" ? (q.locale = "vietnamese", e(Fe("vietnamese"))) : (q.locale = "english", e(Fe("english")));
|
|
1171
1178
|
}
|
|
1172
1179
|
};
|
|
1173
|
-
},
|
|
1174
|
-
let e = o(
|
|
1180
|
+
}, Qe = () => {
|
|
1181
|
+
let e = o(Je);
|
|
1175
1182
|
if (!e) throw Error("useToast must be used within ToastProvider");
|
|
1176
1183
|
return e;
|
|
1177
|
-
},
|
|
1184
|
+
}, $e = (e) => {
|
|
1178
1185
|
let t = g(), n = f(!1);
|
|
1179
1186
|
c(() => {
|
|
1180
1187
|
(() => {
|
|
1181
1188
|
if (!(!e || n.current)) try {
|
|
1182
|
-
n.current = !0, e && t(
|
|
1189
|
+
n.current = !0, e && t(Pe(e));
|
|
1183
1190
|
} catch (e) {
|
|
1184
1191
|
n.current = !1, console.error("Failed to init chat or authenticate:", e);
|
|
1185
1192
|
}
|
|
1186
1193
|
})();
|
|
1187
1194
|
}, [e, t]);
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1195
|
+
}, et = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
|
|
1196
|
+
$e(n), We(e, t, i);
|
|
1190
1197
|
let [o, s] = p("closed"), [c, l] = p(null), [u, d] = p(null), [f, m] = p({
|
|
1191
1198
|
width: 1e3,
|
|
1192
1199
|
height: 750
|
|
1193
1200
|
});
|
|
1194
1201
|
return /* @__PURE__ */ E("div", {
|
|
1195
1202
|
className: `chatbot-container ${o}`,
|
|
1196
|
-
children: [o === "closed" && /* @__PURE__ */ T(
|
|
1203
|
+
children: [o === "closed" && /* @__PURE__ */ T(rt, {
|
|
1197
1204
|
mode: o,
|
|
1198
1205
|
setMode: s,
|
|
1199
1206
|
dragPosition: c,
|
|
1200
1207
|
setDragPosition: l,
|
|
1201
1208
|
primaryColor: a.primaryColor
|
|
1202
|
-
}), o !== "closed" && /* @__PURE__ */ T(
|
|
1209
|
+
}), o !== "closed" && /* @__PURE__ */ T(Wt, {
|
|
1203
1210
|
logoUrl: r,
|
|
1204
1211
|
mode: o,
|
|
1205
1212
|
setMode: s,
|
|
@@ -1211,18 +1218,19 @@ var He = x([Re], (e) => {
|
|
|
1211
1218
|
setFullpageSize: m,
|
|
1212
1219
|
chatKey: e,
|
|
1213
1220
|
auth: t,
|
|
1221
|
+
workspace: i,
|
|
1214
1222
|
...a
|
|
1215
1223
|
})]
|
|
1216
1224
|
});
|
|
1217
|
-
},
|
|
1218
|
-
let { isOpen: e, files: t, initialIndex: n, closeViewer: r } =
|
|
1219
|
-
return e ? /* @__PURE__ */ T(
|
|
1225
|
+
}, tt = () => {
|
|
1226
|
+
let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = Ye();
|
|
1227
|
+
return e ? /* @__PURE__ */ T(tn, {
|
|
1220
1228
|
isOpen: e,
|
|
1221
1229
|
files: t,
|
|
1222
1230
|
initialIndex: n,
|
|
1223
1231
|
onClose: r
|
|
1224
1232
|
}) : null;
|
|
1225
|
-
},
|
|
1233
|
+
}, nt = (e) => {
|
|
1226
1234
|
let t = f(null), [n, r] = p(null);
|
|
1227
1235
|
return u(() => {
|
|
1228
1236
|
let e = t.current;
|
|
@@ -1239,13 +1247,13 @@ var He = x([Re], (e) => {
|
|
|
1239
1247
|
}
|
|
1240
1248
|
r(i);
|
|
1241
1249
|
}, []), /* @__PURE__ */ T(h, {
|
|
1242
|
-
store:
|
|
1243
|
-
children: /* @__PURE__ */ T(
|
|
1250
|
+
store: Re,
|
|
1251
|
+
children: /* @__PURE__ */ T(Ke, { children: /* @__PURE__ */ T(qe, { children: /* @__PURE__ */ E("div", {
|
|
1244
1252
|
ref: t,
|
|
1245
|
-
children: [n && v(/* @__PURE__ */ T(
|
|
1253
|
+
children: [n && v(/* @__PURE__ */ T(et, { ...e }), n), n && v(/* @__PURE__ */ T(tt, {}), n)]
|
|
1246
1254
|
}) }) })
|
|
1247
1255
|
});
|
|
1248
|
-
},
|
|
1256
|
+
}, rt = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
|
|
1249
1257
|
let [i, a] = p(!1), [o, s] = p({
|
|
1250
1258
|
x: 0,
|
|
1251
1259
|
y: 0
|
|
@@ -1332,7 +1340,7 @@ var He = x([Re], (e) => {
|
|
|
1332
1340
|
children: t
|
|
1333
1341
|
}));
|
|
1334
1342
|
return u.displayName = e, u;
|
|
1335
|
-
},
|
|
1343
|
+
}, it = Q("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
|
|
1336
1344
|
filter: "url(#filter0_d_4_4932)",
|
|
1337
1345
|
children: /* @__PURE__ */ T("path", {
|
|
1338
1346
|
d: "M2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8Z",
|
|
@@ -1384,7 +1392,7 @@ var He = x([Re], (e) => {
|
|
|
1384
1392
|
result: "shape"
|
|
1385
1393
|
})
|
|
1386
1394
|
]
|
|
1387
|
-
}) })] })),
|
|
1395
|
+
}) })] })), at = Q("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
|
|
1388
1396
|
clipPath: "url(#clip0_4_9682)",
|
|
1389
1397
|
children: [/* @__PURE__ */ T("path", {
|
|
1390
1398
|
d: "M6.74458 1.90514C6.76976 1.85941 6.80675 1.82128 6.85169 1.79472C6.89664 1.76816 6.94788 1.75415 7.00008 1.75415C7.05229 1.75415 7.10353 1.76816 7.14848 1.79472C7.19342 1.82128 7.23041 1.85941 7.25558 1.90514L8.97758 5.17414C9.01865 5.24984 9.07596 5.3155 9.14541 5.36642C9.21486 5.41734 9.29473 5.45225 9.37927 5.46864C9.46381 5.48504 9.55093 5.48251 9.63438 5.46125C9.71783 5.43998 9.79554 5.4005 9.86192 5.34564L12.3568 3.20831C12.4047 3.16936 12.4637 3.1466 12.5254 3.14333C12.587 3.14005 12.6481 3.15642 12.6999 3.19008C12.7516 3.22374 12.7914 3.27295 12.8134 3.33063C12.8354 3.38831 12.8385 3.45148 12.8223 3.51106L11.1692 9.48789C11.1354 9.6102 11.0627 9.71817 10.9621 9.79543C10.8615 9.8727 10.7384 9.91505 10.6115 9.91606H3.38925C3.26228 9.91517 3.13907 9.87288 3.03831 9.79561C2.93756 9.71833 2.86477 9.61029 2.831 9.48789L1.17842 3.51164C1.16223 3.45207 1.16536 3.38889 1.18737 3.33121C1.20937 3.27353 1.24911 3.22432 1.30086 3.19066C1.35261 3.157 1.41371 3.14063 1.47536 3.14391C1.53701 3.14719 1.59602 3.16994 1.64392 3.20889L4.13825 5.34623C4.20463 5.40108 4.28234 5.44056 4.36579 5.46183C4.44924 5.4831 4.53636 5.48562 4.6209 5.46923C4.70544 5.45283 4.7853 5.41792 4.85475 5.367C4.92421 5.31608 4.98152 5.25042 5.02258 5.17473L6.74458 1.90514Z",
|
|
@@ -1409,7 +1417,7 @@ var He = x([Re], (e) => {
|
|
|
1409
1417
|
}) })] }), {
|
|
1410
1418
|
viewBox: "0 0 14 14",
|
|
1411
1419
|
sizeDefault: 14
|
|
1412
|
-
}),
|
|
1420
|
+
}), ot = Q("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
|
|
1413
1421
|
width: "22.4671",
|
|
1414
1422
|
height: "22.4671",
|
|
1415
1423
|
fill: "url(#pattern0_22_372)"
|
|
@@ -1431,7 +1439,7 @@ var He = x([Re], (e) => {
|
|
|
1431
1439
|
})] })] }), {
|
|
1432
1440
|
viewBox: "0 0 23 23",
|
|
1433
1441
|
sizeDefault: 23
|
|
1434
|
-
}),
|
|
1442
|
+
}), st = Q("MemberList", /* @__PURE__ */ E(w, { children: [
|
|
1435
1443
|
/* @__PURE__ */ T("path", {
|
|
1436
1444
|
d: "M10.6667 14V12.6667C10.6667 11.9594 10.3857 11.2811 9.88562 10.781C9.38552 10.281 8.70724 10 8 10H4C3.29276 10 2.61448 10.281 2.11438 10.781C1.61428 11.2811 1.33333 11.9594 1.33333 12.6667V14",
|
|
1437
1445
|
stroke: "currentColor",
|
|
@@ -1453,7 +1461,7 @@ var He = x([Re], (e) => {
|
|
|
1453
1461
|
strokeLinecap: "round",
|
|
1454
1462
|
strokeLinejoin: "round"
|
|
1455
1463
|
})
|
|
1456
|
-
] }), { sizeDefault: 16 }),
|
|
1464
|
+
] }), { sizeDefault: 16 }), ct = Q("GroupList", /* @__PURE__ */ E(w, { children: [
|
|
1457
1465
|
/* @__PURE__ */ T("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
1458
1466
|
/* @__PURE__ */ T("circle", {
|
|
1459
1467
|
cx: "9",
|
|
@@ -1467,12 +1475,12 @@ var He = x([Re], (e) => {
|
|
|
1467
1475
|
viewBox: "0 0 24 24",
|
|
1468
1476
|
strokeColorDefault: "currentColor",
|
|
1469
1477
|
strokeWidthDefault: 2
|
|
1470
|
-
}),
|
|
1478
|
+
}), lt = Q("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
|
|
1471
1479
|
sizeDefault: 20,
|
|
1472
1480
|
viewBox: "0 0 24 24",
|
|
1473
1481
|
strokeColorDefault: "currentColor",
|
|
1474
1482
|
strokeWidthDefault: 2
|
|
1475
|
-
}),
|
|
1483
|
+
}), ut = Q("Mute", /* @__PURE__ */ E(w, { children: [
|
|
1476
1484
|
/* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
|
|
1477
1485
|
/* @__PURE__ */ T("path", { d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" }),
|
|
1478
1486
|
/* @__PURE__ */ T("path", { d: "m2 2 20 20" }),
|
|
@@ -1501,7 +1509,7 @@ Q("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 1
|
|
|
1501
1509
|
strokeColorDefault: "currentColor",
|
|
1502
1510
|
strokeWidthDefault: 2
|
|
1503
1511
|
});
|
|
1504
|
-
var
|
|
1512
|
+
var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
|
|
1505
1513
|
x: "3",
|
|
1506
1514
|
y: "3",
|
|
1507
1515
|
width: "18",
|
|
@@ -1533,22 +1541,22 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1533
1541
|
viewBox: "0 0 24 24",
|
|
1534
1542
|
strokeColorDefault: "currentColor",
|
|
1535
1543
|
strokeWidthDefault: 1.7
|
|
1536
|
-
}),
|
|
1544
|
+
}), ft = Q("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
|
|
1537
1545
|
sizeDefault: 24,
|
|
1538
1546
|
viewBox: "0 0 24 24",
|
|
1539
1547
|
strokeColorDefault: "currentColor",
|
|
1540
1548
|
strokeWidthDefault: 2
|
|
1541
|
-
}),
|
|
1549
|
+
}), pt = Q("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
|
|
1542
1550
|
sizeDefault: 24,
|
|
1543
1551
|
viewBox: "0 0 24 24",
|
|
1544
1552
|
strokeColorDefault: "currentColor",
|
|
1545
1553
|
strokeWidthDefault: 2
|
|
1546
|
-
}),
|
|
1554
|
+
}), mt = Q("Conversation", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }) }), {
|
|
1547
1555
|
sizeDefault: 20,
|
|
1548
1556
|
viewBox: "0 0 24 24",
|
|
1549
1557
|
strokeColorDefault: "currentColor",
|
|
1550
1558
|
strokeWidthDefault: 2
|
|
1551
|
-
}),
|
|
1559
|
+
}), ht = Q("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
|
|
1552
1560
|
clipPath: "url(#clip0_22_6147)",
|
|
1553
1561
|
fill: "none",
|
|
1554
1562
|
children: [/* @__PURE__ */ T("path", {
|
|
@@ -1574,7 +1582,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1574
1582
|
sizeDefault: 20,
|
|
1575
1583
|
viewBox: "0 0 20 20",
|
|
1576
1584
|
strokeColorDefault: "currentColor"
|
|
1577
|
-
}),
|
|
1585
|
+
}), gt = Q("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1578
1586
|
d: "M4.16675 10H15.8334",
|
|
1579
1587
|
stroke: "currentColor",
|
|
1580
1588
|
strokeWidth: "1.67",
|
|
@@ -1590,7 +1598,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1590
1598
|
sizeDefault: 20,
|
|
1591
1599
|
viewBox: "0 0 20 20",
|
|
1592
1600
|
strokeColorDefault: "currentColor"
|
|
1593
|
-
}),
|
|
1601
|
+
}), _t = Q("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1594
1602
|
d: "M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z",
|
|
1595
1603
|
stroke: "currentColor",
|
|
1596
1604
|
strokeWidth: "1.67",
|
|
@@ -1606,7 +1614,7 @@ var ut = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
|
|
|
1606
1614
|
sizeDefault: 20,
|
|
1607
1615
|
viewBox: "0 0 20 20",
|
|
1608
1616
|
strokeColorDefault: "currentColor"
|
|
1609
|
-
}),
|
|
1617
|
+
}), vt = Q("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1610
1618
|
d: "M10.1833 1.66699H9.81667C9.37464 1.66699 8.95072 1.84259 8.63816 2.15515C8.3256 2.46771 8.15 2.89163 8.15 3.33366V3.48366C8.1497 3.77593 8.07255 4.06298 7.92628 4.31602C7.78002 4.56906 7.56978 4.77919 7.31667 4.92533L6.95834 5.13366C6.70497 5.27994 6.41756 5.35695 6.125 5.35695C5.83244 5.35695 5.54503 5.27994 5.29167 5.13366L5.16667 5.06699C4.78422 4.84638 4.32987 4.78653 3.90334 4.90058C3.47681 5.01464 3.11296 5.29327 2.89167 5.67533L2.70833 5.99199C2.48772 6.37444 2.42787 6.82879 2.54192 7.25532C2.65598 7.68185 2.93461 8.0457 3.31667 8.26699L3.44167 8.35033C3.69356 8.49575 3.90302 8.70457 4.04921 8.95602C4.1954 9.20747 4.27325 9.4928 4.275 9.78366V10.2087C4.27617 10.5023 4.19971 10.7911 4.05337 11.0457C3.90703 11.3004 3.69601 11.5118 3.44167 11.6587L3.31667 11.7337C2.93461 11.955 2.65598 12.3188 2.54192 12.7453C2.42787 13.1719 2.48772 13.6262 2.70833 14.0087L2.89167 14.3253C3.11296 14.7074 3.47681 14.986 3.90334 15.1001C4.32987 15.2141 4.78422 15.1543 5.16667 14.9337L5.29167 14.867C5.54503 14.7207 5.83244 14.6437 6.125 14.6437C6.41756 14.6437 6.70497 14.7207 6.95834 14.867L7.31667 15.0753C7.56978 15.2215 7.78002 15.4316 7.92628 15.6846C8.07255 15.9377 8.1497 16.2247 8.15 16.517V16.667C8.15 17.109 8.3256 17.5329 8.63816 17.8455C8.95072 18.1581 9.37464 18.3337 9.81667 18.3337H10.1833C10.6254 18.3337 11.0493 18.1581 11.3618 17.8455C11.6744 17.5329 11.85 17.109 11.85 16.667V16.517C11.8503 16.2247 11.9275 15.9377 12.0737 15.6846C12.22 15.4316 12.4302 15.2215 12.6833 15.0753L13.0417 14.867C13.295 14.7207 13.5824 14.6437 13.875 14.6437C14.1676 14.6437 14.455 14.7207 14.7083 14.867L14.8333 14.9337C15.2158 15.1543 15.6701 15.2141 16.0967 15.1001C16.5232 14.986 16.887 14.7074 17.1083 14.3253L17.2917 14.0003C17.5123 13.6179 17.5721 13.1635 17.4581 12.737C17.344 12.3105 17.0654 11.9466 16.6833 11.7253L16.5583 11.6587C16.304 11.5118 16.093 11.3004 15.9466 11.0457C15.8003 10.7911 15.7238 10.5023 15.725 10.2087V9.79199C15.7238 9.49831 15.8003 9.20953 15.9466 8.9549C16.093 8.70027 16.304 8.48883 16.5583 8.34199L16.6833 8.26699C17.0654 8.0457 17.344 7.68185 17.4581 7.25532C17.5721 6.82879 17.5123 6.37444 17.2917 5.99199L17.1083 5.67533C16.887 5.29327 16.5232 5.01464 16.0967 4.90058C15.6701 4.78653 15.2158 4.84638 14.8333 5.06699L14.7083 5.13366C14.455 5.27994 14.1676 5.35695 13.875 5.35695C13.5824 5.35695 13.295 5.27994 13.0417 5.13366L12.6833 4.92533C12.4302 4.77919 12.22 4.56906 12.0737 4.31602C11.9275 4.06298 11.8503 3.77593 11.85 3.48366V3.33366C11.85 2.89163 11.6744 2.46771 11.3618 2.15515C11.0493 1.84259 10.6254 1.66699 10.1833 1.66699Z",
|
|
1611
1619
|
stroke: "currentColor",
|
|
1612
1620
|
strokeWidth: "1.66667",
|
|
@@ -1629,7 +1637,7 @@ Q("Pin", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 1
|
|
|
1629
1637
|
strokeColorDefault: "currentColor",
|
|
1630
1638
|
strokeWidthDefault: 2
|
|
1631
1639
|
});
|
|
1632
|
-
var
|
|
1640
|
+
var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
1633
1641
|
/* @__PURE__ */ T("circle", {
|
|
1634
1642
|
cx: "12",
|
|
1635
1643
|
cy: "12",
|
|
@@ -1647,7 +1655,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1647
1655
|
viewBox: "0 0 24 24",
|
|
1648
1656
|
strokeColorDefault: "currentColor",
|
|
1649
1657
|
strokeWidthDefault: 2
|
|
1650
|
-
}),
|
|
1658
|
+
}), bt = Q("RemoveMember", /* @__PURE__ */ E(w, { children: [
|
|
1651
1659
|
/* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
1652
1660
|
/* @__PURE__ */ T("circle", {
|
|
1653
1661
|
cx: "9",
|
|
@@ -1671,7 +1679,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1671
1679
|
viewBox: "0 0 24 24",
|
|
1672
1680
|
strokeColorDefault: "currentColor",
|
|
1673
1681
|
strokeWidthDefault: 2
|
|
1674
|
-
}),
|
|
1682
|
+
}), xt = Q("Key", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" }), /* @__PURE__ */ T("circle", {
|
|
1675
1683
|
cx: "16.5",
|
|
1676
1684
|
cy: "7.5",
|
|
1677
1685
|
r: ".5",
|
|
@@ -1681,7 +1689,7 @@ var vt = Q("Help", /* @__PURE__ */ E(w, { children: [
|
|
|
1681
1689
|
viewBox: "0 0 24 24",
|
|
1682
1690
|
strokeColorDefault: "currentColor",
|
|
1683
1691
|
strokeWidthDefault: 2
|
|
1684
|
-
}),
|
|
1692
|
+
}), St = Q("Edit", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }), /* @__PURE__ */ T("path", { d: "m15 5 4 4" })] }), {
|
|
1685
1693
|
sizeDefault: 14,
|
|
1686
1694
|
viewBox: "0 0 24 24",
|
|
1687
1695
|
strokeColorDefault: "currentColor",
|
|
@@ -1693,7 +1701,7 @@ Q("Bell", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M10.
|
|
|
1693
1701
|
strokeColorDefault: "currentColor",
|
|
1694
1702
|
strokeWidthDefault: 2
|
|
1695
1703
|
});
|
|
1696
|
-
var
|
|
1704
|
+
var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
1697
1705
|
/* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
|
|
1698
1706
|
/* @__PURE__ */ T("circle", {
|
|
1699
1707
|
cx: "9",
|
|
@@ -1717,12 +1725,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1717
1725
|
viewBox: "0 0 24 24",
|
|
1718
1726
|
strokeColorDefault: "currentColor",
|
|
1719
1727
|
strokeWidthDefault: 2
|
|
1720
|
-
}),
|
|
1728
|
+
}), wt = Q("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
|
|
1721
1729
|
sizeDefault: 16,
|
|
1722
1730
|
viewBox: "0 0 24 24",
|
|
1723
1731
|
strokeColorDefault: "currentColor",
|
|
1724
1732
|
strokeWidthDefault: 2
|
|
1725
|
-
}),
|
|
1733
|
+
}), Tt = Q("More", /* @__PURE__ */ E(w, { children: [
|
|
1726
1734
|
/* @__PURE__ */ T("circle", {
|
|
1727
1735
|
cx: "12",
|
|
1728
1736
|
cy: "12",
|
|
@@ -1744,12 +1752,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1744
1752
|
strokeColorDefault: "currentColor",
|
|
1745
1753
|
strokeWidthDefault: 2,
|
|
1746
1754
|
strokeLinecapDefault: "round"
|
|
1747
|
-
}),
|
|
1755
|
+
}), Et = Q("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
|
|
1748
1756
|
sizeDefault: 14,
|
|
1749
1757
|
viewBox: "0 0 24 24",
|
|
1750
1758
|
strokeColorDefault: "currentColor",
|
|
1751
1759
|
strokeWidthDefault: 2
|
|
1752
|
-
}),
|
|
1760
|
+
}), Dt = Q("OpenFullPage", /* @__PURE__ */ E(w, { children: [
|
|
1753
1761
|
/* @__PURE__ */ T("path", { d: "M15 3h6v6" }),
|
|
1754
1762
|
/* @__PURE__ */ T("path", { d: "m21 3-7 7" }),
|
|
1755
1763
|
/* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
|
|
@@ -1759,7 +1767,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1759
1767
|
viewBox: "0 0 24 24",
|
|
1760
1768
|
strokeColorDefault: "currentColor",
|
|
1761
1769
|
strokeWidthDefault: 2
|
|
1762
|
-
}),
|
|
1770
|
+
}), Ot = Q("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
|
|
1763
1771
|
/* @__PURE__ */ T("path", { d: "m14 10 7-7" }),
|
|
1764
1772
|
/* @__PURE__ */ T("path", { d: "M20 10h-6V4" }),
|
|
1765
1773
|
/* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
|
|
@@ -1769,19 +1777,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1769
1777
|
viewBox: "0 0 24 24",
|
|
1770
1778
|
strokeColorDefault: "currentColor",
|
|
1771
1779
|
strokeWidthDefault: 2
|
|
1772
|
-
}),
|
|
1780
|
+
}), kt = Q("Reply", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M20 18v-2a4 4 0 0 0-4-4H4" }), /* @__PURE__ */ T("path", { d: "m9 17-5-5 5-5" })] }), {
|
|
1773
1781
|
sizeDefault: 20,
|
|
1774
1782
|
viewBox: "0 0 24 24",
|
|
1775
1783
|
strokeColorDefault: "currentColor",
|
|
1776
1784
|
strokeWidthDefault: 2
|
|
1777
|
-
}),
|
|
1785
|
+
}), At = Q("Attachment", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.51a2 2 0 0 1-2.83-2.83l8.49-8.48" }) }), {
|
|
1778
1786
|
sizeDefault: 20,
|
|
1779
1787
|
viewBox: "0 0 24 24",
|
|
1780
1788
|
strokeColorDefault: "currentColor",
|
|
1781
1789
|
strokeWidthDefault: 2,
|
|
1782
1790
|
strokeLinecapDefault: "round",
|
|
1783
1791
|
strokeLinejoinDefault: "round"
|
|
1784
|
-
}),
|
|
1792
|
+
}), jt = Q("Image", /* @__PURE__ */ E(w, { children: [
|
|
1785
1793
|
/* @__PURE__ */ T("rect", {
|
|
1786
1794
|
width: "18",
|
|
1787
1795
|
height: "18",
|
|
@@ -1803,7 +1811,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1803
1811
|
strokeWidthDefault: 2,
|
|
1804
1812
|
strokeLinecapDefault: "round",
|
|
1805
1813
|
strokeLinejoinDefault: "round"
|
|
1806
|
-
}),
|
|
1814
|
+
}), Mt = Q("Voice", /* @__PURE__ */ E(w, { children: [
|
|
1807
1815
|
/* @__PURE__ */ T("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
|
|
1808
1816
|
/* @__PURE__ */ T("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
1809
1817
|
/* @__PURE__ */ T("line", {
|
|
@@ -1819,7 +1827,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1819
1827
|
strokeWidthDefault: 2,
|
|
1820
1828
|
strokeLinecapDefault: "round",
|
|
1821
1829
|
strokeLinejoinDefault: "round"
|
|
1822
|
-
}),
|
|
1830
|
+
}), Nt = Q("Emoji", /* @__PURE__ */ E(w, { children: [
|
|
1823
1831
|
/* @__PURE__ */ T("circle", {
|
|
1824
1832
|
cx: "12",
|
|
1825
1833
|
cy: "12",
|
|
@@ -1845,7 +1853,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1845
1853
|
strokeWidthDefault: 2,
|
|
1846
1854
|
strokeLinecapDefault: "round",
|
|
1847
1855
|
strokeLinejoinDefault: "round"
|
|
1848
|
-
}),
|
|
1856
|
+
}), Pt = Q("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
|
|
1849
1857
|
x1: "22",
|
|
1850
1858
|
y1: "2",
|
|
1851
1859
|
x2: "11",
|
|
@@ -1857,27 +1865,27 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1857
1865
|
strokeWidthDefault: 2,
|
|
1858
1866
|
strokeLinecapDefault: "round",
|
|
1859
1867
|
strokeLinejoinDefault: "round"
|
|
1860
|
-
}),
|
|
1868
|
+
}), Ft = Q("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
|
|
1861
1869
|
sizeDefault: 16,
|
|
1862
1870
|
viewBox: "0 0 24 24",
|
|
1863
1871
|
strokeColorDefault: "currentColor",
|
|
1864
1872
|
strokeWidthDefault: 2
|
|
1865
|
-
}),
|
|
1873
|
+
}), It = Q("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
|
|
1866
1874
|
sizeDefault: 16,
|
|
1867
1875
|
viewBox: "0 0 24 24",
|
|
1868
1876
|
strokeColorDefault: "currentColor",
|
|
1869
1877
|
strokeWidthDefault: 2
|
|
1870
|
-
}),
|
|
1878
|
+
}), Lt = Q("Like", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }), /* @__PURE__ */ T("path", { d: "M7 10v12" })] }), {
|
|
1871
1879
|
sizeDefault: 24,
|
|
1872
1880
|
viewBox: "0 0 24 24",
|
|
1873
1881
|
strokeColorDefault: "currentColor",
|
|
1874
1882
|
strokeWidthDefault: 2
|
|
1875
|
-
}),
|
|
1883
|
+
}), Rt = Q("Love", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" }) }), {
|
|
1876
1884
|
sizeDefault: 24,
|
|
1877
1885
|
viewBox: "0 0 24 24",
|
|
1878
1886
|
strokeColorDefault: "currentColor",
|
|
1879
1887
|
strokeWidthDefault: 2
|
|
1880
|
-
}),
|
|
1888
|
+
}), zt = Q("DeleteMessage", /* @__PURE__ */ E(w, { children: [
|
|
1881
1889
|
/* @__PURE__ */ T("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
1882
1890
|
/* @__PURE__ */ T("path", { d: "M3 6h18" }),
|
|
1883
1891
|
/* @__PURE__ */ T("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
@@ -1886,12 +1894,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1886
1894
|
viewBox: "0 0 24 24",
|
|
1887
1895
|
strokeColorDefault: "currentColor",
|
|
1888
1896
|
strokeWidthDefault: 2
|
|
1889
|
-
}),
|
|
1897
|
+
}), Bt = Q("RevokeMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ T("path", { d: "M3 3v5h5" })] }), {
|
|
1890
1898
|
sizeDefault: 24,
|
|
1891
1899
|
viewBox: "0 0 24 24",
|
|
1892
1900
|
strokeColorDefault: "currentColor",
|
|
1893
1901
|
strokeWidthDefault: 2
|
|
1894
|
-
}),
|
|
1902
|
+
}), Vt = Q("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
|
|
1895
1903
|
d: "M9 3L3.5 8.5L1 6",
|
|
1896
1904
|
stroke: "#2B7FFF",
|
|
1897
1905
|
strokeLinecap: "round",
|
|
@@ -1904,7 +1912,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1904
1912
|
})] }), {
|
|
1905
1913
|
sizeDefault: 12,
|
|
1906
1914
|
viewBox: "0 0 12 12"
|
|
1907
|
-
}),
|
|
1915
|
+
}), Ht = Q("language", /* @__PURE__ */ E(w, { children: [
|
|
1908
1916
|
/* @__PURE__ */ T("circle", {
|
|
1909
1917
|
cx: "12",
|
|
1910
1918
|
cy: "12",
|
|
@@ -1919,7 +1927,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1919
1927
|
strokeWidthDefault: 2,
|
|
1920
1928
|
strokeLinecapDefault: "round",
|
|
1921
1929
|
strokeLinejoinDefault: "round"
|
|
1922
|
-
}),
|
|
1930
|
+
}), Ut = Q("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
|
|
1923
1931
|
/* @__PURE__ */ T("path", { d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" }),
|
|
1924
1932
|
/* @__PURE__ */ T("path", { d: "m14 19.5 3-3 3 3" }),
|
|
1925
1933
|
/* @__PURE__ */ T("path", { d: "M17 22v-5.5" }),
|
|
@@ -1932,23 +1940,23 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1932
1940
|
sizeDefault: 20,
|
|
1933
1941
|
viewBox: "0 0 24 24",
|
|
1934
1942
|
strokeColorDefault: "currentColor"
|
|
1935
|
-
}),
|
|
1943
|
+
}), Wt = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, primaryColor: i, dragPosition: o, setDragPosition: l, fullpagePosition: u, setFullpagePosition: m, fullpageSize: h = {
|
|
1936
1944
|
width: 1e3,
|
|
1937
1945
|
height: 750
|
|
1938
1946
|
}, setFullpageSize: v }) => {
|
|
1939
|
-
let { t: y } = Z(), [b, x] = p(!1), [S, C] = p(!1), [D, k] = p(null), [
|
|
1947
|
+
let { t: y } = Z(), [b, x] = p(!1), [S, C] = p(!1), [D, k] = p(null), [A, j] = p(!1), [M, ee] = p(!1), [te, N] = p(!1), [ne, P] = p("chats"), [re, ie] = p("members"), { showToast: F, confirm: I } = Qe(), [L, R] = p("all"), [ae, oe] = p(!1), [z, se] = p(!1), [ce, le] = p(null), [B, ue] = p({
|
|
1940
1948
|
mouseX: 0,
|
|
1941
1949
|
mouseY: 0,
|
|
1942
1950
|
baseW: 0,
|
|
1943
1951
|
baseH: 0,
|
|
1944
1952
|
baseX: 0,
|
|
1945
1953
|
baseY: 0
|
|
1946
|
-
}), [
|
|
1954
|
+
}), [de, fe] = p({
|
|
1947
1955
|
x: 0,
|
|
1948
1956
|
y: 0
|
|
1949
|
-
}),
|
|
1950
|
-
e && e.length > 0 &&
|
|
1951
|
-
} }), { currentChat:
|
|
1957
|
+
}), pe = f(null), me = f(null), [ge, ve] = p(""), H = s(ge), [ye, be] = p(!1), [xe, Se] = p(!1), [Ce, we] = p(!1), { hasGroupChat: Te } = _(Ue), { isDragOver: Ee, handleDragEnter: De, handleDragOver: Oe, handleDragLeave: ke, handleDrop: Ae } = Xe({ onFilesAdded: (e) => {
|
|
1958
|
+
e && e.length > 0 && me.current?.processPastedFiles(e);
|
|
1959
|
+
} }), { currentChat: U, currentUser: W, members: je, currentChatMembers: Me, chats: K, totalMessagesUnread: q } = _((e) => e.chat);
|
|
1952
1960
|
c(() => {
|
|
1953
1961
|
if (n === "fullpage" && !u && m && v) {
|
|
1954
1962
|
let e = 1e3;
|
|
@@ -1966,12 +1974,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1966
1974
|
m,
|
|
1967
1975
|
v
|
|
1968
1976
|
]);
|
|
1969
|
-
let { theme:
|
|
1977
|
+
let { theme: Ne, primaryColor: Pe } = _((e) => e.setting), J = g(), Y = d(() => {
|
|
1970
1978
|
let e = H.toLowerCase().trim();
|
|
1971
1979
|
if (!e) return {
|
|
1972
|
-
filteredChat:
|
|
1973
|
-
if (
|
|
1974
|
-
let t =
|
|
1980
|
+
filteredChat: K.filter((e) => {
|
|
1981
|
+
if (L === "unread") {
|
|
1982
|
+
let t = W?.id && e.new ? e.new[W.id] ?? 0 : 0;
|
|
1975
1983
|
return Number(t) > 0;
|
|
1976
1984
|
}
|
|
1977
1985
|
return !0;
|
|
@@ -1981,7 +1989,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1981
1989
|
matchedFiles: [],
|
|
1982
1990
|
totalMatchedFiles: 0
|
|
1983
1991
|
};
|
|
1984
|
-
let t =
|
|
1992
|
+
let t = K.filter((t) => {
|
|
1985
1993
|
let n = t.name?.toLowerCase().includes(e), r = t.members?.some((t) => t.name.toLowerCase().includes(e));
|
|
1986
1994
|
return (n ?? !1) || (r ?? !1);
|
|
1987
1995
|
}).map((t) => {
|
|
@@ -1990,10 +1998,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
1990
1998
|
...t,
|
|
1991
1999
|
matchedMemberNames: n.map((e) => e.name)
|
|
1992
2000
|
};
|
|
1993
|
-
}), n =
|
|
2001
|
+
}), n = je.filter((t) => t.code === W?.code || ![t.name, t.code].some((t) => t.toLowerCase().includes(e)) ? !1 : !K.some((e) => e.type === "single" && e.members?.some((e) => e.code === t.code))), r = K.filter((t) => t.message?.content?.toLowerCase().includes(e)).map((e) => ({
|
|
1994
2002
|
chat: e,
|
|
1995
2003
|
message: e.message
|
|
1996
|
-
})), i =
|
|
2004
|
+
})), i = K.filter((t) => t.message?.files?.some((t) => t.name.toLowerCase().includes(e))).map((t) => ({
|
|
1997
2005
|
chat: t,
|
|
1998
2006
|
files: t.message?.files?.filter((t) => t.name.toLowerCase().includes(e)) ?? []
|
|
1999
2007
|
}));
|
|
@@ -2005,71 +2013,63 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2005
2013
|
totalMatchedFiles: i.reduce((e, t) => e + (t.files?.length ?? 0), 0)
|
|
2006
2014
|
};
|
|
2007
2015
|
}, [
|
|
2008
|
-
q,
|
|
2009
2016
|
K,
|
|
2017
|
+
je,
|
|
2010
2018
|
H,
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
]),
|
|
2019
|
+
L,
|
|
2020
|
+
W
|
|
2021
|
+
]), X = (e, t) => t.trim() ? /* @__PURE__ */ T(w, { children: e.split(RegExp(`(${t})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ T("span", {
|
|
2014
2022
|
className: "highlight-match",
|
|
2015
2023
|
children: e
|
|
2016
|
-
}, n) : e) }) : e,
|
|
2024
|
+
}, n) : e) }) : e, Fe = (e) => {
|
|
2017
2025
|
if (!e) return "#ffffff";
|
|
2018
2026
|
let t = e.startsWith("#") ? e.slice(1) : e;
|
|
2019
2027
|
if (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6) return "#ffffff";
|
|
2020
2028
|
let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16);
|
|
2021
2029
|
return (n * 299 + r * 587 + i * 114) / 1e3 > 180 ? "#1e293b" : "#ffffff";
|
|
2022
|
-
},
|
|
2023
|
-
|
|
2024
|
-
}, [
|
|
2025
|
-
if (t.stopPropagation(), await
|
|
2026
|
-
await
|
|
2030
|
+
}, Ie = d(() => Fe(Pe), [Pe]), Le = a((e) => {
|
|
2031
|
+
ve(e), R("all"), be(!1), Se(!1), we(!1);
|
|
2032
|
+
}, [R]), Re = async (e, t) => {
|
|
2033
|
+
if (t.stopPropagation(), await I("Bạn có chắc chắn muốn xóa cuộc trò chuyện này?")) try {
|
|
2034
|
+
await G.removeChat(Number(e)), J(he(K.filter((t) => t.id !== e))), U?.id === e && J(V(null)), F("Đã xóa cuộc trò chuyện", "success");
|
|
2027
2035
|
} catch (e) {
|
|
2028
2036
|
console.error("Lỗi khi xóa chat:", e), F("Không thể xóa cuộc trò chuyện. Vui lòng thử lại!", "error");
|
|
2029
2037
|
}
|
|
2030
|
-
},
|
|
2038
|
+
}, ze = (e) => {
|
|
2031
2039
|
k(e), C(!0);
|
|
2032
|
-
},
|
|
2040
|
+
}, Be = async (e, t, n) => {
|
|
2033
2041
|
try {
|
|
2034
|
-
let r = await
|
|
2035
|
-
r?.data && (
|
|
2042
|
+
let r = await G.updateGroup(e, t, n);
|
|
2043
|
+
r?.data && (J(he(K.map((t) => t.id === e ? {
|
|
2036
2044
|
...t,
|
|
2037
2045
|
...r.data
|
|
2038
|
-
} : t))),
|
|
2039
|
-
...
|
|
2046
|
+
} : t))), U?.id === e && J(V({
|
|
2047
|
+
...U,
|
|
2040
2048
|
...r.data
|
|
2041
2049
|
})), C(!1), k(null), F("Cập nhật thông tin nhóm thành công!", "success"));
|
|
2042
2050
|
} catch (e) {
|
|
2043
2051
|
console.error("Lỗi khi cập nhật thông tin nhóm:", e), F("Không thể cập nhật thông tin nhóm. Vui lòng thử lại!", "error");
|
|
2044
2052
|
}
|
|
2045
|
-
},
|
|
2046
|
-
|
|
2047
|
-
},
|
|
2048
|
-
try {
|
|
2049
|
-
await
|
|
2050
|
-
let n = await U.getMembers(e);
|
|
2051
|
-
n?.data && Y(_e(n.data));
|
|
2052
|
-
} catch (e) {
|
|
2053
|
-
console.error("Lỗi khi thêm thành viên:", e), F("Không thể thêm thành viên. Vui lòng thử lại!", "error");
|
|
2054
|
-
}
|
|
2055
|
-
}, Ke = async (e, t) => {
|
|
2056
|
-
if (await se("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
|
|
2057
|
-
await U.removeMember(e, t), Y(_e(Ne.filter((e) => String(e.id) !== String(t)))), String(t) === String(G?.id) ? (F("Bạn đã rời khỏi nhóm này", "success"), C(!1), k(null), Y(B(null)), Y(he((await U.getChats()).data ?? []))) : F("Đã xóa thành viên khỏi nhóm", "success");
|
|
2053
|
+
}, Ve = () => {
|
|
2054
|
+
j(!0);
|
|
2055
|
+
}, He = async (e, t) => {
|
|
2056
|
+
if (await I("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
|
|
2057
|
+
await G.removeMember(e, t), J(_e(Me.filter((e) => String(e.id) !== String(t)))), String(t) === String(W?.id) ? (F("Bạn đã rời khỏi nhóm này", "success"), C(!1), k(null), J(V(null)), J(he((await G.getChats()).data ?? []))) : F("Đã xóa thành viên khỏi nhóm", "success");
|
|
2058
2058
|
} catch (e) {
|
|
2059
2059
|
console.error("Lỗi khi xóa thành viên:", e), F("Không thể xóa thành viên. Vui lòng thử lại!", "error");
|
|
2060
2060
|
}
|
|
2061
|
-
},
|
|
2061
|
+
}, We = (e) => {
|
|
2062
2062
|
if (n !== "fullpage" || e.target.closest(".action-btn, .back-btn")) return;
|
|
2063
2063
|
let t = e.currentTarget.parentElement?.getBoundingClientRect();
|
|
2064
|
-
t && (
|
|
2064
|
+
t && (oe(!0), fe({
|
|
2065
2065
|
x: e.clientX - t.left,
|
|
2066
2066
|
y: e.clientY - t.top
|
|
2067
2067
|
}), e.stopPropagation(), e.preventDefault());
|
|
2068
|
-
},
|
|
2068
|
+
}, Ge = (e, t) => {
|
|
2069
2069
|
if (n !== "fullpage") return;
|
|
2070
2070
|
e.stopPropagation(), e.preventDefault();
|
|
2071
|
-
let r =
|
|
2072
|
-
r && (
|
|
2071
|
+
let r = pe.current?.getBoundingClientRect();
|
|
2072
|
+
r && (se(!0), le(t), ue({
|
|
2073
2073
|
mouseX: e.clientX,
|
|
2074
2074
|
mouseY: e.clientY,
|
|
2075
2075
|
baseW: r.width,
|
|
@@ -2080,20 +2080,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2080
2080
|
};
|
|
2081
2081
|
c(() => {
|
|
2082
2082
|
let e = (e) => {
|
|
2083
|
-
if (
|
|
2084
|
-
let t = e.clientX -
|
|
2085
|
-
switch (
|
|
2083
|
+
if (z && ce) {
|
|
2084
|
+
let t = e.clientX - B.mouseX, n = e.clientY - B.mouseY, r = B.baseW, i = B.baseH, a = B.baseX, o = B.baseY, s = 1e3, c = document.documentElement.clientWidth, l = document.documentElement.clientHeight;
|
|
2085
|
+
switch (ce) {
|
|
2086
2086
|
case "ne":
|
|
2087
|
-
r = Math.min(c -
|
|
2087
|
+
r = Math.min(c - B.baseX, Math.max(s, B.baseW + t)), i = Math.min(B.baseY + B.baseH, Math.max(700, B.baseH - n)), o = B.baseY + (B.baseH - i);
|
|
2088
2088
|
break;
|
|
2089
2089
|
case "nw":
|
|
2090
|
-
r = Math.min(
|
|
2090
|
+
r = Math.min(B.baseX + B.baseW, Math.max(s, B.baseW - t)), i = Math.min(B.baseY + B.baseH, Math.max(700, B.baseH - n)), a = B.baseX + (B.baseW - r), o = B.baseY + (B.baseH - i);
|
|
2091
2091
|
break;
|
|
2092
2092
|
case "se":
|
|
2093
|
-
r = Math.min(c -
|
|
2093
|
+
r = Math.min(c - B.baseX, Math.max(s, B.baseW + t)), i = Math.min(l - B.baseY, Math.max(700, B.baseH + n));
|
|
2094
2094
|
break;
|
|
2095
2095
|
case "sw":
|
|
2096
|
-
r = Math.min(
|
|
2096
|
+
r = Math.min(B.baseX + B.baseW, Math.max(s, B.baseW - t)), i = Math.min(l - B.baseY, Math.max(700, B.baseH + n)), a = B.baseX + (B.baseW - r);
|
|
2097
2097
|
break;
|
|
2098
2098
|
}
|
|
2099
2099
|
v?.({
|
|
@@ -2105,12 +2105,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2105
2105
|
});
|
|
2106
2106
|
return;
|
|
2107
2107
|
}
|
|
2108
|
-
if (!
|
|
2109
|
-
let t =
|
|
2108
|
+
if (!ae || !de) return;
|
|
2109
|
+
let t = pe.current;
|
|
2110
2110
|
if (!t) return;
|
|
2111
|
-
let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX -
|
|
2111
|
+
let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX - de.x;
|
|
2112
2112
|
c < 0 && (c = 0), c + i > o && (c = o - i);
|
|
2113
|
-
let u = e.clientY -
|
|
2113
|
+
let u = e.clientY - de.y;
|
|
2114
2114
|
u < 0 && (u = 0), u + a > s && (u = s - a), n === "fullpage" ? m?.({
|
|
2115
2115
|
x: c,
|
|
2116
2116
|
y: u
|
|
@@ -2119,30 +2119,30 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2119
2119
|
y: u
|
|
2120
2120
|
});
|
|
2121
2121
|
}, t = () => {
|
|
2122
|
-
|
|
2122
|
+
oe(!1), se(!1), le(null);
|
|
2123
2123
|
};
|
|
2124
|
-
return (
|
|
2124
|
+
return (ae || z) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
|
|
2125
2125
|
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
|
|
2126
2126
|
};
|
|
2127
2127
|
}, [
|
|
2128
|
-
|
|
2129
|
-
ue,
|
|
2130
|
-
fe,
|
|
2128
|
+
ae,
|
|
2131
2129
|
z,
|
|
2130
|
+
ce,
|
|
2131
|
+
de,
|
|
2132
2132
|
n,
|
|
2133
2133
|
l,
|
|
2134
2134
|
m,
|
|
2135
2135
|
v,
|
|
2136
|
-
|
|
2136
|
+
B
|
|
2137
2137
|
]);
|
|
2138
|
-
let
|
|
2138
|
+
let Ke = (() => {
|
|
2139
2139
|
if (!o || typeof document > "u") return null;
|
|
2140
2140
|
let e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = o.x, r = o.y;
|
|
2141
2141
|
return n + 400 > e && (n = e - 400 - 20), n < 20 && (n = 20), r + 640 > t && (r = t - 640 - 20), r < 20 && (r = 20), {
|
|
2142
2142
|
x: n,
|
|
2143
2143
|
y: r
|
|
2144
2144
|
};
|
|
2145
|
-
})(),
|
|
2145
|
+
})(), qe = () => {
|
|
2146
2146
|
if (n === "popup") r("fullpage"), v?.({
|
|
2147
2147
|
width: window.innerWidth,
|
|
2148
2148
|
height: window.innerHeight
|
|
@@ -2166,20 +2166,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2166
2166
|
x: 0,
|
|
2167
2167
|
y: 0
|
|
2168
2168
|
});
|
|
2169
|
-
},
|
|
2169
|
+
}, Je = a(async (e) => {
|
|
2170
2170
|
if (e) try {
|
|
2171
|
-
let t =
|
|
2171
|
+
let t = je.find((t) => String(t.id) === e);
|
|
2172
2172
|
if (t) {
|
|
2173
|
-
let n =
|
|
2174
|
-
if (n)
|
|
2173
|
+
let n = K.find((t) => t.type === "single" && t.members?.some((t) => String(t.id) === e));
|
|
2174
|
+
if (n) J(V(n));
|
|
2175
2175
|
else {
|
|
2176
|
-
await
|
|
2176
|
+
await G.setReceiver({
|
|
2177
2177
|
id: t.id,
|
|
2178
2178
|
code: t.code,
|
|
2179
2179
|
name: t.name
|
|
2180
2180
|
});
|
|
2181
|
-
let e = (await
|
|
2182
|
-
e &&
|
|
2181
|
+
let e = (await G.addChat(Number(t.id))).data;
|
|
2182
|
+
e && J(V(e));
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
2185
|
x(!1);
|
|
@@ -2187,13 +2187,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2187
2187
|
console.error("Lỗi khi tạo cuộc trò chuyện:", e), alert("Không thể tạo cuộc trò chuyện. Vui lòng thử lại sau.");
|
|
2188
2188
|
}
|
|
2189
2189
|
}, [
|
|
2190
|
-
q,
|
|
2191
2190
|
K,
|
|
2192
|
-
|
|
2191
|
+
je,
|
|
2192
|
+
J
|
|
2193
2193
|
]);
|
|
2194
2194
|
return /* @__PURE__ */ E("div", {
|
|
2195
|
-
ref:
|
|
2196
|
-
className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${
|
|
2195
|
+
ref: pe,
|
|
2196
|
+
className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${Ne === "dark" ? "dark-theme" : ""}`,
|
|
2197
2197
|
style: n === "fullpage" ? {
|
|
2198
2198
|
position: "fixed",
|
|
2199
2199
|
left: u ? `${u.x}px` : `${(window.innerWidth - h.width) / 2}px`,
|
|
@@ -2201,46 +2201,46 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2201
2201
|
width: `${h.width}px`,
|
|
2202
2202
|
height: `${h.height}px`,
|
|
2203
2203
|
borderRadius: h.width >= window.innerWidth && u?.x === 0 && u?.y === 0 ? 0 : "14px",
|
|
2204
|
-
"--primary":
|
|
2205
|
-
"--primary-contrast":
|
|
2206
|
-
} : n === "popup" &&
|
|
2204
|
+
"--primary": Pe,
|
|
2205
|
+
"--primary-contrast": Ie
|
|
2206
|
+
} : n === "popup" && Ke ? {
|
|
2207
2207
|
position: "fixed",
|
|
2208
|
-
left: `${
|
|
2209
|
-
top: `${
|
|
2210
|
-
"--primary":
|
|
2211
|
-
"--primary-contrast":
|
|
2208
|
+
left: `${Ke.x}px`,
|
|
2209
|
+
top: `${Ke.y}px`,
|
|
2210
|
+
"--primary": Pe,
|
|
2211
|
+
"--primary-contrast": Ie
|
|
2212
2212
|
} : {
|
|
2213
|
-
"--primary":
|
|
2214
|
-
"--primary-contrast":
|
|
2213
|
+
"--primary": Pe,
|
|
2214
|
+
"--primary-contrast": Ie
|
|
2215
2215
|
},
|
|
2216
2216
|
children: [
|
|
2217
2217
|
n === "fullpage" && /* @__PURE__ */ E(w, { children: [
|
|
2218
2218
|
/* @__PURE__ */ T("div", {
|
|
2219
|
-
onMouseDown: (e) =>
|
|
2219
|
+
onMouseDown: (e) => Ge(e, "ne"),
|
|
2220
2220
|
className: "resize-handle ne"
|
|
2221
2221
|
}),
|
|
2222
2222
|
/* @__PURE__ */ T("div", {
|
|
2223
|
-
onMouseDown: (e) =>
|
|
2223
|
+
onMouseDown: (e) => Ge(e, "nw"),
|
|
2224
2224
|
className: "resize-handle nw"
|
|
2225
2225
|
}),
|
|
2226
2226
|
/* @__PURE__ */ T("div", {
|
|
2227
|
-
onMouseDown: (e) =>
|
|
2227
|
+
onMouseDown: (e) => Ge(e, "se"),
|
|
2228
2228
|
className: "resize-handle se"
|
|
2229
2229
|
}),
|
|
2230
2230
|
/* @__PURE__ */ T("div", {
|
|
2231
|
-
onMouseDown: (e) =>
|
|
2231
|
+
onMouseDown: (e) => Ge(e, "sw"),
|
|
2232
2232
|
className: "resize-handle sw"
|
|
2233
2233
|
})
|
|
2234
2234
|
] }),
|
|
2235
2235
|
/* @__PURE__ */ T("div", {
|
|
2236
|
-
onMouseDown:
|
|
2237
|
-
onDoubleClick:
|
|
2236
|
+
onMouseDown: We,
|
|
2237
|
+
onDoubleClick: qe,
|
|
2238
2238
|
style: { cursor: n === "fullpage" ? "move" : "default" },
|
|
2239
|
-
children: /* @__PURE__ */ T(
|
|
2239
|
+
children: /* @__PURE__ */ T(dn, {
|
|
2240
2240
|
mode: n,
|
|
2241
2241
|
title: e,
|
|
2242
2242
|
logoUrl: t,
|
|
2243
|
-
onBack: () =>
|
|
2243
|
+
onBack: () => J(V(null)),
|
|
2244
2244
|
onToggleMode: () => {
|
|
2245
2245
|
if (n === "popup" && !u) {
|
|
2246
2246
|
let e = 1e3;
|
|
@@ -2255,74 +2255,73 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2255
2255
|
r(n === "popup" ? "fullpage" : "popup");
|
|
2256
2256
|
},
|
|
2257
2257
|
onClose: () => r("closed"),
|
|
2258
|
-
onAddMemberClick: () =>
|
|
2259
|
-
onOpenSettings: () =>
|
|
2258
|
+
onAddMemberClick: () => U && Ve(),
|
|
2259
|
+
onOpenSettings: () => N(!0)
|
|
2260
2260
|
})
|
|
2261
2261
|
}),
|
|
2262
2262
|
/* @__PURE__ */ E("div", {
|
|
2263
2263
|
className: "chat-main-layout",
|
|
2264
|
-
children: [n === "fullpage" &&
|
|
2265
|
-
setIsThemeModalOpen:
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
setActiveTab: ie
|
|
2264
|
+
children: [n === "fullpage" && W && /* @__PURE__ */ T(ln, {
|
|
2265
|
+
setIsThemeModalOpen: N,
|
|
2266
|
+
activeTab: ne,
|
|
2267
|
+
setActiveTab: P
|
|
2269
2268
|
}), /* @__PURE__ */ E("div", {
|
|
2270
2269
|
className: "chat-body-container",
|
|
2271
2270
|
children: [
|
|
2272
|
-
(n === "fullpage" || !
|
|
2271
|
+
(n === "fullpage" || !U) && /* @__PURE__ */ T("div", {
|
|
2273
2272
|
className: `chat-sidebar ${n === "fullpage" ? "is-full" : ""}`,
|
|
2274
|
-
children:
|
|
2275
|
-
/* @__PURE__ */ T(
|
|
2276
|
-
value:
|
|
2277
|
-
onChange:
|
|
2273
|
+
children: ne === "chats" ? /* @__PURE__ */ E(w, { children: [
|
|
2274
|
+
/* @__PURE__ */ T(cn, {
|
|
2275
|
+
value: ge,
|
|
2276
|
+
onChange: Le,
|
|
2278
2277
|
onAddClick: () => x(!0),
|
|
2279
2278
|
placeholder: y("chatWindow.searchPlaceholder")
|
|
2280
2279
|
}),
|
|
2281
2280
|
/* @__PURE__ */ T("div", {
|
|
2282
2281
|
className: "chat-filter-tabs",
|
|
2283
|
-
children:
|
|
2282
|
+
children: ge ? /* @__PURE__ */ E(w, { children: [
|
|
2284
2283
|
/* @__PURE__ */ T("button", {
|
|
2285
|
-
className:
|
|
2286
|
-
onClick: () =>
|
|
2284
|
+
className: L === "all" ? "active" : "",
|
|
2285
|
+
onClick: () => R("all"),
|
|
2287
2286
|
children: "Tất cả"
|
|
2288
2287
|
}),
|
|
2289
2288
|
/* @__PURE__ */ T("button", {
|
|
2290
|
-
className:
|
|
2291
|
-
onClick: () =>
|
|
2289
|
+
className: L === "member" ? "active" : "",
|
|
2290
|
+
onClick: () => R("member"),
|
|
2292
2291
|
children: "Thành viên"
|
|
2293
2292
|
}),
|
|
2294
2293
|
/* @__PURE__ */ T("button", {
|
|
2295
|
-
className:
|
|
2296
|
-
onClick: () =>
|
|
2294
|
+
className: L === "message" ? "active" : "",
|
|
2295
|
+
onClick: () => R("message"),
|
|
2297
2296
|
children: "Tin nhắn"
|
|
2298
2297
|
}),
|
|
2299
2298
|
/* @__PURE__ */ T("button", {
|
|
2300
|
-
className:
|
|
2301
|
-
onClick: () =>
|
|
2299
|
+
className: L === "file" ? "active" : "",
|
|
2300
|
+
onClick: () => R("file"),
|
|
2302
2301
|
children: "File"
|
|
2303
2302
|
})
|
|
2304
2303
|
] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
|
|
2305
|
-
className:
|
|
2306
|
-
onClick: () =>
|
|
2304
|
+
className: L === "all" ? "active" : "",
|
|
2305
|
+
onClick: () => R("all"),
|
|
2307
2306
|
children: y("chatWindow.filterAll") || "Tất cả"
|
|
2308
2307
|
}), /* @__PURE__ */ T("button", {
|
|
2309
|
-
className:
|
|
2310
|
-
onClick: () =>
|
|
2308
|
+
className: L === "unread" ? "active" : "",
|
|
2309
|
+
onClick: () => R("unread"),
|
|
2311
2310
|
children: /* @__PURE__ */ E("div", {
|
|
2312
2311
|
className: "filter-unread-badge-container",
|
|
2313
|
-
children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }),
|
|
2312
|
+
children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), q > 0 && /* @__PURE__ */ T("span", {
|
|
2314
2313
|
className: "filter-unread-badge",
|
|
2315
|
-
children:
|
|
2314
|
+
children: q
|
|
2316
2315
|
})]
|
|
2317
2316
|
})
|
|
2318
2317
|
})] })
|
|
2319
2318
|
}),
|
|
2320
2319
|
/* @__PURE__ */ T("div", {
|
|
2321
2320
|
className: "sidebar-scroll",
|
|
2322
|
-
children:
|
|
2321
|
+
children: ge ? /* @__PURE__ */ E("div", {
|
|
2323
2322
|
className: "chat-search-results",
|
|
2324
2323
|
children: [
|
|
2325
|
-
(
|
|
2324
|
+
(L === "all" || L === "member") && /* @__PURE__ */ E("div", {
|
|
2326
2325
|
className: "search-section",
|
|
2327
2326
|
children: [
|
|
2328
2327
|
/* @__PURE__ */ T("h3", {
|
|
@@ -2331,33 +2330,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2331
2330
|
}),
|
|
2332
2331
|
/* @__PURE__ */ E("div", {
|
|
2333
2332
|
className: "search-section-content",
|
|
2334
|
-
children: [
|
|
2333
|
+
children: [Y.filteredChat.slice(0, ye ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
|
|
2335
2334
|
className: "search-result-item",
|
|
2336
|
-
onClick: () =>
|
|
2335
|
+
onClick: () => J(V(e)),
|
|
2337
2336
|
children: [/* @__PURE__ */ T("div", {
|
|
2338
2337
|
className: "search-result-avatar",
|
|
2339
|
-
children: /* @__PURE__ */ T(
|
|
2338
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2340
2339
|
chat: e,
|
|
2341
|
-
currentUserId:
|
|
2340
|
+
currentUserId: W?.id
|
|
2342
2341
|
})
|
|
2343
2342
|
}), /* @__PURE__ */ E("div", {
|
|
2344
2343
|
className: "search-result-info",
|
|
2345
2344
|
children: [/* @__PURE__ */ T("div", {
|
|
2346
2345
|
className: "search-result-name",
|
|
2347
|
-
children:
|
|
2346
|
+
children: X(O(e, W?.id), H)
|
|
2348
2347
|
}), e.type === "group" && /* @__PURE__ */ E("div", {
|
|
2349
2348
|
className: "search-result-sub",
|
|
2350
2349
|
children: [
|
|
2351
2350
|
"Thành viên:",
|
|
2352
2351
|
" ",
|
|
2353
|
-
e.matchedMemberNames && e.matchedMemberNames.length > 0 ?
|
|
2352
|
+
e.matchedMemberNames && e.matchedMemberNames.length > 0 ? X(e.matchedMemberNames.join(", "), H) : X(H, H)
|
|
2354
2353
|
]
|
|
2355
2354
|
})]
|
|
2356
2355
|
})]
|
|
2357
|
-
}, `chat-${e.id}`)),
|
|
2356
|
+
}, `chat-${e.id}`)), Y.matchedMembers.slice(0, ye ? void 0 : Math.max(0, 4 - Y.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
|
|
2358
2357
|
className: "search-result-item",
|
|
2359
2358
|
onClick: () => {
|
|
2360
|
-
|
|
2359
|
+
Je(String(e.id));
|
|
2361
2360
|
},
|
|
2362
2361
|
children: [/* @__PURE__ */ T("div", {
|
|
2363
2362
|
className: "search-result-avatar",
|
|
@@ -2372,19 +2371,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2372
2371
|
className: "search-result-info",
|
|
2373
2372
|
children: /* @__PURE__ */ T("div", {
|
|
2374
2373
|
className: "search-result-name",
|
|
2375
|
-
children:
|
|
2374
|
+
children: X(e.name, H)
|
|
2376
2375
|
})
|
|
2377
2376
|
})]
|
|
2378
2377
|
}, `member-${e.code}`))]
|
|
2379
2378
|
}),
|
|
2380
|
-
!
|
|
2379
|
+
!ye && Y.filteredChat.length + Y.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
|
|
2381
2380
|
className: "search-view-all",
|
|
2382
|
-
onClick: () =>
|
|
2381
|
+
onClick: () => be(!0),
|
|
2383
2382
|
children: "Xem tất cả thành viên"
|
|
2384
2383
|
})
|
|
2385
2384
|
]
|
|
2386
2385
|
}),
|
|
2387
|
-
(
|
|
2386
|
+
(L === "all" || L === "message") && Y.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
|
|
2388
2387
|
className: "search-section",
|
|
2389
2388
|
children: [
|
|
2390
2389
|
/* @__PURE__ */ E("h3", {
|
|
@@ -2394,20 +2393,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2394
2393
|
" ",
|
|
2395
2394
|
/* @__PURE__ */ E("span", {
|
|
2396
2395
|
className: "search-count",
|
|
2397
|
-
children: ["+",
|
|
2396
|
+
children: ["+", Y.matchedMessages.length]
|
|
2398
2397
|
})
|
|
2399
2398
|
]
|
|
2400
2399
|
}),
|
|
2401
2400
|
/* @__PURE__ */ T("div", {
|
|
2402
2401
|
className: "search-section-content",
|
|
2403
|
-
children:
|
|
2402
|
+
children: Y.matchedMessages.slice(0, xe ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
|
|
2404
2403
|
className: "search-result-item message-result",
|
|
2405
|
-
onClick: () =>
|
|
2404
|
+
onClick: () => J(V(e.chat)),
|
|
2406
2405
|
children: [/* @__PURE__ */ T("div", {
|
|
2407
2406
|
className: "search-result-avatar",
|
|
2408
|
-
children: /* @__PURE__ */ T(
|
|
2407
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2409
2408
|
chat: e.chat,
|
|
2410
|
-
currentUserId:
|
|
2409
|
+
currentUserId: W?.id
|
|
2411
2410
|
})
|
|
2412
2411
|
}), /* @__PURE__ */ E("div", {
|
|
2413
2412
|
className: "search-result-info",
|
|
@@ -2415,26 +2414,26 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2415
2414
|
className: "search-result-top",
|
|
2416
2415
|
children: [/* @__PURE__ */ T("span", {
|
|
2417
2416
|
className: "search-result-name",
|
|
2418
|
-
children: O(e.chat,
|
|
2417
|
+
children: O(e.chat, W?.id)
|
|
2419
2418
|
}), /* @__PURE__ */ T("span", {
|
|
2420
2419
|
className: "search-result-date",
|
|
2421
2420
|
children: e.message?.date
|
|
2422
2421
|
})]
|
|
2423
2422
|
}), /* @__PURE__ */ T("div", {
|
|
2424
2423
|
className: "search-result-text",
|
|
2425
|
-
children:
|
|
2424
|
+
children: X(e.message?.content ?? "", H)
|
|
2426
2425
|
})]
|
|
2427
2426
|
})]
|
|
2428
2427
|
}, `msg-${t}`))
|
|
2429
2428
|
}),
|
|
2430
|
-
!
|
|
2429
|
+
!xe && Y.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
|
|
2431
2430
|
className: "search-view-all",
|
|
2432
|
-
onClick: () =>
|
|
2431
|
+
onClick: () => Se(!0),
|
|
2433
2432
|
children: "Xem tất cả tin nhắn"
|
|
2434
2433
|
})
|
|
2435
2434
|
]
|
|
2436
2435
|
}),
|
|
2437
|
-
(
|
|
2436
|
+
(L === "all" || L === "file") && Y.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
|
|
2438
2437
|
className: "search-section",
|
|
2439
2438
|
children: [
|
|
2440
2439
|
/* @__PURE__ */ E("h3", {
|
|
@@ -2444,15 +2443,15 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2444
2443
|
" ",
|
|
2445
2444
|
/* @__PURE__ */ T("span", {
|
|
2446
2445
|
className: "search-count",
|
|
2447
|
-
children:
|
|
2446
|
+
children: Y.totalMatchedFiles
|
|
2448
2447
|
})
|
|
2449
2448
|
]
|
|
2450
2449
|
}),
|
|
2451
2450
|
/* @__PURE__ */ T("div", {
|
|
2452
2451
|
className: "search-section-content",
|
|
2453
|
-
children:
|
|
2452
|
+
children: Y.matchedFiles.slice(0, Ce ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
|
|
2454
2453
|
className: "search-result-item file-result",
|
|
2455
|
-
onClick: () =>
|
|
2454
|
+
onClick: () => J(V(e.chat)),
|
|
2456
2455
|
children: [/* @__PURE__ */ T("div", {
|
|
2457
2456
|
className: "file-icon-wrapper",
|
|
2458
2457
|
children: /* @__PURE__ */ T("i", { className: "fas fa-file-alt" })
|
|
@@ -2472,59 +2471,58 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2472
2471
|
})]
|
|
2473
2472
|
}, `file-${t}-${r}`)))
|
|
2474
2473
|
}),
|
|
2475
|
-
!
|
|
2474
|
+
!Ce && Y.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
|
|
2476
2475
|
className: "search-view-all",
|
|
2477
|
-
onClick: () =>
|
|
2476
|
+
onClick: () => we(!0),
|
|
2478
2477
|
children: "Xem tất cả file"
|
|
2479
2478
|
})
|
|
2480
2479
|
]
|
|
2481
2480
|
})
|
|
2482
2481
|
]
|
|
2483
|
-
}) : /* @__PURE__ */ T(
|
|
2484
|
-
chats:
|
|
2485
|
-
selectedChat: W ?? null,
|
|
2482
|
+
}) : /* @__PURE__ */ T(sn, {
|
|
2483
|
+
chats: Y.filteredChat,
|
|
2486
2484
|
onSelectChat: (e) => {
|
|
2487
|
-
|
|
2485
|
+
J(V(e)), W?.id && e.new?.[W.id] > 0 && G.readChat(e.id);
|
|
2488
2486
|
},
|
|
2489
|
-
onRemoveChat: (e, t) => void
|
|
2490
|
-
onUpdateGroup:
|
|
2491
|
-
onAddMemberClick:
|
|
2487
|
+
onRemoveChat: (e, t) => void Re(e, t),
|
|
2488
|
+
onUpdateGroup: ze,
|
|
2489
|
+
onAddMemberClick: Ve
|
|
2492
2490
|
})
|
|
2493
2491
|
})
|
|
2494
2492
|
] }) : /* @__PURE__ */ E("div", {
|
|
2495
2493
|
className: "contact-categories",
|
|
2496
2494
|
children: [/* @__PURE__ */ E("div", {
|
|
2497
|
-
className: `category-item ${
|
|
2498
|
-
onClick: () =>
|
|
2495
|
+
className: `category-item ${re === "members" ? "active" : ""}`,
|
|
2496
|
+
onClick: () => ie("members"),
|
|
2499
2497
|
children: [
|
|
2500
|
-
/* @__PURE__ */ T(
|
|
2498
|
+
/* @__PURE__ */ T(st, {}),
|
|
2501
2499
|
/* @__PURE__ */ T("span", { children: "Danh sách thành viên" }),
|
|
2502
2500
|
/* @__PURE__ */ T("span", {
|
|
2503
2501
|
className: "count",
|
|
2504
|
-
children:
|
|
2502
|
+
children: je.length
|
|
2505
2503
|
})
|
|
2506
2504
|
]
|
|
2507
|
-
}),
|
|
2508
|
-
className: `category-item ${
|
|
2509
|
-
onClick: () =>
|
|
2505
|
+
}), Te && /* @__PURE__ */ E("div", {
|
|
2506
|
+
className: `category-item ${re === "groups" ? "active" : ""}`,
|
|
2507
|
+
onClick: () => ie("groups"),
|
|
2510
2508
|
children: [
|
|
2511
|
-
/* @__PURE__ */ T(
|
|
2509
|
+
/* @__PURE__ */ T(ct, {}),
|
|
2512
2510
|
/* @__PURE__ */ T("span", { children: "Danh sách nhóm" }),
|
|
2513
2511
|
/* @__PURE__ */ T("span", {
|
|
2514
2512
|
className: "count",
|
|
2515
|
-
children:
|
|
2513
|
+
children: K.filter((e) => e.type === "group").length
|
|
2516
2514
|
})
|
|
2517
2515
|
]
|
|
2518
2516
|
})]
|
|
2519
2517
|
})
|
|
2520
2518
|
}),
|
|
2521
|
-
(n === "fullpage" ||
|
|
2519
|
+
(n === "fullpage" || U) && /* @__PURE__ */ E("div", {
|
|
2522
2520
|
className: "chat-main",
|
|
2523
|
-
onDragEnter:
|
|
2524
|
-
onDragOver:
|
|
2525
|
-
onDragLeave:
|
|
2526
|
-
onDrop:
|
|
2527
|
-
children: [
|
|
2521
|
+
onDragEnter: De,
|
|
2522
|
+
onDragOver: Oe,
|
|
2523
|
+
onDragLeave: ke,
|
|
2524
|
+
onDrop: Ae,
|
|
2525
|
+
children: [Ee && /* @__PURE__ */ T("div", {
|
|
2528
2526
|
className: "drag-overlay-full",
|
|
2529
2527
|
children: /* @__PURE__ */ E("div", {
|
|
2530
2528
|
className: "drag-content",
|
|
@@ -2536,7 +2534,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2536
2534
|
children: y("chatWindow.dragFile")
|
|
2537
2535
|
})]
|
|
2538
2536
|
})
|
|
2539
|
-
}),
|
|
2537
|
+
}), ne === "chats" ? U ? /* @__PURE__ */ E(w, { children: [
|
|
2540
2538
|
/* @__PURE__ */ E("div", {
|
|
2541
2539
|
className: "chat-main-header",
|
|
2542
2540
|
children: [/* @__PURE__ */ E("div", {
|
|
@@ -2544,14 +2542,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2544
2542
|
children: [
|
|
2545
2543
|
n === "popup" && /* @__PURE__ */ T("button", {
|
|
2546
2544
|
className: "back-btn",
|
|
2547
|
-
onClick: () =>
|
|
2548
|
-
children: /* @__PURE__ */ T(
|
|
2545
|
+
onClick: () => J(V(null)),
|
|
2546
|
+
children: /* @__PURE__ */ T(lt, {})
|
|
2549
2547
|
}),
|
|
2550
2548
|
/* @__PURE__ */ T("div", {
|
|
2551
2549
|
className: "chat-main-avatar",
|
|
2552
|
-
children: /* @__PURE__ */ T(
|
|
2553
|
-
chat:
|
|
2554
|
-
currentUserId:
|
|
2550
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
2551
|
+
chat: U,
|
|
2552
|
+
currentUserId: W?.id
|
|
2555
2553
|
})
|
|
2556
2554
|
}),
|
|
2557
2555
|
/* @__PURE__ */ E("div", {
|
|
@@ -2560,11 +2558,11 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2560
2558
|
className: "chat-main-text-container",
|
|
2561
2559
|
children: [/* @__PURE__ */ T("span", {
|
|
2562
2560
|
className: "chat-main-name",
|
|
2563
|
-
children: O(
|
|
2564
|
-
}),
|
|
2561
|
+
children: O(U, W?.id)
|
|
2562
|
+
}), U.is_muted && /* @__PURE__ */ T(ut, {})]
|
|
2565
2563
|
}), /* @__PURE__ */ T("span", {
|
|
2566
2564
|
className: "chat-main-status",
|
|
2567
|
-
children:
|
|
2565
|
+
children: U.type === "single" ? (Me.find((e) => e.id !== W?.id)?.socket_ids?.length ?? 0) > 0 ? "Đang hoạt động" : "Không hoạt động" : `${Me.length ?? 0} thành viên`
|
|
2568
2566
|
})]
|
|
2569
2567
|
})
|
|
2570
2568
|
]
|
|
@@ -2572,16 +2570,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2572
2570
|
className: "chat-main-actions",
|
|
2573
2571
|
children: /* @__PURE__ */ T("button", {
|
|
2574
2572
|
className: `main-action-btn ${M ? "active" : ""}`,
|
|
2575
|
-
onClick: () =>
|
|
2576
|
-
children: /* @__PURE__ */ T(
|
|
2573
|
+
onClick: () => ee(!M),
|
|
2574
|
+
children: /* @__PURE__ */ T(dt, {})
|
|
2577
2575
|
})
|
|
2578
2576
|
})]
|
|
2579
2577
|
}),
|
|
2580
|
-
/* @__PURE__ */ T(
|
|
2581
|
-
/* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(
|
|
2582
|
-
ref: ye,
|
|
2583
|
-
primaryColor: i
|
|
2584
|
-
}) })
|
|
2578
|
+
/* @__PURE__ */ T(xn, {}),
|
|
2579
|
+
/* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(fn, { ref: me }) })
|
|
2585
2580
|
] }) : /* @__PURE__ */ E("div", {
|
|
2586
2581
|
className: "empty-chat-state",
|
|
2587
2582
|
children: [
|
|
@@ -2592,64 +2587,52 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2592
2587
|
/* @__PURE__ */ T("h3", { children: y("chatWindow.selectChat") }),
|
|
2593
2588
|
/* @__PURE__ */ T("p", { children: y("chatWindow.startConversation") })
|
|
2594
2589
|
]
|
|
2595
|
-
}) : /* @__PURE__ */ T(w, { children:
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
}) : /* @__PURE__ */ T(hn, {
|
|
2601
|
-
groups: q.filter((e) => e.type === "group"),
|
|
2602
|
-
currentUserId: G?.id,
|
|
2590
|
+
}) : /* @__PURE__ */ T(w, { children: re === "members" ? /* @__PURE__ */ T(hn, { onMessageClick: (e) => {
|
|
2591
|
+
Je(e), P("chats");
|
|
2592
|
+
} }) : /* @__PURE__ */ T(gn, {
|
|
2593
|
+
groups: K.filter((e) => e.type === "group"),
|
|
2594
|
+
currentUserId: W?.id,
|
|
2603
2595
|
onGroupClick: (e) => {
|
|
2604
|
-
|
|
2596
|
+
J(V(e)), P("chats");
|
|
2605
2597
|
}
|
|
2606
2598
|
}) })]
|
|
2607
2599
|
}),
|
|
2608
|
-
n === "fullpage" &&
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
onUpdateGroup: Ve,
|
|
2600
|
+
n === "fullpage" && ne === "chats" && U && M && /* @__PURE__ */ T(un, {
|
|
2601
|
+
onClose: () => ee(!1),
|
|
2602
|
+
onAddMember: () => Ve(),
|
|
2603
|
+
onUpdateGroup: ze,
|
|
2613
2604
|
onRemoveMember: (e, t) => {
|
|
2614
|
-
|
|
2605
|
+
He(e, t);
|
|
2615
2606
|
}
|
|
2616
2607
|
})
|
|
2617
2608
|
]
|
|
2618
2609
|
})]
|
|
2619
2610
|
}),
|
|
2620
|
-
b && /* @__PURE__ */ T(
|
|
2611
|
+
b && /* @__PURE__ */ T(an, { onClose: () => {
|
|
2621
2612
|
x(!1);
|
|
2622
2613
|
} }),
|
|
2623
|
-
/* @__PURE__ */ T(
|
|
2614
|
+
/* @__PURE__ */ T(Jt, {
|
|
2624
2615
|
isOpen: S,
|
|
2625
2616
|
onClose: () => {
|
|
2626
2617
|
C(!1), k(null);
|
|
2627
2618
|
},
|
|
2628
2619
|
group: D,
|
|
2629
|
-
onUpdate:
|
|
2630
|
-
removeMember:
|
|
2620
|
+
onUpdate: Be,
|
|
2621
|
+
removeMember: He,
|
|
2631
2622
|
primaryColor: i
|
|
2632
2623
|
}),
|
|
2633
|
-
/* @__PURE__ */ T(
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
members: K,
|
|
2640
|
-
currentChatMembers: Ne,
|
|
2641
|
-
onAddMember: Ge,
|
|
2642
|
-
primaryColor: i
|
|
2643
|
-
}),
|
|
2644
|
-
/* @__PURE__ */ T(nn, {
|
|
2645
|
-
isOpen: ne,
|
|
2646
|
-
onClose: () => P(!1),
|
|
2624
|
+
A && /* @__PURE__ */ T(Yt, { onClose: () => {
|
|
2625
|
+
j(!1);
|
|
2626
|
+
} }),
|
|
2627
|
+
/* @__PURE__ */ T(rn, {
|
|
2628
|
+
isOpen: te,
|
|
2629
|
+
onClose: () => N(!1),
|
|
2647
2630
|
defaultColor: "#ffffff"
|
|
2648
2631
|
}),
|
|
2649
|
-
/* @__PURE__ */ T(
|
|
2632
|
+
/* @__PURE__ */ T(Kt, {})
|
|
2650
2633
|
]
|
|
2651
2634
|
});
|
|
2652
|
-
},
|
|
2635
|
+
}, Gt = i(({ chat: e, currentUserId: t }) => {
|
|
2653
2636
|
let n = d(() => e ? e.avatar ? e.avatar : e.type === "group" ? "👥" : e.members?.find((e) => e.id !== t)?.avatar ?? "👤" : "👤", [e, t]);
|
|
2654
2637
|
return n === "👥" || n === "👤" ? /* @__PURE__ */ T("div", {
|
|
2655
2638
|
style: {
|
|
@@ -2673,8 +2656,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2673
2656
|
borderRadius: "100%"
|
|
2674
2657
|
}
|
|
2675
2658
|
});
|
|
2676
|
-
}),
|
|
2677
|
-
let { toasts: e, removeToast: t } =
|
|
2659
|
+
}), Kt = () => {
|
|
2660
|
+
let { toasts: e, removeToast: t } = Qe(), { theme: n } = _((e) => e.setting);
|
|
2678
2661
|
return /* @__PURE__ */ T("div", {
|
|
2679
2662
|
className: `toast-container ${n === "dark" ? "dark-theme" : ""}`,
|
|
2680
2663
|
children: e.map((e) => /* @__PURE__ */ E("div", {
|
|
@@ -2731,7 +2714,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2731
2714
|
]
|
|
2732
2715
|
}, e.id))
|
|
2733
2716
|
});
|
|
2734
|
-
},
|
|
2717
|
+
}, qt = ({ member: e }) => {
|
|
2735
2718
|
let [t, n] = p(!1), r = e.name?.charAt(0).toUpperCase() || "?";
|
|
2736
2719
|
if (e.avatar && !t) return /* @__PURE__ */ T("img", {
|
|
2737
2720
|
src: e.avatar,
|
|
@@ -2752,7 +2735,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2752
2735
|
style: { backgroundColor: i[(String(e.id)?.charCodeAt(0) || 0) % i.length] },
|
|
2753
2736
|
children: r
|
|
2754
2737
|
});
|
|
2755
|
-
},
|
|
2738
|
+
}, Jt = ({ isOpen: e, onClose: t, group: n, onUpdate: r, removeMember: i, primaryColor: a }) => {
|
|
2756
2739
|
let [o, s] = p(""), [c, l] = p(""), [u, d] = p(""), [f, m] = p(!1), [h, g] = p(null), [v, y] = p(!1), { currentChatMembers: b, currentUser: x } = _((e) => e.chat);
|
|
2757
2740
|
(e !== v || e && n && n.id !== h) && (y(e), n ? (g(n.id), s(n.name ?? ""), l(n.avatar ?? ""), d(n.avatar ?? "")) : g(null));
|
|
2758
2741
|
let { t: S } = Z();
|
|
@@ -2774,7 +2757,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2774
2757
|
className: "modal-overlay",
|
|
2775
2758
|
onClick: t,
|
|
2776
2759
|
children: /* @__PURE__ */ E("div", {
|
|
2777
|
-
className: "modal-content
|
|
2760
|
+
className: "modal-content update-group-modal",
|
|
2778
2761
|
onClick: (e) => e.stopPropagation(),
|
|
2779
2762
|
children: [
|
|
2780
2763
|
/* @__PURE__ */ E("div", {
|
|
@@ -2794,7 +2777,6 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2794
2777
|
className: "group-info-section",
|
|
2795
2778
|
children: [/* @__PURE__ */ E("label", {
|
|
2796
2779
|
className: "group-avatar-upload",
|
|
2797
|
-
style: { cursor: "pointer" },
|
|
2798
2780
|
children: [/* @__PURE__ */ T("input", {
|
|
2799
2781
|
type: "file",
|
|
2800
2782
|
accept: "image/*",
|
|
@@ -2807,19 +2789,12 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2807
2789
|
d(e.target?.result);
|
|
2808
2790
|
}, e.readAsDataURL(t);
|
|
2809
2791
|
}
|
|
2810
|
-
}
|
|
2811
|
-
style: { display: "none" }
|
|
2792
|
+
}
|
|
2812
2793
|
}), /* @__PURE__ */ T("div", {
|
|
2813
2794
|
className: "avatar-placeholder",
|
|
2814
2795
|
children: u ? /* @__PURE__ */ T("img", {
|
|
2815
2796
|
src: u,
|
|
2816
|
-
alt: "Preview"
|
|
2817
|
-
style: {
|
|
2818
|
-
width: "100%",
|
|
2819
|
-
height: "100%",
|
|
2820
|
-
borderRadius: "50%",
|
|
2821
|
-
objectFit: "cover"
|
|
2822
|
-
}
|
|
2797
|
+
alt: "Preview"
|
|
2823
2798
|
}) : /* @__PURE__ */ E("svg", {
|
|
2824
2799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2825
2800
|
width: "20",
|
|
@@ -2849,13 +2824,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2849
2824
|
})]
|
|
2850
2825
|
}), /* @__PURE__ */ E("div", {
|
|
2851
2826
|
className: "members-section",
|
|
2852
|
-
style: { marginTop: "8px" },
|
|
2853
2827
|
children: [/* @__PURE__ */ E("span", {
|
|
2854
2828
|
className: "section-title",
|
|
2855
|
-
style: {
|
|
2856
|
-
paddingLeft: "0",
|
|
2857
|
-
display: "block"
|
|
2858
|
-
},
|
|
2859
2829
|
children: [
|
|
2860
2830
|
S("updateGroup.membersSection"),
|
|
2861
2831
|
" (",
|
|
@@ -2864,73 +2834,39 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2864
2834
|
]
|
|
2865
2835
|
}), /* @__PURE__ */ T("div", {
|
|
2866
2836
|
className: "members-list-container",
|
|
2867
|
-
style: {
|
|
2868
|
-
borderTop: "none",
|
|
2869
|
-
height: "240px"
|
|
2870
|
-
},
|
|
2871
2837
|
children: /* @__PURE__ */ T("div", {
|
|
2872
2838
|
className: "members-list",
|
|
2873
2839
|
children: b.map((e) => {
|
|
2874
2840
|
let t = e.id === n.owner_id, r = e.id === x?.id;
|
|
2875
2841
|
return /* @__PURE__ */ E("div", {
|
|
2876
2842
|
className: "member-item",
|
|
2877
|
-
style: { cursor: "default" },
|
|
2878
2843
|
children: [
|
|
2879
2844
|
/* @__PURE__ */ E("div", {
|
|
2880
2845
|
className: "member-avatar-wrapper",
|
|
2881
|
-
children: [/* @__PURE__ */ T(
|
|
2846
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
2882
2847
|
size: 12,
|
|
2883
2848
|
className: "status-dot"
|
|
2884
2849
|
}) : null]
|
|
2885
2850
|
}),
|
|
2886
2851
|
/* @__PURE__ */ E("div", {
|
|
2887
2852
|
className: "member-info-wrapper",
|
|
2888
|
-
style: {
|
|
2889
|
-
flex: 1,
|
|
2890
|
-
display: "flex",
|
|
2891
|
-
flexDirection: "column",
|
|
2892
|
-
gap: "2px"
|
|
2893
|
-
},
|
|
2894
2853
|
children: [/* @__PURE__ */ E("div", {
|
|
2895
|
-
|
|
2896
|
-
display: "flex",
|
|
2897
|
-
alignItems: "center",
|
|
2898
|
-
gap: "4px"
|
|
2899
|
-
},
|
|
2854
|
+
className: "member-name-row",
|
|
2900
2855
|
children: [/* @__PURE__ */ T("span", {
|
|
2901
2856
|
className: "member-name",
|
|
2902
|
-
style: {
|
|
2903
|
-
fontSize: "15px",
|
|
2904
|
-
fontWeight: "500",
|
|
2905
|
-
color: "#1e293b"
|
|
2906
|
-
},
|
|
2907
2857
|
children: r ? "Bạn" : e.name
|
|
2908
|
-
}), t && /* @__PURE__ */ T(
|
|
2858
|
+
}), t && /* @__PURE__ */ T(at, {
|
|
2909
2859
|
size: 14,
|
|
2910
|
-
|
|
2860
|
+
className: "owner-icon"
|
|
2911
2861
|
})]
|
|
2912
2862
|
}), t && /* @__PURE__ */ T("div", {
|
|
2913
|
-
|
|
2914
|
-
fontSize: "13px",
|
|
2915
|
-
color: "#64748b"
|
|
2916
|
-
},
|
|
2863
|
+
className: "member-role",
|
|
2917
2864
|
children: "Trưởng nhóm"
|
|
2918
2865
|
})]
|
|
2919
2866
|
}),
|
|
2920
2867
|
!t && /* @__PURE__ */ T("button", {
|
|
2921
2868
|
type: "button",
|
|
2922
2869
|
className: "remove-member-btn",
|
|
2923
|
-
style: {
|
|
2924
|
-
background: "transparent",
|
|
2925
|
-
border: "none",
|
|
2926
|
-
color: "#ef4444",
|
|
2927
|
-
cursor: "pointer",
|
|
2928
|
-
padding: "4px",
|
|
2929
|
-
display: "flex",
|
|
2930
|
-
alignItems: "center",
|
|
2931
|
-
justifyContent: "center",
|
|
2932
|
-
fontSize: "14px"
|
|
2933
|
-
},
|
|
2934
2870
|
onClick: (t) => {
|
|
2935
2871
|
t.stopPropagation(), i && n && i(n.id, e.id);
|
|
2936
2872
|
},
|
|
@@ -2962,24 +2898,32 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2962
2898
|
]
|
|
2963
2899
|
})
|
|
2964
2900
|
});
|
|
2965
|
-
},
|
|
2966
|
-
let [
|
|
2967
|
-
if (!
|
|
2968
|
-
let
|
|
2969
|
-
if (!
|
|
2970
|
-
|
|
2901
|
+
}, Yt = ({ onClose: e }) => {
|
|
2902
|
+
let [t, n] = p(""), [r, i] = p(!1), { t: a } = Z(), { currentChatMembers: o, members: s, currentChat: c } = _((e) => e.chat), l = g(), { showToast: u } = Qe();
|
|
2903
|
+
if (!c || c?.type === "single") return null;
|
|
2904
|
+
let d = new Set((o || []).map((e) => e.id)), f = (s || []).filter((e) => !d.has(e.id) && e.name.toLowerCase().includes(t.toLowerCase())), m = async (t) => {
|
|
2905
|
+
if (!r) {
|
|
2906
|
+
i(!0);
|
|
2971
2907
|
try {
|
|
2972
|
-
await
|
|
2908
|
+
await h(t), e(), n("");
|
|
2973
2909
|
} catch (e) {
|
|
2974
2910
|
console.error(e);
|
|
2975
2911
|
} finally {
|
|
2976
|
-
|
|
2912
|
+
i(!1);
|
|
2977
2913
|
}
|
|
2978
2914
|
}
|
|
2915
|
+
}, h = async (e) => {
|
|
2916
|
+
if (c?.id) try {
|
|
2917
|
+
await G.addMember(c.id, e), u("Đã thêm thành viên vào nhóm thành công!", "success");
|
|
2918
|
+
let t = await G.getMembers(c.id);
|
|
2919
|
+
t?.data && l(_e(t.data));
|
|
2920
|
+
} catch (e) {
|
|
2921
|
+
console.error("Lỗi khi thêm thành viên:", e), u("Không thể thêm thành viên. Vui lòng thử lại!", "error");
|
|
2922
|
+
}
|
|
2979
2923
|
};
|
|
2980
2924
|
return /* @__PURE__ */ T("div", {
|
|
2981
2925
|
className: "modal-overlay",
|
|
2982
|
-
onClick:
|
|
2926
|
+
onClick: e,
|
|
2983
2927
|
children: /* @__PURE__ */ E("div", {
|
|
2984
2928
|
className: "modal-content add-chat-modal",
|
|
2985
2929
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -2988,10 +2932,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
2988
2932
|
className: "modal-header",
|
|
2989
2933
|
children: [/* @__PURE__ */ T("h3", {
|
|
2990
2934
|
className: "modal-title",
|
|
2991
|
-
children:
|
|
2935
|
+
children: a("addMember.title")
|
|
2992
2936
|
}), /* @__PURE__ */ T("button", {
|
|
2993
2937
|
className: "close-modal-btn",
|
|
2994
|
-
onClick:
|
|
2938
|
+
onClick: e,
|
|
2995
2939
|
children: /* @__PURE__ */ E("svg", {
|
|
2996
2940
|
width: "20",
|
|
2997
2941
|
height: "20",
|
|
@@ -3019,25 +2963,25 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3019
2963
|
className: "modal-body",
|
|
3020
2964
|
children: [/* @__PURE__ */ T("div", {
|
|
3021
2965
|
className: "search-section",
|
|
3022
|
-
children: /* @__PURE__ */ T(
|
|
3023
|
-
value:
|
|
3024
|
-
onChange:
|
|
3025
|
-
placeholder:
|
|
2966
|
+
children: /* @__PURE__ */ T(cn, {
|
|
2967
|
+
value: t,
|
|
2968
|
+
onChange: n,
|
|
2969
|
+
placeholder: a("addMember.memberSearchPlaceholder")
|
|
3026
2970
|
})
|
|
3027
2971
|
}), /* @__PURE__ */ T("div", {
|
|
3028
2972
|
className: "members-list-container",
|
|
3029
2973
|
children: /* @__PURE__ */ T("div", {
|
|
3030
2974
|
className: "members-list",
|
|
3031
|
-
children:
|
|
2975
|
+
children: f.length === 0 ? /* @__PURE__ */ T("div", {
|
|
3032
2976
|
className: "no-members-found",
|
|
3033
|
-
children:
|
|
3034
|
-
}) :
|
|
3035
|
-
className: `member-item ${
|
|
3036
|
-
onClick: () => void
|
|
2977
|
+
children: a("addMember.noMembersFound")
|
|
2978
|
+
}) : f.map((e) => /* @__PURE__ */ E("div", {
|
|
2979
|
+
className: `member-item ${r ? "loading" : ""}`,
|
|
2980
|
+
onClick: () => void m(e.id),
|
|
3037
2981
|
children: [
|
|
3038
2982
|
/* @__PURE__ */ E("div", {
|
|
3039
2983
|
className: "member-avatar-wrapper",
|
|
3040
|
-
children: [/* @__PURE__ */ T(
|
|
2984
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
3041
2985
|
size: 12,
|
|
3042
2986
|
className: "status-dot"
|
|
3043
2987
|
}) : null]
|
|
@@ -3048,15 +2992,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3048
2992
|
}),
|
|
3049
2993
|
/* @__PURE__ */ T("div", {
|
|
3050
2994
|
className: "member-add-action",
|
|
3051
|
-
|
|
3052
|
-
color: o ?? "#3b82f6",
|
|
3053
|
-
fontSize: "13px",
|
|
3054
|
-
fontWeight: "600",
|
|
3055
|
-
background: "#eff6ff",
|
|
3056
|
-
padding: "4px 12px",
|
|
3057
|
-
borderRadius: "6px"
|
|
3058
|
-
},
|
|
3059
|
-
children: d("addMember.addButton")
|
|
2995
|
+
children: a("addMember.addButton")
|
|
3060
2996
|
})
|
|
3061
2997
|
]
|
|
3062
2998
|
}, e.id))
|
|
@@ -3067,19 +3003,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3067
3003
|
className: "modal-footer",
|
|
3068
3004
|
children: /* @__PURE__ */ T("button", {
|
|
3069
3005
|
className: "footer-btn cancel",
|
|
3070
|
-
onClick:
|
|
3071
|
-
children:
|
|
3006
|
+
onClick: e,
|
|
3007
|
+
children: a("common.buttons.close")
|
|
3072
3008
|
})
|
|
3073
3009
|
})
|
|
3074
3010
|
]
|
|
3075
3011
|
})
|
|
3076
3012
|
});
|
|
3077
|
-
},
|
|
3013
|
+
}, Xt = ({ file: e }) => /* @__PURE__ */ T("img", {
|
|
3078
3014
|
src: e.link,
|
|
3079
3015
|
alt: e.name,
|
|
3080
3016
|
className: "file-viewer-image",
|
|
3081
3017
|
title: e.name
|
|
3082
|
-
}),
|
|
3018
|
+
}), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3083
3019
|
className: "video-container",
|
|
3084
3020
|
children: /* @__PURE__ */ T("video", {
|
|
3085
3021
|
src: e.link,
|
|
@@ -3088,7 +3024,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3088
3024
|
className: "file-viewer-video",
|
|
3089
3025
|
title: e.name
|
|
3090
3026
|
})
|
|
3091
|
-
}),
|
|
3027
|
+
}), Qt = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3092
3028
|
className: "audio-container",
|
|
3093
3029
|
children: /* @__PURE__ */ E("div", {
|
|
3094
3030
|
className: "audio-player-wrapper",
|
|
@@ -3103,7 +3039,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3103
3039
|
children: e.name
|
|
3104
3040
|
})]
|
|
3105
3041
|
})
|
|
3106
|
-
}),
|
|
3042
|
+
}), $t = ({ file: e }) => /* @__PURE__ */ T("div", {
|
|
3107
3043
|
className: "pdf-container",
|
|
3108
3044
|
children: /* @__PURE__ */ T("iframe", {
|
|
3109
3045
|
src: `${e.link}#toolbar=1&navpanes=0`,
|
|
@@ -3116,7 +3052,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3116
3052
|
borderRadius: "8px"
|
|
3117
3053
|
}
|
|
3118
3054
|
})
|
|
3119
|
-
}),
|
|
3055
|
+
}), en = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
|
|
3120
3056
|
className: "file-viewer-generic",
|
|
3121
3057
|
children: [
|
|
3122
3058
|
/* @__PURE__ */ T("div", {
|
|
@@ -3135,7 +3071,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3135
3071
|
children: t
|
|
3136
3072
|
})
|
|
3137
3073
|
]
|
|
3138
|
-
}),
|
|
3074
|
+
}), tn = ({ isOpen: e, files: t, initialIndex: n = 0, onClose: r }) => {
|
|
3139
3075
|
let [i, a] = p(n), o = f(null), { t: s } = Z();
|
|
3140
3076
|
if (!e || t.length === 0) return null;
|
|
3141
3077
|
let c = () => {
|
|
@@ -3154,30 +3090,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3154
3090
|
});
|
|
3155
3091
|
}, m = (e) => {
|
|
3156
3092
|
e.key === "ArrowLeft" ? c() : e.key === "ArrowRight" ? l() : e.key === "Escape" && r();
|
|
3157
|
-
}, h = t[i], g = (
|
|
3158
|
-
let t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
3159
|
-
return [
|
|
3160
|
-
"jpg",
|
|
3161
|
-
"jpeg",
|
|
3162
|
-
"png",
|
|
3163
|
-
"gif",
|
|
3164
|
-
"webp",
|
|
3165
|
-
"svg"
|
|
3166
|
-
].includes(t) ? "image" : [
|
|
3167
|
-
"mp4",
|
|
3168
|
-
"webm",
|
|
3169
|
-
"ogg",
|
|
3170
|
-
"mov"
|
|
3171
|
-
].includes(t) ? "video" : [
|
|
3172
|
-
"mp3",
|
|
3173
|
-
"wav",
|
|
3174
|
-
"flac",
|
|
3175
|
-
"m4a",
|
|
3176
|
-
"aac",
|
|
3177
|
-
"wma",
|
|
3178
|
-
"opus"
|
|
3179
|
-
].includes(t) ? "audio" : ["pdf"].includes(t) ? "pdf" : "other";
|
|
3180
|
-
}, _ = g(h.name);
|
|
3093
|
+
}, h = t[i], g = z(h.name);
|
|
3181
3094
|
return /* @__PURE__ */ T("div", {
|
|
3182
3095
|
className: "file-viewer-overlay",
|
|
3183
3096
|
onClick: r,
|
|
@@ -3200,11 +3113,11 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3200
3113
|
/* @__PURE__ */ E("div", {
|
|
3201
3114
|
className: "file-viewer-main",
|
|
3202
3115
|
children: [
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3116
|
+
g === "image" && /* @__PURE__ */ T(Xt, { file: h }),
|
|
3117
|
+
g === "video" && /* @__PURE__ */ T(Zt, { file: h }),
|
|
3118
|
+
g === "audio" && /* @__PURE__ */ T(Qt, { file: h }),
|
|
3119
|
+
g === "pdf" && /* @__PURE__ */ T($t, { file: h }),
|
|
3120
|
+
g === "other" && /* @__PURE__ */ T(en, {
|
|
3208
3121
|
file: h,
|
|
3209
3122
|
openDownloadButtonText: s("fileViewer.openDownloadButton")
|
|
3210
3123
|
})
|
|
@@ -3215,13 +3128,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3215
3128
|
onClick: c,
|
|
3216
3129
|
"aria-label": s("fileViewer.previousAriaLabel"),
|
|
3217
3130
|
title: s("fileViewer.previousButtonTitle"),
|
|
3218
|
-
children: /* @__PURE__ */ T(
|
|
3131
|
+
children: /* @__PURE__ */ T(ft, {})
|
|
3219
3132
|
}), /* @__PURE__ */ T("button", {
|
|
3220
3133
|
className: "file-viewer-nav file-viewer-next",
|
|
3221
3134
|
onClick: l,
|
|
3222
3135
|
"aria-label": s("fileViewer.nextAriaLabel"),
|
|
3223
3136
|
title: s("fileViewer.nextButtonTitle"),
|
|
3224
|
-
children: /* @__PURE__ */ T(
|
|
3137
|
+
children: /* @__PURE__ */ T(pt, {})
|
|
3225
3138
|
})] }),
|
|
3226
3139
|
/* @__PURE__ */ E("div", {
|
|
3227
3140
|
className: "file-viewer-counter",
|
|
@@ -3239,13 +3152,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3239
3152
|
onClick: u,
|
|
3240
3153
|
"aria-label": s("fileViewer.scrollLeftAriaLabel"),
|
|
3241
3154
|
title: s("fileViewer.scrollLeftTitle"),
|
|
3242
|
-
children: /* @__PURE__ */ T(
|
|
3155
|
+
children: /* @__PURE__ */ T(ft, {})
|
|
3243
3156
|
}),
|
|
3244
3157
|
/* @__PURE__ */ T("div", {
|
|
3245
3158
|
className: "file-viewer-thumbnails",
|
|
3246
3159
|
ref: o,
|
|
3247
3160
|
children: t.map((e, t) => {
|
|
3248
|
-
let n =
|
|
3161
|
+
let n = z(e.name);
|
|
3249
3162
|
return /* @__PURE__ */ T("button", {
|
|
3250
3163
|
className: `file-viewer-thumbnail ${t === i ? "active" : ""}`,
|
|
3251
3164
|
onClick: () => a(t),
|
|
@@ -3293,14 +3206,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3293
3206
|
onClick: d,
|
|
3294
3207
|
"aria-label": s("fileViewer.scrollRightAriaLabel"),
|
|
3295
3208
|
title: s("fileViewer.scrollRightTitle"),
|
|
3296
|
-
children: /* @__PURE__ */ T(
|
|
3209
|
+
children: /* @__PURE__ */ T(pt, {})
|
|
3297
3210
|
})
|
|
3298
3211
|
]
|
|
3299
3212
|
})
|
|
3300
3213
|
]
|
|
3301
3214
|
})
|
|
3302
3215
|
});
|
|
3303
|
-
},
|
|
3216
|
+
}, nn = [
|
|
3304
3217
|
"#fff",
|
|
3305
3218
|
"#a855f7",
|
|
3306
3219
|
"#3b82f6",
|
|
@@ -3310,7 +3223,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3310
3223
|
"#ec4899",
|
|
3311
3224
|
"#6366f1",
|
|
3312
3225
|
"#14b8a6"
|
|
3313
|
-
],
|
|
3226
|
+
], rn = ({ isOpen: e, onClose: t, defaultColor: n = "#ffffff" }) => {
|
|
3314
3227
|
let r = g(), { t: i } = Z(), { primaryColor: a } = _((e) => e.setting);
|
|
3315
3228
|
return e ? /* @__PURE__ */ T("div", {
|
|
3316
3229
|
className: "modal-overlay",
|
|
@@ -3343,10 +3256,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3343
3256
|
}),
|
|
3344
3257
|
/* @__PURE__ */ T("div", {
|
|
3345
3258
|
className: "color-presets",
|
|
3346
|
-
children:
|
|
3259
|
+
children: nn.map((e) => /* @__PURE__ */ T("button", {
|
|
3347
3260
|
className: `color-preset-btn ${a === e ? "active" : ""}`,
|
|
3348
3261
|
style: { backgroundColor: e },
|
|
3349
|
-
onClick: () => r(
|
|
3262
|
+
onClick: () => r(X(e)),
|
|
3350
3263
|
children: a === e && /* @__PURE__ */ T("span", {
|
|
3351
3264
|
className: "check-icon",
|
|
3352
3265
|
children: "✓"
|
|
@@ -3363,7 +3276,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3363
3276
|
children: [/* @__PURE__ */ T("input", {
|
|
3364
3277
|
type: "color",
|
|
3365
3278
|
value: a,
|
|
3366
|
-
onChange: (e) => r(
|
|
3279
|
+
onChange: (e) => r(X(e.target.value)),
|
|
3367
3280
|
className: "color-input"
|
|
3368
3281
|
}), /* @__PURE__ */ T("span", {
|
|
3369
3282
|
className: "color-hex-code",
|
|
@@ -3381,14 +3294,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3381
3294
|
children: i("themeModal.doneButton")
|
|
3382
3295
|
}), /* @__PURE__ */ T("button", {
|
|
3383
3296
|
className: "modal-btn cancel",
|
|
3384
|
-
onClick: () => r(
|
|
3297
|
+
onClick: () => r(X(n)),
|
|
3385
3298
|
children: i("themeModal.resetButton")
|
|
3386
3299
|
})]
|
|
3387
3300
|
})
|
|
3388
3301
|
]
|
|
3389
3302
|
})
|
|
3390
3303
|
}) : null;
|
|
3391
|
-
},
|
|
3304
|
+
}, an = ({ onClose: e }) => {
|
|
3392
3305
|
let { t } = Z(), n = g(), { members: r, chats: i } = _((e) => e.chat), [o, s] = p([]), [c, l] = p(""), [u, d] = p(""), [m, h] = p(""), [v, y] = p(""), b = f(null), x = (e) => {
|
|
3393
3306
|
s((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
3394
3307
|
}, S = (e) => {
|
|
@@ -3405,8 +3318,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3405
3318
|
}, w = a(async () => {
|
|
3406
3319
|
if (!(o.length < 2)) try {
|
|
3407
3320
|
if (!c.trim()) return;
|
|
3408
|
-
let t = o.map((e) => Number(e)), r = typeof m == "string" ? m.trim() || void 0 : m || void 0, a = (await
|
|
3409
|
-
a && n(
|
|
3321
|
+
let t = o.map((e) => Number(e)), r = typeof m == "string" ? m.trim() || void 0 : m || void 0, a = (await G.addGroup(t, c, r)).data;
|
|
3322
|
+
a && n(V(i.find((e) => e.id === a.id) || a)), e();
|
|
3410
3323
|
} catch (e) {
|
|
3411
3324
|
console.error("Lỗi khi tạo cuộc trò chuyện:", e), alert("Không thể tạo cuộc trò chuyện. Vui lòng thử lại sau.");
|
|
3412
3325
|
}
|
|
@@ -3457,7 +3370,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3457
3370
|
src: v,
|
|
3458
3371
|
alt: "Group avatar",
|
|
3459
3372
|
className: "preview-avatar"
|
|
3460
|
-
}) : /* @__PURE__ */ T(
|
|
3373
|
+
}) : /* @__PURE__ */ T(Ut, {})
|
|
3461
3374
|
})]
|
|
3462
3375
|
}), /* @__PURE__ */ T("input", {
|
|
3463
3376
|
type: "text",
|
|
@@ -3469,7 +3382,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3469
3382
|
}),
|
|
3470
3383
|
/* @__PURE__ */ T("div", {
|
|
3471
3384
|
className: "search-section",
|
|
3472
|
-
children: /* @__PURE__ */ T(
|
|
3385
|
+
children: /* @__PURE__ */ T(cn, {
|
|
3473
3386
|
value: u,
|
|
3474
3387
|
onChange: d,
|
|
3475
3388
|
placeholder: t("addChat.memberSearchPlaceholder")
|
|
@@ -3527,7 +3440,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3527
3440
|
className: "avatar-letter",
|
|
3528
3441
|
children: e.name.charAt(0).toUpperCase()
|
|
3529
3442
|
})
|
|
3530
|
-
}), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(
|
|
3443
|
+
}), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
|
|
3531
3444
|
size: 12,
|
|
3532
3445
|
className: "status-dot"
|
|
3533
3446
|
}) : null]
|
|
@@ -3558,7 +3471,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3558
3471
|
]
|
|
3559
3472
|
})
|
|
3560
3473
|
});
|
|
3561
|
-
},
|
|
3474
|
+
}, on = ({ user: e, onClose: t, isOnline: n, onMessage: r }) => e ? /* @__PURE__ */ T("div", {
|
|
3562
3475
|
className: "modal-overlay",
|
|
3563
3476
|
onClick: t,
|
|
3564
3477
|
children: /* @__PURE__ */ E("div", {
|
|
@@ -3575,7 +3488,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3575
3488
|
children: [
|
|
3576
3489
|
/* @__PURE__ */ E("div", {
|
|
3577
3490
|
className: "profile-avatar-wrapper",
|
|
3578
|
-
children: [/* @__PURE__ */ T(
|
|
3491
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
|
|
3579
3492
|
}),
|
|
3580
3493
|
/* @__PURE__ */ T("h3", {
|
|
3581
3494
|
className: "profile-name",
|
|
@@ -3592,7 +3505,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3592
3505
|
children: /* @__PURE__ */ E("button", {
|
|
3593
3506
|
className: "profile-action-btn",
|
|
3594
3507
|
onClick: r,
|
|
3595
|
-
children: [/* @__PURE__ */ T(
|
|
3508
|
+
children: [/* @__PURE__ */ T(mt, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
|
|
3596
3509
|
})
|
|
3597
3510
|
}),
|
|
3598
3511
|
/* @__PURE__ */ E("div", {
|
|
@@ -3652,8 +3565,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3652
3565
|
})
|
|
3653
3566
|
]
|
|
3654
3567
|
})
|
|
3655
|
-
}) : null,
|
|
3656
|
-
let { currentUser:
|
|
3568
|
+
}) : null, sn = ({ chats: e, onSelectChat: t }) => {
|
|
3569
|
+
let { currentUser: n, members: r, currentChat: i } = _((e) => e.chat), [a, o] = p(null), [s, l] = p(null), { t: u } = Z(), { hasGroupChat: d } = _(Ue), f = e.filter((e) => !(e.type === "group" && !d)), m = f.filter((e) => e.is_pined), h = f.filter((e) => !e.is_pined), g = (e) => e ? new Date(e).toLocaleTimeString([], {
|
|
3657
3570
|
hour: "2-digit",
|
|
3658
3571
|
minute: "2-digit"
|
|
3659
3572
|
}) : "";
|
|
@@ -3670,10 +3583,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3670
3583
|
className: "section-header",
|
|
3671
3584
|
children: /* @__PURE__ */ T("span", { children: "Tất cả tin nhắn" })
|
|
3672
3585
|
}), h.length > 0 ? h.map((e) => {
|
|
3673
|
-
let o = e.message?.member.id ===
|
|
3586
|
+
let o = e.message?.member.id === n?.id, s = n?.id && e.new?.[n.id] ? e.new[n.id] : 0, c = e.type === "single" ? e.members?.find((e) => e.id !== n?.id) : null, d = !!c && r.some((e) => e.id === c.id && (e.socket_ids?.length ?? 0) > 0);
|
|
3674
3587
|
return /* @__PURE__ */ E("div", {
|
|
3675
|
-
className: `chat-item ${
|
|
3676
|
-
onClick: () =>
|
|
3588
|
+
className: `chat-item ${i?.id === e.id ? "active" : ""} ${a === e.id ? "has-open-dropdown" : ""}`,
|
|
3589
|
+
onClick: () => t(e),
|
|
3677
3590
|
children: [/* @__PURE__ */ E("div", {
|
|
3678
3591
|
className: "chat-item-avatar",
|
|
3679
3592
|
style: {
|
|
@@ -3687,10 +3600,10 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3687
3600
|
isOnline: d
|
|
3688
3601
|
});
|
|
3689
3602
|
},
|
|
3690
|
-
children: [/* @__PURE__ */ T(
|
|
3603
|
+
children: [/* @__PURE__ */ T(Gt, {
|
|
3691
3604
|
chat: e,
|
|
3692
|
-
currentUserId:
|
|
3693
|
-
}), e.type === "single" && d && /* @__PURE__ */ T(
|
|
3605
|
+
currentUserId: n?.id
|
|
3606
|
+
}), e.type === "single" && d && /* @__PURE__ */ T(it, {
|
|
3694
3607
|
size: 12,
|
|
3695
3608
|
className: "online-indicator"
|
|
3696
3609
|
})]
|
|
@@ -3702,7 +3615,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3702
3615
|
className: "chat-item-name",
|
|
3703
3616
|
children: /* @__PURE__ */ T("span", {
|
|
3704
3617
|
className: "name-text",
|
|
3705
|
-
children: O(e,
|
|
3618
|
+
children: O(e, n?.id)
|
|
3706
3619
|
})
|
|
3707
3620
|
}), /* @__PURE__ */ T("span", {
|
|
3708
3621
|
className: "chat-item-time",
|
|
@@ -3718,7 +3631,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3718
3631
|
})
|
|
3719
3632
|
}), /* @__PURE__ */ E("div", {
|
|
3720
3633
|
className: "info-bottom-right",
|
|
3721
|
-
children: [e.is_muted && /* @__PURE__ */ T(
|
|
3634
|
+
children: [e.is_muted && /* @__PURE__ */ T(ut, {
|
|
3722
3635
|
size: 14,
|
|
3723
3636
|
className: "mute-icon-list"
|
|
3724
3637
|
}), s > 0 && /* @__PURE__ */ T("div", {
|
|
@@ -3734,26 +3647,26 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3734
3647
|
children: "Không có tin nhắn nào"
|
|
3735
3648
|
}) : null]
|
|
3736
3649
|
}),
|
|
3737
|
-
s && /* @__PURE__ */ T(
|
|
3650
|
+
s && /* @__PURE__ */ T(on, {
|
|
3738
3651
|
user: s.user,
|
|
3739
3652
|
isOnline: s.isOnline,
|
|
3740
3653
|
onClose: () => l(null),
|
|
3741
3654
|
onMessage: () => {
|
|
3742
3655
|
if (!s) return;
|
|
3743
|
-
let
|
|
3744
|
-
|
|
3656
|
+
let n = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === s.user.id));
|
|
3657
|
+
n && t(n), l(null);
|
|
3745
3658
|
}
|
|
3746
3659
|
})
|
|
3747
3660
|
]
|
|
3748
3661
|
});
|
|
3749
|
-
},
|
|
3750
|
-
let { hasGroupChat: a } = _(
|
|
3662
|
+
}, cn = ({ value: e, onChange: t, onAddClick: n, placeholder: r, activeTab: i }) => {
|
|
3663
|
+
let { hasGroupChat: a } = _(Ue), { t: o } = Z(), s = o("chatSearchBar.searchPlaceholder");
|
|
3751
3664
|
return /* @__PURE__ */ E("div", {
|
|
3752
3665
|
className: "chat-search-bar",
|
|
3753
3666
|
children: [/* @__PURE__ */ E("div", {
|
|
3754
3667
|
className: "search-input-wrapper",
|
|
3755
3668
|
children: [
|
|
3756
|
-
/* @__PURE__ */ T(
|
|
3669
|
+
/* @__PURE__ */ T(_t, { className: "search-icon" }),
|
|
3757
3670
|
/* @__PURE__ */ T("input", {
|
|
3758
3671
|
type: "text",
|
|
3759
3672
|
className: "search-input",
|
|
@@ -3771,68 +3684,56 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3771
3684
|
className: "action-btn add-group-btn",
|
|
3772
3685
|
onClick: n,
|
|
3773
3686
|
title: o("chatSearchBar.createGroup"),
|
|
3774
|
-
children: /* @__PURE__ */ T(
|
|
3687
|
+
children: /* @__PURE__ */ T(ct, {})
|
|
3775
3688
|
})]
|
|
3776
3689
|
});
|
|
3777
|
-
},
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
className: "app-
|
|
3781
|
-
children: [
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
className: "nav-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3690
|
+
}, ln = ({ setIsThemeModalOpen: e, activeTab: t, setActiveTab: n }) => {
|
|
3691
|
+
let { currentUser: r } = _((e) => e.chat);
|
|
3692
|
+
return /* @__PURE__ */ E("div", {
|
|
3693
|
+
className: "app-sidebar",
|
|
3694
|
+
children: [/* @__PURE__ */ E("div", {
|
|
3695
|
+
className: "app-nav",
|
|
3696
|
+
children: [
|
|
3697
|
+
/* @__PURE__ */ T("div", {
|
|
3698
|
+
className: `nav-item ${t === "chats" ? "active" : ""}`,
|
|
3699
|
+
onClick: () => n("chats"),
|
|
3700
|
+
children: /* @__PURE__ */ T(ht, {})
|
|
3701
|
+
}),
|
|
3702
|
+
/* @__PURE__ */ T("div", {
|
|
3703
|
+
className: `nav-item ${t === "contacts" ? "active" : ""}`,
|
|
3704
|
+
onClick: () => n("contacts"),
|
|
3705
|
+
children: /* @__PURE__ */ T(ct, {})
|
|
3706
|
+
}),
|
|
3707
|
+
/* @__PURE__ */ T("div", { className: "nav-separator" }),
|
|
3708
|
+
/* @__PURE__ */ T("div", {
|
|
3709
|
+
className: "nav-item",
|
|
3710
|
+
children: /* @__PURE__ */ T(gt, {})
|
|
3711
|
+
}),
|
|
3712
|
+
/* @__PURE__ */ T("div", {
|
|
3713
|
+
className: "nav-item",
|
|
3714
|
+
children: /* @__PURE__ */ T(_t, {})
|
|
3715
|
+
})
|
|
3716
|
+
]
|
|
3717
|
+
}), /* @__PURE__ */ E("div", {
|
|
3718
|
+
className: "app-sidebar-footer",
|
|
3719
|
+
children: [/* @__PURE__ */ T("div", {
|
|
3798
3720
|
className: "nav-item",
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
src: t.avatar,
|
|
3812
|
-
alt: t.name,
|
|
3813
|
-
style: {
|
|
3814
|
-
width: "100%",
|
|
3815
|
-
height: "100%",
|
|
3816
|
-
borderRadius: "50%",
|
|
3817
|
-
objectFit: "cover"
|
|
3818
|
-
}
|
|
3819
|
-
}) : /* @__PURE__ */ T("div", {
|
|
3820
|
-
style: {
|
|
3821
|
-
width: "100%",
|
|
3822
|
-
height: "100%",
|
|
3823
|
-
display: "flex",
|
|
3824
|
-
alignItems: "center",
|
|
3825
|
-
justifyContent: "center",
|
|
3826
|
-
fontSize: "14px",
|
|
3827
|
-
fontWeight: "bold",
|
|
3828
|
-
color: "#64748b"
|
|
3829
|
-
},
|
|
3830
|
-
children: t?.name?.[0].toUpperCase()
|
|
3831
|
-
})
|
|
3721
|
+
onClick: () => e(!0),
|
|
3722
|
+
children: /* @__PURE__ */ T(vt, {})
|
|
3723
|
+
}), /* @__PURE__ */ T("div", {
|
|
3724
|
+
className: "app-avatar",
|
|
3725
|
+
children: r?.avatar ? /* @__PURE__ */ T("img", {
|
|
3726
|
+
src: r.avatar,
|
|
3727
|
+
alt: r.name
|
|
3728
|
+
}) : /* @__PURE__ */ T("div", {
|
|
3729
|
+
className: "app-avatar-fallback",
|
|
3730
|
+
children: r?.name?.[0].toUpperCase()
|
|
3731
|
+
})
|
|
3732
|
+
})]
|
|
3832
3733
|
})]
|
|
3833
|
-
})
|
|
3834
|
-
}
|
|
3835
|
-
let
|
|
3734
|
+
});
|
|
3735
|
+
}, un = ({ onClose: e, onAddMember: t, onUpdateGroup: n, onRemoveMember: r }) => {
|
|
3736
|
+
let i = g(), { currentChatMembers: a, currentChat: o, currentUser: s } = _((e) => e.chat), [l, u] = p("info"), [d, f] = p(null), [m, h] = p(!1), [v, y] = p(null), [b, x] = p({
|
|
3836
3737
|
canChangeInfo: !0,
|
|
3837
3738
|
canPinMessage: !0,
|
|
3838
3739
|
canCreateNote: !0,
|
|
@@ -3855,13 +3756,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3855
3756
|
window.removeEventListener("click", e);
|
|
3856
3757
|
};
|
|
3857
3758
|
}, [d]);
|
|
3858
|
-
let C =
|
|
3759
|
+
let C = a.length ?? 0, D = O(o, s?.id, ""), k = a ?? [], A = async () => {
|
|
3859
3760
|
if (!v) return;
|
|
3860
|
-
let e =
|
|
3861
|
-
if (e)
|
|
3761
|
+
let e = o;
|
|
3762
|
+
if (e) i(V(e));
|
|
3862
3763
|
else try {
|
|
3863
|
-
let e = await
|
|
3864
|
-
e?.data && (
|
|
3764
|
+
let e = await G.addChat(v.user.id);
|
|
3765
|
+
e?.data && (i(we(e.data)), i(V(e.data)));
|
|
3865
3766
|
} catch (e) {
|
|
3866
3767
|
console.error("Lỗi khi tạo phòng chat mới:", e);
|
|
3867
3768
|
}
|
|
@@ -3876,14 +3777,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3876
3777
|
children: [/* @__PURE__ */ T("button", {
|
|
3877
3778
|
className: "back-info-btn",
|
|
3878
3779
|
onClick: () => u("info"),
|
|
3879
|
-
children: /* @__PURE__ */ T(
|
|
3780
|
+
children: /* @__PURE__ */ T(lt, {})
|
|
3880
3781
|
}), /* @__PURE__ */ T("h3", {
|
|
3881
3782
|
className: "header-title",
|
|
3882
3783
|
children: "Quản lý nhóm"
|
|
3883
3784
|
})]
|
|
3884
3785
|
}), /* @__PURE__ */ T("button", {
|
|
3885
3786
|
className: "close-info-btn",
|
|
3886
|
-
onClick:
|
|
3787
|
+
onClick: e,
|
|
3887
3788
|
children: /* @__PURE__ */ T($, {})
|
|
3888
3789
|
})]
|
|
3889
3790
|
}), /* @__PURE__ */ E("div", {
|
|
@@ -3954,7 +3855,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3954
3855
|
className: "setting-item-switch",
|
|
3955
3856
|
children: [/* @__PURE__ */ E("div", {
|
|
3956
3857
|
className: "setting-info",
|
|
3957
|
-
children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(
|
|
3858
|
+
children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
|
|
3958
3859
|
}), /* @__PURE__ */ E("label", {
|
|
3959
3860
|
className: "switch",
|
|
3960
3861
|
children: [/* @__PURE__ */ T("input", {
|
|
@@ -3968,7 +3869,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3968
3869
|
className: "setting-item-switch",
|
|
3969
3870
|
children: [/* @__PURE__ */ E("div", {
|
|
3970
3871
|
className: "setting-info",
|
|
3971
|
-
children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(
|
|
3872
|
+
children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
|
|
3972
3873
|
}), /* @__PURE__ */ E("label", {
|
|
3973
3874
|
className: "switch",
|
|
3974
3875
|
children: [/* @__PURE__ */ T("input", {
|
|
@@ -3982,7 +3883,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
3982
3883
|
className: "setting-item-switch",
|
|
3983
3884
|
children: [/* @__PURE__ */ E("div", {
|
|
3984
3885
|
className: "setting-info",
|
|
3985
|
-
children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(
|
|
3886
|
+
children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
|
|
3986
3887
|
}), /* @__PURE__ */ E("label", {
|
|
3987
3888
|
className: "switch",
|
|
3988
3889
|
children: [/* @__PURE__ */ T("input", {
|
|
@@ -4003,13 +3904,13 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4003
3904
|
className: "menu-item",
|
|
4004
3905
|
children: /* @__PURE__ */ E("div", {
|
|
4005
3906
|
className: "menu-left",
|
|
4006
|
-
children: [/* @__PURE__ */ T(
|
|
3907
|
+
children: [/* @__PURE__ */ T(bt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
|
|
4007
3908
|
})
|
|
4008
3909
|
}), /* @__PURE__ */ T("div", {
|
|
4009
3910
|
className: "menu-item",
|
|
4010
3911
|
children: /* @__PURE__ */ E("div", {
|
|
4011
3912
|
className: "menu-left",
|
|
4012
|
-
children: [/* @__PURE__ */ T(
|
|
3913
|
+
children: [/* @__PURE__ */ T(xt, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
|
|
4013
3914
|
})
|
|
4014
3915
|
})]
|
|
4015
3916
|
})
|
|
@@ -4023,20 +3924,20 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4023
3924
|
className: "info-header",
|
|
4024
3925
|
children: /* @__PURE__ */ T("button", {
|
|
4025
3926
|
className: "close-info-btn",
|
|
4026
|
-
onClick:
|
|
3927
|
+
onClick: e,
|
|
4027
3928
|
children: /* @__PURE__ */ T($, {})
|
|
4028
3929
|
})
|
|
4029
3930
|
}),
|
|
4030
|
-
|
|
3931
|
+
o && /* @__PURE__ */ E("div", {
|
|
4031
3932
|
className: "info-content-scroll",
|
|
4032
3933
|
children: [
|
|
4033
3934
|
/* @__PURE__ */ E("div", {
|
|
4034
3935
|
className: "info-basic-section",
|
|
4035
3936
|
children: [/* @__PURE__ */ T("div", {
|
|
4036
3937
|
className: "info-avatar-large",
|
|
4037
|
-
children: /* @__PURE__ */ T(
|
|
4038
|
-
chat:
|
|
4039
|
-
currentUserId:
|
|
3938
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
3939
|
+
chat: o,
|
|
3940
|
+
currentUserId: s?.id
|
|
4040
3941
|
})
|
|
4041
3942
|
}), /* @__PURE__ */ E("div", {
|
|
4042
3943
|
className: "info-main-details",
|
|
@@ -4044,21 +3945,21 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4044
3945
|
className: "info-chat-name",
|
|
4045
3946
|
children: [D, /* @__PURE__ */ T("span", {
|
|
4046
3947
|
className: "info-status-icons",
|
|
4047
|
-
children:
|
|
4048
|
-
e.stopPropagation(),
|
|
3948
|
+
children: o.type === "group" && /* @__PURE__ */ T(St, { onClick: (e) => {
|
|
3949
|
+
e.stopPropagation(), n && n(o);
|
|
4049
3950
|
} })
|
|
4050
3951
|
})]
|
|
4051
3952
|
}), /* @__PURE__ */ T("p", {
|
|
4052
3953
|
className: "info-member-count",
|
|
4053
|
-
children:
|
|
3954
|
+
children: o.type === "group" ? `Thành viên (${C})` : a.find((e) => e.id !== s?.id)?.socket_ids?.length ? "Đang hoạt động" : "Không hoạt động"
|
|
4054
3955
|
})]
|
|
4055
3956
|
})]
|
|
4056
3957
|
}),
|
|
4057
3958
|
/* @__PURE__ */ T("div", {
|
|
4058
3959
|
className: "info-quick-actions",
|
|
4059
|
-
children:
|
|
3960
|
+
children: o.type === "group" ? /* @__PURE__ */ T("div", {
|
|
4060
3961
|
className: "action-item",
|
|
4061
|
-
onClick:
|
|
3962
|
+
onClick: t,
|
|
4062
3963
|
children: /* @__PURE__ */ E("div", {
|
|
4063
3964
|
className: "action-icon-info",
|
|
4064
3965
|
children: [/* @__PURE__ */ E("svg", {
|
|
@@ -4092,8 +3993,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4092
3993
|
})
|
|
4093
3994
|
}) : /* @__PURE__ */ T(w, {})
|
|
4094
3995
|
}),
|
|
4095
|
-
|
|
4096
|
-
|
|
3996
|
+
o.type === "group" && null,
|
|
3997
|
+
o.type === "group" && /* @__PURE__ */ E("div", {
|
|
4097
3998
|
className: "info-members-section",
|
|
4098
3999
|
children: [/* @__PURE__ */ E("div", {
|
|
4099
4000
|
className: "section-title-row",
|
|
@@ -4103,55 +4004,49 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4103
4004
|
")"
|
|
4104
4005
|
] }), /* @__PURE__ */ E("div", {
|
|
4105
4006
|
className: "title-actions",
|
|
4106
|
-
children: [/* @__PURE__ */ T(
|
|
4007
|
+
children: [/* @__PURE__ */ T(Ct, {
|
|
4107
4008
|
size: 16,
|
|
4108
|
-
onClick:
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
onClick: () => h(!m)
|
|
4112
|
-
style: {
|
|
4113
|
-
cursor: "pointer",
|
|
4114
|
-
transform: m ? "rotate(-180deg)" : "rotate(0deg)",
|
|
4115
|
-
transition: "transform 0.2s ease"
|
|
4116
|
-
}
|
|
4009
|
+
onClick: t
|
|
4010
|
+
}), /* @__PURE__ */ T(wt, {
|
|
4011
|
+
className: `arrow-icon ${m ? "collapsed" : ""}`,
|
|
4012
|
+
onClick: () => h(!m)
|
|
4117
4013
|
})]
|
|
4118
4014
|
})]
|
|
4119
4015
|
}), m ? /* @__PURE__ */ E("div", {
|
|
4120
4016
|
className: "members-facepile",
|
|
4121
|
-
children: [k.slice(0, 8).map((
|
|
4017
|
+
children: [k.slice(0, 8).map((e) => /* @__PURE__ */ E("div", {
|
|
4122
4018
|
className: "facepile-item",
|
|
4123
|
-
children: [/* @__PURE__ */ T(
|
|
4124
|
-
},
|
|
4019
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), (e.id === s?.id || (e.socket_ids?.length ?? 0) > 0) && /* @__PURE__ */ T("div", { className: "online-status" })]
|
|
4020
|
+
}, e.id)), k.length > 8 && /* @__PURE__ */ E("div", {
|
|
4125
4021
|
className: "facepile-more",
|
|
4126
4022
|
children: ["+", k.length - 8]
|
|
4127
4023
|
})]
|
|
4128
4024
|
}) : /* @__PURE__ */ T("div", {
|
|
4129
4025
|
className: "members-compact-list",
|
|
4130
|
-
children: k.map((
|
|
4131
|
-
let
|
|
4026
|
+
children: k.map((e) => {
|
|
4027
|
+
let t = o.owner_id === e.id, n = e.id === s?.id || e.socket_ids && e.socket_ids.length > 0;
|
|
4132
4028
|
return /* @__PURE__ */ E("div", {
|
|
4133
4029
|
className: "member-compact-item",
|
|
4134
4030
|
children: [/* @__PURE__ */ E("div", {
|
|
4135
|
-
className: "member-item-left",
|
|
4031
|
+
className: "member-item-left clickable",
|
|
4136
4032
|
onClick: () => y({
|
|
4137
|
-
user:
|
|
4138
|
-
isOnline:
|
|
4033
|
+
user: e,
|
|
4034
|
+
isOnline: n ?? !1
|
|
4139
4035
|
}),
|
|
4140
|
-
style: { cursor: "pointer" },
|
|
4141
4036
|
children: [/* @__PURE__ */ E("div", {
|
|
4142
4037
|
className: "member-avatar-small",
|
|
4143
|
-
children: [/* @__PURE__ */ T(
|
|
4038
|
+
children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("div", { className: "online-status" })]
|
|
4144
4039
|
}), /* @__PURE__ */ E("div", {
|
|
4145
4040
|
className: "member-info",
|
|
4146
4041
|
children: [/* @__PURE__ */ E("div", {
|
|
4147
4042
|
className: "member-name-row",
|
|
4148
4043
|
children: [/* @__PURE__ */ T("span", {
|
|
4149
4044
|
className: "member-name",
|
|
4150
|
-
children:
|
|
4151
|
-
}),
|
|
4045
|
+
children: e.id === s?.id ? "Bạn" : e.name
|
|
4046
|
+
}), t && /* @__PURE__ */ T(at, {})]
|
|
4152
4047
|
}), /* @__PURE__ */ T("span", {
|
|
4153
4048
|
className: "member-role",
|
|
4154
|
-
children:
|
|
4049
|
+
children: t ? "Trưởng nhóm" : "Thành viên"
|
|
4155
4050
|
})]
|
|
4156
4051
|
})]
|
|
4157
4052
|
}), /* @__PURE__ */ T("div", {
|
|
@@ -4160,38 +4055,38 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4160
4055
|
className: "member-options-container",
|
|
4161
4056
|
children: [/* @__PURE__ */ T("button", {
|
|
4162
4057
|
className: "member-options-btn",
|
|
4163
|
-
onClick: (
|
|
4164
|
-
|
|
4058
|
+
onClick: (t) => {
|
|
4059
|
+
t.stopPropagation(), f(d === e.id ? null : e.id);
|
|
4165
4060
|
},
|
|
4166
|
-
children: /* @__PURE__ */ T(
|
|
4167
|
-
}), d ===
|
|
4061
|
+
children: /* @__PURE__ */ T(Tt, {})
|
|
4062
|
+
}), d === e.id && /* @__PURE__ */ T("div", {
|
|
4168
4063
|
className: "member-dropdown-menu",
|
|
4169
|
-
children: !
|
|
4064
|
+
children: !t && /* @__PURE__ */ E("button", {
|
|
4170
4065
|
className: "dropdown-item delete",
|
|
4171
|
-
onClick: (
|
|
4172
|
-
|
|
4066
|
+
onClick: (t) => {
|
|
4067
|
+
t.stopPropagation(), r && r(o.id, e.id), f(null);
|
|
4173
4068
|
},
|
|
4174
|
-
children: [/* @__PURE__ */ T(
|
|
4069
|
+
children: [/* @__PURE__ */ T(bt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
|
|
4175
4070
|
})
|
|
4176
4071
|
})]
|
|
4177
4072
|
})
|
|
4178
4073
|
})]
|
|
4179
|
-
},
|
|
4074
|
+
}, e.id);
|
|
4180
4075
|
})
|
|
4181
4076
|
})]
|
|
4182
4077
|
})
|
|
4183
4078
|
]
|
|
4184
4079
|
}),
|
|
4185
|
-
v && /* @__PURE__ */ T(
|
|
4080
|
+
v && /* @__PURE__ */ T(on, {
|
|
4186
4081
|
user: v.user,
|
|
4187
4082
|
isOnline: v.isOnline,
|
|
4188
4083
|
onClose: () => y(null),
|
|
4189
|
-
onMessage: () => void
|
|
4084
|
+
onMessage: () => void A()
|
|
4190
4085
|
})
|
|
4191
4086
|
]
|
|
4192
4087
|
});
|
|
4193
|
-
},
|
|
4194
|
-
let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(
|
|
4088
|
+
}, dn = ({ mode: e, title: t, logoUrl: n, onToggleMode: r, onClose: i }) => {
|
|
4089
|
+
let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(Ue), c = t ?? a("chatHeader.defaultTitle");
|
|
4195
4090
|
return /* @__PURE__ */ E("div", {
|
|
4196
4091
|
className: `chat-header ${e}`,
|
|
4197
4092
|
children: [/* @__PURE__ */ E("div", {
|
|
@@ -4200,20 +4095,8 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4200
4095
|
className: "header-logo",
|
|
4201
4096
|
children: n ? /* @__PURE__ */ T("img", {
|
|
4202
4097
|
src: n,
|
|
4203
|
-
alt: "Logo"
|
|
4204
|
-
|
|
4205
|
-
width: "22px",
|
|
4206
|
-
height: "22px",
|
|
4207
|
-
objectFit: "contain"
|
|
4208
|
-
}
|
|
4209
|
-
}) : /* @__PURE__ */ T(at, {
|
|
4210
|
-
size: 22,
|
|
4211
|
-
style: {
|
|
4212
|
-
width: "22px",
|
|
4213
|
-
height: "22px",
|
|
4214
|
-
objectFit: "contain"
|
|
4215
|
-
}
|
|
4216
|
-
})
|
|
4098
|
+
alt: "Logo"
|
|
4099
|
+
}) : /* @__PURE__ */ T(ot, { size: 22 })
|
|
4217
4100
|
}), /* @__PURE__ */ E("div", {
|
|
4218
4101
|
className: "header-info-text",
|
|
4219
4102
|
children: [
|
|
@@ -4238,19 +4121,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4238
4121
|
className: "action-btn",
|
|
4239
4122
|
onClick: o,
|
|
4240
4123
|
title: a("chatHeader.language"),
|
|
4241
|
-
children: /* @__PURE__ */ T(
|
|
4124
|
+
children: /* @__PURE__ */ T(Ht, { size: 16 })
|
|
4242
4125
|
}),
|
|
4243
4126
|
/* @__PURE__ */ T("button", {
|
|
4244
4127
|
className: "action-btn",
|
|
4245
4128
|
onClick: i,
|
|
4246
4129
|
title: a("chatHeader.minimize"),
|
|
4247
|
-
children: /* @__PURE__ */ T(
|
|
4130
|
+
children: /* @__PURE__ */ T(Et, { size: 16 })
|
|
4248
4131
|
}),
|
|
4249
4132
|
/* @__PURE__ */ T("button", {
|
|
4250
4133
|
className: "action-btn",
|
|
4251
4134
|
onClick: r,
|
|
4252
4135
|
title: a(e === "fullpage" ? "chatHeader.minimize" : "chatHeader.maximize"),
|
|
4253
|
-
children: T(e === "fullpage" ?
|
|
4136
|
+
children: T(e === "fullpage" ? Ot : Dt, {})
|
|
4254
4137
|
}),
|
|
4255
4138
|
/* @__PURE__ */ T("button", {
|
|
4256
4139
|
className: "action-btn close-btn",
|
|
@@ -4261,28 +4144,28 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4261
4144
|
]
|
|
4262
4145
|
})]
|
|
4263
4146
|
});
|
|
4264
|
-
},
|
|
4265
|
-
let { t: n } = Z(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(
|
|
4147
|
+
}, fn = r((e, t) => {
|
|
4148
|
+
let { t: n } = Z(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(Ue), [v, y] = p(""), [b, x] = p(!1), [S, C] = p(!1), [D, O] = p([]), [k, A] = p(!1), [j, M] = Ze(), [ee, te] = p(!1), { showToast: N } = Qe(), P = f(null), re = f(null), ie = f(null), I = f(/* @__PURE__ */ new Map()), R = (e) => {
|
|
4266
4149
|
y((t) => t + e), x(!1);
|
|
4267
|
-
},
|
|
4268
|
-
await
|
|
4269
|
-
},
|
|
4270
|
-
|
|
4150
|
+
}, z = async () => {
|
|
4151
|
+
await M.startRecording();
|
|
4152
|
+
}, de = async () => {
|
|
4153
|
+
te(!0);
|
|
4271
4154
|
try {
|
|
4272
|
-
await
|
|
4155
|
+
await M.stopRecording();
|
|
4273
4156
|
} finally {
|
|
4274
|
-
|
|
4157
|
+
te(!1);
|
|
4275
4158
|
}
|
|
4276
|
-
},
|
|
4277
|
-
|
|
4278
|
-
},
|
|
4159
|
+
}, fe = () => {
|
|
4160
|
+
j.recordedFile && (O((e) => [...e, j.recordedFile]), M.clearRecording());
|
|
4161
|
+
}, pe = (e) => {
|
|
4279
4162
|
let t = `${e.name}-${e.size}`;
|
|
4280
|
-
|
|
4163
|
+
I.current.has(t) && clearTimeout(I.current.get(t));
|
|
4281
4164
|
let n = setTimeout(() => {
|
|
4282
|
-
O((e) => e.filter((e) => e.errorId !== t)),
|
|
4165
|
+
O((e) => e.filter((e) => e.errorId !== t)), I.current.delete(t);
|
|
4283
4166
|
}, 5e3);
|
|
4284
|
-
return
|
|
4285
|
-
},
|
|
4167
|
+
return I.current.set(t, n), t;
|
|
4168
|
+
}, me = (e) => {
|
|
4286
4169
|
if (!e?.length) return;
|
|
4287
4170
|
if (!u) {
|
|
4288
4171
|
N("Tính năng đính kèm file chưa được kích hoạt.", "warning");
|
|
@@ -4293,14 +4176,14 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4293
4176
|
N("Loại file không được phép.", "error");
|
|
4294
4177
|
return;
|
|
4295
4178
|
}
|
|
4296
|
-
let n =
|
|
4179
|
+
let n = ue([...D, ...t], d, h);
|
|
4297
4180
|
if (n) {
|
|
4298
4181
|
N(n.message, n.type);
|
|
4299
4182
|
return;
|
|
4300
4183
|
}
|
|
4301
4184
|
let r = t.map((e) => {
|
|
4302
4185
|
if (e.size <= 26214400) return e;
|
|
4303
|
-
let t =
|
|
4186
|
+
let t = pe(e);
|
|
4304
4187
|
return Object.assign(e, {
|
|
4305
4188
|
isError: !0,
|
|
4306
4189
|
errorId: t
|
|
@@ -4308,17 +4191,17 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4308
4191
|
});
|
|
4309
4192
|
O((e) => [...e, ...r]);
|
|
4310
4193
|
};
|
|
4311
|
-
l(t, () => ({ processPastedFiles:
|
|
4312
|
-
let
|
|
4194
|
+
l(t, () => ({ processPastedFiles: me }));
|
|
4195
|
+
let he = (e) => {
|
|
4313
4196
|
let t = e.clipboardData;
|
|
4314
4197
|
if (!t) return;
|
|
4315
4198
|
if (t.files && t.files.length > 0) {
|
|
4316
|
-
e.preventDefault(),
|
|
4199
|
+
e.preventDefault(), me(t.files);
|
|
4317
4200
|
return;
|
|
4318
4201
|
}
|
|
4319
4202
|
let n = t.getData("text/plain");
|
|
4320
4203
|
n && y((e) => e + n);
|
|
4321
|
-
},
|
|
4204
|
+
}, V = (e) => {
|
|
4322
4205
|
let t = e.currentTarget.files;
|
|
4323
4206
|
if (!t?.length) return;
|
|
4324
4207
|
let n = () => {
|
|
@@ -4333,23 +4216,23 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4333
4216
|
N("Loại file được chọn không được phép.", "error"), n();
|
|
4334
4217
|
return;
|
|
4335
4218
|
}
|
|
4336
|
-
let i =
|
|
4219
|
+
let i = ue([...D, ...r], d, h);
|
|
4337
4220
|
if (i) {
|
|
4338
4221
|
N(i.message, i.type), n();
|
|
4339
4222
|
return;
|
|
4340
4223
|
}
|
|
4341
4224
|
let a = r.map((e) => {
|
|
4342
4225
|
if (e.size <= 26214400) return e;
|
|
4343
|
-
let t =
|
|
4226
|
+
let t = pe(e);
|
|
4344
4227
|
return Object.assign(e, {
|
|
4345
4228
|
isError: !0,
|
|
4346
4229
|
errorId: t
|
|
4347
4230
|
});
|
|
4348
4231
|
});
|
|
4349
4232
|
O((e) => [...e, ...a]), n();
|
|
4350
|
-
},
|
|
4233
|
+
}, ge = a((e) => {
|
|
4351
4234
|
O((t) => t.filter((t, n) => n !== e));
|
|
4352
|
-
}, []),
|
|
4235
|
+
}, []), _e = a(() => {
|
|
4353
4236
|
P.current?.click();
|
|
4354
4237
|
}, []);
|
|
4355
4238
|
c(() => {
|
|
@@ -4363,33 +4246,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4363
4246
|
}, [S]), c(() => {
|
|
4364
4247
|
k || ie.current?.focus();
|
|
4365
4248
|
}, [k]);
|
|
4366
|
-
let
|
|
4249
|
+
let ve = async (e, t) => {
|
|
4367
4250
|
if (i && !(!e && (!t || t.length === 0))) {
|
|
4368
|
-
|
|
4251
|
+
A(!0);
|
|
4369
4252
|
try {
|
|
4370
|
-
let n =
|
|
4371
|
-
r(
|
|
4253
|
+
let n = le(t ?? []), a = await Promise.all(n.map(async (e) => await B(e))), { data: s } = await G.addMessage(i.id, e, a, o?.id);
|
|
4254
|
+
r(Se({
|
|
4372
4255
|
chat: i,
|
|
4373
4256
|
message: s
|
|
4374
|
-
})), y(""), O([]), x(!1), r(
|
|
4257
|
+
})), y(""), O([]), x(!1), r(ke(null));
|
|
4375
4258
|
} catch (e) {
|
|
4376
4259
|
console.error("Error sending message:", e);
|
|
4377
4260
|
} finally {
|
|
4378
|
-
|
|
4261
|
+
A(!1);
|
|
4379
4262
|
}
|
|
4380
4263
|
}
|
|
4381
|
-
},
|
|
4264
|
+
}, H = () => {
|
|
4382
4265
|
let e = v.trim();
|
|
4383
4266
|
if (!e && D.length === 0) return;
|
|
4384
|
-
let t =
|
|
4267
|
+
let t = ue(D, d, h);
|
|
4385
4268
|
if (t) {
|
|
4386
4269
|
N(t.message, t.type);
|
|
4387
4270
|
return;
|
|
4388
4271
|
}
|
|
4389
|
-
|
|
4272
|
+
ve(e, D);
|
|
4273
|
+
}, ye = (e) => {
|
|
4274
|
+
e.key === "Enter" && H();
|
|
4390
4275
|
}, be = (e) => {
|
|
4391
|
-
e.key === "Enter" && V();
|
|
4392
|
-
}, H = (e) => {
|
|
4393
4276
|
let t = ie.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
|
|
4394
4277
|
n ? (n.scrollIntoView({
|
|
4395
4278
|
behavior: "smooth",
|
|
@@ -4402,18 +4285,18 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4402
4285
|
D.length > 0 && /* @__PURE__ */ T("div", {
|
|
4403
4286
|
className: "selected-files-list",
|
|
4404
4287
|
children: D.map((e, t) => {
|
|
4405
|
-
let r = e.isError, i =
|
|
4288
|
+
let r = e.isError, i = ce(e);
|
|
4406
4289
|
return /* @__PURE__ */ E("div", {
|
|
4407
4290
|
className: `selected-file-item ${i ? "image-file" : "other-file"} ${r ? "error-file-item" : ""}`,
|
|
4408
4291
|
children: [i ? /* @__PURE__ */ T("img", {
|
|
4409
|
-
src:
|
|
4292
|
+
src: se(e),
|
|
4410
4293
|
alt: e.name,
|
|
4411
4294
|
className: "file-preview-image"
|
|
4412
4295
|
}) : /* @__PURE__ */ E("div", {
|
|
4413
4296
|
className: "file-content-wrapper",
|
|
4414
4297
|
children: [/* @__PURE__ */ T("span", {
|
|
4415
4298
|
className: "file-icon",
|
|
4416
|
-
children:
|
|
4299
|
+
children: L(e.name)
|
|
4417
4300
|
}), /* @__PURE__ */ E("div", {
|
|
4418
4301
|
className: "file-info",
|
|
4419
4302
|
children: [/* @__PURE__ */ T("span", {
|
|
@@ -4421,27 +4304,22 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4421
4304
|
children: e.name
|
|
4422
4305
|
}), /* @__PURE__ */ T("span", {
|
|
4423
4306
|
className: `file-size ${r ? "error-size" : ""}`,
|
|
4424
|
-
children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` :
|
|
4307
|
+
children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` : oe(e.size)
|
|
4425
4308
|
})]
|
|
4426
4309
|
})]
|
|
4427
4310
|
}), /* @__PURE__ */ T("button", {
|
|
4428
4311
|
className: "remove-file-btn",
|
|
4429
|
-
onClick: () =>
|
|
4312
|
+
onClick: () => ge(t),
|
|
4430
4313
|
title: n("chatInput.removeFile"),
|
|
4431
4314
|
disabled: k,
|
|
4432
|
-
style: {
|
|
4433
|
-
opacity: k ? .5 : 1,
|
|
4434
|
-
cursor: k ? "not-allowed" : "pointer"
|
|
4435
|
-
},
|
|
4436
4315
|
children: "✕"
|
|
4437
4316
|
})]
|
|
4438
|
-
},
|
|
4317
|
+
}, ae(e));
|
|
4439
4318
|
})
|
|
4440
4319
|
}),
|
|
4441
4320
|
o && /* @__PURE__ */ E("div", {
|
|
4442
4321
|
className: "reply-input-preview",
|
|
4443
|
-
onClick: () =>
|
|
4444
|
-
style: { cursor: "pointer" },
|
|
4322
|
+
onClick: () => be(o.id),
|
|
4445
4323
|
children: [
|
|
4446
4324
|
/* @__PURE__ */ E("div", {
|
|
4447
4325
|
className: "reply-content",
|
|
@@ -4460,17 +4338,17 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4460
4338
|
/* @__PURE__ */ T("button", {
|
|
4461
4339
|
className: "close-reply",
|
|
4462
4340
|
onClick: (e) => {
|
|
4463
|
-
e.stopPropagation(), r(
|
|
4341
|
+
e.stopPropagation(), r(ke(null));
|
|
4464
4342
|
},
|
|
4465
4343
|
children: "✕"
|
|
4466
4344
|
}),
|
|
4467
4345
|
/* @__PURE__ */ T("div", {
|
|
4468
4346
|
className: "reply-icon",
|
|
4469
|
-
children: /* @__PURE__ */ T(
|
|
4347
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
4470
4348
|
})
|
|
4471
4349
|
]
|
|
4472
4350
|
}),
|
|
4473
|
-
|
|
4351
|
+
j.isRecording ? /* @__PURE__ */ E("div", {
|
|
4474
4352
|
className: "voice-recording-container",
|
|
4475
4353
|
children: [/* @__PURE__ */ E("div", {
|
|
4476
4354
|
className: "voice-recording-info",
|
|
@@ -4482,27 +4360,27 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4482
4360
|
})]
|
|
4483
4361
|
}), /* @__PURE__ */ T("span", {
|
|
4484
4362
|
className: "recording-duration",
|
|
4485
|
-
children: ne(
|
|
4363
|
+
children: ne(j.duration)
|
|
4486
4364
|
})]
|
|
4487
4365
|
}), /* @__PURE__ */ E("div", {
|
|
4488
4366
|
className: "voice-recording-controls",
|
|
4489
4367
|
children: [/* @__PURE__ */ T("button", {
|
|
4490
4368
|
className: "voice-control-btn cancel-btn",
|
|
4491
|
-
onClick: () =>
|
|
4369
|
+
onClick: () => M.cancelRecording(),
|
|
4492
4370
|
title: n("chatInput.cancelRecording"),
|
|
4493
|
-
disabled:
|
|
4371
|
+
disabled: ee,
|
|
4494
4372
|
children: "✕"
|
|
4495
4373
|
}), /* @__PURE__ */ T("button", {
|
|
4496
4374
|
className: "voice-control-btn stop-btn",
|
|
4497
4375
|
onClick: () => {
|
|
4498
|
-
|
|
4376
|
+
de();
|
|
4499
4377
|
},
|
|
4500
4378
|
title: n("chatInput.stopRecording"),
|
|
4501
|
-
disabled:
|
|
4502
|
-
children:
|
|
4379
|
+
disabled: ee,
|
|
4380
|
+
children: ee ? "⏳" : "⏹"
|
|
4503
4381
|
})]
|
|
4504
4382
|
})]
|
|
4505
|
-
}) :
|
|
4383
|
+
}) : j.recordedFile ? /* @__PURE__ */ E("div", {
|
|
4506
4384
|
className: "voice-recorded-container",
|
|
4507
4385
|
children: [/* @__PURE__ */ E("div", {
|
|
4508
4386
|
className: "voice-recorded-info",
|
|
@@ -4517,7 +4395,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4517
4395
|
}),
|
|
4518
4396
|
/* @__PURE__ */ T("span", {
|
|
4519
4397
|
className: "voice-duration",
|
|
4520
|
-
children: ne(
|
|
4398
|
+
children: ne(j.duration)
|
|
4521
4399
|
})
|
|
4522
4400
|
]
|
|
4523
4401
|
}), /* @__PURE__ */ E("div", {
|
|
@@ -4525,19 +4403,19 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4525
4403
|
children: [
|
|
4526
4404
|
/* @__PURE__ */ T("button", {
|
|
4527
4405
|
className: "voice-control-btn play-btn",
|
|
4528
|
-
onClick: () =>
|
|
4406
|
+
onClick: () => M.playback(),
|
|
4529
4407
|
title: n("chatInput.playRecording"),
|
|
4530
4408
|
children: "▶"
|
|
4531
4409
|
}),
|
|
4532
4410
|
/* @__PURE__ */ T("button", {
|
|
4533
4411
|
className: "voice-control-btn discard-btn",
|
|
4534
|
-
onClick: () =>
|
|
4412
|
+
onClick: () => M.clearRecording(),
|
|
4535
4413
|
title: n("chatInput.discardRecording"),
|
|
4536
4414
|
children: "✕"
|
|
4537
4415
|
}),
|
|
4538
4416
|
/* @__PURE__ */ T("button", {
|
|
4539
4417
|
className: "voice-control-btn add-btn",
|
|
4540
|
-
onClick:
|
|
4418
|
+
onClick: fe,
|
|
4541
4419
|
title: n("chatInput.addToMessage"),
|
|
4542
4420
|
children: "✓"
|
|
4543
4421
|
})
|
|
@@ -4549,9 +4427,9 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4549
4427
|
children: [
|
|
4550
4428
|
b && /* @__PURE__ */ T("div", {
|
|
4551
4429
|
className: "emoji-picker",
|
|
4552
|
-
children:
|
|
4430
|
+
children: F.map((e) => /* @__PURE__ */ T("button", {
|
|
4553
4431
|
className: "emoji-btn",
|
|
4554
|
-
onClick: () =>
|
|
4432
|
+
onClick: () => R(e),
|
|
4555
4433
|
children: e
|
|
4556
4434
|
}, e))
|
|
4557
4435
|
}),
|
|
@@ -4559,7 +4437,7 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4559
4437
|
ref: P,
|
|
4560
4438
|
type: "file",
|
|
4561
4439
|
multiple: !0,
|
|
4562
|
-
onChange:
|
|
4440
|
+
onChange: V,
|
|
4563
4441
|
accept: m,
|
|
4564
4442
|
className: "display-none"
|
|
4565
4443
|
}),
|
|
@@ -4568,31 +4446,31 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4568
4446
|
children: [
|
|
4569
4447
|
u && /* @__PURE__ */ T("button", {
|
|
4570
4448
|
className: "action-btn",
|
|
4571
|
-
onClick: () =>
|
|
4449
|
+
onClick: () => _e(),
|
|
4572
4450
|
title: n("chatInput.selectFiles"),
|
|
4573
4451
|
disabled: k,
|
|
4574
|
-
children: /* @__PURE__ */ T(
|
|
4452
|
+
children: /* @__PURE__ */ T(At, {})
|
|
4575
4453
|
}),
|
|
4576
4454
|
u && /* @__PURE__ */ T("button", {
|
|
4577
4455
|
className: "action-btn",
|
|
4578
|
-
onClick: () =>
|
|
4456
|
+
onClick: () => _e(),
|
|
4579
4457
|
title: n("chatInput.selectFiles"),
|
|
4580
4458
|
disabled: k,
|
|
4581
|
-
children: /* @__PURE__ */ T(
|
|
4459
|
+
children: /* @__PURE__ */ T(jt, {})
|
|
4582
4460
|
}),
|
|
4583
4461
|
s && /* @__PURE__ */ T("button", {
|
|
4584
4462
|
className: "action-btn",
|
|
4585
|
-
onClick: () => void
|
|
4463
|
+
onClick: () => void z(),
|
|
4586
4464
|
title: n("chatInput.recordVoice"),
|
|
4587
4465
|
disabled: k,
|
|
4588
|
-
children: /* @__PURE__ */ T(
|
|
4466
|
+
children: /* @__PURE__ */ T(Mt, {})
|
|
4589
4467
|
}),
|
|
4590
4468
|
/* @__PURE__ */ T("button", {
|
|
4591
4469
|
className: `action-btn ${b ? "active" : ""}`,
|
|
4592
4470
|
onClick: () => x(!b),
|
|
4593
4471
|
title: "emoji",
|
|
4594
4472
|
disabled: k,
|
|
4595
|
-
children: /* @__PURE__ */ T(
|
|
4473
|
+
children: /* @__PURE__ */ T(Nt, {})
|
|
4596
4474
|
})
|
|
4597
4475
|
]
|
|
4598
4476
|
}),
|
|
@@ -4605,42 +4483,33 @@ var St = Q("AddMember", /* @__PURE__ */ E(w, { children: [
|
|
|
4605
4483
|
placeholder: n("chatInput.placeholder"),
|
|
4606
4484
|
value: v,
|
|
4607
4485
|
onChange: (e) => y(e.target.value),
|
|
4608
|
-
onKeyPress:
|
|
4609
|
-
onPaste:
|
|
4610
|
-
disabled: k
|
|
4611
|
-
style: {
|
|
4612
|
-
opacity: k ? .6 : 1,
|
|
4613
|
-
cursor: k ? "not-allowed" : "text"
|
|
4614
|
-
}
|
|
4486
|
+
onKeyPress: ye,
|
|
4487
|
+
onPaste: he,
|
|
4488
|
+
disabled: k
|
|
4615
4489
|
})
|
|
4616
4490
|
}),
|
|
4617
4491
|
/* @__PURE__ */ T("button", {
|
|
4618
4492
|
className: "send-btn",
|
|
4619
|
-
onClick:
|
|
4493
|
+
onClick: H,
|
|
4620
4494
|
disabled: k || !v.trim() && D.length === 0,
|
|
4621
|
-
|
|
4622
|
-
background: k || !v.trim() && D.length === 0 ? "#d1d5db" : e ?? "#8aaeff",
|
|
4623
|
-
opacity: k || !v.trim() && D.length === 0 ? .6 : 1,
|
|
4624
|
-
cursor: k || !v.trim() && D.length === 0 ? "not-allowed" : "pointer"
|
|
4625
|
-
},
|
|
4626
|
-
children: k ? "⏳" : /* @__PURE__ */ T(Nt, {})
|
|
4495
|
+
children: k ? "⏳" : /* @__PURE__ */ T(Pt, {})
|
|
4627
4496
|
})
|
|
4628
4497
|
]
|
|
4629
4498
|
})
|
|
4630
4499
|
] });
|
|
4631
4500
|
});
|
|
4632
|
-
|
|
4501
|
+
fn.displayName = "ChatInput";
|
|
4633
4502
|
//#endregion
|
|
4634
4503
|
//#region src/components/view/ContactList.tsx
|
|
4635
|
-
var
|
|
4504
|
+
var pn = [{
|
|
4636
4505
|
label: "A-Z",
|
|
4637
4506
|
value: "asc",
|
|
4638
|
-
icon: /* @__PURE__ */ T(
|
|
4507
|
+
icon: /* @__PURE__ */ T(Ft, {})
|
|
4639
4508
|
}, {
|
|
4640
4509
|
label: "Z-A",
|
|
4641
4510
|
value: "desc",
|
|
4642
|
-
icon: /* @__PURE__ */ T(
|
|
4643
|
-
}],
|
|
4511
|
+
icon: /* @__PURE__ */ T(It, {})
|
|
4512
|
+
}], mn = [
|
|
4644
4513
|
{
|
|
4645
4514
|
label: "Tất cả",
|
|
4646
4515
|
value: "all"
|
|
@@ -4653,68 +4522,58 @@ var fn = [{
|
|
|
4653
4522
|
label: "Offline",
|
|
4654
4523
|
value: "offline"
|
|
4655
4524
|
}
|
|
4656
|
-
],
|
|
4657
|
-
let [
|
|
4658
|
-
let
|
|
4659
|
-
return
|
|
4525
|
+
], hn = ({ onMessageClick: e }) => {
|
|
4526
|
+
let [t, n] = p(""), [r, i] = p("asc"), [a, o] = p(!1), [s, c] = p("all"), [l, u] = p(!1), { members: f } = _((e) => e.chat), m = d(() => {
|
|
4527
|
+
let e = f.filter((e) => e.name.toLowerCase().includes(t.toLowerCase()));
|
|
4528
|
+
return s === "online" ? e = e.filter((e) => (e.socket_ids?.length ?? 0) > 0) : s === "offline" && (e = e.filter((e) => (e.socket_ids?.length ?? 0) === 0)), [...e].sort((e, t) => {
|
|
4660
4529
|
let n = e.name.localeCompare(t.name);
|
|
4661
|
-
return
|
|
4530
|
+
return r === "asc" ? n : -n;
|
|
4662
4531
|
});
|
|
4663
4532
|
}, [
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4533
|
+
f,
|
|
4534
|
+
t,
|
|
4535
|
+
r,
|
|
4536
|
+
s
|
|
4668
4537
|
]), h = d(() => {
|
|
4669
4538
|
let e = /* @__PURE__ */ new Set();
|
|
4670
4539
|
m.forEach((t) => {
|
|
4671
4540
|
t.name && e.add(t.name.charAt(0).toUpperCase());
|
|
4672
4541
|
});
|
|
4673
4542
|
let t = Array.from(e);
|
|
4674
|
-
return
|
|
4675
|
-
}, [m,
|
|
4543
|
+
return r === "asc" ? t.sort((e, t) => e.localeCompare(t)) : t.sort((e, t) => t.localeCompare(e));
|
|
4544
|
+
}, [m, r]);
|
|
4676
4545
|
return /* @__PURE__ */ E("div", {
|
|
4677
4546
|
className: "contact-list-view",
|
|
4678
4547
|
children: [
|
|
4679
4548
|
/* @__PURE__ */ T("div", {
|
|
4680
4549
|
className: "contact-list-header",
|
|
4681
|
-
children: /* @__PURE__ */ E("div", {
|
|
4682
|
-
style: {
|
|
4683
|
-
display: "flex",
|
|
4684
|
-
alignItems: "center",
|
|
4685
|
-
gap: "8px"
|
|
4686
|
-
},
|
|
4687
|
-
children: [/* @__PURE__ */ T(st, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })]
|
|
4688
|
-
})
|
|
4550
|
+
children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })] })
|
|
4689
4551
|
}),
|
|
4690
4552
|
/* @__PURE__ */ E("div", {
|
|
4691
4553
|
className: "contact-list-toolbar",
|
|
4692
|
-
style: { gap: "12px" },
|
|
4693
4554
|
children: [/* @__PURE__ */ E("div", {
|
|
4694
4555
|
className: "toolbar-search",
|
|
4695
|
-
|
|
4696
|
-
children: [/* @__PURE__ */ T(gt, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4556
|
+
children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4697
4557
|
type: "text",
|
|
4698
4558
|
placeholder: "Tìm bạn",
|
|
4699
|
-
value:
|
|
4700
|
-
onChange: (e) =>
|
|
4559
|
+
value: t,
|
|
4560
|
+
onChange: (e) => n(e.target.value)
|
|
4701
4561
|
})]
|
|
4702
4562
|
}), /* @__PURE__ */ E("div", {
|
|
4703
4563
|
className: "toolbar-right",
|
|
4704
4564
|
children: [/* @__PURE__ */ E("div", {
|
|
4705
4565
|
className: "filter-select",
|
|
4706
4566
|
onClick: () => {
|
|
4707
|
-
|
|
4567
|
+
o(!a), u(!1);
|
|
4708
4568
|
},
|
|
4709
|
-
style: { position: "relative" },
|
|
4710
4569
|
children: [
|
|
4711
|
-
/* @__PURE__ */ T("span", { children:
|
|
4712
|
-
/* @__PURE__ */ T(
|
|
4713
|
-
|
|
4570
|
+
/* @__PURE__ */ T("span", { children: r === "asc" ? "Tên (A-Z)" : "Tên (Z-A)" }),
|
|
4571
|
+
/* @__PURE__ */ T(wt, {}),
|
|
4572
|
+
a && /* @__PURE__ */ T("div", {
|
|
4714
4573
|
className: "dropdown-select",
|
|
4715
|
-
children:
|
|
4574
|
+
children: pn.map((e) => /* @__PURE__ */ E("div", {
|
|
4716
4575
|
onClick: () => {
|
|
4717
|
-
|
|
4576
|
+
i(e.value), o(!1);
|
|
4718
4577
|
},
|
|
4719
4578
|
className: "dropdown-item",
|
|
4720
4579
|
children: [e.icon, /* @__PURE__ */ T("div", { children: e.label })]
|
|
@@ -4724,17 +4583,16 @@ var fn = [{
|
|
|
4724
4583
|
}), /* @__PURE__ */ E("div", {
|
|
4725
4584
|
className: "filter-select",
|
|
4726
4585
|
onClick: () => {
|
|
4727
|
-
|
|
4586
|
+
u(!l), o(!1);
|
|
4728
4587
|
},
|
|
4729
|
-
style: { position: "relative" },
|
|
4730
4588
|
children: [
|
|
4731
|
-
/* @__PURE__ */ T("span", { children:
|
|
4732
|
-
/* @__PURE__ */ T(
|
|
4733
|
-
|
|
4589
|
+
/* @__PURE__ */ T("span", { children: mn.find((e) => e.value === s)?.label }),
|
|
4590
|
+
/* @__PURE__ */ T(wt, {}),
|
|
4591
|
+
l && /* @__PURE__ */ T("div", {
|
|
4734
4592
|
className: "dropdown-select",
|
|
4735
|
-
children:
|
|
4593
|
+
children: mn.map((e) => /* @__PURE__ */ T("div", {
|
|
4736
4594
|
onClick: () => {
|
|
4737
|
-
|
|
4595
|
+
c(e.value), u(!1);
|
|
4738
4596
|
},
|
|
4739
4597
|
className: "dropdown-item",
|
|
4740
4598
|
children: /* @__PURE__ */ T("div", { children: e.label })
|
|
@@ -4746,46 +4604,31 @@ var fn = [{
|
|
|
4746
4604
|
}),
|
|
4747
4605
|
/* @__PURE__ */ T("div", {
|
|
4748
4606
|
className: "contact-scroll-area",
|
|
4749
|
-
children: h.map((
|
|
4750
|
-
let n = m.filter((
|
|
4607
|
+
children: h.map((t) => {
|
|
4608
|
+
let n = m.filter((e) => e.name.charAt(0).toUpperCase() === t);
|
|
4751
4609
|
return /* @__PURE__ */ E("div", {
|
|
4752
4610
|
className: "contact-letter-group",
|
|
4753
4611
|
children: [/* @__PURE__ */ T("div", {
|
|
4754
4612
|
className: "letter-title",
|
|
4755
|
-
children:
|
|
4756
|
-
}), n.map((
|
|
4613
|
+
children: t
|
|
4614
|
+
}), n.map((t) => /* @__PURE__ */ E("div", {
|
|
4757
4615
|
className: "contact-item-row",
|
|
4758
4616
|
children: [/* @__PURE__ */ E("div", {
|
|
4759
4617
|
className: "contact-item-left",
|
|
4760
4618
|
children: [/* @__PURE__ */ E("div", {
|
|
4761
4619
|
className: "contact-avatar",
|
|
4762
|
-
children: [
|
|
4763
|
-
src:
|
|
4620
|
+
children: [t.avatar ? /* @__PURE__ */ T("img", {
|
|
4621
|
+
src: t.avatar,
|
|
4764
4622
|
alt: ""
|
|
4765
4623
|
}) : /* @__PURE__ */ T("div", {
|
|
4766
4624
|
className: "avatar-placeholder",
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
color: "white",
|
|
4770
|
-
width: "40px",
|
|
4771
|
-
height: "40px",
|
|
4772
|
-
borderRadius: "50%",
|
|
4773
|
-
display: "flex",
|
|
4774
|
-
alignItems: "center",
|
|
4775
|
-
justifyContent: "center",
|
|
4776
|
-
fontSize: "16px",
|
|
4777
|
-
fontWeight: "600"
|
|
4778
|
-
},
|
|
4779
|
-
children: e.name.charAt(0)
|
|
4780
|
-
}), /* @__PURE__ */ T("div", {
|
|
4781
|
-
className: "online-status",
|
|
4782
|
-
style: { background: (e.socket_ids?.length ?? 0) > 0 ? "#22c55e" : "#94a3b8" }
|
|
4783
|
-
})]
|
|
4625
|
+
children: t.name.charAt(0)
|
|
4626
|
+
}), /* @__PURE__ */ T("div", { className: `online-status ${(t.socket_ids?.length ?? 0) > 0 ? "is-online" : "is-offline"}` })]
|
|
4784
4627
|
}), /* @__PURE__ */ E("div", {
|
|
4785
4628
|
className: "contact-info",
|
|
4786
4629
|
children: [/* @__PURE__ */ T("div", {
|
|
4787
4630
|
className: "contact-name",
|
|
4788
|
-
children:
|
|
4631
|
+
children: t.name
|
|
4789
4632
|
}), /* @__PURE__ */ T("div", {
|
|
4790
4633
|
className: "contact-role",
|
|
4791
4634
|
children: "Nhân viên"
|
|
@@ -4795,28 +4638,20 @@ var fn = [{
|
|
|
4795
4638
|
className: "contact-item-actions",
|
|
4796
4639
|
children: [/* @__PURE__ */ T("button", {
|
|
4797
4640
|
className: "contact-action-btn",
|
|
4798
|
-
|
|
4799
|
-
border: "none",
|
|
4800
|
-
background: "transparent"
|
|
4801
|
-
},
|
|
4802
|
-
children: /* @__PURE__ */ T(ot, { size: 16 })
|
|
4641
|
+
children: /* @__PURE__ */ T(st, { size: 16 })
|
|
4803
4642
|
}), /* @__PURE__ */ T("button", {
|
|
4804
4643
|
className: "contact-action-btn",
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
background: "transparent"
|
|
4808
|
-
},
|
|
4809
|
-
onClick: () => t(String(e.id)),
|
|
4810
|
-
children: /* @__PURE__ */ T(pt, { size: 16 })
|
|
4644
|
+
onClick: () => e(String(t.id)),
|
|
4645
|
+
children: /* @__PURE__ */ T(mt, { size: 16 })
|
|
4811
4646
|
})]
|
|
4812
4647
|
})]
|
|
4813
|
-
},
|
|
4814
|
-
},
|
|
4648
|
+
}, t.id))]
|
|
4649
|
+
}, t);
|
|
4815
4650
|
})
|
|
4816
4651
|
})
|
|
4817
4652
|
]
|
|
4818
4653
|
});
|
|
4819
|
-
},
|
|
4654
|
+
}, gn = ({ groups: e, onGroupClick: t, currentUserId: n }) => {
|
|
4820
4655
|
let [r, i] = p(""), a = d(() => e.filter((e) => e.name?.toLowerCase().includes(r.toLowerCase())), [e, r]);
|
|
4821
4656
|
return /* @__PURE__ */ E("div", {
|
|
4822
4657
|
className: "contact-list-view",
|
|
@@ -4829,7 +4664,7 @@ var fn = [{
|
|
|
4829
4664
|
alignItems: "center",
|
|
4830
4665
|
gap: "8px"
|
|
4831
4666
|
},
|
|
4832
|
-
children: [/* @__PURE__ */ T(
|
|
4667
|
+
children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
|
|
4833
4668
|
})
|
|
4834
4669
|
}),
|
|
4835
4670
|
/* @__PURE__ */ T("div", {
|
|
@@ -4838,7 +4673,7 @@ var fn = [{
|
|
|
4838
4673
|
children: /* @__PURE__ */ E("div", {
|
|
4839
4674
|
className: "toolbar-search",
|
|
4840
4675
|
style: { flex: 1 },
|
|
4841
|
-
children: [/* @__PURE__ */ T(
|
|
4676
|
+
children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
|
|
4842
4677
|
type: "text",
|
|
4843
4678
|
placeholder: "Tìm nhóm",
|
|
4844
4679
|
value: r,
|
|
@@ -4859,7 +4694,7 @@ var fn = [{
|
|
|
4859
4694
|
className: "contact-item-left",
|
|
4860
4695
|
children: [/* @__PURE__ */ T("div", {
|
|
4861
4696
|
className: "contact-avatar",
|
|
4862
|
-
children: /* @__PURE__ */ T(
|
|
4697
|
+
children: /* @__PURE__ */ T(Gt, {
|
|
4863
4698
|
chat: e,
|
|
4864
4699
|
currentUserId: n
|
|
4865
4700
|
})
|
|
@@ -4879,7 +4714,7 @@ var fn = [{
|
|
|
4879
4714
|
})
|
|
4880
4715
|
]
|
|
4881
4716
|
});
|
|
4882
|
-
},
|
|
4717
|
+
}, _n = ({ file: e, children: t, className: n = "file-item", isLink: r = !1, handleImageClick: i }) => {
|
|
4883
4718
|
let a = {
|
|
4884
4719
|
className: n,
|
|
4885
4720
|
role: "button",
|
|
@@ -4899,9 +4734,9 @@ var fn = [{
|
|
|
4899
4734
|
...a,
|
|
4900
4735
|
children: t
|
|
4901
4736
|
});
|
|
4902
|
-
},
|
|
4737
|
+
}, vn = ({ file: e }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
|
|
4903
4738
|
className: "file-icon",
|
|
4904
|
-
children:
|
|
4739
|
+
children: L(e.ext)
|
|
4905
4740
|
}), /* @__PURE__ */ E("div", {
|
|
4906
4741
|
className: "file-info",
|
|
4907
4742
|
children: [/* @__PURE__ */ T("div", {
|
|
@@ -4909,13 +4744,13 @@ var fn = [{
|
|
|
4909
4744
|
children: e.name
|
|
4910
4745
|
}), /* @__PURE__ */ T("div", {
|
|
4911
4746
|
className: "file-size",
|
|
4912
|
-
children:
|
|
4747
|
+
children: oe(e.size)
|
|
4913
4748
|
})]
|
|
4914
|
-
})] }),
|
|
4915
|
-
let { openViewer: t } =
|
|
4749
|
+
})] }), yn = ({ files: e }) => {
|
|
4750
|
+
let { openViewer: t } = Ye();
|
|
4916
4751
|
if (!e || e.length === 0) return null;
|
|
4917
4752
|
let n = e.filter((e) => {
|
|
4918
|
-
let t =
|
|
4753
|
+
let t = z(e.name);
|
|
4919
4754
|
return [
|
|
4920
4755
|
"image",
|
|
4921
4756
|
"video",
|
|
@@ -4926,8 +4761,8 @@ var fn = [{
|
|
|
4926
4761
|
let r = e.findIndex((e) => e.id === n);
|
|
4927
4762
|
r !== -1 && t(e, r);
|
|
4928
4763
|
}, s = (e) => {
|
|
4929
|
-
switch (
|
|
4930
|
-
case "image": return r.includes(e) ? /* @__PURE__ */ E(
|
|
4764
|
+
switch (z(e.name)) {
|
|
4765
|
+
case "image": return r.includes(e) ? /* @__PURE__ */ E(_n, {
|
|
4931
4766
|
file: e,
|
|
4932
4767
|
className: "file-image-wrapper",
|
|
4933
4768
|
handleImageClick: o,
|
|
@@ -4943,7 +4778,7 @@ var fn = [{
|
|
|
4943
4778
|
})
|
|
4944
4779
|
})]
|
|
4945
4780
|
}, e.id) : null;
|
|
4946
|
-
case "video": return /* @__PURE__ */ E(
|
|
4781
|
+
case "video": return /* @__PURE__ */ E(_n, {
|
|
4947
4782
|
file: e,
|
|
4948
4783
|
className: "file-image-wrapper",
|
|
4949
4784
|
handleImageClick: o,
|
|
@@ -4961,16 +4796,16 @@ var fn = [{
|
|
|
4961
4796
|
})]
|
|
4962
4797
|
}, e.id);
|
|
4963
4798
|
case "pdf":
|
|
4964
|
-
case "audio": return /* @__PURE__ */ T(
|
|
4799
|
+
case "audio": return /* @__PURE__ */ T(_n, {
|
|
4965
4800
|
file: e,
|
|
4966
4801
|
handleImageClick: o,
|
|
4967
|
-
children: /* @__PURE__ */ T(
|
|
4802
|
+
children: /* @__PURE__ */ T(vn, { file: e })
|
|
4968
4803
|
}, e.id);
|
|
4969
|
-
default: return /* @__PURE__ */ T(
|
|
4804
|
+
default: return /* @__PURE__ */ T(_n, {
|
|
4970
4805
|
file: e,
|
|
4971
4806
|
isLink: !0,
|
|
4972
4807
|
handleImageClick: o,
|
|
4973
|
-
children: /* @__PURE__ */ T(
|
|
4808
|
+
children: /* @__PURE__ */ T(vn, { file: e })
|
|
4974
4809
|
}, e.id);
|
|
4975
4810
|
}
|
|
4976
4811
|
};
|
|
@@ -4978,13 +4813,13 @@ var fn = [{
|
|
|
4978
4813
|
className: "message-files",
|
|
4979
4814
|
children: e.map((e) => s(e))
|
|
4980
4815
|
});
|
|
4981
|
-
},
|
|
4982
|
-
let { currentUser: t, currentChat: n, currentChatMessages: r } = _((e) => e.chat), { allowDeleteMessage: i, allowRevokeMessage: a } = _(
|
|
4816
|
+
}, bn = ({ message: e }) => {
|
|
4817
|
+
let { currentUser: t, currentChat: n, currentChatMessages: r } = _((e) => e.chat), { allowDeleteMessage: i, allowRevokeMessage: a } = _(Ue), o = g(), { t: s } = Z(), c = e.member.code === t?.code, [l, u] = p(!1), f = new Date(e.created_at).toLocaleTimeString([], {
|
|
4983
4818
|
hour: "2-digit",
|
|
4984
4819
|
minute: "2-digit"
|
|
4985
4820
|
}), m = async (t) => {
|
|
4986
4821
|
if (n) try {
|
|
4987
|
-
await
|
|
4822
|
+
await G.actionMessage(n.id, e.id, t);
|
|
4988
4823
|
} catch (e) {
|
|
4989
4824
|
console.error("Lỗi khi tương tác tin nhắn:", e), alert("Thao tác không thành công, vui lòng thử lại!");
|
|
4990
4825
|
}
|
|
@@ -5009,12 +4844,6 @@ var fn = [{
|
|
|
5009
4844
|
className: "message-content",
|
|
5010
4845
|
children: /* @__PURE__ */ T("div", {
|
|
5011
4846
|
className: `message-bubble ${c ? "current-user" : "other-user"} revoked`,
|
|
5012
|
-
style: {
|
|
5013
|
-
fontStyle: "italic",
|
|
5014
|
-
opacity: .8,
|
|
5015
|
-
background: "rgba(255, 255, 255, 0.05)",
|
|
5016
|
-
border: "1px dashed rgba(255, 255, 255, 0.2)"
|
|
5017
|
-
},
|
|
5018
4847
|
children: /* @__PURE__ */ T("div", {
|
|
5019
4848
|
className: "message-text",
|
|
5020
4849
|
children: s("chatMessage.states.revoked")
|
|
@@ -5046,50 +4875,50 @@ var fn = [{
|
|
|
5046
4875
|
className: "action-icon",
|
|
5047
4876
|
title: s("chatMessage.actions.like"),
|
|
5048
4877
|
onClick: () => void m("like"),
|
|
5049
|
-
children: /* @__PURE__ */ T(
|
|
4878
|
+
children: /* @__PURE__ */ T(Lt, {})
|
|
5050
4879
|
}),
|
|
5051
4880
|
/* @__PURE__ */ T("button", {
|
|
5052
4881
|
className: "action-icon",
|
|
5053
4882
|
title: s("chatMessage.actions.love"),
|
|
5054
4883
|
onClick: () => void m("love"),
|
|
5055
|
-
children: /* @__PURE__ */ T(
|
|
4884
|
+
children: /* @__PURE__ */ T(Rt, {})
|
|
5056
4885
|
}),
|
|
5057
4886
|
/* @__PURE__ */ T("button", {
|
|
5058
4887
|
className: "action-icon",
|
|
5059
4888
|
title: s("chatMessage.actions.reply"),
|
|
5060
|
-
onClick: () => o(
|
|
5061
|
-
children: /* @__PURE__ */ T(
|
|
4889
|
+
onClick: () => o(ke(e)),
|
|
4890
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
5062
4891
|
}),
|
|
5063
4892
|
i(e.created_at) && /* @__PURE__ */ T("button", {
|
|
5064
4893
|
className: "action-icon",
|
|
5065
4894
|
title: s("chatMessage.actions.delete"),
|
|
5066
4895
|
onClick: () => void m("remove"),
|
|
5067
|
-
children: /* @__PURE__ */ T(
|
|
4896
|
+
children: /* @__PURE__ */ T(zt, {})
|
|
5068
4897
|
}),
|
|
5069
4898
|
a(e.created_at) && /* @__PURE__ */ T("button", {
|
|
5070
4899
|
className: "action-icon",
|
|
5071
4900
|
title: s("chatMessage.actions.revoke"),
|
|
5072
4901
|
onClick: () => void m("revoke"),
|
|
5073
|
-
children: /* @__PURE__ */ T(
|
|
4902
|
+
children: /* @__PURE__ */ T(Bt, {})
|
|
5074
4903
|
})
|
|
5075
4904
|
] }) : /* @__PURE__ */ E(w, { children: [
|
|
5076
4905
|
/* @__PURE__ */ T("button", {
|
|
5077
4906
|
className: "action-icon",
|
|
5078
4907
|
title: s("chatMessage.actions.reply"),
|
|
5079
|
-
onClick: () => o(
|
|
5080
|
-
children: /* @__PURE__ */ T(
|
|
4908
|
+
onClick: () => o(ke(e)),
|
|
4909
|
+
children: /* @__PURE__ */ T(kt, {})
|
|
5081
4910
|
}),
|
|
5082
4911
|
/* @__PURE__ */ T("button", {
|
|
5083
4912
|
className: "action-icon",
|
|
5084
4913
|
title: s("chatMessage.actions.like"),
|
|
5085
4914
|
onClick: () => void m("like"),
|
|
5086
|
-
children: /* @__PURE__ */ T(
|
|
4915
|
+
children: /* @__PURE__ */ T(Lt, {})
|
|
5087
4916
|
}),
|
|
5088
4917
|
/* @__PURE__ */ T("button", {
|
|
5089
4918
|
className: "action-icon",
|
|
5090
4919
|
title: s("chatMessage.actions.love"),
|
|
5091
4920
|
onClick: () => void m("love"),
|
|
5092
|
-
children: /* @__PURE__ */ T(
|
|
4921
|
+
children: /* @__PURE__ */ T(Rt, {})
|
|
5093
4922
|
})
|
|
5094
4923
|
] })
|
|
5095
4924
|
}),
|
|
@@ -5098,7 +4927,6 @@ var fn = [{
|
|
|
5098
4927
|
children: [e.reply && /* @__PURE__ */ E("div", {
|
|
5099
4928
|
className: "message-reply-preview",
|
|
5100
4929
|
onClick: (t) => h(t, e.reply.id),
|
|
5101
|
-
style: { cursor: "pointer" },
|
|
5102
4930
|
children: [/* @__PURE__ */ T("div", {
|
|
5103
4931
|
className: "reply-user-name",
|
|
5104
4932
|
children: e.reply.member.name
|
|
@@ -5123,7 +4951,7 @@ var fn = [{
|
|
|
5123
4951
|
})] })
|
|
5124
4952
|
})]
|
|
5125
4953
|
}) : null,
|
|
5126
|
-
/* @__PURE__ */ T(
|
|
4954
|
+
/* @__PURE__ */ T(yn, { files: e.files }),
|
|
5127
4955
|
e.action && (e.action.like > 0 || e.action.love > 0) && /* @__PURE__ */ E("div", {
|
|
5128
4956
|
className: "message-reactions-badge",
|
|
5129
4957
|
children: [e.action.like > 0 && /* @__PURE__ */ T("span", { children: "👍" }), e.action.love > 0 && /* @__PURE__ */ T("span", { children: "♥️" })]
|
|
@@ -5134,20 +4962,20 @@ var fn = [{
|
|
|
5134
4962
|
className: "message-time",
|
|
5135
4963
|
children: [f, c && (b || x) && /* @__PURE__ */ T("span", {
|
|
5136
4964
|
className: `message-item-status ${b ? "seen" : ""}`,
|
|
5137
|
-
children: b ? /* @__PURE__ */ T(
|
|
4965
|
+
children: b ? /* @__PURE__ */ T(Vt, {}) : `• ${s("chatMessage.status.sent")}`
|
|
5138
4966
|
})]
|
|
5139
4967
|
})
|
|
5140
4968
|
]
|
|
5141
4969
|
})]
|
|
5142
4970
|
});
|
|
5143
|
-
},
|
|
4971
|
+
}, xn = () => {
|
|
5144
4972
|
let { currentChat: t, currentChatMessages: n, messagesPagination: r, currentUser: i } = _((e) => e.chat), o = g(), s = f(null), l = f(null), u = f(null), [d, m] = p(!1), [h, v] = p(!1), [y, b] = p(!1), x = f(null), S = f(!1);
|
|
5145
4973
|
c(() => {
|
|
5146
4974
|
(async () => {
|
|
5147
4975
|
if (t && x.current !== Number(t.id)) {
|
|
5148
4976
|
x.current = Number(t.id);
|
|
5149
4977
|
try {
|
|
5150
|
-
let e =
|
|
4978
|
+
let e = G.getMessages(t.id, 20, 1), n = t.type === "group" ? G.getMembers(t.id).then((e) => e.data ?? []) : Promise.resolve(t.members ?? []), [r, i] = await Promise.all([e, n]);
|
|
5151
4979
|
r?.data && (o(ge(r.data)), o(be(r.pagination)), o(_e(i)));
|
|
5152
4980
|
} catch (e) {
|
|
5153
4981
|
console.error("Lỗi khi tải tin nhắn:", e), x.current = null;
|
|
@@ -5161,7 +4989,7 @@ var fn = [{
|
|
|
5161
4989
|
]), c(() => {
|
|
5162
4990
|
if (t && n.length > 0) {
|
|
5163
4991
|
let e = n[0], r = t.new?.[i?.id ?? 0] > 0;
|
|
5164
|
-
e.member.code !== i?.code && r &&
|
|
4992
|
+
e.member.code !== i?.code && r && G.readChat(t.id);
|
|
5165
4993
|
}
|
|
5166
4994
|
}, [
|
|
5167
4995
|
t,
|
|
@@ -5174,8 +5002,8 @@ var fn = [{
|
|
|
5174
5002
|
if (v(i > 300), i < 10 && b(!1), Math.abs(n.scrollTop) + n.clientHeight >= n.scrollHeight - 1 && !d && !S.current && r && r.current_page < r.total_pages) {
|
|
5175
5003
|
S.current = !0, m(!0);
|
|
5176
5004
|
try {
|
|
5177
|
-
let e = r.current_page + 1, n = await
|
|
5178
|
-
n.data && (o(
|
|
5005
|
+
let e = r.current_page + 1, n = await G.getMessages(Number(t?.id), 20, e);
|
|
5006
|
+
n.data && (o(xe(n.data)), o(be(n.pagination)));
|
|
5179
5007
|
} catch (e) {
|
|
5180
5008
|
console.error("Load more error", e);
|
|
5181
5009
|
} finally {
|
|
@@ -5224,7 +5052,7 @@ var fn = [{
|
|
|
5224
5052
|
},
|
|
5225
5053
|
children: n.map((t, r) => {
|
|
5226
5054
|
let i = new Date(t.created_at).toDateString(), a = n[r + 1], o = i !== (a ? new Date(a.created_at).toDateString() : null);
|
|
5227
|
-
return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(
|
|
5055
|
+
return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(bn, { message: t }), o && /* @__PURE__ */ T("div", {
|
|
5228
5056
|
className: "chat-date-divider",
|
|
5229
5057
|
children: /* @__PURE__ */ T("span", { children: N(t.created_at) })
|
|
5230
5058
|
})] }, t.id);
|
|
@@ -5238,9 +5066,9 @@ var fn = [{
|
|
|
5238
5066
|
};
|
|
5239
5067
|
//#endregion
|
|
5240
5068
|
//#region src/index.ts
|
|
5241
|
-
function
|
|
5069
|
+
function Sn(e) {
|
|
5242
5070
|
let t = document.createElement("div");
|
|
5243
|
-
t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(
|
|
5071
|
+
t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(nt, e));
|
|
5244
5072
|
}
|
|
5245
5073
|
//#endregion
|
|
5246
|
-
export {
|
|
5074
|
+
export { nt as ChatWidget, Sn as init };
|