{"version":3,"sources":["site.js"],"names":["window","NodeList","prototype","forEach","Array","pxlCookie","create","name","value","days","arguments","length","undefined","date","Date","expires","setTime","getTime","toGMTString","document","cookie","erase","this","read","nameEQ","ca","split","i","c","charAt","substring","indexOf","$","currentScrollTop","nav","$navbar","pos","documentElement","scrollTop","body","hasClass","addClass","removeClass","onIntersection","entries","entry","target","tagName","isIntersecting","classList","add","remove","video","querySelector","setAttribute","paused","play","menu","getElementById","openBtns","querySelectorAll","closeBtn","activeBtn","style","display","addEventListener","e","preventDefault","removeClickListener","outsideClickListener","event","contains","removeEventListener","capture","btn","menutray","targets","slice","call","observer","IntersectionObserver","rootMargin","threshold","observe","observerInit","scroll","jQuery"],"mappings":"aAGIA,OAAOC,WAAaA,SAASC,UAAUC,UAAUF,SAASC,UAAUC,QAAUC,MAAMF,UAAUC,SAElG,IAAIE,UAAY,CACdC,OADc,SACPC,EAAMC,GAAqB,IAAdC,EAAcC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAC5BG,EAAO,IAAIC,KAAQC,EAAU,GAUjC,OARKN,GACHI,EAAKG,QAAQH,EAAKI,UAAgB,GAALR,EAAQ,GAAG,GAAG,KAC3CM,EAAU,aAAaF,EAAKK,eAEzBH,EAAU,0CAEfI,SAASC,OAASb,EAAK,IAAIC,EAAMO,EAAQ,YAElC,GAETM,MAdc,SAcRd,GACJe,KAAKhB,OAAOC,EAAK,IAAI,IAEvBgB,KAjBc,SAiBThB,GAGH,IAFA,IAAIiB,EAASjB,EAAO,IAAKkB,EAAKN,SAASC,OAAOM,MAAM,KAE5CC,EAAE,EAAEA,EAAIF,EAAGd,OAAOgB,IAAK,CAE7B,IADA,IAAIC,EAAIH,EAAGE,GACS,KAAbC,EAAEC,OAAO,IAASD,EAAIA,EAAEE,UAAU,EAAEF,EAAEjB,QAC7C,GAAyB,GAArBiB,EAAEG,QAAQP,GAAc,OAAOI,EAAEE,UAAUN,EAAOb,OAAOiB,EAAEjB,QAGjE,OA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UK,GActC,OAbAA,EAAMH,iBACNL,EAAYY,EAEPJ,EAAMxB,QAAU4B,GAAOjB,EAAKR,UAAUsB,SAAS,SAClDd,EAAKR,UAAUE,OAAO,QACtBiB,MAGA7B,EAAKU,UAAUC,IAAI,eACnBO,EAAKR,UAAUC,IAAI,QACnB/B,SAAS8C,iBAAiB,QAASI,EAAsB,CAACI,SAAQ,MAG7D,SA6CfE,GACAzC,IAvCA,WACE,IAAI0C,EAAU,GAAGC,MAAMC,KAAK3D,SAASyC,iBAAiB,iBAMtD,GAAO,yBAA0B5D,OAI1B,CACL,IAAI+E,EAAW,IAAIC,qBAAqBrC,EAV7B,CACPsC,WAAY,MACZC,UAAW,KASfN,EAAQzE,SAAQ,SAAA2C,GACdiC,EAASI,QAAQrC,WANnB8B,EAAQzE,SAAQ,SAAS2C,GACC,WAAnBA,EAAOC,SAAuBD,EAAOG,UAAUC,IAAI,cA+B9DkC,GAEApD,EAAEhC,QAAQqF,QAAO,WAAanD,UAnHlC,CAqHGoD","sourcesContent":["/* globals jQuery */\n/* exported pxlCookie */\n\nif (window.NodeList && !NodeList.prototype.forEach) {NodeList.prototype.forEach = Array.prototype.forEach;}\n\nvar pxlCookie = {\n create(name, value, days = false) {\n var date = new Date(), expires = '';\n \n if ( days ) {\n date.setTime(date.getTime()+(days*24*60*60*1000));\n expires = \"; expires=\"+date.toGMTString();\n }\n else expires = \"; expires=Tue, 19 Jan 2088 03:14:07 UTC\";\n \n document.cookie = name+\"=\"+value+expires+\"; path=/\";\n \n return true;\n },\n erase(name) {\n this.create(name,\"\",-1);\n },\n read(name) {\n var nameEQ = name + \"=\", ca = document.cookie.split(';');\n \n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') c = c.substring(1,c.length);\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);\n }\n \n return false;\n }\n};\n\n(function($){\n // Adds a class to navbar when user is no longer at the top of the page for targeting style changes for fixed navbars\n var c, currentScrollTop = 0;\n function nav() {\n var $navbar = $('#navbar'),\n pos = (document.documentElement.scrollTop||document.body.scrollTop);\n \n currentScrollTop = pos;\n if (!$navbar.hasClass('static')){\n if (c < currentScrollTop && pos > 100) $navbar.addClass(\"scrollUp\");\n else if (c > currentScrollTop && !(pos <= 100)) $navbar.removeClass(\"scrollUp\");\n \n if (pos > 10) $navbar.addClass(\"scrolled\");\n else $navbar.removeClass(\"scrolled\");\n \n c = currentScrollTop;\n }\n \n return false;\n }\n \n // Menu Tray\n function menutray() {\n var body = document.querySelector('body'), menu = document.getElementById('menutray');\n \n if ( menu ) {\n var openBtns = document.querySelectorAll('.more'),\n closeBtn = menu.querySelector('.closebtn'),\n activeBtn = false;\n \n menu.style.display = '';\n \n closeBtn.addEventListener('click', function(e) {\n e.preventDefault();\n menu.classList.remove('open');\n removeClickListener();\n return false;\n });\n \n const outsideClickListener = function( event ) {\n if ( !menu.contains(event.target) && !activeBtn.contains(event.target) ) {\n event.preventDefault();\n removeClickListener();\n }\n },\n removeClickListener = function() {\n body.classList.remove('scroll-lock');\n menu.classList.remove('open');\n document.removeEventListener('click', outsideClickListener, {capture:true})\n }\n \n openBtns.forEach(function( btn ) {\n btn.addEventListener('click', function( event ) {\n event.preventDefault();\n activeBtn = btn;\n \n if ( event.target == btn && menu.classList.contains('open') ) {\n menu.classList.remove('open');\n removeClickListener();\n }\n else {\n body.classList.add('scroll-lock');\n menu.classList.add('open');\n document.addEventListener('click', outsideClickListener, {capture:true});\n }\n \n return false;\n });\n });\n }\n }\n \n // Visibility observer for animation triggering\n function observerInit(){\n var targets = [].slice.call(document.querySelectorAll('.content > *')),\n config = {\n rootMargin: '0px',\n threshold: 0.1\n };\n \n if ( !('IntersectionObserver' in window) ) {\n targets.forEach(function(target) {\n if ( target.tagName !== 'FIGURE' ) target.classList.add('visible');\n });\n } else {\n let observer = new IntersectionObserver(onIntersection, config);\n targets.forEach(target => {\n observer.observe(target);\n });\n }\n }\n function onIntersection(entries) {\n entries.forEach(entry => {\n if ( entry.target.tagName !== 'FIGURE' ) {\n if ( entry.isIntersecting ) entry.target.classList.add('visible');\n else entry.target.classList.remove('visible');\n }\n });\n }\n \n // Cover Video Autoplay for Tablets and Mobile\n function coverVideo() {\n var video = document.querySelector('video[autoplay]');\n if ( video ) {\n video.setAttribute('playsinline', true);\n if ( video.paused ) video.play();\n }\n }\n \n $(function(){\n coverVideo();\n menutray();\n nav();\n observerInit();\n \n $(window).scroll(function() { nav(); });\n })\n})(jQuery);\n"]}