
Rakefile is like Makefile - it has dependency management, while npm run scripts do not. Aside from that, this also allows us to drop literally all Node.js packages, as uglify-js is self-contained and has no dependencies. Reduced node_modules from 17M to 374K.
7 lines
33 KiB
JavaScript
Vendored
7 lines
33 KiB
JavaScript
Vendored
/*!
|
|
* Minimal Mistakes Jekyll Theme 4.25.1 by Michael Rose
|
|
* Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
|
|
* Free for personal and commercial use under the MIT license
|
|
* https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
|
|
*/
|
|
!function(e,t){"function"==typeof define&&define.amd?define([],function(){return t(e)}):"object"==typeof exports?module.exports=t(e):e.Gumshoe=t(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(d){"use strict";function u(e){e&&e.sort(function(e,t){return o(e.content)<o(t.content)?-1:1})}function n(){return d.innerHeight+d.pageYOffset>=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}function p(e,t){var n;e&&(n=e.nav.closest("li"))&&(n.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),i(n,t),m("gumshoeDeactivate",n,{link:e.nav,content:e.content,settings:t}))}var f={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},m=function(e,t,n){n.settings.events&&(e=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(e))},o=function(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return 0<=t?t:0},g=function(e,t,n){e=e.getBoundingClientRect(),t="function"==typeof(t=t).offset?parseFloat(t.offset()):parseFloat(t.offset);return n?parseInt(e.bottom,10)<(d.innerHeight||document.documentElement.clientHeight):parseInt(e.top,10)<=t},h=function(e,t){return!(!n()||!g(e.content,t,!0))},i=function(e,t){t.nested&&(e=e.parentNode.closest("li"))&&(e.classList.remove(t.nestedClass),i(e,t))},v=function(e,t){t.nested&&(e=e.parentNode.closest("li"))&&(e.classList.add(t.nestedClass),v(e,t))};return function(e,t){function n(e){s&&d.cancelAnimationFrame(s),s=d.requestAnimationFrame(l.detect)}function o(e){s&&d.cancelAnimationFrame(s),s=d.requestAnimationFrame(function(){u(a),l.detect()})}var i,a,r,s,c,l={setup:function(){i=document.querySelectorAll(e),a=[],Array.prototype.forEach.call(i,function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&a.push({nav:e,content:t})}),u(a)}};l.detect=function(){var e,t,n,o=function(e,t){var n=e[e.length-1];if(h(n,t))return n;for(var o=e.length-1;0<=o;o--)if(g(e[o].content,t))return e[o]}(a,c);o?r&&o.content===r.content||(p(r,c),t=c,(e=o)&&(n=e.nav.closest("li"))&&(n.classList.add(t.navClass),e.content.classList.add(t.contentClass),v(n,t),m("gumshoeActivate",n,{link:e.nav,content:e.content,settings:t})),r=o):r&&(p(r,c),r=null)},l.destroy=function(){r&&p(r,c),d.removeEventListener("scroll",n,!1),c.reflow&&d.removeEventListener("resize",o,!1),c=s=r=i=a=null};return c=function(){var n={};return Array.prototype.forEach.call(arguments,function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}}),n}(f,t||{}),l.setup(),l.detect(),d.addEventListener("scroll",n,!1),c.reflow&&d.addEventListener("resize",o,!1),l}}),function(e,d){var o,t=e.jQuery||e.Cowboy||(e.Cowboy={});t.throttle=o=function(i,a,r,s){var c,l=0;function e(){var e=this,t=+new Date-l,n=arguments;function o(){l=+new Date,r.apply(e,n)}s&&!c&&o(),c&&clearTimeout(c),s===d&&i<t?o():!0!==a&&(c=setTimeout(s?function(){c=d}:o,s===d?i-t:i))}return"boolean"!=typeof a&&(s=r,r=a,a=d),t.guid&&(e.guid=r.guid=r.guid||t.guid++),e},t.debounce=function(e,t,n){return n===d?o(e,t,!1):o(e,n,!1!==t)}}(this),function(a){"use strict";a.fn.fitVids=function(e){var t,n,i={customSelector:null,ignore:null};return document.getElementById("fit-vids-style")||(t=document.head||document.getElementsByTagName("head")[0],(n=document.createElement("div")).innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',t.appendChild(n.childNodes[1])),e&&a.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"],o=(i.customSelector&&e.push(i.customSelector),".fitvidsignore"),e=(i.ignore&&(o=o+", "+i.ignore),a(this).find(e.join(",")));(e=(e=e.not("object object")).not(o)).each(function(e){var t,n=a(this);0<n.parents(o).length||"embed"===this.tagName.toLowerCase()&&n.parent("object").length||n.parent(".fluid-width-video-wrapper").length||(n.css("height")||n.css("width")||!isNaN(n.attr("height"))&&!isNaN(n.attr("width"))||(n.attr("height",9),n.attr("width",16)),t=("object"===this.tagName.toLowerCase()||n.attr("height")&&!isNaN(parseInt(n.attr("height"),10))?parseInt(n.attr("height"),10):n.height())/(isNaN(parseInt(n.attr("width"),10))?n.width():parseInt(n.attr("width"),10)),n.attr("id")||n.attr("id","fitvid"+e),n.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),n.removeAttr("height").removeAttr("width"))})})}}(window.jQuery||window.Zepto),$(function(){var n,o,e,i,t=$("nav.greedy-nav .greedy-nav__toggle"),a=$("nav.greedy-nav .visible-links"),r=$("nav.greedy-nav .hidden-links"),s=$("nav.greedy-nav"),c=$("nav.greedy-nav .site-logo"),l=$("nav.greedy-nav .site-logo img"),d=$("nav.greedy-nav .site-title"),u=$("nav.greedy-nav button.search__toggle");function p(){function t(e,t){o+=t,n+=1,i.push(o)}o=n=0,e=1e3,i=[],a.children().outerWidth(t),r.children().each(function(){var e;(e=(e=$(this)).clone()).css("visibility","hidden"),a.append(e),t(0,e.outerWidth()),e.remove()})}p();var f,m,g,h,v=$(window).width(),y=v<768?0:v<1024?1:v<1280?2:3;function w(){var e=(v=$(window).width())<768?0:v<1024?1:v<1280?2:3;e!==y&&p(),y=e,m=a.children().length,f=s.innerWidth()-(0!==c.length?c.outerWidth(!0):0)-d.outerWidth(!0)-(0!==u.length?u.outerWidth(!0):0)-(m!==i.length?t.outerWidth(!0):0),g=i[m-1],f<g?(a.children().last().prependTo(r),--m,w()):f+(m===i.length-1?t.outerWidth(!0):0)>i[m]&&(r.children().first().appendTo(a),m+=1,w()),t.attr("count",n-m),m===n?t.addClass("hidden"):t.removeClass("hidden")}$(window).resize(function(){w()}),t.on("click",function(){r.toggleClass("hidden"),$(this).toggleClass("close"),clearTimeout(h)}),r.on("mouseleave",function(){h=setTimeout(function(){r.addClass("hidden")},e)}).on("mouseenter",function(){clearTimeout(h)}),0===l.length||l[0].complete||0!==l[0].naturalWidth?w():l.one("load error",w)}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(l){function e(){}function d(e,t){m.ev.on("mfp"+e+S,t)}function u(e,t,n,o){var i=document.createElement("div");return i.className="mfp-"+e,n&&(i.innerHTML=n),o?t&&t.appendChild(i):(i=l(i),t&&i.appendTo(t)),i}function p(e,t){m.ev.triggerHandler("mfp"+e,t),m.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),m.st.callbacks[e])&&m.st.callbacks[e].apply(m,l.isArray(t)?t:[t])}function f(e){return e===n&&m.currTemplate.closeBtn||(m.currTemplate.closeBtn=l(m.st.closeMarkup.replace("%title%",m.st.tClose)),n=e),m.currTemplate.closeBtn}function a(){l.magnificPopup.instance||((m=new e).init(),l.magnificPopup.instance=m)}function r(){y&&(v.after(y.addClass(c)).detach(),y=null)}function i(){w&&l(document.body).removeClass(w)}function t(){i(),m.req&&m.req.abort()}var m,o,g,s,h,n,c,v,y,w,C="Close",$="BeforeClose",b="MarkupParse",I="Open",S=".mfp",E="mfp-ready",B="mfp-removing",k="mfp-prevent-close",x=!!window.jQuery,T=l(window),_=(l.magnificPopup={instance:null,proto:e.prototype={constructor:e,init:function(){var e=navigator.appVersion;m.isLowIE=m.isIE8=document.all&&!document.addEventListener,m.isAndroid=/android/gi.test(e),m.isIOS=/iphone|ipad|ipod/gi.test(e),m.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),m.probablyMobile=m.isAndroid||m.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),g=l(document),m.popupsCache={}},open:function(e){if(!1===e.isObj){m.items=e.items.toArray(),m.index=0;for(var t,n=e.items,o=0;o<n.length;o++)if((t=(t=n[o]).parsed?t.el[0]:t)===e.el[0]){m.index=o;break}}else m.items=l.isArray(e.items)?e.items:[e.items],m.index=e.index||0;if(!m.isOpen){m.types=[],h="",e.mainEl&&e.mainEl.length?m.ev=e.mainEl.eq(0):m.ev=g,e.key?(m.popupsCache[e.key]||(m.popupsCache[e.key]={}),m.currTemplate=m.popupsCache[e.key]):m.currTemplate={},m.st=l.extend(!0,{},l.magnificPopup.defaults,e),m.fixedContentPos="auto"===m.st.fixedContentPos?!m.probablyMobile:m.st.fixedContentPos,m.st.modal&&(m.st.closeOnContentClick=!1,m.st.closeOnBgClick=!1,m.st.showCloseBtn=!1,m.st.enableEscapeKey=!1),m.bgOverlay||(m.bgOverlay=u("bg").on("click"+S,function(){m.close()}),m.wrap=u("wrap").attr("tabindex",-1).on("click"+S,function(e){m._checkIfClose(e.target)&&m.close()}),m.container=u("container",m.wrap)),m.contentContainer=u("content"),m.st.preloader&&(m.preloader=u("preloader",m.container,m.st.tLoading));var i=l.magnificPopup.modules;for(o=0;o<i.length;o++){var a=(a=i[o]).charAt(0).toUpperCase()+a.slice(1);m["init"+a].call(m)}p("BeforeOpen"),m.st.showCloseBtn&&(m.st.closeBtnInside?(d(b,function(e,t,n,o){n.close_replaceWith=f(o.type)}),h+=" mfp-close-btn-in"):m.wrap.append(f())),m.st.alignTop&&(h+=" mfp-align-top"),m.fixedContentPos?m.wrap.css({overflow:m.st.overflowY,overflowX:"hidden",overflowY:m.st.overflowY}):m.wrap.css({top:T.scrollTop(),position:"absolute"}),!1!==m.st.fixedBgPos&&("auto"!==m.st.fixedBgPos||m.fixedContentPos)||m.bgOverlay.css({height:g.height(),position:"absolute"}),m.st.enableEscapeKey&&g.on("keyup"+S,function(e){27===e.keyCode&&m.close()}),T.on("resize"+S,function(){m.updateSize()}),m.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&m.wrap.addClass(h);var r=m.wH=T.height(),s={},c=(m.fixedContentPos&&m._hasScrollBar(r)&&(c=m._getScrollbarSize())&&(s.marginRight=c),m.fixedContentPos&&(m.isIE7?l("body, html").css("overflow","hidden"):s.overflow="hidden"),m.st.mainClass);return m.isIE7&&(c+=" mfp-ie7"),c&&m._addClassToMFP(c),m.updateItemHTML(),p("BuildControls"),l("html").css(s),m.bgOverlay.add(m.wrap).prependTo(m.st.prependTo||l(document.body)),m._lastFocusedEl=document.activeElement,setTimeout(function(){m.content?(m._addClassToMFP(E),m._setFocus()):m.bgOverlay.addClass(E),g.on("focusin"+S,m._onFocusIn)},16),m.isOpen=!0,m.updateSize(r),p(I),e}m.updateItemHTML()},close:function(){m.isOpen&&(p($),m.isOpen=!1,m.st.removalDelay&&!m.isLowIE&&m.supportsTransition?(m._addClassToMFP(B),setTimeout(function(){m._close()},m.st.removalDelay)):m._close())},_close:function(){p(C);var e=B+" "+E+" ";m.bgOverlay.detach(),m.wrap.detach(),m.container.empty(),m.st.mainClass&&(e+=m.st.mainClass+" "),m._removeClassFromMFP(e),m.fixedContentPos&&(e={marginRight:""},m.isIE7?l("body, html").css("overflow",""):e.overflow="",l("html").css(e)),g.off("keyup.mfp focusin"+S),m.ev.off(S),m.wrap.attr("class","mfp-wrap").removeAttr("style"),m.bgOverlay.attr("class","mfp-bg"),m.container.attr("class","mfp-container"),!m.st.showCloseBtn||m.st.closeBtnInside&&!0!==m.currTemplate[m.currItem.type]||m.currTemplate.closeBtn&&m.currTemplate.closeBtn.detach(),m.st.autoFocusLast&&m._lastFocusedEl&&l(m._lastFocusedEl).focus(),m.currItem=null,m.content=null,m.currTemplate=null,m.prevHeight=0,p("AfterClose")},updateSize:function(e){var t;m.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*t,m.wrap.css("height",t),m.wH=t):m.wH=e||T.height(),m.fixedContentPos||m.wrap.css("height",m.wH),p("Resize")},updateItemHTML:function(){var e=m.items[m.index],t=(m.contentContainer.detach(),m.content&&m.content.detach(),(e=e.parsed?e:m.parseEl(m.index)).type),n=(p("BeforeChange",[m.currItem?m.currItem.type:"",t]),m.currItem=e,m.currTemplate[t]||(n=!!m.st[t]&&m.st[t].markup,p("FirstMarkupParse",n),m.currTemplate[t]=!n||l(n)),s&&s!==e.type&&m.container.removeClass("mfp-"+s+"-holder"),m["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,m.currTemplate[t]));m.appendContent(n,t),e.preloaded=!0,p("Change",e),s=e.type,m.container.prepend(m.contentContainer),p("AfterChange")},appendContent:function(e,t){(m.content=e)?m.st.showCloseBtn&&m.st.closeBtnInside&&!0===m.currTemplate[t]?m.content.find(".mfp-close").length||m.content.append(f()):m.content=e:m.content="",p("BeforeAppend"),m.container.addClass("mfp-"+t+"-holder"),m.contentContainer.append(m.content)},parseEl:function(e){var t,n=m.items[e];if((n=n.tagName?{el:l(n)}:(t=n.type,{data:n,src:n.src})).el){for(var o=m.types,i=0;i<o.length;i++)if(n.el.hasClass("mfp-"+o[i])){t=o[i];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||m.st.type||"inline",n.index=e,n.parsed=!0,m.items[e]=n,p("ElementParse",n),m.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,m._openClick(e,t,n)}var o="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,e)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,e):(n.items=t).off(o).on(o,e))},_openClick:function(e,t,n){var o=(void 0!==n.midClick?n:l.magnificPopup.defaults).midClick;if(o||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){o=(void 0!==n.disableOn?n:l.magnificPopup.defaults).disableOn;if(o)if(l.isFunction(o)){if(!o.call(m))return!0}else if(T.width()<o)return!0;e.type&&(e.preventDefault(),m.isOpen)&&e.stopPropagation(),n.el=l(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),m.open(n)}},updateStatus:function(e,t){var n;m.preloader&&(o!==e&&m.container.removeClass("mfp-s-"+o),n={status:e,text:t=t||"loading"!==e?t:m.st.tLoading},p("UpdateStatus",n),e=n.status,m.preloader.html(t=n.text),m.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),m.container.addClass("mfp-s-"+e),o=e)},_checkIfClose:function(e){if(!l(e).hasClass(k)){var t=m.st.closeOnContentClick,n=m.st.closeOnBgClick;if(t&&n)return!0;if(!m.content||l(e).hasClass("mfp-close")||m.preloader&&e===m.preloader[0])return!0;if(e===m.content[0]||l.contains(m.content[0],e)){if(t)return!0}else if(n&&l.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){m.bgOverlay.addClass(e),m.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),m.wrap.removeClass(e)},_hasScrollBar:function(e){return(m.isIE7?g.height():document.body.scrollHeight)>(e||T.height())},_setFocus:function(){(m.st.focus?m.content.find(m.st.focus).eq(0):m.wrap).focus()},_onFocusIn:function(e){if(e.target!==m.wrap[0]&&!l.contains(m.wrap[0],e.target))return m._setFocus(),!1},_parseMarkup:function(i,e,t){var a;t.data&&(e=l.extend(t.data,e)),p(b,[i,e,t]),l.each(e,function(e,t){if(void 0===t||!1===t)return!0;var n,o;1<(a=e.split("_")).length?0<(n=i.find(S+"-"+a[0])).length&&("replaceWith"===(o=a[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===o?n.is("img")?n.attr("src",t):n.replaceWith(l("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(a[1],t)):i.find(S+"-"+e).html(t)})},_getScrollbarSize:function(){var e;return void 0===m.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),m.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),m.scrollbarSize}},modules:[],open:function(e,t){return a(),(e=e?l.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return l.magnificPopup.instance&&l.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(l.magnificPopup.defaults[e]=t.options),l.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},l.fn.magnificPopup=function(e){a();var t,n,o,i=l(this);return"string"==typeof e?"open"===e?(t=x?i.data("magnificPopup"):i[0].magnificPopup,n=parseInt(arguments[1],10)||0,o=t.items?t.items[n]:(o=i,(o=t.delegate?o.find(t.delegate):o).eq(n)),m._openClick({mfpEl:o},i,t)):m.isOpen&&m[e].apply(m,Array.prototype.slice.call(arguments,1)):(e=l.extend(!0,{},e),x?i.data("magnificPopup",e):i[0].magnificPopup=e,m.addGroup(i,e)),i},"inline"),O=(l.magnificPopup.registerModule(_,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){m.types.push(_),d(C+"."+_,function(){r()})},getInline:function(e,t){var n,o,i;return r(),e.src?(n=m.st.inline,(o=l(e.src)).length?((i=o[0].parentNode)&&i.tagName&&(v||(c=n.hiddenClass,v=u(c),c="mfp-"+c),y=o.after(v).detach().removeClass(c)),m.updateStatus("ready")):(m.updateStatus("error",n.tNotFound),o=l("<div>")),e.inlineElement=o):(m.updateStatus("ready"),m._parseMarkup(t,{},e),t)}}}),"ajax");l.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){m.types.push(O),w=m.st.ajax.cursor,d(C+"."+O,t),d("BeforeChange."+O,t)},getAjax:function(o){w&&l(document.body).addClass(w),m.updateStatus("loading");var e=l.extend({url:o.src,success:function(e,t,n){e={data:e,xhr:n};p("ParseAjax",e),m.appendContent(l(e.data),O),o.finished=!0,i(),m._setFocus(),setTimeout(function(){m.wrap.addClass(E)},16),m.updateStatus("ready"),p("AjaxContentAdded")},error:function(){i(),o.finished=o.loadError=!0,m.updateStatus("error",m.st.ajax.tError.replace("%url%",o.src))}},m.st.ajax.settings);return m.req=l.ajax(e),""}}});var P;l.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=m.st.image,t=".image";m.types.push("image"),d(I+t,function(){"image"===m.currItem.type&&e.cursor&&l(document.body).addClass(e.cursor)}),d(C+t,function(){e.cursor&&l(document.body).removeClass(e.cursor),T.off("resize"+S)}),d("Resize"+t,m.resizeImage),m.isLowIE&&d("AfterChange",m.resizeImage)},resizeImage:function(){var e,t=m.currItem;t&&t.img&&m.st.image.verticalFit&&(e=0,m.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",m.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,P&&clearInterval(P),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden)&&(m.content&&m.content.removeClass("mfp-loading"),e.imgHidden=!1)},findImageSize:function(t){function n(e){P&&clearInterval(P),P=setInterval(function(){0<i.naturalWidth?m._onImageHasSize(t):(200<o&&clearInterval(P),3===++o?n(10):40===o?n(50):100===o&&n(500))},e)}var o=0,i=t.img[0];n(1)},getImage:function(e,t){function n(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===m.currItem&&(m._onImageHasSize(e),m.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,p("ImageLoadComplete")):++a<200?setTimeout(n,100):o())}function o(){e&&(e.img.off(".mfploader"),e===m.currItem&&(m._onImageHasSize(e),m.updateStatus("error",r.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)}var i,a=0,r=m.st.image,s=t.find(".mfp-img");return s.length&&((i=document.createElement("img")).className="mfp-img",e.el&&e.el.find("img").length&&(i.alt=e.el.find("img").attr("alt")),e.img=l(i).on("load.mfploader",n).on("error.mfploader",o),i.src=e.src,s.is("img")&&(e.img=e.img.clone()),0<(i=e.img[0]).naturalWidth?e.hasSize=!0:i.width||(e.hasSize=!1)),m._parseMarkup(t,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=m.st.image.titleSrc;if(t){if(l.isFunction(t))return t.call(m,e);if(e.el)return e.el.attr(t)||""}return""}(e),img_replaceWith:e.img},e),m.resizeImage(),e.hasSize?(P&&clearInterval(P),e.loadError?(t.addClass("mfp-loading"),m.updateStatus("error",r.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),m.updateStatus("ready"))):(m.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),m.findImageSize(e))),t}}});function M(e){var t;m.currTemplate[A]&&(t=m.currTemplate[A].find("iframe")).length&&(e||(t[0].src="//about:blank"),m.isIE8)&&t.css("display",e?"block":"none")}function L(e){var t=m.items.length;return t-1<e?e-t:e<0?t+e:e}function F(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}l.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,t,n,o,i,a,r=m.st.zoom,s=".zoom";r.enabled&&m.supportsTransition&&(t=r.duration,n=function(e){var e=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),t="all "+r.duration/1e3+"s "+r.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return n["-webkit-"+o]=n["-moz-"+o]=n["-o-"+o]=n[o]=t,e.css(n),e},o=function(){m.content.css("visibility","visible")},d("BuildControls"+s,function(){m._allowZoom()&&(clearTimeout(i),m.content.css("visibility","hidden"),(e=m._getItemToZoom())?((a=n(e)).css(m._getOffset()),m.wrap.append(a),i=setTimeout(function(){a.css(m._getOffset(!0)),i=setTimeout(function(){o(),setTimeout(function(){a.remove(),e=a=null,p("ZoomAnimationEnded")},16)},t)},16)):o())}),d($+s,function(){if(m._allowZoom()){if(clearTimeout(i),m.st.removalDelay=t,!e){if(!(e=m._getItemToZoom()))return;a=n(e)}a.css(m._getOffset(!0)),m.wrap.append(a),m.content.css("visibility","hidden"),setTimeout(function(){a.css(m._getOffset())},16)}}),d(C+s,function(){m._allowZoom()&&(o(),a&&a.remove(),e=null)}))},_allowZoom:function(){return"image"===m.currItem.type},_getItemToZoom:function(){return!!m.currItem.hasSize&&m.currItem.img},_getOffset:function(e){var e=e?m.currItem.img:m.st.zoom.opener(m.currItem.el||m.currItem),t=e.offset(),n=parseInt(e.css("padding-top"),10),o=parseInt(e.css("padding-bottom"),10),e=(t.top-=l(window).scrollTop()-n,{width:e.width(),height:(x?e.innerHeight():e[0].offsetHeight)-o-n});return(z=void 0===z?void 0!==document.createElement("p").style.MozTransform:z)?e["-moz-transform"]=e.transform="translate("+t.left+"px,"+t.top+"px)":(e.left=t.left,e.top=t.top),e}}});var z,A="iframe",H=(l.magnificPopup.registerModule(A,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){m.types.push(A),d("BeforeChange",function(e,t,n){t!==n&&(t===A?M():n===A&&M(!0))}),d(C+"."+A,function(){M()})},getIframe:function(e,t){var n=e.src,o=m.st.iframe,i=(l.each(o.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1}),{});return o.srcAction&&(i[o.srcAction]=n),m._parseMarkup(t,i,e),m.updateStatus("ready"),t}}}),l.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var a=m.st.gallery,e=".mfp-gallery";if(m.direction=!0,!a||!a.enabled)return!1;h+=" mfp-gallery",d(I+e,function(){a.navigateByImgClick&&m.wrap.on("click"+e,".mfp-img",function(){if(1<m.items.length)return m.next(),!1}),g.on("keydown"+e,function(e){37===e.keyCode?m.prev():39===e.keyCode&&m.next()})}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=F(t.text,m.currItem.index,m.items.length))}),d(b+e,function(e,t,n,o){var i=m.items.length;n.counter=1<i?F(a.tCounter,o.index,i):""}),d("BuildControls"+e,function(){var e,t;1<m.items.length&&a.arrows&&!m.arrowLeft&&(t=a.arrowMarkup,e=m.arrowLeft=l(t.replace(/%title%/gi,a.tPrev).replace(/%dir%/gi,"left")).addClass(k),t=m.arrowRight=l(t.replace(/%title%/gi,a.tNext).replace(/%dir%/gi,"right")).addClass(k),e.click(function(){m.prev()}),t.click(function(){m.next()}),m.container.append(e.add(t)))}),d("Change"+e,function(){m._preloadTimeout&&clearTimeout(m._preloadTimeout),m._preloadTimeout=setTimeout(function(){m.preloadNearbyImages(),m._preloadTimeout=null},16)}),d(C+e,function(){g.off(e),m.wrap.off("click"+e),m.arrowRight=m.arrowLeft=null})},next:function(){m.direction=!0,m.index=L(m.index+1),m.updateItemHTML()},prev:function(){m.direction=!1,m.index=L(m.index-1),m.updateItemHTML()},goTo:function(e){m.direction=e>=m.index,m.index=e,m.updateItemHTML()},preloadNearbyImages:function(){for(var e=m.st.gallery.preload,t=Math.min(e[0],m.items.length),n=Math.min(e[1],m.items.length),o=1;o<=(m.direction?n:t);o++)m._preloadItem(m.index+o);for(o=1;o<=(m.direction?t:n);o++)m._preloadItem(m.index-o)},_preloadItem:function(e){var t;e=L(e),m.items[e].preloaded||((t=m.items[e]).parsed||(t=m.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=l('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)}}}),"retina");l.magnificPopup.registerModule(H,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,o;1<window.devicePixelRatio&&(n=m.st.retina,o=n.ratio,1<(o=isNaN(o)?o():o))&&(d("ImageHasSize."+H,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/o,width:"100%"})}),d("ElementParse."+H,function(e,t){t.src=n.replaceSrc(t,o)}))}}}),a()}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t(e)}):"object"==typeof exports?module.exports=t(e):e.SmoothScroll=t(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(b){"use strict";function I(){var n={};return Array.prototype.forEach.call(arguments,function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}}),n}function a(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,i=-1,a="",r=n.charCodeAt(0);++i<o;){if(0===(t=n.charCodeAt(i)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");1<=t&&t<=31||127==t||0===i&&48<=t&&t<=57||1===i&&48<=t&&t<=57&&45===r?a+="\\"+t.toString(16)+" ":a+=128<=t||45===t||95===t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122?n.charAt(i):"\\"+n.charAt(i)}return"#"+a}function S(e,t,n,o){t.emitEvents&&"function"==typeof b.CustomEvent&&(t=new CustomEvent(e,{bubbles:!0,detail:{anchor:n,toggle:o}}),document.dispatchEvent(t))}var E={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},k=function(e){return parseInt(b.getComputedStyle(e).height,10)},x=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)};return function(o,e){function t(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(i=e.target.closest(o))&&"a"===i.tagName.toLowerCase()&&!e.target.closest(v.ignore)&&i.hostname===b.location.hostname&&i.pathname===b.location.pathname&&/#/.test(i.href)){var t,n;try{n=a(decodeURIComponent(i.hash))}catch(e){n=a(i.hash)}if("#"===n){if(!v.topOnEmptyHash)return;t=document.documentElement}else t=document.querySelector(n);(t=t||"#top"!==n?t:document.documentElement)&&(e.preventDefault(),n=v,history.replaceState&&n.updateURL&&!history.state&&(e=(e=b.location.hash)||"",history.replaceState({smoothScroll:JSON.stringify(n),anchor:e||b.pageYOffset},document.title,e||b.location.href)),C.animateScroll(t,i))}}function n(e){var t;null===history.state||!history.state.smoothScroll||history.state.smoothScroll!==JSON.stringify(v)||"string"==typeof(t=history.state.anchor)&&t&&!(t=document.querySelector(a(history.state.anchor)))||C.animateScroll(t,null,{updateURL:!1})}var v,i,y,w,C={cancelScroll:function(e){cancelAnimationFrame(w),w=null,e||S("scrollCancel",v)}};C.animateScroll=function(o,i,e){C.cancelScroll();var a,r,s,c,l,d,u,p,f,m,t,g=I(v||E,e||{}),h="[object Number]"===Object.prototype.toString.call(o),e=h||!o.tagName?null:o;(h||e)&&(a=b.pageYOffset,g.header&&!y&&(y=document.querySelector(g.header)),t=(t=y)?k(t)+t.offsetTop:0,r=h?o:function(e,t,n,o){var i=0;if(e.offsetParent)for(;i+=e.offsetTop,e=e.offsetParent;);return i=Math.max(i-t-n,0),i=o?Math.min(i,x()-b.innerHeight):i}(e,t,parseInt("function"==typeof g.offset?g.offset(o,i):g.offset,10),g.clip),s=r-a,c=x(),l=0,d=function(e,t){e=t.speedAsDuration?t.speed:Math.abs(e/1e3*t.speed);return t.durationMax&&e>t.durationMax?t.durationMax:t.durationMin&&e<t.durationMin?t.durationMin:parseInt(e,10)}(s,g),f=function(e,t){var n=b.pageYOffset;if(e==t||n==t||(a<t&&b.innerHeight+n)>=c)return C.cancelScroll(!0),e=t,n=h,0===(t=o)&&document.body.focus(),n||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),b.scrollTo(0,e)),S("scrollStop",g,o,i),!(w=u=null)},m=function(e){var t,n,o;l+=e-(u=u||e),p=a+s*(n=1<(p=0===d?0:l/d)?1:p,"easeInQuad"===(t=g).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),(o=t.customEasing?t.customEasing(n):o)||n),b.scrollTo(0,Math.floor(p)),f(p,r)||(w=b.requestAnimationFrame(m),u=e)},0===b.pageYOffset&&b.scrollTo(0,0),e=o,t=g,h||history.pushState&&t.updateURL&&history.pushState({smoothScroll:JSON.stringify(t),anchor:e.id},document.title,e===document.documentElement?"#top":"#"+e.id),"matchMedia"in b&&b.matchMedia("(prefers-reduced-motion)").matches?b.scrollTo(0,Math.floor(r)):(S("scrollStart",g,o,i),C.cancelScroll(!0),b.requestAnimationFrame(m)))},C.destroy=function(){v&&(document.removeEventListener("click",t,!1),b.removeEventListener("popstate",n,!1),C.cancelScroll(),w=y=i=v=null)};if("querySelector"in document&&"addEventListener"in b&&"requestAnimationFrame"in b&&"closest"in b.Element.prototype)return C.destroy(),v=I(E,e||{}),y=v.header?document.querySelector(v.header):null,document.addEventListener("click",t,!1),v.updateURL&&v.popstate&&b.addEventListener("popstate",n,!1),C;throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs."}}),$(function(){$("#main").fitVids();function e(){(0===$(".author__urls-wrapper").find("button").length?1024<$(window).width():!$(".author__urls-wrapper").find("button").is(":visible"))?$(".sidebar").addClass("sticky"):$(".sidebar").removeClass("sticky")}e(),$(window).resize(function(){e()}),$(".author__urls-wrapper").find("button").on("click",function(){$(".author__urls").toggleClass("is--visible"),$(".author__urls-wrapper").find("button").toggleClass("open")}),$(document).keyup(function(e){27===e.keyCode&&$(".initial-content").hasClass("is--hidden")&&($(".search-content").toggleClass("is--visible"),$(".initial-content").toggleClass("is--hidden"))}),$(".search__toggle").on("click",function(){$(".search-content").toggleClass("is--visible"),$(".initial-content").toggleClass("is--hidden"),setTimeout(function(){$(".search-content").find("input").focus()},400)}),new SmoothScroll('a[href*="#"]',{offset:20,speed:400,speedAsDuration:!0,durationMax:500});0<$("nav.toc").length&&new Gumshoe("nav.toc a",{navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:20,reflow:!0,events:!0}),document.addEventListener("gumshoeActivate",function(e){var e=e.target,t={behavior:"auto",block:"nearest",inline:"start"},n=document.querySelector("aside.sidebar__right.sticky");n&&"sticky"===window.getComputedStyle(n).position&&(e.parentElement.classList.contains("toc__menu")&&e==e.parentElement.firstElementChild?document.querySelector("nav.toc header"):e).scrollIntoView(t)}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']").has("> img").addClass("image-popup"),$(".image-popup").magnificPopup({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'<a href="%url%">Image #%curr%</a> could not be loaded.'},removalDelay:500,mainClass:"mfp-zoom-in",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim")}},closeOnContentClick:!0,midClick:!0}),$(".page__content").find("h1, h2, h3, h4, h5, h6").each(function(){var e,t=$(this).attr("id");t&&((e=document.createElement("a")).className="header-link",e.href="#"+t,e.innerHTML='<span class="sr-only">Permalink</span><i class="fas fa-link"></i>',e.title="Permalink",$(this).append(e))})}); |