1import{a as D,f as N}from"./chunk-5ATD7ZCJ.js";import{a as B}from"./chunk-URTYZRA5.js";import{c as S}from"./chunk-RDRSN6DH.js";import"./chunk-TFKTW6S4.js";import{f as E,k as F,y as z,z as A}from"./chunk-RRROZGQ5.js";import{a as T}from"./chunk-JC6TR6WC.js";import{l as I}from"./chunk-XFHM6F55.js";import"./chunk-CW4CKOZJ.js";import{j as w,k as y,v as k}from"./chunk-D47FDHRL.js";import{Cc as P,Db as x,Dc as b,Ec as v,Jb as C,Nc as M,Oc as f,Xb as g,Yb as a,Zb as s,jc as m,lc as l,mb as i,xb as _,xc as d,yc as p,zc as u}from"./chunk-LSFMG3PD.js";function R(e,o){if(e&1&&(a(0,"div",11)(1,"div",12),d(2),s(),a(3,"div",13),d(4),s(),a(5,"div",14),d(6),M(7,"amTimeAgo"),s()()),e&2){let c=l().$implicit;i(2),p(c.first_name),i(2),u(" ",c.msg," "),i(2),p(f(7,3,c.id))}}function W(e,o){if(e&1&&(a(0,"div",15)(1,"div",16),d(2),s(),a(3,"div",14),d(4),M(5,"amTimeAgo"),s()()),e&2){let c=l().$implicit;i(2),u(" ",c.msg," "),i(2),p(f(5,2,c.id))}}function $(e,o){if(e&1&&(a(0,"div",8),C(1,R,8,5,"div",9)(2,W,6,4,"div",10),s()),e&2){let c=o.$implicit,n=l();i(),g("ngIf",n.uid!=c.uid),i(),g("ngIf",n.uid===c.uid)}}var j=(()=>{let o=class o{constructor(n,t){this.afs=n,this.authService=t}ngOnInit(){this.authSub=this.authService.requireUid$().subscribe(n=>{this.uid=n,this.afs.collection("notifications").doc(n).collection("chat").get().toPromise().then(t=>{t.forEach(r=>{r.ref.delete().then()})}),this.afs.collection("msgs").doc(n).collection("chat",t=>t.orderBy("id","asc")).valueChanges({idField:"docid"}).subscribe(t=>{this.inbox=t}),this.afs.collection("msgs").doc(n).collection("chat",t=>t.where("uid","!=",this.uid).limit(1)).valueChanges({idField:"docid"}).subscribe(t=>{this.uuid=t[0].uid})}),this.userSub=this.authService.userDoc$().subscribe(n=>{this.user=n})}send(){if(this.msg){let n={uid:this.uid,dp:this.user.photo||null,name:this.user.first_name,id:Date.now(),parent:this.user.parent,msg:this.msg};this.afs.collection("msgs").doc(this.uid).collection("chat").add(n).then(t=>{this.msg=null,this.afs.collection("notifications").doc(this.uuid).collection("chat").add({title:this.msg,uid:this.uid}).then(r=>{this.msg=null,this.afs.collection("users").doc(this.uid).update({not_count:I(1)}).then()})})}}ngOnDestroy(){this.authSub?.unsubscribe(),this.userSub?.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)(_(B),_(T))},o.\u0275cmp=x({type:o,selectors:[["app-chat"]],decls:9,vars:3,consts:[[1,"min-h-screen","bg-slate-50"],[1,"mx-auto","max-w-4xl","px-4","py-8","sm:px-6"],[1,"rounded-2xl","bg-white","shadow-lg","ring-1","ring-slate-200"],["class","chat-body max-h-[65vh] overflow-y-auto p-4",4,"ngFor","ngForOf"],[1,"answer-add2","border-t","border-slate-100","p-4"],["placeholder","Type a message",3,"ngModelChange","keyup.enter","ngModel","rows"],[1,"mt-3","flex","justify-end"],["variant","primary",3,"click"],[1,"chat-body","max-h-[65vh]","overflow-y-auto","p-4"],["class","answer left mt-3",4,"ngIf"],["class","answer right mt-3 flex flex-col items-end",4,"ngIf"],[1,"answer","left","mt-3"],[1,"name","text-sm","font-semibold","text-slate-700"],[1,"text","rounded-2xl","bg-slate-100","px-4","py-2","text-slate-800","shadow-sm"],[1,"time","text-xs","text-slate-500"],[1,"answer","right","mt-3","flex","flex-col","items-end"],[1,"text","rounded-2xl","bg-[#4162AE]","px-4","py-2","text-white","shadow-sm"]],template:function(t,r){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),C(3,$,3,2,"div",3),a(4,"div",4)(5,"app-textarea",5),v("ngModelChange",function(h){return b(r.msg,h)||(r.msg=h),h}),m("keyup.enter",function(){return r.send()}),s(),a(6,"div",6)(7,"app-btn",7),m("click",function(){return r.send()}),d(8,"Send"),s()()()()()()),t&2&&(i(3),g("ngForOf",r.inbox),i(2),P("ngModel",r.msg),g("rows",3))},dependencies:[k,w,y,z,E,F,A,S,D,N],styles:['.col-inside-lg[_ngcontent-%COMP%]{padding:20px}.decor-default[_ngcontent-%COMP%]{background-color:#fff}.chat-users[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:20px;margin:0 0 20px}.chat-users[_ngcontent-%COMP%] .user[_ngcontent-%COMP%]{position:relative;padding:0 0 0 50px;display:block;cursor:pointer;margin:0 0 20px}.chat-users[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .avatar[_ng
1content-%COMP%]{top:0;left:0}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status.off[_ngcontent-%COMP%]{border:1px solid #5a5a5a;background:#fff}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status.online[_ngcontent-%COMP%]{background:#4caf50}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status.busy[_ngcontent-%COMP%]{background:#ffc107}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status.offline[_ngcontent-%COMP%]{background:#ed4e6e}.chat-users[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{bottom:0;left:28px}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:5px;position:absolute}.chat-users[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;font-weight:700;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-users[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .mood[_ngcontent-%COMP%]{font:200 14px/20px Raleway,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-body[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:20px;margin:0 0 20px}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%]{padding:0 0 0 58px;text-align:left;float:left}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%]{position:relative;max-width:600px;overflow:hidden;clear:both}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{left:0}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{bottom:36px}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{width:40px;height:40px;position:absolute}.chat[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;border-radius:20px;height:100%}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;line-height:36px}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{right:4px}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{bottom:0}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:#fff;color:#333;border-radius:8px 8px 8px 0}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{padding:12px;font-size:16px;line-height:26px;position:relative}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:before{left:-30px;border-right-color:#ebebeb;border-right-width:12px}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:before{content:"";display:block;position:absolute;bottom:0;border:18px solid transparent;border-bottom-width:0}.chat-body[_ngcontent-%COMP%] .answer.left[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-left:12px;color:#333}.chat-body[_ngcontent-%COMP%] .answer[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-size:16px;line-height:36px;position:relative;padding-bottom:1px}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%]{padding:0 58px 0 0;text-align:right;float:right}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{right:0}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{left:4px}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{background:#253792b8;color:#fff;border-radius:8px 8px 0}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]:before{right:-30px;border-left-color:#253792b8;border-left-width:12px}.chat-body[_ngcontent-%COMP%] .answer.right[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-right:12px;color:#333}.chat-body[_ngcontent-%COMP%] .answer-add[_ngcontent-%COMP%]{clear:both;position:relative;margin:20px -20px -20px;padding:20px;background:#ebebeb}.chat-body[_ngcontent-%COMP%] .answer-add[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:none;background:none;display:block;width:100%;font-size:16px;line-height:20px;padding:0;color:#0e0101}.answer-add2[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{border:2px solid #0d47a1;margin-top:10px;height:5px;border-radius:10px;width:100%}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:0}textarea[_ngcontent-%COMP%]:focus, input[_ngcontent-%COMP%]:focus{outline:none}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder{color:#0e0d0d9a}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-placeholder{color:#fff}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder{color:#fff}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder{color:#fff}.chat[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{-webkit-appearance:none;border-radius:0}.shaddowAdd[_ngcontent-%COMP%]{box-shadow:0 12px 35px -14px #00000078}']});let e=o;return e})();var tt=[{path:"",children:[{path:"chat",component:j}]}];export{tt as GeysersRoutes};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.