PageSourceSearch

https://www.mondraker.cz/5782.aaaf4dfeaf1a59c5.js

js mondraker.cz collected 2026-10-07 07:06:21 UTC 122,111 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmondraker=self.webpackChunkmondraker||[]).push([[5782],{85782:(W,D,a)=>{a.r(D),a.d(D,{CategoriesModule:()=>Mr});var f=a(60177),l=a(89417),c=a(41635),m=a(76965),d=a(33962),y=a(45570),R=a(63040),B=a(16706),S=a(45286),C=a(7605),kt=a(52726),ct=a(71544),G=a(98506),k=a(79187),Q=a(34114);const Rt=["n\xe1zev","n\xe1zev + obr\xe1zek","n\xe1zev + obr\xe1zek + popis"];var xt=a(13185);const St=["seznam","dla\u017edice"];var jt=a(16818),t=a(54438),x=a(63649),ee=a(5681),lt=a(25331),U=a(31992),V=a(46346),z=a(94300),L=a(54444),Z=a(97519),Tt=a(28520),Dt=a(11815),q=a(59788),tt=a(83891),O=a(33579),X=a(33555),w=a(23509),M=a(90113),$=a(36001),Gt=a(31614),wt=a(10613),Mt=a(73955);function oe(o,r){if(1&o&&(t.j41(0,"mcrai-option",15),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function ie(o,r){if(1&o&&(t.j41(0,"mcrai-option",15),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function ne(o,r){if(1&o&&(t.j41(0,"mcrai-option",15),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function re(o,r){if(1&o&&(t.j41(0,"mcrai-option",15),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",t.bMT(2,2,e)," ")}}let ae=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n){this.store=e,this.builder=i,this.modalService=n,this.CATEGORIES_LAYOUTS=Rt,this.PRODUCTS_LAYOUTS=xt.D,this.ARTICLES_LAYOUTS=St,this.PRODUCTS_ORDER=jt.o,this.ERRORS={name:{required:"Kategorie mus\xed m\xedt n\xe1zev."}},this.buildForm()}ngOnInit(){}buildForm(){this.form=this.builder.group({language:["CZ"],name:[null,l.k0.required],name_detail:[null],url:[null],description:[null],seo_title:[null],seo_description:[null],preview_image:[],background_image:[],icon:[],hidden:[!1],enable_banners:[!0],enable_categories:[!0],enable_articles:[!0],enable_products:[!0],enable_filter:[!0],enable_map:[!1],enable_brands:[!1],enable_top:[!1],layout:[],products_layout:[],articles_layout:[],products_order:[],preferred_brands:[[]],order:[]})}isAddButtonDisabled(){return this.form.invalid}add(){this.isAddButtonDisabled()||(this.store.dispatch(new k.zK({category:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(l.ze),t.rXU(d.mO))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-add-category-modal"]],decls:122,vars:44,consts:[[3,"formGroup"],["collapsable","",3,"collapsed"],[3,"control","required","nullable"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","N\xe1zev ve v\xfdpisu",3,"control"],["type","category",3,"control"],["type","text","placeholder","SEO Title",3,"control"],["type","text","placeholder","SEO Description",3,"control"],[3,"control"],["color","secondary"],["type","file",3,"control"],["type","text","placeholder","Po\u0159ad\xed",3,"control"],["type","checkbox",3,"control","value"],["placeholder","Preferovan\xed v\xfdrobci",3,"control","multiple","nullable"],["placeholder","\u0160ablona kategori\xed",3,"control"],[3,"value"],["placeholder","\u0160ablona produkt\u016f",3,"control"],["placeholder","\u0160ablona \u010dl\xe1nk\u016f",3,"control"],["placeholder","\u0158azen\xed produkt\u016f",3,"control"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"P\u0159idat kategorii"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0)(6,"mcrai-row")(7,"mcrai-col")(8,"mcrai-panel",1)(9,"mcrai-panel-header")(10,"h2"),t.EFF(11,"Prvn\xed jazykov\xe1 mutace"),t.k0s()(),t.j41(12,"mcrai-panel-content"),t.nrm(13,"aegisx-select-language",2)(14,"mcrai-input",3)(15,"mcrai-input",4)(16,"aegisx-url-input",5)(17,"mcrai-input",6)(18,"mcrai-input",7),t.j41(19,"div"),t.nrm(20,"br"),t.EFF(21," Popis "),t.nrm(22,"aegisx-smd-editor",8),t.k0s()()()()(),t.j41(23,"mcrai-row")(24,"mcrai-col")(25,"mcrai-panel",1)(26,"mcrai-panel-header")(27,"h2"),t.EFF(28,"Obr\xe1zky"),t.k0s()(),t.j41(29,"mcrai-panel-content")(30,"mcrai-row")(31,"mcrai-col")(32,"m
1crai-panel",9)(33,"mcrai-panel-header")(34,"h3"),t.EFF(35,"N\xe1hledov\xfd obr\xe1zek"),t.k0s()(),t.j41(36,"mcrai-panel-content"),t.nrm(37,"mcrai-input",10),t.k0s()()()(),t.j41(38,"mcrai-row")(39,"mcrai-col")(40,"mcrai-panel",9)(41,"mcrai-panel-header")(42,"h3"),t.EFF(43,"Pozad\xed"),t.k0s()(),t.j41(44,"mcrai-panel-content"),t.nrm(45,"mcrai-input",10),t.k0s()()()(),t.j41(46,"mcrai-row")(47,"mcrai-col")(48,"mcrai-panel",9)(49,"mcrai-panel-header")(50,"h3"),t.EFF(51,"Ikona"),t.k0s()(),t.j41(52,"mcrai-panel-content"),t.nrm(53,"mcrai-input",10),t.k0s()()()()()()()(),t.j41(54,"mcrai-row")(55,"mcrai-col")(56,"mcrai-panel",1)(57,"mcrai-panel-header")(58,"h2"),t.EFF(59,"Nastaven\xed"),t.k0s()(),t.j41(60,"mcrai-panel-content")(61,"mcrai-row")(62,"mcrai-col")(63,"mcrai-panel",9)(64,"mcrai-panel-header")(65,"h3"),t.EFF(66,"Kategorie"),t.k0s()(),t.j41(67,"mcrai-panel-content"),t.nrm(68,"mcrai-input",11)(69,"br"),t.j41(70,"mcrai-input",12),t.EFF(71,"Skr\xfdt kategorii"),t.k0s(),t.j41(72,"mcrai-input",12),t.EFF(73,"Zobrazit bannery"),t.k0s(),t.j41(74,"mcrai-input",12),t.EFF(75,"Zobrazit kategorie"),t.k0s(),t.j41(76,"mcrai-input",12),t.EFF(77,"Zobrazit \u010dl\xe1nky"),t.k0s(),t.j41(78,"mcrai-input",12),t.EFF(79,"Zobrazit produkty"),t.k0s(),t.j41(80,"mcrai-input",12),t.EFF(81,"Zobrazit nejprod\xe1van\u011bj\u0161\xed produkty"),t.k0s(),t.j41(82,"mcrai-input",12),t.EFF(83,"Zobrazit filtr"),t.k0s(),t.j41(84,"mcrai-input",12),t.EFF(85,"Zobrazit zna\u010dky"),t.k0s(),t.j41(86,"mcrai-input",12),t.EFF(87,"Zobrazit mapu"),t.k0s()()()(),t.j41(88,"mcrai-col")(89,"mcrai-panel",9)(90,"mcrai-panel-header")(91,"h3"),t.EFF(92,"Ostatn\xed"),t.k0s()(),t.j41(93,"mcrai-panel-content"),t.nrm(94,"shared-select-brand",13),t.k0s()()()(),t.j41(95,"mcrai-row")(96,"mcrai-col")(97,"mcrai-panel",9)(98,"mcrai-panel-header")(99,"h3"),t.EFF(100,"Za\u0159azen\xe9 polo\u017eky"),t.k0s()(),t.j41(101,"mcrai-panel-content")(102,"mcrai-row")(103,"mcrai-col")(104,"mcrai-select",14),t.Z7z(105,oe,2,2,"mcrai-option",15,t.fX1),t.k0s(),t.j41(107,"mcrai-select",16),t.Z7z(108,ie,2,2,"mcrai-option",15,t.fX1),t.k0s(),t.j41(110,"mcrai-select",17),t.Z7z(111,ne,2,2,"mcrai-option",15,t.fX1),t.k0s()(),t.j41(113,"mcrai-col")(114,"mcrai-select",18),t.Z7z(115,re,3,4,"mcrai-option",15,t.fX1),t.k0s()()()()()()()()()()()()(),t.j41(117,"mcrai-modal-actions")(118,"button",19),t.bIt("click",function(){return n.close()}),t.EFF(119,"Zav\u0159\xedt"),t.k0s(),t.j41(120,"button",20),t.bIt("click",function(){return n.add()}),t.EFF(121,"Vytvo\u0159it"),t.k0s()()()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(3),t.Y8G("collapsed",!1),t.R7$(5),t.Y8G("control",n.controls.language)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",n.controls.name)("errors",n.ERRORS.name),t.R7$(),t.Y8G("control",n.controls.name_detail),t.R7$(),t.Y8G("control",n.controls.url),t.R7$(),t.Y8G("control",n.controls.seo_title),t.R7$(),t.Y8G("control",n.controls.seo_description),t.R7$(4),t.Y8G("control",n.controls.description),t.R7$(3),t.Y8G("collapsed",!0),t.R7$(12),t.Y8G("control",n.controls.preview_image),t.R7$(8),t.Y8G("control",n.controls.background_image),t.R7$(8),t.Y8G("control",n.controls.icon),t.R7$(3),t.Y8G("collapsed",!0),t.R7$(12),t.Y8G("control",n.controls.order),t.R7$(2),t.Y8G("control",n.controls.hidden)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_banners)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_categories)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_articles)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_products)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_top)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_filter)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_brands)("value",!0),t.R7$(2),t.Y8G("control",n.controls.enable_map)("value",!0),t.R7$(8),t.Y8G("control",n.controls.preferred_brands)("multiple",!0)("nullable",!1),t.R7$(10),t.Y8G("control",n.controls.layout),t.R7$(),t.Dyx(n.CATEGORIES_LAYOUTS),t.R7$(2),t.Y8G("control",n.controls.products_layout),t.R7$(),t.Dyx(n.PRODUCTS_LAYOUTS),t.R7$(2),t.Y8G("control",n.controls.articles_layout),t.R7$(),t.Dyx(n.ARTICLES_LAYOUTS),t.R7$(3),t.Y8G("control",n.controls.products_order),t.R7$(),t.Dyx(n.PRODUCTS_ORDER),t.R7$(5),t.Y8G("disabled",n.isAddButtonDisabled()))},dependencies:[x.Q,l.qT,l.cb,l.j4,ee.h,lt.$,U.h,V.l,z.J,L.f,Z.N,Tt.e,Dt.u,q.w,tt.P,O.o,X.g,w.g,M.l,$.B,Gt.Q,wt.N,Mt.D9]})}return o}
1)(),se=(()=>{class o{constructor(e,i,n){this.store=e,this.modalService=i,this.data=n}ngOnInit(){}deleteCategories(){this.store.dispatch(new G.k6({branches:this.data.branches})),this.close()}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(d._P))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-confirm-delete-modal"]],decls:12,vars:0,consts:[["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Opravdu smazat?"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"p"),t.EFF(6,"Ve vybran\xfdch kategori\xedch jsou za\u0159azeny produkty nebo \u010dl\xe1nky. Chcete opravdu smazat zvolen\xe9 kategorie?"),t.k0s()(),t.j41(7,"mcrai-modal-actions")(8,"button",0),t.bIt("click",function(){return n.close()}),t.EFF(9,"Zav\u0159\xedt "),t.k0s(),t.j41(10,"button",1),t.bIt("click",function(){return n.deleteCategories()}),t.EFF(11,"Potvrdit"),t.k0s()()())},dependencies:[x.Q,U.h,V.l,z.J,L.f]})}return o})();var J=a(25328),ce=a(52401);let le=(()=>{class o{constructor(e,i){this.store=e,this.modalService=i}ngOnInit(){}export(e){this.store.dispatch(new ce.X2({body:{category:!0,category_id:e}})),this.close()}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-export-modal-categories"]],decls:12,vars:0,consts:[["mcrai-button","positive",3,"click"],["mcrai-button","negative",3,"click"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Exportovat kategorie na FTP"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"button",0),t.bIt("click",function(){return n.export("root")}),t.EFF(6,"Exportovat norm\xe1ln\xed kategorie"),t.k0s(),t.j41(7,"button",0),t.bIt("click",function(){return n.export("specials")}),t.EFF(8,"Exportovat speci\xe1ln\xed kategorie"),t.k0s()(),t.j41(9,"mcrai-modal-actions")(10,"button",1),t.bIt("click",function(){return n.close()}),t.EFF(11,"Zav\u0159\xedt"),t.k0s()()())},dependencies:[x.Q,U.h,V.l,z.J,L.f]})}return o})();var K=a(92228),A=a(15509),$t=a(2181),de=a(76371),me=a(6324),It=a(35244),Pt=a(52699),H=a(92721),pe=a(68550),_=a(55443),Bt=a(15365),Ot=a(26588),Xt=a(48390),ue=a(42974);const _e=["wrapper"],he=["content"],ge=["*"],Ce=o=>({transform:o});let fe=(()=>{class o{constructor(e,i){this.renderer=e,this.elRef=i,this.STICKY_CONTENT_CLASS="mcrai-sticky-content",this.marginTop=0,this.wrapperPosition=0}ngOnInit(){this.renderer.addClass(this.elRef.nativeElement,this.STICKY_CONTENT_CLASS)}isContentFixed(e){return this.wrapper.nativeElement.getBoundingClientRect().top-this.marginTop<=0}wrapperYPosition(e){this.wrapperPosition=this.wrapper.nativeElement.getBoundingClientRect().top.valueOf()}get contentPosition(){if(!this.isContentFixed())return 0;switch(!0){case this.wrapperPosition<=0&&!this.isOnEnd:return this.marginTop+Math.abs(this.wrapperPosition);case this.wrapperPosition>0&&!this.isOnEnd:return this.marginTop-this.wrapperPosition;case this.isOnEnd:return this.wrapperHeight-this.contentHeight;default:return 0}}get wrapperHeight(){return this.wrapper.nativeElement.offsetHeight}get contentHeight(){return this.content.nativeElement.offsetHeight}get isOnEnd(){return this.wrapperPosition<=-this.wrapperHeight+this.marginTop+this.contentHeight}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(t.sFG),t.rXU(t.aKT))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["mcrai-sticky-content"]],viewQuery:function(i,n){if(1&i&&(t.GBs(_e,7,t.aKT),t.GBs(he,7,t.aKT)),2&i){let s;t.mGM(s=t.lsd())&&(n.wrapper=s.first),t.mGM(s=t.lsd())&&(n.content=s.first)}},hostBindings:function(i,n){1&i&&t.bIt("scroll",function(u){return n.wrapperYPosition(u)},!1,t.tSv)},inputs:{marginTop:"marginTop"},ngContentSelectors:ge,decls:5,vars:3,consts:[["wrapper",""],["content",""],[1,"sticky-content__wrapper"],[1,"sticky-content__content",3,"ngStyle"]],template:function(i,n){1&i&&(t.NAR(),t.j41(0,"div",2,0)(2,"div",3,1),t.SdG(4),t.k0s()()),2&i&&(t.R7$(2),t.Y8G("ngStyle",t.eq3(1,Ce,"translate3d(0, "+n.contentPosition+"px, 0)")))},dependencies:[f.B3],styles:[".sticky-content__wrapper{position:relative;height:100%}.sticky-content__content{transform:translateZ(0);transition:all .3s linear}\n"],encapsulation:2,changeDetection:0})}return o}
1)();function ye(o,r){if(1&o&&t.nrm(0,"aegisx-branch",4),2&o){const e=r.$implicit,i=t.XpG();t.Y8G("item",e)("parent",i.parent)}}function be(o,r){1&o&&t.EFF(0,"Nov\u011b vznikl\xe9 kategorie, kter\xe9 je\u0161t\u011b nejsou nikam za\u0159azen\xe9.")}let ve=(()=>{class o{get parent(){return"new"}constructor(e,i){this.store=e,this.toolbarService=i,this.destroy=new S.B7}ngOnInit(){this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.newCategories),(0,C.Q)(this.destroy)).subscribe(e=>this.categories=e),this.getCategories(1)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}getCategories(e){this.store.dispatch(new _.LQ({page:e}))}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-new-categories"]],decls:14,vars:3,consts:[["info",""],["color","secondary"],[1,"pull-right",3,"mcraiTooltip"],[3,"marginTop"],[3,"item","parent"],[1,"pull-left",3,"page","paginator"]],template:function(i,n){if(1&i){const s=t.RV6();t.j41(0,"mcrai-panel",1)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Nov\xe9 kategorie"),t.k0s(),t.j41(4,"mcrai-icon",2),t.EFF(5,"info"),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"mcrai-sticky-content",3),t.Z7z(8,ye,1,2,"aegisx-branch",4,t.fX1),t.k0s()(),t.j41(10,"mcrai-panel-actions")(11,"mcrai-paginator",5),t.bIt("page",function(v){return t.eBV(s),t.Njj(n.getCategories(v))}),t.k0s()()(),t.DNE(12,be,1,0,"ng-template",null,0,t.C5r)}if(2&i){const s=t.sdS(13);t.R7$(4),t.Y8G("mcraiTooltip",s),t.R7$(3),t.Y8G("marginTop",100),t.R7$(),t.Dyx(null==n.categories?null:n.categories.items),t.R7$(3),t.Y8G("paginator",null==n.categories?null:n.categories.paginator)}},dependencies:[Bt.K,Ot.R,w.g,M.l,H.h,$.B,Xt.h,ue.d,fe]})}return o})();function Ee(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.cancelStaged())}),t.EFF(1," Zru\u0161it v\xfdb\u011br "),t.k0s()}}function Fe(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.showExportModal())}),t.EFF(1," Exportovat na FTP "),t.k0s()}}function ke(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.editCategories())}),t.EFF(1," Upravit vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isEditButtonDisabled())}}function Re(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.deleteCategories())}),t.EFF(1," Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteButtonDisabled())}}function xe(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.addCategory())}),t.EFF(1," P\u0159idat kategorii "),t.k0s()}}function Se(o,r){if(1&o&&t.DNE(0,Ee,2,0,"button",2)(1,Fe,2,0,"button",2)(2,ke,2,1,"button",3)(3,Re,2,1,"button",4)(4,xe,2,0,"button",5),2&o){const e=t.XpG();t.vxM(0,e.toolbarService.isDeleteMode()?0:-1),t.R7$(),t.vxM(1,e.canExport()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1),t.R7$(),t.vxM(3,e.toolbarService.isDeleteMode()?3:-1),t.R7$(),t.vxM(4,e.toolbarService.isDeleteMode()?-1:4)}}function je(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.cancelStaged())}),t.EFF(1," Zru\u0161it v\xfdb\u011br "),t.k0s()}}function Te(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",6),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.showExportModal())}),t.EFF(1," Exportovat na FTP "),t.k0s()}}function De(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.editCategories())}),t.EFF(1," Upravit vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isEditButtonDisabled())}}function Ge(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.deleteCategories())}),t.EFF(1," Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteButtonDisabled())}}function we(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.addCategory())}),t.EFF(1," P\u0159idat kategorii "),t.k0s()}}function Me(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,je,2,0,"button",2)(2,Te,2,0,"button",2)(3,De,2,1,"button",3)(4,Ge,2,1,"button",4)(5,we,2,0,"button",5),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1),t.R7$(),t.vxM(2,e.canExport()?2:-1),t.R7$(),t.vxM(3,e.toolbarService.isEditMode()?3:-1),t.R7$(),t.vxM(4,e.toolbarService.isDeleteMode()?4:-1),t.R7$(),t.vxM(5,e.toolbarService.isDeleteMode()?-1:5)}}let $e=(()=>{class o{constructor(e,i,n,s){this.store=e,this.modalService=i,this.permissionService=n,this.toolbarService=s,this.destroy=new S.B7}ngOnInit(){this.toolbarService.setToolbarModes([J.H.View,J.H.Edit,J.H.Delete]),this.store.dispatch(new kt.c8),this.store.dispatch(new Q.tu),this.store.select(e=>e.aegisxForest.staged).pipe((0,C.Q)(this.destroy)).subscribe(e=>this.staged=e),this.store.pipe((0,m.Lt)(e=>e.aegisxForest.actions),(0,C.Q)(this.destroy)).subscribe(e=>this.actions=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}addCategory(){const e=new d.m_("1100px","750px");this.modalService.open(ae,e)}isDeleteButtonDisabled(){return!this.staged||!this.staged.length}isEditButtonDisabled(){return!this.actions||!this.actions.length}deleteCategories(){if(this.staged.some(i=>i.item.articles_count>0||i.item.products_count>0)){const i=new d.m_("500px","250px",{branches:this.staged});this.modalService.open(se,i)}else this.store.dispatch(new G.k6({branches:this.staged}))}
1editCategories(){this.actions.forEach(e=>{this.store.dispatch(new k.kd({id:e.id,categories:e.items}))}),this.store.dispatch(new ct.hM)}showExportModal(){this.modalService.open(le,new d.m_("800px","600px"))}canExport(){return this.permissionService.canExport()&&!this.toolbarService.isDeleteMode()}cancelStaged(){}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(K.n),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-overview"]],decls:22,vars:2,consts:[["top",""],[1,"pull-left"],["mcrai-button","neutral"],["mcrai-button","positive",3,"disabled"],["mcrai-button","negative",3,"disabled"],["mcrai-button","positive"],["mcrai-button","neutral",3,"click"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"],["mcrai-button","positive",3,"click"]],template:function(i,n){1&i&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h1"),t.EFF(5,"P\u0159ehled kategori\xed"),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"mcrai-row")(8,"mcrai-col")(9,"mcrai-row")(10,"mcrai-col"),t.nrm(11,"aegisx-category-tree"),t.k0s()(),t.j41(12,"mcrai-row")(13,"mcrai-col"),t.nrm(14,"aegisx-special-categories"),t.k0s()()(),t.j41(15,"mcrai-col"),t.nrm(16,"aegisx-new-categories"),t.k0s()()(),t.j41(17,"mcrai-panel-actions",0),t.nrm(18,"aegisx-select-user-domain",1),t.DNE(19,Se,5,5),t.k0s(),t.DNE(20,Me,6,5,"mcrai-panel-actions"),t.k0s()(),t.nrm(21,"aegisx-toolbar")),2&i&&(t.R7$(19),t.vxM(19,n.permissionService.canWrite()?19:-1),t.R7$(),t.vxM(20,n.permissionService.canWrite()?20:-1))},dependencies:[$t.I,de.e,me.b,x.Q,It.I,O.o,X.g,Pt.H,w.g,M.l,H.h,$.B,pe.X,ve]})}return o})();var Ie=a(19493),g=a(95006),N=a(58728),Pe=a(75253),ot=a(88529),At=a(7887),Be=a(71845);const Oe=["kategorie","\u010dl\xe1nky"];class Nt{constructor(r){this.q=r}}var I=a(87905);const Yt="[Articles] GET category articles",dt="[Articles] GET category articles success";class Ut{constructor(r){this.payload=r,this.type=Yt}}class Xe{constructor(r){this.payload=r,this.type=dt}}const Ae={articles:{}},Vt="categoryArticles";function Ne(o=Ae,r){return r.type===dt?{...o,articles:{...o.articles,[r.payload.id]:r.payload.items}}:o}const zt=o=>o[Vt].articles;var Ye=a(39630),mt=a(64204),pt=a(95466),ut=a(7306),_t=a(7622),ht=a(57382),gt=a(65208),Ct=a(21336),ft=a(87198),yt=a(49451);const Lt=()=>["brand","order","actions"];function Ue(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Zna\u010dka"),t.k0s())}function Ve(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.SpI(" ",e.brand.name," ")}}function ze(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Po\u0159ad\xed"),t.k0s())}function Le(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.SpI(" ",e.order," ")}}function He(o,r){1&o&&t.nrm(0,"mcrai-th")}function Ze(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-td",10)(1,"a",11),t.bIt("click",function(){const n=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.openOrderModal(n))}),t.EFF(2,"Zm\u011bnit po\u0159ad\xed "),t.k0s()()}}function Qe(o,r){1&o&&t.nrm(0,"mcrai-tr")}function Je(o,r){1&o&&t.nrm(0,"mcrai-tr")}let Ke=(()=>{class o{constructor(e,i,n,s){this.store=e,this.builder=i,this.modalService=n,this.data=s,this.destroy=new S.B7,this.ERRORS={name:{required:"Kategorie mus\xed m\xedt n\xe1zev."}},s.category?this.category=s.category:console.error("category is not set",s)}ngOnInit(){this.store.pipe((0,m.Lt)(y.N2),(0,C.Q)(this.destroy)).subscribe(e=>this.category=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}close(){this.modalService.close()}openOrderModal(e){const i=new d.m_("500px","250px",{preferredBrand:e,category:this.category});this.modalService.open(Ye.h,i)}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(l.ze),t.rXU(d.mO),t.rXU(d._P))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-show-preferred-brand-modal"]],decls:21,vars:8,consts:[[3,"items"],["mcraiColumnDef","brand"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","order"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[4,"mcraiRowDef","mcraiRowDefColumns"],["mcrai-button","negative",3,"click"],["align-right",""],["mcrai-button","neutral",3,"click"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3),t.nI1(4,"lowercase"),t.k0s()(),t.j41(5,"mcrai-modal-content")(6,"mcrai-table",0),t.qex(7,1),t.DNE(8,Ue,2,0,"mcrai-th",2)(9,Ve,2,1,"mcrai-td",3),t.bVm(),t.qex(10,4),t.DNE(11,ze,2,0,"mcrai-th",2)(12,Le,2,1,"mcrai-td",3),t.bVm(),t.qex(13,5),t.DNE(14,He,1,0,"mcrai-th",2)(15,Ze,3,0,"mcrai-td",6),t.bVm(),t.DNE(16,Qe,1,0,"mcrai-tr",7)(17,Je,1,0,"mcrai-tr",8),t.k0s()(),t.j41(18,"mcrai-modal-actions")(19,"button",9),t.bIt("click",function(){return n.close()}),t.EFF(20,"Zav\u0159\xedt"),t.k0s()()()),2&i&&(t.R7$(3),t.SpI("Preferovan\xed v\xfdrobci pro ",t.bMT(4,4,n.category.info[0].name),""),t.R7$(3),t.Y8G("items",n.c
1ategory.preferred_brands),t.R7$(10),t.Y8G("mcraiHeaderRowDef",t.lJ4(6,Lt)),t.R7$(),t.Y8G("mcraiRowDefColumns",t.lJ4(7,Lt)))},dependencies:[x.Q,U.h,V.l,z.J,L.f,mt.n,pt.q,ut.B,_t.K,ht.D,gt.Q,Ct.V,ft.e,yt.O,f.GH]})}return o})();var j=a(40984),Ht=a(19727),Zt=a(48235),bt=a(41819),vt=a(62523),Et=a(39103);function We(o,r){1&o&&t.nrm(0,"mcrai-option",2),2&o&&t.Y8G("value",null)}function qe(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",e.id)("title",null==e.info[0]?null:e.info[0].headline),t.R7$(),t.SpI(" ",null==e.info[0]?null:e.info[0].headline," ")}}function to(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-select",1),t.bIt("pageChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.onPageChange(n))}),t.DNE(1,We,1,1,"mcrai-option",2),t.Z7z(2,qe,2,3,"mcrai-option",3,t.fX1),t.k0s()}if(2&o){const e=t.XpG();t.FCK("placeholder","",e.placeholder,"",e.required?" *":"",""),t.Y8G("control",e.control),t.R7$(),t.vxM(1,e.nullable?1:-1),t.R7$(),t.Dyx(e.articles.items)}}let eo=(()=>{class o{constructor(e){this.store=e,this.destroy=new S.B7,this.required=!1,this.nullable=!0,this.placeholder="\u010cl\xe1nek"}ngOnInit(){this.getArticles(),this.selectArticles()}ngOnChanges(e){e.category&&this.getArticles()}getArticles(e=1){this.store.dispatch(new Ut({id:this.category.id,page:e}))}selectArticles(){this.store.pipe((0,m.Lt)(zt),(0,C.Q)(this.destroy),(0,g.T)(e=>e[this.category.id]),(0,N.p)(e=>!!e)).subscribe(e=>{this.articles=e;const i=this.form.value;i.article_link=this.category.article_link,this.form.patchValue(i)})}onPageChange(e){this.getArticles(e)}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-select-category-article"]],inputs:{form:"form",category:"category",control:"control",required:"required",nullable:"nullable",placeholder:"placeholder"},features:[t.OA$],decls:1,vars:1,consts:[[3,"placeholder","control"],[3,"pageChange","placeholder","control"],[3,"value"],[3,"value","title"]],template:function(i,n){1&i&&t.DNE(0,to,4,5,"mcrai-select",0),2&i&&t.vxM(0,n.articles?0:-1)},dependencies:[q.w,tt.P]})}return o})();var oo=a(45808),Qt=a(45461),io=a(97253);function no(o,r){if(1&o&&(t.j41(0,"mcrai-li"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.JRh(e.brand.name)}}function ro(o,r){if(1&o&&(t.j41(0,"mcrai-ul"),t.Z7z(1,no,2,1,"mcrai-li",null,t.fX1),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Dyx(e.category.preferred_brands)}}function ao(o,r){if(1&o&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h3"),t.EFF(5,"Kategorie"),t.k0s()(),t.j41(6,"mcrai-panel-content")(7,"mcrai-dl")(8,"mcrai-dt"),t.EFF(9,"Co zobrazit"),t.k0s(),t.j41(10,"mcrai-dd"),t.EFF(11),t.nI1(12,"notSet"),t.k0s(),t.j41(13,"mcrai-dt"),t.EFF(14,"Po\u0159ad\xed"),t.k0s(),t.j41(15,"mcrai-dd"),t.EFF(16),t.nI1(17,"notSet"),t.k0s(),t.j41(18,"mcrai-dt"),t.EFF(19,"Skr\xfdt kategorii"),t.k0s(),t.j41(20,"mcrai-dd"),t.EFF(21),t.nI1(22,"booleanToString"),t.k0s(),t.j41(23,"mcrai-dt"),t.EFF(24,"Zobrazit bannery"),t.k0s(),t.j41(25,"mcrai-dd"),t.EFF(26),t.nI1(27,"booleanToString"),t.k0s(),t.j41(28,"mcrai-dt"),t.EFF(29,"Zobrazit kategorie"),t.k0s(),t.j41(30,"mcrai-dd"),t.EFF(31),t.nI1(32,"booleanToString"),t.k0s(),t.j41(33,"mcrai-dt"),t.EFF(34,"Zobrazit produkty"),t.k0s(),t.j41(35,"mcrai-dd"),t.EFF(36),t.nI1(37,"booleanToString"),t.k0s(),t.j41(38,"mcrai-dt"),t.EFF(39,"Zobrazit nejprod\xe1van\u011bj\u0161\xed produkty"),t.k0s(),t.j41(40,"mcrai-dd"),t.EFF(41),t.nI1(42,"booleanToString"),t.k0s(),t.j41(43,"mcrai-dt"),t.EFF(44,"Zobrazit \u010dl\xe1nky"),t.k0s(),t.j41(45,"mcrai-dd"),t.EFF(46),t.nI1(47,"booleanToString"),t.k0s(),t.j41(48,"mcrai-dt"),t.EFF(49,"Zobrazit filtr"),t.k0s(),t.j41(50,"mcrai-dd"),t.EFF(51),t.nI1(52,"booleanToString"),t.k0s(),t.j41(53,"mcrai-dt"),t.EFF(54,"Zobrazit zna\u010dky"),t.k0s(),t.j41(55,"mcrai-dd"),t.EFF(56),t.nI1(57,"booleanToString"),t.k0s(),t.j41(58,"mcrai-dt"),t.EFF(59,"Zobrazit mapu"),t.k0s(),t.j41(60,"mcrai-dd"),t.EFF(61),t.nI1(62,"booleanToString"),t.k0s(),t.j41(63,"mcrai-dt"),t.EFF(64,"Odkazuje do \u010dl\xe1nku"),t.k0s(),t.j41(65,"mcrai-dd"),t.EFF(66),t.nI1(67,"notSet"),t.k0s()()()()(),t.j41(68,"mcrai-col")(69,"mcrai-panel")(70,"mcrai-panel-header")(71,"h3"),t.EFF(72,"Za\u0159azen\xe9 polo\u017eky"),t.k0s()(),t.j41(73,"mcrai-panel-content")(74,"mcrai-row")(75,"mcrai-col")(76,"mcrai-dl")(77,"mcrai-dt"),t.EFF(78,"\u0160ablona kategori\xed"),t.k0s(),t.j41(79,"m
1crai-dd"),t.EFF(80),t.nI1(81,"notSet"),t.k0s(),t.j41(82,"mcrai-dt"),t.EFF(83,"\u0160ablona produkt\u016f"),t.k0s(),t.j41(84,"mcrai-dd"),t.EFF(85),t.nI1(86,"notSet"),t.k0s(),t.j41(87,"mcrai-dt"),t.EFF(88,"\u0160ablona \u010dl\xe1nk\u016f"),t.k0s(),t.j41(89,"mcrai-dd"),t.EFF(90),t.nI1(91,"notSet"),t.k0s()()(),t.j41(92,"mcrai-col")(93,"mcrai-dl")(94,"mcrai-dt"),t.EFF(95,"\u0158azen\xed produkt\u016f"),t.k0s(),t.j41(96,"mcrai-dd"),t.EFF(97),t.nI1(98,"notSet"),t.nI1(99,"translate"),t.k0s()()()(),t.j41(100,"mcrai-row")(101,"mcrai-col")(102,"mcrai-dl")(103,"mcrai-dt"),t.EFF(104,"Zdroj kategori\xed"),t.k0s(),t.j41(105,"mcrai-dd"),t.EFF(106),t.nI1(107,"notSet"),t.k0s()()()()()()(),t.j41(108,"mcrai-col")(109,"mcrai-panel")(110,"mcrai-panel-header")(111,"h3"),t.EFF(112,"Preferovan\xed v\xfdrobci"),t.k0s()(),t.j41(113,"mcrai-panel-content"),t.DNE(114,ro,3,0,"mcrai-ul"),t.nrm(115,"br"),t.j41(116,"mcrai-dt"),t.EFF(117,"Povolen\xed d\u011bdi\u010dnosti"),t.k0s(),t.j41(118,"mcrai-dd"),t.EFF(119),t.nI1(120,"booleanToString"),t.k0s()()()()()),2&o){const e=t.XpG();t.R7$(11),t.JRh(t.bMT(12,19,e.CATEGORY_CONTENTS[null==e.category?null:e.category.category_content])),t.R7$(5),t.JRh(t.bMT(17,21,null==e.category?null:e.category.order)),t.R7$(5),t.JRh(t.bMT(22,23,null==e.category?null:e.category.hidden)),t.R7$(5),t.JRh(t.bMT(27,25,null==e.category?null:e.category.enable_banners)),t.R7$(5),t.JRh(t.bMT(32,27,null==e.category?null:e.category.enable_categories)),t.R7$(5),t.JRh(t.bMT(37,29,null==e.category?null:e.category.enable_products)),t.R7$(5),t.JRh(t.bMT(42,31,null==e.category?null:e.category.enable_top)),t.R7$(5),t.JRh(t.bMT(47,33,null==e.category?null:e.category.enable_articles)),t.R7$(5),t.JRh(t.bMT(52,35,null==e.category?null:e.category.enable_filter)),t.R7$(5),t.JRh(t.bMT(57,37,null==e.category?null:e.category.enable_brands)),t.R7$(5),t.JRh(t.bMT(62,39,null==e.category?null:e.category.enable_map)),t.R7$(5),t.SpI(" ",e.defaultArticle?e.defaultArticle.info[0].headline:t.bMT(67,41,null==e.category?null:e.category.article_link)," "),t.R7$(14),t.JRh(t.bMT(81,43,e.CATEGORIES_LAYOUTS[null==e.category?null:e.category.layout])),t.R7$(5),t.JRh(t.bMT(86,45,e.PRODUCTS_LAYOUTS[null==e.category?null:e.category.products_layout])),t.R7$(5),t.JRh(t.bMT(91,47,e.ARTICLES_LAYOUTS[null==e.category?null:e.category.articles_layout])),t.R7$(7),t.JRh(t.bMT(99,51,t.bMT(98,49,e.PRODUCTS_ORDER[(null==e.category?null:e.category.products_order)-1]))),t.R7$(9),t.JRh(t.bMT(107,53,null==e.category||null==e.category.categories_source||null==e.category.categories_source.info[0]?null:e.category.categories_source.info[0].name)),t.R7$(8),t.vxM(114,null!=e.category&&e.category.preferred_brands?114:-1),t.R7$(5),t.JRh(t.bMT(120,55,null==e.category?null:e.category.use_preferred_brand_heredity))}}function so(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function co(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function lo(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function mo(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index),t.R7$(),t.SpI(" ",e," ")}}function po(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",r.$index+1),t.R7$(),t.SpI(" ",t.bMT(2,2,e)," ")}}function uo(o,r){if(1&o&&(t.j41(0,"mcrai-option",3),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",e.name),t.R7$(),t.SpI(" ",e.name," ")}}function _o(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",15),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.showPrefBrandsModal())}),t.EFF(1,"Nastavit preferovan\xe9 v\xfdrobce "),t.k0s()}}function ho(o,r){if(1&o){const e=t.RV6();t.j41(0,"form",1)(1,"mcrai-row")(2,"mcrai-col")(3,"mcrai-panel")(4,"mcrai-panel-header")(5,"h3"),t.EFF(6,"Kategorie"),t.k0s()(),t.j41(7,"mcrai-panel-content")(8,"mcrai-select",2),t.Z7z(9,so,2,2,"mcrai-option",3,t.fX1),t.k0s(),t.nrm(11,"mcrai-input",4)(12,"br"),t.j41(13,"mcrai-input",5),t.EFF(14," Skr\xfdt kategorii "),t.k0s(),t.j41(15,"mcrai-input",5),t.EFF(16," Zobrazit bannery "),t.k0s(),t.j41(17,"mcrai-input",5),t.EFF(18," Zobrazit kategorie "),t.k0s(),t.j41(19,"mcrai-input",5),t.EFF(20,"Zobrazit \u010dl\xe1nky "),t.k0s(),t.j41(21,"mcrai-input",5),t.EFF(22," Zobrazit produkty "),t.k0s(),t.j41(23,"mcrai-input",5),t.EFF(24," Zobrazit nejprod\xe1van\u011bj\u0161\xed produkty "),t.k0s(),t.j41(25,"mcrai-input",5),t.EFF(26," Zobrazit filtr "),t.k0s(),t.j41(27,"mcrai-input",5),t.EFF(28," Zobrazit zna\u010dky "),t.k0s(),t.j41(29,"mcrai-input",5),t.EFF(30," Zobrazit mapu "),t.k0s(),t.nrm(31,"br")(32,"aegisx-select-category-article",6),t.k0s()()(),t.j41(33,"mcrai-col")(34,"mcrai-panel")(35,"mcrai-panel-header")(36,"h3"),t.EFF(37,"Za\u0159azen\xe9 polo\u017eky"),t.k0s()(),t.j41(38,"mcrai-panel-content")(39,"mcrai-row")(40,"mcrai-col")(41,"mcrai-select",7),t.Z7z(42,co,2,2,"mcrai-option",3,t.fX1),t.k0s(),t.j41(44,"mcrai-select",8),t.Z7z(45,lo,2,2,"mcrai-option",3,t.fX1),t.k0s(),t.j41(47,"mcrai-select",9),t.Z7z(48,mo,2,2,"mcrai-option",3,t.fX1),t.k0s()(),t.j41(50,"mcrai-col")(51,"mcrai-select",10),t.Z7z(52,po,3,4,"mcrai-option",3,t.fX1),t.k0s()()(),t.j41(54,"mcrai-row")(55,"mcrai-col"),t.nrm(56,"aegisx-select-category",11),t.k0s()()()()(),t.j41(57,"mcrai-col")(58,"mcrai-panel")(59,"m
1crai-panel-header")(60,"h3"),t.EFF(61,"Ostatn\xed"),t.k0s()(),t.j41(62,"mcrai-panel-content")(63,"mcrai-select",12),t.bIt("pageChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.fetchBrands(n,s.query))})("queryChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.fetchBrands(1,n))}),t.Z7z(64,uo,2,2,"mcrai-option",3,t.fX1),t.k0s(),t.nrm(66,"br"),t.j41(67,"mcrai-input",13),t.EFF(68,"Povolit d\u011bdi\u010dnost"),t.k0s()(),t.j41(69,"mcrai-panel-actions"),t.DNE(70,_o,2,0,"button",14),t.k0s()()()()()}if(2&o){const e=t.XpG();t.Y8G("formGroup",e.form),t.R7$(8),t.Y8G("control",e.controls.category_content),t.R7$(),t.Dyx(e.CATEGORY_CONTENTS),t.R7$(2),t.Y8G("control",e.controls.order)("errors",e.ERRORS.order),t.R7$(2),t.Y8G("control",e.controls.hidden)("checked",e.category.hidden)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_banners)("checked",e.category.enable_banners)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_categories)("checked",e.category.enable_categories)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_articles)("checked",e.category.enable_articles)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_products)("checked",e.category.enable_products)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_top)("checked",e.category.enable_products)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_filter)("checked",e.category.enable_filter)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_brands)("checked",e.category.enable_brands)("value",!0),t.R7$(2),t.Y8G("control",e.controls.enable_map)("checked",e.category.enable_map)("value",!0),t.R7$(3),t.Y8G("category",e.category)("form",e.form)("control",e.controls.article_link),t.R7$(9),t.Y8G("control",e.controls.layout),t.R7$(),t.Dyx(e.CATEGORIES_LAYOUTS),t.R7$(2),t.Y8G("control",e.controls.products_layout),t.R7$(),t.Dyx(e.PRODUCTS_LAYOUTS),t.R7$(2),t.Y8G("control",e.controls.articles_layout),t.R7$(),t.Dyx(e.ARTICLES_LAYOUTS),t.R7$(3),t.Y8G("control",e.controls.products_order),t.R7$(),t.Dyx(e.PRODUCTS_ORDER),t.R7$(4),t.Y8G("control",e.form.controls.categories_source)("multiple",!1)("specials",!0)("selected",e.category.categories_source)("placeholder","Zdroj kategori\xed"),t.R7$(7),t.Y8G("control",e.controls.preferred_brands)("paginator",null==e.brands?null:e.brands.paginator),t.R7$(),t.Dyx(null==e.brands?null:e.brands.items),t.R7$(3),t.Y8G("control",e.controls.use_preferred_brand_heredity)("value",!0),t.R7$(3),t.vxM(70,e.toolbarService.isEditMode()?70:-1)}}function go(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",17),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.patch())}),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isPatchButtonDisabled())}}function Co(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,go,2,1,"button",16),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1)}}let fo=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n,s){this.store=e,this.permissionService=i,this.toolbarService=n,this.modalService=s,this.destroy=new S.B7,this.CATEGORIES_LAYOUTS=Rt,this.PRODUCTS_LAYOUTS=xt.D,this.ARTICLES_LAYOUTS=St,this.PRODUCTS_ORDER=jt.o,this.CATEGORY_CONTENTS=Oe,this.ERRORS={order:{pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 cel\xe9 \u010d\xedslo",max:"P\u0159\xedli\u0161 dlouh\xe9 \u010d\xedslo"}},this.form=new l.J3({hidden:new l.hs(!1),enable_banners:new l.hs(!0),enable_categories:new l.hs(!0),enable_articles:new l.hs(!0),enable_products:new l.hs(!0),enable_filter:new l.hs(!0),enable_brands:new l.hs(!1),enable_map:new l.hs(!1),enable_top:new l.hs(!1),layout:new l.hs,products_layout:new l.hs,articles_layout:new l.hs,products_order:new l.hs,categories_source:new l.hs,preferred_brands:new l.hs([]),use_preferred_brand_heredity:new l.hs(!0),order:new l.hs(null,[l.k0.pattern(j.j8),l.k0.max(999)]),category_content:new l.hs,article_link:new l.hs})}ngOnInit(){this.store.pipe((0,m.Lt)(y.N2),(0,C.Q)(this.destroy),(0,N.p)(e=>!!e)).subscribe(e=>{this.onCategoryChange(e)}),this.store.select(e=>e.sharedStuff.brands).pipe((0,C.Q)(this.destroy)).subscribe(e=>this.brands=e),this.store.pipe((0,m.Lt)(zt),(0,C.Q)(this.destroy),(0,N.p)(e=>!!e&&Object.keys(e).length&&!!this.category&&!!this.category.article_link),(0,g.T)(e=>e[this.category.id])).subscribe(e=>{this.defaultArticle=e.items.find(i=>i.id===this.category.article_link)})}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}onCategoryChange(e){this.category=e,this.getArticles(),this.form.patchValue({...e,preferred_brands:e.preferred_brands.map(i=>i.brand.name),products_order:0===e.products_order?1:e.products_order,categories_source:e.categories_source?e.categories_source.id:"",use_preferred_brand_heredity:this.category.use_preferred_brand_heredity})}patch(){this.store.dispatch(new I.xu({id:this.category.id,newCategory:this.form.value}))}fetchBrands(e,i){i?(this.query=i,this.store.dispatch(new Q.tu({page:e,filter:new Nt(i)}))):this.store.dispatch(new Q.tu({page:e}))}
1getArticles(e=1){this.store.dispatch(new Ut({id:this.category.id,page:e}))}showPrefBrandsModal(){const e=new d.m_("750px","500px",{category:this.category});this.modalService.open(Ke,e)}isPatchButtonDisabled(){return!this.form.valid||!this.form.dirty}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(K.n),t.rXU(A.h),t.rXU(d.mO))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-settings"]],decls:10,vars:4,consts:[["color","secondary","collapsable","",3,"collapsed"],[3,"formGroup"],["placeholder","Co zobrazit",3,"control"],[3,"value"],["type","text","placeholder","Po\u0159ad\xed",3,"control","errors"],["type","checkbox",3,"control","checked","value"],["placeholder","Odkazuje do \u010dl\xe1nku",3,"category","form","control"],["placeholder","\u0160ablona kategori\xed",3,"control"],["placeholder","\u0160ablona produkt\u016f",3,"control"],["placeholder","\u0160ablona \u010dl\xe1nk\u016f",3,"control"],["placeholder","\u0158azen\xed produkt\u016f",3,"control"],[3,"control","multiple","specials","selected","placeholder"],["placeholder","Preferovan\xed v\xfdrobci","multiple","",3,"pageChange","queryChange","control","paginator"],["type","checkbox",3,"control","value"],["mcrai-button","positive"],["mcrai-button","positive",3,"click"],["mcrai-button","positive",3,"disabled"],["mcrai-button","positive",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel",0)(3,"mcrai-panel-header")(4,"h2"),t.EFF(5,"Nastaven\xed"),t.k0s()(),t.j41(6,"mcrai-panel-content"),t.DNE(7,ao,121,57,"mcrai-row")(8,ho,71,48,"form",1),t.k0s(),t.DNE(9,Co,2,1,"mcrai-panel-actions"),t.k0s()()()),2&i&&(t.R7$(2),t.Y8G("collapsed",!0),t.R7$(5),t.vxM(7,n.toolbarService.isEditMode()?-1:7),t.R7$(),t.vxM(8,n.toolbarService.isEditMode()?8:-1),t.R7$(),t.vxM(9,n.permissionService.canWrite()?9:-1))},dependencies:[x.Q,l.qT,l.cb,l.j4,Z.N,Dt.u,q.w,tt.P,O.o,X.g,w.g,M.l,H.h,$.B,Ht.E,Zt.R,bt.p,vt.L,Et.Z,eo,oo.O,Qt.s,io.Z,Mt.D9]})}return o})();const yo=o=>["/aegisx","categories",o];function bo(o,r){1&o&&(t.j41(0,"mcrai-dt"),t.EFF(1,"N\xe1zev ve v\xfdpisu"),t.k0s())}function vo(o,r){if(1&o&&(t.j41(0,"mcrai-dd"),t.EFF(1),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.JRh(null==e.category||null==e.category.info[0]?null:e.category.info[0].name_detail)}}function Eo(o,r){if(1&o&&(t.j41(0,"a",1),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("routerLink",t.eq3(2,yo,e.id)),t.R7$(),t.SpI(" ",null==e.info[0]?null:e.info[0].name," ")}}function Fo(o,r){if(1&o&&(t.j41(0,"mcrai-dd"),t.DNE(1,Eo,2,4,"a",1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.vxM(1,e.id?1:-1)}}let ko=(()=>{class o{constructor(e){this.store=e,this.destroy=new S.B7}ngOnInit(){this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.category),(0,C.Q)(this.destroy)).subscribe(e=>this.category=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-info"]],decls:22,vars:4,consts:[["color","secondary"],["target","_blank",3,"routerLink"]],template:function(i,n){1&i&&(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(),t.DNE(10,bo,2,0,"mcrai-dt")(11,vo,2,1,"mcrai-dd"),t.j41(12,"mcrai-dt"),t.EFF(13,"Cesta"),t.k0s(),t.j41(14,"mcrai-dd"),t.EFF(15,"root"),t.k0s(),t.Z7z(16,Fo,2,1,"mcrai-dd",null,t.fX1),t.j41(18,"mcrai-dt"),t.EFF(19,"Po\u010det p\u0159\xedstup\u016f"),t.k0s(),t.j41(20,"mcrai-dd"),t.EFF(21),t.k0s()()()()),2&i&&(t.R7$(9),t.JRh(null==n.category||null==n.category.info[0]?null:n.category.info[0].name),t.R7$(),t.vxM(10,null!=n.category&&null!=n.category.info[0]&&n.category.info[0].name_detail?10:-1),t.R7$(),t.vxM(11,null!=n.category&&null!=n.category.info[0]&&n.category.info[0].name_detail?11:-1),t.R7$(5),t.Dyx(null==n.category?null:n.category.breadcrumbs),t.R7$(5),t.JRh(null==n.category?null:n.category.access_count))},dependencies:[R.Wk,w.g,M.l,$.B,bt.p,vt.L,Et.Z]})}return o}
1)();var it=a(3754),Jt=a(57864),nt=a(44010),Ro=a(63020);let xo=(()=>{class o{constructor(){this.formChange=new t.bkB,this.destroy=new S.B7,this.form=new l.J3({q:new l.hs})}ngOnInit(){this.form.valueChanges.pipe((0,Ro.B)(100),(0,C.Q)(this.destroy)).subscribe(e=>this.formChange.emit(e))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-assigned-items-filter"]],outputs:{formChange:"formChange"},decls:1,vars:1,consts:[["type","text","placeholder","Hledat",3,"control"]],template:function(i,n){1&i&&t.nrm(0,"mcrai-input",0),2&i&&t.Y8G("control",n.form.controls.q)},dependencies:[Z.N]})}return o})();function So(o,r){1&o&&t.EFF(0,"V cel\xe9 v\u011btvi")}function jo(o,r){1&o&&t.nrm(0,"aegisx-branch",9),2&o&&t.Y8G("item",r.$implicit)}function To(o,r){1&o&&t.EFF(0,"P\u0159\xedmo v kategorii")}function Do(o,r){1&o&&t.nrm(0,"aegisx-branch",9),2&o&&t.Y8G("item",r.$implicit)}function Go(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-paginator",12),t.bIt("page",function(n){t.eBV(e);const s=t.XpG(2);return t.Njj(s.getProducts(n))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("paginator",null==e.products?null:e.products.paginator)("showCount",!0)}}function wo(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-paginator",12),t.bIt("page",function(n){t.eBV(e);const s=t.XpG(2);return t.Njj(s.getProductsDirect(n))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("paginator",null==e.directProducts?null:e.directProducts.paginator)("showCount",!0)}}function Mo(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.deleteProducts())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteProductsButtonDisabled())}}function $o(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-col")(1,"mcrai-panel")(2,"mcrai-panel-header")(3,"h3"),t.EFF(4,"Produkty"),t.k0s()(),t.j41(5,"mcrai-panel-content")(6,"mcrai-row")(7,"mcrai-col")(8,"mcrai-panel",5)(9,"mcrai-panel-header")(10,"h4"),t.EFF(11,"Filtrace"),t.k0s()(),t.j41(12,"mcrai-panel-content")(13,"aegisx-assigned-items-filter",6),t.bIt("formChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.stagedFilter=n)}),t.k0s()(),t.j41(14,"mcrai-panel-actions")(15,"button",7),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return n.getProducts(1),t.Njj(n.getProductsDirect(1))}),t.EFF(16,"Filtrovat"),t.k0s()()()()(),t.j41(17,"mcrai-row")(18,"mcrai-col")(19,"mcrai-horizontal-tabs",null,0)(21,"mcrai-tab"),t.DNE(22,So,1,0,"ng-template",8),t.Z7z(23,jo,1,1,"aegisx-branch",9,t.fX1),t.k0s(),t.j41(25,"mcrai-tab"),t.DNE(26,To,1,0,"ng-template",8),t.Z7z(27,Do,1,1,"aegisx-branch",9,t.fX1),t.k0s()()()()(),t.j41(29,"mcrai-panel-actions"),t.DNE(30,Go,1,2,"mcrai-paginator",10)(31,wo,1,2,"mcrai-paginator",10)(32,Mo,2,1,"button",11),t.k0s()()()}if(2&o){const e=t.sdS(20),i=t.XpG();t.R7$(23),t.Dyx(null==i.products?null:i.products.items),t.R7$(4),t.Dyx(null==i.directProducts?null:i.directProducts.items),t.R7$(3),t.vxM(30,0===e.selectedIndex?30:-1),t.R7$(),t.vxM(31,1===e.selectedIndex?31:-1),t.R7$(),t.vxM(32,i.toolbarService.isDeleteMode()?32:-1)}}function Io(o,r){1&o&&t.nrm(0,"aegisx-branch",9),2&o&&t.Y8G("item",r.$implicit)}function Po(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.deleteArticles())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteArticlesButtonDisabled())}}function Bo(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-col")(1,"mcrai-panel")(2,"mcrai-panel-header")(3,"h3"),t.EFF(4,"\u010cl\xe1nky"),t.k0s()(),t.j41(5,"mcrai-panel-content"),t.Z7z(6,Io,1,1,"aegisx-branch",9,t.fX1),t.k0s(),t.j41(8,"mcrai-panel-actions")(9,"mcrai-paginator",3),t.bIt("page",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.getArticles(n))}),t.k0s(),t.DNE(10,Po,2,1,"button",11),t.k0s()()()}if(2&o){const e=t.XpG();t.R7$(6),t.Dyx(null==e.articles?null:e.articles.items),t.R7$(3),t.Y8G("paginator",null==e.articles?null:e.articles.paginator),t.R7$(),t.vxM(10,e.toolbarService.isDeleteMode()?10:-1)}}function Oo(o,r){if(1&o&&(t.j41(0,"mcrai-li"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.JRh(e.name)}}function Xo(o,r){if(1&o&&(t.j41(0,"mcrai-ul"),t.Z7z(1,Oo,2,1,"mcrai-li",null,t.fX1),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.Dyx(e.brands.items)}}function Ao(o,r){if(1&o&&(t.j41(0,"mcrai-option",15),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.Y8G("value",e.name),t.R7$(),t.SpI(" ",e.name," ")}}function No(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-select",14),t.bIt("pageChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.fetchBrands(n,s.query))})("queryChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.fetchBrands(1,n))}),t.Z7z(1,Ao,2,2,"mcrai-option",15,t.fX1),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("control",e.controls.brands)("paginator",null==e.allBrands?null:e.allBrands.paginator),t.R7$(),t.Dyx(null==e.allBrands?null:e.allBrands.items)}}function Yo(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.saveBrands())}
1),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}}let Uo=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n){this.store=e,this.activatedRoute=i,this.toolbarService=n,this.destroy=new S.B7,this.form=new l.J3({brands:new l.hs([])})}ngOnInit(){this.activatedRoute.params.pipe((0,C.Q)(this.destroy)).subscribe(e=>{this.id=e.id,this.getProducts(1),this.getProductsDirect(1),this.getArticles(1),this.getBrands(1)}),this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.products),(0,C.Q)(this.destroy)).subscribe(e=>this.products=e),this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.directProducts),(0,C.Q)(this.destroy)).subscribe(e=>this.directProducts=e),this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.articles),(0,C.Q)(this.destroy)).subscribe(e=>this.articles=e),this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.brands),(0,C.Q)(this.destroy)).subscribe(e=>{this.brands=e,e&&this.updateForm()}),this.store.pipe((0,m.Lt)(e=>e.aegisxForest.staged),(0,C.Q)(this.destroy),(0,g.T)(e=>e.filter(i=>1==+i.type).map(i=>i.item.id))).subscribe(e=>this.selectedProducts=e),this.store.pipe((0,m.Lt)(e=>e.aegisxForest.staged),(0,C.Q)(this.destroy),(0,g.T)(e=>e.filter(i=>2==+i.type).map(i=>i.item.id))).subscribe(e=>this.selectedArticles=e),this.store.select(e=>e.sharedStuff.brands).pipe((0,C.Q)(this.destroy)).subscribe(e=>this.allBrands=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}getProducts(e){this.store.dispatch(new _.vK({id:this.id,page:e,filter:this.stagedFilter}))}getProductsDirect(e){this.store.dispatch(new _.AS({id:this.id,page:e,filter:this.stagedFilter}))}getArticles(e){this.store.dispatch(new _.Cu({id:this.id,page:e}))}getBrands(e){this.store.dispatch(new _.tu({id:this.id,page:e}))}isDeleteArticlesButtonDisabled(){return!this.selectedArticles||!this.selectedArticles.length}deleteArticles(){this.isDeleteArticlesButtonDisabled()||this.store.dispatch(new it.jF({category_id:this.id,items:this.selectedArticles}))}isDeleteProductsButtonDisabled(){return!this.selectedProducts||!this.selectedProducts.length}deleteProducts(){this.isDeleteProductsButtonDisabled()||this.store.dispatch(new it.Ae({category_id:this.id,items:this.selectedProducts}))}fetchBrands(e,i){i?(this.query=i,this.store.dispatch(new Q.tu({page:e,filter:new Nt(i)}))):this.store.dispatch(new Q.tu({page:e}))}saveBrands(){this.store.dispatch(new k.D3({id:this.id,brand_names:this.controls.brands.value}))}updateForm(){this.form.patchValue({brands:this.brands.items.map(e=>e.name)})}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(R.nX),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-assigned-items"]],decls:19,vars:7,consts:[["productsTabs",""],["color","secondary","collapsable","",3,"collapsed"],["placeholder","Preferovan\xed v\xfdrobci","multiple","",3,"control","paginator"],[1,"pull-left",3,"page","paginator"],["mcrai-button","positive"],["color","secondary","collapsable",""],[3,"formChange"],["mcrai-button","positive",3,"click"],["mcraiTabLabel",""],["parent","category",3,"item"],[1,"pull-left",3,"paginator","showCount"],["mcrai-button","negative",3,"disabled"],[1,"pull-left",3,"page","paginator","showCount"],["mcrai-button","negative",3,"click","disabled"],["placeholder","Preferovan\xed v\xfdrobci","multiple","",3,"pageChange","queryChange","control","paginator"],[3,"value"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-panel",1)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Za\u0159azen\xe9 polo\u017eky"),t.k0s()(),t.j41(4,"mcrai-panel-content")(5,"mcrai-row"),t.DNE(6,$o,33,3,"mcrai-col")(7,Bo,11,2,"mcrai-col"),t.j41(8,"mcrai-col")(9,"mcrai-panel")(10,"mcrai-panel-header")(11,"h3"),t.EFF(12,"Zna\u010dky"),t.k0s()(),t.j41(13,"mcrai-panel-content"),t.DNE(14,Xo,3,0,"mcrai-ul")(15,No,3,2,"mcrai-select",2),t.k0s(),t.j41(16,"mcrai-panel-actions")(17,"mcrai-paginator",3),t.bIt("page",function(u){return n.getArticles(u)}),t.k0s(),t.DNE(18,Yo,2,0,"button",4),t.k0s()()()()()()),2&i&&(t.Y8G("collapsed",!0),t.R7$(6),t.vxM(6,n.products&&n.products.items.length>0?6:-1),t.R7$(),t.vxM(7,n.articles&&n.articles.items.length>0?7:-1),t.R7$(7),t.vxM(14,n.brands&&!n.toolbarService.isEditMode()?14:-1),t.R7$(),t.vxM(15,n.toolbarService.isEditMode()?15:-1),t.R7$(2),t.Y8G("paginator",null==n.articles?null:n.articles.paginator),t.R7$(),t.vxM(18,n.toolbarService.isEditMode()?18:-1))},dependencies:[Bt.K,x.Q,q.w,tt.P,O.o,X.g,w.g,M.l,H.h,$.B,Xt.h,Ht.E,Zt.R,Jt.y,nt.qv,nt.p$,xo]})}return o}
1)(),Vo=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n){this.builder=e,this.store=i,this.modalService=n,this.buildForm()}ngOnInit(){}buildForm(){this.form=this.builder.group({language:["CZ"],name:[null,l.k0.required],url:[null],description:[null],seo_title:[null],seo_description:[null]})}isAddButtonDisabled(){return this.form.invalid}createCategoryInfo(){this.isAddButtonDisabled()||(this.store.dispatch(new k.BZ({info:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(l.ze),t.rXU(m.il),t.rXU(d.mO))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-add-category-info-modal"]],decls:17,vars:10,consts:[[3,"formGroup"],[3,"control","required","nullable"],["placeholder","N\xe1zev *","type","text",3,"control"],["type","category",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(i,n){1&i&&(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,"aegisx-url-input",3)(9,"mcrai-input",4)(10,"mcrai-input",5)(11,"mcrai-input",6),t.k0s()(),t.j41(12,"mcrai-modal-actions")(13,"button",7),t.bIt("click",function(){return n.close}),t.EFF(14,"Zav\u0159\xedt"),t.k0s(),t.j41(15,"button",8),t.bIt("click",function(){return n.createCategoryInfo()}),t.EFF(16,"Vytvo\u0159it"),t.k0s()()()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(),t.Y8G("control",n.controls.language)("required",!0)("nullable",!1),t.R7$(),t.Y8G("control",n.controls.name),t.R7$(),t.Y8G("control",n.controls.url),t.R7$(),t.Y8G("control",n.controls.description),t.R7$(),t.Y8G("control",n.controls.seo_title),t.R7$(),t.Y8G("control",n.controls.seo_description),t.R7$(4),t.Y8G("disabled",n.isAddButtonDisabled()))},dependencies:[x.Q,l.qT,l.cb,l.j4,lt.$,U.h,V.l,z.J,L.f,Z.N,Gt.Q]})}return o})();var zo=a(28032),Lo=a(14058),Ho=a(84760);function Zo(o,r){if(1&o&&(t.j41(0,"h3"),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.language)}}function Qo(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG(4);t.SpI(" ",e.baseUrl," ")}}function Jo(o,r){if(1&o&&(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,"URL"),t.k0s(),t.j41(13,"mcrai-dd")(14,"a",3),t.DNE(15,Qo,1,1),t.EFF(16),t.k0s()(),t.j41(17,"mcrai-dt"),t.EFF(18,"SEO Title"),t.k0s(),t.j41(19,"mcrai-dd"),t.EFF(20),t.nI1(21,"notSet"),t.k0s(),t.j41(22,"mcrai-dt"),t.EFF(23,"SEO Description"),t.k0s(),t.j41(24,"mcrai-dd"),t.EFF(25),t.nI1(26,"notSet"),t.k0s(),t.j41(27,"mcrai-dt"),t.EFF(28,"Popis"),t.k0s(),t.nrm(29,"mcrai-dd",4),t.nI1(30,"notSet"),t.k0s()),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(4),t.JRh(t.bMT(5,8,e.name)),t.R7$(5),t.JRh(t.bMT(10,10,e.name_detail)),t.R7$(5),t.Y8G("mcraiLink",i.category),t.R7$(),t.vxM(15,i.isAbsolute(e)?-1:15),t.R7$(),t.SpI("",e.url," "),t.R7$(4),t.JRh(t.bMT(21,12,e.seo_title)),t.R7$(5),t.JRh(t.bMT(26,14,e.seo_description)),t.R7$(4),t.Y8G("safeHTML",t.bMT(30,16,e.description))}}function Ko(o,r){if(1&o&&(t.nrm(0,"mcrai-input",5)(1,"mcrai-input",6)(2,"aegisx-url-input",7)(3,"mcrai-input",8)(4,"mcrai-input",9),t.j41(5,"div"),t.nrm(6,"br"),t.EFF(7," Popis "),t.nrm(8,"aegisx-smd-editor",10),t.k0s()),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.language].controls.name)("errors",i.ERRORS.name),t.R7$(),t.Y8G("control",i.controls[e.language].controls.name_detail),t.R7$(),t.Y8G("control",i.controls[e.language].controls.url),t.R7$(),t.Y8G("control",i.controls[e.language].controls.seo_title),t.R7$(),t.Y8G("control",i.controls[e.language].controls.seo_description),t.R7$(4),t.Y8G("control",i.controls[e.language].controls.description)}}function Wo(o,r){if(1&o&&(t.j41(0,"mcrai-tab"),t.DNE(1,Zo,2,1,"ng-template",2)(2,Jo,31,18,"mcrai-dl")(3,Ko,9,7),t.k0s()),2&o){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 qo(o,r){if(1&o&&(t.j41(0,"mcrai-horizontal-tabs"),t.Z7z(1,Wo,4,2,"mcrai-tab",null,t.fX1),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.Dyx(e.info)}}function ti(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.patch())}
1),t.EFF(1,"Ulo\u017eit zm\u011bny "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.form.invalid)}}function ei(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",14),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.add())}),t.EFF(1,"P\u0159idat jazykovou mutaci "),t.k0s()}}function oi(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,ti,2,1,"button",11)(2,ei,2,0,"button",12),t.k0s()),2&o){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 ii=(()=>{class o{get controls(){return this.form.controls}get baseUrl(){return this.linkService.getCategoriesAbsoluteUrl()}constructor(e,i,n,s,u){this.store=e,this.modalService=i,this.linkService=n,this.permissionService=s,this.toolbarService=u,this.ERRORS={name:{required:"Kategorie mus\xed m\xedt n\xe1zev."}},this.destroy=new S.B7,this.info=[],this.form=new l.J3({}),this.languages=[]}ngOnInit(){this.store.select(e=>e.aegisxCategories.category).pipe((0,C.Q)(this.destroy),(0,N.p)(e=>!!e)).subscribe(e=>this.onCategoryChange(e)),this.store.select(e=>e.sharedLCD.languages).pipe((0,C.Q)(this.destroy)).subscribe(e=>this.languages=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}onCategoryChange(e){this.id=e.id,this.info=e.info,this.category=e,this.updateForm(e.info),this.hydrateForm(e.info)}getInfoDiff(e,i){return i.filter(n=>-1===e.indexOf(n.language))}updateForm(e=[]){const i=Object.keys(this.form.value);this.getInfoDiff(i,e).forEach(s=>{const u=this.buildForm(s);this.form.addControl(s.language,u)})}buildForm(e){const i=new l.J3({});return Object.keys(e).forEach(n=>{["name"].indexOf(n)>=0?i.addControl(n,new l.hs(null,l.k0.required)):i.addControl(n,new l.hs)}),i}hydrateForm(e){e.forEach(i=>{const n=this.form.controls[i.language];n&&n.patchValue(i)})}showAddButton(){return this.info.length<this.languages.length}showActions(){return this.showAddButton()&&this.toolbarService.isViewMode()||!this.toolbarService.isViewMode()}add(){const e=new d.m_("600px","500px");this.modalService.open(Vo,e)}patch(){const e=this.form.controls;Object.keys(e).forEach(i=>{e[i].dirty&&this.store.dispatch(new I.TZ({id:this.id,language:i,info:e[i].value},!0))})}isAbsolute(e){return/^https?:\/\//.test(e.url)}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(zo._),t.rXU(K.n),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-languages"]],decls:8,vars:3,consts:[["color","secondary"],["id","info",3,"formGroup"],["mcraiTabLabel",""],["target","_blank",3,"mcraiLink"],[3,"safeHTML"],["type","text","placeholder","N\xe1zev *",3,"control","errors"],["type","text","placeholder","N\xe1zev ve v\xfdpisu",3,"control"],["type","category",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(i,n){1&i&&(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,qo,3,0,"mcrai-horizontal-tabs"),t.k0s()(),t.DNE(7,oi,3,2,"mcrai-panel-actions"),t.k0s()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(),t.vxM(6,n.info.length?6:-1),t.R7$(),t.vxM(7,n.permissionService.canWrite()&&n.showActions()?7:-1))},dependencies:[x.Q,Lo.m,Ho.g,l.qT,l.cb,l.j4,lt.$,Z.N,w.g,M.l,H.h,$.B,bt.p,vt.L,Et.Z,Jt.y,nt.qv,nt.p$,wt.N,Qt.s],styles:[".mcrai-tabs[_ngcontent-%COMP%]{background-color:#fff!important}"]})}return o})();var rt=a(90151);function ni(o,r){if(1&o&&t.nrm(0,"mcrai-media",2),2&o){const e=t.XpG(3);t.Y8G("data",e.category.preview_image.small)}}function ri(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",4),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.toggleImageProp("preview_image"))}),t.EFF(2,"Vybrat"),t.k0s()()}}function ai(o,r){if(1&o&&t.nrm(0,"mcrai-media",2),2&o){const e=t.XpG(3);t.Y8G("data",e.category.background_image.small)}}function si(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",4),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.toggleImageProp("background_image"))}),t.EFF(2,"Vybrat"),t.k0s()()}}function ci(o,r){if(1&o&&t.nrm(0,"mcrai-media",3),2&o){const e=t.XpG(3);t.Y8G("data",e.category.icon.thumbnail)}}function li(o,r){if(1&o){const e=t.RV6();t.j41(0,"mcrai-panel-actions")(1,"button",4),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.toggleImageProp("icon"))}),t.EFF(2,"Vybrat"),t.k0s()()}}function di(o,r){if(1&o&&(t.j41(0,"mcrai-row")(1,"mcrai-col")(2,"mcrai-panel")(3,"mcrai-panel-header")(4,"h3"),t.EFF(5,"N\xe1hledov\xfd obr\xe1zek"),t.k0s()(),t.j41(6,"mcrai-panel-content"),t.DNE(7,ni,1,1,"mcrai-media",2),t.k0s(),t.DNE(8,ri,3,0,"mcrai-panel-actions"),t.k0s()(),t.j41(9,"mcrai-col")(10,"mcrai-panel")(11,"mcrai-panel-header")(12,"h3"),t.EFF(13,"Pozad\xed"),t.k0s()(),t.j41(14,"mcrai-panel-content"),t.DNE(15,ai,1,1,"mcrai-media",2),t.k0s(),t.DNE(16,si,3,0,"mcrai-panel-actions"),t.k0s()(),t.j41(17,"mcrai-col")(18,"mcrai-panel")(19,"mcrai-panel-header")(20,"h3"),t.EFF(21,"Ikona"),t.k0s()(),t.j41(22,"mcrai-panel-content"),t.DNE(23,ci,1,1,"mcrai-media",3),t.k0s(),t.DNE(24,li,3,0,"mcrai-panel-actions"),t.k0s()()()),2&o){const e=t.XpG(2);t.R7$(2),t.AVh("selected",e.isSelected("preview_image")),t.R7$(5),t.vxM(7,e.category.preview_image?7:-1),t.R7$(),t.vxM(8,e.toolbarService.isDeleteMode()&&e.category.preview_image?8:-1),t.R7$(2),t.AVh("selected",e.isSelected("background_image")),t.R7$(5),t.vxM(15,e.category.background_image?15:-1),t.R7$(),t.vxM(16,e.toolbarService.isDeleteMode()&&e.category.background_image?16:-1),t.R7$(2),t.AVh("selected",e.isSelected("icon")),t.R7$(5),t.vxM(23,e.category.icon?23:-1),t.R7$(),t.vxM(24,e.toolbarService.isDeleteMode()&&e.category.icon?24:-1)}}function mi(o,r){if(1&o&&t.nrm(0,"mcrai-media",6),2&o){const e=t.XpG(3);t.Y8G("data",e.category.preview_image.medium)}}function pi(o,r){if(1&o&&t.nrm(0,"mcrai-media",6),2&o){const e=t.XpG(3);t.Y8G("data",e.category.background_image.medium)}}function ui(o,r){if(1&o&&t.nrm(0,"mcrai-media",6),2&o){const e=t.XpG(3);t.Y8G("data",e.category.icon.medium)}}function _i(o,r){if(1&o&&(t.j41(0,"form",1)(1,"mcrai-row")(2,"mcrai-col")(3,"mcrai-panel")(4,"mcrai-panel-header")(5,"h3"),t.EFF(6,"N\xe1hledov\xfd obr\xe1zek"),t.k0s()(),t.j41(7,"mcrai-panel-content")(8,"mcrai-row")(9,"mcrai-col"),t.nrm(10,"mcrai-input",5),t.k0s()(),t.j41(11,"mcrai-row")(12,"mcrai-col"),t.DNE(13,mi,1,1,"mcrai-media",6),t.k0s()()()()(),t.j41(14,"mcrai-col")(15,"mcrai-panel")(16,"mcrai-panel-header")(17,"h3"),t.EFF(18,"Pozad\xed"),t.k0s()(),t.j41(19,"mcrai-panel-content")(20,"mcrai-row")(21,"mcrai-col"),t.nrm(22,"mcrai-input",5),t.k0s()(),t.j41(23,"mcrai-row")(24,"mcrai-col"),t.DNE(25,pi,1,1,"mcrai-media",6),t.k0s()()()()(),t.j41(26,"mcrai-col")(27,"mcrai-panel")(28,"mcrai-panel-header")(29,"h3"),t.EFF(30,"Ikona"),t.k0s()(),t.j41(31,"mcrai-panel-content")(32,"m
1crai-row")(33,"mcrai-col"),t.nrm(34,"mcrai-input",5),t.k0s()(),t.j41(35,"mcrai-row")(36,"mcrai-col"),t.DNE(37,ui,1,1,"mcrai-media",6),t.k0s()()()()()()()),2&o){const e=t.XpG(2);t.Y8G("formGroup",e.form),t.R7$(10),t.Y8G("control",e.controls.preview_image),t.R7$(3),t.vxM(13,e.category&&e.category.preview_image?13:-1),t.R7$(9),t.Y8G("control",e.controls.background_image),t.R7$(3),t.vxM(25,e.category&&e.category.background_image?25:-1),t.R7$(9),t.Y8G("control",e.controls.icon),t.R7$(3),t.vxM(37,e.category&&e.category.icon?37:-1)}}function hi(o,r){if(1&o&&(t.j41(0,"mcrai-panel-content"),t.DNE(1,di,25,12,"mcrai-row")(2,_i,38,7,"form",1),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1)}}function gi(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",10),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.patch())}),t.EFF(1," Ulo\u017eit zm\u011bny "),t.k0s()}}function Ci(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",11),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",!e.selectedImages.length)}}function fi(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.deleteImages())}),t.EFF(1,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",!e.selectedImages.length)}}function yi(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,gi,2,0,"button",7)(2,Ci,2,1,"button",8)(3,fi,2,1,"button",9),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?1:-1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?2:-1),t.R7$(),t.vxM(3,e.toolbarService.isDeleteMode()?3:-1)}}let bi=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n){this.store=e,this.permissionService=i,this.toolbarService=n,this.destroy=new S.B7,this.form=new l.J3({preview_image:new l.hs,background_image:new l.hs,icon:new l.hs})}ngOnInit(){this.selectCategory(),this.selectSelectedImages()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectCategory(){this.store.select(e=>e.aegisxCategories.category).pipe((0,C.Q)(this.destroy),(0,N.p)(e=>!!e)).subscribe(e=>this.category=e)}selectSelectedImages(){this.store.pipe((0,m.Lt)(y.oo),(0,C.Q)(this.destroy)).subscribe(e=>this.selectedImages=e)}patch(){this.store.dispatch(new k.AH({id:this.category.id,previewImage:this.form.value.preview_image,backgroundImage:this.form.value.background_image,icon:this.form.value.icon})),this.form.reset()}toggleImageProp(e){this.store.dispatch(new rt.X8({prop:e}))}isSelected(e){return this.selectedImages.indexOf(e)>=0}unselectAll(){this.store.dispatch(new rt.J8)}deleteImages(){this.selectedImages.length&&this.store.dispatch(new G.sR({category_id:this.category.id,image_props:this.selectedImages}))}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(K.n),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-images"]],decls:6,vars:3,consts:[["color","secondary","collapsable","",3,"collapsed"],[3,"formGroup"],["type","image","width","400","height","400",3,"data"],["type","image","width","100","height","100",3,"data"],["mcrai-button","neutral",3,"click"],["type","file",3,"control"],["type","image","width","50%","height","auto",3,"data"],["mcrai-button","positive"],["mcrai-button","neutral",3,"disabled"],["mcrai-button","negative",3,"disabled"],["mcrai-button","positive",3,"click"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Obr\xe1zky"),t.k0s()(),t.DNE(4,hi,3,2,"mcrai-panel-content")(5,yi,4,3,"mcrai-panel-actions"),t.k0s()),2&i&&(t.Y8G("collapsed",!0),t.R7$(4),t.vxM(4,n.category?4:-1),t.R7$(),t.vxM(5,n.permissionService.canWrite()?5:-1))},dependencies:[x.Q,l.qT,l.cb,l.j4,Tt.e,O.o,X.g,w.g,M.l,H.h,$.B,At.h],styles:["mcrai-panel.selected[_ngcontent-%COMP%]{background:gray!important}
1mcrai-panel.selected[_ngcontent-%COMP%]   mcrai-panel-header[_ngcontent-%COMP%], mcrai-panel.selected[_ngcontent-%COMP%]   mcrai-panel-actions[_ngcontent-%COMP%]{background:gray!important}"]})}return o})();var T=a(66842),vi=a(8899),Kt=a(58591),Ei=a(18321);function Fi(o,r){if(1&o&&t.nrm(0,"shared-select-price-level",3),2&o){const e=t.XpG();t.Y8G("control",e.controls.price_level)("required",!0)}}function ki(o,r){if(1&o&&t.nrm(0,"mcrai-input",6),2&o){const e=t.XpG();t.Y8G("control",e.controls.margin_max)("errors",e.ERRORS.price)}}function Ri(o,r){if(1&o&&t.nrm(0,"mcrai-input",7),2&o){const e=t.XpG();t.Mz_("placeholder","Mar\u017ee [",e.controls.currency.value,"]"),t.Y8G("control",e.controls.margin_abs)("errors",e.ERRORS.price)}}function xi(o,r){if(1&o&&t.nrm(0,"mcrai-input",8),2&o){const e=t.XpG();t.Y8G("control",e.controls.additional_price)("errors",e.ERRORS.price)}}function Si(o,r){if(1&o&&t.nrm(0,"mcrai-input",9),2&o){const e=t.XpG();t.Y8G("control",e.controls.rebate)("errors",e.ERRORS.price)}}let ji=(()=>{class o{get controls(){return this.form.controls}constructor(e,i){this.store=e,this.modalService=i,this.DEFAULT_CURRENCY="EUR",this.ERRORS={price:{pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.destroy=new S.B7,this.form=new l.J3({currency:new l.hs(this.DEFAULT_CURRENCY,l.k0.required),price_level:new l.hs(null),margin:new l.hs(null,l.k0.pattern(j.Q6)),margin_min:new l.hs(null,l.k0.pattern(j.Q6)),margin_max:new l.hs(null,l.k0.pattern(j.Q6)),margin_abs:new l.hs(null,l.k0.pattern(j.Q6)),rebate:new l.hs(null,l.k0.pattern(j.Q6)),additional_price:new l.hs(null,l.k0.pattern(j.Q6))}),this.globalControl=new l.hs(!0)}ngOnInit(){this.selectCategory()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectCategory(){this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.category),(0,C.Q)(this.destroy)).subscribe(e=>this.category=e)}add(){this.isAddButtonDisabled()?console.error("add category price not valid",this.form):(this.store.dispatch(new T.M4({category_id:this.category.id,body:this.form.value})),this.close())}isAddButtonDisabled(){return!this.form.valid}close(){this.modalService.close()}isGlobal(){return!!this.globalControl.value}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-add-category-price-modal"]],decls:26,vars:16,consts:[[3,"formGroup"],[1,"radiogroup__global",3,"control"],["type","radio",3,"value"],[3,"control","required"],["type","text","placeholder","Mar\u017ee [%]",3,"control","errors"],["type","text","placeholder","Min. mar\u017ee [%]",3,"control","errors"],["type","text","placeholder","Max. mar\u017ee [%]",3,"control","errors"],["type","text",3,"control","errors","placeholder"],["type","text","placeholder","Nav\xfd\u0161en\xed MOC",3,"control","errors"],["type","text","placeholder","Rabat [%]",3,"control","errors"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nastavit cenu kategorie"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0)(6,"mcrai-row")(7,"mcrai-col")(8,"mcrai-radio-group",1)(9,"mcrai-input",2),t.EFF(10,"Glob\xe1ln\xed cena "),t.k0s(),t.j41(11,"mcrai-input",2),t.EFF(12,"Cena na cenovou hladinu "),t.k0s()()()(),t.nrm(13,"aegisx-select-currency",3),t.DNE(14,Fi,1,2,"shared-select-price-level",3),t.nrm(15,"mcrai-input",4)(16,"mcrai-input",5),t.DNE(17,ki,1,2,"mcrai-input",6)(18,Ri,1,4,"mcrai-input",7)(19,xi,1,2,"mcrai-input",8)(20,Si,1,2,"mcrai-input",9),t.k0s()(),t.j41(21,"mcrai-modal-actions")(22,"button",10),t.bIt("click",function(){return n.close()}),t.EFF(23,"Zav\u0159\xedt "),t.k0s(),t.j41(24,"button",11),t.bIt("click",function(){return n.add()}),t.EFF(25,"Vytvo\u0159it "),t.k0s()()()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(3),t.Y8G("control",n.globalControl),t.R7$(),t.Y8G("value",!0),t.R7$(2),t.Y8G("value",!1),t.R7$(2),t.Y8G("control",n.controls.currency)("required",!0),t.R7$(),t.vxM(14,n.isGlobal()?-1:14),t.R7$(),t.Y8G("control",n.controls.margin)("errors",n.ERRORS.price),t.R7$(),t.Y8G("control",n.controls.margin_min)("errors",n.ERRORS.price),t.R7$(),t.vxM(17,n.isGlobal()?17:-1),t.R7$(),t.vxM(18,n.isGlobal()?-1:18),t.R7$(),t.vxM(19,n.isGlobal()?19:-1),t.R7$(),t.vxM(20,n.isGlobal()?-1:20),t.R7$(4),t.Y8G("disabled",n.isAddButtonDisabled()))},dependencies:[x.Q,l.qT,l.cb,l.j4,vi.J,U.h,V.l,z.J,L.f,Z.N,Kt.r,Kt.S,O.o,X.g,Ei.h],styles:[".radiogroup__global[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})}return o}
1)();function Ti(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"M\u011bna"),t.k0s())}function Di(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.JRh(e.currency)}}function Gi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Cenov\xe1 hladina"),t.k0s())}function wi(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.JRh(null==e.price_level?null:e.price_level.name)}}function Mi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Mar\u017ee [%]"),t.k0s())}function $i(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.margin," ")}}function Ii(o,r){if(1&o&&t.nrm(0,"mcrai-input",16),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.id].controls.margin)("errors",i.ERRORS.price)}}function Pi(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,$i,1,1)(2,Ii,1,2,"mcrai-input",16),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1)}}function Bi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Min. mar\u017ee [%]"),t.k0s())}function Oi(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.margin_min," ")}}function Xi(o,r){if(1&o&&t.nrm(0,"mcrai-input",17),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.id].controls.margin_min)("errors",i.ERRORS.price)}}function Ai(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,Oi,1,1)(2,Xi,1,2,"mcrai-input",17),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.vxM(1,e.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1)}}function Ni(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Max. mar\u017ee [%]"),t.k0s())}function Yi(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.margin_max," ")}}function Ui(o,r){if(1&o&&t.nrm(0,"mcrai-input",18),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.id].controls.margin_max)("errors",i.ERRORS.price)}}function Vi(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,Yi,1,1)(2,Ui,1,2,"mcrai-input",18),t.k0s()),2&o){const e=r.$implicit,i=t.XpG(2);t.R7$(),t.vxM(1,i.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,i.toolbarService.isEditMode()&&i.isGlobal(e)?2:-1)}}function zi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Mar\u017ee"),t.k0s())}function Li(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.margin_abs," ")}}function Hi(o,r){if(1&o&&t.nrm(0,"mcrai-input",19),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Mz_("placeholder","Mar\u017ee [",e.currency,"]"),t.Y8G("control",i.controls[e.id].controls.margin_abs)("errors",i.ERRORS.price)}}function Zi(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,Li,1,1)(2,Hi,1,4,"mcrai-input",19),t.k0s()),2&o){const e=r.$implicit,i=t.XpG(2);t.R7$(),t.vxM(1,i.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,i.toolbarService.isEditMode()&&!i.isGlobal(e)?2:-1)}}function Qi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Rabat [%]"),t.k0s())}function Ji(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.rebate," ")}}function Ki(o,r){if(1&o&&t.nrm(0,"mcrai-input",20),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.id].controls.rebate)("errors",i.ERRORS.price)}}function Wi(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,Ji,1,1)(2,Ki,1,2,"mcrai-input",20),t.k0s()),2&o){const e=r.$implicit,i=t.XpG(2);t.R7$(),t.vxM(1,i.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,i.toolbarService.isEditMode()&&!i.isGlobal(e)?2:-1)}}function qi(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Nav\xfd\u0161en\xed MOC"),t.k0s())}function tn(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.SpI(" ",e.additional_price," ")}}function en(o,r){if(1&o&&t.nrm(0,"mcrai-input",21),2&o){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("control",i.controls[e.id].controls.additional_price)("errors",i.ERRORS.price)}}function on(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,tn,1,1)(2,en,1,2,"mcrai-input",21),t.k0s()),2&o){const e=r.$implicit,i=t.XpG(2);t.R7$(),t.vxM(1,i.toolbarService.isEditMode()?-1:1),t.R7$(),t.vxM(2,i.toolbarService.isEditMode()&&i.isGlobal(e)?2:-1)}}function nn(o,r){1&o&&t.nrm(0,"mcrai-th")}function rn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",24),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG(2);return t.Njj(s.togglePrice(n))}),t.EFF(1,"Vybrat "),t.k0s()}}function an(o,r){if(1&o&&(t.j41(0,"mcrai-td",22),t.DNE(1,rn,2,0,"button",23),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}function sn(o,r){1&o&&t.nrm(0,"mcrai-tr")}function cn(o,r){if(1&o&&t.nrm(0,"mcrai-tr"),2&o){const e=r.$implicit,i=t.XpG(2);t.AVh("mcrai-tr--highlight",i.isSelected(e))}}function ln(o,r){if(1&o&&(t.j41(0,"mcrai-table",1),t.qex(1,2),t.DNE(2,Ti,2,0,"mcrai-th",3)(3,Di,2,1,"mcrai-td",4),t.bVm(),t.qex(4,5),t.DNE(5,Gi,2,0,"mcrai-th",3)(6,wi,2,1,"mcrai-td",4),t.bVm(),t.qex(7,6),t.DNE(8,Mi,2,0,"mcrai-th",3)(9,Pi,3,2,"mcrai-td",4),t.bVm(),t.qex(10,7),t.DNE(11,Bi,2,0,"mcrai-th",3)(12,Ai,3,2,"mcrai-td",4),t.bVm(),t.qex(13,8),t.DNE(14,Ni,2,0,"mcrai-th",3)(15,Vi,3,2,"mcrai-td",4),t.bVm(),t.qex(16,9),t.DNE(17,zi,2,0,"mcrai-th",3)(18,Zi,3,2,"mcrai-td",4),t.bVm(),t.qex(19,10),t.DNE(20,Qi,2,0,"mcrai-th",3)(21,Wi,3,2,"mcrai-td",4),t.bVm(),t.qex(22,11),t.DNE(23,qi,2,0,"mcrai-th",3)(24,on,3,2,"mcrai-td",4),t.bVm(),t.qex(25,12),t.DNE(26,nn,1,0,"mcrai-th",3)(27,an,2,1,"mcrai-td",13),t.bVm(),t.DNE(28,sn,1,0,"mcrai-tr",14)(29,cn,1,2,"mcrai-tr",15),t.k0s()),2&o){const e=t.XpG();t.Y8G("items",e.prices),t.R7$(28),t.Y8G("mcraiHeaderRowDef",e.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",e.columns)}}function dn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",27),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.showAddPriceModal())}),t.EFF(1,"Nastavit cenu "),t.k0s()}}function mn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",28),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.patchPrices())}),t.EFF(1,"Upravit vybran\xe9"),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isPatchButtonDisabled())}}function pn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",29),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);return t.Njj(n.unselectAll())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",30),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2);
1return t.Njj(n.deletePrices())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("disabled",e.isDeleteButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeleteButtonDisabled())}}function un(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,dn,2,0,"button",25)(2,mn,2,1,"button",26)(3,pn,4,2),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isEditMode()?2:-1),t.R7$(),t.vxM(3,e.toolbarService.isDeleteMode()?3:-1)}}let _n=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n,s){this.store=e,this.modalService=i,this.permissionService=n,this.toolbarService=s,this.destroy=new S.B7,this.ERRORS={price:{pattern:"Mus\xed b\xfdt nez\xe1porn\xe9 \u010d\xedslo"}},this.columns=["currency","price_level","margin","margin_min","margin_max","margin_abs","rebate","additional_price","actions"],this.form=new l.J3({})}ngOnInit(){this.selectCategory(),this.selectSelectedPrices()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectCategory(){this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.category),(0,N.p)(e=>!!e),(0,C.Q)(this.destroy)).subscribe(e=>{this.category=e,this.updateForm(e.prices),this.hydrateForm(e.prices)}),this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.category),(0,C.Q)(this.destroy),(0,N.p)(e=>!!e),(0,g.T)(e=>e.prices)).subscribe(e=>this.prices=e)}selectSelectedPrices(){this.store.pipe((0,m.Lt)(e=>e.aegisxCategories.selectedPrices),(0,C.Q)(this.destroy)).subscribe(e=>this.selectedPrices=e)}updateForm(e){let i=Object.keys(this.form.value);const n=this.pricesDiff(i,e),s=e.map(v=>v.id);n.forEach(v=>{const $r=this.createPriceForm(v);this.form.addControl(v.id,$r)}),i=Object.keys(this.form.value),i.filter(v=>-1===s.indexOf(v)).forEach(v=>{this.form.removeControl(v)})}hydrateForm(e){e.forEach(i=>{const n=this.form.controls[i.id];n&&n.patchValue(i)})}createPriceForm(e){return new l.J3({id:new l.hs(e.id),margin:new l.hs(e.margin,l.k0.pattern(j.Q6)),margin_min:new l.hs(e.margin_min,l.k0.pattern(j.Q6)),margin_max:new l.hs(e.margin_max,l.k0.pattern(j.Q6)),margin_abs:new l.hs(e.margin_abs,l.k0.pattern(j.Q6)),rebate:new l.hs(e.rebate,l.k0.pattern(j.Q6)),additional_price:new l.hs(e.additional_price,l.k0.pattern(j.Q6))})}pricesDiff(e,i){return i.filter(n=>-1===e.indexOf(n.id))}showAddPriceModal(){const e=new d.m_("800px","600px");this.modalService.open(ji,e)}isSelected(e){return!!this.selectedPrices.find(i=>i.id===e.id)}togglePrice(e){this.store.dispatch(new T.g8({item:e}))}isPatchButtonDisabled(){return!this.form.valid||!this.form.dirty}isDeleteButtonDisabled(){return 0===this.selectedPrices.length}unselectAll(){this.store.dispatch(new rt.J8)}patchPrices(){if(this.isPatchButtonDisabled())console.error("patch category prices not valid",this.form);else{const e=[];Object.keys(this.form.value).forEach(n=>{const s=this.form.controls[n];if(s.valid&&s.dirty){const u=s.value;u.id=n,e.push(u)}}),this.store.dispatch(new T.lV({category_id:this.category.id,bodies:e}))}}
1deletePrices(){this.isDeleteButtonDisabled()?console.error("delete category prices not valid",this.selectedPrices):this.store.dispatch(new T.wB({category_id:this.category.id,items:this.selectedPrices}))}isGlobal(e){return"number"!=typeof e.price_level_id}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(K.n),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-prices"]],decls:7,vars:3,consts:[["color","secondary","collapsable","",3,"collapsed"],[3,"items"],["mcraiColumnDef","currency"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","price_level"],["mcraiColumnDef","margin"],["mcraiColumnDef","margin_min"],["mcraiColumnDef","margin_max"],["mcraiColumnDef","margin_abs"],["mcraiColumnDef","rebate"],["mcraiColumnDef","additional_price"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["type","text","placeholder","Mar\u017ee [%]",3,"control","errors"],["type","text","placeholder","Min. mar\u017ee [%]",3,"control","errors"],["type","text","placeholder","Max. mar\u017ee [%]",3,"control","errors"],["type","text",3,"control","errors","placeholder"],["type","text","placeholder","Rabat [%]",3,"control","errors"],["type","text","placeholder","Nav\xfd\u0161en\xed MOC",3,"control","errors"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"click"],["mcrai-button","positive"],["mcrai-button","positive",3,"disabled"],["mcrai-button","positive",3,"click"],["mcrai-button","positive",3,"click","disabled"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"Nastaven\xed cen"),t.k0s()(),t.j41(4,"mcrai-panel-content"),t.DNE(5,ln,30,3,"mcrai-table",1),t.k0s(),t.DNE(6,un,4,3,"mcrai-panel-actions"),t.k0s()),2&i&&(t.Y8G("collapsed",!0),t.R7$(5),t.vxM(5,n.prices?5:-1),t.R7$(),t.vxM(6,n.permissionService.canWrite()?6:-1))},dependencies:[x.Q,Z.N,w.g,M.l,H.h,$.B,mt.n,pt.q,ut.B,_t.K,ht.D,gt.Q,Ct.V,ft.e,yt.O]})}return o})();var P=a(38098),Wt=a(88786),hn=a(26036);let gn=(()=>{class o{constructor(e,i,n){this.store=e,this.modalService=i,this.data=n,this.form=new l.J3({users:new l.hs([]),roles:new l.hs([]),blacklist:new l.hs([])})}ngOnInit(){}isAddButtonDisabled(){return this.form.invalid||this.form.pristine}add(){this.isAddButtonDisabled()?console.error("add category permission not valid",this.form):this.store.dispatch(new P.Q2({category_id:this.data.category.id,body:this.form.value}))}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(d._P))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-add-category-permission-modal"]],decls:22,vars:9,consts:[[3,"formGroup"],[3,"control","multiple"],[3,"control","roles","multiple"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Nastavit pr\xe1va"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0)(6,"mcrai-row")(7,"mcrai-col")(8,"h2"),t.EFF(9,"Povolit"),t.k0s(),t.nrm(10,"aegisx-select-user",1)(11,"aegisx-select-role",1),t.k0s()(),t.j41(12,"mcrai-row")(13,"mcrai-col")(14,"h2"),t.EFF(15,"Zak\xe1zat"),t.k0s(),t.nrm(16,"aegisx-select-user",2),t.k0s()()()(),t.j41(17,"mcrai-modal-actions")(18,"button",3),t.bIt("click",function(){return n.close()}),t.EFF(19,"Zav\u0159\xedt "),t.k0s(),t.j41(20,"button",4),t.bIt("click",function(){return n.add()}),t.EFF(21,"Nastavit "),t.k0s()()()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(5),t.Y8G("control",n.form.controls.users)("multiple",!0),t.R7$(),t.Y8G("control",n.form.controls.roles)("multiple",!0),t.R7$(5),t.Y8G("control",n.form.controls.blacklist)("roles",n.form.controls.roles.value)("multiple",!0),t.R7$(4),t.Y8G("disabled",n.isAddButtonDisabled()))},dependencies:[x.Q,l.qT,l.cb,l.j4,Wt.J,hn.w,U.h,V.l,z.J,L.f,O.o,X.g]})}return o})(),Cn=(()=>{class o{get controls(){return this.form.controls}constructor(e,i,n){this.store=e,this.modalService=i,this.data=n,this.form=new l.J3({blacklist:new l.hs([],l.k0.required)}),this.category=n.category}ngOnInit(){}
1isAddButtonDisabled(){return this.form.invalid}add(){this.isAddButtonDisabled()?console.error("add category blacklist not valid",this.form):(this.store.dispatch(new P.Q2({category_id:this.category.id,body:this.form.value})),this.close())}close(){this.modalService.close()}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(d._P))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["mcrai-add-category-blacklist-modal"]],decls:12,vars:4,consts:[[3,"formGroup"],[3,"control","multiple"],["mcrai-button","negative",3,"click"],["mcrai-button","positive",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),t.EFF(3,"Zak\xe1zat kategorii pro"),t.k0s()(),t.j41(4,"mcrai-modal-content")(5,"form",0),t.nrm(6,"aegisx-select-user",1),t.k0s()(),t.j41(7,"mcrai-modal-actions")(8,"button",2),t.bIt("click",function(){return n.close()}),t.EFF(9,"Zav\u0159\xedt "),t.k0s(),t.j41(10,"button",3),t.bIt("click",function(){return n.add()}),t.EFF(11,"Nastavit "),t.k0s()()()),2&i&&(t.R7$(5),t.Y8G("formGroup",n.form),t.R7$(),t.Y8G("control",n.controls.blacklist)("multiple",!0),t.R7$(4),t.Y8G("disabled",n.isAddButtonDisabled()))},dependencies:[x.Q,l.qT,l.cb,l.j4,Wt.J,U.h,V.l,z.J,L.f]})}return o})();var Ft=a(63967);function fn(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"U\u017eivatel"),t.k0s())}function yn(o,r){if(1&o&&t.EFF(0),2&o){const e=t.XpG().$implicit;t.Lme(" ",null==e.user?null:e.user.username," - ",null==e.user?null:e.user.nickname," ")}}function bn(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.DNE(1,yn,1,2),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.vxM(1,e.user?1:-1)}}function vn(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"Role"),t.k0s())}function En(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.JRh(null==e.role?null:e.role.name)}}function Fn(o,r){1&o&&t.nrm(0,"mcrai-th")}function kn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG(3);return t.Njj(s.toggleUser(n.user))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function Rn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG(3);return t.Njj(s.toggleRole(n.role))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function xn(o,r){if(1&o&&(t.j41(0,"mcrai-td",17),t.DNE(1,kn,3,0,"button",18)(2,Rn,3,0,"button",18),t.k0s()),2&o){const e=r.$implicit,i=t.XpG(3);t.R7$(),t.vxM(1,e.user&&i.toolbarService.isDeleteMode()?1:-1),t.R7$(),t.vxM(2,e.role&&i.toolbarService.isDeleteMode()?2:-1)}}function Sn(o,r){1&o&&t.nrm(0,"mcrai-tr")}function jn(o,r){if(1&o&&t.nrm(0,"mcrai-tr"),2&o){const e=r.$implicit,i=t.XpG(3);t.AVh("mcrai-tr--highlight",i.isSelectedUser(e.user)||i.isSelectedRole(e.role))}}function Tn(o,r){if(1&o&&(t.j41(0,"mcrai-table",1),t.qex(1,9),t.DNE(2,fn,2,0,"mcrai-th",10)(3,bn,2,1,"mcrai-td",11),t.bVm(),t.qex(4,12),t.DNE(5,vn,2,0,"mcrai-th",10)(6,En,2,1,"mcrai-td",11),t.bVm(),t.qex(7,13),t.DNE(8,Fn,1,0,"mcrai-th",10)(9,xn,3,2,"mcrai-td",14),t.bVm(),t.DNE(10,Sn,1,0,"mcrai-tr",15)(11,jn,1,2,"mcrai-tr",16),t.k0s()),2&o){const e=t.XpG(2);t.Y8G("items",e.enabled),t.R7$(10),t.Y8G("mcraiHeaderRowDef",e.columns),t.R7$(),t.Y8G("mcraiRowDefColumns",e.columns)}}function Dn(o,r){1&o&&(t.j41(0,"p"),t.EFF(1," Kategorie je p\u0159\xedstupn\xe1 pro v\u0161echny "),t.k0s())}function Gn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",21),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.showAddPermissionModal())}),t.EFF(1,"Nastavit "),t.k0s()}}function wn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",22),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.unselectEnabled())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",23),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.deleteEnabled())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(3);t.Y8G("disabled",e.isDeleteEnabledButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeleteEnabledButtonDisabled())}}function Mn(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,Gn,2,0,"button",20)(2,wn,4,2),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?2:-1)}}function $n(o,r){1&o&&(t.j41(0,"mcrai-th"),t.EFF(1,"U\u017eivatel"),t.k0s())}function In(o,r){if(1&o&&(t.j41(0,"mcrai-td"),t.EFF(1),t.k0s()),2&o){const e=r.$implicit;t.R7$(),t.E5c(" [",null==e.role?null:e.role.name,"] - ",e.username," - ",e.nickname," ")}}function Pn(o,r){1&o&&t.nrm(0,"mcrai-th")}function Bn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG(3);return t.Njj(s.toggleBlacklist(n))}),t.j41(1,"mcrai-icon"),t.EFF(2,"delete"),t.k0s()()}}function On(o,r){if(1&o&&(t.j41(0,"mcrai-td",17),t.DNE(1,Bn,3,0,"button",18),t.k0s()),2&o){const e=t.XpG(3);t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?1:-1)}}function Xn(o,r){1&o&&t.nrm(0,"mcrai-tr")}function An(o,r){if(1&o&&t.nrm(0,"mcrai-tr"),2&o){const e=r.$implicit,i=t.XpG(3);t.AVh("mcrai-tr--highlight",i.isSelectedBlacklist(e))}}function Nn(o,r){if(1&o&&(t.j41(0,"mcrai-table",1),t.qex(1,9),t.DNE(2,$n,2,0,"mcrai-th",10)(3,In,2,3,"mcrai-td",11),t.bVm(),t.qex(4,13),t.DNE(5,Pn,1,0,"mcrai-th",10)(6,On,2,1,"mcrai-td",14),t.bVm(),t.DNE(7,Xn,1,0,"mcrai-tr",15)(8,An,1,2,"mcrai-tr",16),t.k0s()),2&o){const e=t.XpG(2);t.Y8G("items",e.disabled),t.R7$(7),t.Y8G("mcraiHeaderRowDef",e.columns2),t.R7$(),t.Y8G("mcraiRowDefColumns",e.columns2)}}function Yn(o,r){1&o&&(t.j41(0,"p"),t.EFF(1," Nikdo "),t.k0s())}function Un(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",21),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.showAddBlacklistModal())}),t.EFF(1,"Zak\xe1zat pro "),t.k0s()}}function Vn(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",22),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.unselectBlacklist())}),t.EFF(1,"Zru\u0161it v\xfdb\u011br "),t.k0s(),t.j41(2,"button",23),t.bIt("click",function(){t.eBV(e);const n=t.XpG(3);return t.Njj(n.deleteBlacklist())}),t.EFF(3,"Smazat vybran\xe9 "),t.k0s()}if(2&o){const e=t.XpG(3);t.Y8G("disabled",e.isDeleteBlacklistButtonDisabled()),t.R7$(2),t.Y8G("disabled",e.isDeleteBlacklistButtonDisabled())}}function zn(o,r){if(1&o&&(t.j41(0,"mcrai-panel-actions"),t.DNE(1,Un,2,0,"button",20)(2,Vn,4,2),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.vxM(1,e.toolbarService.isDeleteMode()?-1:1),t.R7$(),t.vxM(2,e.toolbarService.isDeleteMode()?2:-1)}}function Ln(o,r){if(1&o&&(t.j41(0,"mcrai-panel-content")(1,"mcrai-row")(2,"mcrai-col")(3,"mcrai-panel")(4,"mcrai-panel-header")(5,"h3"),t.EFF(6,"Povoleno pro"),t.k0s()(),t.j41(7,"mcrai-panel-content"),t.DNE(8,Tn,12,3,"mcrai-table",1)(9,Dn,2,0,"p"),t.k0s(),t.DNE(10,Mn,3,2,"mcrai-panel-actions"),t.k0s()(),t.j41(11,"mcrai-col")(12,"mcrai-panel")(13,"m
1crai-panel-header",2)(14,"mcrai-row")(15,"mcrai-col")(16,"h3"),t.EFF(17,"Zak\xe1z\xe1no pro"),t.k0s()(),t.j41(18,"mcrai-col")(19,"mcrai-select",3)(20,"mcrai-option",4),t.EFF(21,"V\xfdchoz\xed"),t.k0s(),t.j41(22,"mcrai-option",5),t.EFF(23,"U\u017eivatel a-z"),t.k0s(),t.j41(24,"mcrai-option",6),t.EFF(25,"U\u017eivatel z-a"),t.k0s(),t.j41(26,"mcrai-option",7),t.EFF(27,"Role a-z"),t.k0s(),t.j41(28,"mcrai-option",8),t.EFF(29,"Role z-a"),t.k0s()()()()(),t.j41(30,"mcrai-panel-content"),t.DNE(31,Nn,9,3,"mcrai-table",1)(32,Yn,2,0,"p"),t.k0s(),t.DNE(33,zn,3,2,"mcrai-panel-actions"),t.k0s()()()()),2&o){const e=t.XpG();t.R7$(8),t.vxM(8,null!=e.enabled&&e.enabled.length?8:-1),t.R7$(),t.vxM(9,null!=e.enabled&&e.enabled.length?-1:9),t.R7$(),t.vxM(10,e.permissionService.canWrite()?10:-1),t.R7$(9),t.Y8G("control",e.order),t.R7$(12),t.vxM(31,null!=e.category&&null!=e.category.blacklist&&e.category.blacklist.length?31:-1),t.R7$(),t.vxM(32,null!=e.category&&null!=e.category.blacklist&&e.category.blacklist.length?-1:32),t.R7$(),t.vxM(33,e.permissionService.canWrite()?33:-1)}}let Hn=(()=>{class o{get enabled(){const e=[];for(const i of this.category.roles)e.push({user:null,role:i});for(const i of this.category.users)e.push({user:i,role:null});return e}get disabled(){let e;switch(this.order.value){case"1":e=(i,n)=>{const s=i.nickname.toLowerCase(),u=n.nickname.toLowerCase();return s<u?-1:s>u?1:0};break;case"2":e=(i,n)=>{const s=i.nickname.toLowerCase(),u=n.nickname.toLowerCase();return u<s?-1:u>s?1:0};break;case"3":e=(i,n)=>{const s=i.role?i.role.name.toLowerCase():"",u=n.role?n.role.name.toLowerCase():"";return s<u?-1:s>u?1:0};break;case"4":e=(i,n)=>{const s=i.role?i.role.name.toLowerCase():"",u=n.role?n.role.name.toLowerCase():"";return u<s?-1:u>s?1:0}}if(e){const i=this.category.blacklist.slice();return i.sort(e),i}return this.category.blacklist}get columns(){return["user","role","actions"]}get columns2(){return["user","actions"]}constructor(e,i,n,s){this.store=e,this.modalService=i,this.permissionService=n,this.toolbarService=s,this.selectedUsers=[],this.selectedRoles=[],this.selectedBlacklist=[],this.order=new l.hs}ngOnInit(){}showAddPermissionModal(){const e=new d.m_("800px","600px",{category:this.category});this.modalService.open(gn,e)}showAddBlacklistModal(){const e=new d.m_("800px","600px",{category:this.category});this.modalService.open(Cn,e)}isSelectedUser(e){return!!e&&!!this.selectedUsers.find(i=>i.id===e.id)}isSelectedRole(e){return!!e&&!!this.selectedRoles.find(i=>i.id===e.id)}isSelectedBlacklist(e){return!!this.selectedBlacklist.find(i=>i.id===e.id)}toggleUser(e){this.selectedUsers=(0,Ft.g)(this.selectedUsers,e)}toggleRole(e){this.selectedRoles=(0,Ft.g)(this.selectedRoles,e)}toggleBlacklist(e){this.selectedBlacklist=(0,Ft.g)(this.selectedBlacklist,e)}unselectEnabled(){this.selectedUsers=[],this.selectedRoles=[]}unselectBlacklist(){this.selectedBlacklist=[]}isDeleteEnabledButtonDisabled(){return!this.selectedUsers.length&&!this.selectedRoles.length}deleteEnabled(){this.isDeleteEnabledButtonDisabled()||(this.store.dispatch(new P.ml({id:this.category.id,users:this.selectedUsers,roles:this.selectedRoles,blacklist:[]})),this.unselectEnabled())}isDeleteBlacklistButtonDisabled(){return!this.selectedBlacklist.length}deleteBlacklist(){this.isDeleteBlacklistButtonDisabled()||(this.store.dispatch(new P.ml({id:this.category.id,users:[],roles:[],blacklist:this.selectedBlacklist})),this.unselectBlacklist())}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(d.mO),t.rXU(K.n),t.rXU(A.h))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-permissions"]],inputs:{category:"category"},decls:5,vars:2,consts:[["color","secondary","collapsable","",3,"collapsed"],[3,"items"],[1,"permissions--header"],["placeholder","Po\u0159ad\xed",3,"control"],["value","0"],["value","1"],["value","2"],["value","3"],["value","4"],["mcraiColumnDef","user"],[4,"mcraiHeaderCellDef"],[4,"mcraiCellDef"],["mcraiColumnDef","role"],["mcraiColumnDef","actions"],["align-right","",4,"mcraiCellDef"],[4,"mcraiHeaderRowDef"],[3,"mcrai-tr--highlight",4,"mcraiRowDef","mcraiRowDefColumns"],["align-right",""],["mcrai-button","neutral"],["mcrai-button","neutral",3,"click"],["mcrai-button","positive"],["mcrai-button","positive",3,"click"],["mcrai-button","neutral",3,"click","disabled"],["mcrai-button","negative",3,"click","disabled"]],template:function(i,n){1&i&&(t.j41(0,"mcrai-panel",0)(1,"mcrai-panel-header")(2,"h2"),t.EFF(3,"N
1astaven\xed pr\xe1v"),t.k0s()(),t.DNE(4,Ln,34,7,"mcrai-panel-content"),t.k0s()),2&i&&(t.Y8G("collapsed",!1),t.R7$(4),t.vxM(4,n.category?4:-1))},dependencies:[x.Q,Ot.R,q.w,tt.P,O.o,X.g,w.g,M.l,H.h,$.B,mt.n,pt.q,ut.B,_t.K,ht.D,gt.Q,Ct.V,ft.e,yt.O],styles:[".permissions--header[_ngcontent-%COMP%]   .mcrai-row[_ngcontent-%COMP%]{width:100%}.permissions--header[_ngcontent-%COMP%]   .mcrai-col[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}return o})();function Zn(o,r){if(1&o&&t.nrm(0,"mcrai-media",1),2&o){const e=t.XpG(2);t.Y8G("data",null==e.category.preview_image?null:e.category.preview_image.thumbnail)("mcraiImageDetail",null==e.category.preview_image?null:e.category.preview_image.original)}}function Qn(o,r){if(1&o&&(t.j41(0,"mcrai-panel")(1,"mcrai-panel-header"),t.DNE(2,Zn,1,2,"mcrai-media",1),t.j41(3,"h1"),t.EFF(4),t.k0s()(),t.j41(5,"mcrai-panel-content")(6,"mcrai-row")(7,"mcrai-col"),t.nrm(8,"aegisx-category-info"),t.k0s(),t.j41(9,"mcrai-col",2),t.nrm(10,"aegisx-category-languages"),t.k0s()(),t.j41(11,"mcrai-row")(12,"mcrai-col"),t.nrm(13,"aegisx-category-images"),t.k0s()(),t.j41(14,"mcrai-row")(15,"mcrai-col"),t.nrm(16,"aegisx-category-settings"),t.k0s()(),t.j41(17,"mcrai-row")(18,"mcrai-col"),t.nrm(19,"aegisx-assigned-items"),t.k0s()(),t.j41(20,"mcrai-row")(21,"mcrai-col"),t.nrm(22,"aegisx-category-prices"),t.k0s()(),t.j41(23,"mcrai-row")(24,"mcrai-col"),t.nrm(25,"aegisx-category-permissions",3),t.k0s()()()()),2&o){const e=t.XpG();t.R7$(2),t.vxM(2,e.category.preview_image?2:-1),t.R7$(2),t.JRh(null==e.category.info[0]?null:e.category.info[0].name),t.R7$(21),t.Y8G("category",e.category)}}const Kn=[{path:"",component:$e,canActivate:[B.J]},{path:":id",component:(()=>{class o{constructor(e,i,n,s){this.store=e,this.activatedRoute=i,this.toolbarService=n,this.location=s,this.destroy=new S.B7}ngOnInit(){this.toolbarService.setToolbarModes([J.H.View,J.H.Edit,J.H.Delete]),this.getLanguages(),this.getBrands(),this.activatedRoute.params.pipe((0,C.Q)(this.destroy)).subscribe(e=>this.getCategory(e.id)),this.store.pipe((0,m.Lt)(y.N2),(0,C.Q)(this.destroy)).subscribe(e=>this.category=e)}ngOnDestroy(){this.destroy.next(),this.destroy.complete(),this.store.pipe((0,m.Lt)(Pe.rd),(0,Ie.s)(1),(0,g.T)(e=>e.find(i=>i.item.id===this.category.id)),(0,N.p)(e=>!!e),(0,g.T)(e=>e.parent),(0,N.p)(e=>"root"!==e)).subscribe(e=>{this.store.dispatch(new ot.jm({id:e,page:1}))})}getBrands(){this.store.dispatch(new Q.tu)}getLanguages(){this.store.dispatch(new kt.c8)}getCategory(e){this.store.dispatch(new _.zS({id:e}))}showAssignedItems(){return!!this.category&&(this.category.products_count>0||this.category.articles_count>0)}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(m.il),t.rXU(R.nX),t.rXU(A.h),t.rXU(f.aZ))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["aegisx-category-detail"]],decls:10,vars:1,consts:[["mcrai-button","neutral",3,"click"],["type","image","width","40","height","40",1,"header--image",3,"data","mcraiImageDetail"],["flex-2",""],[3,"category"]],template:function(i,n){1&i&&(t.nrm(0,"aegisx-header"),t.j41(1,"mcrai-container")(2,"mcrai-row")(3,"mcrai-col")(4,"button",0),t.bIt("click",function(){return n.location.back()}),t.EFF(5,"Zp\xe1tky"),t.k0s()()(),t.j41(6,"mcrai-row")(7,"mcrai-col"),t.DNE(8,Qn,26,3,"mcrai-panel"),t.k0s()()(),t.nrm(9,"aegisx-toolbar")),2&i&&(t.R7$(8),t.vxM(8,n.category?8:-1))},dependencies:[$t.I,x.Q,It.I,O.o,X.g,Pt.H,w.g,M.l,$.B,At.h,Be.U,fo,ko,Uo,ii,bi,_n,Hn],styles:["[_nghost-%COMP%]{display:block}.category-detail__panel--main[_ngcontent-%COMP%]{margin-top:2rem}.header--image[_ngcontent-%COMP%]{margin-right:1rem}"]})}return o})(),canActivate:[B.J]}];let Wn=(()=>{class o{static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275mod=t.$C({type:o});static#o=this.\u0275inj=t.G2t({imports:[R.iI.forChild(Kn),R.iI]})}return o})();var b=a(14421),qt=a(86525),at=a(82833);let te=(()=>{class o extends qt.d{constructor(){super(...arguments),this.CATEGORIES_ROOT="categories",this.PRICES="prices",this.PERMISSIONS="permissions"}getCategories(e,i=1){const n=this.buildUrl(["categories",e,"nav"],{page:i},!0);return this.get(n)}postCategory(e){const i=this.buildUrl(["categories"]),n=new FormData;return e.preview_image&&n.append("preview_image",e.preview_image),e.background_image&&n.append("background_image",e.background_image),e.icon&&n.append("icon",e.icon),n.append("body",JSON.stringify(e)),this.post(i,n)}getCategory(e){const i=this.buildUrl(["categories",e]);return this.get(i)}patchCategory(e,i){const n=this.buildUrl(["categories",e]);return this.patch(n,i)}postCategoryInfo(e,i){const n=this.buildUrl(["categories",e,"info"]);return this.post(n,i)}patchCategoryInfo(e,i,n){const s=this.buildUrl(["categories",e,"info",i]);return this.patch(s,n)}postCategoryImage(e,i,n,s){const u=this.buildUrl(["categories",e,"images"]),v=new FormData;return i&&v.append("preview_image",i),n&&v.append("background_image",n),s&&v.append("icon",s),this.post(u,v)}postCategoryNav(e,i){const n=this.buildUrl(["categories",e,"nav"]);return this.post(n,{category_ids:i})}postCategoryBrands(e,i){const n=this.buildUrl(["categories",e,"brands"]);return this.post(n,{brands:i})}deleteCategories(e){const i=this.buildUrl(["categories"],{category_ids:e});return this.del(i)}getProducts(e,i,n=!0,s={}){const u=Object.assign({page:i,deep:n},s),v=this.buildUrl(["categories",e,"products"],u,!0);return e?this.get(v):(0,b.of)(null)}getArticles(e,i){const n=this.buildUrl(["categories",e,"articles"],{page:i},!0);return this.get(n)}getBrands(e,i){const n=this.buildUrl(["categories",e,"brands"],{page:i},!0);return this.get(n)}deleteImages(e,i){const n=this.buildUrl(["categories",e,"images"],{image_props:i});return this.del(n)}createPrice(e,i){const n=this.buildUrl([this.CATEGORIES_ROOT,e,this.PRICES]);return this.post(n,i)}patchPrices(e,i){const n=this.buildUrl([this.CATEGORIES_ROOT,e,this.PRICES]);return this.patch(n,i)}
1deletePrices(e,i){const n={price_ids:(0,at._)(i)},s=this.buildUrl([this.CATEGORIES_ROOT,e,this.PRICES],n);return this.del(s)}createPermission(e,i){const n=this.buildUrl([this.CATEGORIES_ROOT,e,this.PERMISSIONS]);return this.post(n,i)}deletePermissions(e,i,n,s){const u={users:(0,at._)(i),roles:(0,at._)(n),blacklist:(0,at._)(s)},v=this.buildUrl([this.CATEGORIES_ROOT,e,this.PERMISSIONS],u);return this.del(v)}patchCategoryPrefBrandOrder(e,i,n,s){const u=this.buildUrl([this.CATEGORIES_ROOT,e,"preferred_brands",i]);return this.patch(u,{order:n,load_tree:s})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var p=a(15539),h=a(49090),E=a(83921),st=a(57421);let Y=(()=>{class o{constructor(e,i,n,s,u,v){this.actions=e,this.categoryService=i,this.store=n,this.toastService=s,this.loaderService=u,this.modalService=v}static#t=this.\u0275fac=function(i){return new(i||o)(t.KVO(c.En),t.KVO(te),t.KVO(m.il),t.KVO(d.FS),t.KVO(d.wA),t.KVO(d.mO))};static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var F=a(29694);let qn=(()=>{class o extends Y{constructor(){super(...arguments),this.getCategory=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.Cg),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getCategory(e.payload.id).pipe((0,g.T)(i=>new _.sq(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getCategorySuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.ug),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1}),this.getNewCategories=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.lp),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getCategories("new",e.payload.page).pipe((0,g.T)(i=>new _.Uw({categories:i})),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getNewCategoriesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.LY),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1}),this.deleteArticlesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(it.Ft),(0,st.E)(this.store),(0,h.n)(([e,i])=>[new _.Cu({id:i.aegisxCategories.category.id,page:1})]))),this.getArticles=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.xd),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getArticles(e.payload.id,e.payload.page).pipe((0,g.T)(i=>new _.tt(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getArticlesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.tx),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1}),this.deleteProductsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(it.im),(0,st.E)(this.store),(0,h.n)(([e,i])=>[new _.vK({id:i.aegisxCategories.category.id,page:1})]))),this.getProducts=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.oH),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getProducts(e.payload.id,e.payload.page,!0,e.payload.filter).pipe((0,g.T)(i=>new _.C$(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getProductsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.G_),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1}),this.getProductsDirect=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.UF),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getProducts(e.payload.id,e.payload.page,!1,e.payload.filter).pipe((0,g.T)(i=>new _.hI(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getProductsDirectSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.mU),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1}),this.getBrands=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_._R),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.getBrands(e.payload.id,e.payload.page).pipe((0,g.T)(i=>new _.ey(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getBrandsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(_.Oj),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var et=a(28758);let tr=(()=>{class o extends Y{constructor(){super(...arguments),this.postCategory=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.ot),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.postCategory(e.payload.category).pipe((0,g.T)(i=>new k._1(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.postCategorySuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.u_),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(()=>[new _.LQ({page:1})]))),this.postCategoryNav=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.iX),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.postCategoryNav(e.payload.id,e.payload.categories).pipe((0,g.T)(i=>new k.j_({...i,id:e.payload.id})),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.postCategoryNavSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.ks),(0,p.M)(e=>{this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>[new _.LQ({page:1}),new et.Ae({page:1}),new et.n0({page:1}),new ot.jm({id:e.payload.id,page:1}),new ct.Od({id:e.payload.id})]))),this.postCategoryInfo=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.X5),(0,p.M)(()=>this.loaderService.show()),(0,st.E)(this.store.select(e=>e.aegisxCategories.category)),(0,h.n)(([e,i])=>this.categoryService.postCategoryInfo(i.id,e.payload.info).pipe((0,g.T)(n=>new k.gi(n)),(0,E.W)(n=>
1(0,b.of)(new F.Rn(n))))))),this.postCategoryInfoSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.nz),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1}),this.postCategoryImage=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.As),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.postCategoryImage(e.payload.id,e.payload.previewImage,e.payload.backgroundImage,e.payload.icon).pipe((0,g.T)(i=>new k.Fp(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.postCategoryImageSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.cI),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1}),this.postCategoryBrands=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.JJ),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.postCategoryBrands(e.payload.id,e.payload.brand_names).pipe((0,g.T)(i=>new k.Wm(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.postCategoryBrandsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(k.xF),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>[new _.tu({id:e.payload.id,page:1})])))}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var er=a(18456);let or=(()=>{class o extends Y{constructor(){super(...arguments),this.patchCategory=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.iX),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.patchCategory(e.payload.id,e.payload.newCategory).pipe((0,g.T)(i=>new I.w$(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.patchCategorySuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.Sp),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1}),this.patchCategoryInfo=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.Jn),(0,p.M)(()=>this.loaderService.show()),(0,er.ZZ)(e=>this.categoryService.patchCategoryInfo(e.payload.id,e.payload.language,e.payload.info).pipe((0,g.T)(i=>new I.OK(i,e.no_get)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.patchCategoryInfoSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.ZR),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>e.no_get?[]:[new _.zS({id:e.payload.item.id})]))),this.patchCategoryPrefBrandOrder=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.vW),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.patchCategoryPrefBrandOrder(e.payload.category_id,e.payload.preferred_brand_id,e.payload.order,e.payload.load_tree).pipe((0,g.T)(i=>new I.I2(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.patchCategoryPrefBrandOrderSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(I.pd),(0,h.n)(e=>{if(e.payload.load_tree){const i=e.payload.item.breadcrumbs.length>0?e.payload.item.breadcrumbs.slice(-1)[0].id:null;return[i?new ot.jm({id:i,page:1}):new et.n0({page:1})]}return[new _.zS({id:e.payload.item.id})]})))}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),ir=(()=>{class o extends Y{constructor(){super(...arguments),this.deleteCategories=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.rK),(0,p.M)(()=>{this.loaderService.show()}),(0,h.n)(e=>this.categoryService.deleteCategories(e.payload.branches.map(i=>i.item.id)).pipe((0,g.T)(i=>new G.RU({...i,parents:Array.from(new Set(e.payload.branches.map(n=>n.parent)))})),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.deleteCategoriesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.nO),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>[new _.LQ({page:1}),new et.Ae({page:1}),new et.n0({page:1}),...e.payload.parents.map(i=>new ot.jm({id:i,page:1}))]))),this.deleteCategoryImages=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.ow),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.deleteImages(e.payload.category_id,e.payload.image_props).pipe((0,g.T)(i=>new G.lN(i)),(0,E.W)(i=>
1(0,b.of)(new F.Rn(i))))))),this.deleteCategoryImagesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(G.wQ),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),nr=(()=>{class o extends Y{constructor(){super(...arguments),this.removeStaged=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(ct.q2),(0,st.E)(this.store.select(e=>e.aegisxForest.staged)),(0,h.n)(([e,i])=>{const n=[];return i.forEach(s=>{switch(s.parent){case"new":n.push(new G.TZ({id:s.item.id}));break;case"specials":n.push(new G.wF({id:s.item.id}))}}),n})))}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),rr=(()=>{class o extends Y{constructor(){super(...arguments),this.createPrice=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.Fz),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.createPrice(e.payload.category_id,e.payload.body).pipe((0,g.T)(i=>new T.JY(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.createPriceSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.j0),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1}),this.patchPrices=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.oR),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.patchPrices(e.payload.category_id,e.payload.bodies).pipe((0,g.T)(i=>new T.ex(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.patchPricesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.Ko),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1}),this.deletePrices=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.zF),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.deletePrices(e.payload.category_id,e.payload.items).pipe((0,g.T)(i=>new T.H4(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.deletePricesSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(T.jn),(0,p.M)(e=>{this.loaderService.hide(),this.toastService.makeToast(e.payload.message,d.Ck.Success)})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),ar=(()=>{class o extends Y{constructor(){super(...arguments),this.createPermission=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(P.BG),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.createPermission(e.payload.category_id,e.payload.body).pipe((0,g.T)(i=>new P.t2(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.createPermissionSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(P.l2),(0,p.M)(e=>{this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>[new _.sq(e.payload)]))),this.deletePermissions=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(P.rx),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.categoryService.deletePermissions(e.payload.id,e.payload.users,e.payload.roles,e.payload.blacklist).pipe((0,g.T)(i=>new P.Jg(i)),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.deletePermissionsSuccess=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(P.dk),(0,p.M)(e=>{this.toastService.makeToast(e.payload.message,d.Ck.Success)}),(0,h.n)(e=>[new _.sq(e.payload)])))}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var sr=a(18941);let cr=(()=>{class o extends Y{constructor(){super(...arguments),this.reset=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(sr.EX),(0,h.n)(()=>[new rt.J8,new _.LQ({page:1})])))}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})();var lr=a(68218),dr=a(95308),mr=a(83185),pr=a(28304),ur=a(18657),_r=a(94501),hr=a(73174),gr=a(95976),Cr=a(5763),fr=a(74818),yr=a(58755),br=a(41566),vr=a(35635);let Er=(()=>{class o extends Y{constructor(){super(...arguments),this.closeModal=(0,c.EH)(()=>this.actions.pipe((0,c.gp)(P.l2),(0,p.M)(()=>{this.modalService.close()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o}
1)();var Fr=a(33337);let kr=(()=>{class o{static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275mod=t.$C({type:o});static#o=this.\u0275inj=t.G2t({imports:[f.MD,Fr.r]})}return o})(),Rr=(()=>{class o extends qt.d{getCategoryArticles(e,i){const s=this.buildUrl(["categories",e,"articles"],{page:i});return this.get(s)}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),xr=(()=>{class o{constructor(e,i,n,s,u,v){this.dataService=e,this.actions$=i,this.store=n,this.router=s,this.toastService=u,this.loaderService=v}static#t=this.\u0275fac=function(i){return new(i||o)(t.KVO(Rr),t.KVO(c.En),t.KVO(m.il),t.KVO(R.Ix),t.KVO(d.FS),t.KVO(d.wA))};static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),Sr=(()=>{class o extends xr{constructor(){super(...arguments),this.getCategoryArticles=(0,c.EH)(()=>this.actions$.pipe((0,c.gp)(Yt),(0,p.M)(()=>this.loaderService.show()),(0,h.n)(e=>this.dataService.getCategoryArticles(e.payload.id,e.payload.page).pipe((0,g.T)(i=>new Xe({id:e.payload.id,items:i})),(0,E.W)(i=>(0,b.of)(new F.Rn(i))))))),this.getCategoryArticlesSuccess=(0,c.EH)(()=>this.actions$.pipe((0,c.gp)(dt),(0,p.M)(()=>{this.loaderService.hide()})),{dispatch:!1})}static#t=this.\u0275fac=(()=>{let e;return function(n){return(e||(e=t.xGo(o)))(n||o)}})();static#e=this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac})}return o})(),jr=(()=>{class o{static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275mod=t.$C({type:o});static#o=this.\u0275inj=t.G2t({imports:[f.MD,kr,m.md.forFeature(Vt,Ne),c.Vm.forFeature([Sr])]})}return o})(),Tr=(()=>{class o{static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275mod=t.$C({type:o});static#o=this.\u0275inj=t.G2t({imports:[f.MD,l.X1,jr,d.ni]})}return o})();var Dr=a(81956),Gr=a(71939),wr=a(70725);let Mr=(()=>{class o{static#t=this.\u0275fac=function(i){return new(i||o)};static#e=this.\u0275mod=t.$C({type:o});static#o=this.\u0275inj=t.G2t({providers:[te],imports:[f.MD,Wn,lr.G,mr.m,dr.G,l.X1,pr.g,c.Vm.forFeature([qn,tr,or,ir,nr,rr,ar,cr,Er]),m.md.forFeature(y.qx,y.Ff),yr.m,fr.N,ur.a,Cr.d,gr._,hr.V,d.xT,d.oP,d.B4,d.ni,d.LU,d.pj,d.SD,d.I0,d.Tm,d.F8,d.Zg,d.hv,d.x6,vr.w,_r.G,br.R,Tr,Dr.c,Gr.X,wr.h]})}return o})()},13185:(W,D,a)=>{a.d(D,{D:()=>f});const f=["dla\u017edice","seznam"]},16818:(W,D,a)=>{a.d(D,{o:()=>f});const f=["common.low_price_to_high","common.high_price_to_low","common.bestseller","common.we_recommend","common.alphabetically","common.alphabetically_reversed","product.code"]},45461:(W,D,a)=>{a.d(D,{s:()=>l});var f=a(54438);let l=(()=>{class c{static#t=this.LET={ZERO:1,EMPTY_STR:2,FALSE:4,NAN:8};transform(d,y=0){return y&c.LET.ZERO&&0===d||y&c.LET.EMPTY_STR&&""===d||y&c.LET.FALSE&&!1===d||y&c.LET.NAN&&isNaN(d)?d:d||"-- \u017e\xe1dn\xe1 hodnota --"}static#e=this.\u0275fac=function(y){return new(y||c)};static#o=this.\u0275pipe=f.EJ8({name:"notSet",type:c,pure:!0})}return c})()},48235:(W,D,a)=>{a.d(D,{R:()=>c});var f=a(54438);const l=["*"];let c=(()=>{class m{set separator(y){this.separatorCssClass=!1!==y}set highlight(y){this.highlightCssClass=!1!==y}constructor(){this.cssClass=!0,this.separatorCssClass=!1,this.highlightCssClass=!1}ngOnInit(){}static#t=this.\u0275fac=function(R){return new(R||m)};static#e=this.\u0275cmp=f.VBU({type:m,selectors:[["mcrai-li"]],hostVars:6,hostBindings:function(R,B){2&R&&f.AVh("mcrai-li",B.cssClass)("mcrai-li--separator",B.separatorCssClass)("mcrai-li--highlight",B.highlightCssClass)},inputs:{separator:"separator",highlight:"highlight"},ngContentSelectors:l,decls:1,vars:0,template:function(R,B){1&R&&(f.NAR(),f.SdG(0))},styles:[".mcrai-li{display:block}.mcrai-li--separator{margin-top:5px}\n"],encapsulation:2,changeDetection:0})}return m})()},19727:(W,D,a)=>{a.d(D,{E:()=>c});var f=a(54438);const l=["*"];let c=(()=>{class m{constructor(){this.cssClass=!0}ngOnInit(){}static#t=this.\u0275fac=function(R){return new(R||m)};static#e=this.\u0275cmp=f.VBU({type:m,selectors:[["mcrai-ul"]],hostVars:2,hostBindings:function(R,B){2&R&&f.AVh("mcrai-ul",B.cssClass)},ngContentSelectors:l,decls:1,vars:0,template:function(R,B){1&R&&(f.NAR(),f.SdG(0))},styles:[".mcrai-ul{display:flex;flex-direction:column;margin:3px 0}\n"],encapsulation:2,changeDetection:0})}return m})()}}]);

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.