1import{a as R}from"./chunk-7AJKFOEE.js";import{a as W}from"./chunk-OFX755BC.js";import{c as Q,d as U,e as $,i as q}from"./chunk-JCPUWVFC.js";import{a as k,b as M}from"./chunk-XNXLFDZX.js";import{a as H}from"./chunk-N6W3AF2G.js";import{b as j,d as L,e as G}from"./chunk-JLWCQ6UT.js";import{V as A}from"./chunk-P4C42LQP.js";import{l as w,m as O,u as V,w as F}from"./chunk-Z7IUSDSQ.js";import{Fa as v,Je as t,Kd as x,Ke as n,Le as c,Pe as y,Ra as E,Vf as a,Xf as o,Yf as _,ff as b,hf as f,ic as P,ig as T,kb as h,lb as I,pe as m,vf as C,vg as r,wf as D,wg as l,xf as N,xg as S,zc as i}from"./chunk-SRTQBDBP.js";import{a as J}from"./chunk-EJD3L6HM.js";import{g as z}from"./chunk-T7NDVU76.js";var B=z(J());var K=["closeButton"];function X(s,u){if(s&1){let e=y();t(0,"img",11),b("error",function(){h(e);let p=f();return I(p.offer.image="assets/images/dynamic/offers/2-1.jpg.jpeg")}),n()}if(s&2){let e=f();m("src",e.offer==null?null:e.offer.image,P)}}function Y(s,u){s&1&&c(0,"img",12)}function Z(s,u){if(s&1&&(t(0,"div",26),c(1,"img",27),t(2,"span",28),a(3),r(4,"translate"),n()()),s&2){let e=f(2);i(3),_("",l(4,2,"Shared.offerExpirationDate")," : ",e.offer==null?null:e.offer.offersDateTo,"")}}function ee(s,u){if(s&1&&(t(0,"div",32),a(1),n()),s&2){let e=u.$implicit;i(),o(" ",e.promotionDescription," ")}}function te(s,u){if(s&1&&(t(0,"div",29)(1,"div",30),x(2,ee,2,1,"div",31),n()()),s&2){let e=f(2);i(2),m("ngForOf",e.package.promotionOfferList)}}function ie(s,u){if(s&1){let e=y();t(0,"diV")(1,"div",13)(2,"div",14)(3,"div",15),a(4),n(),x(5,Z,5,4,"div",16),n()(),x(6,te,3,1,"div",17),t(7,"div",18)(8,"table",19)(9,"div",20),c(10,"img",21),t(11,"div",22),a(12),r(13,"translate"),n(),t(14,"div",22),a(15),n()(),t(16,"div",20),c(17,"img",21),t(18,"div",22),a(19),r(20,"translate"),n(),t(21,"div",22),a(22),r(23,"fixedNumber"),r(24,"number"),t(25,"span"),a(26),r(27,"translate"),n()()(),t(28,"div",20),c(29,"img",21),t(30,"div",22),a(31),r(32,"translate"),n(),t(33,"div",22),a(34),n()(),t(35,"div",20),c(36,"img",21),t(37,"div",22),a(38),r(39,"translate"),n(),t(40,"div",22),a(41),n()(),t(42,"div",20),c(43,"img",21),t(44,"div",22),a(45),r(46,"translate"),n(),t(47,"div",22),a(48),r(49,"fixedNumber"),r(50,"number"),t(51,"span"),a(52),r(53,"translate"),n()()(),t(54,"div",20),c(55,"img",21),t(56,"div",22),a(57),r(58,"translate"),n(),t(59,"div",22),a(60),r(61,"fixedNumber"),r(62,"number"),t(63,"span"),a(64),r(65,"translate"),n()()()()(),t(66,"div",23)(67,"button",24),b("click",function(){h(e);let p=f();return I(p.startHourlySteps(p.package))}),a(68),r(69,"translate"),n(),t(70,"button",25,0),a(72),r(73,"translate"),n()()()}if(s&2){let e=f();i(4),o(" ",e.offer.offerName," "),i(),m("ngIf",e.offer==null?null:e.offer.offersDateTo),i(),m("ngIf",(e.package==null||e.package.promotionOfferList==null?null:e.package.promotionOfferList.length)>=1),i(6),o(" ",l(13,20,"PackageProperties.displayName")," : "),i(3),o(" ",e.package==null?null:e.package.displayName," "),i(4),o(" ",l(20,22,"PackageProperties.packagePrice")," : "),i(3),o(" ",S(24,26,l(23,24,e.package==null?null:e.package.packagePrice),"1.1-2")," "),i(4),o(" ",l(27,29,"hourly.sar")," "),i(5),o(" ",l(32,31,"resourceGroupName")," : "),i(3),o(" ",e.package==null?null:e.package.resourceGroupName," "),i(4),o(" ",l(39,33,"PackageProperties.employeeNumberName")," : "),i(3),o(" ",e.package==null?null:e.package.employeeNumberName," "),i(4),o(" ",l(46,35,"PackageProperties.vatAmount")," : "),i(3),o(" ",S(50,39,l(49,37,e.package==null?null:e.package.vatAmount),"1.1-2")," "),i(4),o(" ",l(53,42,"hourly.sar")," "),i(5),o(" ",l(58,44,"PackageProperties.finalPrice")," : "),i(3),o(" ",S(62,48,l(61,46,e.package==null?null:e.package.finalPrice),"1.1-2")," "),i(4),o(" ",l(65,51,"hourly.sar")," "),i(4),o(" ",l(69,53,"acceptOffer")," "),i(4),o(" ",l(73,55,"close")," ")}}function ne(s,u){if(s&1&&(t(0,"div",40),c(1,"img",27),t(2,"span",28),a(3),r(4,"translate"),n()()),s&2){let e=f(2);i(3),_("",l(4,2,"Shared.offerExpirationDate")," : ",e.offer==null?null:e.offer.offersDateTo,"")}}function ae(s,u){if(s&1&&(t(0,"div",41)(1,"div",42),a(2),r(3,"translate"),r(4,"fixedNumber"),r(5,"number"),n(),t(6,"div",42),a(7),r(8,"translate"),n()()),s&2){let e=f(2);i(2),_(" ",l(3,3,"hourly.discount")," ",S(5,7,l(4,5,e.package==null?null:e.package.discount),"1.1-2")," "),i(5),o(" ",l(8,10,"hourly.sar")," ")}}function re(s,u){s&1&&(t(0,"div",22),a(1),r(2,"translate"),n()),s&2&&(i(),o(" ",l(2,1,"PackageProperties.professionGroupName")," : "))}function oe(s,u){if(s&1){let e=y();t(0,"diV",33)(1,"div")(2,"div",14)(3,"div",34),a(4),n(),x(5,ne,5,4,"div",35),n(),x(6,ae,9,12,"div",36),n(),t(7,"div",37)(8,"table",19)(9,"div",20),c(10,"img",21),t(11,"div",22),a(12),r(13,"translate"),n(),t(14,"div",22),a(15),n()(),t(16,"div",20),c(17,"img",21),t(18,"div",22),a(19),r(20,"translate"),n(),t(21,"div",22),a(22),r(23,"fixedNumber"),r(24,"number"),t(25,"span"),a(26),r(27,"translate"),n()()(),t(28,"div",20),c(29,"img",21),t(30,"div",22),a(31),r(32,"translate"),n(),t(33,"div",22),a(34),n()(),t(35,"div",20),c(36,"img",21),x(37,re,3,3,"div",38),t(38,"div",22),a(39),n()(),t(40,"div",20),c(41,"img",21),t(42,"div",22),a(43),r(44,"translate"),n(),t(45,"div",22),a(46),r(47,"fixedNumber"),r(48,"number"),t(49,"span"),a(50),r(51,"translate"),n()()(),t(52,"div",20),c(53,"img",21),t(54,"div",22),a(55),r(56,"translate"),n(),t(57,"div",22),a(58),r(59,"fixedNumber"),r(60,"number"),t(61,"span"),a(62),r(63,"translate"),n()()(),t(64,"div",20),c(65,"img",21),t(66,"div",22),a(67),r(68,"translate"),n(),t(69,"div",22),a(70),r(71,"fixedNumber"),r(72,"number"),t(73,"span"),a(74),r(75,"translate"),n()()()()(),t(76,"div",39)(77,"button",24),b("click",function(){h(e);let p=f();
1return I(p.chooseIndividualoffer(p.offer.pricingId))}),a(78),r(79,"translate"),n(),t(80,"button",25,0),a(82),r(83,"translate"),n()()()}if(s&2){let e=f();i(4),o(" ",e.offer.offerName," "),i(),m("ngIf",e.offer==null?null:e.offer.offersDateTo),i(),m("ngIf",(e.package==null?null:e.package.discount)||(e.package==null?null:e.package.discount)>0),i(6),o(" ",l(13,23,"PackageProperties.displayName")," : "),i(3),o(" ",e.package==null?null:e.package.packageDisplayName," "),i(4),o(" ",l(20,25,"PackageProperties.packagePrice")," : "),i(3),o(" ",S(24,29,l(23,27,e.package==null?null:e.package.packagePrice),"1.1-2")," "),i(4),o(" ",l(27,32,"hourly.sar")," "),i(5),o(" ",l(32,34,"resourceGroupName")," : "),i(3),o(" ",e.package==null?null:e.package.resourceGroupName," "),i(3),m("ngIf",e.package==null?null:e.package.professionGroupName),i(2),o(" ",e.package==null?null:e.package.professionGroupName," "),i(4),o(" ",l(44,36,"PackageProperties.vatAmount")," : "),i(3),o(" ",S(48,40,l(47,38,e.package==null?null:e.package.vatAmount),"1.1-2")," "),i(4),o(" ",l(51,43,"hourly.sar")," "),i(5),o(" ",l(56,45,"PackageProperties.finalPriceBeforeVat")," : "),i(3),o(" ",S(60,49,l(59,47,e.package==null?null:e.package.finalPriceBeforeVat),"1.1-2")," "),i(4),o(" ",l(63,52,"hourly.sar")," "),i(5),o(" ",l(68,54,"PackageProperties.finalPriceToPay")," : "),i(3),o(" ",S(72,58,l(71,56,e.package==null?null:e.package.finalPriceToPay),"1.1-2")," "),i(4),o(" ",l(75,61,"hourly.sar")," "),i(4),o(" ",l(79,63,"acceptOffer")," "),i(4),o(" ",l(83,65,"close")," ")}}var Pe=(()=>{class s{constructor(){this.subscriptions=[],this.langService=v(H),this.sessionStorageService=v(M),this.hourlyService=v(W),this.stepsService=v(U),this.navigatorService=v($),this.router=v(A),this.translateService=v(j),this.sharedService=v(q),this.lang=this.langService.getCurrentLang()}ngOnDestroy(){this.closeButton?.nativeElement?.click(),this.subscriptions.forEach(d=>d.unsubscribe());let e=document.querySelector(".modal-backdrop");e&&e.remove(),document.body.classList.remove("modal-open"),document.body.style.overflow="",document.body.style.paddingRight=""}removeDraftFromSessionStorage(){this.sessionStorageService.removeItem("draft")}getExtraDataToNavigateNext(e){return{queryParams:{sid:e?.serviceId,pid:e?e.selectedHourlyPricingId:null},state:{package:e||null}}}setServiceTypeInSessionStorage(e){this.sessionStorageService.ServiceType=e}getFirstStepContractIdParameter(e){return`{'ServiceId':'${e?.serviceId}','SelectedPricingId':'${e?.selectedHourlyPricingId}','FromOffer':true}`}getFirstStepByPackageAndExtraData(e,d){let p;this.subscriptions.push(this.stepsService.getFirstStep(2,this.getFirstStepContractIdParameter(e)).subscribe({next:g=>{p=g,this.navigatorService.navigateToStep(p,d)},error:g=>{this.displayErrorMessageAndNavigateToHourlyContractsDetails(g)}}))}navigateToNext(e){this.sessionStorageService._pd=e,e&&this.removeDraftFromSessionStorage();let d=this.getExtraDataToNavigateNext(e);this.hourlyService.steps.next(!0),this.setServiceTypeInSessionStorage(2),this.getFirstStepByPackageAndExtraData(e,d)}removeStepInfoFromSessionStorage(){this.sessionStorageService.removeItem(k.currentStep),this.sessionStorageService.removeItem(k.stepId),this.sessionStorageService.removeItem(k.indvContractObject)}checkIfUserIsAuthenticated(){return!!this.sessionStorageService.crmUserId}chooseIndividualoffer(e){if(this.closeButton?.nativeElement?.click(),this.removeStepInfoFromSessionStorage(),this.sessionStorageService.ServiceType=Q.IndividualOffer,!this.checkIfUserIsAuthenticated()){this.displayNotAuthErrorMessage(e);return}this.getFirstStepForOffers(e)}setFirstStepInfo(e){this.stepId=e?.stepId,this.sessionStorageService.stepId=e?.stepId,this.sessionStorageService.currentStep=e?.action,this.sessionStorageService.indvContractObject.individualPricing=this.package}openNextStep(e){this.sharedService.openNextStep({stepDetailsVm:e,stepId:e?.stepId})}getFirstStepForOffers(e){this.sessionStorageService.pricingId=e,this.subscriptions.push(this.stepsService.getFirstStep(4,`{'PricingId':'${e}','IndividualPromotionId':'${this.offer.individualDiscountId}'}`).subscribe(d=>{this.setFirstStepInfo(d),this.openNextStep(d)}
1)),this.sessionStorageService.setIndividualPricingInSessionStorageData(this.package)}navigateToAuthWithQueryParams(e){this.router.navigate(["/auth"],{queryParams:e})}getCheckAuthenticationMessageData(e){return{title:e.shouldLoginBeforeContinue,showDenyButton:!0,confirmButtonText:e.signIn,denyButtonText:e.cancel,icon:"info"}}displayNotAuthErrorMessage(e){this.subscriptions.push(this.translateService.get(["shouldLoginBeforeContinue","signIn","cancel","warning","yourChangesWillNotBeSaved"]).subscribe(d=>{B.default.fire(this.getCheckAuthenticationMessageData(d)).then(p=>{if(p.isConfirmed){let g={returnUrl:this.router.url};e&&(g.extra=encodeURIComponent(JSON.stringify({queryParams:{autoPricingId:e}}))),this.navigateToAuthWithQueryParams(g)}else p.isDenied})}))}displayErrorMessageAndNavigateToHourlyContractsDetails(e){B.default.fire({title:e.message,icon:"warning",confirmButtonText:this.lang=="ar"?"\u0645\u0648\u0627\u0641\u0642":"ok"}).then(()=>{e.data&&this.router.navigate(["/dashboard/hourly_contracts/details/"+e.data])})}startHourlySteps(e=null){this.closeButton?.nativeElement?.click(),this.navigateToNext(e)}static{this.\u0275fac=function(d){return new(d||s)}}static{this.\u0275cmp=E({type:s,selectors:[["app-offer-details"]],viewQuery:function(d,p){if(d&1&&C(K,5),d&2){let g;D(g=N())&&(p.closeButton=g.first)}},inputs:{package:"package",offer:"offer"},standalone:!0,features:[T],decls:10,vars:4,consts:[["closeButton",""],["id","offerDetail","data-bs-backdrop","static","data-bs-keyboard","false","tabindex","-1","aria-labelledby","staticBackdropLabel","aria-hidden","div",1,"modal","fade"],[1,"modal-dialog","modal
1-dialog-centered"],[1,"modal-content"],[1,"modal-body","p-0"],[1,"d-flex","justify-content-end","align-items-end","position-absolute","closeBtnCont"],[1,"d-flex","justify-content-center","h-100","mb-24","offersImage"],["class","img-fluid",3,"src","error",4,"ngIf"],["src","assets/images/dynamic/offers/2-1.jpg.jpeg","class","img-fluid",4,"ngIf"],[4,"ngIf"],["class","container",4,"ngIf"],[1,"img-fluid",3,"error","src"],["src","assets/images/dynamic/offers/2-1.jpg.jpeg",1,"img-fluid"],[1,""],[1,"d-flex","flex-column"],[1,"textMain","fs-24","f-w-regular"],["class","d-flex gap-2 align-items-center mt-1",4,"ngIf"],["class","mt-12",4,"ngIf"],[1,"mt-3"],[1,"table","w-100","d-flex","flex-column","gap-2"],[1,"d-flex","gap-1","text-black","fs-16","f-w-regular","flex-wrap"],["src","assets/images/core/alert-danger.svg"],[1,"text-black","fs-16","f-w-regular"],[1,"d-flex","justify-content-center","flex-column","align-items-center","flex-md-row","gap-4"],[1,"btn","main-button","fs-16","f-w-bold",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","secondary-button","fs-16","f-w-bold","px-3"],[1,"d-flex","gap-2","align-items-center","mt-1"],["src","assets/images/core/calendar-secondary.svg","width","16","height","16"],[1,"fs-14","fw-bold","textSecondary"],[1,"mt-12"],[1,"d-flex","flex-row","flex-wrap","gap-2"],["class","textSecondary fs-16 f-w-bold offerBorder",4,"ngFor","ngForOf"],[1,"textSecondary","fs-16","f-w-bold","offerBorder"],[1,"container"],[1,"textMain","mb-2","fs-24","f-w-regular"],["class","d-flex gap-2 align-items-center mb-2",4,"ngIf"],["class","offer d-flex gap-1 mt-2 mb-3",4,"ngIf"],[1,"mt-1"],["class","text-black fs-16 f-w-regular",4,"ngIf"],[1,"d-flex","justify-content-center","align-items-center","flex-column","flex-md-row","pt-2","gap-4"],[1,"d-flex","gap-2","align-items-center","mb-2"],[1,"offer","d-flex","gap-1","mt-2","mb-3"],[1,"f-w-regular","fs-16"]],template:function(d,p){d&1&&(t(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),c(4,"div",5),t(5,"div",6),x(6,X,1,1,"img",7)(7,Y,1,0,"img",8),n(),x(8,ie,74,57,"diV",9)(9,oe,84,67,"diV",10),n()()()()),d&2&&(i(6),m("ngIf",p.offer==null?null:p.offer.image),i(),m("ngIf",!(p.offer!=null&&p.offer.image)),i(),m("ngIf",(p.offer==null?null:p.offer.offerSector)==1),i(),m("ngIf",(p.offer==null?null:p.offer.offerSector)==2))},dependencies:[G,L,F,w,O,V,R],styles:[".offersImage[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:400px}"]})}}return s})();export{Pe as a};
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.