diff --git a/build/grid-accordion.css b/build/grid-accordion.css index 602e26f..b9060cd 100644 --- a/build/grid-accordion.css +++ b/build/grid-accordion.css @@ -1 +1 @@ -.grid-accordion{margin-left:auto;margin-right:auto;position:relative}.grid-accordion *{-webkit-tap-highlight-color:transparent}.ga-mask{height:100%;overflow:hidden;width:100%}.ga-mask,.ga-panels{position:absolute}.ga-horizontal .ga-panels{height:100%}.ga-vertical .ga-panels{width:100%}.ga-panel{overflow:hidden;position:absolute}.ga-shadow{box-shadow:-5px 0 40px 1px #000}.ga-background,.ga-background-opened{border:none;height:auto;vertical-align:bottom;width:auto}.ga-background-opened{left:0;position:absolute;top:0;visibility:hidden}.ga-no-js{max-width:100%;overflow:hidden}.grid-accordion .ga-background,.grid-accordion .ga-background-opened{border:none!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:0!important;transition:none}.grid-accordion a{position:static;transition:none!important}.grid-accordion .ga-background,.grid-accordion .ga-background-opened,.grid-accordion canvas,.grid-accordion embed,.grid-accordion iframe,.grid-accordion object,.grid-accordion video{max-height:none;max-width:none}.ga-pagination-buttons{padding-top:10px;position:absolute;text-align:center;top:100%;width:100%}.ga-pagination-button{border:2px solid #000;border-radius:50%;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:4px;width:10px}.ga-pagination-buttons .ga-selected{background-color:#000}.ga-has-buttons{margin-bottom:32px}@media only screen and (min-width:768px) and (max-width:1024px){.ga-pagination-button{height:14px;width:14px}.ga-has-buttons{margin-bottom:36px}}@media only screen and (min-width:568px) and (max-width:768px){.ga-pagination-button{height:16px;width:16px}.ga-has-buttons{margin-bottom:38px}}@media only screen and (min-width:320px) and (max-width:568px){.ga-pagination-button{height:18px;width:18px}.ga-has-buttons{margin-bottom:40px}}.ga-layer{-webkit-font-smoothing:subpixel-antialiased;box-sizing:border-box;margin:0;position:absolute}.ga-black{background:#000;background:#000000b3;color:#fff}.ga-white{background:#fff;background:#ffffffb3;color:#000}.ga-rounded{border-radius:10px}.ga-padding{padding:10px}.ga-layer.ga-vertical{transform:rotate(-90deg) translateY(100%);transform-origin:left bottom}.ga-grab{cursor:url(ff66d0e16708a8387706.cur),move}.ga-grabbing{cursor:url(64a865afeb83429aea35.cur),move}.ga-selectable{cursor:default}a.ga-video{text-decoration:none}a.ga-video img{backface-visibility:hidden;border:none}a.ga-video:after{background-color:#0003;border:2px solid #fff;border-radius:30px;bottom:0;color:#fff;content:"\25B6";font-size:30px;height:50px;left:0;line-height:52px;margin:auto;padding-left:5px;position:absolute;right:0;text-align:center;top:0;width:45px} \ No newline at end of file +.grid-accordion{margin-left:auto;margin-right:auto;position:relative}.grid-accordion *{-webkit-tap-highlight-color:transparent}.ga-mask{height:100%;overflow:hidden;width:100%}.ga-mask,.ga-panels{position:absolute}.ga-horizontal .ga-panels{height:100%}.ga-vertical .ga-panels{width:100%}.ga-panel{overflow:hidden;position:absolute}.ga-shadow{box-shadow:-5px 0 40px 1px #000}.ga-background,.ga-background-opened{border:none;height:auto;vertical-align:bottom;width:auto}.ga-background-opened{left:0;position:absolute;top:0;visibility:hidden}.ga-no-js{max-width:100%;overflow:hidden}.grid-accordion .ga-background,.grid-accordion .ga-background-opened{border:none!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:0!important;transition:none}.grid-accordion a{position:static;transition:none!important}.grid-accordion .ga-background,.grid-accordion .ga-background-opened,.grid-accordion canvas,.grid-accordion embed,.grid-accordion iframe,.grid-accordion object,.grid-accordion video{max-height:none;max-width:none}.ga-pagination-buttons{padding-top:10px;position:absolute;text-align:center;top:100%;width:100%}.ga-pagination-button{border:2px solid #000;border-radius:50%;box-sizing:border-box;cursor:pointer;display:inline-block;height:10px;margin:4px;width:10px}.ga-pagination-buttons .ga-selected{background-color:#000}.ga-has-buttons{margin-bottom:32px}@media only screen and (min-width:768px) and (max-width:1024px){.ga-pagination-button{height:14px;width:14px}.ga-has-buttons{margin-bottom:36px}}@media only screen and (min-width:568px) and (max-width:768px){.ga-pagination-button{height:16px;width:16px}.ga-has-buttons{margin-bottom:38px}}@media only screen and (min-width:320px) and (max-width:568px){.ga-pagination-button{height:18px;width:18px}.ga-has-buttons{margin-bottom:40px}}.ga-layer{box-sizing:border-box;margin:0;position:absolute;-webkit-font-smoothing:subpixel-antialiased}.ga-black{background:#000;background:#000000b3;color:#fff}.ga-white{background:#fff;background:#ffffffb3;color:#000}.ga-rounded{border-radius:10px}.ga-padding{padding:10px}.ga-layer.ga-vertical{transform:rotate(-90deg) translateY(100%);transform-origin:left bottom}.ga-grab{cursor:url(ff66d0e16708a8387706.cur),move}.ga-grabbing{cursor:url(64a865afeb83429aea35.cur),move}.ga-selectable{cursor:default}a.ga-video{-webkit-text-decoration:none;text-decoration:none}a.ga-video img{backface-visibility:hidden;border:none}a.ga-video:after{background-color:#0003;border:2px solid #fff;border-radius:30px;color:#fff;content:"\25B6";font-size:30px;height:50px;inset:0;line-height:52px;margin:auto;padding-left:5px;position:absolute;text-align:center;width:45px} \ No newline at end of file diff --git a/build/grid-accordion.js b/build/grid-accordion.js index cb691ee..136efb1 100644 --- a/build/grid-accordion.js +++ b/build/grid-accordion.js @@ -1 +1 @@ -(()=>{var t={9662:(t,e,i)=>{var s=i(614),n=i(6330),a=TypeError;t.exports=function(t){if(s(t))return t;throw a(n(t)+" is not a function")}},9670:(t,e,i)=>{var s=i(111),n=String,a=TypeError;t.exports=function(t){if(s(t))return t;throw a(n(t)+" is not an object")}},1318:(t,e,i)=>{var s=i(5656),n=i(1400),a=i(6244),o=function(t){return function(e,i,o){var r,l=s(e),h=a(l),d=n(o,h);if(t&&i!=i){for(;h>d;)if((r=l[d++])!=r)return!0}else for(;h>d;d++)if((t||d in l)&&l[d]===i)return t||d||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},3658:(t,e,i)=>{"use strict";var s=i(9781),n=i(3157),a=TypeError,o=Object.getOwnPropertyDescriptor,r=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=r?function(t,e){if(n(t)&&!o(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4326:(t,e,i)=>{var s=i(1702),n=s({}.toString),a=s("".slice);t.exports=function(t){return a(n(t),8,-1)}},9920:(t,e,i)=>{var s=i(2597),n=i(3887),a=i(1236),o=i(3070);t.exports=function(t,e,i){for(var r=n(e),l=o.f,h=a.f,d=0;d{var s=i(9781),n=i(3070),a=i(9114);t.exports=s?function(t,e,i){return n.f(t,e,a(1,i))}:function(t,e,i){return t[e]=i,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8052:(t,e,i)=>{var s=i(614),n=i(3070),a=i(6339),o=i(3072);t.exports=function(t,e,i,r){r||(r={});var l=r.enumerable,h=void 0!==r.name?r.name:e;if(s(i)&&a(i,h,r),r.global)l?t[e]=i:o(e,i);else{try{r.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=i:n.f(t,e,{value:i,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t}},3072:(t,e,i)=>{var s=i(7854),n=Object.defineProperty;t.exports=function(t,e){try{n(s,t,{value:e,configurable:!0,writable:!0})}catch(i){s[t]=e}return e}},9781:(t,e,i)=>{var s=i(7293);t.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,i=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:i}},317:(t,e,i)=>{var s=i(7854),n=i(111),a=s.document,o=n(a)&&n(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8113:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(t,e,i)=>{var s,n,a=i(7854),o=i(8113),r=a.process,l=a.Deno,h=r&&r.versions||l&&l.version,d=h&&h.v8;d&&(n=(s=d.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&o&&(!(s=o.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=o.match(/Chrome\/(\d+)/))&&(n=+s[1]),t.exports=n},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,i)=>{var s=i(7854),n=i(1236).f,a=i(8880),o=i(8052),r=i(3072),l=i(9920),h=i(4705);t.exports=function(t,e){var i,d,c,p,u,g=t.target,m=t.global,v=t.stat;if(i=m?s:v?s[g]||r(g,{}):(s[g]||{}).prototype)for(d in e){if(p=e[d],c=t.dontCallGetSet?(u=n(i,d))&&u.value:i[d],!h(m?d:g+(v?".":"#")+d,t.forced)&&void 0!==c){if(typeof p==typeof c)continue;l(p,c)}(t.sham||c&&c.sham)&&a(p,"sham",!0),o(i,d,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4374:(t,e,i)=>{var s=i(7293);t.exports=!s((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,i)=>{var s=i(4374),n=Function.prototype.call;t.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},6530:(t,e,i)=>{var s=i(9781),n=i(2597),a=Function.prototype,o=s&&Object.getOwnPropertyDescriptor,r=n(a,"name"),l=r&&"something"===function(){}.name,h=r&&(!s||s&&o(a,"name").configurable);t.exports={EXISTS:r,PROPER:l,CONFIGURABLE:h}},1702:(t,e,i)=>{var s=i(4374),n=Function.prototype,a=n.call,o=s&&n.bind.bind(a,a);t.exports=s?o:function(t){return function(){return a.apply(t,arguments)}}},5005:(t,e,i)=>{var s=i(7854),n=i(614);t.exports=function(t,e){return arguments.length<2?(i=s[t],n(i)?i:void 0):s[t]&&s[t][e];var i}},8173:(t,e,i)=>{var s=i(9662),n=i(8554);t.exports=function(t,e){var i=t[e];return n(i)?void 0:s(i)}},7854:(t,e,i)=>{var s=function(t){return t&&t.Math==Math&&t};t.exports=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i.g&&i.g)||function(){return this}()||Function("return this")()},2597:(t,e,i)=>{var s=i(1702),n=i(7908),a=s({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(n(t),e)}},3501:t=>{t.exports={}},4664:(t,e,i)=>{var s=i(9781),n=i(7293),a=i(317);t.exports=!s&&!n((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,i)=>{var s=i(1702),n=i(7293),a=i(4326),o=Object,r=s("".split);t.exports=n((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?r(t,""):o(t)}:o},2788:(t,e,i)=>{var s=i(1702),n=i(614),a=i(5465),o=s(Function.toString);n(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},9909:(t,e,i)=>{var s,n,a,o=i(4811),r=i(7854),l=i(111),h=i(8880),d=i(2597),c=i(5465),p=i(6200),u=i(3501),g="Object already initialized",m=r.TypeError,v=r.WeakMap;if(o||c.state){var y=c.state||(c.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,s=function(t,e){if(y.has(t))throw m(g);return e.facade=t,y.set(t,e),e},n=function(t){return y.get(t)||{}},a=function(t){return y.has(t)}}else{var f=p("state");u[f]=!0,s=function(t,e){if(d(t,f))throw m(g);return e.facade=t,h(t,f,e),e},n=function(t){return d(t,f)?t[f]:{}},a=function(t){return d(t,f)}}t.exports={set:s,get:n,has:a,enforce:function(t){return a(t)?n(t):s(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=n(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return i}}}},3157:(t,e,i)=>{var s=i(4326);t.exports=Array.isArray||function(t){return"Array"==s(t)}},614:(t,e,i)=>{var s=i(4154),n=s.all;t.exports=s.IS_HTMLDDA?function(t){return"function"==typeof t||t===n}:function(t){return"function"==typeof t}},4705:(t,e,i)=>{var s=i(7293),n=i(614),a=/#|\.prototype\./,o=function(t,e){var i=l[r(t)];return i==d||i!=h&&(n(e)?s(e):!!e)},r=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},l=o.data={},h=o.NATIVE="N",d=o.POLYFILL="P";t.exports=o},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,i)=>{var s=i(614),n=i(4154),a=n.all;t.exports=n.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:s(t)||t===a}:function(t){return"object"==typeof t?null!==t:s(t)}},1913:t=>{t.exports=!1},2190:(t,e,i)=>{var s=i(5005),n=i(614),a=i(7976),o=i(3307),r=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=s("Symbol");return n(e)&&a(e.prototype,r(t))}},6244:(t,e,i)=>{var s=i(7466);t.exports=function(t){return s(t.length)}},6339:(t,e,i)=>{var s=i(1702),n=i(7293),a=i(614),o=i(2597),r=i(9781),l=i(6530).CONFIGURABLE,h=i(2788),d=i(9909),c=d.enforce,p=d.get,u=String,g=Object.defineProperty,m=s("".slice),v=s("".replace),y=s([].join),f=r&&!n((function(){return 8!==g((function(){}),"length",{value:8}).length})),E=String(String).split("String"),P=t.exports=function(t,e,i){"Symbol("===m(u(e),0,7)&&(e="["+v(u(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!o(t,"name")||l&&t.name!==e)&&(r?g(t,"name",{value:e,configurable:!0}):t.name=e),f&&i&&o(i,"arity")&&t.length!==i.arity&&g(t,"length",{value:i.arity});try{i&&o(i,"constructor")&&i.constructor?r&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var s=c(t);return o(s,"source")||(s.source=y(E,"string"==typeof e?e:"")),t};Function.prototype.toString=P((function(){return a(this)&&p(this).source||h(this)}),"toString")},4758:t=>{var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var s=+t;return(s>0?i:e)(s)}},3070:(t,e,i)=>{var s=i(9781),n=i(4664),a=i(3353),o=i(9670),r=i(4948),l=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c="enumerable",p="configurable",u="writable";e.f=s?a?function(t,e,i){if(o(t),e=r(e),o(i),"function"==typeof t&&"prototype"===e&&"value"in i&&u in i&&!i[u]){var s=d(t,e);s&&s[u]&&(t[e]=i.value,i={configurable:p in i?i[p]:s[p],enumerable:c in i?i[c]:s[c],writable:!1})}return h(t,e,i)}:h:function(t,e,i){if(o(t),e=r(e),o(i),n)try{return h(t,e,i)}catch(t){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},1236:(t,e,i)=>{var s=i(9781),n=i(6916),a=i(5296),o=i(9114),r=i(5656),l=i(4948),h=i(2597),d=i(4664),c=Object.getOwnPropertyDescriptor;e.f=s?c:function(t,e){if(t=r(t),e=l(e),d)try{return c(t,e)}catch(t){}if(h(t,e))return o(!n(a.f,t,e),t[e])}},8006:(t,e,i)=>{var s=i(6324),n=i(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return s(t,n)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},7976:(t,e,i)=>{var s=i(1702);t.exports=s({}.isPrototypeOf)},6324:(t,e,i)=>{var s=i(1702),n=i(2597),a=i(5656),o=i(1318).indexOf,r=i(3501),l=s([].push);t.exports=function(t,e){var i,s=a(t),h=0,d=[];for(i in s)!n(r,i)&&n(s,i)&&l(d,i);for(;e.length>h;)n(s,i=e[h++])&&(~o(d,i)||l(d,i));return d}},5296:(t,e)=>{"use strict";var i={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!i.call({1:2},1);e.f=n?function(t){var e=s(this,t);return!!e&&e.enumerable}:i},2140:(t,e,i)=>{var s=i(6916),n=i(614),a=i(111),o=TypeError;t.exports=function(t,e){var i,r;if("string"===e&&n(i=t.toString)&&!a(r=s(i,t)))return r;if(n(i=t.valueOf)&&!a(r=s(i,t)))return r;if("string"!==e&&n(i=t.toString)&&!a(r=s(i,t)))return r;throw o("Can't convert object to primitive value")}},3887:(t,e,i)=>{var s=i(5005),n=i(1702),a=i(8006),o=i(5181),r=i(9670),l=n([].concat);t.exports=s("Reflect","ownKeys")||function(t){var e=a.f(r(t)),i=o.f;return i?l(e,i(t)):e}},4488:(t,e,i)=>{var s=i(8554),n=TypeError;t.exports=function(t){if(s(t))throw n("Can't call method on "+t);return t}},6200:(t,e,i)=>{var s=i(2309),n=i(9711),a=s("keys");t.exports=function(t){return a[t]||(a[t]=n(t))}},5465:(t,e,i)=>{var s=i(7854),n=i(3072),a="__core-js_shared__",o=s[a]||n(a,{});t.exports=o},2309:(t,e,i)=>{var s=i(1913),n=i(5465);(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.1",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:(t,e,i)=>{var s=i(7392),n=i(7293);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},1400:(t,e,i)=>{var s=i(9303),n=Math.max,a=Math.min;t.exports=function(t,e){var i=s(t);return i<0?n(i+e,0):a(i,e)}},5656:(t,e,i)=>{var s=i(8361),n=i(4488);t.exports=function(t){return s(n(t))}},9303:(t,e,i)=>{var s=i(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:s(e)}},7466:(t,e,i)=>{var s=i(9303),n=Math.min;t.exports=function(t){return t>0?n(s(t),9007199254740991):0}},7908:(t,e,i)=>{var s=i(4488),n=Object;t.exports=function(t){return n(s(t))}},7593:(t,e,i)=>{var s=i(6916),n=i(111),a=i(2190),o=i(8173),r=i(2140),l=i(5112),h=TypeError,d=l("toPrimitive");t.exports=function(t,e){if(!n(t)||a(t))return t;var i,l=o(t,d);if(l){if(void 0===e&&(e="default"),i=s(l,t,e),!n(i)||a(i))return i;throw h("Can't convert object to primitive value")}return void 0===e&&(e="number"),r(t,e)}},4948:(t,e,i)=>{var s=i(7593),n=i(2190);t.exports=function(t){var e=s(t,"string");return n(e)?e:e+""}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,i)=>{var s=i(1702),n=0,a=Math.random(),o=s(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++n+a,36)}},3307:(t,e,i)=>{var s=i(6293);t.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,i)=>{var s=i(9781),n=i(7293);t.exports=s&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:(t,e,i)=>{var s=i(7854),n=i(614),a=s.WeakMap;t.exports=n(a)&&/native code/.test(String(a))},5112:(t,e,i)=>{var s=i(7854),n=i(2309),a=i(2597),o=i(9711),r=i(6293),l=i(3307),h=s.Symbol,d=n("wks"),c=l?h.for||h:h&&h.withoutSetter||o;t.exports=function(t){return a(d,t)||(d[t]=r&&a(h,t)?h[t]:c("Symbol."+t)),d[t]}},7658:(t,e,i)=>{"use strict";var s=i(2109),n=i(7908),a=i(6244),o=i(3658),r=i(7207);s({target:"Array",proto:!0,arity:1,forced:i(7293)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=n(this),i=a(e),s=arguments.length;r(i+s);for(var l=0;l{"use strict";i(7658);const t={width:800,height:400,responsive:!0,responsiveMode:"auto",aspectRatio:-1,orientation:"horizontal",startPanel:-1,rows:3,columns:4,openedPanelWidth:"max",openedPanelHeight:"max",maxOpenedPanelWidth:"70%",maxOpenedPanelHeight:"70%",openPanelOn:"hover",closePanelsOnMouseOut:!0,mouseDelay:200,panelDistance:10,openPanelDuration:700,closePanelDuration:700,pageScrollDuration:500,pageScrollEasing:"swing",breakpoints:null,startPage:0,shadow:!1,shuffle:!1,addOns:[]};function e(t){let e="complete";return"IMG"===t.tagName&&!1===t.complete?e="loading":Array.from(t.getElementsByTagName("img")).forEach((t=>{!1===t.complete&&(e="loading")})),e}function s(t){return isNaN(t)||"auto"===t?t:t+"px"}class n extends EventTarget{handlerReferences={};uid=null;static idCounter=0;constructor(){super()}addEventListener(t,e){const i=e;let s=t;null===this.uid&&(this.uid=n.idCounter++),-1!==t.indexOf(".")&&(s=t.split(".")[0]),this.handlerReferences[t+"."+this.uid]=i,super.addEventListener(s,i)}removeEventListener(t){let e=t;const i=this.handlerReferences[t+"."+this.uid];-1!==t.indexOf(".")&&(e=t.split(".")[0]),super.removeEventListener(e,i),delete this.handlerReferences[t+"."+this.uid]}dispatchEvent(t){const e=new CustomEvent(t,{...(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)||{},detail:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||{}});super.dispatchEvent(e)}on(t,e){this.addEventListener(t,e)}off(t){this.removeEventListener(t)}trigger(t){const{type:e,detail:i}=t;this.dispatchEvent(e,i)}}const a=n,o=class extends a{#t;panelEl;settings;isLoading=!1;isLoaded=!1;eventHandlerReferences={};constructor(t,e){super(),this.panelEl=t,this.settings=e,this.init()}init(){this.panelEl.setAttribute("data-init",!0),this.panelEl.addEventListener("mouseenter",this.eventHandlerReferences["mouseenter.panel"]=()=>{this.dispatchEvent("panelMouseOver",{index:this.index})}),this.panelEl.addEventListener("mouseleave",this.eventHandlerReferences["mouseleave.panel"]=()=>{this.dispatchEvent("panelMouseOut",{index:this.index})}),this.panelEl.addEventListener("click",this.eventHandlerReferences["click.panel"]=()=>{this.dispatchEvent("panelClick",{index:this.index})}),this.panelEl.addEventListener("mousedown",this.eventHandlerReferences["mousedown.panel"]=()=>{this.dispatchEvent("panelMouseDown",{index:this.index})})}getPosition(){return{left:parseInt(this.panelEl.style.left,10),top:parseInt(this.panelEl.style.top,10)}}setPosition(t,e){this.panelEl.style.left=s(t),this.panelEl.style.top=s(e)}getSize(){return{width:parseInt(this.panelEl.style.width,10),height:parseInt(this.panelEl.style.height,10)}}setSize(t,e){this.panelEl.style.width=s(t),this.panelEl.style.height=s(e)}getContentSize(){return"complete"===e(this.panelEl)&&(this.isLoaded=!0),!1===this.isLoaded?((t=this.panelEl,new Promise((i=>{let s=e(t);if("loading"===s){const n=setInterval((()=>{s=e(t),"complete"===s&&(clearInterval(n),i("complete"))}),100)}else i("complete")}))).then((()=>{this.isLoaded=!0,this.dispatchEvent("imagesComplete",{index:this.index,contentSize:this.getContentSize()})})),"loading"):{width:this.panelEl.scrollWidth,height:this.panelEl.scrollHeight};var t}destroy(){this.panelEl.removeAttribute("style"),this.panelEl.removeAttribute("data-init"),this.panelEl.removeAttribute("data-index"),this.panelEl.removeEventListener("mouseenter",this.eventHandlerReferences["mouseenter.panel"]),this.panelEl.removeEventListener("mouseleave",this.eventHandlerReferences["mouseleave.panel"]),this.panelEl.removeEventListener("click",this.eventHandlerReferences["click.panel"]),this.panelEl.removeEventListener("mousedown",this.eventHandlerReferences["mousedown.panel"])}get index(){return this.#t}set index(t){this.#t=t,this.panelEl.setAttribute("data-index",this.#t)}},r=class extends a{previousWidth=0;previousHeight=0;allowResize=!0;delay=200;handlerReference;timeoutReference;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;super(),null!==t&&(this.delay=t)}addEventListener(t,e){super.addEventListener(t,e),this.handlerReference=this.handler.bind(this),window.addEventListener("resize",this.handlerReference)}removeEventListener(t){super.removeEventListener(t),window.removeEventListener("resize",this.handlerReference)}handler(){!1===this.allowResize||this.previousWidth===window.innerWidth&&this.previousHeight===window.innerHeight||(this.previousWidth=window.innerWidth,this.previousHeight=window.innerHeight,this.allowResize=!1,this.timeoutReference=setTimeout((()=>{this.dispatchEvent("resize"),this.allowResize=!0}),this.delay))}destroy(){clearTimeout(this.timeoutReference)}};class l{accordion;static addOns=[];addOnsInstances=[];activeAddOns=null;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.accordion=t,this.activeAddOns=e}init(){this.accordion.addOns=this.accordion.addOns||{},(0===this.activeAddOns.length?l.addOns:this.activeAddOns).forEach((t=>{let e=new t(this.accordion);this.addOnsInstances.push(e),this.accordion.addOns[t.name]=e}))}static add(t){"object"==typeof t?l.addOns=[...l.addOns,...t]:"function"==typeof t&&l.addOns.push(t)}destroyAll(){this.addOnsInstances.forEach((t=>{t.destroy()}))}}const h=l,d=class extends a{videoEl=null;ready=!1;started=!1;state="";constructor(t){super(),this.videoEl=t,this.init()}init(){}play(){}pause(){}stop(){}replay(){}isType(){}isReady(){return this.ready}isStarted(){return this.started}getState(){return this.state}};class c extends d{static vimeoAPIAdded=!1;static vimeoVideos=[];constructor(t){super(t)}static isType(t){return"IFRAME"===t.tagName&&-1!==t.getAttribute("src").indexOf("vimeo.com")}init(){if(this.isInit=!1,void 0!==window.Vimeo)this.setup();else if(c.vimeoVideos.push(this),!1===c.vimeoAPIAdded){c.vimeoAPIAdded=!0;const t=document.createElement("script");t.src="//player.vimeo.com/api/player.js";const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e);let i=setInterval((()=>{void 0!==window.Vimeo&&(clearInterval(i),c.vimeoVideos.forEach((t=>{t.setup()})))}),100)}}setup(){this.isInit=!0,this.player=new window.Vimeo.Player(this.videoEl),this.ready=!0,this.dispatchEvent("ready"),this.player.on("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.on("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.on("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}play(){if(!0===this.ready)this.player.play();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.play())}),100)}}pause(){this.player.pause()}stop(){this.player.setCurrentTime(0).then((()=>{this.player.pause(),this.state="stopped"}))}replay(){this.player.setCurrentTime(0).then((()=>{this.player.play()}))}addEventListener(t,e){if(!0===this.isInit)super.addEventListener(t,e);else{const i=setInterval((()=>{!0===this.isInit&&(clearInterval(i),super.addEventListener(t,e))}),100)}}}const p=c;class u extends d{static youtubeAPIAdded=!1;static youtubeVideos=[];constructor(t){super(t)}static isType(t){if("IFRAME"===t.tagName){const e=t.getAttribute("src");if(-1!==e.indexOf("youtube.com")||-1!==e.indexOf("youtu.be"))return!0}return!1}init(){if(this.isInit=!1,void 0!==(window.YT&&window.YT.Player))this.setup();else if(u.youtubeVideos.push(this),!1===u.youtubeAPIAdded){u.youtubeAPIAdded=!0;const t=document.createElement("script");t.src="//www.youtube.com/player_api";const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),window.onYouTubePlayerAPIReady=()=>{u.youtubeVideos.forEach((t=>{t.setup()}))}}}setup(){this.isInit=!0,this.player=new window.YT.Player(this.videoEl,{events:{onReady:()=>{this.dispatchEvent("ready"),this.ready=!0},onStateChange:t=>{switch(t.data){case window.YT.PlayerState.PLAYING:!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play");break;case window.YT.PlayerState.PAUSED:this.state="paused",this.dispatchEvent("pause");break;case window.YT.PlayerState.ENDED:this.state="ended",this.dispatchEvent("ended")}}}})}play(){if(!0===this.ready)this.player.playVideo();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.playVideo())}),100)}}pause(){!0==!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?this.stop():this.player.pauseVideo()}stop(){this.player.seekTo(1),this.player.stopVideo(),this.state="stopped"}replay(){this.player.seekTo(1),this.player.playVideo()}addEventListener(t,e){if(!0===this.isInit)super.addEventListener(t,e);else{const i=setInterval((()=>{!0===this.isInit&&(clearInterval(i),super.addEventListener(t,e))}),100)}}}const g=u;class m extends a{static players=[];player=null;videoEl;isIOS=!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g);constructor(t){super(),this.videoEl=t,this.init()}static addPlayer(t){-1===m.players.indexOf(t)&&m.players.unshift(t)}init(){const t=this.videoEl.getAttribute("id"),e=m.players.find((t=>t.isType(this.videoEl)));this.player=new e(this.videoEl),null!==this.player&&["ready","start","play","pause","ended"].forEach((e=>{const i="video"+e.charAt(0).toUpperCase()+e.slice(1);this.player.addEventListener(e,(()=>{this.dispatchEvent(i,{video:t})}))}))}play(){!0===this.isIOS&&!1===this.player.isStarted()||"playing"===this.player.getState()||this.player.play()}stop(){!0===this.isIOS&&!1===this.player.isStarted()||"stopped"===this.player.getState()||this.player.stop()}pause(){!0===this.isIOS&&!1===this.player.isStarted()||"paused"===this.player.getState()||this.player.pause()}replay(){!0===this.isIOS&&!1===this.player.isStarted()||this.player.replay()}destroy(){!0===this.player.isStarted()&&this.stop(),this.player.removeEventListener("ready"),this.player.removeEventListener("start"),this.player.removeEventListener("play"),this.player.removeEventListener("pause"),this.player.removeEventListener("ended")}}m.addPlayer(class extends d{constructor(t){super(t)}static isType(t){return"VIDEO"===t.tagName}init(){this.player=this.videoEl,this.ready=!0,this.dispatchEvent("ready"),this.player.addEventListener("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.addEventListener("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.addEventListener("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}play(){if(!0===this.ready)this.player.play();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.play())}),100)}}pause(){this.player.pause()}stop(){this.player.currentTime=0,this.player.pause(),this.state="stopped"}replay(){this.player.currentTime=0,this.player.play()}}),m.addPlayer(class extends d{constructor(t){super(t)}static isType(t){return!(null===t.getAttribute("data-videojs-id")&&!t.classList.contains("video-js")||void 0===window.videojs)}init(){const t=this.videoEl.classList.contains("video-js")?this.videoEl.getAttribute("id"):this.videoEl.getAttribute("data-videojs-id");this.player=window.videojs(t),this.player.ready((()=>{this.ready=!0,this.dispatchEvent("ready"),this.player.on("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.on("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.on("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}))}play(){this.player.play()}pause(){this.player.pause()}stop(){this.player.currentTime(0),this.player.pause(),this.state="stopped"}replay(){this.player.currentTime(0),this.player.play()}}),m.addPlayer(g),m.addPlayer(p);const v=m;h.add([class{namespace="autoplay";accordion;settings;autoplayTimer;autoplayState="stopped";autoplayIndex=-1;isHover=!1;eventHandlerReferences={};defaults={autoplay:!0,autoplayDelay:5e3,autoplayDirection:"normal",autoplayOnHover:"pause"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.autoplay&&"stopped"===this.autoplayState?(this.accordion.addEventListener("panelOpen."+this.namespace,(()=>{this.panelOpenHandler()})),this.accordion.addEventListener("panelOpenComplete."+this.namespace,(()=>{this.panelOpenCompleteHandler()})),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{-1!==t.detail.previousIndex&&(this.autoplayIndex=t.detail.previousIndex)})),this.accordion.addEventListener("pageScroll."+this.namespace,(()=>{this.autoplayIndex=this.accordion.getFirstPanelFromPage()-1})),this.accordion.accordionEl.addEventListener("mouseenter",this.eventHandlerReferences.mouseenter=()=>{this.mouseEnterHandler()}),this.accordion.accordionEl.addEventListener("mouseleave",this.eventHandlerReferences.mouseleave=()=>{this.mouseLeaveHandler()}),this.autoplayState="running",this.start()):!0===this.settings.autoplay&&"running"===this.autoplayState&&(this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace),this.accordion.removeEventListener("mouseenter."+this.namespace),this.accordion.removeEventListener("mouseleave."+this.namespace),this.autoplayState="stopped",this.stop())}panelOpenHandler(){"running"===this.autoplayState&&(this.stop(),this.autoplayState="paused")}panelOpenCompleteHandler(){(!0!==this.isHover||"pause"!==this.settings.autoplayOnHover&&"stop"!==this.settings.autoplayOnHover)&&"paused"===this.autoplayState&&(this.start(),this.autoplayState="running")}mouseEnterHandler(){this.isHover=!0,"running"!==this.autoplayState||"pause"!==this.settings.autoplayOnHover&&"stop"!==this.settings.autoplayOnHover||(this.stop(),this.autoplayState="paused")}mouseLeaveHandler(){this.isHover=!1,!0===this.settings.autoplay&&"paused"===this.autoplayState&&"stop"!==this.settings.autoplayOnHover&&(this.start(),this.autoplayState="running")}start(){this.autoplayTimer=setTimeout((()=>{-1!==this.autoplayIndex&&(this.accordion.currentIndex=this.autoplayIndex,this.autoplayIndex=-1),"normal"===this.settings.autoplayDirection?this.accordion.nextPanel():"backwards"===this.settings.autoplayDirection&&this.accordion.previousPanel()}),this.settings.autoplayDelay)}stop(){clearTimeout(this.autoplayTimer)}destroy(){clearTimeout(this.autoplayTimer),this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace),this.accordion.removeEventListener("panelsClose."+this.namespace),this.accordion.removeEventListener("pageScroll."+this.namespace),this.accordion.accordionEl.removeEventListener("mouseenter",this.eventHandlerReferences.mouseenter),this.accordion.accordionEl.removeEventListener("mouseleave",this.eventHandlerReferences.mouseleave)}},class{namespace="breakpoints";accordion;breakpoints;originalSettings={};orderedBreakpoints=[];currentBreakpoint=-1;constructor(t){this.accordion=t,null!==this.accordion.settings.breakpoints&&this.accordion.addEventListener("beforeInit."+this.namespace,(()=>{this.init()}))}init(){this.breakpoints={...this.accordion.settings.breakpoints},this.originalSettings={...this.accordion.settings};for(let t in this.breakpoints)this.orderedBreakpoints.push({size:parseInt(t,10),properties:this.breakpoints[t]});this.orderedBreakpoints=this.orderedBreakpoints.sort(((t,e)=>t.size>=e.size?1:-1)),this.accordion.addEventListener("beforeResize."+this.namespace,(()=>{const t=this.getCurrentSettings();!1!==t&&(this.accordion.settings={...t},this.accordion.update())}))}getCurrentSettings(){if(null!==this.breakpoints&&this.orderedBreakpoints.length>0){if(window.innerWidth>this.orderedBreakpoints[this.orderedBreakpoints.length-1].size&&-1!==this.currentBreakpoint)return this.currentBreakpoint=-1,this.originalSettings;for(let t=0,e=this.orderedBreakpoints.length;t{void 0!==this.buttonsEl&&(this.buttonsEl.getElementsByClassName("ga-selected")[0].classList.remove("ga-selected"),this.buttonsEl.getElementsByClassName("ga-pagination-button")[t.detail.index].classList.add("ga-selected"))}))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},this.buttonsEl=this.accordion.accordionEl.getElementsByClassName("ga-pagination-buttons")[0];const t=this.accordion.getTotalPages();!0===this.settings.buttons&&t>1&&void 0===this.buttonsEl?this.createButtons():!0===this.settings.buttons&&void 0!==this.buttonsEl&&t!==this.buttonsEl.getElementsByClassName("ga-pagination-button").length?this.adjustButtons():(!1===this.settings.buttons&&void 0!==this.buttonsEl||t<=1&&void 0!==this.buttonsEl)&&this.removeButtons()}createButtons(){this.buttonsEl=document.createElement("div"),this.buttonsEl.classList.add("ga-pagination-buttons"),this.accordion.accordionEl.appendChild(this.buttonsEl);for(let t=0;t{this.accordion.gotoPage(t)};this.eventHandlerReferences["click.button"+t]=i,e.addEventListener("click",i)}this.accordion.accordionEl.classList.add("ga-has-buttons")}adjustButtons(){this.removeButtons(),this.createButtons()}removeButtons(){Array.from(this.buttonsEl.getElementsByClassName("ga-pagination-button")).forEach(((t,e)=>{const i=this.eventHandlerReferences["click.button"+e];t.removeEventListener("click",i)})),this.buttonsEl.remove(),this.accordion.accordionEl.classList.remove("ga-has-buttons")}destroy(){this.accordion.removeEventListener("pageScroll."+this.namespace),this.accordion.removeEventListener("update."+this.namespace),this.removeButtons()}},class{namespace="deeplinking";accordion;settings;defaults={updateHash:!1};eventHandlerReferences={};constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("init."+this.namespace,(()=>{this.gotoHash(window.location.hash)})),this.accordion.addEventListener("panelOpen."+this.namespace,(t=>{if(!0===this.settings.updateHash){let e=this.accordion.accordionEl.getElementsByClassName("ga-panel")[t.detail.index].getAttribute("id");null===e&&(e=t.detail.index),window.location.hash=this.accordion.accordionEl.getAttribute("id")+"/"+e}})),window.addEventListener("hashchange",this.eventHandlerReferences.hashchange=()=>{this.gotoHash(window.location.hash)})}parseHash(t){if(""!==t){const e=(t=t.substring(1)).split("/").pop(),i=t.slice(0,-e.toString().length-1);if(this.accordion.accordionEl.getAttribute("id")===i)return{accordionId:i,panelId:e}}return!1}gotoHash(t){const e=this.parseHash(t);if(!1===e)return;const{panelId:i}=e,s=parseInt(i,10);if(isNaN(s)){const t=document.getElementById(i),e=Array.from(this.accordion.accordionEl.getElementsByClassName("ga-panel")).indexOf(t);-1!==e&&e!==this.accordion.getCurrentIndex()&&this.accordion.openPanel(e)}else s!==this.accordion.getCurrentIndex()&&this.accordion.openPanel(s)}destroy(){this.accordion.removeEventListener("init."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),window.removeEventListener("hashchange",this.eventHandlerReferences.hashchange)}},class{namespace="keyboards";accordion;settings;isEnabled=!1;eventHandlerReferences={};defaults={keyboard:!0,keyboardOnlyOnFocus:!1,keyboardTarget:"panel"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.keyboard&&!1===this.isEnabled&&(this.isEnabled=!0,this.enable()),!1===this.settings.keyboard&&!0===this.isEnabled&&(this.isEnabled=!1,this.disable())}enable(){let t=!1;this.accordion.accordionEl.addEventListener("focus",this.eventHandlerReferences.focus=()=>{t=!0}),this.accordion.accordionEl.addEventListener("blur",this.eventHandlerReferences.blur=()=>{t=!1});const e=e=>{if(!0!==this.settings.keyboardOnlyOnFocus||!1!==t)if(37===e.which)"panel"===this.settings.keyboardTarget?this.accordion.previousPanel():this.accordion.previousPage();else if(39===e.which)"panel"===this.settings.keyboardTarget?this.accordion.nextPanel():this.accordion.nextPage();else if(13===e.which){const t=this.accordion.accordionEl.getElementsByClassName("ga-panel")[this.accordion.getCurrentIndex()].querySelector(".ga-panel > a");null!==t&&t.click()}};this.eventHandlerReferences.keydown=e,document.addEventListener("keydown",e)}disable(){this.accordion.accordionEl.removeEventListener("focus",this.eventHandlerReferences.focus),this.accordion.accordionEl.removeEventListener("blur",this.eventHandlerReferences.blur),document.removeEventListener("keydown",this.eventHandlerReferences.keydown)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.disable()}},class{namespace="layers";accordion;settings;layers=[];constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this)),this.accordion.addEventListener("panelOpen."+this.namespace,this.panelOpenHandler.bind(this)),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{this.handleLayersInClosedState(t.detail.previousIndex)}))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.panels.forEach(((t,e)=>{let i=t.panelEl;Array.from(i.querySelectorAll(".ga-layer:not([data-layer-init])")).forEach((t=>{let i=new class{layerEl;visible=!1;visibleOn="ga-always";styled=!1;data=null;position=null;horizontalProperty=null;verticalProperty=null;horizontalPosition=null;verticalPosition=null;delayTimer=null;stayTimer=null;constructor(t){this.layerEl=t,this.init()}init(){this.layerEl.setAttribute("data-layer-init",!0),this.layerEl.classList.contains("ga-closed")?(this.visibleOn="closed",this.layerEl.style.visibility="hidden"):this.layerEl.classList.contains("ga-opened")?(this.visibleOn="opened",this.layerEl.style.visibility="hidden"):this.setStyle()}setStyle(){this.styled=!0,this.data=this.layerEl.dataset,void 0!==this.data.width&&(this.layerEl.style.width=s(this.data.width)),void 0!==this.data.height&&(this.layerEl.style.height=s(this.data.height)),void 0!==this.data.depth&&(this.layerEl.style.zIndex=this.data.depth),this.position=this.data.position?this.data.position.toLowerCase():"topleft",-1!==this.position.indexOf("right")?this.horizontalProperty="right":-1!==this.position.indexOf("left")?this.horizontalProperty="left":this.horizontalProperty="center",-1!==this.position.indexOf("bottom")?this.verticalProperty="bottom":-1!==this.position.indexOf("top")?this.verticalProperty="top":this.verticalProperty="center",this.setPosition()}setPosition(){let t=this.layerEl.getAttribute("style");this.horizontalPosition=void 0!==this.data.horizontal?this.data.horizontal:0,this.verticalPosition=void 0!==this.data.vertical?this.data.vertical:0,"center"===this.horizontalProperty||"center"===this.horizontalPosition?("IMG"!==this.layerEl.tagName&&(null===t||null!==t&&-1===t.indexOf("width"))&&(this.layerEl.style.whiteSpace="nowrap",this.layerEl.style.width=s(this.layerEl.clientWidth)),this.layerEl.style.marginLeft="auto",this.layerEl.style.marginRight="auto",this.layerEl.style.left=0,this.layerEl.style.right=0):this.layerEl.style[this.horizontalProperty]=s(this.horizontalPosition),"center"===this.verticalProperty||"center"===this.verticalPosition?("IMG"!==this.layerEl.tagName&&(null===t||null!==t&&-1===t.indexOf("height"))&&(this.layerEl.style.whiteSpace="nowrap",this.layerEl.style.height=s(this.layerEl.clientHeight)),this.layerEl.style.marginTop="auto",this.layerEl.style.marginBottom="auto",this.layerEl.style.top=0,this.layerEl.style.bottom=0):this.layerEl.style[this.verticalProperty]=s(this.verticalPosition)}show(t){if(!0===this.visible)return;this.visible=!0,!1===this.styled&&this.setStyle();let e=void 0!==this.data.showOffset?this.data.showOffset:50,i=void 0!==this.data.showDuration?this.data.showDuration/1e3:.4,s=void 0!==this.data.showDelay?this.data.showDelay:10,n=void 0!==this.data.stayDuration?parseInt(this.data.stayDuration,10):-1,a={opacity:0,visibility:"visible"},o={opacity:1},r="";o.transition="opacity "+i+"s",void 0!==this.data.showTransition&&("left"===this.data.showTransition?r=e+"px, 0":"right"===this.data.showTransition?r="-"+e+"px, 0":"up"===this.data.showTransition?r="0, "+e+"px":"down"===this.data.showTransition&&(r="0, -"+e+"px"),a.transform="translate3d("+r+", 0)",o.transform="translate3d(0, 0, 0)",o.transition+=", transform "+i+"s");const l=e=>{e.target===e.currentTarget&&(this.layerEl.removeEventListener("transitionend",l),this.layerEl.style.transition="",-1!==n&&(this.stayTimer=setTimeout((function(){this.hide(),this.stayTimer=null}),n)),void 0!==t&&t())};this.layerEl.addEventListener("transitionend",l);for(let t in a)this.layerEl.style[t]=a[t];this.delayTimer=setTimeout((()=>{for(let t in o)this.layerEl.style[t]=o[t]}),s)}hide(t){if(!1===this.visible)return;let e=void 0!==this.data.hideOffset?this.data.hideOffset:50,i=void 0!==this.data.hideDuration?this.data.hideDuration/1e3:.4,s=void 0!==this.data.hideDelay?this.data.hideDelay:10;this.visible=!1,null!==this.stayTimer&&clearTimeout(this.stayTimer);let n="",a={opacity:0};a.transition="opacity "+i+"s",void 0!==this.data.hideTransition&&("left"===this.data.hideTransition?n="-"+e+"px, 0":"right"===this.data.hideTransition?n=e+"px, 0":"up"===this.data.hideTransition?n="0, -"+e+"px":"down"===this.data.hideTransition&&(n="0, "+e+"px"),a.transform=" translate3d("+n+", 0)",a.transition+=", transform "+i+"s");const o=e=>{e.target===e.currentTarget&&(this.layerEl.removeEventListener("transitionend",o),this.layerEl.style.removeProperty("transition"),!1===this.visible&&(this.layerEl.style.visibility="hidden"),void 0!==t&&t())};this.layerEl.addEventListener("transitionend",o),this.delayTimer=setTimeout((()=>{for(let t in a)this.layerEl.style[t]=a[t]}),s)}isVisible(){return!1!==this.visible&&null!==this.layerEl.offsetParent}destroy(){this.layerEl.removeAttribute("style"),this.layerEl.removeAttribute("data-layer-init"),clearTimeout(this.delayTimer),clearTimeout(this.stayTimer),this.delayTimer=null,this.stayTimer=null}}(t);this.layers.push({layer:i,panelIndex:e})})),this.accordion.currentIndex===e?this.handleLayersInOpenedState(e):this.handleLayersInClosedState(e)}))}panelOpenHandler(t){this.handleLayersInClosedState(t.detail.previousIndex),this.handleLayersInOpenedState(t.detail.index)}handleLayersInOpenedState(t){this.layers.filter((e=>e.panelIndex===t)).forEach((t=>{const e=t.layer;"opened"===e.visibleOn?e.show():"closed"===e.visibleOn&&e.hide()}))}handleLayersInClosedState(t){this.layers.filter((e=>e.panelIndex===t)).forEach((t=>{const e=t.layer;"opened"===e.visibleOn?e.hide():"closed"===e.visibleOn&&e.show()}))}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.layers.forEach((t=>{t.destroy()}))}},class{namespace="lazyloading";accordion;constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.checkAndLoadVisibleImages.bind(this)),this.accordion.addEventListener("pageScroll."+this.namespace,this.checkAndLoadVisibleImages.bind(this))}checkAndLoadVisibleImages(){const t=this.accordion.getFirstPanelFromPage(),e=this.accordion.getLastPanelFromPage();(e!==this.accordion.getTotalPanels()-1?this.accordion.panels.slice(t,e+1):this.accordion.panels.slice(t)).forEach((t=>{const e=t.panelEl;null===e.getAttribute("data-loaded")&&(e.setAttribute("data-loaded",!0),Array.from(e.getElementsByTagName("img")).forEach((t=>{this.loadImage(t)})))}))}loadImage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=new Image;i.setAttribute("class",t.getAttribute("class")),i.setAttribute("style",t.getAttribute("style"));for(let e in t.dataset)i.setAttribute("data-"+e,t.dataset[e]);null!==t.getAttribute("width")&&i.setAttribute("width",t.getAttribute("width")),null!==t.getAttribute("height")&&i.setAttribute("height",t.getAttribute("height")),null!==t.getAttribute("alt")&&i.setAttribute("alt",t.getAttribute("alt")),null!==t.getAttribute("title")&&i.setAttribute("title",t.getAttribute("title")),null!==t.getAttribute("data-src")?(i.setAttribute("src",t.getAttribute("data-src")),i.removeAttribute("data-src")):i.setAttribute("src",t.getAttribute("src")),null!==t.getAttribute("data-srcset")&&(i.setAttribute("srcset",t.getAttribute("data-srcset")),i.removeAttribute("data-srcset")),t.after(i),t.remove(),t=null,"function"==typeof e&&e(i)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("gotoSlide."+this.namespace)}},class{namespace="retina";accordion;constructor(t){this.accordion=t,this.init()}init(){window.devicePixelRatio<2||this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.accordion.panels.forEach((t=>{const e=t.panelEl;null===e.getAttribute("data-retina-loaded")&&(e.setAttribute("data-retina-loaded",!0),Array.from(e.querySelectorAll("img[data-retina]")).forEach((t=>{null!==t.getAttribute("data-src")?(t.setAttribute("data-src",t.getAttribute("data-retina")),t.removeAttribute("data-retina")):this.loadImage(t)})))}))}loadImage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=!1,s="";if(null!==t.getAttribute("data-retina")&&(i=!0,s=t.getAttribute("data-retina")),null!==t.getAttribute("data-src")&&(!1===i&&(s=t.getAttribute("data-src")),t.removeAttribute("data-src")),""===s)return;const n=new Image;n.setAttribute("class",t.getAttribute("class")),n.setAttribute("style",t.getAttribute("style"));for(let e in t.dataset)n.setAttribute("data-"+e,t.dataset[e]);null!==t.getAttribute("width")&&n.setAttribute("width",t.getAttribute("width")),null!==t.getAttribute("height")&&n.setAttribute("height",t.getAttribute("height")),null!==t.getAttribute("alt")&&n.setAttribute("alt",t.getAttribute("alt")),null!==t.getAttribute("title")&&n.setAttribute("title",t.getAttribute("title")),null!==t.getAttribute("data-srcset")&&(n.setAttribute("srcset",t.getAttribute("data-srcset")),n.removeAttribute("data-srcset")),t.after(n),t.remove(),t=null,n.setAttribute("src",s),"function"==typeof e&&e(n)}destroy(){this.accordion.removeEventListener("update."+this.namespace)}},class{namespace="touchswipe";accordion;settings;isTouchSwipeEnabled=!1;touchStartPoint={x:0,y:0};touchEndPoint={x:0,y:0};touchDistance={x:0,y:0};touchStartPosition=0;isTouchMoving=!1;touchSwipeEvents={startEvent:["touchstart","mousedown"],moveEvent:["touchmove","mousemove"],endEvent:["touchend","mouseup"]};previousStartEvent="";eventHandlerReferences={};defaults={touchSwipe:!0,touchSwipeThreshold:50};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.touchSwipe&&!1===this.isTouchSwipeEnabled?this.add():!1===this.settings.touchSwipe&&!0===this.isTouchSwipeEnabled&&this.destroy(),this.accordion.getTotalPages()>1?this.accordion.panelsContainerEl.classList.add("ga-grab"):this.accordion.panelsContainerEl.classList.remove("ga-grab")}add(){this.isTouchSwipeEnabled=!0,Array.from(this.touchSwipeEvents.startEvent).forEach((t=>{this.accordion.panelsContainerEl.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchStartHandler(t)})})),this.accordion.panelsContainerEl.addEventListener("dragstart",this.eventHandlerReferences.dragstart=t=>{t.preventDefault()}),Array.from(this.accordion.panelsContainerEl.getElementsByTagName("a")).forEach((t=>{t.addEventListener("click",this.eventHandlerReferences["click.link"]=t=>{this.accordion.accordionEl.classList.contains("ga-swiping")&&t.preventDefault()})})),this.accordion.panelsContainerEl.addEventListener("touchstart",this.eventHandlerReferences["touchstart.link"]=()=>{const t=this.accordion.panelsContainerEl.querySelectorAll("[data-disabledlink]");Array.from(t).forEach((t=>{t.style.removeProperty("pointer-events"),t.removeAttribute("data-disabledlink")}))}),Array.from(this.accordion.panelsContainerEl.getElementsByTagName("a")).forEach((t=>{t.addEventListener("touchend",this.eventHandlerReferences["touchend.link"]=()=>{const e=function(t,e){if(null==t||void 0===t.tagName)return null;for(;!t.classList.contains(e)&&t.tagName!==e.toUpperCase();){if("HTML"===t.tagName)return null;t=t.parentElement}return t}(t,"ga-panel");null!==e&&!1===e.classList.contains("ga-opened")&&(t.style["pointer-events"]="none",t.setAttribute("data-disabledlink",!0))})}))}touchStartHandler(t){if("mousedown"===t.type&&"touchstart"===this.previousStartEvent)return void(this.previousStartEvent=t.type);if(this.previousStartEvent=t.type,t.target.classList.contains("ga-selectable"))return;const e=void 0!==t.touches?t.touches[0]:t,i="horizontal"===this.settings.orientation?"left":"top";this.touchStartPoint.x=e.pageX||e.clientX,this.touchStartPoint.y=e.pageY||e.clientY,this.touchStartPosition=parseInt(this.accordion.panelsContainerEl.style[i],10),this.touchDistance.x=this.touchDistance.y=0,Array.from(this.touchSwipeEvents.moveEvent).forEach((t=>{this.accordion.panelsContainerEl.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchMoveHandler(t)})})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchEndHandler(t)})})),this.accordion.panelsContainerEl.classList.replace("ga-grab","ga-grabbing")}touchMoveHandler(t){const e=void 0!==t.touches?t.touches[0]:t,i="horizontal"===this.settings.orientation?"left":"top";this.isTouchMoving=!0,!1===this.accordion.accordionEl.classList.contains("ga-swiping")&&this.accordion.accordionEl.classList.add("ga-swiping"),this.touchEndPoint.x=e.pageX||e.clientX,this.touchEndPoint.y=e.pageY||e.clientY,this.touchDistance.x=this.touchEndPoint.x-this.touchStartPoint.x,this.touchDistance.y=this.touchEndPoint.y-this.touchStartPoint.y;let n="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y;if(!0===this.allowOppositeScrolling)return;t.preventDefault();const a=parseInt(this.accordion.panelsContainerEl.style[i],10);(a>=0&&0===this.accordion.currentPage||a<=-this.accordion.totalPanelsSize+this.accordion.totalSize&&this.accordion.currentPage===this.accordion.getTotalPages()-1)&&(n*=.2),this.accordion.panelsContainerEl.style[i]=s(this.touchStartPosition+n)}touchEndHandler(){let t="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y;const e="horizontal"===this.settings.orientation?"left":"top";Array.from(this.touchSwipeEvents.moveEvent).forEach((t=>{this.accordion.panelsContainerEl.removeEventListener(t,this.eventHandlerReferences[t])})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.removeEventListener(t,this.eventHandlerReferences[t])})),this.accordion.panelsContainerEl.classList.replace("ga-grabbing","ga-grab"),this.accordion.accordionEl.classList.contains("ga-swiping")&&setTimeout((()=>{this.accordion.accordionEl.classList.remove("ga-swiping")}),100),!1!==this.isTouchMoving&&(this.isTouchMoving=!1,t>this.settings.touchSwipeThreshold?this.accordion.currentPage>0?this.accordion.previousPage():this.accordion.panelsContainerEl.style[e]=this.touchStartPosition:-t>this.settings.touchSwipeThreshold?this.accordion.currentPage{t.removeEventListener("click",this.eventHandlerReferences["click.link"]),t.removeEventListener("touchend",this.eventHandlerReferences["touchend.link"])})),Array.from([...this.touchSwipeEvents.startEvent,...this.touchSwipeEvents.moveEvent]).forEach((t=>{this.accordion.panelsContainerEl.removeEventListener(t,this.eventHandlerReferences[t])})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.removeEventListener(t,this.eventHandlerReferences[t])})),this.accordion.panelsContainerEl.classList.remove("ga-grab")}},class{namespace="swapbackground";accordion;settings;eventHandlerReferences={};defaults={swapBackgroundDuration:700,fadeOutBackground:!1};constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("panelOpen."+this.namespace,(t=>{const e=this.accordion.getPanelAt(t.detail.index),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];if(void 0!==s&&(s.style.visibility="visible",s.style.opacity=0,this.fadeIn(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeOut(i)),-1!==t.detail.previousIndex&&t.detail.index!==t.detail.previousIndex){const e=this.accordion.getPanelAt(t.detail.previousIndex),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];void 0!==s&&(this.fadeOut(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeIn(i))}})),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{if(-1===t.detail.previousIndex)return;const e=this.accordion.getPanelAt(t.detail.previousIndex),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];void 0!==s&&(this.fadeOut(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeIn(i))}))}fadeIn(t){t.style.visibility="visible",t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]),t.addEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]=e=>{e.target===e.currentTarget&&(t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]),t.style.removeProperty("transition"))}),setTimeout((()=>{t.style.opacity=1,t.style.transition="all "+this.settings.swapBackgroundDuration/1e3+"s"}),100)}fadeOut(t){t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]),t.addEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]=e=>{e.target===e.currentTarget&&(t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]),t.style.removeProperty("transition"),t.style.visibility="hidden")}),setTimeout((()=>{t.style.opacity=0,t.style.transition="all "+this.settings.swapBackgroundDuration/1e3+"s"}),100)}destroy(){this.removeEventListener("panelOpen."+this.namespace),this.removeEventListener("panelsClose."+this.namespace)}},class{namespace="mousewheel";accordion;settings;isEnabled=!1;allowMouseWheelScroll=!0;eventHandlerReferences={};defaults={mouseWheel:!0,mouseWheelDirection:"normal",mouseWheelSensitivity:10,mouseWheelTarget:"panel"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.mouseWheel&&!1===this.isEnabled&&(this.isEnabled=!0,this.enable()),!1===this.settings.mouseWheel&&!0===this.isEnabled&&(this.isEnabled=!1,this.disable())}enable(){this.accordion.accordionEl.addEventListener("wheel",this.eventHandlerReferences.wheel=t=>{t.preventDefault();let e=t.deltaY*("normal"===this.settings.mouseWheelDirection?1:-1);!0===this.allowMouseWheelScroll&&Math.abs(e)>=this.settings.mouseWheelSensitivity&&(this.allowMouseWheelScroll=!1,setTimeout((()=>{this.allowMouseWheelScroll=!0}),500),e>=this.settings.mouseWheelSensitivity?"page"===this.settings.mouseWheelTarget?this.accordion.nextPage():this.accordion.nextPanel():e<=-this.settings.mouseWheelSensitivity&&("page"===this.settings.mouseWheelTarget?this.accordion.previousPage():this.accordion.previousPanel()))})}disable(){this.accordion.accordionEl.removeEventListener("wheel",this.eventHandlerReferences.wheel)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.disable()}},class{namespace="video";accordion=null;settings=null;videoReferences={};preinitVideoClickHandler=null;defaults={openPanelVideoAction:"none",closePanelVideoAction:"pauseVideo",playVideoAction:"stopAutoplay",pauseVideoAction:"none",endVideoAction:"none"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this)),this.accordion.addEventListener("panelOpen."+this.namespace,this.panelOpenHandler.bind(this)),this.accordion.addEventListener("panelOpenComplete."+this.namespace,this.panelOpenCompleteHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video:not(a):not([data-video-init])")).forEach((t=>{this.initVideo(t)})),Array.from(this.accordion.accordionEl.querySelectorAll("a.ga-video:not([data-video-preinit])")).forEach((t=>{this.preinitVideo(t)}))}initVideo(t){t.setAttribute("data-video-init",!0);const e=new v(t),i=(parseInt((new Date).valueOf(),10)*Math.floor(1e3*Math.random())).toString();t.setAttribute("data-video-ref",i),this.videoReferences[i]=e,e.addEventListener("videoPlay",(()=>{"stopAutoplay"===this.settings.playVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.accordion.addOns.Autoplay.stop(),this.settings.autoplay=!1,this.accordion.addOns.Autoplay.settings.autoplay=!1)})),e.addEventListener("videoPause",(()=>{"startAutoplay"===this.settings.pauseVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.settings.autoplay=!0,this.accordion.addOns.Autoplay.settings.autoplay=!0,this.accordion.addOns.Autoplay.stop(),this.accordion.addOns.Autoplay.start())})),e.addEventListener("videoEnded",(()=>{"startAutoplay"===this.settings.endVideoAction&&void 0!==this.accordion.addOns.Autoplay?(this.settings.autoplay=!0,this.accordion.addOns.Autoplay.settings.autoplay=!0,this.accordion.addOns.Autoplay.stop(),this.accordion.addOns.Autoplay.start()):"nextPanel"===this.settings.endVideoAction?this.accordion.nextPanel():"replayVideo"===this.settings.endVideoAction&&e.replay()}))}preinitVideo(t){t.setAttribute("data-video-preinit",!0),this.preinitVideoClickHandler=t=>{let e=t.target;if(this.accordion.accordionEl.classList.contains("ga-swiping")||null!==e.parentElement.querySelector(".ga-video[data-video-init]"))return;t.preventDefault();let i,s,n,a,o,r,l,h=e.getAttribute("href"),d=e.getElementsByTagName("img")[0],c=d.getAttribute("width")||d.clientWidth,p=d.getAttribute("height")||d.clientHeight;-1!==h.indexOf("youtube")||-1!==h.indexOf("youtu.be")?s="youtube":-1!==h.indexOf("vimeo")&&(s="vimeo"),n="youtube"===s?/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/:/(www\.)?vimeo.com\/(\d+)/,a=h.match(n),o=a[2],r="youtube"===s?"//www.youtube.com/embed/"+o+"?enablejsapi=1&wmode=opaque":"//player.vimeo.com/video/"+o,l=h.split("?")[1],void 0!==l&&(l=l.split("&"),l.forEach((t=>{-1===t.indexOf(o)&&(r+="&"+t)}))),i=document.createElement("iframe"),i.setAttribute("src",r),i.setAttribute("width",c),i.setAttribute("height",p),i.setAttribute("class",e.getAttribute("class")),i.setAttribute("frameborder",0),i.setAttribute("allowfullscreen","allowfullscreen"),e.parentElement.insertBefore(i,e),this.initVideo(i),this.videoReferences[i.getAttribute("data-video-ref")].play(),e.style.display="none"},t.addEventListener("click",this.preinitVideoClickHandler)}panelOpenHandler(t){if(-1===t.detail.previousIndex)return;const e=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.previousIndex].querySelector(".ga-video[data-video-init]");if(null===e)return;const i=this.videoReferences[e.getAttribute("data-video-ref")];null!==i&&("stopVideo"===this.settings.closePanelVideoAction?i.stop():"pauseVideo"===this.settings.closePanelVideoAction?i.pause():"removeVideo"===this.settings.closePanelVideoAction&&(null!==e.parentElement.querySelector("a.ga-video")?(e.parentElement.querySelector("a.ga-video").style.removeProperty("display"),i.destroy(),e.remove()):i.stop()))}panelOpenCompleteHandler(t){if("playVideo"===this.settings.openPanelVideoAction&&t.detail.index===this.accordion.getCurrentIndex()){const e=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.index].querySelector(".ga-video[data-video-init]"),i=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.index].querySelector(".ga-video[data-video-preinit]");if(null!==e){const t=this.videoReferences[t.getAttribute("data-video-ref")];t.play()}else null!==i&&i.dispatchEvent("click");"stopAutoplay"===this.settings.playVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.accordion.addOns.Autoplay.stop(),this.settings.autoplay=!1,this.accordion.addOns.Autoplay.settings.autoplay=!1)}}destroy(){Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video[ data-video-preinit ]")).forEach((t=>{t.removeAttribute("data-video-preinit"),t.removeEventListener("click",this.preinitVideoClickHandler)})),Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video[ data-video-init ]")).forEach((t=>{t.removeAttribute("data-video-init");const e=this.videoReferences[t.getAttribute("data-video-ref")];e.removeEventListener("videoPlay"),e.removeEventListener("videoPause"),e.removeEventListener("videoEnded"),e.destroy(),t.removeAttribute("data-video-ref"),null!==t.parentElement.querySelector(".ga-video[ data-video-preinit ]")&&t.remove()})),this.videoReferences.length=0,this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace)}}]),window.GridAccordion=class extends a{namespace="gridaccordion";settings={};selector;accordionEl=null;panelsEl=null;panelsMaskEl=null;currentIndex=-1;currentPage=0;columns=0;rows=0;totalWidth=0;totalHeight=0;totalPanelsSize=0;computedOpenedPanelWidth=0;computedOpenedPanelHeight=0;maxComputedOpenedPanelWidth=0;maxComputedOpenedPanelHeight=0;collapsedPanelWidth=0;collapsedPanelHeight=0;closedPanelWidth=0;closedPanelHeight=0;computedPanelDistance=0;panels=[];mouseDelayTimer=0;openPanelAnimation={};closePanelsAnimation={};previousColumns=-1;previousRows=-1;isPageScrolling=!1;autoResponsiveRatio=1;loadingPanels=[];eventHandlerReferences={};windowResizeHandler;addOnsManager;constructor(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(),this.selector=e,this.settings=null!==i?{...t,...i}:{...t},this.addOnsManager=new h(this,this.settings.addOns),this.addOnsManager.init(),this.init()}init(){if(this.dispatchEvent("beforeInit"),this.accordionEl=document.querySelector(this.selector),this.accordionEl.classList.remove("ga-no-js"),this.panelsMaskEl=document.createElement("div"),this.panelsMaskEl.classList.add("ga-mask"),this.accordionEl.appendChild(this.panelsMaskEl),this.panelsContainerEl=this.accordionEl.getElementsByClassName("ga-panels")[0],0===this.accordionEl.getElementsByClassName("ga-panels").length&&(this.panelsContainerEl=document.createElement("div"),this.panelsContainerEl.classList.add("ga-panels")),this.panelsMaskEl.appendChild(this.panelsContainerEl),!0===this.settings.shuffle){const t=[...Array.from(this.panelsContainerEl.getElementsByClassName("ga-panel"))];for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}this.panelsContainerEl.replaceChildren(...t)}this.currentIndex=this.settings.startPanel,-1===this.currentIndex?this.accordionEl.classList.add("ga-closed"):this.accordionEl.classList.add("ga-opened"),-1!==this.settings.startPage&&(this.currentPage=this.settings.startPage),this.windowResizeHandler=new r,this.windowResizeHandler.addEventListener("resize",(()=>{this.resize()})),this.update(),-1!==this.currentIndex&&(this.accordionEl.getElementsByClassName("ga-panel")[this.currentIndex].classList.add("ga-opened"),this.dispatchEvent("panelOpen",{index:this.currentIndex,previousIndex:-1})),this.accordionEl.addEventListener("mouseenter",this.eventHandlerReferences["mouseenter.accordion"]=()=>{this.dispatchEvent("accordionMouseOver")}),this.accordionEl.addEventListener("mouseleave",this.eventHandlerReferences["mouseleave.accordion"]=()=>{clearTimeout(this.mouseDelayTimer),!0===this.settings.closePanelsOnMouseOut&&this.closePanels(),this.dispatchEvent("accordionMouseOut")}),this.dispatchEvent("init")}update(){if(this.dispatchEvent("beforeUpdate"),"horizontal"===this.settings.orientation?(this.accordionEl.classList.remove("ga-vertical"),this.accordionEl.classList.add("ga-horizontal")):"vertical"===this.settings.orientation&&(this.accordionEl.classList.remove("ga-horizontal"),this.accordionEl.classList.add("ga-vertical")),[...Array.from(this.accordionEl.getElementsByClassName("ga-background")),...Array.from(this.accordionEl.getElementsByClassName("ga-background-opened"))].forEach((t=>{t.style.removeProperty("width"),t.style.removeProperty("height")})),this.updatePanels(),this.columns=this.settings.columns,this.rows=this.settings.rows,-1===this.settings.columns&&-1===this.settings.rows?(this.columns=4,this.rows=3):-1===this.settings.columns?(this.columns=Math.ceil(this.getTotalPanels()/this.settings.rows),this.rows=this.settings.rows):-1===this.settings.rows&&(this.columns=this.settings.columns,this.rows=Math.ceil(this.getTotalPanels()/this.settings.columns)),-1===this.settings.columns||-1===this.settings.rows)this.currentPage=0;else if(-1!==this.currentIndex)this.currentPage=Math.floor(this.currentIndex/(this.settings.columns*this.settings.rows));else if(this.settings.columns!==this.previousColumns&&-1!==this.previousColumns||this.settings.rows!==this.previousRows&&-1!==this.previousRows){let t=Math.min(Math.round(this.currentPage*(this.previousColumns*this.previousRows)/(this.settings.columns*this.settings.rows)),this.getTotalPages()-1);this.currentPage!==t&&(this.currentPage=t)}this.panelsContainerEl.removeAttribute("style"),this.resize(),this.dispatchEvent("update")}resize(){if(this.dispatchEvent("beforeResize"),this.panelsMaskEl.removeAttribute("style"),!0===this.settings.responsive?(this.accordionEl.style.width="100%",this.accordionEl.style.height=s(this.settings.height),this.accordionEl.style.maxWidth=s(this.settings.width),this.accordionEl.style.maxHeight=s(this.settings.height),-1===this.settings.aspectRatio&&(this.settings.aspectRatio=this.settings.width/this.settings.height),this.accordionEl.style.height=s(this.accordionEl.clientWidth/this.settings.aspectRatio),"auto"===this.settings.responsiveMode?(this.autoResponsiveRatio=this.accordionEl.clientWidth/this.settings.width,this.panelsMaskEl.style.width=s(this.settings.width),isNaN(this.settings.height)?this.panelsMaskEl.style.height=s(Math.min(this.settings.width/this.settings.aspectRatio,parseInt(this.settings.height,10)/100*window.innerHeight)):this.panelsMaskEl.style.height=s(Math.min(this.settings.width/this.settings.aspectRatio,this.settings.height)),this.autoResponsiveRatio<1?(this.panelsMaskEl.style.transform=`scaleX( ${this.autoResponsiveRatio} ) scaleY( ${this.autoResponsiveRatio} )`,this.panelsMaskEl.style.transformOrigin="top left"):(this.panelsMaskEl.style.removeProperty("transform"),this.panelsMaskEl.style.removeProperty("transform-origin")),this.totalWidth=this.panelsMaskEl.clientWidth,this.totalHeight=this.panelsMaskEl.clientHeight):(this.totalWidth=this.accordionEl.clientWidth,this.totalHeight=this.accordionEl.clientHeight)):(this.accordionEl.style.width=s(this.settings.width),this.accordionEl.style.height=s(this.settings.height),this.accordionEl.style.removeProperty("max-width"),this.accordionEl.style.removeProperty("max-height"),this.totalWidth=this.accordionEl.clientWidth,this.totalHeight=this.accordionEl.clientHeight),this.loadingPanels.length=0,this.computedPanelDistance=this.settings.panelDistance,"string"==typeof this.computedPanelDistance&&(-1!==this.computedPanelDistance.indexOf("%")?this.computedPanelDistance=this.totalWidth*(parseInt(this.computedPanelDistance,10)/100):-1!==this.computedPanelDistance.indexOf("px")&&(this.computedPanelDistance=parseInt(this.computedPanelDistance,10))),this.closedPanelWidth=(this.totalWidth-(this.columns-1)*this.computedPanelDistance)/this.columns,this.closedPanelHeight=(this.totalHeight-(this.rows-1)*this.computedPanelDistance)/this.rows,this.computedOpenedPanelWidth=this.settings.openedPanelWidth,this.maxComputedOpenedPanelWidth=this.settings.maxOpenedPanelWidth,"string"==typeof this.maxComputedOpenedPanelWidth&&(-1!==this.maxComputedOpenedPanelWidth.indexOf("%")?this.maxComputedOpenedPanelWidth=this.totalWidth*(parseInt(this.maxComputedOpenedPanelWidth,10)/100):-1!==this.maxComputedOpenedPanelWidth.indexOf("px")&&(this.maxComputedOpenedPanelWidth=parseInt(this.maxComputedOpenedPanelWidth,10))),this.computedOpenedPanelHeight=this.settings.openedPanelHeight,this.maxComputedOpenedPanelHeight=this.settings.maxOpenedPanelHeight,"string"==typeof this.maxComputedOpenedPanelHeight&&(-1!==this.maxComputedOpenedPanelHeight.indexOf("%")?this.maxComputedOpenedPanelHeight=this.totalHeight*(parseInt(this.maxComputedOpenedPanelHeight,10)/100):-1!==this.maxComputedOpenedPanelHeight.indexOf("px")&&(this.maxComputedOpenedPanelHeight=parseInt(this.maxComputedOpenedPanelHeight,10))),"string"==typeof this.computedOpenedPanelWidth)if(-1!==this.computedOpenedPanelWidth.indexOf("%"))this.computedOpenedPanelWidth=this.totalWidth*(parseInt(this.computedOpenedPanelWidth,10)/100);else if(-1!==this.computedOpenedPanelWidth.indexOf("px"))this.computedOpenedPanelWidth=parseInt(this.computedOpenedPanelWidth,10);else if("max"===this.computedOpenedPanelWidth&&-1!==this.currentIndex){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelWidth="loading"===t?this.closedPanelWidth:Math.min(t.width,this.maxComputedOpenedPanelWidth)}if("string"==typeof this.computedOpenedPanelHeight)if(-1!==this.computedOpenedPanelHeight.indexOf("%"))this.computedOpenedPanelHeight=this.totalHeight*(parseInt(this.computedOpenedPanelHeight,10)/100);else if(-1!==this.computedOpenedPanelHeight.indexOf("px"))this.computedOpenedPanelHeight=parseInt(this.computedOpenedPanelHeight,10);else if("max"===this.computedOpenedPanelHeight&&-1!==this.currentIndex){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelHeight="loading"===t?this.closedPanelHeight:Math.min(t.height,this.maxComputedOpenedPanelHeight)}if("auto"===this.settings.openedPanelWidth||"auto"===this.settings.openedPanelHeight){const t=this.getMinSize(this.getFirstPanelFromPage(),this.getLastPanelFromPage()),e=t.width,i=t.height;"auto"===this.settings.openedPanelWidth&&(this.computedOpenedPanelWidth=e),"auto"===this.settings.openedPanelHeight&&(this.computedOpenedPanelHeight=i)}if(Array.from(document.getElementsByClassName("ga-background")).forEach((t=>{t.style.maxWidth=s(this.maxComputedOpenedPanelWidth),t.style.maxHeight=s(this.maxComputedOpenedPanelHeight)})),Array.from(document.getElementsByClassName("ga-background-opened")).forEach((t=>{t.style.maxWidth=s(this.maxComputedOpenedPanelWidth),t.style.maxHeight=s(this.maxComputedOpenedPanelHeight)})),this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1),this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1),this.computedOpenedPanelWidth=Math.floor(this.computedOpenedPanelWidth),this.computedOpenedPanelHeight=Math.floor(this.computedOpenedPanelHeight),this.collapsedPanelWidth=Math.floor(this.collapsedPanelWidth),this.collapsedPanelHeight=Math.floor(this.collapsedPanelHeight),this.closedPanelWidth=Math.floor(this.closedPanelWidth),this.closedPanelHeight=Math.floor(this.closedPanelHeight),this.totalWidth=this.closedPanelWidth*this.columns+this.computedPanelDistance*(this.columns-1),this.totalHeight=this.closedPanelHeight*this.rows+this.computedPanelDistance*(this.rows-1),"custom"===this.settings.responsiveMode||!1===this.settings.responsive?(this.accordionEl.style.width=s(this.totalWidth),this.accordionEl.style.height=s(this.totalHeight)):(this.accordionEl.style.width=s(this.totalWidth*this.autoResponsiveRatio),this.accordionEl.style.height=s(this.totalHeight*this.autoResponsiveRatio),this.panelsMaskEl.style.width=s(this.totalWidth),this.panelsMaskEl.style.height=s(this.totalHeight)),"horizontal"===this.settings.orientation?(this.totalPanelsSize=this.totalWidth*this.getTotalPages()+this.computedPanelDistance*(this.getTotalPages()-1),this.panelsContainerEl.style.width=s(this.totalPanelsSize)):(this.totalPanelsSize=this.totalHeight*this.getTotalPages()+this.computedPanelDistance*(this.getTotalPages()-1),this.panelsContainerEl.style.height=s(this.totalPanelsSize)),this.getTotalPages()>1){const t="horizontal"===this.settings.orientation?"left":"top",e=-(("horizontal"===this.settings.orientation?this.totalWidth:this.totalHeight)+this.computedPanelDistance)*this.currentPage;this.panelsContainerEl.style[t]=s(e)}this.panels.forEach(((t,e)=>{let i,s,n,a,o,r;if("horizontal"===this.settings.orientation?(o=e%this.columns+this.columns*Math.floor(e/(this.rows*this.columns)),r=Math.floor(e/this.columns)-this.rows*Math.floor(e/(this.rows*this.columns)),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(i=this.currentPage*(this.totalWidth+this.computedPanelDistance)+(o-this.currentPage*this.columns)*(this.collapsedPanelWidth+this.computedPanelDistance)+(e%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),s=r*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(e/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(i=o*(this.closedPanelWidth+this.computedPanelDistance),s=r*(this.closedPanelHeight+this.computedPanelDistance))):(o=e%this.columns,r=Math.floor(e/this.columns),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(i=o*(this.collapsedPanelWidth+this.computedPanelDistance)+(e%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),s=this.currentPage*(this.totalHeight+this.computedPanelDistance)+(r-this.currentPage*this.rows)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(e/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(i=o*(this.closedPanelWidth+this.computedPanelDistance),s=r*(this.closedPanelHeight+this.computedPanelDistance))),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(n=e%this.columns==this.currentIndex%this.columns?this.computedOpenedPanelWidth:this.collapsedPanelWidth,a=Math.floor(e/this.columns)===Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight:this.collapsedPanelHeight):(n=this.closedPanelWidth,a=this.closedPanelHeight),Math.floor(e/(this.rows*this.columns))===this.currentPage&&"max"===this.settings.openedPanelWidth&&e%this.columns==this.currentIndex%this.columns||"max"===this.settings.openedPanelHeight&&Math.floor(e/this.columns)===Math.floor(this.currentIndex/this.columns)){const o=t.getContentSize();e%this.columns==this.currentIndex%this.columns&&("loading"===o&&-1===this.loadingPanels.indexOf(e)?this.loadingPanels.push(e):o.width{if(null===this.accordionEl.querySelector(`.ga-panel[data-index="${e}"]`)){t.removeEventListener("panelMouseOver"),t.removeEventListener("panelMouseOut"),t.removeEventListener("panelClick"),t.removeEventListener("imagesComplete"),t.destroy();const i=this.panels.findIndex((t=>t.index===e));this.panels.splice(i,1)}})),Array.from(this.accordionEl.getElementsByClassName("ga-panel")).forEach(((t,e)=>{if(!1===t.hasAttribute("data-init")){const i=this.createPanel(t);this.panels.splice(e,0,i)}this.panels[e].settings=this.settings,this.panels[e].index=e}))}createPanel(t){const e=new o(t,this.settings);return e.addEventListener("panelMouseOver",(t=>{!0!==this.isPageScrolling&&("hover"===this.settings.openPanelOn&&(clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=setTimeout((()=>{this.openPanel(t.detail.index)}),this.settings.mouseDelay)),this.dispatchEvent("panelMouseOver",{index:t.detail.index}))})),e.addEventListener("panelMouseOut",(t=>{!0!==this.isPageScrolling&&this.dispatchEvent("panelMouseOut",{index:t.detail.index})})),e.addEventListener("panelClick",(t=>{this.accordionEl.classList.contains("ga-swiping")||("click"===this.settings.openPanelOn&&(t.detail.index!==this.currentIndex?this.openPanel(t.detail.index):this.closePanels()),this.dispatchEvent("panelClick",{index:t.detail.index}))})),e.addEventListener("panelMouseDown",(e=>{const i=t.getElementsByTagName("a");i.length<1||(Array.from(i).forEach((t=>{t.removeEventListener("click",this.eventHandlerReferences["click.link.panel"])})),e.detail.index!==this.currentIndex&&"click"===this.settings.openPanelOn&&Array.from(i).forEach((t=>{t.addEventListener("click",this.eventHandlerReferences["click.link.panel"]=t=>{t.preventDefault()})})))})),e.addEventListener("imagesComplete",(t=>{t.detail.index===this.currentIndex&&t.detail.contentSize!==this.computedOpenedPanelSize&&this.openPanel(t.detail.index,!0)})),e}getPanelAt(t){return this.panels[t]}getCurrentIndex(){return this.currentIndex}getTotalPanels(){return this.panels.length}nextPanel(){const t=this.currentIndex>=this.getTotalPanels()-1?0:this.currentIndex+1;this.openPanel(t)}previousPanel(){const t=this.currentIndex<=0?this.getTotalPanels()-1:this.currentIndex-1;this.openPanel(t)}destroy(){this.addOnsManager.destroyAll(),this.accordionEl.removeAttribute("style"),this.panelsContainerEl.removeAttribute("style"),this.accordionEl.setAttribute("class","grid-accordion ga-no-js"),this.accordionEl.removeEventListener("mouseenter",this.eventHandlerReferences["mouseenter.accordion"]),this.accordionEl.removeEventListener("mouseleave",this.eventHandlerReferences["mouseleave.accordion"]),this.windowResizeHandler.removeEventListener("resize"),this.windowResizeHandler.destroy(),this.stopPanelsAnimation(this.openPanelAnimation),this.stopPanelsAnimation(this.closePanelsAnimation),this.panels.forEach((t=>{t.removeEventListener("panelMouseOver"),t.removeEventListener("panelMouseOut"),t.removeEventListener("panelClick"),t.removeEventListener("imagesComplete"),t.destroy()})),this.panels.length=0,this.accordionEl.insertBefore(this.panelsContainerEl,this.accordionEl.firstChild),this.panelsMaskEl.remove()}animatePanels(t,e){const i=(new Date).valueOf();let s=0;t.isRunning=!0,t.timer=window.requestAnimationFrame((function n(){s<1?(s=((new Date).valueOf()-i)/e.duration,s>1&&(s=1),s=.5-Math.cos(s*Math.PI)/2,e.step(s),t.timer=window.requestAnimationFrame(n)):(e.complete(),t.isRunning=!1,window.cancelAnimationFrame(t.timer))}))}stopPanelsAnimation(t){void 0!==t.isRunning&&!0===t.isRunning&&(t.isRunning=!1,window.cancelAnimationFrame(t.timer))}openPanel(t,e){if(t===this.currentIndex&&!0!==e)return;!0===this.accordionEl.classList.contains("ga-closed")&&this.accordionEl.classList.replace("ga-closed","ga-opened");const i=this.currentIndex;if(this.currentIndex=t,-1!==this.settings.columns&&-1!==this.settings.rows){const e=Math.floor(this.currentIndex/(this.columns*this.rows));e!==this.currentPage&&this.gotoPage(e),this.currentIndex=t}const s=[],n=[],a=[],o=[],r=[],l=[],h=[],d=[],c=[],p=this.getFirstPanelFromPage(),u=this.getLastPanelFromPage();let g=0;if(this.loadingPanels.length=0,null!==this.accordionEl.querySelector(".ga-panel.ga-opened")&&this.accordionEl.querySelector(".ga-panel.ga-opened").classList.remove("ga-opened"),this.accordionEl.getElementsByClassName("ga-panel")[this.currentIndex].classList.add("ga-opened"),"max"===this.settings.openedPanelWidth){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelWidth="loading"===t?this.closedPanelWidth:Math.min(t.width,this.maxComputedOpenedPanelWidth),this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1)}if("max"===this.settings.openedPanelHeight){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelHeight="loading"===t?this.closedPanelHeight:Math.min(t.height,this.maxComputedOpenedPanelHeight),this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1)}if("auto"===this.settings.openedPanelWidth||"auto"===this.settings.openedPanelHeight){const t=this.getMinSize(p,u),e=t.width,i=t.height;"auto"===this.settings.openedPanelWidth&&(this.computedOpenedPanelWidth=e,this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1)),"auto"===this.settings.openedPanelHeight&&(this.computedOpenedPanelHeight=i,this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1))}for(let t=p;t<=u;t++){const e=this.getPanelAt(t),i=e.getPosition(),p=e.getContentSize();r[t]=i.left,l[t]=i.top,"horizontal"===this.settings.orientation?(s[t]=this.currentPage*(this.totalWidth+this.computedPanelDistance)+g%this.columns*(this.collapsedPanelWidth+this.computedPanelDistance)+(t%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),n[t]=Math.floor(g/this.columns)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(t/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(s[t]=g%this.columns*(this.collapsedPanelWidth+this.computedPanelDistance)+(t%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),n[t]=this.currentPage*(this.totalHeight+this.computedPanelDistance)+Math.floor(g/this.columns)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(t/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0));const u=e.getSize();h[t]=u.width,d[t]=u.height,a[t]=t%this.columns==this.currentIndex%this.columns?this.computedOpenedPanelWidth:this.collapsedPanelWidth,o[t]=Math.floor(t/this.columns)===Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight:this.collapsedPanelHeight,"max"===this.settings.openedPanelWidth&&t%this.columns==this.currentIndex%this.columns&&("loading"===p&&-1===this.loadingPanels.indexOf(t)?this.loadingPanels.push(t):p.width{for(let e=0;e{this.dispatchEvent("panelOpenComplete",{index:this.currentIndex})}}),this.dispatchEvent("panelOpen",{index:this.currentIndex,previousIndex:i})}closePanels(){const t=this.currentIndex;this.currentIndex=-1,!0===this.accordionEl.classList.contains("ga-opened")&&this.accordionEl.classList.replace("ga-opened","ga-closed"),null!==this.accordionEl.querySelector(".ga-panel.ga-opened")&&this.accordionEl.querySelector(".ga-panel.ga-opened").classList.remove("ga-opened"),clearTimeout(this.mouseDelayTimer);const e=[],i=[],s=[],n=[],a=[],o=[],r=[],l=[],h=this.getFirstPanelFromPage(),d=this.getLastPanelFromPage();let c=0;for(let t=h;t<=d;t++){const h=this.getPanelAt(t),d=h.getPosition();a[t]=d.left,o[t]=d.top,"horizontal"===this.settings.orientation?(e[t]=this.currentPage*(this.totalWidth+this.computedPanelDistance)+c%this.columns*(this.closedPanelWidth+this.computedPanelDistance),i[t]=Math.floor(c/this.columns)*(this.closedPanelHeight+this.computedPanelDistance)):(e[t]=c%this.columns*(this.closedPanelWidth+this.computedPanelDistance),i[t]=this.currentPage*(this.totalHeight+this.computedPanelDistance)+Math.floor(c/this.columns)*(this.closedPanelHeight+this.computedPanelDistance));const p=h.getSize();r[t]=p.width,l[t]=p.height,s[t]=this.closedPanelWidth,n[t]=this.closedPanelHeight,c++}this.openPanelAnimation.page===this.currentPage&&this.stopPanelsAnimation(this.openPanelAnimation),this.stopPanelsAnimation(this.closePanelsAnimation),this.closePanelsAnimation.page=this.currentPage,this.animatePanels(this.closePanelsAnimation,{duration:this.settings.closePanelDuration,step:t=>{for(let c=h;c<=d;c++){const h=this.getPanelAt(c);h.setPosition(t*(e[c]-a[c])+a[c],t*(i[c]-o[c])+o[c]),h.setSize(t*(s[c]-r[c])+r[c],t*(n[c]-l[c])+l[c])}},complete:()=>{this.dispatchEvent("panelsCloseComplete",{previousIndex:t})}}),this.dispatchEvent("panelsClose",{previousIndex:t})}getMinSize(t,e){let i=this.maxComputedOpenedPanelWidth,s=this.maxComputedOpenedPanelHeight;for(let n=t;n<=e;n++){const t=this.getPanelAt(n).getContentSize();n%this.columns==this.currentIndex%this.columns&&("loading"===t&&-1===this.loadingPanels.indexOf(n)?(this.loadingPanels.push(n),i=this.closedPanelWidth):t.width{this.isPageScrolling=!1,this.dispatchEvent("pageScrollComplete",{index:this.currentPage})})),this.panelsContainerEl.style.transition=`${e} ${this.settings.pageScrollDuration/1e3}s`,this.panelsContainerEl.style[e]=s(n)}nextPage(){const t=this.currentPage>=this.getTotalPages()-1?0:this.currentPage+1;this.gotoPage(t)}previousPage(){const t=this.currentPage<=0?this.getTotalPages()-1:this.currentPage-1;this.gotoPage(t)}getFirstPanelFromPage(){return 1===this.getTotalPages()?0:this.currentPage*(this.columns*this.rows)}getLastPanelFromPage(){return 1===this.getTotalPages()||this.currentPage===this.getTotalPages()-1?this.getTotalPanels()-1:(this.currentPage+1)*(this.columns*this.rows)-1}}})()})(); \ No newline at end of file +(()=>{"use strict";const t={width:800,height:400,responsive:!0,responsiveMode:"auto",aspectRatio:-1,orientation:"horizontal",startPanel:-1,rows:3,columns:4,openedPanelWidth:"max",openedPanelHeight:"max",maxOpenedPanelWidth:"70%",maxOpenedPanelHeight:"70%",openPanelOn:"hover",closePanelsOnMouseOut:!0,mouseDelay:200,panelDistance:10,openPanelDuration:700,closePanelDuration:700,pageScrollDuration:500,pageScrollEasing:"swing",breakpoints:null,startPage:0,shadow:!1,shuffle:!1,addOns:[]};function e(t){let e="complete";return"IMG"===t.tagName&&!1===t.complete?e="loading":Array.from(t.getElementsByTagName("img")).forEach((t=>{!1===t.complete&&(e="loading")})),e}function i(t){return isNaN(t)||"auto"===t?t:t+"px"}class s extends EventTarget{handlerReferences={};uid=null;static idCounter=0;constructor(){super()}addEventListener(t,e){const i=e;let n=t;null===this.uid&&(this.uid=s.idCounter++),-1!==t.indexOf(".")&&(n=t.split(".")[0]),this.handlerReferences[t+"."+this.uid]=i,super.addEventListener(n,i)}removeEventListener(t){let e=t;const i=this.handlerReferences[t+"."+this.uid];-1!==t.indexOf(".")&&(e=t.split(".")[0]),super.removeEventListener(e,i),delete this.handlerReferences[t+"."+this.uid]}dispatchEvent(t,e=null,i=null){const s=new CustomEvent(t,{...i||{},detail:e||{}});super.dispatchEvent(s)}on(t,e){this.addEventListener(t,e)}off(t){this.removeEventListener(t)}trigger(t){const{type:e,detail:i}=t;this.dispatchEvent(e,i)}}const n=s,a=class extends n{#t;panelEl;settings;isLoading=!1;isLoaded=!1;eventHandlerReferences={};constructor(t,e){super(),this.panelEl=t,this.settings=e,this.init()}init(){this.panelEl.setAttribute("data-init",!0),this.panelEl.addEventListener("mouseenter",this.eventHandlerReferences["mouseenter.panel"]=()=>{this.dispatchEvent("panelMouseOver",{index:this.index})}),this.panelEl.addEventListener("mouseleave",this.eventHandlerReferences["mouseleave.panel"]=()=>{this.dispatchEvent("panelMouseOut",{index:this.index})}),this.panelEl.addEventListener("click",this.eventHandlerReferences["click.panel"]=()=>{this.dispatchEvent("panelClick",{index:this.index})}),this.panelEl.addEventListener("mousedown",this.eventHandlerReferences["mousedown.panel"]=()=>{this.dispatchEvent("panelMouseDown",{index:this.index})})}getPosition(){return{left:parseInt(this.panelEl.style.left,10),top:parseInt(this.panelEl.style.top,10)}}setPosition(t,e){this.panelEl.style.left=i(t),this.panelEl.style.top=i(e)}getSize(){return{width:parseInt(this.panelEl.style.width,10),height:parseInt(this.panelEl.style.height,10)}}setSize(t,e){this.panelEl.style.width=i(t),this.panelEl.style.height=i(e)}getContentSize(){return"complete"===e(this.panelEl)&&(this.isLoaded=!0),!1===this.isLoaded?((t=this.panelEl,new Promise((i=>{let s=e(t);if("loading"===s){const n=setInterval((()=>{s=e(t),"complete"===s&&(clearInterval(n),i("complete"))}),100)}else i("complete")}))).then((()=>{this.isLoaded=!0,this.dispatchEvent("imagesComplete",{index:this.index,contentSize:this.getContentSize()})})),"loading"):{width:this.panelEl.scrollWidth,height:this.panelEl.scrollHeight};var t}destroy(){this.panelEl.removeAttribute("style"),this.panelEl.removeAttribute("data-init"),this.panelEl.removeAttribute("data-index"),this.panelEl.removeEventListener("mouseenter",this.eventHandlerReferences["mouseenter.panel"]),this.panelEl.removeEventListener("mouseleave",this.eventHandlerReferences["mouseleave.panel"]),this.panelEl.removeEventListener("click",this.eventHandlerReferences["click.panel"]),this.panelEl.removeEventListener("mousedown",this.eventHandlerReferences["mousedown.panel"])}get index(){return this.#t}set index(t){this.#t=t,this.panelEl.setAttribute("data-index",this.#t)}},o=class extends n{previousWidth=0;previousHeight=0;allowResize=!0;delay=200;handlerReference;timeoutReference;constructor(t=null){super(),null!==t&&(this.delay=t)}addEventListener(t,e){super.addEventListener(t,e),this.handlerReference=this.handler.bind(this),window.addEventListener("resize",this.handlerReference)}removeEventListener(t){super.removeEventListener(t),window.removeEventListener("resize",this.handlerReference)}handler(){!1===this.allowResize||this.previousWidth===window.innerWidth&&this.previousHeight===window.innerHeight||(this.previousWidth=window.innerWidth,this.previousHeight=window.innerHeight,this.allowResize=!1,this.timeoutReference=setTimeout((()=>{this.dispatchEvent("resize"),this.allowResize=!0}),this.delay))}destroy(){clearTimeout(this.timeoutReference)}};class r{accordion;static addOns=[];addOnsInstances=[];activeAddOns=null;constructor(t,e=null){this.accordion=t,this.activeAddOns=e}init(){this.accordion.addOns=this.accordion.addOns||{},(0===this.activeAddOns.length?r.addOns:this.activeAddOns).forEach((t=>{let e=new t(this.accordion);this.addOnsInstances.push(e),this.accordion.addOns[t.name]=e}))}static add(t){"object"==typeof t?r.addOns=[...r.addOns,...t]:"function"==typeof t&&r.addOns.push(t)}destroyAll(){this.addOnsInstances.forEach((t=>{t.destroy()}))}}const l=r,h=class{layerEl;visible=!1;visibleOn="ga-always";styled=!1;data=null;position=null;horizontalProperty=null;verticalProperty=null;horizontalPosition=null;verticalPosition=null;delayTimer=null;stayTimer=null;constructor(t){this.layerEl=t,this.init()}init(){this.layerEl.setAttribute("data-layer-init",!0),this.layerEl.classList.contains("ga-closed")?(this.visibleOn="closed",this.layerEl.style.visibility="hidden"):this.layerEl.classList.contains("ga-opened")?(this.visibleOn="opened",this.layerEl.style.visibility="hidden"):this.setStyle()}setStyle(){this.styled=!0,this.data=this.layerEl.dataset,void 0!==this.data.width&&(this.layerEl.style.width=i(this.data.width)),void 0!==this.data.height&&(this.layerEl.style.height=i(this.data.height)),void 0!==this.data.depth&&(this.layerEl.style.zIndex=this.data.depth),this.position=this.data.position?this.data.position.toLowerCase():"topleft",-1!==this.position.indexOf("right")?this.horizontalProperty="right":-1!==this.position.indexOf("left")?this.horizontalProperty="left":this.horizontalProperty="center",-1!==this.position.indexOf("bottom")?this.verticalProperty="bottom":-1!==this.position.indexOf("top")?this.verticalProperty="top":this.verticalProperty="center",this.setPosition()}setPosition(){let t=this.layerEl.getAttribute("style");this.horizontalPosition=void 0!==this.data.horizontal?this.data.horizontal:0,this.verticalPosition=void 0!==this.data.vertical?this.data.vertical:0,"center"===this.horizontalProperty||"center"===this.horizontalPosition?("IMG"!==this.layerEl.tagName&&(null===t||null!==t&&-1===t.indexOf("width"))&&(this.layerEl.style.whiteSpace="nowrap",this.layerEl.style.width=i(this.layerEl.clientWidth)),this.layerEl.style.marginLeft="auto",this.layerEl.style.marginRight="auto",this.layerEl.style.left=0,this.layerEl.style.right=0):this.layerEl.style[this.horizontalProperty]=i(this.horizontalPosition),"center"===this.verticalProperty||"center"===this.verticalPosition?("IMG"!==this.layerEl.tagName&&(null===t||null!==t&&-1===t.indexOf("height"))&&(this.layerEl.style.whiteSpace="nowrap",this.layerEl.style.height=i(this.layerEl.clientHeight)),this.layerEl.style.marginTop="auto",this.layerEl.style.marginBottom="auto",this.layerEl.style.top=0,this.layerEl.style.bottom=0):this.layerEl.style[this.verticalProperty]=i(this.verticalPosition)}show(t){if(!0===this.visible)return;this.visible=!0,!1===this.styled&&this.setStyle();let e=void 0!==this.data.showOffset?this.data.showOffset:50,i=void 0!==this.data.showDuration?this.data.showDuration/1e3:.4,s=void 0!==this.data.showDelay?this.data.showDelay:10,n=void 0!==this.data.stayDuration?parseInt(this.data.stayDuration,10):-1,a={opacity:0,visibility:"visible"},o={opacity:1},r="";o.transition="opacity "+i+"s",void 0!==this.data.showTransition&&("left"===this.data.showTransition?r=e+"px, 0":"right"===this.data.showTransition?r="-"+e+"px, 0":"up"===this.data.showTransition?r="0, "+e+"px":"down"===this.data.showTransition&&(r="0, -"+e+"px"),a.transform="translate3d("+r+", 0)",o.transform="translate3d(0, 0, 0)",o.transition+=", transform "+i+"s");const l=e=>{e.target===e.currentTarget&&(this.layerEl.removeEventListener("transitionend",l),this.layerEl.style.transition="",-1!==n&&(this.stayTimer=setTimeout((function(){this.hide(),this.stayTimer=null}),n)),void 0!==t&&t())};this.layerEl.addEventListener("transitionend",l);for(let t in a)this.layerEl.style[t]=a[t];this.delayTimer=setTimeout((()=>{for(let t in o)this.layerEl.style[t]=o[t]}),s)}hide(t){if(!1===this.visible)return;let e=void 0!==this.data.hideOffset?this.data.hideOffset:50,i=void 0!==this.data.hideDuration?this.data.hideDuration/1e3:.4,s=void 0!==this.data.hideDelay?this.data.hideDelay:10;this.visible=!1,null!==this.stayTimer&&clearTimeout(this.stayTimer);let n="",a={opacity:0};a.transition="opacity "+i+"s",void 0!==this.data.hideTransition&&("left"===this.data.hideTransition?n="-"+e+"px, 0":"right"===this.data.hideTransition?n=e+"px, 0":"up"===this.data.hideTransition?n="0, -"+e+"px":"down"===this.data.hideTransition&&(n="0, "+e+"px"),a.transform=" translate3d("+n+", 0)",a.transition+=", transform "+i+"s");const o=e=>{e.target===e.currentTarget&&(this.layerEl.removeEventListener("transitionend",o),this.layerEl.style.removeProperty("transition"),!1===this.visible&&(this.layerEl.style.visibility="hidden"),void 0!==t&&t())};this.layerEl.addEventListener("transitionend",o),this.delayTimer=setTimeout((()=>{for(let t in a)this.layerEl.style[t]=a[t]}),s)}isVisible(){return!1!==this.visible&&null!==this.layerEl.offsetParent}destroy(){this.layerEl.removeAttribute("style"),this.layerEl.removeAttribute("data-layer-init"),clearTimeout(this.delayTimer),clearTimeout(this.stayTimer),this.delayTimer=null,this.stayTimer=null}},d=class extends n{videoEl=null;ready=!1;started=!1;state="";constructor(t){super(),this.videoEl=t,this.init()}init(){}play(){}pause(){}stop(){}replay(){}isType(){}isReady(){return this.ready}isStarted(){return this.started}getState(){return this.state}};class c extends d{static vimeoAPIAdded=!1;static vimeoVideos=[];constructor(t){super(t)}static isType(t){return"IFRAME"===t.tagName&&-1!==t.getAttribute("src").indexOf("vimeo.com")}init(){if(this.isInit=!1,void 0!==window.Vimeo)this.setup();else if(c.vimeoVideos.push(this),!1===c.vimeoAPIAdded){c.vimeoAPIAdded=!0;const t=document.createElement("script");t.src="//player.vimeo.com/api/player.js";const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e);let i=setInterval((()=>{void 0!==window.Vimeo&&(clearInterval(i),c.vimeoVideos.forEach((t=>{t.setup()})))}),100)}}setup(){this.isInit=!0,this.player=new window.Vimeo.Player(this.videoEl),this.ready=!0,this.dispatchEvent("ready"),this.player.on("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.on("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.on("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}play(){if(!0===this.ready)this.player.play();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.play())}),100)}}pause(){this.player.pause()}stop(){this.player.setCurrentTime(0).then((()=>{this.player.pause(),this.state="stopped"}))}replay(){this.player.setCurrentTime(0).then((()=>{this.player.play()}))}addEventListener(t,e){if(!0===this.isInit)super.addEventListener(t,e);else{const i=setInterval((()=>{!0===this.isInit&&(clearInterval(i),super.addEventListener(t,e))}),100)}}}const p=c;class u extends d{static youtubeAPIAdded=!1;static youtubeVideos=[];constructor(t){super(t)}static isType(t){if("IFRAME"===t.tagName){const e=t.getAttribute("src");if(-1!==e.indexOf("youtube.com")||-1!==e.indexOf("youtu.be"))return!0}return!1}init(){if(this.isInit=!1,void 0!==(window.YT&&window.YT.Player))this.setup();else if(u.youtubeVideos.push(this),!1===u.youtubeAPIAdded){u.youtubeAPIAdded=!0;const t=document.createElement("script");t.src="//www.youtube.com/player_api";const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),window.onYouTubePlayerAPIReady=()=>{u.youtubeVideos.forEach((t=>{t.setup()}))}}}setup(){this.isInit=!0,this.player=new window.YT.Player(this.videoEl,{events:{onReady:()=>{this.dispatchEvent("ready"),this.ready=!0},onStateChange:t=>{switch(t.data){case window.YT.PlayerState.PLAYING:!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play");break;case window.YT.PlayerState.PAUSED:this.state="paused",this.dispatchEvent("pause");break;case window.YT.PlayerState.ENDED:this.state="ended",this.dispatchEvent("ended")}}}})}play(){if(!0===this.ready)this.player.playVideo();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.playVideo())}),100)}}pause(){!0==!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?this.stop():this.player.pauseVideo()}stop(){this.player.seekTo(1),this.player.stopVideo(),this.state="stopped"}replay(){this.player.seekTo(1),this.player.playVideo()}addEventListener(t,e){if(!0===this.isInit)super.addEventListener(t,e);else{const i=setInterval((()=>{!0===this.isInit&&(clearInterval(i),super.addEventListener(t,e))}),100)}}}const g=u;class m extends n{static players=[];player=null;videoEl;isIOS=!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g);constructor(t){super(),this.videoEl=t,this.init()}static addPlayer(t){-1===m.players.indexOf(t)&&m.players.unshift(t)}init(){const t=this.videoEl.getAttribute("id"),e=m.players.find((t=>t.isType(this.videoEl)));this.player=new e(this.videoEl),null!==this.player&&["ready","start","play","pause","ended"].forEach((e=>{const i="video"+e.charAt(0).toUpperCase()+e.slice(1);this.player.addEventListener(e,(()=>{this.dispatchEvent(i,{video:t})}))}))}play(){!0===this.isIOS&&!1===this.player.isStarted()||"playing"===this.player.getState()||this.player.play()}stop(){!0===this.isIOS&&!1===this.player.isStarted()||"stopped"===this.player.getState()||this.player.stop()}pause(){!0===this.isIOS&&!1===this.player.isStarted()||"paused"===this.player.getState()||this.player.pause()}replay(){!0===this.isIOS&&!1===this.player.isStarted()||this.player.replay()}destroy(){!0===this.player.isStarted()&&this.stop(),this.player.removeEventListener("ready"),this.player.removeEventListener("start"),this.player.removeEventListener("play"),this.player.removeEventListener("pause"),this.player.removeEventListener("ended")}}m.addPlayer(class extends d{constructor(t){super(t)}static isType(t){return"VIDEO"===t.tagName}init(){this.player=this.videoEl,this.ready=!0,this.dispatchEvent("ready"),this.player.addEventListener("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.addEventListener("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.addEventListener("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}play(){if(!0===this.ready)this.player.play();else{const t=setInterval((()=>{!0===this.ready&&(clearInterval(t),this.player.play())}),100)}}pause(){this.player.pause()}stop(){this.player.currentTime=0,this.player.pause(),this.state="stopped"}replay(){this.player.currentTime=0,this.player.play()}}),m.addPlayer(class extends d{constructor(t){super(t)}static isType(t){return!(null===t.getAttribute("data-videojs-id")&&!t.classList.contains("video-js")||void 0===window.videojs)}init(){const t=this.videoEl.classList.contains("video-js")?this.videoEl.getAttribute("id"):this.videoEl.getAttribute("data-videojs-id");this.player=window.videojs(t),this.player.ready((()=>{this.ready=!0,this.dispatchEvent("ready"),this.player.on("play",(()=>{!1===this.started&&(this.started=!0,this.dispatchEvent("start")),this.state="playing",this.dispatchEvent("play")})),this.player.on("pause",(()=>{this.state="paused",this.dispatchEvent("pause")})),this.player.on("ended",(()=>{this.state="ended",this.dispatchEvent("ended")}))}))}play(){this.player.play()}pause(){this.player.pause()}stop(){this.player.currentTime(0),this.player.pause(),this.state="stopped"}replay(){this.player.currentTime(0),this.player.play()}}),m.addPlayer(g),m.addPlayer(p);const v=m;l.add([class{namespace="autoplay";accordion;settings;autoplayTimer;autoplayState="stopped";autoplayIndex=-1;isHover=!1;eventHandlerReferences={};defaults={autoplay:!0,autoplayDelay:5e3,autoplayDirection:"normal",autoplayOnHover:"pause"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.autoplay&&"stopped"===this.autoplayState?(this.accordion.addEventListener("panelOpen."+this.namespace,(()=>{this.panelOpenHandler()})),this.accordion.addEventListener("panelOpenComplete."+this.namespace,(()=>{this.panelOpenCompleteHandler()})),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{-1!==t.detail.previousIndex&&(this.autoplayIndex=t.detail.previousIndex)})),this.accordion.addEventListener("pageScroll."+this.namespace,(()=>{this.autoplayIndex=this.accordion.getFirstPanelFromPage()-1})),this.accordion.accordionEl.addEventListener("mouseenter",this.eventHandlerReferences.mouseenter=()=>{this.mouseEnterHandler()}),this.accordion.accordionEl.addEventListener("mouseleave",this.eventHandlerReferences.mouseleave=()=>{this.mouseLeaveHandler()}),this.autoplayState="running",this.start()):!0===this.settings.autoplay&&"running"===this.autoplayState&&(this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace),this.accordion.removeEventListener("mouseenter."+this.namespace),this.accordion.removeEventListener("mouseleave."+this.namespace),this.autoplayState="stopped",this.stop())}panelOpenHandler(){"running"===this.autoplayState&&(this.stop(),this.autoplayState="paused")}panelOpenCompleteHandler(){(!0!==this.isHover||"pause"!==this.settings.autoplayOnHover&&"stop"!==this.settings.autoplayOnHover)&&"paused"===this.autoplayState&&(this.start(),this.autoplayState="running")}mouseEnterHandler(){this.isHover=!0,"running"!==this.autoplayState||"pause"!==this.settings.autoplayOnHover&&"stop"!==this.settings.autoplayOnHover||(this.stop(),this.autoplayState="paused")}mouseLeaveHandler(){this.isHover=!1,!0===this.settings.autoplay&&"paused"===this.autoplayState&&"stop"!==this.settings.autoplayOnHover&&(this.start(),this.autoplayState="running")}start(){this.autoplayTimer=setTimeout((()=>{-1!==this.autoplayIndex&&(this.accordion.currentIndex=this.autoplayIndex,this.autoplayIndex=-1),"normal"===this.settings.autoplayDirection?this.accordion.nextPanel():"backwards"===this.settings.autoplayDirection&&this.accordion.previousPanel()}),this.settings.autoplayDelay)}stop(){clearTimeout(this.autoplayTimer)}destroy(){clearTimeout(this.autoplayTimer),this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace),this.accordion.removeEventListener("panelsClose."+this.namespace),this.accordion.removeEventListener("pageScroll."+this.namespace),this.accordion.accordionEl.removeEventListener("mouseenter",this.eventHandlerReferences.mouseenter),this.accordion.accordionEl.removeEventListener("mouseleave",this.eventHandlerReferences.mouseleave)}},class{namespace="breakpoints";accordion;breakpoints;originalSettings={};orderedBreakpoints=[];currentBreakpoint=-1;constructor(t){this.accordion=t,null!==this.accordion.settings.breakpoints&&this.accordion.addEventListener("beforeInit."+this.namespace,(()=>{this.init()}))}init(){this.breakpoints={...this.accordion.settings.breakpoints},this.originalSettings={...this.accordion.settings};for(let t in this.breakpoints)this.orderedBreakpoints.push({size:parseInt(t,10),properties:this.breakpoints[t]});this.orderedBreakpoints=this.orderedBreakpoints.sort(((t,e)=>t.size>=e.size?1:-1)),this.accordion.addEventListener("beforeResize."+this.namespace,(()=>{const t=this.getCurrentSettings();!1!==t&&(this.accordion.settings={...t},this.accordion.update())}))}getCurrentSettings(){if(null!==this.breakpoints&&this.orderedBreakpoints.length>0){if(window.innerWidth>this.orderedBreakpoints[this.orderedBreakpoints.length-1].size&&-1!==this.currentBreakpoint)return this.currentBreakpoint=-1,this.originalSettings;for(let t=0,e=this.orderedBreakpoints.length;t{void 0!==this.buttonsEl&&(this.buttonsEl.getElementsByClassName("ga-selected")[0].classList.remove("ga-selected"),this.buttonsEl.getElementsByClassName("ga-pagination-button")[t.detail.index].classList.add("ga-selected"))}))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},this.buttonsEl=this.accordion.accordionEl.getElementsByClassName("ga-pagination-buttons")[0];const t=this.accordion.getTotalPages();!0===this.settings.buttons&&t>1&&void 0===this.buttonsEl?this.createButtons():!0===this.settings.buttons&&void 0!==this.buttonsEl&&t!==this.buttonsEl.getElementsByClassName("ga-pagination-button").length?this.adjustButtons():(!1===this.settings.buttons&&void 0!==this.buttonsEl||t<=1&&void 0!==this.buttonsEl)&&this.removeButtons()}createButtons(){this.buttonsEl=document.createElement("div"),this.buttonsEl.classList.add("ga-pagination-buttons"),this.accordion.accordionEl.appendChild(this.buttonsEl);for(let t=0;t{this.accordion.gotoPage(t)};this.eventHandlerReferences["click.button"+t]=i,e.addEventListener("click",i)}this.accordion.accordionEl.classList.add("ga-has-buttons")}adjustButtons(){this.removeButtons(),this.createButtons()}removeButtons(){Array.from(this.buttonsEl.getElementsByClassName("ga-pagination-button")).forEach(((t,e)=>{const i=this.eventHandlerReferences["click.button"+e];t.removeEventListener("click",i)})),this.buttonsEl.remove(),this.accordion.accordionEl.classList.remove("ga-has-buttons")}destroy(){this.accordion.removeEventListener("pageScroll."+this.namespace),this.accordion.removeEventListener("update."+this.namespace),this.removeButtons()}},class{namespace="deeplinking";accordion;settings;defaults={updateHash:!1};eventHandlerReferences={};constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("init."+this.namespace,(()=>{this.gotoHash(window.location.hash)})),this.accordion.addEventListener("panelOpen."+this.namespace,(t=>{if(!0===this.settings.updateHash){let e=this.accordion.accordionEl.getElementsByClassName("ga-panel")[t.detail.index].getAttribute("id");null===e&&(e=t.detail.index),window.location.hash=this.accordion.accordionEl.getAttribute("id")+"/"+e}})),window.addEventListener("hashchange",this.eventHandlerReferences.hashchange=()=>{this.gotoHash(window.location.hash)})}parseHash(t){if(""!==t){const e=(t=t.substring(1)).split("/").pop(),i=t.slice(0,-e.toString().length-1);if(this.accordion.accordionEl.getAttribute("id")===i)return{accordionId:i,panelId:e}}return!1}gotoHash(t){const e=this.parseHash(t);if(!1===e)return;const{panelId:i}=e,s=parseInt(i,10);if(isNaN(s)){const t=document.getElementById(i),e=Array.from(this.accordion.accordionEl.getElementsByClassName("ga-panel")).indexOf(t);-1!==e&&e!==this.accordion.getCurrentIndex()&&this.accordion.openPanel(e)}else s!==this.accordion.getCurrentIndex()&&this.accordion.openPanel(s)}destroy(){this.accordion.removeEventListener("init."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),window.removeEventListener("hashchange",this.eventHandlerReferences.hashchange)}},class{namespace="keyboards";accordion;settings;isEnabled=!1;eventHandlerReferences={};defaults={keyboard:!0,keyboardOnlyOnFocus:!1,keyboardTarget:"panel"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.keyboard&&!1===this.isEnabled&&(this.isEnabled=!0,this.enable()),!1===this.settings.keyboard&&!0===this.isEnabled&&(this.isEnabled=!1,this.disable())}enable(){let t=!1;this.accordion.accordionEl.addEventListener("focus",this.eventHandlerReferences.focus=()=>{t=!0}),this.accordion.accordionEl.addEventListener("blur",this.eventHandlerReferences.blur=()=>{t=!1});const e=e=>{if(!0!==this.settings.keyboardOnlyOnFocus||!1!==t)if(37===e.which)"panel"===this.settings.keyboardTarget?this.accordion.previousPanel():this.accordion.previousPage();else if(39===e.which)"panel"===this.settings.keyboardTarget?this.accordion.nextPanel():this.accordion.nextPage();else if(13===e.which){const t=this.accordion.accordionEl.getElementsByClassName("ga-panel")[this.accordion.getCurrentIndex()].querySelector(".ga-panel > a");null!==t&&t.click()}};this.eventHandlerReferences.keydown=e,document.addEventListener("keydown",e)}disable(){this.accordion.accordionEl.removeEventListener("focus",this.eventHandlerReferences.focus),this.accordion.accordionEl.removeEventListener("blur",this.eventHandlerReferences.blur),document.removeEventListener("keydown",this.eventHandlerReferences.keydown)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.disable()}},class{namespace="layers";accordion;settings;layers=[];constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this)),this.accordion.addEventListener("panelOpen."+this.namespace,this.panelOpenHandler.bind(this)),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{this.handleLayersInClosedState(t.detail.previousIndex)}))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.panels.forEach(((t,e)=>{let i=t.panelEl;Array.from(i.querySelectorAll(".ga-layer:not([data-layer-init])")).forEach((t=>{let i=new h(t);this.layers.push({layer:i,panelIndex:e})})),this.accordion.currentIndex===e?this.handleLayersInOpenedState(e):this.handleLayersInClosedState(e)}))}panelOpenHandler(t){this.handleLayersInClosedState(t.detail.previousIndex),this.handleLayersInOpenedState(t.detail.index)}handleLayersInOpenedState(t){this.layers.filter((e=>e.panelIndex===t)).forEach((t=>{const e=t.layer;"opened"===e.visibleOn?e.show():"closed"===e.visibleOn&&e.hide()}))}handleLayersInClosedState(t){this.layers.filter((e=>e.panelIndex===t)).forEach((t=>{const e=t.layer;"opened"===e.visibleOn?e.hide():"closed"===e.visibleOn&&e.show()}))}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.layers.forEach((t=>{t.destroy()}))}},class{namespace="lazyloading";accordion;constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.checkAndLoadVisibleImages.bind(this)),this.accordion.addEventListener("pageScroll."+this.namespace,this.checkAndLoadVisibleImages.bind(this))}checkAndLoadVisibleImages(){const t=this.accordion.getFirstPanelFromPage(),e=this.accordion.getLastPanelFromPage();(e!==this.accordion.getTotalPanels()-1?this.accordion.panels.slice(t,e+1):this.accordion.panels.slice(t)).forEach((t=>{const e=t.panelEl;null===e.getAttribute("data-loaded")&&(e.setAttribute("data-loaded",!0),Array.from(e.getElementsByTagName("img")).forEach((t=>{this.loadImage(t)})))}))}loadImage(t,e=null){const i=new Image;i.setAttribute("class",t.getAttribute("class")),i.setAttribute("style",t.getAttribute("style"));for(let e in t.dataset)i.setAttribute("data-"+e,t.dataset[e]);null!==t.getAttribute("width")&&i.setAttribute("width",t.getAttribute("width")),null!==t.getAttribute("height")&&i.setAttribute("height",t.getAttribute("height")),null!==t.getAttribute("alt")&&i.setAttribute("alt",t.getAttribute("alt")),null!==t.getAttribute("title")&&i.setAttribute("title",t.getAttribute("title")),null!==t.getAttribute("data-src")?(i.setAttribute("src",t.getAttribute("data-src")),i.removeAttribute("data-src")):i.setAttribute("src",t.getAttribute("src")),null!==t.getAttribute("data-srcset")&&(i.setAttribute("srcset",t.getAttribute("data-srcset")),i.removeAttribute("data-srcset")),t.after(i),t.remove(),t=null,"function"==typeof e&&e(i)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("gotoSlide."+this.namespace)}},class{namespace="retina";accordion;constructor(t){this.accordion=t,this.init()}init(){window.devicePixelRatio<2||this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.accordion.panels.forEach((t=>{const e=t.panelEl;null===e.getAttribute("data-retina-loaded")&&(e.setAttribute("data-retina-loaded",!0),Array.from(e.querySelectorAll("img[data-retina]")).forEach((t=>{null!==t.getAttribute("data-src")?(t.setAttribute("data-src",t.getAttribute("data-retina")),t.removeAttribute("data-retina")):this.loadImage(t)})))}))}loadImage(t,e=null){let i=!1,s="";if(null!==t.getAttribute("data-retina")&&(i=!0,s=t.getAttribute("data-retina")),null!==t.getAttribute("data-src")&&(!1===i&&(s=t.getAttribute("data-src")),t.removeAttribute("data-src")),""===s)return;const n=new Image;n.setAttribute("class",t.getAttribute("class")),n.setAttribute("style",t.getAttribute("style"));for(let e in t.dataset)n.setAttribute("data-"+e,t.dataset[e]);null!==t.getAttribute("width")&&n.setAttribute("width",t.getAttribute("width")),null!==t.getAttribute("height")&&n.setAttribute("height",t.getAttribute("height")),null!==t.getAttribute("alt")&&n.setAttribute("alt",t.getAttribute("alt")),null!==t.getAttribute("title")&&n.setAttribute("title",t.getAttribute("title")),null!==t.getAttribute("data-srcset")&&(n.setAttribute("srcset",t.getAttribute("data-srcset")),n.removeAttribute("data-srcset")),t.after(n),t.remove(),t=null,n.setAttribute("src",s),"function"==typeof e&&e(n)}destroy(){this.accordion.removeEventListener("update."+this.namespace)}},class{namespace="touchswipe";accordion;settings;isTouchSwipeEnabled=!1;touchStartPoint={x:0,y:0};touchEndPoint={x:0,y:0};touchDistance={x:0,y:0};touchStartPosition=0;isTouchMoving=!1;touchSwipeEvents={startEvent:["touchstart","mousedown"],moveEvent:["touchmove","mousemove"],endEvent:["touchend","mouseup"]};previousStartEvent="";eventHandlerReferences={};defaults={touchSwipe:!0,touchSwipeThreshold:50};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.touchSwipe&&!1===this.isTouchSwipeEnabled?this.add():!1===this.settings.touchSwipe&&!0===this.isTouchSwipeEnabled&&this.destroy(),this.accordion.getTotalPages()>1?this.accordion.panelsContainerEl.classList.add("ga-grab"):this.accordion.panelsContainerEl.classList.remove("ga-grab")}add(){this.isTouchSwipeEnabled=!0,Array.from(this.touchSwipeEvents.startEvent).forEach((t=>{this.accordion.panelsContainerEl.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchStartHandler(t)})})),this.accordion.panelsContainerEl.addEventListener("dragstart",this.eventHandlerReferences.dragstart=t=>{t.preventDefault()}),Array.from(this.accordion.panelsContainerEl.getElementsByTagName("a")).forEach((t=>{t.addEventListener("click",this.eventHandlerReferences["click.link"]=t=>{this.accordion.accordionEl.classList.contains("ga-swiping")&&t.preventDefault()})})),this.accordion.panelsContainerEl.addEventListener("touchstart",this.eventHandlerReferences["touchstart.link"]=()=>{const t=this.accordion.panelsContainerEl.querySelectorAll("[data-disabledlink]");Array.from(t).forEach((t=>{t.style.removeProperty("pointer-events"),t.removeAttribute("data-disabledlink")}))}),Array.from(this.accordion.panelsContainerEl.getElementsByTagName("a")).forEach((t=>{t.addEventListener("touchend",this.eventHandlerReferences["touchend.link"]=()=>{const e=function(t,e){if(null==t||void 0===t.tagName)return null;for(;!t.classList.contains(e)&&t.tagName!==e.toUpperCase();){if("HTML"===t.tagName)return null;t=t.parentElement}return t}(t,"ga-panel");null!==e&&!1===e.classList.contains("ga-opened")&&(t.style["pointer-events"]="none",t.setAttribute("data-disabledlink",!0))})}))}touchStartHandler(t){if("mousedown"===t.type&&"touchstart"===this.previousStartEvent)return void(this.previousStartEvent=t.type);if(this.previousStartEvent=t.type,t.target.classList.contains("ga-selectable"))return;const e=void 0!==t.touches?t.touches[0]:t,i="horizontal"===this.settings.orientation?"left":"top";this.touchStartPoint.x=e.pageX||e.clientX,this.touchStartPoint.y=e.pageY||e.clientY,this.touchStartPosition=parseInt(this.accordion.panelsContainerEl.style[i],10),this.touchDistance.x=this.touchDistance.y=0,Array.from(this.touchSwipeEvents.moveEvent).forEach((t=>{this.accordion.panelsContainerEl.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchMoveHandler(t)})})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.addEventListener(t,this.eventHandlerReferences[t]=t=>{this.touchEndHandler(t)})})),this.accordion.panelsContainerEl.classList.replace("ga-grab","ga-grabbing")}touchMoveHandler(t){const e=void 0!==t.touches?t.touches[0]:t,s="horizontal"===this.settings.orientation?"left":"top";this.isTouchMoving=!0,!1===this.accordion.accordionEl.classList.contains("ga-swiping")&&this.accordion.accordionEl.classList.add("ga-swiping"),this.touchEndPoint.x=e.pageX||e.clientX,this.touchEndPoint.y=e.pageY||e.clientY,this.touchDistance.x=this.touchEndPoint.x-this.touchStartPoint.x,this.touchDistance.y=this.touchEndPoint.y-this.touchStartPoint.y;let n="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y;if(!0===this.allowOppositeScrolling)return;t.preventDefault();const a=parseInt(this.accordion.panelsContainerEl.style[s],10);(a>=0&&0===this.accordion.currentPage||a<=-this.accordion.totalPanelsSize+this.accordion.totalSize&&this.accordion.currentPage===this.accordion.getTotalPages()-1)&&(n*=.2),this.accordion.panelsContainerEl.style[s]=i(this.touchStartPosition+n)}touchEndHandler(){let t="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y;const e="horizontal"===this.settings.orientation?"left":"top";Array.from(this.touchSwipeEvents.moveEvent).forEach((t=>{this.accordion.panelsContainerEl.removeEventListener(t,this.eventHandlerReferences[t])})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.removeEventListener(t,this.eventHandlerReferences[t])})),this.accordion.panelsContainerEl.classList.replace("ga-grabbing","ga-grab"),this.accordion.accordionEl.classList.contains("ga-swiping")&&setTimeout((()=>{this.accordion.accordionEl.classList.remove("ga-swiping")}),100),!1!==this.isTouchMoving&&(this.isTouchMoving=!1,t>this.settings.touchSwipeThreshold?this.accordion.currentPage>0?this.accordion.previousPage():this.accordion.panelsContainerEl.style[e]=this.touchStartPosition:-t>this.settings.touchSwipeThreshold?this.accordion.currentPage{t.removeEventListener("click",this.eventHandlerReferences["click.link"]),t.removeEventListener("touchend",this.eventHandlerReferences["touchend.link"])})),Array.from([...this.touchSwipeEvents.startEvent,...this.touchSwipeEvents.moveEvent]).forEach((t=>{this.accordion.panelsContainerEl.removeEventListener(t,this.eventHandlerReferences[t])})),Array.from(this.touchSwipeEvents.endEvent).forEach((t=>{document.removeEventListener(t,this.eventHandlerReferences[t])})),this.accordion.panelsContainerEl.classList.remove("ga-grab")}},class{namespace="swapbackground";accordion;settings;eventHandlerReferences={};defaults={swapBackgroundDuration:700,fadeOutBackground:!1};constructor(t){this.accordion=t,this.init()}init(){this.settings={...this.defaults,...this.accordion.settings},this.accordion.addEventListener("panelOpen."+this.namespace,(t=>{const e=this.accordion.getPanelAt(t.detail.index),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];if(void 0!==s&&(s.style.visibility="visible",s.style.opacity=0,this.fadeIn(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeOut(i)),-1!==t.detail.previousIndex&&t.detail.index!==t.detail.previousIndex){const e=this.accordion.getPanelAt(t.detail.previousIndex),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];void 0!==s&&(this.fadeOut(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeIn(i))}})),this.accordion.addEventListener("panelsClose."+this.namespace,(t=>{if(-1===t.detail.previousIndex)return;const e=this.accordion.getPanelAt(t.detail.previousIndex),i=e.panelEl.getElementsByClassName("ga-background")[0],s=e.panelEl.getElementsByClassName("ga-background-opened")[0];void 0!==s&&(this.fadeOut(s),void 0!==i&&!0===this.settings.fadeOutBackground&&this.fadeIn(i))}))}fadeIn(t){t.style.visibility="visible",t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]),t.addEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]=e=>{e.target===e.currentTarget&&(t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadein"]),t.style.removeProperty("transition"))}),setTimeout((()=>{t.style.opacity=1,t.style.transition="all "+this.settings.swapBackgroundDuration/1e3+"s"}),100)}fadeOut(t){t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]),t.addEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]=e=>{e.target===e.currentTarget&&(t.removeEventListener("transitionend",this.eventHandlerReferences["transitionend.fadeout"]),t.style.removeProperty("transition"),t.style.visibility="hidden")}),setTimeout((()=>{t.style.opacity=0,t.style.transition="all "+this.settings.swapBackgroundDuration/1e3+"s"}),100)}destroy(){this.removeEventListener("panelOpen."+this.namespace),this.removeEventListener("panelsClose."+this.namespace)}},class{namespace="mousewheel";accordion;settings;isEnabled=!1;allowMouseWheelScroll=!0;eventHandlerReferences={};defaults={mouseWheel:!0,mouseWheelDirection:"normal",mouseWheelSensitivity:10,mouseWheelTarget:"panel"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},!0===this.settings.mouseWheel&&!1===this.isEnabled&&(this.isEnabled=!0,this.enable()),!1===this.settings.mouseWheel&&!0===this.isEnabled&&(this.isEnabled=!1,this.disable())}enable(){this.accordion.accordionEl.addEventListener("wheel",this.eventHandlerReferences.wheel=t=>{t.preventDefault();let e=t.deltaY*("normal"===this.settings.mouseWheelDirection?1:-1);!0===this.allowMouseWheelScroll&&Math.abs(e)>=this.settings.mouseWheelSensitivity&&(this.allowMouseWheelScroll=!1,setTimeout((()=>{this.allowMouseWheelScroll=!0}),500),e>=this.settings.mouseWheelSensitivity?"page"===this.settings.mouseWheelTarget?this.accordion.nextPage():this.accordion.nextPanel():e<=-this.settings.mouseWheelSensitivity&&("page"===this.settings.mouseWheelTarget?this.accordion.previousPage():this.accordion.previousPanel()))})}disable(){this.accordion.accordionEl.removeEventListener("wheel",this.eventHandlerReferences.wheel)}destroy(){this.accordion.removeEventListener("update."+this.namespace),this.disable()}},class{namespace="video";accordion=null;settings=null;videoReferences={};preinitVideoClickHandler=null;defaults={openPanelVideoAction:"none",closePanelVideoAction:"pauseVideo",playVideoAction:"stopAutoplay",pauseVideoAction:"none",endVideoAction:"none"};constructor(t){this.accordion=t,this.init()}init(){this.accordion.addEventListener("update."+this.namespace,this.updateHandler.bind(this)),this.accordion.addEventListener("panelOpen."+this.namespace,this.panelOpenHandler.bind(this)),this.accordion.addEventListener("panelOpenComplete."+this.namespace,this.panelOpenCompleteHandler.bind(this))}updateHandler(){this.settings={...this.defaults,...this.accordion.settings},Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video:not(a):not([data-video-init])")).forEach((t=>{this.initVideo(t)})),Array.from(this.accordion.accordionEl.querySelectorAll("a.ga-video:not([data-video-preinit])")).forEach((t=>{this.preinitVideo(t)}))}initVideo(t){t.setAttribute("data-video-init",!0);const e=new v(t),i=(parseInt((new Date).valueOf(),10)*Math.floor(1e3*Math.random())).toString();t.setAttribute("data-video-ref",i),this.videoReferences[i]=e,e.addEventListener("videoPlay",(()=>{"stopAutoplay"===this.settings.playVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.accordion.addOns.Autoplay.stop(),this.settings.autoplay=!1,this.accordion.addOns.Autoplay.settings.autoplay=!1)})),e.addEventListener("videoPause",(()=>{"startAutoplay"===this.settings.pauseVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.settings.autoplay=!0,this.accordion.addOns.Autoplay.settings.autoplay=!0,this.accordion.addOns.Autoplay.stop(),this.accordion.addOns.Autoplay.start())})),e.addEventListener("videoEnded",(()=>{"startAutoplay"===this.settings.endVideoAction&&void 0!==this.accordion.addOns.Autoplay?(this.settings.autoplay=!0,this.accordion.addOns.Autoplay.settings.autoplay=!0,this.accordion.addOns.Autoplay.stop(),this.accordion.addOns.Autoplay.start()):"nextPanel"===this.settings.endVideoAction?this.accordion.nextPanel():"replayVideo"===this.settings.endVideoAction&&e.replay()}))}preinitVideo(t){t.setAttribute("data-video-preinit",!0),this.preinitVideoClickHandler=t=>{let e=t.target;if(this.accordion.accordionEl.classList.contains("ga-swiping")||null!==e.parentElement.querySelector(".ga-video[data-video-init]"))return;t.preventDefault();let i,s,n,a,o,r,l,h=e.getAttribute("href"),d=e.getElementsByTagName("img")[0],c=d.getAttribute("width")||d.clientWidth,p=d.getAttribute("height")||d.clientHeight;-1!==h.indexOf("youtube")||-1!==h.indexOf("youtu.be")?s="youtube":-1!==h.indexOf("vimeo")&&(s="vimeo"),n="youtube"===s?/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/:/(www\.)?vimeo.com\/(\d+)/,a=h.match(n),o=a[2],r="youtube"===s?"//www.youtube.com/embed/"+o+"?enablejsapi=1&wmode=opaque":"//player.vimeo.com/video/"+o,l=h.split("?")[1],void 0!==l&&(l=l.split("&"),l.forEach((t=>{-1===t.indexOf(o)&&(r+="&"+t)}))),i=document.createElement("iframe"),i.setAttribute("src",r),i.setAttribute("width",c),i.setAttribute("height",p),i.setAttribute("class",e.getAttribute("class")),i.setAttribute("frameborder",0),i.setAttribute("allowfullscreen","allowfullscreen"),e.parentElement.insertBefore(i,e),this.initVideo(i),this.videoReferences[i.getAttribute("data-video-ref")].play(),e.style.display="none"},t.addEventListener("click",this.preinitVideoClickHandler)}panelOpenHandler(t){if(-1===t.detail.previousIndex)return;const e=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.previousIndex].querySelector(".ga-video[data-video-init]");if(null===e)return;const i=this.videoReferences[e.getAttribute("data-video-ref")];null!==i&&("stopVideo"===this.settings.closePanelVideoAction?i.stop():"pauseVideo"===this.settings.closePanelVideoAction?i.pause():"removeVideo"===this.settings.closePanelVideoAction&&(null!==e.parentElement.querySelector("a.ga-video")?(e.parentElement.querySelector("a.ga-video").style.removeProperty("display"),i.destroy(),e.remove()):i.stop()))}panelOpenCompleteHandler(t){if("playVideo"===this.settings.openPanelVideoAction&&t.detail.index===this.accordion.getCurrentIndex()){const e=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.index].querySelector(".ga-video[data-video-init]"),i=this.accordion.panelsContainerEl.getElementsByClassName("ga-panel")[t.detail.index].querySelector(".ga-video[data-video-preinit]");if(null!==e){const t=this.videoReferences[t.getAttribute("data-video-ref")];t.play()}else null!==i&&i.dispatchEvent("click");"stopAutoplay"===this.settings.playVideoAction&&void 0!==this.accordion.addOns.Autoplay&&(this.accordion.addOns.Autoplay.stop(),this.settings.autoplay=!1,this.accordion.addOns.Autoplay.settings.autoplay=!1)}}destroy(){Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video[ data-video-preinit ]")).forEach((t=>{t.removeAttribute("data-video-preinit"),t.removeEventListener("click",this.preinitVideoClickHandler)})),Array.from(this.accordion.accordionEl.querySelectorAll(".ga-video[ data-video-init ]")).forEach((t=>{t.removeAttribute("data-video-init");const e=this.videoReferences[t.getAttribute("data-video-ref")];e.removeEventListener("videoPlay"),e.removeEventListener("videoPause"),e.removeEventListener("videoEnded"),e.destroy(),t.removeAttribute("data-video-ref"),null!==t.parentElement.querySelector(".ga-video[ data-video-preinit ]")&&t.remove()})),this.videoReferences.length=0,this.accordion.removeEventListener("update."+this.namespace),this.accordion.removeEventListener("panelOpen."+this.namespace),this.accordion.removeEventListener("panelOpenComplete."+this.namespace)}}]),window.GridAccordion=class extends n{namespace="gridaccordion";settings={};selector;accordionEl=null;panelsEl=null;panelsMaskEl=null;currentIndex=-1;currentPage=0;columns=0;rows=0;totalWidth=0;totalHeight=0;totalPanelsSize=0;computedOpenedPanelWidth=0;computedOpenedPanelHeight=0;maxComputedOpenedPanelWidth=0;maxComputedOpenedPanelHeight=0;collapsedPanelWidth=0;collapsedPanelHeight=0;closedPanelWidth=0;closedPanelHeight=0;computedPanelDistance=0;panels=[];mouseDelayTimer=0;openPanelAnimation={};closePanelsAnimation={};previousColumns=-1;previousRows=-1;isPageScrolling=!1;autoResponsiveRatio=1;loadingPanels=[];eventHandlerReferences={};windowResizeHandler;addOnsManager;constructor(e,i=null){super(),this.selector=e,this.settings=null!==i?{...t,...i}:{...t},this.addOnsManager=new l(this,this.settings.addOns),this.addOnsManager.init(),this.init()}init(){if(this.dispatchEvent("beforeInit"),this.accordionEl=document.querySelector(this.selector),this.accordionEl.classList.remove("ga-no-js"),this.panelsMaskEl=document.createElement("div"),this.panelsMaskEl.classList.add("ga-mask"),this.accordionEl.appendChild(this.panelsMaskEl),this.panelsContainerEl=this.accordionEl.getElementsByClassName("ga-panels")[0],0===this.accordionEl.getElementsByClassName("ga-panels").length&&(this.panelsContainerEl=document.createElement("div"),this.panelsContainerEl.classList.add("ga-panels")),this.panelsMaskEl.appendChild(this.panelsContainerEl),!0===this.settings.shuffle){const t=[...Array.from(this.panelsContainerEl.getElementsByClassName("ga-panel"))];for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}this.panelsContainerEl.replaceChildren(...t)}this.currentIndex=this.settings.startPanel,-1===this.currentIndex?this.accordionEl.classList.add("ga-closed"):this.accordionEl.classList.add("ga-opened"),-1!==this.settings.startPage&&(this.currentPage=this.settings.startPage),this.windowResizeHandler=new o,this.windowResizeHandler.addEventListener("resize",(()=>{this.resize()})),this.update(),-1!==this.currentIndex&&(this.accordionEl.getElementsByClassName("ga-panel")[this.currentIndex].classList.add("ga-opened"),this.dispatchEvent("panelOpen",{index:this.currentIndex,previousIndex:-1})),this.accordionEl.addEventListener("mouseenter",this.eventHandlerReferences["mouseenter.accordion"]=()=>{this.dispatchEvent("accordionMouseOver")}),this.accordionEl.addEventListener("mouseleave",this.eventHandlerReferences["mouseleave.accordion"]=()=>{clearTimeout(this.mouseDelayTimer),!0===this.settings.closePanelsOnMouseOut&&this.closePanels(),this.dispatchEvent("accordionMouseOut")}),this.dispatchEvent("init")}update(){if(this.dispatchEvent("beforeUpdate"),"horizontal"===this.settings.orientation?(this.accordionEl.classList.remove("ga-vertical"),this.accordionEl.classList.add("ga-horizontal")):"vertical"===this.settings.orientation&&(this.accordionEl.classList.remove("ga-horizontal"),this.accordionEl.classList.add("ga-vertical")),[...Array.from(this.accordionEl.getElementsByClassName("ga-background")),...Array.from(this.accordionEl.getElementsByClassName("ga-background-opened"))].forEach((t=>{t.style.removeProperty("width"),t.style.removeProperty("height")})),this.updatePanels(),this.columns=this.settings.columns,this.rows=this.settings.rows,-1===this.settings.columns&&-1===this.settings.rows?(this.columns=4,this.rows=3):-1===this.settings.columns?(this.columns=Math.ceil(this.getTotalPanels()/this.settings.rows),this.rows=this.settings.rows):-1===this.settings.rows&&(this.columns=this.settings.columns,this.rows=Math.ceil(this.getTotalPanels()/this.settings.columns)),-1===this.settings.columns||-1===this.settings.rows)this.currentPage=0;else if(-1!==this.currentIndex)this.currentPage=Math.floor(this.currentIndex/(this.settings.columns*this.settings.rows));else if(this.settings.columns!==this.previousColumns&&-1!==this.previousColumns||this.settings.rows!==this.previousRows&&-1!==this.previousRows){let t=Math.min(Math.round(this.currentPage*(this.previousColumns*this.previousRows)/(this.settings.columns*this.settings.rows)),this.getTotalPages()-1);this.currentPage!==t&&(this.currentPage=t)}this.panelsContainerEl.removeAttribute("style"),this.resize(),this.dispatchEvent("update")}resize(){if(this.dispatchEvent("beforeResize"),this.panelsMaskEl.removeAttribute("style"),!0===this.settings.responsive?(this.accordionEl.style.width="100%",this.accordionEl.style.height=i(this.settings.height),this.accordionEl.style.maxWidth=i(this.settings.width),this.accordionEl.style.maxHeight=i(this.settings.height),-1===this.settings.aspectRatio&&(this.settings.aspectRatio=this.settings.width/this.settings.height),this.accordionEl.style.height=i(this.accordionEl.clientWidth/this.settings.aspectRatio),"auto"===this.settings.responsiveMode?(this.autoResponsiveRatio=this.accordionEl.clientWidth/this.settings.width,this.panelsMaskEl.style.width=i(this.settings.width),isNaN(this.settings.height)?this.panelsMaskEl.style.height=i(Math.min(this.settings.width/this.settings.aspectRatio,parseInt(this.settings.height,10)/100*window.innerHeight)):this.panelsMaskEl.style.height=i(Math.min(this.settings.width/this.settings.aspectRatio,this.settings.height)),this.autoResponsiveRatio<1?(this.panelsMaskEl.style.transform=`scaleX( ${this.autoResponsiveRatio} ) scaleY( ${this.autoResponsiveRatio} )`,this.panelsMaskEl.style.transformOrigin="top left"):(this.panelsMaskEl.style.removeProperty("transform"),this.panelsMaskEl.style.removeProperty("transform-origin")),this.totalWidth=this.panelsMaskEl.clientWidth,this.totalHeight=this.panelsMaskEl.clientHeight):(this.totalWidth=this.accordionEl.clientWidth,this.totalHeight=this.accordionEl.clientHeight)):(this.accordionEl.style.width=i(this.settings.width),this.accordionEl.style.height=i(this.settings.height),this.accordionEl.style.removeProperty("max-width"),this.accordionEl.style.removeProperty("max-height"),this.totalWidth=this.accordionEl.clientWidth,this.totalHeight=this.accordionEl.clientHeight),this.loadingPanels.length=0,this.computedPanelDistance=this.settings.panelDistance,"string"==typeof this.computedPanelDistance&&(-1!==this.computedPanelDistance.indexOf("%")?this.computedPanelDistance=this.totalWidth*(parseInt(this.computedPanelDistance,10)/100):-1!==this.computedPanelDistance.indexOf("px")&&(this.computedPanelDistance=parseInt(this.computedPanelDistance,10))),this.closedPanelWidth=(this.totalWidth-(this.columns-1)*this.computedPanelDistance)/this.columns,this.closedPanelHeight=(this.totalHeight-(this.rows-1)*this.computedPanelDistance)/this.rows,this.computedOpenedPanelWidth=this.settings.openedPanelWidth,this.maxComputedOpenedPanelWidth=this.settings.maxOpenedPanelWidth,"string"==typeof this.maxComputedOpenedPanelWidth&&(-1!==this.maxComputedOpenedPanelWidth.indexOf("%")?this.maxComputedOpenedPanelWidth=this.totalWidth*(parseInt(this.maxComputedOpenedPanelWidth,10)/100):-1!==this.maxComputedOpenedPanelWidth.indexOf("px")&&(this.maxComputedOpenedPanelWidth=parseInt(this.maxComputedOpenedPanelWidth,10))),this.computedOpenedPanelHeight=this.settings.openedPanelHeight,this.maxComputedOpenedPanelHeight=this.settings.maxOpenedPanelHeight,"string"==typeof this.maxComputedOpenedPanelHeight&&(-1!==this.maxComputedOpenedPanelHeight.indexOf("%")?this.maxComputedOpenedPanelHeight=this.totalHeight*(parseInt(this.maxComputedOpenedPanelHeight,10)/100):-1!==this.maxComputedOpenedPanelHeight.indexOf("px")&&(this.maxComputedOpenedPanelHeight=parseInt(this.maxComputedOpenedPanelHeight,10))),"string"==typeof this.computedOpenedPanelWidth)if(-1!==this.computedOpenedPanelWidth.indexOf("%"))this.computedOpenedPanelWidth=this.totalWidth*(parseInt(this.computedOpenedPanelWidth,10)/100);else if(-1!==this.computedOpenedPanelWidth.indexOf("px"))this.computedOpenedPanelWidth=parseInt(this.computedOpenedPanelWidth,10);else if("max"===this.computedOpenedPanelWidth&&-1!==this.currentIndex){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelWidth="loading"===t?this.closedPanelWidth:Math.min(t.width,this.maxComputedOpenedPanelWidth)}if("string"==typeof this.computedOpenedPanelHeight)if(-1!==this.computedOpenedPanelHeight.indexOf("%"))this.computedOpenedPanelHeight=this.totalHeight*(parseInt(this.computedOpenedPanelHeight,10)/100);else if(-1!==this.computedOpenedPanelHeight.indexOf("px"))this.computedOpenedPanelHeight=parseInt(this.computedOpenedPanelHeight,10);else if("max"===this.computedOpenedPanelHeight&&-1!==this.currentIndex){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelHeight="loading"===t?this.closedPanelHeight:Math.min(t.height,this.maxComputedOpenedPanelHeight)}if("auto"===this.settings.openedPanelWidth||"auto"===this.settings.openedPanelHeight){const t=this.getMinSize(this.getFirstPanelFromPage(),this.getLastPanelFromPage()),e=t.width,i=t.height;"auto"===this.settings.openedPanelWidth&&(this.computedOpenedPanelWidth=e),"auto"===this.settings.openedPanelHeight&&(this.computedOpenedPanelHeight=i)}if(Array.from(document.getElementsByClassName("ga-background")).forEach((t=>{t.style.maxWidth=i(this.maxComputedOpenedPanelWidth),t.style.maxHeight=i(this.maxComputedOpenedPanelHeight)})),Array.from(document.getElementsByClassName("ga-background-opened")).forEach((t=>{t.style.maxWidth=i(this.maxComputedOpenedPanelWidth),t.style.maxHeight=i(this.maxComputedOpenedPanelHeight)})),this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1),this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1),this.computedOpenedPanelWidth=Math.floor(this.computedOpenedPanelWidth),this.computedOpenedPanelHeight=Math.floor(this.computedOpenedPanelHeight),this.collapsedPanelWidth=Math.floor(this.collapsedPanelWidth),this.collapsedPanelHeight=Math.floor(this.collapsedPanelHeight),this.closedPanelWidth=Math.floor(this.closedPanelWidth),this.closedPanelHeight=Math.floor(this.closedPanelHeight),this.totalWidth=this.closedPanelWidth*this.columns+this.computedPanelDistance*(this.columns-1),this.totalHeight=this.closedPanelHeight*this.rows+this.computedPanelDistance*(this.rows-1),"custom"===this.settings.responsiveMode||!1===this.settings.responsive?(this.accordionEl.style.width=i(this.totalWidth),this.accordionEl.style.height=i(this.totalHeight)):(this.accordionEl.style.width=i(this.totalWidth*this.autoResponsiveRatio),this.accordionEl.style.height=i(this.totalHeight*this.autoResponsiveRatio),this.panelsMaskEl.style.width=i(this.totalWidth),this.panelsMaskEl.style.height=i(this.totalHeight)),"horizontal"===this.settings.orientation?(this.totalPanelsSize=this.totalWidth*this.getTotalPages()+this.computedPanelDistance*(this.getTotalPages()-1),this.panelsContainerEl.style.width=i(this.totalPanelsSize)):(this.totalPanelsSize=this.totalHeight*this.getTotalPages()+this.computedPanelDistance*(this.getTotalPages()-1),this.panelsContainerEl.style.height=i(this.totalPanelsSize)),this.getTotalPages()>1){const t="horizontal"===this.settings.orientation?"left":"top",e=-(("horizontal"===this.settings.orientation?this.totalWidth:this.totalHeight)+this.computedPanelDistance)*this.currentPage;this.panelsContainerEl.style[t]=i(e)}this.panels.forEach(((t,e)=>{let i,s,n,a,o,r;if("horizontal"===this.settings.orientation?(o=e%this.columns+this.columns*Math.floor(e/(this.rows*this.columns)),r=Math.floor(e/this.columns)-this.rows*Math.floor(e/(this.rows*this.columns)),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(i=this.currentPage*(this.totalWidth+this.computedPanelDistance)+(o-this.currentPage*this.columns)*(this.collapsedPanelWidth+this.computedPanelDistance)+(e%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),s=r*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(e/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(i=o*(this.closedPanelWidth+this.computedPanelDistance),s=r*(this.closedPanelHeight+this.computedPanelDistance))):(o=e%this.columns,r=Math.floor(e/this.columns),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(i=o*(this.collapsedPanelWidth+this.computedPanelDistance)+(e%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),s=this.currentPage*(this.totalHeight+this.computedPanelDistance)+(r-this.currentPage*this.rows)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(e/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(i=o*(this.closedPanelWidth+this.computedPanelDistance),s=r*(this.closedPanelHeight+this.computedPanelDistance))),-1!==this.currentIndex&&Math.floor(e/(this.rows*this.columns))===this.currentPage?(n=e%this.columns==this.currentIndex%this.columns?this.computedOpenedPanelWidth:this.collapsedPanelWidth,a=Math.floor(e/this.columns)===Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight:this.collapsedPanelHeight):(n=this.closedPanelWidth,a=this.closedPanelHeight),Math.floor(e/(this.rows*this.columns))===this.currentPage&&"max"===this.settings.openedPanelWidth&&e%this.columns==this.currentIndex%this.columns||"max"===this.settings.openedPanelHeight&&Math.floor(e/this.columns)===Math.floor(this.currentIndex/this.columns)){const o=t.getContentSize();e%this.columns==this.currentIndex%this.columns&&("loading"===o&&-1===this.loadingPanels.indexOf(e)?this.loadingPanels.push(e):o.width{if(null===this.accordionEl.querySelector(`.ga-panel[data-index="${e}"]`)){t.removeEventListener("panelMouseOver"),t.removeEventListener("panelMouseOut"),t.removeEventListener("panelClick"),t.removeEventListener("imagesComplete"),t.destroy();const i=this.panels.findIndex((t=>t.index===e));this.panels.splice(i,1)}})),Array.from(this.accordionEl.getElementsByClassName("ga-panel")).forEach(((t,e)=>{if(!1===t.hasAttribute("data-init")){const i=this.createPanel(t);this.panels.splice(e,0,i)}this.panels[e].settings=this.settings,this.panels[e].index=e}))}createPanel(t){const e=new a(t,this.settings);return e.addEventListener("panelMouseOver",(t=>{!0!==this.isPageScrolling&&("hover"===this.settings.openPanelOn&&(clearTimeout(this.mouseDelayTimer),this.mouseDelayTimer=setTimeout((()=>{this.openPanel(t.detail.index)}),this.settings.mouseDelay)),this.dispatchEvent("panelMouseOver",{index:t.detail.index}))})),e.addEventListener("panelMouseOut",(t=>{!0!==this.isPageScrolling&&this.dispatchEvent("panelMouseOut",{index:t.detail.index})})),e.addEventListener("panelClick",(t=>{this.accordionEl.classList.contains("ga-swiping")||("click"===this.settings.openPanelOn&&(t.detail.index!==this.currentIndex?this.openPanel(t.detail.index):this.closePanels()),this.dispatchEvent("panelClick",{index:t.detail.index}))})),e.addEventListener("panelMouseDown",(e=>{const i=t.getElementsByTagName("a");i.length<1||(Array.from(i).forEach((t=>{t.removeEventListener("click",this.eventHandlerReferences["click.link.panel"])})),e.detail.index!==this.currentIndex&&"click"===this.settings.openPanelOn&&Array.from(i).forEach((t=>{t.addEventListener("click",this.eventHandlerReferences["click.link.panel"]=t=>{t.preventDefault()})})))})),e.addEventListener("imagesComplete",(t=>{t.detail.index===this.currentIndex&&t.detail.contentSize!==this.computedOpenedPanelSize&&this.openPanel(t.detail.index,!0)})),e}getPanelAt(t){return this.panels[t]}getCurrentIndex(){return this.currentIndex}getTotalPanels(){return this.panels.length}nextPanel(){const t=this.currentIndex>=this.getTotalPanels()-1?0:this.currentIndex+1;this.openPanel(t)}previousPanel(){const t=this.currentIndex<=0?this.getTotalPanels()-1:this.currentIndex-1;this.openPanel(t)}destroy(){this.addOnsManager.destroyAll(),this.accordionEl.removeAttribute("style"),this.panelsContainerEl.removeAttribute("style"),this.accordionEl.setAttribute("class","grid-accordion ga-no-js"),this.accordionEl.removeEventListener("mouseenter",this.eventHandlerReferences["mouseenter.accordion"]),this.accordionEl.removeEventListener("mouseleave",this.eventHandlerReferences["mouseleave.accordion"]),this.windowResizeHandler.removeEventListener("resize"),this.windowResizeHandler.destroy(),this.stopPanelsAnimation(this.openPanelAnimation),this.stopPanelsAnimation(this.closePanelsAnimation),this.panels.forEach((t=>{t.removeEventListener("panelMouseOver"),t.removeEventListener("panelMouseOut"),t.removeEventListener("panelClick"),t.removeEventListener("imagesComplete"),t.destroy()})),this.panels.length=0,this.accordionEl.insertBefore(this.panelsContainerEl,this.accordionEl.firstChild),this.panelsMaskEl.remove()}animatePanels(t,e){const i=(new Date).valueOf();let s=0;t.isRunning=!0,t.timer=window.requestAnimationFrame((function n(){s<1?(s=((new Date).valueOf()-i)/e.duration,s>1&&(s=1),s=.5-Math.cos(s*Math.PI)/2,e.step(s),t.timer=window.requestAnimationFrame(n)):(e.complete(),t.isRunning=!1,window.cancelAnimationFrame(t.timer))}))}stopPanelsAnimation(t){void 0!==t.isRunning&&!0===t.isRunning&&(t.isRunning=!1,window.cancelAnimationFrame(t.timer))}openPanel(t,e){if(t===this.currentIndex&&!0!==e)return;!0===this.accordionEl.classList.contains("ga-closed")&&this.accordionEl.classList.replace("ga-closed","ga-opened");const i=this.currentIndex;if(this.currentIndex=t,-1!==this.settings.columns&&-1!==this.settings.rows){const e=Math.floor(this.currentIndex/(this.columns*this.rows));e!==this.currentPage&&this.gotoPage(e),this.currentIndex=t}const s=[],n=[],a=[],o=[],r=[],l=[],h=[],d=[],c=[],p=this.getFirstPanelFromPage(),u=this.getLastPanelFromPage();let g=0;if(this.loadingPanels.length=0,null!==this.accordionEl.querySelector(".ga-panel.ga-opened")&&this.accordionEl.querySelector(".ga-panel.ga-opened").classList.remove("ga-opened"),this.accordionEl.getElementsByClassName("ga-panel")[this.currentIndex].classList.add("ga-opened"),"max"===this.settings.openedPanelWidth){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelWidth="loading"===t?this.closedPanelWidth:Math.min(t.width,this.maxComputedOpenedPanelWidth),this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1)}if("max"===this.settings.openedPanelHeight){const t=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelHeight="loading"===t?this.closedPanelHeight:Math.min(t.height,this.maxComputedOpenedPanelHeight),this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1)}if("auto"===this.settings.openedPanelWidth||"auto"===this.settings.openedPanelHeight){const t=this.getMinSize(p,u),e=t.width,i=t.height;"auto"===this.settings.openedPanelWidth&&(this.computedOpenedPanelWidth=e,this.collapsedPanelWidth=(this.totalWidth-this.computedOpenedPanelWidth-(this.columns-1)*this.computedPanelDistance)/(this.columns-1)),"auto"===this.settings.openedPanelHeight&&(this.computedOpenedPanelHeight=i,this.collapsedPanelHeight=(this.totalHeight-this.computedOpenedPanelHeight-(this.rows-1)*this.computedPanelDistance)/(this.rows-1))}for(let t=p;t<=u;t++){const e=this.getPanelAt(t),i=e.getPosition(),p=e.getContentSize();r[t]=i.left,l[t]=i.top,"horizontal"===this.settings.orientation?(s[t]=this.currentPage*(this.totalWidth+this.computedPanelDistance)+g%this.columns*(this.collapsedPanelWidth+this.computedPanelDistance)+(t%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),n[t]=Math.floor(g/this.columns)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(t/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0)):(s[t]=g%this.columns*(this.collapsedPanelWidth+this.computedPanelDistance)+(t%this.columns>this.currentIndex%this.columns?this.computedOpenedPanelWidth-this.collapsedPanelWidth:0),n[t]=this.currentPage*(this.totalHeight+this.computedPanelDistance)+Math.floor(g/this.columns)*(this.collapsedPanelHeight+this.computedPanelDistance)+(Math.floor(t/this.columns)>Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight-this.collapsedPanelHeight:0));const u=e.getSize();h[t]=u.width,d[t]=u.height,a[t]=t%this.columns==this.currentIndex%this.columns?this.computedOpenedPanelWidth:this.collapsedPanelWidth,o[t]=Math.floor(t/this.columns)===Math.floor(this.currentIndex/this.columns)?this.computedOpenedPanelHeight:this.collapsedPanelHeight,"max"===this.settings.openedPanelWidth&&t%this.columns==this.currentIndex%this.columns&&("loading"===p&&-1===this.loadingPanels.indexOf(t)?this.loadingPanels.push(t):p.width{for(let e=0;e{this.dispatchEvent("panelOpenComplete",{index:this.currentIndex})}}),this.dispatchEvent("panelOpen",{index:this.currentIndex,previousIndex:i})}closePanels(){const t=this.currentIndex;this.currentIndex=-1,!0===this.accordionEl.classList.contains("ga-opened")&&this.accordionEl.classList.replace("ga-opened","ga-closed"),null!==this.accordionEl.querySelector(".ga-panel.ga-opened")&&this.accordionEl.querySelector(".ga-panel.ga-opened").classList.remove("ga-opened"),clearTimeout(this.mouseDelayTimer);const e=[],i=[],s=[],n=[],a=[],o=[],r=[],l=[],h=this.getFirstPanelFromPage(),d=this.getLastPanelFromPage();let c=0;for(let t=h;t<=d;t++){const h=this.getPanelAt(t),d=h.getPosition();a[t]=d.left,o[t]=d.top,"horizontal"===this.settings.orientation?(e[t]=this.currentPage*(this.totalWidth+this.computedPanelDistance)+c%this.columns*(this.closedPanelWidth+this.computedPanelDistance),i[t]=Math.floor(c/this.columns)*(this.closedPanelHeight+this.computedPanelDistance)):(e[t]=c%this.columns*(this.closedPanelWidth+this.computedPanelDistance),i[t]=this.currentPage*(this.totalHeight+this.computedPanelDistance)+Math.floor(c/this.columns)*(this.closedPanelHeight+this.computedPanelDistance));const p=h.getSize();r[t]=p.width,l[t]=p.height,s[t]=this.closedPanelWidth,n[t]=this.closedPanelHeight,c++}this.openPanelAnimation.page===this.currentPage&&this.stopPanelsAnimation(this.openPanelAnimation),this.stopPanelsAnimation(this.closePanelsAnimation),this.closePanelsAnimation.page=this.currentPage,this.animatePanels(this.closePanelsAnimation,{duration:this.settings.closePanelDuration,step:t=>{for(let c=h;c<=d;c++){const h=this.getPanelAt(c);h.setPosition(t*(e[c]-a[c])+a[c],t*(i[c]-o[c])+o[c]),h.setSize(t*(s[c]-r[c])+r[c],t*(n[c]-l[c])+l[c])}},complete:()=>{this.dispatchEvent("panelsCloseComplete",{previousIndex:t})}}),this.dispatchEvent("panelsClose",{previousIndex:t})}getMinSize(t,e){let i=this.maxComputedOpenedPanelWidth,s=this.maxComputedOpenedPanelHeight;for(let n=t;n<=e;n++){const t=this.getPanelAt(n).getContentSize();n%this.columns==this.currentIndex%this.columns&&("loading"===t&&-1===this.loadingPanels.indexOf(n)?(this.loadingPanels.push(n),i=this.closedPanelWidth):t.width{this.isPageScrolling=!1,this.dispatchEvent("pageScrollComplete",{index:this.currentPage})})),this.panelsContainerEl.style.transition=`${e} ${this.settings.pageScrollDuration/1e3}s`,this.panelsContainerEl.style[e]=i(n)}nextPage(){const t=this.currentPage>=this.getTotalPages()-1?0:this.currentPage+1;this.gotoPage(t)}previousPage(){const t=this.currentPage<=0?this.getTotalPages()-1:this.currentPage-1;this.gotoPage(t)}getFirstPanelFromPage(){return 1===this.getTotalPages()?0:this.currentPage*(this.columns*this.rows)}getLastPanelFromPage(){return 1===this.getTotalPages()||this.currentPage===this.getTotalPages()-1?this.getTotalPanels()-1:(this.currentPage+1)*(this.columns*this.rows)-1}}})(); \ No newline at end of file