Linux server1.signalhg.team 4.18.0-553.134.1.el8_10.x86_64 #1 SMP Tue Jun 16 16:05:57 EDT 2026 x86_64
Apache
: 209.74.80.147 | : 216.73.216.236
150 Domain
8.1.34
signgwph
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
signgwph /
signaltechs.io /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
.htaccess
127
B
-r--r--r--
.mad-root
0
B
-rw-r--r--
AboutPage-BFl-6cdQ-xcVGd7Gs.js
11.09
KB
-rw-r--r--
AboutPage-BFl-6cdQ.js
11.01
KB
-rw-r--r--
AboutPage-CRYHjz8B.js
11.08
KB
-rw-r--r--
AboutPage-D8o4mb0o.js
11.01
KB
-rw-r--r--
AccountDock-CByk1p32-CvIHjYO8....
5.12
KB
-rw-r--r--
AccountDock-CByk1p32.js
5.09
KB
-rw-r--r--
AccountDock-McBBbuGp.js
5.09
KB
-rw-r--r--
AccountDock-jB2pi2PH.js
4.55
KB
-rw-r--r--
AdminPanelPage-BKaudkeA-BfT7Qn...
65.79
KB
-rw-r--r--
AdminPanelPage-BKaudkeA.js
65.75
KB
-rw-r--r--
AdminPanelPage-hxg7mlUz.js
65.77
KB
-rw-r--r--
AdminPanelPage-kvHyxrbX.js
65.78
KB
-rw-r--r--
AuthPage-CWZaRQ53.js
7.93
KB
-rw-r--r--
AuthPage-D2oEk9fK.js
7.93
KB
-rw-r--r--
AuthPage-IoEHnwV2-DMx3f31D.js
7.99
KB
-rw-r--r--
AuthPage-IoEHnwV2.js
7.93
KB
-rw-r--r--
BlogPage-DGMv-nlg.js
1.05
KB
-rw-r--r--
Button-BI6JHCK5.js
894
B
-rw-r--r--
Button-D2wDOozD-BtIMHGpv.js
898
B
-rw-r--r--
Button-D2wDOozD.js
894
B
-rw-r--r--
Button-DPbE3uKx.js
894
B
-rw-r--r--
ClientDashboardPage-BFRChU8j.j...
21.08
KB
-rw-r--r--
ClientDashboardPage-D7gOu81u-C...
21.13
KB
-rw-r--r--
ClientDashboardPage-D7gOu81u.j...
21.04
KB
-rw-r--r--
ClientDashboardPage-DAtumH_H.j...
21.11
KB
-rw-r--r--
ContactPage-BnwClT5m-pkrl2KVG....
9.63
KB
-rw-r--r--
ContactPage-BnwClT5m.js
9.53
KB
-rw-r--r--
ContactPage-CQKICACj.js
9.59
KB
-rw-r--r--
ContactPage-Dyl_poQ9.js
9.53
KB
-rw-r--r--
DemoShellPage-BDFaqClQ-N4jADs2...
11.26
KB
-rw-r--r--
DemoShellPage-BDFaqClQ.js
11.17
KB
-rw-r--r--
DemoShellPage-CXk-WyIs.js
13.31
KB
-rw-r--r--
DemoShellPage-CnphZX4a.js
11.17
KB
-rw-r--r--
ProductDetailsPage--xf82Wdc.js
12.51
KB
-rw-r--r--
ProductDetailsPage-Bst2BMXl.js
12.58
KB
-rw-r--r--
ProductDetailsPage-DbsKzKmO-Bo...
12.6
KB
-rw-r--r--
ProductDetailsPage-DbsKzKmO.js
12.51
KB
-rw-r--r--
ScrollTrigger-7Zy99s9Q-BPq82Yl...
42.93
KB
-rw-r--r--
ScrollTrigger-7Zy99s9Q.js
42.96
KB
-rw-r--r--
SiteChrome-CkbUXxf_.js
7.16
KB
-rw-r--r--
SiteChrome-D3D3Aw-2.js
6.2
KB
-rw-r--r--
SiteChrome-DJFTF4Ff-Fp7FHZ2Q.j...
6.58
KB
-rw-r--r--
SiteChrome-DJFTF4Ff.js
6.56
KB
-rw-r--r--
StorePage-CCLakifp.js
22.82
KB
-rw-r--r--
StorePage-Cca-p5Z_-D_zPBVRK.js
22.89
KB
-rw-r--r--
StorePage-Cca-p5Z_.js
22.75
KB
-rw-r--r--
StorePage-D3IosLOe.js
22.75
KB
-rw-r--r--
arrow-right-1RKBaJm4.js
344
B
-rw-r--r--
arrow-right-DF_6IH5_-B53OQOKh....
348
B
-rw-r--r--
arrow-right-DF_6IH5_.js
344
B
-rw-r--r--
arrow-right-DwjVqvji.js
344
B
-rw-r--r--
circle-check-B9su1Bzf.js
352
B
-rw-r--r--
circle-check-CTBPBmCf-n9VsgXx6...
366
B
-rw-r--r--
circle-check-CTBPBmCf.js
352
B
-rw-r--r--
circle-check-u9adkwRC.js
352
B
-rw-r--r--
clock-3-Cu3htX6m-rnEJxpV8.js
370
B
-rw-r--r--
clock-3-Cu3htX6m.js
361
B
-rw-r--r--
clock-3-DF9c78Tc.js
361
B
-rw-r--r--
clock-3-edy3tJrX.js
361
B
-rw-r--r--
createLucideIcon-9GDfkjCp-1qLQ...
1.52
KB
-rw-r--r--
createLucideIcon-9GDfkjCp.js
1.54
KB
-rw-r--r--
createLucideIcon-BWeLwUUK.js
1.54
KB
-rw-r--r--
createLucideIcon-CMq6eM5C.js
1.54
KB
-rw-r--r--
credit-card-AIrys0eB.js
386
B
-rw-r--r--
credit-card-Cd-r6u3q-EXOseSEX....
395
B
-rw-r--r--
credit-card-Cd-r6u3q.js
386
B
-rw-r--r--
credit-card-Q8P3iw5M.js
386
B
-rw-r--r--
eye-BzKTFY0m.js
431
B
-rw-r--r--
eye-C03LuO7d-D6_xK8Ps.js
445
B
-rw-r--r--
eye-C03LuO7d.js
431
B
-rw-r--r--
eye-Cx56kTmG.js
431
B
-rw-r--r--
firebase-DEg1zKlq-B7QEUBhI.js
162.07
KB
-rw-r--r--
firebase-DEg1zKlq.js
163.55
KB
-rw-r--r--
index-BWPb6fzk.css
62.31
KB
-rw-r--r--
index-Bvu9zNsI-DX1QA0ik.js
69.18
KB
-rw-r--r--
index-Bvu9zNsI.js
69.19
KB
-rw-r--r--
index-Bz4UyWnK.js
171.01
KB
-rw-r--r--
index-CBe4ypir.css
60.82
KB
-rw-r--r--
index-CDOUjI53.js
174.43
KB
-rw-r--r--
index-CTlm15d2.js
171.05
KB
-rw-r--r--
index-DNmw2oyp.css
61.82
KB
-rw-r--r--
index-Dwjfbpr8.js
171.3
KB
-rw-r--r--
loader-circle-D7oyO-2w.js
323
B
-rw-r--r--
loader-circle-DMRH_mR_.js
323
B
-rw-r--r--
loader-circle-IEDYPIER-CuEXV5k...
332
B
-rw-r--r--
loader-circle-IEDYPIER.js
323
B
-rw-r--r--
logo-pVcFpWoF.png
506.48
KB
-rw-r--r--
mail-BJu8buSm-BZTw5WIs.js
404
B
-rw-r--r--
mail-BJu8buSm.js
395
B
-rw-r--r--
mail-DFP30gPy.js
395
B
-rw-r--r--
mail-mV4CdDUR.js
395
B
-rw-r--r--
output-onlinegiftools-1-1-BQn0...
485
B
-rw-r--r--
output-onlinegiftools-1-1-BZ2C...
3.78
MB
-rw-r--r--
output-onlinegiftools-1-1-C0SM...
494
B
-rw-r--r--
output-onlinegiftools-1-1-C0SM...
485
B
-rw-r--r--
output-onlinegiftools-1-1-C7Gw...
485
B
-rw-r--r--
output-onlinegiftools-2-BMi0cX...
4
MB
-rw-r--r--
output-onlinegiftools-2-BnXksE...
753
B
-rw-r--r--
output-onlinegiftools-2-BnXksE...
744
B
-rw-r--r--
output-onlinegiftools-2-CNwtJS...
744
B
-rw-r--r--
output-onlinegiftools-2-D4M_L7...
744
B
-rw-r--r--
package-check-DDRkTBqD.js
605
B
-rw-r--r--
phone-1yK55Cb0.js
574
B
-rw-r--r--
phone-C1JglSQK-DjOzq1OR.js
578
B
-rw-r--r--
phone-C1JglSQK.js
574
B
-rw-r--r--
phone-v32ABdJw.js
944
B
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
refresh-cw-B3cmlBmt.js
500
B
-rw-r--r--
send-ClB1CbTm.js
470
B
-rw-r--r--
settings-BZIrvXP2.js
905
B
-rw-r--r--
settings-Biipnq-T-D6uXb2ZX.js
909
B
-rw-r--r--
settings-Biipnq-T.js
905
B
-rw-r--r--
settings-WguBlejS.js
905
B
-rw-r--r--
shopping-bag-BgB0pOAF.js
804
B
-rw-r--r--
shopping-bag-CHYQamNb.js
804
B
-rw-r--r--
shopping-bag-DdF-XavL-GKTs5aMq...
803
B
-rw-r--r--
shopping-bag-DdF-XavL.js
804
B
-rw-r--r--
truck-CcDe-2TB.js
1.58
KB
-rw-r--r--
truck-Cqzh9gCM-C5hCHi2O.js
1.58
KB
-rw-r--r--
truck-Cqzh9gCM.js
1.58
KB
-rw-r--r--
truck-DiaBXU-o.js
1.58
KB
-rw-r--r--
usePortalSocket-BunRYVgj.js
15.98
KB
-rw-r--r--
usePortalSocket-CijdJaF-.js
16.4
KB
-rw-r--r--
usePortalSocket-DaFfMY0_-D7Cb-...
16.41
KB
-rw-r--r--
usePortalSocket-DaFfMY0_.js
16.41
KB
-rw-r--r--
user-plus-DHnwp5UO.js
868
B
-rw-r--r--
user-plus-DVissIdY.js
868
B
-rw-r--r--
user-plus-DoawIM15--VPezORf.js
867
B
-rw-r--r--
user-plus-DoawIM15.js
868
B
-rw-r--r--
user-round-CppNcdCW-BRXg1PZR.j...
1.54
KB
-rw-r--r--
user-round-CppNcdCW.js
1.55
KB
-rw-r--r--
user-round-D64-Xj15.js
1.15
KB
-rw-r--r--
user-round-DU-BBHF0.js
1.55
KB
-rw-r--r--
x-BmeVBLEj.js
334
B
-rw-r--r--
x-COYnIX-z-_goiIEX7.js
343
B
-rw-r--r--
x-COYnIX-z.js
334
B
-rw-r--r--
x-DgvKnt-9.js
334
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : usePortalSocket-DaFfMY0_-D7Cb-8hJ.js
import{h as u}from"./createLucideIcon-9GDfkjCp-1qLQ_zBO.js";import{P as a,u as e,m as be,J as ge}from"./index-CDOUjI53.js";import{b as ye}from"./Button-D2wDOozD-BtIMHGpv.js";import{c as we}from"./x-COYnIX-z-_goiIEX7.js";import{r as ve}from"./loader-circle-IEDYPIER-CuEXV5kI.js";import{y as je}from"./user-round-CppNcdCW-BRXg1PZR.js";/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ke=u("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const le=u("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ne=u("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Se=u("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ne=u("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Me=u("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const De=u("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Re=u("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qe=u("WalletCards",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]]),ze=["image/jpeg","image/png","image/webp","image/gif","image/avif","audio/*","application/pdf","text/plain",".doc",".docx",".xls",".xlsx",".zip"].join(",");function oe(r){return r?r<1024*1024?`${Math.max(1,Math.round(r/1024))} KB`:`${(r/(1024*1024)).toFixed(1)} MB`:""}function se(r){return r?new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit"}).format(new Date(r)):""}function Te(r){var l,i;return r.attachmentType?r.attachmentType:(l=r.attachmentMime)!=null&&l.startsWith("image/")?"image":(i=r.attachmentMime)!=null&&i.startsWith("audio/")?"audio":"file"}function $e(){return e.jsx("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(r=>e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current opacity-70",style:{animation:"typing-bounce 1s ease-in-out infinite",animationDelay:`${r*.14}s`}},r))})}function Ce({message:r,mine:l}){if(!r.attachmentUrl)return null;const i=Te(r),m=r.attachmentName||"Attachment",p=oe(r.attachmentSize);return i==="image"?e.jsx("a",{href:r.attachmentUrl,target:"_blank",rel:"noreferrer",className:"mt-2 block overflow-hidden rounded-md border border-white/20 bg-white/80",children:e.jsx("img",{src:r.attachmentUrl,alt:m,className:"max-h-72 w-full object-contain"})}):i==="audio"?e.jsx("div",{className:`mt-2 rounded-md border p-2 ${l?"border-white/20 bg-white/15":"border-slate-200 bg-white"}`,children:e.jsx("audio",{controls:!0,preload:"metadata",src:r.attachmentUrl,className:"h-10 w-full max-w-full"})}):e.jsxs("a",{href:r.attachmentUrl,target:"_blank",rel:"noreferrer",className:`mt-2 flex items-center gap-3 rounded-md border p-3 text-sm font-bold transition ${l?"border-white/20 bg-white/15 text-white hover:bg-white/20":"border-slate-200 bg-white text-slate-800 hover:border-cyan-400"}`,children:[e.jsx("span",{className:`grid h-9 w-9 shrink-0 place-items-center rounded-md ${l?"bg-white/20":"bg-slate-100"}`,children:e.jsx(le,{size:18,"aria-hidden":"true"})}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate",children:m}),p&&e.jsx("span",{className:"block text-xs opacity-70",children:p})]})]})}function Ie({order:r,currentUser:l,title:i="Live chat",placeholder:m="Write a message",counterpartLabel:p="SignalTech Admin",counterpartOnline:x=!0,counterpartStatus:A="Online 24/7",typingUsers:f=[],socketConnected:d=!1,sendSocketEvent:M,messageEndpoint:R,onMessageSent:w,actionBar:v=null,minHeightClass:z="h-[680px]"}){var T;const[j,$]=a.useState(""),[n,b]=a.useState(null),[h,G]=a.useState(""),[D,_]=a.useState(!1),[k,q]=a.useState(!1),[Z,g]=a.useState(""),[I,L]=a.useState(0),K=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),Q=a.useRef(""),X=a.useRef(0),N=a.useRef(!0),O=a.useRef(null),W=a.useRef(!1),C=a.useRef(null),P=a.useRef(null),B=a.useRef([]),y=(r==null?void 0:r.messages)||[],ee=!!(r&&(j.trim()||n)),ce=typeof MediaRecorder<"u"&&typeof navigator<"u"&&!!((T=navigator.mediaDevices)!=null&&T.getUserMedia),U=a.useMemo(()=>f.filter(Boolean).slice(0,3),[f]),J=y[y.length-1],te=!!(J&&!J.isSystemGenerated&&J.senderId===(l==null?void 0:l.id));function de(t=F.current){return t?t.scrollHeight-t.scrollTop-t.clientHeight<120:!0}function H({smooth:t=!1}={}){window.requestAnimationFrame(()=>{const s=F.current;s&&(s.scrollTo({top:s.scrollHeight,behavior:t?"smooth":"auto"}),N.current=!0,L(0))})}function ue(){const t=de();N.current=t,t&&L(0)}function re(t){!(r!=null&&r.id)||!M||M({type:t,orderId:r.id})}function E(){window.clearTimeout(O.current),O.current=null,W.current&&(W.current=!1,re("typing.stop"))}function me(t){if(!t.trim()){E();return}W.current||(W.current=!0,re("typing.start")),window.clearTimeout(O.current),O.current=window.setTimeout(E,1400)}function V(){var t;(t=P.current)==null||t.getTracks().forEach(s=>s.stop()),P.current=null}a.useEffect(()=>{const t=Q.current!==(r==null?void 0:r.id),s=X.current,o=Math.max(0,y.length-s);if(Q.current=(r==null?void 0:r.id)||"",X.current=y.length,t){N.current=!0,L(0),H();return}if(o>0){te||N.current?H({smooth:!0}):L(c=>c+o);return}U.length>0&&N.current&&H({smooth:!0})},[r==null?void 0:r.id,y.length,te,U.length]),a.useEffect(()=>{$(""),b(null),g(""),E()},[r==null?void 0:r.id]),a.useEffect(()=>{if(!n||typeof URL>"u"){G("");return}const t=URL.createObjectURL(n);return G(t),()=>URL.revokeObjectURL(t)},[n]),a.useEffect(()=>()=>{var t;E(),((t=C.current)==null?void 0:t.state)==="recording"&&C.current.stop(),V()},[]);function ae(t){const s=t==null?void 0:t[0];s&&(b(s),g(""))}async function he(){if(!ce||k){g("Voice recording is not available in this browser.");return}try{const t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),s=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"",o=new MediaRecorder(t,s?{mimeType:s}:void 0);P.current=t,B.current=[],C.current=o,o.ondataavailable=c=>{var S;(S=c.data)!=null&&S.size&&B.current.push(c.data)},o.onstop=()=>{const c=o.mimeType||"audio/webm",S=new Blob(B.current,{type:c});if(S.size){const fe=c.includes("ogg")?"ogg":"webm";b(typeof File<"u"?new File([S],`voice-message-${Date.now()}.${fe}`,{type:c}):S)}V(),q(!1)},o.start(),q(!0),g("")}catch{V(),q(!1),g("Microphone permission is needed to record voice.")}}function pe(){var t;((t=C.current)==null?void 0:t.state)==="recording"&&C.current.stop()}async function xe(t){if(t.preventDefault(),!(!ee||D)){E(),N.current=!0,_(!0),g("");try{const s=new FormData;s.append("messageText",j.trim()),n&&s.append("attachment",n,n.name||`voice-message-${Date.now()}.webm`);const o=await be(R(r.id),{method:"POST",body:s});w(o.message),$(""),b(null),H({smooth:!0})}catch(s){g(s.message)}finally{_(!1)}}}return e.jsxs("section",{className:`flex min-w-0 flex-col bg-white ${z}`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200 p-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-black uppercase text-cyan-800",children:[e.jsx(Se,{size:16,"aria-hidden":"true"}),i]}),e.jsxs("p",{className:"mt-1 flex min-w-0 items-center gap-2 text-xs font-bold text-slate-500",children:[e.jsx("span",{className:`h-2.5 w-2.5 shrink-0 rounded-full ${x?"bg-emerald-500":"bg-slate-300"}`}),e.jsxs("span",{className:"truncate",children:[p," - ",x?A:"Offline"]})]})]}),e.jsx("span",{className:`shrink-0 rounded-full border px-2.5 py-1 text-xs font-black uppercase ${d?"border-emerald-200 bg-emerald-50 text-emerald-700":"border-slate-200 bg-slate-50 text-slate-500"}`,children:d?"Live":"Syncing"})]}),e.jsxs("div",{ref:F,onScroll:ue,className:"relative min-h-0 flex-1 space-y-3 overflow-y-auto bg-slate-50 p-4",children:[y.map(t=>{var s;const o=!t.isSystemGenerated&&t.senderId===(l==null?void 0:l.id),c=t.isSystemGenerated;return e.jsxs("div",{className:`max-w-[94%] rounded-lg border p-3 text-sm leading-6 shadow-sm sm:max-w-[88%] ${c?"mx-auto border-amber-200 bg-amber-50 text-amber-900":o?"ml-auto border-cyan-200 bg-cyan-700 text-white":"border-slate-200 bg-white text-slate-800"}`,children:[!c&&e.jsxs("span",{className:"mb-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs font-black uppercase opacity-70",children:[e.jsx("span",{children:o?"You":((s=t.sender)==null?void 0:s.name)||p}),e.jsx("span",{className:"font-bold normal-case",children:se(t.createdAt)})]}),c&&e.jsx("span",{className:"mb-1 block text-xs font-black uppercase opacity-70",children:se(t.createdAt)}),t.messageText&&e.jsx("p",{className:"whitespace-pre-wrap break-words",children:t.messageText}),e.jsx(Ce,{message:t,mine:o})]},t.id)}),U.length>0&&e.jsxs("div",{className:"max-w-[94%] rounded-lg border border-slate-200 bg-white p-3 text-sm font-bold text-slate-600 shadow-sm sm:max-w-[88%]",children:[e.jsxs("span",{children:[U.join(", ")," ",U.length===1?"is":"are"," typing"]}),e.jsx("span",{className:"ml-2",children:e.jsx($e,{})})]}),y.length===0&&e.jsx("div",{className:"rounded-lg border border-dashed border-slate-300 bg-white p-5 text-sm font-semibold text-slate-500",children:"Start the consultation here."}),I>0&&e.jsxs("button",{type:"button",onClick:()=>H({smooth:!0}),className:"sticky bottom-3 left-1/2 z-10 mx-auto flex min-h-10 -translate-x-0 items-center gap-2 rounded-full border border-cyan-200 bg-white px-4 text-xs font-black text-cyan-800 shadow-xl shadow-slate-200/80 transition hover:border-cyan-500",children:[e.jsx(ke,{size:15,"aria-hidden":"true"}),I," new ",I===1?"message":"messages"]})]}),v,e.jsxs("form",{onSubmit:xe,className:"border-t border-slate-200 bg-white p-3 sm:p-4",children:[n&&e.jsxs("div",{className:"mb-3 flex items-center gap-3 rounded-lg border border-cyan-200 bg-cyan-50 p-2",children:[e.jsx("div",{className:"grid h-14 w-14 shrink-0 place-items-center overflow-hidden rounded-md bg-white text-cyan-800",children:n.type.startsWith("image/")&&h?e.jsx("img",{src:h,alt:"",className:"h-full w-full object-cover"}):n.type.startsWith("audio/")&&h?e.jsx(ne,{size:20,"aria-hidden":"true"}):e.jsx(le,{size:20,"aria-hidden":"true"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-black text-slate-950",children:n.name||"Voice message"}),e.jsx("p",{className:"text-xs font-bold text-slate-500",children:oe(n.size)}),n.type.startsWith("audio/")&&h&&e.jsx("audio",{controls:!0,preload:"metadata",src:h,className:"mt-2 h-9 w-full"})]}),e.jsx("button",{type:"button",onClick:()=>b(null),className:"grid h-9 w-9 shrink-0 place-items-center rounded-md border border-cyan-200 bg-white text-slate-700 transition hover:border-red-300 hover:text-red-700","aria-label":"Remove attachment",title:"Remove attachment",children:e.jsx(we,{size:16,"aria-hidden":"true"})})]}),Z&&e.jsx("div",{className:"mb-3 rounded-md border border-red-200 bg-red-50 p-2 text-sm font-semibold text-red-700",children:Z}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{ref:K,type:"file",accept:ze,className:"sr-only",onChange:t=>{ae(t.target.files),t.target.value=""}}),e.jsx("input",{ref:Y,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif,image/avif",className:"sr-only",onChange:t=>{ae(t.target.files),t.target.value=""}}),e.jsx("button",{type:"button",onClick:()=>{var t;return(t=K.current)==null?void 0:t.click()},className:"grid h-11 w-11 shrink-0 place-items-center rounded-md border border-slate-300 text-slate-700 transition hover:border-cyan-500 hover:text-cyan-800","aria-label":"Attach file",title:"Attach file",children:e.jsx(Me,{size:18,"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:()=>{var t;return(t=Y.current)==null?void 0:t.click()},className:"grid h-11 w-11 shrink-0 place-items-center rounded-md border border-slate-300 text-slate-700 transition hover:border-cyan-500 hover:text-cyan-800","aria-label":"Attach image",title:"Attach image",children:e.jsx(Ne,{size:18,"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:k?pe:he,className:`grid h-11 w-11 shrink-0 place-items-center rounded-md border transition ${k?"border-red-200 bg-red-50 text-red-700":"border-slate-300 text-slate-700 hover:border-cyan-500 hover:text-cyan-800"}`,"aria-label":k?"Stop voice recording":"Record voice",title:k?"Stop voice recording":"Record voice",children:k?e.jsx(Re,{size:17,"aria-hidden":"true"}):e.jsx(ne,{size:18,"aria-hidden":"true"})}),e.jsx("input",{value:j,onChange:t=>{$(t.target.value),me(t.target.value)},className:"h-11 min-w-0 flex-1 rounded-md border border-slate-300 px-3 text-sm",placeholder:m}),e.jsxs(ye,{type:"submit",className:"h-11 shrink-0 rounded-md px-4",disabled:D||!ee,children:[D?e.jsx(ve,{className:"animate-spin",size:17,"aria-hidden":"true"}):e.jsx(je,{size:17,"aria-hidden":"true"}),e.jsx("span",{className:"hidden sm:inline",children:"Send"})]})]})]})]})}const ie=["/api/ws/portal","/ws/portal"];function Ue(r,l){const i=new URL(ge,window.location.origin);return i.protocol=i.protocol==="https:"?"wss:":"ws:",i.pathname=l,i.search="",i.searchParams.set("token",r),i.toString()}function Fe(r,l){const i=a.useRef(null),m=a.useRef(l),[p,x]=a.useState(!1);a.useEffect(()=>{m.current=l},[l]);const A=a.useCallback(f=>{const d=i.current;return typeof WebSocket>"u"||!d||d.readyState!==WebSocket.OPEN?!1:(d.send(JSON.stringify(f)),!0)},[]);return a.useEffect(()=>{const f=localStorage.getItem("script_market_token");if(!r||!f||typeof WebSocket>"u"){x(!1);return}let d=!1,M=null,R=null,w=null,v=0;function z(){window.clearInterval(R),R=null}function T(){d||(M=window.setTimeout(j,1800))}function j(){const $=ie[v];v=(v+1)%ie.length;let n;try{n=new WebSocket(Ue(f,$))}catch{T();return}w=n,i.current=n,n.onopen=()=>{v=0,x(!0),z(),R=window.setInterval(()=>{n.readyState===WebSocket.OPEN&&n.send("ping")},25e3)},n.onmessage=b=>{var h;try{(h=m.current)==null||h.call(m,JSON.parse(b.data))}catch{}},n.onclose=()=>{z(),x(!1),i.current===n&&(i.current=null),T()}}return j(),()=>{d=!0,x(!1),window.clearTimeout(M),z(),w==null||w.close(),i.current===w&&(i.current=null)}},[r]),{connected:p,sendJson:A}}export{Fe as E,De as H,qe as O,Se as R,Ie as q};
Close