PageSourceSearch

https://aldousbio.com/cdn/shop/t/78/assets/entrega-estimada-aldous.min.js?v=50407174970483129701772544231

js aldousbio.com collected 2026-10-04 00:16:15 UTC 3,785 bytes, 1 lines download raw bytes

1function calculaEntregaEstimada(t){if(!t)return;inicializarTemporizador(new Date,t)}function getDiaSemana(t,e){let a=t.toLocaleDateString(e,{weekday:"long"});return a.charAt(0).toUpperCase()+a.slice(1)}function getFechaSinDia(t,e){return t.toLocaleDateString(e,{day:"numeric",month:"long"})}function esFestivo(t,e){const a=t.toISOString().split("T")[0];return e.includes(a)}function esDiaLaborable(t,e,a=!1){const n=t.getDay();return!(!a&&(0===n||6===n))&&!esFestivo(t,e)}function calcularHoraCorte(t,e,a){const n=new Date(t),i=t.getHours(),o=t.getMinutes();(i>e||i===e&&o>=a)&&n.setDate(n.getDate()+1),n.setHours(e,a,0,0);const r=n-t;return{horas:Math.floor(r/36e5),minutos:Math.floor(r%36e5/6e4),segundos:Math.floor(r%6e4/1e3)}}function calcularEntregaEstimada(t,e){const a=e.holidays||[],n=e.extra_days||0,i=e.weekend_delivery||!1,o=e.cutoff_time||"13:00",[r,s]=o.split(":").map(Number);let c=1;e.peak_season&&(c+=n);let d=c+1,u=new Date(t),l=0;for(;l<c;)u.setDate(u.getDate()+1),esDiaLaborable(u,a,i)&&l++;let m=new Date(t);for(l=0;l<d;)m.setDate(m.getDate()+1),esDiaLaborable(m,a,i)&&l++;const g=e.date_locale||"es-ES",f=new Date(t);f.setDate(f.getDate()+1),f.setHours(0,0,0,0);const _=new Date(u);let w;if(_.setHours(0,0,0,0),_.getTime()===f.getTime())w=e.tomorrow_text||"mañana";else{const t=getDiaSemana(u,g),a=getFechaSinDia(u,g);w=(e.weekday_article?e.weekday_article+" ":"")+t+" "+a}return{fechaMinFormato:w,fechaMaxFormato:getDiaSemana(m,g)+" "+getFechaSinDia(m,g),cutoffHour:r,cutoffMinute:s}}function actualizarContador(t,e,a){const n=calcularHoraCorte(new Date,e,a),i=0!=n.horas?n.horas+" "+t.hours_label+" "+t.time_separator+" "+n.minutos+" "+t.minutes_label:n.minutos+" "+t.minutes_label,o=t.ids&&t.ids.countdown?t.ids.countdown:"contador-tiempo",r=document.getElementById(o);r&&(r.textContent=i)}function inicializarTemporizador(t,e){const a=e.ids&&e.ids.countdown?e.ids.countdown:"countdown",n=e.ids&&e.ids.estimated_date?e.ids.estimated_date:"estimated_date",i=document.getElementById(a),o=document.getElementById(n);if(!i||!o)return;const{fechaMinFormato:r,fechaMaxFormato:s,cutoffHour:c,cutoffMinute:d}=calcularEntregaEstimada(t,e),u=e.start_time||"06:00",[l,m]=u.split(":").map(Number),g=t.getHours(),f=t.getMinutes();if((g>l||g===l&&f>=m)&&(g<c||g===c&&f<d)){const a=calcularHoraCorte(t,c,d),n=0!=a.horas?e.before_countdown_text_in_range+" "+a.horas+" "+e.hours_label+" "+e.time_separator+" "+a.minutos+" "+e.minutes_label:e.before_countdown_text_in_range+" "+a.minutos+" "+e.minutes_label;i.innerHTML=n,i.dataset.intervalInitialized||(setInterval(()=>actualizarContador(e,c,d),6e4),i.dataset.intervalInitialized="true")}else i.innerHTML=e.before_countdown_text_out_range;if(o){const t=r+" "+e.between_dates_text+" "+s;o.innerHTML=t}}void 0===window.initEntregaEstimada&&(window.initEntregaEstimada=function(t){let e=null,a=null;if(e="mini"===t?document.querySelector("script[data-entrega-config-mini]"):"main"===t?document.querySelector("script[data-entrega-config-main]"):document.querySelector("script[data-entrega-config-mini]")||document.querySelector("script[data-entrega-config-main]"),e){try{a=JSON.parse(e.textContent)}catch(t){return}"mini"===t||e.hasAttribute("data-entrega-config-mini")?a.ids={entrega:"entregaEstimada-mini",countdown:"countdown-mini",estimated_date:"estimated_date-mini"}:a.ids={entrega:"entregaEstimada-main",countdown:"countdown-main",estimated_date:"estimated_date-main"},"function"==typeof calculaEntregaEstimada&&calculaEntregaEstimada(a)}},document.addEventListener("cart:refresh",t=>{const e=t.detail&&t.detail.replacementDelay||750;setTimeout(()=>{window.initEntregaEstimada("mini")},e+100)}),document.addEventListener("openable-element:open",t=>{t.target&&"mini-cart"===t.target.id&&window.initEntregaEstimada("mini")}));

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.