PageSourceSearch

https://muzo-boyaca.gov.co/chunk-VG4NNDEZ.js

js muzo-boyaca.gov.co collected 2026-09-25 11:57:14 UTC 31,622 bytes, 4 lines download raw bytes

1import{a as j}from"./chunk-WGGBNP3O.js";import"./chunk-XBBEU2YL.js";import{a as xe}from"./chunk-C7AUMABW.js";import{a as he}from"./chunk-4SYJTDU2.js";import{a as A}from"./chunk-LH7AKJBU.js";import{a as fe}from"./chunk-M7VQHQXJ.js";import{b as pe,d as ue,e as _e,g as be}from"./chunk-BAGWPQZV.js";import{A as ke,D as J,c as z,g as $,h as P,j as H,l as W,m as K,x as G}from"./chunk-TZ2MW36L.js";import{a as T}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import{t as U}from"./chunk-MTKRVMUJ.js";import{c as ve}from"./chunk-SHTGYNA2.js";import{i as E,k as w,n as de,u as D}from"./chunk-4YERUHPX.js";import{Cc as me,Db as h,Ib as u,Jb as s,O as oe,Qa as ee,R as Z,Sb as B,Tb as c,Ub as v,Vb as I,Xa as l,Ya as f,Yb as V,Zb as q,_b as L,ac as C,bb as re,cb as ae,cc as g,da as y,ec as ce,ib as k,mb as m,na as _,oa as b,sb as le,tb as se,va as S,vb as N,wb as F,xb as n,ya as R,yb as o,zb as p}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";var Q=class i{constructor(t){this.elementRef=t}ngOnDestroy(){this.elementRef.nativeElement.remove()}static \u0275fac=function(e){return new(e||i)(f(R))};static \u0275cmp=y({type:i,selectors:[["app-admin-block-info"]],standalone:!0,features:[C],decls:6,vars:0,consts:[[1,"adminBlock__tit"],[1,"adminBlock__txt"]],template:function(e,a){e&1&&(n(0,"h3",0),c(1,` Bienvenido al gestor de bloques
2`),o(),n(2,"p",1),c(3,` Los bloques le permitir\xE1 personalizar las secciones de la plataforma territorial, podr\xE1 elegir entre bloques de accesos directos, banners, calendarios, contenidos, galer\xEDas de video e im\xE1genes, indicadores, mapas, perfiles de personas, widgets de redes sociales, que facilitar\xE1n la navegaci\xF3n de los ciudadanos.
3`),o(),n(4,"p",1),c(5,` Agregue bloques haciendo clic en el bot\xF3n \u201C+\u201D que se encuentra entre los bloques de la visualizaci\xF3n del gestor de bloques.
4`),o())}})};var X=i=>({active:i});function Ie(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",5),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Te permitir\xE1 editar un banner de diferentes proporciones con imagen o video. "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Ee(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",5),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Crear\xE1 un banner de diferentes proporciones con imagen o video \xFAsalo para mostrar informaci\xF3n que quieras destacar de tu entidad "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function we(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",9),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Te permitir\xE1 visualizar los contenidos globales que crea el superadministrador. "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function De(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",9),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Te permitir\xE1 colocar botones con un icono que dirigir\xE1n al usuario al enlace que desees. "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Te(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",9),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Te permitir\xE1 colocar botones con un icono que dirigir\xE1n al usuario al enlace que desees.... "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Ae(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",10),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Con este bloque podr\xE1 geolocalizar diferentes puntos en un mapa, para que los ciudadanos puedan saber exactamente el lugar del contenido que usted desee. "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Ne(i,t){if(i&1&&(n(0,"div",1)(1,"div",4)(2,"div",11),p(3,"span",12),o()(),n(4,"div",6)(5,"h2",7),c(6),o(),n(7,"div",8),c(8," Te permitir\xE1 ver en forma de calendario los eventos de tu entidad "),o()()()),i&2){let e=s();l(6),v(e.model.name||e.model.typeName)}}function Fe(i,t){if(i&1&&(n(0,"div",1)(1,"div",4)(2,"div",11),p(3,"span",13),o()(),n(4,"div",6)(5,"h2",7),c(6),o(),n(7,"div",8),c(8," Te permitir\xE1 visualizar un control que permitir\xE1 a los ciudadanos registrarse en la lista de correos de la entidad. "),o()()()),i&2){let e=s();l(6),v(e.model.name||e.model.typeName)}}function Ve(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",9),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Podr\xE1 crear un bloque mostrando sus redes sociales de Facebook, Twitter e Instagram a manera de Widgets, para mantener informados a los ciudadanos desde su Plataforma territorial. "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function qe(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",14),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Este control le permite mostrar los contenidos destacados de y podr\xE1 configurar si se muestran de forma animada o como tarjetas de contenido "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Le(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",14),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Este control le permite mostrar los contenidos de hasta tres secciones en un bloque, y en cada secci\xF3n podr\xE1 mostrar 5 contenidos de la misma "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Me(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",15),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Crear\xE1 bloque donde se podr\xE1 colocar informaci\xF3n de personas teniendo en cuenta su nombre, cargo, empresa, correo electr\xF3nico "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Oe(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",16),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Este control le permite colocar accesos a las 10 secciones m\xE1s vistas de la plataforma territorial, y se organizar\xE1n de la m\xE1s visitada hasta la menos visitada "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Re(i,t){if(i&1&&(n(0,"div",1)(1,"div",4),p(2,"span",16),o(),n(3,"div",6)(4,"h2",7),c(5),o(),n(6,"div",8),c(7," Este control le permite colocar el listado de contenidos asociados a la secci\xF3n "),o()()()),i&2){let e=s();l(5),v(e.model.name||e.model.typeName)}}function Ue(i,t){i&1&&(n(0,"div",22)(1,"span"),c(2,"Debes ingresar el nombre del bloque"),o()())}function je(i,t){i&1&&(n(0,"div",22)(1,"span"),c(2,"Debes seleccionar el tama\xF1o del banner"),o()())}function ze(i,t){if(i&1){let e=h();n(0,"div")(1,"label",23),c(2,"Tama\xF1o del banner"),o(),n(3,"p"),c(4," Elige la proporci\xF3n en que quieras que se vea este banner (Una vez selecciones una proporci\xF3n y cargues el primer banner no podr\xE1s cambiarla) "),o(),n(5,"div",24)(6,"button",25),u("click",function(){_(e);let r=s(2);return b(r.changeSize(1))}),n(7,"span"),c(8,"4:1 1200x300"),o(),n(9,"div",26),p(10,"i",27),o()(),n(11,"button",25),u("click",function(){_(e);let r=s(2);return b(r.changeSize(2))}),n(12,"span"),c(13,"3:1 1200x400"),o(),n(14,"div",26),p(15,"i",27),o()(),n(16,"button",25),u("click",function(){_(e);let r=s(2);return b(r.changeSize(3))}),n(17,"span"),c(18,"2:1 1200x600"),o(),n(19,"div",26),p(20,"i",27),o()(),n(21,"button",25),u("click",function(){_(e);let r=s(2);return b(r.changeSize(4))}
4),n(22,"span"),c(23,"4:3 1200x900"),o(),n(24,"div",26),p(25,"i",27),o()()(),n(26,"input",28),L("ngModelChange",function(r){_(e);let d=s(2);return q(d.model.json.size,r)||(d.model.json.size=r),b(r)}),o(),k(27,je,3,0,"div",20),o()}if(i&2){let e;s();let a=B(1),r=s();l(6),m("ngClass",g(6,X,r.model.json.size===1)),l(5),m("ngClass",g(8,X,r.model.json.size===2)),l(5),m("ngClass",g(10,X,r.model.json.size===3)),l(5),m("ngClass",g(12,X,r.model.json.size===4)),l(5),V("ngModel",r.model.json.size),l(),m("ngIf",!((e=a.form.get("size"))!=null&&e.valid)&&a.submitted)}}function $e(i,t){if(i&1){let e=h();n(0,"form",17,0),u("ngSubmit",function(){_(e);let r=B(1),d=s();return b(d.send(r))}),n(2,"div")(3,"p")(4,"label",18),c(5,"Nombre del bloque*"),o(),n(6,"span"),c(7,"100 caracteres"),o()(),n(8,"input",19),L("ngModelChange",function(r){_(e);let d=s();return q(d.model.name,r)||(d.model.name=r),b(r)}),o(),k(9,Ue,3,0,"div",20),o(),k(10,ze,28,14,"div",3),n(11,"div")(12,"button",21),c(13," Crear "),o()()()}if(i&2){let e,a=B(1),r=s();l(8),V("ngModel",r.model.name),l(),m("ngIf",!((e=a.form.get("name"))!=null&&e.valid)&&a.submitted),l(),m("ngIf",r.model.blockTypeID===2),l(2),m("disabled",r.formIsBusy)}}function Pe(i,t){if(i&1){let e=h();n(0,"div")(1,"button",29),u("click",function(){_(e);let r=s();return b(r.edit())}),c(2," Editar "),o()()}}var M=class i{constructor(t,e,a){this.blocksService=t;this.helperService=e;this.elementRef=a}goToeditBlock=new S;saveOrderBlock=new S;saveSortList=new S;block;model;relation;formIsBusy=!1;ngOnInit(){this.activate()}ngOnDestroy(){this.elementRef.nativeElement.remove()}activate(){this.model=this.block,this.model.json=JSON.parse(this.model.frame)}edit(){this.goToeditBlock.emit({type:this.model.blockTypeID,blockID:this.model.blockID})}changeSize(t){this.model.json.size=t}send(t){t.valid&&!this.formIsBusy&&(this.formIsBusy=!0,this.model.blockTypeID===2&&(this.model.frame=JSON.stringify(this.model.json)),this.blocksService.add(this.model).pipe(oe(e=>(this.relation={blockID:e.blockID,order:0,status:0,tagID:this.model.tagID,type:this.model.tagID?1:0},this.blocksService.addRelation(this.relation))),Z(()=>{this.saveOrderBlock.emit(this.relation.blockID),this.saveSortList.emit(this.relation.blockID)}),Z(()=>{this.elementRef.nativeElement.remove(),this.goToeditBlock.emit({type:this.model.blockTypeID,blockID:this.relation.blockID}),this.elementRef.nativeElement.remove()})).subscribe({next:e=>console.log(e),error:e=>{this.formIsBusy=!1,this.helperService.handlerException(e)}}))}static \u0275fac=function(e){return new(e||i)(f(A),f(T),f(R))};static \u0275cmp=y({type:i,selectors:[["app-admin-block-update"]],outputs:{goToeditBlock:"goToeditBlock",saveOrderBlock:"saveOrderBlock",saveSortList:"saveSortList"},standalone:!0,features:[C],decls:17,vars:3,consts:[["form","ngForm"],[1,"adminBlock-innerEdit"],["novalidate","","name","form",3,"ngSubmit",4,"ngIf"],[4,"ngIf"],[1,"adminBlock-wIconSec"],[1,"icon-banner-hero"],[1,"adminBlock-wTextSec"],[1,"adminBlock__tit"],[1,"adminBlock__txt"],[1,"icon-accesos-directos"],[1,"icon-mapa"],[1,"adminBlock-fixIcon"],[1,"icon-calendar"],[1,"icon-mail"],[1,"icon-contenidos-secciones"],[1,"icon-personas"],[1,"icon-secciones-visitadas"],["novalidate","","name","form",3,"ngSubmit"],[1,"adminBlock__label","adminBlock__label--line"],["autocomplete","off","required","","aria-required","true","type","text","name","name","maxlength","100",3,"ngModelChange","ngModel"],["class","error",4,"ngIf"],["type","submit",1,"btn-main-2","btn-main-2--adminBlock",3,"disabled"],[1,"error"],[1,"adminBlock__label","mt30"],[1,"adminBlock-wBtnBanner"],["type","button",3,"click","ngClass"],[1,"adminBlock-bannerCheck"],[1,"icon-check"],["type","hidden","name","size","required","","aria-required","true",3,"ngModelChange","ngModel"],[1,"btn-main-2","btn-main-2--adminBlock",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div"),k(1,Ie,8,1,"div",1)(2,Ee,8,1,"div",1)(3,we,8,1,"div",1)(4,De,8,1,"div",1)(5,Te,8,1,"div",1)(6,Ae,8,1,"div",1)(7,Ne,9,1,"div",1)(8,Fe,9,1,"div",1)(9,Ve,8,1,"div",1)(10,qe,8,1,"div",1)(11,Le,8,1,"div",1)(12,Me,8,1,"div",1)(13,Oe,8,1,"div",1)(14,Re,8,1,"div",1),o(),k(15,$e,14,4,"form",2)(16,Pe,3,0,"div",3)),e&2){let r;l(),le((r=a.model.blockTypeID)===1?1:r===2?2:r===3?3:r===6?4:r===7?5:r===9?6:r===19?7:r===10?8:r===11?9:r===12?10:r===13?11:r===14?12:r===18?13:r===17?14:-1),l(14),m("ngIf",!a.model.isUnique&&!a.model.blockID),l(),m("ngIf",a.model.isEditable)}},dependencies:[D,E,w,J,K,z,$,P,G,ke,W,H]})};var We=(i,t)=>t.blockID,ne=i=>({active:i});function Ke(i,t){if(i&1){let e=h();n(0,"li",9)(1,"div",11),u("click",function(){let r=_(e).$implicit,d=s(2);return b(d.selectBlock(r))}),p(2,"span",12),o(),n(3,"div",13),u("click",function(){let r=_(e).$implicit,d=s(2);return b(d.selectBlock(r))}),n(4,"button",14),u("click",function(){let r=_(e).$implicit,d=s(2);return b(d.selectBlock(r))}
4),c(5),o(),p(6,"app-helper",15),n(7,"p"),c(8),o()()()}if(i&2){let e=t.$implicit,a=s(2);m("ngClass",g(5,ne,e.blockTypeID===a.model.blockTypeID)),l(5),I(" ",e.name," "),l(),m("key",a.getToolTipID(e.blockTypeID))("classname","toolTip-btn toolTip__adminBlock"),l(2),v(e.description)}}function Ge(i,t){i&1&&(n(0,"div",16)(1,"span"),c(2,"Debes seleccionar el tipo de bloque para la creaci\xF3n"),o()())}function Je(i,t){if(i&1){let e=h();n(0,"div")(1,"form",5,0),u("ngSubmit",function(){_(e);let r=s();return b(r.send())}),n(3,"h2",6),c(4,"Selecciona un tipo de bloque"),o(),n(5,"div")(6,"input",7),L("ngModelChange",function(r){_(e);let d=s();return q(d.model.blockTypeID,r)||(d.model.blockTypeID=r),b(r)}),o(),n(7,"ul",8),N(8,Ke,9,7,"li",9,se),o(),k(10,Ge,3,0,"div",10),o()()()}if(i&2){let e,a=B(2),r=s();l(6),V("ngModel",r.model.blockTypeID),l(2),F(r.newBlocks),l(2),m("ngIf",!((e=a.form.get("blockTypeID"))!=null&&e.valid)&&a.submitted)}}function Qe(i,t){i&1&&(n(0,"h2"),c(1," Todavia no hay bloques creados que puedas utilizar "),o())}function Xe(i,t){if(i&1){let e=h();n(0,"button",24),u("click",function(){_(e);let r=s(),d=r.$implicit,x=r.$index,O=s(3);return b(O.remove(d,x))}),p(1,"i",25),o()}}function Ye(i,t){if(i&1){let e=h();n(0,"li")(1,"div",20)(2,"span",21),c(3),o(),n(4,"span"),c(5),o()(),n(6,"div",20)(7,"button",22),u("click",function(){let r=_(e).$implicit,d=s(3);return b(d.selectBlockExists(r))}),c(8," Elegir "),o(),k(9,Xe,2,0,"button",23),o()()}if(i&2){let e=t.$implicit;l(3),I(" ",e.name,""),l(2),v(e.typeName),l(4),m("ngIf",!e.isUnique)}}function Ze(i,t){if(i&1&&(n(0,"form",18,1)(2,"h2",6),c(3,"Selecciona un tipo de bloque"),o(),n(4,"ul",19),N(5,Ye,10,3,"li",null,We),o()()),i&2){let e=s(2);l(5),F(e.addBlocks)}}function et(i,t){if(i&1&&(n(0,"div"),k(1,Qe,2,0,"h2",4)(2,Ze,7,0,"form",17),o()),i&2){let e=s();l(),m("ngIf",e.addBlocks.length===0),l(),m("ngIf",e.addBlocks.length>0)}}var Y=class i{constructor(t,e,a,r){this.blocksService=t;this.helperService=e;this.settingService=a;this.modalService=r}saveOrderBlock=new S;setNewBlock=new S;model;newBlocks;addBlocks;tabType="creation";formIsBusy;formExistsIsBusy=!1;relation;isBusy;ngOnInit(){this.activate()}activate(){this.model.status=1,this.bindLibrary()}bindLibrary(){var t=this.model.tagID?{tagID:this.model.tagID}:{};this.blocksService.getLibrary(t).subscribe({next:e=>{this.newBlocks=e.filter(r=>r.blockID===null);var a=this.newBlocks.firstOrDefault("blockTypeID",19);a&&(a.description="Te permitir\xE1 ver en forma de calendario los eventos de tu entidad"),this.addBlocks=e.filter(r=>r.blockID!==null)},error:e=>this.helperService.handlerException(e)})}changeTab(t){this.tabType=t}getToolTipID(t){switch(t){case 6:return 7;case 19:return 11;case 13:return 8;case 2:return 6;case 9:return 10;case 14:return 9;case 11:return 12;default:return 0}}send(){this.formIsBusy=!0,this.bindFrame(),this.setNewBlock.emit(this.model)}bindFrame(){switch(this.model.blockTypeID){case 2:this.model.frame='{"size":1,"carousel":false,"rotation":0}';break;case 16:this.model.frame='{"text":""}';break;case 11:this.model.frame='{"facebook":"","twitter":"","instagram":""}';break;case 14:this.model.frame='{"name":true,"description":true,"position":true,"company":true,"url":true,"email":true,"image":true,"color":"'+this.getCurrentTheme(!0)+'"}';break;case 9:this.model.frame='{"zoom":5,"latitude":4.096630,"longitude":-73.283199,"color":"'+this.getCurrentTheme(!0)+'"}';break;case 13:this.model.frame='{"titleExists":true,"numberSections":null,"numberContents":5,"sections":[],"contentOrder":"Recent","color":"'+this.getCurrentTheme(!1)+'"}';break;case 18:this.model.frame='{"color":"'+this.getCurrentTheme(!0)+'"}';break;case 6:this.model.frame='{"color":"'+this.getCurrentTheme(!0)+'"}';break;case 12:this.model.frame='{"color":"'+this.getCurrentTheme(!1)+'","rotation":0}';break;default:this.model.frame="{}";break}}getCurrentTheme(t){switch(this.settingService.settings.general.themeSite){case"theme2":return t?"tema-3":"tema-4";case"theme3":return t?"tema-5":"tema-6";case"theme4":return t?"tema-7":"tema-8";case"theme5":return t?"tema-9":"tema-10";case"theme6":return t?"tema-11":"tema-12";case"theme7":return t?"tema-13":"tema-14";default:return t?"tema-1":"tema-2"}}sendExists(){this.model.blockID&&!this.formExistsIsBusy&&(this.formExistsIsBusy=!0,this.relation={blockID:this.model.blockID,order:0,status:0,tagID:this.model.tagID,type:this.model.tagID?1:0},this.blocksService.addRelation(this.relation).subscribe({next:()=>{this.saveOrderBlock.emit(this.relation.blockID)},error:t=>{this.formExistsIsBusy=!1,this.helperService.handlerException(t)}}))}selectBlock(t){this.model.blockTypeID=t.blockTypeID,this.model.typeName=t.name,this.send()}selectBlockExists(t){this.model.blockID=t.blockID,this.sendExists()}remove(t,e){this.isBusy||this.modalService.showConfirm('Al eliminar el bloque "'+t.name+'" se eliminar\xE1 de todas las secciones donde se encuentre. \xBFDeseas continuar?').subscribe(a=>{a&&(this.isBusy=!this.isBusy,this.blocksService.remove(t).subscribe({next:()=>{this.isBusy=!this.isBusy,this.addBlocks.splice(e,1)},error:r=>{this.isBusy=!this.isBusy,this.helperService.handlerException(r)}}))})}static \u0275fac=function(e){return new(e||i)(f(A),f(T),f(ve),f(U))};static \u0275cmp=y({type:i,selectors:[["app-admin-block-library"]],outputs:{saveOrderBlock:"saveOrderBlock",setNewBlock:"setNewBlock"},standalone:!0,features:[C],decls:7,vars:8,consts:[["form","ngForm"],["formExists","ngForm"],[1,"adminBlock-wBtnNew"],[3,"click","ngClass"],[4,"ngIf"],["novalidate","","name","form",3,"ngSubmit"],[1,"adminBlock__tit"],["type","hidden","required","","aria-required","true","name","blockTypeID",3,"ngModelChange","ngModel"],[1,"adminBlock-wKind"],[1,"curs
4or-pointer",3,"ngClass"],["class","error",4,"ngIf"],[1,"adminBlock-imgKind",3,"click"],[1,"icon-banner-hero"],[1,"adminBlock-colKind",3,"click"],["type","button",1,"adminBlock__nameKind",3,"click"],[3,"key","classname"],[1,"error"],["novalidate","","name","formExists",4,"ngIf"],["novalidate","","name","formExists"],[1,"adminBlock-wCreate"],[1,"adminBlock-colCreate"],[1,"adminBlock__nameKind"],[1,"btn-main-2",3,"click"],["type","button",3,"click",4,"ngIf"],["type","button",3,"click"],[1,"icon-icon-68"]],template:function(e,a){e&1&&(n(0,"div",2)(1,"button",3),u("click",function(){return a.changeTab("creation")}),c(2," Nuevo bloque "),o(),n(3,"button",3),u("click",function(){return a.changeTab("library")}),c(4," Bloques creados "),o()(),k(5,Je,11,2,"div",4)(6,et,3,2,"div",4)),e&2&&(l(),m("ngClass",g(4,ne,a.tabType==="creation")),l(2),m("ngClass",g(6,ne,a.tabType==="library")),l(2),m("ngIf",a.tabType==="creation"),l(),m("ngIf",a.tabType==="library"))},dependencies:[D,E,w,j,J,K,z,$,P,G,W,H]})};var tt=(i,t)=>t.blockID,it=(i,t,e)=>({active:i,new:t,"block-inactive":e});function nt(i,t){if(i&1&&(n(0,"div",23)(1,"div",3)(2,"a",24),p(3,"img",25),o()()()),i&2){let e=s();m("ngStyle",e.topBar),l(2),m("href",e.linkAccess,ee),l(),m("src",e.logoTopBar,ee)}}function ot(i,t){if(i&1){let e=h();n(0,"li",18)(1,"button",33),u("click",function(){_(e);let r=s().$index,d=s();return b(d.add(r))}),p(2,"span",20),o()()}if(i&2){let e=s(2);l(),m("disabled",e.isBusy)}}function rt(i,t){if(i&1){let e=h();n(0,"button",33),u("click",function(){_(e);let r=s().$index,d=s();return b(d.sort(r,-1))}),p(1,"i",38),o()}if(i&2){let e=s(2);m("disabled",e.isBusy)}}function at(i,t){if(i&1){let e=h();n(0,"button",33),u("click",function(){_(e);let r=s().$index,d=s();return b(d.sort(r,1))}),p(1,"i",39),o()}if(i&2){let e=s(2);m("disabled",e.isBusy)}}function lt(i,t){if(i&1&&(n(0,"span"),c(1),o()),i&2){let e=s().$index,a=s();l(),I(" ",e+(a.indexNew>e||a.indexNew===-1?2:1)," ")}}function st(i,t){i&1&&p(0,"i",42)}function ct(i,t){i&1&&p(0,"i",43)}function mt(i,t){if(i&1){let e=h();n(0,"button",19),u("click",function(){_(e);let r=s().$implicit,d=s();return b(d.changeStatus(r))}),k(1,st,1,0,"i",40)(2,ct,1,0,"i",41),o()}if(i&2){let e=s().$implicit,a=s();m("disabled",a.isBusy),l(),m("ngIf",e.status!==1),l(),m("ngIf",e.status===1)}}function dt(i,t){if(i&1){let e=h();n(0,"button",19),u("click",function(){_(e);let r=s().$implicit,d=s();return b(d.edit(r))}),p(1,"i",44),o()}if(i&2){let e=s(2);m("disabled",e.isBusy)}}function pt(i,t){if(i&1){let e=h();n(0,"button",19),u("click",function(){_(e);let r=s(),d=r.$implicit,x=r.$index,O=s();return b(O.remove(d,x))}),p(1,"i",45),o()}if(i&2){let e=s(2);m("disabled",e.isBusy)}}function ut(i,t){if(i&1){let e=h();n(0,"button",19),u("click",function(){_(e);let r=s(2);return b(r.cleanNew())}),p(1,"i",46),o()}if(i&2){let e=s(2);m("disabled",e.isBusy)}}function _t(i,t){if(i&1){let e=h();n(0,"div",17),k(1,ot,3,1,"li",26),n(2,"li",27)(3,"div",28),k(4,rt,2,1,"button",29)(5,at,2,1,"button",29),o(),n(6,"div",30),k(7,lt,2,1,"span",31),o(),n(8,"div",32)(9,"button",33),u("click",function(){let r=_(e).$implicit,d=s();return b(d.get(r))}),n(10,"div",34),c(11),o(),n(12,"div",35),c(13),o()()(),n(14,"div",36),k(15,mt,3,3,"button",37)(16,dt,2,1,"button",37)(17,pt,2,1,"button",37)(18,ut,2,1,"button",37),o()()()}if(i&2){let e=t.$implicit,a=t.$index,r=t.$index,d=t.$count,x=s();l(),m("ngIf",x.filter.tagID||a!==0),l(),m("ngClass",ce(12,it,(x.blockSelected==null?null:x.blockSelected.blockID)===e.blockID,!e.blockID,e.status===0)),l(2),m("ngIf",e.blockID&&e.type!==1&&(a>1&&!x.filter.tagID||r!==0&&x.filter.tagID)),l(),m("ngIf",e.blockID&&e.type!==1&&r!==d-1),l(2),m("ngIf",e.blockID),l(2),m("disabled",x.isBusy),l(2),v(e.name),l(2),v(e.typeName),l(2),m("ngIf",e.blockID&&!e.isRequired||e.blockID==4),l(),m("ngIf",e.blockID&&e.isEditable),l(),m("ngIf",e.blockID&&!e.isRequired),l(),m("ngIf",!e.blockID)}}var Se=class i{constructor(t,e,a,r,d,x,O,bt,vt){this.actRoute=t;this.tagService=e;this.helperService=a;this.router=r;this.modalService=d;this.blocksService=x;this.sharedSignalsService=O;
4this.viewContainerRef=bt;this.renderer=vt;me(()=>{this.gov=this.sharedSignalsService.gov(),this.topBar=this.sharedSignalsService.topBar(),this.linkAccess=this.sharedSignalsService.linkAccess(),this.logoTopBar=this.sharedSignalsService.logoTopBar()})}list=[];filter={};indexNew=-1;nameSection;tag;isBusy;blockSelected;gov;topBar;linkAccess;logoTopBar;ngOnInit(){this.activate()}activate(){this.filter.tagID=this.actRoute.snapshot.params.id,this.filter.tagID?this.tagService.getByFriendlyName(this.filter.tagID,!1).subscribe({next:t=>{this.tag=t,this.nameSection=this.tag.name},error:t=>this.helperService.handlerException(t)}):this.nameSection="Home",this.startComponent(),this.buildList()}cleanNew(){this.cleanNewBlocks(),this.close&&this.close(),this.startComponent()}preview(){this.tag?this.router.navigate(["tema/"+this.tag.friendlyName]):this.router.navigate(["/"])}startComponent(){this.close(),this.indexNew=-1,this.appendComponent(Q)}edit(t){switch(sessionStorage.setItem("blockID",t.blockID),t.type){case 1:this.router.navigate(["administrador/bannerlist"]);break;case 2:this.router.navigate(["administrador/bloques/"+t.blockID+"/banners/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 4:case 5:this.router.navigate(["administrador/bloques/"+t.blockID+"/globallogos/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 16:this.router.navigate(["administrador/bloques/"+t.blockID+"/texto/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 14:this.router.navigate(["administrador/bloques/"+t.blockID+"/personas/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 15:this.router.navigate(["administrador/bloques/"+t.blockID+"/indicadores/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 11:this.router.navigate(["administrador/bloques/"+t.blockID+"/redes/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 9:this.router.navigate(["administrador/bloques/"+t.blockID+"/mapa/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 6:this.router.navigate(["administrador/bloques/"+t.blockID+"/accesos/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 8:this.router.navigate(["administrador/bloques/"+t.blockID+"/galerias/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 12:this.router.navigate(["administrador/bloques/"+t.blockID+"/destacados/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 13:this.router.navigate(["administrador/bloques/"+t.blockID+"/contenidos/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 3:this.router.navigate(["administrador/bloques/"+t.blockID+"/contenidosglobales/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 7:this.router.navigate(["administrador/bloques/"+t.blockID+"/accesosglobales/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 18:this.router.navigate(["administrador/bloques/"+t.blockID+"/secciones/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 19:this.router.navigate(["administrador/bloques/"+t.blockID+"/calendario/"+(this.filter.tagID?this.filter.tagID:0)]);break;case 10:this.router.navigate(["administrador/bloques/"+t.blockID+"/newsletter/"+(this.filter.tagID?this.filter.tagID:0)]);break;default:break}}remove(t,e){this.isBusy||this.modalService.showConfirm('\xBFDeseas eliminar el bloque "'+t.name+'" de la secci\xF3n?').subscribe(a=>{a&&(this.isBusy=!this.isBusy,this.blocksService.removeRelation(t).subscribe({next:r=>{this.isBusy=!this.isBusy,this.list.splice(e,1),this.close(),this.cleanNew()},error:r=>{this.isBusy=!this.isBusy,this.helperService.handlerException(r)}}))})}buildList(t){t&&this.close(),this.blocksService.all(this.filter).subscribe({next:e=>{if(this.list=e,window.sessionStorage.getItem("blockID")){var a=parseInt(sessionStorage.getItem("blockID")),r=this.list.firstOrDefault("blockID",a);r&&this.get(r),window.sessionStorage.removeItem("blockID")}},error:e=>this.helperService.handlerException(e)})}get(t){t.blockID&&this.blocksService.get(+t.blockID).subscribe({next:e=>{e.blockTypeID===10&&(e.isEditable=!0),this.cleanNewBlocks(),this.blockSelected=e,this.close();let a=this.viewContainerRef.createComponent(M);a.instance.block=this.blockSelected,a.instance.goToeditBlock.subscribe(d=>this.edit(d)),a.instance.saveOrderBlock.subscribe(d=>this.saveOrderBlock(d)),a.instance.saveSortList.subscribe(()=>this.saveSortList().subscribe());let r=document.getElementById("section-principal");this.renderer.appendChild(r,a.location.nativeElement)},error:e=>this.helperService.handlerException(e)})}setNewBlock(t){this.blockSelected=t,this.close();let e=this.viewContainerRef.createComponent(M);e.instance.block=this.blockSelected,e.instance.goToeditBlock.subscribe(r=>this.edit(r)),e.instance.saveOrderBlock.subscribe(r=>this.saveOrderBlock(r)),e.instance.saveSortList.subscribe(()=>this.saveSortList().subscribe());let a=document.getElementById("section-principal");this.renderer.appendChild(a,e.location.nativeElement)}add(t){this.cleanNewBlocks(),this.list.splice(t,0,{name:"Nuevo bloque"}),this.callLibrary(),this.indexNew=t}cleanNewBlocks(){this.indexNew=-1,this.blockSelected=null;for(var t=0;t<this.list.length;t++)this.list[t].blockID||this.list.splice(t,1)}callLibrary(){this.close();let t=this.viewContainerRef.createComponent(Y);t.instance.model={tagID:this.filter.tagID},t.instance.saveOrderBlock.subscribe(a=>{this.saveOrderBlock(a),this.saveSortList().subscribe({next:()=>{this.buildList(!0),this.startComponent()}})}),t.instance.setNewBlock.subscribe(a=>this.setNewBlock(a));let e=document.getElementById("section-principal");this.renderer.appendChild(e,t.location.nativeElement)}sort(t,e){if(!this.isBusy){var a=t+e;if(t!==a){var r=this.list[t];this.list.splice(t,1),this.list.splice(a,0,r)}this.isBusy=!0,this.saveSortList().subscribe(()=>this.isBusy=!1)}}saveSortList(){var t={};return t.tagID=this.filter.tagID,t.identifiers=this.list.map((e,a)=>({blockID:e.blockID,order:a})),this.blocksService.sort(t)}addComponent(t){this.close(),this.appendComponent(t)}appendComponent(t){let e=this.viewContainerRef.createComponent(t),a=document.getElementById("section-principal");this.renderer.appendChild(a,e.location.nativeElement)}changeStatus(t){var e=t.status===1?0:1;if(e===1&&this.list.filter(a=>a.status===1).length>=13){this.modalService.showAlert("No puedes activar m\xE1s de 13 bloques en una secci\xF3n");return}this.isBusy||(this.isBusy=!this.isBusy,t.status=e,this.blocksService.updateRelation(t).subscribe({next:()=>this.isBusy=!this.isBusy,error:a=>{this.isBusy=!this.isBusy,this.helperService.handlerException(a)}}))}saveOrderBlock(t){for(var e=0;e<this.list.length;e++)if(!this.list[e].blockID){this.list[e].blockID=t;break}}close(){this.viewContainerRef.clear()}static \u0275fac=function(e){return new(e||i)(f(pe),f(xe),f(T),f(ue),f(U),f(A),f(fe),f(ae),f(re))};static \u0275cmp=y({type:i,selectors:[["app-admin-blocks"]],standalone:!0,features:[C],decls:35,vars:6,consts:[[1,"inner-header"],["class","header-top",3,"ngStyle",4,"ngIf"],[1,"header-nav"],[1,"content_all"],[1,"btn-back",3,"click"],[1,"icon-prev"],[1,"btn-back-txt"],[1,"logo"],["routerLink","/"],[1,"main-col","adminBlock-wrap"],[1,"adminBlock-col"],[1,"adminBlock-wBtn"],[1,"adminBlock-row","adminBlock-row--head"],[3,"key","classname"],[3,"click"],[1,"icon-preview-block"],[1,"mt10"],[1,"adminBlock-wRow"],[1,"adminBlock-row-separator"],["type","button",3,"click","disabled"],[1,"icon-icon-7"],[1,"adminBlock-row","adminBlock-row--foot"],["id","section-principal",1,"adminBlock-col"],[1,"header-top",3,"ngStyle"],["target","_blank",1,"header-linkWrap",3,"href"],["alt","",1,"header-logoGov",3,"src"],["class","adminBlock-row-separator",4,"ngIf"],[1,"adminBlock-row",3,"ngClass"],[1,"adminBlock-row-updown"],["class","adminBlock-fixDisable","type","button",3,"disabled","click",4,"ngIf"],[1,"adminBlock-row-number"],[4,"ngIf"],[1,"adminBlock-row-text"],["type","button",1,"adminBlock-fixDisable",3,"click","disabled"],[1,"adminBlock-row-text-name"],[1,"adminBlock-row-text-type"],[1,"adminBlock-row-options"],["type","button",3,"disabled","click",4,"ngIf"],[1,"icon-icon-8"],[1,"icon-icon-9"],["class","icon-visibility",4,"ngIf"],["class","icon-visibility-on",4,"ngIf"],[1,"icon-visibility"],[1,"icon-visibility-on"],[1,"icon-edit"],[1,"icon-icon-68"],[1,"icon-close"]],template:function(e,a){e&1&&(n(0,"header",0),k(1,nt,4,3,"div",1),n(2,"div",2)(3,"div",3)(4,"a",4),u("click",function(){return a.preview()}),p(5,"span",5),n(6,"span",6),c(7,"Salir"),o()(),n(8,"h2",7)(9,"a",8)(10,"span"),c(11),o()()(),p(12,"div"),o()()(),p(13,"app-admin-desktop"),n(14,"content",9)(15,"aside",10)(16,"ul",11)(17,"li",12)(18,"div"),c(19," 1 Header "),p(20,"app-helper",13),o(),n(21,"button",14),u("click",function(){return a.preview()}),p(22,"i",15),o()(),p(23,"div",16),N(24,_t,19,16,"div",17,tt),n(26,"li",18)(27,"button",19),u("click",function(){return a.add(a.list.length)}),p(28,"span",20),o()(),n(29,"li",21)(30,"div")(31,"b"),c(32),o(),c(33," Footer "),o()()()(),p(34,"section",22),o()),e&2&&(l(),m("ngIf",a.gov==null?null:a.gov.isActive),l(10),I(" Gesti\xF3n de bloques / ",a.nameSection," "),l(9),m("key",14)("classname","toolTip-btn toolTip__adminBlock"),l(4),F(a.list),l(3),m("disabled",a.isBusy),l(5),v(a.list.length+(a.indexNew===-1?2:1)))},dependencies:[D,E,w,de,be,_e,j,he],styles:[".adminBlock-row.new[_ngcontent-%COMP%]{background-color:#3b76fb}.adminBlock-row.new[_ngcontent-%COMP%]   .adminBlock-row-text-name[_ng
4content-%COMP%]{color:#fff}.adminBlock-row.new[_ngcontent-%COMP%]   .adminBlock-row-options[_ngcontent-%COMP%]{display:flex!important}.adminBlock-row.new[_ngcontent-%COMP%]   .adminBlock-row-options[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:#fff}"]})};export{Se as AdminBlocksComponent};

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.