1import{a as R}from"./chunk-AGCAGPAP.js";import{a as V}from"./chunk-AHQSOXDD.js";import{a as F}from"./chunk-GCE2MEC6.js";import{a as j}from"./chunk-W2ZMKN4C.js";import{a as M}from"./chunk-RIRGXRXY.js";import{a as g,c as m}from"./chunk-SKH2MXBC.js";import{A as d,D as N}from"./chunk-BQLJE42W.js";import{V as f,_ as p}from"./chunk-YE3BF7DR.js";import{d as G,e as C}from"./chunk-4IDNTCH7.js";var E=G((H,U)=>{"use strict";(function(i,e){typeof H=="object"&&typeof U<"u"?U.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self).dayjs_plugin_relativeTime=e()})(H,function(){"use strict";return function(i,e,t){i=i||{};var r=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(n,u,h,S){return r.fromToBase(n,u,h,S)}t.en.relativeTime=o,r.fromToBase=function(n,u,h,S,D){for(var w,b,O,$=h.$locale().relativeTime||o,T=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],k=T.length,y=0;y<k;y+=1){var c=T[y];c.d&&(w=S?t(n).diff(h,c.d,!0):h.diff(n,c.d,!0));var v=(i.rounding||Math.round)(Math.abs(w));if(O=w>0,v<=c.r||!c.r){v<=1&&y>0&&(c=T[y-1]);var P=$[c.l];D&&(v=D(""+v)),b=typeof P=="string"?P.replace("%d",v):P(v,u,c.l,O);break}}if(u)return b;var A=O?$.future:$.past;return typeof A=="function"?A(b):A.replace("%s",b)},r.to=function(n,u){return a(n,u,this,!0)},r.from=function(n,u){return a(n,u,this)};var s=function(n){return n.$u?t.utc():t()};r.toNow=function(n){return this.to(s(this),n)},r.fromNow=function(n){return this.from(s(this),n)}}})});var l=C(V()),z=C(E()),te=C(R());l.default.extend(z.default);l.default.locale("es");var x=class i{constructor(e,t,r,o,a,s){this.http=e;this.settingService=t;this.helperService=r;this.fileService=o;this.httpClient=a;this.appService=s}get(e){return e.pageSize=6,this.http.get("/api/v1/contents",{params:e})}getByFriendlyName(e){return this.http.get(`/api/v1/contents/${e}`)}add(e){return this.http.post("/api/v1/contents/",e)}getSearchRelatedEntities(e){e.pageSize=2;let r=new d().set("Page",e.page).set("PageSize",e.pageSize).set("KeyWord",e.KeyWord);return this.http.get(`${this.settingService.globalApiUrl}/api/v1/sites/related/`,{params:r})}addRelatedEntities(e){return this.http.post(`${this.settingService.globalApiUrl}/api/v1/sites/related/${this.settingService.settings.general.siteKeyword}`,e)}updateRelatedEntities(e,t){return this.http.put(`${this.settingService.globalApiUrl}/api/v1/sites/related/${this.settingService.settings.general.siteKeyword}?id=${e}`,t)}deleteRelatedEntities(e){let t=new d().set("id",e);return this.http.del(`${this.settingService.globalApiUrl}/api/v1/sites/related/${this.settingService.settings.general.siteKeyword}`,{params:t})}addMassive(e){return this.http.post("/api/v1/massive/contents/",e)}addExclude(e){return this.http.post("/api/v1/contentexclude/",e)}bindByType(e){if(e.date=(0,l.default)(e.modifiedDate).fromNow(),e.contentType==="Vote"&&e.answerOptions&&(e.sumVotes=e.answerOptions.reduce((t,r)=>t+r.votes,0),e.answerOptions.forEach(t=>{t.percentage=e.sumVotes>0?Math.round(t.votes*100/e.sumVotes):0})),e.contentType==="Poll"&&e.contentPoll){let t=[];e.contentPoll.forEach(r=>{let o=r.votes>0&&r.userContentPollAnswers;if(r.typeQuestion===2){if(o){let a=Math.round(r.userContentPollAnswers.filter(n=>n.value==="1").length*100/r.votes),s=Math.round(r.userContentPollAnswers.filter(n=>n.value==="0").length*100/r.votes);t.push({text:"Falso",porcentage:a},{text:"Verdadero",porcentage:s})}r.percentagesPoll=t}r.typeQuestion===3&&r.contentAnswers&&(r.contentAnswers.forEach(a=>{let s=o?Math.round(r.userContentPollAnswers.filter(n=>n.value===String(a.contentAnswerID)).length*100/r.votes):0;t.push({text:a.text,porcentage:s})}),r.percentagesPoll=t),r.typeQuestion===4&&r.contentAnswers&&(r.contentAnswers.forEach(a=>{let s=o?Math.round(r.userContentPollAnswers.filter(n=>n.value.includes(String(a.contentAnswerID))).length*100/r.votes):0;t.push({text:a.text,porcentage:s})}),r.percentagesPoll=t),t=[]})}if(e.targetSelf=!0,e.embedUrl){let t=this.fileService.getCodeYoutube(e.embedUrl);t&&(e.codeYouTube=t,e.previewYoutube=this.fileService.getPreviewYoutube(t),e.urlEmbedYoutube=`//www.youtube.com/embed/${e.codeYouTube}`),e.targetSelf=e.embedUrl.includes(window.location.hostname)||!t}if(e.user&&(e.user.url=this.helperService.getUserUrl(e.user)),e.tags?.length&&(e.friendlyUrl=`/${e.tags[0].friendlyName}/${e.friendlyName}`),e.metaDescription&&(e.metaDescription=this.appService.decodeHtml(e.metaDescription)),e.labels=e.labels||[],e.startingDate&&["Challenge","Convocation","Hangout"].includes(e.contentType)){let t=(0,l.default)(e.startingDate),r=(0,l.default)(),o=r.diff(t);if(o>0&&e.closingDate){let a=(0,l.default)(e.closingDate),s=a.diff(t,"minute"),n=a.diff(r,"minute");n>0&&(e.daysToComplete=Math.ceil(n/1440),e.percentageDate=Math.round((s-n)*100/s))}else if(o<=0){let a=t.diff(r,"day");e.daysToStart=a>0?a===1?"Falta un d\xEDa para empezar":`Faltan ${a} d\xEDas para empezar`:t.diff(r,"hour")>0?t.diff(r,"hour")===1?"Falta una hora para empezar":`Faltan ${t.diff(r,"hour")} horas para empezar`:t.diff(r,"minute")>0?t.diff(r,"minute")===1?"Falta un minuto para empezar":`Faltan ${t.diff(r,"minute")} minutos para empezar`:""}}e.contentType==="Procedure"&&e.attributes?.length&&(e.procedureTime=e.attributes.find(t=>t.attribute==="ProcedureTime")?.value||"",e.procedureType=e.attributes.find(t=>t.attribute==="ProcedureType")?.value||"",e.procedureUrl=e.attributes.find(t=>t.attribute==="ProcedureUrl")?.value||"",e.procedureCostType=e.attributes.find(t=>t.attribute==="ProcedureCostType")?.value||"",e.procedureValue=e.attributes.find(t=>t.attribute==="ProcedureValue")?.value||"",e.procedureTypeId=e.attributes.find(t=>t.attribute==="ProcedureTypeID")?.value||""),e.href=e.contentType==="Link"||e.contentType==="Procedure"?e.embedUrl:e.friendlyUrl}update(e){return this.http.put(`/api/v1/contents/${e.friendlyName}`,e)}disabled(e){return this.http.post(`/api/v1/contents/${e.friendlyName}/disable`,e)}enabled(e){return this.http.post(`/api/v1/contents/${e.friendlyName}/enable`,e)}like(e){return this.http.post(`/api/v1/contents/${e.friendlyName}/like`,e)}featured(e){return this.http.post(`/api/v1/contents/${e.friendlyName}/feature`,e)}unfeature(e){return this.http.post(`/api/v1/contents/${e.friendlyName}/unfeature`,e)}sort(e,t,r){return this.http.post(`/api/v1/contents/${e}/sort/${t}`,r)}move(e){return this.http.post("/api/v1/contents/move",e)}deleteContent(e){return this.http.del(`/api/v1/contents/${e}`)}vote(e,t){return this.http.post("/api/v1/contents/"+e.friendlyName+"/vote",t)}votepoll(e,t){return this.http.post("/api/v1/contents/"+e.friendlyName+"/votepoll",t)}getAvailableTypes(e){return this.http.get("/api/v1/contents/typesavailable/"+e)}getProcedureTypes(){return this.http.get("/api/v1/contents/proceduretypes")}featuredBySection(e,t,r){return this.http.put(`/api/v1/content/${e}/featured/${t}/${r}`,null)}bulkLoad(e,t,r){let o=new FormData,a="/api/v1/contents/bulkload",s=new d().set("type",t).set("tagID",r);return o.append("file",e),this.httpClient.post(a,o,{params:s})}globalContent(e){return this.http.get(this.settingService.globalApiUrl+"/api/v1/contents/",{params:e,headers:{}})}galleryCount(e){return this.http.get("/api/v1/contents/gallery/"+e)}getTypes(){return[{number:8,id:"Ad",value:"Clasificados"},{number:12,id:"Convocation",value:"Convocatoria"},{number:10,id:"Document",value:"Documento"},{number:2,id:"Event",value:"Evento"},{number:6,id:"Hangout",value:"HangOut"},{number:7,id:"Link",value:"Link"},{number:1,id:"Article",value:"Noticia"},{number:11,id:"Faq",value:"Preguntas frecuentes"},{number:9,id:"Accountability",value:"Rendicion de cuentas"},{number:5,id:"Challenge",value:"Reto"},{number:3,id:"Vote",value:"Votaci\xF3n"},{number:14,id:"Procedure",value:"Tr\xE1mite"},{number:15,id:"Gallery",value:"Galer\xEDa"},{number:100,id:"Poll",value:"Poll"}]}showOnHome(e){return this.http.post("/api/v1/contents/"+e.friendlyName+"/showonhome",e)}unshowOnHome(e){return this.http.post("/api/v1/contents/"+e.friendlyName+"/unshowonhome",e)}getPopUpNews(e){return this.http.get(this.settingService.globalApiUrl+"/api/v1/contentPopupnews",{params:e,headers:{}})}static \u0275fac=function(t){return new(t||i)(p(g),p(m),p(M),p(j),p(N),p(F))};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})};var I=class i{constructor(e,t){this.http=e;this.settingService=t}get(){return this.http.get("/api/v1/contentpopup")}getState(e){return this.http.get(`/api/v1/contentpopup/status/${e}`)}getContentName(e,t){return this.http.get(`/api/v1/contentpopup/search/${e}/${t}`)}add(e){return this.http.post("/api/v1/addcontentpopup",e)}update(e){return this.http.put("/api/v1/contentpopupdate",e)}crawler(e){return this.http.post(`${this.settingService.globalApiUrl}/api/v1/crawler`,e)}updateGlobal(e){return this.http.post(`${this.settingService.globalApiUrl}/api/v1/bannersupdate`,e,{headers:{}})}disabledGlobal(e){return this.http.post(`${this.settingService.globalApiUrl}/api/v1/contentPopupExclude`,e,{headers:{}})}enabledGlobal(e){return this.http.del(`${this.settingService.globalApiUrl}/api/v1/contentPopupExclude/${e.contentID}/${e.alias}
1`,{headers:{}})}static \u0275fac=function(t){return new(t||i)(p(g),p(m))};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})};export{E as a,x as b,I as c};
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.