!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;(n=jQuery)(".rappler-topic").select2({placeholder:"Search topics ...",allowClear:!0,minimumInputLength:3,ajax:{dataType:"json",method:"get",delay:250,url:rappler.ajaxURL,data:function(e){return{q:e.term,nonce:rappler.nonces.featuredTopic,action:"rappler-featured-topic"}},processResults:function(e){return{results:e.map((function(e){return{id:e.id,text:e.title}}))}},cache:!0},escapeMarkup:function(e){return e}}),n(".rappler-topic").on("select2:clearing",(function(e){n(e.target).val(null).trigger("change"),n(e.target).html(""),n(e.target).prepend('')}))},function(e,t){!function(e){var t=document.querySelectorAll(".rappler-post");e(".rappler-post").select2({placeholder:"Search posts ...",allowClear:!0,minimumInputLength:3,ajax:{dataType:"json",method:"get",delay:250,url:rappler.ajaxURL,data:function(e){var n=this.attr("data-selected-post-id"),r=[];return""!==t&&t.forEach((function(e){e.getAttribute("data-selected-post-id")!==n&&r.push(e.getAttribute("data-selected-post-id"))})),{q:e.term,exclude:r,nonce:rappler.nonces.topStories,action:"rappler-top-stories"}},processResults:function(e){return{results:e.map((function(e){return{id:e.id,text:e.title}}))}},cache:!0},escapeMarkup:function(e){return e},templateSelection:function(e){return void 0!==e.element&&e.element.parentElement.setAttribute("data-selected-post-id",e.id),e.text}}),e(".rappler-post").on("select2:clearing",(function(t){t.target.setAttribute("data-selected-post-id",""),e(t.target).val(null).trigger("change"),e(t.target).prepend('')}))}(jQuery)},function(e,t){var n;(n=jQuery)(".rappler-movement-topic").select2({placeholder:"Search topics ...",allowClear:!0,minimumInputLength:3,ajax:{dataType:"json",method:"get",delay:250,url:rappler.ajaxURL,data:function(e){return{q:e.term,nonce:rappler.nonces.movementsTopic,action:"rappler-movements-topic"}},processResults:function(e){return{results:e.map((function(e){return{id:e.slug,text:e.title}}))}},cache:!0},escapeMarkup:function(e){return e}}),n(".rappler-topic").on("select2:clearing",(function(e){n(e.target).val(null).trigger("change"),n(e.target).html(""),n(e.target).prepend('')}))},function(e,t,n){"use strict";function r(){var e=document.querySelector(".global-election-banner"),t=document.querySelector(".app-election-banner-container");if(document.documentElement.classList.contains("r6-app")&&t)return t instanceof HTMLElement&&(t.style.display="block"),e&&e instanceof HTMLElement&&(e.style.display="none"),void a();if(!t&&e){var n=document.querySelector(".global-election-banner > .global-election-banner__container"),r=document.querySelector(".global-election-links"),o=(document.querySelectorAll(".sticky-leaderboard"),document.querySelector(".rappler-ad--top-billboard")),i=document.querySelector("main"),u=window.matchMedia("(max-width: 720px)"),c="up",l=0,s=document.documentElement,d=(document.querySelector(".site-header"),document.querySelector(".global-election-banner__mobile-footer")),m=function(){if(e&&n&&!u.matches){e instanceof HTMLElement&&(e.style.display="none",e.offsetHeight,e.style.display="");var t=e.getBoundingClientRect().height;document.documentElement.style.setProperty("--banner-height","".concat(t,"px")),document.body.classList.add("banner-height-calculated")}};m(),window.addEventListener("resize",m);document.body.classList.add("has-election-banner"),window.addEventListener("scroll",(function(){u.matches||(window.scrollY>l?c="down":window.scrollY64&&(r&&r.classList.add("fixed"),n&&n.classList.add("hide"),o?window.matchMedia("(min-width: 1024px)").matches&&o.classList.add("top"):window.matchMedia("(min-width: 1024px)").matches&&i&&i.classList.add("top")):"up"===c&&(r&&r.classList.remove("fixed"),window.scrollY<64&&n&&n.classList.remove("hide"),o?s.scrollTop<180&&o.classList.remove("top"):window.matchMedia("(min-width: 1024px)").matches&&i&&i.classList.remove("top")),l=window.scrollY)})),d&&(u.matches?d.classList.add("show"):d.classList.remove("show"),u.addEventListener("change",(function(e){e.matches?d.classList.add("show"):d.classList.remove("show")})))}else a()}function a(){document.body.classList.remove("has-election-banner"),document.body.classList.remove("banner-height-calculated")}n.r(t),n.d(t,"init",(function(){return r})),n.d(t,"cleanup",(function(){return a})),document.addEventListener("lazy-loaded-template-election-banner",r),r();n(0),n(1),n(2);var o=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,i=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,u=/[^-+\dA-Z]/g;var c={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},l={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return String(e).padStart(t,"0")},d=function(e){var t=e.y,n=e.m,r=e.d,a=e._,o=e.dayName,i=e.short,u=void 0!==i&&i,c=new Date,l=new Date;l.setDate(l[a+"Date"]()-1);var s=new Date;s.setDate(s[a+"Date"]()+1);return c[a+"FullYear"]()===t&&c[a+"Month"]()===n&&c[a+"Date"]()===r?u?"Tdy":"Today":l[a+"FullYear"]()===t&&l[a+"Month"]()===n&&l[a+"Date"]()===r?u?"Ysd":"Yesterday":s[a+"FullYear"]()===t&&s[a+"Month"]()===n&&s[a+"Date"]()===r?u?"Tmw":"Tomorrow":o},m=function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var a=(t-n)/6048e5;return 1+Math.floor(a)},p=function(e){var t=e.getDay();return 0===t&&(t=7),t},f=function(e){return(String(e).match(i)||[""]).pop().replace(u,"").replace(/GMT\+0000/g,"UTC")};function y(e,t){return function(e,t,n){return"undefined"===typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!==typeof n||n%1!==0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}("round",e,t)}function h(){var e=rapplerElectionData.dataUrl,t=document.querySelector(".global-election-banner .global-election-results__details h3"),n=document.querySelector(".global-election-banner .global-election-results__details .stat__percentage"),r=document.getElementById("stat__bar");function a(e,r){t&&n&&(t.innerHTML="As of "+function(e,t,n,r){if(1!==arguments.length||"string"!==typeof e||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var a=(t=String(c[t]||t||c.default)).slice(0,4);"UTC:"!==a&&"GMT:"!==a||(t=t.slice(4),n=!0,"GMT:"===a&&(r=!0));var i=function(){return n?"getUTC":"get"},u=function(){return e[i()+"Date"]()},y=function(){return e[i()+"Day"]()},h=function(){return e[i()+"Month"]()},g=function(){return e[i()+"FullYear"]()},M=function(){return e[i()+"Hours"]()},b=function(){return e[i()+"Minutes"]()},v=function(){return e[i()+"Seconds"]()},T=function(){return e[i()+"Milliseconds"]()},D=function(){return n?0:e.getTimezoneOffset()},w=function(){return m(e)},S=function(){return p(e)},L={d:function(){return u()},dd:function(){return s(u())},ddd:function(){return l.dayNames[y()]},DDD:function(){return d({y:g(),m:h(),d:u(),_:i(),dayName:l.dayNames[y()],short:!0})},dddd:function(){return l.dayNames[y()+7]},DDDD:function(){return d({y:g(),m:h(),d:u(),_:i(),dayName:l.dayNames[y()+7]})},m:function(){return h()+1},mm:function(){return s(h()+1)},mmm:function(){return l.monthNames[h()]},mmmm:function(){return l.monthNames[h()+12]},yy:function(){return String(g()).slice(2)},yyyy:function(){return s(g(),4)},h:function(){return M()%12||12},hh:function(){return s(M()%12||12)},H:function(){return M()},HH:function(){return s(M())},M:function(){return b()},MM:function(){return s(b())},s:function(){return v()},ss:function(){return s(v())},l:function(){return s(T(),3)},L:function(){return s(Math.floor(T()/10))},t:function(){return M()<12?l.timeNames[0]:l.timeNames[1]},tt:function(){return M()<12?l.timeNames[2]:l.timeNames[3]},T:function(){return M()<12?l.timeNames[4]:l.timeNames[5]},TT:function(){return M()<12?l.timeNames[6]:l.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":f(e)},o:function(){return(D()>0?"-":"+")+s(100*Math.floor(Math.abs(D())/60)+Math.abs(D())%60,4)},p:function(){return(D()>0?"-":"+")+s(Math.floor(Math.abs(D())/60),2)+":"+s(Math.floor(Math.abs(D())%60),2)},S:function(){return["th","st","nd","rd"][u()%10>3?0:(u()%100-u()%10!=10)*u()%10]},W:function(){return w()},WW:function(){return s(w())},N:function(){return S()}};return t.replace(o,(function(e){return e in L?L[e]():e.slice(1,e.length-1)}))}(e,"mmm d, yyyy h:MM TT"),n.innerHTML=r+"%")}fetch(e).then((function(e){return e.json()})).then((function(e){var t=0;e.totalPrecincts>0&&(t=y(e.precinctsTransmitted/e.totalPrecincts*100,-2));a(function(e,t){var n=new Date(e),r=n.getTime()+6e4*n.getTimezoneOffset();return new Date(r+36e5*t)}(e.transmissionDate,8),t),function(e){r&&(e>100&&(e=100),r.style.width=e+"%")}(t)})).catch((function(e){}))}document.addEventListener("DOMContentLoaded",h),document.addEventListener("lazy-loaded-template-election-banner",h),document.addEventListener("DOMContentLoaded",(function(){r()}))}]);