'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck){if(self.click_handle&&loader.parentNode&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach(function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var n=document.createElement("script");n.type="text/javascript",n.src=e.src,n.id=e.handle,n.async=!1,e.after_handle&&(n.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=n,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(n)}),response.styles&&Array.isArray(response.styles)&&response.styles.forEach(function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"===type?(infiniteScroll.settings.wrapper&&document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}}else self.click_handle&&loader.parentNode&&loader.parentNode.removeChild(loader)},xhr},Scroller.prototype.appendInlineScript=function(e,t){var n=document.createElement("script"),i=document.createTextNode("//");n.type="text/javascript",n.appendChild(i),document.getElementsByTagName(t)[0].appendChild(n)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,n={};"undefined"!=typeof _wpmejsSettings&&(n.pluginPath=_wpmejsSettings.pluginPath),n.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter(function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0});for(var i=0;i0;){for(n=r.shift(),o=0;o=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this,t=e.window.innerHeight,n=e.measure(e.element,[e.wrapperClass]);e.body.removeEventListener("is.post-load",e.checkViewportOnLoadBound),0!==n.bottom&&n.bottomo&&(n=parseInt(e[r].dataset.pageNum,10),o=s.factor)}t.updateURL(n)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this,n=t.origURL;-1!==e&&(n=window.location.protocol+"//"+t.history.host+t.history.path.replace(/%d/,e)+t.history.parameters),window.location.href!==n&&history.pushState(null,null,n)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,n){var i;(n=n||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(n.jqueryEventName,n.data||null);try{i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n.data||null})}catch{(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n.data||null)}e.dispatchEvent(i)};var jetpackInfinityModule=function(){if("object"==typeof infiniteScroll&&(infiniteScroll.settings.body_class.split(" ").forEach(function(e){e&&document.body.classList.add(e)}),stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"===type)){var e=null;window.addEventListener("scroll",function(){e||(e=setTimeout(function(){infiniteScroll.scroller.determineURL(),e=null},250))})}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)})()})();;
!function(e){var o={};function n(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=o,n.d=function(e,o,t){n.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},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,o){if(1&o&&(e=n(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)n.d(t,r,function(o){return e[o]}.bind(null,r));return t},n.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(o,"a",o),o},n.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},n.p="",n(n.s=273)}({273:function(e,o){!function(){"use strict";let e,o;function n(e){return new Promise((o,n)=>{const t=document.createElement("script");t.onload=()=>o(),t.onerror=e=>n(e),t.src=e,document.body.appendChild(t)})}function t(){if(e)return e;const o=window.wpcom_coblocks_js;return e=n(o.coblocks_lightbox_js),e}function r(){if(o)return o;window.wpcomJQueryUsageLoggerDisabled=!0;const e=window.wpcom_coblocks_js,t=window.jQuery?Promise.resolve():n(e.jquery_core_js).then(()=>n(e.jquery_migrate_js)),r=t.then(()=>window.imagesLoaded?Promise.resolve():n(e.imagesloaded_js)),c=t.then(()=>window.Masonry?Promise.resolve():n(e.masonry_js)),u=Promise.all([t,r,c]).then(()=>n(e.coblocks_masonry_js));return o=u,o}function c(){document.querySelector(".wp-block-coblocks-gallery-masonry")&&r(),document.querySelector(".has-lightbox")&&t(),document.body.classList.contains("block-editor-page")&&(r(),t())}"loading"!==document.readyState?c():document.addEventListener("DOMContentLoaded",c)}()}});;
'use strict';
/*
Tipr 1.0.1
Copyright (c) 2013 Tipue
Tipr is released under the MIT License
http://www.tipue.com/tipr
*/
(function ($, window, undefined) {
'use strict';
$.fn.tipr = function (options) {
var set = $.extend(
{
speed: 200,
mode: 'bottom',
rtl: false,
},
options
);
return this.each(function () {
var tipr_cont = '.tipr_container_' + set.mode;
$(this).hover(
function () {
var out =
'
' +
$(this).attr('data-tip') +
'
';
$(this).append(out);
var w_t = $(tipr_cont).outerWidth();
var w_e = $(this).width();
var m_l = w_e / 2 - w_t / 2;
if (set.rtl) {
$(tipr_cont).css('margin-right', m_l + 'px');
} else {
$(tipr_cont).css('margin-left', m_l + 'px');
}
$(this).removeAttr('title');
$(tipr_cont).fadeIn(set.speed);
},
function () {
$(tipr_cont).remove();
}
);
});
};
})(jQuery);
;
'use strict';
/*
Handles additional functionalities of the theme.
*/
(function () {
var siteHeader = document.getElementById('masthead');
if (!siteHeader) {
return;
}
var fortuneTheme = {
// Run on ready.
onReady: function onReady() {
this.createStickyHeader();
this.setSocialTooltips();
this.skipLinkFocusFix();
},
// Create sticky header.
createStickyHeader: function createStickyHeader() {
var stickyNavigationContainer = document.getElementById('header-inner');
var stickyNavigationTop = siteHeader.offsetHeight;
var makeNavigationSticky = function makeNavigationSticky() {
var scrollTop = window.scrollY || document.documentElement.scrollTop;
if (scrollTop > stickyNavigationTop) {
siteHeader.style.height = stickyNavigationTop + 'px';
stickyNavigationContainer.classList.add('sticky-navigation');
} else {
siteHeader.style.height = 'auto';
stickyNavigationContainer.classList.remove('sticky-navigation');
}
};
makeNavigationSticky();
var stickyNavigationEvent = function stickyNavigationEvent() {
window.requestAnimationFrame(makeNavigationSticky);
};
window.addEventListener('scroll', stickyNavigationEvent, false);
window.addEventListener('resize', stickyNavigationEvent, false);
},
// Set up social icons tooltips
setSocialTooltips: function setSocialTooltips() {
var socialLinks = jQuery(document.getElementById('page')).find(
'.social-list'
);
var headerContainer = jQuery(siteHeader); // Will be removed soon.
var htmlRTL =
'rtl' === document.documentElement.getAttribute('dir') ? true : false;
if (socialLinks.length) {
var currentSocialLink, socialMetaText, i;
socialMetaText = socialLinks.find('.social-meta');
for (i = 0; i < socialMetaText.length; i++) {
currentSocialLink = socialMetaText.eq(i);
currentSocialLink
.parent()
.attr('data-tip', currentSocialLink.text())
.addClass('td-tooltip');
} //Header Tooltips
headerContainer.find('.td-tooltip').tipr({
speed: 100,
mode: 'bottom',
rtl: htmlRTL,
}); //Footer Tooltips
jQuery(document.getElementById('colophon')).find('.td-tooltip').tipr({
speed: 100,
mode: 'top',
rtl: htmlRTL,
});
}
},
// Helps with accessibility for keyboard only users.
skipLinkFocusFix: function skipLinkFocusFix() {
var isIe = /(trident|msie)/i.test(navigator.userAgent);
if (isIe && document.getElementById && window.addEventListener) {
window.addEventListener(
'hashchange',
function () {
var id = location.hash.substring(1),
element;
if (!/^[A-z0-9_-]+$/.test(id)) {
return;
}
element = document.getElementById(id);
if (element) {
if (
!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)
) {
element.tabIndex = -1;
}
element.focus();
}
},
false
);
}
},
}; // Things that need to happen when the document is ready.
jQuery(function () {
fortuneTheme.onReady();
});
})();
('use strict');
(function () {
if ('loading' === document.readyState) {
// The DOM has not yet been loaded.
document.addEventListener('DOMContentLoaded', initGoTopButton);
} else {
// The DOM has already been loaded.
initGoTopButton();
} // Initiate the header search when the DOM loads.
function initGoTopButton() {
var goToTopButton = document.getElementById('gotop-button');
var buttonAction = function buttonAction() {
try {
window.scrollTo({
top: document.getElementById('page').offsetTop,
left: 0,
behavior: 'smooth',
});
} catch (error) {
window.scrollTo(0, document.getElementById('page').offsetTop);
}
};
if (!goToTopButton) {
return;
}
goToTopButton.addEventListener('click', buttonAction, false);
}
})();
('use strict');
(function () {
if ('loading' === document.readyState) {
// The DOM has not yet been loaded.
document.addEventListener('DOMContentLoaded', initSearchForm);
} else {
// The DOM has already been loaded.
initSearchForm();
}
function initSearchForm() {
var searchButton = document.getElementById('header-search-button');
if (!searchButton) {
return;
}
if (!document.documentElement.classList) {
searchButton.style.display = 'none';
}
var headerSearchBox = document.getElementById('header-searchform');
var headerSearchBoxInput = document.querySelector('#header-search-input');
var searchButtonEvent = function searchButtonEvent() {
searchButton.classList.toggle('open');
headerSearchBox.classList.toggle('th-flex');
if (headerSearchBox.classList.contains('th-flex')) {
headerSearchBoxInput.focus();
searchButton.setAttribute('aria-expanded', 'true');
} else {
searchButton.setAttribute('aria-expanded', 'false');
}
};
searchButton.addEventListener('click', searchButtonEvent, false);
var closeSearchWithKey = function closeSearchWithKey(e) {
if (
(e.key == 'Escape' || e.key == 'Esc' || e.keyCode == 27) &&
headerSearchBox.classList.contains('th-flex')
) {
searchButtonEvent();
}
};
headerSearchBox.addEventListener('keydown', closeSearchWithKey, false);
}
})();
('use strict');
(function () {
if ('loading' === document.readyState) {
// The DOM has not yet been loaded.
document.addEventListener('DOMContentLoaded', initNavigation);
} else {
// The DOM has already been loaded.
initNavigation();
}
function initNavigation() {
var siteHeader = document.getElementById('masthead');
if (!siteHeader) {
return;
}
if (!document.documentElement.classList) {
return;
}
var siteHeaderMenus = siteHeader.querySelectorAll('.nav-bar');
if (!siteHeaderMenus.length) {
return;
}
for (var i = 0; i < siteHeaderMenus.length; i++) {
setToggleSubmenuOnFocus(siteHeaderMenus[i]);
setToggleSubmenuOnTouch(siteHeaderMenus[i]);
}
createMobileMenu(siteHeaderMenus);
}
/**
* Toggle `focus` class to allow sub-menu access on focus and blur.
*
* @param {Object} container
*/
function setToggleSubmenuOnFocus(container) {
// Get the first ul element insite the menu container.
var primaryMenu = container.getElementsByTagName('ul')[0]; // Get all the link elements within the menu.
var menuLinks = container.getElementsByTagName('a');
var i, focusFn; // Sets or removes .focus class on an element.
focusFn = function focusFn() {
var self = this; // Move up through the ancestors of the current link until we hit .nav-menu.
while (
!self.classList.contains('menu-navigation') &&
'nav' !== self.tagName.toLowerCase()
) {
// On li elements toggle the class .focus.
if ('li' === self.tagName.toLowerCase()) {
if (self.classList.contains('focus')) {
self.classList.remove('focus');
} else {
self.classList.add('focus');
}
}
self = self.parentElement;
}
}; // Each time a menu link is focused or blurred, toggle focus.
for (i = 0; i < menuLinks.length; i++) {
menuLinks[i].addEventListener('focus', focusFn, false);
menuLinks[i].addEventListener('blur', focusFn, false);
}
}
/**
* Toggle `focus` class to allow sub-menu access on touch screens.
*
* @param {Object} container
*/
function setToggleSubmenuOnTouch(container) {
if ('undefined' === typeof window.ontouchstart) {
return;
}
var touchStartFn,
touchOutsideFn,
removeFocusFn,
i,
parentLink = container.querySelectorAll(
'.menu-item-has-children > a, .page_item_has_children > a'
);
removeFocusFn = function removeFocusFn() {
var focusedElements = container.querySelectorAll('li.focus');
var i;
for (i = 0; i < focusedElements.length; ++i) {
focusedElements[i].classList.remove('focus');
}
};
touchStartFn = function touchStartFn(e) {
var menuItem = this.parentNode,
i;
if (!menuItem.classList.contains('focus')) {
if (e.cancelable) {
e.preventDefault();
}
for (i = 0; i < menuItem.parentNode.children.length; ++i) {
if (menuItem === menuItem.parentNode.children[i]) {
continue;
}
menuItem.parentNode.children[i].classList.remove('focus');
}
if (!container.classList.contains('is-touched')) {
container.classList.add('is-touched');
}
menuItem.classList.add('focus');
} else {
menuItem.classList.remove('focus');
}
};
touchOutsideFn = function touchOutsideFn(e) {
var isTochedMenu = container.classList.contains('is-touched');
if (!isTochedMenu) {
return;
}
var elementParent = e.target.parentNode;
if (
elementParent &&
!elementParent.classList.contains('menu-item') &&
isTochedMenu
) {
removeFocusFn();
}
};
document.addEventListener('touchstart', touchOutsideFn, false);
for (i = 0; i < parentLink.length; ++i) {
parentLink[i].addEventListener('touchstart', touchStartFn, false);
}
} // Create a mobile menu.
function createMobileMenu(menus) {
var siteHeader = document.getElementById('masthead');
var mobileMenu = document.getElementById('mobile-navigation');
var mobileMenuContainer = mobileMenu.querySelector('.container');
var mobileMenuButton = document.getElementById('toggle-mobile-menu');
var mobileMenuContent = document.createDocumentFragment();
for (var _i = 0; _i < menus.length; _i++) {
mobileMenuContent.appendChild(menus[_i].cloneNode(true));
} // Remove ID attributes from the list items to avoid repetition.
var mobileMenuItems = mobileMenuContent.querySelectorAll('li');
var mobileMenuItemsCount = mobileMenuItems.length;
if (mobileMenuItemsCount) {
for (var itemIndex = 0; itemIndex < mobileMenuItemsCount; itemIndex++) {
mobileMenuItems[itemIndex].removeAttribute('id');
}
}
var toggleMobileMenuEvent = function toggleMobileMenuEvent() {
siteHeader.classList.toggle('active-toggle-menu');
if (-1 !== siteHeader.className.indexOf('active-toggle-menu')) {
mobileMenu.setAttribute('aria-hidden', false);
mobileMenuButton.setAttribute('aria-expanded', true);
window.scrollTo(0, document.getElementById('page').offsetTop);
} else {
mobileMenu.setAttribute('aria-hidden', true);
mobileMenuButton.setAttribute('aria-expanded', false);
}
};
mobileMenuButton.addEventListener('click', toggleMobileMenuEvent, false); // Add dropdown toggle that displays child menu items.
var parentMenuItems = mobileMenuContent.querySelectorAll(
'.menu-item-has-children'
);
if (parentMenuItems.length) {
for (var _i2 = 0; _i2 < parentMenuItems.length; _i2++) {
var buttonScreenReaderText = document.createElement('span');
buttonScreenReaderText.className = 'screen-reader-text';
buttonScreenReaderText.appendChild(
document.createTextNode(fortuneScreenReaderText.expand)
);
var dropdownToggle = document.createElement('button');
dropdownToggle.className =
'dropdown-toggle clean-button has-icon has-border-radius';
dropdownToggle.setAttribute('aria-expanded', false);
dropdownToggle.appendChild(buttonScreenReaderText);
var subMenu = parentMenuItems[_i2].querySelector('ul');
parentMenuItems[_i2].insertBefore(dropdownToggle, subMenu);
parentMenuItems[_i2].setAttribute('aria-haspopup', true);
}
}
mobileMenuContainer.appendChild(mobileMenuContent); // Toggle buttons and submenu items with active children menu items.
var activeToggleButtons = mobileMenuContainer.querySelectorAll(
'.current-menu-ancestor > button'
);
var activeToggleSubMenus = mobileMenuContainer.querySelectorAll(
'.current-menu-ancestor > .sub-menu'
);
var activeToggleIndecators = mobileMenuContainer.querySelectorAll(
'.current-menu-ancestor > .arrow-icon'
);
if (activeToggleButtons.length) {
for (var i = 0; i < activeToggleButtons.length; i++) {
activeToggleButtons[i].classList.add('toggled-on');
activeToggleButtons[i].setAttribute('aria-expanded', true);
activeToggleButtons[i].querySelector(
'.screen-reader-text'
).textContent = fortuneScreenReaderText.collapse;
}
}
if (activeToggleSubMenus.length) {
for (var i = 0; i < activeToggleSubMenus.length; i++) {
activeToggleSubMenus[i].classList.add('toggled-on');
}
}
if (activeToggleIndecators.length) {
for (var i = 0; i < activeToggleIndecators.length; i++) {
activeToggleIndecators[i].classList.add('toggled-on');
}
}
var dropdownToggleButtons =
mobileMenuContainer.getElementsByTagName('button');
if (!dropdownToggleButtons.length) {
return;
}
var dropdownToggleEvent = function dropdownToggleEvent(e) {
var screenReader = e.target.querySelector('.screen-reader-text');
var arrowIconElement =
e.target.parentElement.querySelector('.arrow-icon');
arrowIconElement.classList.toggle('toggled-on');
if (-1 !== e.target.className.indexOf('toggled-on')) {
e.target.setAttribute('aria-expanded', false);
if (null !== screenReader) {
screenReader.textContent = fortuneScreenReaderText.expand;
}
} else {
e.target.setAttribute('aria-expanded', true);
if (null !== screenReader) {
screenReader.textContent = fortuneScreenReaderText.collapse;
}
}
e.target.classList.toggle('toggled-on');
var parentItem = e.target.parentNode;
for (var i = 0; i < parentItem.childNodes.length; i++) {
if ('UL' === parentItem.childNodes[i].nodeName) {
parentItem.childNodes[i].classList.toggle('toggled-on');
break;
}
}
};
for (var i = 0; i < dropdownToggleButtons.length; i++) {
dropdownToggleButtons[i].addEventListener(
'click',
dropdownToggleEvent,
false
);
}
}
})();
;