1"use strict";(self.webpackChunkbooking=self.webpackChunkbooking||[]).push([[7931],{9855:(g,m,l)=>{l.d(m,{W:()=>c});const c={Area:"area",Room:"room",Provider:"provider",Speciality:"speciality",ExamType:"examType",PatientType:"patientType",WorkingDate:"workingDate",AppointmentSlot:"appointmentSlot",Patient:"patient",EndOfFlows:"endOfFlows",Payment:"payment",Preview:"preview",DateTime:"dateTime",WorkingDateAnSlot:"workingDateAndSlot",AdditionalInformation:"additionalInformation"}},7669:(g,m,l)=>{l.d(m,{r:()=>r});var c=l(8987),a=l(833),f=l(934),s=l(2340),n=l(2560),o=l(6774);let r=(()=>{const p=class extends f.b{constructor(e){super(e,s.N.apiUrl,"v4/services"),this.http=e}getStartType(e){return this.postCustomApi("bookingFlows/getStartType",e)}getBookingItem(e){return this.postCustomApi("bookingFlows/getBookingItem",e)}getEnabledConfigBySid(e){const i=new c.LE;return super.getCustomApi(`enabled-configs/${e}`,i)}getServiceByEsDosId(e,i){const d=new c.LE;return e&&i?super.getCustomApi(`es/${e}/${i}/enabled-configs`,d):new a.y}getForm(e,i,d="BOOKING_ADDITIONAL_INFO"){let h=new c.LE;return h=h.append("type",d),h=h.append("id",i),this.getCustomApi(`${e}/forms`,h)}};let u=p;
1return p.\u0275fac=function(i){return new(i||p)(n.LFG(o.h))},p.\u0275prov=n.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"}),u})()},5300:(g,m,l)=>{l.d(m,{g:()=>a});var c=l(6701);class a{static isNullOrZero(s){return!s||0===s.length||1===s.length&&null==s[0]}static deepCopyArray(s){return[...s].map(n=>Object.assign({},n))}static getKeyNameEnum(s,n){return Object.entries(s).find(([o,r])=>r===n)?.[0]}static cleanIsNullOrEmpty(s){let n=[];return s.forEach(o=>{const r=o.trim();!c.m.isNullOrEmpty(r)&&r.length>1&&n.push(o)}),n}}},7695:(g,m,l)=>{l.d(m,{E:()=>a});const c=["01","02","03","04","05","06","07","08","09","10","11","12"];class a{static getDateRangeForFilterFromGiven(s){const n=c.length-1,r=s.getFullYear(),u=s.getMonth();let d=u+1>n?r+1:r,h=c[u+1>n?0:u+1];return{startDate:(u-1<0?r-1:r)+"-"+c[u-1<0?n:u-1]+"-"+s.getDate(),endDate:d+"-"+h+"-"+s.getDate()}}static getNextDate(s,n){return n?new Date((new Date).setDate((new Date).getDate()+n)):s}}},9437:(g,m,l)=>{l.d(m,{Y:()=>a});var c=l(4666);class a{static formatToISODate(s,n){return new c.uU("en-US").transform(s,n)}static formatDate(s){if(s){const n=new Date(s);return n.getDate()+"/"+(n.getMonth()+1)+"/"+n.getFullYear()+" "+n.getHours()+":"+n.getMinutes()}return s}static formatISODate(s){const n=new c.uU("en-US");return s?n.transform(s,"yyyy-MM-dd"):""}static formatLocalToISO(s){return s.split("-").reverse().join("-")}static formatBirthDay(s){const n=isNaN(s.day)?"":s.day,o=isNaN(s.month)?"":s.month,r=isNaN(s.yeard)?"":s.yeard;return n||o||r?n||o?n<10&&o<10?`0${n}/0${o}/${r}`:n<10?`0${n}/${o}/${r}`:o<10?`${n}/0${o}/${r}`:`${n}/${o}/${r}`:`${r}`:""}static formatHourMinute(s){if(s){const n=new Date(s);return n.getHours().toString().padStart(2,"0")+":"+n.getMinutes().toString().padStart(2,"0")}return s}static convertTimetoDate(s){const n=String(s).match(/^(\d+):(\d+)$/);return s&&n?new Date(`01/01/1970 ${n[1]}:${n[2]}`):new Date("01/01/1970 00:00")}static hourMinuteToObject(s){let n;if(s){const o=new Date(s);n={hour:o.getHours().toString().padStart(2,"0"),minute:o.getMinutes().toString().padStart(2,"0")}}return n}static subtractHHMMToMinute(s,n){const o=s?.split(":"),p=60*+o[0]+ +o[1],t=n?.split(":");return 60*+t[0]+ +t[1]-p}static subtractDateTimeToMinute(s,n){const o=new Date(s),p=60*o.getHours()+o.getMinutes(),t=new Date(n);return 60*t.getHours()+t.getMinutes()-p}static getListWorkingPlan(s){const n={sunday:"Ch\u1ee7 nh\u1eadt",monday:"Th\u1ee9 2",tuesday:"Th\u1ee9 3",wednesday:"Th\u1ee9 4",thursday:"Th\u1ee9 5",friday:"Th\u1ee9 6",saturday:"Th\u1ee9 7"},o=(new Date).getDay();let u,r=[],p=0;for(let t in n){const i=s[t];let d="";i.start&&i.end&&i.breaks.length>0?d=i.start+" - "+i.breaks[0].start+" /<br/> "+i.breaks[0].end+" - "+i.end:i.start&&i&&(d=i.start+" - "+i.end);const h={dayEN:t,dayVN:n[t],timeSpan:d,isNow:o==p};h.timeSpan&&"sunday"!==h.dayEN&&r.push(h),h.timeSpan&&"sunday"===h.dayEN&&(u=h),p++}return u&&r.push(u),r}}},3007:(g,m,l)=>{l.d(m,{s:()=>o});var c=l(833),a=l(9855),f=l(2560),s=l(2508),n=l(8386);let o=(()=>{const u=class{checkDemoMode(){if(this.config?.demo){const t=this.config.demoPhoneNumbers??[],e=this.user.getCurrentUser();if(!t.find(d=>d?.trim()===e?.phone?.trim()))return alert(this.config.bookingDemoMessage??"Hi\u1ec7n \u1ee9ng d\u1ee5ng \u0111ang trong giai \u0111o\u1ea1n th\u1eed nghi\u1ec7m. Qu\xfd kh\xe1ch vui l\xf2ng quay l\u1ea1i sau!"),!1}return!0}resetWdAndSlot(){this.workingDates$=new c.y,this.timeSlots$=new c.y,this.doctor=null,this.workingDatesOnline$=new c.y,this.timeSlotsOnline$=new c.y}setStep(t){switch(t.stepName){case a.W.Area:this.stepArea=t;break;case a.W.Speciality:this.stepSpeciality=t;break;case a.W.Room:this.stepRoom=t;break;case a.W.Provider:this.stepProvider=t;break;case a.W.ExamType:this.stepExamType=t;break;case a.W.PatientType:this.stepPatientType=t;break;case a.W.Patient:this.stepPatient=t;break;case a.W.WorkingDate:this.stepWorkingDate=t;break;case a.W.AppointmentSlot:this.stepSlot=t;break;case a.W.EndOfFlows:this.stepEndOfFlow=t;break;case a.W.Payment:this.stepPayment=t;break;case a.W.WorkingDateAnSlot:this.stepWorkingDateAndSlot=t}}backCreatePatient(){this.isClickCreatePatientRecord&&!this.addPatientTypesEnum?this.isClickCreatePatientRecord=!1:this.isClickCreatePatientRecord&&this.addPatientTypesEnum&&(this.addPatientTypesEnum=""),this.isEditHiCard&&(this.isEditHiCard=!1),!this.isClickCreatePatientRecord&&!this.isEditHiCard&&(this.bookingLabel="\u0110\u1eb7t kh\xe1m")}resetAddPatient(){this.isClickCreatePatientRecord=!1,this.addPatientTypesEnum="",this.bookingLabel="\u0110\u1eb7t kh\xe1m"}resetEditNoHiCard(){this.patientNoHiCard=void 0,this.isEditHiCard=!1,this.bookingLabel="B\u1ed5 sung m\xe3 BHYT",this.bookingLabel="\u0110\u1eb7t kh\xe1m"}resetStepData(){this.sId=void 0,this.activeItemIndex=-1,this.stepData=[],this.form.reset(),this.formValue=void 0,this.dataBooking=null,this.selectedPatient=new Object,this.paymentData=null,this.specialRootId=null,this.isEditHiCard=void 0,this.isAddHiCard=void 0,this.isClickCreatePatientRecord=void 0,this.bookingLabel="\u0110\u1eb7t kh\xe1m",this.config=new Object,this.stepArea=void 0,this.stepEndOfFlow=void 0,this.stepExamType=void 0,this.stepPatient=void 0,this.stepPatientType=void 0,this.stepPayment=void 0,this.stepProvider=void 0,this.stepRoom=void 0,this.stepSlot=void 0,this.stepSpeciality=void 0,this.stepWorkingDate=void 0,this.currentData=void 0,this.stepData=[]}resetAll(){this.resetAddPatient(),this.resetEditNoHiCard(),this.resetStepData()}
1setFormControlsNameForFlow(t){switch(t?.stepName){case a.W.Area:t.formControlsNames=["areaId","areaName","areaPrefix","areaAddress"],t.type="areaId";break;case a.W.Speciality:t.formControlsNames=["specialityId","specialityName"],t.type="specialityId";break;case a.W.Room:t.formControlsNames=["roomId","roomName"],t.type="roomId";break;case a.W.Provider:t.formControlsNames=["providerId","providerName"],t.type="providerId";break;case a.W.ExamType:t.formControlsNames=["examTypeId","examTypeName"],t.type="examTypeId";break;case a.W.PatientType:t.formControlsNames=["patientTypeId","patientTypeName"],t.type="patientTypeId";break;case a.W.Patient:t.formControlsNames=["patientId","patientName"],t.type="patientId";break;case a.W.WorkingDate:t.formControlsNames=["date","dateFormat"],t.type="date";break;case a.W.AppointmentSlot:t.formControlsNames=["appointmentSlotId","appointmentSlotName"],t.type="appointmentSlotId";break;case a.W.WorkingDateAnSlot:t.formControlsNames=["date","dateFormat","appointmentSlotId","appointmentSlotName"],t.type="workingDateAnSlotId"}}getCurrentStepMessage(t){let e,i;switch(t.stepName){case a.W.Area:i="H\u01b0\u1edbng d\u1eabn khu kh\xe1m",e=this.config?.areaMessage;break;case a.W.Room:i="H\u01b0\u1edbng d\u1eabn Ph\xf2ng kh\xe1m",e=this.config?.roomMessage;break;case a.W.Provider:i="H\u01b0\u1edbng d\u1eabn B\xe1c s\u0129",e=this.config?.doctorMessage;break;case a.W.Speciality:i="H\u01b0\u1edbng d\u1eabn Chuy\xean khoa",e=this.config?.specialityMessage;break;case a.W.ExamType:i="H\u01b0\u1edbng d\u1eabn Lo\u1ea1i h\xecnh kh\xe1m",e=this.config?.examTypeMessage;break;case a.W.PatientType:i="H\u01b0\u1edbng d\u1eabn Lo\u1ea1i \u0111\u1ed1i t\u01b0\u1ee3ng kh\xe1m",e=this.config?.patientTypeMessage;break;case a.W.WorkingDate:i="H\u01b0\u1edbng d\u1eabn Ng\xe0y kh\xe1m",e=this.config?.workingDateMessage;break;case a.W.AppointmentSlot:i="H\u01b0\u1edbng d\u1eabn Gi\u1edd kh\xe1m",e=this.config?.appointmentSlotMessage;break;case a.W.Patient:const d=this.stepData.find(h=>h.stepName===a.W.AppointmentSlot);i=d&&d?.healthInsurance?"H\u01b0\u1edbng d\u1eabn H\u1ed3 s\u01a1 b\u1ec7nh nh\xe2n c\xf3 BHYT":"H\u01b0\u1edbng d\u1eabn H\u1ed3 s\u01a1 b\u1ec7nh nh\xe2n",e=d&&d?.healthInsurance?this.config?.healthInsurancePatientMessage:this.config?.patientMessage;break;default:e=null}return this.currentStepBookingMessage={stepName:i,msg:e},{stepName:i,msg:e}}getBody(){const t={...this.form.value};return this.stepData.filter(i=>i.index>this.stepData[this.activeItemIndex]?.index).forEach(i=>{t[i.type]=null}),this.clearFilter(t)}clearFilter(t){return this.stepData.slice(0,-1).find(e=>e.stepName===a.W.Area)||(t.areaId=null,this.stepArea=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.Room)||(t.roomId=null,this.stepRoom=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.Provider)||(t.providerId=null,this.stepProvider=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.Speciality)||(t.specialityId=null,this.stepSpeciality=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.ExamType)||(t.examTypeId=null,this.stepExamType=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.PatientType)||(t.patientTypeId=null,this.stepPatientType=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.WorkingDate)||(t.date=null,this.stepWorkingDate=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.AppointmentSlot)||(t.appointmentSlotId=null,this.stepSlot=void 0),this.stepData.slice(0,-1).find(e=>e.stepName===a.W.Patient)||(t.patientId=null,this.stepPatient=void 0),t}constructor(t,e){this.fb=t,this.user=e,this.type="OFFLINE",this.stepData=[],this.isEndOfFlow=!1,this.activeItemIndex=-1,this.patientNoHiCard=void 0,this.bookingLabel="\u0110\u1eb7t kh\xe1m",this.amount=0,this.dataDoctors$=new c.y,this.dataHospitals$=new c.y,this.dataClinics$=new c.y,this.clickedIndex=0,this.clickedTabWD=0,this.clickedTabWDOnline=0,this.doctor={},this.bookingProviders$=new c.y,this.workingDates$=new c.y,this.timeSlots$=new c.y,this.workingDatesOnline$=new c.y,this.timeSlotsOnline$=new c.y,this.isRedirectPayment=!1,this.isSuccessOrder=!1,this.countSeconds=0,this.orderType=null,this.form=this.fb.group({date:[null],dateFormat:[{value:null,disabled:!0}],areaId:[null],areaPrefix:[null],areaAddress:[null],areaName:[{value:null,disabled:!0}],examTypeId:[null],examTypeName:[{value:null,disabled:!0}],patientTypeId:[null],patientTypeName:[{value:null,disabled:!0}],providerId:[null],providerName:[{value:null,disabled:!0}],specialityId:[null],specialityName:[{value:null,disabled:!0}],roomId:[null],roomName:[{value:null,disabled:!0}],healthInsurance:[null],type:[null],subType:[null],slotStatus:[null],appointmentSlotId:[null],appointmentSlotName:[{value:null,disabled:!0}],startDate:[null],endDate:[null],patientName:[{value:null,disabled:!0}],patientId:[null],note:[""],files:[[]],prescription:[[]],addressExamType:[null],addressPatientType:[null],addressS
1peciality:[null],addressRoom:[null],addressProvider:[null],feeEnabledExamType:[null],feeEnabledPatientType:[null],feeEnabledSpeciality:[null],feeEnabledRoom:[null],feeEnabledProvider:[null],feeExamType:[null],feeSpeciality:[null],feeRoom:[null],feeProvider:[null]})}setItem(t,e){this.isSuccessOrder||(this.isSuccessOrder=!0,this.removeItem(t),localStorage.setItem(t,JSON.stringify(e??"")))}getItem(t){const e=localStorage.getItem(t);return e?JSON.parse(e):""}addPaymentOfFlow(){this.isEndOfFlow=!0;let t=new Object;t.index=this.stepData?.length,t.label="Thanh to\xe1n",t.stepName="payment",t.isEndOfFlow=!0,t.isPayment=!0,this.amount=0,this.currentMethod=void 0,this.stepData.push(t),this.currentData=t,this.setStep(t)}addPaymentOfPatient(){if(this.stepData.find(i=>i.stepName===a.W.Patient))return;let e=new Object;e.stepName=a.W.Patient,e.label="B\u1ec7nh nh\xe2n",e.distinct=!0,e.feeEnabled=!0,e.isEndOfFlow=!0,e.index=1,this.isEndOfFlow=!0,this.stepData.push(e),this.currentData=e,this.setStep(e)}addWorkingDateAndSlots(t,e){const i=this.stepData.find(d=>d.stepName===a.W.WorkingDateAnSlot);if(t){this.isEndOfFlow=!1;let d=new Object;i&&(this.currentData=void 0,this.stepData=[],this.stepWorkingDateAndSlot=void 0);const h=e?.workingDate;d.stepName=a.W.WorkingDateAnSlot,d.label="Th\u1eddi gian kh\xe1m",d.index=0,d.selectedDate=h.split("-").reverse().join("-"),d.selectedSlot=t.timeslot,d.selectedSlotId=t.id,this.form.controls.appointmentSlotId?.setValue(t.id),this.form.controls.appointmentSlotName?.setValue(t.timeslot);const y=h.split("-").reverse().join("-");this.form.controls.dateFormat?.setValue(y),this.form.controls.selectedName?.setValue(y),this.form.controls.date?.setValue(e?.workingDate),this.stepData.push(d),this.currentData=d,this.setStep(d),this.activeItemIndex=1}}goBackStep(t){this.stepData.splice(t+1),this.currentData=this.stepData[this.stepData?.length-1],this.isEndOfFlow=!1,"patient"!==this.currentData?.stepName&&(this.form.controls.patientId?.setValue(null),this.form.controls.patientName?.setValue(null)),this.activeItemIndex=t}removeItem(t){this.isSuccessOrder=!1,this.countSeconds=0,this.orderType=null,localStorage.removeItem(t)}};let r=u;return u.\u0275fac=function(e){return new(e||u)(f.LFG(s.QS),f.LFG(n.K))},u.\u0275prov=f.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),r})()},7865:(g,m,l)=>{l.d(m,{E:()=>f});var c=l(4666),a=l(2560);let f=(()=>{const n=class{};let s=n;return n.\u0275fac=function(u){return new(u||n)},n.\u0275mod=a.oAB({type:n}),n.\u0275inj=a.cJS({imports:[c.ez]}),s})()},2429:(g,m,l)=>{l.d(m,{K:()=>f});var c=l(4666),a=l(2560);let f=(()=>{const n=class{};let s=n;return n.\u0275fac=function(u){return new(u||n)},n.\u0275mod=a.oAB({type:n}),n.\u0275inj=a.cJS({imports:[c.ez]}),s})()}}]); 2//# sourceMappingURL=7931.7647e40d1e3a8222.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.