@satek-team-intern/chatbot-widget 0.10.1 → 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.
@@ -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
- ]), ee = {
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
- }, A = (e) => {
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
- }, j = (e) => Object.keys(ee).filter((t) => e.attachments.has(t)).map((e) => ee[e]).join(","), te = (e) => (t) => {
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
- }, M = (e) => {
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;
@@ -67,7 +67,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
67
67
  }, ne = (e) => {
68
68
  let t = Math.floor(e / 1e3);
69
69
  return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
70
- }, P = null, F = async (e) => {
70
+ }, P = null, re = async (e) => {
71
71
  P || (P = await C(), P.configure({
72
72
  sampleRate: 44100,
73
73
  channels: 1,
@@ -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
- }, I = 25 * 1024 * 1024, re = [
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
- ], ie = {
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
- }, L = (e) => e && ie[e.includes(".") ? e.split(".").pop()?.toLowerCase() ?? "" : e.toLowerCase()] || "📎", ae = /* @__PURE__ */ new WeakMap(), R = (e) => {
129
- if (!ae.has(e)) {
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
- ae.set(e, `${e.name}-${e.size}-${t}`);
131
+ R.set(e, `${e.name}-${e.size}-${t}`);
132
132
  }
133
- return ae.get(e);
134
- }, z = (e) => {
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
- }, oe = (e) => {
143
+ }, z = (e) => {
144
144
  let t = e.split(".").pop()?.toLowerCase() ?? "";
145
145
  return [
146
146
  "jpg",
@@ -169,7 +169,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
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
- }, ue = (e) => new Promise((t) => {
172
+ }, B = (e) => new Promise((t) => {
173
173
  if (!e.type.startsWith("image/")) {
174
174
  t(e);
175
175
  return;
@@ -197,19 +197,26 @@ 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
- }), de = (e, t, n) => e.length === 0 ? null : !t && e.length > 1 ? {
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 ? {
204
204
  message: "Chỉ cho phép tối đa 20 file.",
205
205
  type: "warning"
206
206
  } : e.some((e) => e.isError) ? {
207
- message: `Vui lòng loại bỏ các file bị lỗi (vượt quá ${I / (1024 * 1024)} MB).`,
207
+ message: `Vui lòng loại bỏ các file bị lỗi (vượt quá ${ie / (1024 * 1024)} MB).`,
208
208
  type: "warning"
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
- }, B = S({
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,
@@ -223,6 +230,9 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
223
230
  replyingMessage: null
224
231
  },
225
232
  reducers: {
233
+ clearAll: (e) => {
234
+ e.currentUser = null, e.chats = [], e.currentChat = null, e.currentChatMessages = [], e.currentChatMembers = [], e.members = [], e.totalMessagesUnread = 0, e.messagesPagination = null, e.replyingMessage = null;
235
+ },
226
236
  setCurrentUser: (e, t) => {
227
237
  e.currentUser = t.payload;
228
238
  },
@@ -237,7 +247,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
237
247
  },
238
248
  setMembers: (e, t) => {
239
249
  e.members = t.payload.map((e) => {
240
- let t = M(e.socket_at);
250
+ let t = te(e.socket_at);
241
251
  return {
242
252
  ...e,
243
253
  socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
@@ -248,7 +258,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
248
258
  },
249
259
  setCurrentChatMembers: (e, t) => {
250
260
  e.currentChatMembers = t.payload.map((e) => {
251
- let t = M(e.socket_at);
261
+ let t = te(e.socket_at);
252
262
  return {
253
263
  ...e,
254
264
  socket_ids: e.socket_ids ?? (t && e.socket_id ? [e.socket_id] : []),
@@ -363,7 +373,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
363
373
  i && (i[r] = !i[r]), e.currentChat?.id === n && (e.currentChat[r] = !e.currentChat[r]);
364
374
  }
365
375
  }
366
- }), { setCurrentUser: fe, setChats: pe, setCurrentChat: V, setCurrentChatMessages: me, setCurrentChatMembers: he, setMembers: ge, setMember: _e, setMemberDisconnect: ve, setMessagesPagination: H, prependMessages: ye, addNewMessage: U, removeChat: be, addChat: xe, updateChat: Se, updateChatAvatar: Ce, removeMessage: we, updateMessage: Te, setReplyingMessage: Ee, setTotalMessagesUnread: De, updateMemberReadStatus: Oe, toggleChatSetting: ke } = B.actions, Ae = B.reducer, W = class e {
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 {
367
377
  static instance;
368
378
  chatSDK = null;
369
379
  constructor() {
@@ -517,7 +527,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
517
527
  setConfig(e) {
518
528
  this.chatSDK && this.chatSDK.setConfig(e);
519
529
  }
520
- }.getInstance(), je = {
530
+ }.getInstance(), Me = {
521
531
  common: {
522
532
  buttons: {
523
533
  save: "Save",
@@ -650,7 +660,7 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
650
660
  updateButton: "Update",
651
661
  updatingButton: "Updating..."
652
662
  }
653
- }, G = {
663
+ }, K = {
654
664
  common: {
655
665
  buttons: {
656
666
  save: "Lưu",
@@ -784,14 +794,14 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
784
794
  updateButton: "Cập nhật",
785
795
  updatingButton: "Đang cập nhật..."
786
796
  }
787
- }, K = class e {
797
+ }, q = class e {
788
798
  static instance;
789
799
  translations;
790
800
  currentLocale;
791
801
  constructor() {
792
802
  this.currentLocale = "vietnamese", this.translations = {
793
- vietnamese: G,
794
- english: je
803
+ vietnamese: K,
804
+ english: Me
795
805
  };
796
806
  }
797
807
  static getInstance() {
@@ -806,13 +816,13 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
806
816
  t(e, t) {
807
817
  let n = e.split("."), r = (e) => n.reduce((e, t) => {
808
818
  if (e && typeof e == "object") return e[t];
809
- }, e), i = r(this.translations[this.currentLocale]) ?? r(je);
819
+ }, e), i = r(this.translations[this.currentLocale]) ?? r(Me);
810
820
  if (typeof i != "string") return e;
811
821
  let a = i;
812
822
  if (t) for (let [e, n] of Object.entries(t)) a = a.replace(RegExp(`{${e}}`, "g"), n);
813
823
  return a;
814
824
  }
815
- }.getInstance(), q = S({
825
+ }.getInstance(), Ne = S({
816
826
  name: "widget-settingslice",
817
827
  initialState: {
818
828
  theme: localStorage.getItem("chat-theme") || "light",
@@ -838,17 +848,17 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
838
848
  e.primaryColor = t.payload, localStorage.setItem("chat-primary-color", e.primaryColor);
839
849
  },
840
850
  setLanguage: (e, t) => {
841
- e.currentLanguage = t.payload, K.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
851
+ e.currentLanguage = t.payload, q.locale = t.payload, localStorage.setItem("chat-widget:language", e.currentLanguage);
842
852
  }
843
853
  }
844
- }), { setConfig: Me, toggleTheme: J, setFeatures: Ne, setPrimaryColor: Pe, setLanguage: Fe } = q.actions, Y = q.reducer, X = y({
845
- chat: Ae,
846
- setting: Y
847
- }), Ie = b({
848
- reducer: (e, t) => (t.type === "chatSlice/logout" && (e = void 0), X(e, t)),
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)),
849
859
  middleware: (e) => e({ serializableCheck: { ignoredPaths: ["chat.instance"] } }),
850
860
  devTools: { name: "ChatbotWidget" }
851
- }), Le = (e) => e.setting.features, Re = (e, t) => {
861
+ }), ze = (e) => e.setting.features, Be = (e, t) => {
852
862
  let n = {
853
863
  minutes: 1e3 * 60,
854
864
  hours: 1e3 * 60 * 60,
@@ -856,35 +866,35 @@ var D = "\n #chat-internal-root{z-index:99999;pointer-events:none;font-family
856
866
  };
857
867
  return e * (n[t] || n.hours);
858
868
  };
859
- function ze(e) {
869
+ function Ve(e) {
860
870
  return (t) => {
861
- let { allow_delete_message: n, delete_duration: r } = W.setting || {};
871
+ let { allow_delete_message: n, delete_duration: r } = G.setting || {};
862
872
  if (!n) return !1;
863
873
  if (r <= 0) return !0;
864
874
  let i = new Date(t).getTime();
865
875
  return Date.now() - i <= e;
866
876
  };
867
877
  }
868
- function Be(e) {
878
+ function He(e) {
869
879
  return (t) => {
870
- let { allow_revoke_message: n, revoke_duration: r } = W.setting || {};
880
+ let { allow_revoke_message: n, revoke_duration: r } = G.setting || {};
871
881
  if (!n) return !1;
872
882
  if (r <= 0) return !0;
873
883
  let i = new Date(t).getTime();
874
884
  return Date.now() - i <= e;
875
885
  };
876
886
  }
877
- var Ve = x([Le], (e) => {
878
- let t = A(e), n = Re(W.setting?.delete_duration ?? 0, W.setting?.delete_duration_unit ?? "hours"), r = Re(W.setting?.revoke_duration ?? 0, W.setting?.revoke_duration_unit ?? "hours");
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");
879
889
  return {
880
890
  ...t,
881
- acceptFilter: j(t.featureSet),
882
- isFileTypeAllowed: te(t.featureSet),
883
- allowDeleteChat: W.setting?.allow_delete_chat ?? !1,
884
- allowDeleteMessage: ze(n),
885
- allowRevokeMessage: Be(r)
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)
886
896
  };
887
- }), He = (e, t, n) => {
897
+ }), We = (e, t, n) => {
888
898
  let r = g(), i = f(!1), { currentUser: a, chats: o, currentChat: s } = _((e) => e.chat), l = f({
889
899
  chats: null,
890
900
  currentUser: null,
@@ -903,9 +913,9 @@ var Ve = x([Le], (e) => {
903
913
  ]), c(() => {
904
914
  (async () => {
905
915
  let { code: a, name: o, avatar: s, email: c, phone: l } = t || {};
906
- if (!(!a || !o || !s || !c || i.current)) try {
907
- i.current = !0, await W.init(e, n);
908
- let t = await W.setAuth({
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({
909
919
  code: a,
910
920
  name: o,
911
921
  avatar: s,
@@ -916,11 +926,11 @@ var Ve = x([Le], (e) => {
916
926
  i.current = !1, console.error("Authentication failed: No user data returned");
917
927
  return;
918
928
  }
919
- r(fe(t)), console.warn("Authenticated as:", t);
920
- let [{ data: u }, { data: d }] = await Promise.all([W.getMembers(), W.getChats()]);
921
- r(pe(d)), r(ge(u));
929
+ r(me(t)), console.warn("Authenticated as:", t);
930
+ let [{ data: u }, { data: d }] = await Promise.all([G.getMembers(), G.getChats()]);
931
+ r(he(d)), r(ve(u));
922
932
  let f = d?.reduce((e, n) => e + (n.new[t.id] ?? 0), 0) ?? 0;
923
- r(De(f)), console.warn("Total unread messages:", f);
933
+ r(Ae(f)), console.warn("Total unread messages:", f);
924
934
  } catch (e) {
925
935
  i.current = !1, console.error("Failed to init chat or authenticate:", e);
926
936
  }
@@ -936,32 +946,32 @@ var Ve = x([Le], (e) => {
936
946
  "chats.message": (e) => {
937
947
  console.warn("Message Event:", e);
938
948
  let { chat: t, message: n, type: i, chat_id: a, message_id: o } = e;
939
- i === "add" ? r(U({
949
+ i === "add" ? r(Se({
940
950
  chat: t,
941
951
  message: n
942
- })) : i === "remove" || i === "revoke" ? r(we({
952
+ })) : i === "remove" || i === "revoke" ? r(De({
943
953
  chat_id: a,
944
954
  message_id: o,
945
955
  type: i
946
- })) : (i === "love" || i === "like") && r(Te({
956
+ })) : (i === "love" || i === "like") && r(Oe({
947
957
  chat_id: a,
948
958
  message: n
949
959
  }));
950
960
  },
951
961
  "chats.created": (e) => {
952
- console.warn("Chat Event:", e), r(xe(e.chat));
962
+ console.warn("Chat Event:", e), r(we(e.chat));
953
963
  },
954
964
  "chats.updated": (e) => {
955
- console.warn("Chat Event:", e), r(Se(e.chat));
965
+ console.warn("Chat Event:", e), r(Te(e.chat));
956
966
  },
957
967
  "chats.deleted": (e) => {
958
- l.current.chats && (console.warn("Chat Event:", e), l.current.chats.find((t) => t.id === e.chat_id)?.type === "group" && r(be(e.chat_id)));
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)));
959
969
  },
960
970
  "chats.action": (e) => {
961
971
  if (console.warn("Chat Event:", e), e.type === "read") {
962
- e.chat && r(Se(e.chat));
972
+ e.chat && r(Te(e.chat));
963
973
  let t = e.chat?.id ?? e.chat_id, n = e.member_id ?? e.user_id, i = e.message_id ?? e.chat?.message?.id;
964
- t && n && i && r(Oe({
974
+ t && n && i && r(U({
965
975
  chatId: Number(t),
966
976
  memberId: Number(n),
967
977
  lastReadId: Number(i)
@@ -974,7 +984,7 @@ var Ve = x([Le], (e) => {
974
984
  "members.connect"(e) {
975
985
  console.warn("Member Connected:", e);
976
986
  let { member: t, timestamp: n, socketId: i } = e;
977
- r(_e({
987
+ r(H({
978
988
  member: t,
979
989
  timestamp: n,
980
990
  socketId: i
@@ -984,19 +994,19 @@ var Ve = x([Le], (e) => {
984
994
  console.warn("Member Disconnected:", e);
985
995
  let { socketId: t } = e;
986
996
  setTimeout(() => {
987
- r(ve(t));
997
+ r(ye(t));
988
998
  }, 3e3);
989
999
  }
990
1000
  };
991
1001
  return Object.entries(e).forEach(([e, t]) => {
992
- W.addEventListener(e, t);
1002
+ G.addEventListener(e, t);
993
1003
  }), console.warn("Chat event listeners registered"), () => {
994
1004
  Object.entries(e).forEach(([e, t]) => {
995
- W.removeEventListener(e, t);
996
- }), console.warn("Chat event listeners removed"), W.clearAuth(), console.warn("Clear auth");
1005
+ G.removeEventListener(e, t);
1006
+ }), console.warn("Chat event listeners removed"), r(pe()), G.clearAuth(), console.warn("Clear auth");
997
1007
  };
998
1008
  }, [a?.id, r]);
999
- }, Ue = t(void 0), We = ({ children: e }) => {
1009
+ }, Ge = t(void 0), Ke = ({ children: e }) => {
1000
1010
  let [t, n] = p(!1), [r, i] = p([]), [o, s] = p(0), c = {
1001
1011
  isOpen: t,
1002
1012
  files: r,
@@ -1008,11 +1018,11 @@ var Ve = x([Le], (e) => {
1008
1018
  n(!1);
1009
1019
  }, [])
1010
1020
  };
1011
- return /* @__PURE__ */ T(Ue.Provider, {
1021
+ return /* @__PURE__ */ T(Ge.Provider, {
1012
1022
  value: c,
1013
1023
  children: e
1014
1024
  });
1015
- }, Ge = ({ children: e }) => {
1025
+ }, qe = ({ children: e }) => {
1016
1026
  let [t, n] = p([]), r = a((e) => {
1017
1027
  n((t) => t.filter((t) => t.id !== e));
1018
1028
  }, []), i = a((e, t = "info") => {
@@ -1037,7 +1047,7 @@ var Ve = x([Le], (e) => {
1037
1047
  }
1038
1048
  }]);
1039
1049
  }), [r]);
1040
- return /* @__PURE__ */ T(Ke.Provider, {
1050
+ return /* @__PURE__ */ T(Je.Provider, {
1041
1051
  value: {
1042
1052
  showToast: i,
1043
1053
  removeToast: r,
@@ -1046,11 +1056,11 @@ var Ve = x([Le], (e) => {
1046
1056
  },
1047
1057
  children: e
1048
1058
  });
1049
- }, Ke = t(void 0), qe = () => {
1050
- let e = o(Ue);
1059
+ }, Je = t(void 0), Ye = () => {
1060
+ let e = o(Ge);
1051
1061
  if (!e) throw Error("useFileViewer must be used within FileViewerProvider");
1052
1062
  return e;
1053
- }, Je = ({ onFilesAdded: e }) => {
1063
+ }, Xe = ({ onFilesAdded: e }) => {
1054
1064
  let [t, n] = p(!1), r = f(0);
1055
1065
  return {
1056
1066
  isDragOver: t,
@@ -1069,7 +1079,7 @@ var Ve = x([Le], (e) => {
1069
1079
  i && i.length > 0 && e(i);
1070
1080
  }, [e])
1071
1081
  };
1072
- }, Ye = () => {
1082
+ }, Ze = () => {
1073
1083
  let [e, t] = p({
1074
1084
  isRecording: !1,
1075
1085
  duration: 0,
@@ -1120,7 +1130,7 @@ var Ve = x([Le], (e) => {
1120
1130
  o.current &&= (clearInterval(o.current), null), r.current?.getTracks().forEach((e) => e.stop());
1121
1131
  let a = new Blob(i.current, { type: "audio/webm;codecs=opus" }), s;
1122
1132
  try {
1123
- s = await F(a);
1133
+ s = await re(a);
1124
1134
  } catch (e) {
1125
1135
  console.error("MP3 convert failed, fallback to webm", e), s = a;
1126
1136
  }
@@ -1162,41 +1172,41 @@ var Ve = x([Le], (e) => {
1162
1172
  _((e) => e.setting.currentLanguage);
1163
1173
  let e = g();
1164
1174
  return {
1165
- t: K.t.bind(K),
1175
+ t: q.t.bind(q),
1166
1176
  toggleChangeLanguage: () => {
1167
- K.locale === "english" ? (K.locale = "vietnamese", e(Fe("vietnamese"))) : (K.locale = "english", e(Fe("english")));
1177
+ q.locale === "english" ? (q.locale = "vietnamese", e(Fe("vietnamese"))) : (q.locale = "english", e(Fe("english")));
1168
1178
  }
1169
1179
  };
1170
- }, Xe = () => {
1171
- let e = o(Ke);
1180
+ }, Qe = () => {
1181
+ let e = o(Je);
1172
1182
  if (!e) throw Error("useToast must be used within ToastProvider");
1173
1183
  return e;
1174
- }, Ze = (e) => {
1184
+ }, $e = (e) => {
1175
1185
  let t = g(), n = f(!1);
1176
1186
  c(() => {
1177
1187
  (() => {
1178
1188
  if (!(!e || n.current)) try {
1179
- n.current = !0, e && t(Me(e));
1189
+ n.current = !0, e && t(Pe(e));
1180
1190
  } catch (e) {
1181
1191
  n.current = !1, console.error("Failed to init chat or authenticate:", e);
1182
1192
  }
1183
1193
  })();
1184
1194
  }, [e, t]);
1185
- }, Qe = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
1186
- Ze(n), He(e, t, i);
1195
+ }, et = ({ chatKey: e, auth: t, features: n, logoUrl: r, workspace: i, ...a }) => {
1196
+ $e(n), We(e, t, i);
1187
1197
  let [o, s] = p("closed"), [c, l] = p(null), [u, d] = p(null), [f, m] = p({
1188
1198
  width: 1e3,
1189
1199
  height: 750
1190
1200
  });
1191
1201
  return /* @__PURE__ */ E("div", {
1192
1202
  className: `chatbot-container ${o}`,
1193
- children: [o === "closed" && /* @__PURE__ */ T(tt, {
1203
+ children: [o === "closed" && /* @__PURE__ */ T(rt, {
1194
1204
  mode: o,
1195
1205
  setMode: s,
1196
1206
  dragPosition: c,
1197
1207
  setDragPosition: l,
1198
1208
  primaryColor: a.primaryColor
1199
- }), o !== "closed" && /* @__PURE__ */ T(Ht, {
1209
+ }), o !== "closed" && /* @__PURE__ */ T(Wt, {
1200
1210
  logoUrl: r,
1201
1211
  mode: o,
1202
1212
  setMode: s,
@@ -1208,18 +1218,19 @@ var Ve = x([Le], (e) => {
1208
1218
  setFullpageSize: m,
1209
1219
  chatKey: e,
1210
1220
  auth: t,
1221
+ workspace: i,
1211
1222
  ...a
1212
1223
  })]
1213
1224
  });
1214
- }, $e = () => {
1215
- let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = qe();
1216
- return e ? /* @__PURE__ */ T($t, {
1225
+ }, tt = () => {
1226
+ let { isOpen: e, files: t, initialIndex: n, closeViewer: r } = Ye();
1227
+ return e ? /* @__PURE__ */ T(tn, {
1217
1228
  isOpen: e,
1218
1229
  files: t,
1219
1230
  initialIndex: n,
1220
1231
  onClose: r
1221
1232
  }) : null;
1222
- }, et = (e) => {
1233
+ }, nt = (e) => {
1223
1234
  let t = f(null), [n, r] = p(null);
1224
1235
  return u(() => {
1225
1236
  let e = t.current;
@@ -1236,13 +1247,13 @@ var Ve = x([Le], (e) => {
1236
1247
  }
1237
1248
  r(i);
1238
1249
  }, []), /* @__PURE__ */ T(h, {
1239
- store: Ie,
1240
- children: /* @__PURE__ */ T(We, { children: /* @__PURE__ */ T(Ge, { children: /* @__PURE__ */ E("div", {
1250
+ store: Re,
1251
+ children: /* @__PURE__ */ T(Ke, { children: /* @__PURE__ */ T(qe, { children: /* @__PURE__ */ E("div", {
1241
1252
  ref: t,
1242
- children: [n && v(/* @__PURE__ */ T(Qe, { ...e }), n), n && v(/* @__PURE__ */ T($e, {}), n)]
1253
+ children: [n && v(/* @__PURE__ */ T(et, { ...e }), n), n && v(/* @__PURE__ */ T(tt, {}), n)]
1243
1254
  }) }) })
1244
1255
  });
1245
- }, tt = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
1256
+ }, rt = ({ mode: e, setMode: t, dragPosition: n, setDragPosition: r }) => {
1246
1257
  let [i, a] = p(!1), [o, s] = p({
1247
1258
  x: 0,
1248
1259
  y: 0
@@ -1329,7 +1340,7 @@ var Ve = x([Le], (e) => {
1329
1340
  children: t
1330
1341
  }));
1331
1342
  return u.displayName = e, u;
1332
- }, nt = Q("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
1343
+ }, it = Q("Online", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("g", {
1333
1344
  filter: "url(#filter0_d_4_4932)",
1334
1345
  children: /* @__PURE__ */ T("path", {
1335
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",
@@ -1381,7 +1392,7 @@ var Ve = x([Le], (e) => {
1381
1392
  result: "shape"
1382
1393
  })
1383
1394
  ]
1384
- }) })] })), rt = Q("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1395
+ }) })] })), at = Q("Owner", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1385
1396
  clipPath: "url(#clip0_4_9682)",
1386
1397
  children: [/* @__PURE__ */ T("path", {
1387
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",
@@ -1406,7 +1417,7 @@ var Ve = x([Le], (e) => {
1406
1417
  }) })] }), {
1407
1418
  viewBox: "0 0 14 14",
1408
1419
  sizeDefault: 14
1409
- }), it = Q("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1420
+ }), ot = Q("SaOneLogo", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1410
1421
  width: "22.4671",
1411
1422
  height: "22.4671",
1412
1423
  fill: "url(#pattern0_22_372)"
@@ -1428,7 +1439,7 @@ var Ve = x([Le], (e) => {
1428
1439
  })] })] }), {
1429
1440
  viewBox: "0 0 23 23",
1430
1441
  sizeDefault: 23
1431
- }), at = Q("MemberList", /* @__PURE__ */ E(w, { children: [
1442
+ }), st = Q("MemberList", /* @__PURE__ */ E(w, { children: [
1432
1443
  /* @__PURE__ */ T("path", {
1433
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",
1434
1445
  stroke: "currentColor",
@@ -1450,7 +1461,7 @@ var Ve = x([Le], (e) => {
1450
1461
  strokeLinecap: "round",
1451
1462
  strokeLinejoin: "round"
1452
1463
  })
1453
- ] }), { sizeDefault: 16 }), ot = Q("GroupList", /* @__PURE__ */ E(w, { children: [
1464
+ ] }), { sizeDefault: 16 }), ct = Q("GroupList", /* @__PURE__ */ E(w, { children: [
1454
1465
  /* @__PURE__ */ T("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1455
1466
  /* @__PURE__ */ T("circle", {
1456
1467
  cx: "9",
@@ -1464,12 +1475,12 @@ var Ve = x([Le], (e) => {
1464
1475
  viewBox: "0 0 24 24",
1465
1476
  strokeColorDefault: "currentColor",
1466
1477
  strokeWidthDefault: 2
1467
- }), st = Q("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
1478
+ }), lt = Q("Back", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M15 18l-6-6 6-6" }) }), {
1468
1479
  sizeDefault: 20,
1469
1480
  viewBox: "0 0 24 24",
1470
1481
  strokeColorDefault: "currentColor",
1471
1482
  strokeWidthDefault: 2
1472
- }), ct = Q("Mute", /* @__PURE__ */ E(w, { children: [
1483
+ }), ut = Q("Mute", /* @__PURE__ */ E(w, { children: [
1473
1484
  /* @__PURE__ */ T("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
1474
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" }),
1475
1486
  /* @__PURE__ */ T("path", { d: "m2 2 20 20" }),
@@ -1498,7 +1509,7 @@ Q("Call", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M22 1
1498
1509
  strokeColorDefault: "currentColor",
1499
1510
  strokeWidthDefault: 2
1500
1511
  });
1501
- var lt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1512
+ var dt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("rect", {
1502
1513
  x: "3",
1503
1514
  y: "3",
1504
1515
  width: "18",
@@ -1530,22 +1541,22 @@ var lt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1530
1541
  viewBox: "0 0 24 24",
1531
1542
  strokeColorDefault: "currentColor",
1532
1543
  strokeWidthDefault: 1.7
1533
- }), ut = Q("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
1544
+ }), ft = Q("Previous", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "15 18 9 12 15 6" }) }), {
1534
1545
  sizeDefault: 24,
1535
1546
  viewBox: "0 0 24 24",
1536
1547
  strokeColorDefault: "currentColor",
1537
1548
  strokeWidthDefault: 2
1538
- }), dt = Q("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
1549
+ }), pt = Q("Next", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("polyline", { points: "9 18 15 12 9 6" }) }), {
1539
1550
  sizeDefault: 24,
1540
1551
  viewBox: "0 0 24 24",
1541
1552
  strokeColorDefault: "currentColor",
1542
1553
  strokeWidthDefault: 2
1543
- }), ft = 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" }) }), {
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" }) }), {
1544
1555
  sizeDefault: 20,
1545
1556
  viewBox: "0 0 24 24",
1546
1557
  strokeColorDefault: "currentColor",
1547
1558
  strokeWidthDefault: 2
1548
- }), pt = Q("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1559
+ }), ht = Q("ConversationList", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("g", {
1549
1560
  clipPath: "url(#clip0_22_6147)",
1550
1561
  fill: "none",
1551
1562
  children: [/* @__PURE__ */ T("path", {
@@ -1571,7 +1582,7 @@ var lt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1571
1582
  sizeDefault: 20,
1572
1583
  viewBox: "0 0 20 20",
1573
1584
  strokeColorDefault: "currentColor"
1574
- }), mt = Q("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1585
+ }), gt = Q("Add", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1575
1586
  d: "M4.16675 10H15.8334",
1576
1587
  stroke: "currentColor",
1577
1588
  strokeWidth: "1.67",
@@ -1587,7 +1598,7 @@ var lt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1587
1598
  sizeDefault: 20,
1588
1599
  viewBox: "0 0 20 20",
1589
1600
  strokeColorDefault: "currentColor"
1590
- }), ht = Q("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1601
+ }), _t = Q("Search", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1591
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",
1592
1603
  stroke: "currentColor",
1593
1604
  strokeWidth: "1.67",
@@ -1603,7 +1614,7 @@ var lt = Q("OpenSidebar", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("r
1603
1614
  sizeDefault: 20,
1604
1615
  viewBox: "0 0 20 20",
1605
1616
  strokeColorDefault: "currentColor"
1606
- }), gt = Q("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1617
+ }), vt = Q("Setting", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1607
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",
1608
1619
  stroke: "currentColor",
1609
1620
  strokeWidth: "1.66667",
@@ -1626,7 +1637,7 @@ Q("Pin", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 1
1626
1637
  strokeColorDefault: "currentColor",
1627
1638
  strokeWidthDefault: 2
1628
1639
  });
1629
- var _t = Q("Help", /* @__PURE__ */ E(w, { children: [
1640
+ var yt = Q("Help", /* @__PURE__ */ E(w, { children: [
1630
1641
  /* @__PURE__ */ T("circle", {
1631
1642
  cx: "12",
1632
1643
  cy: "12",
@@ -1644,7 +1655,7 @@ var _t = Q("Help", /* @__PURE__ */ E(w, { children: [
1644
1655
  viewBox: "0 0 24 24",
1645
1656
  strokeColorDefault: "currentColor",
1646
1657
  strokeWidthDefault: 2
1647
- }), vt = Q("RemoveMember", /* @__PURE__ */ E(w, { children: [
1658
+ }), bt = Q("RemoveMember", /* @__PURE__ */ E(w, { children: [
1648
1659
  /* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
1649
1660
  /* @__PURE__ */ T("circle", {
1650
1661
  cx: "9",
@@ -1668,7 +1679,7 @@ var _t = Q("Help", /* @__PURE__ */ E(w, { children: [
1668
1679
  viewBox: "0 0 24 24",
1669
1680
  strokeColorDefault: "currentColor",
1670
1681
  strokeWidthDefault: 2
1671
- }), yt = 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", {
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", {
1672
1683
  cx: "16.5",
1673
1684
  cy: "7.5",
1674
1685
  r: ".5",
@@ -1678,7 +1689,7 @@ var _t = Q("Help", /* @__PURE__ */ E(w, { children: [
1678
1689
  viewBox: "0 0 24 24",
1679
1690
  strokeColorDefault: "currentColor",
1680
1691
  strokeWidthDefault: 2
1681
- }), bt = 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" })] }), {
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" })] }), {
1682
1693
  sizeDefault: 14,
1683
1694
  viewBox: "0 0 24 24",
1684
1695
  strokeColorDefault: "currentColor",
@@ -1690,7 +1701,7 @@ Q("Bell", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M10.
1690
1701
  strokeColorDefault: "currentColor",
1691
1702
  strokeWidthDefault: 2
1692
1703
  });
1693
- var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1704
+ var Ct = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1694
1705
  /* @__PURE__ */ T("path", { d: "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1695
1706
  /* @__PURE__ */ T("circle", {
1696
1707
  cx: "9",
@@ -1714,12 +1725,12 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1714
1725
  viewBox: "0 0 24 24",
1715
1726
  strokeColorDefault: "currentColor",
1716
1727
  strokeWidthDefault: 2
1717
- }), St = Q("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
1728
+ }), wt = Q("ArrowDown", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M6 9l6 6 6-6" }) }), {
1718
1729
  sizeDefault: 16,
1719
1730
  viewBox: "0 0 24 24",
1720
1731
  strokeColorDefault: "currentColor",
1721
1732
  strokeWidthDefault: 2
1722
- }), Ct = Q("More", /* @__PURE__ */ E(w, { children: [
1733
+ }), Tt = Q("More", /* @__PURE__ */ E(w, { children: [
1723
1734
  /* @__PURE__ */ T("circle", {
1724
1735
  cx: "12",
1725
1736
  cy: "12",
@@ -1741,12 +1752,12 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1741
1752
  strokeColorDefault: "currentColor",
1742
1753
  strokeWidthDefault: 2,
1743
1754
  strokeLinecapDefault: "round"
1744
- }), wt = Q("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
1755
+ }), Et = Q("Minimize", /* @__PURE__ */ T(w, { children: /* @__PURE__ */ T("path", { d: "M5 12h14" }) }), {
1745
1756
  sizeDefault: 14,
1746
1757
  viewBox: "0 0 24 24",
1747
1758
  strokeColorDefault: "currentColor",
1748
1759
  strokeWidthDefault: 2
1749
- }), Tt = Q("OpenFullPage", /* @__PURE__ */ E(w, { children: [
1760
+ }), Dt = Q("OpenFullPage", /* @__PURE__ */ E(w, { children: [
1750
1761
  /* @__PURE__ */ T("path", { d: "M15 3h6v6" }),
1751
1762
  /* @__PURE__ */ T("path", { d: "m21 3-7 7" }),
1752
1763
  /* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
@@ -1756,7 +1767,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1756
1767
  viewBox: "0 0 24 24",
1757
1768
  strokeColorDefault: "currentColor",
1758
1769
  strokeWidthDefault: 2
1759
- }), Et = Q("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
1770
+ }), Ot = Q("MinimizeFullPage", /* @__PURE__ */ E(w, { children: [
1760
1771
  /* @__PURE__ */ T("path", { d: "m14 10 7-7" }),
1761
1772
  /* @__PURE__ */ T("path", { d: "M20 10h-6V4" }),
1762
1773
  /* @__PURE__ */ T("path", { d: "m3 21 7-7" }),
@@ -1766,19 +1777,19 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1766
1777
  viewBox: "0 0 24 24",
1767
1778
  strokeColorDefault: "currentColor",
1768
1779
  strokeWidthDefault: 2
1769
- }), Dt = 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" })] }), {
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" })] }), {
1770
1781
  sizeDefault: 20,
1771
1782
  viewBox: "0 0 24 24",
1772
1783
  strokeColorDefault: "currentColor",
1773
1784
  strokeWidthDefault: 2
1774
- }), Ot = 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" }) }), {
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" }) }), {
1775
1786
  sizeDefault: 20,
1776
1787
  viewBox: "0 0 24 24",
1777
1788
  strokeColorDefault: "currentColor",
1778
1789
  strokeWidthDefault: 2,
1779
1790
  strokeLinecapDefault: "round",
1780
1791
  strokeLinejoinDefault: "round"
1781
- }), kt = Q("Image", /* @__PURE__ */ E(w, { children: [
1792
+ }), jt = Q("Image", /* @__PURE__ */ E(w, { children: [
1782
1793
  /* @__PURE__ */ T("rect", {
1783
1794
  width: "18",
1784
1795
  height: "18",
@@ -1800,7 +1811,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1800
1811
  strokeWidthDefault: 2,
1801
1812
  strokeLinecapDefault: "round",
1802
1813
  strokeLinejoinDefault: "round"
1803
- }), At = Q("Voice", /* @__PURE__ */ E(w, { children: [
1814
+ }), Mt = Q("Voice", /* @__PURE__ */ E(w, { children: [
1804
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" }),
1805
1816
  /* @__PURE__ */ T("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
1806
1817
  /* @__PURE__ */ T("line", {
@@ -1816,7 +1827,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1816
1827
  strokeWidthDefault: 2,
1817
1828
  strokeLinecapDefault: "round",
1818
1829
  strokeLinejoinDefault: "round"
1819
- }), jt = Q("Emoji", /* @__PURE__ */ E(w, { children: [
1830
+ }), Nt = Q("Emoji", /* @__PURE__ */ E(w, { children: [
1820
1831
  /* @__PURE__ */ T("circle", {
1821
1832
  cx: "12",
1822
1833
  cy: "12",
@@ -1842,7 +1853,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1842
1853
  strokeWidthDefault: 2,
1843
1854
  strokeLinecapDefault: "round",
1844
1855
  strokeLinejoinDefault: "round"
1845
- }), Mt = Q("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1856
+ }), Pt = Q("SendMessage", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("line", {
1846
1857
  x1: "22",
1847
1858
  y1: "2",
1848
1859
  x2: "11",
@@ -1854,27 +1865,27 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1854
1865
  strokeWidthDefault: 2,
1855
1866
  strokeLinecapDefault: "round",
1856
1867
  strokeLinejoinDefault: "round"
1857
- }), Nt = Q("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
1868
+ }), Ft = Q("SortASC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7-7 7 7" })] }), {
1858
1869
  sizeDefault: 16,
1859
1870
  viewBox: "0 0 24 24",
1860
1871
  strokeColorDefault: "currentColor",
1861
1872
  strokeWidthDefault: 2
1862
- }), Pt = Q("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
1873
+ }), It = Q("SortDESC", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", { d: "M12 5v14" }), /* @__PURE__ */ T("path", { d: "M5 12l7 7 7-7" })] }), {
1863
1874
  sizeDefault: 16,
1864
1875
  viewBox: "0 0 24 24",
1865
1876
  strokeColorDefault: "currentColor",
1866
1877
  strokeWidthDefault: 2
1867
- }), Ft = 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" })] }), {
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" })] }), {
1868
1879
  sizeDefault: 24,
1869
1880
  viewBox: "0 0 24 24",
1870
1881
  strokeColorDefault: "currentColor",
1871
1882
  strokeWidthDefault: 2
1872
- }), It = 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" }) }), {
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" }) }), {
1873
1884
  sizeDefault: 24,
1874
1885
  viewBox: "0 0 24 24",
1875
1886
  strokeColorDefault: "currentColor",
1876
1887
  strokeWidthDefault: 2
1877
- }), Lt = Q("DeleteMessage", /* @__PURE__ */ E(w, { children: [
1888
+ }), zt = Q("DeleteMessage", /* @__PURE__ */ E(w, { children: [
1878
1889
  /* @__PURE__ */ T("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
1879
1890
  /* @__PURE__ */ T("path", { d: "M3 6h18" }),
1880
1891
  /* @__PURE__ */ T("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
@@ -1883,25 +1894,25 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1883
1894
  viewBox: "0 0 24 24",
1884
1895
  strokeColorDefault: "currentColor",
1885
1896
  strokeWidthDefault: 2
1886
- }), Rt = 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" })] }), {
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" })] }), {
1887
1898
  sizeDefault: 24,
1888
1899
  viewBox: "0 0 24 24",
1889
1900
  strokeColorDefault: "currentColor",
1890
1901
  strokeWidthDefault: 2
1891
- }), zt = Q("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1902
+ }), Vt = Q("Seen", /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("path", {
1892
1903
  d: "M9 3L3.5 8.5L1 6",
1893
1904
  stroke: "#2B7FFF",
1894
- "stroke-linecap": "round",
1895
- "stroke-linejoin": "round"
1905
+ strokeLinecap: "round",
1906
+ strokeLinejoin: "round"
1896
1907
  }), /* @__PURE__ */ T("path", {
1897
1908
  d: "M11 5L7.25 8.75L6.5 8",
1898
1909
  stroke: "#2B7FFF",
1899
- "stroke-linecap": "round",
1900
- "stroke-linejoin": "round"
1910
+ strokeLinecap: "round",
1911
+ strokeLinejoin: "round"
1901
1912
  })] }), {
1902
1913
  sizeDefault: 12,
1903
1914
  viewBox: "0 0 12 12"
1904
- }), Bt = Q("language", /* @__PURE__ */ E(w, { children: [
1915
+ }), Ht = Q("language", /* @__PURE__ */ E(w, { children: [
1905
1916
  /* @__PURE__ */ T("circle", {
1906
1917
  cx: "12",
1907
1918
  cy: "12",
@@ -1916,7 +1927,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1916
1927
  strokeWidthDefault: 2,
1917
1928
  strokeLinecapDefault: "round",
1918
1929
  strokeLinejoinDefault: "round"
1919
- }), Vt = Q("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
1930
+ }), Ut = Q("ImagePlaceholder", /* @__PURE__ */ E(w, { children: [
1920
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" }),
1921
1932
  /* @__PURE__ */ T("path", { d: "m14 19.5 3-3 3 3" }),
1922
1933
  /* @__PURE__ */ T("path", { d: "M17 22v-5.5" }),
@@ -1929,23 +1940,23 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1929
1940
  sizeDefault: 20,
1930
1941
  viewBox: "0 0 24 24",
1931
1942
  strokeColorDefault: "currentColor"
1932
- }), Ht = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, primaryColor: i, dragPosition: o, setDragPosition: l, fullpagePosition: u, setFullpagePosition: m, fullpageSize: h = {
1943
+ }), Wt = ({ title: e = "Live Chat", logoUrl: t, mode: n, setMode: r, primaryColor: i, dragPosition: o, setDragPosition: l, fullpagePosition: u, setFullpagePosition: m, fullpageSize: h = {
1933
1944
  width: 1e3,
1934
1945
  height: 750
1935
1946
  }, setFullpageSize: v }) => {
1936
- let { t: y } = Z(), [b, x] = p(!1), [S, C] = p(!1), [D, k] = p(null), [ee, A] = p(!1), [j, te] = p(null), [M, N] = p(!1), [ne, P] = p(!1), [F, I] = p("chats"), [re, ie] = p("members"), { showToast: L, confirm: ae } = Xe(), [R, z] = p("all"), [oe, se] = p(!1), [ce, le] = p(!1), [ue, de] = p(null), [B, fe] = p({
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({
1937
1948
  mouseX: 0,
1938
1949
  mouseY: 0,
1939
1950
  baseW: 0,
1940
1951
  baseH: 0,
1941
1952
  baseX: 0,
1942
1953
  baseY: 0
1943
- }), [me, ge] = p({
1954
+ }), [de, fe] = p({
1944
1955
  x: 0,
1945
1956
  y: 0
1946
- }), _e = f(null), ve = f(null), [H, ye] = p(""), U = s(H), [be, xe] = p(!1), [Se, Ce] = p(!1), [we, Te] = p(!1), { hasGroupChat: Ee } = _(Ve), { isDragOver: De, handleDragEnter: Oe, handleDragOver: ke, handleDragLeave: Ae, handleDrop: je } = Je({ onFilesAdded: (e) => {
1947
- e && e.length > 0 && ve.current?.processPastedFiles(e);
1948
- } }), { currentChat: G, currentUser: K, members: q, currentChatMembers: Me, chats: J, totalMessagesUnread: Ne } = _((e) => e.chat);
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);
1949
1960
  c(() => {
1950
1961
  if (n === "fullpage" && !u && m && v) {
1951
1962
  let e = 1e3;
@@ -1963,12 +1974,12 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1963
1974
  m,
1964
1975
  v
1965
1976
  ]);
1966
- let { theme: Pe, primaryColor: Fe } = _((e) => e.setting), Y = g(), X = d(() => {
1967
- let e = U.toLowerCase().trim();
1977
+ let { theme: Ne, primaryColor: Pe } = _((e) => e.setting), J = g(), Y = d(() => {
1978
+ let e = H.toLowerCase().trim();
1968
1979
  if (!e) return {
1969
- filteredChat: J.filter((e) => {
1970
- if (R === "unread") {
1971
- let t = K?.id && e.new ? e.new[K.id] ?? 0 : 0;
1980
+ filteredChat: K.filter((e) => {
1981
+ if (L === "unread") {
1982
+ let t = W?.id && e.new ? e.new[W.id] ?? 0 : 0;
1972
1983
  return Number(t) > 0;
1973
1984
  }
1974
1985
  return !0;
@@ -1978,7 +1989,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1978
1989
  matchedFiles: [],
1979
1990
  totalMatchedFiles: 0
1980
1991
  };
1981
- let t = J.filter((t) => {
1992
+ let t = K.filter((t) => {
1982
1993
  let n = t.name?.toLowerCase().includes(e), r = t.members?.some((t) => t.name.toLowerCase().includes(e));
1983
1994
  return (n ?? !1) || (r ?? !1);
1984
1995
  }).map((t) => {
@@ -1987,10 +1998,10 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
1987
1998
  ...t,
1988
1999
  matchedMemberNames: n.map((e) => e.name)
1989
2000
  };
1990
- }), n = q.filter((t) => t.code === K?.code || ![t.name, t.code].some((t) => t.toLowerCase().includes(e)) ? !1 : !J.some((e) => e.type === "single" && e.members?.some((e) => e.code === t.code))), r = J.filter((t) => t.message?.content?.toLowerCase().includes(e)).map((e) => ({
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) => ({
1991
2002
  chat: e,
1992
2003
  message: e.message
1993
- })), i = J.filter((t) => t.message?.files?.some((t) => t.name.toLowerCase().includes(e))).map((t) => ({
2004
+ })), i = K.filter((t) => t.message?.files?.some((t) => t.name.toLowerCase().includes(e))).map((t) => ({
1994
2005
  chat: t,
1995
2006
  files: t.message?.files?.filter((t) => t.name.toLowerCase().includes(e)) ?? []
1996
2007
  }));
@@ -2002,71 +2013,63 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2002
2013
  totalMatchedFiles: i.reduce((e, t) => e + (t.files?.length ?? 0), 0)
2003
2014
  };
2004
2015
  }, [
2005
- J,
2006
- q,
2007
- U,
2008
- R,
2009
- K
2010
- ]), Ie = (e, t) => t.trim() ? /* @__PURE__ */ T(w, { children: e.split(RegExp(`(${t})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ T("span", {
2016
+ K,
2017
+ je,
2018
+ H,
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", {
2011
2022
  className: "highlight-match",
2012
2023
  children: e
2013
- }, n) : e) }) : e, Le = (e) => {
2024
+ }, n) : e) }) : e, Fe = (e) => {
2014
2025
  if (!e) return "#ffffff";
2015
2026
  let t = e.startsWith("#") ? e.slice(1) : e;
2016
2027
  if (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6) return "#ffffff";
2017
2028
  let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16);
2018
2029
  return (n * 299 + r * 587 + i * 114) / 1e3 > 180 ? "#1e293b" : "#ffffff";
2019
- }, Re = d(() => Le(Fe), [Fe]), ze = a((e) => {
2020
- ye(e), z("all"), xe(!1), Ce(!1), Te(!1);
2021
- }, [z]), Be = async (e, t) => {
2022
- if (t.stopPropagation(), await ae("Bạn có chắc chắn muốn xóa cuộc trò chuyện này?")) try {
2023
- await W.removeChat(Number(e)), Y(pe(J.filter((t) => t.id !== e))), G?.id === e && Y(V(null)), L("Đã xóa cuộc trò chuyện", "success");
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");
2024
2035
  } catch (e) {
2025
- console.error("Lỗi khi xóa chat:", e), L("Không thể xóa cuộc trò chuyện. Vui lòng thử lại!", "error");
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");
2026
2037
  }
2027
- }, He = (e) => {
2038
+ }, ze = (e) => {
2028
2039
  k(e), C(!0);
2029
- }, Ue = async (e, t, n) => {
2040
+ }, Be = async (e, t, n) => {
2030
2041
  try {
2031
- let r = await W.updateGroup(e, t, n);
2032
- r?.data && (Y(pe(J.map((t) => t.id === e ? {
2042
+ let r = await G.updateGroup(e, t, n);
2043
+ r?.data && (J(he(K.map((t) => t.id === e ? {
2033
2044
  ...t,
2034
2045
  ...r.data
2035
- } : t))), G?.id === e && Y(V({
2036
- ...G,
2046
+ } : t))), U?.id === e && J(V({
2047
+ ...U,
2037
2048
  ...r.data
2038
- })), C(!1), k(null), L("Cập nhật thông tin nhóm thành công!", "success"));
2039
- } catch (e) {
2040
- console.error("Lỗi khi cập nhật thông tin nhóm:", e), L("Không thể cập nhật thông tin nhóm. Vui lòng thử lại!", "error");
2041
- }
2042
- }, We = (e) => {
2043
- te(e), A(!0);
2044
- }, Ge = async (e, t) => {
2045
- try {
2046
- await W.addMember(e, t), L("Đã thêm thành viên vào nhóm thành công!", "success");
2047
- let n = await W.getMembers(e);
2048
- n?.data && Y(he(n.data));
2049
+ })), C(!1), k(null), F("Cập nhật thông tin nhóm thành công!", "success"));
2049
2050
  } catch (e) {
2050
- console.error("Lỗi khi thêm thành viên:", e), L("Không thể thêm thành viên. Vui lòng thử lại!", "error");
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");
2051
2052
  }
2052
- }, Ke = async (e, t) => {
2053
- if (await ae("Bạn có chắc chắn muốn xóa thành viên này ra khỏi nhóm?")) try {
2054
- await W.removeMember(e, t), Y(he(Me.filter((e) => String(e.id) !== String(t)))), String(t) === String(K?.id) ? (L("Bạn đã rời khỏi nhóm này", "success"), C(!1), k(null), Y(V(null)), Y(pe((await W.getChats()).data ?? []))) : L("Đã 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");
2055
2058
  } catch (e) {
2056
- console.error("Lỗi khi xóa thành viên:", e), L("Không thể xóa thành viên. Vui lòng thử lại!", "error");
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");
2057
2060
  }
2058
- }, qe = (e) => {
2061
+ }, We = (e) => {
2059
2062
  if (n !== "fullpage" || e.target.closest(".action-btn, .back-btn")) return;
2060
2063
  let t = e.currentTarget.parentElement?.getBoundingClientRect();
2061
- t && (se(!0), ge({
2064
+ t && (oe(!0), fe({
2062
2065
  x: e.clientX - t.left,
2063
2066
  y: e.clientY - t.top
2064
2067
  }), e.stopPropagation(), e.preventDefault());
2065
- }, Ye = (e, t) => {
2068
+ }, Ge = (e, t) => {
2066
2069
  if (n !== "fullpage") return;
2067
2070
  e.stopPropagation(), e.preventDefault();
2068
- let r = _e.current?.getBoundingClientRect();
2069
- r && (le(!0), de(t), fe({
2071
+ let r = pe.current?.getBoundingClientRect();
2072
+ r && (se(!0), le(t), ue({
2070
2073
  mouseX: e.clientX,
2071
2074
  mouseY: e.clientY,
2072
2075
  baseW: r.width,
@@ -2077,9 +2080,9 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2077
2080
  };
2078
2081
  c(() => {
2079
2082
  let e = (e) => {
2080
- if (ce && ue) {
2083
+ if (z && ce) {
2081
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;
2082
- switch (ue) {
2085
+ switch (ce) {
2083
2086
  case "ne":
2084
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);
2085
2088
  break;
@@ -2102,12 +2105,12 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2102
2105
  });
2103
2106
  return;
2104
2107
  }
2105
- if (!oe || !me) return;
2106
- let t = _e.current;
2108
+ if (!ae || !de) return;
2109
+ let t = pe.current;
2107
2110
  if (!t) return;
2108
- let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX - me.x;
2111
+ let r = t.getBoundingClientRect(), i = r.width, a = r.height, o = document.documentElement.clientWidth, s = document.documentElement.clientHeight, c = e.clientX - de.x;
2109
2112
  c < 0 && (c = 0), c + i > o && (c = o - i);
2110
- let u = e.clientY - me.y;
2113
+ let u = e.clientY - de.y;
2111
2114
  u < 0 && (u = 0), u + a > s && (u = s - a), n === "fullpage" ? m?.({
2112
2115
  x: c,
2113
2116
  y: u
@@ -2116,30 +2119,30 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2116
2119
  y: u
2117
2120
  });
2118
2121
  }, t = () => {
2119
- se(!1), le(!1), de(null);
2122
+ oe(!1), se(!1), le(null);
2120
2123
  };
2121
- return (oe || ce) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
2124
+ return (ae || z) && (document.addEventListener("mousemove", e), document.addEventListener("mouseup", t)), () => {
2122
2125
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
2123
2126
  };
2124
2127
  }, [
2125
- oe,
2128
+ ae,
2129
+ z,
2126
2130
  ce,
2127
- ue,
2128
- me,
2131
+ de,
2129
2132
  n,
2130
2133
  l,
2131
2134
  m,
2132
2135
  v,
2133
2136
  B
2134
2137
  ]);
2135
- let Ze = (() => {
2138
+ let Ke = (() => {
2136
2139
  if (!o || typeof document > "u") return null;
2137
2140
  let e = document.documentElement.clientWidth, t = document.documentElement.clientHeight, n = o.x, r = o.y;
2138
2141
  return n + 400 > e && (n = e - 400 - 20), n < 20 && (n = 20), r + 640 > t && (r = t - 640 - 20), r < 20 && (r = 20), {
2139
2142
  x: n,
2140
2143
  y: r
2141
2144
  };
2142
- })(), Qe = () => {
2145
+ })(), qe = () => {
2143
2146
  if (n === "popup") r("fullpage"), v?.({
2144
2147
  width: window.innerWidth,
2145
2148
  height: window.innerHeight
@@ -2163,20 +2166,20 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2163
2166
  x: 0,
2164
2167
  y: 0
2165
2168
  });
2166
- }, $e = a(async (e) => {
2169
+ }, Je = a(async (e) => {
2167
2170
  if (e) try {
2168
- let t = q.find((t) => String(t.id) === e);
2171
+ let t = je.find((t) => String(t.id) === e);
2169
2172
  if (t) {
2170
- let n = J.find((t) => t.type === "single" && t.members?.some((t) => String(t.id) === e));
2171
- if (n) Y(V(n));
2173
+ let n = K.find((t) => t.type === "single" && t.members?.some((t) => String(t.id) === e));
2174
+ if (n) J(V(n));
2172
2175
  else {
2173
- await W.setReceiver({
2176
+ await G.setReceiver({
2174
2177
  id: t.id,
2175
2178
  code: t.code,
2176
2179
  name: t.name
2177
2180
  });
2178
- let e = (await W.addChat(Number(t.id))).data;
2179
- e && Y(V(e));
2181
+ let e = (await G.addChat(Number(t.id))).data;
2182
+ e && J(V(e));
2180
2183
  }
2181
2184
  }
2182
2185
  x(!1);
@@ -2184,13 +2187,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2184
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.");
2185
2188
  }
2186
2189
  }, [
2187
- J,
2188
- q,
2189
- Y
2190
+ K,
2191
+ je,
2192
+ J
2190
2193
  ]);
2191
2194
  return /* @__PURE__ */ E("div", {
2192
- ref: _e,
2193
- className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${Pe === "dark" ? "dark-theme" : ""}`,
2195
+ ref: pe,
2196
+ className: `chat-window ${n === "fullpage" ? "fullpage" : ""} ${Ne === "dark" ? "dark-theme" : ""}`,
2194
2197
  style: n === "fullpage" ? {
2195
2198
  position: "fixed",
2196
2199
  left: u ? `${u.x}px` : `${(window.innerWidth - h.width) / 2}px`,
@@ -2198,46 +2201,46 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2198
2201
  width: `${h.width}px`,
2199
2202
  height: `${h.height}px`,
2200
2203
  borderRadius: h.width >= window.innerWidth && u?.x === 0 && u?.y === 0 ? 0 : "14px",
2201
- "--primary": Fe,
2202
- "--primary-contrast": Re
2203
- } : n === "popup" && Ze ? {
2204
+ "--primary": Pe,
2205
+ "--primary-contrast": Ie
2206
+ } : n === "popup" && Ke ? {
2204
2207
  position: "fixed",
2205
- left: `${Ze.x}px`,
2206
- top: `${Ze.y}px`,
2207
- "--primary": Fe,
2208
- "--primary-contrast": Re
2208
+ left: `${Ke.x}px`,
2209
+ top: `${Ke.y}px`,
2210
+ "--primary": Pe,
2211
+ "--primary-contrast": Ie
2209
2212
  } : {
2210
- "--primary": Fe,
2211
- "--primary-contrast": Re
2213
+ "--primary": Pe,
2214
+ "--primary-contrast": Ie
2212
2215
  },
2213
2216
  children: [
2214
2217
  n === "fullpage" && /* @__PURE__ */ E(w, { children: [
2215
2218
  /* @__PURE__ */ T("div", {
2216
- onMouseDown: (e) => Ye(e, "ne"),
2219
+ onMouseDown: (e) => Ge(e, "ne"),
2217
2220
  className: "resize-handle ne"
2218
2221
  }),
2219
2222
  /* @__PURE__ */ T("div", {
2220
- onMouseDown: (e) => Ye(e, "nw"),
2223
+ onMouseDown: (e) => Ge(e, "nw"),
2221
2224
  className: "resize-handle nw"
2222
2225
  }),
2223
2226
  /* @__PURE__ */ T("div", {
2224
- onMouseDown: (e) => Ye(e, "se"),
2227
+ onMouseDown: (e) => Ge(e, "se"),
2225
2228
  className: "resize-handle se"
2226
2229
  }),
2227
2230
  /* @__PURE__ */ T("div", {
2228
- onMouseDown: (e) => Ye(e, "sw"),
2231
+ onMouseDown: (e) => Ge(e, "sw"),
2229
2232
  className: "resize-handle sw"
2230
2233
  })
2231
2234
  ] }),
2232
2235
  /* @__PURE__ */ T("div", {
2233
- onMouseDown: qe,
2234
- onDoubleClick: Qe,
2236
+ onMouseDown: We,
2237
+ onDoubleClick: qe,
2235
2238
  style: { cursor: n === "fullpage" ? "move" : "default" },
2236
- children: /* @__PURE__ */ T(ln, {
2239
+ children: /* @__PURE__ */ T(dn, {
2237
2240
  mode: n,
2238
2241
  title: e,
2239
2242
  logoUrl: t,
2240
- onBack: () => Y(V(null)),
2243
+ onBack: () => J(V(null)),
2241
2244
  onToggleMode: () => {
2242
2245
  if (n === "popup" && !u) {
2243
2246
  let e = 1e3;
@@ -2252,74 +2255,73 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2252
2255
  r(n === "popup" ? "fullpage" : "popup");
2253
2256
  },
2254
2257
  onClose: () => r("closed"),
2255
- onAddMemberClick: () => G && We(G),
2256
- onOpenSettings: () => P(!0)
2258
+ onAddMemberClick: () => U && Ve(),
2259
+ onOpenSettings: () => N(!0)
2257
2260
  })
2258
2261
  }),
2259
2262
  /* @__PURE__ */ E("div", {
2260
2263
  className: "chat-main-layout",
2261
- children: [n === "fullpage" && K && /* @__PURE__ */ T(sn, {
2262
- setIsThemeModalOpen: P,
2263
- currentUser: K,
2264
- activeTab: F,
2265
- setActiveTab: I
2264
+ children: [n === "fullpage" && W && /* @__PURE__ */ T(ln, {
2265
+ setIsThemeModalOpen: N,
2266
+ activeTab: ne,
2267
+ setActiveTab: P
2266
2268
  }), /* @__PURE__ */ E("div", {
2267
2269
  className: "chat-body-container",
2268
2270
  children: [
2269
- (n === "fullpage" || !G) && /* @__PURE__ */ T("div", {
2271
+ (n === "fullpage" || !U) && /* @__PURE__ */ T("div", {
2270
2272
  className: `chat-sidebar ${n === "fullpage" ? "is-full" : ""}`,
2271
- children: F === "chats" ? /* @__PURE__ */ E(w, { children: [
2272
- /* @__PURE__ */ T(on, {
2273
- value: H,
2274
- onChange: ze,
2273
+ children: ne === "chats" ? /* @__PURE__ */ E(w, { children: [
2274
+ /* @__PURE__ */ T(cn, {
2275
+ value: ge,
2276
+ onChange: Le,
2275
2277
  onAddClick: () => x(!0),
2276
2278
  placeholder: y("chatWindow.searchPlaceholder")
2277
2279
  }),
2278
2280
  /* @__PURE__ */ T("div", {
2279
2281
  className: "chat-filter-tabs",
2280
- children: H ? /* @__PURE__ */ E(w, { children: [
2282
+ children: ge ? /* @__PURE__ */ E(w, { children: [
2281
2283
  /* @__PURE__ */ T("button", {
2282
- className: R === "all" ? "active" : "",
2283
- onClick: () => z("all"),
2284
+ className: L === "all" ? "active" : "",
2285
+ onClick: () => R("all"),
2284
2286
  children: "Tất cả"
2285
2287
  }),
2286
2288
  /* @__PURE__ */ T("button", {
2287
- className: R === "member" ? "active" : "",
2288
- onClick: () => z("member"),
2289
+ className: L === "member" ? "active" : "",
2290
+ onClick: () => R("member"),
2289
2291
  children: "Thành viên"
2290
2292
  }),
2291
2293
  /* @__PURE__ */ T("button", {
2292
- className: R === "message" ? "active" : "",
2293
- onClick: () => z("message"),
2294
+ className: L === "message" ? "active" : "",
2295
+ onClick: () => R("message"),
2294
2296
  children: "Tin nhắn"
2295
2297
  }),
2296
2298
  /* @__PURE__ */ T("button", {
2297
- className: R === "file" ? "active" : "",
2298
- onClick: () => z("file"),
2299
+ className: L === "file" ? "active" : "",
2300
+ onClick: () => R("file"),
2299
2301
  children: "File"
2300
2302
  })
2301
2303
  ] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
2302
- className: R === "all" ? "active" : "",
2303
- onClick: () => z("all"),
2304
+ className: L === "all" ? "active" : "",
2305
+ onClick: () => R("all"),
2304
2306
  children: y("chatWindow.filterAll") || "Tất cả"
2305
2307
  }), /* @__PURE__ */ T("button", {
2306
- className: R === "unread" ? "active" : "",
2307
- onClick: () => z("unread"),
2308
+ className: L === "unread" ? "active" : "",
2309
+ onClick: () => R("unread"),
2308
2310
  children: /* @__PURE__ */ E("div", {
2309
2311
  className: "filter-unread-badge-container",
2310
- children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), Ne > 0 && /* @__PURE__ */ T("span", {
2312
+ children: [/* @__PURE__ */ T("span", { children: "Chưa đọc" }), q > 0 && /* @__PURE__ */ T("span", {
2311
2313
  className: "filter-unread-badge",
2312
- children: Ne
2314
+ children: q
2313
2315
  })]
2314
2316
  })
2315
2317
  })] })
2316
2318
  }),
2317
2319
  /* @__PURE__ */ T("div", {
2318
2320
  className: "sidebar-scroll",
2319
- children: H ? /* @__PURE__ */ E("div", {
2321
+ children: ge ? /* @__PURE__ */ E("div", {
2320
2322
  className: "chat-search-results",
2321
2323
  children: [
2322
- (R === "all" || R === "member") && /* @__PURE__ */ E("div", {
2324
+ (L === "all" || L === "member") && /* @__PURE__ */ E("div", {
2323
2325
  className: "search-section",
2324
2326
  children: [
2325
2327
  /* @__PURE__ */ T("h3", {
@@ -2328,33 +2330,33 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2328
2330
  }),
2329
2331
  /* @__PURE__ */ E("div", {
2330
2332
  className: "search-section-content",
2331
- children: [X.filteredChat.slice(0, be ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
2333
+ children: [Y.filteredChat.slice(0, ye ? void 0 : 4).map((e) => /* @__PURE__ */ E("div", {
2332
2334
  className: "search-result-item",
2333
- onClick: () => Y(V(e)),
2335
+ onClick: () => J(V(e)),
2334
2336
  children: [/* @__PURE__ */ T("div", {
2335
2337
  className: "search-result-avatar",
2336
- children: /* @__PURE__ */ T(Ut, {
2338
+ children: /* @__PURE__ */ T(Gt, {
2337
2339
  chat: e,
2338
- currentUserId: K?.id
2340
+ currentUserId: W?.id
2339
2341
  })
2340
2342
  }), /* @__PURE__ */ E("div", {
2341
2343
  className: "search-result-info",
2342
2344
  children: [/* @__PURE__ */ T("div", {
2343
2345
  className: "search-result-name",
2344
- children: Ie(O(e, K?.id), U)
2346
+ children: X(O(e, W?.id), H)
2345
2347
  }), e.type === "group" && /* @__PURE__ */ E("div", {
2346
2348
  className: "search-result-sub",
2347
2349
  children: [
2348
2350
  "Thành viên:",
2349
2351
  " ",
2350
- e.matchedMemberNames && e.matchedMemberNames.length > 0 ? Ie(e.matchedMemberNames.join(", "), U) : Ie(U, U)
2352
+ e.matchedMemberNames && e.matchedMemberNames.length > 0 ? X(e.matchedMemberNames.join(", "), H) : X(H, H)
2351
2353
  ]
2352
2354
  })]
2353
2355
  })]
2354
- }, `chat-${e.id}`)), X.matchedMembers.slice(0, be ? void 0 : Math.max(0, 4 - X.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
2356
+ }, `chat-${e.id}`)), Y.matchedMembers.slice(0, ye ? void 0 : Math.max(0, 4 - Y.filteredChat.length)).map((e) => /* @__PURE__ */ E("div", {
2355
2357
  className: "search-result-item",
2356
2358
  onClick: () => {
2357
- $e(String(e.id));
2359
+ Je(String(e.id));
2358
2360
  },
2359
2361
  children: [/* @__PURE__ */ T("div", {
2360
2362
  className: "search-result-avatar",
@@ -2369,19 +2371,19 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2369
2371
  className: "search-result-info",
2370
2372
  children: /* @__PURE__ */ T("div", {
2371
2373
  className: "search-result-name",
2372
- children: Ie(e.name, U)
2374
+ children: X(e.name, H)
2373
2375
  })
2374
2376
  })]
2375
2377
  }, `member-${e.code}`))]
2376
2378
  }),
2377
- !be && X.filteredChat.length + X.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
2379
+ !ye && Y.filteredChat.length + Y.matchedMembers.length > 4 && /* @__PURE__ */ T("button", {
2378
2380
  className: "search-view-all",
2379
- onClick: () => xe(!0),
2381
+ onClick: () => be(!0),
2380
2382
  children: "Xem tất cả thành viên"
2381
2383
  })
2382
2384
  ]
2383
2385
  }),
2384
- (R === "all" || R === "message") && X.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
2386
+ (L === "all" || L === "message") && Y.matchedMessages.length > 0 && /* @__PURE__ */ E("div", {
2385
2387
  className: "search-section",
2386
2388
  children: [
2387
2389
  /* @__PURE__ */ E("h3", {
@@ -2391,20 +2393,20 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2391
2393
  " ",
2392
2394
  /* @__PURE__ */ E("span", {
2393
2395
  className: "search-count",
2394
- children: ["+", X.matchedMessages.length]
2396
+ children: ["+", Y.matchedMessages.length]
2395
2397
  })
2396
2398
  ]
2397
2399
  }),
2398
2400
  /* @__PURE__ */ T("div", {
2399
2401
  className: "search-section-content",
2400
- children: X.matchedMessages.slice(0, Se ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
2402
+ children: Y.matchedMessages.slice(0, xe ? void 0 : 3).map((e, t) => /* @__PURE__ */ E("div", {
2401
2403
  className: "search-result-item message-result",
2402
- onClick: () => Y(V(e.chat)),
2404
+ onClick: () => J(V(e.chat)),
2403
2405
  children: [/* @__PURE__ */ T("div", {
2404
2406
  className: "search-result-avatar",
2405
- children: /* @__PURE__ */ T(Ut, {
2407
+ children: /* @__PURE__ */ T(Gt, {
2406
2408
  chat: e.chat,
2407
- currentUserId: K?.id
2409
+ currentUserId: W?.id
2408
2410
  })
2409
2411
  }), /* @__PURE__ */ E("div", {
2410
2412
  className: "search-result-info",
@@ -2412,26 +2414,26 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2412
2414
  className: "search-result-top",
2413
2415
  children: [/* @__PURE__ */ T("span", {
2414
2416
  className: "search-result-name",
2415
- children: O(e.chat, K?.id)
2417
+ children: O(e.chat, W?.id)
2416
2418
  }), /* @__PURE__ */ T("span", {
2417
2419
  className: "search-result-date",
2418
2420
  children: e.message?.date
2419
2421
  })]
2420
2422
  }), /* @__PURE__ */ T("div", {
2421
2423
  className: "search-result-text",
2422
- children: Ie(e.message?.content ?? "", U)
2424
+ children: X(e.message?.content ?? "", H)
2423
2425
  })]
2424
2426
  })]
2425
2427
  }, `msg-${t}`))
2426
2428
  }),
2427
- !Se && X.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
2429
+ !xe && Y.matchedMessages.length > 3 && /* @__PURE__ */ T("button", {
2428
2430
  className: "search-view-all",
2429
- onClick: () => Ce(!0),
2431
+ onClick: () => Se(!0),
2430
2432
  children: "Xem tất cả tin nhắn"
2431
2433
  })
2432
2434
  ]
2433
2435
  }),
2434
- (R === "all" || R === "file") && X.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
2436
+ (L === "all" || L === "file") && Y.matchedFiles.length > 0 && /* @__PURE__ */ E("div", {
2435
2437
  className: "search-section",
2436
2438
  children: [
2437
2439
  /* @__PURE__ */ E("h3", {
@@ -2441,15 +2443,15 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2441
2443
  " ",
2442
2444
  /* @__PURE__ */ T("span", {
2443
2445
  className: "search-count",
2444
- children: X.totalMatchedFiles
2446
+ children: Y.totalMatchedFiles
2445
2447
  })
2446
2448
  ]
2447
2449
  }),
2448
2450
  /* @__PURE__ */ T("div", {
2449
2451
  className: "search-section-content",
2450
- children: X.matchedFiles.slice(0, we ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
2452
+ children: Y.matchedFiles.slice(0, Ce ? void 0 : 3).map((e, t) => e.files.map((n, r) => /* @__PURE__ */ E("div", {
2451
2453
  className: "search-result-item file-result",
2452
- onClick: () => Y(V(e.chat)),
2454
+ onClick: () => J(V(e.chat)),
2453
2455
  children: [/* @__PURE__ */ T("div", {
2454
2456
  className: "file-icon-wrapper",
2455
2457
  children: /* @__PURE__ */ T("i", { className: "fas fa-file-alt" })
@@ -2469,23 +2471,22 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2469
2471
  })]
2470
2472
  }, `file-${t}-${r}`)))
2471
2473
  }),
2472
- !we && X.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
2474
+ !Ce && Y.totalMatchedFiles > 3 && /* @__PURE__ */ T("button", {
2473
2475
  className: "search-view-all",
2474
- onClick: () => Te(!0),
2476
+ onClick: () => we(!0),
2475
2477
  children: "Xem tất cả file"
2476
2478
  })
2477
2479
  ]
2478
2480
  })
2479
2481
  ]
2480
- }) : /* @__PURE__ */ T(an, {
2481
- chats: X.filteredChat,
2482
- selectedChat: G ?? null,
2482
+ }) : /* @__PURE__ */ T(sn, {
2483
+ chats: Y.filteredChat,
2483
2484
  onSelectChat: (e) => {
2484
- Y(V(e)), K?.id && e.new?.[K.id] > 0 && W.readChat(e.id);
2485
+ J(V(e)), W?.id && e.new?.[W.id] > 0 && G.readChat(e.id);
2485
2486
  },
2486
- onRemoveChat: (e, t) => void Be(e, t),
2487
- onUpdateGroup: He,
2488
- onAddMemberClick: We
2487
+ onRemoveChat: (e, t) => void Re(e, t),
2488
+ onUpdateGroup: ze,
2489
+ onAddMemberClick: Ve
2489
2490
  })
2490
2491
  })
2491
2492
  ] }) : /* @__PURE__ */ E("div", {
@@ -2494,34 +2495,34 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2494
2495
  className: `category-item ${re === "members" ? "active" : ""}`,
2495
2496
  onClick: () => ie("members"),
2496
2497
  children: [
2497
- /* @__PURE__ */ T(at, {}),
2498
+ /* @__PURE__ */ T(st, {}),
2498
2499
  /* @__PURE__ */ T("span", { children: "Danh sách thành viên" }),
2499
2500
  /* @__PURE__ */ T("span", {
2500
2501
  className: "count",
2501
- children: q.length
2502
+ children: je.length
2502
2503
  })
2503
2504
  ]
2504
- }), Ee && /* @__PURE__ */ E("div", {
2505
+ }), Te && /* @__PURE__ */ E("div", {
2505
2506
  className: `category-item ${re === "groups" ? "active" : ""}`,
2506
2507
  onClick: () => ie("groups"),
2507
2508
  children: [
2508
- /* @__PURE__ */ T(ot, {}),
2509
+ /* @__PURE__ */ T(ct, {}),
2509
2510
  /* @__PURE__ */ T("span", { children: "Danh sách nhóm" }),
2510
2511
  /* @__PURE__ */ T("span", {
2511
2512
  className: "count",
2512
- children: J.filter((e) => e.type === "group").length
2513
+ children: K.filter((e) => e.type === "group").length
2513
2514
  })
2514
2515
  ]
2515
2516
  })]
2516
2517
  })
2517
2518
  }),
2518
- (n === "fullpage" || G) && /* @__PURE__ */ E("div", {
2519
+ (n === "fullpage" || U) && /* @__PURE__ */ E("div", {
2519
2520
  className: "chat-main",
2520
- onDragEnter: Oe,
2521
- onDragOver: ke,
2522
- onDragLeave: Ae,
2523
- onDrop: je,
2524
- children: [De && /* @__PURE__ */ T("div", {
2521
+ onDragEnter: De,
2522
+ onDragOver: Oe,
2523
+ onDragLeave: ke,
2524
+ onDrop: Ae,
2525
+ children: [Ee && /* @__PURE__ */ T("div", {
2525
2526
  className: "drag-overlay-full",
2526
2527
  children: /* @__PURE__ */ E("div", {
2527
2528
  className: "drag-content",
@@ -2533,7 +2534,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2533
2534
  children: y("chatWindow.dragFile")
2534
2535
  })]
2535
2536
  })
2536
- }), F === "chats" ? G ? /* @__PURE__ */ E(w, { children: [
2537
+ }), ne === "chats" ? U ? /* @__PURE__ */ E(w, { children: [
2537
2538
  /* @__PURE__ */ E("div", {
2538
2539
  className: "chat-main-header",
2539
2540
  children: [/* @__PURE__ */ E("div", {
@@ -2541,14 +2542,14 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2541
2542
  children: [
2542
2543
  n === "popup" && /* @__PURE__ */ T("button", {
2543
2544
  className: "back-btn",
2544
- onClick: () => Y(V(null)),
2545
- children: /* @__PURE__ */ T(st, {})
2545
+ onClick: () => J(V(null)),
2546
+ children: /* @__PURE__ */ T(lt, {})
2546
2547
  }),
2547
2548
  /* @__PURE__ */ T("div", {
2548
2549
  className: "chat-main-avatar",
2549
- children: /* @__PURE__ */ T(Ut, {
2550
- chat: G,
2551
- currentUserId: K?.id
2550
+ children: /* @__PURE__ */ T(Gt, {
2551
+ chat: U,
2552
+ currentUserId: W?.id
2552
2553
  })
2553
2554
  }),
2554
2555
  /* @__PURE__ */ E("div", {
@@ -2557,11 +2558,11 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2557
2558
  className: "chat-main-text-container",
2558
2559
  children: [/* @__PURE__ */ T("span", {
2559
2560
  className: "chat-main-name",
2560
- children: O(G, K?.id)
2561
- }), G.is_muted && /* @__PURE__ */ T(ct, {})]
2561
+ children: O(U, W?.id)
2562
+ }), U.is_muted && /* @__PURE__ */ T(ut, {})]
2562
2563
  }), /* @__PURE__ */ T("span", {
2563
2564
  className: "chat-main-status",
2564
- children: G.type === "single" ? (Me.find((e) => e.id !== K?.id)?.socket_ids?.length ?? 0) > 0 ? "Đang hoạt động" : "Không hoạt động" : `${Me.length ?? 0} thành viên`
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`
2565
2566
  })]
2566
2567
  })
2567
2568
  ]
@@ -2569,16 +2570,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2569
2570
  className: "chat-main-actions",
2570
2571
  children: /* @__PURE__ */ T("button", {
2571
2572
  className: `main-action-btn ${M ? "active" : ""}`,
2572
- onClick: () => N(!M),
2573
- children: /* @__PURE__ */ T(lt, {})
2573
+ onClick: () => ee(!M),
2574
+ children: /* @__PURE__ */ T(dt, {})
2574
2575
  })
2575
2576
  })]
2576
2577
  }),
2577
- /* @__PURE__ */ T(yn, {}),
2578
- /* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(un, {
2579
- ref: ve,
2580
- primaryColor: i
2581
- }) })
2578
+ /* @__PURE__ */ T(xn, {}),
2579
+ /* @__PURE__ */ T("div", { children: /* @__PURE__ */ T(fn, { ref: me }) })
2582
2580
  ] }) : /* @__PURE__ */ E("div", {
2583
2581
  className: "empty-chat-state",
2584
2582
  children: [
@@ -2589,64 +2587,52 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2589
2587
  /* @__PURE__ */ T("h3", { children: y("chatWindow.selectChat") }),
2590
2588
  /* @__PURE__ */ T("p", { children: y("chatWindow.startConversation") })
2591
2589
  ]
2592
- }) : /* @__PURE__ */ T(w, { children: re === "members" ? /* @__PURE__ */ T(pn, {
2593
- members: q,
2594
- onMessageClick: (e) => {
2595
- $e(e), I("chats");
2596
- }
2597
- }) : /* @__PURE__ */ T(mn, {
2598
- groups: J.filter((e) => e.type === "group"),
2599
- currentUserId: K?.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,
2600
2595
  onGroupClick: (e) => {
2601
- Y(V(e)), I("chats");
2596
+ J(V(e)), P("chats");
2602
2597
  }
2603
2598
  }) })]
2604
2599
  }),
2605
- n === "fullpage" && F === "chats" && G && M && /* @__PURE__ */ T(cn, {
2606
- currentUser: K,
2607
- onClose: () => N(!1),
2608
- onAddMember: () => We(G),
2609
- onUpdateGroup: He,
2600
+ n === "fullpage" && ne === "chats" && U && M && /* @__PURE__ */ T(un, {
2601
+ onClose: () => ee(!1),
2602
+ onAddMember: () => Ve(),
2603
+ onUpdateGroup: ze,
2610
2604
  onRemoveMember: (e, t) => {
2611
- Ke(e, t);
2605
+ He(e, t);
2612
2606
  }
2613
2607
  })
2614
2608
  ]
2615
2609
  })]
2616
2610
  }),
2617
- b && /* @__PURE__ */ T(nn, { onClose: () => {
2611
+ b && /* @__PURE__ */ T(an, { onClose: () => {
2618
2612
  x(!1);
2619
2613
  } }),
2620
- /* @__PURE__ */ T(Kt, {
2614
+ /* @__PURE__ */ T(Jt, {
2621
2615
  isOpen: S,
2622
2616
  onClose: () => {
2623
2617
  C(!1), k(null);
2624
2618
  },
2625
2619
  group: D,
2626
- onUpdate: Ue,
2627
- removeMember: Ke,
2620
+ onUpdate: Be,
2621
+ removeMember: He,
2628
2622
  primaryColor: i
2629
2623
  }),
2630
- /* @__PURE__ */ T(qt, {
2631
- isOpen: ee,
2632
- onClose: () => {
2633
- A(!1), te(null);
2634
- },
2635
- group: j,
2636
- members: q,
2637
- currentChatMembers: Me,
2638
- onAddMember: Ge,
2639
- primaryColor: i
2640
- }),
2641
- /* @__PURE__ */ T(tn, {
2642
- isOpen: ne,
2643
- onClose: () => P(!1),
2624
+ A && /* @__PURE__ */ T(Yt, { onClose: () => {
2625
+ j(!1);
2626
+ } }),
2627
+ /* @__PURE__ */ T(rn, {
2628
+ isOpen: te,
2629
+ onClose: () => N(!1),
2644
2630
  defaultColor: "#ffffff"
2645
2631
  }),
2646
- /* @__PURE__ */ T(Wt, {})
2632
+ /* @__PURE__ */ T(Kt, {})
2647
2633
  ]
2648
2634
  });
2649
- }, Ut = i(({ chat: e, currentUserId: t }) => {
2635
+ }, Gt = i(({ chat: e, currentUserId: t }) => {
2650
2636
  let n = d(() => e ? e.avatar ? e.avatar : e.type === "group" ? "👥" : e.members?.find((e) => e.id !== t)?.avatar ?? "👤" : "👤", [e, t]);
2651
2637
  return n === "👥" || n === "👤" ? /* @__PURE__ */ T("div", {
2652
2638
  style: {
@@ -2670,8 +2656,8 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2670
2656
  borderRadius: "100%"
2671
2657
  }
2672
2658
  });
2673
- }), Wt = () => {
2674
- let { toasts: e, removeToast: t } = Xe(), { theme: n } = _((e) => e.setting);
2659
+ }), Kt = () => {
2660
+ let { toasts: e, removeToast: t } = Qe(), { theme: n } = _((e) => e.setting);
2675
2661
  return /* @__PURE__ */ T("div", {
2676
2662
  className: `toast-container ${n === "dark" ? "dark-theme" : ""}`,
2677
2663
  children: e.map((e) => /* @__PURE__ */ E("div", {
@@ -2728,7 +2714,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2728
2714
  ]
2729
2715
  }, e.id))
2730
2716
  });
2731
- }, Gt = ({ member: e }) => {
2717
+ }, qt = ({ member: e }) => {
2732
2718
  let [t, n] = p(!1), r = e.name?.charAt(0).toUpperCase() || "?";
2733
2719
  if (e.avatar && !t) return /* @__PURE__ */ T("img", {
2734
2720
  src: e.avatar,
@@ -2749,7 +2735,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2749
2735
  style: { backgroundColor: i[(String(e.id)?.charCodeAt(0) || 0) % i.length] },
2750
2736
  children: r
2751
2737
  });
2752
- }, Kt = ({ isOpen: e, onClose: t, group: n, onUpdate: r, removeMember: i, primaryColor: a }) => {
2738
+ }, Jt = ({ isOpen: e, onClose: t, group: n, onUpdate: r, removeMember: i, primaryColor: a }) => {
2753
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);
2754
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));
2755
2741
  let { t: S } = Z();
@@ -2771,7 +2757,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2771
2757
  className: "modal-overlay",
2772
2758
  onClick: t,
2773
2759
  children: /* @__PURE__ */ E("div", {
2774
- className: "modal-content add-chat-modal",
2760
+ className: "modal-content update-group-modal",
2775
2761
  onClick: (e) => e.stopPropagation(),
2776
2762
  children: [
2777
2763
  /* @__PURE__ */ E("div", {
@@ -2791,7 +2777,6 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2791
2777
  className: "group-info-section",
2792
2778
  children: [/* @__PURE__ */ E("label", {
2793
2779
  className: "group-avatar-upload",
2794
- style: { cursor: "pointer" },
2795
2780
  children: [/* @__PURE__ */ T("input", {
2796
2781
  type: "file",
2797
2782
  accept: "image/*",
@@ -2804,19 +2789,12 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2804
2789
  d(e.target?.result);
2805
2790
  }, e.readAsDataURL(t);
2806
2791
  }
2807
- },
2808
- style: { display: "none" }
2792
+ }
2809
2793
  }), /* @__PURE__ */ T("div", {
2810
2794
  className: "avatar-placeholder",
2811
2795
  children: u ? /* @__PURE__ */ T("img", {
2812
2796
  src: u,
2813
- alt: "Preview",
2814
- style: {
2815
- width: "100%",
2816
- height: "100%",
2817
- borderRadius: "50%",
2818
- objectFit: "cover"
2819
- }
2797
+ alt: "Preview"
2820
2798
  }) : /* @__PURE__ */ E("svg", {
2821
2799
  xmlns: "http://www.w3.org/2000/svg",
2822
2800
  width: "20",
@@ -2846,13 +2824,8 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2846
2824
  })]
2847
2825
  }), /* @__PURE__ */ E("div", {
2848
2826
  className: "members-section",
2849
- style: { marginTop: "8px" },
2850
2827
  children: [/* @__PURE__ */ E("span", {
2851
2828
  className: "section-title",
2852
- style: {
2853
- paddingLeft: "0",
2854
- display: "block"
2855
- },
2856
2829
  children: [
2857
2830
  S("updateGroup.membersSection"),
2858
2831
  " (",
@@ -2861,73 +2834,39 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2861
2834
  ]
2862
2835
  }), /* @__PURE__ */ T("div", {
2863
2836
  className: "members-list-container",
2864
- style: {
2865
- borderTop: "none",
2866
- height: "240px"
2867
- },
2868
2837
  children: /* @__PURE__ */ T("div", {
2869
2838
  className: "members-list",
2870
2839
  children: b.map((e) => {
2871
2840
  let t = e.id === n.owner_id, r = e.id === x?.id;
2872
2841
  return /* @__PURE__ */ E("div", {
2873
2842
  className: "member-item",
2874
- style: { cursor: "default" },
2875
2843
  children: [
2876
2844
  /* @__PURE__ */ E("div", {
2877
2845
  className: "member-avatar-wrapper",
2878
- children: [/* @__PURE__ */ T(Gt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(nt, {
2846
+ children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
2879
2847
  size: 12,
2880
2848
  className: "status-dot"
2881
2849
  }) : null]
2882
2850
  }),
2883
2851
  /* @__PURE__ */ E("div", {
2884
2852
  className: "member-info-wrapper",
2885
- style: {
2886
- flex: 1,
2887
- display: "flex",
2888
- flexDirection: "column",
2889
- gap: "2px"
2890
- },
2891
2853
  children: [/* @__PURE__ */ E("div", {
2892
- style: {
2893
- display: "flex",
2894
- alignItems: "center",
2895
- gap: "4px"
2896
- },
2854
+ className: "member-name-row",
2897
2855
  children: [/* @__PURE__ */ T("span", {
2898
2856
  className: "member-name",
2899
- style: {
2900
- fontSize: "15px",
2901
- fontWeight: "500",
2902
- color: "#1e293b"
2903
- },
2904
2857
  children: r ? "Bạn" : e.name
2905
- }), t && /* @__PURE__ */ T(rt, {
2858
+ }), t && /* @__PURE__ */ T(at, {
2906
2859
  size: 14,
2907
- style: { color: "#64748b" }
2860
+ className: "owner-icon"
2908
2861
  })]
2909
2862
  }), t && /* @__PURE__ */ T("div", {
2910
- style: {
2911
- fontSize: "13px",
2912
- color: "#64748b"
2913
- },
2863
+ className: "member-role",
2914
2864
  children: "Trưởng nhóm"
2915
2865
  })]
2916
2866
  }),
2917
2867
  !t && /* @__PURE__ */ T("button", {
2918
2868
  type: "button",
2919
2869
  className: "remove-member-btn",
2920
- style: {
2921
- background: "transparent",
2922
- border: "none",
2923
- color: "#ef4444",
2924
- cursor: "pointer",
2925
- padding: "4px",
2926
- display: "flex",
2927
- alignItems: "center",
2928
- justifyContent: "center",
2929
- fontSize: "14px"
2930
- },
2931
2870
  onClick: (t) => {
2932
2871
  t.stopPropagation(), i && n && i(n.id, e.id);
2933
2872
  },
@@ -2959,24 +2898,32 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2959
2898
  ]
2960
2899
  })
2961
2900
  });
2962
- }, qt = ({ isOpen: e, onClose: t, group: n, members: r, currentChatMembers: i, onAddMember: a, primaryColor: o }) => {
2963
- let [s, c] = p(""), [l, u] = p(!1), { t: d } = Z();
2964
- if (!e || !n) return null;
2965
- let f = new Set((i || []).map((e) => e.id)), m = (r || []).filter((e) => !f.has(e.id) && e.name.toLowerCase().includes(s.toLowerCase())), h = async (e) => {
2966
- if (!l) {
2967
- u(!0);
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);
2968
2907
  try {
2969
- await a(n.id, e), t(), c("");
2908
+ await h(t), e(), n("");
2970
2909
  } catch (e) {
2971
2910
  console.error(e);
2972
2911
  } finally {
2973
- u(!1);
2912
+ i(!1);
2974
2913
  }
2975
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
+ }
2976
2923
  };
2977
2924
  return /* @__PURE__ */ T("div", {
2978
2925
  className: "modal-overlay",
2979
- onClick: t,
2926
+ onClick: e,
2980
2927
  children: /* @__PURE__ */ E("div", {
2981
2928
  className: "modal-content add-chat-modal",
2982
2929
  onClick: (e) => e.stopPropagation(),
@@ -2985,10 +2932,10 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
2985
2932
  className: "modal-header",
2986
2933
  children: [/* @__PURE__ */ T("h3", {
2987
2934
  className: "modal-title",
2988
- children: d("addMember.title")
2935
+ children: a("addMember.title")
2989
2936
  }), /* @__PURE__ */ T("button", {
2990
2937
  className: "close-modal-btn",
2991
- onClick: t,
2938
+ onClick: e,
2992
2939
  children: /* @__PURE__ */ E("svg", {
2993
2940
  width: "20",
2994
2941
  height: "20",
@@ -3016,25 +2963,25 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3016
2963
  className: "modal-body",
3017
2964
  children: [/* @__PURE__ */ T("div", {
3018
2965
  className: "search-section",
3019
- children: /* @__PURE__ */ T(on, {
3020
- value: s,
3021
- onChange: c,
3022
- placeholder: d("addMember.memberSearchPlaceholder")
2966
+ children: /* @__PURE__ */ T(cn, {
2967
+ value: t,
2968
+ onChange: n,
2969
+ placeholder: a("addMember.memberSearchPlaceholder")
3023
2970
  })
3024
2971
  }), /* @__PURE__ */ T("div", {
3025
2972
  className: "members-list-container",
3026
2973
  children: /* @__PURE__ */ T("div", {
3027
2974
  className: "members-list",
3028
- children: m.length === 0 ? /* @__PURE__ */ T("div", {
2975
+ children: f.length === 0 ? /* @__PURE__ */ T("div", {
3029
2976
  className: "no-members-found",
3030
- children: d("addMember.noMembersFound")
3031
- }) : m.map((e) => /* @__PURE__ */ E("div", {
3032
- className: `member-item ${l ? "loading" : ""}`,
3033
- onClick: () => void h(e.id),
2977
+ children: a("addMember.noMembersFound")
2978
+ }) : f.map((e) => /* @__PURE__ */ E("div", {
2979
+ className: `member-item ${r ? "loading" : ""}`,
2980
+ onClick: () => void m(e.id),
3034
2981
  children: [
3035
2982
  /* @__PURE__ */ E("div", {
3036
2983
  className: "member-avatar-wrapper",
3037
- children: [/* @__PURE__ */ T(Gt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(nt, {
2984
+ children: [/* @__PURE__ */ T(qt, { member: e }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
3038
2985
  size: 12,
3039
2986
  className: "status-dot"
3040
2987
  }) : null]
@@ -3045,15 +2992,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3045
2992
  }),
3046
2993
  /* @__PURE__ */ T("div", {
3047
2994
  className: "member-add-action",
3048
- style: {
3049
- color: o ?? "#3b82f6",
3050
- fontSize: "13px",
3051
- fontWeight: "600",
3052
- background: "#eff6ff",
3053
- padding: "4px 12px",
3054
- borderRadius: "6px"
3055
- },
3056
- children: d("addMember.addButton")
2995
+ children: a("addMember.addButton")
3057
2996
  })
3058
2997
  ]
3059
2998
  }, e.id))
@@ -3064,19 +3003,19 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3064
3003
  className: "modal-footer",
3065
3004
  children: /* @__PURE__ */ T("button", {
3066
3005
  className: "footer-btn cancel",
3067
- onClick: t,
3068
- children: d("common.buttons.close")
3006
+ onClick: e,
3007
+ children: a("common.buttons.close")
3069
3008
  })
3070
3009
  })
3071
3010
  ]
3072
3011
  })
3073
3012
  });
3074
- }, Jt = ({ file: e }) => /* @__PURE__ */ T("img", {
3013
+ }, Xt = ({ file: e }) => /* @__PURE__ */ T("img", {
3075
3014
  src: e.link,
3076
3015
  alt: e.name,
3077
3016
  className: "file-viewer-image",
3078
3017
  title: e.name
3079
- }), Yt = ({ file: e }) => /* @__PURE__ */ T("div", {
3018
+ }), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
3080
3019
  className: "video-container",
3081
3020
  children: /* @__PURE__ */ T("video", {
3082
3021
  src: e.link,
@@ -3085,7 +3024,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3085
3024
  className: "file-viewer-video",
3086
3025
  title: e.name
3087
3026
  })
3088
- }), Xt = ({ file: e }) => /* @__PURE__ */ T("div", {
3027
+ }), Qt = ({ file: e }) => /* @__PURE__ */ T("div", {
3089
3028
  className: "audio-container",
3090
3029
  children: /* @__PURE__ */ E("div", {
3091
3030
  className: "audio-player-wrapper",
@@ -3100,7 +3039,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3100
3039
  children: e.name
3101
3040
  })]
3102
3041
  })
3103
- }), Zt = ({ file: e }) => /* @__PURE__ */ T("div", {
3042
+ }), $t = ({ file: e }) => /* @__PURE__ */ T("div", {
3104
3043
  className: "pdf-container",
3105
3044
  children: /* @__PURE__ */ T("iframe", {
3106
3045
  src: `${e.link}#toolbar=1&navpanes=0`,
@@ -3113,7 +3052,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3113
3052
  borderRadius: "8px"
3114
3053
  }
3115
3054
  })
3116
- }), Qt = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
3055
+ }), en = ({ file: e, openDownloadButtonText: t }) => /* @__PURE__ */ E("div", {
3117
3056
  className: "file-viewer-generic",
3118
3057
  children: [
3119
3058
  /* @__PURE__ */ T("div", {
@@ -3132,7 +3071,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3132
3071
  children: t
3133
3072
  })
3134
3073
  ]
3135
- }), $t = ({ isOpen: e, files: t, initialIndex: n = 0, onClose: r }) => {
3074
+ }), tn = ({ isOpen: e, files: t, initialIndex: n = 0, onClose: r }) => {
3136
3075
  let [i, a] = p(n), o = f(null), { t: s } = Z();
3137
3076
  if (!e || t.length === 0) return null;
3138
3077
  let c = () => {
@@ -3151,30 +3090,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3151
3090
  });
3152
3091
  }, m = (e) => {
3153
3092
  e.key === "ArrowLeft" ? c() : e.key === "ArrowRight" ? l() : e.key === "Escape" && r();
3154
- }, h = t[i], g = (e) => {
3155
- let t = e.split(".").pop()?.toLowerCase() ?? "";
3156
- return [
3157
- "jpg",
3158
- "jpeg",
3159
- "png",
3160
- "gif",
3161
- "webp",
3162
- "svg"
3163
- ].includes(t) ? "image" : [
3164
- "mp4",
3165
- "webm",
3166
- "ogg",
3167
- "mov"
3168
- ].includes(t) ? "video" : [
3169
- "mp3",
3170
- "wav",
3171
- "flac",
3172
- "m4a",
3173
- "aac",
3174
- "wma",
3175
- "opus"
3176
- ].includes(t) ? "audio" : ["pdf"].includes(t) ? "pdf" : "other";
3177
- }, _ = g(h.name);
3093
+ }, h = t[i], g = z(h.name);
3178
3094
  return /* @__PURE__ */ T("div", {
3179
3095
  className: "file-viewer-overlay",
3180
3096
  onClick: r,
@@ -3197,11 +3113,11 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3197
3113
  /* @__PURE__ */ E("div", {
3198
3114
  className: "file-viewer-main",
3199
3115
  children: [
3200
- _ === "image" && /* @__PURE__ */ T(Jt, { file: h }),
3201
- _ === "video" && /* @__PURE__ */ T(Yt, { file: h }),
3202
- _ === "audio" && /* @__PURE__ */ T(Xt, { file: h }),
3203
- _ === "pdf" && /* @__PURE__ */ T(Zt, { file: h }),
3204
- _ === "other" && /* @__PURE__ */ T(Qt, {
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, {
3205
3121
  file: h,
3206
3122
  openDownloadButtonText: s("fileViewer.openDownloadButton")
3207
3123
  })
@@ -3212,13 +3128,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3212
3128
  onClick: c,
3213
3129
  "aria-label": s("fileViewer.previousAriaLabel"),
3214
3130
  title: s("fileViewer.previousButtonTitle"),
3215
- children: /* @__PURE__ */ T(ut, {})
3131
+ children: /* @__PURE__ */ T(ft, {})
3216
3132
  }), /* @__PURE__ */ T("button", {
3217
3133
  className: "file-viewer-nav file-viewer-next",
3218
3134
  onClick: l,
3219
3135
  "aria-label": s("fileViewer.nextAriaLabel"),
3220
3136
  title: s("fileViewer.nextButtonTitle"),
3221
- children: /* @__PURE__ */ T(dt, {})
3137
+ children: /* @__PURE__ */ T(pt, {})
3222
3138
  })] }),
3223
3139
  /* @__PURE__ */ E("div", {
3224
3140
  className: "file-viewer-counter",
@@ -3236,13 +3152,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3236
3152
  onClick: u,
3237
3153
  "aria-label": s("fileViewer.scrollLeftAriaLabel"),
3238
3154
  title: s("fileViewer.scrollLeftTitle"),
3239
- children: /* @__PURE__ */ T(ut, {})
3155
+ children: /* @__PURE__ */ T(ft, {})
3240
3156
  }),
3241
3157
  /* @__PURE__ */ T("div", {
3242
3158
  className: "file-viewer-thumbnails",
3243
3159
  ref: o,
3244
3160
  children: t.map((e, t) => {
3245
- let n = g(e.name);
3161
+ let n = z(e.name);
3246
3162
  return /* @__PURE__ */ T("button", {
3247
3163
  className: `file-viewer-thumbnail ${t === i ? "active" : ""}`,
3248
3164
  onClick: () => a(t),
@@ -3290,14 +3206,14 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3290
3206
  onClick: d,
3291
3207
  "aria-label": s("fileViewer.scrollRightAriaLabel"),
3292
3208
  title: s("fileViewer.scrollRightTitle"),
3293
- children: /* @__PURE__ */ T(dt, {})
3209
+ children: /* @__PURE__ */ T(pt, {})
3294
3210
  })
3295
3211
  ]
3296
3212
  })
3297
3213
  ]
3298
3214
  })
3299
3215
  });
3300
- }, en = [
3216
+ }, nn = [
3301
3217
  "#fff",
3302
3218
  "#a855f7",
3303
3219
  "#3b82f6",
@@ -3307,7 +3223,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3307
3223
  "#ec4899",
3308
3224
  "#6366f1",
3309
3225
  "#14b8a6"
3310
- ], tn = ({ isOpen: e, onClose: t, defaultColor: n = "#ffffff" }) => {
3226
+ ], rn = ({ isOpen: e, onClose: t, defaultColor: n = "#ffffff" }) => {
3311
3227
  let r = g(), { t: i } = Z(), { primaryColor: a } = _((e) => e.setting);
3312
3228
  return e ? /* @__PURE__ */ T("div", {
3313
3229
  className: "modal-overlay",
@@ -3340,10 +3256,10 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3340
3256
  }),
3341
3257
  /* @__PURE__ */ T("div", {
3342
3258
  className: "color-presets",
3343
- children: en.map((e) => /* @__PURE__ */ T("button", {
3259
+ children: nn.map((e) => /* @__PURE__ */ T("button", {
3344
3260
  className: `color-preset-btn ${a === e ? "active" : ""}`,
3345
3261
  style: { backgroundColor: e },
3346
- onClick: () => r(Pe(e)),
3262
+ onClick: () => r(X(e)),
3347
3263
  children: a === e && /* @__PURE__ */ T("span", {
3348
3264
  className: "check-icon",
3349
3265
  children: "✓"
@@ -3360,7 +3276,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3360
3276
  children: [/* @__PURE__ */ T("input", {
3361
3277
  type: "color",
3362
3278
  value: a,
3363
- onChange: (e) => r(Pe(e.target.value)),
3279
+ onChange: (e) => r(X(e.target.value)),
3364
3280
  className: "color-input"
3365
3281
  }), /* @__PURE__ */ T("span", {
3366
3282
  className: "color-hex-code",
@@ -3378,14 +3294,14 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3378
3294
  children: i("themeModal.doneButton")
3379
3295
  }), /* @__PURE__ */ T("button", {
3380
3296
  className: "modal-btn cancel",
3381
- onClick: () => r(Pe(n)),
3297
+ onClick: () => r(X(n)),
3382
3298
  children: i("themeModal.resetButton")
3383
3299
  })]
3384
3300
  })
3385
3301
  ]
3386
3302
  })
3387
3303
  }) : null;
3388
- }, nn = ({ onClose: e }) => {
3304
+ }, an = ({ onClose: e }) => {
3389
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) => {
3390
3306
  s((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
3391
3307
  }, S = (e) => {
@@ -3402,7 +3318,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3402
3318
  }, w = a(async () => {
3403
3319
  if (!(o.length < 2)) try {
3404
3320
  if (!c.trim()) return;
3405
- let t = o.map((e) => Number(e)), r = typeof m == "string" ? m.trim() || void 0 : m || void 0, a = (await W.addGroup(t, c, r)).data;
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;
3406
3322
  a && n(V(i.find((e) => e.id === a.id) || a)), e();
3407
3323
  } catch (e) {
3408
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.");
@@ -3454,7 +3370,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3454
3370
  src: v,
3455
3371
  alt: "Group avatar",
3456
3372
  className: "preview-avatar"
3457
- }) : /* @__PURE__ */ T(Vt, {})
3373
+ }) : /* @__PURE__ */ T(Ut, {})
3458
3374
  })]
3459
3375
  }), /* @__PURE__ */ T("input", {
3460
3376
  type: "text",
@@ -3466,7 +3382,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3466
3382
  }),
3467
3383
  /* @__PURE__ */ T("div", {
3468
3384
  className: "search-section",
3469
- children: /* @__PURE__ */ T(on, {
3385
+ children: /* @__PURE__ */ T(cn, {
3470
3386
  value: u,
3471
3387
  onChange: d,
3472
3388
  placeholder: t("addChat.memberSearchPlaceholder")
@@ -3524,7 +3440,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3524
3440
  className: "avatar-letter",
3525
3441
  children: e.name.charAt(0).toUpperCase()
3526
3442
  })
3527
- }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(nt, {
3443
+ }), (e.socket_ids?.length ?? 0) > 0 || e.socket_id || e.status === "online" ? /* @__PURE__ */ T(it, {
3528
3444
  size: 12,
3529
3445
  className: "status-dot"
3530
3446
  }) : null]
@@ -3555,7 +3471,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3555
3471
  ]
3556
3472
  })
3557
3473
  });
3558
- }, rn = ({ user: e, onClose: t, isOnline: n, onMessage: r }) => e ? /* @__PURE__ */ T("div", {
3474
+ }, on = ({ user: e, onClose: t, isOnline: n, onMessage: r }) => e ? /* @__PURE__ */ T("div", {
3559
3475
  className: "modal-overlay",
3560
3476
  onClick: t,
3561
3477
  children: /* @__PURE__ */ E("div", {
@@ -3572,7 +3488,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3572
3488
  children: [
3573
3489
  /* @__PURE__ */ E("div", {
3574
3490
  className: "profile-avatar-wrapper",
3575
- children: [/* @__PURE__ */ T(Gt, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
3491
+ children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("span", { className: "profile-online-status" })]
3576
3492
  }),
3577
3493
  /* @__PURE__ */ T("h3", {
3578
3494
  className: "profile-name",
@@ -3589,7 +3505,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3589
3505
  children: /* @__PURE__ */ E("button", {
3590
3506
  className: "profile-action-btn",
3591
3507
  onClick: r,
3592
- children: [/* @__PURE__ */ T(ft, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
3508
+ children: [/* @__PURE__ */ T(mt, {}), /* @__PURE__ */ T("span", { children: "Nhắn tin" })]
3593
3509
  })
3594
3510
  }),
3595
3511
  /* @__PURE__ */ E("div", {
@@ -3649,8 +3565,8 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3649
3565
  })
3650
3566
  ]
3651
3567
  })
3652
- }) : null, an = ({ chats: e, selectedChat: t, onSelectChat: n }) => {
3653
- let { currentUser: r, members: i } = _((e) => e.chat), [a, o] = p(null), [s, l] = p(null), { t: u } = Z(), { hasGroupChat: d } = _(Ve), 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([], {
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([], {
3654
3570
  hour: "2-digit",
3655
3571
  minute: "2-digit"
3656
3572
  }) : "";
@@ -3667,10 +3583,10 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3667
3583
  className: "section-header",
3668
3584
  children: /* @__PURE__ */ T("span", { children: "Tất cả tin nhắn" })
3669
3585
  }), h.length > 0 ? h.map((e) => {
3670
- let o = e.message?.member.id === r?.id, s = r?.id && e.new?.[r.id] ? e.new[r.id] : 0, c = e.type === "single" ? e.members?.find((e) => e.id !== r?.id) : null, d = !!c && i.some((e) => e.id === c.id && (e.socket_ids?.length ?? 0) > 0);
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);
3671
3587
  return /* @__PURE__ */ E("div", {
3672
- className: `chat-item ${t?.id === e.id ? "active" : ""} ${a === e.id ? "has-open-dropdown" : ""}`,
3673
- onClick: () => n(e),
3588
+ className: `chat-item ${i?.id === e.id ? "active" : ""} ${a === e.id ? "has-open-dropdown" : ""}`,
3589
+ onClick: () => t(e),
3674
3590
  children: [/* @__PURE__ */ E("div", {
3675
3591
  className: "chat-item-avatar",
3676
3592
  style: {
@@ -3684,10 +3600,10 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3684
3600
  isOnline: d
3685
3601
  });
3686
3602
  },
3687
- children: [/* @__PURE__ */ T(Ut, {
3603
+ children: [/* @__PURE__ */ T(Gt, {
3688
3604
  chat: e,
3689
- currentUserId: r?.id
3690
- }), e.type === "single" && d && /* @__PURE__ */ T(nt, {
3605
+ currentUserId: n?.id
3606
+ }), e.type === "single" && d && /* @__PURE__ */ T(it, {
3691
3607
  size: 12,
3692
3608
  className: "online-indicator"
3693
3609
  })]
@@ -3699,7 +3615,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3699
3615
  className: "chat-item-name",
3700
3616
  children: /* @__PURE__ */ T("span", {
3701
3617
  className: "name-text",
3702
- children: O(e, r?.id)
3618
+ children: O(e, n?.id)
3703
3619
  })
3704
3620
  }), /* @__PURE__ */ T("span", {
3705
3621
  className: "chat-item-time",
@@ -3715,7 +3631,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3715
3631
  })
3716
3632
  }), /* @__PURE__ */ E("div", {
3717
3633
  className: "info-bottom-right",
3718
- children: [e.is_muted && /* @__PURE__ */ T(ct, {
3634
+ children: [e.is_muted && /* @__PURE__ */ T(ut, {
3719
3635
  size: 14,
3720
3636
  className: "mute-icon-list"
3721
3637
  }), s > 0 && /* @__PURE__ */ T("div", {
@@ -3731,26 +3647,26 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3731
3647
  children: "Không có tin nhắn nào"
3732
3648
  }) : null]
3733
3649
  }),
3734
- s && /* @__PURE__ */ T(rn, {
3650
+ s && /* @__PURE__ */ T(on, {
3735
3651
  user: s.user,
3736
3652
  isOnline: s.isOnline,
3737
3653
  onClose: () => l(null),
3738
3654
  onMessage: () => {
3739
3655
  if (!s) return;
3740
- let t = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === s.user.id));
3741
- t && n(t), l(null);
3656
+ let n = e.find((e) => e.type === "single" && e.members?.some((e) => e.id === s.user.id));
3657
+ n && t(n), l(null);
3742
3658
  }
3743
3659
  })
3744
3660
  ]
3745
3661
  });
3746
- }, on = ({ value: e, onChange: t, onAddClick: n, placeholder: r, activeTab: i }) => {
3747
- let { hasGroupChat: a } = _(Ve), { t: o } = Z(), s = o("chatSearchBar.searchPlaceholder");
3662
+ }, cn = ({ value: e, onChange: t, onAddClick: n, placeholder: r, activeTab: i }) => {
3663
+ let { hasGroupChat: a } = _(Ue), { t: o } = Z(), s = o("chatSearchBar.searchPlaceholder");
3748
3664
  return /* @__PURE__ */ E("div", {
3749
3665
  className: "chat-search-bar",
3750
3666
  children: [/* @__PURE__ */ E("div", {
3751
3667
  className: "search-input-wrapper",
3752
3668
  children: [
3753
- /* @__PURE__ */ T(ht, { className: "search-icon" }),
3669
+ /* @__PURE__ */ T(_t, { className: "search-icon" }),
3754
3670
  /* @__PURE__ */ T("input", {
3755
3671
  type: "text",
3756
3672
  className: "search-input",
@@ -3768,68 +3684,56 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3768
3684
  className: "action-btn add-group-btn",
3769
3685
  onClick: n,
3770
3686
  title: o("chatSearchBar.createGroup"),
3771
- children: /* @__PURE__ */ T(ot, {})
3687
+ children: /* @__PURE__ */ T(ct, {})
3772
3688
  })]
3773
3689
  });
3774
- }, sn = ({ setIsThemeModalOpen: e, currentUser: t, activeTab: n, setActiveTab: r }) => /* @__PURE__ */ E("div", {
3775
- className: "app-sidebar",
3776
- children: [/* @__PURE__ */ E("div", {
3777
- className: "app-nav",
3778
- children: [
3779
- /* @__PURE__ */ T("div", {
3780
- className: `nav-item ${n === "chats" ? "active" : ""}`,
3781
- onClick: () => r("chats"),
3782
- children: /* @__PURE__ */ T(pt, {})
3783
- }),
3784
- /* @__PURE__ */ T("div", {
3785
- className: `nav-item ${n === "contacts" ? "active" : ""}`,
3786
- onClick: () => r("contacts"),
3787
- children: /* @__PURE__ */ T(ot, {})
3788
- }),
3789
- /* @__PURE__ */ T("div", { className: "nav-separator" }),
3790
- /* @__PURE__ */ T("div", {
3791
- className: "nav-item",
3792
- children: /* @__PURE__ */ T(mt, {})
3793
- }),
3794
- /* @__PURE__ */ T("div", {
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", {
3795
3720
  className: "nav-item",
3796
- children: /* @__PURE__ */ T(ht, {})
3797
- })
3798
- ]
3799
- }), /* @__PURE__ */ E("div", {
3800
- className: "app-sidebar-footer",
3801
- children: [/* @__PURE__ */ T("div", {
3802
- className: "nav-item",
3803
- onClick: () => e(!0),
3804
- children: /* @__PURE__ */ T(gt, {})
3805
- }), /* @__PURE__ */ T("div", {
3806
- className: "app-avatar",
3807
- children: t?.avatar ? /* @__PURE__ */ T("img", {
3808
- src: t.avatar,
3809
- alt: t.name,
3810
- style: {
3811
- width: "100%",
3812
- height: "100%",
3813
- borderRadius: "50%",
3814
- objectFit: "cover"
3815
- }
3816
- }) : /* @__PURE__ */ T("div", {
3817
- style: {
3818
- width: "100%",
3819
- height: "100%",
3820
- display: "flex",
3821
- alignItems: "center",
3822
- justifyContent: "center",
3823
- fontSize: "14px",
3824
- fontWeight: "bold",
3825
- color: "#64748b"
3826
- },
3827
- children: t?.name?.[0].toUpperCase()
3828
- })
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
+ })]
3829
3733
  })]
3830
- })]
3831
- }), cn = ({ currentUser: e, onClose: t, onAddMember: n, onUpdateGroup: r, onRemoveMember: i }) => {
3832
- let a = g(), { currentChatMembers: o, currentChat: s } = _((e) => e.chat), [l, u] = p("info"), [d, f] = p(null), [m, h] = p(!1), [v, y] = p(null), [b, x] = p({
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({
3833
3737
  canChangeInfo: !0,
3834
3738
  canPinMessage: !0,
3835
3739
  canCreateNote: !0,
@@ -3852,13 +3756,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3852
3756
  window.removeEventListener("click", e);
3853
3757
  };
3854
3758
  }, [d]);
3855
- let C = o.length ?? 0, D = O(s, e?.id, ""), k = o ?? [], ee = async () => {
3759
+ let C = a.length ?? 0, D = O(o, s?.id, ""), k = a ?? [], A = async () => {
3856
3760
  if (!v) return;
3857
- let e = s;
3858
- if (e) a(V(e));
3761
+ let e = o;
3762
+ if (e) i(V(e));
3859
3763
  else try {
3860
- let e = await W.addChat(v.user.id);
3861
- e?.data && (a(xe(e.data)), a(V(e.data)));
3764
+ let e = await G.addChat(v.user.id);
3765
+ e?.data && (i(we(e.data)), i(V(e.data)));
3862
3766
  } catch (e) {
3863
3767
  console.error("Lỗi khi tạo phòng chat mới:", e);
3864
3768
  }
@@ -3873,14 +3777,14 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3873
3777
  children: [/* @__PURE__ */ T("button", {
3874
3778
  className: "back-info-btn",
3875
3779
  onClick: () => u("info"),
3876
- children: /* @__PURE__ */ T(st, {})
3780
+ children: /* @__PURE__ */ T(lt, {})
3877
3781
  }), /* @__PURE__ */ T("h3", {
3878
3782
  className: "header-title",
3879
3783
  children: "Quản lý nhóm"
3880
3784
  })]
3881
3785
  }), /* @__PURE__ */ T("button", {
3882
3786
  className: "close-info-btn",
3883
- onClick: t,
3787
+ onClick: e,
3884
3788
  children: /* @__PURE__ */ T($, {})
3885
3789
  })]
3886
3790
  }), /* @__PURE__ */ E("div", {
@@ -3951,7 +3855,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3951
3855
  className: "setting-item-switch",
3952
3856
  children: [/* @__PURE__ */ E("div", {
3953
3857
  className: "setting-info",
3954
- children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(_t, { className: "help-icon" })]
3858
+ children: [/* @__PURE__ */ T("span", { children: "Chế độ phê duyệt thành viên mới" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
3955
3859
  }), /* @__PURE__ */ E("label", {
3956
3860
  className: "switch",
3957
3861
  children: [/* @__PURE__ */ T("input", {
@@ -3965,7 +3869,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3965
3869
  className: "setting-item-switch",
3966
3870
  children: [/* @__PURE__ */ E("div", {
3967
3871
  className: "setting-info",
3968
- children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(_t, { className: "help-icon" })]
3872
+ children: [/* @__PURE__ */ T("span", { children: "Đánh dấu tin nhắn từ trưởng/phó nhóm" }), /* @__PURE__ */ T(yt, { className: "help-icon" })]
3969
3873
  }), /* @__PURE__ */ E("label", {
3970
3874
  className: "switch",
3971
3875
  children: [/* @__PURE__ */ T("input", {
@@ -3979,7 +3883,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
3979
3883
  className: "setting-item-switch",
3980
3884
  children: [/* @__PURE__ */ E("div", {
3981
3885
  className: "setting-info",
3982
- children: [/* @__PURE__ */ T("span", { children: "Cho phép thành viên mới đọc tin nhắn gần nhất" }), /* @__PURE__ */ T(_t, { className: "help-icon" })]
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" })]
3983
3887
  }), /* @__PURE__ */ E("label", {
3984
3888
  className: "switch",
3985
3889
  children: [/* @__PURE__ */ T("input", {
@@ -4000,13 +3904,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4000
3904
  className: "menu-item",
4001
3905
  children: /* @__PURE__ */ E("div", {
4002
3906
  className: "menu-left",
4003
- children: [/* @__PURE__ */ T(vt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
3907
+ children: [/* @__PURE__ */ T(bt, {}), /* @__PURE__ */ T("span", { children: "Chặn khỏi nhóm" })]
4004
3908
  })
4005
3909
  }), /* @__PURE__ */ T("div", {
4006
3910
  className: "menu-item",
4007
3911
  children: /* @__PURE__ */ E("div", {
4008
3912
  className: "menu-left",
4009
- children: [/* @__PURE__ */ T(yt, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
3913
+ children: [/* @__PURE__ */ T(xt, {}), /* @__PURE__ */ T("span", { children: "Trưởng & phó nhóm" })]
4010
3914
  })
4011
3915
  })]
4012
3916
  })
@@ -4020,20 +3924,20 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4020
3924
  className: "info-header",
4021
3925
  children: /* @__PURE__ */ T("button", {
4022
3926
  className: "close-info-btn",
4023
- onClick: t,
3927
+ onClick: e,
4024
3928
  children: /* @__PURE__ */ T($, {})
4025
3929
  })
4026
3930
  }),
4027
- s && /* @__PURE__ */ E("div", {
3931
+ o && /* @__PURE__ */ E("div", {
4028
3932
  className: "info-content-scroll",
4029
3933
  children: [
4030
3934
  /* @__PURE__ */ E("div", {
4031
3935
  className: "info-basic-section",
4032
3936
  children: [/* @__PURE__ */ T("div", {
4033
3937
  className: "info-avatar-large",
4034
- children: /* @__PURE__ */ T(Ut, {
4035
- chat: s,
4036
- currentUserId: e?.id
3938
+ children: /* @__PURE__ */ T(Gt, {
3939
+ chat: o,
3940
+ currentUserId: s?.id
4037
3941
  })
4038
3942
  }), /* @__PURE__ */ E("div", {
4039
3943
  className: "info-main-details",
@@ -4041,21 +3945,21 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4041
3945
  className: "info-chat-name",
4042
3946
  children: [D, /* @__PURE__ */ T("span", {
4043
3947
  className: "info-status-icons",
4044
- children: s.type === "group" && /* @__PURE__ */ T(bt, { onClick: (e) => {
4045
- e.stopPropagation(), r && r(s);
3948
+ children: o.type === "group" && /* @__PURE__ */ T(St, { onClick: (e) => {
3949
+ e.stopPropagation(), n && n(o);
4046
3950
  } })
4047
3951
  })]
4048
3952
  }), /* @__PURE__ */ T("p", {
4049
3953
  className: "info-member-count",
4050
- children: s.type === "group" ? `Thành viên (${C})` : o.find((t) => t.id !== e?.id)?.socket_ids?.length ? "Đang hoạt động" : "Không hoạt động"
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"
4051
3955
  })]
4052
3956
  })]
4053
3957
  }),
4054
3958
  /* @__PURE__ */ T("div", {
4055
3959
  className: "info-quick-actions",
4056
- children: s.type === "group" ? /* @__PURE__ */ T("div", {
3960
+ children: o.type === "group" ? /* @__PURE__ */ T("div", {
4057
3961
  className: "action-item",
4058
- onClick: n,
3962
+ onClick: t,
4059
3963
  children: /* @__PURE__ */ E("div", {
4060
3964
  className: "action-icon-info",
4061
3965
  children: [/* @__PURE__ */ E("svg", {
@@ -4089,8 +3993,8 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4089
3993
  })
4090
3994
  }) : /* @__PURE__ */ T(w, {})
4091
3995
  }),
4092
- s.type === "group" && null,
4093
- s.type === "group" && /* @__PURE__ */ E("div", {
3996
+ o.type === "group" && null,
3997
+ o.type === "group" && /* @__PURE__ */ E("div", {
4094
3998
  className: "info-members-section",
4095
3999
  children: [/* @__PURE__ */ E("div", {
4096
4000
  className: "section-title-row",
@@ -4100,55 +4004,49 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4100
4004
  ")"
4101
4005
  ] }), /* @__PURE__ */ E("div", {
4102
4006
  className: "title-actions",
4103
- children: [/* @__PURE__ */ T(xt, {
4007
+ children: [/* @__PURE__ */ T(Ct, {
4104
4008
  size: 16,
4105
- onClick: n,
4106
- style: { cursor: "pointer" }
4107
- }), /* @__PURE__ */ T(St, {
4108
- onClick: () => h(!m),
4109
- style: {
4110
- cursor: "pointer",
4111
- transform: m ? "rotate(-180deg)" : "rotate(0deg)",
4112
- transition: "transform 0.2s ease"
4113
- }
4009
+ onClick: t
4010
+ }), /* @__PURE__ */ T(wt, {
4011
+ className: `arrow-icon ${m ? "collapsed" : ""}`,
4012
+ onClick: () => h(!m)
4114
4013
  })]
4115
4014
  })]
4116
4015
  }), m ? /* @__PURE__ */ E("div", {
4117
4016
  className: "members-facepile",
4118
- children: [k.slice(0, 8).map((t) => /* @__PURE__ */ E("div", {
4017
+ children: [k.slice(0, 8).map((e) => /* @__PURE__ */ E("div", {
4119
4018
  className: "facepile-item",
4120
- children: [/* @__PURE__ */ T(Gt, { member: t }), (t.id === e?.id || (t.socket_ids?.length ?? 0) > 0) && /* @__PURE__ */ T("div", { className: "online-status" })]
4121
- }, t.id)), k.length > 8 && /* @__PURE__ */ E("div", {
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", {
4122
4021
  className: "facepile-more",
4123
4022
  children: ["+", k.length - 8]
4124
4023
  })]
4125
4024
  }) : /* @__PURE__ */ T("div", {
4126
4025
  className: "members-compact-list",
4127
- children: k.map((t) => {
4128
- let n = s.owner_id === t.id, r = t.id === e?.id || t.socket_ids && t.socket_ids.length > 0;
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;
4129
4028
  return /* @__PURE__ */ E("div", {
4130
4029
  className: "member-compact-item",
4131
4030
  children: [/* @__PURE__ */ E("div", {
4132
- className: "member-item-left",
4031
+ className: "member-item-left clickable",
4133
4032
  onClick: () => y({
4134
- user: t,
4135
- isOnline: r ?? !1
4033
+ user: e,
4034
+ isOnline: n ?? !1
4136
4035
  }),
4137
- style: { cursor: "pointer" },
4138
4036
  children: [/* @__PURE__ */ E("div", {
4139
4037
  className: "member-avatar-small",
4140
- children: [/* @__PURE__ */ T(Gt, { member: t }), r && /* @__PURE__ */ T("div", { className: "online-status" })]
4038
+ children: [/* @__PURE__ */ T(qt, { member: e }), n && /* @__PURE__ */ T("div", { className: "online-status" })]
4141
4039
  }), /* @__PURE__ */ E("div", {
4142
4040
  className: "member-info",
4143
4041
  children: [/* @__PURE__ */ E("div", {
4144
4042
  className: "member-name-row",
4145
4043
  children: [/* @__PURE__ */ T("span", {
4146
4044
  className: "member-name",
4147
- children: t.id === e?.id ? "Bạn" : t.name
4148
- }), n && /* @__PURE__ */ T(rt, {})]
4045
+ children: e.id === s?.id ? "Bạn" : e.name
4046
+ }), t && /* @__PURE__ */ T(at, {})]
4149
4047
  }), /* @__PURE__ */ T("span", {
4150
4048
  className: "member-role",
4151
- children: n ? "Trưởng nhóm" : "Thành viên"
4049
+ children: t ? "Trưởng nhóm" : "Thành viên"
4152
4050
  })]
4153
4051
  })]
4154
4052
  }), /* @__PURE__ */ T("div", {
@@ -4157,38 +4055,38 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4157
4055
  className: "member-options-container",
4158
4056
  children: [/* @__PURE__ */ T("button", {
4159
4057
  className: "member-options-btn",
4160
- onClick: (e) => {
4161
- e.stopPropagation(), f(d === t.id ? null : t.id);
4058
+ onClick: (t) => {
4059
+ t.stopPropagation(), f(d === e.id ? null : e.id);
4162
4060
  },
4163
- children: /* @__PURE__ */ T(Ct, {})
4164
- }), d === t.id && /* @__PURE__ */ T("div", {
4061
+ children: /* @__PURE__ */ T(Tt, {})
4062
+ }), d === e.id && /* @__PURE__ */ T("div", {
4165
4063
  className: "member-dropdown-menu",
4166
- children: !n && /* @__PURE__ */ E("button", {
4064
+ children: !t && /* @__PURE__ */ E("button", {
4167
4065
  className: "dropdown-item delete",
4168
- onClick: (e) => {
4169
- e.stopPropagation(), i && i(s.id, t.id), f(null);
4066
+ onClick: (t) => {
4067
+ t.stopPropagation(), r && r(o.id, e.id), f(null);
4170
4068
  },
4171
- children: [/* @__PURE__ */ T(vt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
4069
+ children: [/* @__PURE__ */ T(bt, { size: 16 }), /* @__PURE__ */ T("span", { children: "Xoá khỏi nhóm" })]
4172
4070
  })
4173
4071
  })]
4174
4072
  })
4175
4073
  })]
4176
- }, t.id);
4074
+ }, e.id);
4177
4075
  })
4178
4076
  })]
4179
4077
  })
4180
4078
  ]
4181
4079
  }),
4182
- v && /* @__PURE__ */ T(rn, {
4080
+ v && /* @__PURE__ */ T(on, {
4183
4081
  user: v.user,
4184
4082
  isOnline: v.isOnline,
4185
4083
  onClose: () => y(null),
4186
- onMessage: () => void ee()
4084
+ onMessage: () => void A()
4187
4085
  })
4188
4086
  ]
4189
4087
  });
4190
- }, ln = ({ mode: e, title: t, logoUrl: n, onToggleMode: r, onClose: i }) => {
4191
- let { t: a, toggleChangeLanguage: o } = Z(), { hasMultipleLanguages: s } = _(Ve), c = t ?? a("chatHeader.defaultTitle");
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");
4192
4090
  return /* @__PURE__ */ E("div", {
4193
4091
  className: `chat-header ${e}`,
4194
4092
  children: [/* @__PURE__ */ E("div", {
@@ -4197,20 +4095,8 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4197
4095
  className: "header-logo",
4198
4096
  children: n ? /* @__PURE__ */ T("img", {
4199
4097
  src: n,
4200
- alt: "Logo",
4201
- style: {
4202
- width: "22px",
4203
- height: "22px",
4204
- objectFit: "contain"
4205
- }
4206
- }) : /* @__PURE__ */ T(it, {
4207
- size: 22,
4208
- style: {
4209
- width: "22px",
4210
- height: "22px",
4211
- objectFit: "contain"
4212
- }
4213
- })
4098
+ alt: "Logo"
4099
+ }) : /* @__PURE__ */ T(ot, { size: 22 })
4214
4100
  }), /* @__PURE__ */ E("div", {
4215
4101
  className: "header-info-text",
4216
4102
  children: [
@@ -4235,19 +4121,19 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4235
4121
  className: "action-btn",
4236
4122
  onClick: o,
4237
4123
  title: a("chatHeader.language"),
4238
- children: /* @__PURE__ */ T(Bt, { size: 16 })
4124
+ children: /* @__PURE__ */ T(Ht, { size: 16 })
4239
4125
  }),
4240
4126
  /* @__PURE__ */ T("button", {
4241
4127
  className: "action-btn",
4242
4128
  onClick: i,
4243
4129
  title: a("chatHeader.minimize"),
4244
- children: /* @__PURE__ */ T(wt, { size: 16 })
4130
+ children: /* @__PURE__ */ T(Et, { size: 16 })
4245
4131
  }),
4246
4132
  /* @__PURE__ */ T("button", {
4247
4133
  className: "action-btn",
4248
4134
  onClick: r,
4249
4135
  title: a(e === "fullpage" ? "chatHeader.minimize" : "chatHeader.maximize"),
4250
- children: T(e === "fullpage" ? Et : Tt, {})
4136
+ children: T(e === "fullpage" ? Ot : Dt, {})
4251
4137
  }),
4252
4138
  /* @__PURE__ */ T("button", {
4253
4139
  className: "action-btn close-btn",
@@ -4258,28 +4144,28 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4258
4144
  ]
4259
4145
  })]
4260
4146
  });
4261
- }, un = r(({ primaryColor: e }, t) => {
4262
- let { t: n } = Z(), r = g(), { currentChat: i, replyingMessage: o } = _((e) => e.chat), { hasVoice: s, hasAttachment: u, hasMultipleAttachments: d, acceptFilter: m, isFileTypeAllowed: h } = _(Ve), [v, y] = p(""), [b, x] = p(!1), [S, C] = p(!1), [D, O] = p([]), [k, ee] = p(!1), [A, j] = Ye(), [te, M] = p(!1), { showToast: N } = Xe(), P = f(null), F = f(null), I = f(null), ie = f(/* @__PURE__ */ new Map()), ae = (e) => {
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) => {
4263
4149
  y((t) => t + e), x(!1);
4264
- }, oe = async () => {
4265
- await j.startRecording();
4266
- }, B = async () => {
4267
- M(!0);
4150
+ }, z = async () => {
4151
+ await M.startRecording();
4152
+ }, de = async () => {
4153
+ te(!0);
4268
4154
  try {
4269
- await j.stopRecording();
4155
+ await M.stopRecording();
4270
4156
  } finally {
4271
- M(!1);
4157
+ te(!1);
4272
4158
  }
4273
4159
  }, fe = () => {
4274
- A.recordedFile && (O((e) => [...e, A.recordedFile]), j.clearRecording());
4160
+ j.recordedFile && (O((e) => [...e, j.recordedFile]), M.clearRecording());
4275
4161
  }, pe = (e) => {
4276
4162
  let t = `${e.name}-${e.size}`;
4277
- ie.current.has(t) && clearTimeout(ie.current.get(t));
4163
+ I.current.has(t) && clearTimeout(I.current.get(t));
4278
4164
  let n = setTimeout(() => {
4279
- O((e) => e.filter((e) => e.errorId !== t)), ie.current.delete(t);
4165
+ O((e) => e.filter((e) => e.errorId !== t)), I.current.delete(t);
4280
4166
  }, 5e3);
4281
- return ie.current.set(t, n), t;
4282
- }, V = (e) => {
4167
+ return I.current.set(t, n), t;
4168
+ }, me = (e) => {
4283
4169
  if (!e?.length) return;
4284
4170
  if (!u) {
4285
4171
  N("Tính năng đính kèm file chưa được kích hoạt.", "warning");
@@ -4290,7 +4176,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4290
4176
  N("Loại file không được phép.", "error");
4291
4177
  return;
4292
4178
  }
4293
- let n = de([...D, ...t], d, h);
4179
+ let n = ue([...D, ...t], d, h);
4294
4180
  if (n) {
4295
4181
  N(n.message, n.type);
4296
4182
  return;
@@ -4305,17 +4191,17 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4305
4191
  });
4306
4192
  O((e) => [...e, ...r]);
4307
4193
  };
4308
- l(t, () => ({ processPastedFiles: V }));
4309
- let me = (e) => {
4194
+ l(t, () => ({ processPastedFiles: me }));
4195
+ let he = (e) => {
4310
4196
  let t = e.clipboardData;
4311
4197
  if (!t) return;
4312
4198
  if (t.files && t.files.length > 0) {
4313
- e.preventDefault(), V(t.files);
4199
+ e.preventDefault(), me(t.files);
4314
4200
  return;
4315
4201
  }
4316
4202
  let n = t.getData("text/plain");
4317
4203
  n && y((e) => e + n);
4318
- }, he = (e) => {
4204
+ }, V = (e) => {
4319
4205
  let t = e.currentTarget.files;
4320
4206
  if (!t?.length) return;
4321
4207
  let n = () => {
@@ -4330,7 +4216,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4330
4216
  N("Loại file được chọn không được phép.", "error"), n();
4331
4217
  return;
4332
4218
  }
4333
- let i = de([...D, ...r], d, h);
4219
+ let i = ue([...D, ...r], d, h);
4334
4220
  if (i) {
4335
4221
  N(i.message, i.type), n();
4336
4222
  return;
@@ -4352,33 +4238,33 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4352
4238
  c(() => {
4353
4239
  if (!S) return;
4354
4240
  let e = (e) => {
4355
- F.current && !F.current.contains(e.target) && C(!1);
4241
+ re.current && !re.current.contains(e.target) && C(!1);
4356
4242
  };
4357
4243
  return document.addEventListener("click", e), () => {
4358
4244
  document.removeEventListener("click", e);
4359
4245
  };
4360
4246
  }, [S]), c(() => {
4361
- k || I.current?.focus();
4247
+ k || ie.current?.focus();
4362
4248
  }, [k]);
4363
4249
  let ve = async (e, t) => {
4364
4250
  if (i && !(!e && (!t || t.length === 0))) {
4365
- ee(!0);
4251
+ A(!0);
4366
4252
  try {
4367
- let n = le(t ?? []), a = await Promise.all(n.map(async (e) => await ue(e))), { data: s } = await W.addMessage(i.id, e, a, o?.id);
4368
- r(U({
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({
4369
4255
  chat: i,
4370
4256
  message: s
4371
- })), y(""), O([]), x(!1), r(Ee(null));
4257
+ })), y(""), O([]), x(!1), r(ke(null));
4372
4258
  } catch (e) {
4373
4259
  console.error("Error sending message:", e);
4374
4260
  } finally {
4375
- ee(!1);
4261
+ A(!1);
4376
4262
  }
4377
4263
  }
4378
4264
  }, H = () => {
4379
4265
  let e = v.trim();
4380
4266
  if (!e && D.length === 0) return;
4381
- let t = de(D, d, h);
4267
+ let t = ue(D, d, h);
4382
4268
  if (t) {
4383
4269
  N(t.message, t.type);
4384
4270
  return;
@@ -4387,7 +4273,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4387
4273
  }, ye = (e) => {
4388
4274
  e.key === "Enter" && H();
4389
4275
  }, be = (e) => {
4390
- let t = I.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
4276
+ let t = ie.current?.getRootNode(), n = t?.getElementById ? t.getElementById(`chat-message-${e}`) : document.getElementById(`chat-message-${e}`);
4391
4277
  n ? (n.scrollIntoView({
4392
4278
  behavior: "smooth",
4393
4279
  block: "center"
@@ -4418,7 +4304,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4418
4304
  children: e.name
4419
4305
  }), /* @__PURE__ */ T("span", {
4420
4306
  className: `file-size ${r ? "error-size" : ""}`,
4421
- children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` : z(e.size)
4307
+ children: r ? `Vượt quá ${26214400 / (1024 * 1024)} MB` : oe(e.size)
4422
4308
  })]
4423
4309
  })]
4424
4310
  }), /* @__PURE__ */ T("button", {
@@ -4426,19 +4312,14 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4426
4312
  onClick: () => ge(t),
4427
4313
  title: n("chatInput.removeFile"),
4428
4314
  disabled: k,
4429
- style: {
4430
- opacity: k ? .5 : 1,
4431
- cursor: k ? "not-allowed" : "pointer"
4432
- },
4433
4315
  children: "✕"
4434
4316
  })]
4435
- }, R(e));
4317
+ }, ae(e));
4436
4318
  })
4437
4319
  }),
4438
4320
  o && /* @__PURE__ */ E("div", {
4439
4321
  className: "reply-input-preview",
4440
4322
  onClick: () => be(o.id),
4441
- style: { cursor: "pointer" },
4442
4323
  children: [
4443
4324
  /* @__PURE__ */ E("div", {
4444
4325
  className: "reply-content",
@@ -4457,17 +4338,17 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4457
4338
  /* @__PURE__ */ T("button", {
4458
4339
  className: "close-reply",
4459
4340
  onClick: (e) => {
4460
- e.stopPropagation(), r(Ee(null));
4341
+ e.stopPropagation(), r(ke(null));
4461
4342
  },
4462
4343
  children: "✕"
4463
4344
  }),
4464
4345
  /* @__PURE__ */ T("div", {
4465
4346
  className: "reply-icon",
4466
- children: /* @__PURE__ */ T(Dt, {})
4347
+ children: /* @__PURE__ */ T(kt, {})
4467
4348
  })
4468
4349
  ]
4469
4350
  }),
4470
- A.isRecording ? /* @__PURE__ */ E("div", {
4351
+ j.isRecording ? /* @__PURE__ */ E("div", {
4471
4352
  className: "voice-recording-container",
4472
4353
  children: [/* @__PURE__ */ E("div", {
4473
4354
  className: "voice-recording-info",
@@ -4479,27 +4360,27 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4479
4360
  })]
4480
4361
  }), /* @__PURE__ */ T("span", {
4481
4362
  className: "recording-duration",
4482
- children: ne(A.duration)
4363
+ children: ne(j.duration)
4483
4364
  })]
4484
4365
  }), /* @__PURE__ */ E("div", {
4485
4366
  className: "voice-recording-controls",
4486
4367
  children: [/* @__PURE__ */ T("button", {
4487
4368
  className: "voice-control-btn cancel-btn",
4488
- onClick: () => j.cancelRecording(),
4369
+ onClick: () => M.cancelRecording(),
4489
4370
  title: n("chatInput.cancelRecording"),
4490
- disabled: te,
4371
+ disabled: ee,
4491
4372
  children: "✕"
4492
4373
  }), /* @__PURE__ */ T("button", {
4493
4374
  className: "voice-control-btn stop-btn",
4494
4375
  onClick: () => {
4495
- B();
4376
+ de();
4496
4377
  },
4497
4378
  title: n("chatInput.stopRecording"),
4498
- disabled: te,
4499
- children: te ? "⏳" : "⏹"
4379
+ disabled: ee,
4380
+ children: ee ? "⏳" : "⏹"
4500
4381
  })]
4501
4382
  })]
4502
- }) : A.recordedFile ? /* @__PURE__ */ E("div", {
4383
+ }) : j.recordedFile ? /* @__PURE__ */ E("div", {
4503
4384
  className: "voice-recorded-container",
4504
4385
  children: [/* @__PURE__ */ E("div", {
4505
4386
  className: "voice-recorded-info",
@@ -4514,7 +4395,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4514
4395
  }),
4515
4396
  /* @__PURE__ */ T("span", {
4516
4397
  className: "voice-duration",
4517
- children: ne(A.duration)
4398
+ children: ne(j.duration)
4518
4399
  })
4519
4400
  ]
4520
4401
  }), /* @__PURE__ */ E("div", {
@@ -4522,13 +4403,13 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4522
4403
  children: [
4523
4404
  /* @__PURE__ */ T("button", {
4524
4405
  className: "voice-control-btn play-btn",
4525
- onClick: () => j.playback(),
4406
+ onClick: () => M.playback(),
4526
4407
  title: n("chatInput.playRecording"),
4527
4408
  children: "▶"
4528
4409
  }),
4529
4410
  /* @__PURE__ */ T("button", {
4530
4411
  className: "voice-control-btn discard-btn",
4531
- onClick: () => j.clearRecording(),
4412
+ onClick: () => M.clearRecording(),
4532
4413
  title: n("chatInput.discardRecording"),
4533
4414
  children: "✕"
4534
4415
  }),
@@ -4546,9 +4427,9 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4546
4427
  children: [
4547
4428
  b && /* @__PURE__ */ T("div", {
4548
4429
  className: "emoji-picker",
4549
- children: re.map((e) => /* @__PURE__ */ T("button", {
4430
+ children: F.map((e) => /* @__PURE__ */ T("button", {
4550
4431
  className: "emoji-btn",
4551
- onClick: () => ae(e),
4432
+ onClick: () => R(e),
4552
4433
  children: e
4553
4434
  }, e))
4554
4435
  }),
@@ -4556,7 +4437,7 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4556
4437
  ref: P,
4557
4438
  type: "file",
4558
4439
  multiple: !0,
4559
- onChange: he,
4440
+ onChange: V,
4560
4441
  accept: m,
4561
4442
  className: "display-none"
4562
4443
  }),
@@ -4568,76 +4449,67 @@ var xt = Q("AddMember", /* @__PURE__ */ E(w, { children: [
4568
4449
  onClick: () => _e(),
4569
4450
  title: n("chatInput.selectFiles"),
4570
4451
  disabled: k,
4571
- children: /* @__PURE__ */ T(Ot, {})
4452
+ children: /* @__PURE__ */ T(At, {})
4572
4453
  }),
4573
4454
  u && /* @__PURE__ */ T("button", {
4574
4455
  className: "action-btn",
4575
4456
  onClick: () => _e(),
4576
4457
  title: n("chatInput.selectFiles"),
4577
4458
  disabled: k,
4578
- children: /* @__PURE__ */ T(kt, {})
4459
+ children: /* @__PURE__ */ T(jt, {})
4579
4460
  }),
4580
4461
  s && /* @__PURE__ */ T("button", {
4581
4462
  className: "action-btn",
4582
- onClick: () => void oe(),
4463
+ onClick: () => void z(),
4583
4464
  title: n("chatInput.recordVoice"),
4584
4465
  disabled: k,
4585
- children: /* @__PURE__ */ T(At, {})
4466
+ children: /* @__PURE__ */ T(Mt, {})
4586
4467
  }),
4587
4468
  /* @__PURE__ */ T("button", {
4588
4469
  className: `action-btn ${b ? "active" : ""}`,
4589
4470
  onClick: () => x(!b),
4590
4471
  title: "emoji",
4591
4472
  disabled: k,
4592
- children: /* @__PURE__ */ T(jt, {})
4473
+ children: /* @__PURE__ */ T(Nt, {})
4593
4474
  })
4594
4475
  ]
4595
4476
  }),
4596
4477
  /* @__PURE__ */ T("div", {
4597
4478
  className: "chat-input-container",
4598
4479
  children: /* @__PURE__ */ T("input", {
4599
- ref: I,
4480
+ ref: ie,
4600
4481
  type: "text",
4601
4482
  className: "chat-input",
4602
4483
  placeholder: n("chatInput.placeholder"),
4603
4484
  value: v,
4604
4485
  onChange: (e) => y(e.target.value),
4605
4486
  onKeyPress: ye,
4606
- onPaste: me,
4607
- disabled: k,
4608
- style: {
4609
- opacity: k ? .6 : 1,
4610
- cursor: k ? "not-allowed" : "text"
4611
- }
4487
+ onPaste: he,
4488
+ disabled: k
4612
4489
  })
4613
4490
  }),
4614
4491
  /* @__PURE__ */ T("button", {
4615
4492
  className: "send-btn",
4616
4493
  onClick: H,
4617
4494
  disabled: k || !v.trim() && D.length === 0,
4618
- style: {
4619
- background: k || !v.trim() && D.length === 0 ? "#d1d5db" : e ?? "#8aaeff",
4620
- opacity: k || !v.trim() && D.length === 0 ? .6 : 1,
4621
- cursor: k || !v.trim() && D.length === 0 ? "not-allowed" : "pointer"
4622
- },
4623
- children: k ? "⏳" : /* @__PURE__ */ T(Mt, {})
4495
+ children: k ? "⏳" : /* @__PURE__ */ T(Pt, {})
4624
4496
  })
4625
4497
  ]
4626
4498
  })
4627
4499
  ] });
4628
4500
  });
4629
- un.displayName = "ChatInput";
4501
+ fn.displayName = "ChatInput";
4630
4502
  //#endregion
4631
4503
  //#region src/components/view/ContactList.tsx
4632
- var dn = [{
4504
+ var pn = [{
4633
4505
  label: "A-Z",
4634
4506
  value: "asc",
4635
- icon: /* @__PURE__ */ T(Nt, {})
4507
+ icon: /* @__PURE__ */ T(Ft, {})
4636
4508
  }, {
4637
4509
  label: "Z-A",
4638
4510
  value: "desc",
4639
- icon: /* @__PURE__ */ T(Pt, {})
4640
- }], fn = [
4511
+ icon: /* @__PURE__ */ T(It, {})
4512
+ }], mn = [
4641
4513
  {
4642
4514
  label: "Tất cả",
4643
4515
  value: "all"
@@ -4650,68 +4522,58 @@ var dn = [{
4650
4522
  label: "Offline",
4651
4523
  value: "offline"
4652
4524
  }
4653
- ], pn = ({ members: e, onMessageClick: t }) => {
4654
- let [n, r] = p(""), [i, a] = p("asc"), [o, s] = p(!1), [c, l] = p("all"), [u, f] = p(!1), m = d(() => {
4655
- let t = e.filter((e) => e.name.toLowerCase().includes(n.toLowerCase()));
4656
- return c === "online" ? t = t.filter((e) => (e.socket_ids?.length ?? 0) > 0) : c === "offline" && (t = t.filter((e) => (e.socket_ids?.length ?? 0) === 0)), [...t].sort((e, t) => {
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) => {
4657
4529
  let n = e.name.localeCompare(t.name);
4658
- return i === "asc" ? n : -n;
4530
+ return r === "asc" ? n : -n;
4659
4531
  });
4660
4532
  }, [
4661
- e,
4662
- n,
4663
- i,
4664
- c
4533
+ f,
4534
+ t,
4535
+ r,
4536
+ s
4665
4537
  ]), h = d(() => {
4666
4538
  let e = /* @__PURE__ */ new Set();
4667
4539
  m.forEach((t) => {
4668
4540
  t.name && e.add(t.name.charAt(0).toUpperCase());
4669
4541
  });
4670
4542
  let t = Array.from(e);
4671
- return i === "asc" ? t.sort((e, t) => e.localeCompare(t)) : t.sort((e, t) => t.localeCompare(e));
4672
- }, [m, i]);
4543
+ return r === "asc" ? t.sort((e, t) => e.localeCompare(t)) : t.sort((e, t) => t.localeCompare(e));
4544
+ }, [m, r]);
4673
4545
  return /* @__PURE__ */ E("div", {
4674
4546
  className: "contact-list-view",
4675
4547
  children: [
4676
4548
  /* @__PURE__ */ T("div", {
4677
4549
  className: "contact-list-header",
4678
- children: /* @__PURE__ */ E("div", {
4679
- style: {
4680
- display: "flex",
4681
- alignItems: "center",
4682
- gap: "8px"
4683
- },
4684
- children: [/* @__PURE__ */ T(ot, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })]
4685
- })
4550
+ children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách thành viên" })] })
4686
4551
  }),
4687
4552
  /* @__PURE__ */ E("div", {
4688
4553
  className: "contact-list-toolbar",
4689
- style: { gap: "12px" },
4690
4554
  children: [/* @__PURE__ */ E("div", {
4691
4555
  className: "toolbar-search",
4692
- style: { flex: 1 },
4693
- children: [/* @__PURE__ */ T(ht, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4556
+ children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4694
4557
  type: "text",
4695
4558
  placeholder: "Tìm bạn",
4696
- value: n,
4697
- onChange: (e) => r(e.target.value)
4559
+ value: t,
4560
+ onChange: (e) => n(e.target.value)
4698
4561
  })]
4699
4562
  }), /* @__PURE__ */ E("div", {
4700
4563
  className: "toolbar-right",
4701
4564
  children: [/* @__PURE__ */ E("div", {
4702
4565
  className: "filter-select",
4703
4566
  onClick: () => {
4704
- s(!o), f(!1);
4567
+ o(!a), u(!1);
4705
4568
  },
4706
- style: { position: "relative" },
4707
4569
  children: [
4708
- /* @__PURE__ */ T("span", { children: i === "asc" ? "Tên (A-Z)" : "Tên (Z-A)" }),
4709
- /* @__PURE__ */ T(St, {}),
4710
- o && /* @__PURE__ */ T("div", {
4570
+ /* @__PURE__ */ T("span", { children: r === "asc" ? "Tên (A-Z)" : "Tên (Z-A)" }),
4571
+ /* @__PURE__ */ T(wt, {}),
4572
+ a && /* @__PURE__ */ T("div", {
4711
4573
  className: "dropdown-select",
4712
- children: dn.map((e) => /* @__PURE__ */ E("div", {
4574
+ children: pn.map((e) => /* @__PURE__ */ E("div", {
4713
4575
  onClick: () => {
4714
- a(e.value), s(!1);
4576
+ i(e.value), o(!1);
4715
4577
  },
4716
4578
  className: "dropdown-item",
4717
4579
  children: [e.icon, /* @__PURE__ */ T("div", { children: e.label })]
@@ -4721,17 +4583,16 @@ var dn = [{
4721
4583
  }), /* @__PURE__ */ E("div", {
4722
4584
  className: "filter-select",
4723
4585
  onClick: () => {
4724
- f(!u), s(!1);
4586
+ u(!l), o(!1);
4725
4587
  },
4726
- style: { position: "relative" },
4727
4588
  children: [
4728
- /* @__PURE__ */ T("span", { children: fn.find((e) => e.value === c)?.label }),
4729
- /* @__PURE__ */ T(St, {}),
4730
- u && /* @__PURE__ */ T("div", {
4589
+ /* @__PURE__ */ T("span", { children: mn.find((e) => e.value === s)?.label }),
4590
+ /* @__PURE__ */ T(wt, {}),
4591
+ l && /* @__PURE__ */ T("div", {
4731
4592
  className: "dropdown-select",
4732
- children: fn.map((e) => /* @__PURE__ */ T("div", {
4593
+ children: mn.map((e) => /* @__PURE__ */ T("div", {
4733
4594
  onClick: () => {
4734
- l(e.value), f(!1);
4595
+ c(e.value), u(!1);
4735
4596
  },
4736
4597
  className: "dropdown-item",
4737
4598
  children: /* @__PURE__ */ T("div", { children: e.label })
@@ -4743,46 +4604,31 @@ var dn = [{
4743
4604
  }),
4744
4605
  /* @__PURE__ */ T("div", {
4745
4606
  className: "contact-scroll-area",
4746
- children: h.map((e) => {
4747
- let n = m.filter((t) => t.name.charAt(0).toUpperCase() === e);
4607
+ children: h.map((t) => {
4608
+ let n = m.filter((e) => e.name.charAt(0).toUpperCase() === t);
4748
4609
  return /* @__PURE__ */ E("div", {
4749
4610
  className: "contact-letter-group",
4750
4611
  children: [/* @__PURE__ */ T("div", {
4751
4612
  className: "letter-title",
4752
- children: e
4753
- }), n.map((e) => /* @__PURE__ */ E("div", {
4613
+ children: t
4614
+ }), n.map((t) => /* @__PURE__ */ E("div", {
4754
4615
  className: "contact-item-row",
4755
4616
  children: [/* @__PURE__ */ E("div", {
4756
4617
  className: "contact-item-left",
4757
4618
  children: [/* @__PURE__ */ E("div", {
4758
4619
  className: "contact-avatar",
4759
- children: [e.avatar ? /* @__PURE__ */ T("img", {
4760
- src: e.avatar,
4620
+ children: [t.avatar ? /* @__PURE__ */ T("img", {
4621
+ src: t.avatar,
4761
4622
  alt: ""
4762
4623
  }) : /* @__PURE__ */ T("div", {
4763
4624
  className: "avatar-placeholder",
4764
- style: {
4765
- background: "#3b82f6",
4766
- color: "white",
4767
- width: "40px",
4768
- height: "40px",
4769
- borderRadius: "50%",
4770
- display: "flex",
4771
- alignItems: "center",
4772
- justifyContent: "center",
4773
- fontSize: "16px",
4774
- fontWeight: "600"
4775
- },
4776
- children: e.name.charAt(0)
4777
- }), /* @__PURE__ */ T("div", {
4778
- className: "online-status",
4779
- style: { background: (e.socket_ids?.length ?? 0) > 0 ? "#22c55e" : "#94a3b8" }
4780
- })]
4625
+ children: t.name.charAt(0)
4626
+ }), /* @__PURE__ */ T("div", { className: `online-status ${(t.socket_ids?.length ?? 0) > 0 ? "is-online" : "is-offline"}` })]
4781
4627
  }), /* @__PURE__ */ E("div", {
4782
4628
  className: "contact-info",
4783
4629
  children: [/* @__PURE__ */ T("div", {
4784
4630
  className: "contact-name",
4785
- children: e.name
4631
+ children: t.name
4786
4632
  }), /* @__PURE__ */ T("div", {
4787
4633
  className: "contact-role",
4788
4634
  children: "Nhân viên"
@@ -4792,28 +4638,20 @@ var dn = [{
4792
4638
  className: "contact-item-actions",
4793
4639
  children: [/* @__PURE__ */ T("button", {
4794
4640
  className: "contact-action-btn",
4795
- style: {
4796
- border: "none",
4797
- background: "transparent"
4798
- },
4799
- children: /* @__PURE__ */ T(at, { size: 16 })
4641
+ children: /* @__PURE__ */ T(st, { size: 16 })
4800
4642
  }), /* @__PURE__ */ T("button", {
4801
4643
  className: "contact-action-btn",
4802
- style: {
4803
- border: "none",
4804
- background: "transparent"
4805
- },
4806
- onClick: () => t(String(e.id)),
4807
- children: /* @__PURE__ */ T(ft, { size: 16 })
4644
+ onClick: () => e(String(t.id)),
4645
+ children: /* @__PURE__ */ T(mt, { size: 16 })
4808
4646
  })]
4809
4647
  })]
4810
- }, e.id))]
4811
- }, e);
4648
+ }, t.id))]
4649
+ }, t);
4812
4650
  })
4813
4651
  })
4814
4652
  ]
4815
4653
  });
4816
- }, mn = ({ groups: e, onGroupClick: t, currentUserId: n }) => {
4654
+ }, gn = ({ groups: e, onGroupClick: t, currentUserId: n }) => {
4817
4655
  let [r, i] = p(""), a = d(() => e.filter((e) => e.name?.toLowerCase().includes(r.toLowerCase())), [e, r]);
4818
4656
  return /* @__PURE__ */ E("div", {
4819
4657
  className: "contact-list-view",
@@ -4826,7 +4664,7 @@ var dn = [{
4826
4664
  alignItems: "center",
4827
4665
  gap: "8px"
4828
4666
  },
4829
- children: [/* @__PURE__ */ T(ot, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
4667
+ children: [/* @__PURE__ */ T(ct, {}), /* @__PURE__ */ T("div", { children: "Danh sách nhóm và cộng đồng" })]
4830
4668
  })
4831
4669
  }),
4832
4670
  /* @__PURE__ */ T("div", {
@@ -4835,7 +4673,7 @@ var dn = [{
4835
4673
  children: /* @__PURE__ */ E("div", {
4836
4674
  className: "toolbar-search",
4837
4675
  style: { flex: 1 },
4838
- children: [/* @__PURE__ */ T(ht, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4676
+ children: [/* @__PURE__ */ T(_t, { strokeColor: "#94a3b8" }), /* @__PURE__ */ T("input", {
4839
4677
  type: "text",
4840
4678
  placeholder: "Tìm nhóm",
4841
4679
  value: r,
@@ -4856,7 +4694,7 @@ var dn = [{
4856
4694
  className: "contact-item-left",
4857
4695
  children: [/* @__PURE__ */ T("div", {
4858
4696
  className: "contact-avatar",
4859
- children: /* @__PURE__ */ T(Ut, {
4697
+ children: /* @__PURE__ */ T(Gt, {
4860
4698
  chat: e,
4861
4699
  currentUserId: n
4862
4700
  })
@@ -4876,7 +4714,7 @@ var dn = [{
4876
4714
  })
4877
4715
  ]
4878
4716
  });
4879
- }, hn = ({ file: e, children: t, className: n = "file-item", isLink: r = !1, handleImageClick: i }) => {
4717
+ }, _n = ({ file: e, children: t, className: n = "file-item", isLink: r = !1, handleImageClick: i }) => {
4880
4718
  let a = {
4881
4719
  className: n,
4882
4720
  role: "button",
@@ -4896,7 +4734,7 @@ var dn = [{
4896
4734
  ...a,
4897
4735
  children: t
4898
4736
  });
4899
- }, gn = ({ file: e }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
4737
+ }, vn = ({ file: e }) => /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
4900
4738
  className: "file-icon",
4901
4739
  children: L(e.ext)
4902
4740
  }), /* @__PURE__ */ E("div", {
@@ -4906,13 +4744,13 @@ var dn = [{
4906
4744
  children: e.name
4907
4745
  }), /* @__PURE__ */ T("div", {
4908
4746
  className: "file-size",
4909
- children: z(e.size)
4747
+ children: oe(e.size)
4910
4748
  })]
4911
- })] }), _n = ({ files: e }) => {
4912
- let { openViewer: t } = qe();
4749
+ })] }), yn = ({ files: e }) => {
4750
+ let { openViewer: t } = Ye();
4913
4751
  if (!e || e.length === 0) return null;
4914
4752
  let n = e.filter((e) => {
4915
- let t = oe(e.name);
4753
+ let t = z(e.name);
4916
4754
  return [
4917
4755
  "image",
4918
4756
  "video",
@@ -4923,8 +4761,8 @@ var dn = [{
4923
4761
  let r = e.findIndex((e) => e.id === n);
4924
4762
  r !== -1 && t(e, r);
4925
4763
  }, s = (e) => {
4926
- switch (oe(e.name)) {
4927
- case "image": return r.includes(e) ? /* @__PURE__ */ E(hn, {
4764
+ switch (z(e.name)) {
4765
+ case "image": return r.includes(e) ? /* @__PURE__ */ E(_n, {
4928
4766
  file: e,
4929
4767
  className: "file-image-wrapper",
4930
4768
  handleImageClick: o,
@@ -4940,7 +4778,7 @@ var dn = [{
4940
4778
  })
4941
4779
  })]
4942
4780
  }, e.id) : null;
4943
- case "video": return /* @__PURE__ */ E(hn, {
4781
+ case "video": return /* @__PURE__ */ E(_n, {
4944
4782
  file: e,
4945
4783
  className: "file-image-wrapper",
4946
4784
  handleImageClick: o,
@@ -4958,16 +4796,16 @@ var dn = [{
4958
4796
  })]
4959
4797
  }, e.id);
4960
4798
  case "pdf":
4961
- case "audio": return /* @__PURE__ */ T(hn, {
4799
+ case "audio": return /* @__PURE__ */ T(_n, {
4962
4800
  file: e,
4963
4801
  handleImageClick: o,
4964
- children: /* @__PURE__ */ T(gn, { file: e })
4802
+ children: /* @__PURE__ */ T(vn, { file: e })
4965
4803
  }, e.id);
4966
- default: return /* @__PURE__ */ T(hn, {
4804
+ default: return /* @__PURE__ */ T(_n, {
4967
4805
  file: e,
4968
4806
  isLink: !0,
4969
4807
  handleImageClick: o,
4970
- children: /* @__PURE__ */ T(gn, { file: e })
4808
+ children: /* @__PURE__ */ T(vn, { file: e })
4971
4809
  }, e.id);
4972
4810
  }
4973
4811
  };
@@ -4975,13 +4813,13 @@ var dn = [{
4975
4813
  className: "message-files",
4976
4814
  children: e.map((e) => s(e))
4977
4815
  });
4978
- }, vn = ({ message: e }) => {
4979
- let { currentUser: t, currentChat: n, currentChatMessages: r } = _((e) => e.chat), { allowDeleteMessage: i, allowRevokeMessage: a } = _(Ve), o = g(), { t: s } = Z(), c = e.member.code === t?.code, [l, u] = p(!1), f = new Date(e.created_at).toLocaleTimeString([], {
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([], {
4980
4818
  hour: "2-digit",
4981
4819
  minute: "2-digit"
4982
4820
  }), m = async (t) => {
4983
4821
  if (n) try {
4984
- await W.actionMessage(n.id, e.id, t);
4822
+ await G.actionMessage(n.id, e.id, t);
4985
4823
  } catch (e) {
4986
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!");
4987
4825
  }
@@ -5006,12 +4844,6 @@ var dn = [{
5006
4844
  className: "message-content",
5007
4845
  children: /* @__PURE__ */ T("div", {
5008
4846
  className: `message-bubble ${c ? "current-user" : "other-user"} revoked`,
5009
- style: {
5010
- fontStyle: "italic",
5011
- opacity: .8,
5012
- background: "rgba(255, 255, 255, 0.05)",
5013
- border: "1px dashed rgba(255, 255, 255, 0.2)"
5014
- },
5015
4847
  children: /* @__PURE__ */ T("div", {
5016
4848
  className: "message-text",
5017
4849
  children: s("chatMessage.states.revoked")
@@ -5043,50 +4875,50 @@ var dn = [{
5043
4875
  className: "action-icon",
5044
4876
  title: s("chatMessage.actions.like"),
5045
4877
  onClick: () => void m("like"),
5046
- children: /* @__PURE__ */ T(Ft, {})
4878
+ children: /* @__PURE__ */ T(Lt, {})
5047
4879
  }),
5048
4880
  /* @__PURE__ */ T("button", {
5049
4881
  className: "action-icon",
5050
4882
  title: s("chatMessage.actions.love"),
5051
4883
  onClick: () => void m("love"),
5052
- children: /* @__PURE__ */ T(It, {})
4884
+ children: /* @__PURE__ */ T(Rt, {})
5053
4885
  }),
5054
4886
  /* @__PURE__ */ T("button", {
5055
4887
  className: "action-icon",
5056
4888
  title: s("chatMessage.actions.reply"),
5057
- onClick: () => o(Ee(e)),
5058
- children: /* @__PURE__ */ T(Dt, {})
4889
+ onClick: () => o(ke(e)),
4890
+ children: /* @__PURE__ */ T(kt, {})
5059
4891
  }),
5060
4892
  i(e.created_at) && /* @__PURE__ */ T("button", {
5061
4893
  className: "action-icon",
5062
4894
  title: s("chatMessage.actions.delete"),
5063
4895
  onClick: () => void m("remove"),
5064
- children: /* @__PURE__ */ T(Lt, {})
4896
+ children: /* @__PURE__ */ T(zt, {})
5065
4897
  }),
5066
4898
  a(e.created_at) && /* @__PURE__ */ T("button", {
5067
4899
  className: "action-icon",
5068
4900
  title: s("chatMessage.actions.revoke"),
5069
4901
  onClick: () => void m("revoke"),
5070
- children: /* @__PURE__ */ T(Rt, {})
4902
+ children: /* @__PURE__ */ T(Bt, {})
5071
4903
  })
5072
4904
  ] }) : /* @__PURE__ */ E(w, { children: [
5073
4905
  /* @__PURE__ */ T("button", {
5074
4906
  className: "action-icon",
5075
4907
  title: s("chatMessage.actions.reply"),
5076
- onClick: () => o(Ee(e)),
5077
- children: /* @__PURE__ */ T(Dt, {})
4908
+ onClick: () => o(ke(e)),
4909
+ children: /* @__PURE__ */ T(kt, {})
5078
4910
  }),
5079
4911
  /* @__PURE__ */ T("button", {
5080
4912
  className: "action-icon",
5081
4913
  title: s("chatMessage.actions.like"),
5082
4914
  onClick: () => void m("like"),
5083
- children: /* @__PURE__ */ T(Ft, {})
4915
+ children: /* @__PURE__ */ T(Lt, {})
5084
4916
  }),
5085
4917
  /* @__PURE__ */ T("button", {
5086
4918
  className: "action-icon",
5087
4919
  title: s("chatMessage.actions.love"),
5088
4920
  onClick: () => void m("love"),
5089
- children: /* @__PURE__ */ T(It, {})
4921
+ children: /* @__PURE__ */ T(Rt, {})
5090
4922
  })
5091
4923
  ] })
5092
4924
  }),
@@ -5095,7 +4927,6 @@ var dn = [{
5095
4927
  children: [e.reply && /* @__PURE__ */ E("div", {
5096
4928
  className: "message-reply-preview",
5097
4929
  onClick: (t) => h(t, e.reply.id),
5098
- style: { cursor: "pointer" },
5099
4930
  children: [/* @__PURE__ */ T("div", {
5100
4931
  className: "reply-user-name",
5101
4932
  children: e.reply.member.name
@@ -5120,7 +4951,7 @@ var dn = [{
5120
4951
  })] })
5121
4952
  })]
5122
4953
  }) : null,
5123
- /* @__PURE__ */ T(_n, { files: e.files }),
4954
+ /* @__PURE__ */ T(yn, { files: e.files }),
5124
4955
  e.action && (e.action.like > 0 || e.action.love > 0) && /* @__PURE__ */ E("div", {
5125
4956
  className: "message-reactions-badge",
5126
4957
  children: [e.action.like > 0 && /* @__PURE__ */ T("span", { children: "👍" }), e.action.love > 0 && /* @__PURE__ */ T("span", { children: "♥️" })]
@@ -5131,21 +4962,21 @@ var dn = [{
5131
4962
  className: "message-time",
5132
4963
  children: [f, c && (b || x) && /* @__PURE__ */ T("span", {
5133
4964
  className: `message-item-status ${b ? "seen" : ""}`,
5134
- children: b ? /* @__PURE__ */ T(zt, { style: { marginBottom: "-2px" } }) : `• ${s("chatMessage.status.sent")}`
4965
+ children: b ? /* @__PURE__ */ T(Vt, {}) : `• ${s("chatMessage.status.sent")}`
5135
4966
  })]
5136
4967
  })
5137
4968
  ]
5138
4969
  })]
5139
4970
  });
5140
- }, yn = () => {
4971
+ }, xn = () => {
5141
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);
5142
4973
  c(() => {
5143
4974
  (async () => {
5144
4975
  if (t && x.current !== Number(t.id)) {
5145
4976
  x.current = Number(t.id);
5146
4977
  try {
5147
- let e = W.getMessages(t.id, 20, 1), n = t.type === "group" ? W.getMembers(t.id).then((e) => e.data ?? []) : Promise.resolve(t.members ?? []), [r, i] = await Promise.all([e, n]);
5148
- r?.data && (o(me(r.data)), o(H(r.pagination)), o(he(i)));
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]);
4979
+ r?.data && (o(ge(r.data)), o(be(r.pagination)), o(_e(i)));
5149
4980
  } catch (e) {
5150
4981
  console.error("Lỗi khi tải tin nhắn:", e), x.current = null;
5151
4982
  }
@@ -5158,7 +4989,7 @@ var dn = [{
5158
4989
  ]), c(() => {
5159
4990
  if (t && n.length > 0) {
5160
4991
  let e = n[0], r = t.new?.[i?.id ?? 0] > 0;
5161
- e.member.code !== i?.code && r && W.readChat(t.id);
4992
+ e.member.code !== i?.code && r && G.readChat(t.id);
5162
4993
  }
5163
4994
  }, [
5164
4995
  t,
@@ -5171,8 +5002,8 @@ var dn = [{
5171
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) {
5172
5003
  S.current = !0, m(!0);
5173
5004
  try {
5174
- let e = r.current_page + 1, n = await W.getMessages(Number(t?.id), 20, e);
5175
- n.data && (o(ye(n.data)), o(H(n.pagination)));
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)));
5176
5007
  } catch (e) {
5177
5008
  console.error("Load more error", e);
5178
5009
  } finally {
@@ -5221,7 +5052,7 @@ var dn = [{
5221
5052
  },
5222
5053
  children: n.map((t, r) => {
5223
5054
  let i = new Date(t.created_at).toDateString(), a = n[r + 1], o = i !== (a ? new Date(a.created_at).toDateString() : null);
5224
- return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(vn, { message: t }), o && /* @__PURE__ */ T("div", {
5055
+ return /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(bn, { message: t }), o && /* @__PURE__ */ T("div", {
5225
5056
  className: "chat-date-divider",
5226
5057
  children: /* @__PURE__ */ T("span", { children: N(t.created_at) })
5227
5058
  })] }, t.id);
@@ -5235,9 +5066,9 @@ var dn = [{
5235
5066
  };
5236
5067
  //#endregion
5237
5068
  //#region src/index.ts
5238
- function bn(e) {
5069
+ function Sn(e) {
5239
5070
  let t = document.createElement("div");
5240
- t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(et, e));
5071
+ t.id = "chatbot-widget-umd-root", document.body.appendChild(t), m(t).render(n(nt, e));
5241
5072
  }
5242
5073
  //#endregion
5243
- export { et as ChatWidget, bn as init };
5074
+ export { nt as ChatWidget, Sn as init };