1/*! 2 SimpleModal.js 3 version: 2.6.8 4 author: Alex Fischer 5 homepage: https://github.com/a-p-f/SimpleModal 6*/ 7var SimpleModal=function(e){"use strict";var n=(document.documentElement.getAttribute("simple-modal-config")||"").split(" "),t=-1!=n.indexOf("autofocus"),o=-1!=n.indexOf("animate");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return function(e){return null!==e&&"object"==i(e)}(e)&&e.message}function r(e,n){e.postMessage({message:n},"*")}function l(e,n){setTimeout(n,1e3*parseFloat(getComputedStyle(e).animationDuration))}function d(e){var n=document.createElement("a");return n.href=e,n.href}var c=document.activeElement;function u(){window.dispatchEvent(function(e,n){if("function"==typeof window.CustomEvent)return new CustomEvent(e,n);n=n||{bubbles:!1,cancelable:!1,detail:void 0};var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),t}("simplemodal-load"))}function s(){var e=document.querySelector("[simple-modal-autofocus]");e&&(e.focus(),c=e)}function m(e){var n=document.documentElement,t=parseFloat(getComputedStyle(n).animationDuration);setTimeout(e,1e3*t)}window.parent!=window&&(addEventListener("message",(function(e){if(e.source==window.parent){var n=e.data;"CANCEL_SIMPLE_MODAL_ANIMATIONS"==a(n)&&(o&&p(),r(window.parent,"SIMPLE_MODAL_ANIMATIONS_CANCELED")),"SIMPLE_MODAL_LOADED_AND_REFOCUSED"==a(n)&&t&&!o&&s()}})),document.documentElement.addEventListener("focus",(function(){c=document.activeElement}),!0),addEventListener("focus",(function(){c&&c.focus()})));var f=!1;function p(){if(!f){f=!0;var e=document.documentElement;e.classList.remove("SimpleModal-opening"),e.classList.remove("SimpleModal-animating"),t&&s()}}function v(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.leaveBackdrop,o=void 0!==t&&t;o||r(parent,"ANIMATE_SIMPLE_MODAL_BACKDROP_OUT");var i=document.documentElement;i.classList.add("SimpleModal-closing"),i.classList.add("SimpleModal-animating"),e&&m(e)}function E(){if(window.parent==window)throw new Error("This is not a SimpleModal child window (it's not even in iframe)")}function S(){try{return Boolean(window.parent.location.hostname)}catch(e){return!1}}function b(){var e=window.parent.SimpleModal&&window.parent.SimpleModal.layerForWindow(window);if(!e)throw new Error("This is not a SimpleModal child window");return e}function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(E(),S()){var t=b();return window.parent.SimpleModal.resolveLayer(t,e),void(n&&n())}if(n)throw new Error('"then" callback to SimpleModal.close is not supported in cross origin layers.');parent.postMessage({value:e,message:"CLOSE_SIMPLE_MODAL_CHILD"},"*")}function L(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.animated,o=void 0!==t&&t;function i(){parent.postMessage({message:"REPLACE_SIMPLE_MODAL",url:e,animated:o},"*")}e=d(e),o?v(i,{leaveBackdrop:!0}):i()}function h(e){e._SimpleModalAriaInitialized||(e._SimpleModalAriaInitialized=!0,e._SimpleModalInitialAriaHidden=e.getAttribute("aria-hidden"),e.setAttribute("aria-hidden","true"))}function _(e){if(e._SimpleModalAriaInitialized){var n=e._SimpleModalInitialAriaHidden;null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n),delete e._SimpleModalAriaInitialized,delete e._SimpleModalInitialAriaHidden}}function w(e,n){var t=n.getBoundingClientRect(),o=e.style,i=document.documentElement,a=Math.max(0,t.left);o.left=a+"px",o.width=Math.min(t.right-a,i.clientWidth-a)+"px";var r=Math.max(0,t.top);o.top=r+"px",o.height=Math.min(t.bottom-r,i.clientHeight-r)+"px"}function g(e,n){(n||document.body).appendChild(e);var t=e.style;if(t.position="fixed",t.border="none",t.padding=0,t.zIndex=2147483647,t.zIndex=9007199254740991,n){var o=w.bind(null,e,n);e._simple_modal_position=o,o(),addEventListener("scroll",o,!0),addEventListener("resize",o)}else t.left=t.top="0px",t.width=t.height="100%"}function A(e,n){if(e.parentElement&&e.parentElement.removeChild(e),n){var t=e._simple_modal_position;removeEventListener("scroll",t,!0),removeEventListener("resize",t)}}function I(e){var n,t,o,i,a,r=e.style,l=0;function d(){e.scrollTop=n,e.scrollLeft=t}return{increment:function(){1==++l&&function(){n=e.scrollTop,t=e.scrollLeft,o=r.overflowX,i=r.overflowY,a=r.maxWidth,r.maxWidth=e.clientWidth+"px",e.scrollWidth>e.clientWidth&&(r.overflowX="hidden");e.scrollHeight>e.clientHeight&&(r.overflowY="hidden");e.addEventListener("scroll",d)}()},decrement:function(){0==--l&&(r.maxWidth=a,r.overflowX=o,r.overflowY=i,e.removeEventListener("scroll",d))}}}function y(e){e._SimpleModalScrollLock=e._SimpleModalScrollLock||I(e),e._SimpleModalScrollLock.increment()}
7function x(e){e._SimpleModalScrollLock.decrement()}function C(e){return e.container?[e.container]:[document.documentElement,document.body]}addEventListener("load",(function(){if(o){document.querySelector("[autofocus]")&&console.warn("autofocus not recommended when using SimpleModal animations. Can sometimes break animations in Safari, but only in certain situations.");var e=document.documentElement;e.classList.add("SimpleModal-opening"),e.classList.add("SimpleModal-animating"),m((function(){p(),u()}))}else t&&s(),u()})),addEventListener("focus",(function(e){e.target.hasOwnProperty("_SimpleModalInitialTabIndex")&&e.target.blur()}),!0);var O="a,button,input,textarea,select,summary,[contenteditable],area,audio,video,object,embed,svg,iframe";function D(e){var n=e._SimpleModalInitialTabIndex;void 0!==n&&(null==n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),delete e._SimpleModalInitialTabIndex)}function P(e,n){for(var t,o=function(e){return(e.container||document.body).querySelectorAll(O)}(e),i=o.length-1;i>=0;i--)o[i]!=e.iframe&&((t=o[i]).hasOwnProperty("_SimpleModalInitialTabIndex")||(t._SimpleModalInitialTabIndex=t.getAttribute("tabindex"),t.setAttribute("tabindex",-1)));e.replaces?(e.initialActiveElement=e.replaces.initialActiveElement,e.replaces.initialActiveElement=null):e.initialActiveElement=document.activeElement,e.iframe.focus()}function k(e,n){for(var t=e;t=t.nextElementSibling;)if(t._isSimpleModalIframe&&t!=n)return!0;return!!e.parentElement&&k(e.parentElement,n)}var T=[];function N(e){e.style.opacity=""}function R(e){if(!function(e){try{return Boolean(e.contentDocument)}catch(e){return!1}}(e))return!1;var n=getComputedStyle(e.contentDocument.documentElement),t=n.backgroundColor;return("transparent"==t||"rgba(0, 0, 0, 0)"==t)&&"none"==n.backgroundImage}function W(e){for(var n=0;n<T.length;n++)if(T[n].iframe.contentWindow==e)return T[n]}function z(e,n){e.backdrop||function(e){var n=document.createElement("div");n.classList.add("SimpleModalBackdrop"),n.classList.add("animating"),g(n,e.container),l(n,(function(){n.classList.remove("animating")})),e.backdrop=n}(e);var t=function(e){var n=document.createElement("iframe");n.classList.add("SimpleModalIframe"),n._isSimpleModalIframe=!0;var t=n.style;return t.opacity=0,t.willChange="opacity",null!==e&&n.setAttribute("sandbox",e),n}(e.sandbox);e.iframe=t,T.push(e),function(e){C(e).forEach(y)}(e),t.src=n,g(e.iframe,e.container),P(e),function(e){e.iframe.setAttribute("role","dialog"),function(e,n){for(var t=e;t=t.previousElementSibling;)n(t)}(e.iframe,h)}(e)}function B(e,n){var t=T.indexOf(e);if(-1==t)throw new Error("Layer is not in layers.");T.splice(t,1);var o=e.backdrop;o&&F(o,e.container),function(e){!function(e,n){for(var t=e;t=t.nextElementSibling;)if(t._isSimpleModalIframe)return;for(t=e;t=t.previousElementSibling;)if(n(t),t._isSimpleModalIframe)return}(e.iframe,_)}(e),function(e){for(var n=document.querySelectorAll(O),t=n.length-1;t>=0;t--){var o=n[t];k(o,e.iframe)||D(o)}var i=e.initialActiveElement;i&&!i.hasOwnProperty("_SimpleModalInitialTabIndex")&&i!=document.body&&i.focus()}(e),A(e.iframe,e.container),function(e){C(e).forEach(x)}(e),e.onclose&&e.onclose(n),e.promiseResolver&&e.promiseResolver(n)}function H(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={sandbox:e.sandbox,onload:e.onload,onclose:e.onclose,promiseResolver:e.promiseResolver,container:e.container,backdrop:e.backdrop};e.onload=null,e.onclose=null,e.promiseResolver=null,e.backdrop=null,t?(e.onclose=z.bind(null,o,n),B(e)):(o.replaces=e,z(o,n))}function F(e,n){A(e,n)}return document.addEventListener("load",(function(e){var n=e.target.contentWindow,t=n&&W(n);t&&function(e){var n=e.iframe;n.style.backgroundColor=R(n)?"white":"",e.replaces?r(n.contentWindow,"CANCEL_SIMPLE_MODAL_ANIMATIONS"):N(n),n!=document.activeElement&&-1!=n.tabindex&&n.focus(),r(n.contentWindow,"SIMPLE_MODAL_LOADED_AND_REFOCUSED"),e.onload&&e.onload(e.iframe.contentWindow)}(t)}),!0),addEventListener("message",(function(e){var n=W(e.source);if(n){var t=e.data;"CLOSE_SIMPLE_MODAL_CHILD"==a(t)&&B(n,e.data.value),"REPLACE_SIMPLE_MODAL"==a(t)&&H(n,t.url,t.animated),"SIMPLE_MODAL_ANIMATIONS_CANCELED"==a(t)&&(N(n.iframe),B(n.replaces),n.replaces=null),"ANIMATE_SIMPLE_MODAL_BACKDROP_OUT"==a(t)&&function(e){var n=e.backdrop;n&&(e.backdrop=null,n.classList.add("animating"),n.classList.add("closing"),l(n,F.bind(null,n,e.container)))}(n)}})),e.animateOut=v,e.close=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;function t(){M(e,n)}o?v(t):t()},e.closeChild=function(e){var n=T[T.length-1];if(!n)throw new Error("No modal window is open");B(n,e)},e.layerForWindow=W,e.open=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.onload,o=void 0===t?null:t,i=n.onclose,a=void 0===i?null:i,r=n.sandbox,l=void 0===r?null:r,d=n.container,c=void 0===d?null:d,u={sandbox:l,onload:o,onclose:a,promiseResolver:null,container:c};z(u,e);try{return new Promise((function(e,n){u.promiseResolver=e}))}catch(e){}},e.reload=function(){L(location.href)},e.replace=L,e.replaceLayer=H,e.resolveLayer=B,e.updatePositions=function(){for(var e=0;e<T.length;e++)n=T[e].iframe,T[e].container&&n._simple_modal_position();var n},e}({});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.