1"use strict";(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[9655],{9655:(E,g,r)=>{r.d(g,{W:()=>fi});var d=r(9164),m=r(1314),c=r(1072),l=r(9808),e=r(5e3);let u=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[l.ez,c.Kz]]}),s})();var b=r(3685),h=r(3075),V=r(8806),Y=r(218);let B=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[l.ez]]}),s})();var O=r(9613),P=r(8917);let H=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[P.e,c.Kz,h.u5,b.g,V.h,Y.Bz,B,O.F]]}),s})();var T=r(7146),f=r(2382),k=r(6786),v=r(5525),_=r(2582),C=r(7576),S=r(4164),j=r(9665);let Z=(()=>{class s{constructor(i){this.ref=i}ngOnInit(){}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(j.S))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-authorize-modal"]],decls:10,vars:0,consts:[[1,"md:w-96"],[1,"text-dark","text-xl","font-semibold","leading-7","mb-6"],[1,"leading-7"],["src","/assets/images/blocked-camera.svg",1,"align-middle","inline"],[1,"border-t","border-grey-200","mt-8","pt-6","flex","items-center","justify-end"],[3,"click"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"h1",1),e._uU(2,"Videocamera e microfono bloccati"),e.qZA(),e.TgZ(3,"p",2),e._uU(4,"Transiti deve accedere alla videocamera e al microfono. Fai clic sull'icona della videocamera bloccata "),e._UZ(5,"img",3),e._uU(6," nella barra degli indirizzi del browser, consenti l'accesso e ricarica la pagina."),e.qZA(),e.TgZ(7,"div",4)(8,"ui-button",5),e.NdJ("click",function(){return t.ref.close()}),e._uU(9,"Chiudi"),e.qZA()()())},directives:[S.r],styles:[""]}),s})();var z=r(8723),y=r(4850),A=r(2864),U=r(7606);function $(s,o){1&s&&(e.TgZ(0,"span"),e._uU(1,"(io)"),e.qZA())}const W=function(s,o){return{"w-45 h-45":s,"w-12 h-12":o}},G=function(s,o,i){return{"text-lg font-bold":s,"text-sm font-semibold":o,"hidden lg:block":i}};function X(s,o){if(1&s&&(e.TgZ(0,"div",8),e._UZ(1,"ui-avatar",9),e.TgZ(2,"div",10),e._uU(3),e.YNc(4,$,2,0,"span",11),e.qZA()()),2&s){const i=e.oxw();e.xp6(1),e.Q6J("avatar",i.user.avatar)("shadow",!0)("ngClass",e.WLB(6,W,"lg"===i.size,"sm"===i.size||"xs"===i.size)),e.xp6(1),e.Q6J("ngClass",e.kEZ(9,G,"lg"===i.size,"sm"===i.size||"xs"===i.size,i.isPublisher)),e.xp6(1),e.hij("",i.user.fullName," "),e.xp6(1),e.Q6J("ngIf",i.isPublisher)}}function K(s,o){1&s&&(e.ynx(0),e.TgZ(1,"h2",16),e._uU(2,"Videocamera e microfono bloccati"),e.qZA(),e.TgZ(3,"p",17),e._uU(4,"Transiti deve accedere alla videocamera e al microfono. Fai clic sull'icona della videocamera bloccata "),e._UZ(5,"img",18),e._uU(6," nella barra degli indirizzi del browser, consenti l'accesso e ricarica la pagina."),e.qZA(),e.BQk())}function ee(s,o){1&s&&(e.ynx(0),e.TgZ(1,"h2",16),e._uU(2,"Errore"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"Il tuo browser non supporta le videochiamate. Si prega di provare con un browser o dispositivo differente."),e.qZA(),e.BQk())}function ie(s,o){1&s&&(e.ynx(0),e.TgZ(1,"h2",16),e._uU(2,"Errore"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"Impossibile accedere alla webcam o al microfono. Per favore, verifica che la tua webcam sia connessa e non utilizzata da un'altra applicazione"),e.qZA(),e.BQk())}function te(s,o){if(1&s&&(e.TgZ(0,"div",12),e.ynx(1,13),e.YNc(2,K,7,0,"ng-container",14),e.YNc(3,ee,5,0,"ng-container",14),e.YNc(4,ie,5,0,"ng-container",15),e.BQk(),e.qZA()),2&s){const i=e.oxw();e.xp6(1),e.Q6J("ngSwitch",i.error),e.xp6(1),e.Q6J("ngSwitchCase","OT_USER_MEDIA_ACCESS_DENIED"),e.xp6(1),e.Q6J("ngSwitchCase","OT_NOT_SUPPORTED")}}const se=function(s,o){return{"text-white":s,"text-dark":o}};function ne(s,o){if(1&s&&e._UZ(0,"svg-icon",19),2&s){const i=e.oxw();e.Q6J("ngClass",e.WLB(1,se,!i.videoDisabled,i.videoDisabled))}}function oe(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",20)(1,"div",21),e.NdJ("click",function(){return e.CHM(i),e.oxw().toggleVideo()}),e._UZ(2,"svg-icon",22),e.qZA(),e.TgZ(3,"div",21),e.NdJ("click",function(){return e.CHM(i),e.oxw().toggleAudio()}),e._UZ(4,"svg-icon",22),e.qZA()()}if(2&s){const i=e.oxw();e.xp6(2),e.Q6J("key",i.videoDisabled?"video-disabled":"video"),e.xp6(2),e.Q6J("key",i.audioDisabled?"mic-disabled":"mic")}}function re(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",23)(1,"span",24),e._uU(2,"Tu"),e.qZA(),e.TgZ(3,"svg-icon",25),e.NdJ("click",function(){return e.CHM(i),e.oxw().hidden=!0}),e.qZA()()}}function le(s,o){if(1&s&&(e.ynx(0),e._uU(1),e.BQk()),2&s){const i=e.oxw(2);e.xp6(1),e.Oqu(null==i.user?null:i.user.fullName)}}function ae(s,o){1&s&&(e.ynx(0),e._uU(1,"Tu"),e.BQk())}function ce(s,o){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"dateTz"),e.qZA()),2&s){const i=o.ngIf,t=e.oxw(2);e.xp6(1),e.hij("Ora locale: ",e.Dn7(2,1,i,"HH:mm",t.user.time_zone),"")}}function de(s,o){if(1&s&&(e.TgZ(0,"div",26)(1,"p",27),e.YNc(2,le,2,1,"ng-container",11),e.YNc(3,ae,2,0,"ng-container",11),e.qZA(),e.YNc(4,ce,3,5,"p",11),e.ALo(5,"async"),e.qZA()),2&s){const i=e.oxw();e.xp6(2),e.Q6J("ngIf",!i.isPublisher),e.xp6(1),e.Q6J("ngIf",i.isPublisher),e.xp6(1),e.Q6J("ngIf",e.lcZ(5,3,i.timer$))}}function pe(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"ui-avatar",28),e.NdJ("click",function(){return e.CHM(i),e.oxw().hidden=!1}),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("avatar",null==i.user?null:i.user.avatar)("shadow",!0)("border",!0)}}const ue=function(s,o,i,t,n,a,p){return{"lg:w-188 h-127":s,"w-40 lg:w-66":o,"w-31":i,"rounded-2xl shadow-2xl border-3 border-brand-100 overflow-hidden":t,"w-full":n,"h-full":a,hidden:p}}
1,he=["*"];let D=(()=>{class s{constructor(i){this.overlayService=i,this.size="lg",this.videoDisabledChange=new e.vpe,this.audioDisabledChange=new e.vpe}ngOnInit(){this.timer$=(0,z.H)(0,6e4).pipe((0,y.U)(()=>new Date))}toggleVideo(){this.error?this.showError():this.videoDisabledChange.emit(this.videoDisabled)}toggleAudio(){this.error?this.showError():this.audioDisabledChange.emit(this.audioDisabled)}showError(){"OT_USER_MEDIA_ACCESS_DENIED"===this.error?this.overlayService.open(Z):this.overlayService.info("Errore","OT_NOT_SUPPORTED"===this.error?"Il tuo browser non supporta le videochiamate. Si prega di provare con un browser o dispositivo differente.":"Impossibile accedere alla webcam o al microfono. Per favore, verifica che la tua webcam sia connessa e non utilizzata da un'altra applicazione")}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(v.F))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-participant"]],inputs:{size:"size",videoDisabled:"videoDisabled",audioDisabled:"audioDisabled",error:"error",user:"user",isPublisher:"isPublisher"},outputs:{videoDisabledChange:"videoDisabledChange",audioDisabledChange:"audioDisabledChange"},ngContentSelectors:he,decls:9,vars:16,consts:[[1,"relative",3,"ngClass"],["class","absolute bg-black text-white top-0 right-0 bottom-0 left-0 z-10 flex flex-col items-center justify-center",4,"ngIf"],["class","absolute top-0 right-0 bottom-0 left-0 z-10 flex flex-col items-center justify-center bg-black text-white px-18",4,"ngIf"],["key","mic-disabled-outline","class","absolute top-1 right-1 z-30",3,"ngClass",4,"ngIf"],["class","flex gap-10 absolute z-30 bottom-9 right-9",4,"ngIf"],["class","flex items-center justify-between absolute z-30 left-2.5 bottom-2.5 right-2.5",4,"ngIf"],["class","flex items-center justify-between absolute z-30 left-4 bottom-2.5 right-4 text-sm text-white",4,"ngIf"],["class","mb-2 w-12 h-12 cursor-pointer absolute right-0 bottom-0 lg:relative",3,"avatar","shadow","border","click",4,"ngIf"],[1,"absolute","bg-black","text-white","top-0","right-0","bottom-0","left-0","z-10","flex","flex-col","items-center","justify-center"],[1,"mb-2",3,"avatar","shadow","ngClass"],[3,"ngClass"],[4,"ngIf"],[1,"absolute","top-0","right-0","bottom-0","left-0","z-10","flex","flex-col","items-center","justify-center","bg-black","text-white","px-18"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"text-xl","mb-1"],[1,"leading-7"],["src","/assets/images/blocked-camera.svg",1,"align-middle","inline"],["key","mic-disabled-outline",1,"absolute","top-1","right-1","z-30",3,"ngClass"],[1,"flex","gap-10","absolute","z-30","bottom-9","right-9"],[1,"flex","items-center","justify-center","w-12","h-12","rounded-full","cursor-pointer","bg-white","bg-opacity-20","text-white",3,"click"],["size","md",3,"key"],[1,"flex","items-center","justify-between","absolute","z-30","left-2.5","bottom-2.5","right-2.5"],[1,"text-sm","text-white","font-semibold"],["key","close",1,"cursor-pointer","text-white",3,"click"],[1,"flex","items-center","justify-between","absolute","z-30","left-4","bottom-2.5","right-4","text-sm","text-white"],[1,"font-semibold"],[1,"mb-2","w-12","h-12","cursor-pointer","absolute","right-0","bottom-0","lg:relative",3,"avatar","shadow","border","click"]],template:function(i,t){1&i&&(e.F$t(),e.TgZ(0,"div",0),e.YNc(1,X,5,13,"div",1),e.YNc(2,te,5,3,"div",2),e.YNc(3,ne,1,4,"svg-icon",3),e.YNc(4,oe,5,2,"div",4),e.YNc(5,re,4,0,"div",5),e.YNc(6,de,6,5,"div",6),e.Hsn(7),e.qZA(),e.YNc(8,pe,1,3,"ui-avatar",7)),2&i&&(e.Q6J("ngClass",e.Hh0(8,ue,"preview"===t.size,"sm"===t.size,"xs"===t.size,"lg"!==t.size,"lg"===t.size||"md"===t.size,"preview"!==t.size,t.hidden)),e.xp6(1),e.Q6J("ngIf",t.videoDisabled&&!t.error),e.xp6(1),e.Q6J("ngIf",t.error),e.xp6(1),e.Q6J("ngIf",t.audioDisabled&&!t.isPublisher),e.xp6(1),e.Q6J("ngIf",t.isPublisher&&"preview"===t.size),e.xp6(1),e.Q6J("ngIf",t.isPublisher&&"sm"===t.size),e.xp6(1),e.Q6J("ngIf","md"===t.size),e.xp6(2),e.Q6J("ngIf",t.hidden))},directives:[l.mk,l.O5,A.A,l.RF,l.n9,l.ED,c.bk],pipes:[l.Ov,U.U],styles:[""]}),s})();const me=["publisherDiv"];let be=(()=>{class s{constructor(i,t,n,a){this.videocallService=i,this.overlayService=t,this.appointmentService=n,this.userService=a,this.next=new e.vpe,this.close=new e.vpe}ngAfterViewInit(){this.userService.user&&(this.user=this.userService.user),this.videocallService.setPublisher(this.publisherDiv,this.user).subscribe(i=>{i instanceof f.Publisher?this.publisher=i:this.error=i})}ngOnDestroy(){this.publisher&&this.publisher.destroy()}toggleAudio(){this.videocallService.audioDisabled=!this.videocallService.audioDisabled,this.publisher.publishAudio(!this.videocallService.audioDisabled)}toggleVideo(){this.videocallService.videoDisabled=!this.videocallService.videoDisabled,this.publisher.publishVideo(!this.videocallService.videoDisabled)}enter(){this.user instanceof k.$?this.next.emit(3):this.appointmentService.ready(this.appointment.i
1d).subscribe(()=>{this.next.emit(2)})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(T.N),e.Y36(v.F),e.Y36(_.H),e.Y36(C.K))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-setup"]],viewQuery:function(i,t){if(1&i&&e.Gf(me,5),2&i){let n;e.iGM(n=e.CRH())&&(t.publisherDiv=n.first)}},inputs:{appointment:"appointment"},outputs:{next:"next",close:"close"},decls:16,vars:7,consts:[[1,"container","pt-10","text-center","px-2"],[1,"flex","items-center","justify-center","mb-18"],["src","/assets/images/logo.svg",1,"inline","h-6","sm:h-8","sm:mr-2"],[1,"font-serif","text-dark","font-bold","text-xs","leading-3","sm:text-xl","sm:leading-4"],["key","close",1,"cursor-pointer","absolute","top-4","right-5",3,"click"],[1,"font-bold","text-2xl","lg:text-3xl","font-serif","text-dark","leading-7"],[1,"flex","justify-center","mt-8","mb-11"],[1,"w-72"],[3,"block","disabled","click"],[1,"flex","justify-center"],["size","preview",1,"w-full","lg:w-auto",3,"videoDisabled","audioDisabled","error","isPublisher","user","videoDisabledChange","audioDisabledChange"],[1,"h-full"],["publisherDiv",""]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"img",2),e.TgZ(3,"h1",3),e._uU(4,"D-stanza"),e.qZA(),e.TgZ(5,"svg-icon",4),e.NdJ("click",function(){return t.close.emit()}),e.qZA()(),e.TgZ(6,"h2",5),e._uU(7,"Pronto ad entrare nella D-stanza?"),e.qZA(),e.TgZ(8,"div",6)(9,"div",7)(10,"ui-button",8),e.NdJ("click",function(){return t.enter()}),e._uU(11,"Accedi alla D-stanza"),e.qZA()()(),e.TgZ(12,"div",9)(13,"lib-videocall-participant",10),e.NdJ("videoDisabledChange",function(){return t.toggleVideo()})("audioDisabledChange",function(){return t.toggleAudio()}),e._UZ(14,"div",11,12),e.qZA()()()),2&i&&(e.xp6(10),e.Q6J("block",!0)("disabled",!t.publisher),e.xp6(3),e.Q6J("videoDisabled",t.videocallService.videoDisabled)("audioDisabled",t.videocallService.audioDisabled)("error",t.error)("isPublisher",!0)("user",t.user))},directives:[c.bk,S.r,D],styles:[""]}),s})();var N=r(1307),M=r(8929),x=r(2654),w=r(2916),I=r(7094),J=r(5008);const ge=["publisherDiv"];let fe=(()=>{class s{constructor(i,t,n,a){this.snackbar=i,this.rollbar=t,this.videocallService=n,this.overlayService=a,this.size="lg",this.endCall=new M.xQ,this.published=new M.xQ,this.subscription=new x.w}ngAfterViewInit(){this.setPublisher()}ngOnDestroy(){this.disconnect(),this.subscription.unsubscribe()}toggleAudio(){this.videocallService.audioDisabled=!this.videocallService.audioDisabled,this.publisher.publishAudio(!this.videocallService.audioDisabled)}toggleVideo(){this.videocallService.videoDisabled=!this.videocallService.videoDisabled,this.publisher.publishVideo(!this.videocallService.videoDisabled)}setPublisher(){this.videocallService.setPublisher(this.publisherDiv,this.user).subscribe(i=>{if(i instanceof f.Publisher)this.publisher=i,this.handlePublisherEvents(),this.session&&(this.session.isConnected()&&this.publish(this.publisher),this.subscription.add(this.sessionEvent("sessionConnected").subscribe(t=>this.publish(this.publisher))));else{const t=i;"OT_USER_MEDIA_ACCESS_DENIED"===t?this.overlayService.open(Z):this.overlayService.info("Errore","OT_NOT_SUPPORTED"===t?"Il tuo browser non supporta le videochiamate. Si prega di provare con un browser o dispositivo differente.":"Impossibile accedere alla webcam o al microfono. Per favore, verifica che la tua webcam sia connessa e non utilizzata da un'altra applicazione"),this.endCall.next()}})}startScreenSharing(){var i;this.screenSharingEnabled&&this.screenSharing?(this.screenSharing.destroy(),this.screenSharing=void 0,this.screenSharingEnabled=!1):this.screenSharing=f.initPublisher(document.createElement("div"),{videoSource:"screen",publishAudio:!1,resolution:"1280x720",name:null===(i=this.user)||void 0===i?void 0:i.fullName},t=>{t?"OT_USER_MEDIA_ACCESS_DENIED"!==t.name&&(this.rollbar.error("PUBLISHER-SCREENSHARING:publishing error",t.name,t.message),this.overlayService.info("Errore","Impossibile condividere lo schermo.")):this.session&&(this.session.isConnected()&&this.publish(this.screenSharing,!0),this.subscription.add(this.sessionEvent("sessionConnected").subscribe(()=>this.publish(this.screenSharing,!0))))})}reconnect(){this.disconnect(),this.setPublisher()}disconnect(){this.session.unpublish(this.publisher),this.publisher.destroy()}publish(i,t){!i||(this.rollbar.info("PUBLISHER:publishing"),this.session.publish(i,n=>
1{if(n){switch(this.rollbar.error("PUBLISHER:publishing error",n.name,n.message),n.name){case"OT_USER_MEDIA_ACCESS_DENIED":this.overlayService.open(Z);break;case"OT_NOT_CONNECTED":this.overlayService.info("Impossibile trasmettere il video","Nessuna connessione a internet. Si prega di riprovare.");break;case"OT_CREATE_PEER_CONNECTION_FAILED":this.overlayService.info("Impossibile trasmettere il video","Potrebbe essere dovuto a un firewall che ne impedisce l'accesso");break;default:this.overlayService.info("Impossibile trasmettere il video","Si \xe8 verificato un errore sconosciuto. Si prega di riprovare pi\xf9 tardi.")}i.destroy()}else t&&(this.screenSharingEnabled=!0),this.rollbar.info("PUBLISHER:published",{isScreenSharing:t}),this.published.next()}))}handlePublisherEvents(){this.subscription.add(this.publisherEvent("streamDestroyed").subscribe(i=>this.onStreamDestroyed(i)))}onStreamDestroyed(i){this.rollbar.info("PUBLISHER:streamDestroyed",i),"clientDisconnected"===i.reason?"camera"===i.stream.videoType&&this.reconnect():"mediaStopped"===i.reason&&"camera"===i.stream.videoType&&this.endCall.next()}sessionEvent(i){return new w.y(t=>{this.session.on(i,n=>{t.next(n)})})}publisherEvent(i){return new w.y(t=>{this.publisher.on(i,n=>{t.next(n)})})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(J.o),e.Y36(I.t2),e.Y36(T.N),e.Y36(v.F))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-publisher"]],viewQuery:function(i,t){if(1&i&&e.Gf(ge,5),2&i){let n;e.iGM(n=e.CRH())&&(t.publisherDiv=n.first)}},inputs:{session:"session",size:"size",user:"user"},decls:3,vars:5,consts:[[3,"size","videoDisabled","audioDisabled","isPublisher","user"],[1,"h-full"],["publisherDiv",""]],template:function(i,t){1&i&&(e.TgZ(0,"lib-videocall-participant",0),e._UZ(1,"div",1,2),e.qZA()),2&i&&e.Q6J("size",t.size)("videoDisabled",t.videocallService.videoDisabled)("audioDisabled",t.videocallService.audioDisabled)("isPublisher",!0)("user",t.user)},directives:[D],styles:[""]}),s})();var ve=r(710);const _e=["subscriberDiv"],Ce=["screenSharingDiv"];let xe=(()=>{class s{constructor(i,t){this.rollbar=i,this.overlayService=t,this.size="lg",this.subscription=new x.w}ngAfterViewInit(){this.subscribe(),this.handleSubscriberEvents()}subscribe(){this.rollbar.info("SUBSCRIBER:subscribing"),this.subscriber=this.session.subscribe(this.stream,this.subscriberDiv.nativeElement,{insertMode:"append",width:"100%",height:"100%",showControls:!1},i=>{i?(this.rollbar.error("SUBSCRIBER:error",i.name,i.message),this.overlayService.info("Impossibile connettersi","Potrebbe esserci un problema con il firewall tuo o del tuo interlocutore")):(this.user=this.getUser(),this.audioDisabled=!this.stream.hasAudio,this.videoDisabled=!this.stream.hasVideo,this.rollbar.info("SUBSCRIBER:subscribed"))})}getUser(){const i=this.stream.connection.data;let t=null;return i&&(t=this.appointment.patients.find(n=>n.id===i),t||(t=this.appointment.therapists.find(n=>n.id===i))),t||(t=new ve.n({}),t.full_name=this.stream.name),t}setScreenSharing(i){this.screenSharing=this.session.subscribe(i,this.screenSharingDiv.nativeElement,{insertMode:"append",width:"100%",height:"100%",showControls:!1},t=>{t?this.rollbar.error("SUBSCRIBER-SCREENSHARING: error",t.name,t.message):(this.user=this.getUser(),this.rollbar.info("SUBSCRIBER:screenSharing subscribed"))})}removeScreenSharing(){this.screenSharing=void 0}ngOnDestroy(){this.session.unsubscribe(this.subscriber),this.subscription.unsubscribe()}handleSubscriberEvents(){this.subscription.add(this.sessionEvent("streamPropertyChanged").subscribe(i=>this.onStreamPropertyChanged(i))),this.subscription.add(this.subscriberEvent("audioLevelUpdated").subscribe(i=>this.onAudioLevelUpdated(i)))}onStreamPropertyChanged(i){i.stream.streamId===this.stream.streamId&&("hasAudio"===i.changedProperty&&(this.audioDisabled=!i.newValue),"hasVideo"===i.changedProperty&&(this.videoDisabled=!i.newValue))}onAudioLevelUpdated(i){this.movingAvg=!this.movingAvg||this.movingAvg<=i.audioLevel?i.audioLevel:.7*this.movingAvg+.3*i.audioLevel,this.audioLevel=Math.log(this.movingAvg)/Math.LN10/1.5+1,this.audioLevel=Math.min(Math.max(this.audioLevel,0),1)}sessionEvent(i){return new w.y(t=>{this.session.on(i,n=>{t.next(n)})})}subscriberEvent(i){return new w.y(t=>{this.subscriber.on(i,n=>{t.next(n)})})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(I.t2),e.Y36(v.F))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-subscriber"]],viewQuery:function(i,t){if(1&i&&(e.Gf(_e,7),e.Gf(Ce,7)),2&i){let n;e.iGM(n=e.CRH())&&(t.subscriberDiv=n.first),e.iGM(n=e.CRH())&&(t.screenSharingDiv=n.first)}}
1,inputs:{session:"session",stream:"stream",appointment:"appointment",size:"size"},decls:5,vars:6,consts:[[3,"size","videoDisabled","audioDisabled","user"],[1,"h-full"],["subscriberDiv",""],["screenSharingDiv",""]],template:function(i,t){1&i&&(e.TgZ(0,"lib-videocall-participant",0),e._UZ(1,"div",1,2)(3,"div",1,3),e.qZA()),2&i&&(e.Q6J("size",t.size)("videoDisabled",t.videoDisabled)("audioDisabled",t.audioDisabled)("user",t.user),e.xp6(1),e.ekj("hidden",t.screenSharing))},directives:[D],styles:[""]}),s})();var Q=r(1392),L=r(4350),F=r(520),we=r(9189);let q=(()=>{class s{constructor(i,t){this.http=i,this.db=t}list(){return this.http.get("/assets/json/chats.json")}get(i){return this.list().pipe((0,y.U)(t=>t.find(n=>n.id===i)))}getMessages(i){return this.db.list("chats/"+i).valueChanges()}sendMessage(i,t){this.db.list("chats/"+i).push(t)}}return s.\u0275fac=function(i){return new(i||s)(e.LFG(F.eN),e.LFG(we.KQ))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();function Te(s,o){1&s&&e._UZ(0,"div",3)}const Se=function(s,o,i,t,n,a,p){return{"bg-error-500 text-white":s,"text-brand-900":o,"hover:bg-brand-300 text-brand-900":i,"bg-brand-300":t,"bg-error-700":n,"w-10 h-10":a,"w-12 h-12":p}};let ye=(()=>{class s{constructor(){this.color="white",this.size="lg"}}return s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["ui-call-button"]],inputs:{color:"color",icon:"icon",size:"size",active:"active",badge:"badge"},decls:3,vars:12,consts:[[1,"flex","items-center","justify-center","rounded-full","cursor-pointer","shadow-2xl","relative",3,"ngClass"],[3,"key","size"],["class","absolute w-2 h-2 rounded-full bg-error-600 top-2 right-1.5",4,"ngIf"],[1,"absolute","w-2","h-2","rounded-full","bg-error-600","top-2","right-1.5"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0),e._UZ(1,"svg-icon",1),e.YNc(2,Te,1,0,"div",2),e.qZA()),2&i&&(e.Q6J("ngClass",e.Hh0(4,Se,"red"===t.color,"white"===t.color,"none"===t.color,t.active&&"red"!==t.color||"white"===t.color,t.active&&"red"===t.color,"md"===t.size,"lg"===t.size)),e.xp6(1),e.Q6J("key",t.icon)("size",t.size),e.xp6(1),e.Q6J("ngIf",t.badge))},directives:[l.mk,c.bk,l.O5],styles:[""]}),s})();var Ze=r(2868);const Ae=function(s,o,i,t){return{"justify-start":s,"justify-end":o,"mb-6":i,"mb-2":t}},De=function(s,o,i,t){return{"pt-7 pb-4 w-2/3":s,"pt-5 pb-2 w-full":o,"bg-white rounded-tr-2xl":i,"bg-accent-200 rounded-tl-2xl":t}};let Ie=(()=>{class s{constructor(){this.size="lg"}ngOnInit(){}}return s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-message-item"]],inputs:{message:"message",currentUserId:"currentUserId",size:"size"},decls:7,vars:17,consts:[[1,"flex",3,"ngClass"],[1,"rounded-b-2xl","shadow-md","px-4","text-dark",3,"ngClass"],[1,"text-sm","mb-4"],[1,"text-xs","text-right"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"p",2),e._uU(3),e.qZA(),e.TgZ(4,"p",3),e._uU(5),e.ALo(6,"date"),e.qZA()()()),2&i&&(e.Q6J("ngClass",e.l5B(7,Ae,t.message.sender!==t.currentUserId||"sm"===t.size,t.message.sender===t.currentUserId&&"sm"!==t.size,"lg"===t.size,"sm"===t.size)),e.xp6(1),e.Q6J("ngClass",e.l5B(12,De,"lg"===t.size,"sm"===t.size,t.message.sender!==t.currentUserId,t.message.sender===t.currentUserId)),e.xp6(2),e.Oqu(t.message.content),e.xp6(2),e.Oqu(e.xi3(6,4,t.message.date,"short")))},directives:[l.mk],pipes:[l.uU],styles:[""]}),s})();function Re(s,o){if(1&s&&e._UZ(0,"lib-message-item",1),2&s){const i=o.$implicit,t=e.oxw();e.Q6J("message",i)("size",t.size)("currentUserId",t.currentUserId)}}let Ee=(()=>{class s{constructor(){this.size="lg"}ngOnInit(){}}return s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-messages-list"]],inputs:{messages:"messages",currentUserId:"currentUserId",size:"size"},decls:1,vars:1,consts:[[3,"message","size","currentUserId",4,"ngFor","ngForOf"],[3,"message","size","currentUserId"]],template:function(i,t){1&i&&e.YNc(0,Re,1,3,"lib-message-item",0),2&i&&e.Q6J("ngForOf",t.messages)},directives:[l.sg,Ie],styles:[""]}),s})();var Ve=r(1927);const Oe=["list"],Pe=["inputField"];let ke=(()=>{class s{constructor(i,t){this.userService=i,this.chatService=t,this.closed=new e.vpe}ngOnInit(){this.messages$=this.chatService.getMessages(this.appointment.i
1d).pipe((0,Ze.b)(()=>{setTimeout(()=>{this.list&&(this.list.nativeElement.scrollTop=this.list.nativeElement.scrollHeight)})})),setTimeout(()=>{var i;null===(i=this.inputField)||void 0===i||i.focus()})}send(){var i;this.chatService.sendMessage(this.appointment.id,{content:this.newMessage,date:(new Date).toISOString(),sender:null===(i=this.userService.user)||void 0===i?void 0:i.id}),this.newMessage="",setTimeout(()=>{this.list.nativeElement.scrollTop=this.list.nativeElement.scrollHeight})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(C.K),e.Y36(q))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-chat-widget"]],viewQuery:function(i,t){if(1&i&&(e.Gf(Oe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(t.list=n.first),e.iGM(n=e.CRH())&&(t.inputField=n.first)}},inputs:{appointment:"appointment"},outputs:{closed:"closed"},decls:13,vars:5,consts:[[1,"flex","flex-col","w-full","lg:w-66","h-full","justify-between","bg-brand-50","rounded-2xl","shadow-2xl","text-dark"],[1,"flex","justify-between","p-4"],[1,"font-medium"],["key","close",1,"cursor-pointer",3,"click"],[1,"flex","flex-col","h-full"],[1,"flex-h","overflow-y-auto","p-1"],["list",""],["size","sm",3,"messages","currentUserId"],[1,"h-15","p-2"],["placeholder","Scrivi un messaggio...",3,"ngModel","ngModelChange","keydown.enter"],["inputField",""]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),e._uU(3,"Chat"),e.qZA(),e.TgZ(4,"svg-icon",3),e.NdJ("click",function(){return t.closed.emit()}),e.qZA()(),e.TgZ(5,"div",4)(6,"div",5,6),e._UZ(8,"lib-messages-list",7),e.ALo(9,"async"),e.qZA(),e.TgZ(10,"div",8)(11,"ui-input",9,10),e.NdJ("ngModelChange",function(a){return t.newMessage=a})("keydown.enter",function(){return t.send()}),e.qZA()()()()),2&i&&(e.xp6(8),e.Q6J("messages",e.lcZ(9,3,t.messages$))("currentUserId",null==t.userService.user?null:t.userService.user.id),e.xp6(3),e.Q6J("ngModel",t.newMessage))},directives:[c.bk,Ee,Ve.a,h.JJ,h.On],pipes:[l.Ov],styles:[".flex-h[_ngcontent-%COMP%]{height:calc(100vh - 196px)}@media (min-width: 1024px){.flex-h[_ngcontent-%COMP%]{height:calc(100vh - 246px)}}"]}),s})();var ze=r(5850);function Ue(s,o){1&s&&(e.TgZ(0,"div",6),e._UZ(1,"ui-spinner",7),e.qZA()),2&s&&(e.xp6(1),e.Q6J("diameter",40))}function Ne(s,o){if(1&s&&(e.TgZ(0,"div",10),e._UZ(1,"ui-avatar",11),e.TgZ(2,"div",12),e._uU(3),e.qZA()()),2&s){const i=o.$implicit;e.xp6(1),e.Q6J("avatar",i.instance.avatar),e.xp6(2),e.Oqu(i.instance.name)}}function Me(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",18)(1,"div",10),e._UZ(2,"ui-avatar",11),e.TgZ(3,"div",12),e._uU(4),e.qZA()(),e.TgZ(5,"div",19),e.NdJ("click",function(){const n=e.CHM(i),a=n.$implicit,p=n.index;return e.oxw(3).accept(a,p)}),e._UZ(6,"svg-icon",20),e.qZA()()}if(2&s){const i=o.$implicit;e.xp6(2),e.Q6J("avatar",i.avatar),e.xp6(2),e.Oqu(i.fullName)}}function Je(s,o){if(1&s&&(e.TgZ(0,"div")(1,"h2",15),e._uU(2,"In attesa di entrare"),e.qZA(),e.TgZ(3,"div",16),e.YNc(4,Me,7,2,"div",17),e.qZA()()),2&s){const i=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",i.waiting)}}function Qe(s,o){if(1&s&&(e.TgZ(0,"div",8)(1,"div",9)(2,"div",10),e._UZ(3,"ui-avatar",11),e.TgZ(4,"div",12),e._uU(5),e.qZA()(),e.YNc(6,Ne,4,2,"div",13),e.qZA(),e.YNc(7,Je,5,1,"div",14),e.qZA()),2&s){const i=e.oxw();e.xp6(3),e.Q6J("avatar",null==i.publisherRef?null:i.publisherRef.instance.user.avatar),e.xp6(2),e.hij("",null==i.publisherRef?null:i.publisherRef.instance.user.fullName," (Tu)"),e.xp6(1),e.Q6J("ngForOf",i.subscriberRefs),e.xp6(1),e.Q6J("ngIf",(null==i.waiting?null:i.waiting.length)&&i.userService.user.isTherapist)}}let Le=(()=>{class s{constructor(i,t){this.appointmentService=i,this.userService=t,this.subscriberRefs=[],this.closed=new e.vpe,this.loading=!0,this.subscription=new x.w}ngOnInit(){var i;this.reloadAppointment(),(null===(i=this.userService.user)||void 0===i?void 0:i.isTherapist)&&this.subscription.add(this.appointmentService.videocallEvents$(this.appointment.id).subscribe(t=>{t.event===Q.o.APPOINTMENT_PATIENT_READY&&this.reloadAppointment()}))}ngOnDestroy(){this.subscription.unsubscribe()}reloadAppointment(){this.appointmentService.get(this.appointment.i
1d).subscribe(i=>{this.waiting=i.waitingPatients,this.loading=!1})}accept(i,t){this.appointmentService.accept(this.appointment.id,i.id).subscribe(()=>{this.waiting.splice(t,1)})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(_.H),e.Y36(C.K))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-participants-list"]],inputs:{appointment:"appointment",publisherRef:"publisherRef",subscriberRefs:"subscriberRefs"},outputs:{closed:"closed"},decls:7,vars:2,consts:[[1,"flex","flex-col","w-full","lg:w-66","h-full","justify-between","bg-brand-50","rounded-2xl","shadow-2xl","text-dark","p-2","pt-4"],[1,"flex","justify-between","px-2","mb-4"],[1,"font-medium"],["key","close",1,"cursor-pointer",3,"click"],["class","flex justify-center m-5",4,"ngIf"],["class","flex-h overflow-y-auto",4,"ngIf"],[1,"flex","justify-center","m-5"],[3,"diameter"],[1,"flex-h","overflow-y-auto"],[1,"px-2","mb-4","flex","flex-col","gap-5"],[1,"flex","items-center"],[1,"w-8","h-8",3,"avatar"],[1,"text-xs","ml-2"],["class","flex items-center",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"font-medium","px-2","mb-4"],[1,"flex","flex-col","bg-accent-100","rounded-md","p-2","gap-5"],["class","flex items-center justify-between w-full",4,"ngFor","ngForOf"],[1,"flex","items-center","justify-between","w-full"],[1,"group","hover:bg-accent-500","cursor-pointer","hover:text-white","border-3","border-accent-500","w-8","h-8","flex","items-center","justify-center","rounded-full",3,"click"],["key","checkbox","size","sm",1,"text-accent-500","group-hover:text-white"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),e._uU(3,"Partecipanti"),e.qZA(),e.TgZ(4,"svg-icon",3),e.NdJ("click",function(){return t.closed.emit()}),e.qZA()(),e.YNc(5,Ue,2,1,"div",4),e.YNc(6,Qe,8,4,"div",5),e.qZA()),2&i&&(e.xp6(5),e.Q6J("ngIf",t.loading),e.xp6(1),e.Q6J("ngIf",!t.loading))},directives:[c.bk,l.O5,ze.O,A.A,l.sg],styles:[".flex-h[_ngcontent-%COMP%]{height:calc(100vh - 144px)}@media (min-width: 1024px){.flex-h[_ngcontent-%COMP%]{height:calc(100vh - 194px)}}"]}),s})();function Fe(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",4)(1,"div",5),e._UZ(2,"ui-avatar",6),e.TgZ(3,"div",7),e._uU(4),e.qZA()(),e.TgZ(5,"div",8),e.NdJ("click",function(){const n=e.CHM(i),a=n.$implicit,p=n.index;return e.oxw(2).accept(a,p)}),e._UZ(6,"svg-icon",9),e.qZA()()}if(2&s){const i=o.$implicit;e.xp6(2),e.Q6J("avatar",i.avatar),e.xp6(2),e.AsE("",i.first_name," ",i.last_name,"")}}function qe(s,o){if(1&s&&(e.TgZ(0,"div",1)(1,"div",2),e.YNc(2,Fe,7,3,"div",3),e.qZA()()),2&s){const i=e.oxw();e.xp6(2),e.Q6J("ngForOf",i.waiting)}}let Ye=(()=>{class s{constructor(i){this.appointmentService=i,this.waitingChange=new e.vpe}ngOnInit(){}accept(i,t){this.appointmentService.accept(this.appointment.id,i.id).subscribe(()=>{this.waiting.splice(t,1),this.waitingChange.next(this.waiting)})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(_.H))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-participants-request"]],inputs:{waiting:"waiting",appointment:"appointment"},outputs:{waitingChange:"waitingChange"},decls:1,vars:1,consts:[["class","flex flex-col w-66 h-full justify-between bg-brand-50 rounded-2xl shadow-2xl text-dark p-2",4,"ngIf"],[1,"flex","flex-col","w-66","h-full","justify-between","bg-brand-50","rounded-2xl","shadow-2xl","text-dark","p-2"],[1,"flex","flex-col","rounded-md","p-2","gap-5"],["class","flex items-center justify-between w-full",4,"ngFor","ngForOf"],[1,"flex","items-center","justify-between","w-full"],[1,"flex","items-center"],[1,"w-8","h-8",3,"avatar"],[1,"text-xs","ml-2"],[1,"group","hover:bg-accent-500","cursor-pointer","hover:text-white","border-3","border-accent-500","w-8","h-8","flex","items-center","justify-center","rounded-full",3,"click"],["key","checkbox","size","sm",1,"text-accent-500","group-hover:text-white"]],template:function(i,t){1&i&&e.YNc(0,qe,3,1,"div",0),2&i&&e.Q6J("ngIf",null==t.waiting?null:t.waiting.length)},directives:[l.O5,l.sg,A.A,c.bk],styles:[""]}),s})();function Be(s,o){if(1&s&&(e.TgZ(0,"p",22),e._uU(1),e.ALo(2,"dateTz"),e.qZA()),2&s){const i=o.ngIf,t=e.oxw();e.xp6(1),e.hij("Ora locale: ",e.Dn7(2,1,i,"HH:mm",t.subscriber.time_zone),"")}}function He(s,o){if(1&s&&(e.TgZ(0,"p",23),e._uU(1),e.ALo(2,"dateTz"),e.qZA()),2&s){const i=o.ngIf,t=e.oxw();e.xp6(1),e.hij("Ora locale: ",e.Dn7(2,1,i,"HH:mm",t.subscriber.time_zone),"")}}function je(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"ui-call-button",24),e.NdJ("click",function(){e.CHM(i);const n=e.oxw();return null==n.publisherRef?null:n.publisherRef.instance.startScreenSharing(
1)}),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("icon",null!=i.publisherRef&&i.publisherRef.instance.screenSharingEnabled?"share-disabled":"share")}}function $e(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",25)(1,"ui-button",26),e.NdJ("click",function(){return e.CHM(i),e.oxw().endCall.emit()}),e._uU(2,"Chiudi chiamata"),e.qZA(),e.TgZ(3,"ui-button",27),e.NdJ("click",function(){return e.CHM(i),e.oxw().closeSession.emit()}),e._uU(4,"Chiudi seduta"),e.qZA(),e.TgZ(5,"svg-icon",28),e.NdJ("click",function(){return e.CHM(i),e.oxw().endcallControlsOpen=!1}),e.qZA()()}}function We(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"lib-chat-widget",29),e.NdJ("closed",function(){return e.CHM(i),e.oxw().chatOpen=!1}),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("appointment",i.appointment)}}function Ge(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"lib-videocall-participants-list",30),e.NdJ("closed",function(){return e.CHM(i),e.oxw().participantsOpen=!1}),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("appointment",i.appointment)("publisherRef",i.publisherRef)("subscriberRefs",i.subscriberRefs)}}function Xe(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"lib-videocall-participants-request",31),e.NdJ("waitingChange",function(n){return e.CHM(i),e.oxw().waiting=n}),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("waiting",i.waiting)("appointment",i.appointment)}}let Ke=(()=>{class s{constructor(i,t,n,a){this.videocallService=i,this.userService=t,this.chatService=n,this.appointmentService=a,this.subscriberRefs=[],this.endCall=new e.vpe,this.closeSession=new e.vpe,this.waiting=[],this.subscription=new x.w}ngOnInit(){var i;this.name=this.getName(),this.appointment.typology===L.N3.single&&(this.timer$=(0,z.H)(0,6e4).pipe((0,y.U)(()=>new Date))),this.checkScreenSharingSupport(),this.checkNewMessages(),(null===(i=this.userService.user)||void 0===i?void 0:i.isTherapist)&&(this.handleEvents(),this.appointment.waitingPatients.length&&(this.participantsOpen=!0))}getName(){var i,t,n;return this.appointment.typology===L.N3.single?(null===(i=this.userService.user)||void 0===i?void 0:i.isTherapist)?null===(t=this.appointment.therapy)||void 0===t?void 0:t.name:this.appointment.therapist.fullName:null===(n=this.appointment.therapy)||void 0===n?void 0:n.name}checkNewMessages(){this.subscription.add(this.chatService.getMessages(this.appointment.id).subscribe(i=>{this.totalMessages||(this.totalMessages=i.length),!this.chatOpen&&i.length>this.totalMessages&&(this.newMessage=!0,this.totalMessages=i.length)}))}handleEvents(){this.subscription.add(this.appointmentService.videocallEvents$(this.appointment.id).subscribe(i=>{i.event===Q.o.APPOINTMENT_PATIENT_READY&&this.waiting.push(i.data.patient)}))}ngOnDestroy(){this.subscription.unsubscribe()}toggleChat(){this.chatOpen=!this.chatOpen,this.newMessage=!1}closeCall(){var i;(null===(i=this.userService.user)||void 0===i?void 0:i.isTherapist)?this.endcallControlsOpen=!this.endcallControlsOpen:this.endCall.emit()}checkScreenSharingSupport(){f.checkScreenSharingCapability(i=>{this.screenSharingSupported=i.supported})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(T.N),e.Y36(C.K),e.Y36(q),e.Y36(_.H))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-toolbar"]],inputs:{subscriber:"subscriber",publisherRef:"publisherRef",subscriberRefs:"subscriberRefs",appointment:"appointment"},outputs:{endCall:"endCall",closeSession:"closeSession"},decls:29,vars:20,consts:[[1,"fixed","top-0","left-0","right-0","z-20","bg-brand-50","flex","items-center","justify-center","lg:hidden","h-14","px-4"],[1,"flex","items-center"],["src","/assets/images/logo.svg",1,"inline","mr-5"],[1,"text-sm","font-semibold"],["class","text-xs",4,"ngIf"],[1,"fixed","bottom-0","left-0","right-0","z-20","grid","grid-cols-3","items-center","bg-brand-100","h-20","px-4","lg:px-8"],[1,"items-center","hidden","lg:flex"],[1,"text-base","font-semibold"],["class","text-sm",4,"ngIf"],["icon","user-group","color","none","size","md",1,"lg:hidden",3,"active","click"],[1,"flex","items-center","justify-center","gap-x-6","relative"],["class","hidden lg:block",3,"icon","click",4,"ngIf"],[3,"icon","click"],[1,"order-last","lg:order-none",3,"icon","click"],["icon","end-call","color","red",3,"active","click"],["class","flex items-center bg-white rounded-lg shadow-2xl px-5 py-3 absolute -top-20 lg:ml-52 w-96",4,"ngIf"],[1,"flex","items-center","justify-end","gap-x-6"],["icon","messages","color","none","size","md",3,"badge","active","click"],["icon","user-group","color","none","size","md",1,"hidden","lg:block",3,"active","click"],["class","fixed left-0 right-0 lg:left-auto z-30 lg:right-10 bottom-20 lg:mb-2",3,"appointment","closed",4,"ngIf"],["class","fixed left-0 right-0 lg:left-auto z-30 lg:right-10 bottom-20 lg:mb-2",3,"appointment","publisherRef","subscriberRefs","closed",4,"ngIf"],["class","fixed top-20 right-4 lg:top-auto lg:right-10 lg:bottom-20 mb-2",3,"waiting","appointment","waitingChange",4,"ngIf"],[1,"text-xs"],[1,"text-sm"],[1,"hidden","lg:block",3,"icon","click"],[1,"flex","items-center","bg-white","rounded-lg","shadow-2xl","px-5","py-3","absolute","-top-20","lg:ml-52","w-96"],["fill","none","color","red",1,"mr-5",3,"click"],["color","red",3,"click"],["key","close",1,"ml-11","cursor-pointer",3,"click"],[1,"fixed","left-0","right-0","lg:left-auto","z-30","lg:right-10","bottom-20","lg:mb-2",3,"appointment","closed"],[1,"fixed","left-0","right-0","lg:left-auto","z-30","lg:right-10","bottom-20","lg:mb-2",3,"appointment","publisherRef","subscriberRefs","closed"],[1,"fixed","top-20","right-4","lg:top-auto","lg:right-10","lg:bottom-20","mb-2",3,"waiting","appointment","waitingChange"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"img",2),e.TgZ(3,"div")(4,"h2",3),e._uU(5),e.qZA(),e.YNc(6,Be,3,5,"p",4),e.ALo(7,"async"),e.qZA()()(),e.TgZ(8,"div",5)(9,"div",6),e._UZ(10,"img",2),e.TgZ(11,"div")(12,"h2",7),e._uU(13),e.qZA(),e.YNc(14,He,3,5,"p",8),e.ALo(15,"async"),e.qZA()(),e.TgZ(16,"ui-call-button",9),e.NdJ("click",function(){return t.participantsOpen=!t.participantsOpen}),e.qZA(),e.TgZ(17,"div",10),e.YNc(18,je,1,1,"ui-call-button",11),e.TgZ(19,"ui-call-button",12),e.NdJ("click",function(){return null==t.publisherRef?null:t.publisherRef.instance.toggleVideo()}),e.qZA(),e.TgZ(20,"ui-call-button",13),e.NdJ("click",function(){return null==t.publisherRef?null:t.publisherRef.instance.toggleAudio()}),e.qZA(),e.TgZ(21,"ui-call-button",14),e.NdJ("click",function(){return t.closeCall()}),e.qZA(),e.YNc(22,$e,6,0,"div",15),e.qZA(),e.TgZ(23,"div",16)(24,"ui-call-button",17),e.NdJ("click",function(){return t.toggleChat()}),e.qZA(),e.TgZ(25,"ui-call-button",18),e.NdJ("click",function(){return t.participantsOpen=!t.participantsOpen}),e.qZA()()(),e.YNc(26,We,1,1,"lib-chat-widget",19),e.YNc(27,Ge,1,3,"lib-videocall-participants-list",20),e.YNc(28,Xe,1,2,"lib-videocall-participants-request",21)),2&i&&(e.xp6(5),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",e.lcZ(7,16,t.subscriber&&t.timer$)),e.xp6(7),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",e.lcZ(15,18,t.subscriber&&t.timer$)),e.xp6(2),e.Q6J("active",t.participantsOpen),e.xp6(2),e.Q6J("ngIf",t.screenSharingSupported),e.xp6(1),e.Q6J("icon",t.videocallService.videoDisabled?"video-disabled":"video"),e.xp6(1),e.Q6J("icon",t.videocallService.audioDisabled?"mic-disabled":"mic"),e.xp6(1),e.Q6J("active",t.endcallControlsOpen),e.xp6(1),e.Q6J("ngIf",t.endcallControlsOpen),e.xp6(2),e.Q6J("badge",t.newMessage)("active",t.chatOpen),e.xp6(1),e.Q6J("active",t.participantsOpen),e.xp6(1),e.Q6J("ngIf",t.chatOpen),e.xp6(1),e.Q6J("ngIf",t.participantsOpen),e.xp6(1),e.Q6J("ngIf",(null==t.waiting?null:t.waiting.length)&&!t.participantsOpen))},directives:[l.O5,ye,S.r,c.bk,ke,Le,Ye],pipes:[l.Ov,U.U],styles:[""]}),s})();const ei=["main"],ii=["secondary"];function ti(s,o){1&s&&(e.TgZ(0,"span"),e._uU(1,"Apri la porta e ammetti pazienti che stanno attendendo in sala d\u2019attesa. I pazienti che arriveranno dopo, potranno suonare il campanello, e potrai ammetterli quando lo riterrai necessario."),e.qZA())}function si(s,o){1&s&&(e.TgZ(0,"span"),e._uU(1,"Attendi che il terapeuta ritorni online."),e.qZA())}function ni(s,o){if(1&s&&(e.TgZ(0,"div",3)(1,"div",4,5)(3,"div",6),e._UZ(4,"img",7),e.TgZ(5,"h2",8),e._uU(6,"Ancora nessuno nella D-stanza"),e.qZA(),e.TgZ(7,"p",9),e.YNc(8,ti,2,0,"span",10),e.YNc(9,si,2,0,"span",10),e.qZA()()(),e.TgZ(10,"div",11),e.GkF(11,null,12),e.qZA()()),2&s){const i=e.oxw();e.xp6(8),e.Q6J("ngIf",i.isTherapist),e.xp6(1),e.Q6J("ngIf",!i.isTherapist)}}const oi=function(s,o,i){return{"wrapper-5":s,"wrapper-7":o,"wrapper-9":i}};function ri(s,o){if(1&s&&(e.TgZ(0,"div",13),e.GkF(1,null,5)(3,null,12),e.qZA()),2&s){const i=e.oxw();e.Q6J("ngClass",e.kEZ(1,oi,i.subscriberRefs.length>=5&&i.subscriberRefs.length<7,i.subscriberRefs.length>=7&&i.subscriberRefs.length<9,i.subscriberRefs.length>=9))}}let li=(()=>{class s{constructor(i,t,n,a,p,R){this.componentFactoryResolver=i,this.userService=t,this.overlayService=n,this.snackbar=a,this.rollbar=p,this.appointmentService=R,this.endCall=new e.vpe,this.sessionClosed=new e.vpe,this.subscriberRefs=[],this.connectionCount=0,this.subscription=new x.w,this.streams=[]}ngOnInit(){this.isTherapist=this.userService.user instanceof k.$,this.isTherapist||this.subscription.add(this.appointmentService.statusChange$.subscribe(()=>{this.endCall.emit(),this.overlayService.info("Fine della sessione","Il terapeuta ha terminato la sessione")})),this.subscriber=this.isTherapist?this.appointment.patient:this.appointment.therapist}ngAfterViewInit(){this.appointmentService.connect(this.appointment.i
1d).subscribe(i=>{this.appointment=i,this.initSession(),this.handleSessionEvents()})}initSession(){this.appointment.tokbox_session&&(this.session=f.initSession(N.N.vonageApiKey,this.appointment.tokbox_session),this.createPublisher(),this.sessionConnect())}sessionConnect(){const i=this.appointment.getTokboxId(this.userService.user);i?this.session.connect(i,t=>{t?(this.rollbar.error("VIDEOCALL:error connect",t.name,t.message),"OT_NOT_CONNECTED"===t.name?this.overlayService.info("Impossibile connettersi","Nessuna connessione a internet. Verificare la connessione e riprovare").afterClosed$.subscribe(()=>{this.sessionConnect()}):this.overlayService.info("Errore","Si \xe8 verificato un errore durante la connessione. Si prega di riprovare.").afterClosed$.subscribe(()=>{this.sessionConnect()})):(this.rollbar.info("VIDEOCALL:connected"),this.subscription.add(this.sessionEvent("streamCreated").subscribe(n=>this.onStreamCreated(n.stream))))}):(this.rollbar.error("VIDEOCALL: NO TOKEN"),this.overlayService.info("Errore","Si \xe8 verificato un errore durante la connessione. Si prega di riprovare.").afterClosed$.subscribe(()=>{this.sessionConnect()}))}createPublisher(){const i=this.componentFactoryResolver.resolveComponentFactory(fe);this.publisherRef=this.secondaryRef.createComponent(i),this.publisherRef.instance.session=this.session,this.publisherRef.instance.size=this.appointment.isSingle?"sm":"md",this.userService.user&&(this.publisherRef.instance.user=this.userService.user),this.subscription.add(this.publisherRef.instance.endCall.subscribe(()=>this.endCall.emit())),this.subscription.add(this.publisherRef.instance.published.subscribe(()=>{this.rollbar.info("VIDEOCALL: publisher published"),this.alreadyPublished=!0,this.rollbar.info("VIDEOCALL: streams waiting to process: "+this.streams.length),this.streams.forEach(t=>this.processStream(t)),this.streams=[]}))}createSubscriber(i){this.rollbar.info("VIDEOCALL: createSubscriber",i);const t=this.componentFactoryResolver.resolveComponentFactory(xe),n=this.appointment.isSingle?this.mainRef.createComponent(t):this.secondaryRef.createComponent(t);n.instance.stream=i,n.instance.session=this.session,n.instance.appointment=this.appointment,n.instance.size=this.appointment.isSingle?"lg":"md",this.subscriberRefs.push(n),this.rollbar.info("VIDEOCALL: subscriberRefs.length: "+this.subscriberRefs.length)}onStreamCreated(i){this.rollbar.info("VIDEOCALL: stream created",i),this.alreadyPublished?this.processStream(i):this.streams.push(i)}processStream(i){const t=this.subscriberRefs.find(n=>n.instance.user.id===i.connection.data);this.rollbar.info("VIDEOCALL: process stream",i),"screen"===i.videoType?t&&(t.instance.setScreenSharing(i),this.moveToPrimary(t)):(this.rollbar.info("VIDEOCALL: subscriberRefs.length: "+this.subscriberRefs.length),t?this.rollbar.info("VIDEOCALL: stream duplicated",t):this.createSubscriber(i))}moveToPrimary(i){const t=this.secondaryRef.indexOf(i.hostView);t>-1&&(this.secondaryRef.detach(t),i.instance.size="lg",this.mainRef.insert(i.hostView))}removeSubscriberRef(i){const t=this.subscriberRefs[i],n=this.secondaryRef.indexOf(t.hostView);if(-1!==n)this.secondaryRef.remove(n),this.subscriberRefs.splice(i,1);else{const a=this.mainRef.indexOf(t.hostView);this.mainRef.remove(a),this.subscriberRefs.splice(i,1)}}handleSessionEvents(){this.subscription.add(this.sessionEvent("streamDestroyed").subscribe(i=>this.onStreamDestroyed(i))),this.subscription.add(this.sessionEvent("connectionCreated").subscribe(i=>this.onConnectionCreated(i))),this.subscription.add(this.sessionEvent("connectionDestroyed").subscribe(i=>this.onConnectionDestroyed(i))),this.subscription.add(this.sessionEvent("sessionDisconnected").subscribe(i=>this.onSessionDisconnected(i)))}onStreamDestroyed(i){if(this.rollbar.info("VIDEOCALL:streamDestroyed",i.stream),"networkDisconnected"===i.reason&&this.session.getSubscribersForStream(i.stream).length>0&&(this.rollbar.error("VIDEOCALL:streamDestroyed error",i),this.overlayService.info("Connessione persa","Potrebbe essere dovuto alla tua connessione o a quella del tuo interlocutore.")),"screen"===i.stream.videoType){const t=this.subscriberRefs.find(n=>n.instance.user.id===i.stream.connection.data);
1t&&t.instance.removeScreenSharing()}else{const t=this.subscriberRefs.findIndex(n=>n.instance.stream===i.stream);-1!==t?this.removeSubscriberRef(t):this.streams=this.streams.filter(n=>n.streamId!==i.stream.streamId)}}onConnectionCreated(i){var t;this.connectionCount++,i.connection.connectionId!==(null===(t=this.session.connection)||void 0===t?void 0:t.connectionId)&&this.rollbar.info("Another client connected. "+this.connectionCount+" total.")}onConnectionDestroyed(i){this.connectionCount--,this.rollbar.info("A client disconnected. "+this.connectionCount+" total.")}onSessionDisconnected(i){"networkDisconnected"===i.reason?(this.rollbar.error("VIDEOCALL:networkDisconnected",i),this.removeAllSubscribers(),this.overlayService.info("Connessione persa","Nessuna connessione a internet. Verificare la connessione e riprovare").afterClosed$.subscribe(()=>{this.publisherRef.instance.disconnect();const t=this.mainRef.indexOf(this.publisherRef.hostView);this.mainRef.detach(t),this.createPublisher(),this.sessionConnect()})):this.rollbar.info("VIDEOCALL:sessionDisconnected",i)}ngOnDestroy(){this.session.disconnect(),this.subscription.unsubscribe()}closeSession(){this.overlayService.confirm("Chiudi la seduta","Chiudendo la seduta, non sar\xe0 pi\xf9 possibile riprendere il colloquio, e la seduta sar\xe0 classificata come conclusa.").afterClosed$.subscribe(i=>{i.data&&this.appointmentService.done(this.appointment.id).subscribe(()=>this.sessionClosed.emit())})}removeAllSubscribers(){this.subscriberRefs.forEach((i,t)=>{this.removeSubscriberRef(t)})}sessionEvent(i){return new w.y(t=>{this.session.on(i,n=>{t.next(n)})})}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(e._Vd),e.Y36(C.K),e.Y36(v.F),e.Y36(J.o),e.Y36(I.t2),e.Y36(_.H))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-room"]],viewQuery:function(i,t){if(1&i&&(e.Gf(ei,5,e.s_b),e.Gf(ii,5,e.s_b)),2&i){let n;e.iGM(n=e.CRH())&&(t.mainRef=n.first),e.iGM(n=e.CRH())&&(t.secondaryRef=n.first)}},inputs:{appointment:"appointment"},outputs:{endCall:"endCall",sessionClosed:"sessionClosed"},decls:3,vars:6,consts:[["class","fixed top-0 right-0 bottom-20 left-0",4,"ngIf"],["class","mt-20 mb-40 lg:m-0 lg:fixed top-0 right-10 bottom-20 left-10 flex items-center justify-center gap-x-10 gap-y-6 flex-wrap wrapper",3,"ngClass",4,"ngIf"],[3,"publisherRef","subscriberRefs","appointment","subscriber","endCall","closeSession"],[1,"fixed","top-0","right-0","bottom-20","left-0"],[1,"flex","items-center","justify-center","fixed","bottom-20","left-0","right-0","top-0"],["main",""],[1,"flex","flex-col","text-center","w-102"],["src","/assets/images/empty-state.png"],[1,"text-lg","font-bold","text-grey-500","my-4"],[1,"text-sm","text-grey-500"],[4,"ngIf"],[1,"absolute","h-28","w-40","bottom-2","right-4","lg:bottom-auto","lg:top-10","lg:right-10","lg:h-45","lg:w-auto","z-30"],["secondary",""],[1,"mt-20","mb-40","lg:m-0","lg:fixed","top-0","right-10","bottom-20","left-10","flex","items-center","justify-center","gap-x-10","gap-y-6","flex-wrap","wrapper",3,"ngClass"]],template:function(i,t){1&i&&(e.YNc(0,ni,13,2,"div",0),e.YNc(1,ri,5,5,"div",1),e.TgZ(2,"lib-videocall-toolbar",2),e.NdJ("endCall",function(){return t.endCall.emit()})("closeSession",function(){return t.closeSession()}),e.qZA()),2&i&&(e.Q6J("ngIf",t.appointment.isSingle),e.xp6(1),e.Q6J("ngIf",!t.appointment.isSingle),e.xp6(1),e.Q6J("publisherRef",t.publisherRef)("subscriberRefs",t.subscriberRefs)("appointment",t.appointment)("subscriber",t.subscriber))},directives:[l.O5,l.mk,Ke],styles:[".wrapper[_ngcontent-%COMP%] lib-videocall-publisher, .wrapper[_ngcontent-%COMP%] lib-videocall-subscriber{aspect-ratio:74/50;height:calc(50vh - 70px)}.wrapper-5[_ngcontent-%COMP%] lib-videocall-publisher, .wrapper-5[_ngcontent-%COMP%] lib-videocall-subscriber{max-width:490px;max-height:331px}.wrapper-7[_ngcontent-%COMP%] lib-videocall-publisher, .wrapper-7[_ngcontent-%COMP%] lib-videocall-subscriber{max-width:370px;max-height:250px}.wrapper-9[_ngcontent-%COMP%] lib-videocall-publisher, .wrapper-9[_ngcontent-%COMP%] lib-videocall-subscriber{height:calc(33.3333333333vh - 70px)}"]}),s})();var ai=r(7598);let ci=(()=>{class s extends ai.z{constructor(i){super(i),this.baseUrl=N.N.apiUrl+"/v1/posts"}mapResource(i){return i}}return s.\u0275fac=function(i){return new(i||s)(e.LFG(F.eN))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),di=(()=>{class s{constructor(){this.detail=new e.vpe}ngOnInit(){this.excerpt=this.getExcerpt(300)}getExcerpt(i){const t=this.post.content.replace(/<[^>]*>/g,"").substr(0,i);return t.substr(0,Math.min(t.length,t.lastIndexOf(" "))).trim()+"..."}}return s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-blog-post"]],inputs:{post:"post"},outputs:{detail:"detail"},decls:6,vars:2,consts:[[1,"font-serif","text-xl","text-dark","font-bold","mb-4","cursor-pointer",3,"click"],[1,"mb-6",3,"innerHTML"],["fill","none",3,"click"]],template:function(i,t){1&i&&(e.TgZ(0,"div")(1,"h2",0),e.NdJ("click",function(){return t.detail.emit()}),e._uU(2),e.qZA(),e._UZ(3,"p",1),e.TgZ(4,"ui-button",2),e.NdJ("click",function(){return t.detail.emit()}),e._uU(5,"Continua a leggere \u2192"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(t.post.title),e.xp6(1),e.Q6J("innerHTML",t.excerpt,e.oJD))},directives:[S.r],styles:[""]}),s})();function pi(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"lib-blog-post",14),e.NdJ("detail",function(){const a=e.CHM(i).$implicit;return e.oxw(2).detail(a)}),e.qZA()}2&s&&e.Q6J("post",o.$implicit)}function ui(s,o){if(1&s&&(e.TgZ(0,"div",12),e.YNc(1,pi,1,1,"lib-blog-post",13),e.ALo(2,"async"),e.qZA()),2&s){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",e.lcZ(2,1,i.posts$))}}function hi(s,o){if(1&s){const i=e.EpF();e.TgZ(0,"div",15)(1,"a",16),e.NdJ("click",function(){return e.CHM(i),e.oxw().selectedPost=null}
1),e._UZ(2,"svg-icon",17),e._uU(3," Torna indietro "),e.qZA(),e.TgZ(4,"h2",18),e._uU(5),e.qZA(),e._UZ(6,"div",19),e.qZA()}if(2&s){const i=e.oxw();e.xp6(5),e.Oqu(i.selectedPost.title),e.xp6(1),e.Q6J("innerHTML",i.selectedPost.content,e.oJD)}}let mi=(()=>{class s{constructor(i){this.blogService=i,this.next=new e.vpe,this.close=new e.vpe}ngOnInit(){this.posts$=this.blogService.list({per_page:6}).pipe((0,y.U)(i=>i.list))}detail(i){this.selectedPost=i}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(ci))},s.\u0275cmp=e.Xpm({type:s,selectors:[["lib-videocall-waiting"]],outputs:{next:"next",close:"close"},decls:16,vars:2,consts:[[1,"container","pt-10","text-center"],[1,"flex","items-center","justify-center","mb-18"],["src","/assets/images/logo.svg",1,"inline","h-6","sm:h-8","sm:mr-2"],[1,"font-serif","text-dark","font-bold","text-xs","leading-3","sm:text-xl","sm:leading-4"],["key","close",1,"cursor-pointer","absolute","top-4","right-5",3,"click"],[1,"px-4","mb-20"],[1,"font-bold","text-3xl","font-serif","text-dark","leading-7","mb-2.5"],[1,"text-grey-700","mb-2"],[1,"text-xs","text-grey-700"],["class","grid px-5 md:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-10 text-left mb-10",4,"ngIf"],[1,"flex","justify-center"],["class","text-left text-dark w-full post-content",4,"ngIf"],[1,"grid","px-5","md:grid-cols-2","lg:grid-cols-3","gap-x-6","gap-y-10","text-left","mb-10"],[3,"post","detail",4,"ngFor","ngForOf"],[3,"post","detail"],[1,"text-left","text-dark","w-full","post-content"],[1,"text-sm","text-grey-400","font-semibold","inline-flex","items-center","cursor-pointer","mb-5",3,"click"],["key","chevron-left",1,"text-grey-400","mr-0.5"],[1,"font-serif","text-4xl","font-bold","mb-10"],[3,"innerHTML"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"img",2),e.TgZ(3,"h1",3),e._uU(4,"D-stanza"),e.qZA(),e.TgZ(5,"svg-icon",4),e.NdJ("click",function(){return t.close.emit()}),e.qZA()(),e.TgZ(6,"div",5)(7,"h2",6),e._uU(8,"D-stanza di attesa"),e.qZA(),e.TgZ(9,"p",7),e._uU(10,"In attesa che il terapeuta ti apra la porta della D-stanza, puoi sfogliare qualche articolo del nostro blog"),e.qZA(),e.TgZ(11,"p",8),e._uU(12,"Potrai trovare ulteriori articoli consultando il blog dal sito di Transiti"),e.qZA()(),e.YNc(13,ui,3,3,"div",9),e.TgZ(14,"div",10),e.YNc(15,hi,7,2,"div",11),e.qZA()()),2&i&&(e.xp6(13),e.Q6J("ngIf",!t.selectedPost),e.xp6(2),e.Q6J("ngIf",t.selectedPost))},directives:[c.bk,l.O5,l.sg,di],pipes:[l.Ov],styles:[".post-content[_ngcontent-%COMP%]{max-width:650px}.post-content[_ngcontent-%COMP%] h5{margin-bottom:40px}.post-content[_ngcontent-%COMP%] h2, .post-content[_ngcontent-%COMP%] p{margin-bottom:20px}.post-content[_ngcontent-%COMP%] h2{font-family:Rufina,serif;font-size:1.25rem;line-height:1.75rem}"]}),s})();var bi=r(1148),gi=r(6262);let fi=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({providers:[T.N],imports:[[P.e,m.U8,c.Kz,u,H,O.F,V.h,bi.F,gi.k]]}),s})();e.B6R(d.r,[l.O5,be,mi,li],[])},2864:(E,g,r)=>{r.d(g,{A:()=>l});var d=r(5e3),m=r(9808);const c=function(e,u){return{"shadow-2xl":e,"border-3 border-white":u}};let l=(()=>{class e{constructor(){}ngOnChanges(){setTimeout(()=>{this.avatar||(this.avatar="/assets/images/user.svg")})}}return e.\u0275fac=function(b){return new(b||e)},e.\u0275cmp=d.Xpm({type:e,selectors:[["ui-avatar"]],inputs:{avatar:"avatar",shadow:"shadow",border:"border"},features:[d.TTD],decls:1,vars:5,consts:[[1,"rounded-full","block","w-full","h-full",3,"src","ngClass"]],template:function(b,h){1&b&&d._UZ(0,"img",0),2&b&&d.Q6J("src",h.avatar,d.LSH)("ngClass",d.WLB(2,c,h.shadow,h.border))},directives:[m.mk],styles:["[_nghost-%COMP%]{display:block}"]}),e})()},9613:(E,g,r)=>{r.d(g,{F:()=>c});var d=r(9808),m=r(5e3);let c=(()=>{class l{}return l.\u0275fac=function(u){return new(u||l)},l.\u0275mod=m.oAB({type:l}),l.\u0275inj=m.cJS({imports:[[d.ez]]}),l})()}}]);
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.