text: /*! bespoke-overview v1.0.5-dev © 2015 Dan Allen, MIT License */
  !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t=t.bespoke||(t.bespoke={}),t=t.plugins||(t.plugins={}),t.overview=e()}}(function(){return function e(t,o,n){function i(s,l){if(!o[s]){if(!t[s]){var a="function"==typeof require&&require;if(!l&&a)return a(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=o[s]={exports:{}};t[s][0].call(f.exports,function(e){var o=t[s][1][e];return i(o?o:e)},f,f.exports,e,t,o,n)}return o[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,o){t.exports=function(t){return e("insert-css")(".bespoke-parent.bespoke-overview{pointer-events:auto}.bespoke-overview :not(img){pointer-events:none}.bespoke-overview .bespoke-slide{opacity:1;visibility:visible;cursor:pointer;pointer-events:auto}.bespoke-overview .bespoke-active{outline:6px solid #cfd8dc;outline-offset:-3px;-moz-outline-radius:3px}.bespoke-overview .bespoke-bullet{opacity:1;visibility:visible}.bespoke-overview-counter{counter-reset:overview}.bespoke-overview-counter .bespoke-slide::after{counter-increment:overview;content:counter(overview);position:absolute;right:.75em;bottom:.5em;font-size:1.25rem;line-height:1.25}.bespoke-title{visibility:hidden;position:absolute;top:0;left:0;width:100%;pointer-events:auto}.bespoke-title h1{margin:0;font-size:1.6em;line-height:1.2;text-align:center}.bespoke-overview:not(.bespoke-overview-to) .bespoke-title{visibility:visible}.bespoke-overview-to .bespoke-active,.bespoke-overview-from .bespoke-active{z-index:1}",{prepend:!0}),function(e){t="object"==typeof t?t:{};var o,n=79,i=13,r=38,s=40,l=/, */,a=/^none(?:, ?none)*$/,c=/^translate\((.+?)px, ?(.+?)px\) scale\((.+?)\)$/,f=/(^\?|&)overview(?=$|&)/,p=!("transition"in document.body.style)&&"webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",v=["webkit","Moz"],u="number"==typeof t.columns?parseInt(t.columns):3,d="number"==typeof t.margin?parseFloat(t.margin):15,h=null,m=function(e,t){if(!(t in e.style))for(var o=t.charAt(0).toUpperCase()+t.substr(1),n=0,i=v.length;i>n;n++)if(v[n]+o in e.style)return v[n]+o;return t},b=function(e,t){return parseFloat(e.style[t].slice(6,-1))},y=function(e){return"zoom"in e.style?parseFloat(e.style.zoom)||void 0:void 0},w=function(e){var t=[],o=getComputedStyle(e),n=o[m(e,"transitionProperty")];if(!n||a.test(n))return t;n=n.split(l);var i=o[m(e,"transitionDuration")].split(l),r=o[m(e,"transitionDelay")].split(l);return n.forEach(function(e,o){("0s"!==i[o]||"0s"!==r[o])&&t.push(e)}),t},k=function(e,t,o,n){t&&(e.style[t]=o),e.offsetHeight,t&&(e.style[t]=n)},g=function(){e.on("activate",g)(),e.parent.scrollLeft=e.parent.scrollTop=0,(t.autostart||f.test(location.search))&&setTimeout(O,100)},x=function(){K(e.slides.indexOf(this))},E=function(t,o){var n=o.index+t;return n>=0&&n<e.slides.length&&e.slide(n,{preview:!0}),!1},L=function(e){e.scrollIntoView!==!1&&z(e.slide,e.index,y(e.slide))},T=function(e){var t=location.search.replace(f,"").replace(/^[^?]/,"?$&");e?history.replaceState(null,null,location.pathname+(t.length>0?t+"&":"?")+"overview"+location.hash):history.replaceState(null,null,location.pathname+t+location.hash)},z=function(t,o,n){e.parent.scrollTop=u>o?0:e.parent.scrollTop+t.getBoundingClientRect().top*(n||1)},C=function(e,t,n,i){n.removeEventListener(p,o,!1),i&&i!==n&&i.removeEventListener(p,o,!1),o=void 0,t.remove("bespoke-overview-"+e)},B=function(e){var t=e.firstElementChild;if(t.classList.contains("bespoke-title"))return t.style.width="",t;var o=document.createElement("header");o.className="bespoke-title",o.style[m(o,"transformOrigin")]="0 0";var n=document.createElement("h1");return n.appendChild(document.createTextNode(e.getAttribute("data-title")||document.title)),o.appendChild(n),k(e.insertBefore(o,t)),o},O=function(){var n,i,r=e.slides,s=e.parent,l=s.classList,a=r.length-1,c=e.slide(),f=c>0?r[0]:r[a],v=m(f,"transform"),g=s.querySelector(".bespoke-scale-parent"),K=1,S=0,W=h,H="webkitAppearance"in s.style;g?K=b(g,v):(n=y(f))&&(K=n),o&&C("from",l,r[0],r[a]),t.title&&(i=B(s)),W||(e.slide(c,{preview:!0}),l.add("bespoke-overview"),addEventListener("resize",O,!1),h=[e.on("activate",L),e.on("prev",E.bind(null,-1)),e.on("next",E.bind(null,1))],t.counter&&l.add("bespoke-overview-counter"),t.location&&T(!0),l.add("bespoke-overview-to"),S=a>0?w(f).length:w(f).join(" ").indexOf("transform")<0?0:1,s.style.overflowY="scroll",s.style.scrollBehavior="smooth",H&&r.forEach(function(e){k(e,"marginBottom","0%","")}));var q=s.clientWidth/K,F=s.clientHeight/K,N=(g||s).offsetWidth-s.clientWidth,A=g?N/2/K:0,j=f.offsetWidth,D=f.offsetHeight,$=q/(u*j+(u+1)*d),I=K*$,U=j*$,Y=D*$,M=(q-U)/2,V=(F-Y)/2,_=d*$,P=0,R=0,G=0;i&&(t.scaleTitle!==!1?(i.style[n?"zoom":v]=n?I:"scale("+I+")",i.style.width=s.clientWidth/I+"px",P=i.offsetHeight*$):(N>0&&(i.style.width=s.clientWidth+"px"),P=i.offsetHeight/K)),r.forEach(function(e){var t=G*U+(G+1)*_-A-M,o=R*Y+(R+1)*_+P-V;e.style[v]="translate("+(t.toString().indexOf("e-")<0?t:0)+"px, "+(o.toString().indexOf("e-")<0?o:0)+"px) scale("+$+")",R*u+G===a&&(e.style.marginBottom=d+"px"),e.addEventListener("click",x,!1),G===u-1?(R+=1,G=0):G+=1}),W?z(r[c],c,n):S>0?f.addEventListener(p,o=function(e){e.target===this&&0===(S-=1)&&(C("to",l,this),H&&s.scrollHeight>s.clientHeight&&k(s,"overflowY","auto","scroll"),z(r[c],c,n))},!1):(r.forEach(function(e){k(e)}),l.remove("bespoke-overview-to"),z(r[c],c,n))},K=function(n){e.slide("number"==typeof n?n:e.slide(),{scrollIntoView:!1});var i,r=e.slides,s=e.parent,l=s.classList,a=r.length-1,f=e.slide()>0?r[0]:r[a],v=m(f,"transform"),u=m(f,"transition"),d=s.querySelector(".bespoke-scale-parent"),g="webkitAppearance"in s.style;d?i=b(d,v):(i=y(f))||(i=1),o&&C("to",l,r[0],r[a]);var E=s.scrollTop/i,L=(s.offsetWidth-(d||s).clientWidth)/2/i;s.style.scrollBehavior=s.style.overflowY="",r.forEach(function(e){g&&k(e,"marginBottom","0%",""),e.removeEventListener("click",x,!1)}),(E||L)&&r.forEach(function(e){var t=e.style[v].match(c);e.style[v]="translate("+(parseFloat(t[1])-L)+"px, "+(parseFloat(t[2])-E)+"px) scale("+t[3]+")",k(e,u,"none","")}),s.scrollTop=0,l.remove("bespoke-overview"),removeEventListener("resize",O,!1),(h||[]).forEach(function(e){e()}),h=null,t.counter&&l.remove("bespoke-overview-counter"),t.location&&T(!1),l.add("bespoke-overview-from");var z=a>0?w(f).length:w(f).join(" ").indexOf("transform")<0?0:1;r.forEach(function(e){e.style[v]=""}),z>0?f.addEventListener(p,o=function(e){e.target===this&&0===(z-=1)&&C("from",l,this)},!1):(r.forEach(function(e){k(e)}),l.remove("bespoke-overview-from"))},S=function(){h?K():O()},W=function(t){if(t.which===n)t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||S();else if(h)switch(t.which){case i:t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||K();break;case r:return E(-u,{index:e.slide()});case s:return E(u,{index:e.slide()})}};e.on("activate",g),e.on("destroy",function(){removeEventListener("resize",O,!1),document.removeEventListener("keydown",W,!1)}),e.on("overview",S),document.addEventListener("keydown",W,!1)}}},{"insert-css":2}],2:[function(e,t,o){var n={};t.exports=function(e,t){if(!n[e]){n[e]=!0;var o=document.createElement("style");o.setAttribute("type","text/css"),"textContent"in o?o.textContent=e:o.styleSheet.cssText=e;var i=document.getElementsByTagName("head")[0];t&&t.prepend?i.insertBefore(o,i.childNodes[0]):i.appendChild(o)}}},{}]},{},[1])(1)});