PageSourceSearch

https://lacumbre-valle.gov.co/chunk-A7ZIL3OI.js

js lacumbre-valle.gov.co collected 2026-09-25 11:57:17 UTC 8,997 bytes, 1 lines download raw bytes

1import{a as ne}from"./chunk-JZMNR7QN.js";import{a as le}from"./chunk-EOEOCEUL.js";import{a as re}from"./chunk-4SYJTDU2.js";import{a as oe}from"./chunk-LH7AKJBU.js";import{a as $}from"./chunk-M7VQHQXJ.js";import{b as C,g as O}from"./chunk-BAGWPQZV.js";import{A as ee,C as te,E as ie,b as G,c as L,e as h,g as J,h as P,m as W,o as z,q as K,r as Q,s as U,t as X,u as Y,x as Z}from"./chunk-TZ2MW36L.js";import{a as H}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import{t as R}from"./chunk-MTKRVMUJ.js";import"./chunk-SHTGYNA2.js";import{j as M,k as q,u as w}from"./chunk-4YERUHPX.js";import{B as A,Cc as N,Db as V,Ib as _,Jb as u,Nb as x,Tb as a,Vb as E,Xa as l,Ya as f,ac as j,da as T,ib as d,mb as m,na as b,oa as S,ob as D,p as F,rb as k,v as I,xb as i,yb as n,zb as v}from"./chunk-DQGQ5ICO.js";import{a as B,b as y}from"./chunk-4IDNTCH7.js";function me(o,t){o&1&&(i(0,"span"),a(1,"Debes ingresar el nombre del bloque"),n())}function ce(o,t){if(o&1&&(i(0,"div",31),d(1,me,2,0,"span",14),n()),o&2){let e,r=u(2);l(),m("ngIf",(e=r.form.get("name"))==null?null:e.hasError("required"))}}function se(o,t){if(o&1&&(i(0,"option",32),a(1),n()),o&2){let e=t.$implicit;m("value",e.tagID),l(),E(" ",e.name," ")}}function de(o,t){o&1&&(i(0,"span"),a(1,"Debes ingresar el t\xEDtulo"),n())}function ue(o,t){if(o&1&&(i(0,"div",31),d(1,de,2,0,"span",14),n()),o&2){let e,r=u(3);l(),m("ngIf",(e=r.form.get("title"))==null?null:e.hasError("required"))}}function pe(o,t){if(o&1&&(i(0,"div")(1,"label",33),a(2,"T\xEDtulo que lleva esta secci\xF3n"),n(),v(3,"input",34),d(4,ue,2,1,"div",8),n()),o&2){let e,r=u(2);l(4),m("ngIf",((e=r.form.get("title"))==null?null:e.invalid)&&((e=r.form.get("title"))==null?null:e.touched))}}function ve(o,t){if(o&1&&(i(0,"option",35),a(1),n()),o&2){let e=t.$implicit;m("ngValue",e.id),l(),E(" ",e.value," ")}}function fe(o,t){if(o&1&&(i(0,"li"),v(1,"input",36),i(2,"label",37),a(3,"T"),n()()),o&2){let e,r=t.$implicit,c=u(2);D("selected",((e=c.form.get("color"))==null?null:e.value)===r.value),l(),x("id","lbl-",r.siteThemesID,""),m("value",r.value),l(),k("theme-select ",r.value,""),x("for","lbl-",r.siteThemesID,"")}}function _e(o,t){o&1&&(i(0,"span"),a(1,"Debes seleccionar uno de los temas"),n())}function he(o,t){if(o&1&&(i(0,"div",31),d(1,_e,2,0,"span",14),n()),o&2){let e,r=u(2);l(),m("ngIf",(e=r.form.get("color"))==null?null:e.hasError("required"))}}function ge(o,t){if(o&1){let e=V();i(0,"div",2)(1,"div",3),v(2,"div",4),i(3,"form",5),_("ngSubmit",function(){b(e);let c=u();return S(c.send())}),i(4,"p")(5,"label",6),a(6,"Nombre del bloque"),n(),i(7,"span"),a(8," 30 caracteres..."),n()(),i(9,"div"),v(10,"input",7),d(11,ce,2,1,"div",8),n(),i(12,"h2",9),a(13,"Secci\xF3n de bloque"),n(),i(14,"p",10)(15,"input",11),_("change",function(){b(e);let c=u();return S(c.updateTitleValidation())}),n(),i(16,"label"),a(17," Habilitar t\xEDtulo (Este mostrar\xE1 el t\xEDtulo del bloque)"),n()(),i(18,"div")(19,"label"),a(20,"Elige la secci\xF3n"),n(),i(21,"select",12),d(22,se,2,2,"option",13),n()(),d(23,pe,5,1,"div",14),i(24,"p",15)(25,"input",16),_("change",function(c){b(e);let p=u();return S(p.onCheckboxChange(c))}),n(),i(26,"label",17),a(27," Ocultar en muro de contenidos"),n()(),i(28,"div")(29,"p",4)(30,"label",18),a(31,"Duraci\xF3n de rotaci\xF3n"),n(),i(32,"span"),a(33,"Define los segundos que durar\xE1 la rotaci\xF3n de cada contenido"),n()(),i(34,"select",19),d(35,ve,2,2,"option",20),n()(),i(36,"div",4)(37,"h2",21),a(38,"Elige un tema"),n(),i(39,"div",22)(40,"div")(41,"div",23),v(42,"span",24),n(),i(43,"div",23),v(44,"div"),i(45,"div")(46,"b"),a(47,"T\xEDtulo"),n()(),i(48,"div"),a(49,"Descripci\xF3n"),n()()(),i(50,"ul",25),d(51,fe,4,10,"li",26),n()(),d(52,he,2,1,"div",8),n(),i(53,"div")(54,"button",27),v(55,"span",28),a(56," Guardar "),n(),i(57,"button",29),_("click",function(){b(e);let c=u();return S(c.back())}),v(58,"span",30),a(59,"Cancelar "),n()()()()()}if(o&2){let e,r,c,p,g,s=u();l(3),m("formGroup",s.form),l(8),m("ngIf",((e=s.form.get("name"))==null?null:e.invalid)&&((e=s.form.get("name"))==null?null:e.touched)),l(11),m("ngForOf",s.menuOptions),l(),m("ngIf",(r=s.form.get("titleExists"))==null?null:r.value),l(2),m("checked",(c=s.form.get("ocultarEnMuro"))==null?null:c.value),l(9),m("disabled",s.form.value.isBusy),l(),m("ngForOf",s.seconds),l(5),k("",(p=s.form.get("color"))==null?null:p.value," adminBlock-setDestacada"),l(11),m("ngForOf",s.themes),l(),m("ngIf",((g=s.form.get("color"))==null?null:g.invali
1d)&&((g=s.form.get("color"))==null?null:g.touched)),l(2),m("disabled",s.form.value.isBusy),l(3),m("disabled",s.form.value.isBusy)}}var ae=class o{constructor(t,e,r,c,p,g,s,be){this.fb=t;this.route=e;this.helperService=r;this.blocksService=c;this.modalService=p;this.menuService=g;this.sharedSignalsService=s;this.activatedRoute=be;N(()=>{this.gov=this.sharedSignalsService.gov(),this.topBar=this.sharedSignalsService.topBar(),this.linkAccess=this.sharedSignalsService.linkAccess(),this.logoTopBar=this.sharedSignalsService.logoTopBar(),this.headerTitle=this.sharedSignalsService.headerTitle()})}block={};filter={};menuOptions=[];seconds=[];form;themes;gov;topBar;linkAccess;logoTopBar;headerTitle;formBusy=!1;ngOnInit(){this.bindSeconds(),this.activate()}back(){this.blocksService.goBack(this.activatedRoute.snapshot.params)}bindSeconds(){for(let t=0;t<31;t++)t===0?this.seconds.push({id:t,value:"Sin rotaci\xF3n"}):t>9&&this.seconds.push({id:t,value:`${t} ${t===1?"segundo":"segundos"}`})}activate(){let t=this.route.snapshot.params.id;I([this.blocksService.get(t),this.menuService.menuFind(this.filter),this.blocksService.getThemes("1")]).subscribe(([e,r,c])=>{e&&(this.block=e,this.block.json=JSON.parse(e.frame||"{}"),this.block.json.tagID=this.block.json.tagID||null,this.block.json.rotation=this.block.json.rotation>=10?this.block.json.rotation:0,this.buildForm()),c&&(this.themes=c),r&&(this.menuOptions.push({tagID:null,name:"Home"}),r.forEach(p=>{this.menuOptions.push({tagID:p.tagID,name:`Home / ${p.parentName?p.parentName+" / ":""}${p.name}`})}))})}buildForm(){this.form=this.fb.group({name:[this.block.name,[h.required,h.maxLength(30)]],title:[this.block.json.title],color:[this.block.json.color,h.required],tagID:[this.block.json.tagID],titleExists:[this.block.json.titleExists],rotation:[this.block.json.rotation],ocultarEnMuro:[0]})}onCheckboxChange(t){let e=t.target;e&&this.form.get("ocultarEnMuro")?.setValue(e.checked?1:0)}send(){if(this.form.valid&&!this.formBusy){this.formBusy=!0;let t=this.form.value;this.block.name=t.name,this.block.tagID=t.tagID,this.block.json=y(B({},this.block.json),{title:t.title,color:t.color,tagID:t.tagID,titleExists:t.titleExists,rotation:t.rotation,ocultarEnMuro:t.ocultarEnMuro}),this.block.frame=JSON.stringify(this.block.json),this.blocksService.update(this.block).pipe(F(()=>{this.modalService.showExit(`Bloque "${this.block.name}" actualizado`)}),A(e=>(this.formBusy=!1,this.helperService.handlerException(e),[]))).subscribe()}else this.form.markAllAsTouched()}updateTitleValidation(){this.form.value.titleExists?this.form.controls.title.setValidators([h.required,h.maxLength(30)]):this.form.controls.title.clearValidators(),this.form.controls.title.updateValueAndValidity()}static \u0275fac=function(e){return new(e||o)(f(te),f(C),f(H),f(oe),f(R),f(ne),f($),f(C))};static \u0275cmp=T({type:o,selectors:[["app-admin-block-featured"]],standalone:!0,features:[j],decls:3,vars:1,consts:[[3,"backEvent"],["class","wrap-editW",4,"ngIf"],[1,"wrap-editW"],[1,"content_all"],[1,"mt40"],[3,"ngSubmit","formGroup"],["for","name",1,"adminBlock__label","adminBlock__label--line"],["id","name","type","text","formControlName","name","maxlength","30","required","","aria-required","true"],["class","error",4,"ngIf"],[1,"mt20","adminBlock__subTit"],[1,"adminBlock-wLine"],["type","checkbox","formControlName","titleExists",3,"change"],["formControlName","tagID"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"adminBlock-wLine","mt10"],["id","inp-enabled-title","type","checkbox",3,"change","checked"],["for","inp-enabled-title"],[1,"adminBlock__label","adminBlock__label--line"],["formControlName","rotation",1,"setBanner__sel",3,"disabled"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"adminBlock__subTit"],[1,"adminBlock-wSetDestacada"],[1,"col"],[1,"icon-docs"],[1,"adminBlock-wThemes"],[3,"selected",4,"ngFor","ngForOf"],["type","submit",1,"btn-main-2",3,"disabled"],[1,"icon-save-2"],["type","button",1,"btn-main-2",3,"click","disabled"],[1,"icon-close"],[1,"error"],[3,"value"],[1,"mt10"],["type","text","formControlName","title","maxlength","30","required","","aria-required","true"],[3,"ngValue"],["required","","aria-required","true","type","radio","formControlName","color",3,"id","value"],[3,"for"]],template:function(e,r){e&1&&(i(0,"app-admin-header",0),_("backEvent",function(){return r.back()}),n(),v(1,"app-admin-desktop"),d(2,ge,60,14,"div",1)),e&2&&(l(2),m("ngIf",r.form))},dependencies:[ie,W,X,Y,L,G,U,z,J,P,Z,ee,K,Q,w,M,q,O,re,le]})};export{ae as AdminBlockFeaturedComponent};

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.