PageSourceSearch

https://app.med-24.com.pl/app/4437.706d7e9462244a34.js

js med-24.com.pl collected 2026-10-07 05:03:08 UTC 28,350 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4437,9589],{74437:(E,y,c)=>{c.r(y),c.d(y,{WidgetPageModule:()=>_e});var f=c(25977),p=c(90315),T=c(85397),x=c(68915),U=c(35701),b=c(50741),P=c(90506),C=c(95894),v=c(49100);function i(n){const{subscriber:s,counter:t,period:l}=n;s.next(t),this.schedule({subscriber:s,counter:t+1,period:l},l)}const a=(()=>{function n(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return n.prototype=Object.create(Error.prototype),n})();var r=c(48922),u=c(48881);class M{constructor(s,t,l,d){this.waitFor=s,this.absoluteTimeout=t,this.withObservable=l,this.scheduler=d}call(s,t){return t.subscribe(new $(s,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))}}class $ extends u.Ds{constructor(s,t,l,d,h){super(s),this.absoluteTimeout=t,this.waitFor=l,this.withObservable=d,this.scheduler=h,this.scheduleTimeout()}static dispatchTimeout(s){const{withObservable:t}=s;s._unsubscribeAndRecycle(),s.add((0,u.ft)(t,new u.IY(s)))}scheduleTimeout(){const{action:s}=this;s?this.action=s.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule($.dispatchTimeout,this.waitFor,this))}_next(s){this.absoluteTimeout||this.scheduleTimeout(),super._next(s)}_unsubscribe(){this.action=void 0,this.scheduler=null,this.withObservable=null}}var W=c(42373);var w=c(10839),A=c(49010),k=c(32151),D=c(89589),z=c(95548),B=c(64822),_=c(18706),e=c(85498),R=c(15916);const V=["container"];function F(n,s){1&n&&(e.\u0275\u0275elementStart(0,"div",1)(1,"p"),e.\u0275\u0275text(2,"Loading..."),e.\u0275\u0275elementEnd()())}function N(n,s){1&n&&(e.\u0275\u0275elementStart(0,"p"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"fluent"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"widget-no-urgent-calls")," "))}const j=function(n){return{pendingUrgentIssues:n}};function H(n,s){if(1&n&&(e.\u0275\u0275element(0,"p",19),e.\u0275\u0275pipe(1,"fluent")),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275propertyInterpolate("innerHTML",e.\u0275\u0275pipeBind2(1,1,"widget-number-of-urgent-calls",e.\u0275\u0275pureFunction1(4,j,t.pendingUrgentIssues)),e.\u0275\u0275sanitizeHtml)}}const K=function(n){return{pendingUrgentVipIssues:n}};function J(n,s){if(1&n&&(e.\u0275\u0275element(0,"p",19),e.\u0275\u0275pipe(1,"fluent")),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275propertyInterpolate("innerHTML",e.\u0275\u0275pipeBind2(1,1,"widget-number-of-urgent-vip-calls",e.\u0275\u0275pureFunction1(4,K,t.pendingUrgentVipIssues)),e.\u0275\u0275sanitizeHtml)}}function Q(n,s){1&n&&(e.\u0275\u0275elementStart(0,"p"),e.\u0275\u0275element(1,"ion-icon",20),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"fluent"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(3,1,"widget-old-unresolved-visit")," "))}function G(n,s){1&n&&e.\u0275\u0275element(0,"ion-spinner",23)}function Y(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-button",21),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const d=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(d.acceptUrgentCall())}),e.\u0275\u0275template(1,G,1,0,"ion-spinner",22),e.\u0275\u0275elementStart(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"fluent"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("disabled",t.isLoadingUrgentCall),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.isLoadingUrgentCall),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,3,"widget-accept-urgent-call")," ")}}function Z(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-button",24),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const d=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(d.returnToUrgentCalls())}),e.\u0275\u0275elementStart(1,"span"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"fluent"),e.\u0275\u0275elementEnd()()}2&n&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(3,1,"widget-resume-urgent-call")," "))}const X=function(n){return{pendingUrgentAsyncIssues:n}};
1function q(n,s){if(1&n&&(e.\u0275\u0275element(0,"p",19),e.\u0275\u0275pipe(1,"fluent")),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275propertyInterpolate("innerHTML",e.\u0275\u0275pipeBind2(1,1,"widget-number-of-urgent-async-calls",e.\u0275\u0275pureFunction1(4,X,t.pendingUrgentAsyncIssues)),e.\u0275\u0275sanitizeHtml)}}function ee(n,s){1&n&&e.\u0275\u0275element(0,"ion-spinner",23)}function te(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-button",21),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const d=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(d.acceptUrgentCall("async"))}),e.\u0275\u0275template(1,ee,1,0,"ion-spinner",22),e.\u0275\u0275elementStart(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"fluent"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("disabled",t.isLoadingUrgentCall),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.isLoadingUrgentCall),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,3,"widget-accept-urgent-async-call")," ")}}function ne(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"div",25)(1,"p",4),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"fluent"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",26),e.\u0275\u0275template(5,q,2,6,"p",7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",8),e.\u0275\u0275template(7,te,5,5,"ion-button",9),e.\u0275\u0275elementEnd()()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,"widget-header-async")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",null!==t.pendingUrgentAsyncIssues),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.pendingUrgentAsyncIssues>0)}}function ie(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",31),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward.personal_number," ")}}function se(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",31),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter.personal_number," ")}}function re(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",31),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward.document_id," ")}}function ae(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",31),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter.document_id," ")}}function oe(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",32),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward.first_name," ",null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward.last_name," ")}}function le(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"p",32),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2(" ",null==t.scheduledIssue?null:t.scheduledIssue.reporter.first_name," ",null==t.scheduledIssue?null:t.scheduledIssue.reporter.last_name," ")}}const ce=function(n,s,t){return{dateWithin:n,date:s,date_end:t}};function ue(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"div",27)(1,"p",28),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"fluent"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,ie,2,1,"p",29),e.\u0275\u0275template(5,se,2,1,"p",29),e.\u0275\u0275template(6,re,2,1,"p",29),e.\u0275\u0275template(7,ae,2,1,"p",29),e.\u0275\u0275template(8,oe,2,2,"p",30),e.\u0275\u0275template(9,le,2,2,"p",30),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(3,7,"widget-scheduled-call-info",e.\u0275\u0275pureFunction3(10,ce,t.dateWithin(t.scheduledCall.date),t.scheduledCall.date.toJSDate(),t.scheduledCall.date_end.toJSDate()))," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",(null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward)&&!(null!=t.environment&&t.environment.isUa)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null!=t.scheduledIssue&&t.scheduledIssue.reporter_ward||null!=t.environment&&t.environment.isUa)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward)&&(null==t.environment?null:t.environment.isUa)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null!=t.scheduledIssue&&t.scheduledIssue.reporter_ward)&&(null==t.environment?null:t.environment.isUa)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==t.scheduledIssue?null:t.scheduledIssue.reporter_ward),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!(null!=t.scheduledIssue&&t.scheduledIssue.reporter_ward))}}
1function de(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-button",24),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const d=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(d.acceptScheduledCall())}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"fluent"),e.\u0275\u0275elementEnd()}2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"widget-accept-scheduled-call")," "))}function pe(n,s){1&n&&(e.\u0275\u0275elementStart(0,"p",33),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"fluent"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"widget-no-scheduled-call")," "))}function ge(n,s){1&n&&(e.\u0275\u0275elementStart(0,"ion-button",34),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"fluent"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"widget-no-unseen-messages")," "))}function he(n,s){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-button",24),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const d=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(d.openUnseenMessages())}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"fluent"),e.\u0275\u0275elementEnd()}2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,1,"widget-open-unseen-messages")," "))}function fe(n,s){if(1&n&&(e.\u0275\u0275elementStart(0,"div",1,2)(2,"div",3)(3,"p",4),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"fluent"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",5),e.\u0275\u0275template(7,N,3,3,"p",6),e.\u0275\u0275template(8,H,2,6,"p",7),e.\u0275\u0275template(9,J,2,6,"p",7),e.\u0275\u0275elementStart(10,"p"),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"fluent"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(13,Q,4,3,"p",6),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",8),e.\u0275\u0275template(15,Y,5,5,"ion-button",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"div",8),e.\u0275\u0275template(17,Z,4,3,"ion-button",10),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(18,ne,8,5,"div",11),e.\u0275\u0275elementStart(19,"div",12)(20,"p",4),e.\u0275\u0275text(21),e.\u0275\u0275pipe(22,"fluent"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(23,ue,10,14,"div",13),e.\u0275\u0275elementStart(24,"div",14),e.\u0275\u0275template(25,de,3,3,"ion-button",10),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(26,pe,3,3,"p",15),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(27,"div",16)(28,"div",17),e.\u0275\u0275template(29,ge,3,3,"ion-button",18),e.\u0275\u0275template(30,he,3,3,"ion-button",10),e.\u0275\u0275elementEnd()()()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(5,15,"widget-header-instant")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!t.hasUrgentCalls&&!t.hasAssignedUrgentCall),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null!==t.pendingUrgentIssues),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null!==t.pendingUrgentVipIssues),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(12,17,"widget-urgent-visit")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.hasOldUnresolvedIssues),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.hasUrgentCalls),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.hasAssignedUrgentCall),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null!==t.pendingUrgentAsyncIssues),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(22,19,"widget-header-booked")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.scheduledCall),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.scheduledCall),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.scheduledCall),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",0===t.unseenMessages),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.unseenMessages>0)}}var S=(()=>{return(n=S||(S={})).Today="today",n.Week="week",n.Other="other",S;var n})();const ve=[{path:"",component:(()=>{class n{constructor(t,l,d,h,m,I){this.authService=t,this.environmentService=l,this.issueService=d,this.notificationService=h,this.toastController=m,this.chatService=I,this.currentHeight=0,this.isLoading=!0,this.isLoadingUrgentCall=!1,this.navigationTargetUri=null,this.navigationTargetName=null,this.hasUrgentCalls=!1,this.hasAssignedUrgentCall=!1,this.pendingUrgentIssues=null,this.pendingUrgentVipIssues=null,this.pendingUrgentAsyncIssues=null,this.scheduledCall=null,this.pendingUrgentVisitKind=null,this.unseenMessages=0,this.hasOldUnresolvedIssues=!1,this.firstAssignedUrgentIssue=null,this.notificationSubscription=null,this.intervalSubscription=null}ngOnInit(){this.environmentService.getEnvironment().subscribe(t=>
1{this.environment=t,window.addEventListener("message",l=>{l.origin===this.environment.widgetOrigin?"token"===l.data.type&&(this.navigationTargetUri?(window.open(`${this.environment.appRoot}${this.navigationTargetUri}#proa-token=${encodeURIComponent(l.data.token)}`,this.navigationTargetName),this.navigationTargetUri=null,this.navigationTargetName=null):this.authService.loginProa(l.data.token).subscribe(()=>{this.subscribeNotifications(),this.chatService.unseenMessages$.subscribe(h=>{this.unseenMessages=h||0})})):console.error("message origin does not match the configured origin")}),window.top.postMessage({type:"token"},this.environment.widgetOrigin)}),this.intervalSubscription||(this.intervalSubscription=function O(n=0,s=C.P){return(!(0,v.k)(n)||n<0)&&(n=0),(!s||"function"!=typeof s.schedule)&&(s=C.P),new P.y(t=>(t.add(s.schedule(i,n,{subscriber:t,counter:0,period:n})),t))}(1e3).subscribe(()=>{this.updateUnresolvedIssueAlert()}))}ngAfterViewChecked(){if(this.containerRef){const t=this.containerRef.nativeElement.offsetHeight;t&&t!==this.currentHeight&&!this.isLoading&&(this.currentHeight=t,window.top.postMessage({type:"size",height:t},this.environment.widgetOrigin))}}ngOnDestroy(){this.notificationSubscription&&this.notificationSubscription.unsubscribe(),this.intervalSubscription&&this.intervalSubscription.unsubscribe()}subscribeNotifications(){this.notificationSubscription||(this.notificationSubscription=this.notificationService.status$.subscribe(t=>{this.isLoading=!1,this.hasUrgentCalls=t.pending_urgent_issues>0,this.pendingUrgentIssues=t.pending_urgent_issues||0,this.pendingUrgentVipIssues=t.pending_urgent_vip_issues||0,this.pendingUrgentAsyncIssues=t.pending_urgent_async_issues??null,this.hasAssignedUrgentCall=t.assigned_urgent_issues>0,this.pendingUrgentVisitKind=t.next_pending_urgent_issue_visit_kind?t.next_pending_urgent_issue_visit_kind:null,t.next_scheduled_issue?(this.scheduledCall={id:t.next_scheduled_issue,date:w.ou.fromISO(t.next_scheduled_issue_at),date_end:w.ou.fromISO(t.next_scheduled_issue_end)},this.issueService.getIssue(t.next_scheduled_issue).subscribe(l=>{this.visitType=l.visit_kind,this.scheduledIssue=l})):this.scheduledCall=null,this.firstAssignedUrgentIssue=t.first_assigned_urgent_issue_at?w.ou.fromISO(t.first_assigned_urgent_issue_at):null,this.updateUnresolvedIssueAlert()},t=>console.error(t)))}updateUnresolvedIssueAlert(){if(!this.firstAssignedUrgentIssue)return void(this.hasOldUnresolvedIssues=!1);const l=w.ou.now().diff(this.firstAssignedUrgentIssue,"minutes");this.hasOldUnresolvedIssues=l.minutes>=15}acceptUrgentCall(t){var l=this;const d={};"async"===t&&(d.urgent_visit_priority=-10),this.isLoadingUrgentCall=!0,this.issueService.assignUrgent(d).pipe(function L(n,s=C.P){return function g(n,s,t=C.P){return l=>{let d=(0,r.J)(n),h=d?+n-t.now():Math.abs(n);return l.lift(new M(h,d,s,t))}}(n,(0,W._)(new a),s)}(15e3)).subscribe(h=>{this.isLoadingUrgentCall=!1,this.navigationTargetUri=`/${_.$.ADMIN}/${_.$.DASHBOARD}?call=${h.pk}`,"video_call"!==h.channel_kind&&(this.navigationTargetName="CallWindow"),window.top.postMessage({type:"token"},this.environment.widgetOrigin)},function(){var h=(0,b.Z)(function*(m){l.isLoadingUrgentCall=!1;let I="Unknown error.";404===m.status?I="No urgent call to assign.":429===m.status?I="Wait a bit to get another call.":"TimeoutError"===m.name?I="The server took too long to respond. Check your connection.":m.status&&(I=`Got error code: ${m.status}.`),yield(yield l.toastController.create({message:I,duration:2e3,position:"top"})).present()});return function(m){return h.apply(this,arguments)}}())}returnToUrgentCalls(){this.navigationTargetUri=`/${_.$.ADMIN}/${_.$.DASHBOARD}`,this.navigationTargetName="CallWindow",window.top.postMessage({type:"token"},this.environment.widgetOrigin)}acceptScheduledCall(){this.scheduledCall&&(this.navigationTargetUri=`/${_.$.ADMIN}/${_.$.DASHBOARD}?call=${this.scheduledCall.id}`,this.navigationTargetName="CallWindow",window.top.postMessage({type:"token"},this.environment.widgetOrigin))}openUnseenMessages(){this.navigationTargetUri=`/${_.$.ADMIN}/${_.$.MCV}`,this.navigationTargetName="UnseenMessagesWindow",window.top.postMessage({type:"token"},this.environment.widgetOrigin)}dateWithin(t){const l=t.toLocal(),d=w.ou.local(),h=t.diff(d,"days");return l.year===d.year&&l.month===d.month&&l.day===d.day?S.Today:h.days>=0&&h.days<7?S.Week:S.Other}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(A.e),e.\u0275\u0275directiveInject(k.L),e.\u0275\u0275directiveInject(D.v),e.\u0275\u0275directiveInject(z.g),e.\u0275\u0275directiveInject(x.ToastController),e.\u0275\u0275directiveInject(B.a))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-widget"]],viewQuery:function(t,l){if(1&t&&e.\u0275\u0275viewQuery(V,5),2&t){let d;e.\u0275\u0275queryRefresh(d=e.\u0275\u0275loadQuery())&&(l.containerRef
1=d.first)}},decls:2,vars:2,consts:[["class","container",4,"ngIf"],[1,"container"],["container",""],[1,"call-container","container-urgent"],[1,"header"],[1,"call-info-urgent","call-info"],[4,"ngIf"],["class","call-info-urgent-number-of-calls",3,"innerHTML",4,"ngIf"],[1,"button-container"],["expand","block",3,"disabled","click",4,"ngIf"],["expand","block",3,"click",4,"ngIf"],["class","call-container container-async",4,"ngIf"],[1,"call-container","container-booked"],["class","call-info-scheduled call-info",4,"ngIf"],[1,"button-container-booked"],["class","scheduled-call",4,"ngIf"],[1,"call-container","container-chat"],[1,"button-container-chat"],["expand","block","disabled","",4,"ngIf"],[1,"call-info-urgent-number-of-calls",3,"innerHTML"],["name","warning-outline"],["expand","block",3,"disabled","click"],["slot","start",4,"ngIf"],["slot","start"],["expand","block",3,"click"],[1,"call-container","container-async"],[1,"call-info-async","call-info"],[1,"call-info-scheduled","call-info"],[1,"call-info-scheduled-time","call-info-time"],["class","call-info-scheduled-personal-number call-info-personal-number",4,"ngIf"],["class","call-info-scheduled-name call-info-name",4,"ngIf"],[1,"call-info-scheduled-personal-number","call-info-personal-number"],[1,"call-info-scheduled-name","call-info-name"],[1,"scheduled-call"],["expand","block","disabled",""]],template:function(t,l){1&t&&(e.\u0275\u0275template(0,F,3,0,"div",0),e.\u0275\u0275template(1,fe,31,21,"div",0)),2&t&&(e.\u0275\u0275property("ngIf",l.isLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!l.isLoading))},dependencies:[f.NgIf,x.IonButton,x.IonIcon,x.IonSpinner,R.C],styles:["[_nghost-%COMP%]{background:#03605a}*[_ngcontent-%COMP%]{margin:0}button[_ngcontent-%COMP%]{display:block;width:100%;padding:10px 2px;border-radius:5px;border:none;background:#008779;outline-color:#03605a;font-size:.875rem;color:#fff;cursor:pointer;transition:background .6s}button.alert[_ngcontent-%COMP%]{background:#e40327;outline-color:#e40327}.container[_ngcontent-%COMP%]{width:260px;padding:3px}.call-container[_ngcontent-%COMP%]{--height: 25%;background:#ffffff;padding:1.3em;border:1px solid rgba(0,0,0,.1);border-radius:6px}.call-container.container-booked[_ngcontent-%COMP%]{margin-top:5px}.call-container.container-chat[_ngcontent-%COMP%]{height:20%}.header[_ngcontent-%COMP%]{color:#000;font-size:15px;font-weight:600;line-height:18px;letter-spacing:-.2px}ion-button[_ngcontent-%COMP%]{text-transform:inherit;height:40px;--border-radius: 28px;--color: #ffffff;--background: var(--instadoc-green);--background-hover: var(--instadoc-green-light)}.call-info[_ngcontent-%COMP%]{min-height:60px;margin-top:10px;font-size:12px;line-height:16px;letter-spacing:-.2px}.call-info-time[_ngcontent-%COMP%]{color:#007751}.call-info-personal-number[_ngcontent-%COMP%]{color:#59aaa1;margin-top:10px}.call-info-name[_ngcontent-%COMP%]{color:#007751;font-size:14px}.call-info-urgent-number-of-calls[_ngcontent-%COMP%]{color:#007751}.call-info-urgent-number-of-calls[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.call-info-async[_ngcontent-%COMP%]{min-height:30px}.button-container-booked[_ngcontent-%COMP%]{margin-top:10px}"]}),n})()}];let _e=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[f.CommonModule,p.FormsModule,x.IonicModule,U.m,T.Bz.forChild(ve)]}),n})()},89589:(E,y,c)=>{c.d(y,{v:()=>C});var f=c(12299),p=c(71827),T=c(11979),x=c(49010),U=c(61368),b=c(85498),P=c(46885);let C=(()=>{class v{constructor(i,o,a){this.http=i,this.authService=o,this.languageSwitcher=a}listIssues(i={}){i.scheduled_at_after&&"string"!=typeof i.scheduled_at_after&&(i.scheduled_at_after=i.scheduled_at_after.toISO()),i.scheduled_at_before&&"string"!=typeof i.scheduled_at_before&&(i.scheduled_at_before=i.scheduled_at_before.toISO());const o=new URLSearchParams(i);return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>this.http.get(`${a}/api/v1/issues/?${o}`,r)))}getIssue(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/${i}/`,a)))}updateIssue(i,o){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>this.http.patch(`${a}/api/v1/issues/${i}/`,o,r)))}assignUrgent(i={}){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>
1{const r=new URLSearchParams(i);return this.http.post(`${o}/api/v1/issues/assign_urgent/?${r}`,{},a)}))}createPayment(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.post(`${o}/api/v1/issues/payment/`,i,a)))}createImage(i,o){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>{const u=`${a}/api/v1/issues/images/`,g=new FormData;return g.append("issue",i),g.append("image",o),r.headers=r.headers.delete("Content-Type"),this.http.post(u,g,r)}))}getImage(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/images/${i}/`,a)))}listImages(i={}){const o=new URLSearchParams(i);return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>this.http.get(`${a}/api/v1/issues/images/?${o}`,r)))}createFile(i,o){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>{const u=`${a}/api/v1/issues/files/`,g=new FormData;return g.append("issue",i),g.append("file",o),r.headers=r.headers.delete("Content-Type"),this.http.post(u,g,r)}))}getFile(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/files/${i}/`,a)))}downloadFile(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/files/${i}/download/`,{...a,responseType:"blob"})))}getSignedFileLink(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/files/${i}/download_link/`,a)))}generatePdf(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/${i}/download/`,{...a,responseType:"blob"})))}getSignedJournalLink(i){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:o,options:a})=>this.http.get(`${o}/api/v1/issues/${i}/download_link/`,a)))}listFiles(i={}){const o=new URLSearchParams(i);return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:a,options:r})=>this.http.get(`${a}/api/v1/issues/files/?${o}`,r)))}listCategories(i={}){return(0,f.D)([this.authService.getOptions(),this.languageSwitcher.getCurrentLocale()]).pipe((0,p.zg)(([{rootUrl:o,options:a},r])=>{const u=new URLSearchParams({language_code:r,...i});return this.http.get(`${o}/api/v1/issues/categories/?${u}`,a)}))}getCategory(i){return(0,f.D)([this.authService.getOptions(),this.languageSwitcher.getCurrentLocale()]).pipe((0,p.zg)(([{rootUrl:o,options:a},r])=>{const u=new URLSearchParams({language_code:r});return this.http.get(`${o}/api/v1/issues/categories/${i}/?${u}`,a)}))}enableCategories(){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:i,options:o})=>this.http.put(`${i}/api/v1/issues/categories/enable/`,{},o)))}disableCategories(){return this.authService.getOptions().pipe((0,p.zg)(({rootUrl:i,options:o})=>this.http.put(`${i}/api/v1/issues/categories/disable/`,{},o)))}filterCategories(i,o){return this.listCategories(o).pipe((0,T.U)(a=>a.map(r=>(r.services=r.services.filter(u=>u.queue===i.queue&&(!i.demography||u.demography===i.demography)&&u.visit_kind===i.visit_kind),r)).filter(r=>r.services.length>0)))}getService(i,o){return(0,f.D)([this.authService.getOptions(),this.languageSwitcher.getCurrentLocale()]).pipe((0,p.zg)(([{rootUrl:a,options:r},u])=>{const g=new URLSearchParams({...o}),M=`${a}/api/v1/services/${i}/?${g}`;return r.headers=r.headers.append("Accept-Language",u),this.http.get(M,r)}))}listServices(i={}){return(0,f.D)([this.authService.getOptions(),this.languageSwitcher.getCurrentLocale()]).pipe((0,p.zg)(([{rootUrl:o,options:a},r])=>{const g=`${o}/api/v1/services/?${new URLSearchParams({...i})}`;return a.headers=a.headers.append("Accept-Language",r),this.http.get(g,a)}))}downloadJournal(i){return(0,f.D)([this.authService.getOptions(),this.languageSwitcher.getCurrentLocale()]).pipe((0,p.zg)(([{rootUrl:o},r])=>this.http.get(`${o}/api/v1/issues/document/${i}`,{responseType:"blob"})))}}return v.\u0275fac=function(i){return new(i||v)(b.\u0275\u0275inject(P.eN),b.\u0275\u0275inject(x.e),b.\u0275\u0275inject(U.r))},v.\u0275prov=b.\u0275\u0275defineInjectable({token:v,factory:v.\u0275fac,providedIn:"root"}),v})()}}]);
2//# sourceMappingURL=4437.706d7e9462244a34.js.map

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.