1"use strict";(self.webpackChunkDCP_Web=self.webpackChunkDCP_Web||[]).push([["default-libs_my-space_src_lib_services_health-sme_index_ts-libs_my-space_src_lib_services_ind-5ba125"],{3031:(U,v,d)=>{d.d(v,{jF:()=>l,sD:()=>p,mP:()=>m});const h="/api/health-sme",l={MEMBERS:{LIST:`${h}/policies/:policyId/members`,DETAIL:`${h}/policies/:policyId/members/:memberId`,ADD:`${h}/members/add`,UPDATE:`${h}/members/:memberId`,DELETE:`${h}/members/delete`,BULK_UPLOAD:`${h}/members/bulk-upload`,BULK_VALIDATE:`${h}/members/bulk-validate`,EXPORT:`${h}/policies/:policyId/members/export`},OPERATIONS:{UPGRADE:`${h}/members/upgrade`,DOWNGRADE:`${h}/members/downgrade`,DELETE:`${h}/members/delete`},DEPENDENTS:{LIST:`${h}/members/:memberId/dependents`,ADD:`${h}/dependents/add`,ADD_MANUALLY:"/v1/art/b2c-health-endorsement/endorsement/add-dependents",VALIDATE_ESKA:`${h}/dependents/validate-eska`},MEDICAL:{SUBMIT:`${h}/medical-declaration/submit`,UPLOAD_DOCS:`${h}/medical-declaration/upload`,UPLOAD_MDF:"/v1/art/b2c-health-endorsement/endorsement/upload-mdf-file",GET_QUESTIONS:`${h}/medical-declaration/questions`,GET_MDF:"/health-b2c-bff/health/get-mdf",SAVE_MDF:"/health-b2c-bff/save-mdf",GET_MDF_FILES:"/health-b2c-bff/search",DELETE_MDF_FILE:"/health-b2c-bff/delete-file",NSTP_MEMBER:"/health-b2c-bff/nstp-member",SAVE_NSTP_MEMBER:"/health-b2c-bff/save-nstp-member"},PREMIUM:{CALCULATE_UPGRADE:`${h}/premium/calculate-upgrade`,CALCULATE_DOWNGRADE:`${h}/premium/calculate-downgrade`,CALCULATE_ADD_MEMBER:`${h}/premium/calculate-add-member`},PAYMENT:{INITIATE:`${h}/payment/initiate`,TRACK:`${h}/payment/track/:requestId`,VERIFY:`${h}/payment/verify`},OTP:{SEND:`${h}/otp/send`,VERIFY:`${h}/otp/verify`},VALIDATION:{NATIONAL_ID:`${h}/validate-national-id`,IBAN:`${h}/validate-iban`},TEMPLATES:{BULK_UPLOAD:`${h}/templates/bulk-upload-template.xlsx`},POLICY:{DETAILS:"/v1/art/b2c-health-endorsement/health/policy-details",GET_CLASS_IDS:"/v1/art/b2c-health-endorsement/policy/get-classids",GET_BENEFIT:"/v1/art/b2c-health-endorsement/get-benefit",DOWNLOAD:"/health-b2c-bff/health-policy/download"},ENDORSEMENT:{DOWNLOAD_BULK_TEMPLATE_PLAN:"/v1/art/b2c-health-endorsement/health-endorsement-sme/download",BULK_ADD_MEMBER_FILE:"/v1/art/b2c-health-endorsement/health/add-member/bulkUpload",PLANS:"/v1/art/b2c-health-endorsement/endorsement/plans",CREATE:"/v1/art/b2c-health-endorsement/health/endorsement/create",ADD_MANUAL_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/add-manual-member",ADD_DEPENDENT:"/v1/art/b2c-health-endorsement/endorsement/add-dependent",ADD_ESKA_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/add_eska_member",EDIT_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/edit-member",CALCULATE_AMOUNT:"/v1/art/b2c-health-endorsement/endorsement/calculate-amount",GET_PREMIUM:"/v1/art/b2c-health-endorsement/member/get-premium",MEMBER_LIST:"/v1/art/b2c-health-endorsement/endorsement/member-list",GET_DELETE_REASONS:"/v1/art/b2c-health-endorsement/endorsement/get-reasons",SAVE_IBAN:"/v1/art/b2c-health-endorsement/endorsement/save-iban",DELETE_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/delete-member",SUBMIT_DELETE:"/v1/art/b2c-health-endorsement/endorsement/submit-delete-endorsement",REMOVE_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/remove-member",UPLOAD_DOC:"/health-b2c-bff/upload-file",UPDATE_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/update-member",ESKA_UPDATE_MEMBER:"/v1/art/b2c-health-endorsement/endorsement/ESKA/update_member",SUMMARY:"/v1/art/b2c-health-endorsement/endorsement/summary",UPDATE_INSTANCE:"/v1/art/b2c-health-endorsement/endorsement/update-instance",SAVE_MDF_ESKA:"/v1/art/b2c-health-endorsement/endorsement/save-mdf"},PROFILE:{GET:"/v1/healthSMEDashboard/:referenceId/profile",UPDATE:"/v1/healthSMEDashboard/:referenceId/profileUpdate"},YAKEEN:{GET_DEPENDENT_IQAMA:"/v1/art/b2c-health-endorsement/health/yakeen-alien-all-dep",GET_DEPENDENT_NID:"/health-b2c-bff/health/yakeen-dep",GET_MEMBER_DETAILS:"/health-b2c-bff/health-customer/details"},DELEGATORS:{LIST:"/health-b2c-bff/delegators",ADD:"/health-b2c-bff/add/delegators",REMOVE:"/health-b2c-bff/delegators/remove"}},p={NATIONAL_ID:{REQUIRED:"National ID is required",INVALID:"Invalid National ID format",LENGTH:"National ID must be 10 digits",ALREADY_EXISTS:"Member with this National ID already exists"},NAME:{REQUIRED:"Full name is required",MIN_LENGTH:"Name must be at least 3 characters",MAX_LENGTH:"Name cannot exceed 100 characters",INVALID_CHARACTERS:"Name contains invali
1d characters"},DOB:{REQUIRED:"Date of birth is required",INVALID_FORMAT:"Invalid date format",FUTURE_DATE:"Date of birth cannot be in the future",TOO_OLD:"Age exceeds maximum allowed",TOO_YOUNG:"Age is below minimum required"},AGE:{MIN_ADULT:"Member must be at least 18 years old",MAX_ADULT:"Member age cannot exceed 65 years",MIN_DEPENDENT:"Dependent must be at least 0 years old",MAX_DEPENDENT:"Dependent age cannot exceed 25 years"},GENDER:{REQUIRED:"Gender is required",INVALID:"Invalid gender value"},RELATIONSHIP:{REQUIRED:"Relationship type is required",INVALID:"Invalid relationship type",NOT_ALLOWED:"This relationship type is not allowed"},CLASS:{REQUIRED:"Member class is required",INVALID:"Invalid member class",NOT_AVAILABLE:"This class is not available for the policy"},MOBILE:{REQUIRED:"Mobile number is required",INVALID:"Invalid mobile number format",LENGTH:"Mobile number must be 10 digits",MUST_START_WITH:"Mobile number must start with 05"},EMAIL:{REQUIRED:"Email is required",INVALID:"Invalid email format",MAX_LENGTH:"Email cannot exceed 100 characters"},IBAN:{REQUIRED:"IBAN is required",INVALID:"Invalid IBAN format",LENGTH:"IBAN must be 24 characters",MUST_START_WITH:"IBAN must start with SA"},EFFECTIVE_DATE:{REQUIRED:"Effective date is required",INVALID:"Invalid effective date",PAST_DATE:"Effective date cannot be in the past",TOO_FAR:"Effective date cannot be more than 90 days in the future"},MEDICAL:{REQUIRED:"Medical declaration is required",INCOMPLETE:"Please complete all medical questions",DOCUMENTS_REQUIRED:"Medical documents are required"},FILE:{REQUIRED:"File is required",INVALID_FORMAT:"Invalid file format",TOO_LARGE:"File size exceeds maximum allowed (5MB)",EMPTY:"File is empty"},BULK:{EMPTY_FILE:"Excel file is empty",INVALID_FORMAT:"Invalid Excel format",MAX_ROWS:"Maximum 100 members allowed per upload",DUPLICATE_ENTRIES:"Duplicate entries found in the file",MISSING_COLUMNS:"Required columns are missing"},GENERAL:{REQUIRED_FIELD:"This field is required",INVALID_INPUT:"Invalid input",SOMETHING_WRONG:"Something went wrong, please try again"}},m=[{Name_en:"Spouse",Name_ar:"\u0632\u0648\u062c/\u0640\u0629",value:"2"},{Name_en:"Child",Name_ar:"\u0623\u0628\u0646\u0627\u0621",value:"3"},{Name_en:"Parents",Name_ar:"\u0648\u0627\u0644\u062f\u064a\u0646",value:"4"},{Name_en:"Sister",Name_ar:"\u0623\u062e\u062a",value:"7"},{Name_en:"Brother",Name_ar:"\u0623\u062e",value:"8"}]},13717:(U,v,d)=>{d.d(v,{f:()=>h.f});var h=d(78478);d(44602)},15752:(U,v,d)=>{d.d(v,{n:()=>e});var h=d(10467),l=d(23214),p=d(95330),o=d(21413),a=d(12498),m=d(99437),D=d(96354),L=d(25558),T=d(7673),P=d(18810),E=d(45312),C=d(23665),R=d(77970),r=d(46006),i=d(12932),g=d(38109),y=d(73165);let e=(()=>{class c{http;apigeeHttp;nodeHttp;cmsService;languageService;STORAGE_KEY=i.R.MY_SPACE_INDIVIDUAL_SESSION;baseurl=E.c.sitecoreApi;carLogosApi=E.c.carLogosApi;motorPurchaseApi=E.c.motorPurchaseApi;url=E.c.loopbackApi;apgieeUrl=E.c.apigeeUrlNutrunos;claimFilterSignal=(0,l.vPA)(0);policyFilterSignal=(0,l.vPA)(0);updateSidebarSignal=(0,l.vPA)(!1);claimFilter=this.claimFilterSignal.asReadonly();policyFilter=this.policyFilterSignal.asReadonly();updateSidebar=this.updateSidebarSignal.asReadonly();policyDetailMiddleBreadcrumbSignal=(0,l.vPA)(null);policyDetailMiddleBreadcrumb=this.policyDetailMiddleBreadcrumbSignal.asReadonly();policyDetailHeaderRefreshSource=new o.B;policyDetailHeaderRefresh$=this.policyDetailHeaderRefreshSource.asObservable();setClaimFilter(s){this.claimFilterSignal.set(s)}setPolicyFilter(s){this.policyFilterSignal.set(s)}setUpdateSidebar(s){this.updateSidebarSignal.set(s)}setPolicyDetailMiddleBreadcrumb(s){this.policyDetailMiddleBreadcrumbSignal.set(s),this.policyDetailHeaderRefreshSource.next()}clearPolicyDetailMiddleBreadcrumb(){this.setPolicyDetailMiddleBreadcrumb(null)}currentLang;constructor(s,_,S,O,I){this.http=s,this.apigeeHttp=_,this.nodeHttp=S,this.cmsService=O,this.languageService=I,this.currentLang=this.languageService.currentLang()??"en"}endorseQuoteSummaryGeneral(s){return this.apigeeHttp.get(`/v1/art/${s}/endorsement-quote-summary`).pipe((0,a.L)(1),(0,m.W)(this.handleError))}GetPolicyByNationalID(s){return this.apigeeHttp.get(`/v1/art/web/motor-policy-renewal-data?nationalId=${s}`).pipe((0,D.T)(_=>_),(0,L.n)(_=>this.setpolicies(_)),(0,a.L)(1),(0,m.W)(_=>this.setpolicies([])))}setpolicies(s){return(0,h.A)(function*(){const _=[],S={motorPolicies:[],travelPolicies:[],mmpPolicies:[],homePolicies:[],liabilityPolicies:[],generalSMEPolicies:[],cyberPolicies:[]};return s&&s.length>0&&("[object Object]"===Object.prototype.toString.call(s)&&S.motorPolicies.push(s),"[object Array]"===Object.prototype.toString.call(s)&&s.forEac
1h(I=>{_.push(I)})),_.forEach(I=>{"Motor"===I.policyInsuranceType?(I.icon="",S.motorPolicies.push(I)):"Travel"===I.policyInsuranceType?(I.icon="travel-icon",S.travelPolicies.push(I)):"Medical Malpractice"===I.policyInsuranceType?(I.icon="art-mmp-product-icon",S.mmpPolicies.push(I)):"Fire/Property"===I.policyInsuranceType?(I.icon="home-icon",S.homePolicies.push(I)):"Liability"===I.policyInsuranceType?(I.icon="life-icon",S.liabilityPolicies.push(I)):"General SME"===I.policyInsuranceType?(I.icon="life-icon",S.generalSMEPolicies.push(I)):"Cyber Retail"===I.policyInsuranceType&&(I.icon="cyber-icon",S.cyberPolicies.push(I))}),S})()}updateMotorPolicy(s){return this.http.get(this.baseurl+"/loadsubjectpolicy/"+s).pipe((0,D.T)(_=>({subject:this.getLogo(_)})),(0,a.L)(1),(0,m.W)(this.handleError))}getLogo(s){let S;const O=s.LoadSubjectPolicyResponse.LoadSubjectPolicyResult.LoadSubjectPolicyMotor;"[object Object]"===Object.prototype.toString.call(O)&&S.push(O),"[object Array]"===Object.prototype.toString.call(O)&&O.forEach(I=>{S.push(I)});for(let I=0;I<S.length;I++){const H=S[I].Make.toLowerCase();this.getVehicleLogo(H).subscribe(B=>{S[I].carLogo=B.Image})}return S}getPolicyCertificate(s){return this.http.get(this.baseurl+"/PolicyCertificate?"+s,{responseType:"blob"}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}GetSubjectPolicyMotor(s){return this.http.get(this.baseurl+"/loadsubjectpolicy/"+s)}httpCall(s){return this.http.get(this.baseurl+s).pipe((0,a.L)(1),(0,m.W)(this.handleError))}httpApigeCall(s){return this.http.get(this.apgieeUrl+s,{context:(0,C.kd)()}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}GetPolicyMedicalByNationalID(s){return this.apigeeHttp.get(`/v1/art/web/load-policy-medicalby-nationalid?nationalId=${s}`).pipe((0,a.L)(1),(0,m.W)(_=>(0,T.of)({healthPolicies:[]})))}GetPolicyMemberByPolicyID(s,_,S=null){return this.apigeeHttp.get(`/v1/art/health-digital/dependents?policyID=${s}&memberID=${_}`).pipe((0,a.L)(1),(0,m.W)(this.handleError))}GetClaimMemberByPolicyID(s){return this.http.get(this.baseurl+"/loadpolicymemberbypolicyid/"+s).pipe((0,a.L)(1),(0,m.W)(this.handleError)).toPromise().catch(this.handleError)}GetQuotationByNationalID(s){return this.httpCall("/loadquotationbynationalid/"+s)}GetQuotationMedicalByNationalID(s){return this.httpCall("/loadquotationmedicalbynationalid/"+s)}GetMotorClaimByNationalID(s){return this.nodeHttp.get("/loadmotorclaimbynationalid/"+s)}getAllDomesticHelperInsurancePolicies(s){return this.apigeeHttp.get("/v1/art/web/loadpolicymedicalbysponsorno/"+s).pipe((0,D.T)(S=>S),(0,a.L)(1),(0,m.W)(S=>(0,P.$)(()=>({LoadPolicyMedicalBySponsorNoResponse:{LoadPolicyBySponsorNoOutput:[]}}))))}GetMotorClaimTPLByNationalID(s){return this.httpCall("/loadmotorclaimtplbynationalid/"+s)}GetMedicalClaimByNationalID(s){return this.apigeeHttp.get(`/v1/art/web/load-medical-claim-by-nationalid?nationalId=${s}`)}getAllLifeInsurancePolicies(s){const _=s&&s.startsWith("1")?"SI":"IQ";return this.nodeHttp.get(`/v1/policy-beneficiary-list?idenCode=${_}&idenNo=${s}`).pipe((0,a.L)(1),(0,m.W)(this.handleError))}getBenifits(s){return this.nodeHttp.post("/getMemberBenefits",s).pipe((0,a.L)(1),(0,m.W)(this.handleError))}getAllPreAuthorizationDetails(s,_){return this.httpApigeCall(`/v1/art/web/pre-auth-details?policyNumber=${s}&memberId=${_}`)}getLimitsandExclusions(s){let _=this.cmsService.langEN;"ar"===s&&(_=this.cmsService.langAR);let S=[];return this.cmsService.query({options:{query:`\n query{\n limitAndExclusions(locale:"${_}"){\n data{\n attributes{\n FAQID\n Question\n Answer\n }\n }\n }\n }\n `}}).pipe((0,m.W)(this.handleError)).pipe((0,D.T)(O=>{let I;return S=[],O.limitAndExclusions.data.forEach(H=>{I={},I.FAQID=H.attributes.FAQID,I.Question=H.attributes.Question,I.Answer=H.attributes.Answer,S.push(I)}),S}))}GetQuotationsByNationalID(s){return this.http.get(this.motorPurchaseApi+"/BusinessProcesses/Motor/Purchase/"+s+"/MyQuotations?language="+("en"===this.currentLang?"E":"A")).pipe((0,m.W)(this.handleError))}getVehicleLogo(s){return this.http.get(E.c.carLogosApi+s.toLowerCase())}GetLifePolicyMemberByPolicyID(s,_,S="AR"){return this.httpCall(`/v1/policy-detail
1s?language=${S.toLocaleUpperCase()}&policyNo=${s}&sequenceNo=${_}`)}getList(s,_,S="Label"){let O=this.cmsService.langEN;return"ar"===s&&(O=this.cmsService.langAR),this.cmsService.query({options:{query:`\n query{\n ${_}(locale:"${O}",pagination:{limit: 1000},sort:["${S}"]){\n data{\n attributes{\n Label\n Details{\n Code\n Value\n }\n }\n }\n }\n }`}}).pipe((0,m.W)(this.handleError)).pipe((0,D.T)(I=>{const H={data:[]};let t;return I[_].data.forEach(n=>{t={code:n.attributes.Details.Code,value:n.attributes.Details.Value,label:n.attributes.Label},H.data.push(t)}),H}))}policyDetailsGeneral(s,_,S){return this.apigeeHttp.get(`/v1/art/policydetails?policyId=${_}`).pipe((0,a.L)(1),(0,m.W)(this.handleError))}policyClaimisActive(s){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/active-claims",{policy_id:s}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}getPolicyDocGeneral(s){return this.apigeeHttp.post("/v1/art/gi-generic/policy-download",s,{responseType:"blob",withCredentials:!0}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}travelEndorsementList(){return this.apigeeHttp.get("/v1/art/b2c-travel/endorsement-list").pipe((0,a.L)(1),(0,m.W)(this.handleError))}travelCancelEndorsementInsert(s,_){return this.apigeeHttp.post("/v1/art/b2c-travel/endorsement-cancel",{policy_id:s,reason:_}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}mmpEndorsementList(){return this.apigeeHttp.get("/v1/art/b2c-mmp/endorsement-list").pipe((0,a.L)(1),(0,m.W)(this.handleError))}mmpCancelEndorsementInsert(s,_){return this.apigeeHttp.post("/v1/art/b2c-mmp/endorsement-cancel",{policy_id:s,reason:_}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}homeEndorsementList(){return this.apigeeHttp.get("/v1/art/b2c-home/endorsement-list").pipe((0,a.L)(1),(0,m.W)(this.handleError))}homeCancelEndorsementInsert(s,_){return this.apigeeHttp.post("/v1/art/b2c-home/endorsement-cancel",{policy_id:s,reason:_}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}cyberEndorsementList(){return this.apigeeHttp.get("/v1/art/b2c-cyber/endorsement-list").pipe((0,a.L)(1),(0,m.W)(this.handleError))}cyberCancelEndorsementInsert(s,_){return this.apigeeHttp.post("/v1/art/b2c-cyber/endorsement-cancel",{policy_id:s,reason:_}).pipe((0,a.L)(1),(0,m.W)(this.handleError))}handleError(s){return(0,P.$)(()=>s)}static \u0275fac=function(_){return new(_||c)(l.KVO(y.Qq),l.KVO(r.J),l.KVO(R.Y),l.KVO(p.J),l.KVO(g.gw))};static \u0275prov=l.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})()},16917:(U,v,d)=>{d.d(v,{l:()=>i});var h=d(23214),l=d(12498),p=d(99437),o=d(96354),a=d(18810),m=d(38109),D=d(23665),L=d(46006),T=d(56745),P=d(77970),E=d(97563),C=d(73165),R=d(68018);function r(g,y){const e=URL.createObjectURL(g),c=document.createElement("a");c.href=e,c.download=y,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(e)}let i=(()=>{class g{http;httpNode;apigeeHttp;langService;translateService;STORAGE_KEY=T.Zg.COMMON_MY_SPACE_SESSION;currentLang;isLoadingGlobalSignal=(0,h.vPA)(!1);isCompleteComprehensiveFunctionSignal=(0,h.vPA)(!1);isLoadingGlobal=this.isLoadingGlobalSignal.asReadonly();isCompleteComprehensiveFunction=this.isCompleteComprehensiveFunctionSignal.asReadonly();setLoadingGlobal(e){this.isLoadingGlobalSignal.set(e)}setCompleteComprehensiveFunction(e){this.isCompleteComprehensiveFunctionSignal.set(e)}httpOptions={withCredentials:!0};constructor(e,c,b,s,_){this.http=e,this.httpNode=c,this.apigeeHttp=b,this.langService=s,this.translateService=_,this.currentLang=this.langService.currentLang()??"en"}getpolicypath(e,c){return{NameTranslator:this.translateService.instant("MY_SPACE.COMMON.MOTOR_INSURANCE_POLICY"),path:`${this.currentLang}/my-space/${c}policies/detail/${e}`}}getMotorPoliciesDetails(e){return this.apigeeHttp.get(`${E.Sn.mySpace.policies.motor_details}?policy_id=${e}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getPolicyDetails(e){return this.apigeeHttp.post(E.Sn.mySpace.policies.getPolicyDetails,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getMotorPoliciesdetailsVehicleDriverAddon(e){return this.http.post(E.Sn.mySpace.utilities.getListDetails,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}geEndorsmentPoliciesList(){return this.http.post(E.Sn.mySpace.policies.endorsePoliciesList,{},this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getMotorPoliciesList(e,c,b){return this.apigeeHttp.get(`${E.Sn.mySpace.policies.list}?${b?`filter=${b}&`:""}offset=${e}&limit=${c}&desc=true`,this.httpOptions).pipe((0,p.W)(this.errorHandl))}getMotorPoliciesListEligibleForEndorsment(e,c,b){return this.apigeeHttp.get(`${E.Sn.mySpace.policies.list}?offset=${e}&limit=${c}&type=endorsement`+(b?`&filter=${b}`:""),this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}updatePlateNumber(e){return this.httpNode.post(E.Sn.mySpace.vehicles.updatePlateNumber,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicelImage(e){return this.apigeeHttp.get(`${E.Sn.mySpace.vehicles.image}/${e}`,{responseType:"blob",context:(0,D.vA)(),withCredentials:!0}).pipe((0,o.T)(c=>c),(0,p.W)(this.errorHandl))}getVehicelDetails(e){return this.httpNode.post(E.Sn.mySpace.vehicles.details,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}createVehcile(e){return this.httpNode.post(E.Sn.mySpace.vehicles.create,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}linkVehcile(e){return this.httpNode.post(E.Sn.mySpace.vehicles.link,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}deleteVehicel(e){return this.apigeeHttp.post(E.Sn.mySpace.vehicles.delete,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endoDeleteVehicel(e){return this.httpNode.post(E.Sn.mySpace.vehicles.endoDelete,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicelExcel(e){return this.httpNode.get(`${E.Sn.mySpace.vehicles.listExcel}?policy_id=${e}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicleDetails(e){return this.httpNode.post(E.Sn.mySpace.vehicles.details,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicleImages(e){return this.httpNode.post(E.Sn.mySpace.vehicles.images,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicleList(e){return this.apigeeHttp.post(E.Sn.mySpace.vehicles.list,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getVehicleExcel(e){return this.httpNode.get(`${E.Sn.mySpace.vehicles.listExcel}?policy_id=${e}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getAddonList(e){return this.apigeeHttp.post(E.Sn.mySpace.addons.list,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}masterAddOns(e){return this.httpNode.post(E.Sn.mySpace.addons.master,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}addonsCreate(e){return this.httpNode.post(E.Sn.mySpace.addons.create,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}addonsDelete(e){return this.httpNode.post(E.Sn.mySpace.addons.delete,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endorseAddOnsRate(e){return this.httpNode.post(E.Sn.mySpace.addons.endorseRate,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getDriverList(e,c="",b=10,s=0){return this.apigeeHttp.get(`${E.Sn.mySpace.drivers.list}?policy_id=${e}&search_value=${c}&limit=${b}&offset=${s}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getDriverExcel(e){return this.httpNode.get(`${E.Sn.mySpace.drivers.listExcel}?policy_id=${e}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getDriverdetails(e){return this.httpNode.post(E.Sn.mySpace.drivers.details,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}
1getVehicleDriverAddonDetails(){return this.httpNode.post(E.Sn.mySpace.utilities.getVehicleDriverAddonDetails,null,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}driverDelete(e){return this.httpNode.post(E.Sn.mySpace.drivers.delete,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endoDeleteDriver(e){return this.httpNode.post(E.Sn.mySpace.drivers.endoDelete,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endoADDDriver(e){return this.httpNode.post(E.Sn.mySpace.drivers.endoAdd,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}driverCreate(e){return this.httpNode.post(E.Sn.mySpace.drivers.create,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}policyCancellation(e){return this.httpNode.post(E.Sn.mySpace.policies.cancellation,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endorseCancellationReason(e){return this.httpNode.post(E.Sn.mySpace.endorsements.cancellationReason,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorClaimValidate(e){return this.httpNode.post(E.Sn.mySpace.claims.validate,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorClaimInfo(e){return this.httpNode.post(E.Sn.mySpace.claims.info,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorUploadtoClaim(e){return this.httpNode.post(E.Sn.mySpace.claims.uploadDocument,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorBankNameDetails(e){return this.httpNode.post(E.Sn.mySpace.claims.ibanFetchBank,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorClaimCreateFnol(e){return this.httpNode.post(E.Sn.mySpace.claims.createFnol,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorClaimUpdateFnol(e){return this.httpNode.post(E.Sn.mySpace.claims.updateFnol,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}motorClaimTriggerFnol(e){return this.httpNode.post(E.Sn.mySpace.claims.triggerFnol,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}bulkUploadVehicle(e){return this.httpNode.post(E.Sn.mySpace.endorsements.smeUpload,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}riskitemUploadVehicle(e){return this.httpNode.post(E.Sn.mySpace.vehicles.smeUpload,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}ibanExist(e){return this.httpNode.post(E.Sn.mySpace.payment.ibanExist,e,this.httpOptions).pipe((0,p.W)(this.errorHandl))}fetchBankName(e){return this.httpNode.post(E.Sn.mySpace.payment.ibanFetchBank,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}endorseValidate(e){return this.apigeeHttp.post(E.Sn.mySpace.endorsements.validate,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getIbanBankData(){return this.httpNode.post(E.Sn.mySpace.payment.ibanFetchBank,null,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}masterdataProducts(e){return this.apigeeHttp.post(E.Sn.mySpace.utilities.masterdataProducts,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}createEndorsement(e){return this.apigeeHttp.post(E.Sn.mySpace.endorsements.create,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}submitEndorsement(e){return this.httpNode.post(E.Sn.mySpace.endorsements.submit,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}policyDownload(e,c){const b=e.segment_id+"policy.pdf";return this.apigeeHttp.post(E.Sn.mySpace.policies.download,e,{responseType:"arraybuffer",context:(0,D.vA)(),withCredentials:!0}).subscribe({next:s=>{r(new Blob([s],{type:"application/pdf"}),b),this.setLoadingGlobal(!1),c?.()},error:s=>{this.setLoadingGlobal(!1),this.errorHandl(s),c?.()}})}riskitemSmeDownload(){return this.httpNode.get(E.Sn.mySpace.vehicles.smeDownload,{responseType:"arraybuffer",context:(0,D.vA)(),withCredentials:!0}).subscribe({next:b=>{r(new Blob([b],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"}),"sampleBulkUpload.xlsx"),this.setLoadingGlobal(!1)},error:b=>{this.setLoadingGlobal(!1),this.errorHandl(b)}})}exportAsExcel(e){const c=Object.keys(e[0]||{}),b=[c.join(",")];e.forEach(_=>{b.push(c.map(S=>`"${(_[S]??"").toString().replace(/"/g,'""')}"`).join(","))});const s=new Blob(["\ufeff"+b.join("\n")],{type:"text/csv;charset=utf-8;"});this.setLoadingGlobal(!1),r(s,`data_${(new Date).getTime()}.csv`)}getGeneralPoliciesList(e){return this.apigeeHttp.get(`/v1/art/gi-generic/policy-list-core?policyHolderId=${e}`,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}statusUpdate(e){return this.apigeeHttp.post(E.Sn.mySpace.policies.statusUpdate,e,this.httpOptions).pipe((0,p.W)(this.errorHandl))}getCacheData(){return this.apigeeHttp.post(E.Sn.mySpace.utilities.getCacheData,null,{withCredentials:!0}).pipe((0,p.W)(this.errorHandl))}sedOTP(){return this.apigeeHttp.post(E.Sn.mySpace.user.sendOTP,null,this.httpOptions).pipe((0,p.W)(this.errorHandl))}verifyOTP(e){return this.apigeeHttp.post(E.Sn.mySpace.user.verifyOTP,e,this.httpOptions).pipe((0,p.W)(this.errorHandl))}getUserInfo(){return this.apigeeHttp.get(E.Sn.mySpace.user.info,this.httpOptions).pipe((0,p.W)(this.errorHandl))}deleteUserInfo(){return this.apigeeHttp.post(E.Sn.mySpace.user.deleteInfo,null,this.httpOptions).pipe((0,p.W)(this.errorHandl))}getPaymentOptions(e){return this.httpNode.post(E.Sn.mySpace.payment.options,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getRateMotorEndorsement(e){return this.httpNode.post(E.Sn.mySpace.endorsements.motorGetRate,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getRateMotor(e){return this.httpNode.post(E.Sn.mySpace.rates.motorGetRate,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}calculatePremiumMotorEndorsement(e){return this.httpNode.post(E.Sn.mySpace.endorsements.calculatePremium,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}quoteSummary(e){return this.httpNode.post(E.Sn.mySpace.quotes.summary,e,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getPremiumSummary(){return this.httpNode.post(E.Sn.mySpace.quotes.premiumSummary,null,this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalBankNameDetails(e){return this.apigeeHttp.post("/v1/art/gi-generic/iban-bank-name",{iban_no:e}).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}createQuoteGeneral(e,c){return this.apigeeHttp.post(`/v1/art/${e}/endorsement-create-quote`,c).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalValidateIban(e,c){return this.apigeeHttp.post("/v1/art/gi-generic/validate-iban",{id_no:e,iban_no:c}).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalEndorseSaveIban(e,c,b){return this.apigeeHttp.post("/v1/art/gi-generic/endorse-save-iban",{national_id:e,iban_no:c,account_holder_name:b}).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalEndorseRefundAmount(e){return this.apigeeHttp.post("/v1/art/gi-generic/endorse-refund-amount",{document_id:e},this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalClaimGetDocs(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/claim-documents",{id:e}).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}generalClaimUploadDoc(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/document-upload",e).pipe((0,p.W)(this.errorHandl))}uploadGIFile(e){return this.apigeeHttp.post("/v1/art/gi-generic/endorse-upload-document",e).pipe((0,p.W)(this.errorHandl))}generalClaimDeleteDoc(e,c){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/document-delete",{claim_id:e,id:c}).pipe((0,p.W)(this.errorHandl))}generalEndorseSubmit(e){return this.apigeeHttp.post("/v1/art/gi-generic/endorse-submit",{document_id:e},this.httpOptions).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}getCauseOfLosss(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/mdm-search",e).pipe((0,o.T)(c=>c?.result||c))}generalClaimCreateFnol(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/create-fnol",e).pipe((0,o.T)(c=>c?.result||c))}generalClaimUpdateFnol(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/update-fnol",e).pipe((0,o.T)(c=>c?.result||c))}generalClaimValiodateFnol(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/validate-fnol",e).pipe((0,o.T)(c=>c?.result||c))}generalClaimSummary(e,c){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/claim-summary",{reference_number:e,id:c}).pipe((0,o.T)(b=>b?.result||b))}generalClaimRegister(e){return this.apigeeHttp.post("/v1/art/b2c-gi-claims/claim-register",{id:e}).pipe((0,o.T)(c=>c?.result||c))}extractError(e){if(!e)return"";const c=this.translateService.instant("COMMON.ERRORS.SOMETHING_WENT_WRONG"),b=e?.ErrorCode||e?.error_code||e?.error?.ErrorCode||e?.error?.error_code;let s=e?.error||e;if("string"==typeof s)try{s=JSON.parse(s)}catch{}const _=(t,n)=>n?`${t} (${n})`:t,S=t=>{if(!t)return null;const n=t.toLowerCase();return n.includes("httperror")||n.includes("typeerror")?null:t.includes(" at ")||n.includes("at request.")||n.includes("at generator.")?t.split("\n")[0].trim()||null:t},O=b||s?.ErrorCode||s?.error_code;if("string"==typeof s)return _(S(s)||c,O);const I="ar"===this.langService.currentLang(),H=s?.message||s?.error_msg||s?.err_msg||(I&&"string"==typeof s?.error_ar?s.error_ar:void 0)||s?.error_en||s?.errors||s?.error?.message||s?.error?.error_msg||("string"==typeof s?.error?s.error:"");return _(H&&S(String(H))||c,O)}errorHandl(e){let c="";return c=e.error instanceof ErrorEvent?e.error.message:e.error,(0,a.$)(c)}getKycCheckStatus(e,c){return this.apigeeHttp.get(`/v1/art/kyc-ms/check-status?customerId=${e}&customerType=${c}`).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}renewPlolicy(e,c){return this.apigeeHttp.post(`/v1/art/b2c-${e}/renew-policy`,{policyId:c}).pipe((0,l.L)(1),(0,p.W)(this.errorHandl))}static \u0275fac=function(c){return new(c||g)(h.KVO(C.Qq),h.KVO(P.Y),h.KVO(L.J),h.KVO(m.gw),h.KVO(R.c$))};static \u0275prov=h.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}return g})()},23665:(U,v,d)=>{d.d(v,{kd:()=>a,vA:()=>m});var h=d(73165);const l=new h.rx(()=>!1),p=new h.rx(()=>!1);function a(){return(new h._y).set(l,!0)}function m(){return(new h._y).set(p,!0)}new h.rx(()=>!1)},29776:(U,v,d)=>{d.d(v,{BK:()=>R,ES:()=>_,Fq:()=>e,Jw:()=>m,L4:()=>a,Qm:()=>o,Ti:()=>H,VD:()=>c,X7:()=>C,XA:()=>y,af:()=>s,cp:()=>g,fl:()=>I,iJ:()=>r,j3:()=>E,jt:()=>L,mL:()=>P,sr:()=>T,uE:()=>D,ut:()=>i,wd:()=>O});var h=d(97586),l=d.n(h),p=d(38109);function o(t){return t?.includes("/my-space/sme")?"sme":"individual"}function a(t,n,u){if(t&&Object.keys(t).length>0)return t;const M=n.GetValue(u);if(M?.policy&&Object.keys(M.policy).length>0)return M.policy;const N=n.GetValue(p.RM.SELECTED_POLICY_TO_VIEW_DETAILS);return N&&Object.keys(N).length>0?N:null}function m(t,n){const u={...t},M=String(t?.PolicyExpiryDate??t?.policyExpiryDate??""),N=n?n(M):M;return u.icon="health-icon",u.policyExpiryDate=N,u.PolicyExpiryDate=N,u.policyStatus=t?.Status??t?.policyStatus,u.policyNo=t?.PolicyNumber??t?.policyNo,u.policyID=t?.PolicyId??t?.policyID,u.PolicyId=t?.PolicyId??t?.policyID,u.PolicyNumber=t?.PolicyNumber??t?.policyNo,u.MemberId=t?.MemberId??t?.memberId??t?.MEMBER_ID??(Array.isArray(t?.memberDetails)?t?.memberDetails?.[0]?.MemberID:void 0)??(Array.isArray(t?.Members)?t?.Members?.[0]?.MEMBER_ID:void 0),u.policyInsuranceType=t?.Insurancetype??t?.policyInsuranceType??"Health",u}function D(t){return t?{policyId:String(t.PolicyId??t.policyID??t.POLICY_ID??t.policy_id??""),policyNumber:String(t.PolicyNumber??t.policyNo??t.POLICY_NUMBER??t.policy_number??""),policyHolderId:String(t.PolicyHolderID??t.PolicyHolderId??t.policyHolderId??"")}:{policyId:"",policyNumber:"",policyHolderId:""}}function L(t,n){const u=t?.member_id??t?.MemberID??t?.originalMemberId??t?.patientId??t?.id;if(null!=u&&""!==u)return u;const M=n?.MemberId;return null!=M&&""!==M?M:""}function T(t,n){const u=L(t,n);return""===u?0:Number(u)}function P(t){if(!t)return"";const n=t.Id??t.ProviderID??t.ProviderId??t.providerId??t.provider_id;return null==n||""===n?"":String(n)}function E(t){return 1==t||"1"===t}const C="Out Of Network";function R(t){return t===C||"0"===t||0===t}function r(t,n){if(!E(t.countryOfTreatment)||"0"===t.serviceProvider||R(t.serviceProvider))return null;const u=P(n)||String(t.serviceProvider??"");return u&&"0"!==u?u:null}function i(t,n){const u=P(n)||String(t??"");return u&&"0"!==u?u:null}function g(t){if(null==t||""===t)return;if(t instanceof Date)return l()(t).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]");if("string"==typeof t){const u=t.trim();if(/^\d{2}-\d{2}-\d{4}$/.test(u)){const N=l()(u,"DD-MM-YYYY",!0);return N.isValid()?N.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"):u}const M=l()(u);return M.isValid()?M.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"):u}const n=l()(t);return n.isValid()?n.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"):String(t)}function y(t){if(null==t||""===t)return"";if(t instanceof Date)return l()(t).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]");const n=String(t).trim();if(!n)return"";if(/^\d{2}-\d{2}-\d{4}$/.test(n)){const N=l()(n,"DD-MM-YYYY",!0);return N.isValid()?N.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"):n}const u=l()(n,["YYYY-MM-DD",l().ISO_8601],!0);if(u.isValid())return u.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]");const M=l()(n);return M.isValid()?M.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"):n}function e(t){if(!t||"object"!=typeof t)return null;const n=t.code??t.BankCode??t.bank_code;return null==n||""===n?null:String(n)}function c(t){return null==t?"":String(t)}function s(t){const n=t?.data||t?.result||t?.payload||t||{};return{neu_reference_id:n.neu_reference_id,reference_number:n.reference_number||"",eskaResult:{calimid:n.eskaResult?.calimid||"",landingcalimid:n.eskaResult?.landingcalimid||null,error:n.eskaResult?.error||"Success"},eska_batch_no:n.eska_batch_no}}function _(t){const n=t?.selectedMemberData;return String(t?.nationalId||n?.nationalId||n?.national_id||n?.idValue||t?.formValues?.requestClaimFor||"").trim()}const S=7;function O(t,n){return Number(t??n?.value??n?.data?.id)===S||Str
1ing(n?.value_en??n?.data?.name??n?.data?.name_en??"").trim().toLowerCase().includes("repatriation")}function I(t){if(!t)return!1;const n=t.selectedBenefitTypeData,u=n?{value:String(n.id??t.formValues?.benefitType??""),value_en:String(n.name??n.name_en??t.visitType??""),value_ar:String(n.name_ar??""),data:n}:null;return O(t.visitTypeCode??t.formValues?.benefitType??n?.id,u??{value:String(t.formValues?.benefitType??""),value_en:String(t.visitType??""),value_ar:""})}function H(t,n,u){const M=n?.sendPayload&&"object"==typeof n.sendPayload?n.sendPayload:{},N=String(n?.crNumber||M.crNumber||M.unifiedNo||"").trim();if(N)return N;const F=u??t?.selectedPolicyData;return String(F?.CR_NUMBER??F?.cr_number??F?.crNumber??"").trim()}},42049:(U,v,d)=>{function h(o){if(!o)return{visitTypeId:null,visitTypeName:"",visitTypeNameAr:""};const a=o.VisitTypeId??o.visitTypeId??o.visitTypeCode;return{visitTypeId:null!=a&&""!==a&&Number(a)>0?a:null,visitTypeName:String(o.VisitType??o.visitType??"").trim(),visitTypeNameAr:String(o.VisitType_AR??o.VisitTypeAr??o.visitType_ar??"").trim()}}function l(o,a,m){const D=[m?.data?.id,a.selectedBenefitTypeData?.id,a.visitTypeCode,o];let L=null;for(const T of D){if(null==T||""===T)continue;const P=Number(T);if(!Number.isNaN(P)&&P>0){L=T;break}}return{visitTypeId:L??(o||null),visitTypeName:String(m?.data?.name??m?.value_en??a.selectedBenefitTypeData?.name??a.visitType??"").trim(),visitTypeNameAr:String(m?.data?.name_ar??m?.value_ar??a.selectedBenefitTypeData?.name_ar??"").trim()}}function p(o,a="en"){const{visitTypeName:m,visitTypeNameAr:D}=h(o);return String(a).toLowerCase().startsWith("ar")?D||m||"-":m||D||"-"}d.d(v,{XA:()=>p,_x:()=>l,pn:()=>h})},60448:(U,v,d)=>{d.d(v,{P:()=>p,p:()=>l});var h=d(4916);function l(o,a){if(!o||0===o.length)return[];let m;switch(a){case h.Tj.ALL:m=o;break;case h.Tj.ACTIVE:m=o.filter(D=>(0,h.$n)(D.policyStatus?.trim()||"")||(0,h.$n)(D.Status?.trim()||""));break;case h.Tj.EXPIRED:m=o.filter(D=>(0,h.OE)(D.policyStatus?.trim()||"")||(0,h.OE)(D.Status?.trim()||""));break;case h.Tj.CANCELLED:m=o.filter(D=>(0,h.a$)(D.policyStatus?.trim()||"")||(0,h.a$)(D.Status?.trim()||""));break;case h.Tj.UNDER_CANCEL:m=o.filter(D=>(0,h.pC)(D.policyStatus?.trim()||"")||(0,h.pC)(D.Status?.trim()||""));break;default:m=o}return m.sort((D,L)=>{const T=new Date(D.CREATION_DATE||D.commencementDate||0);return new Date(L.CREATION_DATE||L.commencementDate||0).getTime()-T.getTime()})}function p(o,a){return l(o,a).length}},65543:(U,v,d)=>{d.d(v,{PT:()=>m,W4:()=>p,Wk:()=>o,s1:()=>a,zq:()=>l});var h=d(56745);function l(D,L){return D.instant(`MY_SPACE.SME.CHI_STATUS.${L}`)}function p(D,L){if(!L)return null;const T=L.toLowerCase();return T.includes("\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0631\u0628\u0637")||T.includes("rejected")||T.includes("chi rejected")||L===l(D,h.tx.FAILED)?h.tx.FAILED:T.includes("\u062a\u0645 \u0627\u0644\u0631\u0628\u0637")||T.includes("approved")||T.includes("chi approved")||L===l(D,h.tx.APPROVED)?h.tx.APPROVED:T.includes("\u062c\u0627\u0631\u064a \u0627\u0644\u0631\u0628\u0637")||T.includes("pending")||L===l(D,h.tx.PENDING)?h.tx.PENDING:null}function o(D,L){const T=p(D,L);return T?l(D,T):L}function a(D,L){const T=p(D,L);return T===h.tx.FAILED?"color-error background-tint-red":T===h.tx.APPROVED?"color-success background-tint-green":T===h.tx.PENDING?"color-warning background-tint-orange":""}function m(D,L){return p(D,L)===h.tx.PENDING}},75759:(U,v,d)=>{d.d(v,{bz:()=>_,W4:()=>s.W4,s1:()=>s.s1,Wk:()=>s.Wk,kg:()=>N,zq:()=>s.zq,PT:()=>s.PT,fW:()=>M,aU:()=>e.Jw,nU:()=>I,AU:()=>C,Wo:()=>T,YS:()=>g,SN:()=>E,U_:()=>y}),d(60448);var l=d(56745);function T(A,f){return f?.id??A}function E(A,f){return f?.policy_number??f?.policyNumber??A}function C(A,f){return f?.CLAM_NO??f?.claimNo??f?.claim_no??A}function g(A){return A}function y(A,f){return f}var e=d(29776),s=(d(90557),d(40668),d(65543));function _(A,f){const W=j=>!f&&(A.features?.find(V=>V.feature===j)?.enable??!1);return{delete_driver:W("delete_driver"),add_driver:W("add_driver"),delete_vehicle:W("delete_vehicle"),add_vehicle:W("add_vehicle"),cancel_policy:W("cancel_policy"),add_covers:W("add_covers")}}var S=d(34941);function I(A,f,W,j){if(f||"ar"!==W||!A)return function O(A,f,W){const j=A||"",w=f||"";return"ar"===W?w||j:j||w}(A,f,W);const w=(0,S.NG)(A),V=S.l4[w];if(V)return j.instant(V);const G=Object.entries(S.l4).find(([Y])=>w.includes(Y)||Y.includes(w));return G?j.instant(G[1]):A}var H=d(3757);const B=new Set([l.kB.VIEW_COVERAGE_BENEFITS,l.kB.CHECK_PRE_AUTHORIZATION,l.kB.DOWNLOAD_ECARD]),t=["s
1audi family","Saudi Family","saudi family health","saudi family policy","Saudi Family Health","Saudi Family Policy","saudi family health policy","saudi family-oriented","saudi family oriented","saudi_family_oriented"];function u(A){const f=function n(A){return String(A??"").trim().toLowerCase().replace(/[_-]+/g," ").replace(/\s+/g," ")}(A);return!!f&&t.some(W=>f.includes(W))}function M(A){return!!A&&[A.policyInsuranceType,A.Insurancetype].some(u)}function N(A){return M(A)?H.D1.filter(f=>!B.has(f.id)):H.D1}d(96621)},78478:(U,v,d)=>{d.d(v,{f:()=>E});var h=d(21413),l=d(71985),p=d(18810),o=d(99437),a=d(3031),m=d(46006),D=d(38109),L=d(16917),T=d(23214),P=d(73165);let E=(()=>{class C{http;apigeeHttp;commonMyspace;STORAGE_KEY=D.RM.HEALTH_SME_SERVICE_SESSION;STORAGE_KEY_HEALTH_SME_ENDORSEMENT=D.RM.HEALTH_SME_ENDORSEMENT_SESSION;baseurl="/v1/art/b2c-health-endorsement/";httpOptions={withCredentials:!0};get currentLang(){return localStorage.getItem("currentLanguage")||localStorage.getItem("lang")||"ar"}refreshData=new h.B;companyDataSet=new h.B;storageData={};constructor(r,i,g){this.http=r,this.apigeeHttp=i,this.commonMyspace=g,this.loadStorageData()}loadStorageData(){try{const r=localStorage.getItem(this.STORAGE_KEY);this.storageData=r?JSON.parse(r):{}}catch(r){console.error("Error loading storage data:",r),this.storageData={}}}getStorageData(){return this.storageData}updateStorageData(r){try{this.storageData={...this.storageData,...r},localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.storageData))}catch(i){console.error("Error updating storage data:",i)}}clearStorageData(){this.storageData={},localStorage.removeItem(this.STORAGE_KEY)}getMembersList(r){const i=a.jF.MEMBERS.LIST.replace(":policyId",r);return this.http.get(i).pipe((0,o.W)(this.handleError))}getMemberDetails(r,i){if("object"==typeof r||r&&!i)return this.getMemberDetailsYakeen(r);const g=a.jF.MEMBERS.DETAIL.replace(":policyId",r).replace(":memberId",i);return this.http.get(g).pipe((0,o.W)(this.handleError))}addMember(r){return this.http.post(a.jF.MEMBERS.ADD,r).pipe((0,o.W)(this.handleError))}updateMember(r,i){if("string"==typeof r){const g=a.jF.MEMBERS.UPDATE.replace(":memberId",r);return this.http.put(g,i).pipe((0,o.W)(this.handleError))}return this.apigeeHttp.post(a.jF.ENDORSEMENT.UPDATE_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}deleteMember(r){return this.http.post(a.jF.MEMBERS.DELETE,r).pipe((0,o.W)(this.handleError))}bulkUploadMembers(r,i){const g=new FormData;return g.append("file",r),g.append("policyId",i),this.http.post(a.jF.MEMBERS.BULK_UPLOAD,g).pipe((0,o.W)(this.handleError))}validateBulkUpload(r){return this.http.post(a.jF.MEMBERS.BULK_VALIDATE,{members:r}).pipe((0,o.W)(this.handleError))}downloadBulkUploadTemplate(){return this.http.get(a.jF.TEMPLATES.BULK_UPLOAD,{responseType:"blob"}).pipe((0,o.W)(this.handleError))}bulkUploadFile(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.BULK_ADD_MEMBER_FILE,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}downloadBulkTemplate(r){const i=`${a.jF.ENDORSEMENT.DOWNLOAD_BULK_TEMPLATE_PLAN}?plan_id=${encodeURIComponent(r)}`;this.apigeeHttp.get(i,{responseType:"blob",withCredentials:!0}).pipe((0,o.W)(this.handleError)).subscribe({next:g=>{this.commonMyspace.setLoadingGlobal(!1);const e=new Blob([g],{type:"application/sheet"}),c=window.URL.createObjectURL(e),b=document.createElement("a");b.href=c,b.download="Health_SME_Bulk_Upload_Excel_Template.xlsx",b.click(),window.URL.revokeObjectURL(c)},error:()=>{this.commonMyspace.setLoadingGlobal(!1),console.error("Failed to download bulk template")}})}exportMembersList(r){const i=a.jF.MEMBERS.EXPORT.replace(":policyId",r);return this.http.get(i,{responseType:"blob"}).pipe((0,o.W)(this.handleError))}upgradeMember(r){return this.http.post(a.jF.OPERATIONS.UPGRADE,r).pipe((0,o.W)(this.handleError))}downgradeMember(r){return this.http.post(a.jF.OPERATIONS.DOWNGRADE,r).pipe((0,o.W)(this.handleError))}getDependentsList(r){const i=a.jF.DEPENDENTS.LIST.replace(":memberId",r);return this.http.get(i).pipe((0,o.W)(this.handleError))}addDependent(r){return this.http.post(a.jF.DEPENDENTS.ADD,r).pipe((0,o.W)(this.handleError))}validateDependentEska(r){return this.http.post(a.jF.DEPENDENTS.VALIDATE_ESKA,{nationalId:r}).pipe((0,o.W)(this.handleError))}getAllYakeenDependent(r){return this.apigeeHttp.post(a.jF.YAKEEN.GET_DEPENDENT_IQAMA,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getAllYakeenDependentNid(r){return this.apigeeHttp.post(a.jF.YAKEEN.GET_DEPENDENT_NID,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getMemberDetailsYakeen(r){return this.apigeeHttp.post(a.jF.YAKEEN.GET_MEMBER_DETAILS,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}createEndorsement(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.CREATE,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}addManualMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.ADD_MANUAL_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}addEskaMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.ADD_ESKA_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}editMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.EDIT_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}calculateEndorsementAmount(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.CALCULATE_AMOUNT,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getMemberPremium(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.GET_PREMIUM,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getEndorsementMemberList(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.MEMBER_LIST,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}submitMedicalDeclaration(r){return this.http.post(a.jF.MEDICAL.SUBMIT,r).pipe((0,o.W)(this.handleError))}uploadMedicalDocuments(r,i){const g=new FormData;return r.forEach((e,c)=>g.append(`file${c}`,e)),g.append("memberId",i),this.http.post(a.jF.MEDICAL.UPLOAD_DOCS,g).pi
1pe((0,o.W)(this.handleError))}getMedicalQuestions(r="ar"){return this.http.get(`${a.jF.MEDICAL.GET_QUESTIONS}?lang=${r}`).pipe((0,o.W)(this.handleError))}calculateUpgradePremium(r){return this.http.post(a.jF.PREMIUM.CALCULATE_UPGRADE,r).pipe((0,o.W)(this.handleError))}calculateDowngradePremium(r){return this.http.post(a.jF.PREMIUM.CALCULATE_DOWNGRADE,r).pipe((0,o.W)(this.handleError))}calculateAddMemberPremium(r){return this.http.post(a.jF.PREMIUM.CALCULATE_ADD_MEMBER,r).pipe((0,o.W)(this.handleError))}initiatePayment(r){return this.http.post(a.jF.PAYMENT.INITIATE,r).pipe((0,o.W)(this.handleError))}trackPaymentRequest(r){const i=a.jF.PAYMENT.TRACK.replace(":requestId",r);return this.http.get(i).pipe((0,o.W)(this.handleError))}verifyPayment(r){return this.http.post(a.jF.PAYMENT.VERIFY,{paymentId:r}).pipe((0,o.W)(this.handleError))}sendEndorsementOtp(r){return this.http.post(a.jF.OTP.SEND,r).pipe((0,o.W)(this.handleError))}verifyEndorsementOtp(r,i){return this.http.post(a.jF.OTP.VERIFY,{otp:r,requestId:i}).pipe((0,o.W)(this.handleError))}getIdType(r){const i=r.toString();return i.startsWith("1")?1:i.startsWith("2")?2:(i.startsWith("3"),3)}validateNationalId(r){return this.http.post(a.jF.VALIDATION.NATIONAL_ID,{nationalId:r}).pipe((0,o.W)(this.handleError))}validateIban(r){return this.http.post(a.jF.VALIDATION.IBAN,{iban:r}).pipe((0,o.W)(this.handleError))}submitEndorsement(r){return this.http.post(a.jF.PAYMENT.INITIATE,r).pipe((0,o.W)(this.handleError))}endorsementGetDeleteReasons(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.GET_DELETE_REASONS,{majorCode:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}uploadMDFFile(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.UPLOAD_DOC,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}createendorsment(r){return this.createEndorsement(r)}getBorderList(r){return this.getEndorsementMemberList(r)}saveIban(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.SAVE_IBAN,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}removeMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.REMOVE_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}endorsementDeleteMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.DELETE_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}addmemberEska(r){return this.addEskaMember(r)}calculatePremium(r){return this.calculateEndorsementAmount(r)}submitDeleteEndorsement(r,i){return this.apigeeHttp.post(a.jF.ENDORSEMENT.SUBMIT_DELETE,{ref_no:r,language:i},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}addDependentManually(r){return this.apigeeHttp.post(a.jF.DEPENDENTS.ADD_MANUALLY,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getPolicyDetails(r){return this.apigeeHttp.post(a.jF.POLICY.DETAILS,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getClass(r){return this.apigeeHttp.post(a.jF.POLICY.GET_CLASS_IDS,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getBenefit(r){return this.apigeeHttp.post(a.jF.POLICY.GET_BENEFIT,{lang:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getPlans(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.PLANS,{search_type:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}downloadPolicy(r){const i=a.jF.POLICY.DOWNLOAD,g={responseType:"blob",withCredentials:!0};return new l.c(y=>{this.apigeeHttp.post(i,r,g).pipe((0,o.W)(e=>(y.error(e),this.handleError(e)))).subscribe({next:e=>{try{const c="Health_SME_POLICY.pdf",b=new Blob([e],{type:"application/pdf"}),s=document.createElement("a"),_=window.URL.createObjectURL(b);s.href=_,s.download=c,s.click(),window.URL.revokeObjectURL(_),y.next(!0),y.complete()}catch(c){y.error(c)}},error:e=>{console.error("Error downloading policy:",e),y.error(e)}})})}ESKAUpdateMember(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.ESKA_UPDATE_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}summary(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.SUMMARY,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}updateInstance(r,i,g,y){const e=a.jF.ENDORSEMENT.UPDATE_INSTANCE,c={ref_no:r,language:i};return void 0!==g&&(c.is_negative_premium=g),void 0!==y&&(c.endorsement_type=y),this.apigeeHttp.post(e,c,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getNewlyAddedHealthMembers(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.MEMBER_LIST,{quote_id:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getMDFQuestion(r){return this.apigeeHttp.post(a.jF.MEDICAL.GET_MDF,{reference_number:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}saveMDF(r){return this.apigeeHttp.post(a.jF.MEDICAL.SAVE_MDF,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}saveMDFESKA(r){return this.apigeeHttp.post(a.jF.ENDORSEMENT.SAVE_MDF_ESKA,{quote_id:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getMDFFiles(r){return this.apigeeHttp.post(a.jF.MEDICAL.GET_MDF_FILES,{reference_number:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}deleteMDFFile(r){return this.apigeeHttp.post(a.jF.MEDICAL.DELETE_MDF_FILE,{nodeId:r,journey:"endorsement"},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getNSTPMembers(r){return this.apigeeHttp.post(a.jF.MEDICAL.NSTP_MEMBER,{quote_id:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}saveNSTMember(r){return this.apigeeHttp.post(a.jF.MEDICAL.SAVE_NSTP_MEMBER,r,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getProfileDetails(r){const i=a.jF.PROFILE.GET.replace(":referenceId",r);return this.apigeeHttp.get(i,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}updateProfile(r,i){const g=a.jF.PROFILE.UPDATE.replace(":referenceId",r);return this.apigeeHttp.post(g,i,{withCredentials:!0}).pipe((0,o.W)(this.handleError))}getDelegatorList(r){return this.apigeeHttp.post(a.jF.DELEGATORS.LIST,{cr_no:r},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}addDelegator(r){return this.apigeeHttp.post(a.jF.DELEGATORS.ADD,{name:r.name,id_no:r.nationalId,mobile_no:r.mobileNumber,cr_no:r.crNumber},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}deleteDelegator(r,i,g){return this.apigeeHttp.post(a.jF.DELEGATORS.REMOVE,{id_no:r,cr_no:i},{withCredentials:!0}).pipe((0,o.W)(this.handleError))}handleError(r){return console.error("Health SME Service Error:",r),(0,p.$)(()=>r)}static \u0275fac=function(i){return new(i||C)(T.KVO(P.Qq),T.KVO(m.J),T.KVO(L.l))};
1static \u0275prov=T.jDH({token:C,factory:C.\u0275fac,providedIn:"root"})}return C})()},90557:(U,v,d)=>{d.d(v,{As:()=>o,Bm:()=>E,Fv:()=>L,Pr:()=>D,Qd:()=>a,Te:()=>P,X_:()=>T,pn:()=>p.pn,vd:()=>C});var h=d(38109),l=d(10404),p=d(42049);const o="healthClaimTrackingData",a="claimsActiveTabIndex",m=1;function D(R){const{submittedMemberNationalId:r,storage:i,mode:g}=R;if(r?.trim())return r.trim();const y=typeof sessionStorage<"u"?sessionStorage.getItem("claimMemberNationalId")||sessionStorage.getItem("unifiedNo"):null;if(y?.trim())return y.trim();if("individual"===g){const e=String(i.GetValue(h.RM.NATIONAL_ID)||"").trim();if(e)return e}if(typeof localStorage>"u")return"";try{const e=JSON.parse(localStorage.getItem("user")||"{}");return String(e?.nationalId??e?.idValue??e?.nationalID??"").trim()}catch{return""}}function L(R,r){if(r)return R.find(i=>String(i?.CLAM_NO??"")===String(r)||String(i?.ClaimID??"")===String(r))}function T(R,r,i,g,y){const e=y;r.Setvalue(o,{selectedClaim:e});const c=String(e.PolicyID??""),b=String(e.ClaimID??e.claimId??"");if(!c||!b)return!1;const s="sme"===g?l.B.SME_HEALTH_CLAIM_DETAIL(c,b):l.B.INDIVIDUAL_HEALTH_CLAIM_DETAIL(c,b);return R.navigateByUrl(i.translateRoute(s)),!0}function P(R,r,i,g){if("sme"===g)return r.Setvalue(a,m),void R.navigateByUrl(i.translateRoute(l.B.SME_FINANCE_CENTER_CLAIMS));R.navigateByUrl(i.translateRoute(l.B.INDIVIDUAL_CLAIMS_LIST_ALL))}function E(R,r,i){const g=R.GetValue(r)||{},y=g.claims||{},e=Array.isArray(y.motor)?y.motor:[],c=Array.isArray(y.travel)?y.travel:[],b=Array.isArray(y.cyber)?y.cyber:[],s=Array.isArray(y.mmp)?y.mmp:[],_=Array.isArray(y.home)?y.home:[],S=Array.isArray(y.domesticWorker)?y.domesticWorker:[],O=[...e,...i,...c,...b,...s,..._,...S];R.Setvalue(r,{...g,claims:{...y,health:i,allclaims:O,fullLength:O.length}})}function C(R,r,i,g){P(R,r,i,g)}},96621:(U,v,d)=>{d.d(v,{Bx:()=>E,wg:()=>g,ls:()=>C}),d(3031);var P=d(44602);function E(t,n="en"){return"ar"===n&&t.fullNameAr?t.fullNameAr:t.fullName}function C(t){return t.status===P.F.ACTIVE}function g(t){return{[P.F.ACTIVE]:"status-success",[P.F.INACTIVE]:"status-danger",[P.F.PENDING]:"status-warning",[P.F.SUSPENDED]:"status-warning",[P.F.DELETED]:"status-danger",[P.F.PENDING_APPROVAL]:"status-info",[P.F.PENDING_PAYMENT]:"status-warning"}[t]||"status-default"}}}]);
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.