PageSourceSearch

https://www.energytcm.cz/7005.44bce875e2c735ac.js

js energytcm.cz collected 2026-10-07 20:07:10 UTC 8,416 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkenergy_tcm=self.webpackChunkenergy_tcm||[]).push([[7005],{57005:(I,f,t)=>{t.d(f,{O:()=>S});var e=t(89417),d=t(45286),m=t(7605),v=t(58728),u=t(29262),C=t(76965),M=t(95006),y=t(59863),O=t(91165);class E{constructor(p,s,r){this.nameControl=p,this.valueControl=s,this.multiple=r}fill(p){if(p){if(this.multiple){const s=[],r=[];p.forEach(i=>{s.push(i.info[0].name),r.push(i.id)}),this.valueControl.patchValue(r),this.nameControl.patchValue(s.join(", "))}else this.valueControl.patchValue(p.length?p[0].id:null),this.nameControl.patchValue(p.length?p[0].info[0].name:null);this.valueControl.markAsDirty(),this.nameControl.markAsDirty()}else this.valueControl.reset(),this.nameControl.reset()}}var T=t(46594),o=t(54438),g=t(31992),P=t(46346),l=t(94300),c=t(54444),n=t(63649),a=t(40253),_=t(51279);function D(h,p){if(1&h){const s=o.RV6();o.j41(0,"aegisx-category-tree2",2),o.bIt("onSelectCategories",function(i){o.eBV(s);const x=o.XpG();return o.Njj(x.onSelectCategories(i))}),o.k0s()}if(2&h){const s=o.XpG();o.Y8G("tree",s.tree)("multiple",s.multiple)("search",s.search)("selected",s.selected)("specials",s.specials)}}let U=(()=>{class h{constructor(s,r,i){this.store=s,this.modalService=r,this.data=i,this.destroy=new d.B7,this.search=!0,this.selected=[],this.id="ass",i.id&&(this.id=i.id),i.nameControl&&(this.nameControl=i.nameControl),i.valueControl&&(this.valueControl=i.valueControl,(!this.valueControl.value||!this.valueControl.value.length)&&(this.store.dispatch(new y.n({id:this.id,categories:[]})),this.valueControl.markAsPristine())),this.multiple=i.multiple,this.search=i.search,this.specials=i.specials,i.selected&&(this.selected=i.selected)}ngOnInit(){this.controls=new E(this.nameControl,this.valueControl,this.multiple),this.store.pipe((0,C.Lt)(T.eS,{id:""}),(0,v.p)(s=>!!s),(0,m.Q)(this.destroy)).subscribe(s=>{this.tree=s}),this.selectSelectedCategories()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectSelectedCategories(){this.store.pipe((0,C.Lt)(O.lX),(0,m.Q)(this.destroy),(0,M.T)(s=>s[this.id]),(0,v.p)(s=>!!s)).subscribe(s=>{this.selected=s.categories})}onSelectCategories(s){this.controls.fill(s),this.selected=s,this.store.dispatch(new y.n({id:this.id,categories:s}))}close(){this.modalService.close()}static#e=this.\u0275fac=function(r){return new(r||h)(o.rXU(C.il),o.rXU(u.mO),o.rXU(u._P))};static#t=this.\u0275cmp=o.VBU({type:h,selectors:[["app-category-tree-modal"]],decls:11,vars:1,consts:[[3,"tree","multiple","search","selected","specials"],["mcrai-button","neutral",3,"click"],[3,"onSelectCategories","tree","multiple","search","selected","specials"]],template:function(r,i){1&r&&(o.j41(0,"mcrai-modal")(1,"mcrai-modal-header")(2,"h1"),o.EFF(3,"Kategorie"),o.k0s()(),o.j41(4,"mcrai-modal-content"),o.nrm(5,"aegisx-select-user-category-tree")(6,"br"),o.DNE(7,D,1,5,"aegisx-category-tree2",0),o.k0s(),o.j41(8,"mcrai-modal-actions")(9,"button",1),o.bIt("click",function(){return i.close()}),o.EFF(10,"OK "),o.k0s()()()),2&r&&(o.R7$(7),o.vxM(7,i.tree?7:-1))},dependencies:[g.h,P.l,l.J,c.f,n.Q,a.j,_.e]})}return h})();var B=t(97519);let S=(()=>{class h{get control(){return this._control}set control(s){this._control=s}set selected(s){this._selected=s?Array.isArray(s)?s:[s]:null,new E(this.internalControl,this.control,this.multiple).fill(this._selected)}get selected(){return this._selected}constructor(s){this.modalService=s,this.destroy=new d.B7,this.internalControl=new e.hs,this._control=new e.hs,this.multiple=!1,this.search=void 0,this.specials=!1,this.placeholder="E-shop kategorie",this.selectedCatsId=null,this._selected=[]}ngOnInit(){this.control.valueChanges.pipe((0,m.Q)(this.destroy),(0,v.p)(s=>!s)).subscribe(()=>{this.internalControl.reset()})}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}openModal(){const s=this.getModalOptions();this.modalService.open(U,s)}getModalOptions(){return new u.MK("1280px","800px",{nameControl:this.internalControl,valueControl:this.control,multiple:this.multiple,search:this.search,specials:this.specials,selected:this._selected,id:this.selectedCatsId})}static#e=this.\u0275fac=function(r){return new(r||h)(o.rXU(u.mO))};static#t=this.\u0275cmp=o.VBU({type:h,selectors:[["aegisx-select-category"]],inputs:{control:"control",multiple:"multiple",search:"search",specials:"specials",placeholder:"placeholder",selectedCatsId:"selectedCatsId",selected:"selected"},decls:1,vars:2,consts:[["type","text",3,"click","placeholder","control"]],template:function(r,i){1&r&&(o.j41(0,"mcrai-input",0),o.bIt("click",function(){return i.openModal()}),o.k0s()),2&r&&o.Y8G("placeholder",i.placeholder)("control",i.internalControl)},dependencies:[B.N],styles:["[_nghost-%COMP%]{display:block;width:100%}"]})}return h})()},435:(I,f,t)=>{t.d(f,{K:()=>P});var e=t(54438),d=t(76965),m=t(45286),v=t(7605),u=t(95006),C=t(58728),M=t(1
17903),y=t(46389),O=t(59788),E=t(83891);function T(l,c){if(1&l){const n=e.RV6();e.j41(0,"mcrai-option",3),e.bIt("selection",function(_){e.eBV(n);const D=e.XpG(2);return e.Njj(D.onSelection(_))}),e.k0s()}2&l&&e.Y8G("value",null)}function o(l,c){if(1&l){const n=e.RV6();e.j41(0,"mcrai-option",4),e.bIt("selection",function(_){e.eBV(n);const D=e.XpG(2);return e.Njj(D.onSelection(_))}),e.EFF(1),e.k0s()}if(2&l){const n=c.$implicit;e.Y8G("value",n.id)("title",n.name),e.R7$(),e.SpI(" ",n.name," ")}}function g(l,c){if(1&l&&(e.j41(0,"mcrai-select",0),e.DNE(1,T,1,1,"mcrai-option",1),e.Z7z(2,o,2,3,"mcrai-option",2,e.fX1),e.k0s()),2&l){const n=e.XpG();e.Mz_("placeholder","Strom kategori\xed",n.required?" *":"",""),e.Y8G("control",n.control),e.R7$(),e.vxM(1,n.nullable?1:-1),e.R7$(),e.Dyx(n.trees.items)}}let P=(()=>{class l{get control(){return this._control}set control(n){this._control=n}constructor(n){this.store=n,this.destroy=new m.B7,this.required=!1,this.nullable=!0,this.selection=new e.bkB}ngOnInit(){this.getTrees(),this.selectTrees()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}getTrees(n=1){this.store.dispatch(new M.Qx({id:this.id,page:n}))}selectTrees(){this.store.pipe((0,d.Lt)(y.gk),(0,v.Q)(this.destroy),(0,u.T)(n=>n.get(this.id)),(0,C.p)(n=>!!n)).subscribe(n=>{this.trees=n,this.control.value?this.selection.emit(this.trees.items.find(a=>a.id===this.control.value)):!this.nullable&&this.trees.items.length&&(this.control.patchValue(this.trees.items[0].id),this.selection.emit(this.trees.items[0]))})}onSelection(n){this.selection.emit(n.value?this.trees.items.find(a=>a.id===n.value):null)}static#e=this.\u0275fac=function(a){return new(a||l)(e.rXU(d.il))};static#t=this.\u0275cmp=e.VBU({type:l,selectors:[["aegisx-select-category-tree"]],inputs:{control:"control",required:"required",nullable:"nullable"},outputs:{selection:"selection"},decls:1,vars:1,consts:[[3,"placeholder","control"],[3,"value"],[3,"value","title"],[3,"selection","value"],[3,"selection","value","title"]],template:function(a,_){1&a&&e.DNE(0,g,4,4,"mcrai-select",0),2&a&&e.vxM(0,_.trees?0:-1)},dependencies:[O.w,E.P]})}return l})()},40253:(I,f,t)=>{t.d(f,{j:()=>o});var e=t(54438),d=t(89417),m=t(76965),v=t(45286),u=t(49776),C=t(7605),M=t(79341),y=t(10914),O=t(46594),E=t(435),T=t(33579);let o=(()=>{class g{get controls(){return this.form.controls}constructor(l){this.store=l,this.destroy=new v.B7,this.form=new d.J3({selected_tree:new d.hs(null,d.k0.required)}),this.id="",this.selection=new e.bkB}ngOnInit(){this.selectAuthenticated()}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}selectAuthenticated(){(0,u.zV)([this.store.pipe((0,m.Lt)(M.If),(0,C.Q)(this.destroy)),this.store.pipe((0,m.Lt)(O.eS,{id:this.id}),(0,C.Q)(this.destroy))]).subscribe(([l,c])=>{c||(c=l.active_domain_aegisx?l.active_domain_aegisx.category_tree:l.active_domain?l.active_domain.category_tree:null),this.form.reset(),this.form.patchValue({selected_tree:c?c.id:null})})}onSelection(l){this.selection.emit(l),this.store.dispatch(new y.Z({id:this.id,tree:l}))}static#e=this.\u0275fac=function(c){return new(c||g)(e.rXU(m.il))};static#t=this.\u0275cmp=e.VBU({type:g,selectors:[["aegisx-select-user-category-tree"]],inputs:{id:"id"},outputs:{selection:"selection"},decls:2,vars:2,consts:[[3,"selection","control","nullable"]],template:function(c,n){1&c&&(e.j41(0,"mcrai-row")(1,"aegisx-select-category-tree",0),e.bIt("selection",function(_){return n.onSelection(_)}),e.k0s()()),2&c&&(e.R7$(),e.Y8G("control",n.controls.selected_tree)("nullable",!1))},dependencies:[E.K,T.o]})}return g})()}}]);

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.