PageSourceSearch

https://app.eop.bg/2365.0072340b34831c5e.js

js eop.bg collected 2026-09-25 15:07:47 UTC 348,555 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknx1=self.webpackChunknx1||[]).push([[2365],{68250:(Te,J,d)=>{d.d(J,{S:()=>X});var g=d(49969);const X=[(0,g.hZ)("animateSaving",[(0,g.wk)("inactive",(0,g.iF)({transform:"translateY(0)"})),(0,g.wk)("active",(0,g.iF)({transform:"translateY(-60px)"})),(0,g.kY)("inactive => active",(0,g.i0)("200ms ease-in")),(0,g.kY)("active => inactive",(0,g.i0)("300ms ease-in"))]),(0,g.hZ)("savedState",[(0,g.kY)("void => *",[(0,g.iF)({top:"100%"}),(0,g.i0)("300ms ease-in",(0,g.iF)({top:"0"}))]),(0,g.kY)("* => void",[(0,g.iF)({opacity:1}),(0,g.i0)("300ms ease-in",(0,g.iF)({opacity:1}))])])]},69306:(Te,J,d)=>{d.d(J,{s:()=>e});var g=d(73032),X=d(31594),T=d(54438);let e=(()=>{class A{static{this.\u0275fac=function(F){return new(F||A)}}static{this.\u0275mod=T.$C({type:A})}static{this.\u0275inj=T.G2t({imports:[g.Gg,X.CR]})}}return A})()},76147:(Te,J,d)=>{d.d(J,{W:()=>f});var g=d(71985),X=d(7673),T=d(25558),e=d(5964),A=d(96354),c=d(73703),_e=d(61594),F=d(88141),D=d(54438),te=d(20730),h=d(99964);let f=(()=>{class O{static{this.CreateTenderRoundParticipant="CreateTenderRoundParticipant"}constructor(v,N,H,Y,I){this.tenderStoreService=v,this.tenderProcessStoreService=N,this.principalPermissionService=H,this.offerStoreService=Y,this.tenderGuard=I,this.tenderId=null}canActivate(v,N){this.offerStoreService.initiateLoadSubmittedOffersStatus();const H=this.tenderGuard.canActivate(v.parent,N),Y=this.tenderStoreService.getCurrentTenderProcessPhase().pipe((0,T.n)(I=>this.tenderProcessStoreService.getProcessRound(I.TenderProcessRoundId)),(0,e.p)(I=>!!I),(0,A.T)(I=>this.principalPermissionService.getActionsForDifferentEntitiesToCheck([{mnemonicsToCheck:[O.CreateTenderRoundParticipant],entityId:I.EntityId,entityGuid:I.Guid}])),(0,T.n)(I=>this.principalPermissionService.hasPermissions(I)),(0,A.T)(I=>{this.canCreateTenderRoundParticipant=I[O.CreateTenderRoundParticipant]}),(0,c.u)(!0),(0,_e.$)());return H&&H instanceof g.c?H.pipe((0,T.n)(I=>I?Y.pipe((0,c.u)(I)):(0,X.of)(!1)),(0,F.M)(I=>{this.getPropertiesFromTenderGuard()})):Y.pipe((0,c.u)(H),(0,F.M)(I=>{this.getPropertiesFromTenderGuard()}))}getPropertiesFromTenderGuard(){this.tenderId=this.tenderGuard.tenderId,this.tender$=this.tenderGuard.tender$,this.canAddColleagueToTender=this.tenderGuard.canAddColleagueToTender,this.canRemoveColleagueFromTender=this.tenderGuard.canRemoveColleagueFromTender,this.canManageEmailNotifications=this.tenderGuard.canManageEmailNotifications,this.canManageColleagues=this.tenderGuard.canManageColleagues,this.tenderStoreService.setTenderIsLoaded()}static{this.\u0275fac=function(N){return new(N||O)(D.KVO(te.$gx),D.KVO(te.i_v),D.KVO(te.N49),D.KVO(te.fRX),D.KVO(h.U))}}static{this.\u0275prov=D.jDH({token:O,factory:O.\u0275fac})}}return O})()}
1,42365:(Te,J,d)=>{d.r(J),d.d(J,{TenderSupplierModule:()=>fl});var g=d(73032),X=d(31594),T=d(51188),e=d(54438),A=d(345),c=d(20730);let _e=(()=>{class n extends g.Vy{constructor(t,r,i,s){super(t,r,s),this.requirementsStoreService=i,this.localizationService=s,this.subscriptions=[]}ngOnInit(){}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.requirementsStoreService.setInitState(),super.ngOnDestroy()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(A.hE),e.rXU(e.c1b),e.rXU(c.$17),e.rXU(c.PiF))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier"]],inputs:{parentId:"parentId"},features:[e.Vt3],decls:1,vars:0,template:function(r,i){1&r&&e.nrm(0,"router-outlet")},dependencies:[T.n3],styles:["[_nghost-%COMP%]{display:flex;display:-ms-flexbox;flex-direction:column;width:100%;min-height:calc(100vh - 155px)}"]})}}return n})();var F=d(76147),D=d(99964);let te=(()=>{class n{constructor(t){this.tenderGuard=t}canActivate(t,r){return this.tenderGuard.showColleagues}static{this.\u0275fac=function(r){return new(r||n)(e.KVO(D.U))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac})}}return n})();var h=d(96354),f=d(5964),O=d(70274),M=d(23294),v=d(25558),N=d(16790);let H=(()=>{class n extends N.$G{static{this.BoxIdQueryParameter="boxId"}constructor(t,r,i,s,a,l,u){super(t),this.requirementsStoreService=r,this.tenderStoreService=i,this.boxStoreService=s,this.userService=a,this.route=l,this.title=u,this.subscriptions=[]}ngOnInit(){const t=this.route.paramMap.pipe((0,h.T)(s=>s.get("boxId")),(0,h.T)(s=>parseInt(s,10))).subscribe(s=>{this.requirementsStoreService.loadRequirements(s)});this.subscriptions.push(this.tenderStoreService.getCurrentTender().pipe((0,f.p)(s=>!!s),(0,O.H)(s=>this.userService.logView(s.Id,"ViewRequirements"))).subscribe()),this.subscriptions.push(t);const i=this.route.paramMap.pipe((0,h.T)(s=>s.get(n.BoxIdQueryParameter)),(0,h.T)(s=>parseInt(s,10)),(0,M.F)()).pipe((0,v.n)(s=>this.boxStoreService.getBoxById(s)));this.subscriptions.push(i.pipe((0,f.p)(s=>!!s),(0,h.T)(s=>s.Name),(0,M.F)()).subscribe(s=>this.title.setTitle(s)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.$17),e.rXU(c.$gx),e.rXU(c.o2P),e.rXU(c.DLc),e.rXU(T.nX),e.rXU(A.hE))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-requirement-box"]],features:[e.Vt3],decls:1,vars:0,template:function(r,i){1&r&&e.nrm(0,"router-outlet")},dependencies:[T.n3],styles:["[_nghost-%COMP%]{display:block;height:100%}"]})}}return n})();var Y=d(983),I=d(87083),j=d(61594),Ie=d(53993),ye=d(99437),S=d(56206),w=d(45312),Ce=d(84131),p=d(60177),k=d(85956),de=d(30528),je=d(87088),Z=d(59596),E=d(1776),Xe=d(24269),R=d(68018);function lt(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-table-of-content-card",5),e.bIt("selectSurveyLevel",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.selectSurvey(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.last,i=o.index,s=e.XpG(3);e.AVh("margin--bottom-10",!r),e.Y8G("parentId",s.getId(i))("surveyLevel",t)}}function ct(n,o){if(1&n&&(e.j41(0,"div",2)(1,"div",3),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,lt,1,4,"nx1-table-of-content-card",4),e.nI1(5,"async"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.BMQ("id",t.getLabelId("surveys")),e.R7$(),e.JRh(e.bMT(3,3,"str_Tender_surveys")),e.R7$(2),e.Y8G("ngForOf",e.bMT(5,5,t.surveyLevels$))}}function dt(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}function ut(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,ct,6,7,"div",1),e.nI1(2,"async"),e.DNE(3,dt,1,0,"nx1-requirements-empty-card",0),e.nI1(4,"async"),e.k0s()),2&n){let t,r;const i=e.XpG();e.R7$(),e.Y8G("ngIf",(null==(t=e.bMT(2,2,i.surveyLevels$))?null:t.length)>0),e.R7$(2),e.Y8G("ngIf",0==(null==(r=e.bMT(4,4,i.surveyLevels$))?null:r.length))}}function pt(n,o){1&n&&(e.qex(0),e.j41(1,"div",6),e.nrm(2,"mat-spinner",7),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.Y8G("diameter",60))}let ft=(()=>{class n extends g.$G{static{this.BoxIdQueryParameter="boxId"}constructor(t,r,i,s){super(t),this.requirementsStoreService=r,this.router=i,this.route=s,this.canEdit=!1,this.subscriptions=[]}ngOnInit(){this.surveyLevels$=this.requirementsStoreService.getSurveyLevelTree(),this.areRequirementsLoaded$=this.requirementsStoreService.getAreRequirementsLoaded()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}selectSurvey(t){const r=t[0],i=t[1],s={};i&&i.Id&&(s.groupId=i.Id),this.router.navigate(["survey",r.Id],{relativeTo:this.route,queryParams:s})}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.$17),e.rXU(T.Ix),e.rXU(T.nX))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-supplier-requirements-content"]],inputs:{parentId:"parentId"},features:[e.Jv_([g.O7]),e.Vt3],decls:4,vars:6,consts:[[4,"ngIf"],["class","padding--25",4,"ngIf"],[1,"padding--25"],[1,"padding--bottom-10","text--grey30","text--12px"],[3,"parentId","margin--bottom-10","surveyLevel","selectSurveyLevel",4,"ngFor","ngForOf"],[3,"selectSurveyLevel","parentId","surveyLevel"],[1,"padding--40","display--flex","align--center","content-center"],[3,"diameter"]],template:function(r,i){1&r&&(e.DNE(0,ut,5,6,"div",0),e.nI1(1,"async"),e.DNE(2,pt,3,1,"ng-container",0),e.nI1(3,"async")),2&r&&(e.Y8G("ngIf",e.bMT(1,2,i.areRequirementsLoaded$)),e.R7$(2),e.Y8G("ngIf",!e.bMT(3,4,i.areRequirementsLoaded$)))},dependencies:[p.Sq,p.bT,E.wS,de.z,Xe.O,p.Jj,R.D9]})}}return n})();var B=d(88141),he=d(94857);function mt(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}function _t(n,o){if(1&n&&(e.j41(0,"div",2)(1,"div",3),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"nx1-document-list",4),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,4,"str_Tender_documents")),e.R7$(2),e.Y8G("documents",t.requirements)("listType","inline-cards")("indexes",!0)}}function ht(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,mt,1,0,"nx1-requirements-empty-card",0)(2,_t,5,6,"div",1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.noRequirements),e.R7$(),e.Y8G("ngIf",!t.noRequirements)}}function gt(n,o){1&n&&(e.qex(0),e.j41(1,"div",5),e.nrm(2,"mat-spinner",6),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.Y8G("diameter",60))}let bt=(()=>{class n extends g.$G{static{this.BoxIdQueryParameter="boxId"}constructor(t,r,i,s){super(t),this.route=r,this.documentService=i,this.boxStoreService=s,this.canEdit=!1,this.subscriptions=[],this.noRequirements=!1,this.translatedText="",this.isZipInProgress=!1,this.toolBreadcrumbPath=[{keyword:"str_Tender_requirements",url:["../.."]}]}ngOnInit(){this.boxId$=this.route.paramMap.pipe((0,h.T)(t=>t.get(n.BoxIdQueryParameter)),(0,h.T)(t=>parseInt(t,10)),(0,M.F)()),this.subscriptions.push(this.boxId$.pipe((0,v.n)(t=>this.boxStoreService.getBoxById(t).pipe((0,f.p)(r=>!!r))),(0,B.M)(t=>{this.box=t}),(0,v.n)(t=>this.documentService.getDocumentsByEntityMnemonicAndEntityGuid(this.box.EntityMnemonic,this.box.Guid))).subscribe(t=>{this.requirements=t,this.noRequirements=!t.length}))}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.nX),e.rXU(c.DKw),e.rXU(c.o2P))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-supplier-requirements-content-documents"]],inputs:{parentId:"parentId"},features:[e.Jv_([g.O7]),e.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],["class","padding--25",4,"ngIf"],[1,"padding--25"],[1,"margin--bottom-20"],[3,"documents","listType","indexes"],[1,"padding--40","display--flex","align--center","content-center"],[3,"diameter"]],template:function(r,i){1&r&&e.DNE(0,ht,3,2,"div",0)(1,gt,3,1,"ng-container",0),2&r&&(e.Y8G("ngIf",null==i.box?null:i.box.childContentLoaded),e.R7$(),e.Y8G("ngIf",!(null!=i.box&&i.box.childContentLoaded)))},dependencies:[p.bT,E.wS,de.z,he.d,R.D9],styles:["[_nghost-%COMP%]{display:block}"]})}}return n})();var Ve=d(18301),ae=d(62114),$=d(84572),z=d(7673),V=d(31397),Oe=d(64779),Ue=d(41584),K=d(67376);function vt(n,o){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("<1",e.bMT(3,1,"str_Common_short_minutes"),""))}function St(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Lme("",t.durationEndDate.days,"",e.bMT(2,2,"str_Common_short_days"),",")}}function xt(n,o){1&n&&(e.j41(0,"span"),e.EFF(1,","),e.k0s())}function Tt(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Lme("",t.durationEndDate.minutes,"",e.bMT(2,2,"str_Common_short_minutes"),"")}}function It(n,o){if(1&n&&(e.qex(0),e.DNE(1,St,3,4,"span",12),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,xt,2,0,"span",12)(6,Tt,3,4,"span",12),e.bVm()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.durationEndDate.days),e.R7$(2),e.Lme("",t.durationEndDate.hours,"",e.bMT(4,5,"str_Common_short_hours"),""),e.R7$(2),e.Y8G("ngIf",t.durationEndDate.minutes),e.R7$(),e.Y8G("ngIf",t.durationEndDate.minutes)}}function yt(n,o){if(1&n&&(e.j41(0,"div",9),e.DNE(1,vt,4,3,"ng-container",10)(2,It,7,7,"ng-container",11),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("ngSwitch",t.durationEndDate.lessThanMinute),e.R7$(),e.Y8G("ngSwitchCase",!0)}}function Ct(n,o){if(1&n&&(e.j41(0,"div",13),e.EFF(1),e.nI1(2,"async"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,t.isBeforeOpeningOfOffersPhaseStarted$)?e.bMT(3,3,"str_Tender_deadline_closed"):"-"," ")}}function Ot(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",7),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,yt,3,2,"div",8)(5,Ct,4,5,"ng-template",null,1,e.C5r),e.bVm()),2&n){const t=e.sdS(6),r=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_offer_submission_ends_in")," "),e.R7$(2),e.Y8G("ngIf",r.durationEndDate)("ngIfElse",t)}}function Rt(n,o){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("<1",e.bMT(3,1,"str_Common_short_minutes"),""))}function Mt(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Lme("",t.durationStartDate.days,"",e.bMT(2,2,"str_Common_short_days"),",")}}function Pt(n,o){1&n&&(e.j41(0,"span"),e.EFF(1,","),e.k0s())}function Dt(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Lme("",t.durationStartDate.minutes,"",e.bMT(2,2,"str_Common_short_minutes"),"")}}function kt(n,o){if(1&n&&(e.qex(0),e.DNE(1,Mt,3,4,"span",12),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,Pt,2,0,"span",12)(6,Dt,3,4,"span",12),e.bVm()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.durationStartDate.days),e.R7$(2),e.Lme("",t.durationStartDate.hours,"",e.bMT(4,5,"str_Common_short_hours"),""),e.R7$(2),e.Y8G("ngIf",t.durationStartDate.minutes),e.R7$(),e.Y8G("ngIf",t.durationStartDate.minutes)}}function wt(n,o){if(1&n&&(e.j41(0,"div",9),e.DNE(1,Rt,4,3,"ng-container",10)(2,kt,7,7,"ng-container",11),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("ngSwitch",t.durationStartDate.lessThanMinute),e.R7$(),e.Y8G("ngSwitchCase",!0)}}function $t(n,o){if(1&n&&(e.j41(0,"div",13),e.EFF(1),e.nI1(2,"async"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,t.isBeforeOpeningOfOffersPhaseStarted$)?e.bMT(3,3,"str_Tender_deadline_closed"):"-"," ")}}function Gt(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.DNE(3,wt,3,2,"div",8)(4,$t,4,5,"ng-template",null,1,e.C5r)),2&n){const t=e.sdS(5),r=e.XpG();e.R7$(),e.SpI(" ",e.bMT(2,3,"str_Tender_offer_submission_starts_in")," "),e.R7$(2),e.Y8G("ngIf",r.durationStartDate)("ngIfElse",t)}}let Et=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l){super(t),this.viewContainerRef
1=t,this.utilsService=r,this.cdr=i,this.tenderProcessStoreService=s,this.tenderPlanningDateStoreService=a,this.tenderGuard=l,this.alreadyPass=!1,this.canRefresh=!1,this.beforeOpeningOfOffersPhaseName=w.c.tender.beforeOpeningOfOffersPhase.phase,this.subscriptions=[]}ngOnInit(){this.isBeforeOpeningOfOffersPhaseStarted$=this.tenderProcessStoreService.getIsPhaseStarted(this.roundId,this.beforeOpeningOfOffersPhaseName),this.timerPeriod=w.c.tender.beforeOpeningOfOffersPhase.refreshInterval;let t=w.c.tender.beforeOpeningOfOffersPhase.phase,r=w.c.tender.offerPhase.phase;this.tenderGuard.tenderInfo.HasContinuousEvaluation?(this.timerPeriod=w.c.tender.afterContinuousEvaluation.refreshInterval,t=w.c.tender.afterContinuousEvaluation.phase,r=w.c.tender.continuousEvaluation.phase,this.phaseName=w.c.tender.continuousEvaluation.phase):this.phaseName=w.c.tender.offerPhase.phase,this.isPhaseStarted$=this.tenderProcessStoreService.getIsPhaseStarted(this.roundId,this.phaseName);const i=(0,Oe.y)(this.tenderProcessStoreService.getTenderProcessPhaseByNameAndRoundId(this.roundId,t),this.tenderProcessStoreService.getTenderProcessPhaseByNameAndRoundId(this.roundId,r)).pipe((0,f.p)(([s,a])=>!!s&&!!a),(0,v.n)(([s,a])=>this.tenderPlanningDateStoreService.getTenderPlanningPeriodByTenderProcessPhaseIds(s.Id,a.Id)),(0,f.p)(s=>!!s),(0,M.F)((s,a)=>(0,K.isEqual)(s,a)));this.subscriptions.push((0,Ue.O)(0,this.timerPeriod).pipe((0,V.Z)(()=>(0,$.z)([this.utilsService.getSystemDateTime(),i]))).subscribe(([s,a])=>{this.systemDate=s,this.durationStartDate=null,this.durationEndDate=null,a.StartDate&&a.StartDate.Date&&(this.durationStartDate=this.formatDuration(a.StartDate.Date,this.systemDate)),a.EndDate&&a.EndDate.Date&&(this.durationEndDate=this.formatDuration(a.EndDate.Date,this.systemDate)),this.checkDurationEndDate(),this.cdr.markForCheck()}))}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}formatDuration(t,r){const a=Math.floor(t.getTime()/1e3)-Math.floor(r.getTime()/1e3);return a<=0?null:{days:Math.floor(a/86400),hours:Math.floor(a%86400/3600),minutes:Math.floor(a%3600/60),seconds:a%60,lessThanMinute:a<60}}checkDurationEndDate(){this.durationEndDate?this.alreadyPass=!0:(this.canRefresh=this.alreadyPass,this.checkRefresh())}checkRefresh(){this.canRefresh&&window.location.reload()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.TJO),e.rXU(e.gRc),e.rXU(c.i_v),e.rXU(c.gQP),e.rXU(D.U))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-offer-phase-deadline"]],inputs:{parentId:"parentId",roundId:"roundId"},features:[e.Vt3],decls:8,vars:4,consts:[["startInTemplate",""],["noDurationTemplate",""],[1,"nxcard","bg--white","z1","display--flex","full-height","padding--top-5","padding--bottom-5","padding--left-20","padding--right-20","deadline-wrapper","margin--left-15"],[1,"display--flex","flex-column","content-center","align--end","flex-grow--2","text--right","text--bold","full-width"],[4,"ngIf","ngIfElse"],[1,"display--flex","align--center","shrink-0","text--28px","text--grey15a","margin--left-15"],[1,"mdi","mdi-calendar-clock"],[1,"text--bold","text--grey40","break-word","full-width"],["class","text--bold text--16px",3,"ngSwitch",4,"ngIf","ngIfElse"],[1,"text--bold","text--16px",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[1,"break-word","full-width"]],template:function(r,i){if(1&r&&(e.j41(0,"div",2)(1,"div",3),e.DNE(2,Ot,7,5,"ng-container",4),e.nI1(3,"async"),e.DNE(4,Gt,6,5,"ng-template",null,0,e.C5r),e.k0s(),e.j41(6,"div",5),e.nrm(7,"i",6),e.k0s()()),2&r){const s=e.sdS(5);e.R7$(2),e.Y8G("ngIf",e.bMT(3,2,i.isPhaseStarted$))("ngIfElse",s)}},dependencies:[p.bT,p.ux,p.e1,p.fG,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:block}.deadline-wrapper[_ngcontent-%COMP%]{width:240px}"]})}}return n})();var ue=d(54549),Re=d(21666);const Bt=(n,o,t,r)=>({"text--rose0":n,"mdi-email-alert":o,"mdi-minus-circle":t,"mdi-check text--emerald0":r}),Le=(n,o)=>({"text--rose0":n,"text--emerald0":o});function Ft(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG(5);
1return e.Njj(i.openOfferSubmissionDetails())}),e.EFF(1),e.nI1(2,"nx1date"),e.k0s()}if(2&n){const t=e.XpG(5);e.BMQ("id",t.getLabelId("offerSubmittedBy")),e.R7$(),e.JRh(e.i5U(2,2,t.offerWrapper.OfferSubmission.SubmissionTimestamp.TimestampDate,"ShortDateExactTime"))}}function Nt(n,o){if(1&n&&(e.j41(0,"span",22),e.EFF(1),e.nI1(2,"nx1date"),e.k0s()),2&n){const t=e.XpG(5);e.BMQ("id",t.getLabelId("offerSubmitDate")),e.R7$(),e.JRh(e.i5U(2,2,t.offerWrapper.OfferSubmission.SubmissionTimestamp.TimestampDate,"ShortDateExactTime"))}}function jt(n,o){if(1&n&&(e.qex(0)(1,19),e.DNE(2,Ft,3,5,"a",20)(3,Nt,3,5,"span",21),e.bVm(),e.EFF(4),e.nI1(5,"translate"),e.j41(6,"span",22),e.EFF(7),e.k0s(),e.bVm()),2&n){const t=e.XpG(4);e.R7$(),e.Y8G("ngSwitch",t.canShowOfferSubmissionDetails),e.R7$(),e.Y8G("ngSwitchCase",!0),e.R7$(2),e.SpI(" ",e.bMT(5,5,"str_Common_by")," "),e.R7$(2),e.BMQ("id",t.getLabelId("offerSubmittedBy")),e.R7$(),e.SpI(" ",t.offerWrapper.OfferSubmission.SubmittedByName," ")}}function Xt(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.openOfferSubmissionDetails())}),e.EFF(1),e.nI1(2,"nx1date"),e.k0s()}if(2&n){const t=e.XpG(4);e.BMQ("id",t.getLabelId("offerEvaluatedDate")),e.R7$(),e.SpI(" ",e.i5U(2,2,t.offerWrapper.OfferInvitation.ModifiedDate,"ShortDateExactTime")," ")}}function Vt(n,o){if(1&n&&(e.j41(0,"div",18),e.DNE(1,jt,8,7,"ng-container",15)(2,Xt,3,5,"ng-template",null,4,e.C5r),e.k0s()),2&n){const t=e.sdS(3),r=e.XpG(3);e.R7$(),e.Y8G("ngIf",!r.getOfferInvitationStatus)("ngIfElse",t)}}function Ut(n,o){1&n&&(e.j41(0,"div",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_offers_status_offer")," "))}function Lt(n,o){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.nI1(2,"nx1EnumTranslate"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(3,4,e.i5U(2,1,t.getOfferInvitationStatus,t.evaluationStateEnum))," ")}}function At(n,o){if(1&n&&(e.j41(0,"div",24),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.Y8G("ngClass",e.l_i(2,Le,!t.submittedOffersStatusInfo.isAllSubmitted,t.submittedOffersStatusInfo.isAllSubmitted)),e.R7$(),e.SpI(" ",t.submittedOffersStatusInfo.labelToShow," ")}}function Yt(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,Vt,4,2,"div",17)(2,Ut,3,3,"ng-template",null,2,e.C5r)(4,Lt,4,6,"div",15)(5,At,2,5,"ng-template",null,3,e.C5r),e.k0s()),2&n){const t=e.sdS(3),r=e.sdS(6),i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.offerWrapper.OfferSubmission)("ngIfElse",t),e.R7$(3),e.Y8G("ngIf",!!i.getOfferInvitationStatus&&i.submittedOffersStatusInfo.isAllSubmitted)("ngIfElse",r)}}function Kt(n,o){if(1&n&&(e.j41(0,"div")(1,"div",18),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",24),e.EFF(5),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_offers_status_offers")," "),e.R7$(2),e.Y8G("ngClass",e.l_i(5,Le,!t.submittedOffersStatusInfo.isAllSubmitted,t.submittedOffersStatusInfo.isAllSubmitted)),e.R7$(),e.SpI(" ",t.submittedOffersStatusInfo.labelToShow," ")}}function qt(n,o){if(1&n&&(e.j41(0,"span",33),e.EFF(1),e.k0s()),2&n){const t=o.$implicit,r=o.last;e.R7$(),e.Lme(" ",t.OrganizationName,"",r?"":", "," ")}}function Wt(n,o){if(1&n&&(e.qex(0),e.j41(1,"span",30),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.j41(5,"span",31),e.DNE(6,qt,2,2,"span",32),e.k0s(),e.bVm()),2&n){const t=e.XpG(4);e.R7$(2),e.JRh(e.bMT(3,2,"str_Tender_consortium_members")),e.R7$(4),e.Y8G("ngForOf",t.consortiumMembers)}}function zt(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",34),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_submit_as_consortium")," "))}function Qt(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",35),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_manage_consortium_members")," "))}function Jt(n,o){if(1&n&&(e.j41(0,"div",26),e.DNE(1,Wt,7,4,"ng-container",16),e.j41(2,"span",27),e.DNE(3,zt,3,3,"a",28)(4,Qt,3,3,"a",29),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0),e.R7$(2),e.Y8G("ngIf",0===(null==t.consortiumMembers?null:t.consortiumMembers.length)),e.R7$(),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0)}}function Ht(n,o){if(1&n&&(e.j41(0,"span",33),e.EFF(1),e.k0s()),2&n){const t=o.$implicit,r=o.last;e.R7$(),e.Lme(" ",t.OrganizationName,"",r?"":", "," ")}}function Zt(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",26)(1,"span",36),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.j41(5,"span",31),e.DNE(6,Ht,2,2,"span",32),e.k0s(),e.j41(7,"span",27)(8,"a",35),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,3,"str_Tender_consortium_members")),e.R7$(4),e.Y8G("ngForOf",t.consortiumMembers),e.R7$(3),e.SpI(" ",e.bMT(10,5,"str_Tender_view_consortium_participants")," ")}}function en(n,o){if(1&n&&(e.qex(0),e.DNE(1,Jt,5,3,"div",25)(2,Zt,11,7,"div",25),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.canManageConsortium),e.R7$(),e.Y8G("ngIf",!t.canManageConsortium&&(null==t.consortiumMembers?null:t.consortiumMembers.length)>0)}}function tn(n,o){if(1&n&&(e.j41(0,"div",11)(1,"div",12),e.nrm(2,"i",13),e.k0s(),e.j41(3,"div",14),e.DNE(4,Yt,7,4,"div",15)(5,Kt,6,8,"ng-template",null,1,e.C5r)(7,en,3,2,"ng-container",16),e.k0s()()),2&n){const t=e.sdS(6),r=e.XpG();e.R7$(2),e.Y8G("ngClass",e.ziG(4,Bt,!r.submittedOffersStatusInfo.isAllSubmitted&&!r.getOfferInvitationStatus||!!r.getOfferInvitationStatus&&r.getOfferInvitationStatus===r.evaluationStateEnum.Disqualified&&r.submittedOffersStatusInfo.isAllSubmitted,!r.submittedOffersStatusInfo.isAllSubmitted&&!r.getOfferInvitationStatus,!!r.getOfferInvitationStatus&&r.getOfferInvitationStatus===r.evaluationStateEnum.Disqualified&&r.submittedOffersStatusInfo.isAllSubmitted,!!r.getOfferInvitationStatus&&r.getOfferInvitationStatus===r.evaluationStateEnum.Qualified&&r.submittedOffersStatusInfo.isAllSubmitted||r.submittedOffersStatusInfo.isAllSubmitted&&!r.getOfferInvitationStatus)),e.R7$(2),e.Y8G("ngIf",r.offerWrapper)("ngIfElse",t),e.R7$(3),e.Y8G("ngIf",r.isBulgarianConfiguration)}}function nn(n,o){1&n&&(e.j41(0,"div",11)(1,"div",12),e.nrm(2,"i",37),e.k0s(),e.j41(3,"div",14)(4,"div",31),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()),2&n&&(e.R7$(5),e.SpI(" ",e.bMT(6,1,"str_Tender_you_can_only_view_requirements")," "))}function rn(n,o){if(1&n&&e.nrm(0,"nx1-tender-offer-phase-deadline",38),2&n){const t=e.XpG();e.Y8G("roundId",t.round.Id)}}let Me=(()=>{class n extends N.$G{static{this.ManageConsortiumMembersMnemonic="CreateConsortiumMember"}set submittedOffersStatus(t){t!==this._submittedOffersStatus&&(this._submittedOffersStatus=t,this.checkSubmittedOffersStatus())}get submittedOffersStatus(){return this._submittedOffersStatus}
1constructor(t,r,i,s,a,l,u){super(t),this.viewContainerRef=t,this.dialogService=r,this.localizationService=i,this.consortiumMemberStoreService=s,this.tenderStoreService=a,this.principalPermissionService=l,this.changeDetectorRef=u,this.submittedOffersStatusInfo={},this.evaluationStateEnum=NX1.Model.Enums.EvaluationState,this.canManageConsortiumMembers=null,this.isTenderManageable=!1,this.subscriptions=[]}ngOnInit(){this.subscriptions.push((0,$.z)([this.tenderStoreService.getCurrentTender(),this.tenderStoreService.getCurrentTenderProcessPhase()]).pipe((0,f.p)(([t,r])=>!!t&&!!r)).subscribe(([t,r])=>{this.tender=t,this.isTenderManageable=!t?.IsCollectRequest&&("str_Tender_phase_publication"===r.Name||"str_Tender_phase_offer_phase"===r.Name||"str_Tender_phase_continuous_evaluation"===r.Name),this.changeDetectorRef.markForCheck()}))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}get areAllOffersSubmitted(){return this.offerWrappers?!this.offerWrappers.filter(t=>!t.OfferSubmission).length:null}get canManageConsortium(){return!(this.submittedOffersStatus.SubmittedOffersCount>0)&&this.isTenderManageable&&1===this.round.OrderNumber}get submittedOffersLabel(){return this.areAllOffersSubmitted?this.localizationService.instant("str_Tender_all_offers_submitted"):this.localizationService.instant("str_Tender_offers_not_submitted_{{count}}",{count:this.offerWrappers.filter(t=>!t.OfferSubmission).length})}get canShowOfferSubmissionDetails(){return!(!this.offerWrapper||!this.offerWrapper.OfferSubmission||!this.offerWrapper.OfferSubmission.SubmissionTimestamp||!this.offerWrapper.OfferSubmission.SubmissionTimestamp.DocumentId&&!this.offerWrapper.Offer.ReceiptDocumentId)}get getOfferInvitationStatus(){return this.offerWrapper&&this.offerWrapper.OfferInvitation&&this.offerWrapper.OfferInvitation.EvaluationState&&(this.offerWrapper.OfferInvitation.EvaluationState===this.evaluationStateEnum.Disqualified||this.offerWrapper.OfferInvitation.EvaluationState===this.evaluationStateEnum.Qualified)?this.offerWrapper.OfferInvitation.EvaluationState:null}checkSubmittedOffersStatus(){switch(this.submittedOffersStatusInfo={},this.submittedOffersStatus.AllOffersCount){case 0:this.submittedOffersStatusInfo.labelToShow=this.localizationService.instant("str_Tender_not_participating_in_round");break;case 1:this.submittedOffersStatus.SubmittedOffersCount===this.submittedOffersStatus.AllOffersCount?(this.submittedOffersStatusInfo.labelToShow=this.localizationService.instant("str_Tender_submitted"),this.submittedOffersStatusInfo.isAllSubmitted=!0):(this.submittedOffersStatusInfo.labelToShow=this.localizationService.instant("str_Tender_not_submitted"),this.submittedOffersStatusInfo.isAllSubmitted=!1);break;default:this.submittedOffersStatus.SubmittedOffersCount===this.submittedOffersStatus.AllOffersCount?(this.submittedOffersStatusInfo.labelToShow=this.localizationService.instant("str_Tender_all_offers_submitted"),this.submittedOffersStatusInfo.isAllSubmitted=!0):(this.submittedOffersStatusInfo.labelToShow=this.localizationService.instant("str_Tender_offers_not_submitted_{{count}}",{count:this.submittedOffersStatus.AllOffersCount-this.submittedOffersStatus.SubmittedOffersCount}),this.submittedOffersStatusInfo.isAllSubmitted=!1)}}openOfferSubmissionDetails(){if(this.destroyOfferSubmissionDetailsDialog(),this.canShowOfferSubmissionDetails){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.offerSubmissionDetailsDialogRef=this.dialogService.open(ae.i,t),this.offerSubmissionDetailsDialogRef.componentInstance.parentId=this.id,this.offerSubmissionDetailsDialogRef.componentInstance.offerName=this.offerWrapper.Offer.Name,this.offerSubmissionDetailsDialogRef.componentInstance.canEdit=!1,this.offerSubmissionDetailsDialogRef.componentInstance.downloadHtml=!0,this.offerSubmissionDetailsDialogRef.componentInstance.receiptDocumentIds=[this.offerWrapper.Offer.ReceiptDocumentId],this.offerSubmissionDetailsDialogRef.componentInstance.submittedByName=this.offerWrapper.OfferSubmission.SubmittedByName,this.offerSubmissionDetailsDialogRef.componentInstance.timestamp=this.offerWrapper.OfferSubmission.SubmissionTimestamp}}onOpenConsortiumDialog(){(0,z.of)(this.canManageConsortiumMembers).pipe((0,V.Z)(t=>null!=t?(0,z.of)(t):this.principalPermissionService.hasPermission(n.ManageConsortiumMembersMnemonic,this.tenderParticipant.Guid,this.tenderParticipant.EntityId)),(0,j.$)()).subscribe(t=>{this.canManageConsortiumMembers=t;const r=[];
1this.consortiumMembers.forEach(l=>{r.push({Id:l.Id,RegistryNumber:l.RegistryNumber,OrganizationName:l.OrganizationName,IsValid:l.IsValid})});const i=this.tenderParticipant.LeadTenderParticipantId?this.tenderParticipant.LeadTenderParticipantId:this.tenderParticipant.Id;this.destroyConsortiumMembersDialog();const s=new S.Pe;s.viewContainerRef=this.viewContainerRef,this.consortiumMembersDialogRef=this.dialogService.open(Ve.S,s),this.consortiumMembersDialogRef.componentInstance.editMode=t,this.consortiumMembersDialogRef.componentInstance.consortiumMembers=r,this.consortiumMembersDialogRef.componentInstance.tenderParticipantId=i;const a=this.consortiumMembersDialogRef.componentInstance.saveConsortiumMembers.subscribe(l=>{const u=[];l.forEach(m=>{let b=this.consortiumMembers.find(x=>!!x.Id&&x.Id===m.Id);b||(b={TenderParticipantId:i}),u.push(Object.assign({},b,{RegistryNumber:m.RegistryNumber,OrganizationName:m.OrganizationName,IsValid:m.IsValid}))}),this.consortiumMemberStoreService.saveConsortiumMembers(i,u)});this.consortiumMembersDialogRef.afterClosed().toPromise().then(()=>{this.consortiumMembersDialogRef=null,a&&a.unsubscribe()}),this.changeDetectorRef.markForCheck()})}destroyConsortiumMembersDialog(){this.consortiumMembersDialogRef&&(this.consortiumMembersDialogRef.close(),this.consortiumMembersDialogRef=null)}destroyOfferSubmissionDetailsDialog(){this.offerSubmissionDetailsDialogRef&&(this.offerSubmissionDetailsDialogRef.close(),this.offerSubmissionDetailsDialogRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3),e.rXU(c.PiF),e.rXU(c.Gfq),e.rXU(c.$gx),e.rXU(c.N49),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-offers-status-header"]],inputs:{parentId:"parentId",submittedOffersStatus:"submittedOffersStatus",offerWrapper:"offerWrapper",offerWrappers:"offerWrappers",planningPeriodDate:"planningPeriodDate",round:"round",consortiumMembers:"consortiumMembers",tenderParticipant:"tenderParticipant",isBulgarianConfiguration:"isBulgarianConfiguration"},features:[e.Vt3],decls:8,vars:3,consts:[["requirementTemplate",""],["multipleOffersTemplate",""],["noOfferSubmissionTemplate",""],["offerStatus",""],["offerEvaluatedDate",""],[1,"display--flex","margin--bottom-20"],[1,"nxcard","bg--white","z1","flex-grow--2"],[1,"nxcard__header","nxcard__header--no-border","full-height"],[1,"nxcard__header-title"],["class","nxcard__header-title-content flex-row align--center flex-grow--2",4,"ngIf","ngIfElse"],["class","shrink-0",3,"roundId",4,"ngIf"],[1,"nxcard__header-title-content","flex-row","align--center","flex-grow--2"],[1,"display--flex","margin--right-15"],[1,"mdi","text--28px","opacity--04",3,"ngClass"],[1,"min-width-0","full-width"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","text--normal text--14px",4,"ngIf","ngIfElse"],[1,"text--normal","text--14px"],[3,"ngSwitch"],["class","text--bold",3,"click",4,"ngSwitchCase"],["class","text--bold",4,"ngSwitchDefault"],[1,"text--bold"],[1,"text--bold",3,"click"],[3,"ngClass"],["class","text--12px display--flex align--center min-width-0",4,"ngIf"],[1,"text--12px","display--flex","align--center","min-width-0"],[1,"no-wrap"],["class","text--underline text--seablue0 text--14px text--normal",3,"click",4,"ngIf"],["class","text--underline text--seablue0 text--14px text--normal margin--left-5",3,"click",4,"ngIf"],[1,"text--12px","text--grey30","text--bold","text--uppercase","text--bold","no-wrap"],[1,"text--ellipsis"],["class","text--12px text--normal text--grey65",4,"ngFor","ngForOf"],[1,"text--12px","text--normal","text--grey65"],[1,"text--underline","text--seablue0","text--14px","text--normal",3,"click"],[1,"text--underline","text--seablue0","text--14px","text--normal","margin--left-5",3,"click"],[1,"text--grey30","text--uppercase","text--bold","no-wrap"],[1,"mdi","mdi-eye","text--28px","text--grey15a"],[1,"shrink-0",3,"roundId"]],template:function(r,i){if(1&r&&(e.j41(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8),e.DNE(4,tn,8,9,"div",9)(5,nn,7,3,"ng-template",null,0,e.C5r),e.k0s()()(),e.DNE(7,rn,1,1,"nx1-tender-offer-phase-deadline",10),e.k0s()),2&r){const s=e.sdS(6);e.R7$(4),e.Y8G("ngIf",i.submittedOffersStatus)("ngIfElse",s),e.R7$(3),e.Y8G("ngIf",i.round)}},dependencies:[p.YU,p.Sq,p.bT,p.ux,p.e1,p.fG,Et,R.D9,ue.R9,Re.O],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();function sn(n,o){if(1&n&&e.nrm(0,"nx1-tender-explicite-status",13),2&n){const t=e.XpG();e.Y8G("tender",t.tender)("isBuyer",!1)}}function on(n,o){if(1&n&&e.nrm(0,"nx1-box-guidance-message",14),2&n){const t=e.XpG();
1e.Y8G("box",t.box)("actionMnemonic","ViewSupplierRequirementBoxGuidance")("messageKeyword",t.setOfferSubmissionMessageKeyword())("buttonKeyword",null!=t.tender&&t.tender.IsCollectRequest?"str_Requirements_collect_request_box_create_your_offer":"str_Requirements_box_create_your_offer")("link",t.guidanceLink)("translatedText",t.translatedText)}}function an(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",15),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.requestRequirementsDownload())}),e.nrm(2,"i",16),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.isZipInProgress),e.BMQ("id",t.getButtonId("RequestExport"))("title",e.bMT(1,3,"str_Tender_download_requirements"))}}function ln(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",17),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openTenderAwardMethod())}),e.nrm(2,"i",18),e.k0s()}if(2&n){const t=e.XpG();e.BMQ("id",t.getButtonId("openAwardMethod"))("title",e.bMT(1,2,"str_Tender_award_method"))}}function cn(n,o){1&n&&e.nrm(0,"nx1-supplier-requirements-content-documents")}function dn(n,o){1&n&&e.nrm(0,"nx1-supplier-requirements-content")}function un(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}let pn=(()=>{class n extends g.$G{static{this.BoxIdQueryParameter="boxId"}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q,P,W,ne,ie,re,se,oe){super(t),this.dialogService=r,this.tenderGuard=i,this.route=s,this.documentService=a,this.boxStoreService=l,this.tenderProcessStoreService=u,this.tenderPlanningDateStoreService=m,this.datePipe=b,this.tasksService=x,this.localizationService=y,this.requirementsStoreService=C,this.awardMethodStoreService=G,this.principalPermissionService=U,this.currentTenderParticipantStoreService=q,this.changeDetectorRef=P,this.loaderService=W,this.offerStoreService=ne,this.consortiumMemberStoreService=ie,this.systemSettingsStoreService=re,this.notificationsService=se,this.exportService=oe,this.subscriptions=[],this.requirementsType=NX1.Model.Enums.TenderRequirementsType,this.noRequirements=!1,this.guidanceLink=[],this.translatedText="",this.isZipInProgress=!1,this.toolBreadcrumbPath=[],this.ViewAwardMethod="ViewAwardMethod"}ngOnInit(){this.isLoaded$=this.currentTenderParticipantStoreService.getIsTenderParticipantLoaded(),this.isTenderParticipant$=this.currentTenderParticipantStoreService.getIsTenderParticipantLoaded().pipe((0,f.p)(r=>r),(0,I.K)(this.currentTenderParticipantStoreService.getCurrentTenderParticipant()),(0,h.T)(r=>!!r)),this.tender=this.tenderGuard.tenderInfo,this.boxId$=this.route.paramMap.pipe((0,h.T)(r=>r.get(n.BoxIdQueryParameter)),(0,h.T)(r=>parseInt(r,10)),(0,M.F)()),this.round$=this.tenderProcessStoreService.getSelectedProcessRound().pipe((0,f.p)(r=>!!r),(0,j.$)()),this.canViewAwardMethod$=this.round$.pipe((0,f.p)(r=>!!r),(0,v.n)(r=>this.principalPermissionService.hasPermission(this.ViewAwardMethod,r.Guid,r.EntityId)));const t=this.boxId$.pipe((0,v.n)(r=>this.boxStoreService.getBoxById(r).pipe((0,f.p)(i=>!!i))),(0,O.H)(r=>(this.box=r,this.setBreadcrumb(),this.tenderProcessStoreService.getTenderProcessPhaseByNameAndRoundId(r.TenderProcessRoundId,w.c.tender.beforeOpeningOfOffersPhase.phase))),(0,f.p)(r=>!!r),(0,O.H)(r=>this.tenderPlanningDateStoreService.getTenderPlanningPeriodByTenderProcessPhaseId(r.Id)),(0,f.p)(r=>!!r&&!!r.EndDate&&!!r.EndDate.Date),(0,O.H)(r=>(this.period=r,this.localizationService.stream("str_Requirements_box_offer_submission_is_opened_till_{{date}}",{date:this.datePipe.transform(r.EndDate.Date,"ShortDateTime")})))).subscribe(r=>{this.translatedText=r,this.changeDetectorRef.markForCheck()});this.subscriptions.push(t),this.subscriptions.push(this.boxId$.pipe((0,v.n)(r=>this.boxStoreService.getBoxById(r)),(0,f.p)(r=>!!r),(0,Ie.E)(this.round$),(0,v.n)(([,r])=>r.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Documents?this.documentService.getDocumentsByEntityMnemonicAndEntityGuid(this.box.EntityMnemonic,this.box.Guid):this.requirementsStoreService.getSurveyLevelTree())).subscribe(r=>{this.noRequirements=!r.length})),this.subscriptions.push(this.tenderGuard.tender$.pipe((0,v.n)(r=>this.boxStoreService.getSelectedProcessRoundBoxesByTenderIdAndBoxType(r.Id,NX1.Model.Enums.BoxType.Offer)),(0,h.T)(r=>r[0]),(0,f.p)(r=>!!r)).subscribe(r=>{this.guidanceLink=["../../offers/",r.Id]})),this.submittedOffersStatus$=this.round$.pipe((0,v.n)(r=>this.offerStoreService.getSubmittedOffersStatusByRoundIds([r.Id]).pipe((0,h.T)(i=>i[r.Id])))),this.currentTenderParticipant$=this.currentTenderParticipantStoreService.getCurrentTenderParticipant().pipe((0,f.p)(r=>!!r)),this.consortiumMembers$=this.currentTenderParticipant$.pipe((0,v.n)(r=>this.consortiumMemberStoreService.getConsortiumMembersByTenderParticipantId(r.Id))),this.isBulgarianConfiguration$=this.systemSettingsStoreService.isBulgarianConfiguration()}setBreadcrumb(){this.toolBreadcrumbPath=[{title:this.box.Name,url:["../.."]}]}setOfferSubmissionMessageKeyword(){return null!=this.period?"str_Requirements_box_offer_submission_is_opened":"str_Requirements_box_offer_submission_is_opened_set_date_none"}openTenderAwardMethod(){const t=new S.Pe;
1t.viewContainerRef=this.viewContainerRef,this.awardMethodSettingsRef=this.dialogService.open(Ce.R,t)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe();this.awardMethodStoreService.setInitState()}requestRequirementsDownload(){this.noRequirements||(this.isZipInProgress=!0,this.openLoader(),this.subscriptions.push(this.exportService.generateExportAndDownload(this.tasksService.zipTenderRequirements.bind(this.tasksService),[this.box.Id]).pipe((0,ye.W)(t=>(this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_Common_export_error","",{},t),this.changeDetectorRef.markForCheck(),Y.w))).subscribe(()=>{this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_Common_export_success","",{}),this.changeDetectorRef.markForCheck()})))}openLoader(){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword="str_Tender_exporting_requirements"}closeLoader(){this.loaderService.close()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3),e.rXU(D.U),e.rXU(T.nX),e.rXU(c.DKw),e.rXU(c.o2P),e.rXU(c.i_v),e.rXU(c.gQP),e.rXU(g.O7),e.rXU(c.w9v),e.rXU(c.PiF),e.rXU(c.$17),e.rXU(c.r2T),e.rXU(c.N49),e.rXU(c.VY6),e.rXU(e.gRc),e.rXU(c.ZCd),e.rXU(c.fRX),e.rXU(c.Gfq),e.rXU(c.dqT),e.rXU(c.I2c),e.rXU(c._Th))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-requirement-box-details"]],inputs:{parentId:"parentId"},features:[e.Jv_([g.O7]),e.Vt3],decls:29,vars:41,consts:[[3,"submittedOffersStatus","round","consortiumMembers","tenderParticipant","isBulgarianConfiguration"],[3,"tender","isBuyer",4,"ngIf"],[3,"box","actionMnemonic","messageKeyword","buttonKeyword","link","translatedText",4,"ngIf"],[1,"nxcard","bg--white","z1","margin--top-20"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row"],[1,"text--ellipsis",3,"title"],[1,"nxcard__header-options"],["mat-icon-button","",3,"disabled","click",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],[1,"nxcard__body","nxcard__body--no-scroll"],[4,"ngIf"],[3,"tender","isBuyer"],[3,"box","actionMnemonic","messageKeyword","buttonKeyword","link","translatedText"],["mat-icon-button","",3,"click","disabled"],[1,"mdi","mdi-download"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-trophy"]],template:function(r,i){if(1&r&&(e.nrm(0,"nx1-offers-status-header",0),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.nI1(5,"async"),e.DNE(6,sn,1,2,"nx1-tender-explicite-status",1)(7,on,1,6,"nx1-box-guidance-message",2),e.nI1(8,"async"),e.nI1(9,"async"),e.j41(10,"div",3)(11,"div",4)(12,"div",5)(13,"div",6)(14,"span",7),e.nI1(15,"translate"),e.EFF(16),e.nI1(17,"translate"),e.k0s()()(),e.j41(18,"div",8),e.DNE(19,an,3,5,"button",9)(20,ln,3,4,"button",10),e.nI1(21,"async"),e.k0s()(),e.j41(22,"div",11),e.DNE(23,cn,1,0,"nx1-supplier-requirements-content-documents",12),e.nI1(24,"async"),e.DNE(25,dn,1,0,"nx1-supplier-requirements-content",12),e.nI1(26,"async"),e.DNE(27,un,1,0,"nx1-requirements-empty-card",12),e.nI1(28,"async"),e.k0s()()),2&r){let s,a,l;e.Y8G("submittedOffersStatus",e.bMT(1,15,i.submittedOffersStatus$))("round",e.bMT(2,17,i.round$))("consortiumMembers",e.bMT(3,19,i.consortiumMembers$))("tenderParticipant",e.bMT(4,21,i.currentTenderParticipant$))("isBulgarianConfiguration",e.bMT(5,23,i.isBulgarianConfiguration$)),e.R7$(6),e.Y8G("ngIf",i.tender.IsArchived||i.tender.IsCanceled||i.tender.IsPaused),e.R7$(),e.Y8G("ngIf",1==e.bMT(8,25,i.isTenderParticipant$)&&1==e.bMT(9,27,i.isLoaded$)),e.R7$(7),e.FS9("title",e.bMT(15,29,"str_Tender_requirement_box_content_title")),e.BMQ("id",i.getLabelId("boxName")),e.R7$(2),e.SpI(" ",e.bMT(17,31,"str_Tender_requirement_box_content_title")," "),e.R7$(3),e.Y8G("ngIf",!i.noRequirements),e.R7$(),e.Y8G("ngIf",e.bMT(21,33,i.canViewAwardMethod$)),e.R7$(3),e.Y8G("ngIf",(null==(s=e.bMT(24,35,i.round$))?null:s.RequirementsType)==i.requirementsType.Documents),e.R7$(2),e.Y8G("ngIf",(null==(a=e.bMT(26,37,i.round$))?null:a.RequirementsType)==i.requirementsType.Surveys),e.R7$(2),e.Y8G("ngIf",(null==(l=e.bMT(28,39,i.round$))?null:l.RequirementsType)==i.requirementsType.None)}},dependencies:[p.bT,k.iV,de.z,je._,Z.x,ft,bt,Me,p.Jj,R.D9],changeDetection:0})}}return n})();var Pe=d(48810),Ae=d(42619),L=d(68892),Ye=d(61152);function fn(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-survey-content-tree",6),e.nI1(1,"async"),e.bIt("showTableOfContentEvent",function(){const i=e.eBV(t).ngIf,s=e.XpG(2);return e.Njj(s.showTableOfContent(null==i?null:i.Id))}),e.k0s()}if(2&n){const t=o.ngIf,r=e.XpG(2);e.Y8G("breadcrumbPath",r.breadcrumbPath)("surveyContentTree",t)("showAnswers",!0)("isInRequirementBox",!0)("surveyLevelsPathToExpand",e.bMT(1,5,r.surveyLevelPath$))}}function mn(n,o){if(1&n&&(e.j41(0,"div",4),e.DNE(1,fn,2,7,"nx1-survey-content-tree",5),e.nI1(2,"async"),e.k0s()),2&n){const t=e.XpG(),r=e.sdS(5);e.R7$(),e.Y8G("ngIf",e.bMT(2,2,t.surveyLevelContentsTree$))("ngIfElse",r)}}function _n(n,o){1&n&&(e.j41(0,"div",7),e.nrm(1,"mat-spinner",8),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let hn=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l,u){super(t),this.route=r,this.router=i,this.requirementsStoreService=s,this.dialogService=a,this.boxStoreService=l,this.scrollService=u,this.surveyLevelId$=this.route.paramMap.pipe((0,h.T)(m=>m.get("surveyLevelId")),(0,h.T)(m=>+m),(0,M.F)()),this.groupId$=this.route.queryParamMap.pipe((0,h.T)(m=>m.get("groupId")),(0,h.T)(m=>+m),(0,M.F)()),this.surveyLevelContentsTree$=this.surveyLevelId$.pipe((0,v.n)(m=>this.requirementsStoreService.getSurveyLevelContentsTreeBySurveyLevelId(m))),this.surveyLevelPath$=this.groupId$.pipe((0,V.Z)(m=>this.requirementsStoreService.getSurveyLevelPathBySurveyLevelId(m))),this.surveyLevels$=this.requirementsStoreService.getSurveyLevelTree(),this.breadcrumbPath=[],this.boxId$=this.route.parent.paramMap.pipe((0,h.T)(m=>m.get("boxId")),(0,h.T)(m=>+m),(0,M.F)()),this.subscriptions=[]}ngOnInit(){const t=this.surveyLevelId$.subscribe(r=>this.requirementsStoreService.loadSurveyLevelContents(r));this.subscriptions.push(t),this.subscriptions.push(this.boxId$.pipe((0,v.n)(r=>this.boxStoreService.getBoxById(r))).subscribe(r=>{this.box=r,this.setBreadcrumb()}))}ngAfterContentInit(){this.scrollService.setScrollDirective(this.scrollbarComponent),this.isScrollSet=!0}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}selectSurvey(t){const r=t[0],i=t[1],s={};i&&i.Id&&(s.groupId=i.Id),this.router.navigate(["..",r.Id],{relativeTo:this.route,queryParams:s}).then(a=>{null===a&&this.surveyContentTreeComponent&&this.surveyContentTreeComponent.focus()})}showTableOfContent(t){const r=new S.Pe;
1r.viewContainerRef=this.viewContainerRef;let i=null;this.tableOfContentRaisedCardComponentRef=this.dialogService.open(Ae.w,r),this.tableOfContentRaisedCardComponentRef.componentInstance.surveyLevels$=this.surveyLevels$,this.tableOfContentRaisedCardComponentRef.componentInstance.selectedSurveyLevelId=t,this.subscriptions.push(this.tableOfContentRaisedCardComponentRef.componentInstance.selectSurveyLevel.subscribe(s=>{i=s,this.destroyTableOfContentComponent()})),this.tableOfContentRaisedCardComponentRef.afterClosed().subscribe(()=>{i&&this.selectSurvey(i)})}setBreadcrumb(){this.breadcrumbPath=[{title:this.box.Name,url:["../../"]}]}destroyTableOfContentComponent(){this.tableOfContentRaisedCardComponentRef&&(this.tableOfContentRaisedCardComponentRef.close(),this.tableOfContentRaisedCardComponentRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(c.$17),e.rXU(S.o3),e.rXU(c.o2P),e.rXU(c.bk9))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-requirement-box-survey"]],viewQuery:function(r,i){if(1&r&&(e.GBs(Pe.Vz,5),e.GBs(L.Yh,7)),2&r){let s;e.mGM(s=e.lsd())&&(i.surveyContentTreeComponent=s.first),e.mGM(s=e.lsd())&&(i.scrollbarComponent=s.first)}},features:[e.Jv_([c.bk9]),e.Vt3],decls:6,vars:2,consts:[["loading",""],[1,"survey-content-container"],[1,"survey-content-scrollable"],["class","padding--20",4,"ngIf","ngIfElse"],[1,"padding--20"],[3,"breadcrumbPath","surveyContentTree","showAnswers","isInRequirementBox","surveyLevelsPathToExpand","showTableOfContentEvent",4,"ngIf","ngIfElse"],[3,"showTableOfContentEvent","breadcrumbPath","surveyContentTree","showAnswers","isInRequirementBox","surveyLevelsPathToExpand"],[1,"survey-content-loader"],[3,"diameter"]],template:function(r,i){if(1&r&&(e.j41(0,"div",1)(1,"div",2)(2,"ng-scrollbar"),e.DNE(3,mn,3,4,"div",3),e.k0s()()(),e.DNE(4,_n,2,1,"ng-template",null,0,e.C5r)),2&r){const s=e.sdS(5);e.R7$(3),e.Y8G("ngIf",i.isScrollSet)("ngIfElse",s)}},dependencies:[p.bT,E.wS,L.Yh,Ye.V,p.Jj],styles:[".survey-content-container[_ngcontent-%COMP%], .survey-content-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.survey-content-scrollable[_ngcontent-%COMP%]{height:100%}.survey-content-loader[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}"],changeDetection:0})}}return n})();var Ke=d(45424);let le=(()=>{class n{static{this.OfferBoxIdQueryParameter="boxId"}static{this.ManageBoxMnemonic="ManageBox"}static{this.ViewBoxContentMnemonic="ViewSupplierOfferBoxContent"}static{this.ViewBoxMnemonic="ViewSupplierOfferBox"}constructor(t,r,i){this.principalPermissionService=t,this.boxStoreService=r,this.offerStoreService=i,this.canManageBox=!1,this.canViewBoxContent=!1}canActivate(t,r){return t.params[n.OfferBoxIdQueryParameter]&&(this.boxId=+t.params[n.OfferBoxIdQueryParameter],this.offerBox$=this.boxStoreService.getBoxById(this.boxId)),this.offerBox$.pipe((0,f.p)(s=>null!=s)).pipe((0,O.H)(s=>{const a=this.principalPermissionService.getActionsToCheck([n.ManageBoxMnemonic,n.ViewBoxContentMnemonic,n.ViewBoxMnemonic],s.EntityId,s.Guid);return this.principalPermissionService.hasPermissions(a)}),(0,B.M)(s=>{this.canManageBox=s[n.ManageBoxMnemonic],this.canViewBoxContent=s[n.ViewBoxContentMnemonic],s[n.ViewBoxContentMnemonic]&&this.offerStoreService.loadBoxOfferWrappers(this.boxId)}),(0,h.T)(s=>s[n.ViewBoxMnemonic]),(0,j.$)())}static{this.\u0275fac=function(r){return new(r||n)(e.KVO(c.N49),e.KVO(c.o2P),e.KVO(c.fRX))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac})}}return n})(),gn=(()=>{class n extends N.$G{static{this.BoxIdQueryParameter="boxId"}constructor(t,r,i,s,a,l,u,m,b){super(t),this.boxStoreService=r,this.requirementsStoreService=i,this.tenderSupplierOfferBoxGuard=s,this.offerStoreService=a,this.offerContentStoreService=l,this.route=u,this.routerStoreService=m,this.title=b,this.boxId$=this.routerStoreService.getIdFromParams(this.route.paramMap,n.BoxIdQueryParameter),this.subscriptions=[]}ngOnInit(){this.loadRequirements(),this.loadJsonOfferBlocks();const t=this.boxId$.pipe((0,v.n)(r=>this.boxStoreService.getBoxById(r)));this.subscriptions.push(t.pipe((0,f.p)(r=>!!r),(0,h.T)(r=>r.Name),(0,M.F)()).subscribe(r=>this.title.setTitle(r)))}ngOnDestroy(){this.offerStoreService.clearBoxOfferWrappers(this.tenderSupplierOfferBoxGuard.boxId),this.subscriptions.forEach(t=>t.unsubscribe())}loadRequirements(){const t=this.boxId$.subscribe(r=>{this.requirementsStoreService.loadRequirements(r)});this.subscriptions.push(t)}loadJsonOfferBlocks(){const t=this.boxId$.pipe((0,v.n)(r=>this.offerStoreService.getOfferWrappersByBoxId(r).pipe((0,h.T)(i=>({boxId:r,offerWrappers:i})))),(0,f.p)(({offerWrappers:i})=>!!i&&i.length>0)).subscribe(({boxId:r,offerWrappers:i})=>
1{i.forEach(s=>{s.OfferSubmission&&s.OfferSubmission.IsOfferOpen?this.offerContentStoreService.loadOfferContent(r,s.Offer.Id):this.offerContentStoreService.loadJsonOfferBlocksAction(r,s.Offer.Id,s.Offer.Guid,s.Offer.EntityId)})});this.subscriptions.push(t)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.o2P),e.rXU(c.$17),e.rXU(le),e.rXU(c.fRX),e.rXU(c.kW$),e.rXU(T.nX),e.rXU(c.o9Y),e.rXU(A.hE))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-box"]],inputs:{parentId:"parentId"},features:[e.Jv_([{provide:c.DKw,useClass:Ke.Z}]),e.Vt3],decls:1,vars:0,template:function(r,i){1&r&&e.nrm(0,"router-outlet")},dependencies:[T.n3],styles:["[_nghost-%COMP%]{display:flex;flex-grow:2;flex-direction:column}"]})}}return n})();var De=d(96697),bn=d(45926),qe=d(54154),ke=d(58583),ge=d(74854),_=d(89417),we=d(43684);const vn=(n,o)=>({"col-xs-8":n,"col-xs-6":o}),Sn=(n,o)=>({"col-xs-4":n,"col-xs-3":o}),xn=(n,o)=>({"text--lemon-2":n,"text--emerald0":o}),Tn=(n,o,t)=>({"text--lemon-2":n,"text--emerald0":o,"opacity--05":t});function In(n,o){1&n&&(e.j41(0,"th",24)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"str_Tender_offer_completion")))}function yn(n,o){if(1&n&&(e.j41(0,"span",35),e.EFF(1),e.k0s()),2&n){const t=o.ngIf,r=e.XpG(2).$implicit;e.Y8G("ngClass",e.sMw(3,Tn,t.answeredQuestionsCount<t.totalQuestionsCount,t.answeredQuestionsCount===t.totalQuestionsCount,r.IsDisabled)),e.R7$(),e.Lme(" ",t.answeredQuestionsCount,"/",t.totalQuestionsCount," ")}}function Cn(n,o){if(1&n&&(e.j41(0,"td",32),e.DNE(1,yn,2,7,"span",34),e.nI1(2,"async"),e.k0s()),2&n){const t=e.XpG().$implicit,r=e.XpG();e.R7$(),e.Y8G("ngIf",e.bMT(2,1,r.offerCompletionStatus$(t.Offer.Id)))}}function On(n,o){if(1&n){const t=e.RV6();e.j41(0,"tr",25),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG();return e.Njj(s.toggleOfferWrapperSelected(i))}),e.j41(1,"td",26)(2,"mat-checkbox",27),e.mxI("ngModelChange",function(i){const s=e.eBV(t).$implicit;return e.DH7(s.IsSelected,i)||(s.IsSelected=i),e.Njj(i)}),e.bIt("click",function(i){return e.eBV(t),e.Njj(i.preventDefault())}),e.k0s()(),e.j41(3,"td",28)(4,"span",29),e.EFF(5),e.k0s()(),e.j41(6,"td",30)(7,"span"),e.EFF(8),e.k0s()(),e.DNE(9,Cn,3,3,"td",31),e.j41(10,"td",32)(11,"span",33),e.EFF(12),e.nI1(13,"translate"),e.k0s()()()}if(2&n){const t=o.$implicit,r=o.index,i=o.last,s=e.XpG();e.AVh("pointer",!t.IsDisabled)("no-border",i),e.R7$(2),e.R50("ngModel",t.IsSelected),e.Y8G("disabled",t.IsDisabled),e.R7$(2),e.AVh("opacity--05",t.IsDisabled),e.R7$(),e.SpI(" ",r+1," "),e.R7$(2),e.AVh("opacity--05",t.IsDisabled),e.R7$(),e.SpI(" ",t.Offer.Name," "),e.R7$(),e.Y8G("ngIf",!s.isDocumentsRequirements),e.R7$(2),e.Y8G("ngClass",e.l_i(17,xn,!t.OfferSubmission,!!t.OfferSubmission)),e.R7$(),e.SpI(" ",e.bMT(13,15,t.OfferSubmission?"str_Tender_submitted":"str_Tender_not_submitted")," ")}}function Rn(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onAction())}),e.nrm(1,"i",37),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.isButtonDisabled),e.BMQ("id",t.getButtonId("cancel")),e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_unsubmit")," ")}}function Mn(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onAction())}),e.nrm(1,"i",39),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.isButtonDisabled),e.BMQ("id",t.getButtonId("submit")),e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_submit")," ")}}let We=(()=>{class n extends N.$G{constructor(t,r){super(t),this.viewContainerRef=t,this.dialogRef=r,this.isSubmitting=!0,this.isDocumentsRequirements=!1,this.selectedOffers=new e.bkB(!1),this.selectAll=!1,this.offerWrappersWithSelected=[],this.subscriptions=[]}ngOnInit(){this.offerWrappersWithSelected=[...this.offerWrappers].map(t=>({...t,IsDisabled:this.isSubmitting?t.OfferSubmission:!t.OfferSubmission}))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}close(){this.dialogRef&&this.dialogRef.close()}get titleKeyword(){return this.isSubmitting?"str_Tender_submit_offers":"str_Tender_unsubmit_offers"}onAction(){this.selectedOffers.emit(this.offerWrappersWithSelected.filter(t=>t.IsSelected).map(t=>
1t.Offer.Id)),this.close()}onToggleSelectAll(){this.offerWrappersWithSelected=this.offerWrappersWithSelected.map(t=>(t.IsDisabled||(t.IsSelected=this.selectAll),t))}toggleOfferWrapperSelected(t){t.IsDisabled||(t.IsSelected=!t.IsSelected)}get isButtonDisabled(){return!this.offerWrappersWithSelected.filter(t=>t.IsSelected).length}offerCompletionStatus$(t){return this.offersCompletionStatus$.pipe((0,h.T)(r=>r[t]))}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(ge.RN))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-submit-multiple-offers-dialog"]],inputs:{parentId:"parentId",isSubmitting:"isSubmitting",offerWrappers:"offerWrappers",offersCompletionStatus$:"offersCompletionStatus$",isDocumentsRequirements:"isDocumentsRequirements"},outputs:{selectedOffers:"selectedOffers"},features:[e.Vt3],decls:33,vars:24,consts:[[1,"nxcard","bg--white"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--ellipsis"],[1,"nxcard__header-options"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-close"],[1,"nxcard__body"],[1,"nxtable"],[1,"nxtable__header"],[1,"nxtable__header-row"],[1,"nxtable__header-title","select-all-cell"],["disableRipple","",3,"ngModelChange","change","ngModel"],[1,"nxtable__header-title","offer-number-cell"],[1,"nxtable__header-title",3,"ngClass"],["class","nxtable__header-title col-xs-3 text--right",4,"ngIf"],[1,"nxtable__header-title","text--right",3,"ngClass"],[1,"nxtable__body"],["class","nxtable__body-row",3,"pointer","no-border","click",4,"ngFor","ngForOf"],[1,"nxcard__footer"],[1,"nxcard__footer-options","flex-element--right"],["mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","","color","warn",3,"disabled","click",4,"ngIf"],[1,"nxtable__header-title","col-xs-3","text--right"],[1,"nxtable__body-row",3,"click"],[1,"nxtable__body-cell","select-offer-cell","overflow-hidden"],["disableRipple","",3,"ngModelChange","click","ngModel","disabled"],[1,"nxtable__body-cell","offer-number-cell"],[1,"text--grey35a","text--bold"],[1,"nxtable__body-cell"],["class","nxtable__body-cell text--right",4,"ngIf"],[1,"nxtable__body-cell","text--right"],[1,"text--bold","text--uppercase",3,"ngClass"],["class","text--bold",3,"ngClass",4,"ngIf"],[1,"text--bold",3,"ngClass"],["mat-button","",3,"click","disabled"],[1,"mdi","mdi-close-circle-outline","margin--right-5"],["mat-button","","color","warn",3,"click","disabled"],[1,"mdi","mdi-send","margin--right-5"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",5)(8,"button",6),e.bIt("click",function(){return i.close()}),e.nrm(9,"i",7),e.k0s()()(),e.j41(10,"ng-scrollbar",8)(11,"table",9)(12,"thead",10)(13,"tr",11)(14,"th",12)(15,"mat-checkbox",13),e.mxI("ngModelChange",function(a){return e.DH7(i.selectAll,a)||(i.selectAll=a),a}),e.bIt("change",function(){return i.onToggleSelectAll()}),e.k0s()(),e.j41(16,"th",14),e.EFF(17,"#"),e.k0s(),e.j41(18,"th",15)(19,"span"),e.EFF(20),e.nI1(21,"translate"),e.k0s()(),e.DNE(22,In,4,3,"th",16),e.j41(23,"th",17)(24,"span"),e.EFF(25),e.nI1(26,"translate"),e.k0s()()()(),e.j41(27,"tbody",18),e.DNE(28,On,14,20,"tr",19),e.k0s()()(),e.j41(29,"div",20)(30,"div",21),e.DNE(31,Rn,4,5,"button",22)(32,Mn,4,5,"button",23),e.k0s()()()),2&r&&(e.R7$(4),e.BMQ("id",i.getLabelId("dialogTitle")),e.R7$(),e.SpI(" ",e.bMT(6,12,i.titleKeyword)," "),e.R7$(3),e.BMQ("id",i.getButtonId("close")),e.R7$(7),e.R50("ngModel",i.selectAll),e.R7$(3),e.Y8G("ngClass",e.l_i(18,vn,i.isDocumentsRequirements,!i.isDocumentsRequirements)),e.R7$(2),e.JRh(e.bMT(21,14,"str_Tender_offer_name")),e.R7$(2),e.Y8G("ngIf",!i.isDocumentsRequirements),e.R7$(),e.Y8G("ngClass",e.l_i(21,Sn,i.isDocumentsRequirements,!i.isDocumentsRequirements)),e.R7$(2),e.JRh(e.bMT(26,16,"str_Tender_offer_submission")),e.R7$(3),e.Y8G("ngForOf",i.offerWrappersWithSelected),e.R7$(3),e.Y8G("ngIf",!i.isSubmitting),e.R7$(),e.Y8G("ngIf",i.isSubmitting))},dependencies:[p.YU,p.Sq,p.bT,_.BC,_.vS,k.iV,we.NZ,L.Yh,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:block;width:700px}.select-all-cell[_ngcontent-%COMP%], .select-offer-cell[_ngcontent-%COMP%]{width:50px;min-width:50px}.offer-number-cell[_ngcontent-%COMP%]{width:40px;min-width:40px}"]})}}return n})();var Pn=d(77e3),pe=d(30166),$e=d(23683);let ze=(()=>{class n extends N.$G{constructor(t,r,i,s){super(t),this.offerCreateRef=r,this.validationService=i,this.changeDetectorRefs=s,this.offerCreate=new e.bkB(!1),this.Name=new _.hs("",[_.k0.required,_.k0.maxLength(Pn.cT.CommonText),_.k0.minLength(1)]),this.createOffer=new _.J3({Name:this.Name}),this.subscriptions=[]}ngOnInit(){this.Name.setAsyncValidators(this.validationService.offerNameTaken(this.boxId,this.tenderParticipantId,null));const t=this.Name.statusChanges.subscribe(()=>{this.changeDetectorRefs.markForCheck()});this.subscriptions.push(t)}onCreateOffer(){this.createOffer.valid&&this.offerCreate.emit(this.Name.value)}close(){this.offerCreateRef.close()}ngOnDestroy(){for(const t of this.subscriptions)t&&t.unsubscribe()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(ge.RN),e.rXU(c.Bm6),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-offer-create"]],inputs:{boxId:"boxId",tenderParticipantId:"tenderParticipantId"},outputs:{offerCreate:"offerCreate"},features:[e.Vt3],decls:27,vars:27,consts:[[1,"nxcard","z1","bg--white"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--uppercase"],[1,"nxcard__header-options"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-close"],[1,"nxcard__body","nxcard__body--padding"],[3,"ngSubmit","formGroup"],[1,"text--grey50"],["nx1AutoTrim","","type","text","formControlName","Name","cdkFocusInitial","",1,"form-control",3,"focus","placeholder"],[3,"parentId","control"],[1,"nxcard__footer"],[1,"nxcard__footer-options","flex-element--right"],["mat-button","",3,"click"],["mat-button","","color","primary",3,"click","disabled"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",5)(8,"button",6),e.bIt("click",function(){return i.close()}),e.nrm(9,"i",7),e.k0s()()(),e.j41(10,"div",8)(11,"form",9),e.bIt("ngSubmit",function(){return i.onCreateOffer()}),e.j41(12,"div",10),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"input",11),e.nI1(16,"translate"),e.bIt("focus",function(a){return a.target.select()}),e.k0s(),e.nrm(17,"nx1-form-control-messages",12),e.k0s()(),e.j41(18,"div",13)(19,"div",14)(20,"button",15),e.bIt("click",function(){return i.close()}),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"button",16),e.bIt("click",function(){return i.onCreateOffer()}),e.EFF(24),e.nI1(25,"translate"),e.nI1(26,"uppercase"),e.k0s()()()()),2&r&&(e.R7$(4),e.BMQ("id",i.getLabelId("title")),e.R7$(),e.SpI(" ",e.bMT(6,15,"str_Suplier_offer_details_create_offer")," "),e.R7$(3),e.BMQ("id",i.getButtonId("close")),e.R7$(3),e.Y8G("formGroup",i.createOffer),e.R7$(),e.BMQ("id",i.getLabelId("offerName")),e.R7$(),e.JRh(e.bMT(14,17,"str_Common_name")),e.R7$(2),e.FS9("placeholder",e.bMT(16,19,"str_Supplier_offer_details_create_offer_default_name")),e.BMQ("id",i.getInputId("offerName")),e.R7$(2),e.Y8G("parentId",i.getId("offerName"))("control",i.Name),e.R7$(3),e.BMQ("id",i.getButtonId("cancel")),e.R7$(),e.SpI(" ",e.bMT(22,21,"str_Common_cancel")," "),e.R7$(2),e.Y8G("disabled",!i.createOffer.valid),e.BMQ("id",i.getButtonId("save")),e.R7$(),e.SpI(" ",e.bMT(26,25,e.bMT(25,23,"str_Common_create_offer"))," "))},dependencies:[_.qT,_.me,_.BC,_.cb,_.j4,_.JD,k.iV,pe.l,$e.R,p.Pc,R.D9],styles:["[_nghost-%COMP%]{display:block;width:450px}"],changeDetection:0})}}return n})();var Qe=d(45302),Je=d(61918),Dn=d(14529),kn=d(19486);const Ge=(n,o)=>({"mdi-chevron-down":n,"mdi-chevron-up":o});function wn(n,o){1&n&&e.nrm(0,"th",15)}function $n(n,o){if(1&n){const t=e.RV6();e.j41(0,"td",20)(1,"button",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.delete(i))}),e.nrm(2,"i",22),e.k0s()()}if(2&n){const t=e.XpG().index,r=e.XpG(3);e.R7$(),e.BMQ("id",r.getButtonId("deleteFile",t))}}function Gn(n,o){if(1&n){const t=e.RV6();e.j41(0,"tr",16)(1,"td",17),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.download(i))}
1),e.nrm(2,"i"),e.EFF(3),e.k0s(),e.j41(4,"td",18),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.download(i))}),e.j41(5,"div"),e.EFF(6),e.nI1(7,"bytes"),e.k0s()(),e.j41(8,"td",18),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.download(i))}),e.j41(9,"div"),e.EFF(10),e.nI1(11,"nx1date"),e.k0s()(),e.DNE(12,$n,3,1,"td",19),e.k0s()}if(2&n){const t=o.$implicit,r=o.last,i=o.index,s=e.XpG(3);e.AVh("no-border",r),e.R7$(),e.BMQ("id",s.getId("nameDownloadOffer",i)),e.R7$(),e.ZvI("mdi nx-attachment--",s.getIcon(t)," text--20px padding--right-10"),e.R7$(),e.SpI(" ",t.Name," "),e.R7$(2),e.BMQ("id",s.getLabelId("fileSize",i)),e.R7$(),e.JRh(e.bMT(7,12,t.Size)),e.R7$(3),e.BMQ("id",s.getLabelId("fileCreatedDate",i)),e.R7$(),e.JRh(e.i5U(11,14,t.CreatedDate,"ShortDateTime")),e.R7$(2),e.Y8G("ngIf",s.canEdit)}}function En(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"table",5)(2,"thead",6)(3,"tr",7)(4,"th",8),e.nI1(5,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return i.orderBy="Name",e.Njj(i.direction="desc"==i.direction?"asc":"desc")}),e.j41(6,"a"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"i",9),e.k0s(),e.j41(10,"th",10),e.nI1(11,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return i.orderBy="Size",e.Njj(i.direction="desc"==i.direction?"asc":"desc")}),e.j41(12,"a"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.nrm(15,"i",9),e.k0s(),e.j41(16,"th",11),e.nI1(17,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return i.orderBy="CreatedDate",e.Njj(i.direction="desc"==i.direction?"asc":"desc")}),e.j41(18,"a"),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.nrm(21,"i",9),e.k0s(),e.DNE(22,wn,1,0,"th",12),e.k0s()(),e.j41(23,"tbody",13),e.DNE(24,Gn,13,17,"tr",14),e.nI1(25,"sort"),e.k0s()()()}if(2&n){const t=e.XpG().$implicit,r=e.XpG();e.R7$(4),e.AVh("nxtable__header-title--selected","Name"==r.orderBy)("col-sm-6",r.canEdit),e.FS9("title",e.bMT(5,22,"str_Common_filename")),e.BMQ("id",r.getId("filenameSort")),e.R7$(3),e.JRh(e.bMT(8,24,"str_Common_filename")),e.R7$(2),e.Y8G("ngClass",e.l_i(38,Ge,"Name"==r.orderBy&&"desc"==r.direction,"Name"==r.orderBy&&"asc"==r.direction)),e.R7$(),e.AVh("nxtable__header-title--selected","Size"==r.orderBy),e.FS9("title",e.bMT(11,26,"str_Multi_upload_size")),e.BMQ("id",r.getId("sizeSort")),e.R7$(3),e.JRh(e.bMT(14,28,"str_Multi_upload_size")),e.R7$(2),e.Y8G("ngClass",e.l_i(41,Ge,"Size"==r.orderBy&&"desc"==r.direction,"Size"==r.orderBy&&"asc"==r.direction)),e.R7$(),e.AVh("nxtable__header-title--selected","CreatedDate"==r.orderBy),e.FS9("title",e.bMT(17,30,"str_Common_date_uploaded")),e.BMQ("id",r.getId("dateSort")),e.R7$(3),e.JRh(e.bMT(20,32,"str_Common_date_uploaded")),e.R7$(2),e.Y8G("ngClass",e.l_i(44,Ge,"CreatedDate"==r.orderBy&&"desc"==r.direction,"CreatedDate"==r.orderBy&&"asc"==r.direction)),e.R7$(),e.Y8G("ngIf",r.canEdit),e.R7$(2),e.Y8G("ngForOf",e.brH(25,34,t,r.orderBy,r.direction))}}function Bn(n,o){if(1&n&&(e.j41(0,"div",23)(1,"div",24)(2,"figure",25),e.qSk(),e.j41(3,"svg",26),e.nrm(4,"circle",27),e.k0s(),e.joV(),e.nrm(5,"i",28),e.k0s(),e.j41(6,"h2",29),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()),2&n){const t=e.XpG(2);e.R7$(6),e.BMQ("id",t.getLabelId("noSuppliers")),e.R7$(),e.SpI(" ",e.bMT(8,2,"str_Tender_no_documents_in_offer")," ")}}function Fn(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,En,26,47,"div",3)(2,Bn,9,4,"div",4),e.k0s()),2&n){const t=o.$implicit;e.R7$(),e.Y8G("ngIf",(null==t?null:t.length)>0),e.R7$(),e.Y8G("ngIf",!(null!=t&&t.length))}}function Nn(n,o){1&n&&(e.j41(0,"div",30),e.nrm(1,"mat-spinner",31),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let He=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l){super(t),this.offerContentStoreService=r,this.documentService=i,this.dialogService=s,this.sessionService=a,this.localizationService=l,this.orderBy="Name",this.direction="asc",this.subscriptions=[],this.inEdit=!1}ngOnInit(){this.subscriptions.push(this.sessionService.currentUser$.subscribe(t=>this.currentUser=t)),this.initContent()}ngOnChanges(t){t.offer&&t.offer.currentValue!==t.offer.previousValue&&this.initContent()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}initContent(){this.offerDocuments$=this.offerContentStoreService.getDocumentsByOfferId(this.offer.Id),this.subscriptions.push(this.offerContentStoreService.getOfferBlockByOfferIdAndRequirement
1(this.offer.Id).subscribe(t=>{this.offerBlock=t,this.cancelUploadIfLockedAndUploading()}))}addDocuments(t){this.inEdit=!1,this.offerContentStoreService.addDocuments(this.box.Id,this.offer.Id,t)}download(t){this.subscriptions.push(this.documentService.downloadDocumentByGuid(t.Guid).subscribe())}delete(t){const r=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Common_file_will_be_deleted",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!1,showCheckbox:!1}).pipe((0,f.p)(i=>i.confirmed)).subscribe(i=>{this.offerContentStoreService.deleteDocument(this.box.Id,this.offer.Id,t)});this.subscriptions.push(r)}getIcon(t){return this.documentService.getDocumentIconFromFileName(t.Name)}openFileSelect(){this.documentsUploadComponent.openFileSelect()}onUploadStart(){this.offerContentStoreService.lockOfferBlock(this.box.Id,this.offer.Id),this.inEdit=!0}onCancelUpload(){this.offerBlock&&this.offerBlock.LockedByUserId===this.currentUser.Id&&this.offerContentStoreService.unlockOfferBlock(this.box.Id,this.offerBlock),this.inEdit=!1}hasChanges(){return this.inEdit}cancelUploadIfLockedAndUploading(){this.offerBlock&&null!==this.offerBlock.LockedByUserId&&this.offerBlock.LockedByUserId!==this.currentUser.Id&&this.inEdit&&this.documentsUploadComponent&&(this.documentsUploadComponent.cancelUpload(),this.subscriptions.push(this.dialogService.confirm({titleKeyword:"str_Common_warning",textContent:this.localizationService.instant("str_Offer_locked_by")+" "+this.offerBlock.LockedByUserName,confirmationType:"alert",okKeyword:"str_Common_ok",requirePassword:!1,showCheckbox:!1}).subscribe()))}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.kW$),e.rXU(c.DKw),e.rXU(S.o3),e.rXU(c.Qow),e.rXU(c.PiF))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-supplier-offer-content-documents"]],viewQuery:function(r,i){if(1&r&&e.GBs(Je.p,7),2&r){let s;e.mGM(s=e.lsd())&&(i.documentsUploadComponent=s.first)}},inputs:{offer:"offer",box:"box",canEdit:"canEdit"},features:[e.Vt3,e.OA$],decls:5,vars:6,consts:[["loading",""],[1,"hide",3,"save","cancel","uploadStart","showConsentCheckbox","keyword"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","bg--grey5a no-files-container text--center text--grey30 no-contents--animate",4,"ngIf"],[1,"nxtable"],[1,"nxtable__header"],[1,"nxtable__header-row"],[1,"nxtable__header-title","nxtable__header-title--sortable","col-sm-7",3,"click","title"],[1,"mdi",3,"ngClass"],[1,"nxtable__header-title","nxtable__header-title--sortable","col-sm-2","text--right",3,"click","title"],[1,"nxtable__header-title","nxtable__header-title--sortable","col-sm-3","text--right",3,"click","title"],["class","nxtable__header-title col-sm-1",4,"ngIf"],[1,"nxtable__body"],["class","nxtable__body-row",3,"no-border",4,"ngFor","ngForOf"],[1,"nxtable__header-title","col-sm-1"],[1,"nxtable__body-row"],[1,"nxtable__body-cell","nxtable__body-cell--file","pointer",3,"click"],[1,"nxtable__body-cell","text--right","pointer",3,"click"],["class","nxtable__body-cell nxtable__body-cell--button text--right",4,"ngIf"],[1,"nxtable__body-cell","nxtable__body-cell--button","text--right"],["mat-icon-button","","disableRipple","",1,"button--medium","button--table",3,"click"],[1,"mdi","mdi-close"],[1,"bg--grey5a","no-files-container","text--center","text--grey30","no-contents--animate"],[1,"align--center","display--flex","flex-column"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-file-hidden"],[1,"text--bold","margin--bottom-10"],[1,"align--center","content-center","display--flex","flex-grow--2","full-height","text--grey40a"],[3,"diameter"]],template:function(r,i){if(1&r){const s=e.RV6();e.j41(0,"nx1-documents-upload",1),e.bIt("save",function(l){return e.eBV(s),e.Njj(i.addDocuments(l))})("cancel",function(){return e.eBV(s),e.Njj(i.onCancelUpload())})("uploadStart",function(){return e.eBV(s),e.Njj(i.onUploadStart())}),e.k0s(),e.DNE(1,Fn,3,2,"div",2),e.nI1(2,"async"),e.DNE(3,Nn,2,1,"ng-template",null,0,e.C5r)}if(2&r){const s=e.sdS(4);e.Y8G("showConsentCheckbox",!1)("keyword","str_Common_upload"),e.R7$(),e.Y8G("ngIf",e.bMT(2,4,i.offerDocuments$))("ngIfElse",s)}},dependencies:[p.YU,p.Sq,p.bT,k.iV,E.wS,Je.p,p.Jj,R.D9,Dn.c,kn.FC,Re.O],styles:["[_nghost-%COMP%]{display:block}
1.offer-name[_ngcontent-%COMP%]{line-height:40px}.separator[_ngcontent-%COMP%]{border:1px solid rgb(204,204,204);margin:0 12px}.no-files-container[_ngcontent-%COMP%]{padding:50px 25px}.uploading-files-container[_ngcontent-%COMP%]{border-top:1px solid rgb(230,230,230)}@media only screen and (max-width: 767px){[_nghost-%COMP%]   .nxtable__body-cell[_ngcontent-%COMP%]:first-child, .nxtable__header-title[_ngcontent-%COMP%]:first-child{width:55%}[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(2), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(2){display:none}[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:last-child{width:45px}}@media only screen and (max-width: 425px){[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(2), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(2), [_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(3), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(3){display:none}}"],changeDetection:0})}}return n})();var jn=d(63573),ee=d(46879),be=d(51220),Xn=d(17644),Ee=d(87196),Be=d(84481),Vn=d(26231);function Un(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-table-of-content-card",4),e.bIt("selectSurveyLevel",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.selectSurvey(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.last,i=o.index,s=e.XpG(2);e.AVh("margin--bottom-10",!r),e.Y8G("parentId",s.getId(i))("surveyLevel",t)("offer",s.offer)}}function Ln(n,o){if(1&n&&(e.qex(0),e.DNE(1,Un,1,5,"nx1-table-of-content-card",3),e.nI1(2,"async"),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",e.bMT(2,1,t.surveyLevels$))}}function An(n,o){1&n&&(e.j41(0,"div",5),e.nrm(1,"mat-spinner",6),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let Yn=(()=>{class n extends g.$G{get offer(){return this._offer}set offer(t){this._offer=t,this.areLoadedSurveyResultsByOfferId$=this.offerContentStoreService.getAreLoadedSurveyResultsByOfferId(this.offer.Id)}constructor(t,r,i,s,a){super(t),this.viewContainerRef=t,this.requirementsStoreService=r,this.offerContentStoreService=i,this.router=s,this.route=a,this.subscriptions=[]}ngOnInit(){this.surveyLevels$=this.requirementsStoreService.getSurveyLevelTree()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}selectSurvey(t){const r=t[0],i=t[1],s={};i&&i.Id&&(s.groupId=i.Id),this.router.navigate(["survey",r.Id],{relativeTo:this.route,queryParams:s})}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.$17),e.rXU(c.kW$),e.rXU(T.Ix),e.rXU(T.nX))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-supplier-offer-content"]],inputs:{parentId:"parentId",offer:"offer"},features:[e.Vt3],decls:5,vars:4,consts:[["loading",""],[1,"padding--25"],[4,"ngIf","ngIfElse"],[3,"parentId","margin--bottom-10","surveyLevel","offer","selectSurveyLevel",4,"ngFor","ngForOf"],[3,"selectSurveyLevel","parentId","surveyLevel","offer"],[1,"align--center","content-center","display--flex","flex-grow--2","full-height","text--grey40a"],[3,"diameter"]],template:function(r,i){if(1&r&&(e.j41(0,"div",1),e.DNE(1,Ln,3,3,"ng-container",2),e.nI1(2,"async"),e.DNE(3,An,2,1,"ng-template",null,0,e.C5r),e.k0s()),2&r){const s=e.sdS(4);e.R7$(),e.Y8G("ngIf",e.bMT(2,2,i.areLoadedSurveyResultsByOfferId$))("ngIfElse",s)}},dependencies:[p.Sq,p.bT,E.wS,Xe.O,p.Jj],styles:["[_nghost-%COMP%]{display:block}"]})}}return n})();const Kn=(n,o)=>({"flex-row":n,"flex-grow--2":o}),qn=()=>["str_Tender_upload_files_to_offer_tooltip"],Wn=n=>[n];function zn(n,o){if(1&n&&(e.j41(0,"span",32),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(3);e.BMQ("id",t.getLabelId("documentsCount")),e.R7$(),e.Lme(" ",t.requirements.length," ",t.requirements.length>1?e.bMT(2,3,"str_Tender_documents"):e.bMT(3,5,"str_Tender_document")," ")}}function Qn(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",33),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.requestRequirementsDownload(null==i.requirementBox?null:i.requirementBox.Id))}),e.nrm(2,"i",34),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",t.isZipInProgress),e.BMQ("id",t.getButtonId("RequestExport"))("title",e.bMT(1,3,"str_Tender_download_requirements"))}}function Jn(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}function Hn(n,o){if(1&n&&(e.j41(0,"div",36),e.nrm(1,"nx1-document-list",37),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Y8G("documents",t.requirements)("listType","inline-cards")("indexes",!0)}}function Zn(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,Jn,1,0,"nx1-requirements-empty-card",2),e.nI1(2,"async"),e.DNE(3,Hn,2,3,"div",35),e.nI1(4,"async"),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",!e.bMT(2,2,t.hasRequirements$)),e.R7$(2),e.Y8G("ngIf",e.bMT(4,4,t.hasRequirements$))}}function ei(n,o){1&n&&(e.qex(0),e.j41(1,"div",38),e.nrm(2,"mat-spinner",39),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.Y8G("diameter",60))}function ti(n,o){if(1&n&&(e.j41(0,"div",26)(1,"div",5)(2,"div",6)(3,"div",27)(4,"span",28),e.nI1(5,"translate"),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.DNE(8,zn,4,7,"span",29),e.nI1(9,"async"),e.k0s()(),e.j41(10,"div",15),e.DNE(11,Qn,3,5,"button",30),e.nI1(12,"async"),e.k0s()(),e.j41(13,"ng-scrollbar",31),e.DNE(14,Zn,5,6,"div",2),e.nI1(15,"async"),e.DNE(16,ei,3,1,"ng-container",2),e.nI1(17,"async"),e.k0s()()),2&n){let t,r;const i=e.XpG(2);e.R7$(4),e.FS9("title",e.bMT(5,7,"str_Tender_requirement_box_content_title")),e.BMQ("id",i.getLabelId("boxName")),e.R7$(2),e.SpI(" ",e.bMT(7,9,"str_Tender_documents")," "),e.R7$(2),e.Y8G("ngIf",e.bMT(9,11,i.hasRequirements$)),e.R7$(3),e.Y8G("ngIf",e.bMT(12,13,i.hasRequirements$)),e.R7$(3),e.Y8G("ngIf",null==(t=e.bMT(15,15,i.requirementBox$))?null:t.childContentLoaded),e.R7$(2),e.Y8G("ngIf",!(null!=(r=e.bMT(17,17,i.requirementBox$))&&r.childContentLoaded))}}function ni(n,o){if(1&n&&(e.j41(0,"span",40),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.FS9("title",null==t.offer?null:t.offer.Name),e.BMQ("id",t.getLabelId("offerName")),e.R7$(),e.JRh(null==t.offer?null:t.offer.Name)}}function ii(n,o){if(1&n&&(e.j41(0,"div",42)(1,"span",43),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.j41(5,"span",44),e.EFF(6),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Tender_offer_id")," "),e.R7$(4),e.SpI(" OF",t.firstRoundOfferId," ")}}function ri(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,ii,7,4,"div",41),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.isBulgarianConfiguration&&t.offerSubmission)}}function si(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",45),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.navigateToOffers())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.BMQ("id",t.getButtonId("backToOfferList")),e.R7$(),e.SpI(" ",e.bMT(2,2,"str_Tender_supplier_offer_details_back_to_list")," ")}}function oi(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",48),e.nI1(1,"async"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openFileSelect())}),e.nrm(2,"i",49),e.EFF(3),e.nI1(4,"translate"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("onboardingTooltipMessages",e.lJ4(8,qn))("onboardingTooltipShow",e.bMT(1,4,t.showOfferDocumentsTooltip$)),e.BMQ("id",t.getButtonId("attachFiles")),e.R7$(3),e.SpI(" ",e.bMT(4,6,"str_Common_upload")," ")}}function ai(n,o){if(1&n&&(e.j41(0,"div",46),e.DNE(1,oi,5,9,"button",47),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.isDocumentRequirements&&!t.isLocked)}}function li(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",33),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG().ngIf,s=e.XpG(2);return e.Njj(s.requestRequirementsDownload(i.Id))}),e.nrm(2,"i",34),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",t.isZipInProgress),e.BMQ("id",t.getButtonId("RequestExport"))("title",e.bMT(1,3,"str_Tender_download_requirements"))}}function ci(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",50),e.nI1(2,"translate"),e.bIt("click",function(){const i=e.eBV(t).ngIf,s=e.XpG(2);return e.Njj(s.navigateToRequirements(i.Id))}),e.nrm(3,"i",51),e.k0s(),e.DNE(4,li,3,5,"button",30),e.nI1(5,"async"),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(),e.BMQ("id",t.getButtonId("navigateToRequirements"))("title",e.bMT(2,3,"str_Tender_requirements")),e.R7$(3),e.Y8G("ngIf",e.bMT(5,5,t.hasRequirements$))}}function di(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",50),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.openTenderAwardMethod())}),e.nrm(2,"i",52),e.k0s()}if(2&n){const t=e.XpG(2);e.BMQ("id",t.getButtonId("openAwardMethod"))("title",e.bMT(1,2,"str_Tender_award_method"))}}function ui(n,o){if(1&n&&(e.j41(0,"button",53),e.nrm(1,"i",54),e.k0s()),2&n){e.XpG();const t=e.sdS(23),r=e.XpG();e.Y8G("matMenuTriggerFor",t),e.BMQ("id",r.getButtonId("menu"))}}function pi(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",57),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onDelete())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG(3);e.BMQ("id",t.getButtonId("menuDeleteOffer")),e.R7$(),e.SpI(" ",e.bMT(2,2,"str_Common_delete")," ")}}function fi(n,o){if(1&n&&(e.j41(0,"span",58),e.nI1(1,"translate"),e.j41(2,"button",59),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){const t=e.XpG(3);e.Y8G("tooltipMessages",e.eq3(9,Wn,e.bMT(1,5,null!=t.tender&&t.tender.IsCollectRequest?"str_Tender_collect_request_supplier_offer_details_not_allowed_to_delete_offer":"str_Tender_supplier_offer_details_not_allowed_to_delete_offer")))("tooltipPosition","top"),e.R7$(2),e.Y8G("disabled",!0),e.BMQ("id",t.getButtonId("menuDeleteOffer")),e.R7$(),e.SpI(" ",e.bMT(4,7,"str_Common_delete")," ")}}function mi(n,o){if(1&n&&e.DNE(0,pi,3,4,"button",55)(1,fi,5,11,"span",56),2&n){const t=e.XpG(2);e.Y8G("ngIf",t.canDeleteOffer),e.R7$(),e.Y8G("ngIf",!t.canDeleteOffer)}}function _i(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-supplier-application-categories",60),e.bIt("select",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onSelectApplicationCategories(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("applicationCategoriesCount",null==t.applicationCategories?null:t.applicationCategories.length)("tenderApplicationCategories",t.tenderApplicationCategories)("applicationCategories",t.applicationCategories)("parentTenderAwardedOffers",t.parentTenderAwardedOffers)("isReadOnly",t.hasQualificationEvaluation)("canManage",t.canManageApplicationCategories)("canSelectCategory",t.canSelectCategory)("isSubmitted",!!t.offerSubmission)}}function hi(n,o){if(1&n&&e.nrm(0,"nx1-supplier-offer-content-documents",61),2&n){const t=e.XpG(2);
1e.Y8G("offer",t.offer)("box",t.offerBox)("canEdit",t.canFillOffer&&!t.isLocked)}}function gi(n,o){if(1&n&&e.nrm(0,"nx1-supplier-offer-content",62),2&n){const t=e.XpG(2);e.Y8G("offer",t.offer)}}function bi(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}function vi(n,o){if(1&n){const t=e.RV6();e.j41(0,"div"),e.DNE(1,ti,18,19,"div",3),e.j41(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",7)(6,"div",8),e.DNE(7,ni,2,3,"span",9),e.j41(8,"nx1-inline-editable-section",10),e.bIt("edited",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onEdit(i))})("saved",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onSave(i))})("canceled",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCancel(i))})("keydown.Enter",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onSave(i))})("keydown.Escape",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCancel(i))})("keydown.control.Enter",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onEdit(i))}),e.j41(9,"div",11)(10,"form",12),e.nrm(11,"input",13)(12,"nx1-form-control-messages",14),e.k0s()()()(),e.DNE(13,ri,2,1,"div",2),e.k0s()(),e.j41(14,"div",15),e.DNE(15,si,3,4,"button",16)(16,ai,2,1,"div",17)(17,ci,6,7,"ng-container",2),e.nI1(18,"async"),e.DNE(19,di,3,4,"button",18),e.nI1(20,"async"),e.DNE(21,ui,2,2,"button",19),e.j41(22,"mat-menu",20,0),e.DNE(24,mi,2,2,"ng-template",21),e.k0s()()(),e.j41(25,"div",22,1),e.DNE(27,_i,1,8,"nx1-supplier-application-categories",23)(28,hi,1,3,"nx1-supplier-offer-content-documents",24)(29,gi,1,1,"nx1-supplier-offer-content",25)(30,bi,1,0,"nx1-requirements-empty-card",2),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.round?null:t.round.RequirementsType)===t.requirementsType.Documents),e.R7$(6),e.Y8G("ngIf",!t.isEdit),e.R7$(),e.Y8G("isEdit",t.isEdit)("canEdit",t.canFillOffer&&!t.isMultilotTender)("ngClass",e.l_i(23,Kn,t.isEdit,t.isEdit)),e.R7$(2),e.Y8G("formGroup",t.offerNameForm),e.R7$(),e.BMQ("id",t.getInputId("offerName")),e.R7$(),e.Y8G("control",t.name),e.R7$(),e.Y8G("ngIf",t.offer),e.R7$(2),e.Y8G("ngIf",t.offersCount>1),e.R7$(),e.Y8G("ngIf",t.canFillOffer),e.R7$(),e.Y8G("ngIf",e.bMT(18,19,(null==t.round?null:t.round.RequirementsType)!==t.requirementsType.Documents&&t.requirementBox$)),e.R7$(2),e.Y8G("ngIf",e.bMT(20,21,t.canViewAwardMethod$)&&!(null!=t.tender&&t.tender.IsCollectRequest)),e.R7$(2),e.Y8G("ngIf",null==t.tender?null:t.tender.AllowMultipleOffers),e.R7$(),e.Y8G("overlapTrigger",!0),e.R7$(5),e.Y8G("ngIf",(null==t.tender?null:t.tender.HasContinuousEvaluation)&&(null==t.tenderApplicationCategories?null:t.tenderApplicationCategories.length)>0&&!(null!=t.tender&&t.tender.IsCollectRequest)),e.R7$(),e.Y8G("ngIf",t.isDocumentRequirements),e.R7$(),e.Y8G("ngIf",t.isSurveyRequirements),e.R7$(),e.Y8G("ngIf",!t.isDocumentRequirements&&!t.isSurveyRequirements)}}let Ze=(()=>{class n extends g.$G{get canShowOfferSubmissionDetails(){return!(!this.offerSubmission||!this.offerSubmission.SubmissionTimestamp||!this.offerSubmission.SubmissionTimestamp.DocumentId&&!this.offer.ReceiptDocumentId)}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q,P,W,ne,ie,re,se,oe,me){super(t),this.router=r,this.route=i,this.tenderStoreService=s,this.tenderProcessStoreService=a,this.tenderSupplierOfferBoxGuard=l,this.tenderSupplierGuard=u,this.offerStoreService=m,this.employeesService=b,this.dialogService=x,this.offerContentStoreService=y,this.documentService=C,this.principalPermissionService=G,this.validationService=U,this.boxStoreService=q,this.loaderService=P,this.tasksService=W,this.changeDetectorRef=ne,this.requirementsStoreService=ie,this.applicationCategoriesStoreService=re,this.parentTenderService=se,this.notificationsService=oe,this.exportService=me,this.DeleteOfferMnemonic="DeleteOffer",this.offerContent=[],this.deleteEvent=new e.bkB,this.editName=new e.bkB,this.isDocumentRequirements=!1,this.isSurveyRequirements=!1,this.offerContentNew=[],this.subscriptions=[],this.isDeleteOfferPermissionCheckLoading=!1,this.isZipInProgress=!1,this.requirementsType=NX1.Model.Enums.TenderRequirementsType,this.name=new _.hs("",[_.k0.required,_.k0.maxLength(g.cT.CommonText)]),this.offerNameForm=new _.J3({Name:this.name}),this.isLocked=!1,this.isMultilotTender=!1,this.ViewAwardMethod="ViewAwardMethod"}ngOnInit(){this.canManageApplicationCategories=this.tenderSupplierOfferBoxGuard.canManageBox;const t=this.tenderProcessStoreService.getProcessRoundByBoxId(this.tenderSupplierOfferBoxGuard.boxId).pipe((0,f.p)(s=>!!s));this.offerNameForm.reset(this.offer),this.requirementBox$=t.pipe((0,v.n)(s=>this.boxStoreService.getCurrentTenderBoxByRoundIdAndBoxType(s.Id,NX1.Model.Enums.BoxType.Requirement))),this.canViewAwardMethod$=t.pipe((0,v.n)(s=>this.principalPermissionService.hasPermission(this.ViewAwardMethod,s.Guid,s.EntityId))),this.hasRequirements$=(0,Oe.y)(t,this.requirementBox$).pipe((0,v.n)(([s,a])=>(this.requirementBox=a,s.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Documents?this.documentService.getDocumentsByEntityMnemonicAndEntityGuid(a.EntityMnemonic,a.Guid):this.requirementsStoreService.getSurveyLevelTree())),(0,h.T)(s=>(this.requirements=s,this.changeDetectorRef.markForCheck(),!!s.length))),this.subscriptions.push(this.tenderSupplierOfferBoxGuard.offerBox$.subscribe(s=>{this.offerBox=s,this.documentService.boxId=s.Id})),this.subscriptions.push(this.tenderSupplierGuard.tender$.subscribe(s=>{this.tender=s,this.isMultilotTender=null!==this.tender.MainTenderId})),this.subscriptions.push(t.subscribe(s=>{s.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Documents&&(this.isDocumentRequirements=!0),s.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Surveys&&(this.isSurveyRequirements=!0)}));const r=this.offerContentStoreService.getIsLockedOffer(this.offer.Id).subscribe(s=>{this.isLocked=s});this.subscriptions.push(r),this.showOfferDocumentsTooltip$=this.offerContentStoreService.getDocumentsByOfferId(this.offer.Id).pipe((0,h.T)(s=>!!s&&0===s.length));const i=this.principalPermissionService.getActionsToCheck([this.DeleteOfferMnemonic],this.offer.EntityId,this.offer.Guid);this.canDeleteOffer$=this.principalPermissionService.hasPermissions(i).pipe((0,j.$)()),this.tender.HasContinuousEvaluation&&(this.applicationCategoriesStoreService.loadTenderApplicationCategories(this.tender.Id),this.applicationCategoriesStoreService.loadApplicationCategories(this.offer.Id),this.subscriptions.push((0,$.z)([this.applicationCategoriesStoreService.getTenderApplicationCategories(),this.applicationCategoriesStoreService.getApplicationCategories()]).pipe((0,f.p)(([s,a])=>!!s&&!!a)).subscribe(([s,a])=>{this.tenderApplicationCategories=s,this.applicationCategories=a.filter(l=>!!this.tenderApplicationCategories.find(u=>u.Id===l.TenderApplicationCategoryId&&u.IsEnabled)),this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.parentTenderService.getParentTenderAwardedOffersByOfferId(this.offer.Id).subscribe(s=>{this.parentTenderAwardedOffers=s,this.hasQualificationEvaluation=this.parentTenderAwardedOffers.length>0})))}ngOnChanges(t){this.offer&&(t.offer||t.canFillOffer||t.offerSubmission)&&(this.documentService.offerId=this.offer.Id,this.showOfferDocumentsTooltip$=this.offerContentStoreService.getDocumentsByOfferId(this.offer.Id).pipe((0,h.T)(r=>!!r&&0===r.length)))}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe();
1this.destroyOfferSubmissionDetailsDialog()}onDelete(){const t=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Common_confirm_with_password",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!0,showCheckbox:!1,actionMnemonic:"DeleteOffer",relatedObjectGuid:this.offer.Guid,relatedObjectEntityId:this.offer.EntityId}).subscribe(r=>{r.confirmed&&this.deleteEvent.emit(this.offer)});this.subscriptions.push(t)}onSave(t){if(this.offerNameForm.valid){this.isEdit=!1,this.editName.emit(this.isEdit);const r=Object.assign({},this.offer,this.offerNameForm.value);this.offerStoreService.updateOffer(this.offerBox.Id,r),this.name.clearAsyncValidators()}}onEdit(t){this.isEdit=!0,this.editName.emit(this.isEdit),this.name.setAsyncValidators(this.validationService.offerNameTaken(this.offerBox.Id,this.offer.TenderParticipantId,this.offer.Id))}onCancel(t){this.isEdit=!1,this.editName.emit(this.isEdit),this.name.clearAsyncValidators(),this.offerNameForm.reset(this.offer)}openProfile(){let t;t=this.tenderStoreService.getCurrentTender().pipe((0,V.Z)(r=>this.employeesService.getEmployeeByParticipantIdUserId(this.offer.TenderParticipantId,this.offerSubmission.SubmittedById))).subscribe(r=>{const i=new S.Pe;i.viewContainerRef=this.viewContainerRef,this.submittedByProfileRef=this.dialogService.open(Qe.l,i),this.submittedByProfileRef.componentInstance.employee=r,t.unsubscribe()})}openOfferSubmissionDetails(){if(this.destroyOfferSubmissionDetailsDialog(),this.canShowOfferSubmissionDetails){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.offerSubmissionDetailsDialogRef=this.dialogService.open(ae.i,t),this.offerSubmissionDetailsDialogRef.componentInstance.parentId=this.id,this.offerSubmissionDetailsDialogRef.componentInstance.offerName=this.offer.Name,this.offerSubmissionDetailsDialogRef.componentInstance.canEdit=!1,this.offerSubmissionDetailsDialogRef.componentInstance.downloadHtml=!0,this.offerSubmissionDetailsDialogRef.componentInstance.receiptDocumentIds=[this.offer.ReceiptDocumentId],this.offerSubmissionDetailsDialogRef.componentInstance.submittedByName=this.offerSubmission.SubmittedByName,this.offerSubmissionDetailsDialogRef.componentInstance.timestamp=this.offerSubmission.SubmissionTimestamp}}openFileSelect(){this.supplierOfferContentDocumentsBlockComponent.openFileSelect()}hasChanges(){return this.supplierOfferContentDocumentsBlockComponent&&this.supplierOfferContentDocumentsBlockComponent.hasChanges()||this.isEdit}navigateToOffers(){return this.router.navigate(["../../../../../../../../"],{relativeTo:this.route})}openTenderAwardMethod(){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.dialogService.open(Ce.R,t)}navigateToRequirements(t){this.router.navigate(["../../../../requirements",t],{relativeTo:this.route})}requestRequirementsDownload(t){this.isZipInProgress=!0,this.openLoader(),this.subscriptions.push(this.exportService.generateExportAndDownload(this.tasksService.zipTenderRequirements.bind(this.tasksService),[t]).pipe((0,ye.W)(r=>(this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_Common_export_error","",{},r),this.changeDetectorRef.markForCheck(),Y.w))).subscribe(()=>{this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_Common_export_success","",{}),this.changeDetectorRef.markForCheck()}))}onSelectApplicationCategories(t){const r=[];t.forEach(s=>{const a={};s.IsSelected&&(a.OfferId=this.offer.Id,a.TenderApplicationCategoryId=s.Id,r.push(a))});const i={};i.OfferId=this.offer.Id,i.ApplicationCategoriesFromClient=r,this.applicationCategoriesStoreService.saveApplicationCategories(i)}openLoader(){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword="str_Tender_exporting_requirements"}closeLoader(){this.loaderService.close()}destroyOfferSubmissionDetailsDialog(){this.offerSubmissionDetailsDialogRef&&(this.offerSubmissionDetailsDialogRef.close(),this.offerSubmissionDetailsDialogRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.Ix),e.rXU(T.nX),e.rXU(c.$gx),e.rXU(c.i_v),e.rXU(le),e.rXU(F.W),e.rXU(c.fRX),e.rXU(c.rHP),e.rXU(S.o3),e.rXU(c.kW$),e.rXU(c.DKw),e.rXU(c.N49),e.rXU(c.Bm6),e.rXU(c.o2P),e.rXU(c.ZCd),e.rXU(c.w9v),e.rXU(e.gRc),e.rXU(c.$17),e.rXU(c.nNK),e.rXU(jn.a),e.rXU(c.I2c),e.rXU(c._Th))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-content"]],viewQuery:function(r,i){if(1&r&&e.GBs(He,5),2&r){let s;e.mGM(s=e.lsd())&&(i.supplierOfferContentDocumentsBlockComponent=s.first)}},inputs:{parentId:"parentId",offer:"offer",firstRoundOfferId:"firstRoundOfferId",offersCount:"offersCount",offerContent:"offerContent",tenderParticipant:"tenderParticipant",offerSubmission:"offerSubmission",canFillOffer:"canFillOffer",canDeleteOffer:"canDeleteOffer",isBulgarianConfiguration:"isBulgarianConfiguration",round:"roun
1d",canSelectCategory:"canSelectCategory"},outputs:{deleteEvent:"deleteEvent",editName:"editName"},features:[e.Vt3,e.OA$],decls:1,vars:1,consts:[["optionsMenu","matMenu"],["cardBody",""],[4,"ngIf"],["class","nxcard bg--white z1 margin--top-20 margin--bottom-20",4,"ngIf"],[1,"nxcard","bg--white","z1"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-column","flex-grow--2"],[1,"align--center","display--flex"],["class","text--ellipsis text--bold offer-name",3,"title",4,"ngIf"],[3,"edited","saved","canceled","keydown.Enter","keydown.Escape","keydown.control.Enter","isEdit","canEdit","ngClass"],["nx1-inline-editable-section-edit",""],[3,"formGroup"],["nx1AutoTrim","","autoSelect","","type","text","name","name","autocomplete","given-name","formControlName","Name",1,"input-inline-edit","text--bold"],[3,"control"],[1,"nxcard__header-options"],["mat-button","","class","margin--right-5 text--emerald-1",3,"click",4,"ngIf"],["class","pos--relative",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",3,"overlapTrigger"],["matMenuContent",""],[1,"nxcard__body","nxcard__body--no-scroll"],["class","display--block margin--25",3,"applicationCategoriesCount","tenderApplicationCategories","applicationCategories","parentTenderAwardedOffers","isReadOnly","canManage","canSelectCategory","isSubmitted","select",4,"ngIf"],[3,"offer","box","canEdit",4,"ngIf"],[3,"offer",4,"ngIf"],[1,"nxcard","bg--white","z1","margin--top-20","margin--bottom-20"],[1,"nxcard__header-title-content","flex-grow--2"],[1,"text--ellipsis",3,"title"],["class","text--grey30 text-12",4,"ngIf"],["mat-icon-button","",3,"disabled","click",4,"ngIf"],[1,"nxcard__body"],[1,"text--grey30","text-12"],["mat-icon-button","",3,"click","disabled"],[1,"mdi","mdi-download"],["class","padding--25",4,"ngIf"],[1,"padding--25"],[3,"documents","listType","indexes"],[1,"padding--40","display--flex","align--center","content-center"],[3,"diameter"],[1,"text--ellipsis","text--bold","offer-name",3,"title"],["class","text--12px text--normal",4,"ngIf"],[1,"text--12px","text--normal"],[1,"text--grey30"],[1,"text--grey65"],["mat-button","",1,"margin--right-5","text--emerald-1",3,"click"],[1,"pos--relative"],["onboardingTooltip","","mat-button","","color","primary","class","margin--right-5",3,"onboardingTooltipMessages","onboardingTooltipShow","click",4,"ngIf"],["onboardingTooltip","","mat-button","","color","primary",1,"margin--right-5",3,"click","onboardingTooltipMessages","onboardingTooltipShow"],[1,"mdi","mdi-plus"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-book-open-variant"],[1,"mdi","mdi-trophy"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"mdi","mdi-dots-vertical"],["mat-menu-item","",3,"click",4,"ngIf"],["tooltip","",3,"tooltipMessages","tooltipPosition",4,"ngIf"],["mat-menu-item","",3,"click"],["tooltip","",3,"tooltipMessages","tooltipPosition"],["mat-menu-item","",3,"disabled"],[1,"display--block","margin--25",3,"select","applicationCategoriesCount","tenderApplicationCategories","applicationCategories","parentTenderAwardedOffers","isReadOnly","canManage","canSelectCategory","isSubmitted"],[3,"offer","box","canEdit"],[3,"offer"]],template:function(r,i){1&r&&e.DNE(0,vi,31,26,"div",2),2&r&&e.Y8G("ngIf",i.offer)},dependencies:[p.YU,p.bT,_.qT,_.me,_.BC,_.cb,_.j4,_.JD,k.iV,ee.pI,ee.gy,ee.fS,ee.m1,E.wS,pe.l,$e.R,L.Yh,be.d,Xn.c,Ee.r,Be.m,de.z,he.d,Vn.i,Yn,He,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:block}.offer-name[_ngcontent-%COMP%]{line-height:40px}
1.separator[_ngcontent-%COMP%]{border:1px solid rgb(204,204,204);margin:0 12px}.no-files-container[_ngcontent-%COMP%]{padding:50px 25px}.uploading-files-container[_ngcontent-%COMP%]{border-top:1px solid rgb(230,230,230)}.center-content[_ngcontent-%COMP%]{margin:0 auto}.delete-loader[_ngcontent-%COMP%]{height:48px;padding:2px 10px}.text-12[_ngcontent-%COMP%]{font-size:12px}@media only screen and (max-width: 767px){[_nghost-%COMP%]   .nxtable__body-cell[_ngcontent-%COMP%]:first-child, .nxtable__header-title[_ngcontent-%COMP%]:first-child{width:55%}[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(2), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(2){display:none}[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:last-child{width:45px}}@media only screen and (max-width: 425px){[_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(2), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(2), [_nghost-%COMP%]   .nxtable__header-title[_ngcontent-%COMP%]:nth-child(3), .nxtable__body-cell[_ngcontent-%COMP%]:nth-child(3){display:none}}"]})}}return n})();var et=d(27224),fe=d(76077),tt=d(75346),Si=d(63362),xi=d(58035),Ti=d(67890);const Ii=(n,o)=>({"flex-row":n,"flex-grow--2":o}),nt=(n,o)=>({"text--lemon-2":n,"text--emerald0":o}),yi=n=>[n];function Ci(n,o){if(1&n&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.FS9("title",t.offerWrapper.Offer.Name),e.BMQ("id",t.getLabelId("offerName")),e.R7$(),e.JRh(t.offerWrapper.Offer.Name)}}function Oi(n,o){if(1&n&&(e.j41(0,"div",23)(1,"span",24),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.j41(5,"span",25),e.EFF(6),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_offer_id")," "),e.R7$(3),e.BMQ("id",t.getLabelId("offerId")),e.R7$(),e.SpI(" OF",t.offerWrapper.Offer.Id," ")}}function Ri(n,o){1&n&&e.nrm(0,"i",29)}function Mi(n,o){if(1&n&&(e.j41(0,"div",20),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("ngClass",e.l_i(3,nt,t.offerCompletion.answeredQuestionsCount<t.offerCompletion.totalQuestionsCount,t.offerCompletion.answeredQuestionsCount===t.offerCompletion.totalQuestionsCount)),e.R7$(),e.Lme(" ",t.offerCompletion.answeredQuestionsCount,"/",t.offerCompletion.totalQuestionsCount," ")}}function Pi(n,o){if(1&n&&(e.qex(0),e.DNE(1,Ri,1,0,"i",26)(2,Mi,2,6,"div",27),e.nrm(3,"i",28),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.offerCompletion),e.R7$(),e.Y8G("ngIf",t.offerCompletion)}}function Di(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",30),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"i",28),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Lme(" ",null==t.offerCompletion?null:t.offerCompletion.koMissed," ",e.bMT(3,2,"str_Survey_ko_missed")," ")}}function ki(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",37),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onDelete())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG(3);e.BMQ("id",t.getButtonId("menuDeleteOffer")),e.R7$(),e.SpI(" ",e.bMT(2,2,"str_Common_delete")," ")}}function wi(n,o){if(1&n&&(e.j41(0,"span",38),e.nI1(1,"translate"),e.j41(2,"button",39),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){const t=e.XpG(3);e.Y8G("tooltipMessages",e.eq3(9,yi,e.bMT(1,5,"str_Tender_supplier_offer_details_not_allowed_to_delete_offer")))("tooltipPosition","top"),e.R7$(2),e.Y8G("disabled",!0),e.BMQ("id",t.getButtonId("menuDeleteOffer")),e.R7$(),e.SpI(" ",e.bMT(4,7,"str_Common_delete")," ")}}function $i(n,o){1&n&&(e.j41(0,"div",40),e.nrm(1,"mat-spinner",41),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",35))}function Gi(n,o){if(1&n&&e.DNE(0,ki,3,4,"button",36)(1,wi,5,11,"ng-template",null,1,e.C5r)(3,$i,2,1,"ng-template",null,2,e.C5r),2&n){const t=e.sdS(2),r=e.XpG(2);e.Y8G("ngIf",r.canDeleteOffer)("ngIfElse",t)}}function Ei(n,o){if(1&n&&(e.j41(0,"div",31)(1,"button",32),e.nrm(2,"i",33),e.k0s(),e.j41(3,"mat-menu",34,0),e.DNE(5,Gi,5,2,"ng-template",35),e.k0s()()),2&n){const t=e.sdS(4),r=e.XpG();e.R7$(),e.Y8G("matMenuTriggerFor",t),e.BMQ("id",r.getButtonId("menu")),e.R7$(2),e.Y8G("overlapTrigger",!0)}}let Bi=(()=>{class n extends xi.${constructor(t,r,i,s){super(t),this.principalPermissionService=r,this.dialogService=i,this.validationService=s,this.editName=new e.bkB,this.updateOffer=new e.bkB(!1),this.deleteOffer=new e.bkB(!1),this.openOffer=new e.bkB(!1),this.isEdit=!1,this.Name=new _.hs("",[_.k0.required,_.k0.maxLength(g.cT.CommonText)]),this.offerNameForm=new _.J3({Name:this.Name})}ngOnInit(){this.Name.reset(this.offerWrapper.Offer.Name)}ngOnChanges(t){t.offerWrapper&&t.offerWrapper.currentValue!==t.offerWrapper.previousValue&&this.Name.reset(this.offerWrapper.Offer.Name)}onEdit(t){this.isEdit=!0,this.editName.emit(this.isEdit),this.Name.setAsyncValidators(this.validationService.offerNameTaken(this.offerBoxId,this.offerWrapper.Offer.TenderParticipantId,this.offerWrapper.Offer.Id)
1)}onCancel(t){this.isEdit=!1,this.editName.emit(this.isEdit),this.Name.clearAsyncValidators(),this.offerNameForm.reset(this.offerWrapper.Offer)}onSave(){if(this.offerNameForm.valid){const t={...this.offerWrapper.Offer,Name:this.Name.value};this.isEdit=!1,this.editName.emit(this.isEdit),this.updateOffer.emit(t),this.Name.clearAsyncValidators()}}onDelete(){const t=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Common_confirm_with_password",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!0,showCheckbox:!1,actionMnemonic:"DeleteOffer",relatedObjectGuid:this.offerWrapper.Offer.Guid,relatedObjectEntityId:this.offerWrapper.Offer.EntityId}).subscribe(r=>{r.confirmed&&this.deleteOffer.emit(this.offerWrapper.Offer),t.unsubscribe()})}onOpen(){this.openOffer.emit(this.offerWrapper.Offer.Id)}get canEditOfferName(){return this.canFillOffer&&!this.isMultilotTender}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.N49),e.rXU(S.o3),e.rXU(c.Bm6))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-info"]],inputs:{parentId:"parentId",index:"index",offerWrapper:"offerWrapper",offerCompletion:"offerCompletion",isDocumentsRequirements:"isDocumentsRequirements",isBulgarianConfiguration:"isBulgarianConfiguration",isMultilotTender:"isMultilotTender",canManageBox:"canManageBox",canFillOffer:"canFillOffer",canDeleteOffer:"canDeleteOffer",offerBoxId:"offerBoxId"},outputs:{editName:"editName",updateOffer:"updateOffer",deleteOffer:"deleteOffer",openOffer:"openOffer"},features:[e.Vt3,e.OA$],decls:24,vars:24,consts:[["optionsMenu","matMenu"],["cannotDeleteOffer",""],["loadingTemplate",""],[1,"nxcard","bg--white","z1"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title","pointer",3,"click"],[1,"nxcard__header-title-content","flex-row","flex-grow--2"],[1,"align--center","display--flex","padding--right-15","shrink-0"],[1,"text--uppercase","text--grey40","text--bold"],[1,"flex-grow--2","full-width"],[1,"align--center","display--flex"],["class","text--ellipsis text--bold offer-name",3,"title",4,"ngIf"],[3,"edited","saved","canceled","keydown.Enter","keydown.Escape","keydown.control.Enter","click","isEdit","canEdit","ngClass"],["nx1-inline-editable-section-edit",""],[3,"formGroup"],["nx1AutoTrim","","autoSelect","","type","text","name","name","autocomplete","given-name","formControlName","Name",1,"input-inline-edit","text--bold"],[3,"control"],["class","text--12px text--normal",4,"ngIf"],[1,"display--flex","text--14px","text--uppercase"],[4,"ngIf"],[3,"ngClass"],["class","nxcard__header-options",4,"ngIf"],[1,"text--ellipsis","text--bold","offer-name",3,"title"],[1,"text--12px","text--normal"],[1,"text--grey30"],[1,"text--grey65"],["class","mdi mdi-loading mdi-spin text--grey40a",4,"ngIf"],[3,"ngClass",4,"ngIf"],[1,"mdi","mdi-checkbox-blank-circle","dot-separator"],[1,"mdi","mdi-loading","mdi-spin","text--grey40a"],[1,"text--rose0"],[1,"nxcard__header-options"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"mdi","mdi-dots-vertical"],["xPosition","before",3,"overlapTrigger"],["matMenuContent",""],["mat-menu-item","",3,"click",4,"ngIf","ngIfElse"],["mat-menu-item","",3,"click"],["tooltip","",3,"tooltipMessages","tooltipPosition"],["mat-menu-item","",3,"disabled"],[1,"display--flex","align--center","content-center","delete-loader","overflow-hidden"],[1,"center-content",3,"diameter"]],template:function(r,i){1&r&&(e.j41(0,"div",3)(1,"div",4)(2,"div",5),e.bIt("click",function(){return i.onOpen()}),e.j41(3,"div",6)(4,"div",7)(5,"span",8),e.EFF(6),e.nI1(7,"nx1NumberToLetter"),e.k0s()(),e.j41(8,"div",9)(9,"div",10),e.DNE(10,Ci,2,3,"span",11),e.j41(11,"nx1-inline-editable-section",12),e.bIt("edited",function(a){return i.onEdit(a)})("saved",function(){return i.onSave()})("canceled",function(a){return i.onCancel(a)})("keydown.Enter",function(){return i.onSave()})("keydown.Escape",function(a){return i.onCancel(a)})("keydown.control.Enter",function(a){return i.onEdit(a)})("click",function(a){return a.stopPropagation()}),e.j41(12,"div",13)(13,"form",14),e.nrm(14,"input",15)(15,"nx1-form-control-messages",16),e.k0s()()()(),e.DNE(16,Oi,7,5,"div",17),e.j41(17,"div",18),e.DNE(18,Pi,4,2,"ng-container",19)(19,Di,5,4,"ng-container",19),e.j41(20,"div",20),e.EFF(21),e.nI1(22,"translate"),e.k0s()()()()(),e.DNE(23,Ei,6,3,"div",21),e.k0s()()),2&r&&(e.R7$(6),e.SpI(" ",e.bMT(7,14,i.index),". "),e.R7$(4),e.Y8G("ngIf",!i.isEdit),e.R7$(),e.Y8G("isEdit",i.isEdit)("canEdit",i.canEditOfferName)("ngClass",e.l_i(18,Ii,i.isEdit,i.isEdit)),e.R7$(2),e.Y8G("formGroup",i.offerNameForm),e.R7$(),e.BMQ("id",i.getInputId("offerName")),e.R7$(),e.Y8G("control",i.Name),e.R7$(),e.Y8G("ngIf",i.isBulgarianConfiguration&&i.offerWrapper.OfferSubmission),e.R7$(2),e.Y8G("ngIf",!i.isDocumentsRequirements),e.R7$(),e.Y8G("ngIf",null==i.offerCompletion?null:i.offerCompletion.koMissed),e.R7$(),e.Y8G("ngClass",e.l_i(21,nt,!i.offerWrapper.OfferSubmission,!!i.offerWrapper.OfferSubmission)),e.R7$(),e.SpI(" ",e.bMT(22,16,i.offerWrapper.OfferSubmission?"str_Tender_submitted":"str_Tender_not_submitted")," "),e.R7$(2),e.Y8G("ngIf",i.canManageBox))},dependencies:[p.YU,p.bT,_.qT,_.me,_.BC,_.cb,_.j4,_.JD,k.iV,ee.pI,ee.gy,ee.fS,ee.m1,E.wS,pe.l,$e.R,be.d,Ee.r,Be.m,R.D9,Ti.W],styles:["[_nghost-%COMP%]{display:block}.delete-loader[_ngcontent-%COMP%]{height:48px;padding:2px 10px}"],changeDetection:0})}}return n})();var Fe=d(77913);function Fi(n,o){if(1&n&&(e.j41(0,"tr",18)(1,"td",19),e.EFF(2),e.k0s(),e.j41(3,"td",19),e.nrm(4,"nx1-timestamp-date",20),e.k0s()()),2&n){const t=o.$implicit,r=o.index,i=o.last,s=e.XpG();e.AVh("no-border",i),e.R7$(2),e.JRh(null==t||null==t.Offer?null:t.Offer.Name),e.R7$(2),e.Y8G("timestamp",s.isPrice?null==t.OfferSubmission?null:t.OfferSubmission.PriceDecryptedKeyProvidedTimestamp:null==t.OfferSubmission?null:t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp)("parentId",s.getId("submittionDateTimestamp",r))}}let Ni=(()=>{class n extends g.$G{constructor(t,r){super(t),this.dialogRef=r}ngOnInit(){}close(){this.dialogRef.close()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(ge.RN))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-private-key-timestamps-dialog"]],inputs:{offerWrappers:"offerWrappers",t
1itleKeyword:"titleKeyword",isPrice:"isPrice"},features:[e.Vt3],decls:29,vars:16,consts:[[1,"nxcard","z1","bg--white"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--uppercase"],[1,"nxcard__header-options"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-close"],[1,"nxcard__body"],[1,"nxtable","nxtable--border"],[1,"nxtable__header"],[1,"nxtable__header-row"],[1,"nxtable__header-title"],[1,"nxtable__body"],["class","nxtable__body-row",3,"no-border",4,"ngFor","ngForOf"],[1,"nxcard__footer"],[1,"nxcard__footer-options","flex-element--right"],["mat-button","",3,"click"],[1,"nxtable__body-row"],[1,"nxtable__body-cell"],[3,"timestamp","parentId"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",5)(8,"button",6),e.bIt("click",function(){return i.close()}),e.nrm(9,"i",7),e.k0s()()(),e.j41(10,"ng-scrollbar",8)(11,"table",9)(12,"thead",10)(13,"tr",11)(14,"th",12)(15,"span"),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"th",12)(19,"span"),e.EFF(20),e.nI1(21,"translate"),e.k0s()()()(),e.j41(22,"tbody",13),e.DNE(23,Fi,5,5,"tr",14),e.k0s()()(),e.j41(24,"div",15)(25,"div",16)(26,"button",17),e.bIt("click",function(){return i.close()}),e.EFF(27),e.nI1(28,"translate"),e.k0s()()()()),2&r&&(e.R7$(4),e.BMQ("id",i.getLabelId("title")),e.R7$(),e.SpI(" ",e.bMT(6,8,i.titleKeyword)," "),e.R7$(3),e.BMQ("id",i.getButtonId("close")),e.R7$(8),e.JRh(e.bMT(17,10,"str_Tender_private_key_dialog_offer_name")),e.R7$(4),e.JRh(e.bMT(21,12,"str_Tender_private_key_dialog_provided_on")),e.R7$(3),e.Y8G("ngForOf",i.offerWrappers),e.R7$(3),e.BMQ("id",i.getButtonId("cancel")),e.R7$(),e.JRh(e.bMT(28,14,"str_Common_close")))},dependencies:[p.Sq,k.iV,L.Yh,Fe.s,R.D9],styles:["[_nghost-%COMP%]{display:block;width:700px}"],changeDetection:0})}}return n})();function ji(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.k0s()(),e.j41(8,"div",8)(9,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openTimestamps(!1))}),e.nrm(10,"i",10),e.EFF(11),e.nI1(12,"translate"),e.k0s()()()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.SpI(" ",e.bMT(6,3,"str_Tender_private_key_provided_multiple_offers")," "),e.R7$(4),e.BMQ("id",t.getButtonId("openTimestamps")),e.R7$(2),e.SpI(" ",e.bMT(12,5,"str_Tender_private_key_open_timestamps")," ")}}function Xi(n,o){if(1&n&&(e.qex(0),e.DNE(1,ji,13,7,"div",3),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.hasProvidedQualityKey)}}function Vi(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.k0s()(),e.j41(8,"div",8)(9,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openTimestamps(!1))}),e.nrm(10,"i",10),e.EFF(11),e.nI1(12,"translate"),e.k0s()()()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.SpI(" ",e.bMT(6,3,"str_Tender_quality_private_key_provided_multiple_offers")," "),e.R7$(4),e.BMQ("id",t.getButtonId("openTimestamps")),e.R7$(2),e.SpI(" ",e.bMT(12,5,"str_Tender_private_key_open_timestamps")," ")}}function Ui(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.k0s()(),e.j41(8,"div",8)(9,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openTimestamps(!0))}),e.nrm(10,"i",10),e.EFF(11),e.nI1(12,"translate"),e.k0s()()()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.SpI(" ",e.bMT(6,3,"str_Tender_price_private_key_provided_multiple_offers")," "),e.R7$(4),e.BMQ("id",t.getButtonId("openPriceTimestamps")),e.R7$(2),e.SpI(" ",e.bMT(12,5,"str_Tender_private_key_open_timestamps")," ")}}function Li(n,o){if(1&n&&e.DNE(0,Vi,13,7,"div",3)(1,Ui,13,7,"div",3),2&n){const t=e.XpG(2);e.Y8G("ngIf",t.hasProvidedQualityKey),e.R7$(),e.Y8G("ngIf",t.hasProvidedPriceKey)}}function Ai(n,o){if(1&n&&(e.qex(0),e.DNE(1,Xi,2,1,"ng-container",2)(2,Li,2,2,"ng-template",null,0,e.C5r),e.bVm()),2&n){const t=e.sdS(3),r=e.XpG();e.R7$(),e.Y8G("ngIf",!r.round.OpeningOfPriceSeparately)("ngIfElse",t)}}let Yi=(()=>{class n extends g.$G{get hasProvidedQualityKey(){return this.qual
1ityTimestamps.length>0}get hasProvidedPriceKey(){return this.priceTimestamps.length>0}get qualityTimestamps(){return this.offerWrappers?this.offerWrappers.filter(t=>t&&t.OfferSubmission&&t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp):[]}get priceTimestamps(){return this.offerWrappers?this.offerWrappers.filter(t=>t&&t.OfferSubmission&&t.OfferSubmission.PriceDecryptedKeyProvidedTimestamp):[]}constructor(t,r){super(t),this.dialogService=r}ngOnInit(){}ngOnDestroy(){this.destroyTimestampsDialog()}openTimestamps(t){this.destroyTimestampsDialog();const r=new S.Pe;r.viewContainerRef=this.viewContainerRef,this.timestampsDialogRef=this.dialogService.open(Ni,r),this.timestampsDialogRef.componentInstance.titleKeyword=t?"str_Tender_private_key_dialog_price_title":"str_Tender_private_key_dialog_quality_title",this.timestampsDialogRef.componentInstance.offerWrappers=t?this.priceTimestamps:this.qualityTimestamps,this.timestampsDialogRef.componentInstance.isPrice=t}destroyTimestampsDialog(){this.timestampsDialogRef&&(this.timestampsDialogRef.close(),this.timestampsDialogRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-private-key-timestamps"]],inputs:{offerWrappers:"offerWrappers",round:"round"},features:[e.Vt3],decls:1,vars:1,consts:[["qualityPriceTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["class","nxcard margin--bottom-20 z1 bg--emerald3",4,"ngIf"],[1,"nxcard","margin--bottom-20","z1","bg--emerald3"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row","align--center"],[1,"nxcard__header-options"],["mat-button","",3,"click"],[1,"mdi","mdi-clock-outline"]],template:function(r,i){1&r&&e.DNE(0,Ai,4,2,"ng-container",1),2&r&&e.Y8G("ngIf",null==i.round?null:i.round.EnableEncryptOffers)},dependencies:[p.bT,k.iV,R.D9],changeDetection:0})}}return n})();const Ki=n=>[n],qi=(n,o)=>({"mdi-close-circle-outline":n,"mdi-certificate":o}),Wi=(n,o)=>({"mdi-send":n,"mdi-certificate":o});function zi(n,o){if(1&n&&e.nrm(0,"nx1-tender-explicite-status",16),2&n){const t=e.XpG().ngIf;e.Y8G("tender",t)("isBuyer",!1)}}function Qi(n,o){if(1&n&&(e.qex(0),e.DNE(1,zi,1,2,"nx1-tender-explicite-status",15),e.bVm()),2&n){const t=o.ngIf;e.R7$(),e.Y8G("ngIf",t.IsArchived||t.IsCanceled||t.IsPaused)}}function Ji(n,o){if(1&n&&(e.nrm(0,"nx1-locked-offer-block",17),e.nI1(1,"async"),e.nI1(2,"async")),2&n){let t;const r=e.XpG();e.Y8G("labelKeyword","str_Offer_locked_by")("boxId",null==r.box?null:r.box.Id)("offer",(null==(t=e.bMT(1,3,r.offerWrappers$))?null:t.length)>0?null==(t=e.bMT(2,5,r.offerWrappers$)[0])?null:t.Offer:null)}}function Hi(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-manage-private-key",18),e.nI1(1,"async"),e.bIt("unlock",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openUploadPrivateKey(!1))})("forgottenKey",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onForgottenKey())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("privateKey",t.privateKey)("canRequestNewKey",e.bMT(1,3,t.canRequestNewKey$))("canManageBox",t.canManageBox)}}function Zi(n,o){if(1&n&&(e.j41(0,"span",27),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Lme(" ",null==t.buyerOrganization?null:t.buyerOrganization.Name," ",e.bMT(2,2,"str_Tender_offer_submission_closed_by_company")," ")}}function er(n,o){if(1&n&&(e.j41(0,"div",19)(1,"div",20)(2,"div",21)(3,"figure",22),e.qSk(),e.j41(4,"svg",23),e.nrm(5,"circle",24),e.k0s(),e.joV(),e.nrm(6,"i",25),e.k0s(),e.j41(7,"h2",26),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"span",27),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.DNE(13,Zi,3,4,"span",28),e.nI1(14,"async"),e.k0s()()()),2&n){const t=e.XpG();e.R7$(7),e.BMQ("id",t.getLabelId("noSuppliers")),e.R7$(),e.JRh(e.bMT(9,4,"str_Tender_offer_submission_closed")),e.R7$(3),e.SpI(" ",e.bMT(12,6,"str_Tender_offer_submission_closed_tip")," "),e.R7$(2),e.Y8G("ngIf",e.bMT(14,8,t.tender$))}}function tr(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",42),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG().ngIf,s=e.XpG(3);return e.Njj(s.requestRequirementsDownload(i.Id))}),e.nrm(2,"i",43),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("disabled",t.isZipInProgress),e.BMQ("id",t.getButtonId("RequestExport"))("title",e.bMT(1,3,"str_Tender_download_requirements"))}}function nr(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",39),e.nI1(2,"translate"),e.bIt("click",function(){const i=e.eBV(t).ngIf,s=e.XpG(3);return e.Njj(s.navigateToRequirements(i.Id))}),e.nrm(3,"i",40),e.k0s(),e.DNE(4,tr,3,5,"button",41),e.nI1(5,"async"),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.BMQ("id",t.getButtonId("navigateToRequirements"))("title",e.bMT(2,3,"str_Tender_requirements")),e.R7$(3),e.Y8G("ngIf",e.bMT(5,5,t.hasRequirements$))}}function ir(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",39),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openTenderAwardMethod())}),e.nrm(2,"i",44),e.k0s()}if(2&n){const t=e.XpG(3);e.BMQ("id",t.getButtonId("openAwardMethod"))("title",e.bMT(1,2,"str_Tender_award_method"))}}function rr(n,o){if(1&n&&(e.j41(0,"div",33)(1,"div",34)(2,"div",35),e.DNE(3,nr,6,7,"ng-container",4),e.nI1(4,"async"),e.DNE(
15,ir,3,4,"button",36),e.nI1(6,"async"),e.k0s()(),e.j41(7,"div",37)(8,"figure",22),e.qSk(),e.j41(9,"svg",23),e.nrm(10,"circle",24),e.k0s(),e.joV(),e.nrm(11,"i",38),e.k0s(),e.j41(12,"h2",26),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"span",27),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()),2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("ngIf",e.bMT(4,5,t.requirementBox$)),e.R7$(2),e.Y8G("ngIf",e.bMT(6,7,t.canViewAwardMethod$)),e.R7$(7),e.BMQ("id",t.getLabelId("noSuppliers")),e.R7$(),e.JRh(e.bMT(14,9,"str_Tender_no_offer_created")),e.R7$(3),e.SpI(" ",e.bMT(17,11,"str_Tender_no_offer_created_tip")," ")}}function sr(n,o){if(1&n&&(e.j41(0,"span",53),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(3);e.BMQ("id",t.getLabelId("documentsCount")),e.R7$(),e.Lme(" ",t.requirements.length," ",t.requirements.length>1?e.bMT(2,3,"str_Tender_documents"):e.bMT(3,5,"str_Tender_document")," ")}}function or(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",42),e.nI1(1,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.requestRequirementsDownload(null==i.requirementBox?null:i.requirementBox.Id))}),e.nrm(2,"i",43),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",t.isZipInProgress),e.BMQ("id",t.getButtonId("RequestExport"))("title",e.bMT(1,3,"str_Tender_download_requirements"))}}function ar(n,o){1&n&&e.nrm(0,"nx1-requirements-empty-card")}function lr(n,o){if(1&n&&(e.j41(0,"div",55),e.nrm(1,"nx1-document-list",56),e.k0s()),2&n){const t=e.XpG(4);e.R7$(),e.Y8G("documents",t.requirements)("listType","inline-cards")("indexes",!0)}}function cr(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,ar,1,0,"nx1-requirements-empty-card",4),e.nI1(2,"async"),e.DNE(3,lr,2,3,"div",54),e.nI1(4,"async"),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",!e.bMT(2,2,t.hasRequirements$)),e.R7$(2),e.Y8G("ngIf",e.bMT(4,4,t.hasRequirements$))}}function dr(n,o){1&n&&(e.qex(0),e.j41(1,"div",57),e.nrm(2,"mat-spinner",58),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.Y8G("diameter",60))}function ur(n,o){if(1&n&&(e.j41(0,"div",45)(1,"div",46)(2,"div",47)(3,"div",48)(4,"span",49),e.nI1(5,"translate"),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.DNE(8,sr,4,7,"span",50),e.nI1(9,"async"),e.k0s()(),e.j41(10,"div",51),e.DNE(11,or,3,5,"button",41),e.nI1(12,"async"),e.k0s()(),e.j41(13,"ng-scrollbar",52),e.DNE(14,cr,5,6,"div",4),e.nI1(15,"async"),e.DNE(16,dr,3,1,"ng-container",4),e.nI1(17,"async"),e.k0s()()),2&n){let t,r;const i=e.XpG(2);e.R7$(4),e.FS9("title",e.bMT(5,7,"str_Tender_requirement_box_content_title")),e.BMQ("id",i.getLabelId("boxName")),e.R7$(2),e.SpI(" ",e.bMT(7,9,"str_Tender_documents")," "),e.R7$(2),e.Y8G("ngIf",e.bMT(9,11,i.hasRequirements$)),e.R7$(3),e.Y8G("ngIf",e.bMT(12,13,i.hasRequirements$)),e.R7$(3),e.Y8G("ngIf",null==(t=e.bMT(15,15,i.requirementBox$))?null:t.childContentLoaded),e.R7$(2),e.Y8G("ngIf",!(null!=(r=e.bMT(17,17,i.requirementBox$))&&r.childContentLoaded))}}function pr(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"nx1-tender-supplier-offer-info",60),e.nI1(2,"async"),e.bIt("updateOffer",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onUpdateOffer(i))})("deleteOffer",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onDeleteOffer(i))})("openOffer",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onOpenOffer(i))})("editName",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onNameEdit(i))}),e.k0s()()}if(2&n){const t=o.$implicit,r=o.index,i=o.last,s=e.XpG(3);e.R7$(),e.AVh("margin--bottom-20",!i),e.Y8G("parentId",s.getId(r))("index",r+1)("offerWrapper",t.offerWrapper)("offerCompletion",t.offerCompletion)("isDocumentsRequirements",s.isDocumentsRequirements)("isBulgarianConfiguration",e.bMT(2,13,s.isBulgarianConfiguration$))("isMultilotTender",s.isMultilotTender)("offerBoxId",s.box.Id)("canManageBox",s.canManageBox)("canFillOffer",s.offersFillPermission[t.offerWrapper.Offer.Guid])("canDeleteOffer",s.offersDeletePermission[t.offerWrapper.Offer.Guid])}}function fr(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,pr,3,15,"div",59),e.nI1(2,"async"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",e.bMT(2,2,t.offerWrappersWithCompletion$))("ngForTrackBy",t.TrackByFn)}}function mr(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-encrypted-section",61),e.bIt("unlock",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.openUploadPrivateKey(!1))}),e.k0s()}2&n&&e.Y8G("classes","nxcard z1")("canUnlock",!0)}function _r(n,o){if(1&n&&(e.j41(0,"div")(1,"div",29),e.DNE(2,rr,18,13,"div",30),e.nI1(3,"async"),e.nI1(4,"async"),e.DNE(
15,ur,18,19,"div",31)(6,fr,3,4,"div",4)(7,mr,1,2,"nx1-encrypted-section",32),e.k0s()()),2&n){let t;const r=e.XpG();e.R7$(2),e.Y8G("ngIf",0==(null==(t=e.bMT(3,4,r.offerWrappers$))?null:t.length)&&!1===e.bMT(4,6,r.isLoading$)),e.R7$(3),e.Y8G("ngIf",(null==r.round?null:r.round.RequirementsType)===r.requirementsType.Documents),e.R7$(),e.Y8G("ngIf",!r.encryptOffers||r.encryptOffers&&!!r.privateKey),e.R7$(),e.Y8G("ngIf",r.encryptOffers&&!r.privateKey)}}function hr(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",68),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onOpenOfferCreateDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",0!==t.offerNamesInEditModeCounter),e.BMQ("id",t.getButtonId("createOffer")),e.R7$(),e.SpI(" ",e.bMT(2,3,"str_Suplier_offer_details_create_offer")," ")}}function gr(n,o){if(1&n&&(e.j41(0,"span",69),e.nI1(1,"translate"),e.j41(2,"button",70),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){const t=e.XpG(2);e.Y8G("tooltipMessages",e.eq3(9,Ki,e.bMT(1,5,"str_Supplier_offer_details_maximum_amount_of_offers_reached")))("tooltipPosition","top"),e.R7$(2),e.Y8G("disabled",!0),e.BMQ("id",t.getButtonId("createOfferDisabled")),e.R7$(),e.SpI(" ",e.bMT(4,7,"str_Suplier_offer_details_create_offer")," ")}}function br(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",71),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.unsubmitOffers())}),e.nrm(1,"i",72),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.areSubmitUnsubmitButtonDisabled),e.BMQ("id",t.getButtonId("unsubmitOffer")),e.R7$(),e.Y8G("ngClass",e.l_i(6,qi,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(3,4,"str_Suplier_offer_details_unsubmit_offer")," ")}}function vr(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",73),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.submitOffers())}),e.nrm(1,"i",72),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.areSubmitUnsubmitButtonDisabled||0!==t.offerNamesInEditModeCounter),e.BMQ("id",t.getButtonId("submitOffer")),e.R7$(),e.Y8G("ngClass",e.l_i(6,Wi,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(3,4,"str_Suplier_offer_details_submit_offer")," ")}}function Sr(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",74),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.proceedToSumbission())}),e.nrm(1,"i",75),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.BMQ("id",t.getButtonId("proceedToSubmission")),e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Suplier_offer_details_proceed_to_submission")," ")}}function xr(n,o){if(1&n&&(e.j41(0,"span",62),e.DNE(1,hr,3,5,"button",63)(2,gr,5,11,"span",64)(3,br,4,9,"button",65)(4,vr,4,9,"button",66)(5,Sr,4,4,"button",67),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.canCreateOffer),e.R7$(),e.Y8G("ngIf",!t.canCreateOffer&&t.canViewCreateOffer),e.R7$(),e.Y8G("ngIf",!t.isMultilotTender&&t.canUnsubmitOffers),e.R7$(),e.Y8G("ngIf",t.viewSubmitOffers),e.R7$(),e.Y8G("ngIf",t.showProceedToSubmission)}}function Tr(n,o){1&n&&(e.j41(0,"div",76),e.nrm(1,"mat-spinner",58),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}function Ir(n,o){1&n&&(e.j41(0,"div",77),e.nrm(1,"mat-spinner",58),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let yr=(()=>{class n extends g.iD{static{this.BoxIdQueryParameter="boxId"}static{this.RoundIdQueryParameter="roundId"}static{this.CreateOfferMnemonic="CreateOffer"}static{this.ViewCreateOfferMnemonic="ViewCreateOffer"}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q,P,W,ne,ie,re,se,oe,me,ml,_l,hl){super(t,r,i),this.boxStoreService=s,this.offerStoreService=a,this.offerContentStoreService=l,this.tenderSupplierOfferBoxGuard=u,this.tenderSupplierGuard=m,this.requirementsStoreService=b,this.route=x,this.router=y,this.tenderStoreService=C,this.tenderProcessStoreService=G,this.principalPermissionService=U,this.dialogService=q,this.privateKeyStoreService=P,this.changeDetectorRef=W,this.scrollService=ne,this.systemSettingsStoreService=ie,this.consortiumMemberStoreService=re,this.currentTenderParticipantStoreService=se,this.multilotTenderService=oe,this.loaderService=me,this.tasksService=ml,this.notificationsService=_l,this.exportService=hl,this.returnUrlParam="returnUrl",this.CreateOfferMnemonic="CreateOffer",this.ViewCreateOfferMnemonic="ViewCreateOffer",this.SubmitOfferMnemonic="SubmitOffer",this.UnsubmitOfferMnemonic="UnsubmitOffer",this.FillOfferMnemonic="FillOffer",this.ViewSubmitOfferMnemonic="ViewSubmitOffer",this.DeleteOfferMnemonic="DeleteOffer",this.ViewSuppliersProvidePrivateKeyGuidance="ViewSuppliersProvidePrivateKeyGuidance",this.toolBreadcrumbPath=[],this.encryptOffers=!1,this.privateKey=null,this.tenderHasAllowedMultipleOffers=!1,this.showProceedToSubmission=!1,this.isMultilotTender=!1,this.reloadProvideKeyActionTypes=[ke.q1],this.isSubmittingOrUnsubmitting$=this.offerStoreService.getIsSubmittingOrUnsubmitting(),this.isLoadingUnSubmittableOffers=!1,this.areSubmitUnsubmitButtonDisabled=!1,this.offerNamesInEditModeCounter=0,this.isZipInProgress=!1,this.requirementsType=NX1.Model.Enums.TenderRequirementsType,this.permissions={},this.offersDeletePermission={},this.offersFillPermission={},this.offersPermissions={},this.canManageBox=!1,this.canViewBoxContent=!1,this.viewSubmitOffers=!1,this.canUnsubmitOffers=!1,this.ViewAwardMethod="ViewAwardMethod",this.ForgottenKeyMnemonic="ForgottenKey",this.subscriptions=[]}ngOnInit(){this.isBulgarianConfiguration$=this.systemSettingsStoreService.isBulgarianConfiguration();const t=this.route.paramMap.pipe((0,h.T)(l=>l.get(n.BoxIdQueryParameter)),(0,h.T)(l=>parseInt(l,10)),(0,M.F)()),r=this.route.paramMap.pipe((0,h.T)(l=>l.get(n.RoundIdQueryParameter)),(0,h.T)(l=>parseInt(l,10)),(0,M.F)());this.round$=r.pipe((0,v.n)(l=>this.tenderProcessStoreService.getProcessRound(l)),(0,f.p)(l=>!!l),(0,M.F)(null,l=>l.Id)),this.subscriptions.push(this.tenderStoreService.getCurrentTenderProcessPhase().subscribe(l=>{this.tenderPhase=l,this.changeDetectorRef.markForCheck()})),this.canViewAwardMethod$=this.round$.pipe((0,v.n)(l=>this.principalPermissionService.hasPermission(this.ViewAwardMethod,l.Guid,l.EntityId))),this.requirementBox$=this.round$.pipe((0,v.n)(l=>this.boxStoreService.getCurrentTenderBoxByRoundIdAndBoxType(l.Id,NX1.Model.Enums.BoxType.Requirement))),this.hasRequirements$=(0,Oe.y)(this.round$,this.requirementBox$).pipe((0,v.n)(([l,u])=>(this.requirementBox=u,l.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Documents?this.documentService.getDocumentsByEntityMnemonicAndEntityGuid(u.Entity
1Mnemonic,u.Guid):this.requirementsStoreService.getSurveyLevelTree())),(0,h.T)(l=>(this.requirements=l,this.changeDetectorRef.markForCheck(),!!l.length))),this.submittedOffersStatus$=this.round$.pipe((0,v.n)(l=>this.offerStoreService.getSubmittedOffersStatusByRoundId(l.Id))),this.tender$=this.tenderSupplierGuard.tender$.pipe((0,f.p)(l=>!!l),(0,De.s)(1)),this.subscriptions.push(this.tender$.pipe((0,f.p)(l=>!!l),(0,Ie.E)(this.tenderStoreService.getTenderBuyerOrganization())).subscribe(([l,u])=>{null==u&&this.tenderStoreService.loadBuyerOrganization(l),this.buyerOrganization=u}));const i=t.pipe((0,v.n)(l=>this.boxStoreService.getBoxById(l)));this.subscriptions.push(i.pipe((0,f.p)(l=>!!l)).subscribe(l=>{this.box=l,this.canViewBoxContent=this.tenderSupplierOfferBoxGuard.canViewBoxContent,this.canManageBox=this.tenderSupplierOfferBoxGuard.canManageBox,this.changeDetectorRef.markForCheck()})),this.offerWrappers$=t.pipe((0,v.n)(l=>this.offerStoreService.getOfferWrappersByBoxId(l))),this.offerWrappersWithCompletion$=this.offerWrappers$.pipe((0,f.p)(l=>!!l),(0,v.n)(l=>{const u=l.map(m=>m.Offer.Id);return this.offerContentStoreService.getOfferCompletionStatusByOfferIds(u).pipe((0,h.T)(m=>l.map(b=>({offerWrapper:b,offerCompletion:m[b.Offer.Id]}))))}
1)),this.isLoading$=(0,$.z)([this.offerStoreService.getBoxOfferWrappersLoading(),this.requirementsStoreService.getAreRequirementsLoaded().pipe((0,h.T)(l=>!l))]).pipe((0,h.T)(([l,u])=>l||u)),this.loadPrivateKey();const s=this.tenderStoreService.getCurrentTenderProcessPhase().pipe((0,I.K)(i),(0,v.n)(l=>{const u=this.principalPermissionService.getActionsToCheck([this.ViewSuppliersProvidePrivateKeyGuidance],l.EntityId,l.Guid);return this.principalPermissionService.hasPermissions(u)})).subscribe(l=>{this.permissions=l,this.changeDetectorRef.markForCheck()}),a=this.systemSettingsStoreService.getSystemSettings().subscribe(l=>{this.systemSettings=l,this.changeDetectorRef.markForCheck()});this.subscriptions.push(s,a),this.subscriptions.push((0,$.z)([this.tender$,this.offerWrappers$,this.currentTenderParticipantStoreService.getCurrentTenderParticipant()]).pipe((0,O.H)(([l,u,m])=>{if(1===u.length)return this.onOpenOffer(u[0].Offer.Id),Y.w;this.currentTenderParticipant=m,this.arePermissionsLoaded=!1;const b=null!==this.currentTenderParticipant.LeadTenderParticipantId?this.currentTenderParticipant.LeadTenderParticipantId:this.currentTenderParticipant.Id;this.consortiumMemberStoreService.loadConsortiumMembers(b),this.consortiumMembers$=this.consortiumMemberStoreService.getConsortiumMembersByTenderParticipantId(b),this.isMultilotTender=null!==l.MainTenderId,this.offerWrappers=u,this.tenderHasAllowedMultipleOffers=l.AllowMultipleOffers,this.offersCount=u.length,this.showProceedToSubmission=this.canManageBox&&this.isMultilotTender;const x=[];return this.offerWrappers.forEach(y=>{x.push(...this.principalPermissionService.getActionsToCheck([this.SubmitOfferMnemonic,this.UnsubmitOfferMnemonic,this.FillOfferMnemonic,this.ViewSubmitOfferMnemonic,this.DeleteOfferMnemonic],y.Offer.EntityId,y.Offer.Guid))}),x.push(...this.principalPermissionService.getActionsToCheck([this.CreateOfferMnemonic,this.ViewCreateOfferMnemonic],this.box.EntityId,this.box.Guid)),this.principalPermissionService.hasPermissionsByEntityIdAndGuid(x).pipe((0,f.p)(y=>!!y))})).subscribe(l=>{this.canViewCreateOffer=l[this.box.EntityId][this.box.Guid][this.ViewCreateOfferMnemonic],this.canCreateOffer=l[this.box.EntityId][this.box.Guid][this.CreateOfferMnemonic],this.offersPermissions={},this.viewSubmitOffers=!1,this.canUnsubmitOffers=!1,this.arePermissionsLoaded=!0,this.offerWrappers.forEach(u=>{this.offersPermissions[u.Offer.Guid]={},l[u.Offer.EntityId][u.Offer.Guid][this.ViewSubmitOfferMnemonic]&&(this.viewSubmitOffers=!0),l[u.Offer.EntityId][u.Offer.Guid][this.UnsubmitOfferMnemonic]&&(this.canUnsubmitOffers=!0),this.offersFillPermission[u.Offer.Guid]=l[u.Offer.EntityId][u.Offer.Guid][this.FillOfferMnemonic],this.offersDeletePermission[u.Offer.Guid]=l[u.Offer.EntityId][u.Offer.Guid][this.DeleteOfferMnemonic]}),this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.round$.subscribe(l=>this.round=l))}ngAfterContentInit(){this.scrollService.setScrollDirective(this.scrollbarComponent)}ngOnDestroy(){for(const t of this.subscriptions)t&&t.unsubscribe();this.destroyGeneratePrivateKey(),this.destroyUploadPrivateKey(),this.destroySubmitOfferDialog()}TrackByFn(t,r){return t}hasChanges(){return!!this.offerContents&&this.offerContents.filter(t=>t.hasChanges()).length>0}get currentPhaseProperties(){return this.tenderPhase&&this.box&&this.tenderPhase.TenderProcessRoundId===this.box.TenderProcessRoundId&&w.c.tender.phase.hasOwnProperty(this.tenderPhase.Name)?w.c.tender.phase[this.tenderPhase.Name].class:w.c.tender.phase.str_Tender_phase_awarding_not_visible_to_suppliers.class}decryptOfferBlocks(){this.privateKey?this.offerContentStoreService.decryptOfferBlocks(this.box.TenderId,this.box.Id):this.openUploadPrivateKey(!0)}openUploadPrivateKey(t){this.destroyUploadPrivateKey();const r=new S.Pe;if(r.viewContainerRef=this.viewContainerRef,this.uploadPrivateKeyRef=this.dialogService.open(qe.F,r),!0===t){this.uploadPrivateKeyRef.componentInstance.decryptAfterClose=!0;const i=this.uploadPrivateKeyRef.componentInstance.decryptKeys.subscribe(()=>{this.decryptOfferBlocks(),i.unsubscribe(),this.changeDetectorRef.markForCheck()})}}navigateToRequirements(t){this.router.navigate(["../../../../../../requirements",t],{relativeTo:this.route})}requestRequirementsDownload(t){this.isZipInProgress=!0,this.openLoader("str_Tender_exporting_requirements"),this.subscriptions.push(this.exportService.generateExportAndDownload(this.tasksService.zipTenderRequirements.bind(this.tasksService),[t]).pipe((0,ye.W)(r=>(this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_C
1ommon_export_error","",{},r),Y.w))).subscribe(()=>{this.isZipInProgress=!1,this.closeLoader(),this.notificationsService.open("str_Common_export_success","",{})}))}onForgottenKey(){this.openGeneratePrivateKey(!1)}onNameEdit(t){t?this.offerNamesInEditModeCounter++:this.offerNamesInEditModeCounter--}onDeleteOffer(t){this.openLoader("str_Tender_deleting_offer"),this.offerStoreService.deleteOffer(this.box.Id,t.Id)}createOffer(t,r,i){this.openLoader("str_Tender_creating_offer"),this.offerStoreService.createOffer(t,i,r)}onOpenOfferCreateDialog(){this.destroyCreateOfferDialog();const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.offerCreateRef=this.dialogService.open(ze,t),this.offerCreateRef.componentInstance.boxId=this.box.Id,this.offerCreateRef.componentInstance.tenderParticipantId=this.offerWrappers[0].Offer.TenderParticipantId,this.subscriptions.push(this.offerCreateRef.componentInstance.offerCreate.subscribe(r=>{this.createOffer(this.box.Id,r,this.offerWrappers[0].Offer.TenderParticipantId),this.offerCreateRef.componentInstance.close()}))}proceedToSumbission(){let t;t=this.tender$.subscribe(r=>{this.router.navigateByUrl(`/tender/reload?followUrl=/tender/${r.MainTenderId}/supplier/participations`),t&&t.unsubscribe()})}get isDocumentsRequirements(){return this.round?this.round.RequirementsType===NX1.Model.Enums.TenderRequirementsType.Documents:null}submitOffers(){this.destroySubmitMultipleOffersDialog(),this.setSubmitUnsubmitButtonsDisabledState(!0);const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.submitMultipleOffersDialogRef=this.dialogService.open(We,t),this.submitMultipleOffersDialogRef.componentInstance.parentId=this.id,this.submitMultipleOffersDialogRef.componentInstance.offerWrappers=this.offerWrappers,this.submitMultipleOffersDialogRef.componentInstance.isDocumentsRequirements=this.isDocumentsRequirements,this.submitMultipleOffersDialogRef.componentInstance.offersCompletionStatus$=this.offerContentStoreService.getOfferCompletionStatusByOfferIds(this.offerWrappers.map(a=>a.Offer.Id));let i,s,r=!0;i=this.submitMultipleOffersDialogRef.componentInstance.selectedOffers.asObservable().subscribe(a=>{const l=a.map(x=>({LotName:null,LotOrderNumber:null,OfferName:null,LotRoundId:this.box.TenderProcessRoundId,OfferBoxId:this.box.Id,OfferId:x}));let u=[],m=[];this.isLoadingUnSubmittableOffers=!0,r=!1;const b=this.multilotTenderService.getUnsubmittableOffers(l,this.box.TenderId).pipe((0,O.H)(x=>
1{if(this.isLoadingUnSubmittableOffers=!1,x.length){u=a.filter(C=>-1===x.findIndex(G=>G.OfferId===C)),m=this.filterLockedOffers(a,x);let y="";return x.sort((C,G)=>C.OfferId-G.OfferId).forEach(C=>{const U='<div class="margin--top-20 nxcard nxcard--border padding--top-10 padding--bottom-10"><span class="">'+(null!==C.OfferName?this.localizationService.instant("str_Tender_offer")+"&nbsp;"+C.OfferName+"</span>":"-</span>&nbsp;&nbsp;&nbsp;"+C.OfferId)+'<span class="padding--left-20"><label class="bg--rose0 text--white">'+C.ReasonUnfitForSubmission+"</label></span></div>";y+=U}),this.dialogService.confirm({titleKeyword:"str_Common_warning",textContentKeyword:"str_Offer_unsubmittable_confirmation_content_multiround_offers",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:m&&m.length>0?"str_Common_proceed":null,requirePassword:!1,showCheckbox:!1,htmlContent:`<div class="margin--top-20">\n                                    <div> ${this.localizationService.instant("str_Tender_lots_will_not_be_submitted")} </div>\n                                    ${y}\n                                    <div> ${m&&m.length>0?this.localizationService.instant("str_Tender_warning_message_continue"):""} </div>\n                                </div>`}).pipe((0,h.T)(C=>C.confirmed))}return u=a,(0,z.of)(!0)}),(0,f.p)(x=>x),(0,O.H)(()=>this.systemSettings.UseDigitalSignature||this.systemSettings.UseTrustedTimestampAuthority?this.openSubmitOfferDialog(u):this.dialogService.confirm({titleKeyword:"str_Tender_supplier_are_you_sure_submit",textContentKeyword:"str_Tender_supplier_will_be_able_modify",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_submit_offer",requirePassword:!0,showCheckbox:!1,actionMnemonic:"SubmitOffer",relatedObjectGuid:this.box.Guid,relatedObjectEntityId:this.box.EntityId}).pipe((0,h.T)(x=>x.confirmed),(0,B.M)(x=>{x||this.setSubmitUnsubmitButtonsDisabledState(!1)}),(0,f.p)(x=>x)))).subscribe(()=>{this.offerStoreService.submitOffers(this.box.Id,u),this.setSubmitUnsubmitButtonsDisabledState(!1),this.changeDetectorRef.markForCheck()});this.subscriptions.push(b),i.unsubscribe()}),s=this.submitMultipleOffersDialogRef.afterClosed().subscribe(()=>{s.unsubscribe(),r&&this.setSubmitUnsubmitButtonsDisabledState(!1)})}unsubmitOffers(){this.destroySubmitMultipleOffersDialog();const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.setSubmitUnsubmitButtonsDisabledState(!0),this.submitMultipleOffersDialogRef=this.dialogService.open(We,t),this.submitMultipleOffersDialogRef.componentInstance.parentId=this.id,this.submitMultipleOffersDialogRef.componentInstance.offerWrappers=this.offerWrappers,this.submitMultipleOffersDialogRef.componentInstance.isSubmitting=!1,this.submitMultipleOffersDialogRef.componentInstance.isDocumentsRequirements=this.isDocumentsRequirements,this.submitMultipleOffersDialogRef.componentInstance.offersCompletionStatus$=this.offerContentStoreService.getOfferCompletionStatusByOfferIds(this.offerWrappers.map(a=>a.Offer.Id));let i,s,r=!0;i=this.submitMultipleOffersDialogRef.componentInstance.selectedOffers.asObservable().subscribe(a=>{r=!1,this.setSubmitUnsubmitButtonsDisabledState(!0);const l=this.dialogService.confirm({titleKeyword:"str_Tender_supplier_are_you_sure_unsubmit",textContentKeyword:"str_Tender_supplier_will_be_able_submit",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_unsubmit_offer",requirePassword:!1===this.systemSettings.UseDigitalSignature,requireDigitalSignature:this.systemSettings.UseDigitalSignature,showCheckbox:!1,actionMnemonic:"UnsubmitOffer",relatedObjectGuid:this.box.Guid,relatedObjectEntityId:this.box.EntityId}).pipe((0,V.Z)(u=>(u.confirmed&&this.offerStoreService.unsubmitOffers(this.box.Id,a),this.setSubmitUnsubmitButtonsDisabledState(!1),Y.w))).subscribe();this.subscriptions.push(l),i.unsubscribe()}),s=this.submitMultipleOffersDialogRef.afterClosed().subscribe(()=>{s.unsubscribe(),r&&this.setSubmitUnsubmitButtonsDisabledState(!1)})}onUpdateOffer(t){this.offerStoreService.updateOffer(this.box.Id,t)}onOpenOffer(t){this.router.navigate(["offer",t],{relativeTo:this.route})}openTenderAwardMethod(){const t=new S.Pe;
1t.viewContainerRef=this.viewContainerRef,this.awardMethodSettingsRef=this.dialogService.open(Ce.R,t)}closeLoader(){this.loaderService.close()}openLoader(t){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword=t}loadPrivateKey(){const t=this.round$.pipe((0,f.p)(u=>!!u),(0,h.T)(u=>u.EnableEncryptOffers),(0,M.F)()),r=this.offerWrappers$.pipe((0,f.p)(u=>!!u),(0,h.T)(u=>u.every(m=>!!m.OfferSubmission&&m.OfferSubmission.IsOfferOpen)),(0,M.F)()),i=(0,$.z)([t,r]).pipe((0,h.T)(([u,m])=>u&&!m),(0,M.F)());this.canRequestNewKey$=i.pipe((0,f.p)(u=>u),(0,I.K)(this.tender$),(0,v.n)(u=>this.principalPermissionService.hasPermission(this.ForgottenKeyMnemonic,u.Guid,u.EntityId)));const s=i.pipe((0,f.p)(u=>u),(0,v.n)(()=>this.privateKeyStoreService.getIsLoadedPrivateKeyHash()),(0,f.p)(u=>!u),(0,I.K)(this.tender$)).subscribe(u=>{this.privateKeyStoreService.loadPrivateKeyHash(u.Id),this.changeDetectorRef.markForCheck()}),a=i.pipe((0,f.p)(u=>u),(0,v.n)(()=>this.privateKeyStoreService.getShouldGeneratePrivateKey()),(0,f.p)(u=>u)).subscribe(()=>{this.openGeneratePrivateKey(!0),this.changeDetectorRef.markForCheck()}),l=i.pipe((0,B.M)(u=>{this.encryptOffers=u,this.changeDetectorRef.markForCheck()}),(0,f.p)(u=>u),(0,I.K)(this.privateKeyStoreService.getPrivateKey())).subscribe(u=>{this.privateKey=u,this.privateKey&&this.route.snapshot.queryParamMap.has(this.returnUrlParam)&&this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.returnUrlParam)),this.changeDetectorRef.markForCheck()});this.subscriptions.push(s,a,l)}get isPageLoaded(){return this.arePermissionsLoaded||this.encryptOffers&&!this.privateKey||!this.canViewBoxContent}openGeneratePrivateKey(t){this.destroyGeneratePrivateKey();const r=new S.Pe;r.viewContainerRef=this.viewContainerRef,r.disableClose=!0,this.generatePrivateKeyRef=this.dialogService.open(bn.r,r),this.generatePrivateKeyRef.componentInstance.isFirstTime=t}destroyGeneratePrivateKey(){this.generatePrivateKeyRef&&(this.generatePrivateKeyRef.close(),this.generatePrivateKeyRef=null)}destroyCreateOfferDialog(){this.offerCreateRef&&(this.offerCreateRef.close(),this.offerCreateRef=null)}destroyUploadPrivateKey(){this.uploadPrivateKeyRef&&(this.uploadPrivateKeyRef.close(),this.uploadPrivateKeyRef=null)}openSubmitOfferDialog(t){this.destroySubmitOfferDialog();const r=new S.Pe;let i;return r.viewContainerRef=this.viewContainerRef,this.submitOfferDialogRef=this.dialogService.open(ae.i,r),this.submitOfferDialogRef.componentInstance.parentId=this.id,this.submitOfferDialogRef.componentInstance.tenderId=this.box.TenderId,this.submitOfferDialogRef.componentInstance.offerIds=t,this.submitOfferDialogRef.componentInstance.canEdit=!0,this.submitOfferDialogRef.componentInstance.downloadHtml=!0,this.submitOfferDialogRef.componentInstance.multipleOffers=!0,this.submitOfferDialogRef.componentInstance.useDigitalSignature=this.systemSettings.UseDigitalSignature,i=this.submitOfferDialogRef.afterClosed().subscribe(()=>{i.unsubscribe(),this.setSubmitUnsubmitButtonsDisabledState(!1),this.changeDetectorRef.markForCheck()}),this.submitOfferDialogRef.componentInstance.submit.asObservable()}destroySubmitOfferDialog(){this.submitOfferDialogRef&&(this.submitOfferDialogRef.close(),this.submitOfferDialogRef=null)}destroySubmitMultipleOffersDialog(){this.submitMultipleOffersDialogRef&&(this.submitMultipleOffersDialogRef.close(),this.submitMultipleOffersDialogRef=null)}setSubmitUnsubmitButtonsDisabledState(t){this.areSubmitUnsubmitButtonDisabled=t,this.changeDetectorRef.markForCheck()}filterLockedOffers(t,r){return t.filter(i=>!r.find(s=>s.OfferId===i))}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.PiF),e.rXU(c.DKw),e.rXU(c.o2P),e.rXU(c.fRX),e.rXU(c.kW$),e.rXU(le),e.rXU(F.W),e.rXU(c.$17),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(c.$gx),e.rXU(c.i_v),e.rXU(c.N49),e.rXU(S.o3),e.rXU(c.zkG),e.rXU(e.gRc),e.rXU(c.bk9),e.rXU(c.dqT),e.rXU(c.Gfq),e.rXU(c.VY6),e.rXU(c.CDG),e.rXU(c.ZCd),e.rXU(c.w9v),e.rXU(c.I2c),e.rXU(c._Th))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-box-details"]],viewQuery:function(r,i){if(1&r&&(e.GBs(L.Yh,7),e.GBs(Ze,5)),2&r){let s;e.mGM(s=e.lsd())&&(i.scrollbarComponent=s.first),e.mGM(s=e.lsd())&&(i.offerContents=s)}},features:[e.Jv_([c.bk9,{provide:c.DKw,useExisting:c.sO9}]),e.Vt3],decls:25,vars:47,consts:[[1,"offerbox-supplier-container"],[1,"offerbox-supplier-scrollable"],[1,"padding--20"],[3,"submittedOffersStatus","round","consortiumMembers","tenderParticipant","isBulgarianConfiguration"],[4,"ngIf"],[3,"labelKeyword","boxId","offer",4,"ngIf"],["class","margin--bottom-20",3,"privateKey","canRequestNewKey","canManageBox","unlock","forgottenKey",4,"ngIf"],[3,"buttonClick","entity","actionMnemonic","buttonKeyword","messageKeyword","reloadActionTypes","cssClasse
1s","showButton","iconClass"],[3,"round","offerWrappers"],["class","nxcard z1 bg--white",4,"ngIf"],[1,"nxcard__footer","bg--white","offerbox-supplier-footer"],[1,"nxcard__footer-message"],["class","nxcard__footer-options",4,"ngIf"],["class","offerbox-supplier-loader",4,"ngIf"],["class","display--flex align--center content-center flex-grow--2 full-width",4,"ngIf"],[3,"tender","isBuyer",4,"ngIf"],[3,"tender","isBuyer"],[3,"labelKeyword","boxId","offer"],[1,"margin--bottom-20",3,"unlock","forgottenKey","privateKey","canRequestNewKey","canManageBox"],[1,"nxcard","z1","bg--white"],[1,"bg--grey5a","text--center","text--grey30","no-contents-container","no-contents--animate"],[1,"align--center","display--flex","flex-column"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-lock"],[1,"text--bold","margin--bottom-10"],[1,"col-lg-6","col-md-10","no-padding"],["class","col-lg-6 col-md-10 no-padding",4,"ngIf"],[1,"nxcard__body","nxcard__body--no-scroll"],["class","nxcard z1 bg--white text--center no-contents--animate",4,"ngIf"],["class","nxcard bg--white z1 margin--top-20 margin--bottom-20",4,"ngIf"],["textKeyword","str_Tender_encrypted_information","buttonKeyword","str_Tender_unlock_with_key",3,"classes","canUnlock","unlock",4,"ngIf"],[1,"nxcard","z1","bg--white","text--center","no-contents--animate"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-options","flex-element--right"],["mat-icon-button","",3,"click",4,"ngIf"],[1,"align--center","display--flex","flex-column","text--grey30","padding--20"],[1,"mdi","mdi-email"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-book-open-variant"],["mat-icon-button","",3,"disabled","click",4,"ngIf"],["mat-icon-button","",3,"click","disabled"],[1,"mdi","mdi-download"],[1,"mdi","mdi-trophy"],[1,"nxcard","bg--white","z1","margin--top-20","margin--bottom-20"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-grow--2"],[1,"text--ellipsis",3,"title"],["class","text--grey30 text-12",4,"ngIf"],[1,"nxcard__header-options"],[1,"nxcard__body"],[1,"text--grey30","text-12"],["class","padding--25",4,"ngIf"],[1,"padding--25"],[3,"documents","listType","indexes"],[1,"padding--40","display--flex","align--center","content-center"],[3,"diameter"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"updateOffer","deleteOffer","openOffer","editName","parentId","index","offerWrapper","offerCompletion","isDocumentsRequirements","isBulgarianConfiguration","isMultilotTender","offerBoxId","canManageBox","canFillOffer","canDeleteOffer"],["textKeyword","str_Tender_encrypted_information","buttonKeyword","str_Tender_unlock_with_key",3,"unlock","classes","canUnlock"],[1,"nxcard__footer-options"],["class","margin--right-6","mat-button","",3,"disabled","click",4,"ngIf"],["tooltip","",3,"tooltipMessages","tooltipPosition",4,"ngIf"],["mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-button","","color","warn",3,"click",4,"ngIf"],["mat-button","",1,"margin--right-6",3,"click","disabled"],["tooltip","",3,"tooltipMessages","tooltipPosition"],["mat-button","",1,"margin--right-6",3,"disabled"],["mat-button","",3,"click","disabled"],[1,"mdi","padding--right-5",3,"ngClass"],["mat-button","","color","warn",3,"click","disabled"],["mat-button","","color","warn",3,"click"],[1,"mdi","mdi-send","padding--right-5"],[1,"offerbox-supplier-loader"],[1,"display--flex","align--center","content-center","flex-grow--2","full-width"]],template:function(r,i){1&r&&(e.j41(0,"div",0),e.nI1(1,"async"),e.j41(2,"div",1)(3,"ng-scrollbar")(4,"div",2),e.nrm(5,"nx1-offers-status-header",3),e.nI1(6,"async"),e.nI1(7,"async"),e.nI1(8,"async"),e.DNE(9,Qi,2,1,"ng-container",4),e.nI1(10,"async"),e.DNE(11,Ji,3,7,"nx1-locked-offer-block",5)(12,Hi,2,5,"nx1-manage-private-key",6),e.j41(13,"nx1-guidance-message",7),e.bIt("buttonClick",function(){return i.decryptOfferBlocks()}),e.k0s(),e.j41(14,"nx1-guidance-message",7),e.bIt("buttonClick",function(){return i.decryptOfferBlocks()}),e.k0s(),e.nrm(15,"nx1-private-key-timestamps",8),e.nI1(16,"async"),e.DNE(17,er,15,10,"div",9)(18,_r,8,8,"div",4),e.k0s()()(),e.j41(19,"div",10),e.nrm(20,"span",11),e.DNE(21,xr,6,5,"span",12),e.k0s()(),e.DNE(22,Tr,2,1,"div",13),e.nI1(23,"async"),e.DNE(24,Ir,2,1,"div",14)),2&r&&(e.AVh("hide",!i.isPageLoaded||e.bMT(1,33,i.isLoading$)),e.R7$(5),e.Y8G("submittedOffersStatus",e.bMT(6,35,i.submittedOffersStatus$))("round",i.round)("consortiumMembers",e.bMT(7,37,i.consortiumMembers$))("tenderParticipant",i.currentTenderParticipant)("isBulgarianConfiguration",e.bMT(8,39,i.isBulgarianConfiguration$)),e.R7$(4),e.Y8G("ngIf",e.bMT(10,41,i.tender$)),e.R7$(2),e.Y8G("ngIf",i.canViewBoxContent),e.R7$(),e.Y8G("ngIf",i.encryptOffers),e.R7$(),e.Y8G("entity",i.box)("actionMnemonic","Vie
1wSuppliersProvidePrivateKeyGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key")("messageKeyword","str_Offerbox_guidance_provide_private_key_message")("reloadActionTypes",i.reloadProvideKeyActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("entity",i.box)("actionMnemonic","ViewSuppliersProvidePrivateKeyPriceEvaluationGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key")("messageKeyword","str_Offerbox_guidance_provide_private_key_message")("reloadActionTypes",i.reloadProvideKeyActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("round",i.round)("offerWrappers",e.bMT(16,43,i.offerWrappers$)),e.R7$(2),e.Y8G("ngIf",!i.canViewBoxContent),e.R7$(),e.Y8G("ngIf",i.canViewBoxContent),e.R7$(3),e.Y8G("ngIf",!i.encryptOffers||i.encryptOffers&&!!i.privateKey),e.R7$(),e.Y8G("ngIf",e.bMT(23,45,i.isSubmittingOrUnsubmitting$)||i.isLoadingUnSubmittableOffers),e.R7$(2),e.Y8G("ngIf",!i.isPageLoaded))},dependencies:[p.YU,p.Sq,p.bT,k.iV,E.wS,L.Yh,be.d,de.z,et.F,fe.n,he.d,Z.x,tt.F,Si.n,Me,Bi,Yi,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex-grow:2}.offerbox-supplier-container[_ngcontent-%COMP%], .offerbox-supplier-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.offerbox-supplier-scrollable[_ngcontent-%COMP%]{height:calc(100% - 60px)}.offerbox-supplier-scrollable--full[_ngcontent-%COMP%]{height:100%}.offerbox-supplier-footer[_ngcontent-%COMP%]{border-radius:0;border:none;box-shadow:inset 1px 0 #0000001a,-1px -1px 5px #0003;position:relative;z-index:2}.offerbox-supplier-loader[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#00000026;z-index:1000}.text-12[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();var Cr=d(10467);function Or(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onVerify())}),e.nrm(1,"i",19),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled","verifying"===t.memberStatus),e.BMQ("id",t.getButtonId("verify")),e.R7$(2),e.SpI(" ",e.bMT(3,3,"str_Tender_verify_id")," ")}}function Rr(n,o){1&n&&(e.j41(0,"div",20),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_identifying_organization")," "))}function Mr(n,o){1&n&&(e.j41(0,"div",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_organization_identified")," "))}function Pr(n,o){1&n&&(e.j41(0,"div",22),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_unknown_organization")," "))}function Dr(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"label",6),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"input",23),e.bIt("input",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onChangeName(i.target.value))}),e.k0s(),e.nrm(5,"nx1-form-control-messages",10),e.k0s()}if(2&n){const t=e.XpG(3);e.R7$(),e.AVh("opacity--05",t.member.IsValid),e.BMQ("for",t.getInputId("organizationName"))("id",t.getLabelId("organizationName")),e.R7$(),e.SpI(" ",e.bMT(3,9,"str_Tender_organization_name")," "),e.R7$(2),e.BMQ("id",t.getInputId("organizationName"))("disabled",!!t.member.IsValid||null),e.R7$(),e.Y8G("parentId",t.getId("startDate"))("control",t.form.controls.OrganizationName)}}function kr(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",3)(1,"div",4)(2,"div",5)(3,"label",6),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div",7)(7,"input",8),e.bIt("change",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onChangeEik(i.target.value))}),e.k0s(),e.DNE(8,Or,4,5,"button",9),e.k0s(),e.nrm(9,"nx1-form-control-messages",10),e.qex(10,11),e.DNE(11,Rr,3,3,"div",12)(12,Mr,3,3,"div",13)(13,Pr,3,3,"div",14),e.bVm(),e.k0s(),e.DNE(14,Dr,6,11,"div",1),e.k0s(),e.j41(15,"div",15)(16,"button",16),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onRemove())}),e.nrm(17,"i",17),e.k0s()()()}if(2&n){const t=e.XpG(2);e.Y8G("formGroup",t.form),e.R7$(3),e.BMQ("for",t.getInputId("organizationEik"))("id",t.getLabelId("organizationEik")),e.R7$(),e.SpI(" ",e.bMT(5,14,"str_Tender_eik_editmode")," "),e.R7$(3),e.BMQ("id",t.getInputId("organizationEik")),e.R7$(),e.Y8G("ngIf",!t.showName),e.R7$(),e.Y8G("parentId",t.getId("startDate"))("control",t.form.controls.RegistryNumber),e.R7$(),e.Y8G("ngSwitch",t.memberStatus),e.R7$(),e.Y8G("ngSwitchCase","verifying"),e.R7$(),e.Y8G("ngSwitchCase","verified"),e.R7$(),e.Y8G("ngSwitchCase","unknown"),e.R7$(),e.Y8G("ngIf",t.showName),e.R7$(2),e.BMQ("id",t.getButtonId("remove"))}}function wr(n,o){if(1&n&&(e.j41(0,"div",24)(1,"div",25)(2,"div",26)(3,"div",27),e.EFF(4),e.k0s(),e.j41(5,"div",28),e.EFF(6),e.nI1(7,"translate"),e.j41(8,"span",29),e.EFF(9),e.k0s()()()()()),2&n){const t=e.XpG(2);e.R7$(4),e.SpI(" ",t.member.OrganizationName," "),e.R7$(2),e.SpI(" ",e.bMT(7,3,"str_Tender_eik_viewmode")," "),e.R7$(3),e.JRh(t.member.RegistryNumber)}}function $r(n,o){if(1&n&&(e.qex(0),e.DNE(1,kr,18,16,"div",2)(2,wr,10,5,"ng-template",null,0,e.C5r),e.bVm()),2&n){const t=e.sdS(3),r=e.XpG();e.R7$(),e.Y8G("ngIf",r.editMode)("ngIfElse",t)}}let it=(()=>{class n extends N.$G{constructor(t,r,i,s,a){super(t),this.viewContainerRef
1=t,this.organizationService=r,this.dialogService=i,this.systemSettingsStoreService=s,this.cdr=a,this.showCheckStatus=!1,this.isInObligationsMode=!1,this.remove=new e.bkB(!1),this.verify=new e.bkB(!1),this.verifyExistancy=new e.bkB(!1),this.showName=!1,this.isStatusLoaded=!1,this.countryKeyword="",this.subscriptions=[]}ngOnInit(){this.form.reset(this.member),this.member.OrganizationName&&(this.showName=!0),this.memberStatus=this.member.RegistryNumber?this.member.IsValid?"verified":"unknown":"notverified"}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onRemove(){let t;t=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Tender_are_you_sure_delete_declaration_member",confirmationType:"delete",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_remove",requirePassword:!1,showCheckbox:!1}).subscribe(r=>{r.confirmed&&this.remove.emit(),t.unsubscribe()})}onVerify(){var t=this;return(0,Cr.A)(function*(){if(t.verifyExistancy.emit(),t.form.controls.RegistryNumber.markAsTouched(),t.form.controls.RegistryNumber.valid){t.memberStatus="verifying";const r=yield t.organizationService.getOrganizationInformationFromRegistry(t.member.RegistryNumber).toPromise();r.RegistryNumber?(t.member.IsValid=!0,t.memberStatus="verified",t.member.OrganizationName=r.Name,t.form.controls.OrganizationName.setValue(r.Name),t.showName=!0):(t.member.IsValid=!1,t.memberStatus="unknown",t.showName=!1),t.verify.emit()}t.cdr.markForCheck()})()}onChangeEik(t){this.member.RegistryNumber=t,this.showName=!1,this.form.controls.OrganizationName.reset(""),this.memberStatus="notverified",this.verify.emit(),this.cdr.markForCheck()}onChangeName(t){this.member.OrganizationName=t,this.verify.emit(),this.cdr.markForCheck()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.PV8),e.rXU(S.o3),e.rXU(c.dqT),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-financial-audit-agreement-item"]],inputs:{parentId:"parentId",editMode:"editMode",member:"member",form:"form"},outputs:{remove:"remove",verify:"verify",verifyExistancy:"verifyExistancy"},features:[e.Vt3],decls:1,vars:1,consts:[["viewTemplate",""],[4,"ngIf"],["class","consortium-member-edit",3,"formGroup",4,"ngIf","ngIfElse"],[1,"consortium-member-edit",3,"formGroup"],[1,"consortium-member-edit__info"],[1,"padding--right-15"],[1,"form-label"],[1,"display--flex"],["type","text","formControlName","RegistryNumber",1,"form-control","number-input",3,"change"],["mat-button","","color","primary","class","verify-button margin--left-10",3,"disabled","click",4,"ngIf"],[3,"parentId","control"],[3,"ngSwitch"],["class","text--clarityblue1 text--uppercase text--bold text--10px",4,"ngSwitchCase"],["class","text--emerald0 text--uppercase text--bold text--10px",4,"ngSwitchCase"],["class","text--lemon-2 text--uppercase text--bold text--10px",4,"ngSwitchCase"],[1,"consortium-member-edit__option"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-delete"],["mat-button","","color","primary",1,"verify-button","margin--left-10",3,"click","disabled"],[1,"mdi","mdi-magnify","padding--right-5"],[1,"text--clarityblue1","text--uppercase","text--bold","text--10px"],[1,"text--emerald0","text--uppercase","text--bold","text--10px"],[1,"text--lemon-2","text--uppercase","text--bold","text--10px"],["type","text","formControlName","OrganizationName",1,"form-control","name-input",3,"input"],[1,"consortium-member-view-wrapper"],[1,"consortium-member-view"],[1,"consortium-member-view__info"],[1,"text--bold","text--16px","wrap-text"],[1,"text--13px","wrap-text"],[1,"text--bold"]],template:function(r,i){1&r&&e.DNE(0,$r,4,2,"ng-container",1),2&r&&e.Y8G("ngIf",i.member)},dependencies:[p.bT,p.ux,p.e1,_.me,_.BC,_.cb,_.j4,_.JD,k.iV,pe.l,R.D9],styles:["[_nghost-%COMP%]{display:block}.consortium-member-view-wrapper[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.2);border-radius:5px}.consortium-member-view[_ngcontent-%COMP%]{display:flex}.consortium-member-view__info[_ngcontent-%COMP%]{flex-grow:2;min-width:0;width:100%;padding:10px}.consortium-member-view__options[_ngcontent-%COMP%]{flex-shrink:0;padding:6px}.consortium-member-edit[_ngcontent-%COMP%]{display:flex;border:1px solid rgba(0,0,0,.2);border-radius:5px}.consortium-member-edit__info[_ngcontent-%COMP%]{display:flex;flex-grow:2;min-width:0;padding:10px}.consortium-member-edit__option[_ngcontent-%COMP%]{padding:6px}
1.number-input[_ngcontent-%COMP%]{width:200px}.name-input[_ngcontent-%COMP%]{width:300px}.verify-button[_ngcontent-%COMP%]{height:42px}"]})}}return n})();function Gr(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",15),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onAddOrganization())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.BMQ("id",t.getButtonId("addOrganization")),e.R7$(),e.SpI(" ",e.bMT(2,2,"str_Tender_add_organization")," ")}}function Er(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-financial-audit-agreement-item",16),e.mxI("formChange",function(i){const s=e.eBV(t).index,a=e.XpG();return e.DH7(a.consortiumMembersForm.controls[s.toString()],i)||(a.consortiumMembersForm.controls[s.toString()]=i),e.Njj(i)}),e.bIt("remove",function(){const i=e.eBV(t).index,s=e.XpG();return e.Njj(s.onRemove(i))})("verify",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onVerify())})("verifyExistancy",function(){const i=e.eBV(t).index,s=e.XpG();return e.Njj(s.onVerifyExistancy(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.index,i=o.last,s=e.XpG();e.AVh("margin--bottom-10",!i),e.Y8G("parentId",s.getId(r))("editMode",s.editMode)("member",t),e.R50("form",s.consortiumMembersForm.controls[r.toString()])}}function Br(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",17)(1,"div",18)(2,"button",19),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onCancel())}),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"button",20),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onSave())}),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.BMQ("id",t.getButtonId("cancel")),e.R7$(),e.SpI(" ",e.bMT(4,5,"str_Common_cancel")," "),e.R7$(2),e.Y8G("disabled",!t.areAllConsortiumMembersVerified),e.BMQ("id",t.getButtonId("save")),e.R7$(),e.SpI(" ",e.bMT(7,7,"str_Common_save")," ")}}let ve=(()=>{class n extends N.$G{static{this.ManageFinancialAuditAgreementMnemonic="ManageFinancialAuditAgreement"}constructor(t,r,i,s){super(t),this.viewContainerRef=t,this.dialogService=r,this.cdr=i,this.dialogRef=s,this.editMode=!1,this.allowEmptyMembersList=!0,this.consortiumMembers=[],this.title="str_Offerbox_suppliers_financial_audit_agreement_dialog",this.saveConsortiumMembers=new e.bkB(!1),this.consortiumMembersForm=new _.J3({}),this.areAllConsortiumMembersVerified=!0,this.subscriptions=[]}ngOnInit(){this.setInitialform()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}close(){this.dialogRef.close()}onCancel(){this.close()}onSave(){this.consortiumMemberQueryList.forEach(t=>{t.form.controls.OrganizationName.markAsTouched(),t.form.controls.RegistryNumber.markAsTouched()}),this.saveConsortiumMembers.emit(this.consortiumMembers),this.dialogRef.close()}onAddOrganization(){const t=new _.J3({OrganizationName:new _.hs("",[_.k0.required,_.k0.minLength(3),_.k0.maxLength(250)]),RegistryNumber:new _.hs("",[_.k0.required])});this.consortiumMembersForm.addControl(this.consortiumMembers.length.toString(),t),this.consortiumMembers.push({Id:null,RegistryNumber:null,OrganizationName:"",IsValid:!1}),this.areAllConsortiumMembersVerified=!1}onRemove(t){this.consortiumMembers.splice(t,1);const r=this.consortiumMemberQueryList.toArray();r.splice(t,1),this.consortiumMemberQueryList.reset(r),this.setInitialform(),this.onVerify()}onVerify(){let t=!0;this.consortiumMemberQueryList.forEach(r=>{("notverified"===r.memberStatus||!r.form.valid&&"unknown"===r.memberStatus)&&(t=!1)}),0===this.consortiumMemberQueryList.length&&(this.hasAgreement=!1),!this.allowEmptyMembersList&&0===this.consortiumMemberQueryList.length&&!0===this.hasAgreement&&(t=!1),this.areAllConsortiumMembersVerified=t,this.cdr.markForCheck()}onVerifyExistancy(t){const r=this.consortiumMemberQueryList.toArray()[t],i=r.form.value.RegistryNumber;this.consortiumMemberQueryList.some((a,l)=>l!==t&&a.form.value.RegistryNumber===i)&&r.form.controls.RegistryNumber.setErrors({uniqueConsortiumMembers:"uniqueConsortiumMembers"}),this.cdr.markForCheck()}onChange(){if(this.hasAgreement=!this.hasAgreement,!1===this.hasAgreement&&0!==this.consortiumMemberQueryList.length){let t;
1t=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Offerbox_are_you_sure_delete_all_declaration_members",confirmationType:"delete",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_remove",requirePassword:!1,showCheckbox:!1}).subscribe(r=>{r.confirmed?(this.consortiumMembers=[],this.consortiumMemberQueryList.reset([]),this.setInitialform(),this.onVerify()):this.hasAgreement=!0,t.unsubscribe(),this.cdr.markForCheck()})}}setInitialform(){this.areAllConsortiumMembersVerified=!1,this.consortiumMembersForm=new _.J3({}),this.consortiumMembers.forEach((t,r)=>{const i=new _.J3({OrganizationName:new _.hs({value:t.OrganizationName,disabled:t.IsValid},[_.k0.required,_.k0.minLength(3),_.k0.maxLength(250)]),RegistryNumber:new _.hs(t.RegistryNumber,[_.k0.required])});this.consortiumMembersForm.addControl(r.toString(),i)})}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3),e.rXU(e.gRc),e.rXU(ge.RN))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-financial-audit-agreement-dialog"]],viewQuery:function(r,i){if(1&r&&e.GBs(it,5),2&r){let s;e.mGM(s=e.lsd())&&(i.consortiumMemberQueryList=s)}},inputs:{parentId:"parentId",editMode:"editMode",allowEmptyMembersList:"allowEmptyMembersList",tenderParticipantId:"tenderParticipantId",consortiumMembers:"consortiumMembers",title:"title",hasAgreement:"hasAgreement"},outputs:{saveConsortiumMembers:"saveConsortiumMembers"},features:[e.Vt3],decls:19,vars:15,consts:[[1,"nxcard","bg--white"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--ellipsis"],[1,"nxcard__header-options"],["mat-button","","color","primary",3,"click",4,"ngIf"],["mat-icon-button","",3,"click"],[1,"mdi","mdi-close"],[1,"padding--top-10","padding--left-25"],[3,"change","id","checked","disabled"],[1,"nxcard__body",3,"formGroup"],[1,"padding--25"],[3,"parentId","margin--bottom-10","editMode","member","form","formChange","remove","verify","verifyExistancy",4,"ngFor","ngForOf"],["class","nxcard__footer",4,"ngIf"],["mat-button","","color","primary",3,"click"],[3,"formChange","remove","verify","verifyExistancy","parentId","editMode","member","form"],[1,"nxcard__footer"],[1,"nxcard__footer-options","flex-element--right"],["mat-button","",3,"click"],["mat-button","","color","warn",3,"click","disabled"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",5),e.DNE(8,Gr,3,4,"button",6),e.j41(9,"button",7),e.bIt("click",function(){return i.close()}),e.nrm(10,"i",8),e.k0s()()(),e.j41(11,"div",9)(12,"mat-checkbox",10),e.bIt("change",function(){return i.onChange()}),e.EFF(13),e.nI1(14,"translate"),e.k0s()(),e.j41(15,"ng-scrollbar",11)(16,"div",12),e.DNE(17,Er,1,6,"nx1-financial-audit-agreement-item",13),e.k0s()(),e.DNE(18,Br,8,9,"div",14),e.k0s()),2&r&&(e.R7$(5),e.JRh(e.bMT(6,11,i.title)),e.R7$(3),e.Y8G("ngIf",i.editMode&&i.hasAgreement),e.R7$(),e.BMQ("id",i.getButtonId("close")),e.R7$(3),e.Y8G("id",i.getCheckboxId("HasAgreement"))("checked",i.hasAgreement)("disabled",!i.editMode),e.BMQ("id",i.getCheckboxId("HasAgreement")),e.R7$(),e.JRh(e.bMT(14,13,"str_Offerbox_financial_audit_agreement_dialog_description")),e.R7$(2),e.Y8G("formGroup",i.consortiumMembersForm),e.R7$(2),e.Y8G("ngForOf",i.consortiumMembers),e.R7$(),e.Y8G("ngIf",i.editMode))},dependencies:[p.Sq,p.bT,_.cb,_.j4,k.iV,we.NZ,L.Yh,it,R.D9],styles:["[_nghost-%COMP%]{display:block;width:700px}.nxcard__body[_ngcontent-%COMP%]{min-height:300px}"]})}}return n})();var Fr=d(76805);const Nr=n=>[n],jr=(n,o)=>({"mdi-close-circle-outline":n,"mdi-certificate":o}),Xr=(n,o)=>({"mdi-send":n,"mdi-certificate":o});function Vr(n,o){if(1&n&&e.nrm(0,"nx1-tender-explicite-status",15),2&n){const t=e.XpG().ngIf;e.Y8G("tender",t)("isBuyer",!1)}}function Ur(n,o){if(1&n&&(e.qex(0),e.DNE(1,Vr,1,2,"nx1-tender-explicite-status",14),e.bVm()),2&n){const t=o.ngIf;e.R7$(),e.Y8G("ngIf",t.IsArchived||t.IsCanceled||t.IsPaused)}}function Lr(n,o){if(1&n&&(e.nrm(0,"nx1-locked-offer-block",16),e.nI1(1,"async")),2&n){let t;const r=e.XpG();e.Y8G("labelKeyword","str_Offer_locked_by")("boxId",null==r.box?null:r.box.Id)("offer",null==(t=e.bMT(1,3,r.offerWrapper$))?null:t.Offer)}}function Ar(n,o){if(1&n&&(e.nrm(0,"nx1-manage-private-key",17),e.nI1(1,"async"),e.nI1(2,"async")),2&n){const t=e.XpG();e.Y8G("privateKey",e.bMT(1,3,t.privateKey$))("canRequestNewKey",e.bMT(2,5,t.canRequestNewKey$))("canManageBox",t.canManageBox)}}function Yr(n,o){if(1&n&&(e.j41(0,"div",20)(1,"div",21)(2,"div",22)(3,"div",23)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.nrm(8,"nx1-timestamp-date",24),e.k0s()()()()),2&n){const t=e.XpG(2).ngIf,r=e.XpG(2);e.R7$(5),e.SpI(" ",e.bMT(6,5,"str_Tender_private_key_provided_on")," "),e.R7$(3),e.Y8G("timestamp",null==t.OfferSubmission?null:t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp)("textClasses","text--bold text--18px")("timestampClasses","text--bold text--18px")("parentId",r.getId("submittionDateTimestamp"))}}function Kr(n,o){if(1&n&&(e.qex(0),e.DNE(1,Yr,9,7,"div",19),e.bVm()),2&n){const t=e.XpG().ngIf;e.R7$(),e.Y8G("ngIf",null==t.OfferSubmission?null:t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp)}}function qr(n,o){if(1&n&&(e.j41(0,"div",20)(1,"div",21)(2,"div",22)(3,"div",23)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.nrm(8,"nx1-timestamp-date",24),e.k0s()()()()),2&n){const t=e.XpG(2).ngIf,r=e.XpG(2);
1e.R7$(5),e.SpI(" ",e.bMT(6,5,"str_Tender_quality_private_key_provided_on")," "),e.R7$(3),e.Y8G("timestamp",null==t.OfferSubmission?null:t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp)("textClasses","text--bold text--18px")("timestampClasses","text--bold text--18px")("parentId",r.getId("submittionDateTimestamp"))}}function Wr(n,o){if(1&n&&(e.j41(0,"div",20)(1,"div",21)(2,"div",22)(3,"div",23)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.EFF(7,"\xa0 "),e.nrm(8,"nx1-timestamp-date",24),e.k0s()()()()),2&n){const t=e.XpG(2).ngIf,r=e.XpG(2);e.R7$(5),e.SpI(" ",e.bMT(6,5,"str_Tender_price_private_key_provided_on")," "),e.R7$(3),e.Y8G("timestamp",null==t.OfferSubmission?null:t.OfferSubmission.PriceDecryptedKeyProvidedTimestamp)("textClasses","text--bold text--18px")("timestampClasses","text--bold text--18px")("parentId",r.getId("submittionDateTimestamp"))}}function zr(n,o){if(1&n&&e.DNE(0,qr,9,7,"div",19)(1,Wr,9,7,"div",19),2&n){const t=e.XpG().ngIf;e.Y8G("ngIf",null==t.OfferSubmission?null:t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp),e.R7$(),e.Y8G("ngIf",null==t.OfferSubmission?null:t.OfferSubmission.PriceDecryptedKeyProvidedTimestamp)}}function Qr(n,o){if(1&n&&(e.qex(0),e.DNE(1,Kr,2,1,"ng-container",18)(2,zr,2,2,"ng-template",null,0,e.C5r),e.bVm()),2&n){const t=e.sdS(3),r=e.XpG(2);e.R7$(),e.Y8G("ngIf",!r.round.OpeningOfPriceSeparately)("ngIfElse",t)}}function Jr(n,o){if(1&n&&(e.qex(0),e.DNE(1,Qr,4,2,"ng-container",6),e.nI1(2,"async"),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",e.bMT(2,1,t.offerWrapper$))}}function Hr(n,o){if(1&n&&(e.j41(0,"span",33),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Lme(" ",null==t.buyerOrganization?null:t.buyerOrganization.Name," ",e.bMT(2,2,"str_Tender_offer_submission_closed_by_company")," ")}}function Zr(n,o){if(1&n&&(e.j41(0,"div",25)(1,"div",26)(2,"div",27)(3,"figure",28),e.qSk(),e.j41(4,"svg",29),e.nrm(5,"circle",30),e.k0s(),e.joV(),e.nrm(6,"i",31),e.k0s(),e.j41(7,"h2",32),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"span",33),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.DNE(13,Hr,3,4,"span",34),e.nI1(14,"async"),e.k0s()()()),2&n){const t=e.XpG();e.R7$(7),e.BMQ("id",t.getLabelId("noSuppliers")),e.R7$(),e.SpI(" ",e.bMT(9,4,"str_Tender_offer_submission_closed")," "),e.R7$(3),e.SpI(" ",e.bMT(12,6,"str_Tender_offer_submission_closed_tip")," "),e.R7$(2),e.Y8G("ngIf",e.bMT(14,8,t.tender$))}}function es(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"nx1-tender-supplier-offer-content",35),e.nI1(2,"async"),e.bIt("deleteEvent",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.deleteOffer(i))})("editName",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onNameEdit(i))}),e.k0s()()}if(2&n){const t=o.ngIf,r=e.XpG(2);e.R7$(),e.Y8G("offer",null==t?null:t.Offer)("firstRoundOfferId",null==t?null:t.FirstRoundOfferId)("offerContent",null==t?null:t.OfferContent)("tenderParticipant",null==t?null:t.TenderParticipant)("offerSubmission",
1null==t?null:t.OfferSubmission)("canFillOffer",r.canFillOffer)("canDeleteOffer",r.canDeleteOffer)("isBulgarianConfiguration",e.bMT(2,11,r.isBulgarianConfiguration$))("round",r.round)("offersCount",r.offersCount)("canSelectCategory",r.canViewSubmitOffer)}}function ts(n,o){if(1&n&&(e.qex(0),e.DNE(1,es,3,13,"div",6),e.nI1(2,"async"),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",e.bMT(2,1,t.offerWrapper$))}}function ns(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",44),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onOpenOfferCreateDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",0!==t.offerNamesInEditModeCounter),e.BMQ("id",t.getButtonId("createOffer")),e.R7$(),e.SpI(" ",e.bMT(2,3,"str_Suplier_offer_details_create_offer")," ")}}function is(n,o){if(1&n&&(e.j41(0,"span",45),e.nI1(1,"translate"),e.j41(2,"button",46),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n){const t=e.XpG(2);e.Y8G("tooltipMessages",e.eq3(9,Nr,e.bMT(1,5,"str_Supplier_offer_details_maximum_amount_of_offers_reached")))("tooltipPosition","top"),e.R7$(2),e.Y8G("disabled",!0),e.BMQ("id",t.getButtonId("createOfferDisabled")),e.R7$(),e.SpI(" ",e.bMT(4,7,"str_Suplier_offer_details_create_offer")," ")}}function rs(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",47),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.canUnsubmitOffer?i.unsubmitOffer():i.showUnsubmitWarningMessage())}),e.nrm(1,"i",48),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.isSubmitUnsubmitButtonDisabled),e.BMQ("id",t.getButtonId("unsubmitOffer")),e.R7$(),e.Y8G("ngClass",e.l_i(6,jr,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(3,4,"str_Suplier_offer_details_unsubmit_offer")," ")}}function ss(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.submitOffer())}),e.nrm(1,"i",48),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.isSubmitUnsubmitButtonDisabled||0!==t.offerNamesInEditModeCounter),e.BMQ("id",t.getButtonId("submitOffer")),e.R7$(),e.Y8G("ngClass",e.l_i(6,Xr,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(3,4,"str_Suplier_offer_details_submit_offer")," ")}}function os(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",50),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.proceedToSumbission())}),e.nrm(1,"i",51),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG(2);e.BMQ("id",t.getButtonId("proceedToSubmission")),e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Suplier_offer_details_proceed_to_submission")," ")}}function as(n,o){if(1&n&&(e.j41(0,"div",36),e.nrm(1,"span",37),e.j41(2,"span",38),e.DNE(3,ns,3,5,"button",39)(4,is,5,11,"span",40)(5,rs,4,9,"button",41)(6,ss,4,9,"button",42)(7,os,4,4,"button",43),e.k0s()()),2&n){const t=e.XpG();e.R7$(3),e.Y8G("ngIf",t.canCreateOffer),e.R7$(),e.Y8G("ngIf",!t.canCreateOffer&&t.canViewCreateOffer),e.R7$(),e.Y8G("ngIf",t.viewUnsubmitOfferButton),e.R7$(),e.Y8G("ngIf",t.canViewSubmitOffer),e.R7$(),e.Y8G("ngIf",t.showProceedToSubmission)}}function ls(n,o){1&n&&(e.j41(0,"div",52),e.nrm(1,"mat-spinner",53),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}function cs(n,o){1&n&&(e.j41(0,"div",54),e.nrm(1,"mat-spinner",53),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let ds=(()=>{class n extends N.$G{static{this.OfferIdQueryParameter="offerId"}static{this.BoxIdQueryParameter="boxId"}static{this.FillOfferMnemonic="FillOffer"}static{this.CreateOfferMnemonic="CreateOffer"}static{this.ViewCreateOfferMnemonic="ViewCreateOffer"}static{this.ViewSubmitOfferMnemonic="ViewSubmitOffer"}static{this.UnsubmitOfferMnemonic="UnsubmitOffer"}static{this.ViewUnsubmitOfferButtonMnemonic="ViewUnsubmitOfferButton"}static{this.DeleteSignedOfferReceiptMnemonic="DeleteSignedOfferReceipt"}static{this.DeleteOfferMnemonic="DeleteOffer"}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q,P,W,ne,ie,re,se,oe,me){super(t),this.scrollService=r,this.tenderSupplierGuard=i,this.tenderSupplierOfferBoxGuard=s,this.route=a,this.changeDetectorRef=l,this.offerStoreService=u,this.tenderProcessStoreService=m,this.tenderStoreService=b,this.boxStoreService=x,this.consortiumMemberStoreService=y,this.principalPermissionService=C,this.multilotTenderService=G,this.dialogService=U,this.currentTenderParticipantStoreService=q,this.currentTenderParticipantService=P,this.localizationService=W,this.systemSettingsStoreService=ne,this.loaderService=ie,this.privateKeyStoreService=re,this.offerContentStoreService=se,this.documentService=oe,this.router=me,this.privateKey$=this.privateKeyStoreService.getPrivateKey(),this.isMultilotTender=!1,this.showProceedToSubmission=!1,this.isSubmittingOrUnsubmitting$=this.offerStoreService.getIsSubmittingOrUnsubmitting(),this.isDeletingOffer=!1,this.isSubmitUnsubmitButtonDisabled=!1,this.canCreateOffer=!1,this.canViewBoxContent=!1,this.canManageBox=!1,this.canFillOffer=!1,this.canDeleteOffer=!1,this.canViewSubmitOffer=!1,this.canUnsubmitOffer=!1,this.viewUnsubmitOfferButton=!1,this.canDeleteSignedOfferReceipt=!1,this.canManageFinancialAuditAgreement=!1,this.offerNamesInEditModeCounter=0,this.tenderHasAllowedMultipleOffers=!1,this.reloadProvideKeyActionTypes=[ke.q1],this.evaluationStateEnum=NX1.Model.Enums.EvaluationState,this.currentParticipantFinancialAuditItems=[],this.ForgottenKeyMnemonic="ForgottenKey",this.subscriptions=[]}ngOnInit(){this.isBulgarianConfiguration$=this.systemSettingsStoreService.isBulgarianConfiguration();const t=this.route.parent.parent.paramMap.pipe((0,h.T)(s=>s.get(n.BoxIdQueryParameter)),(0,h.T)(s=>parseInt(s,10)),(0,M.F)()),r=t.pipe((0,v.n)(s=>this.boxStoreService.getBoxById(s))),i=this.tenderProcessStoreService.getSelectedProcessRound().pipe((0,f.p)(s=>!!s),(0,j.$)());this.canViewBoxContent=this.tenderSupplierOfferBoxGuard.canViewBoxContent,this.canManageBox=this.tenderSupplierOfferBoxGuard.canManageBox,this.submittedOffersStatus$=i.pipe((0,v.n)(s=>this.offerStoreService.getSubmittedOffersStatusByRoundIds([s.Id]).pipe((0,h.T)(a=>a[s.Id])))),this.tender$=this.tenderSupplierGuard.tender$,this.offerWrapper$=this.route.paramMap.pipe((0,h.T)(s=>s.get(n.OfferIdQueryParameter)),(0,h.T)(s=>parseInt(s,10)),(0,v.n)(s=>this.offerStoreService.getOfferWrapperByOfferId(s))),this.subscriptions.push(this.tender$.pipe((0,f.p)(s=>!!s),(0,Ie.E)(this.tenderStoreService.getTenderBuyerOrganization())).subscribe(([s,a])=>{null==a&&this.tenderStoreService.loadBuyerOrganization(s),this.tender=s,this.buyerOrganization=a})),this.offerWrappersCount$=t.pipe((0,v.n)(s=>this.offerStoreService.getOfferWrappersByBoxId(s).pipe((0,f.p)(a=>!!a&&a.length>0))),(0,h.T)(s=>s.length)),this.subscriptions.push(this.offerWrappersCount$.subscribe(s=>{this.offersCount=s,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.tenderProcessStoreService.getSelectedProcessRound().subscribe(s=>this.round=s)),this.subscriptions.push(this.tenderStoreService.getCurrentTenderProcessPhase().subscribe(s=>{this.tenderPhase=s,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(r.pipe((0,f.p)(s=>!!s)).subscribe(s=>{this.box=s,this.changeDetectorRef.markForCheck()})),this.encryptOffers$=(0,$.z)([this.offerWrapper$,this.tenderProcessStoreService.getSelectedProcessRound()]).pipe((0,h.T)(([s,a])=>this.checkEncryptOffers(a,s))),this.canRequestNewKey$=this.encryptOffers$.pipe((0,f.p)(s=>s),(0,I.K)(this.tenderSupplierGuard.tender$),(0,v.n)(s=>this.principalPermissionService.hasPermission(this.ForgottenKeyMnemonic,s.Guid,s.EntityId))),this.subscriptions.push((0,$.z)([this.tenderSupplierGuard.tender$,this.offerWrapper$,this.currentTenderParticipantStoreService.getCurrentTenderParticipant()]).subscribe(([s,a,l])=>{if(this.isMultilotTender=null!==s.MainTenderId,this.tenderHasAllowedMultipleOffers=s.AllowMultipleOffers,this.arePermissionsLoaded=!1,this.showProceedToSubmission=this.canManageBox&&this.isMultilotTender,a){this.offer=a.Offer,this.offerWrapper=a;const u=null!==l.LeadTenderParticipantId?l.LeadTenderParticipantId:l.Id;this.currentTenderParticipant=l,this.consortiumMemberStoreService.loadConsortiumMembers(u),this.consortiumMembers$=this.consortiumMemberStoreService.getConsortiumMembersByTenderParticipantId(u),this.changeDetectorRef.markForCheck();const b=[...this.principalPermissionService.getActionsToCheck([n.FillOfferMnemonic,n.ViewSubmitOfferMnemonic,n.ViewUnsubmitOfferButtonMnemonic,n.DeleteSignedOfferReceiptMnemonic,n.UnsubmitOfferMnemonic],this.offer.EntityId,this.offer.Guid)];b.push(...this.principalPermissionService.getActionsToCheck([n.CreateOfferMnemonic,n.ViewCreateOfferMnemonic],this.box.EntityId,this.box.Guid)),b.pu
1sh(...this.principalPermissionService.getActionsToCheck([ve.ManageFinancialAuditAgreementMnemonic],l.EntityId,l.Guid)),this.subscriptions.push(this.principalPermissionService.hasPermissions(b).pipe((0,f.p)(x=>!!x)).subscribe(x=>{this.mapPermissions(x)}))}else!a&&this.offer&&this.router.navigate(["tender",this.offer.TenderId,"supplier",this.offer.TenderProcessRoundId,"offers",this.box.Id])})),this.subscriptions.push(this.systemSettingsStoreService.getSystemSettings().subscribe(s=>{this.systemSettings=s,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.tender$.pipe((0,f.p)(s=>!!s)).subscribe(s=>{!0===s.EnableFinancialAudit&&this.currentTenderParticipantService.getFinancialAuditAgreementItems(this.offer.TenderParticipantId).subscribe(a=>{a.forEach(l=>{this.currentParticipantFinancialAuditItems.push({Id:l.Id,RegistryNumber:l.RegistryNumber,OrganizationName:l.OrganizationName,IsValid:!0})})})}))}ngAfterContentInit(){this.scrollService.setScrollDirective(this.scrollbarComponent)}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}get canShowFooter(){return!0}get currentPhaseProperties(){return this.tenderPhase&&this.box&&this.tenderPhase.TenderProcessRoundId===this.box.TenderProcessRoundId&&w.c.tender.phase.hasOwnProperty(this.tenderPhase.Name)?w.c.tender.phase[this.tenderPhase.Name].class:w.c.tender.phase.str_Tender_phase_awarding_not_visible_to_suppliers.class}submitOffer(){const t=[{LotName:null,LotOrderNumber:null,LotRoundId:this.box.TenderProcessRoundId,OfferBoxId:this.box.Id,OfferId:this.offer.Id}];this.isSubmitUnsubmitButtonDisabled=!0,this.changeDetectorRef.markForCheck();const r=this.multilotTenderService.getUnsubmittableOffers(t,this.box.TenderId).pipe((0,O.H)(i=>i.length?this.dialogService.confirm({titleKeyword:"str_Common_warning",textContent:i[0].ReasonUnfitForSubmission,confirmationType:"alert",cancelKeyword:"str_Common_ok",requirePassword:!1,showCheckbox:!1,htmlContent:'<div class="margin--top-20"><div>'+this.localizationService.instant("str_Tender_offer_will_not_be_submitted")+"</div></div>"}).pipe((0,h.T)(s=>s.confirmed)):(0,z.of)(!0)),(0,B.M)(i=>{i||this.enableSubmitUnsubmitButton()}),(0,f.p)(i=>i),(0,O.H)(()=>this.systemSettings.UseDigitalSignature||this.systemSettings.UseTrustedTimestampAuthority?this.openSubmitOfferDialog():this.dialogService.confirm({titleKeyword:"str_Tender_supplier_are_you_sure_submit",textContentKeyword:"str_Tender_supplier_will_be_able_modify",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_submit_offer",requirePassword:!0,showCheckbox:!1,actionMnemonic:"SubmitOffer",relatedObjectGuid:this.box.Guid,relatedObjectEntityId:this.box.EntityId}).pipe((0,h.T)(i=>i.confirmed),(0,B.M)(i=>{i||this.enableSubmitUnsubmitButton()}),(0,f.p)(i=>i)))).subscribe(()=>{this.offerStoreService.submitOffers(this.box.Id,[this.offer.Id]),this.enableSubmitUnsubmitButton()});this.subscriptions.push(r)}unsubmitOffer(){this.isSubmitUnsubmitButtonDisabled=!0,this.changeDetectorRef.markForCheck();const t=this.dialogService.confirm({titleKeyword:this.tender?.IsCollectRequest?"str_Tender_collect_request_supplier_are_you_sure_unsubmit":"str_Tender_supplier_are_you_sure_unsubmit",textContentKeyword:this.tender?.IsCollectRequest?"str_Tender_collect_request_supplier_will_be_able_submit":"str_Tender_supplier_will_be_able_submit",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_unsubmit_offer",requirePassword:!1===this.systemSettings.UseDigitalSignature,requireDigitalSignature:this.systemSettings.UseDigitalSignature,showCheckbox:!1,actionMnemonic:"UnsubmitOffer",relatedObjectGuid:this.box.Guid,relatedObjectEntityId:this.box.EntityId}).pipe((0,V.Z)(r=>(r.signitureValidationResult.IsValid?r.confirmed&&this.offerStoreService.unsubmitOffers(this.box.Id,[this.offer.Id]):this.onError(r.signitureValidationResult.ErrorMessages[0].Value),this.enableSubmitUnsubmitButton(),Y.w))).subscribe();this.subscriptions.push(t)}onError(t="str_Tender_error_while_signing"){let r;
1r=this.dialogService.confirm({titleKeyword:"str_Common_warning",textContentKeyword:t,confirmationType:"alert",okKeyword:"str_Common_confirm",requirePassword:!1,showCheckbox:!1}).pipe((0,h.T)(i=>i.confirmed),(0,f.p)(i=>!0===i)).subscribe(()=>{r.unsubscribe()})}showUnsubmitWarningMessage(){const i="str_Offer_cannot_unsubmit_continuous_evaluation_"+(0,Fr.d$)(this.offerWrapper.OfferInvitation.EvaluationState.toString(),this.evaluationStateEnum).toLowerCase();return this.dialogService.confirm({confirmationType:"alert",titleKeyword:"str_Offer_cannot_unsubmit_title",textContentKeyword:i,okKeyword:"str_Common_ok",requirePassword:!1,showCheckbox:!1})}deleteOffer(t){this.isDeletingOffer=!0,this.offerStoreService.deleteOffer(this.box.Id,t.Id)}onNameEdit(t){t?this.offerNamesInEditModeCounter++:this.offerNamesInEditModeCounter--}onOpenOfferCreateDialog(){this.destroyCreateOfferDialog();const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.offerCreateRef=this.dialogService.open(ze,t),this.offerCreateRef.componentInstance.boxId=this.box.Id,this.offerCreateRef.componentInstance.tenderParticipantId=this.offer.TenderParticipantId,this.subscriptions.push(this.offerCreateRef.componentInstance.offerCreate.subscribe(r=>{this.createOffer(this.box.Id,this.offer.TenderParticipantId,r),this.offerCreateRef.componentInstance.close()}))}createOffer(t,r,i){this.openLoader("str_Tender_creating_offer"),this.offerStoreService.createOffer(t,r,i)}proceedToSumbission(){let t;t=this.tender$.pipe((0,f.p)(r=>!!r),(0,De.s)(1)).subscribe(r=>{this.router.navigateByUrl(`/tender/reload?followUrl=/tender/${r.MainTenderId}/supplier/participations`),t&&t.unsubscribe()})}decryptOfferBlocks(){this.offerContentStoreService.decryptOfferBlocks(this.box.TenderId,this.box.Id)}onDeleteOfferReceipt(){this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Tender_deleting_offer_receipt_will_delete_all_existing_signatures",confirmationType:"delete",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!1,showCheckbox:!1}).pipe((0,j.$)()).subscribe(t=>{t.confirmed&&this.offerStoreService.deleteOfferReceipt(this.offer.Id)})}setFinancialAuditAgreement(){const t=this.dialogService.openDefault(ve,this.viewContainerRef);t.componentInstance.editMode=this.canManageFinancialAuditAgreement,t.componentInstance.consortiumMembers=(0,K.cloneDeep)(this.currentParticipantFinancialAuditItems),t.componentInstance.hasAgreement=this.currentParticipantFinancialAuditItems.length>0,t.componentInstance.allowEmptyMembersList=!0;const r=t.componentInstance.saveConsortiumMembers.pipe((0,v.n)(i=>{const s=i.map(a=>({RegistryNumber:a.RegistryNumber,OrganizationName:a.OrganizationName}));return this.currentTenderParticipantService.saveFinancialAuditAgreement(this.offer.TenderParticipantId,s).pipe((0,h.T)(a=>({result:a,members:i})))})).subscribe(({result:i,members:s})=>{let a;i?(this.currentParticipantFinancialAuditItems=s,a=this.documentService.downloadDocumentById(i).subscribe(()=>{a.unsubscribe()})):this.currentParticipantFinancialAuditItems=[],t.afterClosed().subscribe(()=>{a?.unsubscribe(),r.unsubscribe()})})}enableSubmitUnsubmitButton(){this.isSubmitUnsubmitButtonDisabled=!1,this.changeDetectorRef.markForCheck()}openLoader(t){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword=t}destroyCreateOfferDialog(){this.offerCreateRef&&(this.offerCreateRef.close(),this.offerCreateRef=null)}openSubmitOfferDialog(){this.destroySubmitOfferDialog(),this.submitOfferDialogRef=this.dialogService.openDefault(ae.i,this.viewContainerRef),this.submitOfferDialogRef.componentInstance.parentId=this.id,this.submitOfferDialogRef.componentInstance.offerName=this.offer.Name,this.submitOfferDialogRef.componentInstance.tenderId=this.offer.TenderId,this.submitOfferDialogRef.componentInstance.offerIds=[this.offer.Id],this.submitOfferDialogRef.componentInstance.canEdit=!0,this.submitOfferDialogRef.componentInstance.downloadHtml=!0,this.submitOfferDialogRef.componentInstance.useDigitalSignature=this.systemSettings.UseDigitalSignature;let r,i,t=!1;return r=this.submitOfferDialogRef.componentInstance.mark.subscribe(()=>{t=!0}),i=this.submitOfferDialogRef.afterClosed().subscribe(()=>{i.unsubscribe(),r.unsubscribe(),t&&this.offerStoreService.markOfferReceipt(this.offer.Id),this.enableSubmitUnsubmitButton()}),this.changeDetectorRef.markForCheck(),this.submitOfferDialogRef.componentInstance.submit.asObservable()}destroySubmitOfferDialog(){this.submitOfferDialogRef&&(this.submitOfferDialogRef.close(),this.submitOfferDialogRef=null)}mapPermissions(t){this.arePermissionsLoaded=!0,this.canFillOffer=void 0!==t[n.FillOfferMnemonic]?t[n.FillOfferMnemonic]:this.canFillOffer,this.canViewSubmitOffer=void 0!==t[n.ViewSubmitOfferMnemonic]?t[n.ViewSubmitOfferMnemonic]:this.canViewSubmitOffer,this.canCreateOffer=void 0!==t[n.CreateOfferMnemonic]?t[n.CreateOfferMnemonic]:this.canCreateOffer,this.canViewCreateOffer=void 0!==t[n.ViewCreateOfferMnemonic]?t[n.ViewCreateOfferMnemonic]:this.canViewCreateOffer,this.canDeleteSignedOfferReceipt=void 0!==t[n.DeleteSignedOfferReceiptMnemonic]?t[n.DeleteSignedOfferReceiptMnemonic]:this.canDeleteSignedOfferReceipt,this.canDeleteOffer=void 0!==t[n.DeleteOfferMnemonic]?t[n.DeleteOfferMnemonic]:this.canDeleteOffer,this.canUnsubmitOffer=void 0!==t[n.UnsubmitOfferMnemonic]?t[n.UnsubmitOfferMnemonic]:this.viewUnsubmitOfferButton,this.viewUnsubmitOfferButton=void 0!==t[n.ViewUnsubmitOfferButtonMnemonic]?t[n.ViewUnsubmitOfferButtonMnemonic]:this.viewUnsubmitOfferButton,this.canManageFinancialAuditAgreement=void 0!==t[ve.ManageFinancialAuditAgreementMnemonic]?t[ve.ManageFinancialAuditAgreementMnemonic]:this.canManageFinancialAuditAgreement,this.changeDetectorRef.markForCheck()}checkEncryptOffers(t,r){return!(!(t&&t.EnableEncryptOffers&&r)||r.OfferSubmission&&r.OfferSubmission.IsOfferOpen)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.bk9),e.rXU(F.W),e.rXU(le),e.rXU(T.nX),e.rXU(e.gRc),e.rXU(c.fRX),e.rXU(c.i_v),e.rXU(c.$gx),e.rXU(c.o2P),e.rXU(c.Gfq),e.rXU(c.N49),e.rXU(c.CDG),e.rXU(S.o3),e.rXU(c.VY6),e.rXU(c._wt),e.rXU(c.PiF),e.rXU(c.dqT),e.rXU(c.ZCd),e.rXU(c.zkG),e.rXU(c.kW$),e.rXU(c.DKw),e.rXU(T.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-details"]],viewQuery:function(r,i){if(1&r&&e.GBs(L.Yh,7),2&r){let s;e.mGM(s=e.lsd())&&(i.scrollbarComponent=s.first)}},features:[e.Jv_([c.bk9]),e.Vt3],decls:25,vars:63,consts:[["qualityPriceTemplate",""],[1,"offer-details-container"],[1,"offer-details-scrollable"],[1,"padding--20"],[3,"offerWrapper","submittedOffersStatus","round","consortiumMembers","tenderParticipant","isBulgarianConfiguration"],[3,"buttonClick","entity","actionMnemonic","buttonKeyword","messageKeyword","reloadActionTypes","cssClasse
1s","showButton","iconClass"],[4,"ngIf"],[3,"labelKeyword","boxId","offer",4,"ngIf"],["class","margin--bottom-20",3,"privateKey","canRequestNewKey","canManageBox",4,"ngIf"],[3,"buttonClick","buttonKeyword","messageKeyword","visibility","cssClasses","showButton","iconClass"],["class","nxcard z1 bg--white",4,"ngIf"],["class","nxcard__footer bg--white offer-details-footer",4,"ngIf"],["class","offer-details-loader",4,"ngIf"],["class","display--flex align--center content-center flex-grow--2 full-width",4,"ngIf"],[3,"tender","isBuyer",4,"ngIf"],[3,"tender","isBuyer"],[3,"labelKeyword","boxId","offer"],[1,"margin--bottom-20",3,"privateKey","canRequestNewKey","canManageBox"],[4,"ngIf","ngIfElse"],["class","nxcard margin--bottom-20 z1 bg--emerald3",4,"ngIf"],[1,"nxcard","margin--bottom-20","z1","bg--emerald3"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row","align--center"],[3,"timestamp","textClasses","timestampClasses","parentId"],[1,"nxcard","z1","bg--white"],[1,"bg--grey5a","text--center","text--grey30","no-contents-container","no-contents--animate"],[1,"align--center","display--flex","flex-column"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-lock"],[1,"text--bold","margin--bottom-10"],[1,"col-lg-6","col-md-10","no-padding"],["class","col-lg-6 col-md-10 no-padding",4,"ngIf"],[3,"deleteEvent","editName","offer","firstRoundOfferId","offerContent","tenderParticipant","offerSubmission","canFillOffer","canDeleteOffer","isBulgarianConfiguration","round","offersCount","canSelectCategory"],[1,"nxcard__footer","bg--white","offer-details-footer"],[1,"nxcard__footer-message"],[1,"nxcard__footer-options"],["class","margin--right-6","mat-button","",3,"disabled","click",4,"ngIf"],["tooltip","",3,"tooltipMessages","tooltipPosition",4,"ngIf"],["mat-button","",3,"disabled","click",4,"ngIf"],["mat-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-button","","color","warn",3,"click",4,"ngIf"],["mat-button","",1,"margin--right-6",3,"click","disabled"],["tooltip","",3,"tooltipMessages","tooltipPosition"],["mat-button","",1,"margin--right-6",3,"disabled"],["mat-button","",3,"click","disabled"],[1,"mdi","padding--right-5",3,"ngClass"],["mat-button","","color","warn",3,"click","disabled"],["mat-button","","color","warn",3,"click"],[1,"mdi","mdi-send","padding--right-5"],[1,"offer-details-loader"],[3,"diameter"],[1,"display--flex","align--center","content-center","flex-grow--2","full-width"]],template:function(r,i){1&r&&(e.j41(0,"div",1)(1,"div",2)(2,"ng-scrollbar")(3,"div",3),e.nrm(4,"nx1-offers-status-header",4),e.nI1(5,"async"),e.nI1(6,"async"),e.nI1(7,"async"),e.nI1(8,"async"),e.j41(9,"nx1-guidance-message",5),e.bIt("buttonClick",function(){return i.setFinancialAuditAgreement()}),e.k0s(),e.DNE(10,Ur,2,1,"ng-container",6),e.nI1(11,"async"),e.DNE(12,Lr,2,5,"nx1-locked-offer-block",7)(13,Ar,3,7,"nx1-manage-private-key",8),e.nI1(14,"async"),e.j41(15,"nx1-guidance-message",5),e.bIt("buttonClick",function(){return i.decryptOfferBlocks()}),e.k0s(),e.j41(16,"nx1-guidance-message",5),e.bIt("buttonClick",function(){return i.decryptOfferBlocks()}),e.k0s(),e.j41(17,"nx1-guidance-message",9),e.bIt("buttonClick",function(){return i.onDeleteOfferReceipt()}),e.k0s(),e.DNE(18,Jr,3,3,"ng-container",6)(19,Zr,15,10,"div",10)(20,ts,3,3,"ng-container",6),e.k0s()()(),e.DNE(21,as,8,5,"div",11),e.k0s(),e.DNE(22,ls,2,1,"div",12),e.nI1(23,"async"),e.DNE(24,cs,2,1,"div",13)),2&r&&(e.AVh("hide",i.isDeletingOffer||!i.arePermissionsLoaded),e.R7$(),e.AVh("offer-details-scrollable--full",!i.canShowFooter),e.R7$(3),e.Y8G("offerWrapper",e.bMT(5,49,i.offerWrapper$))("submittedOffersStatus",e.bMT(6,51,i.submittedOffersStatus$))("round",i.round)("consortiumMembers",e.bMT(7,53,i.consortiumMembers$))("tenderParticipant",i.currentTenderParticipant)("isBulgarianConfiguration",e.bMT(8,55,i.isBulgarianConfiguration$)),e.R7$(5),e.Y8G("entity",i.box)("actionMnemonic","ViewFinancialAuditRequestGuidance")("buttonKeyword","str_Offerbox_suppliers_financial_audit_agreement")("messageKeyword","str_Offerbox_guidance_financial_audit_agreement_message")("reloadActionTypes",i.reloadProvideKeyActionTypes)("cssClasse
1s","margin--bottom-20")("showButton",!0)("iconClass","mdi-alert"),e.R7$(),e.Y8G("ngIf",e.bMT(11,57,i.tender$)),e.R7$(2),e.Y8G("ngIf",i.canViewBoxContent),e.R7$(),e.Y8G("ngIf",e.bMT(14,59,i.encryptOffers$)),e.R7$(2),e.Y8G("entity",i.box)("actionMnemonic","ViewSuppliersProvidePrivateKeyGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key")("messageKeyword","str_Offerbox_guidance_provide_private_key_message")("reloadActionTypes",i.reloadProvideKeyActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("entity",i.box)("actionMnemonic","ViewSuppliersProvidePrivateKeyPriceEvaluationGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key")("messageKeyword","str_Offerbox_guidance_provide_private_key_message")("reloadActionTypes",i.reloadProvideKeyActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("buttonKeyword","str_Tender_supplier_offer_box_delete_receipt_button")("messageKeyword",null!=i.tender&&i.tender.IsCollectRequest?"str_Tender_collect_request_supplier_offer_box_delete_receipt_message":"str_Tender_supplier_offer_box_delete_receipt_message")("visibility",i.canDeleteSignedOfferReceipt)("cssClasse
1s","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("ngIf",null==i.round?null:i.round.EnableEncryptOffers),e.R7$(),e.Y8G("ngIf",!i.canViewBoxContent),e.R7$(),e.Y8G("ngIf",i.canViewBoxContent),e.R7$(),e.Y8G("ngIf",i.canShowFooter),e.R7$(),e.Y8G("ngIf",e.bMT(23,61,i.isSubmittingOrUnsubmitting$)),e.R7$(2),e.Y8G("ngIf",i.isDeletingOffer||!i.arePermissionsLoaded))},dependencies:[p.YU,p.bT,k.iV,E.wS,L.Yh,be.d,et.F,fe.n,Z.x,tt.F,Fe.s,Ze,Me,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex-grow:2}.offer-details-scrollable[_ngcontent-%COMP%]{height:calc(100% - 60px)}.offer-details-scrollable--full[_ngcontent-%COMP%]{height:100%}.offer-details-footer[_ngcontent-%COMP%]{border-radius:0;border:none;box-shadow:inset 1px 0 #0000001a,-1px -1px 5px #0003;position:relative;z-index:2}.offer-details-container[_ngcontent-%COMP%], .offer-details-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.offer-details-loader[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#00000026;z-index:1000}"],changeDetection:0})}}return n})();var Q=d(93690),us=d(68250),ps=d(69106);const fs=(n,o)=>({"survey-content-scrollable":n,"survey-content-scrollable-editable":o});function ms(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-survey-content-tree",7),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("showTableOfContentEvent",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showTableOfContent(null==i.surveyLevelContentsTree?null:i.surveyLevelContentsTree.Id))})("change",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onChange())})("cancel",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onCancel())})("save",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onSave())})("createSurveyQuestionResult",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCreateSurveyQuestionResult(i))})("updateSurveyQuestionResult",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onUpdateSurveyQuestionResult(i))})("deleteSurveyQuestionResult",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onDeleteSurveyQuestionResult(i))}),e.k0s()}if(2&n){let t;const r=e.XpG();e.Y8G("breadcrumbPath",r.breadcrumbPath)("surveyContentTree",r.surveyLevelContentsTree)("showAnswers",!0)("canEdit",r.canEdit)("surveyLevelsPathToExpand",e.bMT(1,7,r.surveyLevelPath$))("boxId",e.bMT(2,9,r.boxId$))("offer",null==(t=e.bMT(3,11,r.offer$))?null:t.Offer)}}function _s(n,o){1&n&&(e.j41(0,"div",20),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Survey_unsaved_changes")," "))}function hs(n,o){1&n&&(e.j41(0,"div",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Survey_saving_error")," "))}function gs(n,o){1&n&&(e.j41(0,"div",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Survey_saving_error_validating_attached_documents")," "))}function bs(n,o){1&n&&(e.j41(0,"div",22)(1,"div",23),e.EFF(2),e.nI1(3,"translate"),e.nrm(4,"i",24),e.k0s()()),2&n&&(e.Y8G("@savedState",void 0),e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Survey_content_saved")," "))}function vs(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",8)(1,"div",9)(2,"div",10),e.DNE(3,_s,3,3,"div",11)(4,hs,3,3,"div",12)(5,gs,3,3,"div",12),e.j41(6,"button",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onSave())}),e.nrm(7,"i",14),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.j41(10,"div",15)(11,"div",16)(12,"span",17),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.nrm(15,"i",18),e.k0s(),e.DNE(16,bs,5,4,"div",19),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("@animateSaving",t.currentState),e.R7$(2),e.Y8G("ngIf",t.state===t.stateType.LockedByMeWithChanges),e.R7$(),e.Y8G("ngIf",t.state===t.stateType.Error),e.R7$(),e.Y8G("ngIf",t.state===t.stateType.ErrorValidatingDocuments),e.R7$(),e.Y8G("disabled",!t.canSave),e.BMQ("id",t.getButtonId("save")),e.R7$(2),e.SpI(" ",e.bMT(9,9,"str_Common_save_as_draft")," "),e.R7$(5),e.JRh(e.bMT(14,11,"str_Survey_content_saving")),e.R7$(3),e.Y8G("ngIf",t.isSaved)}}function Ss(n,o){1&n&&(e.j41(0,"div",25),e.nrm(1,"mat-spinner",26),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let xs=(()=>{class n extends g.iD{static{this.FillOfferMnemonic="FillOffer"}static{this.DeleteSignedOfferReceiptMnemonic="DeleteSignedOfferReceipt"}get canEdit(){return this.canFillOffer&&Q.mV[this.state].canEdit}get canSave(){return this.canEdit&&Q.mV[this.state].canSave}get isSaved(){return this.state===this.stateType.Saved||this.state===this.stateType.SavedWithNewChanges}get isSaving(){return this.state===this.stateType.Saving||this.state===this.stateType.SavingWithNewChanges||this.state===this.stateType.LeavingPageSaving||this.state===this.stateType.LeavingPageSavingWithNewChanges||this.state===this.stateType.LeavingPageWithChanges}get currentState(){return this.isSaving||this.isSaved?"active":"inactive"}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q){super(t,r,i),this.route=s,this.router=a,this.changeDetectorRef=l,this.offerStoreService=u,this.requirementsStoreService=m,this.dialogService=b,this.principalPermissionService=x,this.offerContentStoreService=y,this.routerStoreService=C,this.scrollService=G,this.boxStoreService=U,this.errorStateStoreService=q,this.boxId$=this.routerStoreService.getIdFromParams(this.route.parent.parent.paramMap,"boxId"),this.offerId$=this.routerStoreService.getIdFromParams(this.route.parent.paramMap,"offerId"),this.surveyLevelId$=this.routerStoreService.getIdFromParams(this.route.paramMap,"surveyLevelId"),this.groupId$=this.routerStoreService.getIdFromParams(this.route.queryParamMap,"groupId"),this.areLoadedSurveyResultsByOfferId$=this.offerId$.pipe((0,V.Z)(P=>this.offerContentStoreService.getAreLoadedSurveyResultsByOfferId(P))),this.surveyLevelContentsTree$=(0,$.z)([this.surveyLevelId$,this.offerId$]).pipe((0,V.Z)(([P,W])=>this.offerContentStoreService.getFilterdSurveyLevelContentsTreeBySurveyLevelIdAndOfferId(P,W))),this.surveyLevelContentsTree=null,this.surveyLevelPath$=this.groupId$.pipe((0,V.Z)(P=>this.requirementsStoreService.getSurveyLevelPathBySurveyLevelId(P))),this.surveyLevels$=this.requirementsStoreService.getSurveyLevelTree(),this.offer$=this.offerId$.pipe((0,B.M)(P=>this.offerId=P),(0,V.Z)(P=>this.offerStoreService.getOfferWrapperByOfferId(P))),this.breadcrumbPath=[],this.stateType=Q.n1,this.canDeleteSignedOfferReceipt=!1,this.canFillOffer=!1,this.navigateToErrorPage=!1,this.subscriptions=[]}ngOnInit(){const t=this.surveyLevelId$.subscribe(r=>this.requirementsStoreService.loadSurveyLevelContents(r));this.subscriptions.push(t),this.subscriptions.push((0,$.z)([this.offer$.pipe((0,f.p)(r=>!!r)),this.boxId$.pipe((0,v.n)(r=>this.boxStoreService.getBoxById(r)))]).pipe((0,O.H)(([r,i])=>{this.offerWrapper=r,this.box=i,this.setBreadcrumb();const s=this.principalPermissionService.getActionsToCheck([n.FillOfferMnemonic,n.DeleteSignedOfferReceiptMnemonic],r.Offer.EntityId,r.Offer.Guid);return this.principalPermissionService.hasPermissions(s)}),(0,B.M)(r=>{this.canFillOffer=r[n.FillOfferMnemonic],this.canDeleteSignedOfferReceipt=r[n.DeleteSignedOfferReceiptMnemonic]})).subscribe(()=>{this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.surveyLevelContentsTree$.subscribe(r=>{this.surveyLevelContentsTree=r,this.setSurveyToDocumentService(),this.changeDetectorRef.markForCheck()})),this.initUIState(),this.subscriptions.push(this.errorStateStoreService.getNavigateToErrorPage().subscribe(r=>this.navigateToErrorPage=r))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.destroyTableOfContentComponent()}ngAfterContentInit(){this.scrollService.setScrollDirective(this.scrollbarComponent),this.isScrollSet=!0}setBreadcrumb(){this.breadcrumbPath=[{title:this.box.Name,url:["../../../.."]},{title:this.offerWrapper.Offer.Name,url:["../.."]}]}showTableOfContent(t){const r=new S.Pe;
1r.viewContainerRef=this.viewContainerRef;let i=null;this.tableOfContentRaisedCardComponentRef=this.dialogService.open(Ae.w,r),this.tableOfContentRaisedCardComponentRef.componentInstance.surveyLevels$=this.surveyLevels$,this.tableOfContentRaisedCardComponentRef.componentInstance.offer=this.offerWrapper.Offer,this.tableOfContentRaisedCardComponentRef.componentInstance.selectedSurveyLevelId=t,this.subscriptions.push(this.tableOfContentRaisedCardComponentRef.componentInstance.selectSurveyLevel.subscribe(s=>{i=s,this.destroyTableOfContentComponent()})),this.tableOfContentRaisedCardComponentRef.afterClosed().subscribe(()=>{i&&this.selectSurvey(i)})}hasChanges(){return!Q.mV[this.state].canLeave}onChange(){this.canEdit&&this.offerContentStoreService.changeSurveyQuestionResult(this.box.Id,this.offerWrapper.Offer.Id,this.surveyLevelContentsTree.EntityId,this.surveyLevelContentsTree.Guid)}onCreateSurveyQuestionResult(t){this.canEdit&&this.offerContentStoreService.createSurveyQuestionResult(this.box.Id,this.offerWrapper.Offer.Id,this.surveyLevelContentsTree.EntityId,this.surveyLevelContentsTree.Guid,t.answer,t.question)}onUpdateSurveyQuestionResult(t){this.canEdit&&this.offerContentStoreService.updateSurveyQuestionResult(this.box.Id,this.offerWrapper.Offer.Id,this.surveyLevelContentsTree.EntityId,this.surveyLevelContentsTree.Guid,t.answer,t.question)}onDeleteSurveyQuestionResult(t){this.canEdit&&this.offerContentStoreService.deleteSurveyQuestionResult(this.box.Id,this.offerWrapper.Offer.Id,this.surveyLevelContentsTree.EntityId,this.surveyLevelContentsTree.Guid,t.question)}onCancel(){}onSave(t=!1){this.canSave&&this.offerContentStoreService.saveSurveyResults(this.box.Id,this.offerWrapper.Offer.Id,this.surveyLevelContentsTree.EntityId,this.surveyLevelContentsTree.Guid,this.surveyLevelContentsTree.Id,t)}onDeleteOfferReceipt(){this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Tender_deleting_offer_receipt_will_delete_all_existing_signatures",confirmationType:"delete",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!1,showCheckbox:!1}).pipe((0,j.$)()).subscribe(t=>{t.confirmed&&this.offerStoreService.deleteOfferReceipt(this.offerId)})}selectSurvey(t){const r=t[0],i=t[1],s={};i&&i.Id&&(s.groupId=i.Id),this.router.navigate(["..",r.Id],{relativeTo:this.route,queryParams:s}).then(a=>{null===a&&this.surveyContentTreeComponent&&this.surveyContentTreeComponent.focus()})}destroyTableOfContentComponent(){this.tableOfContentRaisedCardComponentRef&&(this.tableOfContentRaisedCardComponentRef.close(),this.tableOfContentRaisedCardComponentRef=null)}initUIState(){const t=(0,$.z)([this.boxId$,this.offer$.pipe((0,f.p)(i=>!!i),(0,M.F)(null,i=>
1i.Offer.Id)),this.surveyLevelId$.pipe((0,v.n)(i=>this.requirementsStoreService.getSurveyLevelById(i)),(0,f.p)(i=>!!i),(0,M.F)(null,i=>i.Id))]).subscribe(([i,s,a])=>{this.offerContentStoreService.setInitialUIState(i,s.Offer.Id,a.EntityId,a.Guid),this.changeDetectorRef.markForCheck()}),r=this.offerContentStoreService.getUIState().subscribe(i=>{this.state=i,this.changeDetectorRef.markForCheck(),this.changeDetectorRef.detectChanges()});this.subscriptions.push(t,r)}setSurveyToDocumentService(){this.documentService instanceof Ke.Z&&(this.documentService.survey=this.surveyLevelContentsTree)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.PiF),e.rXU(c.DKw),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(e.gRc),e.rXU(c.fRX),e.rXU(c.$17),e.rXU(S.o3),e.rXU(c.N49),e.rXU(c.kW$),e.rXU(c.o9Y),e.rXU(c.bk9),e.rXU(c.o2P),e.rXU(ps.o))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer-survey"]],viewQuery:function(r,i){if(1&r&&(e.GBs(L.Yh,7),e.GBs(Pe.Vz,5)),2&r){let s;e.mGM(s=e.lsd())&&(i.scrollbarComponent=s.first),e.mGM(s=e.lsd())&&(i.surveyContentTreeComponent=s.first)}},features:[e.Jv_([c.bk9]),e.Vt3],decls:10,vars:15,consts:[["loading",""],[1,"survey-content-container"],[3,"ngClass"],[1,"padding--20"],[3,"buttonClick","buttonKeyword","messageKeyword","visibility","cssClasses","showButton","iconClass"],[3,"breadcrumbPath","surveyContentTree","showAnswers","canEdit","surveyLevelsPathToExpand","boxId","offer","showTableOfContentEvent","change","cancel","save","createSurveyQuestionResult","updateSurveyQuestionResult","deleteSurveyQuestionResult",4,"ngIf","ngIfElse"],["class","nxcard__footer bg--white survey-content-footer overflow-hidden",4,"ngIf"],[3,"showTableOfContentEvent","change","cancel","save","createSurveyQuestionResult","updateSurveyQuestionResult","deleteSurveyQuestionResult","breadcrumbPath","surveyContentTree","showAnswers","canEdit","surveyLevelsPathToExpand","boxId","offer"],[1,"nxcard__footer","bg--white","survey-content-footer","overflow-hidden"],[1,"display--flex","flex-column","align--end","full-width"],[1,"nxcard__footer-options","survey-content-footer-options"],["class","text--14px display--flex align--center text--grey35 text--14px padding--right-10 text--uppercase text--bold",4,"ngIf"],["class","text--14px display--flex align--center text--rose0 text--14px padding--right-10 text--uppercase text--bold",4,"ngIf"],["mat-button","","color","warn",3,"click","disabled"],[1,"mdi","mdi-check","padding--right-5"],[1,"pos--relative","full-width","survey-content-footer-options"],[1,"nxcard__footer-options","survey-content-footer-options","display--flex","align--center","content-end"],[1,"text--grey35","text--uppercase","text--bold","text--14px"],[1,"mdi","mdi-loading","mdi-spin","padding--left-5","text--seablue0"],["class","nxcard__footer-options survey-content-footer-options saved-state bg--emerald3 content-end",4,"ngIf"],[1,"text--14px","display--flex","align--center","text--grey35","text--14px","padding--right-10","text--uppercase","text--bold"],[1,"text--14px","display--flex","align--center","text--rose0","text--14px","padding--right-10","text--uppercase","text--bold"],[1,"nxcard__footer-options","survey-content-footer-options","saved-state","bg--emerald3","content-end"],[1,"text--14px","display--flex","align--center","text--grey35","text--14px","padding--right-5","text--uppercase","text--bold"],[1,"mdi","mdi-check","padding--left-5","text--emerald-1"],[1,"survey-content-loader"],[3,"diameter"]],template:function(r,i){if(1&r){const s=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ng-scrollbar")(3,"div",3)(4,"nx1-guidance-message",4),e.bIt("buttonClick",function(){return e.eBV(s),e.Njj(i.onDeleteOfferReceipt())}),e.k0s(),e.DNE(5,ms,4,13,"nx1-survey-content-tree",5),e.nI1(6,"async"),e.k0s()()(),e.DNE(7,vs,17,13,"div",6),e.k0s(),e.DNE(8,Ss,2,1,"ng-template",null,0,e.C5r)}if(2&r){const s=e.sdS(9);e.R7$(),e.Y8G("ngClass",e.l_i(12,fs,!i.canFillOffer,i.canFillOffer)),e.R7$(3),e.Y8G("buttonKeyword","str_Tender_supplier_offer_box_delete_receipt_button")("messageKeyword","str_Tender_supplier_offer_box_delete_receipt_message")("visibility",i.canDeleteSignedOfferReceipt)("cssClasse
1s","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("ngIf",e.bMT(6,10,i.areLoadedSurveyResultsByOfferId$)&&i.surveyLevelContentsTree&&i.isScrollSet)("ngIfElse",s),e.R7$(2),e.Y8G("ngIf",i.canFillOffer)}},dependencies:[p.YU,p.bT,k.iV,E.wS,L.Yh,Ye.V,fe.n,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:block}.survey-content-container[_ngcontent-%COMP%], .survey-content-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.survey-content-loader[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.survey-content-scrollable-editable[_ngcontent-%COMP%]{height:calc(100% - 60px)}.survey-content-scrollable[_ngcontent-%COMP%]{height:100%}.survey-content-footer[_ngcontent-%COMP%]{border-radius:0;border:none;box-shadow:inset 1px 0 #0000001a,-1px -1px 5px #0003;position:relative;z-index:2}.survey-content-footer-options[_ngcontent-%COMP%]{height:60px}.saved-state[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;box-shadow:inset 1px 0 #0000001a}"],data:{animation:[...us.S]},changeDetection:0})}}return n})(),Se=(()=>{class n{constructor(t,r,i,s,a){this.router=t,this.tenderProcessStoreService=r,this.privateKeyStoreService=i,this.offerStoreService=s,this.offerContentStoreService=a,this.OfferBoxIdQueryParameter="boxId"}canActivate(t,r){const i=t.parent.parent,s=+i.params[this.OfferBoxIdQueryParameter],a=+t.parent.paramMap.get("offerId"),l=+t.paramMap.get("surveyLevelId");return(0,$.z)([this.tenderProcessStoreService.getSelectedProcessRound().pipe((0,f.p)(u=>!!u),(0,h.T)(u=>u.EnableEncryptOffers)),this.offerStoreService.getOfferWrapperByOfferId(a).pipe((0,f.p)(u=>!!u),(0,j.$)())]).pipe((0,h.T)(([u,m])=>u&&(!m.OfferSubmission||!m.OfferSubmission.IsOfferOpen)),(0,v.n)(u=>u?this.privateKeyStoreService.getPrivateKey().pipe((0,j.$)(),(0,h.T)(m=>{if(m)return!0;{const b=r.url.slice(0,r.url.indexOf(i.url[i.url.length-1].path));return this.router.navigate([b,s],{queryParams:{returnUrl:r.url}}),!1}})):(l&&this.offerContentStoreService.loadSurveyQuestionResults(s,a,l),(0,z.of)(!0))),(0,j.$)())}canDeactivate(t,r,i,s){if(t.navigateToErrorPage)return!0;if(t&&(t.state===Q.n1.LeavingPage||t.state===Q.n1.LeavingPageWithChanges||t.state===Q.n1.LeavingPageSaving||t.state===Q.n1.LeavingPageSavingWithNewChanges))return!1;if(t&&t.box&&t.offerWrapper&&t.surveyLevelContentsTree&&this.offerContentStoreService.leavePage(t.box.Id,t.offerWrapper.Offer.Id,t.surveyLevelContentsTree.EntityId,t.surveyLevelContentsTree.Guid),t&&t.hasChanges()){const a=this.offerContentStoreService.getUIState().pipe((0,f.p)(l=>l===Q.n1.Initial),(0,h.T)(()=>!0),(0,j.$)()).subscribe(()=>{a.unsubscribe(),s&&this.router.navigateByUrl(s.url)});return!1}return!0}static{this.\u0275fac=function(r){return new(r||n)(e.KVO(T.Ix),e.KVO(c.i_v),e.KVO(c.zkG),e.KVO(c.fRX),e.KVO(c.kW$))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac})}}return n})(),Ts=(()=>{class n extends g.$G{constructor(t,r,i){super(t),this.documentService=r,this.route=i,this.subscriptions=[]}ngOnInit(){this.setBoxIdAndOfferIdToDocumentService()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setBoxIdAndOfferIdToDocumentService(){const t=(0,$.z)([this.route.parent.paramMap,this.route.paramMap]).pipe((0,f.p)(([r,i])=>r.has("boxId")&&i.has("offerId"))).subscribe(([r,i])=>{this.boxId=parseInt(r.get("boxId"),10),this.offerId=parseInt(i.get("offerId"),10);const s=this.documentService;s.offerId=this.offerId,s.boxId=this.boxId});this.subscriptions.push(t)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.DKw),e.rXU(T.nX))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-offer"]],features:[e.Vt3],decls:1,vars:0,template:function(r,i){1&r&&e.nrm(0,"router-outlet")},dependencies:[T.n3],styles:["[_nghost-%COMP%]{display:flex;width:100%;flex-grow:2;flex-direction:column}"],changeDetection:0})}}return n})();var Is=d(87835),ys=d(83860),Cs=d(70492),Os=d(74340),Rs=d(10350);const Ms=["descBody"],Ps=(n,o)=>({"nxcard__body--no-scroll":n,"sender-body":o});function Ds(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-tender-explicite-status",32),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("tender",t.tender)("isBuyer",null==t.tenderGuard?null:t.tenderGuard.isBuyer)}}function ks(n,o){if(1&n&&(e.j41(0,"span",36),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"async"),e.k0s()),2&n){let t;const r=e.XpG(2);e.R7$(),e.Lme("",e.bMT(2,2,"str_Common_tender")," ",null==(t=e.bMT(3,4,r.mainTender$))?null:t.TenderId,"")}}function ws(n,o){if(1&n&&(e.j41(0,"span",36),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"async"),e.k0s()),2&n){let t;const r=e.XpG(2);e.R7$(),e.Lme("",e.bMT(2,2,"str_Common_tender")," ",null==(t=e.bMT(3,4,r.mainTender$))?null:t.BulgarianTenderNumber,"")}}function $s(n,o){if(1&n&&(e.j41(0,"div",33),e.DNE(1,ks,4,6,"span",34),e.nI1(2,"async"),e.DNE(3,ws,4,6,"span",34),e.nI1(4,"async"),e.j41(5,"span",35),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&n){let t,r;const i=e.XpG();e.R7$(),e.Y8G("ngIf",null===(null==(t=e.bMT(2,4,i.mainTender$))?null:t.BulgarianTenderNumber)),e.R7$(2),e.Y8G("ngIf",null!==(null==(r=e.bMT(4,6,i.mainTender$))?null:r.BulgarianTenderNumber)),e.R7$(3),e.Lme("",e.bMT(7,8,"str_Tender_lot")," ",null==i.tender?null:i.tender.LotNumber,"")}}function Gs(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-image-loader",37),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("source",null==t.buyerOrganization?null:t.buyerOrganization.ImageUrl)("icon","mdi-domain")("iconShow",null===(null==t.buyerOrganization?null:t.buyerOrganization.ImageUrl))("iconClass","text--24px text--grey40")("width",150)("imageClass","")}}function Es(n,o){if(1&n&&(e.j41(0,"div",39)(1,"div",16)(2,"div",4)(3,"div",5)(4,"span",40),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()(),e.j41(7,"div",41),e.nrm(8,"nx1-document-list",42),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(5),e.JRh(e.bMT(6,4,"str_Common_supplemental_files")),e.R7$(3),e.Y8G("documents",t.documents)("canDelete",!1)("listType","table")}}function Bs(n,o){if(1&n&&(e.qex(0),e.DNE(1,Es,9,6,"div",38),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.documents.length)}}function Fs(n,o){1&n&&(e.j41(0,"div",43),e.nrm(1,"mat-spinner",44),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}function Ns(n,o){1&n&&e.nrm(0,"nx1-recommended-tasks-card")}function js(n,o){1&n&&e.nrm(0,"nx1-dashboard-messages-card")}function Xs(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-tender-lot-list",45),e.bIt("viewEvent",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onViewTender(i))})("clickMainButton",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onAccessListOfLots(i))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("cardNameKeyword","str_Tender_multilot_list_of_lots")("buttonNameKeyword","str_Tender_access")("isMainButtonAvailabe",!1)("isMainButtonActive",!1)("isTitleClickable",!1)("lots$",t.lots$)}}let Vs=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l,u,m,b,x,y,C){super(t),this.tenderSupplierGuard=r,this.tenderGuard=i,this.employeesService=s,this.dialogService=a,this.tenderPropertiesStoreService=l,this.tenderStoreService=u,this.multilotTenderStoreService=m,this.router=b,this.activatedRoute=x,this.currentTenderParticipantStoreService=y,this.boxStoreService=C,this.canShowFull=!1,this.show
1Full=!1,this.subscriptions=[]}ngOnInit(){this.isLoaded$=this.tenderPropertiesStoreService.getAreLoadedTenderProperties(),this.tenderPropertiesStoreService.loadTenderProperties(this.tenderGuard.tenderId),this.tender$=this.tenderSupplierGuard.tender$;const t=this.tender$.pipe((0,f.p)(a=>!!a),(0,B.M)(a=>{this.tender=a,this.dashboardKeyword=this.tender&&this.tender.IsCommonPart?"str_Tender_common_part_dashboard":this.tender&&this.tender.MainTenderId?"str_Tender_lot_dashboard":this.tender&&this.tender.IsMainTender?"str_Tender_multilot_overview":"str_Tender_dashboard"}),(0,O.H)(()=>this.tenderStoreService.getTenderBuyerOrganization())).subscribe(a=>{null==a&&this.tenderStoreService.loadBuyerOrganization(this.tender),this.buyerOrganization=a});this.subscriptions.push(t);const i=this.tender$.pipe((0,v.n)(a=>this.employeesService.getLeadBuyerByTenderId(a.Id))).subscribe(a=>{this.leadBuyer=a});this.subscriptions.push(i),this.subscriptions.push(this.tenderPropertiesStoreService.getTenderPropertyByMnemonic("Description").subscribe(a=>{this.tenderDescriptionProperty=a})),this.mainTender$=this.multilotTenderStoreService.getMultilotMainTender(),this.lots$=this.multilotTenderStoreService.getMultilotLotsWithAccessibility(!0,!1,!1),this.isTenderParticipant$=this.currentTenderParticipantStoreService.getIsTenderParticipantLoaded().pipe((0,f.p)(a=>a),(0,I.K)(this.currentTenderParticipantStoreService.getCurrentTenderParticipant()),(0,h.T)(a=>!!a));const s=this.boxStoreService.getCurrentProcessRoundBoxesByTenderIdAndBoxType(this.tender.Id,NX1.Model.Enums.BoxType.Offer).pipe((0,h.T)(a=>a[0]),(0,f.p)(a=>!!a)).subscribe(a=>{this.currentRoundOfferBox=a,this.currentRoundOfferBoxLink=[a.TenderProcessRoundId,"offers",a.Id]});this.subscriptions.push(s)}ngAfterViewChecked(){if(this.tender&&!this.canShowFull)if(this.descBody.nativeElement.scrollHeight<300){let t;this.canShowFull=!0,t=(0,Ue.O)(1).subscribe(()=>{this.showFull=!0,t.unsubscribe()})}else this.canShowFull=!0}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}viewBuyerOrganizationProfile(){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.buyerOrganizationProfileRef=this.dialogService.open(Is.Od,t),this.buyerOrganizationProfileRef.componentInstance.organization=this.buyerOrganization,this.buyerOrganizationProfileRef.componentInstance.tenderParticipantDisplayName=this.tender.LeadBuyerDisplayName;const r=this.buyerOrganizationProfileRef.afterClosed().subscribe(i=>{this.buyerOrganizationProfileRef=null});this.subscriptions.push(r)}openProfile(){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.leadBuyerProfileRef=this.dialogService.open(Qe.l,t),this.leadBuyerProfileRef.componentInstance.employee=this.leadBuyer}showDescription(){this.showFull=!0}onViewTender(t){this.router.navigateByUrl(`/tender/reload?followUrl=/tender/${t}`)}onAccessListOfLots(t){this.router.navigate(["lots"],{relativeTo:this.activatedRoute})}get documents(){if(this.tender&&this.tenderDescriptionProperty){const t=this.tender.PropertyValues.find(r=>r.TenderPropertyId===this.tenderDescriptionProperty.Id);if(t&&t.Documents)return t.Documents}return[]}navigateToMultilotOffers(){this.router.navigate(["tender",this.tender.Id,"supplier","participations"])}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(F.W),e.rXU(D.U),e.rXU(c.rHP),e.rXU(S.o3),e.rXU(c.WHN),e.rXU(c.$gx),e.rXU(c.Rh7),e.rXU(T.Ix),e.rXU(T.nX),e.rXU(c.VY6),e.rXU(c.o2P))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-activity"]],viewQuery:function(r,i){if(1&r&&e.GBs(Ms,7),2&r){let s;e.mGM(s=e.lsd())&&(i.descBody=s.first)}},inputs:{parentId:"parentId"},features:[e.Vt3],decls:59,vars:81,consts:[["descBody",""],["loader",""],[1,"nxcard","z1","bg--white","margin--bottom-20"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[4,"ngIf"],[3,"box","actionMnemonic","messageKeyword","buttonKeyword","link"],[3,"buttonClick","entity","actionMnemonic","buttonKeyword","messageKeyword","cssClasses","showButton","iconClass"],[1,"nxcard","bg--white","margin--bottom-20","z1"],[1,"pic-card","prettyCard","border--radius-top"],[1,"pic-card__info"],["class","pic-card-section",4,"ngIf"],[1,"pic-card__info-title"],[1,"pic-card__options"],[1,"avatar"],[1,"nxcard__header"],[1,"align--start","content-center","flex-column","flex-grow--1","padding--20","border--right"],[1,"text--grey40"],[1,"flex-row","padding--top-10","pointer",3,"click"],[1,"margin--right-5","pull-left",2,"width","25px","height","25px",3,"source","icon","iconShow","iconClass","width","imageClass"],[1,"padding--top-5","text--bold"],[1,"align--start","content-center","flex-column","flex-grow--1","padding--20"],[1,"margin--right-5","pull-left",2,"width","25px","height","25px",3,"source","width","isRound","displayName"],[1,"nxcard__body","padding--20","pos--relative",3,"ngClass"],[1,"text--bold","text--16px"],[1,"break-word","cke__c
1ontainer","full-width",3,"innerHtml"],[4,"ngIf","ngIfElse"],[1,"sender-overlay"],["mat-button","",1,"sender-overlay-btn",3,"click"],[1,"mdi","mdi-chevron-down","padding--left-5"],[3,"cardNameKeyword","buttonNameKeyword","isMainButtonAvailabe","isMainButtonActive","isTitleClickable","lots$","viewEvent","clickMainButton",4,"ngIf"],[3,"tender","isBuyer"],[1,"pic-card-section"],["class","pic-card-section-id","id"," ",4,"ngIf"],["id"," ",1,"pic-card-section-name","text--ellipsis"],["id"," ",1,"pic-card-section-id"],[1,"organization-image","margin--right-5","pull-left",2,"width","150px","height","150px",3,"source","icon","iconShow","iconClass","width","imageClass"],["class","nxcard nxcard--border bg--white overflow-hidden margin--top-15",4,"ngIf"],[1,"nxcard","nxcard--border","bg--white","overflow-hidden","margin--top-15"],[1,"text--uppercase","text--ellipsis"],[1,"nxcard__body"],[3,"documents","canDelete","listType"],[1,"display--flex","align--center","content-center","padding--40","full-height"],[3,"diameter"],[3,"viewEvent","clickMainButton","cardNameKeyword","buttonNameKeyword","isMainButtonAvailabe","isMainButtonActive","isTitleClickable","lots$"]],template:function(r,i){if(1&r){const s=e.RV6();e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()()(),e.DNE(7,Ds,2,2,"ng-container",6),e.nrm(8,"nx1-box-guidance-message",7)(9,"nx1-box-guidance-message",7),e.j41(10,"nx1-guidance-message",8),e.bIt("buttonClick",function(){return e.eBV(s),e.Njj(i.navigateToMultilotOffers())}),e.k0s(),e.j41(11,"nx1-guidance-message",8),e.bIt("buttonClick",function(){return e.eBV(s),e.Njj(i.navigateToMultilotOffers())}),e.k0s(),e.j41(12,"div",9)(13,"div",10)(14,"div",11),e.DNE(15,$s,8,10,"div",12),e.j41(16,"h1",13),e.EFF(17),e.k0s()(),e.nrm(18,"div",14),e.j41(19,"div",15),e.DNE(20,Gs,2,6,"ng-container",6),e.k0s()(),e.j41(21,"div",16)(22,"div",17)(23,"h5",18),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"div",19),e.bIt("click",function(){return e.eBV(s),e.Njj(i.viewBuyerOrganizationProfile())}),e.nrm(27,"nx1-image-loader",20),e.j41(28,"h4",21),e.EFF(29),e.k0s()()(),e.j41(30,"div",22)(31,"h5",18),e.EFF(32),e.nI1(33,"translate"),e.k0s(),e.j41(34,"div",19),e.bIt("click",function(){return e.eBV(s),e.Njj(i.openProfile())}),e.nrm(35,"nx1-image-loader",23),e.j41(36,"h4",21),e.EFF(37),e.k0s()()()(),e.j41(38,"div",24,0)(40,"span",25),e.EFF(41),e.nI1(42,"translate"),e.k0s(),e.nrm(43,"div",26),e.DNE(44,Bs,2,1,"ng-container",27),e.nI1(45,"async"),e.DNE(46,Fs,2,1,"ng-template",null,1,e.C5r),e.j41(48,"div",28)(49,"button",29),e.bIt("click",function(){return e.eBV(s),e.Njj(i.showDescription())}),e.EFF(50),e.nI1(51,"translate"),e.nrm(52,"i",30),e.k0s()()()(),e.DNE(53,Ns,1,0,"nx1-recommended-tasks-card",6),e.nI1(54,"async"),e.DNE(55,js,1,0,"nx1-dashboard-messages-card",6),e.nI1(56,"async"),e.DNE(57,Xs,1,6,"nx1-tender-lot-list",31),e.nI1(58,"async")}if(2&r){const s=e.sdS(47);e.R7$(5),e.JRh(e.bMT(6,60,i.dashboardKeyword)),e.R7$(2),e.Y8G("ngIf",i.tender.IsArchived||i.tender.IsCanceled||i.tender.IsPaused),e.R7$(),e.Y8G("box",i.currentRoundOfferBox)("actionMnemonic","ViewSuppliersProvidePrivateKeyGuidance")("messageKeyword","str_Tender_supplier_dashboard_guidance_provide_private_key_message")("buttonKeyword","str_Tender_supplier_dashboard_go_to_offer_box")("link",i.currentRoundOfferBoxLink),e.R7$(),e.Y8G("box",i.currentRoundOfferBox)("actionMnemonic","ViewSuppliersProvidePrivateKeyPriceEvaluationGuidance")("messageKeyword","str_Tender_supplier_dashboard_guidance_provide_private_key_price_evaluation_message")("buttonKeyword","str_Tender_supplier_dashboard_go_to_offer_box")("link",i.currentRoundOfferBoxLink),e.R7$(),e.Y8G("entity",i.tender)("actionMnemonic","ViewMultilotSuppliersProvidePrivateKeyGuidance")("buttonKeyword","str_Tender_multilot_go_to_offers")("messageKeyword","str_Tender_multilot_guidance_provide_private_key_message")("cssClasse
1s","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("entity",i.tender)("actionMnemonic","ViewMultilotSuppliersProvidePrivateKeyPriceEvaluationGuidance")("buttonKeyword","str_Tender_multilot_go_to_offers")("messageKeyword","str_Tender_multilot_guidance_provide_private_key_price_evaluation_message")("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(4),e.Y8G("ngIf",null!=(null==i.tender?null:i.tender.LotNumber)&&(null==i.tender?null:i.tender.LotNumber)>0),e.R7$(2),e.SpI(" ",i.tender.Name,""),e.R7$(3),e.Y8G("ngIf",null==i.buyerOrganization?null:i.buyerOrganization.ImageUrl),e.R7$(4),e.SpI("",e.bMT(25,62,"str_Tender_buying_organization"),":"),e.R7$(3),e.Y8G("source",null==i.buyerOrganization?null:i.buyerOrganization.ImageUrl)("icon","mdi-domain")("iconShow",null===(null==i.buyerOrganization?null:i.buyerOrganization.ImageUrl))("iconClass","text--24px text--grey40")("width",25)("imageClass",""),e.R7$(),e.BMQ("id",i.getId("viewOrganization")),e.R7$(),e.SpI(" ",i.tender.LeadBuyerDisplayName," "),e.R7$(3),e.SpI("",e.bMT(33,64,"str_Tender_contact_person"),":"),e.R7$(3),e.Y8G("source",null==i.leadBuyer||null==i.leadBuyer.User?null:i.leadBuyer.User.ImageUrl)("width",25)("isRound",!0)("displayName",(null==i.leadBuyer?null:i.leadBuyer.FirstName)+" "+(null==i.leadBuyer?null:i.leadBuyer.LastName)),e.R7$(),e.BMQ("id",i.getId("viewLeadBuyer")),e.R7$(),e.Lme(" ",null==i.leadBuyer?null:i.leadBuyer.FirstName," ",null==i.leadBuyer?null:i.leadBuyer.LastName," "),e.R7$(),e.Y8G("ngClass",e.l_i(78,Ps,i.showFull,!1===i.showFull)),e.R7$(2),e.BMQ("id",i.getId("openTenderDescription")),e.R7$(),e.JRh(e.bMT(42,66,"str_Tender_description")),e.R7$(2),e.Y8G("innerHtml",null!=i.tender&&i.tender.Description?null==i.tender?null:i.tender.Description:"",e.npT),e.BMQ("id",i.getId("tenderDescription")),e.R7$(),e.Y8G("ngIf",e.bMT(45,68,i.isLoaded$))("ngIfElse",s),e.R7$(4),e.AVh("hide",i.showFull),e.R7$(),e.BMQ("id",i.getButtonId("showFullContent")),e.R7$(),e.SpI(" ",e.bMT(51,70,"str_Messages_message_show_all")," "),e.R7$(3),e.Y8G("ngIf",!i.tender.IsMainTender&&e.bMT(54,72,i.isTenderParticipant$)),e.R7$(2),e.Y8G("ngIf",i.tender.ShowMessages&&!i.tender.IsMainTender&&!i.tender.IsCommonPart&&e.bMT(56,74,i.isTenderParticipant$)),e.R7$(2),e.Y8G("ngIf",i.tender.IsMainTender&&e.bMT(58,76,i.lots$).length>0)}},dependencies:[p.YU,p.bT,k.iV,E.wS,ys.y,fe.n,he.d,je._,Cs.r,Os.e,Rs.P,Z.x,p.Jj,R.D9],styles:['[_nghost-%COMP%]{display:block}.sender-body[_ngcontent-%COMP%]{max-height:300px;overflow:hidden;min-height:70px}.sender-body--full[_ngcontent-%COMP%]{max-height:none}.sender-overlay[_ngcontent-%COMP%]{background:linear-gradient(transparent,#fff 65%);position:absolute;bottom:0;left:0;width:100%;height:50%;display:flex;align-items:flex-end;justify-content:center;padding:15px;border-radius:5px;pointer-events:none}.sender-overlay-btn[_ngcontent-%COMP%]{pointer-events:all}.prettyCard[_ngcontent-%COMP%]{overflow:hidden;background:#47c1cc;position:relative}.avatar[_ngcontent-%COMP%]{position:absolute;right:45px;top:15px;width:150px;transform:scale(2) rotate(10deg)}.avatar[_ngcontent-%COMP%]:before{content:"";height:100%;width:100%;position:absolute;top:0;left:0;z-index:1;display:block;background:radial-gradient(ellipse at center,#47c1cc00,#47c1cc 64% 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0047c1cc",endColorstr="#47c1cc",GradientType=1)}.avatar[_ngcontent-%COMP%]   .organization-image[_ngcontent-%COMP%]{position:relative;z-index:0;width:100%;height:100%;opacity:.7;filter:blur(2px);transform:scale(.95)}.pic-card-section-name[_ngcontent-%COMP%]{color:#fff;line-height:17px;border:1px solid #ffffff;padding:4px;border-radius:2px}.pic-card-section-id[_ngcontent-%COMP%]{margin-right:5px;color:#fff;line-height:17px;border:1px solid #ffffff;padding:4px;text-transform:capitalize;border-radius:2px}.pic-card-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:14px}@media (max-width: 770px){.pic-card__info[_ngcontent-%COMP%]{max-width:unset;z-index:5}}']})}}return n})();var Ne=d(4597),Us=d(33882),Ls=d(3468);const As=(n,o)=>({"mdi-format-list-bulleted":n,"mdi-apps":o});function Ys(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",19),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onAddParticipants())}),e.nrm(1,"i",20),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.BMQ("id",t.getButtonId("onAddParticipants")),e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Tender_buyer_team_add_buyer")," ")}}function Ks(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"i",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.clearSearch())}),e.k0s(),e.nrm(2,"div",22),e.j41(3,"span",23),e.EFF(4),e.nI1(5,"translate"),e.nI1(6,"translate"),e.nI1(7,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(),e.BMQ("id",t.getButtonId("clearFilter")),e.R7$(3),e.SjE(" ",t.filteredEmployees.length," ",e.bMT(5,6,1===t.filteredEmployees.length?"str_Common_foun
1d":"str_Common_found_plural")," ",e.bMT(6,8,"str_Common_from")," ",t.totalEmployeesCount," ",e.bMT(7,10,1===t.totalEmployeesCount?"str_Common_employee":"str_Common_employees")," ")}}function qs(n,o){if(1&n&&(e.qex(0),e.j41(1,"span",23),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Lme(" ",t.totalEmployeesCount," ",e.bMT(3,2,1===t.totalEmployeesCount?"str_Common_employee":"str_Common_employees")," ")}}function Ws(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-employee-card",27),e.nI1(1,"translate"),e.bIt("setAsContactPerson",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.confirmSetAsContactPerson(i))})("toggleMute",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onToggleMute(i))})("delete",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.confirmDeleteParticipant(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.index,i=e.XpG(3);e.Y8G("canDelete",i.canRemoveParticipant)("employee",t)("tender",i.tender)("canManageColleagues",i.canManageColleagues)("canManageDefaultContact",i.canManageDefaultContact)("isContactPerson",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId))("isMainTender",!(null!=i.tender&&i.tender.IsCommonPart||null!=i.tender&&i.tender.LotNumber))("viewType",i.viewToggle)("parentId",i.getId(r))("role",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId)?e.bMT(1,19,"str_Tender_default_contact"):null)("removeButtonText","str_Tender_participant_remove")("setAsContactPersonButtonText",i.setAsContactPersonKeyword(t))("showBlockedStatus",!0)("showLots",i.showBasedOnLots)("lotsLable",i.setLotLable(t))("maxNumberOfLots",i.lotCount)("canMute",i.canMute(t))("isMuted",t.IsMuted)("showOrganizationIcon",!0)}}function zs(n,o){if(1&n&&(e.j41(0,"div",25),e.DNE(1,Ws,2,21,"nx1-employee-card",26),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.filteredEmployees)}}function Qs(n,o){1&n&&(e.j41(0,"span",32),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_colleagues_with_access_to_all_lots")," "))}function Js(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-employee-card",33),e.nI1(1,"translate"),e.bIt("delete",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.confirmDeleteParticipant(i))})("toggleMute",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onToggleMute(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.index,i=e.XpG(3);e.Y8G("canDelete",i.canRemoveParticipant)("employee",t)("tender",i.tender)("canManageColleagues",i.canManageColleagues)("canManageDefaultContact",i.canManageDefaultContact)("isContactPerson",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId))("isMainTender",!(null!=i.tender&&i.tender.IsCommonPart||null!=i.tender&&i.tender.LotNumber))("viewType",i.viewToggle)("parentId",i.getId(r))("role",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId)?e.bMT(1,18,"str_Tender_default_contact"):null)("removeButtonText","str_Tender_participant_remove")("showBlockedStatus",!0)("showLots",i.showBasedOnLots)("lotsLable",i.setLotLable(t))("maxNumberOfLots",i.lotCount)("canMute",i.canMute(t))("isMuted",t.IsMuted)("showOrganizationIcon",!0)}}function Hs(n,o){1&n&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_colleagues_with_access_to_some_lots")," "))}function Zs(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-employee-card",35),e.nI1(1,"translate"),e.bIt("delete",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.confirmDeleteParticipant(i))})("toggleMute",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onToggleMute(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.index,i=e.XpG(3);e.Y8G("canDelete",i.canRemoveParticipant)("employee",t)("tender",i.tender)("canManageColleagues",i.canManageColleagues)("canManageDefaultContact",i.canManageDefaultContact)("isContactPerson",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId))("isMainTender",!(null!=i.tender&&i.tender.IsCommonPart||null!=i.tender&&i.tender.LotNumber))("viewType",i.viewToggle)("parentId",i.getId(r))("role",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId)?e.bMT(1,17,"str_Tender_default_contact"):null)("removeButtonText","str_Tender_participant_remove")("showBlockedStatus",!0)("showLots",i.showBasedOnLots)("lotsLable",i.setLotLable(t))("maxNumberOfLots",i.lotCount)("canMute",i.canMute(t))("isMuted",t.IsMuted)}}function eo(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,Qs,3,3,"span",28),e.j41(2,"div",25),e.DNE(3,Js,2,20,"nx1-employee-card",29),e.k0s(),e.DNE(4,Hs,3,3,"span",30),e.j41(5,"div",25),e.DNE(6,Zs,2,19,"nx1-employee-card",31),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",(null==t.membersInAll?null:t.membersInAll.length)>0),e.R7$(2),e.Y8G("ngForOf",t.membersInAll),e.R7$(),e.Y8G("ngIf",(null==t.membersInSome?null:t.membersInSome.length)>0),e.R7$(2),e.Y8G("ngForOf",t.membersInSome)}}function to(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,zs,2,1,"div",24)(2,eo,7,4,"div",13),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.showBasedOnLots||""!=t.searchPhrase),e.R7$(),e.Y8G("ngIf",t.showBasedOnLots&&""==t.searchPhrase)}}function no(n,o){1&n&&(e.j41(0,"th",43),e.nI1(1,"translate"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n&&(e.FS9("title",e.bMT(1,2,"str_Common_access_to")),e.R7$(3),e.JRh(e.bMT(4,4,"str_Common_access_to")))}function io(n,o){if(1&n&&(e.j41(0,"thead",40)(1,"tr",41)(2,"th",42),e.nI1(3,"translate"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"th",42),e.nI1(8,"translate"),e.j41(9,"span"),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"th",43),e.nI1(13,"translate"),e.j41(14,"span"),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.DNE(17,no,5,6,"th",44),e.nrm(18,"th",45),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.FS9("title",e.bMT(3,7,"str_Common_name")),e.R7$(3),e.JRh(e.bMT(6,9,"str_Common_name")),e.R7$(2),e.FS9("title",e.bMT(8,11,"str_Common_email")),e.R7$(3),e.JRh(e.bMT(11,13,"str_Common_email")),e.R7$(2),e.FS9("title",e.bMT(13,15,"str_Common_phone")),e.R7$(3),e.JRh(e.bMT(16,17,"str_Common_phone")),e.R7$(2),e.Y8G("ngIf",t.showBasedOnLots)}}function ro(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-employee-card",46),e.nI1(1,"translate"),e.bIt("delete",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.confirmDeleteParticipant(i))})("setAsContactPerson",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.confirmSetAsContactPerson(i))})("toggleMute",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onToggleMute(i))}),e.k0s()}if(2&n){const t=o.$implicit,r=o.index,i=e.XpG(2);e.Y8G("canDelete",i.canRemoveParticipant)("employee",t)("tender",i.tender)("viewType",i.viewToggle)("parentId",i.getId(r))("role",(null==t?null:t.Id)===(null==i.tenderParticipant||null==i.tenderParticipant.DefaultContact?null:i.tenderParticipant.DefaultContact.EmployeeId)?e.bMT(1,14,"str_Tender_default_contact"):null)("removeButtonText","str_Tender_participant_remove")("setAsContactPersonButtonText",i.setAsContactPersonKeyword(t))("showBlockedStatus",!0)("showLots",i.showBasedOnLots)("lotsLable",i.setLotLable(t))("maxNumberOfLots",i.lotCount)("canMute",i.canMute(t))("isMuted",t.IsMuted)}}function so(n,o){if(1&n&&(e.j41(0,"table",36),e.DNE(1,io,19,19,"thead",37),e.j41(2,"tbody",38),e.DNE(3,ro,2,16,"nx1-employee-card",39),e.k0s()()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf","tableView"===t.viewToggle&&t.filteredEmployees.length>0),e.R7$(2),e.Y8G("ngForOf",t.filteredEmployees)}}function oo(n,o){if(1&n&&(e.j41(0,"div",47)(1,"div",48)(2,"figure",49),e.qSk(),e.j41(3,"svg",50),e.nrm(4,"circle",51),e.k0s(),e.joV(),e.nrm(5,"i",52),e.k0s(),e.j41(6,"h2",53),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()),2&n){const t=e.XpG();e.R7$(6),e.BMQ("id",t.getLabelId("noEmployeesFound")),e.R7$(),e.SpI(" ",e.bMT(8,2,"str_Tender_no_employees_found")," ")}}let ao=(()=>{class n extends g.$G{constructor(t,r,i,s,a){super(t),this.viewContainerRef
1=t,this.dialogService=r,this.currentTenderParticipantStoreService=i,this.userService=s,this.loaderService=a,this.canAddParticipant=!1,this.canRemoveParticipant=!1,this.canManageEmailNotifications=!1,this.participants=[],this.subscriptions=[],this.viewToggle="cardView",this.membersInAll=[],this.membersInSome=[],this.searchPhrase="",this.totalEmployeesCount=0,this.showBasedOnLots=!1}ngOnInit(){this.showBasedOnLots=this.tender.IsMainTender&&"buyer"===this.role;const t=this.userService.logView(this.tender.Id,"ViewTenderParticipants").subscribe();this.subscriptions.push(t),this.subscriptions.push(this.currentTenderParticipantStoreService.getLeadTenderParticipant().subscribe(r=>{this.leadTenderParticipant=r}))}ngOnChanges(t){t.addedMembers&&(this.totalEmployeesCount=this.addedMembers.length,this.tender&&this.tender.IsMainTender&&"buyer"===this.role&&(this.membersInAll=this.addedMembers.filter(r=>r.NumberOfLots===this.lotCount),this.membersInSome=this.addedMembers.filter(r=>r.NumberOfLots<this.lotCount)))}ngOnDestroy(){this.addParticipantRef&&(this.addParticipantRef.close(),this.addParticipantRef=null),this.addEmployeeToLotsRef&&(this.addEmployeeToLotsRef.close(),this.addEmployeeToLotsRef=null)}onAddParticipants(){const t=new S.Pe;t.viewContainerRef=this.viewContainerRef,this.addParticipantRef=this.dialogService.open(Us.S,t),this.addParticipantRef.componentInstance.users=this.availableMembers.filter(i=>i.ActivationStatus!==NX1.Model.Enums.ActivationStatus.Blocked&&i.User.ActivationStatus!==NX1.Model.Enums.ActivationStatus.Blocked),this.addParticipantRef.componentInstance.titleKeyword="str_Tender_"+this.role+"_participants_add_participant",this.addParticipantRef.componentInstance.emptyListKeyword="str_Tender_"+this.role+"_participants_no_participants",this.addParticipantRef.componentInstance.saveSingleKeyword="str_Tender_"+this.role+"_participant",this.addParticipantRef.componentInstance.saveMultipleKeyword="str_Tender_"+this.role+"_participants",this.addParticipantRef.componentInstance.organization=this.organization;const r=(0,$.z)([this.addParticipantRef.componentInstance.add.asObservable(),this.currentTenderParticipantStoreService.getCurrentLeadSupplierGroupId()]).pipe((0,f.p)(([i,s])=>!!i&&!!s),(0,De.s)(1)).subscribe(([i,s])=>{this.addParticipants(i,s)});this.addParticipantRef.afterClosed().toPromise().then(()=>{this.addParticipantRef=null,r&&r.unsubscribe()})}confirmDeleteParticipant(t){if(t.Id===this.tenderParticipant.DefaultContact.EmployeeId)this.dialogService.confirm({titleKeyword:"str_Common_warning",textContentKeyword:"str_Tender_remove_contact_person_message",confirmationType:"alert",okKeyword:"str_Common_ok",requirePassword:!1,showCheckbox:!1});else{let r;r=this.dialogService.confirm({titleKeyword:"str_Common_are_you_sure",textContentKeyword:"str_Tender_participant_remove_message",confirmationType:"delete",cancelKeyword:"str_Common_cancel",okKeyword:"str_Common_delete",requirePassword:!1,showCheckbox:!1}).subscribe(i=>{i.confirmed&&this.deleteParticipant(t,this.currentLeadSupplierGroup),r.unsubscribe()})}}changeView(){this.viewToggle="tableView"===this.viewToggle?"cardView":"tableView"}addParticipants(t,r){this.openAddingOrRemovingColleagueLoader("str_Tender_adding_colleagues"),this.currentTenderParticipantStoreService.addMembers(this.tenderParticipant.Id,t,r)}deleteParticipant(t,r){const i=this.participants.find(a=>a.Organization.Id===t.OrganizationId);let s;s=i?i.TenderParticipant.Id:this.tenderParticipant.Id,this.openAddingOrRemovingColleagueLoader("str_Tender_removing_colleague"),this.currentTenderParticipantStoreService.removeMember(s,t,r)}get filteredEmployees(){return this.addedMembers?this.addedMembers.filter(r=>this.filterBySearchPhrase(r.User.FirstName+r.User.LastName,this.searchPhrase)):[]}filterBySearchPhrase(t,r){const i=r.trim().split(" ");let s=!0;return i.forEach(a=>{s=s&&t.toLowerCase().indexOf(a.toLowerCase())>=0}),s}clearSearch(){this.searchPhrase=""}setLotLable(t){let r=t.NumberOfLots>1?"str_Tender_lots":"str_Tender_lot";return r=t.NumberOfLots===this.lotCount?"str_Tender_all_lots":r,r}canMute(t){return!!this.tenderParticipant&&this.tenderParticipant.DefaultContact.EmployeeId!==t.Id&&(this.canManageEmailNotifications||t.UserId===this.currentUser.Id)}onToggleMute(t){t.IsMuted?(this.openAddingOrRemovingColleagueLoader("str_Tender_unmuting_colleague"),this.currentTenderParticipantStoreService.unMuteMember(this.tender.Id,t.Id)):(this.openAddingOrRemovingColleagueLoader("str_Tender_muting_colleague"),this.currentTenderParticipantStoreService.muteMember(this.tender.Id,t.Id))}confirmSetAsContactPerson(t){this.currentTenderParticipantStoreService.updateContactPerson(this.tenderParticipant.Id,t.Id,this.tender.IsMainTender)}setAsContactPersonKeyword(t){const r=!!this.leadTenderParticipant&&this.leadTenderParticipant.AddedEmployees.findIndex(i=>i.Id===t.Id)>=0;return"buyer"===this.role||r?"str_Tender_set_as_contact_person":null}openAddingOrRemovingColleagueLoader(t){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword=t}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3),e.rXU(c.VY6),e.rXU(c.DLc),e.rXU(c.ZCd))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-colleagues-list"]],inputs:{parentId:"parentId",role:"role",canAddParticipant:"canAddParticipant",canRemoveParticipant:"canRemoveParticipant",canManageEmailNotifications:"canManageEmailNotifications",addedMembers:"addedMembers",availableMembers:"availableMembers",organization:"organization",tenderParticipant:"tenderParticipant",tenderParticipantGroups:"tenderParticipantGroups",tender:"tender",lotCount:"lotCount",currentLeadSupplierGroup:"currentLeadSupplierGroup",currentUser:"currentUser",canManageColleagues:"canManageColleagues",canManageDefaultContact:"canManageDefaultContact",participants:"participants"},features:[e.Vt3,e.OA$],decls:23,vars:19,consts:[[1,"nxcard","bg--white","z1"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--bold","text--uppercase"],[1,"nxcard__header-options"],["mat-button","","color","primary",3,"click",4,"ngIf"],["mat-icon-button","",3,"click"],[1,"mdi",3,"ngClass"],[1,"searchform","border--bottom"],[1,"searchform__container"],[1,"mdi","mdi-magnify","searchform__container-magnify","text--grey50"],["type","text","autocomplete","off","name","filterName",1,"searchform__container-input",3,"ngModelChange","ngModel","placeholder"],[4,"ngIf"],[1,"nxcard__body","nxcard__body--no-scroll"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","nxtable nxtable--scroll",4,"ngSwitchCase"],["class","padding--20 text--center text--grey30 text--16px",4,"ngIf"],["mat-button","","color","primary",3,"click"],[1,"mdi","mdi-plus"],[1,"mdi","mdi-close-circle-outline","searchform__container-delete","pointer",3,"click"],[1,"searchform__container-separator"],[1,"searchform__container-info"],["class","display--flex flex-wrap padding--15",4,"ngIf"],[1,"display--flex","flex-wrap","padding--15"],[3,"canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","setAsContactPersonButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","
1showOrganizationIcon","setAsContactPerson","toggleMute","delete",4,"ngFor","ngForOf"],[3,"setAsContactPerson","toggleMute","delete","canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","setAsContactPersonButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","showOrganizationIcon"],["class","display--block margin--left-20 margin--top-20 text--12px text--grey40 text--uppercase",4,"ngIf"],[3,"canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","showOrganizationIcon","delete","toggleMute",4,"ngFor","ngForOf"],["class","display--block margin--left-20  text--12px text--grey40 text--uppercase",4,"ngIf"],[3,"canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","delete","toggleMute",4,"ngFor","ngForOf"],[1,"display--block","margin--left-20","margin--top-20","text--12px","text--grey40","text--uppercase"],[3,"delete","toggleMute","canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","
1showOrganizationIcon"],[1,"display--block","margin--left-20","text--12px","text--grey40","text--uppercase"],[3,"delete","toggleMute","canDelete","employee","tender","canManageColleagues","canManageDefaultContact","isContactPerson","isMainTender","viewType","parentId","role","removeButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted"],[1,"nxtable","nxtable--scroll"],["class","nxtable__header",4,"ngIf"],[1,"nxtable__body","nxtable__body--no-scroll"],[3,"canDelete","employee","tender","viewType","parentId","role","removeButtonText","setAsContactPersonButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted","delete","setAsContactPerson","toggleMute",4,"ngFor","ngForOf"],[1,"nxtable__header"],[1,"nxtable__header-row"],[1,"nxtable__header-title","col-xs-4",3,"title"],[1,"nxtable__header-title","col-xs-3",3,"title"],["class","nxtable__header-title  col-xs-3",3,"title",4,"ngIf"],[1,"nxtable__header-title","col-xs-1","nxtable__header-title--option"],[3,"delete","setAsContactPerson","toggleMute","canDelete","employee","tender","viewType","parentId","role","removeButtonText","setAsContactPersonButtonText","showBlockedStatus","showLots","lotsLable","maxNumberOfLots","canMute","isMuted"],[1,"padding--20","text--center","text--grey30","text--16px"],[1,"align--center","display--flex","flex-column","full-height","content-center","no-contents--animate"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-account-off"],[1,"text--bold","margin--bottom-10","full-width"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),e.EFF(5),e.k0s()()(),e.j41(6,"div",5),e.DNE(7,Ys,4,4,"button",6),e.j41(8,"button",7),e.bIt("click",function(){return i.changeView()}),e.nrm(9,"i",8),e.k0s()()(),e.j41(10,"div",9)(11,"div",10)(12,"label"),e.nrm(13,"i",11),e.k0s(),e.j41(14,"input",12),e.nI1(15,"translate"),e.mxI("ngModelChange",function(a){return e.DH7(i.searchPhrase,a)||(i.searchPhrase=a),a}),e.k0s(),e.DNE(16,Ks,8,12,"ng-container",13)(17,qs,4,4,"ng-container",13),e.k0s()(),e.j41(18,"div",14)(19,"div",15),e.DNE(20,to,3,2,"div",16)(21,so,4,2,"table",17),e.k0s(),e.DNE(22,oo,9,4,"div",18),e.k0s()()),2&r&&(e.R7$(5),e.SpI("",null==i.leadTenderParticipant||null==i.leadTenderParticipant.Organization?null:i.leadTenderParticipant.Organization.Name," "),e.R7$(2),e.Y8G("ngIf",i.canAddParticipant),e.R7$(),e.BMQ("id",i.getButtonId("cardToggle")),e.R7$(),e.Y8G("ngClass",e.l_i(16,As,"cardView"===i.viewToggle,"tableView"===i.viewToggle)),e.R7$(3),e.BMQ("for",i.getInputId("filter")),e.R7$(2),e.FS9("placeholder",e.bMT(15,14,"str_Tender_participants_filtername_placeholder")),e.R50("ngModel",i.searchPhrase),e.BMQ("id",i.getInputId("filter")),e.R7$(2),e.Y8G("ngIf",i.searchPhrase),e.R7$(),e.Y8G("ngIf",!i.searchPhrase),e.R7$(2),e.Y8G("ngSwitch",i.viewToggle),e.R7$(),e.Y8G("ngSwitchCase","cardView"),e.R7$(),e.Y8G("ngSwitchCase","tableView"),e.R7$(),e.Y8G("ngIf",!i.filteredEmployees.length&&i.searchPhrase))},dependencies:[p.YU,p.Sq,p.bT,p.ux,p.e1,_.me,_.BC,_.vS,k.iV,Ls.S,R.D9]})}}return n})();var lo=d(43212),co=d(73e3);let uo=(()=>{class n extends g.$G{constructor(t,r){super(t),this.currentTenderParticipantStoreService=r}ngOnInit(){this.invitations$=this.currentTenderParticipantStoreService.getTenderCoParticipantInvitations().pipe((0,f.p)(t=>!!t))}resendInvitation(t){this.currentTenderParticipantStoreService.resendCoParticipantInvitation(t)}removeInvitation(t){this.currentTenderParticipantStoreService.deleteCoParticipantParticipantInvitation(t)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.VY6))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-invited-co-suppliers"]],inputs:{canDelete:"canDelete",canReinvite:"canReinvite"},features:[e.Vt3],decls:1,vars:4,consts:[[3,"removeInvitation","resendInvitation","invitations$","showNames","canDelete","canReinvite"]],template:function(r,i){1&r&&(e.j41(0,"nx1-invited-participants-card",0),e.bIt("removeInvitation",function(a){return i.removeInvitation(a)})("resendInvitation",function(a){return i.resendInvitation(a)}
1),e.k0s()),2&r&&e.Y8G("invitations$",i.invitations$)("showNames",!0)("canDelete",i.canDelete)("canReinvite",i.canReinvite)},dependencies:[co.t],encapsulation:2,changeDetection:0})}}return n})();function po(n,o){if(1&n&&e.nrm(0,"nx1-tender-explicite-status",9),2&n){const t=e.XpG().ngIf;e.Y8G("tender",t)("isBuyer",!1)}}function fo(n,o){if(1&n&&(e.qex(0),e.DNE(1,po,1,2,"nx1-tender-explicite-status",8),e.bVm()),2&n){const t=o.ngIf;e.R7$(),e.Y8G("ngIf",t.IsArchived||t.IsCanceled||t.IsPaused)}}function mo(n,o){1&n&&(e.j41(0,"div",12),e.nrm(1,"mat-spinner",13),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}function _o(n,o){if(1&n&&e.nrm(0,"nx1-tender-supplier-invited-co-suppliers",14),2&n){const t=e.XpG(2);e.Y8G("canDelete",!0)("canReinvite",t.canManageColleagues)}}function ho(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-co-organizations-card",10),e.DNE(2,mo,2,1,"div",11),e.nI1(3,"async"),e.DNE(4,_o,1,2,"ng-template",null,0,e.C5r),e.bVm()),2&n){const t=e.sdS(5),r=e.XpG();e.R7$(),e.Y8G("coOrganizationsType","supplying")("canManage",r.canManageColleagues),e.R7$(),e.Y8G("ngIf",e.bMT(3,4,r.isCreatingCoParticipantInvitation$))("ngIfElse",t)}}let go=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l,u){super(t),this.tenderSupplierGuard=r,this.organizationStoreService=i,this.currentTenderParticipantStoreService=s,this.multilotTenderStoreService=a,this.sessionService=l,this.principalPermissionService=u,this.toolBreadcrumbPath=[{keyword:"str_Tender_participants_title",url:[".."]}],this.currentUser$=this.sessionService.currentUser$,this.canAddParticipant=!1,this.canRemoveParticipant=!1,this.canManageEmailNotifications=!1,this.participants=[],this.subscriptions=[]}ngOnInit(){this.tender$=this.tenderSupplierGuard.tender$,this.tenderParticipant$=this.currentTenderParticipantStoreService.getCurrentTenderParticipant(),this.isCreatingCoParticipantInvitation$=this.currentTenderParticipantStoreService.getsIsCreatingCoParticipantInvitations(),this.currentTenderParticipantStoreService.loadTenderCoParticipantInvitations(this.tenderSupplierGuard.tenderId),this.currentTenderParticipantStoreService.loadCoTenderParticipants(this.tenderSupplierGuard.tenderId),this.subscriptions.push((0,$.z)([this.tenderParticipant$,this.currentTenderParticipantStoreService.getAreTenderParticipantGroupsLoaded()]).subscribe(([t,r])=>{r&&t&&this.currentTenderParticipantStoreService.loadTenderParticipantMembers(t.Id)})),this.subscriptions.push(this.currentTenderParticipantStoreService.getTenderCoParticipants().subscribe(t=>{this.participants=t})),this.subscriptions.push(this.tenderParticipant$.pipe((0,O.H)(t=>this.principalPermissionService.hasPermission(D.U.CanManageDefaultContactMnemonic,t.Guid,t.EntityId))).subscribe(t=>this.canManageDefaultContact=t)),this.tenderEmployees$=this.currentTenderParticipantStoreService.getCurrentTenderEmployees(),this.organization$=this.organizationStoreService.getCurrentOrganization(),this.availableParticipants$=this.currentTenderParticipantStoreService.getCurrentTenderAvailableEmployees(),this.numberOfLots$=this.multilotTenderStoreService.getMultilotLots().pipe((0,h.T)(t=>t.length)),this.canAddParticipant=this.tenderSupplierGuard.canAddColleagueToTender,this.canRemoveParticipant=this.tenderSupplierGuard.canRemoveColleagueFromTender,this.canManageEmailNotifications=this.tenderSupplierGuard.canManageEmailNotifications,this.canManageColleagues=this.tenderSupplierGuard.canManageColleagues,this.currentLeadSupplierGroup$=this.currentTenderParticipantStoreService.getCurrentLeadSupplierGroupId()}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(F.W),e.rXU(c.iB2),e.rXU(c.VY6),e.rXU(c.Rh7),e.rXU(c.Qow),e.rXU(c.N49))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-participants"]],inputs:{parentId:"parentId"},features:[e.Vt3],decls:18,vars:39,consts:[["invitedCoSuppliersTemplate",""],[1,"nxcard","bg--white","z1","margin--bottom-20"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row","align--center","flex-grow--2"],[3,"breadcrumbPath"],[4,"ngIf"],[3,"role","canAddParticipant","canRemoveParticipant","canManageEmailNotifications","canManageColleagues","canManageDefaultContact","addedMembers","availableMembers","organization","tenderParticipant","lotCount","tender","currentLeadSupplierGroup","parentId","currentUser","participants"],[3,"tender","isBuyer",4,"ngIf"],[3,"tender","isBuyer"],[1,"margin--top-20",3,"coOrganizationsType","canManage"],["class","display--flex align--center content-center flex-grow--2 full-width full-height",4,"ngIf","ngIfElse"],[1,"display--flex","align--center","content-center","flex-grow--2","full-width","full-height"],[3,"diameter"],[3,"canDelete","canReinvite"]],template:function(r,i){1&r&&(e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),e.nrm(4,"nx1-tool-breadcrumb",5),e.k0s()()()(),e.DNE(5,fo,2,1,"ng-container",6),e.nI1(6,"async"),e.nrm(7,"nx1-tender-colleagues-list",7),e.nI1(8,"async"),e.nI1(9,"async"),e.nI1(10,"async"),e.nI1(11,"async"),e.nI1(12,"async"),e.nI1(13,"async"),e.nI1(14,"async"),e.nI1(15,"async"),e.DNE(16,ho,6,6,"ng-container",6),e.nI1(17,"async")),2&r&&(e.R7$(4),e.Y8G("breadcrumbPath",i.toolBreadcrumbPath),e.R7$(),e.Y8G("ngIf",e.bMT(6,19,i.tender$)),e.R7$(2),e.Y8G("role","supplier")("canAddParticipant",i.canAddParticipant)("canRemoveParticipant",i.canRemoveParticipant)("canManageEmailNotifications",i.canManageEmailNotifications)("canManageColleagues",i.canManageColleagues)("canManageDefaultContact",i.canManageDefaultContact)("addedMembers",e.bMT(8,21,i.tenderEmployees$))("availableMembers",e.bMT(9,23,i.availableParticipants$))("organization",e.bMT(10,25,i.organization$))("tenderParticipant",e.bMT(11,27,i.tenderParticipant$))("lotCount",e.bMT(12,29,i.numberOfLots$))("tender",e.bMT(13,31,i.tender$))("currentLeadSupplierGroup",e.bMT(14,33,i.currentLeadSupplierGroup$))("parentId",i.getId("colleagues"))("currentUser",e.bMT(15,35,i.currentUser$))("participants",i.participants),e.R7$(9),e.Y8G("ngIf",!e.bMT(17,37,i.tender$).MainTenderId))},dependencies:[p.bT,E.wS,Ne.x,ao,Z.x,lo._,uo,p.Jj],styles:[".infinity-card-scroll[_ngcontent-%COMP%]{max-height:60vh;display:block;width:100%;overflow-y:auto}"]})}}return n})();var rt=d(1547);const bo=(n,o)=>({"flex-row":n,"flex-grow--2":o}),ce=(n,o)=>({"mdi-chevron-down":n,"mdi-chevron-up":o}),xe=(n,o)=>({"mdi-send":n,"mdi-certificate":o}),st=n=>({"nxtable__body-row-select":n}),ot=(n,o)=>({"text--lemon-2":n,"text--emerald-1":o}),at=(n,o)=>({"text--emerald-1":n,"text--lemon-2":o}),vo=(n,o)=>({"mdi-close-circle-outline":n,"mdi-certificate":o});function So(n,o){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.FS9("title",t.offerName),e.BMQ("id",t.getLabelId("offerName")),e.R7$(),e.SpI(" ",t.offerName," ")}}function xo(n,o){if(1&n){const t=e.RV6();e.j41(0,"nx1-inline-editable-section",16),e.bIt("edited",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onEdit(i))})("saved",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onSave(i))})("canceled",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onCancel(i))})("keydown.Enter",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onSave(i))})("keydown.Escape",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onCancel(i))})("keydown.control.Enter",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onEdit(i))}),e.j41(1,"div",17)(2,"form",18),e.nrm(3,"input",19)(4,"nx1-form-control-messages",20),e.k0s()()()}if(2&n){const t=e.XpG(2);e.Y8G("isEdit",t.isEdit)("canEdit",t.canManageOfferName)("ngClass",e.l_i(6,bo,t.isEdit,t.isEdit)),e.R7$(2),e.Y8G("formGroup",t.offerNameForm),e.R7$(),e.BMQ("id",t.getInputId("offerName")),e.R7$(),e.Y8G("control",t.Name)}}function To(n,o){if(1&n&&(e.j41(0,"div",21)(1,"span",22),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.j41(5,"span",23),e.EFF(6),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,2,"str_Tender_offer_id")," "),e.R7$(4),e.SpI(" OF",null==t.mainTenderOverview?null:t.mainTenderOverview.OfferId," ")}}function Io(n,o){if(1&n&&(e.j41(0,"span",24),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"uppercase"),e.k0s()),2&n){const t=e.XpG(2);e.BMQ("id",t.getLabelId("notSubmitted")),e.R7$(),e.SpI(" ",e.bMT(3,4,e.bMT(2,2,"str_Tender_not_submitted"))," ")}}function yo(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",32),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);
1return e.Njj(i.openOfferSubmissionDetails())}),e.EFF(1),e.nI1(2,"nx1date"),e.k0s()}if(2&n){const t=e.XpG(3);e.BMQ("id",t.getLabelId("offerSubmittedBy")),e.R7$(),e.SpI(" ",e.i5U(2,2,t.offerSubmission.SubmissionTimestamp.TimestampDate,"ShortDateExactTime")," ")}}function Co(n,o){if(1&n&&(e.j41(0,"span",31),e.EFF(1),e.nI1(2,"nx1date"),e.k0s()),2&n){const t=e.XpG(3);e.BMQ("id",t.getLabelId("offerSubmitDate")),e.R7$(),e.SpI(" ",e.i5U(2,2,t.offerSubmission.SubmissionTimestamp.TimestampDate,"ShortDateExactTime")," ")}}function Oo(n,o){if(1&n&&(e.qex(0),e.j41(1,"span",25),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"uppercase"),e.k0s(),e.nrm(5,"span",26),e.j41(6,"span",27),e.qex(7,28),e.DNE(8,yo,3,5,"a",29)(9,Co,3,5,"span",30),e.bVm(),e.EFF(10),e.nI1(11,"translate"),e.j41(12,"span",31),e.EFF(13),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.BMQ("id",t.getLabelId("submitted")),e.R7$(),e.SpI(" ",e.bMT(4,9,e.bMT(3,7,"str_Tender_submitted"))," "),e.R7$(5),e.Y8G("ngSwitch",t.canShowOfferSubmissionDetails),e.R7$(),e.Y8G("ngSwitchCase",!0),e.R7$(2),e.SpI(" ",e.bMT(11,11,"str_Common_by")," "),e.R7$(2),e.BMQ("id",t.getLabelId("offerSubmittedBy")),e.R7$(),e.SpI(" ",t.offerSubmission.SubmittedByName," ")}}function Ro(n,o){1&n&&(e.j41(0,"div",31),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_no_key_provided")," "))}function Mo(n,o){if(1&n&&(e.j41(0,"div")(1,"div",31),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"nx1-timestamp-date",36),e.k0s()),2&n){const t=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,4,"str_Tender_key_provided")),e.R7$(2),e.Y8G("timestamp",t.qualityDecryptedKeyProvidedTimestamp)("textClasses","text--grey35")("parentId",t.getId("qualityDecryptKeyProvidedDateTimestamp"))}}function Po(n,o){1&n&&(e.j41(0,"div",31),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_no_price_key_provided")," "))}function Do(n,o){if(1&n&&(e.j41(0,"div")(1,"div",31),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"nx1-timestamp-date",36),e.k0s()),2&n){const t=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,4,"str_Tender_price_key_provided")),e.R7$(2),e.Y8G("timestamp",t.priceDecryptedKeyProvidedTimestamp)("textClasses","text--grey35")("parentId",t.getId("priceDecryptKeyProvidedDateTimestamp"))}}function ko(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",33)(2,"div",34),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,Ro,3,3,"div",35)(6,Mo,5,6,"div",11)(7,Po,3,3,"div",35)(8,Do,5,6,"div",11),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.JRh(e.bMT(4,5,"str_Tender_offer_decryption_key")),e.R7$(2),e.Y8G("ngIf",!t.isProvidedQualityKey),e.R7$(),e.Y8G("ngIf",t.isProvidedQualityKey),e.R7$(),e.Y8G("ngIf",(null==t.round?null:t.round.OpeningOfPriceSeparately)&&!t.isProvidedPriceKey),e.R7$(),e.Y8G("ngIf",t.isProvidedPriceKey&&(null==t.round?null:t.round.OpeningOfPriceSeparately))}}function wo(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.unsubmitOffers(!1))}),e.nrm(2,"i",55),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",t.areSubmitUnsubmitButtonsDisabled),e.R7$(),e.Y8G("ngClass",e.l_i(5,xe,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(4,3,"str_Tender_multilot_unsubmit_all_offers")," ")}}function $o(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.submitSelectedOffersSync())}),e.nrm(2,"i",55),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",t.isSubmitSyncedDisabled||t.areSubmitUnsubmitButtonsDisabled),e.R7$(),e.Y8G("ngClass",e.l_i(5,xe,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(4,3,"str_Tender_multilot_submit_selected_offers")," ")}}function Go(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",56),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onClearSelectionSynced())}),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"str_Tender_multilot_clear_selection_offers")," "))}function Eo(n,o){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",57),e.bIt("change",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onChangeAllSync(i))}),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("id",t.getCheckboxId("selectedAllSync"))("indeterminate",t.isLotSelectedSync&&!t.allSelectedSync)("checked",t.allSelectedSync),e.BMQ("id",t.getCheckboxId("selectedAllSync"))}}function Bo(n,o){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",65),e.bIt("change",function(i){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.onChangeSync(i,s))}),e.k0s()}if(2&n){const t=e.XpG(),r=t.$implicit,i=t.index,s=e.XpG(3);e.Y8G("checked",r.IsSelected)("disabled",s.isDisabled||r.IsCommonPart)("id",s.getCheckboxId("selectedSyncLot",i)),e.BMQ("id",s.getCheckboxId("selectedSyncLot",i))}}function Fo(n,o){1&n&&e.nrm(0,"i",68)}function No(n,o){1&n&&e.nrm(0,"i",69)}function jo(n,o){if(1&n&&(e.qex(0),e.DNE(1,Fo,1,0,"i",66)(2,No,1,0,"i",67),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf",t.OfferSubmissionId),e.R7$(),e.Y8G("ngIf",!t.OfferSubmissionId)}}function Xo(n,o){1&n&&(e.nrm(0,"i",70),e.nI1(1,"translate")),2&n&&e.FS9("title",e.bMT(1,1,"str_Tender_survey_version_has_changed"))}function Vo(n,o){if(1&n){const t=e.RV6();e.j41(0,"tr",58)(1,"td",59),e.DNE(2,Bo,1,4,"mat-checkbox",60)(3,jo,3,2,"ng-container",11),e.k0s(),e.j41(4,"td",59),e.EFF(5),e.k0s(),e.j41(6,"td",61),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.viewOffer(i.TenderId))}),e.EFF(7),e.k0s(),e.j41(8,"td",62),e.DNE(9,Xo,2,3,"i",63),e.EFF(10),e.k0s(),e.j41(11,"td",64),e.EFF(12),e.nI1(13,"translate"),e.k0s()()}if(2&n){const t=o.$implicit,r=o.last,i=e.XpG(3);e.AVh("no-border",r),e.Y8G("ngClass",e.eq3(15,st,t.IsSelected)),e.R7$(2),e.Y8G("ngIf",(null==i.roundWrapper?null:i.roundWrapper.IsManageable)&&i.canManageSyncedParticipation&&!i.showUnsubmitSync),e.R7$(),e.Y8G("ngIf",(null==i.roundWrapper?null:i.roundWrapper.IsManageable)&&i.canManageSyncedParticipation&&i.showUnsubmitSync),e.R7$(2),e.SpI(" ",i.getTenderOrderNumber(t)," "),e.R7$(2),e.SpI(" ",t.TenderName," "),e.R7$(),e.Y8G("ngClass",e.l_i(17,ot,t.AnsweredQuestionsCount!==t.TotalQuestionsCount,t.AnsweredQuestionsCount===t.TotalQuestionsCount)),e.R7$(),e.Y8G("ngIf",t.IsRequirementVersionChanged),e.R7$(),e.Lme(" ",t.AnsweredQuestionsCount," / ",t.TotalQuestionsCount," "),e.R7$(),e.Y8G("ngClass",e.l_i(20,at,t.OfferSubmissionId,!t.OfferSubmissionId)),e.R7$(),e.SpI(" ",e.bMT(13,13,i.submissionStatus(t))," ")}}function Uo(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",37)(1,"div",38)(2,"div",39)(3,"div",40)(4,"span",41),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",42),e.DNE(8,wo,5,8,"ng-container",11)(9,$o,5,8,"ng-container",11)(10,Go,4,3,"ng-container",11),e.k0s()(),e.j41(11,"table",43)(12,"thead",44)(13,"tr",45)(14,"th",46),e.DNE(15,Eo,1,4,"mat-checkbox",47),e.k0s(),e.j41(16,"th",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.sort("OrderNumber"))}),e.j41(17,"a"),e.EFF(18,"#"),e.k0s(),e.nrm(19,"i",49),e.k0s(),e.j41(20,"th",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.sort("TenderName"))}),e.j41(21,"a"),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.nrm(24,"i",49),e.k0s(),e.j41(25,"th",50),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.j41(28,"th",51),e.nI1(29,"translate"),e.j41(30,"a"),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.nrm(33,"i",49),e.k0s()()(),e.j41(34,"tbody",52),e.DNE(35,Vo,14,23,"tr",53),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(5),e.SpI(" ",e.bMT(6,20,"str_Tender_multilot_lot_selection")," "),e.R7$(3),e.Y8G("ngIf",t.canManageSyncedParticipation&&t.showUnsubmitSync),e.R7$(),e.Y8G("ngIf",t.canManageSyncedParticipation&&!t.showUnsubmitSync),e.R7$(),e.Y8G("ngIf",t.canManageSyncedParticipation&&t.showClearSelectionSync),e.R7$(5),e.Y8G("ngIf",(null==t.roundWrapper?null:t.roundWrapper.IsManageable)&&t.canManageSyncedParticipation&&!t.showUnsubmitSync),e.R7$(),e.AVh("nxtable__header-title--selected",t.isSortActive("OrderNumber")),e.BMQ("id",t.getLabelId("sortId")),e.R7$(3),e.Y8G("ngClass",e.l_i(30,ce,t.isSortActive("OrderNumber","desc"),t.isSortActive("OrderNumber","asc"))),e.R7$(),e.AVh("nxtable__header-title--selected",t.isSortActive("TenderName")),e.BMQ("id",t.getLabelId("NameSync")),e.R7$(2),e.JRh(e.bMT(23,22,"str_Tender_lot_name")),e.R7$(2),e.Y8G("ngClass",e.l_i(33,ce,t.isSortActive("TenderName","desc"),t.isSortActive("TenderName","asc"))),e.R7$(2),e.SpI(" ",e.bMT(27,24,"str_Tender_completion")," "),e.R7$(2),e.FS9("title",e.bMT(29,26,"str_Common_status")),e.BMQ("id",t.getLabelId("sortStatus")),e.R7$(3),e.JRh(e.bMT(32,28,"str_Common_status")),e.R7$(2),e.Y8G("ngClass",e.l_i(36,ce,t.isSortActive("Status","de
1sc"),t.isSortActive("Status","asc"))),e.R7$(2),e.Y8G("ngForOf",t.getOrderedSynchronizedTendersWithParticipationCollection)}}function Lo(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.submitAllOffersDivergent())}),e.nrm(2,"i",55),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",t.areSubmitUnsubmitButtonsDisabled),e.R7$(),e.Y8G("ngClass",e.l_i(5,xe,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(4,3,"str_Tender_multilot_submit_all_offers")," ")}}function Ao(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.submitSelectedOffersDivergent())}),e.nrm(2,"i",55),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",t.areSubmitUnsubmitButtonsDisabled),e.R7$(),e.Y8G("ngClass",e.l_i(5,xe,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI("",e.bMT(4,3,"str_Tender_multilot_submit_selected_offers")," ")}}function Yo(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",74),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.unsubmitSelectedOffersDivergent())}),e.nrm(2,"i",55),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",t.areSubmitUnsubmitButtonsDisabled),e.R7$(),e.Y8G("ngClass",e.l_i(5,vo,!(null!=t.systemSettings&&t.systemSettings.UseDigitalSignature),!(null==t.systemSettings||!t.systemSettings.UseDigitalSignature))),e.R7$(),e.SpI(" ",e.bMT(4,3,"str_Tender_multilot_unsubmit_selected_offers")," ")}}function Ko(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",56),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onClearSelectionDivergent())}),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"str_Tender_multilot_clear_selection_offers")," "))}function qo(n,o){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",75),e.mxI("ngModelChange",function(i){e.eBV(t);const s=e.XpG(3);return e.DH7(s.allSelectedDivergent,i)||(s.allSelectedDivergent=i),e.Njj(i)}),e.bIt("change",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onChangeAllDivergent(i))}),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",t.isDisabledDivergent),e.R50("ngModel",t.allSelectedDivergent),e.BMQ("id",t.getCheckboxId("selectedDivergent"))}}function Wo(n,o){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",65),e.bIt("change",function(i){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.onChangeDivergent(i,s))}),e.k0s()}if(2&n){const t=e.XpG(),r=t.$implicit,i=t.index,s=e.XpG(3);e.Y8G("checked",r.IsSelected)("disabled",!(null!=r&&r.CanManageSubmission))("id",s.getCheckboxId("selectedDivergentLot",i)),e.BMQ("id",s.getCheckboxId("selectedDivergentLot",i))}}function zo(n,o){if(1&n&&(e.j41(0,"span",78),e.EFF(1),e.nI1(2,"nx1EnumTranslate"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2).$implicit,r=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(3,4,e.i5U(2,1,null==t?null:t.ExplicitTenderStatus,r.expliciteTenderStatusEnum))," ")}}function Qo(n,o){if(1&n&&(e.j41(0,"div")(1,"span",77),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"translate"),e.k0s(),e.j41(5,"span",78),e.EFF(6),e.k0s(),e.j41(7,"span",77),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"span",78),e.EFF(11),e.nI1(12,"nx1date"),e.k0s(),e.DNE(13,zo,4,6,"span",79),e.k0s()),2&n){const t=e.XpG().$implicit,r=e.XpG(3);e.R7$(2),e.Lme(" ",e.bMT(3,6,"str_Tender_submitted")," ",e.bMT(4,8,"str_Common_by")," "),e.R7$(4),e.SpI("",t.UserName," "),e.R7$(2),e.SpI(" ",e.bMT(9,10,"str_Common_on")," "),e.R7$(3),e.SpI(" ",e.i5U(12,12,t.SubmissionDate,"ShortDateExactTime")," "),e.R7$(2),e.Y8G("ngIf",(null==t?null:t.ExplicitTenderStatus)!=r.activeStatus)}}function Jo(n,o){if(1&n&&(e.j41(0,"span",78),e.EFF(1),e.nI1(2,"nx1EnumTranslate"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2).$implicit,r=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(3,4,e.i5U(2,1,null==t?null:t.ExplicitTenderStatus,r.expliciteTenderStatusEnum))," ")}}function Ho(n,o){if(1&n&&(e.j41(0,"div")(1,"span",80),e.EFF(2),e.nI1(3,"nx1Name"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"nx1date"),e.k0s(),e.DNE(7,Jo,4,6,"span",79),e.k0s()),2&n){const t=e.XpG().$implicit,r=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,3,t.TenderProcessPhase)," "),e.R7$(3),e.SpI(" ",t.SubmissionDeadline?e.i5U(6,5,t.SubmissionDeadline.Date,"ShortDateTime"):null," "),e.R7$(2),e.Y8G("ngIf",(null==t?null:t.ExplicitTenderStatus)!=r.activeStatus)}}function Zo(n,o){1&n&&(e.nrm(0,"i",70),e.nI1(1,"translate")),2&n&&e.FS9("title",e.bMT(1,1,"str_Tender_survey_version_has_changed"))}function ea(n,o){if(1&n){const t=e.RV6();e.j41(0,"tr",58)(1,"td",59),e.DNE(2,Wo,1,4,"mat-checkbox",60),e.k0s(),e.j41(3,"td",59),e.EFF(4),e.k0s(),e.j41(5,"td",76),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.viewOffer(i.TenderId))}),e.EFF(6),e.DNE(7,Qo,14,15,"div",11)(8,Ho,8,8,"div",11),e.k0s(),e.j41(9,"td",62),e.DNE(10,Zo,2,3,"i",63),e.EFF(11),e.k0s(),e.j41(12,"td",64),e.EFF(13),e.nI1(14,"translate"),e.k0s()()}if(2&n){const t=o.$implicit,r=o.last,i=e.XpG(3);e.AVh("no-border",r),e.Y8G("ngClass",e.eq3(16,st,t.IsSelected)),e.R7$(2),e.Y8G("ngIf",null==i.roundWrapper?null:i.roundWrapper.IsManageable),e.R7$(2),e.SpI(" ",t.OrderNumber," "),e.R7$(2),e.SpI(" ",t.TenderName," "),e.R7$(),e.Y8G("ngIf",t.OfferSubmissionId),e.R7$(),e.Y8G("ngIf",!t.OfferSubmissionId),e.R7$(),e.Y8G("ngClass",e.l_i(18,ot,t.AnsweredQuestionsCount!==t.TotalQuestionsCount,t.AnsweredQuestionsCount===t.TotalQuestionsCount)),e.R7$(),e.Y8G("ngIf",t.IsRequirementVersionChanged),e.R7$(),e.Lme(" ",t.AnsweredQuestionsCount," / ",t.TotalQuestionsCount," "),e.R7$(),e.Y8G("ngClass",e.l_i(21,at,t.OfferSubmissionId,!t.OfferSubmissionId)),e.R7$(),e.SpI(" ",e.bMT(14,14,i.submissionStatus(t))," ")}}function ta(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",71)(1,"div",38)(2,"div",39)(3,"div",40)(4,"span",41),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"div",42),e.DNE(8,Lo,5,8,"ng-container",11)(9,Ao,5,8,"ng-container",11)(10,Yo,5,8,"ng-container",11)(11,Ko,4,3,"ng-container",11),e.k0s()(),e.j41(12,"table",43)(13,"thead",44)(14,"tr",45)(15,"th",46),e.DNE(16,qo,1,3,"mat-checkbox",72),e.k0s(),e.j41(17,"th",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.sortDivergent("OrderNumber"))}),e.j41(18,"a"),e.EFF(19,"#"),e.k0s(),e.nrm(20,"i",49),e.k0s(),e.j41(21,"th",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.sortDivergent("TenderName"))}),e.j41(22,"a"),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.nrm(25,"i",49),e.k0s(),e.j41(26,"th",50),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"th",73),e.nI1(30,"translate"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.sortDivergent("Status"))}),e.j41(31,"a"),e.EFF(32),e.nI1(33,"translate"),e.k0s(),e.nrm(34,"i",49),e.k0s()()(),e.j41(35,"tbody",52),e.DNE(36,ea,15,24,"tr",53),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(5),e.SpI(" ",e.bMT(6,23,"str_Tender_multilot_divergent_lot_selection")," "),e.R7$(3),e.Y8G("ngIf",t.showSubmitAllDivergent&&!t.getIsDisabledDivergent()),e.R7$(),e.Y8G("ngIf",t.checkedDivergent&&t.showSubmitDivergent),e.R7$(),e.Y8G("ngIf",t.checkedDivergent&&t.showUnsubmitDivergent),e.R7$(),e.Y8G("ngIf",(null==t.roundWrapper?null:t.roundWrapper.IsManageable)&&t.checkedDivergent),e.R7$(5),e.Y8G("ngIf",null==t.roundWrapper?null:t.roundWrapper.IsManageable),e.R7$(),e.AVh("nxtable__header-title--selected",t.isSortActiveDivergent("OrderNumber")),e.BMQ("id",t.getLabelId("sortId")),e.R7$(3),e.Y8G("ngClass",e.l_i(33,ce,t.isSortActiveDivergent("OrderNumber","desc"),t.isSortActiveDivergent("OrderNumber","asc"))),e.R7$(),e.AVh("nxtable__header-title--selected",t.isSortActiveDivergent("TenderName")),e.BMQ("id",t.getLabelId("NameDivergent")),e.R7$(2),e.JRh(e.bMT(24,25,"str_Tender_lot_name")),e.R7$(2),e.Y8G("ngClass",e.l_i(36,ce,t.isSortActiveDivergent("TenderName","desc"),t.isSortActiveDivergent("TenderName","asc"))),e.R7$(2),e.SpI(" ",e.bMT(28,27,"str_Tender_completion")," "),e.R7$(2),e.AVh("nxtable__header-title--selected",t.isSortActiveDivergent("Status")),e.FS9("title",e.bMT(30,29,"str_Common_status")),e.BMQ("id",t.getLabelId("sortCreatedDate")),e.R7$(3),e.JRh(e.bMT(33,31,"str_Common_status")),e.R7$(2),e.Y8G("ngClass",e.l_i(39,ce,t.isSortActiveDivergent("Status","de
1sc"),t.isSortActiveDivergent("Status","asc"))),e.R7$(2),e.Y8G("ngForOf",t.getOrderedDivergentTendersWithParticipationCollection)}}function na(n,o){if(1&n&&(e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),e.DNE(6,So,2,3,"div",7)(7,xo,5,9,"nx1-inline-editable-section",8),e.k0s(),e.j41(8,"div"),e.DNE(9,To,7,4,"div",9)(10,Io,4,6,"span",10)(11,Oo,14,13,"ng-container",11),e.k0s()()(),e.DNE(12,ko,9,7,"ng-container",11),e.k0s()(),e.j41(13,"div",12),e.DNE(14,Uo,36,39,"div",13)(15,ta,37,42,"div",14),e.k0s()()),2&n){const t=e.XpG();e.R7$(6),e.Y8G("ngIf",!t.isEdit),e.R7$(),e.Y8G("ngIf",t.canManageOfferName),e.R7$(2),e.Y8G("ngIf",t.offerSubmission),e.R7$(),e.Y8G("ngIf",!t.offerSubmission),e.R7$(),e.Y8G("ngIf",t.offerSubmission),e.R7$(),e.Y8G("ngIf",t.round.EnableEncryptOffers&&(t.isProvidedQualityKey||t.isProvidedPriceKey)),e.R7$(2),e.Y8G("ngIf",0!==(null==t.synchronizedTendersWithParticipation?null:t.synchronizedTendersWithParticipation.length)),e.R7$(),e.Y8G("ngIf",0!==(null==t.divergentTendersWithParticipation?null:t.divergentTendersWithParticipation.length))}}let ia=(()=>{class n extends g.$G{static{this.UpdateMultilotOfferNameMnemonic="UpdateMultilotOfferName"}get isProvidedPriceKey(){return!!this.priceDecryptedKeyProvidedTimestamp}get isProvidedQualityKey(){return!!this.qualityDecryptedKeyProvidedTimestamp}get qualityDecryptedKeyProvidedTimestamp(){const t=this.participationsOverview.filter(r=>this.synchronizedTendersWithParticipation.some(i=>i.TenderId===r.TenderId)).find(r=>!!r.OfferSubmission&&!!r.OfferSubmission.QualityDecryptedKeyProvidedTimestamp);return null!=t?t.OfferSubmission.QualityDecryptedKeyProvidedTimestamp:null}get priceDecryptedKeyProvidedTimestamp(){const t=this.participationsOverview.filter(r=>this.synchronizedTendersWithParticipation.some(i=>i.TenderId===r.TenderId)).find(r=>!!r.OfferSubmission&&!!r.OfferSubmission.PriceDecryptedKeyProvidedTimestamp);return null!=t?t.OfferSubmission.PriceDecryptedKeyProvidedTimestamp:null}constructor(t,r,i,s,a,l,u,m,b,x,y){super(t),this.router=r,this.changeDetectorRef=i,this.multilotTenderStoreService=s,this.multilotTenderService=a,this.localizationService=l,this.dialogService=u,this.systemSettingsStoreService=m,this.offerService=b,this.principalPermissionService=x,this.tenderSupplierGuard=y,this.synchronizedTendersWithParticipationSelection=[],this.canManageSyncedParticipation=!1,this.isEdit=!1,this.Name=new _.hs("",[_.k0.required,_.k0.maxLength(g.cT.CommonText)]),this.offerNameForm=new _.J3({Name:this.Name}),this.canManageOfferName=!1,this.activeStatus=NX1.Model.Enums.TenderStatus.Active,this.expliciteTenderStatusEnum=NX1.Model.Enums.TenderStatus,this.areSubmitUnsubmitButtonsDisabled=!1,this.subscriptions=[]}select(t){this.selected=t}isActive(t){return this.selected===t}ngOnInit(){this.round=this.roundWrapper.Round,this.participationsOverview=this.roundWrapper.TendersWithParticipation,this.subscriptions.push(this.tenderSupplierGuard.tender$.subscribe(i=>this.mainTender=i)),this.tendersWithParticipation$=this.multilotTenderStoreService.getTendersWithParticipationByRoundId(this.round.Id),this.subscriptions.push(this.tendersWithParticipation$.subscribe(i=>{if(this.synchronizedTendersWithParticipation=i.filter(s=>!s.HasDivergentPlanning),this.divergentTendersWithParticipation=i.filter(s=>s.HasDivergentPlanning),this.participationsOverview&&this.participationsOverview[0]&&this.synchronizedTendersWithParticipation){let s;s=this.participationsOverview.filter(this.synchronizedTendersWithParticipation.length>0?l=>this.synchronizedTendersWithParticipation.some(u=>u.TenderId===l.TenderId):l=>this.divergentTendersWithParticipation.some(u=>u.TenderId===l.TenderId)),this.offerName=s.length>0?s[0].OfferOverview.OfferName:this.participationsOverview[0].OfferOverview.OfferName,this.offerNameForm.reset({Name:this.offerName});const a=s.find(l=>!!l.OfferSubmission);this.synchedOfferIds=s.filter(l=>!!l.OfferSubmission).map(l=>l.OfferOverview.OfferId),this.offerSubmission=a?a.OfferSubmission:null}this.synchronizedTendersWithParticipationSelection=this.convertToTenderOverviewSelection(this.synchronizedTendersWithParticipation),this.divergentTendersWithParticipationSelection=this.convertToTenderOverviewSelection(this.divergentTendersWithParticipation),this.showSubmitAllDivergent=!this.divergentTendersWithParticipationSelection.some(s=>!!s.OfferSubmissionId),this.isDisabled=this.synchronizedTendersWithParticipationSelection.some(s=>!s.CanManageSubmission||!!s.OfferSubmissionId),this.isDisabledDivergent=this.divergentTendersWithParticipationSelection.some(s=>!s.CanManageSubmission),this.allSelectedDivergent=!1,this.canManageSyncedParticipation=this.synchronizedTendersWithParticipationSelection.every(s=>s.CanManageSubmission)}));const t=this.principalPermissionService.getActionsToCheck([n.UpdateMultilotOfferNameMnemonic],this.mainTenderOverview.ParticipantEntityId,this.mainTenderOverview.ParticipantGuid);this.subscriptions.push(this.principalPermissionService.hasPermissions(t).pipe((0,f.p)(i=>!!i)).subscribe(i=>{this.canManageOfferName=i[n.UpdateMultilotOfferNameMnemonic]}));const r=this.systemSettingsStoreService.getSystemSettings().subscribe(i=>{this.systemSettings=i,this.changeDetectorRef.markForCheck()});this.subscriptions.push(r),this.checkedDivergent=!1,this.showSubmitDivergent=!1,this.showUnsubmitDivergent=!1,this.allSelectedDivergent=!1}
1get canShowOfferSubmissionDetails(){return!!this.offerSubmission&&!!this.offerSubmission.SubmissionTimestamp&&!!this.offerSubmission.SubmissionTimestamp.DocumentId}setInitialShowButtons(){this.checkedDivergent=!1,this.showSubmitDivergent=!1,this.showUnsubmitDivergent=!1,this.allSelectedDivergent=!1,this.showSubmitAllDivergent=!!this.divergentTendersWithParticipationSelection.find(t=>!t.OfferSubmissionId)}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.destroySubmitOfferDialog()}convertToTenderOverviewSelection(t){const r=[];return t.forEach(s=>{const a={};for(const u in s)s.hasOwnProperty(u)&&(a[u]=s[u],a.IsSelected=s.IsCommonPart,a.OfferOverview={},a.OfferSubmissionId=null,a.CurrentProcessPhase=s.TenderProcessPhase,a.CanManageSubmission=s.IsActiveTender,a.IsCommonPart=s.IsCommonPart);let l;l=a,r.push(l)}),this.fillProperties(r,this.participationsOverview)}get isOnlyCommonPart(){return this.synchronizedTendersWithParticipationSelection.every(t=>t.IsCommonPart)}fillProperties(t,r){const i=[];return t.forEach(s=>{const a=r.find(u=>u.TenderId===s.TenderId),l=s;s.OfferOverview=a.OfferOverview,s.OfferSubmissionId=a.OfferSubmission?a.OfferSubmission.Id:null,s.UserName=a.UserName,s.SubmissionDate=a.SubmissionDate,s.CanManageSubmission=s.CanManageSubmission&&a.CanManageSubmission,s.TotalQuestionsCount=a.TotalQuestionsCount,s.AnsweredQuestionsCount=a.AnsweredQuestionsCount,s.IsRequirementVersionChanged=a.IsRequirementVersionChanged,i.push(l)}),i}sort(t){this.orderType=t,this.direction="asc"===this.direction?"desc":"asc"}isSortActive(t,r){return r?this.orderType===t&&this.direction===r:this.orderType===t}sortDivergent(t){this.orderTypeDivergent=t,this.directionDivergent="asc"===this.directionDivergent?"desc":"asc"}isSortActiveDivergent(t,r){return r?this.orderTypeDivergent===t&&this.directionDivergent===r:this.orderTypeDivergent===t}getTenderOrderNumber(t){const r=t.OrderNumber;return 0!==r?r:"-"}viewOffer(t){this.participationsOverview.find(i=>i.TenderId===t)&&this.router.navigateByUrl(`/tender/reload?followUrl=/tender/${t}/supplier`)}onSave(t){this.offerNameForm.valid&&(this.isEdit=!1,this.multilotTenderStoreService.updateOffersNames(this.mainTenderOverview.TenderId,this.round.Id,this.offerNameForm.get("Name").value))}onEdit(t){this.isEdit=!0}onCancel(t){this.isEdit=!1,this.offerNameForm.reset({Name:this.offerName})}onChangeSync(t,r){r.IsSelected=t.checked}onChangeDivergent(t,r){r.IsSelected=t.checked,this.allSelectedDivergent=!this.divergentTendersWithParticipationSelection.find(i=>!i.IsSelected),this.checkedDivergent=!!this.divergentTendersWithParticipationSelection.find(i=>i.IsSelected),this.showSubmitAllDivergent=!!this.divergentTendersWithParticipationSelection.find(i=>!i.OfferSubmissionId)&&!this.checkedDivergent,this.showSubmitDivergent=!!this.divergentTendersWithParticipationSelection.find(i=>i.IsSelected&&!i.OfferSubmissionId),this.showUnsubmitDivergent=!!this.divergentTendersWithParticipationSelection.find(i=>i.IsSelected&&!!i.OfferSubmissionId)}onChangeAllSync(t){this.synchronizedTendersWithParticipationSelection.forEach(r=>{r.IsCommonPart||(r.IsSelected=t.checked)})}onChangeAllDivergent(t){this.divergentTendersWithParticipationSelection.forEach(r=>r.CanManageSubmission?r.IsSelected=t.checked:null),this.checkedDivergent=!!this.divergentTendersWithParticipationSelection.find(r=>r.IsSelected),this.showSubmitAllDivergent=!!this.divergentTendersWithParticipationSelection.find(r=>!r.OfferSubmissionId)&&!this.checkedDivergent,this.showSubmitDivergent=!!this.divergentTendersWithParticipationSelection.find(r=>r.IsSelected&&!r.OfferSubmissionId),this.showUnsubmitDivergent=!!this.divergentTendersWithParticipationSelection.find(r=>r.IsSelected&&!!r.OfferSubmissionId)}submissionStatus(t){return null!==t.OfferSubmissionId?"str_Tender_submitted":"str_Tender_not_submitted"}hasSubmitedOffer(t){return null!=t.OfferSubmissionId}get getOrderedSynchronizedTendersWithParticipationCollection(){return"TenderName"===this.orderType?(0,K.orderBy)(this.synchronizedTendersWithParticipationSelection,[t=>t.TenderName],[this.direction]):"Status"===this.orderType?(0,K.orderBy)(this.synchronizedTendersWithParticipationSelection,[t=>t.OfferSubmissionId],[this.direction]):"OrderNumber"===this.orderType?(0,K.orderBy)(this.synchronizedTendersWithParticipationSelection,[t=>
1t.OrderNumber],[this.direction]):this.synchronizedTendersWithParticipationSelection}get getOrderedDivergentTendersWithParticipationCollection(){return"TenderName"===this.orderTypeDivergent?(0,K.orderBy)(this.divergentTendersWithParticipationSelection,[t=>t.TenderName],[this.directionDivergent]):"Status"===this.orderTypeDivergent?(0,K.orderBy)(this.divergentTendersWithParticipationSelection,[t=>t.OfferSubmissionId],[this.directionDivergent]):"OrderNumber"===this.orderTypeDivergent?(0,K.orderBy)(this.divergentTendersWithParticipationSelection,[t=>t.OrderNumber],[this.directionDivergent]):this.divergentTendersWithParticipationSelection}onClearSelectionSynced(){this.synchronizedTendersWithParticipationSelection.forEach(t=>{t.IsCommonPart||(t.IsSelected=!1)})}get showUnsubmitSync(){return this.synchronizedTendersWithParticipationSelection.some(t=>!!t.OfferSubmissionId)}get showClearSelectionSync(){return!this.showUnsubmitSync&&this.synchronizedTendersWithParticipationSelection.some(t=>!t.IsCommonPart&&t.IsSelected)}get allSelectedSync(){return this.synchronizedTendersWithParticipationSelection.every(t=>t.IsSelected)}get isLotSelectedSync(){return this.synchronizedTendersWithParticipationSelection.some(t=>t.IsSelected)}get isSubmitSyncedDisabled(){return!this.isOnlyCommonPart&&this.synchronizedTendersWithParticipationSelection.every(t=>t.IsCommonPart||!t.IsCommonPart&&!t.IsSelected)}checkLotCollectionValidity(t){let r=!1,i=!1,s=!1,a=!1;for(const l of this.synchronizedTendersWithParticipationSelection)a=t.some(u=>u.OfferOverview.OfferId===l.OfferId),l.IsCommonPart?(r=!0,a&&(i=!0)):a&&(s=!0);return(!r||i)&&(s||1===this.synchronizedTendersWithParticipationSelection.length&&1===t.length)}onClearSelectionDivergent(){this.divergentTendersWithParticipationSelection.forEach(t=>t.IsSelected=!1),this.setInitialShowButtons()}getIsDisabledDivergent(){return this.divergentTendersWithParticipationSelection.some(t=>!t.CanManageSubmission||!!t.OfferSubmissionId)}submitSelectedOffersSync(){this.submitOffers(!1,!1)}submitSelectedOffersDivergent(){this.submitOffers(!1,!0)}unsubmitSelectedOffersDivergent(){this.unsubmitOffers(!0)}submitAllOffersDivergent(){this.submitOffers(!0,!0)}openOfferSubmissionDetails(){this.destroySubmitOfferDialog(),this.subscriptions.push(this.multilotTenderService.getReceiptDocumentIds(this.synchedOfferIds,this.round.Id).subscribe(t=>{if(this.canShowOfferSubmissionDetails){const r=new S.Pe;r.viewContainerRef=this.viewContainerRef,this.submitOfferDialogRef=this.dialogService.open(ae.i,r),this.submitOfferDialogRef.componentInstance.parentId=this.id,this.submitOfferDialogRef.componentInstance.offerName=this.offerName,this.submitOfferDialogRef.componentInstance.canEdit=!1,this.submitOfferDialogRef.componentInstance.downloadHtml=!0,this.submitOfferDialogRef.componentInstance.receiptDocumentIds=t,this.submitOfferDialogRef.componentInstance.submittedByName=this.offerSubmission.SubmittedByName,this.submitOfferDialogRef.componentInstance.timestamp=this.offerSubmission.SubmissionTimestamp}}))}unsubmitOffers(t){this.setSubmitUnsubmitButtonsDisabledState(!0);const r=this.dialogService.confirm({titleKeyword:"str_Tender_supplier_are_you_sure_unsubmit",textContentKeyword:"str_Tender_supplier_will_be_able_submit",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_unsubmit_offer",requirePassword:!this.systemSettings.UseDigitalSignature,requireDigitalSignature:this.systemSettings.UseDigitalSignature,showCheckbox:!1,actionMnemonic:"UnsubmitOffer",relatedObjectGuid:this.mainTender.Guid,relatedObjectEntityId:this.mainTender.EntityId}).subscribe(i=>{if(i.confirmed)if(t){const s=this.getResultSelectedSubmittedOffersDivergent();this.unsubmitOffersCollection(s)}else{const s=this.getResultAllSynced();this.unsubmitOffersCollection(s)}this.setSubmitUnsubmitButtonsDisabledState(!1)});this.subscriptions.push(r)}getResultAllSynced(){let t;const r=this.participationsOverview.filter(s=>!!this.synchronizedTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId));return t=r.find(s=>!!s.OfferSubmission)?this.participationsOverview.filter(s=>!!this.synchronizedTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId)&&!!s.OfferSubmission):r,t}getResultSelectedSync(){return this.participationsOverview.filter(r=>!!this.synchronizedTendersWithParticipationSelection.find(i=>i.TenderId===r.TenderId&&i.IsSelected))}getResultAllOffersDivergent(){let t;const r=this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId&&a.CanManageSubmission));return t=r.find(s=>
1!!s.OfferSubmission)?this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId)&&!s.OfferSubmission):r,t}getResultSelectedUnsubmittedOffersDivergent(){let t;const r=this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId&&a.IsSelected));return t=r.find(s=>!!s.OfferSubmission)?this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId&&!!a.IsSelected)&&!s.OfferSubmission):r,t}getResultSelectedSubmittedOffersDivergent(){let t;return this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId&&!!a.IsSelected)).find(s=>!!s.OfferSubmission)&&(t=this.participationsOverview.filter(s=>!!this.divergentTendersWithParticipationSelection.find(a=>a.TenderId===s.TenderId&&!!a.IsSelected)&&!!s.OfferSubmission)),t}filterLockedOffers(t,r){return t.filter(i=>!r.find(s=>s.OfferId===i.OfferOverview.OfferId))}submitOffers(t,r){let i;i=t?r?this.getResultAllOffersDivergent():this.getResultAllSynced():r?this.getResultSelectedUnsubmittedOffersDivergent():this.getResultSelectedSync(),this.setSubmitUnsubmitButtonsDisabledState(!0);const s=i.map(l=>({LotName:l.LotName,LotOrderNumber:l.LotOrderNumber,LotRoundId:l.LotRoundId,OfferBoxId:l.OfferOverview.OfferBoxId,OfferId:l.OfferOverview.OfferId})),a=this.multilotTenderService.getUnsubmittableOffers(s,this.mainTenderOverview.TenderId).pipe((0,O.H)(l=>{if(l.length){i=this.filterLockedOffers(i,l);let u="";l.sort((b,x)=>b.LotOrderNumber-x.LotOrderNumber).forEach(b=>{const y='<div class="margin--top-20 nxcard nxcard--border padding--top-10 padding--bottom-10"><span class="">'+(0!==b.LotOrderNumber?this.localizationService.instant("str_Tender_lot")+"&nbsp;"+b.LotOrderNumber+"</span>&nbsp;&nbsp;&nbsp;"+b.LotName:"-</span>&nbsp;&nbsp;&nbsp;"+b.LotName)+'<span class="padding--left-20"><label class="bg--rose0 text--white">'+b.ReasonUnfitForSubmission+"</label></span></div>";u+=y});const m=!!i&&(!r&&this.checkLotCollectionValidity(i)||r&&i.length>0);return this.dialogService.confirm({titleKeyword:"str_Common_warning",textContentKeyword:"str_Offer_unsubmittable_confirmation_content_multiround_offers",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:m?"str_Common_proceed":null,requirePassword:!1,showCheckbox:!1,htmlContent:`<div class="margin--top-20">\n                                    <div> ${this.localizationService.instant("str_Tender_lots_will_not_be_submitted")} </div>\n                                    ${u}\n                                    <div> ${m?this.localizationService.instant("str_Tender_warning_message_continue"):""} </div>\n                                </div>`}).pipe((0,h.T)(b=>b.confirmed))}return(0,z.of)(!0)}),(0,B.M)(l=>{l||this.setSubmitUnsubmitButtonsDisabledState(!1)}),(0,f.p)(l=>l),(0,O.H)(()=>this.systemSettings.UseDigitalSignature||this.systemSettings.UseTrustedTimestampAuthority?this.openSubmitOfferDialog(i):this.dialogService.confirm({titleKeyword:"str_Tender_supplier_are_you_sure_submit",textContentKeyword:"str_Tender_supplier_will_be_able_modify",confirmationType:"alert",cancelKeyword:"str_Common_cancel",okKeyword:"str_Suplier_offer_details_submit_offer",requirePassword:!0,showCheckbox:!1,actionMnemonic:"SubmitOffer",relatedObjectGuid:this.mainTender.Guid,relatedObjectEntityId:this.mainTender.EntityId}).pipe((0,h.T)(l=>l.confirmed),(0,B.M)(l=>{l||this.setSubmitUnsubmitButtonsDisabledState(!1)}),(0,f.p)(l=>l)))).subscribe(()=>{this.submitOffersCollection(i),this.setSubmitUnsubmitButtonsDisabledState(!1)});this.subscriptions.push(a)}submitOffersCollection(t){t&&t.length&&this.multilotTenderStoreService.submitOffers(t,this.mainTenderOverview.TenderId,this.round.Id),this.onClearSelectionDivergent(),this.onClearSelectionSynced()}unsubmitOffersCollection(t){t&&t.length&&this.multilotTenderStoreService.unsubmitOffers(t,this.mainTenderOverview.TenderId,this.round.Id),this.onClearSelectionDivergent(),this.onClearSelectionSynced()}openSubmitOfferDialog(t){this.destroySubmitOfferDialog();const r=new S.Pe;let i;
1return r.viewContainerRef=this.viewContainerRef,this.submitOfferDialogRef=this.dialogService.open(ae.i,r),this.submitOfferDialogRef.componentInstance.parentId=this.id,this.submitOfferDialogRef.componentInstance.tenderId=this.mainTenderOverview.TenderId,this.submitOfferDialogRef.componentInstance.offerIds=t.map(s=>s.OfferOverview.OfferId),this.submitOfferDialogRef.componentInstance.canEdit=!0,this.submitOfferDialogRef.componentInstance.downloadHtml=!0,this.submitOfferDialogRef.componentInstance.multipleLots=!0,this.submitOfferDialogRef.componentInstance.useDigitalSignature=this.systemSettings.UseDigitalSignature,i=this.submitOfferDialogRef.afterClosed().subscribe(()=>{i.unsubscribe(),this.setSubmitUnsubmitButtonsDisabledState(!1)}),this.submitOfferDialogRef.componentInstance.submit.asObservable()}setSubmitUnsubmitButtonsDisabledState(t){this.areSubmitUnsubmitButtonsDisabled=t,this.changeDetectorRef.markForCheck()}destroySubmitOfferDialog(){this.submitOfferDialogRef&&(this.submitOfferDialogRef.close(),this.submitOfferDialogRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.Ix),e.rXU(e.gRc),e.rXU(c.Rh7),e.rXU(c.CDG),e.rXU(c.PiF),e.rXU(S.o3),e.rXU(c.dqT),e.rXU(c.Yl5),e.rXU(c.N49),e.rXU(F.W))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-multilot-round-participation"]],inputs:{parentId:"parentId",roundWrapper:"roundWrapper",mainTenderOverview:"mainTenderOverview"},features:[e.Vt3],decls:2,vars:3,consts:[["class","nxcard bg--white z1 margin--bottom-20",4,"ngIf"],[1,"nxcard","bg--white","z1","margin--bottom-20"],[1,"nxcard__header"],[1,"nxcard__header-title","margin--top-15"],[1,"nxcard__header-title-content","text--20px","text--bold"],[1,"display--flex","flex-column"],[1,"display--flex"],["class","text--ellipsis text--bold offer-name",3,"title",4,"ngIf"],[3,"isEdit","canEdit","ngClass","edited","saved","canceled","keydown.Enter","keydown.Escape","keydown.control.Enter",4,"ngIf"],["class","text--12px text--normal",4,"ngIf"],["class","text--lemon-2 text--bold text--14px",4,"ngIf"],[4,"ngIf"],[1,"nxcard__body","nxcard__body--no-scroll","nxcard__body--padding"],["class","nxcard border margin--bottom-20 padding--1",4,"ngIf"],["class","nxcard border padding--1",4,"ngIf"],[1,"text--ellipsis","text--bold","offer-name",3,"title"],[3,"edited","saved","canceled","keydown.Enter","keydown.Escape","keydown.control.Enter","isEdit","canEdit","ngClass"],["nx1-inline-editable-section-edit",""],[3,"formGroup"],["autoSelect","","type","text","name","name","autocomplete","given-name","formControlName","Name",1,"input-inline-edit","text--bold"],[3,"control"],[1,"text--12px","text--normal"],[1,"text--grey30"],[1,"text--grey65"],[1,"text--lemon-2","text--bold","text--14px"],[1,"text--emerald0","text--bold","text--14px"],[1,"separator"],[1,"text--14px","border--left","padding--left-10","margin--left-10"],[3,"ngSwitch"],["class","text--bold",3,"click",4,"ngSwitchCase"],["class","text--bold",4,"ngSwitchDefault"],[1,"text--bold"],[1,"text--bold",3,"click"],[1,"margin--right-25","flex-basis--1of5","flex-child","text--14px","text--right"],[1,"text--grey40a"],["class","text--bold",4,"ngIf"],[3,"timestamp","textClasses","parentId"],[1,"nxcard","border","margin--bottom-20","padding--1"],[1,"nxcard__header","overflow-hidden"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--ellipsis"],[1,"nxcard__header-options"],[1,"nxtable"],[1,"nxtable__header"],[1,"nxtable__header-row"],["title","",1,"nxtable__header-title"],["name","AllSyncedLotsSelected",3,"id","indeterminate","checked","change",4,"ngIf"],[1,"nxtable__header-title","nxtable__header-title--sortable",3,"click"],[1,"mdi",3,"ngClass"],[1,"nxtable__header-title","col-xs-2"],[1,"nxtable__header-title","nxtable__header-title--sortable","col-xs-2",3,"title"],[1,"nxtable__body"],["class","nxtable__body-row",3,"no-border","ngClass",4,"ngFor","ngForOf"],["mat-button","","color","primary",3,"click","disabled"],[1,"mdi","margin--right-4",3,"ngClass"],["mat-button","",3,"click"],["name","AllSyncedLotsSelected",3,"change","id","indeterminate","checked"],[1,"nxtable__body-row",3,"ngClass"],[1,"nxtable__body-cell"],[3,"checked","disabled","id","change",4,"ngIf"],[1,"nxtable__body-cell","pointer",3,"click"],[1,"nxtable__body-cell","text--bold",3,"ngClass"],["class","mdi mdi-alert pointer text--lemon-2 margin--right-5",3,"title",4,"ngIf"],[1,"nxtable__body-cell","text--bold","text--uppercase",3,"ngClass"],[3,"change","checked","disabled","id"],["class","mdi mdi-check text--emerald0 text--15px",4,"ngIf"],["class","mdi mdi-close text--rose0 text--15px",4,"ngIf"],[1,"mdi","mdi-check","text--emerald0","text--15px"],[1,"mdi","mdi-close","text--rose0","text--15px"],[1,"mdi","mdi-alert","pointer","text--lemon-2","margin--right-5",3,"title"],[1,"nxcard","border","padding--1"],["class","","name","selectedDivergentLots",3,"disabled","ngModel","ngModelChange","change",4,"ngIf"],[1,"nxtable__header-title","nxtable__header-title--sortable","col-xs-2",3,"click","title"],["mat-button","",3,"click","disabled"],["name","selectedDivergentLots",1,"",3,"ngModelChange","change","disabled","ngModel"],[1,"nxtable__body-cell","nxtable__body-cell--option","pointer",3,"click"],[1,"text--grey60","text--bold","text--uppercase","text--10px"],[1,"text--grey90","text--bold","text--10px"],["class","text--grey90 text--bold text--10px",4,"ngIf"],[1,"text--emerald0","text--bold","text--uppercase","text--10px"]],template:function(r,i){1&r&&(e.DNE(0,na,16,8,"div",0),e.nI1(1,"async")),2&r&&e.Y8G("ngIf",e.bMT(1,1,i.tendersWithParticipation$).length>0)},dependencies:[p.YU,p.Sq,p.bT,p.ux,p.e1,p.fG,_.qT,_.me,_.BC,_.cb,_.vS,_.j4,_.JD,k.iV,we.NZ,pe.l,Ee.r,Be.m,Fe.s,p.Jj,p.Pc,R.D9,ue.R9,Re.O,rt.F],styles:["[_nghost-%COMP%]   .offer-name[_ng
1content-%COMP%]{padding:7px 0 10px}tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-child, tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-child(2){width:60px;min-width:60px}td.nxtable__body-cell[_ngcontent-%COMP%]{word-break:normal}.nxtable__body-row-select[_ngcontent-%COMP%]{background:#e2f4fb none repeat scroll 0 0;animation:ripple .25s forwards}"]})}}return n})();var ra=d(44149);const sa=n=>({"margin--left-5":n}),oa=n=>({"margin--left-20":n});function aa(n,o){if(1&n&&(e.j41(0,"div",15),e.nrm(1,"i",16),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,t.getRoundLotLable())+" "+t.getRoundLotNumber()," ")}}function la(n,o){if(1&n&&(e.j41(0,"span",19),e.EFF(1),e.k0s()),2&n){const t=o.$implicit,r=o.last;e.R7$(),e.Lme(" ",t.OrganizationName,"",r?"":", "," ")}}function ca(n,o){if(1&n&&(e.qex(0),e.j41(1,"span",17),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.EFF(4,"\xa0 "),e.DNE(5,la,2,2,"span",18),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"str_Tender_consortium_members")),e.R7$(3),e.Y8G("ngForOf",t.consortiumMembers)}}function da(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_submit_as_consortium")," "))}function ua(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_manage_consortium_members")," "))}function pa(n,o){if(1&n&&(e.j41(0,"div",12),e.DNE(1,da,3,3,"a",20)(2,ua,3,3,"a",20),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",0===(null==t.consortiumMembers?null:t.consortiumMembers.length)),e.R7$(),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0)}}function fa(n,o){if(1&n){const t=e.RV6();e.j41(0,"a",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"str_Tender_view_consortium_participants")," "))}function ma(n,o){if(1&n&&(e.j41(0,"div",12),e.DNE(1,fa,3,3,"a",20),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0)}}function _a(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",6),e.DNE(1,aa,4,3,"div",7),e.j41(2,"div",8),e.EFF(3),e.nI1(4,"nx1Name"),e.k0s(),e.j41(5,"div",9)(6,"div",10),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.EFF(9," | "),e.j41(10,"a",11),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onChangeExpand())}),e.EFF(11),e.nI1(12,"translate"),e.nI1(13,"translate"),e.k0s()(),e.qex(14),e.j41(15,"div",12),e.DNE(16,ca,6,4,"ng-container",13),e.k0s(),e.DNE(17,pa,3,2,"div",14),e.nI1(18,"canManageConsortiumForMultilot"),e.DNE(19,ma,2,1,"div",14),e.nI1(20,"canManageConsortiumForMultilot"),e.bVm(),e.k0s()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",null!=t.roundWrapper.LotNumber),e.R7$(2),e.SpI(" ",e.bMT(4,7,null==t.roundWrapper?null:t.roundWrapper.Round)," "),e.R7$(4),e.JRh(e.bMT(8,9,"str_Tender_multilot_offer_submission")),e.R7$(4),e.SpI(" ",t.isExpanded?e.bMT(12,11,"str_Common_hide"):e.bMT(13,13,"str_Common_see_details")," "),e.R7$(5),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0),e.R7$(),e.Y8G("ngIf",e.bMT(18,15,t.roundWrapper)),e.R7$(2),e.Y8G("ngIf",!e.bMT(20,17,t.roundWrapper))}}function ha(n,o){if(1&n&&(e.j41(0,"div",26),e.nrm(1,"i",16),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,t.getRoundLotLable())+" "+t.getRoundLotNumber()," ")}}function ga(n,o){1&n&&(e.j41(0,"div",10),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"str_Tender_multilot_round_over")))}function ba(n,o){1&n&&(e.qex(0),e.EFF(1," | "),e.bVm())}function va(n,o){if(1&n&&(e.j41(0,"span",19),e.EFF(1),e.k0s()),2&n){const t=o.$implicit,r=o.last;e.R7$(),e.Lme(" ",t.OrganizationName,"",r?"":", "," ")}}function Sa(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",12)(2,"span",17),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.EFF(5,"\xa0 "),e.DNE(6,va,2,2,"span",18),e.k0s(),e.j41(7,"div",12)(8,"div",12)(9,"a",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onOpenConsortiumDialog())}),e.EFF(10),e.nI1(11,"translate"),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(3),e.JRh(e.bMT(4,3,"str_Tender_consortium_members")),e.R7$(3),e.Y8G("ngForOf",t.consortiumMembers),e.R7$(4),e.SpI(" ",e.bMT(11,5,"str_Tender_view_consortium_participants")," ")}}function xa(n,o){if(1&n){const t=e.RV6();
1e.j41(0,"div",6),e.DNE(1,ha,4,3,"div",22),e.j41(2,"div",8),e.EFF(3),e.nI1(4,"nx1Name"),e.k0s(),e.j41(5,"div",23),e.DNE(6,ga,3,3,"div",24)(7,ba,2,0,"ng-container",13),e.j41(8,"a",25),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onChangeExpand())}),e.EFF(9),e.nI1(10,"translate"),e.nI1(11,"translate"),e.k0s()(),e.DNE(12,Sa,12,7,"ng-container",13),e.k0s()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",null!=t.roundWrapper.LotNumber),e.R7$(2),e.SpI(" ",e.bMT(4,7,null==t.roundWrapper?null:t.roundWrapper.Round)," "),e.R7$(3),e.Y8G("ngIf",!(null!=t.roundWrapper&&t.roundWrapper.IsCurrentRound)),e.R7$(),e.Y8G("ngIf",!(null!=t.roundWrapper&&t.roundWrapper.IsCurrentRound)),e.R7$(),e.Y8G("ngClass",e.eq3(13,oa,!(null!=t.roundWrapper&&t.roundWrapper.IsCurrentRound))),e.R7$(),e.SpI(" ",t.isExpanded?e.bMT(10,9,"str_Common_hide"):e.bMT(11,11,"str_Common_see_details")," "),e.R7$(3),e.Y8G("ngIf",(null==t.consortiumMembers?null:t.consortiumMembers.length)>0)}}function Ta(n,o){1&n&&(e.j41(0,"div",27)(1,"div",28)(2,"figure",29),e.qSk(),e.j41(3,"svg",30),e.nrm(4,"circle",31),e.k0s(),e.joV(),e.nrm(5,"i",32),e.k0s(),e.j41(6,"h2",33),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"span",34),e.EFF(10),e.nI1(11,"translate"),e.k0s()()()),2&n&&(e.R7$(7),e.SpI(" ",e.bMT(8,2,"str_Tender_participation_available_not_participating")," "),e.R7$(3),e.SpI(" ",e.bMT(11,4,"str_Tender_participation_lots_not_added_please_add"),""))}function Ia(n,o){if(1&n&&e.nrm(0,"nx1-tender-supplier-multilot-round-participation",35),2&n){const t=e.XpG();e.Y8G("roundWrapper",t.roundWrapper)("mainTenderOverview",t.mainOverview)}}let ya=(()=>{class n extends g.$G{static{this.ManageConsortiumMembersMnemonic="CreateConsortiumMember"}constructor(t,r,i,s,a,l,u,m){super(t),this.route=r,this.router=i,this.currentTenderParticipantStoreService=s,this.dialogService=a,this.consortiumMemberStoreService=l,this.systemSettingsStoreService=u,this.principalPermissionService=m,this.consortiumMembers=[],this.orderType="OrderNumber",this.subscriptions=[],this.hasPermissionToManageConsortiumMembers=null}ngOnInit(){this.isExpanded=this.roundWrapper.IsCurrentRound,this.subscriptions.push(this.currentTenderParticipantStoreService.getCurrentTenderParticipant().subscribe(t=>this.currentTenderParticipantId=t.Id)),this.subscriptions.push(this.consortiumMemberStoreService.getConsortiumMembersByTenderParticipantId(this.currentTenderParticipantId).pipe((0,f.p)(t=>!!t)).subscribe(t=>this.consortiumMembers=t))}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}participationWithSubmission(t){return t.filter(r=>null!=r.OfferSubmission).length}submissionStatus(t){return null!=t.OfferSubmission?"str_Tender_submitted":"str_Tender_not_submitted"}get getOrderedTendersWithParticipationCollection(){return"LotName"===this.orderType?(0,K.orderBy)(this.roundWrapper.TendersWithParticipation,[t=>t.LotName],[this.direction]):"Status"===this.orderType?(0,K.orderBy)(this.roundWrapper.TendersWithParticipation,[t=>t.OfferSubmission?t.OfferSubmission.Id:null],[this.direction]):"OrderNumber"===this.orderType?(0,K.orderBy)(this.roundWrapper.TendersWithParticipation,[t=>t.LotOrderNumber],[this.direction]):this.roundWrapper.TendersWithParticipation}sort(t){this.orderType=t,this.direction="asc"===this.direction?"desc":"asc"}isSortActive(t,r){return r?this.orderType===t&&this.direction===r:this.orderType===t}navigateToTender(t){this.router.navigateByUrl(`/tender/reload?followUrl=/tender/${t.TenderId}/supplier/${t.LotRoundId}/offers/${t.OfferOverview.OfferBoxId}`)}manageParticipations(){this.router.navigate(["./",this.roundWrapper.TenderProcessRoundId],{relativeTo:this.route})}getRoundLotNumber(){return this.roundWrapper.LotNumber>0?this.roundWrapper.LotNumber:""}getRoundLotLable(){return this.roundWrapper.LotNumber>0?"str_Tender_dynamic_round_for_lot":"str_Tender_dynamic_round_for_common_part"}onOpenConsortiumDialog(){(0,z.of)(this.hasPermissionToManageConsortiumMembers).pipe((0,V.Z)(t=>null!=t?(0,z.of)(t):this.principalPermissionService.hasPermission(n.ManageConsortiumMembersMnemonic,this.mainOverview.ParticipantGuid,this.mainOverview.ParticipantEntityId)),(0,j.$)()).subscribe(t=>{this.hasPermissionToManageConsortiumMembers=t;const r=[];
1this.consortiumMembers.forEach(a=>{r.push({Id:a.Id,RegistryNumber:a.RegistryNumber,OrganizationName:a.OrganizationName,IsValid:a.IsValid})}),this.destroyConsortiumMembersDialog();const i=new S.Pe;i.viewContainerRef=this.viewContainerRef,this.consortiumMembersDialogRef=this.dialogService.open(Ve.S,i),this.consortiumMembersDialogRef.componentInstance.consortiumMembers=r,this.consortiumMembersDialogRef.componentInstance.editMode=this.hasPermissionToManageConsortiumMembers,this.consortiumMembersDialogRef.componentInstance.tenderParticipantId=this.currentTenderParticipantId;const s=this.consortiumMembersDialogRef.componentInstance.saveConsortiumMembers.subscribe(a=>{const l=[];a.forEach(u=>{let m=this.consortiumMembers.find(b=>!!b.Id&&b.Id===u.Id);m||(m={TenderParticipantId:this.currentTenderParticipantId}),l.push(Object.assign({},m,{RegistryNumber:u.RegistryNumber,OrganizationName:u.OrganizationName,IsValid:u.IsValid}))}),this.consortiumMemberStoreService.saveConsortiumMembers(this.currentTenderParticipantId,l)});this.consortiumMembersDialogRef.afterClosed().toPromise().then(()=>{this.consortiumMembersDialogRef=null,s&&s.unsubscribe()})})}onChangeExpand(){this.isExpanded=!this.isExpanded}destroyConsortiumMembersDialog(){this.consortiumMembersDialogRef&&(this.consortiumMembersDialogRef.close(),this.consortiumMembersDialogRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(c.VY6),e.rXU(S.o3),e.rXU(c.Gfq),e.rXU(c.dqT),e.rXU(c.N49))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-multilot-participation-details"]],inputs:{parentId:"parentId",roundWrapper:"roundWrapper",mainOverview:"mainOverview"},features:[e.Vt3],decls:7,vars:7,consts:[[3,"ngClass"],[1,"nxcard","z1","overflow-hidden","margin--bottom-20","bg--white"],[1,"nxcard__header","nxcard__header--no-border"],["class"," nxcard__header-title flex-column margin--bottom-10 margin--top-20",4,"ngIf"],["class","nxcard__body border--top",4,"ngIf"],["class","display--block padding--left-30",3,"roundWrapper","mainTenderOverview",4,"ngIf"],[1,"nxcard__header-title","flex-column","margin--bottom-10","margin--top-20"],["class","align--center flex-row nxcard__header-title-content text--10px text--seablue0 text--uppercasenxcard__header-title-content text--10px text--seablue0 text--uppercase",4,"ngIf"],[1,"nxcard__header-title-content","text--20px","text--bold"],[1,"flex-row","nxcard__header-title-content","text--12px","text--emerald0"],[1,"text--14px","margin--right-20","text--uppercase"],[1,"margin--left-20","text--14px","text--normal","text--seablue0","text--underline",3,"click"],[1,"flex-row","nxcard__header-title-content"],[4,"ngIf"],["class","flex-row nxcard__header-title-content",4,"ngIf"],[1,"align--center","flex-row","nxcard__header-title-content","text--10px","text--seablue0","text--uppercasenxcard__header-title-content","text--10px","text--seablue0","text--uppercase"],[1,"mdi","mdi-rhombus","padding--right-5","text--12px"],[1,"text--12px","text--normal","text--grey30","text--uppercase","text--bold"],["class","text--12px text--normal text--grey65",4,"ngFor","ngForOf"],[1,"text--12px","text--normal","text--grey65"],["class","text--underline text--seablue0 text--14px text--normal",3,"click",4,"ngIf"],[1,"text--underline","text--seablue0","text--14px","text--normal",3,"click"],["class","align--center flex-row nxcard__header-title-content text--10px text--seablue0 text--uppercase ",4,"ngIf"],[1,"flex-row","nxcard__header-title-content","text--12px","text--grey40"],["class","text--14px margin--right-20 text--uppercase",4,"ngIf"],[1,"text--underline","text--seablue0","text--14px","text--normal",3,"click","ngClass"],[1,"align--center","flex-row","nxcard__header-title-content","text--10px","text--seablue0","text--uppercase"],[1,"nxcard__body","border--top"],[1,"align--center","bg--grey3a","content-center","display--flex","flex-column","full-height","no-contents--animate","padding--top-40","padding--bottom-40"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-close"],[1,"text--bold","margin--bottom-10","text--grey40"],[1,"text--grey30"],[1,"display--block","padding--left-30",3,"roundWrapper","mainTenderOverview"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.DNE(3,_a,21,19,"div",3)(4,xa,13,15,"div",3),e.k0s(),e.DNE(5,Ta,12,6,"div",4),e.k0s(),e.DNE(6,Ia,1,2,"nx1-tender-supplier-multilot-round-participation",5),e.k0s()),2&r&&(e.Y8G("ngClass",e.eq3(5,sa,null!=i.roundWrapper.LotNumber)),e.R7$(3),e.Y8G("ngIf",i.roundWrapper.IsManageable),e.R7$(),e.Y8G("ngIf",!i.roundWrapper.IsManageable),e.R7$(),e.Y8G("ngIf",0==i.roundWrapper.TendersWithParticipation.length&&i.isExpanded),e.R7$(),e.Y8G("ngIf",i.isExpanded))},dependencies:[p.YU,p.Sq,p.bT,ia,R.D9,rt.F,ra.M],styles:[".infinity-card-scroll[_ngcontent-%COMP%]{max-height:60vh;display:block;width:100%;overflow-y:auto}.nxtable__body-cell[_ngcontent-%COMP%]:first-child{min-width:60px;width:60px;text-align:center;padding-left:5px;padding-right:5px}.nxtable__body-cell[_ngcontent-%COMP%]:first-child{min-width:60px;width:60px}"]})}}return n})();function Ca(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-tender-explicite-status",12),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("tender",t.mainTender)("isBuyer",null==t.tenderGuard?null:t.tenderGuard.isBuyer)}}function Oa(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-tender-supplier-multilot-participation-detail
1s",13),e.nI1(2,"async"),e.bVm()),2&n){const t=o.$implicit,r=o.index,i=e.XpG(2);e.R7$(),e.Y8G("parentId",i.getId(r))("roundWrapper",t)("mainOverview",e.bMT(2,3,i.mainOverview$))}}function Ra(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7),e.nrm(5,"nx1-tool-breadcrumb",8),e.k0s()()()(),e.DNE(6,Ca,2,2,"ng-container",9),e.j41(7,"nx1-guidance-message",10),e.bIt("buttonClick",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.decryptOfferBlocks())}),e.k0s(),e.j41(8,"nx1-guidance-message",10),e.bIt("buttonClick",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.decryptOfferBlocks())}),e.k0s(),e.DNE(9,Oa,3,5,"ng-container",11),e.nI1(10,"async"),e.bVm()}if(2&n){const t=e.XpG();e.R7$(5),e.Y8G("breadcrumbPath",t.toolBreadcrumbPath),e.R7$(),e.Y8G("ngIf",t.mainTender.ExplicitTenderStatus!=t.expliciteTenderStatusEnum.Complex&&(t.mainTender.IsArchived||t.mainTender.IsCanceled||t.mainTender.IsPaused)),e.R7$(),e.Y8G("entity",t.mainTender)("actionMnemonic","ViewMultilotSuppliersProvidePrivateKeyGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key")("messageKeyword","str_Tender_multilot_guidance_provide_private_key_message")("reloadActionTypes",t.reloadActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("entity",t.mainTender)("actionMnemonic","ViewMultilotSuppliersProvidePrivateKeyPriceEvaluationGuidance")("buttonKeyword","str_Offerbox_suppliers_provide_private_key_price_evaluation")("messageKeyword","str_Tender_multilot_guidance_provide_private_key_price_evaluation_message")("reloadActionTypes",t.reloadActionTypes)("cssClasses","margin--bottom-20")("showButton",!0)("iconClass","mdi-lightbulb"),e.R7$(),e.Y8G("ngForOf",e.bMT(10,19,t.roundWrappers$))}}function Ma(n,o){1&n&&(e.j41(0,"div",14),e.nrm(1,"mat-spinner",15),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}function Pa(n,o){1&n&&(e.j41(0,"div",16)(1,"div",17)(2,"figure",18),e.qSk(),e.j41(3,"svg",19),e.nrm(4,"circle",20),e.k0s(),e.joV(),e.nrm(5,"i",21),e.k0s(),e.j41(6,"h2",22),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()),2&n&&(e.R7$(7),e.SpI(" ",e.bMT(8,1,"str_Tender_participation_not_available")," "))}function Da(n,o){1&n&&(e.j41(0,"div",23),e.nrm(1,"mat-spinner",15),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let ka=(()=>{class n extends g.$G{constructor(t,r,i,s,a,l,u,m,b,x,y,C){super(t),this.multilotTenderStoreService=r,this.route=i,this.tenderSupplierGuard=s,this.dialogService=a,this.principalPermissionService=l,this.consortiumMemberStoreService=u,this.currentTenderParticipantStoreService=m,this.changeDetectorRef=b,this.privateKeyStoreService=x,this.offerContentStoreService=y,this.tenderGuard=C,this.isExpanded=!1,this.privateKey=null,this.isSubmittingOrUnsubmitting$=this.multilotTenderStoreService.getIsSubmittingOrUnsubmittingMultilot(),this.toolBreadcrumbPath=[{keyword:"str_Tender_lots_and_requirements",url:[".."]}],this.reloadActionTypes=[ke.q1],this.expliciteTenderStatusEnum=NX1.Model.Enums.TenderStatus,this.subscriptions=[]}ngOnInit(){this.subscriptions.push(this.tenderSupplierGuard.tender$.subscribe(i=>this.mainTender=i));const t=this.route.parent.parent.parent.paramMap.pipe((0,h.T)(i=>i.get("id")),(0,h.T)(i=>parseInt(i,10)),(0,M.F)());this.subscriptions.push(t.subscribe(i=>this.multilotTenderStoreService.loadMultilotParticipationInformation(i))),this.subscriptions.push(this.currentTenderParticipantStoreService.getCurrentTenderParticipant().subscribe(i=>this.consortiumMemberStoreService.loadConsortiumMembers(i.Id))),this.roundWrappers$=this.multilotTenderStoreService.getMultilotRoundParticipationWrapper(),this.mainOverview$=this.multilotTenderStoreService.getMultilotMainTender(),this.isLoaded$=(0,$.z)([this.multilotTenderStoreService.getIsMultilotParticipationLoaded(),this.multilotTenderStoreService.getIsMultilotInformationLoaded()]).pipe((0,h.T)(([i,s])=>i&&s)),this.subscriptions.push(this.privateKeyStoreService.getPrivateKey().pipe((0,f.p)(i=>!!i)).subscribe(i=>this.privateKey=i));const r=this.privateKeyStoreService.getIsLoadedPrivateKeyHash().pipe((0,f.p)(i=>!i)).subscribe(()=>{this.privateKeyStoreService.loadPrivateKeyHash(this.mainTender.Id),this.changeDetectorRef.markForCheck()});this.subscriptions.push(r)}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}openUploadPrivateKey(t){this.destroyUploadPrivateKey();const r=new S.Pe;
1if(r.viewContainerRef=this.viewContainerRef,this.uploadPrivateKeyRef=this.dialogService.open(qe.F,r),!0===t){this.uploadPrivateKeyRef.componentInstance.decryptAfterClose=!0;const i=this.uploadPrivateKeyRef.componentInstance.decryptKeys.subscribe(()=>{this.decryptOfferBlocks(),i.unsubscribe(),this.changeDetectorRef.markForCheck()})}}decryptOfferBlocks(){this.privateKey?this.offerContentStoreService.decryptOfferBlocks(this.tenderSupplierGuard.tenderId,null):this.openUploadPrivateKey(!0)}destroyUploadPrivateKey(){this.uploadPrivateKeyRef&&(this.uploadPrivateKeyRef.close(),this.uploadPrivateKeyRef=null)}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(c.Rh7),e.rXU(T.nX),e.rXU(F.W),e.rXU(S.o3),e.rXU(c.N49),e.rXU(c.Gfq),e.rXU(c.VY6),e.rXU(e.gRc),e.rXU(c.zkG),e.rXU(c.kW$),e.rXU(D.U))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-multilot-participation"]],inputs:{parentId:"parentId"},features:[e.Vt3],decls:9,vars:12,consts:[["loadingTemplate",""],[4,"ngIf","ngIfElse"],["class","nxcard__body",4,"ngIf"],["class","offerbox-supplier-loader",4,"ngIf"],[1,"nxcard","bg--white","z1","margin--bottom-20"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row","align--center","flex-grow--2"],[3,"breadcrumbPath"],[4,"ngIf"],[3,"buttonClick","entity","actionMnemonic","buttonKeyword","messageKeyword","reloadActionTypes","cssClasses","showButton","iconClass"],[4,"ngFor","ngForOf"],[3,"tender","isBuyer"],[3,"parentId","roundWrapper","mainOverview"],[1,"full-height","full-width","display--flex","align--center","content-center"],[3,"diameter"],[1,"nxcard__body"],[1,"align--center","display--flex","flex-column","full-height","content-center","no-contents--animate"],["data-percent","100",1,"chart"],["width","110","height","110"],["cx","55","cy","55","r","50","transform","rotate(-90 55 55)",1,"outer"],[1,"mdi","mdi-close"],[1,"text--bold","margin--bottom-10","text--grey40"],[1,"offerbox-supplier-loader"]],template:function(r,i){if(1&r&&(e.DNE(0,Ra,11,21,"ng-container",1),e.nI1(1,"async"),e.DNE(2,Ma,2,1,"ng-template",null,0,e.C5r)(4,Pa,9,3,"div",2),e.nI1(5,"async"),e.nI1(6,"async"),e.DNE(7,Da,2,1,"div",3),e.nI1(8,"async")),2&r){let s;const a=e.sdS(3);e.Y8G("ngIf",e.bMT(1,4,i.isLoaded$))("ngIfElse",a),e.R7$(4),e.Y8G("ngIf",0==(null==(s=e.bMT(5,6,i.roundWrappers$))?null:s.length)&&e.bMT(6,8,i.isLoaded$)),e.R7$(3),e.Y8G("ngIf",e.bMT(8,10,i.isSubmittingOrUnsubmitting$))}},dependencies:[p.Sq,p.bT,E.wS,Ne.x,fe.n,Z.x,ya,p.Jj,R.D9],styles:["[_nghost-%COMP%]{display:block;height:100%}.infinity-card-scroll[_ngcontent-%COMP%]{max-height:60vh;display:block;width:100%;overflow-y:auto}.offerbox-supplier-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#00000026;z-index:1000}"]})}}return n})();var wa=d(35858);function $a(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-tender-explicite-status",9),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("tender",t.tender)("isBuyer",!1)}}function Ga(n,o){if(1&n&&(e.nrm(0,"nx1-tender-property-group",10),e.nI1(1,"async")),2&n){const t=o.$implicit,r=o.last,i=o.index,s=e.XpG(2);e.AVh("margin--bottom-10",!r),e.Y8G("tenderPropertyGroup",t.Key)("tenderPropertyDisplayGroups",t.Value)("canEdit",!1)("showEdit",!1)("tender",e.bMT(1,8,s.tender$))("parentId",s.getId(i))}}function Ea(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5),e.nrm(5,"nx1-tool-breadcrumb",6),e.k0s()()()(),e.DNE(6,$a,2,2,"ng-container",7)(7,Ga,2,10,"nx1-tender-property-group",8),e.nI1(8,"async"),e.bVm()),2&n){const t=e.XpG();e.R7$(5),e.Y8G("breadcrumbPath",t.toolBreadcrumbPath),e.R7$(),e.Y8G("ngIf",t.tender.IsArchived||t.tender.IsCanceled||t.tender.IsPaused),e.R7$(),e.Y8G("ngForOf",e.bMT(8,3,t.tenderPropertyGroups$))}}function Ba(n,o){1&n&&(e.j41(0,"div",11),e.nrm(1,"mat-spinner",12),e.k0s()),2&n&&(e.R7$(),e.Y8G("diameter",60))}let Fa=(()=>{class n extends g.$G{constructor(t,r,i,s,a){super(t),this.tenderGuard=r,this.tenderPropertiesStoreService=i,this.tenderStoreService=s,this.userService=a,this.canEdit=!1,this.toolBreadcrumbPath=[{keyword:"str_Tender_properties",url:[".."]}],this.subscriptions=[]}ngOnInit(){this.isLoaded$=this.tenderPropertiesStoreService.getAreLoadedTenderProperties(),this.tenderPropertiesStoreService.loadTenderProperties(this.tenderGuard.tenderId),this.tender$=this.tenderStoreService.getCurrentTender(),this.tenderPropertyGroups$=this.tenderPropertiesStoreService.getTenderProperties(),this.canEdit=this.tenderGuard.canEditTender,this.tender=this.tenderGuard.tenderInfo,this.subscriptions.push(this.tender$.pipe((0,f.p)(t=>!!t),(0,O.H)(t=>this.userService.logView(t.Id,"ViewTenderSettings"))).subscribe())}ngOnDestroy(){for(const t of this.subscriptions)t.unsubscribe()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(D.U),e.rXU(c.WHN),e.rXU(c.$gx),e.rXU(c.DLc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-properties"]
1],inputs:{parentId:"parentId"},features:[e.Vt3],decls:4,vars:4,consts:[["groupsLoader",""],[4,"ngIf","ngIfElse"],[1,"nxcard","bg--white","z1","margin--bottom-20"],[1,"nxcard__header","nxcard__header--no-border"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content","flex-row","align--center","flex-grow--2"],[3,"breadcrumbPath"],[4,"ngIf"],[3,"tenderPropertyGroup","tenderPropertyDisplayGroups","canEdit","showEdit","tender","margin--bottom-10","parentId",4,"ngFor","ngForOf"],[3,"tender","isBuyer"],[3,"tenderPropertyGroup","tenderPropertyDisplayGroups","canEdit","showEdit","tender","parentId"],[1,"display--flex","align--center","content-center","padding--40","full-height"],[3,"diameter"]],template:function(r,i){if(1&r&&(e.DNE(0,Ea,9,5,"ng-container",1),e.nI1(1,"async"),e.DNE(2,Ba,2,1,"ng-template",null,0,e.C5r)),2&r){const s=e.sdS(3);e.Y8G("ngIf",e.bMT(1,2,i.isLoaded$))("ngIfElse",s)}},dependencies:[p.Sq,p.bT,E.wS,Ne.x,wa.m,Z.x,p.Jj],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Na=d(24969),ja=d(49689),Xa=d(80527),Va=d(32003);function Ua(n,o){if(1&n&&(e.qex(0),e.nrm(1,"nx1-tender-explicite-status",13),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("tender",t.tenderInfo)("isBuyer",!1)}}function La(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",14)(1,"button",15),e.nI1(2,"async"),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onAddForm())}),e.nrm(3,"i",16),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("disabled",!e.bMT(2,3,t.isLoaded$)||t.disableAddFormButton),e.BMQ("id",t.getButtonId("add")),e.R7$(3),e.SpI(" ",e.bMT(5,5,"str_Common_add")," ")}}function Aa(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"nx1-tender-publication",17),e.bIt("publishTenderPublication",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onPublish(i))})("unpublishTenderPublication",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onUnpublish(i))})("generateTenderPublicationExport",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onPublicationExport(i))})("deleteTenderPublication",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onDelete(i))}),e.k0s()()}if(2&n){const t=o.$implicit,r=e.XpG();e.R7$(),e.Y8G("tenderPublication",t)("publicationAuthorities",r.publicationAuthorities)("isBulgarianConfiguration",r.isBulgarianConfiguration)("isChildTenderPublication",!1)}}let Ya=(()=>{class n extends g.$G{static{this.TenderIdQueryParameter="id"}constructor(t,r,i,s,a,l,u,m,b,x,y,C,G,U,q,P,W){super(t),this.viewContainerRef=t,this.dialogService=r,this.tenderGuard=i,this.route=s,this.tenderPublicationStoreService=a,this.tenderPublicationService=l,this.defaultDocumentService=u,this.notificationsService=m,this.systemSettingsStoreService=b,this.enumsPipe=x,this.documentService=y,this.loaderService=C,this.tasksService=G,this.changeDetectorRef=U,this.tenderStatusItemService=q,this.principalPermissionService=P,this.localizationService=W,this.isExportInProgress=!1,this.subscriptions=[]}ngOnInit(){this.isLoaded$=this.tenderPublicationStoreService.getIsTenderPublicationLoaded(),this.tenderId$=this.route.parent.parent.parent.paramMap.pipe((0,h.T)(t=>t.get(n.TenderIdQueryParameter)),(0,h.T)(t=>parseInt(t,10)),(0,M.F)()),this.tenderPublications$=this.tenderId$.pipe((0,f.p)(t=>!!t),(0,B.M)(t=>{this.tenderPublicationStoreService.loadTenderPublications(t),this.tenderPublicationStoreService.loadPublicationAuthoritiesByTenderId(t),this.tenderId=t}),(0,v.n)(t=>this.tenderPublicationStoreService.getTenderPublicationsByTenderId(t))),this.publicationAuthorities$=this.tenderPublicationStoreService.getPublicationAuthorities(),this.subscriptions.push(this.tenderGuard.tender$.pipe((0,f.p)(t=>!!t),(0,B.M)(t=>{this.tenderInfo=t}),(0,I.K)(this.tenderPublications$),(0,f.p)(t=>!!t),(0,B.M)(t=>{this.tenderPublications=t}),(0,I.K)(this.publicationAuthorities$.pipe((0,h.T)(t=>{this.publicationAuthorities=t,this.shouldCreatePublicationOnlyForNegometrix=1===this.publicationAuthorities.length&&"NegometrixAuthority"===this.publicationAuthorities[0].Mnemonic,this.disableAddFormButton=-1!==this.tenderPublications.findIndex(r=>r.PublicationFormType===NX1.Model.Enums.PublicationFormType.None)&&this.shouldCreatePublicationOnlyForNegometrix})))).subscribe()),this.subscriptions.push(this.systemSettingsStoreService.isBulgarianConfiguration().subscribe(t=>this.isBulgarianConfiguration=t)),this.subscriptions.push(this.tenderGuard.tender$.pipe((0,v.n)(t=>this.tenderStatusItemService.getStatusItemsPreventingPublication(t.Id).pipe((0,h.T)(r=>(this.tenderStatusItemsPreventingPublication=r,!!r&&0===r.length)),(0,v.n)(r=>r?this.principalPermissionService.hasPermission(D.U.AddTenderPublications,t.Guid,t.EntityId):(0,z.of)(!1))))).subscribe(t=>this.canAddTenderPublications=t)),this.subscriptions.push(this.tenderPublicationStoreService.getNewlyCreatedTenderPublicationId().pipe((0,f.p)(t=>!!t)).subscribe(t=>{this.tenderPublicationFormComponent||(this.OpenNewlyCreatedTenderPublication(t),this.notificationsService.open("str_Tender_publication_create_success"))}))}ngOnDestroy(){this.subscriptions.forEach(t=>{t&&t.unsubscribe()})}onPublish(t){this.tenderPublicationStoreService.publishTenderPublication(t,null,"str_Tender_publication_publish_success")}onUnpublish(t){this.tenderPublicationStoreService.unpublishTenderPublication(t)}onDelete(t){this.tenderPublicationStoreService.deleteTenderPublication(t)}onPublicationExport(t){const r=t.tenderPublicationId;!t.isSignable||t.isEForm?("pdf"===t.extension?this.tenderPublicationService.getPublicationPdfExport(r):this.tenderPublicationService.getPublicationXmlExport(r)).subscribe(l=>{this.defaultDocumentService.downloadDocumentBySignedUrl(l)},l=>{this.notificationsService.open("str_Tender_publication_export_error","",{})}):this.onExport(r)}onExport(t){if(!this.taskItem){this.isExportInProgress=!0,this.openLoader();const r=this.tasksService.zipTenderPublication(t).pipe((0,B.M)(i=>this.taskItem=i),(0,V.Z)(i=>this.tasksService.runTaskItem(i.Guid)),(0,V.Z)(i=>{const s=[];return s.push(this.taskItem.Guid),this.tasksService.getTaskItemsByGuids(s)}),(0,h.T)(i=>i.find(s=>s.Guid===this.taskItem.Guid))).subscribe(i=>{if(i){const s=this.documentService.downloadDocumentByGuid(i.ResultantObjectGuid).subscribe(a=>{this.isExportInProgress=!1,this.closeLoader(),this.changeDetectorRef.markForCheck(),s&&(s.unsubscribe(),this.taskItem=void 0)})}else this.isExportInProgress=!1,this.taskItem=void 0,this.closeLoader(),this.changeDetectorRef.markForCheck()});this.subscriptions.push(r)}}onAddForm(){if(this.canAddTenderPublications)this.shouldCreatePublicationOnlyForNegometrix?(this.disableAddFormButton=!0,this.createForm(this.tenderId,NX1.Model.Enums.PublicationFormType.None)):this.subscriptions.push(this.tenderPublicationService.getAvailablePublicationFormTypes(this.tenderId,null,NX1.Model.Enums.PublicationFormUIVisibilities.Tender).subscribe(t=>{const r=new S.Pe;
1r.viewContainerRef=this.viewContainerRef,this.selectFormRef=this.dialogService.open(ja.d,r),this.selectFormRef.componentInstance.forms=t,this.selectFormRef.componentInstance.isBulgarianConfiguration=this.isBulgarianConfiguration;const i=this.selectFormRef.componentInstance.change.subscribe(s=>{this.createForm(this.tenderInfo.Id,s.form[0].Value)});this.selectFormRef.afterClosed().toPromise().then(()=>{this.selectFormRef=null,i&&i.unsubscribe()}),this.changeDetectorRef.markForCheck()}));else{const t=new S.Pe;t.viewContainerRef=this.viewContainerRef;const r=this.dialogService.open(Na.P,t);r.componentInstance.title="str_Mandatory_status_items_not_completed_title",r.componentInstance.text="str_Mandatory_status_items_not_completed_text",r.componentInstance.explanations=this.tenderStatusItemsPreventingPublication.map(i=>{let s=this.localizationService.instant(i.StatusItem.Name);return 0===i.LotNumber?s=`${s} - ${this.localizationService.instant("str_Tender_common_part_default_name")}`:i.LotNumber>0&&(s=`${s} - ${this.localizationService.instant("str_Tender_lot")} ${i.LotNumber}`),s}),r.componentInstance.explanationTextStyle="text--bold",r.componentInstance.disableConfirm=!0}}OpenNewlyCreatedTenderPublication(t){const r=this.tenderPublications.find(i=>i.Id===t);if(r.PublicationFormType!==NX1.Model.Enums.PublicationFormType.None){const i=new S.Pe;i.width="100vw",i.height="100vh",i.viewContainerRef=this.viewContainerRef,this.tenderPublicationFormComponent=this.dialogService.open(Xa.w,i),this.tenderPublicationFormComponent.componentInstance.tenderPublication=r,this.tenderPublicationFormComponent.componentInstance.publicationAuthorities=this.publicationAuthorities,this.tenderPublicationFormComponent.componentInstance.isPublished=!1,this.tenderPublicationFormComponent.afterClosed().subscribe(()=>{this.tenderPublicationFormComponent=null})}else this.tenderPublicationStoreService.clearNewlyCreatedTenderPublicationId()}createForm(t,r){this.tenderPublicationStoreService.createTenderPublication(t,r,null,[])}openLoader(){this.loader=this.loaderService.openLoader(),this.loader.instance.type="spinner",this.loader.instance.keyword="str_Tender_publication_export"}closeLoader(){this.loaderService.close()}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(S.o3),e.rXU(D.U),e.rXU(T.nX),e.rXU(c.DG2),e.rXU(c.wkP),e.rXU(c.sO9),e.rXU(c.I2c),e.rXU(c.dqT),e.rXU(ue.MB),e.rXU(c.DKw),e.rXU(c.ZCd),e.rXU(c.w9v),e.rXU(e.gRc),e.rXU(c.aVx),e.rXU(c.N49),e.rXU(c.PiF))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-publications"]],inputs:{parentId:"parentId"},features:[e.Jv_([ue.R9,ue.MB]),e.Vt3],decls:26,vars:21,consts:[[1,"nxcard","z1","bg--white"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--uppercase","text--ellipsis"],[4,"ngIf"],[1,"margin--15","text--grey50"],[1,"nxcard","margin--top-20","z1","bg--white"],["class","nxcard__header-options",4,"ngIf"],[1,"nxcard__body","nxcard__body--padding","nxcard__body--no-scroll"],[4,"ngFor","ngForOf"],[1,"align--center","content-center","display--flex","flex-grow--2","full-height","text--grey40a"],[3,"diameter"],[1,"margin--top-20",3,"tender","isBuyer"],[1,"nxcard__header-options"],["mat-button","","color","primary",3,"click","disabled"],[1,"mdi","mdi-add","padding--right-5"],[3,"publishTenderPublication","unpublishTenderPublication","generateTenderPublicationExport","deleteTenderPublication","tenderPublication","publicationAuthorities","isBulgarianConfiguration","isChildTenderPublication"]],template:function(r,i){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()()(),e.DNE(7,Ua,2,2,"ng-container",5),e.j41(8,"h2",6),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"div",7)(12,"div",1)(13,"div",2)(14,"div",3)(15,"span"),e.EFF(16),e.nI1(17,"translate"),e.k0s()()(),e.DNE(18,La,6,7,"div",8),e.k0s(),e.j41(19,"div",9)(20,"div"),e.nI1(21,"async"),e.DNE(22,Aa,2,4,"div",10),e.k0s(),e.j41(23,"div",11),e.nI1(24,"async"),e.nrm(25,"mat-spinner",12),e.k0s()()()),2&r&&(e.R7$(5),e.JRh(e.bMT(6,11,"str_Tender_publication")),e.R7$(2),e.Y8G("ngIf",i.tenderInfo.IsArchived||i.tenderInfo.IsCanceled||i.tenderInfo.IsPaused),e.R7$(2),e.SpI(" ",e.bMT(10,13,"str_Tender_publication_what_and_where_to_publish"),""),e.R7$(7),e.SpI(" ",e.bMT(17,15,"str_Tender_publication")," "),e.R7$(2),e.Y8G("ngIf",i.canAddTenderPublications||(null==i.tenderStatusItemsPreventingPublication?null:i.tenderStatusItemsPreventingPublication.length)>0),e.R7$(2),e.AVh("hide",!e.bMT(21,17,i.isLoaded$)),e.R7$(2),e.Y8G("ngForOf",i.tenderPublications),e.R7$(),e.AVh("hide",e.bMT(24,19,i.isLoaded$)),e.R7$(2),e.Y8G("diameter",60))},dependencies:[p.Sq,p.bT,k.iV,E.wS,Z.x,Va.G,p.Jj,R.D9],styles:["[_nghost-%COMP%]     .small-field{width:100px}[_nghost-%COMP%]     .medium-field{width:300px}[_nghost-%COMP%]     .large-field{width:500px}"]})}}return n})();var Ka=d(91110),qa=d(79045),Wa=d(42957),za=d(64302);function Qa(n,o){1&n&&(e.j41(0,"div",8),e.nrm(1,"nx1-content-loader"),e.k0s())}function Ja(n,o){if(1&n&&e.nrm(0,"nx1-contract-item",10),2&n){const t=o.$implicit,r=o.last,i=e.XpG(3);e.AVh("margin--bottom-15",!r),e.Y8G("contract",t)("canDelete",t.CanDelete)("canSign",t.CanSign)("isAnnex",!1)("isBuyer",!1)("tenderId",i.tender.Id)}}function Ha(n,o){if(1&n&&(e.j41(0,"div",8),e.DNE(1,Ja,1,8,"nx1-contract-item",9),e.k0s()),2&n){const t=o.ngIf,r=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t)("ngForTrackBy",r.trackByFn)}}function Za(n,o){1&n&&(e.j41(0,"div"),e.nrm(1,"nx1-empty-content",11),e.k0s())}function el(n,o){if(1&n&&(e.DNE(0,Ha,2,2,"div",7),e.nI1(1,"async"),e.DNE(2,Za,2,0,"ng-template",null,1,e.C5r)),2&n){const t=e.sdS(3),r=e.XpG();e.Y8G("ngIf",e.bMT(1,2,r.contracts$))("ngIfElse",t)}}let tl=(()=>{class n extends g.$G{constructor(t,r,i,s,a){super(t),this.route=r,this.contractsStoreService=i,this.dialogService=s,this.tenderGuard=a,this.subscriptions=[]}ngOnInit(){this.tender=this.tenderGuard.tenderInfo,this.contractsStoreService.loadContracts(this.tenderGuard.tenderId),this.contracts$=this.contractsStoreService.getContractsWithoutParentId(),this.isLoading$=this.contractsStoreService.getContractsLoading(),this.openContractFromNotification()}ngOnDestroy(){this.contractsStoreService.clearContractState();for(const t of this.subscriptions)t.unsubscribe()}trackByFn(t,r){return r.Id}openContractFromNotification(){this.subscriptions.push(this.route.queryParams.subscribe(t=>{let r=t.contractId,i=!1;r||(r=t.annexId,i=!0),r&&(this.contractRef=this.dialogService.openFullPageOverlay(Ka.a,this.viewContainerRef),this.contractRef.componentInstance.contractId=r,this.contractRef.componentInstance.isAnnex=i,this.contractRef.componentInstance.isBuyer=!1)}))}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(e.c1b),e.rXU(T.nX),e.rXU(c.ArK),e.rXU(S.o3),e.rXU(D.U))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["nx1-tender-supplier-contracts"]],features:[e.Vt3],decls:11,vars:7,consts:[["contentTemplate",""],["emptyContentTemplate",""],[1,"nxcard","bg--white","z1"],[1,"nxcard__header"],[1,"nxcard__header-title"],[1,"nxcard__header-title-content"],[1,"text--ellipsis"],["class","nxcard__body nxcard__body--padding nxcard__body--no-scroll",4,"ngIf","ngIfElse"],[1,"nxcard__body","nxcard__body--padding","nxcard__body--no-scroll"],[3,"contract","canDelete","canSign","isAnnex","isBuyer","tenderId","margin--bottom-15",4,"ngFor","ngForOf","ngForTrackBy"],[3,"contract","canDelete","canSign","isAnnex","isBuyer","tenderId"],["iconClass","mdi-file-hidden","primaryTextKeyword","str_Contract_no_contracts"]],template:function(r,i){if(1&r&&(e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"span",6),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()(),e.DNE(7,Qa,2,0,"div",7),e.nI1(8,"async"),e.DNE(9,el,4,4,"ng-template",null,0,e.C5r),e.k0s()),2&r){const s=e.sdS(10);
1e.R7$(5),e.SpI(" ",e.bMT(6,3,"str_Common_contracts")," "),e.R7$(2),e.Y8G("ngIf",e.bMT(8,5,i.isLoading$))("ngIfElse",s)}},dependencies:[p.Sq,p.bT,qa.G,Wa.o,za.Z,p.Jj,R.D9]})}}return n})();var nl=d(10365);const rl=T.iI.forChild([{path:"",component:_e,canActivate:[F.W],data:{title:"str_Tender_supplier_title"},children:[{path:"",pathMatch:"full",component:Vs,canDeactivate:[nl.o],data:{title:"str_Tender_dashboard"}},{path:"planning",loadChildren:()=>d.e(7330).then(d.bind(d,37330)).then(n=>n.TenderSupplierPlanningModule)},{path:"participants",canActivate:[te],component:go,data:{title:"str_Tender_participants_title"}},{path:"properties",pathMatch:"full",component:Fa,data:{title:"str_Tender_properties"}},{path:"messages",loadChildren:()=>d.e(169).then(d.bind(d,169)).then(n=>n.TenderMessagesModule)},{path:"publication",component:Ya,data:{title:"str_Tender_publication"}},{path:"participations",component:ka,data:{title:"str_Tender_multilot_participants_title"}},{path:"contracts",component:tl,data:{title:"str_Common_contracts"}},{path:":roundId",canActivate:[X.nL],canDeactivate:[X.nL],children:[{path:"requirements/:boxId",component:H,canActivate:[X.XX],canDeactivate:[X.XX],data:{customTitle:!0},children:[{path:"",pathMatch:"full",component:pn},{path:"survey/:surveyLevelId",component:hn}]},{path:"offers/:boxId",component:gn,canActivate:[X.XX,le],canDeactivate:[X.XX],data:{customTitle:!0},children:[{path:"",pathMatch:"full",component:yr,canDeactivate:[g.hf]},{path:"offer/:offerId",component:Ts,children:[{path:"",pathMatch:"full",canActivate:[Se],component:ds},{path:"survey/:surveyLevelId",component:xs,canActivate:[Se],canDeactivate:[Se]}]}]},{path:"auction",loadChildren:()=>d.e(969).then(d.bind(d,10969)).then(n=>n.AuctionModule)}]}]}]),sl=[F.W,le,Se,te];var ol=d(68789),al=d(69306),ll=d(24344),cl=d(78317),dl=d(40166),ul=d(9961),pl=d(52690);let fl=(()=>{class n{static{this.\u0275fac=function(r){return new(r||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({providers:[...sl],imports:[g.Gg,rl,X.CR,ol.y,al.s,ll.D,cl.f,Pe.Vk,dl.H,ul.$,pl.K]})}}return n})()}}]);

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.