function _defineProperties(n,l){for(var t=0;t<l.length;t++){var e=l[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function _createClass(n,l,t){return l&&_defineProperties(n.prototype,l),t&&_defineProperties(n,t),n}function _classCallCheck(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{tG1O:function(n,l,t){"use strict";t.r(l);var e=t("8Y7J"),a=function n(){_classCallCheck(this,n)},u=t("pMnS"),s=t("iV+E"),o=t("hqw5"),i=t("sZkV"),r=t("h4wn"),c=t("J20c"),b=t("kbZ1"),h=t("2IJ5"),g=t("MKJQ"),f=t("ri/Y"),d=t("HcDZ"),p=t("SVse"),C=t("olg3"),m=t("TSSN"),k=t("sk1z"),v=t("0+M4"),M=t("/qZA"),w=t("iInd"),x=t("ja1e"),F=t("Ff54"),O=t("LKtr"),P=t("3UND"),_=e.qb({encapsulation:0,styles:[["[_nghost-%COMP%] debug-dialog[_ngcontent-%COMP%]{position:absolute;top:-16px}[_nghost-%COMP%] .swipLayer[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute}[_nghost-%COMP%] ion-item[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right}[_nghost-%COMP%] .scroll-content[_ngcontent-%COMP%]{margin-top:56px}[_nghost-%COMP%] ion-content[_ngcontent-%COMP%]{overflow:scroll}[_nghost-%COMP%] ion-fab[_ngcontent-%COMP%]{bottom:125px;right:25px}[_nghost-%COMP%] ion-content.content[_ngcontent-%COMP%]{background-color:\\$bodyColor;background-color:#ff4500}"]],data:{}});function y(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,1,"friend",[],null,[[null,"click"]],(function(n,l,t){var e=!0;return"click"===l&&(e=!1!==n.component.openChat(n.context.$implicit)&&e),e}),s.b,s.a)),e.rb(1,5292032,null,0,o.a,[i.a,r.a,c.a,b.a,h.a,i.Fb],{friend:[0,"friend"]},null)],(function(n,l){n(l,1,0,l.context.$implicit)}),null)}function j(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,4,"ion-header",[],null,null,null,g.eb,g.p)),e.rb(1,49152,null,0,i.B,[e.h,e.k,e.x],null,null),(n()(),e.sb(2,0,null,0,2,"comp-header",[["friendsPage","true"],["showMenuBtn","true"]],null,null,null,f.c,f.b)),e.rb(3,4308992,null,0,d.a,[i.Gb,p.g,b.a,c.a,h.a,C.a,i.Fb,m.j,r.a,k.a,i.Eb,v.a,M.a,w.m],{textToUse:[0,"textToUse"],friendsPage:[1,"friendsPage"],showMenuBtn:[2,"showMenuBtn"]},null),e.Fb(131072,m.i,[m.j,e.h]),(n()(),e.sb(5,0,null,null,4,"ion-content",[],null,null,null,g.Y,g.j)),e.rb(6,49152,null,0,i.u,[e.h,e.k,e.x],null,null),(n()(),e.sb(7,0,null,0,2,"div",[["class","swipLayer"]],null,[[null,"swipe"]],(function(n,l,t){var e=!0;return"swipe"===l&&(e=!1!==n.component.swipeEvent(t)&&e),e}),null,null)),(n()(),e.hb(16777216,null,null,1,null,y)),e.rb(9,278528,null,0,p.j,[e.O,e.L,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.sb(10,0,null,null,5,"ion-fab",[],null,null,null,g.bb,g.k)),e.rb(11,49152,null,0,i.w,[e.h,e.k,e.x],null,null),(n()(),e.sb(12,0,null,0,3,"ion-fab-button",[],null,[[null,"click"]],(function(n,l,t){var e=!0;return"click"===l&&(e=!1!==n.component.openAddDialog()&&e),e}),g.Z,g.l)),e.rb(13,49152,null,0,i.x,[e.h,e.k,e.x],null,null),(n()(),e.sb(14,0,null,0,1,"ion-icon",[["name","add"]],null,null,null,g.fb,g.q)),e.rb(15,49152,null,0,i.C,[e.h,e.k,e.x],{name:[0,"name"]},null),(n()(),e.sb(16,0,null,null,1,"comp-footer",[],null,null,null,x.c,x.b)),e.rb(17,49152,null,0,F.a,[i.Gb,O.a,r.a,b.a,h.a],null,null)],(function(n,l){var t=l.component;n(l,3,0,e.wb(1,"",e.Mb(l,3,0,e.Eb(l,4).transform("TITLE.contact")),""),"true","true"),n(l,9,0,t.friendsManager.friends),n(l,15,0,"add")}),null)}var N=e.ob("page-contact",P.a,(function(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,1,"page-contact",[],null,null,null,j,_)),e.rb(1,573440,null,0,P.a,[i.Gb,w.m,h.a,r.a,c.a,O.a,i.Fb],null,null)],null,null)}),{},{},[]),L=(t("oCF6"),t("0NL6"),t("+mLH")),B=t("AjPc"),J=function(){function n(l,t){_classCallCheck(this,n),this.chatsManager=l,this.socketManager=t,this.translatedFromInternet=!0}return _createClass(n,[{key:"ngAfterContentInit",value:function(){this.message=this.messageChat,this.message.from=new L.a(this.message.from),console.log("this.message.from",this.message.from)}},{key:"ngAfterViewInit",value:function(){this.message.setStatus(this.message.possibleStatuses.seenByMe),this.chatsManager.saveMessageContent(this.chatFriends,this.message)}},{key:"handleMessage",value:function(n){var l=this;console.log("handleMessage");var t=JSON.parse(n);if(B.a.isJson(t.msg)){var e=JSON.parse(t.msg);Object.keys(e).forEach((function(n){var t=e[n];null!==t&&l.message.content.push(t)})),this.saveContent(),l.chatsManager.save(l.chatFriends)}}},{key:"saveContent",value:function(){this.chatsManager.saveMessageContent(this.chatFriends,this.message)}}]),n}(),E=e.qb({encapsulation:0,styles:[['.right[_ngcontent-%COMP%]{position:relative;text-align:right;margin-bottom:10px;margin-left:15px;min-width:45%;padding:10px 15px;border-radius:6px;border:1px solid #fff;float:right;right:20px;background:#fff!important;height:auto;word-break:break-all}.right[_ngcontent-%COMP%]::before{content:"";position:absolute;visibility:visible;top:-1px;right:-10px;border:10px solid transparent;border-top:10px solid #fff!important}']],data:{}});function q(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,2,"div",[["class","side"]],null,null,null,null,null)),(n()(),e.sb(1,0,null,null,1,"div",[["class","right"]],null,null,null,null,null)),(n()(),e.Lb(2,null,[" "," "]))],null,(function(n,l){n(l,2,0,l.component.message.text)}))}var A=t("pLpT"),I=t("neAe"),T=t("3MOV"),V=t("MF7w"),Z=t("xNyf"),G=t("EGUZ"),S=t("GAbP"),D=t("F9l0"),U=t("wZ9J"),z=t("Zr1d"),K=t("1Zg0"),H=function(){function n(l,t,e,a,u){var s=this;_classCallCheck(this,n),this.chatsManager=l,this.userManager=t,this.socketManager=e,this.route=a,this.router=u,this.allowDescription=!0,this.route.queryParams.subscribe((function(){s.router.getCurrentNavigation().extras.state&&(s.chatFriends=s.router.getCurrentNavigation().extras.state.chat,console.log(" chatFriends",s.chatFriends),void 0!==s.chatFriends&&(s.title=s.chatFriends.title),s.chatFriends.readAllMessages(),s.messageChat=[],s.members=[])}))}return _createClass(n,[{key:"isViewLoaded",value:function(){return this.chatFriends.isViewLoaded()}},{key:"objectKeys",value:function(n){return Object.keys(n)}}]),n}(),Y=e.qb({encapsulation:0,styles:[[""]],data:{}});function $(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,1,"chat-dialog-friend",[],null,null,null,q,E)),e.rb(1,5292032,null,0,J,[c.a,M.a],{chatFriends:[0,"chatFriends"],messageChat:[1,"messageChat"],messageComp:[2,"messageComp"]},null)],(function(n,l){var t=l.component;n(l,1,0,t.chatFriends,l.context.$implicit,t)}),null)}function Q(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,2,"div",[["style","margin-top: 15px;"]],null,null,null,null,null)),(n()(),e.hb(16777216,null,null,1,null,$)),e.rb(2,278528,null,0,p.j,[e.O,e.L,e.q],{ngForOf:[0,"ngForOf"]},null)],(function(n,l){n(l,2,0,l.component.chatFriends.messages)}),null)}function X(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,4,"ion-header",[],null,null,null,g.eb,g.p)),e.rb(1,49152,null,0,i.B,[e.h,e.k,e.x],null,null),(n()(),e.sb(2,0,null,0,2,"comp-header",[["chatPage","true"]],null,null,null,f.c,f.b)),e.rb(3,4308992,null,0,d.a,[i.Gb,p.g,b.a,c.a,h.a,C.a,i.Fb,m.j,r.a,k.a,i.Eb,v.a,M.a,w.m],{textToUse:[0,"textToUse"],chatPage:[1,"chatPage"],allowDescription:[2,"allowDescription"],showBackBtn:[3,"showBackBtn"],chat:[4,"chat"]},null),(n()(),e.sb(4,0,null,null,0,"div",[["class","overlay"]],null,null,null,null,null)),(n()(),e.sb(5,0,null,null,3,"ion-content",[],null,null,null,g.Y,g.j)),e.rb(6,49152,null,0,i.u,[e.h,e.k,e.x],null,null),(n()(),e.hb(16777216,null,0,1,null,Q)),e.rb(8,16384,null,0,p.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null),(n()(),e.sb(9,0,null,null,3,"ion-footer",[],null,null,null,g.cb,g.n)),e.rb(10,49152,null,0,i.z,[e.h,e.k,e.x],null,null),(n()(),e.sb(11,0,null,0,1,"chat-input",[],null,null,null,A.b,A.a)),e.rb(12,11649024,null,0,I.a,[T.a,V.a,Z.a,G.a,S.a,C.a,M.a,h.a,D.a,k.a,U.a,i.Jb,z.a,z.a,e.C,i.Fb,e.k,c.a,K.a,e.h],{chat:[0,"chat"]},null)],(function(n,l){var t=l.component;n(l,3,0,e.wb(1,"",t.chatFriends.title,""),"true",t.allowDescription,!0,t.chatFriends),n(l,8,0,t.isViewLoaded()),n(l,12,0,t.chatFriends)}),null)}var R=e.ob("friends-chat",H,(function(n){return e.Nb(0,[(n()(),e.sb(0,0,null,null,1,"friends-chat",[],null,null,null,X,Y)),e.rb(1,49152,null,0,H,[c.a,C.a,M.a,w.a,w.m],null,null)],null,null)}),{},{},[]),W=t("t68o"),nn=t("m/40"),ln=t("B/Pu"),tn=t("s7LF"),en=t("QQfA"),an=t("IP0z"),un=t("s6ns"),sn=t("W2O4"),on=function n(){_classCallCheck(this,n)},rn=t("Xd0L"),cn=t("cUpR"),bn=t("BzsH"),hn=t("zMNK"),gn=t("/HVE"),fn=t("hOhj"),dn=t("Gi4r"),pn=t("L8C7"),Cn=t("FpXt");t.d(l,"ContactModuleNgFactory",(function(){return mn}));var mn=e.pb(a,[],(function(n){return e.Bb([e.Cb(512,e.j,e.ab,[[8,[u.a,N,R,W.a,nn.a,ln.a,f.a,x.a]],[3,e.j],e.v]),e.Cb(4608,p.m,p.l,[e.s,[2,p.z]]),e.Cb(4608,tn.k,tn.k,[]),e.Cb(4608,i.c,i.c,[e.x,e.g]),e.Cb(4608,i.Fb,i.Fb,[i.c,e.j,e.p]),e.Cb(4608,i.Kb,i.Kb,[i.c,e.j,e.p]),e.Cb(4608,en.a,en.a,[en.g,en.c,e.j,en.f,en.d,e.p,e.x,p.d,an.c,[2,p.g]]),e.Cb(5120,en.h,en.i,[en.a]),e.Cb(5120,un.b,un.c,[en.a]),e.Cb(135680,un.d,un.d,[en.a,e.p,[2,p.g],[2,un.a],un.b,[3,un.d],en.c]),e.Cb(4608,sn.c,sn.c,[]),e.Cb(4608,sn.i,sn.b,[]),e.Cb(5120,sn.k,sn.l,[]),e.Cb(4608,sn.j,sn.j,[sn.c,sn.i,sn.k]),e.Cb(4608,sn.h,sn.a,[]),e.Cb(5120,sn.e,sn.m,[sn.j,sn.h]),e.Cb(1073742336,p.c,p.c,[]),e.Cb(1073742336,w.n,w.n,[[2,w.s],[2,w.m]]),e.Cb(1073742336,on,on,[]),e.Cb(1073742336,tn.j,tn.j,[]),e.Cb(1073742336,tn.c,tn.c,[]),e.Cb(1073742336,i.Bb,i.Bb,[]),e.Cb(1073742336,an.a,an.a,[]),e.Cb(1073742336,rn.b,rn.b,[[2,rn.a],[2,cn.f]]),e.Cb(1073742336,bn.b,bn.b,[]),e.Cb(1073742336,hn.f,hn.f,[]),e.Cb(1073742336,gn.b,gn.b,[]),e.Cb(1073742336,fn.b,fn.b,[]),e.Cb(1073742336,en.e,en.e,[]),e.Cb(1073742336,un.g,un.g,[]),e.Cb(1073742336,dn.a,dn.a,[]),e.Cb(1073742336,pn.a,pn.a,[]),e.Cb(1073742336,sn.f,sn.f,[]),e.Cb(1073742336,m.g,m.g,[]),e.Cb(1073742336,Cn.a,Cn.a,[]),e.Cb(1073742336,a,a,[]),e.Cb(1024,w.k,(function(){return[[{path:"",component:P.a},{path:"friendChat",component:H}]]}),[])])}))}}]);