PageSourceSearch

https://entrekids.cl/assets/vite/build/js/everySearch-Bd6zyibY.js

js entrekids.cl collected 2026-10-03 22:30:40 UTC 46,294 bytes, 231 lines download raw bytes

1function f(t,e,s){var r;let a=null;if(s){const i=t.getElementsByTagNameNS("http://base.google.com/ns/1.0",e);i.length>0&&(a=i[0])}if(a||(a=t.querySelector(e)),!a){const i=t.getElementsByTagName(e);i.length>0&&(a=i[0])}return((r=a==null?void 0:a.textContent)==null?void 0:r.trim())||""}function q(t){const e=t.match(/[\d.]+/);return e?parseFloat(e[0]):0}function Y(t){const e=f(t,"title"),s=f(t,"brand","g"),a=f(t,"description","g"),r=f(t,"image_link","g"),i=f(t,"link","g"),n=f(t,"price","g"),l=f(t,"sale_price","g"),o=f(t,"product_type","g"),c=f(t,"availability","g"),d=f(t,"rating"),h=f(t,"region"),u=f(t,"comuna"),m=f(t,"tipo"),v=f(t,"tags"),_=f(t,"proveedor"),w=f(t,"id"),E=v?v.split("/").map(M=>M.trim()).filter(Boolean):[];return{id:w,title:e,brand:s,description:a,imageLink:r,link:i,price:q(n),salePrice:l?q(l):null,productType:o,availability:c,rating:d?parseFloat(d):null,region:h,comuna:u,tipo:m,tags:E,proveedor:_}}async function Z(t,e){console.log("[EverySearch] Fetching feed from",t);const s=await fetch(t);if(!s.ok)throw new Error(`[EverySearch] Feed fetch failed: ${s.status}`);const a=await s.text(),n=new DOMParser().parseFromString(a,"application/xml").getElementsByTagName("entry"),l=[];for(let o=0;o<n.length;o++)try{l.push(Y(n[o]))}catch(c){console.warn("[EverySearch] Failed to parse entry",o,c)}return console.log(`[EverySearch] Parsed ${l.length} items`),l}const K=[{term:"animales",related:["zoo","zoologico","buin zoo","fauna","granja","acuario","bioparque","mascotas","safari","reptiles","aves","caballos","equitacion"]},{term:"zoo",related:["animales","zoologico","buin zoo","fauna","bioparque","safari"]},{term:"naturaleza",related:["parque","trekking","senderismo","bosque","camping","aire libre","ecoturismo","montaña"]},{term:"funpark",related:["inflable","parque inflable","juegos inflables","camas elasticas","trampolin"]},{term:"inflable",related:["funpark","parque inflable","juegos inflables","camas elasticas"]},{term:"juegos",related:["entretencion","diversion","arcade","bowling","laser tag","paintball","karting"]},{term:"karting",related:["rally kart","kart","go kart","pista","carreras"]},{term:"deporte",related:["futbol","natacion","piscina","gimnasia","escalada","surf","esqui","patinaje","bicicleta","ciclismo"]},{term:"aventura",related:["canopy","tirolesa","rafting","kayak","escalada","rapel","trekking","zip line"]},{term:"piscina",related:["natacion","acuatico","parque acuatico","agua","splash"]},{term:"escalada",related:["boulder","muro","climbing","aventura"]},{term:"arte",related:["pintura","dibujo","ceramica","manualidades","taller","creativo","museo"]},{term:"museo",related:["exposicion","arte","historia","ciencia","cultura","galeria"]},{term:"teatro",related:["obra","funcion","espectaculo","show","circo","marionetas","titeres"]},{term:"musica",related:["concierto","instrumento","guitarra","piano","bateria","canto","coro"]},{term:"ciencia",related:["laboratorio","experimento","stem","robotica","programacion","tecnologia","astronomia","planetario"]},{term:"robotica",related:["programacion","stem","tecnologia","lego","coding"]},{term:"idiomas",related:["ingles","frances","aleman","lenguaje","clases"]},{term:"cumpleanos",related:["fiesta","celebracion","cumple","party","evento"]},{term:"fiesta",related:["cumpleanos","celebracion","party","evento","animacion"]},{term:"cocina",related:["taller culinario","chef","reposteria","pasteleria","gastronomia","comida"]},{term:"camping",related:["carpa","naturaleza","fogata","aire libre","trekking","montaña"]},{term:"trekking",related:["senderismo","caminata","montaña","naturaleza","excursion"]},{term:"yoga",related:["meditacion","mindfulness","relajacion","bienestar"]},{term:"danza",related:["baile","ballet","hip hop","salsa","coreografia"]}],k=new Map;function C(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}for(const t of K){const e=C(t.term),s=t.related.map(C);k.set(e,s);for(const a of s){k.has(a)||k.set(a,[]);const r=k.get(a);r.includes(e)||r.push(e)}}function X(t){const e=C(t).split(/\s+/).filter(Boolean),s=[];for(const i of e)s.push({word:i,weight:1});const a=C(t),r=k.get(a);if(r)for(const i of r)s.some(n=>n.word===i)||s.push({word:i,weight:.4});for(const i of e){const n=k.get(i);if(n)for(const l of n)s.some(o=>o.word===l)||s.push({word:l,weight:.35})}return s}function V(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}function z(t,e){const s=t.split(/[\s\-_,;:.!?¿¡()\[\]{}
1|/"']+/).filter(Boolean);for(const a of s){if(a===e)return"exact";if(a.startsWith(e))return"prefix"}return t.includes(e)?"contains":"none"}function A(t,e){if(!e.trim())return H(t);const s=H(t),a=V(e).split(/\s+/).filter(Boolean);let r=s;for(const i of a){const n=new RegExp(`(${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");r=r.replace(n,'<mark class="es-highlight">$1</mark>')}return r}function H(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function y(t,e,s){if(!t)return 0;const a=V(t);let r=0;for(const{word:l,weight:o}of e)switch(z(a,l)){case"exact":r+=s*1*o;break;case"prefix":r+=s*.7*o;break;case"contains":l.length>=4&&(r+=s*.2*o);break}const i=e.filter(l=>l.weight>=1);return i.every(l=>z(a,l.word)!=="none")&&i.length>0&&(r+=s*.5),r}function ee(t,e){let s=0;s+=y(t.title,e,100),s+=y(t.brand,e,60),s+=y(t.proveedor,e,50),s+=y(t.tags.join(" "),e,40),s+=y(t.tipo,e,30),s+=y(t.comuna,e,15);const a=e.filter(r=>r.weight>=1);return a.length>0&&a[0].word.length>=4&&(s+=y(t.description,e.filter(r=>r.weight>=1),10)),t.rating&&t.rating>=4&&(s+=3),t.salePrice&&t.salePrice<t.price&&(s+=2),s}function te(t){const e=t.trim().length;return e<=3?50:e<=5?30:e<=8?20:10}function se(t,e,s=50,a){const r=e.trim();if(!r||r.length<2)return[];const i=X(r);let n=t;const l=te(r),o=[];for(const c of n){const d=ee(c,i);d>=l&&o.push({item:c,score:d,highlights:{title:A(c.title,r),proveedor:A(c.proveedor,r)}})}return o.sort((c,d)=>d.score-c.score),o.slice(0,s)}function B(t){const e=new Map,s=new Map,a=new Map,r=new Map;let i=1/0,n=0;for(const o of t){o.brand&&e.set(o.brand,(e.get(o.brand)||0)+1),o.productType&&s.set(o.productType,(s.get(o.productType)||0)+1),o.tipo&&a.set(o.tipo,(a.get(o.tipo)||0)+1),o.comuna&&r.set(o.comuna,(r.get(o.comuna)||0)+1);const c=o.salePrice??o.price;c>0&&(c<i&&(i=c),c>n&&(n=c))}const l=o=>Array.from(o.entries()).map(([c,d])=>({value:c,count:d})).sort((c,d)=>d.count-c.count);return{brands:l(e),categories:l(s),tipos:l(a),comunas:l(r),priceRange:{min:i===1/0?0:i,max:n}}}function D(t,e){return t.filter(s=>{if(e.brands.size>0&&!e.brands.has(s.brand)||e.categories.size>0&&!e.categories.has(s.productType)||e.tipos.size>0&&!e.tipos.has(s.tipo)||e.comunas.size>0&&!e.comunas.has(s.comuna))return!1;const a=s.salePrice??s.price;return!(e.priceMin!==null&&a<e.priceMin||e.priceMax!==null&&a>e.priceMax)})}function F(t,e){const s=[...t];switch(e){case"price_asc":s.sort((a,r)=>(a.salePrice??a.price)-(r.salePrice??r.price));break;case"price_desc":s.sort((a,r)=>(r.salePrice??r.price)-(a.salePrice??a.price));break;case"rating":s.sort((a,r)=>(r.rating??0)-(a.rating??0));break}return s}function S(){return{brands:new Set,categories:new Set,tipos:new Set,comunas:new Set,priceMin:null,priceMax:null,sortBy:"relevance"}}const T="everySearch_history",ae=8;function U(){try{const t=localStorage.getItem(T);return t?JSON.parse(t):[]}catch{return[]}}function ie(t){const e=t.trim();if(e.length<2)return;const s=U().filter(a=>a.toLowerCase()!==e.toLowerCase());s.unshift(e);try{localStorage.setItem(T,JSON.stringify(s.slice(0,ae)))}catch{}}function re(){try{localStorage.removeItem(T)}catch{}}function ne(t){const e=new Map;for(const s of t){b(e,s.title),s.brand&&b(e,s.brand),s.proveedor&&b(e,s.proveedor);for(const a of s.tags)b(e,a);s.tipo&&b(e,s.tipo),s.comuna&&b(e,s.comuna)}return Array.from(e.values())}function b(t,e){const s=e.trim();if(s.length<2)return;const a=P(s);t.has(a)||t.set(a,s)}function P(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}function oe(t,e,s=6){const a=P(t);if(a.length<1)return[];const r=[];for(const i of e){const n=P(i);if(n===a)continue;let l=0;n.startsWith(a)?l=100-n.length:n.includes(a)&&(l=50-n.length),l>0&&r.push({term:i,score:l})}return r.sort((i,n)=>n.score-i.score),r.slice(0,s).map(i=>i.term)}function le(t,e){const s=t.length,a=e.length,r=Array.from({length:s+1},()=>Array(a+1).fill(0));for(let i=0;i<=s;i++)r[i][0]=i;for(let i=0;i<=a;i++)r[0][i]=i;for(let i=1;i<=s;i++)for(let n=1;n<=a;n++)r[i][n]=t[i-1]===e[n-1]?r[i-1][n-1]:1+Math.min(r[i-1][n],r[i][n-1],r[i-1][n-1]);return r[s][a]}function $(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}function ce(t,e,s=3){const a=$(t);if(a.length<2)return[];const r=a.length<=4?1:a.length<=7?2:3,i=[];for(const o of e){const c=$(o);if(c===a||Math.abs(c.length-a.length)>r)continue;const d=le(a,c);d<=r&&i.push({term:o,dist:d})}i.sort((o,c)=>o.dist-c.dist);const n=new Set,l=[];for(const o of i){const c=$(o.term);if(!n.has(c)&&(n.add(c),l.push(o.term),l.length>=s))break}return l}const I={Santiago:{lat:-33.4489,lng:-70.6693},Providencia:{lat:-33.426,lng:-70.6109},"Las Condes":{lat:-33.4073,lng:-70.5676},Vitacura:{lat:-33.3893,lng:-70.577},"Lo Barnechea":{lat:-33.3522,lng:-70.5164},Ñuñoa:{lat:-33.4569,lng:-70.5977},"La Reina":{lat:-33.4454,lng:-70.5424},Peñalolén:{lat:-33.4886,lng:-70.5306},Macul:{lat:-33.4892,lng:-70.5989},"San Joaquín":{lat:-33.4959,lng:-70.6289},"La Florida":{lat:-33.5167,lng:-70.5878},"Puente Alto":{lat:-33.6117,lng:-70.5758},"La Granja":{lat:-33.5372,lng:-70.6228},"San Ramón":{lat:-33.5392,lng:-70.6411},"San Miguel":{lat:-33.4978,lng:-70.6528},"San Bernardo":{lat:-33.5922,lng:-70.6994},Maipú:{lat:-33.5103,lng:-70.7597},Cerrillos:{lat:-33.4939,lng:-70.7189}
1,"Estación Central":{lat:-33.4517,lng:-70.6789},"Quinta Normal":{lat:-33.4278,lng:-70.6978},Recoleta:{lat:-33.405,lng:-70.6427},Independencia:{lat:-33.4169,lng:-70.6644},Huechuraba:{lat:-33.3617,lng:-70.635},Conchalí:{lat:-33.3844,lng:-70.6497},Renca:{lat:-33.405,lng:-70.7183},"Cerro Navia":{lat:-33.4247,lng:-70.7363},Pudahuel:{lat:-33.4333,lng:-70.75},"Lo Prado":{lat:-33.4444,lng:-70.725},"Pedro Aguirre Cerda":{lat:-33.4911,lng:-70.6756},"Lo Espejo":{lat:-33.5167,lng:-70.6897},"El Bosque":{lat:-33.5539,lng:-70.6736},"La Cisterna":{lat:-33.5297,lng:-70.6608},"La Pintana":{lat:-33.5833,lng:-70.6333},Pirque:{lat:-33.65,lng:-70.5833},"San José de Maipo":{lat:-33.6389,lng:-70.3547},Colina:{lat:-33.2,lng:-70.6667},Lampa:{lat:-33.2833,lng:-70.8833},Buin:{lat:-33.7333,lng:-70.75},Paine:{lat:-33.8167,lng:-70.7333},Peñaflor:{lat:-33.6097,lng:-70.8736},Talagante:{lat:-33.6667,lng:-70.9333},"Isla de Maipo":{lat:-33.75,lng:-70.8833},"Calera de Tango":{lat:-33.6333,lng:-70.7833},Valparaíso:{lat:-33.0472,lng:-71.6127},"Viña del Mar":{lat:-33.0245,lng:-71.5518},Concón:{lat:-32.9182,lng:-71.5161},Quilpué:{lat:-33.05,lng:-71.45},"Villa Alemana":{lat:-33.0422,lng:-71.37},Concepción:{lat:-36.827,lng:-73.0503},Talcahuano:{lat:-36.7167,lng:-73.1167},Chillán:{lat:-36.621,lng:-72.1037},Temuco:{lat:-38.7359,lng:-72.5904},Pucón:{lat:-39.2822,lng:-71.9544},Villarrica:{lat:-39.2856,lng:-72.2269},"Puerto Montt":{lat:-41.4693,lng:-72.9424},"Puerto Varas":{lat:-41.3167,lng:-72.9833},Osorno:{lat:-40.5739,lng:-73.1339},Rancagua:{lat:-34.1708,lng:-70.7403},Talca:{lat:-35.4264,lng:-71.6553},Curicó:{lat:-34.9806,lng:-71.2369},"La Serena":{lat:-29.9078,lng:-71.2539},Coquimbo:{lat:-29.9533,lng:-71.3436},Antofagasta:{lat:-23.65,lng:-70.4},Copiapó:{lat:-27.3664,lng:-70.3314},Arica:{lat:-18.4746,lng:-70.3216},"Punta Arenas":{lat:-53.15,lng:-70.9167}};function de(t){if(!t)return null;if(I[t])return I[t];const e=t.trim();for(const[s,a]of Object.entries(I))if(s.toLowerCase()===e.toLowerCase())return a;return null}let O=!1,L=null;async function he(){if(!O){if(!document.querySelector('link[href*="leaflet"]')){const t=document.createElement("link");t.rel="stylesheet",t.href="https://unpkg.com/[email protected]/dist/leaflet.css",document.head.appendChild(t)}window.L||await new Promise((t,e)=>{const s=document.createElement("script");s.src="https://unpkg.com/[email protected]/dist/leaflet.js",s.onload=()=>t(),s.onerror=()=>e(new Error("Failed to load Leaflet")),document.head.appendChild(s)}),L=window.L,O=!0}}function ue(t){const e=[];for(const s of t){const a=de(s.comuna);a&&e.push({item:s,lat:a.lat+(Math.random()-.5)*.008,lng:a.lng+(Math.random()-.5)*.008})}return e}function pe(t){return t===0?"Gratis":"$ "+t.toLocaleString("es-CL")}function fe(t){const e=t.salePrice??t.price;return`
2        <div style="width:200px;font-family:inherit;">
3            ${t.imageLink?`<img src="${t.imageLink}" style="width:100%;height:120px;object-fit:cover;border-radius:8px 8px 0 0;margin-bottom:8px;" alt="">`:""}
4            <div style="padding:0 4px 4px;">
5                <div style="font-weight:700;font-size:13px;margin-bottom:4px;line-height:1.3;">${t.title}</div>
6                <div style="font-size:12px;color:#6b7280;margin-bottom:4px;">${t.proveedor||""}</div>
7                <div style="font-size:14px;font-weight:700;color:rgb(6,204,202);">${pe(e)}</div>
8                <a href="${t.link}" style="display:inline-block;margin-top:6px;padding:5px 12px;background:#00B4F0;color:#fff;border-radius:6px;font-size:12px;font-weight:600;text-decoration:none;">Ver →</a>
9            </div>
10        </div>
11    `}class me{constructor(e){this.map=null,this.markers=[],this.markerGroup=null,this.initialized=!1,this.container=e}async init(){this.initialized||(await he(),this.map=L.map(this.container,{zoomControl:!0,scrollWheelZoom:!0}).setView([-33.45,-70.65],11),L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OSM</a>',maxZoom:18}).addTo(this.map),this.markerGroup=L.featureGroup().addTo(this.map),this.initialized=!0)}updateMarkers(e,s){if(!this.initialized||!this.map)return;this.markerGroup.clearLayers(),this.markers=[];const a=ue(e),r=L.divIcon({className:"es-map-marker",html:'<div class="es-map-pin"><svg viewBox="0 0 24 24" fill="#00B4F0" width="28" height="28"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg></div>',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]});for(const i of a){const n=L.marker([i.lat,i.lng],{icon:r}).bindPopup(fe(i.item),{maxWidth:220,className:"es-map-popup"});s&&n.on("click",()=>s(i.item)),this.markerGroup.addLayer(n),this.markers.push(n)}
11if(a.length>0){const i=this.markerGroup.getBounds();this.map.fitBounds(i,{padding:[30,30],maxZoom:14})}}invalidateSize(){this.map&&setTimeout(()=>this.map.invalidateSize(),100)}destroy(){this.map&&(this.map.remove(),this.map=null,this.initialized=!1)}}function g(t){return t===0?"Gratis":"$ "+t.toLocaleString("es-CL")}function j(t){if(!t)return"";const e=Math.floor(t),s=t%1>=.5?1:0,a=5-e-s;let r='<div class="es-stars">';for(let i=0;i<e;i++)r+='<i class="es-star--full">★</i>';s&&(r+='<i class="es-star--half">★</i>');for(let i=0;i<a;i++)r+='<i class="es-star--empty">☆</i>';return r+="</div>",r}function p(t){return t.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ge(t){return t.innerHTML=`
12        <div class="es-layer">
13            <div class="es-aside-overlay" data-role="aside-overlay"></div>
14            <div class="es-layer__content">
15                <aside class="es-aside" data-role="aside">
16                    <div class="es-aside__header es-mobile-only">
17                        <span>Filtros</span>
18                        <button type="button" class="es-aside__close" data-role="aside-close" title="Cerrar filtros">&times;</button>
19                    </div>
20                    <div class="es-aside__content" id="es-aside-content"></div>
21                </aside>
22                <div class="es-main">
23                    <div class="es-header">
24                        <div class="es-header__search">
25                            <input type="text" class="es-header__search-input" placeholder="Buscar actividades…" autocomplete="off" spellcheck="false" data-role="fs-search">
26                            <button type="button" class="es-header__clear" data-role="fs-clear" title="Limpiar búsqueda">
27                                <svg viewBox="0 0 16 16" fill="currentColor" width="12" height="12">
28                                    <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
29                                </svg>
30                            </button>
31                        </div>
32                        <div id="es-header-dynamic"></div>
33                    </div>
34                    <div class="es-banner" id="es-banner"></div>
35                    <div class="es-results" id="es-results"></div>
36                </div>
37            </div>
38            <a class="es-close-btn" href="#" data-role="close">
39                <svg fill="currentColor" height="24" viewBox="0 0 24 24" width="24">
40                    <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
41                </svg>
42            </a>
43        </div>
44    `,{aside:t.querySelector("#es-aside-content"),main:t.querySelector(".es-main"),header:t.querySelector("#es-header-dynamic"),banner:t.querySelector("#es-banner"),results:t.querySelector("#es-results"),close:t.querySelector('[data-role="close"]'),asideContainer:t.querySelector('[data-role="aside"]'),asideOverlay:t.querySelector('[data-role="aside-overlay"]'),asideClose:t.querySelector('[data-role="aside-close"]')}}function ve(t,e,s,a,r,i,n,l,o){let c=`
45        <div class="es-header__row">
46            <button type="button" class="es-header__filter-btn es-mobile-only" data-role="filter-toggle">
47                <svg fill="none" stroke="currentColor" stroke-width="2" width="16" height="16" viewBox="0 0 24 24">
48                    <path stroke-linecap="round" stroke-linejoin="round" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"></path>
49                </svg>
50                Filtros
51            </button>
52            <div class="es-header__layout-icons">
53                <a class="es-icon ${s==="list"?"es-icon--active":""}" href="#" data-layout="list">
54                    <svg fill="currentColor" height="20" viewBox="0 0 24 24" width="20"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/></svg>
55                </a>
56                <a class="es-icon ${s==="grid"?"es-icon--active":""}" href="#" data-layout="grid">
57                    <svg fill="currentColor" height="20" viewBox="0 0 24 24" width="20"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"/></svg>
58                </a>
59                <a class="es-icon ${s==="map"?"es-icon--active":""}" href="#" data-layout="map" title="Ver mapa">
60                    <svg fill="none" stroke="currentColor" stroke-width="2" height="20" viewBox="0 0 24 24" width="20"><path d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l5.447 2.724A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/></svg>
61                </a>
62            </div>
63            <div class="es-header__title">Resultados: <strong>${e}</strong></div>
64            <div class="es-header__sort">
65                <label>Ordenar por:</label>
66                <select data-role="sort">
67                    <option value="relevance" ${a==="relevance"?"selected":""}>Relevancia</option>
68                    <option value="price_asc" ${a==="price_asc"?"selected":""}>Precio ↑</option>
69                    <option value="price_desc" ${a==="price_desc"?"selected":""}>Precio ↓</option>
70                    <option value="rating" ${a==="rating"?"selected":""}>Mejor valorados</option>
71                </select>
72            </div>
73        </div>
74    `;if(r.length>0){c+='<div class="es-suggestions"><span class="es-suggestions__label">Sugerencias:</span>';for(const u of r)c+=`<a class="es-suggestion" href="#" data-suggestion="${p(u)}">${u}</a>`;c+="</div>"}t.innerHTML=c,t.querySelectorAll("[data-layout]").forEach(u=>{u.addEventListener("click",m=>{m.preventDefault(),i(u.dataset.layout)})});const d=t.querySelector('[data-role="sort"]');d==null||d.addEventListener("change",()=>n(d.value)),t.querySelectorAll("[data-suggestion]").forEach(u=>{u.addEventListener("click",m=>{m.preventDefault(),l(u.dataset.suggestion)})});const h=t.querySelector('[data-role="filter-toggle"]');h==null||h.addEventListener("click",u=>{u.preventDefault(),o()})}function we(t,e,s,a){let r="";e.priceRange.max>0&&(r+=G("Mejor Precio",`
75            <div class="es-price-range">
76                <div class="es-price-inputs">
77                    <input type="number" class="es-price-input" data-role="price-min" 
78                           value="${s.priceMin??e.priceRange.min}" min="${e.priceRange.min}" max="${e.priceRange.max}"
79                           placeholder="${g(e.priceRange.min)}">
80                    <span class="es-price-sep">—</span>
81                    <input type="number" class="es-price-input" data-role="price-max" 
82                           value="${s.priceMax??e.priceRange.max}" min="${e.priceRange.min}" max="${e.priceRange.max}"
83                           placeholder="${g(e.priceRange.max)}">
84                </div>
85                <input type="range" class="es-range-slider" data-role="price-slider"
86                       min="${e.priceRange.min}" max="${e.priceRange.max}"
87                       value="${s.priceMax??e.priceRange.max}" step="100">
88            </div>
89        `)),e.brands.length>0&&(r+=x("Marca","brand",e.brands,s.brands)),e.categories.length>0&&(r+=x("Categoría","category",e.categories,s.categories)),e.tipos.length>0&&(r+=x("Qué buscas?","tipo",e.tipos,s.tipos)),e.comunas.length>0&&(r+=x("Ubicación","comuna",e.comunas,s.comunas)),t.innerHTML=r,t.querySelectorAll("[data-facet-toggle]").forEach(o=>{o.addEventListener("click",c=>{c.preventDefault();const d=o.closest(".es-panel");d==null||d.classList.toggle("es-panel--collapsed")})}),t.querySelectorAll(".es-term").forEach(o=>{o.addEventListener("click",()=>{const c=o.dataset.facet,d=o.dataset.value,h=c==="brand"?s.brands:c==="category"?s.categories:c==="comuna"?s.comunas:s.tipos;h.has(d)?h.delete(d):h.add(d),a()})}),t.querySelectorAll("[data-toggle-more]").forEach(o=>{o.addEventListener("click",()=>{const c=o.closest(".es-panel__content");c==null||c.classList.toggle("es-show-all"),o.textContent=c!=null&&c.classList.contains("es-show-all")?"Ocultar…":"Mostrar más…"})});const i=t.querySelector('[data-role="price-min"]'),n=t.querySelector('[data-role="price-max"]'),l=t.querySelector('[data-role="price-slider"]');if(i&&n){const o=()=>{s.priceMin=parseInt(i.value)||null,s.priceMax=parseInt(n.value)||null,a()};i.addEventListener("change",o),n.addEventListener("change",o)}l&&n&&(l.addEventListener("input",()=>{n.value=l.value}),l.addEventListener("change",()=>{s.priceMax=parseInt(l.value)||null,a()}))}function G(t,e){return`
90        <div class="es-panel">
91            <a class="es-panel__title" href="#" data-facet-toggle>${t}</a>
92            <div class="es-panel__content">${e}</div>
93        </div>
94    `}function x(t,e,s,a){let i="";return s.forEach((n,l)=>{const o=a.has(n.value),c=l>=10?"es-term--extra":"";i+=`
95            <div class="es-term ${c} ${o?"es-term--active":""}" data-facet="${e}" data-value="${p(n.value)}">
96                <span class="es-term__value">${n.value}</span>
97                <span class="es-term__count">${n.count}</span>
98            </div>
99        `}),s.length>10&&(i+='<button class="es-show-more-btn" data-toggle-more>Mostrar más…</button>'),G(t,i)}function ye(t,e,s,a,r){if(e.length===0){let o="";if(a&&a.length>0){o='<div class="es-corrections"><span>¿Quisiste decir:</span> ';for(const c of a)o+=`<a class="es-correction-link" href="#" data-correction="${p(c)}">${c}</a>`;o+="</div>"}t.innerHTML=`
100            <div class="es-empty-full">
101                <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="56" height="56">
102                    <path d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"/>
103                </svg>
104                <h3>No encontramos resultados</h3>
105                <p>Intenta con otra búsqueda o modifica los filtros</p>
106                ${o}
107            </div>
108        `,r&&t.querySelectorAll("[data-correction]").forEach(c=>{c.addEventListener("click",d=>{d.preventDefault(),r(c.dataset.correction)})});return}const i=s==="list"?1:5,n=50;let l=`<div class="es-grid es-grid--${s}">`;for(let o=0;o<e.length;o++){const c=e[o],d=Math.floor(o/i),h=o%i,m=(d+h)*n,v=c.salePrice??c.price,_=c.salePrice!==null&&c.salePrice<c.price;let w="";_?w=`
109                <span class="es-card__price es-card__price--old">${g(c.price)}</span>
110                <span class="es-card__price es-card__price--new">${g(c.salePrice)}</span>
111            `:w=`<span class="es-card__price">${g(v)}</span>`;const E=c.imageLink||"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 200 200%22><rect fill=%22%23f3f4f6%22 width=%22200%22 height=%22200%22/></svg>";l+=`
112            <div class="es-card" data-id="${c.id}" style="--es-delay: ${m}ms">
113                <a class="es-card__main" href="${c.link}">
114                    <figure class="es-card__image">
115                        <img src="${E}" alt="${p(c.title)}" loading="lazy">
116                        <button type="button" class="es-card__quickview" data-quickview="${c.id}" title="Vista rápida">
117                            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
118                                <path d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"/>
118
119                                <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
120                            </svg>
121                        </button>
122                    </figure>
123                    <div class="es-card__content">
124                        <div class="es-card__title">${c.title}</div>
125                        <div class="es-card__description">${W(Q(c.description),120)}</div>
126                        <div class="es-card__pricing">${w}</div>
127                        ${j(c.rating)}
128                    </div>
129                </a>
130            </div>
131        `}l+="</div>",t.innerHTML=l}function Q(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}function W(t,e){return t.length<=e?t:t.substring(0,e).trim()+"…"}function be(t){let e='<div class="es-grid es-grid--grid">';for(let s=0;s<8;s++)e+=`
132            <div class="es-card es-card--skeleton">
133                <div class="es-card__main">
134                    <figure class="es-card__image es-shimmer"></figure>
135                    <div class="es-card__content">
136                        <div class="es-skel-line es-shimmer" style="width:80%"></div>
137                        <div class="es-skel-line es-shimmer" style="width:60%"></div>
138                        <div class="es-skel-line es-shimmer" style="width:30%"></div>
139                    </div>
140                </div>
141            </div>
142        `;e+="</div>",t.innerHTML=e}function Le(t,e,s,a,r,i){var l;let n="";if(e.length>0){n+=`
143            <div class="es-welcome-section">
144                <div class="es-welcome-header">
145                    <span class="es-welcome-title">
146                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
147                            <path d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
148                        </svg>
149                        Búsquedas recientes
150                    </span>
151                    <button class="es-welcome-clear" data-role="clear-history">Limpiar</button>
152                </div>
153                <div class="es-history-chips">
154        `;for(const o of e)n+=`<a class="es-history-chip" href="#" data-history="${p(o)}">${o}</a>`;n+="</div></div>"}if(s.length>0){const o=Math.max(...s.map(c=>c.count));n+=`
155            <div class="es-welcome-section">
156                <div class="es-welcome-header">
157                    <span class="es-welcome-title">
158                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
159                            <path d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
160                        </svg>
161                        Lo más buscado
162                    </span>
163                </div>
164                <div class="es-trending-chips">
165        `;for(const{tag:c,count:d}of s){const h=.75+d/o*.35;n+=`<a class="es-trending-chip" href="#" data-trending="${p(c)}" style="font-size: ${h}em">${c} <span class="es-trending-count">${d}</span></a>`}n+="</div></div>"}n||(n=`
166            <div class="es-empty-full">
167                <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="48" height="48">
168                    <path d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"/>
169                </svg>
170                <h3>Empieza a buscar</h3>
171                <p>Escribe para encontrar actividades y experiencias</p>
172            </div>
173        `),t.innerHTML=n,t.querySelectorAll("[data-history]").forEach(o=>{o.addEventListener("click",c=>{c.preventDefault(),a(o.dataset.history)})}),(l=t.querySelector('[data-role="clear-history"]'))==null||l.addEventListener("click",()=>{r()}),t.querySelectorAll("[data-trending]").forEach(o=>{o.addEventListener("click",c=>{c.preventDefault(),i(o.dataset.trending)})})}function ke(t,e,s,a){if(e.length===0){t.innerHTML="";return}const r=s.toLowerCase();let i='<div class="es-autocomplete">';for(const n of e){const l=n.toLowerCase().indexOf(r);let o;l>=0?o=p(n.substring(0,l))+"<strong>"+p(n.substring(l,l+s.length))+"</strong>"+p(n.substring(l+s.length)):o=p(n),i+=`<a class="es-autocomplete__item" href="#" data-ac="${p(n)}">${o}</a>`}i+="</div>",t.innerHTML=i,t.querySelectorAll("[data-ac]").forEach(n=>
173{n.addEventListener("click",l=>{l.preventDefault(),a(n.dataset.ac)})})}function N(t,e){const s=document.createElement("div");s.className="es-quickview-overlay";const a=t.salePrice??t.price,r=t.salePrice!==null&&t.salePrice<t.price,i=t.imageLink||"";let n=`<span class="es-quickview__price">${g(a)}</span>`;r&&(n=`
174            <span class="es-quickview__oldprice">${g(t.price)}</span>
175            <span class="es-quickview__price">${g(t.salePrice)}</span>
176        `);const l=W(Q(t.description),300),o=(t.brand||"").toLowerCase().trim(),c=(t.proveedor||"").toLowerCase().trim(),d=t.brand&&o!==c;s.innerHTML=`
177        <div class="es-quickview">
178            <button type="button" class="es-quickview__close" data-role="qv-close">
179                <svg fill="currentColor" height="18" viewBox="0 0 24 24" width="18">
180                    <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
181                </svg>
182            </button>
183            ${i?`<img class="es-quickview__image" src="${i}" alt="${p(t.title)}">`:""}
184            <div class="es-quickview__body">
185                <h3 class="es-quickview__title">${p(t.title)}</h3>
186                <div class="es-quickview__provider">
187                    ${t.proveedor?`por <strong>${p(t.proveedor)}</strong>`:""}
188                    ${d?` · ${p(t.brand)}`:""}
189                    ${t.comuna?` · 📍 ${p(t.comuna)}`:""}
190                </div>
191                ${t.tipo?`<div class="es-quickview__tipo">${p(t.tipo)}</div>`:""}
192                <div class="es-quickview__desc">${l}</div>
193                <div class="es-quickview__meta">
194                    ${n}
195                    ${j(t.rating)}
196                </div>
197                <a class="es-quickview__cta" href="${t.link}">
198                    Ver actividad
199                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
200                        <path d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/>
201                    </svg>
202                </a>
203            </div>
204        </div>
205    `,s.querySelector('[data-role="qv-close"]').addEventListener("click",e),s.addEventListener("click",u=>{u.target===s&&e()});const h=u=>{u.key==="Escape"&&(e(),document.removeEventListener("keydown",h))};return document.addEventListener("keydown",h),s}const _e={feedUrl:"https://entrekidscl.s3.amazonaws.com/feed/entrekids/actividad-evento-3td4j21iqaoqwfyc.xml",maxResults:60,cacheTTL:30,placeholder:"Busca actividades y proveedores",debounceMs:300,bannerUrl:""};class J{constructor(e,s={}){this.items=[],this.filteredItems=[],this.isLoaded=!1,this.isLoading=!1,this.debounceTimer=null,this.currentLayout="grid",this.filters=S(),this.facets=null,this.lastQuery="",this.termIndex=[],this.focusedCardIndex=-1,this.mapView=null,this.mapContainerEl=null,this.bannerToken=0,this.isMobileDrawerOpen=!1,this._scrollObserver=null,this.container=e,this.options={..._e,...s},e.dataset.feedUrl&&(this.options.feedUrl=e.dataset.feedUrl),e.dataset.placeholder&&(this.options.placeholder=e.dataset.placeholder),e.dataset.bannerUrl&&(this.options.bannerUrl=e.dataset.bannerUrl),this.build(),this.bindEvents()}build(){this.container.classList.add("es-container"),this.container.innerHTML=`
206            <div class="es-input-wrapper">
207                <input type="text" class="es-input" placeholder="${this.options.placeholder}" autocomplete="off" spellcheck="false">
208                <svg class="es-search-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
209                    <path d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"/>
210                </svg>
211            </div>
212        `,this.input=this.container.querySelector(".es-input"),this.overlay=document.createElement("div"),this.overlay.className="es-overlay",document.body.appendChild(this.overlay),this.fullscreen=document.createElement("div"),this.fullscreen.className="es-fullscreen",document.body.appendChild(this.fullscreen);const e=ge(this.fullscreen);this.asideEl=e.aside,this.headerEl=e.header,this.bannerEl=e.banner,this.resultsEl=e.results,this.asideContainer=e.asideContainer,this.asideOverlay=e.asideOverlay,this.asideClose=e.asideClose,this.asideOverlay.addEventListener("click",()=>this.closeMobileDrawer()),this.asideClose.addEventListener("click",()=>this.closeMobileDrawer()),this.fsInput=this.fullscreen.querySelector('[data-role="fs-search"]'),this.fsClear=this.fullscreen.querySelector('[data-role="fs-clear"]'),this.acContainer=document.createElement("div"),this.acContainer.className="es-autocomplete-wrapper",this.fsInput&&this.fsInput.parentElement&&this.fsInput.parentElement.appendChild(this.acContainer),e.close.addEventListener("click",
212s=>{s.preventDefault(),this.close()}),this.resultsEl.addEventListener("click",s=>{const a=s.target.closest(".es-card__quickview");if(!a)return;s.preventDefault(),s.stopPropagation();const r=a.dataset.quickview;if(!r)return;const i=this.filteredItems.find(l=>l.id===r);if(!i)return;let n=null;n=N(i,()=>{n==null||n.remove()}),document.body.appendChild(n)})}bindEvents(){this.input.addEventListener("focus",()=>{this.loadFeed()}),this.input.addEventListener("input",()=>{this.debouncedSearch()}),this.input.addEventListener("keydown",e=>{e.key==="Escape"?(this.close(),this.input.blur()):e.key==="Enter"&&(e.preventDefault(),this.doSearch())}),this.overlay.addEventListener("click",()=>this.close()),this.fsInput&&(this.fsInput.addEventListener("input",()=>{this.input.value=this.fsInput.value,this.showAutocomplete(this.fsInput.value),this.debouncedSearch()}),this.fsInput.addEventListener("keydown",e=>{e.key==="Escape"?(this.clearAutocomplete(),this.close()):e.key==="Enter"&&(e.preventDefault(),this.clearAutocomplete(),this.doSearch())})),this.fsClear&&this.fsClear.addEventListener("click",()=>{this.input.value="",this.fsInput&&(this.fsInput.value="",this.fsInput.focus()),this.clearAutocomplete(),this.showWelcome()}),document.addEventListener("keydown",e=>{this.fullscreen.classList.contains("es-open")&&(e.key==="Escape"?this.close():e.key==="ArrowDown"?(e.preventDefault(),this.moveFocus(1)):e.key==="ArrowUp"?(e.preventDefault(),this.moveFocus(-1)):e.key==="Enter"&&this.focusedCardIndex>=0&&(e.preventDefault(),this.openFocusedCard()))})}async loadFeed(){if(!(this.isLoaded||this.isLoading)){this.isLoading=!0;try{this.items=await Z(this.options.feedUrl,this.options.cacheTTL),this.isLoaded=!0,this.facets=B(this.items),this.termIndex=ne(this.items),this.input.value.trim().length>=2?this.doSearch():this.fullscreen.classList.contains("es-open")&&this.showWelcome()}catch(e){console.error("[EverySearch] Failed to load feed",e)}finally{this.isLoading=!1}}}debouncedSearch(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.doSearch(),this.options.debounceMs)}updateBanner(e){if(!this.bannerEl)return;const s=(e||"").trim();if(!this.options.bannerUrl||s.length<2){this.bannerEl.innerHTML="";return}const a=++this.bannerToken,r=this.options.bannerUrl.indexOf("?")>=0?"&":"?",i=this.options.bannerUrl+r+"q="+encodeURIComponent(s);fetch(i,{credentials:"same-origin"}).then(n=>n.ok?n.text():"").then(n=>{a===this.bannerToken&&(this.bannerEl.innerHTML=n||"")}).catch(()=>{})}doSearch(){const e=this.input.value.trim();if(e.length<2){this.showWelcome();return}if(this.lastQuery=e,this.focusedCardIndex=-1,this.open(),this.clearAutocomplete(),this.cleanupScrollObserver(),!this.isLoaded){be(this.resultsEl),this.loadFeed();return}const s=se(this.items,e,this.options.maxResults);let a=s.map(l=>l.item);const r=this.getSuggestions(e,a);a=D(a,this.filters),a=F(a,this.filters.sortBy),this.filteredItems=a;const i=B(s.map(l=>l.item));ie(e);let n=[];a.length===0&&this.termIndex.length>0&&(n=ce(e,this.termIndex,3)),this.renderSidebarUI(i),this.renderHeaderUI(a.length,r),this.updateBanner(e),this.currentLayout==="map"?this.showMap(a):(this.hideMap(),ye(this.resultsEl,a,this.currentLayout,n,l=>{this.input.value=l,this.syncFsInput(l),this.filters=S(),this.doSearch()}))}showWelcome(){this.open(),this.hideMap(),this.focusedCardIndex=-1,this.bannerEl&&(this.bannerEl.innerHTML=""),this.isLoaded||this.loadFeed();const e=U(),s=this.getTrendingTags();this.facets?this.renderSidebarUI(this.facets):this.asideEl.innerHTML="",this.renderHeaderUI(this.items.length,[]);const a=F(D(this.items,this.filters),this.filters.sortBy);this.filteredItems=a;const r=24;let i=0;this.resultsEl.innerHTML="";const n=document.createElement("div");Le(n,e,s,d=>{this.input.value=d,this.syncFsInput(d),this.doSearch()},()=>{re(),this.showWelcome()},d=>{this.input.value=d,this.syncFsInput(d),this.doSearch()}),this.resultsEl.appendChild(n);const l=document.createElement("div");l.className=`es-grid es-grid--${this.currentLayout}`,this.resultsEl.appendChild(l);const o=document.createElement("div");o.className="es-scroll-sentinel",o.innerHTML='<div class="es-loading-more"><span class="es-dot-pulse"></span></div>',this.resultsEl.appendChild(o);const c=()=>{const d=a.slice(i,i+r);if(d.length===0){o.remove();return}for(let h=0;h<d.length;h++){const u=d[h],m=i+h,v=this.currentLayout==="list"?1:5,_=Math.floor(m/v),w=m%v,E=(_+w)*50,M=this.createCardElement(u,E);l.appendChild(M)}i+=d.length,i>=a.length&&o.remove()};if(c(),i<a.length){const d=new IntersectionObserver(h=>{h[0].isIntersecting&&(c(),i>=a.length&&d.disconnect())},{root:this.resultsEl,rootMargin:"200px"});d.observe(o),this._scrollObserver=d}}cleanupScrollObserver(){this._scrollObserver&&(this._scrollObserver.disconnect(),this._scrollObserver=null)}createCardElement(e,s){const a=e.salePrice??e.price,r=e.salePrice!==null&&e.salePrice<e.price;let i="";r?i=`
213                <span class="es-card__price es-card__price--old">${this.formatPriceLocal(e.price)}</span>
214                <span class="es-card__price es-card__price--new">${this.formatPriceLocal(e.salePrice)}</span>
215            `:i=`<span class="es-card__price">${this.formatPriceLocal(a)}</span>`;const n=e.imageLink||"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 200 200%22><rect fill=%22%23f3f4f6%22 width=%22200%22 height=%22200%22/></svg>",l=document.createElement("div");return l.className="es-card",l.dataset.id=e.id,l.style.setProperty("--es-delay",`${s}ms`),l.innerHTML=`
216            <a class="es-card__main" href="${e.link}">
217                <figure class="es-card__image">
218                    <img src="${n}" alt="${e.title}" loading="lazy">
219                    <button type="button" class="es-card__quickview" data-quickview="${e.id}" title="Vista rápida">
220                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16">
221                            <path d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"/>
222                            <path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
223                        </svg>
224                    </button>
225                </figure>
226                <div class="es-card__content">
227                    <div class="es-card__title">${e.title}</div>
228                    <div class="es-card__pricing">${i}</div>
229                </div>
230            </a>
231        `,l}formatPriceLocal(e){return e===0?"Gratis":"$ "+e.toLocaleString("es-CL")}getTrendingTags(){if(!this.isLoaded)return[];const e=new Map;for(const s of this.items)for(const a of s.tags){const r=a.trim();r.length>1&&e.set(r,(e.get(r)||0)+1)}return Array.from(e.entries()).map(([s,a])=>({tag:s,count:a})).sort((s,a)=>a.count-s.count).slice(0,12)}renderSidebarUI(e){we(this.asideEl,e,this.filters,()=>{this.doSearch()})}renderHeaderUI(e,s){ve(this.headerEl,e,this.currentLayout,this.filters.sortBy,s,a=>{this.currentLayout=a,this.doSearch()},a=>{this.filters.sortBy=a,this.doSearch()},a=>{this.input.value=a,this.filters=S(),this.doSearch()},()=>{this.openMobileDrawer()}),this.fsInput&&(this.fsInput.value=this.input.value)}showAutocomplete(e){if(e.trim().length<1||!this.termIndex.length){this.clearAutocomplete();return}const s=oe(e.trim(),this.termIndex,6);ke(this.acContainer,s,e.trim(),a=>{this.input.value=a,this.syncFsInput(a),this.clearAutocomplete(),this.doSearch()})}clearAutocomplete(){this.acContainer.innerHTML=""}syncFsInput(e){this.fsInput&&(this.fsInput.value=e)}getSuggestions(e,s){const a=new Set,r=[],i=e.toLowerCase();for(const n of s)for(const l of n.tags){const o=l.toLowerCase();if(o.includes(i)&&!a.has(o)&&o!==i&&(a.add(o),r.push(l),r.length>=5))return r}for(const n of s){const l=n.brand.toLowerCase();if(l.includes(i)&&!a.has(l)&&l!==i&&(a.add(l),r.push(n.brand),r.length>=5))return r}return r}moveFocus(e){var r;const s=this.resultsEl.querySelectorAll(".es-card:not(.es-card--skeleton)");if(s.length===0)return;(r=s[this.focusedCardIndex])==null||r.classList.remove("es-card--focused"),this.focusedCardIndex+=e,this.focusedCardIndex<0&&(this.focusedCardIndex=0),this.focusedCardIndex>=s.length&&(this.focusedCardIndex=s.length-1);const a=s[this.focusedCardIndex];a.classList.add("es-card--focused"),a.scrollIntoView({block:"nearest",behavior:"smooth"})}openFocusedCard(){const s=this.resultsEl.querySelectorAll(".es-card:not(.es-card--skeleton)")[this.focusedCardIndex];if(!s)return;const a=s.querySelector("a");a&&(window.location.href=a.href)}async showMap(e){this.mapContainerEl||(this.mapContainerEl=document.createElement("div"),this.mapContainerEl.className="es-map-container",this.mapContainerEl.id="es-map"),this.resultsEl.innerHTML="",this.resultsEl.classList.add("es-results--map"),this.resultsEl.appendChild(this.mapContainerEl),this.mapView||(this.mapView=new me(this.mapContainerEl),await this.mapView.init()),this.mapView.invalidateSize(),this.mapView.updateMarkers(e,s=>{let a=null;a=N(s,()=>{a==null||a.remove()}),document.body.appendChild(a)})}hideMap(){this.resultsEl.classList.remove("es-results--map"),this.mapContainerEl&&this.mapContainerEl.parentElement===this.resultsEl&&this.mapContainerEl.remove()}open(){this.overlay.classList.add("es-open"),this.fullscreen.classList.add("es-open"),document.body.style.overflow="hidden"}close(){this.overlay.classList.remove("es-open"),this.fullscreen.classList.remove("es-open"),document.body.style.overflow="",this.clearAutocomplete(),this.cleanupScrollObserver(),this.focusedCardIndex=-1,this.closeMobileDrawer()}openMobileDrawer(){this.isMobileDrawerOpen=!0,this.asideContainer.classList.add("es-aside--open"),this.asideOverlay.classList.add("es-open"),this.fullscreen.classList.add("es-drawer-open")}closeMobileDrawer(){this.isMobileDrawerOpen=!1,this.asideContainer.classList.remove("es-aside--open"),this.asideOverlay.classList.remove("es-open"),this.fullscreen.classList.remove("es-drawer-open")}destroy(){this.close(),this.overlay.remove(),this.container.classList.remove("es-container")}openModal(){this.loadFeed(),this.input.value.trim()===""?this.showWelcome():(this.open(),this.doSearch()),setTimeout(()=>{this.fsInput&&window.innerWidth<992?this.fsInput.focus():this.fsInput?this.fsInput.focus():this.input.focus()},50)}}function R(){document.querySelectorAll(".every-search-container").forEach(t=>{if(!t.dataset.everySearchInit){const e={};let s="entrekids";try{window._esm&&(s=atob(window._esm).trim()||"entrekids")}catch{}t.dataset.feedUrl?e.feedUrl=t.dataset.feedUrl:e.feedUrl=`https://entrekidscl.s3.amazonaws.com/feed/${s}/actividad-evento-3td4j21iqaoqwfyc.xml`;const a=new J(t,e);document.querySelectorAll(".search-fancy-trigger").forEach(r=>{r.addEventListener("click",i=>
231{i.preventDefault(),a.openModal()})}),t.dataset.everySearchInit="true"}})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",R):R();window.EverySearch=J;

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.