!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),s=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=t=>{t.dispatchEvent(new Event(i))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},u=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of p)t()}),p.push(e)):e()},_=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,b=(t,e,n=!0)=>{if(!n)return void _(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout(()=>{r||o(e)},s)},v=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])};let T=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},O=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function x(t,e){return e&&`${e}::${T++}`||t.uidEvent||T++}function k(t){const e=x(t);,E[e]}function L(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function S(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return O.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=S(e,i,n);if(e in C){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}),h=L(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=x(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function $(t,e,i,n,s){const o=L(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(t,e,i,r.callable,r.delegationSelector)}function N(t){return t=t.replace(w,""),C[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;,h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(A,"");a&&!e.includes(s)||$(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=f();let s=null,o=!0,r=!0,a=!1;e!==N(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=j(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function M(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function F(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const H={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${F(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${F(e)}`)},getDataAttributes(t){if(!t)return{};,i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=M(t.dataset[n])}return e},getDataAttribute:(t,e)=>M(t.getAttribute(`data-bs-${F(e)}`))};class W{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=r(e)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=r(e)?"element":s(e);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}:Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class B extends W{constructor(t,i){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){b(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(a(t),this.DATA_KEY)}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const z=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map(t=>n(t)).join(","):null},R={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!c(t)&&l(t))},getSelectorFromElement(t){const e=z(t);return e&&R.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?R.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?R.find(e):[]}},q=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;P.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const s=R.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},V=".bs.alert",K=`close${V}`,Q=`closed${V}`;class X extends B{static get NAME(){return"alert"}close(){if(P.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),P.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=X.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}q(X,"close"),g(X);const Y='[data-bs-toggle="button"]';class U extends B{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=U.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}P.on(document,"click.bs.button.data-api",Y,t=>{t.preventDefault();const e=t.target.closest(Y);U.getOrCreateInstance(e).toggle()}),g(U);const G=".bs.swipe",J=`touchstart${G}`,Z=`touchmove${G}`,tt=`touchend${G}`,et=`pointerdown${G}`,it=`pointerup${G}`,nt={endCallback:null,leftCallback:null,rightCallback:null},st={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ot extends W{constructor(t,e){super(),this._element=t,t&&ot.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return nt}static get DefaultType(){return st}static get NAME(){return"swipe"}dispose(){P.off(this._element,G)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),_(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,et,t=>this._start(t)),P.on(this._element,it,t=>this._end(t)),this._element.classList.add("pointer-event")):(P.on(this._element,J,t=>this._start(t)),P.on(this._element,Z,t=>this._move(t)),P.on(this._element,tt,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const rt=".bs.carousel",at=".data-api",lt="ArrowLeft",ct="ArrowRight",ht="next",dt="prev",ut="left",ft="right",pt=`slide${rt}`,mt=`slid${rt}`,gt=`keydown${rt}`,_t=`mouseenter${rt}`,bt=`mouseleave${rt}`,vt=`dragstart${rt}`,yt=`load${rt}${at}`,wt=`click${rt}${at}`,At="carousel",Et="active",Tt=".active",Ct=".carousel-item",Ot=Tt+Ct,xt={[lt]:ft,[ct]:ut},kt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class St extends B{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return kt}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,mt,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,mt,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ht:dt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&P.on(this._element,gt,t=>this._keydown(t)),"hover"===this._config.pause&&(P.on(this._element,_t,()=>this.pause()),P.on(this._element,bt,()=>this._maybeEnableCycle())),this._config.touch&&ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of R.find(".carousel-item img",this._element))P.on(t,vt,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(ft)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ot(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=xt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=R.findOne(Tt,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=R.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===ht,s=e||v(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>P.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),u(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(mt)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(Ot,this._element)}_getItems(){return R.find(Ct,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return m()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return m()?t===dt?ut:ft:t===dt?ft:ut}static jQueryInterface(t){return this.each(function(){const e=St.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}P.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=R.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=St.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),P.on(window,yt,()=>{const t=R.find('[data-bs-ride="carousel"]');for(const e of t)St.getOrCreateInstance(e)}),g(St);const Dt=".bs.collapse",$t=`show${Dt}`,It=`shown${Dt}`,Nt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`click${Dt}.data-api`,Mt="show",Ft="collapse",Ht="collapsing",Wt=`:scope .${Ft}.${Ft}`,Bt='[data-bs-toggle="collapse"]',zt={parent:null,toggle:!0},Rt={parent:"(null|element)",toggle:"boolean"};class qt extends B{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Bt);for(const t of i){const e=R.getSelectorFromElement(t),i=R.find(e).filter(t=>t===this._element);null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return zt}static get DefaultType(){return Rt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>qt.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(P.trigger(this._element,$t).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(Ht),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Ht),this._element.classList.add(Ft,Mt),this._element.style[e]="",P.trigger(this._element,It)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,Nt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(Ht),this._element.classList.remove(Ft,Mt);for(const t of this._triggerArray){const e=R.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Ht),this._element.classList.add(Ft),P.trigger(this._element,Pt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(Mt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Bt);for(const e of t){const t=R.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=R.find(Wt,this._config.parent);return R.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=qt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}P.on(document,jt,Bt,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of R.getMultipleElementsFromSelector(this))qt.getOrCreateInstance(t,{toggle:!1}).toggle()}),g(qt);var Vt="top",Kt="bottom",Qt="right",Xt="left",Yt="auto",Ut=[Vt,Kt,Qt,Xt],Gt="start",Jt="end",Zt="clippingParents",te="viewport",ee="popper",ie="reference",ne=Ut.reduce(function(t,e){return t.concat([e+"-"+Gt,e+"-"+Jt])},[]),se=[].concat(Ut,[Yt]).reduce(function(t,e){return t.concat([e,e+"-"+Gt,e+"-"+Jt])},[]),oe="beforeRead",re="read",ae="afterRead",le="beforeMain",ce="main",he="afterMain",de="beforeWrite",ue="write",fe="afterWrite",pe=[oe,re,ae,le,ce,he,de,ue,fe];function me(t){return t?(t.nodeName||"").toLowerCase():null}function ge(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function _e(t){return t instanceof ge(t).Element||t instanceof Element}function be(t){return t instanceof ge(t).HTMLElement||t instanceof HTMLElement}function ve(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ge(t).ShadowRoot||t instanceof ShadowRoot)}const ye={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.elements[t];be(s)&&me(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t});be(n)&&me(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function we(t){return t.split("-")[0]}var Ae=Math.max,Ee=Math.min,Te=Math.round;function Ce(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Oe(){return!/^((?!chrome|android).)*safari/i.test(Ce())}function xe(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&be(t)&&(s=t.offsetWidth>0&&Te(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Te(n.height)/t.offsetHeight||1);var r=(_e(t)?ge(t):window).visualViewport,a=!Oe()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ke(t){var e=xe(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Le(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ve(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Se(t){return ge(t).getComputedStyle(t)}function De(t){return["table","td","th"].indexOf(me(t))>=0}function $e(t){return((_e(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ie(t){return"html"===me(t)?t:t.assignedSlot||t.parentNode||(ve(t)?t.host:null)||$e(t)}function Ne(t){return be(t)&&"fixed"!==Se(t).position?t.offsetParent:null}function Pe(t){for(var e=ge(t),i=Ne(t);i&&De(i)&&"static"===Se(i).position;)i=Ne(i);return i&&("html"===me(i)||"body"===me(i)&&"static"===Se(i).position)?e:i||function(t){var e=/firefox/i.test(Ce());if(/Trident/i.test(Ce())&&be(t)&&"fixed"===Se(t).position)return null;var i=Ie(t);for(ve(i)&&(i=i.host);be(i)&&["html","body"].indexOf(me(i))<0;){var n=Se(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function je(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Me(t,e,i){return Ae(t,Ee(e,i))}function Fe(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function He(t,e){return e.reduce(function(e,i){return e[i]=t,e})}const We={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=we(i.placement),l=je(a),c=[Xt,Qt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Fe("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:He(t,Ut))}(s.padding,i),d=ke(o),u="y"===l?Vt:Xt,f="y"===l?Kt:Qt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Pe(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=Me(v,w,y),E=l;)[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Le(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Be(t){return t.split("-")[1]}var ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Re(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Xt,y=Vt,w=window;if(c){var A=Pe(i),E="clientHeight",T="clientWidth";A===ge(i)&&"static"!==Se(A=$e(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===Vt||(s===Xt||s===Qt)&&o===Jt)&&(y=Kt,m-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),s!==Xt&&(s!==Vt&&s!==Kt||o!==Jt)||(v=Qt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&ze),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Te(i*s)/s||0,y:Te(n*s)/s||0}}({x:f,y:m},ge(i)):{x:f,y:m};)[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:we(e.placement),variation:Be(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};,c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l},e.attributes.popper,{"data-popper-placement":e.placement})}};var Ve={passive:!0};const Ke={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=ge(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,Ve)}),a&&l.addEventListener("resize",i.update,Ve),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,Ve)}),a&&l.removeEventListener("resize",i.update,Ve)}}};var Qe={left:"right",right:"left",bottom:"top",top:"bottom"};function Xe(t){return t.replace(/left|right|bottom|top/g,function(t){return Qe[t]})}var Ye={start:"end",end:"start"};function Ue(t){return t.replace(/start|end/g,function(t){return Ye[t]})}function Ge(t){var e=ge(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Je(t){return xe($e(t)).left+Ge(t).scrollLeft}function Ze(t){var e=Se(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ti(t){return["html","body","#document"].indexOf(me(t))>=0?t.ownerDocument.body:be(t)&&Ze(t)?t:ti(Ie(t))}function ei(t,e){var i;void 0===e&&(e=[]);var n=ti(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=ge(n),r=s?[o].concat(o.visualViewport||[],Ze(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ei(Ie(r)))}function ii(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ni(t,e,i){return e===te?ii(function(t,e){var i=ge(t),n=$e(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Oe();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Je(t),y:l}}(t,i)):_e(e)?function(t,e){var i=xe(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ii(function(t){var e,i=$e(t),n=Ge(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Ae(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ae(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Je(t),l=-n.scrollTop;return"rtl"===Se(s||i).direction&&(a+=Ae(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}($e(t)))}function si(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?we(s):null,r=s?Be(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Vt:e={x:a,y:i.y-n.height};break;case Kt:e={x:a,y:i.y+i.height};break;case Qt:e={x:i.x+i.width,y:l};break;case Xt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?je(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Gt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Jt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Zt:a,c=i.rootBoundary,h=void 0===c?te:c,d=i.elementContext,u=void 0===d?ee:d,f=i.altBoundary,p=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=Fe("number"!=typeof g?g:He(g,Ut)),b=u===ee?ie:ee,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ei(Ie(t)),i=["absolute","fixed"].indexOf(Se(t).position)>=0&&be(t)?Pe(t):t;return _e(i)?e.filter(function(t){return _e(t)&&Le(t,i)&&"body"!==me(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=ni(t,i,n);return e.top=Ae(s.top,e.top),e.right=Ee(s.right,e.right),e.bottom=Ee(s.bottom,e.bottom),e.left=Ae(s.left,e.left),e},ni(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_e(y)?y:y.contextElement||$e(t.elements.popper),l,h,r),A=xe(t.elements.reference),E=si({reference:A,element:v,placement:s},v,E)),C=u===ee?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===ee&&x){var k=x[s];Object.keys(O).forEach(function(t){var e=[Qt,Kt].indexOf(t)>=0?1:-1,i=[Vt,Kt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e})}return O}function ri(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?se:l,h=Be(n),d=h?a?ne:ne.filter(function(t){return Be(t)===h}):Ut,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=oi(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[we(i)],e});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}const ai={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=we(g),b=l||(_!==g&&p?function(t){if(we(t)===Yt)return[];var e=Xe(t);return[Ue(t),e,Ue(e)]}(g):[Xe(g)]),v=[g].concat(b).reduce(function(t,i){return t.concat(we(i)===Yt?ri(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)},[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=we(O),k=Be(O)===Gt,L=[Vt,Kt].indexOf(x)>=0,S=L?"width":"height",D=oi(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?k?Qt:Xt:k?Kt:Vt;y[S]>w[S]&&($=Xe($));var I=Xe($),N=[];if(o&&N.push(D[x]<=0),a&&N.push(D[$]<=0,D[I]<=0),N.every(function(t){return t})){T=O,E=!1;break}A.set(O,N)}if(E)for(var P=function(t){var e=v.find(function(e){var i=A.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return T=e,"break"},j=p?3:1;j>0&&"break"!==P(j);j--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function li(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ci(t){return[Vt,Qt,Kt,Xt].some(function(e){return t[e]>=0})}const hi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=oi(e,{elementContext:"reference"}),a=oi(e,{altBoundary:!0}),l=li(r,n),c=li(a,s,o),h=ci(l),d=ci(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},di={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=se.reduce(function(t,i){return t[i]=function(t,e,i){var n=we(t),s=[Xt,Vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Xt,Qt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},ui={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=si({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}},fi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=oi(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h},e.rects,{placement:e.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,S="y"===y?Vt:Xt,D="y"===y?Kt:Qt,$="y"===y?"height":"width",I=A[y],N=I+g[S],P=I-g[D],j=f?-T[$]/2:0,M=b===Gt?E[$]:T[$],F=b===Gt?-T[$]:-E[$],H=e.elements.arrow,W=f&&H?ke(H):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[S],R=B[D],q=Me(0,E[$],W[$]),V=v?E[$]/2-j-q-z-O.mainAxis:M-q-z-O.mainAxis,K=v?-E[$]/2+j+q+R+O.mainAxis:F+q+R+O.mainAxis,Q=e.elements.arrow&&Pe(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=I+K-Y,G=Me(f?Ee(N,I+V-Y-X):N,I,f?Ae(P,U):P);A[y]=G,k[y]=G-I}if(a){var J,Z="x"===y?Vt:Xt,tt="x"===y?Kt:Qt,et=A[w],it="y"===w?"height":"width",nt=et+g[Z],st=et-g[tt],ot=-1!==[Vt,Xt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=Me(t,e,i);return n>i?i:n}(at,et,lt):Me(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function pi(t,e,i){void 0===i&&(i=!1);var n,s,o=be(e),r=be(e)&&function(t){var e=t.getBoundingClientRect(),i=Te(e.width)/t.offsetWidth||1,n=Te(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=$e(e),l=xe(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==me(e)||Ze(a))&&(c=(n=e)!==ge(n)&&be(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ge(n)),be(e)?((h=xe(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Je(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function mi(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var gi={placement:"bottom",modifiers:[],strategy:"absolute"};function _i(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function bi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?gi:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},elements:{reference:t,popper:e}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;,o,a.options,s),a.scrollParents={reference:_e(t)?ei(t):t.contextElement?ei(t.contextElement):[],popper:ei(e)};var r,c,u=function(t){var e=mi(t);return pe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(t,e){var i=t[e.name];,i,e,{options:Object.assign({},i.data,e.data)}):e,t}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=u.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});)}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(_i(e,i)){a.rects={reference:pi(e,Pe(i),"fixed"===a.options.strategy),popper:ke(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!_i(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var vi=bi(),yi=bi({defaultModifiers:[Ke,ui,qe,ye]}),wi=bi({defaultModifiers:[Ke,ui,qe,ye,di,ai,fi,We,hi]});const Ai=Object.freeze(Object.defineProperty({__proto__:null,afterMain:he,afterRead:ae,afterWrite:fe,applyStyles:ye,arrow:We,auto:Yt,basePlacements:Ut,beforeMain:le,beforeRead:oe,beforeWrite:de,bottom:Kt,clippingParents:Zt,computeStyles:qe,createPopper:wi,createPopperBase:vi,createPopperLite:yi,detectOverflow:oi,end:Jt,eventListeners:Ke,flip:ai,hide:hi,left:Xt,main:ce,modifierPhases:pe,offset:di,placements:se,popper:ee,popperGenerator:bi,popperOffsets:ui,preventOverflow:fi,read:re,reference:ie,right:Qt,start:Gt,top:Vt,variationPlacements:ne,viewport:te,write:ue},Symbol.toStringTag,{value:"Module"})),Ei="dropdown",Ti=".bs.dropdown",Ci=".data-api",Oi="ArrowUp",xi="ArrowDown",ki=`hide${Ti}`,Li=`hidden${Ti}`,Si=`show${Ti}`,Di=`shown${Ti}`,$i=`click${Ti}${Ci}`,Ii=`keydown${Ti}${Ci}`,Ni=`keyup${Ti}${Ci}`,Pi="show",ji='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Mi=`${ji}.${Pi}`,Fi=".dropdown-menu",Hi=m()?"top-end":"top-start",Wi=m()?"top-start":"top-end",Bi=m()?"bottom-end":"bottom-start",zi=m()?"bottom-start":"bottom-end",Ri=m()?"left-start":"right-start",qi=m()?"right-start":"left-start",Vi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ki={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qi extends B{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,Fi)[0]||R.prev(this._element,Fi)[0]||R.findOne(Fi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vi}static get DefaultType(){return Ki}static get NAME(){return Ei}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!P.trigger(this._element,Si,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pi),this._element.classList.add(Pi),P.trigger(this._element,Di,t)}}hide(){if(c(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!P.trigger(this._element,ki,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pi),this._element.classList.remove(Pi),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,Li,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ei.toUpperCase()}:Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ai)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=wi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Ri;if(t.classList.contains("dropstart"))return qi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Wi:Hi:e?zi:Bi}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=R.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>l(t));i.length&&v(i,e,t===xi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=R.find(Mi);for(const i of e){const e=Qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Oi,xi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(ji)?this:R.prev(this,ji)[0]||R.next(this,ji)[0]||R.findOne(ji,t.delegateTarget.parentNode),o=Qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}P.on(document,Ii,ji,Qi.dataApiKeydownHandler),P.on(document,Ii,Fi,Qi.dataApiKeydownHandler),P.on(document,$i,Qi.clearMenus),P.on(document,Ni,Qi.clearMenus),P.on(document,$i,ji,function(t){t.preventDefault(),Qi.getOrCreateInstance(this).toggle()}),g(Qi);const Xi="backdrop",Yi="show",Ui=`mousedown.bs.${Xi}`,Gi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ji={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zi extends W{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return Xi}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(Yi),this._emulateAnimation(()=>{_(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation(()=>{this.dispose(),_(t)})):_(t)}dispose(){this._isAppended&&(P.off(this._element,Ui),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),P.on(t,Ui,()=>{_(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const tn=".bs.focustrap",en=`focusin${tn}`,nn=`keydown.tab${tn}`,sn="backward",on={autofocus:!0,trapElement:null},rn={autofocus:"boolean",trapElement:"element"};class an extends W{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return rn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,tn),P.on(document,en,t=>this._handleFocusin(t)),P.on(document,nn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,tn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=R.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?sn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",hn="padding-right",dn="margin-right";class un{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,hn,e=>e+t),this._setElementAttributes(ln,hn,e=>e+t),this._setElementAttributes(cn,dn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(ln,hn),this._resetElementAttributes(cn,dn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&H.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=H.getDataAttribute(t,e);null!==i?(H.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const i of R.find(t,this._element))e(i)}}const fn=".bs.modal",pn=`hide${fn}`,mn=`hidePrevented${fn}`,gn=`hidden${fn}`,_n=`show${fn}`,bn=`shown${fn}`,vn=`resize${fn}`,yn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,An=`keydown.dismiss${fn}`,En=`click${fn}.data-api`,Tn="modal-open",Cn="show",On="modal-static",xn={backdrop:!0,focus:!0,keyboard:!0},kn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends B{constructor(t,e){super(t,e),this._dialog=R.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new un,this._addEventListeners()}static get Default(){return xn}static get DefaultType(){return kn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,_n,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Cn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){P.off(window,fn),P.off(this._dialog,fn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=R.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(Cn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,bn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,An,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),P.on(window,vn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),P.on(this._element,wn,t=>{P.one(this._element,yn,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Tn),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,gn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(On)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(On),this._queueCallback(()=>{this._element.classList.remove(On),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=m()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=m()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Ln.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}P.on(document,En,'[data-bs-toggle="modal"]',function(t){const e=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),P.one(e,_n,t=>{t.defaultPrevented||P.one(e,gn,()=>{l(this)&&this.focus()})});const i=R.findOne(".modal.show");i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)}),q(Ln),g(Ln);const Sn=".bs.offcanvas",Dn=".data-api",$n=`load${Sn}${Dn}`,In="show",Nn="showing",Pn="hiding",jn=".offcanvas.show",Mn=`show${Sn}`,Fn=`shown${Sn}`,Hn=`hide${Sn}`,Wn=`hidePrevented${Sn}`,Bn=`hidden${Sn}`,zn=`resize${Sn}`,Rn=`click${Sn}${Dn}`,qn=`keydown.dismiss${Sn}`,Vn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Qn extends B{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,Mn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new un).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Nn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(In),this._element.classList.remove(Nn),P.trigger(this._element,Fn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,Hn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Pn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(In,Pn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new un).reset(),P.trigger(this._element,Bn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():P.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){P.on(this._element,qn,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():P.trigger(this._element,Wn))})}static jQueryInterface(t){return this.each(function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}P.on(document,Rn,'[data-bs-toggle="offcanvas"]',function(t){const e=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;P.one(e,Bn,()=>{l(this)&&this.focus()});const i=R.findOne(jn);i&&i!==e&&Qn.getInstance(i).hide(),Qn.getOrCreateInstance(e).toggle(this)}),P.on(window,$n,()=>{for(const t of R.find(jn))Qn.getOrCreateInstance(t).show()}),P.on(window,zn,()=>{for(const t of R.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Qn.getOrCreateInstance(t).hide()}),q(Qn),g(Qn);const Xn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Yn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Un=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Gn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Yn.has(i)||Boolean(Un.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},Jn={allowList:Xn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Zn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ts={entry:"(string|element|function|null)",selector:"(string|element)"};class es extends W{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Jn}static get DefaultType(){return Zn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},ts)}_setContent(t,e,i){const n=R.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Gn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const is=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",ss="show",os=".tooltip-inner",rs=".modal",as="hide.bs.modal",ls="hover",cs="focus",hs="click",ds={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},us={allowList:Xn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},fs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ps extends B{constructor(t,e){if(void 0===Ai)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");,this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return us}static get DefaultType(){return fs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(rs),as,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=P.trigger(this._element,this.constructor.eventName("show")),e=(h(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),P.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._queueCallback(()=>{P.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!P.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._activeTrigger[hs]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),P.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ns,ss),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new es({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[os]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ns)}_isShown(){return this.tip&&this.tip.classList.contains(ss)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),i=ds[e.toUpperCase()];return wi(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return _(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..._(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)P.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[hs]=!(e._isShown()&&e._activeTrigger[hs]),e.toggle()});else if("manual"!==e){const t=e===ls?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ls?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");P.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?cs:ls]=!0,e._enter()}),P.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?cs:ls]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(rs),as,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=H.getDataAttributes(this._element);for(const t of Object.keys(e))is.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:a(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=ps.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(ps);const ms=".popover-header",gs=".popover-body",_s={...ps.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},bs={...ps.DefaultType,content:"(null|string|element|function)"};class vs extends ps{static get Default(){return _s}static get DefaultType(){return bs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ms]:this._getTitle(),[gs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(vs);const ys=".bs.scrollspy",ws=`activate${ys}`,As=`click${ys}`,Es=`load${ys}.data-api`,Ts="active",Cs="[href]",Os=".nav-link",xs=`${Os},.nav-item>${Os},.list-group-item`,ks={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ls={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ss extends B{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ks}static get DefaultType(){return Ls}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=a(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0 -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(P.off(this._config.target,As),P.on(this._config.target,As,Cs,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=R.find(Cs,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=R.findOne(decodeURI(e.hash),this._element);l(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Ts),this._activateParents(t),P.trigger(this._element,ws,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))R.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Ts);else for(const e of R.parents(t,".nav, .list-group"))for(const t of R.prev(e,xs))t.classList.add(Ts)}_clearActiveClass(t){t.classList.remove(Ts);const e=R.find(`${Cs}.${Ts}`,t);for(const t of e)t.classList.remove(Ts)}static jQueryInterface(t){return this.each(function(){const e=Ss.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}P.on(window,Es,()=>{for(const t of R.find('[data-bs-spy="scroll"]'))Ss.getOrCreateInstance(t)}),g(Ss);const Ds=".bs.tab",$s=`hide${Ds}`,Is=`hidden${Ds}`,Ns=`show${Ds}`,Ps=`shown${Ds}`,js=`click${Ds}`,Ms=`keydown${Ds}`,Fs=`load${Ds}`,Hs="ArrowLeft",Ws="ArrowRight",Bs="ArrowUp",zs="ArrowDown",Rs="Home",qs="End",Vs="active",Ks="fade",Qs="show",Xs=".dropdown-toggle",Ys=`:not(${Xs})`,Us='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gs=`.nav-link${Ys},.list-group-item${Ys},[role="tab"]${Ys},${Us}`,Js=`.${Vs}[data-bs-toggle="tab"],.${Vs}[data-bs-toggle="pill"],.${Vs}[data-bs-toggle="list"]`;class Zs extends B{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,Ms,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?P.trigger(e,$s,{relatedTarget:t}):null;P.trigger(t,Ns,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vs),this._activate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),P.trigger(t,Ps,{relatedTarget:e})):t.classList.add(Qs)},t,t.classList.contains(Ks)))}_deactivate(t,e){t&&(t.classList.remove(Vs),t.blur(),this._deactivate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),P.trigger(t,Is,{relatedTarget:e})):t.classList.remove(Qs)},t,t.classList.contains(Ks)))}_keydown(t){if(![Hs,Ws,Bs,zs,Rs,qs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!c(t));let i;if([Rs,qs].includes(t.key))i=e[t.key===Rs?0:e.length-1];else{const n=[Ws,zs].includes(t.key);i=v(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Zs.getOrCreateInstance(i).show())}_getChildren(){return R.find(Gs,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=R.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=R.findOne(t,i);s&&s.classList.toggle(n,e)};n(Xs,Vs),n(".dropdown-menu",Qs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Vs)}_getInnerElement(t){return t.matches(Gs)?t:R.findOne(Gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Zs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}P.on(document,js,Us,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||Zs.getOrCreateInstance(this).show()}),P.on(window,Fs,()=>{for(const t of R.find(Js))Zs.getOrCreateInstance(t)}),g(Zs);const to=".bs.toast",eo=`mouseover${to}`,io=`mouseout${to}`,no=`focusin${to}`,so=`focusout${to}`,oo=`hide${to}`,ro=`hidden${to}`,ao=`show${to}`,lo=`shown${to}`,co="hide",ho="show",uo="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},po={animation:!0,autohide:!0,delay:5e3};class mo extends B{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return po}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){P.trigger(this._element,ao).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(co),u(this._element),this._element.classList.add(ho,uo),this._queueCallback(()=>{this._element.classList.remove(uo),P.trigger(this._element,lo),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,oo).defaultPrevented||(this._element.classList.add(uo),this._queueCallback(()=>{this._element.classList.add(co),this._element.classList.remove(uo,ho),P.trigger(this._element,ro)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ho),super.dispose()}isShown(){return this._element.classList.contains(ho)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){P.on(this._element,eo,t=>this._onInteraction(t,!0)),P.on(this._element,io,t=>this._onInteraction(t,!1)),P.on(this._element,no,t=>this._onInteraction(t,!0)),P.on(this._element,so,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=mo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return q(mo),g(mo),{Alert:X,Button:U,Carousel:St,Collapse:qt,Dropdown:Qi,Modal:Ln,Offcanvas:Qn,Popover:vs,ScrollSpy:Ss,Tab:Zs,Toast:mo,Tooltip:ps}});//# sourceMappingURL=bootstrap.bundle.min.js.map !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.fecha={})}(this,function(t){"use strict";var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,e="[^\\s]+",r=/\[([^]*?)\]/gm;function o(t,n){for(var e=[],r=0,o=t.length;r<o;r++)e.push(t[r].substr(0,n));return e}var u=function(t){return function(n,e){var r=e[t].map(function(t){return t.toLowerCase()}).indexOf(n.toLowerCase());return r>-1?r:null}};function a(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var r=0,o=n;r<o.length;r++){var u=o[r];for(var a in u)t[a]=u[a]}return t}var i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],s=o(d,3),f={dayNamesShort:o(i,3),dayNames:i,monthNamesShort:s,monthNames:d,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},m=a({},f),c=function(t){return m=a(m,t)},l=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},h=function(t,n){for(void 0===n&&(n=2),t=String(t);t.length<n;)t="0"+t;return t},g={D:function(t){return String(t.getDate())},DD:function(t){return h(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return h(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return h(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return h(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return h(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return h(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return h(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return h(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return h(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return h(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return h(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+h(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4)},Z:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+h(Math.floor(Math.abs(n)/60),2)+":"+h(Math.abs(n)%60,2)}},M=function(t){return+t-1},D=[null,"\\d\\d?"],Y=[null,e],y=["isPm",e,function(t,n){var e=t.toLowerCase();return e===n.amPm[0]?0:e===n.amPm[1]?1:null}],p=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var n=(t+"").match(/([+-]|\d\d)/gi);if(n){var e=60*+n[1]+parseInt(n[2],10);return"+"===n[0]?e:-e}return 0}],S={D:["day","\\d\\d?"],DD:["day","\\d\\d"],Do:["day","\\d\\d?"+e,function(t){return parseInt(t,10)}],M:["month","\\d\\d?",M],MM:["month","\\d\\d",M],YY:["year","\\d\\d",function(t){var n=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour","\\d\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","\\d\\d?"],HH:["hour","\\d\\d"],m:["minute","\\d\\d?"],mm:["minute","\\d\\d"],s:["second","\\d\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:D,dd:D,ddd:Y,dddd:Y,MMM:["month",e,u("monthNamesShort")],MMMM:["month",e,u("monthNames")],a:y,A:y,ZZ:p,Z:p},v={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D,YYYY",longDate:"MMMM D,YYYY",fullDate:"dddd,MMMM D,YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},H=function(t){return a(v,t)},b=function(t,e,o){if(void 0===e&&(e=v.default),void 0===o&&(o={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var u=[];e=(e=v[e]||e).replace(r,function(t,n){return u.push(n),"@@@"});var i=a(a({},m),o);return(e=e.replace(n,function(n){return g[n](t,i)})).replace(/@@@/g,function(){return u.shift()})};function w(t,e,o){if(void 0===o&&(o={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=v[e]||e,t.length>1e3)return null;var u={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],d=[],s=e.replace(r,function(t,n){return d.push(l(n)),"@@@"}),f={},c={};s=l(s).replace(n,function(t){var n=S[t],e=n[0],r=n[1],o=n[3];if(f[e])throw new Error("Invalid format. "+e+" specified twice in format");return f[e]=!0,o&&(c[o]=!0),i.push(n),"("+r+")"}),Object.keys(c).forEach(function(t){if(!f[t])throw new Error("Invalid format. "+t+" is required in specified format")}),s=s.replace(/@@@/g,function(){return d.shift()});var h=t.match(new RegExp(s,"i"));if(!h)return null;for(var g,M=a(a({},m),o),D=1;D<h.length;D++){var Y=i[D-1],y=Y[0],p=Y[2],H=p?p(h[D],M):+h[D];if(null==H)return null;u[y]=H}if(1===u.isPm&&null!=u.hour&&12!=+u.hour?u.hour=+u.hour+12:0===u.isPm&&12==+u.hour&&(u.hour=0),null==u.timezoneOffset){g=new Date(u.year,u.month,u.day,u.hour,u.minute,u.second,u.millisecond);for(var b=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],w=(D=0,b.length);D<w;D++)if(f[b[D][0]]&&u[b[D][0]]!==g[b[D][1]]())return null}else if(g=new Date(Date.UTC(u.year,u.month,u.day,u.hour,u.minute-u.timezoneOffset,u.second,u.millisecond)),u.month>11||u.month<0||u.day>31||u.day<1||u.hour>23||u.hour<0||u.minute>59||u.minute<0||u.second>59||u.second<0)return null;return g}var P={format:b,parse:w,defaultI18n:f,setGlobalDateI18n:c,setGlobalDateMasks:H};t.assign=a,t.default=P,t.format=b,t.parse=w,t.defaultI18n=f,t.setGlobalDateI18n=c,t.setGlobalDateMasks=H,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=fecha.min.js.map
/*!
hey, [be]Lazy.js - v1.8.2 - 2016.10.25
A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
(c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
*/
(function(q,m){"function"===typeof define&&define.amd?define(m):"object"===typeof exports?module.exports=m():q.Blazy=m()})(this,function(){function q(b){var c=b._util;c.elements=E(b.options);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&l(b.options.container,function(a){n(a,"scroll",c.validateT)}),n(window,"resize",c.saveViewportOffsetT),n(window,"resize",c.validateT),n(window,"scroll",c.validateT));m(b)}function m(b){for(var c=b._util,a=0;a<c.count;a++){var d=c.elements[a],e;a:{var g=d;e=b.options;var p=g.getBoundingClientRect();if(e.container&&y&&(g=g.closest(e.containerClass))){g=g.getBoundingClientRect();e=r(g,f)?r(p,{top:g.top-e.offset,right:g.right+e.offset,bottom:g.bottom+e.offset,left:g.left-e.offset}):!1;break a}e=r(p,f)}if(e||t(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function r(b,c){return b.right>=c.left&&b.bottom>=c.top&&b.left<=c.right&&b.top<=c.bottom}function z(b,c,a){if(!t(b,a.successClass)&&(c||a.loadInvisible||0<b.offsetWidth&&0<b.offsetHeight))if(c=b.getAttribute(u)||b.getAttribute(a.src)){c=c.split(a.separator);var d=c[A&&1<c.length?1:0],e=b.getAttribute(a.srcset),g="img"===b.nodeName.toLowerCase(),p=(c=b.parentNode)&&"picture"===c.nodeName.toLowerCase();if(g||void 0===b.src){var h=new Image,w=function(){a.error&&a.error(b,"invalid");v(b,a.errorClass);k(h,"error",w);k(h,"load",f)},f=function(){g?p||B(b,d,e):b.style.backgroundImage='url("'+d+'")';x(b,a);k(h,"load",f);k(h,"error",w)};p&&(h=b,l(c.getElementsByTagName("source"),function(b){var c=a.srcset,e=b.getAttribute(c);e&&(b.setAttribute("srcset",e),b.removeAttribute(c))}));n(h,"error",w);n(h,"load",f);B(h,d,e)}else b.src=d,x(b,a)}else"video"===b.nodeName.toLowerCase()?(l(b.getElementsByTagName("source"),function(b){var c=a.src,e=b.getAttribute(c);e&&(b.setAttribute("src",e),b.removeAttribute(c))}),b.load(),x(b,a)):(a.error&&a.error(b,"missing"),v(b,a.errorClass))}function x(b,c){v(b,c.successClass);c.success&&c.success(b);b.removeAttribute(c.src);b.removeAttribute(c.srcset);l(c.breakpoints,function(a){b.removeAttribute(a.src)})}function B(b,c,a){a&&b.setAttribute("srcset",a);b.src=c}function t(b,c){return-1!==(" "+b.className+" ").indexOf(" "+c+" ")}function v(b,c){t(b,c)||(b.className+=" "+c)}function E(b){var c=[];b=b.root.querySelectorAll(b.selector);for(var a=b.length;a--;c.unshift(b[a]));return c}function C(b){f.bottom=(window.innerHeight||document.documentElement.clientHeight)+b;f.right=(window.innerWidth||document.documentElement.clientWidth)+b}function n(b,c,a){b.attachEvent?b.attachEvent&&b.attachEvent("on"+c,a):b.addEventListener(c,a,{capture:!1,passive:!0})}function k(b,c,a){b.detachEvent?b.detachEvent&&b.detachEvent("on"+c,a):b.removeEventListener(c,a,{capture:!1,passive:!0})}function l(b,c){if(b&&c)for(var a=b.length,d=0;d<a&&!1!==c(b[d],d);d++);}function D(b,c,a){var d=0;return function(){var e=+new Date;e-d<c||(d=e,b.apply(a,arguments))}}var u,f,A,y;return function(b){if(!document.querySelectorAll){var c=document.createStyleSheet();document.querySelectorAll=function(a,b,d,h,f){f=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(d=a.length;d--;){c.addRule(a[d],"k:v");for(h=f.length;h--;)f[h].currentStyle.k&&b.push(f[h]);c.removeRule(0)}return b}}var a=this,d=a._util={};d.elements=[];d.destroyed=!0;a.options=b||{};a.options.error=a.options.error||!1;a.options.offset=a.options.offset||100;a.options.root=a.options.root||document;a.options.success=a.options.success||!1;a.options.selector=a.options.selector||".b-lazy";a.options.separator=a.options.separator||"|";a.options.containerClass=a.options.container;a.options.container=a.options.containerClass?document.querySelectorAll(a.options.containerClass):!1;a.options.errorClass=a.options.errorClass||"b-error";a.options.breakpoints=a.options.breakpoints||!1;a.options.loadInvisible=a.options.loadInvisible||!1;a.options.successClass=a.options.successClass||"b-loaded";a.options.validateDelay=a.options.validateDelay||25;a.options.saveViewportOffsetDelay=a.options.saveViewportOffsetDelay||50;a.options.srcset=a.options.srcset||"data-srcset";a.options.src=u=a.options.src||"data-src";y=Element.prototype.closest;A=1<window.devicePixelRatio;f={};f.top=0-a.options.offset;f.left=0-a.options.offset;a.revalidate=function(){q(a)};a.load=function(a,b){var c=this.options;void 0===a.length?z(a,b,c):l(a,function(a){z(a,b,c)})};a.destroy=function(){var a=this._util;this.options.container&&l(this.options.container,function(b){k(b,"scroll",a.validateT)});k(window,"scroll",a.validateT);k(window,"resize",a.validateT);k(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};d.validateT=D(function(){m(a)},a.options.validateDelay,a);d.saveViewportOffsetT=D(function(){C(a.options.offset)},a.options.saveViewportOffsetDelay,a);C(a.options.offset);l(a.options.breakpoints,function(a){if(a.width>=window.screen.width)return u=a.src,!1});setTimeout(function(){q(a)})}});
/**
* Swiper 10.2.0
* Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com
*
* Copyright 2014-2023 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: August 17, 2023
*/
var Swiper=function(){"use strict";function e('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s,a){void 0===s&&(s={}),void 0===a&&(a={}),Object.keys(a).forEach((i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){"undefined"!=typeof setTimeout&&clearTimeout('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}function n(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function l(){return Date.now()}function o(e,t){void 0===t&&(t="x");const s=r();let a,i,n;const l=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=r();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');return s.WebKitCSSMatrix?(i=l.transform||l.webkitTransform,i.split(",").length>6&&(i=i.split(",").map((e=>e.replace(",","."))).join(",")),n=new s.WebKitCSSMatrix("none"===i?"":i)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1,0,0,1,"),a=n.toString().split(",")),"x"===t&&(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function d('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e').slice(8,-1)}function c(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let a=1;a<arguments.length;a+=1){const i=a<0||arguments.length<=a?void 0:arguments[a];if(null!=i&&(s=i,!("undefined"!=typeof window&&void 0!==window.HTMLElement?s instanceof HTMLElement:s&&(1===s.nodeType||11===s.nodeType)))){const s=Object.keys(Object(i)).filter((e=>t.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')<0));for(let t=0,a=s.length;t<a;t+=1){const a=s[t],r=Object.getOwnPropertyDescriptor(i,a);void 0!==r&&r.enumerable&&(d(e[a])&&d(i[a])?i[a].__swiper__?e[a]=i[a]:c(e[a],i[a]):!d(e[a])&&d(i[a])?(e[a]={},i[a].__swiper__?e[a]=i[a]:c(e[a],i[a])):e[a]=i[a])}}}var s;return e}function p(e,t,s){e.style.setProperty(t,s)}function u('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,targetPosition:s,side:a}=e;const i=r(),n=-t.translate;let l,o=null;const d=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=s>n?"next":"prev",p=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{l=(new Date).getTime(),null===o&&(o=l);const e=Math.max(Math.min((l-o)/d,1),0),r=.5-Math.cos(e*Math.PI)/2;let c=n+r*(s-n);if(p(c,s)&&(c=s),t.wrapperEl.scrollTo({[a]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[a]:c})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function h(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function f(e,t){void 0===t&&(t=[]);const s=document.createElement('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');return s.classList.add(...Array.isArray(t)?t:[t]),s}function g('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=r(),s=a(),i=e.getBoundingClientRect(),n=s.body,l=e.clientTop||n.clientTop||0,o=e.clientLeft||n.clientLeft||0,d=e===t?t.scrollY:e.scrollTop,c=e===t?t.scrollX:e.scrollLeft;return{top:i.top+d-l,left:i.left+c-o}}function v(e,t){return r().getComputedStyle(e,null).getPropertyValue(t)}function w('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function b(e,t){const s=[];let a=e.parentElement;for(;a;)t?a.matches(t)&&s.push(a):s.push(a),a=a.parentElement;return s}function y(e,t){t&&e.addEventListener("transitionend",(function s(a){a.target===e&&(t.call(e,a),e.removeEventListener("transitionend",s))}))}function E(e,t,s){const a=r();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}let x,S,T;function M(){return x||(x=function(){const e=r(),t=a();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),x}function C('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return void 0===e&&(e={}),S||(S=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{userAgent:t}=void 0===e?{}:e;const s=M(),a=r(),i=a.navigator.platform,n=t||a.navigator.userAgent,l={ios:!1,android:!1},o=a.screen.width,d=a.screen.height,c=n.match(/(Android);?[\s\/]+([\d.]+)?/);let p=n.match(/(iPad).*OS\s([\d_]+)/);const u=n.match(/(iPod)(.*OS\s([\d_]+))?/),m=!p&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let f="MacIntel"===i;return!p&&f&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${d}`)>=0&&(p=n.match(/(Version)\/([\d.]+)/),p||(p=[0,1,"13_0_0"]),f=!1),c&&!h&&(l.os="android",l.android=!0),(p||m||u)&&(l.os="ios",l.ios=!0),l}('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')),S}function P(){return T||(T=function(){const e=r();let t=!1;function s(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(s()){const s=String(e.navigator.userAgent);if(s.includes("Version/")){const[e,a]=s.split("Version/")[1].split(" ")[0].split(".").map((e=>Number('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));t=e<16||16===e&&a<2}}return{isSafari:t||s(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),T}var L={on(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach((e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)})),a},once(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;function i(){a.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];t.apply(a,r)}return i.__emitterProxy=t,a.on(e,i,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const a=t?"unshift":"push";return s.eventsAnyListeners.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')<0&&s.eventsAnyListeners[a]('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s},offAny('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&s.eventsListeners[e].splice(i,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,a;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],s=r.slice(1,r.length),a=e):(t=r[0].events,s=r[0].data,a=r[0].context||e),s.unshift(a);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(a,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(a,s)}))})),e}};const z=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`)),t&&t.remove()}},A=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},$=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const a="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,r=[s-t];return r.push(...Array.from({length:t}).map(((e,t)=>s+a+t))),void e.slides.forEach(((t,s)=>{r.includes(t.column)&&A(e,s)}))}const r=i+a-1;if(e.params.rewind||e.params.loop)for(let a=i-t;a<=r+t;a+=1){const t=(a%s+s)%s;(t<i||t>r)&&A(e,t)}else for(let a=Math.max(i-t,0);a<=Math.min(r+t,s-1);a+=1)a!==i&&(a>r||a<i)&&A(e,a)};var I={updateSize:function(){const e=this;let t,s;const a=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:a.clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:a.clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(v(a,"padding-left")||0,10)-parseInt(v(a,"padding-right")||0,10),s=s-parseInt(v(a,"padding-top")||0,10)-parseInt(v(a,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function s(e,s){return parseFloat(e.getPropertyValue(t(s))||0)}const a=e.params,{wrapperEl:i,slidesEl:r,size:n,rtlTranslate:l,wrongRTL:o}=e,d=e.virtual&&a.virtual.enabled,c=d?e.virtual.slides.length:e.slides.length,u=h(r,`.${e.params.slideClass}, swiper-slide`),m=d?e.virtual.slides.length:u.length;let f=[];const g=[],w=[];let b=a.slidesOffsetBefore;"function"==typeof b&&(b=a.slidesOffsetBefore.call('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'));let y=a.slidesOffsetAfter;"function"==typeof y&&(y=a.slidesOffsetAfter.call('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'));const x=e.snapGrid.length,S=e.slidesGrid.length;let T=a.spaceBetween,M=-b,C=0,P=0;if(void 0===n)return;"string"==typeof T&&T.indexOf("%")>=0?T=parseFloat(T.replace("%",""))/100*n:"string"==typeof T&&(T=parseFloat(T)),e.virtualSize=-T,u.forEach((e=>{l?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),a.centeredSlides&&a.cssMode&&(p(i,"--swiper-centered-offset-before",""),p(i,"--swiper-centered-offset-after",""));const L=a.grid&&a.grid.rows>1&&e.grid;let z;L&&e.grid.initSlides(m);const A="auto"===a.slidesPerView&&a.breakpoints&&Object.keys(a.breakpoints).filter((e=>void 0!==a.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<m;i+=1){let r;if(z=0,u[i]&&(r=u[i]),L&&e.grid.updateSlide(i,r,m,t),!u[i]||"none"!==v(r,"display")){if("auto"===a.slidesPerView){A&&(u[i].style[t("width")]="");const n=getComputedStyle(r),l=r.style.transform,o=r.style.webkitTransform;if(l&&(r.style.transform="none"),o&&(r.style.webkitTransform="none"),a.roundLengths)z=e.isHorizontal()?E(r,"width",!0):E(r,"height",!0);else{const e=s(n,"width"),t=s(n,"padding-left"),a=s(n,"padding-right"),i=s(n,"margin-left"),l=s(n,"margin-right"),o=n.getPropertyValue("box-sizing");if(o&&"border-box"===o)z=e+i+l;else{const{clientWidth:s,offsetWidth:n}=r;z=e+t+a+i+l+(n-s)}}l&&(r.style.transform=l),o&&(r.style.webkitTransform=o),a.roundLengths&&(z=Math.floor(z))}else z=(n-(a.slidesPerView-1)*T)/a.slidesPerView,a.roundLengths&&(z=Math.floor(z)),u[i]&&(u[i].style[t("width")]=`${z}px`);u[i]&&(u[i].swiperSlideSize=z),w.push(z),a.centeredSlides?(M=M+z/2+C/2+T,0===C&&0!==i&&(M=M-n/2-T),0===i&&(M=M-n/2-T),Math.abs(M)<.001&&(M=0),a.roundLengths&&(M=Math.floor(M)),P%a.slidesPerGroup==0&&f.push(M),g.push(M)):(a.roundLengths&&(M=Math.floor(M)),(P-Math.min(e.params.slidesPerGroupSkip,P))%e.params.slidesPerGroup==0&&f.push(M),g.push(M),M=M+z+T),e.virtualSize+=z+T,C=z,P+=1}}if(e.virtualSize=Math.max(e.virtualSize,n)+y,l&&o&&("slide"===a.effect||"coverflow"===a.effect)&&(i.style.width=`${e.virtualSize+T}px`),a.setWrapperSize&&(i.style[t("width")]=`${e.virtualSize+T}px`),L&&e.grid.updateWrapperSize(z,f,t),!a.centeredSlides){const t=[];for(let s=0;s<f.length;s+=1){let i=f[s];a.roundLengths&&(i=Math.floor(i)),f[s]<=e.virtualSize-n&&t.push(i)}f=t,Math.floor(e.virtualSize-n)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-n)}if(d&&a.loop){const t=w[0]+T;if(a.slidesPerGroup>1){const s=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/a.slidesPerGroup),i=t*a.slidesPerGroup;for(let e=0;e<s;e+=1)f.push(f[f.length-1]+i)}for(let s=0;s<e.virtual.slidesBefore+e.virtual.slidesAfter;s+=1)1===a.slidesPerGroup&&f.push(f[f.length-1]+t),g.push(g[g.length-1]+t),e.virtualSize+=t}if(0===f.length&&(f=[0]),0!==T){const s=e.isHorizontal()&&l?"marginLeft":t("marginRight");u.filter(((e,t)=>!(a.cssMode&&!a.loop)||t!==u.length-1)).forEach((e=>{e.style[s]=`${T}px`}))}if(a.centeredSlides&&a.centeredSlidesBounds){let e=0;w.forEach((t=>{e+=t+(T||0)})),e-=T;const t=e-n;f=f.map((e=>e<=0?-b:e>t?t+y:e))}if(a.centerInsufficientSlides){let e=0;if(w.forEach((t=>{e+=t+(T||0)})),e-=T,e<n){const t=(n-e)/2;f.forEach(((e,s)=>{f[s]=e-t})),g.forEach(((e,s)=>{g[s]=e+t}))}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:g,slidesSizesGrid:w}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){p(i,"--swiper-centered-offset-before",-f[0]+"px"),p(i,"--swiper-centered-offset-after",e.size/2-w[w.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(m!==c&&e.emit("slidesLengthChange"),f.length!==x&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),g.length!==S&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),!(d||a.cssMode||"slide"!==a.effect&&"fade"!==a.effect)){const t=`${a.containerModifierClass}backface-hidden`,s=e.el.classList.contains(t);m<=a.maxBackfaceHiddenSlides?s||e.el.classList.add(t):s&&e.el.classList.remove(t)}},updateAutoHeight:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,s=[],a=t.virtual&&t.params.virtual.enabled;let i,r=0;"number"==typeof e?t.setTransition('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'):!0===e&&t.setTransition(t.params.speed);const n=e=>a?t.slides[t.getSlideIndexByData('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{s.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}));else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!a)break;s.push(n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))}else s.push(n(t.activeIndex));for(i=0;i<s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let a=0;a<t.length;a+=1)t[a].swiperSlideOffset=(e.isHorizontal()?t[a].offsetLeft:t[a].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){void 0===e&&(e=this&&this.translate||0);const t=this,s=t.params,{slides:a,rtlTranslate:i,snapGrid:r}=t;if(0===a.length)return;void 0===a[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;i&&(n=e),a.forEach((e=>{e.classList.remove(s.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let l=s.spaceBetween;"string"==typeof l&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e<a.length;e+=1){const o=a[e];let d=o.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(d-=a[0].swiperSlideOffset);const c=(n+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),p=(n-r[0]+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),u=-(n-d),m=u+t.slidesSizesGrid[e];(u>=0&&u<t.size-1||m>1&&m<=t.size||u<=0&&m>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),a[e].classList.add(s.slideVisibleClass)),o.progress=i?-c:c,o.originalProgress=i?-p:p}},updateProgress:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===a)i=0,r=!0,n=!0;else{i=(e-t.minTranslate())/a;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;r=s||i<=0,n=l||i>=1,s&&(i=0),l&&(i=1)}if(s.loop){const s=t.getSlideIndexByData(0),a=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[s],r=t.slidesGrid[a],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');l=o>=i?(o-i)/n:(o+n-r)/n,l>1&&(l-=1)}Object.assign(t,{progress:i,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),r&&!o&&t.emit("reachBeginning toEdge"),n&&!d&&t.emit("reachEnd toEdge"),(o&&!r||d&&!n)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:a,activeIndex:i}=e,r=e.virtual&&s.virtual.enabled,n=e=>h(a,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let l;if(t.forEach((e=>{e.classList.remove(s.slideActiveClass,s.slideNextClass,s.slidePrevClass)})),r)if(s.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=n(`[data-swiper-slide-index="${t}"]`)}else l=n(`[data-swiper-slide-index="${i}"]`);else l=t[i];if(l){l.classList.add(s.slideActiveClass);let e=function(e,t){const s=[];for(;e.nextElementSibling;){const a=e.nextElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}(l,`.${s.slideClass}, swiper-slide`)[0];s.loop&&!e&&(e=t[0]),e&&e.classList.add(s.slideNextClass);let a=function(e,t){const s=[];for(;e.previousElementSibling;){const a=e.previousElementSibling;t?a.matches(t)&&s.push(a):s.push(a),e=a}return s}(l,`.${s.slideClass}, swiper-slide`)[0];s.loop&&0===!a&&(a=t[t.length-1]),a&&a.classList.add(s.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:a,params:i,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===d&&(d=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{slidesGrid:t,params:s}=e,a=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?a>=t[e]&&a<t[e+1]-(t[e+1]-t[e])/2?i=e:a>=t[e]&&a<t[e+1]&&(i=e+1):a>=t[e]&&(i=e);return s.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),a.indexOf(s)>=0)o=a.indexOf(s);else{const e=Math.min(i.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/i.slidesPerGroup)}if(o>=a.length&&(o=a.length-1),d===r)return o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")),void(t.params.loop&&t.virtual&&t.params.virtual.enabled&&(t.realIndex=c(d)));let p;p=t.virtual&&i.virtual.enabled&&i.loop?c(d):t.slides[d]?parseInt(t.slides[d].getAttribute("data-swiper-slide-index")||d,10):d,Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:p,previousIndex:r,activeIndex:d}),t.initialized&&$(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),n!==p&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,s=t.params,a=e.closest(`.${s.slideClass}, swiper-slide`);let i,r=!1;if(a)for(let e=0;e<t.slides.length;e+=1)if(t.slides[e]===a){r=!0,i=e;break}if(!a||!r)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=a,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=i,s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var k={getTranslate:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:a,wrapperEl:i}=this;if(t.virtualTranslate)return s?-a:a;if(t.cssMode)return a;let r=o(i,e);return r+=this.cssOverflowAdjustment(),s&&(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:a,params:i,wrapperEl:r,progress:n}=s;let l,o=0,d=0;s.isHorizontal()?o=a?-e:e:d=e,i.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,i.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:i.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==n&&s.updateProgress('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),void 0===a&&(a=!0);const r=this,{params:n,wrapperEl:l}=r;if(r.animating&&n.preventInteractionOnTransition)return!1;const o=r.minTranslate(),d=r.maxTranslate();let c;if(c=a&&e>o?o:a&&e<d?d:e,r.updateProgress(c),n.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return u({swiper:r,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,i),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,i),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,s&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function O('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,runCallbacks:s,direction:a,step:i}=e;const{activeIndex:r,previousIndex:n}=t;let l=a;if(l||(l=r>n?"next":r<n?"prev":"reset"),t.emit(`transition${i}`),s&&r!==n){if("reset"===l)return void t.emit(`slideResetTransition${i}`);t.emit(`slideChangeTransition${i}`),"next"===l?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`)}}var D={slideTo:function(e,t,s,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const r=this;let n=e;n<0&&(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:m,wrapperEl:h,enabled:f}=r;if(r.animating&&l.preventInteractionOnTransition||!f&&!a&&!i)return!1;const g=Math.min(r.params.slidesPerGroupSkip,n);let v=g+Math.floor((n-g)/r.params.slidesPerGroup);v>=o.length&&(v=o.length-1);const w=-o[v];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*w),s=Math.floor(100*d[e]),a=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<a-(a-s)/2?n=e:t>=s&&t<a&&(n=e+1):t>=s&&(n=e)}if(r.initialized&&n!==p){if(!r.allowSlideNext&&(m?w>r.translate&&w>r.minTranslate():w<r.translate&&w<r.minTranslate()))return!1;if(!r.allowSlidePrev&&w>r.translate&&w>r.maxTranslate()&&(p||0)!==n)return!1}let b;if(n!==(c||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(w),b=n>p?"next":n<p?"prev":"reset",m&&-w===r.translate||!m&&w===r.translate)return r.updateActiveIndex(n),l.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==l.effect&&r.setTranslate(w),"reset"!==b&&(r.transitionStart(s,b),r.transitionEnd(s,b)),!1;if(l.cssMode){const e=r.isHorizontal(),s=m?w:-w;if(0===t){const t=r.virtual&&r.params.virtual.enabled;t&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),t&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=s}))):h[e?"scrollLeft":"scrollTop"]=s,t&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}))}else{if(!r.support.smoothScroll)return u({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(w),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,a),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"string"==typeof e){e=parseInt(e,10)}const i=this;let r=e;return i.params.loop&&(i.virtual&&i.params.virtual.enabled?r+=i.virtual.slidesBefore:r=i.getSlideIndexByData(r)),i.slideTo(r,t,s,a)},slideNext:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const a=this,{enabled:i,params:r,animating:n}=a;if(!i)return a;let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex<r.slidesPerGroupSkip?1:l,d=a.virtual&&r.virtual.enabled;if(r.loop){if(n&&!d&&r.loopPreventsSliding)return!1;a.loopFix({direction:"next"}),a._clientLeft=a.wrapperEl.clientLeft}return r.rewind&&a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const a=this,{params:i,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=a;if(!o)return a;const c=a.virtual&&i.virtual.enabled;if(i.loop){if(d&&!c&&i.loopPreventsSliding)return!1;a.loopFix({direction:"prev"}),a._clientLeft=a.wrapperEl.clientLeft}function p('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return e<0?-Math.floor(Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')):Math.floor('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}const u=p(l?a.translate:-a.translate),m=r.map((e=>p('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));let h=r[m.indexOf(u)-1];if(void 0===h&&i.cssMode){let e;r.forEach(((t,s)=>{u>=t&&(e=s)})),void 0!==e&&(h=r[e>0?e-1:e])}let f=0;if(void 0!==h&&(f=n.indexOf(h),f<0&&(f=a.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(f=f-a.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),i.rewind&&a.isBeginning){const i=a.params.virtual&&a.params.virtual.enabled&&a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(i,e,t,s)}return a.slideTo(f,e,t,s)},slideReset:function(e,t,s){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e,t,s,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===a&&(a=.5);const i=this;let r=i.activeIndex;const n=Math.min(i.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/i.params.slidesPerGroup),o=i.rtlTranslate?i.translate:-i.translate;if(o>=i.snapGrid[l]){const e=i.snapGrid[l];o-e>(i.snapGrid[l+1]-e)*a&&(r+=i.params.slidesPerGroup)}else{const e=i.snapGrid[l-1];o-e<=(i.snapGrid[l]-e)*a&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,r=e.clickedIndex;const l=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-a/2||r>e.slides.length-e.loopedSlides+a/2?(e.loopFix(),r=e.getSlideIndex(h(s,`${l}[data-swiper-slide-index="${i}"]`)[0]),n((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-a?(e.loopFix(),r=e.getSlideIndex(h(s,`${l}[data-swiper-slide-index="${i}"]`)[0]),n((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var G={loopCreate:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,{params:s,slidesEl:a}=t;if(!s.loop||t.virtual&&t.params.virtual.enabled)return;h(a,`.${s.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:s.centeredSlides?void 0:"next"})},loopFix:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{slideRealIndex:t,slideTo:s=!0,direction:a,setTranslate:i,activeSlideIndex:r,byController:n,byMousewheel:l}=void 0===e?{}:e;const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:d,allowSlidePrev:c,allowSlideNext:p,slidesEl:u,params:m}=o;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&&m.virtual.enabled)return s&&(m.centeredSlides||0!==o.snapIndex?m.centeredSlides&&o.snapIndex<m.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&&o.slideTo(o.virtual.slidesBefore,0,!1,!0):o.slideTo(o.virtual.slides.length,0,!1,!0)),o.allowSlidePrev=c,o.allowSlideNext=p,void o.emit("loopFix");const h="auto"===m.slidesPerView?o.slidesPerViewDynamic():Math.ceil(parseFloat(m.slidesPerView,10));let f=m.loopedSlides||h;f%m.slidesPerGroup!=0&&(f+=m.slidesPerGroup-f%m.slidesPerGroup),o.loopedSlides=f;const g=[],v=[];let w=o.activeIndex;void 0===r?r=o.getSlideIndex(o.slides.filter((e=>e.classList.contains(m.slideActiveClass)))[0]):w=r;const b="next"===a||!a,y="prev"===a||!a;let E=0,x=0;if(r<f){E=Math.max(f-r,m.slidesPerGroup);for(let e=0;e<f-r;e+=1){const t=e-Math.floor(e/d.length)*d.length;g.push(d.length-t-1)}}else if(r>o.slides.length-2*f){x=Math.max(r-(o.slides.length-2*f),m.slidesPerGroup);for(let e=0;e<x;e+=1){const t=e-Math.floor(e/d.length)*d.length;v.push(t)}}if(y&&g.forEach((e=>{o.slides[e].swiperLoopMoveDOM=!0,u.prepend(o.slides[e]),o.slides[e].swiperLoopMoveDOM=!1})),b&&v.forEach((e=>{o.slides[e].swiperLoopMoveDOM=!0,u.append(o.slides[e]),o.slides[e].swiperLoopMoveDOM=!1})),o.recalcSlides(),"auto"===m.slidesPerView&&o.updateSlides(),m.watchSlidesProgress&&o.updateSlidesOffset(),s)if(g.length>0&&y)if(void 0===t){const e=o.slidesGrid[w],t=o.slidesGrid[w+E]-e;l?o.setTranslate(o.translate-t):(o.slideTo(w+E,0,!1,!0),i&&(o.touches[o.isHorizontal()?"startX":"startY"]+=t,o.touchEventsData.currentTranslate=o.translate))}else i&&(o.slideToLoop(t,0,!1,!0),o.touchEventsData.currentTranslate=o.translate);else if(v.length>0&&b)if(void 0===t){const e=o.slidesGrid[w],t=o.slidesGrid[w-x]-e;l?o.setTranslate(o.translate-t):(o.slideTo(w-x,0,!1,!0),i&&(o.touches[o.isHorizontal()?"startX":"startY"]+=t,o.touchEventsData.currentTranslate=o.translate))}else o.slideToLoop(t,0,!1,!0);if(o.allowSlidePrev=c,o.allowSlideNext=p,o.controller&&o.controller.control&&!n){const e={slideRealIndex:t,direction:a,setTranslate:i,activeSlideIndex:r,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&s})})):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...e,slideTo:o.controller.control.params.slidesPerView===m.slidesPerView&&s})}o.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const a=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;a[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),a.forEach((e=>{s.append('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function H('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,s=a(),i=r(),n=t.touchEventsData;n.evCache.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');const{params:o,touches:d,enabled:c}=t;if(!c)return;if(!o.simulateTouch&&"mouse"===e.pointerType)return;if(t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let p=e;p.originalEvent&&(p=p.originalEvent);let u=p.target;if("wrapper"===o.touchEventsTarget&&!t.wrapperEl.contains(u))return;if("which"in p&&3===p.which)return;if("button"in p&&p.button>0)return;if(n.isTouched&&n.isMoved)return;const m=!!o.noSwipingClass&&""!==o.noSwipingClass,h=e.composedPath?e.composedPath():e.path;m&&p.target&&p.target.shadowRoot&&h&&(u=h[0]);const f=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,g=!(!p.target||!p.target.shadowRoot);if(o.noSwiping&&(g?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===a()||s===r())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(f,u):u.closest(f)))return void(t.allowClick=!0);if(o.swipeHandler&&!u.closest(o.swipeHandler))return;d.currentX=p.pageX,d.currentY=p.pageY;const v=d.currentX,w=d.currentY,b=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,y=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(b&&(v<=y||v>=i.innerWidth-y)){if("prevent"!==b)return;e.preventDefault()}Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),d.startX=v,d.startY=w,n.touchStartTime=l(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(n.allowThresholdMove=!1);let E=!0;u.matches(n.focusableElements)&&(E=!1,"SELECT"===u.nodeName&&(n.isTouched=!1)),s.activeElement&&s.activeElement.matches(n.focusableElements)&&s.activeElement!==u&&s.activeElement.blur();const x=E&&t.allowTouchMove&&o.touchStartPreventDefault;!o.touchStartForcePreventDefault&&!x||u.isContentEditable||p.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",p)}function X('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=a(),s=this,i=s.touchEventsData,{params:r,touches:n,rtlTranslate:o,enabled:d}=s;if(!d)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",c));const p=i.evCache.findIndex((e=>e.pointerId===c.pointerId));p>=0&&(i.evCache[p]=c);const u=i.evCache.length>1?i.evCache[0]:c,m=u.pageX,h=u.pageY;if(c.preventedByNestedSwiper)return n.startX=m,void(n.startY=h);if(!s.allowTouchMove)return c.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(n,{startX:m,startY:h,prevX:s.touches.currentX,prevY:s.touches.currentY,currentX:m,currentY:h}),i.touchStartTime=l()));if(r.touchReleaseOnEdges&&!r.loop)if(s.isVertical()){if(h<n.startY&&s.translate<=s.maxTranslate()||h>n.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(m<n.startX&&s.translate<=s.maxTranslate()||m>n.startX&&s.translate>=s.minTranslate())return;if(t.activeElement&&c.target===t.activeElement&&c.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);if(i.allowTouchCallbacks&&s.emit("touchMove",c),c.targetTouches&&c.targetTouches.length>1)return;n.currentX=m,n.currentY=h;const f=n.currentX-n.startX,g=n.currentY-n.startY;if(s.params.threshold&&Math.sqrt(f**2+g**2)<s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&&n.currentY===n.startY||s.isVertical()&&n.currentX===n.startX?i.isScrolling=!1:f*f+g*g>=25&&(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,i.isScrolling=s.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",c),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling||s.zoom&&s.params.zoom&&s.params.zoom.enabled&&i.evCache.length>1)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!r.cssMode&&c.cancelable&&c.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&c.stopPropagation();let v=s.isHorizontal()?f:g,w=s.isHorizontal()?n.currentX-n.previousX:n.currentY-n.previousY;r.oneWayMovement&&(v=Math.abs(v)*(o?1:-1),w=Math.abs(w)*(o?1:-1)),n.diff=v,v*=r.touchRatio,o&&(v=-v,w=-w);const b=s.touchesDirection;s.swipeDirection=v>0?"prev":"next",s.touchesDirection=w>0?"prev":"next";const y=s.params.loop&&!r.cssMode;if(!i.isMoved){if(y&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});s.wrapperEl.dispatchEvent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}i.allowMomentumBounce=!1,!r.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",c)}let E;i.isMoved&&b!==s.touchesDirection&&y&&Math.abs(v)>=1&&(s.loopFix({direction:s.swipeDirection,setTranslate:!0}),E=!0),s.emit("sliderMove",c),i.isMoved=!0,i.currentTranslate=v+i.startTranslate;let x=!0,S=r.resistanceRatio;if(r.touchReleaseOnEdges&&(S=0),v>0?(y&&!E&&i.currentTranslate>(r.centeredSlides?s.minTranslate()-s.size/2:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(x=!1,r.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+v)**S))):v<0&&(y&&!E&&i.currentTranslate<(r.centeredSlides?s.maxTranslate()+s.size/2:s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===r.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(r.slidesPerView,10)))}),i.currentTranslate<s.maxTranslate()&&(x=!1,r.resistance&&(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-i.startTranslate-v)**S))),x&&(c.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),r.threshold>0){if(!(Math.abs(v)>r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=s.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&s.freeMode||r.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function Y('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,s=t.touchEventsData,a=s.evCache.findIndex((t=>t.pointerId===e.pointerId));if(a>=0&&s.evCache.splice(a,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(e.type)){if(!(["pointercancel","contextmenu"].includes(e.type)&&(t.browser.isSafari||t.browser.isWebView)))return}const{params:i,touches:r,rtlTranslate:o,slidesGrid:d,enabled:c}=t;if(!c)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let p=e;if(p.originalEvent&&(p=p.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",p),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&i.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);i.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=l(),m=u-s.touchStartTime;if(t.allowClick){const e=p.path||p.composedPath&&p.composedPath();t.updateClickedSlide(e&&e[0]||p.target),t.emit("tap click",p),m<300&&u-s.lastClickTime<300&&t.emit("doubleTap doubleClick",p)}if(s.lastClickTime=l(),n((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===r.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let h;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,h=i.followFinger?o?t.translate:-t.translate:-s.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});let f=0,g=t.slidesSizesGrid[0];for(let e=0;e<d.length;e+=e<i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==d[e+t]?h>=d[e]&&h<d[e+t]&&(f=e,g=d[e+t]-d[e]):h>=d[e]&&(f=e,g=d[d.length-1]-d[d.length-2])}let v=null,w=null;i.rewind&&(t.isBeginning?w=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const b=(h-d[f])/g,y=f<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(m>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?v:f+y):t.slideTo(f)),"prev"===t.swipeDirection&&(b>1-i.longSwipesRatio?t.slideTo(f+y):null!==w&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(w):t.slideTo(f))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(p.target===t.navigation.nextEl||p.target===t.navigation.prevEl)?p.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==v?v:f+y),"prev"===t.swipeDirection&&t.slideTo(null!==w?w:f))}}function N(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:r}=e,n=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function B('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function R(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();i=0===r?0:(e.translate-e.minTranslate())/r,i!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function q('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;z(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}let V=!1;function F(){}const _=(e,t)=>{const s=a(),{params:i,el:r,wrapperEl:n,device:l}=e,o=!!i.nested,d="on"===t?"addEventListener":"removeEventListener",c=t;r[d]("pointerdown",e.onTouchStart,{passive:!1}),s[d]("pointermove",e.onTouchMove,{passive:!1,capture:o}),s[d]("pointerup",e.onTouchEnd,{passive:!0}),s[d]("pointercancel",e.onTouchEnd,{passive:!0}),s[d]("pointerout",e.onTouchEnd,{passive:!0}),s[d]("pointerleave",e.onTouchEnd,{passive:!0}),s[d]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&r[d]("click",e.onClick,!0),i.cssMode&&n[d]("scroll",e.onScroll),i.updateOnWindowResize?e[c](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",N,!0):e[c]("observerUpdate",N,!0),r[d]("load",e.onLoad,{capture:!0})};const j=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var W={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input,select,option,textarea,button,video,label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function U(e,t){return function(s){void 0===s&&(s={});const a=Object.keys(s)[0],i=s[a];"object"==typeof i&&null!==i?(["navigation","pagination","scrollbar"].indexOf(a)>=0&&!0===e[a]&&(e[a]={auto:!0}),a in e&&"enabled"in i?(!0===e[a]&&(e[a]={enabled:!0}),"object"!=typeof e[a]||"enabled"in e[a]||(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),c(t,s)):c(t,s)):c(t,s)}}const K={eventsEmitter:L,update:I,translate:k,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;a.cssMode||(a.autoHeight&&s.updateAutoHeight(),O({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;s.animating=!1,a.cssMode||(s.setTransition(0),O({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:D,loop:G,grabCursor:{setGrabCursor:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,t=a(),{params:s}=e;e.onTouchStart=H.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.onTouchMove=X.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.onTouchEnd=Y.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s.cssMode&&(e.onScroll=R.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')),e.onClick=B.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.onLoad=q.bind('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),V||(t.addEventListener("touchstart",F),V=!0),_(e,"on")},detachEvents:function(){_(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:a,el:i}=e,r=a.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const n=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!n||e.currentBreakpoint===n)return;const l=(n in r?r[n]:void 0)||e.originalParams,o=j(e,a),d=j(e,l),p=a.enabled;o&&!d?(i.classList.remove(`${a.containerModifierClass}grid`,`${a.containerModifierClass}grid-column`),e.emitContainerClasses()):!o&&d&&(i.classList.add(`${a.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===a.grid.fill)&&i.classList.add(`${a.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===l[t])return;const s=a[t]&&a[t].enabled,i=l[t]&&l[t].enabled;s&&!i&&e[t].disable(),!s&&i&&e[t].enable()}));const u=l.direction&&l.direction!==a.direction,m=a.loop&&(l.slidesPerView!==a.slidesPerView||u);u&&s&&e.changeDirection(),c(e.params,l);const h=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!h?e.disable():!p&&h&&e.enable(),e.currentBreakpoint=n,e.emit("_beforeBreakpoint",l),m&&s&&(e.loopDestroy(),e.loopCreate(t),e.updateSlides()),e.emit("breakpoint",l)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let a=!1;const i=r(),n="window"===t?i.innerHeight:s.clientHeight,l=Object.keys('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e').map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}}));l.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<l.length;e+=1){const{point:r,value:n}=l[e];"window"===t?i.matchMedia(`(min-width: ${n}px)`).matches&&(a=r):n<=s.clientWidth&&(a=r)}return a||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:a}=s;if(a){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*a;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:a,el:i,device:r}=e,n=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e').forEach((a=>{e[a]&&s.push(t+a)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:a},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},Z={};class Q{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=c({},t),e&&!t.el&&(t.el=e);const n=a();if(t.el&&"string"==typeof t.el&&n.querySelectorAll(t.el).length>1){const e=[];return n.querySelectorAll(t.el).forEach((s=>{const a=c({},t,{el:s});e.push(new Q(a))})),e}const l=this;l.__swiper__=!0,l.support=M(),l.device=C({userAgent:t.userAgent}),l.browser=P(),l.eventsListeners={},l.eventsAnyListeners=[],l.modules=[...l.__modules__],t.modules&&Array.isArray(t.modules)&&l.modules.push(...t.modules);const o={};l.modules.forEach((e=>{e({params:t,swiper:l,extendParams:U(t,o),on:l.on.bind(l),once:l.once.bind(l),off:l.off.bind(l),emit:l.emit.bind(l)})}));const d=c({},W,o);return l.params=c({},d,Z,t),l.originalParams=c({},l.params),l.passedParams=c({},t),l.params&&l.params.on&&Object.keys(l.params.on).forEach((e=>{l.on(e,l.params.on[e])})),l.params&&l.params.onAny&&l.onAny(l.params.onAny),Object.assign(l,{enabled:l.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===l.params.direction,isVertical:()=>"vertical"===l.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:l.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.emit("_swiper"),l.params.init&&l.init(),l}getSlideIndex('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{slidesEl:t,params:s}=this,a=w(h(t,`.${s.slideClass}, swiper-slide`)[0]);return w('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')-a}getSlideIndexByData('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=h(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if(s.centeredSlides){let e,t=a[l]?a[l].swiperSlideSize:0;for(let s=l+1;s<a.length;s+=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0));for(let s=l-1;s>=0;s-=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e<a.length;e+=1){(t?i[e]+r[e]-i[l]<n:i[e]-i[l]<n)&&(o+=1)}else for(let e=l-1;e>=0;e-=1){i[l]-i[e]<n&&(o+=1)}return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function a(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(s.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&z(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)a(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||a()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${a}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&"SWIPER-CONTAINER"===s.parentNode.host.nodeName&&(t.isElement=!0);const a=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=>{if(s&&s.shadowRoot&&s.shadowRoot.querySelector){return s.shadowRoot.querySelector(a())}return h(s,a())[0]})();return!i&&t.params.createElements&&(i=f("div",t.params.wrapperClass),s.append(i),h(s,`.${t.params.slideClass}`).forEach((e=>{i.append('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}))),Object.assign(t,{el:s,wrapperEl:i,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:i,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===v(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===v(s,"direction")),wrongRTL:"-webkit-box"===v(i,"display")}),!0}init('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this;if(t.initialized)return t;if(!1===t.mount('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach((e=>{e.complete?z(t,e):e.addEventListener("load",(e=>{z(t,e.target)}))})),$(t),t.initialized=!0,$(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:a,el:i,wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),i.removeAttribute("style"),r.removeAttribute("style"),n&&n.length&&n.forEach((e=>{e.classList.remove(a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')})),!1!==e&&(s.el.swiper=null,function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){}try{delete t[e]}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){}}))}(s)),s.destroyed=!0),null}static extendDefaults('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){c(Z,e)}static get extendedDefaults(){return Z}static get defaults(){return W}static installModule('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){Q.prototype.__modules__||(Q.prototype.__modules__=[]);const t=Q.prototype.__modules__;"function"==typeof e&&t.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')<0&&t.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}static use('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')?(e.forEach((e=>Q.installModule('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))),Q):(Q.installModule('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),Q)}}function J(e,t,s,a){return e.params.createElements&&Object.keys(a).forEach((i=>{if(!s[i]&&!0===s.auto){let r=h(e.el,`.${a[i]}`)[0];r||(r=f("div",a[i]),r.className=a[i],e.el.append(r)),s[i]=r,t[i]=r}})),s}function ee('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function te('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,{params:s,slidesEl:a}=t;s.loop&&t.loopDestroy();const i=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,a.append(t.children[0]),t.innerHTML=""}else a.append('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')};if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&i(e[t]);else i('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');t.recalcSlides(),s.loop&&t.loopCreate(),s.observer&&!t.isElement||t.update()}function se('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,{params:s,activeIndex:a,slidesEl:i}=t;s.loop&&t.loopDestroy();let r=a+1;const n=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,i.prepend(t.children[0]),t.innerHTML=""}else i.prepend('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')};if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&n(e[t]);r=a+e.length}else n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');t.recalcSlides(),s.loop&&t.loopCreate(),s.observer&&!t.isElement||t.update(),t.slideTo(r,0,!1)}function ae(e,t){const s=this,{params:a,activeIndex:i,slidesEl:r}=s;let n=i;a.loop&&(n-=s.loopedSlides,s.loopDestroy(),s.recalcSlides());const l=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=l)return void s.appendSlide(t);let o=n>e?n+1:n;const d=[];for(let t=l-1;t>=e;t-=1){const e=s.slides[t];e.remove(),d.unshift('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&r.append(t[e]);o=n>e?n+t.length:n}else r.append(t);for(let e=0;e<d.length;e+=1)r.append(d[e]);s.recalcSlides(),a.loop&&s.loopCreate(),a.observer&&!s.isElement||s.update(),a.loop?s.slideTo(o+s.loopedSlides,0,!1):s.slideTo(o,0,!1)}function ie('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=this,{params:s,activeIndex:a}=t;let i=a;s.loop&&(i-=t.loopedSlides,t.loopDestroy());let r,n=i;if("object"==typeof e&&"length"in e){for(let s=0;s<e.length;s+=1)r=e[s],t.slides[r]&&t.slides[r].remove(),r<n&&(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&&t.slides[r].remove(),r<n&&(n-=1),n=Math.max(n,0);t.recalcSlides(),s.loop&&t.loopCreate(),s.observer&&!t.isElement||t.update(),s.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)}function re(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}function ne('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{effect:t,swiper:s,on:a,setTranslate:i,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;a("beforeInit",(()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),a("setTranslate",(()=>{s.params.effect===t&&i()})),a("setTransition",((e,a)=>{s.params.effect===t&&r(a)})),a("transitionEnd",(()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top,.swiper-slide-shadow-right,.swiper-slide-shadow-bottom,.swiper-slide-shadow-left").forEach((e=>e.remove()))})),o()}})),a("virtualUpdate",(()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame((()=>{c&&s.slides&&s.slides.length&&(i(),c=!1)})))}))}function le(e,t){const s=m(t);return s!==t&&(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}function oe('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,duration:s,transformElements:a,allSlides:i}=e;const{activeIndex:r}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=i?a:a.filter((e=>{const s=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter((t=>t.shadowRoot&&t.shadowRoot===e.parentNode))[0];return e.parentElement})('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'):e;return t.getSlideIndex(s)===r})),e.forEach((e=>{y(e,(()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}))}))}}function de(e,t,s){const a=`swiper-slide-shadow${s?`-${s}`:""}${e?` swiper-slide-shadow-${e}`:""}`,i=m(t);let r=i.querySelector(`.${a.split(" ").join(".")}`);return r||(r=f("div",a.split(" ")),i.append(r)),r}Object.keys(K).forEach((e=>{Object.keys(K[e]).forEach((t=>{Q.prototype[t]=K[e][t]}))})),Q.use([function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,on:s,emit:a}=e;const i=r();let n=null,l=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(a("beforeResize"),a("resize"))},d=()=>{t&&!t.destroyed&&t.initialized&&a("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(n=new ResizeObserver((e=>{l=i.requestAnimationFrame((()=>{const{width:s,height:a}=t;let i=s,r=a;e.forEach((e=>{let{contentBoxSize:s,contentRect:a,target:n}=e;n&&n!==t.el||(i=a?a.width:(s[0]||s).inlineSize,r=a?a.height:(s[0]||s).blockSize)})),i===s&&r===a||o()}))})),n.observe(t.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",d))})),s("destroy",(()=>{l&&i.cancelAnimationFrame(l),n&&n.unobserve&&t.el&&(n.unobserve(t.el),n=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",d)}))},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=[],l=r(),o=function(e,s){void 0===s&&(s={});const a=new(l.MutationObserver||l.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const s=function(){i("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(s):l.setTimeout(s,0)}));a.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:void 0===s.childList||s.childList,characterData:void 0===s.characterData||s.characterData}),n.push(a)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=b(t.hostEl);for(let t=0;t<e.length;t+=1)o(e[t])}o(t.hostEl,{childList:t.params.observeSlideChildren}),o(t.wrapperEl,{attributes:!1})}})),a("destroy",(()=>{n.forEach((e=>{e.disconnect()})),n.splice(0,n.length)}))}]);const ce=[function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let t,{swiper:s,extendParams:i,on:r,emit:n}=e;i({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const l=a();s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const o=l.createElement("div");function d(e,t){const a=s.params.virtual;if(a.cache&&s.virtual.cache[t])return s.virtual.cache[t];let i;return a.renderSlide?(i=a.renderSlide.call(s,e,t),"string"==typeof i&&(o.innerHTML=i,i=o.children[0])):i=s.isElement?f("swiper-slide"):f("div",s.params.slideClass),i.setAttribute("data-swiper-slide-index",t),a.renderSlide||(i.innerHTML=e),a.cache&&(s.virtual.cache[t]=i),i}function c('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{slidesPerView:t,slidesPerGroup:a,centeredSlides:i,loop:r}=s.params,{addSlidesBefore:l,addSlidesAfter:o}=s.params.virtual,{from:c,to:p,slides:u,slidesGrid:m,offset:f}=s.virtual;s.params.cssMode||s.updateActiveIndex();const g=s.activeIndex||0;let v,w,b;v=s.rtlTranslate?"right":s.isHorizontal()?"left":"top",i?(w=Math.floor(t/2)+a+o,b=Math.floor(t/2)+a+l):(w=t+(a-1)+o,b=(r?t:a)+l);let y=g-b,E=g+w;r||(y=Math.max(y,0),E=Math.min(E,u.length-1));let x=(s.slidesGrid[y]||0)-(s.slidesGrid[0]||0);function S(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),n("virtualUpdate")}if(r&&g>=b?(y-=b,i||(x+=s.slidesGrid[0])):r&&g<b&&(y=-b,i&&(x+=s.slidesGrid[0])),Object.assign(s.virtual,{from:y,to:E,offset:x,slidesGrid:s.slidesGrid,slidesBefore:b,slidesAfter:w}),c===y&&p===E&&!e)return s.slidesGrid!==m&&x!==f&&s.slides.forEach((e=>{e.style[v]=x-Math.abs(s.cssOverflowAdjustment())+"px"})),s.updateProgress(),void n("virtualUpdate");if(s.params.virtual.renderExternal)return s.params.virtual.renderExternal.call(s,{offset:x,from:y,to:E,slides:function(){const e=[];for(let t=y;t<=E;t+=1)e.push(u[t]);return e}()}),void(s.params.virtual.renderExternalUpdate?S():n("virtualUpdate"));const T=[],M=[],C=e=>{let t=e;return e<0?t=u.length+e:t>=u.length&&(t-=u.length),t};if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')s.slidesEl.querySelectorAll(`.${s.params.slideClass}, swiper-slide`).forEach((e=>{e.remove()}));else for(let e=c;e<=p;e+=1)if(e<y||e>E){const t=C('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');s.slidesEl.querySelectorAll(`.${s.params.slideClass}[data-swiper-slide-index="${t}"], swiper-slide[data-swiper-slide-index="${t}"]`).forEach((e=>{e.remove()}))}const P=r?-u.length:0,L=r?2*u.length:u.length;for(let t=P;t<L;t+=1)if(t>=y&&t<=E){const s=C(t);void 0===p||e?M.push(s):(t>p&&M.push(s),t<c&&T.push(s))}if(M.forEach((e=>{s.slidesEl.append(d(u[e],e))})),r)for(let e=T.length-1;e>=0;e-=1){const t=T[e];s.slidesEl.prepend(d(u[t],t))}else T.sort(((e,t)=>t-e)),T.forEach((e=>{s.slidesEl.prepend(d(u[e],e))}));h(s.slidesEl,".swiper-slide,swiper-slide").forEach((e=>{e.style[v]=x-Math.abs(s.cssOverflowAdjustment())+"px"})),S()}r("beforeInit",(()=>{if(!s.params.virtual.enabled)return;let e;if(void 0===s.passedParams.virtual.slides){const t=[...s.slidesEl.children].filter((e=>e.matches(`.${s.params.slideClass}, swiper-slide`)));t&&t.length&&(s.virtual.slides=[...t],e=!0,t.forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t),s.virtual.cache[t]=e,e.remove()})))}e||(s.virtual.slides=s.params.virtual.slides),s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,s.params.initialSlide||c()})),r("setTranslate",(()=>{s.params.virtual.enabled&&(s.params.cssMode&&!s._immediateVirtual?(clearTimeout(t),t=setTimeout((()=>{c()}),100)):c())})),r("init update resize",(()=>{s.params.virtual.enabled&&s.params.cssMode&&p(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)})),Object.assign(s.virtual,{appendSlide:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&s.virtual.slides.push(e[t]);else s.virtual.slides.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');c(!0)},prependSlide:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=s.activeIndex;let a=t+1,i=1;if(Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')){for(let t=0;t<e.length;t+=1)e[t]&&s.virtual.slides.unshift(e[t]);a=t+e.length,i=e.length}else s.virtual.slides.unshift('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');if(s.params.virtual.cache){const e=s.virtual.cache,t={};Object.keys('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e').forEach((s=>{const a=e[s],r=a.getAttribute("data-swiper-slide-index");r&&a.setAttribute("data-swiper-slide-index",parseInt(r,10)+i),t[parseInt(s,10)+i]=a})),s.virtual.cache=t}c(!0),s.slideTo(a,0)},removeSlide:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(null==e)return;let t=s.activeIndex;if(Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))for(let a=e.length-1;a>=0;a-=1)s.virtual.slides.splice(e[a],1),s.params.virtual.cache&&delete s.virtual.cache[e[a]],e[a]<t&&(t-=1),t=Math.max(t,0);else s.virtual.slides.splice(e,1),s.params.virtual.cache&&delete s.virtual.cache[e],e<t&&(t-=1),t=Math.max(t,0);c(!0),s.slideTo(t,0)},removeAllSlides:function(){s.virtual.slides=[],s.params.virtual.cache&&(s.virtual.cache={}),c(!0),s.slideTo(0,0)},update:c})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:i,emit:n}=e;const l=a(),o=r();function d('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(!t.enabled)return;const{rtlTranslate:s}=t;let a=e;a.originalEvent&&(a=a.originalEvent);const i=a.keyCode||a.charCode,r=t.params.keyboard.pageUpDown,d=r&&33===i,c=r&&34===i,p=37===i,u=39===i,m=38===i,h=40===i;if(!t.allowSlideNext&&(t.isHorizontal()&&u||t.isVertical()&&h||c))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&p||t.isVertical()&&m||d))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||l.activeElement&&l.activeElement.nodeName&&("input"===l.activeElement.nodeName.toLowerCase()||"textarea"===l.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(d||c||p||u||m||h)){let e=!1;if(b(t.el,`.${t.params.slideClass}, swiper-slide`).length>0&&0===b(t.el,`.${t.params.slideActiveClass}`).length)return;const a=t.el,i=a.clientWidth,r=a.clientHeight,n=o.innerWidth,l=o.innerHeight,d=g(a);s&&(d.left-=a.scrollLeft);const c=[[d.left,d.top],[d.left+i,d.top],[d.left,d.top+r],[d.left+i,d.top+r]];for(let t=0;t<c.length;t+=1){const s=c[t];if(s[0]>=0&&s[0]<=n&&s[1]>=0&&s[1]<=l){if(0===s[0]&&0===s[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((d||c||p||u)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((c||u)&&!s||(d||p)&&s)&&t.slideNext(),((d||p)&&!s||(c||u)&&s)&&t.slidePrev()):((d||c||m||h)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(c||h)&&t.slideNext(),(d||m)&&t.slidePrev()),n("keyPress",i)}}function c(){t.keyboard.enabled||(l.addEventListener("keydown",d),t.keyboard.enabled=!0)}function p(){t.keyboard.enabled&&(l.removeEventListener("keydown",d),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},s({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),i("init",(()=>{t.params.keyboard.enabled&&c()})),i("destroy",(()=>{t.keyboard.enabled&&p()})),Object.assign(t.keyboard,{enable:c,disable:p})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a,emit:i}=e;const o=r();let d;s({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let c,p=l();const u=[];function m(){t.enabled&&(t.mouseEntered=!0)}function h(){t.enabled&&(t.mouseEntered=!1)}function f('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&l()-p<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&l()-p<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),p=(new o.Date).getTime(),!1)))}function g('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let s=e,a=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const r=t.params.mousewheel;t.params.cssMode&&s.preventDefault();let o=t.el;"container"!==t.params.mousewheel.eventsTarget&&(o=document.querySelector(t.params.mousewheel.eventsTarget));const p=o&&o.contains(s.target);if(!t.mouseEntered&&!p&&!r.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let m=0;const h=t.rtlTranslate?-1:1,g=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let t=0,s=0,a=0,i=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=i,i=0),(a||i)&&e.deltaMode&&(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&&!t&&(t=a<1?-1:1),i&&!s&&(s=i<1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(r.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;m=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;m=-g.pixelY}else m=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===m)return!0;r.invert&&(m=-m);let v=t.getTranslate()+m*r.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),a=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),a&&t.params.nested&&s.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:l(),delta:Math.abs(m),direction:Math.sign(m)},a=c&&e.time<c.time+500&&e.delta<=c.delta&&e.direction===c.direction;if(!a){c=void 0;let l=t.getTranslate()+m*r.sensitivity;const o=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!o&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(d),d=void 0,u.length>=15&&u.shift();const s=u.length?u[u.length-1]:void 0,a=u[0];if(u.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s&&(e.delta>s.delta||e.direction!==s.direction))u.splice(0);else if(u.length>=15&&e.time-a.time<500&&a.delta-e.delta>=1&&e.delta<=6){const s=m>0?.8:.2;c=e,u.splice(0),d=n((()=>{t.slideToClosest(t.params.speed,!0,void 0,s)}),0)}d||(d=n((()=>{c=e,u.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(a||i("scroll",s),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),r.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const s={time:l(),delta:Math.abs(m),direction:Math.sign(m),raw:e};u.length>=2&&u.shift();const a=u.length?u[u.length-1]:void 0;if(u.push(s),a?(s.direction!==a.direction||s.delta>a.delta||s.time>a.time+150)&&f(s):f(s),function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&s.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function v('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let s=t.el;"container"!==t.params.mousewheel.eventsTarget&&(s=document.querySelector(t.params.mousewheel.eventsTarget)),s[e]("mouseenter",m),s[e]("mouseleave",h),s[e]("wheel",g)}function w(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",g),!0):!t.mousewheel.enabled&&(v("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,g),!0):!!t.mousewheel.enabled&&(v("removeEventListener"),t.mousewheel.enabled=!1,!0)}a("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&w()})),a("destroy",(()=>{t.params.cssMode&&w(),t.mousewheel.enabled&&b()})),Object.assign(t.mousewheel,{enable:w,disable:b})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a,emit:i}=e;s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const r=e=>(Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')?e:[e]).filter((e=>!!e));function n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')]),t.params.uniqueNavElements&&"string"==typeof e&&s.length>1&&1===t.el.querySelectorAll('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e').length&&(s=t.el.querySelector('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))),e&&!s?e:s)}function l(e,s){const a=t.params.navigation;(e=r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e&&(e.classList[s?"add":"remove"](...a.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](a.lockClass))}))}function o(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return l(s,!1),void l(e,!1);l(s,t.isBeginning&&!t.params.rewind),l(e,t.isEnd&&!t.params.rewind)}function d('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function c('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function p(){const e=t.params.navigation;if(t.params.navigation=J(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=n(e.nextEl),a=n(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:a}),s=r(s),a=r(a);const i=(s,a)=>{s&&s.addEventListener("click","next"===a?c:d),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach((e=>i(e,"next"))),a.forEach((e=>i(e,"prev")))}function u(){let{nextEl:e,prevEl:s}=t.navigation;e=r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s=r(s);const a=(e,s)=>{e.removeEventListener("click","next"===s?c:d),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>a(e,"next"))),s.forEach((e=>a(e,"prev")))}a("init",(()=>{!1===t.params.navigation.enabled?m():(p(),o())})),a("toEdge fromEdge lock unlock",(()=>{o()})),a("destroy",(()=>{u()})),a("enable disable",(()=>{let{nextEl:e,prevEl:s}=t.navigation;e=r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s=r(s),[...e,...s].filter((e=>!!e)).forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.navigation.lockClass)))})),a("click",((e,s)=>{let{nextEl:a,prevEl:n}=t.navigation;a=r(a),n=r(n);const l=s.target;if(t.params.navigation.hideOnClick&&!n.includes(l)&&!a.includes(l)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===l||t.pagination.el.contains(l)))return;let e;a.length?e=a[0].classList.contains(t.params.navigation.hiddenClass):n.length&&(e=n[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...a,...n].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const m=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),p(),o()},disable:m,update:o,init:p,destroy:u})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a,emit:i}=e;const r="swiper-pagination";let n;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let l=0;const o=e=>(Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')?e:[e]).filter((e=>!!e));function d(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function c(e,s){const{bulletActiveClass:a}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${a}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${a}-${s}-${s}`))}function p('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=e.target.closest(ee(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const a=w(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===a)return;const e=t.realIndex,s=t.getSlideIndexByData(a),i=t.getSlideIndexByData(t.realIndex);if(s>t.slides.length-t.loopedSlides){const a=t.activeIndex;t.loopFix({direction:s>i?"next":"prev",activeSlideIndex:s,slideTo:!1});a===t.activeIndex&&t.slideToLoop(e,0,!1,!0)}t.slideToLoop(a)}else t.slideTo(a)}function u(){const e=t.rtl,s=t.params.pagination;if(d())return;let a,r,p=t.pagination.el;p=o(p);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,m=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,a=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(a=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,a=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let o,d,u;if(s.dynamicBullets&&(n=E(i[0],t.isHorizontal()?"width":"height",!0),p.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=n*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets>1&&void 0!==r&&(l+=a-(r||0),l>s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l<0&&(l=0)),o=Math.max(a-l,0),d=o+(Math.min(i.length,s.dynamicMainBullets)-1),u=(d+o)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),p.length>1)i.forEach((e=>{const i=w('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e');i===a?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(i>=o&&i<=d&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),i===o&&c(e,"prev"),i===d&&c(e,"next"))}));else{const e=i[a];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===a?"bullet-active":"bullet")})),s.dynamicBullets){const e=i[o],t=i[d];for(let e=o;e<=d;e+=1)i[e]&&i[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),r=(n*a-n)/2-u*n,l=e?"right":"left";i.forEach((e=>{e.style[t.isHorizontal()?l:"top"]=`${r}px`}))}}p.forEach(((e,r)=>{if("fraction"===s.type&&(e.querySelectorAll(ee(s.currentClass)).forEach((e=>{e.textContent=s.formatFractionCurrent(a+1)})),e.querySelectorAll(ee(s.totalClass)).forEach((e=>{e.textContent=s.formatFractionTotal(m)}))),"progressbar"===s.type){let i;i=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(a+1)/m;let n=1,l=1;"horizontal"===i?n=r:l=r,e.querySelectorAll(ee(s.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${l})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&&s.renderCustom?(e.innerHTML=s.renderCustom(t,a+1,m),0===r&&i("paginationRender",e)):(0===r&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function m(){const e=t.params.pagination;if(d())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let a=t.pagination.el;a=o(a);let r="";if("bullets"===e.type){let a=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&a>s&&(a=s);for(let s=0;s<a;s+=1)e.renderBullet?r+=e.renderBullet.call(t,s,e.bulletClass):r+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],a.forEach((s=>{"custom"!==e.type&&(s.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll(ee(e.bulletClass)))})),"custom"!==e.type&&i("paginationRender",a[0])}function h(){t.params.pagination=J(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.filter((e=>b(e,".swiper")[0]===t.el))[0])),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=o(s),s.forEach((s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",p),t.enabled||s.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(d())return;let s=t.pagination.el;s&&(s=o(s),s.forEach((s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",p))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}a("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=o(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),a("init",(()=>{!1===t.params.pagination.enabled?g():(h(),m(),u())})),a("activeIndexChange",(()=>{void 0===t.snapIndex&&u()})),a("snapIndexChange",(()=>{u()})),a("snapGridLengthChange",(()=>{m(),u()})),a("destroy",(()=>{f()})),a("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),a("lock unlock",(()=>{u()})),a("click",((e,s)=>{const a=s.target,r=o(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&a===t.navigation.nextEl||t.navigation.prevEl&&a===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const g=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),m(),u()},disable:g,render:m,update:u,init:h,destroy:f})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:i,emit:r}=e;const l=a();let o,d,c,p,u=!1,m=null,h=null;function v(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:s}=t,{dragEl:a,el:i}=e,r=t.params.scrollbar,n=t.params.loop?t.progressLoop:t.progress;let l=d,o=(c-d)*n;s?(o=-o,o>0?(l=d-o,o=0):-o+d>c&&(l=c+o)):o<0?(l=d+o,o=0):o+d>c&&(l=c-o),t.isHorizontal()?(a.style.transform=`translate3d(${o}px, 0, 0)`,a.style.width=`${l}px`):(a.style.transform=`translate3d(0px, ${o}px, 0)`,a.style.height=`${l}px`),r.hide&&(clearTimeout(m),i.style.opacity=1,m=setTimeout((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function w(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:s,el:a}=e;s.style.width="",s.style.height="",c=t.isHorizontal()?a.offsetWidth:a.offsetHeight,p=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),d="auto"===t.params.scrollbar.dragSize?c*p:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?s.style.width=`${d}px`:s.style.height=`${d}px`,a.style.display=p>=1?"none":"",t.params.scrollbar.hide&&(a.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function b('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return t.isHorizontal()?e.clientX:e.clientY}function y('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{scrollbar:s,rtlTranslate:a}=t,{el:i}=s;let r;r=(b('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')-g(i)[t.isHorizontal()?"left":"top"]-(null!==o?o:d/2))/(c-d),r=Math.max(Math.min(r,1),0),a&&(r=1-r);const n=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*r;t.updateProgress(n),t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}function E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:n,dragEl:l}=a;u=!0,o=e.target===l?b('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.style.transitionDuration="100ms",l.style.transitionDuration="100ms",y('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),clearTimeout(h),n.style.transitionDuration="0ms",s.hide&&(n.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),r("scrollbarDragStart",e)}function x('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{scrollbar:s,wrapperEl:a}=t,{el:i,dragEl:n}=s;u&&(e.preventDefault?e.preventDefault():e.returnValue=!1,y('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),a.style.transitionDuration="0ms",i.style.transitionDuration="0ms",n.style.transitionDuration="0ms",r("scrollbarDragMove",e))}function S('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:l}=a;u&&(u=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",i.style.transitionDuration=""),s.hide&&(clearTimeout(h),h=n((()=>{l.style.opacity=0,l.style.transitionDuration="400ms"}),1e3)),r("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())}function T('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const{scrollbar:s,params:a}=t,i=s.el;if(!i)return;const r=i,n=!!a.passiveListeners&&{passive:!1,capture:!1},o=!!a.passiveListeners&&{passive:!0,capture:!1};if(!r)return;const d="on"===e?"addEventListener":"removeEventListener";r[d]("pointerdown",E,n),l[d]("pointermove",x,n),l[d]("pointerup",S,o)}function M(){const{scrollbar:e,el:s}=t;t.params.scrollbar=J(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const a=t.params.scrollbar;if(!a.el)return;let i,r;"string"==typeof a.el&&t.isElement&&(i=t.el.querySelector(a.el)),i||"string"!=typeof a.el?i||(i=a.el):i=l.querySelectorAll(a.el),t.params.uniqueNavElements&&"string"==typeof a.el&&i.length>1&&1===s.querySelectorAll(a.el).length&&(i=s.querySelector(a.el)),i.length>0&&(i=i[0]),i.classList.add(t.isHorizontal()?a.horizontalClass:a.verticalClass),i&&(r=i.querySelector(`.${t.params.scrollbar.dragClass}`),r||(r=f("div",t.params.scrollbar.dragClass),i.append(r))),Object.assign(e,{el:i,dragEl:r}),a.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&T("on"),i&&i.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}function C(){const e=t.params.scrollbar,s=t.scrollbar.el;s&&s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&T("off")}s({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},i("init",(()=>{!1===t.params.scrollbar.enabled?P():(M(),w(),v())})),i("update resize observerUpdate lock unlock",(()=>{w()})),i("setTranslate",(()=>{v()})),i("setTransition",((e,s)=>{!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(s)})),i("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)})),i("destroy",(()=>{C()}));const P=()=>{t.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),C()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),M(),w(),v()},disable:P,updateSize:w,setTranslate:v,init:M,destroy:C})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({parallax:{enabled:!1}});const i="[data-swiper-parallax],[data-swiper-parallax-x],[data-swiper-parallax-y],[data-swiper-parallax-opacity],[data-swiper-parallax-scale]",r=(e,s)=>{const{rtl:a}=t,i=a?-1:1,r=e.getAttribute("data-swiper-parallax")||"0";let n=e.getAttribute("data-swiper-parallax-x"),l=e.getAttribute("data-swiper-parallax-y");const o=e.getAttribute("data-swiper-parallax-scale"),d=e.getAttribute("data-swiper-parallax-opacity"),c=e.getAttribute("data-swiper-parallax-rotate");if(n||l?(n=n||"0",l=l||"0"):t.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*s*i+"%":n*s*i+"px",l=l.indexOf("%")>=0?parseInt(l,10)*s+"%":l*s+"px",null!=d){const t=d-(d-1)*(1-Math.abs(s));e.style.opacity=t}let p=`translate3d(${n}, ${l}, 0px)`;if(null!=o){p+=` scale(${o-(o-1)*(1-Math.abs(s))})`}if(c&&null!=c){p+=` rotate(${c*s*-1}deg)`}e.style.transform=p},n=()=>{const{el:e,slides:s,progress:a,snapGrid:n,isElement:l}=t,o=h(e,i);t.isElement&&o.push(...h(t.hostEl,i)),o.forEach((e=>{r(e,a)})),s.forEach(((e,s)=>{let l=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(l+=Math.ceil(s/2)-a*(n.length-1)),l=Math.min(Math.max(l,-1),1),e.querySelectorAll(`${i}, [data-swiper-parallax-rotate]`).forEach((e=>{r(e,l)}))}))};a("beforeInit",(()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),a("init",(()=>{t.params.parallax.enabled&&n()})),a("setTranslate",(()=>{t.params.parallax.enabled&&n()})),a("setTransition",((e,s)=>{t.params.parallax.enabled&&function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){void 0===e&&(e=t.params.speed);const{el:s,hostEl:a}=t,r=[...s.querySelectorAll(i)];t.isElement&&r.push(...a.querySelectorAll(i)),r.forEach((t=>{let s=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.style.transitionDuration=`${s}ms`}))}(s)}))},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();s({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let l,d,c=1,p=!1;const u=[],m={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},f={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},v={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let w=1;function y(){if(u.length<2)return 1;const e=u[0].pageX,t=u[0].pageY,s=u[1].pageX,a=u[1].pageY;return Math.sqrt((s-e)**2+(a-t)**2)}function E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(s)||t.slides.filter((t=>t.contains(e.target))).length>0}function x('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if("mouse"===e.pointerType&&u.splice(0,u.length),!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))return;const s=t.params.zoom;if(l=!1,d=!1,u.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),!(u.length<2)){if(l=!0,m.scaleStart=y(),!m.slideEl){m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),m.slideEl||(m.slideEl=t.slides[t.activeIndex]);let a=m.slideEl.querySelector(`.${s.containerClass}`);if(a&&(a=a.querySelectorAll("picture,img,svg,canvas,.swiper-zoom-target")[0]),m.imageEl=a,m.imageWrapEl=a?b(m.imageEl,`.${s.containerClass}`)[0]:void 0,!m.imageWrapEl)return void(m.imageEl=void 0);m.maxRatio=m.imageWrapEl.getAttribute("data-swiper-zoom")||s.maxRatio}if(m.imageEl){const[e,t]=function(){if(u.length<2)return{x:null,y:null};const e=m.imageEl.getBoundingClientRect();return[(u[0].pageX+(u[1].pageX-u[0].pageX)/2-e.x)/c,(u[0].pageY+(u[1].pageY-u[0].pageY)/2-e.y)/c]}();m.originX=e,m.originY=t,m.imageEl.style.transitionDuration="0ms"}p=!0}}function S('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))return;const s=t.params.zoom,a=t.zoom,i=u.findIndex((t=>t.pointerId===e.pointerId));i>=0&&(u[i]=e),u.length<2||(d=!0,m.scaleMove=y(),m.imageEl&&(a.scale=m.scaleMove/m.scaleStart*c,a.scale>m.maxRatio&&(a.scale=m.maxRatio-1+(a.scale-m.maxRatio+1)**.5),a.scale<s.minRatio&&(a.scale=s.minRatio+1-(s.minRatio-a.scale+1)**.5),m.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`))}function T('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))return;if("mouse"===e.pointerType&&"pointerout"===e.type)return;const s=t.params.zoom,a=t.zoom,i=u.findIndex((t=>t.pointerId===e.pointerId));i>=0&&u.splice(i,1),l&&d&&(l=!1,d=!1,m.imageEl&&(a.scale=Math.max(Math.min(a.scale,m.maxRatio),s.minRatio),m.imageEl.style.transitionDuration=`${t.params.speed}ms`,m.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`,c=a.scale,p=!1,a.scale>1&&m.slideEl?m.slideEl.classList.add(`${s.zoomedSlideClass}`):a.scale<=1&&m.slideEl&&m.slideEl.classList.remove(`${s.zoomedSlideClass}`),1===a.scale&&(m.originX=0,m.originY=0,m.slideEl=void 0)))}function M('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')||!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=`.${t.params.zoom.containerClass}`;return!!e.target.matches(s)||[...t.hostEl.querySelectorAll(s)].filter((t=>t.contains(e.target))).length>0}('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))return;const s=t.zoom;if(!m.imageEl)return;if(!f.isTouched||!m.slideEl)return;f.isMoved||(f.width=m.imageEl.offsetWidth,f.height=m.imageEl.offsetHeight,f.startX=o(m.imageWrapEl,"x")||0,f.startY=o(m.imageWrapEl,"y")||0,m.slideWidth=m.slideEl.offsetWidth,m.slideHeight=m.slideEl.offsetHeight,m.imageWrapEl.style.transitionDuration="0ms");const a=f.width*s.scale,i=f.height*s.scale;if(a<m.slideWidth&&i<m.slideHeight)return;f.minX=Math.min(m.slideWidth/2-a/2,0),f.maxX=-f.minX,f.minY=Math.min(m.slideHeight/2-i/2,0),f.maxY=-f.minY,f.touchesCurrent.x=u.length>0?u[0].pageX:e.pageX,f.touchesCurrent.y=u.length>0?u[0].pageY:e.pageY;if(Math.max(Math.abs(f.touchesCurrent.x-f.touchesStart.x),Math.abs(f.touchesCurrent.y-f.touchesStart.y))>5&&(t.allowClick=!1),!f.isMoved&&!p){if(t.isHorizontal()&&(Math.floor(f.minX)===Math.floor(f.startX)&&f.touchesCurrent.x<f.touchesStart.x||Math.floor(f.maxX)===Math.floor(f.startX)&&f.touchesCurrent.x>f.touchesStart.x))return void(f.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(f.minY)===Math.floor(f.startY)&&f.touchesCurrent.y<f.touchesStart.y||Math.floor(f.maxY)===Math.floor(f.startY)&&f.touchesCurrent.y>f.touchesStart.y))return void(f.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),f.isMoved=!0;const r=(s.scale-c)/(m.maxRatio-t.params.zoom.minRatio),{originX:n,originY:l}=m;f.currentX=f.touchesCurrent.x-f.touchesStart.x+f.startX+r*(f.width-2*n),f.currentY=f.touchesCurrent.y-f.touchesStart.y+f.startY+r*(f.height-2*l),f.currentX<f.minX&&(f.currentX=f.minX+1-(f.minX-f.currentX+1)**.8),f.currentX>f.maxX&&(f.currentX=f.maxX-1+(f.currentX-f.maxX+1)**.8),f.currentY<f.minY&&(f.currentY=f.minY+1-(f.minY-f.currentY+1)**.8),f.currentY>f.maxY&&(f.currentY=f.maxY-1+(f.currentY-f.maxY+1)**.8),v.prevPositionX||(v.prevPositionX=f.touchesCurrent.x),v.prevPositionY||(v.prevPositionY=f.touchesCurrent.y),v.prevTime||(v.prevTime=Date.now()),v.x=(f.touchesCurrent.x-v.prevPositionX)/(Date.now()-v.prevTime)/2,v.y=(f.touchesCurrent.y-v.prevPositionY)/(Date.now()-v.prevTime)/2,Math.abs(f.touchesCurrent.x-v.prevPositionX)<2&&(v.x=0),Math.abs(f.touchesCurrent.y-v.prevPositionY)<2&&(v.y=0),v.prevPositionX=f.touchesCurrent.x,v.prevPositionY=f.touchesCurrent.y,v.prevTime=Date.now(),m.imageWrapEl.style.transform=`translate3d(${f.currentX}px, ${f.currentY}px,0)`}function C(){const e=t.zoom;m.slideEl&&t.activeIndex!==t.slides.indexOf(m.slideEl)&&(m.imageEl&&(m.imageEl.style.transform="translate3d(0,0,0) scale(1)"),m.imageWrapEl&&(m.imageWrapEl.style.transform="translate3d(0,0,0)"),m.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,c=1,m.slideEl=void 0,m.imageEl=void 0,m.imageWrapEl=void 0,m.originX=0,m.originY=0)}function P('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.zoom,a=t.params.zoom;if(!m.slideEl){e&&e.target&&(m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),m.slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.slideEl=h(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex]);let s=m.slideEl.querySelector(`.${a.containerClass}`);s&&(s=s.querySelectorAll("picture,img,svg,canvas,.swiper-zoom-target")[0]),m.imageEl=s,m.imageWrapEl=s?b(m.imageEl,`.${a.containerClass}`)[0]:void 0}if(!m.imageEl||!m.imageWrapEl)return;let i,r,l,o,d,p,u,v,w,y,E,x,S,T,M,C,P,L;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),m.slideEl.classList.add(`${a.zoomedSlideClass}`),void 0===f.touchesStart.x&&e?(i=e.pageX,r=e.pageY):(i=f.touchesStart.x,r=f.touchesStart.y);const z="number"==typeof e?e:null;1===c&&z&&(i=void 0,r=void 0),s.scale=z||m.imageWrapEl.getAttribute("data-swiper-zoom")||a.maxRatio,c=z||m.imageWrapEl.getAttribute("data-swiper-zoom")||a.maxRatio,!e||1===c&&z?(u=0,v=0):(P=m.slideEl.offsetWidth,L=m.slideEl.offsetHeight,l=g(m.slideEl).left+n.scrollX,o=g(m.slideEl).top+n.scrollY,d=l+P/2-i,p=o+L/2-r,w=m.imageEl.offsetWidth,y=m.imageEl.offsetHeight,E=w*s.scale,x=y*s.scale,S=Math.min(P/2-E/2,0),T=Math.min(L/2-x/2,0),M=-S,C=-T,u=d*s.scale,v=p*s.scale,u<S&&(u=S),u>M&&(u=M),v<T&&(v=T),v>C&&(v=C)),z&&1===s.scale&&(m.originX=0,m.originY=0),m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform=`translate3d(${u}px, ${v}px,0)`,m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform=`translate3d(0,0,0) scale(${s.scale})`}function L(){const e=t.zoom,s=t.params.zoom;if(!m.slideEl){t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.slideEl=h(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex];let e=m.slideEl.querySelector(`.${s.containerClass}`);e&&(e=e.querySelectorAll("picture,img,svg,canvas,.swiper-zoom-target")[0]),m.imageEl=e,m.imageWrapEl=e?b(m.imageEl,`.${s.containerClass}`)[0]:void 0}m.imageEl&&m.imageWrapEl&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,c=1,m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform="translate3d(0,0,0)",m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform="translate3d(0,0,0) scale(1)",m.slideEl.classList.remove(`${s.zoomedSlideClass}`),m.slideEl=void 0,m.originX=0,m.originY=0)}function z('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.zoom;s.scale&&1!==s.scale?L():P('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')}function A(){return{passiveListener:!!t.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function $(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:s,activeListenerWithCapture:a}=A();t.wrapperEl.addEventListener("pointerdown",x,s),t.wrapperEl.addEventListener("pointermove",S,a),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.addEventListener(e,T,s)})),t.wrapperEl.addEventListener("pointermove",M,a)}function I(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:s,activeListenerWithCapture:a}=A();t.wrapperEl.removeEventListener("pointerdown",x,s),t.wrapperEl.removeEventListener("pointermove",S,a),["pointerup","pointercancel","pointerout"].forEach((e=>{t.wrapperEl.removeEventListener(e,T,s)})),t.wrapperEl.removeEventListener("pointermove",M,a)}Object.defineProperty(t.zoom,"scale",{get:()=>w,set('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(w!==e){const t=m.imageEl,s=m.slideEl;i("zoomChange",e,t,s)}w=e}}),a("init",(()=>{t.params.zoom.enabled&&$()})),a("destroy",(()=>{I()})),a("touchStart",((e,s)=>{t.zoom.enabled&&function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.device;if(!m.imageEl)return;if(f.isTouched)return;s.android&&e.cancelable&&e.preventDefault(),f.isTouched=!0;const a=u.length>0?u[0]:e;f.touchesStart.x=a.pageX,f.touchesStart.y=a.pageY}(s)})),a("touchEnd",((e,s)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!m.imageEl)return;if(!f.isTouched||!f.isMoved)return f.isTouched=!1,void(f.isMoved=!1);f.isTouched=!1,f.isMoved=!1;let s=300,a=300;const i=v.x*s,r=f.currentX+i,n=v.y*a,l=f.currentY+n;0!==v.x&&(s=Math.abs((r-f.currentX)/v.x)),0!==v.y&&(a=Math.abs((l-f.currentY)/v.y));const o=Math.max(s,a);f.currentX=r,f.currentY=l;const d=f.width*e.scale,c=f.height*e.scale;f.minX=Math.min(m.slideWidth/2-d/2,0),f.maxX=-f.minX,f.minY=Math.min(m.slideHeight/2-c/2,0),f.maxY=-f.minY,f.currentX=Math.max(Math.min(f.currentX,f.maxX),f.minX),f.currentY=Math.max(Math.min(f.currentY,f.maxY),f.minY),m.imageWrapEl.style.transitionDuration=`${o}ms`,m.imageWrapEl.style.transform=`translate3d(${f.currentX}px, ${f.currentY}px,0)`}()})),a("doubleTap",((e,s)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&z(s)})),a("transitionEnd",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&C()})),a("slideChange",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&C()})),Object.assign(t.zoom,{enable:$,disable:I,in:P,out:L,toggle:z})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;function i(e,t){const s=function(){let e,t,s;return(a,i)=>{for(t=-1,e=a.length;e-t>1;)s=e+t>>1,a[s]<=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function r(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}s({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},a("beforeInit",(()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){const e=document.querySelector(t.params.controller.control);if(e&&e.swiper)t.controller.control=e.swiper;else if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=a=>{t.controller.control=a.detail[0],t.update(),e.removeEventListener("init",s)};e.addEventListener("init",s)}}else t.controller.control=t.params.controller.control})),a("update",(()=>{r()})),a("resize",(()=>{r()})),a("observerUpdate",(()=>{r()})),a("setTranslate",((e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(s,a)})),a("setTransition",((e,s,a)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(s,a)})),Object.assign(t.controller,{setTranslate:function(e,s){const a=t.controller.control;let r,n;const l=t.constructor;function o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(e.destroyed)return;const s=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){t.controller.spline=t.params.loop?new i(t.slidesGrid,e.slidesGrid):new i(t.snapGrid,e.snapGrid)}('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),n=-t.controller.spline.interpolate(-s)),n&&"container"!==t.params.controller.by||(r=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(r)&&Number.isFinite(r)||(r=1),n=(s-t.minTranslate())*r+e.minTranslate()),t.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(let e=0;e<a.length;e+=1)a[e]!==s&&a[e]instanceof l&&o(a[e]);else a instanceof l&&s!==a&&o(a)},setTransition:function(e,s){const a=t.constructor,i=t.controller.control;let r;function l(s){s.destroyed||(s.setTransition(e,t),0!==e&&(s.transitionStart(),s.params.autoHeight&&n((()=>{s.updateAutoHeight()})),y(s.wrapperEl,(()=>{i&&s.transitionEnd()}))))}if(Array.isArray(i))for(r=0;r<i.length;r+=1)i[r]!==s&&i[r]instanceof a&&l(i[r]);else i instanceof a&&s!==i&&l(i)}})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide{{index}}",slideLabelMessage:"{{index}}/{{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let i=null;function r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const t=i;0!==t.length&&(t.innerHTML="",t.innerHTML=e)}const n=e=>(Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')?e:[e]).filter((e=>!!e));function l('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("tabIndex","0")}))}function o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function d(e,t){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("role",t)}))}function c(e,t){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function p(e,t){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-label",t)}))}function u('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function h('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){if(13!==e.keyCode&&32!==e.keyCode)return;const s=t.params.a11y,a=e.target;t.pagination&&t.pagination.el&&(a===t.pagination.el||t.pagination.el.contains(e.target))&&!e.target.matches(ee(t.params.pagination.bulletClass))||(t.navigation&&t.navigation.nextEl&&a===t.navigation.nextEl&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?r(s.lastSlideMessage):r(s.nextSlideMessage)),t.navigation&&t.navigation.prevEl&&a===t.navigation.prevEl&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?r(s.firstSlideMessage):r(s.prevSlideMessage)),t.pagination&&a.matches(ee(t.params.pagination.bulletClass))&&a.click())}function g(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function v(){return g()&&t.params.pagination.clickable}const b=(e,t,s)=>{l('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),"BUTTON"!==e.tagName&&(d(e,"button"),e.addEventListener("keydown",h)),p(e,s),function(e,t){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},y=()=>{t.a11y.clicked=!0},E=()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},x=e=>{if(t.a11y.clicked)return;const s=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!s||!t.slides.includes(s))return;const a=t.slides.indexOf(s)===t.activeIndex,i=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(s);a||i||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(s),0))},S=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&c(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&d(t.slides,e.slideRole);const s=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((a,i)=>{const r=t.params.loop?parseInt(a.getAttribute("data-swiper-slide-index"),10):i;p(a,e.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,s))}))},T=()=>{const e=t.params.a11y;t.el.append(i);const s=t.el;e.containerRoleDescriptionMessage&&c(s,e.containerRoleDescriptionMessage),e.containerMessage&&p(s,e.containerMessage);const a=t.wrapperEl,r=e.id||a.getAttribute("id")||`swiper-wrapper-${l=16,void 0===l&&(l=16),"x".repeat(l).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var l;const o=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var d;d=r,n(a).forEach((e=>{e.setAttribute("id",d)})),function(e,t){(e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')).forEach((e=>{e.setAttribute("aria-live",t)}))}(a,o),S();let{nextEl:u,prevEl:m}=t.navigation?t.navigation:{};if(u=n(u),m=n(m),u&&u.forEach((t=>b(t,r,e.nextSlideMessage))),m&&m.forEach((t=>b(t,r,e.prevSlideMessage))),v()){(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.addEventListener("keydown",h)}))}t.el.addEventListener("focus",x,!0),t.el.addEventListener("pointerdown",y,!0),t.el.addEventListener("pointerup",E,!0)};a("beforeInit",(()=>{i=f("span",t.params.a11y.notificationClass),i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true")})),a("afterInit",(()=>{t.params.a11y.enabled&&T()})),a("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&S()})),a("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:s}=t.navigation;s&&(t.isBeginning?(u(s),o(s)):(m(s),l(s))),e&&(t.isEnd?(u('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')):(m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),l('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')))}()})),a("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;g()&&t.pagination.bullets.forEach((s=>{t.params.pagination.clickable&&(l(s),t.params.pagination.renderBullet||(d(s,"button"),p(s,e.paginationBulletMessage.replace(/\{\{index\}\}/,w(s)+1)))),s.matches(ee(t.params.pagination.bulletActiveClass))?s.setAttribute("aria-current","true"):s.removeAttribute("aria-current")}))}()})),a("destroy",(()=>{t.params.a11y.enabled&&function(){i&&i.remove();let{nextEl:e,prevEl:s}=t.navigation?t.navigation:{};e=n('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),s=n(s),e&&e.forEach((e=>e.removeEventListener("keydown",h))),s&&s.forEach((e=>e.removeEventListener("keydown",h))),v()&&(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=>{e.removeEventListener("keydown",h)}));t.el.removeEventListener("focus",x,!0),t.el.removeEventListener("pointerdown",y,!0),t.el.removeEventListener("pointerup",E,!0)}()}))},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,n={};const l=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=>{const t=r();let s;s=e?new url('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'):t.location;const a=s.pathname.slice(1).split("/").filter((e=>""!==e)),i=a.length;return{key:a[i-2],value:a[i-1]}},d=(e,s)=>{const a=r();if(!i||!t.params.history.enabled)return;let n;n=t.params.url?new url('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t.params.url'):a.location;const o=t.slides[s];let d=l(o.getAttribute("data-history"));if(t.params.history.root.length>0){let s=t.params.history.root;"/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),d=`${s}/${e?`${e}/`:""}${d}`}else n.pathname.includes('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')||(d=`${e?`${e}/`:""}${d}`);t.params.history.keepQuery&&(d+=n.search);const c=a.history.state;c&&c.value===d||(t.params.history.replaceState?a.history.replaceState({value:d},null,d):a.history.pushState({value:d},null,d))},c=(e,s,a)=>{if(s)for(let i=0,r=t.slides.length;i<r;i+=1){const r=t.slides[i];if(l(r.getAttribute("data-history"))===s){const s=t.getSlideIndex(r);t.slideTo(s,e,a)}}else t.slideTo(0,e,a)},p=()=>{n=o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t.params.url'),c(t.params.speed,n.value,!1)};a("init",(()=>{t.params.history.enabled&&(()=>{const e=r();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);i=!0,n=o('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t.params.url'),n.key||n.value?(c(0,n.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",p)):t.params.history.replaceState||e.addEventListener("popstate",p)}})()})),a("destroy",(()=>{t.params.history.enabled&&(()=>{const e=r();t.params.history.replaceState||e.removeEventListener("popstate",p)})()})),a("transitionEnd _freeModeNoMomentumRelease",(()=>{i&&d(t.params.history.key,t.activeIndex)})),a("slideChange",(()=>{i&&t.params.cssMode&&d(t.params.history.key,t.activeIndex)}))},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,emit:i,on:n}=e,l=!1;const o=a(),d=r();s({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,s){if(t.virtual&&t.params.virtual.enabled){const e=t.slides.filter((e=>e.getAttribute("data-hash")===s))[0];if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex(h(t.slidesEl,`.${t.params.slideClass}[data-hash="${s}"], swiper-slide[data-hash="${s}"]`)[0])}}});const c=()=>{i("hashChange");const e=o.location.hash.replace("#",""),s=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex];if(e!==(s?s.getAttribute("data-hash"):"")){const s=t.params.hashNavigation.getSlideIndex(t,e);if(void 0===s||Number.isNaN(s))return;t.slideTo(s)}},p=()=>{if(!l||!t.params.hashNavigation.enabled)return;const e=t.virtual&&t.params.virtual.enabled?t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`):t.slides[t.activeIndex],s=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&&d.history&&d.history.replaceState?(d.history.replaceState(null,null,`#${s}`||""),i("hashSet")):(o.location.hash=s||"",i("hashSet"))};n("init",(()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;l=!0;const e=o.location.hash.replace("#","");if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=0,a=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(a||0,s,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&&d.addEventListener("hashchange",c)})()})),n("destroy",(()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&d.removeEventListener("hashchange",c)})),n("transitionEnd _freeModeNoMomentumRelease",(()=>{l&&p()})),n("slideChange",(()=>{l&&t.params.cssMode&&p()}))},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let t,s,{swiper:i,extendParams:r,on:n,emit:l,params:o}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},r({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let d,c,p,u,m,h,f,g=o&&o.autoplay?o.autoplay.delay:3e3,v=o&&o.autoplay?o.autoplay.delay:3e3,w=(new Date).getTime;function b('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",b),M())}const y=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?c=!0:c&&(v=d,c=!1);const e=i.autoplay.paused?d:w+v-(new Date).getTime();i.autoplay.timeLeft=e,l("autoplayTimeLeft",e,e/g),s=requestAnimationFrame((()=>{y()}))},E=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),y();let a=void 0===e?i.params.autoplay.delay:e;g=i.params.autoplay.delay,v=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,g=r,v=r),d=a;const n=i.params.speed,o=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,n,!0,!0),l("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,n,!0,!0),l("autoplay")),i.params.cssMode&&(w=(new Date).getTime(),requestAnimationFrame((()=>{E()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{o()}),a)):requestAnimationFrame((()=>{o()})),a},x=()=>{i.autoplay.running=!0,E(),l("autoplayStart")},S=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),l("autoplayStop")},T=(e,s)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=>{l("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",b):M()};if(i.autoplay.paused=!0,s)return h&&(d=i.params.autoplay.delay),h=!1,void a();const r=d||i.params.autoplay.delay;d=r-((new Date).getTime()-w),i.isEnd&&d<0&&!i.params.loop||(d<0&&(d=0),a())},M=()=>{i.isEnd&&d<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(w=(new Date).getTime(),f?(f=!1,E(d)):E(),i.autoplay.paused=!1,l("autoplayResume"))},C=()=>{if(i.destroyed||!i.autoplay.running)return;const e=a();"hidden"===e.visibilityState&&(f=!0,T(!0)),"visible"===e.visibilityState&&M()},P=e=>{"mouse"===e.pointerType&&(f=!0,i.animating||i.autoplay.paused||T(!0))},L=e=>{"mouse"===e.pointerType&&i.autoplay.paused&&M()};n("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",P),i.el.addEventListener("pointerleave",L)),a().addEventListener("visibilitychange",C),w=(new Date).getTime(),x())})),n("destroy",(()=>{i.el.removeEventListener("pointerenter",P),i.el.removeEventListener("pointerleave",L),a().removeEventListener("visibilitychange",C),i.autoplay.running&&S()})),n("beforeTransitionStart",((e,t,s)=>{!i.destroyed&&i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?T(!0,!0):S())})),n("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?S():(p=!0,u=!1,f=!1,m=setTimeout((()=>{f=!0,u=!0,T(!0)}),200)))})),n("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&p){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return u=!1,void(p=!1);u&&i.params.cssMode&&M(),u=!1,p=!1}})),n("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(h=!0)})),Object.assign(i.autoplay,{start:x,stop:S,pause:T,resume:M})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:i}=e;s({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let r=!1,n=!1;function l(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const s=e.clickedIndex,a=e.clickedSlide;if(a&&a.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;i=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):s,t.params.loop?t.slideToLoop(i):t.slideTo(i)}function o(){const{thumbs:e}=t.params;if(r)return!1;r=!0;const s=t.constructor;if(e.swiper instanceof s)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(d(e.swiper)){const a=Object.assign({},e.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new s(a),n=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",l),!0}function c('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){const s=t.thumbs.swiper;if(!s||s.destroyed)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;let i=1;const r=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),s.slides.forEach((e=>e.classList.remove(r))),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let e=0;e<i;e+=1)h(s.slidesEl,`[data-swiper-slide-index="${t.realIndex+e}"]`).forEach((e=>{e.classList.add(r)}));else for(let e=0;e<i;e+=1)s.slides[t.realIndex+e]&&s.slides[t.realIndex+e].classList.add(r);const n=t.params.thumbs.autoScrollOffset,l=n&&!s.params.loop;if(t.realIndex!==s.realIndex||l){const i=s.activeIndex;let r,o;if(s.params.loop){const e=s.slides.filter((e=>e.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];r=s.slides.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),o=t.activeIndex>t.previousIndex?"next":"prev"}else r=t.realIndex,o=r>t.previousIndex?"next":"prev";l&&(r+="next"===o?n:-1*n),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(r)<0&&(s.params.centeredSlides?r=r>i?r-Math.floor(a/2)+1:r+Math.floor(a/2)-1:r>i&&s.params.slidesPerGroup,s.slideTo(r,e?0:void 0))}}t.thumbs={swiper:null},i("beforeInit",(()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const s=a(),i=()=>{const a="string"==typeof e.swiper?s.querySelector(e.swiper):e.swiper;if(a&&a.swiper)e.swiper=a.swiper,o(),c(!0);else if(a){const s=i=>{e.swiper=i.detail[0],a.removeEventListener("init",s),o(),c(!0),e.swiper.update(),t.update()};a.addEventListener("init",s)}return a},r=()=>{if(t.destroyed)return;i()||requestAnimationFrame(r)};requestAnimationFrame(r)}else o(),c(!0)})),i("slideChange update resize observerUpdate",(()=>{c()})),i("setTransition",((e,s)=>{const a=t.thumbs.swiper;a&&!a.destroyed&&a.setTransition(s)})),i("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&n&&e.destroy()})),Object.assign(t.thumbs,{init:o,update:c})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,emit:a,once:i}=e;s({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){if(t.params.cssMode)return;const e=t.getTranslate();t.setTranslate('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){if(t.params.cssMode)return;const{touchEventsData:e,touches:s}=t;0===e.velocities.length&&e.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:l()})},onTouchEnd:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{currentPos:s}=e;if(t.params.cssMode)return;const{params:r,wrapperEl:n,rtlTranslate:o,snapGrid:d,touchEventsData:c}=t,p=l()-c.touchStartTime;if(s<-t.minTranslate())t.slideTo(t.activeIndex);else if(s>-t.maxTranslate())t.slides.length<d.length?t.slideTo(d.length-1):t.slideTo(t.slides.length-1);else{if(r.freeMode.momentum){if(c.velocities.length>1){const e=c.velocities.pop(),s=c.velocities.pop(),a=e.position-s.position,i=e.time-s.time;t.velocity=a/i,t.velocity/=2,Math.abs(t.velocity)<r.freeMode.minimumVelocity&&(t.velocity=0),(i>150||l()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*r.freeMode.momentumRatio;const s=t.velocity*e;let p=t.translate+s;o&&(p=-p);let u,m=!1;const h=20*Math.abs(t.velocity)*r.freeMode.momentumBounceRatio;let f;if(p<t.maxTranslate())r.freeMode.momentumBounce?(p+t.maxTranslate()<-h&&(p=t.maxTranslate()-h),u=t.maxTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.maxTranslate(),r.loop&&r.centeredSlides&&(f=!0);else if(p>t.minTranslate())r.freeMode.momentumBounce?(p-t.minTranslate()>h&&(p=t.minTranslate()+h),u=t.minTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.minTranslate(),r.loop&&r.centeredSlides&&(f=!0);else if(r.freeMode.sticky){let e;for(let t=0;t<d.length;t+=1)if(d[t]>-p){e=t;break}p=Math.abs(d[e]-p)<Math.abs(d[e-1]-p)||"next"===t.swipeDirection?d[e]:d[e-1],p=-p}if(f&&i("transitionEnd",(()=>{t.loopFix()})),0!==t.velocity){if(e=o?Math.abs((-p-t.translate)/t.velocity):Math.abs((p-t.translate)/t.velocity),r.freeMode.sticky){const s=Math.abs((o?-p:p)-t.translate),a=t.slidesSizesGrid[t.activeIndex];e=s<a?r.speed:s<2*a?1.5*r.speed:2.5*r.speed}}else if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode.momentumBounce&&m?(t.updateProgress(u),t.setTransition('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating=!0,y(n,(()=>{t&&!t.destroyed&&c.allowMomentumBounce&&(a("momentumBounce"),t.setTransition(r.speed),setTimeout((()=>{t.setTranslate(u),y(n,(()=>{t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(a("_freeModeNoMomentumRelease"),t.updateProgress(p),t.setTransition('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,y(n,(()=>{t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(p),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode&&a("_freeModeNoMomentumRelease")}(!r.freeMode.momentum||p>=r.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let t,s,a,{swiper:i,extendParams:r}=e;r({grid:{rows:1,fill:"column"}});const n=()=>{let e=i.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*i.size:"string"==typeof e&&(e=parseFloat('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')),e};i.grid={initSlides:e=>{const{slidesPerView:r}=i.params,{rows:n,fill:l}=i.params.grid;a=Math.floor(e/n),t=Math.floor(e/n)===e/n?e:Math.ceil(e/n)*n,"auto"!==r&&"row"===l&&(t=Math.max(t,r*n)),s=t/n},updateSlide:(e,r,l,o)=>{const{slidesPerGroup:d}=i.params,c=n(),{rows:p,fill:u}=i.params.grid;let m,h,f;if("row"===u&&d>1){const s=Math.floor(e/(d*p)),a=e-p*d*s,i=0===s?d:Math.min(Math.ceil((l-s*p*d)/p),d);f=Math.floor(a/i),h=a-f*i+s*d,m=h+f*t/p,r.style.order=m}else"column"===u?(h=Math.floor(e/p),f=e-h*p,(h>a||h===a&&f===p-1)&&(f+=1,f>=p&&(f=0,h+=1))):(f=Math.floor(e/s),h=e-f*s);r.row=f,r.column=h,r.style[o("margin-top")]=0!==f?c&&`${c}px`:""},updateWrapperSize:(e,s,a)=>{const{centeredSlides:r,roundLengths:l}=i.params,o=n(),{rows:d}=i.params.grid;if(i.virtualSize=(e+o)*t,i.virtualSize=Math.ceil(i.virtualSize/d)-o,i.wrapperEl.style[a("width")]=`${i.virtualSize+o}px`,r){const e=[];for(let t=0;t<s.length;t+=1){let a=s[t];l&&(a=Math.floor(a)),s[t]<i.virtualSize+s[0]&&e.push(a)}s.splice(0,s.length),s.push(...e)}}}},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t}=e;Object.assign(t,{appendSlide:te.bind(t),prependSlide:se.bind(t),addSlide:ae.bind(t),removeSlide:ie.bind(t),removeAllSlides:re.bind(t)})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({fadeEffect:{crossFade:!1}}),ne({effect:"fade",swiper:t,on:a,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let s=0;s<e.length;s+=1){const e=t.slides[s];let a=-e.swiperSlideOffset;t.params.virtualTranslate||(a-=t.translate);let i=0;t.isHorizontal()||(i=a,a=0);const r=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),n=le(0,e);n.style.opacity=r,n.style.transform=`translate3d(${a}px, ${i}px, 0px)`}},setTransition:e=>{const s=t.slides.map((e=>m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));s.forEach((t=>{t.style.transitionDuration=`${e}ms`})),oe({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,s)=>{let a=s?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=s?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=f("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"left":"top")).split(" ")),e.append(a)),i||(i=f("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"right":"bottom")).split(" ")),e.append(i)),a&&(a.style.opacity=Math.max(-t,0)),i&&(i.style.opacity=Math.max(t,0))};ne({effect:"cube",swiper:t,on:a,setTranslate:()=>{const{el:e,wrapperEl:s,slides:a,width:r,height:n,rtlTranslate:l,size:o,browser:d}=t,c=t.params.cubeEffect,p=t.isHorizontal(),u=t.virtual&&t.params.virtual.enabled;let m,h=0;c.shadow&&(p?(m=t.wrapperEl.querySelector(".swiper-cube-shadow"),m||(m=f("div","swiper-cube-shadow"),t.wrapperEl.append(m)),m.style.height=`${r}px`):(m=e.querySelector(".swiper-cube-shadow"),m||(m=f("div","swiper-cube-shadow"),e.append(m))));for(let e=0;e<a.length;e+=1){const t=a[e];let s=e;u&&(s=parseInt(t.getAttribute("data-swiper-slide-index"),10));let r=90*s,n=Math.floor(r/360);l&&(r=-r,n=Math.floor(-r/360));const d=Math.max(Math.min(t.progress,1),-1);let m=0,f=0,g=0;s%4==0?(m=4*-n*o,g=0):(s-1)%4==0?(m=0,g=4*-n*o):(s-2)%4==0?(m=o+4*n*o,g=o):(s-3)%4==0&&(m=-o,g=3*o+4*o*n),l&&(m=-m),p||(f=m,m=0);const v=`rotateX(${p?0:-r}deg) rotateY(${p?r:0}deg) translate3d(${m}px, ${f}px, ${g}px)`;d<=1&&d>-1&&(h=90*s+90*d,l&&(h=90*-s-90*d)),t.style.transform=v,c.slideShadows&&i(t,d,p)}if(s.style.transformOrigin=`50% 50% -${o/2}px`,s.style["-webkit-transform-origin"]=`50% 50% -${o/2}px`,c.shadow)if(p)m.style.transform=`translate3d(0px, ${r/2+c.shadowOffset}px, ${-r/2}px) rotateX(90deg) rotateZ(0deg) scale(${c.shadowScale})`;else{const e=Math.abs(h)-90*Math.floor(Math.abs(h)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=c.shadowScale,a=c.shadowScale/t,i=c.shadowOffset;m.style.transform=`scale3d(${s}, 1, ${a}) translate3d(0px, ${n/2+i}px, ${-n/2/a}px) rotateX(-90deg)`}const g=(d.isSafari||d.isWebView)&&d.needPerspectiveFix?-o/2:0;s.style.transform=`translate3d(0px,0,${g}px) rotateX(${t.isHorizontal()?0:h}deg) rotateY(${t.isHorizontal()?-h:0}deg)`,s.style.setProperty("--swiper-cube-translate-z",`${g}px`)},setTransition:e=>{const{el:s,slides:a}=t;if(a.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top,.swiper-slide-shadow-right,.swiper-slide-shadow-bottom,.swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=s.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const s=Math.max(Math.min(t.progress,1),-1);i(t,s,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,s)=>{let a=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=de("flip",e,t.isHorizontal()?"left":"top")),i||(i=de("flip",e,t.isHorizontal()?"right":"bottom")),a&&(a.style.opacity=Math.max(-s,0)),i&&(i.style.opacity=Math.max(s,0))};ne({effect:"flip",swiper:t,on:a,setTranslate:()=>{const{slides:e,rtlTranslate:s}=t,a=t.params.flipEffect;for(let r=0;r<e.length;r+=1){const n=e[r];let l=n.progress;t.params.flipEffect.limitRotation&&(l=Math.max(Math.min(n.progress,1),-1));const o=n.swiperSlideOffset;let d=-180*l,c=0,p=t.params.cssMode?-o-t.translate:-o,u=0;t.isHorizontal()?s&&(d=-d):(u=p,p=0,c=-d,d=0),n.style.zIndex=-Math.abs(Math.round(l))+e.length,a.slideShadows&&i(n,l);const m=`translate3d(${p}px, ${u}px, 0px) rotateX(${c}deg) rotateY(${d}deg)`;le(0,n).style.transform=m}},setTransition:e=>{const s=t.slides.map((e=>m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top,.swiper-slide-shadow-right,.swiper-slide-shadow-bottom,.swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),oe({swiper:t,duration:e,transformElements:s})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let s=e.progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(e.progress,1),-1)),i(e,s)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),ne({effect:"coverflow",swiper:t,on:a,setTranslate:()=>{const{width:e,height:s,slides:a,slidesSizesGrid:i}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth;for(let e=0,t=a.length;e<t;e+=1){const t=a[e],s=i[e],l=(o-t.swiperSlideOffset-s/2)/s,p="function"==typeof r.modifier?r.modifier(l):l*r.modifier;let u=n?d*p:0,m=n?0:d*p,h=-c*Math.abs(p),f=r.stretch;"string"==typeof f&&-1!==f.indexOf("%")&&(f=parseFloat(r.stretch)/100*s);let g=n?0:f*p,v=n?f*p:0,w=1-(1-r.scale)*Math.abs(p);Math.abs(v)<.001&&(v=0),Math.abs(g)<.001&&(g=0),Math.abs(h)<.001&&(h=0),Math.abs(u)<.001&&(u=0),Math.abs(m)<.001&&(m=0),Math.abs(w)<.001&&(w=0);const b=`translate3d(${v}px,${g}px,${h}px)  rotateX(${m}deg) rotateY(${u}deg) scale(${w})`;if(le(0,t).style.transform=b,t.style.zIndex=1-Math.abs(Math.round(p)),r.slideShadows){let e=n?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),s=n?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=de("coverflow",t,n?"left":"top")),s||(s=de("coverflow",t,n?"right":"bottom")),e&&(e.style.opacity=p>0?p:0),s&&(s.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top,.swiper-slide-shadow-right,.swiper-slide-shadow-bottom,.swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;ne({effect:"creative",swiper:t,on:a,setTranslate:()=>{const{slides:e,wrapperEl:s,slidesSizesGrid:a}=t,r=t.params.creativeEffect,{progressMultiplier:n}=r,l=t.params.centeredSlides;if(l){const e=a[0]/2-t.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${e}px))`}for(let s=0;s<e.length;s+=1){const a=e[s],o=a.progress,d=Math.min(Math.max(a.progress,-r.limitProgress),r.limitProgress);let c=d;l||(c=Math.min(Math.max(a.originalProgress,-r.limitProgress),r.limitProgress));const p=a.swiperSlideOffset,u=[t.params.cssMode?-p-t.translate:-p,0,0],m=[0,0,0];let h=!1;t.isHorizontal()||(u[1]=u[0],u[0]=0);let f={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d<0?(f=r.next,h=!0):d>0&&(f=r.prev,h=!0),u.forEach(((e,t)=>{u[t]=`calc(${e}px + (${i(f.translate[t])} * ${Math.abs(d*n)}))`})),m.forEach(((e,t)=>{m[t]=f.rotate[t]*Math.abs(d*n)})),a.style.zIndex=-Math.abs(Math.round(o))+e.length;const g=u.join(","),v=`rotateX(${m[0]}deg) rotateY(${m[1]}deg) rotateZ(${m[2]}deg)`,w=c<0?`scale(${1+(1-f.scale)*c*n})`:`scale(${1-(1-f.scale)*c*n})`,b=c<0?1+(1-f.opacity)*c*n:1-(1-f.opacity)*c*n,y=`translate3d(${g}) ${v} ${w}`;if(h&&f.shadow||!h){let e=a.querySelector(".swiper-slide-shadow");if(!e&&f.shadow&&(e=de("creative",a)),e){const t=r.shadowPerProgress?d*(1/r.limitProgress):d;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const E=le(0,a);E.style.transform=y,E.style.opacity=b,f.origin&&(E.style.transformOrigin=f.origin)}},setTransition:e=>{const s=t.slides.map((e=>m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),oe({swiper:t,duration:e,transformElements:s,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e'){let{swiper:t,extendParams:s,on:a}=e;s({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),ne({effect:"cards",swiper:t,on:a,setTranslate:()=>{const{slides:e,activeIndex:s,rtlTranslate:a}=t,i=t.params.cardsEffect,{startTranslate:r,isTouched:n}=t.touchEventsData,l=a?-t.translate:t.translate;for(let o=0;o<e.length;o+=1){const d=e[o],c=d.progress,p=Math.min(Math.max(c,-4),4);let u=d.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(u-=e[0].swiperSlideOffset);let m=t.params.cssMode?-u-t.translate:-u,h=0;const f=-100*Math.abs(p);let g=1,v=-i.perSlideRotate*p,w=i.perSlideOffset-.75*Math.abs(p);const b=t.virtual&&t.params.virtual.enabled?t.virtual.from+o:o,y=(b===s||b===s-1)&&p>0&&p<1&&(n||t.params.cssMode)&&l<r,E=(b===s||b===s+1)&&p<0&&p>-1&&(n||t.params.cssMode)&&l>r;if(y||E){const e=(1-Math.abs((Math.abs(p)-.5)/.5))**.5;v+=-28*p*e,g+=-.5*e,w+=96*e,h=-25*e*Math.abs(p)+"%"}if(m=p<0?`calc(${m}px ${a?"-":"+"} (${w*Math.abs(p)}%))`:p>0?`calc(${m}px ${a?"-":"+"} (-${w*Math.abs(p)}%))`:`${m}px`,!t.isHorizontal()){const e=h;h=m,m=e}const x=p<0?""+(1+(1-g)*p):""+(1-(1-g)*p),S=`\n        translate3d(${m}, ${h}, ${f}px)\n        rotateZ(${i.rotate?a?-v:v:0}deg)\n        scale(${x})\n      `;if(i.slideShadows){let e=d.querySelector(".swiper-slide-shadow");e||(e=de("cards",d)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(p)-.5)/.5,0),1))}d.style.zIndex=-Math.abs(Math.round(c))+e.length;le(0,d).style.transform=S}},setTransition:e=>{const s=t.slides.map((e=>m('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/e')));s.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),oe({swiper:t,duration:e,transformElements:s})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return Q.use(ce),Q}();
//# sourceMappingURL=swiper-bundle.min.js.map
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){"use strict";const e=(t,e=1e4)=>(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),i=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(!(t&&t instanceof Element&&t.offsetParent))return!1;const e=t.scrollHeight>t.clientHeight,i=window.getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&&!n&&!s},n=function(t,e=void 0){return!(!t||t===document.body||e&&t===e)&&(i('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?t:n(t.parentElement,e))},s=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount>1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild},o=t=>`${t||""}`.split(" ").filter((t=>!!t)),a=(t,e,i)=>{o(e).forEach((e=>{t&&t.classList.toggle(e,i||!1)}))};class r{constructor('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.time=Date.now()}}const l={passive:!1};class c{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(const t of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[t]=this[t].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(!t.buttons||0!==t.button)return;const e=new r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');this.currentPointers.some((t=>t.id===e.id))||this.triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerStart(new r(e),t);window.addEventListener("blur",this.onWindowBlur)}onMove('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((t=>new r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))):[new r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')],n=[];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(n.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.currentPointers[e]=t)}n.length&&this.moveCallback(t,this.currentPointers.slice(),e)}onPointerEnd('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t.buttons>0&&0!==t.button||(this.triggerPointerEnd(t,new r('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerEnd(t,new r(e))}triggerPointerStart(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&&(this.currentPointers.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.startPointers.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),!0)}triggerPointerEnd(t,e){const i=this.currentPointers.findIndex((t=>t.id===e.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const t=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}),t,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function h(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function d(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}const u=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),p=(t,...e)=>{const i=e.length;for(let n=0;n<i;n++){const i=e[n]||{};Object.entries(i).forEach((([e,i])=>{const n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,{[e]:n}),u(i)?Object.assign(t[e],p(n,i)):Array.isArray(i)?Object.assign(t,{[e]:[...i]}):Object.assign(t,{[e]:i})}))}return t},f=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class m{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.options=t?p({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=f(t,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=f(e,t);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,t,...n));let a=f(e,this.options);return a&&"function"==typeof a?s=a.call(this,this,t,...n,s):void 0===s&&(s=a),void 0===s?i:s}cn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=>{let n="";return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;i<e.length;i++)t=t.split(e[i][0]).join(e[i][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&(i=t),this.events||(this.events=new Map),i.forEach((t=>{let i=this.events.get('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&(i=t),i.forEach((t=>{const i=this.events.get('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(Array.isArray(i)){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}))}emit(t,...e){[...this.events.get('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(m,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.20"}),Object.defineProperty(m,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class g extends m{constructor(t={}){super('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(t={}){const e=new Map;for(const[i,n]of Object.entries('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')){const t=this.option(i),s=this.plugins[i];s||!1===t?s&&!1===t&&(s.detach(),delete this.plugins[i]):e.set(i,new n(this,t||{}))}for(const[t,i]of e)this.plugins[t]=i,i.attach();this.emit("attachPlugins")}detachPlugins('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t=t||Object.keys(this.plugins);for(const e of t){const t=this.plugins[e];t&&t.detach(),delete this.plugins[e]}return this.emit("detachPlugins"),this}}var b;!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(b||(b={}));const v=["a","b","c","d","e","f"],y={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},w={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:y},x='<div class="f-spinner"><svg viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle><circle cx="25" cy="25" r="20"></circle></svg></div>',E=t=>t&&null!==t&&t instanceof Element&&"nodeType"in t,S=(t,e)=>{t&&o(e).forEach((e=>{t.classList.remove(e)}))},P=(t,e)=>{t&&o(e).forEach((e=>{t.classList.add(e)}))},C={a:1,b:0,c:0,d:1,e:0,f:0},M=1e5,T=1e3,O="mousemove",A="drag",z="content";let L=null,R=null;class k extends g{get isTouchDevice(){return null===R&&(R=window.matchMedia("(hover:none)").matches),R}get isMobile(){return null===L&&(L=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),L}get panMode(){return this.options.panMode!==O||this.isTouchDevice?A:O}get panOnlyZoomed(){const t=this.options.panOnlyZoomed;return"auto"===t?this.isTouchDevice:t}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:t,b:e}=this.current;return Math.sqrt(t*t+e*e)||1}get targetScale(){const{a:t,b:e}=this.target;return Math.sqrt(t*t+e*e)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:t}=this;return t.fullWidth/t.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:t,contentRect:e}=this,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const t=this.content;return!!(t&&t instanceof HTMLImageElement)&&!t.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const t of v){const e="e"==t||"f"===t?.001:1e-5;if(Math.abs(this.target[t]-this.current[t])>e)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(t,e={},i={}){var n;if(super(e),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:b.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},C)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},C)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");this.container=t,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},k.Plugins),i)),this.emit("init");const o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){t.classList.add(this.cn("isLoading"));const e=s(x);!t.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=t.appendChild(e):this.spinner=(null===(n=o.parentElement)||void 0===n?void 0:n.insertBefore(e,o))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'))}initContent(){const{container:t}=this,e=this.cn(z);let i=this.option(z)||t.querySelector(`.${e}`);if(i||(i=t.querySelector("img,picture")||t.firstElementChild,i&&P(i,e)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){this.spinner&&(this.spinner.remove(),this.spinner=null),this.option("spinner")&&this.container.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),this.state===b.Init?this.enable():this.updateMetrics()}onError(){this.state!==b.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=b.Error,this.emit("error"))}attachObserver(){var t;const e=()=>Math.abs(this.containerRect.width-this.container.getBoundingClientRect().width)>.1||Math.abs(this.containerRect.height-this.container.getBoundingClientRect().height)>.1;this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(e()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{e()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}detachObserver(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}attachEvents(){const{container:t}=this;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(O,this.onMouseMove)}detachEvents(){var t;const{container:e}=this;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(O,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){const t=this.friction;this.setTargetForce();const e=this.option("maxVelocity");for(const i of v)t?(this.velocity[i]*=1-t,e&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],e),-1*e)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const t of v)"e"===t&&this.isBouncingX||"f"===t&&this.isBouncingY||(this.velocity[t]=(1/(1-this.friction)-1)*(this.target[t]-this.current[t]))}checkBounds(t=0,e=0){const{current:i}=this,n=i.e+t,s=i.f+e,o=this.getBounds(),{x:a,y:r}=o,l=a.min,c=a.max,h=r.min,d=r.max;let u=0,p=0;return l!==1/0&&n<l?u=l-n:c!==1/0&&n>c&&(u=c-n),h!==1/0&&s<h?p=h-s:d!==1/0&&s>d&&(p=d-s),Math.abs(u)<.001&&(u=0),Math.abs(p)<.001&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){const{target:t}=this,{x:e,y:i}=this.getBounds();e.min!==1/0&&(t.e=Math.max(t.e,e.min)),e.max!==1/0&&(t.e=Math.min(t.e,e.max)),i.min!==1/0&&(t.f=Math.max(t.f,i.min)),i.max!==1/0&&(t.f=Math.min(t.f,i.max))}calculateContentDim(t=this.current){const{content:e,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i;let r=o,l=a;if(this.option("zoom")||0!==this.angle){const i=!(e instanceof HTMLImageElement)&&("none"===window.getComputedStyle(e).maxWidth||"none"===window.getComputedStyle(e).maxHeight),c=i?o:n,h=i?a:s,d=this.getMatrix('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+c,0).matrixTransform(d),f=new DOMPoint(0+c,0+h).matrixTransform(d),m=new DOMPoint(0,0+h).matrixTransform(d),g=Math.abs(f.x-u.x),b=Math.abs(f.y-u.y),v=Math.abs(m.x-p.x),y=Math.abs(m.y-p.y);r=Math.max(g,v),l=Math.max(b,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===O||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:t}=this,{x:e,y:i,xDiff:n,yDiff:s}=this.checkBounds();const o=this.option("maxVelocity");let a=this.velocity.e,r=this.velocity.f;0!==n?(this.isBouncingX=!0,n*a<=0?a+=.14*n:(a=.14*n,e.min!==1/0&&(this.target.e=Math.max(t.e,e.min)),e.max!==1/0&&(this.target.e=Math.min(t.e,e.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*r<=0?r+=.14*s:(r=.14*s,i.min!==1/0&&(this.target.f=Math.max(t.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(t.f,i.max))),o&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a),this.isBouncingY&&(this.velocity.f=r)}enable(){const{content:t}=this,e=new DOMMatrixReadOnly(window.getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').transform);for(const t of v)this.current[t]=this.target[t]=e[t];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=b.Ready,this.emit("ready")}onClick('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;this.isDragging&&(null===(e=this.pointerTracker)||void 0===e||e.clear(),this.trackingPoints=[],this.startDecelAnim());const i=t.target;if(!i||t.defaultPrevented)return;if(i&&i.hasAttribute("disabled"))return t.preventDefault(),void t.stopPropagation();if((()=>{const t=window.getSelection();return t&&"Range"===t.type})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&E(o)?o.dataset:null;if(a){const e=a.panzoomChange,i=a.panzoomAction;if((e||i)&&t.preventDefault(),e){let t={};try{t=JSON.parse(e)}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){console&&console.warn("The given data was not valid JSON")}return void this.applyChange('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return t.preventDefault(),void t.stopPropagation();const r=this.content.getBoundingClientRect();if(this.dragStart.time&&!this.canZoomOut()&&(Math.abs(r.x-this.dragStart.x)>2||Math.abs(r.y-this.dragStart.y)>2))return;this.dragStart.time=0;const l=e=>{this.option("zoom")&&e&&"string"==typeof e&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&&"function"==typeof this[e]&&(t.preventDefault(),this[e]({event:t}))},c=this.option("click",t),h=this.option("dblClick",t);h?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",t),!t.defaultPrevented&&c&&l(c)):(this.emit("dblClick",t),t.defaultPrevented||l(h)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&&c&&l(c))}addTrackingPoint('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.trackingPoints.filter((t=>t.time>Date.now()-100));e.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.trackingPoints=e}onPointerDown(t,e,i){var n;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===O&&this.targetScale>1)return t.preventDefault(),t.stopPropagation(),!1;if(!i.length){const e=t.composedPath()[0];if(["A","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName)||e.closest("[contenteditable]")||e.closest("[data-selectable]")||e.closest("[data-draggable]")||e.closest("[data-clickable]")||e.closest("[data-panzoom-change]")||e.closest("[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)t.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit("touchStart",t)),!0}onPointerMove(t,i,s){if(!1===this.option("touch",t))return;if(!this.isDragging)return;if(i.length<2&&this.panOnlyZoomed&&e(this.targetScale)<=e(this.minScale))return;if(this.emit("touchMove",t),t.defaultPrevented)return;this.addTrackingPoint(i[0]);const{content:o}=this,a=d(s[0],s[1]),r=d(i[0],i[1]);let l=0,c=0;if(i.length>1){const t=o.getBoundingClientRect();l=a.clientX-t.left-.5*t.width,c=a.clientY-t.top-.5*t.height}const u=h(s[0],s[1]),p=h(i[0],i[1]);let f=u?p/u:1,m=r.clientX-a.clientX,g=r.clientY-a.clientY;this.dragOffset.x+=m,this.dragOffset.y+=g,this.dragOffset.time=Date.now()-this.dragStart.time;let b=e(this.targetScale)===e(this.minScale)&&this.option("lockAxis");if(b&&!this.lockedAxis)if("xy"===b||"y"===b||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void t.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=e>45&&e<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,m=0,g=0}else this.lockedAxis=b;if(n(t.target,this.content)&&(b="x",this.dragOffset.y=0),b&&"xy"!==b&&this.lockedAxis!==b&&e(this.targetScale)===e(this.minScale))return;t.cancelable&&t.preventDefault(),this.container.classList.add(this.cn("isDragging"));const v=this.checkBounds(m,g);this.option("rubberband")?("x"!==this.isInfinite&&(v.xDiff>0&&m<0||v.xDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*v.xDiff))),"y"!==this.isInfinite&&(v.yDiff>0&&g<0||v.yDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*v.yDiff)))):(v.xDiff&&(m=0),v.yDiff&&(g=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(f=Math.max(f,w)),y>1.5*x&&(f=Math.min(f,x)),"y"===this.lockedAxis&&e(y)===e(w)&&(m=0),"x"===this.lockedAxis&&e(y)===e(w)&&(g=0),this.applyChange({originX:l,originY:c,panX:m,panY:g,scale:f,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(e),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),n(t.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==b.Destroy&&(t.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var t;const i=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of v)this.velocity[t]=0;this.target.e=this.current.e,this.target.f=this.current.f,S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,s=n[0],o=n[n.length-1];let a=0,r=0,l=0;o&&s&&(a=o.clientX-s.clientX,r=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&&(a*=c,r*=c);let h=0,d=0,u=0,p=0,f=this.option("decelFriction");const m=this.targetScale;if(l>0){u=Math.abs(a)>3?a/(l/30):0,p=Math.abs(r)>3?r/(l/30):0;const t=this.option("maxVelocity");t&&(u=Math.max(Math.min(u,t),-1*t),p=Math.max(Math.min(p,t),-1*t))}u&&(h=u/(1/(1-f)-1)),p&&(d=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&e(m)===this.minScale)&&(h=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&e(m)===this.minScale)&&(d=p=0);const g=this.dragOffset.x,b=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(g)<y&&Math.abs(b)<y&&(h=d=0,u=p=0),(m<this.minScale-1e-5||m>this.maxScale+1e-5||i&&!h&&!d)&&(f=.35),this.applyChange({panX:h,panY:d,friction:f}),this.emit("decel",u,p,g,b)}onWheel('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?e:t}));const i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode===O)return;if(t.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&&!1!==this.option("zoom")&&this.zoomWithWheel('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}onMouseMove('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.panWithMouse('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}onKeydown('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){"Escape"===t.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:t,target:i,content:n,contentRect:s}=this,o=Object.assign({},C);for(const n of v){const s="e"==n||"f"===n?T:M;o[n]=e(t[n],s),Math.abs(i[n]-t[n])<("e"==n||"f"===n?.51:.001)&&(t[n]=i[n])}let{a:a,b:r,c:l,d:c,e:h,f:d}=o,u=`matrix(${a}, ${r}, ${l}, ${c}, ${h}, ${d})`,p=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(p=p.parentElement||p),p.style.transform===u)return;p.style.transform=u;const{contentWidth:f,contentHeight:m}=this.calculateContentDim();s.width=f,s.height=m,this.emit("afterTransform")}updateMetrics(t=!1){var i;if(!this||this.state===b.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),{container:s,content:o}=this,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=r.width*n,h=r.height*n;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=h-d;this.containerRect={width:c,height:h,innerWidth:u,innerHeight:p};let f=this.option("width")||"auto",m=this.option("height")||"auto";"auto"===f&&(f=parseFloat(o.dataset.width||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth),e||0})(o)),"auto"===m&&(m=parseFloat(o.dataset.height||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight),e||0})(o));let g=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(g=g.parentElement||g);const v=g.getAttribute("style")||"";g.style.setProperty("transform","none","important"),a&&(g.style.width="",g.style.height=""),g.offsetHeight;const y=o.getBoundingClientRect();let w=y.width*n,x=y.height*n,E=0,S=0;a&&(Math.abs(f-w)>1||Math.abs(m-x)>1)&&({width:w,height:x,top:E,left:S}=((t,e,i,n)=>{const s=i/n;return s>t/e?(i=t,n=t/s):(i=e*s,n=e),{width:i,height:n,top:.5*(e-n),left:.5*(t-i)}})(w,x,f,m)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:y.top-r.top+E,bottom:r.bottom-y.bottom+E,left:y.left-r.left+S,right:r.right-y.right+S,fitWidth:w,fitHeight:x,width:w,height:x,fullWidth:f,fullHeight:m}),g.style.cssText=v,a&&(g.style.width=`${w}px`,g.style.height=`${x}px`),this.setTransform(),!0!==t&&this.emit("refresh"),this.ignoreBounds||(e(this.targetScale)<e(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===b.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}getBounds(){const t=this.option("bounds");if("auto"!==t)return t;const{contentWidth:i,contentHeight:n}=this.calculateContentDim(this.target);let s=0,o=0,a=0,r=0;const l=this.option("infinite");if(!0===l||this.lockedAxis&&l===this.lockedAxis)s=-1/0,a=1/0,o=-1/0,r=1/0;else{let{containerRect:t,contentRect:l}=this,c=e(this.contentRect.fitWidth*this.targetScale,T),h=e(this.contentRect.fitHeight*this.targetScale,T),{innerWidth:d,innerHeight:u}=t;if(this.containerRect.width===c&&(d=t.width),this.containerRect.width===h&&(u=t.height),i>d){a=.5*(i-d),s=-1*a;let t=.5*(l.right-l.left);s+=t,a+=t}if(this.contentRect.fitWidth>d&&i<d&&(s-=.5*(this.contentRect.fitWidth-d),a-=.5*(this.contentRect.fitWidth-d)),n>u){r=.5*(n-u),o=-1*r;let t=.5*(l.bottom-l.top);o+=t,r+=t}this.contentRect.fitHeight>u&&n<u&&(s-=.5*(this.contentRect.fitHeight-u),a-=.5*(this.contentRect.fitHeight-u))}return{x:{min:s,max:a},y:{min:o,max:r}}}updateControls(){const t=this,i=t.container,{panMode:n,contentRect:s,fullScale:o,targetScale:r,coverScale:l,maxScale:c,minScale:h}=t;let d={toggleMax:r-h<.5*(c-h)?c:h,toggleCover:r-h<.5*(l-h)?l:h,toggleZoom:r-h<.5*(o-h)?o:h}[t.option("click")||""]||h,u=t.canZoomIn(),p=t.canZoomOut(),f=p&&n===A;e(r)<e(h)&&!this.panOnlyZoomed&&(f=!0),(e(s.width,1)>e(s.fitWidth,1)||e(s.height,1)>e(s.fitHeight,1))&&(f=!0),e(s.width*r,1)<e(s.fitWidth,1)&&(f=!1),n===O&&(f=!1);let m=u&&e(d)>e(r),g=!m&&!f&&p&&e(d)<e(r);a(i,this.cn("canZoomIn"),m),a(i,this.cn("canZoomOut"),g),a(i,this.cn("isDraggable"),f);for(const t of i.querySelectorAll('[data-panzoom-action="zoomIn"]'))u?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of i.querySelectorAll('[data-panzoom-action="zoomOut"]'))p?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of i.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){u||p?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&&(e.style.display=u?"":"none")}}panTo({x:t=this.target.e,y:e=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:a=0,flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==b.Destroy&&this.applyChange({panX:t-this.target.e,panY:e-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:a,friction:n,flipX:r,flipY:l,ignoreBounds:c})}applyChange({panX:t=0,panY:i=0,scale:n=1,angle:s=0,originX:o=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:h=!1,bounce:d=this.option("bounce")}){if(this.state===b.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=h;const{current:u}=this,p=u.e,f=u.f,m=this.getMatrix(this.target);let g=(new DOMMatrix).translate(p,f).translate(o,a).translate(t,i);if(this.option("zoom")){if(!h){const t=this.targetScale,e=this.minScale,i=this.maxScale;t*n<e&&(n=e/t),t*n>i&&(n=i/t)}g=g.scale(n)}g=g.translate(-o,-a).translate(-p,-f).multiply(m),s&&(g=g.rotate(s)),l&&(g=g.scale(-1,1)),c&&(g=g.scale(1,-1));for(const t of v)"e"!==t&&"f"!==t&&(g[t]>this.minScale+1e-5||g[t]<this.minScale-1e-5)?this.target[t]=g[t]:this.target[t]=e(g[t],T);(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===O||!1===d)&&!h&&this.clampTargetBounds(),this.isResting||(this.state=b.Panning,this.requestTick())}stop(t=!1){if(this.state===b.Init||this.state===b.Destroy)return;const e=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of v)this.velocity[e]=0,"current"===t?this.current[e]=this.target[e]:"target"===t&&(this.target[e]=this.current[e]);this.setTransform(),S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1,this.state=b.Ready,e&&(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),P(this.container,"is-animating"),this.isScaling&&P(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(t,i=this.option("mouseMoveFriction")){if(this.pmme=t,this.panMode!==O||!t)return;if(e(this.targetScale)<=e(this.minScale))return;this.emit("mouseMove",t);const{container:n,containerRect:s,contentRect:o}=this,a=s.width,r=s.height,l=n.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const p=this.option("mouseMoveFactor");p>1&&(d!==a&&(d*=p),u!==r&&(u*=p));let f=.5*(d-a)-c/a*100/100*(d-a);f+=.5*(o.right-o.left);let m=.5*(u-r)-h/r*100/100*(u-r);m+=.5*(o.bottom-o.top),this.applyChange({panX:f-this.target.e,panY:m-this.target.f,friction:i})}zoomWithWheel('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(this.state===b.Destroy||this.state===b.Init)return;const i=Date.now();if(i-this.pwt<45)return void t.preventDefault();this.pwt=i;var n=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?e:t}));const s=Math.max(-1,Math.min(1,n)),{targetScale:o,maxScale:a,minScale:r}=this;let l=o*(100+45*s)/100;e(l)<e(r)&&e(o)<=e(r)?(this.cwd+=Math.abs(s),l=r):e(l)>e(a)&&e(o)>=e(a)?(this.cwd+=Math.abs(s),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd>this.option("wheelLimit")||(t.preventDefault(),e(l)!==e(o)&&this.zoomTo(l,{event:t}))}canZoomIn(){return this.option("zoom")&&(e(this.contentRect.width,1)<e(this.contentRect.fitWidth,1)||e(this.targetScale)<e(this.maxScale))}canZoomOut(){return this.option("zoom")&&e(this.targetScale)>e(this.minScale)}zoomIn(t=1.25,e){this.zoomTo(this.targetScale*t,e)}zoomOut(t=.8,e){this.zoomTo(this.targetScale*t,e)}zoomToFit('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo("fit",t)}zoomToCover('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo("cover",t)}zoomToFull('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo("full",t)}zoomToMax('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo("max",t)}toggleZoom('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo(this.targetScale-this.minScale<.5*(this.fullScale-this.minScale)?"full":"fit",t)}toggleMax('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo(this.targetScale-this.minScale<.5*(this.maxScale-this.minScale)?"max":"fit",t)}toggleCover('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo(this.targetScale-this.minScale<.5*(this.coverScale-this.minScale)?"cover":"fit",t)}iterateZoom('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.zoomTo("next",t)}zoomTo(t=1,{friction:e="auto",originX:i=0,originY:n=0,event:s}={}){if(this.isContentLoading||this.state===b.Destroy)return;const{targetScale:o}=this;this.stop();let a=1;if(this.panMode===O&&(s=this.pmme||s),s){const t=this.content.getBoundingClientRect(),e=s.clientX||0,o=s.clientY||0;i=e-t.left-.5*t.width,n=o-t.top-.5*t.height}const r=this.fullScale,l=this.maxScale;let c=this.coverScale;"number"==typeof t?a=t/o:("next"===t&&(r-c<.2&&(c=r),t=o<r-1e-5?"full":o<l-1e-5?"max":"fit"),a="full"===t?r/o||1:"cover"===t?c/o||1:"max"===t?l/o||1:1/o||1),e="auto"===e?a>1?.15:.25:e,this.applyChange({scale:a,originX:i,originY:n,friction:e}),s&&this.panMode===O&&this.panWithMouse(s,e)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHeight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:t}=this,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);const n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(t=this.current){const{a:e,b:i,c:n,d:s,e:o,f:a}=t;return new DOMMatrix([e,i,n,s,o,a])}reset('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(this.state!==b.Init&&this.state!==b.Destroy){this.stop("current");for(const t of v)this.target[t]=C[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=b.Panning,this.requestTick())}}destroy(){this.stop(),this.state=b.Destroy,this.detachEvents(),this.detachObserver();const{container:t,content:e}=this,i=this.option("classes")||{};for(const e of Object.values(i))t.classList.remove(e+"");e&&(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(k,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(k,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const I=function(t,e){let i=!0;return(...n)=>{i&&(i=!1,t(...n),setTimeout((()=>{i=!0}),e))}},D=(t,e)=>{let i=[];return t.childNodes.forEach((t=>{t.nodeType!==Node.ELEMENT_NODE||e&&!t.matches(e)||i.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')})),i},F={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var j;!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(j||(j={}));const H=t=>{if("string"==typeof t&&(t={html:t}),!(t instanceof String||t instanceof HTMLElement)){const e=t.thumb;void 0!==e&&("string"==typeof e&&(t.thumbSrc=e),e instanceof HTMLImageElement&&(t.thumbEl=e,t.thumbElSrc=e.src,t.thumbSrc=e.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},B=(t={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},t);class N extends m{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}const _={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2};class W extends N{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let t=this.list;return t||(t=document.createElement("ul"),P(t,this.cn("list")),t.setAttribute("role","tablist"),this.instance.container.appendChild('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),P(this.instance.container,this.cn("hasDots")),this.list=t),t}refresh(){var t;const e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(e<i||e>n)return void this.cleanup();const o="number"==typeof s&&e>5&&e>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&&this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(let t=0;t<e;t++)l.append(this.createItem('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'));let c,h=0;for(const e of[...l.children]){const i=h===this.instance.page;i&&(c=e),a(e,this.cn("isCurrent"),i),null===(t=e.children[0])||void 0===t||t.setAttribute("aria-selected",i?"true":"false");for(const t of["isBeforePrev","isPrev","isNext","isAfterNext"])S(e,this.cn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'));h++}if(c=c||l.firstChild,o&&c){const t=c.previousElementSibling,e=t&&t.previousElementSibling;P(t,this.cn("isPrev")),P(e,this.cn("isBeforePrev"));const i=c.nextElementSibling,n=i&&i.nextElementSibling;P(i,this.cn("isNext")),P(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(t=0){var e;const i=document.createElement("li");i.setAttribute("role","presentation");const n=s(this.instance.localize(this.option("dotTpl"),[["%d",t+1]]).replace(/\%i/g,t+""));return i.appendChild(n),null===(e=i.children[0])||void 0===e||e.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,S(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(W,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:_});const $="disabled",X="next",Y="prev";class q extends N{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){const t=this.instance,e=t.pages.length,i=t.page;if(e<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute($),s.removeAttribute($),t.isInfinite||(i<=0&&n.setAttribute($,""),i>=e-1&&s.setAttribute($,"")))}createButton('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.instance,i=document.createElement("button");i.setAttribute("tabindex","0"),i.setAttribute("title",e.localize(`{{${t.toUpperCase()}}}`)),P(i,this.cn("button")+" "+this.cn(t===X?"isNext":"isPrev"));const n=e.isRTL?t===X?Y:X:t;var s;return i.innerHTML=e.localize(this.option(`${n}Tpl`)),i.dataset[`carousel${s=t,s?s.match("^[a-z]")?s.charAt(0).toUpperCase()+s.substring(1):s:""}`]="true",i}build(){let t=this.container;t||(this.container=t=document.createElement("div"),P(t,this.cn("container")),this.instance.container.appendChild('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')),this.next||(this.next=t.appendChild(this.createButton(X))),this.prev||(this.prev=t.appendChild(this.createButton(Y)))}cleanup(){this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove(),this.prev=null,this.next=null,this.container=null}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class V extends N{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.target=this.instance,this.nav=t,this.attachEvents()}addAsNavFor('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.nav=this.instance,this.target=t,this.attachEvents()}attachEvents(){this.nav&&this.target&&(this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.state===j.Ready&&this.onNavReady(this.nav),this.target.on("ready",this.onTargetReady),this.target.state===j.Ready&&this.onTargetReady(this.target))}onNavReady('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(t,e,i){i.pointerType||this.onNavTouch(t,t.panzoom,i)}onNavTouch(t,e,i){var n,s;if(Math.abs(e.dragOffset.x)>3||Math.abs(e.dragOffset.y)>3)return;const o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=r.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),r.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){const{target:t,nav:e}=this;if(!t||!e)return;if(e.state!==j.Ready||t.state!==j.Ready)return;const i=t.pages[t.page].slides[0].index,n=e.getPageForSlide(i);this.markSelectedSlide(i),e.slideTo(n)}markSelectedSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.nav;e&&e.state===j.Ready&&(this.selectedIndex=t,[...e.slides].map((e=>{e.el&&e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}attach(){const t=this;let e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&&t.addAsTargetFor(i)}detach(){const t=this,e=t.nav,i=t.target;e&&(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&&(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}Object.defineProperty(V,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const Z={Navigation:q,Dots:W,Sync:V};class U extends g{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===j.Ready}get isInfinite(){let t=!1;const{contentDim:e,viewportDim:i,pages:n,slides:s}=this;return n.length>=2&&e+s[0].dim>=i&&(t=this.option("infinite")),t}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(t,e={},i={}){if(super(),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:j.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&&(t=document.querySelector('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')),!t||!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))throw new Error("No Element found");this.container=t,this.slideNext=I(this.slideNext.bind(this),150),this.slidePrev=I(this.slidePrev.bind(this),150),this.userOptions=e,this.userPlugins=i,queueMicrotask((()=>{this.processOptions('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'))}processOptions(){const t=p({},U.defaults,this.userOptions);let e="";const i=t.breakpoints;if(i&&u(i))for(const[n,s]of Object.entries(i))window.matchMedia(n).matches&&u(s)&&(e+=n,p(t,s));e===this.bp&&this.state!==j.Init||(this.bp=e,this.state===j.Ready&&(t.initialSlide=this.pages[this.page].slides[0].index),this.state!==j.Init&&this.destroy(),super.setOptions('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),0))}init(){this.state=j.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},U.Plugins),this.userPlugins)),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=j.Ready,this.emit("ready")}initLayout(){const{container:t}=this,e=this.option("classes");P(t,this.cn("container")),a(t,e.isLTR,!this.isRTL),a(t,e.isRTL,this.isRTL),a(t,e.isVertical,!this.isHorizontal),a(t,e.isHorizontal,this.isHorizontal);let i=this.option("viewport")||t.querySelector(`.${e.viewport}`);i||(i=document.createElement("div"),P(i,e.viewport),i.append(...D(t,`.${e.slide}`)),t.prepend(i));let n=this.option("track")||t.querySelector(`.${e.track}`);n||(n=document.createElement("div"),P(n,e.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:t}=this;if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.slides=[],[...D(t,`.${this.cn("slide")}`)].forEach((t=>{if(E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')){const e=H({el:t,isDom:!0,index:this.slides.length});this.slides.push(e),this.emit("initSlide",e,this.slides.length)}}));for(let t of this.option("slides",[])){const e=H('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');e.index=this.slides.length,this.slides.push(e),this.emit("initSlide",e,this.slides.length)}this.emit("initSlides")}}setInitialPage(){let t=0;const e=this.option("initialSlide");t="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0,this.page=t}setInitialPosition(){if(!this.track||!this.pages.length)return;const t=this.isHorizontal;let e=this.page;this.pages[e]||(this.page=e=0);const i=this.pages[e].pos*(this.isRTL&&t?1:-1),n=t?`${i}px`:"0",s=t?"0":`${i}px`;this.track.style.transform=`translate3d(${n}, ${s}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const t=this.option("Panzoom")||{};this.panzoom=new k(this.viewport,p({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:t=>!(this.pages.length<2&&!t.options.infinite),bounds:()=>this.getBounds(),maxVelocity:t=>Math.abs(t.target[this.axis]-t.current[this.axis])<2*this.viewportDim?100:0},t)),this.panzoom.on("*",((t,e,...i)=>{this.emit(`Panzoom.${e}`,t,...i)})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const t=this.container;t&&(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let t=[];const{contentDim:e,viewportDim:i}=this;let n=this.option("slidesPerPage");("number"!=typeof n||e<=i)&&(n=1/0);let s=0,o=0,a=0;for(const e of this.slides)(!t.length||o+e.dim>i||a===n)&&(t.push(B()),s=t.length-1,o=0,a=0),t[s].slides.push(e),o+=e.dim+e.gap,a++;return t}processPages(){const t=this.pages,{contentDim:i,viewportDim:n}=this,s=this.option("center"),o=this.option("fill"),a=o&&s&&i>n&&!this.isInfinite;if(t.forEach(((t,e)=>{t.index=e,t.pos=t.slides[0].pos,t.dim=0;for(const[e,i]of t.slides.entries())t.dim+=i.dim,e<t.slides.length-1&&(t.dim+=i.gap);a&&t.pos+.5*t.dim<.5*n?t.pos=0:a&&t.pos+.5*t.dim>=i-.5*n?t.pos=i-n:s&&(t.pos+=-.5*(n-t.dim))})),t.forEach(((t,s)=>{o&&!this.isInfinite&&i>n&&(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,i-n)),t.pos=e(t.pos,1e3),t.dim=e(t.dim,1e3),t.pos<.1&&t.pos>-.1&&(t.pos=0)})),this.isInfinite)return t;const r=[];let l;return t.forEach((t=>{const e=Object.assign({},t);l&&e.pos===l.pos?(l.dim+=e.dim,l.slides=[...l.slides,...e.slides]):(e.index=r.length,l=e,r.push(e))})),r}getPageFromIndex(t=0){const e=this.pages.length;let i;return t=parseInt((t||0).toString())||0,i=this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0),i}getSlideMetrics('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var i;const n=this.isHorizontal?"width":"height";let s=0,o=0,a=t.el;if(a?s=parseFloat(a.dataset[n]||"")||0:(a=document.createElement("div"),a.style.visibility="hidden",P(a,this.cn("slide")+" "+t.class),(this.track||document.body).prepend(a)),s)a.style[n]=`${s}px`,a.style["width"===n?"height":"width"]="";else{const t=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);s=a.getBoundingClientRect()[n]*t}const r=getComputedStyle(a);return"content-box"===r.boxSizing&&(this.isHorizontal?(s+=parseFloat(r.paddingLeft)||0,s+=parseFloat(r.paddingRight)||0):(s+=parseFloat(r.paddingTop)||0,s+=parseFloat(r.paddingBottom)||0)),o=parseFloat(r[this.isHorizontal?"marginRight":"marginBottom"])||0,t.el||a.remove(),{dim:e(s,1e3),gap:e(o,1e3)}}getBounds(){const{isInfinite:t,isRTL:e,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')s={min:-1/0,max:1/0};else if(n.length){const t=n[0].pos,o=n[n.length-1].pos;s=e&&i?{min:t,max:o}:{min:-1*o,max:-1*t}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let t,{isHorizontal:i,isRTL:n,isInfinite:s,viewport:o,viewportDim:a,contentDim:r,page:l,pages:c,slides:h,panzoom:d}=this,u=0,p=0,f=0,m=0;d?m=-1*d.current[this.axis]:c[l]&&(m=c[l].pos||0),t=i?n?"right":"left":"top",n&&i&&(m*=-1);for(const i of h)i.el?("top"===t?(i.el.style.right="",i.el.style.left=""):i.el.style.top="",i.index!==u?i.el.style[t]=0===p?"":`${e(p,1e3)}px`:i.el.style[t]="",f+=i.dim+i.gap,u++):p+=i.dim+i.gap;if(s&&f&&o){let n=getComputedStyle(o),s="padding",l=i?"Right":"Bottom",c=parseFloat(n[s+(i?"Left":"Top")]);m-=c,a+=c,a+=parseFloat(n[s+l]);for(const i of h)i.el&&(e(i.pos)<e(a)&&e(i.pos+i.dim+i.gap)<e(m)&&e(m)>e(r-a)&&(i.el.style[t]=`${e(p+f,1e3)}px`),e(i.pos+i.gap)>=e(r-a)&&e(i.pos)>e(m+a)&&e(m)<e(a)&&(i.el.style[t]=`-${e(f,1e3)}px`))}let g,b,v=[...this.inTransition];if(v.length>1&&(g=c[v[0]],b=c[v[1]]),g&&b){let i=0;for(const n of h)n.el?this.inTransition.has(n.index)&&g.slides.indexOf(n)<0&&(n.el.style[t]=`${e(i+(g.pos-b.pos),1e3)}px`):i+=n.dim+n.gap}}createSlideEl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const{track:e,slides:i}=this;if(!e||!t)return;if(t.el)return;const n=document.createElement("div");P(n,this.cn("slide")),P(n,t.class),P(n,t.customClass),t.html&&(n.innerHTML=t.html);const s=[];i.forEach(((t,e)=>{t.el&&s.push(e)}));const o=t.index;let a=null;if(s.length){a=i[s.reduce(((t,e)=>Math.abs(e-o)<Math.abs(t-o)?e:t))]}const r=a&&a.el?a.index<t.index?a.el.nextSibling:a.el:null;e.insertBefore(n,e.contains(r)?r:null),t.el=n,this.emit("createSlide",t)}removeSlideEl(t,e=!1){const i=t.el;if(!i)return;if(S(i,this.cn("isSelected")),t.isDom&&!e)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),S(i,this.cn("isSelected")),void(i.style.left="");this.emit("removeSlide",t);const n=new CustomEvent("animationend");i.dispatchEvent(n),t.el&&t.el.remove(),t.el=null}transitionTo(t=0,i=this.option("transition")){if(!i)return!1;const{pages:n,panzoom:s}=this;t=parseInt((t||0).toString())||0;const o=this.getPageFromIndex('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(!s||!n[o]||n.length<2||Math.abs(n[this.page].slides[0].dim-this.viewportDim)>1)return!1;const a=t>this.page?1:-1,r=this.pages[o].pos*(this.isRTL?1:-1);if(this.page===o&&e(r,1e3)===e(s.target[this.axis],1e3))return!1;this.clearTransitions();const l=s.isResting;P(this.container,this.cn("inTransition"));const c=this.pages[this.page].slides[0],h=this.pages[o].slides[0];this.inTransition.add(h.index),this.createSlideEl(h);let d=c.el,u=h.el;l||"slide"===i||(i="fadeFast",d=null);const p=this.isRTL?"next":"prev",f=this.isRTL?"prev":"next";return d&&(this.inTransition.add(c.index),c.transition=i,d.addEventListener("animationend",this.onAnimationEnd),d.classList.add(`f-${i}Out`,`to-${a>0?f:p}`)),u&&(h.transition=i,u.addEventListener("animationend",this.onAnimationEnd),u.classList.add(`f-${i}In`,`from-${a>0?p:f}`)),s.panTo({x:this.isHorizontal?r:0,y:this.isHorizontal?0:r,friction:0}),this.onChange(o),!0}manageSlideVisiblity(){const t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?t.add(n):e.add(n);for(const e of this.inTransition)t.add(this.slides[e]);for(const e of t)this.createSlideEl(e),this.lazyLoadSlide(e);for(const i of e)t.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const t="aria-hidden";let e=this.cn("isSelected");if(e)for(const i of this.slides)i.el&&(i.el.dataset.index=`${i.index}`,this.pages[this.page].slides.includes(i)?(i.el.classList.contains(e)||(P(i.el,e),this.emit("selectSlide",i)),i.el.removeAttribute('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')):(i.el.classList.contains(e)&&(S(i.el,e),this.emit("unselectSlide",i)),i.el.setAttribute(t,"true")))}flipInfiniteTrack(){const t=this.panzoom;if(!t||!this.isInfinite)return;const e="x"===this.option("axis")?"e":"f",{viewportDim:i,contentDim:n}=this;let s=t.current[e],o=t.target[e]-s,a=0,r=.5*i,l=n;this.isRTL&&this.isHorizontal?(s<-r&&(a=-1,s+=l),s>l-r&&(a=1,s-=l)):(s>r&&(a=1,s-=l),s<-l+r&&(a=-1,s+=l)),a&&(t.current[e]=s,t.target[e]=s+o)}lazyLoadSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this,i=t&&t.el;if(!i)return;const n=new Set,o="f-fadeIn";i.querySelectorAll("[data-lazy-srcset]").forEach((t=>{t instanceof HTMLImageElement&&n.add('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}));let a=Array.from(i.querySelectorAll("[data-lazy-src]"));i.dataset.lazySrc&&a.push(i),a.map((t=>{t instanceof HTMLImageElement?n.add('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'):E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&(t.style.backgroundImage=`url('${t.dataset.lazySrc||""}')`,delete t.dataset.lazySrc)}));const r=(t,i,n)=>{n&&(n.remove(),n=null),i.complete&&(i.classList.add(o),setTimeout((()=>{i.classList.remove(o)}),350),i.style.display=""),this.option("adaptiveHeight")&&t.el&&this.pages[this.page].slides.indexOf('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')>-1&&(e.updateMetrics(),e.setViewportHeight()),this.emit("load",t)};for(const e of n){let i=null;e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.style.display="none",e.addEventListener("error",(()=>{r(t,e,i)})),e.addEventListener("load",(()=>{r(t,e,i)})),setTimeout((()=>{e.parentNode&&t.el&&(e.complete?r(t,e,i):(i=s(x),e.parentNode.insertBefore(i,e)))}),300)}}onAnimationEnd('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;const i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(!i||!s||!o)return;const a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&&this.emit("settle")}onDecel(t,e=0,i=0,n=0,s=0){const{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180));let d=0;if(d=h>45&&h<135?a?0:i:a?e:0,!c)return;const u=this.option("dragFree");let p=this.page,f=o&&a?1:-1;const m=t.target[r]*f,g=t.current[r]*f;let{pageIndex:b}=this.getPageFromPosition(m),{pageIndex:v}=this.getPageFromPosition(g);u?this.onChange(b):(Math.abs(d)>5?(l[p].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(p=v),p=o&&a?d<0?p-1:p+1:d<0?p+1:p-1):p=0===n&&0===s?p:v,this.slideTo(p,{transition:!1,friction:t.option("decelFriction")}))}onClick('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.target,i=e&&E(e)?e.dataset:null;let n,s;i&&(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&&(s="slidePrev")),s?(t.preventDefault(),t.stopPropagation(),e&&!e.hasAttribute("disabled")&&this[s](n)):this.emit("click",t)}onSlideTo('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.detail||0;this.slideTo(this.getPageForSlide(e),{friction:0})}onChange(t,e=0){const i=this.page;this.prevPage=i,this.page=t,this.option("adaptiveHeight")&&this.setViewportHeight(),t!==i&&(this.markSelectedSlides(),this.emit("change",t,i,e))}onRefresh(){let t=this.contentDim,e=this.viewportDim;this.updateMetrics(),this.contentDim===t&&this.viewportDim===e||this.slideTo(this.page,{friction:0,transition:!1})}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.lp!==t.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=t.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(t=null,e=null){this.destroy(),this.state=j.Init,this.userOptions=t||this.userOptions,this.userPlugins=e||this.userPlugins,this.processOptions()}slideTo(t=0,{friction:e=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===j.Destroy)return;const{axis:n,isHorizontal:s,isRTL:o,pages:a,panzoom:r}=this,l=a.length,c=o&&s?1:-1;if(!r||!l)return;if(this.transitionTo(t,i))return;const h=this.getPageFromIndex('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');let d=a[h].pos;if(this.isInfinite){const e=this.contentDim,i=r.target[n]*c;if(2===l)d+=e*Math.floor(parseFloat(t+"")/2);else{const t=i;d=[d,d-e,d+e].reduce((function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e}))}}d*=c,Math.abs(r.target[n]-d)<.1||(r.panTo({x:s?d:0,y:s?0:d,friction:e}),this.onChange(h))}slideToClosest('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(this.panzoom){const{pageIndex:e}=this.getPageFromPosition(this.panzoom.current[this.isHorizontal?"e":"f"]);this.slideTo(e,t)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),S(this.container,this.cn("inTransition"));const t=["to-prev","to-next","from-prev","from-next"];for(const e of this.slides){const i=e.el;if(i){i.removeEventListener("animationend",this.onAnimationEnd),i.classList.remove(...t);const n=e.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}prependSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e,i;let n=Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?t:[t];for(const t of n.reverse())this.slides.unshift(H('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'));for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;const s=(null===(e=this.pages[this.page])||void 0===e?void 0:e.pos)||0;this.page+=n.length,this.updateMetrics();const o=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0;if(this.panzoom){const t=this.isRTL?s-o:o-s;this.panzoom.target.e-=t,this.panzoom.current.e-=t,this.panzoom.requestTick()}}appendSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){let e=Array.isArray('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?t:[t];for(const t of e){const e=H('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');e.index=this.slides.length,this.slides.push(e),this.emit("initSlide",e,this.slides.length)}this.updateMetrics()}removeSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.slides.length;t=(t%e+e)%e,this.removeSlideEl(this.slides[t],!0),this.slides.splice(t,1);for(let t=0;t<this.slides.length;t++)this.slides[t].index=t;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1})}updateMetrics(){const{panzoom:t,viewport:i,track:n,isHorizontal:s}=this;if(!n)return;const o=s?"width":"height",a=s?"offsetWidth":"offsetHeight";if(i){let t=Math.max(i[a],e(i.getBoundingClientRect()[o],1e3)),n=getComputedStyle(i),r="padding",l=s?"Right":"Bottom";t-=parseFloat(n[r+(s?"Left":"Top")])+parseFloat(n[r+l]),this.viewportDim=t}let r,l=this.pages.length,c=0;for(const[t,i]of this.slides.entries()){let n=0,s=0;!i.el&&r?(n=r.dim,s=r.gap):(({dim:n,gap:s}=this.getSlideMetrics(i)),r=i),n=e(n,1e3),s=e(s,1e3),i.dim=n,i.gap=s,i.pos=c,c+=n,(this.isInfinite||t<this.slides.length-1)&&(c+=s)}const h=this.contentDim;c=e(c,1e3),this.contentDim=c,t&&(t.contentRect[o]=c,t.contentRect["e"===this.axis?"fullWidth":"fullHeight"]=c),this.pages=this.createPages(),this.pages=this.processPages(),this.state===j.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),t&&l===this.pages.length&&Math.abs(c-h)>.5&&(t.target[this.axis]=-1*this.pages[this.page].pos,t.current[this.axis]=-1*this.pages[this.page].pos,t.stop()),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(t,i=!1){void 0===t&&(t=this.page);const n=this,s=n.panzoom,o=n.pages[t]||0;if(!o||!s)return 0;let a=-1*s.current.e,r=n.contentDim;var l=[e((a-o.pos)/(1*o.dim),1e3),e((a+r-o.pos)/(1*o.dim),1e3),e((a-r-o.pos)/(1*o.dim),1e3)].reduce((function(t,e){return Math.abs(e)<Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?e:t}));return i?l:Math.max(-1,Math.min(1,l))}setViewportHeight(){const{page:t,pages:e,viewport:i,isHorizontal:n}=this;if(!i||!e[t])return;let s=0;n&&this.track&&(this.track.style.height="auto",e[t].slides.forEach((t=>{t.el&&(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){for(const e of this.pages)for(const i of e.slides)if(i.index===t)return e.index;return-1}getVisibleSlides(t=0){var e;const i=new Set;let{contentDim:n,viewportDim:s,pages:o,page:a}=this;n=n+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;let r=0;r=this.panzoom?-1*this.panzoom.current[this.axis]:o[a]&&o[a].pos||0,this.isInfinite&&(r-=Math.floor(r/n)*n),this.isRTL&&this.isHorizontal&&(r*=-1);const l=r-s*t,c=r+s*(t+1),h=this.isInfinite?[-1,0,1]:[0];for(const t of this.slides)for(const e of h){const s=t.pos+e*n,o=t.pos+t.dim+t.gap+e*n;s<c&&o>l&&i.add('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}return i}getPageFromPosition('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const{viewportDim:e,contentDim:i}=this,n=this.pages.length,s=this.slides.length,o=this.slides[s-1];let a=0,r=0,l=0;const c=this.option("center");c&&(t+=.5*e),this.isInfinite||(t=Math.max(this.slides[0].pos,Math.min(t,o.pos)));const h=i+o.gap;l=Math.floor(t/h)||0,t-=l*h;let d=o,u=this.slides.find((e=>{const i=t+(d&&!c?.5*d.dim:0);return d=e,e.pos<=i&&e.pos+e.dim+e.gap>i}));return u||(u=o),r=this.getPageForSlide(u.index),a=r+l*n,{page:a,pageIndex:r}}destroy(){if([j.Destroy].includes(this.state))return;this.state=j.Destroy;const{container:t,viewport:e,track:i,slides:n,panzoom:s}=this,o=this.option("classes");t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&&(s.destroy(),this.panzoom=null),n&&n.forEach((t=>{this.removeSlideEl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')})),this.detachPlugins(),e&&e.offsetParent&&i&&i.offsetParent&&e.replaceWith(...i.childNodes);for(const[e,i]of Object.entries(o))"container"!==e&&i&&t.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(U,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:k}),Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:F}),Object.defineProperty(U,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Z});const G=function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=window.pageYOffset,i=window.pageYOffset+window.innerHeight;if(!E('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))return 0;const n=t.getBoundingClientRect(),s=n.y+window.pageYOffset,o=n.y+n.height+window.pageYOffset;if(e>o||i<s)return 0;if(e<s&&i>o)return 100;if(s<e&&o>i)return 100;let a=n.height;s<e&&(a-=window.pageYOffset-s),o>i&&(a-=o-i);const r=a/window.innerHeight*100;return Math.round(r)},K=!("undefined"==typeof window||!window.document||!window.document.createElement);let J;const Q=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),tt=t=>{if(t&&K){void 0===J&&document.createElement("div").focus({get preventScroll(){return J=!0,!1}});try{if(J)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}}},et={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},y),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong,Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX :Not Found",AJAX_FORBIDDEN:"Error Loading AJAX :Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n    <div class="fancybox__backdrop"></div>\n    <div class="fancybox__carousel"></div>\n    <div class="fancybox__footer"></div>\n  </div>'},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=>window.matchMedia("(max-width:578px),(max-height:578px)").matches,wheel:"zoom"};var it,nt;!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"}(it||(it={})),function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}(nt||(nt={}));const st=()=>{queueMicrotask((()=>{(()=>{const{slug:t,index:e}=ot.parseurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/'),i=Wt.getInstance(');if(i&&!1!==i.option("Hash")){const n=i.carousel;if(t&&n){for(let e of n.slides)if(e.slug&&e.slug===t)return n.slideTo(e.index);if(t===i.option("slug"))return n.slideTo(e-1);const s=i.getSlide(),o=s&&s.triggerEl&&s.triggerEl.dataset;if(o&&o.fancybox===t)return n.slideTo(e-1)}ot.hasSilentClose=!0,i.close()}ot.startFromurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'))};class ot extends N{constructor(){super(...arguments),Object.defineProperty(this,"origHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null})}onChange(){const t=this.instance,e=t.carousel;this.timer&&clearTimeout(this.timer);const i=t.getSlide();if(!e||!i)return;const n=t.isOpeningSlide(i),s=new url('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/document.URL').hash;let o,a=i.slug||void 0,r=i.triggerEl||void 0;o=a||this.instance.option("slug"),!o&&r&&r.dataset&&(o=r.dataset.fancybox);let l="";o&&"true"!==o&&(l="#"+o+(!a&&e.slides.length>1?"-"+(i.index+1):"")),n&&(this.origHash=s!==l?s:""),l&&s!==l&&(this.timer=setTimeout((()=>{try{t.state===it.Ready&&window.history[n?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+l)}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}}),300))}onClose(){if(this.timer&&clearTimeout(this.timer),!0!==ot.hasSilentClose)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}}attach(){const t=this.instance;t.on("Carousel.ready",this.onChange),t.on("Carousel.change",this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance;t.off("Carousel.ready",this.onChange),t.off("Carousel.change",this.onChange),t.off("close",this.onClose)}static parseurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/'){const t=window.location.hash.slice(1'),e=t.split("-"),i=e[e.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:n}}static startFromurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/'){if(ot.hasSilentClose=!1,Wt.getInstance(')||!1===Wt.defaults.Hash)return;const{hash:t,slug:e,index:i}=ot.parseurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/');if(!e')return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Wt.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${e}"]`);s.length&&(n=s[i-1],n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static destroy(){window.removeEventListener("hashchange",st,!1)}}function at(){window.addEventListener("hashchange",st,!1),setTimeout((()=>{ot.startFromurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),500)}Object.defineProperty(ot,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(ot,"hasSilentClose",{enumerable:!0,configurable:!0,writable:!0,value:!1}),K&&(/complete|interactive|loaded/.test(document.readyState)?at():document.addEventListener("DOMContentLoaded",at));class rt extends N{onCreateSlide(t,e,i){const n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&this.setImage(i,n)}onRemoveSlide(t,e,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(t,e,i,n){for(const t of e.slides){const e=t.panzoom;e&&t.index!==i&&e.reset(.35)}}onClose(){var t;const e=this.instance,i=e.container,n=e.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:a}=n,r=n.thumbElSrc;if(!s||!r||!o||!a||a.isContentLoading||a.state===b.Init||a.state===b.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(n);if(!l)return;this.instance.state=it.CustomClosing,i.classList.remove("is-zooming-in"),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/${r}')`;const c=i.getBoundingClientRect();1===((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${window.pageYOffset}px`,left:`${window.pageXOffset}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:h,y:d,scale:u,opacity:p}=l;if(p){const t=((t,e,i,n)=>{const s=e-t,o=n-i;return e=>i+((e-t)/s*o||0)})(a.scale,u,1,0);a.on("afterTransform",(()=>{o.style.opacity=t(a.scale)+""}))}a.on("endAnimation",(()=>{e.destroy('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:h,y:d,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&e.destroy()}setImage(t,e){const i=this.instance;t.src=e,this.process(t,e).then((e=>{var n;const s=t.contentEl,o=t.imageEl,a=t.thumbElSrc;if(i.isClosing()||!s||!o)return;s.offsetHeight;const r=!!i.isOpeningSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&this.getZoomInfo('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(this.option("protected")){null===(n=t.el)||void 0===n||n.addEventListener("contextmenu",(t=>{t.preventDefault('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'));const e=document.createElement("div");P(e,"fancybox-protected"),s.appendChild(e)}if(a&&r){const n=e.contentRect,o=Math.max(n.fullWidth,n.fullHeight);let c=null;!r.opacity&&o>1200&&(c=document.createElement("img"),P(c,"fancybox-ghost"),c.src=a,s.appendChild(c));const h=()=>{c&&(P(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=a,new Promise(((t,e)=>{const i=new Image;i.onload=t,i.onerror=e,i.src=l}))).then((()=>{t.state=nt.Opening,this.instance.emit("reveal",t),this.zoomIn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').then((()=>{h(),this.instance.done('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}),(()=>{i.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')})),c&&setTimeout((()=>{h('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),o>2500?800:200)}),(()=>{i.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),i.revealContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}))}else{const n=this.optionFor(t,"initialSize"),s=this.optionFor(t,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0};let a=i.optionFor(t,"showClass")||void 0,r=!0;i.isOpeningSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&("full"===n?e.zoomToFull(o):"cover"===n?e.zoomToCover(o):"max"===n?e.zoomToMax(o):r=!1,e.stop("current")),r&&a&&(a=e.isDragging?"f-fadeIn":""),i.revealContent(t,a)}var l}),(()=>{i.setError(t,"{{IMAGE_ERROR}}")}))}process(t,e){return new Promise(((i,n)=>{var o,a;const r=this.instance,l=t.el;r.clearContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),r.showLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');let c=this.optionFor(t,"content");"string"==typeof c&&(c=s(c)),c&&E(c)||(c=document.createElement("img"),c instanceof HTMLImageElement&&(c.src=e||"",c.alt=(null===(o=t.caption)||void 0===o?void 0:o.replace(/<[^>]+>/gi,"").substring(0,1e3))||`Image ${t.index+1} of ${null===(a=r.carousel)||void 0===a?void 0:a.pages.length}`,c.draggable=!1,t.srcset&&c.setAttribute("srcset",t.srcset)),t.sizes&&c.setAttribute("sizes",t.sizes)),c.classList.add("fancybox-image"),t.imageEl=c,r.setContent(t,c,!1);t.panzoom=new k(l,p({transformParent:!0},this.option("Panzoom")||{},{content:c,width:r.optionFor(t,"width","auto"),height:r.optionFor(t,"height","auto"),wheel:()=>{const t=r.option("wheel");return("zoom"===t||"pan"==t)&&t},click:(e,i)=>{var n,s;if(r.isCompact||r.isClosing())return!1;if(t.index!==(null===(n=r.getSlide())||void 0===n?void 0:n.index))return!1;if(i){const t=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(t.nodeName))return!1}let o=!i||i.target&&(null===(s=t.contentEl)||void 0===s?void 0:s.contains(i.target));return r.option(o?"contentClick":"backdropClick")||!1},dblClick:()=>r.isCompact?"toggleZoom":r.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:t=>{i('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')},error:()=>{n()},destroy:()=>{n()}}}))}))}zoomIn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){return new Promise(((e,i)=>{const n=this.instance,s=n.container,{panzoom:o,contentEl:a,el:r}=t;o&&o.updateMetrics();const l=this.getZoomInfo('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(!(l&&r&&a&&o&&s))return void i();const{x:c,y:h,scale:d,opacity:u}=l,p=()=>{t.state!==nt.Closing&&(u&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-d)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&e(o))},f=t=>{S(s,"is-zooming-in"),t.scale<.99||t.scale>1.01||(a.style.opacity="",t.off("endAnimation",f),t.off("touchStart",f),t.off("afterTransform",p),e('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))};o.on("endAnimation",f),o.on("touchStart",f),o.on("afterTransform",p),o.on(["error","destroy"],(()=>{i('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),o.panTo({x:c,y:h,scale:d,friction:0,ignoreBounds:!0}),o.stop("current");const m={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},g=this.optionFor(t,"initialSize");P(s,"is-zooming-in"),n.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),"full"===g?o.zoomToFull(m):"cover"===g?o.zoomToCover(m):"max"===g?o.zoomToMax(m):o.reset(.172)}))}getZoomInfo('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;const{el:i,imageEl:n,thumbEl:s,panzoom:o}=t;if(!i||!n||!s||!o||G(s)<3||!this.optionFor(t,"zoom")||this.instance.state===it.Destroy)return!1;if(1!==((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1))return!1;let{top:a,left:r,width:l,height:c}=s.getBoundingClientRect(),{top:h,left:d,fitWidth:u,fitHeight:p}=o.contentRect;if(!(l&&c&&u&&p))return!1;const f=o.container.getBoundingClientRect();d+=f.left,h+=f.top;const m=-1*(d+.5*u-(r+.5*l)),g=-1*(h+.5*p-(a+.5*c)),b=l/u;let v=this.option("zoomOpacity")||!1;return"auto"===v&&(v=Math.abs(l/c-u/p)>.1),{x:m,y:g,scale:b,opacity:v}}attach(){const t=this,e=t.instance;e.on("Carousel.change",t.onChange),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("close",t.onClose)}detach(){const t=this,e=t.instance;e.off("Carousel.change",t.onChange),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("close",t.onClose)}}Object.defineProperty(rt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const lt=(t,e={})=>{const i=new url('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),n=new URLSearchParams(i.search),s=new URLSearchParams;for(const[t,i]of[...n,...Object.entries(e)]){let e=i.toString();"t"===t?s.set("start",parseInt(e).toString()):s.set(t,e)}let o=s.toString(),a=t.match(/#t=((.*)?\d+s)/);return a&&(o+=`#t=${a[1]}`),o},ct={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay;fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n  <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},ht=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo","video"];class dt extends N{onInitSlide(t,e,i){this.processType(i)}onCreateSlide(t,e,i){this.setContent(i)}onRemoveSlide(t,e,i){i.xhr&&(i.xhr.abort(),i.xhr=null);const n=i.iframeEl;n&&(n.onload=n.onerror=null,n.src="//about:blank",i.iframeEl=null);const s=i.contentEl,o=i.placeholderEl;if("inline"===i.type&&s&&o)s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none"),o.parentNode&&o.parentNode.insertBefore(s,o),o.remove(),i.contentEl=void 0,i.placeholderEl=void 0;else for(;i.el&&i.el.firstChild;)i.el.removeChild(i.el.firstChild)}onSelectSlide(t,e,i){i.state===nt.Ready&&this.playVideo()}onUnselectSlide(t,e,i){var n,s;if("html5video"===i.type){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}return}let o;"vimeo"===i.type?o={method:"pause",value:"true"}:"youtube"===i.type&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(t,e){t.isCurrentSlide(e)&&!t.isClosing()&&this.playVideo()}onRefresh(t,e){e.slides.forEach((t=>{t.el&&(this.setAspectRatio('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.resizeIframe('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))}))}onMessage('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){try{let e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event)for(let e of Array.from(document.getElementsByClassName("fancybox__iframe")))e instanceof HTMLIFrameElement&&e.contentWindow===t.source&&(e.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===e.event){const t=document.getElementById(e.id);t&&(t.dataset.ready="true")}}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}}loadAjaxContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.instance.optionFor(t,"src")||"";this.instance.showLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');const i=this.instance,n=new XMLHttpRequest;i.showLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===it.Ready&&(i.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),200===n.status?i.setContent(t,n.responseText):i.setError(t,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=t.ajax||null;n.open(s?"POST":"GET",e+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),t.xhr=n}setInlineContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){let e=null;if(E(t.src))e=t.src;else if("string"==typeof t.src){const i=t.src.split("#",2).pop();e=i?document.getElementById(i):null}if(e){if("clone"===t.type||e.closest(".fancybox__slide")){e=e.cloneNode(!0);const i=e.dataset.animationName;i&&(e.classList.remove(i),delete e.dataset.animationName);let n=e.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${t.index}`,e.setAttribute("id",n)}else if(e.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(i,e),t.placeholderEl=i}this.instance.setContent(t,e)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const{src:e,el:i}=t;if(!e||"string"!=typeof e||!i)return;const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${t.index}`);for(const[e,i]of Object.entries(this.optionFor(t,"iframeAttr")||{}))s.setAttribute(e,i);s.onerror=()=>{n.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=s;const o=this.optionFor(t,"preload");if(i.classList.add("is-loading"),"iframe"!==t.type||!1===o)return s.setAttribute("src",t.src+""),this.resizeIframe('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),void n.setContent(t,s);n.showLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),s.onload=()=>{if(!s.src.length)return;const e="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),e?n.revealContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'):n.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')},s.setAttribute("src",e),n.setContent(t,s,!1)}resizeIframe('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.iframeEl,i=null==e?void 0:e.parentElement;if(!e||!i)return;let n=t.autoSize,s=t.width||0,o=t.height||0;s&&o&&(n=!1);const a=i&&i.style;if(!1!==t.preload&&!1!==n&&a)try{const t=window.getComputedStyle(i),n=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),r=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),l=e.contentWindow;if(l){const t=l.document,e=t.getElementsByTagName("html")[0],i=t.body;a.width="",i.style.overflow="hidden",s=s||e.scrollWidth+n,a.width=`${s}px`,i.style.overflow="",a.flex="0 0 auto",a.height=`${i.scrollHeight}px`,o=e.scrollHeight+r}}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}if(s||o){const t={flex:"0 1 auto",width:"",height:""};s&&(t.width=`${s}px`),o&&(t.height=`${o}px`),Object.assign(a,t)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:e}=t;if(!e||!e.offsetParent)return;if(!this.optionFor(t,"videoAutoplay"))return;if("html5video"===t.type)try{const t=e.querySelector("video");if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'))}}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}if("youtube"!==t.type&&"vimeo"!==t.type)return;const i=()=>{if(t.iframeEl&&t.iframeEl.contentWindow){let e;if("true"===t.iframeEl.dataset.ready)return e="youtube"===t.type?{event:"command",func:"playVideo"}:{method:"play",value:"true"},e&&t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"),void(t.poller=void 0);"youtube"===t.type&&(e={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"))}t.poller=setTimeout(i,250)};i()}processType('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(t.html)return t.type="html",t.src=t.html,void(t.html="");const e=this.instance.optionFor(t,"src","");if(!e||"string"!=typeof e)return;let i=t.type,n=null;if(n=e.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const s=this.optionFor(t,"youtube"),{nocookie:o}=s,a=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}(s,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=lt(e,a),c=encodeURIComponent(n[2]);t.videoId=c,t.src=`https://${r}/embed/${c}?${l}`,t.thumbSrc=t.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i="youtube"}else if(n=e.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const s=lt(e,this.optionFor(t,"vimeo")),o=encodeURIComponent(n[1]),a=n[4]||"";t.videoId=o,t.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&":""}`:""}${s}`,i="vimeo"}if(!i&&t.triggerEl){const e=t.triggerEl.dataset.type;ht.includes(e)&&(i=e)}i||"string"==typeof e&&("#"===e.charAt(0)?i="inline":(n=e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i="html5video",t.videoFormat=t.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i="image":e.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`https://maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="map"):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="map")),i=i||this.instance.option("defaultType"),t.type=i,"image"===i&&(t.thumbSrc=t.thumbSrc||t.src)}setContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.instance.optionFor(t,"src")||"";if(t&&t.type&&e){switch(t.type){case"html":this.instance.setContent(t,e);break;case"html5video":const i=this.option("videoTpl");i&&this.instance.setContent(t,i.replace(/\{\{src\}\}/gi,e+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');break;case"ajax":this.loadAjaxContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');break;case"pdf":case"map":case"youtube":case"vimeo":t.preload=!1;case"iframe":this.setIframeContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}this.setAspectRatio('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}}setAspectRatio('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;const i=t.contentEl,n=this.optionFor(t,"videoRatio"),s=null===(e=t.el)||void 0===e?void 0:e.getBoundingClientRect();if(!(i&&s&&n&&1!==n&&t.type&&["video","youtube","vimeo","html5video"].includes(t.type)))return;const o=s.width,a=s.height;i.style.aspectRatio=n+"",i.style.width=o/a>n?"auto":"",i.style.height=o/a>n?"":"auto"}attach(){const t=this,e=t.instance;e.on("Carousel.initSlide",t.onInitSlide),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("Carousel.selectSlide",t.onSelectSlide),e.on("Carousel.unselectSlide",t.onUnselectSlide),e.on("Carousel.Panzoom.refresh",t.onRefresh),e.on("done",t.onDone),window.addEventListener("message",t.onMessage)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlide",t.onInitSlide),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("Carousel.selectSlide",t.onSelectSlide),e.off("Carousel.unselectSlide",t.onUnselectSlide),e.off("Carousel.Panzoom.refresh",t.onRefresh),e.off("done",t.onDone),window.removeEventListener("message",t.onMessage)}}Object.defineProperty(dt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ct});const ut="play",pt="pause",ft="ready";class mt extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:ft}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==ft}onReady('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.option("autoStart")&&(t.isInfinite||t.page<t.pages.length-1)&&this.start()}onChange(){var t;(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)||(this.removeProgressBar(),this.pause())}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var t;this.inHover=!1,(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)&&this.resume()}onTimerEnd(){const t=this.instance;"play"===this.state&&(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();const e=this.instance,i=(null===(t=e.pages[e.page])||void 0===t?void 0:t.slides)||[];let n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||e.viewport),!n)return null;const s=document.createElement("div");return P(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){const t=this,e=t.instance;if(e.pages.length<2)return;if(t.timer)return;const i=t.option("timeout");t.state=ut,P(e.container,"has-autoplay");let n=t.createProgressBar();n&&(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),t.timer=setTimeout((()=>{t.timer=null,t.inHover||t.onTimerEnd('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),i),t.emit("set")}clear(){const t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==ft){if(t.option("pauseOnHover")){const e=t.instance.container;e.addEventListener("mouseenter",t.onMouseEnter,!1),e.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,e=t.state,i=t.instance.container;t.clear(),t.state=ft,i.removeEventListener("mouseenter",t.onMouseEnter,!1),i.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),S(i,"has-autoplay"),e!==ft&&t.emit("stop")}pause(){const t=this;t.state===ut&&(t.state=pt,t.clear(),t.emit(pt))}resume(){const t=this,e=t.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(t.state!==ut){if(t.state===pt&&!t.inHover){const e=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",e),e.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===ut||this.state===pt?this.stop():this.start()}attach(){const t=this,e=t.instance;e.on("ready",t.onReady),e.on("Panzoom.startAnimation",t.onChange),e.on("Panzoom.endAnimation",t.onSettle),e.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,e=t.instance;e.off("ready",t.onReady),e.off("Panzoom.startAnimation",t.onChange),e.off("Panzoom.endAnimation",t.onSettle),e.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(mt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class gt extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.carousel;if(!e)return;const i=t.container;i&&(e.options.Autoplay=p({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{t.emit("startSlideshow")},set:e=>{var n;i.classList.add("has-slideshow"),(null===(n=t.getSlide())||void 0===n?void 0:n.state)!==nt.Ready&&e.pause()},stop:()=>{i.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(e,i)=>{var n,s,o;!i||!i.cancelable||(null===(n=t.getSlide())||void 0===n?void 0:n.state)===nt.Ready&&(null===(o=null===(s=t.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),e.attachPlugins({Autoplay:mt}),this.ref=e.plugins.Autoplay)}onReady('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.carousel,i=this.ref;e&&i&&this.option("playOnStart")&&(e.isInfinite||e.page<e.pages.length-1)&&i.start()}onDone(t,e){const i=this.ref;if(!i)return;const n=e.panzoom;n&&n.on("startAnimation",(()=>{t.isCurrentSlide(e)&&i.stop('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),t.isCurrentSlide(e)&&i.resume()}onKeydown(t,e){var i;const n=this.ref;n&&e===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}attach(){const t=this,e=t.instance;e.on("Carousel.init",t.onPrepare),e.on("Carousel.ready",t.onReady),e.on("done",t.onDone),e.on("keydown",t.onKeydown)}detach(){const t=this,e=t.instance;e.off("Carousel.init",t.onPrepare),e.off("Carousel.ready",t.onReady),e.off("done",t.onDone),e.off("keydown",t.onKeydown)}}Object.defineProperty(gt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=>{var e;return(null===(e=t.instance.container)||void 0===e?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const bt={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var vt;!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden",t[t.Disabled=3]="Disabled"}(vt||(vt={}));let yt=class extends N{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"shouldCenter",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:vt.Init})}formatThumb(t,e){return this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}getSlides(){const t=[],e=this.option("thumbTpl")||"";if(e)for(const i of this.instance.slides||[]){let n="";i.type&&(n=`for-${i.type}`,i.type&&["video","youtube","vimeo","html5video"].includes(i.type)&&(n+=" for-video")),t.push({html:this.formatThumb(i,e),customClass:n})}return t}onInitSlide(t,e){const i=e.el;i&&(e.thumbSrc=i.dataset.thumbSrc||e.thumbSrc||"",e.thumbClipWidth=parseFloat(i.dataset.thumbClipWidth||"")||e.thumbClipWidth||0,e.thumbHeight=parseFloat(i.dataset.thumbHeight||"")||e.thumbHeight||0)}onInitSlides(){this.state===vt.Init&&this.build()}onRefreshM(){this.refreshModern()}onChangeM(){"modern"===this.type&&(this.shouldCenter=!0,this.centerModern())}onClickModern('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t.preventDefault(),t.stopPropagation();const e=this.instance,i=e.page,n=t=>{if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.closest("[data-carousel-index]");if(e)return parseInt(e.dataset.carouselIndex||"",10)||0}return-1},s=(t,e)=>{const i=document.elementFromPoint(t,e);return i?n(i):-1};let o=n(t.target);o<0&&(o=s(t.clientX+this.thumbGap,t.clientY),o===i&&(o=i-1)),o<0&&(o=s(t.clientX-this.thumbGap,t.clientY),o===i&&(o=i+1)),o<0&&(o=(e=>{let n=s(t.clientX-e,t.clientY),a=s(t.clientX+e,t.clientY);return o<0&&n===i&&(o=i+1),o<0&&a===i&&(o=i-1),o})(this.thumbExtraGap)),o===i?this.centerModern():o>-1&&o<e.pages.length&&e.slideTo(o)}onTransformM(){if("modern"!==this.type)return;const{instance:t,container:e,track:i}=this,n=t.panzoom;if(!(e&&i&&n&&this.panzoom))return;a(e,this.cn("isResting"),n.state!==b.Init&&n.isResting);const s=this.thumbGap,o=this.thumbExtraGap,r=this.thumbClipWidth;let l=0,c=0,h=0;for(const e of t.slides){let i=e.index,n=e.thumbSlideEl;if(!n)continue;a(n,this.cn("isSelected"),i===t.page),c=1-Math.abs(t.getProgress(i)),n.style.setProperty("--progress",c?c+"":"");const d=.5*((e.thumbWidth||0)-r);l+=s,l+=d,c&&(l-=c*(d+o)),n.style.setProperty("--shift",l-s+""),l+=d,c&&(l-=c*(d+o)),l-=s,0===i&&(h=o*c)}i&&(i.style.setProperty("--left",h+""),i.style.setProperty("--width",l+h+s+o*c+"")),this.shouldCenter&&this.centerModern()}buildClassic(){const{container:t,track:e}=this,i=this.getSlides();if(!t||!e||!i)return;const n=new this.instance.constructor(t,p({track:e,infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,transition:!1,Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},this.option("Carousel")||{},{Sync:{target:this.instance},slides:i}));this.carousel=n,this.track=e,n.on("ready",(()=>{this.emit("ready")})),n.on("createSlide",((t,e)=>{this.emit("createSlide",e,e.el)}))}buildModern(){if("modern"!==this.type)return;const{container:t,track:e,instance:i}=this,n=this.option("thumbTpl")||"";if(!t||!e||!n)return;P(t,"is-horizontal"),this.updateModern();for(const t of i.slides||[]){const i=document.createElement("div");if(P(i,this.cn("slide")),t.type){let e=`for-${t.type}`;["video","youtube","vimeo","html5video"].includes(t.type)&&(e+=" for-video"),P(i,e)}i.appendChild(s(this.formatThumb(t,n))),this.emit("createSlide",t,i),t.thumbSlideEl=i,e.appendChild(i),this.resizeModernSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}const o=new i.constructor.Panzoom(t,{content:e,lockAxis:"x",zoom:!1,panOnlyZoomed:!1,bounds:()=>{let t=0,e=0,n=i.slides[0],s=i.slides[i.slides.length-1],o=i.slides[i.page];return n&&s&&o&&(e=-1*this.getModernThumbPos(0),0!==i.page&&(e+=.5*(n.thumbWidth||0)),t=-1*this.getModernThumbPos(i.slides.length-1),i.page!==i.slides.length-1&&(t+=(s.thumbWidth||0)-(o.thumbWidth||0)-.5*(s.thumbWidth||0))),{x:{min:t,max:e},y:{min:0,max:0}}}});o.on("touchStart",((t,e)=>{this.shouldCenter=!1})),o.on("click",((t,e)=>this.onClickModern(e))),o.on("ready",(()=>{this.centerModern(),this.emit("ready")})),o.on(["afterTransform","refresh"],(t=>{this.lazyLoadModern('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),this.panzoom=o,this.refreshModern()}updateModern(){if("modern"!==this.type)return;const{container:t}=this;t&&(this.thumbGap=parseFloat(getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').getPropertyValue("--f-thumb-gap"))||0,this.thumbExtraGap=parseFloat(getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').getPropertyValue("--f-thumb-extra-gap"))||0,this.thumbWidth=parseFloat(getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').getPropertyValue("--f-thumb-width"))||40,this.thumbClipWidth=parseFloat(getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').getPropertyValue("--f-thumb-clip-width"))||40,this.thumbHeight=parseFloat(getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t').getPropertyValue("--f-thumb-height"))||40)}refreshModern(){var t;if("modern"===this.type){this.updateModern();for(const t of this.instance.slides||[])this.resizeModernSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');this.onTransformM(),null===(t=this.panzoom)||void 0===t||t.updateMetrics(!0),this.centerModern(0)}}centerModern('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const i=this.instance,{container:n,panzoom:s}=this;if(!n||!s||s.state===b.Init)return;const o=i.page;let a=this.getModernThumbPos(o),r=a;for(let t=i.page-3;t<i.page+3;t++){if(t<0||t>i.pages.length-1||t===i.page)continue;const e=1-Math.abs(i.getProgress('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'));e>0&&e<1&&(r+=e*(this.getModernThumbPos('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')-a))}let l=100;void 0===t&&(t=.2,i.inTransition.size>0&&(t=.12),Math.abs(-1*s.current.e-r)>s.containerRect.width&&(t=.5,l=0)),s.options.maxVelocity=l,s.applyChange({panX:e(-1*r-s.target.e,1e3),friction:null===i.prevPage?0:t})}lazyLoadModern(){const{instance:t,panzoom:e}=this;if(!e)return;const i=-1*e.current.e||0;let n=this.getModernThumbPos(t.page);if(e.state!==b.Init||0===n)for(const n of t.slides||[]){const t=n.thumbSlideEl;if(!t)continue;const o=t.querySelector("img[data-lazy-src]"),a=n.index,r=this.getModernThumbPos(a),l=i-.5*e.containerRect.innerWidth,c=l+e.containerRect.innerWidth;if(!o||r<l||r>c)continue;let h=o.dataset.lazySrc;if(!h||!h.length)continue;if(delete o.dataset.lazySrc,o.src=h,o.complete)continue;P(t,this.cn("isLoading"));const d=s(x);t.appendChild(d),o.addEventListener("load",(()=>{t.offsetParent&&(t.classList.remove(this.cn("isLoading")),d.remove())}),!1)}}resizeModernSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if("modern"!==this.type)return;if(!t.thumbSlideEl)return;const e=t.thumbClipWidth&&t.thumbHeight?Math.round(this.thumbHeight*(t.thumbClipWidth/t.thumbHeight)):this.thumbWidth;t.thumbWidth=e}getModernThumbPos('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const i=this.instance.slides[t],n=this.panzoom;if(!n||!n.contentRect.fitWidth)return 0;let s=n.containerRect.innerWidth,o=n.contentRect.width;2===this.instance.slides.length&&(t-=1,o=2*this.thumbClipWidth);let a=t*(this.thumbClipWidth+this.thumbGap)+this.thumbExtraGap+.5*(i.thumbWidth||0);return a-=o>s?.5*s:.5*o,e(a||0,1)}build(){const t=this.instance,e=t.container,i=this.option("minCount")||0;if(i){let e=0;for(const i of t.slides||[])i.thumbSrc&&e++;if(e<i)return this.cleanup(),void(this.state=vt.Disabled)}const n=this.option("type");if(["modern","classic"].indexOf(n)<0)return void(this.state=vt.Disabled);this.type=n;const s=document.createElement("div");P(s,this.cn("container")),P(s,`is-${n}`);const o=this.option("parentEl");o?o.appendChild(s):e.after(s),this.container=s,P(e,this.cn("hasThumbs"));const a=document.createElement("div");P(a,this.cn("track")),s.appendChild(a),this.track=a,"classic"===n?this.buildClassic():this.buildModern(),this.state=vt.Ready,s.addEventListener("click",(e=>{setTimeout((()=>{var e;null===(e=null==s?void 0:s.querySelector(`[data-carousel-index="${t.page}"]`))||void 0===e||e.focus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),100)}))}cleanup(){this.carousel&&this.carousel.destroy(),this.carousel=null,this.panzoom&&this.panzoom.destroy(),this.panzoom=null,this.container&&this.container.remove(),this.container=null,this.track=null,this.state=vt.Init,S(this.instance.container,this.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===j.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on("Panzoom.afterTransform",t.onTransformM),e.on("Panzoom.refresh",t.onRefreshM),e.on("change",t.onChangeM)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off("Panzoom.afterTransform",t.onTransformM),e.off("Panzoom.refresh",t.onRefreshM),e.off("change",t.onChangeM),t.cleanup()}};Object.defineProperty(yt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:bt});const wt=Object.assign(Object.assign({},bt),{key:"t",showOnStart:!0,parentEl:null}),xt="is-masked",Et="aria-hidden";class St extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&&t.state!==vt.Disabled}get isHidden(){return this.hidden}onInit(){var t;const e=this,i=e.instance,n=i.carousel;if(e.ref||!n)return;const s=e.option("parentEl")||i.footer||i.container;if(!s)return;const o=p({},e.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:t=>{const i=t.container;i&&this.hidden&&(e.refresh(),i.style.transition="none",e.hide(),i.offsetHeight,queueMicrotask((()=>{i.style.transition="",e.show('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')))}}});o.Carousel=o.Carousel||{},o.Carousel.on=p((null===(t=e.options.Carousel)||void 0===t?void 0:t.on)||{},{click:(t,e)=>{e.stopPropagation()}}),n.options.Thumbs=o,n.attachPlugins({Thumbs:yt}),e.ref=n.plugins.Thumbs,e.option("showOnStart")||(e.ref.state=vt.Hidden,e.hidden=!0)}onResize(){var t;const e=null===(t=this.ref)||void 0===t?void 0:t.container;e&&(e.style.maxHeight="")}onKeydown(t,e){const i=this.option("key");i&&i===e&&this.toggle()}toggle(){const t=this.ref;t&&t.state!==vt.Disabled&&(t.state!==vt.Hidden?this.hidden?this.show():this.hide():t.build())}show(){const t=this.ref,e=t&&t.state!==vt.Disabled&&t.container;e&&(this.refresh(),e.offsetHeight,e.removeAttribute(Et),e.classList.remove(xt),this.hidden=!1)}hide(){const t=this.ref,e=t&&t.container;e&&(this.refresh(),e.offsetHeight,e.classList.add(xt),e.setAttribute(Et,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||t.state===vt.Disabled)return;const e=t.container,i=(null==e?void 0:e.firstChild)||null;e&&i&&i.childNodes.length&&(e.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const t=this,e=t.instance;e.state===it.Init?e.on("Carousel.init",t.onInit):t.onInit(),e.on("resize",t.onResize),e.on("keydown",t.onKeydown)}detach(){var t;const e=this,i=e.instance;i.off("Carousel.init",e.onInit),i.off("resize",e.onResize),i.off("keydown",e.onKeydown),null===(t=i.carousel)||void 0===t||t.detachPlugins(["Thumbs"]),e.ref=null}}Object.defineProperty(St,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:wt});const Pt={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width:1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width:1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Ct;!function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"}(Ct||(Ct={}));const Mt={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},Tt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};class Ot extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;if(!t.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){const t=this.instance.carousel;let e=0;if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')for(const i of t.slides)(i.panzoom||"image"===i.type)&&e++;e||(s=!1)}s||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const t of["left","middle","right"])for(const n of i[t]){const i=this.createEl(n);i&&(null===(e=a[t])||void 0===e||e.push(i),o++)}let r=null;if(o&&(r=this.createContainer()),r){for(const[t,e]of Object.entries(a)){const i=document.createElement("div");P(i,"fancybox__toolbar__column is-"+t);for(const t of e)i.appendChild('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');"auto"!==n||"middle"!==t||e.length||(n=!0),r.appendChild(i)}!0===n&&P(r,"is-absolute"),this.state=Ct.Ready,this.onRefresh()}else this.state=Ct.Disabled}onClick('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e,i;const n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=t.target,r=a&&E(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return t.preventDefault(),t.stopPropagation(),void(null===(e=n.plugins.Thumbs)||void 0===e||e.toggle());if(void 0!==r.fancyboxToggleFullscreen)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){t.preventDefault(),t.stopPropagation();const e=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay;let s=e.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?e.stop():e.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(t.preventDefault(),t.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){}o&&o.applyChange('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const e=this.instance.getSlide();if(!e||e.state!==nt.Ready)return;const i=e&&!e.error&&e.panzoom;for(const e of t.querySelectorAll("[data-panzoom-action]"))i?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),s=i&&i.canZoomOut();for(const e of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));const t=e.querySelector("g");t&&(t.style.display=n?"":"none")}}onDone(t,e){var i;null===(i=e.panzoom)||void 0===i||i.on("afterTransform",(()=>{this.instance.isCurrentSlide(e)&&this.onRefresh('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),this.instance.isCurrentSlide(e)&&this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const e=this.option("parentEl")||t,i=document.createElement("div");return P(i,"fancybox__toolbar"),e.prepend(i),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&P(t,"has-toolbar"),this.container=i,i}createEl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.instance,i=e.carousel;if(!i)return null;if("toggleFS"===t)return null;if("fullscreen"===t&&!e.fsAPI)return null;let n=null;const o=i.slides.length||0;let a=0,r=0;for(const t of i.slides)(t.panzoom||"image"===t.type)&&a++,("image"===t.type||t.downloadSrc)&&r++;if(o<2&&["infobar","prev","next"].includes('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))return n;if(void 0!==Pt[t]&&!a)return null;if("download"===t&&!r)return null;if("thumbs"===t){const t=e.plugins.Thumbs;if(!t||!t.isEnabled)return null}if("slideshow"===t){if(!i.plugins.Autoplay||o<2)return null}if(void 0!==Pt[t]){const e=Pt[t];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),P(n,"f-button"),e.action&&(n.dataset.panzoomAction=e.action),e.change&&(n.dataset.panzoomChange=JSON.stringify(e.change)),n.appendChild(s(this.instance.localize(e.icon)))}else{const e=(this.option("items")||[])[t];e&&(n=s(this.instance.localize(e.tpl)),"function"==typeof e.click&&n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof e.click&&e.click.call(this,this,t)})))}const l=null==n?void 0:n.querySelector("svg");if(l)for(const[t,e]of Object.entries(Tt))l.getAttribute('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')||l.setAttribute(t,String(e));return n}removeContainer(){const t=this.container;t&&t.remove(),this.container=null,this.state=Ct.Disabled;const e=this.instance.container;e&&S(e,"has-toolbar")}attach(){const t=this,e=t.instance;e.on("Carousel.initSlides",t.onReady),e.on("done",t.onDone),e.on("reveal",t.onChange),e.on("Carousel.change",t.onChange),t.onReady(t.instance)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlides",t.onReady),e.off("done",t.onDone),e.off("reveal",t.onChange),e.off("Carousel.change",t.onChange),t.removeContainer()}}Object.defineProperty(Ot,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Mt});const At={Hash:ot,Html:dt,Images:rt,Slideshow:gt,Thumbs:St,Toolbar:Ot},zt="with-fancybox",Lt="hide-scrollbar",Rt="--fancybox-scrollbar-compensate",kt="--fancybox-body-margin",It="is-animated",Dt="is-compact",Ft="is-loading",jt=function(){var t=window.getSelection();return t&&"Range"===t.type};let Ht=null,Bt=null;const Nt=new Map;let _t=0;class Wt extends g{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],e={},i={}){super(e),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:it.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fsAPI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fsAPI=(()=>{let t,e="",i="",n="";return document.fullscreenEnabled?(e="requestFullscreen",i="exitFullscreen",n="fullscreenElement"):document.webkitFullscreenEnabled&&(e="webkitRequestFullscreen",i="webkitExitFullscreen",n="webkitFullscreenElement"),e&&(t={request:function('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){return"webkitRequestFullscreen"===e?t[e](Element.ALLOW_KEYBOARD_INPUT):t[e]()},exit:function(){return document[n]&&document[i]()},isFullscreen:function(){return document[n]}}),t})(),this.id=e.id||++_t,Nt.set(this.id,this),this.userSlides=t,this.userPlugins=i,queueMicrotask((()=>{this.init('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'))}init(){if(this.state===it.Destroy)return;this.state=it.Init,this.attachPlugins(Object.assign(Object.assign({},Wt.Plugins),this.userPlugins)),this.emit("init"),!0===this.option("hideScrollbar")&&(()=>{if(!K)return;const t=document.body;if(t.classList.contains(Lt))return;let e=window.innerWidth-document.documentElement.getBoundingClientRect().width;e<0&&(e=0);const i=t.currentStyle||window.getComputedStyle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),n=parseFloat(i.marginRight);document.documentElement.style.setProperty(Rt,`${e}px`),n&&t.style.setProperty(kt,`${n}px`),t.classList.add(Lt)})(),this.initLayout(),this.scale();const t=()=>{this.initCarousel(this.userSlides),this.state=it.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute("aria-hidden","false")}),16)},e=this.fsAPI;this.option("Fullscreen.autoStart")&&e&&!e.isFullscreen()?e.request(this.container).then((()=>t())).catch((()=>t())):t()}initLayout(){var t,e;const i=this.option("parentEl")||document.body,n=s(this.localize(this.option("tpl.main")||""));n&&(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(Dt,this.isCompact),P(n,this.option("mainClass")||""),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),P(document.documentElement,zt),Ht&&Bt||(Ht=document.createElement("span"),P(Ht,"fancybox-focus-guard"),Ht.setAttribute("tabindex","0"),Ht.setAttribute("aria-hidden","true"),Ht.setAttribute("aria-label","Focus guard"),Bt=Ht.cloneNode(),null===(t=n.parentElement)||void 0===t||t.insertBefore(Ht,n),null===(e=n.parentElement)||void 0===e||e.append(Bt)),this.option("animated")&&(P(n,It),setTimeout((()=>{this.isClosing()||S(n,It)}),350)),this.emit("initLayout"))}initCarousel('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.container;if(!e)return;const n=e.querySelector(".fancybox__carousel");if(!n)return;const s=this.carousel=new U(n,p({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));s.on("*",((t,e,...i)=>{this.emit(`Carousel.${e}`,t,...i)})),s.on(["ready","change"],(()=>{var t;const e=this.getSlide();e&&(null===(t=e.panzoom)||void 0===t||t.updateControls()),this.manageCaption(e)})),this.on("Carousel.removeSlide",((t,e,i)=>{i.contentEl&&(i.contentEl.remove(),i.contentEl=void 0);const n=i.el;n&&(S(n,"has-error"),S(n,"has-unknown"),S(n,`has-${i.type||"unknown"}`)),i.closeBtnEl&&i.closeBtnEl.remove(),i.closeBtnEl=void 0,i.captionEl&&i.captionEl.remove(),i.captionEl=void 0,i.spinnerEl&&i.spinnerEl.remove(),i.spinnerEl=void 0,i.state=void 0})),s.on("Panzoom.touchStart",(()=>{this.isCompact||this.endIdle('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),s.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&this.checkFocus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",((t,e)=>{const n=this.getSlide();if(n&&i(n.el))return;const s=this.container;if(s){const t=Math.abs(e.current.f),i=t<1?"":Math.max(.5,Math.min(1,1-t/e.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",i?"0s":""),s.style.setProperty("--fancybox-opacity",i+"")}})),s.on("Panzoom.touchEnd",((t,e,n)=>{var s;const o=this.getSlide();if(o&&i(o.el))return;if(e.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;const a=Math.abs(e.dragOffset.y);"y"===e.lockedAxis&&(a>=200||a>=50&&e.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),this.close(n,"f-throwOut"+(e.current.f<0?"Up":"Down")))}))),s.on("change",(t=>{var e;let i=null===(e=this.getSlide())||void 0===e?void 0:e.triggerEl;if(i){const e=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:t.page});i.dispatchEvent(e)}})),s.on(["refresh","change"],(t=>{const e=this.container;if(!e)return;for(const i of e.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=t.page+1;for(const i of e.querySelectorAll("[data-fancybox-count]"))i.innerHTML=t.pages.length;if(!t.isInfinite){for(const i of e.querySelectorAll("[data-fancybox-next]"))t.page<t.pages.length-1?(i.removeAttribute("disabled"),i.removeAttribute("tabindex")):(i.setAttribute("disabled",""),i.setAttribute("tabindex","-1"));for(const i of e.querySelectorAll("[data-fancybox-prev]"))t.page>0?(i.removeAttribute("disabled"),i.removeAttribute("tabindex")):(i.setAttribute("disabled",""),i.setAttribute("tabindex","-1"))}const i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";n||"image"!==i.type||i.error||"string"!=typeof i.src||(n=i.src);const s="disabled",o="tabindex",a="download",r="href";for(const t of e.querySelectorAll("[data-fancybox-download]")){const e=i.downloadFilename;n?(t.removeAttribute(s),t.removeAttribute(o),t.setAttribute(r,n),t.setAttribute(a,e||n),t.setAttribute("target","_blank")):(t.setAttribute(s,""),t.setAttribute(o,"-1"),t.removeAttribute(r),t.removeAttribute(a))}})),this.emit("initCarousel")}attachEvents(){const t=this,e=t.container;if(!e)return;e.addEventListener("click",t.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",t.onResize),i.addEventListener("resize",t.onResize))}detachEvents(){const t=this,e=t.container;if(!e)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",t.onResize),i.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;const e=window.visualViewport,i=Math.max(1,(null==e?void 0:e.scale)||1);let n="",s="",o="";if(e&&i>1){let t=`${e.offsetLeft}px`,a=`${e.offsetTop}px`;n=e.width*i+"px",s=e.height*i+"px",o=`translate3d(${t}, ${a}, 0) scale(${1/i})`}t.style.transform=o,t.style.width=n,t.style.height=s}onClick('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e,i;const{container:n,isCompact:s}=this;if(!n||this.isClosing())return;!s&&this.option("idle")&&this.resetIdle();const o=document.activeElement;if(jt()&&o&&n.contains(o))return;const a=t.composedPath()[0];if(a===(null===(e=this.carousel)||void 0===e?void 0:e.container))return;if(a.closest(".f-spinner")||a.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(a.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(a.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if(s&&"image"===(null===(i=this.getSlide())||void 0===i?void 0:i.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=>{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",t),t.defaultPrevented)return;let r=!1;if(a.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;a.matches(Q)||o.blur()}if(jt())return;r=this.option("contentClick")}else a.closest(".fancybox__carousel")&&!a.matches(Q)&&(r=this.option("backdropClick"));"close"===r?(t.preventDefault(),this.close('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')):"next"===r?(t.preventDefault(),this.next()):"prev"===r&&(t.preventDefault(),this.prev())}onWheel('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;let i=this.option("wheel",t);(null===(e=t.target)||void 0===e?void 0:e.closest(".fancybox__thumbs"))&&(i="slide");const n="slide"===i,s=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?e:t})),o=Math.max(-1,Math.min(1,s)),a=Date.now();this.pwt&&a-this.pwt<300?n&&t.preventDefault():(this.pwt=a,this.emit("wheel",t),t.defaultPrevented||("close"===i?(t.preventDefault(),this.close('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')):"slide"===i&&(t.preventDefault(),this[o>0?"prev":"next"]())))}onKeydown('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const e=t.key,i=this.option("keyboard");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const n=t.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==e&&!o&&E(n)){if(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return}this.emit("keydown",e,t);const a=i[e];"function"==typeof this[a]&&(t.preventDefault(),this[a]())}onResize(){const t=Dt,e=this.container;if(!e)return;const i=this.isCompact;e.classList.toggle(t,i),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.isTopmost()&&this.checkFocus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}onMousemove('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.optionFor(t,"closeButton")||!1;if("auto"===e){const t=this.plugins.Toolbar;if(t&&t.state===Ct.Ready)return}if(!e)return;if(!t.contentEl||t.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const e=s(this.localize(i));t.closeBtnEl=t.contentEl.appendChild(e),t.el&&P(t.el,"has-close-btn")}}manageCaption(t=void 0){var e,i;const n="fancybox__caption",s="has-caption",o=this.container;if(!o)return;const a=this.isCompact||this.option("commonCaption"),r=!a;if(this.caption&&this.stop(this.caption),r&&this.caption&&(this.caption.remove(),this.caption=null),a&&!this.caption)for(const t of(null===(e=this.carousel)||void 0===e?void 0:e.slides)||[])t.captionEl&&(t.captionEl.remove(),t.captionEl=void 0,S(t.el,s),null===(i=t.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||a&&!this.isCurrentSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))return;const l=t.el;let c=this.optionFor(t,"caption","");if("string"!=typeof c||!c.length)return void(a&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let h=null;if(r){if(h=t.captionEl||null,l&&!h){const e=n+`_${this.id}_${t.index}`;h=document.createElement("div"),P(h,n),h.setAttribute("id",e),t.captionEl=l.appendChild(h),P(l,s),l.setAttribute("aria-labelledby",e)}}else{if(h=this.caption,h||(h=o.querySelector("."+n)),!h){h=document.createElement("div"),h.dataset.fancyboxCaption="",P(h,n),h.innerHTML=c;(this.footer||o).prepend(h)}P(o,s),this.caption=h}h&&(h.innerHTML=c)}checkFocus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;const i=document.activeElement||null;i&&(null===(e=this.container)||void 0===e?void 0:e.contains(i))||this.focus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')}focus('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;if(this.ignoreFocusChange)return;const i=document.activeElement||null,n=(null==t?void 0:t.target)||null,s=this.container,o=this.getSlide();if(!s||!(null===(e=this.carousel)||void 0===e?void 0:e.viewport))return;if(!t&&i&&s.contains(i))return;const a=o&&o.state===nt.Ready?o.el:null;if(!a||a.contains(i)||s===i)return;t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;const r=Array.from(s.querySelectorAll(Q));let l=[],c=null;for(let t of r){const e=!t.offsetParent||t.closest('[aria-hidden="true"]'),i=a&&a.contains('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),n=!this.carousel.viewport.contains('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');if(t===s||(i||n)&&!e){l.push('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');const e=t.dataset.origTabindex;void 0!==e&&e&&(t.tabIndex=parseFloat(e)),t.removeAttribute("data-orig-tabindex"),!t.hasAttribute("autoFocus")&&c||(c=t)}else{const e=void 0===t.dataset.origTabindex?t.getAttribute("tabindex")||"":t.dataset.origTabindex;e&&(t.dataset.origTabindex=e),t.tabIndex=-1}}let h=null;t?(!n||l.indexOf(n)<0)&&(h=c||s,l.length&&(i===Bt?h=l[0]:this.lastFocus!==s&&i!==Ht||(h=l[l.length-1]))):h=o&&"image"===o.type?s:c||s,h&&tt(h),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const t=this.carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.carousel&&this.carousel.slideTo(...t)}isTopmost(){var t;return(null===(t=Wt.getInstance())||void 0===t?void 0:t.id)==this.id}animate(t=null,e="",i){if(!t||!e)return void(i&&i());this.stop('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');const n=s=>{s.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",n),delete t.dataset.animationName,i&&i(),S(t,e))};t.dataset.animationName=e,t.addEventListener("animationend",n),P(t,e)}stop('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,e="",i=!0){if(this.isClosing())return;const n=t.el;if(!n)return;let o=null;if(E(e)?o=e:(o=s(e+""),E(o)||(o=document.createElement("div"),o.innerHTML=e+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){const t=document.createElement("div");t.appendChild(o),o=t}E(o)&&t.filter&&!t.error&&(o=o.querySelector(t.filter)),o&&E(o)?(P(o,"fancybox__content"),t.id&&o.setAttribute("id",t.id),"none"!==o.style.display&&"none"!==getComputedStyle(o).getPropertyValue("display")||(o.style.display=t.display||this.option("defaultDisplay")||"flex"),n.classList.add(`has-${t.error?"error":t.type||"unknown"}`),n.prepend(o),t.contentEl=o,i&&this.revealContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.manageCloseBtn('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.manageCaption('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,e){const i=t.el,n=t.contentEl;i&&n&&(this.emit("reveal",t),this.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),t.state=nt.Opening,(e=this.isOpeningSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')?void 0===e?this.optionFor(t,"showClass"):e:"f-fadeIn")?this.animate(n,e,(()=>{this.done('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')})):this.done('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'))}done('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){this.isClosing()||(t.state=nt.Ready,this.emit("done",t),P(t.el,"is-done"),this.isCurrentSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&this.option("autoFocus")&&queueMicrotask((()=>{this.option("autoFocus")&&(this.option("autoFocus")?this.focus():this.checkFocus())})),this.isOpeningSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')&&!this.isCompact&&this.option("idle")&&this.setIdle())}isCurrentSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=this.getSlide();return!(!t||!e)&&e.index===t.index}isOpeningSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e,i;return null===(null===(e=this.carousel)||void 0===e?void 0:e.prevPage)&&t.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){t.state=nt.Loading;const e=t.el;if(!e)return;P(e,Ft),this.emit("loading",t),t.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!t.spinnerEl&&t.state===nt.Loading){let i=s(x);t.spinnerEl=i,e.prepend(i),this.animate(i,"f-fadeIn")}}),250)}hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){const e=t.el;if(!e)return;const i=t.spinnerEl;this.isClosing()?null==i||i.remove():(S(e,Ft),i&&this.animate(i,"f-fadeOut",(()=>{i.remove('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}')),t.state===nt.Loading&&(this.emit("loaded",t),t.state=nt.Ready))}setError(t,e){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,t),i.defaultPrevented)return;t.error=e,this.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'),this.clearContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(e||"<p>{{ERROR}}</p>"),this.setContent(t,n)}clearContent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){var e;null===(e=this.carousel)||void 0===e||e.emit("removeSlide",t)}getSlide(){var t;const e=this.carousel;return(null===(t=null==e?void 0:e.pages[null==e?void 0:e.page])||void 0===t?void 0:t.slides[0])||void 0}close(t,e){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,t),i.defaultPrevented)return;t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());const n=this.fsAPI,s=()=>{this.proceedClose(t,e)};n&&n.isFullscreen()?Promise.resolve(n.exit()).then((()=>s())):s()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const e=()=>{this.clearIdle(),this.idle=!0,P(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')e();else{const t=this.option("idle");t&&(this.idleTimer=setTimeout(e,t))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,S(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){const t=this.fsAPI;t&&(t.isFullscreen()?t.exit():this.container&&t.request(this.container))}isClosing(){return[it.Closing,it.CustomClosing,it.Destroy].includes(this.state)}proceedClose(t,e){var i,n;this.state=it.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(G(r)?tt(r):r.focus()),s&&(P(s,"is-closing"),s.setAttribute("aria-hidden","true"),this.option("animated")&&P(s,It),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();for(const t of o.slides){t.state=nt.Closing,this.hideLoading('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');const e=t.contentEl;e&&this.stop(e);const i=null==t?void 0:t.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')||o.emit("removeSlide",t)}}this.emit("close",t),this.state!==it.CustomClosing?(void 0===e&&a&&(e=this.optionFor(a,"hideClass")),e&&a?(this.animate(a.contentEl,e,(()=>{o&&o.emit("removeSlide",a)})),setTimeout((()=>{this.destroy('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),500)):this.destroy()):setTimeout((()=>{this.destroy('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/')}'),500)}destroy(){var t;if(this.state===it.Destroy)return;this.state=it.Destroy,null===(t=this.carousel)||void 0===t||t.destroy();const e=this.container;e&&e.remove(),Nt.delete(this.id);const i=Wt.getInstance();i?i.focus():(Ht&&(Ht.remove(),Ht=null),Bt&&(Bt.remove(),Bt=null),S(document.documentElement,zt),(()=>{if(!K)return;const t=document,e=t.body;e.classList.remove(Lt),e.style.setProperty(kt,""),t.documentElement.style.setProperty(Rt,"")})(),this.emit("destroy"))}static bind(t,e,i){if(!K)return;let n,s="",o={};if(void 0===t?n=document.body:"string"==typeof t?(n=document.body,s=t,"object"==typeof e&&(o=e||{})):(n=t,"string"==typeof e&&(s=e),"object"==typeof i&&(o=i||{})),!n||!E(n))return;s=s||"[data-fancybox]";const a=Wt.openers.get(n)||new Map;a.set(s,o),Wt.openers.set(n,a),1===a.size&&n.addEventListener("click",Wt.fromEvent)}static unbind(t,e){let i,n="";if("string"==typeof t?(i=document.body,n=t):(i=t,"string"==typeof e&&(n=e)),!i)return;const s=Wt.openers.get(i);s&&n&&s.delete(n),n&&s||(Wt.openers.delete(i),i.removeEventListener("click",Wt.fromEvent))}static destroy(){let t;for(;t=Wt.getInstance();)t.destroy();for(const t of Wt.openers.keys())t.removeEventListener("click",Wt.fromEvent);Wt.openers=new Map}static fromEvent('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;let e=t.composedPath()[0];const i=e.closest("[data-fancybox-trigger]");if(i){const t=i.dataset.fancyboxTrigger||"",n=document.querySelectorAll(`[data-fancybox="${t}"]`),s=parseInt(i.dataset.fancyboxIndex||"",10)||0;e=n[s]||e}if(!(e&&e instanceof Element))return;let n,s,o,a;if([...Wt.openers].reverse().find((([t,i])=>!(!t.contains(e)||![...i].reverse().find((([i,r])=>{let l=e.closest(i);return!!l&&(n=t,s=i,o=l,a=r,!0)}))))),!n||!s||!o)return;a=a||{},t.preventDefault(),e=o;let r=[],l=p({},et,a);l.event=t,l.triggerEl=e,l.delegate=i;const c=l.groupAll,h=l.groupAttr,d=h&&e?e.getAttribute(`${h}`):"";if((!e||d||c)&&(r=[].slice.call(n.querySelectorAll(s))),e&&!c&&(r=d?r.filter((t=>t.getAttribute(`${h}`)===d)):[e]),!r.length)return;const u=Wt.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(e&&(l.startIndex=r.indexOf(e)),Wt.fromNodes(r,l))}static fromSelector(t,e){let i=null,n="";if("string"==typeof t?(i=document.body,n=t):t instanceof HTMLElement&&"string"==typeof e&&(i=t,n=e),!i||!n)return!1;const s=Wt.openers.get(i);if(!s)return!1;const o=s.get(n);return!!o&&Wt.fromNodes(Array.from(i.querySelectorAll(n)),o)}static fromNodes(t,e){e=p({},et,e||{});const i=[];for(const n of t){const t=n.dataset||{},s=t.src||n.getAttribute("href")||n.getAttribute("currentSrc")||n.getAttribute("src")||void 0;let o;const a=e.delegate;let r;a&&i.length===e.startIndex&&(o=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),o||(o=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),o&&(r=o.currentSrc||o.src||void 0,!r&&o.dataset&&(r=o.dataset.lazySrc||o.dataset.src||void 0));const l={src:s,triggerEl:n,thumbEl:o,thumbElSrc:r,thumbSrc:r};for(const e in t)l[e]=t[e]+"";i.push(l)}return new Wt(i,e)}static getInstance('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t'){if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')return Nt.get('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t');return Array.from(Nt.values()).reverse().find((t=>!t.isClosing()&&t))||null}static getSlide(){var t;return(null===(t=Wt.getInstance())||void 0===t?void 0:t.getSlide())||null}static show(t=[],e={}){return new Wt(t,e)}static next(){const t=Wt.getInstance();t&&t.next()}static prev(){const t=Wt.getInstance();t&&t.prev()}static close(t=!0,...e){if('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/Plugins/t')for(const t of Nt.values())t.close(...e);else{const t=Wt.getInstance();t&&t.close(...e)}}}Object.defineProperty(Wt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.20"}),Object.defineProperty(Wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:et}),Object.defineProperty(Wt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:At}),Object.defineProperty(Wt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),t.Carousel=U,t.Fancybox=Wt,t.Panzoom=k}));
/*! hotel-datepicker 4.11.1 - Copyright 2024 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */
var HotelDatepicker = (function (fecha) {
'use strict';
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var fecha__namespace = /*#__PURE__*/_interopNamespaceDefault(fecha);
let idCounter = 0;
class HotelDatepicker {
constructor(input, options) {
this._boundedEventHandlers = {};
this.id = HotelDatepicker.getNewId();
// Set default values
const opts = options || {};
this.className = opts.className || "datepicker";
this.format = opts.format || "YYYY-MM-DD";
this.infoFormat = opts.infoFormat || this.format;
this.ariaDayFormat = opts.ariaDayFormat || "dddd,MMMM DD,YYYY";
this.separator = opts.separator || " - ";
this.startOfWeek = opts.startOfWeek || "sunday"; // Or monday
this.startDate = opts.startDate || new Date();
this.endDate = opts.endDate || false;
this.minNights = opts.minNights || 1;
this.minNightsMultiple = opts.minNightsMultiple || false;
this.maxNights = opts.maxNights || 0;
this.selectForward = opts.selectForward || false;
this.disabledDates = opts.disabledDates || [];
this.noCheckInDates = opts.noCheckInDates || [];
this.noCheckOutDates = opts.noCheckOutDates || [];
this.disabledDaysOfWeek = opts.disabledDaysOfWeek || [];
this.noCheckInDaysOfWeek = opts.noCheckInDaysOfWeek || [];
this.noCheckOutDaysOfWeek = opts.noCheckOutDaysOfWeek || [];
this.daysWithExtraText = [];
this.enableCheckout = opts.enableCheckout || false;
this.preventContainerClose = opts.preventContainerClose || false;
this.container = opts.container || "";
this.animationSpeed = opts.animationSpeed || ".5s";
this.hoveringTooltip = opts.hoveringTooltip || true; // Or a function
this.autoClose = opts.autoClose === undefined ? true : opts.autoClose;
this.showTopbar = opts.showTopbar === undefined ? true : opts.showTopbar;
this.topbarPosition = opts.topbarPosition === "bottom" ? "bottom" : "top";
this.moveBothMonths = opts.moveBothMonths || false;
this.inline = opts.inline || false;
this.clearButton = opts.clearButton || false;
this.submitButton = Boolean(this.inline && opts.submitButton);
this.submitButtonName = this.submitButton && opts.submitButtonName ? opts.submitButtonName : "";
this.closeOnScroll = opts.closeOnScroll || false;
this.i18n = opts.i18n || {
selected: "Your stay:",
night: "Night",
nights: "Nights",
button: "Close",
clearButton: "Clear",
submitButton: "Submit",
"checkin-disabled": "Check-in disabled",
"checkout-disabled": "Check-out disabled",
"day-names-short": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
"day-names": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"month-names-short": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
"month-names": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"error-more": "Date range should not be more than 1 night",
"error-more-plural": "Date range should not be more than %d nights",
"error-less": "Date range should not be less than 1 night",
"error-less-plural": "Date range should not be less than %d nights",
"info-more": "Please select a date range of at least 1 night",
"info-more-plural": "Please select a date range of at least %d nights",
"info-range": "Please select a date range between %d and %d nights",
"info-range-equal": "Please select a date range of %d nights",
"info-default": "Please select a date range",
"aria-application": "Calendar",
"aria-selected-checkin": "Selected as check-in date,%s",
"aria-selected-checkout": "Selected as check-out date,%s",
"aria-selected": "Selected,%s",
"aria-disabled": "Not available,%s",
"aria-choose-checkin": "Choose %s as your check-in date",
"aria-choose-checkout": "Choose %s as your check-out date",
"aria-prev-month": "Move backward to switch to the previous month",
"aria-next-month": "Move forward to switch to the next month",
"aria-close-button": "Close the datepicker",
"aria-clear-button": "Clear the selected dates",
"aria-submit-button": "Submit the form"
};
this.getValue = opts.getValue || function () {
return input.value;
};
this.setValue = opts.setValue || function (s) {
input.value = s;
};
this.onDayClick = opts.onDayClick === undefined ? false : opts.onDayClick;
this.onOpenDatepicker = opts.onOpenDatepicker === undefined ? false : opts.onOpenDatepicker;
this.onSelectRange = opts.onSelectRange === undefined ? false : opts.onSelectRange;
this.extraDayText = opts.extraDayText === undefined ? false : opts.extraDayText;
// DOM input
this.input = input;
// Initialize the datepicker
this.init();
}
addBoundedListener(node, event, handler, capture) {
if (!(node in this._boundedEventHandlers)) {
// _boundedEventHandlers stores references to nodes
this._boundedEventHandlers[node] = {};
}
if (!(event in this._boundedEventHandlers[node])) {
// Each entry contains another entry for each event type
this._boundedEventHandlers[node][event] = [];
}
// Capture reference
const boundedHandler = handler.bind(this);
this._boundedEventHandlers[node][event].push([boundedHandler, capture]);
node.addEventListener(event, boundedHandler, capture);
}
removeAllBoundedListeners(node, event) {
if (node in this._boundedEventHandlers) {
const handlers = this._boundedEventHandlers[node];
if (event in handlers) {
const eventHandlers = handlers[event];
for (let i = eventHandlers.length; i--;) {
const handler = eventHandlers[i];
node.removeEventListener(event, handler[0], handler[1]);
}
}
}
}
static getNewId() {
return ++idCounter;
}
setFechaI18n() {
fecha__namespace.setGlobalDateI18n({
dayNamesShort: this.i18n["day-names-short"],
dayNames: this.i18n["day-names"],
monthNamesShort: this.i18n["month-names-short"],
monthNames: this.i18n["month-names"]
});
}
getWeekDayNames() {
let week = "";
// Start from monday if we passed that option
if (this.startOfWeek === "monday") {
for (let i = 0; i < 7; i++) {
week += '<th class="' + this.className + '__week-name">' + this.lang("day-names-short")[(1 + i) % 7] + "</th>";
}
return week;
}
// Otherwise start from sunday (default)
for (let i = 0; i < 7; i++) {
week += '<th class="' + this.className + '__week-name">' + this.lang("day-names-short")[i] + "</th>";
}
return week;
}
getMonthDom(month) {
// Get month DOM element
return document.getElementById(this.getMonthTableId(month));
}
getMonthName(m) {
// Get month name
return this.lang("month-names")[m];
}
getDatepickerId() {
// Get datepicker ID
return this.className + "-" + this.generateId();
}
getMonthTableId(month) {
// Get month table ID
return "month-" + month + "-" + this.generateId();
}
getCloseButtonId() {
// Get close button ID
return "close-" + this.generateId();
}
getClearButtonId() {
// Get close button ID
return "clear-" + this.generateId();
}
getSubmitButtonId() {
// Get close button ID
return "submit-" + this.generateId();
}
getTooltipId() {
// Get close button ID
return "tooltip-" + this.generateId();
}
getNextMonth(month) {
// Get next month date
const _m = new Date(month.valueOf());
return new Date(_m.setMonth(_m.getMonth() + 1, 1));
}
getPrevMonth(month) {
// Get previous month date
const _m = new Date(month.valueOf());
return new Date(_m.setMonth(_m.getMonth() - 1, 1));
}
getDateString(date) {
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.format;
// Format date
this.setFechaI18n();
return fecha__namespace.format(date, format);
}
parseDate(date) {
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.format;
// Parse a date object
this.setFechaI18n();
return fecha__namespace.parse(date, format);
}
init() {
// DOM container
this.parent = this.container ? this.container : this.input.parentElement;
// Start date of the selected range
this.start = false;
// End date of the selected range
this.end = false;
// Set the minimum of days required by the daterange
this.minDays = this.minNights > 1 ? this.minNights + 1 : 2;
// Set the maximum of days required by the daterange
this.maxDays = this.maxNights > 0 ? this.maxNights + 1 : 0;
// Set startDate if we passed that option
if (this.startDate && typeof this.startDate === "string") {
this.startDate = this.parseDate(this.startDate);
}
// Set endDate if we passed that option
if (this.endDate && typeof this.endDate === "string") {
this.endDate = this.parseDate(this.endDate);
}
// Hide tooltip on touch devices
if (this.isTouchDevice()) {
this.hoveringTooltip = false;
}
// Flag that checks if the datepicker is open
this.isOpen = false;
// Flag that checks if the second date of the range is set
this.changed = false;
// Flag that checks if we exit from the datepicker with the ESC key
this.justEsc = false;
// Flag that checks if we datepicker is on focus
this.isOnFocus = false;
// Create the DOM elements
this.createDom();
// Set default time
let defaultTime = new Date();
if (this.startDate && this.compareMonth(defaultTime, this.startDate) < 0) {
defaultTime = new Date(this.startDate.getTime());
}
if (this.endDate && this.compareMonth(this.getNextMonth(defaultTime), this.endDate) > 0) {
defaultTime = new Date(this.getPrevMonth(this.endDate.getTime()));
}
// Parse disabled dates
if (this.disabledDates.length > 0) {
this.parseDisabledDates();
}
// Parse disabled days
if (this.disabledDaysOfWeek.length > 0) {
this.getDisabledDays();
}
// Show months
this.showMonth(defaultTime, 1);
this.showMonth(this.getNextMonth(defaultTime), 2);
this.setDayIndexes();
// Print default info in top bar
this.topBarDefaultText();
// Open datepicker in inline mode
if (this.inline) {
this.openDatepicker();
if (this.submitButton) {
const submitButton = document.getElementById(this.getSubmitButtonId());
submitButton.disabled = true;
submitButton.setAttribute("aria-disabled", "true");
}
}
if (this.clearButton) {
if (this.inline || !this.start && !this.end) {
const clearButton = document.getElementById(this.getClearButtonId());
clearButton.disabled = true;
clearButton.setAttribute("aria-disabled", "true");
}
}
// Attach listeners
this.addListeners();
// Flag for first disabled date
this.isFirstDisabledDate = 0;
// Holds last disabled date
this.lastDisabledDate = false;
// Add aria attributes
this.setDayAriaAttributes();
}
addListeners() {
// Next month button
const nextButtons = this.datepicker.getElementsByClassName(this.className + "__month-button--next");
for (let i = 0; i < nextButtons.length; i++) {
nextButtons[i].addEventListener("click", evt => this.goToNextMonth(evt));
}
// Previous month button
const prevButtons = this.datepicker.getElementsByClassName(this.className + "__month-button--prev");
for (let i = 0; i < prevButtons.length; i++) {
prevButtons[i].addEventListener("click", evt => this.goToPreviousMonth(evt));
}
// Open the datepicker on the input click
this.addBoundedListener(this.input, "click", evt => this.openDatepicker(evt));
if (this.showTopbar && !this.inline) {
// Close the datepicker on the button click
document.getElementById(this.getCloseButtonId()).addEventListener("click", evt => this.closeDatepicker(evt));
}
if (this.showTopbar && this.clearButton) {
// Clear the datepicker on the button click
document.getElementById(this.getClearButtonId()).addEventListener("click", evt => this.clearDatepicker(evt));
}
// Close the datepicker on resize?
// The problem is that mobile keyboards trigger the resize event closing
// the datepicker. There are some workarounds (http://stackoverflow.com/q/14902321)
// but for now I will disable this option. I'm open to new ideas.
// window.addEventListener('resize', evt => this.closeDatepicker(evt));
// Re-check datepicker, buttons, etc after resize
window.addEventListener("resize", evt => this.onResizeDatepicker(evt));
// Add a mouseover event listener to the document. This will help us to:
// 1 - Handle the hover on calendar days
this.datepicker.addEventListener("mouseover", evt => this.datepickerHover(evt));
// Add a mouseout event listener to the document. This will help us to:
// 1 - Hide the tooltip on the mouseout event on days
this.datepicker.addEventListener("mouseout", evt => this.datepickerMouseOut(evt));
// Update the selected values when the input changes manually
this.addBoundedListener(this.input, "change", () => this.checkAndSetDefaultValue());
// Open datepicker on focus
if (!this.inline) {
if (!this.justEsc) {
this.addBoundedListener(this.input, "focus", evt => this.openDatepicker(evt));
}
this.justEsc = false;
}
// Listen for keystrokes
window.addEventListener("keydown", evt => this.doKeyDown(evt));
// Listen for focus
document.addEventListener("focus", evt => this.checkOnFocus(evt), true);
// Close datepicker on scroll
if (this.closeOnScroll) {
window.addEventListener("scroll", evt => this.closeDatepicker(evt));
}
}
generateId() {
// Generate an unique ID for each datepicker
// Use input ID if set
if (this.input.id) {
return this.input.id;
// Otherwise get the instance id
}
return this.id;
}
createDom() {
const domString = this.createDatepickerDomString();
// Insert the datepicker in the document
this.parent.insertAdjacentHTML("beforeend", domString);
// Store our datepicker in a property
this.datepicker = document.getElementById(this.getDatepickerId());
}
createDatepickerDomString() {
// Generate our datepicker
let wrapperClass = this.inline ? " " + this.className + "--inline" : "";
if (this.showTopbar) {
if (this.topbarPosition === "bottom") {
wrapperClass += " " + this.className + "--topbar-bottom";
} else {
wrapperClass += " " + this.className + "--topbar-top";
}
}
if (!this.inline) {
wrapperClass += " " + this.className + this.className + "--topbar-has-close-button";
}
if (this.clearButton) {
wrapperClass += " " + this.className + "--topbar-has-clear-button";
}
if (this.submitButton) {
wrapperClass += " " + this.className + "--topbar-has-submit-button";
}
const wrapperStyle = this.inline ? "" : ' style="display:none"';
let html = '<div id="' + this.getDatepickerId() + '"' + wrapperStyle + ' class="' + this.className + " " + this.className + "--closed" + wrapperClass + '" tabindex="0">';
html += '<div class="' + this.className + '__inner">';
let topBarHtml = "";
if (this.showTopbar) {
// Top bar section
topBarHtml += '<div class="' + this.className + '__topbar">' + '<div class="' + this.className + "__info " + this.className + '__info--selected"><span class="' + this.className + "__info " + this.className + '__info--selected-label">' + this.lang("selected") + ' </span> <strong class="' + this.className + "__info-text " + this.className + '__info-text--start-day">...</strong>' + ' <span class="' + this.className + "__info-text " + this.className + '__info--separator">' + this.separator + '</span> <strong class="' + this.className + "__info-text " + this.className + '__info-text--end-day">...</strong> <em class="' + this.className + "__info-text " + this.className + '__info-text--selected-days">(<span></span>)</em>' + "</div>" + '<div class="' + this.className + "__info " + this.className + '__info--feedback"></div>';
let buttonsHtml = "";
if (this.clearButton) {
buttonsHtml += '<button type="button" id="' + this.getClearButtonId() + '" class="' + this.className + '__clear-button" aria-label="' + this.i18n["aria-clear-button"] + '">' + this.lang("clearButton") + "</button>";
}
if (!this.inline) {
buttonsHtml += '<button type="button" id="' + this.getCloseButtonId() + '" class="' + this.className + '__close-button" aria-label="' + this.i18n["aria-close-button"] + '">' + this.lang("button") + "</button>";
}
// if (this.clearButton || this.submitButton) {
//     topBarHtml += '<div class="' + this.className + '__buttons">';
// }
if (this.submitButton) {
buttonsHtml += '<input type="submit" id="' + this.getSubmitButtonId() + '" class="' + this.className + '__submit-button" value="' + this.lang("submitButton") + '" name="' + this.submitButtonName + '" aria-label="' + this.i18n["aria-submit-button"] + '">';
}
if (buttonsHtml) {
topBarHtml += '<div class="' + this.className + '__buttons">' + buttonsHtml + "</div>";
}
topBarHtml += "</div>";
}
if (this.showTopbar && this.topbarPosition === "top") {
html += topBarHtml;
}
// Months section
html += '<div class="' + this.className + '__months" role="application" aria-roledescription="datepicker" aria-label="' + this.i18n["aria-application"] + '">';
// Print single months
for (let i = 1; i <= 2; i++) {
html += '<table role="presentation" id="' + this.getMonthTableId(i) + '" class="' + this.className + "__month " + this.className + "__month--month" + i + '"><thead><tr class="' + this.className + '__month-caption"><th><span  role="button" tabindex="0" aria-label="' + this.i18n["aria-prev-month"] + '" class="' + this.className + "__month-button " + this.className + '__month-button--prev" month="' + i + '">&lt;</span></th><th colspan="5" class="' + this.className + '__month-name"></th><th><span role="button" tabindex="0" aria-label="' + this.i18n["aria-next-month"] + '" class="' + this.className + "__month-button " + this.className + '__month-button--next" month="' + i + '">&gt;</span></th></tr><tr class="' + this.className + '__week-days"  aria-hidden="true" role="presentation">' + this.getWeekDayNames(i) + "</tr></thead><tbody></tbody></table>";
}
html += "</div>";
if (this.showTopbar && this.topbarPosition === "bottom") {
html += topBarHtml;
}
// Tooltip
html += '<div style="display:none" id="' + this.getTooltipId() + '" class="' + this.className + '__tooltip"></div>';
html += "</div>";
html += "</div>";
return html;
}
showMonth(date, month) {
date.setHours(0, 0, 0, 0);
// Show month table and create the necessary HTML code
const name = this.getMonthName(date.getMonth());
const monthDom = this.getMonthDom(month);
const monthName = monthDom.getElementsByClassName(this.className + "__month-name")[0];
const monthBody = monthDom.getElementsByTagName("tbody")[0];
// Month caption
monthName.textContent = name + " " + date.getFullYear();
// Remove child elements before to insert the new month
this.emptyElement(monthBody);
// Append the month
monthBody.insertAdjacentHTML("beforeend", this.createMonthDomString(date));
// Check day dates
this.updateSelectableRange();
// Store current month dates
this["month" + month] = date;
}
createMonthDomString(_date) {
const days = [];
let html = "";
let valid;
_date.setDate(1);
let dayOfWeek = _date.getDay();
const currentMonth = _date.getMonth();
if (dayOfWeek === 0 && this.startOfWeek === "monday") {
// Add one week
dayOfWeek = 7;
}
// If the first day is in the middle of the week, push also
// the first days of the week (the days before our first day).
// We need a complete week row.
// Obviously, these days are part of the previous month.
if (dayOfWeek > 0) {
for (let i = dayOfWeek; i > 0; i--) {
const _day = new Date(_date.getTime() - 86400000 * i);
// Check if the day is valid. And pass this property to the days object
valid = this.isValidDate(_day.getTime());
if (this.startDate && this.compareDay(_day, this.startDate) < 0 || this.endDate && this.compareDay(_day, this.endDate) > 0) {
valid = false;
}
// We pass the type property to know if the day is part of the
// previous month. We already know that it is true.
days.push({
date: _day,
type: "lastMonth",
day: _day.getDate(),
time: _day.getTime(),
valid
});
}
}
// Push 40 days. Each month table needs the days of the month plus
// the remaining days (of the week row) before the first day of the month
// and after the last day of the month. (PS. They will be hidden)
// 40 days are enough to cover all the possibilities.
for (let i = 0; i < 40; i++) {
const _day = this.addDays(_date, i);
// Check if the day is valid. And pass this property to the days object
valid = this.isValidDate(_day.getTime());
if (this.startDate && this.compareDay(_day, this.startDate) < 0 || this.endDate && this.compareDay(_day, this.endDate) > 0) {
valid = false;
}
// We pass the type property to know if the day is part of the
// current month or part of the next month
days.push({
date: _day,
type: _day.getMonth() === currentMonth ? "visibleMonth" : "nextMonth",
day: _day.getDate(),
time: _day.getTime(),
valid
});
}
// Create the week rows.
for (let week = 0; week < 6; week++) {
// Iterate the days object week by week.
// If the last day is part of the next month, stop the loop.
if (days[week * 7].type === "nextMonth") {
break;
}
html += '<tr class="' + this.className + '__week-row">';
// Create the days of a week, one by one
for (let i = 0; i < 7; i++) {
let _day = this.startOfWeek === "monday" ? i + 1 : i;
_day = days[week * 7 + _day];
const classes = this.getDayClasses(_day);
// Add a title for those days where the checkin or checkout is disabled
let title = "";
if (this.hasClass(_day, this.className + "__month-day--no-checkin")) {
title = this.i18n["checkin-disabled"];
}
if (this.hasClass(_day, +this.className + "__month-day--no-checkout")) {
if (title) {
title += ". ";
}
title += this.i18n["checkout-disabled"];
}
// Each day has the "time" attribute (timestamp) and an appropriate class
const dayAttributes = {
daytype: _day.type,
time: _day.time,
class: classes.join(" "),
d: i + 1
};
// Add title attribute if available
if (title) {
dayAttributes.title = title;
}
// Add role
dayAttributes.role = "button";
// Add tabindex to today date
if (this.getDateString(_day.time) === this.getDateString(new Date())) {
dayAttributes.tabindex = "0";
}
let extraText = "";
// Optionally print some text in day cells
if (this.extraDayText) {
extraText = this.extraDayText(this.getDateString(_day.time), dayAttributes);
}
extraText = extraText ? extraText : "";
if (extraText) {
dayAttributes.class = dayAttributes.class + " " + this.className + "__month-day--with-extra";
this.daysWithExtraText.push(this.getDateString(_day.time));
}
// Create the day HTML
html += '<td class="' + dayAttributes.class + '" ' + this.printAttributes(dayAttributes) + ">" + _day.day + extraText + "</td>";
}
html += "</tr>";
}
return html;
}
openDatepicker() {
// Open the datepicker
if (!this.isOpen) {
// Add/remove helper classes
this.removeClass(this.datepicker, this.className + "--closed");
this.addClass(this.datepicker, this.className + "--open");
// Set (and check) the range value based on the current input value
this.checkAndSetDefaultValue();
// Slide down the datepicker
if (!this.inline) {
this.slideDown(this.datepicker, this.animationSpeed);
}
// Set flag
this.isOpen = true;
// Show selected days in the calendar
this.showSelectedDays();
// Disable (if needed) the prev/next buttons
this.disableNextPrevButtons();
// Add a click event listener to the document. This will help us to:
// 1 - Check if the click it's outside the datepicker
// 2 - Handle the click on calendar days
this.addBoundedListener(document, "click", evt => this.documentClick(evt));
// Optionally run a function when the datepicker is open
if (this.onOpenDatepicker) {
this.onOpenDatepicker();
}
}
}
closeDatepicker() {
// Close the datepicker
if (!this.isOpen || this.inline) {
return;
}
// Add/remove helper classes
this.removeClass(this.datepicker, this.className + "--open");
this.addClass(this.datepicker, this.className + "--closed");
// Slide up the datepicker
this.slideUp(this.datepicker, this.animationSpeed);
this.isOpen = false;
// Create event on close
const evt = document.createEvent("Event");
evt.initEvent("afterClose", true, true);
this.input.dispatchEvent(evt);
this.removeAllBoundedListeners(document, "click");
}
autoclose() {
// Autoclose the datepicker when the second date is set
if (this.autoClose && this.changed && this.isOpen && this.start && this.end && !this.inline) {
this.closeDatepicker();
}
}
documentClick(evt) {
// Check if the click was outside the datepicker and close it
if (!this.parent.contains(evt.target) && evt.target !== this.input) {
if (!this.preventContainerClose) {
this.closeDatepicker();
}
} else if (evt.target.tagName.toLowerCase() === "td") {
// Check if the click was on a calendar day
this.dayClicked(evt.target);
}
}
datepickerHover(evt) {
// Check if the hover is on a calendar day
if (evt.target.tagName && evt.target.tagName.toLowerCase() === "td") {
this.dayHovering(evt.target);
}
}
datepickerMouseOut(evt) {
// Check if the mouseout is on a calendar day
if (evt.target.tagName && evt.target.tagName.toLowerCase() === "td") {
// Hide the tooltip
const tooltipContainer = document.getElementById(this.getTooltipId());
tooltipContainer.style.display = "none";
}
}
onResizeDatepicker() {
// Reset month views
this.checkAndSetDefaultValue(true);
}
getDayClasses(_day) {
const isToday = this.getDateString(_day.time) === this.getDateString(new Date());
const isStartDate = this.getDateString(_day.time) === this.getDateString(this.startDate);
const isDayWithExtraText = this.daysWithExtraText.indexOf(this.getDateString(_day.time)) > -1;
let isDisabled = false;
let isNoCheckIn = false;
let isNoCheckOut = false;
let isDayOfWeekDisabled = false;
let isFirstEnabledDate = false;
// Day between disabled dates and the last day
// before the disabled date
let isDayBeforeDisabledDate = false;
// Check if the day is one of the days passed in the
// (optional) disabledDates option. And set valid to
// false in this case.
//
// Also, check if the checkin or checkout is disabled
if (_day.valid || _day.type === "visibleMonth") {
const dateString = this.getDateString(_day.time, "YYYY-MM-DD");
if (this.disabledDates.length > 0) {
// Check if this day is between two disabled dates
// and disable it if there are not enough days
// available to select a valid range
const limit = this.getClosestDisabledDates(_day.date);
// Consider also the day before startDate
// as disabled date
if (limit[0] === false) {
limit[0] = this.substractDays(this.startDate, 1);
}
if (limit[0] && limit[1]) {
if (this.compareDay(_day.date, limit[0]) && this.countDays(limit[0], limit[1]) - 2 > 0) {
const daysBeforeNextDisabledDate = this.countDays(limit[1], _day.date) - 1;
const daysAfterPrevDisabledDate = this.countDays(_day.date, limit[0]) - 1;
if (this.selectForward && daysBeforeNextDisabledDate < this.minDays) {
_day.valid = false;
} else if (!this.selectForward && daysBeforeNextDisabledDate < this.minDays && daysAfterPrevDisabledDate < this.minDays) {
_day.valid = false;
}
if (!_day.valid && this.enableCheckout && daysBeforeNextDisabledDate === 2) {
isDayBeforeDisabledDate = true;
}
}
}
if (this.disabledDates.indexOf(dateString) > -1) {
_day.valid = false;
isDisabled = true;
this.isFirstDisabledDate++;
// Store last disabled date for later
this.lastDisabledDate = _day.date;
} else {
this.isFirstDisabledDate = 0;
}
// First day after a disabled day
if (_day.valid && this.lastDisabledDate && this.compareDay(_day.date, this.lastDisabledDate) > 0 && this.countDays(_day.date, this.lastDisabledDate) === 2) {
isFirstEnabledDate = true;
}
}
if (this.disabledDaysOfWeek.length > 0) {
if (this.disabledDaysOfWeek.indexOf(fecha__namespace.format(_day.time, "dddd")) > -1) {
_day.valid = false;
isDayOfWeekDisabled = true;
}
}
if (this.noCheckInDates.length > 0) {
if (this.noCheckInDates.indexOf(dateString) > -1) {
isNoCheckIn = true;
isFirstEnabledDate = false;
}
}
if (this.noCheckOutDates.length > 0) {
if (this.noCheckOutDates.indexOf(dateString) > -1) {
isNoCheckOut = true;
}
}
if (this.noCheckInDaysOfWeek.length > 0) {
if (this.noCheckInDaysOfWeek.indexOf(fecha__namespace.format(_day.time, "dddd")) > -1) {
isNoCheckIn = true;
isFirstEnabledDate = false;
}
}
if (this.noCheckOutDaysOfWeek.length > 0) {
if (this.noCheckOutDaysOfWeek.indexOf(fecha__namespace.format(_day.time, "dddd")) > -1) {
isNoCheckOut = true;
}
}
}
const classes = [this.className + "__month-day", this.className + "__month-day--" + _day.type, this.className + "__month-day--" + (_day.valid ? "valid" : "invalid"), isToday ? this.className + "__month-day--today" : "", isDisabled ? this.className + "__month-day--disabled" : "", isDisabled && this.enableCheckout && this.isFirstDisabledDate === 1 ? this.className + "__month-day--checkout-enabled" : "", isDayBeforeDisabledDate ? this.className + "__month-day--before-disabled-date" : "", isStartDate || isFirstEnabledDate ? this.className + "__month-day--checkin-only" : "", isNoCheckIn ? this.className + "__month-day--no-checkin" : "", isNoCheckOut ? this.className + "__month-day--no-checkout" : "", isDayOfWeekDisabled ? this.className + "__month-day--day-of-week-disabled" : "", isDayWithExtraText ? this.className + "__month-day--with-extra" : ""];
return classes;
}
checkAndSetDayClasses() {
// Get every td in the months table: our days
const days = this.datepicker.getElementsByTagName("td");
// Iterate each day and re-check HTML classes
for (let i = 0; i < days.length; i++) {
const time = parseInt(days[i].getAttribute("time"), 10);
const day = new Date(time);
const daytype = days[i].getAttribute("daytype");
let valid;
// Check if the day is valid. And pass this property to the days object
valid = this.isValidDate(day.getTime());
if (this.startDate && this.compareDay(day, this.startDate) < 0 || this.endDate && this.compareDay(day, this.endDate) > 0) {
valid = false;
}
const _day = {
date: day,
type: daytype,
day: day.getDate(),
time,
valid
};
const classes = this.getDayClasses(_day);
days[i].className = classes.join(" ");
}
}
checkAndSetDefaultValue() {
let onresize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
// Set range based on the input value
// Get dates from input value
const value = this.getValue();
const dates = value ? value.split(this.separator) : "";
// If we have our two dates, set the date range
if (dates && dates.length >= 2) {
// Format the values correctly
const _format = this.format;
// Set the date range
this.changed = false;
this.setDateRange(this.parseDate(dates[0], _format), this.parseDate(dates[1], _format), onresize);
this.changed = true;
} else if (this.showTopbar) {
const selectedInfo = this.datepicker.getElementsByClassName(this.className + "__info--selected")[0];
selectedInfo.style.display = "none";
if (onresize) {
// Set default time
let defaultTime = new Date();
if (this.startDate && this.compareMonth(defaultTime, this.startDate) < 0) {
defaultTime = new Date(this.startDate.getTime());
}
if (this.endDate && this.compareMonth(this.getNextMonth(defaultTime), this.endDate) > 0) {
defaultTime = new Date(this.getPrevMonth(this.endDate.getTime()));
}
if (this.start && !this.end) {
this.clearSelection();
}
// Show months
this.showMonth(defaultTime, 1);
this.showMonth(this.getNextMonth(defaultTime), 2);
this.setDayIndexes();
}
}
}
setDateRange(date1, date2) {
let onresize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
// Swap dates if needed
if (date1.getTime() > date2.getTime()) {
let tmp = date2;
date2 = date1;
date1 = tmp;
tmp = null;
}
let valid = true;
// Check the validity of the dates
if (this.startDate && this.compareDay(date1, this.startDate) < 0 || this.endDate && this.compareDay(date2, this.endDate) > 0) {
valid = false;
}
// If not valid, reset the datepicker
if (!valid) {
// Show default (initial) months
this.showMonth(this.startDate, 1);
this.showMonth(this.getNextMonth(this.startDate), 2);
this.setDayIndexes();
// Show selected days in the calendar
this.showSelectedDays();
// Disable (if needed) the prev/next buttons
this.disableNextPrevButtons();
return;
}
// Fix DST
date1.setTime(date1.getTime() + 12 * 60 * 60 * 1000);
date2.setTime(date2.getTime() + 12 * 60 * 60 * 1000);
// Calculate the next month value
this.start = date1.getTime();
this.end = date2.getTime();
if (this.compareDay(date1, date2) > 0 && this.compareMonth(date1, date2) === 0) {
date2 = this.getNextMonth(date1);
}
if (this.compareMonth(date1, date2) === 0) {
date2 = this.getNextMonth(date1);
}
// Show the months
this.showMonth(date1, 1);
this.showMonth(date2, 2);
this.setDayIndexes();
// Show selected days in the calendar
this.showSelectedDays();
// Disable (if needed) the prev/next buttons
this.disableNextPrevButtons();
// Check the selection
this.checkSelection();
// Show selected dates in top bar
this.showSelectedInfo();
// Close the datepicker
if (!onresize) {
this.autoclose();
}
// Add aria attributes
this.setDayAriaAttributes();
}
showSelectedDays() {
// Show selected days in the calendar
// Return early if we don't have the start and end dates
if (!this.start && !this.end) {
return;
}
// Get every td in the months table: our days
const days = this.datepicker.getElementsByTagName("td");
// Iterate each day and assign an appropriate HTML class
// if they are selected in the date range
for (let i = 0; i < days.length; i++) {
const time = parseInt(days[i].getAttribute("time"), 10);
// Add selected class
if (this.start && this.end && this.end >= time && this.start <= time || this.start && !this.end && this.getDateString(this.start, "YYYY-MM-DD") === this.getDateString(time, "YYYY-MM-DD")) {
this.addClass(days[i], this.className + "__month-day--selected");
} else {
this.removeClass(days[i], this.className + "__month-day--selected");
}
// Add class to the first day of the range
if (this.start && this.getDateString(this.start, "YYYY-MM-DD") === this.getDateString(time, "YYYY-MM-DD")) {
this.addClass(days[i], this.className + "__month-day--first-day-selected");
} else {
this.removeClass(days[i], this.className + "__month-day--first-day-selected");
}
// Add class to the last day of the range
if (this.end && this.getDateString(this.end, "YYYY-MM-DD") === this.getDateString(time, "YYYY-MM-DD")) {
this.addClass(days[i], this.className + "__month-day--last-day-selected");
} else {
this.removeClass(days[i], this.className + "__month-day--last-day-selected");
}
}
}
showSelectedInfo() {
// Return early if the top bar is disabled
if (!this.showTopbar) {
// If both dates are set, set the value of our input
if (this.start && this.end) {
const dateRangeValue = this.getDateString(new Date(this.start)) + this.separator + this.getDateString(new Date(this.end));
// Set input value
this.setValue(dateRangeValue, this.getDateString(new Date(this.start)), this.getDateString(new Date(this.end)));
this.changed = true;
}
return;
}
// Show selected range in top bar
const selectedInfo = this.datepicker.getElementsByClassName(this.className + "__info--selected")[0];
const elStart = selectedInfo.getElementsByClassName(this.className + "__info-text--start-day")[0];
const elEnd = selectedInfo.getElementsByClassName(this.className + "__info-text--end-day")[0];
const elSelected = selectedInfo.getElementsByClassName(this.className + "__info-text--selected-days")[0];
const closeButton = document.getElementById(this.getCloseButtonId());
const clearButton = document.getElementById(this.getClearButtonId());
const submitButton = document.getElementById(this.getSubmitButtonId());
// Set default text and hide the count element
elStart.textContent = "...";
elEnd.textContent = "...";
elSelected.style.display = "none";
// Show first date
if (this.start) {
selectedInfo.style.display = "";
elStart.textContent = this.getDateString(new Date(parseInt(this.start, 10)), this.infoFormat);
if (this.clearButton) {
clearButton.disabled = false;
clearButton.setAttribute("aria-disabled", "false");
}
}
// Show second date
if (this.end) {
elEnd.textContent = this.getDateString(new Date(parseInt(this.end, 10)), this.infoFormat);
}
// If both dates are set, show the count and set the value of our input
if (this.start && this.end) {
const count = this.countDays(this.getDateString(new Date(this.end)), this.getDateString(new Date(this.start))) - 1;
const countText = count === 1 ? count + " " + this.lang("night") : count + " " + this.lang("nights");
const dateRangeValue = this.getDateString(new Date(this.start)) + this.separator + this.getDateString(new Date(this.end));
// Show count
elSelected.style.display = "";
elSelected.firstElementChild.textContent = countText;
if (!this.inline) {
closeButton.disabled = false;
closeButton.setAttribute("aria-disabled", "false");
} else if (this.submitButton) {
submitButton.disabled = false;
submitButton.setAttribute("aria-disabled", "false");
}
// Set input value
this.setValue(dateRangeValue, this.getDateString(new Date(this.start)), this.getDateString(new Date(this.end)));
this.changed = true;
} else if (!this.inline && this.start === false && this.end === false) {
closeButton.disabled = false;
closeButton.setAttribute("aria-disabled", "false");
} else if (!this.inline) {
// Disable the close button until a valid date range
closeButton.disabled = true;
closeButton.setAttribute("aria-disabled", "true");
} else {
if (this.submitButton) {
// Disable the submit button until a valid date range
submitButton.disabled = true;
submitButton.setAttribute("aria-disabled", "true");
}
}
if (this.clearButton && !this.start && !this.end) {
// Disable the clear button until one valid date is selected
clearButton.disabled = true;
clearButton.setAttribute("aria-disabled", "true");
}
}
dayClicked(day) {
if (this.hasClass(day, this.className + "__month-day--invalid")) {
return;
}
const isSelectStart = this.start && this.end || !this.start && !this.end;
const time = parseInt(day.getAttribute("time"), 10);
// Return early for those days where the checkin or checkout is disabled
if (isSelectStart) {
if (this.hasClass(day, this.className + "__month-day--no-checkin")) {
return;
}
} else if (this.start) {
if (this.start > time && this.hasClass(day, this.className + "__month-day--no-checkin")) {
return;
}
const startDayEl = this.datepicker.querySelectorAll('td[time="' + this.start + '"]')[0];
if (startDayEl) {
if (this.hasClass(startDayEl, this.className + "__month-day--no-checkout") && this.start > time) {
return;
}
}
if (this.hasClass(day, this.className + "__month-day--no-checkout") && time > this.start) {
return;
}
}
this.addClass(day, this.className + "__month-day--selected");
if (isSelectStart) {
this.start = time;
this.end = false;
} else if (this.start) {
this.end = time;
}
// Swap dates if they are inverted
if (this.start && this.end && this.start > this.end) {
const tmp = this.end;
this.end = this.start;
this.start = tmp;
}
this.start = parseInt(this.start, 10);
this.end = parseInt(this.end, 10);
// Remove hovering class from every day and hide tooltip
this.clearHovering();
// Show hover
if (this.start && !this.end) {
// Add hovering class
this.dayHovering(day);
}
// Check day dates
this.updateSelectableRange();
// Check the selection
this.checkSelection();
// Show selected dates in top bar
this.showSelectedInfo();
// Check dates again after selection
if (this.start && this.end) {
this.checkAndSetDayClasses();
}
// Show selected days in the calendar
this.showSelectedDays();
// Close the datepicker
this.autoclose();
// Optionally run a function when a day is clicked
if (this.onDayClick) {
this.onDayClick();
}
// Optionally run a function when a range is selected
if (this.end && this.onSelectRange) {
this.onSelectRange();
}
// Add aria attributes
this.setDayAriaAttributes();
}
isValidDate(time) {
// Check if the date is valid
time = parseInt(time, 10);
if (this.startDate && this.compareDay(time, this.startDate) < 0 || this.endDate && this.compareDay(time, this.endDate) > 0) {
return false;
}
// Update valid dates during the selection
if (this.start && !this.end) {
// Check maximum/minimum days
if (this.maxDays > 0 && this.countDays(time, this.start) > this.maxDays || this.minDays > 0 && this.countDays(time, this.start) > 1 && this.countDays(time, this.start) < this.minDays) {
return false;
}
// Check if only multiple of minDays is allowed
if (this.minNightsMultiple && (this.countDays(time, this.start) - 1) % 7 !== 0) {
return false;
}
// Check if date is before first date of range
if (this.selectForward && time < this.start) {
return false;
}
// Check the disabled dates
if (this.disabledDates.length > 0) {
const limit = this.getClosestDisabledDates(new Date(parseInt(this.start, 10)));
if (limit[0] && this.compareDay(time, limit[0]) <= 0) {
return false;
}
if (limit[1] && this.compareDay(time, limit[1]) >= 0) {
return false;
}
}
// Check disabled days of week
if (this.disabledDaysOfWeek.length > 0) {
const limit = this.getClosestDisabledDays(new Date(parseInt(this.start, 10)));
if (limit[0] && this.compareDay(time, limit[0]) <= 0) {
return false;
}
if (limit[1] && this.compareDay(time, limit[1]) >= 0) {
return false;
}
}
}
return true;
}
checkSelection() {
const numberOfDays = this.countDays(this.end, this.start);
const bar = this.showTopbar ? this.datepicker.getElementsByClassName(this.className + "__info--feedback")[0] : false;
if (this.maxDays && numberOfDays > this.maxDays) {
this.start = false;
this.end = false;
// Remove selected class from each day
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
this.removeClass(days[i], this.className + "__month-day--selected");
this.removeClass(days[i], this.className + "__month-day--first-day-selected");
this.removeClass(days[i], this.className + "__month-day--last-day-selected");
}
if (this.showTopbar) {
// Show error in top bar
const errorValue = this.maxDays - 1;
this.topBarErrorText(bar, "error-more", errorValue);
}
} else if (this.minDays && numberOfDays < this.minDays) {
this.start = false;
this.end = false;
// Remove selected class from each day
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
this.removeClass(days[i], this.className + "__month-day--selected");
this.removeClass(days[i], this.className + "__month-day--first-day-selected");
this.removeClass(days[i], this.className + "__month-day--last-day-selected");
}
if (this.showTopbar) {
// Show error in top bar
const errorValue = this.minDays - 1;
this.topBarErrorText(bar, "error-less", errorValue);
}
} else if (this.start || this.end) {
if (this.showTopbar) {
// Remove error and help classes from top bar
this.removeClass(bar, this.className + "__info--error");
this.removeClass(bar, this.className + "__info--help");
}
} else if (this.showTopbar) {
// Show help message
this.removeClass(bar, this.className + "__info--error");
this.addClass(bar, this.className + "__info--help");
}
}
addDays(date, days) {
// Add xx days to date
const result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}
substractDays(date, days) {
// Substract xx days to date
const result = new Date(date);
result.setDate(result.getDate() - days);
return result;
}
countDays(start, end) {
// Return days between two dates
return Math.abs(this.daysFrom1970(start) - this.daysFrom1970(end)) + 1;
}
compareDay(day1, day2) {
// Compare two days: check if day1 is before/after/same day of day2
const p = parseInt(this.getDateString(day1, "YYYYMMDD"), 10) - parseInt(this.getDateString(day2, "YYYYMMDD"), 10);
if (p > 0) {
return 1;
}
if (p === 0) {
return 0;
}
return -1;
}
compareMonth(month1, month2) {
// Compare two months: check if month1 is before/after/same month of month2
const p = parseInt(this.getDateString(month1, "YYYYMM"), 10) - parseInt(this.getDateString(month2, "YYYYMM"), 10);
if (p > 0) {
return 1;
}
if (p === 0) {
return 0;
}
return -1;
}
daysFrom1970(t) {
// Get days from 1970
return Math.round(this.toLocalTimestamp(t) / 86400000);
}
toLocalTimestamp(t) {
// Convert timestamp to local timestamp
if (typeof t === "object" && t.getTime) {
t = t.getTime();
}
if (typeof t === "string" && !t.match(/\d{13}/)) {
t = this.parseDate(t).getTime();
}
t = parseInt(t, 10) - new Date().getTimezoneOffset() * 60 * 1000;
return t;
}
printAttributes(obj) {
// Print object attributes in a DOM element
const _obj = obj;
let attribute = "";
for (const attr in obj) {
if (Object.prototype.hasOwnProperty.call(_obj, attr)) {
attribute += attr + '="' + _obj[attr] + '" ';
}
}
return attribute;
}
goToNextMonth(e) {
let forceBoth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
// Go to the next month
const thisMonth = Number.isInteger(e) ? e : e.target.getAttribute("month");
const isMonth2 = thisMonth > 1;
let nextMonth = isMonth2 ? this.month2 : this.month1;
nextMonth = this.getNextMonth(nextMonth);
// Dont't go to the next month if:
// 1. The second month is visible and it is the next month after
//    our current month
// 2. The month is after the (optional) endDate. There's no need
//    to show other months in this case.
if (!this.isSingleMonth() && !isMonth2 && this.compareMonth(nextMonth, this.month2) >= 0 || this.isMonthOutOfRange(nextMonth)) {
return false;
}
// We can now show the month and proceed
if ((this.moveBothMonths || forceBoth) && isMonth2) {
this.showMonth(this.month2, 1);
}
this.showMonth(nextMonth, thisMonth);
this.setDayIndexes();
this.showSelectedDays();
this.disableNextPrevButtons();
return true;
}
goToPreviousMonth(e) {
let forceBoth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
// Go to the previous month
const thisMonth = Number.isInteger(e) ? e : e.target.getAttribute("month");
const isMonth2 = thisMonth > 1;
let prevMonth = isMonth2 ? this.month2 : this.month1;
prevMonth = this.getPrevMonth(prevMonth);
// Dont't go to the previous month if:
// 1. The click it's in the second month and the month we need is already
//    shown in the first month
// 2. The month is before the (optional) startDate. There's no need
//    to show other months in this case.
if (isMonth2 && this.compareMonth(prevMonth, this.month1) <= 0 || this.isMonthOutOfRange(prevMonth)) {
return false;
}
// We can now show the month and proceed
if ((this.moveBothMonths || forceBoth) && !isMonth2) {
this.showMonth(this.month1, 2);
}
this.showMonth(prevMonth, thisMonth);
this.setDayIndexes();
this.showSelectedDays();
this.disableNextPrevButtons();
return true;
}
isSingleMonth() {
// Check if the second month is visible
return !this.isVisible(this.getMonthDom(2));
}
isMonthOutOfRange(month) {
const _m = new Date(month.valueOf());
// Return true for months before the startDate and months after the endDate
if (this.startDate && new Date(_m.getFullYear(), _m.getMonth() + 1, 0, 23, 59, 59) < this.startDate || this.endDate && new Date(_m.getFullYear(), _m.getMonth(), 1) > this.endDate) {
return true;
}
return false;
}
// Disable next/prev buttons according to the value of the prev/next
// month. We don't want two same months at the same time!
disableNextPrevButtons() {
if (this.isSingleMonth()) {
return;
}
const month1 = parseInt(this.getDateString(this.month1, "YYYYMM"), 10);
const month2 = parseInt(this.getDateString(this.month2, "YYYYMM"), 10);
const d = Math.abs(month1 - month2);
const nextButtons = this.datepicker.getElementsByClassName(this.className + "__month-button--next");
const prevButtons = this.datepicker.getElementsByClassName(this.className + "__month-button--prev");
if (d > 1 && d !== 89) {
this.removeClass(nextButtons[0], this.className + "__month-button--disabled");
nextButtons[0].setAttribute("aria-disabled", "false");
this.removeClass(prevButtons[1], this.className + "__month-button--disabled");
prevButtons[1].setAttribute("aria-disabled", "false");
} else {
this.addClass(nextButtons[0], this.className + "__month-button--disabled");
nextButtons[0].setAttribute("aria-disabled", "true");
this.addClass(prevButtons[1], this.className + "__month-button--disabled");
prevButtons[1].setAttribute("aria-disabled", "true");
}
if (this.isMonthOutOfRange(this.getPrevMonth(this.month1))) {
this.addClass(prevButtons[0], this.className + "__month-button--disabled");
prevButtons[0].setAttribute("aria-disabled", "true");
} else {
this.removeClass(prevButtons[0], this.className + "__month-button--disabled");
prevButtons[0].setAttribute("aria-disabled", "false");
}
if (this.isMonthOutOfRange(this.getNextMonth(this.month2))) {
this.addClass(nextButtons[1], this.className + "__month-button--disabled");
nextButtons[1].setAttribute("aria-disabled", "true");
} else {
this.removeClass(nextButtons[1], this.className + "__month-button--disabled");
nextButtons[1].setAttribute("aria-disabled", "false");
}
}
topBarDefaultText() {
// Return early if the top bar is disabled
if (!this.showTopbar) {
return;
}
// Show help message on top bar
let topBarText = "";
if (this.minDays && this.maxDays) {
if (this.minDays === this.maxDays) {
topBarText = this.lang("info-range-equal");
} else {
topBarText = this.lang("info-range");
}
} else if (this.minDays && this.minDays > 2) {
topBarText = this.lang("info-more-plural");
} else if (this.minDays) {
topBarText = this.lang("info-more");
} else {
topBarText = this.lang("info-default");
}
const bar = this.datepicker.getElementsByClassName(this.className + "__info--feedback")[0];
topBarText = topBarText.replace(/%d/, this.minDays - 1).replace(/%d/, this.maxDays - 1);
this.addClass(bar, this.className + "__info--help");
this.removeClass(bar, this.className + "__info--error");
bar.textContent = topBarText;
}
topBarErrorText(bar, errorText, errorValue) {
if (!this.showTopbar) {
return;
}
// Show error message on top bar
this.addClass(bar, this.className + "__info--error");
this.removeClass(bar, this.className + "__info--help");
if (errorValue > 1) {
errorText = this.lang(errorText + "-plural");
errorText = errorText.replace("%d", errorValue);
bar.textContent = errorText;
} else {
errorText = this.lang(errorText);
}
// And hide the selected info
const selectedInfo = this.datepicker.getElementsByClassName(this.className + "__info--selected")[0];
selectedInfo.style.display = "none";
}
updateSelectableRange() {
const days = this.datepicker.getElementsByTagName("td");
const isSelecting = this.start && !this.end;
// Add needed classes
for (let i = 0; i < days.length; i++) {
if (this.hasClass(days[i], this.className + "__month-day--invalid") && this.hasClass(days[i], this.className + "__month-day--tmp")) {
this.removeClass(days[i], this.className + "__month-day--tmp");
if (this.hasClass(days[i], this.className + "__month-day--tmpinvalid")) {
this.removeClass(days[i], this.className + "__month-day--tmpinvalid");
} else {
this.removeClass(days[i], this.className + "__month-day--invalid");
this.addClass(days[i], this.className + "__month-day--valid");
}
}
// Update day classes during the date range selection
if (isSelecting) {
if (this.hasClass(days[i], this.className + "__month-day--visibleMonth") && (this.hasClass(days[i], this.className + "__month-day--valid") || this.hasClass(days[i], this.className + "__month-day--disabled") || this.hasClass(days[i], this.className + "__month-day--before-disabled-date"))) {
const time = parseInt(days[i].getAttribute("time"), 10);
if (this.isValidDate(time)) {
this.addClass(days[i], this.className + "__month-day--valid");
this.addClass(days[i], this.className + "__month-day--tmp");
this.removeClass(days[i], this.className + "__month-day--invalid");
this.removeClass(days[i], this.className + "__month-day--disabled");
} else {
if (this.hasClass(days[i], this.className + "__month-day--invalid")) {
this.addClass(days[i], this.className + "__month-day--tmpinvalid");
}
this.addClass(days[i], this.className + "__month-day--invalid");
this.addClass(days[i], this.className + "__month-day--tmp");
this.removeClass(days[i], this.className + "__month-day--valid");
}
}
// Set aria attributes
this.setDayAriaAttributes();
} else if (this.hasClass(days[i], this.className + "__month-day--checkout-enabled") || this.hasClass(days[i], this.className + "__month-day--before-disabled-date")) {
// At the end of the selection, restore the disabled/invalid class for
// days where the checkout is enabled. We need to check this when the
// autoclose option is false. The same for the day just before the
// disabled date
this.addClass(days[i], this.className + "__month-day--invalid");
this.removeClass(days[i], this.className + "__month-day--valid");
if (!this.hasClass(days[i], this.className + "__month-day--before-disabled-date")) {
this.addClass(days[i], this.className + "__month-day--disabled");
}
}
}
return true;
}
dayHovering(day) {
const hoverTime = parseInt(day.getAttribute("time"), 10);
let tooltip = "";
if (!this.hasClass(day, this.className + "__month-day--invalid")) {
// Get every td in the months table: our days
const days = this.datepicker.getElementsByTagName("td");
// Iterate each day and add the hovering class
for (let i = 0; i < days.length; i++) {
const time = parseInt(days[i].getAttribute("time"), 10);
if (time === hoverTime) {
this.addClass(days[i], this.className + "__month-day--hovering");
} else {
this.removeClass(days[i], this.className + "__month-day--hovering");
}
if (this.start && !this.end && (this.start < time && hoverTime >= time || this.start > time && hoverTime <= time)) {
this.addClass(days[i], this.className + "__month-day--hovering");
} else {
this.removeClass(days[i], this.className + "__month-day--hovering");
}
}
// Generate date range tooltip
if (this.start && !this.end) {
const nights = this.countDays(hoverTime, this.start) - 1;
if (this.hoveringTooltip) {
if (typeof this.hoveringTooltip === "function") {
tooltip = this.hoveringTooltip(nights, this.start, hoverTime);
} else if (this.hoveringTooltip === true && nights > 0) {
const label = nights === 1 ? this.lang("night") : this.lang("nights");
tooltip = nights + " " + label;
}
}
}
}
// Show tooltip on hovering and set its position
if (tooltip) {
const dayBounding = day.getBoundingClientRect();
const datepickerBounding = this.datepicker.getBoundingClientRect();
let _left = dayBounding.left - datepickerBounding.left;
let _top = dayBounding.top - datepickerBounding.top;
_left += dayBounding.width / 2;
const tooltipContainer = document.getElementById(this.getTooltipId());
tooltipContainer.style.display = "";
tooltipContainer.textContent = tooltip;
const w = tooltipContainer.getBoundingClientRect().width;
const h = tooltipContainer.getBoundingClientRect().height;
_left -= w / 2;
_top -= h;
setTimeout(() => {
tooltipContainer.style.left = _left + "px";
tooltipContainer.style.top = _top + "px";
}, 10);
} else {
const tooltipContainer = document.getElementById(this.getTooltipId());
tooltipContainer.style.display = "none";
}
}
clearHovering() {
// Remove hovering class from every day
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
this.removeClass(days[i], this.className + "__month-day--hovering");
}
// Hide the tooltip
const tooltipContainer = document.getElementById(this.getTooltipId());
tooltipContainer.style.display = "none";
}
clearSelection() {
// Reset start and end dates
this.start = false;
this.end = false;
// Remove selected classes
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
this.removeClass(days[i], this.className + "__month-day--selected");
this.removeClass(days[i], this.className + "__month-day--first-day-selected");
this.removeClass(days[i], this.className + "__month-day--last-day-selected");
this.removeClass(days[i], this.className + "__month-day--hovering");
}
// Reset input
this.setValue("");
// Check the selection
this.checkSelection();
// Show selected dates in top bar
this.showSelectedInfo();
// Show selected days in the calendar
this.showSelectedDays();
}
clearDatepicker() {
// Reset start and end dates
this.start = false;
this.end = false;
// Remove selected classes
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
this.removeClass(days[i], this.className + "__month-day--selected");
this.removeClass(days[i], this.className + "__month-day--first-day-selected");
this.removeClass(days[i], this.className + "__month-day--last-day-selected");
this.removeClass(days[i], this.className + "__month-day--hovering");
}
// Reset input
this.setValue("");
// Show default text in top bar
this.topBarDefaultText();
// Check the selection
this.checkSelection();
// Show selected dates in top bar
this.showSelectedInfo();
// Hide the selected info
const selectedInfo = this.datepicker.getElementsByClassName(this.className + "__info--selected")[0];
selectedInfo.style.display = "none";
// Show selected days in the calendar
this.showSelectedDays();
// Check day dates
this.updateSelectableRange();
// Create event on clear
const evt = document.createEvent("Event");
evt.initEvent("afterClear", true, true);
this.input.dispatchEvent(evt);
}
parseDisabledDates() {
// Sort disabled dates and store it in property
const _tmp = [];
this.setFechaI18n();
for (let i = 0; i < this.disabledDates.length; i++) {
_tmp[i] = fecha__namespace.parse(this.disabledDates[i], "YYYY-MM-DD");
}
_tmp.sort((a, b) => {
return a - b;
});
this.disabledDatesTime = _tmp;
}
getClosestDisabledDates(x) {
// This method implements part of the work done by the user Zeta
// http://stackoverflow.com/a/11795472
// Return an array with two elements:
// - The closest date on the left
// - The closest date on the right
let dates = [false, false];
// If the day is before the first disabled date return early
if (x < this.disabledDatesTime[0]) {
// Add one day if we want include the checkout
if (this.enableCheckout) {
dates = [false, this.addDays(this.disabledDatesTime[0], 1)];
// Otherwise use the first date of the array
} else {
dates = [false, this.disabledDatesTime[0]];
}
// If the day is after the last disabled date return early
} else if (x > this.disabledDatesTime[this.disabledDatesTime.length - 1]) {
dates = [this.disabledDatesTime[this.disabledDatesTime.length - 1], false];
// Otherwise calculate the closest dates
} else {
let bestPrevDate = this.disabledDatesTime.length;
let bestNextDate = this.disabledDatesTime.length;
const maxDateValue = Math.abs(new Date(0, 0, 0).valueOf());
let bestPrevDiff = maxDateValue;
let bestNextDiff = -maxDateValue;
let currDiff = 0;
let i;
for (i = 0; i < this.disabledDatesTime.length; ++i) {
currDiff = x - this.disabledDatesTime[i];
if (currDiff < 0 && currDiff > bestNextDiff) {
bestNextDate = i;
bestNextDiff = currDiff;
}
if (currDiff > 0 && currDiff < bestPrevDiff) {
bestPrevDate = i;
bestPrevDiff = currDiff;
}
}
if (this.disabledDatesTime[bestPrevDate]) {
dates[0] = this.disabledDatesTime[bestPrevDate];
}
if (typeof this.disabledDatesTime[bestPrevDate] === "undefined") {
dates[1] = false;
// Add one day if we want include the checkout
} else if (this.enableCheckout) {
dates[1] = this.addDays(this.disabledDatesTime[bestNextDate], 1);
// Otherwise use the date of the array
} else {
dates[1] = this.disabledDatesTime[bestNextDate];
}
}
return dates;
}
getDisabledDays() {
const allDays = [];
const disabledDays = [];
const day = new Date();
for (let i = 0; i < 7; i++) {
const _date = this.addDays(day, i);
allDays[fecha__namespace.format(_date, "d")] = fecha__namespace.format(_date, "dddd");
}
for (let i = 0; i < this.disabledDaysOfWeek.length; i++) {
disabledDays.push(allDays.indexOf(this.disabledDaysOfWeek[i]));
}
disabledDays.sort();
this.disabledDaysIndexes = disabledDays;
}
getClosestDisabledDays(day) {
// Return an array with two elements:
// - The closest date on the left
// - The closest date on the right
const dates = [false, false];
for (let i = 0; i < 7; i++) {
const _date = this.substractDays(day, i);
if (this.disabledDaysIndexes.indexOf(parseInt(fecha__namespace.format(_date, "d"), 10)) > -1) {
dates[0] = _date;
break;
}
}
for (let i = 0; i < 7; i++) {
const _date = this.addDays(day, i);
if (this.disabledDaysIndexes.indexOf(parseInt(fecha__namespace.format(_date, "d"), 10)) > -1) {
dates[1] = _date;
break;
}
}
return dates;
}
lang(s) {
// Return i18n string
return s in this.i18n ? this.i18n[s] : "";
}
emptyElement(element) {
// Remove all child elements of a DOM node
while (element.firstChild) {
element.removeChild(element.firstChild);
}
}
// Helper regex for DOM classes
classRegex(c) {
return new RegExp("(^|\\s+)" + c + "(\\s+|$)");
}
// Check if an element has a class
hasClass(el, c) {
return this.classRegex(c).test(el.className);
}
// Add a class to the element
addClass(el, c) {
if (!this.hasClass(el, c)) {
el.className = el.className + " " + c;
}
}
// Remove class from element
removeClass(el, c) {
el.className = el.className.replace(this.classRegex(c), " ");
}
isVisible(element) {
// Check if a DOM element is visible
return element.offsetWidth || element.offsetHeight || element.getClientRects().length;
}
slideDown(element, speed) {
// Slide down an element
element.style.display = "";
const h = element.getBoundingClientRect().height;
element.style.height = 0;
this.recalc(element.offsetHeight);
element.style.transition = "height " + speed;
element.style.height = h + "px";
element.addEventListener("transitionend", () => {
element.style.height = element.style.transition = element.style.display = "";
});
}
slideUp(element, speed) {
// Slide up an element
const h = element.getBoundingClientRect().height;
element.style.height = h + "px";
this.recalc(element.offsetHeight);
element.style.transition = "height " + speed;
element.style.height = 0;
element.addEventListener("transitionend", () => {
element.style.display = "none";
});
}
recalc(element) {
// Force browser recalculation
return element.offsetHeight;
}
isTouchDevice() {
// This *does not* necessarily reflect a touchscreen device!!!
// http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
return "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch;
}
setDayAriaAttributes() {
const days = this.datepicker.getElementsByTagName("td");
for (let i = 0; i < days.length; i++) {
const classes = days[i].className;
const time = parseInt(days[i].getAttribute("time"), 10);
let ariaDisabled = "false";
let ariaLabel = "";
if (classes.includes(this.className + "__month-day--invalid")) {
ariaLabel = this.replacei18n(this.i18n["aria-disabled"], fecha__namespace.format(time, this.ariaDayFormat));
ariaDisabled = "true";
} else if (classes.includes(this.className + "__month-day--first-day-selected")) {
ariaLabel = this.replacei18n(this.i18n["aria-selected-checkin"], fecha__namespace.format(time, this.ariaDayFormat));
} else if (classes.includes(this.className + "__month-day--last-day-selected")) {
ariaLabel = this.replacei18n(this.i18n["aria-selected-checkout"], fecha__namespace.format(time, this.ariaDayFormat));
} else if (classes.includes(this.className + "__month-day--selected")) {
ariaLabel = this.replacei18n(this.i18n["aria-selected"], fecha__namespace.format(time, this.ariaDayFormat));
} else if (this.start && !this.end) {
ariaLabel = this.replacei18n(this.i18n["aria-choose-checkout"], fecha__namespace.format(time, this.ariaDayFormat));
} else {
ariaLabel = this.replacei18n(this.i18n["aria-choose-checkin"], fecha__namespace.format(time, this.ariaDayFormat));
}
if (ariaLabel) {
days[i].setAttribute("aria-label", ariaLabel);
}
days[i].setAttribute("aria-disabled", ariaDisabled);
}
}
replacei18n(string, value) {
return string.replace("%s", value);
}
checkOnFocus(event) {
if (event.target && this.input === event.target || this.datepicker.contains(event.target)) {
this.isOnFocus = true;
} else {
this.isOnFocus = false;
if (this.isOpen) {
this.closeDatepicker();
}
}
}
doKeyDown(event) {
switch (event.keyCode) {
case 39:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("next");
}
break;
case 37:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("prev");
}
break;
case 40:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("down");
}
break;
case 38:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("up");
}
break;
case 36:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("first");
}
break;
case 35:
if (this.isOnFocus) {
event.preventDefault();
this.setActiveDay("last");
}
break;
case 27:
if (this.isOnFocus && this.input.offsetParent !== null) {
this.setFocusToInput();
}
break;
case 34:
if (this.isOnFocus) {
event.preventDefault();
this.moveMonthFromKeyboard("next");
}
break;
case 33:
if (this.isOnFocus) {
event.preventDefault();
this.moveMonthFromKeyboard("prev");
}
break;
case 13:
if (this.isOnFocus) {
event.preventDefault();
this.handleReturn();
}
break;
}
}
setActiveDay($direction) {
const activeEl = document.activeElement;
if (activeEl && this.hasClass(activeEl, this.className + "__month-day--visibleMonth") && this.datepicker.contains(activeEl)) {
const currentIndex = parseInt(activeEl.getAttribute("index"), 10);
const currentWeekdayIndex = parseInt(activeEl.getAttribute("d"), 10);
let nextIndex = -1;
switch ($direction) {
case "next":
nextIndex = currentIndex + 1;
break;
case "prev":
nextIndex = currentIndex - 1;
break;
case "up":
nextIndex = currentIndex - 7;
break;
case "down":
nextIndex = currentIndex + 7;
break;
case "first":
if (currentWeekdayIndex === 1) {
return false;
}
nextIndex = currentIndex - (currentWeekdayIndex - 1);
break;
case "last":
if (currentWeekdayIndex === 7) {
return false;
}
nextIndex = currentIndex + (7 - currentWeekdayIndex);
break;
}
const nextDay = this.datepicker.querySelectorAll('[index="' + nextIndex + '"]');
if (nextDay.length > 0 && nextIndex > 0) {
this.setDayFocus(nextDay[0]);
} else if (nextIndex > 0) {
let nextDay = "";
const gone = this.goToNextMonth(2, true);
if (gone) {
const month = this.datepicker.getElementsByClassName(this.className + "__month--month2");
if (month.length > 0) {
if ($direction === "down") {
nextDay = month[0].querySelectorAll("." + this.className + '__month-day--visibleMonth[d="' + currentWeekdayIndex + '"]');
} else if ($direction === "last") {
const nextWeekdayIndex = currentWeekdayIndex + (7 - currentWeekdayIndex);
nextDay = month[0].querySelectorAll("." + this.className + '__month-day--visibleMonth[d="' + nextWeekdayIndex + '"]');
} else {
nextDay = month[0].querySelectorAll("." + this.className + "__month-day--visibleMonth");
}
if (nextDay.length > 0) {
this.setDayFocus(nextDay[0]);
}
}
}
} else if (nextIndex <= 0) {
let prevDay = "";
const gone = this.goToPreviousMonth(1, true);
if (gone) {
const month = this.datepicker.getElementsByClassName(this.className + "__month--month1");
if (month.length > 0) {
if ($direction === "up") {
prevDay = month[0].querySelectorAll("." + this.className + '__month-day--visibleMonth[d="' + currentWeekdayIndex + '"]');
} else if ($direction === "first") {
const prevWeekdayIndex = currentWeekdayIndex - (currentWeekdayIndex - 1);
prevDay = month[0].querySelectorAll("." + this.className + '__month-day--visibleMonth[d="' + prevWeekdayIndex + '"]');
} else {
prevDay = month[0].querySelectorAll("." + this.className + "__month-day--visibleMonth");
}
if (prevDay.length > 0) {
this.setDayFocus(prevDay[prevDay.length - 1]);
}
}
}
}
} else {
this.setInitialActiveDay();
}
}
setInitialActiveDay() {
// Check if today is visible
const today = this.datepicker.getElementsByClassName(this.className + "__month-day--today");
if (today.length > 0) {
this.setDayFocus(today[0]);
return today[0];
}
// Check if check-in is visible
const checkin = this.datepicker.getElementsByClassName(this.className + "__month-day--first-day-selected");
if (checkin.length > 0) {
this.setDayFocus(checkin[0]);
return checkin[0];
}
// Get first visible day
const visibleDay = this.datepicker.getElementsByClassName(this.className + "__month-day--visibleMonth");
if (visibleDay.length > 0) {
this.setDayFocus(visibleDay[0]);
return visibleDay[0];
}
}
setDayFocus(day) {
const days = this.datepicker.getElementsByTagName("td");
this.removeDaysTabIndex(days);
day.setAttribute("tabindex", "0");
day.focus();
if (this.start && !this.end) {
this.dayHovering(day);
}
}
removeDaysTabIndex(days) {
for (let i = 0; i < days.length; i++) {
days[i].removeAttribute("tabindex");
}
}
setDayIndexes() {
const days = this.datepicker.getElementsByTagName("td");
this.dayIndex = 1;
for (let i = 0; i < days.length; i++) {
if (this.hasClass(days[i], this.className + "__month-day--visibleMonth")) {
days[i].setAttribute("index", this.dayIndex);
this.dayIndex++;
} else {
days[i].setAttribute("index", 0);
}
}
}
setFocusToInput() {
this.input.focus();
this.closeDatepicker();
this.clearHovering();
this.justEsc = true;
this.isOnFocus = false;
}
moveMonthFromKeyboard($direction) {
if ($direction === "prev") {
this.goToPreviousMonth(1, true);
} else {
this.goToNextMonth(2, true);
}
}
handleReturn() {
const activeEl = document.activeElement;
if (activeEl && this.datepicker.contains(activeEl) && (this.hasClass(activeEl, this.className + "__month-day--visibleMonth") || this.hasClass(activeEl, this.className + "__month-button") || this.hasClass(activeEl, this.className + "__close-button") || this.hasClass(activeEl, this.className + "__clear-button") || this.hasClass(activeEl, this.className + "__submit-button"))) {
activeEl.click();
}
}
// ------------------ //
//   PUBLIC METHODS   //
// ------------------ //
open() {
this.openDatepicker();
}
close() {
this.closeDatepicker();
}
getDatePicker() {
return this.datepicker;
}
setRange(d1, d2) {
if (typeof d1 === "string" && typeof d2 === "string") {
d1 = this.parseDate(d1);
d2 = this.parseDate(d2);
} else {
d1 = new Date(d1.getTime());
d2 = new Date(d2.getTime());
}
this.setDateRange(d1, d2);
}
clear() {
this.clearSelection();
}
getNights() {
let count = 0;
if (this.start && this.end) {
count = this.countDays(this.end, this.start) - 1;
} else {
const value = this.getValue();
const dates = value ? value.split(this.separator) : "";
if (dates && dates.length >= 2) {
const _format = this.format;
count = this.countDays(this.parseDate(dates[0], _format), this.parseDate(dates[1], _format)) - 1;
}
}
return count;
}
destroy() {
if (document.getElementById(this.getDatepickerId())) {
this.removeAllBoundedListeners(this.input, "click");
this.removeAllBoundedListeners(document, "click");
this.removeAllBoundedListeners(this.input, "change");
this.datepicker.parentNode.removeChild(this.datepicker);
}
}
}
HotelDatepicker.prototype.getUnformatetValue = function getUnformatetValue() {
return [this.getDateString(new Date(this.start), this.formatCallback), this.getDateString(new Date(this.end), this.formatCallback)];
};
return HotelDatepicker;
})(fecha);
/* main template javascript */
/* global settings */
/* enviroment */
let enviroment = 'auto'; // 'dev', 'live', 'auto'
let errorMode = 'silent';
/* template */
let path = '/fileadmin/template/';
const breakpoints = ['xs', 'sm',  'md', 'lg', 'xl', 'xxl'];
let breakpoint = 'xxl';
let lastScrollPosition = 0;
let scrollOffset = 50;
let headerHeight = 0;
let windowWidth = 0;
let windowHeight = 0;
/* END global settings */
/* route planner */
if(typeof routePlannerUrl === 'undefined') {
routePlannerUrl = null;
}
/* END project settings */
/* language settings */
/* mapping */
const languages = {
de: 'deu',
it: 'ita',
en: 'eng'
};
/* mapping typo3 */
const languagesTypo3 = {
de: '0',
it:	'2',
en: '1'
};
/* END mapping */
/* detect language */
if (!lang) {
let la = window.document.location.href.split('/');la = la[la.length-2];
let lang = languages[la];
} else if (!la) {
for (let i in languages) 	{
if (languages[i] === lang) {
let la = i;
}
}
}
/* strings */
const strings = {
show: {
deu: 'anzeigen',
eng: 'show',
ita: 'mostra',
},
hide: {
deu: 'ausblenden',
eng: 'hide',
ita: 'nascondere',
},
readmore: {
deu: 'weiterlesen',
eng: 'read more',
ita: 'leggi tutto',
},
readless: {
deu: 'weniger lesen',
eng: 'read less',
ita: 'leggi di meno',
},
routeplanner: {
deu: 'Zum Routenplaner',
eng: 'To the route planner',
ita: 'Al pianificatore di percorso',
},
tabchange: {
deu: '🧡 Wir vermissen dich!',
eng: '🧡 We miss you!',
ita: '🧡 Ci manchi!',
},
}
/* END strings */
/* END language settings */
/* global script */
/* block iframe */
if (top != self && top.location.host != self.location.host) {
top.location = self.location;
}
if (enviroment === 'auto') {
enviroment = detectEnviroment();
}
/* consent tool */
let consentTool = 'auto'; // 'gnConsent', 'auto', 'custom'
let consentToolActive = false; // true, false, 'auto'
if (typeof gnConsent !== 'undefined' && consentTool === 'auto') {
consentTool = 'gnConsent';
consentToolActive = true;
}
/* popover options */
const customPopoverOptions = {
virtualTour: {
html: true,
template: '<div class="popover" role="tooltip"><div class="virtual-tour-popover"><div class="arrow"></div><span class="icon-virtual-tour"></span><div class="popover-body"></div><span class="close"><span class="icon-cross"></span></span></div></div>',
trigger: 'focus',
placement: 'top',
fallbackPlacement: ['top'],
},
};
/* map options */
const mapOptions = {
osm: {
default: {
scrollWheelZoom: false,
scrollWheelZoomOnFocus: true,
zoomControl: true,
zoom: 19,
},
},
}
/* pricelist config */
const pricelistitems = {
xxl: 4,
xl: 4,
lg: 3,
md: 2,
sm: 1,
xs: 1,
};
/* END global script */
/* init function (will be called at the end of document) */
/* init settings */
let youtubeApiLoaded = false;
let vimeoApiLoaded = false;
//let videoOffset = 350; // for hide "related videos" bar and the title
/* END init settings */
function init() {
if (enviroment === 'dev') {
console.log('init');
}
/* general */
/* detect breakpoint */
detectBreakpoint();
/* add IE case class to body (for more support) */
isIE();
/* development box
* @todo: maybe move to console log instead of html?
*/
if(enviroment === 'dev' || document.location.href.indexOf('debug') !== -1) {
if(window.location.href.split('localhost').length === 2 || window.location.href.split('M:').length === 2) {
path = '';
$('<div id="debug"></div>').appendTo($('body'));
}
} else if(window.location.host.substr(0, 3) === 'dev') {
errorMode = 'visible';
$('<div id="debug" style="display:none;"></div>').appendTo($('body'));
}
/* END development box */
/* END general */
/* layout */
/* get window height */
windowHeight = $(window).height();
/* get header height */
if ($('#header').length > 0) {
headerHeight = $('#header').outerHeight();
}
/* menu */
/* fullscreen menu */
/* toggle menu over other menu with tabs (used for muse.holiday or hotel touring) */
/*
let formerActiveMenu = '';
let clickItems = $('.headermenu .mainnav a');
if ($(clickItems).length > 0) {
$(clickItems).click(function (e) {
e.preventDefault();
let uid = parseInt($(this).closest('[data-uid]').attr('data-uid'));
if (uid > 0 && $('.tab-item[data-tab="menu' + uid + '"]').length) {
let tab = 'menu' + uid;
if($('body').hasClass('menuopen') === true) {
/*
if (formerActiveMenu == '') {
formerActiveMenu = $(this).closest('ul').find('li.active');
}
* /
if (!$('.tab-item[data-tab="menu' + uid + '"]').hasClass('active-tab')) {
$(this).closest('ul').find('li').removeClass('active');
$(this).closest('li').addClass('active');
return false;
} else if (formerActiveMenu != '') {
closeMenu();
$(this).closest('ul').find('li').removeClass('active');
/*
let formerActiveTab =  $('.tab-item[data-tab="menu' + $(formerActiveMenu).attr('data-pid') + '"]');
$(formerActiveTab).closest('.tabs-wrapper').find('.tab-item').removeClass('active-tab');
$(formerActiveTab).addClass('active-tab');
* /
$(formerActiveMenu).addClass('active');
}
} else {
openMenu();
formerActiveMenu = $(this).closest('ul').find('li.active');
$(this).closest('ul').find('li').removeClass('active');
$(this).closest('li').addClass('active');
}
} else if ($(this).attr('href').length > 0) {
window.location = $(this).attr('href');
}
});
}
*/
/* END toggle menu over other menu with tabs */
/* toggle menu over menu toggle  */
$('.fullscreenmenu-toggle').click(function() {
if($('body').hasClass('menuopen') === true) {
closeMenu();
} else {
openMenu();
}
return false;
});
/* END toggle menu over menu toggle  */
/* close nav on escape (desktop only) */
$(document).keyup(function(e) {
if(e.key === "Escape") { // escape key maps to keycode `27`
closeMenu();
if (typeof formerActiveMenu !== 'undefined' && formerActiveMenu.length) {
$('.mainnav').find('li').removeClass('active');
$(formerActiveMenu).addClass('active');
}
}
});
/* END close nav on escape */
/* close navigation outside click */
$(document).mouseup(function(e) {
let container = $("#headertop,#fullscreenmenu");
if (!container.is(e.target) && container.has(e.target).length === 0) {
if($('body').hasClass('menuopen') === true) {
closeMenu();
}
}
});
/* END close navigation outside click */
/* toggle submenu */
/*
$('#fullscreenmenu .mainnav ul li').each(function() {
if($(this).find('> ul').length > 0) {
$(this).find('> a').append('<span class="submenutoggle icon-arrow-down"></span>');
//$('<span class="submenutoggle icon-arrow-down"></span>').insertBefore($(this).find('> ul'));
}
});
*/
/* END toggle submenu */
/* END fullscreen menu */
/* END menu */
/* navigation */
/* auto scroll (if anchor has hash to a existing content element) */
$('a[href*="#c"]').bind('click', function (e) {
let href = $(this).attr('href');
href = href.split('#c');
href = href[1];
if($('#ce' + href).length > 0) {
scrollToElement($('#ce' + href), 0);
} else {
return true;
}
});
/* END auto scroll */
/* main navigation */
/* navigation & image/letter hover (hotel engel angelo) */
/*
let timeout;
if(!$('.mainnav nav > ul').find('> li.hover').length && !$('.mainnav nav > ul').find('> li.active').length) {
let firstListItem = $('.mainnav nav li').first();
let firstUid = $(firstListItem).attr('data-uid');
if ($(firstListItem).find('> ul').length) {
$(firstListItem).addClass('hover');
}
if ($('.mainnavimages').length) {
$('.mainnavimages').find('li[data-uid="' + firstUid + '"]').addClass('active');
}
}
$('.mainnav nav > ul > li > a').click(function(event) {
if (!$(this).closest('li').find('> ul').length) {
return;
}
event.preventDefault();
let speed = 0;
if($('.mainnav nav > ul > li.hover > a').length > 0 && $('.mainnav nav > ul > li.hover > a').get(0) === event.target) {
return false;
}
clearTimeout(timeout);
if($('.mainnav nav > ul > li.hover').length) {
$('.mainnav nav > ul > li.hover > ul').removeClass('showonmobile');
speed = 500;
if ($('.mainnav nav > ul > li.hover ul').length <= 0) {
speed = 0;
}
$('.mainnav nav > ul > li.hover').removeClass('hover');
}
let elem = this;
if ($(elem).closest('li').find('ul').length > 0) {
calculateMenuPosition(elem);
} else {
speed = 0;
}
timeout = setTimeout(function() {
$(elem).parent().addClass('hover');
}, speed);
return false;
});
if($('.mainnav nav > ul > li.hover > a').length > 0) {
calculateMenuPosition($('.mainnav nav > ul > li.hover > a'));
}
$('.mainnav nav > ul > li > a').on('mouseenter', function () {
let parent = $(this).closest('li');
let uid = $(parent).attr('data-uid');
if ($('.mainnavimages').length) {
$('.mainnavimages').find('ul').addClass('hover').find('li[data-uid="' + uid + '"]').addClass('hover');
}
}).on('mouseleave', function () {
if ($('.mainnavimages').length) {
$('.mainnavimages').find('.hover').removeClass('hover');
}
});
*/
/* END navigation & image/letter hover */
/* END main navigation */
/* default navigation */
/* open/close default nav and subpages */
/*
$('.headermenu .mainnav ul li').each(function() {
if($(this).find('> ul').length > 0) {
$(this).append('<span class="submenutoggle icon-arrow-down"></span>')
}
});
$('.headermenu .menutoggle').click(function() {
if($('.headermenu').attr('status') === 'open') {
$('.headermenu').attr('status', 'closed').find('.mainnav > ul').slideUp();
$('.headermenu .mainnav > ul li[status="open"]').each(function() {
$(this).attr('status', 'closed').find('> ul').slideUp();
});
} else {
$('.headermenu').attr('status', 'open').find('.mainnav > ul').slideDown();
}
});
$('.headermenu .submenutoggle, #fullscreenmenu .submenutoggle').click(function(event) {
event.preventDefault();
if($(this).closest('li').attr('status') === 'open') {
$(this).closest('li').attr('status', 'closed').find('> ul').slideUp();
$(this).closest('li').find('li[status="open"]').attr('status', 'closed').find('> ul').slideUp();
} else {
$(this).closest('ul').find('li[status="open"]').attr('status', 'closed').find('> ul').slideUp()
$(this).closest('li').attr('status', 'open').find('> ul').slideDown();
}
return false;
});
*/
/* END open/close default nav and subpages */
/* END default navigation */
/* anchor navigation */
/*
$('.anchornav a').click(function(event) {
if(typeof $(this).attr('href') !== 'undefined' && $($(this).attr('href')).length > 0) {
scrollToElement($($(this).attr('href')));
event.preventDefault();
return false;
}
});
*/
/* END anchor navigation */
/* END navigation */
/* responsive table */
/*
$('.table').each(function() {
let values = [];
$(this).find('tr').first().find('th, td').each(function() {
values[values.length] = $(this).text();
});
$(this).find('tr:not(:first-child)').each(function() {
$(this).find('th, td').each(function(i, v) {
if(values[i] !== '') {
let separator = ':';
if(values[i] === '') {
separator = '';
}
// $(this).prepend('<strong class="responsivecell d-inline-block d-md-none">' + values[i] + separator + '</strong> ');
$(this).html('<strong class="responsivecell d-inline-block d-md-none">' + values[i] + separator + '</strong> <span class="responsivevalue">'+$(this).html()+'</span>');
}
});
});
});
*/
/* END responsive table */
/* END layout */
/* content */
/* forms */
/* custom checkbox */
$('.customcheckbox input[type="checkbox"], .customcheckboxgroup input[type="checkbox"]').change(function() {
if($(this).prop('checked') === true) {
$(this).parent().addClass('checked');
} else {
$(this).parent().removeClass('checked');
}
if(typeof $(this).attr('data-passto') !== 'undefined' && $('input[name="'+ $(this).attr('data-passto')+'"]').length > 0) {
if($(this).prop('checked') === true) {
$('input[name="'+ $(this).attr('data-passto')+'"]').val('1');
} else {
$('input[name="'+ $(this).attr('data-passto')+'"]').val('');
}
}
customCheckboxCallback(this);
});
$('.customcheckbox input[type="checkbox"]').trigger('change');
/* custom checkbox group */
$('.customcheckboxgroup input[type="checkbox"]').each(function () {
initCheckbox($(this));
});
/* END custom checkbox group */
/* END custom checkbox */
/* END forms */
/* END content */
/* gerneral (after) */
/* call scroll function */
scroll();
/* END gerneral */
}
/* END init function */
/* load function (will be called when the document is ready) */
/* load settings */
/* END load settings */
let bLazy;
function load(box) {
if (enviroment === 'dev') {
console.log('load');
}
/* general */
/* detect breakpoint */
detectBreakpoint();
/* lazyload (blazy) */
if(typeof(Blazy) != 'undefined') {
const breakpoints = [
{
width: 420, // max-width
src: 'data-src-xs',
ratio: 'data-ratio-xs'
},
{
width: 640, // max-width
src: 'data-src-sm',
ratio: 'data-ratio-sm'
},
{
width: 1080, // max-width
src: 'data-src-md',
ratio: 'data-ratio-md'
},
{
width: 1440, // max-width
src: 'data-src-lg',
ratio: 'data-ratio-lg'
}
];
$('.b-lazy', box).each(function() {
let ratio = false;
let elem = this;
$.each(breakpoints, function(k, v) {
if(v.width >= screen.width && typeof $(elem).attr(v.ratio) !== 'undefined' && $(elem).attr(v.ratio).indexOf('x') !== -1) {
ratio = v.ratio;
}
});
if(ratio !== false) {
let imgRatio = $(this).attr(ratio);
imgRatio = imgRatio.split('x');
$(this).attr('src', "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 "+imgRatio[0]+" "+imgRatio[1]+"' width='"+imgRatio[0]+"' height='"+imgRatio[1]+"'></svg>");
}
});
bLazy = new Blazy({
// selector: 'img', // all images
breakpoints: breakpoints,
success: function(element){
setTimeout(function() {
$(element).removeClass('b-lazy').parent().removeClass('childLoading');
}, 200);
},
error: function(elem, msg) {
if(msg === 'missing') {
console.warn(elem, 'data-src is missing');
}
else if(msg === 'invalid') {
if($(elem).attr('data-src')) {
$(elem).removeAttr('data-src');
}
}
}
});
}
/* END lazyload */
/* END general */
/* layout */
/* init tooltip */
if (typeof tooltip !== 'undefined') {
$('[data-toggle="tooltip"]', box).tooltip();
}
/* init popover */
if (typeof popover != 'undefined') {
$('[data-toggle="popover"]', box).popover();
}
/* init custom popover */
/* 3d tour popup (used for muse.holiday) */
/*
customPopover($('.virtual-tour-popover', box), 'body', customPopoverOptions.virtualTour);
$('body', box).on('click', '.popover .close', function(event) {
$(this).closest('.popover').popover('hide');
});
*/
/* END init custom popover */
/* init tabs */
initTabs($('.tabs-container', box));
/* init custom collapse */
// @todo: is this still necessary (see https://getbootstrap.com/docs/5.3/components/collapse/)
//initCustomCollapse($('.custom-collapse', box));
/* init lightbox/fancybox */
if (typeof Fancybox !== 'undefined') {
let settings = {
//compact: true,
defaultType: "iframe"
};
Fancybox.bind("a[rel^=lightbox],a[data-fancybox],.fancybox,.lightbox", settings);
}
/* END init lightbox/fancybox */
/* init datepicker */
$('.traveldatespicker', box).each(function() {
let datePicker = new DatePicker();
datePicker.init(this);
});
/* headermedia */
if ($('#headermedia').length > 0) {
const elem = $('#headermedia', box);
const config = {
autoplay: {
delay: 4000,
disableOnInteraction: true,
},
loop: true,
}
let headermedia = new Slider(elem, config);
}
/* END headermedia */
/* END layout */
/* content */
/* form */
/* init dropdown plugin */
Dropdown.init(box, true);
/* range slider */
//initRangeSlider(box);
/* shortrequest */
ShortRequest.init(box);
/* END form */
/* articles
* insert here all article slider inits ect.
* */
/* init viewport animations */
$('.viewport').addClass('viewport-initialized');
/* articlestandard mediaslider */
if ($('.articlestandard .articlemedia', box).length > 0) {
const config = {
autoplay: false,
loop: true,
};
$('.articlestandard .articlemedia', box).each(function () {
let articlestandard = new Slider($(this), config);
});
}
/* articlegallery slider */
if ($('.articlegallery.slider .articlemedia', box).length > 0) {
let config = {
autoplay: false,
loop: true,
};
$('.articlegallery.slider', box).each(function () {
// add for ex. a other config for a variant
if ($(this).hasClass('variant')) {
config = {
autoplay: false,
// use desktop first when loop schould be enabled (because of swiper restriction for loop and amount of slides. get more infos in Slider function)
loop: true,
slidesPerView: 3,
spaceBetween: 40,
breakpoints: {
// when window is >= than value
1440: {
slidesPerView: 3,
spaceBetween: 40,
},
1080: {
slidesPerView: 2,
spaceBetween: 20,
},
// zero is neccesarry when desktop first is used
0: {
slidesPerView: 0,
spaceBetween: 0,
}
}
};
}
$(this).find('.articlemedia').each(function () {
let articlegallery = new Slider($(this), config);
});
});
}
/* example with two slider. one primary and another one for thumbs: https://www.capofalcone.com/
if ($('.articlehighlights', box).length > 0) {
$('.articlehighlights', box).each(function () {
const config = {
watchSlidesProgress: true,
slidesPerView: 2,
spaceBetween: 46,
breakpoints: {
1801: {
slidesPerView: 6,
spaceBetween: 40,
},
1601: {
slidesPerView: 6,
spaceBetween: 40,
},
1441: {
slidesPerView: 6,
spaceBetween: 30,
},
1081: {
slidesPerView: 5,
spaceBetween: 30,
},
641: {
slidesPerView: 4,
spaceBetween: 20,
},
421: {
slidesPerView: 3,
spaceBetween: 20,
},
}
};
let articlehighlights = new Slider($(this).find('.articlefooter'), config);
const mediaConfig = {
autoplay: false,
loop: true,
spaceBetween: 18,
navigation: {
nextEl: $(this).find('.articlecontent .swiper-button-next').first().get(0),
prevEl: $(this).find('.articlecontent .swiper-button-prev').first().get(0),
},
pagination: {
el: $(this).find('.articlecontent .swiper-pagination').get(0),
type: 'fraction',
formatFractionCurrent: function (number) {
return prependZero(number);
},
formatFractionTotal: function (number) {
return prependZero(number);
},
renderFraction: function (currentClass, totalClass) {
return '<div class="' + currentClass + '"></div>' +
'<div class="' + totalClass + '"></div>';
}
},
thumbs : {
swiper: articlehighlights.slider,
}
};
const mediaEvents = {
init: function (swiper) {
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
},
slideChange: function(swiper) {
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
*
// get selected slide
let selectedIndex = swiper.realIndex;
let selectedSlide = swiper.thumbs.swiper.slides[selectedIndex];
if (typeof $(selectedSlide).position().left !== 'undefined') {
let clickedSlideOffset = $(selectedSlide).position().left;
// wrapper
let wrapper = swiper.thumbs.swiper.wrapperEl;
$(wrapper).css({'--thumb-active-position': clickedSlideOffset});
}
},
};
let articlehighlightsmedia = new Slider($(this).find('.articlecontent'), mediaConfig, mediaEvents);
});
}
*/
/* articlegallery grid video */
if ($('.articlegallery.grid', box).find('.video').length > 0) {
$('.articlegallery.grid', box).find('.video').each(function () {
Video.init($(this));
});
}
/* accordion */
Accordion.init($('.articleaccordion, .accordioncontainer', box));
/* END accordion */
/* filter */
$('.filter').each(function () {
const config = {
container: $(this).closest('.article'),
}
let filter = new ElementFilter($(this), config);
});
/* END filter */
/* END articles */
/* pricelist (used for hotel engel angelo) */
/*
Pricelist.init($('.pricelist-scrollable'), box);
Pricelist.nextClick($('.pricelist-next'), box);
Pricelist.prevClick($('.pricelist-prev'), box);
Pricelist.onDateChange($('.dateselect'), box);
*/
/* END pricelist */
/* END content */
/* gerneral (after) */
/* call scroll function */
scroll();
/* call resize function */
resize(true, true);
/* auto scroll (if anchor has hash to a existing content element) */
if (window.location.hash.indexOf('#c') != -1) {
var href = window.location.href.split('#c');
if ($('#ce' + href[1]).length > 0) {
scrollToElement($('#ce' + href[1]));
} else if ($('#c' + href[1]).length > 0) {
scrollToElement($('#c' + href[1]));
} else {
return false;
}
}
/* END auto scroll */
/* END gerneral */
}
/* END load function */
/* scroll function */
function scroll(box) {
/* set position and direction variables */
let scrollPosition = $(window).scrollTop();
let scrollPositionBottom = scrollPosition + $(window).outerHeight();
let scrollDirection = 'down';
if(lastScrollPosition > scrollPosition) {
scrollDirection = 'up';
}
/* END set position and direction variables */
/* if is in viewport */
let previousElement = 'undefined';
let delay = 5000;
$('.viewport:not(.is-in-viewport)').each(function () {
let itemOffset = $(this).offset().top - ($(window).outerHeight() / 3);
let itemOffsetBottom = $(this).offset().top + $(this).outerHeight();
if (scrollPositionBottom >= itemOffset && scrollPosition < itemOffsetBottom) {
// @todo: add delay with attr or css class for same childs on same height
$(this).addClass('is-in-viewport');
setTimeout(function () {
bLazy.revalidate();
}, 500);
}
});
/* END if is in viewport */
/* add scroll classes */
/* body */
if (scrollPosition > 0 || ($('body').hasClass('noheader') && scrollPosition > 100 && !$('body').hasClass('scroll'))) {
$('body').addClass('scroll');
} else /* if (($('body').hasClass('noheader') && scrollPosition < 100) && $('body').hasClass('scroll'))*/ {
$('body').removeClass('scroll');
}
/* END body */
/* header */
if (scrollPosition > (headerHeight / 3) || $('body').hasClass('noheader') && scrollPosition > 100) {
if($('#header').hasClass('scroll') === false) {
$('#header').addClass('scroll');
setTimeout(function() {
recalcScrollHeight();
}, 500);
}
} else {
if($('#header').hasClass('scroll') === true) {
$('#header').removeClass('scroll');
setTimeout(function() {
recalcScrollHeight();
}, 500);
}
}
/* END header */
/* sticky top */
$('.sticky-top').each(function () {
let offset = $(this).offset().top - parseInt($(this).css('top'));
if (scrollPosition >= offset && !$(this).hasClass('scroll')) {
$(this).addClass('scroll');
} else if (scrollPosition < offset && $(this).hasClass('scroll')) {
$(this).removeClass('scroll');
}
});
/* END sticky top */
/* END add scroll classes */
// set last scroll position
lastScrollPosition = scrollPosition;
}
/* use passive for better performance */
document.addEventListener('scroll', scroll, passiveSupport() ? {passive: true} : false);
/* END scroll function */
/* resize function */
function resize(widthResize, heightResize) {
if (widthResize && heightResize) {
/* get window width and height */
windowWidth = $(window).innerWidth();
windowHeight = $(window).innerHeight();
/* get scroll height with offset */
getScrollHeight();
/* detect breakpoint */
detectBreakpoint();
/* close navigation */
// @todo: add here close navigation function
}
/* get window height */
windowHeight = $(window).height();
/* calc scroll offset */
recalcScrollHeight();
/* article */
/* END article */
/* update development box */
let debugsettings = '';
if ((enviroment === 'dev' || document.location.href.indexOf('debug') !== -1) && $('#debug').length > 0) {
$('#debug').html(window.innerWidth + 'x' + $(window).height() + 'px<br />breakpoint: ' + breakpoint + debugsettings);
} else if(errorMode !== 'silent' && bookingId === null) {
$('#debug').html(window.innerWidth + 'x' + $(window).height() + 'px<br />breakpoint: ' + breakpoint + debugsettings);
}
/* END update development box */
}
/* END resize function */
/* document functions */
/* ready */
$(document).ready(function(){
load();
});
/* END ready */
/* END document functions */
/* window functions */
/* resize */
$(window).resize(function() {
/* when width change */
if (windowWidth !== window.innerWidth) {
windowWidth = window.innerWidth;
resize(true, true);
} else {
resize(false, true);
}
});
/* END resize */
/* END window functions */
/* functions library */
/* detect enviroment */
function detectEnviroment() {
if (window.location.host === '' || window.location.host === 'undefined' || window.location.host.startsWith('dev') || window.location.host.startsWith('ddev')) {
return 'dev';
}
return 'live';
}
/* END detect enviroment */
/* get scroll height with offset */
function getScrollHeight() {
recalcScrollHeight();
}
/* END get scroll height with offset */
/* detect breakpoint */
function detectBreakpoint() {
/* check if bootstrap display class is not none */
if($('body > span.d-xxl-block').css('display') != 'none') {
breakpoint = 'xxl';
} else if($('body > span.d-xl-block').css('display') != 'none') {
breakpoint = 'xl';
} else if($('body > span.d-lg-block').css('display') != 'none') {
breakpoint = 'lg';
} else if($('body > span.d-md-block').css('display') != 'none') {
breakpoint = 'md';
} else if($('body > span.d-sm-block').css('display') != 'none') {
breakpoint = 'sm';
} else if($('body > span.d-block').css('display') != 'none') {
breakpoint = 'xs';
}
/* add breakpoint class to body */
if (!$('body').hasClass(breakpoint)) {
$('body').removeClass('xxl xl lg md sm xs').addClass(breakpoint);
}
return breakpoint;
}
/* END detect breakpoint */
/* shortrequest */
const ShortRequest =  {
init: function(box) {
ShortRequest.initNumberControl(box);
ShortRequest.initChildrenAges(box);
},
initNumberControl: function(box) {
$('.numbercontroll', box).each(function() {
var input = $(this).attr('data-for');
// up
$(this).find('.up').click(function() {
let max = 10;
if($(input).attr('max')) {
max = parseInt($(input).attr('max'));
}
if (parseInt($(input).val()) < max) {
$(input).val(parseInt($(input).val()) + 1).trigger('change');
}
});
// down
$(this).find('.down').click(function() {
let min = $(input).attr('min');
if($(input).attr('min')) {
min = parseInt($(input).attr('min'));
}
if (parseInt($(input).val()) > min) {
$(input).val(parseInt($(input).val()) - 1).trigger('change');
}
});
});
},
initChildrenAges: function(box) {
$('[name^="order[kids]"]', box).change(function() {
let children = parseInt($(this).val());
let childAgeContainer = $(this).closest('.repeatableitem').find('.childagecontainer');
let num = 1;
childAgeContainer.find('.childage').each(function() {
if(num <= children) {
$(this).show().find('input').removeAttr('disabled');
} else {
$(this).hide().find('input').val(0).attr('disabled', 'disabled');
}
num++;
});
if(children > 0) {
childAgeContainer.show();
} else {
childAgeContainer.hide();
}
});
},
book: function() {
let booking = new Booking();
booking.book();
},
};
/* END shortrequest */
/* booking/request system functions */
const Booking = function() {
/* booking system */
this.bookingSystem = 'hgv'; // hgv, xenus, iperbooking
this.bookingUrl = '';
// presets
this.defaultBookingId = 37; // default typo3 booking page id
this.initBooking = function() {
if(typeof bookingId === 'undefined' || bookingId === null || enviroment === 'dev') {
console.warn('Booking page id is missing, using default id');
bookingId = this.defaultBookingId;
}
this.bookingUrl = '/index.php?id=' + bookingId + '&L=' + languagesTypo3[la];
if(typeof bookingSystem !== 'undefined' && bookingId !== null) {
this.bookingSystem = bookingSystem;
}
};
this.book = function() {
this.initBooking();
if(typeof(la) == 'undefined') {
return;
}
if(this.bookingSystem === '') {
console.warn('Booking system is not set');
return;
}
let arrival = $('[name=dayfrom_submit]').val(); // YYYY-MM-DD
let departure = $('[name=dayuntil_submit]').val(); // YYYY-MM-DD
let rooms = [];
$('.shortrequest input[name]:not([disabled])').each(function() {
var parts = $(this).attr('name').split(/[[\]]{1,2}/);
parts.length--;
if(parts.length === 3 && parts[0] === 'order') {
if(typeof rooms[parts[2]] === 'undefined') {
rooms[parts[2]] = {};
}
if(typeof rooms[parts[2]][parts[1]] === 'undefined') {
if(parts[1].indexOf('agekids') !== -1) {
if(typeof rooms[parts[2]]['kidsage'] === 'undefined') {
rooms[parts[2]]['kidsage'] = [];
}
rooms[parts[2]]['kidsage'].push($(this).val());
} else {
rooms[parts[2]][parts[1]] = $(this).val();
}
}
}
});
/*
let persons = $('#toppersons').val();
let kids = $('#topkids').val();
if(typeof persons === 'undefined') {
persons = this.defaultAdults;
}
if(typeof kids === 'undefined') {
kids = this.defaultKids;
}
*/
let href = this.bookingUrl;
let path = '';
// hgv
if(this.bookingSystem === 'hgv') {
let personsString = '[';
let roomsStringCollection = [];
rooms.forEach(function(room) {
let tmpRoomString = '[';
let tmpPersons = [];
for(let i = 0; i < room.adults; i++) {
tmpPersons.push('18');
}
for(let i = 0; i < room.kids; i++) {
if(typeof room.kidsage[i] !== 'undefined' && room.kidsage[i]) {
tmpPersons.push(room.kidsage[i]);
} else {
tmpPersons.push('0');
}
}
tmpRoomString += tmpPersons.join(',') + ']';
roomsStringCollection[roomsStringCollection.length] = tmpRoomString;
});
personsString += roomsStringCollection.join(',');
personsString += ']';
/*
personsString = '[[';
for (let i = 0; i < persons; i += 1) {
if (personsString != '[[') personsString += ',';
personsString += '18';
}
personsString += ']]';
*/
path = '&arrival='+arrival+'&departure='+departure+'&occupations='+personsString+'#content';
}
// xenus
else if(this.bookingSystem === 'xenus') {
arrival = arrival.split('-').reverse().join('');
departure = departure.split('-').reverse().join('');
// does not support multiple rooms
path = '&arrival='+arrival+'&departure='+departure+'&service=3&adults='+room[0].adults+'&childs='+room[0].kids+'#content';
}
// iperbooking
else if (this.bookingSystem === 'iperbooking') {
// todo: implement
}
window.location.href = href + path;
};
};
/* END booking/request system functions */
/* datepicker (http://lopezb.com/hoteldatepicker/) */
var allDatepickers = [];
const DatePicker = function() {
let outerThis = this;
this.input = null;
this.datepickerObj = null;
this.arrivalInputName = 'dayfrom_submit';
this.departureInputName = 'dayuntil_submit';
this.defaultDayOfWeek = 6;
this.settings = {
format: 'DD.MM.YYYY',
//format: 'ddd, DD. MMM YYYY',
formatCallback: 'YYYY-MM-DD',
selectForward: true,
moveBothMonths: true,
autoClose: true,
closeOnClick: true,
animationSpeed: '0',
hoveringTooltip: function() {}, // Datepicker Tooltip überschreiben
nextText: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/></svg>',
prevText: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"/></svg>',
/*
noCheckInDates: [
'2019-05-26',
'2019-06-02'
],
noCheckOutDates: [
'2019-05-29',
'2019-06-07'
],
*/
tooltips: [
/*
{
from: '2021-10-01',
to: '2021-10-13',
color: 'green',
text: 'test...',
},
{
dayOfWeek: 0, // 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday
color: '#ef114c',
text: 'test2',
},
*/
],
showTopbar: false,
startOfWeek: 'monday',
onSelectRange: function() {
let dateRange = outerThis.datepickerObj.getUnformatetValue(); // getValue() has wrong format
if(dateRange.length > 0) {
outerThis.onSelectRange(dateRange[0], dateRange[1]);
}
},
onClear: function() {
outerThis.onClear();
},
onMonthChange: function() {
outerThis.onMonthChange();
},
};
this.translations = {
'deu': {
selected: 'Dein Aufenthalt:',
night: 'Nacht',
nights: 'Nächte',
buttonClose: 'Schließen',
buttonClear: 'Löschen',
'checkin-disabled': 'Check-in nicht möglich',
'checkout-disabled': 'Check-out nicht möglich',
// 'day-names-short': ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'],
'day-names-short': ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
'day-names': ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
'month-names-short': ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
'month-names': ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
'error-less': 'Sie müssen mindestens eine Übernachtung auswählen',
'error-less-plural': 'Sie müssen mindestens %d Übernachtungen auswählen',
'info-default': 'Bitte die Nächtigungen auswählen',
'messaggeArrival': 'Anreise wählen',
'messaggeDeparture': 'Abreise wählen',
'messaggeChangeDates': 'Reisedaten ändern',
},
'eng': {
selected: 'Your stay:',
night: 'Night',
nights: 'Nights',
buttonClose: 'Close',
buttonClear: 'Clear',
'checkin-disabled': 'Check-in disabled',
'checkout-disabled': 'Check-out disabled',
'day-names-short': ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
'day-names': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
'month-names-short': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
'month-names': ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
'error-more': 'Date range should not be more than 1 night',
'error-more-plural': 'Date range should not be more than %d nights',
'error-less': 'Date range should not be less than 1 night',
'error-less-plural': 'Date range should not be less than %d nights',
'info-more': 'Please select a date range of at least 1 night',
'info-more-plural': 'Please select a date range of at least %d nights',
'info-range': 'Please select a date range between %d and %d nights',
'info-default': 'Please select a date range',
'messaggeArrival': 'Choose arrival',
'messaggeDeparture': 'Choose departure',
'messaggeChangeDates': 'Change travel dates',
},
'ita': {
selected: 'Il tuo soggiorno:',
night: 'Notte',
nights: 'Notti',
buttonClose: 'Chiudi',
buttonClear: 'Cancella',
'checkin-disabled': 'Check-in disabilitato',
'checkout-disabled': 'Check-out disabilitato',
// 'day-names-short': ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
'day-names-short': ['Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'],
'day-names': ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
'month-names-short': ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'],
'month-names': ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'],
'error-more': 'L\'intervallo di date non deve avere più di 1 notte',
'error-more-plural': 'L\'intervallo di date non deve avere più di %d notti',
'error-less': 'L\'intervallo di date non deve avere meno di 1 notte',
'error-less-plural': 'L\'intervallo di date non deve avere meno di %d notti',
'info-more': 'Per favore seleziona un intervallo di date maggiore di 1 notte',
'info-more-plural': 'Per favore seleziona un intervallo di date maggiore di %d notti',
'info-range': 'Per favore seleziona un intervallo di date tra %d e %d notti',
'info-default': 'Per favore seleziona un intervallo di date',
'messaggeArrival': 'Scegli data d\'arrivo',
'messaggeDeparture': 'Scegli data di partenza',
'messaggeChangeDates': 'Cambia le date del soggiorno',
},
};
this.setTranslations = function(l) {
if(typeof this.translations[l] === 'undefined') {
l = 'eng';
}
this.settings.i18n = this.translations[l];
};
this.init = function(input) {
input = $(input).get(0);
if(input === null) {
return;
}
this.input = input;
let settings = this.settings;
this.setTranslations(lang);
let tmpDatepicker = new HotelDatepicker(this.input, settings);
// tmpDatepicker.open();
let id = tmpDatepicker.getDatepickerId();
allDatepickers[id] = tmpDatepicker;
this.datepickerObj = tmpDatepicker;
this.setDefaultDate();
};
this.setDefaultDate = function() {
// preset always sat at sat
let defaultStartDate = this.findNextWeekday();
let defaultEndDate = new Date();
defaultEndDate.setDate(defaultStartDate.getDate() + 7);
/*
let today =  new Date();
let weekday = today.getDay();
let currentDayOffset = 1;
if (weekday === 0) { // if is sunday
currentDayOffset = 6 - weekday;
}
let nextWeekDayOffset = currentDayOffset + 7;
let currentDate = new Date();
currentDate.setDate(currentDate.getDate() + currentDayOffset);
let nextWeekDate = new Date();
nextWeekDate.setDate(nextWeekDate.getDate() + nextWeekDayOffset);
*/
// set values
this.onSelectRange(
fecha.format(defaultStartDate, this.settings.formatCallback),
fecha.format(defaultEndDate, this.settings.formatCallback)
);
$(this.input).val(fecha.format(defaultStartDate, this.settings.format) + ' - ' + fecha.format(defaultEndDate, this.settings.format));
};
this.findNextWeekday = function(dayOfWeek) {
if(typeof dayOfWeek === 'undefined' || (dayOfWeek < 0 || dayOfWeek > 6)) {
dayOfWeek = this.defaultDayOfWeek;
}
for(let i = 0; i < 7; i++) {
let currentDate = new Date();
currentDate.setDate(currentDate.getDate() + i);
if(currentDate.getDay() === dayOfWeek) {
return currentDate;
}
}
return new Date();
};
this.onSelectRange = function(startDate, endDate) {
let currentForm = $(this.input).closest('form');
currentForm.find('[name="'+this.arrivalInputName+'"]').val(startDate);
currentForm.find('[name="'+this.departureInputName+'"]').val(endDate);
let parsedStartDate = fecha.parse(startDate, this.settings.formatCallback);
let parsedEndDate = fecha.parse(endDate, this.settings.formatCallback);
currentForm.find('[data-arrival-format]').each(function() {
let format = $(this).attr('data-arrival-format');
$(this).html(fecha.format(parsedStartDate, format));
});
currentForm.find('[data-departure-format]').each(function() {
let format = $(this).attr('data-departure-format');
$(this).html(fecha.format(parsedEndDate, format));
});
};
this.onMonthChange = function() {
// todo: finish
if(this.settings.tooltips.length > 0 && typeof $.fn.tooltip !== 'undefined') {
$('.rangedatepicker .datepicker__month-day[title]').tooltip({
container: 'body',
placement: 'top',
});
}
};
this.onClear = function() {
currentForm.find('[name="'+this.arrivalInputName+'"]').val('');
currentForm.find('[name="'+this.departureInputName+'"]').val('');
$('.shortrequest .smartphone-datepicker').removeClass('selected');
this.setDefaultDate();
};
};
/* END datepicker */
/* repeat */
const Repeatable = function() {
this.init = function(box) {
let outerThis = this;
$('.repeatablewrapper', box).each(function() {
let containerElement = $(this).find('.repeatablecontainer');
let draftElement = $(this).find('.repeatabledraft');
$(this).find('.removerepeatable').click(function() {
outerThis.remove(containerElement, draftElement);
});
$(this).find('.addrepeatable').click(function() {
outerThis.add(containerElement, draftElement);
}).click();
});
};
this.add = function(containerElement, draftElement) {
let copiedElement = draftElement.html();
containerElement.append(copiedElement);
this.onChange(containerElement);
ShortRequest.init(containerElement.find('.repeatableitem').last());
};
this.remove = function(containerElement, draftElement) {
containerElement.find('.repeatableitem').last().remove();
this.onChange(containerElement);
};
this.onChange = function(containerElement) {
containerElement.find('.repeatableitem').each(function(k, v) {
let oldIndex = $(this).attr('data-repeatable-index');
$(this).attr('data-repeatable-index', k);
$(this).find('input, select, [data-for], .num').each(function() {
if($(this).attr('name') && $(this).attr('name').indexOf('['+oldIndex+']') !== -1) {
let newName = $(this).attr('name').replace('['+oldIndex+']', '['+k+']');
$(this).attr('name', newName);
if($(this).closest('.childage').length === 0) {
$(this).removeAttr('disabled');
}
} else if($(this).attr('data-for') && $(this).attr('data-for').indexOf('['+oldIndex+']') !== -1) {
let newName = $(this).attr('data-for').replace('['+oldIndex+']', '['+k+']');
$(this).attr('data-for', newName);
} else if($(this).hasClass('num')) {
$(this).html(k + 1);
}
});
});
let maxItems = containerElement.attr('data-repeatable-max');
if(containerElement.find('.repeatableitem').length >= maxItems) {
containerElement.closest('.repeatablewrapper').find('.addrepeatable').hide();
} else {
containerElement.closest('.repeatablewrapper').find('.addrepeatable').show();
}
if(containerElement.find('.repeatableitem').length <= 1) {
containerElement.closest('.repeatablewrapper').find('.removerepeatable').hide();
} else {
containerElement.closest('.repeatablewrapper').find('.removerepeatable').show();
}
};
};
/* END repeat */
/* slider functions */
const Slider = function (elem, config = {}, events = {}) {
// set elem
this.elem = elem;
// find swiper-container for initialation
this.sliderContainer = $(this.elem);
if (!$(this.sliderContainer).hasClass('swiper-container')) {
this.sliderContainer = $(this.sliderContainer).find('.swiper-container');
if ($(this.sliderContainer).length <= 0) {
if ($(this.sliderContainer).find('div[class*="-container"]').length > 0 && $(this.sliderContainer).find('div[class*="-container"] > div[class*="-wrapper"]').length > 0 && $(this.sliderContainer).find('div[class*="-container"] > div[class*="-wrapper"] > div[class*="-items"]').length > 0) {
$(this.elem).addClass('js-manipulated-swiper');
this.sliderContainer = $(this.sliderContainer).find('div[class*="-container"]').addClass('swiper-container');
$(this.sliderContainer).find('div[class*="-container"] > div[class*="-wrapper"]').addClass('swiper-wrapper');
$(this.sliderContainer).find('div[class*="-container"] > div[class*="-wrapper"] > div[class*="-items"]').addClass('swiper-slide');
console.warn('better usage is as server side rendered slider:', this.elem);
} else {
console.warn('no swiper container found for element:', this.elem);
return false;
}
}
}
// preset & set if slider data exist
this.slider;
if (typeof $(this.elem).data('slider') !== 'undefined') {
this.slider = $(this.elem).data('slider');
}
// preset & set if slider item data exist
this.countItems = 0;
if (typeof $(this.sliderContainer).data('items') !== 'undefined') {
this.countItems = $(this.sliderContainer).data('items');
}
this.config = {
default: {
effect: 'slide', // 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip'
loop: false,
rewind: false,
keyboard: false,
spaceBetween: 0,
slidesPerView: 1,
speed: 1000,
autoplay: false,
centeredSlides: false,
allowTouchMove: true,
parallax: false,
},
passed: config
};
if (typeof $(this.elem).data('config') !== 'undefined') {
this.config.passed = $(this.elem).data('config');
}
$(this.elem).data('config', this.config.passed);
this.controls = {
default: {
navigation: {
nextEl: $(this.elem).find('.swiper-button-next').get(0),
prevEl: $(this.elem).find('.swiper-button-prev').get(0),
},
pagination: {
el: $(this.elem).find('.swiper-pagination').get(0),
type: 'bullets',
/*
type: 'fraction',
formatFractionCurrent: function (number) {
return prependZero(number);
},
formatFractionTotal: function (number) {
return prependZero(number);
},
renderFraction: function (currentClass, totalClass) {
return '<div class="' + currentClass + '"></div>' +
'<div class="' + totalClass + '"></div>';
}
*/
},
}
}
this.events = {
default: {
init: function (swiper) {
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
// check first slide
let firstSlide = swiper.slides[0];
// check next slide for video slide
let restartAutoplay = false;
if (typeof swiper.params.autoplay.enabled !== 'undefined' && swiper.params.autoplay.enabled !== false) {
restartAutoplay = true;
}
if (swiper.slides[1]) {
let nextSlide = swiper.slides[1];
if ($(nextSlide).hasClass('video-slide')) {
restartAutoplay = false;
}
}
// check if first slide is video slide
if ($(firstSlide).hasClass('video-slide')) {
let video = $(firstSlide).find('.video');
if ($(video).length > 0) {
let videoSettings = {
callback: {
play: function () {
swiper.autoplay.stop();
},
ended: function () {
swiper.slideNext();
if (restartAutoplay) {
swiper.autoplay.start();
}
Video.stop(video);
}
}
};
if ($(video).attr('autoplay') && $(video).attr('autoplay') !== 'false') {
swiper.autoplay.stop();
Video.play(video, videoSettings);
} else if (!$(video).hasClass('init')) {
Video.init(video, videoSettings);
}
}
}
if (typeof swiper.params.slidesPerView !== 'undefined' && swiper.params.slidesPerView > 1) {
if (typeof swiper.slides !== 'undefined' && swiper.slides.length > 0) {
for (let i = 0; i < swiper.slides.length; i++) {
let slide = swiper.slides[i];
if ($(slide).length > 0 && $(slide).hasClass('video-slide')) {
let video = $(slide).find('.video');
let videoSettings = {
callback: {
play: function () {
swiper.autoplay.stop();
},
ended: function () {
swiper.slideNext();
if (restartAutoplay) {
swiper.autoplay.start();
}
Video.stop(video);
}
}
};
if (!$(video).hasClass('init')) {
Video.init(video, videoSettings);
}
}
}
}
}
},
slideChange: function(swiper) {
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
// get active & prev slide
let activeIndex = swiper.activeIndex;
let previousIndex = swiper.previousIndex;
let activeSlide = swiper.slides[activeIndex];
let previousSlide = swiper.slides[previousIndex];
// check next slide for video slide
let restartAutoplay = false;
if (typeof swiper.params.autoplay.enabled !== 'undefined' && swiper.params.autoplay.enabled !== false) {
restartAutoplay = true;
}
if (swiper.slides[activeIndex + 1]) {
let nextSlide = swiper.slides[activeIndex + 1];
if ($(nextSlide).hasClass('video-slide')) {
restartAutoplay = false;
}
}
// check if active slide is video slide
if ($(activeSlide).hasClass('video-slide')) {
let video = $(activeSlide).find('.video').get(0);
if ($(video).length > 0) {
let videoSettings = {
callback: {
play: function () {
swiper.autoplay.stop();
},
ended: function () {
swiper.slideNext();
if (restartAutoplay) {
swiper.autoplay.start();
}
Video.stop(video);
}
}
};
if ($(video).attr('autoplay') && $(video).attr('autoplay') !== 'false') {
swiper.autoplay.stop();
Video.play(video, videoSettings);
} else if (!$(video).hasClass('init')) {
Video.init(video, videoSettings);
}
}
}
// check if previous slide is video slide
if ($(previousSlide).hasClass('video-slide')) {
let video = $(previousSlide).find('.video').get(0);
if ($(video).attr('autoplay') && $(video).attr('autoplay') !== 'false') {
swiper.autoplay.stop();
}
Video.pause(video);
}
},
slideChangeTransitionEnd: function (swiper) {
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
},
},
passed: events,
};
if (typeof $(this.elem).data('events') !== 'undefined') {
this.config.events = $(this.elem).data('events');
}
$(this.elem).data('events', this.events.passed);
this.parameter = {};
this.init = function(config, events) {
// merge config with default
this.mergedConfig = {};
if (typeof config !== 'undefined' && Object.keys(config).length > 0) {
this.mergeConfig(config);
}
// add merged config to parameter
this.parameter = this.mergedConfig;
// add events to parameter
if (typeof events !== 'undefined' && Object.keys(events).length > 0) {
this.parameter['on'] = events;
} else {
this.parameter['on'] = this.events.default;
}
// check if default controls are necessary
// check and set navigation
if (typeof this.parameter.navigation === 'undefined' && typeof this.controls.default.navigation !== 'undefined' && $(this.sliderContainer).find($(this.controls.default.navigation.prevEl)).length > 0 && $(this.sliderContainer).find($(this.controls.default.navigation.nextEl)).length > 0) {
this.parameter['navigation'] = this.controls.default.navigation;
}
// check and set navigation
if (typeof this.parameter.pagination === 'undefined' && typeof this.controls.default.pagination !== 'undefined' && $(this.sliderContainer).find($(this.controls.default.pagination.el)).length > 0) {
this.parameter['pagination'] = this.controls.default.pagination;
}
// init swiper
if (typeof Swiper !== 'undefined') {
// count items/slides and modifiy default behaviour
this.countItems = $(this.elem).find('.swiper-slide').length;
$(this.sliderContainer).attr({'data-items': this.countItems});
// check for videos
this.videosInSlider = $(this.sliderContainer).find('.swiper-slide.video-slide');
// check for videos
this.youTubeVideoInSlider = $(this.sliderContainer).find('.swiper-slide.video-slide .youtube-video-container').length;
// video consent required (actually build only with gnconsent)
if (consentToolActive) {
let youTubeConsent = true;
if (consentTool === 'gnConsent' && gnConsent.getConsent('youTube') !== null && gnConsent.getConsent('youTube') === false) {
youTubeConsent = false;
}
let vimeoConsent = true;
if (consentTool === 'gnConsent' && gnConsent.getConsent('vimeo') !== null && gnConsent.getConsent('vimeo') === false) {
vimeoConsent = false;
}
// control each video slide
let sliderContainer = this.sliderContainer;
$(this.videosInSlider).each(function () {
let videoSlide = $(this);
if ($(videoSlide).find('.youtube-video-container').length > 0 && youTubeConsent === false || $(videoSlide).find('.vimeo-video-container').length > 0 && vimeoConsent === false) {
// append video slide with no consent to the end
$(videoSlide).appendTo($(sliderContainer).find('.swiper-wrapper'));
}
});
}
if (this.countItems <= 1) {
this.parameter['loop'] = false;
this.parameter['navigation'] = false;
this.parameter['pagination'] = false;
this.parameter['allowTouchMove'] = false;
}
// setting according to documentation (https://swiperjs.com/swiper-api#param-loop)
if (typeof this.parameter['slidesPerView'] !== 'undefined' && this.parameter['slidesPerView'] > 1 && this.countItems < (this.parameter['slidesPerView'] * 2)) {
this.parameter['loop'] = false;
}
// if youtube slide exist & loop is active bugfix with rewind
if (this.youTubeVideoInSlider > 0 && (typeof this.parameter['loop'] !== 'undefined' && this.parameter['loop']) && (typeof this.parameter['rewind'] !== 'undefined' && !this.parameter['rewind'])) {
this.parameter['loop'] = 0;
this.parameter['rewind'] = true;
}
this.slider = new Swiper($(this.sliderContainer).get(0), this.parameter);
// set to storage (needed for destroy an manipulation after initialisation)
$(this.elem).data('slider', this.slider);
} else {
console.warn('swiper.js is not included');
return false;
}
}
this.destroy = function() {
if (typeof Swiper !== 'undefined') {
this.slider.destroy();
if ($(this.elem).hasClass('js-manipulated-swiper')) {
$(this.elem).removeClass('js-manipulated-swiper');
$(this.sliderContainer).removeClass('swiper-container');
$(this.sliderContainer).find('.swiper-wrapper').removeClass('.swiper-wrapper');
$(this.sliderContainer).find('.swiper-slide').removeClass('.swiper-slide');
}
}
}
this.mergeConfig = function(config) {
this.mergedConfig = Object.assign(this.config.default, config);
}
// init slider
if ($(this.sliderContainer).length > 0 && !$(this.sliderContainer).hasClass('swiper-initialized')) {
this.init(this.config.passed, this.events.passed);
}
}
/* END slider functions */
/* video functions */
// works as video controller for all other video functions (for simplification)
const Video = {
init: function (elem, settings) {
// get video type
let videoType = Video.getVideoType($(elem).get(0));
// go to action
switch (videoType) {
case 'html':
Html5Video.init(elem, settings);
break;
case 'youtube':
YouTubeVideo.init(elem, settings);
break;
case 'vimeo':
VimeoVideo.init(elem, settings);
break;
}
},
play: function (elem, settings) {
// get video type
let videoType = Video.getVideoType($(elem).get(0));
// go to action
switch (videoType) {
case 'html':
Html5Video.play(elem, settings);
break;
case 'youtube':
YouTubeVideo.play(elem, settings);
break;
case 'vimeo':
VimeoVideo.play(elem, settings);
break;
}
},
pause: function (elem) {
// get video type
let videoType = Video.getVideoType(elem);
// go to action
switch (videoType) {
case 'html':
Html5Video.pause(elem);
break;
case 'youtube':
YouTubeVideo.pause(elem);
break;
case 'vimeo':
VimeoVideo.pause(elem);
break;
}
},
stop: function (elem) {
// get video type
let videoType = Video.getVideoType(elem);
// go to action
switch (videoType) {
case 'html':
Html5Video.stop(elem);
break;
case 'youtube':
YouTubeVideo.stop(elem);
break;
case 'vimeo':
VimeoVideo.stop(elem);
break;
}
},
mute: function (elem) {
// get video type
let videoType = Video.getVideoType(elem);
},
unmute: function (elem) {
// get video type
let videoType = Video.getVideoType(elem);
},
getVideoType: function (elem) {
if ($(elem).length > 0) {
if ($(elem).hasClass('youtube-iframe')) {
return 'youtube';
} else if ($(elem).hasClass('vimeo-iframe')) {
return 'vimeo';
} else if ($(elem).hasClass('html-video')) {
return 'html';
}
}
return false;
},
}
/* html video function */
const Html5Video = {
init: function (elem, settings) {
// mark as initalized
$(elem).addClass('init');
// get required dom elements for player
let playerContainer = $(elem).get(0);
if (!$(playerContainer).hasClass('html-video')) {
if ($(playerContainer).find('video.html-video').length <= 0) {
return false;
}
playerContainer = $(elem).find('video.html-video').get(0);
}
// check if unique id is set
if (!$(playerContainer).attr('id')) {
console.warn('Html5 video logic needs a unique id on the video DOM element');
return false;
}
let elemId = $(playerContainer).attr('id');
// set status
// set audio status
let audioStatus = 1;
if ($(playerContainer).attr('muted') && $(playerContainer).attr('muted') !== 'false') {
audioStatus = 0;
}
// set play status
let playStatus = 0;
if ($(playerContainer).attr('autoplay') && $(playerContainer).attr('autoplay') !== 'false') {
playStatus = 1;
audioStatus = 0;
}
// get parent container
let parentContainer;
if ($(elem).closest('.video-container.html-video-container').length > 0) {
parentContainer = $(elem).closest('.video-container.html-video-container');
}
// get controls
let controls;
if ($(parentContainer).length > 0 && $(parentContainer).find('.video-controls.html-video-controls').length > 0) {
controls = $(parentContainer).find('.video-controls.html-video-controls');
if ($(playerContainer).attr('controls') && $(playerContainer).attr('controls') !== 'false') {
$(controls).remove();
}
}
// get play button
let playButton;
if ($(controls).length > 0 && $(controls).find('.video-play.html-video-play').length > 0) {
playButton = $(controls).find('.video-play.html-video-play');
if (playStatus === 0) {
$(playButton).addClass('paused');
}
}
// set event listener on button
if ($(playButton).length > 0) {
$(playButton).on('click', function () {
Html5Video.togglePlayStatus(elem);
});
}
// get audio button
let audioButton;
if ($(controls).length > 0 && $(controls).find('.video-audio.html-video-audio').length > 0) {
audioButton = $(controls).find('.video-audio.html-video-audio');
if (audioStatus === 0) {
$(audioButton).addClass('muted');
}
}
// set event listener on button
if ($(audioButton).length > 0) {
$(audioButton).on('click', function () {
Html5Video.toggleSound(elem);
});
}
// set default callbacks for updating status
let defaultCallbacks = {
'play': function () {
if (typeof Html5Video.storage[elemId] !== 'undefined') {
Html5Video.storage[elemId]['playStatus'] = 1;
if (typeof Html5Video.storage[elemId]['playButton'] !== 'undefined') {
$(Html5Video.storage[elemId]['playButton']).removeClass('paused visible');
}
}
},
'pause': function () {
if (typeof Html5Video.storage[elemId] !== 'undefined') {
Html5Video.storage[elemId]['playStatus'] = 2;
if (typeof Html5Video.storage[elemId]['playButton'] !== 'undefined') {
$(Html5Video.storage[elemId]['playButton']).addClass('paused visible');
}
}
},
'stop': function () {
if (typeof Html5Video.storage[elemId] !== 'undefined') {
Html5Video.storage[elemId]['playStatus'] = 0;
if (typeof Html5Video.storage[elemId]['playButton'] !== 'undefined') {
$(Html5Video.storage[elemId]['playButton']).addClass('paused visible');
}
}
},
'ended': function () {
if (typeof Html5Video.storage[elemId] !== 'undefined') {
Html5Video.storage[elemId]['playStatus'] = 0;
if (typeof Html5Video.storage[elemId]['playButton'] !== 'undefined') {
$(Html5Video.storage[elemId]['playButton']).addClass('paused visible');
}
}
},
}
// set default callbacks
Html5Video.setCallback(elem, defaultCallbacks);
// check & set for callbacks
if (typeof settings !== 'undefined' && typeof settings.callback !== 'undefined') {
Html5Video.setCallback(elem, settings.callback);
}
// save player in storage
Html5Video.storage[elemId] = {
elem: elem,
settings: settings,
playStatus: playStatus,
audioStatus: audioStatus,
playButton: playButton,
audioButton: audioButton,
};
return elem;
},
togglePlayStatus: function (elem) {
if (!elem) {
return false;
}
// get player
let player = Html5Video.getPlayer(elem);
if (!player) {
return false;
}
if (typeof player.playStatus !== 'undefined') {
if (player.playStatus === -1 || player.playStatus === 0 || player.playStatus === 2) {
Html5Video.play(elem);
} else {
Html5Video.pause(elem);
}
}
},
play: function (elem, settings = {}) {
// init if not happend
if (!$(elem).hasClass('init')) {
elem = Html5Video.init(elem, settings);
return;
}
// trigger play
$(elem).trigger('play');
},
pause: function (elem) {
$(elem).trigger('pause');
},
stop: function (elem) {
$(elem).trigger('stop');
},
toggleSound: function (elem) {
if (!elem) {
return false;
}
// get player
let player = Html5Video.getPlayer(elem);
if (!player) {
return false;
}
if (typeof player.audioStatus !== 'undefined') {
if (player.audioStatus === 0) {
Html5Video.unmute(elem);
} else {
Html5Video.mute(elem);
}
}
},
mute: function (elem) {
if (!elem) {
return false;
}
// get player
let player = Html5Video.getPlayer(elem);
if (!player) {
return false;
}
if (typeof player.elem !== 'undefined' && $(player.elem).length > 0) {
let elemId = $(player.elem).attr('id');
$(player.elem).prop('muted', true);
if (typeof player.audioButton !== 'undefined' && $(player.audioButton).length > 0) {
$(player.audioButton).addClass('muted');
}
Html5Video.storage[elemId]['audioStatus'] = 0;
}
},
unmute: function (elem) {
if (!elem) {
return false;
}
// get player
let player = Html5Video.getPlayer(elem);
if (!player) {
return false;
}
if (typeof player.elem !== 'undefined' && $(player.elem).length > 0) {
let elemId = $(player.elem).attr('id');
$(player.elem).prop('muted', false);
if (typeof player.audioButton !== 'undefined' && $(player.audioButton).length > 0) {
$(player.audioButton).removeClass('muted');
}
Html5Video.storage[elemId]['audioStatus'] = 1;
}
},
setCallback: function (elem, callbacks) {
for (const callback in callbacks) {
switch (callback) {
case 'play':
case 'playing':
if (typeof callbacks[callback] === 'function') {
$(elem).bind('play', callbacks[callback]);
}
break;
case 'pause':
case 'paused':
if (typeof callbacks[callback] === 'function') {
$(elem).bind('pause', callbacks[callback]);
}
break;
case 'stop':
case 'ended':
if (typeof callbacks[callback] === 'function') {
$(elem).bind('ended', callbacks[callback]);
}
break;
}
}
},
getPlayer: function (elem) {
if (!elem) {
return false;
}
// get required dom elements for player
let playerContainer = $(elem).get(0);
if (!$(playerContainer).hasClass('html-video')) {
if ($(playerContainer).find('video.html-video').length <= 0) {
return false;
}
playerContainer = $(elem).find('video.html-video').get(0);
}
// check if unique id is set
if (!$(playerContainer).attr('id')) {
console.warn('Html5 video logic needs a unique id on the video DOM element');
return false;
}
let elemId = $(playerContainer).attr('id');
if (Html5Video.storage[elemId]) {
return Html5Video.storage[elemId];
}
return false;
},
storage: [],
}
/* END html video function */
/* youtube video function */
const YouTubeVideo = {
init: function (elem, settings = {}) {
// check youtube api status
if (typeof youtubeApiLoaded === 'undefined' || youtubeApiLoaded === false) {
YouTubeVideo.setToWaitingList(elem, settings);
return false;
}
// mark as initalized
$(elem).addClass('init');
// get required dom elements for player
let playerContainer = $(elem).get(0);
if (!$(playerContainer).hasClass('youtube-iframe')) {
if ($(playerContainer).find('.youtube-iframe').length <= 0) {
return false;
}
playerContainer = $(elem).find('.youtube-iframe').get(0);
}
// check if unique id is set
if (!$(playerContainer).attr('id')) {
console.warn('YouTube JavaScript API needs a unique id on the video DOM element');
return false;
}
let elemId = $(playerContainer).attr('id');
// default settings
let autoplay = 0;
let controls = 0;
let playsinline = 0;
let loop = 0;
let muted = 0;
// override settings by attributes
if ($(playerContainer).attr('autoplay') && $(playerContainer).attr('autoplay') !== 'false') {
autoplay = 1;
muted = 1;
}
if ($(playerContainer).attr('controls')) {
controls = 1;
}
if ($(playerContainer).attr('playsinline') && $(playerContainer).attr('playsinline') !== 'false') {
playsinline = 1;
}
if ($(playerContainer).attr('loop') && $(playerContainer).attr('loop') !== 'false') {
loop = 1;
}
if ($(playerContainer).attr('muted') && $(playerContainer).attr('muted') !== 'false') {
muted = 1;
}
// get parent container
let parentContainer;
if ($(elem).closest('.video-container.youtube-video-container').length > 0) {
parentContainer = $(elem).closest('.video-container.youtube-video-container');
}
// get controls
let controlElements;
if ($(parentContainer).length > 0 && $(parentContainer).find('.video-controls.youtube-video-controls').length > 0) {
controlElements = $(parentContainer).find('.video-controls.youtube-video-controls');
if ($(playerContainer).attr('controls') && $(playerContainer).attr('controls') !== 'false') {
$(controlElements).remove();
}
}
// get play button
let playButton;
if ($(controlElements).length > 0 && $(controlElements).find('.video-play.youtube-video-play').length > 0) {
playButton = $(controlElements).find('.video-play.youtube-video-play');
if (autoplay === 0) {
$(playButton).addClass('paused');
}
}
// set event listener on button
if ($(playButton).length > 0) {
$(playButton).on('click', function () {
YouTubeVideo.togglePlayStatus(elem);
});
}
// get audio button
let audioButton;
if ($(controlElements).length > 0 && $(controlElements).find('.video-audio.youtube-video-audio').length > 0) {
audioButton = $(controlElements).find('.video-audio.youtube-video-audio');
if (muted === 1) {
$(audioButton).addClass('muted');
}
}
// set event listener on button
if ($(audioButton).length > 0) {
$(audioButton).on('click', function () {
YouTubeVideo.toggleSound(elem);
});
}
// init player
let player = new YT.Player(playerContainer, {
playerVars: {
'autoplay': autoplay,
'modestbranding': 1,
'controls': controls,
'rel': 0,
'showinfo': 0,
'playsinline': playsinline,
'loop': loop,
'mute': muted,
},
videoId: playerContainer.dataset.id,
events: {
'onReady': function(e) {
// You can perform any actions you want when the player is ready here
},
'onStateChange': function (e) {
// check for callbacks
// @todo: fix swiper bug: when in slider and loop is enabled, error "Failed to execute 'postMessage' on 'DOMWindow'" / maybe destroy yt video and init it again when loop will pass or disable automaticaly the loop
if (typeof settings.callback !== 'undefined') {
// playing (1)
if (e.data === YT.PlayerState.PLAYING) {
if (typeof settings.callback.play !== 'undefined' && typeof settings.callback.play === 'function') {
settings.callback.play();
}
if ($(playButton).length > 0) {
$(playButton).removeClass('paused visible');
}
}
// paused (2)
if (e.data === YT.PlayerState.PAUSED) {
if (typeof settings.callback.paused !== 'undefined' && typeof settings.callback.paused === 'function') {
settings.callback.paused();
}
if ($(playButton).length > 0) {
$(playButton).addClass('paused visible');
}
}
// cued/popsitioned (5)
if (e.data === YT.PlayerState.CUED) {
if (typeof settings.callback.cued !== 'undefined' && typeof settings.callback.cued === 'function') {
settings.callback.cued();
}
}
// ended (0)
if (e.data === YT.PlayerState.ENDED) {
if (typeof settings.callback.ended !== 'undefined' && typeof settings.callback.ended === 'function') {
settings.callback.ended();
}
if ($(playButton).length > 0) {
$(playButton).addClass('paused visible');
}
if (loop === 1) {
e.target.playVideo();
}
}
}
},
},
});
// safe player to storage
YouTubeVideo.storage.push(player);
// set iframe as elem
elem = $(player.g);
return elem;
},
togglePlayStatus: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.pauseVideo === 'function' && typeof player.getPlayerState === 'function') {
if (player.getPlayerState() === -1 || player.getPlayerState() === 0 || player.getPlayerState() === 2 || player.getPlayerState() === 5) {
YouTubeVideo.play(elem);
} else {
YouTubeVideo.pause(elem);
}
}
},
play: function (elem, settings = {}) {
// init if not happend
if (!$(elem).hasClass('init')) {
elem = YouTubeVideo.init(elem, settings);
return false;
}
// return false without elem
if (elem === false) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.playVideo === 'function' && typeof player.getPlayerState === 'function') {
if (player.getPlayerState() === 0 || player.getPlayerState() === 2 || player.getPlayerState() === 5) {
player.playVideo();
}
}
},
pause: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.pauseVideo === 'function' && typeof player.getPlayerState === 'function') {
if (player.getPlayerState() === 1) {
player.pauseVideo();
}
}
},
stop: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.stopVideo === 'function' && typeof player.getPlayerState === 'function') {
if (player.getPlayerState() === 1 || player.getPlayerState() === 2) {
player.stopVideo();
}
}
},
destroy: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.destroy === 'function') {
if (typeof player.o !== 'undefined' && $(player.o).length > 0) {
$(player.o).removeClass('init');
}
player.destroy();
}
},
toggleSound: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.isMuted === 'function') {
if (player.isMuted()) {
YouTubeVideo.unmute(elem);
} else {
YouTubeVideo.mute(elem);
}
}
},
mute: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.mute === 'function') {
player.mute();
// get audio control
let audioControl;
if ($(elem).find('.video-audio.youtube-video-audio').length > 0) {
audioControl = $(elem).find('.video-audio.youtube-video-audio');
} else if ($(elem).closest('.video-container.youtube-video-container').find('.video-audio.youtube-video-audio').length > 0) {
audioControl = $(elem).closest('.video-container.youtube-video-container').find('.video-audio.youtube-video-audio');
}
// if audio control exist, add muted class
if ($(audioControl).length > 0) {
$(audioControl).addClass('muted');
}
}
},
unmute: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = YouTubeVideo.getPlayer(elem);
if (typeof player.unMute === 'function') {
player.unMute();
}
// get audio control
let audioControl;
if ($(elem).find('.video-audio.youtube-video-audio').length > 0) {
audioControl = $(elem).find('.video-audio.youtube-video-audio');
} else if ($(elem).closest('.video-container.youtube-video-container').find('.video-audio.youtube-video-audio').length > 0) {
audioControl = $(elem).closest('.video-container.youtube-video-container').find('.video-audio.youtube-video-audio');
}
// if audio control exist, remove muted class
if ($(audioControl).length > 0) {
$(audioControl).removeClass('muted');
}
},
setToWaitingList: function (elem, settings) {
YouTubeVideo.waitingList.push({elem, settings});
},
processAllVideos: function () {
for (let i = 0; i < YouTubeVideo.waitingList.length; i++) {
let elem = YouTubeVideo.waitingList[i]['elem'];
let settings = {};
if (YouTubeVideo.waitingList[i]['settings']) {
settings = YouTubeVideo.waitingList[i]['settings'];
}
YouTubeVideo.play(elem, settings);
YouTubeVideo.waitingList.splice(i, 1);
}
},
getPlayer: function (elem) {
if ($(elem).attr('id').length > 0) {
return YT.get($(elem).attr('id'));
}
return false;
},
waitingList: [],
callbacks: [],
storage: [],
}
window.onYouTubeIframeAPIReady = function() {
youtubeApiLoaded = true;
if (typeof YouTubeVideo.processAllVideos === 'function') {
YouTubeVideo.processAllVideos();
}
}
/* END youtube video function */
/* vimeo video function */
const VimeoVideo = {
init: function (elem, settings) {
// check vimeo api status
if (typeof vimeoApiLoaded === 'undefined' || vimeoApiLoaded === false) {
VimeoVideo.setToWaitingList(elem, settings);
return false;
}
// mark as initalized
$(elem).addClass('init');
// get player
let player = VimeoVideo.getPlayer(elem);
if (!player) {
return;
}
// player container
if (!player.element) {
return false;
}
let playerContainer = player.element;
// get required DOM elements for control
let playerControls;
// callbacks
// ended
if (typeof settings.callback.ended !== 'undefined' && typeof settings.callback.ended === 'function') {
player.on('ended', function(data) {
settings.callback.ended();
});
}
return elem;
},
togglePlayStatus: function (elem) {
// @todo: make logic for custom control if a client request it
if (!$(elem).hasClass('init')) {
return false;
}
},
play: function (elem, settings = {}) {
// init if not happend
if (!$(elem).hasClass('init')) {
elem = VimeoVideo.init(elem, settings);
}
// return false without elem
if (elem === false) {
return false;
}
// get video player
let player = VimeoVideo.getPlayer(elem);
if (!player) {
return;
}
// play video
player.getPaused().then(function(paused) {
if (paused) {
player.play();
}
});
},
pause: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
// get video player
let player = VimeoVideo.getPlayer(elem);
if (!player) {
return;
}
// pause video
player.getPaused().then(function(paused) {
if (!paused) {
player.pause();
}
});
},
stop: function (elem) {
if (!$(elem).hasClass('init')) {
return false;
}
},
toggleSound: function (elem) {
// @todo: make logic for custom control if a client request it
if (!$(elem).hasClass('init')) {
return false;
}
},
mute: function (elem) {
// @todo: make logic for custom control if a client request it
if (!$(elem).hasClass('init')) {
return false;
}
},
unmute: function (elem) {
// @todo: make logic for custom control if a client request it
if (!$(elem).hasClass('init')) {
return false;
}
},
setToWaitingList: function (elem, settings) {
VimeoVideo.waitingList.push({elem, settings});
},
processAllVideos: function () {
for (let i = 0; i < VimeoVideo.waitingList.length; i++) {
let elem = VimeoVideo.waitingList[i]['elem'];
let settings = {};
if (VimeoVideo.waitingList[i]['settings']) {
settings = VimeoVideo.waitingList[i]['settings'];
}
VimeoVideo.play(elem, settings);
VimeoVideo.waitingList.splice(i, 1);
}
},
getPlayer: function (elem, settings) {
if (typeof Vimeo === 'undefined') {
return false;
}
// get player dom elements
let playerContainer = $(elem).get(0);
if (!$(playerContainer).hasClass('vimeo-iframe')) {
if ($(playerContainer).find('.vimeo-iframe').length <= 0) {
return false;
}
playerContainer = $(elem).find('.vimeo-iframe').get(0);
}
// get player id
let dataVimeoId;
let dataVimeoUrl;
if ($(playerContainer).attr('data-vimeo-id') && $(playerContainer).attr('data-vimeo-id') !== '') {
dataVimeoId = $(playerContainer).attr('data-vimeo-id');
} else if ($(playerContainer).attr('src') && $(playerContainer).attr('src') !== '') {
dataVimeoUrl = $(playerContainer).attr('src').split('/');
if (typeof dataVimeoUrl === 'object') {
dataVimeoId = dataVimeoUrl.slice(-1)[0];
}
}
if (!dataVimeoId) {
console.warn('No vimeo video id', playerContainer);
return false;
}
// check if unique id is set
if (!$(playerContainer).attr('id')) {
console.warn('YouTube JavaScript API needs a unique id on the video DOM element');
return false;
}
let elemId = $(playerContainer).attr('id');
// default settings
let autoplay = false;
let controls = false;
let playsinline = true;
let loop = false;
let muted = true;
// override settings by attributes
if ($(playerContainer).attr('autoplay') && $(playerContainer).attr('autoplay') !== 'false') {
autoplay = true;
muted = true;
}
if ($(playerContainer).attr('controls')) {
controls = true;
}
if ($(playerContainer).attr('playsinline') && $(playerContainer).attr('playsinline') === 'false') {
playsinline = false;
}
if ($(playerContainer).attr('loop') && $(playerContainer).attr('loop') !== 'false') {
loop = true;
}
if ($(playerContainer).attr('muted') && $(playerContainer).attr('muted') !== 'false') {
muted = true;
}
// options
let options = {
autoplay: autoplay,
controls: controls,
loop: loop,
muted: muted,
};
let player = new Vimeo.Player(playerContainer, options);
return player;
},
waitingList: [],
callbacks: [],
storage: [],
}
/* END vimeo video function */
/* END video functions */
/* menu functions */
/* open menu */
function openMenu() {
$('#fullscreenmenu').show().attr({'aria-expanded': true});
$('#fullscreenmenu').find('a').first().focus();
setTimeout(function () {
$('html').addClass('scrollprevent');
$('body').addClass('menuopen').removeClass('menuclosed');
setTimeout(function () {
bLazy.revalidate();
}, 0);
menuToggleCallback();
}, 100);
// align sub navigation on first open
/*
if (!$('.mainnav').hasClass('init')) {
alignSubNavigation($('.mainnav'));
}
*/
}
/* END open menu */
/* close menu */
function closeMenu(anchor) {
$('html').removeClass('scrollprevent');
$('body').removeClass('menuopen').addClass('menuclosed');
setTimeout(function () {
$('body').removeClass('menuclosed');
$('#fullscreenmenu').hide().attr({'aria-expanded': false});
}, 400);
menuToggleCallback();
}
/* END close menu */
/* menu toggle function */
function menuToggleCallback() {
/*
setTimeout(function() {
if(typeof bLazy !== 'undefined') {
bLazy.revalidate();
}
}, 500);
*/
}
/* END menu toggle function */
/* END menu functions */
/* accordion */
/* init accordion */
const Accordion = {
init: function (box, openFirst) {
$('.accordion-item', box).each(function (i) {
if ($(this).parentsUntil(box).length < $(this).parentsUntil('.accordion-item').length) {
// init element
Accordion.initElem($(this));
}
});
// open first element
Accordion.openFirst(box, openFirst);
},
initElem: function (elem) {
// return if init
if ($(elem).hasClass('accordion-initialized')) {
return;
}
// get accordion obj
let headerObj = Accordion.getHeader(elem);
let contentObj = Accordion.getContent(elem);
// add event listener
$(headerObj).click(function () {
Accordion.toggleContent(elem, headerObj, contentObj);
});
// prevent click on anchor in header
$(headerObj).find('a:not(.accordion-toggle-anchor)').click(function(e) {
e.stopPropagation();
});
// close accordion
if (!$(elem).hasClass('open')) {
Accordion.close(elem, contentObj);
}
// element initialized
$(elem).addClass('accordion-initialized');
},
toggleContent: function (elem, headerObj, contentObj) {
// return if not init
if (!$(elem).hasClass('accordion-initialized')) {
return;
}
// check accordion content obj
if (contentObj === false || typeof contentObj === 'undefined') {
contentObj = Accordion.getContent(elem);
}
if ($(elem).hasClass('open') || !$(elem).hasClass('open') && $(contentObj).css('display') === 'block') {
Accordion.close(elem, contentObj, headerObj);
} else {
Accordion.open(elem, contentObj, headerObj);
}
},
openFirst: function (box, openFirst) {
$(box).each(function () {
if (($(this).hasClass('auto-open') || openFirst === true) && !$(this).find('.accordion.open').length) {
let firstElement = $(this).find('.accordion-item').first();
Accordion.open(firstElement);
}
});
},
open: function (elem, contentObj, headerObj) {
$(elem).addClass('arrow-up');
// check accordion obj
if (headerObj === false || typeof headerObj === 'undefined') {
headerObj = Accordion.getHeader(elem);
}
if (contentObj === false || typeof contentObj === 'undefined') {
contentObj = Accordion.getContent(elem);
}
// toggle anchor text
if ($(elem).attr('data-toggle-anchor') === 'true' && typeof $(elem).attr('data-toggle-anchor') !== 'undefined') {
Accordion.toggleAnchorText(elem, 'open', headerObj);
}
$(contentObj).stop().slideDown(function () {
$(elem).addClass('open');
});
// calc pricelist width
if (typeof adaptPricelist === "function") {
adaptPricelist(elem);
}
},
close: function (elem, contentObj, headerObj) {
$(elem).removeClass('arrow-up');
// check accordion content obj
if (headerObj === false || typeof headerObj === 'undefined') {
headerObj = Accordion.getHeader(elem);
}
if (contentObj === false || typeof contentObj === 'undefined') {
contentObj = Accordion.getContent(elem);
}
// toggle anchor text
if ($(elem).attr('data-toggle-anchor') === 'true' && typeof $(elem).attr('data-toggle-anchor') !== 'undefined') {
Accordion.toggleAnchorText(elem, 'close', headerObj);
}
$(contentObj).stop().slideUp(function () {
$(elem).removeClass('open');
});
},
toggleAnchorText: function (elem, status, headerObj) {
if (typeof headerObj === 'undefined') {
return;
}
let string = strings.hide[lang];
if (status === 'close') {
string = strings.show[lang];
}
if (!$(headerObj).find('.accordion-toggle-anchor').length) {
$(headerObj).append('<a href="javascript:;" class="small color-2 accordion-toggle-anchor"></a>');
}
$(headerObj).find('.accordion-toggle-anchor').text(string);
},
destroyElem: function (elem) {
Accordion.open(elem);
// check accordion content obj
let headerObj = Accordion.getHeader(elem);
// remove click event listener
$(headerObj).off('click');
if ($(headerObj).find('.accordion-toggle-anchor').length) {
$(headerObj).find('.accordion-toggle-anchor').remove();
}
// remove all unnecessary classes
$(elem).removeClass('accordion-initialized').removeClass('arrow-up').removeClass('open');
},
destroy: function (box) {
$('.accordion-item', box).each(function () {
Accordion.destroyElem($(this), box);
});
},
getHeader: function (elem) {
if ($('.accordionheader', elem).first().length) {
return $('.accordionheader', elem).first();
} else {
console.warn('Accordion header is missed by item', elem);
return;
}
},
getContent: function (elem) {
if ($('.accordioncontent', elem).first().length) {
return $('.accordioncontent', elem).first();
} else {
console.warn('Accordion content is missed by item', elem);
return;
}
},
}
/* END accordion */
/* custom dropdown */
const Dropdown = {
// init dropdown
init: function init(box, withStartValues) {
// set event listener for select dropdown value
$('.dropdown .dropdown-menu li a[data-value]', box).click(function(event) {
event.preventDefault();
Dropdown.onSelect(this);
});
// init dropdown with start values
if(withStartValues !== false) {
$('.dropdown', box).each(function() {
// check if input field is connected
if (typeof $(this).attr('data-passto') !== 'undefined') {
let inputName = $(this).attr('data-passto');
// check if input field exist
let elem = $(this).closest('form').find('input[name="' + inputName + '"]');
if(elem.length === 0) {
// if nothink found, search global
elem = $('input[name="' + inputName + '"]');
}
if($(elem).length > 0) {
// check type of input field
let inputType = $(elem).attr('type');
switch (inputType) {
case 'hidden':
default:
// check if value is set
if ($(elem).val()) {
// set start value
let inputValue = $(elem).val();
$('.dropdown-item a[data-value="' + inputValue + '"]', this).click();
}
break;
}
}
}
});
}
// set event listener for build dropdown
/*
$('.dropdown > button', box).on('click', function(event) {
event.stopImmediatePropagation(); // prevent to bubble event until body and close dropdown
if($(this).closest('.dropdown').hasClass('open') === true) {
Dropdown.close($(this).closest('.dropdown'));
} else {
Dropdown.open($(this).closest('.dropdown'));
}
});
*/
// set event listener for apply dropdown
/*
$('.dropdown a.apply', box).on('click', function(event) {
event.stopImmediatePropagation();
event.preventDefault();
Dropdown.close($(this).closest('.dropdown'));
});
*/
// set event listener for reset dropdown
/*
$('.dropdown a.reset', box).on('click', function(event) {
event.stopImmediatePropagation();
event.preventDefault();
// reset dropdowns
Dropdown.reset($(this).closest('.dropdown').find('.dropdown'));
// reset number inputs
NumberInput.reset($(this).closest('.dropdown'));
// reset coordinates with reseting location
if($(this).closest('.dropdown').hasClass('location')) {
if ($(this).closest('.dropdown').find('input[value="0"]:checked').length > 0) {
// disable coordinates
locationMapArea.disable($(this).closest('form'));
// unset map area
locationMapArea.unset($(this).closest('form'));
}
}
// reset custom checkboxes
$(this).closest('.dropdown').find('.customcheckbox.checked input[type="checkbox"]').prop('checked', false).trigger('change');
$(this).closest('.dropdown').find('.customcheckbox.checked input[type="radio"]').prop('checked', false).trigger('change');
// reset custom checkbox groups
$(this).closest('.dropdown').find('.customcheckboxgroup input[type="checkbox"]:checked').prop('checked', false).trigger('change');
$(this).closest('.dropdown').find('.customcheckboxgroup input[type="radio"]:checked').prop('checked', false).trigger('change');
// reset datepicker
if($(this).closest('.dropdown').find('.traveldates').length > 0) {
let parentDropdown = $(this).closest('.dropdown');
$('.traveldates, input[name="stay[from]"], input[name="stay[until]"], input[name="from"], input[name="until"]').val('');
$('input[name="enable-stay"]').val('').trigger('change');
$.each(datepicker, function(k, v) {
if($(parentDropdown).find('#'+k).length > 0) {
v.destroy();
build_datepicker('.traveldates', true, $(parentDropdown), false, true);
}
});
Dropdown.reset(parentDropdown);
// update guest dropdown -> allow person input
Dropdown.removeText($(this).closest('form').find('.customdropdown.guests'));
$(this).closest('form').find('.rooms').removeClass('show');
shortrequestDisableInputs();
$(this).closest('form').find('.roomsinfo').removeClass('hide');
$(this).closest('form').find('.customdropdown.guests').removeClass('overflow-auto');
// when reset date, also reset session (otherwise the reset will be ignored)
if($('#freeRoomsForm input[name="reset"]').length === 0) {
$('#freeRoomsForm').append('<input type="hidden" name="reset" value="1" />');
}
}
// reset pricerange
let resetPriceRegulator = false;
$(this).closest('.dropdown').find('#pricerange, #pricerangecloned').each(function() {
if($(this).attr('data-from') !== $(this).closest('form').find('input[name="pricerangestart"]').val() || $(this).attr('data-to') !== $(this).closest('form').find('input[name="pricerangeend"]').val()) {
resetPriceRegulator = true;
}
let elem = $(this).get(0);
elem.noUiSlider.set([$(this).attr('data-from'), $(this).attr('data-to')]);
});
// reset sort
let resetSort = false;
$(this).closest('.dropdown').find('input[name="sort"]').each(function() {
if($(this).val() !== parameterFromurl('../../../typo3conf/ext/gn_template/Resources/Public/JavaScript/sort')) {
resetSort = true;
}
});
// reset other range sliders
$(this).closest('.dropdown').find('.range, .timestamprange').each(function() {
let elem = $(this).get(0);
elem.noUiSlider.set([$(this).attr('data-from'), $(this).attr('data-to')]);
});
// reset simple text inputs
$(this).closest('.dropdown').find('input[type="text"]').val('').trigger('change');
// reset all additional rooms
let roomnumbers = $(this).closest('.dropdown').find('.rooms .room.show').length - 1;
for(let i = 0; i < roomnumbers; i++) {
$(this).closest('.dropdown').find('.rooms .removeroom').click();
}
// add class to guest on reset
if ($(this).closest('.dropdown').hasClass('guests') === true) {
$(this).closest('.dropdown').addClass('updateparentbutton');
}
dropDownValues = [];
Dropdown.removeText($(this).closest('.dropdown'));
Dropdown.setAutoSearch($(this).closest('.dropdown'), false);
if($(this).parents('#headercover').length > 0) {
// do nothing
} else if($('#freeRoomsForm').length > 0 && $('#freeRoomsForm').attr('data-preventreload') !== 'true' && $(this).closest('.dropdown.priceregulator').length === 0) { // third condition prevents loops
ReloadList();
} else if($(this).closest('form').length > 0 && $(this).closest('form').attr('data-preventreload') !== 'true' && $(this).closest('.dropdown.priceregulator').length === 0) {
$(this).closest('form').submit();
} else if(($(this).closest('.dropdown.priceregulator').length === 1 && $(this).closest('form').attr('data-preventreload') !== 'true') && (resetPriceRegulator === true || resetSort === true)) {
ReloadList();
}
Dropdown.close($(this).closest('.dropdown'), false);
});
*/
// set event listener for close dropdown when click outside
//$('body').off('click').on('click', Dropdown.onBodyClick);
$('.dropdown input[type="hidden"], .dropdown input[type="checkbox"], .dropdown input[type="radio"], .dropdown input[type="text"]', box).change(function() {
Dropdown.change($(this).closest('.dropdown'));
Dropdown.setAutoSearch($(this).closest('.dropdown'), true);
});
/*
$('form .dropdown.customdropdown').each(function() {
if($(this).parents('.dropdown').length > 0) {
return;
}
let dropdownTitle = $(this).find('.dropdown-toggle .default').html();
if ($(this).find('.dropdown-menu li:first-child .filtertitle').length) {
$(this).find('.dropdown-menu li:first-child .filtertitle').html(dropdownTitle);
} else {
$(this).find('.dropdown-menu li:first-child').prepend('<span class="filtertitle">'+dropdownTitle+'</span>');
}
});
*/
//Dropdown.resize($('.dropdown'), true);
},
// open dropdown
open: function open(elem) {
},
// callback when dropdown open
openCallback: function openCallback(elem) {
},
// close dropdown
close: function close(elem, applyValues) {
},
// callback when dropdown closed
closeCallback: function closeCallback(elem, applyValues) {
},
// callback if link in dropdown is clicked
onSelect: function onSelect(item) {
let parentElem = $(item).closest('.dropdown');
let listElem = $(parentElem).find('.dropdown-menu');
// get text to show
let optionText = $(item).text();
if($(item).attr('data-label') !== undefined) {
optionText = $(item).attr('data-label');
}
// set custom selected Text
if(typeof $(item).attr('data-value') !== 'undefined' && $(item).attr('data-value') === '') { // remove is data-value is empty
Dropdown.removeText(parentElem);
} else {
Dropdown.setText($(parentElem), optionText);
}
// get icon if exist
if($(item).attr('data-icon') !== undefined) {
let icon = $(item).attr('data-icon');
Dropdown.setIcon($(parentElem), icon);
}
// pass data to input fields
if($(parentElem).attr('data-passto') !== undefined && $(parentElem).find('input[name="'+$(parentElem).attr('data-passto')+'"]').length > 0) { // pass inside dropdown
$(parentElem).find('input[name="'+$(parentElem).attr('data-passto')+'"]').val($(item).attr('data-value')).trigger('change');
} else if($(parentElem).attr('data-passto') !== undefined && $(parentElem).closest('form').find('input[name="'+$(parentElem).attr('data-passto')+'"]').length > 0) { // pass inside form
$(parentElem).closest('form').find('input[name="'+$(parentElem).attr('data-passto')+'"]').val($(item).attr('data-value')).trigger('change');
} else if($(parentElem).attr('data-passto') !== undefined && $('input[name="'+$(parentElem).attr('data-passto')+'"]').length > 0) { // pass on all site
$('input[name="'+$(parentElem).attr('data-passto')+'"]').val($(item).attr('data-value')).trigger('change');
}
// mark selected
if ($(parentElem).hasClass('markselected') === true) {
if (!$(item).attr('selected')) {
$('.dropdown-item a', listElem).removeAttr('selected');
$(item).attr({'selected': true});
}
}
},
// callback to check if dropdown must be close on click
onBodyClick: function onBodyClick(e) {
},
// change button text
setText: function setText(elem, text) {
if($(elem).find('> .dropdown-toggle').length === 0) {
return false;
}
if($(elem).find('> .dropdown-toggle .selectpreviewvalue').length === 0) {
$('<span class="selectpreviewvalue"></span>').insertBefore($(elem).find('> .dropdown-toggle > span[class^="icon-"]'));
}
$(elem).addClass('selectpreview').find('> .dropdown-toggle .selectpreviewvalue').html(text);
},
removeText: function removeText(elem) {
$(elem).removeClass('selectpreview').find('> .dropdown-toggle .selectpreviewvalue').html('');
},
setIcon: function (elem, icon) {
if($(elem).find('> .dropdown-toggle').length === 0) {
return false;
}
$(elem).find('> .dropdown-toggle .icon').prop({'class': 'icon ' + icon});
},
removeIcon: function (elem, icon) {
$(elem).removeClass('icondropdown').find('> .dropdown-toggle .icon').prop({'class': 'icon'});
},
// set autosearch on close
setAutoSearch: function setAutoSearch(elem, value) {
},
// set manual change
setManualChanged: function setManualChanged(elem, value) {
},
// reset dropdown
reset: function reset(elem) { // elem could be an array
},
// update parent opening button
updateParentButton: function updateParentButton(elem) {
},
// resize event
resize: function resize(elem, firstCall) {
},
// change event
change: function change(elem) {
if ($('[data-passto="' + $(elem).attr('data-passto') + '"]').length > 1) {
Dropdown.setText($('[data-passto="' + $(elem).attr('data-passto') + '"]'), $(elem).find('input').val());
}
}
// track Dropdown
/*
track: function track(elem) {
let trackLabel = false;
if($(elem).hasClass('traveldatesdropdown') === true) {
trackLabel = 'datum';
}
else if($(elem).hasClass('guests') === true) {
trackLabel = 'wohneinheiten: ' + $(elem).find('.roomselect.room.show').length + ' - ';
$.each($(elem).find('.roomselect.room.show'), function(k, v) {
if(k !== 0) {
trackLabel += ' ~ ';
}
trackLabel += $(v).find('.inputnumber.adults input').val() + '/' + $(v).find('.inputnumber.kids input').val();
});
if($(elem).closest('form').find('input[name="petsallowed"]').val() === '1') {
_gaTrack('Hotelsuche', 'dropdown', 'haustiere erlaubt');
}
}
else if($(elem).hasClass('location') === true) {
let selectedLocations = $(elem).find('input[name="Location[]"]:checked');
if(selectedLocations) {
trackLabel = 'lage: ';
$.each(selectedLocations, function(k, v) {
if(k !== 0) {
trackLabel += '|';
}
if($(v).val() === '1') {
trackLabel += 'St. Christina';
} else if($(v).val() === '2') {
trackLabel += 'St. Ulrich';
} else if($(v).val() === '3') {
trackLabel += 'Wolkenstein';
}
});
}
}
else if($(elem).hasClass('priceregulator') === true) {
trackLabel = 'preis ' + $(elem).find('input[name="sort"]').val();
}
else if($(elem).hasClass('directbooking') === true) {
let bookable = $(elem).find('input[name="Bookable"]').prop('checked');
if(bookable) {
trackLabel = 'online buchbar: ja';
} else {
trackLabel = 'online buchbar: nein';
}
}
else if($(elem).attr('data-passto') === 'ResortType') {
let trackLabel = 'resorttype: ' + $(elem).closest('form').find('input[name="ResortType"]').val();
}
if(trackLabel !== false) {
_gaTrack('Hotelsuche', 'dropdown', trackLabel);
}
}
*/
};
/* custom dropdown */
/* tabs */
let preselectedTabItem;
function initTabs (elem, box) {
// check if tab was preselected in url
if(location.hash !== '' && location.hash.indexOf("!") < 0) {
let tabName = location.hash.replace("#", "");
let tabItem = $('.tab-item[data-tab="' + tabName + '"]');
if ($(tabItem).length > 0) {
preselectedTabItem = $(tabItem);
}
} else if (location.href !== '' && typeof getURLParameter(location.href, 'tab') !== 'undefined') {
let tabName = getURLParameter(location.href, 'tab');
let tabItem = $('.tab-item[data-tab="' + tabName + '"]');
if ($(tabItem).length > 0) {
preselectedTabItem = $(tabItem);
}
}
// preselect tabs
$(elem, box).each(function () {
if (typeof $(this).find(preselectedTabItem) !== 'undefined' && $(this).find(preselectedTabItem).length > 0) {
var preselectedItem = $(this).find(preselectedTabItem).first();
if (typeof preselectedItem !== 'undefined' && $(preselectedItem).length > 0) {
$(preselectedItem).addClass('active-tab');
var tabName = $(preselectedItem).attr('data-tab');
var tabNavAnchor = $('body').find('a[data-tab="' + tabName + '"]');
if ($(tabNavAnchor).closest('li').length && !$(tabNavAnchor).closest('li').hasClass('active') && !$(elem).closest('nav').hasClass('mainnav')) {
$(tabNavAnchor).closest('li').addClass('active');
}
}
} else if ($(this).find('.tabs-wrapper .tab-item.active-tab').length <= 0 && !$(this).hasClass('menutabs')) {
let firstItem = $(this).find('.tabs-wrapper .tab-item').first();
if (typeof firstItem !== 'undefined' && $(firstItem).length > 0) {
$(firstItem).addClass('active-tab');
let tabName = $(firstItem).attr('data-tab');
let tabNavAnchor = $('body').find('a[data-tab="' + tabName + '"]');
if ($(tabNavAnchor).closest('li').length && !$(tabNavAnchor).closest('li').hasClass('active') && !$(elem).closest('nav').hasClass('mainnav')) {
$(tabNavAnchor).closest('li').addClass('active');
}
}
}
});
$('a[data-tab]', box).click(function (e) {
e.preventDefault();
changeTab($(this));
changeTabCallback($(this).closest('.tabs-container'));
scroll();
});
/*
$(elem, box).on('click', 'a[data-tab]', function(e) {
e.preventDefault();
changeTab($(this));
changeTabCallback($(this).closest('.tabs-container'));
scroll();
});
*/
changeTabCallback($(elem, box));
$(elem).find('.tabs-nav .add', box).click(function() {
addTabLabel($(this).closest('.tabs-container'));
});
$(elem, box).on('click', '.tabs-nav .remove', function() {
removeTabLabel($(this).closest('li'));
});
addRemoveLabelCallback($(this).closest('.tabs-container'));
/*
$(elem).find('.tabs-nav .remove', box).click(function() {
removeTabLabel($(this).closest('li'));
});
if (tabsInitialized === false) {
}
tabsInitialized = true;
*/
}
function changeTab (elem) {
if (typeof $(elem).attr('data-tab') !== 'undefined') {
let tabName = $(elem).attr('data-tab');
let tab = $('.tab-item[data-tab="' + tabName + '"]');
if ($(elem).closest('li').length && !$(elem).closest('li').hasClass('active') && !$(elem).closest('nav').hasClass('mainnav')) {
if ($(elem).closest('ul').length) {
$(elem).closest('ul').find('li.active').removeClass('active');
}
$(elem).parent('li').addClass('active');
}
let parentWrapper = $(tab).closest('.tabs-wrapper');
if ($(tab).length > 0 && !$(tab).hasClass('active-tab')) {
if ($(parentWrapper).length > 0) {
$('.tab-item', parentWrapper).removeClass('active-tab');
}
$(tab).addClass('active-tab');
} else if ($(tab).length <= 0) {
console.warn("Tab \'" + tabName + "\' doesn't exist!");
return false;
}
} else {
return false;
}
bLazy.revalidate();
}
function changeTabCallback(tabsContainer, submitform) {
if(typeof submitform === 'undefined') {
submitform = false;
}
let currentTab = $(tabsContainer).find('.tabs-nav ul li').index($(tabsContainer).find('.tabs-nav ul li.active'));
$(tabsContainer).attr('data-current-tab', currentTab + 1);
//updateTotalCount();
if(submitform) {
let tabName = $(tabsContainer).find('.tabs-nav ul li.active a[data-tab]').attr('data-tab');
if(tabName && $('[data-tab="'+tabName+'"]').find('form').length > 0) {
$('[data-tab="'+tabName+'"]').find('form').submit();
}
}
if(typeof bLazy !== 'undefined') {
bLazy.revalidate();
}
changeTabOrValueCallback(tabsContainer);
}
function changeTabOrValueCallback(tabsContainer) {
let tabId = $(tabsContainer).find('.tabs-nav ul li.active a[data-tab]').attr('data-tab');
let tabForm = $('.traveldata-section .tabs-container .tab-item[data-tab="'+tabId+'"]');
let tabContent = $('.accommodationsearch.tabs-container .tab-item[data-tab="'+tabId+'"]');
if($(tabForm).find('input[name*="[arrival]"]').val() !== '' && $(tabForm).find('input[name*="[departure]"]').val() !== '') {
$(tabContent).addClass('withavailability');
$('.accordion.pricerangewrapper').removeClass('d-none');
} else {
$(tabContent).removeClass('withavailability');
$('.accordion.pricerangewrapper').addClass('d-none');
}
}
function removeTabLabel(elem) {
let tabsContainer = $(elem).closest('.tabs-container');
if($(tabsContainer).find('.tabs-nav nav ul li').length < 2) {
return;
}
let tabId = $(elem).find('[data-tab]').attr('data-tab');
$(elem).remove();
$(tabsContainer).find('.tab-item[data-tab="'+tabId+'"]').remove();
if($(tabsContainer).find('.tabs-nav nav ul li.active').length === 0) {
$(tabsContainer).find('.tabs-nav nav ul li:last-child a[data-tab]').click();
}
addRemoveLabelCallback(tabsContainer);
changeTabCallback(tabsContainer, true);
}
function addTabLabel(containerElem) {
let newTabNumber = $(containerElem).find('.tabs-nav nav ul li').length + 1;
// label
let htmlLabel = $(containerElem).find('#accosearchlabeldraft').html();
htmlLabel = htmlLabel.replaceAll('data-tab="accommodation"', 'data-tab="accommodation'+newTabNumber+'"');
htmlLabel = htmlLabel.replaceAll('<span class="num"></span>', '<span class="num">'+newTabNumber+'</span>');
$(htmlLabel).appendTo($(containerElem).find('.tabs-nav nav ul'));
// form
let draft = '';
try {
draft = JSON.parse($('.accoSearchFormDraft').html());
draft = draft.html;
} catch (e) {}
let htmlForm = '<div class="tab-item" data-tab="accommodation' + newTabNumber + '">' + draft + '</div>';
htmlForm = htmlForm.replaceAll('[{x}]', '['+(newTabNumber - 1)+']');
htmlForm = htmlForm.replaceAll('{x}', (newTabNumber - 1));
htmlForm = htmlForm.replaceAll('{y}', newTabNumber);
let tabBefore = $(containerElem).find('.tabs-wrapper .tab-item').last();
$(htmlForm).appendTo($(containerElem).find('.tabs-wrapper'));
let newTab = $(containerElem).find('.tabs-wrapper .tab-item').last();
const regex = /\[[0-9]+\]/;
$(tabBefore).find('input, select').each(function() {
let name = $(this).attr('name');
if(typeof name === 'undefined') {
return;
}
let value = $(this).val();
name = name.replace(regex, '['+(newTabNumber - 1)+']');
$(newTab).find('[name="'+name+'"]').val(value);
});
load($('[data-tab="accommodation'+newTabNumber+'"]'));
searchload($('[data-tab="accommodation'+newTabNumber+'"]'));
$(containerElem).find('.tabs-nav nav ul a[data-tab]').click();
addRemoveLabelCallback(containerElem);
changeTabCallback(containerElem, true);
}
function addRemoveLabelCallback(containerElem) {
if($(containerElem).find('.tabs-nav ul:not(#accosearchlabeldraft) li').length >= parseInt($(containerElem).attr('data-max-tabs'))) {
$(containerElem).find('.add').hide();
} else {
$(containerElem).find('.add').show();
}
let index = 0;
$(containerElem).find('.tabs-wrapper .tab-item').each(function() {
$(this).find('input, select').each(function() {
let name = $(this).attr('name');
if(name) {
$(this).attr('name', name.replaceAll(/stay\[([0-9])+\]/g, 'stay['+index+']'));
}
});
let attributes = ['data-passto', 'data-callback-arrival', 'data-callback-departure', 'data-id-arrival', 'data-id-departure', 'id', 'for'];
attributes.forEach(attribute => {
$(this).find('['+attribute+']').each(function() {
let value = $(this).attr(attribute);
if(value) {
value = value.replaceAll(/stay\[([0-9])+\]/g, 'stay['+index+']');
value = value.replaceAll(/\[([0-9])+\]/g, '['+index+']');
value = value.replaceAll(/\\\[([0-9])+\\\]/g, '\\['+index+'\\]');
$(this).attr(attribute, value);
}
});
});
/*
$(this).find('[data-passto], [data-callback-arrival], [data-callback-departure], [data-id-arrival], [data-id-departure]').each(function() {
let passTo = $(this).attr('data-passto');
let callbackArrival = $(this).attr('data-callback-arrival');
let callbackDeparture = $(this).attr('data-callback-departure');
let arrival = $(this).attr('data-id-arrival');
let departure = $(this).attr('data-id-departure');
if(passTo) {
$(this).attr('data-passto', passTo.replaceAll(/stay\[([0-9])+\]/g, 'stay['+index+']'));
}
if(callbackArrival) {
$(this).attr('data-callback-arrival', callbackArrival.replaceAll(/\[([0-9])+\]/g, '['+index+']'));
}
if(callbackDeparture) {
$(this).attr('data-callback-departure', callbackDeparture.replaceAll(/\[([0-9])+\]/g, '['+index+']'));
}
if(arrival) {
$(this).attr('data-id-arrival', arrival.replaceAll(/\[([0-9])+\]/g, '['+index+']'));
}
if(departure) {
$(this).attr('data-id-departure', departure.replaceAll(/\[([0-9])+\]/g, '['+index+']'));
}
});
*/
index++;
});
// todo: finish, this is not working preperly. Temporary solved with CSS
/*
index = 0;
$(containerElem).find('.tabs-nav ul li a[data-tab]').each(function() {
let tabName = $(this).attr('data-tab');
if(tabName.indexOf('accommodation') === 0 && $(containerElem).find('.tabs-wrapper .tab-item[data-tab="' + tabName + '"]').length > 0) {
// $('.tabs-wrapper .tab-item[data-tab="' + 'accommodation' + (index+1) + '"]').attr('data-tab', 'accommodationX');
$(this).attr('data-tab', 'accommodation' + (index+1));
$('.tabs-wrapper .tab-item[data-tab="' + tabName + '"]').attr('data-tab', 'accommodation' + (index+1));
}
index++;
});
*/
}
/* @todo: write function if needed */
function recalculateTabText() {
}
/* END tabs */
/* filter */
const ElementFilter = function (elem, config = {}) {
// set elem
this.elem = elem;
this.container = config.container ? $(config.container) : $('body');
this.filterItems = $(this.elem).find('[data-filter]').each(function () {
const filterItem = $(this);
filterItem.data('filterItem', true);
const resultItems = $(container).find('[data-filter]').filter(function () {
const resultItem = $(this);
return !resultItem.data('filterItem') && resultItem.data('filter').toString().split(',').includes(filterItem.data('filter').toString());
});
filterItem.data('resultItems', resultItems).attr('data-count-result-items', resultItems.length);
return filterItem;
}).get();
this.children = this.container.find('[data-filter]').filter(function () {
return !$(this).data('filterItem');
});
this.init = function () {
const children = this.children;
$(this.filterItems).click(function (e) {
e.preventDefault();
if (typeof children !== 'undefined') {
$(children).fadeOut(500);
}
if (typeof $(this).data('resultItems') !== 'undefined' && $(this).data('resultItems').length > 0) {
let resultItems = $(this).data('resultItems');
setTimeout(function () {
$(resultItems).fadeIn();
// lazyload is enabled
if(typeof(bLazy) != 'undefined') {
bLazy.revalidate();
}
}, 500);
}
});
};
this.init();
}
/* END filter */
/* custom checkbox */
/* custom checkboxgroup */
function initCheckbox(elem) {
if ($(elem).prop('checked')) {
$(elem).parent('label').addClass('checked');
}
}
/* END custom checkboxgroup */
/* callback for custom checkboxes */
function customCheckboxCallback(elem) {
}
/* END callback for custom checkboxes */
/* END custom checkbox */
/* custom collapse */
function initCustomCollapse(elem, box) {
let collapseBtn = '<a class="collapse-btn arrow arrow-right" href="javascript:;"><span class="label">' + strings.readmore[lang] + '</span></a>';
$(elem, box).each(function() {
let collapseElem = $(this);
$(collapseBtn).insertAfter($(this)).click(function () {
if (!$(collapseElem).hasClass('show')) {
let childrenHeights = $(collapseElem).children().height();
$(collapseElem).addClass('show');
$(this).removeClass('arrow-right').addClass('arrow-left').find('.label').text(strings.readless[lang]);
scrollToElement($(collapseElem).closest('.article'));
} else {
$(collapseElem).removeClass('show');
$(this).removeClass('arrow-left').addClass('arrow-right').find('.label').text(strings.readmore[lang]);
}
});
});
}
/* END custom collapse */
/* range slider */
/* init range slider */
function initRangeSlider(box) {
if(typeof noUiSlider != 'undefined') {
$('.rangeslider', box).each(function() {
/* general values */
let rangeslider = $(this).get(0);
let type = $(rangeslider).attr('data-type');
let from = parseInt($(rangeslider).attr('data-from'));
let to = parseInt($(rangeslider).attr('data-to'));
let fieldFrom = $(rangeslider).attr('data-from-field');
let fieldTo = $(rangeslider).attr('data-to-field');
let valueFrom = 0;
if ($(fieldFrom).length && $(fieldFrom).val()) {
valueFrom = parseInt($(fieldFrom).val());
}
let valueTo = 0;
if ($(fieldTo).length && $(fieldTo).val()) {
valueTo = parseInt($(fieldTo).val());
}
let originFieldFrom = $(rangeslider).attr('data-from-origin-field');
let originFieldTo = $(rangeslider).attr('data-to-origin-field');
let originValueFrom = 0;
if ($(originFieldFrom).length && $(originFieldFrom).val()) {
originValueFrom = parseInt($(originFieldFrom).val());
}
let originValueTo = 0;
if ($(originFieldTo).length && $(originFieldTo).val()) {
originValueTo = parseInt($(originFieldTo).val());
}
if(typeof(valueFrom) == 'undefined' || valueFrom == '' || isNaN(valueFrom) == true) {
valueFrom = from;
} else if (from < valueFrom) {
$(rangeslider).attr('data-from', valueFrom);
$(originFieldFrom).val(valueFrom);
}
if(typeof(valueTo) == 'undefined' || valueTo == '' || isNaN(valueTo) == true) {
valueTo = to;
} else if(to < valueTo) {
$(rangeslider).attr('data-to', valueTo);
$(originFieldTo).val(valueTo);
}
/*
if (from > originValueFrom) {
from = originValueFrom;
}
if (to < originValueTo) {
to = originValueTo;
}
*/
/*
nouislider config
can be different by var type
*/
const noUISliderConf = {
start: [valueFrom, valueTo],
connect: true,
step: 1,
range: {
'min': from,
'max': to
}
};
/* nouislider init */
noUiSlider.create(rangeslider, noUISliderConf);
/* nouislider events */
rangeslider.noUiSlider.on('update', function(values) {
let prependString = '';
let appendString = '';
if (type == "price") {
prependString = '&euro;&nbsp;';
}
$(rangeslider).parent().find('.rangestart').html(prependString + parseInt(values[0]) + appendString);
$(rangeslider).parent().find('.rangeend').html(prependString + parseInt(values[1]) + appendString);
$(fieldFrom).val(parseInt(values[0]));
$(fieldTo).val(parseInt(values[1]));
});
rangeslider.noUiSlider.on('change', function(values) {
});
rangeslider.noUiSlider.on('set', function() {
let fieldFrom = $(rangeslider).attr('data-from-field');
let fieldTo = $(rangeslider).attr('data-to-field');
if($(fieldFrom).length > 0) {
$(fieldFrom).trigger('change');
} else if($(fieldTo).length > 0) {
$(fieldTo).trigger('change');
}
});
rangeslider.noUiSlider.on('start', function(){
});
rangeslider.noUiSlider.on('end', function() {
});
});
}
}
/* update range slider */
function updateRangeSlider(selector, min, max) {
$(selector).each(function() {
let rangeslider = $(this).get(0);
rangeslider.noUiSlider.set([min, max]);
});
}
/* END init range slider */
/* END range slider */
/* scroll to element function */
function scrollToElement(elem, speed, referenceContainer) {
if($(elem).length === 0) {
return;
}
if(typeof speed === 'undefined' || isNaN(parseInt(speed)) === true ) {
speed = 1000;
}
let offset = $(elem).offset().top - scrollOffset;
if (!referenceContainer) {
referenceContainer = $('html, body');
} else {
offset = $(elem).position().top + $(referenceContainer).scrollTop();
}
$(referenceContainer).stop().animate({scrollTop: offset}, speed);
}
/* END scroll to element function */
/* in array function */
function inArray(item, arr) {
for (p = 0; p < arr.length; p += 1) {
if(item === arr[p]) {
return true;
}
}
return false;
}
/* END in array function */
/* pricelist functions */
/* calc scrollable pricelist item width
* with controls and everything
*/
const Pricelist = {
init: function (elem, box) {
$(elem, box).each(function() {
$(this).find('.pricelist-scrollitem').wrapAll('<div class="pricelist-stage"></div>');
let procentproitem = 100 / pricelistitems[breakpoint];
$(this).find('> .pricelist-stage').width($(this).find('.pricelist-scrollitem').length * ($(this).width() / 100 * procentproitem));
$(this).find('.pricelist-scrollitem').css('width', $(this).width() / 100 * procentproitem);
$('.pricelist').attr('data-itemwidth', $(this).width() / 100 * procentproitem);
});
},
nextClick: function (elem, box) {
$(elem, box).click(function() {
if(typeof($(this).parents('.pricelist').attr('data-formwidget')) == 'undefined') {
$(this).parents('.pricelist').attr('data-formwidget', 0);
}
let availableoffset = $(this).parents('.pricelist').find('.pricelist-scrollable').first().find('.pricelist-scrollitem').length - pricelistitems[breakpoint];
// check if next column exists
if((parseInt($(this).parents('.pricelist').attr('data-formwidget')) + 1) <= availableoffset) {
$(this).parents('.pricelist').attr('data-formwidget', parseInt($(this).parents('.pricelist').attr('data-formwidget')) + 1);
let prevButton = $(this).parents('.pricelist').find('.pricelist-prev');
if (prevButton && $(prevButton).hasClass('disabled')) {
$(prevButton).removeClass('disabled');
}
} else if (!$(this).hasClass('disabled')) {
$(this).addClass('disabled');
}
$(this).parents('.pricelist').find('.pricelist-scrollable .pricelist-stage').css('left', '-' + parseInt($(this).parents('.pricelist').attr('data-formwidget')) * parseFloat($(this).parents('.pricelist').attr('data-itemwidth')) + 'px');
// update smartphone dropdown
$(this).parents('.pricelist').find(".dateselect").prop("selectedIndex", parseInt($(this).parents('.pricelist').attr('data-formwidget')));
if (typeof adaptPricelist !== 'undefined') {
adaptPricelist();
}
});
},
prevClick: function (elem, box) {
$(elem, box).click(function() {
if(typeof($(this).parents('.pricelist').attr('data-formwidget')) == 'undefined') {
$(this).parents('.pricelist').attr('data-formwidget', 0);
}
// check if prev column exists
if((parseInt($(this).parents('.pricelist').attr('data-formwidget')) - 1) >= 0) {
$(this).parents('.pricelist').attr('data-formwidget', parseInt($(this).parents('.pricelist').attr('data-formwidget')) - 1);
let nextButton = $(this).parents('.pricelist').find('.pricelist-next');
if (nextButton && $(nextButton).hasClass('disabled')) {
$(nextButton).removeClass('disabled');
}
} else if (!$(this).hasClass('disabled')) {
$(this).addClass('disabled');
}
// change slide position
$(this).parents('.pricelist').find('.pricelist-scrollable .pricelist-stage').css('left', '-' + parseInt($(this).parents('.pricelist').attr('data-formwidget')) * parseFloat($(this).parents('.pricelist').attr('data-itemwidth')) + 'px');
// update smartphone dropdown
$(this).parents('.pricelist').find(".dateselect").prop("selectedIndex", parseInt($(this).parents('.pricelist').attr('data-formwidget')));
adaptPricelist();
});
},
onDateChange: function (elem, box) {
$(elem, box).change(function() {
let availableoffset = $(this).parents('.pricelist').find('.pricelist-scrollable').first().find('.pricelist-scrollitem').length - pricelistitems[breakpoint];
let selectedIndex = $(this).prop("selectedIndex");
if(selectedIndex > availableoffset) {
selectedIndex = availableoffset;
}
// disable prev next button
let prevButton = $(this).parents('.pricelist').find('.pricelist-prev');
let nextButton = $(this).parents('.pricelist').find('.pricelist-next');
if (prevButton && nextButton) {
$(prevButton).removeClass('disabled');
$(nextButton).removeClass('disabled');
if (selectedIndex == 0) {
$(prevButton).addClass('disabled');
} else if (selectedIndex == availableoffset) {
$(nextButton).addClass('disabled');
}
}
if(selectedIndex >= 0 && $(this).parents('.pricelist').find(".dateselect").prop("selectedIndex") != parseInt($(this).parents('.pricelist').attr('data-formwidget'))) { // check if prev column exists
$(this).parents('.pricelist').attr('data-formwidget', selectedIndex);
$(this).parents('.pricelist').find('.pricelist-scrollable .pricelist-stage').css('left', '-' + parseInt($(this).parents('.pricelist').attr('data-formwidget')) * parseFloat($(this).parents('.pricelist').attr('data-itemwidth')) + 'px'); // change slide position
}
});
}
};
/* END calc scrollable pricelist item width */
/* adapt pricelist */
function adaptPricelist(box) {
$('.pricelist', box).each(function() {
let pricelist = $(this);
$(this).find('.pricelist-scrollable').each(function() {
let procentproitem = 100 / pricelistitems[breakpoint];
// $(this).width() round problem
$(this).find('> .pricelist-stage').width($(this).find('.pricelist-scrollitem').length * ($(this).width() / 100 * procentproitem));
// $(this).width() round problem
$(this).find('.pricelist-scrollitem, .pricelist-item').css('width', $(this).width() / 100 * procentproitem);
// $(this).width() round problem
$(pricelist).attr('data-itemwidth', $(this).width() / 100 * procentproitem);
let availableoffset = $(pricelist).find('.pricelist-scrollable').first().find('.pricelist-scrollitem').length - pricelistitems[breakpoint];
if((parseInt($(pricelist).attr('data-formwidget'))) > availableoffset) {
$(pricelist).attr('data-formwidget', availableoffset);
$(pricelist).find(".dateselect").prop("selectedIndex", parseInt($(pricelist).attr('data-formwidget')));
}
$(pricelist).find('.pricelist-scrollable .pricelist-stage').css('left', '-' + parseInt($(pricelist).attr('data-formwidget')) * parseFloat($(pricelist).attr('data-itemwidth')) + 'px');
});
});
}
/* END adapt pricelist */
/* mark room columns */
function markRoomTable() {
let url = location.href;
if(getURLParameter(url, 'room') == null) {
return;
}
let allTables = $('.contentcontainer .table');
$(allTables).each(function() {
$(this).find('tr').first().addClass('firstrow');
});
$(allTables).each(function() {
let mapping = [];
let i = 0;
let room = 1;
$(this).find('tr').first().find('> td, > th').each(function() {
if(typeof $(this).attr('colspan') !== 'undefined') {
for(let a = 0; a < parseInt($(this).attr('colspan')); a++) {
mapping[i] = 'room' + room;
$(this).attr('data-room', 'room' + room);
i++;
}
} else {
mapping[i] = 'room' + room;
$(this).attr('data-room', 'room' + room);
i++;
}
room++;
});
let first = true;
$(this).find('tr').each(function() {
if(first === true) {
first = false;
return;
}
$(this).find('th, td').each(function(index, value) {
$(this).attr('data-room', mapping[index]);
});
});
});
if($(allTables).find('tr.firstrow th, tr.firstrow td').length > 0) {
let room = $(allTables).find('tr.firstrow th, tr.firstrow td').get(getURLParameter(url, 'room') - 1);
if(room !== 'undefined') {
$('.contentcontainer .table').find('td[data-room="'+$(room).attr('data-room')+'"], th[data-room="'+$(room).attr('data-room')+'"]').addClass('marked');
}
}
}
/* END mark room columns */
/* END pricelist functions */
/* map functions */
/* osm functions (used for muse.holiday) */
let openStreetMap = function() {
this.tileServer = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
this.mapBoxTileServer = 'https://api.mapbox.com/styles/v1/gardenanet/clhrice9z01t601qt3fkb2j9z/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiZ2FyZGVuYW5ldCIsImEiOiJjbGhyaHd2aWEwcjl3M2tvOHg5dDhzdTBsIn0.ejFrfE9Q2KJW9EoGP4qZ9Q';
this.iconFolder = '/fileadmin/template/img/icons/';
this.options = {
defaultPosition: {
lat: 46.57392180166375,
lng: 11.647296552330316,
},
scrollWheelZoom: false,
scrollWheelZoomOnFocus: true,
zoomControl: true,
zoom: 14,
};
this.initMarkerMap = function(elem, box) {
let elements = $(elem, box).get();
elements.forEach((mapElem) => {
if (typeof $(mapElem).attr('data-lat') === 'undefined' || typeof $(mapElem).attr('data-lng') === 'undefined' || typeof $(mapElem).prop('id') === 'undefined') {
return false;
}
let lat = $(mapElem).attr('data-lat');
let lng = $(mapElem).attr('data-lng');
let title = $(mapElem).attr('data-title') ? $(mapElem).attr('data-title') : $(mapElem).attr('title');
let content = $(mapElem).attr('data-content') ? $(mapElem).attr('data-content') : '';
let mapID = $(mapElem).prop('id');
let markers = [
{
lat: lat,
lng: lng,
title: title,
content: content,
}
];
this.initMap(mapID, lat, lng, markers);
});
};
this.initMap = function(mapID, lat, lng, markers) {
if($('#'+mapID).length === 0 || $('#'+mapID).hasClass('loaded') === true) {
return;
}
if(typeof lat === 'undefined' || typeof lng === 'undefined') {
lat = this.options.defaultPosition.lat;
lng = this.options.defaultPosition.lng;
}
if(typeof markers === 'undefined') {
markers = [];
}
let osmap = L.map(mapID, {
scrollWheelZoom: this.options.scrollWheelZoom,
zoomControl: this.options.zoomControl
}).setView([lat, lng], this.options.zoom);
// define layer
/*let layer = {
default: L.tileLayer(this.tileServer, {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}),
stadiaAlidadeSmooth: L.tileLayer('https://tiles.stadiamaps.com/data/satellite/{z}/{x}/{y}.jpg', {
maxZoom: 20,
attribution: '&copy; <a href="https://stadiamaps.com/">Stadia Maps</a>, &copy; <a href="https://openmaptiles.org/">OpenMapTiles</a> &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
}),
}
layer.stadiaAlidadeSmooth.addTo(osmap);*/
// load mapBox, style created with mapBox studio <https://studio.mapbox.com/>
L.tileLayer(this.mapBoxTileServer, {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(osmap);
// define icon
let markerIcon = L.icon({
iconUrl: this.iconFolder + 'marker.png',
iconSize: [40, 53],
iconAnchor: [20, 53],
popupAnchor: [0, -53]
});
// set markers
markers.forEach((marker) => {
let tmpMarker = L.marker([marker.lat, marker.lng], {icon: markerIcon}).addTo(osmap);
// set popup
let routePlannerUrl = 'https://www.google.it/maps/dir/'+marker.lat+'%2C'+marker.lng;
let googleMapsLocation = 'https://www.google.com/maps/place/'+marker.lat+','+marker.lng;
let routePlanner = '<br><a href="' + googleMapsLocation + '" target="_blank">' + strings.routeplanner[lang] + '</a>';
// set popups
tmpMarker.bindPopup('<div class="osmtitle">'+marker.title+'</div>' +
'<div class="osmdata">' +
'	<p>'+marker.content+' ' + routePlanner + '</p>' +
'</div>');
tmpMarker.openPopup();
});
// enable scroll wheel zoom
if(this.options.scrollWheelZoomOnFocus) {
osmap.once('focus', function () {
osmap.scrollWheelZoom.enable();
});
}
$('#'+mapID).addClass('loaded');
};
};
/* END osm functions */
/* END map functions */
/* check passive support */
function passiveSupport() {
let supportsPassive = false;
try {
let opts = Object.defineProperty({}, 'passive', {
get: function() {
supportsPassive = true;
}
});
window.addEventListener("testPassive", null, opts);
window.removeEventListener("testPassive", null, opts);
} catch (e) {}
return supportsPassive;
}
/* END check passive support */
/* IE support
* @todo: remove because of legacy
*/
/* check if is IE */
function isIE() {
const ua = window.navigator.userAgent;
const isIE = /MSIE|Trident/.test(ua);
if (isIE) {
$('body').addClass('IEsupport');
return true;
} else {
return false;
}
}
/* END IE support */
/* recalc scroll height */
function recalcScrollHeight() {
scrollOffset = 50;
$('[data-formwidget="offset"]').each(function() {
scrollOffset += $(this).outerHeight();
});
}
/* END recalc scroll height */
/* read url parameter */
function getURLParameter(url, name) {
return (RegExp(name + '=' + '(.+?)(&|$)').exec(url)||[,null])[1];
}
/* END read url parameter */
/* Formatter */
var Formatter = {
formatPrice: function(amount) {
let euroConverter = new Intl.NumberFormat('de-DE', {
style: 'currency',
currency: 'EUR',
});
amount = euroConverter.format(amount);
return amount;
},
// date = 'Y-m-d' or something compatible with new Date();
formatDate: function(date) {
date  = new Date(date);
return date.toLocaleDateString('de-DE', {
day: '2-digit',
month: '2-digit',
year: 'numeric',
timeZone: 'UTC',
});
/*date = new Date(date);
return addLeadingZero(date.getDay()) + '.' + addLeadingZero(date.getMonth() + 1) + '.' + date.getFullYear();*/
},
daysBetweenDates: function(date1, date2) {
date1 = new Date(date1);
date2 = new Date(date2);
date1 = date1.getTime() / 1000;
date2 = date2.getTime() / 1000;
let days = (date2 - date1) / 86400;
days = parseInt(days);
if(days < 0) {
days = 0;
}
return days;
},
/*addLeadingZero: function(number) {
number = parseInt(number);
if(number < 9) {
number = '0'+number;
}
return number+'';
},*/
};
/* END Formatter */
/* reorder function */
function reorderElements(container) {
if ($(container).hasClass(breakpoint)) {
return false;
}
if (typeof $(container).data('breakpoint') !== 'undefined' && $(container).data('breakpoint') !== breakpoint) {
$(container).removeClass($(container).data('breakpoint'));
}
$(container).data('breakpoint', breakpoint).addClass(breakpoint);
var elements = $(container).children().removeClass('active').detach();
elements.sort(function(a, b) {
var orderA = getOrderValue(a);
var orderB = getOrderValue(b);
return orderA - orderB;
});
$(container).append(elements);
scroll();
}
function getOrderValue(element) {
var order = parseInt($(element).data('order-' + breakpoint), 10);
if (!isNaN(order)) {
return order;
} else {
// If the specific viewport size order is not available,
// find the next smaller breakpoint and use that order value
let orderBreakpoints = breakpoints.slice().reverse(); // Create a copy and reverse the array
for (var i = 0; i < orderBreakpoints.length; i++) {
var orderBreakpoint = orderBreakpoints[i];
order = parseInt($(element).data('order-' + orderBreakpoint), 10);
if (!isNaN(order)) {
return order;
}
}
// If no suitable breakpoint-specific order value is found, fallback to data-order attribute
return parseInt($(element).data('order'), 10) || 0; // Fallback to 0 if data-order is not set
}
}
/* END reorder function */
/* prepend zero */
function prependZero(number) {
return number < 10 ? '0' + number : number;
}
/* END prepend zero */
/* article functions */
/* space after articles */
const ArticleSpace = function(elem, type) {
// set elem
this.elem = elem;
this.type = type;
this.container = $(this.elem).closest('.fullscreen');
this.containerPrev = $(this.container).prev('.fullscreen');
this.containerNext = $(this.container).next('.fullscreen');
if (typeof $(this.containerNext).data('origin-padding-top') === 'undefined') {
$(this.containerNext).data({'origin-padding-top': parseInt($(this.containerNext).css('padding-top'))})
}
this.containerNextSpaceBefore = $(this.containerNext).data('origin-padding-top');
this.spaceAfter = 0;
this.spaceBefore = 0;
switch (this.type) {
case 'articlestandard':
if (!$(this.elem).find('.articledata.media').length > 0) {
return false;
}
let mediaHeight = $(this.elem).find('.articledata.media').outerHeight();
if (!$(this.elem).find('.articledata.text').length > 0) {
return false
}
let textHeight = $(this.elem).find('.articledata.text').outerHeight();
this.spaceAfter = mediaHeight - textHeight;
if (this.spaceAfter <= 0) {
this.spaceAfter = 0;
}
this.spaceBefore = this.spaceAfter;
$(this.elem).css({'margin-bottom': this.spaceAfter * -1});
$(this.container).css({'z-index': 1});
// @todo: margin top doesnt work because of bg color
$(this.containerNext).addClass('space-before-extra').css({'padding-top': parseInt(this.containerNextSpaceBefore + this.spaceBefore)});
break;
case 'articleteaser':
case 'articlegallery':
// @todo: not so intuitive for content-management
$(this.containerPrev).addClass('space-after-extra');break}}init();
