1import{b as gn}from"./chunk-W4F2BJ53.js";import{a as Jo}from"./chunk-J5ZM5HE5.js";import{b as Lo,c as Cn,f as Ho,h as Go,i as Wo,j as Yo,o as Ko,p as Xo,r as Zo,s as Pn,t as Sn}from"./chunk-2CFDNA7W.js";import{a as ue}from"./chunk-CG43LB3V.js";import{a as Tt}from"./chunk-FDGA2LKM.js";import{c as ko,e as Ro}from"./chunk-GPCJBQOY.js";import{a as zo}from"./chunk-B7OTDDKK.js";import{c as $o,d as On,e as Uo,f as jo}from"./chunk-LRIGDJIW.js";import{a as hn}from"./chunk-I4BHCL7H.js";import{b as Mn}from"./chunk-57QRRRW2.js";import{b as No,c as lt,d as bn,e as Bt,f as xn,g as yn,h as vn}from"./chunk-U3SSL2BJ.js";import{a as Io}from"./chunk-57SP3FG6.js";import{a as fn}from"./chunk-OEXLWXO3.js";import{r as Do,s as qo}from"./chunk-OPQ562WQ.js";import{a as Bo}from"./chunk-FZAY6I33.js";import{a as Vo}from"./chunk-HNG2XDPE.js";import{a as Po,b as So,c as wo,d as rt}from"./chunk-AGH7KX44.js";import{f as Ao}from"./chunk-LOR5KXA4.js";import{d as Fo,f as Qo}from"./chunk-EZCOJSSD.js";import{a as at}from"./chunk-NR5KS2KR.js";import{m as _n}from"./chunk-637UHKTB.js";import{c as jt}from"./chunk-JUU5HAG3.js";import{i as To}from"./chunk-ZGQ2OYA5.js";import{H as Eo}from"./chunk-VDWXESJF.js";import{A as Ie,Aa as $e,B as rn,Cc as mn,E as lo,F as It,Fa as cn,Ga as go,H as nt,I as it,Jc as yo,N as co,Oc as un,P as ot,R as N,S as me,Sc as vo,Tc as ho,Uc as Oo,aa as so,ba as po,bb as _o,c as pe,ca as an,cd as Mo,e as Je,f as G,fb as dn,g as et,gc as bo,h as ro,ic as pn,k as Ut,ka as mo,kc as xo,m as ne,n as on,o as St,t as ao,va as uo,vb as fo,w as wt,x as tt,xb as Co,y as Se,ya as ln,yb as Et,z as we,za as Ee,zb as sn}from"./chunk-JCOTUPE5.js";import{B as Me,Bc as Ne,Dd as no,Ec as _t,Ed as hi,Fd as io,H as Ui,Ha as Ke,Ib as Ki,Jc as A,Kc as te,L as ji,La as Wi,Md as Re,Nd as tn,P as Ve,Td as Ze,Wd as T,Xd as se,_c as Ji,aa as Zt,da as Xe,ea as Pe,ga as Pt,gb as Jt,gc as ke,ha as $t,id as eo,j as Ot,je as oo,l as de,m as z,n as Li,nd as to,o as Ni,od as en,oe as nn,pa as Hi,qa as zi,qb as Yi,s as ee,sc as Xi,ta as Gi,tc as Zi,ub as Le,v as $i,y as Mt}from"./chunk-TXT3R3MF.js";import{Bc as Z,Cc as U,Cd as Ai,Dc as j,Ea as k,Ec as m,Ed as gt,Fa as ye,Fb as xi,Fc as r,Fd as ce,Gc as a,Gd as Xt,Hb as Ae,Hc as b,Hd as Vi,Ia as q,Ic as qi,Id as vi,Ja as x,Jc as ki,L as H,Lc as R,Mb as Ei,Mc as F,Md as d,Nb as o,Nd as p,Od as Q,Rc as O,Rd as Oe,S as Wt,Sa as f,Ta as C,W as B,Wc as _,Ya as Yt,Yc as s,Zc as Ri,_a as X,_b as D,_c as Fi,aa as bi,ac as yt,ad as De,bd as ge,cd as _e,d as Gt,e as Be,fc as S,ga as Qe,gc as he,gd as oe,ge as qe,ib as wi,ic as vt,id as K,jb as ve,jc as Ti,k as bt,kc as v,lb as Ii,ld as c,mb as Kt,md as u,nd as y,od as J,p as xt,pd as Qi,qa as st,rd as re,sc as Bi,sd as ae,td as le,ua as I,ud as mt,va as pt,vc as yi,vd as ut,wd as Ye,x as Y,xa as L,xc as M,xd as ht,y as xe,yc as Di,zc as P}from"./chunk-PWAHSUDZ.js";import{a as be,b as Fe,d as Ci}from"./chunk-2BAXZMGZ.js";var Dt=class{};var wn=class i{constructor(n,e,t){this.http=n;this.occEndpointsService=e;this.userIdService=t}getOrderHistory(n,e,t,l){return this.userIdService.getUserId().pipe(B(1),I(g=>{let h=this.occEndpointsService.buildUrl("orderHistory",{urlParams:{userId:g},queryParams:Fe(be({},this.buildFilterParams(n)),{currentPage:e,pageSize:t,sort:l,fields:"DEFAULT"})});return this.http.get(h)}))}exportXls(n,e){return this.userIdService.getUserId().pipe(B(1),I(t=>{let l=this.occEndpointsService.buildUrl("orderHistoryExport",{urlParams:{userId:t},queryParams:Fe(be({},this.buildFilterParams(n)),{sort:e})});return this.http.get(l,{responseType:"blob"})}))}buildFilterParams(n){return{initialDate:n.initialDate?this.formatDate(n.initialDate):void 0,finalDate:n.finalDate?this.formatDate(n.finalDate):void 0,orderStatus:n.orderStatus||void 0,orderNumber:n.orderNumber||void 0,clientReferenceNumber:n.clientReferenceNumber||void 0,product:n.product||void 0}}formatDate(n){let[e,t,l]=n.split("-");return`${l}.${t}.${e}`}static{this.\u0275fac=function(e){return new(e||i)(q(Ve),q(Le),q(ke))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var pr=i=>({multiplier:i});
1function mr(i,n){if(i&1&&(qi(0,"div",0),c(1),d(2,"cxTranslate"),ki()),i&2){let e=s();o(),y(" ",Q(2,1,"addToCartComponent.multiplierWarning",ce(4,pr,e.multiplier))," ")}}var En=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-multiplier-warning"]],inputs:{multiplier:"multiplier"},decls:1,vars:1,consts:[[1,"multiplier-warning"]],template:function(e,t){e&1&&M(0,mr,3,6,"div",0),e&2&&P((t.multiplier??0)>1?0:-1)},dependencies:[Me,se,T],styles:["[_nghost-%COMP%]{display:block;margin-top:.5rem;width:fit-content}[_nghost-%COMP%] .multiplier-warning[_ngcontent-%COMP%]{color:#fff;background-color:var(--cx-color-secondary);border-radius:5px;padding:.25rem .5rem}"]})}};var ur=i=>({count:i}),gr=()=>({cxRoute:"supportTickets"}),_r=i=>({cartCode:i});function fr(i,n){if(i&1&&(r(0,"span"),c(1),a(),b(2,"br")),i&2){let e=n.$implicit;o(),u(e)}}function Cr(i,n){if(i&1&&(r(0,"span",12),c(1),d(2,"cxTranslate"),a(),b(3,"br"),U(4,fr,3,1,null,null,Z),b(6,"br")),i&2){s();let e=Ye(0),t=s();o(),y(" ",Q(2,1,"bom.addToCartDialog.errorMessage"+e,ce(4,ur,n))," "),o(3),j(t.errorMessages)}}function br(i,n){i&1&&(r(0,"th"),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),u(p(2,1,"bom.addToCartDialog.lt")))}function xr(i,n){if(i&1&&b(0,"img",14),i&2){let e=s().$implicit;m("src",e.image,Ae)}}function yr(i,n){if(i&1&&(c(0),d(1,"cxDate")),i&2){let e=s(2).$implicit;y(" ",p(1,1,e.requestedDeliveryDate)," ")}}function vr(i,n){if(i&1&&(r(0,"span",17),c(1),d(2,"cxTranslate"),r(3,"a",19),d(4,"cxUrl"),c(5),d(6,"cxTranslate"),a(),c(7),d(8,"cxTranslate"),a()),i&2){let e=s(6);o(),y(" ",p(2,5,"cartItems.leadTimeConfigurator.prefix")," "),o(2),m("routerLink",p(4,7,gt(13,gr)))("queryParams",ce(14,_r,e.cartId)),o(2),y(" ",p(6,9,"cartItems.leadTimeConfigurator.link")," "),o(2),y(" ",p(8,11,"cartItems.leadTimeConfigurator.suffix")," ")}}
1function hr(i,n){if(i&1&&b(0,"bonfiglioli-schedule-lines",18),i&2){let e=s(3).$implicit,t=s(3);m("orderEntry$",t.of(e))}}function Or(i,n){if(i&1&&M(0,vr,9,16,"span",17)(1,hr,1,1,"bonfiglioli-schedule-lines",18),i&2){let e=s(2).$implicit;P(e.configurationAttached?0:1)}}function Mr(i,n){if(i&1&&(r(0,"td"),M(1,yr,2,3),d(2,"async"),Di(3,Or,2,1),a()),i&2){let e=s(4);o(),P(p(2,1,e.isLeadTimeRequestedDate$)?1:3)}}function Pr(i,n){if(i&1&&(r(0,"tr")(1,"td",13),M(2,xr,1,1,"img",14),r(3,"div")(4,"strong"),c(5),a(),r(6,"span",15),c(7),a(),b(8,"bonfiglioli-multiplier-warning",16),a()(),M(9,Mr,4,3,"td"),d(10,"async"),r(11,"td"),c(12),a(),r(13,"td"),c(14),a(),r(15,"td"),c(16),a()()),i&2){let e=n.$implicit,t=s(3);o(2),P(e.image?2:-1),o(3),u(e.name),o(2),u(e.code),o(),m("multiplier",e.kanbanMultiplier),o(),P(p(10,8,t.hasLeadTimeRole$)?9:-1),o(3),u(e.price),o(2),u(e.quantity),o(2),u(e.subtotal)}}function Sr(i,n){if(i&1&&(r(0,"table",8)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),M(6,br,3,3,"th"),d(7,"async"),r(8,"th"),c(9),d(10,"cxTranslate"),a(),r(11,"th"),c(12),d(13,"cxTranslate"),a(),r(14,"th"),c(15),d(16,"cxTranslate"),a()()(),r(17,"tbody"),U(18,Pr,17,10,"tr",null,Z),a()()),i&2){let e=s(2);o(4),u(p(5,5,"bom.addToCartDialog.article")),o(2),P(p(7,7,e.hasLeadTimeRole$)?6:-1),o(3),u(p(10,9,"bom.addToCartDialog.price")),o(3),u(p(13,11,"bom.addToCartDialog.qty")),o(3),u(p(16,13,"bom.addToCartDialog.subtotal")),o(3),j(e.successEntries)}}function wr(i,n){if(i&1){let e=O();r(0,"button",20),_("click",function(){f(e);let l=s(2);return C(l.goToCart())}),c(1),d(2,"cxTranslate"),a()}i&2&&(o(),y(" ",p(2,1,"bom.addToCartDialog.goToCart")," "))}function Ir(i,n){if(i&1){let e=O();mt(0),r(1,"div",1),_("esc",function(){f(e);let l=s();return C(l.close())}),r(2,"div",2)(3,"div",3)(4,"h2",4),c(5),d(6,"cxTranslate"),a(),r(7,"button",5),_("click",function(){f(e);let l=s();return C(l.close())}),r(8,"span",6),b(9,"cx-icon",7),a()()(),M(10,Cr,7,6),M(11,Sr,20,15,"table",8),r(12,"div",9)(13,"button",10),_("click",function(){f(e);let l=s();return C(l.close())}),c(14),d(15,"cxTranslate"),a(),M(16,wr,3,3,"button",11),a()()()}if(i&2){let e,t=s(),l=ut(t.isQuote?"Quote":"");o(5),y(" ",p(6,7,"bom.addToCartDialog.title"+l)," "),o(4),m("type",t.ICON_TYPE.CLOSE),o(),P((e=t.errorMessages.length)?10:-1,e),o(),P(t.successEntries.length>0?11:-1),o(3),y(" ",p(15,9,"bom.addToCartDialog.continueShopping")," "),o(2),P(t.isQuote?-1:16)}}var Tn=class i{constructor(n,e){this.launchDialogService=n;this.routingService=e;this.ICON_TYPE=ot;this.of=xt;this.successEntries=[];this.errorMessages=[];this.visible=!0;this.isQuote=!1;this.shopConfigurationService=x(Ao);this.userRoleService=x(at);this.destroy$=new Gt;this.hasRequestedDateRole$=this.userRoleService.hasRole("REQUESTED_DATE_ENABLED");this.hasLeadTimeRole$=this.userRoleService.hasRole("LEAD_TIME_COLUMN_ENABLED");this.shopConfiguration$=this.shopConfigurationService.getCurrentStoreConfiguration();this.isLeadTimeRequestedDate$=this.shopConfiguration$.pipe(Y(n=>n.leadtimeColumn==="REQUESTED_DATE"))}ngOnInit(){this.launchDialogService.data$.pipe(pt(this.destroy$),L(n=>{if(!n?.result)return;let e=n.result;this.errorMessages=e.quickOrderErrorData?.map(t=>t.errorMsg).filter(Jt)??[],this.successEntries=(e.modifications||[]).filter(t=>t.statusCode==="success").map(t=>({name:t.entry?.product?.name,code:t.entry?.product?.code,image:t.entry?.product?.images?.find(l=>l.format==="cartIcon")?.url,price:t.entry?.basePrice?.formattedValue||this.formatPrice(t.entry?.basePrice)||this.formatPrice(t.entry?.totalPrice),quantity:t.quantityAdded,subtotal:t.entry?.totalPrice?.formattedValue||this.formatPrice(t.entry?.totalPrice),kanbanMultiplier:t.entry?.kanbanMultiplier,requestedDeliveryDate:t.entry?.requestedDeliveryDate,scheduleLines:t.entry?.scheduleLines,configurationAttached:t.entry?.configurationAttached})),this.visible=!0,this.isQuote=n.isQuote??this.isQuote})).subscribe()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}close(){this.visible=!1,this.launchDialogService.closeDialog("")}goToCart(){this.close(),this.routingService.go({cxRoute:"cart"})}formatPrice(n){if(!(!n||n.value==null))return`${n.currencyIso||""} ${n.value.toFixed(2)}`.trim()}static{this.\u0275fac=function(e){return new(e||i)(D($e),D(Ne))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-bom-add-to-cart-dialog"]],inputs:{isQuote:"isQuote"},decls:1,vars:1,consts:[[1,"bom-cart-dialog"],[1,"bom-cart-dialog",3,"esc"],[1,"bom-cart-dialog__content"],[1,"bom-cart-dialog__header"],[1,"bom-cart-dialog__title"],["type","button",1,"close",3,"click"],["aria-hidden","true"],[3,"type"],[1,"bom-cart-dialog__table"],[1,"bom-cart-dialog__actions"],[1,"btn","btn-secondary",3,"click"],[1,"btn","btn-primary"],[1,"bom-cart-dialog__error-msg"],[1,"bom-cart-dialog__article"],["alt","",1,"bom-cart-dialog__article-img",3,"src"],[1,"bom-cart-dialog__article-code"],[3,"multiplier"],[1,"lead-time-configurator-info"],[3,"orderEntry$"],[3,"routerLink","queryParams"],[1,"btn","btn-primary",3,"click"]],template:function(e,t){e&1&&M(0,Ir,17,11,"div",0),e&2&&P(t.visible?0:-1)},dependencies:[En,se,me,N,Pe,jo,T,Ze,ee,Re],styles:[".bom-cart-dialog[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1050;display:flex;align-items:center;justify-content:center;background-color:#00000080;width:100%}.bom-cart-dialog__content[_ngcontent-%COMP%]{background-color:var(--cx-color-light);border-radius:5px;padding:30px 40px;max-width:900px;width:90%;max-height:80vh;overflow-y:auto;position:relative}.bom-cart-dialog__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:10px}.bom-cart-dialog__header[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-size:1.25rem;padding:0}.bom-cart-dialog__title[_ngcontent-%COMP%]{font-size:2rem;font-weight:400;color:var(--cx-color-secondary);margin:0}.bom-cart-dialog__error-msg[_ngcontent-%COMP%]{font-size:.875rem;color:var(--bf-color-dark-grey);margin-bottom:20px}.bom-cart-dialog__table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;margin-bottom:30px}.bom-cart-dialog__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--cx-color-primary);padding:10px 8px;border-bottom:2px solid var(--bf-color-grey-border);text-align:left}.bom-cart-dialog__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.875rem;padding:12px 8px;border-bottom:1px solid var(--bf-color-grey-border);vertical-align:middle}.bom-cart-dialog__article[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.bom-cart-dialog__article-img[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain}.bom-cart-dialog__article-code[_ngcontent-%COMP%]{display:block;font-size:.75rem;color:var(--bf-color-grey)}.bom-cart-dialog__actions[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:20px}.bom-cart-dialog__actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{min-width:180px;text-transform:uppercase;font-size:.875rem;font-weight:600;border-radius:5px;padding:8px 32px;line-height:1.42857143;cursor:pointer}.bom-cart-dialog__actions[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{color:var(--cx-color-light);background-color:var(--cx-color-secondary);border:2px solid var(--cx-color-secondary)}.bom-cart-dialog__actions[_ngcontent-%COMP%] .btn-secondary[_ngcontent-%COMP%]{color:var(--cx-color-primary);background-color:var(--cx-color-light);border:2px solid var(--cx-color-primary)}"]})}};Ee.LIGHTBOX_MODAL="LIGHTBOX_MODAL";Ee.BOM_ADD_TO_CART="BOM_ADD_TO_CART";Ee.QUICK_ORDER_ADD_TO_CART="QUICK_ORDER_ADD_TO_CART";Ee.MATERIAL_SEARCH="MATERIAL_SEARCH";var cs={launch:{LIGHTBOX_MODAL:{inline:!0,component:zo,dialogType:ln.DIALOG}}};var Ue=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({imports:[Me,se,me]})}};var Bn=class i extends eo{loadProductsByFamilyCode(n,e="",t=""){let l=this.occEndpoints.buildUrl("productSearch",{urlParam
1s:{familyCode:n,standard:e,efficiency:t},scope:"family"});return this.http.get(l)}quickSearch(n,e,t,l,g){return this.http.get(this.occEndpoints.buildUrl("productSearch",{urlParams:{query:n,currentPage:e,pageSize:t,sort:l,searchQueryContext:g},scope:"quickSearch"})).pipe(this.converter.pipeable(ko))}getSelectorResults(n,e,t=0,l,g){let h=this.occEndpoints.buildUrl("productSearch",{scope:"getSelectorResults"}),E=new ji().set("page",t.toString());return n&&(E=E.set("q",n)),e&&(E=E.set("kbCode",e)),l&&(E=E.set("sort",l)),g&&(E=E.set("unit",g)),this.http.get(h,{params:E})}static{this.\u0275fac=(()=>{let n;return function(t){return(n||(n=ve(i)))(t||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Dn=class i extends nn{constructor(){super(...arguments);this.productAdapter=x(Bn)}getProductsByFamilyCode(e,t,l){return this.productAdapter.loadProductsByFamilyCode(e,t,l)}getQuickSearch(e,t,l,g,h){return e?this.productAdapter.quickSearch(e,t,l,g,h):bt}getSelectorResults(e,t,l,g,h){return this.productAdapter.getSelectorResults(e,t,l,g,h)}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=ve(i)))(l||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var qn=class i extends Ji{constructor(e,t,l){super(e,t,l);this.http=e;this.occEndpoints=t;this.converter=l;this.userIdService=x(ke)}getProductAttributesForProductList(e){return this.http.get(this.occEndpoints.buildUrl("cms",{urlParams:{componentId:e},scope:"productAttributesForProductList"})).pipe(Y(t=>t??[]),this.converter.pipeableMany(Ro))}static{this.\u0275fac=function(t){return new(t||i)(q(Ve),q(Le),q(Ki))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var kn=class i extends po{constructor(){super(...arguments);this.cmsComponentAdapter=x(qn);this.productAttributesCache=new Map}getProductAttributesForProductList(e){let t=e.trim(),l=this.productAttributesCache.get(t);if(l)return l;let g=this.cmsComponentAdapter.getProductAttributesForProductList(t).pipe(st(1));return this.productAttributesCache.set(t,g),g}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=ve(i)))(l||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};function Er(i,n){if(i&1){let e=O();r(0,"button",2),_("click",function(){f(e);let l=s();return C(l.changeBookmark())}),b(1,"cx-icon",3),a()}if(i&2){let e=s();o(),m("type",e.bfIconTypes.STAR_FULL)}}function Tr(i,n){if(i&1){let e=O();r(0,"button",2),_("click",function(){f(e);let l=s();return C(l.changeBookmark())}),b(1,"cx-icon",3),a()}if(i&2){let e=s();o(),m("type",e.bfIconTypes.STAR_EMPTY)}}var je=class i{constructor(){this.authService=x(_t);this.bookmarkService=x(Lo);this.changeDetectorRef=x(qe);this.bookmarkCode="";this.bookmarkChanged=new X;this.state=new X;this.bfIconTypes=ue;this._isFavorite=!1}get isFavorite(){return this._isFavorite}setFavoriteState(n){this._isFavorite=n,this.state.emit(n),this.refreshView()}ngOnInit(){this.authService.isUserLoggedIn().pipe(B(1),H(n=>n)).subscribe(()=>{this.type==="PRODUCT"?this.doStateUpdate(this.code):this.doStateUpdate()})}changeBookmark(){let n=this._isFavorite,e=!this._isFavorite;this._isFavorite=e,this.state.emit(e),this.refreshView();let t={itemType:this.type,itemCode:this.code,bookmarkCode:this.bookmarkCode,value:e};this.bookmarkService.changeBookmark(t).pipe(B(1)).subscribe({next:()=>{this.bookmarkChanged.emit(e)},error:()=>{this._isFavorite=n,this.state.emit(n),this.refreshView()}})}doStateUpdate(n){if(n)return this.doStateUpdateInternal(n);if(this.bookmarkCode)return this.doStateUpdateInternal(this.bookmarkCode);this.bookmarkService.getBookmarkCode(this.type.toLowerCase(),this.code).pipe(B(1),L(e=>{if(this.bookmarkCode=e,e)return this.doStateUpdateInternal(e);this._isFavorite=!1,this.state.emit(!1),this.refreshView()})).subscribe()}doStateUpdateInternal(n){this.bookmarkService.getBookmarkState(this.type,n).pipe(L(e=>{this._isFavorite=e,this.state.emit(e),this.refreshView()})).subscribe()}refreshView(){this.changeDetectorRef.detectChanges()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-favorites"]],inputs:{type:"type",code:"code",bookmarkCode:"bookmarkCode"},outputs:{bookmarkChanged:"bookmarkChanged",state:"state"},standalone:!1,decls:3,vars:1,consts:[[1,"bf-favorites"],[1,"bf-favorites__button"],[1,"bf-favorites__button",3,"click"],[3,"type"]],template:function(e,t){e&1&&(r(0,"div",0),M(1,Er,2,1,"button",1)(2,Tr,2,1,"button",1),a()),e&2&&(o(),P(t.isFavorite?1:2))},dependencies:[N],styles:[".bf-favorites__button[_ngcontent-%COMP%]{border:0;background-color:transparent}"]})}};var qt=class i extends un{constructor(e,t,l,g,h,E,ie){super(e,t,l,g,h,E,ie);this.productSearchService=e;this.routing=t;this.activatedRoute=l;this.currencyService=g;this.languageService=h;this.router=E;this.config=ie;this.searchResults$=this.productSearchService.getResults().pipe(H(e=>Object.keys(e).length>0),L(()=>this.storeSearchPageUrl()));let Te=e.search.bind(e);e.search=(We,zt)=>{if(!(this.activatedRoute.snapshot.queryParams.context&&We&&!We.includes(":searchQueryContext:")&&!We.includes(":SEARCHCATEGORIES")))return Te(We,zt)}}storeSearchPageUrl(){sessionStorage.setItem(Io,globalThis.location.pathname)}getCriteriaFromRoute(e,t){let l={codes:":searchQueryContext:SEARCHCODES",series:":searchQueryContext:SEARCHSERIES",categories:":searchQueryContext:SEARCHCATEGORIES"},g;return e.query&&t.context?t.query?g=t.query+(l[t.context]||""):g=e.query+(l[t.context]||""):g=t.query||this.getQueryFromRouteParam
1s(e),console.log("query: ",g),{query:g,pageSize:t.pageSize||this.config.view?.defaultPageSize,currentPage:t.currentPage,sortCode:t.sortCode}}getQueryFromRouteParams({query:e,categoryCode:t,brandCode:l}){if(console.log("getQueryFromRouteParams"),e)return e;if(t)return this.RELEVANCE_ALLCATEGORIES+t;if(l)return this.RELEVANCE_ALLCATEGORIES+l}searchIfCriteriaHasChanged(e){this.productSearchService.getResults().pipe(B(1)).subscribe(t=>{let l={query:t?.currentQuery?.query?.value,currentPage:t?.pagination?.currentPage,pageSize:t?.pagination?.pageSize,sortCode:t?.pagination?.sort};(g()||h()||E()||ie())&&this.search(e);function g(){let Te=zt(l.query,l.sortCode),We=zt(e.query,e.sortCode);return Te!==We;function zt(Ct,fi){let Si="relevance";return Ct=Ct?.replace(":"+Si,"").replace(Si,""),fi&&(Ct=Ct?.replace(":"+fi,"").replace(fi,"")),Ct}}function h(){return(l.currentPage&&l.currentPage>0?l.currentPage:void 0)?.toString()!==e.currentPage?.toString()}function E(){return l.pageSize?.toString()!==e.pageSize?.toString()}function ie(){return(e.sortCode?l?.sortCode:void 0)?.toString()!==e.sortCode?.toString()}})}static{this.\u0275fac=function(t){return new(t||i)(q(oo),q(Ne),q(Zt),q(en),q(to),q(Xe),q(mn))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Dr=["*"];function qr(i,n){if(i&1&&(r(0,"span",5),c(1),d(2,"cxTranslate"),a()),i&2){let e=s();o(),u(p(2,1,e.triggerLabel))}}function kr(i,n){if(i&1&&b(0,"cx-icon",6),i&2){let e=s();m("type",e.isOpen?"CARET_UP":"CARET_DOWN")}}function Rr(i,n){i&1&&Fi(0)}function Fr(i,n){if(i&1){let e=O();r(0,"li")(1,"a",11),_("click",function(l){let g=f(e).$implicit,h=s(3);return C(h.onOptionClick(g,l))}),c(2),d(3,"cxTranslate"),a()()}if(i&2){let e=n.$implicit;o(),m("href",e.href||"#",Ae),o(),y(" ",p(3,2,e.labelKey)," ")}}function Qr(i,n){if(i&1&&(r(0,"ul"),U(1,Fr,4,4,"li",null,Z),a()),i&2){let e=s(2);o(),j(e.options)}}function Ar(i,n){if(i&1){let e=O();r(0,"div",7),_("click",function(){f(e);let l=s();return C(l.onToggle())}),a(),r(1,"div",8)(2,"button",9),_("click",function(){f(e);let l=s();return C(l.onToggle())}),b(3,"cx-icon",10),a(),M(4,Rr,1,0),M(5,Qr,3,0,"ul"),a()}if(i&2){let e=s();o(4),P(e.useCustomContent?4:-1),o(),P(e.options.length>0?5:-1)}}var He=class i{constructor(n){this.elementRef=n;this.isOpen=!1;this.options=[];this.triggerIcon="LIST";this.useCustomContent=!1;this.triggerLabel="";this.showCaret=!1;this.variant="default";this.toggle=new X}onToggle(){this.toggle.emit()}onOptionClick(n,e){e.preventDefault(),n.action(e),this.onToggle()}onClickOutside(n){if(!this.isOpen)return;this.elementRef.nativeElement.contains(n.target)||this.onToggle()}static{this.\u0275fac=function(e){return new(e||i)(D(Ii))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-dropdown"]],hostBindings:function(e,t){e&1&&_("click",function(g){return t.onClickOutside(g)},Ei)},inputs:{isOpen:"isOpen",options:"options",triggerIcon:"triggerIcon",useCustomContent:"useCustomContent",triggerLabel:"triggerLabel",showCaret:"showCaret",variant:"variant",cart:"cart"},outputs:{toggle:"toggle"},standalone:!1,ngContentSelectors:Dr,decls:6,vars:5,consts:[[1,"bonfiglioli-dropdown",3,"ngClass"],[1,"dropdown-trigger",3,"click"],[3,"type"],["class","dropdown-trigger__label",4,"ngIf"],["class","dropdown-trigger__caret",3,"type",4,"ngIf"],[1,"dropdown-trigger__label"],[1,"dropdown-trigger__caret",3,"type"],[1,"dropdown-backdrop",3,"click"],[1,"dropdown-content"],[1,"close-btn",3,"click"],["type","CLOSE"],[3,"click","href"]],template:function(e,t){e&1&&(Ri(),r(0,"div",0)(1,"button",1),_("click",function(){return t.onToggle()}),b(2,"cx-icon",2),v(3,qr,3,3,"span",3)(4,kr,1,1,"cx-icon",4),a(),M(5,Ar,6,2),a()),e&2&&(m("ngClass","variant-"+t.variant),o(2),m("type",t.triggerIcon),o(),m("ngIf",t.triggerLabel),o(),m("ngIf",t.showCaret),o(),P(t.isOpen?5:-1))},dependencies:[Ot,z,N,T],styles:[".bonfiglioli-dropdown[_ngcontent-%COMP%]{position:relative;display:inline-block}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger[_ngcontent-%COMP%]{border:0;border-radius:5px;background-color:transparent;color:var(--cx-color-primary);width:auto;height:32px;
1cursor:pointer;display:flex;align-items:center;gap:6px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger[_ngcontent-%COMP%]:focus{border:2px solid var(--cx-color-category-scroll-buttons-focus)}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{padding:2px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger__label[_ngcontent-%COMP%]{font-size:.875rem;white-space:nowrap}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger__caret[_ngcontent-%COMP%]{font-size:.625rem}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-backdrop[_ngcontent-%COMP%]{display:none}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute;right:0;top:100%;background-color:var(--cx-color-light);box-shadow:0 6px 12px #0000002d;min-width:150px;z-index:100;border-radius:8px;margin-right:16px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{display:none}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{padding:24px 32px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{white-space:nowrap;font-size:.75rem}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:16px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;cursor:pointer;display:flex;align-items:center}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.bonfiglioli-dropdown.variant-secondary[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--cx-color-secondary)}.bonfiglioli-dropdown.variant-secondary[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--cx-color-primary)}@media(max-width:767px){.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger__label[_ngcontent-%COMP%], .bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-trigger__caret[_ngcontent-%COMP%]{display:none}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-backdrop[_ngcontent-%COMP%]{display:block;position:fixed;inset:0;background-color:#00000080;z-index:999;animation:fadeIn .3s ease-out}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:fixed;inset:auto 0 0;width:100vw;max-width:100vw;border-radius:24px 24px 0 0;padding:48px 24px;z-index:1000;animation:slideUp .3s ease-out}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{display:block;position:absolute;top:16px;right:16px;border:0;background:transparent;color:var(--cx-color-primary);cursor:pointer;width:32px;height:32px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]:focus{outline:2px solid black}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:40px;padding:0 16px}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:8px 0;border-bottom:1px solid var(--cx-color-medium);margin-bottom:0!important}.bonfiglioli-dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}}"]})}};var Fn=class{};var Rt=class i{constructor(n){this.adapter=n;
1this.pageDataSubject=new Be(null);this.pageData$=this.pageDataSubject.asObservable();this.kbCodeSubject=new Be(null);this.kbCode$=this.kbCodeSubject.asObservable();this.unitSubject=new Be(null);this.unit$=this.unitSubject.asObservable();this.referencesSubject=new Be([]);this.references$=this.referencesSubject.asObservable();this.applicationParamsSubject=new Be(null);this.applicationParams$=this.applicationParamsSubject.asObservable()}loadSelectorResults(n,e,t,l,g){return this.lastQuery=n,this.lastKbCode=e,this.lastPage=t,this.lastSort=l,this.lastUnit=g,this.adapter.getSelectorResults(n,e,t,l,g).pipe(L(h=>{this.pageDataSubject.next(h),e!==void 0&&this.kbCodeSubject.next(e??null),h.systemOfMeasurement&&this.unitSubject.next(h.systemOfMeasurement)}))}reloadCurrentResults(){return this.loadSelectorResults(this.lastQuery,this.lastKbCode,this.lastPage,this.lastSort,this.lastUnit)}loadSelectorReferences(n){return this.adapter.getSelectorReferences(n).pipe(L(e=>this.referencesSubject.next(e)))}loadAvailableProducts(n,e,t,l,g){return this.adapter.getAvailableProducts(n,e,t,l,g)}get selectorCategories(){return this.pageDataSubject.value?.selectorCategories??[]}get selectorCategory(){return this.pageDataSubject.value?.selectorCategory}get totalResults(){return this.pageDataSubject.value?.pagination?.totalResults??0}get hasData(){return this.pageDataSubject.value!==null}setApplicationParams(n){this.applicationParamsSubject.next(n)}reset(){this.pageDataSubject.next(null),this.kbCodeSubject.next(null),this.unitSubject.next(null),this.applicationParamsSubject.next(null)}getConfigurationFromDesignation(n,e){return this.adapter.getConfigurationFromDesignation(n,e)}getConfigurationFromBookmark(n,e){return this.adapter.getConfigurationFromBookmark(n,e)}getConfigurationFromSmartsizer(n,e,t,l,g,h,E){return this.adapter.getConfigurationFromSmartsizer(n,e,t,l,g,h,E)}static{this.\u0275fac=function(e){return new(e||i)(q(Fn))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Qn=class{};var An=class i{constructor(n){this.adapter=n}getUserContacts(){return this.adapter.getUserContacts()}static{this.\u0275fac=function(e){return new(e||i)(q(Qn))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Vn=class{};var Ln=class i{constructor(){this.adapter=x(Vn);this.datePipe=x(Ze);this.DATE_FORMAT="dd.MM.yyyy"}getWorkspaceConfigs(n,e){return this.adapter.getWorkspaceConfigs(n,e)}getWorkspaceFavorites(n,e){return this.adapter.getWorkspaceFavorites(n,e)}getWorkspaceCarts(n,e){return this.adapter.getWorkspaceCarts(n,e)}getWorkspaceMessages(n){return this.adapter.getWorkspaceMessages(n)}sendMessage(n,e){return this.adapter.sendMessage(n,e)}getInitialDateFilter(){let n=new Date;return n.setDate(n.getDate()-30),this.datePipe.transform(n,this.DATE_FORMAT)??void 0}getFinalDateFilter(){return this.datePipe.transform(new Date,this.DATE_FORMAT)??void 0}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};function $r(i,n){if(i&1&&(r(0,"option",13),c(1),a()),i&2){let e=n.$implicit;m("value",e.uid),o(),u(e.name)}}function Ur(i,n){if(i&1&&(r(0,"select",9),U(1,$r,2,2,"option",13,Z),a()),i&2){let e=s();o(),j(e.userList)}}var Nn=class i{constructor(n,e,t){this.fb=n;this.messageService=e;this.userIdService=t;this.closeModal=new X;this.userId=""}ngOnInit(){this.messageForm=this.fb.group({receiver:[""],message:[""]}),this.userIdService.getUserId().pipe(B(1)).subscribe(n=>{this.userId=n})}close(){document.body.classList.remove("no-scroll"),this.closeModal.emit()}sendMessage(){let n=this.messageForm.value,e={receiver:n.receiver,message:n.message,attachmentCode:this.code,attachmentType:"CART"};this.messageService.sendMessage(e,this.userId).subscribe({next:()=>{console.log("Message sent successfully \u2705"),this.close()},error:t=>{console.error("Error sending message \u274C",t)}})}static{this.\u0275fac=function(e){return new(e||i)(D(It),D(Ln),D(ke))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-send-message-modal"]],inputs:{userList:"userList",cartId:"cartId",code:"code"},outputs:{closeModal:"closeModal"},standalone:!1,decls:34,vars:18,consts:[[1,"modal"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],[3,"click"],["type","CLOSE"],[3,"ngSubmit","formGroup"],[1,"modal-body"],[1,"row"],["formControlName","receiver"],["formControlName","message"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary"],[3,"value"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h4"),c(5),d(6,"cxTranslate"),a()(),r(7,"button",4),_("click",function(){return t.close()}),b(8,"cx-icon",5),a()(),r(9,"form",6),_("ngSubmit",function(){return t.sendMessage()}),r(10,"div",7)(11,"div",8)(12,"h3"),c(13),d(14,"cxTranslate"),a(),M(15,Ur,3,0,"select",9),a(),r(16,"div",8)(17,"h3"),c(18),d(19,"cxTranslate"),a(),b(20,"textarea",10),a(),r(21,"div",8)(22,"h3"),c(23),d(24,"cxTranslate"),a(),r(25,"pre"),c(26," "),r(27,"a"),c(28),a(),c(29,` 2 `),a()()(),r(30,"div",11)(31,"button",12),c(32),d(33,"cxTranslate"),a()()()()()),e&2&&(o(5),u(p(6,8,"workspace.modal.title")),o(4),m("formGroup",t.messageForm),o(4),u(p(14,10,"workspace.modal.contactList")),o(2),P(t.userList?15:-1),o(3),u(p(19,12,"workspace.modal.message")),o(5),u(p(24,14,"workspace.modal.attachment")),o(5),u(t.code),o(4),u(p(33,16,"workspace.modal.sendButton")))},dependencies:[on,we,Ie,pe,Se,G,et,tt,wt,N,T],styles:[".modal[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;box-shadow:0 5px 15px var(--cx-color-box-shadow)}
2.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%]{background-color:var(--cx-color-light);opacity:1;z-index:11;height:fit-content;border-radius:5px;max-height:90%;margin:30px 0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%]{border:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--cx-color-primary);font-size:2rem;line-height:1;padding:15px;margin:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:32px;height:32px;color:var(--cx-color-category-scroll-buttons);background-color:var(--cx-color-light);border:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{font-size:1.5rem}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{padding:30px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin:0;flex-direction:column;border:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:.875rem;line-height:1;margin-top:20px;margin-bottom:10px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.5;background-color:var(--bf-color-light-blue-lighter);text-transform:uppercase;padding:9px 16px;border:1px solid var(--cx-color-medium);border-radius:5px;box-shadow:inset 0 1px 1px #00000013}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{border-color:var(--bf-color-light-blue);box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{height:100px;border:1px solid var(--cx-color-medium);border-radius:5px;padding:10px 16px;box-shadow:inset 0 1px 1px #00000013}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999;border-color:var(--bf-color-light-blue)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{font-size:1rem;font-family:monospace,monospace;border:1px solid var(--bf-color-grey-border);background-color:var(--bg-color-grey-lighter);padding:10px;margin:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-weight:600}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{justify-content:center;border-top:0px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.42857143;font-weight:600;padding:8px 32px}@media(min-width:768px){.modal-content[_ngcontent-%COMP%]{width:600px;margin:30px auto}}@media(min-width:640px){.modal-content[_ngcontent-%COMP%]{width:600px;margin:30px auto}}"]})}};
2function Hr(i,n){if(i&1){let e=O();r(0,"bonfiglioli-send-message-modal",2),_("closeModal",function(){f(e);let l=s();return C(l.closeModal())}),a()}if(i&2){let e=s();m("userList",n)("code",e.code)}}var Ft=class i{constructor(){this.configuratorCommonService=x(Cn);this.routingService=x(Ne);this.selectorService=x(Rt);this.userService=x(An);this.isDropdownOpen=!1;this.isUserLoggedIn=!1;this.completeConfiguration=!1;this.toggle=new X;this.userList$=this.userService.getUserContacts();this.bfIconTypes=ue;this.isModalOpen=!1;this.allDropdownOptions=[{labelKey:"product-search.viewProduct",action:()=>this.viewProductPage()},{labelKey:"availableProducts.completeConfiguration",action:()=>this.getCompleteConfiguration()},{labelKey:"product-search.addFavourites",action:()=>this.changeBookmark()},{labelKey:"product-search.removeFavourites",action:()=>this.changeBookmark()},{labelKey:"product-search.sendTo",action:()=>this.isModalOpen=!0}]}changeBookmark(){this.favoritesComponent?.changeBookmark()}closeModal(){this.isModalOpen=!1}toggleSecondaryActions(){this.isDropdownOpen=!this.isDropdownOpen,this.toggle.emit()}viewProductPage(){if(!this.code){console.error("Invalid product code");return}let n=this.resolvePdpCode();this.routingService.go({cxRoute:"product",params:{code:n}})}getCompleteConfiguration(){if(!this.productCode||!this.designation){console.error("Cannot load complete configuration: missing productCode or designation");return}this.configuration=this.selectorService.getConfigurationFromDesignation(this.productCode,this.designation),this.configuration.pipe(B(1)).subscribe(n=>{this.configuratorCommonService.navigateToConfiguratorForCode(this.productCode,n.configId)})}getDropdownOptions(){if(!this.canManageBookmarks())return this.getLoggedOutOptions();let n=this.favoritesComponent?.isFavorite===!0;return this.buildDropdownOptions(!0,n)}buildDropdownOptions(n,e){let t=[this.allDropdownOptions[0]];return n&&(this.completeConfiguration&&t.push(this.allDropdownOptions[1]),t.push(e?this.allDropdownOptions[3]:this.allDropdownOptions[2],this.allDropdownOptions[4])),t}getLoggedOutOptions(){return[this.allDropdownOptions[0],...this.completeConfiguration?[this.allDropdownOptions[1]]:[]]}canManageBookmarks(){return!!(this.type&&this.code&&this.isUserLoggedIn)}resolvePdpCode(){return this.type==="CONFIGURATION"&&this.productCode?this.productCode:this.completeConfiguration&&this.productCode?this.productCode:this.code}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-secondary-actions"]],inputs:{code:"code",type:"type",isDropdownOpen:"isDropdownOpen",isUserLoggedIn:"isUserLoggedIn",completeConfiguration:"completeConfiguration",productCode:"productCode",designation:"designation",favoritesComponent:"favoritesComponent"},outputs:{toggle:"toggle"},standalone:!1,decls:3,vars:6,consts:[[3,"toggle","isOpen","options","triggerIcon"],[3,"userList","code"],[3,"closeModal","userList","code"]],template:function(e,t){if(e&1&&(r(0,"bonfiglioli-dropdown",0),_("toggle",function(){return t.toggleSecondaryActions()}),a(),M(1,Hr,1,2,"bonfiglioli-send-message-modal",1),d(2,"async")),e&2){let l;m("isOpen",t.isDropdownOpen)("options",t.getDropdownOptions())("triggerIcon",t.bfIconTypes.DOTS),o(),P((l=t.isModalOpen&&p(2,4,t.userList$))?1:-1,l)}},dependencies:[He,Nn,ee],encapsulation:2})}};var ir=()=>[],nr=i=>({cxRoute:"product",params:i});function Gr(i,n){if(i&1&&(r(0,"option",11),c(1),d(2,"cxTranslate"),a()),i&2){let e=n.$implicit;m("value",e.value),o(),y(" ",p(2,2,e.label)," ")}}function Wr(i,n){if(i&1&&(r(0,"option",11),c(1),d(2,"cxTranslate"),a()),i&2){let e=n.$implicit;m("value",e.value),o(),y(" ",p(2,2,e.label)," ")}}function Yr(i,n){i&1&&b(0,"th")}function Kr(i,n){i&1&&(r(0,"th",17),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),y(" ",p(2,1,"product-search.availability")," "))}function Xr(i,n){if(i&1&&(r(0,"th"),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.title," ")}}
2function Zr(i,n){if(i&1&&M(0,Xr,2,1,"th"),i&2){let e=n.$implicit,t=s(3);P(e.measurementSystem==null||e.measurementSystem==t.systemOfMeasurement?0:-1)}}function Jr(i,n){if(i&1&&(r(0,"td"),b(1,"bonfiglioli-favorites",24),a()),i&2){let e=s().$implicit;o(),m("type","PRODUCT")("code",e.code??"")}}function ea(i,n){if(i&1&&(r(0,"td",17),b(1,"bonfiglioli-product-availability",25),a()),i&2){let e=s().$implicit;o(),m("product",e)("show",!0)}}function ta(i,n){if(i&1&&(r(0,"td",26),c(1),a()),i&2){let e=s().$implicit,t=s().$implicit,l=s(3);o(),y(" ",l.getProductAttributeValue(t,e.qualifier)," ")}}function na(i,n){if(i&1&&M(0,ta,2,1,"td",26),i&2){let e=n.$implicit,t=s(4);P(e.measurementSystem==null||e.measurementSystem==t.systemOfMeasurement?0:-1)}}function ia(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",18)(2,"a",19),d(3,"cxUrl"),b(4,"cx-media",20),a()(),r(5,"td",21)(6,"div")(7,"span")(8,"a",19),d(9,"cxUrl"),c(10),a()(),r(11,"p"),c(12),a()()(),M(13,Jr,2,2,"td"),M(14,ea,2,2,"td",17),U(15,na,1,1,null,null,Z),r(17,"td",22)(18,"bonfiglioli-secondary-actions",23),_("toggle",function(){let l=f(e).$index,g=s(3);return C(g.toggleSecondaryActions(l))}),a()()()}if(i&2){let e=n.$implicit,t=n.$index,l=s(3),g=Ye(1),h=Ye(3);o(2),m("routerLink",p(3,12,ce(16,nr,e))),o(2),m("container",e.images),o(4),m("routerLink",p(9,14,ce(18,nr,e))),o(2),u(e.name),o(2),u(e.code),o(),P(l.isUserLoggedIn?13:-1),o(),P(g&&(g.roles!=null&&g.roles.includes("AVAILABILITY_ENABLED"))?14:-1),o(),j(h??gt(20,ir)),o(3),m("isDropdownOpen",l.openDropdown[t])("code",e.code)("type","PRODUCT")("isUserLoggedIn",l.isUserLoggedIn)("favoritesComponent",l.getFavoritesComponent(e.code))}}function oa(i,n){if(i&1&&(r(0,"div",14)(1,"table")(2,"thead")(3,"tr",16),b(4,"th"),r(5,"th"),c(6),d(7,"cxTranslate"),a(),M(8,Yr,1,0,"th"),M(9,Kr,3,3,"th",17),U(10,Zr,1,1,null,null,Z),a()(),r(12,"tbody"),U(13,ia,19,21,"tr",null,Z),a()()()),i&2){let e=s(2),t=Ye(1),l=Ye(3);o(6),u(p(7,3,"product-search.designation")),o(2),P(e.isUserLoggedIn?8:-1),o(),P(t&&(t.roles!=null&&t.roles.includes("AVAILABILITY_ENABLED"))?9:-1),o(),j(l??gt(5,ir)),o(3),j(e.visibleProducts)}}function ra(i,n){i&1&&(r(0,"div",15)(1,"h2"),c(2),d(3,"cxTranslate"),a()()),i&2&&(o(2),u(p(3,1,"product-search.noResults")))}function aa(i,n){if(i&1){let e=O();r(0,"div",1)(1,"div",3)(2,"h4"),c(3),d(4,"cxTranslate"),a(),r(5,"button",4),_("click",function(){f(e);let l=s();return C(l.close())}),b(6,"cx-icon",5),a()(),r(7,"div",6)(8,"div",7)(9,"div",8)(10,"label",9),c(11),d(12,"cxTranslate"),a(),r(13,"select",10),le("ngModelChange",function(l){f(e);let g=s();return ae(g.selectedEfficiency,l)||(g.selectedEfficiency=l),C(l)}),_("change",function(){f(e);let l=s();return C(l.onFilterChanged())}),U(14,Gr,3,4,"option",11,Z),a()(),r(16,"div",8)(17,"label",12),c(18),d(19,"cxTranslate"),a(),r(20,"select",13),le("ngModelChange",function(l){f(e);let g=s();return ae(g.selectedStandard,l)||(g.selectedStandard=l),C(l)}),_("change",function(){f(e);let l=s();return C(l.onFilterChanged())}),U(21,Wr,3,4,"option",11,Z),a()()(),M(23,oa,15,6,"div",14)(24,ra,4,3,"div",15),a()()}if(i&2){let e=s();o(3),u(p(4,6,"product-search.modalTitle")),o(8),u(p(12,8,"product-search.efficiencyLabel")),o(2),re("ngModel",e.selectedEfficiency),o(),j(e.efficiencyOptions),o(4),u(p(19,10,"product-search.standardLabel")),o(2),re("ngModel",e.selectedStandard),o(),j(e.standardOptions),o(2),P(e.visibleProducts.length>0?23:24)}}var $n=class i{constructor(n){this.cdr=n;this.visible=!1;this.systemOfMeasurement="";this.closeModal=new X;this.allProducts=[];this.visibleProducts=[];this.openDropdown=[];this.bfIconTypes=ue;this.isUserLoggedIn=!1;this.favoritesComponents=new Kt;this.authService=x(_t);this.userAccountFacade=x(jt);this.productOptions=[{labelKey:"product-search.viewProduct",action:()=>console.log("View")},{labelKey:"product-search.addFavourites",action:()=>console.log("Add")},{labelKey:"product-search.removeFavourites",action:()=>console.log("Remove")},{labelKey:"product-search.sendTo",action:()=>console.log("Send")}];this.efficiencyOptions=[{label:"product-search.empty",value:""},{label:"product-search.efficiencyIe1",value:"IE1"},{label:"product-search.efficiencyIe2",value:"IE2"},{label:"product-search.efficiencyIe3",value:"IE3"},{label:"product-search.efficiencyIe4",value:"IE4"}];this.selectedEfficiency="";this.standardOptions=[{label:"product-search.empty",value:""},{label:"product-search.compact",value:"COMPACT"},{label:"product-search.iec",value:"IEC"}];this.selectedStandard=""}ngOnInit(){this.familyProducts?.subscribe(n=>{this.allProducts=n,this.visibleProducts=[...n],this.cdr.detectChanges(),this.openDropdown=Array(n.length).fill(!1)}),document.body.classList.add("no-scroll"),this.authService.isUserLoggedIn().pipe(Qe(),L(n=>{this.isUserLoggedIn=n,n&&(this.b2bUser$=this.userAccountFacade.get())})).subscribe()}toggleSecondaryActions(n){this.openDropdown[n]=!this.openDropdown[n]}ngOnDestroy(){document.body.classList.remove("no-scroll")}close(){this.visible=!1,document.body.classList.remove("no-scroll"),this.closeModal.emit()}getPrimaryImage(n){return n.images?.find(e=>e.imageType==="PRIMARY")?.url||"assets/no-image.png"}onFilterChanged(){this.visibleProducts=this.allProducts.filter(n=>{let e=!this.selectedEfficiency||n.efficiency?.code===this.selectedEfficiency,t=!this.selectedStandard||n.standard?.code===this.selectedStandard;return e&&t})}getProductAttributeValue(n,e){let t=n?.[e];return t==null?"":typeof t=="object"&&"name"in t?t.name:t}getFavoritesComponent(n){if(n)return this.favoritesComponents.find(e=>e.code===n)}static{this.\u0275fac=function(e){return new(e||i)(D(qe))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-product-list-modal"]],viewQuery:function(e,t){if(e&1&&De(je,5),e&2){let l;ge(l=_e())&&(t.favoritesComponents=l)}},inputs:{familyProducts:"familyProducts",productAttributes:"productAttributes",visible:"visible",systemOfMeasurement:"systemOfMeasurement"},outputs:{closeModal:"closeModal"},standalone:!1,decls:7,vars:9,consts:[[1,"modal"],[1,"modal-content"],[1,"modal-overlay"],[1,"modal-header"],[3,"click"],["type","CLOSE"],[1,"modal-body"],[1,"modal-variants","row"],[1,"col-xs-12","col-md-4"],["for","motor-efficiency"],["id","motor-efficiency",1,"bf-select",3,"ngModelChange","change","ngModel"],[3,"value"],["for","motor-standard"],["id","motor-standard",1,"bf-select",3,"ngModelChange","change","ngModel"],[1,"table-scroll"],[1,"bf-no-resutls"],[1,"hidden-xs","hidden-sm"],[1,"availability"],[1,"category-image"],[3,"routerLink"],[3,"container"],[1,"category-designation"],[1,"secondary-actions"],[3,"toggle","isDropdownOpen","code","type","isUserLoggedIn","favoritesComponent"],[3,"type","code"],[3,"product","show"],[1,"product-attribute"]],template:function(e,t){e&1&&(r(0,"div",0),mt(1),d(2,"async"),mt(3),d(4,"async"),M(5,aa,25,12,"div",1),b(6,"div",2),a()),e&2&&(K("is-open",t.visible),o(),ut(p(2,3,t.b2bUser$)),o(2),ut(p(4,6,t.productAttributes)),o(2),P(t.visibleProducts?5:-1))},dependencies:[Pe,N,cn,we,Ie,Se,G,ne,je,Ft,fn,ee,T,Re],styles:[".no-scroll[_ngcontent-%COMP%]{overflow:hidden}.modal[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;box-shadow:0 5px 15px var(--cx-color-box-shadow);display:none}.modal.is-open[_ngcontent-%COMP%]{display:flex}
2.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%]{background-color:var(--cx-color-light);opacity:1;z-index:11;height:fit-content;border-radius:5px;max-height:90%;margin:30px 0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%]{padding:15px;border:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--cx-color-primary);font-size:2rem;line-height:1;padding:15px;margin:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:32px;height:32px;color:var(--cx-color-category-scroll-buttons);background-color:var(--cx-color-light);border:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{font-size:1.5rem}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{padding:30px;overflow-y:auto}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .modal-variants[_ngcontent-%COMP%]{display:flex;font-size:.875rem;margin-bottom:20px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .modal-variants[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;background-color:var(--cx-color-menu-item-backgroud)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .modal-variants[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-size:.813rem;font-weight:600;line-height:1.92308;color:var(--bf-color-dark-grey);margin-bottom:1rem;text-transform:none}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid var(--cx-color-medium);height:64px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:16px;font-size:.875rem;line-height:1;font-weight:600}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:0;position:sticky;left:0;background-color:var(--cx-color-light)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2){position:sticky;left:70px;background-color:var(--cx-color-light)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding-right:110px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:80px;border-bottom:1px solid var(--cx-color-medium);position:relative}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0 16px;font-size:.75rem;line-height:1;white-space:nowrap}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%]{padding:0;position:sticky;left:0;background-color:var(--cx-color-light)}
2.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%] cx-media[_ngcontent-%COMP%]{width:70px;height:70px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%]{position:sticky;left:70px;background-color:var(--cx-color-light);white-space:nowrap;width:30%}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:start}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--cx-color-secondary);font-size:.875rem;font-weight:600}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--cx-color-primary)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;margin-top:5px;color:var(--cx-color-category-designation)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%]{position:absolute;top:1px;right:0;height:5rem;padding:0;display:flex;align-items:center;background-color:var(--cx-color-light)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;border-radius:5px;background-color:transparent;color:var(--cx-color-primary)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{box-shadow:inset 0 3px 5px #00000020}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{outline:2px solid black;outline-offset:-2px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{padding:2px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{left:unset;right:0;display:block;box-shadow:0 6px 12px #0000002d;background-clip:padding-box;margin:0;padding:0;min-width:150px;top:60%}
2.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:16px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{white-space:nowrap;font-size:.75rem}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:16px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--bg-color-text-dropdown);text-decoration:none}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover, .modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background-color:var(--cx-bg-color-category-hover)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td.secondary-actions[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{color:var(--cx-color-secondary)}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]:not(:has(bonfiglioli-product-availability:not(:empty))) th.availability[_ngcontent-%COMP%], .modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]:not(:has(bonfiglioli-product-availability:not(:empty))) td.availability[_ngcontent-%COMP%]{display:none}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .bf-no-resutls[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:40px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .bf-no-resutls[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.0625rem;line-height:1.470588235}.modal[_ngcontent-%COMP%] .modal-overlay[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100%;width:100%;background-color:var(--cx-color-primary);opacity:.5}[_nghost-%COMP%] .ng-select{background-color:var(--cx-bg-color-category-hover)}[_nghost-%COMP%] .ng-select .ng-select-container{background-color:var(--cx-bg-color-category-hover)}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container{padding-left:16px}[_nghost-%COMP%] .ng-select .ng-dropdown-panel-items .ng-option{font-size:.875rem;padding-left:16px;background-color:var(--cx-bg-color-category-hover)}[_nghost-%COMP%] .ng-select .ng-dropdown-panel-items .ng-option.ng-option-marked{outline:0}@media(min-width:768px){.modal-content[_ngcontent-%COMP%]{width:600px}}@media(min-width:992px){.modal-content[_ngcontent-%COMP%]{width:900px}}@media(min-width:1200px){.modal-content[_ngcontent-%COMP%]{width:1200px}}
2@media(max-width:767px){.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{padding-top:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%]{margin-top:32px;overflow:hidden;scroll-behavior:smooth}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{display:block;width:100%}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:none}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:block;width:100%;overflow-x:hidden}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;scrollbar-width:none;height:130px;overflow-x:auto}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{flex-shrink:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%]{position:absolute;left:0}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%]{position:absolute;left:70px;width:60%;height:80px;display:flex;align-items:center}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-height:unset;min-width:unset}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%]{position:absolute;border-bottom:0;right:10px}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.product-attribute[_ngcontent-%COMP%]{margin-top:80px;color:var(--bf-color-grey);width:auto}.modal[_ngcontent-%COMP%] .modal-content[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.product-attribute[_ngcontent-%COMP%] .title-mobile[_ngcontent-%COMP%]{display:block}}"]})}};var ca=["scrollable"],or=i=>({cxRoute:"product",params:i}),Un=(i,n)=>n.code;function da(i,n){if(i&1&&b(0,"cx-product-grid-item",11),i&2){let e=n.$implicit,t=n.$index;m("product",e)("itemIndex",t)}}function sa(i,n){if(i&1&&(r(0,"div",4),U(1,da,1,2,"cx-product-grid-item",11,Un),a()),i&2){let e=s(3);o(),j(e==null?null:e.products)}}function pa(i,n){i&1&&b(0,"th")}function ma(i,n){if(i&1&&(r(0,"th"),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.name," ")}}function ua(i,n){if(i&1&&M(0,ma,2,1,"th"),i&2){let e=n.$implicit,t=s(5);P(e.showResults&&(e.measurementSystem==null||e.measurementSystem==t.systemOfMeasurement.code)?0:-1)}}function ga(i,n){if(i&1&&(b(0,"a",30),d(1,"cxUrl")),i&2){let e=s().$implicit;m("routerLink",p(1,2,ce(4,or,e)))("innerHTML",e.name,xi)}}function _a(i,n){if(i&1){let e=O();r(0,"a",35),_("click",function(){f(e);let l=s().$implicit,g=s(6);return C(g.loadProductFamily(l.familyCode))}),a()}if(i&2){let e=s().$implicit;m("innerHTML",e.name,xi)}}function fa(i,n){if(i&1&&(r(0,"td"),b(1,"bonfiglioli-favorites",3
26),a()),i&2){let e=s().$implicit;o(),m("type","PRODUCT")("code",e.code??"")}}function Ca(i,n){if(i&1&&(r(0,"td",37)(1,"div",38),c(2),a(),c(3),a()),i&2){let e=s().$implicit,t=s().$implicit,l=s(6);o(2),y(" ",e.name," "),o(),y(" ",l.getProductAttributeValue(t,e.code??"")," ")}}function ba(i,n){if(i&1&&M(0,Ca,4,2,"td",37),i&2){let e=n.$implicit,t=s(6);P(e.showResults&&(e.measurementSystem==null||e.measurementSystem==t.systemOfMeasurement.code)?0:-1)}}function xa(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",26)(2,"a",27),d(3,"cxUrl"),b(4,"cx-media",28),a()(),r(5,"td",29)(6,"div")(7,"span"),M(8,ga,2,6,"a",30)(9,_a,1,1,"a",31),a(),r(10,"p"),c(11),a()()(),M(12,fa,2,2,"td"),r(13,"td",23),b(14,"bonfiglioli-product-availability",32),a(),U(15,ba,1,1,null,null,Un),r(17,"td",33)(18,"bonfiglioli-secondary-actions",34),_("toggle",function(){let l=f(e),g=l.$implicit,h=l.$index,E=s(6);return C(E.toggleSecondaryActions(h,g.code??""))}),a()()()}if(i&2){let e=n.$implicit,t=n.$index;s();let l=Ye(2),g=s(4),h=s();o(2),m("routerLink",p(3,11,ce(13,or,e))),o(2),m("container",e.images),o(4),P(!(e!=null&&e.familyCode)||h.pageType!=h.defaultPageTypes.CATEGORY_PAGE?8:e!=null&&e.familyCode?9:-1),o(3),u(e.code),o(),P(l?12:-1),o(2),m("product",e),o(),j(g.facets),o(3),m("isDropdownOpen",h.openDropdown[t])("code",e.code)("isUserLoggedIn",l??!1)("type","PRODUCT")("favoritesComponent",h.getFavoritesComponent(e.code))}}function ya(i,n){if(i&1){let e=O();r(0,"bonfiglioli-product-list-modal",39),_("closeModal",function(){f(e);let l=s(6);return C(l.onCloseModal())}),a()}if(i&2){let e=s(5),t=s();m("familyProducts",t.familyProducts$)("productAttributes",t.productAttributes$)("systemOfMeasurement",e.systemOfMeasurement.code)("visible",t.isModalOpen)}}function va(i,n){if(i&1){let e=O();r(0,"div")(1,"div",12),mt(2),d(3,"async"),r(4,"div",13)(5,"button",14),_("click",function(){f(e);let l=s(5);return C(l.scrollLeft())}),b(6,"cx-icon",15),a(),r(7,"button",16),_("click",function(){f(e);let l=s(5);return C(l.scrollRight())}),b(8,"cx-icon",17),a(),r(9,"bonfiglioli-dropdown",18),_("toggle",function(){f(e);let l=s(5);return C(l.toggleSorting())}),r(10,"div",4)(11,"label",19)(12,"span"),c(13),d(14,"cxTranslate"),a(),r(15,"cx-sorting",20),d(16,"cxTranslate"),d(17,"cxTranslate"),_("sortListEvent",function(l){f(e);let g=s(5);return C(g.sortList(l))}),a()()()()(),r(18,"div",21,0),_("scroll",function(){f(e);let l=s(5);return C(l.onScroll())}),r(20,"table")(21,"thead")(22,"tr",22),b(23,"th"),r(24,"th"),c(25),d(26,"cxTranslate"),a(),M(27,pa,1,0,"th"),r(28,"th",23),c(29),d(30,"cxTranslate"),a(),U(31,ua,1,1,null,null,Un),a()(),r(33,"tbody"),U(34,xa,19,15,"tr",null,Un),a()()(),r(36,"div")(37,"div",24),M(38,ya,1,4,"bonfiglioli-product-list-modal",25),a()()()()}if(i&2){let e=s(4),t=s();o(2);let l=ut(p(3,15,t.isUserLoggedIn$));o(3),m("disabled",t.disableLeft),o(2),m("disabled",t.disableRight),o(2),m("isOpen",t.isSortingOpen)("triggerIcon",t.bfIconTypes.COG)("useCustomContent",!0),o(4),u(p(14,18,"productList.sortBy")),o(2),m("placeholder",ht(p(16,20,"productList.sortBy")))("sortOptions",e.sorts)("selectedOption",e.pagination==null?null:e.pagination.sort)("ariaLabel",p(17,22,"productList.sortResults")),o(10),y(" ",p(26,24,"product-search.designation")," "),o(2),P(l?27:-1),o(2),y(" ",p(30,26,"product-search.availability")," "),o(2),j(e.facets),o(3),j(e==null?null:e.products),o(4),P(t.isModalOpen?38:-1)}}function ha(i,n){if(i&1&&M(0,va,39,28,"div"),i&2){let e=s(3);P(e.products&&e.products.length>0&&e.facets&&e.facets.length>0?0:-1)}}function Oa(i,n){if(i&1&&(M(0,sa,3,0,"div",4),M(1,ha,1,1)),i&2){let e=s(),t=s(2);P(e===t.ViewModes.Grid?0:-1),o(),P(e===t.ViewModes.List?1:-1)}}function Ma(i,n){if(i&1&&b(0,"cx-product-scroll",7),i&2){let e=s(),t=s(),l=s();m("scrollConfig",l.scrollConfig)("model",t)("inputViewMode",e)}}function Pa(i,n){if(i&1&&(r(0,"div",10),d(1,"cxTranslate"),r(2,"div",40),b(3,"cx-pagination",41),a()()),i&2){let e=s(2);yi("aria-label",p(1,3,"productList.productSearchPagination")),o(3),m("pagination",e.pagination)("defaultPage",0)}}function Sa(i,n){if(i&1&&(r(0,"div",5)(1,"div",6),M(2,Oa,2,2)(3,Ma,1,3,"cx-product-scroll",7),a(),r(4,"div",8)(5,"div",9),M(6,Pa,4,5,"div",10),a()()()),i&2){let e=s(2);o(2),P(e.isInfiniteScroll?3:2),o(4),P(e.isInfiniteScroll?-1:6)}}function wa(i,n){if(i&1&&(r(0,"div",1)(1,"section",2),d(2,"cxTranslate"),r(3,"div",3)(4,"div",4),M(5,Sa,7,2,"div",5),d(6,"async"),a()()()()),i&2){let e,t=s();o(),yi("aria-label",p(2,2,"productList.productListResults")),o(4),P((e=p(6,4,t.viewM
2ode$))?5:-1,e)}}var Qt=class i extends Oo{constructor(e,t,l,g,h,E,ie){super(e,t,l,g);this.component=h;this.routingService=ie;this.isModalOpen=!1;this.isSortingOpen=!1;this.isUserLoggedIn=!1;this.isUserLoggedIn$=x(_t).isUserLoggedIn();this.b2bUser$=x(jt).get();this.pageType="";this.bonfiglioliProductService=x(Dn);this.bonfiglioliCmsComponentService=x(kn);this.authService=x(_t);this.userAccountFacade=x(jt);this.destroy$=new Gt;this.favoritesComponents=new Kt;this.disableLeft=!0;this.disableRight=!1;this.openDropdown=[];this.bfIconTypes=ue;this.defaultPageTypes=Wi;E.getCurrentPage().pipe(pt(this.destroy$)).subscribe(Te=>this.pageType=Te.type),this.bonfiglioliModel$=t.model$,this.component$=this.component.data$}set scrollableSetter(e){e&&(this.scrollable=e,setTimeout(()=>this.updateButtons()))}loadProductFamily(e){this.familyProducts$=this.bonfiglioliProductService.getProductsByFamilyCode(e),this.openModal()}ngOnInit(){super.ngOnInit(),this.bonfiglioliModel$.pipe(pt(this.destroy$)).subscribe(e=>{console.log(e),e.products&&(this.openDropdown=Array(e.products.length).fill(!1))}),this.routingService.getRouterState().pipe(H(e=>!!e?.state),Y(e=>e.state.queryParams?.context),pt(this.destroy$)).subscribe(e=>{this.context=e,this.setProductAttributes()}),this.authService.isUserLoggedIn().pipe(pt(this.destroy$)).subscribe(e=>{this.isUserLoggedIn=e,e&&(this.b2bUser$=this.userAccountFacade.get())})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),super.ngOnDestroy()}setProductAttributes(){if(this.context=="codes"){this.productAttributes$=this.bonfiglioliCmsComponentService.getProductAttributesForProductList("SearchCodesProductListComponent");return}if(this.context=="series"){this.productAttributes$=this.bonfiglioliCmsComponentService.getProductAttributesForProductList("SearchSeriesProductListComponent");return}this.component.data$.pipe(B(1)).subscribe(e=>{this.productAttributes$=this.bonfiglioliCmsComponentService.getProductAttributesForProductList(e.uid||"ProductListComponent")})}onScroll(){this.updateButtons()}scrollRight(){if(!this.scrollable?.nativeElement)return;let e=this.scrollable.nativeElement;e.scrollLeft+=200,this.updateButtons()}scrollLeft(){let e=this.scrollable.nativeElement;e.scrollLeft-=200,this.updateButtons()}updateButtons(){if(!this.scrollable?.nativeElement)return;let e=this.scrollable.nativeElement;this.disableLeft=e.scrollLeft<=0,this.disableRight=e.scrollLeft+e.clientWidth>=e.scrollWidth}toggleSorting(){this.isSortingOpen=!this.isSortingOpen}toggleSecondaryActions(e,t){this.openDropdown[e]=!this.openDropdown[e],this.selectedProductCode=t}getPrimaryImage(e){return e.images?.find(t=>t.imageType==="PRIMARY")?.url||"assets/img/bonfiglioli_missing_product.svg"}openModal(){this.isModalOpen=!0,console.log("opening modal")}onCloseModal(){this.isModalOpen=!1,console.log("closing modal")}getProductAttributeValue(e,t){let l=e?.[t];return t.startsWith("techData")&&(l=e?.erpVariantTechSheet?.find(h=>h.key===t)?.value),l==null?"":typeof l=="object"&&"name"in l?l.name:l}viewProductPage(e){this.routingService.go({cxRoute:"product",params:{code:e}})}getFavoritesComponent(e){if(e)return this.favoritesComponents.find(t=>t.code===e)}static{this.\u0275fac=function(t){return new(t||i)(D(mo),D(qt),D(te),D(mn),D(an),D(no),D(Ne))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-product-list"]],viewQuery:function(t,l){if(t&1&&De(ca,5)(je,5),t&2){let g;ge(g=_e())&&(l.scrollableSetter=g.first),ge(g=_e())&&(l.favoritesComponents=g)}},standalone:!1,features:[Ti],decls:2,vars:3,consts:[["scrollable",""],[1,"cx-page"],["tabindex","-1",1,"cx-page-section"],[1,"container-product-list"],[1,"row"],[1,"col-12","col-lg-12","bf-product-list"],["id","product-results-list",1,"cx-product-container"],[3,"scrollConfig","model","inputVie
2wMode"],[1,"cx-sorting","bottom"],[1,"row","justify-content-center"],[1,"col-auto"],[1,"col-12","col-sm-6","col-md-4",3,"product","itemIndex"],[1,"table-wrapper"],[1,"table-controls"],[1,"scroll-left",3,"click","disabled"],["type","CARET_LEFT"],[1,"scroll-right",3,"click","disabled"],["type","CARET_RIGHT"],[3,"toggle","isOpen","triggerIcon","useCustomContent"],[1,"form-group","cx-sort-dropdown","col-12"],["ariaControls","product-results-list",3,"sortListEvent","sortOptions","selectedOption","ariaLabel","placeholder"],[1,"table-scroll",3,"scroll"],[1,"hidden-xs","hidden-sm"],[1,"availability"],[1,"modal-content"],[3,"familyProducts","productAttributes","systemOfMeasurement","visible"],[1,"category-image"],[3,"routerLink"],[3,"container"],[1,"category-designation"],[3,"routerLink","innerHTML"],[3,"innerHTML"],[3,"product"],[1,"secondary-actions"],[3,"toggle","isDropdownOpen","code","isUserLoggedIn","type","favoritesComponent"],[3,"click","innerHTML"],[3,"type","code"],[1,"product-attribute"],[1,"title-mobile"],[3,"closeModal","familyProducts","productAttributes","systemOfMeasurement","visible"],[1,"cx-pagination"],["queryParam","currentPage","paginationID","pagination-bottom",3,"pagination","defaultPage"]],template:function(t,l){if(t&1&&(M(0,wa,7,6,"div",1),d(1,"async")),t&2){let g;P((g=p(1,1,l.bonfiglioliModel$))?0:-1,g)}},dependencies:[vo,ho,Pe,N,fo,Et,cn,je,He,Ft,fn,$n,ee,T,Re],styles:[".cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%]{padding-top:0}.bf-product-list[_ngcontent-%COMP%]{padding-right:0}.table-wrapper[_ngcontent-%COMP%]{width:100%;overflow:visible}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%]{position:absolute;right:0;height:74px;background-color:var(--cx-color-light);display:flex;align-items:center;padding-left:5px;overflow:visible}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:32px;height:32px;color:var(--cx-color-category-scroll-buttons);background-color:var(--cx-color-light);border:0}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] button.filter[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] button.order-by[_ngcontent-%COMP%]{color:var(--cx-color-primary)}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{border:2px solid var(--cx-color-category-scroll-buttons-focus);border-radius:5px}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{cursor:not-allowed;color:var(--cx-color-medium)}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .cx-sorting[_ngcontent-%COMP%]{position:absolute;right:0;top:64px;background-color:var(--cx-color-light);box-shadow:0 6px 12px #0000002d;z-index:1}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .cx-sorting[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-top:32px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%]{overflow-x:auto}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid var(--cx-color-medium);height:74px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:16px;font-size:.875rem;line-height:1;font-weight:600}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:0;position:sticky;left:0;background-color:var(--cx-color-light)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2){position:sticky;left:70px;background-color:var(--cx-color-light)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding-right:110px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid var(--cx-color-medium);height:80px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0 16px;font-size:.75rem;line-height:1;white-space:nowrap}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%]{padding:0;position:sticky;left:0;background-color:var(--cx-color-light)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%] cx-media[_ngcontent-%COMP%]{height:70px;width:70px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%]{position:sticky;left:70px;background-color:var(--cx-color-light);white-space:nowrap;width:30%}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:start}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--cx-color-secondary);font-size:.875rem;font-weight:600;cursor:pointer}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--cx-color-primary);text-decoration:underline}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0;margin-top:5px;color:var(--cx-color-category-designation)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%]{position:absolute;right:0;height:5rem;padding:0;display:flex;align-items:center;background-color:var(--cx-color-light);border-bottom:1px solid var(--cx-color-medium)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-last-child(2){padding-right:110px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .title-mobile[_ngcontent-%COMP%]{display:none;padding:0;font-size:.75rem;line-height:16px;color:var(--bg-color-text-dropdown)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover, .table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td.category-designation[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td.secondary-actions[_ngcontent-%COMP%]{background-color:var(--cx-bg-color-category-hover)}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]:not(:has(bonfiglioli-product-availability:not(:empty))) th.availability[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]:not(:has(bonfiglioli-product-availability:not(:empty))) td.availability[_ngcontent-%COMP%]{display:none}.cx-sorting[_ngcontent-%COMP%] .cx-pagination[_ngcontent-%COMP%]{margin-top:20px}button.filter[_ngcontent-%COMP%]{display:none}@media(max-width:767px){.cx-page[_ngcontent-%COMP%], .cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%]{padding-top:0}.cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%] .container-product-list[_ngcontent-%COMP%]{padding-top:0;max-width:100vw;margin:0}.cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%] .container-product-list[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{width:100%;padding-top:0;margin:0}.cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%] .container-product-list[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .bf-product-list[_ngcontent-%COMP%]{padding-top:0;padding-left:0}.cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%] .container-product-list[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .bf-product-list[_ngcontent-%COMP%] .cx-product-container[_ngcontent-%COMP%]{padding:0}.cx-page[_ngcontent-%COMP%] .cx-page-section[_ngcontent-%COMP%] .container-product-list[_ngcontent-%COMP%] .row[_ngcontent-%COMP%] .bf-product-list[_ngcontent-%COMP%] .cx-product-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding-top:0}.table-wrapper[_ngcontent-%COMP%]{padding-top:0}
2.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%]{position:relative;border-bottom:1px solid var(--cx-color-medium);justify-content:flex-end}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .scroll-left[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .scroll-right[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .cx-sorting[_ngcontent-%COMP%]{z-index:20;position:fixed;height:calc(100vh - 184px);width:calc(100vw - 64px);top:152px;left:32px;border-radius:16px;padding:32px}.table-wrapper[_ngcontent-%COMP%] .table-controls[_ngcontent-%COMP%] .cx-sorting[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;right:24px;top:24px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%]{overflow:hidden;scroll-behavior:smooth}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{display:block;width:100%}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{display:block;width:100%}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;scrollbar-width:none;height:130px;overflow-x:auto}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-image[_ngcontent-%COMP%]{position:absolute;left:16px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%]{position:absolute;left:70px;width:60%;height:80px;display:flex;align-items:center}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.category-designation[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-height:unset;min-width:unset}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.secondary-actions[_ngcontent-%COMP%]{position:absolute;border-bottom:0;right:10px}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.product-attribute[_ngcontent-%COMP%]{margin-top:80px;color:var(--bf-color-grey);width:auto}.table-wrapper[_ngcontent-%COMP%] .table-scroll[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td.product-attribute[_ngcontent-%COMP%] .title-mobile[_ngcontent-%COMP%]{display:block}}"]})}};var jn=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({imports:[me,Ui]})}};var Hn=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({imports:[Ue,Me,it,se,me]})}};var zn=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({providers:[{provide:un,useClass:qt}],imports:[Me,se,tn,so,Zi,uo,Mo,yo,Pt,me,Co,sn,_o,go,nt,co,Xi.withConfig({cmsComponents:{CMSProductListComponent:{component:Qt,data:{composition:{inner:["ProductAddToCartComponent"]}}},ProductGridComponent:{component:Qt,data:{composition:{inner:["ProductAddToCartComponent"]}}},SearchResultsListComponent:{component:Qt,data:{composition:{inner:["ProductAddToCartComponent"]}}}}}),jn,Ue,Hn]})}};var Ge=class{};var At=class{};var Gn=class i{constructor(n,e,t,l){this.http=n;this.occEndpointsService=e;this.userIdService=t;this.store=l}getProductInfo(n){return this.userIdService.getUserId().pipe(B(1),I(e=>{let t=this.occEndpointsService.buildUrl("materialsProductInfo",{urlParam
2s:{userId:e,productCode:n}});return this.http.get(t)}))}getProductSeries(){return this.userIdService.getUserId().pipe(B(1),I(n=>{let e=this.occEndpointsService.buildUrl("materialsSearchSeries",{urlParams:{userId:n}});return this.http.get(e).pipe(Y(t=>t.map(l=>({code:l.code,name:l.name||l.code}))))}))}searchMaterials(n){return xe([this.userIdService.getUserId(),this.store.pipe(zi(Fo),Y(e=>e.id))]).pipe(B(1),I(([e,t])=>{let l=this.occEndpointsService.buildUrl("materialsSearchMaterials",{urlParams:{userId:e},queryParams:{category:n.category,satnr:n.satnr,matnr:n.matnr,maktx:n.maktx,b2bunit:t}});return this.http.get(l)}))}searchInfoRecord(n){return this.userIdService.getUserId().pipe(B(1),I(e=>{let t=this.occEndpointsService.buildUrl("materialsSearchInfoRecord",{urlParams:{userId:e},queryParams:{material:n}});return this.http.get(t)}))}searchInfoRecords(n,e,t){return this.userIdService.getUserId().pipe(B(1),I(l=>{let g=this.occEndpointsService.buildUrl("materialsSearchInfoRecords",{urlParams:{userId:l},queryParams:{query:n,page:String(e)}});return this.http.get(g).pipe(Y(h=>({results:(h.results||[]).map(E=>({material:E.material||"",description:E.description||"",customerMaterial:E.customerMaterial||"",selected:!1,editing:!1})),totalCount:h.pagination?.totalResults||0})))}))}getMaterialExtendedDescription(n){return this.userIdService.getUserId().pipe(B(1),I(e=>{let t=this.occEndpointsService.buildUrl("materialsExtendedDescription",{urlParams:{userId:e,matnr:n}});return this.http.get(t)}))}static{this.\u0275fac=function(e){return new(e||i)(q(Ve),q(Le),q(ke),q(Hi))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Wn=class i{constructor(n,e,t){this.http=n;this.occEndpointsService=e;this.userIdService=t}getOrderDetails(n){return this.userIdService.getUserId().pipe(B(1),I(e=>{let t=this.occEndpointsService.buildUrl("orderDetails",{urlParams:{userId:e,orderCode:n},queryParams:{fields:"FULL"}});return this.http.get(t)}))}getDocuments(n,e){return this.userIdService.getUserId().pipe(B(1),I(t=>{let l=this.occEndpointsService.buildUrl("orderDocuments",{urlParams:{userId:t,orderCode:n},queryParams:{fields:"DEFAULT",sapCustomer:e}});return this.http.get(l)}))}downloadDocument(n,e,t){return this.userIdService.getUserId().pipe(B(1),I(l=>{let g=this.occEndpointsService.buildUrl("orderDocumentDownload",{urlParams:{userId:l,orderCode:n,sapCustomerCode:e},queryParams:{fields:"DEFAULT",id:t}});return this.http.get(g,{responseType:"blob",observe:"response"})}))}static{this.\u0275fac=function(e){return new(e||i)(q(Ve),q(Le),q(ke))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};function Ea(i,n){if(i&1){let e=O();r(0,"li",4),_("click",function(){f(e);let l=s();return C(l.selectTab("myMaterials"))}),c(1),d(2,"cxTranslate"),a()}if(i&2){let e=s();K("material-modal__tabs-item--active",e.activeTab==="myMaterials"),o(),y(" ",p(2,3,"materialModal.tabs.myMaterials")," ")}}function Ta(i,n){if(i&1&&(r(0,"option",23),c(1),d(2,"cxTranslate"),a()),i&2){let e=n.$implicit;m("value",e.value),o(),y(" ",p(2,2,e.labelKey)," ")}}function Ba(i,n){if(i&1&&(r(0,"div",15)(1,"label"),c(2),d(3,"cxTranslate"),a(),r(4,"select",22),v(5,Ta,3,4,"option",18),a()()),i&2){let e=s(2);o(2),u(p(3,2,"materialModal.form.category")),o(3),m("ngForOf",e.categories)}}function Da(i,n){if(i&1&&(r(0,"option",23),c(1),a()),i&2){let e=n.$implicit;m("value",e.code),o(),y(" ",e.name||e.code," ")}}function qa(i,n){if(i&1){let e=O();r(0,"div",12)(1,"form",13),v(2,Ba,6,4,"div",14),r(3,"div",15)(4,"label"),c(5),d(6,"cxTranslate"),a(),r(7,"select",16),b(8,"option",17),v(9,Da,2,2,"option",18),a()(),r(10,"div",15)(11,"label"),c(12),d(13,"cxTranslate"),a(),b(14,"input",19),a(),r(15,"div",15)(16,"label"),c(17),d(18,"cxTranslate"),a(),b(19,"input",20),a(),r(20,"button",21),_("click",function(){f(e);let l=s();return C(l.searchMaterials())}),c(21),d(22,"cxTranslate"),a()()()}if(i&2){let e=s();o(),m("formGroup",e.materialsForm),o(),m("ngIf",e.showMyMaterials),o(3),u(p(6,7,"materialModal.form.series")),o(4),m("ngForOf",e.seriesOptions),o(3),u(p(13,9,"materialModal.form.materialCode")),o(5),u(p(18,11,"materialModal.form.description")),o(4),y(" ",p(22,13,"materialModal.actions.search")," ")}}function ka(i,n){if(i&1){let e=O();r(0,"div",12)(1,"p",24),c(2),d(3,"cxTranslate"),a(),r(4,"p",25),c(5),d(6,"cxTranslate"),r(7,"a",26),c(8),d(9,"cxTranslate"),a()(),r(10,"div",27)(11,"div",15)(12,"label"),c(13),d(14,"cxTranslate"),a(),r(15,"input",28),le("ngModelChange",function(l){f(e);let g=s();return ae(g.inforecordCode,l)||(g.inforecordCode=l),C(l)}),a()(),r(16,"button",21),_("click",function(){f(e);let l=s();return C(l.searchInforecord())}),c(17),d(18,"cxTranslate"),a()()()}if(i&2){let e=s();o(2),y(" ",p(3,6,"materialModal.myMaterials.header")," "),o(3),y(" ",p(6,8,"materialModal.myMaterials.subheader")," "),o(3),y(" ",p(9,10,"materialModal.myMaterials.link")," "),o(5),u(p(14,12,"materialModal.form.code")),o(2),re("ngModel",e.inforecordCode),o(2),y(" ",p(18,14,"materialModal.actions.search")," ")}}function Ra(i,n){i&1&&(r(0,"div",29),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),y(" ",p(2,1,"materialModal.searching")," "))}function Fa(i,n){if(i&1&&(r(0,"tr",38)(1,"td",39),c(2),a()()),i&2){let e=s(3);o(2),u(e.extDescription)}}function Qa(i,n){if(i&1){let e=O();R(0),r(1,"tr",32),_("click",function(){let l=f(e).$implicit,g=s(2);
2return C(g.selectMaterial(l.material,l.description))}),r(2,"td")(3,"a",33),c(4),a()(),r(5,"td"),c(6),a(),r(7,"td",34),_("click",function(l){return l.stopPropagation()}),r(8,"a",35),_("click",function(){let l=f(e).$implicit,g=s(2);return C(g.toggleExtDescription(l.material))}),b(9,"i",36),a()()(),v(10,Fa,3,1,"tr",37),F()}if(i&2){let e=n.$implicit,t=s(2);o(4),u(e.material),o(2),u(e.description),o(4),m("ngIf",t.expandedMaterial===e.material)}}function Aa(i,n){if(i&1&&(r(0,"table",30)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),b(9,"th"),a()(),r(10,"tbody"),v(11,Qa,11,3,"ng-container",31),a()()),i&2){let e=s();o(4),u(p(5,3,"materialModal.table.code")),o(3),u(p(8,5,"materialModal.table.description")),o(4),m("ngForOf",e.materialResults)}}function Va(i,n){if(i&1){let e=O();r(0,"tr",32),_("click",function(){let l=f(e).$implicit,g=s(2);return C(g.selectMaterial(l.material,l.description))}),r(1,"td")(2,"a",33),c(3),a()(),r(4,"td"),c(5),a(),r(6,"td"),c(7),a()()}if(i&2){let e=n.$implicit;o(3),u(e.material),o(2),u(e.customerMaterial),o(2),u(e.description)}}function La(i,n){if(i&1&&(r(0,"table",30)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),r(9,"th"),c(10),d(11,"cxTranslate"),a()()(),r(12,"tbody"),v(13,Va,8,3,"tr",40),a()()),i&2){let e=s();o(4),u(p(5,4,"materialModal.table.code")),o(3),u(p(8,6,"materialModal.table.inforecord")),o(3),u(p(11,8,"materialModal.table.description")),o(3),m("ngForOf",e.inforecordResults)}}var Yn=class i{constructor(){this.launchDialogService=x($e);this.userRoleService=x(at);this.materialsAdapter=x(Ge);this.fb=x(It);this.ICON_TYPE=ot;this.activeTab="materials";this.showMyMaterials=!1;this.loading=!1;this.inforecordCode="";this.materialResults=[];this.inforecordResults=[];this.expandedMaterial=null;this.extDescription="";this.seriesOptions=[];this.categories=[{value:"6",labelKey:"materialModal.categories.all"},{value:"5",labelKey:"materialModal.categories.components"},{value:"2",labelKey:"materialModal.categories.special"},{value:"3",labelKey:"materialModal.categories.kit"},{value:"1",labelKey:"materialModal.categories.standard"},{value:"4",labelKey:"materialModal.categories.subgroup"}]}ngOnInit(){this.materialsForm=this.fb.group({category:["6"],satnr:[""],matnr:[""],maktx:[""]}),this.checkUserRole(),this.loadSeries()}selectTab(n){this.activeTab=n,this.materialResults=[],this.inforecordResults=[]}searchMaterials(){let n=this.materialsForm.value;this.loading=!0,this.materialResults=[],this.materialsAdapter.searchMaterials(n).pipe(B(1)).subscribe(e=>{this.materialResults=e.rows||[],this.loading=!1})}searchInforecord(){let n=this.inforecordCode.trim();n&&(this.loading=!0,this.inforecordResults=[],this.materialsAdapter.searchInfoRecord(n).pipe(B(1)).subscribe(e=>{this.inforecordResults=e.rows||[],this.loading=!1}))}selectMaterial(n,e){this.launchDialogService.closeDialog({material:n,description:e})}toggleExtDescription(n){if(this.expandedMaterial===n){this.expandedMaterial=null,this.extDescription="";return}this.expandedMaterial=n,this.extDescription="",this.materialsAdapter.getMaterialExtendedDescription(n).pipe(B(1)).subscribe(e=>{this.extDescription=e.description??""})}close(){this.launchDialogService.closeDialog("close")}checkUserRole(){this.userRoleService.hasRole("INFORECORD_ENABLED").pipe(Qe()).subscribe(n=>{this.showMyMaterials=n})}loadSeries(){this.materialsAdapter.getProductSeries().pipe(B(1)).subscribe(n=>{this.seriesOptions=n})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-material-modal"]],decls:18,vars:14,consts:[[1,"modal-dialog","modal
2-dialog-centered","cx-modal-container",3,"esc"],[1,"modal-content","cx-dialog-content"],[1,"modal-header","cx-dialog-header","material-modal__header"],[1,"material-modal__tabs"],[1,"material-modal__tabs-item",3,"click"],["class","material-modal__tabs-item",3,"material-modal__tabs-item--active","click",4,"ngIf"],[1,"cx-dialog-body","modal-body","material-modal__body"],["class","material-modal__tab-content",4,"ngIf"],["class","material-modal__loading",4,"ngIf"],["class","material-modal__table",4,"ngIf"],[1,"modal-footer","material-modal__footer"],["type","button",1,"btn","btn-secondary",3,"click"],[1,"material-modal__tab-content"],[1,"material-modal__form",3,"formGroup"],["class","material-modal__form-row",4,"ngIf"],[1,"material-modal__form-row"],["formControlName","satnr",1,"form-control","bf-select"],["value",""],[3,"value",4,"ngFor","ngForOf"],["type","text","formControlName","matnr",1,"form-control","bf-input"],["type","text","formControlName","maktx",1,"form-control","bf-input"],["type","button",1,"btn","btn-primary",3,"click"],["formControlName","category",1,"form-control","bf-select"],[3,"value"],[1,"material-modal__info-header"],[1,"material-modal__info-subheader"],["routerLink","/my-account/my-materials"],[1,"material-modal__form"],["type","text",1,"form-control","bf-input",3,"ngModelChange","ngModel"],[1,"material-modal__loading"],[1,"material-modal__table"],[4,"ngFor","ngForOf"],[1,"material-modal__table-row",3,"click"],["href","javascript:void(0)"],[1,"material-modal__table-action",3,"click"],["href","javascript:void(0)",3,"click"],[1,"fas","fa-align-justify"],["class","material-modal__table-ext",4,"ngIf"],[1,"material-modal__table-ext"],["colspan","3"],["class","material-modal__table-row",3,"click",4,"ngFor","ngForOf"]],template:function(e,t){e&1&&(r(0,"div",0),_("esc",function(){return t.close()}),r(1,"div",1)(2,"div",2)(3,"ul",3)(4,"li",4),_("click",function(){return t.selectTab("materials")}),c(5),d(6,"cxTranslate"),a(),v(7,Ea,3,5,"li",5),a()(),r(8,"section",6),v(9,qa,23,15,"div",7)(10,ka,19,16,"div",7)(11,Ra,3,3,"div",8)(12,Aa,12,7,"table",9)(13,La,14,10,"table",9),a(),r(14,"div",10)(15,"button",11),_("click",function(){return t.close()}),c(16),d(17,"cxTranslate"),a()()()()),e&2&&(o(4),K("material-modal__tabs-item--active",t.activeTab==="materials"),o(),y(" ",p(6,10,"materialModal.tabs.materials")," "),o(2),m("ngIf",t.showMyMaterials),o(2),m("ngIf",t.activeTab==="materials"),o(),m("ngIf",t.activeTab==="myMaterials"),o(),m("ngIf",t.loading),o(),m("ngIf",t.activeTab==="materials"&&t.materialResults.length),o(),m("ngIf",t.activeTab==="myMaterials"&&t.inforecordResults.length),o(3),y(" ",p(17,12,"materialModal.actions.close")," "))},dependencies:[Me,de,z,nt,on,we,Ie,pe,Se,G,et,ne,it,tt,wt,Pt,Pe,se,me,T],styles:[".material-modal__header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;border-bottom:none;padding-bottom:0}.material-modal__tabs[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;margin:0;width:100%;border-bottom:1px solid var(--bf-color-grey-border)}.material-modal__tabs-item[_ngcontent-%COMP%]{padding:10px 20px;font-size:.875rem;font-weight:600;color:var(--bf-color-grey);cursor:pointer;border-bottom:3px solid transparent}.material-modal__tabs-item--active[_ngcontent-%COMP%]{color:var(--cx-color-secondary);border-bottom-color:var(--cx-color-secondary)}.material-modal__body[_ngcontent-%COMP%]{max-height:60vh;overflow-y:auto}.material-modal__tab-content[_ngcontent-%COMP%]{padding:10px 0}.material-modal__form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:15px}.material-modal__form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;color:var(--bf-color-dark-grey);margin-bottom:4px}.material-modal__form-row[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{max-height:40px}.material-modal__info-header[_ngcontent-%COMP%]{font-size:.875rem;color:var(--bf-color-dark-grey);margin-bottom:8px}.material-modal__info-subheader[_ngcontent-%COMP%]{font-size:.75rem;color:var(--bf-color-dark-grey);margin-bottom:20px}.material-modal__info-subheader[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--cx-color-secondary);text-decoration:none}.material-modal__info-subheader[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.material-modal__loading[_ngcontent-%COMP%]{padding:20px 0;text-align:center;font-size:.875rem;color:var(--bf-color-grey)}.material-modal__table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;margin-top:15px}.material-modal__table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-dark-grey);padding:8px;border-bottom:1px solid var(--bf-color-grey-border);text-align:left}.material-modal__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.75rem;color:var(--bf-color-dark-grey);padding:8px;border-bottom:1px solid var(--bf-color-grey-border)}.material-modal__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--cx-color-secondary);text-decoration:none}.material-modal__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.material-modal__table-row[_ngcontent-%COMP%]{cursor:pointer}.material-modal__table-row[_ngcontent-%COMP%]:hover{background-color:var(--bf-color-light-blue-lighter)}.material-modal__footer[_ngcontent-%COMP%]{justify-content:center}"]})}};var Na=["myMaterialsContainer"],$a=(i,n,e)=>({from:i,to:n,total:e}),rr=(i,n,e,t)=>({currentPage:i,totalPages:n,totalResults:e,pageSize:t});function Ua(i,n){if(i&1){let e=O();r(0,"cx-pagination",15),_("viewPageEvent",function(l){f(e);let g=s();return C(g.onPageChange(l))}),a()}if(i&2){let e=s();m("pagination",vi(2,rr,e.currentPage,e.totalPages,e.totalCount,e.pageSize))("defaultPage",0)}}function ja(i,n){i&1&&b(0,"th",16)(1,"th",17)}function Ha(i,n){if(i&1){let e=O();r(0,"th",10)(1,"button",18),_("click",function(){f(e);let l=s();return C(l.addAllToCart())}),c(2),d(3,"cxTranslate"),a()()}if(i&2){let e=s();o(),m("disabled",!e.hasSelected),o(),y(" ",p(3,2,"configurator.inforecord.addAll")," ")}}function za(i,n){if(i&1){let e=O();r(0,"tr",21)(1,"td")(2,"button",22),_("click",function(){f(e);let l=s().$implicit,g=s();return C(g.openMaterialSearch(l))}),b(3,"cx-icon",6),a()(),b(4,"td"),r(5,"td")(6,"input",23),le("ngModelChange",function(l){f(e);let g=s().$implicit;return ae(g.material,l)||(g.material=l),C(l)}),a()(),r(7,"td"),c(8),a(),r(9,"td")(10,"input",24),le("ngModelChange",function(l){f(e);let g=s().$implicit;return ae(g.customerMaterial,l)||(g.customerMaterial=l),C(l)}),a()(),r(11,"td")(12,"button",25),_("click",function(){f(e);let l=s().$implicit,g=s();return C(g.saveCustomerMaterial(l))}),b(13,"cx-icon",6),a()(),b(14,"td"),a()}if(i&2){let e=s().$implicit,t=s();o(3),m("type",t.iconTypes.SEARCH),o(3),re("ngModel",e.material),o(2),u(e.description),o(2),re("ngModel",e.customerMaterial),o(2),m("disabled",!t.canSaveCustomerMaterial(e)),o(),m("type",t.bfIconTypes.SAVE)}}function Ga(i,n){if(i&1){let e=O();r(0,"td",30)(1,"input",31),_("change",function(){f(e);let l=s(2).$implicit,g=s();return C(g.toggleSelection(l))}),a()(),r(2,"td",32)(3,"button",33),_("click",function(){f(e);let l=s(2).$implicit,g=s();return C(g.addToCartSingle(l))}),b(4,"i",34),a()()}if(i&2){let e=s(2).$implicit;o(),m("checked",e.selected)}}function Wa(i,n){if(i&1){let e=O();r(0,"button",35),_("click",function(){f(e);let l=s(2).$implicit,g=s();return C(g.saveCustomerMaterial(l))}),b(1,"cx-icon",6),a()}if(i&2){let e=s(3);o(),m("type",e.bfIconTypes.SAVE)}}function Ya(i,n){if(i&1){let e=O();r(0,"tr",26),M(1,Ga,5,1),d(2,"async"),r(3,"td"),c(4),a(),r(5,"td"),c(6),a(),r(7,"td")(8,"input",27),le("ngModelChange",function(l){f(e);let g=s().$implicit;return ae(g.customerMaterial,l)||(g.customerMaterial=l),C(l)}),_("input",function(){f(e);let l=s().$implicit,g=s();return C(g.onCustomerMaterialChange(l))}),a()(),b(9,"td"),r(10,"td",28),v(11,Wa,2,1,"button",29),a()()}if(i&2){let e=s().$implicit,t=s();o(),P(p(2,5,t.hasDisplayOnlyGroup$)===!1?1:-1),o(3),u(e.material),o(2),u(e.description),o(2),re("ngModel",e.customerMaterial),o(3),m("ngIf",e.editing)}}function Ka(i,n){if(i&1&&(R(0),v(1,za,15,6,"tr",19)(2,Ya,12,7,"tr",20),F()),i&2){let e=n.$implicit;o(),m("ngIf",e.isNew),o(),m("ngIf",!e.isNew)}}function Xa(i,n){if(i&1){let e=O();r(0,"div",36)(1,"cx-pagination",15),_("viewPageEvent",function(l){f(e);let g=s();return C(g.onPageChange(l))}),a()()}if(i&2){let e=s();o(),m("pagination",vi(2,rr,e.currentPage,e.totalPages,e.totalCount,e.pageSize))("defaultPage",0)}}var Kn=class i{constructor(){this.activeCartFacade=x(Eo);this.cartActionsService=x(Mn);this.changeDetectorRef=x(qe);this.globalMessageService=x(te);this.infoRecordService=x(Yo);this.launchDialogService=x($e);this.materialsAdapter=x(Ge);this.bonfiglioliUserRoleService=x(at);this.bfIconTypes=ue;this.iconTypes=ot;this.rows=[];this.totalCount=0;this.currentPage=0;this.pageSize=20;this.searchQuery="";this.hasDisplayOnlyGroup$=this.bonfiglioliUserRoleService.hasRole("DO")}ngOnInit(){this.loadInforecords()}loadInforecords(){this.materialsAdapter.searchInfoRecords(this.searchQuery,this.currentPage,this.pageSize).pipe(B(1)).subscribe(n=>{this.rows=n.results,this.totalCount=n.totalCount,this.changeDetectorRef.markForCheck()})}onSearch(){this.currentPage=0,this.loadInforecords()}onPageChange(n){this.currentPage=n,this.loadInforecords()}get totalPages(){return Math.ceil(this.totalCount/this.pageSize)}get rangeFrom(){return this.currentPage*this.pageSize+1}get rangeTo(){return Math.min((this.currentPage+1)*this.pageSize,this.totalCount)}get selectedCount(){return this.rows.filter(n=>n.selected&&!n.isNew).length}get hasSelected(){return this.selectedCount>0}toggleSelection(n){n.selected=!n.selected}addToCartSingle(n){this.cartActionsService.addQuickOrderToCart([{product:{code:n.material},quantity:1}]).subscribe(e=>{n.selected=!1,this.launchDialogService.openDialog(Ee.QUICK_ORDER_ADD_TO_CART,void 0,this.myMaterialsContainer,{result:e}),this.changeDetectorRef.markForCheck()})}addAllToCart(){let n=this.rows.filter(t=>t.selected&&!t.isNew);if(!n.length)return;let e=n.map(t=>({product:{code:t.material},quantity:1}));this.cartActionsService.addQuickOrderToCart(e).subscribe(t=>
2{n.forEach(l=>l.selected=!1),this.launchDialogService.openDialog(Ee.QUICK_ORDER_ADD_TO_CART,void 0,this.myMaterialsContainer,{result:t}),this.changeDetectorRef.markForCheck()})}onCustomerMaterialChange(n){n.editing=!0}canSaveCustomerMaterial(n){return!!n.material.trim()&&!!n.customerMaterial.trim()}saveCustomerMaterial(n){this.canSaveCustomerMaterial(n)&&this.infoRecordService.changeInfoRecord(n.material,n.customerMaterial).pipe(Wt(()=>bt),L(e=>{if(!e.resultSuccessful)return this.globalMessageService.add(e.resultMessage??"",A.MSG_TYPE_ERROR);n.isNew=!1,n.editing=!1,this.changeDetectorRef.markForCheck()})).subscribe()}addNewRow(){let n={material:"",description:"",customerMaterial:"",selected:!1,editing:!1,isNew:!0};this.rows.unshift(n)}openMaterialSearch(n){this.launchDialogService.openDialog(Ee.MATERIAL_SEARCH,void 0,this.myMaterialsContainer)?.pipe(B(1)).subscribe(),this.launchDialogService.dialogClose.pipe(H(t=>t!==void 0),B(1)).subscribe(t=>{t&&t!=="close"&&(n.material=t.material,n.description=t.description||"",this.changeDetectorRef.detectChanges())})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-my-materials"]],viewQuery:function(e,t){if(e&1&&De(Na,5,yt),e&2){let l;ge(l=_e())&&(t.myMaterialsContainer=l.first)}},standalone:!1,decls:33,vars:29,consts:[["myMaterialsContainer",""],[1,"my-materials"],[1,"my-materials__top-bar"],[1,"my-materials__search"],["type","text",1,"bf-input",3,"ngModelChange","keydown.enter","ngModel"],["type","button",1,"my-materials__search-btn",3,"click"],[3,"type"],[3,"pagination","defaultPage","viewPageEvent",4,"ngIf"],[1,"my-materials__result-count"],[1,"my-materials__table"],[1,"my-materials__th--actions"],[1,"my-materials__th--add"],["type","button",1,"my-materials__add-btn",3,"click"],[4,"ngFor","ngForOf"],["class","my-materials__pagination",4,"ngIf"],[3,"viewPageEvent","pagination","defaultPage"],[1,"my-materials__th--checkbox"],[1,"my-materials__th--cart"],["type","button",1,"btn","btn-primary","my-materials__add-all-btn",3,"click","disabled"],["class","my-materials__row my-materials__row--new",4,"ngIf"],["class","my-materials__row",4,"ngIf"],[1,"my-materials__row","my-materials__row--new"],["type","button",1,"my-materials__search-icon",3,"click"],["type","text","readonly","",1,"bf-input",3,"ngModelChange","ngModel"],["type","text",1,"bf-input",3,"ngModelChange","ngModel"],["type","button",1,"my-materials__save-btn",3,"click","disabled"],[1,"my-materials__row"],["type","text",1,"bf-input",3,"ngModelChange","input","ngModel"],[1,"my-materials__cell--save"],["type","button","class","my-materials__save-btn",3,"click",4,"ngIf"],[1,"my-materials__cell--checkbox"],["type","checkbox",3,"change","checked"],[1,"my-materials__cell--cart"],["type","button",1,"my-materials__cart-btn",3,"click"],[1,"fas","fa-cart-shopping"],["type","button",1,"my-materials__save-btn",3,"click"],[1,"my-materials__pagination"]],template:function(e,t){if(e&1){let l=O();r(0,"div",1,0)(2,"div",2)(3,"div",3)(4,"input",4),le("ngModelChange",function(h){return f(l),ae(t.searchQuery,h)||(t.searchQuery=h),C(h)}),_("keydown.enter",function(){return t.onSearch()}),a(),r(5,"button",5),_("click",function(){return t.onSearch()}),b(6,"cx-icon",6),a()(),v(7,Ua,1,7,"cx-pagination",7),a(),r(8,"div",8),c(9),d(10,"cxTranslate"),a(),r(11,"table",9)(12,"thead")(13,"tr"),M(14,ja,2,0),d(15,"async"),r(16,"th"),c(17),d(18,"cxTranslate"),a(),r(19,"th"),c(20),d(21,"cxTranslate"),a(),r(22,"th"),c(23),d(24,"cxTranslate"),a(),M(25,Ha,4,4,"th",10),d(26,"async"),r(27,"th",11)(28,"button",12),_("click",function(){return t.addNewRow()}),b(29,"cx-icon",6),a()()()(),r(30,"tbody"),v(31,Ka,3,2,"ng-container",13),a()(),v(32,Xa,2,7,"div",14),a()}e&2&&(o(4),re("ngModel",t.searchQuery),o(2),m("type",t.iconTypes.SEARCH),o(),m("ngIf",t.totalCount>t.pageSize),o(2),y(" ",Q(10,12,"configurator.inforecord.resultCount",Vi(25,$a,t.rangeFrom,t.rangeTo,t.totalCount))," "),o(5),P(p(15,15,t.hasDisplayOnlyGroup$)===!1?14:-1),o(3),u(p(18,17,"configurator.inforecord.material")),o(3),u(p(21,19,"configurator.inforecord.description")),o(3),u(p(24,21,"configurator.inforecord.customerMaterial")),o(2),P(p(26,23,t.hasDisplayOnlyGroup$)===!1?25:-1),o(4),m("type",t.bfIconTypes.PLUS),o(2),m("ngForOf",t.rows),o(),m("ngIf",t.totalCount>t.pageSize))},dependencies:[de,z,pe,G,ne,N,Et,ee,T],styles:[".my-materials__top-bar[_ng
2content-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:16px 0 0}.my-materials__search[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.my-materials__search[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{max-width:300px}.my-materials__result-count[_ngcontent-%COMP%]{width:100%;margin-top:32px;padding:32px;border-top:1px solid var(--bf-color-black);font-size:.875rem;color:var(--bf-color-black)}.my-materials__search-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-dark-grey);font-size:1rem;padding:4px}.my-materials__table[_ngcontent-%COMP%]{width:100%}.my-materials__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px;border-bottom:1px solid var(--bf-color-grey-border);text-transform:capitalize;font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey);white-space:nowrap;vertical-align:middle}.my-materials__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px;line-height:1.42857143;border-top:1px solid var(--bf-color-grey-border);font-size:.875rem;vertical-align:middle}.my-materials__th--checkbox[_ngcontent-%COMP%], .my-materials__cell--checkbox[_ngcontent-%COMP%]{width:48px;text-align:center}.my-materials__th--checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .my-materials__cell--checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:relative;top:-2px;left:8px;height:13px;width:13px}.my-materials__th--cart[_ngcontent-%COMP%], .my-materials__cell--cart[_ngcontent-%COMP%]{width:48px;text-align:center}.my-materials__th--actions[_ngcontent-%COMP%]{text-align:center}.my-materials__th--add[_ngcontent-%COMP%]{width:48px;text-align:center}.my-materials__add-all-btn[_ngcontent-%COMP%]{min-height:unset;max-height:36px;padding:6px 20px;font-size:.875rem}.my-materials__add-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-dark-grey);font-size:1.25rem;padding:4px}.my-materials__cart-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--cx-color-secondary);font-size:1rem;padding:4px}.my-materials__save-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--cx-color-secondary);font-size:1.25rem;padding:4px}.my-materials__save-btn[_ngcontent-%COMP%]:disabled{color:var(--bf-color-grey);cursor:not-allowed}.my-materials__search-icon[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-dark-grey);font-size:1rem;padding:4px}.my-materials__row--new[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:var(--bg-color-grey-lighter)}.my-materials__cell--save[_ngcontent-%COMP%]{width:48px;text-align:center}.my-materials__pagination[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center}"]})}};var ct=class i extends Ze{transform(n,e,t){if(!n)return"";let l=n.substring(0,10);return super.transform(l,e,t)}static{this.\u0275fac=(()=>{let n;return function(t){return(n||(n=ve(i)))(t||i)}})()}static{this.\u0275pipe=vt({name:"dateNoTimezone",type:i,pure:!0})}};var Vt=class i extends _n{constructor(){super(...arguments);this.adapter=x(At);this.cachedCode=null;this.cached$=null}getOrderDetailsForCode(e){return(this.cachedCode!==e||!this.cached$)&&(this.cachedCode=e,this.cached$=this.adapter.getOrderDetails(e).pipe(st({bufferSize:1,refCount:!1}))),this.cached$}getDocuments(e,t){return this.adapter.getDocuments(e,t)}downloadDocument(e,t,l){return this.adapter.downloadDocument(e,t,l)}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=ve(i)))(l||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};function Za(i,n){if(i&1){let e=O();r(0,"li",4),_("click",function(){let l=f(e).$implicit,g=s(2);return C(g.onDocumentClick(l))})("keydown",function(){let l=f(e).$implicit,g=s(2);return C(g.onDocumentClick(l))}),r(1,"span",5),c(2),a(),r(3,"span",6),c(4),d(5,"dateNoTimezone"),a()()}if(i&2){let e=n.$implicit;o(2),y(" ",e.fileName," "),o(2),y(" ",Q(5,2,e.archiveDate,"mediumDate")," ")}}function Ja(i,n){if(i&1){let e=O();r(0,"div",0)(1,"bonfiglioli-dropdown",1),_("toggle",function(){f(e);let l=s();return C(l.toggleDropdown())}),r(2,"ul",2),U(3,Za,6,5,"li",3,Z),a()()()}if(i&2){let e=s();o(),m("isOpen",e.dropdownOpen)("useCustomContent",!0)("showCaret",!0),o(2),j(n)}}var Ht=class i{constructor(){this.activeB2BUnitStatePersistenceService=x(Qo);this.fileDownloadService=x(Ho);this.orderDetailsService=x(Vt);this.dropdownOpen=!1;this.sapCustomer$=this.activeB2BUnitStatePersistenceService.getActiveB2BUnitStateValue().pipe(Y(n=>n.id),H(Jt));this.documents$=xe([this.orderDetailsService.orderCode$,this.sapCustomer$]).pipe(I(([n,e])=>this.orderDetailsService.getDocuments(n,e)),Y(n=>n.documents??[]),H(n=>n.length>0))}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}onDocumentClick(n){this.dropdownOpen=!1;let e=n.criptedDocId;if(!e){console.error("Document has no criptedDocId. Cannot download!");return}xe([this.orderDetailsService.orderCode$,this.sapCustomer$]).pipe(Qe(),I(([t,l])=>
2this.orderDetailsService.downloadDocument(t,l,decodeURIComponent(e))),L(t=>this.fileDownloadService.downloadBlob(t,n.fileName??"document"))).subscribe()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-order-details-documents"]],decls:2,vars:3,consts:[[1,"order-details-documents"],["triggerIcon","DOWNLOAD","triggerLabel","orderDetails.documents.download",3,"toggle","isOpen","useCustomContent","showCaret"],[1,"order-details-documents__list"],[1,"order-details-documents__item"],[1,"order-details-documents__item",3,"click","keydown"],[1,"order-details-documents__name"],[1,"order-details-documents__date"]],template:function(e,t){if(e&1&&(M(0,Ja,5,3,"div",0),d(1,"async")),e&2){let l;P((l=p(1,1,t.documents$))?0:-1,l)}},dependencies:[Ue,He,ee,ct],styles:[".order-details-documents[_ngcontent-%COMP%]{padding:16px 0;margin-right:84px;display:flex;justify-content:end}.order-details-documents__list[_ngcontent-%COMP%]{list-style:none;margin:0 -32px;padding:0}.order-details-documents__item[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;gap:4px;padding:8px 32px;cursor:pointer;font-size:.875rem}.order-details-documents__item[_ngcontent-%COMP%]:not(:last-child){margin-bottom:8px}.order-details-documents__item[_ngcontent-%COMP%]:hover{background-color:var(--cx-color-menu-item-backgroud)}.order-details-documents__name[_ngcontent-%COMP%]{color:var(--cx-color-primary);white-space:nowrap}.order-details-documents__date[_ngcontent-%COMP%]{background-color:var(--cx-color-secondary);color:var(--cx-color-light);border-radius:1rem;padding:3px 6px;white-space:nowrap;font-size:.625rem;font-weight:600}@media(max-width:767px){.order-details-documents[_ngcontent-%COMP%]{margin-right:0}}"]})}};function el(i,n){if(i&1&&(r(0,"div",7)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s();o(2),u(p(3,2,"bfOrderDetails.modal.price.surcharge")),o(3),u(e.entry.materialEnergySurchargeRate)}}function tl(i,n){if(i&1&&(r(0,"div",7)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s();o(2),u(p(3,2,"bfOrderDetails.modal.price.expediteCharges")),o(3),u(e.entry.expeditePrice==null?null:e.entry.expeditePrice.formattedValue)}}function nl(i,n){if(i&1&&(r(0,"div",7)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s();o(2),u(p(3,2,"bfOrderDetails.modal.price.packaging")),o(3),u(e.entry.packagingPrice==null?null:e.entry.packagingPrice.formattedValue)}}function il(i,n){if(i&1&&(r(0,"div",7)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s();o(2),u(p(3,2,"bfOrderDetails.modal.price.transport")),o(3),u(e.entry.transportPrice==null?null:e.entry.transportPrice.formattedValue)}}var Xn=class i{constructor(){this.close=new X}get totalConfirmed(){return(this.entry.scheduleLines??[]).reduce((n,e)=>n+(e.confirmedQuantity??0),0)}get totalShipped(){return(this.entry.mosaicoDetailData??[]).reduce((n,e)=>n+(e.lfimg??0),0)}get totalBilled(){let n=this.entry.mosaicoInvoiceData??[];return n.length===0?0:n[n.length-1].fkimg??0}get showEnergySurcharge(){return!!this.entry.materialEnergySurchargeRate&&this.entry.materialEnergySurchargeRate!=="0,000"}get totalAmountLabelKey(){let n=this.orderData.materialEnergySurchargeCost;return n&&(n.value??0)>0?"bfOrderDetails.modal.price.totalAmountWithSurcharge":"bfOrderDetails.modal.price.totalAmount"}onClose(){this.close.emit()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-order-details-modal"]],inputs:{entry:"entry",orderData:"orderData"},outputs:{close:"close"},standalone:!1,decls:79,vars:52,consts:[[1,"order-details-modal__backdrop",3,"click"],[1,"order-details-modal",3,"click"],[1,"order-details-modal__header"],["type","button",3,"click"],["type","CLOSE"],[1,"order-details-modal__body"],[1,"order-details-modal__section"],[1,"order-details-modal__row"],["class","order-details-modal__row",4,"ngIf"]],template:function(e,t){e&1&&(r(0,"div",0),_("click",function(){return t.onClose()}),r(1,"div",1),_("click",function(g){return g.stopPropagation()}),r(2,"div",2)(3,"h4"),c(4),d(5,"cxTranslate"),a(),r(6,"button",3),_("click",function(){return t.onClose()}),b(7,"cx-icon",4),a()(),r(8,"div",5)(9,"div",6)(10,"h5"),c(11),d(12,"cxTranslate"),a(),r(13,"div",7)(14,"span"),c(15),d(16,"cxTranslate"),a(),r(17,"span"),c(18),a()(),r(19,"div",7)(20,"span"),c(21),d(22,"cxTranslate"),a(),r(23,"span"),c(24),a()(),r(25,"div",7)(26,"span"),c(27),d(28,"cxTranslate"),a(),r(29,"span"),c(30),a()()(),r(31,"div",6)(32,"h5"),c(33),d(34,"cxTranslate"),a(),r(35,"div",7)(36,"span"),c(37),d(38,"cxTranslate"),a(),r(39,"span"),c(40),a()(),v(41,el,6,4,"div",8),r(42,"div",7)(43,"span"),c(44),d(45,"cxTranslate"),a(),r(46,"span"),c(47),a()(),v(48,tl,6,4,"div",8)(49,nl,6,4,"div",8)(50,il,6,4,"div",8),r(51,"div",7)(52,"span"),c(53),d(54,"cxTranslate"),a(),r(55,"span"),c(56),a()()(),r(57,"div",6)(58,"h5"),c(59),d(60,"cxTranslate"),a(),r(61,"div",7)(62,"span"),c(63),d(64,"cxTranslate"),a(),r(65,"span"),c(66),a()(),r(67,"div",7)(68,"span"),c(69),d(70,"cxTranslate"),a(),r(71,"span"),c(72),a()(),r(73,"div",7)(74,"span"),c(75),d(76,"cxTranslate"),a(),r(77,"span"),c(78),a()()()()()()),e&2&&(o(4),u(p(5,26,"bfOrderDetails.modal.title")),o(7),u(p(12,28,"bfOrderDetails.modal.material.title")),o(4),u(p(16,30,"bfOrderDetails.modal.material.code")),o(3),u(t.entry.product==null?null:t.entry.product.code),o(3),u(p(22,32,"bfOrderDetails.modal.material.customerId")),o(3),u(t.entry.customerMaterialId),o(3),u(p(28,34,"bfOrderDetails.modal.material.designation")),o(3),u(t.entry.product==null?null:t.entry.product.name),o(3),u(p(34,36,"bfOrderDetails.modal.price.title")),o(4),u(p(38,38,"bfOrderDetails.modal.price.unitPrice")),o(3),u(t.entry.basePrice==null?null:t.entry.basePrice.formattedValue),o(),m("ngIf",t.showEnergySurcharge),o(3),u(p(45,40,"bfOrderDetails.modal.price.orderedQuantity")),o(3),u(t.entry.quantity),o(),m("ngIf",t.entry.expeditePrice==null?null:t.entry.expeditePrice.formattedValue),o(),m("ngIf",t.entry.packagingPrice==null?null:t.entry.packagingPrice.formattedValue),o(),m("ngIf",t.entry.transportPrice==null?null:t.entry.transportPrice.formattedValue),o(3),u(p(54,42,t.totalAmountLabelKey)),o(3),u(t.entry.totalPrice==null?null:t.entry.totalPrice.formattedValue),o(3),u(p(60,44,"bfOrderDetails.modal.quantity.title")),o(4),u(p(64,46,"bfOrderDetails.modal.quantity.confirmed")),o(3),u(t.totalConfirmed),o(3),u(p(70,48,"bfOrderDetails.modal.quantity.shipped")),o(3),u(t.totalShipped),o(3),u(p(76,50,"bfOrderDetails.modal.quantity.billed")),o(3),u(t.totalBilled))},dependencies:[z,N,T],styles:[".order-details-modal__backdrop[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1050}.order-details-modal[_ngcontent-%COMP%]{background-color:var(--cx-color-light);border-radius:5px;width:90%;max-width:1100px;max-height:90vh;overflow-y:auto}.order-details-modal__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:24px 32px}
2.order-details-modal__header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.75rem;font-weight:500;color:var(--cx-color-primary)}.order-details-modal__header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-dark-grey);font-size:1.25rem}.order-details-modal__body[_ngcontent-%COMP%]{padding:40px 32px;display:flex;flex-wrap:wrap;gap:32px}.order-details-modal__section[_ngcontent-%COMP%]{flex:0 0 calc(50% - 16px);min-width:250px}.order-details-modal__section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-weight:600;font-size:.875rem;color:var(--bf-color-dark-grey);text-transform:uppercase;margin-bottom:0;padding-bottom:8px;border-bottom:1px solid var(--bf-color-grey-border)}.order-details-modal__row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:8px 0;font-size:.875rem}.order-details-modal__row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{color:var(--cx-color-primary);font-weight:600}"]})}};function rl(i,n){if(i&1&&(r(0,"span",12),c(1),d(2,"cxTranslate"),b(3,"br"),r(4,"i"),c(5),d(6,"cxTranslate"),a()()),i&2){let e=s().$implicit,t=s(3);m("ngClass",t.getStatusClass(e)),o(),y(" ",p(2,3,t.getStatusLabelKey(e))," "),o(4),u(p(6,5,t.getBlockStatusKey(e)))}}function al(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",8),_("click",function(){let l=f(e).$implicit,g=s(3);return C(g.openModal(l))}),c(2),a(),r(3,"td",8),_("click",function(){let l=f(e).$implicit,g=s(3);return C(g.openModal(l))}),c(4),a(),r(5,"td"),c(6),a(),r(7,"td"),c(8),a(),r(9,"td"),c(10),a(),r(11,"td"),c(12),a(),r(13,"td"),c(14),a(),r(15,"td"),c(16),a(),r(17,"td"),v(18,rl,7,7,"span",9),a(),r(19,"td",10),_("click",function(){let l=f(e).$implicit,g=s(3);return C(g.openModal(l))}),b(20,"cx-icon",11),a()()}if(i&2){let e=n.$implicit,t=n.index,l=s(3);o(2),u(t+1),o(2),u(e.product==null?null:e.product.code),o(2),u(e.customerMaterialId),o(2),u(e.product==null?null:e.product.name),o(2),u(e.quantity),o(2),u(l.getTotalConfirmed(e)),o(2),u(l.getShippedQuantityForEntry(e)),o(2),u(e.totalPrice==null?null:e.totalPrice.formattedValue),o(2),m("ngIf",e.status)}}function ll(i,n){if(i&1&&(r(0,"table",6)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),r(9,"th"),c(10),d(11,"cxTranslate"),a(),r(12,"th"),c(13),d(14,"cxTranslate"),a(),r(15,"th"),c(16),d(17,"cxTranslate"),a(),r(18,"th"),c(19),d(20,"cxTranslate"),a(),r(21,"th"),c(22),d(23,"cxTranslate"),a(),r(24,"th"),c(25),d(26,"cxTranslate"),a(),r(27,"th"),c(28),d(29,"cxTranslate"),a(),b(30,"th"),a()(),r(31,"tbody"),v(32,al,21,9,"tr",7),a()()),i&2){let e=s(2);o(4),u(p(5,10,"bfOrderDetails.columns.id")),o(3),u(p(8,12,"bfOrderDetails.columns.materialCode")),o(3),u(p(11,14,"bfOrderDetails.columns.customerMaterialCode")),o(3),u(p(14,16,"bfOrderDetails.columns.description")),o(3),u(p(17,18,"bfOrderDetails.columns.orderQuantity")),o(3),u(p(20,20,"bfOrderDetails.columns.confirmedQuantity")),o(3),u(p(23,22,"bfOrderDetails.columns.shippedQuantity")),o(3),u(p(26,24,"bfOrderDetails.columns.lineItemTotal")),o(3),u(p(29,26,"bfOrderDetails.columns.status")),o(4),m("ngForOf",e.orderDetails.entries)}}function cl(i,n){i&1&&(r(0,"th"),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),u(p(2,1,"bfOrderDetails.columns.notaFiscalNumber")))}function dl(i,n){if(i&1&&(r(0,"td"),c(1),a()),i&2){let e=s().$implicit;o(),u(e.xblnr)}}function sl(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(2),a(),r(3,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(4),a(),r(5,"td"),c(6),a(),v(7,dl,2,1,"td",1),r(8,"td"),c(9),a(),r(10,"td"),c(11),a(),r(12,"td"),c(13),d(14,"dateNoTimezone"),a(),r(15,"td"),c(16),d(17,"number"),a(),r(18,"td"),c(19),a()()}if(i&2){let e=n.$implicit,t=s(),l=t.$implicit,g=t.index,h=s(3);o(2),u(g+1),o(2),u(l.product==null?null:l.product.code),o(2),u(e.vbeln),o(),m("ngIf",h.hasNotaFiscal),o(2),u(e.vtext),o(2),u(e.posnr),o(2),u(Q(14,10,e.fkdat,"mediumDate")),o(3),u(Q(17,13,e.fkimg,"1.0-0")),o(3),J("",e.netwr," ",e.waerk)}}
2function pl(i,n){if(i&1&&(R(0),v(1,sl,20,16,"tr",7),F()),i&2){let e=n.$implicit;o(),m("ngForOf",e.mosaicoInvoiceData)}}function ml(i,n){if(i&1&&(r(0,"table",6)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),r(9,"th"),c(10),d(11,"cxTranslate"),a(),v(12,cl,3,3,"th",1),r(13,"th"),c(14),d(15,"cxTranslate"),a(),r(16,"th"),c(17),d(18,"cxTranslate"),a(),r(19,"th"),c(20),d(21,"cxTranslate"),a(),r(22,"th"),c(23),d(24,"cxTranslate"),a(),r(25,"th"),c(26),d(27,"cxTranslate"),a()()(),r(28,"tbody"),v(29,pl,2,1,"ng-container",7),a()()),i&2){let e=s(2);o(4),u(p(5,10,"bfOrderDetails.columns.id")),o(3),u(p(8,12,"bfOrderDetails.columns.materialCode")),o(3),u(p(11,14,"bfOrderDetails.columns.invoiceNumber")),o(2),m("ngIf",e.hasNotaFiscal),o(2),u(p(15,16,"bfOrderDetails.columns.invoiceType")),o(3),u(p(18,18,"bfOrderDetails.columns.positionId")),o(3),u(p(21,20,"bfOrderDetails.columns.invoiceDate")),o(3),u(p(24,22,"bfOrderDetails.columns.quantity")),o(3),u(p(27,24,"bfOrderDetails.columns.netValue")),o(3),m("ngForOf",e.orderDetails.entries)}}function ul(i,n){if(i&1&&(r(0,"i"),c(1),a()),i&2){let e=s().$implicit;o(),u(e.name1)}}function gl(i,n){if(i&1&&(R(0),r(1,"a",14),c(2),d(3,"cxTranslate"),a(),F()),i&2){let e=s().$implicit;o(),m("href",e.xsiurl,Ae),o(),u(e.trackn||p(3,2,"bfOrderDetails.tracking"))}}function _l(i,n){if(i&1&&c(0),i&2){let e=s().$implicit;u(e.trackn)}}function fl(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(2),a(),r(3,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(4),a(),r(5,"td"),c(6),d(7,"number"),a(),r(8,"td"),c(9),d(10,"dateNoTimezone"),a(),r(11,"td"),c(12),a(),r(13,"td"),c(14),v(15,ul,2,1,"i",1),a(),r(16,"td"),c(17),a(),r(18,"td"),c(19),a(),r(20,"td"),v(21,gl,4,4,"ng-container",13)(22,_l,1,1,"ng-template",null,0,Oe),a()()}if(i&2){let e=n.$implicit,t=oe(23),l=s(),g=l.$implicit,h=l.index;o(2),u(h+1),o(2),u(g.product==null?null:g.product.code),o(2),J("",Q(7,12,e.lfimg,"1.0-0"),"\xA0",g.mosaicoData==null?null:g.mosaicoData.vrkme),o(3),u(Q(10,15,e.wadat_IST,"mediumDate")),o(3),u(e.xabln),o(2),y(" ",e.bezei_SHP," "),o(),m("ngIf",e.name1),o(2),u(e.bezei_INCO),o(2),u(e.bolnr),o(2),m("ngIf",e.xsiurl)("ngIfElse",t)}}function Cl(i,n){if(i&1&&(R(0),v(1,fl,24,18,"tr",7),F()),i&2){let e=n.$implicit;o(),m("ngForOf",e.mosaicoDetailData)}}function bl(i,n){if(i&1&&(r(0,"table",6)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),r(9,"th"),c(10),d(11,"cxTranslate"),a(),r(12,"th"),c(13),d(14,"cxTranslate"),a(),r(15,"th"),c(16),d(17,"cxTranslate"),a(),r(18,"th"),c(19),d(20,"cxTranslate"),a(),r(21,"th"),c(22),d(23,"cxTranslate"),a(),r(24,"th"),c(25),d(26,"cxTranslate"),a(),r(27,"th"),c(28),d(29,"cxTranslate"),a()()(),r(30,"tbody"),v(31,Cl,2,1,"ng-container",7),a()()),i&2){let e=s(2);o(4),u(p(5,10,"bfOrderDetails.columns.id")),o(3),u(p(8,12,"bfOrderDetails.columns.materialCode")),o(3),u(p(11,14,"bfOrderDetails.columns.quantity")),o(3),u(p(14,16,"bfOrderDetails.columns.shipmentDate")),o(3),u(p(17,18,"bfOrderDetails.columns.shipmentDoc")),o(3),u(p(20,20,"bfOrderDetails.columns.shipmentVia")),o(3),u(p(23,22,"bfOrderDetails.columns.shipTerms")),o(3),u(p(26,24,"bfOrderDetails.columns.billOfLading")),o(3),u(p(29,26,"bfOrderDetails.columns.trackingNo")),o(3),m("ngForOf",e.orderDetails.entries)}}function xl(i,n){if(i&1){let e=O();r(0,"tr")(1,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(2),a(),r(3,"td",8),_("click",function(){f(e);let l=s().$implicit,g=s(3);return C(g.openModal(l))}),c(4),a(),r(5,"td"),c(6),d(7,"number"),a(),r(8,"td"),c(9),d(10,"dateNoTimezone"),a(),r(11,"td"),c(12),d(13,"dateNoTimezone"),a(),r(14,"td"),c(15),d(16,"dateNoTimezone"),a()()}if(i&2){let e=n.$implicit,t=s(),l=t.$implicit,g=t.index;o(2),u(g+1),o(2),u(l.product==null?null:l.product.code),o(2),J("",Q(7,7,e.bmeng,"1.0-0"),"\xA0",l.mosaicoData==null?null:l.mosaicoData.vrkme),o(3),u(Q(10,10,e.bstdk_E,"mediumDate")),o(3),u(Q(13,13,e.edatu,"mediumDate")),o(3),u(Q(16,16,e.zzesd,"mediumDate"))}}
2function yl(i,n){if(i&1&&(R(0),v(1,xl,17,19,"tr",7),F()),i&2){let e=n.$implicit;o(),m("ngForOf",e.mosaicoScheduleData)}}function vl(i,n){if(i&1&&(r(0,"table",6)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a(),r(6,"th"),c(7),d(8,"cxTranslate"),a(),r(9,"th"),c(10),d(11,"cxTranslate"),a(),r(12,"th"),c(13),d(14,"cxTranslate"),a(),r(15,"th"),c(16),d(17,"cxTranslate"),a(),r(18,"th"),c(19),d(20,"cxTranslate"),a()()(),r(21,"tbody"),v(22,yl,2,1,"ng-container",7),a()()),i&2){let e=s(2);o(4),u(p(5,7,"bfOrderDetails.columns.id")),o(3),u(p(8,9,"bfOrderDetails.columns.materialCode")),o(3),u(p(11,11,"bfOrderDetails.columns.quantity")),o(3),u(p(14,13,"bfOrderDetails.columns.requestedDeliveryDate")),o(3),u(p(17,15,"bfOrderDetails.columns.confirmedDate")),o(3),u(p(20,17,"bfOrderDetails.columns.expectedDeliveryDate")),o(3),m("ngForOf",e.orderDetails.entries)}}function hl(i,n){if(i&1){let e=O();r(0,"bonfiglioli-order-details-modal",15),_("close",function(){f(e);let l=s(2);return C(l.closeModal())}),a()}if(i&2){let e=s(2);m("entry",e.
2selectedEntry)("orderData",e.orderDetails)}}function Ol(i,n){if(i&1&&(R(0),r(1,"div",2)(2,"div",3),v(3,ll,33,28,"table",4)(4,ml,30,26,"table",4)(5,bl,32,28,"table",4)(6,vl,23,19,"table",4),a()(),v(7,hl,1,2,"bonfiglioli-order-details-modal",5),F()),i&2){let e=s();o(3),m("ngIf",e.tabType==="details"),o(),m("ngIf",e.tabType==="invoice"),o(),m("ngIf",e.tabType==="shipping"),o(),m("ngIf",e.tabType==="scheduling"),o(),m("ngIf",e.selectedEntry)}}var Ml={AccountOrderDetailsDetailsTabComponent:"details",AccountOrderDetailsInvoiceTabComponent:"invoice",AccountOrderDetailsShippingTabComponent:"shipping",AccountOrderDetailsSchedulingTabComponent:"scheduling"},ft=class i{constructor(){this.route=x(Zt);this.globalMessageService=x(te);this.orderDetailsService=x(Vt);this.componentData=x(an);this.cdr=x(qe);this.orderDetails=null;this.tabType="details";this.selectedEntry=null}ngOnInit(){xe([this.componentData.data$,this.route.params]).pipe(H(([n,e])=>{let t=e.orderCode||sessionStorage.getItem("orderDetailsCode");return!!n.flexType&&!!t}),I(([n,e])=>{this.tabType=Ml[n.flexType??""]??"details";let t=e.orderCode||sessionStorage.getItem("orderDetailsCode");return e.orderCode&&sessionStorage.setItem("orderDetailsCode",e.orderCode),this.orderDetailsService.getOrderDetailsForCode(t).pipe(Wt(l=>(this.orderDetails=null,this.globalMessageService.add({key:"orderDetails.noOrderFound"},A.MSG_TYPE_WARNING),this.cdr.detectChanges(),xt(null))))})).subscribe(n=>{n&&(this.orderDetails=n,this.cdr.detectChanges())})}getTotalConfirmed(n){return(n.scheduleLines??[]).reduce((e,t)=>e+(t.confirmedQuantity??0),0)}getShippedQuantityForEntry(n){return(n.mosaicoDetailData??[]).reduce((e,t)=>e+(t.lfimg??0),0)}getStatusClass(n){if(n.rejectionCode==="B2")return"order-details__status--primary-dark";switch(n.status){case"R":return"order-details__status--primary-dark";case"F":return"order-details__status--primary";case"P":return"order-details__status--warning";case"S":return"order-details__status--success";case"I":return"order-details__status--info";case"D":return"order-details__status--danger";default:return"order-details__status--primary-dark"}}getStatusLabelKey(n){return n.rejectionCode==="B2"?"bfOrderDetails.statuses.PENDING_APPROVAL":"bfOrderDetails.statuses."+(n.status??"")}getBlockStatusKey(n){return"bfOrderDetails.blockStatuses."+(n.sapBlockStatus??"")}get hasNotaFiscal(){return(this.orderDetails?.entries??[]).some(n=>(n.mosaicoInvoiceData??[]).some(e=>!!e.xblnr))}openModal(n){this.selectedEntry=n}closeModal(){this.selectedEntry=null}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-order-details"]],standalone:!1,decls:1,vars:1,consts:[["noLink",""],[4,"ngIf"],[1,"order-details"],[1,"order-details__table-wrapper"],["class","order-details__table",4,"ngIf"],[3,"entry","orderData","close",4,"ngIf"],[1,"order-details__table"],[4,"ngFor","ngForOf"],[1,"order-details__link",3,"click"],["class","order-details__status",3,"ngClass",4,"ngIf"],[1,"order-details__actions",3,"click"],["type","DOTS"],[1,"order-details__status",3,"ngClass"],[4,"ngIf","ngIfElse"],["target","_blank",3,"href"],[3,"close","entry","orderData"]],template:function(e,t){e&1&&v(0,Ol,8,5,"ng-container",1),e&2&&m("ngIf",t.orderDetails)},dependencies:[Ot,de,z,N,Xn,Mt,T,ct],styles:[".order-details__table-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}.order-details__table[_ngcontent-%COMP%]{width:100%}.order-details__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:16px;border-bottom:1px solid var(--bf-color-grey-border);text-transform:capitalize;font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey);white-space:nowrap;vertical-align:middle}.order-details__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:16px;line-height:1.42857143;border-top:1px solid var(--bf-color-grey-border);font-size:.875rem}.order-details__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:1px solid var(--bf-color-grey-border)}.order-details__link[_ngcontent-%COMP%]{font-weight:600;color:var(--cx-color-primary);cursor:pointer}.order-details__actions[_ngcontent-%COMP%]{cursor:pointer;text-align:end}.order-details__status[_ngcontent-%COMP%]{display:inline-block;min-width:90px;padding:5px;border-radius:5px;text-align:center;line-height:1;color:var(--cx-color-light);font-size:.625rem;font-weight:700}.order-details__status--primary-dark[_ngcontent-%COMP%]{background-color:var(--cx-color-primary)}.order-details__status--primary[_ngcontent-%COMP%]{background-color:var(--cx-color-secondary)}.order-details__status--warning[_ngcontent-%COMP%]{background-color:var(--cx-label-warning)}.order-details__status--success[_ngcontent-%COMP%]{background-color:var(--cx-label-success)}.order-details__status--info[_ngcontent-%COMP%]{background-color:var(--cx-label-info)}.order-details__status--danger[_ngcontent-%COMP%]{background-color:var(--cx-label-danger)}"]})}};var Zn=class i{constructor(n){this.adapter=n}getOrderHistory(n,e,t,l){return this.adapter.getOrderHistory(n,e,t,l)}exportXls(n,e){return this.adapter.exportXls(n,e)}static{this.\u0275fac=function(e){return new(e||i)(q(Dt))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var Sl=["orderHistoryModalTitle"],wl=["orderHistoryModal"],Il=i=>({cxRoute:"orderDetails",params:i}),El=()=>({cxRoute:"supportTickets"});
2function Tl(i,n){if(i&1&&b(0,"input",14),i&2){let e=s().$implicit;m("id",e.formControlName)("formControlName",e.formControlName)}}function Bl(i,n){if(i&1){let e=O();r(0,"input",15,2),_("click",function(){f(e);let l=oe(1);return C(l.toggle())}),a()}if(i&2){let e=s().$implicit;m("id",e.formControlName)("formControlName",e.formControlName)}}function Dl(i,n){if(i&1&&(r(0,"option",18),c(1),d(2,"cxTranslate"),a()),i&2){let e=n.$implicit;m("value",e.value),o(),y(" ",p(2,2,e.labelKey)," ")}}function ql(i,n){if(i&1&&(r(0,"select",16),v(1,Dl,3,4,"option",17),a()),i&2){let e=s().$implicit;m("id",e.formControlName)("formControlName",e.formControlName),o(),m("ngForOf",e.options)}}function kl(i,n){if(i&1&&(R(0),r(1,"div",9)(2,"label",10),c(3),d(4,"cxTranslate"),a(),v(5,Tl,1,2,"input",11)(6,Bl,2,2,"input",12)(7,ql,2,3,"select",13),a(),F()),i&2){let e=n.$implicit;o(),m("ngSwitch",e.type),o(),m("for",e.formControlName),o(),u(p(4,6,e.labelKey)),o(2),m("ngSwitchCase","text"),o(),m("ngSwitchCase","date"),o(),m("ngSwitchCase","select")}}function Rl(i,n){if(i&1){let e=O();R(0),b(1,"div",19),r(2,"div",20)(3,"button",21),_("click",function(){f(e);let l=s(2);return C(l.applyFilters())}),b(4,"cx-icon",22),a()(),F()}}function Fl(i,n){if(i&1&&(r(0,"div",7),v(1,kl,8,8,"ng-container",8)(2,Rl,5,0,"ng-container",6),a()),i&2){let e=n.$implicit,t=n.last;o(),m("ngForOf",e),o(),m("ngIf",t)}}function Ql(i,n){i&1&&(r(0,"div",24),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),y(" ",p(2,1,"bfOrderHistory.noOrders")," "))}function Al(i,n){if(i&1&&(r(0,"option",18),c(1),d(2,"cxTranslate"),a()),i&2){let e=n.$implicit;m("value",e.code),o(),y(" ",p(2,2,"bfOrderHistory.sort."+e.code)," ")}}function Vl(i,n){if(i&1){let e=O();r(0,"tr")(1,"td")(2,"a",32),d(3,"cxUrl"),c(4),a()(),r(5,"td"),c(6),a(),r(7,"td"),c(8),d(9,"dateNoTimezone"),a(),r(10,"td"),c(11),a(),r(12,"td")(13,"span",33),c(14),d(15,"cxTranslate"),a()(),r(16,"td",34),c(17),a(),r(18,"td")(19,"bonfiglioli-dropdown",35),_("toggle",function(){let l=f(e).index,g=s(3);return C(g.toggleSecondaryActions(l))}),a()()()}if(i&2){let e=n.$implicit,t=n.index,l=s(3);o(2),m("routerLink",p(3,11,ce(18,Il,e))),o(2),y(" ",e.code," "),o(2),u(e.purchaseOrderNumber),o(2),u(Q(9,13,e.placed,"mediumDate")),o(3),u(e.total==null?null:e.total.formattedValue),o(2),m("ngClass",l.getStatusClass(e.status)),o(),y(" ",p(15,16,"bfOrderHistory.orderStatuses."+e.status)," "),o(3),u(e.customer),o(2),m("isOpen",l.openDropdown[t])("options",l.getOrderActions(e))("triggerIcon",l.bfIconTypes.DOTS)}}function Ll(i,n){if(i&1){let e=O();R(0),r(1,"button",25),_("click",function(){f(e);let l=s(2);return C(l.exportXls())}),c(2),d(3,"cxTranslate"),a(),r(4,"div",26)(5,"table",27)(6,"thead")(7,"tr")(8,"th"),c(9),d(10,"cxTranslate"),a(),r(11,"th"),c(12),d(13,"cxTranslate"),a(),r(14,"th"),c(15),d(16,"cxTranslate"),a(),r(17,"th"),c(18),d(19,"cxTranslate"),a(),r(20,"th"),c(21),d(22,"cxTranslate"),a(),r(23,"th"),c(24),d(25,"cxTranslate"),a(),r(26,"th")(27,"bonfiglioli-dropdown",28),_("toggle",function(){f(e);let l=s(2);return C(l.sortDropdownOpen=!l.sortDropdownOpen)}),r(28,"label"),c(29),d(30,"cxTranslate"),a(),r(31,"select",29),_("ngModelChange",function(l){f(e);let g=s(2);return C(g.onSortChange(l))}),v(32,Al,3,4,"option",17),a()()()()(),r(33,"tbody"),v(34,Vl,20,20,"tr",8),a()(),r(35,"div",30)(36,"cx-pagination",31),_("viewPageEvent",function(l){f(e);let g=s(2);return C(g.onPageChange(l))}),a()()(),F()}if(i&2){let e=s().ngIf,t=s();o(2),y(" ",p(3,16,"bfOrderHistory.exportXls")," "),o(7),u(p(10,18,"bfOrderHistory.table.orderNumber")),o(3),u(p(13,20,"bfOrderHistory.table.poNumber")),o(3),u(p(16,22,"bfOrderHistory.table.datePlaced")),o(3),u(p(19,24,"bfOrderHistory.table.amount")),o(3),u(p(22,26,"bfOrderHistory.table.status")),o(3),u(p(25,28,"bfOrderHistory.table.shippedTo")),o(3),m("isOpen",t.sortDropdownOpen)("triggerIcon",t.bfIconTypes.COG)("useCustomContent",!0),o(2),u(p(30,30,"bfOrderHistory.sort.label")),o(2),m("ngModel",t.currentSort),o(),m("ngForOf",e.sorts),o(2),m("ngForOf",e.orders),o(2),m("pagination",e.pagination)("defaultPage",0)}}function Nl(i,n){if(i&1&&(R(0),v(1,Ql,3,3,"div",23)(2,Ll,37,32,"ng-container",6),F()),i&2){let e=n.ngIf;o(),m("ngIf",!(e.orders!=null&&e.orders.length)),o(),m("ngIf",e.orders==null?null:e.orders.length)}}function $l(i,n){i&1&&(r(0,"div",36)(1,"h2",37),c(2),d(3,"cxTranslate"),a()()),i&2&&(o(2),y(" ",p(3,1,"bfOrderHistory.missingOrdersTitle")," "))}
2function Ul(i,n){if(i&1&&(r(0,"tr")(1,"td"),c(2),a()()),i&2){let e=n.$implicit;o(2),u(e)}}function jl(i,n){if(i&1){let e=O();r(0,"table",38)(1,"thead")(2,"tr")(3,"th"),c(4),d(5,"cxTranslate"),a()()(),r(6,"tbody"),U(7,Ul,3,1,"tr",null,Z),a()(),r(9,"div",39)(10,"button",40),d(11,"cxUrl"),c(12),d(13,"cxTranslate"),a(),r(14,"button",41),_("click",function(){f(e);let l=s();return C(l.launchDialogService.closeDialog(""))}),c(15),d(16,"cxTranslate"),a()()}if(i&2){let e=s();o(4),u(p(5,4,"bfOrderHistory.table.orderNumber")),o(3),j(e.missingOrders),o(3),m("routerLink",p(11,6,gt(12,El))),o(2),y(" ",p(13,8,"auctions.card.openTicket")," "),o(3),y(" ",p(16,10,"OrderManagementTabContainer.tabs.AccountOrderHistoryComponent")," ")}}var Jn=class i{constructor(n,e,t,l,g,h,E){this.fb=n;this.orderHistoryService=e;this.reorderOrderFacade=t;this.loadingService=l;this.routingService=g;this.dateFormatter=h;this.bonfiglioliUserRoleService=E;this.launchDialogService=x($e);this.viewContainerRef=x(yt);this.destroyRef=x(Yt);this.router=x(Xe);this.bfIconTypes=ue;this.hasDisplayOnlyGroup=!1;this.params$=new Be({});this.missingOrders=[];this.filterFields=[{formControlName:"initialDate",labelKey:"bfOrderHistory.filters.dateFrom",type:"date",row:0},{formControlName:"finalDate",labelKey:"bfOrderHistory.filters.dateTo",type:"date",row:0},{formControlName:"orderStatus",labelKey:"bfOrderHistory.filters.orderStatus",type:"select",row:0,options:[]},{formControlName:"orderNumber",labelKey:"bfOrderHistory.filters.orderNumber",type:"text",row:0},{formControlName:"clientReferenceNumber",labelKey:"bfOrderHistory.filters.clientReferenceNumber",type:"text",row:1},{formControlName:"product",labelKey:"bfOrderHistory.filters.product",type:"text",row:1}];this.filterRows=[];this.openDropdown=[];this.sortDropdownOpen=!1;this.currentSort="";this.orderActionsMap=new Map;this.PAGE_SIZE=10}ngOnInit(){this.dateFormatter.setFormat("dot");let n=new Date,e={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()},t={year:n.getFullYear()-1,month:n.getMonth()+1,day:n.getDate()};this.bonfiglioliUserRoleService.hasRole("DO").subscribe(g=>this.hasDisplayOnlyGroup=g);let l={};for(let g of this.filterFields)l[g.formControlName]="";l.initialDate=t,l.finalDate=e,this.filterForm=this.fb.group(l),this.params$.next({initialDate:this.ngbDateToString(t),finalDate:this.ngbDateToString(e)}),this.filterRows=this.filterFields.reduce((g,h)=>((g[h.row]??=[]).push(h),g),[]),this.orderHistory$=this.params$.pipe(I(ie=>{var Te=ie,{page:g,sort:h}=Te,E=Ci(Te,["page","sort"]);return this.orderHistoryService.getOrderHistory(E,g??0,this.PAGE_SIZE,h)}),L(g=>{this.filterForm.pristine&&g.missingOrders?.length&&(this.missingOrders=g.missingOrders,this.openOrderHistoryModal());let h=g.sorts?.find(E=>E.selected);if(h&&(this.currentSort=h.code??""),g.searchFiltersOrderStatuses){let E=this.filterFields.find(ie=>ie.formControlName==="orderStatus");E&&(E.options=[...g.searchFiltersOrderStatuses.map(ie=>({value:ie.sapKey??"",labelKey:"bfOrderHistory.orderStatuses."+(ie.labelKey?.split(".").pop()??"")}))])}}))}applyFilters(){let n=this.filterForm.value;this.params$.next(Fe(be({},n),{initialDate:this.ngbDateToString(n.initialDate),finalDate:this.ngbDateToString(n.finalDate),page:0}))}ngbDateToString(n){if(!n)return"";let e=n.year,t=String(n.month).padStart(2,"0"),l=String(n.day).padStart(2,"0");return`${e}-${t}-${l}`}onPageChange(n){this.params$.next(Fe(be({},this.params$.value),{page:n})),this.filterForm.markAsDirty()}onSortChange(n){this.currentSort=n,this.sortDropdownOpen=!1,this.params$.next(Fe(be({},this.params$.value),{sort:n,page:0})),this.filterForm.markAsDirty()}exportXls(){let l=this.params$.value,{page:n,sort:e}=l,t=Ci(l,["page","sort"]);this.orderHistoryService.exportXls(t,e).subscribe(g=>{let h=URL.createObjectURL(g),E=document.createElement("a");E.href=h,E.download="order-history.xlsx",E.click(),URL.revokeObjectURL(h)})}toggleSecondaryActions(n){this.openDropdown[n]=!this.openDropdown[n]}getOrderActions(n){let e=n.code??"";return this.orderActionsMap.has(e)||this.orderActionsMap.set(e,[{labelKey:"bfOrderHistory.actions.viewOrder",action:()=>this.viewOrder(n)},...this.hasDisplayOnlyGroup?[]:[{labelKey:"bfOrderHistory.actions.reorder",action:()=>this.reorder(n)}]]),this.orderActionsMap.get(e)}getStatusClass(n){switch(n){case"shipped":return"order-history__status--success";case"cancelled":return"order-history__status--danger";default:return"order-history__status--primary"}}viewOrder(n){n.code&&this.routingService.go({cxRoute:"orderDetails",params:{code:n.code}})}reorder(n){if(!n.code){console.error("Cannot reorder without an order code!");return}this.loadingService.show(""),this.reorderOrderFacade.reorder(n.code).pipe(Qe(),L(()=>{this.loadingService.hide(),this.routingService.go({cxRoute:"cart"})})).subscribe()}openOrderHistoryModal(){this.launchDialogService.openDialog(Ee.LIGHTBOX_MODAL,void 0,this.viewContainerRef,{title:this.orderHistoryModalTitle,body:this.orderHistoryModal})?.pipe(Qe()).subscribe()}static{this.\u0275fac=function(e){return new(e||i)(D(It),D(Zn),D(To),D(Tt),D(Ne),D(lt),D(at))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-order-history"]],viewQuery:function(e,t){if(e&1&&De(Sl,5)(wl,5),e&2){let l;ge(l=_e())&&(t.orderHistoryModalTitle=l.first),ge(l=_e())&&(t.orderHistoryModal=l.first)}},standalone:!1,features:[Ai([{provide:lt,useClass:hn},{provide:No,useClass:$o},{provide:bn,useClass:On}])],decls:9,vars:5,consts:[["orderHistoryModalTitle",""],["orderHistoryModal",""],["dp","ngbDatepicker"],[1,"order-history"],[1,"order-history__filters",3,"formGroup"],["class","order-history__filters-row",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"order-history__filters-row"],[4,"ngFor","ngForOf"],[1,"order-history__filters-field",3,"ngSwitch"],[3,"for"],["type","text","class","bf-input",3,"id","formControlName",4,"ngSwitchCase"],["type","text","class","bf-input","ngbDatepicker","","readonly","",3,"id","formControlName","click",4,"ngSwitchCase"],["class","bf-select",3,"id","formControlName",4,"ngSwitchCase"],["type","text",1,"bf-input",3,"id","formControlName"],["type","text","ngbDatepicker","","readonly","",1,"bf-input",3,"click","id","formControlName"],[1,"bf-select",3,"id","formControlName"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"order-history__filters-field","order-history__filters-field--spacer"],[1,"order-history__filters-field","order-history__filters-field--action"],["type","button",1,"btn","btn-primary",3,"click"],["type","SEARCH"],["class","order-history__empty",4,"ngIf"],[1,"order-history__empty"],["type","button",1,"btn","btn-secondary","order-history__export",3,"click"],[1,"order-history__table-wrapper"],[1,"order-history__table"],[3,"toggle","isOpen","triggerIcon","useCustomContent"],[1,"bf-select",3,"ngModelChange","ngModel"],[1,"order-history__pagination"],[3,"viewPageEvent","pagination","defaultPage"],[1,"order-history__order-link",3,"routerLink"],[1,"order-history__status",3,"ngClass"],[1,"order-history__info"],[3,"toggle","isOpen","options","triggerIcon"],[1,"order-history-dialog__header"],[1,"order-history-dialog__title"],[1,"order-history-dialog__table"],[1,"order-history-dialog__actions"],[1,"btn","btn-secondary",3,"routerLink"],[1,"btn","btn-primary",3,"click"]],template:function(e,t){e&1&&(r(0,"div",3)(1,"div",4),v(2,Fl,3,2,"div",5),a(),v(3,Nl,3,2,"ng-container",6),d(4,"async"),a(),v(5,$l,4,3,"ng-template",null,0,Oe)(7,jl,17,13,"ng-template",null,1,Oe)),e&2&&(o(),m("formGroup",t.filterForm),o(),m("ngForOf",t.filterRows),o(),m("ngIf",p(4,3,t.orderHistory$)))},dependencies:[Ot,de,z,Li,Ni,we,Ie,pe,Se,G,et,tt,wt,ne,Pe,N,Et,Bt,He,ee,T,Re,ct],styles:[".order-history__filters[_ngcontent-%COMP%]{padding:16px 0}.order-history__filters-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;justify-content:space-between}.order-history__filters-field[_ngcontent-%COMP%]{flex:1 1 100%}@media(min-width:992px){.order-history__filters-field[_ngcontent-%COMP%]{flex:1 1 calc(50% - 16px);max-width:calc(50% - 16px)}}@media(min-width:1440px){.order-history__filters-field[_ngcontent-%COMP%]{flex:1 1 calc(25% - 16px);max-width:calc(25% - 16px)}}.order-history__filters-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey);margin-bottom:4px}.order-history__filters-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .order-history__filters-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%}.order-history__filters-field--spacer[_ngcontent-%COMP%]{visibility:hidden}.order-history__filters-field--action[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;align-items:bottom}.order-history__filters[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{max-height:unset;max-height:40px;min-height:40px;margin-top:auto;padding:6px}.order-history__filters[_ngcontent-%COMP%] input[ngbDatepicker].bf-input[_ngcontent-%COMP%]{cursor:pointer}.order-history__empty[_ngcontent-%COMP%]{padding:32px 0;font-size:.875rem;color:var(--bf-color-dark-grey)}.order-history__export[_ngcontent-%COMP%]{margin-top:20px;min-height:unset;max-height:40px}.order-history__table-wrapper[_ngcontent-%COMP%]{display:block;margin-top:16px}.order-history__table[_ngcontent-%COMP%]{width:100%}.order-history__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0 16px 5px;border-bottom:1px solid var(--bf-color-grey-border);text-transform:capitalize;font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey);white-space:nowrap;vertical-align:middle}.order-history__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{text-align:end}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:16px;line-height:1.42857143;border-top:1px solid var(--bf-color-grey-border);font-size:.875rem}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{text-align:end}@media(max-width:991px){.order-history__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:none}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;border-top:1px solid var(--bf-color-grey-border)}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{position:relative;max-height:56px;border-top:none}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .order-history__order-link[_ngcontent-%COMP%]{max-height:24px;min-height:24px;height:24px}.order-history__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] bonfiglioli-dropdown[_ngcontent-%COMP%]{position:absolute;top:-16px}}.order-history__order-link[_ngcontent-%COMP%]{font-weight:600;color:var(--cx-color-primary)}.order-history__info[_ngcontent-%COMP%]{font-size:.75rem}.order-history__status[_ngcontent-%COMP%]{display:inline-block;min-width:90px;padding:5px;border-radius:5px;text-align:center;line-height:1;color:var(--cx-color-light);font-size:.625rem;font-weight:700}.order-history__status--primary[_ngcontent-%COMP%]{background-color:var(--bf-color-blue-darker)}.order-history__status--success[_ngcontent-%COMP%]{background-color:var(--cx-label-success)}.order-history__status--danger[_ngcontent-%COMP%]{background-color:var(--cx-label-danger)}.order-history__pagination[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:center}.order-history-dialog__content[_ngcontent-%COMP%]{border-radius:5px;padding:30px 40px;max-width:900px;width:90%;max-height:80vh;overflow-y:auto;position:relative}.order-history-dialog__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:10px}.order-history-dialog__title[_ngcontent-%COMP%]{text-align:center;font-size:1.7rem;font-weight:400;color:var(--cx-color-secondary);margin:0}.order-history-dialog__error-msg[_ngcontent-%COMP%]{font-size:.875rem;color:var(--bf-color-dark-grey);margin-bottom:20px}.order-history-dialog__table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;margin-bottom:30px}.order-history-dialog__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--cx-color-primary);padding:10px 8px;border-bottom:2px solid var(--bf-color-grey-border);text-align:left}.order-history-dialog__table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.875rem;padding:12px 8px;border-bottom:1px solid var(--bf-color-grey-border);vertical-align:middle}.order-history-dialog__article[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.order-history-dialog__article-img[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain}.order-history-dialog__article-code[_ngcontent-%COMP%]{display:block;font-size:.75rem;color:var(--bf-color-grey)}.order-history-dialog__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
2gap:20px}.order-history-dialog__actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{min-width:180px;text-transform:uppercase;font-size:.875rem;font-weight:600;border-radius:5px;padding:8px 32px;line-height:1.42857143;cursor:pointer}.order-history-dialog__actions[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{color:var(--cx-color-light);background-color:var(--cx-color-secondary);border:2px solid var(--cx-color-secondary)}.order-history-dialog__actions[_ngcontent-%COMP%] .btn-secondary[_ngcontent-%COMP%]{color:var(--cx-color-primary);background-color:var(--cx-color-light);border:2px solid var(--cx-color-primary)}"]})}};var ei=class i{constructor(n,e,t){this.http=n;this.occEndpointsService=e;this.userIdService=t;this.userId$=this.userIdService.getUserId().pipe(B(1))}replicateQuote(n,e,t){return this.userId$.pipe(I(l=>{let g=this.occEndpointsService.buildUrl("quoteReplicate",{urlParams:{userId:l,quoteId:n}});return this.http.get(g,{params:{salesOrg:e,sapCustomer:t}})}))}showEdit(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteShowEdit",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}addQuickOrder(n,e){return this.userId$.pipe(I(t=>{let l=this.occEndpointsService.buildUrl("quoteAddQuickOrder",{urlParams:{userId:t,quoteId:n}});return this.http.post(l,e)}
2))}updateConfig(n,e,t){return this.userId$.pipe(I(l=>{let g=this.occEndpointsService.buildUrl("quoteUpdateConfig",{urlParams:{userId:l,quoteId:n,entryNumber:String(e)}}),h=Fe(be({},t),{product:{code:t.productCode}});return this.http.post(g,h)}))}updateQuantity(n,e,t){return this.userId$.pipe(I(l=>{let g=this.occEndpointsService.buildUrl("quoteUpdateQty",{urlParams:{userId:l,quoteId:n,entryNumber:String(e)}});return this.http.post(g,null,{params:{qty:String(t)}})}))}generateCodes(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteGenerateCodes",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}generateEntryCode(n,e){return this.userId$.pipe(I(t=>{let l=this.occEndpointsService.buildUrl("quoteGenerateEntryCode",{urlParams:{userId:t,quoteId:n,entryNumber:String(e)}});return this.http.get(l)}))}migrate(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteMigrate",{urlParams:{userId:e,quoteId:n}});return this.http.post(t,null)}))}updateEntryPrices(n,e,t){return this.userId$.pipe(I(l=>{let g=this.occEndpointsService.buildUrl("quoteUpdateEntryPrices",{urlParams:{userId:l,quoteId:n,entryId:e}});return this.http.post(g,t)}))}updateField(n,e){return this.userId$.pipe(I(t=>{let l=this.occEndpointsService.buildUrl("quoteUpdateField",{urlParams:{userId:t,quoteId:n}}),g=new FormData;return Object.keys(e).forEach(h=>{let E=e[h];Array.isArray(E)?E.forEach((ie,Te)=>{Object.keys(ie).forEach(We=>{g.append(`${h}[${Te}].${We}`,ie[We])})}):g.append(h,E)}),this.http.post(l,g)}))}updateEntryInfos(n,e,t){return this.userId$.pipe(I(l=>{let g=this.occEndpointsService.buildUrl("quoteUpdateEntryInfos",{urlParams:{userId:l,quoteId:n,entryId:e}});return this.http.post(g,t)}))}syncSF(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteSyncSF",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}pdfValidation(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quotePdfValidation",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}syncToSFValidation(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteSyncToSfValidation",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}retrieveEntriesMissingExternalConfig(n){return this.userId$.pipe(I(e=>{let t=this.occEndpointsService.buildUrl("quoteRetrieveMissingExternalConfigurations",{urlParams:{userId:e,quoteId:n}});return this.http.get(t)}))}static{this.\u0275fac=function(e){return new(e||i)(q(Ve),q(Le),q(ke))}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var W=class i{constructor(){this.adapter=x(ei);this.quoteEditStateService=x(rt);this.globalMessageService=x(te);this.currencyService=x(en);this.loadingService=x(Tt);this.quoteDataSubject$=new Be(null);this.loading$=new Be(!1);this.error$=new Be(null)}static{this.PERSISTENT_MESSAGE_TIMEOUT=2147483647}getQuoteData(){return this.quoteDataSubject$.asObservable()}isLoading(){return this.loading$.asObservable()}getError(){return this.error$.asObservable()}loadQuote(n,e,t){this.loading$.next(!0),this.error$.next(null),this.adapter.replicateQuote(n,e,t).pipe(I(l=>l?.success?this.adapter.showEdit(n):(this.error$.next(l?.errorMsg||"Replication failed"),this.loading$.next(!1),bt)),L({next:l=>{if(l.warnMessages)for(let g of l.warnMessages)this.globalMessageService.add(g,A.MSG_TYPE_WARNING,i.PERSISTENT_MESSAGE_TIMEOUT);l.quote?.totalPrice?.currencyIso&&this.currencyService.setActive(l.quote.totalPrice.currencyIso),this.quoteDataSubject$.next(l),this.loading$.next(!1)},error:()=>{this.loading$.next(!1)}})).subscribe()}addQuickOrder(n,e){return this.adapter.addQuickOrder(n,e).pipe(L(()=>{this.loadingService.show("",!1),this.refreshQuote(n)}))}updateEntryPrices(n,e,t){return this.adapter.updateEntryPrices(n,e,t)}updateField(n,e){return this.adapter.updateField(n,e)}updateEntryInfos(n,e,t){return this.adapter.updateEntryInfos(n,e,t)}updateQuantity(n,e,t){return this.adapter.updateQuantity(n,e,t)}updateConfig(n,e,t){return this.adapter.updateConfig(n,e,t)}addConfigToQuote(n,e,t){return this.adapter.updateConfig(n,e,t)}generateCodes(n){return this.adapter.generateCodes(n)}generateEntryCode(n,e){return this.adapter.generateEntryCode(n,e)}migrate(n){return this.adapter.migrate(n)}syncToSfValidation(n){return this.adapter.syncToSFValidation(n)}syncSF(n){return this.adapter.syncSF(n)}pdfValidation(n){return this.adapter.pdfValidation(n)}retrieveEntriesMissingExternalConfig(n){return this.adapter.retrieveEntriesMissingExternalConfig(n)}refreshQuote(n){this.adapter.showEdit(n).subscribe(e=>{if(e.warnMessages)for(let t of e.warnMessages)this.globalMessageService.add(t,A.MSG_TYPE_WARNING,i.PERSISTENT_MESSAGE_TIMEOUT);this.quoteDataSubject$.next(e),this.loadingService.hide()})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var zl=["quickOrderContainer"];function Gl(i,n){i&1&&(r(0,"div",4),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),y(" ",p(2,1,"quote.entries.tab.entriesLimitWarning")," "))}
2function Wl(i,n){if(i&1&&(r(0,"div",16),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.errorMsg," ")}}function Yl(i,n){if(i&1){let e=O();r(0,"a",31),_("click",function(){f(e);let l=s(2).$implicit,g=s(),h=oe(22);return C(g.openExtendedDescriptionModal(h,l.sapExtDescription))}),c(1),d(2,"cxTranslate"),a()}i&2&&(o(),y(" ",p(2,1,"quickOrder.showDescription")," "))}function Kl(i,n){if(i&1&&(b(0,"img",27),r(1,"div",28)(2,"a",29),c(3),a(),M(4,Yl,3,3,"a",30),a()),i&2){let e=s().$implicit;m("src",e.imageUrl||"assets/img/bonfiglioli_missing_product.svg",Ae)("alt",e.designation),o(2),m("routerLink",e.productUrl),o(),u(e.designation),o(),P(e.sapExtDescription?4:-1)}}function Xl(i,n){if(i&1){let e=O();r(0,"input",32),le("ngModelChange",function(l){f(e);let g=s().$implicit;return ae(g.quantity,l)||(g.quantity=l),C(l)}),a()}if(i&2){let e=s().$implicit;re("ngModel",e.quantity)}}function Zl(i,n){if(i&1){let e=O();r(0,"cx-icon",33),_("click",function(){f(e);let l=s().$implicit,g=s(),h=oe(24);return C(g.openConfigurationModal(h,l))})("keydown",function(){f(e);let l=s().$implicit,g=s(),h=oe(24);return C(g.openConfigurationModal(h,l))}),a()}if(i&2){let e=s(2);m("type",e.iconTypes.DOWNLOAD)}}function Jl(i,n){if(i&1){let e=O();r(0,"div",10)(1,"div",13)(2,"div",14)(3,"input",15,3),d(5,"cxTranslate"),le("ngModelChange",function(l){let g=f(e).$implicit;return ae(g.sku,l)||(g.sku=l),C(l)}),_("focusin",function(){let l=f(e).$index,g=s();return C(g.onSkuFocusIn(l))})("focusout",function(){let l=f(e).$index,g=s();return C(g.onSkuFocusOut(l))})("keydown.enter",function(){f(e);let l=oe(4);return C(l.blur())}),a(),M(6,Wl,2,1,"div",16),a(),r(7,"button",17),_("click",function(){let l=f(e).$index,g=s();return C(g.openMaterialSearch(l))}),b(8,"cx-icon",18),a()(),r(9,"div",19),M(10,Kl,5,5),a(),r(11,"div",20),M(12,Xl,1,1,"input",21),a(),r(13,"div",22),M(14,Zl,1,1,"cx-icon",23),a(),r(15,"div",24)(16,"button",25),_("click",function(){let l=f(e).$index,g=s();return C(g.removeRow(l))}),b(17,"i",26),a()()()}if(i&2){let e=n.$implicit;o(3),re("ngModel",e.sku),m("placeholder",p(5,6,"quickOrder.skuPlaceholder")),o(3),P(e.errorMsg?6:-1),o(4),P(e.designation?10:-1),o(2),P(e.designation?12:-1),o(2),P(e.itemID&&e.itemID.length>0?14:-1)}}function ec(i,n){if(i&1){let e=O();r(0,"button",34),_("click",function(){f(e);let l=s();return C(l.goToImportXml())}),c(1),d(2,"cxTranslate"),a(),r(3,"button",35),_("click",function(){f(e);let l=s();return C(l.resetForm())}),c(4),d(5,"cxTranslate"),a()}i&2&&(o(),y(" ",p(2,2,"quickOrder.importXml")," "),o(3),y(" ",p(5,4,"quickOrder.resetForm")," "))}function tc(i,n){if(i&1){let e=O();r(0,"div",36)(1,"h2"),c(2),d(3,"cxTranslate"),a(),r(4,"p"),c(5),a(),r(6,"div",37)(7,"button",38),_("click",function(){let l=f(e).$implicit;return C(l.close())}),c(8),d(9,"cxTranslate"),a()()()}if(i&2){let e=s();o(2),u(p(3,3,"quickOrder.extDescr")),o(3),u(e.extendedDescription),o(3),y(" ",p(9,5,"quickOrder.close")," ")}}function nc(i,n){if(i&1){let e=O();r(0,"div",39)(1,"div",40)(2,"h2"),c(3),d(4,"cxTranslate"),a()(),r(5,"div",41)(6,"bonfiglioli-configurator-tech-draw-form",42),_("submitRequest",function(){let l=f(e).$implicit;return C(l.close())}),a()(),r(7,"div",43)(8,"button",38),_("click",function(){let l=f(e).$implicit;return C(l.close())}),c(9),d(10,"cxTranslate"),a()()()}if(i&2){let e=s();o(3),u(p(4,4,"quickOrder.modal.techDrawings")),o(3),m("configuration",e.selectedConfiguration)("productCode",e.selectedProduct==null?null:e.selectedProduct.code),o(3),u(p(10,6,"quickOrder.close"))}}var Lt=class i{constructor(n,e,t,l,g,h,E,ie,Te){this.cartActionsService=n;this.materialsAdapter=e;this.router=t;this.cd=l;this.launchDialogService=g;this.modalService=h;this.quoteService=E;this.globalMessageService=ie;this.occConfig=Te;this.addedToQuote=new X;this.extendedDescription="";this.rows=[];this.selectedConfiguration={};this.iconTypes=ot;this.MIN_ROWS=3;this.MAX_ROWS=25;this.loadingService=x(Tt)}ngOnInit(){this.resetForm()}onSkuFocusIn(n){n===this.rows.length-1&&this.rows.length<this.MAX_ROWS&&this.rows.push(this.createEmptyRow())}onSkuFocusOut(n){let e=this.rows[n],t=e.sku.trim();if(!t){e.designation="",e.errorMsg=void 0;return}this.lookupProduct(n,t)}lookupProduct(n,e){let t=this.rows[n];t.loading=!0,t.errorMsg=void 0,this.materialsAdapter.getProductInfo(e).subscribe({next:l=>{t.loading=!1,l.errorMsg?(t.errorMsg=l.errorMsg,t.designation=""):(l.productData?.code&&(t.sku=l.productData.code),t.designation=l.productData?.name??"",t.imageUrl=this.extractImageUrl(l),t.productUrl=l.productData?.url??"",t.errorMsg=void 0,t.itemID=l.productData?.itemID??"",t.sapExtDescription=l.productData?.sapExtDescription??"",t.tcGenerationEndpoint=l.productData?.tcGenerationEndpoint??""),this.cd.markForCheck()},error:()=>{t.loading=!1,t.errorMsg="Error retrieving product info",t.designation="",this.cd.markForCheck()}})}openMaterialSearch(n){this.launchDialogService.openDialog(Ee.MATERIAL_SEARCH,void 0,this.quickOrderContainer)?.pipe(B(1)).subscribe(),this.launchDialogService.dialogClose.pipe(H(t=>t!==void 0),B(1)).subscribe(t=>
2{if(t&&t!=="close"){let l=typeof t=="string"?t:t.material;this.rows[n].sku=l,this.lookupProduct(n,l)}})}removeRow(n){this.rows.length>this.MIN_ROWS?this.rows.splice(n,1):this.rows[n]=this.createEmptyRow()}resetForm(){this.rows=Array.from({length:this.MIN_ROWS},()=>this.createEmptyRow())}addToCart(){let n=this.quoteId?this.rows.filter(t=>t.sku.trim()&&t.quantity>0&&!t.errorMsg):this.rows.filter(t=>t.sku.trim()&&t.designation&&t.quantity>0&&!t.errorMsg);if(!n.length)return;let e=n.map(t=>({product:{code:t.sku.trim()},quantity:t.quantity}));this.quoteId?this.quoteService.addQuickOrder(this.quoteId,{cartEntries:e}).subscribe({next:t=>{this.handleAddToCartResult(t,n),this.addedToQuote.emit()},error:()=>{this.loadingService.hide(),this.cd.markForCheck()}}):this.cartActionsService.addQuickOrderToCart(e).subscribe({next:t=>{this.handleAddToCartResult(t,n)},error:()=>this.cd.markForCheck()})}handleAddToCartResult(n,e){let t=new Set;n.quickOrderCartErrorMsg&&this.globalMessageService.add(n.quickOrderCartErrorMsg,A.MSG_TYPE_ERROR),n.quickOrderErrorData?.forEach(l=>{let g=l.productData?.code||l.code;if(g){t.add(g);let h=this.rows.find(E=>E.sku.trim()===g);h&&(h.errorMsg=l.errorMsg||"Error")}}),e.forEach(l=>{if(!t.has(l.sku.trim())){let g=this.rows.indexOf(l);g>=0&&(this.rows[g]=this.createEmptyRow())}}),(!this.quoteId||t.size)&&this.launchDialogService.openDialog(Ee.QUICK_ORDER_ADD_TO_CART,void 0,this.quickOrderContainer,{result:n,isQuote:!!this.quoteId}),this.cd.markForCheck()}goToImportXml(){this.router.navigate(["/import/xml/saved-cart"])}get hasValidEntries(){return this.rows.some(n=>n.sku.trim()&&n.designation&&n.quantity>0&&!n.errorMsg)}createEmptyRow(){return{sku:"",designation:"",imageUrl:"",itemID:"",productUrl:"",quantity:1,sapExtDescription:""}}extractImageUrl(n){let e=n.productData?.images;if(!e)return"";if(Array.isArray(e)){let l=e[0];if(l&&typeof l=="object"){var t=l.url??"";return this.resolveMediaUrl(t)}}return""}openConfigurationModal(n,e){this.selectedConfiguration={calculatedDesignation:e.designation,productCode:e.sku},this.selectedProduct={code:e.sku,tcGenerationEndpoint:e.tcGenerationEndpoint},this.modalService.open(n,{centered:!0,size:"sm"})}openExtendedDescriptionModal(n,e){this.extendedDescription=e,this.modalService.open(n,{centered:!0,size:"md"})}resolveMediaUrl(n){return!n||n.startsWith("http")?n??"":(this.occConfig.backend?.occ?.baseUrl??"")+n}static{this.\u0275fac=function(e){return new(e||i)(D(Mn),D(Ge),D(Xe),D(qe),D($e),D(vn),D(W),D(te),D(Yi))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quick-order"]],viewQuery:function(e,t){if(e&1&&De(zl,5,yt),e&2){let l;ge(l=_e())&&(t.quickOrderContainer=l.first)}},inputs:{quoteId:"quoteId"},outputs:{addedToQuote:"addedToQuote"},standalone:!1,decls:25,vars:15,consts:[["quickOrderContainer",""],["extendedDescriptionModal",""],["configurationModal",""],["skuInput",""],[1,"quick-order"],[1,"quick-order__header"],[1,"quick-order__header-product"],[1,"quick-order__header-designation"],[1,"quick-order__header-qty"],[1,"quick-order__header-actions"],[1,"quick-order__row"],[1,"quick-order__footer"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"quick-order__row-product"],[1,"quick-order__row-product-input"],["type","text",1,"bf-input",3,"ngModelChange","focusin","focusout","keydown.enter","ngModel","placeholder"],[1,"quick-order__row-error"],["type","button",1,"quick-order__row-search",3,"click"],["type","SEARCH"],[1,"quick-order__row-designation"],[1,"quick-order__row-qty"],["type","number","min","0","maxlength","8",1,"bf-input",3,"ngModel"],[1,"quick-order__row-download"],[3,"type"],[1,"quick-order__row-actions"],["type","button",1,"quick-order__row-remove",3,"click"],[1,"fas","fa-trash"],[1,"quick-order__row-image",3,"src","alt"],[1,"quick-order__row-info"],[1,"quick-order__row-name",3,"routerLink"],[1,"quick-order__row-description"],[1,"quick-order__row-description",3,"click"],["type","number","min","0","maxlength","8",1,"bf-input",3,"ngModelChange","ngModel"],[3,"click","keydown","type"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-secondary","quick-order__footer-reset",3,"click"],[1,"quick-order__ext-descr"],[1,"quick-order__ext-descr-footer"],[1,"btn","btn-primary",3,"click"],[1,"quick-order__modal"],[1,"quick-order__modal-header"],[1,"quick-order__modal-content"],[3,"submitRequest","configuration","productC
2ode"],[1,"quick-order__modal-footer"]],template:function(e,t){e&1&&(r(0,"div",4,0),M(2,Gl,3,3,"div",4),r(3,"div",5)(4,"span",6),c(5),d(6,"cxTranslate"),a(),r(7,"span",7),c(8),d(9,"cxTranslate"),a(),r(10,"span",8),c(11),d(12,"cxTranslate"),a(),b(13,"span",9),a(),U(14,Jl,18,8,"div",10,Z),r(16,"div",11),M(17,ec,6,6),r(18,"button",12),_("click",function(){return t.addToCart()}),c(19),d(20,"cxTranslate"),a()()(),v(21,tc,10,7,"ng-template",null,1,Oe)(23,nc,11,8,"ng-template",null,2,Oe)),e&2&&(o(2),P(t.quoteId?2:-1),o(3),u(p(6,7,"quickOrder.header.product")),o(3),u(p(9,9,"quickOrder.header.designation")),o(3),u(p(12,11,"quickOrder.header.qty")),o(3),j(t.rows),o(3),P(t.quoteId?-1:17),o(),m("disabled",!t.hasValidEntries),o(),y(" ",p(20,13,t.quoteId?"quickOrder.addToQuote":"quickOrder.addToCart")," "))},dependencies:[pe,St,G,lo,rn,ne,Pe,N,Ko,T],styles:[".quick-order__header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:12px 0;border-bottom:1px solid var(--bf-color-grey-border);font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey)}.quick-order__header-product[_ngcontent-%COMP%]{flex:0 0 53%}.quick-order__header-designation[_ngcontent-%COMP%]{flex:1 1 auto}.quick-order__header-qty[_ngcontent-%COMP%]{flex:0 0 23%}.quick-order__header-actions[_ngcontent-%COMP%]{flex:0 0 48px}.quick-order__row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:16px 0;border-bottom:1px solid var(--bf-color-grey-border);flex-wrap:nowrap}.quick-order__row-product[_ngcontent-%COMP%]{flex:0 0 40%;display:flex;align-items:center;gap:8px}.quick-order__row-product-input[_ngcontent-%COMP%]{width:75%}.quick-order__row-product-input[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{flex:1 1 auto;width:100%}.quick-order__row-search[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:4px;color:var(--bf-color-dark-grey);font-size:1rem}.quick-order__row-designation[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;align-items:center;gap:20%}.quick-order__row-image[_ngcontent-%COMP%]{max-width:96px;object-fit:contain}.quick-order__row-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--cx-color-secondary);cursor:pointer}.quick-order__row-description[_ngcontent-%COMP%]:hover{color:var(--bf-color-blue)}.quick-order__row-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--cx-color-secondary);text-decoration:none}.quick-order__row-name[_ngcontent-%COMP%]:hover{color:var(--bf-color-blue);text-decoration:underline}.quick-order__row-qty[_ngcontent-%COMP%]{flex:0 0 20%;display:flex;justify-content:center}.quick-order__row-qty[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{width:80px;text-align:center}.quick-order__row-download[_ngcontent-%COMP%]{flex-basis:10%;display:flex;justify-content:start}.quick-order__row-download[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{font-size:25px;color:var(--bf-color-grey);cursor:pointer}.quick-order__row-actions[_ngcontent-%COMP%]{flex:0 0 48px;text-align:center}.quick-order__row-remove[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-grey);font-size:1rem}.quick-order__row-remove[_ngcontent-%COMP%]:hover{color:var(--cx-label-danger)}.quick-order__row-error[_ngcontent-%COMP%]{width:100%;font-size:.75rem;color:var(--cx-label-danger);margin-top:4px;padding-left:0}.quick-order__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:24px 0;gap:16px}.quick-order__footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{min-height:unset;max-height:40px}.quick-order__footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:first-child:last-child{margin-left:auto}.quick-order__footer-reset[_ngcontent-%COMP%]{background-color:var(--bf-color-light-grey);border-color:var(--bf-color-light-grey);color:var(--bf-color-dark-grey)}.quick-order__footer-reset[_ngcontent-%COMP%]:hover{background-color:var(--bf-color-grey);border-color:var(--bf-color-grey);color:var(--cx-color-light)}"]})}};var ti=class i extends gn{constructor(){super(...arguments);
2this.orderDetailsService=x(_n);this.urlPipe=x(Re);this.pageUid="order"}resolveHeading(){return this.orderDetailsService.getOrderDetails().pipe(I(e=>this.getOrderLabel("# "+(e.code??""))))}resolveBreadcrumbs(){return xe([super.resolveBreadcrumbs(),this.translationService.translate("pageMetaResolver.order.orders"),this.orderDetailsService.getOrderDetails()]).pipe(I(([e,t,l])=>this.getOrderLabel(l.code).pipe(Y(g=>[...e?.slice(0,1)??[],{label:t,link:this.urlPipe.transform({cxRoute:"orders"})},{label:g}]))))}getOrderLabel(e){return this.translationService.translate("pageMetaResolver.order.order",{code:e})}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=ve(i)))(l||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var ni=class i extends gn{constructor(){super(...arguments);this.pageUid="order-management"}resolveTitle(){return this.getTabTitle().pipe(I(e=>e?this.translationService.translate(e):super.resolveTitle()))}resolveBreadcrumbs(){return xe([super.resolveBreadcrumbs(),this.getTabTitle()]).pipe(I(([e,t])=>t?this.translationService.translate(t).pipe(Y(l=>[...e?.slice(0,1)??[],{label:l}])):xt(e)))}static{this.\u0275fac=(()=>{let e;return function(l){return(e||(e=ve(i)))(l||i)}})()}static{this.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})}};var ii=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({providers:[Ke({cmsComponents:{AccountOrderHistoryComponent:{component:Jn},QuickOrderComponent:{component:Lt},AccountMyMaterialsComponent:{component:Kn},AccountOrderDetailsDetailsTabComponent:{component:ft},AccountOrderDetailsInvoiceTabComponent:{component:ft},AccountOrderDetailsShippingTabComponent:{component:ft},AccountOrderDetailsSchedulingTabComponent:{component:ft},AccountOrderDetailsDocumentsComponent:{component:Ht}}}),{provide:Dt,useExisting:wn},{provide:Ge,useExisting:Gn},{provide:At,useExisting:Wn},Ke({launch:{QUICK_ORDER_ADD_TO_CART:{inlineRoot:!0,component:Tn},MATERIAL_SEARCH:{inlineRoot:!0,component:Yn,dialogType:ln.DIALOG}}}),Ke({backend:{occ:{endpoints:{searchInfoRecord:"users/${userId}/materials/search-info-record",changeInfoRecord:"users/${userId}/materials/change-info-record"}}}}),{provide:hi,useExisting:ni,multi:!0},{provide:hi,useExisting:ti,multi:!0}],imports:[Me,it,nt,Pt,se,me,sn,xn,Ue,zn,Pn,Ht]})}};var oi=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({providers:[Ke({cmsComponents:{"3DPreviewTabComponent":{component:()=>import("./chunk-MLE7NQON.js").then(n=>n.Bonfiglioli3DPreviewComponent)}}}),Ke({backend:{occ:{endpoints:{cadFormats:"teamcenter/cad/formats/${productCode}",createDrwTicket:"/teamcenter/cad/users/{userId}/createDrwTicket",plmLicense:"teamcenter/cad/license",generateJTForProduct:"teamcenter/cad/users/${userId}/calculate3d",generateJTForConfiguration:"teamcenter/cad/users/${userId}/generatejt",get3DViewerFile:"teamcenter/cad/3DViewerFile/${filePK}"}}}})],imports:[Sn]})}};function oc(i,n){if(i&1){let e=O();r(0,"button",4),_("click",function(){f(e);let l=s();return C(l.onRetrieveMissingExternalConfigurations())}),b(1,"cx-icon",6),c(2),d(3,"cxTranslate"),a()}if(i&2){let e=s();m("disabled",!e.massExternalConfigRetrieveEnabled),o(),m("type",e.iconType.BARCODE),o(),y(" ",p(3,3,"quote.header.tab.extConfigs")," ")}}function rc(i,n){if(i&1){let e=O();r(0,"div",10)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"button",11),_("click",function(){f(e);let l=s();return C(l.onMigrate())}),c(5),d(6,"cxTranslate"),a()()}i&2&&(o(2),u(p(3,2,"quote.migratecodes")),o(3),y(" ",p(6,4,"quote.migratecodes.submit")," "))}function ac(i,n){if(i&1){let e=O();r(0,"div",12)(1,"div",13)(2,"h4",14),c(3),d(4,"cxTranslate"),a(),r(5,"p",15),c(6),d(7,"cxTranslate"),a(),r(8,"div",16)(9,"button",17),_("click",function(){f(e);let l=s();return C(l.onCancelGenerateCodes())}),c(10),d(11,"cxTranslate"),a(),r(12,"button",18),_("click",function(){f(e);let l=s();return C(l.onConfirmGenerateCodes())}),c(13),d(14,"cxTranslate"),a()()()()}i&2&&(o(3),u(p(4,4,"quote.header.generateCodes.title")),o(3),u(p(7,6,"quote.header.generateCodes.message")),o(4),y(" ",p(11,8,"quote.header.generateCodes.cancel")," "),o(3),y(" ",p(14,10,"quote.header.generateCodes.confirm")," "))}var ri=class i{constructor(){this.quoteService=x(W);this.globalMessageService=x(te);this.router=x(Xe);this.iconType=ue;this.showGenerateCodesConfirm=!1}get massCodeGenerationEnabled(){return this.data.quote?.entries?.some(n=>n.product?.isSapConfigurable&&n.configurationComplete&&!n.entryGeneratedMaterialCode)??!1}get massExternalConfigRetrieveEnabled(){return this.data.quote?.entries?.some(n=>n.externalConfigRetrieveHasFailed)??!1}onPdfPreview(){let n=this.data.quote?.code;n&&this.quoteService.pdfValidation(n).subscribe({next:e=>{e?.operationEnabled?this.router.navigate(["/quote-pdf",n]):e?.messagesTexts?.length?e.messagesTexts.forEac
2h(t=>{this.globalMessageService.add({raw:t},A.MSG_TYPE_WARNING)}):this.globalMessageService.add({key:"quote.header.pdfNotAvailable"},A.MSG_TYPE_WARNING)}})}onSyncSF(){let n=this.data.quote?.code;n&&this.quoteService.syncToSfValidation(n).subscribe({next:e=>{e.operationEnabled?this.quoteService.syncSF(n).subscribe({next:()=>{this.globalMessageService.add({key:"quote.header.syncSuccess"},A.MSG_TYPE_CONFIRMATION),this.quoteService.refreshQuote(n)},error:()=>{this.globalMessageService.add({key:"quote.header.syncError"},A.MSG_TYPE_ERROR)}}):e?.messagesTexts?.length&&e.messagesTexts.forEach(t=>{this.globalMessageService.add({raw:t},A.MSG_TYPE_WARNING)})}})}onGenerateCodes(){this.showGenerateCodesConfirm=!0}onRetrieveMissingExternalConfigurations(){let n=this.data.quote?.code;n&&this.quoteService.retrieveEntriesMissingExternalConfig(n).subscribe({next:()=>{this.globalMessageService.add({key:"quote.header.retrieveMissingExternalConfigSuccess"},A.MSG_TYPE_CONFIRMATION),this.quoteService.refreshQuote(n)},error:()=>{this.globalMessageService.add({key:"quote.header.retrieveMissingExternalConfigError"},A.MSG_TYPE_ERROR)}})}onConfirmGenerateCodes(){this.showGenerateCodesConfirm=!1;let n=this.data.quote?.code;n&&this.quoteService.generateCodes(n).subscribe({next:()=>{this.globalMessageService.add({key:"quote.header.generateCodesSuccess"},A.MSG_TYPE_CONFIRMATION),this.quoteService.refreshQuote(n)},error:()=>{this.globalMessageService.add({key:"quote.header.generateCodesError"},A.MSG_TYPE_ERROR)}})}onCancelGenerateCodes(){this.showGenerateCodesConfirm=!1}onMigrate(){let n=this.data.quote?.code;n&&this.quoteService.migrate(n).subscribe({next:()=>{this.globalMessageService.add({key:"quote.header.migrateSuccess"},A.MSG_TYPE_CONFIRMATION),this.quoteService.refreshQuote(n)},error:()=>{this.globalMessageService.add({key:"quote.header.migrateError"},A.MSG_TYPE_ERROR)}})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-header"]],inputs:{data:"data"},standalone:!1,decls:17,vars:19,consts:[[1,"quote-header"],[1,"quote-header__name"],[1,"quote-header__actions"],[1,"quote-header__btn","quote-header__btn--primary",3,"disabled"],[1,"quote-header__btn","quote-header__btn--primary",3,"click","disabled"],[1,"quote-header__sync-icon"],[3,"type"],[1,"quote-header__btn","quote-header__btn--icon",3,"click"],["class","quote-header__migration",4,"ngIf"],["class","quote-header__modal-overlay",4,"ngIf"],[1,"quote-header__migration"],[1,"quote-header__btn","quote-header__btn--warning",3,"click"],[1,"quote-header__modal-overlay"],[1,"quote-header__modal"],[1,"quote-header__modal-title"],[1,"quote-header__modal-message"],[1,"quote-header__modal-actions"],[1,"btn","btn-secondary",3,"click"],[1,"btn","btn-primary",3,"click"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),c(2),d(3,"cxTranslate"),r(4,"span"),c(5),a()(),r(6,"div",2),M(7,oc,4,5,"button",3),r(8,"button",4),_("click",function(){return t.onSyncSF()}),c(9),d(10,"cxTranslate"),a(),r(11,"span",5),b(12,"cx-icon",6),a(),r(13,"button",7),_("click",function(){return t.onPdfPreview()}),b(14,"cx-icon",6),a()()(),v(15,rc,7,6,"div",8)(16,ac,15,12,"div",9)),e&2&&(K("quote-header--disabled",!t.data.doaEditEnabled),o(2),y(" ",p(3,15,"quote.header.name"),": "),o(3),u(t.data.quote==null?null:t.data.quote.name),o(2),P(t.massExternalConfigRetrieveEnabled?7:-1),o(),m("disabled",t.data.quote==null?null:t.data.quote.sfAlreadySynced),o(),y(" ",p(10,17,t.data.quote!=null&&t.data.quote.sfAlreadySynced?"quote.header.button.synced":"quote.header.button.notsynced")," "),o(2),K("quote-header__sync-icon--synced",t.data.quote==null?null:t.data.quote.sfAlreadySynced)("quote-header__sync-icon--not-synced",!(t.data.quote!=null&&t.data.quote.sfAlreadySynced)),o(),m("type",t.iconType.SYNC),o(2),m("type",t.iconType.PRINT),o(),m("ngIf",t.data.quote==null?null:t.data.quote.configuratorsMigrationNeeded),o(),m("ngIf",t.showGenerateCodesConfirm))},dependencies:[z,N,T],styles:[".quote-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--bf-color-grey-border)}.quote-header--disabled[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.quote-header__name[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:600;color:var(--bf-color-dark-grey)}.quote-header__name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:400}.quote-header__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.quote-header__btn[_ngcontent-%COMP%]{border:1px solid var(--cx-color-medium);border-radius:4px;padding:6px 12px;font-size:.875rem;cursor:pointer;background-color:var(--cx-color-light);color:var(--bf-color-dark-grey)}.quote-header__btn[_ngcontent-%COMP%]:disabled{opacity:.5;pointer-events:none}.quote-header__btn--icon[_ngcontent-%COMP%]{border:none;background:transparent;padding:6px}.quote-header__btn--primary[_ngcontent-%COMP%]{background-color:var(--cx-color-primary);color:var(--cx-color-light);border-color:var(--cx-color-primary)}.quote-header__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background-color:var(--bf-color-blue-darker)}.quote-header__btn--warning[_ngcontent-%COMP%]{background-color:var(--cx-label-warning);color:var(--bf-color-dark-grey);border-color:var(--cx-label-warning)}.quote-header__sync-icon[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 4px}.quote-header__sync-icon--synced[_ngcontent-%COMP%]{color:var(--cx-label-success)}.quote-header__sync-icon--not-synced[_ngcontent-%COMP%]{color:var(--cx-label-danger)}.quote-header__migration[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;margin:12px 0;background-color:#fcf8e3;border:1px solid var(--cx-label-warning);border-radius:4px;font-size:.875rem;color:var(--bf-color-dark-grey)}.quote-header__modal-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1050}.quote-header__modal[_ngcontent-%COMP%]{background:var(--cx-color-light);border-radius:4px;padding:24px;min-width:400px;max-width:500px}.quote-header__modal-title[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:600;margin-bottom:12px}.quote-header__modal-message[_ngcontent-%COMP%]{font-size:.875rem;margin-bottom:24px;color:var(--bf-color-dark-grey)}.quote-header__modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;
2gap:8px}"]})}};function cc(i,n){if(i&1&&(r(0,"div",1)(1,"label"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s();o(2),u(p(3,2,"quote.informations.sapQuoteId")),o(3),u(e.data.quote==null?null:e.data.quote.sapQuoteId)}}var ai=class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-info"]],inputs:{data:"data"},standalone:!1,decls:40,vars:31,consts:[[1,"quote-info__body"],[1,"quote-info__field"],["class","quote-info__field",4,"ngIf"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"label"),c(3),d(4,"cxTranslate"),a(),r(5,"span"),c(6),a()(),r(7,"div",1)(8,"label"),c(9),d(10,"cxTranslate"),a(),r(11,"span"),c(12),a()(),r(13,"div",1)(14,"label"),c(15),d(16,"cxTranslate"),a(),r(17,"span"),c(18),a()(),r(19,"div",1)(20,"label"),c(21),d(22,"cxTranslate"),a(),r(23,"span"),c(24),d(25,"date"),a()(),r(26,"div",1)(27,"label"),c(28),d(29,"cxTranslate"),a(),r(30,"span"),c(31),d(32,"date"),a()(),r(33,"div",1)(34,"label"),c(35),d(36,"cxTranslate"),a(),r(37,"span"),c(38),a()(),v(39,cc,6,4,"div",2),a()),e&2&&(o(3),u(p(4,13,"quote.informations.id")),o(3),u(t.data.quote==null?null:t.data.quote.code),o(3),u(p(10,15,"quote.informations.name")),o(3),u(t.data.quote==null?null:t.data.quote.name),o(3),u(p(16,17,"quote.informations.sapcustomer")),o(3),u(t.data.quote==null||t.data.quote.shipToParty==null?null:t.data.quote.shipToParty.sapId),o(3),u(p(22,19,"quote.informations.date")),o(3),u(Q(25,21,t.data.quote==null?null:t.data.quote.creationTime,"dd/MM/yyyy")),o(4),u(p(29,24,"quote.informations.validity")),o(3),u(Q(32,26,t.data.quote==null?null:t.data.quote.expirationTime,"dd/MM/yyyy")),o(4),u(p(36,29,"quote.informations.language")),o(3),u(t.data.quote==null?null:t.data.quote.languageName),o(),m("ngIf",t.data.quote==null?null:t.data.quote.sapQuoteId))},dependencies:[z,$i,T],styles:[".quote-info__body[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px 32px;padding-top:12px}.quote-info__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:150px}.quote-info__field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-grey);margin-bottom:2px}.quote-info__field[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem;color:var(--bf-color-dark-grey)}"]})}};var dt=class i{constructor(){this.decimalPipe=x(Mt);this.ZERO="0";this.DEFAULT_DIGITS_INFO="1.2-2";this.CURRENCY_DIGITS_INFO_MAP={VND:"1.0-0"}}transform(n,e,t=this.DEFAULT_DIGITS_INFO){let l=n&&typeof n=="object"?n.value:n,g=this.resolveCurrencyIso(n,e),h=this.CURRENCY_DIGITS_INFO_MAP[g]??t,E=e?.numberLocale?.replaceAll('"',"")??"en-US",ie=this.decimalPipe.transform(l,h,E);return ie===this.decimalPipe.transform(0,h,E)?this.ZERO:ie}resolveCurrencyIso(n,e){if(n&&typeof n=="object"){if("currencyIso"in n)return(n.currencyIso??"").trim().toUpperCase();if("unit"in n)return(n.unit??"").trim().toUpperCase()}return(e?.currency??"").trim().toUpperCase()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=vt({name:"quotePrice",type:i,pure:!0})}};var pc=(i,n)=>({entryId:i,code:n}),li=class i{constructor(){this.discountOptions=[];this.discountOptionsMap={};this.activeModal=x(yn);this.quoteService=x(W);this.globalMessageService=x(te);this.form=new ro({extraManualDiscount:new Ut(null,[Je.min(0),Je.max(100)]),manualDiscount:new Ut(null,[Je.min(0),Je.max(100)]),manualNetprice:new
2Ut(null,Je.min(0)),multiplier:new Ut(null,[Je.min(0),Je.max(100)])})}ngOnInit(){this.updateDiscountOptionsMap(),this.initValues()}ngOnChanges(n){n.discountOptions&&this.updateDiscountOptionsMap(),n.entry&&this.initValues()}updateDiscountOptionsMap(){this.discountOptionsMap=(this.discountOptions??[]).reduce((n,e)=>Fe(be({},n),{[e.key]:e.value}),{}),this.discountOptionsMap.extraManualDiscount?this.form.controls.extraManualDiscount.enable():this.form.controls.extraManualDiscount.disable()}initValues(){this.form.patchValue({extraManualDiscount:this.entry?.extraManualDiscount?.value?.toFixed(2)??null,manualDiscount:this.entry?.manualDiscount?.value?.toFixed(2)??null,manualNetprice:this.entry?.manualNetprice?.value?.toFixed(2)??null,multiplier:this.entry?.multiplier?.value?.toFixed(2)??null}),this.entry.multiplierEnabled?this.form.controls.multiplier.enable():this.form.controls.multiplier.disable()}submit(){if(this.form.invalid){console.error("Quote Discounts Modal Form is invalid! Cannot submit!");return}this.quoteService.updateEntryPrices(this.quoteId,this.entry.entryNumber,this.form.getRawValue()).subscribe({next:()=>{this.quoteService.refreshQuote(this.quoteId),this.activeModal.close()},error:()=>{this.globalMessageService.add({key:"quote.entries.actions.updatePriceError"},A.MSG_TYPE_ERROR)}})}close(){this.activeModal.dismiss()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-discounts-modal"]],inputs:{entry:"entry",quoteId:"quoteId",discountOptions:"discountOptions"},standalone:!1,features:[wi],decls:131,vars:95,consts:[[1,"modal-header"],[1,"modal-title"],["ngNativeValidate","",3,"ngSubmit","formGroup"],[1,"modal-body"],[1,"quote-discounts-modal__form"],[1,"quote-discounts-modal__field"],[1,"quote-discounts-modal__input-group"],["type","text","disabled","",1,"bf-input",3,"value"],[1,"quote-discounts-modal__addon"],["type","number","step","0.01",1,"bf-input",3,"formControl"],[3,"control"],["type","number","step","0.01",1,"bf-input",3,"formControl","disabled"],["type","number","step","0.001",1,"bf-input",3,"formControl"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary"],["type","button",1,"btn","btn-secondary",3,"click"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"h4",1),c(2),d(3,"cxTranslate"),a()(),r(4,"form",2),_("ngSubmit",function(){return t.submit()}),r(5,"div",3)(6,"div",4)(7,"div",5)(8,"label"),c(9),d(10,"cxTranslate"),a(),r(11,"div",6),b(12,"input",7),d(13,"quotePrice"),r(14,"span",8),c(15),a()()(),r(16,"div",5)(17,"label"),c(18),d(19,"cxTranslate"),a(),r(20,"div",6),b(21,"input",7),d(22,"quotePrice"),r(23,"span",8),c(24),a()()(),r(25,"div",5)(26,"label"),c(27),d(28,"cxTranslate"),a(),r(29,"div",6),b(30,"input",7),d(31,"quotePrice"),r(32,"span",8),c(33,"%"),a()()(),r(34,"div",5)(35,"label"),c(36),d(37,"cxTranslate"),a(),r(38,"div",6),b(39,"input",7),d(40,"quotePrice"),r(41,"span",8),c(42,"%"),a()()(),r(43,"div",5)(44,"label"),c(45),d(46,"cxTranslate"),a(),r(47,"div",6),b(48,"input",7),d(49,"quotePrice"),r(50,"span",8),c(51),a()()(),r(52,"div",5)(53,"label"),c(54),d(55,"cxTranslate"),a(),r(56,"div",6),b(57,"input",9),r(58,"span",8),c(59,"%"),a()(),b(60,"cx-form-errors",10),a(),r(61,"div",5)(62,"label"),c(63),d(64,"cxTranslate"),a(),r(65,"div",6),b(66,"input",7),d(67,"quotePrice"),r(68,"span",8),c(69,"%"),a()()(),r(70,"div",5)(71,"label"),c(72),d(73,"cxTranslate"),a(),r(74,"div",6),b(75,"input",11),r(76,"span",8),c(77,"%"),a()(),b(78,"cx-form-errors",10),a(),r(79,"div",5)(80,"label"),c(81),d(82,"cxTranslate"),a(),r(83,"div",6),b(84,"input",7),d(85,"quotePrice"),r(86,"span",8),c(87,"%"),a()()(),r(88,"div",5)(89,"label"),c(90),d(91,"cxTranslate"),a(),r(92,"div",6),b(93,"input",7),d(94,"quotePrice"),r(95,"span",8),c(96),a()()(),r(97,"div",5)(98,"label"),c(99),d(100,"cxTranslate"),a(),r(101,"div",6),b(102,"input",12),r(103,"span",8),c(104,"%"),a()(),b(105,"cx-form-errors",10),a(),r(106,"div",5)(107,"label"),c(108),d(109,"cxTranslate"),a(),r(110,"div",6),b(111,"input",9),r(112,"span",8),c(113),a()(),b(114,"cx-form-errors",10),a(),r(115,"div",5)(116,"label"),c(117),d(118,"cxTranslate"),a(),r(119,"div",6),b(120,"input",7),d(121,"quotePrice"),r(122,"span",8),c(123),a()()()()(),r(124,"div",13)(125,"button",14),c(126),d(127,"cxTranslate"),a(),r(128,"button",15),_("click",function(){return t.close()}),c(129),d(130,"cxTranslate"),a()()()),e&2&&(o(2),y(" ",Q(3,41,"quote.entries.discountsModal.title",Xt(92,pc,t.entry.entryNumber,t.entry.product==null?null:t.entry.product.code))," "),o(2),m("formGroup",t.form),o(5),u(p(10,44,"quote.entries.discountsModal.listPrice")),o(3),m("value",p(13,46,t.entry.listPrice)),o(3),u(t.entry.listPrice==null?null:t.entry.listPrice.currencyIso),o(3),u(p(19,48,"quote.entries.discountsModal.netBeforeCharges")),o(3),m("value",p(22,50,t.entry.netBeforeChargePrice)),o(3),u(t.entry.netBeforeChargePrice==null?null:t.entry.netBeforeChargePrice.currencyIso),o(3),u(p(28,52,"quote.entries.discountsModal.automaticDiscount")),o(3),m("value",p(31,54,-(t.entry.automaticDiscount==null?null:t.entry.automaticDiscount.value))),o(6),u(p(37,56,"quote.entries.discountsModal.urgencyTransportation")),o(3),m("value",p(40,58,t.entry.urgTransportPercent==null?null:t.entry.urgTransportPercent.value)),o(6),u(p(46,60,"quote.entries.discountsModal.surchargeCosts")),o(3),m("value",p(49,62,t.entry.surchargeValue)),o(3),u(t.entry.surchargeValue==null?null:t.entry.surchargeValue.currencyIso),o(3),u(p(55,64,"quote.entries.discountsModal.manualDiscount")),o(3),m("formControl",t.form.controls.manualDiscount),o(3),m("control",t.form.controls.manualDiscount),o(3),u(p(64,66,"quote.entries.discountsModal.percentTrans
2port")),o(3),m("value",p(67,68,t.entry.transportPercent==null?null:t.entry.transportPercent.value)),o(6),u(p(73,70,"quote.entries.discountsModal.extraManualDiscount")),o(3),m("formControl",t.form.controls.extraManualDiscount)("disabled",!t.discountOptionsMap.extraManualDiscount),o(3),m("control",t.form.controls.extraManualDiscount),o(3),u(p(82,72,"quote.entries.discountsModal.packaging")),o(3),m("value",p(85,74,t.entry.packagingPercent==null?null:t.entry.packagingPercent.value)),o(6),u(p(91,76,"quote.entries.discountsModal.contract")),o(3),m("value",p(94,78,t.entry.contractPrice)),o(3),u(t.entry.contractPrice==null?null:t.entry.contractPrice.currencyIso),o(3),u(p(100,80,"quote.entries.discountsModal.multiplier")),o(3),m("formControl",t.form.controls.multiplier),o(3),m("control",t.form.controls.multiplier),o(3),u(p(109,82,"quote.entries.discountsModal.manualNetPrice")),o(3),m("formControl",t.form.controls.manualNetprice),o(2),u(t.entry.basePrice==null?null:t.entry.basePrice.currencyIso),o(),m("control",t.form.controls.manualNetprice),o(3),u(p(118,84,"quote.entries.discountsModal.netPrice")),o(3),m("value",p(121,86,t.entry.basePrice)),o(3),u(t.entry.basePrice==null?null:t.entry.basePrice.currencyIso),o(3),y(" ",p(127,88,"quote.entries.discountsModal.submit")," "),o(3),y(" ",p(130,90,"quote.entries.discountsModal.close")," "))},dependencies:[pe,St,G,et,ao,tt,dn,T,dt],styles:[".quote-discounts-modal__form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.quote-discounts-modal__field[_ngcontent-%COMP%]{flex:0 0 calc(50% - 8px)}.quote-discounts-modal__field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-grey);margin-bottom:4px;display:block}.quote-discounts-modal__input-group[_ngcontent-%COMP%]{display:flex;align-items:stretch}.quote-discounts-modal__input-group[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{flex:1;border-top-right-radius:0;border-bottom-right-radius:0;outline:0}.quote-discounts-modal__input-group[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]:focus{border:1px solid var(--cx-color-primary)!important}.quote-discounts-modal__addon[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 12px;font-size:.8125rem;background-color:var(--bg-color-grey-lighter);border:1px solid var(--cx-color-menu-item-border);border-left:none;border-radius:0 3px 3px 0;box-shadow:inset 0 1px 1px #00000013}"]})}};var ci=class i{constructor(){this.activeModal=x(yn);this.quoteService=x(W);this.globalMessageService=x(te);this.extDescription="";this.weight=null}ngOnInit(){this.extDescription=this.entry?.extendedDescription??"",this.weight=this.entry?.unitWeight?.value??null}submit(){this.quoteService.updateEntryInfos(this.quoteId,this.entry.entryNumber,{extDescription:this.extDescription,weight:this.weight}).subscribe({next:()=>{this.quoteService.refreshQuote(this.quoteId),this.activeModal.close()},error:()=>{this.globalMessageService.add({key:"quote.entries.actions.additionalInfoError"},A.MSG_TYPE_ERROR)}})}close(){this.activeModal.dismiss()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-additional-info-modal"]],inputs:{entry:"entry",quoteId:"quoteId"},standalone:!1,decls:18,vars:13,consts:[[1,"modal-header"],[1,"modal-title"],[1,"modal-body"],[1,"quote-additional-info-modal__form"],[1,"quote-additional-info-modal__field","quote-additional-info-modal__field--full"],[1,"bf-input",3,"ngModelChange","ngModel"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click"],["type","button",1,"btn","btn-secondary",3,"click"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"h4",1),c(2),d(3,"cxTranslate"),a()(),r(4,"div",2)(5,"div",3)(6,"div",4)(7,"label"),c(8),d(9,"cxTranslate"),a(),r(10,"textarea",5),le("ngModelChange",function(g){return ae(t.extDescription,g)||(t.extDescription=g),g}),a()()()(),r(11,"div",6)(12,"button",7),_("click",function(){return t.submit()}),c(13),d(14,"cxTranslate"),a(),r(15,"button",8),_("click",function(){return t.close()}),c(16),d(17,"cxTranslate"),a()()),e&2&&(o(2),y(" ",p(3,5,"quote.entries.additionalInfoModal.title")," "),o(6),u(p(9,7,"quote.entries.additionalInfoModal.extendedDescription")),o(2),re("ngModel",t.extDescription),o(3),y(" ",p(14,9,"quote.entries.additionalInfoModal.submit")," "),o(3),y(" ",p(17,11,"quote.entries.additionalInfoModal.close")," "))},dependencies:[pe,G,ne,T],styles:[".quote-additional-info-modal__form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.quote-additional-info-modal__field[_ngcontent-%COMP%]{flex:0 0 calc(50% - 8px)}.quote-additional-info-modal__field--full[_ngcontent-%COMP%]{flex:0 0 100%}.quote-additional-info-modal__field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-grey);margin-bottom:4px;display:block}.quote-additional-info-modal__field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;resize:vertical;min-height:20dvh}.quote-additional-info-modal__input-group[_ngcontent-%COMP%]{display:flex;align-items:stretch}.quote-additional-info-modal__input-group[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{flex:1;border-top-right-radius:0;border-bottom-right-radius:0}.quote-additional-info-modal__addon[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 12px;font-size:.8125rem;background-color:var(--bg-color-grey-lighter);border:1px solid var(--cx-color-menu-item-border);border-left:none;border-radius:0 3px 3px 0;box-shadow:inset 0 1px 1px #00000013}"]})}};function mc(i,n){if(i&1&&(R(0),r(1,"h3",19),c(2),a(),b(3,"cx-configurator-group",20),F()),i&2){let e=n.$implicit,t=s(2).ngIf;
2o(2),y(" ",e.description==null?null:e.description.toLowerCase()," "),o(),m("group",e)("owner",t.owner)("isNavigationToGroupEnabled",!1)("isPricingAsync",t.isPricingAsync)}}function uc(i,n){if(i&1&&(r(0,"div"),v(1,mc,4,5,"ng-container",18),d(2,"filterConfigurationGroups"),a()),i&2){let e=s().ngIf,t=s();o(),m("ngForOf",p(2,2,e.groups))("ngForTrackBy",t.trackByGroupId)}}function gc(i,n){if(i&1&&(r(0,"div",21),b(1,"bonfiglioli-3d-preview",22),a()),i&2){let e=s(2);o(),m("externalConfiguration$",e.configuration$)("externalProduct$",e.product$)}}function _c(i,n){if(i&1&&(r(0,"tr")(1,"td"),c(2),a(),r(3,"td"),c(4),a()()),i&2){let e=n.$implicit;o(2),u(e.label),o(2),u(e.selectedSingleValue||e.userInput)}}function fc(i,n){if(i&1&&(r(0,"div")(1,"table",23)(2,"thead")(3,"tr")(4,"th"),c(5),d(6,"cxTranslate"),a(),r(7,"th"),c(8),d(9,"cxTranslate"),a()()(),r(10,"tbody"),v(11,_c,5,2,"tr",24),d(12,"async"),a()()()),i&2){let e=s(2);o(5),u(p(6,3,"quote.configurator.techData.attribute")),o(3),u(p(9,5,"quote.configurator.techData.value")),o(3),m("ngForOf",p(12,7,e.techDataCstics$))}}function Cc(i,n){if(i&1){let e=O();r(0,"div",7)(1,"div",8)(2,"button",9),_("click",function(){f(e);let l=s();return C(l.activeTab="features")}),c(3),d(4,"cxTranslate"),a(),r(5,"button",9),_("click",function(){f(e);let l=s();return C(l.activeTab="3d")}),c(6),d(7,"cxTranslate"),a(),r(8,"button",9),_("click",function(){f(e);let l=s();return C(l.activeTab="techdata")}),c(9),d(10,"cxTranslate"),a()(),r(11,"div",10)(12,"div",11),v(13,uc,3,4,"div",12)(14,gc,2,2,"div",13)(15,fc,13,9,"div",12),a(),r(16,"div",14)(17,"div",15)(18,"button",16),_("click",function(){f(e);let l=s();return C(l.saveToQuote())}),c(19),d(20,"cxTranslate"),a(),b(21,"bonfiglioli-product-configurator-sidebar",17),a()()()()}if(i&2){let e=n.ngIf,t=s();o(2),K("quote-configurator-modal__tab--active",t.activeTab==="features"),o(),y(" ",p(4,17,"quote.configurator.tabs.features")," "),o(2),K("quote-configurator-modal__tab--active",t.activeTab==="3d"),o(),y(" ",p(7,19,"quote.configurator.tabs.3dPreview")," "),o(2),K("quote-configurator-modal__tab--active",t.activeTab==="techdata"),o(),y(" ",p(10,21,"quote.configurator.tabs.techData")," "),o(4),m("ngIf",t.activeTab==="features"),o(),m("ngIf",t.activeTab==="3d"),o(),m("ngIf",t.activeTab==="techdata"),o(3),m("disabled",!e.complete||!e.consistent),o(),y(" ",p(20,23,"quote.configurator.saveToQuote")," "),o(2),m("externalConfiguration$",t.configuration$)("hideAddToCart",!0)("priceSummaryLayout",t.CONFIGURATOR_PRICE_SUMMARY_LAYOUT.QUOTE)}}var di=class i{constructor(){this.closed=new X;this.configuratorCommonsService=x(Cn);this.quoteService=x(W);this.globalMessageService=x(te);this.productService=x(nn);this.selectorService=x(Rt);this.CONFIGURATOR_TOP_SECTION=Go;this.CONFIGURATOR_PRICE_SUMMARY_LAYOUT=Wo;this.activeTab="features"}ngOnInit(){let n=this.entry?.product?.code;if(!n)return;this.owner={type:Bo.OwnerType.PRODUCT,id:n,key:`product/${n}`,configuratorType:"CPQCONFIGURATOR"};let e=this.entry?.entryCPQDesignation;e?(this.configuratorCommonsService.clearConfigurationState(this.owner),this.configuration$=this.selectorService.getConfigurationFromDesignation(n,e).pipe(Qe(),I(t=>this.configuratorCommonsService.getOrCreateConfiguration(this.owner,t.configId)),st({bufferSize:1,refCount:!0}))):(this.configuratorCommonsService.forceNewConfiguration(this.owner),this.configuration$=this.configuratorCommonsService.getOrCreateConfiguration(this.owner).pipe(st({bufferSize:1,refCount:!0}))),this.product$=this.productService.get(n).pipe(H(t=>!!t)),this.techDataCstics$=this.configuration$.pipe(H(t=>!!t?.groups),Y(t=>t.groups?.find(g=>g.name==="TECH.DATA")?.attributes?.filter(g=>g.visible)||[]))}saveToQuote(){this.configuration$.pipe(B(1)).subscribe(n=>{if(!n.complete||!n.consistent){this.globalMessageService.add({key:"quote.configurator.incompleteError"},A.MSG_TYPE_ERROR);return}this.quoteService.addConfigToQuote(this.quoteId,this.entry.entryNumber,n).subscribe({next:e=>{e.success?this.globalMessageService.add({key:"quote.configurator.saveSuccess"},A.MSG_TYPE_CONFIRMATION):this.globalMessageService.add(e.errorMsg,A.MSG_TYPE_ERROR),this.quoteService.refreshQuote(this.quoteId),this.closed.emit
2()},error:()=>{this.globalMessageService.add({key:"quote.configurator.saveError"},A.MSG_TYPE_ERROR)}})})}trackByGroupId(n,e){return e.id}close(){this.closed.emit()}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-configurator-modal"]],inputs:{entry:"entry",quoteId:"quoteId"},outputs:{closed:"closed"},standalone:!1,decls:10,vars:5,consts:[[1,"quote-configurator-modal"],[1,"quote-configurator-modal__header"],[1,"quote-configurator-modal__title"],[1,"quote-configurator-modal__header-right"],[1,"quote-configurator-modal__close",3,"click"],[1,"fas","fa-times"],["class","quote-configurator-modal__body",4,"ngIf"],[1,"quote-configurator-modal__body"],[1,"quote-configurator-modal__tabs"],[1,"quote-configurator-modal__tab",3,"click"],[1,"quote-configurator-modal__content"],[1,"quote-configurator-modal__main"],[4,"ngIf"],["class","quote-configurator-modal__3d",4,"ngIf"],[1,"quote-configurator-modal__sidebar-wrapper"],[1,"quote-configurator-modal__sidebar"],[1,"btn","btn-primary","quote-configurator-modal__save-btn",3,"click","disabled"],[3,"externalConfiguration$","hideAddToCart","priceSummaryLayout"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"quote-configurator-modal__group-title"],[3,"group","owner","isNavigationToGroupEnabled","isPricingAsync"],[1,"quote-configurator-modal__3d"],[3,"externalConfiguration$","externalProduct$"],[1,"quote-configurator-modal__tech-table"],[4,"ngFor","ngForOf"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"h4",2),c(3),a(),r(4,"div",3),b(5,"bonfiglioli-notification-dropdown"),r(6,"button",4),_("click",function(){return t.close()}),b(7,"i",5),a()()(),v(8,Cc,22,25,"div",6),d(9,"async"),a()),e&2&&(o(3),J(" ",t.entry==null||t.entry.product==null?null:t.entry.product.name," - ",t.entry==null||t.entry.product==null?null:t.entry.product.code," "),o(5),m("ngIf",p(9,3,t.configuration$)))},dependencies:[de,z,Xo,Sn,Do,Jo,ee,T,Zo],styles:[".quote-configurator-modal[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1050;background-color:var(--cx-color-light);display:flex;flex-direction:column}.quote-configurator-modal__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;border-bottom:1px solid var(--bf-color-grey-border)}.quote-configurator-modal__header-right[_ngcontent-%COMP%]{display:flex;gap:2dvw}.quote-configurator-modal__title[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:600;color:var(--bf-color-dark-grey);margin:0}.quote-configurator-modal__close[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-size:1.25rem;color:var(--bf-color-grey)}.quote-configurator-modal__close[_ngcontent-%COMP%]:hover{color:var(--bf-color-dark-grey)}.quote-configurator-modal__body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:24px}.quote-configurator-modal__tabs[_ngcontent-%COMP%]{display:flex;gap:0;border-bottom:1px solid var(--bf-color-grey-border);margin-bottom:24px}.quote-configurator-modal__tab[_ngcontent-%COMP%]{background:none;border:none;border-bottom:5px solid transparent;padding:12px 24px;font-size:.875rem;font-weight:600;color:var(--bf-color-grey);cursor:pointer}.quote-configurator-modal__tab--active[_ngcontent-%COMP%]{color:var(--cx-color-secondary);border-bottom-color:var(--cx-color-secondary)}.quote-configurator-modal__tab[_ngcontent-%COMP%]:hover:not(.quote-configurator-modal__tab--active){color:var(--bf-color-dark-grey)}.quote-configurator-modal__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}@media(min-width:992px){.quote-configurator-modal__content[_ngcontent-%COMP%]{flex-direction:row}}.quote-configurator-modal__main[_ngcontent-%COMP%]{flex:1;min-width:0}.quote-configurator-modal__sidebar-wrapper[_ngcontent-%COMP%]{width:100%;position:relative}@media(min-width:992px){.quote-configurator-modal__sidebar-wrapper[_ngcontent-%COMP%]{max-width:25%;min-height:100%}}.quote-configurator-modal__sidebar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center}.quote-configurator-modal__sidebar[_ngcontent-%COMP%] bonfiglioli-product-configurator-sidebar[_ngcontent-%COMP%]{width:100%}@media(min-width:992px){.quote-configurator-modal__sidebar[_ngcontent-%COMP%]{position:sticky;top:0}}.quote-configurator-modal__top-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}@media(min-width:992px){.quote-configurator-modal__top-section[_ngcontent-%COMP%]{flex-direction:row;gap:24px}}.quote-configurator-modal__group-title[_ngcontent-%COMP%]{color:var(--cx-color-primary);text-transform:capitalize;font-size:1.5rem;font-weight:400}.quote-configurator-modal__tech-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.quote-configurator-modal__tech-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .quote-configurator-modal__tech-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;border-bottom:1px solid var(--bf-color-grey-border);font-size:.875rem}.quote-configurator-modal__tech-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;color:var(--bf-color-dark-grey)}.quote-configurator-modal__price[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:16px 0;border-bottom:1px solid var(--bf-color-grey-border);margin-bottom:16px}.quote-configurator-modal__price-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--bf-color-dark-grey)}.quote-configurator-modal__price-value[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;color:var(--cx-color-primary)}.quote-configurator-modal__save-btn[_ngcontent-%COMP%]{width:100%;font-size:1.125rem;margin-bottom:24px}.quote-configurator-modal[_ngcontent-%COMP%] cx-configurator-group[_ngcontent-%COMP%] .cx-group-attribute--collapsed bonfiglioli-configurator-attribute-radio-button, .quote-configurator-modal[_ngcontent-%COMP%] cx-configurator-group[_ngcontent-%COMP%] .cx-group-attribute--collapsed bonfiglioli-configurator-attribute-dropdown, .quote-configurator-modal[_ngcontent-%COMP%] cx-configurator-group[_ngcontent-%COMP%] .cx-group-attribute--collapsed bonfiglioli-configurator-attribute-checkbox-list, .quote-configurator-modal[_ngcontent-%COMP%] cx-configurator-group[_ngcontent-%COMP%] .cx-group-attribute--collapsed cx-configurator-attribute-read-only{display:none}"]})}};var Nt=class i{constructor(){this.quotePricePipe=x(dt)}transform(n){return(this.quotePricePipe.transform(n)??"0")+"%"}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275pipe=vt({name:"quoteDiscountPercentage",type:i,pure:!0})}};var yc=(i,n)=>({code:i,name:n}),vc=i=>({cxRoute:"product",params:i}),cr=i=>({reason:i});function hc(i,n){if(i&1&&(r(0,"span",28),c(1),a()),i&2){let e=s().$implicit;o(),u(e.extendedDescription)}}function Oc(i,n){if(i&1&&(r(0,"span",62),c(1),a()),i&2){let e=s().$implicit;o(),u(e.entryCPQDesignation)}}function Mc(i,n){if(i&1&&(r(0,"span"),c(1),a()),i&2){let e=s(2).$implicit;o(),u(e.entryGeneratedMaterialCode)}}function Pc(i,n){if(i&1&&(r(0,"span"),c(1),a()),i&2){let e=s(2).$implicit;o(),u(e.entryGeneratedMaterialCodeStatus)}}function Sc(i,n){if(i&1&&(r(0,"div",63),b(1,"i",64),v(2,Mc,2,1,"span",37)(3,Pc,2,1,"span",37),a()),i&2){let e=s().$implicit;
2o(),K("quote-items__code-generation--requested",e.entryGeneratedMaterialCodeStatus==="REQUESTED"||e.entryGeneratedMaterialCodeStatus==="WORKING")("quote-items__code-generation--complete",e.entryGeneratedMaterialCodeStatus==="COMPLETE")("quote-items__code-generation--error",e.entryGeneratedMaterialCodeStatus==="ERROR"),o(),m("ngIf",e.entryGeneratedMaterialCode),o(),m("ngIf",!e.entryGeneratedMaterialCode)}}function wc(i,n){i&1&&(r(0,"div",65),b(1,"i",66),c(2),d(3,"cxTranslate"),a()),i&2&&(o(2),y(" ",p(3,1,"quote.entries.configIncomplete")," "))}function Ic(i,n){if(i&1){let e=O();r(0,"a",67),_("click",function(){f(e);let l=s().$implicit,g=s(2);return C(g.onEditConfiguration(l))}),c(1),d(2,"cxTranslate"),a()}i&2&&(o(),y(" ",p(2,1,"quote.entries.editConfiguration")," "))}function Ec(i,n){if(i&1&&(R(0),c(1),F()),i&2){let e=s().$implicit;o(),y(" ",e.listPrice==null?null:e.listPrice.formattedValue," ")}}function Tc(i,n){if(i&1&&(R(0),c(1),d(2,"quoteDiscountPercentage"),F()),i&2){let e=s().$implicit;o(),y(" ",p(2,1,-(e.automaticDiscount==null?null:e.automaticDiscount.value))," ")}}function Bc(i,n){if(i&1&&(R(0),c(1),d(2,"quoteDiscountPercentage"),F()),i&2){let e=s().$implicit;o(),y(" ",p(2,1,e.manualDiscount==null?null:e.manualDiscount.value)," ")}}function Dc(i,n){if(i&1&&(R(0),c(1),F()),i&2){let e=s().$implicit;o(),y(" ",e.basePrice==null?null:e.basePrice.formattedValue," ")}}function qc(i,n){if(i&1&&(R(0),c(1),F()),i&2){let e=s().$implicit;o(),y(" ",e.totalPrice==null?null:e.totalPrice.formattedValue," ")}}function kc(i,n){if(i&1&&(r(0,"option",71),c(1),a()),i&2){let e=n.$implicit;m("value",e.code),o(),J("",e.code," - ",e.textValue)}}function Rc(i,n){if(i&1){let e=O();R(0),r(1,"select",68),_("change",function(l){f(e);let g=s().$implicit,h=s(2);return C(h.onDeliveryTimeChange(g,l.target.value))}),b(2,"option",69),v(3,kc,2,3,"option",70),a(),F()}if(i&2){let e=s().$implicit,t=s(2);o(),m("ngModel",e.deliveryTime||"")("disabled",!e.updateable),o(2),m("ngForOf",t.data.quote==null?null:t.data.quote.deliveryConditions)}}function Fc(i,n){if(i&1){let e=O();R(0),r(1,"input",72,1),_("click",function(){f(e);let l=oe(2);return C(l.toggle())})("ngModelChange",function(l){f(e);let g=s().$implicit,h=s(2);return C(h.onRequestedDeliveryDateChange(g,l))}),a(),F()}if(i&2){let e=s().$implicit;o(),m("ngModel",e.requestedDeliveryDateStruct)("disabled",!e.updateable)}}function Qc(i,n){if(i&1){let e=O();r(0,"a",75),d(1,"cxTranslate"),_("click",function(){f(e);let l=s(2).$implicit,g=s(2);return C(g.onAdditionalInfo(l))}),b(2,"i",77),a()}i&2&&m("title",ht(p(1,2,"quote.entries.actions.additionalInfo")))}function Ac(i,n){if(i&1){let e=O();r(0,"a",75),d(1,"cxTranslate"),_("click",function(){f(e);let l=s(2).$implicit,g=s(2);return C(g.onUpdatePrice(l))}),b(2,"i",78),a()}i&2&&m("title",ht(p(1,2,"quote.entries.actions.updatePrice")))}function Vc(i,n){if(i&1){let e=O();r(0,"div",73),v(1,Qc,3,4,"a",74)(2,Ac,3,4,"a",74),r(3,"a",75),d(4,"cxTranslate"),_("click",function(){f(e);let l=s().$implicit,g=s(2);return C(g.onRemoveEntry(l))}),b(5,"i",76),a()()}if(i&2){let e=s().$implicit,t=s(2);o(),m("ngIf",t.isCompletedProduct(e)&&!e.sapRejectionReason),o(),m("ngIf",t.isCompletedProduct(e)&&!e.sapRejectionReason),o(),m("title",ht(p(4,4,"quote.entries.actions.remove")))}}function Lc(i,n){if(i&1&&(r(0,"span",53),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.extendedDescription," ")}}function Nc(i,n){if(i&1&&(r(0,"span",79),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.entryCPQDesignation," ")}}function $c(i,n){if(i&1&&(r(0,"span"),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.listPrice==null?null:e.listPrice.formattedValue," ")}}function Uc(i,n){if(i&1&&(r(0,"span"),c(1),d(2,"quoteDiscountPercentage"),a()),i&2){let e=s().$implicit;o(),y(" ",p(2,1,-(e.automaticDiscount==null?null:e.automaticDiscount.value))," ")}}function jc(i,n){if(i&1&&(r(0,"span"),c(1),d(2,"quoteDiscountPercentage"),a()),i&2){let e=s().$implicit;o(),y(" ",p(2,1,e.manualDiscount==null?null:e.manualDiscount.value)," ")}}function Hc(i,n){if(i&1&&(r(0,"span"),c(1),a()),i&2){let e=s().$implicit;o(),y(" ",e.basePrice==null?null:e.basePrice.formattedValue," ")}}function zc(i,n){if(i&1&&(r(0,"option",71),c(1),a()),i&2){let e=n.$implicit;m("value",e.code),o(),J(" ",e.code," - ",e.textValue," ")}}function Gc(i,n){if(i&1){let e=O();r(0,"div",80)(1,"select",68),_("change",function(l){f(e);let g=s().$implicit,h=s(2);return C(h.onDeliveryTimeChange(g,l.target.value))}),b(2,"option",69),v(3,zc,2,3,"option",70),a()()}if(i&2){let e=s().$implicit,t=s(2);o(),m("ngModel",e.deliveryTime||"")("disabled",!e.updateable),o(2),m("ngForOf",t.data.quote==null?null:t.data.quote.deliveryConditions)}}function Wc(i,n){if(i&1){let e=O();r(0,"div",80)(1,"input",72,2),_("click",function(){f(e);let l=oe(2);
2return C(l.toggle())})("ngModelChange",function(l){f(e);let g=s().$implicit,h=s(2);return C(h.onRequestedDeliveryDateChange(g,l))}),a()()}if(i&2){let e=s().$implicit;o(),m("ngModel",e.requestedDeliveryDateStruct)("disabled",!e.updateable)}}function Yc(i,n){if(i&1){let e=O();r(0,"a",83),_("click",function(){f(e);let l=s(2).$implicit,g=s(2);return C(g.onAdditionalInfo(l))}),b(1,"i",77),a()}}function Kc(i,n){if(i&1){let e=O();r(0,"a",83),_("click",function(){f(e);let l=s(2).$implicit,g=s(2);return C(g.onUpdatePrice(l))}),b(1,"i",78),a()}}function Xc(i,n){if(i&1){let e=O();r(0,"div",81),v(1,Yc,2,0,"a",82)(2,Kc,2,0,"a",82),r(3,"a",83),_("click",function(){f(e);let l=s().$implicit,g=s(2);return C(g.onRemoveEntry(l))}),b(4,"i",76),a()()}if(i&2){let e=s().$implicit,t=s(2);o(),m("ngIf",t.isCompletedProduct(e)&&!e.sapRejectionReason),o(),m("ngIf",t.isCompletedProduct(e)&&!e.sapRejectionReason)}}function Zc(i,n){i&1&&(r(0,"tr",84)(1,"td",85),b(2,"i",78),c(3),d(4,"cxTranslate"),a()()),i&2&&(o(3),y(" ",p(4,1,"quote.entries.externalConfigRetrieveHasFailed")," "))}function Jc(i,n){if(i&1){let e=O();R(0),r(1,"tr",24)(2,"td"),c(3),a(),r(4,"td",25)(5,"div")(6,"cx-icon",26),_("click",function(){let l=f(e).index,g=s(2);return C(g.toggleDescription(l))}),a(),r(7,"a",27),d(8,"cxUrl"),c(9),a()(),M(10,hc,2,1,"span",28),r(11,"span",29),c(12),a(),v(13,Oc,2,1,"span",30)(14,Sc,4,8,"div",31)(15,wc,4,3,"div",32)(16,Ic,3,3,"a",33),a(),r(17,"td",34)(18,"input",35),le("ngModelChange",function(l){let g=f(e).$implicit;return ae(g.quantity,l)||(g.quantity=l),C(l)}),_("change",function(){let l=f(e).$implicit,g=s(2);return C(g.onQuantityChange(l,l.quantity))}),a()(),r(19,"td",36),v(20,Ec,2,1,"ng-container",37),a(),r(21,"td",38),v(22,Tc,3,3,"ng-container",37),a(),r(23,"td",39),v(24,Bc,3,3,"ng-container",37),a(),r(25,"td",40),v(26,Dc,2,1,"ng-container",37),a(),r(27,"td",41),v(28,qc,2,1,"ng-container",37),a(),r(29,"td",42),v(30,Rc,4,3,"ng-container",37),a(),r(31,"td",43),v(32,Fc,3,2,"ng-container",37),a(),r(33,"td",44),v(34,Vc,6,6,"div",45),a()(),r(35,"tr",46)(36,"td",47)(37,"div",48)(38,"div",49)(39,"div",50)(40,"div",51)(41,"cx-icon",26),_("click",function(){let l=f(e).index,g=s(2);return C(g.toggleDescription(l))}),a(),r(42,"a",52),c(43),a()(),M(44,Lc,2,1,"span",53),r(45,"span",54),c(46),a(),v(47,Nc,2,1,"span",55),a()(),r(48,"div",56)(49,"div",57)(50,"span",58),c(51),d(52,"cxTranslate"),a(),v(53,$c,2,1,"span",37),a(),r(54,"div",57)(55,"span",58),c(56),d(57,"cxTranslate"),a(),v(58,Uc,3,3,"span",37),a(),r(59,"div",57)(60,"span",58),c(61),d(62,"cxTranslate"),a(),v(63,jc,3,3,"span",37),a(),r(64,"div",57)(65,"span",58),c(66),d(67,"cxTranslate"),a(),v(68,Hc,2,1,"span",37),a()(),v(69,Gc,4,3,"div",59)(70,Wc,3,2,"div",59),a(),v(71,Xc,5,2,"div",60),a()(),v(72,Zc,5,3,"tr",61),F()}if(i&2){let e=n.$implicit,t=n.index,l=s(2);o(3),y(" ",e.entryNumber," "),o(3),m("type",l.isDescriptionExpanded(t)?l.iconType.CHEVRON_UP:l.iconType.CHEVRON_DOWN),o(),m("href",e.product==null?null:e.product.url,Ae)("routerLink",p(8,39,ce(52,vc,Xt(49,yc,e.product==null?null:e.product.code,e.product==null?null:e.product.name)))),o(2),u(e.product==null?null:e.product.name),o(),P(l.isDescriptionExpanded(t)?10:-1),o(2),u(e.product==null?null:e.product.code),o(),m("ngIf",e.entryCPQDesignation),o(),m("ngIf",e.entryGeneratedMaterialCodeStatus),o(),m("ngIf",(e.configurationInfos==null?null:e.configurationInfos.length)&&e.configurationComplete===!1),o(),m("ngIf",(e.product==null?null:e.product.isSapConfigurable)&&(e.configurationInfos==null?null:e.configurationInfos.length)&&!e.sapRejectionReason&&!e.entryGeneratedMaterialCode&&!e.entryGeneratedMaterialCodeStatus),o(2),re("ngModel",e.quantity),m("disabled",!e.updateable||e.sapRejectionReason),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(2),m("ngIf",l.isCompletedProduct(e)),o(2),m("ngIf",l.isCompletedProduct(e)),o(2),m("ngIf",e.updateable),o(7),m("type",l.isDescriptionExpanded(t)?l.iconType.CHEVRON_UP:l.iconType.CHEVRON_DOWN),o(),m("href",e.product==null?null:e.product.url,Ae),o(),y(" ",e.product==null?null:e.product.name," "),o(),P(l.isDescriptionExpanded(t)?44:-1),o(2),y(" ",e.product==null?null:e.product.code," "),o(),m("ngIf",e.entryCPQDesignation),o(4),y(" ",p(52,41,"quote.entries.columns.listPrice")," "),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(3),y(" ",p(57,43,"quote.entries.columns.automaticDiscount")," "),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(3),y(" ",p(62,45,"quote.entries.columns.manualDiscount")," "),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(3),y(" ",p(67,47,"quote.entries.columns.netUnitPrice")," "),o(2),m("ngIf",l.isCompletedProduct(e)&&!l.isPendingCodeGeneration(e)),o(),m("ngIf",l.isCompletedProduct(e)),o(),m("ngIf",l.isCompletedProduct(e)),o(),m("ngIf",e.updateable),o(),m("ngIf",l.isExternalConfigRetrieveHasFailed(e))}}function ed(i,n){if(i&1&&(r(0,"tr",87)(1,"td",88),c(2),d(3,"cxTranslate"),a()()),i&2){let e=s().$implicit;o(2),y(" ",Q(3,1,"quote.entries.rejected",ce(4,cr,e.sapRejectionReason.name))," ")}}function td(i,n){if(i&1&&(R(0),v(1,ed,4,6,"tr",86),F()),i&2){let e=n.$implicit;o(),m("ngIf",e.sapRejectionReason)}}
2function nd(i,n){if(i&1&&(r(0,"tr",87)(1,"td",88),c(2),d(3,"cxTranslate"),a()()),i&2){let e=s().$implicit;o(2),y(" ",Q(3,1,"quote.entries.rejected",ce(4,cr,e.sapRejectionReason.name))," ")}}function id(i,n){if(i&1&&(R(0),v(1,nd,4,6,"tr",86),F()),i&2){let e=n.$implicit;o(),m("ngIf",e.sapRejectionReason)}}function od(i,n){if(i&1&&(r(0,"div",89)(1,"span"),c(2),d(3,"cxTranslate"),a(),r(4,"span"),c(5),a()()),i&2){let e=s(2);o(2),u(p(3,2,"quote.entries.totals.discounts")),o(3),y("-",e.data.quote==null||e.data.quote.totalDiscounts==null?null:e.data.quote.totalDiscounts.formattedValue)}}function rd(i,n){if(i&1&&(r(0,"div",6)(1,"table",7)(2,"thead")(3,"tr")(4,"th",8),c(5),d(6,"cxTranslate"),a(),r(7,"th",9),c(8),d(9,"cxTranslate"),a(),r(10,"th",10),c(11),d(12,"cxTranslate"),a(),r(13,"th",11),c(14),d(15,"cxTranslate"),a(),r(16,"th",12),c(17),d(18,"cxTranslate"),a(),r(19,"th",13),c(20),d(21,"cxTranslate"),a(),r(22,"th",14),c(23),d(24,"cxTranslate"),a(),r(25,"th",15),c(26),d(27,"cxTranslate"),a(),r(28,"th",16),c(29),d(30,"cxTranslate"),a(),r(31,"th",17),c(32),d(33,"cxTranslate"),a(),b(34,"th",18),a()(),r(35,"tbody"),v(36,Jc,73,54,"ng-container",19)(37,td,2,1,"ng-container",20)(38,id,2,1,"ng-container",20),a()(),r(39,"div",21),v(40,od,6,4,"div",22),r(41,"div",23)(42,"span"),c(43),d(44,"cxTranslate"),a(),r(45,"span"),c(46),a()()()()),i&2){let e=s();o(5),u(p(6,17,"quote.entries.columns.number")),o(3),u(p(9,19,"quote.entries.columns.product")),o(3),u(p(12,21,"quote.entries.columns.qty")),o(3),u(p(15,23,"quote.entries.columns.listPrice")),o(3),u(p(18,25,"quote.entries.columns.discount")),o(3),u(p(21,27,"quote.entries.columns.manualDiscount")),o(3),u(p(24,29,"quote.entries.columns.netUnitPrice")),o(3),u(p(27,31,"quote.entries.columns.totalPrice")),o(3),u(p(30,33,"quote.entries.columns.leadTime")),o(3),u(p(33,35,"quote.entries.columns.reqDeliveryDate")),o(4),m("ngForOf",e.data.quote==null?null:e.data.quote.entries)("ngForTrackBy",e.trackByEntry),o(),m("ngForOf",e.data.quote==null?null:e.data.quote.entries),o(),m("ngForOf",e.data.quote==null?null:e.data.quote.entries),o(2),m("ngIf",e.data.quote==null||e.data.quote.totalDiscounts==null?null:e.data.quote.totalDiscounts.value),o(3),u(p(44,37,"quote.entries.totals.total")),o(3),u(e.data.quote==null||e.data.quote.totalPrice==null?null:e.data.quote.totalPrice.formattedValue)}}function ad(i,n){i&1&&(r(0,"p",90),c(1),d(2,"cxTranslate"),a()),i&2&&(o(),u(p(2,1,"quote.entries.empty")))}function ld(i,n){if(i&1){let e=O();r(0,"bonfiglioli-quote-configurator-modal",91),_("closed",function(){f(e);let l=s();return C(l.onCloseConfigurator())}),a()}if(i&2){let e=s();m("entry",e.configuratorEntry)("quoteId",e.data.quote==null?null:e.data.quote.code)}}function cd(i,n){if(i&1){let e=O();r(0,"div",92)(1,"div",93)(2,"h4",94),c(3),d(4,"cxTranslate"),a(),r(5,"p",95),c(6),d(7,"cxTranslate"),a(),r(8,"div",96)(9,"button",97),_("click",function(){f(e);let l=s();return C(l.onCancelGenerateCode())}),c(10),d(11,"cxTranslate"),a(),r(12,"button",98),_("click",function(){f(e);let l=s();return C(l.onConfirmGenerateCode())}),c(13),d(14,"cxTranslate"),a()()()()}i&2&&(o(3),u(p(4,4,"quote.header.generateCodes.title")),o(3),u(p(7,6,"quote.header.generateCodes.message")),o(4),y(" ",p(11,8,"quote.header.generateCodes.cancel")," "),o(3),y(" ",p(14,10,"quote.header.generateCodes.confirm")," "))}var si=class i{constructor(n){this.formatter=n;this.quoteService=x(W);this.modalService=x(vn);this.iconType=ue;this.configuratorEntry=null;this.generateCodeEntry=null;this.expandedDescriptions=new Set;this.formatter.setFormat("slash")}set data(n){console.log("NEW DATA"),this._data=n,this._data.quote?.entries?.forEach(e=>{e.requestedDeliveryDateStruct=e.requestedDeliveryDate?this.getStructDate(e.requestedDeliveryDate):null})}get data(){return this._data}isCompletedProduct(n){return!(n.configurationInfos?.length&&n.configurationComplete===!1)}isPendingCodeGeneration(n){return n.configurationInfos?.length&&n.configurationComplete===!0&&!n.entryGeneratedMaterialCode&&n.product?.isSapConfigurable&&n}isExternalConfigRetrieveHasFailed(n){return n.externalConfigRetrieveHasFailed===!0}formatDate(n){return n?n.split("T")[0].split("-").reverse().join("/"):""}getStructDate(n){let[e]=n.split("T"),[t,l,g]=e.split("-").map(Number),h=new Date(t,l-1,g);
2return h.setDate(h.getDate()+1),{year:h.getFullYear(),month:h.getMonth()+1,day:h.getDate()}}onQuantityChange(n,e){let t=this.data.quote?.code;t&&this.quoteService.updateQuantity(t,n.entryNumber,e).subscribe(()=>{this.quoteService.refreshQuote(t)})}onDeliveryTimeChange(n,e){let t=this.data.quote?.code;if(!t)return;let l={entryNumber:n.entryNumber,deliveryTime:e};n.requestedDeliveryDate&&(l.requestedDeliveryDate=new Date(n.requestedDeliveryDate)),this.quoteService.updateField(t,{entries:[l]}).subscribe(()=>{this.quoteService.refreshQuote(t)})}onRequestedDeliveryDateChange(n,e){console.log("date changed",e);let t=this.data.quote?.code;if(!t)return;let l=new Date(e.year,e.month-1,e.day);this.quoteService.updateField(t,{entries:[{entryNumber:n.entryNumber,deliveryTime:n.deliveryTime||"",requestedDeliveryDate:l}]}).subscribe(()=>{this.quoteService.refreshQuote(t)})}onEditConfiguration(n){this.configuratorEntry=n}onCloseConfigurator(){this.configuratorEntry=null}onUpdatePrice(n){let e=this.modalService.open(li,{size:"lg",centered:!0});e.componentInstance.entry=n,e.componentInstance.quoteId=this.data.quote?.code,e.componentInstance.discountOptions=this.data.quote?.discountOptions}onAdditionalInfo(n){let e=this.modalService.open(ci,{size:"lg",centered:!0});e.componentInstance.entry=n,e.componentInstance.quoteId=this.data.quote?.code}onGenerateCode(n){this.generateCodeEntry=n}onConfirmGenerateCode(){let n=this.data.quote?.code,e=this.generateCodeEntry;this.generateCodeEntry=null,!(!n||!e)&&this.quoteService.generateEntryCode(n,e.entryNumber).subscribe(()=>{this.quoteService.refreshQuote(n)})}onCancelGenerateCode(){this.generateCodeEntry=null}onRemoveEntry(n){let e=this.data.quote?.code;e&&this.quoteService.updateQuantity(e,n.entryNumber,0).subscribe(()=>{this.quoteService.refreshQuote(e)})}toggleDescription(n){this.expandedDescriptions.has(n)?this.expandedDescriptions.delete(n):this.expandedDescriptions.add(n)}isDescriptionExpanded(n){return this.expandedDescriptions.has(n)}trackByEntry(n,e){return e.entryNumber}static{this.\u0275fac=function(e){return new(e||i)(D(lt))}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-items"]],inputs:{data:"data"},standalone:!1,decls:5,vars:4,consts:[["noEntries",""],["dp","ngbDatepicker"],["mobileDp","ngbDatepicker"],["class","quote-items",4,"ngIf","ngIfElse"],[3,"entry","quoteId","closed",4,"ngIf"],["class","quote-items__modal-overlay",4,"ngIf"],[1,"quote-items"],[1,"quote-items__table"],[1,"quote-items__th"],[1,"quote-items__th--info"],[1,"quote-items__th--qty"],[1,"quote-items__th--price"],[1,"quote-items__th--discount"],[1,"quote-items__th--manual-discount"],[1,"quote-items__th--net-price"],[1,"quote-items__th--total"],[1,"quote-items__th--delivery","required"],[1,"quote-items__th--date","required"],[1,"quote-items__th--actions"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngFor","ngForOf"],[1,"quote-items__totals"],["class","quote-items__totals-row",4,"ngIf"],[1,"quote-items__totals-row","quote-items__totals-row--total"],[1,"quote-items__row","quote-items__row--desktop"],[1,"quote-items__td--info"],[3,"click","type"],["target","_blank",1,"quote-items__product-name",3,"href","routerLink"],[1,"quote-items__extended-description"],[1,"quote-items__product-code"],["class","quote-items__product-designation",4,"ngIf"],["class","quote-items__code-generation",4,"ngIf"],["class","quote-items__config-incomplete",4,"ngIf"],["class","quote-items__config-edit",3,"click",4,"ngIf"],[1,"quote-items__td--qty"],["type","number","min","1",1,"bf-input",3,"ngModelChange","change","ngModel","disabled"],[1,"quote-items__td--price"],[4,"ngIf"],[1,"quote-items__td--discount"],[1,"quote-items__td--manual-discount"],[1,"quote-items__td--net-price"],[1,"quote-items__td--total"],[1,"quote-items__td--delivery"],[1,"quote-items__td--date"],[1,"quote-items__td--actions"],["class","quote-items__actions",4,"ngIf"],[1,"quote-items__row","quote-items__row--mobile"],["colspan","10"],[1,"quote-items-mobile"],[1,"quote-items-mobile__header"],[1,"quote-items-mobile__product"],[1,"quote-items-mobile__product-header"],[1,"quote-items-mobile__name",3,"href"],[1,"quote-items-mobile__description"],[1,"quote-items-mobile__code"],["class","quote-items-mobile__designation",4,"ngIf"],[1,"quote-items-mobile__grid"],[1,"quote-items-mobile__field"],[1,"quote-items-mobile__label"],["class","quote-items-mobile__field quote-items-mobile__field--full",4,"ngIf"],["class","quote-items-mobile__actions",4,"ngIf"],["class","quote-items__row--pending-code",4,"ngIf"],[1,"quote-items__product-designation"],[1,"quote-items__co
2de-generation"],[1,"fas","fa-wrench"],[1,"quote-items__config-incomplete"],[1,"fas","fa-exclamation-triangle"],[1,"quote-items__config-edit",3,"click"],[1,"bf-select",3,"change","ngModel","disabled"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["type","text","ngbDatepicker","","readonly","",1,"bf-input",3,"click","ngModelChange","ngModel","disabled"],[1,"quote-items__actions"],[3,"title","click",4,"ngIf"],[3,"click","title"],[1,"fas","fa-trash"],[1,"fas","fa-comment-alt"],[1,"fas","fa-info-circle"],[1,"quote-items-mobile__designation"],[1,"quote-items-mobile__field","quote-items-mobile__field--full"],[1,"quote-items-mobile__actions"],[3,"click",4,"ngIf"],[3,"click"],[1,"quote-items__row--pending-code"],["colspan","10",1,"quote-items__pending-code"],["class","quote-items__row--rejected",4,"ngIf"],[1,"quote-items__row--rejected"],["colspan","10",1,"quote-items__rejected"],[1,"quote-items__totals-row"],[1,"quote-items__empty"],[3,"closed","entry","quoteId"],[1,"quote-items__modal-overlay"],[1,"quote-items__modal"],[1,"quote-items__modal-title"],[1,"quote-items__modal-message"],[1,"quote-items__modal-actions"],[1,"btn","btn-secondary",3,"click"],[1,"btn","btn-primary",3,"click"]],template:function(e,t){if(e&1&&v(0,rd,47,39,"div",3)(1,ad,3,3,"ng-template",null,0,Oe)(3,ld,1,2,"bonfiglioli-quote-configurator-modal",4)(4,cd,15,12,"div",5),e&2){let l=oe(2);m("ngIf",t.data.quote==null||t.data.quote.entries==null?null:t.data.quote.entries.length)("ngIfElse",l),o(3),m("ngIf",t.configuratorEntry),o(),m("ngIf",t.generateCodeEntry)}},dependencies:[de,z,we,Ie,pe,St,Se,G,rn,ne,N,Bt,Pe,di,T,Nt,Re],styles:['.quote-items__table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.quote-items__table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:12px 4px;font-size:.75rem;font-weight:600;color:var(--bf-color-grey);text-align:left;border-bottom:2px solid var(--bf-color-grey-border)}.quote-items__table[_ngcontent-%COMP%] th.required[_ngcontent-%COMP%]:after{content:" *";color:red}.quote-items__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 4px;font-size:.8125rem;color:var(--bf-color-dark-grey);vertical-align:middle;border-bottom:1px solid var(--bf-color-grey-border)}.quote-items__th--info[_ngcontent-%COMP%]{width:20%}.quote-items__th--qty[_ngcontent-%COMP%]{width:80px}.quote-items__th--price[_ngcontent-%COMP%], .quote-items__th--discount[_ngcontent-%COMP%], .quote-items__th--manual-discount[_ngcontent-%COMP%], .quote-items__th--net-price[_ngcontent-%COMP%], .quote-items__th--total[_ngcontent-%COMP%]{width:90px}.quote-items__th--delivery[_ngcontent-%COMP%]{width:120px}.quote-items__th--date[_ngcontent-%COMP%]{width:130px}.quote-items__th--actions[_ngcontent-%COMP%]{width:100px}.quote-items__td--info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.quote-items__td--info[_ngcontent-%COMP%] cx-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--cx-color-secondary)}.quote-items__td--qty[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{width:80px;padding-right:8px}.quote-items__td--delivery[_ngcontent-%COMP%] .bf-select[_ngcontent-%COMP%], .quote-items__td--date[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%]{width:100%;font-size:.75rem}.quote-items__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:8px}.quote-items__actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;color:var(--bf-color-grey);font-size:.875rem}.quote-items__actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--cx-color-primary)}.quote-items__product-name[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;color:var(--cx-color-secondary);text-decoration:none}.quote-items__product-name[_ngcontent-%COMP%]:hover{text-decoration:underline}.quote-items__extended-description[_ngcontent-%COMP%]{color:var(--cx-color-primary)}.quote-items__product-code[_ngcontent-%COMP%]{font-size:.75rem;color:var(--bf-color-grey)}.quote-items__product-designation[_ngcontent-%COMP%]{font-size:.75rem;color:var(--bf-color-dark-grey)}.quote-items__product-material[_ngcontent-%COMP%]{font-size:.75rem;color:var(--cx-label-success)}
2.quote-items__code-generation[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:.75rem}.quote-items__code-generation--requested[_ngcontent-%COMP%]{color:orange}.quote-items__code-generation--complete[_ngcontent-%COMP%]{color:var(--cx-label-success)}.quote-items__code-generation--error[_ngcontent-%COMP%]{color:var(--cx-label-danger)}.quote-items__config-incomplete[_ngcontent-%COMP%]{font-size:.75rem;color:var(--cx-label-danger)}.quote-items__config-incomplete[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px}.quote-items__config-edit[_ngcontent-%COMP%]{font-size:.75rem;color:var(--cx-color-secondary);cursor:pointer}.quote-items__config-edit[_ngcontent-%COMP%]:hover{text-decoration:underline}.quote-items__row--rejected[_ngcontent-%COMP%]{background-color:#fff5f5}.quote-items__rejected[_ngcontent-%COMP%]{font-size:.75rem;color:var(--cx-label-danger);padding:8px 4px}.quote-items__row--pending-code[_ngcontent-%COMP%]{background-color:#fff8e1}.quote-items__row--mobile[_ngcontent-%COMP%]{display:none}.quote-items__pending-code[_ngcontent-%COMP%]{font-size:.75rem;color:var(--cx-label-warning);padding:8px 4px}.quote-items__pending-code[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px}.quote-items__empty[_ngcontent-%COMP%]{font-size:.875rem;color:var(--bf-color-grey);padding:16px 0}.quote-items__totals[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;padding:16px 0;gap:8px}.quote-items__totals-row[_ngcontent-%COMP%]{display:flex;gap:24px;font-size:.875rem;color:var(--bf-color-dark-grey)}.quote-items__totals-row--total[_ngcontent-%COMP%]{font-weight:600;font-size:1rem;padding-top:8px;border-top:1px solid var(--bf-color-grey-border)}.quote-items__totals-row--mobile[_ngcontent-%COMP%]{display:none}.quote-items__modal-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1050}.quote-items__modal[_ngcontent-%COMP%]{background:var(--cx-color-light);border-radius:4px;padding:24px;min-width:400px;max-width:500px}.quote-items__modal-title[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:600;margin-bottom:12px}.quote-items__modal-message[_ngcontent-%COMP%]{font-size:.875rem;margin-bottom:24px;color:var(--bf-color-dark-grey)}.quote-items__modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.quote-items-mobile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:16px 0}.quote-items-mobile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row}.quote-items-mobile__product[_ngcontent-%COMP%]{display:flex;flex-direction:column}.quote-items-mobile__product-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px}.quote-items-mobile__product-header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-height:unset}.quote-items-mobile__name[_ngcontent-%COMP%]{font-weight:700}.quote-items-mobile__name[_ngcontent-%COMP%]:hover{text-decoration:none;color:var(--bf-color-black)}.quote-items-mobile__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-right:10px}.quote-items-mobile__actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center}.quote-items-mobile__actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem}.quote-items-mobile__field--full[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-height:unset}.quote-items-mobile__field--full[_ngcontent-%COMP%] input.bf-input[_ngcontent-%COMP%]{padding:3px 16px;width:120px;color:var(--cx-color-primary)!important}.quote-items-mobile__field--full[_ngcontent-%COMP%] select.bf-select[_ngcontent-%COMP%]{color:var(--cx-color-primary)!important}@media(max-width:992px){.quote-items__table[_ngcontent-%COMP%]{width:100%}.quote-items__table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%], .quote-items__row--desktop[_ngcontent-%COMP%]{display:none}.quote-items__row--mobile[_ngcontent-%COMP%]{display:table-row}.quote-items__row--mobile[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0;display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--cx-color-primary)}}']}
2)}};var pi=class i{constructor(){this.addedToQuote=new X}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-quick-order"]],inputs:{data:"data"},outputs:{addedToQuote:"addedToQuote"},standalone:!1,decls:1,vars:1,consts:[[3,"addedToQuote","quoteId"]],template:function(e,t){e&1&&(r(0,"bonfiglioli-quick-order",0),_("addedToQuote",function(){return t.addedToQuote.emit()}),a()),e&2&&m("quoteId",t.data.quote==null?null:t.data.quote.code)},dependencies:[Lt],styles:[".quote-quick-order[_ngcontent-%COMP%]{padding:16px 0}"]})}};function pd(i,n){if(i&1&&(r(0,"option",13),c(1),a()),i&2){let e=n.$implicit;m("value",e.code)("selected",e.selected),o(),J(" ",e.code," - ",e.textValue," ")}}function md(i,n){if(i&1&&(r(0,"option",14),c(1),a()),i&2){let e=n.$implicit;m("value",e.code),o(),J(" ",e.code," - ",e.textValue," ")}}function ud(i,n){if(i&1&&(r(0,"option",13),c(1),a()),i&2){let e=n.$implicit;m("value",e.code)("selected",e.selected),o(),J(" ",e.code," - ",e.textValue," ")}}function gd(i,n){if(i&1&&(r(0,"option",14),c(1),a()),i&2){let e=n.$implicit;m("value",e.code),o(),J(" ",e.code," - ",e.textValue," ")}}function _d(i,n){if(i&1&&(r(0,"option",13),c(1),a()),i&2){let e=n.$implicit,t=s();m("value",e.code)("selected",(t.data.quote==null?null:t.data.quote.orderReason)===e.code),o(),J(" ",e.code," - ",e.name," ")}}var mi=class i{constructor(){this.quoteService=x(W);this.DATE_FORMAT="dd/MM/yyyy"}onFieldChange(n,e){let t=this.data.quote?.code;t&&this.quoteService.updateField(t,{[n]:e}).pipe(L(()=>this.quoteService.refreshQuote(t))).subscribe()}onDeliveryDateChange(n){this.onFieldChange("requestedDeliveryDate",new Date(n.year,n.month-1,n.day))}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-sales-conditions"]],inputs:{data:"data"},standalone:!1,decls:69,vars:63,consts:[["dpDelivery","ngbDatepicker"],[1,"quote-sales-conditions"],[1,"quote-sales-conditions__row"],[1,"quote-sales-conditions__field"],["type","text","disabled","",1,"bf-input",3,"value"],["type","text","ngbDatepicker","","readonly","",1,"bf-input",3,"click","dateSelect","disabled","value"],[1,"bf-select",3,"change","disabled","value"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"bf-select",3,"change","ngModel","disabled"],[3,"value",4,"ngFor","ngForOf"],[1,"bf-select",3,"change","value","disabled"],["value",""],["value","EMPTY"],[3,"value","selected"],[3,"value"]],template:function(e,t){if(e&1){let l=O();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"label"),c(4),d(5,"cxTranslate"),a(),b(6,"input",4),a(),r(7,"div",3)(8,"label"),c(9),d(10,"cxTranslate"),a(),r(11,"input",5,0),d(13,"cxDate"),_("click",function(){f(l);let h=oe(12);return C(h.toggle())})("dateSelect",function(h){return t.onDeliveryDateChange(h)}),a()()(),r(14,"div",2)(15,"div",3)(16,"label"),c(17),d(18,"cxTranslate"),a(),b(19,"input",4),d(20,"cxDate"),a(),r(21,"div",3)(22,"label"),c(23),d(24,"cxTranslate"),a(),b(25,"input",4),d(26,"cxDate"),a()(),r(27,"div",2)(28,"div",3)(29,"label"),c(30),d(31,"cxTranslate"),a(),r(32,"select",6),_("change",function(h){return t.onFieldChange("incotermsCondition",h.target.value)}),v(33,pd,2,4,"option",7),a()(),r(34,"div",3)(35,"label"),c(36),d(37,"cxTranslate"),a(),b(38,"input",4),d(39,"cxDate"),a()(),r(40,"div",2)(41,"div",3)(42,"label"),c(43),d(44,"cxTranslate"),a(),r(45,"select",8),_("change",function(h){return t.onFieldChange("packagingCondition",h.target.value)}),v(46,md,2,3,"option",9),a()(),r(47,"div",3)(48,"label"),c(49),d(50,"cxTranslate"),a(),r(51,"select",10),_("change",function(h){return t.onFieldChange("paymentCondition",h.target.value)}),b(52,"option",11),v(53,ud,2,4,"option",7),a()()(),r(54,"div",2)(55,"div",3)(56,"label"),c(57),d(58,"cxTranslate"),a(),r(59,"select",8),_("change",function(h){return t.onFieldChange("transportCondition",h.target.value)}),v(60,gd,2,3,"option",9),a()(),r(61,"div",3)(62,"label"),c(63),d(64,"cxTranslate"),a(),r(65,"select",6),_("change",function(h){return t.onFieldChange("orderReason",h.target.value)}),r(66,"option",12),c(67,"No order reason"),a(),v(68,_d,2,4,"option",7),a()()()()}e&2&&(o(4),u(p(5,31,"quote.salesConditions.poNumber")),o(2),m("value",(t.data.quote==null?null:t.data.quote.poNumber)||""),o(3),u(p(10,33,"quote.salesConditions.requestedDeliveryDate")),o(2),m("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length))("value",Q(13,35,t.data.quote==null?null:t.data.quote.requestedDeliveryDate,t.DATE_FORMAT)),o(6),u(p(18,38,"quote.salesConditions.validFrom")),o(2),m("value",Q(20,40,t.data.quote==null?null:t.data.quote.validFrom,t.DATE_FORMAT)),o(4),u(p(24,43,"quote.salesConditions.validTo")),o(2),m("value",Q(26,45,t.data.quote==null?null:t.data.quote.validTo,t.DATE_FORMAT)),o(5),u(p(31,48,"quote.salesConditions.incoterms")),o(2),m("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length))("value",(t.data.quote==null?null:t.data.quote.incotermsCondition)||""),o(),m("ngForOf",t.data.quote==null?null:t.data.quote.incotermsConditions),o(3),u(p(37,50,"quote.salesConditions.poDate")),o(2),m("value",Q(39,52,t.data.quote==null?null:t.data.quote.poDate,t.DATE_FORMAT)),o(5),u(p(44,55,"quote.salesConditions.packagingCosts")),o(2),m("ngModel",(t.data.quote==null?null:t.data.quote.packagingCondition)||"")("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length)),o(),m("ngForOf",t.data.quote==null?null:t.data.quote.packagingConditions),o(3),u(p(50,57,"quote.salesConditions.payment")),o(2),m("value",(t.data.quote==null?null:t.data.quote.paymentCondition)||"")("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length)),o(2),m("ngForOf",t.data.quote==null?null:t.data.quote.paymentsConditions),o(4),u(p(58,59,"quote.salesConditions.transport")),o(2),m("ngModel",(t.data.quote==null?null:t.data.quote.transportCondition)||"")("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length)),o(),m("ngForOf",t.data.quote==null?null:t.data.quote.transportConditions),o(3),u(p(64,61,"quote.salesConditions.orderReason")),o(2),m("disabled",!(!(t.data.quote==null||t.data.quote.entries==null)&&t.data.quote.entries.length))("value",(t.data.quote==null?null:t.data.quote.selectableOrderReasons)||"EMPTY"),o(3),m("ngForOf",t.data.quote==null?null:t.data.quote.selectableOrderReasons))},dependencies:[de,we,Ie,Se,G,ne,Bt,T,Ze],styles:[".quote-sales-conditions__row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px}.quote-sales-conditions__field[_ngcontent-%COMP%]{flex:1}.quote-sales-conditions__field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-grey);margin-bottom:4px;display:block}.quote-sales-conditions__field[_ngcontent-%COMP%] .bf-input[_ngcontent-%COMP%], .quote-sales-conditions__field[_ngcontent-%COMP%] .bf-select[_ngcontent-%COMP%]{width:100%}"]})}};var ui=class i{constructor(){this.quoteService=x(W)}
2onFieldChange(n,e){let t=this.data.quote?.code;t&&this.quoteService.updateField(t,{[n]:e}).subscribe(()=>{this.quoteService.refreshQuote(t)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-notes"]],inputs:{data:"data"},standalone:!1,decls:21,vars:12,consts:[[1,"quote-notes"],[1,"quote-notes__row"],[1,"quote-notes__field"],["type","text","maxlength","255",1,"bf-textarea",3,"change","value"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"label"),c(4),d(5,"cxTranslate"),a(),r(6,"textarea",3),_("change",function(g){return t.onFieldChange("allDocumentText",g.target.value)}),c(7," "),a()(),r(8,"div",2)(9,"label"),c(10),d(11,"cxTranslate"),a(),r(12,"textarea",3),_("change",function(g){return t.onFieldChange("warranty",g.target.value)}),c(13," "),a()()(),r(14,"div",1)(15,"div",2)(16,"label"),c(17),d(18,"cxTranslate"),a(),r(19,"textarea",3),_("change",function(g){return t.onFieldChange("quotationNote",g.target.value)}),c(20," "),a()()()()),e&2&&(o(4),u(p(5,6,"quote.notes.allDocumentText")),o(2),m("value",(t.data.quote==null?null:t.data.quote.allDocumentText)||""),o(4),u(p(11,8,"quote.notes.warranty")),o(2),m("value",(t.data.quote==null?null:t.data.quote.warranty)||""),o(5),u(p(18,10,"quote.notes.quotationNote")),o(2),m("value",(t.data.quote==null?null:t.data.quote.quotationNote)||""))},dependencies:[T],styles:[".quote-notes__row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:16px}.quote-notes__field[_ngcontent-%COMP%]{flex:1}.quote-notes__field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--bf-color-grey);margin-bottom:4px;display:block}.quote-notes__field[_ngcontent-%COMP%] .bf-textarea[_ngcontent-%COMP%]{width:100%;resize:none;min-height:40px;box-shadow:inset 0 1px 1px #00000013;color:var(--cx-color-primary);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;border:1px solid var(--cx-color-menu-item-border);border-radius:3px;padding:7px 32px 7px 16px;min-height:245px}.quote-notes__field[_ngcontent-%COMP%] .bf-textarea[_ngcontent-%COMP%]:focus{border-color:var(--cx-color-primary)}"]})}};function bd(i,n){if(i&1&&(r(0,"option",4),c(1),a()),i&2){let e=n.$implicit;m("value",e.id),o(),Qi("",e.id," - ",e.formattedAddress," (",e.firstName,")")}}var gi=class i{constructor(){this.quoteService=x(W)}onShipToChange(n){let e=this.data.quote?.code;e&&this.quoteService.updateField(e,{"shipToParty.id":n}).subscribe(()=>{this.quoteService.refreshQuote(e)})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-partners"]],inputs:{data:"data"},standalone:!1,decls:47,vars:33,consts:[[1,"quote-partners"],[1,"quote-partners__table"],[1,"bf-select",3,"change","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"table",1)(2,"thead")(3,"tr")(4,"th"),c(5),d(6,"cxTranslate"),a(),r(7,"th"),c(8),d(9,"cxTranslate"),a(),r(10,"th"),c(11),d(12,"cxTranslate"),a()()(),r(13,"tbody")(14,"tr")(15,"td"),c(16),d(17,"cxTranslate"),a(),r(18,"td"),c(19),a(),r(20,"td"),c(21),a()(),r(22,"tr")(23,"td"),c(24),d(25,"cxTranslate"),a(),r(26,"td"),c(27),a(),r(28,"td"),c(29),a()(),r(30,"tr")(31,"td"),c(32),d(33,"cxTranslate"),a(),r(34,"td"),c(35),a(),r(36,"td"),c(37),a()(),r(38,"tr")(39,"td"),c(40),d(41,"cxTranslate"),a(),r(42,"td")(43,"select",2),_("change",function(g){return t.onShipToChange(g.target.value)}),v(44,bd,2,4,"option",3),a()(),r(45,"td"),c(46),a()()()()()),e&2&&(o(5),u(p(6,19,"quote.partners.function")),o(3),u(p(9,21,"quote.partners.partner")),o(3),u(p(12,23,"quote.partners.address")),o(5),u(p(17,25,"quote.partners.soldTo")),o(3),J("",t.data.quote==null||t.data.quote.soldToParty==null?null:t.data.quote.soldToParty.id," - ",t.data.quote==null||t.data.quote.soldToParty==null?null:t.data.quote.soldToParty.firstName),o(2),u(t.data.quote==null||t.data.quote.soldToParty==null?null:t.data.quote.soldToParty.formattedAddress),o(3),u(p(25,27,"quote.partners.billTo")),o(3),J("",t.data.quote==null||t.data.quote.billToParty==null?null:t.data.quote.billToParty.id," - ",t.data.quote==null||t.data.quote.billToParty==null?null:t.data.quote.billToParty.firstName),o(2),u(t.data.quote==null||t.data.quote.billToParty==null?null:t.data.quote.billToParty.formattedAddress),o(3),u(p(33,29,"quote.partners.payer")),o(3),J("",t.data.quote==null||t.data.quote.payerParty==null?null:t.data.quote.payerParty.id," - ",t.data.quote==null||t.data.quote.payerParty==null?null:t.data.quote.payerParty.firstName),o(2),u(t.data.quote==null||t.data.quote.payerParty==null?null:t.data.quote.payerParty.formattedAddress),o(3),u(p(41,31,"quote.partners.shipTo")),o(3),m("ngModel",t.data.quote==null||t.data.quote.shipToParty==null?null:t.data.quote.shipToParty.id),o(),m("ngForOf",t.data.quote==null?null:t.data.quote.shipToList),o(2),u(t.data.quote==null||t.data.quote.shipToParty==null?null:t.data.quote.shipToParty.formattedAddress))},dependencies:[de,we,Ie,Se,G,ne,T],styles:[".quote-partners__table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.quote-partners__table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:12px 8px;font-size:.75rem;font-weight:600;color:var(--bf-color-grey);text-align:left;border-bottom:2px solid var(--bf-color-grey-border);text-transform:uppercase}.quote-partners__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 8px;font-size:.875rem;color:var(--bf-color-dark-grey);border-bottom:1px solid var(--bf-color-grey-border);vertical-align:middle}.quote-partners__table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .bf-select[_ngcontent-%COMP%]{width:100%;text-transform:uppercase}"]})}};var yd=["tabContent"];
2function vd(i,n){i&1&&(R(0),r(1,"div",3),c(2,"Loading..."),a(),F())}function hd(i,n){if(i&1&&(R(0),r(1,"div",5),c(2),a(),F()),i&2){let e=n.ngIf;o(2),u(e)}}function Od(i,n){if(i&1&&(r(0,"div",14),b(1,"bonfiglioli-quote-info",7),a()),i&2){let e=s().ngIf;o(),m("data",e)}}function Md(i,n){if(i&1&&b(0,"bonfiglioli-quote-items",7),i&2){let e=s(2).ngIf;m("data",e)}}function Pd(i,n){if(i&1){let e=O();r(0,"bonfiglioli-quote-quick-order",17),_("addedToQuote",function(){f(e);let l=s(4);return C(l.switchToItemsTab())}),a()}if(i&2){let e=s(2).ngIf;m("data",e)}}function Sd(i,n){if(i&1&&(r(0,"div",14)(1,"div",15),b(2,"cx-tab",16),a(),v(3,Md,1,1,"ng-template",null,1,Oe)(5,Pd,1,1,"ng-template",null,1,Oe),a()),i&2){let e=s(3);o(2),m("tabs",e.tabs)("config",e.tabConfig)}}function wd(i,n){if(i&1&&(r(0,"div",14),b(1,"bonfiglioli-quote-sales-conditions",7),a()),i&2){let e=s().ngIf;o(),m("data",e)}}function Id(i,n){if(i&1&&(r(0,"div",14),b(1,"bonfiglioli-quote-notes",7),a()),i&2){let e=s().ngIf;o(),m("data",e)}}function Ed(i,n){if(i&1&&(r(0,"div",14),b(1,"bonfiglioli-quote-partners",7),a()),i&2){let e=s().ngIf;o(),m("data",e)}}function Td(i,n){if(i&1){let e=O();R(0),r(1,"div",6),b(2,"bonfiglioli-quote-header",7),r(3,"div",8)(4,"div",9),_("click",function(){f(e);let l=s(2);return C(l.toggleInfo())}),r(5,"span",10),c(6),d(7,"cxTranslate"),a(),r(8,"button",11),b(9,"i",12),a()(),v(10,Od,2,1,"div",13),a(),r(11,"div",8)(12,"div",9),_("click",function(){f(e);let l=s(2);return C(l.toggleEntries())}),r(13,"span",10),c(14),d(15,"cxTranslate"),a(),r(16,"button",11),b(17,"i",12),a()(),v(18,Sd,7,2,"div",13),a(),r(19,"div",8)(20,"div",9),_("click",function(){f(e);let l=s(2);return C(l.toggleSales())}),r(21,"span",10),c(22),d(23,"cxTranslate"),a(),r(24,"button",11),b(25,"i",12),a()(),v(26,wd,2,1,"div",13),a(),r(27,"div",8)(28,"div",9),_("click",function(){f(e);let l=s(2);return C(l.toggleNotes())}),r(29,"span",10),c(30),d(31,"cxTranslate"),a(),r(32,"button",11),b(33,"i",12),a()(),v(34,Id,2,1,"div",13),a(),r(35,"div",8)(36,"div",9),_("click",function(){f(e);let l=s(2);return C(l.togglePartners())}),r(37,"span",10),c(38),d(39,"cxTranslate"),a(),r(40,"button",11),b(41,"i",12),a()(),v(42,Ed,2,1,"div",13),a()(),F()}if(i&2){let e=n.ngIf,t=s(2);o(2),m("data",e),o(4),u(p(7,21,"quote.informations.title")),o(2),K("quote-page__section-toggle--collapsed",t.infoCollapsed),o(2),m("ngIf",!t.infoCollapsed),o(4),u(p(15,23,"quote.entries.products")),o(2),K("quote-page__section-toggle--collapsed",t.entriesCollapsed),o(2),m("ngIf",!t.entriesCollapsed),o(4),u(p(23,25,"quote.salesConditions.title")),o(2),K("quote-page__section-toggle--collapsed",t.salesCollapsed),o(2),m("ngIf",!t.salesCollapsed),o(4),u(p(31,27,"quote.notes.title")),o(2),K("quote-page__section-toggle--collapsed",t.notesCollapsed),o(2),m("ngIf",!t.notesCollapsed),o(4),u(p(39,29,"quote.partners.title")),o(2),K("quote-page__section-toggle--collapsed",t.partnersCollapsed),o(2),m("ngIf",!t.partnersCollapsed)}}function Bd(i,n){if(i&1&&(v(0,hd,3,1,"ng-container",4),d(1,"async"),v(2,Td,43,31,"ng-container",4),d(3,"async")),i&2){let e=s();m("ngIf",p(1,2,e.error$)),o(2),m("ngIf",p(3,4,e.quoteData$))}}var _i=class i{constructor(){this.authService=x(Vo);this.quoteEditStateService=x(rt);this.quoteService=x(W);this.destroyRef=x(Yt);this.changeDetectorRef=x(qe);this.translationService=x(io);this.quoteData$=this.quoteService.getQuoteData();this.loading$=this.quoteService.isLoading();this.error$=this.quoteService.getError();this.tabs=[];this.tabConfig={label:"",openTabs:[0]};this.infoCollapsed=!1;this.entriesCollapsed=!1;this.salesCollapsed=!1;this.notesCollapsed=!1;this.partnersCollapsed=!1}ngOnInit(){this.quoteEditStateService.applyFromUrlParams();let n=this.authService.isUserLoggedIn().pipe(bi(),H(t=>t)),e=this.quoteEditStateService.getQuoteEditState().pipe(H(t=>this.isQuoteLoadState(t)),bi((t,l)=>this.getQuoteLoadStateKey(t)===this.getQuoteLoadStateKey(l)));xe([n,e]).pipe(Y(([,t])=>t),L(t=>{this.quoteService.loadQuote(t.quoteId,t.salesOrg,t.sapCustomer)}),$t(this.destroyRef)).subscribe(),this.quoteData$.pipe(H(t=>!!t),$t(this.destroyRef)).subscribe(t=>{(t.quote?.entries?.length??0)===0?(this.salesCollapsed=!0,this.notesCollapsed=!0,this.partnersCollapsed=!0):(this.salesCollapsed=!1,this.notesCollapsed=!1,this.partnersCollapsed=!1)})}ngAfterViewInit(){this.tabContents.changes.pipe($t(this.destroyRef)).subscribe(()=>{this.buildTabs(),this.changeDetectorRef.detectChanges()}),this.buildTabs()}toggleInfo(){this.infoCollapsed=!this.infoCollapsed}toggleEntries(){this.entriesCollapsed=!this.entriesCollapsed}toggleSales(){this.salesCollapsed=!this.salesCollapsed}toggleNotes(){this.notesCollapsed=!this.notesCollapsed}togglePartners(){this.partnersCollapsed=!this.partnersCollapsed}switchToItemsTab(){this.tabComponent?.select(0,bo.TAB)}buildTabs(){let n=this.tabContents.toArray();n.length<2||xe([this.translationService.translate("quote.header.entries"),this.translationService.translate("quote.header.addProducts")]).pipe($t(this.destroyRef)).subscribe(([e,t])=>{this.tabs=[{header:e.toUpperCase(),content:n[0]},{header:t.toUpperCase(),content:n[1]}],this.changeDetectorRef.detectChanges()})}isQuoteLoadState(n){return!!n?.quoteId&&!!n?.salesOrg&&!!n?.sapCustomer}getQuoteLoadStateKey(n){return`${n.quoteId}|${n.salesOrg}|${n.sapCustomer}`}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=S({type:i,selectors:[["bonfiglioli-quote-edit"]],viewQuery:function(e,t){if(e&1&&De(pn,5)(yd,5),e&2){let l;ge(l=_e())&&(t.tabComponent=l.first),ge(l=_e())&&(t.tabContents=l)}},standalone:!1,decls:4,vars:4,consts:[["content",""],["tabContent",""],[4,"ngIf","ngIfElse"],[1,"quote-page__loading"],[4,"ngIf"],[1,"quote-page__error"],[1,"quote-page"],[3,"data"],[1,"quote-page__section"],[1,"quote-page__section-header",3,"click"],[1,"quote-page__section-title"],[1,"quote-page__section-toggle"],[1,"fas","fa-chevron-down"],["class","quote-page__section-body",4,"ngIf"],[1,"quote-page__section-body"],[1,"bf-nav-tabs-wrapper"],[3,"tabs","config"],[3,"addedToQuote","data"]],template:function(e,t){if(e&1&&(v(0,vd,3,0,"ng-container",2),d(1,"async"),v(2,Bd,4,6,"ng-template",null,0,Oe)),e&2){let l=oe(3);m("ngIf",p(1,2,t.loading$))("ngIfElse",l)}},dependencies:[z,pn,ri,ai,si,pi,mi,ui,gi,ee,T],styles:['.quote-page[_ngcontent-%COMP%]{width:100%;padding:0 16px}.quote-page__loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:40px 0;font-size:1rem;color:var(--bf-color-grey)}.quote-page__error[_ngcontent-%COMP%]{padding:16px;color:var(--cx-label-danger);font-size:.875rem}.quote-page__section[_ngcontent-%COMP%]{padding:16px 0}.quote-page__section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--bf-color-grey-border);cursor:pointer}.quote-page__section-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--bf-color-dark-grey)}.quote-page__section-toggle[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;color:var(--bf-color-grey);transition:transform .3s}.quote-page__section-toggle--collapsed[_ngcontent-%COMP%]{transform:rotate(-90deg)}.bf-nav-tabs-wrapper[_ngcontent-%COMP%]{padding-top:16px}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist]{display:flex;gap:0;position:relative}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist]:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background:var(--bf-color-light-grey)}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button{background-color:var(--cx-color-light);width:fit-content;margin-right:32px;font-size:1rem;font-weight:600;border:none;cursor:pointer;padding:8px 0 0;color:inherit;transition:all .6s;text-align:center}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button:focus{outline:0;z-index:1}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button[disabled]{cursor:not-allowed;opacity:.5}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button.active, .bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button:hover:not([disabled]){color:var(--cx-color-primary)}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button:after{content:"";display:block;margin-top:15px;margin-inline:auto;height:5px;background:var(--cx-color-primary);width:0;opacity:0;transition:all .6s}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button.active:after, .bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button:hover:not([disabled]):after{width:100%}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button.active:after, .bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button.active:hover:after{opacity:1;background-color:var(--cx-color-secondary)}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] [role=tablist] button:not(.active):hover:after{opacity:.5}.bf-nav-tabs-wrapper[_ngcontent-%COMP%] cx-tab-panel div[role=tabpanel]{background-color:var(--cx-color-light);padding:16px 0}@media(min-width:768px){.quote-page[_ngcontent-%COMP%]{padding:0 32px}}@media(min-width:1024px){.quote-page[_ngcontent-%COMP%]{padding:0 48px}}@media(min-width:1440px){.quote-page[_ngcontent-%COMP%]{max-width:var(--cx-page-width-max);margin:0 auto;padding:0}}']})}};var Mi={};function Pi(i=Mi,n){switch(n.type){case Po:return be(be({},i),n.payload);case So:return Mi;default:return i}}function Dd(i){return()=>i.applyFromUrlParams()}var dr=class i{constructor(n){this.quoteEditStateService=n;this.quoteEditStateService.syncWithStorage()}static{this.\u0275fac=function(e){return new(e||i)(q(rt))}}static{this.\u0275mod=he({type:i})}static{this.\u0275inj=ye({providers:[Bi(()=>Dd(x(rt))()),Ke({cmsComponents:{QuoteEditComponent:{component:_i}}}),{provide:lt,useClass:hn},{provide:bn,useClass:On}
2,Mt,dt,Nt],imports:[Me,nt,se,me,xo,xn,ii,Pn,oi,qo,Gi.forFeature(wo,Pi),Uo,it,dn,tn]})}};export{Ue as a,He as b,Dn as c,je as d,Fn as e,Rt as f,Qn as g,An as h,Vn as i,Ln as j,Nn as k,Ft as l,Qt as m,jn as n,Hn as o,zn as p,En as q,Tn as r,cs as s,ii as t,oi as u,dt as v,Dd as w,dr as x};
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.