1"use strict";(self.webpackChunkenergy_tcm=self.webpackChunkenergy_tcm||[]).push([[9992],{84199:(N,C,r)=>{r.r(C),r.d(C,{BrandsModule:()=>On});var g=r(60177),u=r(63040),s=r(89417),c=r(41635),m=r(76965),l=r(29262);const Z="[Brands] GET one brand",O="[Brands] GET one brand success";class W{constructor(a){this.payload=a,this.type=Z}}class kt{constructor(a){this.payload=a,this.type=O}}const K="[Brands] PATCH brand",A="[Brands] PATCH brand success";class Gt{constructor(a){this.payload=a,this.type=K}}class It{constructor(a){this.payload=a,this.type=A}}const q="[Brands] UPLOAD image",U="[Brands] UPLOAD image success",tt="[Brands] DELETE image",et="[Brands] DELETE image success";class Mt{constructor(a){this.payload=a,this.type=q}}class Lt{constructor(a){this.payload=a,this.type=U}}class $t{constructor(a){this.payload=a,this.type=tt}}class Nt{constructor(a){this.payload=a,this.type=et}}const nt="[Brands] POST brand info",w="[Brands] POST brand info success";class Ot{constructor(a){this.payload=a,this.type=nt}}class At{constructor(a){this.payload=a,this.type=w}}const ot="[Brands] get brands",X="[Brands] get brands success";class G{constructor(a){this.payload=a,this.type=ot}}class Ut{constructor(a){this.payload=a,this.type=X}}const it="[Brands] TOGGLE brand";class wt{constructor(a){this.payload=a,this.type=it}}const at="[Brands] unselect all";class rt{constructor(){this.type=at}}const st="[Brands] DELETE brands",V="[Brands] DELETE brands success";class Xt{constructor(a){this.payload=a,this.type=st}}class Vt{constructor(a){this.payload=a,this.type=V}}const ct="[Brands] SET filter",lt="[Brands] RESET filter";class Ht{constructor(a){this.payload=a,this.type=ct}}class Yt{constructor(){this.type=lt}}const dt={brands:null,brand:new class Pt{constructor(a=null,e=null,o=null,i=null){this.id=a,this.name=e,this.image=o,this.info=i}},filter:null,selectedBrands:[]};function zt(n,a,e){if(!e)return a;const o=n.items.concat(a.items),d=o.length,f=a.paginator.count;return{items:o,paginator:{page:a.paginator.page,ipp:d,page_count:f/d,count:f}}}function Jt(n,a){const e=n.filter(o=>o.id!==a.id);return e.length<n.length?e:n.concat(a)}const D="aegisxBrands";function Qt(n=dt,a){switch(a.type){case O:case A:case U:case w:return{...n,brand:a.payload.item};case X:return{...n,brands:zt(n.brands,a.payload.brands,a.payload.append),brand:null};case at:case V:return{...n,selectedBrands:[]};case it:return{...n,selectedBrands:Jt(n.selectedBrands,a.payload.item)};case ct:return{...n,filter:a.payload.filter};case lt:return{...n,filter:dt.filter};default:return n}}const mt=n=>n[D].brands,pt=n=>n[D].selectedBrands,Zt=n=>n[D].filter;var ut=r(97309),I=r(45286),F=r(7605);const ht="[Brands] CREATE brand",ft="[Brands] CREATE brand success";class Wt{constructor(a){this.payload=a,this.type=ht}}class Kt{constructor(a){this.payload=a,this.type=ft}}var t=r(54438),v=r(63649),gt=r(37282),S=r(23509),x=r(90113),T=r(36001),M=r
1(33579),L=r(33555),$=r(97519),H=r(31992),Y=r(46346),P=r(94300),z=r(54444),vt=r(75483);let qt=(()=>{class n{constructor(e,o){this.store=e,this.modalService=o,this.ERRORS={name:{required:"Zna\u010dka mus\xed m\xedt n\xe1zev."}},this.form=new s.J3({language:new s.hs("CZ",s.k0.required),name:new s.hs(null,s.k0.required),name_detail:new s.hs(null),description:new s.hs(null),seo_title:new s.hs,seo_description:new s.hs})}ngOnInit(){}createBrand(){this.form.valid?(this.store.dispatch(new Wt({item:this.form.value})),this.close()):console.error("add brand not valid",this.form)}close(){this.modalService.close()}isAddButtonDisabled(){return!this.form||!this.form.valid}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(l.mO))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-add-modal"]],decls:26,vars:10,consts:[[3,"control","required","nullable"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","N\xe1zev ve v\xfdpisu",3,"control"],["type","text","placeholder","SEO Title",3,"control"],["type","text","placeholder","SEO Description",3,"control"],[3,"control"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xe1 zna\u010dka"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"mcrai-row")(6,"mcrai-col")(7,"mcrai-panel")(8,"mcrai-panel-header")(9,"h2"),t.EFF(10,"Prvn\xed jazykov\xe1 mutace"),t.k0s()(),t.j41(11,"mcrai-panel-content"),t.nrm(12,"aegisx-select-language",0)(13,"mcrai-input",1)(14,"mcrai-input",2)(15,"mcrai-input",3)(16,"mcrai-input",4),t.j41(17,"div"),t.nrm(18,"br"),t.EFF(19," Popis "),t.nrm(20,"aegisx-smd-editor",5),t.k0s()()()()()(),t.j41(21,"mcrai-modal-actions")(22,"button",6),t.bIt("click",function(){return i.close()}),t.EFF(23,"Zav\u0159\xedt "),t.k0s(),t.j41(24,"button",7),t.bIt("click",function(){return i.createBrand()}
1),t.EFF(25,"Vytvo\u0159it "),t.k0s()()()),2&o&&(t.R7$(12),t.Y8G("control",i.form.controls.language)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",i.form.controls.name)("errors",i.ERRORS.name),t.R7$(),t.Y8G("control",i.form.controls.name_detail),t.R7$(),t.Y8G("control",i.form.controls.seo_title),t.R7$(),t.Y8G("control",i.form.controls.seo_description),t.R7$(4),t.Y8G("control",i.form.controls.description),t.R7$(4),t.Y8G("disabled",i.isAddButtonDisabled()))},dependencies:[v.Q,gt.N,S.g,x.l,T.B,M.o,L.g,$.N,H.h,Y.l,P.J,z.f,vt.Q]})}return n})();var R=r(1173),bt=r(7431),te=r(11815);let ee=(()=>{class n{get count(){return this.brands.length?this.brands.length:Math.min(this.paginator.count,1e4)}get controls(){return this.form.controls}constructor(e,o,i){this.store=e,this.modalService=o,this.data=i,this.form=new s.J3({brand:new s.hs(!0)}),this.filter=i.filter,this.paginator=i.paginator,this.brands=i.brands}ngOnInit(){}exportBrands(){this.store.dispatch(new bt.jP({body:this.form.value,filter:this.filter,brands:this.brands})),this.close()}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(l.mO),t.rXU(l._P))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["mcrai-export-modal"]],decls:13,vars:4,consts:[[3,"formGroup"],["type","checkbox",3,"value","control"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Exportovat zna\u010dky"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0)(6,"mcrai-input",1),t.EFF(7,"Exportovat zna\u010dky "),t.k0s()()(),t.j41(8,"mcrai-modal-actions")(9,"button",2),t.bIt("click",function(){return i.close()}),t.EFF(10,"Zav\u0159\xedt "),t.k0s(),t.j41(11,"button",3),t.bIt("click",function(){return i.exportBrands()}
1),t.EFF(12),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",i.form),t.R7$(),t.Y8G("value",!0)("control",i.controls.brand),t.R7$(6),t.SpI("Exportovat ",i.count," zna\u010dek "))},dependencies:[v.Q,s.qT,s.cb,s.j4,te.u,H.h,Y.l,P.J,z.f]})}return n})();var J=r(71829),j=r(65382),Bt=r(70014),Et=r(77617),k=r(92721),_t=r(52699),ne=r(48390),oe=r(64204),ie=r(95466),ae=r(7306),re=r(7622),se=r(57382),ce=r(65208),le=r(21336),de=r(30127),me=r(49451),yt=r(7887),pe=r(68417);const ue=n=>["/aegisx/brands",n];function he(n,a){1&n&&(t.j41(0,"mcrai-th"),t.EFF(1,"N\xe1zev"),t.k0s())}function fe(n,a){if(1&n&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&n){const e=a.$implicit;t.R7$(),t.JRh(e.name)}}function ge(n,a){1&n&&(t.j41(0,"mcrai-th"),t.EFF(1,"Obr\xe1zek"),t.k0s())}function ve(n,a){if(1&n&&t.nrm(0,"mcrai-media",10),2&n){const e=t.XpG().$implicit;t.Y8G("data",e.image.thumbnail)}}function be(n,a){if(1&n&&(t.j41(0,"mcrai-td"),t.DNE(1,ve,1,1,"mcrai-media",10),t.k0s()),2&n){const e=a.$implicit;t.R7$(),t.vxM(1,e.image?1:-1)}}function Be(n,a){1&n&&(t.j41(0,"mcrai-th"),t.EFF(1,"Popis"),t.k0s())}function Ee(n,a){if(1&n&&(t.j41(0,"mcrai-td"),t.EFF(1),t.nI1(2,"characterLimit"),t.k0s()),2&n){const e=a.$implicit;t.R7$(),t.JRh(t.i5U(2,1,e.description,100))}}function _e(n,a){1&n&&t.nrm(0,"mcrai-th")}function ye(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",14),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,d=t.XpG(2);return t.Njj(d.toggleBrand(i))}),t.EFF(1,"Vybrat "),t.k0s()}}function Ce(n,a){if(1&n&&(t.j41(0,"mcrai-td",11),t.DNE(1,ye,2,0,"button",12),t.j41(2,"a",13),t.EFF(3,"Detail"),t.k0s()()),2&n){const e=a.$implicit,o=t.XpG(2);t.R7$(),t.vxM(1,o.canEdit()?1:-1),t.R7$(),t.Y8G("routerLink",t.eq3(2,ue,e.id))}}function Fe(n,a){1&n&&t.nrm(0,"mcrai-tr")}function Se(n,a){if(1&n&&t.nrm(0,"mcrai-tr"),2&n){const e=a.$implicit,o=t.XpG(2);t.AVh("mcrai-tr--highlight",o.isSelected(e))}}function xe(n,a){if(1&n&&(t.j41(0,"mcrai-table",0),t.qex(1,1),t.DNE(2,he,2,0,"mcrai-th",2)(3,fe,2,1,"mcrai-td",3),t.bVm(),t.qex(4,4),t.DNE(5,ge,2,0,"mcrai-th",2)(6,be,2,1,"mcrai-td",3),t.bVm(),t.qex(7,5),t.DNE(8,Be,2,0,"mcrai-th",2)(9,Ee,3,4,"mcrai-td",3),t.bVm(),t.qex(10,6),t.DNE(11,_e,1,0,"mcrai-th",2)(12,Ce,4,4,"mcrai-td",7),t.bVm(),t.DNE(13,Fe,1,0,"mcrai-tr",8)(14,Se,1,2,"mcrai-tr",9),t.k0s()),2&n){const e=t.XpG();t.Y8G("container",e.brands),t.R7$(13),t.Y8G("mcraiHeaderRowDef",e.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",e.columns)}}let Te=(()=>{class n{get columns(){return["image","name","description","actions"]}constructor(e,o,i){this.store=e,this.toolbarService=o,this.permissionService=i,this.destroy=new I.B7}ngOnInit(){this.selectBrands(),this.selectSelectedBrands()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectBrands(){this.store.pipe((0,m.Lt)(mt),(0,F.Q)(this.destroy)).subscribe(e=>this.brands=e)}selectSelectedBrands(){this.store.pipe((0,m.Lt)(pt),(0,F.Q)(this.destroy)).subscribe(e=>this.selectedBrands=e)}toggleBrand(e){this.store.dispatch(new wt({item:e}))}isSelected(e){return!!this.selectedBrands.find(o=>o.id===e.id)}canEdit(){return this.permissionService.canWritePage("aegisx.brands")}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(j.h),t.rXU(J.n))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-list"]],decls:1,vars:1,consts:[[3,"container"],["mcraiColumnDef","name"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","image"],["mcraiColumnDef","description"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["type","image","width","50","height","50",3,"data"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"routerLink"],["mcrai-button","neutral",3,"click"]],template:function(o,i){1&o&&t.DNE(0,xe,15,3,"mcrai-table",0),2&o&&t.vxM(0,i.brands?0:-1)},dependencies:[u.Wk,v.Q,oe.n,ie.q,ae.B,re.K,se.D,ce.Q,le.V,de.e,me.O,yt.h,pe.$]})}return n})();function Re(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.resetFilter())}),t.EFF(1,"Reset "),t.k0s()}}let De=(()=>{class n{get controls(){return this.form.controls}constructor(e){this.store=e}ngOnInit(){this.form=new s.J3({q:new s.hs("")})}filterBrands(){this.store.dispatch(new Ht({filter:this.form.value})),this.store.dispatch(new G({page:1,append:!1}))}resetFilter(){this.form.reset(),this.filterBrands()}isFiltered(){return!!this.form.value.q}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-filter"]],decls:15,vars:4,consts:[["color","secondary","collapsable","",3,"collapsed"],["
1id","brand_filter",3,"formGroup"],["type","text","placeholder","Fulltext","error","",3,"control"],["mcrai-button","negative"],["mcrai-button","positive","form","brand_filter",3,"click"],["mcrai-button","negative",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Filtr"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"form",1)(6,"mcrai-row")(7,"mcrai-col"),t.nrm(8,"mcrai-input",2),t.k0s(),t.nrm(9,"mcrai-col")(10,"mcrai-col"),t.k0s()()(),t.j41(11,"mcrai-panel-actions"),t.DNE(12,Re,2,0,"button",3),t.j41(13,"button",4),t.bIt("click",function(){return i.filterBrands()}),t.EFF(14,"Filtrovat "),t.k0s()()()),2&o&&(t.Y8G("collapsed",!0),t.R7$(5),t.Y8G("formGroup",i.form),t.R7$(3),t.Y8G("control",i.controls.q),t.R7$(4),t.vxM(12,i.isFiltered()?12:-1))},dependencies:[v.Q,s.qT,s.cb,s.j4,S.g,x.l,k.h,T.B,M.o,L.g,$.N]})}return n})();function je(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.showExportModal())}),t.EFF(1,"Exportovat"),t.k0s()}}function ke(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.deleteBrands())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteButtonDisabled())}}function Ge(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",10),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);
1return t.Njj(i.showAddBrandModal())}),t.EFF(1,"P\u0159idat zna\u010dku "),t.k0s()}}function Ie(n,a){if(1&n){const e=t.RV6();t.j41(0,"mcrai-paginator",3),t.bIt("page",function(i){t.eBV(e);const d=t.XpG();return t.Njj(d.onPageChange(i))}),t.k0s(),t.j41(1,"button",4),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.unselectAll())}),t.EFF(2,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.DNE(3,je,2,0,"button",5)(4,ke,2,1,"button",6)(5,Ge,2,0,"button",7)}if(2&n){const e=t.XpG();t.Y8G("paginator",null==e.brands?null:e.brands.paginator),t.R7$(),t.Y8G("disabled",e.isDeleteButtonDisabled()),t.R7$(2),t.vxM(3,e.canExport()&&!e.toolbarService.isDeleteMode()?3:-1),t.R7$(),t.vxM(4,e.toolbarService.isDeleteMode()?4:-1),t.R7$(),t.vxM(5,e.permissionService.canWrite()&&!e.toolbarService.isDeleteMode()?5:-1)}}function Me(n,a){1&n&&t.eu8(0)}function Le(n,a){1&n&&t.eu8(0)}let $e=(()=>{class n{constructor(e,o,i,d){this.store=e,this.modalService=o,this.permissionService=i,this.toolbarService=d,this.destroy=new I.B7}ngOnInit(){this.setToolbarModes(),this.getBrands(),this.selectBrands(),this.selectSelectedBrands(),this.selectBrandsFilter(),this.resetFilter()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([R.H.View,R.H.Edit,R.H.Delete])}selectBrands(){this.store.pipe((0,m.Lt)(mt),(0,F.Q)(this.destroy)).subscribe(e=>this.brands=e)}selectBrandsFilter(){this.store.pipe((0,m.Lt)(Zt),(0,F.Q)(this.destroy)).subscribe(e=>this.filter=e)}getBrands(e=1,o=!1){this.store.dispatch(new G({page:e,append:o}))}selectSelectedBrands(){this.store.pipe((0,m.Lt)(pt),(0,F.Q)(this.destroy)).subscribe(e=>this.selectedBrands=e)}resetFilter(){this.store.dispatch(new Yt)}showAddBrandModal(){const e=new l.m_("800px","600px");this.modalService.open(qt,e)}unselectAll(){this.store.dispatch(new rt)}isDeleteButtonDisabled(){return!this.selectedBrands||!this.selectedBrands.length}onPageChange(e){this.getBrands(e)}deleteBrands(){this.selectedBrands.length?this.store.dispatch(new Xt({items:this.selectedBrands})):console.error("delete brands fail",this.selectedBrands)}canExport(){return this.permissionService.canWritePage("aegisx.export")}showExportModal(){const e=new l.m_("800px","600px",{filter:this.filter,paginator:this.brands.paginator,brands:this.selectedBrands});this.modalService.open(ee,e)}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(l.mO),t.rXU(J.n),t.rXU(j.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brands-overview"]],decls:16,vars:2,consts:[["brandsActions",""],["top",""],[4,"ngTemplateOutlet"],[1,"pull-left",3,"page","paginator"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","neutral"],["mcrai-button","negative",3,"disabled"],["mcrai-button","positive"],["mcrai-button","neutral",3,"click"],["mcrai-button","negative",3,"click","disabled"],["mcrai-button","positive",3,"click"]],template:function(o,i){if(1&o&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h1"),t.EFF(5,"Zna\u010dky"),t.k0s()(),t.j41(6,"mcrai-panel-content"),t.nrm(7,"aegisx-brand-filter")(8,"aegisx-brand-list"),t.k0s(),t.DNE(9,Ie,6,5,"ng-template",null,0,t.C5r),t.j41(11,"mcrai-panel-actions",1),t.DNE(12,Me,1,0,"ng-container",2),t.k0s(),t.j41(13,"mcrai-panel-actions"),t.DNE(14,Le,1,0,"ng-container",2),t.k0s()()(),t.nrm(15,"aegisx-toolbar")),2&o){const d=t.sdS(10);t.R7$(12),t.Y8G("ngTemplateOutlet",d),t.R7$(2),t.Y8G("ngTemplateOutlet",d)}},dependencies:[g.T3,Bt.I,Et.I,v.Q,S.g,x.l,k.h,T.B,_t.H,ne.h,Te,De]})}return n})();var Ne=r(62399),Oe=r(58728);const Ct="[Brands] PATCH brand info",Ft="[Brands] PATCH brand info success";class Ae{constructor(a){this.payload=a,this.type=Ct}}
1class Ue{constructor(a){this.payload=a,this.type=Ft}}let we=(()=>{class n{get controls(){return this.form.controls}constructor(e,o,i){this.builder=e,this.store=o,this.modalService=i,this.buildForm()}ngOnInit(){}buildForm(){this.form=this.builder.group({language:["CZ"],name_detail:[null],description:[null],seo_title:[null],seo_description:[null]})}isAddButtonDisabled(){return this.form.invalid}createBrandInfo(){this.isAddButtonDisabled()||(this.store.dispatch(new Ot({info:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(s.ze),t.rXU(m.il),t.rXU(l.mO))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-add-brand-info-modal"]],decls:16,vars:9,consts:[[3,"formGroup"],[3,"control","required","nullable"],["placeholder","N\xe1zev ve v\xfdpisu","type","text",3,"control"],["placeholder","Popis","type","text",3,"control"],["placeholder","SEO Title","type","text",3,"control"],["placeholder","SEO Description","type","text",3,"control"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nov\xe1 jazykov\xe1 mutace"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"aegisx-select-language",1)(7,"mcrai-input",2)(8,"mcrai-input",3)(9,"mcrai-input",4)(10,"mcrai-input",5),t.k0s()(),t.j41(11,"mcrai-modal-actions")(12,"button",6),t.bIt("click",function(){return i.close}),t.EFF(13,"Zav\u0159\xedt"),t.k0s(),t.j41(14,"button",7),t.bIt("click",function(){return i.createBrandInfo()}
1),t.EFF(15,"Vytvo\u0159it"),t.k0s()()()),2&o&&(t.R7$(5),t.Y8G("formGroup",i.form),t.R7$(),t.Y8G("control",i.controls.language)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",i.controls.name_detail),t.R7$(),t.Y8G("control",i.controls.description),t.R7$(),t.Y8G("control",i.controls.seo_title),t.R7$(),t.Y8G("control",i.controls.seo_description),t.R7$(4),t.Y8G("disabled",i.isAddButtonDisabled()))},dependencies:[v.Q,s.qT,s.cb,s.j4,$.N,H.h,Y.l,P.J,z.f,vt.Q]})}return n})();var Xe=r(6985),St=r(41819),xt=r(62523),Tt=r(39103),Ve=r(57864),Rt=r(44010),He=r(52570);const Ye=n=>[n,"name"],Pe=n=>[n,"name_detail"],ze=n=>[n,"seo_title"],Je=n=>[n,"seo_description"],Qe=n=>[n,"description"];function Ze(n,a){if(1&n&&(t.j41(0,"h3"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.language)}}function We(n,a){if(1&n&&(t.j41(0,"mcrai-dl")(1,"mcrai-dt"),t.EFF(2,"N\xe1zev"),t.k0s(),t.j41(3,"mcrai-dd"),t.EFF(4),t.nI1(5,"notSet"),t.k0s(),t.j41(6,"mcrai-dt"),t.EFF(7,"N\xe1zev ve v\xfdpisu"),t.k0s(),t.j41(8,"mcrai-dd"),t.EFF(9),t.nI1(10,"notSet"),t.k0s(),t.j41(11,"mcrai-dt"),t.EFF(12,"SEO Title"),t.k0s(),t.j41(13,"mcrai-dd"),t.EFF(14),t.nI1(15,"notSet"),t.k0s(),t.j41(16,"mcrai-dt"),t.EFF(17,"SEO Description"),t.k0s(),t.j41(18,"mcrai-dd"),t.EFF(19),t.nI1(20,"notSet"),t.k0s(),t.j41(21,"mcrai-dt"),t.EFF(22,"Popis"),t.k0s(),t.nrm(23,"mcrai-dd",3),t.nI1(24,"notSet"),t.k0s()),2&n){const e=t.XpG().$implicit,o=t.XpG(2);t.R7$(4),t.JRh(t.bMT(5,5,o.brand.name)),t.R7$(5),t.JRh(t.bMT(10,7,e.name_detail)),t.R7$(5),t.JRh(t.bMT(15,9,e.seo_title)),t.R7$(5),t.JRh(t.bMT(20,11,e.seo_description)),t.R7$(4),t.Y8G("safeHTML",t.bMT(24,13,e.de
1scription))}}function Ke(n,a){if(1&n&&(t.nrm(0,"mcrai-input",4)(1,"mcrai-input",5)(2,"mcrai-input",6)(3,"mcrai-input",7),t.j41(4,"div"),t.nrm(5,"br"),t.EFF(6," Popis "),t.nrm(7,"aegisx-smd-editor",8),t.k0s()),2&n){const e=t.XpG().$implicit,o=t.XpG(2);t.Y8G("control",o.form.get(t.eq3(6,Ye,e.language)))("errors",o.ERRORS.name),t.R7$(),t.Y8G("control",o.form.get(t.eq3(8,Pe,e.language))),t.R7$(),t.Y8G("control",o.form.get(t.eq3(10,ze,e.language))),t.R7$(),t.Y8G("control",o.form.get(t.eq3(12,Je,e.language))),t.R7$(4),t.Y8G("control",o.form.get(t.eq3(14,Qe,e.language)))}}function qe(n,a){if(1&n&&(t.j41(0,"mcrai-tab"),t.DNE(1,Ze,2,1,"ng-template",2)(2,We,25,15,"mcrai-dl")(3,Ke,8,16),t.k0s()),2&n){const e=t.XpG(2);t.R7$(2),t.vxM(2,e.toolbarService.isEditMode()?-1:2),t.R7$(),t.vxM(3,e.toolbarService.isEditMode()?3:-1)}}function tn(n,a){if(1&n&&(t.j41(0,"mcrai-horizontal-tabs"),t.Z7z(1,qe,4,2,"mcrai-tab",null,t.fX1),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Dyx(e.info)}}function en(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",11),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.patch())}),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("disabled",e.form.invalid)}}function nn(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.add())}),t.EFF(1,"P\u0159idat jazykovou mutaci "),t.k0s()}}function on(n,a){if(1&n&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,en,2,1,"button",9)(2,nn,2,0,"button",10),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,!e.toolbarService.isDeleteMode()&&e.showAddButton()?2:-1)}}let an=(()=>{class n{get controls(){return this.form.controls}constructor(e,o,i,d){this.store=e,this.modalService=o,this.permissionService=i,this.toolbarService=d,this.ERRORS={name:{required:"Zna\u010dka mus\xed m\xedt n\xe1zev"}},this.destroy=new I.B7,this.info=[],this.form=new s.J3({}),this.languages=[]}ngOnInit(){this.store.select(e=>e.aegisxBrands.brand).pipe((0,F.Q)(this.destroy),(0,Oe.p)(e=>!!e.info)).subscribe(e=>this.onBrandChange(e)),this.store.select(e=>e.sharedLCD.languages).pipe((0,F.Q)(this.destroy)).subscribe(e=>this.languages=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}getInfoDiff(e,o){return o.filter(i=>-1===e.indexOf(i.language))}onBrandChange(e){this.info=e.info,this.brand=e,this.updateForm(e.info),this.hydrateForm(e.info)}updateForm(e=[]){const o=Object.keys(this.form.value);this.getInfoDiff(o,e).forEach(d=>{const f=this.buildForm(d);this.form.addControl(d.language,f)})}buildForm(e){const o=new s.J3({});return Object.keys(e).forEach(i=>{o.addControl(i,new s.hs)}),o.addControl("name",new s.hs(null,s.k0.required)),o}hydrateForm(e){e.forEach(o=>{Object.assign(o,{name:this.brand.name});const i=this.form.controls[o.language];i&&i.patchValue(o)})}showAddButton(){return this.info.length<this.languages.length}showActions(){return this.showAddButton()&&this.toolbarService.isViewMode()||!this.toolbarService.isViewMode()}add(){const e=new l.m_("600px","500px");this.modalService.open(we,e)}patch(){const e=this.form.controls;Object.keys(e).forEach(o=>{e[o].dirty&&this.store.dispatch(new Ae({id:this.brand.id,language:o,info:e[o].value}))})}isAbsolute(e){return/^https?:\/\//.test(e.url)}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(l.mO),t.rXU(J.n),t.rXU(j.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-languages"]],decls:8,vars:3,consts:[["color","secondary"],["id","info",3,"formGroup"],["mcraiTabLabel",""],[3,"safeHTML"],["type","text","placeholder","N\xe1zev ve v\xfdpisu",3,"control","errors"],["type","text","placeholder","N\xe1zev ve v\xfdpisu",3,"control"],["type","text","placeholder","SEO Title",3,"control"],["type","text","placeholder","SEO Description",3,"control"],[3,"control"],["form","info","mcrai-button","positive",3,"disabled"],["mcrai-button","positive"],["form","info","mcrai-button","positive",3,"click","disabled"],["mcrai-button","positive",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Jazykov\xe9 mutace"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"form",1),t.DNE(6,tn,3,0,"mcrai-horizontal-tabs"),t.k0s()(),t.DNE(7,on,3,2,"mcrai-panel-actions"),t.k0s()),2&o&&(t.R
17$(5),t.Y8G("formGroup",i.form),t.R7$(),t.vxM(6,i.info.length?6:-1),t.R7$(),t.vxM(7,i.permissionService.canWrite()&&i.showActions()?7:-1))},dependencies:[v.Q,Xe.m,gt.N,s.qT,s.cb,s.j4,S.g,x.l,k.h,T.B,$.N,St.p,xt.L,Tt.Z,Ve.y,Rt.qv,Rt.p$,He.s],styles:[".mcrai-tabs[_ngcontent-%COMP%]{background-color:#fff!important}"]})}return n})(),rn=(()=>{class n{constructor(){}ngOnInit(){}static#t=this.\u0275fac=function(o){return new(o||n)};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-view"]],inputs:{brand:"brand"},decls:10,vars:1,consts:[["color","secondary"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Z\xe1kladn\xed informace"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"mcrai-dl")(6,"mcrai-dt"),t.EFF(7,"N\xe1zev"),t.k0s(),t.j41(8,"mcrai-dd"),t.EFF(9),t.k0s()()()()),2&o&&(t.R7$(9),t.JRh(null==i.brand?null:i.brand.name))},dependencies:[S.g,x.l,T.B,St.p,xt.L,Tt.Z]})}return n})();var sn=r(28520);function cn(n,a){if(1&n&&t.nrm(0,"mcrai-media",1),2&n){const e=t.XpG();t.Y8G("data",e.brand.image.thumbnail)}}function ln(n,a){if(1&n&&(t.j41(0,"form",2),t.nrm(1,"mcrai-input",3),t.k0s()),2&n){const e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(),t.Y8G("control",e.controls.image)}}function dn(n,a){if(1&n){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.deleteImage())}),t.EFF(1,"Smazat obr\xe1zek"),t.k0s()}}function mn(n,a){if(1&n){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",4),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.uploadImage())}),t.EFF(2,"Nahr\xe1t"),t.k0s(),t.DNE(3,dn,2,0,"button",5),t.k0s()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("disabled",e.isUploadButtonDisabled()),t.R7$(2),t.vxM(3,e.toolbarService.isDeleteMode()&&e.hasImage()?3:-1)}}let pn=(()=>{class n{get controls(){return this.form.controls}constructor(e,o){this.store=e,this.toolbarService=o}ngOnInit(){this.createForm()}createForm(){this.form=new s.J3({image:new s.hs(null,s.k0.required)})}isUploadButtonDisabled(){return!this.form.valid}uploadImage(){this.isUploadButtonDisabled()?console.error("upload image invalid",this.form.value):this.store.dispatch(new Mt({brand_id:this.brand.id,image:this.form.value.image}))}hasImage(){return!!this.brand&&!!this.brand.image}deleteImage(){this.store.dispatch(new $t({brand_id:this.brand.id}))}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(j.h))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-image"]],inputs:{brand:"brand"},decls:11,vars:4,consts:[["color","secondary","collapsable","",3,"collapsed"],["type","image","width","250","height","250",3,"data"],[3,"formGroup"],["type","file",3,"control"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","negative"],["mcrai-button","negative",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h3"),t.EFF(3,"Obr\xe1zek"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"mcrai-row")(6,"mcrai-col"),t.DNE(7,cn,1,1,"mcrai-media",1),t.k0s(),t.j41(8,"mcrai-col"),t.DNE(9,ln,2,2,"form",2),t.k0s()()(),t.DNE(10,mn,4,2,"mcrai-panel-actions"),t.k0s()),2&o&&(t.Y8G("collapsed",!1),t.R7$(7),t.vxM(7,i.hasImage()?7:-1),t.R7$(2),t.vxM(9,i.toolbarService.isEditMode()?9:-1),t.R7$(),t.vxM(10,i.toolbarService.isViewMode()?-1:10))},dependencies:[v.Q,s.qT,s.cb,s.j4,S.g,x.l,k.h,T.B,M.o,L.g,sn.e,yt.h]})}return n})();function un(n,a){if(1&n){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",3),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.patchBrand())}),t.EFF(2,"Ulo\u017eit zm\u011bny "),t.k0s()()}}function hn(n,a){if(1&n&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h1"),t.EFF(5),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"mcrai-row")(8,"mcrai-col"),t.nrm(9,"aegisx-brand-view",1),t.k0s(),t.j41(10,"mcrai-col",2),t.nrm(11,"aegisx-brand-languages"),t.k0s()(),t.j41(12,"mcrai-row")(13,"mcrai-col"),t.nrm(14,"aegisx-brand-image",1),t.k0s()()(),t.DNE(15,un,3,0,"mcrai-panel-actions"),t.k0s()()()),2&n){const e=t.XpG();t.R7$(5),t.JRh(null==e.brand?null:e.brand.name),t.R7$(4),t.Y8G("brand",e.brand),t.R7$(5),t.Y8G("brand",e.brand),t.R7$(),t.vxM(15,e.toolbarService.isEditMode()?15:-1)}}const gn=[{path:"",component:$e,canActivate:[ut.J]},{path:":brand_id",component:(()=>{class n{constructor(e,o,i,d){this.store=e,this.activatedRoute=o,this.toolbarService=i,this.location=d,this.destroy=new I.B7,o.params.subscribe(f=>{this.store.dispatch(new W({id:f.brand_id}))})}ngOnInit(){this.getLanguages(),this.selectBrand(),this.setToolbarModes()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}setToolbarModes(){this.toolbarService.setToolbarModes([R.H.View,R.H.Edit,R.H.Delete])}selectBrand(){this.store.select(e=>e.aegisxBrands.brand).pipe((0,F.Q)(this.destroy)).subscribe(e=>this.brand=e)}pickupPatchedBrand(e){this.patchedBrand=e}
1patchBrand(){this.patchedBrand.valid?this.store.dispatch(new Gt({brand_id:this.brand.id,body:this.patchedBrand.value})):console.error("patch brand not valid",this.patchedBrand)}getLanguages(){this.store.dispatch(new Ne.c8)}static#t=this.\u0275fac=function(o){return new(o||n)(t.rXU(m.il),t.rXU(u.nX),t.rXU(j.h),t.rXU(g.aZ))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["aegisx-brand-detail"]],decls:8,vars:1,consts:[["mcrai-button","neutral",3,"click"],[3,"brand"],["flex-2",""],["mcrai-button","positive",3,"click"]],template:function(o,i){1&o&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-row")(3,"mcrai-col")(4,"button",0),t.bIt("click",function(){return i.location.back()}),t.EFF(5,"Zp\xe1tky"),t.k0s()()(),t.DNE(6,hn,16,4,"mcrai-row"),t.k0s(),t.nrm(7,"aegisx-toolbar")),2&o&&(t.R7$(6),t.vxM(6,i.brand?6:-1))},dependencies:[Bt.I,Et.I,v.Q,S.g,x.l,k.h,T.B,M.o,L.g,_t.H,an,rn,pn]})}return n})(),canActivate:[ut.J]}];let vn=(()=>{class n{static#t=this.\u0275fac=function(o){return new(o||n)};static#e=this.\u0275mod=t.$C({type:n});static#n=this.\u0275inj=t.G2t({imports:[u.iI.forChild(gn),u.iI]})}return n})();var bn=r(12906);let Dt=(()=>{class n extends bn.d{constructor(){super(...arguments),this.BRANDS_URL="brands"}getBrand(e){const o=this.buildUrl(`${this.BRANDS_URL}/${e}`);return this.get(o)}getBrands(e,o=null){const i={page:e,...o},d=this.buildUrl(this.BRANDS_URL,i,!0);return this.get(d)}createBrand(e){const o=this.buildUrl(this.BRANDS_URL);return this.post(o,e)}patchBrand(e,o){const i=this.buildUrl(`${this.BRANDS_URL}/${e}`);return this.patch(i,o)}postBrandInfo(e,o){const i=this.buildUrl(["brands",e,"info"]);return this.post(i,o)}patchBrandInfo(e,o,i){const d=this.buildUrl(["brands",e,"info",o]);return this.patch(d,i)}deleteBrands(e){const o={brand_ids:e.reduce((d,f)=>(d.push(f.id),d),[])},i=this.buildUrl(this.BRANDS_URL,o);return this.del(i)}uploadImage(e,o){const i=this.buildUrl(`${this.BRANDS_URL}/${e}/image`),d=new FormData;return d.append("image",o),this.post(i,d)}deleteImage(e){const o=this.buildUrl(`${this.BRANDS_URL}/${e}/image`);return this.del(o)}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})();var b=r(14421),p=r(15539),jt=r(57421),h=r(49090),B=r(95006),E=r(83921);let _=(()=>{class n{constructor(e,o,i,d,f,Q){this.actions=e,this.brandService=o,this.store=i,this.toastService=d,this.loaderService=f,this.modalService=Q}static#t=this.\u0275fac=function(o){return new(o||n)(t.KVO(c.En),t.KVO(Dt),t.KVO(m.il),t.KVO(l.FS),t.KVO(l.wA),t.KVO(l.mO))};static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})();var y=r(76613);let Bn=(()=>{class n extends _{constructor(){super(...arguments),this.getBrands=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(ot),(0,p.M)(()=>this.loaderService.show()),(0,jt.E)(this.store),(0,h.n)(([e,o])=>this.brandService.getBrands(e.payload.page,o.aegisxBrands.filter).pipe((0,B.T)(i=>new Ut({brands:i,append:e.payload.append})),(0,E.W)(i=>(0,b.of)(new y.Rn(i))))))),this.getBrandsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(X),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),En=(()=>{class n extends _{constructor(){super(...arguments),this.createBrand=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(ht),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.createBrand(e.payload.item).pipe((0,B.T)(o=>new Kt(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.createBrandSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(ft),(0,p.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,h.n)(()=>[new G({page:1,append:!1})])))}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),_n=(()=>{class n extends _{constructor(){super(...arguments),this.deleteBrands=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(st),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.deleteBrands(e.payload.items).pipe((0,B.T)(o=>new Vt(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.deleteBrandsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(V),(0,p.M)(e=>{this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,h.n)(()=>[new G({page:1,append:!1})])))}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),yn=(()=>{class n extends _{constructor(){super(...arguments),this.getBrand=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(Z),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.getBrand(e.payload.id).pipe((0,B.T)(o=>new kt(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.getBrandSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(O),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),Cn=(()=>{class n extends _{constructor(){super(...arguments),this.patchBrand=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(K),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.patchBrand(e.payload.brand_id,e.payload.body).pipe((0,B.T)(o=>new It(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.patchBrandSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(A),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),Fn=(()=>{class n extends _{constructor(){super(...arguments),this.uploadImage=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(q),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.uploadImage(e.payload.brand_id,e.payload.image).pipe((0,B.T)(o=>new Lt(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.uploadImageSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(U),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)})),{dispatch:!1}),this.deleteImage=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(tt),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.brandService.deleteImage(e.payload.brand_id).pipe((0,B.T)(o=>new Nt(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.deleteImageSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(et),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})();var Sn=r(291),xn=r(73821),Tn=r(50289),Rn=r(93578),Dn=r(40233),jn=r(73491);let kn=(()=>{class n extends _{constructor(){super(...arguments),this.exportBrandsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(bt.G3),(0,p.M)(e=>{this.modalService.open(jn.w,new l.m_("800px","600px",{exportLog:e.payload.item}))}),(0,h.n)(()=>[new rt])))}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})();var Gn=r(61264),In=r(4903),Mn=r(18456);let Ln=(()=>{class n extends _{constructor(){super(...arguments),this.patchBrandInfo=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(Ct),(0,p.M)(()=>this.loaderService.show()),(0,Mn.ZZ)(e=>this.brandService.patchBrandInfo(e.payload.id,e.payload.language,e.payload.info).pipe((0,B.T)(o=>new Ue(o)),(0,E.W)(o=>(0,b.of)(new y.Rn(o))))))),this.patchBrandInfoSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(Ft),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)}),(0,h.n)(e=>[new W({id:e.payload.item.id})])))}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})();var $n=r(55951);let Nn=(()=>{class n extends _{constructor(){super(...arguments),this.postBrandInfo=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(nt),(0,p.M)(()=>this.loaderService.show()),(0,jt.E)(this.store.select(e=>e.aegisxBrands.brand)),(0,h.n)(([e,o])=>this.brandService.postBrandInfo(o.id,e.payload.info).pipe((0,B.T)(i=>new At(i)),(0,E.W)(i=>(0,b.of)(new y.Rn(i))))))),this.postBrandInfoSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(w),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,l.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(i){return(e||(e=t.xGo(n)))(i||n)}})();static#e=this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac})}return n})(),On=(()=>{class n{static#t=this.\u0275fac=function(o){return new(o||n)};static#e=this.\u0275mod=t.$C({type:n});static#n=this.\u0275inj=t.G2t({providers:[Dt],imports:[g.MD,vn,Sn.G,Rn.m,Tn.G,xn.c,s.X1,u.
1iI,In.g,m.md.forFeature(D,Qt),c.Vm.forFeature([En,yn,Bn,Cn,Ln,Nn,_n,Fn,kn]),l.pj,l.LU,l.B4,l.SD,l.Zg,l.xT,l.oP,l.Tm,l.F8,l.hv,Dn.j,Gn.L,$n.R]})}return n})()},80070:(N,C,r)=>{function g(u){return u?u.reduce((s,c)=>s.concat(c.id),[]):[]}r.d(C,{_:()=>g})},68417:(N,C,r)=>{r.d(C,{$:()=>u});var g=r(54438);let u=(()=>{class s{transform(m,l){return m&&m.length>l?m.slice(0,l-3).concat("..."):m}static#t=this.\u0275fac=function(l){return new(l||s)};static#e=this.\u0275pipe=g.EJ8({name:"characterLimit",type:s,pure:!0})}return s})()},52570:(N,C,r)=>{r.d(C,{s:()=>u});var g=r(54438);let u=(()=>{class s{static#t=this.LET={ZERO:1,EMPTY_STR:2,FALSE:4,NAN:8};transform(m,l=0){return l&s.LET.ZERO&&0===m||l&s.LET.EMPTY_STR&&""===m||l&s.LET.FALSE&&!1===m||l&s.LET.NAN&&isNaN(m)?m:m||"-"}static#e=this.\u0275fac=function(l){return new(l||s)};static#n=this.\u0275pipe=g.EJ8({name:"notSet",type:s,pure:!0})}return s})()}}]);
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.