"use strict";
(function(window,undefined){let document=window.document;var navigator=window.navigator;var location=window.location;const Slendium={lib:{}};window.Slendium=Slendium;window.Sl=Slendium;const SlendiumErrorReportUrl="/.tmp/slendium_ui/report?report_type=ScriptError";const SlendiumSpinnerUrl="/.tmp/slendium_ui/spinner";const SlendiumBeaconUrl="/.tmp/slendium_ui/beacon";const SlendiumDebugMode=false;const SlendiumDynamicNav=true;Slendium.debug=SlendiumDebugMode;Sl.Clipboard=function(){let n;return{copy:function(e){(n=document.createElement("textarea")).value=e,document.body.appendChild(n);{let e,t;navigator.userAgent.match(/ipad|iphone/i)?((e=document.createRange()).selectNodeContents(n),(t=window.getSelection()).removeAllRanges(),t.addRange(e),n.setSelectionRange(0,999999)):n.select()}document.execCommand("copy"),document.body.removeChild(n)}}}();!function(){function i(e){return 1===(e=e.split(".")).length?e[0]:(e=e.slice(e.length-2,e.length))[0]+"."+e[1]}var u,c=[];window.onerror=function(e,t,n,l,r){var o=document.createElement("a"),o=(o.href=t,i(o.hostname)),a=i(location.hostname);o&&a&&o===a&&(c.push({message:e,url:t,line:n,column:l}),clearTimeout(u),u=setTimeout(function(){var e=new XMLHttpRequest;e.open("POST",SlendiumErrorReportUrl,!0),e.setRequestHeader("Content-Type","application/json"),e.send(JSON.stringify({type:"script",errors:c})),c=[]},5e3))},Sl.noop=()=>{},Sl.substituteElements=function(l,e,t){let r=l.querySelectorAll(t);e.querySelectorAll(t).forEach(e=>{let t=1===r.length?r[0]:null;var n;(t=!t&&e.hasAttribute("id")?l.getElementById(e.id):t)||!e.hasAttribute("data-replace-id")||1===(n=l.querySelectorAll('[data-replace-id="'+e.dataset.replaceId+'"]')).length&&(t=n[0]),t&&e.replaceWith(t.cloneNode(!0))})}}();!function(){const e="js-view";let c=0;const s={},r={},o={get definedTypes(){return Object.keys(r)}};Sl.defineView=function(e,t){if("string"!=typeof e)throw TypeError("Expected view name to be a string, not: "+typeof e);if("function"!=typeof t)throw TypeError("Expected view constructor to be a function, not: "+typeof t);r[e]||(r[e]=t),0<=["interactive","complete"].indexOf(document.readyState)&&o.load()},o.define=Sl.defineView,o.load=function(){[].slice.call(document.getElementsByClassName(e),0).forEach(function(n){const i=n.dataset.view;i&&r[i]&&(n.classList.remove(e),requestAnimationFrame(function(){var e=SlendiumDebugMode?performance.now():0,t=++c,o=new r[i](n),t=(Object.defineProperty(o,"___slViewNode",{value:n}),s[t]=o&&"object"==typeof o?o:{},SlendiumDebugMode?performance.now():0);1e3/60<t-e&&console.warn('Loading view "'+i+'" took '+Math.round(t-e)+"ms"),n.dispatchEvent(new Event("slviewload")),n.slViewLoaded=!0}))})},o.unload=function(e){for(var t in s)s.hasOwnProperty(t)&&!function(e){const t=s[e];setTimeout(function(){if(!document.documentElement.contains(t.___slViewNode)){try{t.unload&&t.unload()}catch(e){setTimeout(function(){throw e},0)}delete s[e]}},3e4)}(t)};let t;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){Object.values(s).forEach(function(e){e.resize&&e.resize()})},250)});let n;window.addEventListener("scroll",function(){clearTimeout(n),n=setTimeout(function(){Object.values(s).forEach(function(e){e.scroll&&e.scroll()}),0<window.scrollY?document.body.classList.add("sl-scrolled"):document.body.classList.remove("sl-scrolled")},50)});let i;const d=new MutationObserver(function(e){clearTimeout(i),i=setTimeout(function(){o.load(),o.unload()},20)});d.observe(document.body,{childList:!0,subtree:!0}),Object.freeze(o),Slendium.Views=o}();Slendium.createSpinner=function(){var e=document.createElement("img");return e.src=SlendiumSpinnerUrl,e.classList.add("sl-spinner"),e};Sl.text=function(e){return document.createTextNode(e)},Sl.el=function(e,t,l){let r=document.createElement(e,t?.is?{is:t.is}:{});return Object.entries(t||{}).forEach(([e,t])=>{"style"===e&&t&&"object"==typeof t?Sl.elStyle(r,t):r.setAttribute(e,t)}),(Array.isArray(l)?l:l?[l]:[]).forEach(e=>{(e="string"==typeof e?Sl.text(e):e)&&r.appendChild(e)}),r},Sl.elem=Sl.el,Sl.elStyle=function(l,e){return Object.entries(e).forEach(([e,t])=>{l.style[e]=t}),l},Sl.elemStyle=Sl.elStyle;!function(){function t(e){e.style.height="1px",e.style.height=e.scrollHeight+"px",e.style.overflowY="hidden"}var n={enhanceAutosubmitElements:function(e){[].forEach.call(e.querySelectorAll(".js-change-submit"),function(e){e.addEventListener("change",function(){e.form&&e.form.submit()})})},enhanceScriptElements:function(e){[].forEach.call(e.querySelectorAll(".sl-nojs, .js-hide, .js-show, .js-remove"),function(e){e.classList.contains("sl-nojs")&&SlendiumDebugMode&&(console.warn('The class "sl-nojs" is deprecated, use "js-remove" instead'),e.parentNode.removeChild(e)),e.classList.contains("js-hide")&&SlendiumDebugMode&&(console.warn('The class "js-hide" is deprecated, use "js-remove" instead'),e.parentNode.removeChild(e)),e.classList.contains("js-remove")&&e.parentNode.removeChild(e),e.classList.contains("js-show")&&e.classList.remove("js-show")})},removeNoScriptElements:function(){n.enhanceScriptElements(document.documentElement)},showScriptElements:function(){n.enhanceScriptElements(document.documentElement)},enhanceAutogrowElements:function(e){e=(e=e&&e.parentElement)||document.documentElement,[].forEach.call(e.querySelectorAll("textarea.js-autogrow"),function(e){e.addEventListener("focus",function(e){t(e.currentTarget)}),e.addEventListener("input",function(e){t(e.currentTarget)}),e.classList.remove("js-autogrow")})},enhanceTitleElements:function(e){e=(e=e&&e.parentElement)||document.documentElement,[].forEach.call(e.querySelectorAll("[title]"),function(o){if("INPUT"!==o.tagName){var e=""+o.getAttribute("title");if(o.removeAttribute("title"),e){var s,i,c=Sl.elem("div",{class:"sl-tooltip sl-noselect hidden"},[e]);o.addEventListener("mouseover",function(){var e,t,n;o.classList.contains("js-tooltip-touch")||(clearTimeout(s),clearTimeout(i),document.body.appendChild(c),t=(e=o.getBoundingClientRect()).bottom+8,n=e.left+e.width/2-c.offsetWidth/2,t+c.offsetHeight>window.innerHeight&&(t=e.top-c.offsetHeight-10),(n=n<0?0:n)+c.offsetWidth>window.innerWidth&&(n=window.innerWidth-c.offsetWidth),c.style.top=t+"px",c.style.left=n+"px",c.classList.remove("hidden"))});const t=function(){s=setTimeout(function(){c.classList.add("hidden"),i=setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c)},200)},0)},n=(o.addEventListener("mouseout",function(){o.classList.contains("js-tooltip-touch")||t()}),o.addEventListener("touchstart",function(e){o.classList.add("js-tooltip-touch")},{passive:!0}),new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&[].forEach.call(e.removedNodes,function(e){e===o&&(n.disconnect(),t())})})}));n.observe(o.parentNode,{childList:!0})}}})},all:function(e){e=e||document.documentElement,n.enhanceScriptElements(e),n.enhanceAutogrowElements(e),n.enhanceTitleElements(e),n.enhanceAutosubmitElements(e),Array.from(document.querySelectorAll('link.js-unmedia[rel="stylesheet"][media="none"]')).forEach(e=>{e.classList.remove("js-unmedia"),e.removeAttribute("media")})}};Object.freeze(n),Slendium.JsClasses=n}();Slendium.nav={},Slendium.nav.PageRequest=class{constructor(e,s){this.canceled=!1,this.completed=!1,e=(e=new URL(e,location.origin)).pathname+e.search,this.progress="function"==typeof(s="object"!=typeof s?{}:s).progress?s.progress:Sl.noop,this.success="function"==typeof s.success?s.success:Sl.noop,this.error="function"==typeof s.error?s.error:Sl.noop;let t=this.xhr=new XMLHttpRequest;t.open("GET",e,!0),t.onload=()=>{if(400<=t.status)this.error({code:t.status});else{const e=t.getResponseHeader("Content-Type");e&&e.includes("text/html")?setTimeout(()=>{this.processResponse(t.responseText,t.responseURL)},0):this.error({code:0,redirect:t.responseURL}),this.completed=!0}},t.onloadstart=()=>{this.progress(.5)},t.onprogress=e=>{e.lengthComputable&&this.progress(.5+.25*e.loaded/e.total)},t.onloadend=()=>{this.progress(400<=t.status?1:.75)},t.onerror=()=>{this.error({code:-1})},this.progress(0),t.send()}cancel(){this.canceled||this.completed||(this.canceled=!0,this.xhr.abort(),this.progress(1))}processResponse(t,r){let o=(new DOMParser).parseFromString(t,"text/html"),n=Array.from(o.querySelectorAll('script[src],link[rel="stylesheet"]'));if(!(n.length<=0)){let s=0;n.map(e=>this.importResource(e)).forEach(e=>{e.finally(()=>{s+=1,this.canceled||(this.progress(.5+s/n.length*.5),s===n.length&&this.success({document:o,html:t,url:r}))})})}}async importResource(r){if(!this.resourceExists('script[src],link[rel="stylesheet"]',r)){if(r.matches("script")){if(""!==r.type&&"application/javascript"!==r.type)return;r=Sl.el("script",{src:r.src})}return new Promise((e,s)=>{let t=r.cloneNode();t.matches(".js-unmedia")&&(t.classList.remove("js-unmedia"),t.removeAttribute("media")),t.addEventListener("load",()=>{e()}),t.addEventListener("error",()=>{s()}),document.head.appendChild(t)})}}resourceExists(e,s){return Array.from(document.querySelectorAll(e)).some(e=>(e.href||e.src)===(s.href||s.src))}};!function(){function l(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}const r={};let a=(new Date).getTime();function n(e,t){var o=a+=1;this.id=o,this.html=e,this.url=(e=new URL(t,location.origin)).pathname+e.search,this.scroll={top:0,left:0},r[o]=this}n.find=function(e){return r[e]||null};let e;function i(a){if(!e||e.id!=a.id){{var n=document.body,i=a;let e=(new DOMParser).parseFromString(i.html,"text/html"),t=(e.title&&(document.title=e.title),n.setAttribute("class",e.body.getAttribute("class")||""),n.lang=e.body.lang,e.body.querySelector("header.sl-pheader")||Sl.el("header")),o=e.body.querySelector("main.sl-pcontent")||Sl.el("main"),r=e.body.querySelector("footer.sl-pfooter")||Sl.el("footer");Array.from(n.childNodes).forEach(e=>{e.classList&&e.classList.contains("sl-ppersistent")||n.removeChild(e)}),[t,o,r].forEach(e=>n.appendChild(e)),Slendium.JsClasses.all()}l("slnav"),e=a}}let c,d=1;var s=Sl.navigate=function(e,t){"object"!=typeof t&&(t={}),c&&c.cancel(),e=new URL(e,location.origin);const o={success:e=>{e=new n(e.html,e.url);t.replace?history.replaceState({id:e.id},"",e.url):history.pushState({id:e.id},"",e.url),!1!==t.clearTarget?(history.pushState({id:e.id},"","#sl-target-clear"),history.back()):i(e),setTimeout(()=>{scrollTo(0,0);let e=document.querySelector("[autofocus]");e&&e.focus()},100)}},r=d+=1;o.progress=e=>{l("slnavprogress",{id:r,progress:e})},o.error=e=>{e.redirect&&(window.location.href=e.redirect),Sl.toast("Error ("+e.code+")")},c=new Sl.nav.PageRequest(e,o)};Sl.fetchSelf=function({selectors:a=[]}={}){return c&&c.cancel(),new Promise((r,t)=>{new Sl.nav.PageRequest(location.href,{success:e=>{var t=new n(e.html,e.url);history.replaceState({id:t.id},"",t.url);let o=(new DOMParser).parseFromString(e.html,"text/html");Array.isArray(a)&&(a.forEach(e=>{Sl.substituteElements(o,window.document,e)}),document.title=o.title),r(o)},error:e=>{t(e.code)}})})},window.addEventListener("hashchange",()=>{history.replaceState(e,"",location.href)});let o=new URL(location.href,location.origin);function t(){e=new n(document.documentElement.outerHTML,location.href),history.replaceState({id:e.id},"",location.href)}window.addEventListener("popstate",e=>{var t=new URL(location.href,location.origin),e=e.state?n.find(e.state.id):null;e?i(e):o.pathname+o.search!==t.pathname+t.search&&s(location.href,{replace:!0,clearTarget:!1}),o=t}),document.addEventListener("click",o=>{if(!o.defaultPrevented){let t=o.target;for(;t;){let e=!0;if(t.matches(".js-back")||t===o.target&&t.classList.contains("js-back-target")?history.back():!SlendiumDynamicNav||!t.matches("a:not(.js-follow)")||(r=t.href,(r=new URL(r,location.origin)).origin+r.pathname+r.search===location.origin+location.pathname+location.search&&r.hash)||(r=t.href,new URL(r,location.origin).origin!==location.origin)||t.getAttribute("target")||t.hasAttribute("download")||"follow"==t.dataset.navigation?e=!1:s(t.href,{replace:"replace"==t.dataset.navigation}),e){o.preventDefault();break}t=t.parentElement}var r}}),document.addEventListener("keydown",e=>{"Escape"!==e.key&&27!==e.keyCode||document.querySelector(".js-back-target:target")&&history.back()}),0<=["interactive","complete"].indexOf(document.readyState)?t():document.addEventListener("DOMContentLoaded",t),history.scrollRestoration="auto"}();Sl.fetchSelf||(Sl.fetchSelf=function({selectors:r=[]}={}){return new Promise((l,e)=>{fetch(location.href).then(e=>e.text()).then(e=>{let t=(new DOMParser).parseFromString(e,"text/html");Array.isArray(r)&&r.forEach(e=>{Sl.substituteElements(t,window.document,e)}),l(t)}).catch(e)})}),Sl.defineView("Dialog",function(s){var e=s.querySelector(".sl-dlg > script");let o=s.querySelector(".sl-dlgbg > form.sl-dlg");const i=e&&JSON.parse(e.innerText);if(i&&"object"==typeof i&&Object.keys(i).length&&o){let l=s.querySelector(".sl-dlg > footer"),r=l.parentNode.insertBefore(Sl.el("div",{class:"sl-tright sl-hide"},Sl.createSpinner()),l);o.addEventListener("submit",e=>{e.preventDefault();let t=new FormData(o);t.delete("_next"),l.classList.add("sl-hide"),r.classList.remove("sl-hide"),fetch(o.action,{credentials:"same-origin",method:o.method,body:t}).then(e=>{if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(e=>{var n,a,t=e;window.history.back(),Array.isArray(i.reloadElements)&&i.reloadElements.length?(i.reloadElements.push(".js-fetch-self"),i.reloadElements.forEach(e=>{document.querySelectorAll(e).forEach(e=>{e.classList.add("js-el-reloading"),e.innerHTML="",e.appendChild(Sl.elStyle(Sl.createSpinner(),{width:"1em",height:"1em"}))})}),Sl.fetchSelf({selectors:i.reloadElements}).then(()=>{i.reloadElements.forEach(e=>{document.querySelectorAll(e).forEach(e=>{e.classList.remove("js-el-reloading")})}),Sl.JsClasses.all()})):i.reload&&setTimeout(()=>{window.location.reload()},100),i.toast&&Sl.toast(i.toast),i.jsonToText&&(n=i.jsonToText,a=t,console.warn('The Dialog option "jsonToText" is deprecated'),Object.keys(n).forEach(o=>{Array.from(document.querySelectorAll(o)).forEach(e=>{var t,l=n[o];let r="";for(t of l.paths){var s=function(e,t){t=t.split(".");let l=e,r="";for(let e=0;e<t.length&&(e===t.length-1&&(r=l[t[e]]),void 0!==l[t[e]]);e+=1)l=l[t[e]];return r}(a,t);if(s){r=s;break}}r=Array.isArray(r)&&"string"==typeof l.join?r.join(l.join):l.map[r]||r||"",e instanceof HTMLInputElement||e instanceof HTMLSelectElement?e.value=r:e.innerText=r})})),Array.from(document.querySelectorAll('[href="#'+s.id+'"]')).forEach(e=>{e.dispatchEvent(new CustomEvent("sldialogsubmit",{detail:{json:t}}))})}).catch(e=>{Sl.toast(""+e)}).finally(()=>{r.classList.add("sl-hide"),l.classList.remove("sl-hide")})})}function t(){if(s.matches(":target")||location.hash.substr(1)===s.id){s.removeAttribute("hidden");let e=s.querySelectorAll('input:not([type="hidden"]):not(:disabled),select:not(:disabled),textarea:not(:disabled)')[0];e&&e.focus()}else s.setAttribute("hidden","hidden")}s.classList.add("js-back-target");let l=s.querySelector(".sl-dlg > footer > a");return l&&l.classList.add("js-back"),window.addEventListener("hashchange",t),t(),{unload:()=>{window.removeEventListener("hashchange",t)}}});Sl.defineView("Menu",function(t){function n(t){r.querySelectorAll(".sl-menu_menu__item").forEach(e=>e.setAttribute("tabindex",t))}const r=t.querySelector(".sl-menu_menu"),e=(r.setAttribute("tabindex",-1),document.querySelector(":target")!==r&&n(-1),e=>{e.target.closest(".sl-menu_opener")!==t.querySelector(".sl-menu_opener")&&(r.classList.remove("visible"),n(-1))});return document.addEventListener("click",e),t.querySelector(".sl-menu_opener").addEventListener("click",e=>{e.preventDefault(),r.classList.add("visible"),r.focus(),n(0)}),{unload:function(){document.removeEventListener("click",e)}}});!function(){let s=[];Slendium.toast=function(e){if(document.querySelector(".sl-toast"))s.push(e);else{let t=document.body.appendChild(Sl.el("div",{class:"sl-toast sl-noselect"},[e]));setTimeout(()=>{t.classList.add("visible")},1e3/30),setTimeout(()=>{t.classList.remove("visible"),setTimeout(()=>{var e;t.remove(),s.length&&(e=s[0],s=s.slice(1),Slendium.toast(e))},200)},5e3)}}}();!function(){function e(){var a=Date.now();window.addEventListener("unload",function(){var e,n,t;navigator.sendBeacon&&FormData&&(e=new FormData,n=document.documentElement.offsetHeight,t=document.documentElement.clientHeight,e.append("a",0!==n?(document.body.scrollTop+t)/n:0),e.append("b",n),e.append("d",Date.now()-a),e.append("e",document.documentElement.clientWidth),e.append("f",t),e.append("g",window.location.href),performance.timing?e.append("c",performance.timing.domInteractive-performance.timing.requestStart):e.append("c",0),navigator.sendBeacon(SlendiumBeaconUrl,e))}),document.documentElement.addEventListener("change",function(e){e.target.classList.contains("sl-autosubmit")&&e.target.form.submit()}),Slendium.JsClasses.all()}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();Object.freeze(Slendium);}(window));