@foeewni/web-core 3.0.0-alpha.3 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/foe.critical.min.css +6 -6
- package/dist/css/foe.extras.min.css +1 -1
- package/dist/css/foe.main.min.css +5 -5
- package/dist/js/foe.main.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/buttons.scss +20 -0
- package/src/components/hero-panel/style.scss +2 -1
- package/src/components/layout/backgrounds.scss +43 -0
- package/src/components/navigation/_header.scss +2 -2
- package/src/components/navigation/_nav-items.scss +10 -1
- package/src/components/tools/jaunty.js +246 -0
- package/src/components/typography/blockquotes.scss +2 -1
- package/src/main.js +1 -0
- package/src/utils/scss/helpers/_mixins.scss +1 -1
- package/src/utils/scss/helpers/_variables.scss +2 -2
package/dist/js/foe.main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={1460:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o},t.exports.default=t.exports,t.exports.__esModule=!0},6130:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},1112:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},4639:t=>{function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t},t.exports.default=t.exports,t.exports.__esModule=!0},1230:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},6378:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},6395:(t,e,n)=>{var o=n(2861).default;function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=t[i]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},2464:t=>{t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);o=!0);}catch(t){r=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}},t.exports.default=t.exports,t.exports.__esModule=!0},9407:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},3942:(t,e,n)=>{var o=n(6130),r=n(2464),a=n(913),i=n(9407);t.exports=function(t,e){return o(t)||r(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},2861:t=>{function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},913:(t,e,n)=>{var o=n(1460);t.exports=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},3800:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(1112)),a=o(n(4639)),i=o(n(5311)),s=o(n(9859)),l="bs.alert",c=".".concat(l),u=i.default.fn.alert,f="close".concat(c),d="closed".concat(c),p="click".concat(c).concat(".data-api"),h=function(){function t(e){(0,r.default)(this,t),this._element=e}return(0,a.default)(t,[{key:"close",value:function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}},{key:"dispose",value:function(){i.default.removeData(this._element,l),this._element=null}},{key:"_getRootElement",value:function(t){var e=s.default.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=(0,i.default)(t).closest(".".concat("alert"))[0]),n}},{key:"_triggerCloseEvent",value:function(t){var e=i.default.Event(f);return(0,i.default)(t).trigger(e),e}},{key:"_removeElement",value:function(t){var e=this;if((0,i.default)(t).removeClass("show"),(0,i.default)(t).hasClass("fade")){var n=s.default.getTransitionDurationFromElement(t);(0,i.default)(t).one(s.default.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)}},{key:"_destroyElement",value:function(t){(0,i.default)(t).detach().trigger(d).remove()}}],[{key:"VERSION",get:function(){return"4.6.2"}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,i.default)(this),o=n.data(l);o||(o=new t(this),n.data(l,o)),"close"===e&&o[e](this)}))}},{key:"_handleDismiss",value:function(t){return function(e){e&&e.preventDefault(),t.close(this)}}}]),t}();(0,i.default)(document).on(p,'[data-dismiss="alert"]',h._handleDismiss(new h)),i.default.fn.alert=h._jQueryInterface,i.default.fn.alert.Constructor=h,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=u,h._jQueryInterface};var g=h;e.default=g},6874:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2861)),a=o(n(1230)),i=o(n(1112)),s=o(n(4639)),l=o(n(5311)),c=o(n(9859));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d="scrollspy",p="bs.scrollspy",h=".".concat(p),g=l.default.fn[d],m="active",v="activate".concat(h),y="scroll".concat(h),_="load".concat(h).concat(".data-api"),w="position",b=".nav, .list-group",x=".nav-link",k=".list-group-item",E={offset:10,method:"auto",target:""},O={offset:"number",method:"string",target:"(string|element)"},S=function(){function t(e,n){var o=this;(0,i.default)(this,t),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector="".concat(this._config.target," ").concat(x,",")+"".concat(this._config.target," ").concat(k,",")+"".concat(this._config.target," ").concat(".dropdown-item"),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,(0,l.default)(this._scrollElement).on(y,(function(t){return o._process(t)})),this.refresh(),this._process()}return(0,s.default)(t,[{key:"refresh",value:function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":w,n="auto"===this._config.method?e:this._config.method,o=n===w?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=c.default.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[(0,l.default)(e)[n]().top+o,r]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))}},{key:"dispose",value:function(){l.default.removeData(this._element,p),(0,l.default)(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(t){if("string"!=typeof(t=f(f({},E),"object"===(0,r.default)(t)&&t?t:{})).target&&c.default.isElement(t.target)){var e=(0,l.default)(t.target).attr("id");e||(e=c.default.getUID(d),(0,l.default)(t.target).attr("id",e)),t.target="#".concat(e)}return c.default.typeCheckConfig(d,t,O),t}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_getOffsetHeight",value:function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}},{key:"_process",value:function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}}},{key:"_activate",value:function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return"".concat(e,'[data-target="').concat(t,'"],').concat(e,'[href="').concat(t,'"]')})),n=(0,l.default)([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(m),n.addClass(m)):(n.addClass(m),n.parents(b).prev("".concat(x,", ").concat(k)).addClass(m),n.parents(b).prev(".nav-item").children(x).addClass(m)),(0,l.default)(this._scrollElement).trigger(v,{relatedTarget:t})}},{key:"_clear",value:function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(m)})).forEach((function(t){return t.classList.remove(m)}))}}],[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return E}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,l.default)(this).data(p),o="object"===(0,r.default)(e)&&e;if(n||(n=new t(this,o),(0,l.default)(this).data(p,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),t}();(0,l.default)(window).on(_,(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=(0,l.default)(t[e]);S._jQueryInterface.call(n,n.data())}})),l.default.fn[d]=S._jQueryInterface,l.default.fn[d].Constructor=S,l.default.fn[d].noConflict=function(){return l.default.fn[d]=g,S._jQueryInterface};var j=S;e.default=j},9859:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(5311)),a="transitionend";function i(t){var e=this,n=!1;return(0,r.default)(this).one(s.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||s.triggerTransitionEnd(e)}),t),this}var s={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=(0,r.default)(t).css("transition-duration"),n=(0,r.default)(t).css("transition-delay"),o=parseFloat(e),a=parseFloat(n);return o||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){(0,r.default)(t).trigger(a)},supportsTransitionEnd:function(){return Boolean(a)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var r=n[o],a=e[o],i=a&&s.isElement(a)?"element":null==(l=a)?"".concat(l):{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(i))throw new Error("".concat(t.toUpperCase(),": ")+'Option "'.concat(o,'" provided type "').concat(i,'" ')+'but expected type "'.concat(r,'".'))}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?s.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===r.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};s.jQueryDetection(),r.default.fn.emulateTransitionEnd=i,r.default.event.special[s.TRANSITION_END]={bindType:a,delegateType:a,handle:function(t){if((0,r.default)(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l=s;e.default=l},3777:(t,e,n)=>{var o=n(2736),r=n(402),a=n(8055),i="localStorage"in n.g&&n.g.localStorage?n.g.localStorage:o;function s(t,e){return 1===arguments.length?l(t):c(t,e)}function l(t){var e=i.getItem(t);return r(e)}function c(t,e){try{return i.setItem(t,JSON.stringify(e)),!0}catch(t){return!1}}s.set=c,s.get=l,s.remove=function(t){return i.removeItem(t)},s.clear=function(){return i.clear()},s.backend=function(t){return t&&(i=t),i},s.on=a.on,s.off=a.off,t.exports=s},402:t=>{t.exports=function(t){var e=function(t){try{return JSON.parse(t)}catch(e){return t}}(t);return void 0===e?null:e}},2736:t=>{var e={};t.exports={getItem:function(t){return t in e?e[t]:null},setItem:function(t,n){return e[t]=n,!0},removeItem:function(t){return!!(t in e)&&delete e[t]},clear:function(){return e={},!0}}},8055:(t,e,n)=>{var o=n(402),r={};function a(t){t||(t=n.g.event);var e=r[t.key];e&&e.forEach((function(e){e(o(t.newValue),o(t.oldValue),t.url||t.uri)}))}t.exports={on:function(t,e){r[t]?r[t].push(e):r[t]=[e],n.g.addEventListener?n.g.addEventListener("storage",a,!1):n.g.attachEvent?n.g.attachEvent("onstorage",a):n.g.onstorage=a},off:function(t,e){var n=r[t];n.length>1?n.splice(n.indexOf(e),1):r[t]=[]}}},3829:(t,e,n)=>{var o,r,a;n(6690),o=window.jQuery,r=o("#foe-secondary-nav"),a=o("#campaignnav-menu-items"),o(document).on("click","#js-foe-secondary-trigger",(function(){a.hasClass("collapsing")||(r.toggleClass("nav-open"),a.toggleClass("collapse"))}))},2851:(t,e,n)=>{var o=n(6378)(n(7957));n(2110),function(t){if(t("body").hasClass("foe-page-go-top")){var e=o.default.getScrollFromScreens(2),n=t('<a name="foe-go-top-anchor"></a>'),r=t('\n <a id="foe-go-top" href="#foe-go-top-anchor" title="Return to the top of the page">\n <i class="fas fa-arrow-alt-circle-up"></i>\n <span class="sr-only">Go to top</span>\n </a>\n ');n.prependTo("body"),r.appendTo("body");var a=function(){var t=o.default.getScrollTop();t>=e&&!r.hasClass("visible")&&r.addClass("visible"),t<e&&r.hasClass("visible")&&r.removeClass("visible")};t(window).on("scroll",a),t(window).on("resize",(function(){e=o.default.getScrollFromScreens(2),a()}))}}(window.jQuery)},5969:(t,e,n)=>{n(894)},2981:()=>{!function(t){var e=/(\.jpg|\.gif|\.png|\.pdf|\.doc|\.docx|\.zip|\.tar|\.gz|\.rar|\.wav|\.mp4|\.giv|\.webm)$/gi;function n(t){var n=t.hostname,o=t.href;return n===window.location.hostname||n.match(/.*foe\.co\.uk/)||n.match(/.*foeshop\.co\.uk/)||n.match(/.*friendsoftheearth\.uk/)||n.match(/.*takeclimateaction\.uk/)?-1!==n.indexOf("act")?"Click to Campaignion":o.match(e)?"download-resource":"Click inbound":"Click outbound"}function o(t){return"".concat(t.textContent.trim()," | ").concat(t.href)}function r(){var t={};if(this.dataset.clickTrack)try{t=JSON.parse(this.dataset.clickTrack)}catch(t){console.warn("Warning: [data-click-track] attribute is not valid",t)}var e,r,a,i,s={eventCategory:(e=this,r="unknown","A"===e.tagName&&(r=e.className.match(/(foe-cta|btn)/)?"Link CTA":"Link Text"),r),eventAction:n(this),eventLabel:o(this)};this.dataset.clickTrack=JSON.stringify((a=s,i=t,Object.keys(i).forEach((function(t){a[t]=i[t]})),a))}t(document).ready((function(){t("a[href]").each(r)}))}(window.jQuery)},5264:(t,e,n)=>{n(3502),window.deferSrc=function(t){var e=!1,n=t.dataset.deferSrc;t.classList.add("js-defer-is-loading"),t.addEventListener("load",(function(){t.classList.remove("js-defer-is-loading")})),new IntersectionObserver((function(o){o.forEach((function(o){!e&&o.intersectionRatio>0&&(e=!0,"IFRAME"===t.tagName?t.contentWindow.location.replace(n):t.src=n),t.hasAttribute("data-defer-dispose")&&e&&0===o.intersectionRatio&&(e=!1,"IFRAME"===t.tagName?t.contentWindow.location.replace("about:blank"):t.removeAttribute("src"),t.classList.add("js-defer-is-loading"))}))})).observe(t)},document.querySelectorAll("[data-defer-src]").forEach((function(t){window.deferSrc(t)}))},1506:(t,e,n)=>{var o=n(6378)(n(7957));!function(t){function e(e){var n=this.hash,r=!1;if("A"===this.tagName)if(t(this).attr("data-scroll-to"))r=!0;else if("_blank"===this.target||window.location.hostname!==this.hostname||window.location.pathname.replace(/^\//,"")!==this.pathname.replace(/^\//,"")||""===n&&!this.dataset.scrollTo||this.search!==window.location.search)return;var a=/#.{2,}/.test(n)?t(n):t(t(this).attr("data-scroll-to"));if((a=a.length?a:t('[name="'.concat(n.substr(1),'"]'))).length){var i=o.default.getHeaderHeight(),s=parseInt(a.attr("data-scroll-to-padding")||20,10),l=a.offset().top-(i+s);if(t("body").hasClass("user-logged-in")){["#toolbar-bar","#toolbar-item-administration-tray",".tabs--primary"].forEach((function(e){t(e).length&&(l-=t(e).height())}))}t("html, body").stop().animate({scrollTop:l},750,"swing"),r||e.preventDefault()}}t(document).on("click","a:not([data-scroll-to])",e),t(document).on("click","[data-scroll-to]",e),t(document).on("load",(function(){window.location.hash&&(setTimeout((function(){window.scrollTo(0,0)}),1),setTimeout((function(){t('[href="'.concat(window.location.hash,'"]')).click()}),1))}))}(window.jQuery)},2445:(t,e,n)=>{var o=n(6395),r=n(6378),a=r(n(3942)),i=r(n(2861)),s=o(n(3777));!function(t){var e=18e5;var n={analytics:{source:"utm_source",medium:"utm_medium",term:"utm_term",content:"utm_content",campaign:"utm_campaign"},internal:{source:["source",function(t){return t&&t.toUpperCase()}],source_code_first:["source",function(t,e){return e&&"string"==typeof e?e.toUpperCase():t&&"string"==typeof t?t.toUpperCase():null}],mailing:["utm_content",function(t){if(t){var e=t.split("_");if(e[1]&&0===e[1].indexOf("lm"))return e[1].toUpperCase()}return null}],activity_year:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d/)?t.replace(/^FY(\d\d)(\d\d).*$/,"$1/$2"):null}],activity_month:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d-\d\d/)?t.replace(/^FY\d\d\d\d-(\d\d).*$/,"$1"):null}]},other:["other","o"],refsid:"refsid",tags:["tags",function(e,n){return e?function(t){if(!t.length)return t;for(var e=t.sort((function(t,e){return t>=e?1:-1})),n=[e[0]],o=1;o<e.length;o++)e[o-1]!==e[o]&&n.push(e[o]);return n}(t.merge(n,e.split(","))):n||[]}]},o=function t(e,n,o){var r;switch((0,i.default)(e)){case"string":return e in n?n[e]:"string"==typeof o?o:null;case"object":if(Array.isArray(e)){for(var a=0,s=e.length;a<s;a++)if("string"==typeof e[a]&&e[a]in n){r=n[e[a]];break}return"function"==typeof e[e.length-1]&&(r=e[e.length-1](r,o)),null!=r?r:"string"==typeof o?o:null}return r={},Object.keys(e).forEach((function(a){var i=t(e[a],n,o[a]||{});r[a]=null!=i?i:null})),r;default:return null}};function r(t,e,n){return t[0]!==e&&t.unshift(e),Number.isInteger(n)&&t.length>n&&(t=t.slice(0,n)),t}function l(t){for(var e=document.getElementsByTagName("meta"),n=0;n<e.length;n++)if(e[n].getAttribute("name")===t)return e[n].getAttribute("content");return null}t(document).ready((function(){var c=Object.assign({history:[],tags:[],source_history:[]},s.get("foe_data"));c.user_id=c.user_id||function(t,e,n,o,r,a){for(n=1,o=r=0;a=t.charCodeAt(r++);o=(o+n)%65521)n=(n+a)%65521;return o<<16|n}(String(Math.random()+Date.now()));var u=function(){for(var t={},e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var o=e[n].split("="),r=o[0],a=o[1];t[r]=decodeURIComponent(a)}return t}(),f=window.location.origin||"".concat(window.location.protocol,"//").concat(window.location.hostname),d=o(n,u,c);Object.assign(c,d),void 0===c.external_referer&&(0!==document.referrer.indexOf(f)?c.external_referer=document.referrer:void 0!==u.external_referer&&0!==u.external_referer.indexOf(f)&&(c.external_referer=u.external_referer)),c.internal=c.internal||{},c.internal.topic=l("foe:topic"),c.internal.campaign=l("foe:campaign"),c.internal.page_type=l("foe:page-type"),c.nid=t("[data-history-node-id]").attr("data-history-node-id")||t("[data-nid]").attr("data-nid")||t('[id*="node"]').attr("id")||null,"string"==typeof c.nid&&(c.nid=c.nid.replace("node-",""));var p=t('input[data-form-prefill-write="source_code"]');if(p.length&&(void 0===c.internal.source_code_first&&(c.internal.source_code_first=p.val()),void 0===c.internal.source&&(c.internal.source=p.val())),c.history=r(c.history,window.location.href,10),"string"==typeof u.source){var h={source:u.source,timestamp:Date.now()};c.source_history=r(c.source_history,h,10)}c.version=3,document.cookie="source_code_first=".concat(c.internal.source_code_first,";"),null===c.internal.source||void 0!==sessionStorage.source_code_session&&"null"!==sessionStorage.source_code_session||sessionStorage.setItem("source_code_session",c.internal.source),function(t,n){var r=o(t,n,{});if(Object.entries(r).filter((function(t){return null!==(0,a.default)(t,2)[1]})).length)return Object.assign(r,{expiry:Date.now()+e}),s.set("foe_attribution",r),r;var i=s.get("foe_attribution");if(i){if(i.expiry<Date.now())return s.set("foe_attribution",null),null;Object.assign(i,{expiry:Date.now()+e}),s.set("foe_attribution",i)}}(n.analytics,u),function(e){var n=JSON.stringify(e),o=t('input[data-form-prefill-write="foe_additional_data"]'),r=t('input[name="submitted[foe_additional_data]"]')||t('input[name="foe_additional_data"]');o.length?o.val(n):r.val(n);var a=t('input[data-form-prefill-write="source_code_first"]');if(a.length&&"string"==typeof e.internal.source_code_first&&a.val(e.internal.source_code_first),void 0!==sessionStorage.source_code_session){var l=sessionStorage.getItem("source_code_session"),c=t('input[data-form-prefill-write="source_code_session"]');null!==l&&l.length&&"string"==typeof l&&c.val(l)}var u=s.get("foe_attribution");u&&"object"===(0,i.default)(u)&&Object.keys(u).forEach((function(e){var n=t('input[data-form-prefill-write="attribution_'.concat(e,'"]'));u[e]&&u[e].length&&"string"==typeof u[e]&&n.val(u[e])}))}(c),s.set("foe_data",c)}))}(window.jQuery)},4577:(t,e,n)=>{var o=n(6378)(n(7957));!function(){if(!(window.navigator.userAgent.indexOf("MSIE")>=0||/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.userAgent.match(/Trident.*rv:11\./))){var t=o.default.getBreakpoints(),e={mobileBreak:parseInt(t.filter((function(t){return"md"===t.size})).pop().width,10),list:[],number:0,stackTop:0,pageBottom:null,init:function(){e.stopObserving(),e.pageBottom&&e.pageBottom.parentNode.removeChild(e.pageBottom);for(var t=0;t<e.number;t++){var n=e.list[t],o=n.placeholder,r=n.element;o.parentNode.removeChild(o),e.removeClass(r,"stickystack-stuck"),r.style.position=null,r.style.top=null,r.style.left=null,r.style.width=null,r.style.marginTop=null,r.style.marginBottom=null}e.pageBottom=document.createElement("div"),e.pageBottom.style.height=0,e.pageBottom.style.width="100%",e.addClass(e.pageBottom,"js-stickystack"),document.body.appendChild(e.pageBottom),e.number=0;var a=document.getElementsByClassName("js-stickystack");if(window.innerWidth<=e.mobileBreak){for(var i=[],s=0;s<a.length;s++)e.hasClass(a[s],"js-stickystack-nomobile")||i.push(a[s]);a=i}e.number=a.length,e.list=[],e.stackTop=0;for(var l=0;l<e.number;l++){var c=window.getComputedStyle(a[l]),u=document.createElement("div");u.style.width=c.getPropertyValue("width"),u.style.height=c.getPropertyValue("height"),u.style.top=c.getPropertyValue("top"),u.style.right=c.getPropertyValue("right"),u.style.bottom=c.getPropertyValue("bottom"),u.style.left=c.getPropertyValue("left"),u.style.margin=c.getPropertyValue("margin"),u.style.padding=c.getPropertyValue("padding"),u.style.border=c.getPropertyValue("border"),u.style.float=c.getPropertyValue("float"),u.style.clear=c.getPropertyValue("clear"),u.style.position=c.getPropertyValue("position"),u.style.display="none",u.style.visibility="hidden",a[l].parentNode.insertBefore(u,a[l]);var f=e.getCoords(a[l]);e.list.push({element:a[l],top:f.top,left:f.left-parseFloat(c.getPropertyValue("margin-left")),width:parseFloat(c.getPropertyValue("width")),placeholder:u,semistuck:e.hasClass(a[l],"js-stickystack-semi"),zIndex:100-l})}e.list.sort(e.sortByTop),e.stackTop=0,a=document.getElementsByClassName("js-stickystack-top");for(var d=0;d<a.length;d++){var p=e.getCoords(a[d]).top;e.stackTop=0===d?p:Math.min(e.stackTop,p)}e.update(),e.startObserving()},update:function(){for(var t=[[e.stackTop,0,document.body.offsetWidth]],n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=0;o<e.number;o++){var r=e.list[o],a=r.element,i=r.placeholder,s=r.left,l=r.width,c=r.top-n,u=e.getOverlap([c,s,l],t);if(u.overlap>0){i.style.display="block",e.addClass(a,"stickystack-stuck");var f=0;if(e.list[o].semistuck&&o+1<e.number)for(var d=[[u.absolute+a.offsetHeight,s,l]],p=o+1;p<e.number;p++){var h=[e.list[p].top-n,e.list[p].left,e.list[p].width],g=e.getOverlap(h,d);if(g.overlap>0){f=g.overlap;break}}a.style.position="fixed",a.style.top="".concat(u.absolute-f,"px"),a.style.left="".concat(s,"px"),a.style.width="".concat(l,"px"),a.style.zIndex=r.zIndex,a.style.marginTop=0,a.style.marginBottom=0;var m=u.absolute+a.offsetHeight-f;t.push([m,a.offsetLeft,a.offsetWidth])}else e.removeClass(a,"stickystack-stuck"),a.style.position=null,a.style.top=null,a.style.left=null,a.style.width=null,a.style.zIndex=null,a.style.marginTop=null,a.style.marginBottom=null,i.style.display="none"}},startObserving:function(){},stopObserving:function(){},getOverlap:function(t,e){for(var n=0,o=0,r=0;r<e.length;r++)t[0]<e[r][0]&&t[1]+t[2]>e[r][1]&&e[r][1]+e[r][2]>t[1]&&(n=Math.max(n,e[r][0]-t[0]),o=Math.max(o,e[r][0]));return{overlap:n,absolute:o}},sortByTop:function(t,e){return t.top-e.top},getCoords:function(t){var e=t.getBoundingClientRect(),n=document,o=n.body,r=n.documentElement,a=window.pageYOffset||r.scrollTop||o.scrollTop,i=window.pageXOffset||r.scrollLeft||o.scrollLeft,s=r.clientTop||o.clientTop||0,l=r.clientLeft||o.clientLeft||0,c=e.top+a-s,u=e.left+i-l;return{top:Math.round(c),left:Math.round(u)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)".concat(e,"(\\s|$)")))},addClass:function(t,n){t.classList?t.classList.add(n):e.hasClass(t,n)||(t.className+=" ".concat(n))},removeClass:function(t,n){if(t.classList)t.classList.remove(n);else if(e.hasClass(t,n)){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));t.className=t.className.replace(o," ")}}};window.addEventListener("DOMContentLoaded",e.init),window.addEventListener("load",e.init),window.addEventListener("resize",e.init),window.addEventListener("scroll",e.update),window.addEventListener("touchmove",e.update),window.ontouchstart=function(){},window.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){e.update()}),500)})),window.addEventListener("load",(function(){setTimeout((function(){e.update()}),500)}))}}()},7957:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(570)),a={getScrollTop:function(){if(void 0!==window.pageYOffset)return window.pageYOffset;var t=document.body,e=document.documentElement;return(e=e.clientHeight?e:t).scrollTop},getHalfScrollTop:function(){return this.getScrollTop()+window.innerHeight/2},getDocumentHeight:function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},getScrollFromScreens:function(t){return this.getViewportHeight()*t},getScrollFromPerc:function(t){return this.getDocumentHeight()/100*t},getViewportHeight:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight)},elementInViewport:function(t){var e=(0,window.jQuery)(t).offset().top,n=e+t.clientHeight,o=this.getScrollTop(),r=this.getViewportHeight();return!(n<o||e-r>=o)},getBreakpoints:function(){var t=[],e=r.default.default||r.default;return Object.keys(e).forEach((function(n){if(0===n.indexOf("breakpoint")){var o=n.replace("breakpoint-",""),r=parseInt(e[n],10);t.push({size:o,width:r})}})),t},getCurrentBreakpoint:function(){for(var t=this.getBreakpoints(),e=0;e<t.length-1&&window.innerWidth>=t[e+1].width;)e+=1;return t[e].size},getHeaderHeight:function(){var t=window.jQuery,e=this.getCurrentBreakpoint();return t(".foe-header").length?parseInt(r.default["foe-header-height-".concat(e)],10):0}};e.default=a},6690:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3660:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3607:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2110:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2214:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2219:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},1995:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},894:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3502:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},4690:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},7096:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},570:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={"breakpoint-xs":"0","breakpoint-sm":"576px","breakpoint-md":"768px","breakpoint-lg":"1024px","breakpoint-xl":"1366px","breakpoint-xxl":"1536px","container-xl":"1280px","container-xxl":"1420px","foe-header-height-xs":"60px","foe-header-height-sm":"60px","foe-header-height-md":"80px","foe-header-height-lg":"64px","foe-header-height-xl":"64px","foe-header-height-xxl":"64px"}},5311:t=>{t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(4690),n(7096),n(2219),n(3607),n(3660),n(3829),n(2851),n(5969),n(1506),n(2981),n(2445),n(5264),n(4577),n(2214),n(1995),n(9859),n(3800),n(6874),window.FoeWebcore&&window.FoeWebcore.critical||window.console.warn("You have loaded the main bundle without embedding the critical bundle first")})();
|
|
1
|
+
(()=>{"use strict";var t={1460:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o},t.exports.default=t.exports,t.exports.__esModule=!0},6130:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},1112:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},4639:t=>{function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t},t.exports.default=t.exports,t.exports.__esModule=!0},1230:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},6378:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},6395:(t,e,n)=>{var o=n(2861).default;function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=t[i]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},2464:t=>{t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);o=!0);}catch(t){r=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(r)throw a}}return n}},t.exports.default=t.exports,t.exports.__esModule=!0},9407:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},3942:(t,e,n)=>{var o=n(6130),r=n(2464),a=n(913),i=n(9407);t.exports=function(t,e){return o(t)||r(t,e)||a(t,e)||i()},t.exports.default=t.exports,t.exports.__esModule=!0},2861:t=>{function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},913:(t,e,n)=>{var o=n(1460);t.exports=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},3800:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(1112)),a=o(n(4639)),i=o(n(5311)),s=o(n(9859)),l="bs.alert",c=".".concat(l),u=i.default.fn.alert,d="close".concat(c),f="closed".concat(c),p="click".concat(c).concat(".data-api"),h=function(){function t(e){(0,r.default)(this,t),this._element=e}return(0,a.default)(t,[{key:"close",value:function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}},{key:"dispose",value:function(){i.default.removeData(this._element,l),this._element=null}},{key:"_getRootElement",value:function(t){var e=s.default.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=(0,i.default)(t).closest(".".concat("alert"))[0]),n}},{key:"_triggerCloseEvent",value:function(t){var e=i.default.Event(d);return(0,i.default)(t).trigger(e),e}},{key:"_removeElement",value:function(t){var e=this;if((0,i.default)(t).removeClass("show"),(0,i.default)(t).hasClass("fade")){var n=s.default.getTransitionDurationFromElement(t);(0,i.default)(t).one(s.default.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)}},{key:"_destroyElement",value:function(t){(0,i.default)(t).detach().trigger(f).remove()}}],[{key:"VERSION",get:function(){return"4.6.2"}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,i.default)(this),o=n.data(l);o||(o=new t(this),n.data(l,o)),"close"===e&&o[e](this)}))}},{key:"_handleDismiss",value:function(t){return function(e){e&&e.preventDefault(),t.close(this)}}}]),t}();(0,i.default)(document).on(p,'[data-dismiss="alert"]',h._handleDismiss(new h)),i.default.fn.alert=h._jQueryInterface,i.default.fn.alert.Constructor=h,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=u,h._jQueryInterface};var g=h;e.default=g},6874:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(2861)),a=o(n(1230)),i=o(n(1112)),s=o(n(4639)),l=o(n(5311)),c=o(n(9859));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f="scrollspy",p="bs.scrollspy",h=".".concat(p),g=l.default.fn[f],m="active",y="activate".concat(h),v="scroll".concat(h),_="load".concat(h).concat(".data-api"),w="position",b=".nav, .list-group",x=".nav-link",k=".list-group-item",E={offset:10,method:"auto",target:""},C={offset:"number",method:"string",target:"(string|element)"},S=function(){function t(e,n){var o=this;(0,i.default)(this,t),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector="".concat(this._config.target," ").concat(x,",")+"".concat(this._config.target," ").concat(k,",")+"".concat(this._config.target," ").concat(".dropdown-item"),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,(0,l.default)(this._scrollElement).on(v,(function(t){return o._process(t)})),this.refresh(),this._process()}return(0,s.default)(t,[{key:"refresh",value:function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":w,n="auto"===this._config.method?e:this._config.method,o=n===w?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=c.default.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[(0,l.default)(e)[n]().top+o,r]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))}},{key:"dispose",value:function(){l.default.removeData(this._element,p),(0,l.default)(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(t){if("string"!=typeof(t=d(d({},E),"object"===(0,r.default)(t)&&t?t:{})).target&&c.default.isElement(t.target)){var e=(0,l.default)(t.target).attr("id");e||(e=c.default.getUID(f),(0,l.default)(t.target).attr("id",e)),t.target="#".concat(e)}return c.default.typeCheckConfig(f,t,C),t}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_getOffsetHeight",value:function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}},{key:"_process",value:function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}}},{key:"_activate",value:function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return"".concat(e,'[data-target="').concat(t,'"],').concat(e,'[href="').concat(t,'"]')})),n=(0,l.default)([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(m),n.addClass(m)):(n.addClass(m),n.parents(b).prev("".concat(x,", ").concat(k)).addClass(m),n.parents(b).prev(".nav-item").children(x).addClass(m)),(0,l.default)(this._scrollElement).trigger(y,{relatedTarget:t})}},{key:"_clear",value:function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(m)})).forEach((function(t){return t.classList.remove(m)}))}}],[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return E}},{key:"_jQueryInterface",value:function(e){return this.each((function(){var n=(0,l.default)(this).data(p),o="object"===(0,r.default)(e)&&e;if(n||(n=new t(this,o),(0,l.default)(this).data(p,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),t}();(0,l.default)(window).on(_,(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=(0,l.default)(t[e]);S._jQueryInterface.call(n,n.data())}})),l.default.fn[f]=S._jQueryInterface,l.default.fn[f].Constructor=S,l.default.fn[f].noConflict=function(){return l.default.fn[f]=g,S._jQueryInterface};var O=S;e.default=O},9859:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(5311)),a="transitionend";function i(t){var e=this,n=!1;return(0,r.default)(this).one(s.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||s.triggerTransitionEnd(e)}),t),this}var s={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=(0,r.default)(t).css("transition-duration"),n=(0,r.default)(t).css("transition-delay"),o=parseFloat(e),a=parseFloat(n);return o||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){(0,r.default)(t).trigger(a)},supportsTransitionEnd:function(){return Boolean(a)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var r=n[o],a=e[o],i=a&&s.isElement(a)?"element":null==(l=a)?"".concat(l):{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(i))throw new Error("".concat(t.toUpperCase(),": ")+'Option "'.concat(o,'" provided type "').concat(i,'" ')+'but expected type "'.concat(r,'".'))}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?s.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===r.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};s.jQueryDetection(),r.default.fn.emulateTransitionEnd=i,r.default.event.special[s.TRANSITION_END]={bindType:a,delegateType:a,handle:function(t){if((0,r.default)(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l=s;e.default=l},3777:(t,e,n)=>{var o=n(2736),r=n(402),a=n(8055),i="localStorage"in n.g&&n.g.localStorage?n.g.localStorage:o;function s(t,e){return 1===arguments.length?l(t):c(t,e)}function l(t){var e=i.getItem(t);return r(e)}function c(t,e){try{return i.setItem(t,JSON.stringify(e)),!0}catch(t){return!1}}s.set=c,s.get=l,s.remove=function(t){return i.removeItem(t)},s.clear=function(){return i.clear()},s.backend=function(t){return t&&(i=t),i},s.on=a.on,s.off=a.off,t.exports=s},402:t=>{t.exports=function(t){var e=function(t){try{return JSON.parse(t)}catch(e){return t}}(t);return void 0===e?null:e}},2736:t=>{var e={};t.exports={getItem:function(t){return t in e?e[t]:null},setItem:function(t,n){return e[t]=n,!0},removeItem:function(t){return!!(t in e)&&delete e[t]},clear:function(){return e={},!0}}},8055:(t,e,n)=>{var o=n(402),r={};function a(t){t||(t=n.g.event);var e=r[t.key];e&&e.forEach((function(e){e(o(t.newValue),o(t.oldValue),t.url||t.uri)}))}t.exports={on:function(t,e){r[t]?r[t].push(e):r[t]=[e],n.g.addEventListener?n.g.addEventListener("storage",a,!1):n.g.attachEvent?n.g.attachEvent("onstorage",a):n.g.onstorage=a},off:function(t,e){var n=r[t];n.length>1?n.splice(n.indexOf(e),1):r[t]=[]}}},3829:(t,e,n)=>{var o,r,a;n(6690),o=window.jQuery,r=o("#foe-secondary-nav"),a=o("#campaignnav-menu-items"),o(document).on("click","#js-foe-secondary-trigger",(function(){a.hasClass("collapsing")||(r.toggleClass("nav-open"),a.toggleClass("collapse"))}))},2851:(t,e,n)=>{var o=n(6378)(n(7957));n(2110),function(t){if(t("body").hasClass("foe-page-go-top")){var e=o.default.getScrollFromScreens(2),n=t('<a name="foe-go-top-anchor"></a>'),r=t('\n <a id="foe-go-top" href="#foe-go-top-anchor" title="Return to the top of the page">\n <i class="fas fa-arrow-alt-circle-up"></i>\n <span class="sr-only">Go to top</span>\n </a>\n ');n.prependTo("body"),r.appendTo("body");var a=function(){var t=o.default.getScrollTop();t>=e&&!r.hasClass("visible")&&r.addClass("visible"),t<e&&r.hasClass("visible")&&r.removeClass("visible")};t(window).on("scroll",a),t(window).on("resize",(function(){e=o.default.getScrollFromScreens(2),a()}))}}(window.jQuery)},5969:(t,e,n)=>{n(894)},2981:()=>{!function(t){var e=/(\.jpg|\.gif|\.png|\.pdf|\.doc|\.docx|\.zip|\.tar|\.gz|\.rar|\.wav|\.mp4|\.giv|\.webm)$/gi;function n(t){var n=t.hostname,o=t.href;return n===window.location.hostname||n.match(/.*foe\.co\.uk/)||n.match(/.*foeshop\.co\.uk/)||n.match(/.*friendsoftheearth\.uk/)||n.match(/.*takeclimateaction\.uk/)?-1!==n.indexOf("act")?"Click to Campaignion":o.match(e)?"download-resource":"Click inbound":"Click outbound"}function o(t){return"".concat(t.textContent.trim()," | ").concat(t.href)}function r(){var t={};if(this.dataset.clickTrack)try{t=JSON.parse(this.dataset.clickTrack)}catch(t){console.warn("Warning: [data-click-track] attribute is not valid",t)}var e,r,a,i,s={eventCategory:(e=this,r="unknown","A"===e.tagName&&(r=e.className.match(/(foe-cta|btn)/)?"Link CTA":"Link Text"),r),eventAction:n(this),eventLabel:o(this)};this.dataset.clickTrack=JSON.stringify((a=s,i=t,Object.keys(i).forEach((function(t){a[t]=i[t]})),a))}t(document).ready((function(){t("a[href]").each(r)}))}(window.jQuery)},5264:(t,e,n)=>{n(3502),window.deferSrc=function(t){var e=!1,n=t.dataset.deferSrc;t.classList.add("js-defer-is-loading"),t.addEventListener("load",(function(){t.classList.remove("js-defer-is-loading")})),new IntersectionObserver((function(o){o.forEach((function(o){!e&&o.intersectionRatio>0&&(e=!0,"IFRAME"===t.tagName?t.contentWindow.location.replace(n):t.src=n),t.hasAttribute("data-defer-dispose")&&e&&0===o.intersectionRatio&&(e=!1,"IFRAME"===t.tagName?t.contentWindow.location.replace("about:blank"):t.removeAttribute("src"),t.classList.add("js-defer-is-loading"))}))})).observe(t)},document.querySelectorAll("[data-defer-src]").forEach((function(t){window.deferSrc(t)}))},1506:(t,e,n)=>{var o=n(6378)(n(7957));!function(t){function e(e){var n=this.hash,r=!1;if("A"===this.tagName)if(t(this).attr("data-scroll-to"))r=!0;else if("_blank"===this.target||window.location.hostname!==this.hostname||window.location.pathname.replace(/^\//,"")!==this.pathname.replace(/^\//,"")||""===n&&!this.dataset.scrollTo||this.search!==window.location.search)return;var a=/#.{2,}/.test(n)?t(n):t(t(this).attr("data-scroll-to"));if((a=a.length?a:t('[name="'.concat(n.substr(1),'"]'))).length){var i=o.default.getHeaderHeight(),s=parseInt(a.attr("data-scroll-to-padding")||20,10),l=a.offset().top-(i+s);if(t("body").hasClass("user-logged-in")){["#toolbar-bar","#toolbar-item-administration-tray",".tabs--primary"].forEach((function(e){t(e).length&&(l-=t(e).height())}))}t("html, body").stop().animate({scrollTop:l},750,"swing"),r||e.preventDefault()}}t(document).on("click","a:not([data-scroll-to])",e),t(document).on("click","[data-scroll-to]",e),t(document).on("load",(function(){window.location.hash&&(setTimeout((function(){window.scrollTo(0,0)}),1),setTimeout((function(){t('[href="'.concat(window.location.hash,'"]')).click()}),1))}))}(window.jQuery)},5615:()=>{var t,e,n,o,r,a;t=0,e=0,n=function(t){for(var e="",n="ABCDEF1234567890",o=n.length,r=0;r<t;r++)e+=n.charAt(Math.floor(Math.random()*o));return e},o=function(o){if(o.firstChild.nodeType===Node.TEXT_NODE){o.dataset.backgroundCanvasId||(o.dataset.backgroundCanvasId=n(12));var r=document.getElementById(o.dataset.backgroundCanvasId);r&&r.remove();var a=getComputedStyle(o).transform;o.style.transition="none",o.style.transform=null;var i=parseFloat(o.dataset.jauntFactor);e=1.5*t*i;var s=o.dataset.jauntSeed?o.dataset.jauntSeed:n(32);o.dataset.jauntSeed=s,o.textContent=o.textContent.replace(/\s+/g," ").trim();var l=o.firstChild.textContent,c=document.createRange();c.setStart(o.firstChild,0),c.setEnd(o.firstChild,l.length);var u=o.getBoundingClientRect(),d=o.offsetParent?o.offsetParent.getBoundingClientRect():u,f=c.getBoundingClientRect(),p=Array.from(c.getClientRects()),h=document.createElement("canvas");h.id=o.dataset.backgroundCanvasId,o.parentNode.insertBefore(h,o),h.style.position="absolute",h.style.zIndex=-1,h.style.top="".concat(u.top-d.top-2*e,"px"),h.style.left="".concat(u.left-d.left-2*e,"px"),h.style.width="".concat(u.width+4*e,"px"),h.style.height="".concat(u.height+4*e,"px"),h.width=u.width+4*e,h.height=u.height+4*e,h.style.pointerEvents="none";var g=h.getContext("2d");o.style.backgroundColor=null,o.style.borderColor=null,g.fillStyle=getComputedStyle(o).backgroundColor,g.fillStyle||(g.fillStyle="#61bdaa"),g.strokeStyle=getComputedStyle(o).borderColor,o.style.backgroundColor="transparent",o.style.borderColor="transparent";var m="center"===getComputedStyle(o).textAlign?(u.width-f.width)/2-e:0;p.forEach((function(n,o){var r=[];r.push({x:m+n.left-f.left+2*e,y:n.top-f.top+2*e}),r.push({x:r[0].x+n.width+2*e,y:r[0].y}),r.push({x:r[0].x+n.width+2*e,y:r[0].y+n.height+2*e}),r.push({x:r[0].x,y:r[0].y+n.height+2*e});var a=s.substring(o)+s.substring(0,o),l=a.length/r.length;r.forEach((function(e,n){var o=n*l,s=o+l/2,c=o+l,u=l/2+1,d=a.substring(o,s),f=a.substring(s,c);d=Number("0x".concat(d)),f=Number("0x".concat(f)),d/=Math.pow(10,u),f/=Math.pow(10,u),r[n]={x:e.x+(2*d-1)*t*1*i,y:e.y+(2*f-1)*t*1*i}})),function(t,e){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.lineTo(e[0].x,e[0].y),t.fill(),t.stroke()}(g,r)})),o.style.transform=a,o.style.transition=null;var y=s.length/2+1,v=s.substring(1,y);v=Number("0x".concat(s)),v/=Math.pow(10,"".concat(v).length);var _=3*i*(2*v-1);o.style.transform="rotate(".concat(_,"deg)"),h.style.transform="rotate(".concat(_,"deg)")}},r=function(){t=parseFloat(getComputedStyle(document.documentElement).fontSize),document.querySelectorAll("[data-jaunt-factor]").forEach((function(t){o(t),["mouseenter","mouseleave","focus"].forEach((function(e){t.addEventListener(e,(function(t){o(t.target)}))}))}))},a=function(){r()},document.addEventListener("DOMContentLoaded",a),document.addEventListener("load",a),window.addEventListener("resize",r),window.runJaunt=a},2445:(t,e,n)=>{var o=n(6395),r=n(6378),a=r(n(3942)),i=r(n(2861)),s=o(n(3777));!function(t){var e=18e5;var n={analytics:{source:"utm_source",medium:"utm_medium",term:"utm_term",content:"utm_content",campaign:"utm_campaign"},internal:{source:["source",function(t){return t&&t.toUpperCase()}],source_code_first:["source",function(t,e){return e&&"string"==typeof e?e.toUpperCase():t&&"string"==typeof t?t.toUpperCase():null}],mailing:["utm_content",function(t){if(t){var e=t.split("_");if(e[1]&&0===e[1].indexOf("lm"))return e[1].toUpperCase()}return null}],activity_year:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d/)?t.replace(/^FY(\d\d)(\d\d).*$/,"$1/$2"):null}],activity_month:["utm_content",function(t){return t&&t.match(/^FY\d\d\d\d-\d\d/)?t.replace(/^FY\d\d\d\d-(\d\d).*$/,"$1"):null}]},other:["other","o"],refsid:"refsid",tags:["tags",function(e,n){return e?function(t){if(!t.length)return t;for(var e=t.sort((function(t,e){return t>=e?1:-1})),n=[e[0]],o=1;o<e.length;o++)e[o-1]!==e[o]&&n.push(e[o]);return n}(t.merge(n,e.split(","))):n||[]}]},o=function t(e,n,o){var r;switch((0,i.default)(e)){case"string":return e in n?n[e]:"string"==typeof o?o:null;case"object":if(Array.isArray(e)){for(var a=0,s=e.length;a<s;a++)if("string"==typeof e[a]&&e[a]in n){r=n[e[a]];break}return"function"==typeof e[e.length-1]&&(r=e[e.length-1](r,o)),null!=r?r:"string"==typeof o?o:null}return r={},Object.keys(e).forEach((function(a){var i=t(e[a],n,o[a]||{});r[a]=null!=i?i:null})),r;default:return null}};function r(t,e,n){return t[0]!==e&&t.unshift(e),Number.isInteger(n)&&t.length>n&&(t=t.slice(0,n)),t}function l(t){for(var e=document.getElementsByTagName("meta"),n=0;n<e.length;n++)if(e[n].getAttribute("name")===t)return e[n].getAttribute("content");return null}t(document).ready((function(){var c=Object.assign({history:[],tags:[],source_history:[]},s.get("foe_data"));c.user_id=c.user_id||function(t,e,n,o,r,a){for(n=1,o=r=0;a=t.charCodeAt(r++);o=(o+n)%65521)n=(n+a)%65521;return o<<16|n}(String(Math.random()+Date.now()));var u=function(){for(var t={},e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var o=e[n].split("="),r=o[0],a=o[1];t[r]=decodeURIComponent(a)}return t}(),d=window.location.origin||"".concat(window.location.protocol,"//").concat(window.location.hostname),f=o(n,u,c);Object.assign(c,f),void 0===c.external_referer&&(0!==document.referrer.indexOf(d)?c.external_referer=document.referrer:void 0!==u.external_referer&&0!==u.external_referer.indexOf(d)&&(c.external_referer=u.external_referer)),c.internal=c.internal||{},c.internal.topic=l("foe:topic"),c.internal.campaign=l("foe:campaign"),c.internal.page_type=l("foe:page-type"),c.nid=t("[data-history-node-id]").attr("data-history-node-id")||t("[data-nid]").attr("data-nid")||t('[id*="node"]').attr("id")||null,"string"==typeof c.nid&&(c.nid=c.nid.replace("node-",""));var p=t('input[data-form-prefill-write="source_code"]');if(p.length&&(void 0===c.internal.source_code_first&&(c.internal.source_code_first=p.val()),void 0===c.internal.source&&(c.internal.source=p.val())),c.history=r(c.history,window.location.href,10),"string"==typeof u.source){var h={source:u.source,timestamp:Date.now()};c.source_history=r(c.source_history,h,10)}c.version=3,document.cookie="source_code_first=".concat(c.internal.source_code_first,";"),null===c.internal.source||void 0!==sessionStorage.source_code_session&&"null"!==sessionStorage.source_code_session||sessionStorage.setItem("source_code_session",c.internal.source),function(t,n){var r=o(t,n,{});if(Object.entries(r).filter((function(t){return null!==(0,a.default)(t,2)[1]})).length)return Object.assign(r,{expiry:Date.now()+e}),s.set("foe_attribution",r),r;var i=s.get("foe_attribution");if(i){if(i.expiry<Date.now())return s.set("foe_attribution",null),null;Object.assign(i,{expiry:Date.now()+e}),s.set("foe_attribution",i)}}(n.analytics,u),function(e){var n=JSON.stringify(e),o=t('input[data-form-prefill-write="foe_additional_data"]'),r=t('input[name="submitted[foe_additional_data]"]')||t('input[name="foe_additional_data"]');o.length?o.val(n):r.val(n);var a=t('input[data-form-prefill-write="source_code_first"]');if(a.length&&"string"==typeof e.internal.source_code_first&&a.val(e.internal.source_code_first),void 0!==sessionStorage.source_code_session){var l=sessionStorage.getItem("source_code_session"),c=t('input[data-form-prefill-write="source_code_session"]');null!==l&&l.length&&"string"==typeof l&&c.val(l)}var u=s.get("foe_attribution");u&&"object"===(0,i.default)(u)&&Object.keys(u).forEach((function(e){var n=t('input[data-form-prefill-write="attribution_'.concat(e,'"]'));u[e]&&u[e].length&&"string"==typeof u[e]&&n.val(u[e])}))}(c),s.set("foe_data",c)}))}(window.jQuery)},4577:(t,e,n)=>{var o=n(6378)(n(7957));!function(){if(!(window.navigator.userAgent.indexOf("MSIE")>=0||/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.userAgent.match(/Trident.*rv:11\./))){var t=o.default.getBreakpoints(),e={mobileBreak:parseInt(t.filter((function(t){return"md"===t.size})).pop().width,10),list:[],number:0,stackTop:0,pageBottom:null,init:function(){e.stopObserving(),e.pageBottom&&e.pageBottom.parentNode.removeChild(e.pageBottom);for(var t=0;t<e.number;t++){var n=e.list[t],o=n.placeholder,r=n.element;o.parentNode.removeChild(o),e.removeClass(r,"stickystack-stuck"),r.style.position=null,r.style.top=null,r.style.left=null,r.style.width=null,r.style.marginTop=null,r.style.marginBottom=null}e.pageBottom=document.createElement("div"),e.pageBottom.style.height=0,e.pageBottom.style.width="100%",e.addClass(e.pageBottom,"js-stickystack"),document.body.appendChild(e.pageBottom),e.number=0;var a=document.getElementsByClassName("js-stickystack");if(window.innerWidth<=e.mobileBreak){for(var i=[],s=0;s<a.length;s++)e.hasClass(a[s],"js-stickystack-nomobile")||i.push(a[s]);a=i}e.number=a.length,e.list=[],e.stackTop=0;for(var l=0;l<e.number;l++){var c=window.getComputedStyle(a[l]),u=document.createElement("div");u.style.width=c.getPropertyValue("width"),u.style.height=c.getPropertyValue("height"),u.style.top=c.getPropertyValue("top"),u.style.right=c.getPropertyValue("right"),u.style.bottom=c.getPropertyValue("bottom"),u.style.left=c.getPropertyValue("left"),u.style.margin=c.getPropertyValue("margin"),u.style.padding=c.getPropertyValue("padding"),u.style.border=c.getPropertyValue("border"),u.style.float=c.getPropertyValue("float"),u.style.clear=c.getPropertyValue("clear"),u.style.position=c.getPropertyValue("position"),u.style.display="none",u.style.visibility="hidden",a[l].parentNode.insertBefore(u,a[l]);var d=e.getCoords(a[l]);e.list.push({element:a[l],top:d.top,left:d.left-parseFloat(c.getPropertyValue("margin-left")),width:parseFloat(c.getPropertyValue("width")),placeholder:u,semistuck:e.hasClass(a[l],"js-stickystack-semi"),zIndex:100-l})}e.list.sort(e.sortByTop),e.stackTop=0,a=document.getElementsByClassName("js-stickystack-top");for(var f=0;f<a.length;f++){var p=e.getCoords(a[f]).top;e.stackTop=0===f?p:Math.min(e.stackTop,p)}e.update(),e.startObserving()},update:function(){for(var t=[[e.stackTop,0,document.body.offsetWidth]],n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=0;o<e.number;o++){var r=e.list[o],a=r.element,i=r.placeholder,s=r.left,l=r.width,c=r.top-n,u=e.getOverlap([c,s,l],t);if(u.overlap>0){i.style.display="block",e.addClass(a,"stickystack-stuck");var d=0;if(e.list[o].semistuck&&o+1<e.number)for(var f=[[u.absolute+a.offsetHeight,s,l]],p=o+1;p<e.number;p++){var h=[e.list[p].top-n,e.list[p].left,e.list[p].width],g=e.getOverlap(h,f);if(g.overlap>0){d=g.overlap;break}}a.style.position="fixed",a.style.top="".concat(u.absolute-d,"px"),a.style.left="".concat(s,"px"),a.style.width="".concat(l,"px"),a.style.zIndex=r.zIndex,a.style.marginTop=0,a.style.marginBottom=0;var m=u.absolute+a.offsetHeight-d;t.push([m,a.offsetLeft,a.offsetWidth])}else e.removeClass(a,"stickystack-stuck"),a.style.position=null,a.style.top=null,a.style.left=null,a.style.width=null,a.style.zIndex=null,a.style.marginTop=null,a.style.marginBottom=null,i.style.display="none"}},startObserving:function(){},stopObserving:function(){},getOverlap:function(t,e){for(var n=0,o=0,r=0;r<e.length;r++)t[0]<e[r][0]&&t[1]+t[2]>e[r][1]&&e[r][1]+e[r][2]>t[1]&&(n=Math.max(n,e[r][0]-t[0]),o=Math.max(o,e[r][0]));return{overlap:n,absolute:o}},sortByTop:function(t,e){return t.top-e.top},getCoords:function(t){var e=t.getBoundingClientRect(),n=document,o=n.body,r=n.documentElement,a=window.pageYOffset||r.scrollTop||o.scrollTop,i=window.pageXOffset||r.scrollLeft||o.scrollLeft,s=r.clientTop||o.clientTop||0,l=r.clientLeft||o.clientLeft||0,c=e.top+a-s,u=e.left+i-l;return{top:Math.round(c),left:Math.round(u)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)".concat(e,"(\\s|$)")))},addClass:function(t,n){t.classList?t.classList.add(n):e.hasClass(t,n)||(t.className+=" ".concat(n))},removeClass:function(t,n){if(t.classList)t.classList.remove(n);else if(e.hasClass(t,n)){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));t.className=t.className.replace(o," ")}}};window.addEventListener("DOMContentLoaded",e.init),window.addEventListener("load",e.init),window.addEventListener("resize",e.init),window.addEventListener("scroll",e.update),window.addEventListener("touchmove",e.update),window.ontouchstart=function(){},window.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){e.update()}),500)})),window.addEventListener("load",(function(){setTimeout((function(){e.update()}),500)}))}}()},7957:(t,e,n)=>{var o=n(6378);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(570)),a={getScrollTop:function(){if(void 0!==window.pageYOffset)return window.pageYOffset;var t=document.body,e=document.documentElement;return(e=e.clientHeight?e:t).scrollTop},getHalfScrollTop:function(){return this.getScrollTop()+window.innerHeight/2},getDocumentHeight:function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},getScrollFromScreens:function(t){return this.getViewportHeight()*t},getScrollFromPerc:function(t){return this.getDocumentHeight()/100*t},getViewportHeight:function(){return Math.max(document.documentElement.clientHeight,window.innerHeight)},elementInViewport:function(t){var e=(0,window.jQuery)(t).offset().top,n=e+t.clientHeight,o=this.getScrollTop(),r=this.getViewportHeight();return!(n<o||e-r>=o)},getBreakpoints:function(){var t=[],e=r.default.default||r.default;return Object.keys(e).forEach((function(n){if(0===n.indexOf("breakpoint")){var o=n.replace("breakpoint-",""),r=parseInt(e[n],10);t.push({size:o,width:r})}})),t},getCurrentBreakpoint:function(){for(var t=this.getBreakpoints(),e=0;e<t.length-1&&window.innerWidth>=t[e+1].width;)e+=1;return t[e].size},getHeaderHeight:function(){var t=window.jQuery,e=this.getCurrentBreakpoint();return t(".foe-header").length?parseInt(r.default["foe-header-height-".concat(e)],10):0}};e.default=a},6690:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3660:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3607:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2110:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2214:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},2219:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},1995:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},894:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},3502:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},4690:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},7096:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={}},570:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o={"breakpoint-xs":"0","breakpoint-sm":"576px","breakpoint-md":"768px","breakpoint-lg":"1024px","breakpoint-xl":"1366px","breakpoint-xxl":"1536px","container-xl":"1280px","container-xxl":"1420px","foe-header-height-xs":"60px","foe-header-height-sm":"60px","foe-header-height-md":"80px","foe-header-height-lg":"64px","foe-header-height-xl":"64px","foe-header-height-xxl":"64px"}},5311:t=>{t.exports=jQuery}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(4690),n(7096),n(2219),n(3607),n(3660),n(3829),n(2851),n(5969),n(1506),n(2981),n(2445),n(5264),n(4577),n(5615),n(2214),n(1995),n(9859),n(3800),n(6874),window.FoeWebcore&&window.FoeWebcore.critical||window.console.warn("You have loaded the main bundle without embedding the critical bundle first")})();
|
package/package.json
CHANGED
|
@@ -59,6 +59,26 @@ Form `type=submit`s, `button`s are by default uncolorized, please use one of the
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
.btn-primary {
|
|
63
|
+
@include button-variant($foe-iris, $foe-iris);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.btn-outline-primary {
|
|
67
|
+
@include button-outline-variant($foe-iris);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.btn-accent {
|
|
71
|
+
@include button-variant($foe-leaf, $foe-leaf);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.btn-outline-accent {
|
|
75
|
+
@include button-outline-variant($foe-leaf);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.btn-sunset {
|
|
79
|
+
color: $foe-extradark;
|
|
80
|
+
}
|
|
81
|
+
|
|
62
82
|
.btn-donate {
|
|
63
83
|
color: $foe-donate-text;
|
|
64
84
|
|
|
@@ -178,7 +178,7 @@ The parallax effect needs the file `foe.components.js` to be appended in the pag
|
|
|
178
178
|
left: 0;
|
|
179
179
|
right: 0;
|
|
180
180
|
background-color: $foe-tint-overlay;
|
|
181
|
-
z-index:
|
|
181
|
+
z-index: 0;
|
|
182
182
|
width: 100%;
|
|
183
183
|
height: 100%;
|
|
184
184
|
overflow: hidden;
|
|
@@ -253,6 +253,7 @@ The parallax effect needs the file `foe.components.js` to be appended in the pag
|
|
|
253
253
|
background: $foe-primary;
|
|
254
254
|
padding: $spacer;
|
|
255
255
|
display: inline-block;
|
|
256
|
+
border-color: transparent;
|
|
256
257
|
}
|
|
257
258
|
}
|
|
258
259
|
|
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
@import '../../utils/scss/loader';
|
|
2
|
+
|
|
1
3
|
.fixed-background {
|
|
2
4
|
background-attachment: fixed !important;
|
|
3
5
|
}
|
|
6
|
+
|
|
7
|
+
.bg-accent,
|
|
8
|
+
.bg-dark,
|
|
9
|
+
.bg-extradark {
|
|
10
|
+
@include heading_colours($foe-offwhite, $foe-secondary);
|
|
11
|
+
@include text_colours($foe-offwhite, $foe-secondary);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bg-primary,
|
|
15
|
+
.bg-offwhite {
|
|
16
|
+
@include heading_colours($foe-extradark, $foe-extradark);
|
|
17
|
+
@include text_colours($foe-extradark, $foe-extradark);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.bg-primary {
|
|
21
|
+
background-color: $foe-leaf-75 !important;
|
|
22
|
+
|
|
23
|
+
.btn-outline-primary {
|
|
24
|
+
@include button-outline-variant($foe-extradark);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bg-accent {
|
|
29
|
+
.btn-primary {
|
|
30
|
+
@include button-variant($foe-primary, $foe-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.btn-outline-primary {
|
|
34
|
+
@include button-outline-variant($foe-offwhite);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.bg-sunset {
|
|
39
|
+
.btn-primary {
|
|
40
|
+
@include button-variant($foe-extradark, $foe-extradark);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.btn-outline-primary {
|
|
44
|
+
@include button-outline-variant($foe-extradark);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
top: 0;
|
|
13
13
|
padding: 0;
|
|
14
14
|
z-index: $zindex-navbar !important;
|
|
15
|
-
background-color: $foe-
|
|
15
|
+
background-color: $foe-leaf-75;
|
|
16
16
|
transition:
|
|
17
17
|
background-color $foe-transition-duration-base $foe-transition-easing,
|
|
18
18
|
background-position $foe-transition-duration-base $foe-transition-easing,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
// Scrolled state
|
|
44
44
|
&.js-menustack-stuck {
|
|
45
45
|
background-position-y: 100%;
|
|
46
|
-
background-color: $foe-
|
|
46
|
+
background-color: $foe-leaf-75;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
> a {
|
|
31
31
|
position: relative;
|
|
32
|
+
padding: .2rem;
|
|
32
33
|
line-height: $foe-nav-height-small;
|
|
33
34
|
font-weight: bold;
|
|
34
35
|
display: block;
|
|
@@ -47,7 +48,9 @@
|
|
|
47
48
|
|
|
48
49
|
&:focus {
|
|
49
50
|
background-color: transparent;
|
|
50
|
-
|
|
51
|
+
box-shadow: 0 0 0 .125rem $foe-extradark;
|
|
52
|
+
outline: .125rem solid $foe-offwhite;
|
|
53
|
+
outline-offset: .125rem;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
&:hover {
|
|
@@ -61,6 +64,12 @@
|
|
|
61
64
|
font-weight: 300;
|
|
62
65
|
}
|
|
63
66
|
|
|
67
|
+
.foe-megamenu-container {
|
|
68
|
+
a:hover {
|
|
69
|
+
text-decoration: underline;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
64
73
|
&.foe-has-megamenu:hover {
|
|
65
74
|
.foe-megamenu-container {
|
|
66
75
|
opacity: 1;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/* @docs
|
|
2
|
+
|
|
3
|
+
# Scripts:Jaunty
|
|
4
|
+
|
|
5
|
+
Jauntifies a text header with the data-jaunt-factor attribute.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
```
|
|
9
|
+
<h1 data-jaunt-factor="1">Jaunty Title</h1>
|
|
10
|
+
|
|
11
|
+
<h2 data-jaunt-factor="2">Very Jaunty Title</h2>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Based on James South Codepen https://codepen.io/jrsouth/pen/ZEmeoJz with ideas from
|
|
15
|
+
https://www.bennadel.com/blog/4310-detecting-rendered-line-breaks-in-a-text-node-in-javascript.htm
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
(() => {
|
|
19
|
+
// Config
|
|
20
|
+
const ROTATION_MAX_DEGREES = 3; // Degrees. "Normal" is around 2.5
|
|
21
|
+
const BACKGROUND_EXTENSION = 1.5; // rem. Normal is around 1
|
|
22
|
+
const CORNER_JIGGLE_MAX = 1; // rem. Normal is around .2
|
|
23
|
+
let oneRemInPx = 0;
|
|
24
|
+
let extension = 0;
|
|
25
|
+
|
|
26
|
+
// Helpers
|
|
27
|
+
const generateRandomHex = (length) => {
|
|
28
|
+
let result = '';
|
|
29
|
+
const characters = 'ABCDEF1234567890';
|
|
30
|
+
const charactersLength = characters.length;
|
|
31
|
+
for (let i = 0; i < length; i++) {
|
|
32
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const drawPolygon = (context, points) => {
|
|
38
|
+
context.beginPath();
|
|
39
|
+
context.moveTo(points[0].x, points[0].y);
|
|
40
|
+
for (let i = 1; i < points.length; i++) {
|
|
41
|
+
context.lineTo(points[i].x, points[i].y);
|
|
42
|
+
}
|
|
43
|
+
context.lineTo(points[0].x, points[0].y);
|
|
44
|
+
context.fill();
|
|
45
|
+
context.stroke();
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// const drawPoint = (context, x, y) => {
|
|
49
|
+
// if (!context.fillStyle) {
|
|
50
|
+
// context.fillStyle = "#61bdaa";
|
|
51
|
+
// }
|
|
52
|
+
// context.fillRect(x - 1.5, y - 1.5, 3, 3);
|
|
53
|
+
// };
|
|
54
|
+
|
|
55
|
+
const jauntTarget = (target) => {
|
|
56
|
+
if (target.firstChild.nodeType !== Node.TEXT_NODE) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Create a unique ID to link this element with the canvas background
|
|
61
|
+
if (!target.dataset.backgroundCanvasId) {
|
|
62
|
+
target.dataset.backgroundCanvasId = generateRandomHex(12);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Clean up any existing jauntiness
|
|
66
|
+
const existingCanvas = document.getElementById(
|
|
67
|
+
target.dataset.backgroundCanvasId
|
|
68
|
+
);
|
|
69
|
+
if (existingCanvas) {
|
|
70
|
+
existingCanvas.remove();
|
|
71
|
+
}
|
|
72
|
+
const previousTransform = getComputedStyle(target).transform;
|
|
73
|
+
target.style.transition = 'none';
|
|
74
|
+
target.style.transform = null;
|
|
75
|
+
|
|
76
|
+
// Set up the parameters
|
|
77
|
+
const jauntFactor = parseFloat(target.dataset.jauntFactor);
|
|
78
|
+
extension = BACKGROUND_EXTENSION * oneRemInPx * jauntFactor;
|
|
79
|
+
// jauntSeed is stored on page so remains constant when resizing or hovering
|
|
80
|
+
const jauntSeed = target.dataset.jauntSeed ? target.dataset.jauntSeed : generateRandomHex(4 * 8);
|
|
81
|
+
target.dataset.jauntSeed = jauntSeed;
|
|
82
|
+
|
|
83
|
+
// Figure out the bounding boxes
|
|
84
|
+
|
|
85
|
+
// Collapse whitespace
|
|
86
|
+
target.textContent = target.textContent.replace(/\s+/g, ' ').trim();
|
|
87
|
+
|
|
88
|
+
// Get the individual lines as rendered on screen
|
|
89
|
+
const { textContent } = target.firstChild;
|
|
90
|
+
const range = document.createRange();
|
|
91
|
+
range.setStart(target.firstChild, 0);
|
|
92
|
+
range.setEnd(target.firstChild, textContent.length);
|
|
93
|
+
|
|
94
|
+
// Get the bounding boxes
|
|
95
|
+
const targetBox = target.getBoundingClientRect();
|
|
96
|
+
const parentBox = target.offsetParent ? target.offsetParent.getBoundingClientRect() : targetBox;
|
|
97
|
+
const outerBox = range.getBoundingClientRect();
|
|
98
|
+
const boxes = Array.from(range.getClientRects());
|
|
99
|
+
|
|
100
|
+
// Insert the new 2D canvas element
|
|
101
|
+
const canvas = document.createElement('canvas');
|
|
102
|
+
canvas.id = target.dataset.backgroundCanvasId;
|
|
103
|
+
target.parentNode.insertBefore(canvas, target);
|
|
104
|
+
canvas.style.position = 'absolute';
|
|
105
|
+
canvas.style.zIndex = -1;
|
|
106
|
+
canvas.style.top = `${(targetBox.top - parentBox.top) - 2 * extension}px`;
|
|
107
|
+
canvas.style.left = `${(targetBox.left - parentBox.left) - 2 * extension}px`;
|
|
108
|
+
canvas.style.width = `${targetBox.width + 4 * extension}px`;
|
|
109
|
+
canvas.style.height = `${targetBox.height + 4 * extension}px`;
|
|
110
|
+
canvas.width = targetBox.width + 4 * extension;
|
|
111
|
+
canvas.height = targetBox.height + 4 * extension;
|
|
112
|
+
canvas.style.pointerEvents = 'none';
|
|
113
|
+
|
|
114
|
+
// Draw the background boxes
|
|
115
|
+
const context = canvas.getContext('2d');
|
|
116
|
+
|
|
117
|
+
// set the background color and remove and existing background
|
|
118
|
+
target.style.backgroundColor = null;
|
|
119
|
+
target.style.borderColor = null;
|
|
120
|
+
context.fillStyle = getComputedStyle(target).backgroundColor;
|
|
121
|
+
if (!context.fillStyle) {
|
|
122
|
+
context.fillStyle = '#61bdaa';
|
|
123
|
+
}
|
|
124
|
+
context.strokeStyle = getComputedStyle(target).borderColor;
|
|
125
|
+
target.style.backgroundColor = 'transparent';
|
|
126
|
+
target.style.borderColor = 'transparent';
|
|
127
|
+
|
|
128
|
+
const leftShift = getComputedStyle(target).textAlign === 'center'
|
|
129
|
+
? (targetBox.width - outerBox.width) / 2 - extension
|
|
130
|
+
: 0;
|
|
131
|
+
boxes.forEach((lineBox, i) => {
|
|
132
|
+
const points = [];
|
|
133
|
+
|
|
134
|
+
points.push({
|
|
135
|
+
// Top left
|
|
136
|
+
x: leftShift + lineBox.left - outerBox.left + 2 * extension,
|
|
137
|
+
y: lineBox.top - outerBox.top + 2 * extension,
|
|
138
|
+
});
|
|
139
|
+
points.push({
|
|
140
|
+
// Top right
|
|
141
|
+
x: points[0].x + lineBox.width + 2 * extension,
|
|
142
|
+
y: points[0].y,
|
|
143
|
+
});
|
|
144
|
+
points.push({
|
|
145
|
+
// Bottom right
|
|
146
|
+
x: points[0].x + lineBox.width + 2 * extension,
|
|
147
|
+
y: points[0].y + lineBox.height + 2 * extension,
|
|
148
|
+
});
|
|
149
|
+
points.push({
|
|
150
|
+
// Bottom left
|
|
151
|
+
x: points[0].x,
|
|
152
|
+
y: points[0].y + lineBox.height + 2 * extension,
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// context.fillRect(
|
|
156
|
+
// lineBox.left - outerBox.left + 2 * extension,
|
|
157
|
+
// lineBox.top - outerBox.top + 2 * extension,
|
|
158
|
+
// lineBox.width + 2 * extension,
|
|
159
|
+
// lineBox.height + 2 * extension,
|
|
160
|
+
// );
|
|
161
|
+
|
|
162
|
+
// Jiggle them points around
|
|
163
|
+
const boxSeed = jauntSeed.substring(i) + jauntSeed.substring(0, i);
|
|
164
|
+
const seedLength = boxSeed.length;
|
|
165
|
+
const pointSeedLength = seedLength / points.length;
|
|
166
|
+
points.forEach((point, index) => {
|
|
167
|
+
const startPoint = index * pointSeedLength;
|
|
168
|
+
const endPointX = startPoint + (pointSeedLength / 2);
|
|
169
|
+
const endPointY = startPoint + pointSeedLength;
|
|
170
|
+
const middle = pointSeedLength / 2 + 1;
|
|
171
|
+
let xRandom = boxSeed.substring(startPoint, endPointX);
|
|
172
|
+
let yRandom = boxSeed.substring(endPointX, endPointY);
|
|
173
|
+
xRandom = Number(`0x${xRandom}`);
|
|
174
|
+
yRandom = Number(`0x${yRandom}`);
|
|
175
|
+
xRandom /= 10 ** middle;
|
|
176
|
+
yRandom /= 10 ** middle;
|
|
177
|
+
points[index] = {
|
|
178
|
+
x:
|
|
179
|
+
point.x
|
|
180
|
+
+ (xRandom * 2 - 1)
|
|
181
|
+
* oneRemInPx
|
|
182
|
+
* CORNER_JIGGLE_MAX
|
|
183
|
+
* jauntFactor,
|
|
184
|
+
y:
|
|
185
|
+
point.y
|
|
186
|
+
+ (yRandom * 2 - 1)
|
|
187
|
+
* oneRemInPx
|
|
188
|
+
* CORNER_JIGGLE_MAX
|
|
189
|
+
* jauntFactor,
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// points.forEach((point) => {
|
|
194
|
+
// drawPoint(context, point.x, point.y);
|
|
195
|
+
// });
|
|
196
|
+
|
|
197
|
+
drawPolygon(context, points);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
target.style.transform = previousTransform;
|
|
201
|
+
target.style.transition = null;
|
|
202
|
+
|
|
203
|
+
// Add rotation
|
|
204
|
+
const middle = jauntSeed.length / 2 + 1;
|
|
205
|
+
let rotationSeed = jauntSeed.substring(1, middle);
|
|
206
|
+
rotationSeed = Number(`0x${jauntSeed}`);
|
|
207
|
+
rotationSeed /= 10 ** (`${rotationSeed}`).length;
|
|
208
|
+
const rotationFactor = ROTATION_MAX_DEGREES * jauntFactor
|
|
209
|
+
* (rotationSeed * 2 - 1); // -1 to +1
|
|
210
|
+
target.style.transform = `rotate(${rotationFactor}deg)`;
|
|
211
|
+
canvas.style.transform = `rotate(${rotationFactor}deg)`;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// The main event
|
|
215
|
+
const createBackground = () => {
|
|
216
|
+
oneRemInPx = parseFloat(
|
|
217
|
+
getComputedStyle(document.documentElement).fontSize
|
|
218
|
+
);
|
|
219
|
+
|
|
220
|
+
const targets = document.querySelectorAll('[data-jaunt-factor]');
|
|
221
|
+
|
|
222
|
+
// Insert some jaunt
|
|
223
|
+
targets.forEach((target) => {
|
|
224
|
+
jauntTarget(target);
|
|
225
|
+
[
|
|
226
|
+
'mouseenter',
|
|
227
|
+
'mouseleave',
|
|
228
|
+
'focus',
|
|
229
|
+
].forEach((action) => {
|
|
230
|
+
target.addEventListener(action, (e) => {
|
|
231
|
+
jauntTarget(e.target);
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
const init = () => {
|
|
238
|
+
createBackground();
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// Go time
|
|
242
|
+
document.addEventListener('DOMContentLoaded', init);
|
|
243
|
+
document.addEventListener('load', init);
|
|
244
|
+
window.addEventListener('resize', createBackground);
|
|
245
|
+
window.runJaunt = init;
|
|
246
|
+
})();
|
package/src/main.js
CHANGED
|
@@ -19,6 +19,7 @@ import './components/tools/data-click-track';
|
|
|
19
19
|
import './components/tools/rubik-tracking';
|
|
20
20
|
import './components/tools/data-defer-src';
|
|
21
21
|
import './components/tools/stickystack';
|
|
22
|
+
import './components/tools/jaunty';
|
|
22
23
|
|
|
23
24
|
// Bootstrap helpers
|
|
24
25
|
import './components/layout/alerts.scss';
|
|
@@ -44,8 +44,8 @@ $foe-danger: #d9534f !default;
|
|
|
44
44
|
|
|
45
45
|
$foe-text: $foe-extradark !default;
|
|
46
46
|
|
|
47
|
-
$foe-donate: $foe-
|
|
48
|
-
$foe-donate-text: $foe-
|
|
47
|
+
$foe-donate: $foe-iris !default;
|
|
48
|
+
$foe-donate-text: $foe-ice !default;
|
|
49
49
|
|
|
50
50
|
$foe-join: #ffef1e !default;
|
|
51
51
|
$foe-join-text: $foe-text !default;
|