PageSourceSearch

https://portalcaparao.com.br/wp-content/themes/portal-caparao/assets/dist/js/nucleo-main.min.js?ver=0.19.0

js portalcaparao.com.br collected 2026-09-25 04:11:55 UTC 8,574 bytes, 2 lines download raw bytes

1/*! For license information please see nucleo-main.min.js.LICENSE.txt */
2(()=>{var e={"./assets/dev/js/components/menu-and-search.js"(){document.addEventListener("DOMContentLoaded",function(){var e=!1,t=!1,n=!1;function o(){e=!e,document.querySelectorAll(".popup-shadow").forEach(function(t){t.classList.toggle("active",e)})}function a(){var e,a,r,s;t?(t=!1,null===(e=document.getElementById("menu-burger"))||void 0===e||e.classList.remove("active"),null===(a=document.getElementById("menu-mobile"))||void 0===a||a.classList.remove("active"),o()):(t=!0,null===(r=document.getElementById("menu-burger"))||void 0===r||r.classList.add("active"),null===(s=document.getElementById("menu-mobile"))||void 0===s||s.classList.add("active"),o()),n&&i()}function i(){var e=document.querySelector("#search-form");n?(n=!1,o(),null==e||e.classList.remove("active")):(n=!0,o(),null==e||e.classList.add("active"),setTimeout(function(){var t;null===(t=e.querySelector("input"))||void 0===t||t.focus()},300)),t&&a()}var r=document.getElementById("menu-burger");r&&r.addEventListener("click",function(){a()});var s=document.getElementById("search-btn");s&&s.addEventListener("click",function(){i()}),document.querySelectorAll(".popup-shadow").forEach(function(e){e.addEventListener("click",function(){t&&a(),n&&i()})}),document.querySelectorAll(".offcanvas-close").forEach(function(e){e.addEventListener("click",function(){t&&a()})}),document.querySelectorAll(".sub-parent").forEach(function(e){e.addEventListener("click",function(){var t=e.dataset.parent;e.classList.toggle("open");var n=document.querySelector('ul.sub-menu[data-child="'+t+'"]');n&&n.classList.toggle("open")})})})},"./assets/dev/js/components/weather.js"(){var e=document.getElementById("weather-block"),t="wx-user-daily-v1";function n(){e&&e.parentNode&&e.parentNode.removeChild(e)}function o(t){var n,o,a="wx-icon-"+t.code,i=(n=t.code,null!==(o={0:"Céu limpo",1:"Quase limpo",2:"Parcialmente nublado",3:"Nublado",45:"Névoa úmida",48:"Névoa úmida",51:"Garoa fraca",53:"Garoa",55:"Garoa forte",61:"Chuva fraca",63:"Chuva",65:"Chuva forte",71:"Neve fraca",73:"Neve",75:"Neve forte",80:"Aguaceiros fracos",81:"Aguaceiros",82:"Aguaceiros fortes",95:"Trovoadas"}[n])&&void 0!==o?o:"");!function(t,n,o,a,i,r){e.innerHTML='<div class="flex gap-3 items-center w-full"><span title="'+i+'" style="height: 24px;width: 24px" role="icon" aria-hidden="true" class="bg-cover '+a+'"></span><div class="flex flex-1 flex-col leading-tight gap-0.5"><div class="flex gap-1 items-center"><span class="text-xs text-slate-700 font-semibold truncate">'+t+'°C Máx.</span><span class="text-xs text-slate-900/90 font-semibold truncate">'+n+"°C Mín.</span></div>"+(r?'<span title="Hoje em '+r+'" class="text-[11px] text-slate-900/90 line-clamp-1">Hoje em '+r+"</span>":"")+"</div></div>"}(t.max,t.min,t.rain,a,i,t.place)}document.addEventListener("DOMContentLoaded",function(){var e,a=function(){try{var e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return null}}();a&&(e=a.ts)&&(Date.now()-e)/6e4<20?o(a):navigator.geolocation?navigator.geolocation.getCurrentPosition(function(e){var a,i,r;(a=e.coords.latitude,i=e.coords.longitude,r="https://nucleo.eload.dev/wp-json/nucleo/v1/weather?lat="+encodeURIComponent(a)+"&lon="+encodeURIComponent(i)+"&mode=daily",fetch(r).then(function(e){return e.json()}).then(function(e){if(e.error)throw new Error(e.error);return function(e){try{var n=Object.assign({},e,{ts:Date.now()});localStorage.setItem(t,JSON.stringify(n))}catch(e){}}(e),e})).then(function(e){o(e)}).catch(function(){n()})},function(){a&&a.max&&a.min?o(a):n()}):n()})},"./assets/dev/js/modules/advertisings.js"(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){var t=document.querySelectorAll("[data-ad]");if(0!==t.length){var n=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,o=null;t.forEach(function(e){o=e.getAttribute("data-location")}),fetch("/wp-json/nucleo/v1/advertisings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({location:o})}).then(function(e){if(!e.ok)throw new Error("Request failed");return e.json()}).then(function(o){var s,c=o&&o.data&&o.data.list?o.data.list:null;if((s=Array.isArray(c)?c:c&&"object"===e(c)?Object.keys(c).map(function(e){return c[e]}):[]).length){var l=function(e){for(var t=e.slice(),n=t.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),a=t[n];t[n]=t[o],t[o]=a}return t}(s),d=0,u=[];t.forEach(function(e){var t=e.getAttribute("data-location"),o=e.getAttribute("data-position"),s=e.getAttribute("data-hook")||"";if(t&&o){var c=e.querySelector(".pub-item");if(c){c.classList.remove("animate-pulse");for(var f=e.getAttribute("data-size")||"default",m=null,v=null,p=l.length,h=0;h<p;){var g=(d+h)%p,y=l[g];if("image"===y.type)if(-1!==(Array.isArray(y.location)?y.location:[y.location]).indexOf(t)){var b=Array.isArray(y.position)?y.position:y.position?[y.position]:[];if(b.length&&-1===b.indexOf(o))h++;else if(a(y))if(i(y)){var w=r(y);if(w&&w.url){if("in_text"!==s){if("sidebar"===f&&w.width&&w.width>300){h++;continue}if("sidebar"!==f&&!n&&w.width&&w.width<600){h++;continue}}m=y,v=w,(d=g+1)>=p&&(d=0);break}h++}else h++;else h++}else h++;else h++}if(m&&v){var S=v,j=parseInt(m.id,10),x=document.createElement("a");x.href=m.url||"#",x.target="_blank",x.rel="noopener noreferrer",x.className="flex",Number.isNaN(j)||(x.setAttribute("data-ad-id",String(j)),u.push(j),x.addEventListener("click",function(){fetch("/wp-json/nucleo/v1/clicks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:j})}).catch(function(){})}));var E=document.createElement("img");E.src=S.url,E.alt=m.title||"",E.width=S.width||0,E.height=S.height||0,E.className="max-w-full max-h-auto",x.appendChild(E),c.innerHTML="",c.appendChild(x),e.setAttribute("data-ad",String(j))}}}}),u.length>0&&(u=Array.from(new Set(u)),fetch("/wp-json/nucleo/v1/views",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:u})}).then(function(e){console.log("Views updated",e.status)}).catch(function(e){console.log("Views error",e)}))}}).catch(function(e){console.error(e)})}function a(e){return!e.device||"both"===e.device||("mobile"===e.device?n:"desktop"!==e.device||!n)}function i(e){var t=new Date,n=!0,o=!0;return e.start_date&&t<new Date(e.start_date.replace(" ","T"))&&(n=!1),e.end_date&&t>new Date(e.end_date.replace(" ","T"))&&(o=!1),n&&o}function r(e){if(n){if(e.image_mobile&&e.image_mobile.url)return e.image_mobile;if(e.image_desktop&&e.image_desktop.url)return e.image_desktop}else{if(e.image_desktop&&e.image_desktop.url)return e.image_desktop;if(e.image_mobile&&e.image_mobile.url)return e.image_mobile}return null}},1e3)})},"./assets/dev/js/modules/analytics.js"(){document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll("[data-view]"),t=[];e.forEach(function(e){var n=parseInt(e.getAttribute("data-view"),10);Number.isNaN(n)||t.push(n)}),t.length>0&&(t=Array.from(new Set(t)),fetch("/wp-json/nucleo/v1/views",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})}).catch(function(){})),document.querySelectorAll("[data-download]").forEach(function(e){e.addEventListener("click",function(){var e=parseInt(this.getAttribute("data-download"),10);Number.isNaN(e)||fetch("/wp-json/nucleo/v1/downloads",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e})}).catch(function(){})})})})}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};if(!(o in e)){delete t[o];var r=new Error("Cannot find module '"+o+"'");throw r.code="MODULE_NOT_FOUND",r}return e[o](i,i.exports,n),i.exports}n.n=e=>
2{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n("./assets/dev/js/modules/analytics.js"),n("./assets/dev/js/components/menu-and-search.js"),n("./assets/dev/js/components/weather.js"),n("./assets/dev/js/modules/advertisings.js")})()})();

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.