1"use strict";(self.webpackChunkchq_builder=self.webpackChunkchq_builder||[]).push([["collections"],{72467:function(t,e,n){n.d(e,{C:function(){return b}});var s=n(8040),i=n(73673),o=n(25755),r=n(66614),a=n(74788),c=n(9439),u=n(12057),h=n(88276);function p(t,e){if(1&t&&(a.ynx(0),a.TgZ(1,"span"),a._uU(2),a.qZA(),a.BQk()),2&t){const t=a.oxw();a.xp6(2),a.Oqu(t.buttonContent)}}function g(t,e){if(1&t&&(a.ynx(0),a._UZ(1,"app-icon",2),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("node",t.nodeIcon)("selectable",!1)}}function l(t,e){if(1&t&&(a.ynx(0),a._UZ(1,"app-icon",2),a.TgZ(2,"span"),a._uU(3),a.qZA(),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("node",t.nodeIcon)("selectable",!1),a.xp6(1),a.Udp("margin-left",t.node.spaceBetween),a.xp6(1),a.Oqu(t.buttonContent)}}function d(t,e){if(1&t&&(a.ynx(0),a.TgZ(1,"span"),a._uU(2),a.qZA(),a._UZ(3,"app-icon",2),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Udp("margin-right",t.node.spaceBetween),a.xp6(1),a.Oqu(t.buttonContent),a.xp6(1),a.Q6J("node",t.nodeIcon)("selectable",!1)}}let b=(()=>{class t extends((0,r.RJ)((0,r.fs)(Object))){constructor(t,e,n){super(),this.store$=t,this._cdr=e,this._resize=n,this.ButtonVariant=s.Wu3}get justifyContent(){return this.style.justifyContent}get buttonContent(){return this.content||this.node.content}ngOnChanges(t){super.ngOnChanges(t)}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){this.setNodes()}setNodes(){this.store$.pipe((0,i.Ys)(s.NcE.selectBdNodeChildren(this.node.id)),(0,o.R)(this.unsubscribe$)).subscribe(t=>{this.nodeIcon=t.find(t=>t.type===s._1l.ButtonIcon),this._cdr.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(i.yh),a.Y36(a.sBO),a.Y36(c._))},t.\u0275cmp=a.Xpm({type:t,selectors:[["app-button-content"]],hostVars:2,hostBindings:function(t,e){2&t&&a.Udp("justify-content",e.justifyContent)},inputs:{node:"node",content:"content"},features:[a.qOj,a.TTD],decls:5,vars:5,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"node","selectable"]],template:function(t,e){1&t&&(a.ynx(0,0),a.YNc(1,p,3,1,"ng-container",1),a.YNc(2,g,2,2,"ng-container",1),a.YNc(3,l,4,5,"ng-container",1),a.YNc(4,d,4,5,"ng-container",1),a.BQk()),2&t&&(a.Q6J("ngSwitch",e.node.variant),a.xp6(1),a.Q6J("ngSwitchCase",e.ButtonVariant.Text),a.xp6(1),a.Q6J("ngSwitchCase",e.ButtonVariant.Icon),a.xp6(1),a.Q6J("ngSwitchCase",e.ButtonVariant.IconAndText),a.xp6(1),a.Q6J("ngSwitchCase",e.ButtonVariant.TextAndIcon))},directives:[u.RF,u.n9,h.IconComponent],styles:[""],changeDetection:0}),t})()},55308:function(t,e,n){n.r(e),n.d(e,{CollectionTitleComponent:function(){return f},FinishCheckoutModule:function(){return tt},PaginationButtonComponent:function(){return O},PaginationComponent:function(){return G},PaginationNumberOfPagesComponent:function(){return T},PaginationPagesComponent:function(){return D},SortDropdownComponent:function(){return W}});var s=n(74788),i=n(8040),o=n(41964),r=n(37540),a=n(34689),c=n(5207),u=n(25755),h=n(48851),p=n(51117),g=n(9439),l=n(40806),d=n(73673),b=n(12057);let f=(()=>{class t extends h.a{constructor(t,e,n,s,i,o,r,a,c){super(...arguments),this._collections=t,this._cdr=e,this._element=n,this._redraw=s,this._renderer=i,this._resize=o,this._stylesRenderer=r,this.store$=a,this._platformId=c}ngOnChanges(t){super.ngOnChanges(t)}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),this.setTitle()}setTitle(){this.title$=this.store$.select(i.AD7.x).pipe((0,r.w)(t=>t.url.startsWith("/search/")?(0,o.of)("Search Results"):this._collections.collection$.pipe((0,a.h)(t=>Boolean(t)),(0,c.U)(t=>t.title))),(0,u.R)(this.unsubscribe$))}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(i.cwW),s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.F),s.Y36(s.Qsj),s.Y36(g._),s.Y36(l.F),s.Y36(d.yh),s.Y36(s.Lbi))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-collection-title"]],inputs:{node:"node"},features:[s.qOj,s.TTD],decls:3,vars:3,template:function(t,e){1&t&&(s.TgZ(0,"h1"),s._uU(1),s.ALo(2,"async"),s.qZA()),2&t&&(s.xp6(1),s.Oqu(s.lcZ(2,1,e.title$)))},pipes:[b.Ov],styles:["[_nghost-%COMP%] > h1[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),t})();var _=n(66614),m=n(76889);let v=(()=>{class t{constructor(){this._first$=new m.x,this._last$=new m.x,this._next$=new m.x,this._prev$=new m.x,this._to$=new m.x,this.first$=this._first$.asObservable(),this.last$=this._last$.asObservable(),this.next$=this._next$.asObservable(),this.prev$=this._prev$.asObservable(),this.to$=this._to$.asObservable()}goFirst(){this._first$.next()}goLast(){this._last$.next()}goNext(){this._next$.next()}goPrev(){this._prev$.next()}goTo(t){this._to$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var y=n(72467);let O=(()=>{class t extends((0,_.R0)(h.a)){constructor(t,e,n,s,i,o,r,a,c){super(...arguments),this._paginationService=t,this._cdr=e,this._element=n,this._redraw=s,this._renderer=i,this._resize=o,this._stylesRenderer=r,this.store$=a,this._platformId=c}get classDisabled(){return this.isDisabled}ngOnChanges(t){super.ngOnChanges(t)}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),this.clickAction.pipe((0,u.R)(this.unsubscribe$)).subscribe(()=>this.onClick())}get isDisabled(){if(!this.bindSource)return!1;switch(this.node.type){case i._1l.PaginationButtonFirst:return this.bindSource.currentPage<=1;case i._1l.PaginationButtonLast:case i._1l.PaginationButtonNext:return this.bindSource.currentPage===this.bindSource.page
1Count;case i._1l.PaginationButtonPrev:return this.bindSource.currentPage<=1;default:throw new Error(`Unknown pagination node modifier "${this.node.modifier}"`)}}onClick(){if(!this.isDisabled&&this.bindSource)switch(this.node.type){case i._1l.PaginationButtonFirst:this._paginationService.goFirst();break;case i._1l.PaginationButtonLast:this._paginationService.goLast();break;case i._1l.PaginationButtonNext:this._paginationService.goNext();break;case i._1l.PaginationButtonPrev:this._paginationService.goPrev()}}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(v),s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.F),s.Y36(s.Qsj),s.Y36(g._),s.Y36(l.F),s.Y36(d.yh),s.Y36(s.Lbi))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-pagination-button"]],hostVars:2,hostBindings:function(t,e){2&t&&s.ekj("button_disabled",e.classDisabled)},inputs:{bindSource:"bindSource",node:"node"},features:[s.qOj,s.TTD],decls:1,vars:1,consts:[[3,"node"]],template:function(t,e){1&t&&s._UZ(0,"app-button-content",0),2&t&&s.Q6J("node",e.node)},directives:[y.C],styles:[".button[_ngcontent-%COMP%], [_nghost-%COMP%]{display:block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.button_disabled[class*=disabled][_ngcontent-%COMP%]{cursor:default;opacity:.5}.button[_ngcontent-%COMP%] > app-button-content[_ngcontent-%COMP%], [_nghost-%COMP%] > app-button-content[_ngcontent-%COMP%]{display:flex;align-items:inherit;justify-content:inherit;width:100%;height:100%}"],changeDetection:0}),t})();var C=n(6388),x=n(49518),$=n(84259),w=n(9237),P=n(32833),S=n(91224),Y=n(88048);const B=["pageElem"];function k(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"div",1,2),s.NdJ("click.action",function(){const e=s.CHM(t).$implicit;return s.oxw().onClick(e)}),s._uU(2),s.qZA()}if(2&t){const t=e.$implicit,n=s.oxw();s.Q6J("node",n.nodePage),s.xp6(2),s.hij(" ",t,"\n")}}let T=(()=>{class t extends h.a{constructor(t,e,n,s,i,o,r,a,c,u){super(...arguments),this._bdNodeEffectsService=t,this._paginationService=e,this._cdr=n,this._element=s,this._redraw=i,this._renderer=o,this._resize=r,this._stylesRenderer=a,this.store$=c,this._platformId=u}track(t){return t}ngOnChanges(t){super.ngOnChanges(t),t.bindSource&&t.bindSource.currentValue&&!(0,C.Z)(t.bindSource.previousValue,t.bindSource.currentValue)&&(this.resetActives(),setTimeout(()=>{this.setActive()},0))}setActive(){const t=this.pages.findIndex(t=>t===this.bindSource.currentPage),e=this._pagesList.toArray()[t];e&&this._bdNodeEffectsService.activateComponent(this.nodePage.id,e.nativeElement)}resetActives(){!this._pagesList||this._pagesList.forEach(t=>{this._bdNodeEffectsService.deactivateComponent(this.nodePage.id,t.nativeElement)})}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),this.setNodes()}setNodes(){this.store$.pipe((0,d.Ys)(i.NcE.selectBdNodeChildren(this.node.id)),(0,u.R)(this.unsubscribe$)).subscribe(t=>{this.nodePage=t.find(t=>t.type===i._1l.PaginationPage),this._cdr.markForCheck()})}onClick(t){this._paginationService.goTo(t)}get pages(){return this.bindSource?$.n.getPaginationOptions({listLength:this.node.limit,currentPage:this.bindSource.currentPage,totalPages:this.bindSource.pageCount}).map(t=>t.label):(0,x.Z)(1,this.node.limit+1)}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(w.d),s.Y36(v),s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.F),s.Y36(s.Qsj),s.Y36(g._),s.Y36(l.F),s.Y36(d.yh),s.Y36(s.Lbi))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-pagination-number-of-pages"]],viewQuery:function(t,e){if(1&t&&s.Gf(B,5,s.SBq),2&t){let t;s.iGM(t=s.CRH())&&(e._pagesList=t)}},inputs:{bindSource:"bindSource",node:"node"},features:[s.qOj,s.TTD],decls:1,vars:2,consts:[["appSelect","","appStyles","","class","button",3,"node","click.action",4,"ngFor","ngForOf","ngForTrackBy"],["appSelect","","appStyles","",1,"button",3,"node","click.action"],["pageElem",""]],template:function(t,e){1&t&&s.YNc(0,k,3,2,"div",0),2&t&&s.Q6J("ngForOf",e.pages)("ngForTrackBy",e.track)},directives:[b.sg,P.M,S.c,Y.C],styles:[".button[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center}"],changeDetection:0}),t})(),D=(()=>{class t extends h.a{constructor(t,e,n,s,i,o,r,a){super(...arguments),this._cdr=t,this._element=e,this._redraw=n,this._renderer=s,this._resize=i,this._stylesRenderer=o,this.store$=r,this._platformId=a}ngOnChanges(t){super.ngOnChanges(t),t.bindSource&&(this.totalCount=this.bindSource?this.bindSource.totalCount:"XX",this.rangeEnd=this.bindSource?this.bindSource.rangeEnd:"X",this.rangeStart=this.bindSource?this.bindSource.rangeStart:"X")}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){super.ngOnInit()}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.F),s.Y36(s.Qsj),s.Y36(g._),s.Y36(l.F),s.Y36(d.yh),s.Y36(s.Lbi))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-pagination-pages"]],inputs:{bindSource:"bindSource",node:"node"},features:[s.qOj,s.TTD],decls:1,vars:3,template:function(t,e){1&t&&s._uU(0),2&t&&s.lnq("",e.rangeStart," \u2212 ",e.rangeEnd," of ",e.totalCount,"\n")},styles:["[_nghost-%COMP%]{align-items:center;display:flex;justify-content:center}"],changeDetection:0}),t})();var I=n(45094),F=n(71598),q=n(42687),N=n(43301),Q=n(74294),U=n(86550),j=n(85740),Z=n(13027),A=n(86370),E=n(9447);function R(t,e){if(1&t&&(s.ynx(0),s._UZ(1,"app-element-container",4),s.ALo(2,"async"),s._UZ(3,"app-drop-placeholder"),s.BQk()),2&t){const t=e.$implicit,n=s.oxw(3);s.xp6(1),s.Q6J("bindSource",s.lcZ(2,2,n.meta$))("item",t)}}function L(t,e){if(1&t&&(s.ynx(0),s._UZ(1,"app-drop-placeholder"),s.YNc(2,R,4,4,"ng-container",3),s.BQk()),2&t){const t=s.oxw().ngIf,e=s.oxw();s.xp6(2),s.Q6J("ngForOf",t)("ngForTrackBy",e.track)}}function J(t,e){if(1&t&&(s.ynx(0),s.YNc(1,L,3,2,"ng-container",2),s.BQk()),2&t){const t=e.ngIf;s.oxw();const n=s.MAs(3);s.xp6(1),s.Q6J("ngIf",t.length)("ngIfElse",n)}}function M(t,e){1&t&&s._UZ(0,"app-b-empty")}let G=(()=>{class t extends U.v{constructor(t,e,n,s,i,o,r,a,c,u,h,p,g){super(...arguments),this._collections=t,this._paginationService=e,this._products=n,this._router=s,this._route=i,this._cdr=o,this._element=r,this._redraw=a,this._renderer=c,this._resize=u,this._stylesRenderer=h,this.store$=p,this._platformId=g,this._meta$=new I.X(null),this.meta$=this._meta$.asObservable()}ngOnChanges(t){super.ngOnChanges(t)}ngOnDestroy(){super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),this.nodes$=this.store$.select(i.NcE.selectBdNodeChildren(this.node.id)),this.setType(),this.setMeta(),this.watchNavigationEvents()}setType(){this.store$.pipe((0,d.Ys)(i.$2Q.selectActivePage),(0,q.x)(C.Z),(0,a.h)(t=>Boolean(t)),(0,N.j)("page_url"),(0,c.U)(t=>t.slice(1)),(0,u.R)(this.unsubscribe$)).subscribe(t=>{this.type=t})}setMeta(){let t;switch(this.type){case"collections":t=this._collections.collections$.pipe((0,c.U)(t=>t&&new i.sov(t._meta)));break;case"collection":t=this._products.products$.pipe((0,c.U)(t=>t&&new i.sov(t._meta)));break;default:throw new Error(`Unknown pagination type "${this.type}"`)}t.pipe((0,u.R)(this.unsubscribe$)).subscribe(t=>{this._meta$.next(t)})}watchNavigationEvents(){this._paginationService.first$.pipe((0,u.R)(this.unsubscribe$)).subscribe(()=>this.goFirst()),this._paginationService.last$.pipe((0,u.R)(this.unsubscribe$)).subscribe(()=>this.goLast()),this._paginationService.next$.pipe((0,u.R)(this.unsubscribe$)).subscribe(()=>this.goNext()),this._paginationService.prev$.pipe((0,u.R)(this.unsubscribe$)).subscribe(()=>this.goPrev()),this._paginationService.to$.pipe((0,u.R)(this.unsubscribe$)).subscribe(t=>this.goTo(t))}goFirst(){this.navigateToPage(1)}goLast(){this.meta$.pipe((0,Q.q)(1)).subscribe(t=>{this.navigateToPage(t.pageCount)})}goNext(){this.navigateWithOffset(1)}goPrev(){this.navigateWithOffset(-1)}goTo(t){this.navigateToPage(t)}navigateToPage(t){(0,F.a)([this.meta$,this.store$.select(i.AD7.x)]).pipe((0,Q.q)(1)).subscribe(([e,n])=>{const s=this.validatePage(t,e.pageCount);switch(this.optimisticUpdatePage(s),this.type){case"collections":this.navigateCollectionList(this.getPath(n),s);break;case"collection":this.navigateCollectionPage(s)}})}navigateWithOffset(t){(0,F.a)([this.meta$,this.store$.select(i.AD7.x)]).pipe((0,Q.q)(1)).subscribe(([e,n])=>{const s=this.validatePage(e.currentPage+t,e.pageCount);switch(this.optimisticUpdatePage(s),this.type){case"collections":this.navigateCollectionList(this.getPath(n),s);break;case"collection":this.navigateCollectionPage(s)}})}getPath(t){return t.url.substr(0,t.url.lastIndexOf("/")+1)}validatePage(t,e){return t<=0?(console.warn(`Page can't be less 1, although passed "${t}"`),0):t>e?(console.warn(`Page can't be more pageCount, although passed "${t}"`),e):t}optimisticUpdatePage(t){this._meta$.next(new i.sov(Object.assign(Object.assign({},this._meta$.value),{currentPage:t})))}navigateCollectionList(t,e){this._router.navigate([t,e],{queryParamsHandling:"preserve"}).catch()}navigateCollectionPage(t){this._router.navigate(["."],{queryParams:{page:t},relativeTo:this._route,queryParamsHandling:"merge"}).catch()}track(t,e){return e.id}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(i.cwW),s.Y36(v),s.Y36(i.suB),s.Y36(j.F0),s.Y36(j.gz),s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.F),s.Y36(s.Qsj),s.Y36(g._),s.Y36(l.F),s.Y36(d.yh),s.Y36(s.Lbi))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-pagination"]],inputs:{node:"node"},features:[s.qOj,s.TTD],decls:4,vars:3,consts:[[4,"ngIf"],["empty",""],[4,"ngIf","ngIfElse"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"bindSource","item"]],template:function(t,e){1&t&&(s.YNc(0,J,2,2,"ng-container",0),s.ALo(1,"async"),s.YNc(2,M,1,0,"ng-template",null,1,s.W1O)),2&t&&s.Q6J("ngIf",s.lcZ(1,1,e.nodes$))}
1,directives:[b.O5,Z.K,b.sg,A.V,E.f],pipes:[b.Ov],styles:["[_nghost-%COMP%]{display:block;position:relative}"],changeDetection:0}),t})();var V=n(24751),X=n(12061);function z(t,e){if(1&t&&s._UZ(0,"app-form-dropdown",2),2&t){const t=s.oxw();s.Q6J("node",t.node)}}let W=(()=>{class t extends((0,_.fs)(Object)){constructor(t,e,n){super(...arguments),this.store$=t,this._router=e,this._route=n,this.formGroup=new V.cw({})}ngOnInit(){this.initFormEvents()}ngOnChanges(t){}ngOnDestroy(){super.ngOnDestroy()}initFormEvents(){this.store$.select(i.AD7.x).pipe((0,u.R)(this.unsubscribe$)).subscribe(t=>{this.setControlValue(t.queryParams.sort),this.initFormGroupSubscription()}),this._router.events.pipe((0,u.R)(this.unsubscribe$)).subscribe(t=>{t instanceof j.OD&&this.formGroupSubscription&&(this.formGroupSubscription.unsubscribe(),this.formGroupSubscription=void 0)})}initFormGroupSubscription(){this.formGroupSubscription=this.formGroup.valueChanges.pipe((0,c.U)(t=>t[this.node.target]),(0,q.x)(),(0,u.R)(this.unsubscribe$)).subscribe(t=>{t&&this._router.navigate(["."],{relativeTo:this._route,queryParams:{sort:t},queryParamsHandling:"merge"}).catch()})}setControlValue(t){this.formGroup.controls[this.node.target]?this.formGroup.controls[this.node.target].setValue(t):this.formGroup.addControl(this.node.target,new V.NI(t))}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(d.yh),s.Y36(j.F0),s.Y36(j.gz))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-sort-dropdown"]],inputs:{node:"node"},features:[s.qOj,s.TTD],decls:2,vars:2,consts:[[3,"formGroup"],[3,"node",4,"ngIf"],[3,"node"]],template:function(t,e){1&t&&(s.TgZ(0,"form",0),s.YNc(1,z,1,1,"app-form-dropdown",1),s.qZA()),2&t&&(s.Q6J("formGroup",e.formGroup),s.xp6(1),s.Q6J("ngIf",e.formGroup.controls[e.node.target]))},directives:[V._Y,V.JL,V.sg,b.O5,X.FormDropdownComponent],styles:["[_nghost-%COMP%]{display:contents;width:100%}form[_ngcontent-%COMP%]{display:contents}"],changeDetection:0}),t})();var H=n(6338),K=n(34874);let tt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[H.Y,b.ez,K.E,V.u5,V.UX]]}),t})()}}]);
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.