PageSourceSearch

https://www.plataformatierra.es/_nuxt/20260923_30-DerIdijQ.js

js plataformatierra.es collected 2026-09-24 09:38:38 UTC 15,420 bytes, 1 lines download raw bytes

1import{_ as it}from"./20260923_30-Dj7_Ig09.js";import{_ as nt}from"./20260923_30-CfODBUhL.js";import{_ as ot}from"./20260923_30-CRkWQ6Ug.js";import{_ as rt}from"./20260923_30-RmZXkAI8.js";import{_ as lt}from"./20260923_30-Cpm_f2Em.js";import{a4 as Y,d as n,e as r,p as o,g as v,k as h,j as m,ac as ct,h as G,_ as a,i as j,f as X,q as b,M as dt,c as N,r as H,u as z,C as ut,y as R,G as mt,n as A,F as P,m as $,aK as gt,aj as pt,a0 as _t,X as ht,t as ft,w as yt,o as vt,aY as C,aZ as kt,a_ as Pt,ay as bt}from"./20260923_30-BoOx6aVR.js";import{_ as xt}from"./20260923_30-DUkuKl76.js";import{_ as Et}from"./20260923_30-C9BGtTLe.js";import St from"./20260923_30-DhnvkOQK.js";import{_ as q}from"./20260923_30-ZPojt6zx.js";import{_ as jt}from"./20260923_30-PPSt6gPP.js";import"./20260923_30-B7U2Li7q.js";import"./20260923_30-BSbKw8hS.js";import"./20260923_30-Bokvkr0H.js";import"./20260923_30-BsSFLw5K.js";import"./20260923_30-DodMfDoj.js";import"./20260923_30-Br9Onojv.js";/* empty css                    */import"./20260923_30-DVg5e7cc.js";import"./20260923_30-BXW5YF-n.js";import"./20260923_30-BX4gNfyL.js";import"./20260923_30-pjSx3fLE.js";import"./20260923_30-CdBd5foE.js";import"./20260923_30-zyhc9A_k.js";const It={class:"pt-explorer-result__list"},wt={class:"pt-explorer-result__list--wrapper"},At={class:"pt-explorer-result__list--wrapper-sub flex-none"},Ct={class:"pt-explorer-result__media"},Nt={class:"pt-explorer-result__content"},$t={class:"flex justify-end"},Vt=["textContent"],Bt={class:"pt-explorer-result__content--body"},Ut=["textContent"],Ot={__name:"BookmarkResults",props:{title:{type:String,default:""},abstract:{type:String,default:""},slug:{type:String,default:""},section:{type:String,default:""},additionalUrl:{type:String,default:""},tags:{type:Array,default:()=>[]},image:{type:Object,default:()=>({})},videoUrl:{type:String,default:""},media:{type:Object,default:()=>({})}},setup(s){const i=s,f=H(""),p=H(null),u=lt,c=N(()=>f.value===i.videoUrl),S=()=>f.value="",d=y=>{f.value=y,i.videoUrl&&dt(()=>p.value.openPlayer(y))};return(y,I)=>{const k=ct,_=xt,w=Et,x=St;return n(),r("div",It,[o("div",wt,[o("div",At,[o("div",Ct,[Object.keys(s.image).length?(n(),v(G(s.section?a(u):"div"),{key:0,to:s.section?`/${s.section}/${s.slug}${s.additionalUrl}`:void 0},{default:h(()=>[m(k,{loading:"lazy",src:s.image.url,alt:s.image.alternativeText||"",class:"pt-explorer-result__media--image"},null,8,["src","alt"])]),_:1},8,["to"])):Object.keys(s.media).length?(n(),v(_,{key:1,size:"xs",dir:"col",class:"pt-explorer-result__media--video",media:s.media,url:s.videoUrl,onShowVideo:d},null,8,["media","url"])):j("",!0)])]),o("div",Nt,[o("div",$t,[X(y.$slots,"bookmark",{},void 0,!0)]),s.title?(n(),v(G(s.section?a(u):"div"),{key:0,to:s.section?`/${s.section}/${s.slug}${s.additionalUrl}`:void 0},{default:h(()=>[o("span",{class:"pt-explorer-result__content--head--title line-clamp-1",textContent:b(s.title)},null,8,Vt)]),_:1},8,["to"])):j("",!0),o("div",Bt,[s.tags.length?(n(),v(w,{key:0,items:s.tags,class:"pt-explorer-result__content--body-label","label-type":"transparent","to-search":"articles"},null,8,["items"])):j("",!0),s.abstract?(n(),v(G(s.section?a(u):"div"),{key:1,to:s.section?"/"+s.section+"/"+s.slug:void 0},{default:h(()=>[o("span",{class:"line-clamp-2",textContent:b(s.abstract)},null,8,Ut)]),_:1},8,["to"])):j("",!0)])]),s.videoUrl&&a(c)?(n(),v(x,{key:0,ref_key:"videoPlayerRef",ref:p,onCloseMultimedia:S},null,512)):j("",!0)])])}}},Mt=Y(Ot,[["__scopeId","data-v-5514e265"]]),Lt={props:{items:{type:Array,default:()=>[]},properties:{type:Array,default:()=>[]}},emits:["changePage"],data(){return{search:"",perPage:3,currentPage:1,paginate:{from:0,until:3,filteredItems:[],filtered:!1}}},computed:{totalPages(){return Math.ceil(this.itemsLength/this.perPage)},disabledNext(){return this.totalPages===this.currentPage},disabledBack(){return this.currentPage===1},itemsLength(){return this.paginate.filtered?this.paginate.filteredItems.length:this.items.length}},methods:{nextPage(){this.disabledNext||this.showPage(this.currentPage+1)},lastPage(){this.disabledNext||this.showPage(this.items.length/this.perPage)},backPage(){this.disabledBack||this.showPage(this.currentPage-1)},firstPage(){this.disabledBack||this.showPage(1)},changePerPage(s){this.currentPage=1,this.paginate.from=0,this.paginate.until=parseInt(s)>this.itemsLength?this.itemsLength:parseInt(s),this.emitChangePage(),this.scrollToTop()},showPage(s){this.currentPage=s,this.paginate.from=s*this.perPage-this.perPage,this.paginate.until=this.perPage>this.itemsLength?this.itemsLength:s*this.perPage,this.emitChangePage(),this.scrollToTop()},scrollToTop(){this.$scrollToSmoothly(0)},searchValue(s){s.data!==" "&&(this.paginate.filteredItems=this.items.filter(this.conditionToSearch),this.showPage(1))},emitChangePage(){this.paginate.filtered=this.search!=="",this.$emit("changePage",this.paginate)},conditionToSearch(s){const i=this.getFormatedString(this.search).split(" ").filter(u=>u!==""),f=new RegExp(i.join("|"));let p=!1;
1return this.properties.forEach(u=>{p===!1&&(p=this.getFormatedString(s[u]).match(f)!==null)}),p},getFormatedString(s){return s.toLowerCase().normalize("NFD").replace(/[\u0300-\u036F]/g,"")}}},Tt={class:"pt-paginate ais-InstantSearch"},Dt={class:"pt-search"},Gt={class:"pt-search__container-icon"},Rt={class:"pt-search__container-icon__icon"},Ft={class:"pt-search__container-input"},Ht=["placeholder"],zt={class:"panel-result-info"},Yt={key:0,class:"ais-Stats"},Xt={class:"font-bold"},qt={class:"font-bold"},Jt={class:"font-bold"},Kt={key:1,class:"font-bold text-sm"},Wt={class:"pages-buttons"},Zt={class:"ais-Pagination"},Qt={class:"ais-Pagination-list"},te=["onClick"],ee={class:"ais-Pagination-link"};function se(s,i,f,p,u,c){const S=q;return n(),r("div",Tt,[o("div",Dt,[o("div",Gt,[o("div",Rt,[m(S,{class:"text-xl",name:"pt-search"})])]),o("div",Ft,[z(o("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>u.search=d),placeholder:s.$t("seeker.title"),class:"pt-search__container-input__input",type:"text",onInput:i[1]||(i[1]=(...d)=>c.searchValue&&c.searchValue(...d))},null,40,Ht),[[ut,u.search]])])]),o("div",zt,[c.itemsLength>0?(n(),r("div",Yt,[i[8]||(i[8]=R(" Mostrando ",-1)),o("span",Xt,b(u.paginate.from+1),1),i[9]||(i[9]=R(" - ",-1)),o("span",qt,b(u.paginate.until),1),i[10]||(i[10]=R(" de ",-1)),o("span",Jt,b(c.itemsLength)+" resultados",1)])):(n(),r("p",Kt,"Sin resultados")),z(o("select",{"onUpdate:modelValue":i[2]||(i[2]=d=>u.perPage=d),class:"ais-HitsPerPage-select",onChange:i[3]||(i[3]=d=>c.changePerPage(u.perPage))},[...i[11]||(i[11]=[o("option",{value:"3",class:"ais-HitsPerPage-option"},"3 resultados por página",-1),o("option",{value:"5",class:"ais-HitsPerPage-option"},"5 resultados por página",-1),o("option",{value:"10",class:"ais-HitsPerPage-option"},"10 resultados por página",-1)])],544),[[mt,u.perPage]])]),X(s.$slots,"default"),o("div",Wt,[o("div",Zt,[o("ul",Qt,[o("li",{class:A(["ais-Pagination-item ais-Pagination-item cursor-pointer",c.disabledBack&&"ais-Pagination-item--disabled"]),onClick:i[4]||(i[4]=(...d)=>c.firstPage&&c.firstPage(...d))},[...i[12]||(i[12]=[o("span",{class:"ais-Pagination-link"},"‹‹",-1)])],2),o("li",{class:A(["ais-Pagination-item ais-Pagination-item cursor-pointer",c.disabledBack&&"ais-Pagination-item--disabled"]),onClick:i[5]||(i[5]=(...d)=>c.backPage&&c.backPage(...d))},[...i[13]||(i[13]=[o("span",{class:"ais-Pagination-link"},"‹",-1)])],2),(n(!0),r(P,null,$(c.totalPages,d=>(n(),r("li",{key:d,class:A(["cursor-pointer",u.currentPage===d?"ais-Pagination-item ais-Pagination-item--selected":"ais-Pagination-item"]),onClick:y=>c.showPage(d)},[o("a",ee,b(d),1)],10,te))),128)),o("li",{class:A(["ais-Pagination-item ais-Pagination-item cursor-pointer",c.disabledNext&&"ais-Pagination-item--disabled"]),onClick:i[6]||(i[6]=(...d)=>c.nextPage&&c.nextPage(...d))},[...i[14]||(i[14]=[o("span",{class:"ais-Pagination-link"},"›",-1)])],2),o("li",{class:A(["ais-Pagination-item ais-Pagination-item cursor-pointer",c.disabledNext&&"ais-Pagination-item--disabled"]),onClick:i[7]||(i[7]=(...d)=>c.lastPage&&c.lastPage(...d))},[...i[15]||(i[15]=[o("span",{class:"ais-Pagination-link"},"››",-1)])],2)])])])])}const ae=Object.assign(Y(Lt,[["render",se]]),{__name:"Pagination"}),ie={class:"sm:container grid sm:grid-flow-col-dense auto-cols-fr gap-x-12 lg:gap-x-24 lg:gap-y-12 pb-12"},ne={class:"grid gap-y-5"},oe={class:"font-ubuntu text-2xl font-medium text-gray-dark"},re={class:"text-gray"},le={key:1,class:"flex w-full justify-center"},ce={key:2},de={class:"w-full flex justify-center items-center h-20"},ue={key:0},me={key:1,class:"flex w-full justify-center"},ge={key:2},pe={class:"w-full flex justify-center items-center h-20"},_e={key:0},he={key:1,class:"flex w-full justify-center"},fe={key:2},ye={class:"w-full flex justify-center items-center h-20"},ve={key:0},ke={key:1,class:"flex w-full justify-center"},Pe={key:2},be={class:"w-full flex justify-center items-center h-20"},Xe={__name:"guardados",setup(s){const i=gt(),f=pt(),{t:p}=_t(),u=Object.values(C),c={from:0,until:3,filteredItems:[],filtered:!1},S={post:bt.replace("/",""),project:Pt.replace("/","")}
1,d=ht({selectedBookmark:"article",propertiesBookmark:["title","abstract"],items:Object.fromEntries(u.map(t=>[t,[]])),loading:Object.fromEntries(u.map(t=>[t,"pending"])),paginates:Object.fromEntries(u.map(t=>[t,{...c}]))}),{selectedBookmark:y,propertiesBookmark:I,items:k,loading:_,paginates:w}=ft(d),x=N(()=>i.userFavorites),F=Object.fromEntries(["post","video","project","article"].map(t=>[t,N(()=>i[`favorite${t.charAt(0).toUpperCase()+t.slice(1)}Entities`])])),J=N(()=>kt.map(t=>({...t,length:tt(t.value)}))),V=N(()=>Object.fromEntries(u.map(t=>[t,K(t)]))),K=t=>{const l=w.value[t];return(l.filtered?l.filteredItems:k.value[t]).slice(l.from,l.until)},W={article:t=>f.getArticlesSavedById(t),video:async t=>{const l=t.filter(E=>!isNaN(+E)),g=t.filter(E=>isNaN(E));return f.getVideosSavedById({numerical:l,alphanumerical:g})},project:t=>f.getProjectsSavedById(t),post:t=>f.getPostsSavedById(t)},Z=async(t,l)=>{try{const g=await W[t](l);k.value[t]=g,_.value[t]=g.length>0?"success":"empty"}catch(g){console.error(`Error fetching ${t}:`,g),_.value[t]="error"}},Q=t=>{et();const l=t.value;y.value=l,F[l].value?.length||(_.value[l]="empty")},tt=t=>{const l=new Set(k.value[t].map(g=>g.documentId));return(x.value?.filter(g=>g.entity===t)??[]).filter(g=>l.has(g.id_entity)).length},B=(t,l)=>{w.value[l]={...t}},et=()=>{Object.assign(w.value,Object.fromEntries(u.map(t=>[t,{...c}])))},D=(t,l)=>typeof t=="object"&&!Array.isArray(t)?Object.values(t).map(g=>g[l]):Array.isArray(t)?t:[],st=async()=>{await i.setAnyFavWithoutRead(!1),await i.editProfile("setFavoriteAsReaded/all")};return Object.entries(F).forEach(([t,l])=>{yt(l,async g=>{g?.length?await Z(t,g):_.value[t]="empty"},{deep:!0,immediate:!0})}),vt(st),(t,l)=>{const g=it,E=nt,at=ot,U=rt,O=Mt,M=ae,L=jt,T=q;return n(),r("div",null,[m(E,{grid:"E","padding-y":"py-6 md:py-10"},{header:h(()=>[m(g,{path:a(p)("bookmark.path"),section:a(p)("bookmark.title"),class:"container w-full mx-auto my-0 hidden sm:block",color:"gray-dark"},null,8,["path","section"])]),_:1}),o("div",ie,[m(E,{grid:"E",class:"lg:col-start-1 lg:col-end-3","padding-y":"pt-0 pb-5 sm:pb-0"},{content:h(()=>[o("div",ne,[o("span",oe,b(a(p)("bookmark.title")),1),o("p",re,b(a(p)("bookmark.description")),1),m(at,{"option-list":a(J),"show-icon":"",selector:"list","show-length":"",onOptionSelect:Q},null,8,["option-list"])])]),_:1}),m(E,{grid:"E",class:"lg:col-start-3 lg:col-end-8","padding-y":"p-0"},{content:h(()=>[a(y)===("MENU_SAVED_PAGE"in t?t.MENU_SAVED_PAGE:a(C)).article?(n(),r(P,{key:0},[a(_).article==="success"?(n(),v(M,{key:"paginationArticles",items:a(k).article,properties:a(I),onChangePage:l[0]||(l[0]=e=>B(e,"article"))},{default:h(()=>[(n(!0),r(P,null,$(a(V).article,e=>(n(),r("div",{key:e.documentId,class:"pt-explorer-result"},[m(O,{title:e.title,abstract:e.abstract,image:e.main_image,slug:e.slug,section:e.category.section,tags:D(e.tags,"label")},{bookmark:h(()=>[(n(),v(U,{key:e.documentId,"entity-id":e.documentId,button:"icon","entity-name":"article","favorite-entities":a(x),"show-saved-date":""},null,8,["entity-id","favorite-entities"]))]),_:2},1032,["title","abstract","image","slug","section","tags"])]))),128))]),_:1},8,["items","properties"])):a(_).article==="empty"?(n(),r("div",le,[m(L,{title:a(p)("bookmark.empty")},null,8,["title"])])):(n(),r("div",ce,[o("div",de,[m(T,{name:"spinner",class:"animate-spin text-5xl text-gray"})])]))],64)):a(y)===("MENU_SAVED_PAGE"in t?t.MENU_SAVED_PAGE:a(C)).video?(n(),r(P,{key:1},[a(_).video==="success"?(n(),r("div",ue,[m(M,{key:"paginationVideos",items:a(k).video,properties:a(I),onChangePage:l[1]||(l[1]=e=>B(e,"video"))},{default:h(()=>[(n(!0),r(P,null,$(a(V).video,e=>(n(),r("div",{key:e.documentId,class:"pt-explorer-result"},[m(O,{title:e.title,abstract:e.abstract||e.description,media:e.keyframe||e.thumbnail,"video-url":e.url},{bookmark:h(()=>[(n(),v(U,{key:e.documentId,"entity-id":e.documentId,button:"icon","entity-name":"video","favorite-entities":a(x),"show-saved-date":""},null,8,["entity-id","favorite-entities"]))]),_:2},1032,["title","abstract","media","video-url"])]))),128))]),_:1},8,["items","properties"])])):a(_).video==="empty"?(n(),r("div",me,[m(L,{title:a(p)("bookmark.empty")},null,8,["title"])])):(n(),r("div",ge,[o("div",pe,[m(T,{name:"spinner",class:"animate-spin text-5xl text-gray"})])]))],64)):a(y)===("MENU_SAVED_PAGE"in t?t.MENU_SAVED_PAGE:a(C)).project?(n(),r(P,{key:2},[a(_).project==="success"?(n(),r("div",_e,[m(M,{key:"paginationProjects",items:a(k).project,properties:a(I),onChangePage:l[2]||(l[2]=e=>B(e,"project"))},{default:h(()=>[(n(!0),r(P,null,$(a(V).project,e=>(n(),r("div",{key:e.documentId,class:"pt-explorer-result"},[m(O,{title:e.title,abstract:e.abstract,section:S.project,image:e.main_image,slug:e.slug,tags:D(e.tags,"label")},{bookmark:h(()=>[(n(),v(U,{key:e.documentId,"entity-id":e.documentId,button:"icon","entity-name":"project","favorite-entities":a(x),"show-saved-date":""},null,8,["entity-id","favorite-entities"]))]),_:2},1032,["title","abstract","section","image","slug","tags"])]))),128))]),_:1},8,["items","properties"])])):a(_).project==="empty"?(n(),r("div",he,[m(L,{title:a(p)("bookmark.empty")},null,8,["title"])])):(n(),r("div",fe,[o("div",ye,[m(T,{name:"spinner",class:"animate-spin text-5xl text-gray"})])]))],64)):a(y)===("MENU_SAVED_PAGE"in t?t.MENU_SAVED_PAGE:a(C)).post?(n(),r(P,{key:3},[a(_).post==="success"?(n(),r("div",ve,[m(M,{key:"paginationPosts",items:a(k).post,properties:a(I),onChangePage:l[3]||(l[3]=e=>B(e,"post"))},{default:h(()=>[(n(!0),r(P,null,$(a(V).post,e=>(n(),r("div",{key:e.documentId,class:"pt-explorer-result"},[m(O,{title:e.title,abstract:e.abstract,section:`${S.post}/${e.blog.slug}`,image:e.main_image,slug:e.slug,tags:D(e.tags,"label")},{bookmark:h(()=>[(n(),v(U,{key:e.documentId,"entity-id":e.documentId,button:"icon","entity-name":"post","favorite-entities":a(x),"show-saved-date":""},null,8,["entity-id","favorite-entities"]))]),_:2},1032,["title","abstract","section","image","slug","tags"])]))),128))]),_:1},8,["items","properties"])])):a(_).post==="empty"?(n(),r("div",ke,[m(L,{title:a(p)("bookmark.empty")},null,8,["title"])])):(n(),r("div",Pe,[o("div",be,[m(T,{name:"spinner",class:"animate-spin text-5xl text-gray"})])]))],64)):j("",!0)]),_:1})])])}}};export{Xe as default};

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.